[ Index ]

PHP Cross Reference of WordPress

title

Body

[close]

/wp-includes/js/dist/ -> editor.min.js (source)

   1  /*! This file is auto-generated */
   2  this.wp=this.wp||{},this.wp.editor=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=457)}({0:function(e,t){e.exports=window.wp.element},1:function(e,t){e.exports=window.wp.i18n},10:function(e,t,n){var r;
   3  /*!
   4    Copyright (c) 2017 Jed Watson.
   5    Licensed under the MIT License (MIT), see
   6    http://jedwatson.github.io/classnames
   7  */!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var i=typeof r;if("string"===i||"number"===i)e.push(r);else if(Array.isArray(r)&&r.length){var c=o.apply(null,r);c&&e.push(c)}else if("object"===i)for(var a in r)n.call(r,a)&&r[a]&&e.push(a)}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(r=function(){return o}.apply(t,[]))||(e.exports=r)}()},11:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(38);var o=n(31),i=n(39);function c(e,t){return Object(r.a)(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,i=void 0;try{for(var c,a=e[Symbol.iterator]();!(r=(c=a.next()).done)&&(n.push(c.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==a.return||a.return()}finally{if(o)throw i}}return n}}(e,t)||Object(o.a)(e,t)||Object(i.a)()}},12:function(e,t){e.exports=window.wp.compose},126:function(e,t){e.exports=window.wp.wordcount},13:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(44);function o(e,t){if(null==e)return{};var n,o,i=Object(r.a)(e,t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(o=0;o<c.length;o++)n=c[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}},138:function(e,t,n){"use strict";var r=n(5),o=n(13),i=n(0);function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}t.a=function(e){var t=e.icon,n=e.size,a=void 0===n?24:n,s=Object(o.a)(e,["icon","size"]);return Object(i.cloneElement)(t,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(Object(n),!0).forEach((function(t){Object(r.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({width:a,height:a},s))}},139:function(e,t,n){"use strict";var r=n(140);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,i,c){if(c!==r){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:o};return n.PropTypes=n,n}},14:function(e,t){e.exports=window.React},140:function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},146:function(e,t){e.exports=window.wp.reusableBlocks},15:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(24);var o=n(37),i=n(31);function c(e){return function(e){if(Array.isArray(e))return Object(r.a)(e)}(e)||Object(o.a)(e)||Object(i.a)(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},154:function(e,t){e.exports=window.wp.mediaUtils},159:function(e,t,n){"use strict";var r=n(0),o=n(7),i=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M13 11.9l3.3-3.4-1.1-1-3.2 3.3-3.2-3.3-1.1 1 3.3 3.4-3.5 3.6 1 1L12 13l3.5 3.5 1-1z"}));t.a=i},16:function(e,t){e.exports=window.regeneratorRuntime},160:function(e,t,n){"use strict";var r=n(0),o=n(7),i=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"}));t.a=i},161:function(e,t,n){"use strict";var r=n(0),o=n(7),i=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M18.3 5.6L9.9 16.9l-4.6-3.4-.9 1.2 5.8 4.3 9.3-12.6z"}));t.a=i},17:function(e,t){e.exports=window.wp.keycodes},18:function(e,t,n){"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.d(t,"a",(function(){return r}))},186:function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},c=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&(n[r[o]]=e[r[o]])}return n};t.__esModule=!0;var a=n(14),s=n(30),u=n(187),l=n(188),d=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={lineHeight:null},t.textarea=null,t.onResize=function(e){t.props.onResize&&t.props.onResize(e)},t.updateLineHeight=function(){t.textarea&&t.setState({lineHeight:l(t.textarea)})},t.onChange=function(e){var n=t.props.onChange;t.currentValue=e.currentTarget.value,n&&n(e)},t}return o(t,e),t.prototype.componentDidMount=function(){var e=this,t=this.props,n=t.maxRows,r=t.async;"number"==typeof n&&this.updateLineHeight(),"number"==typeof n||r?setTimeout((function(){return e.textarea&&u(e.textarea)})):this.textarea&&u(this.textarea),this.textarea&&this.textarea.addEventListener("autosize:resized",this.onResize)},t.prototype.componentWillUnmount=function(){this.textarea&&(this.textarea.removeEventListener("autosize:resized",this.onResize),u.destroy(this.textarea))},t.prototype.render=function(){var e=this,t=this.props,n=(t.onResize,t.maxRows),r=(t.onChange,t.style),o=(t.innerRef,t.children),s=c(t,["onResize","maxRows","onChange","style","innerRef","children"]),u=this.state.lineHeight,l=n&&u?u*n:null;return a.createElement("textarea",i({},s,{onChange:this.onChange,style:l?i({},r,{maxHeight:l}):r,ref:function(t){e.textarea=t,"function"==typeof e.props.innerRef?e.props.innerRef(t):e.props.innerRef&&(e.props.innerRef.current=t)}}),o)},t.prototype.componentDidUpdate=function(){this.textarea&&u.update(this.textarea)},t.defaultProps={rows:1,async:!1},t.propTypes={rows:s.number,maxRows:s.number,onResize:s.func,innerRef:s.any,async:s.bool},t}(a.Component);t.TextareaAutosize=a.forwardRef((function(e,t){return a.createElement(d,i({},e,{innerRef:t}))}))},187:function(e,t,n){var r,o,i;
   8  /*!
   9      autosize 4.0.2
  10      license: MIT
  11      http://www.jacklmoore.com/autosize
  12  */o=[e,t],void 0===(i="function"==typeof(r=function(e,t){"use strict";var n,r,o="function"==typeof Map?new Map:(n=[],r=[],{has:function(e){return n.indexOf(e)>-1},get:function(e){return r[n.indexOf(e)]},set:function(e,t){-1===n.indexOf(e)&&(n.push(e),r.push(t))},delete:function(e){var t=n.indexOf(e);t>-1&&(n.splice(t,1),r.splice(t,1))}}),i=function(e){return new Event(e,{bubbles:!0})};try{new Event("test")}catch(e){i=function(e){var t=document.createEvent("Event");return t.initEvent(e,!0,!1),t}}function c(e){if(e&&e.nodeName&&"TEXTAREA"===e.nodeName&&!o.has(e)){var t,n=null,r=null,c=null,a=function(){e.clientWidth!==r&&d()},s=function(t){window.removeEventListener("resize",a,!1),e.removeEventListener("input",d,!1),e.removeEventListener("keyup",d,!1),e.removeEventListener("autosize:destroy",s,!1),e.removeEventListener("autosize:update",d,!1),Object.keys(t).forEach((function(n){e.style[n]=t[n]})),o.delete(e)}.bind(e,{height:e.style.height,resize:e.style.resize,overflowY:e.style.overflowY,overflowX:e.style.overflowX,wordWrap:e.style.wordWrap});e.addEventListener("autosize:destroy",s,!1),"onpropertychange"in e&&"oninput"in e&&e.addEventListener("keyup",d,!1),window.addEventListener("resize",a,!1),e.addEventListener("input",d,!1),e.addEventListener("autosize:update",d,!1),e.style.overflowX="hidden",e.style.wordWrap="break-word",o.set(e,{destroy:s,update:d}),"vertical"===(t=window.getComputedStyle(e,null)).resize?e.style.resize="none":"both"===t.resize&&(e.style.resize="horizontal"),n="content-box"===t.boxSizing?-(parseFloat(t.paddingTop)+parseFloat(t.paddingBottom)):parseFloat(t.borderTopWidth)+parseFloat(t.borderBottomWidth),isNaN(n)&&(n=0),d()}function u(t){var n=e.style.width;e.style.width="0px",e.offsetWidth,e.style.width=n,e.style.overflowY=t}function l(){if(0!==e.scrollHeight){var t=function(e){for(var t=[];e&&e.parentNode&&e.parentNode instanceof Element;)e.parentNode.scrollTop&&t.push({node:e.parentNode,scrollTop:e.parentNode.scrollTop}),e=e.parentNode;return t}(e),o=document.documentElement&&document.documentElement.scrollTop;e.style.height="",e.style.height=e.scrollHeight+n+"px",r=e.clientWidth,t.forEach((function(e){e.node.scrollTop=e.scrollTop})),o&&(document.documentElement.scrollTop=o)}}function d(){l();var t=Math.round(parseFloat(e.style.height)),n=window.getComputedStyle(e,null),r="content-box"===n.boxSizing?Math.round(parseFloat(n.height)):e.offsetHeight;if(r<t?"hidden"===n.overflowY&&(u("scroll"),l(),r="content-box"===n.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight):"hidden"!==n.overflowY&&(u("hidden"),l(),r="content-box"===n.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight),c!==r){c=r;var o=i("autosize:resized");try{e.dispatchEvent(o)}catch(e){}}}}function a(e){var t=o.get(e);t&&t.destroy()}function s(e){var t=o.get(e);t&&t.update()}var u=null;"undefined"==typeof window||"function"!=typeof window.getComputedStyle?((u=function(e){return e}).destroy=function(e){return e},u.update=function(e){return e}):((u=function(e,t){return e&&Array.prototype.forEach.call(e.length?e:[e],(function(e){return c(e)})),e}).destroy=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],a),e},u.update=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],s),e}),t.default=u,e.exports=t.default})?r.apply(t,o):r)||(e.exports=i)},188:function(e,t,n){var r=n(189);e.exports=function(e){var t=r(e,"line-height"),n=parseFloat(t,10);if(t===n+""){var o=e.style.lineHeight;e.style.lineHeight=t+"em",t=r(e,"line-height"),n=parseFloat(t,10),o?e.style.lineHeight=o:delete e.style.lineHeight}if(-1!==t.indexOf("pt")?(n*=4,n/=3):-1!==t.indexOf("mm")?(n*=96,n/=25.4):-1!==t.indexOf("cm")?(n*=96,n/=2.54):-1!==t.indexOf("in")?n*=96:-1!==t.indexOf("pc")&&(n*=16),n=Math.round(n),"normal"===t){var i=e.nodeName,c=document.createElement(i);c.innerHTML="&nbsp;","TEXTAREA"===i.toUpperCase()&&c.setAttribute("rows","1");var a=r(e,"font-size");c.style.fontSize=a,c.style.padding="0px",c.style.border="0px";var s=document.body;s.appendChild(c),n=c.offsetHeight,s.removeChild(c)}return n}},189:function(e,t){e.exports=function(e,t,n){return((n=window.getComputedStyle)?n(e):e.currentStyle)[t.replace(/-(\w)/gi,(function(e,t){return t.toUpperCase()}))]}},19:function(e,t,n){"use strict";function r(e){return(r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"a",(function(){return r}))},2:function(e,t){e.exports=window.lodash},21:function(e,t){e.exports=window.wp.richText},24:function(e,t,n){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}n.d(t,"a",(function(){return r}))},25:function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,"a",(function(){return r}))},26:function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function o(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}n.d(t,"a",(function(){return o}))},28:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(52);function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Object(r.a)(e,t)}},29:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(42),o=n(18);function i(e,t){return!t||"object"!==Object(r.a)(t)&&"function"!=typeof t?Object(o.a)(e):t}},3:function(e,t){e.exports=window.wp.components},30:function(e,t,n){e.exports=n(139)()},31:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(24);function o(e,t){if(e){if("string"==typeof e)return Object(r.a)(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Object(r.a)(e,t):void 0}}},313:function(e,t,n){"use strict";var r=n(0),o=n(7),i=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(r.createElement)(o.Path,{d:"M2 2h5v11H2V2zm6 0h5v5H8V2zm6 0h4v16h-4V2zM8 8h5v5H8V8zm-6 6h11v4H2v-4z"}));t.a=i},32:function(e,t){e.exports=window.wp.url},33:function(e,t){e.exports=window.wp.hooks},35:function(e,t){e.exports=window.wp.deprecated},37:function(e,t,n){"use strict";function r(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}n.d(t,"a",(function(){return r}))},38:function(e,t,n){"use strict";function r(e){if(Array.isArray(e))return e}n.d(t,"a",(function(){return r}))},39:function(e,t,n){"use strict";function r(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}n.d(t,"a",(function(){return r}))},4:function(e,t){e.exports=window.wp.data},41:function(e,t,n){"use strict";var r,o;function i(e){return[e]}function c(){var e={clear:function(){e.head=null}};return e}function a(e,t,n){var r;if(e.length!==t.length)return!1;for(r=n;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}r={},o="undefined"!=typeof WeakMap,t.a=function(e,t){var n,s;function u(){n=o?new WeakMap:c()}function l(){var n,r,o,i,c,u=arguments.length;for(i=new Array(u),o=0;o<u;o++)i[o]=arguments[o];for(c=t.apply(null,i),(n=s(c)).isUniqueByDependants||(n.lastDependants&&!a(c,n.lastDependants,0)&&n.clear(),n.lastDependants=c),r=n.head;r;){if(a(r.args,i,1))return r!==n.head&&(r.prev.next=r.next,r.next&&(r.next.prev=r.prev),r.next=n.head,r.prev=null,n.head.prev=r,n.head=r),r.val;r=r.next}return r={val:e.apply(null,i)},i[0]=null,r.args=i,n.head&&(n.head.prev=r,r.next=n.head),n.head=r,r.val}return t||(t=i),s=o?function(e){var t,o,i,a,s,u=n,l=!0;for(t=0;t<e.length;t++){if(o=e[t],!(s=o)||"object"!=typeof s){l=!1;break}u.has(o)?u=u.get(o):(i=new WeakMap,u.set(o,i),u=i)}return u.has(r)||((a=c()).isUniqueByDependants=l,u.set(r,a)),u.get(r)}:function(){return n},l.getDependants=t,l.clear=u,u(),l}},42:function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}n.d(t,"a",(function(){return r}))},44:function(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}n.d(t,"a",(function(){return r}))},457:function(e,t,n){"use strict";n.r(t),n.d(t,"storeConfig",(function(){return Cr})),n.d(t,"store",(function(){return xr})),n.d(t,"userAutocompleter",(function(){return w})),n.d(t,"AutosaveMonitor",(function(){return Ur})),n.d(t,"DocumentOutline",(function(){return $r})),n.d(t,"DocumentOutlineCheck",(function(){return Yr})),n.d(t,"VisualEditorGlobalKeyboardShortcuts",(function(){return eo})),n.d(t,"EditorGlobalKeyboardShortcuts",(function(){return to})),n.d(t,"TextEditorGlobalKeyboardShortcuts",(function(){return no})),n.d(t,"EditorKeyboardShortcutsRegister",(function(){return ro})),n.d(t,"EditorHistoryRedo",(function(){return so})),n.d(t,"EditorHistoryUndo",(function(){return lo})),n.d(t,"EditorNotices",(function(){return bo})),n.d(t,"EntitiesSavedStates",(function(){return _o})),n.d(t,"ErrorBoundary",(function(){return So})),n.d(t,"LocalAutosaveMonitor",(function(){return Co})),n.d(t,"PageAttributesCheck",(function(){return xo})),n.d(t,"PageAttributesOrder",(function(){return Io})),n.d(t,"PageAttributesParent",(function(){return Uo})),n.d(t,"PageTemplate",(function(){return Fo})),n.d(t,"PostAuthor",(function(){return Ho})),n.d(t,"PostAuthorCheck",(function(){return Wo})),n.d(t,"PostComments",(function(){return Go})),n.d(t,"PostExcerpt",(function(){return qo})),n.d(t,"PostExcerptCheck",(function(){return Ko})),n.d(t,"PostFeaturedImage",(function(){return ni})),n.d(t,"PostFeaturedImageCheck",(function(){return $o})),n.d(t,"PostFormat",(function(){return ii})),n.d(t,"PostFormatCheck",(function(){return ri})),n.d(t,"PostLastRevision",(function(){return si})),n.d(t,"PostLastRevisionCheck",(function(){return ai})),n.d(t,"PostLockedModal",(function(){return pi})),n.d(t,"PostPendingStatus",(function(){return fi})),n.d(t,"PostPendingStatusCheck",(function(){return bi})),n.d(t,"PostPingbacks",(function(){return hi})),n.d(t,"PostPreviewButton",(function(){return di})),n.d(t,"PostPublishButton",(function(){return gi})),n.d(t,"PostPublishButtonLabel",(function(){return mi})),n.d(t,"PostPublishPanel",(function(){return Xi})),n.d(t,"PostSavedState",(function(){return rc})),n.d(t,"PostSchedule",(function(){return ki})),n.d(t,"PostScheduleCheck",(function(){return oc})),n.d(t,"PostScheduleLabel",(function(){return Ei})),n.d(t,"PostSlug",(function(){return sc})),n.d(t,"PostSlugCheck",(function(){return ic})),n.d(t,"PostSticky",(function(){return lc})),n.d(t,"PostStickyCheck",(function(){return uc})),n.d(t,"PostSwitchToDraftButton",(function(){return nc})),n.d(t,"PostTaxonomies",(function(){return vc})),n.d(t,"PostTaxonomiesCheck",(function(){return Oc})),n.d(t,"PostTextEditor",(function(){return yc})),n.d(t,"PostTitle",(function(){return wc})),n.d(t,"PostTrash",(function(){return Pc})),n.d(t,"PostTrashCheck",(function(){return Sc})),n.d(t,"PostTypeSupportCheck",(function(){return Bo})),n.d(t,"PostVisibility",(function(){return Pi})),n.d(t,"PostVisibilityLabel",(function(){return Si})),n.d(t,"PostVisibilityCheck",(function(){return kc})),n.d(t,"TableOfContents",(function(){return Ac})),n.d(t,"UnsavedChangesWarning",(function(){return Ic})),n.d(t,"WordCount",(function(){return Cc})),n.d(t,"EditorProvider",(function(){return Gc})),n.d(t,"ServerSideRender",(function(){return Kc.a})),n.d(t,"RichText",(function(){return Yc})),n.d(t,"Autocomplete",(function(){return Xc})),n.d(t,"AlignmentToolbar",(function(){return Jc})),n.d(t,"BlockAlignmentToolbar",(function(){return Zc})),n.d(t,"BlockControls",(function(){return ea})),n.d(t,"BlockEdit",(function(){return ta})),n.d(t,"BlockEditorKeyboardShortcuts",(function(){return na})),n.d(t,"BlockFormatControls",(function(){return ra})),n.d(t,"BlockIcon",(function(){return oa})),n.d(t,"BlockInspector",(function(){return ia})),n.d(t,"BlockList",(function(){return ca})),n.d(t,"BlockMover",(function(){return aa})),n.d(t,"BlockNavigationDropdown",(function(){return sa})),n.d(t,"BlockSelectionClearer",(function(){return ua})),n.d(t,"BlockSettingsMenu",(function(){return la})),n.d(t,"BlockTitle",(function(){return da})),n.d(t,"BlockToolbar",(function(){return pa})),n.d(t,"ColorPalette",(function(){return ba})),n.d(t,"ContrastChecker",(function(){return fa})),n.d(t,"CopyHandler",(function(){return ha})),n.d(t,"DefaultBlockAppender",(function(){return ma})),n.d(t,"FontSizePicker",(function(){return va})),n.d(t,"Inserter",(function(){return Oa})),n.d(t,"InnerBlocks",(function(){return ga})),n.d(t,"InspectorAdvancedControls",(function(){return ja})),n.d(t,"InspectorControls",(function(){return ya})),n.d(t,"PanelColorSettings",(function(){return _a})),n.d(t,"PlainText",(function(){return wa})),n.d(t,"RichTextShortcut",(function(){return Pa})),n.d(t,"RichTextToolbarButton",(function(){return Sa})),n.d(t,"__unstableRichTextInputEvent",(function(){return ka})),n.d(t,"MediaPlaceholder",(function(){return Ea})),n.d(t,"MediaUpload",(function(){return Ta})),n.d(t,"MediaUploadCheck",(function(){return Ca})),n.d(t,"MultiSelectScrollIntoView",(function(){return xa})),n.d(t,"NavigableToolbar",(function(){return Ba})),n.d(t,"ObserveTyping",(function(){return Aa})),n.d(t,"PreserveScrollInReorder",(function(){return Ia})),n.d(t,"SkipToSelectedBlock",(function(){return Ra})),n.d(t,"URLInput",(function(){return Da})),n.d(t,"URLInputButton",(function(){return Na})),n.d(t,"URLPopover",(function(){return La})),n.d(t,"Warning",(function(){return Ua})),n.d(t,"WritingFlow",(function(){return Fa})),n.d(t,"createCustomColorsHOC",(function(){return Ma})),n.d(t,"getColorClassName",(function(){return Va})),n.d(t,"getColorObjectByAttributeValues",(function(){return za})),n.d(t,"getColorObjectByColorValue",(function(){return Ha})),n.d(t,"getFontSize",(function(){return Wa})),n.d(t,"getFontSizeClass",(function(){return Ga})),n.d(t,"withColorContext",(function(){return qa})),n.d(t,"withColors",(function(){return Ka})),n.d(t,"withFontSizes",(function(){return Qa})),n.d(t,"mediaUpload",(function(){return Mc})),n.d(t,"cleanForSlug",(function(){return W})),n.d(t,"transformStyles",(function(){return i.transformStyles}));var r={};n.r(r),n.d(r,"hasEditorUndo",(function(){return $})),n.d(r,"hasEditorRedo",(function(){return Y})),n.d(r,"isEditedPostNew",(function(){return X})),n.d(r,"hasChangedContent",(function(){return J})),n.d(r,"isEditedPostDirty",(function(){return Z})),n.d(r,"hasNonPostEntityChanges",(function(){return ee})),n.d(r,"isCleanNewPost",(function(){return te})),n.d(r,"getCurrentPost",(function(){return ne})),n.d(r,"getCurrentPostType",(function(){return re})),n.d(r,"getCurrentPostId",(function(){return oe})),n.d(r,"getCurrentPostRevisionsCount",(function(){return ie})),n.d(r,"getCurrentPostLastRevisionId",(function(){return ce})),n.d(r,"getPostEdits",(function(){return ae})),n.d(r,"getReferenceByDistinctEdits",(function(){return se})),n.d(r,"getCurrentPostAttribute",(function(){return ue})),n.d(r,"getEditedPostAttribute",(function(){return le})),n.d(r,"getAutosaveAttribute",(function(){return de})),n.d(r,"getEditedPostVisibility",(function(){return pe})),n.d(r,"isCurrentPostPending",(function(){return be})),n.d(r,"isCurrentPostPublished",(function(){return fe})),n.d(r,"isCurrentPostScheduled",(function(){return he})),n.d(r,"isEditedPostPublishable",(function(){return me})),n.d(r,"isEditedPostSaveable",(function(){return ve})),n.d(r,"isEditedPostEmpty",(function(){return Oe})),n.d(r,"isEditedPostAutosaveable",(function(){return ge})),n.d(r,"getAutosave",(function(){return je})),n.d(r,"hasAutosave",(function(){return ye})),n.d(r,"isEditedPostBeingScheduled",(function(){return _e})),n.d(r,"isEditedPostDateFloating",(function(){return we})),n.d(r,"isSavingPost",(function(){return Pe})),n.d(r,"didPostSaveRequestSucceed",(function(){return Se})),n.d(r,"didPostSaveRequestFail",(function(){return ke})),n.d(r,"isAutosavingPost",(function(){return Ee})),n.d(r,"isPreviewingPost",(function(){return Te})),n.d(r,"getEditedPostPreviewLink",(function(){return Ce})),n.d(r,"getSuggestedPostFormat",(function(){return xe})),n.d(r,"getBlocksForSerialization",(function(){return Be})),n.d(r,"getEditedPostContent",(function(){return Ae})),n.d(r,"isPublishingPost",(function(){return Ie})),n.d(r,"isPermalinkEditable",(function(){return Re})),n.d(r,"getPermalink",(function(){return De})),n.d(r,"getEditedPostSlug",(function(){return Ne})),n.d(r,"getPermalinkParts",(function(){return Le})),n.d(r,"isPostLocked",(function(){return Ue})),n.d(r,"isPostSavingLocked",(function(){return Fe})),n.d(r,"isPostAutosavingLocked",(function(){return Me})),n.d(r,"isPostLockTakeover",(function(){return Ve})),n.d(r,"getPostLockUser",(function(){return ze})),n.d(r,"getActivePostLock",(function(){return He})),n.d(r,"canUserUseUnfilteredHTML",(function(){return We})),n.d(r,"isPublishSidebarEnabled",(function(){return Ge})),n.d(r,"getEditorBlocks",(function(){return qe})),n.d(r,"getEditorSelectionStart",(function(){return Ke})),n.d(r,"getEditorSelectionEnd",(function(){return Qe})),n.d(r,"__unstableIsEditorReady",(function(){return $e})),n.d(r,"getEditorSettings",(function(){return Ye})),n.d(r,"getStateBeforeOptimisticTransaction",(function(){return Xe})),n.d(r,"inSomeHistory",(function(){return Je})),n.d(r,"getBlockName",(function(){return et})),n.d(r,"isBlockValid",(function(){return tt})),n.d(r,"getBlockAttributes",(function(){return nt})),n.d(r,"getBlock",(function(){return rt})),n.d(r,"getBlocks",(function(){return ot})),n.d(r,"__unstableGetBlockWithoutInnerBlocks",(function(){return it})),n.d(r,"getClientIdsOfDescendants",(function(){return ct})),n.d(r,"getClientIdsWithDescendants",(function(){return at})),n.d(r,"getGlobalBlockCount",(function(){return st})),n.d(r,"getBlocksByClientId",(function(){return ut})),n.d(r,"getBlockCount",(function(){return lt})),n.d(r,"getBlockSelectionStart",(function(){return dt})),n.d(r,"getBlockSelectionEnd",(function(){return pt})),n.d(r,"getSelectedBlockCount",(function(){return bt})),n.d(r,"hasSelectedBlock",(function(){return ft})),n.d(r,"getSelectedBlockClientId",(function(){return ht})),n.d(r,"getSelectedBlock",(function(){return mt})),n.d(r,"getBlockRootClientId",(function(){return vt})),n.d(r,"getBlockHierarchyRootClientId",(function(){return Ot})),n.d(r,"getAdjacentBlockClientId",(function(){return gt})),n.d(r,"getPreviousBlockClientId",(function(){return jt})),n.d(r,"getNextBlockClientId",(function(){return yt})),n.d(r,"getSelectedBlocksInitialCaretPosition",(function(){return _t})),n.d(r,"getMultiSelectedBlockClientIds",(function(){return wt})),n.d(r,"getMultiSelectedBlocks",(function(){return Pt})),n.d(r,"getFirstMultiSelectedBlockClientId",(function(){return St})),n.d(r,"getLastMultiSelectedBlockClientId",(function(){return kt})),n.d(r,"isFirstMultiSelectedBlock",(function(){return Et})),n.d(r,"isBlockMultiSelected",(function(){return Tt})),n.d(r,"isAncestorMultiSelected",(function(){return Ct})),n.d(r,"getMultiSelectedBlocksStartClientId",(function(){return xt})),n.d(r,"getMultiSelectedBlocksEndClientId",(function(){return Bt})),n.d(r,"getBlockOrder",(function(){return At})),n.d(r,"getBlockIndex",(function(){return It})),n.d(r,"isBlockSelected",(function(){return Rt})),n.d(r,"hasSelectedInnerBlock",(function(){return Dt})),n.d(r,"isBlockWithinSelection",(function(){return Nt})),n.d(r,"hasMultiSelection",(function(){return Lt})),n.d(r,"isMultiSelecting",(function(){return Ut})),n.d(r,"isSelectionEnabled",(function(){return Ft})),n.d(r,"getBlockMode",(function(){return Mt})),n.d(r,"isTyping",(function(){return Vt})),n.d(r,"isCaretWithinFormattedText",(function(){return zt})),n.d(r,"getBlockInsertionPoint",(function(){return Ht})),n.d(r,"isBlockInsertionPointVisible",(function(){return Wt})),n.d(r,"isValidTemplate",(function(){return Gt})),n.d(r,"getTemplate",(function(){return qt})),n.d(r,"getTemplateLock",(function(){return Kt})),n.d(r,"canInsertBlockType",(function(){return Qt})),n.d(r,"getInserterItems",(function(){return $t})),n.d(r,"hasInserterItems",(function(){return Yt})),n.d(r,"getBlockListSettings",(function(){return Xt})),n.d(r,"__experimentalGetDefaultTemplateTypes",(function(){return Jt})),n.d(r,"__experimentalGetDefaultTemplateType",(function(){return Zt})),n.d(r,"__experimentalGetTemplateInfo",(function(){return en}));var o={};n.r(o),n.d(o,"setupEditor",(function(){return yn})),n.d(o,"__experimentalTearDownEditor",(function(){return _n})),n.d(o,"resetPost",(function(){return wn})),n.d(o,"resetAutosave",(function(){return Pn})),n.d(o,"__experimentalRequestPostUpdateStart",(function(){return Sn})),n.d(o,"__experimentalRequestPostUpdateFinish",(function(){return kn})),n.d(o,"updatePost",(function(){return En})),n.d(o,"setupEditorState",(function(){return Tn})),n.d(o,"editPost",(function(){return Cn})),n.d(o,"savePost",(function(){return xn})),n.d(o,"refreshPost",(function(){return Bn})),n.d(o,"trashPost",(function(){return An})),n.d(o,"autosave",(function(){return In})),n.d(o,"redo",(function(){return Rn})),n.d(o,"undo",(function(){return Dn})),n.d(o,"createUndoLevel",(function(){return Nn})),n.d(o,"updatePostLock",(function(){return Ln})),n.d(o,"enablePublishSidebar",(function(){return Un})),n.d(o,"disablePublishSidebar",(function(){return Fn})),n.d(o,"lockPostSaving",(function(){return Mn})),n.d(o,"unlockPostSaving",(function(){return Vn})),n.d(o,"lockPostAutosaving",(function(){return zn})),n.d(o,"unlockPostAutosaving",(function(){return Hn})),n.d(o,"resetEditorBlocks",(function(){return Wn})),n.d(o,"updateEditorSettings",(function(){return Gn})),n.d(o,"resetBlocks",(function(){return Kn})),n.d(o,"receiveBlocks",(function(){return Qn})),n.d(o,"updateBlock",(function(){return $n})),n.d(o,"updateBlockAttributes",(function(){return Yn})),n.d(o,"selectBlock",(function(){return Xn})),n.d(o,"startMultiSelect",(function(){return Jn})),n.d(o,"stopMultiSelect",(function(){return Zn})),n.d(o,"multiSelect",(function(){return er})),n.d(o,"clearSelectedBlock",(function(){return tr})),n.d(o,"toggleSelection",(function(){return nr})),n.d(o,"replaceBlocks",(function(){return rr})),n.d(o,"replaceBlock",(function(){return or})),n.d(o,"moveBlocksDown",(function(){return ir})),n.d(o,"moveBlocksUp",(function(){return cr})),n.d(o,"moveBlockToPosition",(function(){return ar})),n.d(o,"insertBlock",(function(){return sr})),n.d(o,"insertBlocks",(function(){return ur})),n.d(o,"showInsertionPoint",(function(){return lr})),n.d(o,"hideInsertionPoint",(function(){return dr})),n.d(o,"setTemplateValidity",(function(){return pr})),n.d(o,"synchronizeTemplate",(function(){return br})),n.d(o,"mergeBlocks",(function(){return fr})),n.d(o,"removeBlocks",(function(){return hr})),n.d(o,"removeBlock",(function(){return mr})),n.d(o,"toggleBlockMode",(function(){return vr})),n.d(o,"startTyping",(function(){return Or})),n.d(o,"stopTyping",(function(){return gr})),n.d(o,"enterFormattedText",(function(){return jr})),n.d(o,"exitFormattedText",(function(){return yr})),n.d(o,"insertDefaultBlock",(function(){return _r})),n.d(o,"updateBlockListSettings",(function(){return wr}));var i=n(6),c=n(57),a=n(21),s=n(8),u=n(5),l=n(11),d=n(13),p=n(0),b=n(2),f=n(9),h=n(4),m=n(12),v=n(33);function O(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function g(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?O(Object(n),!0).forEach((function(t){Object(u.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):O(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function j(e){var t=Object(b.mapValues)(Object(b.pickBy)(e.attributes,{source:"meta"}),"meta");return Object(b.isEmpty)(t)||(e.edit=function(e){return Object(m.createHigherOrderComponent)((function(t){return function(n){var r=n.attributes,o=n.setAttributes,i=Object(d.a)(n,["attributes","setAttributes"]),a=Object(h.useSelect)((function(e){return e("core/editor").getCurrentPostType()}),[]),u=Object(c.useEntityProp)("postType",a,"meta"),f=Object(l.a)(u,2),m=f[0],v=f[1],O=Object(p.useMemo)((function(){return g(g({},r),Object(b.mapValues)(e,(function(e){return m[e]})))}),[r,m]);return Object(p.createElement)(t,Object(s.a)({attributes:O,setAttributes:function(t){var n=Object(b.mapKeys)(Object(b.pickBy)(t,(function(t,n){return e[n]})),(function(t,n){return e[n]}));Object(b.isEmpty)(n)||v(n),o(t)}},i))}}),"withMetaAttributeSource")}(t)(e.edit)),e}Object(v.addFilter)("blocks.registerBlockType","core/editor/custom-sources-backwards-compatibility/shim-attribute-source",j),Object(h.select)(f.store).getBlockTypes().map((function(e){var t=e.name;return Object(h.select)(f.store).getBlockType(t)})).forEach(j);var y=n(50),_=n.n(y),w={name:"users",className:"editor-autocompleters__user",triggerPrefix:"@",options:function(e){var t="";return e&&(t="?search="+encodeURIComponent(e)),_()({path:"/wp/v2/users"+t})},isDebounced:!0,getOptionKeywords:function(e){return[e.slug,e.name]},getOptionLabel:function(e){return[e.avatar_urls&&e.avatar_urls[24]?Object(p.createElement)("img",{key:"avatar",className:"editor-autocompleters__user-avatar",alt:"",src:e.avatar_urls[24]}):Object(p.createElement)("span",{className:"editor-autocompleters__no-avatar"}),Object(p.createElement)("span",{key:"name",className:"editor-autocompleters__user-name"},e.name),Object(p.createElement)("span",{key:"slug",className:"editor-autocompleters__user-slug"},e.slug)]},getOptionCompletion:function(e){return"@".concat(e.slug)}};Object(v.addFilter)("editor.Autocomplete.completers","editor/autocompleters/set-default-completers",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.push(Object(b.clone)(w)),e}));var P=n(49),S=n(42);function k(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function E(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?k(Object(n),!0).forEach((function(t){Object(u.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):k(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var T={insertUsage:{},isPublishSidebarEnabled:!0},C=E(E({},i.SETTINGS_DEFAULTS),{},{richEditingEnabled:!0,codeEditingEnabled:!0,enableCustomFields:!1});function x(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function B(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?x(Object(n),!0).forEach((function(t){Object(u.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):x(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function A(e){return e&&"object"===Object(S.a)(e)&&"raw"in e?e.raw:e}var I=Object(h.combineReducers)({postId:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SETUP_EDITOR_STATE":case"RESET_POST":return t.post.id}return e},postType:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SETUP_EDITOR_STATE":case"RESET_POST":return t.post.type}return e},preferences:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:T,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"ENABLE_PUBLISH_SIDEBAR":return B(B({},e),{},{isPublishSidebarEnabled:!0});case"DISABLE_PUBLISH_SIDEBAR":return B(B({},e),{},{isPublishSidebarEnabled:!1})}return e},saving:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"REQUEST_POST_UPDATE_START":case"REQUEST_POST_UPDATE_FINISH":return{pending:"REQUEST_POST_UPDATE_START"===t.type,options:t.options||{}}}return e},postLock:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{isLocked:!1},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"UPDATE_POST_LOCK":return t.lock}return e},template:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{isValid:!0},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_TEMPLATE_VALIDITY":return B(B({},e),{},{isValid:t.isValid})}return e},postSavingLock:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"LOCK_POST_SAVING":return B(B({},e),{},Object(u.a)({},t.lockName,!0));case"UNLOCK_POST_SAVING":return Object(b.omit)(e,t.lockName)}return e},isReady:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SETUP_EDITOR_STATE":return!0;case"TEAR_DOWN_EDITOR":return!1}return e},editorSettings:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:C,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"UPDATE_EDITOR_SETTINGS":return B(B({},e),t.settings)}return e},postAutosavingLock:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"LOCK_POST_AUTOSAVING":return B(B({},e),{},Object(u.a)({},t.lockName,!0));case"UNLOCK_POST_AUTOSAVING":return Object(b.omit)(e,t.lockName)}return e}}),R=n(41),D=n(69),N=n(32),L=n(35),U=n.n(L),F=new Set(["meta"]),M="core/editor",V=/%(?:postname|pagename)%/,z=["title","excerpt","content"];function H(e,t){return Object(N.addQueryArgs)(e,t)}function W(e){return e?Object(b.trim)(Object(b.deburr)(e).replace(/[\s\./]+/g,"-").replace(/[^\w-]+/g,"").toLowerCase(),"-"):""}function G(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function q(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?G(Object(n),!0).forEach((function(t){Object(u.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):G(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var K={},Q=[],$=Object(h.createRegistrySelector)((function(e){return function(){return e("core").hasUndo()}})),Y=Object(h.createRegistrySelector)((function(e){return function(){return e("core").hasRedo()}}));function X(e){return"auto-draft"===ne(e).status}function J(e){var t=ae(e);return"blocks"in t||"content"in t}var Z=Object(h.createRegistrySelector)((function(e){return function(t){var n=re(t),r=oe(t);return!!e("core").hasEditsForEntityRecord("postType",n,r)}})),ee=Object(h.createRegistrySelector)((function(e){return function(t){var n=e("core").__experimentalGetDirtyEntityRecords(),r=ne(t),o=r.type,i=r.id;return Object(b.some)(n,(function(e){return"postType"!==e.kind||e.name!==o||e.key!==i}))}}));function te(e){return!Z(e)&&X(e)}var ne=Object(h.createRegistrySelector)((function(e){return function(t){var n=oe(t),r=re(t),o=e("core").getRawEntityRecord("postType",r,n);return o||K}}));function re(e){return e.postType}function oe(e){return e.postId}function ie(e){return Object(b.get)(ne(e),["_links","version-history",0,"count"],0)}function ce(e){return Object(b.get)(ne(e),["_links","predecessor-version",0,"id"],null)}var ae=Object(h.createRegistrySelector)((function(e){return function(t){var n=re(t),r=oe(t);return e("core").getEntityRecordEdits("postType",n,r)||K}})),se=Object(h.createRegistrySelector)((function(e){return function(){return U()("`wp.data.select( 'core/editor' ).getReferenceByDistinctEdits`",{alternative:"`wp.data.select( 'core' ).getReferenceByDistinctEdits`"}),e("core").getReferenceByDistinctEdits()}}));function ue(e,t){switch(t){case"type":return re(e);case"id":return oe(e);default:var n=ne(e);if(!n.hasOwnProperty(t))break;return A(n[t])}}function le(e,t){switch(t){case"content":return Ae(e)}var n=ae(e);return n.hasOwnProperty(t)?F.has(t)?function(e,t){var n=ae(e);return n.hasOwnProperty(t)?q(q({},ue(e,t)),n[t]):ue(e,t)}(e,t):n[t]:ue(e,t)}var de=Object(h.createRegistrySelector)((function(e){return function(t,n){if(Object(b.includes)(z,n)||"preview_link"===n){var r=re(t),o=oe(t),i=Object(b.get)(e("core").getCurrentUser(),["id"]),c=e("core").getAutosave(r,o,i);return c?A(c[n]):void 0}}}));function pe(e){return"private"===le(e,"status")?"private":le(e,"password")?"password":"public"}function be(e){return"pending"===ne(e).status}function fe(e,t){var n=t||ne(e);return-1!==["publish","private"].indexOf(n.status)||"future"===n.status&&!Object(D.isInTheFuture)(new Date(Number(Object(D.getDate)(n.date))-6e4))}function he(e){return"future"===ne(e).status&&!fe(e)}function me(e){var t=ne(e);return Z(e)||-1===["publish","private","future"].indexOf(t.status)}function ve(e){return!Pe(e)&&(!!le(e,"title")||!!le(e,"excerpt")||!Oe(e)||"native"===p.Platform.OS)}function Oe(e){var t=qe(e);if(t.length){if(t.length>1)return!1;var n=t[0].name;if(n!==Object(f.getDefaultBlockName)()&&n!==Object(f.getFreeformContentHandlerName)())return!1}return!Ae(e)}var ge=Object(h.createRegistrySelector)((function(e){return function(t){if(!ve(t))return!1;if(Me(t))return!1;var n=re(t),r=oe(t),o=e("core").hasFetchedAutosaves(n,r),i=Object(b.get)(e("core").getCurrentUser(),["id"]),c=e("core").getAutosave(n,r,i);return!!o&&(!c||(!!J(t)||["title","excerpt"].some((function(e){return A(c[e])!==le(t,e)}))))}})),je=Object(h.createRegistrySelector)((function(e){return function(t){U()("`wp.data.select( 'core/editor' ).getAutosave()`",{alternative:"`wp.data.select( 'core' ).getAutosave( postType, postId, userId )`",plugin:"Gutenberg"});var n=re(t),r=oe(t),o=Object(b.get)(e("core").getCurrentUser(),["id"]),i=e("core").getAutosave(n,r,o);return Object(b.mapValues)(Object(b.pick)(i,z),A)}})),ye=Object(h.createRegistrySelector)((function(e){return function(t){U()("`wp.data.select( 'core/editor' ).hasAutosave()`",{alternative:"`!! wp.data.select( 'core' ).getAutosave( postType, postId, userId )`",plugin:"Gutenberg"});var n=re(t),r=oe(t),o=Object(b.get)(e("core").getCurrentUser(),["id"]);return!!e("core").getAutosave(n,r,o)}}));function _e(e){var t=le(e,"date"),n=new Date(Number(Object(D.getDate)(t))-6e4);return Object(D.isInTheFuture)(n)}function we(e){var t=le(e,"date"),n=le(e,"modified"),r=ne(e).status;return("draft"===r||"auto-draft"===r||"pending"===r)&&(t===n||null===t)}var Pe=Object(h.createRegistrySelector)((function(e){return function(t){var n=re(t),r=oe(t);return e("core").isSavingEntityRecord("postType",n,r)}})),Se=Object(h.createRegistrySelector)((function(e){return function(t){var n=re(t),r=oe(t);return!e("core").getLastEntitySaveError("postType",n,r)}})),ke=Object(h.createRegistrySelector)((function(e){return function(t){var n=re(t),r=oe(t);return!!e("core").getLastEntitySaveError("postType",n,r)}}));function Ee(e){return!!Pe(e)&&!!Object(b.get)(e.saving,["options","isAutosave"])}function Te(e){return!!Pe(e)&&!!e.saving.options.isPreview}function Ce(e){if(!e.saving.pending&&!Pe(e)){var t=de(e,"preview_link");t||(t=le(e,"link"))&&(t=Object(N.addQueryArgs)(t,{preview:!0}));var n=le(e,"featured_media");return t&&n?Object(N.addQueryArgs)(t,{_thumbnail_id:n}):t}}function xe(e){var t,n=qe(e);if(n.length>2)return null;if(1===n.length&&"core/embed"===(t=n[0].name)){var r,o=null===(r=n[0].attributes)||void 0===r?void 0:r.providerNameSlug;["youtube","vimeo"].includes(o)?t="core/video":["spotify","soundcloud"].includes(o)&&(t="core/audio")}switch(2===n.length&&"core/paragraph"===n[1].name&&(t=n[0].name),t){case"core/image":return"image";case"core/quote":case"core/pullquote":return"quote";case"core/gallery":return"gallery";case"core/video":return"video";case"core/audio":return"audio";default:return null}}function Be(e){U()("`core/editor` getBlocksForSerialization selector",{plugin:"Gutenberg",alternative:"getEditorBlocks",hint:"Blocks serialization pre-processing occurs at save time"});var t=e.editor.present.blocks.value;return 1===t.length&&Object(f.isUnmodifiedDefaultBlock)(t[0])?[]:t}var Ae=Object(h.createRegistrySelector)((function(e){return function(t){var n=oe(t),r=re(t),o=e("core").getEditedEntityRecord("postType",r,n);if(o){if("function"==typeof o.content)return o.content(o);if(o.blocks)return Object(f.__unstableSerializeAndClean)(o.blocks);if(o.content)return o.content}return""}}));function Ie(e){return Pe(e)&&!fe(e)&&"publish"===le(e,"status")}function Re(e){var t=le(e,"permalink_template");return V.test(t)}function De(e){var t=Le(e);if(!t)return null;var n=t.prefix,r=t.postName,o=t.suffix;return Re(e)?n+r+o:n}function Ne(e){return le(e,"slug")||W(le(e,"title"))||oe(e)}function Le(e){var t=le(e,"permalink_template");if(!t)return null;var n=le(e,"slug")||le(e,"generated_slug"),r=t.split(V),o=Object(l.a)(r,2);return{prefix:o[0],postName:n,suffix:o[1]}}function Ue(e){return e.postLock.isLocked}function Fe(e){return Object.keys(e.postSavingLock).length>0}function Me(e){return Object.keys(e.postAutosavingLock).length>0}function Ve(e){return e.postLock.isTakeover}function ze(e){return e.postLock.user}function He(e){return e.postLock.activePostLock}function We(e){return Object(b.has)(ne(e),["_links","wp:action-unfiltered-html"])}function Ge(e){return e.preferences.hasOwnProperty("isPublishSidebarEnabled")?e.preferences.isPublishSidebarEnabled:T.isPublishSidebarEnabled}function qe(e){return le(e,"blocks")||Q}function Ke(e){return le(e,"selectionStart")}function Qe(e){return le(e,"selectionEnd")}function $e(e){return e.isReady}function Ye(e){return e.editorSettings}function Xe(){return U()("select('core/editor').getStateBeforeOptimisticTransaction",{hint:"No state history is kept on this store anymore"}),null}function Je(){return U()("select('core/editor').inSomeHistory",{hint:"No state history is kept on this store anymore"}),!1}function Ze(e){return Object(h.createRegistrySelector)((function(t){return function(n){var r;U()("`wp.data.select( 'core/editor' )."+e+"`",{alternative:"`wp.data.select( 'core/block-editor' )."+e+"`"});for(var o=arguments.length,i=new Array(o>1?o-1:0),c=1;c<o;c++)i[c-1]=arguments[c];return(r=t("core/block-editor"))[e].apply(r,i)}}))}var et=Ze("getBlockName"),tt=Ze("isBlockValid"),nt=Ze("getBlockAttributes"),rt=Ze("getBlock"),ot=Ze("getBlocks"),it=Ze("__unstableGetBlockWithoutInnerBlocks"),ct=Ze("getClientIdsOfDescendants"),at=Ze("getClientIdsWithDescendants"),st=Ze("getGlobalBlockCount"),ut=Ze("getBlocksByClientId"),lt=Ze("getBlockCount"),dt=Ze("getBlockSelectionStart"),pt=Ze("getBlockSelectionEnd"),bt=Ze("getSelectedBlockCount"),ft=Ze("hasSelectedBlock"),ht=Ze("getSelectedBlockClientId"),mt=Ze("getSelectedBlock"),vt=Ze("getBlockRootClientId"),Ot=Ze("getBlockHierarchyRootClientId"),gt=Ze("getAdjacentBlockClientId"),jt=Ze("getPreviousBlockClientId"),yt=Ze("getNextBlockClientId"),_t=Ze("getSelectedBlocksInitialCaretPosition"),wt=Ze("getMultiSelectedBlockClientIds"),Pt=Ze("getMultiSelectedBlocks"),St=Ze("getFirstMultiSelectedBlockClientId"),kt=Ze("getLastMultiSelectedBlockClientId"),Et=Ze("isFirstMultiSelectedBlock"),Tt=Ze("isBlockMultiSelected"),Ct=Ze("isAncestorMultiSelected"),xt=Ze("getMultiSelectedBlocksStartClientId"),Bt=Ze("getMultiSelectedBlocksEndClientId"),At=Ze("getBlockOrder"),It=Ze("getBlockIndex"),Rt=Ze("isBlockSelected"),Dt=Ze("hasSelectedInnerBlock"),Nt=Ze("isBlockWithinSelection"),Lt=Ze("hasMultiSelection"),Ut=Ze("isMultiSelecting"),Ft=Ze("isSelectionEnabled"),Mt=Ze("getBlockMode"),Vt=Ze("isTyping"),zt=Ze("isCaretWithinFormattedText"),Ht=Ze("getBlockInsertionPoint"),Wt=Ze("isBlockInsertionPointVisible"),Gt=Ze("isValidTemplate"),qt=Ze("getTemplate"),Kt=Ze("getTemplateLock"),Qt=Ze("canInsertBlockType"),$t=Ze("getInserterItems"),Yt=Ze("hasInserterItems"),Xt=Ze("getBlockListSettings");function Jt(e){var t;return null===(t=Ye(e))||void 0===t?void 0:t.defaultTemplateTypes}var Zt=Object(R.a)((function(e,t){return Object(b.find)(Jt(e),{slug:t})||{}}),(function(e,t){return[Jt(e),t]}));function en(e,t){if(!t)return{};var n=t.excerpt,r=t.slug,o=t.title,i=Zt(e,r),c=i.title,a=i.description,s=Object(b.isString)(o)?o:null==o?void 0:o.rendered;return{title:s&&s!==r?s:c||r,description:(Object(b.isString)(n)?n:null==n?void 0:n.raw)||a}}var tn=n(15),nn=n(16),rn=n.n(nn),on=n(51),cn=n(1);function an(e){var t=e.previousPost,n=e.post,r=e.postType;if(Object(b.get)(e.options,["isAutosave"]))return[];var o,i=["publish","private","future"],c=Object(b.includes)(i,t.status),a=Object(b.includes)(i,n.status),s=Object(b.get)(r,["viewable"],!1);if(c||a?c&&!a?(o=r.labels.item_reverted_to_draft,s=!1):o=!c&&a?{publish:r.labels.item_published,private:r.labels.item_published_privately,future:r.labels.item_scheduled}[n.status]:r.labels.item_updated:o=null,o){var u=[];return s&&u.push({label:r.labels.view_item,url:n.link}),[o,{id:"SAVE_POST_NOTICE_ID",type:"snackbar",actions:u}]}return[]}function sn(e){var t=e.post,n=e.edits,r=e.error;if(r&&"rest_autosave_no_changes"===r.code)return[];var o=["publish","private","future"],i=-1!==o.indexOf(t.status),c={publish:Object(cn.__)("Publishing failed."),private:Object(cn.__)("Publishing failed."),future:Object(cn.__)("Scheduling failed.")},a=i||-1===o.indexOf(n.status)?Object(cn.__)("Updating failed."):c[n.status];return r.message&&!/<\/?[^>]*>/.test(r.message)&&(a=[a,r.message].join(" ")),[a,{id:"SAVE_POST_NOTICE_ID"}]}function un(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ln(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?un(Object(n),!0).forEach((function(t){Object(u.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):un(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var dn=rn.a.mark(yn),pn=rn.a.mark(Pn),bn=rn.a.mark(Cn),fn=rn.a.mark(xn),hn=rn.a.mark(Bn),mn=rn.a.mark(An),vn=rn.a.mark(In),On=rn.a.mark(Rn),gn=rn.a.mark(Dn),jn=rn.a.mark(Wn);function yn(e,t,n){var r,o;return rn.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return r=Object(b.has)(t,["content"])?t.content:e.content.raw,o=Object(f.parse)(r),"auto-draft"===e.status&&n&&(o=Object(f.synchronizeBlocksWithTemplate)(o,n)),i.next=6,wn(e);case 6:return i.next=8,{type:"SETUP_EDITOR",post:e,edits:t,template:n};case 8:return i.next=10,Wn(o,{__unstableShouldCreateUndoLevel:!1});case 10:return i.next=12,Tn(e);case 12:if(!t||!Object.keys(t).some((function(n){return t[n]!==(Object(b.has)(e,[n,"raw"])?e[n].raw:e[n])}))){i.next=15;break}return i.next=15,Cn(t);case 15:case"end":return i.stop()}}),dn)}function _n(){return{type:"TEAR_DOWN_EDITOR"}}function wn(e){return{type:"RESET_POST",post:e}}function Pn(e){var t;return rn.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return U()("resetAutosave action (`core/editor` store)",{alternative:"receiveAutosaves action (`core` store)",plugin:"Gutenberg"}),n.next=3,h.controls.select(M,"getCurrentPostId");case 3:return t=n.sent,n.next=6,h.controls.dispatch("core","receiveAutosaves",t,e);case 6:return n.abrupt("return",{type:"__INERT__"});case 7:case"end":return n.stop()}}),pn)}function Sn(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{type:"REQUEST_POST_UPDATE_START",options:e}}function kn(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{type:"REQUEST_POST_UPDATE_FINISH",options:e}}function En(){return U()("wp.data.dispatch( 'core/editor' ).updatePost",{alternative:"User the core entitires store instead"}),{type:"DO_NOTHING"}}function Tn(e){return{type:"SETUP_EDITOR_STATE",post:e}}function Cn(e,t){var n,r,o;return rn.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,h.controls.select(M,"getCurrentPost");case 2:return n=i.sent,r=n.id,o=n.type,i.next=7,h.controls.dispatch("core","editEntityRecord","postType",o,r,e,t);case 7:case"end":return i.stop()}}),bn)}function xn(){var e,t,n,r,o,i,c,a=arguments;return rn.a.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:return e=a.length>0&&void 0!==a[0]?a[0]:{},s.next=3,h.controls.select(M,"isEditedPostSaveable");case 3:if(s.sent){s.next=5;break}return s.abrupt("return");case 5:return s.next=7,h.controls.select(M,"getEditedPostContent");case 7:if(s.t0=s.sent,t={content:s.t0},e.isAutosave){s.next=12;break}return s.next=12,h.controls.dispatch(M,"editPost",t,{undoIgnore:!0});case 12:return s.next=14,Sn(e);case 14:return s.next=16,h.controls.select(M,"getCurrentPost");case 16:return n=s.sent,s.t1=ln,s.t2=ln,s.t3={id:n.id},s.next=22,h.controls.select("core","getEntityRecordNonTransientEdits","postType",n.type,n.id);case 22:return s.t4=s.sent,s.t5=(0,s.t2)(s.t3,s.t4),s.t6=t,t=(0,s.t1)(s.t5,s.t6),s.next=28,h.controls.dispatch("core","saveEntityRecord","postType",n.type,t,e);case 28:return s.next=30,kn(e);case 30:return s.next=32,h.controls.select("core","getLastEntitySaveError","postType",n.type,n.id);case 32:if(!(r=s.sent)){s.next=40;break}if(!(o=sn({post:n,edits:t,error:r})).length){s.next=38;break}return s.next=38,h.controls.dispatch.apply(h.controls,[on.store,"createErrorNotice"].concat(Object(tn.a)(o)));case 38:s.next=58;break;case 40:return s.next=42,h.controls.select(M,"getCurrentPost");case 42:return i=s.sent,s.t7=an,s.t8=n,s.t9=i,s.next=48,h.controls.resolveSelect("core","getPostType",i.type);case 48:if(s.t10=s.sent,s.t11=e,s.t12={previousPost:s.t8,post:s.t9,postType:s.t10,options:s.t11},!(c=(0,s.t7)(s.t12)).length){s.next=55;break}return s.next=55,h.controls.dispatch.apply(h.controls,[on.store,"createSuccessNotice"].concat(Object(tn.a)(c)));case 55:if(e.isAutosave){s.next=58;break}return s.next=58,h.controls.dispatch("core/block-editor","__unstableMarkLastChangeAsPersistent");case 58:case"end":return s.stop()}}),fn)}function Bn(){var e,t,n,r;return rn.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,h.controls.select(M,"getCurrentPost");case 2:return e=o.sent,o.next=5,h.controls.select(M,"getCurrentPostType");case 5:return t=o.sent,o.next=8,h.controls.resolveSelect("core","getPostType",t);case 8:return n=o.sent,o.next=11,Object(P.apiFetch)({path:"/wp/v2/".concat(n.rest_base,"/").concat(e.id)+"?context=edit&_timestamp=".concat(Date.now())});case 11:return r=o.sent,o.next=14,h.controls.dispatch(M,"resetPost",r);case 14:case"end":return o.stop()}}),hn)}function An(){var e,t,n;return rn.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,h.controls.select(M,"getCurrentPostType");case 2:return e=r.sent,r.next=5,h.controls.resolveSelect("core","getPostType",e);case 5:return t=r.sent,r.next=8,h.controls.dispatch(on.store,"removeNotice","TRASH_POST_NOTICE_ID");case 8:return r.prev=8,r.next=11,h.controls.select(M,"getCurrentPost");case 11:return n=r.sent,r.next=14,Object(P.apiFetch)({path:"/wp/v2/".concat(t.rest_base,"/").concat(n.id),method:"DELETE"});case 14:return r.next=16,h.controls.dispatch(M,"savePost");case 16:r.next=22;break;case 18:return r.prev=18,r.t0=r.catch(8),r.next=22,h.controls.dispatch.apply(h.controls,[on.store,"createErrorNotice"].concat(Object(tn.a)([(o={error:r.t0}).error.message&&"unknown_error"!==o.error.code?o.error.message:Object(cn.__)("Trashing failed"),{id:"TRASH_POST_NOTICE_ID"}])));case 22:case"end":return r.stop()}var o}),mn,null,[[8,18]])}function In(){var e,t,n,r,o,i,c,a,s,u=arguments;return rn.a.wrap((function(l){for(;;)switch(l.prev=l.next){case 0:if(e=u.length>0&&void 0!==u[0]?u[0]:{},t=e.local,n=void 0!==t&&t,r=Object(d.a)(e,["local"]),!n){l.next=21;break}return l.next=4,h.controls.select(M,"getCurrentPost");case 4:return o=l.sent,l.next=7,h.controls.select(M,"isEditedPostNew");case 7:return i=l.sent,l.next=10,h.controls.select(M,"getEditedPostAttribute","title");case 10:return c=l.sent,l.next=13,h.controls.select(M,"getEditedPostAttribute","content");case 13:return a=l.sent,l.next=16,h.controls.select(M,"getEditedPostAttribute","excerpt");case 16:return s=l.sent,l.next=19,{type:"LOCAL_AUTOSAVE_SET",postId:o.id,isPostNew:i,title:c,content:a,excerpt:s};case 19:l.next=23;break;case 21:return l.next=23,h.controls.dispatch(M,"savePost",ln({isAutosave:!0},r));case 23:case"end":return l.stop()}}),vn)}function Rn(){return rn.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,h.controls.dispatch("core","redo");case 2:case"end":return e.stop()}}),On)}function Dn(){return rn.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,h.controls.dispatch("core","undo");case 2:case"end":return e.stop()}}),gn)}function Nn(){return{type:"CREATE_UNDO_LEVEL"}}function Ln(e){return{type:"UPDATE_POST_LOCK",lock:e}}function Un(){return{type:"ENABLE_PUBLISH_SIDEBAR"}}function Fn(){return{type:"DISABLE_PUBLISH_SIDEBAR"}}function Mn(e){return{type:"LOCK_POST_SAVING",lockName:e}}function Vn(e){return{type:"UNLOCK_POST_SAVING",lockName:e}}function zn(e){return{type:"LOCK_POST_AUTOSAVING",lockName:e}}function Hn(e){return{type:"UNLOCK_POST_AUTOSAVING",lockName:e}}function Wn(e){var t,n,r,o,i,c,a,s,u=arguments;return rn.a.wrap((function(l){for(;;)switch(l.prev=l.next){case 0:if(t=u.length>1&&void 0!==u[1]?u[1]:{},n=t.__unstableShouldCreateUndoLevel,r=t.selectionStart,o=t.selectionEnd,i={blocks:e,selectionStart:r,selectionEnd:o},!1===n){l.next=19;break}return l.next=6,h.controls.select(M,"getCurrentPost");case 6:return c=l.sent,a=c.id,s=c.type,l.next=11,h.controls.select("core","getEditedEntityRecord","postType",s,a);case 11:if(l.t0=l.sent.blocks,l.t1=i.blocks,!(l.t0===l.t1)){l.next=18;break}return l.next=17,h.controls.dispatch("core","__unstableCreateUndoLevel","postType",s,a);case 17:return l.abrupt("return",l.sent);case 18:i.content=function(e){var t=e.blocks,n=void 0===t?[]:t;return Object(f.__unstableSerializeAndClean)(n)};case 19:return l.delegateYield(Cn(i),"t2",20);case 20:case"end":return l.stop()}}),jn)}function Gn(e){return{type:"UPDATE_EDITOR_SETTINGS",settings:e}}var qn=function(e){return rn.a.mark((function t(){var n,r,o,i=arguments;return rn.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:for(U()("`wp.data.dispatch( 'core/editor' )."+e+"`",{alternative:"`wp.data.dispatch( 'core/block-editor' )."+e+"`"}),n=i.length,r=new Array(n),o=0;o<n;o++)r[o]=i[o];return t.next=4,h.controls.dispatch.apply(h.controls,["core/block-editor",e].concat(r));case 4:case"end":return t.stop()}}),t)}))},Kn=qn("resetBlocks"),Qn=qn("receiveBlocks"),$n=qn("updateBlock"),Yn=qn("updateBlockAttributes"),Xn=qn("selectBlock"),Jn=qn("startMultiSelect"),Zn=qn("stopMultiSelect"),er=qn("multiSelect"),tr=qn("clearSelectedBlock"),nr=qn("toggleSelection"),rr=qn("replaceBlocks"),or=qn("replaceBlock"),ir=qn("moveBlocksDown"),cr=qn("moveBlocksUp"),ar=qn("moveBlockToPosition"),sr=qn("insertBlock"),ur=qn("insertBlocks"),lr=qn("showInsertionPoint"),dr=qn("hideInsertionPoint"),pr=qn("setTemplateValidity"),br=qn("synchronizeTemplate"),fr=qn("mergeBlocks"),hr=qn("removeBlocks"),mr=qn("removeBlock"),vr=qn("toggleBlockMode"),Or=qn("startTyping"),gr=qn("stopTyping"),jr=qn("enterFormattedText"),yr=qn("exitFormattedText"),_r=qn("insertDefaultBlock"),wr=qn("updateBlockListSettings");function Pr(e,t){return"wp-autosave-block-editor-post-".concat(t?"auto-draft":e)}function Sr(e,t){window.sessionStorage.removeItem(Pr(e,t))}var kr={LOCAL_AUTOSAVE_SET:function(e){!function(e,t,n,r,o){window.sessionStorage.setItem(Pr(e,t),JSON.stringify({post_title:n,content:r,excerpt:o}))}(e.postId,e.isPostNew,e.title,e.content,e.excerpt)}};function Er(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Tr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Er(Object(n),!0).forEach((function(t){Object(u.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Er(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Cr={reducer:I,selectors:r,actions:o,controls:Tr(Tr({},P.controls),kr)},xr=Object(h.createReduxStore)(M,Tr(Tr({},Cr),{},{persist:["preferences"]}));Object(h.registerStore)(M,Tr(Tr({},Cr),{},{persist:["preferences"]}));var Br=n(25),Ar=n(26),Ir=n(28),Rr=n(29),Dr=n(19);function Nr(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(Dr.a)(e);if(t){var o=Object(Dr.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(Rr.a)(this,n)}}var Lr=function(e){Object(Ir.a)(n,e);var t=Nr(n);function n(e){var r;return Object(Br.a)(this,n),(r=t.call(this,e)).needsAutosave=!(!e.isDirty||!e.isAutosaveable),r}return Object(Ar.a)(n,[{key:"componentDidMount",value:function(){this.props.disableIntervalChecks||this.setAutosaveTimer()}},{key:"componentDidUpdate",value:function(e){this.props.disableIntervalChecks?this.props.editsReference!==e.editsReference&&this.props.autosave():this.props.isDirty&&(!this.props.isAutosaving||e.isAutosaving)?this.props.editsReference!==e.editsReference&&(this.needsAutosave=!0):this.needsAutosave=!1}},{key:"componentWillUnmount",value:function(){clearTimeout(this.timerId)}},{key:"setAutosaveTimer",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1e3*this.props.interval;this.timerId=setTimeout((function(){e.autosaveTimerHandler()}),t)}},{key:"autosaveTimerHandler",value:function(){this.props.isAutosaveable?(this.needsAutosave&&(this.needsAutosave=!1,this.props.autosave()),this.setAutosaveTimer()):this.setAutosaveTimer(1e3)}},{key:"render",value:function(){return null}}]),n}(p.Component),Ur=Object(m.compose)([Object(h.withSelect)((function(e,t){var n=e("core").getReferenceByDistinctEdits,r=e("core/editor"),o=r.isEditedPostDirty,i=r.isEditedPostAutosaveable,c=r.isAutosavingPost,a=r.getEditorSettings,s=t.interval,u=void 0===s?a().autosaveInterval:s;return{editsReference:n(),isDirty:o(),isAutosaveable:i(),isAutosaving:c(),interval:u}})),Object(h.withDispatch)((function(e,t){return{autosave:function(){var n=t.autosave,r=void 0===n?e("core/editor").autosave:n;r()}}}))])(Lr),Fr=n(10),Mr=n.n(Fr),Vr=function(e){var t=e.children,n=e.isValid,r=e.level,o=e.href,i=e.onSelect;return Object(p.createElement)("li",{className:Mr()("document-outline__item","is-".concat(r.toLowerCase()),{"is-invalid":!n})},Object(p.createElement)("a",{href:o,className:"document-outline__button",onClick:i},Object(p.createElement)("span",{className:"document-outline__emdash","aria-hidden":"true"}),Object(p.createElement)("strong",{className:"document-outline__level"},r),Object(p.createElement)("span",{className:"document-outline__item-content"},t)))};function zr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Hr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?zr(Object(n),!0).forEach((function(t){Object(u.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Wr=Object(p.createElement)("em",null,Object(cn.__)("(Empty heading)")),Gr=[Object(p.createElement)("br",{key:"incorrect-break"}),Object(p.createElement)("em",{key:"incorrect-message"},Object(cn.__)("(Incorrect heading level)"))],qr=[Object(p.createElement)("br",{key:"incorrect-break-h1"}),Object(p.createElement)("em",{key:"incorrect-message-h1"},Object(cn.__)("(Your theme may already use a H1 for the post title)"))],Kr=[Object(p.createElement)("br",{key:"incorrect-break-multiple-h1"}),Object(p.createElement)("em",{key:"incorrect-message-multiple-h1"},Object(cn.__)("(Multiple H1 headings are not recommended)"))],Qr=function(e){return!e.attributes.content||0===e.attributes.content.length},$r=Object(m.compose)(Object(h.withSelect)((function(e){var t=e("core/block-editor").getBlocks,n=e("core/editor").getEditedPostAttribute,r=(0,e("core").getPostType)(n("type"));return{title:n("title"),blocks:t(),isTitleSupported:Object(b.get)(r,["supports","title"],!1)}})))((function(e){var t=e.blocks,n=void 0===t?[]:t,r=e.title,o=e.onSelect,i=e.isTitleSupported,c=e.hasOutlineItemsDisabled,s=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return Object(b.flatMap)(t,(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return"core/heading"===t.name?Hr(Hr({},t),{},{level:t.attributes.level,isEmpty:Qr(t)}):e(t.innerBlocks)}))}(n);if(s.length<1)return null;var u=1,l=document.querySelector(".editor-post-title__input"),d=i&&r&&l,f=Object(b.countBy)(s,"level")[1]>1;return Object(p.createElement)("div",{className:"document-outline"},Object(p.createElement)("ul",null,d&&Object(p.createElement)(Vr,{level:Object(cn.__)("Title"),isValid:!0,onSelect:o,href:"#".concat(l.id),isDisabled:c},r),s.map((function(e,t){var n=e.level>u+1,r=!(e.isEmpty||n||!e.level||1===e.level&&(f||d));return u=e.level,Object(p.createElement)(Vr,{key:t,level:"H".concat(e.level),isValid:r,isDisabled:c,href:"#block-".concat(e.clientId),onSelect:o},e.isEmpty?Wr:Object(a.getTextContent)(Object(a.create)({html:e.attributes.content})),n&&Gr,1===e.level&&f&&Kr,d&&1===e.level&&!f&&qr)}))))}));var Yr=Object(h.withSelect)((function(e){return{blocks:e("core/block-editor").getBlocks()}}))((function(e){var t=e.blocks,n=e.children;return Object(b.filter)(t,(function(e){return"core/heading"===e.name})).length<1?null:n})),Xr=n(46);var Jr=function(e){var t=e.resetBlocksOnSave,n=Object(h.useDispatch)("core/editor"),r=n.resetEditorBlocks,o=n.savePost,i=Object(h.useSelect)((function(e){var t=e("core/editor");return{isEditedPostDirty:t.isEditedPostDirty,getPostEdits:t.getPostEdits}}),[]),c=i.isEditedPostDirty,a=i.getPostEdits;return Object(Xr.useShortcut)("core/editor/save",(function(e){if(e.preventDefault(),c()){if(t){var n=a();if(n.content&&"string"==typeof n.content){var i=Object(f.parse)(n.content);r(i)}}o()}}),{bindGlobal:!0}),null};function Zr(){var e=Object(h.useDispatch)("core/editor"),t=e.redo,n=e.undo;return Object(Xr.useShortcut)("core/editor/undo",(function(e){n(),e.preventDefault()}),{bindGlobal:!0}),Object(Xr.useShortcut)("core/editor/redo",(function(e){t(),e.preventDefault()}),{bindGlobal:!0}),Object(p.createElement)(p.Fragment,null,Object(p.createElement)(i.BlockEditorKeyboardShortcuts,null),Object(p.createElement)(Jr,null))}var eo=Zr;function to(){return U()("EditorGlobalKeyboardShortcuts",{alternative:"VisualEditorGlobalKeyboardShortcuts",plugin:"Gutenberg"}),Object(p.createElement)(Zr,null)}function no(){return Object(p.createElement)(Jr,{resetBlocksOnSave:!0})}var ro=function(){var e=Object(h.useDispatch)(Xr.store).registerShortcut;return Object(p.useEffect)((function(){e({name:"core/editor/save",category:"global",description:Object(cn.__)("Save your changes."),keyCombination:{modifier:"primary",character:"s"}}),e({name:"core/editor/undo",category:"global",description:Object(cn.__)("Undo your last changes."),keyCombination:{modifier:"primary",character:"z"}}),e({name:"core/editor/redo",category:"global",description:Object(cn.__)("Redo your last undo."),keyCombination:{modifier:"primaryShift",character:"z"}})}),[e]),Object(p.createElement)(i.BlockEditorKeyboardShortcuts.Register,null)},oo=n(3),io=n(17),co=n(7),ao=Object(p.createElement)(co.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(p.createElement)(co.Path,{d:"M15.6 6.5l-1.1 1 2.9 3.3H8c-.9 0-1.7.3-2.3.9-1.4 1.5-1.4 4.2-1.4 5.6v.2h1.5v-.3c0-1.1 0-3.5 1-4.5.3-.3.7-.5 1.3-.5h9.2L14.5 15l1.1 1.1 4.6-4.6-4.6-5z"}));var so=Object(p.forwardRef)((function(e,t){var n=Object(h.useSelect)((function(e){return e("core/editor").hasEditorRedo()}),[]),r=Object(h.useDispatch)("core/editor").redo;return Object(p.createElement)(oo.Button,Object(s.a)({},e,{ref:t,icon:ao,label:Object(cn.__)("Redo"),shortcut:io.displayShortcut.primaryShift("z"),"aria-disabled":!n,onClick:n?r:void 0,className:"editor-history__redo"}))})),uo=Object(p.createElement)(co.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(p.createElement)(co.Path,{d:"M18.3 11.7c-.6-.6-1.4-.9-2.3-.9H6.7l2.9-3.3-1.1-1-4.5 5L8.5 16l1-1-2.7-2.7H16c.5 0 .9.2 1.3.5 1 1 1 3.4 1 4.5v.3h1.5v-.2c0-1.5 0-4.3-1.5-5.7z"}));var lo=Object(p.forwardRef)((function(e,t){var n=Object(h.useSelect)((function(e){return e("core/editor").hasEditorUndo()}),[]),r=Object(h.useDispatch)("core/editor").undo;return Object(p.createElement)(oo.Button,Object(s.a)({},e,{ref:t,icon:uo,label:Object(cn.__)("Undo"),shortcut:io.displayShortcut.primary("z"),"aria-disabled":!n,onClick:n?r:void 0,className:"editor-history__undo"}))}));var po=Object(m.compose)([Object(h.withSelect)((function(e){return{isValid:e("core/block-editor").isValidTemplate()}})),Object(h.withDispatch)((function(e){var t=e("core/block-editor"),n=t.setTemplateValidity;return{resetTemplateValidity:function(){return n(!0)},synchronizeTemplate:t.synchronizeTemplate}}))])((function(e){var t=e.isValid,n=Object(d.a)(e,["isValid"]);return t?null:Object(p.createElement)(oo.Notice,{className:"editor-template-validation-notice",isDismissible:!1,status:"warning",actions:[{label:Object(cn.__)("Keep it as is"),onClick:n.resetTemplateValidity},{label:Object(cn.__)("Reset the template"),onClick:function(){window.confirm(Object(cn.__)("Resetting the template may result in loss of content, do you want to continue?"))&&n.synchronizeTemplate()},isPrimary:!0}]},Object(cn.__)("The content of your post doesn’t match the template assigned to your post type."))}));var bo=Object(m.compose)([Object(h.withSelect)((function(e){return{notices:e(on.store).getNotices()}})),Object(h.withDispatch)((function(e){return{onRemove:e(on.store).removeNotice}}))])((function(e){var t=e.notices,n=e.onRemove,r=Object(b.filter)(t,{isDismissible:!0,type:"default"}),o=Object(b.filter)(t,{isDismissible:!1,type:"default"}),i=Object(b.filter)(t,{type:"snackbar"});return Object(p.createElement)(p.Fragment,null,Object(p.createElement)(oo.NoticeList,{notices:o,className:"components-editor-notices__pinned"}),Object(p.createElement)(oo.NoticeList,{notices:r,className:"components-editor-notices__dismissible",onRemove:n},Object(p.createElement)(po,null)),Object(p.createElement)(oo.SnackbarList,{notices:i,className:"components-editor-notices__snackbar",onRemove:n}))})),fo=n(160),ho=n(313),mo=Object(p.createElement)(co.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(p.createElement)(co.Path,{d:"M7 5.5h10a.5.5 0 01.5.5v12a.5.5 0 01-.5.5H7a.5.5 0 01-.5-.5V6a.5.5 0 01.5-.5zM17 4H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V6a2 2 0 00-2-2zm-1 3.75H8v1.5h8v-1.5zM8 11h8v1.5H8V11zm6 3.25H8v1.5h6v-1.5z"}));function vo(e){var t=e.record,n=e.checked,r=e.onChange,o=e.closePanel,i=t.name,c=t.kind,a=t.title,s=t.key,u=Object(h.useSelect)((function(e){var t,n=e("core").getEditedEntityRecord(c,i,s).blocks,r=void 0===n?[]:n,o=e("core/block-editor").getBlockParents(null===(t=r[0])||void 0===t?void 0:t.clientId);return o[o.length-1]}),[]),l=Object(h.useSelect)((function(e){if("postType"!==c||"wp_template"!==i)return a;var t=e("core").getEditedEntityRecord(c,i,s);return e("core/editor").__experimentalGetTemplateInfo(t).title}),[i,c,a,s]),d=Object(h.useSelect)((function(e){return e("core/block-editor").getSelectedBlockClientId()===u}),[u]),b=d?Object(cn.__)("Selected"):Object(cn.__)("Select"),f=Object(h.useDispatch)("core/block-editor").selectBlock,m=Object(p.useCallback)((function(){return f(u)}),[u]),v=Object(p.useCallback)((function(){f(u),o()}),[u]);return Object(p.createElement)(oo.PanelRow,null,Object(p.createElement)(oo.CheckboxControl,{label:Object(p.createElement)("strong",null,l||Object(cn.__)("Untitled")),checked:n,onChange:r}),u?Object(p.createElement)(p.Fragment,null,Object(p.createElement)(oo.Button,{onClick:m,className:"entities-saved-states__find-entity",disabled:d},b),Object(p.createElement)(oo.Button,{onClick:v,className:"entities-saved-states__find-entity-small",disabled:d},b)):null)}var Oo={site:ho.a,page:mo};function go(e){var t=e.list,n=e.unselectedEntities,r=e.setUnselectedEntities,o=e.closePanel,i=t[0],c=Object(h.useSelect)((function(e){return e("core").getEntity(i.kind,i.name)}),[i.kind,i.name]),a=i.name,s=Oo[a];return Object(p.createElement)(oo.PanelBody,{title:c.label,initialOpen:!0,icon:s},t.map((function(e){return Object(p.createElement)(vo,{key:e.key||"site",record:e,checked:!Object(b.some)(n,(function(t){return t.kind===e.kind&&t.name===e.name&&t.key===e.key})),onChange:function(t){return r(e,t)},closePanel:o})})))}var jo={wp_template_part:function(e){return Object(cn._n)("template part","template parts",e)},wp_template:function(e){return Object(cn._n)("template","templates",e)},post:function(e){return Object(cn._n)("post","posts",e)},page:function(e){return Object(cn._n)("page","pages",e)},site:function(e){return Object(cn._n)("site","sites",e)}},yo={0:Object(cn.__)("There are no changes."),1:Object(cn.__)("The following changes have been made to your %s."),2:Object(cn.__)("The following changes have been made to your %1$s and %2$s."),3:Object(cn.__)("The following changes have been made to your %1$s, %2$s, and %3$s."),4:Object(cn.__)("The following changes have been made to your %1$s, %2$s, %3$s, and %4$s."),5:Object(cn.__)("The following changes have been made to your %1$s, %2$s, %3$s, %4$s, and %5$s.")};var _o=Object(oo.withFocusReturn)((function(e){var t=e.isOpen,n=e.close,r=Object(h.useSelect)((function(e){return{dirtyEntityRecords:e("core").__experimentalGetDirtyEntityRecords()}}),[]).dirtyEntityRecords,o=Object(h.useDispatch)("core").saveEditedEntityRecord,i=Object.values(Object(b.groupBy)(r,"name")),c=[];i.forEach((function(e){jo[e[0].name]&&c.push(jo[e[0].name](e.length))}));var a=yo[c.length]||Object(cn.__)("The following changes have been made to multiple entities."),s=cn.sprintf.apply(void 0,[a].concat(c)),u=Object(p.useState)([]),d=Object(l.a)(u,2),f=d[0],m=d[1],v=function(e,t){var n=e.kind,r=e.name,o=e.key;m(t?f.filter((function(e){return e.kind!==n||e.name!==r||e.key!==o})):[].concat(Object(tn.a)(f),[{kind:n,name:r,key:o}]))},O=Object(p.useCallback)((function(){return n()}),[n]);return t?Object(p.createElement)("div",{className:"entities-saved-states__panel"},Object(p.createElement)("div",{className:"entities-saved-states__panel-header"},Object(p.createElement)(oo.Button,{isPrimary:!0,disabled:r.length-f.length==0,onClick:function(){var e=r.filter((function(e){var t=e.kind,n=e.name,r=e.key;return!Object(b.some)(f,(function(e){return e.kind===t&&e.name===n&&e.key===r}))}));n(e),e.forEach((function(e){var t=e.kind,n=e.name,r=e.key;o(t,n,r)}))},className:"editor-entities-saved-states__save-button"},Object(cn.__)("Save")),Object(p.createElement)(oo.Button,{onClick:O,icon:fo.a,label:Object(cn.__)("Close panel")})),Object(p.createElement)("div",{className:"entities-saved-states__text-prompt"},Object(p.createElement)("strong",null,Object(cn.__)("Are you ready to save?")),Object(p.createElement)("p",null,s)),i.map((function(e){return Object(p.createElement)(go,{key:e[0].name,list:e,closePanel:O,unselectedEntities:f,setUnselectedEntities:v})}))):null})),wo=n(18);function Po(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(Dr.a)(e);if(t){var o=Object(Dr.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(Rr.a)(this,n)}}var So=function(e){Object(Ir.a)(n,e);var t=Po(n);function n(){var e;return Object(Br.a)(this,n),(e=t.apply(this,arguments)).reboot=e.reboot.bind(Object(wo.a)(e)),e.getContent=e.getContent.bind(Object(wo.a)(e)),e.state={error:null},e}return Object(Ar.a)(n,[{key:"componentDidCatch",value:function(e){this.setState({error:e})}},{key:"reboot",value:function(){this.props.onError()}},{key:"getContent",value:function(){try{return Object(h.select)("core/editor").getEditedPostContent()}catch(e){}}},{key:"render",value:function(){var e=this.state.error;return e?Object(p.createElement)(i.Warning,{className:"editor-error-boundary",actions:[Object(p.createElement)(oo.Button,{key:"recovery",onClick:this.reboot,isSecondary:!0},Object(cn.__)("Attempt Recovery")),Object(p.createElement)(oo.ClipboardButton,{key:"copy-post",text:this.getContent,isSecondary:!0},Object(cn.__)("Copy Post Text")),Object(p.createElement)(oo.ClipboardButton,{key:"copy-error",text:e.stack,isSecondary:!0},Object(cn.__)("Copy Error"))]},Object(cn.__)("The editor has encountered an unexpected error.")):this.props.children}}]),n}(p.Component),ko=window.requestIdleCallback?window.requestIdleCallback:window.requestAnimationFrame,Eo=Object(b.once)((function(){try{return window.sessionStorage.setItem("__wpEditorTestSessionStorage",""),window.sessionStorage.removeItem("__wpEditorTestSessionStorage"),!0}catch(e){return!1}}));function To(){var e=Object(h.useSelect)((function(e){return{postId:e("core/editor").getCurrentPostId(),isEditedPostNew:e("core/editor").isEditedPostNew(),getEditedPostAttribute:e("core/editor").getEditedPostAttribute,hasRemoteAutosave:!!e("core/editor").getEditorSettings().autosave}}),[]),t=e.postId,n=e.isEditedPostNew,r=e.getEditedPostAttribute,o=e.hasRemoteAutosave,i=Object(h.useDispatch)(on.store),c=i.createWarningNotice,a=i.removeNotice,s=Object(h.useDispatch)("core/editor"),u=s.editPost,l=s.resetEditorBlocks;Object(p.useEffect)((function(){var e=function(e,t){return window.sessionStorage.getItem(Pr(e,t))}(t,n);if(e){try{e=JSON.parse(e)}catch(e){return}var i=e,s={title:i.post_title,content:i.content,excerpt:i.excerpt};if(Object.keys(s).some((function(e){return s[e]!==r(e)}))){if(!o){var d=Object(b.uniqueId)("wpEditorAutosaveRestore");c(Object(cn.__)("The backup of this post in your browser is different from the version below."),{id:d,actions:[{label:Object(cn.__)("Restore the backup"),onClick:function(){u(Object(b.omit)(s,["content"])),l(Object(f.parse)(s.content)),a(d)}}]})}}else Sr(t,n)}}),[n,t])}var Co=Object(m.ifCondition)(Eo)((function(){var e=Object(h.useDispatch)("core/editor").autosave,t=Object(p.useCallback)((function(){ko((function(){return e({local:!0})}))}),[]);To(),function(){var e=Object(h.useSelect)((function(e){return{postId:e("core/editor").getCurrentPostId(),isEditedPostNew:e("core/editor").isEditedPostNew(),isDirty:e("core/editor").isEditedPostDirty(),isAutosaving:e("core/editor").isAutosavingPost(),didError:e("core/editor").didPostSaveRequestFail()}}),[]),t=e.postId,n=e.isEditedPostNew,r=e.isDirty,o=e.isAutosaving,i=e.didError,c=Object(p.useRef)(r),a=Object(p.useRef)(o);Object(p.useEffect)((function(){!i&&(a.current&&!o||c.current&&!r)&&Sr(t,n),c.current=r,a.current=o}),[r,o,i]);var s=Object(m.usePrevious)(n),u=Object(m.usePrevious)(t);Object(p.useEffect)((function(){u===t&&s&&!n&&Sr(t,!0)}),[n,t])}();var n=Object(h.useSelect)((function(e){return{localAutosaveInterval:e("core/editor").getEditorSettings().__experimentalLocalAutosaveInterval}}),[]).localAutosaveInterval;return Object(p.createElement)(Ur,{interval:n,autosave:t})}));var xo=Object(h.withSelect)((function(e){var t=e("core/editor"),n=t.getEditedPostAttribute,r=t.getEditorSettings,o=e("core").getPostType,i=r().availableTemplates;return{postType:o(n("type")),availableTemplates:i}}))((function(e){var t=e.availableTemplates,n=e.postType,r=e.children;return!Object(b.get)(n,["supports","page-attributes"],!1)&&Object(b.isEmpty)(t)?null:r}));var Bo=Object(h.withSelect)((function(e){var t=e("core/editor").getEditedPostAttribute;return{postType:(0,e("core").getPostType)(t("type"))}}))((function(e){var t=e.postType,n=e.children,r=e.supportKeys,o=!0;return t&&(o=Object(b.some)(Object(b.castArray)(r),(function(e){return!!t.supports[e]}))),o?n:null})),Ao=Object(m.withState)({orderInput:null})((function(e){var t=e.onUpdateOrder,n=e.order,r=void 0===n?0:n,o=e.orderInput,i=e.setState,c=null===o?r:o;return Object(p.createElement)(oo.TextControl,{className:"editor-page-attributes__order",type:"number",label:Object(cn.__)("Order"),value:c,onChange:function(e){i({orderInput:e});var n=Number(e);Number.isInteger(n)&&""!==Object(b.invoke)(e,["trim"])&&t(Number(e))},size:6,onBlur:function(){i({orderInput:null})}})}));var Io=Object(m.compose)([Object(h.withSelect)((function(e){return{order:e("core/editor").getEditedPostAttribute("menu_order")}})),Object(h.withDispatch)((function(e){return{onUpdateOrder:function(t){e("core/editor").editPost({menu_order:t})}}}))])((function(e){return Object(p.createElement)(Bo,{supportKeys:"page-attributes"},Object(p.createElement)(Ao,e))}));function Ro(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Do(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ro(Object(n),!0).forEach((function(t){Object(u.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ro(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function No(e){var t=e.map((function(e){return Do({children:[],parent:null},e)})),n=Object(b.groupBy)(t,"parent");if(n.null&&n.null.length)return t;return function e(t){return t.map((function(t){var r=n[t.id];return Do(Do({},t),{},{children:r&&r.length?e(r):[]})}))}(n[0]||[])}function Lo(e){var t;return null!=e&&null!==(t=e.title)&&void 0!==t&&t.rendered?e.title.rendered:"#".concat(e.id," (").concat(Object(cn.__)("no title"),")")}var Uo=function(){var e=Object(h.useDispatch)("core/editor").editPost,t=Object(p.useState)(!1),n=Object(l.a)(t,2),r=n[0],o=n[1],i=r,c=Object(h.useSelect)((function(e){var t=e("core"),n=t.getPostType,o=t.getEntityRecords,c=t.getEntityRecord,a=e("core/editor"),s=a.getCurrentPostId,u=a.getEditedPostAttribute,l=u("type"),d=u("parent"),p=n(l),f=s(),h=Object(b.get)(p,["hierarchical"],!1),m={per_page:100,exclude:f,parent_exclude:f,orderby:"menu_order",order:"asc",_fields:"id,title,parent"};return i&&(m.search=r),{parentPostId:d,parentPost:d?c("postType",l,d):null,items:h?o("postType",l,m):[],postType:p}}),[r]),a=c.parentPost,s=c.parentPostId,u=c.items,d=c.postType,f=Object(b.get)(d,["hierarchical"],!1),m=Object(b.get)(d,["labels","parent_item_colon"]),v=u||[],O=Object(p.useMemo)((function(){var e=v.map((function(e){return{id:e.id,parent:e.parent,name:Lo(e)}}));i||(e=No(e));var t=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return Object(b.flatMap)(t,(function(t){return[{value:t.id,label:Object(b.repeat)("— ",n)+Object(b.unescape)(t.name)}].concat(Object(tn.a)(e(t.children||[],n+1)))}))}(e),n=Object(b.find)(t,(function(e){return e.value===s}));return a&&!n&&t.unshift({value:s,label:Lo(a)}),t}),[v]);return f&&m?Object(p.createElement)(oo.ComboboxControl,{className:"editor-page-attributes__parent",label:m,value:s,options:O,onFilterValueChange:Object(b.debounce)((function(e){o(e)}),300),onChange:function(t){e({parent:t})}}):null};var Fo=Object(m.compose)(Object(h.withSelect)((function(e){var t=e("core/editor"),n=t.getEditedPostAttribute,r=(0,t.getEditorSettings)().availableTemplates;return{selectedTemplate:n("template"),availableTemplates:r}})),Object(h.withDispatch)((function(e){return{onUpdate:function(t){e("core/editor").editPost({template:t||""})}}})))((function(e){var t=e.availableTemplates,n=e.selectedTemplate,r=e.onUpdate;return Object(b.isEmpty)(t)?null:Object(p.createElement)(oo.SelectControl,{label:Object(cn.__)("Template:"),value:n,onChange:r,className:"editor-page-attributes__template",options:Object(b.map)(t,(function(e,t){return{value:t,label:e}}))})}));var Mo=function(){var e=Object(p.useState)(),t=Object(l.a)(e,2),n=t[0],r=t[1],o=Object(h.useSelect)((function(e){var t=e("core"),r=t.__unstableGetAuthor,o=t.getAuthors,i=t.isResolving,c=e("core/editor").getEditedPostAttribute,a=r(c("author")),s=n&&""!==n?{search:n}:{};return{authorId:c("author"),postAuthor:a,authors:o(s),isLoading:i("core","getAuthors",[s])}}),[n]),i=o.authorId,c=o.isLoading,a=o.authors,s=o.postAuthor,u=Object(h.useDispatch)("core/editor").editPost,d=Object(p.useMemo)((function(){var e=(null!=a?a:[]).map((function(e){return{value:e.id,label:e.name}}));return e.findIndex((function(e){var t=e.value;return(null==s?void 0:s.id)===t}))<0&&s?[{value:s.id,label:s.name}].concat(Object(tn.a)(e)):e}),[a,s]);return Object(p.useEffect)((function(){s&&r(s.name)}),[s]),s?Object(p.createElement)(oo.ComboboxControl,{label:Object(cn.__)("Author"),options:d,value:i,onFilterValueChange:Object(b.debounce)((function(e){r(e)}),300),onChange:function(e){e&&u({author:e})},isLoading:c,allowReset:!1}):null},Vo=n(64);var zo=function(){var e=Object(h.useDispatch)("core/editor").editPost,t=Object(h.useSelect)((function(e){var t=e("core").getAuthors();return{postAuthor:e("core/editor").getEditedPostAttribute("author"),authors:t.map((function(e){return{label:Object(Vo.decodeEntities)(e.name),value:e.id}}))}}),[]),n=t.postAuthor,r=t.authors;return Object(p.createElement)(oo.SelectControl,{className:"post-author-selector",label:Object(cn.__)("Author"),options:r,onChange:function(t){var n=Number(t);e({author:n})},value:n})};var Ho=function(){return Object(h.useSelect)((function(e){var t=e("core").getUsers({who:"authors",per_page:26});return(null==t?void 0:t.length)>=25}),[])?Object(p.createElement)(Mo,null):Object(p.createElement)(zo,null)};var Wo=Object(m.compose)([Object(h.withSelect)((function(e){var t=e("core/editor").getCurrentPost();return{hasAssignAuthorAction:Object(b.get)(t,["_links","wp:action-assign-author"],!1),postType:e("core/editor").getCurrentPostType(),authors:e("core").getAuthors()}})),m.withInstanceId])((function(e){var t=e.hasAssignAuthorAction,n=e.authors,r=e.children;return!t||!n||1>=n.length?null:Object(p.createElement)(Bo,{supportKeys:"author"},r)}));var Go=Object(m.compose)([Object(h.withSelect)((function(e){return{commentStatus:e("core/editor").getEditedPostAttribute("comment_status")}})),Object(h.withDispatch)((function(e){return{editPost:e("core/editor").editPost}}))])((function(e){var t=e.commentStatus,n=void 0===t?"open":t,r=Object(d.a)(e,["commentStatus"]);return Object(p.createElement)(oo.CheckboxControl,{label:Object(cn.__)("Allow comments"),checked:"open"===n,onChange:function(){return r.editPost({comment_status:"open"===n?"closed":"open"})}})}));var qo=Object(m.compose)([Object(h.withSelect)((function(e){return{excerpt:e("core/editor").getEditedPostAttribute("excerpt")}})),Object(h.withDispatch)((function(e){return{onUpdateExcerpt:function(t){e("core/editor").editPost({excerpt:t})}}}))])((function(e){var t=e.excerpt,n=e.onUpdateExcerpt;return Object(p.createElement)("div",{className:"editor-post-excerpt"},Object(p.createElement)(oo.TextareaControl,{label:Object(cn.__)("Write an excerpt (optional)"),className:"editor-post-excerpt__textarea",onChange:function(e){return n(e)},value:t}),Object(p.createElement)(oo.ExternalLink,{href:Object(cn.__)("https://wordpress.org/support/article/excerpt/")},Object(cn.__)("Learn more about manual excerpts")))}));var Ko=function(e){return Object(p.createElement)(Bo,Object(s.a)({},e,{supportKeys:"excerpt"}))};var Qo=Object(h.withSelect)((function(e){var t=e("core").getThemeSupports;return{postType:(0,e("core/editor").getEditedPostAttribute)("type"),themeSupports:t()}}))((function(e){var t=e.themeSupports,n=e.children,r=e.postType,o=e.supportKeys;return Object(b.some)(Object(b.castArray)(o),(function(e){var n=Object(b.get)(t,[e],!1);return"post-thumbnails"===e&&Object(b.isArray)(n)?Object(b.includes)(n,r):n}))?n:null}));var $o=function(e){return Object(p.createElement)(Qo,{supportKeys:"post-thumbnails"},Object(p.createElement)(Bo,Object(s.a)({},e,{supportKeys:"thumbnail"})))},Yo=["image"],Xo=Object(cn.__)("Featured image"),Jo=Object(cn.__)("Set featured image"),Zo=Object(cn.__)("Remove image");var ei=Object(h.withSelect)((function(e){var t=e("core"),n=t.getMedia,r=t.getPostType,o=e("core/editor"),i=o.getCurrentPostId,c=o.getEditedPostAttribute,a=c("featured_media");return{media:a?n(a):null,currentPostId:i(),postType:r(c("type")),featuredImageId:a}})),ti=Object(h.withDispatch)((function(e,t,n){var r=t.noticeOperations,o=n.select,i=e("core/editor").editPost;return{onUpdateImage:function(e){i({featured_media:e.id})},onDropImage:function(e){o("core/block-editor").getSettings().mediaUpload({allowedTypes:["image"],filesList:e,onFileChange:function(e){var t=Object(l.a)(e,1)[0];i({featured_media:t.id})},onError:function(e){r.removeAllNotices(),r.createErrorNotice(e)}})},onRemoveImage:function(){i({featured_media:0})}}})),ni=Object(m.compose)(oo.withNotices,ei,ti,Object(oo.withFilters)("editor.PostFeaturedImage"))((function(e){var t,n,r,o,c,a=e.currentPostId,s=e.featuredImageId,u=e.onUpdateImage,l=e.onDropImage,d=e.onRemoveImage,f=e.media,h=e.postType,m=e.noticeUI,O=Object(b.get)(h,["labels"],{}),g=Object(p.createElement)("p",null,Object(cn.__)("To edit the featured image, you need permission to upload media."));if(f){var j=Object(v.applyFilters)("editor.PostFeaturedImage.imageSize","post-thumbnail",f.id,a);if(Object(b.has)(f,["media_details","sizes",j]))r=f.media_details.sizes[j].width,o=f.media_details.sizes[j].height,c=f.media_details.sizes[j].source_url;else{var y=Object(v.applyFilters)("editor.PostFeaturedImage.imageSize","thumbnail",f.id,a);Object(b.has)(f,["media_details","sizes",y])?(r=f.media_details.sizes[y].width,o=f.media_details.sizes[y].height,c=f.media_details.sizes[y].source_url):(r=f.media_details.width,o=f.media_details.height,c=f.source_url)}}return Object(p.createElement)($o,null,m,Object(p.createElement)("div",{className:"editor-post-featured-image"},f&&Object(p.createElement)("div",{id:"editor-post-featured-image-".concat(s,"-describedby"),className:"hidden"},f.alt_text&&Object(cn.sprintf)(Object(cn.__)("Current image: %s"),f.alt_text),!f.alt_text&&Object(cn.sprintf)(Object(cn.__)("The current image has no alternative text. The file name is: %s"),(null===(t=f.media_details.sizes)||void 0===t||null===(n=t.full)||void 0===n?void 0:n.file)||f.slug)),Object(p.createElement)(i.MediaUploadCheck,{fallback:g},Object(p.createElement)(i.MediaUpload,{title:O.featured_image||Xo,onSelect:u,unstableFeaturedImageFlow:!0,allowedTypes:Yo,modalClass:"editor-post-featured-image__media-modal",render:function(e){var t=e.open;return Object(p.createElement)("div",{className:"editor-post-featured-image__container"},Object(p.createElement)(oo.Button,{className:s?"editor-post-featured-image__preview":"editor-post-featured-image__toggle",onClick:t,"aria-label":s?Object(cn.__)("Edit or update the image"):null,"aria-describedby":s?"editor-post-featured-image-".concat(s,"-describedby"):null},!!s&&f&&Object(p.createElement)(oo.ResponsiveWrapper,{naturalWidth:r,naturalHeight:o,isInline:!0},Object(p.createElement)("img",{src:c,alt:""})),!!s&&!f&&Object(p.createElement)(oo.Spinner,null),!s&&(O.set_featured_image||Jo)),Object(p.createElement)(oo.DropZone,{onFilesDrop:l}))},value:s})),!!s&&f&&!f.isLoading&&Object(p.createElement)(i.MediaUploadCheck,null,Object(p.createElement)(i.MediaUpload,{title:O.featured_image||Xo,onSelect:u,unstableFeaturedImageFlow:!0,allowedTypes:Yo,modalClass:"editor-post-featured-image__media-modal",render:function(e){var t=e.open;return Object(p.createElement)(oo.Button,{onClick:t,isSecondary:!0},Object(cn.__)("Replace Image"))}})),!!s&&Object(p.createElement)(i.MediaUploadCheck,null,Object(p.createElement)(oo.Button,{onClick:d,isLink:!0,isDestructive:!0},O.remove_featured_image||Zo))))}));var ri=Object(h.withSelect)((function(e){return{disablePostFormats:e("core/editor").getEditorSettings().disablePostFormats}}))((function(e){var t=e.disablePostFormats,n=Object(d.a)(e,["disablePostFormats"]);return!t&&Object(p.createElement)(Bo,Object(s.a)({},n,{supportKeys:"post-formats"}))})),oi=[{id:"aside",caption:Object(cn.__)("Aside")},{id:"audio",caption:Object(cn.__)("Audio")},{id:"chat",caption:Object(cn.__)("Chat")},{id:"gallery",caption:Object(cn.__)("Gallery")},{id:"image",caption:Object(cn.__)("Image")},{id:"link",caption:Object(cn.__)("Link")},{id:"quote",caption:Object(cn.__)("Quote")},{id:"standard",caption:Object(cn.__)("Standard")},{id:"status",caption:Object(cn.__)("Status")},{id:"video",caption:Object(cn.__)("Video")}].sort((function(e,t){var n=e.caption.toUpperCase(),r=t.caption.toUpperCase();return n<r?-1:n>r?1:0}));function ii(){var e=Object(m.useInstanceId)(ii),t="post-format-selector-".concat(e),n=Object(h.useSelect)((function(e){var t=e("core/editor"),n=t.getEditedPostAttribute,r=t.getSuggestedPostFormat,o=n("format"),i=e("core").getThemeSupports();return{postFormat:null!=o?o:"standard",suggestedFormat:r(),supportedFormats:Object(b.union)([o],Object(b.get)(i,["formats"],[]))}}),[]),r=n.postFormat,o=n.suggestedFormat,i=n.supportedFormats,c=oi.filter((function(e){return Object(b.includes)(i,e.id)})),a=Object(b.find)(c,(function(e){return e.id===o})),s=Object(h.useDispatch)("core/editor").editPost,u=function(e){return s({format:e})};return Object(p.createElement)(ri,null,Object(p.createElement)("div",{className:"editor-post-format"},Object(p.createElement)("div",{className:"editor-post-format__content"},Object(p.createElement)("label",{htmlFor:t},Object(cn.__)("Post Format")),Object(p.createElement)(oo.SelectControl,{value:r,onChange:function(e){return u(e)},id:t,options:c.map((function(e){return{label:e.caption,value:e.id}}))})),a&&a.id!==r&&Object(p.createElement)("div",{className:"editor-post-format__suggestion"},Object(cn.__)("Suggestion:")," ",Object(p.createElement)(oo.Button,{isLink:!0,onClick:function(){return u(a.id)}},a.caption))))}var ci=Object(p.createElement)(co.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(p.createElement)(co.Path,{d:"M5.5 12h1.75l-2.5 3-2.5-3H4a8 8 0 113.134 6.35l.907-1.194A6.5 6.5 0 105.5 12zm9.53 1.97l-2.28-2.28V8.5a.75.75 0 00-1.5 0V12a.747.747 0 00.218.529l1.282-.84-1.28.842 2.5 2.5a.75.75 0 101.06-1.061z"}));var ai=Object(h.withSelect)((function(e){var t=e("core/editor"),n=t.getCurrentPostLastRevisionId,r=t.getCurrentPostRevisionsCount;return{lastRevisionId:n(),revisionsCount:r()}}))((function(e){var t=e.lastRevisionId,n=e.revisionsCount,r=e.children;return!t||n<2?null:Object(p.createElement)(Bo,{supportKeys:"revisions"},r)}));var si=Object(h.withSelect)((function(e){var t=e("core/editor"),n=t.getCurrentPostLastRevisionId,r=t.getCurrentPostRevisionsCount;return{lastRevisionId:n(),revisionsCount:r()}}))((function(e){var t=e.lastRevisionId,n=e.revisionsCount;return Object(p.createElement)(ai,null,Object(p.createElement)(oo.Button,{href:H("revision.php",{revision:t,gutenberg:!0}),className:"editor-post-last-revision__title",icon:ci},Object(cn.sprintf)(Object(cn._n)("%d Revision","%d Revisions",n),n)))}));function ui(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(Dr.a)(e);if(t){var o=Object(Dr.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(Rr.a)(this,n)}}var li=function(e){Object(Ir.a)(n,e);var t=ui(n);function n(){var e;return Object(Br.a)(this,n),(e=t.apply(this,arguments)).buttonRef=Object(p.createRef)(),e.openPreviewWindow=e.openPreviewWindow.bind(Object(wo.a)(e)),e}return Object(Ar.a)(n,[{key:"componentDidUpdate",value:function(e){var t=this.props.previewLink;t&&!e.previewLink&&this.setPreviewWindowLink(t)}},{key:"setPreviewWindowLink",value:function(e){var t=this.previewWindow;t&&!t.closed&&(t.location=e,this.buttonRef.current&&this.buttonRef.current.focus())}},{key:"getWindowTarget",value:function(){var e=this.props.postId;return"wp-preview-".concat(e)}},{key:"openPreviewWindow",value:function(e){var t,n;(e.preventDefault(),this.previewWindow&&!this.previewWindow.closed||(this.previewWindow=window.open("",this.getWindowTarget())),this.previewWindow.focus(),this.props.isAutosaveable)?(this.props.isDraft?this.props.savePost({isPreview:!0}):this.props.autosave({isPreview:!0}),t=this.previewWindow.document,n=Object(p.renderToString)(Object(p.createElement)("div",{className:"editor-post-preview-button__interstitial-message"},Object(p.createElement)(oo.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 96 96"},Object(p.createElement)(oo.Path,{className:"outer",d:"M48 12c19.9 0 36 16.1 36 36S67.9 84 48 84 12 67.9 12 48s16.1-36 36-36",fill:"none"}),Object(p.createElement)(oo.Path,{className:"inner",d:"M69.5 46.4c0-3.9-1.4-6.7-2.6-8.8-1.6-2.6-3.1-4.9-3.1-7.5 0-2.9 2.2-5.7 5.4-5.7h.4C63.9 19.2 56.4 16 48 16c-11.2 0-21 5.7-26.7 14.4h2.1c3.3 0 8.5-.4 8.5-.4 1.7-.1 1.9 2.4.2 2.6 0 0-1.7.2-3.7.3L40 67.5l7-20.9L42 33c-1.7-.1-3.3-.3-3.3-.3-1.7-.1-1.5-2.7.2-2.6 0 0 5.3.4 8.4.4 3.3 0 8.5-.4 8.5-.4 1.7-.1 1.9 2.4.2 2.6 0 0-1.7.2-3.7.3l11.5 34.3 3.3-10.4c1.6-4.5 2.4-7.8 2.4-10.5zM16.1 48c0 12.6 7.3 23.5 18 28.7L18.8 35c-1.7 4-2.7 8.4-2.7 13zm32.5 2.8L39 78.6c2.9.8 5.9 1.3 9 1.3 3.7 0 7.3-.6 10.6-1.8-.1-.1-.2-.3-.2-.4l-9.8-26.9zM76.2 36c0 3.2-.6 6.9-2.4 11.4L64 75.6c9.5-5.5 15.9-15.8 15.9-27.6 0-5.5-1.4-10.8-3.9-15.3.1 1 .2 2.1.2 3.3z",fill:"none"})),Object(p.createElement)("p",null,Object(cn.__)("Generating preview…")))),n+='\n\t\t<style>\n\t\t\tbody {\n\t\t\t\tmargin: 0;\n\t\t\t}\n\t\t\t.editor-post-preview-button__interstitial-message {\n\t\t\t\tdisplay: flex;\n\t\t\t\tflex-direction: column;\n\t\t\t\talign-items: center;\n\t\t\t\tjustify-content: center;\n\t\t\t\theight: 100vh;\n\t\t\t\twidth: 100vw;\n\t\t\t}\n\t\t\t@-webkit-keyframes paint {\n\t\t\t\t0% {\n\t\t\t\t\tstroke-dashoffset: 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\t@-moz-keyframes paint {\n\t\t\t\t0% {\n\t\t\t\t\tstroke-dashoffset: 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\t@-o-keyframes paint {\n\t\t\t\t0% {\n\t\t\t\t\tstroke-dashoffset: 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\t@keyframes paint {\n\t\t\t\t0% {\n\t\t\t\t\tstroke-dashoffset: 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\t.editor-post-preview-button__interstitial-message svg {\n\t\t\t\twidth: 192px;\n\t\t\t\theight: 192px;\n\t\t\t\tstroke: #555d66;\n\t\t\t\tstroke-width: 0.75;\n\t\t\t}\n\t\t\t.editor-post-preview-button__interstitial-message svg .outer,\n\t\t\t.editor-post-preview-button__interstitial-message svg .inner {\n\t\t\t\tstroke-dasharray: 280;\n\t\t\t\tstroke-dashoffset: 280;\n\t\t\t\t-webkit-animation: paint 1.5s ease infinite alternate;\n\t\t\t\t-moz-animation: paint 1.5s ease infinite alternate;\n\t\t\t\t-o-animation: paint 1.5s ease infinite alternate;\n\t\t\t\tanimation: paint 1.5s ease infinite alternate;\n\t\t\t}\n\t\t\tp {\n\t\t\t\ttext-align: center;\n\t\t\t\tfont-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;\n\t\t\t}\n\t\t</style>\n\t',n=Object(v.applyFilters)("editor.PostPreview.interstitialMarkup",n),t.write(n),t.title=Object(cn.__)("Generating preview…"),t.close()):this.setPreviewWindowLink(e.target.href)}},{key:"render",value:function(){var e=this.props,t=e.previewLink,n=e.currentPostLink,r=e.isSaveable,o=e.role,i=t||n,c=Mr()({"editor-post-preview":!this.props.className},this.props.className);return Object(p.createElement)(oo.Button,{isTertiary:!this.props.className,className:c,href:i,target:this.getWindowTarget(),disabled:!r,onClick:this.openPreviewWindow,ref:this.buttonRef,role:o},this.props.textContent?this.props.textContent:Object(p.createElement)(p.Fragment,null,Object(cn._x)("Preview","imperative verb"),Object(p.createElement)(oo.VisuallyHidden,{as:"span"},Object(cn.__)("(opens in a new tab)"))))}}]),n}(p.Component),di=Object(m.compose)([Object(h.withSelect)((function(e,t){var n=t.forcePreviewLink,r=t.forceIsAutosaveable,o=e("core/editor"),i=o.getCurrentPostId,c=o.getCurrentPostAttribute,a=o.getEditedPostAttribute,s=o.isEditedPostSaveable,u=o.isEditedPostAutosaveable,l=o.getEditedPostPreviewLink,d=e("core").getPostType,p=l(),f=d(a("type"));return{postId:i(),currentPostLink:c("link"),previewLink:void 0!==n?n:p,isSaveable:s(),isAutosaveable:r||u(),isViewable:Object(b.get)(f,["viewable"],!1),isDraft:-1!==["draft","auto-draft"].indexOf(a("status"))}})),Object(h.withDispatch)((function(e){return{autosave:e("core/editor").autosave,savePost:e("core/editor").savePost}})),Object(m.ifCondition)((function(e){return e.isViewable}))])(li);function pi(){var e="core/editor/post-locked-modal-"+Object(m.useInstanceId)(pi),t=Object(h.useDispatch)("core/editor"),n=t.autosave,r=t.updatePostLock,o=Object(h.useSelect)((function(e){var t=e("core/editor"),n=t.isPostLocked,r=t.isPostLockTakeover,o=t.getPostLockUser,i=t.getCurrentPostId,c=t.getActivePostLock,a=t.getEditedPostAttribute,s=t.getEditorSettings,u=e("core").getPostType;return{isLocked:n(),isTakeover:r(),user:o(),postId:i(),postLockUtils:s().postLockUtils,activePostLock:c(),postType:u(a("type"))}})),i=o.isLocked,c=o.isTakeover,a=o.user,s=o.postId,u=o.postLockUtils,l=o.activePostLock,d=o.postType;if(Object(p.useEffect)((function(){function t(){if(!i&&l){var e=new window.FormData;if(e.append("action","wp-remove-post-lock"),e.append("_wpnonce",u.unlockNonce),e.append("post_ID",s),e.append("active_post_lock",l),window.navigator.sendBeacon)window.navigator.sendBeacon(u.ajaxUrl,e);else{var t=new window.XMLHttpRequest;t.open("POST",u.ajaxUrl,!1),t.send(e)}}}return Object(v.addAction)("heartbeat.send",e,(function(e){i||(e["wp-refresh-post-lock"]={lock:l,post_id:s})})),Object(v.addAction)("heartbeat.tick",e,(function(e){if(e["wp-refresh-post-lock"]){var t=e["wp-refresh-post-lock"];t.lock_error?(n(),r({isLocked:!0,isTakeover:!0,user:{avatar:t.lock_error.avatar_src}})):t.new_lock&&r({isLocked:!1,activePostLock:t.new_lock})}})),window.addEventListener("beforeunload",t),function(){Object(v.removeAction)("heartbeat.send",e),Object(v.removeAction)("heartbeat.tick",e),window.removeEventListener("beforeunload",t)}}),[]),!i)return null;var f=a.name,O=a.avatar,g=Object(N.addQueryArgs)("post.php",{"get-post-lock":"1",lockKey:!0,post:s,action:"edit",_wpnonce:u.nonce}),j=H("edit.php",{post_type:Object(b.get)(d,["slug"])}),y=Object(cn.__)("Exit the Editor");return Object(p.createElement)(oo.Modal,{title:c?Object(cn.__)("Someone else has taken over this post."):Object(cn.__)("This post is already being edited."),focusOnMount:!0,shouldCloseOnClickOutside:!1,shouldCloseOnEsc:!1,isDismissible:!1,className:"editor-post-locked-modal"},!!O&&Object(p.createElement)("img",{src:O,alt:Object(cn.__)("Avatar"),className:"editor-post-locked-modal__avatar"}),!!c&&Object(p.createElement)("div",null,Object(p.createElement)("div",null,f?Object(cn.sprintf)(Object(cn.__)("%s now has editing control of this post. Don’t worry, your changes up to this moment have been saved."),f):Object(cn.__)("Another user now has editing control of this post. Don’t worry, your changes up to this moment have been saved.")),Object(p.createElement)("div",{className:"editor-post-locked-modal__buttons"},Object(p.createElement)(oo.Button,{isPrimary:!0,href:j},y))),!c&&Object(p.createElement)("div",null,Object(p.createElement)("div",null,f?Object(cn.sprintf)(Object(cn.__)("%s is currently working on this post, which means you cannot make changes, unless you take over."),f):Object(cn.__)("Another user is currently working on this post, which means you cannot make changes, unless you take over.")),Object(p.createElement)("div",{className:"editor-post-locked-modal__buttons"},Object(p.createElement)(oo.Button,{isSecondary:!0,href:j},y),Object(p.createElement)(di,null),Object(p.createElement)(oo.Button,{isPrimary:!0,href:g},Object(cn.__)("Take Over")))))}var bi=Object(m.compose)(Object(h.withSelect)((function(e){var t=e("core/editor"),n=t.isCurrentPostPublished,r=t.getCurrentPostType,o=t.getCurrentPost;return{hasPublishAction:Object(b.get)(o(),["_links","wp:action-publish"],!1),isPublished:n(),postType:r()}})))((function(e){var t=e.hasPublishAction,n=e.isPublished,r=e.children;return n||!t?null:r}));var fi=Object(m.compose)(Object(h.withSelect)((function(e){return{status:e("core/editor").getEditedPostAttribute("status")}})),Object(h.withDispatch)((function(e){return{onUpdateStatus:function(t){e("core/editor").editPost({status:t})}}})))((function(e){var t=e.status,n=e.onUpdateStatus;return Object(p.createElement)(bi,null,Object(p.createElement)(oo.CheckboxControl,{label:Object(cn.__)("Pending review"),checked:"pending"===t,onChange:function(){n("pending"===t?"draft":"pending")}}))}));var hi=Object(m.compose)([Object(h.withSelect)((function(e){return{pingStatus:e("core/editor").getEditedPostAttribute("ping_status")}})),Object(h.withDispatch)((function(e){return{editPost:e("core/editor").editPost}}))])((function(e){var t=e.pingStatus,n=void 0===t?"open":t,r=Object(d.a)(e,["pingStatus"]);return Object(p.createElement)(oo.CheckboxControl,{label:Object(cn.__)("Allow pingbacks & trackbacks"),checked:"open"===n,onChange:function(){return r.editPost({ping_status:"open"===n?"closed":"open"})}})}));var mi=Object(m.compose)([Object(h.withSelect)((function(e,t){var n=t.forceIsSaving,r=e("core/editor"),o=r.isCurrentPostPublished,i=r.isEditedPostBeingScheduled,c=r.isSavingPost,a=r.isPublishingPost,s=r.getCurrentPost,u=r.getCurrentPostType,l=r.isAutosavingPost;return{isPublished:o(),isBeingScheduled:i(),isSaving:n||c(),isPublishing:a(),hasPublishAction:Object(b.get)(s(),["_links","wp:action-publish"],!1),postType:u(),isAutosaving:l()}}))])((function(e){var t=e.isPublished,n=e.isBeingScheduled,r=e.isSaving,o=e.isPublishing,i=e.hasPublishAction,c=e.isAutosaving,a=e.hasNonPostEntityChanges;return o?Object(cn.__)("Publishing…"):t&&r&&!c?Object(cn.__)("Updating…"):n&&r&&!c?Object(cn.__)("Scheduling…"):i?t?a?Object(cn.__)("Update…"):Object(cn.__)("Update"):n?a?Object(cn.__)("Schedule…"):Object(cn.__)("Schedule"):Object(cn.__)("Publish"):a?Object(cn.__)("Submit for Review…"):Object(cn.__)("Submit for Review")}));function vi(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(Dr.a)(e);if(t){var o=Object(Dr.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(Rr.a)(this,n)}}var Oi=function(e){Object(Ir.a)(n,e);var t=vi(n);function n(e){var r;return Object(Br.a)(this,n),(r=t.call(this,e)).buttonNode=Object(p.createRef)(),r.createOnClick=r.createOnClick.bind(Object(wo.a)(r)),r.closeEntitiesSavedStates=r.closeEntitiesSavedStates.bind(Object(wo.a)(r)),r.state={entitiesSavedStatesCallback:!1},r}return Object(Ar.a)(n,[{key:"componentDidMount",value:function(){this.props.focusOnMount&&this.buttonNode.current.focus()}},{key:"createOnClick",value:function(e){var t=this;return function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];var i=t.props.hasNonPostEntityChanges;return i?(t.setState({entitiesSavedStatesCallback:function(){return e.apply(void 0,r)}}),t.props.setEntitiesSavedStatesCallback((function(){return t.closeEntitiesSavedStates})),b.noop):e.apply(void 0,r)}}},{key:"closeEntitiesSavedStates",value:function(e){var t=this.props,n=t.postType,r=t.postId,o=this.state.entitiesSavedStatesCallback;this.setState({entitiesSavedStatesCallback:!1},(function(){e&&Object(b.some)(e,(function(e){return"postType"===e.kind&&e.name===n&&e.key===r}))&&o()}))}},{key:"render",value:function(){var e,t=this.props,n=t.forceIsDirty,r=t.forceIsSaving,o=t.hasPublishAction,i=t.isBeingScheduled,c=t.isOpen,a=t.isPostSavingLocked,u=t.isPublishable,l=t.isPublished,d=t.isSaveable,f=t.isSaving,h=t.isAutoSaving,m=t.isToggle,v=t.onSave,O=t.onStatusChange,g=t.onSubmit,j=void 0===g?b.noop:g,y=t.onToggle,_=t.visibility,w=t.hasNonPostEntityChanges,P=f||r||!d||a||!u&&!n,S=l||f||r||!d||!u&&!n;e=o?"private"===_?"private":i?"future":"publish":"pending";var k={"aria-disabled":P&&!w,className:"editor-post-publish-button",isBusy:!h&&f&&l,isPrimary:!0,onClick:this.createOnClick((function(){P||(j(),O(e),v())}))},E={"aria-disabled":S&&!w,"aria-expanded":c,className:"editor-post-publish-panel__toggle",isBusy:f&&l,isPrimary:!0,onClick:this.createOnClick((function(){S||y()}))},T=i?Object(cn.__)("Schedule…"):Object(cn.__)("Publish"),C=Object(p.createElement)(mi,{forceIsSaving:r,hasNonPostEntityChanges:w}),x=m?E:k,B=m?T:C;return Object(p.createElement)(p.Fragment,null,Object(p.createElement)(oo.Button,Object(s.a)({ref:this.buttonNode},x,{className:Mr()(x.className,"editor-post-publish-button__button",{"has-changes-dot":w})}),B))}}]),n}(p.Component),gi=Object(m.compose)([Object(h.withSelect)((function(e){var t=e("core/editor"),n=t.isSavingPost,r=t.isAutosavingPost,o=t.isEditedPostBeingScheduled,i=t.getEditedPostVisibility,c=t.isCurrentPostPublished,a=t.isEditedPostSaveable,s=t.isEditedPostPublishable,u=t.isPostSavingLocked,l=t.getCurrentPost,d=t.getCurrentPostType,p=t.getCurrentPostId,f=t.hasNonPostEntityChanges,h=r();return{isSaving:n()||h,isAutoSaving:h,isBeingScheduled:o(),visibility:i(),isSaveable:a(),isPostSavingLocked:u(),isPublishable:s(),isPublished:c(),hasPublishAction:Object(b.get)(l(),["_links","wp:action-publish"],!1),postType:d(),postId:p(),hasNonPostEntityChanges:f()}})),Object(h.withDispatch)((function(e){var t=e("core/editor"),n=t.editPost;return{onStatusChange:function(e){return n({status:e},{undoIgnore:!0})},onSave:t.savePost}}))])(Oi),ji=n(159),yi=[{value:"public",label:Object(cn.__)("Public"),info:Object(cn.__)("Visible to everyone.")},{value:"private",label:Object(cn.__)("Private"),info:Object(cn.__)("Only visible to site admins and editors.")},{value:"password",label:Object(cn.__)("Password Protected"),info:Object(cn.__)("Protected with a password you choose. Only those with the password can view this post.")}];function _i(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(Dr.a)(e);if(t){var o=Object(Dr.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(Rr.a)(this,n)}}var wi=function(e){Object(Ir.a)(n,e);var t=_i(n);function n(e){var r;return Object(Br.a)(this,n),(r=t.apply(this,arguments)).setPublic=r.setPublic.bind(Object(wo.a)(r)),r.setPrivate=r.setPrivate.bind(Object(wo.a)(r)),r.setPasswordProtected=r.setPasswordProtected.bind(Object(wo.a)(r)),r.updatePassword=r.updatePassword.bind(Object(wo.a)(r)),r.state={hasPassword:!!e.password},r}return Object(Ar.a)(n,[{key:"setPublic",value:function(){var e=this.props,t=e.visibility,n=e.onUpdateVisibility,r=e.status;n("private"===t?"draft":r),this.setState({hasPassword:!1})}},{key:"setPrivate",value:function(){if(window.confirm(Object(cn.__)("Would you like to privately publish this post now?"))){var e=this.props,t=e.onUpdateVisibility,n=e.onSave;t("private"),this.setState({hasPassword:!1}),n()}}},{key:"setPasswordProtected",value:function(){var e=this.props,t=e.visibility,n=e.onUpdateVisibility,r=e.status;n("private"===t?"draft":r,e.password||""),this.setState({hasPassword:!0})}},{key:"updatePassword",value:function(e){var t=this.props,n=t.status;(0,t.onUpdateVisibility)(n,e.target.value)}},{key:"render",value:function(){var e=this.props,t=e.visibility,n=e.password,r=e.instanceId,o={public:{onSelect:this.setPublic,checked:"public"===t&&!this.state.hasPassword},private:{onSelect:this.setPrivate,checked:"private"===t},password:{onSelect:this.setPasswordProtected,checked:this.state.hasPassword}};return[Object(p.createElement)("fieldset",{key:"visibility-selector",className:"editor-post-visibility__dialog-fieldset"},Object(p.createElement)("legend",{className:"editor-post-visibility__dialog-legend"},Object(cn.__)("Post Visibility")),yi.map((function(e){var t=e.value,n=e.label,i=e.info;return Object(p.createElement)("div",{key:t,className:"editor-post-visibility__choice"},Object(p.createElement)("input",{type:"radio",name:"editor-post-visibility__setting-".concat(r),value:t,onChange:o[t].onSelect,checked:o[t].checked,id:"editor-post-".concat(t,"-").concat(r),"aria-describedby":"editor-post-".concat(t,"-").concat(r,"-description"),className:"editor-post-visibility__dialog-radio"}),Object(p.createElement)("label",{htmlFor:"editor-post-".concat(t,"-").concat(r),className:"editor-post-visibility__dialog-label"},n),Object(p.createElement)("p",{id:"editor-post-".concat(t,"-").concat(r,"-description"),className:"editor-post-visibility__dialog-info"},i))}))),this.state.hasPassword&&Object(p.createElement)("div",{className:"editor-post-visibility__dialog-password",key:"password-selector"},Object(p.createElement)(oo.VisuallyHidden,{as:"label",htmlFor:"editor-post-visibility__dialog-password-input-".concat(r)},Object(cn.__)("Create password")),Object(p.createElement)("input",{className:"editor-post-visibility__dialog-password-input",id:"editor-post-visibility__dialog-password-input-".concat(r),type:"text",onChange:this.updatePassword,value:n,placeholder:Object(cn.__)("Use a secure password")}))]}}]),n}(p.Component),Pi=Object(m.compose)([Object(h.withSelect)((function(e){var t=e("core/editor"),n=t.getEditedPostAttribute,r=t.getEditedPostVisibility;return{status:n("status"),visibility:r(),password:n("password")}})),Object(h.withDispatch)((function(e){var t=e("core/editor"),n=t.savePost,r=t.editPost;return{onSave:n,onUpdateVisibility:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";r({status:e,password:t})}}})),m.withInstanceId])(wi);var Si=Object(h.withSelect)((function(e){return{visibility:e("core/editor").getEditedPostVisibility()}}))((function(e){var t=e.visibility;return Object(b.find)(yi,{value:t}).label}));var ki=Object(m.compose)([Object(h.withSelect)((function(e){return{date:e("core/editor").getEditedPostAttribute("date")}})),Object(h.withDispatch)((function(e){return{onUpdateDate:function(t){e("core/editor").editPost({date:t})}}}))])((function(e){var t=e.date,n=e.onUpdateDate,r=Object(p.useRef)(),o=Object(D.__experimentalGetSettings)(),i=/a(?!\\)/i.test(o.formats.time.toLowerCase().replace(/\\\\/g,"").split("").reverse().join(""));return Object(p.createElement)(oo.DateTimePicker,{ref:r,currentDate:t,onChange:function(e){n(e),r.current.ownerDocument.activeElement.blur()},is12Hour:i})}));var Ei=Object(h.withSelect)((function(e){return{date:e("core/editor").getEditedPostAttribute("date"),isFloating:e("core/editor").isEditedPostDateFloating()}}))((function(e){var t=e.date,n=e.isFloating,r=Object(D.__experimentalGetSettings)();return t&&!n?Object(D.format)("".concat(r.formats.date," ").concat(r.formats.time),t):Object(cn.__)("Immediately")}));function Ti(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(Dr.a)(e);if(t){var o=Object(Dr.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(Rr.a)(this,n)}}function Ci(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function xi(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ci(Object(n),!0).forEach((function(t){Object(u.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ci(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Bi={per_page:20,orderby:"count",order:"desc",_fields:"id,name"},Ai=function(e){return Object(b.unescape)(e.replace("&#039;","'"))},Ii=function(e,t){return Ai(e).toLowerCase()===Ai(t).toLowerCase()},Ri=function(e){return xi(xi({},e),{},{name:Ai(e.name)})},Di=function(e){return Object(b.map)(e,Ri)},Ni=function(e){Object(Ir.a)(n,e);var t=Ti(n);function n(){var e;return Object(Br.a)(this,n),(e=t.apply(this,arguments)).onChange=e.onChange.bind(Object(wo.a)(e)),e.searchTerms=Object(b.throttle)(e.searchTerms.bind(Object(wo.a)(e)),500),e.findOrCreateTerm=e.findOrCreateTerm.bind(Object(wo.a)(e)),e.state={loading:!Object(b.isEmpty)(e.props.terms),availableTerms:[],selectedTerms:[]},e}return Object(Ar.a)(n,[{key:"componentDidMount",value:function(){var e=this;Object(b.isEmpty)(this.props.terms)||(this.initRequest=this.fetchTerms({include:this.props.terms.join(","),per_page:-1}),this.initRequest.then((function(){e.setState({loading:!1})}),(function(t){"abort"!==t.statusText&&e.setState({loading:!1})})))}},{key:"componentWillUnmount",value:function(){Object(b.invoke)(this.initRequest,["abort"]),Object(b.invoke)(this.searchRequest,["abort"])}},{key:"componentDidUpdate",value:function(e){e.terms!==this.props.terms&&this.updateSelectedTerms(this.props.terms)}},{key:"fetchTerms",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=this.props.taxonomy,r=xi(xi({},Bi),t),o=_()({path:Object(N.addQueryArgs)("/wp/v2/".concat(n.rest_base),r)});return o.then(Di).then((function(t){e.setState((function(e){return{availableTerms:e.availableTerms.concat(t.filter((function(t){return!Object(b.find)(e.availableTerms,(function(e){return e.id===t.id}))})))}})),e.updateSelectedTerms(e.props.terms)})),o}},{key:"updateSelectedTerms",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=t.reduce((function(t,n){var r=Object(b.find)(e.state.availableTerms,(function(e){return e.id===n}));return r&&t.push(r.name),t}),[]);this.setState({selectedTerms:n})}},{key:"findOrCreateTerm",value:function(e){var t=this,n=this.props.taxonomy,r=Object(b.escape)(e);return _()({path:"/wp/v2/".concat(n.rest_base),method:"POST",data:{name:r}}).catch((function(o){return"term_exists"===o.code?(t.addRequest=_()({path:Object(N.addQueryArgs)("/wp/v2/".concat(n.rest_base),xi(xi({},Bi),{},{search:r}))}).then(Di),t.addRequest.then((function(t){return Object(b.find)(t,(function(t){return Ii(t.name,e)}))}))):Promise.reject(o)})).then(Ri)}},{key:"onChange",value:function(e){var t=this,n=Object(b.uniqBy)(e,(function(e){return e.toLowerCase()}));this.setState({selectedTerms:n});var r=n.filter((function(e){return!Object(b.find)(t.state.availableTerms,(function(t){return Ii(t.name,e)}))})),o=function(e,t){return e.map((function(e){return Object(b.find)(t,(function(t){return Ii(t.name,e)})).id}))};if(0===r.length)return this.props.onUpdateTerms(o(n,this.state.availableTerms),this.props.taxonomy.rest_base);Promise.all(r.map(this.findOrCreateTerm)).then((function(e){var r=t.state.availableTerms.concat(e);return t.setState({availableTerms:r}),t.props.onUpdateTerms(o(n,r),t.props.taxonomy.rest_base)}))}},{key:"searchTerms",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";Object(b.invoke)(this.searchRequest,["abort"]),e.length>=3&&(this.searchRequest=this.fetchTerms({search:e}))}},{key:"render",value:function(){var e=this.props,t=e.slug,n=e.taxonomy;if(!e.hasAssignAction)return null;var r=this.state,o=r.loading,i=r.availableTerms,c=r.selectedTerms,a=i.map((function(e){return e.name})),s=Object(b.get)(n,["labels","add_new_item"],"post_tag"===t?Object(cn.__)("Add new tag"):Object(cn.__)("Add new Term")),u=Object(b.get)(n,["labels","singular_name"],"post_tag"===t?Object(cn.__)("Tag"):Object(cn.__)("Term")),l=Object(cn.sprintf)(Object(cn._x)("%s added","term"),u),d=Object(cn.sprintf)(Object(cn._x)("%s removed","term"),u),f=Object(cn.sprintf)(Object(cn._x)("Remove %s","term"),u);return Object(p.createElement)(oo.FormTokenField,{value:c,suggestions:a,onChange:this.onChange,onInputChange:this.searchTerms,maxSuggestions:20,disabled:o,label:s,messages:{added:l,removed:d,remove:f}})}}]),n}(p.Component),Li=Object(m.compose)(Object(h.withSelect)((function(e,t){var n=t.slug,r=e("core/editor").getCurrentPost,o=(0,e("core").getTaxonomy)(n);return{hasCreateAction:!!o&&Object(b.get)(r(),["_links","wp:action-create-"+o.rest_base],!1),hasAssignAction:!!o&&Object(b.get)(r(),["_links","wp:action-assign-"+o.rest_base],!1),terms:o?e("core/editor").getEditedPostAttribute(o.rest_base):[],taxonomy:o}})),Object(h.withDispatch)((function(e){return{onUpdateTerms:function(t,n){e("core/editor").editPost(Object(u.a)({},n,t))}}})),Object(oo.withFilters)("editor.PostTaxonomyType"))(Ni);function Ui(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(Dr.a)(e);if(t){var o=Object(Dr.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(Rr.a)(this,n)}}var Fi=function(){var e=[Object(cn.__)("Suggestion:"),Object(p.createElement)("span",{className:"editor-post-publish-panel__link",key:"label"},Object(cn.__)("Add tags"))];return Object(p.createElement)(oo.PanelBody,{initialOpen:!1,title:e},Object(p.createElement)("p",null,Object(cn.__)("Tags help users and search engines navigate your site and find your content. Add a few keywords to describe your post.")),Object(p.createElement)(Li,{slug:"post_tag"}))},Mi=function(e){Object(Ir.a)(n,e);var t=Ui(n);function n(e){var r;return Object(Br.a)(this,n),(r=t.call(this,e)).state={hadTagsWhenOpeningThePanel:e.hasTags},r}return Object(Ar.a)(n,[{key:"render",value:function(){return this.state.hadTagsWhenOpeningThePanel?null:Object(p.createElement)(Fi,null)}}]),n}(p.Component),Vi=Object(m.compose)(Object(h.withSelect)((function(e){var t=e("core/editor").getCurrentPostType(),n=e("core").getTaxonomy("post_tag"),r=n&&e("core/editor").getEditedPostAttribute(n.rest_base);return{areTagsFetched:void 0!==n,isPostTypeSupported:n&&Object(b.some)(n.types,(function(e){return e===t})),hasTags:r&&r.length}})),Object(m.ifCondition)((function(e){var t=e.areTagsFetched;return e.isPostTypeSupported&&t})))(Mi),zi=function(e,t){var n=oi.filter((function(t){return Object(b.includes)(e,t.id)}));return Object(b.find)(n,(function(e){return e.id===t}))},Hi=function(e){var t=e.suggestedPostFormat,n=e.suggestionText,r=e.onUpdatePostFormat;return Object(p.createElement)(oo.Button,{isLink:!0,onClick:function(){return r(t)}},n)};function Wi(){var e=Object(h.useSelect)((function(e){var t=e("core/editor"),n=t.getEditedPostAttribute,r=t.getSuggestedPostFormat,o=Object(b.get)(e("core").getThemeSupports(),["formats"],[]);return{currentPostFormat:n("format"),suggestion:zi(o,r())}}),[]),t=e.currentPostFormat,n=e.suggestion,r=Object(h.useDispatch)("core/editor").editPost,o=[Object(cn.__)("Suggestion:"),Object(p.createElement)("span",{className:"editor-post-publish-panel__link",key:"label"},Object(cn.__)("Use a post format"))];return n&&n.id!==t?Object(p.createElement)(oo.PanelBody,{initialOpen:!1,title:o},Object(p.createElement)("p",null,Object(cn.__)("Your theme uses post formats to highlight different kinds of content, like images or videos. Apply a post format to see this special styling.")),Object(p.createElement)("p",null,Object(p.createElement)(Hi,{onUpdatePostFormat:function(e){return r({format:e})},suggestedPostFormat:n.id,suggestionText:Object(cn.sprintf)(Object(cn.__)('Apply the "%1$s" format.'),n.caption)}))):null}var Gi=Object(h.withSelect)((function(e){var t=e("core/editor"),n=t.getCurrentPost,r=t.isEditedPostBeingScheduled;return{hasPublishAction:Object(b.get)(n(),["_links","wp:action-publish"],!1),isBeingScheduled:r()}}))((function(e){var t,n,r=e.hasPublishAction,o=e.isBeingScheduled,i=e.children;return r?o?(t=Object(cn.__)("Are you ready to schedule?"),n=Object(cn.__)("Your work will be published at the specified date and time.")):(t=Object(cn.__)("Are you ready to publish?"),n=Object(cn.__)("Double-check your settings before publishing.")):(t=Object(cn.__)("Are you ready to submit for review?"),n=Object(cn.__)("When you’re ready, submit your work for review, and an Editor will be able to approve it for you.")),Object(p.createElement)("div",{className:"editor-post-publish-panel__prepublish"},Object(p.createElement)("div",null,Object(p.createElement)("strong",null,t)),Object(p.createElement)("p",null,n),r&&Object(p.createElement)(p.Fragment,null,Object(p.createElement)(oo.PanelBody,{initialOpen:!1,title:[Object(cn.__)("Visibility:"),Object(p.createElement)("span",{className:"editor-post-publish-panel__link",key:"label"},Object(p.createElement)(Si,null))]},Object(p.createElement)(Pi,null)),Object(p.createElement)(oo.PanelBody,{initialOpen:!1,title:[Object(cn.__)("Publish:"),Object(p.createElement)("span",{className:"editor-post-publish-panel__link",key:"label"},Object(p.createElement)(Ei,null))]},Object(p.createElement)(ki,null))),Object(p.createElement)(Wi,null),Object(p.createElement)(Vi,null),i)}));function qi(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(Dr.a)(e);if(t){var o=Object(Dr.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(Rr.a)(this,n)}}var Ki=function(e){Object(Ir.a)(n,e);var t=qi(n);function n(){var e;return Object(Br.a)(this,n),(e=t.apply(this,arguments)).state={showCopyConfirmation:!1},e.onCopy=e.onCopy.bind(Object(wo.a)(e)),e.onSelectInput=e.onSelectInput.bind(Object(wo.a)(e)),e.postLink=Object(p.createRef)(),e}return Object(Ar.a)(n,[{key:"componentDidMount",value:function(){this.props.focusOnMount&&this.postLink.current.focus()}},{key:"componentWillUnmount",value:function(){clearTimeout(this.dismissCopyConfirmation)}},{key:"onCopy",value:function(){var e=this;this.setState({showCopyConfirmation:!0}),clearTimeout(this.dismissCopyConfirmation),this.dismissCopyConfirmation=setTimeout((function(){e.setState({showCopyConfirmation:!1})}),4e3)}},{key:"onSelectInput",value:function(e){e.target.select()}},{key:"render",value:function(){var e=this.props,t=e.children,n=e.isScheduled,r=e.post,o=e.postType,i=Object(b.get)(o,["labels","singular_name"]),c=Object(b.get)(o,["labels","view_item"]),a="future"===r.status?function(e){var t=e.slug;return e.permalink_template.includes("%postname%")?e.permalink_template.replace("%postname%",t):e.permalink_template}(r):r.link,s=n?Object(p.createElement)(p.Fragment,null,Object(cn.__)("is now scheduled. It will go live on")," ",Object(p.createElement)(Ei,null),"."):Object(cn.__)("is now live.");return Object(p.createElement)("div",{className:"post-publish-panel__postpublish"},Object(p.createElement)(oo.PanelBody,{className:"post-publish-panel__postpublish-header"},Object(p.createElement)("a",{ref:this.postLink,href:a},Object(Vo.decodeEntities)(r.title)||Object(cn.__)("(no title)"))," ",s),Object(p.createElement)(oo.PanelBody,null,Object(p.createElement)("p",{className:"post-publish-panel__postpublish-subheader"},Object(p.createElement)("strong",null,Object(cn.__)("What’s next?"))),Object(p.createElement)(oo.TextControl,{className:"post-publish-panel__postpublish-post-address",readOnly:!0,label:Object(cn.sprintf)(Object(cn.__)("%s address"),i),value:Object(N.safeDecodeURIComponent)(a),onFocus:this.onSelectInput}),Object(p.createElement)("div",{className:"post-publish-panel__postpublish-buttons"},!n&&Object(p.createElement)(oo.Button,{isSecondary:!0,href:a},c),Object(p.createElement)(oo.ClipboardButton,{isSecondary:!0,text:a,onCopy:this.onCopy},this.state.showCopyConfirmation?Object(cn.__)("Copied!"):Object(cn.__)("Copy Link")))),t)}}]),n}(p.Component),Qi=Object(h.withSelect)((function(e){var t=e("core/editor"),n=t.getEditedPostAttribute,r=t.getCurrentPost,o=t.isCurrentPostScheduled,i=e("core").getPostType;return{post:r(),postType:i(n("type")),isScheduled:o()}}))(Ki);function $i(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(Dr.a)(e);if(t){var o=Object(Dr.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(Rr.a)(this,n)}}var Yi=function(e){Object(Ir.a)(n,e);var t=$i(n);function n(){var e;return Object(Br.a)(this,n),(e=t.apply(this,arguments)).onSubmit=e.onSubmit.bind(Object(wo.a)(e)),e}return Object(Ar.a)(n,[{key:"componentDidUpdate",value:function(e){e.isPublished&&!this.props.isSaving&&this.props.isDirty&&this.props.onClose()}},{key:"onSubmit",value:function(){var e=this.props,t=e.onClose,n=e.hasPublishAction,r=e.isPostTypeViewable;n&&r||t()}},{key:"render",value:function(){var e=this.props,t=e.forceIsDirty,n=e.forceIsSaving,r=e.isBeingScheduled,o=e.isPublished,i=e.isPublishSidebarEnabled,c=e.isScheduled,a=e.isSaving,u=e.onClose,l=e.onTogglePublishSidebar,f=e.PostPublishExtension,h=e.PrePublishExtension,m=Object(d.a)(e,["forceIsDirty","forceIsSaving","isBeingScheduled","isPublished","isPublishSidebarEnabled","isScheduled","isSaving","onClose","onTogglePublishSidebar","PostPublishExtension","PrePublishExtension"]),v=Object(b.omit)(m,["hasPublishAction","isDirty","isPostTypeViewable"]),O=o||c&&r,g=!O&&!a,j=O&&!a;return Object(p.createElement)("div",Object(s.a)({className:"editor-post-publish-panel"},v),Object(p.createElement)("div",{className:"editor-post-publish-panel__header"},j?Object(p.createElement)(oo.Button,{onClick:u,icon:ji.a,label:Object(cn.__)("Close panel")}):Object(p.createElement)(p.Fragment,null,Object(p.createElement)("div",{className:"editor-post-publish-panel__header-publish-button"},Object(p.createElement)(gi,{focusOnMount:!0,onSubmit:this.onSubmit,forceIsDirty:t,forceIsSaving:n})),Object(p.createElement)("div",{className:"editor-post-publish-panel__header-cancel-button"},Object(p.createElement)(oo.Button,{onClick:u,isSecondary:!0},Object(cn.__)("Cancel"))))),Object(p.createElement)("div",{className:"editor-post-publish-panel__content"},g&&Object(p.createElement)(Gi,null,h&&Object(p.createElement)(h,null)),j&&Object(p.createElement)(Qi,{focusOnMount:!0},f&&Object(p.createElement)(f,null)),a&&Object(p.createElement)(oo.Spinner,null)),Object(p.createElement)("div",{className:"editor-post-publish-panel__footer"},Object(p.createElement)(oo.CheckboxControl,{label:Object(cn.__)("Always show pre-publish checks."),checked:i,onChange:l})))}}]),n}(p.Component),Xi=Object(m.compose)([Object(h.withSelect)((function(e){var t=e("core").getPostType,n=e("core/editor"),r=n.getCurrentPost,o=n.getEditedPostAttribute,i=n.isCurrentPostPublished,c=n.isCurrentPostScheduled,a=n.isEditedPostBeingScheduled,s=n.isEditedPostDirty,u=n.isSavingPost,l=e("core/editor").isPublishSidebarEnabled,d=t(o("type"));return{hasPublishAction:Object(b.get)(r(),["_links","wp:action-publish"],!1),isPostTypeViewable:Object(b.get)(d,["viewable"],!1),isBeingScheduled:a(),isDirty:s(),isPublished:i(),isPublishSidebarEnabled:l(),isSaving:u(),isScheduled:c()}})),Object(h.withDispatch)((function(e,t){var n=t.isPublishSidebarEnabled,r=e("core/editor"),o=r.disablePublishSidebar,i=r.enablePublishSidebar;return{onTogglePublishSidebar:function(){n?o():i()}}})),oo.withFocusReturn,oo.withConstrainedTabbing])(Yi),Ji=n(138),Zi=Object(p.createElement)(co.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(p.createElement)(co.Path,{d:"M14.9 9c1.8.2 3.1 1.7 3.1 3.5 0 1.9-1.6 3.5-3.5 3.5h-10C2.6 16 1 14.4 1 12.5 1 10.7 2.3 9.3 4.1 9 4 8.9 4 8.7 4 8.5 4 7.1 5.1 6 6.5 6c.3 0 .7.1.9.2C8.1 4.9 9.4 4 11 4c2.2 0 4 1.8 4 4 0 .4-.1.7-.1 1z"})),ec=n(161),tc=Object(p.createElement)(co.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(p.createElement)(co.Path,{d:"M14.8 9c.1-.3.2-.6.2-1 0-2.2-1.8-4-4-4-1.5 0-2.9.9-3.5 2.2-.3-.1-.7-.2-1-.2C5.1 6 4 7.1 4 8.5c0 .2 0 .4.1.5-1.8.3-3.1 1.7-3.1 3.5C1 14.4 2.6 16 4.5 16H8v-3H5l4.5-4.5L14 13h-3v3h3.5c1.9 0 3.5-1.6 3.5-3.5 0-1.8-1.4-3.3-3.2-3.5z"}));var nc=Object(m.compose)([Object(h.withSelect)((function(e){var t=e("core/editor"),n=t.isSavingPost,r=t.isCurrentPostPublished,o=t.isCurrentPostScheduled;return{isSaving:n(),isPublished:r(),isScheduled:o()}})),Object(h.withDispatch)((function(e){var t=e("core/editor"),n=t.editPost,r=t.savePost;return{onClick:function(){n({status:"draft"}),r()}}}))])((function(e){var t=e.isSaving,n=e.isPublished,r=e.isScheduled,o=e.onClick,i=Object(m.useViewportMatch)("small","<");return n||r?Object(p.createElement)(oo.Button,{className:"editor-post-switch-to-draft",onClick:function(){var e;n?e=Object(cn.__)("Are you sure you want to unpublish this post?"):r&&(e=Object(cn.__)("Are you sure you want to unschedule this post?")),window.confirm(e)&&o()},disabled:t,isTertiary:!0},i?Object(cn.__)("Draft"):Object(cn.__)("Switch to draft")):null}));function rc(e){var t=e.forceIsDirty,n=e.forceIsSaving,r=e.showIconLabels,o=void 0!==r&&r,i=Object(p.useState)(!1),c=Object(l.a)(i,2),a=c[0],s=c[1],u=Object(m.useViewportMatch)("small"),d=Object(h.useSelect)((function(e){var r,o,i,c=e("core/editor"),a=c.isEditedPostNew,s=c.isCurrentPostPublished,u=c.isCurrentPostScheduled,l=c.isEditedPostDirty,d=c.isSavingPost,p=c.isEditedPostSaveable,b=c.getCurrentPost,f=c.isAutosavingPost,h=c.getEditedPostAttribute;return{isAutosaving:f(),isDirty:t||l(),isNew:a(),isPending:"pending"===h("status"),isPublished:s(),isSaving:n||d(),isSaveable:p(),isScheduled:u(),hasPublishAction:null!==(r=null===(o=b())||void 0===o||null===(i=o._links)||void 0===i?void 0:i["wp:action-publish"])&&void 0!==r&&r}}),[t,n]),b=d.isAutosaving,f=d.isDirty,v=d.isNew,O=d.isPending,g=d.isPublished,j=d.isSaveable,y=d.isSaving,_=d.isScheduled,w=d.hasPublishAction,P=Object(h.useDispatch)("core/editor").savePost,S=Object(m.usePrevious)(y);if(Object(p.useEffect)((function(){var e;return S&&!y&&(s(!0),e=setTimeout((function(){s(!1)}),1e3)),function(){return clearTimeout(e)}}),[y]),y){var k=Mr()("editor-post-saved-state","is-saving",Object(oo.__unstableGetAnimateClassName)({type:"loading"}),{"is-autosaving":b});return Object(p.createElement)("span",{className:k},Object(p.createElement)(Ji.a,{icon:Zi}),b?Object(cn.__)("Autosaving"):Object(cn.__)("Saving"))}if(g||_)return Object(p.createElement)(nc,null);if(!j)return null;if(a||!v&&!f)return Object(p.createElement)("span",{className:"editor-post-saved-state is-saved"},Object(p.createElement)(Ji.a,{icon:ec.a}),Object(cn.__)("Saved"));if(!w&&O)return null;var E=O?Object(cn.__)("Save as pending"):Object(cn.__)("Save draft"),T=Object(cn.__)("Save");return u?Object(p.createElement)(oo.Button,{className:"editor-post-save-draft",onClick:function(){return P()},shortcut:io.displayShortcut.primary("s"),isTertiary:!0},E):Object(p.createElement)(oo.Button,{className:"editor-post-save-draft",label:E,onClick:function(){return P()},shortcut:io.displayShortcut.primary("s"),icon:tc},o&&T)}var oc=Object(m.compose)([Object(h.withSelect)((function(e){var t=e("core/editor"),n=t.getCurrentPost,r=t.getCurrentPostType;return{hasPublishAction:Object(b.get)(n(),["_links","wp:action-publish"],!1),postType:r()}}))])((function(e){var t=e.hasPublishAction,n=e.children;return t?n:null}));function ic(e){var t=e.children;return Object(p.createElement)(Bo,{supportKeys:"slug"},t)}function cc(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(Dr.a)(e);if(t){var o=Object(Dr.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(Rr.a)(this,n)}}var ac=function(e){Object(Ir.a)(n,e);var t=cc(n);function n(e){var r,o=e.postSlug,i=e.postTitle,c=e.postID;return Object(Br.a)(this,n),(r=t.apply(this,arguments)).state={editedSlug:Object(N.safeDecodeURIComponent)(o)||W(i)||c},r.setSlug=r.setSlug.bind(Object(wo.a)(r)),r}return Object(Ar.a)(n,[{key:"setSlug",value:function(e){var t=this.props,n=t.postSlug,r=t.onUpdateSlug,o=W(e.target.value);o!==n&&r(o)}},{key:"render",value:function(){var e=this,t=this.props.instanceId,n=this.state.editedSlug,r="editor-post-slug-"+t;return Object(p.createElement)(ic,null,Object(p.createElement)("label",{htmlFor:r},Object(cn.__)("Slug")),Object(p.createElement)("input",{type:"text",id:r,value:n,onChange:function(t){return e.setState({editedSlug:t.target.value})},onBlur:this.setSlug,className:"editor-post-slug__input"}))}}]),n}(p.Component),sc=Object(m.compose)([Object(h.withSelect)((function(e){var t=e("core/editor"),n=t.getCurrentPost,r=t.getEditedPostAttribute,o=n().id;return{postSlug:r("slug"),postTitle:r("title"),postID:o}})),Object(h.withDispatch)((function(e){var t=e("core/editor").editPost;return{onUpdateSlug:function(e){t({slug:e})}}})),m.withInstanceId])(ac);var uc=Object(m.compose)([Object(h.withSelect)((function(e){var t=e("core/editor").getCurrentPost();return{hasStickyAction:Object(b.get)(t,["_links","wp:action-sticky"],!1),postType:e("core/editor").getCurrentPostType()}}))])((function(e){var t=e.hasStickyAction,n=e.postType,r=e.children;return"post"===n&&t?r:null}));var lc=Object(m.compose)([Object(h.withSelect)((function(e){return{postSticky:e("core/editor").getEditedPostAttribute("sticky")}})),Object(h.withDispatch)((function(e){return{onUpdateSticky:function(t){e("core/editor").editPost({sticky:t})}}}))])((function(e){var t=e.onUpdateSticky,n=e.postSticky,r=void 0!==n&&n;return Object(p.createElement)(uc,null,Object(p.createElement)(oo.CheckboxControl,{label:Object(cn.__)("Stick to the top of the blog"),checked:r,onChange:function(){return t(!r)}}))}));function dc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function pc(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?dc(Object(n),!0).forEach((function(t){Object(u.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):dc(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function bc(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(Dr.a)(e);if(t){var o=Object(Dr.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(Rr.a)(this,n)}}var fc={per_page:-1,orderby:"name",order:"asc",_fields:"id,name,parent"},hc=function(e){Object(Ir.a)(n,e);var t=bc(n);function n(){var e;return Object(Br.a)(this,n),(e=t.apply(this,arguments)).findTerm=e.findTerm.bind(Object(wo.a)(e)),e.onChange=e.onChange.bind(Object(wo.a)(e)),e.onChangeFormName=e.onChangeFormName.bind(Object(wo.a)(e)),e.onChangeFormParent=e.onChangeFormParent.bind(Object(wo.a)(e)),e.onAddTerm=e.onAddTerm.bind(Object(wo.a)(e)),e.onToggleForm=e.onToggleForm.bind(Object(wo.a)(e)),e.setFilterValue=e.setFilterValue.bind(Object(wo.a)(e)),e.sortBySelected=e.sortBySelected.bind(Object(wo.a)(e)),e.state={loading:!0,availableTermsTree:[],availableTerms:[],adding:!1,formName:"",formParent:"",showForm:!1,filterValue:"",filteredTermsTree:[]},e}return Object(Ar.a)(n,[{key:"onChange",value:function(e){var t=this.props,n=t.onUpdateTerms,r=t.terms,o=void 0===r?[]:r,i=t.taxonomy;n(-1!==o.indexOf(e)?Object(b.without)(o,e):[].concat(Object(tn.a)(o),[e]),i.rest_base)}},{key:"onChangeFormName",value:function(e){var t=""===e.target.value.trim()?"":e.target.value;this.setState({formName:t})}},{key:"onChangeFormParent",value:function(e){this.setState({formParent:e})}},{key:"onToggleForm",value:function(){this.setState((function(e){return{showForm:!e.showForm}}))}},{key:"findTerm",value:function(e,t,n){return Object(b.find)(e,(function(e){return(!e.parent&&!t||parseInt(e.parent)===parseInt(t))&&e.name.toLowerCase()===n.toLowerCase()}))}},{key:"onAddTerm",value:function(e){var t=this;e.preventDefault();var n=this.props,r=n.onUpdateTerms,o=n.taxonomy,i=n.terms,c=n.slug,a=this.state,s=a.formName,u=a.formParent,l=a.adding,d=a.availableTerms;if(""!==s&&!l){var p=this.findTerm(d,u,s);if(p)return Object(b.some)(i,(function(e){return e===p.id}))||r([].concat(Object(tn.a)(i),[p.id]),o.rest_base),void this.setState({formName:"",formParent:""});this.setState({adding:!0}),this.addRequest=_()({path:"/wp/v2/".concat(o.rest_base),method:"POST",data:{name:s,parent:u||void 0}}),this.addRequest.catch((function(e){return"term_exists"===e.code?(t.addRequest=_()({path:Object(N.addQueryArgs)("/wp/v2/".concat(o.rest_base),pc(pc({},fc),{},{parent:u||0,search:s}))}),t.addRequest.then((function(e){return t.findTerm(e,u,s)}))):Promise.reject(e)})).then((function(e){var n=!!Object(b.find)(t.state.availableTerms,(function(t){return t.id===e.id}))?t.state.availableTerms:[e].concat(Object(tn.a)(t.state.availableTerms)),a=Object(cn.sprintf)(Object(cn._x)("%s added","term"),Object(b.get)(t.props.taxonomy,["labels","singular_name"],"category"===c?Object(cn.__)("Category"):Object(cn.__)("Term")));t.props.speak(a,"assertive"),t.addRequest=null,t.setState({adding:!1,formName:"",formParent:"",availableTerms:n,availableTermsTree:t.sortBySelected(No(n))}),r([].concat(Object(tn.a)(i),[e.id]),o.rest_base)}),(function(e){"abort"!==e.statusText&&(t.addRequest=null,t.setState({adding:!1}))}))}}},{key:"componentDidMount",value:function(){this.fetchTerms()}},{key:"componentWillUnmount",value:function(){Object(b.invoke)(this.fetchRequest,["abort"]),Object(b.invoke)(this.addRequest,["abort"])}},{key:"componentDidUpdate",value:function(e){this.props.taxonomy!==e.taxonomy&&this.fetchTerms()}},{key:"fetchTerms",value:function(){var e=this,t=this.props.taxonomy;t&&(this.fetchRequest=_()({path:Object(N.addQueryArgs)("/wp/v2/".concat(t.rest_base),fc)}),this.fetchRequest.then((function(t){var n=e.sortBySelected(No(t));e.fetchRequest=null,e.setState({loading:!1,availableTermsTree:n,availableTerms:t})}),(function(t){"abort"!==t.statusText&&(e.fetchRequest=null,e.setState({loading:!1}))})))}},{key:"sortBySelected",value:function(e){var t=this.props.terms,n=function e(n){return-1!==t.indexOf(n.id)||void 0!==n.children&&!!(n.children.map(e).filter((function(e){return e})).length>0)};return e.sort((function(e,t){var r=n(e),o=n(t);return r===o?0:r&&!o?-1:!r&&o?1:0})),e}},{key:"setFilterValue",value:function(e){var t=this.state.availableTermsTree,n=e.target.value,r=t.map(this.getFilterMatcher(n)).filter((function(e){return e}));this.setState({filterValue:n,filteredTermsTree:r});var o=function e(t){for(var n=0,r=0;r<t.length;r++)n++,void 0!==t[r].children&&(n+=e(t[r].children));return n}(r),i=Object(cn.sprintf)(Object(cn._n)("%d result found.","%d results found.",o),o);this.props.debouncedSpeak(i,"assertive")}},{key:"getFilterMatcher",value:function(e){return function t(n){if(""===e)return n;var r=pc({},n);return r.children.length>0&&(r.children=r.children.map(t).filter((function(e){return e}))),(-1!==r.name.toLowerCase().indexOf(e.toLowerCase())||r.children.length>0)&&r}}},{key:"renderTerms",value:function(e){var t=this,n=this.props.terms,r=void 0===n?[]:n;return e.map((function(e){return Object(p.createElement)("div",{key:e.id,className:"editor-post-taxonomies__hierarchical-terms-choice"},Object(p.createElement)(oo.CheckboxControl,{checked:-1!==r.indexOf(e.id),onChange:function(){var n=parseInt(e.id,10);t.onChange(n)},label:Object(b.unescape)(e.name)}),!!e.children.length&&Object(p.createElement)("div",{className:"editor-post-taxonomies__hierarchical-terms-subchoices"},t.renderTerms(e.children)))}))}},{key:"render",value:function(){var e=this.props,t=e.slug,n=e.taxonomy,r=e.instanceId,o=e.hasCreateAction;if(!e.hasAssignAction)return null;var i=this.state,c=i.availableTermsTree,a=i.availableTerms,s=i.filteredTermsTree,u=i.formName,l=i.formParent,d=i.loading,f=i.showForm,h=i.filterValue,m=function(e,r,o){return Object(b.get)(n,["labels",e],"category"===t?r:o)},v=m("add_new_item",Object(cn.__)("Add new category"),Object(cn.__)("Add new term")),O=m("new_item_name",Object(cn.__)("Add new category"),Object(cn.__)("Add new term")),g=m("parent_item",Object(cn.__)("Parent Category"),Object(cn.__)("Parent Term")),j="— ".concat(g," —"),y=v,_="editor-post-taxonomies__hierarchical-terms-input-".concat(r),w="editor-post-taxonomies__hierarchical-terms-filter-".concat(r),P=Object(b.get)(this.props.taxonomy,["labels","search_items"],Object(cn.__)("Search Terms")),S=Object(b.get)(this.props.taxonomy,["name"],Object(cn.__)("Terms")),k=a.length>=8;return[k&&Object(p.createElement)("label",{key:"filter-label",htmlFor:w},P),k&&Object(p.createElement)("input",{type:"search",id:w,value:h,onChange:this.setFilterValue,className:"editor-post-taxonomies__hierarchical-terms-filter",key:"term-filter-input"}),Object(p.createElement)("div",{className:"editor-post-taxonomies__hierarchical-terms-list",key:"term-list",tabIndex:"0",role:"group","aria-label":S},this.renderTerms(""!==h?s:c)),!d&&o&&Object(p.createElement)(oo.Button,{key:"term-add-button",onClick:this.onToggleForm,className:"editor-post-taxonomies__hierarchical-terms-add","aria-expanded":f,isLink:!0},v),f&&Object(p.createElement)("form",{onSubmit:this.onAddTerm,key:"hierarchical-terms-form"},Object(p.createElement)("label",{htmlFor:_,className:"editor-post-taxonomies__hierarchical-terms-label"},O),Object(p.createElement)("input",{type:"text",id:_,className:"editor-post-taxonomies__hierarchical-terms-input",value:u,onChange:this.onChangeFormName,required:!0}),!!a.length&&Object(p.createElement)(oo.TreeSelect,{label:g,noOptionLabel:j,onChange:this.onChangeFormParent,selectedId:l,tree:c}),Object(p.createElement)(oo.Button,{isSecondary:!0,type:"submit",className:"editor-post-taxonomies__hierarchical-terms-submit"},y))]}}]),n}(p.Component),mc=Object(m.compose)([Object(h.withSelect)((function(e,t){var n=t.slug,r=e("core/editor").getCurrentPost,o=(0,e("core").getTaxonomy)(n);return{hasCreateAction:!!o&&Object(b.get)(r(),["_links","wp:action-create-"+o.rest_base],!1),hasAssignAction:!!o&&Object(b.get)(r(),["_links","wp:action-assign-"+o.rest_base],!1),terms:o?e("core/editor").getEditedPostAttribute(o.rest_base):[],taxonomy:o}})),Object(h.withDispatch)((function(e){return{onUpdateTerms:function(t,n){e("core/editor").editPost(Object(u.a)({},n,t))}}})),oo.withSpokenMessages,m.withInstanceId,Object(oo.withFilters)("editor.PostTaxonomyType")])(hc);var vc=Object(m.compose)([Object(h.withSelect)((function(e){return{postType:e("core/editor").getCurrentPostType(),taxonomies:e("core").getTaxonomies({per_page:-1})}}))])((function(e){var t=e.postType,n=e.taxonomies,r=e.taxonomyWrapper,o=void 0===r?b.identity:r,i=Object(b.filter)(n,(function(e){return Object(b.includes)(e.types,t)}));return Object(b.filter)(i,(function(e){return e.visibility.show_ui})).map((function(e){var t=e.hierarchical?mc:Li;return Object(p.createElement)(p.Fragment,{key:"taxonomy-".concat(e.slug)},o(Object(p.createElement)(t,{slug:e.slug}),e))}))}));var Oc=Object(m.compose)([Object(h.withSelect)((function(e){return{postType:e("core/editor").getCurrentPostType(),taxonomies:e("core").getTaxonomies({per_page:-1})}}))])((function(e){var t=e.postType,n=e.taxonomies,r=e.children;return Object(b.some)(n,(function(e){return Object(b.includes)(e.types,t)}))?r:null})),gc=n(91),jc=n.n(gc);function yc(){var e=Object(h.useSelect)((function(e){return e("core/editor").getEditedPostContent()}),[]),t=Object(h.useDispatch)("core/editor"),n=t.editPost,r=t.resetEditorBlocks,o=Object(p.useState)(e),i=Object(l.a)(o,2),c=i[0],a=i[1],s=Object(p.useState)(!1),u=Object(l.a)(s,2),d=u[0],b=u[1],v=Object(m.useInstanceId)(yc);d||c===e||a(e);var O=function(){var e=Object(f.parse)(c);r(e)};Object(p.useEffect)((function(){var e=setTimeout(O,300);return function(){clearTimeout(e)}}),[c]);return Object(p.createElement)(p.Fragment,null,Object(p.createElement)(oo.VisuallyHidden,{as:"label",htmlFor:"post-content-".concat(v)},Object(cn.__)("Type text or HTML")),Object(p.createElement)(jc.a,{autoComplete:"off",dir:"auto",value:c,onChange:function(e){var t=e.target.value;n({content:t}),a(t),b(!0)},onBlur:function(){d&&(O(),b(!1))},className:"editor-post-text-editor",id:"post-content-".concat(v),placeholder:Object(cn.__)("Start writing with text or HTML")}))}var _c=/[\r\n]+/g;function wc(){var e=Object(m.useInstanceId)(wc),t=Object(p.useRef)(),n=Object(p.useState)(!1),r=Object(l.a)(n,2),o=r[0],i=r[1],c=Object(h.useDispatch)("core/editor").editPost,a=Object(h.useDispatch)("core/block-editor"),s=a.insertDefaultBlock,u=a.clearSelectedBlock,d=a.insertBlocks,b=Object(h.useSelect)((function(e){var t=e("core/editor"),n=t.getEditedPostAttribute,r=t.isCleanNewPost,o=(0,e("core/block-editor").getSettings)(),i=o.titlePlaceholder,c=o.focusMode,a=o.hasFixedToolbar;return{isCleanNewPost:r(),title:n("title"),placeholder:i,isFocusMode:c,hasFixedToolbar:a}})),v=b.isCleanNewPost,O=b.title,g=b.placeholder,j=b.isFocusMode,y=b.hasFixedToolbar;function _(e){d(e,0)}function w(e){c({title:e})}function P(){i(!1)}Object(p.useEffect)((function(){var e=t.current.ownerDocument,n=e.activeElement,r=e.body;!v||n&&r!==n||t.current.focus()}),[v]);var S=Mr()("wp-block editor-post-title editor-post-title__block",{"is-selected":o,"is-focus-mode":j,"has-fixed-toolbar":y}),k=Object(Vo.decodeEntities)(g);return Object(p.createElement)(Bo,{supportKeys:"title"},Object(p.createElement)("div",{className:S},Object(p.createElement)(oo.VisuallyHidden,{as:"label",htmlFor:"post-title-".concat(e)},k||Object(cn.__)("Add title")),Object(p.createElement)(jc.a,{ref:t,id:"post-title-".concat(e),className:"editor-post-title__input",value:O,onChange:function(e){w(e.target.value.replace(_c," "))},placeholder:k||Object(cn.__)("Add title"),onFocus:function(){i(!0),u()},onBlur:P,onKeyDown:function(e){e.keyCode===io.ENTER&&(e.preventDefault(),s(void 0,void 0,0))},onKeyPress:P,onPaste:function(e){var t=e.clipboardData,n="",r="";try{n=t.getData("text/plain"),r=t.getData("text/html")}catch(e){try{r=t.getData("Text")}catch(e){return}}window.console.log("Received HTML:\n\n",r),window.console.log("Received plain text:\n\n",n);var o=Object(f.pasteHandler)({HTML:r,plainText:n});if("string"!=typeof o&&o.length){e.preventDefault();var i=Object(l.a)(o,1)[0];O||"core/heading"!==i.name&&"core/paragraph"!==i.name?_(o):(w(i.attributes.content),_(o.slice(1)))}}})))}var Pc=Object(m.compose)([Object(h.withSelect)((function(e){var t=e("core/editor"),n=t.isEditedPostNew,r=t.getCurrentPostId,o=t.getCurrentPostType;return{isNew:n(),postId:r(),postType:o()}})),Object(h.withDispatch)((function(e){return{trashPost:e("core/editor").trashPost}}))])((function(e){var t=e.isNew,n=e.postId,r=e.postType,o=Object(d.a)(e,["isNew","postId","postType"]);return t||!n?null:Object(p.createElement)(oo.Button,{className:"editor-post-trash",isDestructive:!0,isTertiary:!0,onClick:function(){return o.trashPost(n,r)}},Object(cn.__)("Move to trash"))}));var Sc=Object(h.withSelect)((function(e){var t=e("core/editor"),n=t.isEditedPostNew,r=t.getCurrentPostId,o=t.getCurrentPostType,i=e("core"),c=i.getPostType,a=i.canUser,s=r(),u=c(o()),l=(null==u?void 0:u.rest_base)||"";return{isNew:n(),postId:s,canUserDelete:!(!s||!l)&&a("delete",l,s)}}))((function(e){var t=e.isNew,n=e.postId,r=e.canUserDelete,o=e.children;return!t&&n&&r?o:null}));var kc=Object(m.compose)([Object(h.withSelect)((function(e){var t=e("core/editor"),n=t.getCurrentPost,r=t.getCurrentPostType;return{hasPublishAction:Object(b.get)(n(),["_links","wp:action-publish"],!1),postType:r()}}))])((function(e){var t=e.hasPublishAction;return(0,e.render)({canEdit:t})})),Ec=Object(p.createElement)(co.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(p.createElement)(co.Path,{d:"M12 3.2c-4.8 0-8.8 3.9-8.8 8.8 0 4.8 3.9 8.8 8.8 8.8 4.8 0 8.8-3.9 8.8-8.8 0-4.8-4-8.8-8.8-8.8zm0 16c-4 0-7.2-3.3-7.2-7.2C4.8 8 8 4.8 12 4.8s7.2 3.3 7.2 7.2c0 4-3.2 7.2-7.2 7.2zM11 17h2v-6h-2v6zm0-8h2V7h-2v2z"})),Tc=n(126);function Cc(){var e=Object(h.useSelect)((function(e){return e("core/editor").getEditedPostAttribute("content")})),t=Object(cn._x)("words","Word count type. Do not translate!");return Object(p.createElement)("span",{className:"word-count"},Object(Tc.count)(e,t))}function xc(){var e=Object(h.useSelect)((function(e){return e("core/editor").getEditedPostAttribute("content")}));return Object(Tc.count)(e,"characters_including_spaces")}var Bc=function(e){var t=e.hasOutlineItemsDisabled,n=e.onRequestClose,r=Object(h.useSelect)((function(e){var t=e("core/block-editor").getGlobalBlockCount;return{headingCount:t("core/heading"),paragraphCount:t("core/paragraph"),numberOfBlocks:t()}}),[]),o=r.headingCount,i=r.paragraphCount,c=r.numberOfBlocks;return Object(p.createElement)(p.Fragment,null,Object(p.createElement)("div",{className:"table-of-contents__wrapper",role:"note","aria-label":Object(cn.__)("Document Statistics"),tabIndex:"0"},Object(p.createElement)("ul",{role:"list",className:"table-of-contents__counts"},Object(p.createElement)("li",{className:"table-of-contents__count"},Object(cn.__)("Characters"),Object(p.createElement)("span",{className:"table-of-contents__number"},Object(p.createElement)(xc,null))),Object(p.createElement)("li",{className:"table-of-contents__count"},Object(cn.__)("Words"),Object(p.createElement)(Cc,null)),Object(p.createElement)("li",{className:"table-of-contents__count"},Object(cn.__)("Headings"),Object(p.createElement)("span",{className:"table-of-contents__number"},o)),Object(p.createElement)("li",{className:"table-of-contents__count"},Object(cn.__)("Paragraphs"),Object(p.createElement)("span",{className:"table-of-contents__number"},i)),Object(p.createElement)("li",{className:"table-of-contents__count"},Object(cn.__)("Blocks"),Object(p.createElement)("span",{className:"table-of-contents__number"},c)))),o>0&&Object(p.createElement)(p.Fragment,null,Object(p.createElement)("hr",null),Object(p.createElement)("h2",{className:"table-of-contents__title"},Object(cn.__)("Document Outline")),Object(p.createElement)($r,{onSelect:n,hasOutlineItemsDisabled:t})))};var Ac=Object(p.forwardRef)((function(e,t){var n=e.hasOutlineItemsDisabled,r=e.repositionDropdown,o=Object(d.a)(e,["hasOutlineItemsDisabled","repositionDropdown"]),i=Object(h.useSelect)((function(e){return!!e("core/block-editor").getBlockCount()}),[]);return Object(p.createElement)(oo.Dropdown,{position:r?"middle right right":"bottom",className:"table-of-contents",contentClassName:"table-of-contents__popover",renderToggle:function(e){var n=e.isOpen,r=e.onToggle;return Object(p.createElement)(oo.Button,Object(s.a)({},o,{ref:t,onClick:i?r:void 0,icon:Ec,"aria-expanded":n,"aria-haspopup":"true",label:Object(cn.__)("Details"),tooltipPosition:"bottom","aria-disabled":!i}))},renderContent:function(e){var t=e.onClose;return Object(p.createElement)(Bc,{onRequestClose:t,hasOutlineItemsDisabled:n})}})}));function Ic(){var e=Object(h.useSelect)((function(e){return function(){return(0,e("core").__experimentalGetDirtyEntityRecords)().length>0}}),[]),t=function(t){if(e())return t.returnValue=Object(cn.__)("You have unsaved changes. If you proceed, they will be lost."),t.returnValue};return Object(p.useEffect)((function(){return window.addEventListener("beforeunload",t),function(){window.removeEventListener("beforeunload",t)}}),[]),null}var Rc=n(146),Dc=Object(m.createHigherOrderComponent)((function(e){return Object(h.withRegistry)((function(t){var n=t.useSubRegistry,r=void 0===n||n,o=t.registry,c=Object(d.a)(t,["useSubRegistry","registry"]);if(!r)return Object(p.createElement)(e,c);var a=Object(p.useState)(null),s=Object(l.a)(a,2),u=s[0],b=s[1];return Object(p.useEffect)((function(){var e=Object(h.createRegistry)({"core/block-editor":i.storeConfig},o);e.registerStore("core/editor",Cr),b(e)}),[o]),u?Object(p.createElement)(h.RegistryProvider,{value:u},Object(p.createElement)(e,c)):null}))}),"withRegistryProvider"),Nc=n(47),Lc=n(154);function Uc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Fc(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Uc(Object(n),!0).forEach((function(t){Object(u.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Uc(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Mc(e){var t=e.additionalData,n=void 0===t?{}:t,r=e.allowedTypes,o=e.filesList,i=e.maxUploadFileSize,c=e.onError,a=void 0===c?b.noop:c,s=e.onFileChange,u=Object(h.select)("core/editor"),l=u.getCurrentPostId,d=u.getEditorSettings,p=d().allowedMimeTypes;i=i||d().maxUploadFileSize,Object(Lc.uploadMedia)({allowedTypes:r,filesList:o,onFileChange:s,additionalData:Fc({post:l()},n),maxUploadFileSize:i,onError:function(e){var t=e.message;return a(t)},wpAllowedMimeTypes:p})}function Vc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function zc(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Vc(Object(n),!0).forEach((function(t){Object(u.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Vc(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Hc=function(){var e=Object(Nc.a)(rn.a.mark((function e(t){var n,r,o,i,c,a,s,u,l,d,p,f=arguments;return rn.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=f.length>1&&void 0!==f[1]?f[1]:{},r=n.isInitialSuggestions,o=n.type,i=n.subtype,c=n.page,a=n.perPage,s=f.length>2&&void 0!==f[2]?f[2]:{},u=s.disablePostFormats,l=void 0!==u&&u,d=a||r?3:20,p=[],o&&"post"!==o||p.push(_()({path:Object(N.addQueryArgs)("/wp/v2/search",{search:t,page:c,per_page:d,type:"post",subtype:i})}).catch((function(){return[]}))),o&&"term"!==o||p.push(_()({path:Object(N.addQueryArgs)("/wp/v2/search",{search:t,page:c,per_page:d,type:"term",subtype:i})}).catch((function(){return[]}))),l||o&&"post-format"!==o||p.push(_()({path:Object(N.addQueryArgs)("/wp/v2/search",{search:t,page:c,per_page:d,type:"post-format",subtype:i})}).catch((function(){return[]}))),e.abrupt("return",Promise.all(p).then((function(e){return Object(b.map)(Object(b.flatten)(e).filter((function(e){return!!e.id})).slice(0,d),(function(e){return{id:e.id,url:e.url,title:Object(Vo.decodeEntities)(e.title)||Object(cn.__)("(no title)"),type:e.subtype||e.type}}))})));case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();var Wc=function(e,t){var n=Object(h.useSelect)((function(e){var t=e(xr),n=t.canUserUseUnfilteredHTML,r=t.isPostTitleSelected,o=e(c.store).canUser;return{canUseUnfilteredHTML:n(),reusableBlocks:e(c.store).getEntityRecords("postType","wp_block",{per_page:p.Platform.select({web:-1,native:100})}),hasUploadPermissions:Object(b.defaultTo)(o("create","media"),!0),isTitleSelected:r&&r()}}),[]),r=n.reusableBlocks,o=n.hasUploadPermissions,i=n.canUseUnfilteredHTML,a=n.isTitleSelected,s=Object(h.useDispatch)(xr).undo;return Object(p.useMemo)((function(){return zc(zc({},Object(b.pick)(e,["__experimentalBlockDirectory","__experimentalBlockPatternCategories","__experimentalBlockPatterns","__experimentalFeatures","__experimentalGlobalStylesBaseStyles","__experimentalGlobalStylesUserEntityId","__experimentalPreferredStyleVariations","__experimentalSetIsInserterOpened","alignWide","allowedBlockTypes","availableLegacyWidgets","bodyPlaceholder","codeEditingEnabled","colors","disableCustomColors","disableCustomFontSizes","disableCustomGradients","enableCustomLineHeight","enableCustomSpacing","enableCustomUnits","focusMode","fontSizes","gradients","hasFixedToolbar","hasReducedUI","imageDimensions","imageEditing","imageSizes","isRTL","keepCaretInsideBlock","maxWidth","onUpdateDefaultBlockStyles","styles","template","templateLock","titlePlaceholder"])),{},{mediaUpload:o?Mc:void 0,__experimentalReusableBlocks:r,__experimentalFetchLinkSuggestions:Object(b.partialRight)(Hc,e),__experimentalCanUserUseUnfilteredHTML:i,__experimentalUndo:s,__experimentalShouldInsertAtTheTop:a,outlineMode:t})}),[e,o,r,i,s,a,t])};var Gc=Dc((function(e){var t=e.__unstableTemplate,n=e.post,r=e.settings,o=e.recovery,a=e.initialEdits,s=e.children,u=Object(p.useMemo)((function(){return"wp_template"===n.type?{}:{postId:n.id,postType:n.type}}),[n.id,n.type]),d=Object(h.useSelect)((function(e){var t=e(xr),n=t.getEditorSelectionStart,r=t.getEditorSelectionEnd;return{isReady:(0,t.__unstableIsEditorReady)(),selectionStart:n(),selectionEnd:r()}}),[]),b=d.selectionEnd,f=d.selectionStart,m=d.isReady,v=null!=t?t:n,O=v.id,g=v.type,j=Object(c.useEntityBlockEditor)("postType",g,{id:O}),y=Object(l.a)(j,3),_=y[0],w=y[1],P=y[2],S=Wc(r,!!t),k=Object(h.useDispatch)(xr),E=k.updatePostLock,T=k.setupEditor,C=k.updateEditorSettings,x=k.__experimentalTearDownEditor,B=Object(h.useDispatch)(on.store).createWarningNotice;return Object(p.useLayoutEffect)((function(){if(!o)return E(r.postLock),T(n,a,r.template),r.autosave&&B(Object(cn.__)("There is an autosave of this post that is more recent than the version below."),{id:"autosave-exists",actions:[{label:Object(cn.__)("View the autosave"),url:r.autosave.editLink}]}),function(){x()}}),[]),Object(p.useEffect)((function(){C(r)}),[r]),m?Object(p.createElement)(c.EntityProvider,{kind:"root",type:"site"},Object(p.createElement)(c.EntityProvider,{kind:"postType",type:n.type,id:n.id},Object(p.createElement)(i.BlockContextProvider,{value:u},Object(p.createElement)(i.BlockEditorProvider,{value:_,onChange:P,onInput:w,selectionStart:f,selectionEnd:b,settings:S,useSubRegistry:!1},s,Object(p.createElement)(Rc.ReusableBlocksMenuItems,null))))):null})),qc=n(80),Kc=n.n(qc);function Qc(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=Object(p.forwardRef)((function(n,r){return U()("wp.editor."+e,{alternative:"wp.blockEditor."+e}),Object(p.createElement)(t,Object(s.a)({ref:r},n))}));return n.forEach((function(n){r[n]=Qc(e+"."+n,t[n])})),r}function $c(e,t){return function(){return U()("wp.editor."+e,{alternative:"wp.blockEditor."+e}),t.apply(void 0,arguments)}}var Yc=Qc("RichText",i.RichText,["Content"]);Yc.isEmpty=$c("RichText.isEmpty",i.RichText.isEmpty);var Xc=Qc("Autocomplete",i.Autocomplete),Jc=Qc("AlignmentToolbar",i.AlignmentToolbar),Zc=Qc("BlockAlignmentToolbar",i.BlockAlignmentToolbar),ea=Qc("BlockControls",i.BlockControls,["Slot"]),ta=Qc("BlockEdit",i.BlockEdit),na=Qc("BlockEditorKeyboardShortcuts",i.BlockEditorKeyboardShortcuts),ra=Qc("BlockFormatControls",i.BlockFormatControls,["Slot"]),oa=Qc("BlockIcon",i.BlockIcon),ia=Qc("BlockInspector",i.BlockInspector),ca=Qc("BlockList",i.BlockList),aa=Qc("BlockMover",i.BlockMover),sa=Qc("BlockNavigationDropdown",i.BlockNavigationDropdown),ua=Qc("BlockSelectionClearer",i.BlockSelectionClearer),la=Qc("BlockSettingsMenu",i.BlockSettingsMenu),da=Qc("BlockTitle",i.BlockTitle),pa=Qc("BlockToolbar",i.BlockToolbar),ba=Qc("ColorPalette",i.ColorPalette),fa=Qc("ContrastChecker",i.ContrastChecker),ha=Qc("CopyHandler",i.CopyHandler),ma=Qc("DefaultBlockAppender",i.DefaultBlockAppender),va=Qc("FontSizePicker",i.FontSizePicker),Oa=Qc("Inserter",i.Inserter),ga=Qc("InnerBlocks",i.InnerBlocks,["ButtonBlockAppender","DefaultBlockAppender","Content"]),ja=Qc("InspectorAdvancedControls",i.InspectorAdvancedControls,["Slot"]),ya=Qc("InspectorControls",i.InspectorControls,["Slot"]),_a=Qc("PanelColorSettings",i.PanelColorSettings),wa=Qc("PlainText",i.PlainText),Pa=Qc("RichTextShortcut",i.RichTextShortcut),Sa=Qc("RichTextToolbarButton",i.RichTextToolbarButton),ka=Qc("__unstableRichTextInputEvent",i.__unstableRichTextInputEvent),Ea=Qc("MediaPlaceholder",i.MediaPlaceholder),Ta=Qc("MediaUpload",i.MediaUpload),Ca=Qc("MediaUploadCheck",i.MediaUploadCheck),xa=Qc("MultiSelectScrollIntoView",i.MultiSelectScrollIntoView),Ba=Qc("NavigableToolbar",i.NavigableToolbar),Aa=Qc("ObserveTyping",i.ObserveTyping),Ia=Qc("PreserveScrollInReorder",i.PreserveScrollInReorder),Ra=Qc("SkipToSelectedBlock",i.SkipToSelectedBlock),Da=Qc("URLInput",i.URLInput),Na=Qc("URLInputButton",i.URLInputButton),La=Qc("URLPopover",i.URLPopover),Ua=Qc("Warning",i.Warning),Fa=Qc("WritingFlow",i.WritingFlow),Ma=$c("createCustomColorsHOC",i.createCustomColorsHOC),Va=$c("getColorClassName",i.getColorClassName),za=$c("getColorObjectByAttributeValues",i.getColorObjectByAttributeValues),Ha=$c("getColorObjectByColorValue",i.getColorObjectByColorValue),Wa=$c("getFontSize",i.getFontSize),Ga=$c("getFontSizeClass",i.getFontSizeClass),qa=$c("withColorContext",i.withColorContext),Ka=$c("withColors",i.withColors),Qa=$c("withFontSizes",i.withFontSizes)},46:function(e,t){e.exports=window.wp.keyboardShortcuts},47:function(e,t,n){"use strict";function r(e,t,n,r,o,i,c){try{var a=e[i](c),s=a.value}catch(e){return void n(e)}a.done?t(s):Promise.resolve(s).then(r,o)}function o(e){return function(){var t=this,n=arguments;return new Promise((function(o,i){var c=e.apply(t,n);function a(e){r(c,o,i,a,s,"next",e)}function s(e){r(c,o,i,a,s,"throw",e)}a(void 0)}))}}n.d(t,"a",(function(){return o}))},49:function(e,t){e.exports=window.wp.dataControls},5:function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,"a",(function(){return r}))},50:function(e,t){e.exports=window.wp.apiFetch},51:function(e,t){e.exports=window.wp.notices},52:function(e,t,n){"use strict";function r(e,t){return(r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}n.d(t,"a",(function(){return r}))},57:function(e,t){e.exports=window.wp.coreData},6:function(e,t){e.exports=window.wp.blockEditor},64:function(e,t){e.exports=window.wp.htmlEntities},69:function(e,t){e.exports=window.wp.date},7:function(e,t){e.exports=window.wp.primitives},8:function(e,t,n){"use strict";function r(){return(r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}n.d(t,"a",(function(){return r}))},80:function(e,t){e.exports=window.wp.serverSideRender},9:function(e,t){e.exports=window.wp.blocks},91:function(e,t,n){"use strict";t.__esModule=!0;var r=n(186);t.default=r.TextareaAutosize}});


Generated: Sat Mar 6 01:00:04 2021 Cross-referenced by PHPXref 0.7.1