WordPress/wp-includes/js/dist/editor.min.js
Sergey Biryukov a9490c4639 Editor: Update packages for WordPress 5.6 RC2.
The following package versions were changed:

@wordpress/block-directory: 1.17.4 -> 1.17.5
@wordpress/block-editor: 5.1.3 -> 5.1.4
@wordpress/block-library: 2.26.4 -> 2.26.5
@wordpress/blocks: 6.24.1 -> 6.24.2
@wordpress/components: 11.1.1 -> 11.1.2
@wordpress/core-data: 2.24.1 -> 2.24.2
@wordpress/edit-post: 3.25.4 -> 3.25.5
@wordpress/editor: 9.24.3 -> 9.24.4
@wordpress/format-library: 1.25.3 -> 1.25.4
@wordpress/list-reusable-blocks: 1.24.1 -> 1.24.2
@wordpress/nux: 3.23.1 -> 3.23.2
@wordpress/reusable-blocks: 1.0.3 -> 1.0.4
@wordpress/server-side-render: 1.19.1 -> 1.19.2

See https://github.com/WordPress/gutenberg/pull/27366 for the list of fixed bugs.

Props isabel_brison.
Fixes #51902.
Built from https://develop.svn.wordpress.org/trunk@49718


git-svn-id: http://core.svn.wordpress.org/trunk@49441 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-12-01 12:19:43 +00:00

