/*! 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=363)}({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.blocks}()},11: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-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=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}},22:function(e,t,n){"use strict";var r=n(33);var o=n(34);function i(e,t){return Object(r.a)(e)||function(e,t){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(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)()}n.d(t,"a",(function(){return i}))},23:function(e,t){!function(){e.exports=this.regeneratorRuntime}()},24:function(e,t){!function(){e.exports=this.wp.richText}()},25:function(e,t){!function(){e.exports=this.wp.url}()},27:function(e,t){!function(){e.exports=this.wp.hooks}()},28:function(e,t,n){e.exports=n(88)()},3:function(e,t){!function(){e.exports=this.wp.components}()},31: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}))},32:function(e,t,n){"use strict";function r(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}n.d(t,"a",(function(){return r}))},33:function(e,t,n){"use strict";function r(e){if(Array.isArray(e))return e}n.d(t,"a",(function(){return r}))},34:function(e,t,n){"use strict";function r(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}n.d(t,"a",(function(){return r}))},345:function(e,t,n){"use strict";var r=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["optimist"])}}return{optimist:a,innerState:e}}e.exports=function(e){function t(t,n,o){return t.length&&(t=t.concat([{action:o}])),u(n=e(n,o),o),r({optimist:t},n)}return function(n,a){if(a.optimist)switch(a.optimist.type){case o:return function(t,n){var o=l(t),i=o.optimist,c=o.innerState;return i=i.concat([{beforeState:c,action:n}]),u(c=e(c,n),n),r({optimist:i},c)}(n,a);case i:return function(e,n){var r=l(e),o=r.optimist,i=r.innerState,c=[],a=!1,u=!1;return o.forEach((function(e){a?e.beforeState&&s(e.action,n.optimist.id)?(u=!0,c.push({action:e.action})):c.push(e):e.beforeState&&!s(e.action,n.optimist.id)?(a=!0,c.push(e)):e.beforeState&&s(e.action,n.optimist.id)&&(u=!0)})),u||console.error('Cannot commit transaction with id "'+n.optimist.id+'" because it does not exist'),t(o=c,i,n)}(n,a);case c:return function(n,r){var o=l(n),i=o.optimist,c=o.innerState,a=[],d=!1,p=!1,b=c;return i.forEach((function(t){t.beforeState&&s(t.action,r.optimist.id)&&(b=t.beforeState,p=!0),s(t.action,r.optimist.id)||(t.beforeState&&(d=!0),d&&(p&&t.beforeState?a.push({beforeState:b,action:t.action}):a.push(t)),p&&(b=e(b,t.action),u(c,r)))})),p||console.error('Cannot revert transaction with id "'+r.optimist.id+'" because it does not exist'),t(i=a,b,r)}(n,a)}var d=l(n),p=d.optimist,b=d.innerState;if(n&&!p.length){var f=e(b,a);return f===b?n:(u(f,a),r({optimist:p},f))}return t(p,b,a)}},e.exports.BEGIN=o,e.exports.COMMIT=i,e.exports.REVERT=c},35:function(e,t){!function(){e.exports=this.wp.deprecated}()},363:function(e,t,n){"use strict";n.r(t);var r={};n.r(r),n.d(r,"setupEditor",(function(){return ie})),n.d(r,"__experimentalTearDownEditor",(function(){return ce})),n.d(r,"resetPost",(function(){return ae})),n.d(r,"resetAutosave",(function(){return se})),n.d(r,"__experimentalRequestPostUpdateStart",(function(){return ue})),n.d(r,"__experimentalRequestPostUpdateFinish",(function(){return le})),n.d(r,"updatePost",(function(){return de})),n.d(r,"setupEditorState",(function(){return pe})),n.d(r,"editPost",(function(){return be})),n.d(r,"__experimentalOptimisticUpdatePost",(function(){return fe})),n.d(r,"savePost",(function(){return he})),n.d(r,"refreshPost",(function(){return me})),n.d(r,"trashPost",(function(){return ve})),n.d(r,"autosave",(function(){return Oe})),n.d(r,"__experimentalLocalAutosave",(function(){return ge})),n.d(r,"redo",(function(){return je})),n.d(r,"undo",(function(){return _e})),n.d(r,"createUndoLevel",(function(){return ye})),n.d(r,"updatePostLock",(function(){return ke})),n.d(r,"__experimentalFetchReusableBlocks",(function(){return Ee})),n.d(r,"__experimentalReceiveReusableBlocks",(function(){return Se})),n.d(r,"__experimentalSaveReusableBlock",(function(){return Pe})),n.d(r,"__experimentalDeleteReusableBlock",(function(){return we})),n.d(r,"__experimentalUpdateReusableBlock",(function(){return Ce})),n.d(r,"__experimentalConvertBlockToStatic",(function(){return Te})),n.d(r,"__experimentalConvertBlockToReusable",(function(){return Be})),n.d(r,"enablePublishSidebar",(function(){return xe})),n.d(r,"disablePublishSidebar",(function(){return Ie})),n.d(r,"lockPostSaving",(function(){return Ae})),n.d(r,"unlockPostSaving",(function(){return Re})),n.d(r,"lockPostAutosaving",(function(){return Le})),n.d(r,"unlockPostAutosaving",(function(){return Ne})),n.d(r,"resetEditorBlocks",(function(){return De})),n.d(r,"updateEditorSettings",(function(){return Ue})),n.d(r,"resetBlocks",(function(){return Me})),n.d(r,"receiveBlocks",(function(){return Ve})),n.d(r,"updateBlock",(function(){return ze})),n.d(r,"updateBlockAttributes",(function(){return He})),n.d(r,"selectBlock",(function(){return We})),n.d(r,"startMultiSelect",(function(){return Ke})),n.d(r,"stopMultiSelect",(function(){return Ge})),n.d(r,"multiSelect",(function(){return qe})),n.d(r,"clearSelectedBlock",(function(){return Qe})),n.d(r,"toggleSelection",(function(){return Ye})),n.d(r,"replaceBlocks",(function(){return Xe})),n.d(r,"replaceBlock",(function(){return Ze})),n.d(r,"moveBlocksDown",(function(){return Je})),n.d(r,"moveBlocksUp",(function(){return $e})),n.d(r,"moveBlockToPosition",(function(){return et})),n.d(r,"insertBlock",(function(){return tt})),n.d(r,"insertBlocks",(function(){return nt})),n.d(r,"showInsertionPoint",(function(){return rt})),n.d(r,"hideInsertionPoint",(function(){return ot})),n.d(r,"setTemplateValidity",(function(){return it})),n.d(r,"synchronizeTemplate",(function(){return ct})),n.d(r,"mergeBlocks",(function(){return at})),n.d(r,"removeBlocks",(function(){return st})),n.d(r,"removeBlock",(function(){return ut})),n.d(r,"toggleBlockMode",(function(){return lt})),n.d(r,"startTyping",(function(){return dt})),n.d(r,"stopTyping",(function(){return pt})),n.d(r,"enterFormattedText",(function(){return bt})),n.d(r,"exitFormattedText",(function(){return ft})),n.d(r,"insertDefaultBlock",(function(){return ht})),n.d(r,"updateBlockListSettings",(function(){return mt}));var o={};n.r(o),n.d(o,"hasEditorUndo",(function(){return kt})),n.d(o,"hasEditorRedo",(function(){return Et})),n.d(o,"isEditedPostNew",(function(){return St})),n.d(o,"hasChangedContent",(function(){return Pt})),n.d(o,"isEditedPostDirty",(function(){return wt})),n.d(o,"isCleanNewPost",(function(){return Ct})),n.d(o,"getCurrentPost",(function(){return Tt})),n.d(o,"getCurrentPostType",(function(){return Bt})),n.d(o,"getCurrentPostId",(function(){return xt})),n.d(o,"getCurrentPostRevisionsCount",(function(){return It})),n.d(o,"getCurrentPostLastRevisionId",(function(){return At})),n.d(o,"getPostEdits",(function(){return Rt})),n.d(o,"getReferenceByDistinctEdits",(function(){return Lt})),n.d(o,"getCurrentPostAttribute",(function(){return Nt})),n.d(o,"getEditedPostAttribute",(function(){return Ut})),n.d(o,"getAutosaveAttribute",(function(){return Ft})),n.d(o,"getEditedPostVisibility",(function(){return Mt})),n.d(o,"isCurrentPostPending",(function(){return Vt})),n.d(o,"isCurrentPostPublished",(function(){return zt})),n.d(o,"isCurrentPostScheduled",(function(){return Ht})),n.d(o,"isEditedPostPublishable",(function(){return Wt})),n.d(o,"isEditedPostSaveable",(function(){return Kt})),n.d(o,"isEditedPostEmpty",(function(){return Gt})),n.d(o,"isEditedPostAutosaveable",(function(){return qt})),n.d(o,"getAutosave",(function(){return Qt})),n.d(o,"hasAutosave",(function(){return Yt})),n.d(o,"isEditedPostBeingScheduled",(function(){return Xt})),n.d(o,"isEditedPostDateFloating",(function(){return Zt})),n.d(o,"isSavingPost",(function(){return Jt})),n.d(o,"didPostSaveRequestSucceed",(function(){return $t})),n.d(o,"didPostSaveRequestFail",(function(){return en})),n.d(o,"isAutosavingPost",(function(){return tn})),n.d(o,"isPreviewingPost",(function(){return nn})),n.d(o,"getEditedPostPreviewLink",(function(){return rn})),n.d(o,"getSuggestedPostFormat",(function(){return on})),n.d(o,"getBlocksForSerialization",(function(){return cn})),n.d(o,"getEditedPostContent",(function(){return an})),n.d(o,"__experimentalGetReusableBlock",(function(){return sn})),n.d(o,"__experimentalIsSavingReusableBlock",(function(){return un})),n.d(o,"__experimentalIsFetchingReusableBlock",(function(){return ln})),n.d(o,"__experimentalGetReusableBlocks",(function(){return dn})),n.d(o,"getStateBeforeOptimisticTransaction",(function(){return pn})),n.d(o,"isPublishingPost",(function(){return bn})),n.d(o,"isPermalinkEditable",(function(){return fn})),n.d(o,"getPermalink",(function(){return hn})),n.d(o,"getPermalinkParts",(function(){return mn})),n.d(o,"inSomeHistory",(function(){return vn})),n.d(o,"isPostLocked",(function(){return On})),n.d(o,"isPostSavingLocked",(function(){return gn})),n.d(o,"isPostAutosavingLocked",(function(){return jn})),n.d(o,"isPostLockTakeover",(function(){return _n})),n.d(o,"getPostLockUser",(function(){return yn})),n.d(o,"getActivePostLock",(function(){return kn})),n.d(o,"canUserUseUnfilteredHTML",(function(){return En})),n.d(o,"isPublishSidebarEnabled",(function(){return Sn})),n.d(o,"getEditorBlocks",(function(){return Pn})),n.d(o,"getEditorSelectionStart",(function(){return wn})),n.d(o,"getEditorSelectionEnd",(function(){return Cn})),n.d(o,"__unstableIsEditorReady",(function(){return Tn})),n.d(o,"getEditorSettings",(function(){return Bn})),n.d(o,"getBlockName",(function(){return In})),n.d(o,"isBlockValid",(function(){return An})),n.d(o,"getBlockAttributes",(function(){return Rn})),n.d(o,"getBlock",(function(){return Ln})),n.d(o,"getBlocks",(function(){return Nn})),n.d(o,"__unstableGetBlockWithoutInnerBlocks",(function(){return Dn})),n.d(o,"getClientIdsOfDescendants",(function(){return Un})),n.d(o,"getClientIdsWithDescendants",(function(){return Fn})),n.d(o,"getGlobalBlockCount",(function(){return Mn})),n.d(o,"getBlocksByClientId",(function(){return Vn})),n.d(o,"getBlockCount",(function(){return zn})),n.d(o,"getBlockSelectionStart",(function(){return Hn})),n.d(o,"getBlockSelectionEnd",(function(){return Wn})),n.d(o,"getSelectedBlockCount",(function(){return Kn})),n.d(o,"hasSelectedBlock",(function(){return Gn})),n.d(o,"getSelectedBlockClientId",(function(){return qn})),n.d(o,"getSelectedBlock",(function(){return Qn})),n.d(o,"getBlockRootClientId",(function(){return Yn})),n.d(o,"getBlockHierarchyRootClientId",(function(){return Xn})),n.d(o,"getAdjacentBlockClientId",(function(){return Zn})),n.d(o,"getPreviousBlockClientId",(function(){return Jn})),n.d(o,"getNextBlockClientId",(function(){return $n})),n.d(o,"getSelectedBlocksInitialCaretPosition",(function(){return er})),n.d(o,"getMultiSelectedBlockClientIds",(function(){return tr})),n.d(o,"getMultiSelectedBlocks",(function(){return nr})),n.d(o,"getFirstMultiSelectedBlockClientId",(function(){return rr})),n.d(o,"getLastMultiSelectedBlockClientId",(function(){return or})),n.d(o,"isFirstMultiSelectedBlock",(function(){return ir})),n.d(o,"isBlockMultiSelected",(function(){return cr})),n.d(o,"isAncestorMultiSelected",(function(){return ar})),n.d(o,"getMultiSelectedBlocksStartClientId",(function(){return sr})),n.d(o,"getMultiSelectedBlocksEndClientId",(function(){return ur})),n.d(o,"getBlockOrder",(function(){return lr})),n.d(o,"getBlockIndex",(function(){return dr})),n.d(o,"isBlockSelected",(function(){return pr})),n.d(o,"hasSelectedInnerBlock",(function(){return br})),n.d(o,"isBlockWithinSelection",(function(){return fr})),n.d(o,"hasMultiSelection",(function(){return hr})),n.d(o,"isMultiSelecting",(function(){return mr})),n.d(o,"isSelectionEnabled",(function(){return vr})),n.d(o,"getBlockMode",(function(){return Or})),n.d(o,"isTyping",(function(){return gr})),n.d(o,"isCaretWithinFormattedText",(function(){return jr})),n.d(o,"getBlockInsertionPoint",(function(){return _r})),n.d(o,"isBlockInsertionPointVisible",(function(){return yr})),n.d(o,"isValidTemplate",(function(){return kr})),n.d(o,"getTemplate",(function(){return Er})),n.d(o,"getTemplateLock",(function(){return Sr})),n.d(o,"canInsertBlockType",(function(){return Pr})),n.d(o,"getInserterItems",(function(){return wr})),n.d(o,"hasInserterItems",(function(){return Cr})),n.d(o,"getBlockListSettings",(function(){return Tr}));var i=n(5),c=n(10),a=n(62),s=(n(143),n(142),n(24)),u=n(50),l=n(7),d=n(4),p=n(39),b=n(9),f=n(31),h=n(85),m=n.n(h),v=n(2),O={insertUsage:{},isPublishSidebarEnabled:!0},g=Object(l.a)({},i.SETTINGS_DEFAULTS,{richEditingEnabled:!0,codeEditingEnabled:!0,enableCustomFields:!1});function j(e){return e&&"object"===Object(f.a)(e)&&"raw"in e?e.raw:e}var _=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 Object(l.a)({},e,Object(v.keyBy)(t.results,"id"));case"UPDATE_REUSABLE_BLOCK":var n=t.id,r=t.changes;return Object(l.a)({},e,Object(b.a)({},n,Object(l.a)({},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(l.a)({},Object(v.omit)(e,o),Object(b.a)({},i,Object(l.a)({},c,{id:i})));case"REMOVE_REUSABLE_BLOCK":var a=t.id;return Object(v.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?Object(l.a)({},e,Object(b.a)({},n,!0)):e;case"FETCH_REUSABLE_BLOCKS_SUCCESS":case"FETCH_REUSABLE_BLOCKS_FAILURE":var r=t.id;return Object(v.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 Object(l.a)({},e,Object(b.a)({},t.id,!0));case"SAVE_REUSABLE_BLOCK_SUCCESS":case"SAVE_REUSABLE_BLOCK_FAILURE":var n=t.id;return Object(v.omit)(e,n)}return e}});var y=m()(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]:O;switch((arguments.length>1?arguments[1]:void 0).type){case"ENABLE_PUBLISH_SIDEBAR":return Object(l.a)({},e,{isPublishSidebarEnabled:!0});case"DISABLE_PUBLISH_SIDEBAR":return Object(l.a)({},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:_,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 Object(l.a)({},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 Object(l.a)({},e,Object(b.a)({},t.lockName,!0));case"UNLOCK_POST_SAVING":return Object(v.omit)(e,t.lockName)}return e},isReady:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];switch((arguments.length>1?arguments[1]:void 0).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]:g,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"UPDATE_EDITOR_SETTINGS":return Object(l.a)({},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 Object(l.a)({},e,Object(b.a)({},t.lockName,!0));case"UNLOCK_POST_AUTOSAVING":return Object(v.omit)(e,t.lockName)}return e}})),k=n(70),E=n.n(k),S=n(23),P=n.n(S),w=n(43),C=n(37),T=n.n(C),B=n(1),x=n(18),I=n(35),A=n.n(I),R=new Set(["meta"]),L="core/editor",N="post-update",D="SAVE_POST_NOTICE_ID",U="TRASH_POST_NOTICE_ID",F=/%(?:postname|pagename)%/,M=6e4,V=["title","excerpt","content"];function z(e){var t=e.previousPost,n=e.post,r=e.postType;if(Object(v.get)(e.options,["isAutosave"]))return[];var o,i=["publish","private","future"],c=Object(v.includes)(i,t.status),a=Object(v.includes)(i,n.status),s=Object(v.get)(r,["viewable"],!1);if(c||a?c&&!a?(o=r.labels.item_reverted_to_draft,s=!1):o=!c&&a?{publish:r.labels.item_published,private:r.labels.item_published_privately,future:r.labels.item_scheduled}[n.status]:r.labels.item_updated:o=null,o){var u=[];return s&&u.push({label:r.labels.view_item,url:n.link}),[o,{id:D,type:"snackbar",actions:u}]}return[]}function H(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(B.__)("Publishing failed."),private:Object(B.__)("Publishing failed."),future:Object(B.__)("Scheduling failed.")},a=i||-1===o.indexOf(n.status)?Object(B.__)("Updating failed."):c[n.status];return r.message&&!/<\/?[^>]*>/.test(r.message)&&(a=[a,r.message].join(" ")),[a,{id:D}]}var W=n(42),K=n.n(W),G=n(68),q=K()((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}),Q=P.a.mark(ie),Y=P.a.mark(se),X=P.a.mark(be),Z=P.a.mark(he),J=P.a.mark(me),$=P.a.mark(ve),ee=P.a.mark(Oe),te=P.a.mark(ge),ne=P.a.mark(je),re=P.a.mark(_e),oe=P.a.mark(De);function ie(e,t,n){var r,o;return P.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return r=Object(v.has)(t,["content"])?t.content:e.content.raw,o=Object(c.parse)(r),"auto-draft"===e.status&&n&&(o=Object(c.synchronizeBlocksWithTemplate)(o,n)),i.next=6,ae(e);case 6:return i.next=8,{type:"SETUP_EDITOR",post:e,edits:t,template:n};case 8:return i.next=10,De(o,{__unstableShouldCreateUndoLevel:!1});case 10:return i.next=12,pe(e);case 12:if(!t||!Object.keys(t).some((function(n){return t[n]!==(Object(v.has)(e,[n,"raw"])?e[n].raw:e[n])}))){i.next=15;break}return i.next=15,be(t);case 15:case"end":return i.stop()}}),Q)}function ce(){return{type:"TEAR_DOWN_EDITOR"}}function ae(e){return{type:"RESET_POST",post:e}}function se(e){var t;return P.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return A()("resetAutosave action (`core/editor` store)",{alternative:"receiveAutosaves action (`core` store)",plugin:"Gutenberg"}),n.next=3,Object(p.select)(L,"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 ue(){return{type:"REQUEST_POST_UPDATE_START",options:arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}}}function le(){return{type:"REQUEST_POST_UPDATE_FINISH",options:arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}}}function de(e){return{type:"UPDATE_POST",edits:e}}function pe(e){return{type:"SETUP_EDITOR_STATE",post:e}}function be(e,t){var n,r,o;return P.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,Object(p.select)(L,"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 fe(e){return Object(l.a)({},de(e),{optimist:{id:N}})}function he(){var e,t,n,r,o,i,c,a=arguments;return P.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)(L,"isEditedPostSaveable");case 3:if(s.sent){s.next=5;break}return s.abrupt("return");case 5:return s.next=7,Object(p.select)(L,"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)(L,"editPost",t,{undoIgnore:!0});case 12:return s.next=14,ue(e);case 14:return s.next=16,Object(p.select)(L,"getCurrentPost");case 16:return n=s.sent,s.t1=l.a,s.t2={id:n.id},s.next=21,Object(p.select)("core","getEntityRecordNonTransientEdits","postType",n.type,n.id);case 21:return s.t3=s.sent,s.t4=t,t=(0,s.t1)(s.t2,s.t3,s.t4),s.next=26,Object(p.dispatch)("core","saveEntityRecord","postType",n.type,t,e);case 26:return s.next=28,le(e);case 28:return s.next=30,Object(p.select)("core","getLastEntitySaveError","postType",n.type,n.id);case 30:if(!(r=s.sent)){s.next=38;break}if(!(o=H({post:n,edits:t,error:r})).length){s.next=36;break}return s.next=36,p.dispatch.apply(void 0,["core/notices","createErrorNotice"].concat(Object(x.a)(o)));case 36:s.next=56;break;case 38:return s.next=40,Object(p.select)(L,"getCurrentPost");case 40:return i=s.sent,s.t5=z,s.t6=n,s.t7=i,s.next=46,Object(p.select)("core","getPostType",i.type);case 46:if(s.t8=s.sent,s.t9=e,s.t10={previousPost:s.t6,post:s.t7,postType:s.t8,options:s.t9},!(c=(0,s.t5)(s.t10)).length){s.next=53;break}return s.next=53,p.dispatch.apply(void 0,["core/notices","createSuccessNotice"].concat(Object(x.a)(c)));case 53:if(e.isAutosave){s.next=56;break}return s.next=56,Object(p.dispatch)("core/block-editor","__unstableMarkLastChangeAsPersistent");case 56:case"end":return s.stop()}}),Z)}function me(){var e,t,n,r;return P.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,Object(p.select)(L,"getCurrentPost");case 2:return e=o.sent,o.next=5,Object(p.select)(L,"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)(L,"resetPost",r);case 14:case"end":return o.stop()}}),J)}function ve(){var e,t,n;return P.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,Object(p.select)(L,"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",U);case 8:return r.prev=8,r.next=11,Object(p.select)(L,"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)(L,"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(x.a)([(o={error:r.t0}).error.message&&"unknown_error"!==o.error.code?o.error.message:Object(B.__)("Trashing failed"),{id:U}])));case 22:case"end":return r.stop()}var o}),$,null,[[8,18]])}function Oe(e){return P.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(p.dispatch)(L,"savePost",Object(l.a)({isAutosave:!0},e));case 2:case"end":return t.stop()}}),ee)}function ge(){var e,t,n,r;return P.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,Object(p.select)(L,"getCurrentPost");case 2:return e=o.sent,o.next=5,Object(p.select)(L,"getEditedPostAttribute","title");case 5:return t=o.sent,o.next=8,Object(p.select)(L,"getEditedPostAttribute","content");case 8:return n=o.sent,o.next=11,Object(p.select)(L,"getEditedPostAttribute","excerpt");case 11:return r=o.sent,o.next=14,{type:"LOCAL_AUTOSAVE_SET",postId:e.id,title:t,content:n,excerpt:r};case 14:case"end":return o.stop()}}),te)}function je(){return P.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()}}),ne)}function _e(){return P.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()}}),re)}function ye(){return{type:"CREATE_UNDO_LEVEL"}}function ke(e){return{type:"UPDATE_POST_LOCK",lock:e}}function Ee(e){return{type:"FETCH_REUSABLE_BLOCKS",id:e}}function Se(e){return{type:"RECEIVE_REUSABLE_BLOCKS",results:e}}function Pe(e){return{type:"SAVE_REUSABLE_BLOCK",id:e}}function we(e){return{type:"DELETE_REUSABLE_BLOCK",id:e}}function Ce(e,t){return{type:"UPDATE_REUSABLE_BLOCK",id:e,changes:t}}function Te(e){return{type:"CONVERT_BLOCK_TO_STATIC",clientId:e}}function Be(e){return{type:"CONVERT_BLOCK_TO_REUSABLE",clientIds:Object(v.castArray)(e)}}function xe(){return{type:"ENABLE_PUBLISH_SIDEBAR"}}function Ie(){return{type:"DISABLE_PUBLISH_SIDEBAR"}}function Ae(e){return{type:"LOCK_POST_SAVING",lockName:e}}function Re(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 De(e){var t,n,r,o,i,c,a,s,u=arguments;return P.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)(L,"getCurrentPost");case 6:return c=l.sent,a=c.id,s=c.type,l.next=11,Object(p.select)("core","getEditedEntityRecord","postType",s,a);case 11:if(l.t0=l.sent.blocks,l.t1=i.blocks,!(l.t0===l.t1)){l.next=18;break}return l.next=17,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 q(void 0===t?[]:t)};case 19:return l.delegateYield(be(i),"t2",20);case 20:case"end":return l.stop()}}),oe)}function Ue(e){return{type:"UPDATE_EDITOR_SETTINGS",settings:e}}var Fe=function(e){return P.a.mark((function t(){var n,r,o,i=arguments;return P.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:for(A()("`wp.data.dispatch( 'core/editor' )."+e+"`",{alternative:"`wp.data.dispatch( 'core/block-editor' )."+e+"`"}),n=i.length,r=new Array(n),o=0;o1)return!1;var n=t[0].name;if(n!==Object(c.getDefaultBlockName)()&&n!==Object(c.getFreeformContentHandlerName)())return!1}return!an(e)}var qt=Object(d.createRegistrySelector)((function(e){return function(t){if(!Kt(t))return!1;if(jn(t))return!1;var n=Bt(t),r=xt(t),o=e("core").hasFetchedAutosaves(n,r),i=Object(v.get)(e("core").getCurrentUser(),["id"]),c=e("core").getAutosave(n,r,i);return!!o&&(!c||(!!Pt(t)||["title","excerpt"].some((function(e){return j(c[e])!==Ut(t,e)}))))}})),Qt=Object(d.createRegistrySelector)((function(e){return function(t){A()("`wp.data.select( 'core/editor' ).getAutosave()`",{alternative:"`wp.data.select( 'core' ).getAutosave( postType, postId, userId )`",plugin:"Gutenberg"});var n=Bt(t),r=xt(t),o=Object(v.get)(e("core").getCurrentUser(),["id"]),i=e("core").getAutosave(n,r,o);return Object(v.mapValues)(Object(v.pick)(i,V),j)}})),Yt=Object(d.createRegistrySelector)((function(e){return function(t){A()("`wp.data.select( 'core/editor' ).hasAutosave()`",{alternative:"`!! wp.data.select( 'core' ).getAutosave( postType, postId, userId )`",plugin:"Gutenberg"});var n=Bt(t),r=xt(t),o=Object(v.get)(e("core").getCurrentUser(),["id"]);return!!e("core").getAutosave(n,r,o)}}));function Xt(e){var t=Ut(e,"date"),n=new Date(Number(Object(gt.getDate)(t))-M);return Object(gt.isInTheFuture)(n)}function Zt(e){var t=Ut(e,"date"),n=Ut(e,"modified"),r=Ut(e,"status");return("draft"===r||"auto-draft"===r||"pending"===r)&&t===n}var Jt=Object(d.createRegistrySelector)((function(e){return function(t){var n=Bt(t),r=xt(t);return e("core").isSavingEntityRecord("postType",n,r)}})),$t=Object(d.createRegistrySelector)((function(e){return function(t){var n=Bt(t),r=xt(t);return!e("core").getLastEntitySaveError("postType",n,r)}})),en=Object(d.createRegistrySelector)((function(e){return function(t){var n=Bt(t),r=xt(t);return!!e("core").getLastEntitySaveError("postType",n,r)}}));function tn(e){return!!Jt(e)&&!!Object(v.get)(e.saving,["options","isAutosave"])}function nn(e){return!!Jt(e)&&!!e.saving.options.isPreview}function rn(e){if(!e.saving.pending&&!Jt(e)){var t=Ft(e,"preview_link");t||(t=Ut(e,"link"))&&(t=Object(jt.addQueryArgs)(t,{preview:!0}));var n=Ut(e,"featured_media");return t&&n?Object(jt.addQueryArgs)(t,{_thumbnail_id:n}):t}}function on(e){var t,n=Pn(e);switch(1===n.length&&(t=n[0].name),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":case"core-embed/youtube":case"core-embed/vimeo":return"video";case"core/audio":case"core-embed/spotify":case"core-embed/soundcloud":return"audio"}return null}function cn(e){A()("`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 an=Object(d.createRegistrySelector)((function(e){return function(t){var n=xt(t),r=Bt(t),o=e("core").getEditedEntityRecord("postType",r,n);if(o){if("function"==typeof o.content)return o.content(o);if(o.blocks)return q(o.blocks);if(o.content)return o.content}return""}})),sn=Object(Ot.a)((function(e,t){var n=e.reusableBlocks.data[t];if(!n)return null;var r=isNaN(parseInt(t));return Object(l.a)({},n,{id:r?t:+t,isTemporary:r})}),(function(e,t){return[e.reusableBlocks.data[t]]}));function un(e,t){return e.reusableBlocks.isSaving[t]||!1}function ln(e,t){return!!e.reusableBlocks.isFetching[t]}var dn=Object(Ot.a)((function(e){return Object(v.map)(e.reusableBlocks.data,(function(t,n){return sn(e,n)}))}),(function(e){return[e.reusableBlocks.data]}));function pn(e,t){var n=Object(v.find)(e.optimist,(function(e){return e.beforeState&&Object(v.get)(e.action,["optimist","id"])===t}));return n?n.beforeState:null}function bn(e){if(!Jt(e))return!1;if(!zt(e))return!1;var t=pn(e,N);return!!t&&!zt(null,t.currentPost)}function fn(e){var t=Ut(e,"permalink_template");return F.test(t)}function hn(e){var t=mn(e);if(!t)return null;var n=t.prefix,r=t.postName,o=t.suffix;return fn(e)?n+r+o:n}function mn(e){var t=Ut(e,"permalink_template");if(!t)return null;var n=Ut(e,"slug")||Ut(e,"generated_slug"),r=t.split(F),o=Object(vt.a)(r,2);return{prefix:o[0],postName:n,suffix:o[1]}}function vn(e,t){var n=e.optimist;return!!n&&n.some((function(e){var n=e.beforeState;return n&&t(n)}))}function On(e){return e.postLock.isLocked}function gn(e){return Object.keys(e.postSavingLock).length>0}function jn(e){return Object.keys(e.postAutosavingLock).length>0}function _n(e){return e.postLock.isTakeover}function yn(e){return e.postLock.user}function kn(e){return e.postLock.activePostLock}function En(e){return Object(v.has)(Tt(e),["_links","wp:action-unfiltered-html"])}function Sn(e){return e.preferences.hasOwnProperty("isPublishSidebarEnabled")?e.preferences.isPublishSidebarEnabled:O.isPublishSidebarEnabled}function Pn(e){return Ut(e,"blocks")||yt}function wn(e){return Ut(e,"selectionStart")}function Cn(e){return Ut(e,"selectionEnd")}function Tn(e){return e.isReady}function Bn(e){return e.editorSettings}function xn(e){return Object(d.createRegistrySelector)((function(t){return function(n){var r;A()("`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;c0&&void 0!==arguments[0]?arguments[0]:{},t=e.getBlockInsertionParentClientId,n=void 0===t?Gr:t,r=e.getInserterItems,o=void 0===r?qr:r,a=e.getSelectedBlockName,s=void 0===a?Qr:a;return{name:"blocks",className:"editor-autocompleters__block",triggerPrefix:"/",options:function(){Yr();var e=s();return o(n()).filter((function(t){return e!==t.name}))},getOptionKeywords:function(e){var t=e.title,n=e.keywords,r=void 0===n?[]:n;return[e.category].concat(Object(x.a)(r),[t])},getOptionLabel:function(e){var t=e.icon,n=e.title;return[Object(zr.createElement)(i.BlockIcon,{key:"icon",icon:t,showColors:!0}),n]},allowContext:function(e,t){return!(/\S/.test(e)||/\S/.test(t))},getOptionCompletion:function(e){var t=e.name,n=e.initialAttributes;return{action:"replace",value:Object(c.createBlock)(t,n)}},isOptionDisabled:function(e){return e.isDisabled}}}(),Zr={name:"users",className:"editor-autocompleters__user",triggerPrefix:"@",options:function(e){var t="";return e&&(t="?search="+encodeURIComponent(e)),T()({path:"/wp/v2/users"+t})},isDebounced:!0,getOptionKeywords:function(e){return[e.slug,e.name]},getOptionLabel:function(e){return[Object(zr.createElement)("img",{key:"avatar",className:"editor-autocompleters__user-avatar",alt:"",src:e.avatar_urls[24]}),Object(zr.createElement)("span",{key:"name",className:"editor-autocompleters__user-name"},e.name),Object(zr.createElement)("span",{key:"slug",className:"editor-autocompleters__user-slug"},e.slug)]},getOptionCompletion:function(e){return"@".concat(e.slug)}},Jr=n(13),$r=n(12),eo=n(15),to=n(16),no=n(17),ro=function(e){function t(){return Object(Jr.a)(this,t),Object(eo.a)(this,Object(to.a)(t).apply(this,arguments))}return Object(no.a)(t,e),Object($r.a)(t,[{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.isDirty,r=t.editsReference,o=t.isAutosaveable,i=t.isAutosaving;r!==e.editsReference&&(this.didAutosaveForEditsReference=!1),!i&&e.isAutosaving&&(this.didAutosaveForEditsReference=!0),e.isDirty===n&&e.isAutosaveable===o&&e.editsReference===r||this.toggleTimer(n&&o&&!this.didAutosaveForEditsReference)}},{key:"componentWillUnmount",value:function(){this.toggleTimer(!1)}},{key:"toggleTimer",value:function(e){var t=this,n=this.props,r=n.interval,o=n.shouldThrottle,i=void 0!==o&&o;!i&&this.pendingSave&&(clearTimeout(this.pendingSave),delete this.pendingSave),!e||i&&this.pendingSave||(this.pendingSave=setTimeout((function(){t.props.autosave(),delete t.pendingSave}),1e3*r))}},{key:"render",value:function(){return null}}]),t}(zr.Component),oo=Object(Hr.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{isDirty:o(),isAutosaveable:i(),editsReference:n(),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()}}}))])(ro),io=n(11),co=n.n(io),ao=function(e){var t=e.children,n=e.isValid,r=e.level,o=e.path,c=void 0===o?[]:o,a=e.href,s=e.onSelect;return Object(zr.createElement)("li",{className:co()("document-outline__item","is-".concat(r.toLowerCase()),{"is-invalid":!n})},Object(zr.createElement)("a",{href:a,className:"document-outline__button",onClick:s},Object(zr.createElement)("span",{className:"document-outline__emdash","aria-hidden":"true"}),c.map((function(e,t){var n=e.clientId;return Object(zr.createElement)("strong",{key:t,className:"document-outline__level"},Object(zr.createElement)(i.BlockTitle,{clientId:n}))})),Object(zr.createElement)("strong",{className:"document-outline__level"},r),Object(zr.createElement)("span",{className:"document-outline__item-content"},t)))},so=Object(zr.createElement)("em",null,Object(B.__)("(Empty heading)")),uo=[Object(zr.createElement)("br",{key:"incorrect-break"}),Object(zr.createElement)("em",{key:"incorrect-message"},Object(B.__)("(Incorrect heading level)"))],lo=[Object(zr.createElement)("br",{key:"incorrect-break-h1"}),Object(zr.createElement)("em",{key:"incorrect-message-h1"},Object(B.__)("(Your theme may already use a H1 for the post title)"))],po=[Object(zr.createElement)("br",{key:"incorrect-break-multiple-h1"}),Object(zr.createElement)("em",{key:"incorrect-message-multiple-h1"},Object(B.__)("(Multiple H1 headings are not recommended)"))],bo=function(e){return!e.attributes.content||0===e.attributes.content.length},fo=Object(Hr.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(v.get)(r,["supports","title"],!1)}})))((function(e){var t=e.blocks,n=void 0===t?[]:t,r=e.title,o=e.onSelect,i=e.isTitleSupported,c=e.hasOutlineItemsDisabled,a=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return Object(v.flatMap)(t,(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return"core/heading"===t.name?Object(l.a)({},t,{path:n,level:t.attributes.level,isEmpty:bo(t)}):e(t.innerBlocks,[].concat(Object(x.a)(n),[t]))}))}(n);if(a.length<1)return null;var u=1,d=document.querySelector(".editor-post-title__input"),p=i&&r&&d,b=Object(v.countBy)(a,"level")[1]>1;return Object(zr.createElement)("div",{className:"document-outline"},Object(zr.createElement)("ul",null,p&&Object(zr.createElement)(ao,{level:Object(B.__)("Title"),isValid:!0,onSelect:o,href:"#".concat(d.id),isDisabled:c},r),a.map((function(e,t){var n=e.level>u+1,r=!(e.isEmpty||n||!e.level||1===e.level&&(b||p));return u=e.level,Object(zr.createElement)(ao,{key:t,level:"H".concat(e.level),isValid:r,path:e.path,isDisabled:c,href:"#block-".concat(e.clientId),onSelect:o},e.isEmpty?so:Object(s.getTextContent)(Object(s.create)({html:e.attributes.content})),n&&uo,1===e.level&&b&&po,p&&1===e.level&&!b&&lo)}))))}));var ho=Object(d.withSelect)((function(e){return{blocks:e("core/block-editor").getBlocks()}}))((function(e){var t=e.blocks,n=e.children;return Object(v.filter)(t,(function(e){return"core/heading"===e.name})).length<1?null:n})),mo=n(6),vo=n(3),Oo=n(19);var go=Object(Hr.compose)([Object(d.withSelect)((function(e){return{isDirty:(0,e("core/editor").isEditedPostDirty)()}})),Object(d.withDispatch)((function(e,t,n){var r=n.select,o=e("core/editor").savePost;return{onSave:function(){(0,r("core/editor").isEditedPostDirty)()&&o()}}}))])((function(e){var t=e.onSave;return Object(zr.createElement)(vo.KeyboardShortcuts,{bindGlobal:!0,shortcuts:Object(b.a)({},Oo.rawShortcut.primary("s"),(function(e){e.preventDefault(),t()}))})})),jo=function(e){function t(){var e;return Object(Jr.a)(this,t),(e=Object(eo.a)(this,Object(to.a)(t).apply(this,arguments))).undoOrRedo=e.undoOrRedo.bind(Object(mo.a)(e)),e}return Object(no.a)(t,e),Object($r.a)(t,[{key:"undoOrRedo",value:function(e){var t=this.props,n=t.onRedo,r=t.onUndo;e.shiftKey?n():r(),e.preventDefault()}},{key:"render",value:function(){var e;return Object(zr.createElement)(zr.Fragment,null,Object(zr.createElement)(i.BlockEditorKeyboardShortcuts,null),Object(zr.createElement)(vo.KeyboardShortcuts,{shortcuts:(e={},Object(b.a)(e,Oo.rawShortcut.primary("z"),this.undoOrRedo),Object(b.a)(e,Oo.rawShortcut.primaryShift("z"),this.undoOrRedo),e)}),Object(zr.createElement)(go,null))}}]),t}(zr.Component),_o=Object(d.withDispatch)((function(e){var t=e("core/editor");return{onRedo:t.redo,onUndo:t.undo}}))(jo),yo=_o;function ko(){return A()("EditorGlobalKeyboardShortcuts",{alternative:"VisualEditorGlobalKeyboardShortcuts",plugin:"Gutenberg"}),Object(zr.createElement)(_o,null)}function Eo(){return Object(zr.createElement)(go,null)}var So=Object(Hr.compose)([Object(d.withSelect)((function(e){return{hasRedo:e("core/editor").hasEditorRedo()}})),Object(d.withDispatch)((function(e){return{redo:e("core/editor").redo}}))])((function(e){var t=e.hasRedo,n=e.redo;return Object(zr.createElement)(vo.IconButton,{icon:"redo",label:Object(B.__)("Redo"),shortcut:Oo.displayShortcut.primaryShift("z"),"aria-disabled":!t,onClick:t?n:void 0,className:"editor-history__redo"})}));var Po=Object(Hr.compose)([Object(d.withSelect)((function(e){return{hasUndo:e("core/editor").hasEditorUndo()}})),Object(d.withDispatch)((function(e){return{undo:e("core/editor").undo}}))])((function(e){var t=e.hasUndo,n=e.undo;return Object(zr.createElement)(vo.IconButton,{icon:"undo",label:Object(B.__)("Undo"),shortcut:Oo.displayShortcut.primary("z"),"aria-disabled":!t,onClick:t?n:void 0,className:"editor-history__undo"})}));var wo=Object(Hr.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(Vr.a)(e,["isValid"]);return t?null:Object(zr.createElement)(vo.Notice,{className:"editor-template-validation-notice",isDismissible:!1,status:"warning"},Object(zr.createElement)("p",null,Object(B.__)("The content of your post doesn’t match the template assigned to your post type.")),Object(zr.createElement)("div",null,Object(zr.createElement)(vo.Button,{isDefault:!0,onClick:n.resetTemplateValidity},Object(B.__)("Keep it as is")),Object(zr.createElement)(vo.Button,{onClick:function(){window.confirm(Object(B.__)("Resetting the template may result in loss of content, do you want to continue?"))&&n.synchronizeTemplate()},isPrimary:!0},Object(B.__)("Reset the template"))))}));var Co=Object(Hr.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(v.filter)(t,{isDismissible:!0,type:"default"}),o=Object(v.filter)(t,{isDismissible:!1,type:"default"}),i=Object(v.filter)(t,{type:"snackbar"});return Object(zr.createElement)(zr.Fragment,null,Object(zr.createElement)(vo.NoticeList,{notices:o,className:"components-editor-notices__pinned"}),Object(zr.createElement)(vo.NoticeList,{notices:r,className:"components-editor-notices__dismissible",onRemove:n},Object(zr.createElement)(wo,null)),Object(zr.createElement)(vo.SnackbarList,{notices:i,className:"components-editor-notices__snackbar",onRemove:n}))})),To=function(e){function t(){var e;return Object(Jr.a)(this,t),(e=Object(eo.a)(this,Object(to.a)(t).apply(this,arguments))).reboot=e.reboot.bind(Object(mo.a)(e)),e.getContent=e.getContent.bind(Object(mo.a)(e)),e.state={error:null},e}return Object(no.a)(t,e),Object($r.a)(t,[{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(zr.createElement)(i.Warning,{className:"editor-error-boundary",actions:[Object(zr.createElement)(vo.Button,{key:"recovery",onClick:this.reboot,isLarge:!0},Object(B.__)("Attempt Recovery")),Object(zr.createElement)(vo.ClipboardButton,{key:"copy-post",text:this.getContent,isLarge:!0},Object(B.__)("Copy Post Text")),Object(zr.createElement)(vo.ClipboardButton,{key:"copy-error",text:e.stack,isLarge:!0},Object(B.__)("Copy Error"))]},Object(B.__)("The editor has encountered an unexpected error.")):this.props.children}}]),t}(zr.Component),Bo=window.requestIdleCallback?window.requestIdleCallback:window.requestAnimationFrame,xo=Object(v.once)((function(){try{return window.sessionStorage.setItem("__wpEditorTestSessionStorage",""),window.sessionStorage.removeItem("__wpEditorTestSessionStorage"),!0}catch(e){return!1}}));function Io(){var e=Object(d.useSelect)((function(e){return{postId:e("core/editor").getCurrentPostId(),getEditedPostAttribute:e("core/editor").getEditedPostAttribute,hasRemoteAutosave:!!e("core/editor").getEditorSettings().autosave}})),t=e.postId,n=e.getEditedPostAttribute,r=e.hasRemoteAutosave,o=Object(d.useDispatch)("core/notices"),i=o.createWarningNotice,a=o.removeNotice,s=Object(d.useDispatch)("core/editor"),u=s.editPost,l=s.resetEditorBlocks;Object(zr.useEffect)((function(){var e=function(e){return window.sessionStorage.getItem(Lr(e))}(t);if(e){try{e=JSON.parse(e)}catch(e){return}var o=e,s={title:o.post_title,content:o.content,excerpt:o.excerpt};if(Object.keys(s).some((function(e){return s[e]!==n(e)}))){if(!r){var d=Object(v.uniqueId)("wpEditorAutosaveRestore");i(Object(B.__)("The backup of this post in your browser is different from the version below."),{id:d,actions:[{label:Object(B.__)("Restore the backup"),onClick:function(){u(Object(v.omit)(s,["content"])),l(Object(c.parse)(s.content)),a(d)}}]})}}else Nr(t)}}),[t])}var Ao=Object(Hr.ifCondition)(xo)((function(){var e,t,n,r,o,i,c,a=Object(d.useDispatch)("core/editor").__experimentalLocalAutosave,s=Object(zr.useCallback)((function(){Bo(a)}),[]);Io(),e=Object(d.useSelect)((function(e){return{postId:e("core/editor").getCurrentPostId(),isDirty:e("core/editor").isEditedPostDirty(),isAutosaving:e("core/editor").isAutosavingPost(),didError:e("core/editor").didPostSaveRequestFail()}})),t=e.postId,n=e.isDirty,r=e.isAutosaving,o=e.didError,i=Object(zr.useRef)(n),c=Object(zr.useRef)(r),Object(zr.useEffect)((function(){!o&&(c.current&&!r||i.current&&!n)&&Nr(t),i.current=n,c.current=r}),[n,r,o]);var u=Object(d.useSelect)((function(e){return{localAutosaveInterval:e("core/editor").getEditorSettings().__experimentalLocalAutosaveInterval}})).localAutosaveInterval;return Object(zr.createElement)(oo,{interval:u,autosave:s,shouldThrottle:!0})}));var Ro=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(v.get)(n,["supports","page-attributes"],!1)&&Object(v.isEmpty)(t)?null:r}));var Lo=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(v.some)(Object(v.castArray)(r),(function(e){return!!t.supports[e]}))),o?n:null})),No=Object(Hr.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(zr.createElement)(vo.TextControl,{className:"editor-page-attributes__order",type:"number",label:Object(B.__)("Order"),value:c,onChange:function(e){i({orderInput:e});var n=Number(e);Number.isInteger(n)&&""!==Object(v.invoke)(e,["trim"])&&t(Number(e))},size:6,onBlur:function(){i({orderInput:null})}})}));var Do=Object(Hr.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(zr.createElement)(Lo,{supportKeys:"page-attributes"},Object(zr.createElement)(No,e))}));function Uo(e){var t=e.map((function(e){return Object(l.a)({children:[],parent:null},e)})),n=Object(v.groupBy)(t,"parent");if(n.null&&n.null.length)return t;return function e(t){return t.map((function(t){var r=n[t.id];return Object(l.a)({},t,{children:r&&r.length?e(r):[]})}))}(n[0]||[])}var Fo=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(v.get)(s,["hierarchical"],!1),d={per_page:-1,exclude:u,parent_exclude:u,orderby:"menu_order",order:"asc"};return{parent:c("parent"),items:l?r("postType",a,d):[],postType:s}})),Mo=Object(d.withDispatch)((function(e){var t=e("core/editor").editPost;return{onUpdateParent:function(e){t({parent:e||0})}}})),Vo=Object(Hr.compose)([Fo,Mo])((function(e){var t=e.parent,n=e.postType,r=e.items,o=e.onUpdateParent,i=Object(v.get)(n,["hierarchical"],!1),c=Object(v.get)(n,["labels","parent_item_colon"]),a=r||[];if(!i||!c||!a.length)return null;var s=Uo(a.map((function(e){return{id:e.id,parent:e.parent,name:e.title.raw?e.title.raw:"#".concat(e.id," (").concat(Object(B.__)("no title"),")")}})));return Object(zr.createElement)(vo.TreeSelect,{className:"editor-page-attributes__parent",label:c,noOptionLabel:"(".concat(Object(B.__)("no parent"),")"),tree:s,selectedId:t,onChange:o})}));var zo=Object(Hr.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(v.isEmpty)(t)?null:Object(zr.createElement)(vo.SelectControl,{label:Object(B.__)("Template:"),value:n,onChange:r,className:"editor-page-attributes__template",options:Object(v.map)(t,(function(e,t){return{value:t,label:e}}))})})),Ho=n(53);var Wo=Object(Hr.compose)([Object(d.withSelect)((function(e){var t=e("core/editor").getCurrentPost();return{hasAssignAuthorAction:Object(v.get)(t,["_links","wp:action-assign-author"],!1),postType:e("core/editor").getCurrentPostType(),authors:e("core").getAuthors()}})),Hr.withInstanceId])((function(e){var t=e.hasAssignAuthorAction,n=e.authors,r=e.children;return!t||n.length<2?null:Object(zr.createElement)(Lo,{supportKeys:"author"},r)})),Ko=function(e){function t(){var e;return Object(Jr.a)(this,t),(e=Object(eo.a)(this,Object(to.a)(t).apply(this,arguments))).setAuthorId=e.setAuthorId.bind(Object(mo.a)(e)),e}return Object(no.a)(t,e),Object($r.a)(t,[{key:"setAuthorId",value:function(e){var t=this.props.onUpdateAuthor,n=e.target.value;t(Number(n))}},{key:"render",value:function(){var e=this.props,t=e.postAuthor,n=e.instanceId,r=e.authors,o="post-author-selector-"+n;return Object(zr.createElement)(Wo,null,Object(zr.createElement)("label",{htmlFor:o},Object(B.__)("Author")),Object(zr.createElement)("select",{id:o,value:t,onChange:this.setAuthorId,className:"editor-post-author__select"},r.map((function(e){return Object(zr.createElement)("option",{key:e.id,value:e.id},Object(Ho.decodeEntities)(e.name))}))))}}]),t}(zr.Component),Go=Object(Hr.compose)([Object(d.withSelect)((function(e){return{postAuthor:e("core/editor").getEditedPostAttribute("author"),authors:e("core").getAuthors()}})),Object(d.withDispatch)((function(e){return{onUpdateAuthor:function(t){e("core/editor").editPost({author:t})}}})),Hr.withInstanceId])(Ko);var qo=Object(Hr.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(Vr.a)(e,["commentStatus"]);return Object(zr.createElement)(vo.CheckboxControl,{label:Object(B.__)("Allow Comments"),checked:"open"===n,onChange:function(){return r.editPost({comment_status:"open"===n?"closed":"open"})}})}));var Qo=Object(Hr.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(zr.createElement)("div",{className:"editor-post-excerpt"},Object(zr.createElement)(vo.TextareaControl,{label:Object(B.__)("Write an excerpt (optional)"),className:"editor-post-excerpt__textarea",onChange:function(e){return n(e)},value:t}),Object(zr.createElement)(vo.ExternalLink,{href:Object(B.__)("https://wordpress.org/support/article/excerpt/")},Object(B.__)("Learn more about manual excerpts")))}));var Yo=function(e){return Object(zr.createElement)(Lo,Object(Mr.a)({},e,{supportKeys:"excerpt"}))};var Xo=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(v.some)(Object(v.castArray)(o),(function(e){var n=Object(v.get)(t,[e],!1);return"post-thumbnails"===e&&Object(v.isArray)(n)?Object(v.includes)(n,r):n}))?n:null}));var Zo=function(e){return Object(zr.createElement)(Xo,{supportKeys:"post-thumbnails"},Object(zr.createElement)(Lo,Object(Mr.a)({},e,{supportKeys:"thumbnail"})))},Jo=["image"],$o=Object(B.__)("Featured Image"),ei=Object(B.__)("Set Featured Image"),ti=Object(B.__)("Remove Image");var ni=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}})),ri=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})}}})),oi=Object(Hr.compose)(vo.withNotices,ni,ri,Object(vo.withFilters)("editor.PostFeaturedImage"))((function(e){var t,n,r,o=e.currentPostId,c=e.featuredImageId,a=e.onUpdateImage,s=e.onDropImage,u=e.onRemoveImage,l=e.media,d=e.postType,p=e.noticeUI,b=Object(v.get)(d,["labels"],{}),f=Object(zr.createElement)("p",null,Object(B.__)("To edit the featured image, you need permission to upload media."));if(l){var h=Object(Wr.applyFilters)("editor.PostFeaturedImage.imageSize","post-thumbnail",l.id,o);if(Object(v.has)(l,["media_details","sizes",h]))t=l.media_details.sizes[h].width,n=l.media_details.sizes[h].height,r=l.media_details.sizes[h].source_url;else{var m=Object(Wr.applyFilters)("editor.PostFeaturedImage.imageSize","thumbnail",l.id,o);Object(v.has)(l,["media_details","sizes",m])?(t=l.media_details.sizes[m].width,n=l.media_details.sizes[m].height,r=l.media_details.sizes[m].source_url):(t=l.media_details.width,n=l.media_details.height,r=l.source_url)}}return Object(zr.createElement)(Zo,null,p,Object(zr.createElement)("div",{className:"editor-post-featured-image"},Object(zr.createElement)(i.MediaUploadCheck,{fallback:f},Object(zr.createElement)(i.MediaUpload,{title:b.featured_image||$o,onSelect:a,unstableFeaturedImageFlow:!0,allowedTypes:Jo,modalClass:"editor-post-featured-image__media-modal",render:function(e){var o=e.open;return Object(zr.createElement)("div",{className:"editor-post-featured-image__container"},Object(zr.createElement)(vo.Button,{className:c?"editor-post-featured-image__preview":"editor-post-featured-image__toggle",onClick:o,"aria-label":c?Object(B.__)("Edit or update the image"):null},!!c&&l&&Object(zr.createElement)(vo.ResponsiveWrapper,{naturalWidth:t,naturalHeight:n,isInline:!0},Object(zr.createElement)("img",{src:r,alt:""})),!!c&&!l&&Object(zr.createElement)(vo.Spinner,null),!c&&(b.set_featured_image||ei)),Object(zr.createElement)(vo.DropZone,{onFilesDrop:s}))},value:c})),!!c&&l&&!l.isLoading&&Object(zr.createElement)(i.MediaUploadCheck,null,Object(zr.createElement)(i.MediaUpload,{title:b.featured_image||$o,onSelect:a,unstableFeaturedImageFlow:!0,allowedTypes:Jo,modalClass:"editor-post-featured-image__media-modal",render:function(e){var t=e.open;return Object(zr.createElement)(vo.Button,{onClick:t,isDefault:!0,isLarge:!0},Object(B.__)("Replace Image"))}})),!!c&&Object(zr.createElement)(i.MediaUploadCheck,null,Object(zr.createElement)(vo.Button,{onClick:u,isLink:!0,isDestructive:!0},b.remove_featured_image||ti))))}));var ii=Object(d.withSelect)((function(e){return{disablePostFormats:e("core/editor").getEditorSettings().disablePostFormats}}))((function(e){var t=e.disablePostFormats,n=Object(Vr.a)(e,["disablePostFormats"]);return!t&&Object(zr.createElement)(Lo,Object(Mr.a)({},n,{supportKeys:"post-formats"}))})),ci=[{id:"aside",caption:Object(B.__)("Aside")},{id:"gallery",caption:Object(B.__)("Gallery")},{id:"link",caption:Object(B.__)("Link")},{id:"image",caption:Object(B.__)("Image")},{id:"quote",caption:Object(B.__)("Quote")},{id:"standard",caption:Object(B.__)("Standard")},{id:"status",caption:Object(B.__)("Status")},{id:"video",caption:Object(B.__)("Video")},{id:"audio",caption:Object(B.__)("Audio")},{id:"chat",caption:Object(B.__)("Chat")}];var ai=Object(Hr.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(v.union)([o],Object(v.get)(i,["formats"],[])),suggestedFormat:r()}})),Object(d.withDispatch)((function(e){return{onUpdatePostFormat:function(t){e("core/editor").editPost({format:t})}}})),Hr.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=ci.filter((function(e){return Object(v.includes)(o,e.id)})),s=Object(v.find)(a,(function(e){return e.id===i}));return Object(zr.createElement)(ii,null,Object(zr.createElement)("div",{className:"editor-post-format"},Object(zr.createElement)("div",{className:"editor-post-format__content"},Object(zr.createElement)("label",{htmlFor:c},Object(B.__)("Post Format")),Object(zr.createElement)(vo.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(zr.createElement)("div",{className:"editor-post-format__suggestion"},Object(B.__)("Suggestion:")," ",Object(zr.createElement)(vo.Button,{isLink:!0,onClick:function(){return t(s.id)}},s.caption))))}));var si=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(zr.createElement)(Lo,{supportKeys:"revisions"},r)}));function ui(e,t){return Object(jt.addQueryArgs)(e,t)}function li(e){return e?Object(v.toLower)(Object(v.deburr)(Object(v.trim)(e.replace(/[\s\./_]+/g,"-"),"-"))):""}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(zr.createElement)(si,null,Object(zr.createElement)(vo.IconButton,{href:ui("revision.php",{revision:t,gutenberg:!0}),className:"editor-post-last-revision__title",icon:"backup"},Object(B.sprintf)(Object(B._n)("%d Revision","%d Revisions",n),n)))}));var pi=function(e){function t(){var e;return Object(Jr.a)(this,t),(e=Object(eo.a)(this,Object(to.a)(t).apply(this,arguments))).openPreviewWindow=e.openPreviewWindow.bind(Object(mo.a)(e)),e}return Object(no.a)(t,e),Object($r.a)(t,[{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)}},{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(zr.renderToString)(Object(zr.createElement)("div",{className:"editor-post-preview-button__interstitial-message"},Object(zr.createElement)(vo.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 96 96"},Object(zr.createElement)(vo.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(zr.createElement)(vo.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(zr.createElement)("p",null,Object(B.__)("Generating preview…")))),n+='\n\t\t\n\t',n=Object(Wr.applyFilters)("editor.PostPreview.interstitialMarkup",n),t.write(n),t.title=Object(B.__)("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=t||n;return Object(zr.createElement)(vo.Button,{isLarge:!0,className:"editor-post-preview",href:o,target:this.getWindowTarget(),disabled:!r,onClick:this.openPreviewWindow},Object(B._x)("Preview","imperative verb"),Object(zr.createElement)("span",{className:"screen-reader-text"},Object(B.__)("(opens in a new tab)")))}}]),t}(zr.Component),bi=Object(Hr.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(v.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(Hr.ifCondition)((function(e){return e.isViewable}))])(pi),fi=function(e){function t(){var e;return Object(Jr.a)(this,t),(e=Object(eo.a)(this,Object(to.a)(t).apply(this,arguments))).sendPostLock=e.sendPostLock.bind(Object(mo.a)(e)),e.receivePostLock=e.receivePostLock.bind(Object(mo.a)(e)),e.releasePostLock=e.releasePostLock.bind(Object(mo.a)(e)),e}return Object(no.a)(t,e),Object($r.a)(t,[{key:"componentDidMount",value:function(){var e=this.getHookName();Object(Wr.addAction)("heartbeat.send",e,this.sendPostLock),Object(Wr.addAction)("heartbeat.tick",e,this.receivePostLock)}},{key:"componentWillUnmount",value:function(){var e=this.getHookName();Object(Wr.removeAction)("heartbeat.send",e),Object(Wr.removeAction)("heartbeat.tick",e)}},{key:"getHookName",value:function(){return"core/editor/post-locked-modal-"+this.props.instanceId}},{key:"sendPostLock",value:function(e){var t=this.props,n=t.isLocked,r=t.activePostLock,o=t.postId;n||(e["wp-refresh-post-lock"]={lock:r,post_id:o})}},{key:"receivePostLock",value:function(e){if(e["wp-refresh-post-lock"]){var t=this.props,n=t.autosave,r=t.updatePostLock,o=e["wp-refresh-post-lock"];o.lock_error?(n(),r({isLocked:!0,isTakeover:!0,user:{avatar:o.lock_error.avatar_src}})):o.new_lock&&r({isLocked:!1,activePostLock:o.new_lock})}}},{key:"releasePostLock",value:function(){var e=this.props,t=e.isLocked,n=e.activePostLock,r=e.postLockUtils,o=e.postId;if(!t&&n){var i=new window.FormData;if(i.append("action","wp-remove-post-lock"),i.append("_wpnonce",r.unlockNonce),i.append("post_ID",o),i.append("active_post_lock",n),window.navigator.sendBeacon)window.navigator.sendBeacon(r.ajaxUrl,i);else{var c=new window.XMLHttpRequest;c.open("POST",r.ajaxUrl,!1),c.send(i)}}}},{key:"render",value:function(){var e=this.props,t=e.user,n=e.postId,r=e.isLocked,o=e.isTakeover,i=e.postLockUtils,c=e.postType;if(!r)return null;var a=t.name,s=t.avatar,u=Object(jt.addQueryArgs)("post.php",{"get-post-lock":"1",lockKey:!0,post:n,action:"edit",_wpnonce:i.nonce}),l=ui("edit.php",{post_type:Object(v.get)(c,["slug"])}),d=Object(B.__)("Exit the Editor");return Object(zr.createElement)(vo.Modal,{title:o?Object(B.__)("Someone else has taken over this post."):Object(B.__)("This post is already being edited."),focusOnMount:!0,shouldCloseOnClickOutside:!1,shouldCloseOnEsc:!1,isDismissible:!1,className:"editor-post-locked-modal"},!!s&&Object(zr.createElement)("img",{src:s,alt:Object(B.__)("Avatar"),className:"editor-post-locked-modal__avatar"}),!!o&&Object(zr.createElement)("div",null,Object(zr.createElement)("div",null,a?Object(B.sprintf)(Object(B.__)("%s now has editing control of this post. Don’t worry, your changes up to this moment have been saved."),a):Object(B.__)("Another user now has editing control of this post. Don’t worry, your changes up to this moment have been saved.")),Object(zr.createElement)("div",{className:"editor-post-locked-modal__buttons"},Object(zr.createElement)(vo.Button,{isPrimary:!0,isLarge:!0,href:l},d))),!o&&Object(zr.createElement)("div",null,Object(zr.createElement)("div",null,a?Object(B.sprintf)(Object(B.__)("%s is currently working on this post, which means you cannot make changes, unless you take over."),a):Object(B.__)("Another user is currently working on this post, which means you cannot make changes, unless you take over.")),Object(zr.createElement)("div",{className:"editor-post-locked-modal__buttons"},Object(zr.createElement)(vo.Button,{isDefault:!0,isLarge:!0,href:l},d),Object(zr.createElement)(bi,null),Object(zr.createElement)(vo.Button,{isPrimary:!0,isLarge:!0,href:u},Object(B.__)("Take Over")))))}}]),t}(zr.Component),hi=Object(Hr.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}})),Hr.withInstanceId,Object(Hr.withGlobalEvents)({beforeunload:"releasePostLock"}))(fi);var mi=Object(Hr.compose)(Object(d.withSelect)((function(e){var t=e("core/editor"),n=t.isCurrentPostPublished,r=t.getCurrentPostType,o=t.getCurrentPost;return{hasPublishAction:Object(v.get)(o(),["_links","wp:action-publish"],!1),isPublished:n(),postType:r()}})))((function(e){var t=e.hasPublishAction,n=e.isPublished,r=e.children;return n||!t?null:r}));var vi=Object(Hr.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(zr.createElement)(mi,null,Object(zr.createElement)(vo.CheckboxControl,{label:Object(B.__)("Pending Review"),checked:"pending"===t,onChange:function(){n("pending"===t?"draft":"pending")}}))}));var Oi=Object(Hr.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(Vr.a)(e,["pingStatus"]);return Object(zr.createElement)(vo.CheckboxControl,{label:Object(B.__)("Allow Pingbacks & Trackbacks"),checked:"open"===n,onChange:function(){return r.editPost({ping_status:"open"===n?"closed":"open"})}})}));var gi=Object(Hr.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(v.get)(s(),["_links","wp:action-publish"],!1),postType:u(),isAutosaving:l()}}))])((function(e){var t=e.isPublished,n=e.isBeingScheduled,r=e.isSaving,o=e.isPublishing,i=e.hasPublishAction,c=e.isAutosaving;return o?Object(B.__)("Publishing…"):t&&r&&!c?Object(B.__)("Updating…"):n&&r&&!c?Object(B.__)("Scheduling…"):i?t?Object(B.__)("Update"):n?Object(B.__)("Schedule"):Object(B.__)("Publish"):Object(B.__)("Submit for Review")})),ji=function(e){function t(e){var n;return Object(Jr.a)(this,t),(n=Object(eo.a)(this,Object(to.a)(t).call(this,e))).buttonNode=Object(zr.createRef)(),n}return Object(no.a)(t,e),Object($r.a)(t,[{key:"componentDidMount",value:function(){this.props.focusOnMount&&this.buttonNode.current.focus()}},{key:"render",value:function(){var e,t=this.props,n=t.forceIsDirty,r=t.forceIsSaving,o=t.hasPublishAction,i=t.isBeingScheduled,c=t.isOpen,a=t.isPostSavingLocked,s=t.isPublishable,u=t.isPublished,l=t.isSaveable,d=t.isSaving,p=t.isToggle,b=t.onSave,f=t.onStatusChange,h=t.onSubmit,m=void 0===h?v.noop:h,O=t.onToggle,g=t.visibility,j=d||r||!l||a||!s&&!n,_=u||d||r||!l||!s&&!n;e=o?"private"===g?"private":i?"future":"publish":"pending";var y={"aria-disabled":j,className:"editor-post-publish-button",isBusy:d&&u,isPrimary:!0,onClick:function(){j||(m(),f(e),b())}},k={"aria-disabled":_,"aria-expanded":c,className:"editor-post-publish-panel__toggle",isBusy:d&&u,isPrimary:!0,onClick:function(){_||O()}},E=i?Object(B.__)("Schedule…"):Object(B.__)("Publish…"),S=Object(zr.createElement)(gi,{forceIsSaving:r}),P=p?k:y,w=p?E:S;return Object(zr.createElement)(vo.Button,Object(Mr.a)({isLarge:!0,ref:this.buttonNode},P),w)}}]),t}(zr.Component),_i=Object(Hr.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;return{isSaving:n(),isBeingScheduled:r(),visibility:o(),isSaveable:c(),isPostSavingLocked:s(),isPublishable:a(),isPublished:i(),hasPublishAction:Object(v.get)(u(),["_links","wp:action-publish"],!1),postType:l()}})),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}}))])(ji),yi=[{value:"public",label:Object(B.__)("Public"),info:Object(B.__)("Visible to everyone.")},{value:"private",label:Object(B.__)("Private"),info:Object(B.__)("Only visible to site admins and editors.")},{value:"password",label:Object(B.__)("Password Protected"),info:Object(B.__)("Protected with a password you choose. Only those with the password can view this post.")}],ki=function(e){function t(e){var n;return Object(Jr.a)(this,t),(n=Object(eo.a)(this,Object(to.a)(t).apply(this,arguments))).setPublic=n.setPublic.bind(Object(mo.a)(n)),n.setPrivate=n.setPrivate.bind(Object(mo.a)(n)),n.setPasswordProtected=n.setPasswordProtected.bind(Object(mo.a)(n)),n.updatePassword=n.updatePassword.bind(Object(mo.a)(n)),n.state={hasPassword:!!e.password},n}return Object(no.a)(t,e),Object($r.a)(t,[{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(B.__)("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(zr.createElement)("fieldset",{key:"visibility-selector",className:"editor-post-visibility__dialog-fieldset"},Object(zr.createElement)("legend",{className:"editor-post-visibility__dialog-legend"},Object(B.__)("Post Visibility")),yi.map((function(e){var t=e.value,n=e.label,i=e.info;return Object(zr.createElement)("div",{key:t,className:"editor-post-visibility__choice"},Object(zr.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(zr.createElement)("label",{htmlFor:"editor-post-".concat(t,"-").concat(r),className:"editor-post-visibility__dialog-label"},n),Object(zr.createElement)("p",{id:"editor-post-".concat(t,"-").concat(r,"-description"),className:"editor-post-visibility__dialog-info"},i))}))),this.state.hasPassword&&Object(zr.createElement)("div",{className:"editor-post-visibility__dialog-password",key:"password-selector"},Object(zr.createElement)("label",{htmlFor:"editor-post-visibility__dialog-password-input-".concat(r),className:"screen-reader-text"},Object(B.__)("Create password")),Object(zr.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(B.__)("Use a secure password")}))]}}]),t}(zr.Component),Ei=Object(Hr.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})}}})),Hr.withInstanceId])(ki);var Si=Object(d.withSelect)((function(e){return{visibility:e("core/editor").getEditedPostVisibility()}}))((function(e){var t=e.visibility;return Object(v.find)(yi,{value:t}).label}));var Pi=Object(Hr.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(gt.__experimentalGetSettings)(),o=/a(?!\\)/i.test(r.formats.time.toLowerCase().replace(/\\\\/g,"").split("").reverse().join(""));return Object(zr.createElement)(vo.DateTimePicker,{key:"date-time-picker",currentDate:t,onChange:n,is12Hour:o})}));var wi=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(gt.__experimentalGetSettings)();return t&&!n?Object(gt.dateI18n)("".concat(r.formats.date," ").concat(r.formats.time),t):Object(B.__)("Immediately")})),Ci={per_page:-1,orderby:"count",order:"desc",_fields:"id,name"},Ti=function(e,t){return e.toLowerCase()===t.toLowerCase()},Bi=function(e){return Object(l.a)({},e,{name:Object(v.unescape)(e.name)})},xi=function(e){return Object(v.map)(e,Bi)},Ii=function(e){function t(){var e;return Object(Jr.a)(this,t),(e=Object(eo.a)(this,Object(to.a)(t).apply(this,arguments))).onChange=e.onChange.bind(Object(mo.a)(e)),e.searchTerms=Object(v.throttle)(e.searchTerms.bind(Object(mo.a)(e)),500),e.findOrCreateTerm=e.findOrCreateTerm.bind(Object(mo.a)(e)),e.state={loading:!Object(v.isEmpty)(e.props.terms),availableTerms:[],selectedTerms:[]},e}return Object(no.a)(t,e),Object($r.a)(t,[{key:"componentDidMount",value:function(){var e=this;Object(v.isEmpty)(this.props.terms)||(this.initRequest=this.fetchTerms({include:this.props.terms.join(","),per_page:-1}),this.initRequest.then((function(){e.setState({loading:!1})}),(function(t){"abort"!==t.statusText&&e.setState({loading:!1})})))}},{key:"componentWillUnmount",value:function(){Object(v.invoke)(this.initRequest,["abort"]),Object(v.invoke)(this.searchRequest,["abort"])}},{key:"componentDidUpdate",value:function(e){e.terms!==this.props.terms&&this.updateSelectedTerms(this.props.terms)}},{key:"fetchTerms",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=this.props.taxonomy,r=Object(l.a)({},Ci,t),o=T()({path:Object(jt.addQueryArgs)("/wp/v2/".concat(n.rest_base),r)});return o.then(xi).then((function(t){e.setState((function(e){return{availableTerms:e.availableTerms.concat(t.filter((function(t){return!Object(v.find)(e.availableTerms,(function(e){return e.id===t.id}))})))}})),e.updateSelectedTerms(e.props.terms)})),o}},{key:"updateSelectedTerms",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=t.reduce((function(t,n){var r=Object(v.find)(e.state.availableTerms,(function(e){return e.id===n}));return r&&t.push(r.name),t}),[]);this.setState({selectedTerms:n})}},{key:"findOrCreateTerm",value:function(e){var t=this,n=this.props.taxonomy,r=Object(v.escape)(e);return T()({path:"/wp/v2/".concat(n.rest_base),method:"POST",data:{name:r}}).catch((function(o){return"term_exists"===o.code?(t.addRequest=T()({path:Object(jt.addQueryArgs)("/wp/v2/".concat(n.rest_base),Object(l.a)({},Ci,{search:r}))}).then(xi),t.addRequest.then((function(t){return Object(v.find)(t,(function(t){return Ti(t.name,e)}))}))):Promise.reject(o)})).then(Bi)}},{key:"onChange",value:function(e){var t=this,n=Object(v.uniqBy)(e,(function(e){return e.toLowerCase()}));this.setState({selectedTerms:n});var r=n.filter((function(e){return!Object(v.find)(t.state.availableTerms,(function(t){return Ti(t.name,e)}))})),o=function(e,t){return e.map((function(e){return Object(v.find)(t,(function(t){return Ti(t.name,e)})).id}))};if(0===r.length)return this.props.onUpdateTerms(o(n,this.state.availableTerms),this.props.taxonomy.rest_base);Promise.all(r.map(this.findOrCreateTerm)).then((function(e){var r=t.state.availableTerms.concat(e);return t.setState({availableTerms:r}),t.props.onUpdateTerms(o(n,r),t.props.taxonomy.rest_base)}))}},{key:"searchTerms",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";Object(v.invoke)(this.searchRequest,["abort"]),this.searchRequest=this.fetchTerms({search:e})}},{key:"render",value:function(){var e=this.props,t=e.slug,n=e.taxonomy;if(!e.hasAssignAction)return null;var r=this.state,o=r.loading,i=r.availableTerms,c=r.selectedTerms,a=i.map((function(e){return e.name})),s=Object(v.get)(n,["labels","add_new_item"],"post_tag"===t?Object(B.__)("Add New Tag"):Object(B.__)("Add New Term")),u=Object(v.get)(n,["labels","singular_name"],"post_tag"===t?Object(B.__)("Tag"):Object(B.__)("Term")),l=Object(B.sprintf)(Object(B._x)("%s added","term"),u),d=Object(B.sprintf)(Object(B._x)("%s removed","term"),u),p=Object(B.sprintf)(Object(B._x)("Remove %s","term"),u);return Object(zr.createElement)(vo.FormTokenField,{value:c,suggestions:a,onChange:this.onChange,onInputChange:this.searchTerms,maxSuggestions:20,disabled:o,label:s,messages:{added:l,removed:d,remove:p}})}}]),t}(zr.Component),Ai=Object(Hr.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(v.get)(r(),["_links","wp:action-create-"+o.rest_base],!1),hasAssignAction:!!o&&Object(v.get)(r(),["_links","wp:action-assign-"+o.rest_base],!1),terms:o?e("core/editor").getEditedPostAttribute(o.rest_base):[],taxonomy:o}})),Object(d.withDispatch)((function(e){return{onUpdateTerms:function(t,n){e("core/editor").editPost(Object(b.a)({},n,t))}}})),Object(vo.withFilters)("editor.PostTaxonomyType"))(Ii),Ri=function(){var e=[Object(B.__)("Suggestion:"),Object(zr.createElement)("span",{className:"editor-post-publish-panel__link",key:"label"},Object(B.__)("Add tags"))];return Object(zr.createElement)(vo.PanelBody,{initialOpen:!1,title:e},Object(zr.createElement)("p",null,Object(B.__)("Tags help users and search engines navigate your site and find your content. Add a few keywords to describe your post.")),Object(zr.createElement)(Ai,{slug:"post_tag"}))},Li=function(e){function t(e){var n;return Object(Jr.a)(this,t),(n=Object(eo.a)(this,Object(to.a)(t).call(this,e))).state={hadTagsWhenOpeningThePanel:e.hasTags},n}return Object(no.a)(t,e),Object($r.a)(t,[{key:"render",value:function(){return this.state.hadTagsWhenOpeningThePanel?null:Object(zr.createElement)(Ri,null)}}]),t}(zr.Component),Ni=Object(Hr.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(v.some)(n.types,(function(e){return e===t})),hasTags:r&&r.length}})),Object(Hr.ifCondition)((function(e){var t=e.areTagsFetched;return e.isPostTypeSupported&&t})))(Li),Di=function(e){var t=e.suggestedPostFormat,n=e.suggestionText,r=e.onUpdatePostFormat;return Object(zr.createElement)(vo.Button,{isLink:!0,onClick:function(){return r(t)}},n)},Ui=function(e,t){var n=ci.filter((function(t){return Object(v.includes)(e,t.id)}));return Object(v.find)(n,(function(e){return e.id===t}))},Fi=Object(Hr.compose)(Object(d.withSelect)((function(e){var t=e("core/editor"),n=t.getEditedPostAttribute,r=t.getSuggestedPostFormat,o=Object(v.get)(e("core").getThemeSupports(),["formats"],[]);return{currentPostFormat:n("format"),suggestion:Ui(o,r())}})),Object(d.withDispatch)((function(e){return{onUpdatePostFormat:function(t){e("core/editor").editPost({format:t})}}})),Object(Hr.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(B.__)("Suggestion:"),Object(zr.createElement)("span",{className:"editor-post-publish-panel__link",key:"label"},Object(B.__)("Use a post format"))];return Object(zr.createElement)(vo.PanelBody,{initialOpen:!1,title:r},Object(zr.createElement)("p",null,Object(B.__)("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(zr.createElement)("p",null,Object(zr.createElement)(Di,{onUpdatePostFormat:n,suggestedPostFormat:t.id,suggestionText:Object(B.sprintf)(Object(B.__)('Apply the "%1$s" format.'),t.caption)})))}));var Mi=Object(d.withSelect)((function(e){var t=e("core/editor"),n=t.getCurrentPost,r=t.isEditedPostBeingScheduled;return{hasPublishAction:Object(v.get)(n(),["_links","wp:action-publish"],!1),isBeingScheduled:r()}}))((function(e){var t,n,r=e.hasPublishAction,o=e.isBeingScheduled,i=e.children;return r?o?(t=Object(B.__)("Are you ready to schedule?"),n=Object(B.__)("Your work will be published at the specified date and time.")):(t=Object(B.__)("Are you ready to publish?"),n=Object(B.__)("Double-check your settings before publishing.")):(t=Object(B.__)("Are you ready to submit for review?"),n=Object(B.__)("When you’re ready, submit your work for review, and an Editor will be able to approve it for you.")),Object(zr.createElement)("div",{className:"editor-post-publish-panel__prepublish"},Object(zr.createElement)("div",null,Object(zr.createElement)("strong",null,t)),Object(zr.createElement)("p",null,n),r&&Object(zr.createElement)(zr.Fragment,null,Object(zr.createElement)(vo.PanelBody,{initialOpen:!1,title:[Object(B.__)("Visibility:"),Object(zr.createElement)("span",{className:"editor-post-publish-panel__link",key:"label"},Object(zr.createElement)(Si,null))]},Object(zr.createElement)(Ei,null)),Object(zr.createElement)(vo.PanelBody,{initialOpen:!1,title:[Object(B.__)("Publish:"),Object(zr.createElement)("span",{className:"editor-post-publish-panel__link",key:"label"},Object(zr.createElement)(wi,null))]},Object(zr.createElement)(Pi,null))),Object(zr.createElement)(Fi,null),Object(zr.createElement)(Ni,null),i)})),Vi=function(e){function t(){var e;return Object(Jr.a)(this,t),(e=Object(eo.a)(this,Object(to.a)(t).apply(this,arguments))).state={showCopyConfirmation:!1},e.onCopy=e.onCopy.bind(Object(mo.a)(e)),e.onSelectInput=e.onSelectInput.bind(Object(mo.a)(e)),e.postLink=Object(zr.createRef)(),e}return Object(no.a)(t,e),Object($r.a)(t,[{key:"componentDidMount",value:function(){this.props.focusOnMount&&this.postLink.current.focus()}},{key:"componentWillUnmount",value:function(){clearTimeout(this.dismissCopyConfirmation)}},{key:"onCopy",value:function(){var e=this;this.setState({showCopyConfirmation:!0}),clearTimeout(this.dismissCopyConfirmation),this.dismissCopyConfirmation=setTimeout((function(){e.setState({showCopyConfirmation:!1})}),4e3)}},{key:"onSelectInput",value:function(e){e.target.select()}},{key:"render",value:function(){var e=this.props,t=e.children,n=e.isScheduled,r=e.post,o=e.postType,i=Object(v.get)(o,["labels","singular_name"]),c=Object(v.get)(o,["labels","view_item"]),a=n?Object(zr.createElement)(zr.Fragment,null,Object(B.__)("is now scheduled. It will go live on")," ",Object(zr.createElement)(wi,null),"."):Object(B.__)("is now live.");return Object(zr.createElement)("div",{className:"post-publish-panel__postpublish"},Object(zr.createElement)(vo.PanelBody,{className:"post-publish-panel__postpublish-header"},Object(zr.createElement)("a",{ref:this.postLink,href:r.link},r.title||Object(B.__)("(no title)"))," ",a),Object(zr.createElement)(vo.PanelBody,null,Object(zr.createElement)("p",{className:"post-publish-panel__postpublish-subheader"},Object(zr.createElement)("strong",null,Object(B.__)("What’s next?"))),Object(zr.createElement)(vo.TextControl,{className:"post-publish-panel__postpublish-post-address",readOnly:!0,label:Object(B.sprintf)(Object(B.__)("%s address"),i),value:Object(jt.safeDecodeURIComponent)(r.link),onFocus:this.onSelectInput}),Object(zr.createElement)("div",{className:"post-publish-panel__postpublish-buttons"},!n&&Object(zr.createElement)(vo.Button,{isDefault:!0,href:r.link},c),Object(zr.createElement)(vo.ClipboardButton,{isDefault:!0,text:r.link,onCopy:this.onCopy},this.state.showCopyConfirmation?Object(B.__)("Copied!"):Object(B.__)("Copy Link")))),t)}}]),t}(zr.Component),zi=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()}}))(Vi),Hi=function(e){function t(){var e;return Object(Jr.a)(this,t),(e=Object(eo.a)(this,Object(to.a)(t).apply(this,arguments))).onSubmit=e.onSubmit.bind(Object(mo.a)(e)),e}return Object(no.a)(t,e),Object($r.a)(t,[{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(Vr.a)(e,["forceIsDirty","forceIsSaving","isBeingScheduled","isPublished","isPublishSidebarEnabled","isScheduled","isSaving","onClose","onTogglePublishSidebar","PostPublishExtension","PrePublishExtension"]),b=Object(v.omit)(p,["hasPublishAction","isDirty","isPostTypeViewable"]),f=o||c&&r,h=!f&&!a,m=f&&!a;return Object(zr.createElement)("div",Object(Mr.a)({className:"editor-post-publish-panel"},b),Object(zr.createElement)("div",{className:"editor-post-publish-panel__header"},m?Object(zr.createElement)("div",{className:"editor-post-publish-panel__header-published"},c?Object(B.__)("Scheduled"):Object(B.__)("Published")):Object(zr.createElement)("div",{className:"editor-post-publish-panel__header-publish-button"},Object(zr.createElement)(_i,{focusOnMount:!0,onSubmit:this.onSubmit,forceIsDirty:t,forceIsSaving:n})),Object(zr.createElement)(vo.IconButton,{"aria-expanded":!0,onClick:s,icon:"no-alt",label:Object(B.__)("Close panel")})),Object(zr.createElement)("div",{className:"editor-post-publish-panel__content"},h&&Object(zr.createElement)(Mi,null,d&&Object(zr.createElement)(d,null)),m&&Object(zr.createElement)(zi,{focusOnMount:!0},l&&Object(zr.createElement)(l,null)),a&&Object(zr.createElement)(vo.Spinner,null)),Object(zr.createElement)("div",{className:"editor-post-publish-panel__footer"},Object(zr.createElement)(vo.CheckboxControl,{label:Object(B.__)("Always show pre-publish checks."),checked:i,onChange:u})))}}]),t}(zr.Component),Wi=Object(Hr.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(v.get)(r(),["_links","wp:action-publish"],!1),isPostTypeViewable:Object(v.get)(d,["viewable"],!1),isBeingScheduled:a(),isDirty:s(),isPublished:i(),isPublishSidebarEnabled:l(),isSaving:u(),isScheduled:c()}})),Object(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()}}})),vo.withFocusReturn,vo.withConstrainedTabbing])(Hi);var Ki=Object(Hr.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(Hr.useViewportMatch)("small","<");return n||r?Object(zr.createElement)(vo.Button,{className:"editor-post-switch-to-draft",onClick:function(){var e;n?e=Object(B.__)("Are you sure you want to unpublish this post?"):r&&(e=Object(B.__)("Are you sure you want to unschedule this post?")),window.confirm(e)&&o()},disabled:t,isTertiary:!0},i?Object(B.__)("Draft"):Object(B.__)("Switch to Draft")):null})),Gi=function(e){function t(){var e;return Object(Jr.a)(this,t),(e=Object(eo.a)(this,Object(to.a)(t).apply(this,arguments))).state={forceSavedMessage:!1},e}return Object(no.a)(t,e),Object($r.a)(t,[{key:"componentDidUpdate",value:function(e){var t=this;e.isSaving&&!this.props.isSaving&&(this.setState({forceSavedMessage:!0}),this.props.setTimeout((function(){t.setState({forceSavedMessage:!1})}),1e3))}},{key:"render",value:function(){var e=this.props,t=e.post,n=e.isNew,r=e.isScheduled,o=e.isPublished,i=e.isDirty,c=e.isSaving,a=e.isSaveable,s=e.onSave,u=e.isAutosaving,l=e.isPending,d=e.isLargeViewport,p=this.state.forceSavedMessage;if(c){var b=co()("editor-post-saved-state","is-saving",{"is-autosaving":u});return Object(zr.createElement)(vo.Animate,{type:"loading"},(function(e){var t=e.className;return Object(zr.createElement)("span",{className:co()(b,t)},Object(zr.createElement)(vo.Dashicon,{icon:"cloud"}),u?Object(B.__)("Autosaving"):Object(B.__)("Saving"))}))}if(o||r)return Object(zr.createElement)(Ki,null);if(!a)return null;if(p||!n&&!i)return Object(zr.createElement)("span",{className:"editor-post-saved-state is-saved"},Object(zr.createElement)(vo.Dashicon,{icon:"saved"}),Object(B.__)("Saved"));if(!Object(v.get)(t,["_links","wp:action-publish"],!1)&&l)return null;var f=l?Object(B.__)("Save as Pending"):Object(B.__)("Save Draft");return d?Object(zr.createElement)(vo.Button,{className:"editor-post-save-draft",onClick:function(){return s()},shortcut:Oo.displayShortcut.primary("s"),isTertiary:!0},f):Object(zr.createElement)(vo.IconButton,{className:"editor-post-save-draft",label:f,onClick:function(){return s()},shortcut:Oo.displayShortcut.primary("s"),icon:"cloud-upload"})}}]),t}(zr.Component),qi=Object(Hr.compose)([Object(d.withSelect)((function(e,t){var n=t.forceIsDirty,r=t.forceIsSaving,o=e("core/editor"),i=o.isEditedPostNew,c=o.isCurrentPostPublished,a=o.isCurrentPostScheduled,s=o.isEditedPostDirty,u=o.isSavingPost,l=o.isEditedPostSaveable,d=o.getCurrentPost,p=o.isAutosavingPost,b=o.getEditedPostAttribute;return{post:d(),isNew:i(),isPublished:c(),isScheduled:a(),isDirty:n||s(),isSaving:r||u(),isSaveable:l(),isAutosaving:p(),isPending:"pending"===b("status")}})),Object(d.withDispatch)((function(e){return{onSave:e("core/editor").savePost}})),Hr.withSafeTimeout,Object(u.withViewportMatch)({isLargeViewport:"small"})])(Gi);var Qi=Object(Hr.compose)([Object(d.withSelect)((function(e){var t=e("core/editor"),n=t.getCurrentPost,r=t.getCurrentPostType;return{hasPublishAction:Object(v.get)(n(),["_links","wp:action-publish"],!1),postType:r()}}))])((function(e){var t=e.hasPublishAction,n=e.children;return t?n:null}));function Yi(e){var t=e.children;return Object(zr.createElement)(Lo,{supportKeys:"slug"},t)}var Xi=function(e){function t(e){var n,r=e.postSlug,o=e.postTitle,i=e.postID;return Object(Jr.a)(this,t),(n=Object(eo.a)(this,Object(to.a)(t).apply(this,arguments))).state={editedSlug:Object(jt.safeDecodeURIComponent)(r)||li(o)||i},n.setSlug=n.setSlug.bind(Object(mo.a)(n)),n}return Object(no.a)(t,e),Object($r.a)(t,[{key:"setSlug",value:function(e){var t=this.props,n=t.postSlug,r=t.onUpdateSlug,o=li(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(zr.createElement)(Yi,null,Object(zr.createElement)("label",{htmlFor:r},Object(B.__)("Slug")),Object(zr.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"}))}}]),t}(zr.Component),Zi=Object(Hr.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})}}})),Hr.withInstanceId])(Xi);var Ji=Object(Hr.compose)([Object(d.withSelect)((function(e){var t=e("core/editor").getCurrentPost();return{hasStickyAction:Object(v.get)(t,["_links","wp:action-sticky"],!1),postType:e("core/editor").getCurrentPostType()}}))])((function(e){var t=e.hasStickyAction,n=e.postType,r=e.children;return"post"===n&&t?r:null}));var $i=Object(Hr.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(zr.createElement)(Ji,null,Object(zr.createElement)(vo.CheckboxControl,{label:Object(B.__)("Stick to the top of the blog"),checked:r,onChange:function(){return t(!r)}}))})),ec={per_page:-1,orderby:"name",order:"asc",_fields:"id,name,parent"},tc=function(e){function t(){var e;return Object(Jr.a)(this,t),(e=Object(eo.a)(this,Object(to.a)(t).apply(this,arguments))).findTerm=e.findTerm.bind(Object(mo.a)(e)),e.onChange=e.onChange.bind(Object(mo.a)(e)),e.onChangeFormName=e.onChangeFormName.bind(Object(mo.a)(e)),e.onChangeFormParent=e.onChangeFormParent.bind(Object(mo.a)(e)),e.onAddTerm=e.onAddTerm.bind(Object(mo.a)(e)),e.onToggleForm=e.onToggleForm.bind(Object(mo.a)(e)),e.setFilterValue=e.setFilterValue.bind(Object(mo.a)(e)),e.sortBySelected=e.sortBySelected.bind(Object(mo.a)(e)),e.state={loading:!0,availableTermsTree:[],availableTerms:[],adding:!1,formName:"",formParent:"",showForm:!1,filterValue:"",filteredTermsTree:[]},e}return Object(no.a)(t,e),Object($r.a)(t,[{key:"onChange",value:function(e){var t=this.props,n=t.onUpdateTerms,r=t.terms,o=void 0===r?[]:r,i=t.taxonomy;n(-1!==o.indexOf(e)?Object(v.without)(o,e):[].concat(Object(x.a)(o),[e]),i.rest_base)}},{key:"onChangeFormName",value:function(e){var t=""===e.target.value.trim()?"":e.target.value;this.setState({formName:t})}},{key:"onChangeFormParent",value:function(e){this.setState({formParent:e})}},{key:"onToggleForm",value:function(){this.setState((function(e){return{showForm:!e.showForm}}))}},{key:"findTerm",value:function(e,t,n){return Object(v.find)(e,(function(e){return(!e.parent&&!t||parseInt(e.parent)===parseInt(t))&&e.name.toLowerCase()===n.toLowerCase()}))}},{key:"onAddTerm",value:function(e){var t=this;e.preventDefault();var n=this.props,r=n.onUpdateTerms,o=n.taxonomy,i=n.terms,c=n.slug,a=this.state,s=a.formName,u=a.formParent,d=a.adding,p=a.availableTerms;if(""!==s&&!d){var b=this.findTerm(p,u,s);if(b)return Object(v.some)(i,(function(e){return e===b.id}))||r([].concat(Object(x.a)(i),[b.id]),o.rest_base),void this.setState({formName:"",formParent:""});this.setState({adding:!0}),this.addRequest=T()({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=T()({path:Object(jt.addQueryArgs)("/wp/v2/".concat(o.rest_base),Object(l.a)({},ec,{parent:u||0,search:s}))}),t.addRequest.then((function(e){return t.findTerm(e,u,s)}))):Promise.reject(e)})).then((function(e){var n=!!Object(v.find)(t.state.availableTerms,(function(t){return t.id===e.id}))?t.state.availableTerms:[e].concat(Object(x.a)(t.state.availableTerms)),a=Object(B.sprintf)(Object(B._x)("%s added","term"),Object(v.get)(t.props.taxonomy,["labels","singular_name"],"category"===c?Object(B.__)("Category"):Object(B.__)("Term")));t.props.speak(a,"assertive"),t.addRequest=null,t.setState({adding:!1,formName:"",formParent:"",availableTerms:n,availableTermsTree:t.sortBySelected(Uo(n))}),r([].concat(Object(x.a)(i),[e.id]),o.rest_base)}),(function(e){"abort"!==e.statusText&&(t.addRequest=null,t.setState({adding:!1}))}))}}},{key:"componentDidMount",value:function(){this.fetchTerms()}},{key:"componentWillUnmount",value:function(){Object(v.invoke)(this.fetchRequest,["abort"]),Object(v.invoke)(this.addRequest,["abort"])}},{key:"componentDidUpdate",value:function(e){this.props.taxonomy!==e.taxonomy&&this.fetchTerms()}},{key:"fetchTerms",value:function(){var e=this,t=this.props.taxonomy;t&&(this.fetchRequest=T()({path:Object(jt.addQueryArgs)("/wp/v2/".concat(t.rest_base),ec)}),this.fetchRequest.then((function(t){var n=e.sortBySelected(Uo(t));e.fetchRequest=null,e.setState({loading:!1,availableTermsTree:n,availableTerms:t})}),(function(t){"abort"!==t.statusText&&(e.fetchRequest=null,e.setState({loading:!1}))})))}},{key:"sortBySelected",value:function(e){var t=this.props.terms,n=function e(n){return-1!==t.indexOf(n.id)||void 0!==n.children&&!!(n.children.map(e).filter((function(e){return e})).length>0)};return e.sort((function(e,t){var r=n(e),o=n(t);return r===o?0:r&&!o?-1:!r&&o?1:0})),e}},{key:"setFilterValue",value:function(e){var t=this.state.availableTermsTree,n=e.target.value,r=t.map(this.getFilterMatcher(n)).filter((function(e){return e}));this.setState({filterValue:n,filteredTermsTree:r});var o=function e(t){for(var n=0,r=0;r0&&(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(zr.createElement)("div",{key:e.id,className:"editor-post-taxonomies__hierarchical-terms-choice"},Object(zr.createElement)(vo.CheckboxControl,{checked:-1!==r.indexOf(e.id),onChange:function(){var n=parseInt(e.id,10);t.onChange(n)},label:Object(v.unescape)(e.name)}),!!e.children.length&&Object(zr.createElement)("div",{className:"editor-post-taxonomies__hierarchical-terms-subchoices"},t.renderTerms(e.children)))}))}},{key:"render",value:function(){var e=this.props,t=e.slug,n=e.taxonomy,r=e.instanceId,o=e.hasCreateAction;if(!e.hasAssignAction)return null;var i=this.state,c=i.availableTermsTree,a=i.availableTerms,s=i.filteredTermsTree,u=i.formName,l=i.formParent,d=i.loading,p=i.showForm,b=i.filterValue,f=function(e,r,o){return Object(v.get)(n,["labels",e],"category"===t?r:o)},h=f("add_new_item",Object(B.__)("Add new category"),Object(B.__)("Add new term")),m=f("new_item_name",Object(B.__)("Add new category"),Object(B.__)("Add new term")),O=f("parent_item",Object(B.__)("Parent Category"),Object(B.__)("Parent Term")),g="— ".concat(O," —"),j=h,_="editor-post-taxonomies__hierarchical-terms-input-".concat(r),y="editor-post-taxonomies__hierarchical-terms-filter-".concat(r),k=Object(v.get)(this.props.taxonomy,["labels","search_items"],Object(B.__)("Search Terms")),E=Object(v.get)(this.props.taxonomy,["name"],Object(B.__)("Terms")),S=a.length>=8;return[S&&Object(zr.createElement)("label",{key:"filter-label",htmlFor:y},k),S&&Object(zr.createElement)("input",{type:"search",id:y,value:b,onChange:this.setFilterValue,className:"editor-post-taxonomies__hierarchical-terms-filter",key:"term-filter-input"}),Object(zr.createElement)("div",{className:"editor-post-taxonomies__hierarchical-terms-list",key:"term-list",tabIndex:"0",role:"group","aria-label":E},this.renderTerms(""!==b?s:c)),!d&&o&&Object(zr.createElement)(vo.Button,{key:"term-add-button",onClick:this.onToggleForm,className:"editor-post-taxonomies__hierarchical-terms-add","aria-expanded":p,isLink:!0},h),p&&Object(zr.createElement)("form",{onSubmit:this.onAddTerm,key:"hierarchical-terms-form"},Object(zr.createElement)("label",{htmlFor:_,className:"editor-post-taxonomies__hierarchical-terms-label"},m),Object(zr.createElement)("input",{type:"text",id:_,className:"editor-post-taxonomies__hierarchical-terms-input",value:u,onChange:this.onChangeFormName,required:!0}),!!a.length&&Object(zr.createElement)(vo.TreeSelect,{label:O,noOptionLabel:g,onChange:this.onChangeFormParent,selectedId:l,tree:c}),Object(zr.createElement)(vo.Button,{isDefault:!0,type:"submit",className:"editor-post-taxonomies__hierarchical-terms-submit"},j))]}}]),t}(zr.Component),nc=Object(Hr.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(v.get)(r(),["_links","wp:action-create-"+o.rest_base],!1),hasAssignAction:!!o&&Object(v.get)(r(),["_links","wp:action-assign-"+o.rest_base],!1),terms:o?e("core/editor").getEditedPostAttribute(o.rest_base):[],taxonomy:o}})),Object(d.withDispatch)((function(e){return{onUpdateTerms:function(t,n){e("core/editor").editPost(Object(b.a)({},n,t))}}})),vo.withSpokenMessages,Hr.withInstanceId,Object(vo.withFilters)("editor.PostTaxonomyType")])(tc);var rc=Object(Hr.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?v.identity:r,i=Object(v.filter)(n,(function(e){return Object(v.includes)(e.types,t)}));return Object(v.filter)(i,(function(e){return e.visibility.show_ui})).map((function(e){var t=e.hierarchical?nc:Ai;return Object(zr.createElement)(zr.Fragment,{key:"taxonomy-".concat(e.slug)},o(Object(zr.createElement)(t,{slug:e.slug}),e))}))}));var oc=Object(Hr.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(v.some)(n,(function(e){return Object(v.includes)(e.types,t)}))?r:null})),ic=n(60),cc=n.n(ic),ac=function(e){function t(){var e;return Object(Jr.a)(this,t),(e=Object(eo.a)(this,Object(to.a)(t).apply(this,arguments))).edit=e.edit.bind(Object(mo.a)(e)),e.stopEditing=e.stopEditing.bind(Object(mo.a)(e)),e.state={},e}return Object(no.a)(t,e),Object($r.a)(t,[{key:"edit",value:function(e){var t=e.target.value;this.props.onChange(t),this.setState({value:t,isDirty:!0})}},{key:"stopEditing",value:function(){this.state.isDirty&&(this.props.onPersist(this.state.value),this.setState({isDirty:!1}))}},{key:"render",value:function(){var e=this.state.value,t=this.props.instanceId;return Object(zr.createElement)(zr.Fragment,null,Object(zr.createElement)("label",{htmlFor:"post-content-".concat(t),className:"screen-reader-text"},Object(B.__)("Type text or HTML")),Object(zr.createElement)(cc.a,{autoComplete:"off",dir:"auto",value:e,onChange:this.edit,onBlur:this.stopEditing,className:"editor-post-text-editor",id:"post-content-".concat(t),placeholder:Object(B.__)("Start writing with text or HTML")}))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return t.isDirty?null:{value:e.value,isDirty:!1}}}]),t}(zr.Component),sc=Object(Hr.compose)([Object(d.withSelect)((function(e){return{value:(0,e("core/editor").getEditedPostContent)()}})),Object(d.withDispatch)((function(e){var t=e("core/editor"),n=t.editPost,r=t.resetEditorBlocks;return{onChange:function(e){n({content:e})},onPersist:function(e){var t=Object(c.parse)(e);r(t)}}})),Hr.withInstanceId])(ac),uc=function(e){function t(e){var n,r=e.permalinkParts,o=e.slug;return Object(Jr.a)(this,t),(n=Object(eo.a)(this,Object(to.a)(t).apply(this,arguments))).state={editedPostName:o||r.postName},n.onSavePermalink=n.onSavePermalink.bind(Object(mo.a)(n)),n}return Object(no.a)(t,e),Object($r.a)(t,[{key:"onSavePermalink",value:function(e){var t=li(this.state.editedPostName);e.preventDefault(),this.props.onSave(),t!==this.props.postName&&(this.props.editPost({slug:t}),this.setState({editedPostName:t}))}},{key:"render",value:function(){var e=this,t=this.props.permalinkParts,n=t.prefix,r=t.suffix,o=this.state.editedPostName;return Object(zr.createElement)("form",{className:"editor-post-permalink-editor",onSubmit:this.onSavePermalink},Object(zr.createElement)("span",{className:"editor-post-permalink__editor-container"},Object(zr.createElement)("span",{className:"editor-post-permalink-editor__prefix"},n),Object(zr.createElement)("input",{className:"editor-post-permalink-editor__edit","aria-label":Object(B.__)("Edit post permalink"),value:o,onChange:function(t){return e.setState({editedPostName:t.target.value})},type:"text",autoFocus:!0}),Object(zr.createElement)("span",{className:"editor-post-permalink-editor__suffix"},r),"‎"),Object(zr.createElement)(vo.Button,{className:"editor-post-permalink-editor__save",isLarge:!0,onClick:this.onSavePermalink},Object(B.__)("Save")))}}]),t}(zr.Component),lc=Object(Hr.compose)([Object(d.withSelect)((function(e){return{permalinkParts:(0,e("core/editor").getPermalinkParts)()}})),Object(d.withDispatch)((function(e){return{editPost:e("core/editor").editPost}}))])(uc),dc=function(e){function t(){var e;return Object(Jr.a)(this,t),(e=Object(eo.a)(this,Object(to.a)(t).apply(this,arguments))).addVisibilityCheck=e.addVisibilityCheck.bind(Object(mo.a)(e)),e.onVisibilityChange=e.onVisibilityChange.bind(Object(mo.a)(e)),e.state={isCopied:!1,isEditingPermalink:!1},e}return Object(no.a)(t,e),Object($r.a)(t,[{key:"addVisibilityCheck",value:function(){window.addEventListener("visibilitychange",this.onVisibilityChange)}},{key:"onVisibilityChange",value:function(){var e=this.props,t=e.isEditable,n=e.refreshPost;t||"visible"!==document.visibilityState||n()}},{key:"componentDidUpdate",value:function(e,t){t.isEditingPermalink&&!this.state.isEditingPermalink&&this.linkElement.focus()}},{key:"componentWillUnmount",value:function(){window.removeEventListener("visibilitychange",this.addVisibilityCheck)}},{key:"render",value:function(){var e=this,t=this.props,n=t.isEditable,r=t.isNew,o=t.isPublished,i=t.isViewable,c=t.permalinkParts,a=t.postLink,s=t.postSlug,u=t.postID,l=t.postTitle;if(r||!i||!c||!a)return null;var d=this.state,p=d.isCopied,b=d.isEditingPermalink,f=p?Object(B.__)("Permalink copied"):Object(B.__)("Copy the permalink"),h=c.prefix,m=c.suffix,v=Object(jt.safeDecodeURIComponent)(s)||li(l)||u,O=n?h+v+m:h;return Object(zr.createElement)("div",{className:"editor-post-permalink"},Object(zr.createElement)(vo.ClipboardButton,{className:co()("editor-post-permalink__copy",{"is-copied":p}),text:O,label:f,onCopy:function(){return e.setState({isCopied:!0})},"aria-disabled":p,icon:"admin-links"}),Object(zr.createElement)("span",{className:"editor-post-permalink__label"},Object(B.__)("Permalink:")),!b&&Object(zr.createElement)(vo.ExternalLink,{className:"editor-post-permalink__link",href:o?O:a,target:"_blank",ref:function(t){return e.linkElement=t}},Object(jt.safeDecodeURI)(O),"‎"),b&&Object(zr.createElement)(lc,{slug:v,onSave:function(){return e.setState({isEditingPermalink:!1})}}),n&&!b&&Object(zr.createElement)(vo.Button,{className:"editor-post-permalink__edit",isLarge:!0,onClick:function(){return e.setState({isEditingPermalink:!0})}},Object(B.__)("Edit")))}}]),t}(zr.Component),pc=Object(Hr.compose)([Object(d.withSelect)((function(e){var t=e("core/editor"),n=t.isEditedPostNew,r=t.isPermalinkEditable,o=t.getCurrentPost,i=t.getPermalinkParts,c=t.getEditedPostAttribute,a=t.isCurrentPostPublished,s=e("core").getPostType,u=o(),l=u.id,d=u.link,p=s(c("type"));return{isNew:n(),postLink:d,permalinkParts:i(),postSlug:c("slug"),isEditable:r(),isPublished:a(),postTitle:c("title"),postID:l,isViewable:Object(v.get)(p,["viewable"],!1)}})),Object(d.withDispatch)((function(e){return{refreshPost:e("core/editor").refreshPost}}))])(dc),bc=/[\r\n]+/g,fc=function(e){function t(){var e;return Object(Jr.a)(this,t),(e=Object(eo.a)(this,Object(to.a)(t).apply(this,arguments))).onChange=e.onChange.bind(Object(mo.a)(e)),e.onSelect=e.onSelect.bind(Object(mo.a)(e)),e.onUnselect=e.onUnselect.bind(Object(mo.a)(e)),e.onKeyDown=e.onKeyDown.bind(Object(mo.a)(e)),e.redirectHistory=e.redirectHistory.bind(Object(mo.a)(e)),e.state={isSelected:!1},e}return Object(no.a)(t,e),Object($r.a)(t,[{key:"handleFocusOutside",value:function(){this.onUnselect()}},{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(bc," ");this.props.onUpdate(t)}},{key:"onKeyDown",value:function(e){e.keyCode===Oo.ENTER&&(e.preventDefault(),this.props.onEnterPress())}},{key:"redirectHistory",value:function(e){e.shiftKey?this.props.onRedo():this.props.onUndo(),e.preventDefault()}},{key:"render",value:function(){var e=this.props,t=e.hasFixedToolbar,n=e.isCleanNewPost,r=e.isFocusMode,o=e.isPostTypeViewable,i=e.instanceId,c=e.placeholder,a=e.title,s=this.state.isSelected,u=co()("wp-block editor-post-title__block",{"is-selected":s,"is-focus-mode":r,"has-fixed-toolbar":t}),l=Object(Ho.decodeEntities)(c);return Object(zr.createElement)(Lo,{supportKeys:"title"},Object(zr.createElement)("div",{className:"editor-post-title"},Object(zr.createElement)("div",{className:u},Object(zr.createElement)(vo.KeyboardShortcuts,{shortcuts:{"mod+z":this.redirectHistory,"mod+shift+z":this.redirectHistory}},Object(zr.createElement)("label",{htmlFor:"post-title-".concat(i),className:"screen-reader-text"},l||Object(B.__)("Add title")),Object(zr.createElement)(cc.a,{id:"post-title-".concat(i),className:"editor-post-title__input",value:Object(v.unescape)(a),onChange:this.onChange,placeholder:l||Object(B.__)("Add title"),onFocus:this.onSelect,onKeyDown:this.onKeyDown,onKeyPress:this.onUnselect,autoFocus:document.body===document.activeElement&&n})),s&&o&&Object(zr.createElement)(pc,null))))}}]),t}(zr.Component),hc=Object(d.withSelect)((function(e){var t=e("core/editor"),n=t.getEditedPostAttribute,r=t.isCleanNewPost,o=e("core/block-editor").getSettings,i=(0,e("core").getPostType)(n("type")),c=o(),a=c.titlePlaceholder,s=c.focusMode,u=c.hasFixedToolbar;return{isCleanNewPost:r(),title:n("title"),isPostTypeViewable:Object(v.get)(i,["viewable"],!1),placeholder:a,isFocusMode:s,hasFixedToolbar:u}})),mc=Object(d.withDispatch)((function(e){var t=e("core/block-editor"),n=t.insertDefaultBlock,r=t.clearSelectedBlock,o=e("core/editor"),i=o.editPost;return{onEnterPress:function(){n(void 0,void 0,0)},onUpdate:function(e){i({title:Object(v.escape)(e)})},onUndo:o.undo,onRedo:o.redo,clearSelectedBlock:r}})),vc=Object(Hr.compose)(hc,mc,Hr.withInstanceId,vo.withFocusOutside)(fc);var Oc=Object(Hr.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(Vr.a)(e,["isNew","postId","postType"]);return t||!n?null:Object(zr.createElement)(vo.Button,{className:"editor-post-trash button-link-delete",onClick:function(){return o.trashPost(n,r)},isDefault:!0,isLarge:!0},Object(B.__)("Move to Trash"))}));var gc=Object(d.withSelect)((function(e){var t=e("core/editor"),n=t.isEditedPostNew,r=t.getCurrentPostId;return{isNew:n(),postId:r()}}))((function(e){var t=e.isNew,n=e.postId,r=e.children;return t||!n?null:r}));var jc=Object(Hr.compose)([Object(d.withSelect)((function(e){var t=e("core/editor"),n=t.getCurrentPost,r=t.getCurrentPostType;return{hasPublishAction:Object(v.get)(n(),["_links","wp:action-publish"],!1),postType:r()}}))])((function(e){var t=e.hasPublishAction;return(0,e.render)({canEdit:t})})),_c=n(96);var yc=Object(d.withSelect)((function(e){return{content:e("core/editor").getEditedPostAttribute("content")}}))((function(e){var t=e.content,n=Object(B._x)("words","Word count type. Do not translate!");return Object(zr.createElement)("span",{className:"word-count"},Object(_c.count)(t,n))}));var kc=Object(d.withSelect)((function(e){var t=e("core/block-editor").getGlobalBlockCount;return{headingCount:t("core/heading"),paragraphCount:t("core/paragraph"),numberOfBlocks:t()}}))((function(e){var t=e.headingCount,n=e.paragraphCount,r=e.numberOfBlocks,o=e.hasOutlineItemsDisabled,i=e.onRequestClose;return(Object(zr.createElement)(zr.Fragment,null,Object(zr.createElement)("div",{className:"table-of-contents__wrapper",role:"note","aria-label":Object(B.__)("Document Statistics"),tabIndex:"0"},Object(zr.createElement)("ul",{role:"list",className:"table-of-contents__counts"},Object(zr.createElement)("li",{className:"table-of-contents__count"},Object(B.__)("Words"),Object(zr.createElement)(yc,null)),Object(zr.createElement)("li",{className:"table-of-contents__count"},Object(B.__)("Headings"),Object(zr.createElement)("span",{className:"table-of-contents__number"},t)),Object(zr.createElement)("li",{className:"table-of-contents__count"},Object(B.__)("Paragraphs"),Object(zr.createElement)("span",{className:"table-of-contents__number"},n)),Object(zr.createElement)("li",{className:"table-of-contents__count"},Object(B.__)("Blocks"),Object(zr.createElement)("span",{className:"table-of-contents__number"},r)))),t>0&&Object(zr.createElement)(zr.Fragment,null,Object(zr.createElement)("hr",null),Object(zr.createElement)("h2",{className:"table-of-contents__title"},Object(B.__)("Document Outline")),Object(zr.createElement)(fo,{onSelect:i,hasOutlineItemsDisabled:o}))))}));var Ec=Object(d.withSelect)((function(e){return{hasBlocks:!!e("core/block-editor").getBlockCount()}}))((function(e){var t=e.hasBlocks,n=e.hasOutlineItemsDisabled;return Object(zr.createElement)(vo.Dropdown,{position:"bottom",className:"table-of-contents",contentClassName:"table-of-contents__popover",renderToggle:function(e){var n=e.isOpen,r=e.onToggle;return Object(zr.createElement)(vo.IconButton,{onClick:t?r:void 0,icon:"info-outline","aria-expanded":n,label:Object(B.__)("Content structure"),labelPosition:"bottom","aria-disabled":!t})},renderContent:function(e){var t=e.onClose;return Object(zr.createElement)(kc,{onRequestClose:t,hasOutlineItemsDisabled:n})}})})),Sc=function(e){function t(){var e;return Object(Jr.a)(this,t),(e=Object(eo.a)(this,Object(to.a)(t).apply(this,arguments))).warnIfUnsavedChanges=e.warnIfUnsavedChanges.bind(Object(mo.a)(e)),e}return Object(no.a)(t,e),Object($r.a)(t,[{key:"componentDidMount",value:function(){window.addEventListener("beforeunload",this.warnIfUnsavedChanges)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("beforeunload",this.warnIfUnsavedChanges)}},{key:"warnIfUnsavedChanges",value:function(e){if((0,this.props.isEditedPostDirty)())return e.returnValue=Object(B.__)("You have unsaved changes. If you proceed, they will be lost."),e.returnValue}},{key:"render",value:function(){return null}}]),t}(zr.Component),Pc=Object(d.withSelect)((function(e){return{isEditedPostDirty:e("core/editor").isEditedPostDirty}}))(Sc),wc=Object(Hr.createHigherOrderComponent)((function(e){return Object(d.withRegistry)((function(t){var n=t.useSubRegistry,r=void 0===n||n,o=t.registry,c=Object(Vr.a)(t,["useSubRegistry","registry"]);if(!r)return Object(zr.createElement)(e,c);var a=Object(zr.useState)(null),s=Object(vt.a)(a,2),u=s[0],l=s[1];return Object(zr.useEffect)((function(){var e=Object(d.createRegistry)({"core/block-editor":i.storeConfig},o),t=e.registerStore("core/editor",Ur);Rr(t),l(e)}),[o]),u?Object(zr.createElement)(d.RegistryProvider,{value:u},Object(zr.createElement)(e,c)):null}))}),"withRegistryProvider"),Cc=n(98),Tc=function(e){var t=e.additionalData,n=void 0===t?{}:t,r=e.allowedTypes,o=e.filesList,i=e.maxUploadFileSize,c=e.onError,a=void 0===c?v.noop:c,s=e.onFileChange,u=Object(d.select)("core/editor"),p=u.getCurrentPostId,b=u.getEditorSettings,f=b().allowedMimeTypes;i=i||b().maxUploadFileSize,Object(Cc.uploadMedia)({allowedTypes:r,filesList:o,onFileChange:s,additionalData:Object(l.a)({post:p()},n),maxUploadFileSize:i,onError:function(e){var t=e.message;return a(t)},wpAllowedMimeTypes:f})};var Bc=Object(Hr.compose)([Object(d.withSelect)((function(e,t){var n=t.clientIds,r=e("core/block-editor"),o=r.getBlocksByClientId,i=r.canInsertBlockType,a=e("core/editor").__experimentalGetReusableBlock,s=e("core").canUser,u=o(n),l=1===u.length&&u[0]&&Object(c.isReusableBlock)(u[0])&&!!a(u[0].attributes.ref);return{isReusable:l,isVisible:l||i("core/block")&&Object(v.every)(u,(function(e){return!!e&&e.isValid&&Object(c.hasBlockSupport)(e.name,"reusable",!0)}))&&!!s("create","blocks")}})),Object(d.withDispatch)((function(e,t){var n=t.clientIds,r=t.onToggle,o=void 0===r?v.noop:r,i=e("core/editor"),c=i.__experimentalConvertBlockToReusable,a=i.__experimentalConvertBlockToStatic;return{onConvertToStatic:function(){1===n.length&&(a(n[0]),o())},onConvertToReusable:function(){c(n),o()}}}))])((function(e){var t=e.isVisible,n=e.isReusable,r=e.onConvertToStatic,o=e.onConvertToReusable;return t?Object(zr.createElement)(zr.Fragment,null,!n&&Object(zr.createElement)(vo.MenuItem,{className:"editor-block-settings-menu__control block-editor-block-settings-menu__control",icon:"controls-repeat",onClick:o},Object(B.__)("Add to Reusable Blocks")),n&&Object(zr.createElement)(vo.MenuItem,{className:"editor-block-settings-menu__control block-editor-block-settings-menu__control",icon:"controls-repeat",onClick:r},Object(B.__)("Convert to Regular Block"))):null}));var xc=Object(Hr.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&&!!o("delete","blocks",s.id),isDisabled:s&&s.isTemporary}})),Object(d.withDispatch)((function(e,t,n){var r=t.clientId,o=t.onToggle,i=void 0===o?v.noop:o,c=n.select,a=e("core/editor").__experimentalDeleteReusableBlock,s=c("core/block-editor").getBlock;return{onDelete:function(){if(window.confirm(Object(B.__)("Are you sure you want to delete this Reusable Block?\n\nIt will be permanently removed from all posts and pages that use it."))){var e=s(r);a(e.attributes.ref),i()}}}}))])((function(e){var t=e.isVisible,n=e.isDisabled,r=e.onDelete;return t?Object(zr.createElement)(vo.MenuItem,{className:"editor-block-settings-menu__control block-editor-block-settings-menu__control",icon:"no",disabled:n,onClick:function(){return r()}},Object(B.__)("Remove from Reusable Blocks")):null}));var Ic=Object(d.withSelect)((function(e){return{clientIds:(0,e("core/block-editor").getSelectedBlockClientIds)()}}))((function(e){var t=e.clientIds;return Object(zr.createElement)(i.__experimentalBlockSettingsMenuPluginsExtension,null,(function(e){var n=e.onClose;return Object(zr.createElement)(zr.Fragment,null,Object(zr.createElement)(Bc,{clientIds:t,onToggle:n}),1===t.length&&Object(zr.createElement)(xc,{clientId:t[0],onToggle:n}))}))})),Ac=Object(zr.createElement)(vo.SVG,{width:"20",height:"20",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},Object(zr.createElement)(vo.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M8 5a1 1 0 0 0-1 1v3H6a1 1 0 0 0-1 1v4a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1v-3h1a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1H8zm3 6H7v2h4v-2zM9 9V7h4v2H9z"}),Object(zr.createElement)(vo.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M1 3a2 2 0 0 0 1 1.732v10.536A2 2 0 1 0 4.732 18h10.536A2 2 0 1 0 18 15.268V4.732A2 2 0 1 0 15.268 2H4.732A2 2 0 0 0 1 3zm14.268 1H4.732A2.01 2.01 0 0 1 4 4.732v10.536c.304.175.557.428.732.732h10.536a2.01 2.01 0 0 1 .732-.732V4.732A2.01 2.01 0 0 1 15.268 4z"})),Rc=Object(zr.createElement)(vo.Icon,{icon:Ac}),Lc=Object(zr.createElement)(vo.SVG,{width:"20",height:"20",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},Object(zr.createElement)(vo.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M9 2H15C16.1 2 17 2.9 17 4V7C17 8.1 16.1 9 15 9H9C7.9 9 7 8.1 7 7V4C7 2.9 7.9 2 9 2ZM9 7H15V4H9V7Z"}),Object(zr.createElement)(vo.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M5 11H11C12.1 11 13 11.9 13 13V16C13 17.1 12.1 18 11 18H5C3.9 18 3 17.1 3 16V13C3 11.9 3.9 11 5 11ZM5 16H11V13H5V16Z"})),Nc=Object(zr.createElement)(vo.Icon,{icon:Lc});var Dc=Object(Hr.compose)([Object(d.withSelect)((function(e,t){var n=t.clientIds,r=e("core/block-editor"),o=r.getBlockRootClientId,i=r.getBlocksByClientId,c=r.canInsertBlockType,a=(0,e("core/blocks").getGroupingBlockName)(),s=c(a,n&&n.length>0?o(n[0]):void 0),u=i(n),l=1===u.length&&u[0]&&u[0].name===a;return{isGroupable:s&&u.length&&!l,isUngroupable:l&&!!u[0].innerBlocks.length,blocksSelection:u,groupingBlockName:a}})),Object(d.withDispatch)((function(e,t){var n=t.clientIds,r=t.onToggle,o=void 0===r?v.noop:r,i=t.blocksSelection,a=void 0===i?[]:i,s=t.groupingBlockName,u=e("core/block-editor").replaceBlocks;return{onConvertToGroup:function(){if(a.length){var e=Object(c.switchToBlockType)(a,s);e&&u(n,e),o()}},onConvertFromGroup:function(){if(a.length){var e=a[0].innerBlocks;e.length&&(u(n,e),o())}}}}))])((function(e){var t=e.onConvertToGroup,n=e.onConvertFromGroup,r=e.isGroupable,o=void 0!==r&&r,i=e.isUngroupable,c=void 0!==i&&i;return Object(zr.createElement)(zr.Fragment,null,o&&Object(zr.createElement)(vo.MenuItem,{className:"editor-block-settings-menu__control block-editor-block-settings-menu__control",icon:Rc,onClick:t},Object(B._x)("Group","verb")),c&&Object(zr.createElement)(vo.MenuItem,{className:"editor-block-settings-menu__control block-editor-block-settings-menu__control",icon:Nc,onClick:n},Object(B._x)("Ungroup","Ungrouping blocks from within a Group block back into individual blocks within the Editor ")))}));var Uc=Object(d.withSelect)((function(e){return{clientIds:(0,e("core/block-editor").getSelectedBlockClientIds)()}}))((function(e){var t=e.clientIds;return Object(zr.createElement)(i.__experimentalBlockSettingsMenuPluginsExtension,null,(function(e){var n=e.onClose;return Object(zr.createElement)(zr.Fragment,null,Object(zr.createElement)(Dc,{clientIds:t,onToggle:n}))}))})),Fc=function(){var e=Object(w.a)(P.a.mark((function e(t){var n;return P.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,T()({path:Object(jt.addQueryArgs)("/wp/v2/search",{search:t,per_page:20,type:"post"})});case 2:return n=e.sent,e.abrupt("return",Object(v.map)(n,(function(e){return{id:e.id,url:e.url,title:Object(Ho.decodeEntities)(e.title)||Object(B.__)("(no title)"),type:e.subtype||e.type}})));case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),Mc=function(e){function t(e){var n;return Object(Jr.a)(this,t),(n=Object(eo.a)(this,Object(to.a)(t).apply(this,arguments))).getBlockEditorSettings=K()(n.getBlockEditorSettings,{maxSize:1}),e.recovery?Object(eo.a)(n):(e.updatePostLock(e.settings.postLock),e.setupEditor(e.post,e.initialEdits,e.settings.template),e.settings.autosave&&e.createWarningNotice(Object(B.__)("There is an autosave of this post that is more recent than the version below."),{id:"autosave-exists",actions:[{label:Object(B.__)("View the autosave"),url:e.settings.autosave.editLink}]}),n)}return Object(no.a)(t,e),Object($r.a)(t,[{key:"getBlockEditorSettings",value:function(e,t,n,r,o){return Object(l.a)({},Object(v.pick)(e,["alignWide","allowedBlockTypes","__experimentalPreferredStyleVariations","availableLegacyWidgets","bodyPlaceholder","codeEditingEnabled","colors","disableCustomColors","disableCustomFontSizes","disableCustomGradients","focusMode","fontSizes","hasFixedToolbar","hasPermissionsToManageWidgets","imageSizes","isRTL","maxWidth","styles","template","templateLock","titlePlaceholder","onUpdateDefaultBlockStyles","__experimentalEnableLegacyWidgetBlock","__experimentalBlockDirectory","__experimentalEnableFullSiteEditing","__experimentalEnableFullSiteEditingDemo","__experimentalEnablePageTemplates","showInserterHelpPanel","gradients"]),{mediaUpload:r?Tc:void 0,__experimentalReusableBlocks:t,__experimentalFetchReusableBlocks:n,__experimentalFetchLinkSuggestions:Fc,__experimentalCanUserUseUnfilteredHTML:o})}},{key:"componentDidMount",value:function(){if(this.props.updateEditorSettings(this.props.settings),this.props.settings.styles){var e=Object(i.transformStyles)(this.props.settings.styles,".editor-styles-wrapper");Object(v.map)(e,(function(e){if(e){var t=document.createElement("style");t.innerHTML=e,document.body.appendChild(t)}}))}}},{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.__experimentalFetchReusableBlocks;if(!l)return null;var m=this.getBlockEditorSettings(d,p,h,f,t);return Object(zr.createElement)(a.EntityProvider,{kind:"root",type:"site"},Object(zr.createElement)(a.EntityProvider,{kind:"postType",type:r.type,id:r.id},Object(zr.createElement)(i.BlockEditorProvider,{value:o,onInput:b,onChange:c,selectionStart:s,selectionEnd:u,settings:m,useSubRegistry:!1},n,Object(zr.createElement)(Ic,null),Object(zr.createElement)(Uc,null))))}}]),t}(zr.Component),Vc=Object(Hr.compose)([wc,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=e("core").canUser;return{canUserUseUnfilteredHTML:n(),isReady:r(),blocks:o(),selectionStart:i(),selectionEnd:c(),reusableBlocks:a(),hasUploadPermissions:Object(v.defaultTo)(s("create","media"),!0)}})),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;return{setupEditor:n,updatePostLock:r,createWarningNotice:e("core/notices").createWarningNotice,resetEditorBlocks:o,updateEditorSettings:i,resetEditorBlocksWithoutUndoLevel:function(e,t){o(e,Object(l.a)({},t,{__unstableShouldCreateUndoLevel:!1}))},tearDownEditor:a,__experimentalFetchReusableBlocks:c}}))])(Mc),zc=n(58),Hc=n.n(zc);function Wc(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=Object(zr.forwardRef)((function(n,r){return A()("wp.editor."+e,{alternative:"wp.blockEditor."+e}),Object(zr.createElement)(t,Object(Mr.a)({ref:r},n))}));return n.forEach((function(n){r[n]=Wc(e+"."+n,t[n])})),r}function Kc(e,t){return function(){return A()("wp.editor."+e,{alternative:"wp.blockEditor."+e}),t.apply(void 0,arguments)}}var Gc=Wc("RichText",i.RichText,["Content"]);Gc.isEmpty=Kc("RichText.isEmpty",i.RichText.isEmpty);var qc=Wc("Autocomplete",i.Autocomplete),Qc=Wc("AlignmentToolbar",i.AlignmentToolbar),Yc=Wc("BlockAlignmentToolbar",i.BlockAlignmentToolbar),Xc=Wc("BlockControls",i.BlockControls,["Slot"]),Zc=Wc("BlockEdit",i.BlockEdit),Jc=Wc("BlockEditorKeyboardShortcuts",i.BlockEditorKeyboardShortcuts),$c=Wc("BlockFormatControls",i.BlockFormatControls,["Slot"]),ea=Wc("BlockIcon",i.BlockIcon),ta=Wc("BlockInspector",i.BlockInspector),na=Wc("BlockList",i.BlockList),ra=Wc("BlockMover",i.BlockMover),oa=Wc("BlockNavigationDropdown",i.BlockNavigationDropdown),ia=Wc("BlockSelectionClearer",i.BlockSelectionClearer),ca=Wc("BlockSettingsMenu",i.BlockSettingsMenu),aa=Wc("BlockTitle",i.BlockTitle),sa=Wc("BlockToolbar",i.BlockToolbar),ua=Wc("ColorPalette",i.ColorPalette),la=Wc("ContrastChecker",i.ContrastChecker),da=Wc("CopyHandler",i.CopyHandler),pa=Wc("DefaultBlockAppender",i.DefaultBlockAppender),ba=Wc("FontSizePicker",i.FontSizePicker),fa=Wc("Inserter",i.Inserter),ha=Wc("InnerBlocks",i.InnerBlocks,["ButtonBlockAppender","DefaultBlockAppender","Content"]),ma=Wc("InspectorAdvancedControls",i.InspectorAdvancedControls,["Slot"]),va=Wc("InspectorControls",i.InspectorControls,["Slot"]),Oa=Wc("PanelColorSettings",i.PanelColorSettings),ga=Wc("PlainText",i.PlainText),ja=Wc("RichTextShortcut",i.RichTextShortcut),_a=Wc("RichTextToolbarButton",i.RichTextToolbarButton),ya=Wc("__unstableRichTextInputEvent",i.__unstableRichTextInputEvent),ka=Wc("MediaPlaceholder",i.MediaPlaceholder),Ea=Wc("MediaUpload",i.MediaUpload),Sa=Wc("MediaUploadCheck",i.MediaUploadCheck),Pa=Wc("MultiBlocksSwitcher",i.MultiBlocksSwitcher),wa=Wc("MultiSelectScrollIntoView",i.MultiSelectScrollIntoView),Ca=Wc("NavigableToolbar",i.NavigableToolbar),Ta=Wc("ObserveTyping",i.ObserveTyping),Ba=Wc("PreserveScrollInReorder",i.PreserveScrollInReorder),xa=Wc("SkipToSelectedBlock",i.SkipToSelectedBlock),Ia=Wc("URLInput",i.URLInput),Aa=Wc("URLInputButton",i.URLInputButton),Ra=Wc("URLPopover",i.URLPopover),La=Wc("Warning",i.Warning),Na=Wc("WritingFlow",i.WritingFlow),Da=Kc("createCustomColorsHOC",i.createCustomColorsHOC),Ua=Kc("getColorClassName",i.getColorClassName),Fa=Kc("getColorObjectByAttributeValues",i.getColorObjectByAttributeValues),Ma=Kc("getColorObjectByColorValue",i.getColorObjectByColorValue),Va=Kc("getFontSize",i.getFontSize),za=Kc("getFontSizeClass",i.getFontSizeClass),Ha=Kc("withColorContext",i.withColorContext),Wa=Kc("withColors",i.withColors),Ka=Kc("withFontSizes",i.withFontSizes);Object(Wr.addFilter)("editor.Autocomplete.completers","editor/autocompleters/set-default-completers",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;return e.push(Object(v.clone)(Zr)),t===Object(c.getDefaultBlockName)()&&e.push(Object(v.clone)(Xr)),e})),n.d(t,"AutosaveMonitor",(function(){return oo})),n.d(t,"DocumentOutline",(function(){return fo})),n.d(t,"DocumentOutlineCheck",(function(){return ho})),n.d(t,"VisualEditorGlobalKeyboardShortcuts",(function(){return yo})),n.d(t,"EditorGlobalKeyboardShortcuts",(function(){return ko})),n.d(t,"TextEditorGlobalKeyboardShortcuts",(function(){return Eo})),n.d(t,"EditorHistoryRedo",(function(){return So})),n.d(t,"EditorHistoryUndo",(function(){return Po})),n.d(t,"EditorNotices",(function(){return Co})),n.d(t,"ErrorBoundary",(function(){return To})),n.d(t,"LocalAutosaveMonitor",(function(){return Ao})),n.d(t,"PageAttributesCheck",(function(){return Ro})),n.d(t,"PageAttributesOrder",(function(){return Do})),n.d(t,"PageAttributesParent",(function(){return Vo})),n.d(t,"PageTemplate",(function(){return zo})),n.d(t,"PostAuthor",(function(){return Go})),n.d(t,"PostAuthorCheck",(function(){return Wo})),n.d(t,"PostComments",(function(){return qo})),n.d(t,"PostExcerpt",(function(){return Qo})),n.d(t,"PostExcerptCheck",(function(){return Yo})),n.d(t,"PostFeaturedImage",(function(){return oi})),n.d(t,"PostFeaturedImageCheck",(function(){return Zo})),n.d(t,"PostFormat",(function(){return ai})),n.d(t,"PostFormatCheck",(function(){return ii})),n.d(t,"PostLastRevision",(function(){return di})),n.d(t,"PostLastRevisionCheck",(function(){return si})),n.d(t,"PostLockedModal",(function(){return hi})),n.d(t,"PostPendingStatus",(function(){return vi})),n.d(t,"PostPendingStatusCheck",(function(){return mi})),n.d(t,"PostPingbacks",(function(){return Oi})),n.d(t,"PostPreviewButton",(function(){return bi})),n.d(t,"PostPublishButton",(function(){return _i})),n.d(t,"PostPublishButtonLabel",(function(){return gi})),n.d(t,"PostPublishPanel",(function(){return Wi})),n.d(t,"PostSavedState",(function(){return qi})),n.d(t,"PostSchedule",(function(){return Pi})),n.d(t,"PostScheduleCheck",(function(){return Qi})),n.d(t,"PostScheduleLabel",(function(){return wi})),n.d(t,"PostSlug",(function(){return Zi})),n.d(t,"PostSlugCheck",(function(){return Yi})),n.d(t,"PostSticky",(function(){return $i})),n.d(t,"PostStickyCheck",(function(){return Ji})),n.d(t,"PostSwitchToDraftButton",(function(){return Ki})),n.d(t,"PostTaxonomies",(function(){return rc})),n.d(t,"PostTaxonomiesCheck",(function(){return oc})),n.d(t,"PostTextEditor",(function(){return sc})),n.d(t,"PostTitle",(function(){return vc})),n.d(t,"PostTrash",(function(){return Oc})),n.d(t,"PostTrashCheck",(function(){return gc})),n.d(t,"PostTypeSupportCheck",(function(){return Lo})),n.d(t,"PostVisibility",(function(){return Ei})),n.d(t,"PostVisibilityLabel",(function(){return Si})),n.d(t,"PostVisibilityCheck",(function(){return jc})),n.d(t,"TableOfContents",(function(){return Ec})),n.d(t,"UnsavedChangesWarning",(function(){return Pc})),n.d(t,"WordCount",(function(){return yc})),n.d(t,"EditorProvider",(function(){return Vc})),n.d(t,"blockAutocompleter",(function(){return Xr})),n.d(t,"userAutocompleter",(function(){return Zr})),n.d(t,"ServerSideRender",(function(){return Hc.a})),n.d(t,"RichText",(function(){return Gc})),n.d(t,"Autocomplete",(function(){return qc})),n.d(t,"AlignmentToolbar",(function(){return Qc})),n.d(t,"BlockAlignmentToolbar",(function(){return Yc})),n.d(t,"BlockControls",(function(){return Xc})),n.d(t,"BlockEdit",(function(){return Zc})),n.d(t,"BlockEditorKeyboardShortcuts",(function(){return Jc})),n.d(t,"BlockFormatControls",(function(){return $c})),n.d(t,"BlockIcon",(function(){return ea})),n.d(t,"BlockInspector",(function(){return ta})),n.d(t,"BlockList",(function(){return na})),n.d(t,"BlockMover",(function(){return ra})),n.d(t,"BlockNavigationDropdown",(function(){return oa})),n.d(t,"BlockSelectionClearer",(function(){return ia})),n.d(t,"BlockSettingsMenu",(function(){return ca})),n.d(t,"BlockTitle",(function(){return aa})),n.d(t,"BlockToolbar",(function(){return sa})),n.d(t,"ColorPalette",(function(){return ua})),n.d(t,"ContrastChecker",(function(){return la})),n.d(t,"CopyHandler",(function(){return da})),n.d(t,"DefaultBlockAppender",(function(){return pa})),n.d(t,"FontSizePicker",(function(){return ba})),n.d(t,"Inserter",(function(){return fa})),n.d(t,"InnerBlocks",(function(){return ha})),n.d(t,"InspectorAdvancedControls",(function(){return ma})),n.d(t,"InspectorControls",(function(){return va})),n.d(t,"PanelColorSettings",(function(){return Oa})),n.d(t,"PlainText",(function(){return ga})),n.d(t,"RichTextShortcut",(function(){return ja})),n.d(t,"RichTextToolbarButton",(function(){return _a})),n.d(t,"__unstableRichTextInputEvent",(function(){return ya})),n.d(t,"MediaPlaceholder",(function(){return ka})),n.d(t,"MediaUpload",(function(){return Ea})),n.d(t,"MediaUploadCheck",(function(){return Sa})),n.d(t,"MultiBlocksSwitcher",(function(){return Pa})),n.d(t,"MultiSelectScrollIntoView",(function(){return wa})),n.d(t,"NavigableToolbar",(function(){return Ca})),n.d(t,"ObserveTyping",(function(){return Ta})),n.d(t,"PreserveScrollInReorder",(function(){return Ba})),n.d(t,"SkipToSelectedBlock",(function(){return xa})),n.d(t,"URLInput",(function(){return Ia})),n.d(t,"URLInputButton",(function(){return Aa})),n.d(t,"URLPopover",(function(){return Ra})),n.d(t,"Warning",(function(){return La})),n.d(t,"WritingFlow",(function(){return Na})),n.d(t,"createCustomColorsHOC",(function(){return Da})),n.d(t,"getColorClassName",(function(){return Ua})),n.d(t,"getColorObjectByAttributeValues",(function(){return Fa})),n.d(t,"getColorObjectByColorValue",(function(){return Ma})),n.d(t,"getFontSize",(function(){return Va})),n.d(t,"getFontSizeClass",(function(){return za})),n.d(t,"withColorContext",(function(){return Ha})),n.d(t,"withColors",(function(){return Wa})),n.d(t,"withFontSizes",(function(){return Ka})),n.d(t,"mediaUpload",(function(){return Tc})),n.d(t,"cleanForSlug",(function(){return li})),n.d(t,"storeConfig",(function(){return Ur})),n.d(t,"transformStyles",(function(){return i.transformStyles}))},37:function(e,t){!function(){e.exports=this.wp.apiFetch}()},38: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=0||(o[n]=e[n]);return o}n.d(t,"a",(function(){return r}))},42:function(e,t,n){e.exports=function(e,t){var n,r,o,i=0;function c(){var t,c,a=r,s=arguments.length;e:for(;a;){if(a.args.length===arguments.length){for(c=0;c