[ Index ]

PHP Cross Reference of WordPress

title

Body

[close]

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

   1  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=344)}({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){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(t,e){if(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<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},s=this&&this.__rest||function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&(n[r[o]]=t[r[o]])}return n};e.__esModule=!0;var a=n(27),c=n(31),u=n(112),l=n(113),d=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.state={lineHeight:null},e.dispatchEvent=function(t){var n=document.createEvent("Event");n.initEvent(t,!0,!1),e.textarea.dispatchEvent(n)},e.updateLineHeight=function(){e.setState({lineHeight:l(e.textarea)})},e.onChange=function(t){var n=e.props.onChange;e.currentValue=t.currentTarget.value,n&&n(t)},e.saveDOMNodeRef=function(t){var n=e.props.innerRef;n&&n(t),e.textarea=t},e.getLocals=function(){var t=e,n=t.props,r=(n.onResize,n.maxRows),o=(n.onChange,n.style),a=(n.innerRef,s(n,["onResize","maxRows","onChange","style","innerRef"])),c=t.state.lineHeight,u=t.saveDOMNodeRef,l=r&&c?c*r:null;return i({},a,{saveDOMNodeRef:u,style:l?i({},o,{maxHeight:l}):o,onChange:e.onChange})},e}return o(e,t),e.prototype.componentDidMount=function(){var t=this,e=this.props,n=e.onResize;"number"==typeof e.maxRows&&this.updateLineHeight(),setTimeout(function(){return u(t.textarea)}),n&&this.textarea.addEventListener("autosize:resized",n)},e.prototype.componentWillUnmount=function(){var t=this.props.onResize;t&&this.textarea.removeEventListener("autosize:resized",t),this.dispatchEvent("autosize:destroy")},e.prototype.render=function(){var t=this.getLocals(),e=t.children,n=t.saveDOMNodeRef,r=s(t,["children","saveDOMNodeRef"]);return a.createElement("textarea",i({},r,{ref:n}),e)},e.prototype.componentDidUpdate=function(t){this.props.value===this.currentValue&&this.props.rows===t.rows||this.dispatchEvent("autosize:update")},e.defaultProps={rows:1},e.propTypes={rows:c.number,maxRows:c.number,onResize:c.func,innerRef:c.func},e}(a.Component);e.default=d},112:function(t,e,n){var r,o,i;
   2  /*!
   3      autosize 4.0.2
   4      license: MIT
   5      http://www.jacklmoore.com/autosize
   6  */o=[t,e],void 0===(i="function"==typeof(r=function(t,e){"use strict";var n,r,o="function"==typeof Map?new Map:(n=[],r=[],{has:function(t){return n.indexOf(t)>-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<e?"hidden"===n.overflowY&&(u("scroll"),l(),o="content-box"===n.boxSizing?Math.round(parseFloat(window.getComputedStyle(t,null).height)):t.offsetHeight):"hidden"!==n.overflowY&&(u("hidden"),l(),o="content-box"===n.boxSizing?Math.round(parseFloat(window.getComputedStyle(t,null).height)):t.offsetHeight),r!==o){r=o;var s=i("autosize:resized");try{t.dispatchEvent(s)}catch(t){}}}}function a(t){var e=o.get(t);e&&e.destroy()}function c(t){var e=o.get(t);e&&e.update()}var u=null;"undefined"==typeof window||"function"!=typeof window.getComputedStyle?((u=function(t){return t}).destroy=function(t){return t},u.update=function(t){return t}):((u=function(t,e){return t&&Array.prototype.forEach.call(t.length?t:[t],function(t){return s(t)}),t}).destroy=function(t){return t&&Array.prototype.forEach.call(t.length?t:[t],a),t},u.update=function(t){return t&&Array.prototype.forEach.call(t.length?t:[t],c),t}),e.default=u,t.exports=e.default})?r.apply(e,o):r)||(t.exports=i)},113:function(t,e,n){var r=n(114);t.exports=function(t){var e=r(t,"line-height"),n=parseFloat(e,10);if(e===n+""){var o=t.style.lineHeight;t.style.lineHeight=e+"em",e=r(t,"line-height"),n=parseFloat(e,10),o?t.style.lineHeight=o:delete t.style.lineHeight}if(-1!==e.indexOf("pt")?(n*=4,n/=3):-1!==e.indexOf("mm")?(n*=96,n/=25.4):-1!==e.indexOf("cm")?(n*=96,n/=2.54):-1!==e.indexOf("in")?n*=96:-1!==e.indexOf("pc")&&(n*=16),n=Math.round(n),"normal"===e){var i=t.nodeName,s=document.createElement(i);s.innerHTML="&nbsp;","TEXTAREA"===i.toUpperCase()&&s.setAttribute("rows","1");var a=r(t,"font-size");s.style.fontSize=a,s.style.padding="0px",s.style.border="0px";var c=document.body;c.appendChild(s),n=s.offsetHeight,c.removeChild(s)}return n}},114:function(t,e){t.exports=function(t,e,n){return((n=window.getComputedStyle)?n(t):t.currentStyle)[e.replace(/-(\w)/gi,function(t,e){return e.toUpperCase()})]}},117:function(t,e,n){(function(t,r){var o;/*! https://mths.be/punycode v1.3.2 by @mathias */!function(i){e&&e.nodeType,t&&t.nodeType;var s="object"==typeof r&&r;s.global!==s&&s.window!==s&&s.self;var a,c=2147483647,u=36,l=1,d=26,p=38,h=700,f=72,b=128,m="-",v=/^xn--/,O=/[^\x20-\x7E]/,g=/[\x2E\u3002\uFF0E\uFF61]/g,y={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},j=u-l,_=Math.floor,k=String.fromCharCode;function E(t){throw 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<i;)(e=t.charCodeAt(o++))>=55296&&e<=56319&&o<i?56320==(64512&(n=t.charCodeAt(o++)))?r.push(((1023&e)<<10)+(1023&n)+65536):(r.push(e),o--):r.push(e);return r}function T(t){return S(t,function(t){var e="";return t>65535&&(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<n;++r)t.charCodeAt(r)>=128&&E("not-basic"),g.push(t.charCodeAt(r));for(o=n>0?n+1:0;o<y;){for(i=j,s=1,a=u;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<g;++s)(O=t[s])<128&&P.push(k(O));for(r=o=P.length,o&&P.push(m);r<g;){for(a=c,s=0;s<g;++s)(O=t[s])>=e&&O<a&&(a=O);for(a-e>_((c-n)/(y=r+1))&&E("overflow"),n+=(a-e)*y,e=a,s=0;s<g;++s)if((O=t[s])<e&&++n>c&&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.3.2",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(58))},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<u;++l){var d,p,h,f,b=t[l].replace(a,"%20"),m=b.indexOf(n);m>=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<t.length;r++)n.push(e(t[r],r));return n}var s=Object.keys||function(t){var e=[];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.push(n);return e}},13:function(t,e,n){"use strict";function r(t,e){return(r=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&r(t,e)}n.d(e,"a",function(){return o})},135:function(t,e){!function(){t.exports=this.wp.notices}()},14:function(t,e){!function(){t.exports=this.wp.blocks}()},15:function(t,e,n){"use strict";function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}n.d(e,"a",function(){return r})},16:function(t,e,n){var r;
   7  /*!
   8    Copyright (c) 2017 Jed Watson.
   9    Licensed under the MIT License (MIT), see
  10    http://jedwatson.github.io/classnames
  11  */
  12  /*!
  13    Copyright (c) 2017 Jed Watson.
  14    Licensed under the MIT License (MIT), see
  15    http://jedwatson.github.io/classnames
  16  */
  17  !function(){"use strict";var n={}.hasOwnProperty;function o(){for(var t=[],e=0;e<arguments.length;e++){var r=arguments[e];if(r){var i=typeof r;if("string"===i||"number"===i)t.push(r);else if(Array.isArray(r)&&r.length){var s=o.apply(null,r);s&&t.push(s)}else if("object"===i)for(var a in r)n.call(r,a)&&r[a]&&t.push(a)}}return t.join(" ")}t.exports?(o.default=o,t.exports=o):void 0===(r=function(){return o}.apply(e,[]))||(t.exports=r)}()},17:function(t,e,n){"use strict";var r=n(34);function o(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}(t)||Object(r.a)(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}n.d(e,"a",function(){return o})},18:function(t,e){!function(){t.exports=this.wp.keycodes}()},19:function(t,e,n){"use strict";function r(){return(r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}n.d(e,"a",function(){return r})},2:function(t,e){!function(){t.exports=this.lodash}()},20:function(t,e){!function(){t.exports=this.wp.richText}()},21:function(t,e,n){"use strict";function r(t,e){if(null==t)return{};var n,r,o=function(t,e){if(null==t)return{};var n,r,o={},i=Object.keys(t);for(r=0;r<i.length;r++)n=i[r],e.indexOf(n)>=0||(o[n]=t[n]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r<i.length;r++)n=i[r],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}n.d(e,"a",function(){return r})},221: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<o.length;t++)if(o[t].node_===d){b.circular=o[t];break}}else b.isLeaf=!0,b.keys=null;b.notLeaf=!b.isLeaf,b.notRoot=!b.isRoot}m();var v=e.call(b,b.node);return void 0!==v&&b.update&&b.update(v),h.before&&h.before.call(b,b.node),f?("object"!=typeof b.node||null===b.node||b.circular||(o.push(b),m(),u(b.keys,function(e,o){r.push(e),h.pre&&h.pre.call(b,b.node[e],e);var i=t(b.node[e]);n&&l.call(b.node,e)&&(b.node[e]=i.node),i.isLast=o==b.keys.length-1,i.isFirst=0==o,h.post&&h.post.call(b,i),r.pop()}),o.pop()),h.after&&h.after.call(b,b.node),b):b}(t).node}function i(t){if("object"==typeof t&&null!==t){var e;if(c(t))e=[];else if("[object Date]"===a(t))e=new Date(t.getTime?t.getTime():t);else if(function(t){return"[object RegExp]"===a(t)}(t))e=new RegExp(t);else if(function(t){return"[object Error]"===a(t)}(t))e={message:t.message};else if(function(t){return"[object Boolean]"===a(t)}(t))e=new Boolean(t);else if(function(t){return"[object Number]"===a(t)}(t))e=new Number(t);else if(function(t){return"[object String]"===a(t)}(t))e=new String(t);else if(Object.create&&Object.getPrototypeOf)e=Object.create(Object.getPrototypeOf(t));else if(t.constructor===Object)e={};else{var n=t.constructor&&t.constructor.prototype||t.__proto__||{},r=function(){};r.prototype=n,e=new r}return u(s(t),function(n){e[n]=t[n]}),e}return t}r.prototype.get=function(t){for(var e=this.value,n=0;n<t.length;n++){var r=t[n];if(!e||!l.call(e,r)){e=void 0;break}e=e[r]}return e},r.prototype.has=function(t){for(var e=this.value,n=0;n<t.length;n++){var r=t[n];if(!e||!l.call(e,r))return!1;e=e[r]}return!0},r.prototype.set=function(t,e){for(var n=this.value,r=0;r<t.length-1;r++){var o=t[r];l.call(n,o)||(n[o]={}),n=n[o]}return n[t[r]]=e,e},r.prototype.map=function(t){return o(this.value,t,!0)},r.prototype.forEach=function(t){return this.value=o(this.value,t,!1),this.value},r.prototype.reduce=function(t,e){var n=1===arguments.length,r=n?this.value:e;return this.forEach(function(e){this.isRoot&&n||(r=t.call(this,r,e))}),r},r.prototype.paths=function(){var t=[];return this.forEach(function(e){t.push(this.path)}),t},r.prototype.nodes=function(){var t=[];return this.forEach(function(e){t.push(this.node)}),t},r.prototype.clone=function(){var t=[],e=[];return function n(r){for(var o=0;o<t.length;o++)if(t[o]===r)return e[o];if("object"==typeof r&&null!==r){var a=i(r);return t.push(r),e.push(a),u(s(r),function(t){a[t]=n(r[t])}),t.pop(),e.pop(),a}return r}(this.value)};var s=Object.keys||function(t){var e=[];for(var n in t)e.push(n);return e};function a(t){return Object.prototype.toString.call(t)}var c=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},u=function(t,e){if(t.forEach)return t.forEach(e);for(var n=0;n<t.length;n++)e(t[n],n,t)};u(s(r.prototype),function(t){n[t]=function(e){var n=[].slice.call(arguments,1),o=new r(e);return o[t].apply(o,n)}});var l=Object.hasOwnProperty||function(t,e){return e in t}},23:function(t,e,n){t.exports=n(54)},25:function(t,e){!function(){t.exports=this.wp.url}()},26:function(t,e){!function(){t.exports=this.wp.hooks}()},27:function(t,e){!function(){t.exports=this.React}()},28:function(t,e,n){"use strict";var r=n(37);var o=n(38);function i(t,e){return Object(r.a)(t)||function(t,e){var n=[],r=!0,o=!1,i=void 0;try{for(var s,a=t[Symbol.iterator]();!(r=(s=a.next()).done)&&(n.push(s.value),!e||n.length!==e);r=!0);}catch(t){o=!0,i=t}finally{try{r||null==a.return||a.return()}finally{if(o)throw i}}return n}(t,e)||Object(o.a)()}n.d(e,"a",function(){return i})},3:function(t,e,n){"use strict";function r(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}n.d(e,"a",function(){return r})},30:function(t,e,n){"use strict";var r,o;function i(t){return[t]}function s(){var t={clear:function(){t.head=null}};return t}function a(t,e,n){var r;if(t.length!==e.length)return!1;for(r=n;r<t.length;r++)if(t[r]!==e[r])return!1;return!0}r={},o="undefined"!=typeof WeakMap,e.a=function(t,e){var n,c;function u(){n=o?new WeakMap:s()}function l(){var n,r,o,i,s,u=arguments.length;for(i=new Array(u),o=0;o<u;o++)i[o]=arguments[o];for(s=e.apply(null,i),(n=c(s)).isUniqueByDependants||(n.lastDependants&&!a(s,n.lastDependants,0)&&n.clear(),n.lastDependants=s),r=n.head;r;){if(a(r.args,i,1))return r!==n.head&&(r.prev.next=r.next,r.next&&(r.next.prev=r.prev),r.next=n.head,r.prev=null,n.head.prev=r,n.head=r),r.val;r=r.next}return r={val:t.apply(null,i)},i[0]=null,r.args=i,n.head&&(n.head.prev=r,r.next=n.head),n.head=r,r.val}return e||(e=i),c=o?function(t){var e,o,i,a,c,u=n,l=!0;for(e=0;e<t.length;e++){if(o=t[e],!(c=o)||"object"!=typeof c){l=!1;break}u.has(o)?u=u.get(o):(i=new WeakMap,u.set(o,i),u=i)}return u.has(r)||((a=s()).isUniqueByDependants=l,u.set(r,a)),u.get(r)}:function(){return n},l.getDependants=e,l.clear=u,u(),l}},31:function(t,e,n){t.exports=n(88)()},32:function(t,e,n){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(t){return(o="function"==typeof Symbol&&"symbol"===r(Symbol.iterator)?function(t){return r(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":r(t)})(t)}n.d(e,"a",function(){return o})},327:function(t,e,n){"use strict";var r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t};var o="BEGIN",i="COMMIT",s="REVERT",a=[];function c(t,e){return t.optimist&&t.optimist.id===e}function u(t,e){if(!t||"object"!=typeof t||Array.isArray(t))throw new TypeError('Error while handling "'+e.type+'": Optimist requires that state is always a plain object.')}function l(t){if(t){var e=t.optimist;return{optimist:void 0===e?a:e,innerState:function(t,e){var n={};for(var r in t)e.indexOf(r)>=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},33:function(t,e){!function(){t.exports=this.wp.apiFetch}()},34:function(t,e,n){"use strict";function r(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}n.d(e,"a",function(){return r})},344: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 Wt}),n.d(r,"clearSelectedBlock",function(){return qt}),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 We}),n.d(o,"hasAutosave",function(){return qe}),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 Wn}),n.d(o,"getAdjacentBlockClientId",function(){return qn}),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(135),n(59)),c=n(20),u=n(40),l=n(5),d=n(28),p=n(15),h=n(7),f=n(32),b=n(61),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(96),z=n.n(V),K=n(23),W=n.n(K),q=n(33),H=n.n(q);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;o<n;o++)r[o-2]=arguments[o];return{type:"SELECT",storeKey:t,selectorName:e,args:r}}function Y(t,e){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];return{type:"RESOLVE_SELECT",storeKey:t,selectorName:e,args:r}}function $(t,e){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];return{type:"DISPATCH",storeKey:t,actionName:e,args:r}}var X={API_FETCH:function(t){var e=t.request;return H()(e)},SELECT:Object(l.createRegistryControl)(function(t){return function(e){var n,r=e.storeKey,o=e.selectorName,i=e.args;return(n=t.select(r))[o].apply(n,Object(x.a)(i))}}),DISPATCH:Object(l.createRegistryControl)(function(t){return function(e){var n,r=e.storeKey,o=e.actionName,i=e.args;return(n=t.dispatch(r))[o].apply(n,Object(x.a)(i))}}),RESOLVE_SELECT:Object(l.createRegistryControl)(function(t){return function(e){var n=e.storeKey,r=e.selectorName,o=e.args;return new Promise(function(e){var i=function(){return t.select("core/data").hasFinishedResolution(n,r,o)},s=function(){return t.select(n)[r].apply(null,o)},a=s();if(i())return e(a);var c=t.subscribe(function(){i()&&(c(),e(s()))})})}})},Z=n(1);function J(t){var e=t.previousPost,n=t.post,r=t.postType;if(Object(v.get)(t.options,["isAutosave"]))return[];var o,i=["publish","private","future"],s=Object(v.includes)(i,e.status),a=Object(v.includes)(i,n.status),c=Object(v.get)(r,["viewable"],!1);if(s||a?s&&!a?(o=r.labels.item_reverted_to_draft,c=!1):o=!s&&a?{publish:r.labels.item_published,private:r.labels.item_published_privately,future:r.labels.item_scheduled}[n.status]:r.labels.item_updated:o=null,o){var u=[];return c&&u.push({label:r.labels.view_item,url:n.link}),[o,{id:S,actions:u}]}return[]}function tt(t){var e=t.post,n=t.edits,r=t.error;if(r&&"rest_autosave_no_changes"===r.code)return[];var o=["publish","private","future"],i=-1!==o.indexOf(e.status),s={publish:Object(Z.__)("Publishing failed"),private:Object(Z.__)("Publishing failed"),future:Object(Z.__)("Scheduling failed")};return[i||-1===o.indexOf(n.status)?Object(Z.__)("Updating failed"):s[n.status],{id:S}]}var et=W.a.mark(bt),nt=W.a.mark(mt),rt=W.a.mark(vt),ot=W.a.mark(Ot);function it(t,e,n){return{type:"SETUP_EDITOR",post:t,edits:e,template:n}}function st(t){return{type:"RESET_POST",post:t}}function at(t){return{type:"RESET_AUTOSAVE",post:t}}function ct(){var t=arguments.length>0&&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 W.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 W.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 W.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 W.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 W.a.mark(function e(){var n,r,o,i=arguments;return W.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(n=i.length,r=new Array(n),o=0;o<n;o++)r[o]=i[o];return e.next=3,$.apply(void 0,["core/block-editor",t].concat(r));case 3:case"end":return e.stop()}},e,this)})},Ut=Nt("resetBlocks"),Dt=Nt("receiveBlocks"),Ft=Nt("updateBlock"),Mt=Nt("updateBlockAttributes"),Vt=Nt("selectBlock"),zt=Nt("startMultiSelect"),Kt=Nt("stopMultiSelect"),Wt=Nt("multiSelect"),qt=Nt("clearSelectedBlock"),Ht=Nt("toggleSelection"),Gt=Nt("replaceBlocks"),Qt=Nt("replaceBlock"),Yt=Nt("moveBlocksDown"),$t=Nt("moveBlocksUp"),Xt=Nt("moveBlockToPosition"),Zt=Nt("insertBlock"),Jt=Nt("insertBlocks"),te=Nt("showInsertionPoint"),ee=Nt("hideInsertionPoint"),ne=Nt("setTemplateValidity"),re=Nt("synchronizeTemplate"),oe=Nt("mergeBlocks"),ie=Nt("removeBlocks"),se=Nt("removeBlock"),ae=Nt("toggleBlockMode"),ce=Nt("startTyping"),ue=Nt("stopTyping"),le=Nt("enterFormattedText"),de=Nt("exitFormattedText"),pe=Nt("insertDefaultBlock"),he=Nt("updateBlockListSettings"),fe=n(44),be=n(30),me=n(50),ve=n(66),Oe={};function ge(t){return t.editor.past.length>0}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(!qe(t))return null;var n=We(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(!qe(t))return!0;if(_e(t))return!0;var e=We(t);return["title","excerpt"].some(function(n){return e[n]!==Le(t,n)})}function We(t){return t.autosave}function qe(t){return!!We(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;s<o;s++)i[s-1]=arguments[s];return(r=e("core/block-editor"))[t].apply(r,i)}})}var Sn=En("getBlockDependantsCacheBust"),Pn=En("getBlockName"),wn=En("isBlockValid"),Tn=En("getBlockAttributes"),Cn=En("getBlock"),xn=En("getBlocks"),Bn=En("__unstableGetBlockWithoutInnerBlocks"),An=En("getClientIdsOfDescendants"),In=En("getClientIdsWithDescendants"),Ln=En("getGlobalBlockCount"),Rn=En("getBlocksByClientId"),Nn=En("getBlockCount"),Un=En("getBlockSelectionStart"),Dn=En("getBlockSelectionEnd"),Fn=En("getSelectedBlockCount"),Mn=En("hasSelectedBlock"),Vn=En("getSelectedBlockClientId"),zn=En("getSelectedBlock"),Kn=En("getBlockRootClientId"),Wn=En("getBlockHierarchyRootClientId"),qn=En("getAdjacentBlockClientId"),Hn=En("getPreviousBlockClientId"),Gn=En("getNextBlockClientId"),Qn=En("getSelectedBlocksInitialCaretPosition"),Yn=En("getMultiSelectedBlockClientIds"),$n=En("getMultiSelectedBlocks"),Xn=En("getFirstMultiSelectedBlockClientId"),Zn=En("getLastMultiSelectedBlockClientId"),Jn=En("isFirstMultiSelectedBlock"),tr=En("isBlockMultiSelected"),er=En("isAncestorMultiSelected"),nr=En("getMultiSelectedBlocksStartClientId"),rr=En("getMultiSelectedBlocksEndClientId"),or=En("getBlockOrder"),ir=En("getBlockIndex"),sr=En("isBlockSelected"),ar=En("hasSelectedInnerBlock"),cr=En("isBlockWithinSelection"),ur=En("hasMultiSelection"),lr=En("isMultiSelecting"),dr=En("isSelectionEnabled"),pr=En("getBlockMode"),hr=En("isTyping"),fr=En("isCaretWithinFormattedText"),br=En("getBlockInsertionPoint"),mr=En("isBlockInsertionPointVisible"),vr=En("isValidTemplate"),Or=En("getTemplate"),gr=En("getTemplateLock"),yr=En("canInsertBlockType"),jr=En("getInserterItems"),_r=En("hasInserterItems"),kr=En("getBlockListSettings"),Er=function(){var t=Object(fe.a)(W.a.mark(function t(e,n){var r,o,i,a,c;return W.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.id,o=n.dispatch,t.next=4,H()({path:"/wp/v2/types/wp_block"});case 4:if(i=t.sent){t.next=7;break}return t.abrupt("return");case 7:if(t.prev=7,!r){t.next=15;break}return t.next=11,H()({path:"/wp/v2/".concat(i.rest_base,"/").concat(r)});case 11:t.t0=t.sent,a=[t.t0],t.next=18;break;case 15:return t.next=17,H()({path:"/wp/v2/".concat(i.rest_base,"?per_page=-1")});case 17:a=t.sent;case 18:(c=Object(v.compact)(Object(v.map)(a,function(t){if("publish"!==t.status||t.content.protected)return null;var e=Object(s.parse)(t.content.raw);return{reusableBlock:{id:t.id,title:I(t.title)},parsedBlock:1===e.length?e[0]:Object(s.createBlock)("core/template",{},e)}}))).length&&o(Et(c)),o({type:"FETCH_REUSABLE_BLOCKS_SUCCESS",id:r}),t.next=26;break;case 23:t.prev=23,t.t1=t.catch(7),o({type:"FETCH_REUSABLE_BLOCKS_FAILURE",id:r,error:t.t1});case 26:case"end":return t.stop()}},t,this,[[7,23]])}));return function(e,n){return t.apply(this,arguments)}}(),Sr=function(){var t=Object(fe.a)(W.a.mark(function t(e,n){var r,o,i,a,c,u,d,p,h,f,b,m,v,O,g;return W.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,H()({path:"/wp/v2/types/wp_block"});case 2:if(r=t.sent){t.next=5;break}return t.abrupt("return");case 5:return o=e.id,i=n.dispatch,a=n.getState(),c=rn(a,o),u=c.clientId,d=c.title,p=c.isTemporary,h=Object(l.select)("core/block-editor").getBlock(u),f=Object(s.serialize)("core/template"===h.name?h.innerBlocks:h),b=p?{title:d,content:f,status:"publish"}:{id:o,title:d,content:f,status:"publish"},m=p?"/wp/v2/".concat(r.rest_base):"/wp/v2/".concat(r.rest_base,"/").concat(o),v=p?"POST":"PUT",t.prev=14,t.next=17,H()({path:m,data:b,method:v});case 17:O=t.sent,i({type:"SAVE_REUSABLE_BLOCK_SUCCESS",updatedId:O.id,id:o}),g=p?Object(Z.__)("Block created."):Object(Z.__)("Block updated."),Object(l.dispatch)("core/notices").createSuccessNotice(g,{id:"REUSABLE_BLOCK_NOTICE_ID"}),Object(l.dispatch)("core/block-editor").__unstableSaveReusableBlock(o,O.id),t.next=28;break;case 24:t.prev=24,t.t0=t.catch(14),i({type:"SAVE_REUSABLE_BLOCK_FAILURE",id:o}),Object(l.dispatch)("core/notices").createErrorNotice(t.t0.message,{id:"REUSABLE_BLOCK_NOTICE_ID"});case 28:case"end":return t.stop()}},t,this,[[14,24]])}));return function(e,n){return t.apply(this,arguments)}}(),Pr=function(){var t=Object(fe.a)(W.a.mark(function t(e,n){var r,o,i,a,c,u,d,p,h,f;return W.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,H()({path:"/wp/v2/types/wp_block"});case 2:if(r=t.sent){t.next=5;break}return t.abrupt("return");case 5:if(o=e.id,i=n.getState,a=n.dispatch,(c=rn(i(),o))&&!c.isTemporary){t.next=10;break}return t.abrupt("return");case 10:return u=Object(l.select)("core/block-editor").getBlocks(),d=u.filter(function(t){return Object(s.isReusableBlock)(t)&&t.attributes.ref===o}),p=d.map(function(t){return t.clientId}),h=Object(v.uniqueId)(),a({type:"REMOVE_REUSABLE_BLOCK",id:o,optimist:{type:b.BEGIN,id:h}}),Object(l.dispatch)("core/block-editor").removeBlocks([].concat(Object(x.a)(p),[c.clientId])),t.prev=16,t.next=19,H()({path:"/wp/v2/".concat(r.rest_base,"/").concat(o),method:"DELETE"});case 19:a({type:"DELETE_REUSABLE_BLOCK_SUCCESS",id:o,optimist:{type:b.COMMIT,id:h}}),f=Object(Z.__)("Block deleted."),Object(l.dispatch)("core/notices").createSuccessNotice(f,{id:"REUSABLE_BLOCK_NOTICE_ID"}),t.next=28;break;case 24:t.prev=24,t.t0=t.catch(16),a({type:"DELETE_REUSABLE_BLOCK_FAILURE",id:o,optimist:{type:b.REVERT,id:h}}),Object(l.dispatch)("core/notices").createErrorNotice(t.t0.message,{id:"REUSABLE_BLOCK_NOTICE_ID"});case 28:case"end":return t.stop()}},t,this,[[16,24]])}));return function(e,n){return t.apply(this,arguments)}}(),wr={SETUP_EDITOR:function(t){var e,n=t.post,r=t.edits,o=t.template;e=Object(v.has)(r,["content"])?r.content:n.content.raw;var i=Object(s.parse)(e);return"auto-draft"===n.status&&o&&(i=Object(s.synchronizeBlocksWithTemplate)(i,o)),[Lt(i),pt(n)]},FETCH_REUSABLE_BLOCKS:function(t,e){Er(t,e)},SAVE_REUSABLE_BLOCK:function(t,e){Sr(t,e)},DELETE_REUSABLE_BLOCK:function(t,e){Pr(t,e)},RECEIVE_REUSABLE_BLOCKS:function(t){Object(l.dispatch)("core/block-editor").receiveBlocks(Object(v.map)(t.results,"parsedBlock"))},CONVERT_BLOCK_TO_STATIC:function(t,e){var n,r=e.getState(),o=Object(l.select)("core/block-editor").getBlock(t.clientId),i=rn(r,o.attributes.ref),a=Object(l.select)("core/block-editor").getBlock(i.clientId);n="core/template"===a.name?a.innerBlocks.map(function(t){return Object(s.cloneBlock)(t)}):[Object(s.cloneBlock)(a)],Object(l.dispatch)("core/block-editor").replaceBlocks(o.clientId,n)},CONVERT_BLOCK_TO_REUSABLE:function(t,e){var n,r=e.dispatch;1===t.clientIds.length?n=Object(l.select)("core/block-editor").getBlock(t.clientIds[0]):(n=Object(s.createBlock)("core/template",{},Object(l.select)("core/block-editor").getBlocksByClientId(t.clientIds)),Object(l.dispatch)("core/block-editor").receiveBlocks([n]));var o={id:Object(v.uniqueId)("reusable"),clientId:n.clientId,title:Object(Z.__)("Untitled Reusable Block")};r(Et([{reusableBlock:o,parsedBlock:n}])),r(St(o.id)),Object(l.dispatch)("core/block-editor").replaceBlocks(t.clientIds,Object(s.createBlock)("core/block",{ref:o.id})),Object(l.dispatch)("core/block-editor").receiveBlocks([n])}};var Tr=function(t){var e,n=[M()(wr),z.a],r=function(){throw new Error("Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")},o={getState:t.getState,dispatch:function(){return r.apply(void 0,arguments)}};return e=n.map(function(t){return t(o)}),r=v.flowRight.apply(void 0,Object(x.a)(e))(t.dispatch),t.dispatch=r,t},Cr=Object(l.registerStore)(k,{reducer:D,selectors:o,actions:r,controls:X,persist:["preferences"]});Tr(Cr);var xr=n(26),Br=n(0);function Ar(){return Object(l.select)("core/block-editor").getBlockInsertionPoint().rootClientId}function Ir(t){return Object(l.select)("core/block-editor").getInserterItems(t)}function Lr(){var t=Object(l.select)("core/block-editor"),e=t.getSelectedBlockClientId,n=t.getBlockName,r=e();return r?n(r):null}var Rr=function(){var t=arguments.length>0&&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),Wr=n(12),qr=n(13),Hr=n(6),Gr=function(t){function e(){return Object(Vr.a)(this,e),Object(Kr.a)(this,Object(Wr.a)(e).apply(this,arguments))}return Object(qr.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(Wr.a)(e).apply(this,arguments))).undoOrRedo=t.undoOrRedo.bind(Object(io.a)(Object(io.a)(t))),t}return Object(qr.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(Wr.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(qr.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(Wr.a)(e).apply(this,arguments))).setAuthorId=t.setAuthorId.bind(Object(io.a)(Object(io.a)(t))),t}return Object(qr.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})}}}),Wo=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 qo=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)(qo,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(Wr.a)(e).apply(this,arguments))).openPreviewWindow=t.openPreviewWindow.bind(Object(io.a)(Object(io.a)(t))),t}return Object(qr.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<style>\n\t\t\tbody {\n\t\t\t\tmargin: 0;\n\t\t\t}\n\t\t\t.editor-post-preview-button__interstitial-message {\n\t\t\t\tdisplay: flex;\n\t\t\t\tflex-direction: column;\n\t\t\t\talign-items: center;\n\t\t\t\tjustify-content: center;\n\t\t\t\theight: 100vh;\n\t\t\t\twidth: 100vw;\n\t\t\t}\n\t\t\t@-webkit-keyframes paint {\n\t\t\t\t0% {\n\t\t\t\t\tstroke-dashoffset: 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\t@-moz-keyframes paint {\n\t\t\t\t0% {\n\t\t\t\t\tstroke-dashoffset: 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\t@-o-keyframes paint {\n\t\t\t\t0% {\n\t\t\t\t\tstroke-dashoffset: 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\t@keyframes paint {\n\t\t\t\t0% {\n\t\t\t\t\tstroke-dashoffset: 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\t.editor-post-preview-button__interstitial-message svg {\n\t\t\t\twidth: 192px;\n\t\t\t\theight: 192px;\n\t\t\t\tstroke: #555d66;\n\t\t\t\tstroke-width: 0.75;\n\t\t\t}\n\t\t\t.editor-post-preview-button__interstitial-message svg .outer,\n\t\t\t.editor-post-preview-button__interstitial-message svg .inner {\n\t\t\t\tstroke-dasharray: 280;\n\t\t\t\tstroke-dashoffset: 280;\n\t\t\t\t-webkit-animation: paint 1.5s ease infinite alternate;\n\t\t\t\t-moz-animation: paint 1.5s ease infinite alternate;\n\t\t\t\t-o-animation: paint 1.5s ease infinite alternate;\n\t\t\t\tanimation: paint 1.5s ease infinite alternate;\n\t\t\t}\n\t\t\tp {\n\t\t\t\ttext-align: center;\n\t\t\t\tfont-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;\n\t\t\t}\n\t\t</style>\n\t',n=Object(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(Wr.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(qr.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(Wr.a)(e).call(this,t))).buttonNode=Object(Br.createRef)(),n}return Object(qr.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(Wr.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(qr.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(Wr.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(qr.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(Wr.a)(e).call(this,t))).state={hadTagsWhenOpeningThePanel:t.hasTags},n}return Object(qr.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(Wr.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(qr.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(Wr.a)(e).apply(this,arguments))).onSubmit=t.onSubmit.bind(Object(io.a)(Object(io.a)(t))),t}return Object(qr.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(Wr.a)(e).apply(this,arguments))).state={forceSavedMessage:!1},t}return Object(qr.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(Wr.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(qr.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;r<e.length;r++)n++,void 0!==e[r].children&&(n+=t(e[r].children));return n}(r),i=Object(Z.sprintf)(Object(Z._n)("%d result found.","%d results found.",o),o);this.props.debouncedSpeak(i,"assertive")}},{key:"getFilterMatcher",value:function(t){return function e(n){if(""===t)return n;var r=Object(h.a)({},n);return r.children.length>0&&(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(60),Ki=n.n(zi),Wi=function(t){function e(){var t;return Object(Vr.a)(this,e),(t=Object(Kr.a)(this,Object(Wr.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(qr.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),qi=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])(Wi),Hi=n(56),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(Wr.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(qr.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(Wr.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(qr.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(Wr.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(qr.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(97);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(Wr.a)(e).apply(this,arguments))).warnIfUnsavedChanges=t.warnIfUnsavedChanges.bind(Object(io.a)(Object(io.a)(t))),t}return Object(qr.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(221),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;r<o;r++)n+=this.visit(t[r]),e&&r<o-1&&(n+=this.emit(e));return n};var _s=ks;function ks(t){ys.call(this,t)}gs()(ks,ys),ks.prototype.compile=function(t){return t.stylesheet.rules.map(this.visit,this).join("")},ks.prototype.comment=function(t){return this.emit("",t.position)},ks.prototype.import=function(t){return this.emit("@import "+t.import+";",t.position)},ks.prototype.media=function(t){return this.emit("@media "+t.media,t.position)+this.emit("{")+this.mapVisit(t.rules)+this.emit("}")},ks.prototype.document=function(t){var e="@"+(t.vendor||"")+"document "+t.document;return this.emit(e,t.position)+this.emit("{")+this.mapVisit(t.rules)+this.emit("}")},ks.prototype.charset=function(t){return this.emit("@charset "+t.charset+";",t.position)},ks.prototype.namespace=function(t){return this.emit("@namespace "+t.namespace+";",t.position)},ks.prototype.supports=function(t){return this.emit("@supports "+t.supports,t.position)+this.emit("{")+this.mapVisit(t.rules)+this.emit("}")},ks.prototype.keyframes=function(t){return this.emit("@"+(t.vendor||"")+"keyframes "+t.name,t.position)+this.emit("{")+this.mapVisit(t.keyframes)+this.emit("}")},ks.prototype.keyframe=function(t){var e=t.declarations;return this.emit(t.values.join(","),t.position)+this.emit("{")+this.mapVisit(e)+this.emit("}")},ks.prototype.page=function(t){var e=t.selectors.length?t.selectors.join(", "):"";return this.emit("@page "+e,t.position)+this.emit("{")+this.mapVisit(t.declarations)+this.emit("}")},ks.prototype["font-face"]=function(t){return this.emit("@font-face",t.position)+this.emit("{")+this.mapVisit(t.declarations)+this.emit("}")},ks.prototype.host=function(t){return this.emit("@host",t.position)+this.emit("{")+this.mapVisit(t.rules)+this.emit("}")},ks.prototype["custom-media"]=function(t){return this.emit("@custom-media "+t.name+" "+t.media+";",t.position)},ks.prototype.rule=function(t){var e=t.declarations;return e.length?this.emit(t.selectors.join(","),t.position)+this.emit("{")+this.mapVisit(e)+this.emit("}"):""},ks.prototype.declaration=function(t){return this.emit(t.property+":"+t.value,t.position)+this.emit(";")};var Es=Ss;function Ss(t){t=t||{},ys.call(this,t),this.indentation=t.indent}gs()(Ss,ys),Ss.prototype.compile=function(t){return this.stylesheet(t)},Ss.prototype.stylesheet=function(t){return this.mapVisit(t.stylesheet.rules,"\n\n")},Ss.prototype.comment=function(t){return this.emit(this.indent()+"/*"+t.comment+"*/",t.position)},Ss.prototype.import=function(t){return this.emit("@import "+t.import+";",t.position)},Ss.prototype.media=function(t){return this.emit("@media "+t.media,t.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(t.rules,"\n\n")+this.emit(this.indent(-1)+"\n}")},Ss.prototype.document=function(t){var e="@"+(t.vendor||"")+"document "+t.document;return this.emit(e,t.position)+this.emit("  {\n"+this.indent(1))+this.mapVisit(t.rules,"\n\n")+this.emit(this.indent(-1)+"\n}")},Ss.prototype.charset=function(t){return this.emit("@charset "+t.charset+";",t.position)},Ss.prototype.namespace=function(t){return this.emit("@namespace "+t.namespace+";",t.position)},Ss.prototype.supports=function(t){return this.emit("@supports "+t.supports,t.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(t.rules,"\n\n")+this.emit(this.indent(-1)+"\n}")},Ss.prototype.keyframes=function(t){return this.emit("@"+(t.vendor||"")+"keyframes "+t.name,t.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(t.keyframes,"\n")+this.emit(this.indent(-1)+"}")},Ss.prototype.keyframe=function(t){var e=t.declarations;return this.emit(this.indent())+this.emit(t.values.join(", "),t.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(e,"\n")+this.emit(this.indent(-1)+"\n"+this.indent()+"}\n")},Ss.prototype.page=function(t){var e=t.selectors.length?t.selectors.join(", ")+" ":"";return this.emit("@page "+e,t.position)+this.emit("{\n")+this.emit(this.indent(1))+this.mapVisit(t.declarations,"\n")+this.emit(this.indent(-1))+this.emit("\n}")},Ss.prototype["font-face"]=function(t){return this.emit("@font-face ",t.position)+this.emit("{\n")+this.emit(this.indent(1))+this.mapVisit(t.declarations,"\n")+this.emit(this.indent(-1))+this.emit("\n}")},Ss.prototype.host=function(t){return this.emit("@host",t.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(t.rules,"\n\n")+this.emit(this.indent(-1)+"\n}")},Ss.prototype["custom-media"]=function(t){return this.emit("@custom-media "+t.name+" "+t.media+";",t.position)},Ss.prototype.rule=function(t){var e=this.indent(),n=t.declarations;return n.length?this.emit(t.selectors.map(function(t){return e+t}).join(",\n"),t.position)+this.emit(" {\n")+this.emit(this.indent(1))+this.mapVisit(n,"\n")+this.emit(this.indent(-1))+this.emit("\n"+this.indent()+"}"):""},Ss.prototype.declaration=function(t){return this.emit(this.indent())+this.emit(t.property+": "+t.value,t.position)+this.emit(";")},Ss.prototype.indent=function(t){return this.level=this.level||1,null!==t?(this.level+=t,""):Array(this.level).join(this.indentation||"  ")};var Ps=function(t,e){return((e=e||{}).compress?new _s(e):new Es(e)).compile(t)};var ws=function(t,e){try{var n=ms(t),r=fs.a.map(n,function(t){if(!t)return t;var n=e(t);return this.update(n)});return Ps(r)}catch(t){return console.warn("Error while traversing the CSS: "+t),null}},Ts=n(83);function Cs(t){return 0!==t.value.indexOf("data:")&&0!==t.value.indexOf("#")&&(e=t.value,!/^\/(?!\/)/.test(e)&&!function(t){return/^(?:https?:)?\/\//.test(t)}(t.value));var e}function xs(t){return function(e){var n=function(t,e){var n=Object(Ts.parse)(t).pathname;return Object(Ts.resolve)(e,n)}(e.value,t);return Object(h.a)({},e,{newUrl:"url("+e.before+e.quote+n+e.quote+e.after+")"})}}var Bs=function(t){return function(e){if("declaration"===e.type){var n=function(t){for(var e,n=/url\((\s*)(['"]?)(.+?)\2(\s*)\)/g,r=[];null!==(e=n.exec(t));){var o={source:e[0],before:e[1],quote:e[2],value:e[3],after:e[4]};Cs(o)&&r.push(o)}return r}(e.value).map(xs(t));return Object(h.a)({},e,{value:(r=e.value,o=n,o.forEach(function(t){r=r.replace(t.source,t.newUrl)}),r)})}var r,o;return e}},As=/^(body|html|:root).*$/,Is=function(t){var e=arguments.length>1&&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)(W.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 W.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(Wr.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(qr.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 Wo}),n.d(e,"PostFeaturedImageCheck",function(){return Uo}),n.d(e,"PostFormat",function(){return Go}),n.d(e,"PostFormatCheck",function(){return qo}),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 qi}),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})},35:function(t,e){!function(){t.exports=this.wp.blob}()},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<c;s++)if(a.args[s]!==arguments[s]){a=a.next;continue t}return a!==r&&(a===o&&(o=a.prev),a.prev.next=a.next,a.next&&(a.next.prev=a.prev),a.next=r,a.prev=null,r.prev=a,r=a),a.val}a=a.next}for(e=new Array(c),s=0;s<c;s++)e[s]=arguments[s];return a={args:e,val:t.apply(null,e)},r?(r.prev=a,a.next=r):o=a,i===n?(o=o.prev).next=null:i++,r=a,a.val}return e&&e.maxSize&&(n=e.maxSize),s.clear=function(){r=null,o=null,i=0},s}},44:function(t,e,n){"use strict";function r(t,e,n,r,o,i,s){try{var a=t[i](s),c=a.value}catch(t){return void n(t)}a.done?e(c):Promise.resolve(c).then(r,o)}function o(t){return function(){var e=this,n=arguments;return new Promise(function(o,i){var s=t.apply(e,n);function a(t){r(s,o,i,a,c,"next",t)}function c(t){r(s,o,i,a,c,"throw",t)}a(void 0)})}}n.d(e,"a",function(){return o})},49:function(t,e){!function(){t.exports=this.wp.deprecated}()},5:function(t,e){!function(){t.exports=this.wp.data}()},50:function(t,e){!function(){t.exports=this.wp.date}()},54:function(t,e,n){var r=function(t){"use strict";var e,n=Object.prototype,r=n.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",a=o.toStringTag||"@@toStringTag";function c(t,e,n,r){var o=e&&e.prototype instanceof b?e:b,i=Object.create(o.prototype),s=new w(r||[]);return i._invoke=function(t,e,n){var r=l;return function(o,i){if(r===p)throw new Error("Generator is already running");if(r===h){if("throw"===o)throw i;return C()}for(n.method=o,n.arg=i;;){var s=n.delegate;if(s){var a=E(s,n);if(a){if(a===f)continue;return a}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===l)throw r=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=p;var c=u(t,e,n);if("normal"===c.type){if(r=n.done?h:d,c.arg===f)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r=h,n.method="throw",n.arg=c.arg)}}}(t,n,s),i}function u(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var l="suspendedStart",d="suspendedYield",p="executing",h="completed",f={};function b(){}function m(){}function v(){}var O={};O[i]=function(){return this};var g=Object.getPrototypeOf,y=g&&g(g(T([])));y&&y!==n&&r.call(y,i)&&(O=y);var j=v.prototype=b.prototype=Object.create(O);function _(t){["next","throw","return"].forEach(function(e){t[e]=function(t){return this._invoke(e,t)}})}function k(t){var e;this._invoke=function(n,o){function i(){return new Promise(function(e,i){!function e(n,o,i,s){var a=u(t[n],t,o);if("throw"!==a.type){var c=a.arg,l=c.value;return l&&"object"==typeof l&&r.call(l,"__await")?Promise.resolve(l.__await).then(function(t){e("next",t,i,s)},function(t){e("throw",t,i,s)}):Promise.resolve(l).then(function(t){c.value=t,i(c)},function(t){return e("throw",t,i,s)})}s(a.arg)}(n,o,e,i)})}return e=e?e.then(i,i):i()}}function E(t,n){var r=t.iterator[n.method];if(r===e){if(n.delegate=null,"throw"===n.method){if(t.iterator.return&&(n.method="return",n.arg=e,E(t,n),"throw"===n.method))return f;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var o=u(r,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,f;var i=o.arg;return i?i.done?(n[t.resultName]=i.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,f):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,f)}function S(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 P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function w(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function T(t){if(t){var n=t[i];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,s=function n(){for(;++o<t.length;)if(r.call(t,o))return n.value=t[o],n.done=!1,n;return n.value=e,n.done=!0,n};return s.next=s}}return{next:C}}function C(){return{value:e,done:!0}}return m.prototype=j.constructor=v,v.constructor=m,v[a]=m.displayName="GeneratorFunction",t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===m||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,a in t||(t[a]="GeneratorFunction")),t.prototype=Object.create(j),t},t.awrap=function(t){return{__await:t}},_(k.prototype),k.prototype[s]=function(){return this},t.AsyncIterator=k,t.async=function(e,n,r,o){var i=new k(c(e,n,r,o));return t.isGeneratorFunction(n)?i:i.next().then(function(t){return t.done?t.value:i.next()})},_(j),j[a]="Generator",j[i]=function(){return this},j.toString=function(){return"[object Generator]"},t.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}},t.values=T,w.prototype={constructor:w,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(P),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},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 n=this;function o(r,o){return a.type="throw",a.arg=t,n.next=r,o&&(n.method="next",n.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var s=this.tryEntries[i],a=s.completion;if("root"===s.tryLoc)return o("end");if(s.tryLoc<=this.prev){var c=r.call(s,"catchLoc"),u=r.call(s,"finallyLoc");if(c&&u){if(this.prev<s.catchLoc)return o(s.catchLoc,!0);if(this.prev<s.finallyLoc)return o(s.finallyLoc)}else if(c){if(this.prev<s.catchLoc)return o(s.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return o(s.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var s=i?i.completion:{};return s.type=t,s.arg=e,i?(this.method="next",this.next=i.finallyLoc,f):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),P(n),f}},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;P(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:T(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),f}},t}(t.exports);try{regeneratorRuntime=r}catch(t){Function("r","regeneratorRuntime = r")(r)}},56:function(t,e){!function(){t.exports=this.wp.htmlEntities}()},58:function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},59:function(t,e){!function(){t.exports=this.wp.nux}()},6:function(t,e){!function(){t.exports=this.wp.compose}()},60:function(t,e,n){"use strict";e.__esModule=!0;var r=n(111);e.default=r.default},61:function(t,e,n){t.exports=n(327)},66:function(t,e){!function(){t.exports=this.wp.autop}()},7:function(t,e,n){"use strict";n.d(e,"a",function(){return o});var r=n(15);function o(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},o=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(n).filter(function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable}))),o.forEach(function(e){Object(r.a)(t,e,n[e])})}return t}},70:function(t,e,n){"use strict";t.exports=function(t){var e,n={};return function t(e,n){var r;if(Array.isArray(n))for(r=0;r<n.length;r++)t(e,n[r]);else for(r in n)e[r]=(e[r]||[]).concat(n[r])}(n,t),(e=function(t){return function(e){return function(r){var o,i,s=n[r.type],a=e(r);if(s)for(o=0;o<s.length;o++)(i=s[o](r,t))&&t.dispatch(i);return a}}}).effects=n,e}},72:function(t,e){!function(){t.exports=this.wp.coreData}()},8:function(t,e){!function(){t.exports=this.wp.blockEditor}()},83:function(t,e,n){"use strict";var r=n(117),o=n(119);function i(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}e.parse=g,e.resolve=function(t,e){return g(t,!1,!0).resolve(e)},e.resolveObject=function(t,e){return t?g(t,!1,!0).resolveObject(e):e},e.format=function(t){o.isString(t)&&(t=g(t));return t instanceof i?t.format():i.prototype.format.call(t)},e.Url=i;var s=/^([a-z0-9.+-]+:)/i,a=/:[0-9]*$/,c=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,u=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\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&&i<t.indexOf("#")?"?":"#",u=t.split(a);u[0]=u[0].replace(/\\/g,"/");var g=t=u.join(a);if(g=g.trim(),!n&&1===t.split("#").length){var y=c.exec(g);if(y)return this.path=g,this.href=g,this.pathname=y[1],y[2]?(this.search=y[2],this.query=e?O.parse(this.search.substr(1)):this.search.substr(1)):e&&(this.search="",this.query={}),this}var j=s.exec(g);if(j){var _=(j=j[0]).toLowerCase();this.protocol=_,g=g.substr(j.length)}if(n||j||g.match(/^\/\/[^@\/]+@[^@\/]+/)){var k="//"===g.substr(0,2);!k||j&&m[j]||(g=g.substr(2),this.slashes=!0)}if(!m[j]&&(k||j&&!v[j])){for(var E,S,P=-1,w=0;w<p.length;w++){-1!==(T=g.indexOf(p[w]))&&(-1===P||T<P)&&(P=T)}-1!==(S=-1===P?g.lastIndexOf("@"):g.lastIndexOf("@",P))&&(E=g.slice(0,S),g=g.slice(S+1),this.auth=decodeURIComponent(E)),P=-1;for(w=0;w<d.length;w++){var T;-1!==(T=g.indexOf(d[w]))&&(-1===P||T<P)&&(P=T)}-1===P&&(P=g.length),this.host=g.slice(0,P),g=g.slice(P),this.parseHost(),this.hostname=this.hostname||"";var C="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!C)for(var x=this.hostname.split(/\./),B=(w=0,x.length);w<B;w++){var A=x[w];if(A&&!A.match(h)){for(var I="",L=0,R=A.length;L<R;L++)A.charCodeAt(L)>127?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;w<B;w++){var V=l[w];if(-1!==g.indexOf(V)){var z=encodeURIComponent(V);z===V&&(z=escape(V)),g=g.split(V).join(z)}}var K=g.indexOf("#");-1!==K&&(this.hash=g.substr(K),g=g.slice(0,K));var W=g.indexOf("?");if(-1!==W?(this.search=g.substr(W),this.query=g.substr(W+1),e&&(this.query=O.parse(this.query)),g=g.slice(0,W)):e&&(this.search="",this.query={}),g&&(this.pathname=g),v[_]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){F=this.pathname||"";var q=this.search||"";this.path=F+q}return this.href=this.format(),this},i.prototype.format=function(){var t=this.auth||"";t&&(t=(t=encodeURIComponent(t)).replace(/%3A/i,":"),t+="@");var e=this.protocol||"",n=this.pathname||"",r=this.hash||"",i=!1,s="";this.host?i=t+this.host:this.hostname&&(i=t+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(i+=":"+this.port)),this.query&&o.isObject(this.query)&&Object.keys(this.query).length&&(s=O.stringify(this.query));var a=this.search||s&&"?"+s||"";return e&&":"!==e.substr(-1)&&(e+=":"),this.slashes||(!e||v[e])&&!1!==i?(i="//"+(i||""),n&&"/"!==n.charAt(0)&&(n="/"+n)):i||(i=""),r&&"#"!==r.charAt(0)&&(r="#"+r),a&&"?"!==a.charAt(0)&&(a="?"+a),e+i+(n=n.replace(/[?#]/g,function(t){return encodeURIComponent(t)}))+(a=a.replace("#","%23"))+r},i.prototype.resolve=function(t){return this.resolveObject(g(t,!1,!0)).format()},i.prototype.resolveObject=function(t){if(o.isString(t)){var e=new i;e.parse(t,!1,!0),t=e}for(var n=new i,r=Object.keys(this),s=0;s<r.length;s++){var a=r[s];n[a]=this[a]}if(n.hash=t.hash,""===t.href)return n.href=n.format(),n;if(t.slashes&&!t.protocol){for(var c=Object.keys(t),u=0;u<c.length;u++){var l=c[u];"protocol"!==l&&(n[l]=t[l])}return v[n.protocol]&&n.hostname&&!n.pathname&&(n.path=n.pathname="/"),n.href=n.format(),n}if(t.protocol&&t.protocol!==n.protocol){if(!v[t.protocol]){for(var d=Object.keys(t),p=0;p<d.length;p++){var h=d[p];n[h]=t[h]}return n.href=n.format(),n}if(n.protocol=t.protocol,t.host||m[t.protocol])n.pathname=t.pathname;else{for(var f=(t.pathname||"").split("/");f.length&&!(t.host=f.shift()););t.host||(t.host=""),t.hostname||(t.hostname=""),""!==f[0]&&f.unshift(""),f.length<2&&f.unshift(""),n.pathname=f.join("/")}if(n.search=t.search,n.query=t.query,n.host=t.host||"",n.auth=t.auth,n.hostname=t.hostname||t.host,n.port=t.port,n.pathname||n.search){var b=n.pathname||"",O=n.search||"";n.path=b+O}return n.slashes=n.slashes||t.slashes,n.href=n.format(),n}var g=n.pathname&&"/"===n.pathname.charAt(0),y=t.host||t.pathname&&"/"===t.pathname.charAt(0),j=y||g||n.host&&t.pathname,_=j,k=n.pathname&&n.pathname.split("/")||[],E=(f=t.pathname&&t.pathname.split("/")||[],n.protocol&&!v[n.protocol]);if(E&&(n.hostname="",n.port=null,n.host&&(""===k[0]?k[0]=n.host:k.unshift(n.host)),n.host="",t.protocol&&(t.hostname=null,t.port=null,t.host&&(""===f[0]?f[0]=t.host:f.unshift(t.host)),t.host=null),j=j&&(""===f[0]||""===k[0])),y)n.host=t.host||""===t.host?t.host:n.host,n.hostname=t.hostname||""===t.hostname?t.hostname:n.hostname,n.search=t.search,n.query=t.query,k=f;else if(f.length)k||(k=[]),k.pop(),k=k.concat(f),n.search=t.search,n.query=t.query;else if(!o.isNullOrUndefined(t.search)){if(E)n.hostname=n.host=k.shift(),(C=!!(n.host&&n.host.indexOf("@")>0)&&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)}},88:function(t,e,n){"use strict";var r=n(89);function o(){}function i(){}i.resetWarningCache=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,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:i,resetWarningCache:o};return n.PropTypes=n,n}},89:function(t,e,n){"use strict";t.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},9:function(t,e,n){"use strict";function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function o(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),t}n.d(e,"a",function(){return o})},96:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){var e=t.dispatch;return function(t){return function(n){return Array.isArray(n)?n.filter(Boolean).map(e):t(n)}}}},97:function(t,e){!function(){t.exports=this.wp.wordcount}()}});


Generated: Wed Sep 18 01:00:03 2019 Cross-referenced by PHPXref 0.7.1