1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2?arguments[2]:void 0,r=document.implementation.createHTMLDocument("");return r.body.innerHTML=e,function e(t,n,r,o){Array.from(t).forEach((function(t){e(t.childNodes,n,r,o),n.forEach((function(e){r.contains(t)&&e(t,r,o)}))}))}(r.body.childNodes,t,r,n),r.body.innerHTML}function Bh(e,t,n){var r=document.implementation.createHTMLDocument("");return r.body.innerHTML=e,function e(t,n,r,o){Array.from(t).forEach((function(t){var i=t.nodeName.toLowerCase();if(!r.hasOwnProperty(i)||r[i].isMatch&&!r[i].isMatch(t))e(t.childNodes,n,r,o),o&&!Rh(t)&&t.nextElementSibling&&ca(n.createElement("br"),t),la(t);else if(t.nodeType===Ah){var a=r[i],s=a.attributes,c=void 0===s?[]:s,l=a.classes,u=void 0===l?[]:l,d=a.children,f=a.require,h=void 0===f?[]:f,p=a.allowEmpty;if(d&&!p&&Hh(t))return void sa(t);if(t.hasAttributes()&&(Array.from(t.attributes).forEach((function(e){var n=e.name;"class"===n||Object(N.includes)(c,n)||t.removeAttribute(n)})),t.classList&&t.classList.length)){var v=u.map((function(e){return"string"==typeof e?function(t){return t===e}:e instanceof RegExp?function(t){return e.test(t)}:N.noop}));Array.from(t.classList).forEach((function(e){v.some((function(t){return t(e)}))||t.classList.remove(e)})),t.classList.length||t.removeAttribute("class")}if(t.hasChildNodes()){if("*"===d)return;if(d)h.length&&!t.querySelector(h.join(","))?(e(t.childNodes,n,r,o),la(t)):"BODY"===t.parentNode.nodeName&&Rh(t)?(e(t.childNodes,n,r,o),Array.from(t.childNodes).some((function(e){return!Rh(e)}))&&la(t)):e(t.childNodes,n,d,o);else for(;t.firstChild;)sa(t.firstChild)}}}))}(r.body.childNodes,r,t,n),r.body.innerHTML}var Uh=window.Node,Wh=Uh.ELEMENT_NODE,Kh=Uh.TEXT_NODE,Yh=function(e){var t=document.implementation.createHTMLDocument(""),n=document.implementation.createHTMLDocument(""),r=t.body,o=n.body;for(r.innerHTML=e;r.firstChild;){var i=r.firstChild;i.nodeType===Kh?i.nodeValue.trim()?(o.lastChild&&"P"===o.lastChild.nodeName||o.appendChild(n.createElement("P")),o.lastChild.appendChild(i)):r.removeChild(i):i.nodeType===Wh?"BR"===i.nodeName?(i.nextSibling&&"BR"===i.nextSibling.nodeName&&(o.appendChild(n.createElement("P")),r.removeChild(i.nextSibling)),o.lastChild&&"P"===o.lastChild.nodeName&&o.lastChild.hasChildNodes()?o.lastChild.appendChild(i):r.removeChild(i)):"P"===i.nodeName?Hh(i)?r.removeChild(i):o.appendChild(i):Rh(i)?(o.lastChild&&"P"===o.lastChild.nodeName||o.appendChild(n.createElement("P")),o.lastChild.appendChild(i)):o.appendChild(i):r.removeChild(i)}return o.innerHTML},$h=window.Node.COMMENT_NODE,qh=function(e,t){if(e.nodeType===$h)if("nextpage"!==e.nodeValue){if(0===e.nodeValue.indexOf("more")){for(var n=e.nodeValue.slice(4).trim(),r=e,o=!1;r=r.nextSibling;)if(r.nodeType===$h&&"noteaser"===r.nodeValue){o=!0,sa(r);break}aa(e,function(e,t,n){var r=n.createElement("wp-block");r.dataset.block="core/more",e&&(r.dataset.customText=e);t&&(r.dataset.noTeaser="");return r}(n,o,t))}}else aa(e,function(e){var t=e.createElement("wp-block");return t.dataset.block="core/nextpage",t}(t))};function Gh(e){return"OL"===e.nodeName||"UL"===e.nodeName}var Zh=function(e){if(Gh(e)){var t=e,n=e.previousElementSibling;if(n&&n.nodeName===e.nodeName&&1===t.children.length){for(;t.firstChild;)n.appendChild(t.firstChild);t.parentNode.removeChild(t)}var r,o=e.parentNode;if(o&&"LI"===o.nodeName&&1===o.children.length&&!/\S/.test((r=o,lt(r.childNodes).map((function(e){var t=e.nodeValue;return void 0===t?"":t})).join("")))){var i=o,a=i.previousElementSibling,s=i.parentNode;a?(a.appendChild(t),s.removeChild(i)):(s.parentNode.insertBefore(t,s),s.parentNode.removeChild(s))}if(o&&Gh(o)){var c=e.previousElementSibling;c?c.appendChild(e):la(e)}}},Xh=function(e){"BLOCKQUOTE"===e.nodeName&&(e.innerHTML=Yh(e.innerHTML))};var Qh=function(e,t,n){if(function(e,t){var n=e.nodeName.toLowerCase();return"figcaption"!==n&&!Rh(e)&&Object(N.has)(t,["figure","children",n])}(e,n)){var r=e,o=e.parentNode;(function(e,t){var n=e.nodeName.toLowerCase();return Object(N.has)(t,["figure","children","a","children",n])})(e,n)&&"A"===o.nodeName&&1===o.childNodes.length&&(r=e.parentNode);for(var i=r;i&&"P"!==i.nodeName;)i=i.parentElement;var a=t.createElement("figure");i?i.parentNode.insertBefore(a,i):r.parentNode.insertBefore(a,r),a.appendChild(r)}},Jh=n(48),ep=n.n(Jh);function tp(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=np(e);r.lastIndex=n;var o=r.exec(t);if(o){if("["===o[1]&&"]"===o[7])return tp(e,t,r.lastIndex);var i={index:o.index,content:o[0],shortcode:op(o)};return o[1]&&(i.content=i.content.slice(1),i.index++),o[7]&&(i.content=i.content.slice(0,-1)),i}}function np(e){return new RegExp("\\[(\\[?)("+e+")(?![\\w-])([^\\]\\/]*(?:\\/(?!\\])[^\\]\\/]*)*?)(?:(\\/)\\]|\\](?:([^\\[]*(?:\\[(?!\\/\\2\\])[^\\[]*)*)(\\[\\/\\2\\]))?)(\\]?)","g")}var rp=ep()((function(e){var t,n={},r=[],o=/([\w-]+)\s*=\s*"([^"]*)"(?:\s|$)|([\w-]+)\s*=\s*'([^']*)'(?:\s|$)|([\w-]+)\s*=\s*([^\s'"]+)(?:\s|$)|"([^"]*)"(?:\s|$)|'([^']*)'(?:\s|$)|(\S+)(?:\s|$)/g;for(e=e.replace(/[\u00a0\u200b]/g," ");t=o.exec(e);)t[1]?n[t[1].toLowerCase()]=t[2]:t[3]?n[t[3].toLowerCase()]=t[4]:t[5]?n[t[5].toLowerCase()]=t[6]:t[7]?r.push(t[7]):t[8]?r.push(t[8]):t[9]&&r.push(t[9]);return{named:n,numeric:r}}));function op(e){var t;return t=e[4]?"self-closing":e[6]?"closed":"single",new ip({tag:e[2],attrs:e[3],type:t,content:e[5]})}var ip=Object(N.extend)((function(e){var t=this;Object(N.extend)(this,Object(N.pick)(e||{},"tag","attrs","type","content"));var n=this.attrs;this.attrs={named:{},numeric:[]},n&&(Object(N.isString)(n)?this.attrs=rp(n):Object(N.isEqual)(Object.keys(n),["named","numeric"])?this.attrs=n:Object(N.forEach)(n,(function(e,n){t.set(n,e)})))}),{next:tp,replace:function(e,t,n){var r=arguments;return t.replace(np(e),(function(e,t,o,i,a,s,c,l){if("["===t&&"]"===l)return e;var u=n(op(r));return u?t+u+l:e}))},string:function(e){return new ip(e).string()},regexp:np,attrs:rp,fromMatch:op});Object(N.extend)(ip.prototype,{get:function(e){return this.attrs[Object(N.isNumber)(e)?"numeric":"named"][e]},set:function(e,t){return this.attrs[Object(N.isNumber)(e)?"numeric":"named"][e]=t,this},string:function(){var e="["+this.tag;return Object(N.forEach)(this.attrs.numeric,(function(t){/\s/.test(t)?e+=' "'+t+'"':e+=" "+t})),Object(N.forEach)(this.attrs.named,(function(t,n){e+=" "+n+'="'+t+'"'})),"single"===this.type?e+"]":"self-closing"===this.type?e+" /]":(e+="]",this.content&&(e+=this.content),e+"[/"+this.tag+"]")}});var ap=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=ef(tf("from"),(function(e){return"shortcode"===e.type&&Object(N.some)(Object(N.castArray)(e.tag),(function(e){return np(e).test(t)}))}));if(!r)return[t];var o,i=Object(N.castArray)(r.tag),a=Object(N.first)(i);if(o=tp(a,t,n)){var s=t.substr(0,o.index);if(n=o.index+o.content.length,!Object(N.includes)(o.shortcode.content||"","<")&&!/(\n|)\s*$/.test(s))return e(t,n);var c=Object(N.mapValues)(Object(N.pickBy)(r.attributes,(function(e){return e.shortcode})),(function(e){return e.shortcode(o.shortcode.attrs,o)}));return[s,$d(r.blockName,Dh(D({},Vd(r.blockName),{attributes:r.attributes}),o.shortcode.content,c))].concat(lt(e(t.substr(n))))}return[t]},sp=window.Node.COMMENT_NODE,cp=function(e){e.nodeType===sp&&sa(e)};function lp(e,t){return e.every((function(e){return function(e,t){if(Rh(e))return!0;if(!t)return!1;var n=e.nodeName.toLowerCase();return[["ul","li","ol"],["h1","h2","h3","h4","h5","h6"]].some((function(e){return 0===Object(N.difference)([n,t],e).length}))}(e,t)&&lp(Array.from(e.children),t)}))}function up(e){return"BR"===e.nodeName&&e.previousSibling&&"BR"===e.previousSibling.nodeName}var dp=function(e,t){var n=document.implementation.createHTMLDocument("");n.body.innerHTML=e;var r=Array.from(n.body.children);return!r.some(up)&&lp(r,t)},fp=function(e,t){if("SPAN"===e.nodeName&&e.style){var n=e.style,r=n.fontWeight,o=n.fontStyle,i=n.textDecorationLine,a=n.verticalAlign;"bold"!==r&&"700"!==r||da(t.createElement("strong"),e),"italic"===o&&da(t.createElement("em"),e),"line-through"===i&&da(t.createElement("s"),e),"super"===a?da(t.createElement("sup"),e):"sub"===a&&da(t.createElement("sub"),e)}else"B"===e.nodeName?e=ua(e,"strong"):"I"===e.nodeName?e=ua(e,"em"):"A"===e.nodeName&&(e.target&&"_blank"===e.target.toLowerCase()?e.rel="noreferrer noopener":(e.removeAttribute("target"),e.removeAttribute("rel")))},hp=function(e){"SCRIPT"!==e.nodeName&&"NOSCRIPT"!==e.nodeName&&"TEMPLATE"!==e.nodeName&&"STYLE"!==e.nodeName||e.parentNode.removeChild(e)},pp=window.parseInt;function vp(e){return"OL"===e.nodeName||"UL"===e.nodeName}var mp=function(e,t){if("P"===e.nodeName){var n=e.getAttribute("style");if(n&&-1!==n.indexOf("mso-list")){var r=/mso-list\s*:[^;]+level([0-9]+)/i.exec(n);if(r){var o=pp(r[1],10)-1||0,i=e.previousElementSibling;if(!i||!vp(i)){var a=e.textContent.trim().slice(0,1),s=/[1iIaA]/.test(a),c=t.createElement(s?"ol":"ul");s&&c.setAttribute("type",a),e.parentNode.insertBefore(c,e)}var l=e.previousElementSibling,u=l.nodeName,d=t.createElement("li"),f=l;for(e.removeChild(e.firstElementChild);e.firstChild;)d.appendChild(e.firstChild);for(;o--;)vp(f=f.lastElementChild||f)&&(f=f.lastElementChild||f);vp(f)||(f=f.appendChild(t.createElement(u))),f.appendChild(d),e.parentNode.removeChild(e)}}}},gp=window.URL,bp=gp.createObjectURL,yp=(gp.revokeObjectURL,{});function kp(e){var t=bp(e);return yp[t]=e,t}var _p=window,wp=_p.atob,Op=_p.File,Sp=function(e){if("IMG"===e.nodeName){if(0===e.src.indexOf("file:")&&(e.src=""),0===e.src.indexOf("data:")){var t,n=Ae(e.src.split(","),2),r=n[0],o=n[1],i=Ae(r.slice(5).split(";"),1)[0];if(!o||!i)return void(e.src="");try{t=wp(o)}catch(u){return void(e.src="")}for(var a=new Uint8Array(t.length),s=0;s]+>/,""),"INLINE"!==a){var u=n||o;if(-1!==u.indexOf("\x3c!-- wp:"))return Ih(u)}if(String.prototype.normalize&&(n=n.normalize()),!o||n&&!function(e){return!/<(?!br[ />])/i.test(e)}(n)||(n=Tp(o),"AUTO"===a&&-1===o.indexOf("\n")&&0!==o.indexOf("")&&0===n.indexOf("
")&&(a="INLINE")),"INLINE"===a)return jp(n);var d=ap(n),f=d.length>1;if("AUTO"===a&&!f&&dp(n,s))return jp(n);var h=Object(N.filter)(tf("from"),{type:"raw"}).map((function(e){return e.isMatch?e:D({},e,{isMatch:function(t){return e.selector&&t.matches(e.selector)}})})),p=Nh(),v=Fh(h),m=Object(N.compact)(Object(N.flatMap)(d,(function(e){if("string"!=typeof e)return e;var t=[Dp,mp,hp,Zh,Sp,fp,qh,cp,Qh,Xh];l||t.unshift(xp);var n=D({},v,p);return e=Bh(e=Vh(e,t,v),n),e=Yh(e),Mp.log("Processed HTML piece:\n\n",e),function(e){var t=e.html,n=e.rawTransforms,r=document.implementation.createHTMLDocument("");return r.body.innerHTML=t,Array.from(r.body.children).map((function(e){var t=ef(n,(function(t){return(0,t.isMatch)(e)}));if(!t)return $d("core/html",Dh("core/html",e.outerHTML));var r=t.transform,o=t.blockName;return r?r(e):$d(o,Dh(o,e.outerHTML))}))}({html:e,rawTransforms:h})})));if("AUTO"===a&&1===m.length){var g=o.trim();if(""!==g&&-1===g.indexOf("\n"))return Bh(Vf(m[0]),p)}return m}function Pp(e){var t=e.HTML,n=void 0===t?"":t;if(-1!==n.indexOf("\x3c!-- wp:"))return Ih(n);var r=ap(n),o=Object(N.filter)(tf("from"),{type:"raw"}).map((function(e){return e.isMatch?e:D({},e,{isMatch:function(t){return e.selector&&t.matches(e.selector)}})})),i=Fh(o);return Object(N.compact)(Object(N.flatMap)(r,(function(e){return"string"!=typeof e?e:(e=Vh(e,[Zh,qh,Qh,Xh],i),function(e){var t=e.html,n=e.rawTransforms,r=document.implementation.createHTMLDocument("");return r.body.innerHTML=t,Array.from(r.body.children).map((function(e){var t=ef(n,(function(t){return(0,t.isMatch)(e)}));if(!t)return $d("core/html",Dh("core/html",e.outerHTML));var r=t.transform,o=t.blockName;return r?r(e):$d(o,Dh(o,e.outerHTML))}))}({html:e=Yh(e),rawTransforms:o}))})))}function Np(){return id("core/blocks").getCategories()}function Rp(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;return t?Object(N.map)(t,(function(t,n){var r=Ae(t,3),o=r[0],i=r[1],a=r[2],s=e[n];if(s&&s.name===o)return D({},s,{innerBlocks:Rp(s.innerBlocks,a)});var c=Vd(o),l=function(e,t){return Object(N.mapValues)(t,(function(t,n){return u(e[n],t)}))},u=function(e,t){return n=e,"html"===Object(N.get)(n,["source"])&&Object(N.isArray)(t)?le(t):function(e){return"query"===Object(N.get)(e,["source"])}(e)&&t?t.map((function(t){return l(e.query,t)})):t;var n};return $d(o,l(Object(N.get)(c,["attributes"],{}),i),Rp([],a))})):e}function Lp(e){return Object(N.isPlainObject)(e)&&Object(N.isString)(e.type)}function Ap(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=Object(N.map)(e,(function(e,t){return function(n,r,o,i,a){if(c=t,!Lp(s=n)||s.type!==c)return!1;var s,c,l=e(n);return rt()(l)?l.then(i,a):i(l),!0}}));n.push((function(e,n){return!!Lp(e)&&(t(e),n(),!0)}));var r=Object(tt.create)(n);return function(e){return new Promise((function(n,o){return r(e,(function(e){Lp(e)&&t(e),n(e)}),o)}))}}function zp(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t){var n=Ap(e,t.dispatch);return function(e){return function(t){return(r=t)&&"Generator"===r[Symbol.toStringTag]?n(t):e(t);var r}}}}var Fp=function(){return function(e){return function(t){return rt()(t)?t.then((function(t){if(t)return e(t)})):e(t)}}},Hp=function(e,t){return function(){return function(n){return function(r){var o=e.select("core/data").getCachedResolvers(t);return Object.entries(o).forEach((function(n){var o=Ae(n,2),i=o[0],a=o[1],s=Object(N.get)(e.stores,[t,"resolvers",i]);s&&s.shouldInvalidate&&a.forEach((function(n,o){!1===n&&s.shouldInvalidate.apply(s,[r].concat(lt(o)))&&e.dispatch("core/data").invalidateResolution(t,i,o)}))})),n(r)}}}},Vp=Object(N.flowRight)([function(e){return function(t){return function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0,o=r[e];if(void 0===o)return n;var i=t(n[o],r);return i===n[o]?n:D({},n,x({},o,i))}}}("selectorName")])((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new ht.a,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"START_RESOLUTION":case"FINISH_RESOLUTION":var n="START_RESOLUTION"===t.type,r=new ht.a(e);return r.set(t.args,n),r;case"INVALIDATE_RESOLUTION":var o=new ht.a(e);return o.delete(t.args),o}return e})),Bp=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"INVALIDATE_RESOLUTION_FOR_STORE":return{};case"INVALIDATE_RESOLUTION_FOR_STORE_SELECTOR":return Object(N.has)(e,[t.selectorName])?Object(N.omit)(e,[t.selectorName]):e;case"START_RESOLUTION":case"FINISH_RESOLUTION":case"INVALIDATE_RESOLUTION":return Vp(e,t)}return e};function Up(e,t,n){var r=Object(N.get)(e,[t]);if(r)return r.get(n)}function Wp(e,t){return void 0!==Up(e,t,arguments.length>2&&void 0!==arguments[2]?arguments[2]:[])}function Kp(e,t){return!1===Up(e,t,arguments.length>2&&void 0!==arguments[2]?arguments[2]:[])}function Yp(e,t){return!0===Up(e,t,arguments.length>2&&void 0!==arguments[2]?arguments[2]:[])}function $p(e){return e}function qp(e,t){return{type:"START_RESOLUTION",selectorName:e,args:t}}function Gp(e,t){return{type:"FINISH_RESOLUTION",selectorName:e,args:t}}function Zp(e,t){return{type:"INVALIDATE_RESOLUTION",selectorName:e,args:t}}function Xp(){return{type:"INVALIDATE_RESOLUTION_FOR_STORE"}}function Qp(e){return{type:"INVALIDATE_RESOLUTION_FOR_STORE_SELECTOR",selectorName:e}}function Jp(e,t,n){var r,o=t.reducer,i=function(e,t,n){var r=[Hp(n,e),Fp];if(t.controls){var o=Object(N.mapValues)(t.controls,(function(e){return e.isRegistryControl?e(n):e}));r.push(zp(o))}var i=[et.apply(void 0,r)];"undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION__&&i.push(window.__REDUX_DEVTOOLS_EXTENSION__({name:e,instanceId:e}));var a=t.reducer,s=t.initialState;return qe(Fe()({metadata:Bp,root:a}),{root:s},Object(N.flowRight)(i))}(e,t,n),a=function(e,t){return Object(N.mapValues)(e,(function(e){return function(){return Promise.resolve(t.dispatch(e.apply(void 0,arguments)))}}))}(D({},m,t.actions),i),s=function(e,t,n){return Object(N.mapValues)(e,(function(e){var r=e.isRegistrySelector?e(n.select):e,o=function(){var e=arguments.length,n=new Array(e+1);n[0]=t.__unstableOriginalGetState();for(var o=0;o1?n-1:0),o=1;o1?r-1:0),i=1;i1?n-1:0),o=1;o3?i-3:0),s=3;s1?o-1:0),a=1;a1?o-1:0),a=1;a0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n={},r=[];function o(){r.forEach((function(e){return e()}))}function i(e,t){if("function"!=typeof t.getSelectors)throw new TypeError("config.getSelectors must be a function");if("function"!=typeof t.getActions)throw new TypeError("config.getActions must be a function");if("function"!=typeof t.subscribe)throw new TypeError("config.subscribe must be a function");n[e]=t,t.subscribe(o)}var a,s={registerGenericStore:i,stores:n,namespaces:n,subscribe:function(e){return r.push(e),function(){r=Object(N.without)(r,e)}},select:function(e){var r=n[e];return r?r.getSelectors():t&&t.select(e)},dispatch:function(e){var r=n[e];return r?r.getActions():t&&t.dispatch(e)},use:function(e,t){return s=D({},s,e(s,t))}};return s.registerStore=function(e,t){if(!t.reducer)throw new TypeError("Must specify store reducer");var n=Jp(e,t,s);return i(e,n),n.store},i("core/data",nv(s)),Object.entries(e).forEach((function(e){var t=Ae(e,2),n=t[0],r=t[1];return s.registerStore(n,r)})),t&&t.subscribe(o),a=s,Object(N.mapValues)(a,(function(e,t){return"function"!=typeof e?e:function(){return s[t].apply(null,arguments)}}))}(),av={getItem:function(e){return rv&&rv[e]?rv[e]:null},setItem:function(e,t){rv||av.clear(),rv[e]=String(t)},clear:function(){rv=Object.create(null)}},sv=av;try{(ov=window.localStorage).setItem("__wpDataTestLocalStorage",""),ov.removeItem("__wpDataTestLocalStorage")}catch(WE){ov=sv}var cv=ov,lv="WP_DATA",uv=function(e){return function(t,n){return n.nextState===t?t:e(t,n)}};function dv(e){var t,n=e.storage,r=void 0===n?cv:n,o=e.storageKey,i=void 0===o?lv:o;return{get:function(){if(void 0===t){var e=r.getItem(i);if(null===e)t={};else try{t=JSON.parse(e)}catch(WE){t={}}}return t},set:function(e,n){t=D({},t,x({},e,n)),r.setItem(i,JSON.stringify(t))}}}var fv=function(e,t){var n=dv(t);return{registerStore:function(t,r){if(!r.persist)return e.registerStore(t,r);var o=n.get()[t];if(void 0!==o){var i=r.reducer(void 0,{type:"@@WP/PERSISTENCE_RESTORE"});r=D({},r,{initialState:i=Object(N.isPlainObject)(i)&&Object(N.isPlainObject)(o)?Object(N.merge)({},i,o):o})}var a=e.registerStore(t,r);return a.subscribe(function(e,t,r){var o;if(Array.isArray(r)){var i=r.reduce((function(e,t){return Object.assign(e,x({},t,(function(e,n){return n.nextState[t]})))}),{});o=uv(Fe()(i))}else o=function(e,t){return t.nextState};var a=o(void 0,{nextState:e()});return function(){var r=o(a,{nextState:e()});r!==a&&(n.set(t,r),a=r)}}(a.getState,t,r.persist)),a}}};fv.__unstableMigrate=function(e){var t=dv(e),n=Object(N.get)(t.get(),["core/editor","preferences","insertUsage"]);n&&t.set("core/block-editor",{preferences:{insertUsage:n}})};var hv=function(e,t){return function(n){var r=e(n),o=n.displayName,i=void 0===o?n.name||"Component":o;return r.displayName="".concat(Object(N.upperFirst)(Object(N.camelCase)(t)),"(").concat(i,")"),r}};hv((function(e){return e.prototype instanceof I.Component?function(e){function t(){return Oe(this,t),Te(this,xe(t).apply(this,arguments))}return Me(t,e),Ee(t,[{key:"shouldComponentUpdate",value:function(e,t){return!nr()(e,this.props)||!nr()(t,this.state)}}]),t}(e):function(t){function n(){return Oe(this,n),Te(this,xe(n).apply(this,arguments))}return Me(n,t),Ee(n,[{key:"shouldComponentUpdate",value:function(e){return!nr()(e,this.props)}},{key:"render",value:function(){return Object(I.createElement)(e,this.props)}}]),n}(I.Component)}),"pure"),new(function(){function e(){Oe(this,e),this.listeners={},this.handleEvent=this.handleEvent.bind(this)}return Ee(e,[{key:"add",value:function(e,t){this.listeners[e]||(window.addEventListener(e,this.handleEvent),this.listeners[e]=[]),this.listeners[e].push(t)}},{key:"remove",value:function(e,t){this.listeners[e]=Object(N.without)(this.listeners[e],t),this.listeners[e].length||(window.removeEventListener(e,this.handleEvent),delete this.listeners[e])}},{key:"handleEvent",value:function(e){Object(N.forEach)(this.listeners[e.type],(function(t){t.handleEvent(e)}))}}]),e}());hv((function(e){var t=0;return(function(n){function r(){var e;return Oe(this,r),(e=Te(this,xe(r).apply(this,arguments))).instanceId=t++,e}return Me(r,n),Ee(r,[{key:"render",value:function(){return Object(I.createElement)(e,Ne({},this.props,{instanceId:this.instanceId}))}}]),r}(I.Component))}),"withInstanceId"),hv((function(e){return function(t){function n(){var e;return Oe(this,n),(e=Te(this,xe(n).apply(this,arguments))).timeouts=[],e.setTimeout=e.setTimeout.bind(Ce(e)),e.clearTimeout=e.clearTimeout.bind(Ce(e)),e}return Me(n,t),Ee(n,[{key:"componentWillUnmount",value:function(){this.timeouts.forEach(clearTimeout)}},{key:"setTimeout",value:function(e){function t(t,n){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(e,t){var n=this,r=setTimeout((function(){e(),n.clearTimeout(r)}),t);return this.timeouts.push(r),r}))},{key:"clearTimeout",value:function(e){function t(t){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(e){clearTimeout(e),this.timeouts=Object(N.without)(this.timeouts,e)}))},{key:"render",value:function(){return Object(I.createElement)(e,Ne({},this.props,{setTimeout:this.setTimeout,clearTimeout:this.clearTimeout}))}}]),n}(I.Component)}),"withSafeTimeout");var pv=window.requestIdleCallback?window.requestIdleCallback:window.requestAnimationFrame,vv=Object(I.createContext)(iv),mv=vv.Consumer,gv=(vv.Provider,mv);var bv=Object(I.createContext)(!1);bv.Consumer,bv.Provider;"undefined"!=typeof window?I.useLayoutEffect:I.useEffect,function(){var e=[],t=new WeakMap,n=!1,r=function r(o){do{if(0===e.length)return void(n=!1);var i=e.shift();t.get(i)(),t.delete(i)}while(o&&o.timeRemaining&&o.timeRemaining()>0);pv(r)}}();"undefined"!=typeof window?I.useLayoutEffect:I.useEffect,hv((function(e){return function(t){return Object(I.createElement)(gv,null,(function(n){return Object(I.createElement)(e,Ne({},t,{registry:n}))}))}}),"withRegistry");function yv(e){return e.isRegistrySelector=!0,e}function kv(e){return e.isRegistryControl=!0,e}iv.select,iv.dispatch,iv.subscribe,iv.registerGenericStore;var _v=iv.registerStore,wv=(iv.use,function(e){return function(t){return function(n,r){return void 0===n||e(r)?t(n,r):n}}}),Ov=function(e){return function(t){return function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0,o=r[e];if(void 0===o)return n;var i=t(n[o],r);return i===n[o]?n:D({},n,x({},o,i))}}},Sv=function(e){return function(t){return function(n,r){return t(n,e(r))}}};function Ev(e){return{type:"RECEIVE_ITEMS",items:Object(N.castArray)(e)}}var Cv=function(e){var t=new WeakMap;return function(n){var r;return t.has(n)?r=t.get(n):(r=e(n),Object(N.isObjectLike)(n)&&t.set(n,r)),r}}((function(e){for(var t={stableKey:"",page:1,perPage:10},n=Object.keys(e).sort(),r=0;r1&&void 0!==arguments[1]?arguments[1]:{},n=Tv.get(e);if(n){var r=n.get(t);if(void 0!==r)return r}else n=new ht.a,Tv.set(e,n);var o=xv(e,t);return n.set(t,o),o}));var Mv=function(e){function t(e,n){var r=e.headers,o=void 0===r?{}:r;for(var i in o)if("x-wp-nonce"===i.toLowerCase())return n(e);return n(D({},e,{headers:D({},o,{"X-WP-Nonce":t.nonce})}))}return t.nonce=e,t},jv=function(e,t){var n,r,o=e.path;return"string"==typeof e.namespace&&"string"==typeof e.endpoint&&(n=e.namespace.replace(/^\/|\/$/g,""),o=(r=e.endpoint.replace(/^\//,""))?n+"/"+r:n),delete e.namespace,delete e.endpoint,t(D({},e,{path:o}))},Iv=function(e){return function(t,n){return jv(t,(function(t){var r,o=t.url,i=t.path;return"string"==typeof i&&(r=e,-1!==e.indexOf("?")&&(i=i.replace("?","&")),i=i.replace(/^\//,""),"string"==typeof r&&-1!==r.indexOf("?")&&(i=i.replace("?","&")),o=r+i),n(D({},t,{url:o}))}))}},Pv=function(e){return function(t,n){var r=t.parse,o=void 0===r||r;if("string"==typeof t.path){var i=t.method||"GET",a=function(e){var t=e.split("?"),n=t[1],r=t[0];return n?r+"?"+n.split("&").map((function(e){return e.split("=")})).sort((function(e,t){return e[0].localeCompare(t[0])})).map((function(e){return e.join("=")})).join("&"):r}(t.path);if(o&&"GET"===i&&e[a])return Promise.resolve(e[a].body);if("OPTIONS"===i&&e[i]&&e[i][a])return Promise.resolve(e[i][a])}return n(t)}},Nv=function(e){return e.json?e.json():Promise.reject(e)},Rv=function(e){return function(e){if(!e)return{};var t=e.match(/<([^>]+)>; rel="next"/);return t?{next:t[1]}:{}}(e.headers.get("link")).next},Lv=function(e){var t=e.path&&-1!==e.path.indexOf("per_page=-1"),n=e.url&&-1!==e.url.indexOf("per_page=-1");return t||n},Av=function(){var e=Ue(Ve.a.mark((function e(t,n){var r,o,i,a,s,c;return Ve.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!1!==t.parse){e.next=2;break}return e.abrupt("return",n(t));case 2:if(Lv(t)){e.next=4;break}return e.abrupt("return",n(t));case 4:return e.next=6,n(D({},(u={per_page:100},d=void 0,f=void 0,d=(l=t).path,f=l.url,D({},j(l,["path","url"]),{url:f&&ye(f,u),path:d&&ye(d,u)})),{parse:!1}));case 6:return r=e.sent,e.next=9,Nv(r);case 9:if(o=e.sent,Array.isArray(o)){e.next=12;break}return e.abrupt("return",o);case 12:if(i=Rv(r)){e.next=15;break}return e.abrupt("return",o);case 15:a=[].concat(o);case 16:if(!i){e.next=27;break}return e.next=19,n(D({},t,{path:void 0,url:i,parse:!1}));case 19:return s=e.sent,e.next=22,Nv(s);case 22:c=e.sent,a=a.concat(c),i=Rv(s),e.next=16;break;case 27:return e.abrupt("return",a);case 28:case"end":return e.stop()}var l,u,d,f}),e)})));return function(t,n){return e.apply(this,arguments)}}(),zv=new Set(["PATCH","PUT","DELETE"]),Fv="GET";var Hv={Accept:"application/json, */*;q=0.1"},Vv={credentials:"include"},Bv=[function(e,t){return"string"!=typeof e.url||ke(e.url,"_locale")||(e.url=ye(e.url,{_locale:"user"})),"string"!=typeof e.path||ke(e.path,"_locale")||(e.path=ye(e.path,{_locale:"user"})),t(e,t)},jv,function(e,t){var n=e.method,r=void 0===n?Fv:n;return zv.has(r.toUpperCase())&&(e=D({},e,{headers:D({},e.headers,{"X-HTTP-Method-Override":r,"Content-Type":"application/json"}),method:"POST"})),t(e,t)},Av];var Uv=function(e){var t=e.url,n=e.path,r=e.data,o=e.parse,i=void 0===o||o,a=j(e,["url","path","data","parse"]),s=e.body,c=e.headers;c=D({},Hv,c),r&&(s=JSON.stringify(r),c["Content-Type"]="application/json");return window.fetch(t||n,D({},Vv,a,{body:s,headers:c})).then((function(e){if(e.status>=200&&e.status<300)return e;throw e})).then((function(e){return i?204===e.status?null:e.json?e.json():Promise.reject(e):e})).catch((function(e){if(!i)throw e;var t={code:"invalid_json",message:he("The response is not a valid JSON response.")};if(!e||!e.json)throw t;return e.json().catch((function(){throw t})).then((function(e){var t={code:"unknown_error",message:he("An unknown error occurred.")};throw e||t}))}))};function Wv(e){var t=[].concat(Bv,[Uv]);return function e(n){return function(r){var o=t[n];return n===t.length-1?o(r):o(r,e(n+1))}}(0)(e)}Wv.use=function(e){Bv.unshift(e)},Wv.setFetchHandler=function(e){Uv=e},Wv.createNonceMiddleware=Mv,Wv.createPreloadingMiddleware=Pv,Wv.createRootURLMiddleware=Iv,Wv.fetchAllMiddleware=Av;var Kv=Wv;function Yv(e){return{type:"API_FETCH",request:e}}function $v(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r1?t-1:0),r=1;r4&&void 0!==arguments[4]&&arguments[4];return o=r?function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return D({},Ev(e),{query:t})}(n,r):Ev(n),D({},o,{kind:e,name:t,invalidateCache:i})}function tm(e){return{type:"RECEIVE_THEME_SUPPORTS",themeSupports:e}}function nm(e,t){return{type:"RECEIVE_EMBED_PREVIEW",url:e,preview:t}}function rm(e,t,n){var r,o,i,a,s;return Ve.a.wrap((function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,mm(e);case 2:if(r=c.sent,o=Object(N.find)(r,{kind:e,name:t})){c.next=6;break}return c.abrupt("return");case 6:return i=o.key||um,a=n[i],c.next=10,Yv({path:"".concat(o.baseURL).concat(a?"/"+a:""),method:a?"PUT":"POST",data:n});case 10:return s=c.sent,c.next=13,em(e,t,s,void 0,!0);case 13:return c.abrupt("return",s);case 14:case"end":return c.stop()}}),Zv)}function om(e){return{type:"RECEIVE_USER_PERMISSION",key:"create/media",isAllowed:e}}function im(e,t){return{type:"RECEIVE_USER_PERMISSION",key:e,isAllowed:t}}function am(e,t){return{type:"RECEIVE_AUTOSAVES",postId:e,autosaves:Object(N.castArray)(t)}}var sm=Ve.a.mark(hm),cm=Ve.a.mark(pm),lm=Ve.a.mark(mm),um="id",dm=[{name:"postType",kind:"root",key:"slug",baseURL:"/wp/v2/types"},{name:"media",kind:"root",baseURL:"/wp/v2/media",plural:"mediaItems"},{name:"taxonomy",kind:"root",key:"slug",baseURL:"/wp/v2/taxonomies",plural:"taxonomies"},{name:"widgetArea",kind:"root",baseURL:"/__experimental/widget-areas",plural:"widgetAreas"}],fm=[{name:"postType",loadEntities:hm},{name:"taxonomy",loadEntities:pm}];function hm(){var e;return Ve.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Yv({path:"/wp/v2/types?context=edit"});case 2:return e=t.sent,t.abrupt("return",Object(N.map)(e,(function(e,t){return{kind:"postType",baseURL:"/wp/v2/"+e.rest_base,name:t}})));case 4:case"end":return t.stop()}}),sm)}function pm(){var e;return Ve.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Yv({path:"/wp/v2/taxonomies?context=edit"});case 2:return e=t.sent,t.abrupt("return",Object(N.map)(e,(function(e,t){return{kind:"taxonomy",baseURL:"/wp/v2/"+e.rest_base,name:t}})));case 4:case"end":return t.stop()}}),cm)}var vm=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"get",r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=Object(N.find)(dm,{kind:e,name:t}),i="root"===e?"":Object(N.upperFirst)(Object(N.camelCase)(e)),a=Object(N.upperFirst)(Object(N.camelCase)(t))+(r?"s":""),s=r&&o.plural?Object(N.upperFirst)(Object(N.camelCase)(o.plural)):a;return"".concat(n).concat(i).concat(s)};function mm(e){var t,n;return Ve.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,$v("getEntitiesByKind",e);case 2:if(!(t=r.sent)||0===t.length){r.next=5;break}return r.abrupt("return",t);case 5:if(n=Object(N.find)(fm,{name:e})){r.next=8;break}return r.abrupt("return",[]);case 8:return r.next=10,n.loadEntities();case 10:return t=r.sent,r.next=13,Jv(t);case 13:return r.abrupt("return",t);case 14:case"end":return r.stop()}}),lm)}function gm(e,t,n,r){for(var o=(n-1)*r,i=Math.max(e.length,o+t.length),a=new Array(i),s=0;s=o&&s0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_ITEMS":return D({},e,Object(N.keyBy)(t.items,t.key||um))}return e},queries:Object(N.flowRight)([wv((function(e){return"query"in e})),Sv((function(e){return e.query?D({},e,Cv(e.query)):e})),Ov("stableKey")])((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0,n=t.type,r=t.page,o=t.perPage,i=t.key,a=void 0===i?um:i;return"RECEIVE_ITEMS"!==n?e:gm(e||[],Object(N.map)(t.items,a),r,o)}))});function ym(e){return Object(N.flowRight)([wv((function(t){return t.name&&t.kind&&t.name===e.name&&t.kind===e.kind})),Sv((function(t){return D({},t,{key:e.key||um})}))])(bm)}function km(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:dm,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"ADD_ENTITIES":return[].concat(lt(e),lt(t.entities))}return e}var _m=Fe()({terms:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_TERMS":return D({},e,x({},t.taxonomy,t.terms))}return e},users:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{byId:{},queries:{}},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_USER_QUERY":return{byId:D({},e.byId,Object(N.keyBy)(t.users,"id")),queries:D({},e.queries,x({},t.queryID,Object(N.map)(t.users,(function(e){return e.id}))))}}return e},currentUser:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_CURRENT_USER":return t.currentUser}return e},taxonomies:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_TAXONOMIES":return t.taxonomies}return e},themeSupports:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_THEME_SUPPORTS":return D({},e,t.themeSupports)}return e},entities:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=km(e.config,t),r=e.reducer;if(!r||n!==e.config){var o=Object(N.groupBy)(n,"kind");r=Fe()(Object.entries(o).reduce((function(e,t){var n=Ae(t,2),r=n[0],o=n[1],i=Fe()(o.reduce((function(e,t){return D({},e,x({},t.name,ym(t)))}),{}));return e[r]=i,e}),{}))}var i=r(e.data,t);return i===e.data&&n===e.config&&r===e.reducer?e:{reducer:r,data:i,config:n}},embedPreviews:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_EMBED_PREVIEW":return D({},e,x({},t.url,t.preview))}return e},userPermissions:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_USER_PERMISSION":return D({},e,x({},t.key,t.isAllowed))}return e},autosaves:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_AUTOSAVES":return D({},e,x({},t.postId,t.autosaves))}return e}}),wm=yv((function(e){return function(t,n){return e("core/data").isResolving("core","getEmbedPreview",[n])}}));function Om(e){return Em(e,"authors")}function Sm(e){return e.currentUser}var Em=yo((function(e,t){var n=e.users.queries[t];return Object(N.map)(n,(function(t){return e.users.byId[t]}))}),(function(e,t){return[e.users.queries[t],e.users.byId]}));function Cm(e,t){return Object(N.filter)(e.entities.config,{kind:t})}function Tm(e,t,n){return Object(N.find)(e.entities.config,{kind:t,name:n})}function xm(e,t,n,r){return Object(N.get)(e.entities.data,[t,n,"items",r])}function Dm(e,t,n,r){var o=Object(N.get)(e.entities.data,[t,n]);return o?Dv(o,r):[]}function Mm(e){return e.themeSupports}function jm(e,t){return e.embedPreviews[t]}function Im(e,t){var n=e.embedPreviews[t],r=''+t+"";return!!n&&n.html===r}function Pm(e){return qr("select( 'core' ).hasUploadPermissions()",{alternative:"select( 'core' ).canUser( 'create', 'media' )"}),Object(N.defaultTo)(Nm(e,"create","media"),!0)}function Nm(e,t,n,r){var o=Object(N.compact)([t,n,r]).join("/");return Object(N.get)(e,["userPermissions",o])}function Rm(e,t,n){return e.autosaves[n]}function Lm(e,t,n,r){if(void 0!==r){var o=e.autosaves[n];return Object(N.find)(o,{author:r})}}var Am=yv((function(e){return function(t,n,r){return e("core").hasFinishedResolution("getAutosaves",[n,r])}})),zm=Ve.a.mark(qm),Fm=Ve.a.mark(Gm),Hm=Ve.a.mark(Zm),Vm=Ve.a.mark(Xm),Bm=Ve.a.mark(Qm),Um=Ve.a.mark(Jm),Wm=Ve.a.mark(eg),Km=Ve.a.mark(tg),Ym=Ve.a.mark(ng),$m=Ve.a.mark(rg);function qm(){var e;return Ve.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Yv({path:"/wp/v2/users/?who=authors&per_page=-1"});case 2:return e=t.sent,t.next=5,Xv("authors",e);case 5:case"end":return t.stop()}}),zm)}function Gm(){var e;return Ve.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Yv({path:"/wp/v2/users/me"});case 2:return e=t.sent,t.next=5,Qv(e);case 5:case"end":return t.stop()}}),Fm)}function Zm(e,t,n){var r,o,i;return Ve.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,mm(e);case 2:if(r=a.sent,o=Object(N.find)(r,{kind:e,name:t})){a.next=6;break}return a.abrupt("return");case 6:return a.next=8,Yv({path:"".concat(o.baseURL,"/").concat(n,"?context=edit")});case 8:return i=a.sent,a.next=11,em(e,t,i);case 11:case"end":return a.stop()}}),Hm)}function Xm(e,t){var n,r,o,i,a,s=arguments;return Ve.a.wrap((function(c){for(;;)switch(c.prev=c.next){case 0:return n=s.length>2&&void 0!==s[2]?s[2]:{},c.next=3,mm(e);case 3:if(r=c.sent,o=Object(N.find)(r,{kind:e,name:t})){c.next=7;break}return c.abrupt("return");case 7:return i=ye(o.baseURL,D({},n,{context:"edit"})),c.next=10,Yv({path:i});case 10:return a=c.sent,c.next=13,em(e,t,Object.values(a),n);case 13:case"end":return c.stop()}}),Vm)}function Qm(){var e;return Ve.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Yv({path:"/wp/v2/themes?status=active"});case 2:return e=t.sent,t.next=5,tm(e[0].theme_supports);case 5:case"end":return t.stop()}}),Bm)}function Jm(e){var t;return Ve.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,Yv({path:ye("/oembed/1.0/proxy",{url:e})});case 3:return t=n.sent,n.next=6,nm(e,t);case 6:n.next=12;break;case 8:return n.prev=8,n.t0=n.catch(0),n.next=12,nm(e,!1);case 12:case"end":return n.stop()}}),Um,null,[[0,8]])}function eg(){return Ve.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return qr("select( 'core' ).hasUploadPermissions()",{alternative:"select( 'core' ).canUser( 'create', 'media' )"}),e.delegateYield(tg("create","media"),"t0",2);case 2:case"end":return e.stop()}}),Wm)}function tg(e,t,n){var r,o,i,a,s,c;return Ve.a.wrap((function(l){for(;;)switch(l.prev=l.next){case 0:if(r={create:"POST",read:"GET",update:"PUT",delete:"DELETE"}[e]){l.next=4;break}throw new Error("'".concat(e,"' is not a valid action."));case 4:return o=n?"/wp/v2/".concat(t,"/").concat(n):"/wp/v2/".concat(t),l.prev=5,l.next=8,Yv({path:o,method:n?"GET":"OPTIONS",parse:!1});case 8:i=l.sent,l.next=14;break;case 11:return l.prev=11,l.t0=l.catch(5),l.abrupt("return");case 14:return a=Object(N.hasIn)(i,["headers","get"])?i.headers.get("allow"):Object(N.get)(i,["headers","Allow"],""),s=Object(N.compact)([e,t,n]).join("/"),c=Object(N.includes)(a,r),l.next=19,im(s,c);case 19:case"end":return l.stop()}}),Km,null,[[5,11]])}function ng(e,t){var n,r,o;return Ve.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,qv("getPostType",e);case 2:return n=i.sent,r=n.rest_base,i.next=6,Yv({path:"/wp/v2/".concat(r,"/").concat(t,"/autosaves?context=edit")});case 6:if(!(o=i.sent)||!o.length){i.next=10;break}return i.next=10,am(t,o);case 10:case"end":return i.stop()}}),Ym)}function rg(e,t){return Ve.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,qv("getAutosaves",e,t);case 2:case"end":return n.stop()}}),$m)}Xm.shouldInvalidate=function(e,t,n){return"RECEIVE_ITEMS"===e.type&&e.invalidateCache&&t===e.kind&&n===e.name};var og=dm.reduce((function(e,t){var n=t.kind,r=t.name;return e[vm(n,r)]=function(e,t){return xm(e,n,r,t)},e[vm(n,r,"get",!0)]=function(e){for(var t=arguments.length,o=new Array(t>1?t-1:0),i=1;i1?o-1:0),a=1;a0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=Object(N.map)(e,(function(e,t){return function(n,r,o,i,a){if(c=t,!ag(s=n)||s.type!==c)return!1;var s,c,l=e(n);return rt()(l)?l.then(i,a):i(l),!0}}));n.push((function(e,n){return!!ag(e)&&(t(e),n(),!0)}));var r=Object(tt.create)(n);return function(e){return new Promise((function(n,o){return r(e,(function(e){ag(e)&&t(e),n(e)}),o)}))}}function cg(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t){var n=sg(e,t.dispatch);return function(e){return function(t){return(r=t)&&"Generator"===r[Symbol.toStringTag]?n(t):e(t);var r}}}}_v("core",{reducer:_m,controls:Gv,actions:D({},g,dm.reduce((function(e,t){var n=t.kind,r=t.name;return e[vm(n,r,"save")]=function(e){return rm(n,r,e)},e}),{})),selectors:D({},b,og),resolvers:D({},y,ig)});var lg=function(){return function(e){return function(t){return rt()(t)?t.then((function(t){if(t)return e(t)})):e(t)}}},ug=function(e,t){return function(){return function(n){return function(r){var o=e.select("core/data").getCachedResolvers(t);return Object.entries(o).forEach((function(n){var o=Ae(n,2),i=o[0],a=o[1],s=Object(N.get)(e.stores,[t,"resolvers",i]);s&&s.shouldInvalidate&&a.forEach((function(n,o){!1===n&&s.shouldInvalidate.apply(s,[r].concat(lt(o)))&&e.dispatch("core/data").invalidateResolution(t,i,o)}))})),n(r)}}}},dg=Object(N.flowRight)([function(e){return function(t){return function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0,o=r[e];if(void 0===o)return n;var i=t(n[o],r);return i===n[o]?n:D({},n,x({},o,i))}}}("selectorName")])((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new ht.a,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"START_RESOLUTION":case"FINISH_RESOLUTION":var n="START_RESOLUTION"===t.type,r=new ht.a(e);return r.set(t.args,n),r;case"INVALIDATE_RESOLUTION":var o=new ht.a(e);return o.delete(t.args),o}return e})),fg=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"INVALIDATE_RESOLUTION_FOR_STORE":return{};case"INVALIDATE_RESOLUTION_FOR_STORE_SELECTOR":return Object(N.has)(e,[t.selectorName])?Object(N.omit)(e,[t.selectorName]):e;case"START_RESOLUTION":case"FINISH_RESOLUTION":case"INVALIDATE_RESOLUTION":return dg(e,t)}return e};function hg(e,t,n){var r=Object(N.get)(e,[t]);if(r)return r.get(n)}function pg(e,t){return void 0!==hg(e,t,arguments.length>2&&void 0!==arguments[2]?arguments[2]:[])}function vg(e,t){return!1===hg(e,t,arguments.length>2&&void 0!==arguments[2]?arguments[2]:[])}function mg(e,t){return!0===hg(e,t,arguments.length>2&&void 0!==arguments[2]?arguments[2]:[])}function gg(e){return e}function bg(e,t){return{type:"START_RESOLUTION",selectorName:e,args:t}}function yg(e,t){return{type:"FINISH_RESOLUTION",selectorName:e,args:t}}function kg(e,t){return{type:"INVALIDATE_RESOLUTION",selectorName:e,args:t}}function _g(){return{type:"INVALIDATE_RESOLUTION_FOR_STORE"}}function wg(e){return{type:"INVALIDATE_RESOLUTION_FOR_STORE_SELECTOR",selectorName:e}}function Og(e,t,n){var r,o=t.reducer,i=function(e,t,n){var r=[ug(n,e),lg];if(t.controls){var o=Object(N.mapValues)(t.controls,(function(e){return e.isRegistryControl?e(n):e}));r.push(cg(o))}var i=[et.apply(void 0,r)];"undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION__&&i.push(window.__REDUX_DEVTOOLS_EXTENSION__({name:e,instanceId:e}));var a=t.reducer,s=t.initialState;return qe(Fe()({metadata:fg,root:a}),{root:s},Object(N.flowRight)(i))}(e,t,n),a=function(e,t){return Object(N.mapValues)(e,(function(e){return function(){return Promise.resolve(t.dispatch(e.apply(void 0,arguments)))}}))}(D({},_,t.actions),i),s=function(e,t,n){return Object(N.mapValues)(e,(function(e){var r=e.isRegistrySelector?e(n.select):e,o=function(){var e=arguments.length,n=new Array(e+1);n[0]=t.__unstableOriginalGetState();for(var o=0;o1?n-1:0),o=1;o1?r-1:0),i=1;i1?n-1:0),o=1;o3?i-3:0),s=3;s1?o-1:0),a=1;a1?o-1:0),a=1;a0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n={},r=[];function o(){r.forEach((function(e){return e()}))}function i(e,t){if("function"!=typeof t.getSelectors)throw new TypeError("config.getSelectors must be a function");if("function"!=typeof t.getActions)throw new TypeError("config.getActions must be a function");if("function"!=typeof t.subscribe)throw new TypeError("config.subscribe must be a function");n[e]=t,t.subscribe(o)}var a,s={registerGenericStore:i,stores:n,namespaces:n,subscribe:function(e){return r.push(e),function(){r=Object(N.without)(r,e)}},select:function(e){var r=n[e];return r?r.getSelectors():t&&t.select(e)},dispatch:function(e){var r=n[e];return r?r.getActions():t&&t.dispatch(e)},use:function(e,t){return s=D({},s,e(s,t))}};return s.registerStore=function(e,t){if(!t.reducer)throw new TypeError("Must specify store reducer");var n=Og(e,t,s);return i(e,n),n.store},i("core/data",Cg(s)),Object.entries(e).forEach((function(e){var t=Ae(e,2),n=t[0],r=t[1];return s.registerStore(n,r)})),t&&t.subscribe(o),a=s,Object(N.mapValues)(a,(function(e,t){return"function"!=typeof e?e:function(){return s[t].apply(null,arguments)}}))}(),Mg={getItem:function(e){return Tg&&Tg[e]?Tg[e]:null},setItem:function(e,t){Tg||Mg.clear(),Tg[e]=String(t)},clear:function(){Tg=Object.create(null)}},jg=Mg;try{(xg=window.localStorage).setItem("__wpDataTestLocalStorage",""),xg.removeItem("__wpDataTestLocalStorage")}catch(WE){xg=jg}var Ig=xg,Pg="WP_DATA",Ng=function(e){return function(t,n){return n.nextState===t?t:e(t,n)}};function Rg(e){var t,n=e.storage,r=void 0===n?Ig:n,o=e.storageKey,i=void 0===o?Pg:o;return{get:function(){if(void 0===t){var e=r.getItem(i);if(null===e)t={};else try{t=JSON.parse(e)}catch(WE){t={}}}return t},set:function(e,n){t=D({},t,x({},e,n)),r.setItem(i,JSON.stringify(t))}}}var Lg=function(e,t){var n=Rg(t);return{registerStore:function(t,r){if(!r.persist)return e.registerStore(t,r);var o=n.get()[t];if(void 0!==o){var i=r.reducer(void 0,{type:"@@WP/PERSISTENCE_RESTORE"});r=D({},r,{initialState:i=Object(N.isPlainObject)(i)&&Object(N.isPlainObject)(o)?Object(N.merge)({},i,o):o})}var a=e.registerStore(t,r);return a.subscribe(function(e,t,r){var o;if(Array.isArray(r)){var i=r.reduce((function(e,t){return Object.assign(e,x({},t,(function(e,n){return n.nextState[t]})))}),{});o=Ng(Fe()(i))}else o=function(e,t){return t.nextState};var a=o(void 0,{nextState:e()});return function(){var r=o(a,{nextState:e()});r!==a&&(n.set(t,r),a=r)}}(a.getState,t,r.persist)),a}}};Lg.__unstableMigrate=function(e){var t=Rg(e),n=Object(N.get)(t.get(),["core/editor","preferences","insertUsage"]);n&&t.set("core/block-editor",{preferences:{insertUsage:n}})};var Ag=function(e,t){return function(n){var r=e(n),o=n.displayName,i=void 0===o?n.name||"Component":o;return r.displayName="".concat(Object(N.upperFirst)(Object(N.camelCase)(t)),"(").concat(i,")"),r}},zg=function(e){return Ag((function(t){return function(n){return e(n)?Object(I.createElement)(t,n):null}}),"ifCondition")},Fg=Ag((function(e){return e.prototype instanceof I.Component?function(e){function t(){return Oe(this,t),Te(this,xe(t).apply(this,arguments))}return Me(t,e),Ee(t,[{key:"shouldComponentUpdate",value:function(e,t){return!nr()(e,this.props)||!nr()(t,this.state)}}]),t}(e):function(t){function n(){return Oe(this,n),Te(this,xe(n).apply(this,arguments))}return Me(n,t),Ee(n,[{key:"shouldComponentUpdate",value:function(e){return!nr()(e,this.props)}},{key:"render",value:function(){return Object(I.createElement)(e,this.props)}}]),n}(I.Component)}),"pure");new(function(){function e(){Oe(this,e),this.listeners={},this.handleEvent=this.handleEvent.bind(this)}return Ee(e,[{key:"add",value:function(e,t){this.listeners[e]||(window.addEventListener(e,this.handleEvent),this.listeners[e]=[]),this.listeners[e].push(t)}},{key:"remove",value:function(e,t){this.listeners[e]=Object(N.without)(this.listeners[e],t),this.listeners[e].length||(window.removeEventListener(e,this.handleEvent),delete this.listeners[e])}},{key:"handleEvent",value:function(e){Object(N.forEach)(this.listeners[e.type],(function(t){t.handleEvent(e)}))}}]),e}());Ag((function(e){var t=0;return(function(n){function r(){var e;return Oe(this,r),(e=Te(this,xe(r).apply(this,arguments))).instanceId=t++,e}return Me(r,n),Ee(r,[{key:"render",value:function(){return Object(I.createElement)(e,Ne({},this.props,{instanceId:this.instanceId}))}}]),r}(I.Component))}),"withInstanceId"),Ag((function(e){return function(t){function n(){var e;return Oe(this,n),(e=Te(this,xe(n).apply(this,arguments))).timeouts=[],e.setTimeout=e.setTimeout.bind(Ce(e)),e.clearTimeout=e.clearTimeout.bind(Ce(e)),e}return Me(n,t),Ee(n,[{key:"componentWillUnmount",value:function(){this.timeouts.forEach(clearTimeout)}},{key:"setTimeout",value:function(e){function t(t,n){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(e,t){var n=this,r=setTimeout((function(){e(),n.clearTimeout(r)}),t);return this.timeouts.push(r),r}))},{key:"clearTimeout",value:function(e){function t(t){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(e){clearTimeout(e),this.timeouts=Object(N.without)(this.timeouts,e)}))},{key:"render",value:function(){return Object(I.createElement)(e,Ne({},this.props,{setTimeout:this.setTimeout,clearTimeout:this.clearTimeout}))}}]),n}(I.Component)}),"withSafeTimeout");var Hg=window.requestIdleCallback?window.requestIdleCallback:window.requestAnimationFrame,Vg=Object(I.createContext)(Dg),Bg=Vg.Consumer,Ug=(Vg.Provider,Bg);function Wg(){return Object(I.useContext)(Vg)}var Kg=Object(I.createContext)(!1);Kg.Consumer,Kg.Provider;var Yg="undefined"!=typeof window?I.useLayoutEffect:I.useEffect,$g=function(){var e=[],t=new WeakMap,n=!1,r=function r(o){do{if(0===e.length)return void(n=!1);var i=e.shift();t.get(i)(),t.delete(i)}while(o&&o.timeRemaining&&o.timeRemaining()>0);Hg(r)};return{add:function(o,i){t.has(o)||e.push(o),t.set(o,i),n||(n=!0,Hg(r))},flush:function(n){if(!t.has(n))return!1;t.delete(n);var r=e.indexOf(n);return e.splice(r,1),!0}}}();function qg(e,t){var n,r=Object(I.useCallback)(e,t),o=Wg(),i=Object(I.useContext)(Kg),a=Object(I.useMemo)((function(){return{queue:!0}}),[o]),s=Ae(Object(I.useReducer)((function(e){return e+1}),0),2)[1],c=Object(I.useRef)(),l=Object(I.useRef)(i),u=Object(I.useRef)(),d=Object(I.useRef)(),f=Object(I.useRef)();try{n=c.current!==r||d.current?r(o.select,o):u.current}catch(WE){var h="An error occurred while running 'mapSelect': ".concat(WE.message);if(d.current)throw h+="\nThe error may be correlated with this previous error:\n",h+="".concat(d.current.stack,"\n\n"),h+="Original stack trace:",new Error(h)}return Yg((function(){c.current=r,l.current!==i&&(l.current=i,$g.flush(a)),u.current=n,d.current=void 0,f.current=!0})),Yg((function(){var e=function(){if(f.current){try{var e=c.current(o.select,o);if(Object(tr.isShallowEqualObjects)(u.current,e))return;u.current=e}catch(WE){d.current=WE}s({})}};l.current?$g.add(a,e):e();var t=o.subscribe((function(){l.current?$g.add(a,e):e()}));return function(){f.current=!1,t(),$g.flush(a)}}),[o]),n}var Gg=function(e){return Ag((function(t){return Fg((function(n){var r=qg((function(t,r){return e(t,n,r)}));return Object(I.createElement)(t,Ne({},n,r))}))}),"withSelect")};"undefined"!=typeof window?I.useLayoutEffect:I.useEffect,Ag((function(e){return function(t){return Object(I.createElement)(Ug,null,(function(n){return Object(I.createElement)(e,Ne({},t,{registry:n}))}))}}),"withRegistry");Dg.select;var Zg=Dg.dispatch,Xg=(Dg.subscribe,Dg.registerGenericStore,Dg.registerStore);Dg.use;function Qg(e){return{type:"SET_IS_MATCHING",values:e}}function Jg(e,t){return-1===t.indexOf(" ")&&(t=">= "+t),!!e[t]}Xg("core/viewport",{reducer:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_IS_MATCHING":return t.values}return e},actions:w,selectors:O});var eb=function(e){return Ag(Gg((function(t){return Object(N.mapValues)(e,(function(e){return t("core/viewport").isViewportMatch(e)}))})),"withViewportMatch")},tb=function(e){return Ag(Object(N.flowRight)([eb({isViewportMatch:e}),zg((function(e){return e.isViewportMatch}))]),"ifViewportMatches")},nb={"<":"max-width",">=":"min-width"},rb=Object(N.debounce)((function(){var e=Object(N.mapValues)(ob,(function(e){return e.matches}));Zg("core/viewport").setIsMatching(e)}),{leading:!0}),ob=Object(N.reduce)({huge:1440,wide:1280,large:960,medium:782,small:600,mobile:480},(function(e,t,n){return Object(N.forEach)(nb,(function(r,o){var i=window.matchMedia("(".concat(r,": ").concat(t,"px)"));i.addListener(rb);var a=[o,n].join(" ");e[a]=i})),e}),{});function ib(e){return Object(N.isPlainObject)(e)&&Object(N.isString)(e.type)}function ab(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=Object(N.map)(e,(function(e,t){return function(n,r,o,i,a){if(c=t,!ib(s=n)||s.type!==c)return!1;var s,c,l=e(n);return rt()(l)?l.then(i,a):i(l),!0}}));n.push((function(e,n){return!!ib(e)&&(t(e),n(),!0)}));var r=Object(tt.create)(n);return function(e){return new Promise((function(n,o){return r(e,(function(e){ib(e)&&t(e),n(e)}),o)}))}}function sb(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t){var n=ab(e,t.dispatch);return function(e){return function(t){return(r=t)&&"Generator"===r[Symbol.toStringTag]?n(t):e(t);var r}}}}window.addEventListener("orientationchange",rb),rb(),rb.flush();var cb=function(){return function(e){return function(t){return rt()(t)?t.then((function(t){if(t)return e(t)})):e(t)}}},lb=function(e,t){return function(){return function(n){return function(r){var o=e.select("core/data").getCachedResolvers(t);return Object.entries(o).forEach((function(n){var o=Ae(n,2),i=o[0],a=o[1],s=Object(N.get)(e.stores,[t,"resolvers",i]);s&&s.shouldInvalidate&&a.forEach((function(n,o){!1===n&&s.shouldInvalidate.apply(s,[r].concat(lt(o)))&&e.dispatch("core/data").invalidateResolution(t,i,o)}))})),n(r)}}}},ub=Object(N.flowRight)([function(e){return function(t){return function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0,o=r[e];if(void 0===o)return n;var i=t(n[o],r);return i===n[o]?n:D({},n,x({},o,i))}}}("selectorName")])((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new ht.a,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"START_RESOLUTION":case"FINISH_RESOLUTION":var n="START_RESOLUTION"===t.type,r=new ht.a(e);return r.set(t.args,n),r;case"INVALIDATE_RESOLUTION":var o=new ht.a(e);return o.delete(t.args),o}return e})),db=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"INVALIDATE_RESOLUTION_FOR_STORE":return{};case"INVALIDATE_RESOLUTION_FOR_STORE_SELECTOR":return Object(N.has)(e,[t.selectorName])?Object(N.omit)(e,[t.selectorName]):e;case"START_RESOLUTION":case"FINISH_RESOLUTION":case"INVALIDATE_RESOLUTION":return ub(e,t)}return e};function fb(e,t,n){var r=Object(N.get)(e,[t]);if(r)return r.get(n)}function hb(e,t){return void 0!==fb(e,t,arguments.length>2&&void 0!==arguments[2]?arguments[2]:[])}function pb(e,t){return!1===fb(e,t,arguments.length>2&&void 0!==arguments[2]?arguments[2]:[])}function vb(e,t){return!0===fb(e,t,arguments.length>2&&void 0!==arguments[2]?arguments[2]:[])}function mb(e){return e}function gb(e,t){return{type:"START_RESOLUTION",selectorName:e,args:t}}function bb(e,t){return{type:"FINISH_RESOLUTION",selectorName:e,args:t}}function yb(e,t){return{type:"INVALIDATE_RESOLUTION",selectorName:e,args:t}}function kb(){return{type:"INVALIDATE_RESOLUTION_FOR_STORE"}}function _b(e){return{type:"INVALIDATE_RESOLUTION_FOR_STORE_SELECTOR",selectorName:e}}function wb(e,t,n){var r,o=t.reducer,i=function(e,t,n){var r=[lb(n,e),cb];if(t.controls){var o=Object(N.mapValues)(t.controls,(function(e){return e.isRegistryControl?e(n):e}));r.push(sb(o))}var i=[et.apply(void 0,r)];"undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION__&&i.push(window.__REDUX_DEVTOOLS_EXTENSION__({name:e,instanceId:e}));var a=t.reducer,s=t.initialState;return qe(Fe()({metadata:db,root:a}),{root:s},Object(N.flowRight)(i))}(e,t,n),a=function(e,t){return Object(N.mapValues)(e,(function(e){return function(){return Promise.resolve(t.dispatch(e.apply(void 0,arguments)))}}))}(D({},E,t.actions),i),s=function(e,t,n){return Object(N.mapValues)(e,(function(e){var r=e.isRegistrySelector?e(n.select):e,o=function(){var e=arguments.length,n=new Array(e+1);n[0]=t.__unstableOriginalGetState();for(var o=0;o1?n-1:0),o=1;o1?r-1:0),i=1;i1?n-1:0),o=1;o3?i-3:0),s=3;s1?o-1:0),a=1;a1?o-1:0),a=1;a0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n={},r=[];function o(){r.forEach((function(e){return e()}))}function i(e,t){if("function"!=typeof t.getSelectors)throw new TypeError("config.getSelectors must be a function");if("function"!=typeof t.getActions)throw new TypeError("config.getActions must be a function");if("function"!=typeof t.subscribe)throw new TypeError("config.subscribe must be a function");n[e]=t,t.subscribe(o)}var a,s={registerGenericStore:i,stores:n,namespaces:n,subscribe:function(e){return r.push(e),function(){r=Object(N.without)(r,e)}},select:function(e){var r=n[e];return r?r.getSelectors():t&&t.select(e)},dispatch:function(e){var r=n[e];return r?r.getActions():t&&t.dispatch(e)},use:function(e,t){return s=D({},s,e(s,t))}};return s.registerStore=function(e,t){if(!t.reducer)throw new TypeError("Must specify store reducer");var n=wb(e,t,s);return i(e,n),n.store},i("core/data",Eb(s)),Object.entries(e).forEach((function(e){var t=Ae(e,2),n=t[0],r=t[1];return s.registerStore(n,r)})),t&&t.subscribe(o),a=s,Object(N.mapValues)(a,(function(e,t){return"function"!=typeof e?e:function(){return s[t].apply(null,arguments)}}))}var Tb,xb,Db=Cb(),Mb={getItem:function(e){return Tb&&Tb[e]?Tb[e]:null},setItem:function(e,t){Tb||Mb.clear(),Tb[e]=String(t)},clear:function(){Tb=Object.create(null)}},jb=Mb;try{(xb=window.localStorage).setItem("__wpDataTestLocalStorage",""),xb.removeItem("__wpDataTestLocalStorage")}catch(WE){xb=jb}var Ib=xb,Pb="WP_DATA",Nb=function(e){return function(t,n){return n.nextState===t?t:e(t,n)}};function Rb(e){var t,n=e.storage,r=void 0===n?Ib:n,o=e.storageKey,i=void 0===o?Pb:o;return{get:function(){if(void 0===t){var e=r.getItem(i);if(null===e)t={};else try{t=JSON.parse(e)}catch(WE){t={}}}return t},set:function(e,n){t=D({},t,x({},e,n)),r.setItem(i,JSON.stringify(t))}}}var Lb=function(e,t){var n=Rb(t);return{registerStore:function(t,r){if(!r.persist)return e.registerStore(t,r);var o=n.get()[t];if(void 0!==o){var i=r.reducer(void 0,{type:"@@WP/PERSISTENCE_RESTORE"});r=D({},r,{initialState:i=Object(N.isPlainObject)(i)&&Object(N.isPlainObject)(o)?Object(N.merge)({},i,o):o})}var a=e.registerStore(t,r);return a.subscribe(function(e,t,r){var o;if(Array.isArray(r)){var i=r.reduce((function(e,t){return Object.assign(e,x({},t,(function(e,n){return n.nextState[t]})))}),{});o=Nb(Fe()(i))}else o=function(e,t){return t.nextState};var a=o(void 0,{nextState:e()});return function(){var r=o(a,{nextState:e()});r!==a&&(n.set(t,r),a=r)}}(a.getState,t,r.persist)),a}}};Lb.__unstableMigrate=function(e){var t=Rb(e),n=Object(N.get)(t.get(),["core/editor","preferences","insertUsage"]);n&&t.set("core/block-editor",{preferences:{insertUsage:n}})};var Ab=function(e,t){return function(n){var r=e(n),o=n.displayName,i=void 0===o?n.name||"Component":o;return r.displayName="".concat(Object(N.upperFirst)(Object(N.camelCase)(t)),"(").concat(i,")"),r}},zb=function(e){return Ab((function(t){return function(n){return e(n)?Object(I.createElement)(t,n):null}}),"ifCondition")},Fb=Ab((function(e){return e.prototype instanceof I.Component?function(e){function t(){return Oe(this,t),Te(this,xe(t).apply(this,arguments))}return Me(t,e),Ee(t,[{key:"shouldComponentUpdate",value:function(e,t){return!nr()(e,this.props)||!nr()(t,this.state)}}]),t}(e):function(t){function n(){return Oe(this,n),Te(this,xe(n).apply(this,arguments))}return Me(n,t),Ee(n,[{key:"shouldComponentUpdate",value:function(e){return!nr()(e,this.props)}},{key:"render",value:function(){return Object(I.createElement)(e,this.props)}}]),n}(I.Component)}),"pure");new(function(){function e(){Oe(this,e),this.listeners={},this.handleEvent=this.handleEvent.bind(this)}return Ee(e,[{key:"add",value:function(e,t){this.listeners[e]||(window.addEventListener(e,this.handleEvent),this.listeners[e]=[]),this.listeners[e].push(t)}},{key:"remove",value:function(e,t){this.listeners[e]=Object(N.without)(this.listeners[e],t),this.listeners[e].length||(window.removeEventListener(e,this.handleEvent),delete this.listeners[e])}},{key:"handleEvent",value:function(e){Object(N.forEach)(this.listeners[e.type],(function(t){t.handleEvent(e)}))}}]),e}());var Hb=Ab((function(e){var t=0;return(function(n){function r(){var e;return Oe(this,r),(e=Te(this,xe(r).apply(this,arguments))).instanceId=t++,e}return Me(r,n),Ee(r,[{key:"render",value:function(){return Object(I.createElement)(e,Ne({},this.props,{instanceId:this.instanceId}))}}]),r}(I.Component))}),"withInstanceId"),Vb=Ab((function(e){return function(t){function n(){var e;return Oe(this,n),(e=Te(this,xe(n).apply(this,arguments))).timeouts=[],e.setTimeout=e.setTimeout.bind(Ce(e)),e.clearTimeout=e.clearTimeout.bind(Ce(e)),e}return Me(n,t),Ee(n,[{key:"componentWillUnmount",value:function(){this.timeouts.forEach(clearTimeout)}},{key:"setTimeout",value:function(e){function t(t,n){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(e,t){var n=this,r=setTimeout((function(){e(),n.clearTimeout(r)}),t);return this.timeouts.push(r),r}))},{key:"clearTimeout",value:function(e){function t(t){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(e){clearTimeout(e),this.timeouts=Object(N.without)(this.timeouts,e)}))},{key:"render",value:function(){return Object(I.createElement)(e,Ne({},this.props,{setTimeout:this.setTimeout,clearTimeout:this.clearTimeout}))}}]),n}(I.Component)}),"withSafeTimeout");var Bb=window.requestIdleCallback?window.requestIdleCallback:window.requestAnimationFrame,Ub=Object(I.createContext)(Db),Wb=Ub.Consumer,Kb=Ub.Provider,Yb=Wb,$b=Kb;function qb(){return Object(I.useContext)(Ub)}var Gb=Object(I.createContext)(!1),Zb=(Gb.Consumer,Gb.Provider);var Xb="undefined"!=typeof window?I.useLayoutEffect:I.useEffect,Qb=function(){var e=[],t=new WeakMap,n=!1,r=function r(o){do{if(0===e.length)return void(n=!1);var i=e.shift();t.get(i)(),t.delete(i)}while(o&&o.timeRemaining&&o.timeRemaining()>0);Bb(r)};return{add:function(o,i){t.has(o)||e.push(o),t.set(o,i),n||(n=!0,Bb(r))},flush:function(n){if(!t.has(n))return!1;t.delete(n);var r=e.indexOf(n);return e.splice(r,1),!0}}}();function Jb(e,t){var n,r=Object(I.useCallback)(e,t),o=qb(),i=Object(I.useContext)(Gb),a=Object(I.useMemo)((function(){return{queue:!0}}),[o]),s=Ae(Object(I.useReducer)((function(e){return e+1}),0),2)[1],c=Object(I.useRef)(),l=Object(I.useRef)(i),u=Object(I.useRef)(),d=Object(I.useRef)(),f=Object(I.useRef)();try{n=c.current!==r||d.current?r(o.select,o):u.current}catch(WE){var h="An error occurred while running 'mapSelect': ".concat(WE.message);if(d.current)throw h+="\nThe error may be correlated with this previous error:\n",h+="".concat(d.current.stack,"\n\n"),h+="Original stack trace:",new Error(h)}return Xb((function(){c.current=r,l.current!==i&&(l.current=i,Qb.flush(a)),u.current=n,d.current=void 0,f.current=!0})),Xb((function(){var e=function(){if(f.current){try{var e=c.current(o.select,o);if(Object(tr.isShallowEqualObjects)(u.current,e))return;u.current=e}catch(WE){d.current=WE}s({})}};l.current?Qb.add(a,e):e();var t=o.subscribe((function(){l.current?Qb.add(a,e):e()}));return function(){f.current=!1,t(),Qb.flush(a)}}),[o]),n}var ey=function(e){return Ab((function(t){return Fb((function(n){var r=Jb((function(t,r){return e(t,n,r)}));return Object(I.createElement)(t,Ne({},n,r))}))}),"withSelect")},ty="undefined"!=typeof window?I.useLayoutEffect:I.useEffect,ny=function(e,t){var n=qb(),r=Object(I.useRef)(e);return ty((function(){r.current=e})),Object(I.useMemo)((function(){var e=r.current(n.dispatch,n);return Object(N.mapValues)(e,(function(e,t){return"function"!=typeof e&&console.warn("Property ".concat(t," returned from dispatchMap in useDispatchWithMap must be a function.")),function(){var e;return(e=r.current(n.dispatch,n))[t].apply(e,arguments)}}))}),[n].concat(lt(t)))},ry=function(e){return Ab((function(t){return function(n){var r=ny((function(t,r){return e(t,n,r)}),[]);return Object(I.createElement)(t,Ne({},n,r))}}),"withDispatch")},oy=Ab((function(e){return function(t){return Object(I.createElement)(Yb,null,(function(n){return Object(I.createElement)(e,Ne({},t,{registry:n}))}))}}),"withRegistry");Db.select,Db.dispatch,Db.subscribe,Db.registerGenericStore;var iy=Db.registerStore,ay=(Db.use,{insertUsage:{}}),sy={alignWide:!1,colors:[{name:he("Pale pink"),slug:"pale-pink",color:"#f78da7"},{name:he("Vivid red"),slug:"vivid-red",color:"#cf2e2e"},{name:he("Luminous vivid orange"),slug:"luminous-vivid-orange",color:"#ff6900"},{name:he("Luminous vivid amber"),slug:"luminous-vivid-amber",color:"#fcb900"},{name:he("Light green cyan"),slug:"light-green-cyan",color:"#7bdcb5"},{name:he("Vivid green cyan"),slug:"vivid-green-cyan",color:"#00d084"},{name:he("Pale cyan blue"),slug:"pale-cyan-blue",color:"#8ed1fc"},{name:he("Vivid cyan blue"),slug:"vivid-cyan-blue",color:"#0693e3"},{name:he("Very light gray"),slug:"very-light-gray",color:"#eeeeee"},{name:he("Cyan bluish gray"),slug:"cyan-bluish-gray",color:"#abb8c3"},{name:he("Very dark gray"),slug:"very-dark-gray",color:"#313131"}],fontSizes:[{name:ve("Small","font size name"),size:13,slug:"small"},{name:ve("Normal","font size name"),size:16,slug:"normal"},{name:ve("Medium","font size name"),size:20,slug:"medium"},{name:ve("Large","font size name"),size:36,slug:"large"},{name:ve("Huge","font size name"),size:48,slug:"huge"}],imageSizes:[{slug:"thumbnail",label:he("Thumbnail")},{slug:"medium",label:he("Medium")},{slug:"large",label:he("Large")},{slug:"full",label:he("Full Size")}],maxWidth:580,allowedBlockTypes:!0,maxUploadFileSize:0,allowedMimeTypes:null,availableLegacyWidgets:{},hasPermissionsToManageWidgets:!1};function cy(e,t,n){return[].concat(lt(e.slice(0,n)),lt(Object(N.castArray)(t)),lt(e.slice(n)))}function ly(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,o=lt(e);return o.splice(t,r),cy(o,e.slice(t,t+r),n)}function uy(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=x({},t,[]);return e.forEach((function(e){var r=e.clientId,o=e.innerBlocks;n[t].push(r),Object.assign(n,uy(o,r))})),n}function dy(e,t){for(var n={},r=lt(e);r.length;){var o=r.shift(),i=o.innerBlocks,a=j(o,["innerBlocks"]);r.push.apply(r,lt(i)),n[a.clientId]=t(a)}return n}function fy(e){return dy(e,(function(e){return Object(N.omit)(e,"attributes")}))}function hy(e){return dy(e,(function(e){return e.attributes}))}function py(e,t){return e===t?D({},e):t}function vy(e,t){return"UPDATE_BLOCK_ATTRIBUTES"===e.type&&void 0!==t&&"UPDATE_BLOCK_ATTRIBUTES"===t.type&&e.clientId===t.clientId&&(n=e.attributes,r=t.attributes,Object(N.isEqual)(Object(N.keys)(n),Object(N.keys)(r)));var n,r}var my=Object(N.flow)(Fe.a,(function(e){return function(t,n){if(t&&"REMOVE_BLOCKS"===n.type){for(var r=lt(n.clientIds),o=0;o1&&void 0!==arguments[1]?arguments[1]:"";return Object(N.reduce)(t[n],(function(n,r){return[].concat(lt(n),[r],lt(e(t,r)))}),[])}(t.order);return D({},t,{byClientId:D({},Object(N.omit)(t.byClientId,r),fy(n.blocks)),attributes:D({},Object(N.omit)(t.attributes,r),hy(n.blocks)),order:D({},Object(N.omit)(t.order,r),uy(n.blocks))})}return e(t,n)}}),(function(e){return function(t,n){if(t&&"SAVE_REUSABLE_BLOCK_SUCCESS"===n.type){var r=n.id,o=n.updatedId;if(r===o)return t;(t=D({},t)).attributes=Object(N.mapValues)(t.attributes,(function(e,n){return"core/block"===t.byClientId[n].name&&e.ref===r?D({},e,{ref:o}):e}))}return e(t,n)}}),(function(e){var t;return function(n,r){var o=e(n,r),i="MARK_LAST_CHANGE_AS_PERSISTENT"===r.type;if(n===o&&!i){var a=Object(N.get)(n,["isPersistentChange"],!0);return n.isPersistentChange===a?n:D({},o,{isPersistentChange:a})}return o=D({},o,{isPersistentChange:i||!vy(r,t)}),t=r,o}}),(function(e){var t=new Set(["RECEIVE_BLOCKS"]);return function(n,r){var o=e(n,r);return o!==n&&(o.isIgnoredChange=t.has(r.type)),o}}))({byClientId:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RESET_BLOCKS":return fy(t.blocks);case"RECEIVE_BLOCKS":return D({},e,fy(t.blocks));case"UPDATE_BLOCK":if(!e[t.clientId])return e;var n=Object(N.omit)(t.updates,"attributes");return Object(N.isEmpty)(n)?e:D({},e,x({},t.clientId,D({},e[t.clientId],n)));case"INSERT_BLOCKS":return D({},e,fy(t.blocks));case"REPLACE_BLOCKS":return t.blocks?D({},Object(N.omit)(e,t.clientIds),fy(t.blocks)):e;case"REMOVE_BLOCKS":return Object(N.omit)(e,t.clientIds)}return e},attributes:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RESET_BLOCKS":return hy(t.blocks);case"RECEIVE_BLOCKS":return D({},e,hy(t.blocks));case"UPDATE_BLOCK":return e[t.clientId]&&t.updates.attributes?D({},e,x({},t.clientId,D({},e[t.clientId],t.updates.attributes))):e;case"UPDATE_BLOCK_ATTRIBUTES":if(!e[t.clientId])return e;var n=Object(N.reduce)(t.attributes,(function(n,r,o){return r!==n[o]&&((n=py(e[t.clientId],n))[o]=r),n}),e[t.clientId]);return n===e[t.clientId]?e:D({},e,x({},t.clientId,n));case"INSERT_BLOCKS":return D({},e,hy(t.blocks));case"REPLACE_BLOCKS":return t.blocks?D({},Object(N.omit)(e,t.clientIds),hy(t.blocks)):e;case"REMOVE_BLOCKS":return Object(N.omit)(e,t.clientIds)}return e},order:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RESET_BLOCKS":return uy(t.blocks);case"RECEIVE_BLOCKS":return D({},e,Object(N.omit)(uy(t.blocks),""));case"INSERT_BLOCKS":var n=t.rootClientId,r=void 0===n?"":n,o=e[r]||[],i=uy(t.blocks,r),a=t.index,s=void 0===a?o.length:a;return D({},e,i,x({},r,cy(o,i[r],s)));case"MOVE_BLOCK_TO_POSITION":var c,l=t.fromRootClientId,u=void 0===l?"":l,d=t.toRootClientId,f=void 0===d?"":d,h=t.clientId,p=t.index,v=void 0===p?e[f].length:p;if(u===f){var m=e[f],g=m.indexOf(h);return D({},e,x({},f,ly(e[f],g,v)))}return D({},e,(x(c={},u,Object(N.without)(e[u],h)),x(c,f,cy(e[f],h,v)),c));case"MOVE_BLOCKS_UP":var b=t.clientIds,y=t.rootClientId,k=void 0===y?"":y,_=Object(N.first)(b),w=e[k];if(!w.length||_===Object(N.first)(w))return e;var O=w.indexOf(_);return D({},e,x({},k,ly(w,O,O-1,b.length)));case"MOVE_BLOCKS_DOWN":var S=t.clientIds,E=t.rootClientId,C=void 0===E?"":E,T=Object(N.first)(S),M=Object(N.last)(S),j=e[C];if(!j.length||M===Object(N.last)(j))return e;var I=j.indexOf(T);return D({},e,x({},C,ly(j,I,I+1,S.length)));case"REPLACE_BLOCKS":var P=t.clientIds;if(!t.blocks)return e;var R=uy(t.blocks);return Object(N.flow)([function(e){return Object(N.omit)(e,P)},function(e){return D({},e,Object(N.omit)(R,""))},function(e){return Object(N.mapValues)(e,(function(e){return Object(N.reduce)(e,(function(e,t){return t===P[0]?[].concat(lt(e),lt(R[""])):(-1===P.indexOf(t)&&e.push(t),e)}),[])}))}])(e);case"REMOVE_BLOCKS":return Object(N.flow)([function(e){return Object(N.omit)(e,t.clientIds)},function(e){return Object(N.mapValues)(e,(function(e){return N.without.apply(void 0,[e].concat(lt(t.clientIds)))}))}])(e)}return e}});var gy={},by={start:gy,end:gy,isMultiSelecting:!1,isEnabled:!0,initialPosition:null};var yy=Fe()({blocks:my,isTyping:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];switch((arguments.length>1?arguments[1]:void 0).type){case"START_TYPING":return!0;case"STOP_TYPING":return!1}return e},isCaretWithinFormattedText:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];switch((arguments.length>1?arguments[1]:void 0).type){case"ENTER_FORMATTED_TEXT":return!0;case"EXIT_FORMATTED_TEXT":return!1}return e},blockSelection:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:by,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"CLEAR_SELECTED_BLOCK":return by;case"START_MULTI_SELECT":return e.isMultiSelecting?e:D({},e,{isMultiSelecting:!0,initialPosition:null});case"STOP_MULTI_SELECT":return e.isMultiSelecting?D({},e,{isMultiSelecting:!1,initialPosition:null}):e;case"MULTI_SELECT":return D({},by,{isMultiSelecting:e.isMultiSelecting,start:{clientId:t.start},end:{clientId:t.end}});case"SELECT_BLOCK":return t.clientId===e.start.clientId&&t.clientId===e.end.clientId?e:D({},by,{initialPosition:t.initialPosition,start:{clientId:t.clientId},end:{clientId:t.clientId}});case"REPLACE_INNER_BLOCKS":case"INSERT_BLOCKS":return t.updateSelection?D({},by,{start:{clientId:t.blocks[0].clientId},end:{clientId:t.blocks[0].clientId}}):e;case"REMOVE_BLOCKS":return t.clientIds&&t.clientIds.length&&-1!==t.clientIds.indexOf(e.start.clientId)?by:e;case"REPLACE_BLOCKS":if(-1===t.clientIds.indexOf(e.start.clientId))return e;var n=t.indexToSelect||t.blocks.length-1,r=t.blocks[n];return r?r.clientId===e.start.clientId&&r.clientId===e.end.clientId?e:D({},by,{start:{clientId:r.clientId},end:{clientId:r.clientId}}):by;case"TOGGLE_SELECTION":return D({},by,{isEnabled:t.isSelectionEnabled});case"SELECTION_CHANGE":return D({},by,{start:{clientId:t.clientId,attributeKey:t.attributeKey,offset:t.startOffset},end:{clientId:t.clientId,attributeKey:t.attributeKey,offset:t.endOffset}})}return e},blocksMode:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;if("TOGGLE_BLOCK_MODE"===t.type){var n=t.clientId;return D({},e,x({},n,e[n]&&"html"===e[n]?"visual":"html"))}return e},blockListSettings:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"REPLACE_BLOCKS":case"REMOVE_BLOCKS":return Object(N.omit)(e,t.clientIds);case"UPDATE_BLOCK_LIST_SETTINGS":var n=t.clientId;return t.settings?Object(N.isEqual)(e[n],t.settings)?e:D({},e,x({},n,t.settings)):e.hasOwnProperty(n)?Object(N.omit)(e,n):e}return e},insertionPoint:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SHOW_INSERTION_POINT":return{rootClientId:t.rootClientId,index:t.index};case"HIDE_INSERTION_POINT":return null}return e},template:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{isValid:!0},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_TEMPLATE_VALIDITY":return D({},e,{isValid:t.isValid})}return e},settings:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:sy,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"UPDATE_SETTINGS":return D({},e,t.settings)}return e},preferences:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ay,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"INSERT_BLOCKS":case"REPLACE_BLOCKS":return t.blocks.reduce((function(e,n){var r=n.name,o={name:n.name};return Kd(n)&&(o.ref=n.attributes.ref,r+="/"+n.attributes.ref),D({},e,{insertUsage:D({},e.insertUsage,x({},r,{time:t.time,count:e.insertUsage[r]?e.insertUsage[r].count+1:1,insert:o}))})}),e)}return e}}),ky=n(129),_y=n.n(ky),wy=n(130),Oy=n.n(wy);function Sy(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o1&&void 0!==arguments[1]?arguments[1]:null,clientId:e}}function Hy(e){var t;return Ve.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,Sy("core/block-editor","getPreviousBlockClientId",e);case 2:if(!(t=n.sent)){n.next=6;break}return n.next=6,Fy(t,-1);case 6:case"end":return n.stop()}}),xy)}function Vy(e){var t;return Ve.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,Sy("core/block-editor","getNextBlockClientId",e);case 2:if(!(t=n.sent)){n.next=6;break}return n.next=6,Fy(t);case 6:case"end":return n.stop()}}),Dy)}function By(){return{type:"START_MULTI_SELECT"}}function Uy(){return{type:"STOP_MULTI_SELECT"}}function Wy(e,t){return{type:"MULTI_SELECT",start:e,end:t}}function Ky(){return{type:"CLEAR_SELECTED_BLOCK"}}function Yy(){return{type:"TOGGLE_SELECTION",isSelectionEnabled:!(arguments.length>0&&void 0!==arguments[0])||arguments[0]}}function $y(e,t,n){var r,o,i;return Ve.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return e=Object(N.castArray)(e),t=Object(N.castArray)(t),a.next=4,Sy("core/block-editor","getBlockRootClientId",Object(N.first)(e));case 4:r=a.sent,o=0;case 6:if(!(o1&&void 0!==a[1]?a[1]:"",n=a.length>2&&void 0!==a[2]?a[2]:"",r=a.length>3?a[3]:void 0,s.next=5,Sy("core/block-editor","getTemplateLock",t);case 5:if("all"!==s.sent){s.next=8;break}return s.abrupt("return");case 8:if(o={type:"MOVE_BLOCK_TO_POSITION",fromRootClientId:t,toRootClientId:n,clientId:e,index:r},t!==n){s.next=13;break}return s.next=12,o;case 12:return s.abrupt("return");case 13:return s.next=15,Sy("core/block-editor","getBlockName",e);case 15:return i=s.sent,s.next=18,Sy("core/block-editor","canInsertBlockType",i,n);case 18:if(!s.sent){s.next=22;break}return s.next=22,o;case 22:case"end":return s.stop()}}),jy)}function Jy(e,t,n){return ek([e],t,n,!(arguments.length>3&&void 0!==arguments[3])||arguments[3])}function ek(e,t,n){var r,o,i,a,s,c,l,u,d=arguments;return Ve.a.wrap((function(f){for(;;)switch(f.prev=f.next){case 0:r=!(d.length>3&&void 0!==d[3])||d[3],e=Object(N.castArray)(e),o=[],i=!0,a=!1,s=void 0,f.prev=6,c=e[Symbol.iterator]();case 8:if(i=(l=c.next()).done){f.next=17;break}return u=l.value,f.next=12,Sy("core/block-editor","canInsertBlockType",u.name,n);case 12:f.sent&&o.push(u);case 14:i=!0,f.next=8;break;case 17:f.next=23;break;case 19:f.prev=19,f.t0=f.catch(6),a=!0,s=f.t0;case 23:f.prev=23,f.prev=24,i||null==c.return||c.return();case 26:if(f.prev=26,!a){f.next=29;break}throw s;case 29:return f.finish(26);case 30:return f.finish(23);case 31:if(!o.length){f.next=33;break}return f.abrupt("return",{type:"INSERT_BLOCKS",blocks:o,index:t,rootClientId:n,time:Date.now(),updateSelection:r});case 33:case"end":return f.stop()}}),Iy,null,[[6,19,23,31],[24,,26,30]])}function tk(e,t){return{type:"SHOW_INSERTION_POINT",rootClientId:e,index:t}}function nk(){return{type:"HIDE_INSERTION_POINT"}}function rk(e){return{type:"SET_TEMPLATE_VALIDITY",isValid:e}}function ok(){return{type:"SYNCHRONIZE_TEMPLATE"}}function ik(e,t){return{type:"MERGE_BLOCKS",blocks:[e,t]}}function ak(e){var t,n=arguments;return Ve.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(t=!(n.length>1&&void 0!==n[1])||n[1],e=Object(N.castArray)(e),!t){r.next=5;break}return r.next=5,Hy(e[0]);case 5:return r.next=7,{type:"REMOVE_BLOCKS",clientIds:e};case 7:return r.delegateYield(Ny(),"t0",8);case 8:case"end":return r.stop()}}),Py)}function sk(e,t){return ak([e],t)}function ck(e,t){return{type:"REPLACE_INNER_BLOCKS",rootClientId:e,blocks:t,updateSelection:!(arguments.length>2&&void 0!==arguments[2])||arguments[2],time:Date.now()}}function lk(e){return{type:"TOGGLE_BLOCK_MODE",clientId:e}}function uk(){return{type:"START_TYPING"}}function dk(){return{type:"STOP_TYPING"}}function fk(){return{type:"ENTER_FORMATTED_TEXT"}}function hk(){return{type:"EXIT_FORMATTED_TEXT"}}function pk(e,t,n,r){return{type:"SELECTION_CHANGE",clientId:e,attributeKey:t,startOffset:n,endOffset:r}}function vk(e,t,n){var r=Hd();if(r)return Jy($d(r,e),n,t)}function mk(e,t){return{type:"UPDATE_BLOCK_LIST_SETTINGS",clientId:e,settings:t}}function gk(e){return{type:"UPDATE_SETTINGS",settings:e}}function bk(e,t){return{type:"SAVE_REUSABLE_BLOCK_SUCCESS",id:e,updatedId:t}}function yk(){return{type:"MARK_LAST_CHANGE_AS_PERSISTENT"}}var kk=3,_k=2,wk=1,Ok=0,Sk=[],Ek={},Ck=yo((function(){return[]}),(function(e,t){return Object(N.map)(l_(e,t),(function(t){return Mk(e,t)}))}));function Tk(e,t){var n=e.blocks.byClientId[t];return n?n.name:null}function xk(e,t){var n=e.blocks.byClientId[t];return!!n&&n.isValid}var Dk=yo((function(e,t){var n=e.blocks.byClientId[t];if(!n)return null;var r=e.blocks.attributes[t],o=Vd(n.name);return o&&(r=Object(N.reduce)(o.attributes,(function(t,n,o){return"meta"===n.source&&(t===r&&(t=D({},t)),t[o]=L_(e,n.meta)),t}),r)),r}),(function(e,t){return[e.blocks.byClientId[t],e.blocks.attributes[t],L_(e)]})),Mk=yo((function(e,t){var n=e.blocks.byClientId[t];return n?D({},n,{attributes:Dk(e,t),innerBlocks:Ik(e,t)}):null}),(function(e,t){return[].concat(lt(Dk.getDependants(e,t)),[Ck(e,t)])})),jk=yo((function(e,t){var n=e.blocks.byClientId[t];return n?D({},n,{attributes:Dk(e,t)}):null}),(function(e,t){return[e.blocks.byClientId[t]].concat(lt(Dk.getDependants(e,t)))})),Ik=yo((function(e,t){return Object(N.map)(l_(e,t),(function(t){return Mk(e,t)}))}),(function(e){return[e.blocks.byClientId,e.blocks.order,e.blocks.attributes]})),Pk=function e(t,n){return Object(N.flatMap)(n,(function(n){var r=l_(t,n);return[].concat(lt(r),lt(e(t,r)))}))},Nk=yo((function(e){var t=l_(e);return[].concat(lt(t),lt(Pk(e,t)))}),(function(e){return[e.blocks.order]})),Rk=yo((function(e,t){var n=Nk(e);return t?Object(N.reduce)(n,(function(n,r){return e.blocks.byClientId[r].name===t?n+1:n}),0):n.length}),(function(e){return[e.blocks.order,e.blocks.byClientId]})),Lk=yo((function(e,t){return Object(N.map)(Object(N.castArray)(t),(function(t){return Mk(e,t)}))}),(function(e){return[L_(e),e.blocks.byClientId,e.blocks.order,e.blocks.attributes]}));function Ak(e,t){return l_(e,t).length}function zk(e){return e.blockSelection.start}function Fk(e){return e.blockSelection.end}function Hk(e){return e.blockSelection.start.clientId}function Vk(e){return e.blockSelection.end.clientId}function Bk(e){var t=Jk(e).length;return t||(e.blockSelection.start.clientId?1:0)}function Uk(e){var t=e.blockSelection,n=t.start,r=t.end;return!!n.clientId&&n.clientId===r.clientId}function Wk(e){var t=e.blockSelection,n=t.start,r=t.end;return n.clientId&&n.clientId===r.clientId&&e.blocks.byClientId[n.clientId]?n.clientId:null}function Kk(e){var t=Wk(e);return t?Mk(e,t):null}var Yk=yo((function(e,t){var n=e.blocks.order;for(var r in n)if(Object(N.includes)(n[r],t))return r;return null}),(function(e){return[e.blocks.order]})),$k=yo((function(e,t){for(var n=t,r=t;n;)n=Yk(e,r=n);return r}),(function(e){return[e.blocks.order]}));function qk(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;if(void 0===t&&(t=Wk(e)),void 0===t&&(t=n<0?t_(e):n_(e)),!t)return null;var r=Yk(e,t);if(null===r)return null;var o=e.blocks.order[r],i=o.indexOf(t)+1*n;return i<0?null:i===o.length?null:o[i]}function Gk(e,t){return qk(e,t,-1)}function Zk(e,t){return qk(e,t,1)}function Xk(e){var t=e.blockSelection,n=t.start,r=t.end;return n.clientId===r.clientId&&n.clientId?e.blockSelection.initialPosition:null}var Qk=yo((function(e){var t=e.blockSelection,n=t.start,r=t.end;if(void 0===n.clientId||void 0===r.clientId)return Sk;if(n.clientId===r.clientId)return[n.clientId];var o=Yk(e,n.clientId);if(null===o)return Sk;var i=l_(e,o),a=i.indexOf(n.clientId),s=i.indexOf(r.clientId);return a>s?i.slice(s,a+1):i.slice(a,s+1)}),(function(e){return[e.blocks.order,e.blockSelection.start.clientId,e.blockSelection.end.clientId]}));function Jk(e){var t=e.blockSelection,n=t.start,r=t.end;return n.clientId===r.clientId?Sk:Qk(e)}var e_=yo((function(e){var t=Jk(e);return t.length?t.map((function(t){return Mk(e,t)})):Sk}),(function(e){return[].concat(lt(Qk.getDependants(e)),[e.blocks.byClientId,e.blocks.order,e.blocks.attributes,L_(e)])}));function t_(e){return Object(N.first)(Jk(e))||null}function n_(e){return Object(N.last)(Jk(e))||null}var r_=yo((function(e,t,n){for(var r=n;t!==r&&r;)r=Yk(e,r);return t===r}),(function(e){return[e.blocks.order]}));function o_(e,t){return t_(e)===t}function i_(e,t){return-1!==Jk(e).indexOf(t)}var a_=yo((function(e,t){for(var n=t,r=!1;n&&!r;)r=i_(e,n=Yk(e,n));return r}),(function(e){return[e.blocks.order,e.blockSelection.start.clientId,e.blockSelection.end.clientId]}));function s_(e){var t=e.blockSelection,n=t.start,r=t.end;return n.clientId===r.clientId?null:n.clientId||null}function c_(e){var t=e.blockSelection,n=t.start,r=t.end;return n.clientId===r.clientId?null:r.clientId||null}function l_(e,t){return e.blocks.order[t||""]||Sk}function u_(e,t,n){return l_(e,n).indexOf(t)}function d_(e,t){var n=e.blockSelection,r=n.start,o=n.end;return r.clientId===o.clientId&&r.clientId===t}function f_(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return Object(N.some)(l_(e,t),(function(t){return d_(e,t)||i_(e,t)||n&&f_(e,t,n)}))}function h_(e,t){if(!t)return!1;var n=Jk(e),r=n.indexOf(t);return r>-1&&r2&&void 0!==arguments[2]?arguments[2]:null,r=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return Object(N.isBoolean)(e)?e:Object(N.isArray)(e)?Object(N.includes)(e,t):n},o=Vd(t);if(!o)return!1;var i=P_(e),a=i.allowedBlockTypes,s=r(a,t,!0);if(!s)return!1;var c=!!S_(e,n);if(c)return!1;var l=I_(e,n),u=Object(N.get)(l,["allowedBlocks"]),d=r(u,t),f=o.parent,h=Tk(e,n),p=r(f,h);return null!==d&&null!==p?d||p:null!==d?d:null===p||p},C_=yo(E_,(function(e,t,n){return[e.blockListSettings[n],e.blocks.byClientId[n],e.settings.allowedBlockTypes,e.settings.templateLock]}));function T_(e,t){return Object(N.get)(e.preferences.insertUsage,[t],null)}var x_=function(e,t,n){return!!Wd(t,"inserter",!0)&&E_(e,t.name,n)},D_=function(e,t,n){if(!E_(e,"core/block",n))return!1;var r=Tk(e,t.clientId);return!!r&&(!!Vd(r)&&(!!E_(e,r,n)&&!r_(e,t.clientId,n)))},M_=yo((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=function(e,t,n){return n?kk:t>0?_k:"common"===e?wk:Ok},r=function(e,t){if(!e)return t;var n=Date.now()-e;switch(!0){case n<36e5:return 4*t;case n<864e5:return 2*t;case n<6048e5:return t/2;default:return t/4}},o=function(t){var o=t.name,i=!1;Wd(t.name,"multiple",!0)||(i=Object(N.some)(Lk(e,Nk(e)),{name:t.name}));var a=Object(N.isArray)(t.parent),s=T_(e,o)||{},c=s.time,l=s.count,u=void 0===l?0:l;return{id:o,name:t.name,initialAttributes:{},title:t.title,icon:t.icon,category:t.category,keywords:t.keywords,isDisabled:i,utility:n(t.category,u,a),frecency:r(c,u),hasChildBlocksWithInserterSupport:Yd(t.name)}},i=function(t){var o="core/block/".concat(t.id),i=Vd(Tk(e,t.clientId)),a=T_(e,o)||{},s=a.time,c=a.count,l=void 0===c?0:c,u=n("reusable",l,!1),d=r(s,l);return{id:o,name:"core/block",initialAttributes:{ref:t.id},title:t.title,icon:i.icon,category:"reusable",keywords:[],isDisabled:!1,utility:u,frecency:d}},a=Bd().filter((function(n){return x_(e,n,t)})).map(o),s=A_(e).filter((function(n){return D_(e,n,t)})).map(i);return Object(N.orderBy)([].concat(lt(a),lt(s)),["utility","frecency"],["desc","desc"])}),(function(e,t){return[e.blockListSettings[t],e.blocks.byClientId,e.blocks.order,e.preferences.insertUsage,e.settings.allowedBlockTypes,e.settings.templateLock,A_(e),Bd()]})),j_=yo((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=Object(N.some)(Bd(),(function(n){return x_(e,n,t)}));if(n)return!0;var r=Object(N.some)(A_(e),(function(n){return D_(e,n,t)}));return r}),(function(e,t){return[e.blockListSettings[t],e.blocks.byClientId,e.settings.allowedBlockTypes,e.settings.templateLock,A_(e),Bd()]}));function I_(e,t){return e.blockListSettings[t]}function P_(e){return e.settings}function N_(e){return e.blocks.isPersistentChange}function R_(e){return e.blocks.isIgnoredChange}function L_(e,t){return void 0===t?Object(N.get)(e,["settings","__experimentalMetaSource","value"],Ek):Object(N.get)(e,["settings","__experimentalMetaSource","value",t])}function A_(e){return Object(N.get)(e,["settings","__experimentalReusableBlocks"],Sk)}var z_={MERGE_BLOCKS:function(e,t){var n=t.dispatch,r=t.getState(),o=Ae(e.blocks,2),i=o[0],a=o[1],s=Mk(r,i),c=Vd(s.name);if(c.merge){var l=Mk(r,a),u=Vd(l.name),d=zk(r),f=d.clientId,h=d.attributeKey,p=d.offset,v=f===i||f===a,m=f===i?s:l,g=m.attributes[h];if(v){var b=(f===i?c:u).attributes[h].multiline,y=ei(Ao({html:g,multilineTag:b}),"",p,p);m.attributes[h]=wi({value:y,multilineTag:b})}var k=s.name===l.name?[l]:nf(l,s.name);if(k&&k.length){var _=c.merge(s.attributes,k[0].attributes);if(v){var w=Object(N.findKey)(_,(function(e){return"string"==typeof e&&-1!==e.indexOf("")})),O=_[w],S=c.attributes[w].multiline,E=Ao({html:O,multilineTag:S}),C=E.text.indexOf(""),T=wi({value:ti(E,C,C+1),multilineTag:S});_[w]=T,m.attributes[h]=g,n(pk(s.clientId,w,C,C))}n($y([s.clientId,l.clientId],[D({},s,{attributes:D({},s.attributes,_)})].concat(lt(k.slice(1)))))}}else n(Fy(s.clientId))},RESET_BLOCKS:[function(e,t){var n=t.getState(),r=O_(n),o=S_(n),i=!r||"all"!==o||function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return t.length===n.length&&Object(N.every)(n,(function(n,r){var o=Ae(n,3),i=o[0],a=o[2],s=t[r];return i===s.name&&e(s.innerBlocks,a)}))}(e.blocks,r);if(i!==w_(n))return rk(i)}],MULTI_SELECT:function(e,t){var n=Bk((0,t.getState)());es(me(pe("%s block selected.","%s blocks selected.",n),n),"assertive")},SYNCHRONIZE_TEMPLATE:function(e,t){var n=(0,t.getState)();return Ry(Rp(Ik(n),O_(n)))}};var F_=function(e){var t,n=[_y()(z_),Oy.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:e.getState,dispatch:function(){return r.apply(void 0,arguments)}};return t=n.map((function(e){return e(o)})),r=N.flowRight.apply(void 0,lt(t))(e.dispatch),e.dispatch=r,e},H_={reducer:yy,selectors:T,actions:C,controls:Cy},V_=iy("core/block-editor",D({},H_,{persist:["preferences"]}));F_(V_);var B_=function(e,t){return Object(N.find)(e,{color:t})};ey((function(e){var t=e("core/block-editor").getSettings();return{disableCustomFontSizes:t.disableCustomFontSizes,fontSizes:t.fontSizes}}))(lc);var U_=Object(I.createContext)({name:"",isSelected:!1,focusedElement:null,setFocusedElement:N.noop,clientId:null}),W_=U_.Consumer,K_=U_.Provider,Y_=function(e){return Ab((function(t){return function(n){return Object(I.createElement)(W_,null,(function(r){return Object(I.createElement)(t,Ne({},n,e(r,n)))}))}}),"withBlockEditContext")},$_=Ab((function(e){return function(t){return Object(I.createElement)(W_,null,(function(n){return n.isSelected&&Object(I.createElement)(e,t)}))}}),"ifBlockEditSelected"),q_=[{icon:"editor-alignleft",title:he("Align text left"),align:"left"},{icon:"editor-aligncenter",title:he("Align text center"),align:"center"},{icon:"editor-alignright",title:he("Align text right"),align:"right"}];Object(N.flowRight)(Y_((function(e){return{clientId:e.clientId}})),eb({isLargeViewport:"medium"}),ey((function(e,t){var n=t.clientId,r=t.isLargeViewport,o=t.isCollapsed,i=e("core/block-editor"),a=i.getBlockRootClientId,s=i.getSettings;return{isCollapsed:o||!r||!s().hasFixedToolbar&&a(n)}})))((function(e){var t=e.isCollapsed,n=e.value,r=e.onChange,o=e.alignmentControls,i=void 0===o?q_:o;function a(e){return function(){return r(n===e?void 0:e)}}var s=Object(N.find)(i,(function(e){return e.align===n}));return Object(I.createElement)(gu,{isCollapsed:t,icon:s?s.icon:"editor-alignleft",label:he("Change Text Alignment"),controls:i.map((function(e){var t=e.align;return D({},e,{isActive:n===t,onClick:a(t)})}))})}));var G_=[];var Z_=Object(N.flowRight)([Y_((function(e){return{blockName:e.name}})),function(e){return function(t){function n(){var e;return Oe(this,n),(e=Te(this,xe(n).call(this))).state={completers:G_},e.saveParentRef=e.saveParentRef.bind(Ce(e)),e.onFocus=e.onFocus.bind(Ce(e)),e}return Me(n,t),Ee(n,[{key:"componentDidUpdate",value:function(){this.parentNode.contains(document.activeElement)&&this.hasStaleCompleters()&&this.updateCompletersState()}},{key:"onFocus",value:function(){this.hasStaleCompleters()&&this.updateCompletersState()}},{key:"hasStaleCompleters",value:function(){return!("lastFilteredCompletersProp"in this.state)||this.state.lastFilteredCompletersProp!==this.props.completers}},{key:"updateCompletersState",value:function(){var e=this.props,t=e.blockName,n=e.completers,r=n;Wr("editor.Autocomplete.completers")&&(n=Yr("editor.Autocomplete.completers",n&&n.map(N.clone),t)),this.setState({lastFilteredCompletersProp:r,completers:n||G_})}},{key:"saveParentRef",value:function(e){this.parentNode=e}},{key:"render",value:function(){var t=this.state.completers,n=D({},this.props,{completers:t});return Object(I.createElement)("div",{onFocus:this.onFocus,ref:this.saveParentRef},Object(I.createElement)(e,Ne({onFocus:this.onFocus},n)))}}]),n}(I.Component)}])(is),X_={left:{icon:"align-left",title:he("Align left")},center:{icon:"align-center",title:he("Align center")},right:{icon:"align-right",title:he("Align right")},wide:{icon:"align-wide",title:he("Wide width")},full:{icon:"align-full-width",title:he("Full width")}},Q_=["left","center","right","wide","full"],J_=["wide","full"];var ew=Object(N.flowRight)(Y_((function(e){return{clientId:e.clientId}})),eb({isLargeViewport:"medium"}),ey((function(e,t){var n=t.clientId,r=t.isLargeViewport,o=t.isCollapsed,i=e("core/block-editor"),a=i.getBlockRootClientId,s=(0,i.getSettings)();return{wideControlsEnabled:s.alignWide,isCollapsed:o||!r||!s.hasFixedToolbar&&a(n)}})))((function(e){var t=e.isCollapsed,n=e.value,r=e.onChange,o=e.controls,i=void 0===o?Q_:o,a=e.wideControlsEnabled,s=void 0!==a&&a?i:i.filter((function(e){return-1===J_.indexOf(e)})),c=X_[n];return Object(I.createElement)(gu,{isCollapsed:t,icon:c?c.icon:"align-left",label:he("Change Alignment"),controls:s.map((function(e){return D({},X_[e],{isActive:n===e,onClick:(t=e,function(){return r(n===t?void 0:t)})});var t}))})})),tw=Ka("BlockControls"),nw=tw.Fill,rw=tw.Slot,ow=$_((function(e){var t=e.controls,n=e.children;return Object(I.createElement)(nw,null,Object(I.createElement)(gu,{controls:t}),n)}));ow.Slot=rw;var iw=ow,aw=yu("editor.BlockEdit")((function(e){var t=e.attributes,n=void 0===t?{}:t,r=e.name,o=Vd(r);if(!o)return null;var i=Wd(o,"className",!0)?zf(r):null,a=Pn()(i,n.className),s=o.edit||o.save;return Object(I.createElement)(s,Ne({},e,{className:a}))})),sw=function(e){function t(){var e;return Oe(this,t),(e=Te(this,xe(t).apply(this,arguments))).propsToContext=ep()(e.propsToContext.bind(Ce(e)),{maxSize:1}),e}return Me(t,e),Ee(t,[{key:"propsToContext",value:function(e,t,n,r,o){return{name:e,isSelected:t,clientId:n,onFocus:r,onCaretVerticalPositionChange:o}}},{key:"render",value:function(){var e=this.props,t=e.name,n=e.isSelected,r=e.clientId,o=e.onFocus,i=e.onCaretVerticalPositionChange,a=this.propsToContext(t,n,r,o,i);return Object(I.createElement)(K_,{value:a},Object(I.createElement)(aw,this.props))}}]),t}(I.Component),cw=Ka("BlockFormatControls"),lw=cw.Fill,uw=cw.Slot,dw=$_(lw);dw.Slot=uw;var fw=dw;function hw(e){var t=e.icon,n=e.showColors,r=void 0!==n&&n,o=e.className;"block-default"===Object(N.get)(t,["src"])&&(t={src:Object(I.createElement)(jn,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(I.createElement)(Dn,{d:"M19 7h-1V5h-4v2h-4V5H6v2H5c-1.1 0-2 .9-2 2v10h18V9c0-1.1-.9-2-2-2zm0 10H5V9h14v8z"}))});var i=Object(I.createElement)(kc,{icon:t&&t.src?t.src:t}),a=r?{backgroundColor:t&&t.background,color:t&&t.foreground}:{};return Object(I.createElement)("span",{style:a,className:Pn()("editor-block-icon block-editor-block-icon",o,{"has-colors":r})},i)}function pw(e){var t=e.blocks,n=e.selectedBlockClientId,r=e.selectBlock,o=e.showNestedBlocks;return(Object(I.createElement)("ul",{className:"editor-block-navigation__list block-editor-block-navigation__list",role:"list"},Object(N.map)(t,(function(e){var t=Vd(e.name),i=e.clientId===n;return Object(I.createElement)("li",{key:e.clientId},Object(I.createElement)("div",{className:"editor-block-navigation__item block-editor-block-navigation__item"},Object(I.createElement)(va,{className:Pn()("editor-block-navigation__item-button block-editor-block-navigation__item-button",{"is-selected":i}),onClick:function(){return r(e.clientId)}},Object(I.createElement)(hw,{icon:t.icon,showColors:!0}),t.title,i&&Object(I.createElement)("span",{className:"screen-reader-text"},he("(selected block)")))),o&&!!e.innerBlocks&&!!e.innerBlocks.length&&Object(I.createElement)(pw,{blocks:e.innerBlocks,selectedBlockClientId:n,selectBlock:r,showNestedBlocks:!0}))}))))}var vw=Object(N.flowRight)(ey((function(e){var t=e("core/block-editor"),n=t.getSelectedBlockClientId,r=t.getBlockHierarchyRootClientId,o=t.getBlock,i=t.getBlocks,a=n();return{rootBlocks:i(),rootBlock:a?o(r(a)):null,selectedBlockClientId:a}})),ry((function(e,t){var n=t.onSelect,r=void 0===n?N.noop:n;return{selectBlock:function(t){e("core/block-editor").selectBlock(t),r(t)}}})))((function(e){var t=e.rootBlock,n=e.rootBlocks,r=e.selectedBlockClientId,o=e.selectBlock;if(!n||0===n.length)return null;var i=t&&(t.clientId!==r||t.innerBlocks&&0!==t.innerBlocks.length);return Object(I.createElement)(nc,{role:"presentation",className:"editor-block-navigation__container block-editor-block-navigation__container"},Object(I.createElement)("p",{className:"editor-block-navigation__label block-editor-block-navigation__label"},he("Block Navigation")),i&&Object(I.createElement)(pw,{blocks:[t],selectedBlockClientId:r,selectBlock:o,showNestedBlocks:!0}),!i&&Object(I.createElement)(pw,{blocks:n,selectedBlockClientId:r,selectBlock:o}))})),mw=Object(I.createElement)(jn,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"20",height:"20"},Object(I.createElement)(Dn,{d:"M5 5H3v2h2V5zm3 8h11v-2H8v2zm9-8H6v2h11V5zM7 11H5v2h2v-2zm0 8h2v-2H7v2zm3-2v2h11v-2H10z"}));ey((function(e){return{hasBlocks:!!e("core/block-editor").getBlockCount()}}))((function(e){var t=e.hasBlocks,n=e.isDisabled,r=t&&!n;return Object(I.createElement)(ds,{renderToggle:function(e){var t=e.isOpen,n=e.onToggle;return Object(I.createElement)(I.Fragment,null,r&&Object(I.createElement)(ys,{bindGlobal:!0,shortcuts:x({},Zn.access("o"),n)}),Object(I.createElement)(Pa,{icon:mw,"aria-expanded":t,onClick:r?n:void 0,label:he("Block Navigation"),className:"editor-block-navigation block-editor-block-navigation",shortcut:Qn.access("o"),"aria-disabled":!r}))},renderContent:function(e){var t=e.onClose;return Object(I.createElement)(vw,{onSelect:t})}})}));var gw=Object(I.createElement)(jn,{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24"},Object(I.createElement)(Dn,{fill:"none",d:"M0 0h24v24H0V0z"}),Object(I.createElement)(Dn,{d:"M16 13h-3V3h-2v10H8l4 4 4-4zM4 19v2h16v-2H4z"})),bw=Object(I.createElement)(jn,{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24"},Object(I.createElement)(Dn,{fill:"none",d:"M0 0h24v24H0V0z"}),Object(I.createElement)(Dn,{d:"M8 19h3v4h2v-4h3l-4-4-4 4zm8-14h-3V1h-2v4H8l4 4 4-4zM4 11v2h16v-2H4z"})),yw={top:{icon:Object(I.createElement)(jn,{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24"},Object(I.createElement)(Dn,{fill:"none",d:"M0 0h24v24H0V0z"}),Object(I.createElement)(Dn,{d:"M8 11h3v10h2V11h3l-4-4-4 4zM4 3v2h16V3H4z"})),title:ve("Vertically Align Top","Block vertical alignment setting")},center:{icon:bw,title:ve("Vertically Align Middle","Block vertical alignment setting")},bottom:{icon:gw,title:ve("Vertically Align Bottom","Block vertical alignment setting")}},kw=["top","center","bottom"],_w="top";Object(N.flowRight)(Y_((function(e){return{clientId:e.clientId}})),eb({isLargeViewport:"medium"}),ey((function(e,t){var n=t.clientId,r=t.isLargeViewport,o=t.isCollapsed,i=e("core/block-editor"),a=i.getBlockRootClientId,s=i.getSettings;return{isCollapsed:o||!r||!s().hasFixedToolbar&&a(n)}})))((function(e){var t=e.isCollapsed,n=e.value,r=e.onChange,o=e.controls,i=void 0===o?kw:o,a=yw[n],s=yw[_w];return Object(I.createElement)(gu,{isCollapsed:t,icon:a?a.icon:s.icon,label:ve("Change Alignment","Block vertical alignment setting label"),controls:i.map((function(e){return D({},yw[e],{isActive:n===e,onClick:(t=e,function(){return r(n===t?void 0:t)})});var t}))})}));var ww=ey((function(e){return{hasUploadPermissions:!!(0,e("core/block-editor").getSettings)().__experimentalMediaUpload}}))((function(e){var t=e.hasUploadPermissions,n=e.fallback,r=void 0===n?null:n,o=e.children;return t?o:r})),Ow=function(e){function t(){var e;return Oe(this,t),(e=Te(this,xe(t).apply(this,arguments))).onFilesDrop=e.onFilesDrop.bind(Ce(e)),e.onHTMLDrop=e.onHTMLDrop.bind(Ce(e)),e.onDrop=e.onDrop.bind(Ce(e)),e}return Me(t,e),Ee(t,[{key:"getInsertIndex",value:function(e){var t=this.props,n=t.clientId,r=t.rootClientId,o=t.getBlockIndex;if(void 0!==n){var i=o(n,r);return"top"===e.y?i:i+1}}},{key:"onFilesDrop",value:function(e,t){var n=ef(tf("from"),(function(t){return"files"===t.type&&t.isMatch(e)}));if(n){var r=this.getInsertIndex(t),o=n.transform(e,this.props.updateBlockAttributes);this.props.insertBlocks(o,r)}}},{key:"onHTMLDrop",value:function(e,t){var n=Ip({HTML:e,mode:"BLOCKS"});n.length&&this.props.insertBlocks(n,this.getInsertIndex(t))}},{key:"onDrop",value:function(e,t){var n=this.props,r=n.rootClientId,o=n.clientId,i=n.getClientIdsOfDescendants,a=n.getBlockIndex,s=function(e){var t={srcRootClientId:null,srcClientId:null,srcIndex:null,type:null};if(!e.dataTransfer)return t;try{t=Object.assign(t,JSON.parse(e.dataTransfer.getData("text")))}catch(n){return t}return t}(e),c=s.srcRootClientId,l=s.srcClientId,u=s.srcIndex,d=s.type;if("block"===d&&l!==o&&!function(e,t){return i([e]).some((function(e){return e===t}))}(l,o||r)){var f,h,p=o?a(o,r):void 0,v=this.getInsertIndex(t),m=p&&u1?function(e,t,n,r,o){var i=t+1;if(o<0&&n)return he("Blocks cannot be moved up as they are already at the top");if(o>0&&r)return he("Blocks cannot be moved down as they are already at the bottom");if(o<0&&!n)return me(pe("Move %1$d block from position %2$d up by one place","Move %1$d blocks from position %2$d up by one place",e),e,i);if(o>0&&!r)return me(pe("Move %1$d block from position %2$d down by one place","Move %1$d blocks from position %2$d down by one place",e),e,i)}(e,n,r,o,i):r&&o?me(he("Block %s is the only block, and cannot be moved"),t):i>0&&!o?me(he("Move %1$s block from position %2$d down to position %3$d"),t,a,a+1):i>0&&o?me(he("Block %s is at the end of the content and can’t be moved down"),t):i<0&&!r?me(he("Move %1$s block from position %2$d up to position %3$d"),t,a,a-1):i<0&&r?me(he("Block %s is at the beginning of the content and can’t be moved up"),t):void 0}var Mw=Object(I.createElement)(jn,{width:"18",height:"18",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 18 18"},Object(I.createElement)(Mn,{points:"9,4.5 3.3,10.1 4.8,11.5 9,7.3 13.2,11.5 14.7,10.1 "})),jw=Object(I.createElement)(jn,{width:"18",height:"18",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 18 18"},Object(I.createElement)(Mn,{points:"9,13.5 14.7,7.9 13.2,6.5 9,10.7 4.8,6.5 3.3,7.9 "})),Iw=Object(I.createElement)(jn,{width:"18",height:"18",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 18 18"},Object(I.createElement)(Dn,{d:"M13,8c0.6,0,1-0.4,1-1s-0.4-1-1-1s-1,0.4-1,1S12.4,8,13,8z M5,6C4.4,6,4,6.4,4,7s0.4,1,1,1s1-0.4,1-1S5.6,6,5,6z M5,10 c-0.6,0-1,0.4-1,1s0.4,1,1,1s1-0.4,1-1S5.6,10,5,10z M13,10c-0.6,0-1,0.4-1,1s0.4,1,1,1s1-0.4,1-1S13.6,10,13,10z M9,6 C8.4,6,8,6.4,8,7s0.4,1,1,1s1-0.4,1-1S9.6,6,9,6z M9,10c-0.6,0-1,0.4-1,1s0.4,1,1,1s1-0.4,1-1S9.6,10,9,10z"})),Pw=ey((function(e,t){var n=t.clientId,r=e("core/block-editor"),o=r.getBlockIndex,i=(0,r.getBlockRootClientId)(n);return{index:o(n,i),rootClientId:i}}))((function(e){var t=e.children,n=e.clientId,r=e.rootClientId,o=e.blockElementId,i=e.index,a=e.onDragStart,s=e.onDragEnd,c={type:"block",srcIndex:i,srcRootClientId:r,srcClientId:n};return Object(I.createElement)(Ws,{elementId:o,transferData:c,onDragStart:a,onDragEnd:s},(function(e){var n=e.onDraggableStart,r=e.onDraggableEnd;return t({onDraggableStart:n,onDraggableEnd:r})}))})),Nw=function(e){var t=e.isVisible,n=e.className,r=e.icon,o=e.onDragStart,i=e.onDragEnd,a=e.blockElementId,s=e.clientId;if(!t)return null;var c=Pn()("editor-block-mover__control-drag-handle block-editor-block-mover__control-drag-handle",n);return Object(I.createElement)(Pw,{clientId:s,blockElementId:a,onDragStart:o,onDragEnd:i},(function(e){var t=e.onDraggableStart,n=e.onDraggableEnd;return Object(I.createElement)("div",{className:c,"aria-hidden":"true",onDragStart:t,onDragEnd:n,draggable:!0},r)}))},Rw=function(e){function t(){var e;return Oe(this,t),(e=Te(this,xe(t).apply(this,arguments))).state={isFocused:!1},e.onFocus=e.onFocus.bind(Ce(e)),e.onBlur=e.onBlur.bind(Ce(e)),e}return Me(t,e),Ee(t,[{key:"onFocus",value:function(){this.setState({isFocused:!0})}},{key:"onBlur",value:function(){this.setState({isFocused:!1})}},{key:"render",value:function(){var e=this.props,t=e.onMoveUp,n=e.onMoveDown,r=e.isFirst,o=e.isLast,i=e.isDraggable,a=e.onDragStart,s=e.onDragEnd,c=e.clientIds,l=e.blockElementId,u=e.blockType,d=e.firstIndex,f=e.isLocked,h=e.instanceId,p=e.isHidden,v=e.rootClientId,m=this.state.isFocused,g=Object(N.castArray)(c).length;return f||r&&o&&!v?null:Object(I.createElement)("div",{className:Pn()("editor-block-mover block-editor-block-mover",{"is-visible":m||!p})},Object(I.createElement)(Pa,{className:"editor-block-mover__control block-editor-block-mover__control",onClick:r?null:t,icon:Mw,label:he("Move up"),"aria-describedby":"block-editor-block-mover__up-description-".concat(h),"aria-disabled":r,onFocus:this.onFocus,onBlur:this.onBlur}),Object(I.createElement)(Nw,{className:"editor-block-mover__control block-editor-block-mover__control",icon:Iw,clientId:c,blockElementId:l,isVisible:i,onDragStart:a,onDragEnd:s}),Object(I.createElement)(Pa,{className:"editor-block-mover__control block-editor-block-mover__control",onClick:o?null:n,icon:jw,label:he("Move down"),"aria-describedby":"block-editor-block-mover__down-description-".concat(h),"aria-disabled":o,onFocus:this.onFocus,onBlur:this.onBlur}),Object(I.createElement)("span",{id:"block-editor-block-mover__up-description-".concat(h),className:"editor-block-mover__description block-editor-block-mover__description"},Dw(g,u&&u.title,d,r,o,-1)),Object(I.createElement)("span",{id:"block-editor-block-mover__down-description-".concat(h),className:"editor-block-mover__description block-editor-block-mover__description"},Dw(g,u&&u.title,d,r,o,1)))}}]),t}(I.Component),Lw=Object(N.flowRight)(ey((function(e,t){var n=t.clientIds,r=e("core/block-editor"),o=r.getBlock,i=r.getBlockIndex,a=r.getTemplateLock,s=r.getBlockRootClientId,c=r.getBlockOrder,l=Object(N.castArray)(n),u=Object(N.first)(l),d=o(u),f=s(Object(N.first)(l)),h=c(f),p=i(u,f),v=i(Object(N.last)(l),f);return{blockType:d?Vd(d.name):null,isLocked:"all"===a(f),rootClientId:f,firstIndex:p,isFirst:0===p,isLast:v===h.length-1}})),ry((function(e,t){var n=t.clientIds,r=t.rootClientId,o=e("core/block-editor"),i=o.moveBlocksDown,a=o.moveBlocksUp;return{onMoveDown:Object(N.partial)(i,n,r),onMoveUp:Object(N.partial)(a,n,r)}})),Hb)(Rw);var Aw=function(e){var t=e.className,n=e.actions,r=e.children,o=e.secondaryActions;return Object(I.createElement)("div",{className:Pn()(t,"editor-warning block-editor-warning")},Object(I.createElement)("div",{className:"editor-warning__contents block-editor-warning__contents"},Object(I.createElement)("p",{className:"editor-warning__message block-editor-warning__message"},r),I.Children.count(n)>0&&Object(I.createElement)("div",{className:"editor-warning__actions block-editor-warning__actions"},I.Children.map(n,(function(e,t){return Object(I.createElement)("span",{key:t,className:"editor-warning__action block-editor-warning__action"},e)})))),o&&Object(I.createElement)(ds,{className:"editor-warning__secondary block-editor-warning__secondary",position:"bottom left",renderToggle:function(e){var t=e.isOpen,n=e.onToggle;return Object(I.createElement)(Pa,{icon:"ellipsis",label:he("More options"),onClick:n,"aria-expanded":t})},renderContent:function(){return Object(I.createElement)(_c,null,o.map((function(e,t){return Object(I.createElement)(wc,{onClick:e.onClick,key:t},e.title)})))}}))},zw=n(131),Fw=function(e){var t=e.title,n=e.rawContent,r=e.renderedContent,o=e.action,i=e.actionText,a=e.className;return Object(I.createElement)("div",{className:a},Object(I.createElement)("div",{className:"editor-block-compare__content block-editor-block-compare__content"},Object(I.createElement)("h2",{className:"editor-block-compare__heading block-editor-block-compare__heading"},t),Object(I.createElement)("div",{className:"editor-block-compare__html block-editor-block-compare__html"},n),Object(I.createElement)("div",{className:"editor-block-compare__preview block-editor-block-compare__preview edit-post-visual-editor"},r)),Object(I.createElement)("div",{className:"editor-block-compare__action block-editor-block-compare__action"},Object(I.createElement)(va,{isLarge:!0,tabIndex:"0",onClick:o},i)))},Hw=function(e){function t(){return Oe(this,t),Te(this,xe(t).apply(this,arguments))}return Me(t,e),Ee(t,[{key:"getDifference",value:function(e,t){return Object(zw.diffChars)(e,t).map((function(e,t){var n=Pn()({"editor-block-compare__added block-editor-block-compare__added":e.added,"editor-block-compare__removed block-editor-block-compare__removed":e.removed});return Object(I.createElement)("span",{key:t,className:n},e.value)}))}},{key:"getOriginalContent",value:function(e){return{rawContent:e.originalContent,renderedContent:Ff(e.name,e.attributes)}}},{key:"getConvertedContent",value:function(e){var t=Object(N.castArray)(e),n=t.map((function(e){return Hf(e.name,e.attributes,e.innerBlocks)})),r=t.map((function(e){return Ff(e.name,e.attributes,e.innerBlocks)}));return{rawContent:n.join(""),renderedContent:r}}},{key:"render",value:function(){var e=this.props,t=e.block,n=e.onKeep,r=e.onConvert,o=e.convertor,i=e.convertButtonText,a=this.getOriginalContent(t),s=this.getConvertedContent(o(t)),c=this.getDifference(a.rawContent,s.rawContent);return Object(I.createElement)("div",{className:"editor-block-compare__wrapper block-editor-block-compare__wrapper"},Object(I.createElement)(Fw,{title:he("Current"),className:"editor-block-compare__current block-editor-block-compare__current",action:n,actionText:he("Convert to HTML"),rawContent:a.rawContent,renderedContent:a.renderedContent}),Object(I.createElement)(Fw,{title:he("After Conversion"),className:"editor-block-compare__converted block-editor-block-compare__converted",action:r,actionText:i,rawContent:c,renderedContent:s.renderedContent}))}}]),t}(I.Component),Vw=function(e){function t(e){var n;return Oe(this,t),(n=Te(this,xe(t).call(this,e))).state={compare:!1},n.onCompare=n.onCompare.bind(Ce(n)),n.onCompareClose=n.onCompareClose.bind(Ce(n)),n}return Me(t,e),Ee(t,[{key:"onCompare",value:function(){this.setState({compare:!0})}},{key:"onCompareClose",value:function(){this.setState({compare:!1})}},{key:"render",value:function(){var e=this.props,t=e.convertToHTML,n=e.convertToBlocks,r=e.convertToClassic,o=e.attemptBlockRecovery,i=e.block,a=!!Vd("core/html"),s=this.state.compare,c=[{title:he("Convert to Classic Block"),onClick:r},{title:he("Attempt Block Recovery"),onClick:o}];return s?Object(I.createElement)(Pc,{title:he("Resolve Block"),onRequestClose:this.onCompareClose,className:"editor-block-compare block-editor-block-compare"},Object(I.createElement)(Hw,{block:i,onKeep:t,onConvert:n,convertor:Bw,convertButtonText:he("Convert to Blocks")})):Object(I.createElement)(Aw,{actions:[Object(I.createElement)(va,{key:"convert",onClick:this.onCompare,isLarge:!0,isPrimary:!a},ve("Resolve","imperative verb")),a&&Object(I.createElement)(va,{key:"edit",onClick:t,isLarge:!0,isPrimary:!0},he("Convert to HTML"))],secondaryActions:c},he("This block contains unexpected or invalid content."))}}]),t}(I.Component),Bw=function(e){return Pp({HTML:e.originalContent})},Uw=Object(N.flowRight)([ey((function(e,t){var n=t.clientId;return{block:e("core/block-editor").getBlock(n)}})),ry((function(e,t){var n=t.block,r=e("core/block-editor").replaceBlock;return{convertToClassic:function(){r(n.clientId,function(e){return $d("core/freeform",{content:e.originalContent})}(n))},convertToHTML:function(){r(n.clientId,function(e){return $d("core/html",{content:e.originalContent})}(n))},convertToBlocks:function(){r(n.clientId,Bw(n))},attemptBlockRecovery:function(){var e;r(n.clientId,$d((e=n).name,e.attributes,e.innerBlocks))}}}))])(Vw),Ww=Object(I.createElement)(Aw,null,he("This block has encountered an error and cannot be previewed.")),Kw=function(){return Ww},Yw=function(e){function t(){var e;return Oe(this,t),(e=Te(this,xe(t).apply(this,arguments))).state={hasError:!1},e}return Me(t,e),Ee(t,[{key:"componentDidCatch",value:function(e){this.props.onError(e),this.setState({hasError:!0})}},{key:"render",value:function(){return this.state.hasError?null:this.props.children}}]),t}(I.Component),$w=n(30),qw=n.n($w),Gw=function(e){function t(e){var n;return Oe(this,t),(n=Te(this,xe(t).apply(this,arguments))).onChange=n.onChange.bind(Ce(n)),n.onBlur=n.onBlur.bind(Ce(n)),n.state={html:e.block.isValid?Vf(e.block):e.block.originalContent},n}return Me(t,e),Ee(t,[{key:"componentDidUpdate",value:function(e){Object(N.isEqual)(this.props.block.attributes,e.block.attributes)||this.setState({html:Vf(this.props.block)})}},{key:"onBlur",value:function(){var e=this.state.html,t=Vd(this.props.block.name),n=Dh(t,e,this.props.block.attributes),r=e||Hf(t,n),o=!e||hh(t,n,r);this.props.onChange(this.props.clientId,n,r,o),e||this.setState({html:r})}},{key:"onChange",value:function(e){this.setState({html:e.target.value})}},{key:"render",value:function(){var e=this.state.html;return Object(I.createElement)(qw.a,{className:"editor-block-list__block-html-textarea block-editor-block-list__block-html-textarea",value:e,onBlur:this.onBlur,onChange:this.onChange})}}]),t}(I.Component),Zw=Object(N.flowRight)([ey((function(e,t){return{block:e("core/block-editor").getBlock(t.clientId)}})),ry((function(e){return{onChange:function(t,n,r,o){e("core/block-editor").updateBlock(t,{attributes:n,originalContent:r,isValid:o})}}}))])(Gw);var Xw=ey((function(e,t){return{name:(0,e("core/block-editor").getBlockName)(t.clientId)}}))((function(e){var t=e.name;if(!t)return null;var n=Vd(t);return n?n.title:null})),Qw=function(e){function t(){var e;return Oe(this,t),(e=Te(this,xe(t).apply(this,arguments))).state={isFocused:!1},e.onFocus=e.onFocus.bind(Ce(e)),e.onBlur=e.onBlur.bind(Ce(e)),e}return Me(t,e),Ee(t,[{key:"onFocus",value:function(e){this.setState({isFocused:!0}),e.stopPropagation()}},{key:"onBlur",value:function(){this.setState({isFocused:!1})}},{key:"render",value:function(){var e=this.props,t=e.clientId,n=e.rootClientId;return Object(I.createElement)("div",{className:"editor-block-list__breadcrumb block-editor-block-list__breadcrumb"},Object(I.createElement)(gu,null,n&&Object(I.createElement)(I.Fragment,null,Object(I.createElement)(Xw,{clientId:n}),Object(I.createElement)("span",{className:"editor-block-list__descendant-arrow block-editor-block-list__descendant-arrow"})),Object(I.createElement)(Xw,{clientId:t})))}}]),t}(I.Component),Jw=Object(N.flowRight)([ey((function(e,t){return{rootClientId:(0,e("core/block-editor").getBlockRootClientId)(t.clientId)}}))])(Qw),eO=window,tO=eO.Node,nO=eO.getSelection,rO=function(e){function t(){var e;return Oe(this,t),(e=Te(this,xe(t).apply(this,arguments))).focusToolbar=e.focusToolbar.bind(Ce(e)),e.focusSelection=e.focusSelection.bind(Ce(e)),e.switchOnKeyDown=Object(N.cond)([[Object(N.matchesProperty)(["keyCode"],Fn),e.focusSelection]]),e.toolbar=Object(I.createRef)(),e}return Me(t,e),Ee(t,[{key:"focusToolbar",value:function(){var e=fa.tabbable.find(this.toolbar.current);e.length&&e[0].focus()}},{key:"focusSelection",value:function(){var e=nO();if(e){var t=e.focusNode;t.nodeType!==tO.ELEMENT_NODE&&(t=t.parentElement),t&&t.focus()}}},{key:"componentDidMount",value:function(){this.props.focusOnMount&&this.focusToolbar()}},{key:"render",value:function(){var e=this.props,t=e.children,n=j(e,["children"]);return Object(I.createElement)(nc,Ne({orientation:"horizontal",role:"toolbar",ref:this.toolbar,onKeyDown:this.switchOnKeyDown},Object(N.omit)(n,["focusOnMount"])),Object(I.createElement)(ys,{bindGlobal:!0,eventName:"keydown",shortcuts:{"alt+f10":this.focusToolbar}}),t)}}]),t}(I.Component);var oO=function(e){var t=e.focusOnMount;return Object(I.createElement)(rO,{focusOnMount:t,className:"editor-block-contextual-toolbar block-editor-block-contextual-toolbar","aria-label":he("Block tools")},Object(I.createElement)(hE,null))};var iO=ey((function(e){var t=e("core/block-editor"),n=t.getMultiSelectedBlockClientIds,r=t.isMultiSelecting;return{multiSelectedBlockClientIds:n(),isSelecting:r()}}))((function(e){var t=e.multiSelectedBlockClientIds;return e.isSelecting?null:Object(I.createElement)(Lw,{clientIds:t})}));var aO=tb("< small")((function(e){var t=e.clientId;return Object(I.createElement)("div",{className:"editor-block-list__block-mobile-toolbar block-editor-block-list__block-mobile-toolbar"},Object(I.createElement)(RO,null),Object(I.createElement)(Lw,{clientIds:[t]}))})),sO=function(e){function t(){var e;return Oe(this,t),(e=Te(this,xe(t).apply(this,arguments))).state={isInserterFocused:!1},e.onBlurInserter=e.onBlurInserter.bind(Ce(e)),e.onFocusInserter=e.onFocusInserter.bind(Ce(e)),e}return Me(t,e),Ee(t,[{key:"onFocusInserter",value:function(e){e.stopPropagation(),this.setState({isInserterFocused:!0})}},{key:"onBlurInserter",value:function(){this.setState({isInserterFocused:!1})}},{key:"render",value:function(){var e=this.state.isInserterFocused,t=this.props,n=t.showInsertionPoint,r=t.rootClientId,o=t.clientId;return Object(I.createElement)("div",{className:"editor-block-list__insertion-point block-editor-block-list__insertion-point"},n&&Object(I.createElement)("div",{className:"editor-block-list__insertion-point-indicator block-editor-block-list__insertion-point-indicator"}),Object(I.createElement)("div",{onFocus:this.onFocusInserter,onBlur:this.onBlurInserter,tabIndex:-1,className:Pn()("editor-block-list__insertion-point-inserter block-editor-block-list__insertion-point-inserter",{"is-visible":e})},Object(I.createElement)(RO,{rootClientId:r,clientId:o})))}}]),t}(I.Component),cO=ey((function(e,t){var n=t.clientId,r=t.rootClientId,o=e("core/block-editor"),i=o.getBlockIndex,a=o.getBlockInsertionPoint,s=o.isBlockInsertionPointVisible,c=i(n,r),l=a();return{showInsertionPoint:s()&&l.index===c&&l.rootClientId===r}}))(sO),lO=function(e){function t(){var e;return Oe(this,t),(e=Te(this,xe(t).apply(this,arguments))).proxyEvent=e.proxyEvent.bind(Ce(e)),e.eventMap={},e}return Me(t,e),Ee(t,[{key:"proxyEvent",value:function(e){var t=!!e.nativeEvent._blockHandled;e.nativeEvent._blockHandled=!0;var n=this.eventMap[e.type];t&&(n+="Handled"),this.props[n]&&this.props[n](e)}},{key:"render",value:function(){var e=this,t=this.props,n=t.childHandledEvents,r=void 0===n?[]:n,o=t.forwardedRef,i=j(t,["childHandledEvents","forwardedRef"]),a=Object(N.reduce)([].concat(lt(r),lt(Object.keys(i))),(function(t,n){var r=n.match(/^on([A-Z][a-zA-Z]+?)(Handled)?$/);if(r){!!r[2]&&delete i[n];var o="on"+r[1];t[o]=e.proxyEvent,e.eventMap[r[1].toLowerCase()]=o}return t}),{});return Object(I.createElement)("div",Ne({ref:o},i,a))}}]),t}(I.Component),uO=function(e,t){return Object(I.createElement)(lO,Ne({},e,{forwardedRef:t}))};uO.displayName="IgnoreNestedEvents";var dO=Object(I.forwardRef)(uO);var fO=Object(N.flowRight)(ey((function(e,t){var n=t.rootClientId,r=e("core/block-editor"),o=r.getInserterItems,i=r.getTemplateLock;return{items:o(n),isLocked:!!i(n)}})),ry((function(e,t){var n=t.clientId,r=t.rootClientId;return{onInsert:function(t){var o=$d(t.name,t.initialAttributes);n?e("core/block-editor").replaceBlocks(n,o):e("core/block-editor").insertBlock(o,void 0,r)}}})))((function(e){var t=e.items,n=e.isLocked,r=e.onInsert;if(n)return null;var o=Object(N.filter)(t,(function(e){return!(e.isDisabled||e.name===Hd()&&Object(N.isEmpty)(e.initialAttributes))})).slice(0,3);return Object(I.createElement)("div",{className:"editor-inserter-with-shortcuts block-editor-inserter-with-shortcuts"},o.map((function(e){return Object(I.createElement)(Pa,{key:e.id,className:"editor-inserter-with-shortcuts__block block-editor-inserter-with-shortcuts__block",onClick:function(){return r(e)},label:me(he("Add %s"),e.title),icon:Object(I.createElement)(hw,{icon:e.icon})})})))})),hO=function(e){var t=Ae(Object(I.useState)(null),2),n=t[0],r=t[1];return Object(I.useEffect)((function(){var t=function(){n&&r(null)},o=function(t){var n=e.current.getBoundingClientRect(),o=n.width,i=n.left,a=n.right,s=null;t.clientX-i0&&void 0!==arguments[0]?arguments[0]:t.clientId,n=arguments.length>1?arguments[1]:void 0;a(e,n)},onInsertBlocks:function(e,n){var r=t.rootClientId;c(e,n,r)},onInsertDefaultBlockAfter:function(){var e=t.clientId,n=t.rootClientId,o=(0,r("core/block-editor").getBlockIndex)(e,n);l({},n,o+1)},onInsertBlocksAfter:function(e){var n=t.clientId,o=t.rootClientId,i=(0,r("core/block-editor").getBlockIndex)(n,o);c(e,i+1,o)},onRemove:function(e){u(e)},onMerge:function(e){var n=t.clientId,o=r("core/block-editor"),i=o.getPreviousBlockClientId,a=o.getNextBlockClientId;if(e){var s=a(n);s&&d(n,s)}else{var c=i(n);c&&d(c,n)}},onReplace:function(e,n){f([t.clientId],e,n)},onShiftSelection:function(){if(t.isSelectionEnabled){var e=r("core/block-editor").getBlockSelectionStart;e()?s(e(),t.clientId):a(t.clientId)}},toggleSelection:function(e){h(e)}}})),bO=Object(N.flowRight)(Fb,eb({isLargeViewport:"medium"}),mO,gO,yu("editor.BlockListBlock"))((function(e){var t=e.blockRef,n=e.mode,r=e.isFocusMode,o=e.hasFixedToolbar,i=e.isLocked,a=e.clientId,s=e.rootClientId,c=e.isSelected,l=e.isPartOfMultiSelection,u=e.isFirstMultiSelected,d=e.isTypingWithinBlock,f=e.isCaretWithinFormattedText,h=e.isEmptyDefaultBlock,p=e.isMovable,v=e.isParentOfSelectedBlock,m=e.isDraggable,g=e.isSelectionEnabled,b=e.isRTL,y=e.className,k=e.name,_=e.isValid,w=e.isLast,O=e.attributes,S=e.initialPosition,E=e.wrapperProps,C=e.setAttributes,T=e.onReplace,x=e.onInsertBlocksAfter,M=e.onMerge,j=e.onSelect,P=e.onRemove,R=e.onInsertDefaultBlockAfter,L=e.toggleSelection,A=e.onShiftSelection,z=e.onSelectionStart,F=Ae(Object(I.useState)({}),2)[1],H=Object(I.useRef)(null);Object(I.useEffect)((function(){t(H.current,a)}),[]);var V=Object(I.useRef)(),B=hO(H),U=Object(I.useRef)(!1),W=Ae(Object(I.useState)(!1),2),K=W[0],Y=W[1],$=function(){K&&Y(!1)};Object(I.useEffect)((function(){(d||c)&&$()}));var q=Ae(Object(I.useState)(!1),2),G=q[0],Z=q[1],X=Ae(Object(I.useState)(!1),2),Q=X[0],J=X[1],ee=Object(I.useRef)(!1);Object(I.useEffect)((function(){ee.current&&(ee.current=!1)}));var te=Object(I.useRef)(!0);Object(I.useEffect)((function(){c&&function(e){if(!H.current.contains(document.activeElement)){var t=fa.tabbable.find(V.current).filter(ra).filter((function(t){return!e||(n=V.current,r=t,o=n.querySelector(".block-editor-block-list__layout"),n.contains(r)&&(!o||!o.contains(r)));var n,r,o})),n=-1===S,r=(n?N.last:N.first)(t);r?ta(r,n):H.current.focus()}}(!te.current),te.current=!1}),[c]),Object(I.useEffect)((function(){u&&H.current.focus()}),[u]);var ne=function(e){e&&!c&&j()},re=K&&!l,oe=Vd(k),ie=me(he("Block: %s"),oe.title),ae=k===Fd(),se=(c||re)&&h&&_,ce=(c||re||w)&&h&&_,le=!r&&!ce&&c&&!d,ue=!r&&!o&&re&&!h,de=(c||B===(b?"right":"left"))&&!ce&&!l&&!d,fe=!r&&re&&!h,pe=!o&&!ce&&(c&&(!d||f)||u),ve=le,ge=l&&u||!l,be=Pn()("wp-block editor-block-list__block block-editor-block-list__block",{"has-warning":!_||!!Q||ae,"is-selected":le,"is-multi-selected":l,"is-hovered":ue,"is-reusable":Kd(oe),"is-dragging":G,"is-typing":d,"is-focused":r&&(c||v),"is-focus-mode":r},y),ye=E;oe.getEditWrapperProps&&(ye=D({},ye,oe.getEditWrapperProps(O)));var ke="block-".concat(a),_e=Object(I.createElement)(sw,{name:k,isSelected:c,attributes:O,setAttributes:C,insertBlocksAfter:i?void 0:x,onReplace:i?void 0:T,mergeBlocks:i?void 0:M,clientId:a,isSelectionEnabled:g,toggleSelection:L});return"visual"!==n&&(_e=Object(I.createElement)("div",{style:{display:"none"}},_e)),Object(I.createElement)(dO,Ne({id:ke,ref:H,onMouseOver:function(){K||l||c||U.current||Y(!0)},onMouseOverHandled:$,onMouseLeave:$,className:be,"data-type":k,onTouchStart:function(){U.current=!0},onFocus:function(){c||l||j()},onClick:function(){U.current=!1},onKeyDown:function(e){var t=e.keyCode,n=e.target;if(c&&n===H.current&&!i)switch(t){case zn:R(),e.preventDefault();break;case Ln:case Kn:P(a),e.preventDefault()}},tabIndex:"0","aria-label":ie,childHandledEvents:["onDragStart","onMouseDown"]},ye),ge&&Object(I.createElement)(cO,{clientId:a,rootClientId:s}),Object(I.createElement)(Sw,{clientId:a,rootClientId:s}),u&&Object(I.createElement)(iO,{rootClientId:s}),Object(I.createElement)("div",{className:"editor-block-list__block-edit block-editor-block-list__block-edit"},de&&Object(I.createElement)(Lw,{clientIds:a,blockElementId:ke,isHidden:!(re||c)||B!==(b?"right":"left"),isDraggable:!1!==m&&!l&&p,onDragStart:function(){Z(!0)},onDragEnd:function(){Z(!1)}}),fe&&Object(I.createElement)(Jw,{clientId:a,isHidden:!(re||c)||B!==(b?"right":"left")}),(pe||ee.current)&&Object(I.createElement)(oO,{focusOnMount:ee.current}),!pe&&c&&!o&&!h&&Object(I.createElement)(ys,{bindGlobal:!0,eventName:"keydown",shortcuts:{"alt+f10":function(){ee.current=!0,F({})}}}),Object(I.createElement)(dO,{ref:V,onDragStart:vO,onMouseDown:function(e){0===e.button&&(e.shiftKey?c||(A(),e.preventDefault()):(z(a),l&&j()))},"data-block":a},Object(I.createElement)(Yw,{onError:function(){return J(!1)}},_&&_e,_&&"html"===n&&Object(I.createElement)(Zw,{clientId:a}),!_&&[Object(I.createElement)(Uw,{key:"invalid-warning",clientId:a}),Object(I.createElement)("div",{key:"invalid-preview"},Ff(oe,O))]),ve&&Object(I.createElement)(aO,{clientId:a}),!!Q&&Object(I.createElement)(Kw,null))),se&&Object(I.createElement)("div",{className:"editor-block-list__side-inserter block-editor-block-list__side-inserter"},Object(I.createElement)(fO,{clientId:a,rootClientId:s,onToggle:ne})),ce&&Object(I.createElement)("div",{className:"editor-block-list__empty-block-inserter block-editor-block-list__empty-block-inserter"},Object(I.createElement)(RO,{position:"top right",onToggle:ne,rootClientId:s,clientId:a})))}));var yO=Object(N.flowRight)(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Ab((function(t){return function(n){function r(){var t;return Oe(this,r),(t=Te(this,xe(r).apply(this,arguments))).setState=t.setState.bind(Ce(t)),t.state=e,t}return Me(r,n),Ee(r,[{key:"render",value:function(){return Object(I.createElement)(t,Ne({},this.props,this.state,{setState:this.setState}))}}]),r}(I.Component)}),"withState")}({hovered:!1}),ey((function(e,t){var n=e("core/block-editor"),r=n.getBlockCount,o=n.getBlockName,i=n.isBlockValid,a=n.getSettings,s=n.getTemplateLock,c=!r(t.rootClientId),l=o(t.lastBlockClientId)===Hd(),u=i(t.lastBlockClientId),d=a().bodyPlaceholder;return{isVisible:c||!l||!u,showPrompt:c,isLocked:!!s(t.rootClientId),placeholder:d}})),ry((function(e,t){var n=e("core/block-editor"),r=n.insertDefaultBlock,o=n.startTyping;return{onAppend:function(){var e=t.rootClientId;r(void 0,e),o()}}})))((function(e){var t=e.isLocked,n=e.isVisible,r=e.onAppend,o=e.showPrompt,i=e.placeholder,a=e.rootClientId,s=e.hovered,c=e.setState;if(t||!n)return null;var l=If(i)||he("Start writing or type / to choose a block");return Object(I.createElement)("div",{"data-root-client-id":a||"",className:"wp-block editor-default-block-appender block-editor-default-block-appender",onMouseEnter:function(){return c({hovered:!0})},onMouseLeave:function(){return c({hovered:!1})}},Object(I.createElement)(Sw,{rootClientId:a}),Object(I.createElement)(qw.a,{role:"button","aria-label":he("Add block"),className:"editor-default-block-appender__content block-editor-default-block-appender__content",readOnly:!0,onFocus:r,value:o?l:""}),s&&Object(I.createElement)(fO,{rootClientId:a}),Object(I.createElement)(RO,{rootClientId:a,position:"top right",isAppender:!0}))}));var kO=ey((function(e,t){var n=t.rootClientId,r=e("core/block-editor"),o=r.getBlockOrder,i=r.canInsertBlockType;return{isLocked:!!(0,r.getTemplateLock)(n),blockClientIds:o(n),canInsertDefaultBlock:i(Hd(),n)}}))((function(e){var t=e.blockClientIds,n=e.rootClientId,r=e.canInsertDefaultBlock,o=e.isLocked,i=e.renderAppender;return o?null:i?Object(I.createElement)("div",{className:"block-list-appender"},Object(I.createElement)(i,null)):r?Object(I.createElement)("div",{className:"block-list-appender"},Object(I.createElement)(dO,{childHandledEvents:["onFocus","onClick","onKeyDown"]},Object(I.createElement)(yO,{rootClientId:n,lastBlockClientId:Object(N.last)(t)}))):Object(I.createElement)("div",{className:"block-list-appender"},Object(I.createElement)(LO,{rootClientId:n,className:"block-list-appender__toggle"}))})),_O=function(e){function t(e){var n;return Oe(this,t),(n=Te(this,xe(t).call(this,e))).onSelectionStart=n.onSelectionStart.bind(Ce(n)),n.onSelectionEnd=n.onSelectionEnd.bind(Ce(n)),n.setBlockRef=n.setBlockRef.bind(Ce(n)),n.setLastClientY=n.setLastClientY.bind(Ce(n)),n.onPointerMove=Object(N.throttle)(n.onPointerMove.bind(Ce(n)),100),n.onScroll=function(){return n.onPointerMove({clientY:n.lastClientY})},n.lastClientY=0,n.nodes={},n}return Me(t,e),Ee(t,[{key:"componentDidMount",value:function(){window.addEventListener("mousemove",this.setLastClientY)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("mousemove",this.setLastClientY)}},{key:"setLastClientY",value:function(e){var t=e.clientY;this.lastClientY=t}},{key:"setBlockRef",value:function(e,t){null===e?delete this.nodes[t]:this.nodes=D({},this.nodes,x({},t,e))}},{key:"onPointerMove",value:function(e){var t=e.clientY;this.props.isMultiSelecting||this.props.onStartMultiSelect();var n=pO(this.selectionAtStart).getBoundingClientRect();if(!(t>=n.top&&t<=n.bottom)){var r=t-n.top,o=Object(N.findLast)(this.coordMapKeys,(function(e){return e0})),ey((function(e,t){var n=t.rootClientId,r=(0,e("core/blocks").getBlockType)((0,e("core/block-editor").getBlockName)(n));return{rootBlockTitle:r&&r.title,rootBlockIcon:r&&r.icon}})))((function(e){var t=e.rootBlockIcon,n=e.rootBlockTitle,r=e.items,o=j(e,["rootBlockIcon","rootBlockTitle","items"]);return Object(I.createElement)("div",{className:"editor-inserter__child-blocks block-editor-inserter__child-blocks"},(t||n)&&Object(I.createElement)("div",{className:"editor-inserter__parent-block-header block-editor-inserter__parent-block-header"},Object(I.createElement)(hw,{icon:t,showColors:!0}),n&&Object(I.createElement)("h2",null,n)),Object(I.createElement)(CO,Ne({items:r},o)))})),xO=function(e){return e.stopPropagation()},DO=function(e,t){var n=MO(t),r=function(e){return-1!==MO(e).indexOf(n)},o=Np();return e.filter((function(e){var t=Object(N.find)(o,{slug:e.category});return r(e.title)||Object(N.some)(e.keywords,r)||t&&r(t.title)}))},MO=function(e){return e=(e=(e=(e=Object(N.deburr)(e)).replace(/^\//,"")).toLowerCase()).trim()},jO=function(e){function t(){var e;return Oe(this,t),(e=Te(this,xe(t).apply(this,arguments))).state={childItems:[],filterValue:"",hoveredItem:null,suggestedItems:[],reusableItems:[],itemsPerCategory:{},openPanels:["suggested"]},e.onChangeSearchInput=e.onChangeSearchInput.bind(Ce(e)),e.onHover=e.onHover.bind(Ce(e)),e.panels={},e.inserterResults=Object(I.createRef)(),e}return Me(t,e),Ee(t,[{key:"componentDidMount",value:function(){this.props.fetchReusableBlocks(),this.filter()}},{key:"componentDidUpdate",value:function(e){e.items!==this.props.items&&this.filter(this.state.filterValue)}},{key:"onChangeSearchInput",value:function(e){this.filter(e.target.value)}},{key:"onHover",value:function(e){this.setState({hoveredItem:e});var t=this.props,n=t.showInsertionPoint,r=t.hideInsertionPoint;e?n():r()}},{key:"bindPanel",value:function(e){var t=this;return function(n){t.panels[e]=n}}},{key:"onTogglePanel",value:function(e){var t=this;return function(){-1!==t.state.openPanels.indexOf(e)?t.setState({openPanels:Object(N.without)(t.state.openPanels,e)}):(t.setState({openPanels:[].concat(lt(t.state.openPanels),[e])}),t.props.setTimeout((function(){vc()(t.panels[e],t.inserterResults.current,{alignWithTop:!0})})))}}},{key:"filterOpenPanels",value:function(e,t,n,r){if(e===this.state.filterValue)return this.state.openPanels;if(!e)return["suggested"];var o=[];return r.length>0&&o.push("reusable"),n.length>0&&(o=o.concat(Object.keys(t))),o}},{key:"filter",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=this.props,n=t.debouncedSpeak,r=t.items,o=t.rootChildBlocks,i=DO(r,e),a=Object(N.filter)(i,(function(e){var t=e.name;return Object(N.includes)(o,t)})),s=[];if(!e){var c=this.props.maxSuggestedItems||9;s=Object(N.filter)(r,(function(e){return e.utility>0})).slice(0,c)}var l=Object(N.filter)(i,{category:"reusable"}),u=function(e){return Object(N.findIndex)(Np(),(function(t){return t.slug===e.category}))},d=Object(N.flow)((function(e){return Object(N.filter)(e,(function(e){return"reusable"!==e.category}))}),(function(e){return Object(N.sortBy)(e,u)}),(function(e){return Object(N.groupBy)(e,"category")}))(i);this.setState({hoveredItem:null,childItems:a,filterValue:e,suggestedItems:s,reusableItems:l,itemsPerCategory:d,openPanels:this.filterOpenPanels(e,d,i,l)});var f=Object.keys(d).reduce((function(e,t){return e+d[t].length}),0),h=me(pe("%d result found.","%d results found.",f),f);n(h)}},{key:"onKeyDown",value:function(e){Object(N.includes)([Vn,Wn,Un,Bn,Ln,zn],e.keyCode)&&e.stopPropagation()}},{key:"render",value:function(){var e=this,t=this.props,n=t.instanceId,r=t.onSelect,o=t.rootClientId,i=this.state,a=i.childItems,s=i.hoveredItem,c=i.itemsPerCategory,l=i.openPanels,u=i.reusableItems,d=i.suggestedItems,f=function(e){return-1!==l.indexOf(e)};return Object(I.createElement)("div",{className:"editor-inserter__menu block-editor-inserter__menu",onKeyPress:xO,onKeyDown:this.onKeyDown},Object(I.createElement)("label",{htmlFor:"block-editor-inserter__search-".concat(n),className:"screen-reader-text"},he("Search for a block")),Object(I.createElement)("input",{id:"block-editor-inserter__search-".concat(n),type:"search",placeholder:he("Search for a block"),className:"editor-inserter__search block-editor-inserter__search",autoFocus:!0,onChange:this.onChangeSearchInput}),Object(I.createElement)("div",{className:"editor-inserter__results block-editor-inserter__results",ref:this.inserterResults,tabIndex:"0",role:"region","aria-label":he("Available block types")},Object(I.createElement)(TO,{rootClientId:o,items:a,onSelect:r,onHover:this.onHover}),!!d.length&&Object(I.createElement)(zc,{title:ve("Most Used","blocks"),opened:f("suggested"),onToggle:this.onTogglePanel("suggested"),ref:this.bindPanel("suggested")},Object(I.createElement)(CO,{items:d,onSelect:r,onHover:this.onHover})),Object(N.map)(Np(),(function(t){var n=c[t.slug];return n&&n.length?Object(I.createElement)(zc,{key:t.slug,title:t.title,icon:t.icon,opened:f(t.slug),onToggle:e.onTogglePanel(t.slug),ref:e.bindPanel(t.slug)},Object(I.createElement)(CO,{items:n,onSelect:r,onHover:e.onHover})):null})),!!u.length&&Object(I.createElement)(zc,{className:"editor-inserter__reusable-blocks-panel block-editor-inserter__reusable-blocks-panel",title:he("Reusable"),opened:f("reusable"),onToggle:this.onTogglePanel("reusable"),icon:"controls-repeat",ref:this.bindPanel("reusable")},Object(I.createElement)(CO,{items:u,onSelect:r,onHover:this.onHover}),Object(I.createElement)("a",{className:"editor-inserter__manage-reusable-blocks block-editor-inserter__manage-reusable-blocks",href:ye("edit.php",{post_type:"wp_block"})},he("Manage All Reusable Blocks"))),Object(N.isEmpty)(d)&&Object(N.isEmpty)(u)&&Object(N.isEmpty)(c)&&Object(I.createElement)("p",{className:"editor-inserter__no-results block-editor-inserter__no-results"},he("No blocks found."))),s&&Kd(s)&&Object(I.createElement)(SO,{name:s.name,attributes:s.initialAttributes}))}}]),t}(I.Component),IO=Object(N.flowRight)(ey((function(e,t){var n=t.clientId,r=t.isAppender,o=t.rootClientId,i=e("core/block-editor"),a=i.getInserterItems,s=i.getBlockName,c=i.getBlockRootClientId,l=i.getBlockSelectionEnd,u=e("core/blocks").getChildBlockNames,d=o;if(!d&&!n&&!r){var f=l();f&&(d=c(f)||void 0)}return{rootChildBlocks:u(s(d)),items:a(d),destinationRootClientId:d}})),ry((function(e,t,n){var r=n.select,o=e("core/block-editor"),i=o.showInsertionPoint,a=o.hideInsertionPoint;function s(){var e=r("core/block-editor"),n=e.getBlockIndex,o=e.getBlockSelectionEnd,i=e.getBlockOrder,a=t.clientId,s=t.destinationRootClientId,c=t.isAppender;if(a)return n(a,s);var l=o();return!c&&l?n(l,s)+1:i(s).length}return{fetchReusableBlocks:e("core/editor").__experimentalFetchReusableBlocks,showInsertionPoint:function(){var e=s();i(t.destinationRootClientId,e)},hideInsertionPoint:a,onSelect:function(n){var o=e("core/block-editor"),i=o.replaceBlocks,a=o.insertBlock,c=r("core/block-editor").getSelectedBlock,l=t.isAppender,u=n.name,d=n.initialAttributes,f=c(),h=$d(u,d);!l&&f&&Ld(f)?i(f.clientId,h):a(h,s(),t.destinationRootClientId),t.onSelect()}}})),ts,Hb,Vb)(jO),PO=function(e){var t=e.onToggle,n=e.disabled,r=e.isOpen;return Object(I.createElement)(Pa,{icon:"insert",label:he("Add block"),labelPosition:"bottom",onClick:t,className:"editor-inserter__toggle block-editor-inserter__toggle","aria-haspopup":"true","aria-expanded":r,disabled:n})},NO=function(e){function t(){var e;return Oe(this,t),(e=Te(this,xe(t).apply(this,arguments))).onToggle=e.onToggle.bind(Ce(e)),e.renderToggle=e.renderToggle.bind(Ce(e)),e.renderContent=e.renderContent.bind(Ce(e)),e}return Me(t,e),Ee(t,[{key:"onToggle",value:function(e){var t=this.props.onToggle;t&&t(e)}},{key:"renderToggle",value:function(e){var t=e.onToggle,n=e.isOpen,r=this.props,o=r.disabled,i=r.renderToggle,a=void 0===i?PO:i;return a({onToggle:t,isOpen:n,disabled:o})}},{key:"renderContent",value:function(e){var t=e.onClose,n=this.props,r=n.rootClientId,o=n.clientId,i=n.isAppender;return Object(I.createElement)(IO,{onSelect:t,rootClientId:r,clientId:o,isAppender:i})}},{key:"render",value:function(){var e=this.props.position;return Object(I.createElement)(ds,{className:"editor-inserter block-editor-inserter",contentClassName:"editor-inserter__popover block-editor-inserter__popover",position:e,onToggle:this.onToggle,expandOnMobile:!0,headerTitle:he("Add a block"),renderToggle:this.renderToggle,renderContent:this.renderContent})}}]),t}(I.Component),RO=Object(N.flowRight)([ey((function(e,t){var n=t.rootClientId;return{hasItems:(0,e("core/block-editor").hasInserterItems)(n)}})),zb((function(e){return e.hasItems}))])(NO);var LO=function(e){var t=e.rootClientId,n=e.className;return Object(I.createElement)(I.Fragment,null,Object(I.createElement)(Sw,{rootClientId:t}),Object(I.createElement)(RO,{rootClientId:t,renderToggle:function(e){var t=e.onToggle,r=e.disabled,o=e.isOpen;return Object(I.createElement)(va,{className:Pn()(n,"block-editor-button-block-appender"),onClick:t,"aria-expanded":o,disabled:r},Object(I.createElement)("span",{className:"screen-reader-text"},he("Add Block")),Object(I.createElement)(kc,{icon:"insert"}))},isAppender:!0}))},AO=Ab(ey((function(e,t){var n=e("core/block-editor").getSettings(),r=void 0===t.colors?n.colors:t.colors,o=void 0===t.disableCustomColors?n.disableCustomColors:t.disableCustomColors;return{colors:r,disableCustomColors:o,hasColorsToChoose:!Object(N.isEmpty)(r)||!o}})),"withColorContext"),zO=AO((function(e){var t=e.colors,n=e.disableCustomColors,r=void 0!==n&&n,o=e.value,i=e.onChange,a=e.className;function s(e){return function(){return i(o===e?void 0:e)}}var c=he("Custom color picker"),l=Pn()("components-color-palette",a);return Object(I.createElement)("div",{className:l},Object(N.map)(t,(function(e){var t=e.color,n=e.name,r={color:t},i=Pn()("components-color-palette__item",{"is-active":o===t});return Object(I.createElement)("div",{key:t,className:"components-color-palette__item-wrapper"},Object(I.createElement)(ja,{text:n||me(he("Color code: %s"),t)},Object(I.createElement)("button",{type:"button",className:i,style:r,onClick:s(t),"aria-label":n?me(he("Color: %s"),n):me(he("Color code: %s"),t),"aria-pressed":o===t})),o===t&&Object(I.createElement)(Ia,{icon:"saved"}))})),Object(I.createElement)("div",{className:"components-color-palette__custom-clear-wrapper"},!r&&Object(I.createElement)(ds,{className:"components-color-palette__custom-color",contentClassName:"components-color-palette__picker",renderToggle:function(e){var t=e.isOpen,n=e.onToggle;return Object(I.createElement)(va,{"aria-expanded":t,onClick:n,"aria-label":c,isLink:!0},he("Custom Color"))},renderContent:function(){return Object(I.createElement)(Is,{color:o,onChangeComplete:function(e){return i(e.hex)},disableAlpha:!0})}}),Object(I.createElement)(va,{className:"components-color-palette__clear",type:"button",onClick:function(){return i(void 0)},isSmall:!0,isDefault:!0},he("Clear"))))}));var FO=Ab((function(e){return Y_((function(e){return Object(N.pick)(e,["clientId"])}))(e)}),"withClientId"),HO=FO((function(e){var t=e.clientId;return Object(I.createElement)(LO,{rootClientId:t})})),VO=Object(N.flowRight)([FO,ey((function(e,t){var n=t.clientId,r=(0,e("core/block-editor").getBlockOrder)(n);return{lastBlockClientId:Object(N.last)(r)}}))])((function(e){var t=e.clientId,n=e.lastBlockClientId;return Object(I.createElement)(dO,{childHandledEvents:["onFocus","onClick","onKeyDown"]},Object(I.createElement)(yO,{rootClientId:t,lastBlockClientId:n}))})),BO=function(e){function t(){var e;return Oe(this,t),(e=Te(this,xe(t).apply(this,arguments))).state={templateInProcess:!!e.props.template},e.updateNestedSettings(),e}return Me(t,e),Ee(t,[{key:"getTemplateLock",value:function(){var e=this.props,t=e.templateLock,n=e.parentLock;return void 0===t?n:t}},{key:"componentDidMount",value:function(){0!==this.props.block.innerBlocks.length&&"all"!==this.getTemplateLock()||this.synchronizeBlocksWithTemplate(),this.state.templateInProcess&&this.setState({templateInProcess:!1})}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.template,r=t.block.innerBlocks;(this.updateNestedSettings(),0===r.length||"all"===this.getTemplateLock())&&(!Object(N.isEqual)(n,e.template)&&this.synchronizeBlocksWithTemplate())}},{key:"synchronizeBlocksWithTemplate",value:function(){var e=this.props,t=e.template,n=e.block,r=e.replaceInnerBlocks,o=n.innerBlocks,i=Rp(o,t);Object(N.isEqual)(i,o)||r(i)}},{key:"updateNestedSettings",value:function(){var e=this.props,t=e.blockListSettings,n=e.allowedBlocks,r=e.updateNestedSettings,o={allowedBlocks:n,templateLock:this.getTemplateLock()};nr()(t,o)||r(o)}},{key:"render",value:function(){var e=this.props,t=e.clientId,n=e.hasOverlay,r=e.renderAppender,o=this.state.templateInProcess,i=Pn()("editor-inner-blocks block-editor-inner-blocks",{"has-overlay":n});return Object(I.createElement)("div",{className:i},!o&&Object(I.createElement)(wO,{rootClientId:t,renderAppender:r}))}}]),t}(I.Component);(BO=Object(N.flowRight)([Y_((function(e){return Object(N.pick)(e,["clientId"])})),ey((function(e,t){var n=e("core/block-editor"),r=n.isBlockSelected,o=n.hasSelectedInnerBlock,i=n.getBlock,a=n.getBlockListSettings,s=n.getBlockRootClientId,c=n.getTemplateLock,l=t.clientId,u=i(l),d=s(l);return{block:u,blockListSettings:a(l),hasOverlay:"core/template"!==u.name&&!r(l)&&!o(l,!0),parentLock:c(d)}})),ry((function(e,t){var n=e("core/block-editor"),r=n.replaceInnerBlocks,o=n.updateBlockListSettings,i=t.block,a=t.clientId,s=t.templateInsertUpdatesSelection,c=void 0===s||s;return{replaceInnerBlocks:function(e){r(a,e,0===i.innerBlocks.length&&c)},updateNestedSettings:function(t){e(o(a,t))}}}))])(BO)).DefaultBlockAppender=VO,BO.ButtonBlockAppender=HO,BO.Content=Lf((function(e){var t=e.BlockContent;return Object(I.createElement)(t,null)}));var UO=Ka("InspectorAdvancedControls"),WO=UO.Fill,KO=UO.Slot,YO=$_(WO);YO.Slot=KO;var $O=YO,qO=Ka("InspectorControls"),GO=qO.Fill,ZO=qO.Slot,XO=$_(GO);XO.Slot=ZO;var QO=XO,JO=yu("editor.MediaUpload")((function(){return null})),eS=function(e){function t(){var e;return Oe(this,t),(e=Te(this,xe(t).apply(this,arguments))).toggleSettingsVisibility=e.toggleSettingsVisibility.bind(Ce(e)),e.state={isSettingsExpanded:!1},e}return Me(t,e),Ee(t,[{key:"toggleSettingsVisibility",value:function(){this.setState({isSettingsExpanded:!this.state.isSettingsExpanded})}},{key:"render",value:function(){var e=this.props,t=e.children,n=e.renderSettings,r=e.position,o=void 0===r?"bottom center":r,i=e.focusOnMount,a=void 0===i?"firstElement":i,s=j(e,["children","renderSettings","position","focusOnMount"]),c=this.state.isSettingsExpanded,l=!!n&&c;return Object(I.createElement)(Ga,Ne({className:"editor-url-popover block-editor-url-popover",focusOnMount:a,position:o},s),Object(I.createElement)("div",{className:"editor-url-popover__row block-editor-url-popover__row"},t,!!n&&Object(I.createElement)(Pa,{className:"editor-url-popover__settings-toggle block-editor-url-popover__settings-toggle",icon:"arrow-down-alt2",label:he("Link Settings"),onClick:this.toggleSettingsVisibility,"aria-expanded":c})),l&&Object(I.createElement)("div",{className:"editor-url-popover__row block-editor-url-popover__row editor-url-popover__settings block-editor-url-popover__settings"},n()))}}]),t}(I.Component),tS=function(e){var t=e.src,n=e.onChange,r=e.onSubmit,o=e.onClose;return Object(I.createElement)(eS,{onClose:o},Object(I.createElement)("form",{className:"editor-media-placeholder__url-input-form block-editor-media-placeholder__url-input-form",onSubmit:r},Object(I.createElement)("input",{className:"editor-media-placeholder__url-input-field block-editor-media-placeholder__url-input-field",type:"url","aria-label":he("URL"),placeholder:he("Paste or type URL"),onChange:n,value:t}),Object(I.createElement)(Pa,{className:"editor-media-placeholder__url-input-submit-button block-editor-media-placeholder__url-input-submit-button",icon:"editor-break",label:he("Apply"),type:"submit"})))},nS=function(e){function t(){var e;return Oe(this,t),(e=Te(this,xe(t).apply(this,arguments))).state={src:"",isURLInputVisible:!1},e.onChangeSrc=e.onChangeSrc.bind(Ce(e)),e.onSubmitSrc=e.onSubmitSrc.bind(Ce(e)),e.onUpload=e.onUpload.bind(Ce(e)),e.onFilesUpload=e.onFilesUpload.bind(Ce(e)),e.openURLInput=e.openURLInput.bind(Ce(e)),e.closeURLInput=e.closeURLInput.bind(Ce(e)),e}return Me(t,e),Ee(t,[{key:"onlyAllowsImages",value:function(){var e=this.props.allowedTypes;return!!e&&Object(N.every)(e,(function(e){return"image"===e||Object(N.startsWith)(e,"image/")}))}},{key:"componentDidMount",value:function(){this.setState({src:Object(N.get)(this.props.value,["src"],"")})}},{key:"componentDidUpdate",value:function(e){Object(N.get)(e.value,["src"],"")!==Object(N.get)(this.props.value,["src"],"")&&this.setState({src:Object(N.get)(this.props.value,["src"],"")})}},{key:"onChangeSrc",value:function(e){this.setState({src:e.target.value})}},{key:"onSubmitSrc",value:function(e){e.preventDefault(),this.state.src&&this.props.onSelectURL&&(this.props.onSelectURL(this.state.src),this.closeURLInput())}},{key:"onUpload",value:function(e){this.onFilesUpload(e.target.files)}},{key:"onFilesUpload",value:function(e){var t,n=this.props,r=n.addToGallery,o=n.allowedTypes,i=n.mediaUpload,a=n.multiple,s=n.onError,c=n.onSelect,l=n.value;if(a)if(r){var u=void 0===l?[]:l;t=function(e){c(u.concat(e))}}else t=c;else t=function(e){var t=Ae(e,1)[0];return c(t)};i({allowedTypes:o,filesList:e,onFileChange:t,onError:s})}},{key:"openURLInput",value:function(){this.setState({isURLInputVisible:!0})}},{key:"closeURLInput",value:function(){this.setState({isURLInputVisible:!1})}},{key:"renderPlaceholder",value:function(e,t){var n=this.props,r=n.allowedTypes,o=void 0===r?[]:r,i=n.className,a=n.icon,s=n.isAppender,c=n.labels,l=void 0===c?{}:c,u=n.onDoubleClick,d=n.mediaPreview,f=n.notices,h=n.onSelectURL,p=n.mediaUpload,v=l.instructions,m=l.title;if(p||h||(v=he("To edit this block, you need permission to upload media.")),void 0===v||void 0===m){var g=1===o.length,b=g&&"audio"===o[0],y=g&&"image"===o[0],k=g&&"video"===o[0];void 0===v&&p&&(v=he("Drag a media file, upload a new one or select a file from your library."),b?v=he("Drag an audio, upload a new one or select a file from your library."):y?v=he("Drag an image, upload a new one or select a file from your library."):k&&(v=he("Drag a video, upload a new one or select a file from your library."))),void 0===m&&(m=he("Media"),b?m=he("Audio"):y?m=he("Image"):k&&(m=he("Video")))}var _=Pn()("block-editor-media-placeholder","editor-media-placeholder",i,{"is-appender":s});return Object(I.createElement)(Fc,{icon:a,label:m,instructions:v,className:_,notices:f,onClick:t,onDoubleClick:u,preview:d},e)}},{key:"renderDropZone",value:function(){var e=this.props.onHTMLDrop,t=void 0===e?N.noop:e;return Object(I.createElement)(Qs,{onFilesDrop:this.onFilesUpload,onHTMLDrop:t})}},{key:"renderCancelLink",value:function(){var e=this.props.onCancel;return e&&Object(I.createElement)(va,{className:"block-editor-media-placeholder__cancel-button",title:he("Cancel"),isLink:!0,onClick:e},he("Cancel"))}},{key:"renderUrlSelectionUI",value:function(){if(!this.props.onSelectURL)return null;var e=this.state,t=e.isURLInputVisible,n=e.src;return Object(I.createElement)("div",{className:"editor-media-placeholder__url-input-container block-editor-media-placeholder__url-input-container"},Object(I.createElement)(va,{className:"editor-media-placeholder__button block-editor-media-placeholder__button",onClick:this.openURLInput,isToggled:t,isLarge:!0},he("Insert from URL")),t&&Object(I.createElement)(tS,{src:n,onChange:this.onChangeSrc,onSubmit:this.onSubmitSrc,onClose:this.closeURLInput}))}},{key:"renderMediaUploadChecked",value:function(){var e=this,t=this.props,n=t.accept,r=t.addToGallery,o=t.allowedTypes,i=void 0===o?[]:o,a=t.isAppender,s=t.mediaUpload,c=t.multiple,l=void 0!==c&&c,u=t.onSelect,d=t.value,f=void 0===d?{}:d,h=Object(I.createElement)(JO,{addToGallery:r,gallery:l&&this.onlyAllowsImages(),multiple:l,onSelect:u,allowedTypes:i,value:Object(N.isArray)(f)?f.map((function(e){return e.id})):f.id,render:function(e){var t=e.open;return Object(I.createElement)(va,{isLarge:!0,className:Pn()("editor-media-placeholder__button","editor-media-placeholder__media-library-button"),onClick:function(e){e.stopPropagation(),t()}},he("Media Library"))}});if(s&&a)return Object(I.createElement)(I.Fragment,null,this.renderDropZone(),Object(I.createElement)(uc,{onChange:this.onUpload,accept:n,multiple:l,render:function(t){var n=t.openFileDialog,r=Object(I.createElement)(I.Fragment,null,Object(I.createElement)(Pa,{isLarge:!0,className:Pn()("block-editor-media-placeholder__button","editor-media-placeholder__button","block-editor-media-placeholder__upload-button"),icon:"upload"},he("Upload")),h,e.renderUrlSelectionUI(),e.renderCancelLink());return e.renderPlaceholder(r,n)}}));if(s){var p=Object(I.createElement)(I.Fragment,null,this.renderDropZone(),Object(I.createElement)(uc,{isLarge:!0,className:Pn()("block-editor-media-placeholder__button","editor-media-placeholder__button","block-editor-media-placeholder__upload-button"),onChange:this.onUpload,accept:n,multiple:l},he("Upload")),h,this.renderUrlSelectionUI(),this.renderCancelLink());return this.renderPlaceholder(p)}return this.renderPlaceholder(h)}},{key:"render",value:function(){return this.props.dropZoneUIOnly?Object(I.createElement)(ww,null,this.renderDropZone()):Object(I.createElement)(ww,{fallback:this.renderPlaceholder(this.renderUrlSelectionUI())},this.renderMediaUploadChecked())}}]),t}(I.Component),rS=ey((function(e){return{mediaUpload:(0,e("core/block-editor").getSettings)().__experimentalMediaUpload}})),oS=(Object(N.flowRight)(rS,yu("editor.MediaPlaceholder"))(nS),he("(current %s: %s)"));var iS=Object(N.flowRight)([AO,zb((function(e){return e.hasColorsToChoose}))])((function(e){var t=e.colors,n=e.disableCustomColors,r=e.label,o=e.onChange,i=e.value,a=B_(t,i),s=a&&a.name,c=me(oS,r.toLowerCase(),s||i);return Object(I.createElement)(ss,{className:"editor-color-palette-control block-editor-color-palette-control"},Object(I.createElement)(ss.VisualLabel,null,r,i&&Object(I.createElement)(us,{colorValue:i,"aria-label":c})),Object(I.createElement)(zO,Ne({className:"editor-color-palette-control__color-palette block-editor-color-palette-control__color-palette",value:i,onChange:o},{colors:t,disableCustomColors:n})))})),aS=function(e,t){return void 0!==t.disableCustomColors?t.disableCustomColors:e},sS=he("(%s: %s)"),cS=(AO(zb((function(e){var t=e.colors,n=e.disableCustomColors,r=e.colorSettings;return Object(N.some)(r,(function(e){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0;return!aS(t,n)||(n.colors||e).length>0}(t,n,e)}))}))((function(e){var t=e.children,n=e.colors,r=e.colorSettings,o=e.disableCustomColors,i=e.title,a=j(e,["children","colors","colorSettings","disableCustomColors","title"]),s=Object(I.createElement)("span",{className:"editor-panel-color-settings__panel-title block-editor-panel-color-settings__panel-title"},i,function(e,t){return e.map((function(e,n){var r=e.value,o=e.label,i=e.colors;if(!r)return null;var a=B_(i||t,r),s=a&&a.name,c=me(sS,o.toLowerCase(),s||r);return Object(I.createElement)(us,{key:n,colorValue:r,"aria-label":c})}))}(r,n));return Object(I.createElement)(zc,Ne({className:"editor-panel-color-settings block-editor-panel-color-settings",title:s},a),r.map((function(e,t){return Object(I.createElement)(iS,Ne({key:t},D({colors:n,disableCustomColors:o},e)))})),t)}))),Object(I.forwardRef)((function(e,t){var n=e.onChange,r=e.className,o=j(e,["onChange","className"]);return Object(I.createElement)(qw.a,Ne({ref:t,className:Pn()("editor-plain-text block-editor-plain-text",r),onChange:function(e){return n(e.target.value)}},o))})),ey((function(e){return{formatTypes:(0,e("core/rich-text").getFormatTypes)()}}))((function(e){var t=e.formatTypes,n=e.onChange,r=e.value;return Object(I.createElement)(I.Fragment,null,t.map((function(e){var t=e.name,o=e.edit;if(!o)return null;var i=Ko(r,t),a=void 0!==i,s=function(e){var t=e.start,n=e.end,r=e.replacements,o=e.text;if(t+1===n&&o[t]===Io)return r[t]}(r),c=void 0!==s;return Object(I.createElement)(o,{key:t,isActive:a,activeAttributes:a&&i.attributes||{},isObjectActive:c,activeObjectAttributes:c&&s.attributes||{},value:r,onChange:n})})))}))),lS=function(e){var t=e.controls;return Object(I.createElement)("div",{className:"editor-format-toolbar block-editor-format-toolbar"},Object(I.createElement)(gu,null,t.map((function(e){return Object(I.createElement)(Va,{name:"RichText.ToolbarControls.".concat(e),key:e})})),Object(I.createElement)(Va,{name:"RichText.ToolbarControls"},(function(e){return 0!==e.length&&Object(I.createElement)(rc,{icon:!1,position:"bottom left",label:he("More Rich Text Controls"),controls:Object(N.orderBy)(e.map((function(e){return Ae(e,1)[0].props})),"title")})}))))},uS=function(e){return Object(N.pickBy)(e,(function(e,t){return n=t,Object(N.startsWith)(n,"aria-")&&!Object(N.isNil)(e);var n}))},dS=window.navigator.userAgent;var fS=dS.indexOf("Trident")>=0,hS=function(e){function t(){var e;return Oe(this,t),(e=Te(this,xe(t).call(this))).bindEditorNode=e.bindEditorNode.bind(Ce(e)),e}return Me(t,e),Ee(t,[{key:"shouldComponentUpdate",value:function(e){var t=this;this.configureIsPlaceholderVisible(e.isPlaceholderVisible),Object(N.isEqual)(this.props.style,e.style)||(this.editorNode.setAttribute("style",""),Object.assign(this.editorNode.style,e.style)),Object(N.isEqual)(this.props.className,e.className)||(this.editorNode.className=Pn()("block-editor-rich-text__editable","editor-rich-text__editable",e.className));var n=function(e,t){var n=Object(N.keys)(uS(e)),r=Object(N.keys)(uS(t));return{removedKeys:Object(N.difference)(n,r),updatedKeys:r.filter((function(n){return!Object(N.isEqual)(e[n],t[n])}))}}(this.props,e),r=n.removedKeys,o=n.updatedKeys;return r.forEach((function(e){return t.editorNode.removeAttribute(e)})),o.forEach((function(n){return t.editorNode.setAttribute(n,e[n])})),!1}},{key:"configureIsPlaceholderVisible",value:function(e){var t=String(!!e);this.editorNode.getAttribute("data-is-placeholder-visible")!==t&&this.editorNode.setAttribute("data-is-placeholder-visible",t)}},{key:"bindEditorNode",value:function(e){this.editorNode=e,this.props.setRef(e),fS&&(e?this.removeInternetExplorerInputFix=function(e){function t(e){e.stopImmediatePropagation();var t=document.createEvent("Event");t.initEvent("input",!0,!1),t.data=e.data,e.target.dispatchEvent(t)}function n(t){var n=t.target,r=t.keyCode;if((Ln===r||Kn===r)&&e.contains(n)){var o=document.createEvent("Event");o.initEvent("input",!0,!1),o.data=null,n.dispatchEvent(o)}}return e.addEventListener("textinput",t),document.addEventListener("keyup",n,!0),function(){e.removeEventListener("textinput",t),document.removeEventListener("keyup",n,!0)}}(e):this.removeInternetExplorerInputFix())}},{key:"render",value:function(){var e,t=this.props,n=t.tagName,r=void 0===n?"div":n,o=t.style,i=t.record,a=t.valueToEditableHTML,s=t.className,c=t.isPlaceholderVisible,l=j(t,["tagName","style","record","valueToEditableHTML","className","isPlaceholderVisible"]);return delete l.setRef,Object(I.createElement)(r,D((x(e={role:"textbox","aria-multiline":!0,className:Pn()("block-editor-rich-text__editable","editor-rich-text__editable",s),contentEditable:!0},"data-is-placeholder-visible",c),x(e,"ref",this.bindEditorNode),x(e,"style",o),x(e,"suppressContentEditableWarning",!0),x(e,"dangerouslySetInnerHTML",{__html:a(i)}),e),l))}}]),t}(I.Component);var pS=function(e){function t(){var e;return Oe(this,t),(e=Te(this,xe(t).apply(this,arguments))).onUse=e.onUse.bind(Ce(e)),e}return Me(t,e),Ee(t,[{key:"onUse",value:function(){return this.props.onUse(),!1}},{key:"render",value:function(){var e=this.props,t=e.character,n=e.type;return Object(I.createElement)(ys,{bindGlobal:!0,shortcuts:x({},Zn[n](t),this.onUse)})}}]),t}(I.Component),vS=function(e){var t=e.onTagNameChange,n=e.tagName,r=e.value,o=e.onChange;return Object(I.createElement)(I.Fragment,null,Object(I.createElement)(pS,{type:"primary",character:"[",onUse:function(){o(Ni(r))}}),Object(I.createElement)(pS,{type:"primary",character:"]",onUse:function(){o(Ii(r,{type:n}))}}),Object(I.createElement)(pS,{type:"primary",character:"m",onUse:function(){o(Ii(r,{type:n}))}}),Object(I.createElement)(pS,{type:"primaryShift",character:"m",onUse:function(){o(Ni(r))}}),Object(I.createElement)(fw,null,Object(I.createElement)(gu,{controls:[t&&{icon:"editor-ul",title:he("Convert to unordered list"),isActive:Go(r,"ul",n),onClick:function(){o(Ri(r,{type:"ul"})),qo(r)&&t("ul")}},t&&{icon:"editor-ol",title:he("Convert to ordered list"),isActive:Go(r,"ol",n),onClick:function(){o(Ri(r,{type:"ol"})),qo(r)&&t("ol")}},{icon:"editor-outdent",title:he("Outdent list item"),shortcut:ve("Backspace","keyboard key"),onClick:function(){o(Ni(r))}},{icon:"editor-indent",title:he("Indent list item"),shortcut:ve("Space","keyboard key"),onClick:function(){o(Ii(r,{type:n}))}}].filter(Boolean)})))},mS=[Zn.primary("z"),Zn.primaryShift("z"),Zn.primary("y")],gS=Object(I.createElement)(ys,{bindGlobal:!0,shortcuts:Object(N.fromPairs)(mS.map((function(e){return[e,function(e){return e.preventDefault()}]})))}),bS=function(){return gS};I.Component;var yS=window,kS=yS.getSelection,_S=yS.getComputedStyle,wS=new Set(["insertParagraph","insertOrderedList","insertUnorderedList","insertHorizontalRule","insertLink"]),OS=document.createElement("style");function SS(e,t){var n=Object.keys(e).reduce((function(n,r){return r.startsWith(t)&&n.push(e[r]),n}),[]);return function(e){return n.reduce((function(t,n){return n(t,e.text)}),e.formats)}}document.head.appendChild(OS);var ES=function(e){function t(e){var n,r=e.value,o=e.onReplace,i=e.multiline,a=e.selectionStart,s=e.selectionEnd;return Oe(this,t),n=Te(this,xe(t).apply(this,arguments)),!0!==i&&"p"!==i&&"li"!==i||(n.multilineTag=!0===i?"p":i),"li"===n.multilineTag&&(n.multilineWrapperTags=["ul","ol"]),n.onFocus=n.onFocus.bind(Ce(n)),n.onBlur=n.onBlur.bind(Ce(n)),n.onChange=n.onChange.bind(Ce(n)),n.onDeleteKeyDown=n.onDeleteKeyDown.bind(Ce(n)),n.onKeyDown=n.onKeyDown.bind(Ce(n)),n.onPaste=n.onPaste.bind(Ce(n)),n.onCreateUndoLevel=n.onCreateUndoLevel.bind(Ce(n)),n.onInput=n.onInput.bind(Ce(n)),n.onCompositionEnd=n.onCompositionEnd.bind(Ce(n)),n.onSelectionChange=n.onSelectionChange.bind(Ce(n)),n.getRecord=n.getRecord.bind(Ce(n)),n.createRecord=n.createRecord.bind(Ce(n)),n.applyRecord=n.applyRecord.bind(Ce(n)),n.isEmpty=n.isEmpty.bind(Ce(n)),n.valueToFormat=n.valueToFormat.bind(Ce(n)),n.setRef=n.setRef.bind(Ce(n)),n.valueToEditableHTML=n.valueToEditableHTML.bind(Ce(n)),n.handleHorizontalNavigation=n.handleHorizontalNavigation.bind(Ce(n)),n.onPointerDown=n.onPointerDown.bind(Ce(n)),n.onSplit=n.onSplit.bind(Ce(n)),n.patterns=function(e){var t=e.onReplace,n=e.valueToFormat,r=tf("from").filter((function(e){return"prefix"===e.type}));return[function(e){if(!t)return e;var o=e.start,i=Yo(e),a=i.slice(o-1,o);if(!/\s/.test(a))return e;var s=i.slice(0,o).trim(),c=ef(r,(function(e){var t=e.prefix;return s===t}));if(!c)return e;var l=n(ri(e,o,i.length)),u=c.transform(l);return t([u]),e},function(e){var t=e.start,n=Yo(e);if("`"!==n.slice(t-1,t))return e;var r=n.slice(0,t-1).lastIndexOf("`");if(-1===r)return e;var o=r,i=t-2;return o===i?e:(e=ti(e,o,o+1),e=Do(e=ti(e,i,i+1),{type:"code"},o,i))}]}({onReplace:o,valueToFormat:n.valueToFormat}),n.enterPatterns=tf("from").filter((function(e){return"enter"===e.type})),n.state={},n.usedDeprecatedChildrenSource=Array.isArray(r),n.lastHistoryValue=r,n.value=r,n.record=n.formatToValue(r),n.record.start=a,n.record.end=s,n}return Me(t,e),Ee(t,[{key:"componentWillUnmount",value:function(){document.removeEventListener("selectionchange",this.onSelectionChange)}},{key:"setRef",value:function(e){e?this.editableRef=e:delete this.editableRef}},{key:"getRecord",value:function(){return this.record}},{key:"createRecord",value:function(){var e=kS(),t=e.rangeCount>0?e.getRangeAt(0):null;return Ao({element:this.editableRef,range:t,multilineTag:this.multilineTag,multilineWrapperTags:this.multilineWrapperTags,__unstableIsEditableTree:!0})}},{key:"applyRecord",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.domOnly;_i({value:e,current:this.editableRef,multilineTag:this.multilineTag,multilineWrapperTags:this.multilineWrapperTags,prepareEditableTree:SS(this.props,"format_prepare_functions"),__unstableDomOnly:n})}},{key:"isEmpty",value:function(){return Xo(this.record)}},{key:"onPaste",value:function(e){var t=e.clipboardData,n=t.items,r=t.files;n=Object(N.isNil)(n)?[]:n,r=Object(N.isNil)(r)?[]:r;var o="",i="";try{o=t.getData("text/plain"),i=t.getData("text/html")}catch(b){try{i=t.getData("Text")}catch(y){return}}e.preventDefault(),window.console.log("Received HTML:\n\n",i),window.console.log("Received plain text:\n\n",o);var a,s=Object(N.find)([].concat(lt(n),lt(r)),(function(e){var t=e.type;return/^image\/(?:jpe?g|png|gif)$/.test(t)})),c=this.getRecord();if(s&&!i){var l=s.getAsFile?s.getAsFile():s,u=Ip({HTML:''),mode:"BLOCKS",tagName:this.props.tagName}),d=this.props.onReplace&&this.isEmpty();return window.console.log("Received item:\n\n",l),void(d?this.props.onReplace(u):this.onSplit&&this.onSplit(c,u))}if(!Zo(c)){var f=(i||o).replace(/<[^>]+>/g,"").trim();if(a=f,be.test(a))return this.onChange(Do(c,{type:"a",attributes:{href:If(f)}})),void window.console.log("Created link:\n\n",f)}var h=this.props.onReplace&&this.isEmpty(),p=this.props.onReplace&&this.props.onSplit,v="INLINE";h?v="BLOCKS":p&&(v="AUTO");var m=Ip({HTML:i,plainText:o,mode:v,tagName:this.props.tagName,canUserUseUnfilteredHTML:this.props.canUserUseUnfilteredHTML});if("string"==typeof m){var g=Ao({html:m});this.multilineTag&&(g=ni(g,/\n+/g,jo)),this.onChange(ei(c,g))}else m.length>0&&(h?this.props.onReplace(m):this.onSplit(c,m))}},{key:"onFocus",value:function(){var e=this.props.unstableOnFocus;e&&e(),this.recalculateBoundaryStyle();this.record=D({},this.record,{start:void 0,end:void 0,activeFormats:void 0}),this.props.onSelectionChange(void 0,void 0),this.setState({activeFormats:void 0}),document.addEventListener("selectionchange",this.onSelectionChange)}},{key:"onBlur",value:function(){document.removeEventListener("selectionchange",this.onSelectionChange)}},{key:"onInput",value:function(e){if(e&&e.nativeEvent.isComposing)document.removeEventListener("selectionchange",this.onSelectionChange);else{if(e&&e.nativeEvent.inputType){var t=e.nativeEvent.inputType;if(0===t.indexOf("format")||wS.has(t))return void this.applyRecord(this.getRecord())}var n=this.createRecord(),r=this.record,o=r.start,i=r.activeFormats,a=void 0===i?[]:i,s=Li({value:n,start:o,end:n.start,formats:a});this.onChange(s,{withoutHistory:!0});var c=this.patterns.reduce((function(e,t){return t(e)}),s);c!==s&&(this.onCreateUndoLevel(),this.onChange(D({},c,{activeFormats:a}))),this.props.clearTimeout(this.onInput.timeout),this.onInput.timeout=this.props.setTimeout(this.onCreateUndoLevel,1e3)}}},{key:"onCompositionEnd",value:function(){this.onInput(),document.addEventListener("selectionchange",this.onSelectionChange)}},{key:"onSelectionChange",value:function(){var e=this.createRecord(),t=e.start,n=e.end,r=this.getRecord();if(t!==r.start||n!==r.end){var o=this.props.isCaretWithinFormattedText,i=D({},r,{start:t,end:n,activeFormats:void 0}),a=Wo(i);i.activeFormats=a,!o&&a.length?this.props.onEnterFormattedText():o&&!a.length&&this.props.onExitFormattedText(),this.record=i,this.applyRecord(i,{domOnly:!0}),this.props.onSelectionChange(t,n),this.setState({activeFormats:a}),a.length>0&&this.recalculateBoundaryStyle()}}},{key:"recalculateBoundaryStyle",value:function(){var e=this.editableRef.querySelector("*[data-rich-text-format-boundary]");if(e){var t=_S(e).color.replace(")",", 0.2)").replace("rgb","rgba"),n=".".concat("block-editor-rich-text__editable",":focus ").concat("*[data-rich-text-format-boundary]"),r="background-color: ".concat(t);OS.innerHTML="".concat(n," {").concat(r,"}")}}},{key:"onChange",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.withoutHistory;this.applyRecord(e);var r=e.start,o=e.end,i=e.activeFormats,a=void 0===i?[]:i,s=Object(N.pickBy)(this.props,(function(e,t){return t.startsWith("format_on_change_functions_")}));Object.values(s).forEach((function(t){t(e.formats,e.text)})),this.value=this.valueToFormat(e),this.record=e,this.props.onChange(this.value),this.props.onSelectionChange(r,o),this.setState({activeFormats:a}),n||this.onCreateUndoLevel()}},{key:"onCreateUndoLevel",value:function(){this.lastHistoryValue!==this.value&&(this.props.onCreateUndoLevel(),this.lastHistoryValue=this.value)}},{key:"onDeleteKeyDown",value:function(e){var t=this.props,n=t.onMerge,r=t.onRemove;if(n||r){var o=e.keyCode===Ln;if(Zo(this.createRecord())){var i=this.isEmpty();(i||Qi(this.editableRef,o))&&(n&&n(!o),r&&i&&o&&r(!o),e.preventDefault())}}}},{key:"onKeyDown",value:function(e){var t=e.keyCode,n=e.shiftKey,r=e.altKey,o=e.metaKey,i=e.ctrlKey,a=this.props,s=a.onReplace,c=a.onSplit,l=s&&c;if(n||r||o||i||t!==Vn&&t!==Un||this.handleHorizontalNavigation(e),t===Hn&&"li"===this.multilineTag){var u=this.createRecord();if(Zo(u)){var d=u.text[u.start-1];d&&d!==jo||(this.onChange(Ii(u,{type:this.props.tagName})),e.preventDefault())}}if(t===Kn||t===Ln){var f=this.createRecord(),h=f.start,p=f.end;if(0===h&&0!==p&&p===f.text.length)return this.onChange(ti(f)),void e.preventDefault();if(this.multilineTag){var v=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=e.replacements,r=e.text,o=e.start,i=e.end,a=Zo(e),s=o-1,c=a?o-1:o,l=i;if(t||(s=i,c=o,l=a?i+1:i),r[s]===jo){var u;if(a&&n[s]&&n[s].length){var d=n.slice();d[s]=n[s].slice(0,-1),u=D({},e,{replacements:d})}else u=ti(e,c,l);return u}}(f,t===Ln);v&&(this.onChange(v),e.preventDefault())}this.onDeleteKeyDown(e)}else if(t===zn){e.preventDefault();var m=this.createRecord();if(this.props.onReplace){var g=Yo(m),b=ef(this.enterPatterns,(function(e){return e.regExp.test(g)}));if(b)return void this.props.onReplace([b.transform({content:g})])}this.multilineTag?e.shiftKey?this.onChange(ei(m,"\n")):l&&function(e){var t=e.text,n=e.start,r=e.end;return n===r&&(0===t.length||(0===n&&t.slice(0,1)===jo||(n===t.length&&t.slice(-1)===jo||t.slice(n-1,r+1)==="".concat(jo).concat(jo))))}(m)?this.onSplit(m):this.onChange(function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.start,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.end,r=Yo(e).slice(0,t).lastIndexOf(jo),o=e.replacements[r],i=[,];return o&&(i=[o]),ei(e,{formats:[,],replacements:i,text:jo},t,n)}(m)):e.shiftKey||!l?this.onChange(ei(m,"\n")):this.onSplit(m)}}},{key:"handleHorizontalNavigation",value:function(e){var t=this,n=this.getRecord(),r=n.text,o=n.formats,i=n.start,a=n.end,s=n.activeFormats,c=void 0===s?[]:s,l=Zo(n),u="rtl"===_S(this.editableRef).direction?Un:Vn,d=e.keyCode===u;if(l&&0===c.length){if(0===i&&d)return;if(a===r.length&&!d)return}if(l){e.preventDefault();var f=o[i-1]||[],h=o[i]||[],p=c.length,v=h;if(f.length>h.length&&(v=f),f.lengthf.length&&p--):f.length>h.length&&(!d&&c.length>h.length&&p--,d&&c.length1&&void 0!==arguments[1]?arguments[1]:[],n=this.props,r=n.onReplace,o=n.onSplit,i=n.__unstableOnSplitMiddle;if(r&&o){var a=[],s=oi(e),c=Ae(s,2),l=c[0],u=c[1],d=t.length>0;d&&Xo(l)||a.push(o(this.valueToFormat(l))),d?a.push.apply(a,lt(t)):i&&a.push(i()),!d&&i&&Xo(u)||a.push(o(this.valueToFormat(u)));var f=d?a.length-1:1;r(a,f)}}},{key:"onPointerDown",value:function(e){var t=e.target;if(t!==this.editableRef&&!t.textContent){var n=t.parentNode,r=Array.from(n.childNodes).indexOf(t),o=t.ownerDocument.createRange(),i=kS();o.setStart(t.parentNode,r),o.setEnd(t.parentNode,r+1),i.removeAllRanges(),i.addRange(o)}}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.tagName,r=t.value,o=t.selectionStart,i=t.selectionEnd,a=t.isSelected,s=n===e.tagName&&r!==e.value&&r!==this.value;s=s||a&&!e.isSelected&&(this.record.start!==o||this.record.end!==i);var c=function(e,t){return t.startsWith("format_prepare_props_")},l=Object(N.pickBy)(this.props,c),u=Object(N.pickBy)(e,c);s=s||!nr()(l,u);var d=this.record.activeFormats,f=void 0===d?[]:d;s?(this.value=r,this.record=this.formatToValue(r),this.record.start=o,this.record.end=i,Li({value:this.record,start:this.record.start,end:this.record.end,formats:f}),this.applyRecord(this.record)):this.record.start===o&&this.record.end===i||(this.record=D({},this.record,{start:o,end:i}))}},{key:"formatToValue",value:function(e){if(Array.isArray(e)&&(e=gh.toHTML(e)),"string"===this.props.format){var t=SS(this.props,"format_value_functions");return(e=Ao({html:e,multilineTag:this.multilineTag,multilineWrapperTags:this.multilineWrapperTags})).formats=t(e),e}return e}},{key:"valueToEditableHTML",value:function(e){return ki({value:e,multilineTag:this.multilineTag,prepareEditableTree:SS(this.props,"format_prepare_functions")}).body.innerHTML}},{key:"removeEditorOnlyFormats",value:function(e){return this.props.formatTypes.forEach((function(t){t.__experimentalCreatePrepareEditableTree&&(e=Qo(e,t.name,0,e.text.length))})),e}},{key:"valueToFormat",value:function(e){return e=this.removeEditorOnlyFormats(e),this.usedDeprecatedChildrenSource?gh.fromDOM(ki({value:e,multilineTag:this.multilineTag,isEditableTree:!1}).body.childNodes):"string"===this.props.format?wi({value:e,multilineTag:this.multilineTag}):e}},{key:"render",value:function(){var e=this,t=this.props,n=t.tagName,r=void 0===n?"div":n,o=t.style,i=t.wrapperClassName,a=t.className,s=t.inlineToolbar,c=void 0!==s&&s,l=t.formattingControls,u=t.placeholder,d=t.keepPlaceholderOnFocus,f=void 0!==d&&d,h=t.isSelected,p=t.autocompleters,v=t.onTagNameChange,m=r,g=this.multilineTag,b=uS(this.props),y=u&&(!h||f)&&this.isEmpty(),k=Pn()(i,"editor-rich-text block-editor-rich-text"),_=this.getRecord();return Object(I.createElement)("div",{className:k},h&&"li"===this.multilineTag&&Object(I.createElement)(vS,{onTagNameChange:v,tagName:r,value:_,onChange:this.onChange}),h&&!c&&Object(I.createElement)(fw,null,Object(I.createElement)(lS,{controls:l})),h&&c&&Object(I.createElement)(Ra,{className:"editor-rich-text__inline-toolbar block-editor-rich-text__inline-toolbar"},Object(I.createElement)(lS,{controls:l})),Object(I.createElement)(Z_,{onReplace:this.props.onReplace,completers:p,record:_,onChange:this.onChange},(function(t){var n=t.listBoxId,i=t.activeId;return Object(I.createElement)(I.Fragment,null,Object(I.createElement)(hS,Ne({tagName:r,style:o,record:_,valueToEditableHTML:e.valueToEditableHTML,isPlaceholderVisible:y,"aria-label":u,"aria-autocomplete":"list","aria-owns":n,"aria-activedescendant":i},b,{className:a,key:m,onPaste:e.onPaste,onInput:e.onInput,onCompositionEnd:e.onCompositionEnd,onKeyDown:e.onKeyDown,onFocus:e.onFocus,onBlur:e.onBlur,onMouseDown:e.onPointerDown,onTouchStart:e.onPointerDown,setRef:e.setRef})),y&&Object(I.createElement)(r,{className:Pn()("editor-rich-text__editable block-editor-rich-text__editable",a),style:o},g?Object(I.createElement)(g,null,u):u),h&&Object(I.createElement)(cS,{value:_,onChange:e.onChange}))})),h&&Object(I.createElement)(bS,null))}}]),t}(I.Component);ES.defaultProps={formattingControls:["bold","italic","link","strikethrough"],format:"string",value:""};var CS=Object(N.flowRight)([Hb,Y_((function(e){return{clientId:e.clientId}})),ey((function(e,t){var n=t.clientId,r=t.instanceId,o=t.identifier,i=void 0===o?r:o,a=t.isSelected,s=e("core/editor").canUserUseUnfilteredHTML,c=e("core/block-editor"),l=c.isCaretWithinFormattedText,u=c.getSelectionStart,d=c.getSelectionEnd,f=e("core/rich-text").getFormatTypes,h=u(),p=d();return void 0===a&&(a=h.clientId===n&&h.attributeKey===i),{canUserUseUnfilteredHTML:s(),isCaretWithinFormattedText:l(),formatTypes:f(),selectionStart:a?h.offset:void 0,selectionEnd:a?p.offset:void 0,isSelected:a}})),ry((function(e,t){var n=t.clientId,r=t.instanceId,o=t.identifier,i=void 0===o?r:o,a=e("core/block-editor"),s=a.__unstableMarkLastChangeAsPersistent,c=a.enterFormattedText,l=a.exitFormattedText,u=a.selectionChange;return{onCreateUndoLevel:s,onEnterFormattedText:c,onExitFormattedText:l,onSelectionChange:function(e,t){u(n,i,e,t)}}})),Vb,yu("experimentalRichText")])(ES);CS.Content=function(e){var t,n=e.value,r=e.tagName,o=e.multiline,i=j(e,["value","tagName","multiline"]),a=n;!0!==o&&"p"!==o&&"li"!==o||(t=!0===o?"p":o),Array.isArray(n)&&(a=gh.toHTML(n)),!a&&t&&(a="<".concat(t,">").concat(t,">"));var s=Object(I.createElement)(K,null,a);return r?Object(I.createElement)(r,Object(N.omit)(i,["format"]),s):s},CS.isEmpty=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Array.isArray(e)&&!e||0===e.length},CS.Content.defaultProps={format:"string",value:""};var TS=function(e){return e.stopPropagation()},xS=function(e){function t(e){var n,r=e.autocompleteRef;return Oe(this,t),(n=Te(this,xe(t).apply(this,arguments))).onChange=n.onChange.bind(Ce(n)),n.onKeyDown=n.onKeyDown.bind(Ce(n)),n.autocompleteRef=r||Object(I.createRef)(),n.inputRef=Object(I.createRef)(),n.updateSuggestions=Object(N.throttle)(n.updateSuggestions.bind(Ce(n)),200),n.suggestionNodes=[],n.state={suggestions:[],showSuggestions:!1,selectedSuggestion:null},n}return Me(t,e),Ee(t,[{key:"componentDidUpdate",value:function(){var e=this,t=this.state,n=t.showSuggestions,r=t.selectedSuggestion;n&&null!==r&&!this.scrollingIntoView&&(this.scrollingIntoView=!0,vc()(this.suggestionNodes[r],this.autocompleteRef.current,{onlyScrollIfNeeded:!0}),this.props.setTimeout((function(){e.scrollingIntoView=!1}),100))}},{key:"componentWillUnmount",value:function(){delete this.suggestionsRequest}},{key:"bindSuggestionNode",value:function(e){var t=this;return function(n){t.suggestionNodes[e]=n}}},{key:"updateSuggestions",value:function(e){var t=this,n=this.props.fetchLinkSuggestions;if(n)if(e.length<2||/^https?:/.test(e))this.setState({showSuggestions:!1,selectedSuggestion:null,loading:!1});else{this.setState({showSuggestions:!0,selectedSuggestion:null,loading:!0});var r=n(e);r.then((function(e){t.suggestionsRequest===r&&(t.setState({suggestions:e,loading:!1}),e.length?t.props.debouncedSpeak(me(pe("%d result found, use up and down arrow keys to navigate.","%d results found, use up and down arrow keys to navigate.",e.length),e.length),"assertive"):t.props.debouncedSpeak(he("No results."),"assertive"))})).catch((function(){t.suggestionsRequest===r&&t.setState({loading:!1})})),this.suggestionsRequest=r}}},{key:"onChange",value:function(e){var t=e.target.value;this.props.onChange(t),this.updateSuggestions(t)}},{key:"onKeyDown",value:function(e){var t=this.state,n=t.showSuggestions,r=t.selectedSuggestion,o=t.suggestions,i=t.loading;if(n&&o.length&&!i){var a=this.state.suggestions[this.state.selectedSuggestion];switch(e.keyCode){case Bn:e.stopPropagation(),e.preventDefault();var s=r?r-1:o.length-1;this.setState({selectedSuggestion:s});break;case Wn:e.stopPropagation(),e.preventDefault();var c=null===r||r===o.length-1?0:r+1;this.setState({selectedSuggestion:c});break;case An:null!==this.state.selectedSuggestion&&(this.selectLink(a),this.props.speak(he("Link selected.")));break;case zn:null!==this.state.selectedSuggestion&&(e.stopPropagation(),this.selectLink(a))}}else switch(e.keyCode){case Bn:0!==e.target.selectionStart&&(e.stopPropagation(),e.preventDefault(),e.target.setSelectionRange(0,0));break;case Wn:this.props.value.length!==e.target.selectionStart&&(e.stopPropagation(),e.preventDefault(),e.target.setSelectionRange(this.props.value.length,this.props.value.length))}}},{key:"selectLink",value:function(e){this.props.onChange(e.url,e),this.setState({selectedSuggestion:null,showSuggestions:!1})}},{key:"handleOnClick",value:function(e){this.selectLink(e),this.inputRef.current.focus()}},{key:"render",value:function(){var e=this,t=this.props,n=t.value,r=void 0===n?"":n,o=t.autoFocus,i=void 0===o||o,a=t.instanceId,s=t.className,c=this.state,l=c.showSuggestions,u=c.suggestions,d=c.selectedSuggestion,f=c.loading,h="block-editor-url-input-suggestions-".concat(a),p="block-editor-url-input-suggestion-".concat(a);return Object(I.createElement)("div",{className:Pn()("editor-url-input block-editor-url-input",s)},Object(I.createElement)("input",{autoFocus:i,type:"text","aria-label":he("URL"),required:!0,value:r,onChange:this.onChange,onInput:TS,placeholder:he("Paste URL or type to search"),onKeyDown:this.onKeyDown,role:"combobox","aria-expanded":l,"aria-autocomplete":"list","aria-owns":h,"aria-activedescendant":null!==d?"".concat(p,"-").concat(d):void 0,ref:this.inputRef}),f&&Object(I.createElement)(fu,null),l&&!!u.length&&Object(I.createElement)(Ga,{position:"bottom",noArrow:!0,focusOnMount:!1},Object(I.createElement)("div",{className:"editor-url-input__suggestions block-editor-url-input__suggestions",id:h,ref:this.autocompleteRef,role:"listbox"},u.map((function(t,n){return Object(I.createElement)("button",{key:t.id,role:"option",tabIndex:"-1",id:"".concat(p,"-").concat(n),ref:e.bindSuggestionNode(n),className:Pn()("editor-url-input__suggestion block-editor-url-input__suggestion",{"is-selected":n===d}),onClick:function(){return e.handleOnClick(t)},"aria-selected":n===d},t.title)})))))}}]),t}(I.Component),DS=Object(N.flowRight)(Vb,ts,Hb,ey((function(e){return{fetchLinkSuggestions:(0,e("core/block-editor").getSettings)().__experimentalFetchLinkSuggestions}})))(xS),MS=(I.Component,Ka("__experimentalBlockSettingsMenuFirstItem")),jS=MS.Fill,IS=MS.Slot;jS.Slot=IS;var PS=jS,NS=Ka("__experimentalBlockSettingsMenuPluginsExtension"),RS=NS.Fill,LS=NS.Slot;RS.Slot=LS;var AS=RS;var zS=Object(N.flowRight)([ey((function(e,t){var n=e("core/block-editor"),r=n.getBlocksByClientId,o=n.getTemplateLock,i=n.getBlockRootClientId,a=r(t.clientIds),s=Object(N.every)(a,(function(e){return!!e&&Wd(e.name,"multiple",!0)})),c=i(t.clientIds[0]);return{isLocked:!!o(c),blocks:a,canDuplicate:s,rootClientId:c,extraProps:t}})),ry((function(e,t,n){var r=n.select,o=t.clientIds,i=t.rootClientId,a=t.blocks,s=t.isLocked,c=t.canDuplicate,l=e("core/block-editor"),u=l.insertBlocks,d=l.multiSelect,f=l.removeBlocks,h=l.insertDefaultBlock,p=l.replaceBlocks;return{onDuplicate:function(){if(!s&&c){var e=(0,r("core/block-editor").getBlockIndex)(Object(N.last)(Object(N.castArray)(o)),i),t=a.map((function(e){return function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0;return D({},t,{clientId:_u()(),attributes:D({},t.attributes,n),innerBlocks:r||t.innerBlocks.map((function(t){return e(t)}))})}(e)}));u(t,e+1,i),t.length>1&&d(Object(N.first)(t).clientId,Object(N.last)(t).clientId)}},onRemove:function(){s||f(o)},onInsertBefore:function(){if(!s){var e=(0,r("core/block-editor").getBlockIndex)(Object(N.first)(Object(N.castArray)(o)),i);h({},i,e)}},onInsertAfter:function(){if(!s){var e=(0,r("core/block-editor").getBlockIndex)(Object(N.last)(Object(N.castArray)(o)),i);h({},i,e+1)}},onGroup:function(){if(a.length){var e=nf(a,"core/group");e&&p(o,e)}},onUngroup:function(){if(a.length){var e=a[0].innerBlocks;e.length&&p(o,e)}}}}))])((function(e){var t=e.onDuplicate,n=e.onRemove,r=e.onInsertBefore,o=e.onInsertAfter,i=e.onGroup,a=e.onUngroup,s=e.isLocked,c=e.canDuplicate;return(0,e.children)({onDuplicate:t,onRemove:n,onInsertAfter:o,onInsertBefore:r,onGroup:i,onUngroup:a,isLocked:s,canDuplicate:c})})),FS=function(e){return e.preventDefault(),e},HS={duplicate:{raw:Zn.primaryShift("d"),display:Qn.primaryShift("d")},removeBlock:{raw:Zn.access("z"),display:Qn.access("z")},insertBefore:{raw:Zn.primaryAlt("t"),display:Qn.primaryAlt("t")},insertAfter:{raw:Zn.primaryAlt("y"),display:Qn.primaryAlt("y")}},VS=function(e){function t(){var e;return Oe(this,t),(e=Te(this,xe(t).apply(this,arguments))).selectAll=e.selectAll.bind(Ce(e)),e.deleteSelectedBlocks=e.deleteSelectedBlocks.bind(Ce(e)),e.clearMultiSelection=e.clearMultiSelection.bind(Ce(e)),e}return Me(t,e),Ee(t,[{key:"selectAll",value:function(e){var t=this.props,n=t.rootBlocksClientIds,r=t.onMultiSelect;e.preventDefault(),r(Object(N.first)(n),Object(N.last)(n))}},{key:"deleteSelectedBlocks",value:function(e){var t=this.props,n=t.selectedBlockClientIds,r=t.hasMultiSelection,o=t.onRemove,i=t.isLocked;r&&(e.preventDefault(),i||o(n))}},{key:"clearMultiSelection",value:function(){var e=this.props,t=e.hasMultiSelection,n=e.clearSelectedBlock;t&&(n(),window.getSelection().removeAllRanges())}},{key:"render",value:function(){var e,t=this.props.selectedBlockClientIds;return Object(I.createElement)(I.Fragment,null,Object(I.createElement)(ys,{shortcuts:(e={},x(e,Zn.primary("a"),this.selectAll),x(e,"backspace",this.deleteSelectedBlocks),x(e,"del",this.deleteSelectedBlocks),x(e,"escape",this.clearMultiSelection),e)}),t.length>0&&Object(I.createElement)(zS,{clientIds:t},(function(e){var t,n=e.onDuplicate,r=e.onRemove,o=e.onInsertAfter,i=e.onInsertBefore;return Object(I.createElement)(ys,{bindGlobal:!0,shortcuts:(t={},x(t,HS.duplicate.raw,Object(N.flow)(FS,n)),x(t,HS.removeBlock.raw,Object(N.flow)(FS,r)),x(t,HS.insertBefore.raw,Object(N.flow)(FS,i)),x(t,HS.insertAfter.raw,Object(N.flow)(FS,o)),t)})})))}}]),t}(I.Component),BS=(Object(N.flowRight)([ey((function(e){var t=e("core/block-editor"),n=t.getBlockOrder,r=t.getSelectedBlockClientIds,o=t.hasMultiSelection,i=t.getBlockRootClientId,a=t.getTemplateLock,s=r();return{rootBlocksClientIds:n(),hasMultiSelection:o(),isLocked:Object(N.some)(s,(function(e){return!!a(i(e))})),selectedBlockClientIds:s}})),ry((function(e){var t=e("core/block-editor");return{clearSelectedBlock:t.clearSelectedBlock,onMultiSelect:t.multiSelect,onRemove:t.removeBlocks}}))])(VS),ey((function(e){return{selectedBlockClientId:e("core/block-editor").getBlockSelectionStart()}}))((function(e){var t=e.selectedBlockClientId;return t&&Object(I.createElement)(va,{isDefault:!0,type:"button",className:"editor-skip-to-selected-block block-editor-skip-to-selected-block",onClick:function(){pO(t).closest(".block-editor-block-list__block").focus()}},he("Skip to the selected block"))}))),US=function(){function e(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";Oe(this,e),this.value=n,["entries","forEach","keys","values"].forEach((function(e){t[e]=function(){var t;return(t=this._valueAsArray)[e].apply(t,arguments)}.bind(t)}))}return Ee(e,[{key:"toString",value:function(){return this.value}},{key:Symbol.iterator,value:Ve.a.mark((function e(){return Ve.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.delegateYield(this._valueAsArray,"t0",1);case 1:return e.abrupt("return",e.t0);case 2:case"end":return e.stop()}}),e,this)}))},{key:"item",value:function(e){return this._valueAsArray[e]}},{key:"contains",value:function(e){return-1!==this._valueAsArray.indexOf(e)}},{key:"add",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n]*?>/gi,HTMLcommentRegExp://g,spaceRegExp:/ | /gi,HTMLEntityRegExp:/&\S+?;/g,connectorRegExp:/--|\u2014/g,removeRegExp:new RegExp(["[","!-@[-`{-~","-¿×÷"," -⯿","⸀-","]"].join(""),"g"),astralRegExp:/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,wordsRegExp:/\S\s+/g,characters_excluding_spacesRegExp:/\S/g,characters_including_spacesRegExp:/[^\f\n\r\t\v\u00AD\u2028\u2029]/g,l10n:{type:"words"}},$S=function(e,t){if(e.HTMLRegExp)return t.replace(e.HTMLRegExp,"\n")},qS=function(e,t){return e.astralRegExp?t.replace(e.astralRegExp,"a"):t},GS=function(e,t){return e.HTMLEntityRegExp?t.replace(e.HTMLEntityRegExp,""):t},ZS=function(e,t){return e.connectorRegExp?t.replace(e.connectorRegExp," "):t},XS=function(e,t){return e.removeRegExp?t.replace(e.removeRegExp,""):t},QS=function(e,t){return e.HTMLcommentRegExp?t.replace(e.HTMLcommentRegExp,""):t},JS=function(e,t){return e.shortcodesRegExp?t.replace(e.shortcodesRegExp,"\n"):t},eE=function(e,t){if(e.spaceRegExp)return t.replace(e.spaceRegExp," ")},tE=function(e,t){return e.HTMLEntityRegExp?t.replace(e.HTMLEntityRegExp,"a"):t};function nE(e,t,n){if(""===e)return 0;if(e){var r=function(e,t){var n=Object(N.extend)(YS,t);return n.shortcodes=n.l10n.shortcodes||{},n.shortcodes&&n.shortcodes.length&&(n.shortcodesRegExp=new RegExp("\\[\\/?(?:"+n.shortcodes.join("|")+")[^\\]]*?\\]","g")),n.type=e||n.l10n.type,"characters_excluding_spaces"!==n.type&&"characters_including_spaces"!==n.type&&(n.type="words"),n}(t,n),o=r[t+"RegExp"],i="words"===r.type?function(e,t,n){return e=Object(N.flow)($S.bind(this,n),QS.bind(this,n),JS.bind(this,n),eE.bind(this,n),GS.bind(this,n),ZS.bind(this,n),XS.bind(this,n))(e),(e+="\n").match(t)}(e,o,r):function(e,t,n){return e=Object(N.flow)($S.bind(this,n),QS.bind(this,n),JS.bind(this,n),eE.bind(this,n),qS.bind(this,n),tE.bind(this,n))(e),(e+="\n").match(t)}(e,o,r);return i?i.length:0}}var rE=ey((function(e){return{blocks:(0,e("core/block-editor").getMultiSelectedBlocks)()}}))((function(e){var t=e.blocks,n=nE(Wf(t),"words");return Object(I.createElement)("div",{className:"editor-multi-selection-inspector__card block-editor-multi-selection-inspector__card"},Object(I.createElement)(hw,{icon:Object(I.createElement)(jn,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(I.createElement)(Dn,{d:"M3 5H1v16c0 1.1.9 2 2 2h16v-2H3V5zm18-4H7c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm0 16H7V3h14v14z"})),showColors:!0}),Object(I.createElement)("div",{className:"editor-multi-selection-inspector__card-content block-editor-multi-selection-inspector__card-content"},Object(I.createElement)("div",{className:"editor-multi-selection-inspector__card-title block-editor-multi-selection-inspector__card-title"},me(pe("%d block","%d blocks",t.length),t.length)),Object(I.createElement)("div",{className:"editor-multi-selection-inspector__card-description block-editor-multi-selection-inspector__card-description"},me(pe("%d word","%d words",n),n))))})),oE=(ey((function(e){var t=e("core/block-editor"),n=t.getSelectedBlockClientId,r=t.getSelectedBlockCount,o=t.getBlockName,i=e("core/blocks").getBlockStyles,a=n(),s=a&&o(a),c=a&&Vd(s),l=a&&i(s);return{count:r(),hasBlockStyles:l&&l.length>0,selectedBlockName:s,selectedBlockClientId:a,blockType:c}}))((function(e){var t=e.selectedBlockClientId,n=e.selectedBlockName,r=e.blockType,o=e.count,i=e.hasBlockStyles;if(o>1)return Object(I.createElement)(rE,null);var a=n===Fd();return r&&t&&!a?Object(I.createElement)(I.Fragment,null,Object(I.createElement)("div",{className:"editor-block-inspector__card block-editor-block-inspector__card"},Object(I.createElement)(hw,{icon:r.icon,showColors:!0}),Object(I.createElement)("div",{className:"editor-block-inspector__card-content block-editor-block-inspector__card-content"},Object(I.createElement)("div",{className:"editor-block-inspector__card-title block-editor-block-inspector__card-title"},r.title),Object(I.createElement)("div",{className:"editor-block-inspector__card-description block-editor-block-inspector__card-description"},r.description))),i&&Object(I.createElement)("div",null,Object(I.createElement)(zc,{title:he("Styles"),initialOpen:!1},Object(I.createElement)(KS,{clientId:t}))),Object(I.createElement)("div",null,Object(I.createElement)(QO.Slot,null)),Object(I.createElement)("div",null,Object(I.createElement)($O.Slot,null,(function(e){return!Object(N.isEmpty)(e)&&Object(I.createElement)(zc,{className:"editor-block-inspector__advanced block-editor-block-inspector__advanced",title:he("Advanced"),initialOpen:!1},e)}))),Object(I.createElement)(BS,{key:"back"})):Object(I.createElement)("span",{className:"editor-block-inspector__no-blocks block-editor-block-inspector__no-blocks"},he("No block selected."))})),function(e){function t(){var e;return Oe(this,t),(e=Te(this,xe(t).apply(this,arguments))).bindContainer=e.bindContainer.bind(Ce(e)),e.clearSelectionIfFocusTarget=e.clearSelectionIfFocusTarget.bind(Ce(e)),e}return Me(t,e),Ee(t,[{key:"bindContainer",value:function(e){this.container=e}},{key:"clearSelectionIfFocusTarget",value:function(e){var t=this.props,n=t.hasSelectedBlock,r=t.hasMultiSelection,o=t.clearSelectedBlock,i=n||r;e.target===this.container&&i&&o()}},{key:"render",value:function(){return Object(I.createElement)("div",Ne({tabIndex:-1,onFocus:this.clearSelectionIfFocusTarget,ref:this.bindContainer},Object(N.omit)(this.props,["clearSelectedBlock","hasSelectedBlock","hasMultiSelection"])))}}]),t}(I.Component));Object(N.flowRight)([ey((function(e){var t=e("core/block-editor"),n=t.hasSelectedBlock,r=t.hasMultiSelection;return{hasSelectedBlock:n(),hasMultiSelection:r()}})),ry((function(e){return{clearSelectedBlock:e("core/block-editor").clearSelectedBlock}}))])(oE);var iE=Object(N.flowRight)([ey((function(e,t){var n=t.clientId,r=e("core/block-editor"),o=r.getBlock,i=r.getBlockMode,a=r.getSettings,s=o(n),c=a().codeEditingEnabled;return{mode:i(n),blockType:s?Vd(s.name):null,isCodeEditingEnabled:c}})),ry((function(e,t){var n=t.onToggle,r=void 0===n?N.noop:n,o=t.clientId;return{onToggleMode:function(){e("core/block-editor").toggleBlockMode(o),r()}}}))])((function(e){var t=e.blockType,n=e.mode,r=e.onToggleMode,o=e.small,i=void 0!==o&&o,a=e.isCodeEditingEnabled,s=void 0===a||a;if(!Wd(t,"html",!0)||!s)return null;var c=he("visual"===n?"Edit as HTML":"Edit visually");return Object(I.createElement)(wc,{className:"editor-block-settings-menu__control block-editor-block-settings-menu__control",onClick:r,icon:"html"},!i&&c)}));function aE(e){var t=e.shouldRender,n=e.onClick,r=e.small;if(!t)return null;var o=he("Convert to Blocks");return Object(I.createElement)(wc,{className:"editor-block-settings-menu__control block-editor-block-settings-menu__control",onClick:n,icon:"screenoptions"},!r&&o)}var sE=Object(N.flowRight)(ey((function(e,t){var n=t.clientId,r=e("core/block-editor").getBlock(n);return{block:r,shouldRender:r&&"core/html"===r.name}})),ry((function(e,t){var n=t.block;return{onClick:function(){return e("core/block-editor").replaceBlocks(n.clientId,Pp({HTML:Vf(n)}))}}})))(aE),cE=Object(N.flowRight)(ey((function(e,t){var n=t.clientId,r=e("core/block-editor").getBlock(n);return{block:r,shouldRender:r&&r.name===zd()}})),ry((function(e,t){var n=t.block;return{onClick:function(){return e("core/block-editor").replaceBlocks(n.clientId,Pp({HTML:Wf(n)}))}}})))(aE);var lE=function(e){var t=e.clientIds,n=Object(N.castArray)(t),r=n.length,o=n[0];return Object(I.createElement)(zS,{clientIds:t},(function(e){var n=e.onDuplicate,i=e.onRemove,a=e.onInsertAfter,s=e.onInsertBefore,c=e.canDuplicate,l=e.isLocked;return Object(I.createElement)(gu,null,Object(I.createElement)(rc,{icon:"ellipsis",label:he("More options"),position:"bottom right",className:"block-editor-block-settings-menu",__unstableToggleClassName:"block-editor-block-settings-menu__toggle editor-block-settings-menu__toggle",__unstableMenuClassName:"block-editor-block-settings-menu__content editor-block-settings-menu__content",__unstablePopoverClassName:"block-editor-block-settings-menu__popover editor-block-settings-menu__popover"},(function(e){var u=e.onClose;return Object(I.createElement)(I.Fragment,null,Object(I.createElement)(_c,null,Object(I.createElement)(PS.Slot,{fillProps:{onClose:u}}),1===r&&Object(I.createElement)(cE,{clientId:o}),1===r&&Object(I.createElement)(sE,{clientId:o}),!l&&c&&Object(I.createElement)(wc,{className:"editor-block-settings-menu__control block-editor-block-settings-menu__control",onClick:Object(N.flow)(u,n),icon:"admin-page",shortcut:HS.duplicate.display},he("Duplicate")),!l&&Object(I.createElement)(I.Fragment,null,Object(I.createElement)(wc,{className:"editor-block-settings-menu__control block-editor-block-settings-menu__control",onClick:Object(N.flow)(u,s),icon:"insert-before",shortcut:HS.insertBefore.display},he("Insert Before")),Object(I.createElement)(wc,{className:"editor-block-settings-menu__control block-editor-block-settings-menu__control",onClick:Object(N.flow)(u,a),icon:"insert-after",shortcut:HS.insertAfter.display},he("Insert After"))),1===r&&Object(I.createElement)(iE,{clientId:o,onToggle:u}),Object(I.createElement)(AS.Slot,{fillProps:{clientIds:t,onClose:u}})),Object(I.createElement)(_c,null,!l&&Object(I.createElement)(wc,{className:"editor-block-settings-menu__control block-editor-block-settings-menu__control",onClick:Object(N.flow)(u,i),icon:"trash",shortcut:HS.removeBlock.display},he("Remove Block"))))})))}))},uE=function(e){function t(){var e;return Oe(this,t),(e=Te(this,xe(t).apply(this,arguments))).state={hoveredClassName:null},e.onHoverClassName=e.onHoverClassName.bind(Ce(e)),e}return Me(t,e),Ee(t,[{key:"onHoverClassName",value:function(e){this.setState({hoveredClassName:e})}},{key:"render",value:function(){var e=this,t=this.props,n=t.blocks,r=t.onTransform,o=t.inserterItems,i=t.hasBlockStyles,a=this.state.hoveredClassName;if(!n||!n.length)return null;var s,c=Object(N.mapKeys)(o,(function(e){return e.name})),l=Object(N.orderBy)(Object(N.filter)(function(e){if(Object(N.isEmpty)(e))return[];var t=Gd(e),n=Zd(e);return Object(N.uniq)([].concat(lt(t),lt(n)))}(n),(function(e){return e&&!!c[e.name]})),(function(e){return c[e.name].frecency}),"desc");if(1===Object(N.uniq)(Object(N.map)(n,"name")).length){var u=Vd(n[0].name);s=u.icon}else s="layout";return i||l.length?Object(I.createElement)(ds,{position:"bottom right",className:"editor-block-switcher block-editor-block-switcher",contentClassName:"editor-block-switcher__popover block-editor-block-switcher__popover",renderToggle:function(e){var t=e.onToggle,r=e.isOpen,o=1===n.length?he("Change block type or style"):me(pe("Change type of %d block","Change type of %d blocks",n.length),n.length);return Object(I.createElement)(gu,null,Object(I.createElement)(Pa,{className:"editor-block-switcher__toggle block-editor-block-switcher__toggle",onClick:t,"aria-haspopup":"true","aria-expanded":r,label:o,tooltip:o,onKeyDown:function(e){r||e.keyCode!==Wn||(e.preventDefault(),e.stopPropagation(),t())},icon:Object(I.createElement)(I.Fragment,null,Object(I.createElement)(hw,{icon:s,showColors:!0}),Object(I.createElement)(jn,{className:"editor-block-switcher__transform block-editor-block-switcher__transform",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(I.createElement)(Dn,{d:"M6.5 8.9c.6-.6 1.4-.9 2.2-.9h6.9l-1.3 1.3 1.4 1.4L19.4 7l-3.7-3.7-1.4 1.4L15.6 6H8.7c-1.4 0-2.6.5-3.6 1.5l-2.8 2.8 1.4 1.4 2.8-2.8zm13.8 2.4l-2.8 2.8c-.6.6-1.3.9-2.1.9h-7l1.3-1.3-1.4-1.4L4.6 16l3.7 3.7 1.4-1.4L8.4 17h6.9c1.3 0 2.6-.5 3.5-1.5l2.8-2.8-1.3-1.4z"})))}))},renderContent:function(t){var o=t.onClose;return Object(I.createElement)(I.Fragment,null,i&&Object(I.createElement)(zc,{title:he("Block Styles"),initialOpen:!0},Object(I.createElement)(KS,{clientId:n[0].clientId,onSwitch:o,onHoverClassName:e.onHoverClassName})),0!==l.length&&Object(I.createElement)(zc,{title:he("Transform To:"),initialOpen:!0},Object(I.createElement)(CO,{items:l.map((function(e){return{id:e.name,icon:e.icon,title:e.title,hasChildBlocksWithInserterSupport:Yd(e.name)}})),onSelect:function(e){r(n,e.id),o()}})),null!==a&&Object(I.createElement)(SO,{name:n[0].name,attributes:D({},n[0].attributes,{className:a}),innerBlocks:n[0].innerBlocks}))}}):Object(I.createElement)(gu,null,Object(I.createElement)(Pa,{disabled:!0,className:"editor-block-switcher__no-switcher-icon block-editor-block-switcher__no-switcher-icon",label:he("Block icon"),icon:Object(I.createElement)(hw,{icon:s,showColors:!0})}))}}]),t}(I.Component),dE=Object(N.flowRight)(ey((function(e,t){var n=t.clientIds,r=e("core/block-editor"),o=r.getBlocksByClientId,i=r.getBlockRootClientId,a=r.getInserterItems,s=e("core/blocks").getBlockStyles,c=i(Object(N.first)(Object(N.castArray)(n))),l=o(n),u=l&&1===l.length?l[0]:null,d=u&&s(u.name);return{blocks:l,inserterItems:a(c),hasBlockStyles:d&&d.length>0}})),ry((function(e,t){return{onTransform:function(n,r){e("core/block-editor").replaceBlocks(t.clientIds,nf(n,r))}}})))(uE);var fE=ey((function(e){var t=e("core/block-editor").getMultiSelectedBlockClientIds();return{isMultiBlockSelection:t.length>1,selectedBlockClientIds:t}}))((function(e){var t=e.isMultiBlockSelection,n=e.selectedBlockClientIds;return t?Object(I.createElement)(dE,{key:"switcher",clientIds:n}):null}));var hE=ey((function(e){var t=e("core/block-editor"),n=t.getBlockMode,r=t.getSelectedBlockClientIds,o=t.isBlockValid,i=r();return{blockClientIds:i,isValid:1===i.length?o(i[0]):null,mode:1===i.length?n(i[0]):null}}))((function(e){var t=e.blockClientIds,n=e.isValid,r=e.mode;return 0===t.length?null:t.length>1?Object(I.createElement)("div",{className:"editor-block-toolbar block-editor-block-toolbar"},Object(I.createElement)(fE,null),Object(I.createElement)(lE,{clientIds:t})):Object(I.createElement)("div",{className:"editor-block-toolbar block-editor-block-toolbar"},"visual"===r&&n&&Object(I.createElement)(I.Fragment,null,Object(I.createElement)(dE,{clientIds:t}),Object(I.createElement)(iw.Slot,null),Object(I.createElement)(fw.Slot,null)),Object(I.createElement)(lE,{clientIds:t}))}));Object(N.flowRight)([ry((function(e,t,n){var r=(0,n.select)("core/block-editor"),o=r.getBlocksByClientId,i=r.getSelectedBlockClientIds,a=r.hasMultiSelection,s=e("core/block-editor").removeBlocks,c=function(e){var t=i();if(0!==t.length&&(a()||!function(){if(ra(document.activeElement))return!0;var e=window.getSelection(),t=e.rangeCount?e.getRangeAt(0):null;return t&&!t.collapsed}())){var n=Wf(o(t));e.clipboardData.setData("text/plain",n),e.clipboardData.setData("text/html",n),e.preventDefault()}};return{onCopy:c,onCut:function(e){if(c(e),a()){var t=i();s(t)}}}}))])((function(e){var t=e.children,n=e.onCopy,r=e.onCut;return Object(I.createElement)("div",{onCopy:n,onCut:r},t)}));var pE=function(e){function t(){return Oe(this,t),Te(this,xe(t).apply(this,arguments))}return Me(t,e),Ee(t,[{key:"componentDidUpdate",value:function(){this.scrollIntoView()}},{key:"scrollIntoView",value:function(){var e=this.props.extentClientId;if(e){var t=pO(e);if(t){var n=ia(t);n&&vc()(t,n,{onlyScrollIfNeeded:!0})}}}},{key:"render",value:function(){return null}}]),t}(I.Component),vE=(ey((function(e){return{extentClientId:(0,e("core/block-editor").getLastMultiSelectedBlockClientId)()}}))(pE),[Bn,Un,Wn,Vn,zn,Ln]);var mE=function(e){function t(){var e;return Oe(this,t),(e=Te(this,xe(t).apply(this,arguments))).stopTypingOnSelectionUncollapse=e.stopTypingOnSelectionUncollapse.bind(Ce(e)),e.stopTypingOnMouseMove=e.stopTypingOnMouseMove.bind(Ce(e)),e.startTypingInTextField=e.startTypingInTextField.bind(Ce(e)),e.stopTypingOnNonTextField=e.stopTypingOnNonTextField.bind(Ce(e)),e.stopTypingOnEscapeKey=e.stopTypingOnEscapeKey.bind(Ce(e)),e.onKeyDown=Object(N.over)([e.startTypingInTextField,e.stopTypingOnEscapeKey]),e.lastMouseMove=null,e}return Me(t,e),Ee(t,[{key:"componentDidMount",value:function(){this.toggleEventBindings(this.props.isTyping)}},{key:"componentDidUpdate",value:function(e){this.props.isTyping!==e.isTyping&&this.toggleEventBindings(this.props.isTyping)}},{key:"componentWillUnmount",value:function(){this.toggleEventBindings(!1)}},{key:"toggleEventBindings",value:function(e){var t=e?"addEventListener":"removeEventListener";document[t]("selectionchange",this.stopTypingOnSelectionUncollapse),document[t]("mousemove",this.stopTypingOnMouseMove)}},{key:"stopTypingOnMouseMove",value:function(e){var t=e.clientX,n=e.clientY;if(this.lastMouseMove){var r=this.lastMouseMove,o=r.clientX,i=r.clientY;o===t&&i===n||this.props.onStopTyping()}this.lastMouseMove={clientX:t,clientY:n}}},{key:"stopTypingOnSelectionUncollapse",value:function(){var e=window.getSelection();e.rangeCount>0&&e.getRangeAt(0).collapsed||this.props.onStopTyping()}},{key:"stopTypingOnEscapeKey",value:function(e){this.props.isTyping&&e.keyCode===Fn&&this.props.onStopTyping()}},{key:"startTypingInTextField",value:function(e){var t=this.props,n=t.isTyping,r=t.onStartTyping,o=e.type,i=e.target;n||!ra(i)||i.closest(".block-editor-block-toolbar")||("keydown"!==o||function(e){var t=e.keyCode;return!e.shiftKey&&Object(N.includes)(vE,t)}(e))&&r()}},{key:"stopTypingOnNonTextField",value:function(e){var t=this;e.persist(),this.props.setTimeout((function(){var n=t.props,r=n.isTyping,o=n.onStopTyping,i=e.target;r&&!ra(i)&&o()}))}},{key:"render",value:function(){var e=this.props.children;return Object(I.createElement)("div",{onFocus:this.stopTypingOnNonTextField,onKeyPress:this.startTypingInTextField,onKeyDown:this.onKeyDown},e)}}]),t}(I.Component),gE=(Object(N.flowRight)([ey((function(e){return{isTyping:(0,e("core/block-editor").isTyping)()}})),ry((function(e){var t=e("core/block-editor");return{onStartTyping:t.startTyping,onStopTyping:t.stopTyping}})),Vb])(mE),function(e){function t(){return Oe(this,t),Te(this,xe(t).apply(this,arguments))}return Me(t,e),Ee(t,[{key:"getSnapshotBeforeUpdate",value:function(e){var t=this.props,n=t.blockOrder,r=t.selectionStart;return n!==e.blockOrder&&r?this.getOffset(r):null}},{key:"componentDidUpdate",value:function(e,t,n){n&&this.restorePreviousOffset(n)}},{key:"getOffset",value:function(e){var t=pO(e);return t?t.getBoundingClientRect().top:null}},{key:"restorePreviousOffset",value:function(e){var t=pO(this.props.selectionStart);if(t){var n=ia(t);n&&(n.scrollTop=n.scrollTop+t.getBoundingClientRect().top-e)}}},{key:"render",value:function(){return null}}]),t}(I.Component)),bE=(ey((function(e){return{blockOrder:e("core/block-editor").getBlockOrder(),selectionStart:e("core/block-editor").getBlockSelectionStart()}}))(gE),window),yE=bE.getSelection,kE=bE.getComputedStyle,_E=Object(N.overEvery)([ra,fa.tabbable.isTabbableIndex]);var wE=function(e){function t(){var e;return Oe(this,t),(e=Te(this,xe(t).apply(this,arguments))).onKeyDown=e.onKeyDown.bind(Ce(e)),e.bindContainer=e.bindContainer.bind(Ce(e)),e.clearVerticalRect=e.clearVerticalRect.bind(Ce(e)),e.focusLastTextField=e.focusLastTextField.bind(Ce(e)),e.verticalRect=null,e}return Me(t,e),Ee(t,[{key:"bindContainer",value:function(e){this.container=e}},{key:"clearVerticalRect",value:function(){this.verticalRect=null}},{key:"getClosestTabbable",value:function(e,t){var n=fa.focusable.find(this.container);return t&&(n=Object(N.reverse)(n)),n=n.slice(n.indexOf(e)+1),Object(N.find)(n,(function t(n,r,o){if(!fa.tabbable.isTabbableIndex(n))return!1;if(ra(n))return!0;if(!n.classList.contains("block-editor-block-list__block"))return!1;if(function(e){return!!e.querySelector(".block-editor-block-list__layout")}(n))return!0;if(n.contains(e))return!1;for(var i,a=1;(i=o[r+a])&&n.contains(i);a++)if(t(i,r+a,o))return!1;return!0}))}},{key:"expandSelection",value:function(e){var t=this.props,n=t.selectedBlockClientId,r=t.selectionStartClientId,o=t.selectionBeforeEndClientId,i=t.selectionAfterEndClientId,a=e?o:i;a&&this.props.onMultiSelect(r||n,a)}},{key:"moveSelection",value:function(e){var t=this.props,n=t.selectedFirstClientId,r=t.selectedLastClientId,o=e?n:r;o&&this.props.onSelectBlock(o)}},{key:"isTabbableEdge",value:function(e,t){var n,r,o=this.getClosestTabbable(e,t);return!(o&&(n=e,r=o,n.closest("[data-block]")===r.closest("[data-block]")))}},{key:"onKeyDown",value:function(e){var t=this.props,n=t.hasMultiSelection,r=t.onMultiSelect,o=t.blocks,i=t.selectionBeforeEndClientId,a=t.selectionAfterEndClientId,s=e.keyCode,c=e.target,l=s===Bn,u=s===Vn,d=l||u,f=u||s===Un,h=l||s===Wn,p=f||h,v=e.shiftKey,m=v||e.ctrlKey||e.altKey||e.metaKey,g=h?Ji:Qi;if(h?this.verticalRect||(this.verticalRect=function(){var e=window.getSelection(),t=e.rangeCount?e.getRangeAt(0):null;if(t)return ea(t)}()):this.verticalRect=null,!p)return Jn.primary(e)&&(this.isEntirelySelected=oa(c)),void(Jn.primary(e,"a")&&((c.isContentEditable?this.isEntirelySelected:oa(c))&&(r(Object(N.first)(o),Object(N.last)(o)),e.preventDefault()),this.isEntirelySelected=!0));if(!e.nativeEvent.defaultPrevented&&function(e,t,n){if((t===Bn||t===Wn)&&!n)return!0;var r=e.tagName;return"INPUT"!==r&&"TEXTAREA"!==r}(c,s,m)){var b="rtl"===kE(c).direction?!d:d;if(v)(d&&i||!d&&a)&&(n||this.isTabbableEdge(c,d)&&g(c,d))&&(this.expandSelection(d),e.preventDefault());else if(n)this.moveSelection(d),e.preventDefault();else if(h&&Ji(c,d)){var y=this.getClosestTabbable(c,d);y&&(!function e(t,n,r){var o=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if(t)if(r&&t.isContentEditable){var i=r.height/2,a=t.getBoundingClientRect(),s=r.left,c=n?a.bottom-i:a.top+i,l=na(document,s,c,t);if(!l||!t.contains(l.startContainer))return!o||l&&l.startContainer&&l.startContainer.contains(t)?void ta(t,n):(t.scrollIntoView(n),void e(t,n,r,!1));if(l.startContainer.nodeType===qi){var u=l.startContainer.parentNode,d=u.getBoundingClientRect(),f=n?"bottom":"top",h=parseInt(Yi(u).getPropertyValue("padding-".concat(f)),10)||0,p=n?d.bottom-h-i:d.top+h+i;c!==p&&(l=na(document,s,p,t))}var v=window.getSelection();v.removeAllRanges(),v.addRange(l),t.focus(),v.removeAllRanges(),v.addRange(l)}else ta(t,n)}(y,d,this.verticalRect),e.preventDefault())}else if(f&&yE().isCollapsed&&Qi(c,b)){ta(this.getClosestTabbable(c,b),b),e.preventDefault()}}}},{key:"focusLastTextField",value:function(){var e=fa.focusable.find(this.container),t=Object(N.findLast)(e,_E);t&&ta(t,!0)}},{key:"render",value:function(){var e=this.props.children;return Object(I.createElement)("div",{className:"editor-writing-flow block-editor-writing-flow"},Object(I.createElement)("div",{ref:this.bindContainer,onKeyDown:this.onKeyDown,onMouseDown:this.clearVerticalRect},e),Object(I.createElement)("div",{"aria-hidden":!0,tabIndex:-1,onClick:this.focusLastTextField,className:"wp-block editor-writing-flow__click-redirect block-editor-writing-flow__click-redirect"}))}}]),t}(I.Component),OE=(Object(N.flowRight)([ey((function(e){var t=e("core/block-editor"),n=t.getSelectedBlockClientId,r=t.getMultiSelectedBlocksStartClientId,o=t.getMultiSelectedBlocksEndClientId,i=t.getPreviousBlockClientId,a=t.getNextBlockClientId,s=t.getFirstMultiSelectedBlockClientId,c=t.getLastMultiSelectedBlockClientId,l=t.hasMultiSelection,u=t.getBlockOrder,d=n(),f=r(),h=o();return{selectedBlockClientId:d,selectionStartClientId:f,selectionBeforeEndClientId:i(h||d),selectionAfterEndClientId:a(h||d),selectedFirstClientId:s(),selectedLastClientId:c(),hasMultiSelection:l(),blocks:u()}})),ry((function(e){var t=e("core/block-editor");return{onMultiSelect:t.multiSelect,onSelectBlock:t.selectBlock}}))])(wE),["left","center","right","wide","full"]),SE=["wide","full"];function EE(e){var t,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return t=Array.isArray(e)?e:!0===e?OE:[],!r||!0===e&&!n?N.without.apply(void 0,[t].concat(SE)):t}var CE=Ab((function(e){return function(t){var n=t.name,r=EE(Ud(n,"align"),Wd(n,"alignWide",!0));return[r.length>0&&t.isSelected&&Object(I.createElement)(iw,{key:"align-controls"},Object(I.createElement)(ew,{value:t.attributes.align,onChange:function(e){if(!e){var n=Vd(t.name);Object(N.get)(n,["attributes","align","default"])&&(e="")}t.setAttributes({align:e})},controls:r})),Object(I.createElement)(e,Ne({key:"edit"},t))]}}),"withToolbarControls"),TE=Ab(Object(N.flowRight)([ey((function(e){return{hasWideEnabled:!!(0,e("core/block-editor").getSettings)().alignWide}})),function(e){return function(t){var n=t.name,r=t.attributes,o=t.hasWideEnabled,i=r.align,a=EE(Ud(n,"align"),Wd(n,"alignWide",!0),o),s=t.wrapperProps;return Object(N.includes)(a,i)&&(s=D({},s,{"data-align":i})),Object(I.createElement)(e,Ne({},t,{wrapperProps:s}))}}]));Br("blocks.registerBlockType","core/align/addAttribute",(function(e){return Object(N.has)(e.attributes,["align","type"])?e:(Wd(e,"align")&&(e.attributes=Object(N.assign)(e.attributes,{align:{type:"string"}})),e)})),Br("editor.BlockListBlock","core/editor/align/with-data-align",TE),Br("editor.BlockEdit","core/editor/align/with-toolbar-controls",CE),Br("blocks.getSaveContent.extraProps","core/align/addAssignedAlign",(function(e,t,n){var r=n.align,o=Ud(t,"align"),i=Wd(t,"alignWide",!0);return Object(N.includes)(EE(o,i),r)&&(e.className=Pn()("align".concat(r),e.className)),e}));var xE=/[\s#]/g;var DE=Ab((function(e){return function(t){return Wd(t.name,"anchor")&&t.isSelected?Object(I.createElement)(I.Fragment,null,Object(I.createElement)(e,t),Object(I.createElement)($O,null,Object(I.createElement)(Os,{label:he("HTML Anchor"),help:he("Anchors lets you link directly to a section on a page."),value:t.attributes.anchor||"",onChange:function(e){e=e.replace(xE,"-"),t.setAttributes({anchor:e})}}))):Object(I.createElement)(e,t)}}),"withInspectorControl");Br("blocks.registerBlockType","core/anchor/attribute",(function(e){return Object(N.has)(e.attributes,["anchor","type"])?e:(Wd(e,"anchor")&&(e.attributes=Object(N.assign)(e.attributes,{anchor:{type:"string",source:"attribute",attribute:"id",selector:"*"}})),e)})),Br("editor.BlockEdit","core/editor/anchor/with-inspector-control",DE),Br("blocks.getSaveContent.extraProps","core/anchor/save-props",(function(e,t,n){return Wd(t,"anchor")&&(e.id=""===n.anchor?null:n.anchor),e}));var ME=Ab((function(e){return function(t){return Wd(t.name,"customClassName",!0)&&t.isSelected?Object(I.createElement)(I.Fragment,null,Object(I.createElement)(e,t),Object(I.createElement)($O,null,Object(I.createElement)(Os,{label:he("Additional CSS Class(es)"),value:t.attributes.className||"",onChange:function(e){t.setAttributes({className:""!==e?e:void 0})},help:he("Separate multiple classes with spaces.")}))):Object(I.createElement)(e,t)}}),"withInspectorControl");function jE(e){var t=Th(e="".concat(e,"
"),{type:"string",source:"attribute",selector:"[data-custom-class-name] > *",attribute:"class"});return t?t.trim().split(/\s+/):[]}Br("blocks.registerBlockType","core/custom-class-name/attribute",(function(e){return Wd(e,"customClassName",!0)&&(e.attributes=Object(N.assign)(e.attributes,{className:{type:"string"}})),e})),Br("editor.BlockEdit","core/editor/custom-class-name/with-inspector-control",ME),Br("blocks.getSaveContent.extraProps","core/custom-class-name/save-props",(function(e,t,n){return Wd(t,"customClassName",!0)&&n.className&&(e.className=Pn()(e.className,n.className)),e})),Br("blocks.getBlockAttributes","core/custom-class-name/addParsedDifference",(function(e,t,n){if(Wd(t,"customClassName",!0)){var r=Hf(t,Object(N.omit)(e,["className"])),o=jE(r),i=jE(n),a=Object(N.difference)(i,o);a.length?e.className=a.join(" "):r&&delete e.className}return e})),Br("blocks.getSaveContent.extraProps","core/generated-class-name/save-props",(function(e,t){return Wd(t,"className",!0)&&("string"==typeof e.className?e.className=Object(N.uniq)([zf(t.name)].concat(lt(e.className.split(" ")))).join(" ").trim():e.className=zf(t.name)),e}));n(132);var IE=n(49),PE=n.n(IE),NE=RE;function RE(e){this.options=e||{}}RE.prototype.emit=function(e){return e},RE.prototype.visit=function(e){return this[e.type](e)},RE.prototype.mapVisit=function(e,t){var n="";t=t||"";for(var r=0,o=e.length;r0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_PLANS":return t.plans}return e},actions:VE,selectors:{getPlan:function(e,t){return e.find((function(e){return e.product_slug===t}))}},controls:{FETCH_FROM_API:function(e){var t=e.url;return fetch(t).then((function(e){return e.json()}))}},resolvers:{getPlan:regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return"https://public-api.wordpress.com/rest/v1.5/plans",e.next=3,VE.fetchFromAPI("https://public-api.wordpress.com/rest/v1.5/plans");case 3:return t=e.sent,e.abrupt("return",VE.setPlans(t));case 5:case"end":return e.stop()}}),e)}))}});n(242);var BE=function(e){var t=e.planName,n=e.trackEvent,r=e.upgradeUrl;return Object(I.createElement)(zE,{buttonLabel:he("Upgrade","jetpack"),icon:Object(I.createElement)(fe.a,{className:"jetpack-upgrade-nudge__icon",size:18,"aria-hidden":"true",role:"img",focusable:"false"}),href:r,onClick:n,title:t?me(he("Upgrade to %(planName)s to use this block on your site.","jetpack"),{planName:t}):he("Upgrade to a paid plan to use this block on your site.","jetpack"),subtitle:he("You can try it out before upgrading, but only you will see it. It will be hidden from your visitors until you upgrade.","jetpack")})},UE=(Object(N.flowRight)([hn((function(e,t){var n=t.plan,r=e("wordpress-com/plans").getPlan(n),o=Object(N.startsWith)(n,"jetpack_")?n.substr("jetpack_".length):Object(N.get)(r,["path_slug"]),i=e("core/editor").getCurrentPostId(),a=e("core/editor").getCurrentPostType(),s=["page","post"].includes(a)?"":"edit",c="simple"===HE()?ye("/"+Object(N.compact)([s,a,FE(),i]).join("/"),{plan_upgraded:1}):ye(window.location.protocol+"//".concat(FE().replace("::","/"),"/wp-admin/post.php"),{action:"edit",post:i,plan_upgraded:1}),l=o&&ye("https://wordpress.com/checkout/".concat(FE(),"/").concat(o),{redirect_to:c});return{trackEvent:function(e){En.tracks.recordEvent("jetpack_editor_block_upgrade_click",{plan:r,block:e})},planName:Object(N.get)(r,["product_name"]),upgradeUrl:l}}))])(BE),n(243),Object(ue.renderToStaticMarkup)(Object(I.createElement)(BE,{planName:"#planName#",upgradeUrl:"#upgradeUrl#"})));t.default=function(){return{"upgrade-nudge.html":UE}}}]);