12 lines
171 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*! This file is auto-generated */
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=462)}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},10:function(e,t){!function(){e.exports=this.wp.compose}()},100:function(e,t,n){"use strict";t.__esModule=!0;var r=n(180);t.default=r.default},101:function(e,t){!function(){e.exports=this.wp.viewport}()},106:function(e,t){!function(){e.exports=this.wp.autop}()},11:function(e,t){!function(){e.exports=this.wp.blocks}()},12: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)()}},121:function(e,t){!function(){e.exports=this.wp.reusableBlocks}()},128:function(e,t){!function(){e.exports=this.wp.wordcount}()},13:function(e,t){!function(){e.exports=this.React}()},14:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(43);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}},141:function(e,t,n){"use strict";var r=n(5),o=n(14),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))}},142:function(e,t,n){"use strict";var r=n(143);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}},143:function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},155:function(e,t){!function(){e.exports=this.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,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}))},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,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(27);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.")}()}},18:function(e,t){!function(){e.exports=this.wp.keycodes}()},180: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(13),s=n(28),u=n(181),l=n(182),d=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={lineHeight:null},t.dispatchEvent=function(e){var n=document.createEvent("Event");n.initEvent(e,!0,!1),t.textarea.dispatchEvent(n)},t.updateLineHeight=function(){t.setState({lineHeight:l(t.textarea)})},t.onChange=function(e){var n=t.props.onChange;t.currentValue=e.currentTarget.value,n&&n(e)},t.saveDOMNodeRef=function(e){var n=t.props.innerRef;n&&n(e),t.textarea=e},t.getLocals=function(){var e=t,n=e.props,r=(n.onResize,n.maxRows),o=(n.onChange,n.style),a=(n.innerRef,c(n,["onResize","maxRows","onChange","style","innerRef"])),s=e.state.lineHeight,u=e.saveDOMNodeRef,l=r&&s?s*r:null;return i({},a,{saveDOMNodeRef:u,style:l?i({},o,{maxHeight:l}):o,onChange:t.onChange})},t}return o(t,e),t.prototype.componentDidMount=function(){var e=this,t=this.props,n=t.onResize;"number"==typeof t.maxRows&&this.updateLineHeight(),setTimeout((function(){return u(e.textarea)})),n&&this.textarea.addEventListener("autosize:resized",n)},t.prototype.componentWillUnmount=function(){var e=this.props.onResize;e&&this.textarea.removeEventListener("autosize:resized",e),this.dispatchEvent("autosize:destroy")},t.prototype.render=function(){var e=this.getLocals(),t=e.children,n=e.saveDOMNodeRef,r=c(e,["children","saveDOMNodeRef"]);return a.createElement("textarea",i({},r,{ref:n}),t)},t.prototype.componentDidUpdate=function(e){this.props.value===this.currentValue&&this.props.rows===e.rows||this.dispatchEvent("autosize:update")},t.defaultProps={rows:1},t.propTypes={rows:s.number,maxRows:s.number,onResize:s.func,innerRef:s.func},t}(a.Component);t.default=d},181:function(e,t,n){var r,o,i;
/*!
autosize 4.0.2
license: MIT
http://www.jacklmoore.com/autosize
*/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)},182:function(e,t,n){var r=n(183);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}},183: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){!function(){e.exports=this.lodash}()},20:function(e,t){!function(){e.exports=this.regeneratorRuntime}()},21: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}))},22: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}))},23:function(e,t,n){"use strict";function r(e,t){return(r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}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&&r(e,t)}n.d(t,"a",(function(){return o}))},24:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(40),o=n(16);function i(e,t){return!t||"object"!==Object(r.a)(t)&&"function"!=typeof t?Object(o.a)(e):t}},25:function(e,t){!function(){e.exports=this.wp.richText}()},27: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}))},28:function(e,t,n){e.exports=n(142)()},293:function(e,t,n){e.exports=n(444)},3:function(e,t){!function(){e.exports=this.wp.components}()},30:function(e,t){!function(){e.exports=this.wp.url}()},31:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(27);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}}},319: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){!function(){e.exports=this.wp.dataControls}()},33:function(e,t){!function(){e.exports=this.wp.hooks}()},36:function(e,t){!function(){e.exports=this.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){!function(){e.exports=this.wp.data}()},40: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}))},43: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}))},444:function(e,t,n){"use strict";var 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};var o=[];function i(e,t){return e.optimist&&e.optimist.id===t}function c(e,t){if(!e||"object"!=typeof e||Array.isArray(e))throw new TypeError('Error while handling "'+t.type+'": Optimist requires that state is always a plain object.')}function a(e){if(e){var t=e.optimist;return{optimist:void 0===t?o:t,innerState:function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["optimist"])}}return{optimist:o,innerState:e}}e.exports=function(e){function t(t,n,o){return t.length&&(t=t.concat([{action:o}])),c(n=e(n,o),o),r({optimist:t},n)}return function(n,o){if(o.optimist)switch(o.optimist.type){case"BEGIN":return function(t,n){var o=a(t),i=o.optimist,s=o.innerState;return i=i.concat([{beforeState:s,action:n}]),c(s=e(s,n),n),r({optimist:i},s)}(n,o);case"COMMIT":return function(e,n){var r=a(e),o=r.optimist,c=r.innerState,s=[],u=!1,l=!1;return o.forEach((function(e){u?e.beforeState&&i(e.action,n.optimist.id)?(l=!0,s.push({action:e.action})):s.push(e):e.beforeState&&!i(e.action,n.optimist.id)?(u=!0,s.push(e)):e.beforeState&&i(e.action,n.optimist.id)&&(l=!0)})),l||console.error('Cannot commit transaction with id "'+n.optimist.id+'" because it does not exist'),t(o=s,c,n)}(n,o);case"REVERT":return function(n,r){var o=a(n),s=o.optimist,u=o.innerState,l=[],d=!1,p=!1,b=u;return s.forEach((function(t){t.beforeState&&i(t.action,r.optimist.id)&&(b=t.beforeState,p=!0),i(t.action,r.optimist.id)||(t.beforeState&&(d=!0),d&&(p&&t.beforeState?l.push({beforeState:b,action:t.action}):l.push(t)),p&&(b=e(b,t.action),c(u,r)))})),p||console.error('Cannot revert transaction with id "'+r.optimist.id+'" because it does not exist'),t(s=l,b,r)}(n,o)}var s=a(n),u=s.optimist,l=s.innerState;if(n&&!u.length){var d=e(l,o);return d===l?n:(c(d,o),r({optimist:u},d))}return t(u,l,o)}},e.exports.BEGIN="BEGIN",e.exports.COMMIT="COMMIT",e.exports.REVERT="REVERT"},45: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}))},462:function(e,t,n){"use strict";n.r(t),n.d(t,"userAutocompleter",(function(){return Ar})),n.d(t,"AutosaveMonitor",(function(){return Vr})),n.d(t,"DocumentOutline",(function(){return Jr})),n.d(t,"DocumentOutlineCheck",(function(){return Zr})),n.d(t,"VisualEditorGlobalKeyboardShortcuts",(function(){return no})),n.d(t,"EditorGlobalKeyboardShortcuts",(function(){return ro})),n.d(t,"TextEditorGlobalKeyboardShortcuts",(function(){return oo})),n.d(t,"EditorKeyboardShortcutsRegister",(function(){return io})),n.d(t,"EditorHistoryRedo",(function(){return lo})),n.d(t,"EditorHistoryUndo",(function(){return bo})),n.d(t,"EditorNotices",(function(){return ho})),n.d(t,"EntitiesSavedStates",(function(){return Po})),n.d(t,"ErrorBoundary",(function(){return wo})),n.d(t,"LocalAutosaveMonitor",(function(){return Bo})),n.d(t,"PageAttributesCheck",(function(){return Io})),n.d(t,"PageAttributesOrder",(function(){return Do})),n.d(t,"PageAttributesParent",(function(){return Mo})),n.d(t,"PageTemplate",(function(){return Vo})),n.d(t,"PostAuthor",(function(){return Ho})),n.d(t,"PostAuthorCheck",(function(){return zo})),n.d(t,"PostComments",(function(){return Wo})),n.d(t,"PostExcerpt",(function(){return Go})),n.d(t,"PostExcerptCheck",(function(){return Ko})),n.d(t,"PostFeaturedImage",(function(){return ti})),n.d(t,"PostFeaturedImageCheck",(function(){return Qo})),n.d(t,"PostFormat",(function(){return oi})),n.d(t,"PostFormatCheck",(function(){return ni})),n.d(t,"PostLastRevision",(function(){return ai})),n.d(t,"PostLastRevisionCheck",(function(){return ci})),n.d(t,"PostLockedModal",(function(){return bi})),n.d(t,"PostPendingStatus",(function(){return hi})),n.d(t,"PostPendingStatusCheck",(function(){return fi})),n.d(t,"PostPingbacks",(function(){return mi})),n.d(t,"PostPreviewButton",(function(){return li})),n.d(t,"PostPublishButton",(function(){return ji})),n.d(t,"PostPublishButtonLabel",(function(){return vi})),n.d(t,"PostPublishPanel",(function(){return Zi})),n.d(t,"PostSavedState",(function(){return ic})),n.d(t,"PostSchedule",(function(){return wi})),n.d(t,"PostScheduleCheck",(function(){return cc})),n.d(t,"PostScheduleLabel",(function(){return Ci})),n.d(t,"PostSlug",(function(){return lc})),n.d(t,"PostSlugCheck",(function(){return ac})),n.d(t,"PostSticky",(function(){return pc})),n.d(t,"PostStickyCheck",(function(){return dc})),n.d(t,"PostSwitchToDraftButton",(function(){return oc})),n.d(t,"PostTaxonomies",(function(){return gc})),n.d(t,"PostTaxonomiesCheck",(function(){return jc})),n.d(t,"PostTextEditor",(function(){return kc})),n.d(t,"PostTitle",(function(){return Tc})),n.d(t,"PostTrash",(function(){return xc})),n.d(t,"PostTrashCheck",(function(){return Bc})),n.d(t,"PostTypeSupportCheck",(function(){return Ao})),n.d(t,"PostVisibility",(function(){return Si})),n.d(t,"PostVisibilityLabel",(function(){return Ei})),n.d(t,"PostVisibilityCheck",(function(){return Ic})),n.d(t,"TableOfContents",(function(){return Uc})),n.d(t,"UnsavedChangesWarning",(function(){return Fc})),n.d(t,"WordCount",(function(){return Dc})),n.d(t,"EditorProvider",(function(){return Jc})),n.d(t,"ServerSideRender",(function(){return ea.a})),n.d(t,"RichText",(function(){return ra})),n.d(t,"Autocomplete",(function(){return oa})),n.d(t,"AlignmentToolbar",(function(){return ia})),n.d(t,"BlockAlignmentToolbar",(function(){return ca})),n.d(t,"BlockControls",(function(){return aa})),n.d(t,"BlockEdit",(function(){return sa})),n.d(t,"BlockEditorKeyboardShortcuts",(function(){return ua})),n.d(t,"BlockFormatControls",(function(){return la})),n.d(t,"BlockIcon",(function(){return da})),n.d(t,"BlockInspector",(function(){return pa})),n.d(t,"BlockList",(function(){return ba})),n.d(t,"BlockMover",(function(){return fa})),n.d(t,"BlockNavigationDropdown",(function(){return ha})),n.d(t,"BlockSelectionClearer",(function(){return ma})),n.d(t,"BlockSettingsMenu",(function(){return va})),n.d(t,"BlockTitle",(function(){return Oa})),n.d(t,"BlockToolbar",(function(){return ga})),n.d(t,"ColorPalette",(function(){return ja})),n.d(t,"ContrastChecker",(function(){return ya})),n.d(t,"CopyHandler",(function(){return _a})),n.d(t,"DefaultBlockAppender",(function(){return ka})),n.d(t,"FontSizePicker",(function(){return Pa})),n.d(t,"Inserter",(function(){return Sa})),n.d(t,"InnerBlocks",(function(){return Ea})),n.d(t,"InspectorAdvancedControls",(function(){return wa})),n.d(t,"InspectorControls",(function(){return Ca})),n.d(t,"PanelColorSettings",(function(){return Ta})),n.d(t,"PlainText",(function(){return xa})),n.d(t,"RichTextShortcut",(function(){return Ba})),n.d(t,"RichTextToolbarButton",(function(){return Ia})),n.d(t,"__unstableRichTextInputEvent",(function(){return Aa})),n.d(t,"MediaPlaceholder",(function(){return Ra})),n.d(t,"MediaUpload",(function(){return Da})),n.d(t,"MediaUploadCheck",(function(){return Na})),n.d(t,"MultiSelectScrollIntoView",(function(){return La})),n.d(t,"NavigableToolbar",(function(){return Ua})),n.d(t,"ObserveTyping",(function(){return Fa})),n.d(t,"PreserveScrollInReorder",(function(){return Ma})),n.d(t,"SkipToSelectedBlock",(function(){return Va})),n.d(t,"URLInput",(function(){return za})),n.d(t,"URLInputButton",(function(){return Ha})),n.d(t,"URLPopover",(function(){return Wa})),n.d(t,"Warning",(function(){return Ga})),n.d(t,"WritingFlow",(function(){return Ka})),n.d(t,"createCustomColorsHOC",(function(){return qa})),n.d(t,"getColorClassName",(function(){return Qa})),n.d(t,"getColorObjectByAttributeValues",(function(){return $a})),n.d(t,"getColorObjectByColorValue",(function(){return Ya})),n.d(t,"getFontSize",(function(){return Xa})),n.d(t,"getFontSizeClass",(function(){return Ja})),n.d(t,"withColorContext",(function(){return Za})),n.d(t,"withColors",(function(){return es})),n.d(t,"withFontSizes",(function(){return ts})),n.d(t,"mediaUpload",(function(){return Gc})),n.d(t,"cleanForSlug",(function(){return V})),n.d(t,"storeConfig",(function(){return Pr})),n.d(t,"transformStyles",(function(){return i.transformStyles}));var r={};n.r(r),n.d(r,"hasEditorUndo",(function(){return K})),n.d(r,"hasEditorRedo",(function(){return q})),n.d(r,"isEditedPostNew",(function(){return Q})),n.d(r,"hasChangedContent",(function(){return $})),n.d(r,"isEditedPostDirty",(function(){return Y})),n.d(r,"hasNonPostEntityChanges",(function(){return X})),n.d(r,"isCleanNewPost",(function(){return J})),n.d(r,"getCurrentPost",(function(){return Z})),n.d(r,"getCurrentPostType",(function(){return ee})),n.d(r,"getCurrentPostId",(function(){return te})),n.d(r,"getCurrentPostRevisionsCount",(function(){return ne})),n.d(r,"getCurrentPostLastRevisionId",(function(){return re})),n.d(r,"getPostEdits",(function(){return oe})),n.d(r,"getReferenceByDistinctEdits",(function(){return ie})),n.d(r,"getCurrentPostAttribute",(function(){return ce})),n.d(r,"getEditedPostAttribute",(function(){return ae})),n.d(r,"getAutosaveAttribute",(function(){return se})),n.d(r,"getEditedPostVisibility",(function(){return ue})),n.d(r,"isCurrentPostPending",(function(){return le})),n.d(r,"isCurrentPostPublished",(function(){return de})),n.d(r,"isCurrentPostScheduled",(function(){return pe})),n.d(r,"isEditedPostPublishable",(function(){return be})),n.d(r,"isEditedPostSaveable",(function(){return fe})),n.d(r,"isEditedPostEmpty",(function(){return he})),n.d(r,"isEditedPostAutosaveable",(function(){return me})),n.d(r,"getAutosave",(function(){return ve})),n.d(r,"hasAutosave",(function(){return Oe})),n.d(r,"isEditedPostBeingScheduled",(function(){return ge})),n.d(r,"isEditedPostDateFloating",(function(){return je})),n.d(r,"isSavingPost",(function(){return ye})),n.d(r,"didPostSaveRequestSucceed",(function(){return _e})),n.d(r,"didPostSaveRequestFail",(function(){return ke})),n.d(r,"isAutosavingPost",(function(){return Pe})),n.d(r,"isPreviewingPost",(function(){return Se})),n.d(r,"getEditedPostPreviewLink",(function(){return Ee})),n.d(r,"getSuggestedPostFormat",(function(){return we})),n.d(r,"getBlocksForSerialization",(function(){return Ce})),n.d(r,"getEditedPostContent",(function(){return Te})),n.d(r,"getStateBeforeOptimisticTransaction",(function(){return xe})),n.d(r,"isPublishingPost",(function(){return Be})),n.d(r,"isPermalinkEditable",(function(){return Ie})),n.d(r,"getPermalink",(function(){return Ae})),n.d(r,"getEditedPostSlug",(function(){return Re})),n.d(r,"getPermalinkParts",(function(){return De})),n.d(r,"inSomeHistory",(function(){return Ne})),n.d(r,"isPostLocked",(function(){return Le})),n.d(r,"isPostSavingLocked",(function(){return Ue})),n.d(r,"isPostAutosavingLocked",(function(){return Fe})),n.d(r,"isPostLockTakeover",(function(){return Me})),n.d(r,"getPostLockUser",(function(){return Ve})),n.d(r,"getActivePostLock",(function(){return ze})),n.d(r,"canUserUseUnfilteredHTML",(function(){return He})),n.d(r,"isPublishSidebarEnabled",(function(){return We})),n.d(r,"getEditorBlocks",(function(){return Ge})),n.d(r,"getEditorSelectionStart",(function(){return Ke})),n.d(r,"getEditorSelectionEnd",(function(){return qe})),n.d(r,"__unstableIsEditorReady",(function(){return Qe})),n.d(r,"getEditorSettings",(function(){return $e})),n.d(r,"getBlockName",(function(){return Xe})),n.d(r,"isBlockValid",(function(){return Je})),n.d(r,"getBlockAttributes",(function(){return Ze})),n.d(r,"getBlock",(function(){return et})),n.d(r,"getBlocks",(function(){return tt})),n.d(r,"__unstableGetBlockWithoutInnerBlocks",(function(){return nt})),n.d(r,"getClientIdsOfDescendants",(function(){return rt})),n.d(r,"getClientIdsWithDescendants",(function(){return ot})),n.d(r,"getGlobalBlockCount",(function(){return it})),n.d(r,"getBlocksByClientId",(function(){return ct})),n.d(r,"getBlockCount",(function(){return at})),n.d(r,"getBlockSelectionStart",(function(){return st})),n.d(r,"getBlockSelectionEnd",(function(){return ut})),n.d(r,"getSelectedBlockCount",(function(){return lt})),n.d(r,"hasSelectedBlock",(function(){return dt})),n.d(r,"getSelectedBlockClientId",(function(){return pt})),n.d(r,"getSelectedBlock",(function(){return bt})),n.d(r,"getBlockRootClientId",(function(){return ft})),n.d(r,"getBlockHierarchyRootClientId",(function(){return ht})),n.d(r,"getAdjacentBlockClientId",(function(){return mt})),n.d(r,"getPreviousBlockClientId",(function(){return vt})),n.d(r,"getNextBlockClientId",(function(){return Ot})),n.d(r,"getSelectedBlocksInitialCaretPosition",(function(){return gt})),n.d(r,"getMultiSelectedBlockClientIds",(function(){return jt})),n.d(r,"getMultiSelectedBlocks",(function(){return yt})),n.d(r,"getFirstMultiSelectedBlockClientId",(function(){return _t})),n.d(r,"getLastMultiSelectedBlockClientId",(function(){return kt})),n.d(r,"isFirstMultiSelectedBlock",(function(){return Pt})),n.d(r,"isBlockMultiSelected",(function(){return St})),n.d(r,"isAncestorMultiSelected",(function(){return Et})),n.d(r,"getMultiSelectedBlocksStartClientId",(function(){return wt})),n.d(r,"getMultiSelectedBlocksEndClientId",(function(){return Ct})),n.d(r,"getBlockOrder",(function(){return Tt})),n.d(r,"getBlockIndex",(function(){return xt})),n.d(r,"isBlockSelected",(function(){return Bt})),n.d(r,"hasSelectedInnerBlock",(function(){return It})),n.d(r,"isBlockWithinSelection",(function(){return At})),n.d(r,"hasMultiSelection",(function(){return Rt})),n.d(r,"isMultiSelecting",(function(){return Dt})),n.d(r,"isSelectionEnabled",(function(){return Nt})),n.d(r,"getBlockMode",(function(){return Lt})),n.d(r,"isTyping",(function(){return Ut})),n.d(r,"isCaretWithinFormattedText",(function(){return Ft})),n.d(r,"getBlockInsertionPoint",(function(){return Mt})),n.d(r,"isBlockInsertionPointVisible",(function(){return Vt})),n.d(r,"isValidTemplate",(function(){return zt})),n.d(r,"getTemplate",(function(){return Ht})),n.d(r,"getTemplateLock",(function(){return Wt})),n.d(r,"canInsertBlockType",(function(){return Gt})),n.d(r,"getInserterItems",(function(){return Kt})),n.d(r,"hasInserterItems",(function(){return qt})),n.d(r,"getBlockListSettings",(function(){return Qt}));var o={};n.r(o),n.d(o,"setupEditor",(function(){return hn})),n.d(o,"__experimentalTearDownEditor",(function(){return mn})),n.d(o,"resetPost",(function(){return vn})),n.d(o,"resetAutosave",(function(){return On})),n.d(o,"__experimentalRequestPostUpdateStart",(function(){return gn})),n.d(o,"__experimentalRequestPostUpdateFinish",(function(){return jn})),n.d(o,"updatePost",(function(){return yn})),n.d(o,"setupEditorState",(function(){return _n})),n.d(o,"editPost",(function(){return kn})),n.d(o,"__experimentalOptimisticUpdatePost",(function(){return Pn})),n.d(o,"savePost",(function(){return Sn})),n.d(o,"refreshPost",(function(){return En})),n.d(o,"trashPost",(function(){return wn})),n.d(o,"autosave",(function(){return Cn})),n.d(o,"redo",(function(){return Tn})),n.d(o,"undo",(function(){return xn})),n.d(o,"createUndoLevel",(function(){return Bn})),n.d(o,"updatePostLock",(function(){return In})),n.d(o,"enablePublishSidebar",(function(){return An})),n.d(o,"disablePublishSidebar",(function(){return Rn})),n.d(o,"lockPostSaving",(function(){return Dn})),n.d(o,"unlockPostSaving",(function(){return Nn})),n.d(o,"lockPostAutosaving",(function(){return Ln})),n.d(o,"unlockPostAutosaving",(function(){return Un})),n.d(o,"resetEditorBlocks",(function(){return Fn})),n.d(o,"updateEditorSettings",(function(){return Mn})),n.d(o,"resetBlocks",(function(){return zn})),n.d(o,"receiveBlocks",(function(){return Hn})),n.d(o,"updateBlock",(function(){return Wn})),n.d(o,"updateBlockAttributes",(function(){return Gn})),n.d(o,"selectBlock",(function(){return Kn})),n.d(o,"startMultiSelect",(function(){return qn})),n.d(o,"stopMultiSelect",(function(){return Qn})),n.d(o,"multiSelect",(function(){return $n})),n.d(o,"clearSelectedBlock",(function(){return Yn})),n.d(o,"toggleSelection",(function(){return Xn})),n.d(o,"replaceBlocks",(function(){return Jn})),n.d(o,"replaceBlock",(function(){return Zn})),n.d(o,"moveBlocksDown",(function(){return er})),n.d(o,"moveBlocksUp",(function(){return tr})),n.d(o,"moveBlockToPosition",(function(){return nr})),n.d(o,"insertBlock",(function(){return rr})),n.d(o,"insertBlocks",(function(){return or})),n.d(o,"showInsertionPoint",(function(){return ir})),n.d(o,"hideInsertionPoint",(function(){return cr})),n.d(o,"setTemplateValidity",(function(){return ar})),n.d(o,"synchronizeTemplate",(function(){return sr})),n.d(o,"mergeBlocks",(function(){return ur})),n.d(o,"removeBlocks",(function(){return lr})),n.d(o,"removeBlock",(function(){return dr})),n.d(o,"toggleBlockMode",(function(){return pr})),n.d(o,"startTyping",(function(){return br})),n.d(o,"stopTyping",(function(){return fr})),n.d(o,"enterFormattedText",(function(){return hr})),n.d(o,"exitFormattedText",(function(){return mr})),n.d(o,"insertDefaultBlock",(function(){return vr})),n.d(o,"updateBlockListSettings",(function(){return Or}));var i=n(6),c=n(11),a=n(83),s=n(53),u=(n(92),n(121)),l=n(25),d=(n(101),n(5)),p=n(4),b=n(32),f=n(40),h=n(293),m=n.n(h),v=n(2);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(d.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}var j={insertUsage:{},isPublishSidebarEnabled:!0},y=g(g({},i.SETTINGS_DEFAULTS),{},{richEditingEnabled:!0,codeEditingEnabled:!0,enableCustomFields:!1});function _(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 k(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_(Object(n),!0).forEach((function(t){Object(d.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function P(e){return e&&"object"===Object(f.a)(e)&&"raw"in e?e.raw:e}var S=m()(Object(p.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":case"UPDATE_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":case"UPDATE_POST":return t.post.type}return e},preferences:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:j,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"ENABLE_PUBLISH_SIDEBAR":return k(k({},e),{},{isPublishSidebarEnabled:!0});case"DISABLE_PUBLISH_SIDEBAR":return k(k({},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 k(k({},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 k(k({},e),{},Object(d.a)({},t.lockName,!0));case"UNLOCK_POST_SAVING":return Object(v.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]:y,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"UPDATE_EDITOR_SETTINGS":return k(k({},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 k(k({},e),{},Object(d.a)({},t.lockName,!0));case"UNLOCK_POST_AUTOSAVING":return Object(v.omit)(e,t.lockName)}return e}})),E=n(12),w=n(75),C=n(30),T=n(36),x=n.n(T),B=n(0),I=new Set(["meta"]),A="core/editor",R=/%(?:postname|pagename)%/,D=["title","excerpt","content"],N=n(60),L=n.n(N),U=n(106),F=L()((function(e){1===e.length&&Object(c.isUnmodifiedDefaultBlock)(e[0])&&(e=[]);var t=Object(c.serialize)(e);return 1===e.length&&e[0].name===Object(c.getFreeformContentHandlerName)()&&(t=Object(U.removep)(t)),t}),{maxSize:1});function M(e,t){return Object(C.addQueryArgs)(e,t)}function V(e){return e?Object(v.trim)(Object(v.deburr)(e).replace(/[\s\./]+/g,"-").replace(/[^\w-]+/g,"").toLowerCase(),"-"):""}function z(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 H(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?z(Object(n),!0).forEach((function(t){Object(d.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):z(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var W={},G=[],K=Object(p.createRegistrySelector)((function(e){return function(){return e("core").hasUndo()}})),q=Object(p.createRegistrySelector)((function(e){return function(){return e("core").hasRedo()}}));function Q(e){return"auto-draft"===Z(e).status}function $(e){var t=oe(e);return"blocks"in t||"content"in t}var Y=Object(p.createRegistrySelector)((function(e){return function(t){var n=ee(t),r=te(t);return!!e("core").hasEditsForEntityRecord("postType",n,r)}})),X=Object(p.createRegistrySelector)((function(e){return function(t){if(!$e(t).__experimentalEnableFullSiteEditing)return!1;var n=e("core").__experimentalGetDirtyEntityRecords(),r=Z(t),o=r.type,i=r.id;return Object(v.some)(n,(function(e){return"postType"!==e.kind||e.name!==o||e.key!==i}))}}));function J(e){return!Y(e)&&Q(e)}var Z=Object(p.createRegistrySelector)((function(e){return function(t){var n=te(t),r=ee(t),o=e("core").getRawEntityRecord("postType",r,n);return o||W}}));function ee(e){return e.postType}function te(e){return e.postId}function ne(e){return Object(v.get)(Z(e),["_links","version-history",0,"count"],0)}function re(e){return Object(v.get)(Z(e),["_links","predecessor-version",0,"id"],null)}var oe=Object(p.createRegistrySelector)((function(e){return function(t){var n=ee(t),r=te(t);return e("core").getEntityRecordEdits("postType",n,r)||W}})),ie=Object(p.createRegistrySelector)((function(e){return function(){return x()("`wp.data.select( 'core/editor' ).getReferenceByDistinctEdits`",{alternative:"`wp.data.select( 'core' ).getReferenceByDistinctEdits`"}),e("core").getReferenceByDistinctEdits()}}));function ce(e,t){switch(t){case"type":return ee(e);case"id":return te(e);default:var n=Z(e);if(!n.hasOwnProperty(t))break;return P(n[t])}}function ae(e,t){switch(t){case"content":return Te(e)}var n=oe(e);return n.hasOwnProperty(t)?I.has(t)?function(e,t){var n=oe(e);return n.hasOwnProperty(t)?H(H({},ce(e,t)),n[t]):ce(e,t)}(e,t):n[t]:ce(e,t)}var se=Object(p.createRegistrySelector)((function(e){return function(t,n){if(Object(v.includes)(D,n)||"preview_link"===n){var r=ee(t),o=te(t),i=Object(v.get)(e("core").getCurrentUser(),["id"]),c=e("core").getAutosave(r,o,i);return c?P(c[n]):void 0}}}));function ue(e){return"private"===ae(e,"status")?"private":ae(e,"password")?"password":"public"}function le(e){return"pending"===Z(e).status}function de(e,t){var n=t||Z(e);return-1!==["publish","private"].indexOf(n.status)||"future"===n.status&&!Object(w.isInTheFuture)(new Date(Number(Object(w.getDate)(n.date))-6e4))}function pe(e){return"future"===Z(e).status&&!de(e)}function be(e){var t=Z(e);return Y(e)||-1===["publish","private","future"].indexOf(t.status)}function fe(e){return!ye(e)&&(!!ae(e,"title")||!!ae(e,"excerpt")||!he(e)||"native"===B.Platform.OS)}function he(e){var t=Ge(e);if(t.length){if(t.length>1)return!1;var n=t[0].name;if(n!==Object(c.getDefaultBlockName)()&&n!==Object(c.getFreeformContentHandlerName)())return!1}return!Te(e)}var me=Object(p.createRegistrySelector)((function(e){return function(t){if(!fe(t))return!1;if(Fe(t))return!1;var n=ee(t),r=te(t),o=e("core").hasFetchedAutosaves(n,r),i=Object(v.get)(e("core").getCurrentUser(),["id"]),c=e("core").getAutosave(n,r,i);return!!o&&(!c||(!!$(t)||["title","excerpt"].some((function(e){return P(c[e])!==ae(t,e)}))))}})),ve=Object(p.createRegistrySelector)((function(e){return function(t){x()("`wp.data.select( 'core/editor' ).getAutosave()`",{alternative:"`wp.data.select( 'core' ).getAutosave( postType, postId, userId )`",plugin:"Gutenberg"});var n=ee(t),r=te(t),o=Object(v.get)(e("core").getCurrentUser(),["id"]),i=e("core").getAutosave(n,r,o);return Object(v.mapValues)(Object(v.pick)(i,D),P)}})),Oe=Object(p.createRegistrySelector)((function(e){return function(t){x()("`wp.data.select( 'core/editor' ).hasAutosave()`",{alternative:"`!! wp.data.select( 'core' ).getAutosave( postType, postId, userId )`",plugin:"Gutenberg"});var n=ee(t),r=te(t),o=Object(v.get)(e("core").getCurrentUser(),["id"]);return!!e("core").getAutosave(n,r,o)}}));function ge(e){var t=ae(e,"date"),n=new Date(Number(Object(w.getDate)(t))-6e4);return Object(w.isInTheFuture)(n)}function je(e){var t=ae(e,"date"),n=ae(e,"modified"),r=ae(e,"status");return("draft"===r||"auto-draft"===r||"pending"===r)&&(t===n||null===t)}var ye=Object(p.createRegistrySelector)((function(e){return function(t){var n=ee(t),r=te(t);return e("core").isSavingEntityRecord("postType",n,r)}})),_e=Object(p.createRegistrySelector)((function(e){return function(t){var n=ee(t),r=te(t);return!e("core").getLastEntitySaveError("postType",n,r)}})),ke=Object(p.createRegistrySelector)((function(e){return function(t){var n=ee(t),r=te(t);return!!e("core").getLastEntitySaveError("postType",n,r)}}));function Pe(e){return!!ye(e)&&!!Object(v.get)(e.saving,["options","isAutosave"])}function Se(e){return!!ye(e)&&!!e.saving.options.isPreview}function Ee(e){if(!e.saving.pending&&!ye(e)){var t=se(e,"preview_link");t||(t=ae(e,"link"))&&(t=Object(C.addQueryArgs)(t,{preview:!0}));var n=ae(e,"featured_media");return t&&n?Object(C.addQueryArgs)(t,{_thumbnail_id:n}):t}}function we(e){var t,n=Ge(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 Ce(e){x()("`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(c.isUnmodifiedDefaultBlock)(t[0])?[]:t}var Te=Object(p.createRegistrySelector)((function(e){return function(t){var n=te(t),r=ee(t),o=e("core").getEditedEntityRecord("postType",r,n);if(o){if("function"==typeof o.content)return o.content(o);if(o.blocks)return F(o.blocks);if(o.content)return o.content}return""}}));function xe(e,t){var n=Object(v.find)(e.optimist,(function(e){return e.beforeState&&Object(v.get)(e.action,["optimist","id"])===t}));return n?n.beforeState:null}function Be(e){if(!ye(e))return!1;if(!de(e))return!1;var t=xe(e,"post-update");return!!t&&!de(null,t.currentPost)}function Ie(e){var t=ae(e,"permalink_template");return R.test(t)}function Ae(e){var t=De(e);if(!t)return null;var n=t.prefix,r=t.postName,o=t.suffix;return Ie(e)?n+r+o:n}function Re(e){return ae(e,"slug")||V(ae(e,"title"))||te(e)}function De(e){var t=ae(e,"permalink_template");if(!t)return null;var n=ae(e,"slug")||ae(e,"generated_slug"),r=t.split(R),o=Object(E.a)(r,2);return{prefix:o[0],postName:n,suffix:o[1]}}function Ne(e,t){var n=e.optimist;return!!n&&n.some((function(e){var n=e.beforeState;return n&&t(n)}))}function Le(e){return e.postLock.isLocked}function Ue(e){return Object.keys(e.postSavingLock).length>0}function Fe(e){return Object.keys(e.postAutosavingLock).length>0}function Me(e){return e.postLock.isTakeover}function Ve(e){return e.postLock.user}function ze(e){return e.postLock.activePostLock}function He(e){return Object(v.has)(Z(e),["_links","wp:action-unfiltered-html"])}function We(e){return e.preferences.hasOwnProperty("isPublishSidebarEnabled")?e.preferences.isPublishSidebarEnabled:j.isPublishSidebarEnabled}function Ge(e){return ae(e,"blocks")||G}function Ke(e){return ae(e,"selectionStart")}function qe(e){return ae(e,"selectionEnd")}function Qe(e){return e.isReady}function $e(e){return e.editorSettings}function Ye(e){return Object(p.createRegistrySelector)((function(t){return function(n){var r;x()("`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 Xe=Ye("getBlockName"),Je=Ye("isBlockValid"),Ze=Ye("getBlockAttributes"),et=Ye("getBlock"),tt=Ye("getBlocks"),nt=Ye("__unstableGetBlockWithoutInnerBlocks"),rt=Ye("getClientIdsOfDescendants"),ot=Ye("getClientIdsWithDescendants"),it=Ye("getGlobalBlockCount"),ct=Ye("getBlocksByClientId"),at=Ye("getBlockCount"),st=Ye("getBlockSelectionStart"),ut=Ye("getBlockSelectionEnd"),lt=Ye("getSelectedBlockCount"),dt=Ye("hasSelectedBlock"),pt=Ye("getSelectedBlockClientId"),bt=Ye("getSelectedBlock"),ft=Ye("getBlockRootClientId"),ht=Ye("getBlockHierarchyRootClientId"),mt=Ye("getAdjacentBlockClientId"),vt=Ye("getPreviousBlockClientId"),Ot=Ye("getNextBlockClientId"),gt=Ye("getSelectedBlocksInitialCaretPosition"),jt=Ye("getMultiSelectedBlockClientIds"),yt=Ye("getMultiSelectedBlocks"),_t=Ye("getFirstMultiSelectedBlockClientId"),kt=Ye("getLastMultiSelectedBlockClientId"),Pt=Ye("isFirstMultiSelectedBlock"),St=Ye("isBlockMultiSelected"),Et=Ye("isAncestorMultiSelected"),wt=Ye("getMultiSelectedBlocksStartClientId"),Ct=Ye("getMultiSelectedBlocksEndClientId"),Tt=Ye("getBlockOrder"),xt=Ye("getBlockIndex"),Bt=Ye("isBlockSelected"),It=Ye("hasSelectedInnerBlock"),At=Ye("isBlockWithinSelection"),Rt=Ye("hasMultiSelection"),Dt=Ye("isMultiSelecting"),Nt=Ye("isSelectionEnabled"),Lt=Ye("getBlockMode"),Ut=Ye("isTyping"),Ft=Ye("isCaretWithinFormattedText"),Mt=Ye("getBlockInsertionPoint"),Vt=Ye("isBlockInsertionPointVisible"),zt=Ye("isValidTemplate"),Ht=Ye("getTemplate"),Wt=Ye("getTemplateLock"),Gt=Ye("canInsertBlockType"),Kt=Ye("getInserterItems"),qt=Ye("hasInserterItems"),Qt=Ye("getBlockListSettings"),$t=n(14),Yt=n(17),Xt=n(20),Jt=n.n(Xt),Zt=n(1);function en(e){var t=e.previousPost,n=e.post,r=e.postType;if(Object(v.get)(e.options,["isAutosave"]))return[];var o,i=["publish","private","future"],c=Object(v.includes)(i,t.status),a=Object(v.includes)(i,n.status),s=Object(v.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 tn(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(Zt.__)("Publishing failed."),private:Object(Zt.__)("Publishing failed."),future:Object(Zt.__)("Scheduling failed.")},a=i||-1===o.indexOf(n.status)?Object(Zt.__)("Updating failed."):c[n.status];return r.message&&!/<\/?[^>]*>/.test(r.message)&&(a=[a,r.message].join(" ")),[a,{id:"SAVE_POST_NOTICE_ID"}]}function nn(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 rn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?nn(Object(n),!0).forEach((function(t){Object(d.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var on=Jt.a.mark(hn),cn=Jt.a.mark(On),an=Jt.a.mark(kn),sn=Jt.a.mark(Sn),un=Jt.a.mark(En),ln=Jt.a.mark(wn),dn=Jt.a.mark(Cn),pn=Jt.a.mark(Tn),bn=Jt.a.mark(xn),fn=Jt.a.mark(Fn);function hn(e,t,n){var r,o;return Jt.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return r=Object(v.has)(t,["content"])?t.content:e.content.raw,o=Object(c.parse)(r),"auto-draft"===e.status&&n&&(o=Object(c.synchronizeBlocksWithTemplate)(o,n)),i.next=6,vn(e);case 6:return i.next=8,{type:"SETUP_EDITOR",post:e,edits:t,template:n};case 8:return i.next=10,Fn(o,{__unstableShouldCreateUndoLevel:!1});case 10:return i.next=12,_n(e);case 12:if(!t||!Object.keys(t).some((function(n){return t[n]!==(Object(v.has)(e,[n,"raw"])?e[n].raw:e[n])}))){i.next=15;break}return i.next=15,kn(t);case 15:case"end":return i.stop()}}),on)}function mn(){return{type:"TEAR_DOWN_EDITOR"}}function vn(e){return{type:"RESET_POST",post:e}}function On(e){var t;return Jt.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return x()("resetAutosave action (`core/editor` store)",{alternative:"receiveAutosaves action (`core` store)",plugin:"Gutenberg"}),n.next=3,Object(b.select)(A,"getCurrentPostId");case 3:return t=n.sent,n.next=6,Object(b.dispatch)("core","receiveAutosaves",t,e);case 6:return n.abrupt("return",{type:"__INERT__"});case 7:case"end":return n.stop()}}),cn)}function gn(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{type:"REQUEST_POST_UPDATE_START",options:e}}function jn(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{type:"REQUEST_POST_UPDATE_FINISH",options:e}}function yn(e){return{type:"UPDATE_POST",edits:e}}function _n(e){return{type:"SETUP_EDITOR_STATE",post:e}}function kn(e,t){var n,r,o;return Jt.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,Object(b.select)(A,"getCurrentPost");case 2:return n=i.sent,r=n.id,o=n.type,i.next=7,Object(b.dispatch)("core","editEntityRecord","postType",o,r,e,t);case 7:case"end":return i.stop()}}),an)}function Pn(e){return rn(rn({},yn(e)),{},{optimist:{id:"post-update"}})}function Sn(){var e,t,n,r,o,i,c,a=arguments;return Jt.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,Object(b.select)(A,"isEditedPostSaveable");case 3:if(s.sent){s.next=5;break}return s.abrupt("return");case 5:return s.next=7,Object(b.select)(A,"getEditedPostContent");case 7:if(s.t0=s.sent,t={content:s.t0},e.isAutosave){s.next=12;break}return s.next=12,Object(b.dispatch)(A,"editPost",t,{undoIgnore:!0});case 12:return s.next=14,gn(e);case 14:return s.next=16,Object(b.select)(A,"getCurrentPost");case 16:return n=s.sent,s.t1=rn,s.t2=rn,s.t3={id:n.id},s.next=22,Object(b.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,Object(b.dispatch)("core","saveEntityRecord","postType",n.type,t,e);case 28:return s.next=30,jn(e);case 30:return s.next=32,Object(b.select)("core","getLastEntitySaveError","postType",n.type,n.id);case 32:if(!(r=s.sent)){s.next=40;break}if(!(o=tn({post:n,edits:t,error:r})).length){s.next=38;break}return s.next=38,b.dispatch.apply(void 0,["core/notices","createErrorNotice"].concat(Object(Yt.a)(o)));case 38:s.next=58;break;case 40:return s.next=42,Object(b.select)(A,"getCurrentPost");case 42:return i=s.sent,s.t7=en,s.t8=n,s.t9=i,s.next=48,Object(b.select)("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,b.dispatch.apply(void 0,["core/notices","createSuccessNotice"].concat(Object(Yt.a)(c)));case 55:if(e.isAutosave){s.next=58;break}return s.next=58,Object(b.dispatch)("core/block-editor","__unstableMarkLastChangeAsPersistent");case 58:case"end":return s.stop()}}),sn)}function En(){var e,t,n,r;return Jt.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,Object(b.select)(A,"getCurrentPost");case 2:return e=o.sent,o.next=5,Object(b.select)(A,"getCurrentPostType");case 5:return t=o.sent,o.next=8,Object(b.select)("core","getPostType",t);case 8:return n=o.sent,o.next=11,Object(b.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,Object(b.dispatch)(A,"resetPost",r);case 14:case"end":return o.stop()}}),un)}function wn(){var e,t,n;return Jt.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,Object(b.select)(A,"getCurrentPostType");case 2:return e=r.sent,r.next=5,Object(b.select)("core","getPostType",e);case 5:return t=r.sent,r.next=8,Object(b.dispatch)("core/notices","removeNotice","TRASH_POST_NOTICE_ID");case 8:return r.prev=8,r.next=11,Object(b.select)(A,"getCurrentPost");case 11:return n=r.sent,r.next=14,Object(b.apiFetch)({path:"/wp/v2/".concat(t.rest_base,"/").concat(n.id),method:"DELETE"});case 14:return r.next=16,Object(b.dispatch)(A,"savePost");case 16:r.next=22;break;case 18:return r.prev=18,r.t0=r.catch(8),r.next=22,b.dispatch.apply(void 0,["core/notices","createErrorNotice"].concat(Object(Yt.a)([(o={error:r.t0}).error.message&&"unknown_error"!==o.error.code?o.error.message:Object(Zt.__)("Trashing failed"),{id:"TRASH_POST_NOTICE_ID"}])));case 22:case"end":return r.stop()}var o}),ln,null,[[8,18]])}function Cn(){var e,t,n,r,o,i,c,a,s,u=arguments;return Jt.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($t.a)(e,["local"]),!n){l.next=21;break}return l.next=4,Object(b.select)(A,"getCurrentPost");case 4:return o=l.sent,l.next=7,Object(b.select)(A,"isEditedPostNew");case 7:return i=l.sent,l.next=10,Object(b.select)(A,"getEditedPostAttribute","title");case 10:return c=l.sent,l.next=13,Object(b.select)(A,"getEditedPostAttribute","content");case 13:return a=l.sent,l.next=16,Object(b.select)(A,"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,Object(b.dispatch)(A,"savePost",rn({isAutosave:!0},r));case 23:case"end":return l.stop()}}),dn)}function Tn(){return Jt.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(b.dispatch)("core","redo");case 2:case"end":return e.stop()}}),pn)}function xn(){return Jt.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(b.dispatch)("core","undo");case 2:case"end":return e.stop()}}),bn)}function Bn(){return{type:"CREATE_UNDO_LEVEL"}}function In(e){return{type:"UPDATE_POST_LOCK",lock:e}}function An(){return{type:"ENABLE_PUBLISH_SIDEBAR"}}function Rn(){return{type:"DISABLE_PUBLISH_SIDEBAR"}}function Dn(e){return{type:"LOCK_POST_SAVING",lockName:e}}function Nn(e){return{type:"UNLOCK_POST_SAVING",lockName:e}}function Ln(e){return{type:"LOCK_POST_AUTOSAVING",lockName:e}}function Un(e){return{type:"UNLOCK_POST_AUTOSAVING",lockName:e}}function Fn(e){var t,n,r,o,i,c,a,s,u=arguments;return Jt.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,Object(b.select)(A,"getCurrentPost");case 6:return c=l.sent,a=c.id,s=c.type,l.next=11,Object(b.syncSelect)("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,Object(b.dispatch)("core","__unstableCreateUndoLevel","postType",s,a);case 17:return l.abrupt("return",l.sent);case 18:i.content=function(e){var t=e.blocks;return F(void 0===t?[]:t)};case 19:return l.delegateYield(kn(i),"t2",20);case 20:case"end":return l.stop()}}),fn)}function Mn(e){return{type:"UPDATE_EDITOR_SETTINGS",settings:e}}var Vn=function(e){return Jt.a.mark((function t(){var n,r,o,i=arguments;return Jt.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:for(x()("`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,b.dispatch.apply(void 0,["core/block-editor",e].concat(r));case 4:case"end":return t.stop()}}),t)}))},zn=Vn("resetBlocks"),Hn=Vn("receiveBlocks"),Wn=Vn("updateBlock"),Gn=Vn("updateBlockAttributes"),Kn=Vn("selectBlock"),qn=Vn("startMultiSelect"),Qn=Vn("stopMultiSelect"),$n=Vn("multiSelect"),Yn=Vn("clearSelectedBlock"),Xn=Vn("toggleSelection"),Jn=Vn("replaceBlocks"),Zn=Vn("replaceBlock"),er=Vn("moveBlocksDown"),tr=Vn("moveBlocksUp"),nr=Vn("moveBlockToPosition"),rr=Vn("insertBlock"),or=Vn("insertBlocks"),ir=Vn("showInsertionPoint"),cr=Vn("hideInsertionPoint"),ar=Vn("setTemplateValidity"),sr=Vn("synchronizeTemplate"),ur=Vn("mergeBlocks"),lr=Vn("removeBlocks"),dr=Vn("removeBlock"),pr=Vn("toggleBlockMode"),br=Vn("startTyping"),fr=Vn("stopTyping"),hr=Vn("enterFormattedText"),mr=Vn("exitFormattedText"),vr=Vn("insertDefaultBlock"),Or=Vn("updateBlockListSettings");function gr(e,t){return"wp-autosave-block-editor-post-".concat(t?"auto-draft":e)}function jr(e,t){window.sessionStorage.removeItem(gr(e,t))}var yr={LOCAL_AUTOSAVE_SET:function(e){!function(e,t,n,r,o){window.sessionStorage.setItem(gr(e,t),JSON.stringify({post_title:n,content:r,excerpt:o}))}(e.postId,e.isPostNew,e.title,e.content,e.excerpt)}};function _r(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 kr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_r(Object(n),!0).forEach((function(t){Object(d.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Pr={reducer:S,selectors:r,actions:o,controls:kr(kr({},b.controls),yr)},Sr=(Object(p.registerStore)(A,kr(kr({},Pr),{},{persist:["preferences"]})),n(8)),Er=n(10),wr=n(33);function Cr(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?Cr(Object(n),!0).forEach((function(t){Object(d.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Cr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function xr(e){var t=Object(v.mapValues)(Object(v.pickBy)(e.attributes,{source:"meta"}),"meta");return Object(v.isEmpty)(t)||(e.edit=function(e){return Object(Er.createHigherOrderComponent)((function(t){return function(n){var r=n.attributes,o=n.setAttributes,i=Object($t.a)(n,["attributes","setAttributes"]),c=Object(p.useSelect)((function(e){return e("core/editor").getCurrentPostType()}),[]),s=Object(a.useEntityProp)("postType",c,"meta"),u=Object(E.a)(s,2),l=u[0],d=u[1],b=Object(B.useMemo)((function(){return Tr(Tr({},r),Object(v.mapValues)(e,(function(e){return l[e]})))}),[r,l]);return Object(B.createElement)(t,Object(Sr.a)({attributes:b,setAttributes:function(t){var n=Object(v.mapKeys)(Object(v.pickBy)(t,(function(t,n){return e[n]})),(function(t,n){return e[n]}));Object(v.isEmpty)(n)||d(n),o(t)}},i))}}),"withMetaAttributeSource")}(t)(e.edit)),e}Object(wr.addFilter)("blocks.registerBlockType","core/editor/custom-sources-backwards-compatibility/shim-attribute-source",xr),Object(p.select)("core/blocks").getBlockTypes().map((function(e){var t=e.name;return Object(p.select)("core/blocks").getBlockType(t)})).forEach(xr);var Br=n(47),Ir=n.n(Br),Ar={name:"users",className:"editor-autocompleters__user",triggerPrefix:"@",options:function(e){var t="";return e&&(t="?search="+encodeURIComponent(e)),Ir()({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(B.createElement)("img",{key:"avatar",className:"editor-autocompleters__user-avatar",alt:"",src:e.avatar_urls[24]}):Object(B.createElement)("span",{className:"editor-autocompleters__no-avatar"}),Object(B.createElement)("span",{key:"name",className:"editor-autocompleters__user-name"},e.name),Object(B.createElement)("span",{key:"slug",className:"editor-autocompleters__user-slug"},e.slug)]},getOptionCompletion:function(e){return"@".concat(e.slug)}};Object(wr.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(v.clone)(Ar)),e}));var Rr=n(21),Dr=n(22),Nr=n(23),Lr=n(24),Ur=n(19);function Fr(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(Ur.a)(e);if(t){var o=Object(Ur.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(Lr.a)(this,n)}}var Mr=function(e){Object(Nr.a)(n,e);var t=Fr(n);function n(e){var r;return Object(Rr.a)(this,n),(r=t.call(this,e)).needsAutosave=!(!e.isDirty||!e.isAutosaveable),r}return Object(Dr.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||!e.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}(B.Component),Vr=Object(Er.compose)([Object(p.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(p.withDispatch)((function(e,t){return{autosave:function(){var n=t.autosave,r=void 0===n?e("core/editor").autosave:n;r()}}}))])(Mr),zr=n(9),Hr=n.n(zr),Wr=function(e){var t=e.children,n=e.isValid,r=e.level,o=e.href,i=e.onSelect;return Object(B.createElement)("li",{className:Hr()("document-outline__item","is-".concat(r.toLowerCase()),{"is-invalid":!n})},Object(B.createElement)("a",{href:o,className:"document-outline__button",onClick:i},Object(B.createElement)("span",{className:"document-outline__emdash","aria-hidden":"true"}),Object(B.createElement)("strong",{className:"document-outline__level"},r),Object(B.createElement)("span",{className:"document-outline__item-content"},t)))};function Gr(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 Kr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Gr(Object(n),!0).forEach((function(t){Object(d.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Gr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var qr=Object(B.createElement)("em",null,Object(Zt.__)("(Empty heading)")),Qr=[Object(B.createElement)("br",{key:"incorrect-break"}),Object(B.createElement)("em",{key:"incorrect-message"},Object(Zt.__)("(Incorrect heading level)"))],$r=[Object(B.createElement)("br",{key:"incorrect-break-h1"}),Object(B.createElement)("em",{key:"incorrect-message-h1"},Object(Zt.__)("(Your theme may already use a H1 for the post title)"))],Yr=[Object(B.createElement)("br",{key:"incorrect-break-multiple-h1"}),Object(B.createElement)("em",{key:"incorrect-message-multiple-h1"},Object(Zt.__)("(Multiple H1 headings are not recommended)"))],Xr=function(e){return!e.attributes.content||0===e.attributes.content.length},Jr=Object(Er.compose)(Object(p.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(v.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,a=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return Object(v.flatMap)(t,(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return"core/heading"===t.name?Kr(Kr({},t),{},{level:t.attributes.level,isEmpty:Xr(t)}):e(t.innerBlocks)}))}(n);if(a.length<1)return null;var s=1,u=document.querySelector(".editor-post-title__input"),d=i&&r&&u,p=Object(v.countBy)(a,"level")[1]>1;return Object(B.createElement)("div",{className:"document-outline"},Object(B.createElement)("ul",null,d&&Object(B.createElement)(Wr,{level:Object(Zt.__)("Title"),isValid:!0,onSelect:o,href:"#".concat(u.id),isDisabled:c},r),a.map((function(e,t){var n=e.level>s+1,r=!(e.isEmpty||n||!e.level||1===e.level&&(p||d));return s=e.level,Object(B.createElement)(Wr,{key:t,level:"H".concat(e.level),isValid:r,isDisabled:c,href:"#block-".concat(e.clientId),onSelect:o},e.isEmpty?qr:Object(l.getTextContent)(Object(l.create)({html:e.attributes.content})),n&&Qr,1===e.level&&p&&Yr,d&&1===e.level&&!p&&$r)}))))}));var Zr=Object(p.withSelect)((function(e){return{blocks:e("core/block-editor").getBlocks()}}))((function(e){var t=e.blocks,n=e.children;return Object(v.filter)(t,(function(e){return"core/heading"===e.name})).length<1?null:n}));var eo=function(e){var t=e.resetBlocksOnSave,n=Object(p.useDispatch)("core/editor"),r=n.resetEditorBlocks,o=n.savePost,i=Object(p.useSelect)((function(e){var t=e("core/editor");return{isEditedPostDirty:t.isEditedPostDirty,getPostEdits:t.getPostEdits}}),[]),a=i.isEditedPostDirty,u=i.getPostEdits;return Object(s.useShortcut)("core/editor/save",(function(e){if(e.preventDefault(),a()){if(t){var n=u();if(n.content&&"string"==typeof n.content){var i=Object(c.parse)(n.content);r(i)}}o()}}),{bindGlobal:!0}),null};function to(){var e=Object(p.useDispatch)("core/editor"),t=e.redo,n=e.undo;return Object(s.useShortcut)("core/editor/undo",(function(e){n(),e.preventDefault()}),{bindGlobal:!0}),Object(s.useShortcut)("core/editor/redo",(function(e){t(),e.preventDefault()}),{bindGlobal:!0}),Object(B.createElement)(B.Fragment,null,Object(B.createElement)(i.BlockEditorKeyboardShortcuts,null),Object(B.createElement)(eo,null))}var no=to;function ro(){return x()("EditorGlobalKeyboardShortcuts",{alternative:"VisualEditorGlobalKeyboardShortcuts",plugin:"Gutenberg"}),Object(B.createElement)(to,null)}function oo(){return Object(B.createElement)(eo,{resetBlocksOnSave:!0})}var io=function(){var e=Object(p.useDispatch)("core/keyboard-shortcuts").registerShortcut;return Object(B.useEffect)((function(){e({name:"core/editor/save",category:"global",description:Object(Zt.__)("Save your changes."),keyCombination:{modifier:"primary",character:"s"}}),e({name:"core/editor/undo",category:"global",description:Object(Zt.__)("Undo your last changes."),keyCombination:{modifier:"primary",character:"z"}}),e({name:"core/editor/redo",category:"global",description:Object(Zt.__)("Redo your last undo."),keyCombination:{modifier:"primaryShift",character:"z"}})}),[e]),Object(B.createElement)(i.BlockEditorKeyboardShortcuts.Register,null)},co=n(3),ao=n(18),so=n(7),uo=Object(B.createElement)(so.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(B.createElement)(so.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 lo=Object(B.forwardRef)((function(e,t){var n=Object(p.useSelect)((function(e){return e("core/editor").hasEditorRedo()}),[]),r=Object(p.useDispatch)("core/editor").redo;return Object(B.createElement)(co.Button,Object(Sr.a)({},e,{ref:t,icon:uo,label:Object(Zt.__)("Redo"),shortcut:ao.displayShortcut.primaryShift("z"),"aria-disabled":!n,onClick:n?r:void 0,className:"editor-history__redo"}))})),po=Object(B.createElement)(so.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(B.createElement)(so.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 bo=Object(B.forwardRef)((function(e,t){var n=Object(p.useSelect)((function(e){return e("core/editor").hasEditorUndo()}),[]),r=Object(p.useDispatch)("core/editor").undo;return Object(B.createElement)(co.Button,Object(Sr.a)({},e,{ref:t,icon:po,label:Object(Zt.__)("Undo"),shortcut:ao.displayShortcut.primary("z"),"aria-disabled":!n,onClick:n?r:void 0,className:"editor-history__undo"}))}));var fo=Object(Er.compose)([Object(p.withSelect)((function(e){return{isValid:e("core/block-editor").isValidTemplate()}})),Object(p.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($t.a)(e,["isValid"]);return t?null:Object(B.createElement)(co.Notice,{className:"editor-template-validation-notice",isDismissible:!1,status:"warning",actions:[{label:Object(Zt.__)("Keep it as is"),onClick:n.resetTemplateValidity},{label:Object(Zt.__)("Reset the template"),onClick:function(){window.confirm(Object(Zt.__)("Resetting the template may result in loss of content, do you want to continue?"))&&n.synchronizeTemplate()},isPrimary:!0}]},Object(Zt.__)("The content of your post doesnt match the template assigned to your post type."))}));var ho=Object(Er.compose)([Object(p.withSelect)((function(e){return{notices:e("core/notices").getNotices()}})),Object(p.withDispatch)((function(e){return{onRemove:e("core/notices").removeNotice}}))])((function(e){var t=e.notices,n=e.onRemove,r=Object(v.filter)(t,{isDismissible:!0,type:"default"}),o=Object(v.filter)(t,{isDismissible:!1,type:"default"}),i=Object(v.filter)(t,{type:"snackbar"});return Object(B.createElement)(B.Fragment,null,Object(B.createElement)(co.NoticeList,{notices:o,className:"components-editor-notices__pinned"}),Object(B.createElement)(co.NoticeList,{notices:r,className:"components-editor-notices__dismissible",onRemove:n},Object(B.createElement)(fo,null)),Object(B.createElement)(co.SnackbarList,{notices:i,className:"components-editor-notices__snackbar",onRemove:n}))})),mo=n(160),vo=n(319),Oo=Object(B.createElement)(so.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(B.createElement)(so.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 go(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(p.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(p.useSelect)((function(e){return e("core/block-editor").getSelectedBlockClientId()===u}),[u]),d=l?Object(Zt.__)("Selected"):Object(Zt.__)("Select"),b=Object(p.useDispatch)("core/block-editor").selectBlock,f=Object(B.useCallback)((function(){return b(u)}),[u]),h=Object(B.useCallback)((function(){b(u),o()}),[u]);return Object(B.createElement)(co.PanelRow,null,Object(B.createElement)(co.CheckboxControl,{label:Object(B.createElement)("strong",null,a||Object(Zt.__)("Untitled")),checked:n,onChange:r}),u?Object(B.createElement)(B.Fragment,null,Object(B.createElement)(co.Button,{onClick:f,className:"entities-saved-states__find-entity",disabled:l},d),Object(B.createElement)(co.Button,{onClick:h,className:"entities-saved-states__find-entity-small",disabled:l},d)):null)}var jo={site:vo.a,page:Oo};function yo(e){var t=e.list,n=e.unselectedEntities,r=e.setUnselectedEntities,o=e.closePanel,i=t[0],c=Object(p.useSelect)((function(e){return e("core").getEntity(i.kind,i.name)}),[i.kind,i.name]),a=i.name,s=jo[a];return Object(B.createElement)(co.PanelBody,{title:c.label,initialOpen:!0,icon:s},t.map((function(e){return Object(B.createElement)(go,{key:e.key||"site",record:e,checked:!Object(v.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 _o={wp_template_part:function(e){return Object(Zt._n)("template part","template parts",e)},wp_template:function(e){return Object(Zt._n)("template","templates",e)},post:function(e){return Object(Zt._n)("post","posts",e)},page:function(e){return Object(Zt._n)("page","pages",e)},site:function(e){return Object(Zt._n)("site","sites",e)}},ko={0:Object(Zt.__)("There are no changes."),1:Object(Zt.__)("Changes have been made to your %s."),2:Object(Zt.__)("Changes have been made to your %1$s and %2$s."),3:Object(Zt.__)("Changes have been made to your %1$s, %2$s, and %3$s."),4:Object(Zt.__)("Changes have been made to your %1$s, %2$s, %3$s, and %4$s."),5:Object(Zt.__)("Changes have been made to your %1$s, %2$s, %3$s, %4$s, and %5$s.")};function Po(e){var t=e.isOpen,n=e.close,r=Object(p.useSelect)((function(e){return{dirtyEntityRecords:e("core").__experimentalGetDirtyEntityRecords()}}),[]).dirtyEntityRecords,o=Object(p.useDispatch)("core").saveEditedEntityRecord,i=Object.values(Object(v.groupBy)(r,"name")),c=[];i.forEach((function(e){_o[e[0].name]&&c.push(_o[e[0].name](e.length))}));var a=ko[c.length]||Object(Zt.__)("Changes have been made to multiple entity types."),s=Zt.sprintf.apply(void 0,[a].concat(c)),u=Object(B.useState)([]),l=Object(E.a)(u,2),d=l[0],b=l[1],f=function(e,t){var n=e.kind,r=e.name,o=e.key;b(t?d.filter((function(e){return e.kind!==n||e.name!==r||e.key!==o})):[].concat(Object(Yt.a)(d),[{kind:n,name:r,key:o}]))},h=Object(B.useState)(!1),m=Object(E.a)(h,2),O=m[0],g=m[1],j=Object(B.useCallback)((function(){return n()}),[n]);return t?Object(B.createElement)("div",{className:"entities-saved-states__panel"},Object(B.createElement)("div",{className:"entities-saved-states__panel-header"},Object(B.createElement)(co.Button,{isPrimary:!0,disabled:r.length-d.length==0,onClick:function(){var e=r.filter((function(e){var t=e.kind,n=e.name,r=e.key;return!Object(v.some)(d,(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(Zt.__)("Save")),Object(B.createElement)(co.Button,{onClick:j,icon:mo.a,label:Object(Zt.__)("Close panel")})),Object(B.createElement)("div",{className:"entities-saved-states__text-prompt"},Object(B.createElement)("strong",null,Object(Zt.__)("Are you ready to save?")),Object(B.createElement)("p",null,s),Object(B.createElement)("p",null,Object(B.createElement)(co.Button,{onClick:function(){return g((function(e){return!e}))},isLink:!0,className:"entities-saved-states__review-changes-button"},O?Object(Zt.__)("Hide changes."):Object(Zt.__)("Review changes.")))),O&&i.map((function(e){return Object(B.createElement)(yo,{key:e[0].name,list:e,closePanel:j,unselectedEntities:d,setUnselectedEntities:f})}))):null}var So=n(16);function Eo(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(Ur.a)(e);if(t){var o=Object(Ur.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(Lr.a)(this,n)}}var wo=function(e){Object(Nr.a)(n,e);var t=Eo(n);function n(){var e;return Object(Rr.a)(this,n),(e=t.apply(this,arguments)).reboot=e.reboot.bind(Object(So.a)(e)),e.getContent=e.getContent.bind(Object(So.a)(e)),e.state={error:null},e}return Object(Dr.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(p.select)("core/editor").getEditedPostContent()}catch(e){}}},{key:"render",value:function(){var e=this.state.error;return e?Object(B.createElement)(i.Warning,{className:"editor-error-boundary",actions:[Object(B.createElement)(co.Button,{key:"recovery",onClick:this.reboot,isSecondary:!0},Object(Zt.__)("Attempt Recovery")),Object(B.createElement)(co.ClipboardButton,{key:"copy-post",text:this.getContent,isSecondary:!0},Object(Zt.__)("Copy Post Text")),Object(B.createElement)(co.ClipboardButton,{key:"copy-error",text:e.stack,isSecondary:!0},Object(Zt.__)("Copy Error"))]},Object(Zt.__)("The editor has encountered an unexpected error.")):this.props.children}}]),n}(B.Component),Co=window.requestIdleCallback?window.requestIdleCallback:window.requestAnimationFrame,To=Object(v.once)((function(){try{return window.sessionStorage.setItem("__wpEditorTestSessionStorage",""),window.sessionStorage.removeItem("__wpEditorTestSessionStorage"),!0}catch(e){return!1}}));function xo(){var e=Object(p.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(p.useDispatch)("core/notices"),a=i.createWarningNotice,s=i.removeNotice,u=Object(p.useDispatch)("core/editor"),l=u.editPost,d=u.resetEditorBlocks;Object(B.useEffect)((function(){var e=function(e,t){return window.sessionStorage.getItem(gr(e,t))}(t,n);if(e){try{e=JSON.parse(e)}catch(e){return}var i=e,u={title:i.post_title,content:i.content,excerpt:i.excerpt};if(Object.keys(u).some((function(e){return u[e]!==r(e)}))){if(!o){var p=Object(v.uniqueId)("wpEditorAutosaveRestore");a(Object(Zt.__)("The backup of this post in your browser is different from the version below."),{id:p,actions:[{label:Object(Zt.__)("Restore the backup"),onClick:function(){l(Object(v.omit)(u,["content"])),d(Object(c.parse)(u.content)),s(p)}}]})}}else jr(t,n)}}),[n,t])}var Bo=Object(Er.ifCondition)(To)((function(){var e=Object(p.useDispatch)("core/editor").autosave,t=Object(B.useCallback)((function(){Co((function(){return e({local:!0})}))}),[]);xo(),function(){var e=Object(p.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(B.useRef)(r),a=Object(B.useRef)(o);Object(B.useEffect)((function(){!i&&(a.current&&!o||c.current&&!r)&&jr(t,n),c.current=r,a.current=o}),[r,o,i]);var s=Object(Er.usePrevious)(n),u=Object(Er.usePrevious)(t);Object(B.useEffect)((function(){u===t&&s&&!n&&jr(t,!0)}),[n,t])}();var n=Object(p.useSelect)((function(e){return{localAutosaveInterval:e("core/editor").getEditorSettings().__experimentalLocalAutosaveInterval}}),[]).localAutosaveInterval;return Object(B.createElement)(Vr,{interval:n,autosave:t})}));var Io=Object(p.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(v.get)(n,["supports","page-attributes"],!1)&&Object(v.isEmpty)(t)?null:r}));var Ao=Object(p.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(v.some)(Object(v.castArray)(r),(function(e){return!!t.supports[e]}))),o?n:null})),Ro=Object(Er.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(B.createElement)(co.TextControl,{className:"editor-page-attributes__order",type:"number",label:Object(Zt.__)("Order"),value:c,onChange:function(e){i({orderInput:e});var n=Number(e);Number.isInteger(n)&&""!==Object(v.invoke)(e,["trim"])&&t(Number(e))},size:6,onBlur:function(){i({orderInput:null})}})}));var Do=Object(Er.compose)([Object(p.withSelect)((function(e){return{order:e("core/editor").getEditedPostAttribute("menu_order")}})),Object(p.withDispatch)((function(e){return{onUpdateOrder:function(t){e("core/editor").editPost({menu_order:t})}}}))])((function(e){return Object(B.createElement)(Ao,{supportKeys:"page-attributes"},Object(B.createElement)(Ro,e))}));function No(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 Lo(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?No(Object(n),!0).forEach((function(t){Object(d.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):No(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Uo(e){var t=e.map((function(e){return Lo({children:[],parent:null},e)})),n=Object(v.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 Lo(Lo({},t),{},{children:r&&r.length?e(r):[]})}))}(n[0]||[])}function Fo(e){var t;return(null==e||null===(t=e.title)||void 0===t?void 0:t.rendered)?e.title.rendered:"#".concat(e.id," (").concat(Object(Zt.__)("no title"),")")}var Mo=function(){var e=Object(p.useDispatch)("core/editor").editPost,t=Object(B.useState)(!1),n=Object(E.a)(t,2),r=n[0],o=n[1],i=r,c=Object(p.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),b=s(),f=Object(v.get)(p,["hierarchical"],!1),h={per_page:100,exclude:b,parent_exclude:b,orderby:"menu_order",order:"asc",_fields:"id,title,parent"};return i&&(h.search=r),{parentPostId:d,parentPost:d?c("postType",l,d):null,items:f?o("postType",l,h):[],postType:p}}),[r]),a=c.parentPost,s=c.parentPostId,u=c.items,l=c.postType,d=Object(v.get)(l,["hierarchical"],!1),b=Object(v.get)(l,["labels","parent_item_colon"]),f=u||[],h=Object(B.useMemo)((function(){var e=f.map((function(e){return{id:e.id,parent:e.parent,name:Fo(e)}}));i||(e=Uo(e));var t=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return Object(v.flatMap)(t,(function(t){return[{value:t.id,label:Object(v.repeat)("— ",n)+Object(v.unescape)(t.name)}].concat(Object(Yt.a)(e(t.children||[],n+1)))}))}(e),n=Object(v.find)(t,(function(e){return e.value===s}));return a&&!n&&t.unshift({value:s,label:Fo(a)}),t}),[f]);return d&&b?Object(B.createElement)(co.ComboboxControl,{className:"editor-page-attributes__parent",label:b,value:s,options:h,onFilterValueChange:Object(v.debounce)((function(e){o(e)}),300),onChange:function(t){e({parent:t})}}):null};var Vo=Object(Er.compose)(Object(p.withSelect)((function(e){var t=e("core/editor"),n=t.getEditedPostAttribute,r=(0,t.getEditorSettings)().availableTemplates;return{selectedTemplate:n("template"),availableTemplates:r}})),Object(p.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(v.isEmpty)(t)?null:Object(B.createElement)(co.SelectControl,{label:Object(Zt.__)("Template:"),value:n,onChange:r,className:"editor-page-attributes__template",options:Object(v.map)(t,(function(e,t){return{value:t,label:e}}))})}));var zo=Object(Er.compose)([Object(p.withSelect)((function(e){var t=e("core/editor").getCurrentPost();return{hasAssignAuthorAction:Object(v.get)(t,["_links","wp:action-assign-author"],!1),postType:e("core/editor").getCurrentPostType(),authors:e("core").getAuthors()}})),Er.withInstanceId])((function(e){var t=e.hasAssignAuthorAction,n=e.authors,r=e.children;return!t||!n||1>=n.length?null:Object(B.createElement)(Ao,{supportKeys:"author"},r)}));var Ho=function(){var e=Object(B.useState)(),t=Object(E.a)(e,2),n=t[0],r=t[1],o=Object(p.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(p.useDispatch)("core/editor").editPost,l=Object(B.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(Yt.a)(e)):e}),[a,s]);return Object(B.useEffect)((function(){s&&r(s.name)}),[s]),s?Object(B.createElement)(zo,null,Object(B.createElement)(co.ComboboxControl,{label:Object(Zt.__)("Author"),options:l,value:i,onFilterValueChange:Object(v.debounce)((function(e){r(e)}),300),onChange:function(e){e&&u({author:e})},isLoading:c,allowReset:!1})):null};var Wo=Object(Er.compose)([Object(p.withSelect)((function(e){return{commentStatus:e("core/editor").getEditedPostAttribute("comment_status")}})),Object(p.withDispatch)((function(e){return{editPost:e("core/editor").editPost}}))])((function(e){var t=e.commentStatus,n=void 0===t?"open":t,r=Object($t.a)(e,["commentStatus"]);return Object(B.createElement)(co.CheckboxControl,{label:Object(Zt.__)("Allow comments"),checked:"open"===n,onChange:function(){return r.editPost({comment_status:"open"===n?"closed":"open"})}})}));var Go=Object(Er.compose)([Object(p.withSelect)((function(e){return{excerpt:e("core/editor").getEditedPostAttribute("excerpt")}})),Object(p.withDispatch)((function(e){return{onUpdateExcerpt:function(t){e("core/editor").editPost({excerpt:t})}}}))])((function(e){var t=e.excerpt,n=e.onUpdateExcerpt;return Object(B.createElement)("div",{className:"editor-post-excerpt"},Object(B.createElement)(co.TextareaControl,{label:Object(Zt.__)("Write an excerpt (optional)"),className:"editor-post-excerpt__textarea",onChange:function(e){return n(e)},value:t}),Object(B.createElement)(co.ExternalLink,{href:Object(Zt.__)("https://wordpress.org/support/article/excerpt/")},Object(Zt.__)("Learn more about manual excerpts")))}));var Ko=function(e){return Object(B.createElement)(Ao,Object(Sr.a)({},e,{supportKeys:"excerpt"}))};var qo=Object(p.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(v.some)(Object(v.castArray)(o),(function(e){var n=Object(v.get)(t,[e],!1);return"post-thumbnails"===e&&Object(v.isArray)(n)?Object(v.includes)(n,r):n}))?n:null}));var Qo=function(e){return Object(B.createElement)(qo,{supportKeys:"post-thumbnails"},Object(B.createElement)(Ao,Object(Sr.a)({},e,{supportKeys:"thumbnail"})))},$o=["image"],Yo=Object(Zt.__)("Featured image"),Xo=Object(Zt.__)("Set featured image"),Jo=Object(Zt.__)("Remove image");var Zo=Object(p.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}})),ei=Object(p.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(E.a)(e,1)[0];i({featured_media:t.id})},onError:function(e){r.removeAllNotices(),r.createErrorNotice(e)}})},onRemoveImage:function(){i({featured_media:0})}}})),ti=Object(Er.compose)(co.withNotices,Zo,ei,Object(co.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,p=e.media,b=e.postType,f=e.noticeUI,h=Object(v.get)(b,["labels"],{}),m=Object(B.createElement)("p",null,Object(Zt.__)("To edit the featured image, you need permission to upload media."));if(p){var O=Object(wr.applyFilters)("editor.PostFeaturedImage.imageSize","post-thumbnail",p.id,a);if(Object(v.has)(p,["media_details","sizes",O]))r=p.media_details.sizes[O].width,o=p.media_details.sizes[O].height,c=p.media_details.sizes[O].source_url;else{var g=Object(wr.applyFilters)("editor.PostFeaturedImage.imageSize","thumbnail",p.id,a);Object(v.has)(p,["media_details","sizes",g])?(r=p.media_details.sizes[g].width,o=p.media_details.sizes[g].height,c=p.media_details.sizes[g].source_url):(r=p.media_details.width,o=p.media_details.height,c=p.source_url)}}return Object(B.createElement)(Qo,null,f,Object(B.createElement)("div",{className:"editor-post-featured-image"},p&&Object(B.createElement)("div",{id:"editor-post-featured-image-".concat(s,"-describedby"),className:"hidden"},p.alt_text&&Object(Zt.sprintf)(Object(Zt.__)("Current image: %s"),p.alt_text),!p.alt_text&&Object(Zt.sprintf)(Object(Zt.__)("The current image has no alternative text. The file name is: %s"),(null===(t=p.media_details.sizes)||void 0===t||null===(n=t.full)||void 0===n?void 0:n.file)||p.slug)),Object(B.createElement)(i.MediaUploadCheck,{fallback:m},Object(B.createElement)(i.MediaUpload,{title:h.featured_image||Yo,onSelect:u,unstableFeaturedImageFlow:!0,allowedTypes:$o,modalClass:"editor-post-featured-image__media-modal",render:function(e){var t=e.open;return Object(B.createElement)("div",{className:"editor-post-featured-image__container"},Object(B.createElement)(co.Button,{className:s?"editor-post-featured-image__preview":"editor-post-featured-image__toggle",onClick:t,"aria-label":s?Object(Zt.__)("Edit or update the image"):null,"aria-describedby":s?"editor-post-featured-image-".concat(s,"-describedby"):null},!!s&&p&&Object(B.createElement)(co.ResponsiveWrapper,{naturalWidth:r,naturalHeight:o,isInline:!0},Object(B.createElement)("img",{src:c,alt:""})),!!s&&!p&&Object(B.createElement)(co.Spinner,null),!s&&(h.set_featured_image||Xo)),Object(B.createElement)(co.DropZone,{onFilesDrop:l}))},value:s})),!!s&&p&&!p.isLoading&&Object(B.createElement)(i.MediaUploadCheck,null,Object(B.createElement)(i.MediaUpload,{title:h.featured_image||Yo,onSelect:u,unstableFeaturedImageFlow:!0,allowedTypes:$o,modalClass:"editor-post-featured-image__media-modal",render:function(e){var t=e.open;return Object(B.createElement)(co.Button,{onClick:t,isSecondary:!0},Object(Zt.__)("Replace Image"))}})),!!s&&Object(B.createElement)(i.MediaUploadCheck,null,Object(B.createElement)(co.Button,{onClick:d,isLink:!0,isDestructive:!0},h.remove_featured_image||Jo))))}));var ni=Object(p.withSelect)((function(e){return{disablePostFormats:e("core/editor").getEditorSettings().disablePostFormats}}))((function(e){var t=e.disablePostFormats,n=Object($t.a)(e,["disablePostFormats"]);return!t&&Object(B.createElement)(Ao,Object(Sr.a)({},n,{supportKeys:"post-formats"}))})),ri=[{id:"aside",caption:Object(Zt.__)("Aside")},{id:"gallery",caption:Object(Zt.__)("Gallery")},{id:"link",caption:Object(Zt.__)("Link")},{id:"image",caption:Object(Zt.__)("Image")},{id:"quote",caption:Object(Zt.__)("Quote")},{id:"standard",caption:Object(Zt.__)("Standard")},{id:"status",caption:Object(Zt.__)("Status")},{id:"video",caption:Object(Zt.__)("Video")},{id:"audio",caption:Object(Zt.__)("Audio")},{id:"chat",caption:Object(Zt.__)("Chat")}];function oi(){var e=Object(Er.useInstanceId)(oi),t="post-format-selector-".concat(e),n=Object(p.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(v.union)([o],Object(v.get)(i,["formats"],[]))}}),[]),r=n.postFormat,o=n.suggestedFormat,i=n.supportedFormats,c=ri.filter((function(e){return Object(v.includes)(i,e.id)})),a=Object(v.find)(c,(function(e){return e.id===o})),s=Object(p.useDispatch)("core/editor").editPost,u=function(e){return s({format:e})};return Object(B.createElement)(ni,null,Object(B.createElement)("div",{className:"editor-post-format"},Object(B.createElement)("div",{className:"editor-post-format__content"},Object(B.createElement)("label",{htmlFor:t},Object(Zt.__)("Post Format")),Object(B.createElement)(co.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(B.createElement)("div",{className:"editor-post-format__suggestion"},Object(Zt.__)("Suggestion:")," ",Object(B.createElement)(co.Button,{isLink:!0,onClick:function(){return u(a.id)}},a.caption))))}var ii=Object(B.createElement)(so.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(B.createElement)(so.Path,{d:"M13.65 2.88c3.93 2.01 5.48 6.84 3.47 10.77s-6.83 5.48-10.77 3.47c-1.87-.96-3.2-2.56-3.86-4.4l1.64-1.03c.45 1.57 1.52 2.95 3.08 3.76 3.01 1.54 6.69.35 8.23-2.66 1.55-3.01.36-6.69-2.65-8.24C9.78 3.01 6.1 4.2 4.56 7.21l1.88.97-4.95 3.08-.39-5.82 1.78.91C4.9 2.4 9.75.89 13.65 2.88zm-4.36 7.83C9.11 10.53 9 10.28 9 10c0-.07.03-.12.04-.19h-.01L10 5l.97 4.81L14 13l-4.5-2.12.02-.02c-.08-.04-.16-.09-.23-.15z"}));var ci=Object(p.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(B.createElement)(Ao,{supportKeys:"revisions"},r)}));var ai=Object(p.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(B.createElement)(ci,null,Object(B.createElement)(co.Button,{href:M("revision.php",{revision:t,gutenberg:!0}),className:"editor-post-last-revision__title",icon:ii},Object(Zt.sprintf)(Object(Zt._n)("%d Revision","%d Revisions",n),n)))}));function si(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(Ur.a)(e);if(t){var o=Object(Ur.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(Lr.a)(this,n)}}var ui=function(e){Object(Nr.a)(n,e);var t=si(n);function n(){var e;return Object(Rr.a)(this,n),(e=t.apply(this,arguments)).buttonRef=Object(B.createRef)(),e.openPreviewWindow=e.openPreviewWindow.bind(Object(So.a)(e)),e}return Object(Dr.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(B.renderToString)(Object(B.createElement)("div",{className:"editor-post-preview-button__interstitial-message"},Object(B.createElement)(co.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 96 96"},Object(B.createElement)(co.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(B.createElement)(co.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(B.createElement)("p",null,Object(Zt.__)("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(wr.applyFilters)("editor.PostPreview.interstitialMarkup",n),t.write(n),t.title=Object(Zt.__)("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=Hr()({"editor-post-preview":!this.props.className},this.props.className);return Object(B.createElement)(co.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(B.createElement)(B.Fragment,null,Object(Zt._x)("Preview","imperative verb"),Object(B.createElement)(co.VisuallyHidden,{as:"span"},Object(Zt.__)("(opens in a new tab)"))))}}]),n}(B.Component),li=Object(Er.compose)([Object(p.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(),b=d(a("type"));return{postId:i(),currentPostLink:c("link"),previewLink:void 0!==n?n:p,isSaveable:s(),isAutosaveable:r||u(),isViewable:Object(v.get)(b,["viewable"],!1),isDraft:-1!==["draft","auto-draft"].indexOf(a("status"))}})),Object(p.withDispatch)((function(e){return{autosave:e("core/editor").autosave,savePost:e("core/editor").savePost}})),Object(Er.ifCondition)((function(e){return e.isViewable}))])(ui);function di(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(Ur.a)(e);if(t){var o=Object(Ur.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(Lr.a)(this,n)}}var pi=function(e){Object(Nr.a)(n,e);var t=di(n);function n(){var e;return Object(Rr.a)(this,n),(e=t.apply(this,arguments)).sendPostLock=e.sendPostLock.bind(Object(So.a)(e)),e.receivePostLock=e.receivePostLock.bind(Object(So.a)(e)),e.releasePostLock=e.releasePostLock.bind(Object(So.a)(e)),e}return Object(Dr.a)(n,[{key:"componentDidMount",value:function(){var e=this.getHookName();Object(wr.addAction)("heartbeat.send",e,this.sendPostLock),Object(wr.addAction)("heartbeat.tick",e,this.receivePostLock)}},{key:"componentWillUnmount",value:function(){var e=this.getHookName();Object(wr.removeAction)("heartbeat.send",e),Object(wr.removeAction)("heartbeat.tick",e)}},{key:"getHookName",value:function(){return"core/editor/post-locked-modal-"+this.props.instanceId}},{key:"sendPostLock",value:function(e){var t=this.props,n=t.isLocked,r=t.activePostLock,o=t.postId;n||(e["wp-refresh-post-lock"]={lock:r,post_id:o})}},{key:"receivePostLock",value:function(e){if(e["wp-refresh-post-lock"]){var t=this.props,n=t.autosave,r=t.updatePostLock,o=e["wp-refresh-post-lock"];o.lock_error?(n(),r({isLocked:!0,isTakeover:!0,user:{avatar:o.lock_error.avatar_src}})):o.new_lock&&r({isLocked:!1,activePostLock:o.new_lock})}}},{key:"releasePostLock",value:function(){var e=this.props,t=e.isLocked,n=e.activePostLock,r=e.postLockUtils,o=e.postId;if(!t&&n){var i=new window.FormData;if(i.append("action","wp-remove-post-lock"),i.append("_wpnonce",r.unlockNonce),i.append("post_ID",o),i.append("active_post_lock",n),window.navigator.sendBeacon)window.navigator.sendBeacon(r.ajaxUrl,i);else{var c=new window.XMLHttpRequest;c.open("POST",r.ajaxUrl,!1),c.send(i)}}}},{key:"render",value:function(){var e=this.props,t=e.user,n=e.postId,r=e.isLocked,o=e.isTakeover,i=e.postLockUtils,c=e.postType;if(!r)return null;var a=t.name,s=t.avatar,u=Object(C.addQueryArgs)("post.php",{"get-post-lock":"1",lockKey:!0,post:n,action:"edit",_wpnonce:i.nonce}),l=M("edit.php",{post_type:Object(v.get)(c,["slug"])}),d=Object(Zt.__)("Exit the Editor");return Object(B.createElement)(co.Modal,{title:o?Object(Zt.__)("Someone else has taken over this post."):Object(Zt.__)("This post is already being edited."),focusOnMount:!0,shouldCloseOnClickOutside:!1,shouldCloseOnEsc:!1,isDismissible:!1,className:"editor-post-locked-modal"},!!s&&Object(B.createElement)("img",{src:s,alt:Object(Zt.__)("Avatar"),className:"editor-post-locked-modal__avatar"}),!!o&&Object(B.createElement)("div",null,Object(B.createElement)("div",null,a?Object(Zt.sprintf)(Object(Zt.__)("%s now has editing control of this post. Dont worry, your changes up to this moment have been saved."),a):Object(Zt.__)("Another user now has editing control of this post. Dont worry, your changes up to this moment have been saved.")),Object(B.createElement)("div",{className:"editor-post-locked-modal__buttons"},Object(B.createElement)(co.Button,{isPrimary:!0,href:l},d))),!o&&Object(B.createElement)("div",null,Object(B.createElement)("div",null,a?Object(Zt.sprintf)(Object(Zt.__)("%s is currently working on this post, which means you cannot make changes, unless you take over."),a):Object(Zt.__)("Another user is currently working on this post, which means you cannot make changes, unless you take over.")),Object(B.createElement)("div",{className:"editor-post-locked-modal__buttons"},Object(B.createElement)(co.Button,{isSecondary:!0,href:l},d),Object(B.createElement)(li,null),Object(B.createElement)(co.Button,{isPrimary:!0,href:u},Object(Zt.__)("Take Over")))))}}]),n}(B.Component),bi=Object(Er.compose)(Object(p.withSelect)((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"))}})),Object(p.withDispatch)((function(e){var t=e("core/editor");return{autosave:t.autosave,updatePostLock:t.updatePostLock}})),Er.withInstanceId,Object(Er.withGlobalEvents)({beforeunload:"releasePostLock"}))(pi);var fi=Object(Er.compose)(Object(p.withSelect)((function(e){var t=e("core/editor"),n=t.isCurrentPostPublished,r=t.getCurrentPostType,o=t.getCurrentPost;return{hasPublishAction:Object(v.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 hi=Object(Er.compose)(Object(p.withSelect)((function(e){return{status:e("core/editor").getEditedPostAttribute("status")}})),Object(p.withDispatch)((function(e){return{onUpdateStatus:function(t){e("core/editor").editPost({status:t})}}})))((function(e){var t=e.status,n=e.onUpdateStatus;return Object(B.createElement)(fi,null,Object(B.createElement)(co.CheckboxControl,{label:Object(Zt.__)("Pending review"),checked:"pending"===t,onChange:function(){n("pending"===t?"draft":"pending")}}))}));var mi=Object(Er.compose)([Object(p.withSelect)((function(e){return{pingStatus:e("core/editor").getEditedPostAttribute("ping_status")}})),Object(p.withDispatch)((function(e){return{editPost:e("core/editor").editPost}}))])((function(e){var t=e.pingStatus,n=void 0===t?"open":t,r=Object($t.a)(e,["pingStatus"]);return Object(B.createElement)(co.CheckboxControl,{label:Object(Zt.__)("Allow pingbacks & trackbacks"),checked:"open"===n,onChange:function(){return r.editPost({ping_status:"open"===n?"closed":"open"})}})}));var vi=Object(Er.compose)([Object(p.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(v.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(Zt.__)("Publishing…"):t&&r&&!c?Object(Zt.__)("Updating…"):n&&r&&!c?Object(Zt.__)("Scheduling…"):i?t?a?Object(Zt.__)("Update…"):Object(Zt.__)("Update"):n?a?Object(Zt.__)("Schedule…"):Object(Zt.__)("Schedule"):Object(Zt.__)("Publish"):a?Object(Zt.__)("Submit for Review…"):Object(Zt.__)("Submit for Review")}));function Oi(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(Ur.a)(e);if(t){var o=Object(Ur.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(Lr.a)(this,n)}}var gi=function(e){Object(Nr.a)(n,e);var t=Oi(n);function n(e){var r;return Object(Rr.a)(this,n),(r=t.call(this,e)).buttonNode=Object(B.createRef)(),r.createOnClick=r.createOnClick.bind(Object(So.a)(r)),r.closeEntitiesSavedStates=r.closeEntitiesSavedStates.bind(Object(So.a)(r)),r.state={entitiesSavedStatesCallback:!1},r}return Object(Dr.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})),v.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(v.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,s=t.isPublishable,u=t.isPublished,l=t.isSaveable,d=t.isSaving,p=t.isToggle,b=t.onSave,f=t.onStatusChange,h=t.onSubmit,m=void 0===h?v.noop:h,O=t.onToggle,g=t.visibility,j=t.hasNonPostEntityChanges,y=d||r||!l||a||!s&&!n,_=u||d||r||!l||!s&&!n;e=o?"private"===g?"private":i?"future":"publish":"pending";var k={"aria-disabled":y&&!j,className:"editor-post-publish-button",isBusy:d&&u,isPrimary:!0,onClick:this.createOnClick((function(){y||(m(),f(e),b())}))},P={"aria-disabled":_&&!j,"aria-expanded":c,className:"editor-post-publish-panel__toggle",isBusy:d&&u,isPrimary:!0,onClick:this.createOnClick((function(){_||O()}))},S=i?Object(Zt.__)("Schedule…"):Object(Zt.__)("Publish"),E=Object(B.createElement)(vi,{forceIsSaving:r,hasNonPostEntityChanges:j}),w=p?P:k,C=p?S:E;return Object(B.createElement)(B.Fragment,null,Object(B.createElement)(co.Button,Object(Sr.a)({ref:this.buttonNode},w,{className:Hr()(w.className,"editor-post-publish-button__button",{"has-changes-dot":j})}),C))}}]),n}(B.Component),ji=Object(Er.compose)([Object(p.withSelect)((function(e){var t=e("core/editor"),n=t.isSavingPost,r=t.isEditedPostBeingScheduled,o=t.getEditedPostVisibility,i=t.isCurrentPostPublished,c=t.isEditedPostSaveable,a=t.isEditedPostPublishable,s=t.isPostSavingLocked,u=t.getCurrentPost,l=t.getCurrentPostType,d=t.getCurrentPostId,p=t.hasNonPostEntityChanges;return{isSaving:n(),isBeingScheduled:r(),visibility:o(),isSaveable:c(),isPostSavingLocked:s(),isPublishable:a(),isPublished:i(),hasPublishAction:Object(v.get)(u(),["_links","wp:action-publish"],!1),postType:l(),postId:d(),hasNonPostEntityChanges:p()}})),Object(p.withDispatch)((function(e){var t=e("core/editor"),n=t.editPost;return{onStatusChange:function(e){return n({status:e},{undoIgnore:!0})},onSave:t.savePost}}))])(gi),yi=n(159),_i=[{value:"public",label:Object(Zt.__)("Public"),info:Object(Zt.__)("Visible to everyone.")},{value:"private",label:Object(Zt.__)("Private"),info:Object(Zt.__)("Only visible to site admins and editors.")},{value:"password",label:Object(Zt.__)("Password Protected"),info:Object(Zt.__)("Protected with a password you choose. Only those with the password can view this post.")}];function ki(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(Ur.a)(e);if(t){var o=Object(Ur.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(Lr.a)(this,n)}}var Pi=function(e){Object(Nr.a)(n,e);var t=ki(n);function n(e){var r;return Object(Rr.a)(this,n),(r=t.apply(this,arguments)).setPublic=r.setPublic.bind(Object(So.a)(r)),r.setPrivate=r.setPrivate.bind(Object(So.a)(r)),r.setPasswordProtected=r.setPasswordProtected.bind(Object(So.a)(r)),r.updatePassword=r.updatePassword.bind(Object(So.a)(r)),r.state={hasPassword:!!e.password},r}return Object(Dr.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(Zt.__)("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(B.createElement)("fieldset",{key:"visibility-selector",className:"editor-post-visibility__dialog-fieldset"},Object(B.createElement)("legend",{className:"editor-post-visibility__dialog-legend"},Object(Zt.__)("Post Visibility")),_i.map((function(e){var t=e.value,n=e.label,i=e.info;return Object(B.createElement)("div",{key:t,className:"editor-post-visibility__choice"},Object(B.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(B.createElement)("label",{htmlFor:"editor-post-".concat(t,"-").concat(r),className:"editor-post-visibility__dialog-label"},n),Object(B.createElement)("p",{id:"editor-post-".concat(t,"-").concat(r,"-description"),className:"editor-post-visibility__dialog-info"},i))}))),this.state.hasPassword&&Object(B.createElement)("div",{className:"editor-post-visibility__dialog-password",key:"password-selector"},Object(B.createElement)(co.VisuallyHidden,{as:"label",htmlFor:"editor-post-visibility__dialog-password-input-".concat(r)},Object(Zt.__)("Create password")),Object(B.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(Zt.__)("Use a secure password")}))]}}]),n}(B.Component),Si=Object(Er.compose)([Object(p.withSelect)((function(e){var t=e("core/editor"),n=t.getEditedPostAttribute,r=t.getEditedPostVisibility;return{status:n("status"),visibility:r(),password:n("password")}})),Object(p.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})}}})),Er.withInstanceId])(Pi);var Ei=Object(p.withSelect)((function(e){return{visibility:e("core/editor").getEditedPostVisibility()}}))((function(e){var t=e.visibility;return Object(v.find)(_i,{value:t}).label}));var wi=Object(Er.compose)([Object(p.withSelect)((function(e){return{date:e("core/editor").getEditedPostAttribute("date")}})),Object(p.withDispatch)((function(e){return{onUpdateDate:function(t){e("core/editor").editPost({date:t})}}}))])((function(e){var t=e.date,n=e.onUpdateDate,r=Object(w.__experimentalGetSettings)(),o=/a(?!\\)/i.test(r.formats.time.toLowerCase().replace(/\\\\/g,"").split("").reverse().join(""));return Object(B.createElement)(co.DateTimePicker,{key:"date-time-picker",currentDate:t,onChange:function(e){n(e),document.activeElement.blur()},is12Hour:o})}));var Ci=Object(p.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(w.__experimentalGetSettings)();return t&&!n?Object(w.format)("".concat(r.formats.date," ").concat(r.formats.time),t):Object(Zt.__)("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(Ur.a)(e);if(t){var o=Object(Ur.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(Lr.a)(this,n)}}function xi(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 Bi(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?xi(Object(n),!0).forEach((function(t){Object(d.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xi(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ii={per_page:20,orderby:"count",order:"desc",_fields:"id,name"},Ai=function(e){return Object(v.unescape)(e.replace("&#039;","'"))},Ri=function(e,t){return Ai(e).toLowerCase()===Ai(t).toLowerCase()},Di=function(e){return Bi(Bi({},e),{},{name:Ai(e.name)})},Ni=function(e){return Object(v.map)(e,Di)},Li=function(e){Object(Nr.a)(n,e);var t=Ti(n);function n(){var e;return Object(Rr.a)(this,n),(e=t.apply(this,arguments)).onChange=e.onChange.bind(Object(So.a)(e)),e.searchTerms=Object(v.throttle)(e.searchTerms.bind(Object(So.a)(e)),500),e.findOrCreateTerm=e.findOrCreateTerm.bind(Object(So.a)(e)),e.state={loading:!Object(v.isEmpty)(e.props.terms),availableTerms:[],selectedTerms:[]},e}return Object(Dr.a)(n,[{key:"componentDidMount",value:function(){var e=this;Object(v.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(v.invoke)(this.initRequest,["abort"]),Object(v.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=Bi(Bi({},Ii),t),o=Ir()({path:Object(C.addQueryArgs)("/wp/v2/".concat(n.rest_base),r)});return o.then(Ni).then((function(t){e.setState((function(e){return{availableTerms:e.availableTerms.concat(t.filter((function(t){return!Object(v.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(v.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(v.escape)(e);return Ir()({path:"/wp/v2/".concat(n.rest_base),method:"POST",data:{name:r}}).catch((function(o){return"term_exists"===o.code?(t.addRequest=Ir()({path:Object(C.addQueryArgs)("/wp/v2/".concat(n.rest_base),Bi(Bi({},Ii),{},{search:r}))}).then(Ni),t.addRequest.then((function(t){return Object(v.find)(t,(function(t){return Ri(t.name,e)}))}))):Promise.reject(o)})).then(Di)}},{key:"onChange",value:function(e){var t=this,n=Object(v.uniqBy)(e,(function(e){return e.toLowerCase()}));this.setState({selectedTerms:n});var r=n.filter((function(e){return!Object(v.find)(t.state.availableTerms,(function(t){return Ri(t.name,e)}))})),o=function(e,t){return e.map((function(e){return Object(v.find)(t,(function(t){return Ri(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(v.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(v.get)(n,["labels","add_new_item"],"post_tag"===t?Object(Zt.__)("Add new tag"):Object(Zt.__)("Add new Term")),u=Object(v.get)(n,["labels","singular_name"],"post_tag"===t?Object(Zt.__)("Tag"):Object(Zt.__)("Term")),l=Object(Zt.sprintf)(Object(Zt._x)("%s added","term"),u),d=Object(Zt.sprintf)(Object(Zt._x)("%s removed","term"),u),p=Object(Zt.sprintf)(Object(Zt._x)("Remove %s","term"),u);return Object(B.createElement)(co.FormTokenField,{value:c,suggestions:a,onChange:this.onChange,onInputChange:this.searchTerms,maxSuggestions:20,disabled:o,label:s,messages:{added:l,removed:d,remove:p}})}}]),n}(B.Component),Ui=Object(Er.compose)(Object(p.withSelect)((function(e,t){var n=t.slug,r=e("core/editor").getCurrentPost,o=(0,e("core").getTaxonomy)(n);return{hasCreateAction:!!o&&Object(v.get)(r(),["_links","wp:action-create-"+o.rest_base],!1),hasAssignAction:!!o&&Object(v.get)(r(),["_links","wp:action-assign-"+o.rest_base],!1),terms:o?e("core/editor").getEditedPostAttribute(o.rest_base):[],taxonomy:o}})),Object(p.withDispatch)((function(e){return{onUpdateTerms:function(t,n){e("core/editor").editPost(Object(d.a)({},n,t))}}})),Object(co.withFilters)("editor.PostTaxonomyType"))(Li);function Fi(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(Ur.a)(e);if(t){var o=Object(Ur.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(Lr.a)(this,n)}}var Mi=function(){var e=[Object(Zt.__)("Suggestion:"),Object(B.createElement)("span",{className:"editor-post-publish-panel__link",key:"label"},Object(Zt.__)("Add tags"))];return Object(B.createElement)(co.PanelBody,{initialOpen:!1,title:e},Object(B.createElement)("p",null,Object(Zt.__)("Tags help users and search engines navigate your site and find your content. Add a few keywords to describe your post.")),Object(B.createElement)(Ui,{slug:"post_tag"}))},Vi=function(e){Object(Nr.a)(n,e);var t=Fi(n);function n(e){var r;return Object(Rr.a)(this,n),(r=t.call(this,e)).state={hadTagsWhenOpeningThePanel:e.hasTags},r}return Object(Dr.a)(n,[{key:"render",value:function(){return this.state.hadTagsWhenOpeningThePanel?null:Object(B.createElement)(Mi,null)}}]),n}(B.Component),zi=Object(Er.compose)(Object(p.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(v.some)(n.types,(function(e){return e===t})),hasTags:r&&r.length}})),Object(Er.ifCondition)((function(e){var t=e.areTagsFetched;return e.isPostTypeSupported&&t})))(Vi),Hi=function(e,t){var n=ri.filter((function(t){return Object(v.includes)(e,t.id)}));return Object(v.find)(n,(function(e){return e.id===t}))},Wi=function(e){var t=e.suggestedPostFormat,n=e.suggestionText,r=e.onUpdatePostFormat;return Object(B.createElement)(co.Button,{isLink:!0,onClick:function(){return r(t)}},n)};function Gi(){var e=Object(p.useSelect)((function(e){var t=e("core/editor"),n=t.getEditedPostAttribute,r=t.getSuggestedPostFormat,o=Object(v.get)(e("core").getThemeSupports(),["formats"],[]);return{currentPostFormat:n("format"),suggestion:Hi(o,r())}}),[]),t=e.currentPostFormat,n=e.suggestion,r=Object(p.useDispatch)("core/editor").editPost,o=[Object(Zt.__)("Suggestion:"),Object(B.createElement)("span",{className:"editor-post-publish-panel__link",key:"label"},Object(Zt.__)("Use a post format"))];return n&&n.id!==t?Object(B.createElement)(co.PanelBody,{initialOpen:!1,title:o},Object(B.createElement)("p",null,Object(Zt.__)("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(B.createElement)("p",null,Object(B.createElement)(Wi,{onUpdatePostFormat:function(e){return r({format:e})},suggestedPostFormat:n.id,suggestionText:Object(Zt.sprintf)(Object(Zt.__)('Apply the "%1$s" format.'),n.caption)}))):null}var Ki=Object(p.withSelect)((function(e){var t=e("core/editor"),n=t.getCurrentPost,r=t.isEditedPostBeingScheduled;return{hasPublishAction:Object(v.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(Zt.__)("Are you ready to schedule?"),n=Object(Zt.__)("Your work will be published at the specified date and time.")):(t=Object(Zt.__)("Are you ready to publish?"),n=Object(Zt.__)("Double-check your settings before publishing.")):(t=Object(Zt.__)("Are you ready to submit for review?"),n=Object(Zt.__)("When youre ready, submit your work for review, and an Editor will be able to approve it for you.")),Object(B.createElement)("div",{className:"editor-post-publish-panel__prepublish"},Object(B.createElement)("div",null,Object(B.createElement)("strong",null,t)),Object(B.createElement)("p",null,n),r&&Object(B.createElement)(B.Fragment,null,Object(B.createElement)(co.PanelBody,{initialOpen:!1,title:[Object(Zt.__)("Visibility:"),Object(B.createElement)("span",{className:"editor-post-publish-panel__link",key:"label"},Object(B.createElement)(Ei,null))]},Object(B.createElement)(Si,null)),Object(B.createElement)(co.PanelBody,{initialOpen:!1,title:[Object(Zt.__)("Publish:"),Object(B.createElement)("span",{className:"editor-post-publish-panel__link",key:"label"},Object(B.createElement)(Ci,null))]},Object(B.createElement)(wi,null))),Object(B.createElement)(Gi,null),Object(B.createElement)(zi,null),i)})),qi=n(69);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(Ur.a)(e);if(t){var o=Object(Ur.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(Lr.a)(this,n)}}var $i=function(e){Object(Nr.a)(n,e);var t=Qi(n);function n(){var e;return Object(Rr.a)(this,n),(e=t.apply(this,arguments)).state={showCopyConfirmation:!1},e.onCopy=e.onCopy.bind(Object(So.a)(e)),e.onSelectInput=e.onSelectInput.bind(Object(So.a)(e)),e.postLink=Object(B.createRef)(),e}return Object(Dr.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(v.get)(o,["labels","singular_name"]),c=Object(v.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(B.createElement)(B.Fragment,null,Object(Zt.__)("is now scheduled. It will go live on")," ",Object(B.createElement)(Ci,null),"."):Object(Zt.__)("is now live.");return Object(B.createElement)("div",{className:"post-publish-panel__postpublish"},Object(B.createElement)(co.PanelBody,{className:"post-publish-panel__postpublish-header"},Object(B.createElement)("a",{ref:this.postLink,href:a},Object(qi.decodeEntities)(r.title)||Object(Zt.__)("(no title)"))," ",s),Object(B.createElement)(co.PanelBody,null,Object(B.createElement)("p",{className:"post-publish-panel__postpublish-subheader"},Object(B.createElement)("strong",null,Object(Zt.__)("Whats next?"))),Object(B.createElement)(co.TextControl,{className:"post-publish-panel__postpublish-post-address",readOnly:!0,label:Object(Zt.sprintf)(Object(Zt.__)("%s address"),i),value:Object(C.safeDecodeURIComponent)(a),onFocus:this.onSelectInput}),Object(B.createElement)("div",{className:"post-publish-panel__postpublish-buttons"},!n&&Object(B.createElement)(co.Button,{isSecondary:!0,href:a},c),Object(B.createElement)(co.ClipboardButton,{isSecondary:!0,text:a,onCopy:this.onCopy},this.state.showCopyConfirmation?Object(Zt.__)("Copied!"):Object(Zt.__)("Copy Link")))),t)}}]),n}(B.Component),Yi=Object(p.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()}}))($i);function Xi(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(Ur.a)(e);if(t){var o=Object(Ur.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(Lr.a)(this,n)}}var Ji=function(e){Object(Nr.a)(n,e);var t=Xi(n);function n(){var e;return Object(Rr.a)(this,n),(e=t.apply(this,arguments)).onSubmit=e.onSubmit.bind(Object(So.a)(e)),e}return Object(Dr.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,s=e.onClose,u=e.onTogglePublishSidebar,l=e.PostPublishExtension,d=e.PrePublishExtension,p=Object($t.a)(e,["forceIsDirty","forceIsSaving","isBeingScheduled","isPublished","isPublishSidebarEnabled","isScheduled","isSaving","onClose","onTogglePublishSidebar","PostPublishExtension","PrePublishExtension"]),b=Object(v.omit)(p,["hasPublishAction","isDirty","isPostTypeViewable"]),f=o||c&&r,h=!f&&!a,m=f&&!a;return Object(B.createElement)("div",Object(Sr.a)({className:"editor-post-publish-panel"},b),Object(B.createElement)("div",{className:"editor-post-publish-panel__header"},m?Object(B.createElement)(co.Button,{onClick:s,icon:yi.a,label:Object(Zt.__)("Close panel")}):Object(B.createElement)(B.Fragment,null,Object(B.createElement)("div",{className:"editor-post-publish-panel__header-publish-button"},Object(B.createElement)(ji,{focusOnMount:!0,onSubmit:this.onSubmit,forceIsDirty:t,forceIsSaving:n})),Object(B.createElement)("div",{className:"editor-post-publish-panel__header-cancel-button"},Object(B.createElement)(co.Button,{onClick:s,isSecondary:!0},Object(Zt.__)("Cancel"))))),Object(B.createElement)("div",{className:"editor-post-publish-panel__content"},h&&Object(B.createElement)(Ki,null,d&&Object(B.createElement)(d,null)),m&&Object(B.createElement)(Yi,{focusOnMount:!0},l&&Object(B.createElement)(l,null)),a&&Object(B.createElement)(co.Spinner,null)),Object(B.createElement)("div",{className:"editor-post-publish-panel__footer"},Object(B.createElement)(co.CheckboxControl,{label:Object(Zt.__)("Always show pre-publish checks."),checked:i,onChange:u})))}}]),n}(B.Component),Zi=Object(Er.compose)([Object(p.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(v.get)(r(),["_links","wp:action-publish"],!1),isPostTypeViewable:Object(v.get)(d,["viewable"],!1),isBeingScheduled:a(),isDirty:s(),isPublished:i(),isPublishSidebarEnabled:l(),isSaving:u(),isScheduled:c()}})),Object(p.withDispatch)((function(e,t){var n=t.isPublishSidebarEnabled,r=e("core/editor"),o=r.disablePublishSidebar,i=r.enablePublishSidebar;return{onTogglePublishSidebar:function(){n?o():i()}}})),co.withFocusReturn,co.withConstrainedTabbing])(Ji),ec=n(141),tc=Object(B.createElement)(so.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(B.createElement)(so.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"})),nc=n(161),rc=Object(B.createElement)(so.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(B.createElement)(so.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 oc=Object(Er.compose)([Object(p.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(p.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(Er.useViewportMatch)("small","<");return n||r?Object(B.createElement)(co.Button,{className:"editor-post-switch-to-draft",onClick:function(){var e;n?e=Object(Zt.__)("Are you sure you want to unpublish this post?"):r&&(e=Object(Zt.__)("Are you sure you want to unschedule this post?")),window.confirm(e)&&o()},disabled:t,isTertiary:!0},i?Object(Zt.__)("Draft"):Object(Zt.__)("Switch to draft")):null}));function ic(e){var t=e.forceIsDirty,n=e.forceIsSaving,r=e.showIconLabels,o=void 0!==r&&r,i=Object(B.useState)(!1),c=Object(E.a)(i,2),a=c[0],s=c[1],u=Object(Er.useViewportMatch)("small"),l=Object(p.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]),d=l.isAutosaving,b=l.isDirty,f=l.isNew,h=l.isPending,m=l.isPublished,v=l.isSaveable,O=l.isSaving,g=l.isScheduled,j=l.hasPublishAction,y=Object(p.useDispatch)("core/editor").savePost,_=Object(Er.usePrevious)(O);if(Object(B.useEffect)((function(){var e;return _&&!O&&(s(!0),e=setTimeout((function(){s(!1)}),1e3)),function(){return clearTimeout(e)}}),[O]),O){var k=Hr()("editor-post-saved-state","is-saving",{"is-autosaving":d});return Object(B.createElement)(co.Animate,{type:"loading"},(function(e){var t=e.className;return Object(B.createElement)("span",{className:Hr()(k,t)},Object(B.createElement)(ec.a,{icon:tc}),d?Object(Zt.__)("Autosaving"):Object(Zt.__)("Saving"))}))}if(m||g)return Object(B.createElement)(oc,null);if(!v)return null;if(a||!f&&!b)return Object(B.createElement)("span",{className:"editor-post-saved-state is-saved"},Object(B.createElement)(ec.a,{icon:nc.a}),Object(Zt.__)("Saved"));if(!j&&h)return null;var P=h?Object(Zt.__)("Save as pending"):Object(Zt.__)("Save draft"),S=Object(Zt.__)("Save");return u?Object(B.createElement)(co.Button,{className:"editor-post-save-draft",onClick:function(){return y()},shortcut:ao.displayShortcut.primary("s"),isTertiary:!0},P):Object(B.createElement)(co.Button,{className:"editor-post-save-draft",label:P,onClick:function(){return y()},shortcut:ao.displayShortcut.primary("s"),icon:rc},o&&S)}var cc=Object(Er.compose)([Object(p.withSelect)((function(e){var t=e("core/editor"),n=t.getCurrentPost,r=t.getCurrentPostType;return{hasPublishAction:Object(v.get)(n(),["_links","wp:action-publish"],!1),postType:r()}}))])((function(e){var t=e.hasPublishAction,n=e.children;return t?n:null}));function ac(e){var t=e.children;return Object(B.createElement)(Ao,{supportKeys:"slug"},t)}function sc(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(Ur.a)(e);if(t){var o=Object(Ur.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(Lr.a)(this,n)}}var uc=function(e){Object(Nr.a)(n,e);var t=sc(n);function n(e){var r,o=e.postSlug,i=e.postTitle,c=e.postID;return Object(Rr.a)(this,n),(r=t.apply(this,arguments)).state={editedSlug:Object(C.safeDecodeURIComponent)(o)||V(i)||c},r.setSlug=r.setSlug.bind(Object(So.a)(r)),r}return Object(Dr.a)(n,[{key:"setSlug",value:function(e){var t=this.props,n=t.postSlug,r=t.onUpdateSlug,o=V(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(B.createElement)(ac,null,Object(B.createElement)("label",{htmlFor:r},Object(Zt.__)("Slug")),Object(B.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}(B.Component),lc=Object(Er.compose)([Object(p.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(p.withDispatch)((function(e){var t=e("core/editor").editPost;return{onUpdateSlug:function(e){t({slug:e})}}})),Er.withInstanceId])(uc);var dc=Object(Er.compose)([Object(p.withSelect)((function(e){var t=e("core/editor").getCurrentPost();return{hasStickyAction:Object(v.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 pc=Object(Er.compose)([Object(p.withSelect)((function(e){return{postSticky:e("core/editor").getEditedPostAttribute("sticky")}})),Object(p.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(B.createElement)(dc,null,Object(B.createElement)(co.CheckboxControl,{label:Object(Zt.__)("Stick to the top of the blog"),checked:r,onChange:function(){return t(!r)}}))}));function bc(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?bc(Object(n),!0).forEach((function(t){Object(d.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bc(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function hc(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(Ur.a)(e);if(t){var o=Object(Ur.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(Lr.a)(this,n)}}var mc={per_page:-1,orderby:"name",order:"asc",_fields:"id,name,parent"},vc=function(e){Object(Nr.a)(n,e);var t=hc(n);function n(){var e;return Object(Rr.a)(this,n),(e=t.apply(this,arguments)).findTerm=e.findTerm.bind(Object(So.a)(e)),e.onChange=e.onChange.bind(Object(So.a)(e)),e.onChangeFormName=e.onChangeFormName.bind(Object(So.a)(e)),e.onChangeFormParent=e.onChangeFormParent.bind(Object(So.a)(e)),e.onAddTerm=e.onAddTerm.bind(Object(So.a)(e)),e.onToggleForm=e.onToggleForm.bind(Object(So.a)(e)),e.setFilterValue=e.setFilterValue.bind(Object(So.a)(e)),e.sortBySelected=e.sortBySelected.bind(Object(So.a)(e)),e.state={loading:!0,availableTermsTree:[],availableTerms:[],adding:!1,formName:"",formParent:"",showForm:!1,filterValue:"",filteredTermsTree:[]},e}return Object(Dr.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(v.without)(o,e):[].concat(Object(Yt.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(v.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(v.some)(i,(function(e){return e===p.id}))||r([].concat(Object(Yt.a)(i),[p.id]),o.rest_base),void this.setState({formName:"",formParent:""});this.setState({adding:!0}),this.addRequest=Ir()({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=Ir()({path:Object(C.addQueryArgs)("/wp/v2/".concat(o.rest_base),fc(fc({},mc),{},{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(v.find)(t.state.availableTerms,(function(t){return t.id===e.id}))?t.state.availableTerms:[e].concat(Object(Yt.a)(t.state.availableTerms)),a=Object(Zt.sprintf)(Object(Zt._x)("%s added","term"),Object(v.get)(t.props.taxonomy,["labels","singular_name"],"category"===c?Object(Zt.__)("Category"):Object(Zt.__)("Term")));t.props.speak(a,"assertive"),t.addRequest=null,t.setState({adding:!1,formName:"",formParent:"",availableTerms:n,availableTermsTree:t.sortBySelected(Uo(n))}),r([].concat(Object(Yt.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(v.invoke)(this.fetchRequest,["abort"]),Object(v.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=Ir()({path:Object(C.addQueryArgs)("/wp/v2/".concat(t.rest_base),mc)}),this.fetchRequest.then((function(t){var n=e.sortBySelected(Uo(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(Zt.sprintf)(Object(Zt._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=fc({},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(B.createElement)("div",{key:e.id,className:"editor-post-taxonomies__hierarchical-terms-choice"},Object(B.createElement)(co.CheckboxControl,{checked:-1!==r.indexOf(e.id),onChange:function(){var n=parseInt(e.id,10);t.onChange(n)},label:Object(v.unescape)(e.name)}),!!e.children.length&&Object(B.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,p=i.showForm,b=i.filterValue,f=function(e,r,o){return Object(v.get)(n,["labels",e],"category"===t?r:o)},h=f("add_new_item",Object(Zt.__)("Add new category"),Object(Zt.__)("Add new term")),m=f("new_item_name",Object(Zt.__)("Add new category"),Object(Zt.__)("Add new term")),O=f("parent_item",Object(Zt.__)("Parent Category"),Object(Zt.__)("Parent Term")),g="— ".concat(O," —"),j=h,y="editor-post-taxonomies__hierarchical-terms-input-".concat(r),_="editor-post-taxonomies__hierarchical-terms-filter-".concat(r),k=Object(v.get)(this.props.taxonomy,["labels","search_items"],Object(Zt.__)("Search Terms")),P=Object(v.get)(this.props.taxonomy,["name"],Object(Zt.__)("Terms")),S=a.length>=8;return[S&&Object(B.createElement)("label",{key:"filter-label",htmlFor:_},k),S&&Object(B.createElement)("input",{type:"search",id:_,value:b,onChange:this.setFilterValue,className:"editor-post-taxonomies__hierarchical-terms-filter",key:"term-filter-input"}),Object(B.createElement)("div",{className:"editor-post-taxonomies__hierarchical-terms-list",key:"term-list",tabIndex:"0",role:"group","aria-label":P},this.renderTerms(""!==b?s:c)),!d&&o&&Object(B.createElement)(co.Button,{key:"term-add-button",onClick:this.onToggleForm,className:"editor-post-taxonomies__hierarchical-terms-add","aria-expanded":p,isLink:!0},h),p&&Object(B.createElement)("form",{onSubmit:this.onAddTerm,key:"hierarchical-terms-form"},Object(B.createElement)("label",{htmlFor:y,className:"editor-post-taxonomies__hierarchical-terms-label"},m),Object(B.createElement)("input",{type:"text",id:y,className:"editor-post-taxonomies__hierarchical-terms-input",value:u,onChange:this.onChangeFormName,required:!0}),!!a.length&&Object(B.createElement)(co.TreeSelect,{label:O,noOptionLabel:g,onChange:this.onChangeFormParent,selectedId:l,tree:c}),Object(B.createElement)(co.Button,{isSecondary:!0,type:"submit",className:"editor-post-taxonomies__hierarchical-terms-submit"},j))]}}]),n}(B.Component),Oc=Object(Er.compose)([Object(p.withSelect)((function(e,t){var n=t.slug,r=e("core/editor").getCurrentPost,o=(0,e("core").getTaxonomy)(n);return{hasCreateAction:!!o&&Object(v.get)(r(),["_links","wp:action-create-"+o.rest_base],!1),hasAssignAction:!!o&&Object(v.get)(r(),["_links","wp:action-assign-"+o.rest_base],!1),terms:o?e("core/editor").getEditedPostAttribute(o.rest_base):[],taxonomy:o}})),Object(p.withDispatch)((function(e){return{onUpdateTerms:function(t,n){e("core/editor").editPost(Object(d.a)({},n,t))}}})),co.withSpokenMessages,Er.withInstanceId,Object(co.withFilters)("editor.PostTaxonomyType")])(vc);var gc=Object(Er.compose)([Object(p.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?v.identity:r,i=Object(v.filter)(n,(function(e){return Object(v.includes)(e.types,t)}));return Object(v.filter)(i,(function(e){return e.visibility.show_ui})).map((function(e){var t=e.hierarchical?Oc:Ui;return Object(B.createElement)(B.Fragment,{key:"taxonomy-".concat(e.slug)},o(Object(B.createElement)(t,{slug:e.slug}),e))}))}));var jc=Object(Er.compose)([Object(p.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(v.some)(n,(function(e){return Object(v.includes)(e.types,t)}))?r:null})),yc=n(100),_c=n.n(yc);function kc(){var e=Object(p.useSelect)((function(e){return e("core/editor").getEditedPostContent()}),[]),t=Object(p.useDispatch)("core/editor"),n=t.editPost,r=t.resetEditorBlocks,o=Object(B.useState)(e),i=Object(E.a)(o,2),a=i[0],s=i[1],u=Object(B.useState)(!1),l=Object(E.a)(u,2),d=l[0],b=l[1],f=Object(Er.useInstanceId)(kc);d||a===e||s(e);return Object(B.createElement)(B.Fragment,null,Object(B.createElement)(co.VisuallyHidden,{as:"label",htmlFor:"post-content-".concat(f)},Object(Zt.__)("Type text or HTML")),Object(B.createElement)(_c.a,{autoComplete:"off",dir:"auto",value:a,onChange:function(e){var t=e.target.value;n({content:t}),s(t),b(!0)},onBlur:function(){if(d){var e=Object(c.parse)(a);r(e),b(!1)}},className:"editor-post-text-editor",id:"post-content-".concat(f),placeholder:Object(Zt.__)("Start writing with text or HTML")}))}function Pc(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(Ur.a)(e);if(t){var o=Object(Ur.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(Lr.a)(this,n)}}var Sc=/[\r\n]+/g,Ec=function(e){Object(Nr.a)(n,e);var t=Pc(n);function n(){var e;return Object(Rr.a)(this,n),(e=t.apply(this,arguments)).onChange=e.onChange.bind(Object(So.a)(e)),e.onSelect=e.onSelect.bind(Object(So.a)(e)),e.onUnselect=e.onUnselect.bind(Object(So.a)(e)),e.onKeyDown=e.onKeyDown.bind(Object(So.a)(e)),e.onPaste=e.onPaste.bind(Object(So.a)(e)),e.state={isSelected:!1},e}return Object(Dr.a)(n,[{key:"onSelect",value:function(){this.setState({isSelected:!0}),this.props.clearSelectedBlock()}},{key:"onUnselect",value:function(){this.setState({isSelected:!1})}},{key:"onChange",value:function(e){var t=e.target.value.replace(Sc," ");this.props.onUpdate(t)}},{key:"onKeyDown",value:function(e){e.keyCode===ao.ENTER&&(e.preventDefault(),this.props.onEnterPress())}},{key:"onPaste",value:function(e){var t=this.props,n=t.title,r=t.onInsertBlockAfter,o=t.onUpdate,i=e.clipboardData,a="",s="";try{a=i.getData("text/plain"),s=i.getData("text/html")}catch(e){try{s=i.getData("Text")}catch(e){return}}window.console.log("Received HTML:\n\n",s),window.console.log("Received plain text:\n\n",a);var u=Object(c.pasteHandler)({HTML:s,plainText:a});if("string"!=typeof u&&u.length){e.preventDefault();var l=Object(E.a)(u,1)[0];n||"core/heading"!==l.name&&"core/paragraph"!==l.name?r(u):(o(l.attributes.content),r(u.slice(1)))}}},{key:"render",value:function(){var e=this.props,t=e.hasFixedToolbar,n=e.isCleanNewPost,r=e.isFocusMode,o=e.instanceId,i=e.placeholder,c=e.title,a=this.state.isSelected,s=Hr()("wp-block editor-post-title editor-post-title__block",{"is-selected":a,"is-focus-mode":r,"has-fixed-toolbar":t}),u=Object(qi.decodeEntities)(i);return Object(B.createElement)(Ao,{supportKeys:"title"},Object(B.createElement)("div",{className:s},Object(B.createElement)(co.VisuallyHidden,{as:"label",htmlFor:"post-title-".concat(o)},u||Object(Zt.__)("Add title")),Object(B.createElement)(_c.a,{id:"post-title-".concat(o),className:"editor-post-title__input",value:c,onChange:this.onChange,placeholder:u||Object(Zt.__)("Add title"),onFocus:this.onSelect,onBlur:this.onUnselect,onKeyDown:this.onKeyDown,onKeyPress:this.onUnselect,onPaste:this.onPaste,autoFocus:(document.body===document.activeElement||!document.activeElement)&&n})))}}]),n}(B.Component),wc=Object(p.withSelect)((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}})),Cc=Object(p.withDispatch)((function(e){var t=e("core/block-editor"),n=t.insertDefaultBlock,r=t.clearSelectedBlock,o=t.insertBlocks,i=e("core/editor").editPost;return{onEnterPress:function(){n(void 0,void 0,0)},onInsertBlockAfter:function(e){o(e,0)},onUpdate:function(e){i({title:e})},clearSelectedBlock:r}})),Tc=Object(Er.compose)(wc,Cc,Er.withInstanceId)(Ec);var xc=Object(Er.compose)([Object(p.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(p.withDispatch)((function(e){return{trashPost:e("core/editor").trashPost}}))])((function(e){var t=e.isNew,n=e.postId,r=e.postType,o=Object($t.a)(e,["isNew","postId","postType"]);return t||!n?null:Object(B.createElement)(co.Button,{className:"editor-post-trash",isDestructive:!0,isTertiary:!0,onClick:function(){return o.trashPost(n,r)}},Object(Zt.__)("Move to trash"))}));var Bc=Object(p.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 Ic=Object(Er.compose)([Object(p.withSelect)((function(e){var t=e("core/editor"),n=t.getCurrentPost,r=t.getCurrentPostType;return{hasPublishAction:Object(v.get)(n(),["_links","wp:action-publish"],!1),postType:r()}}))])((function(e){var t=e.hasPublishAction;return(0,e.render)({canEdit:t})})),Ac=Object(B.createElement)(so.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(B.createElement)(so.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"})),Rc=n(128);function Dc(){var e=Object(p.useSelect)((function(e){return e("core/editor").getEditedPostAttribute("content")})),t=Object(Zt._x)("words","Word count type. Do not translate!");return Object(B.createElement)("span",{className:"word-count"},Object(Rc.count)(e,t))}function Nc(){var e=Object(p.useSelect)((function(e){return e("core/editor").getEditedPostAttribute("content")}));return Object(Rc.count)(e,"characters_including_spaces")}var Lc=function(e){var t=e.hasOutlineItemsDisabled,n=e.onRequestClose,r=Object(p.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(B.createElement)(B.Fragment,null,Object(B.createElement)("div",{className:"table-of-contents__wrapper",role:"note","aria-label":Object(Zt.__)("Document Statistics"),tabIndex:"0"},Object(B.createElement)("ul",{role:"list",className:"table-of-contents__counts"},Object(B.createElement)("li",{className:"table-of-contents__count"},Object(Zt.__)("Characters"),Object(B.createElement)("span",{className:"table-of-contents__number"},Object(B.createElement)(Nc,null))),Object(B.createElement)("li",{className:"table-of-contents__count"},Object(Zt.__)("Words"),Object(B.createElement)(Dc,null)),Object(B.createElement)("li",{className:"table-of-contents__count"},Object(Zt.__)("Headings"),Object(B.createElement)("span",{className:"table-of-contents__number"},o)),Object(B.createElement)("li",{className:"table-of-contents__count"},Object(Zt.__)("Paragraphs"),Object(B.createElement)("span",{className:"table-of-contents__number"},i)),Object(B.createElement)("li",{className:"table-of-contents__count"},Object(Zt.__)("Blocks"),Object(B.createElement)("span",{className:"table-of-contents__number"},c)))),o>0&&Object(B.createElement)(B.Fragment,null,Object(B.createElement)("hr",null),Object(B.createElement)("h2",{className:"table-of-contents__title"},Object(Zt.__)("Document Outline")),Object(B.createElement)(Jr,{onSelect:n,hasOutlineItemsDisabled:t})))};var Uc=Object(B.forwardRef)((function(e,t){var n=e.hasOutlineItemsDisabled,r=e.repositionDropdown,o=Object($t.a)(e,["hasOutlineItemsDisabled","repositionDropdown"]),i=Object(p.useSelect)((function(e){return!!e("core/block-editor").getBlockCount()}),[]);return Object(B.createElement)(co.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(B.createElement)(co.Button,Object(Sr.a)({},o,{ref:t,onClick:i?r:void 0,icon:Ac,"aria-expanded":n,"aria-haspopup":"true",label:Object(Zt.__)("Details"),tooltipPosition:"bottom","aria-disabled":!i}))},renderContent:function(e){var t=e.onClose;return Object(B.createElement)(Lc,{onRequestClose:t,hasOutlineItemsDisabled:n})}})}));function Fc(){var e=Object(p.useSelect)((function(e){return function(){return(0,e("core").__experimentalGetDirtyEntityRecords)().length>0}}),[]),t=function(t){if(e())return t.returnValue=Object(Zt.__)("You have unsaved changes. If you proceed, they will be lost."),t.returnValue};return Object(B.useEffect)((function(){return window.addEventListener("beforeunload",t),function(){window.removeEventListener("beforeunload",t)}}),[]),null}var Mc=n(45),Vc=Object(Er.createHigherOrderComponent)((function(e){return Object(p.withRegistry)((function(t){var n=t.useSubRegistry,r=void 0===n||n,o=t.registry,c=Object($t.a)(t,["useSubRegistry","registry"]);if(!r)return Object(B.createElement)(e,c);var a=Object(B.useState)(null),s=Object(E.a)(a,2),u=s[0],l=s[1];return Object(B.useEffect)((function(){var e=Object(p.createRegistry)({"core/block-editor":i.storeConfig},o);e.registerStore("core/editor",Pr),l(e)}),[o]),u?Object(B.createElement)(p.RegistryProvider,{value:u},Object(B.createElement)(e,c)):null}))}),"withRegistryProvider"),zc=n(155);function Hc(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 Wc(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Hc(Object(n),!0).forEach((function(t){Object(d.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Hc(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Gc(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?v.noop:c,s=e.onFileChange,u=Object(p.select)("core/editor"),l=u.getCurrentPostId,d=u.getEditorSettings,b=d().allowedMimeTypes;i=i||d().maxUploadFileSize,Object(zc.uploadMedia)({allowedTypes:r,filesList:o,onFileChange:s,additionalData:Wc({post:l()},n),maxUploadFileSize:i,onError:function(e){var t=e.message;return a(t)},wpAllowedMimeTypes:b})}var Kc=Object(Er.compose)([Object(p.withSelect)((function(e){var t=e("core/block-editor"),n=t.getBlockRootClientId,r=t.getBlocksByClientId,o=t.canInsertBlockType,i=t.getSelectedBlockClientIds,c=e("core/blocks").getGroupingBlockName,a=i(),s=c(),u=o(s,a&&a.length>0?n(a[0]):void 0),l=r(a),d=1===l.length&&l[0]&&l[0].name===s;return{clientIds:a,isGroupable:u&&l.length&&!d,isUngroupable:d&&!!l[0].innerBlocks.length,blocksSelection:l,groupingBlockName:s}})),Object(p.withDispatch)((function(e,t){var n=t.clientIds,r=t.blocksSelection,o=void 0===r?[]:r,i=t.groupingBlockName,a=e("core/block-editor").replaceBlocks;return{onConvertToGroup:function(){var e=Object(c.switchToBlockType)(o,i);e&&a(n,e)},onConvertFromGroup:function(){var e=o[0].innerBlocks;e.length&&a(n,e)}}}))])((function(e){var t=e.onConvertToGroup,n=e.onConvertFromGroup,r=e.isGroupable,o=void 0!==r&&r,c=e.isUngroupable,a=void 0!==c&&c;return o||a?Object(B.createElement)(i.BlockSettingsMenuControls,null,(function(e){var r=e.onClose;return Object(B.createElement)(B.Fragment,null,o&&Object(B.createElement)(co.MenuItem,{onClick:function(){t(),r()}},Object(Zt._x)("Group","verb")),a&&Object(B.createElement)(co.MenuItem,{onClick:function(){n(),r()}},Object(Zt._x)("Ungroup","Ungrouping blocks from within a Group block back into individual blocks within the Editor ")))})):null}));function qc(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 Qc(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?qc(Object(n),!0).forEach((function(t){Object(d.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qc(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function $c(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(Ur.a)(e);if(t){var o=Object(Ur.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(Lr.a)(this,n)}}var Yc=function(){var e=Object(Mc.a)(Jt.a.mark((function e(t){var n,r,o,i,c,a,s,u,l,d,p,b=arguments;return Jt.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=b.length>1&&void 0!==b[1]?b[1]:{},r=n.isInitialSuggestions,o=n.type,i=n.subtype,c=n.page,a=n.perPage,s=b.length>2&&void 0!==b[2]?b[2]:{},u=s.disablePostFormats,l=void 0!==u&&u,d=a||r?3:20,p=[],o&&"post"!==o||p.push(Ir()({path:Object(C.addQueryArgs)("/wp/v2/search",{search:t,page:c,per_page:d,type:"post",subtype:i})}).catch((function(){return[]}))),o&&"term"!==o||p.push(Ir()({path:Object(C.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(Ir()({path:Object(C.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(v.map)(Object(v.flatten)(e).filter((function(e){return!!e.id})).slice(0,d),(function(e){return{id:e.id,url:e.url,title:Object(qi.decodeEntities)(e.title)||Object(Zt.__)("(no title)"),type:e.subtype||e.type}}))})));case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),Xc=function(e){Object(Nr.a)(n,e);var t=$c(n);function n(e){var r;return Object(Rr.a)(this,n),(r=t.apply(this,arguments)).getBlockEditorSettings=L()(r.getBlockEditorSettings,{maxSize:1}),r.getDefaultBlockContext=L()(r.getDefaultBlockContext,{maxSize:1}),e.recovery?Object(Lr.a)(r):(e.updatePostLock(e.settings.postLock),e.setupEditor(e.post,e.initialEdits,e.settings.template),e.settings.autosave&&e.createWarningNotice(Object(Zt.__)("There is an autosave of this post that is more recent than the version below."),{id:"autosave-exists",actions:[{label:Object(Zt.__)("View the autosave"),url:e.settings.autosave.editLink}]}),r)}return Object(Dr.a)(n,[{key:"getBlockEditorSettings",value:function(e,t,n,r,o,i){return Qc(Qc({},Object(v.pick)(e,["__experimentalBlockDirectory","__experimentalBlockPatterns","__experimentalBlockPatternCategories","__experimentalEnableFullSiteEditing","__experimentalEnableFullSiteEditingDemo","__experimentalFeatures","__experimentalGlobalStylesUserEntityId","__experimentalGlobalStylesBaseStyles","__experimentalGlobalStylesContexts","__experimentalPreferredStyleVariations","__experimentalSetIsInserterOpened","alignWide","allowedBlockTypes","availableLegacyWidgets","bodyPlaceholder","codeEditingEnabled","colors","disableCustomColors","disableCustomFontSizes","disableCustomGradients","enableCustomUnits","enableCustomLineHeight","focusMode","fontSizes","gradients","hasFixedToolbar","hasReducedUI","imageEditing","imageSizes","imageDimensions","isRTL","keepCaretInsideBlock","maxWidth","onUpdateDefaultBlockStyles","styles","template","templateLock","titlePlaceholder"])),{},{mediaUpload:n?Gc:void 0,__experimentalReusableBlocks:t,__experimentalFetchLinkSuggestions:Object(v.partialRight)(Yc,e),__experimentalCanUserUseUnfilteredHTML:r,__experimentalUndo:o,__experimentalShouldInsertAtTheTop:i})}},{key:"getDefaultBlockContext",value:function(e,t){return{postId:e,postType:t}}},{key:"componentDidMount",value:function(){this.props.updateEditorSettings(this.props.settings)}},{key:"componentDidUpdate",value:function(e){this.props.settings!==e.settings&&this.props.updateEditorSettings(this.props.settings)}},{key:"componentWillUnmount",value:function(){this.props.tearDownEditor()}},{key:"render",value:function(){var e=this.props,t=e.canUserUseUnfilteredHTML,n=e.children,r=e.post,o=e.blocks,c=e.resetEditorBlocks,s=e.selectionStart,l=e.selectionEnd,d=e.isReady,p=e.settings,b=e.reusableBlocks,f=e.resetEditorBlocksWithoutUndoLevel,h=e.hasUploadPermissions,m=e.isPostTitleSelected,v=e.undo;if(!d)return null;var O=this.getBlockEditorSettings(p,b,h,t,v,m),g=this.getDefaultBlockContext(r.id,r.type);return Object(B.createElement)(B.Fragment,null,Object(B.createElement)(i.__unstableEditorStyles,{styles:p.styles}),Object(B.createElement)(a.EntityProvider,{kind:"root",type:"site"},Object(B.createElement)(a.EntityProvider,{kind:"postType",type:r.type,id:r.id},Object(B.createElement)(i.BlockContextProvider,{value:g},Object(B.createElement)(i.BlockEditorProvider,{value:o,onInput:f,onChange:c,selectionStart:s,selectionEnd:l,settings:O,useSubRegistry:!1},n,Object(B.createElement)(u.ReusableBlocksMenuItems,null),Object(B.createElement)(Kc,null))))))}}]),n}(B.Component),Jc=Object(Er.compose)([Vc,Object(p.withSelect)((function(e){var t=e("core/editor"),n=t.canUserUseUnfilteredHTML,r=t.__unstableIsEditorReady,o=t.getEditorBlocks,i=t.getEditorSelectionStart,c=t.getEditorSelectionEnd,a=t.isPostTitleSelected,s=e("core").canUser;return{canUserUseUnfilteredHTML:n(),isReady:r(),blocks:o(),selectionStart:i(),selectionEnd:c(),reusableBlocks:e("core").getEntityRecords("postType","wp_block",{per_page:-1}),hasUploadPermissions:Object(v.defaultTo)(s("create","media"),!0),isPostTitleSelected:a&&a()}})),Object(p.withDispatch)((function(e){var t=e("core/editor"),n=t.setupEditor,r=t.updatePostLock,o=t.resetEditorBlocks,i=t.updateEditorSettings,c=t.__experimentalTearDownEditor,a=t.undo;return{setupEditor:n,updatePostLock:r,createWarningNotice:e("core/notices").createWarningNotice,resetEditorBlocks:o,updateEditorSettings:i,resetEditorBlocksWithoutUndoLevel:function(e,t){o(e,Qc(Qc({},t),{},{__unstableShouldCreateUndoLevel:!1}))},tearDownEditor:c,undo:a}}))])(Xc),Zc=n(87),ea=n.n(Zc);function ta(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=Object(B.forwardRef)((function(n,r){return x()("wp.editor."+e,{alternative:"wp.blockEditor."+e}),Object(B.createElement)(t,Object(Sr.a)({ref:r},n))}));return n.forEach((function(n){r[n]=ta(e+"."+n,t[n])})),r}function na(e,t){return function(){return x()("wp.editor."+e,{alternative:"wp.blockEditor."+e}),t.apply(void 0,arguments)}}var ra=ta("RichText",i.RichText,["Content"]);ra.isEmpty=na("RichText.isEmpty",i.RichText.isEmpty);var oa=ta("Autocomplete",i.Autocomplete),ia=ta("AlignmentToolbar",i.AlignmentToolbar),ca=ta("BlockAlignmentToolbar",i.BlockAlignmentToolbar),aa=ta("BlockControls",i.BlockControls,["Slot"]),sa=ta("BlockEdit",i.BlockEdit),ua=ta("BlockEditorKeyboardShortcuts",i.BlockEditorKeyboardShortcuts),la=ta("BlockFormatControls",i.BlockFormatControls,["Slot"]),da=ta("BlockIcon",i.BlockIcon),pa=ta("BlockInspector",i.BlockInspector),ba=ta("BlockList",i.BlockList),fa=ta("BlockMover",i.BlockMover),ha=ta("BlockNavigationDropdown",i.BlockNavigationDropdown),ma=ta("BlockSelectionClearer",i.BlockSelectionClearer),va=ta("BlockSettingsMenu",i.BlockSettingsMenu),Oa=ta("BlockTitle",i.BlockTitle),ga=ta("BlockToolbar",i.BlockToolbar),ja=ta("ColorPalette",i.ColorPalette),ya=ta("ContrastChecker",i.ContrastChecker),_a=ta("CopyHandler",i.CopyHandler),ka=ta("DefaultBlockAppender",i.DefaultBlockAppender),Pa=ta("FontSizePicker",i.FontSizePicker),Sa=ta("Inserter",i.Inserter),Ea=ta("InnerBlocks",i.InnerBlocks,["ButtonBlockAppender","DefaultBlockAppender","Content"]),wa=ta("InspectorAdvancedControls",i.InspectorAdvancedControls,["Slot"]),Ca=ta("InspectorControls",i.InspectorControls,["Slot"]),Ta=ta("PanelColorSettings",i.PanelColorSettings),xa=ta("PlainText",i.PlainText),Ba=ta("RichTextShortcut",i.RichTextShortcut),Ia=ta("RichTextToolbarButton",i.RichTextToolbarButton),Aa=ta("__unstableRichTextInputEvent",i.__unstableRichTextInputEvent),Ra=ta("MediaPlaceholder",i.MediaPlaceholder),Da=ta("MediaUpload",i.MediaUpload),Na=ta("MediaUploadCheck",i.MediaUploadCheck),La=ta("MultiSelectScrollIntoView",i.MultiSelectScrollIntoView),Ua=ta("NavigableToolbar",i.NavigableToolbar),Fa=ta("ObserveTyping",i.ObserveTyping),Ma=ta("PreserveScrollInReorder",i.PreserveScrollInReorder),Va=ta("SkipToSelectedBlock",i.SkipToSelectedBlock),za=ta("URLInput",i.URLInput),Ha=ta("URLInputButton",i.URLInputButton),Wa=ta("URLPopover",i.URLPopover),Ga=ta("Warning",i.Warning),Ka=ta("WritingFlow",i.WritingFlow),qa=na("createCustomColorsHOC",i.createCustomColorsHOC),Qa=na("getColorClassName",i.getColorClassName),$a=na("getColorObjectByAttributeValues",i.getColorObjectByAttributeValues),Ya=na("getColorObjectByColorValue",i.getColorObjectByColorValue),Xa=na("getFontSize",i.getFontSize),Ja=na("getFontSizeClass",i.getFontSizeClass),Za=na("withColorContext",i.withColorContext),es=na("withColors",i.withColors),ts=na("withFontSizes",i.withFontSizes)},47:function(e,t){!function(){e.exports=this.wp.apiFetch}()},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}))},53:function(e,t){!function(){e.exports=this.wp.keyboardShortcuts}()},6:function(e,t){!function(){e.exports=this.wp.blockEditor}()},60:function(e,t,n){e.exports=function(e,t){var n,r,o=0;function i(){var i,c,a=n,s=arguments.length;e:for(;a;){if(a.args.length===arguments.length){for(c=0;c<s;c++)if(a.args[c]!==arguments[c]){a=a.next;continue e}return a!==n&&(a===r&&(r=a.prev),a.prev.next=a.next,a.next&&(a.next.prev=a.prev),a.next=n,a.prev=null,n.prev=a,n=a),a.val}a=a.next}for(i=new Array(s),c=0;c<s;c++)i[c]=arguments[c];return a={args:i,val:e.apply(null,i)},n?(n.prev=a,a.next=n):r=a,o===t.maxSize?(r=r.prev).next=null:o++,n=a,a.val}return t=t||{},i.clear=function(){n=null,r=null,o=0},i}},69:function(e,t){!function(){e.exports=this.wp.htmlEntities}()},7:function(e,t){!function(){e.exports=this.wp.primitives}()},75:function(e,t){!function(){e.exports=this.wp.date}()},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}))},83:function(e,t){!function(){e.exports=this.wp.coreData}()},87:function(e,t){!function(){e.exports=this.wp.serverSideRender}()},9:function(e,t,n){var r;
/*!
Copyright (c) 2017 Jed Watson.
Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames
*/!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)}()},92:function(e,t){!function(){e.exports=this.wp.notices}()}});