WordPress/wp-includes/js/dist/editor.min.js
jorgefilipecosta b667105f60 Editor: update packages; Port block supports to WordPress core.
The following package versions were changed:
@wordpress/a11y: 2.11.0 -> 2.13.0
@wordpress/annotations: 1.20.4 -> 1.22.0
@wordpress/api-fetch: 3.18.0 -> 3.20.0
@wordpress/autop: 2.9.0 -> 2.10.0
@wordpress/blob: 2.9.0 -> 2.10.0
@wordpress/block-directory: 1.13.7 -> 1.16.0
@wordpress/block-editor: 4.3.7 -> 5.0.0
@wordpress/block-library: 2.22.7 -> 2.25.0
@wordpress/block-serialization-default-parser: 3.7.0 -> 3.8.0
@wordpress/blocks: 6.20.3 -> 6.23.0
@wordpress/components: 10.0.6 -> 11.0.0
@wordpress/compose: 3.19.3 -> 3.21.0
@wordpress/core-data: 2.20.3 -> 2.23.0
@wordpress/data: 4.22.3 -> 4.24.0
@wordpress/data-controls: 1.16.3 -> 1.18.0
@wordpress/date: 3.10.0 -> 3.12.0
@wordpress/deprecated: 2.9.0 -> 2.10.0
@wordpress/dom: 2.13.1 -> 2.15.0
@wordpress/dom-ready: 2.10.0 -> 2.11.0
@wordpress/e2e-test-utils: 4.11.2 -> 4.14.0
@wordpress/edit-post: 3.21.7 -> 3.24.0
@wordpress/editor: 9.20.7 -> 9.23.0
@wordpress/element: 2.16.0 -> 2.18.0
@wordpress/escape-html: 1.9.0 -> 1.10.0
@wordpress/format-library: 1.22.7 -> 1.24.0
@wordpress/hooks: 2.9.0 -> 2.10.0
@wordpress/html-entities: 2.8.0 -> 2.9.0
@wordpress/i18n: 3.14.0 -> 3.16.0
@wordpress/icons: 2.4.0 -> 2.7.0
@wordpress/is-shallow-equal: 2.1.0 -> 2.3.0
@wordpress/keyboard-shortcuts: 1.9.3 -> 1.11.0
@wordpress/keycodes: 2.14.0 -> 2.16.0
@wordpress/library-export-default-webpack-plugin: 1.7.0 -> 1.9.0
@wordpress/list-reusable-blocks: 1.21.6 -> 1.23.0
@wordpress/media-utils: 1.15.0 -> 1.17.0
@wordpress/notices: 2.8.3 -> 2.10.0
@wordpress/nux: 3.20.6 -> 3.22.0
@wordpress/plugins: 2.20.3 -> 2.22.0
@wordpress/primitives: 1.7.0 -> 1.9.0
@wordpress/priority-queue: 1.7.0 -> 1.9.0
@wordpress/redux-routine: 3.10.0 -> 3.12.0
@wordpress/rich-text: 3.20.4 -> 3.22.0
@wordpress/scripts: 12.1.1 -> 12.3.0
@wordpress/server-side-render: 1.16.6 -> 1.18.0
@wordpress/shortcode: 2.9.0 -> 2.11.0
@wordpress/token-list: 1.11.0 -> 1.13.0
@wordpress/url: 2.17.0 -> 2.19.0
@wordpress/viewport: 2.21.3 -> 2.23.0
@wordpress/warning: 1.2.0 -> 1.3.0
@wordpress/wordcount: 2.10.0 -> 2.12.0

Props isabel_brison, youknowriad, mcsf.
Fixes #51461.
Built from https://develop.svn.wordpress.org/trunk@49135


git-svn-id: http://core.svn.wordpress.org/trunk@48897 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-13 13:10:30 +00:00

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