this.wp=this.wp||{},this.wp.editor=function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=358)}({0:function(t,e){!function(){t.exports=this.wp.element}()},1:function(t,e){!function(){t.exports=this.wp.i18n}()},10:function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}n.d(e,"a",function(){return r})},109:function(t,e){"function"==typeof Object.create?t.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(t,e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}},11:function(t,e,n){"use strict";n.d(e,"a",function(){return i});var r=n(32),o=n(3);function i(t,e){return!e||"object"!==Object(r.a)(e)&&"function"!=typeof e?Object(o.a)(t):e}},111:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||Object.assign||function(t){for(var e,n=1,r=arguments.length;n-1},get:function(t){return r[n.indexOf(t)]},set:function(t,e){-1===n.indexOf(t)&&(n.push(t),r.push(e))},delete:function(t){var e=n.indexOf(t);e>-1&&(n.splice(e,1),r.splice(e,1))}}),i=function(t){return new Event(t,{bubbles:!0})};try{new Event("test")}catch(t){i=function(t){var e=document.createEvent("Event");return e.initEvent(t,!0,!1),e}}function s(t){if(t&&t.nodeName&&"TEXTAREA"===t.nodeName&&!o.has(t)){var e=null,n=null,r=null,s=function(){t.clientWidth!==n&&d()},a=function(e){window.removeEventListener("resize",s,!1),t.removeEventListener("input",d,!1),t.removeEventListener("keyup",d,!1),t.removeEventListener("autosize:destroy",a,!1),t.removeEventListener("autosize:update",d,!1),Object.keys(e).forEach(function(n){t.style[n]=e[n]}),o.delete(t)}.bind(t,{height:t.style.height,resize:t.style.resize,overflowY:t.style.overflowY,overflowX:t.style.overflowX,wordWrap:t.style.wordWrap});t.addEventListener("autosize:destroy",a,!1),"onpropertychange"in t&&"oninput"in t&&t.addEventListener("keyup",d,!1),window.addEventListener("resize",s,!1),t.addEventListener("input",d,!1),t.addEventListener("autosize:update",d,!1),t.style.overflowX="hidden",t.style.wordWrap="break-word",o.set(t,{destroy:a,update:d}),"vertical"===(c=window.getComputedStyle(t,null)).resize?t.style.resize="none":"both"===c.resize&&(t.style.resize="horizontal"),e="content-box"===c.boxSizing?-(parseFloat(c.paddingTop)+parseFloat(c.paddingBottom)):parseFloat(c.borderTopWidth)+parseFloat(c.borderBottomWidth),isNaN(e)&&(e=0),d()}var c;function u(e){var n=t.style.width;t.style.width="0px",t.offsetWidth,t.style.width=n,t.style.overflowY=e}function l(){if(0!==t.scrollHeight){var r=function(t){for(var e=[];t&&t.parentNode&&t.parentNode instanceof Element;)t.parentNode.scrollTop&&e.push({node:t.parentNode,scrollTop:t.parentNode.scrollTop}),t=t.parentNode;return e}(t),o=document.documentElement&&document.documentElement.scrollTop;t.style.height="",t.style.height=t.scrollHeight+e+"px",n=t.clientWidth,r.forEach(function(t){t.node.scrollTop=t.scrollTop}),o&&(document.documentElement.scrollTop=o)}}function d(){l();var e=Math.round(parseFloat(t.style.height)),n=window.getComputedStyle(t,null),o="content-box"===n.boxSizing?Math.round(parseFloat(n.height)):t.offsetHeight;if(o= 0x80 (not a basic code point)","invalid-input":"Invalid input"},j=u-l,_=Math.floor,k=String.fromCharCode;function E(t){throw new RangeError(y[t])}function S(t,e){for(var n=t.length,r=[];n--;)r[n]=e(t[n]);return r}function P(t,e){var n=t.split("@"),r="";return n.length>1&&(r=n[0]+"@",t=n[1]),r+S((t=t.replace(g,".")).split("."),e).join(".")}function w(t){for(var e,n,r=[],o=0,i=t.length;o=55296&&e<=56319&&o65535&&(e+=k((t-=65536)>>>10&1023|55296),t=56320|1023&t),e+=k(t)}).join("")}function C(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function x(t,e,n){var r=0;for(t=n?_(t/h):t>>1,t+=_(t/e);t>j*d>>1;r+=u)t=_(t/j);return _(r+(j+1)*t/(t+p))}function B(t){var e,n,r,o,i,s,a,p,h,v,O,g=[],y=t.length,j=0,k=b,S=f;for((n=t.lastIndexOf(m))<0&&(n=0),r=0;r=128&&E("not-basic"),g.push(t.charCodeAt(r));for(o=n>0?n+1:0;o=y&&E("invalid-input"),((p=(O=t.charCodeAt(o++))-48<10?O-22:O-65<26?O-65:O-97<26?O-97:u)>=u||p>_((c-j)/s))&&E("overflow"),j+=p*s,!(p<(h=a<=S?l:a>=S+d?d:a-S));a+=u)s>_(c/(v=u-h))&&E("overflow"),s*=v;S=x(j-i,e=g.length+1,0==i),_(j/e)>c-k&&E("overflow"),k+=_(j/e),j%=e,g.splice(j++,0,k)}return T(g)}function A(t){var e,n,r,o,i,s,a,p,h,v,O,g,y,j,S,P=[];for(g=(t=w(t)).length,e=b,n=0,i=f,s=0;s=e&&O_((c-n)/(y=r+1))&&E("overflow"),n+=(a-e)*y,e=a,s=0;sc&&E("overflow"),O==e){for(p=n,h=u;!(p<(v=h<=i?l:h>=i+d?d:h-i));h+=u)S=p-v,j=u-v,P.push(k(C(v+S%j,0))),p=_(S/j);P.push(k(C(p,0))),i=x(n,y,r==o),n=0,++r}++n,++e}return P.join("")}a={version:"1.4.1",ucs2:{decode:w,encode:T},decode:B,encode:A,toASCII:function(t){return P(t,function(t){return O.test(t)?"xn--"+A(t):t})},toUnicode:function(t){return P(t,function(t){return v.test(t)?B(t.slice(4).toLowerCase()):t})}},void 0===(o=function(){return a}.call(e,n,e,t))||(t.exports=o)}()}).call(this,n(118)(t),n(59))},118:function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},119:function(t,e,n){"use strict";t.exports={isString:function(t){return"string"==typeof t},isObject:function(t){return"object"==typeof t&&null!==t},isNull:function(t){return null===t},isNullOrUndefined:function(t){return null==t}}},12:function(t,e,n){"use strict";function r(t){return(r=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}n.d(e,"a",function(){return r})},120:function(t,e,n){"use strict";e.decode=e.parse=n(121),e.encode=e.stringify=n(122)},121:function(t,e,n){"use strict";function r(t,e){return Object.prototype.hasOwnProperty.call(t,e)}t.exports=function(t,e,n,i){e=e||"&",n=n||"=";var s={};if("string"!=typeof t||0===t.length)return s;var a=/\+/g;t=t.split(e);var c=1e3;i&&"number"==typeof i.maxKeys&&(c=i.maxKeys);var u=t.length;c>0&&u>c&&(u=c);for(var l=0;l=0?(d=b.substr(0,m),p=b.substr(m+1)):(d=b,p=""),h=decodeURIComponent(d),f=decodeURIComponent(p),r(s,h)?o(s[h])?s[h].push(f):s[h]=[s[h],f]:s[h]=f}return s};var o=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)}},122:function(t,e,n){"use strict";var r=function(t){switch(typeof t){case"string":return t;case"boolean":return t?"true":"false";case"number":return isFinite(t)?t:"";default:return""}};t.exports=function(t,e,n,a){return e=e||"&",n=n||"=",null===t&&(t=void 0),"object"==typeof t?i(s(t),function(s){var a=encodeURIComponent(r(s))+n;return o(t[s])?i(t[s],function(t){return a+encodeURIComponent(r(t))}).join(e):a+encodeURIComponent(r(t[s]))}).join(e):a?encodeURIComponent(r(a))+n+encodeURIComponent(r(t)):""};var o=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function i(t,e){if(t.map)return t.map(e);for(var n=[],r=0;r=0||(o[n]=t[n]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}n.d(e,"a",function(){return r})},227:function(t,e){var n=t.exports=function(t){return new r(t)};function r(t){this.value=t}function o(t,e,n){var r=[],o=[],a=!0;return function t(d){var p=n?i(d):d,h={},f=!0,b={node:p,node_:d,path:[].concat(r),parent:o[o.length-1],parents:o,key:r.slice(-1)[0],isRoot:0===r.length,level:r.length,circular:null,update:function(t,e){b.isRoot||(b.parent.node[b.key]=t),b.node=t,e&&(f=!1)},delete:function(t){delete b.parent.node[b.key],t&&(f=!1)},remove:function(t){c(b.parent.node)?b.parent.node.splice(b.key,1):delete b.parent.node[b.key],t&&(f=!1)},keys:null,before:function(t){h.before=t},after:function(t){h.after=t},pre:function(t){h.pre=t},post:function(t){h.post=t},stop:function(){a=!1},block:function(){f=!1}};if(!a)return b;function m(){if("object"==typeof b.node&&null!==b.node){b.keys&&b.node_===b.node||(b.keys=s(b.node)),b.isLeaf=0==b.keys.length;for(var t=0;t=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}(t,["optimist"])}}return{optimist:a,innerState:t}}t.exports=function(t){function e(e,n,o){return e.length&&(e=e.concat([{action:o}])),u(n=t(n,o),o),r({optimist:e},n)}return function(n,a){if(a.optimist)switch(a.optimist.type){case o:return function(e,n){var o=l(e),i=o.optimist,s=o.innerState;return i=i.concat([{beforeState:s,action:n}]),u(s=t(s,n),n),r({optimist:i},s)}(n,a);case i:return function(t,n){var r=l(t),o=r.optimist,i=r.innerState,s=[],a=!1,u=!1;o.forEach(function(t){a?t.beforeState&&c(t.action,n.optimist.id)?(u=!0,s.push({action:t.action})):s.push(t):t.beforeState&&!c(t.action,n.optimist.id)?(a=!0,s.push(t)):t.beforeState&&c(t.action,n.optimist.id)&&(u=!0)}),u||console.error('Cannot commit transaction with id "'+n.optimist.id+'" because it does not exist');return e(o=s,i,n)}(n,a);case s:return function(n,r){var o=l(n),i=o.optimist,s=o.innerState,a=[],d=!1,p=!1,h=s;i.forEach(function(e){e.beforeState&&c(e.action,r.optimist.id)&&(h=e.beforeState,p=!0),c(e.action,r.optimist.id)||(e.beforeState&&(d=!0),d&&(p&&e.beforeState?a.push({beforeState:h,action:e.action}):a.push(e)),p&&(h=t(h,e.action),u(s,r)))}),p||console.error('Cannot revert transaction with id "'+r.optimist.id+'" because it does not exist');return e(i=a,h,r)}(n,a)}var d=l(n),p=d.optimist,h=d.innerState;if(n&&!p.length){var f=t(h,a);return f===h?n:(u(f,a),r({optimist:p},f))}return e(p,h,a)}},t.exports.BEGIN=o,t.exports.COMMIT=i,t.exports.REVERT=s},35:function(t,e){!function(){t.exports=this.wp.blob}()},358:function(t,e,n){"use strict";n.r(e);var r={};n.r(r),n.d(r,"setupEditor",function(){return it}),n.d(r,"resetPost",function(){return st}),n.d(r,"resetAutosave",function(){return at}),n.d(r,"__experimentalRequestPostUpdateStart",function(){return ct}),n.d(r,"__experimentalRequestPostUpdateSuccess",function(){return ut}),n.d(r,"__experimentalRequestPostUpdateFailure",function(){return lt}),n.d(r,"updatePost",function(){return dt}),n.d(r,"setupEditorState",function(){return pt}),n.d(r,"editPost",function(){return ht}),n.d(r,"__experimentalOptimisticUpdatePost",function(){return ft}),n.d(r,"savePost",function(){return bt}),n.d(r,"refreshPost",function(){return mt}),n.d(r,"trashPost",function(){return vt}),n.d(r,"autosave",function(){return Ot}),n.d(r,"redo",function(){return gt}),n.d(r,"undo",function(){return yt}),n.d(r,"createUndoLevel",function(){return jt}),n.d(r,"updatePostLock",function(){return _t}),n.d(r,"__experimentalFetchReusableBlocks",function(){return kt}),n.d(r,"__experimentalReceiveReusableBlocks",function(){return Et}),n.d(r,"__experimentalSaveReusableBlock",function(){return St}),n.d(r,"__experimentalDeleteReusableBlock",function(){return Pt}),n.d(r,"__experimentalUpdateReusableBlockTitle",function(){return wt}),n.d(r,"__experimentalConvertBlockToStatic",function(){return Tt}),n.d(r,"__experimentalConvertBlockToReusable",function(){return Ct}),n.d(r,"enablePublishSidebar",function(){return xt}),n.d(r,"disablePublishSidebar",function(){return Bt}),n.d(r,"lockPostSaving",function(){return At}),n.d(r,"unlockPostSaving",function(){return It}),n.d(r,"resetEditorBlocks",function(){return Lt}),n.d(r,"updateEditorSettings",function(){return Rt}),n.d(r,"resetBlocks",function(){return Ut}),n.d(r,"receiveBlocks",function(){return Dt}),n.d(r,"updateBlock",function(){return Ft}),n.d(r,"updateBlockAttributes",function(){return Mt}),n.d(r,"selectBlock",function(){return Vt}),n.d(r,"startMultiSelect",function(){return zt}),n.d(r,"stopMultiSelect",function(){return Kt}),n.d(r,"multiSelect",function(){return qt}),n.d(r,"clearSelectedBlock",function(){return Wt}),n.d(r,"toggleSelection",function(){return Ht}),n.d(r,"replaceBlocks",function(){return Gt}),n.d(r,"replaceBlock",function(){return Qt}),n.d(r,"moveBlocksDown",function(){return Yt}),n.d(r,"moveBlocksUp",function(){return $t}),n.d(r,"moveBlockToPosition",function(){return Xt}),n.d(r,"insertBlock",function(){return Zt}),n.d(r,"insertBlocks",function(){return Jt}),n.d(r,"showInsertionPoint",function(){return te}),n.d(r,"hideInsertionPoint",function(){return ee}),n.d(r,"setTemplateValidity",function(){return ne}),n.d(r,"synchronizeTemplate",function(){return re}),n.d(r,"mergeBlocks",function(){return oe}),n.d(r,"removeBlocks",function(){return ie}),n.d(r,"removeBlock",function(){return se}),n.d(r,"toggleBlockMode",function(){return ae}),n.d(r,"startTyping",function(){return ce}),n.d(r,"stopTyping",function(){return ue}),n.d(r,"enterFormattedText",function(){return le}),n.d(r,"exitFormattedText",function(){return de}),n.d(r,"insertDefaultBlock",function(){return pe}),n.d(r,"updateBlockListSettings",function(){return he});var o={};n.r(o),n.d(o,"hasEditorUndo",function(){return ge}),n.d(o,"hasEditorRedo",function(){return ye}),n.d(o,"isEditedPostNew",function(){return je}),n.d(o,"hasChangedContent",function(){return _e}),n.d(o,"isEditedPostDirty",function(){return ke}),n.d(o,"isCleanNewPost",function(){return Ee}),n.d(o,"getCurrentPost",function(){return Se}),n.d(o,"getCurrentPostType",function(){return Pe}),n.d(o,"getCurrentPostId",function(){return we}),n.d(o,"getCurrentPostRevisionsCount",function(){return Te}),n.d(o,"getCurrentPostLastRevisionId",function(){return Ce}),n.d(o,"getPostEdits",function(){return xe}),n.d(o,"getReferenceByDistinctEdits",function(){return Be}),n.d(o,"getCurrentPostAttribute",function(){return Ae}),n.d(o,"getEditedPostAttribute",function(){return Le}),n.d(o,"getAutosaveAttribute",function(){return Re}),n.d(o,"getEditedPostVisibility",function(){return Ne}),n.d(o,"isCurrentPostPending",function(){return Ue}),n.d(o,"isCurrentPostPublished",function(){return De}),n.d(o,"isCurrentPostScheduled",function(){return Fe}),n.d(o,"isEditedPostPublishable",function(){return Me}),n.d(o,"isEditedPostSaveable",function(){return Ve}),n.d(o,"isEditedPostEmpty",function(){return ze}),n.d(o,"isEditedPostAutosaveable",function(){return Ke}),n.d(o,"getAutosave",function(){return qe}),n.d(o,"hasAutosave",function(){return We}),n.d(o,"isEditedPostBeingScheduled",function(){return He}),n.d(o,"isEditedPostDateFloating",function(){return Ge}),n.d(o,"isSavingPost",function(){return Qe}),n.d(o,"didPostSaveRequestSucceed",function(){return Ye}),n.d(o,"didPostSaveRequestFail",function(){return $e}),n.d(o,"isAutosavingPost",function(){return Xe}),n.d(o,"isPreviewingPost",function(){return Ze}),n.d(o,"getEditedPostPreviewLink",function(){return Je}),n.d(o,"getSuggestedPostFormat",function(){return tn}),n.d(o,"getBlocksForSerialization",function(){return en}),n.d(o,"getEditedPostContent",function(){return nn}),n.d(o,"__experimentalGetReusableBlock",function(){return rn}),n.d(o,"__experimentalIsSavingReusableBlock",function(){return on}),n.d(o,"__experimentalIsFetchingReusableBlock",function(){return sn}),n.d(o,"__experimentalGetReusableBlocks",function(){return an}),n.d(o,"getStateBeforeOptimisticTransaction",function(){return cn}),n.d(o,"isPublishingPost",function(){return un}),n.d(o,"isPermalinkEditable",function(){return ln}),n.d(o,"getPermalink",function(){return dn}),n.d(o,"getPermalinkParts",function(){return pn}),n.d(o,"inSomeHistory",function(){return hn}),n.d(o,"isPostLocked",function(){return fn}),n.d(o,"isPostSavingLocked",function(){return bn}),n.d(o,"isPostLockTakeover",function(){return mn}),n.d(o,"getPostLockUser",function(){return vn}),n.d(o,"getActivePostLock",function(){return On}),n.d(o,"canUserUseUnfilteredHTML",function(){return gn}),n.d(o,"isPublishSidebarEnabled",function(){return yn}),n.d(o,"getEditorBlocks",function(){return jn}),n.d(o,"__unstableIsEditorReady",function(){return _n}),n.d(o,"getEditorSettings",function(){return kn}),n.d(o,"getBlockDependantsCacheBust",function(){return Sn}),n.d(o,"getBlockName",function(){return Pn}),n.d(o,"isBlockValid",function(){return wn}),n.d(o,"getBlockAttributes",function(){return Tn}),n.d(o,"getBlock",function(){return Cn}),n.d(o,"getBlocks",function(){return xn}),n.d(o,"__unstableGetBlockWithoutInnerBlocks",function(){return Bn}),n.d(o,"getClientIdsOfDescendants",function(){return An}),n.d(o,"getClientIdsWithDescendants",function(){return In}),n.d(o,"getGlobalBlockCount",function(){return Ln}),n.d(o,"getBlocksByClientId",function(){return Rn}),n.d(o,"getBlockCount",function(){return Nn}),n.d(o,"getBlockSelectionStart",function(){return Un}),n.d(o,"getBlockSelectionEnd",function(){return Dn}),n.d(o,"getSelectedBlockCount",function(){return Fn}),n.d(o,"hasSelectedBlock",function(){return Mn}),n.d(o,"getSelectedBlockClientId",function(){return Vn}),n.d(o,"getSelectedBlock",function(){return zn}),n.d(o,"getBlockRootClientId",function(){return Kn}),n.d(o,"getBlockHierarchyRootClientId",function(){return qn}),n.d(o,"getAdjacentBlockClientId",function(){return Wn}),n.d(o,"getPreviousBlockClientId",function(){return Hn}),n.d(o,"getNextBlockClientId",function(){return Gn}),n.d(o,"getSelectedBlocksInitialCaretPosition",function(){return Qn}),n.d(o,"getMultiSelectedBlockClientIds",function(){return Yn}),n.d(o,"getMultiSelectedBlocks",function(){return $n}),n.d(o,"getFirstMultiSelectedBlockClientId",function(){return Xn}),n.d(o,"getLastMultiSelectedBlockClientId",function(){return Zn}),n.d(o,"isFirstMultiSelectedBlock",function(){return Jn}),n.d(o,"isBlockMultiSelected",function(){return tr}),n.d(o,"isAncestorMultiSelected",function(){return er}),n.d(o,"getMultiSelectedBlocksStartClientId",function(){return nr}),n.d(o,"getMultiSelectedBlocksEndClientId",function(){return rr}),n.d(o,"getBlockOrder",function(){return or}),n.d(o,"getBlockIndex",function(){return ir}),n.d(o,"isBlockSelected",function(){return sr}),n.d(o,"hasSelectedInnerBlock",function(){return ar}),n.d(o,"isBlockWithinSelection",function(){return cr}),n.d(o,"hasMultiSelection",function(){return ur}),n.d(o,"isMultiSelecting",function(){return lr}),n.d(o,"isSelectionEnabled",function(){return dr}),n.d(o,"getBlockMode",function(){return pr}),n.d(o,"isTyping",function(){return hr}),n.d(o,"isCaretWithinFormattedText",function(){return fr}),n.d(o,"getBlockInsertionPoint",function(){return br}),n.d(o,"isBlockInsertionPointVisible",function(){return mr}),n.d(o,"isValidTemplate",function(){return vr}),n.d(o,"getTemplate",function(){return Or}),n.d(o,"getTemplateLock",function(){return gr}),n.d(o,"canInsertBlockType",function(){return yr}),n.d(o,"getInserterItems",function(){return jr}),n.d(o,"hasInserterItems",function(){return _r}),n.d(o,"getBlockListSettings",function(){return kr});var i=n(8),s=n(14),a=(n(72),n(133),n(60)),c=n(20),u=n(40),l=n(5),d=n(28),p=n(15),h=n(7),f=n(32),b=n(62),m=n.n(b),v=n(2),O=n(25),g={isPublishSidebarEnabled:!0},y={},j=Object(h.a)({},i.SETTINGS_DEFAULTS,{richEditingEnabled:!0,enableCustomFields:!1}),_=new Set(["meta"]),k="core/editor",E="post-update",S="SAVE_POST_NOTICE_ID",P="TRASH_POST_NOTICE_ID",w=/%(?:postname|pagename)%/,T=6e4,C=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(e){return function(n,r){var o=e(n,r),i=void 0===n||Object(v.includes)(t.resetTypes,r.type),s=n!==o;if(!s&&!i)return n;s&&void 0!==n||(o=Object(h.a)({},o));var a=Object(v.includes)(t.ignoreTypes,r.type);return o.isDirty=a?n.isDirty:!i&&s,o}}},x=n(17),B={resetTypes:[],ignoreTypes:[],shouldOverwriteState:function(){return!1}},A=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(e){(t=Object(h.a)({},B,t)).shouldOverwriteState=Object(v.overSome)([t.shouldOverwriteState,function(e){return Object(v.includes)(t.ignoreTypes,e.type)}]);var n={past:[],present:e(void 0,{}),future:[],lastAction:null,shouldCreateUndoLevel:!1},r=t,o=r.resetTypes,i=void 0===o?[]:o,s=r.shouldOverwriteState,a=void 0===s?function(){return!1}:s;return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:n,r=arguments.length>1?arguments[1]:void 0,o=t.past,s=t.present,c=t.future,u=t.lastAction,l=t.shouldCreateUndoLevel,d=u;switch(r.type){case"UNDO":return o.length?{past:Object(v.dropRight)(o),present:Object(v.last)(o),future:[s].concat(Object(x.a)(c)),lastAction:null,shouldCreateUndoLevel:!1}:t;case"REDO":return c.length?{past:[].concat(Object(x.a)(o),[s]),present:Object(v.first)(c),future:Object(v.drop)(c),lastAction:null,shouldCreateUndoLevel:!1}:t;case"CREATE_UNDO_LEVEL":return Object(h.a)({},t,{lastAction:null,shouldCreateUndoLevel:!0})}var p=e(s,r);if(Object(v.includes)(i,r.type))return{past:[],present:p,future:[],lastAction:null,shouldCreateUndoLevel:!1};if(s===p)return t;var f=o,b=d;return!l&&o.length&&a(r,d)||(f=[].concat(Object(x.a)(o),[s]),b=r),{past:f,present:p,future:[],shouldCreateUndoLevel:!1,lastAction:b}}}};function I(t){return t&&"object"===Object(f.a)(t)&&"raw"in t?t.raw:t}function L(t,e){return t===e?Object(h.a)({},t):e}function R(t,e){return"EDIT_POST"===t.type&&(n=t.edits,r=e.edits,Object(v.isEqual)(Object(v.keys)(n),Object(v.keys)(r)));var n,r}var N=Object(v.flow)([l.combineReducers,A({resetTypes:["SETUP_EDITOR_STATE"],ignoreTypes:["RESET_POST","UPDATE_POST"],shouldOverwriteState:function(t,e){return"RESET_EDITOR_BLOCKS"===t.type?!t.shouldCreateUndoLevel:!(!e||t.type!==e.type)&&R(t,e)}})])({blocks:C({resetTypes:["SETUP_EDITOR_STATE","REQUEST_POST_UPDATE_START"]})(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{value:[]},e=arguments.length>1?arguments[1]:void 0;switch(e.type){case"RESET_EDITOR_BLOCKS":return e.blocks===t.value?t:{value:e.blocks}}return t}),edits:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;switch(e.type){case"EDIT_POST":return Object(v.reduce)(e.edits,function(e,n,r){return n!==t[r]&&(e=L(t,e),_.has(r)?e[r]=Object(h.a)({},e[r],n):e[r]=n),e},t);case"UPDATE_POST":case"RESET_POST":var n="UPDATE_POST"===e.type?function(t){return e.edits[t]}:function(t){return I(e.post[t])};return Object(v.reduce)(t,function(e,r,o){return Object(v.isEqual)(r,n(o))?(delete(e=L(t,e))[o],e):e},t);case"RESET_EDITOR_BLOCKS":return"content"in t?Object(v.omit)(t,"content"):t}return t}});var U=Object(l.combineReducers)({data:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;switch(e.type){case"RECEIVE_REUSABLE_BLOCKS":return Object(v.reduce)(e.results,function(e,n){var r=n.reusableBlock,o=r.id,i=r.title,s={clientId:n.parsedBlock.clientId,title:i};return Object(v.isEqual)(e[o],s)||((e=L(t,e))[o]=s),e},t);case"UPDATE_REUSABLE_BLOCK_TITLE":var n=e.id,r=e.title;return t[n]&&t[n].title!==r?Object(h.a)({},t,Object(p.a)({},n,Object(h.a)({},t[n],{title:r}))):t;case"SAVE_REUSABLE_BLOCK_SUCCESS":var o=e.id,i=e.updatedId;if(o===i)return t;var s=t[o];return Object(h.a)({},Object(v.omit)(t,o),Object(p.a)({},i,s));case"REMOVE_REUSABLE_BLOCK":var a=e.id;return Object(v.omit)(t,a)}return t},isFetching:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;switch(e.type){case"FETCH_REUSABLE_BLOCKS":var n=e.id;return n?Object(h.a)({},t,Object(p.a)({},n,!0)):t;case"FETCH_REUSABLE_BLOCKS_SUCCESS":case"FETCH_REUSABLE_BLOCKS_FAILURE":var r=e.id;return Object(v.omit)(t,r)}return t},isSaving:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;switch(e.type){case"SAVE_REUSABLE_BLOCK":return Object(h.a)({},t,Object(p.a)({},e.id,!0));case"SAVE_REUSABLE_BLOCK_SUCCESS":case"SAVE_REUSABLE_BLOCK_FAILURE":var n=e.id;return Object(v.omit)(t,n)}return t}});var D=m()(Object(l.combineReducers)({editor:N,initialEdits:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:y,e=arguments.length>1?arguments[1]:void 0;switch(e.type){case"SETUP_EDITOR":if(!e.edits)break;return e.edits;case"SETUP_EDITOR_STATE":return"content"in t?Object(v.omit)(t,"content"):t;case"UPDATE_POST":return Object(v.reduce)(e.edits,function(e,n,r){return e.hasOwnProperty(r)?(delete(e=L(t,e))[r],e):e},t);case"RESET_POST":return y}return t},currentPost:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;switch(e.type){case"SETUP_EDITOR_STATE":case"RESET_POST":case"UPDATE_POST":var n;if(e.post)n=e.post;else{if(!e.edits)return t;n=Object(h.a)({},t,e.edits)}return Object(v.mapValues)(n,I)}return t},preferences:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:g;switch((arguments.length>1?arguments[1]:void 0).type){case"ENABLE_PUBLISH_SIDEBAR":return Object(h.a)({},t,{isPublishSidebarEnabled:!0});case"DISABLE_PUBLISH_SIDEBAR":return Object(h.a)({},t,{isPublishSidebarEnabled:!1})}return t},saving:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;switch(e.type){case"REQUEST_POST_UPDATE_START":return{requesting:!0,successful:!1,error:null,options:e.options||{}};case"REQUEST_POST_UPDATE_SUCCESS":return{requesting:!1,successful:!0,error:null,options:e.options||{}};case"REQUEST_POST_UPDATE_FAILURE":return{requesting:!1,successful:!1,error:e.error,options:e.options||{}}}return t},postLock:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{isLocked:!1},e=arguments.length>1?arguments[1]:void 0;switch(e.type){case"UPDATE_POST_LOCK":return e.lock}return t},reusableBlocks:U,template:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{isValid:!0},e=arguments.length>1?arguments[1]:void 0;switch(e.type){case"SET_TEMPLATE_VALIDITY":return Object(h.a)({},t,{isValid:e.isValid})}return t},autosave:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1?arguments[1]:void 0;switch(e.type){case"RESET_AUTOSAVE":var n=e.post,r=["title","excerpt","content"].map(function(t){return I(n[t])}),o=Object(d.a)(r,3);return{title:o[0],excerpt:o[1],content:o[2]}}return t},previewLink:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1?arguments[1]:void 0;switch(e.type){case"REQUEST_POST_UPDATE_SUCCESS":return e.post.preview_link?e.post.preview_link:e.post.link?Object(O.addQueryArgs)(e.post.link,{preview:!0}):t;case"REQUEST_POST_UPDATE_START":if(t&&e.options.isPreview)return null}return t},postSavingLock:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;switch(e.type){case"LOCK_POST_SAVING":return Object(h.a)({},t,Object(p.a)({},e.lockName,!0));case"UNLOCK_POST_SAVING":return Object(v.omit)(t,e.lockName)}return t},isReady:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];switch((arguments.length>1?arguments[1]:void 0).type){case"SETUP_EDITOR_STATE":return!0}return t},editorSettings:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:j,e=arguments.length>1?arguments[1]:void 0;switch(e.type){case"UPDATE_EDITOR_SETTINGS":return Object(h.a)({},t,e.settings)}return t}})),F=n(70),M=n.n(F),V=n(97),z=n.n(V),K=n(23),q=n.n(K),W=n(33),H=n.n(W);function G(t){return{type:"API_FETCH",request:t}}function Q(t,e){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o2?n-2:0),o=2;o2?n-2:0),o=2;o0&&void 0!==arguments[0]?arguments[0]:{};return{type:"REQUEST_POST_UPDATE_START",optimist:{type:b.BEGIN,id:E},options:t}}function ut(t){var e=t.previousPost,n=t.post,r=t.isRevision,o=t.options,i=t.postType;return{type:"REQUEST_POST_UPDATE_SUCCESS",previousPost:e,post:n,optimist:{type:r?b.REVERT:b.COMMIT,id:E},options:o,postType:i}}function lt(t){var e=t.post,n=t.edits,r=t.error,o=t.options;return{type:"REQUEST_POST_UPDATE_FAILURE",optimist:{type:b.REVERT,id:E},post:e,edits:n,error:r,options:o}}function dt(t){return{type:"UPDATE_POST",edits:t}}function pt(t){return{type:"SETUP_EDITOR_STATE",post:t}}function ht(t){return{type:"EDIT_POST",edits:t}}function ft(t){return Object(h.a)({},dt(t),{optimist:{id:E}})}function bt(){var t,e,n,r,o,i,s,a,c,u,l,d,p,f,b,m=arguments;return q.a.wrap(function(O){for(;;)switch(O.prev=O.next){case 0:return t=m.length>0&&void 0!==m[0]?m[0]:{},O.next=3,Q(k,"isEditedPostSaveable");case 3:if(O.sent){O.next=6;break}return O.abrupt("return");case 6:return O.next=8,Q(k,"getPostEdits");case 8:return e=O.sent,(n=!!t.isAutosave)&&(e=Object(v.pick)(e,["title","content","excerpt"])),O.next=13,Q(k,"isEditedPostNew");case 13:return O.sent&&(e=Object(h.a)({status:"draft"},e)),O.next=17,Q(k,"getCurrentPost");case 17:return r=O.sent,O.next=20,Q(k,"getEditedPostContent");case 20:return o=O.sent,i=Object(h.a)({},e,{content:o,id:r.id}),O.next=24,Q(k,"getCurrentPostType");case 24:return s=O.sent,O.next=27,Y("core","getPostType",s);case 27:return a=O.sent,O.next=30,$(k,"__experimentalRequestPostUpdateStart",t);case 30:return O.next=32,$(k,"__experimentalOptimisticUpdatePost",i);case 32:if(c="/wp/v2/".concat(a.rest_base,"/").concat(r.id),u="PUT",!n){O.next=43;break}return O.next=37,Q(k,"getAutosave");case 37:l=O.sent,i=Object(h.a)({},Object(v.pick)(r,["title","content","excerpt"]),l,i),c+="/autosaves",u="POST",O.next=47;break;case 43:return O.next=45,$("core/notices","removeNotice",S);case 45:return O.next=47,$("core/notices","removeNotice","autosave-exists");case 47:return O.prev=47,O.next=50,G({path:c,method:u,data:i});case 50:return d=O.sent,p=n?"resetAutosave":"resetPost",O.next=54,$(k,p,d);case 54:return O.next=56,$(k,"__experimentalRequestPostUpdateSuccess",{previousPost:r,post:d,options:t,postType:a,isRevision:d.id!==r.id});case 56:if(!((f=J({previousPost:r,post:d,postType:a,options:t})).length>0)){O.next=60;break}return O.next=60,$.apply(void 0,["core/notices","createSuccessNotice"].concat(Object(x.a)(f)));case 60:O.next=70;break;case 62:return O.prev=62,O.t0=O.catch(47),O.next=66,$(k,"__experimentalRequestPostUpdateFailure",{post:r,edits:e,error:O.t0,options:t});case 66:if(!((b=tt({post:r,edits:e,error:O.t0})).length>0)){O.next=70;break}return O.next=70,$.apply(void 0,["core/notices","createErrorNotice"].concat(Object(x.a)(b)));case 70:case"end":return O.stop()}},et,this,[[47,62]])}function mt(){var t,e,n,r;return q.a.wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,Q(k,"getCurrentPost");case 2:return t=o.sent,o.next=5,Q(k,"getCurrentPostType");case 5:return e=o.sent,o.next=8,Y("core","getPostType",e);case 8:return n=o.sent,o.next=11,G({path:"/wp/v2/".concat(n.rest_base,"/").concat(t.id)+"?context=edit&_timestamp=".concat(Date.now())});case 11:return r=o.sent,o.next=14,$(k,"resetPost",r);case 14:case"end":return o.stop()}},nt,this)}function vt(){var t,e,n;return q.a.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,Q(k,"getCurrentPostType");case 2:return t=r.sent,r.next=5,Y("core","getPostType",t);case 5:return e=r.sent,r.next=8,$("core/notices","removeNotice",P);case 8:return r.prev=8,r.next=11,Q(k,"getCurrentPost");case 11:return n=r.sent,r.next=14,G({path:"/wp/v2/".concat(e.rest_base,"/").concat(n.id),method:"DELETE"});case 14:return r.next=16,$(k,"resetPost",Object(h.a)({},n,{status:"trash"}));case 16:r.next=22;break;case 18:return r.prev=18,r.t0=r.catch(8),r.next=22,$.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(Z.__)("Trashing failed"),{id:P}])));case 22:case"end":return r.stop()}var o},rt,this,[[8,18]])}function Ot(t){return q.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,$(k,"savePost",Object(h.a)({isAutosave:!0},t));case 2:case"end":return e.stop()}},ot,this)}function gt(){return{type:"REDO"}}function yt(){return{type:"UNDO"}}function jt(){return{type:"CREATE_UNDO_LEVEL"}}function _t(t){return{type:"UPDATE_POST_LOCK",lock:t}}function kt(t){return{type:"FETCH_REUSABLE_BLOCKS",id:t}}function Et(t){return{type:"RECEIVE_REUSABLE_BLOCKS",results:t}}function St(t){return{type:"SAVE_REUSABLE_BLOCK",id:t}}function Pt(t){return{type:"DELETE_REUSABLE_BLOCK",id:t}}function wt(t,e){return{type:"UPDATE_REUSABLE_BLOCK_TITLE",id:t,title:e}}function Tt(t){return{type:"CONVERT_BLOCK_TO_STATIC",clientId:t}}function Ct(t){return{type:"CONVERT_BLOCK_TO_REUSABLE",clientIds:Object(v.castArray)(t)}}function xt(){return{type:"ENABLE_PUBLISH_SIDEBAR"}}function Bt(){return{type:"DISABLE_PUBLISH_SIDEBAR"}}function At(t){return{type:"LOCK_POST_SAVING",lockName:t}}function It(t){return{type:"UNLOCK_POST_SAVING",lockName:t}}function Lt(t){return{type:"RESET_EDITOR_BLOCKS",blocks:t,shouldCreateUndoLevel:!1!==(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).__unstableShouldCreateUndoLevel}}function Rt(t){return{type:"UPDATE_EDITOR_SETTINGS",settings:t}}var Nt=function(t){return q.a.mark(function e(){var n,r,o,i=arguments;return q.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(n=i.length,r=new Array(n),o=0;o0}function ye(t){return t.editor.future.length>0}function je(t){return"auto-draft"===Se(t).status}function _e(t){return t.editor.present.blocks.isDirty||"content"in t.editor.present.edits}function ke(t){return!!_e(t)||(Object.keys(t.editor.present.edits).length>0||hn(t,ke))}function Ee(t){return!ke(t)&&je(t)}function Se(t){return t.currentPost}function Pe(t){return t.currentPost.type}function we(t){return Se(t).id||null}function Te(t){return Object(v.get)(Se(t),["_links","version-history",0,"count"],0)}function Ce(t){return Object(v.get)(Se(t),["_links","predecessor-version",0,"id"],null)}var xe=Object(be.a)(function(t){return Object(h.a)({},t.initialEdits,t.editor.present.edits)},function(t){return[t.editor.present.edits,t.initialEdits]}),Be=Object(be.a)(function(){return[]},function(t){return[t.editor]});function Ae(t,e){var n=Se(t);if(n.hasOwnProperty(e))return n[e]}var Ie=Object(be.a)(function(t,e){var n=xe(t);return n.hasOwnProperty(e)?Object(h.a)({},Ae(t,e),n[e]):Ae(t,e)},function(t,e){return[Object(v.get)(t.editor.present.edits,[e],Oe),Object(v.get)(t.currentPost,[e],Oe)]});function Le(t,e){switch(e){case"content":return nn(t)}var n=xe(t);return n.hasOwnProperty(e)?_.has(e)?Ie(t,e):n[e]:Ae(t,e)}function Re(t,e){if(!We(t))return null;var n=qe(t);return n.hasOwnProperty(e)?n[e]:void 0}function Ne(t){return"private"===Le(t,"status")?"private":Le(t,"password")?"password":"public"}function Ue(t){return"pending"===Se(t).status}function De(t){var e=Se(t);return-1!==["publish","private"].indexOf(e.status)||"future"===e.status&&!Object(me.isInTheFuture)(new Date(Number(Object(me.getDate)(e.date))-T))}function Fe(t){return"future"===Se(t).status&&!De(t)}function Me(t){var e=Se(t);return ke(t)||-1===["publish","private","future"].indexOf(e.status)}function Ve(t){return!Qe(t)&&(!!Le(t,"title")||!!Le(t,"excerpt")||!ze(t))}function ze(t){var e=t.editor.present.blocks.value;if(e.length&&!("content"in xe(t))){if(e.length>1)return!1;var n=e[0].name;if(n!==Object(s.getDefaultBlockName)()&&n!==Object(s.getFreeformContentHandlerName)())return!1}return!nn(t)}function Ke(t){if(!Ve(t))return!1;if(!We(t))return!0;if(_e(t))return!0;var e=qe(t);return["title","excerpt"].some(function(n){return e[n]!==Le(t,n)})}function qe(t){return t.autosave}function We(t){return!!qe(t)}function He(t){var e=Le(t,"date"),n=new Date(Number(Object(me.getDate)(e))-T);return Object(me.isInTheFuture)(n)}function Ge(t){var e=Le(t,"date"),n=Le(t,"modified"),r=Le(t,"status");return("draft"===r||"auto-draft"===r||"pending"===r)&&e===n}function Qe(t){return t.saving.requesting}function Ye(t){return t.saving.successful}function $e(t){return!!t.saving.error}function Xe(t){return Qe(t)&&!!t.saving.options.isAutosave}function Ze(t){return Qe(t)&&!!t.saving.options.isPreview}function Je(t){var e=Le(t,"featured_media"),n=t.previewLink;return n&&e?Object(O.addQueryArgs)(n,{_thumbnail_id:e}):n}function tn(t){var e,n=t.editor.present.blocks.value;switch(1===n.length&&(e=n[0].name),2===n.length&&"core/paragraph"===n[1].name&&(e=n[0].name),e){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 en(t){var e=t.editor.present.blocks.value;return 1===e.length&&Object(s.isUnmodifiedDefaultBlock)(e[0])?[]:e}var nn=Object(be.a)(function(t){var e=xe(t);if("content"in e)return e.content;var n=en(t),r=Object(s.serialize)(n);return 1===n.length&&n[0].name===Object(s.getFreeformContentHandlerName)()?Object(ve.removep)(r):r},function(t){return[t.editor.present.blocks.value,t.editor.present.edits.content,t.initialEdits.content]}),rn=Object(be.a)(function(t,e){var n=t.reusableBlocks.data[e];if(!n)return null;var r=isNaN(parseInt(e));return Object(h.a)({},n,{id:r?e:+e,isTemporary:r})},function(t,e){return[t.reusableBlocks.data[e]]});function on(t,e){return t.reusableBlocks.isSaving[e]||!1}function sn(t,e){return!!t.reusableBlocks.isFetching[e]}var an=Object(be.a)(function(t){return Object(v.map)(t.reusableBlocks.data,function(e,n){return rn(t,n)})},function(t){return[t.reusableBlocks.data]});function cn(t,e){var n=Object(v.find)(t.optimist,function(t){return t.beforeState&&Object(v.get)(t.action,["optimist","id"])===e});return n?n.beforeState:null}function un(t){if(!Qe(t))return!1;if(!De(t))return!1;var e=cn(t,E);return!!e&&!De(e)}function ln(t){var e=Le(t,"permalink_template");return w.test(e)}function dn(t){var e=pn(t);if(!e)return null;var n=e.prefix,r=e.postName,o=e.suffix;return ln(t)?n+r+o:n}function pn(t){var e=Le(t,"permalink_template");if(!e)return null;var n=Le(t,"slug")||Le(t,"generated_slug"),r=e.split(w),o=Object(d.a)(r,2);return{prefix:o[0],postName:n,suffix:o[1]}}function hn(t,e){var n=t.optimist;return!!n&&n.some(function(t){var n=t.beforeState;return n&&e(n)})}function fn(t){return t.postLock.isLocked}function bn(t){return Object.keys(t.postSavingLock).length>0}function mn(t){return t.postLock.isTakeover}function vn(t){return t.postLock.user}function On(t){return t.postLock.activePostLock}function gn(t){return Object(v.has)(Se(t),["_links","wp:action-unfiltered-html"])}function yn(t){return t.preferences.hasOwnProperty("isPublishSidebarEnabled")?t.preferences.isPublishSidebarEnabled:g.isPublishSidebarEnabled}function jn(t){return t.editor.present.blocks.value}function _n(t){return t.isReady}function kn(t){return t.editorSettings}function En(t){return Object(l.createRegistrySelector)(function(e){return function(n){for(var r,o=arguments.length,i=new Array(o>1?o-1:0),s=1;s0&&void 0!==arguments[0]?arguments[0]:{},e=t.getBlockInsertionParentClientId,n=void 0===e?Ar:e,r=t.getInserterItems,o=void 0===r?Ir:r,a=t.getSelectedBlockName,c=void 0===a?Lr:a;return{name:"blocks",className:"editor-autocompleters__block",triggerPrefix:"/",options:function(){var t=c();return o(n()).filter(function(e){return t!==e.name})},getOptionKeywords:function(t){var e=t.title,n=t.keywords,r=void 0===n?[]:n;return[t.category].concat(Object(x.a)(r),[e])},getOptionLabel:function(t){var e=t.icon,n=t.title;return[Object(Br.createElement)(i.BlockIcon,{key:"icon",icon:e,showColors:!0}),n]},allowContext:function(t,e){return!(/\S/.test(t)||/\S/.test(e))},getOptionCompletion:function(t){var e=t.name,n=t.initialAttributes;return{action:"replace",value:Object(s.createBlock)(e,n)}},isOptionDisabled:function(t){return t.isDisabled}}}(),Nr={name:"users",className:"editor-autocompleters__user",triggerPrefix:"@",options:function(t){var e="";return t&&(e="?search="+encodeURIComponent(t)),H()({path:"/wp/v2/users"+e})},isDebounced:!0,getOptionKeywords:function(t){return[t.slug,t.name]},getOptionLabel:function(t){return[Object(Br.createElement)("img",{key:"avatar",className:"editor-autocompleters__user-avatar",alt:"",src:t.avatar_urls[24]}),Object(Br.createElement)("span",{key:"name",className:"editor-autocompleters__user-name"},t.name),Object(Br.createElement)("span",{key:"slug",className:"editor-autocompleters__user-slug"},t.slug)]},getOptionCompletion:function(t){return"@".concat(t.slug)}},Ur=n(19),Dr=n(21),Fr=n(4),Mr=function(t){var e=t.urlQueryArgs,n=void 0===e?{}:e,r=Object(Dr.a)(t,["urlQueryArgs"]),o=Object(l.select)("core/editor").getCurrentPostId;return n=Object(h.a)({post_id:o()},n),Object(Br.createElement)(Fr.ServerSideRender,Object(Ur.a)({urlQueryArgs:n},r))},Vr=n(10),zr=n(9),Kr=n(11),qr=n(12),Wr=n(13),Hr=n(6),Gr=function(t){function e(){return Object(Vr.a)(this,e),Object(Kr.a)(this,Object(qr.a)(e).apply(this,arguments))}return Object(Wr.a)(e,t),Object(zr.a)(e,[{key:"componentDidUpdate",value:function(t){var e=this.props,n=e.isDirty,r=e.editsReference,o=e.isAutosaveable,i=e.isAutosaving;r!==t.editsReference&&(this.didAutosaveForEditsReference=!1),!i&&t.isAutosaving&&(this.didAutosaveForEditsReference=!0),t.isDirty===n&&t.isAutosaveable===o&&t.editsReference===r||this.toggleTimer(n&&o&&!this.didAutosaveForEditsReference)}},{key:"componentWillUnmount",value:function(){this.toggleTimer(!1)}},{key:"toggleTimer",value:function(t){var e=this;clearTimeout(this.pendingSave);var n=this.props.autosaveInterval;t&&(this.pendingSave=setTimeout(function(){return e.props.autosave()},1e3*n))}},{key:"render",value:function(){return null}}]),e}(Br.Component),Qr=Object(Hr.compose)([Object(l.withSelect)(function(t){var e=t("core/editor"),n=e.isEditedPostDirty,r=e.isEditedPostAutosaveable,o=e.getReferenceByDistinctEdits,i=e.isAutosavingPost,s=t("core/editor").getEditorSettings().autosaveInterval;return{isDirty:n(),isAutosaveable:r(),editsReference:o(),isAutosaving:i(),autosaveInterval:s}}),Object(l.withDispatch)(function(t){return{autosave:t("core/editor").autosave}})])(Gr),Yr=n(16),$r=n.n(Yr),Xr=function(t){var e=t.children,n=t.isValid,r=t.level,o=t.path,s=void 0===o?[]:o,a=t.href,c=t.onSelect;return Object(Br.createElement)("li",{className:$r()("document-outline__item","is-".concat(r.toLowerCase()),{"is-invalid":!n})},Object(Br.createElement)("a",{href:a,className:"document-outline__button",onClick:c},Object(Br.createElement)("span",{className:"document-outline__emdash","aria-hidden":"true"}),s.map(function(t,e){var n=t.clientId;return Object(Br.createElement)("strong",{key:e,className:"document-outline__level"},Object(Br.createElement)(i.BlockTitle,{clientId:n}))}),Object(Br.createElement)("strong",{className:"document-outline__level"},r),Object(Br.createElement)("span",{className:"document-outline__item-content"},e)))},Zr=Object(Br.createElement)("em",null,Object(Z.__)("(Empty heading)")),Jr=[Object(Br.createElement)("br",{key:"incorrect-break"}),Object(Br.createElement)("em",{key:"incorrect-message"},Object(Z.__)("(Incorrect heading level)"))],to=[Object(Br.createElement)("br",{key:"incorrect-break-h1"}),Object(Br.createElement)("em",{key:"incorrect-message-h1"},Object(Z.__)("(Your theme may already use a H1 for the post title)"))],eo=[Object(Br.createElement)("br",{key:"incorrect-break-multiple-h1"}),Object(Br.createElement)("em",{key:"incorrect-message-multiple-h1"},Object(Z.__)("(Multiple H1 headings are not recommended)"))],no=function(t){return!t.attributes.content||0===t.attributes.content.length},ro=Object(Hr.compose)(Object(l.withSelect)(function(t){var e=t("core/block-editor").getBlocks,n=t("core/editor").getEditedPostAttribute,r=(0,t("core").getPostType)(n("type"));return{title:n("title"),blocks:e(),isTitleSupported:Object(v.get)(r,["supports","title"],!1)}}))(function(t){var e=t.blocks,n=void 0===e?[]:e,r=t.title,o=t.onSelect,i=t.isTitleSupported,s=t.hasOutlineItemsDisabled,a=function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return Object(v.flatMap)(e,function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return"core/heading"===e.name?Object(h.a)({},e,{path:n,level:e.attributes.level,isEmpty:no(e)}):t(e.innerBlocks,[].concat(Object(x.a)(n),[e]))})}(n);if(a.length<1)return null;var u=1,l=document.querySelector(".editor-post-title__input"),d=i&&r&&l,p=Object(v.countBy)(a,"level")[1]>1;return Object(Br.createElement)("div",{className:"document-outline"},Object(Br.createElement)("ul",null,d&&Object(Br.createElement)(Xr,{level:Object(Z.__)("Title"),isValid:!0,onSelect:o,href:"#".concat(l.id),isDisabled:s},r),a.map(function(t,e){var n=t.level>u+1,r=!(t.isEmpty||n||!t.level||1===t.level&&(p||d));return u=t.level,Object(Br.createElement)(Xr,{key:e,level:"H".concat(t.level),isValid:r,path:t.path,isDisabled:s,href:"#block-".concat(t.clientId),onSelect:o},t.isEmpty?Zr:Object(c.getTextContent)(Object(c.create)({html:t.attributes.content})),n&&Jr,1===t.level&&p&&eo,d&&1===t.level&&!p&&to)})))});var oo=Object(l.withSelect)(function(t){return{blocks:t("core/block-editor").getBlocks()}})(function(t){var e=t.blocks,n=t.children;return Object(v.filter)(e,function(t){return"core/heading"===t.name}).length<1?null:n}),io=n(3),so=n(18),ao=n(49),co=n.n(ao);var uo=Object(Hr.compose)([Object(l.withSelect)(function(t){return{isDirty:(0,t("core/editor").isEditedPostDirty)()}}),Object(l.withDispatch)(function(t,e,n){var r=n.select,o=t("core/editor").savePost;return{onSave:function(){(0,r("core/editor").isEditedPostDirty)()&&o()}}})])(function(t){var e=t.onSave;return Object(Br.createElement)(Fr.KeyboardShortcuts,{bindGlobal:!0,shortcuts:Object(p.a)({},so.rawShortcut.primary("s"),function(t){t.preventDefault(),e()})})}),lo=function(t){function e(){var t;return Object(Vr.a)(this,e),(t=Object(Kr.a)(this,Object(qr.a)(e).apply(this,arguments))).undoOrRedo=t.undoOrRedo.bind(Object(io.a)(Object(io.a)(t))),t}return Object(Wr.a)(e,t),Object(zr.a)(e,[{key:"undoOrRedo",value:function(t){var e=this.props,n=e.onRedo,r=e.onUndo;t.shiftKey?n():r(),t.preventDefault()}},{key:"render",value:function(){var t;return Object(Br.createElement)(Br.Fragment,null,Object(Br.createElement)(i.BlockEditorKeyboardShortcuts,null),Object(Br.createElement)(Fr.KeyboardShortcuts,{shortcuts:(t={},Object(p.a)(t,so.rawShortcut.primary("z"),this.undoOrRedo),Object(p.a)(t,so.rawShortcut.primaryShift("z"),this.undoOrRedo),t)}),Object(Br.createElement)(uo,null))}}]),e}(Br.Component),po=Object(l.withDispatch)(function(t){var e=t("core/editor");return{onRedo:e.redo,onUndo:e.undo}})(lo),ho=po;function fo(){return co()("EditorGlobalKeyboardShortcuts",{alternative:"VisualEditorGlobalKeyboardShortcuts",plugin:"Gutenberg"}),Object(Br.createElement)(po,null)}function bo(){return Object(Br.createElement)(uo,null)}var mo=Object(Hr.compose)([Object(l.withSelect)(function(t){return{hasRedo:t("core/editor").hasEditorRedo()}}),Object(l.withDispatch)(function(t){return{redo:t("core/editor").redo}})])(function(t){var e=t.hasRedo,n=t.redo;return Object(Br.createElement)(Fr.IconButton,{icon:"redo",label:Object(Z.__)("Redo"),shortcut:so.displayShortcut.primaryShift("z"),"aria-disabled":!e,onClick:e?n:void 0,className:"editor-history__redo"})});var vo=Object(Hr.compose)([Object(l.withSelect)(function(t){return{hasUndo:t("core/editor").hasEditorUndo()}}),Object(l.withDispatch)(function(t){return{undo:t("core/editor").undo}})])(function(t){var e=t.hasUndo,n=t.undo;return Object(Br.createElement)(Fr.IconButton,{icon:"undo",label:Object(Z.__)("Undo"),shortcut:so.displayShortcut.primary("z"),"aria-disabled":!e,onClick:e?n:void 0,className:"editor-history__undo"})});var Oo=Object(Hr.compose)([Object(l.withSelect)(function(t){return{isValid:t("core/block-editor").isValidTemplate()}}),Object(l.withDispatch)(function(t){var e=t("core/block-editor"),n=e.setTemplateValidity;return{resetTemplateValidity:function(){return n(!0)},synchronizeTemplate:e.synchronizeTemplate}})])(function(t){var e=t.isValid,n=Object(Dr.a)(t,["isValid"]);return e?null:Object(Br.createElement)(Fr.Notice,{className:"editor-template-validation-notice",isDismissible:!1,status:"warning"},Object(Br.createElement)("p",null,Object(Z.__)("The content of your post doesn’t match the template assigned to your post type.")),Object(Br.createElement)("div",null,Object(Br.createElement)(Fr.Button,{isDefault:!0,onClick:n.resetTemplateValidity},Object(Z.__)("Keep it as is")),Object(Br.createElement)(Fr.Button,{onClick:function(){window.confirm(Object(Z.__)("Resetting the template may result in loss of content, do you want to continue?"))&&n.synchronizeTemplate()},isPrimary:!0},Object(Z.__)("Reset the template"))))});var go=Object(Hr.compose)([Object(l.withSelect)(function(t){return{notices:t("core/notices").getNotices()}}),Object(l.withDispatch)(function(t){return{onRemove:t("core/notices").removeNotice}})])(function(t){var e=t.dismissible,n=t.notices,r=Object(Dr.a)(t,["dismissible","notices"]);return void 0!==e&&(n=Object(v.filter)(n,{isDismissible:e})),Object(Br.createElement)(Fr.NoticeList,Object(Ur.a)({notices:n},r),!1!==e&&Object(Br.createElement)(Oo,null))}),yo=function(t){function e(){var t;return Object(Vr.a)(this,e),(t=Object(Kr.a)(this,Object(qr.a)(e).apply(this,arguments))).reboot=t.reboot.bind(Object(io.a)(Object(io.a)(t))),t.getContent=t.getContent.bind(Object(io.a)(Object(io.a)(t))),t.state={error:null},t}return Object(Wr.a)(e,t),Object(zr.a)(e,[{key:"componentDidCatch",value:function(t){this.setState({error:t})}},{key:"reboot",value:function(){this.props.onError()}},{key:"getContent",value:function(){try{return Object(l.select)("core/editor").getEditedPostContent()}catch(t){}}},{key:"render",value:function(){var t=this.state.error;return t?Object(Br.createElement)(i.Warning,{className:"editor-error-boundary",actions:[Object(Br.createElement)(Fr.Button,{key:"recovery",onClick:this.reboot,isLarge:!0},Object(Z.__)("Attempt Recovery")),Object(Br.createElement)(Fr.ClipboardButton,{key:"copy-post",text:this.getContent,isLarge:!0},Object(Z.__)("Copy Post Text")),Object(Br.createElement)(Fr.ClipboardButton,{key:"copy-error",text:t.stack,isLarge:!0},Object(Z.__)("Copy Error"))]},Object(Z.__)("The editor has encountered an unexpected error.")):this.props.children}}]),e}(Br.Component);var jo=Object(l.withSelect)(function(t){var e=t("core/editor"),n=e.getEditedPostAttribute,r=e.getEditorSettings,o=t("core").getPostType,i=r().availableTemplates;return{postType:o(n("type")),availableTemplates:i}})(function(t){var e=t.availableTemplates,n=t.postType,r=t.children;return!Object(v.get)(n,["supports","page-attributes"],!1)&&Object(v.isEmpty)(e)?null:r});var _o=Object(l.withSelect)(function(t){var e=t("core/editor").getEditedPostAttribute;return{postType:(0,t("core").getPostType)(e("type"))}})(function(t){var e=t.postType,n=t.children,r=t.supportKeys,o=!0;return e&&(o=Object(v.some)(Object(v.castArray)(r),function(t){return!!e.supports[t]})),o?n:null}),ko=Object(Hr.withState)({orderInput:null})(function(t){var e=t.onUpdateOrder,n=t.order,r=void 0===n?0:n,o=t.orderInput,i=t.setState,s=null===o?r:o;return Object(Br.createElement)(Fr.TextControl,{className:"editor-page-attributes__order",type:"number",label:Object(Z.__)("Order"),value:s,onChange:function(t){i({orderInput:t});var n=Number(t);Number.isInteger(n)&&""!==Object(v.invoke)(t,["trim"])&&e(Number(t))},size:6,onBlur:function(){i({orderInput:null})}})});var Eo=Object(Hr.compose)([Object(l.withSelect)(function(t){return{order:t("core/editor").getEditedPostAttribute("menu_order")}}),Object(l.withDispatch)(function(t){return{onUpdateOrder:function(e){t("core/editor").editPost({menu_order:e})}}})])(function(t){return Object(Br.createElement)(_o,{supportKeys:"page-attributes"},Object(Br.createElement)(ko,t))});function So(t){var e=t.map(function(t){return Object(h.a)({children:[],parent:null},t)}),n=Object(v.groupBy)(e,"parent");if(n.null&&n.null.length)return e;return function t(e){return e.map(function(e){var r=n[e.id];return Object(h.a)({},e,{children:r&&r.length?t(r):[]})})}(n[0]||[])}var Po=Object(l.withSelect)(function(t){var e=t("core"),n=e.getPostType,r=e.getEntityRecords,o=t("core/editor"),i=o.getCurrentPostId,s=o.getEditedPostAttribute,a=s("type"),c=n(a),u=i(),l=Object(v.get)(c,["hierarchical"],!1),d={per_page:-1,exclude:u,parent_exclude:u,orderby:"menu_order",order:"asc"};return{parent:s("parent"),items:l?r("postType",a,d):[],postType:c}}),wo=Object(l.withDispatch)(function(t){var e=t("core/editor").editPost;return{onUpdateParent:function(t){e({parent:t||0})}}}),To=Object(Hr.compose)([Po,wo])(function(t){var e=t.parent,n=t.postType,r=t.items,o=t.onUpdateParent,i=Object(v.get)(n,["hierarchical"],!1),s=Object(v.get)(n,["labels","parent_item_colon"]),a=r||[];if(!i||!s||!a.length)return null;var c=So(a.map(function(t){return{id:t.id,parent:t.parent,name:t.title.raw?t.title.raw:"#".concat(t.id," (").concat(Object(Z.__)("no title"),")")}}));return Object(Br.createElement)(Fr.TreeSelect,{className:"editor-page-attributes__parent",label:s,noOptionLabel:"(".concat(Object(Z.__)("no parent"),")"),tree:c,selectedId:e,onChange:o})});var Co=Object(Hr.compose)(Object(l.withSelect)(function(t){var e=t("core/editor"),n=e.getEditedPostAttribute,r=(0,e.getEditorSettings)().availableTemplates;return{selectedTemplate:n("template"),availableTemplates:r}}),Object(l.withDispatch)(function(t){return{onUpdate:function(e){t("core/editor").editPost({template:e||""})}}}))(function(t){var e=t.availableTemplates,n=t.selectedTemplate,r=t.onUpdate;return Object(v.isEmpty)(e)?null:Object(Br.createElement)(Fr.SelectControl,{label:Object(Z.__)("Template:"),value:n,onChange:r,className:"editor-page-attributes__template",options:Object(v.map)(e,function(t,e){return{value:e,label:t}})})});var xo=Object(Hr.compose)([Object(l.withSelect)(function(t){var e=t("core/editor").getCurrentPost();return{hasAssignAuthorAction:Object(v.get)(e,["_links","wp:action-assign-author"],!1),postType:t("core/editor").getCurrentPostType(),authors:t("core").getAuthors()}}),Hr.withInstanceId])(function(t){var e=t.hasAssignAuthorAction,n=t.authors,r=t.children;return!e||n.length<2?null:Object(Br.createElement)(_o,{supportKeys:"author"},r)}),Bo=function(t){function e(){var t;return Object(Vr.a)(this,e),(t=Object(Kr.a)(this,Object(qr.a)(e).apply(this,arguments))).setAuthorId=t.setAuthorId.bind(Object(io.a)(Object(io.a)(t))),t}return Object(Wr.a)(e,t),Object(zr.a)(e,[{key:"setAuthorId",value:function(t){var e=this.props.onUpdateAuthor,n=t.target.value;e(Number(n))}},{key:"render",value:function(){var t=this.props,e=t.postAuthor,n=t.instanceId,r=t.authors,o="post-author-selector-"+n;return Object(Br.createElement)(xo,null,Object(Br.createElement)("label",{htmlFor:o},Object(Z.__)("Author")),Object(Br.createElement)("select",{id:o,value:e,onChange:this.setAuthorId,className:"editor-post-author__select"},r.map(function(t){return Object(Br.createElement)("option",{key:t.id,value:t.id},t.name)})))}}]),e}(Br.Component),Ao=Object(Hr.compose)([Object(l.withSelect)(function(t){return{postAuthor:t("core/editor").getEditedPostAttribute("author"),authors:t("core").getAuthors()}}),Object(l.withDispatch)(function(t){return{onUpdateAuthor:function(e){t("core/editor").editPost({author:e})}}}),Hr.withInstanceId])(Bo);var Io=Object(Hr.compose)([Object(l.withSelect)(function(t){return{commentStatus:t("core/editor").getEditedPostAttribute("comment_status")}}),Object(l.withDispatch)(function(t){return{editPost:t("core/editor").editPost}})])(function(t){var e=t.commentStatus,n=void 0===e?"open":e,r=Object(Dr.a)(t,["commentStatus"]);return Object(Br.createElement)(Fr.CheckboxControl,{label:Object(Z.__)("Allow Comments"),checked:"open"===n,onChange:function(){return r.editPost({comment_status:"open"===n?"closed":"open"})}})});var Lo=Object(Hr.compose)([Object(l.withSelect)(function(t){return{excerpt:t("core/editor").getEditedPostAttribute("excerpt")}}),Object(l.withDispatch)(function(t){return{onUpdateExcerpt:function(e){t("core/editor").editPost({excerpt:e})}}})])(function(t){var e=t.excerpt,n=t.onUpdateExcerpt;return Object(Br.createElement)("div",{className:"editor-post-excerpt"},Object(Br.createElement)(Fr.TextareaControl,{label:Object(Z.__)("Write an excerpt (optional)"),className:"editor-post-excerpt__textarea",onChange:function(t){return n(t)},value:e}),Object(Br.createElement)(Fr.ExternalLink,{href:Object(Z.__)("https://codex.wordpress.org/Excerpt")},Object(Z.__)("Learn more about manual excerpts")))});var Ro=function(t){return Object(Br.createElement)(_o,Object(Ur.a)({},t,{supportKeys:"excerpt"}))};var No=Object(l.withSelect)(function(t){var e=t("core").getThemeSupports;return{postType:(0,t("core/editor").getEditedPostAttribute)("type"),themeSupports:e()}})(function(t){var e=t.themeSupports,n=t.children,r=t.postType,o=t.supportKeys;return Object(v.some)(Object(v.castArray)(o),function(t){var n=Object(v.get)(e,[t],!1);return"post-thumbnails"===t&&Object(v.isArray)(n)?Object(v.includes)(n,r):n})?n:null});var Uo=function(t){return Object(Br.createElement)(No,{supportKeys:"post-thumbnails"},Object(Br.createElement)(_o,Object(Ur.a)({},t,{supportKeys:"thumbnail"})))},Do=["image"],Fo=Object(Z.__)("Featured Image"),Mo=Object(Z.__)("Set featured image"),Vo=Object(Z.__)("Remove image");var zo=Object(l.withSelect)(function(t){var e=t("core"),n=e.getMedia,r=e.getPostType,o=t("core/editor"),i=o.getCurrentPostId,s=o.getEditedPostAttribute,a=s("featured_media");return{media:a?n(a):null,currentPostId:i(),postType:r(s("type")),featuredImageId:a}}),Ko=Object(l.withDispatch)(function(t){var e=t("core/editor").editPost;return{onUpdateImage:function(t){e({featured_media:t.id})},onRemoveImage:function(){e({featured_media:0})}}}),qo=Object(Hr.compose)(zo,Ko,Object(Fr.withFilters)("editor.PostFeaturedImage"))(function(t){var e,n,r,o=t.currentPostId,s=t.featuredImageId,a=t.onUpdateImage,c=t.onRemoveImage,u=t.media,l=t.postType,d=Object(v.get)(l,["labels"],{}),p=Object(Br.createElement)("p",null,Object(Z.__)("To edit the featured image, you need permission to upload media."));if(u){var h=Object(xr.applyFilters)("editor.PostFeaturedImage.imageSize","post-thumbnail",u.id,o);Object(v.has)(u,["media_details","sizes",h])?(e=u.media_details.sizes[h].width,n=u.media_details.sizes[h].height,r=u.media_details.sizes[h].source_url):(e=u.media_details.width,n=u.media_details.height,r=u.source_url)}return Object(Br.createElement)(Uo,null,Object(Br.createElement)("div",{className:"editor-post-featured-image"},Object(Br.createElement)(i.MediaUploadCheck,{fallback:p},Object(Br.createElement)(i.MediaUpload,{title:d.featured_image||Fo,onSelect:a,allowedTypes:Do,modalClass:"editor-post-featured-image__media-modal",render:function(t){var o=t.open;return Object(Br.createElement)(Fr.Button,{className:s?"editor-post-featured-image__preview":"editor-post-featured-image__toggle",onClick:o,"aria-label":s?Object(Z.__)("Edit or update the image"):null},!!s&&u&&Object(Br.createElement)(Fr.ResponsiveWrapper,{naturalWidth:e,naturalHeight:n},Object(Br.createElement)("img",{src:r,alt:""})),!!s&&!u&&Object(Br.createElement)(Fr.Spinner,null),!s&&(d.set_featured_image||Mo))},value:s})),!!s&&u&&!u.isLoading&&Object(Br.createElement)(i.MediaUploadCheck,null,Object(Br.createElement)(i.MediaUpload,{title:d.featured_image||Fo,onSelect:a,allowedTypes:Do,modalClass:"editor-post-featured-image__media-modal",render:function(t){var e=t.open;return Object(Br.createElement)(Fr.Button,{onClick:e,isDefault:!0,isLarge:!0},Object(Z.__)("Replace image"))}})),!!s&&Object(Br.createElement)(i.MediaUploadCheck,null,Object(Br.createElement)(Fr.Button,{onClick:c,isLink:!0,isDestructive:!0},d.remove_featured_image||Vo))))});var Wo=Object(l.withSelect)(function(t){return{disablePostFormats:t("core/editor").getEditorSettings().disablePostFormats}})(function(t){var e=t.disablePostFormats,n=Object(Dr.a)(t,["disablePostFormats"]);return!e&&Object(Br.createElement)(_o,Object(Ur.a)({},n,{supportKeys:"post-formats"}))}),Ho=[{id:"aside",caption:Object(Z.__)("Aside")},{id:"gallery",caption:Object(Z.__)("Gallery")},{id:"link",caption:Object(Z.__)("Link")},{id:"image",caption:Object(Z.__)("Image")},{id:"quote",caption:Object(Z.__)("Quote")},{id:"standard",caption:Object(Z.__)("Standard")},{id:"status",caption:Object(Z.__)("Status")},{id:"video",caption:Object(Z.__)("Video")},{id:"audio",caption:Object(Z.__)("Audio")},{id:"chat",caption:Object(Z.__)("Chat")}];var Go=Object(Hr.compose)([Object(l.withSelect)(function(t){var e=t("core/editor"),n=e.getEditedPostAttribute,r=e.getSuggestedPostFormat,o=n("format"),i=t("core").getThemeSupports();return{postFormat:o,supportedFormats:Object(v.union)([o],Object(v.get)(i,["formats"],[])),suggestedFormat:r()}}),Object(l.withDispatch)(function(t){return{onUpdatePostFormat:function(e){t("core/editor").editPost({format:e})}}}),Hr.withInstanceId])(function(t){var e=t.onUpdatePostFormat,n=t.postFormat,r=void 0===n?"standard":n,o=t.supportedFormats,i=t.suggestedFormat,s="post-format-selector-"+t.instanceId,a=Ho.filter(function(t){return Object(v.includes)(o,t.id)}),c=Object(v.find)(a,function(t){return t.id===i});return Object(Br.createElement)(Wo,null,Object(Br.createElement)("div",{className:"editor-post-format"},Object(Br.createElement)("div",{className:"editor-post-format__content"},Object(Br.createElement)("label",{htmlFor:s},Object(Z.__)("Post Format")),Object(Br.createElement)(Fr.SelectControl,{value:r,onChange:function(t){return e(t)},id:s,options:a.map(function(t){return{label:t.caption,value:t.id}})})),c&&c.id!==r&&Object(Br.createElement)("div",{className:"editor-post-format__suggestion"},Object(Z.__)("Suggestion:")," ",Object(Br.createElement)(Fr.Button,{isLink:!0,onClick:function(){return e(c.id)}},c.caption))))});var Qo=Object(l.withSelect)(function(t){var e=t("core/editor"),n=e.getCurrentPostLastRevisionId,r=e.getCurrentPostRevisionsCount;return{lastRevisionId:n(),revisionsCount:r()}})(function(t){var e=t.lastRevisionId,n=t.revisionsCount,r=t.children;return!e||n<2?null:Object(Br.createElement)(_o,{supportKeys:"revisions"},r)});function Yo(t,e){return Object(O.addQueryArgs)(t,e)}function $o(t){return Object(v.toLower)(Object(v.deburr)(Object(v.trim)(t.replace(/[\s\.\/_]+/g,"-"),"-")))}var Xo=Object(l.withSelect)(function(t){var e=t("core/editor"),n=e.getCurrentPostLastRevisionId,r=e.getCurrentPostRevisionsCount;return{lastRevisionId:n(),revisionsCount:r()}})(function(t){var e=t.lastRevisionId,n=t.revisionsCount;return Object(Br.createElement)(Qo,null,Object(Br.createElement)(Fr.IconButton,{href:Yo("revision.php",{revision:e,gutenberg:!0}),className:"editor-post-last-revision__title",icon:"backup"},Object(Z.sprintf)(Object(Z._n)("%d Revision","%d Revisions",n),n)))});var Zo=function(t){function e(){var t;return Object(Vr.a)(this,e),(t=Object(Kr.a)(this,Object(qr.a)(e).apply(this,arguments))).openPreviewWindow=t.openPreviewWindow.bind(Object(io.a)(Object(io.a)(t))),t}return Object(Wr.a)(e,t),Object(zr.a)(e,[{key:"componentDidUpdate",value:function(t){var e=this.props.previewLink;e&&!t.previewLink&&this.setPreviewWindowLink(e)}},{key:"setPreviewWindowLink",value:function(t){var e=this.previewWindow;e&&!e.closed&&(e.location=t)}},{key:"getWindowTarget",value:function(){var t=this.props.postId;return"wp-preview-".concat(t)}},{key:"openPreviewWindow",value:function(t){var e,n;(t.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}),e=this.previewWindow.document,n=Object(Br.renderToString)(Object(Br.createElement)("div",{className:"editor-post-preview-button__interstitial-message"},Object(Br.createElement)(Fr.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 96 96"},Object(Br.createElement)(Fr.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(Br.createElement)(Fr.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(Br.createElement)("p",null,Object(Z.__)("Generating preview…")))),n+='\n\t\t\n\t',n=Object(xr.applyFilters)("editor.PostPreview.interstitialMarkup",n),e.write(n),e.title=Object(Z.__)("Generating preview…"),e.close()):this.setPreviewWindowLink(t.target.href)}},{key:"render",value:function(){var t=this.props,e=t.previewLink,n=t.currentPostLink,r=t.isSaveable,o=e||n;return Object(Br.createElement)(Fr.Button,{isLarge:!0,className:"editor-post-preview",href:o,target:this.getWindowTarget(),disabled:!r,onClick:this.openPreviewWindow},Object(Z._x)("Preview","imperative verb"),Object(Br.createElement)("span",{className:"screen-reader-text"},Object(Z.__)("(opens in a new tab)")),Object(Br.createElement)(a.DotTip,{tipId:"core/editor.preview"},Object(Z.__)("Click “Preview” to load a preview of this page, so you can make sure you’re happy with your blocks.")))}}]),e}(Br.Component),Jo=Object(Hr.compose)([Object(l.withSelect)(function(t,e){var n=e.forcePreviewLink,r=e.forceIsAutosaveable,o=t("core/editor"),i=o.getCurrentPostId,s=o.getCurrentPostAttribute,a=o.getEditedPostAttribute,c=o.isEditedPostSaveable,u=o.isEditedPostAutosaveable,l=o.getEditedPostPreviewLink,d=t("core").getPostType,p=l(),h=d(a("type"));return{postId:i(),currentPostLink:s("link"),previewLink:void 0!==n?n:p,isSaveable:c(),isAutosaveable:r||u(),isViewable:Object(v.get)(h,["viewable"],!1),isDraft:-1!==["draft","auto-draft"].indexOf(a("status"))}}),Object(l.withDispatch)(function(t){return{autosave:t("core/editor").autosave,savePost:t("core/editor").savePost}}),Object(Hr.ifCondition)(function(t){return t.isViewable})])(Zo),ti=function(t){function e(){var t;return Object(Vr.a)(this,e),(t=Object(Kr.a)(this,Object(qr.a)(e).apply(this,arguments))).sendPostLock=t.sendPostLock.bind(Object(io.a)(Object(io.a)(t))),t.receivePostLock=t.receivePostLock.bind(Object(io.a)(Object(io.a)(t))),t.releasePostLock=t.releasePostLock.bind(Object(io.a)(Object(io.a)(t))),t}return Object(Wr.a)(e,t),Object(zr.a)(e,[{key:"componentDidMount",value:function(){var t=this.getHookName();Object(xr.addAction)("heartbeat.send",t,this.sendPostLock),Object(xr.addAction)("heartbeat.tick",t,this.receivePostLock)}},{key:"componentWillUnmount",value:function(){var t=this.getHookName();Object(xr.removeAction)("heartbeat.send",t),Object(xr.removeAction)("heartbeat.tick",t)}},{key:"getHookName",value:function(){return"core/editor/post-locked-modal-"+this.props.instanceId}},{key:"sendPostLock",value:function(t){var e=this.props,n=e.isLocked,r=e.activePostLock,o=e.postId;n||(t["wp-refresh-post-lock"]={lock:r,post_id:o})}},{key:"receivePostLock",value:function(t){if(t["wp-refresh-post-lock"]){var e=this.props,n=e.autosave,r=e.updatePostLock,o=t["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 t=this.props,e=t.isLocked,n=t.activePostLock,r=t.postLockUtils,o=t.postId;if(!e&&n){var i=new window.FormData;i.append("action","wp-remove-post-lock"),i.append("_wpnonce",r.unlockNonce),i.append("post_ID",o),i.append("active_post_lock",n);var s=new window.XMLHttpRequest;s.open("POST",r.ajaxUrl,!1),s.send(i)}}},{key:"render",value:function(){var t=this.props,e=t.user,n=t.postId,r=t.isLocked,o=t.isTakeover,i=t.postLockUtils,s=t.postType;if(!r)return null;var a=e.name,c=e.avatar,u=Object(O.addQueryArgs)("post.php",{"get-post-lock":"1",lockKey:!0,post:n,action:"edit",_wpnonce:i.nonce}),l=Yo("edit.php",{post_type:Object(v.get)(s,["slug"])}),d=Object(Z.__)("Exit the Editor");return Object(Br.createElement)(Fr.Modal,{title:o?Object(Z.__)("Someone else has taken over this post."):Object(Z.__)("This post is already being edited."),focusOnMount:!0,shouldCloseOnClickOutside:!1,shouldCloseOnEsc:!1,isDismissable:!1,className:"editor-post-locked-modal"},!!c&&Object(Br.createElement)("img",{src:c,alt:Object(Z.__)("Avatar"),className:"editor-post-locked-modal__avatar"}),!!o&&Object(Br.createElement)("div",null,Object(Br.createElement)("div",null,a?Object(Z.sprintf)(Object(Z.__)("%s now has editing control of this post. Don’t worry, your changes up to this moment have been saved."),a):Object(Z.__)("Another user now has editing control of this post. Don’t worry, your changes up to this moment have been saved.")),Object(Br.createElement)("div",{className:"editor-post-locked-modal__buttons"},Object(Br.createElement)(Fr.Button,{isPrimary:!0,isLarge:!0,href:l},d))),!o&&Object(Br.createElement)("div",null,Object(Br.createElement)("div",null,a?Object(Z.sprintf)(Object(Z.__)("%s is currently working on this post, which means you cannot make changes, unless you take over."),a):Object(Z.__)("Another user is currently working on this post, which means you cannot make changes, unless you take over.")),Object(Br.createElement)("div",{className:"editor-post-locked-modal__buttons"},Object(Br.createElement)(Fr.Button,{isDefault:!0,isLarge:!0,href:l},d),Object(Br.createElement)(Jo,null),Object(Br.createElement)(Fr.Button,{isPrimary:!0,isLarge:!0,href:u},Object(Z.__)("Take Over")))))}}]),e}(Br.Component),ei=Object(Hr.compose)(Object(l.withSelect)(function(t){var e=t("core/editor"),n=e.isPostLocked,r=e.isPostLockTakeover,o=e.getPostLockUser,i=e.getCurrentPostId,s=e.getActivePostLock,a=e.getEditedPostAttribute,c=e.getEditorSettings,u=t("core").getPostType;return{isLocked:n(),isTakeover:r(),user:o(),postId:i(),postLockUtils:c().postLockUtils,activePostLock:s(),postType:u(a("type"))}}),Object(l.withDispatch)(function(t){var e=t("core/editor");return{autosave:e.autosave,updatePostLock:e.updatePostLock}}),Hr.withInstanceId,Object(Hr.withGlobalEvents)({beforeunload:"releasePostLock"}))(ti);var ni=Object(Hr.compose)(Object(l.withSelect)(function(t){var e=t("core/editor"),n=e.isCurrentPostPublished,r=e.getCurrentPostType,o=e.getCurrentPost;return{hasPublishAction:Object(v.get)(o(),["_links","wp:action-publish"],!1),isPublished:n(),postType:r()}}))(function(t){var e=t.hasPublishAction,n=t.isPublished,r=t.children;return n||!e?null:r});var ri=Object(Hr.compose)(Object(l.withSelect)(function(t){return{status:t("core/editor").getEditedPostAttribute("status")}}),Object(l.withDispatch)(function(t){return{onUpdateStatus:function(e){t("core/editor").editPost({status:e})}}}))(function(t){var e=t.status,n=t.onUpdateStatus;return Object(Br.createElement)(ni,null,Object(Br.createElement)(Fr.CheckboxControl,{label:Object(Z.__)("Pending Review"),checked:"pending"===e,onChange:function(){n("pending"===e?"draft":"pending")}}))});var oi=Object(Hr.compose)([Object(l.withSelect)(function(t){return{pingStatus:t("core/editor").getEditedPostAttribute("ping_status")}}),Object(l.withDispatch)(function(t){return{editPost:t("core/editor").editPost}})])(function(t){var e=t.pingStatus,n=void 0===e?"open":e,r=Object(Dr.a)(t,["pingStatus"]);return Object(Br.createElement)(Fr.CheckboxControl,{label:Object(Z.__)("Allow Pingbacks & Trackbacks"),checked:"open"===n,onChange:function(){return r.editPost({ping_status:"open"===n?"closed":"open"})}})});var ii=Object(Hr.compose)([Object(l.withSelect)(function(t,e){var n=e.forceIsSaving,r=t("core/editor"),o=r.isCurrentPostPublished,i=r.isEditedPostBeingScheduled,s=r.isSavingPost,a=r.isPublishingPost,c=r.getCurrentPost,u=r.getCurrentPostType,l=r.isAutosavingPost;return{isPublished:o(),isBeingScheduled:i(),isSaving:n||s(),isPublishing:a(),hasPublishAction:Object(v.get)(c(),["_links","wp:action-publish"],!1),postType:u(),isAutosaving:l()}})])(function(t){var e=t.isPublished,n=t.isBeingScheduled,r=t.isSaving,o=t.isPublishing,i=t.hasPublishAction,s=t.isAutosaving;return o?Object(Z.__)("Publishing…"):e&&r&&!s?Object(Z.__)("Updating…"):n&&r&&!s?Object(Z.__)("Scheduling…"):i?e?Object(Z.__)("Update"):n?Object(Z.__)("Schedule"):Object(Z.__)("Publish"):Object(Z.__)("Submit for Review")}),si=function(t){function e(t){var n;return Object(Vr.a)(this,e),(n=Object(Kr.a)(this,Object(qr.a)(e).call(this,t))).buttonNode=Object(Br.createRef)(),n}return Object(Wr.a)(e,t),Object(zr.a)(e,[{key:"componentDidMount",value:function(){this.props.focusOnMount&&this.buttonNode.current.focus()}},{key:"render",value:function(){var t,e=this.props,n=e.forceIsDirty,r=e.forceIsSaving,o=e.hasPublishAction,i=e.isBeingScheduled,s=e.isOpen,c=e.isPostSavingLocked,u=e.isPublishable,l=e.isPublished,d=e.isSaveable,p=e.isSaving,h=e.isToggle,f=e.onSave,b=e.onStatusChange,m=e.onSubmit,O=void 0===m?v.noop:m,g=e.onToggle,y=e.visibility,j=p||r||!d||c||!u&&!n,_=l||p||r||!d||!u&&!n;t=o?i?"future":"private"===y?"private":"publish":"pending";var k={"aria-disabled":j,className:"editor-post-publish-button",isBusy:p&&l,isLarge:!0,isPrimary:!0,onClick:function(){j||(O(),b(t),f())}},E={"aria-disabled":_,"aria-expanded":s,className:"editor-post-publish-panel__toggle",isBusy:p&&l,isPrimary:!0,onClick:function(){_||g()}},S=i?Object(Z.__)("Schedule…"):Object(Z.__)("Publish…"),P=Object(Br.createElement)(ii,{forceIsSaving:r}),w=h?E:k,T=h?S:P;return Object(Br.createElement)(Fr.Button,Object(Ur.a)({ref:this.buttonNode},w),T,Object(Br.createElement)(a.DotTip,{tipId:"core/editor.publish"},Object(Z.__)("Finished writing? That’s great, let’s get this published right now. Just click “Publish” and you’re good to go.")))}}]),e}(Br.Component),ai=Object(Hr.compose)([Object(l.withSelect)(function(t){var e=t("core/editor"),n=e.isSavingPost,r=e.isEditedPostBeingScheduled,o=e.getEditedPostVisibility,i=e.isCurrentPostPublished,s=e.isEditedPostSaveable,a=e.isEditedPostPublishable,c=e.isPostSavingLocked,u=e.getCurrentPost,l=e.getCurrentPostType;return{isSaving:n(),isBeingScheduled:r(),visibility:o(),isSaveable:s(),isPostSavingLocked:c(),isPublishable:a(),isPublished:i(),hasPublishAction:Object(v.get)(u(),["_links","wp:action-publish"],!1),postType:l()}}),Object(l.withDispatch)(function(t){var e=t("core/editor"),n=e.editPost;return{onStatusChange:function(t){return n({status:t})},onSave:e.savePost}})])(si),ci=[{value:"public",label:Object(Z.__)("Public"),info:Object(Z.__)("Visible to everyone.")},{value:"private",label:Object(Z.__)("Private"),info:Object(Z.__)("Only visible to site admins and editors.")},{value:"password",label:Object(Z.__)("Password Protected"),info:Object(Z.__)("Protected with a password you choose. Only those with the password can view this post.")}],ui=function(t){function e(t){var n;return Object(Vr.a)(this,e),(n=Object(Kr.a)(this,Object(qr.a)(e).apply(this,arguments))).setPublic=n.setPublic.bind(Object(io.a)(Object(io.a)(n))),n.setPrivate=n.setPrivate.bind(Object(io.a)(Object(io.a)(n))),n.setPasswordProtected=n.setPasswordProtected.bind(Object(io.a)(Object(io.a)(n))),n.updatePassword=n.updatePassword.bind(Object(io.a)(Object(io.a)(n))),n.state={hasPassword:!!t.password},n}return Object(Wr.a)(e,t),Object(zr.a)(e,[{key:"setPublic",value:function(){var t=this.props,e=t.visibility,n=t.onUpdateVisibility,r=t.status;n("private"===e?"draft":r),this.setState({hasPassword:!1})}},{key:"setPrivate",value:function(){if(window.confirm(Object(Z.__)("Would you like to privately publish this post now?"))){var t=this.props,e=t.onUpdateVisibility,n=t.onSave;e("private"),this.setState({hasPassword:!1}),n()}}},{key:"setPasswordProtected",value:function(){var t=this.props,e=t.visibility,n=t.onUpdateVisibility,r=t.status;n("private"===e?"draft":r,t.password||""),this.setState({hasPassword:!0})}},{key:"updatePassword",value:function(t){var e=this.props,n=e.status;(0,e.onUpdateVisibility)(n,t.target.value)}},{key:"render",value:function(){var t=this.props,e=t.visibility,n=t.password,r=t.instanceId,o={public:{onSelect:this.setPublic,checked:"public"===e&&!this.state.hasPassword},private:{onSelect:this.setPrivate,checked:"private"===e},password:{onSelect:this.setPasswordProtected,checked:this.state.hasPassword}};return[Object(Br.createElement)("fieldset",{key:"visibility-selector",className:"editor-post-visibility__dialog-fieldset"},Object(Br.createElement)("legend",{className:"editor-post-visibility__dialog-legend"},Object(Z.__)("Post Visibility")),ci.map(function(t){var e=t.value,n=t.label,i=t.info;return Object(Br.createElement)("div",{key:e,className:"editor-post-visibility__choice"},Object(Br.createElement)("input",{type:"radio",name:"editor-post-visibility__setting-".concat(r),value:e,onChange:o[e].onSelect,checked:o[e].checked,id:"editor-post-".concat(e,"-").concat(r),"aria-describedby":"editor-post-".concat(e,"-").concat(r,"-description"),className:"editor-post-visibility__dialog-radio"}),Object(Br.createElement)("label",{htmlFor:"editor-post-".concat(e,"-").concat(r),className:"editor-post-visibility__dialog-label"},n),Object(Br.createElement)("p",{id:"editor-post-".concat(e,"-").concat(r,"-description"),className:"editor-post-visibility__dialog-info"},i))})),this.state.hasPassword&&Object(Br.createElement)("div",{className:"editor-post-visibility__dialog-password",key:"password-selector"},Object(Br.createElement)("label",{htmlFor:"editor-post-visibility__dialog-password-input-".concat(r),className:"screen-reader-text"},Object(Z.__)("Create password")),Object(Br.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(Z.__)("Use a secure password")}))]}}]),e}(Br.Component),li=Object(Hr.compose)([Object(l.withSelect)(function(t){var e=t("core/editor"),n=e.getEditedPostAttribute,r=e.getEditedPostVisibility;return{status:n("status"),visibility:r(),password:n("password")}}),Object(l.withDispatch)(function(t){var e=t("core/editor"),n=e.savePost,r=e.editPost;return{onSave:n,onUpdateVisibility:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;r({status:t,password:e})}}}),Hr.withInstanceId])(ui);var di=Object(l.withSelect)(function(t){return{visibility:t("core/editor").getEditedPostVisibility()}})(function(t){var e=t.visibility;return Object(v.find)(ci,{value:e}).label});var pi=Object(Hr.compose)([Object(l.withSelect)(function(t){return{date:t("core/editor").getEditedPostAttribute("date")}}),Object(l.withDispatch)(function(t){return{onUpdateDate:function(e){t("core/editor").editPost({date:e})}}})])(function(t){var e=t.date,n=t.onUpdateDate,r=Object(me.__experimentalGetSettings)(),o=/a(?!\\)/i.test(r.formats.time.toLowerCase().replace(/\\\\/g,"").split("").reverse().join(""));return Object(Br.createElement)(Fr.DateTimePicker,{key:"date-time-picker",currentDate:e,onChange:n,is12Hour:o})});var hi=Object(l.withSelect)(function(t){return{date:t("core/editor").getEditedPostAttribute("date"),isFloating:t("core/editor").isEditedPostDateFloating()}})(function(t){var e=t.date,n=t.isFloating,r=Object(me.__experimentalGetSettings)();return e&&!n?Object(me.dateI18n)(r.formats.datetimeAbbreviated,e):Object(Z.__)("Immediately")}),fi={per_page:-1,orderby:"count",order:"desc",_fields:"id,name"},bi=function(t,e){return t.toLowerCase()===e.toLowerCase()},mi=function(t){return Object(h.a)({},t,{name:Object(v.unescape)(t.name)})},vi=function(t){return Object(v.map)(t,mi)},Oi=function(t){function e(){var t;return Object(Vr.a)(this,e),(t=Object(Kr.a)(this,Object(qr.a)(e).apply(this,arguments))).onChange=t.onChange.bind(Object(io.a)(Object(io.a)(t))),t.searchTerms=Object(v.throttle)(t.searchTerms.bind(Object(io.a)(Object(io.a)(t))),500),t.findOrCreateTerm=t.findOrCreateTerm.bind(Object(io.a)(Object(io.a)(t))),t.state={loading:!Object(v.isEmpty)(t.props.terms),availableTerms:[],selectedTerms:[]},t}return Object(Wr.a)(e,t),Object(zr.a)(e,[{key:"componentDidMount",value:function(){var t=this;Object(v.isEmpty)(this.props.terms)||(this.initRequest=this.fetchTerms({include:this.props.terms.join(","),per_page:-1}),this.initRequest.then(function(){t.setState({loading:!1})},function(e){"abort"!==e.statusText&&t.setState({loading:!1})}))}},{key:"componentWillUnmount",value:function(){Object(v.invoke)(this.initRequest,["abort"]),Object(v.invoke)(this.searchRequest,["abort"])}},{key:"componentDidUpdate",value:function(t){t.terms!==this.props.terms&&this.updateSelectedTerms(this.props.terms)}},{key:"fetchTerms",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=this.props.taxonomy,r=Object(h.a)({},fi,e),o=H()({path:Object(O.addQueryArgs)("/wp/v2/".concat(n.rest_base),r)});return o.then(vi).then(function(e){t.setState(function(t){return{availableTerms:t.availableTerms.concat(e.filter(function(e){return!Object(v.find)(t.availableTerms,function(t){return t.id===e.id})}))}}),t.updateSelectedTerms(t.props.terms)}),o}},{key:"updateSelectedTerms",value:function(){var t=this,e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).reduce(function(e,n){var r=Object(v.find)(t.state.availableTerms,function(t){return t.id===n});return r&&e.push(r.name),e},[]);this.setState({selectedTerms:e})}},{key:"findOrCreateTerm",value:function(t){var e=this,n=this.props.taxonomy,r=Object(v.escape)(t);return H()({path:"/wp/v2/".concat(n.rest_base),method:"POST",data:{name:r}}).catch(function(o){return"term_exists"===o.code?(e.addRequest=H()({path:Object(O.addQueryArgs)("/wp/v2/".concat(n.rest_base),Object(h.a)({},fi,{search:r}))}).then(vi),e.addRequest.then(function(e){return Object(v.find)(e,function(e){return bi(e.name,t)})})):Promise.reject(o)}).then(mi)}},{key:"onChange",value:function(t){var e=this,n=Object(v.uniqBy)(t,function(t){return t.toLowerCase()});this.setState({selectedTerms:n});var r=n.filter(function(t){return!Object(v.find)(e.state.availableTerms,function(e){return bi(e.name,t)})}),o=function(t,e){return t.map(function(t){return Object(v.find)(e,function(e){return bi(e.name,t)}).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(t){var r=e.state.availableTerms.concat(t);return e.setState({availableTerms:r}),e.props.onUpdateTerms(o(n,r),e.props.taxonomy.rest_base)})}},{key:"searchTerms",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";Object(v.invoke)(this.searchRequest,["abort"]),this.searchRequest=this.fetchTerms({search:t})}},{key:"render",value:function(){var t=this.props,e=t.slug,n=t.taxonomy;if(!t.hasAssignAction)return null;var r=this.state,o=r.loading,i=r.availableTerms,s=r.selectedTerms,a=i.map(function(t){return t.name}),c=Object(v.get)(n,["labels","add_new_item"],"post_tag"===e?Object(Z.__)("Add New Tag"):Object(Z.__)("Add New Term")),u=Object(v.get)(n,["labels","singular_name"],"post_tag"===e?Object(Z.__)("Tag"):Object(Z.__)("Term")),l=Object(Z.sprintf)(Object(Z._x)("%s added","term"),u),d=Object(Z.sprintf)(Object(Z._x)("%s removed","term"),u),p=Object(Z.sprintf)(Object(Z._x)("Remove %s","term"),u);return Object(Br.createElement)(Fr.FormTokenField,{value:s,suggestions:a,onChange:this.onChange,onInputChange:this.searchTerms,maxSuggestions:20,disabled:o,label:c,messages:{added:l,removed:d,remove:p}})}}]),e}(Br.Component),gi=Object(Hr.compose)(Object(l.withSelect)(function(t,e){var n=e.slug,r=t("core/editor").getCurrentPost,o=(0,t("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?t("core/editor").getEditedPostAttribute(o.rest_base):[],taxonomy:o}}),Object(l.withDispatch)(function(t){return{onUpdateTerms:function(e,n){t("core/editor").editPost(Object(p.a)({},n,e))}}}),Object(Fr.withFilters)("editor.PostTaxonomyType"))(Oi),yi=function(){var t=[Object(Z.__)("Suggestion:"),Object(Br.createElement)("span",{className:"editor-post-publish-panel__link",key:"label"},Object(Z.__)("Add tags"))];return Object(Br.createElement)(Fr.PanelBody,{initialOpen:!1,title:t},Object(Br.createElement)("p",null,Object(Z.__)("Tags help users and search engines navigate your site and find your content. Add a few keywords to describe your post.")),Object(Br.createElement)(gi,{slug:"post_tag"}))},ji=function(t){function e(t){var n;return Object(Vr.a)(this,e),(n=Object(Kr.a)(this,Object(qr.a)(e).call(this,t))).state={hadTagsWhenOpeningThePanel:t.hasTags},n}return Object(Wr.a)(e,t),Object(zr.a)(e,[{key:"render",value:function(){return this.state.hadTagsWhenOpeningThePanel?null:Object(Br.createElement)(yi,null)}}]),e}(Br.Component),_i=Object(Hr.compose)(Object(l.withSelect)(function(t){var e=t("core/editor").getCurrentPostType(),n=t("core").getTaxonomy("post_tag"),r=n&&t("core/editor").getEditedPostAttribute(n.rest_base);return{areTagsFetched:void 0!==n,isPostTypeSupported:n&&Object(v.some)(n.types,function(t){return t===e}),hasTags:r&&r.length}}),Object(Hr.ifCondition)(function(t){var e=t.areTagsFetched;return t.isPostTypeSupported&&e}))(ji),ki=function(t){var e=t.suggestedPostFormat,n=t.suggestionText,r=t.onUpdatePostFormat;return Object(Br.createElement)(Fr.Button,{isLink:!0,onClick:function(){return r(e)}},n)},Ei=function(t,e){var n=Ho.filter(function(e){return Object(v.includes)(t,e.id)});return Object(v.find)(n,function(t){return t.id===e})},Si=Object(Hr.compose)(Object(l.withSelect)(function(t){var e=t("core/editor"),n=e.getEditedPostAttribute,r=e.getSuggestedPostFormat,o=Object(v.get)(t("core").getThemeSupports(),["formats"],[]);return{currentPostFormat:n("format"),suggestion:Ei(o,r())}}),Object(l.withDispatch)(function(t){return{onUpdatePostFormat:function(e){t("core/editor").editPost({format:e})}}}),Object(Hr.ifCondition)(function(t){var e=t.suggestion,n=t.currentPostFormat;return e&&e.id!==n}))(function(t){var e=t.suggestion,n=t.onUpdatePostFormat,r=[Object(Z.__)("Suggestion:"),Object(Br.createElement)("span",{className:"editor-post-publish-panel__link",key:"label"},Object(Z.__)("Use a post format"))];return Object(Br.createElement)(Fr.PanelBody,{initialOpen:!1,title:r},Object(Br.createElement)("p",null,Object(Z.__)("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(Br.createElement)("p",null,Object(Br.createElement)(ki,{onUpdatePostFormat:n,suggestedPostFormat:e.id,suggestionText:Object(Z.sprintf)(Object(Z.__)('Apply the "%1$s" format.'),e.caption)})))});var Pi=Object(l.withSelect)(function(t){var e=t("core/editor"),n=e.getCurrentPost,r=e.isEditedPostBeingScheduled;return{hasPublishAction:Object(v.get)(n(),["_links","wp:action-publish"],!1),isBeingScheduled:r()}})(function(t){var e,n,r=t.hasPublishAction,o=t.isBeingScheduled,i=t.children;return r?o?(e=Object(Z.__)("Are you ready to schedule?"),n=Object(Z.__)("Your work will be published at the specified date and time.")):(e=Object(Z.__)("Are you ready to publish?"),n=Object(Z.__)("Double-check your settings before publishing.")):(e=Object(Z.__)("Are you ready to submit for review?"),n=Object(Z.__)("When you’re ready, submit your work for review, and an Editor will be able to approve it for you.")),Object(Br.createElement)("div",{className:"editor-post-publish-panel__prepublish"},Object(Br.createElement)("div",null,Object(Br.createElement)("strong",null,e)),Object(Br.createElement)("p",null,n),r&&Object(Br.createElement)(Br.Fragment,null,Object(Br.createElement)(Fr.PanelBody,{initialOpen:!1,title:[Object(Z.__)("Visibility:"),Object(Br.createElement)("span",{className:"editor-post-publish-panel__link",key:"label"},Object(Br.createElement)(di,null))]},Object(Br.createElement)(li,null)),Object(Br.createElement)(Fr.PanelBody,{initialOpen:!1,title:[Object(Z.__)("Publish:"),Object(Br.createElement)("span",{className:"editor-post-publish-panel__link",key:"label"},Object(Br.createElement)(hi,null))]},Object(Br.createElement)(pi,null)),Object(Br.createElement)(Si,null),Object(Br.createElement)(_i,null),i))}),wi=function(t){function e(){var t;return Object(Vr.a)(this,e),(t=Object(Kr.a)(this,Object(qr.a)(e).apply(this,arguments))).state={showCopyConfirmation:!1},t.onCopy=t.onCopy.bind(Object(io.a)(Object(io.a)(t))),t.onSelectInput=t.onSelectInput.bind(Object(io.a)(Object(io.a)(t))),t.postLink=Object(Br.createRef)(),t}return Object(Wr.a)(e,t),Object(zr.a)(e,[{key:"componentDidMount",value:function(){this.props.focusOnMount&&this.postLink.current.focus()}},{key:"componentWillUnmount",value:function(){clearTimeout(this.dismissCopyConfirmation)}},{key:"onCopy",value:function(){var t=this;this.setState({showCopyConfirmation:!0}),clearTimeout(this.dismissCopyConfirmation),this.dismissCopyConfirmation=setTimeout(function(){t.setState({showCopyConfirmation:!1})},4e3)}},{key:"onSelectInput",value:function(t){t.target.select()}},{key:"render",value:function(){var t=this.props,e=t.children,n=t.isScheduled,r=t.post,o=t.postType,i=Object(v.get)(o,["labels","singular_name"]),s=Object(v.get)(o,["labels","view_item"]),a=n?Object(Br.createElement)(Br.Fragment,null,Object(Z.__)("is now scheduled. It will go live on")," ",Object(Br.createElement)(hi,null),"."):Object(Z.__)("is now live.");return Object(Br.createElement)("div",{className:"post-publish-panel__postpublish"},Object(Br.createElement)(Fr.PanelBody,{className:"post-publish-panel__postpublish-header"},Object(Br.createElement)("a",{ref:this.postLink,href:r.link},r.title||Object(Z.__)("(no title)"))," ",a),Object(Br.createElement)(Fr.PanelBody,null,Object(Br.createElement)("p",{className:"post-publish-panel__postpublish-subheader"},Object(Br.createElement)("strong",null,Object(Z.__)("What’s next?"))),Object(Br.createElement)(Fr.TextControl,{className:"post-publish-panel__postpublish-post-address",readOnly:!0,label:Object(Z.sprintf)(Object(Z.__)("%s address"),i),value:Object(O.safeDecodeURIComponent)(r.link),onFocus:this.onSelectInput}),Object(Br.createElement)("div",{className:"post-publish-panel__postpublish-buttons"},!n&&Object(Br.createElement)(Fr.Button,{isDefault:!0,href:r.link},s),Object(Br.createElement)(Fr.ClipboardButton,{isDefault:!0,text:r.link,onCopy:this.onCopy},this.state.showCopyConfirmation?Object(Z.__)("Copied!"):Object(Z.__)("Copy Link")))),e)}}]),e}(Br.Component),Ti=Object(l.withSelect)(function(t){var e=t("core/editor"),n=e.getEditedPostAttribute,r=e.getCurrentPost,o=e.isCurrentPostScheduled,i=t("core").getPostType;return{post:r(),postType:i(n("type")),isScheduled:o()}})(wi),Ci=function(t){function e(){var t;return Object(Vr.a)(this,e),(t=Object(Kr.a)(this,Object(qr.a)(e).apply(this,arguments))).onSubmit=t.onSubmit.bind(Object(io.a)(Object(io.a)(t))),t}return Object(Wr.a)(e,t),Object(zr.a)(e,[{key:"componentDidUpdate",value:function(t){t.isPublished&&!this.props.isSaving&&this.props.isDirty&&this.props.onClose()}},{key:"onSubmit",value:function(){var t=this.props,e=t.onClose,n=t.hasPublishAction,r=t.isPostTypeViewable;n&&r||e()}},{key:"render",value:function(){var t=this.props,e=t.forceIsDirty,n=t.forceIsSaving,r=t.isBeingScheduled,o=t.isPublished,i=t.isPublishSidebarEnabled,s=t.isScheduled,a=t.isSaving,c=t.onClose,u=t.onTogglePublishSidebar,l=t.PostPublishExtension,d=t.PrePublishExtension,p=Object(Dr.a)(t,["forceIsDirty","forceIsSaving","isBeingScheduled","isPublished","isPublishSidebarEnabled","isScheduled","isSaving","onClose","onTogglePublishSidebar","PostPublishExtension","PrePublishExtension"]),h=Object(v.omit)(p,["hasPublishAction","isDirty","isPostTypeViewable"]),f=o||s&&r,b=!f&&!a,m=f&&!a;return Object(Br.createElement)("div",Object(Ur.a)({className:"editor-post-publish-panel"},h),Object(Br.createElement)("div",{className:"editor-post-publish-panel__header"},m?Object(Br.createElement)("div",{className:"editor-post-publish-panel__header-published"},s?Object(Z.__)("Scheduled"):Object(Z.__)("Published")):Object(Br.createElement)("div",{className:"editor-post-publish-panel__header-publish-button"},Object(Br.createElement)(ai,{focusOnMount:!0,onSubmit:this.onSubmit,forceIsDirty:e,forceIsSaving:n}),Object(Br.createElement)("span",{className:"editor-post-publish-panel__spacer"})),Object(Br.createElement)(Fr.IconButton,{"aria-expanded":!0,onClick:c,icon:"no-alt",label:Object(Z.__)("Close panel")})),Object(Br.createElement)("div",{className:"editor-post-publish-panel__content"},b&&Object(Br.createElement)(Pi,null,d&&Object(Br.createElement)(d,null)),m&&Object(Br.createElement)(Ti,{focusOnMount:!0},l&&Object(Br.createElement)(l,null)),a&&Object(Br.createElement)(Fr.Spinner,null)),Object(Br.createElement)("div",{className:"editor-post-publish-panel__footer"},Object(Br.createElement)(Fr.CheckboxControl,{label:Object(Z.__)("Always show pre-publish checks."),checked:i,onChange:u})))}}]),e}(Br.Component),xi=Object(Hr.compose)([Object(l.withSelect)(function(t){var e=t("core").getPostType,n=t("core/editor"),r=n.getCurrentPost,o=n.getEditedPostAttribute,i=n.isCurrentPostPublished,s=n.isCurrentPostScheduled,a=n.isEditedPostBeingScheduled,c=n.isEditedPostDirty,u=n.isSavingPost,l=t("core/editor").isPublishSidebarEnabled,d=e(o("type"));return{hasPublishAction:Object(v.get)(r(),["_links","wp:action-publish"],!1),isPostTypeViewable:Object(v.get)(d,["viewable"],!1),isBeingScheduled:a(),isDirty:c(),isPublished:i(),isPublishSidebarEnabled:l(),isSaving:u(),isScheduled:s()}}),Object(l.withDispatch)(function(t,e){var n=e.isPublishSidebarEnabled,r=t("core/editor"),o=r.disablePublishSidebar,i=r.enablePublishSidebar;return{onTogglePublishSidebar:function(){n?o():i()}}}),Fr.withFocusReturn,Fr.withConstrainedTabbing])(Ci);var Bi=Object(Hr.compose)([Object(l.withSelect)(function(t){var e=t("core/editor"),n=e.isSavingPost,r=e.isCurrentPostPublished,o=e.isCurrentPostScheduled;return{isSaving:n(),isPublished:r(),isScheduled:o()}}),Object(l.withDispatch)(function(t){var e=t("core/editor"),n=e.editPost,r=e.savePost;return{onClick:function(){n({status:"draft"}),r()}}})])(function(t){var e=t.isSaving,n=t.isPublished,r=t.isScheduled,o=t.onClick;return n||r?Object(Br.createElement)(Fr.Button,{className:"editor-post-switch-to-draft",onClick:function(){var t;n?t=Object(Z.__)("Are you sure you want to unpublish this post?"):r&&(t=Object(Z.__)("Are you sure you want to unschedule this post?")),window.confirm(t)&&o()},disabled:e,isTertiary:!0},Object(Z.__)("Switch to Draft")):null}),Ai=function(t){function e(){var t;return Object(Vr.a)(this,e),(t=Object(Kr.a)(this,Object(qr.a)(e).apply(this,arguments))).state={forceSavedMessage:!1},t}return Object(Wr.a)(e,t),Object(zr.a)(e,[{key:"componentDidUpdate",value:function(t){var e=this;t.isSaving&&!this.props.isSaving&&(this.setState({forceSavedMessage:!0}),this.props.setTimeout(function(){e.setState({forceSavedMessage:!1})},1e3))}},{key:"render",value:function(){var t=this.props,e=t.post,n=t.isNew,r=t.isScheduled,o=t.isPublished,i=t.isDirty,s=t.isSaving,a=t.isSaveable,c=t.onSave,u=t.isAutosaving,l=t.isPending,d=t.isLargeViewport,p=this.state.forceSavedMessage;if(s){var h=$r()("editor-post-saved-state","is-saving",{"is-autosaving":u});return Object(Br.createElement)("span",{className:h},Object(Br.createElement)(Fr.Dashicon,{icon:"cloud"}),u?Object(Z.__)("Autosaving"):Object(Z.__)("Saving"))}if(o||r)return Object(Br.createElement)(Bi,null);if(!a)return null;if(p||!n&&!i)return Object(Br.createElement)("span",{className:"editor-post-saved-state is-saved"},Object(Br.createElement)(Fr.Dashicon,{icon:"saved"}),Object(Z.__)("Saved"));if(!Object(v.get)(e,["_links","wp:action-publish"],!1)&&l)return null;var f=l?Object(Z.__)("Save as Pending"):Object(Z.__)("Save Draft");return d?Object(Br.createElement)(Fr.Button,{className:"editor-post-save-draft",onClick:c,shortcut:so.displayShortcut.primary("s"),isTertiary:!0},f):Object(Br.createElement)(Fr.IconButton,{className:"editor-post-save-draft",label:f,onClick:c,shortcut:so.displayShortcut.primary("s"),icon:"cloud-upload"})}}]),e}(Br.Component),Ii=Object(Hr.compose)([Object(l.withSelect)(function(t,e){var n=e.forceIsDirty,r=e.forceIsSaving,o=t("core/editor"),i=o.isEditedPostNew,s=o.isCurrentPostPublished,a=o.isCurrentPostScheduled,c=o.isEditedPostDirty,u=o.isSavingPost,l=o.isEditedPostSaveable,d=o.getCurrentPost,p=o.isAutosavingPost,h=o.getEditedPostAttribute;return{post:d(),isNew:i(),isPublished:s(),isScheduled:a(),isDirty:n||c(),isSaving:r||u(),isSaveable:l(),isAutosaving:p(),isPending:"pending"===h("status")}}),Object(l.withDispatch)(function(t){return{onSave:t("core/editor").savePost}}),Hr.withSafeTimeout,Object(u.withViewportMatch)({isLargeViewport:"medium"})])(Ai);var Li=Object(Hr.compose)([Object(l.withSelect)(function(t){var e=t("core/editor"),n=e.getCurrentPost,r=e.getCurrentPostType;return{hasPublishAction:Object(v.get)(n(),["_links","wp:action-publish"],!1),postType:r()}})])(function(t){var e=t.hasPublishAction,n=t.children;return e?n:null});var Ri=Object(Hr.compose)([Object(l.withSelect)(function(t){var e=t("core/editor").getCurrentPost();return{hasStickyAction:Object(v.get)(e,["_links","wp:action-sticky"],!1),postType:t("core/editor").getCurrentPostType()}})])(function(t){var e=t.hasStickyAction,n=t.postType,r=t.children;return"post"===n&&e?r:null});var Ni=Object(Hr.compose)([Object(l.withSelect)(function(t){return{postSticky:t("core/editor").getEditedPostAttribute("sticky")}}),Object(l.withDispatch)(function(t){return{onUpdateSticky:function(e){t("core/editor").editPost({sticky:e})}}})])(function(t){var e=t.onUpdateSticky,n=t.postSticky,r=void 0!==n&&n;return Object(Br.createElement)(Ri,null,Object(Br.createElement)(Fr.CheckboxControl,{label:Object(Z.__)("Stick to the top of the blog"),checked:r,onChange:function(){return e(!r)}}))}),Ui={per_page:-1,orderby:"name",order:"asc",_fields:"id,name,parent"},Di=function(t){function e(){var t;return Object(Vr.a)(this,e),(t=Object(Kr.a)(this,Object(qr.a)(e).apply(this,arguments))).findTerm=t.findTerm.bind(Object(io.a)(Object(io.a)(t))),t.onChange=t.onChange.bind(Object(io.a)(Object(io.a)(t))),t.onChangeFormName=t.onChangeFormName.bind(Object(io.a)(Object(io.a)(t))),t.onChangeFormParent=t.onChangeFormParent.bind(Object(io.a)(Object(io.a)(t))),t.onAddTerm=t.onAddTerm.bind(Object(io.a)(Object(io.a)(t))),t.onToggleForm=t.onToggleForm.bind(Object(io.a)(Object(io.a)(t))),t.setFilterValue=t.setFilterValue.bind(Object(io.a)(Object(io.a)(t))),t.sortBySelected=t.sortBySelected.bind(Object(io.a)(Object(io.a)(t))),t.state={loading:!0,availableTermsTree:[],availableTerms:[],adding:!1,formName:"",formParent:"",showForm:!1,filterValue:"",filteredTermsTree:[]},t}return Object(Wr.a)(e,t),Object(zr.a)(e,[{key:"onChange",value:function(t){var e=this.props,n=e.onUpdateTerms,r=e.terms,o=void 0===r?[]:r,i=e.taxonomy,s=parseInt(t.target.value,10);n(-1!==o.indexOf(s)?Object(v.without)(o,s):[].concat(Object(x.a)(o),[s]),i.rest_base)}},{key:"onChangeFormName",value:function(t){var e=""===t.target.value.trim()?"":t.target.value;this.setState({formName:e})}},{key:"onChangeFormParent",value:function(t){this.setState({formParent:t})}},{key:"onToggleForm",value:function(){this.setState(function(t){return{showForm:!t.showForm}})}},{key:"findTerm",value:function(t,e,n){return Object(v.find)(t,function(t){return(!t.parent&&!e||parseInt(t.parent)===parseInt(e))&&t.name.toLowerCase()===n.toLowerCase()})}},{key:"onAddTerm",value:function(t){var e=this;t.preventDefault();var n=this.props,r=n.onUpdateTerms,o=n.taxonomy,i=n.terms,s=n.slug,a=this.state,c=a.formName,u=a.formParent,l=a.adding,d=a.availableTerms;if(""!==c&&!l){var p=this.findTerm(d,u,c);if(p)return Object(v.some)(i,function(t){return t===p.id})||r([].concat(Object(x.a)(i),[p.id]),o.rest_base),void this.setState({formName:"",formParent:""});this.setState({adding:!0}),this.addRequest=H()({path:"/wp/v2/".concat(o.rest_base),method:"POST",data:{name:c,parent:u||void 0}}),this.addRequest.catch(function(t){return"term_exists"===t.code?(e.addRequest=H()({path:Object(O.addQueryArgs)("/wp/v2/".concat(o.rest_base),Object(h.a)({},Ui,{parent:u||0,search:c}))}),e.addRequest.then(function(t){return e.findTerm(t,u,c)})):Promise.reject(t)}).then(function(t){var n=!!Object(v.find)(e.state.availableTerms,function(e){return e.id===t.id})?e.state.availableTerms:[t].concat(Object(x.a)(e.state.availableTerms)),a=Object(Z.sprintf)(Object(Z._x)("%s added","term"),Object(v.get)(e.props.taxonomy,["labels","singular_name"],"category"===s?Object(Z.__)("Category"):Object(Z.__)("Term")));e.props.speak(a,"assertive"),e.addRequest=null,e.setState({adding:!1,formName:"",formParent:"",availableTerms:n,availableTermsTree:e.sortBySelected(So(n))}),r([].concat(Object(x.a)(i),[t.id]),o.rest_base)},function(t){"abort"!==t.statusText&&(e.addRequest=null,e.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(t){this.props.taxonomy!==t.taxonomy&&this.fetchTerms()}},{key:"fetchTerms",value:function(){var t=this,e=this.props.taxonomy;e&&(this.fetchRequest=H()({path:Object(O.addQueryArgs)("/wp/v2/".concat(e.rest_base),Ui)}),this.fetchRequest.then(function(e){var n=t.sortBySelected(So(e));t.fetchRequest=null,t.setState({loading:!1,availableTermsTree:n,availableTerms:e})},function(e){"abort"!==e.statusText&&(t.fetchRequest=null,t.setState({loading:!1}))}))}},{key:"sortBySelected",value:function(t){var e=this.props.terms,n=function t(n){return-1!==e.indexOf(n.id)||void 0!==n.children&&!!(n.children.map(t).filter(function(t){return t}).length>0)};return t.sort(function(t,e){var r=n(t),o=n(e);return r===o?0:r&&!o?-1:!r&&o?1:0}),t}},{key:"setFilterValue",value:function(t){var e=this.state.availableTermsTree,n=t.target.value,r=e.map(this.getFilterMatcher(n)).filter(function(t){return t});this.setState({filterValue:n,filteredTermsTree:r});var o=function t(e){for(var n=0,r=0;r0&&(r.children=r.children.map(e).filter(function(t){return t})),(-1!==r.name.toLowerCase().indexOf(t)||r.children.length>0)&&r}}},{key:"renderTerms",value:function(t){var e=this,n=this.props.terms,r=void 0===n?[]:n;return t.map(function(t){var n="editor-post-taxonomies-hierarchical-term-".concat(t.id);return Object(Br.createElement)("div",{key:t.id,className:"editor-post-taxonomies__hierarchical-terms-choice"},Object(Br.createElement)("input",{id:n,className:"editor-post-taxonomies__hierarchical-terms-input",type:"checkbox",checked:-1!==r.indexOf(t.id),value:t.id,onChange:e.onChange}),Object(Br.createElement)("label",{htmlFor:n},Object(v.unescape)(t.name)),!!t.children.length&&Object(Br.createElement)("div",{className:"editor-post-taxonomies__hierarchical-terms-subchoices"},e.renderTerms(t.children)))})}},{key:"render",value:function(){var t=this.props,e=t.slug,n=t.taxonomy,r=t.instanceId,o=t.hasCreateAction;if(!t.hasAssignAction)return null;var i=this.state,s=i.availableTermsTree,a=i.availableTerms,c=i.filteredTermsTree,u=i.formName,l=i.formParent,d=i.loading,p=i.showForm,h=i.filterValue,f=function(t,r,o){return Object(v.get)(n,["labels",t],"category"===e?r:o)},b=f("add_new_item",Object(Z.__)("Add new category"),Object(Z.__)("Add new term")),m=f("new_item_name",Object(Z.__)("Add new category"),Object(Z.__)("Add new term")),O=f("parent_item",Object(Z.__)("Parent Category"),Object(Z.__)("Parent Term")),g="— ".concat(O," —"),y=b,j="editor-post-taxonomies__hierarchical-terms-input-".concat(r),_="editor-post-taxonomies__hierarchical-terms-filter-".concat(r),k=Object(v.get)(this.props.taxonomy,["labels","search_items"],Object(Z.__)("Search Terms")),E=Object(v.get)(this.props.taxonomy,["name"],Object(Z.__)("Terms")),S=a.length>=8;return[S&&Object(Br.createElement)("label",{key:"filter-label",htmlFor:_},k),S&&Object(Br.createElement)("input",{type:"search",id:_,value:h,onChange:this.setFilterValue,className:"editor-post-taxonomies__hierarchical-terms-filter",key:"term-filter-input"}),Object(Br.createElement)("div",{className:"editor-post-taxonomies__hierarchical-terms-list",key:"term-list",tabIndex:"0",role:"group","aria-label":E},this.renderTerms(""!==h?c:s)),!d&&o&&Object(Br.createElement)(Fr.Button,{key:"term-add-button",onClick:this.onToggleForm,className:"editor-post-taxonomies__hierarchical-terms-add","aria-expanded":p,isLink:!0},b),p&&Object(Br.createElement)("form",{onSubmit:this.onAddTerm,key:"hierarchical-terms-form"},Object(Br.createElement)("label",{htmlFor:j,className:"editor-post-taxonomies__hierarchical-terms-label"},m),Object(Br.createElement)("input",{type:"text",id:j,className:"editor-post-taxonomies__hierarchical-terms-input",value:u,onChange:this.onChangeFormName,required:!0}),!!a.length&&Object(Br.createElement)(Fr.TreeSelect,{label:O,noOptionLabel:g,onChange:this.onChangeFormParent,selectedId:l,tree:s}),Object(Br.createElement)(Fr.Button,{isDefault:!0,type:"submit",className:"editor-post-taxonomies__hierarchical-terms-submit"},y))]}}]),e}(Br.Component),Fi=Object(Hr.compose)([Object(l.withSelect)(function(t,e){var n=e.slug,r=t("core/editor").getCurrentPost,o=(0,t("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?t("core/editor").getEditedPostAttribute(o.rest_base):[],taxonomy:o}}),Object(l.withDispatch)(function(t){return{onUpdateTerms:function(e,n){t("core/editor").editPost(Object(p.a)({},n,e))}}}),Fr.withSpokenMessages,Hr.withInstanceId,Object(Fr.withFilters)("editor.PostTaxonomyType")])(Di);var Mi=Object(Hr.compose)([Object(l.withSelect)(function(t){return{postType:t("core/editor").getCurrentPostType(),taxonomies:t("core").getTaxonomies({per_page:-1})}})])(function(t){var e=t.postType,n=t.taxonomies,r=t.taxonomyWrapper,o=void 0===r?v.identity:r,i=Object(v.filter)(n,function(t){return Object(v.includes)(t.types,e)});return Object(v.filter)(i,function(t){return t.visibility.show_ui}).map(function(t){var e=t.hierarchical?Fi:gi;return Object(Br.createElement)(Br.Fragment,{key:"taxonomy-".concat(t.slug)},o(Object(Br.createElement)(e,{slug:t.slug}),t))})});var Vi=Object(Hr.compose)([Object(l.withSelect)(function(t){return{postType:t("core/editor").getCurrentPostType(),taxonomies:t("core").getTaxonomies({per_page:-1})}})])(function(t){var e=t.postType,n=t.taxonomies,r=t.children;return Object(v.some)(n,function(t){return Object(v.includes)(t.types,e)})?r:null}),zi=n(61),Ki=n.n(zi),qi=function(t){function e(){var t;return Object(Vr.a)(this,e),(t=Object(Kr.a)(this,Object(qr.a)(e).apply(this,arguments))).edit=t.edit.bind(Object(io.a)(Object(io.a)(t))),t.stopEditing=t.stopEditing.bind(Object(io.a)(Object(io.a)(t))),t.state={},t}return Object(Wr.a)(e,t),Object(zr.a)(e,[{key:"edit",value:function(t){var e=t.target.value;this.props.onChange(e),this.setState({value:e,isDirty:!0})}},{key:"stopEditing",value:function(){this.state.isDirty&&(this.props.onPersist(this.state.value),this.setState({isDirty:!1}))}},{key:"render",value:function(){var t=this.state.value,e=this.props.instanceId;return Object(Br.createElement)(Br.Fragment,null,Object(Br.createElement)("label",{htmlFor:"post-content-".concat(e),className:"screen-reader-text"},Object(Z.__)("Type text or HTML")),Object(Br.createElement)(Ki.a,{autoComplete:"off",dir:"auto",value:t,onChange:this.edit,onBlur:this.stopEditing,className:"editor-post-text-editor",id:"post-content-".concat(e),placeholder:Object(Z.__)("Start writing with text or HTML")}))}}],[{key:"getDerivedStateFromProps",value:function(t,e){return e.isDirty?null:{value:t.value,isDirty:!1}}}]),e}(Br.Component),Wi=Object(Hr.compose)([Object(l.withSelect)(function(t){return{value:(0,t("core/editor").getEditedPostContent)()}}),Object(l.withDispatch)(function(t){var e=t("core/editor"),n=e.editPost,r=e.resetEditorBlocks;return{onChange:function(t){n({content:t})},onPersist:function(t){var e=Object(s.parse)(t);r(e)}}}),Hr.withInstanceId])(qi),Hi=n(57),Gi=function(t){function e(t){var n,r=t.permalinkParts,o=t.slug;return Object(Vr.a)(this,e),(n=Object(Kr.a)(this,Object(qr.a)(e).apply(this,arguments))).state={editedPostName:o||r.postName},n.onSavePermalink=n.onSavePermalink.bind(Object(io.a)(Object(io.a)(n))),n}return Object(Wr.a)(e,t),Object(zr.a)(e,[{key:"onSavePermalink",value:function(t){var e=$o(this.state.editedPostName);t.preventDefault(),this.props.onSave(),e!==this.props.postName&&(this.props.editPost({slug:e}),this.setState({editedPostName:e}))}},{key:"render",value:function(){var t=this,e=this.props.permalinkParts,n=e.prefix,r=e.suffix,o=this.state.editedPostName;return Object(Br.createElement)("form",{className:"editor-post-permalink-editor",onSubmit:this.onSavePermalink},Object(Br.createElement)("span",{className:"editor-post-permalink__editor-container"},Object(Br.createElement)("span",{className:"editor-post-permalink-editor__prefix"},n),Object(Br.createElement)("input",{className:"editor-post-permalink-editor__edit","aria-label":Object(Z.__)("Edit post permalink"),value:o,onChange:function(e){return t.setState({editedPostName:e.target.value})},type:"text",autoFocus:!0}),Object(Br.createElement)("span",{className:"editor-post-permalink-editor__suffix"},r),"‎"),Object(Br.createElement)(Fr.Button,{className:"editor-post-permalink-editor__save",isLarge:!0,onClick:this.onSavePermalink},Object(Z.__)("Save")))}}]),e}(Br.Component),Qi=Object(Hr.compose)([Object(l.withSelect)(function(t){return{permalinkParts:(0,t("core/editor").getPermalinkParts)()}}),Object(l.withDispatch)(function(t){return{editPost:t("core/editor").editPost}})])(Gi),Yi=function(t){function e(){var t;return Object(Vr.a)(this,e),(t=Object(Kr.a)(this,Object(qr.a)(e).apply(this,arguments))).addVisibilityCheck=t.addVisibilityCheck.bind(Object(io.a)(Object(io.a)(t))),t.onVisibilityChange=t.onVisibilityChange.bind(Object(io.a)(Object(io.a)(t))),t.state={isCopied:!1,isEditingPermalink:!1},t}return Object(Wr.a)(e,t),Object(zr.a)(e,[{key:"addVisibilityCheck",value:function(){window.addEventListener("visibilitychange",this.onVisibilityChange)}},{key:"onVisibilityChange",value:function(){var t=this.props,e=t.isEditable,n=t.refreshPost;e||"visible"!==document.visibilityState||n()}},{key:"componentDidUpdate",value:function(t,e){e.isEditingPermalink&&!this.state.isEditingPermalink&&this.linkElement.focus()}},{key:"componentWillUnmount",value:function(){window.removeEventListener("visibilitychange",this.addVisibilityCheck)}},{key:"render",value:function(){var t=this,e=this.props,n=e.isEditable,r=e.isNew,o=e.isPublished,i=e.isViewable,s=e.permalinkParts,a=e.postLink,c=e.postSlug,u=e.postID,l=e.postTitle;if(r||!i||!s||!a)return null;var d=this.state,p=d.isCopied,h=d.isEditingPermalink,f=p?Object(Z.__)("Permalink copied"):Object(Z.__)("Copy the permalink"),b=s.prefix,m=s.suffix,v=Object(O.safeDecodeURIComponent)(c)||$o(l)||u,g=n?b+v+m:b;return Object(Br.createElement)("div",{className:"editor-post-permalink"},Object(Br.createElement)(Fr.ClipboardButton,{className:$r()("editor-post-permalink__copy",{"is-copied":p}),text:g,label:f,onCopy:function(){return t.setState({isCopied:!0})},"aria-disabled":p,icon:"admin-links"}),Object(Br.createElement)("span",{className:"editor-post-permalink__label"},Object(Z.__)("Permalink:")),!h&&Object(Br.createElement)(Fr.ExternalLink,{className:"editor-post-permalink__link",href:o?g:a,target:"_blank",ref:function(e){return t.linkElement=e}},Object(O.safeDecodeURI)(g),"‎"),h&&Object(Br.createElement)(Qi,{slug:v,onSave:function(){return t.setState({isEditingPermalink:!1})}}),n&&!h&&Object(Br.createElement)(Fr.Button,{className:"editor-post-permalink__edit",isLarge:!0,onClick:function(){return t.setState({isEditingPermalink:!0})}},Object(Z.__)("Edit")),!n&&Object(Br.createElement)(Fr.Button,{className:"editor-post-permalink__change",isLarge:!0,href:Yo("options-permalink.php"),onClick:this.addVisibilityCheck,target:"_blank"},Object(Z.__)("Change Permalinks")))}}]),e}(Br.Component),$i=Object(Hr.compose)([Object(l.withSelect)(function(t){var e=t("core/editor"),n=e.isEditedPostNew,r=e.isPermalinkEditable,o=e.getCurrentPost,i=e.getPermalinkParts,s=e.getEditedPostAttribute,a=e.isCurrentPostPublished,c=t("core").getPostType,u=o(),l=u.id,d=u.link,p=c(s("type"));return{isNew:n(),postLink:d,permalinkParts:i(),postSlug:s("slug"),isEditable:r(),isPublished:a(),postTitle:s("title"),postID:l,isViewable:Object(v.get)(p,["viewable"],!1)}}),Object(l.withDispatch)(function(t){return{refreshPost:t("core/editor").refreshPost}})])(Yi),Xi=/[\r\n]+/g,Zi=function(t){function e(){var t;return Object(Vr.a)(this,e),(t=Object(Kr.a)(this,Object(qr.a)(e).apply(this,arguments))).onChange=t.onChange.bind(Object(io.a)(Object(io.a)(t))),t.onSelect=t.onSelect.bind(Object(io.a)(Object(io.a)(t))),t.onUnselect=t.onUnselect.bind(Object(io.a)(Object(io.a)(t))),t.onKeyDown=t.onKeyDown.bind(Object(io.a)(Object(io.a)(t))),t.redirectHistory=t.redirectHistory.bind(Object(io.a)(Object(io.a)(t))),t.state={isSelected:!1},t}return Object(Wr.a)(e,t),Object(zr.a)(e,[{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(t){var e=t.target.value.replace(Xi," ");this.props.onUpdate(e)}},{key:"onKeyDown",value:function(t){t.keyCode===so.ENTER&&(t.preventDefault(),this.props.onEnterPress())}},{key:"redirectHistory",value:function(t){t.shiftKey?this.props.onRedo():this.props.onUndo(),t.preventDefault()}},{key:"render",value:function(){var t=this.props,e=t.hasFixedToolbar,n=t.isCleanNewPost,r=t.isFocusMode,o=t.isPostTypeViewable,i=t.instanceId,s=t.placeholder,a=t.title,c=this.state.isSelected,u=$r()("wp-block editor-post-title__block",{"is-selected":c,"is-focus-mode":r,"has-fixed-toolbar":e}),l=Object(Hi.decodeEntities)(s);return Object(Br.createElement)(_o,{supportKeys:"title"},Object(Br.createElement)("div",{className:"editor-post-title"},Object(Br.createElement)("div",{className:u},Object(Br.createElement)(Fr.KeyboardShortcuts,{shortcuts:{"mod+z":this.redirectHistory,"mod+shift+z":this.redirectHistory}},Object(Br.createElement)("label",{htmlFor:"post-title-".concat(i),className:"screen-reader-text"},l||Object(Z.__)("Add title")),Object(Br.createElement)(Ki.a,{id:"post-title-".concat(i),className:"editor-post-title__input",value:a,onChange:this.onChange,placeholder:l||Object(Z.__)("Add title"),onFocus:this.onSelect,onKeyDown:this.onKeyDown,onKeyPress:this.onUnselect,autoFocus:n})),c&&o&&Object(Br.createElement)($i,null))))}}]),e}(Br.Component),Ji=Object(l.withSelect)(function(t){var e=t("core/editor"),n=e.getEditedPostAttribute,r=e.isCleanNewPost,o=t("core/block-editor").getSettings,i=(0,t("core").getPostType)(n("type")),s=o(),a=s.titlePlaceholder,c=s.focusMode,u=s.hasFixedToolbar;return{isCleanNewPost:r(),title:n("title"),isPostTypeViewable:Object(v.get)(i,["viewable"],!1),placeholder:a,isFocusMode:c,hasFixedToolbar:u}}),ts=Object(l.withDispatch)(function(t){var e=t("core/block-editor"),n=e.insertDefaultBlock,r=e.clearSelectedBlock,o=t("core/editor"),i=o.editPost;return{onEnterPress:function(){n(void 0,void 0,0)},onUpdate:function(t){i({title:t})},onUndo:o.undo,onRedo:o.redo,clearSelectedBlock:r}}),es=Object(Hr.compose)(Ji,ts,Hr.withInstanceId,Fr.withFocusOutside)(Zi);var ns=Object(Hr.compose)([Object(l.withSelect)(function(t){var e=t("core/editor"),n=e.isEditedPostNew,r=e.getCurrentPostId,o=e.getCurrentPostType;return{isNew:n(),postId:r(),postType:o()}}),Object(l.withDispatch)(function(t){return{trashPost:t("core/editor").trashPost}})])(function(t){var e=t.isNew,n=t.postId,r=t.postType,o=Object(Dr.a)(t,["isNew","postId","postType"]);return e||!n?null:Object(Br.createElement)(Fr.Button,{className:"editor-post-trash button-link-delete",onClick:function(){return o.trashPost(n,r)},isDefault:!0,isLarge:!0},Object(Z.__)("Move to trash"))});var rs=Object(l.withSelect)(function(t){var e=t("core/editor"),n=e.isEditedPostNew,r=e.getCurrentPostId;return{isNew:n(),postId:r()}})(function(t){var e=t.isNew,n=t.postId,r=t.children;return e||!n?null:r});var os=Object(Hr.compose)([Object(l.withSelect)(function(t){var e=t("core/editor"),n=e.getCurrentPost,r=e.getCurrentPostType;return{hasPublishAction:Object(v.get)(n(),["_links","wp:action-publish"],!1),postType:r()}})])(function(t){var e=t.hasPublishAction;return(0,t.render)({canEdit:e})}),is=n(98);var ss=Object(l.withSelect)(function(t){return{content:t("core/editor").getEditedPostAttribute("content")}})(function(t){var e=t.content,n=Object(Z._x)("words","Word count type. Do not translate!");return Object(Br.createElement)("span",{className:"word-count"},Object(is.count)(e,n))});var as=Object(l.withSelect)(function(t){var e=t("core/block-editor").getGlobalBlockCount;return{headingCount:e("core/heading"),paragraphCount:e("core/paragraph"),numberOfBlocks:e()}})(function(t){var e=t.headingCount,n=t.paragraphCount,r=t.numberOfBlocks,o=t.hasOutlineItemsDisabled,i=t.onRequestClose;return Object(Br.createElement)(Br.Fragment,null,Object(Br.createElement)("div",{className:"table-of-contents__counts",role:"note","aria-label":Object(Z.__)("Document Statistics"),tabIndex:"0"},Object(Br.createElement)("div",{className:"table-of-contents__count"},Object(Z.__)("Words"),Object(Br.createElement)(ss,null)),Object(Br.createElement)("div",{className:"table-of-contents__count"},Object(Z.__)("Headings"),Object(Br.createElement)("span",{className:"table-of-contents__number"},e)),Object(Br.createElement)("div",{className:"table-of-contents__count"},Object(Z.__)("Paragraphs"),Object(Br.createElement)("span",{className:"table-of-contents__number"},n)),Object(Br.createElement)("div",{className:"table-of-contents__count"},Object(Z.__)("Blocks"),Object(Br.createElement)("span",{className:"table-of-contents__number"},r))),e>0&&Object(Br.createElement)(Br.Fragment,null,Object(Br.createElement)("hr",null),Object(Br.createElement)("span",{className:"table-of-contents__title"},Object(Z.__)("Document Outline")),Object(Br.createElement)(ro,{onSelect:i,hasOutlineItemsDisabled:o})))});var cs=Object(l.withSelect)(function(t){return{hasBlocks:!!t("core/block-editor").getBlockCount()}})(function(t){var e=t.hasBlocks,n=t.hasOutlineItemsDisabled;return Object(Br.createElement)(Fr.Dropdown,{position:"bottom",className:"table-of-contents",contentClassName:"table-of-contents__popover",renderToggle:function(t){var n=t.isOpen,r=t.onToggle;return Object(Br.createElement)(Fr.IconButton,{onClick:e?r:void 0,icon:"info-outline","aria-expanded":n,label:Object(Z.__)("Content structure"),labelPosition:"bottom","aria-disabled":!e})},renderContent:function(t){var e=t.onClose;return Object(Br.createElement)(as,{onRequestClose:e,hasOutlineItemsDisabled:n})}})}),us=function(t){function e(){var t;return Object(Vr.a)(this,e),(t=Object(Kr.a)(this,Object(qr.a)(e).apply(this,arguments))).warnIfUnsavedChanges=t.warnIfUnsavedChanges.bind(Object(io.a)(Object(io.a)(t))),t}return Object(Wr.a)(e,t),Object(zr.a)(e,[{key:"componentDidMount",value:function(){window.addEventListener("beforeunload",this.warnIfUnsavedChanges)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("beforeunload",this.warnIfUnsavedChanges)}},{key:"warnIfUnsavedChanges",value:function(t){if(this.props.isDirty)return t.returnValue=Object(Z.__)("You have unsaved changes. If you proceed, they will be lost."),t.returnValue}},{key:"render",value:function(){return null}}]),e}(Br.Component),ls=Object(l.withSelect)(function(t){return{isDirty:t("core/editor").isEditedPostDirty()}})(us),ds=n(41),ps=n.n(ds),hs=n(227),fs=n.n(hs),bs=/\/\*[^*]*\*+([^\/*][^*]*\*+)*\//g,ms=function(t,e){e=e||{};var n=1,r=1;function o(t){var e=t.match(/\n/g);e&&(n+=e.length);var o=t.lastIndexOf("\n");r=~o?t.length-o:r+t.length}function i(){var t={line:n,column:r};return function(e){return e.position=new s(t),h(),e}}function s(t){this.start=t,this.end={line:n,column:r},this.source=e.source}s.prototype.content=t;var a=[];function c(o){var i=new Error(e.source+":"+n+":"+r+": "+o);if(i.reason=o,i.filename=e.source,i.line=n,i.column=r,i.source=t,!e.silent)throw i;a.push(i)}function u(){return p(/^{\s*/)}function l(){return p(/^}/)}function d(){var e,n=[];for(h(),b(n);t.length&&"}"!==t.charAt(0)&&(e=P()||w());)!1!==e&&(n.push(e),b(n));return n}function p(e){var n=e.exec(t);if(n){var r=n[0];return o(r),t=t.slice(r.length),n}}function h(){p(/^\s*/)}function b(t){var e;for(t=t||[];e=m();)!1!==e&&t.push(e);return t}function m(){var e=i();if("/"===t.charAt(0)&&"*"===t.charAt(1)){for(var n=2;""!==t.charAt(n)&&("*"!==t.charAt(n)||"/"!==t.charAt(n+1));)++n;if(n+=2,""===t.charAt(n-1))return c("End of comment missing");var s=t.slice(2,n-2);return r+=2,o(s),t=t.slice(n),r+=2,e({type:"comment",comment:s})}}function v(){var t=p(/^([^{]+)/);if(t)return vs(t[0]).replace(/\/\*([^*]|[\r\n]|(\*+([^*\/]|[\r\n])))*\*\/+/g,"").replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g,function(t){return t.replace(/,/g,"‌")}).split(/\s*(?![^(]*\)),\s*/).map(function(t){return t.replace(/\u200C/g,",")})}function O(){var t=i(),e=p(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(e){if(e=vs(e[0]),!p(/^:\s*/))return c("property missing ':'");var n=p(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),r=t({type:"declaration",property:e.replace(bs,""),value:n?vs(n[0]).replace(bs,""):""});return p(/^[;\s]*/),r}}function g(){var t,e=[];if(!u())return c("missing '{'");for(b(e);t=O();)!1!==t&&(e.push(t),b(e));return l()?e:c("missing '}'")}function y(){for(var t,e=[],n=i();t=p(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)e.push(t[1]),p(/^,\s*/);if(e.length)return n({type:"keyframe",values:e,declarations:g()})}var j,_=S("import"),k=S("charset"),E=S("namespace");function S(t){var e=new RegExp("^@"+t+"\\s*([^;]+);");return function(){var n=i(),r=p(e);if(r){var o={type:t};return o[t]=r[1].trim(),n(o)}}}function P(){if("@"===t[0])return function(){var t=i(),e=p(/^@([-\w]+)?keyframes\s*/);if(e){var n=e[1];if(!(e=p(/^([-\w]+)\s*/)))return c("@keyframes missing name");var r,o=e[1];if(!u())return c("@keyframes missing '{'");for(var s=b();r=y();)s.push(r),s=s.concat(b());return l()?t({type:"keyframes",name:o,vendor:n,keyframes:s}):c("@keyframes missing '}'")}}()||function(){var t=i(),e=p(/^@media *([^{]+)/);if(e){var n=vs(e[1]);if(!u())return c("@media missing '{'");var r=b().concat(d());return l()?t({type:"media",media:n,rules:r}):c("@media missing '}'")}}()||function(){var t=i(),e=p(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(e)return t({type:"custom-media",name:vs(e[1]),media:vs(e[2])})}()||function(){var t=i(),e=p(/^@supports *([^{]+)/);if(e){var n=vs(e[1]);if(!u())return c("@supports missing '{'");var r=b().concat(d());return l()?t({type:"supports",supports:n,rules:r}):c("@supports missing '}'")}}()||_()||k()||E()||function(){var t=i(),e=p(/^@([-\w]+)?document *([^{]+)/);if(e){var n=vs(e[1]),r=vs(e[2]);if(!u())return c("@document missing '{'");var o=b().concat(d());return l()?t({type:"document",document:r,vendor:n,rules:o}):c("@document missing '}'")}}()||function(){var t=i();if(p(/^@page */)){var e=v()||[];if(!u())return c("@page missing '{'");for(var n,r=b();n=O();)r.push(n),r=r.concat(b());return l()?t({type:"page",selectors:e,declarations:r}):c("@page missing '}'")}}()||function(){var t=i();if(p(/^@host\s*/)){if(!u())return c("@host missing '{'");var e=b().concat(d());return l()?t({type:"host",rules:e}):c("@host missing '}'")}}()||function(){var t=i();if(p(/^@font-face\s*/)){if(!u())return c("@font-face missing '{'");for(var e,n=b();e=O();)n.push(e),n=n.concat(b());return l()?t({type:"font-face",declarations:n}):c("@font-face missing '}'")}}()}function w(){var t=i(),e=v();return e?(b(),t({type:"rule",selectors:e,declarations:g()})):c("selector missing")}return function t(e,n){var r=e&&"string"==typeof e.type;var o=r?e:n;for(var i in e){var s=e[i];Array.isArray(s)?s.forEach(function(e){t(e,o)}):s&&"object"===Object(f.a)(s)&&t(s,o)}r&&Object.defineProperty(e,"parent",{configurable:!0,writable:!0,enumerable:!1,value:n||null});return e}((j=d(),{type:"stylesheet",stylesheet:{source:e.source,rules:j,parsingErrors:a}}))};function vs(t){return t?t.replace(/^\s+|\s+$/g,""):""}var Os=n(109),gs=n.n(Os),ys=js;function js(t){this.options=t||{}}js.prototype.emit=function(t){return t},js.prototype.visit=function(t){return this[t.type](t)},js.prototype.mapVisit=function(t,e){var n="";e=e||"";for(var r=0,o=t.length;r1&&void 0!==arguments[1]?arguments[1]:[];return function(n){return"rule"===n.type?Object(h.a)({},n,{selectors:n.selectors.map(function(n){return Object(v.includes)(e,n.trim())?n:n.match(As)?n.replace(/^(body|html|:root)/,t):t+" "+n})}):n}},Ls=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return Object(v.map)(t,function(t){var n=t.css,r=t.baseURL,o=[];return e&&o.push(Is(e)),r&&o.push(Bs(r)),o.length?ws(n,Object(Hr.compose)(o)):n})},Rs=n(35);function Ns(){return(Ns=Object(fe.a)(q.a.mark(function t(e){var n,r,o,i,s,a,c,u,l,p,f,b,m,O,g,y,j,_,k,E,S,P,w,T,C,B,A,I,L;return q.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:n=e.allowedTypes,r=e.additionalData,o=void 0===r?{}:r,i=e.filesList,s=e.maxUploadFileSize,a=e.onError,c=void 0===a?v.noop:a,u=e.onFileChange,l=e.wpAllowedMimeTypes,p=void 0===l?null:l,f=Object(x.a)(i),b=[],m=function(t,e){Object(Rs.revokeBlobURL)(Object(v.get)(b,[t,"url"])),b[t]=e,u(Object(v.compact)(b))},O=function(t){return!n||Object(v.some)(n,function(e){return Object(v.includes)(e,"/")?e===t:Object(v.startsWith)(t,"".concat(e,"/"))})},g=(R=p)?Object(v.flatMap)(R,function(t,e){var n=t.split("/"),r=Object(d.a)(n,1)[0],o=e.split("|");return[t].concat(Object(x.a)(Object(v.map)(o,function(t){return"".concat(r,"/").concat(t)})))}):R,y=function(t){return Object(v.includes)(g,t)},j=function(t){t.message=[Object(Br.createElement)("strong",{key:"filename"},t.file.name),": ",t.message],c(t)},_=[],k=!0,E=!1,S=void 0,t.prev=12,P=f[Symbol.iterator]();case 14:if(k=(w=P.next()).done){t.next=34;break}if(T=w.value,!g||y(T.type)){t.next=19;break}return j({code:"MIME_TYPE_NOT_ALLOWED_FOR_USER",message:Object(Z.__)("Sorry, this file type is not permitted for security reasons."),file:T}),t.abrupt("continue",31);case 19:if(O(T.type)){t.next=22;break}return j({code:"MIME_TYPE_NOT_SUPPORTED",message:Object(Z.__)("Sorry, this file type is not supported here."),file:T}),t.abrupt("continue",31);case 22:if(!(s&&T.size>s)){t.next=25;break}return j({code:"SIZE_ABOVE_LIMIT",message:Object(Z.__)("This file exceeds the maximum upload size for this site."),file:T}),t.abrupt("continue",31);case 25:if(!(T.size<=0)){t.next=28;break}return j({code:"EMPTY_FILE",message:Object(Z.__)("This file is empty."),file:T}),t.abrupt("continue",31);case 28:_.push(T),b.push({url:Object(Rs.createBlobURL)(T)}),u(b);case 31:k=!0,t.next=14;break;case 34:t.next=40;break;case 36:t.prev=36,t.t0=t.catch(12),E=!0,S=t.t0;case 40:t.prev=40,t.prev=41,k||null==P.return||P.return();case 43:if(t.prev=43,!E){t.next=46;break}throw S;case 46:return t.finish(43);case 47:return t.finish(40);case 48:C=0;case 49:if(!(C<_.length)){t.next=68;break}return B=_[C],t.prev=51,t.next=54,Us(B,o);case 54:A=t.sent,I=Object(h.a)({},Object(v.omit)(A,["alt_text","source_url"]),{alt:A.alt_text,caption:Object(v.get)(A,["caption","raw"],""),title:A.title.raw,url:A.source_url}),m(C,I),t.next=65;break;case 59:t.prev=59,t.t1=t.catch(51),m(C,null),L=void 0,L=Object(v.has)(t.t1,["message"])?Object(v.get)(t.t1,["message"]):Object(Z.sprintf)(Object(Z.__)("Error while uploading file %s to the media library."),B.name),c({code:"GENERAL",message:L,file:B});case 65:++C,t.next=49;break;case 68:case"end":return t.stop()}var R},t,this,[[12,36,40,48],[41,,43,47],[51,59]])}))).apply(this,arguments)}function Us(t,e){var n=new window.FormData;return n.append("file",t,t.name||t.type.replace("/",".")),Object(v.forEach)(e,function(t,e){return n.append(e,t)}),H()({path:"/wp/v2/media",body:n,method:"POST"})}var Ds=function(t){var e=t.additionalData,n=void 0===e?{}:e,r=t.allowedTypes,o=t.filesList,i=t.maxUploadFileSize,s=t.onError,a=void 0===s?v.noop:s,c=t.onFileChange,u=Object(l.select)("core/editor"),d=u.getCurrentPostId,p=u.getEditorSettings,f=p().allowedMimeTypes;i=i||p().maxUploadFileSize,function(t){Ns.apply(this,arguments)}({allowedTypes:r,filesList:o,onFileChange:c,additionalData:Object(h.a)({post:d()},n),maxUploadFileSize:i,onError:function(t){var e=t.message;return a(e)},wpAllowedMimeTypes:f})},Fs=function(t){function e(t){var n;return Object(Vr.a)(this,e),(n=Object(Kr.a)(this,Object(qr.a)(e).apply(this,arguments))).getBlockEditorSettings=ps()(n.getBlockEditorSettings,{maxSize:1}),t.recovery?Object(Kr.a)(n):(t.updatePostLock(t.settings.postLock),t.setupEditor(t.post,t.initialEdits,t.settings.template),t.settings.autosave&&t.createWarningNotice(Object(Z.__)("There is an autosave of this post that is more recent than the version below."),{id:"autosave-exists",actions:[{label:Object(Z.__)("View the autosave"),url:t.settings.autosave.editLink}]}),n)}return Object(Wr.a)(e,t),Object(zr.a)(e,[{key:"getBlockEditorSettings",value:function(t,e,n,r){return Object(h.a)({},Object(v.pick)(t,["alignWide","allowedBlockTypes","availableLegacyWidgets","bodyPlaceholder","colors","disableCustomColors","disableCustomFontSizes","focusMode","fontSizes","hasFixedToolbar","hasPermissionsToManageWidgets","imageSizes","isRTL","maxWidth","styles","template","templateLock","titlePlaceholder"]),{__experimentalMetaSource:{value:e,onChange:n},__experimentalReusableBlocks:r,__experimentalMediaUpload:Ds})}},{key:"componentDidMount",value:function(){if(this.props.updateEditorSettings(this.props.settings),this.props.settings.styles){var t=Ls(this.props.settings.styles,".editor-styles-wrapper");Object(v.map)(t,function(t){if(t){var e=document.createElement("style");e.innerHTML=t,document.body.appendChild(e)}})}}},{key:"componentDidUpdate",value:function(t){this.props.settings!==t.settings&&this.props.updateEditorSettings(this.props.settings)}},{key:"render",value:function(){var t=this.props,e=t.children,n=t.blocks,r=t.resetEditorBlocks,o=t.isReady,s=t.settings,a=t.meta,c=t.onMetaChange,u=t.reusableBlocks,l=t.resetEditorBlocksWithoutUndoLevel;if(!o)return null;var d=this.getBlockEditorSettings(s,a,c,u);return Object(Br.createElement)(i.BlockEditorProvider,{value:n,onInput:l,onChange:r,settings:d},e)}}]),e}(Br.Component),Ms=Object(Hr.compose)([Object(l.withSelect)(function(t){var e=t("core/editor"),n=e.__unstableIsEditorReady,r=e.getEditorBlocks,o=e.getEditedPostAttribute,i=e.__experimentalGetReusableBlocks;return{isReady:n(),blocks:r(),meta:o("meta"),reusableBlocks:i()}}),Object(l.withDispatch)(function(t){var e=t("core/editor"),n=e.setupEditor,r=e.updatePostLock,o=e.resetEditorBlocks,i=e.editPost,s=e.updateEditorSettings;return{setupEditor:n,updatePostLock:r,createWarningNotice:t("core/notices").createWarningNotice,resetEditorBlocks:o,updateEditorSettings:s,resetEditorBlocksWithoutUndoLevel:function(t){o(t,{__unstableShouldCreateUndoLevel:!1})},onMetaChange:function(t){i({meta:t})}}})])(Fs),Vs=[Nr],zs=Object(v.once)(function(){return Object(l.dispatch)("core/editor").__experimentalFetchReusableBlocks()});Object(xr.addFilter)("editor.Autocomplete.completers","editor/autocompleters/set-default-completers",function(t,e){return t||(t=Vs.map(v.clone),e===Object(s.getDefaultBlockName)()&&(t.push(Object(v.clone)(Rr)),zs())),t}),n.d(e,"ServerSideRender",function(){return Mr}),n.d(e,"AutosaveMonitor",function(){return Qr}),n.d(e,"DocumentOutline",function(){return ro}),n.d(e,"DocumentOutlineCheck",function(){return oo}),n.d(e,"VisualEditorGlobalKeyboardShortcuts",function(){return ho}),n.d(e,"EditorGlobalKeyboardShortcuts",function(){return fo}),n.d(e,"TextEditorGlobalKeyboardShortcuts",function(){return bo}),n.d(e,"EditorHistoryRedo",function(){return mo}),n.d(e,"EditorHistoryUndo",function(){return vo}),n.d(e,"EditorNotices",function(){return go}),n.d(e,"ErrorBoundary",function(){return yo}),n.d(e,"PageAttributesCheck",function(){return jo}),n.d(e,"PageAttributesOrder",function(){return Eo}),n.d(e,"PageAttributesParent",function(){return To}),n.d(e,"PageTemplate",function(){return Co}),n.d(e,"PostAuthor",function(){return Ao}),n.d(e,"PostAuthorCheck",function(){return xo}),n.d(e,"PostComments",function(){return Io}),n.d(e,"PostExcerpt",function(){return Lo}),n.d(e,"PostExcerptCheck",function(){return Ro}),n.d(e,"PostFeaturedImage",function(){return qo}),n.d(e,"PostFeaturedImageCheck",function(){return Uo}),n.d(e,"PostFormat",function(){return Go}),n.d(e,"PostFormatCheck",function(){return Wo}),n.d(e,"PostLastRevision",function(){return Xo}),n.d(e,"PostLastRevisionCheck",function(){return Qo}),n.d(e,"PostLockedModal",function(){return ei}),n.d(e,"PostPendingStatus",function(){return ri}),n.d(e,"PostPendingStatusCheck",function(){return ni}),n.d(e,"PostPingbacks",function(){return oi}),n.d(e,"PostPreviewButton",function(){return Jo}),n.d(e,"PostPublishButton",function(){return ai}),n.d(e,"PostPublishButtonLabel",function(){return ii}),n.d(e,"PostPublishPanel",function(){return xi}),n.d(e,"PostSavedState",function(){return Ii}),n.d(e,"PostSchedule",function(){return pi}),n.d(e,"PostScheduleCheck",function(){return Li}),n.d(e,"PostScheduleLabel",function(){return hi}),n.d(e,"PostSticky",function(){return Ni}),n.d(e,"PostStickyCheck",function(){return Ri}),n.d(e,"PostSwitchToDraftButton",function(){return Bi}),n.d(e,"PostTaxonomies",function(){return Mi}),n.d(e,"PostTaxonomiesCheck",function(){return Vi}),n.d(e,"PostTextEditor",function(){return Wi}),n.d(e,"PostTitle",function(){return es}),n.d(e,"PostTrash",function(){return ns}),n.d(e,"PostTrashCheck",function(){return rs}),n.d(e,"PostTypeSupportCheck",function(){return _o}),n.d(e,"PostVisibility",function(){return li}),n.d(e,"PostVisibilityLabel",function(){return di}),n.d(e,"PostVisibilityCheck",function(){return os}),n.d(e,"TableOfContents",function(){return cs}),n.d(e,"UnsavedChangesWarning",function(){return ls}),n.d(e,"WordCount",function(){return ss}),n.d(e,"EditorProvider",function(){return Ms}),n.d(e,"blockAutocompleter",function(){return Rr}),n.d(e,"userAutocompleter",function(){return Nr}),n.d(e,"Autocomplete",function(){return i.Autocomplete}),n.d(e,"AlignmentToolbar",function(){return i.AlignmentToolbar}),n.d(e,"BlockAlignmentToolbar",function(){return i.BlockAlignmentToolbar}),n.d(e,"BlockControls",function(){return i.BlockControls}),n.d(e,"BlockEdit",function(){return i.BlockEdit}),n.d(e,"BlockEditorKeyboardShortcuts",function(){return i.BlockEditorKeyboardShortcuts}),n.d(e,"BlockFormatControls",function(){return i.BlockFormatControls}),n.d(e,"BlockIcon",function(){return i.BlockIcon}),n.d(e,"BlockInspector",function(){return i.BlockInspector}),n.d(e,"BlockList",function(){return i.BlockList}),n.d(e,"BlockMover",function(){return i.BlockMover}),n.d(e,"BlockNavigationDropdown",function(){return i.BlockNavigationDropdown}),n.d(e,"BlockSelectionClearer",function(){return i.BlockSelectionClearer}),n.d(e,"BlockSettingsMenu",function(){return i.BlockSettingsMenu}),n.d(e,"BlockTitle",function(){return i.BlockTitle}),n.d(e,"BlockToolbar",function(){return i.BlockToolbar}),n.d(e,"ColorPalette",function(){return i.ColorPalette}),n.d(e,"ContrastChecker",function(){return i.ContrastChecker}),n.d(e,"CopyHandler",function(){return i.CopyHandler}),n.d(e,"createCustomColorsHOC",function(){return i.createCustomColorsHOC}),n.d(e,"DefaultBlockAppender",function(){return i.DefaultBlockAppender}),n.d(e,"FontSizePicker",function(){return i.FontSizePicker}),n.d(e,"getColorClassName",function(){return i.getColorClassName}),n.d(e,"getColorObjectByAttributeValues",function(){return i.getColorObjectByAttributeValues}),n.d(e,"getColorObjectByColorValue",function(){return i.getColorObjectByColorValue}),n.d(e,"getFontSize",function(){return i.getFontSize}),n.d(e,"getFontSizeClass",function(){return i.getFontSizeClass}),n.d(e,"Inserter",function(){return i.Inserter}),n.d(e,"InnerBlocks",function(){return i.InnerBlocks}),n.d(e,"InspectorAdvancedControls",function(){return i.InspectorAdvancedControls}),n.d(e,"InspectorControls",function(){return i.InspectorControls}),n.d(e,"PanelColorSettings",function(){return i.PanelColorSettings}),n.d(e,"PlainText",function(){return i.PlainText}),n.d(e,"RichText",function(){return i.RichText}),n.d(e,"RichTextShortcut",function(){return i.RichTextShortcut}),n.d(e,"RichTextToolbarButton",function(){return i.RichTextToolbarButton}),n.d(e,"RichTextInserterItem",function(){return i.RichTextInserterItem}),n.d(e,"UnstableRichTextInputEvent",function(){return i.UnstableRichTextInputEvent}),n.d(e,"MediaPlaceholder",function(){return i.MediaPlaceholder}),n.d(e,"MediaUpload",function(){return i.MediaUpload}),n.d(e,"MediaUploadCheck",function(){return i.MediaUploadCheck}),n.d(e,"MultiBlocksSwitcher",function(){return i.MultiBlocksSwitcher}),n.d(e,"MultiSelectScrollIntoView",function(){return i.MultiSelectScrollIntoView}),n.d(e,"NavigableToolbar",function(){return i.NavigableToolbar}),n.d(e,"ObserveTyping",function(){return i.ObserveTyping}),n.d(e,"PreserveScrollInReorder",function(){return i.PreserveScrollInReorder}),n.d(e,"SkipToSelectedBlock",function(){return i.SkipToSelectedBlock}),n.d(e,"URLInput",function(){return i.URLInput}),n.d(e,"URLInputButton",function(){return i.URLInputButton}),n.d(e,"URLPopover",function(){return i.URLPopover}),n.d(e,"Warning",function(){return i.Warning}),n.d(e,"WritingFlow",function(){return i.WritingFlow}),n.d(e,"withColorContext",function(){return i.withColorContext}),n.d(e,"withColors",function(){return i.withColors}),n.d(e,"withFontSizes",function(){return i.withFontSizes}),n.d(e,"mediaUpload",function(){return Ds}),n.d(e,"cleanForSlug",function(){return $o}),n.d(e,"transformStyles",function(){return Ls})},37:function(t,e,n){"use strict";function r(t){if(Array.isArray(t))return t}n.d(e,"a",function(){return r})},38:function(t,e,n){"use strict";function r(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}n.d(e,"a",function(){return r})},4:function(t,e){!function(){t.exports=this.wp.components}()},40:function(t,e){!function(){t.exports=this.wp.viewport}()},41:function(t,e,n){t.exports=function(t,e){var n,r,o,i=0;function s(){var e,s,a=r,c=arguments.length;t:for(;a;){if(a.args.length===arguments.length){for(s=0;s=0,i=o&&r.regeneratorRuntime;if(r.regeneratorRuntime=void 0,t.exports=n(55),o)r.regeneratorRuntime=i;else try{delete r.regeneratorRuntime}catch(t){r.regeneratorRuntime=void 0}},55:function(t,e){!function(e){"use strict";var n,r=Object.prototype,o=r.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},s=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag",u="object"==typeof t,l=e.regeneratorRuntime;if(l)u&&(t.exports=l);else{(l=e.regeneratorRuntime=u?t.exports:{}).wrap=y;var d="suspendedStart",p="suspendedYield",h="executing",f="completed",b={},m={};m[s]=function(){return this};var v=Object.getPrototypeOf,O=v&&v(v(B([])));O&&O!==r&&o.call(O,s)&&(m=O);var g=E.prototype=_.prototype=Object.create(m);k.prototype=g.constructor=E,E.constructor=k,E[c]=k.displayName="GeneratorFunction",l.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===k||"GeneratorFunction"===(e.displayName||e.name))},l.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,E):(t.__proto__=E,c in t||(t[c]="GeneratorFunction")),t.prototype=Object.create(g),t},l.awrap=function(t){return{__await:t}},S(P.prototype),P.prototype[a]=function(){return this},l.AsyncIterator=P,l.async=function(t,e,n,r){var o=new P(y(t,e,n,r));return l.isGeneratorFunction(e)?o:o.next().then(function(t){return t.done?t.value:o.next()})},S(g),g[c]="Generator",g[s]=function(){return this},g.toString=function(){return"[object Generator]"},l.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},l.values=B,x.prototype={constructor:x,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=n,this.done=!1,this.delegate=null,this.method="next",this.arg=n,this.tryEntries.forEach(C),!t)for(var e in this)"t"===e.charAt(0)&&o.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=n)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(r,o){return a.type="throw",a.arg=t,e.next=r,o&&(e.method="next",e.arg=n),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var s=this.tryEntries[i],a=s.completion;if("root"===s.tryLoc)return r("end");if(s.tryLoc<=this.prev){var c=o.call(s,"catchLoc"),u=o.call(s,"finallyLoc");if(c&&u){if(this.prev=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&o.call(r,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),C(n),b}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;C(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:B(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=n),b}}}function y(t,e,n,r){var o=e&&e.prototype instanceof _?e:_,i=Object.create(o.prototype),s=new x(r||[]);return i._invoke=function(t,e,n){var r=d;return function(o,i){if(r===h)throw new Error("Generator is already running");if(r===f){if("throw"===o)throw i;return A()}for(n.method=o,n.arg=i;;){var s=n.delegate;if(s){var a=w(s,n);if(a){if(a===b)continue;return a}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===d)throw r=f,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=h;var c=j(t,e,n);if("normal"===c.type){if(r=n.done?f:p,c.arg===b)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r=f,n.method="throw",n.arg=c.arg)}}}(t,n,s),i}function j(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}function _(){}function k(){}function E(){}function S(t){["next","throw","return"].forEach(function(e){t[e]=function(t){return this._invoke(e,t)}})}function P(t){var e;this._invoke=function(n,r){function i(){return new Promise(function(e,i){!function e(n,r,i,s){var a=j(t[n],t,r);if("throw"!==a.type){var c=a.arg,u=c.value;return u&&"object"==typeof u&&o.call(u,"__await")?Promise.resolve(u.__await).then(function(t){e("next",t,i,s)},function(t){e("throw",t,i,s)}):Promise.resolve(u).then(function(t){c.value=t,i(c)},function(t){return e("throw",t,i,s)})}s(a.arg)}(n,r,e,i)})}return e=e?e.then(i,i):i()}}function w(t,e){var r=t.iterator[e.method];if(r===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=n,w(t,e),"throw"===e.method))return b;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return b}var o=j(r,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,b;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=n),e.delegate=null,b):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,b)}function T(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function B(t){if(t){var e=t[s];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,i=function e(){for(;++r",'"',"`"," ","\r","\n","\t"]),l=["'"].concat(u),d=["%","/","?",";","#"].concat(l),p=["/","?","#"],h=/^[+a-z0-9A-Z_-]{0,63}$/,f=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,b={javascript:!0,"javascript:":!0},m={javascript:!0,"javascript:":!0},v={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},O=n(120);function g(t,e,n){if(t&&o.isObject(t)&&t instanceof i)return t;var r=new i;return r.parse(t,e,n),r}i.prototype.parse=function(t,e,n){if(!o.isString(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var i=t.indexOf("?"),a=-1!==i&&i127?I+="x":I+=A[L];if(!I.match(h)){var N=x.slice(0,w),U=x.slice(w+1),D=A.match(f);D&&(N.push(D[1]),U.unshift(D[2])),U.length&&(g="/"+U.join(".")+g),this.hostname=N.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),C||(this.hostname=r.toASCII(this.hostname));var F=this.port?":"+this.port:"",M=this.hostname||"";this.host=M+F,this.href+=this.host,C&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==g[0]&&(g="/"+g))}if(!b[_])for(w=0,B=l.length;w0)&&n.host.split("@"))&&(n.auth=C.shift(),n.host=n.hostname=C.shift());return n.search=t.search,n.query=t.query,o.isNull(n.pathname)&&o.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n}if(!k.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var S=k.slice(-1)[0],P=(n.host||t.host||k.length>1)&&("."===S||".."===S)||""===S,w=0,T=k.length;T>=0;T--)"."===(S=k[T])?k.splice(T,1):".."===S?(k.splice(T,1),w++):w&&(k.splice(T,1),w--);if(!j&&!_)for(;w--;w)k.unshift("..");!j||""===k[0]||k[0]&&"/"===k[0].charAt(0)||k.unshift(""),P&&"/"!==k.join("/").substr(-1)&&k.push("");var C,x=""===k[0]||k[0]&&"/"===k[0].charAt(0);E&&(n.hostname=n.host=x?"":k.length?k.shift():"",(C=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=C.shift(),n.host=n.hostname=C.shift()));return(j=j||n.host&&k.length)&&!x&&k.unshift(""),k.length?n.pathname=k.join("/"):(n.pathname=null,n.path=null),o.isNull(n.pathname)&&o.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=t.auth||n.auth,n.slashes=n.slashes||t.slashes,n.href=n.format(),n},i.prototype.parseHost=function(){var t=this.host,e=a.exec(t);e&&(":"!==(e=e[0])&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)}},89:function(t,e,n){"use strict";var r=n(90);function o(){}t.exports=function(){function t(t,e,n,o,i,s){if(s!==r){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function e(){return t}t.isRequired=t;var n={array:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e};return n.checkPropTypes=o,n.PropTypes=n,n}},9:function(t,e,n){"use strict";function r(t,e){for(var n=0;n