this.wp=this.wp||{},this.wp.blockEditor=function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=357)}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},10:function(e,t,n){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,"a",function(){return o})},11:function(e,t,n){"use strict";n.d(t,"a",function(){return i});var o=n(32),r=n(3);function i(e,t){return!t||"object"!==Object(o.a)(t)&&"function"!=typeof t?Object(r.a)(e):t}},111:function(e,t,n){"use strict";var o,r=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||Object.assign||function(e){for(var t,n=1,o=arguments.length;n-1},get:function(e){return o[n.indexOf(e)]},set:function(e,t){-1===n.indexOf(e)&&(n.push(e),o.push(t))},delete:function(e){var t=n.indexOf(e);t>-1&&(n.splice(t,1),o.splice(t,1))}}),i=function(e){return new Event(e,{bubbles:!0})};try{new Event("test")}catch(e){i=function(e){var t=document.createEvent("Event");return t.initEvent(e,!0,!1),t}}function c(e){if(e&&e.nodeName&&"TEXTAREA"===e.nodeName&&!r.has(e)){var t=null,n=null,o=null,c=function(){e.clientWidth!==n&&d()},a=function(t){window.removeEventListener("resize",c,!1),e.removeEventListener("input",d,!1),e.removeEventListener("keyup",d,!1),e.removeEventListener("autosize:destroy",a,!1),e.removeEventListener("autosize:update",d,!1),Object.keys(t).forEach(function(n){e.style[n]=t[n]}),r.delete(e)}.bind(e,{height:e.style.height,resize:e.style.resize,overflowY:e.style.overflowY,overflowX:e.style.overflowX,wordWrap:e.style.wordWrap});e.addEventListener("autosize:destroy",a,!1),"onpropertychange"in e&&"oninput"in e&&e.addEventListener("keyup",d,!1),window.addEventListener("resize",c,!1),e.addEventListener("input",d,!1),e.addEventListener("autosize:update",d,!1),e.style.overflowX="hidden",e.style.wordWrap="break-word",r.set(e,{destroy:a,update:d}),"vertical"===(l=window.getComputedStyle(e,null)).resize?e.style.resize="none":"both"===l.resize&&(e.style.resize="horizontal"),t="content-box"===l.boxSizing?-(parseFloat(l.paddingTop)+parseFloat(l.paddingBottom)):parseFloat(l.borderTopWidth)+parseFloat(l.borderBottomWidth),isNaN(t)&&(t=0),d()}var l;function s(t){var n=e.style.width;e.style.width="0px",e.offsetWidth,e.style.width=n,e.style.overflowY=t}function u(){if(0!==e.scrollHeight){var o=function(e){for(var t=[];e&&e.parentNode&&e.parentNode instanceof Element;)e.parentNode.scrollTop&&t.push({node:e.parentNode,scrollTop:e.parentNode.scrollTop}),e=e.parentNode;return t}(e),r=document.documentElement&&document.documentElement.scrollTop;e.style.height="",e.style.height=e.scrollHeight+t+"px",n=e.clientWidth,o.forEach(function(e){e.node.scrollTop=e.scrollTop}),r&&(document.documentElement.scrollTop=r)}}function d(){u();var t=Math.round(parseFloat(e.style.height)),n=window.getComputedStyle(e,null),r="content-box"===n.boxSizing?Math.round(parseFloat(n.height)):e.offsetHeight;if(r0?!0===c?o.scrollTop(t,O.top+k.top):!1===c?o.scrollTop(t,O.top+j.top):k.top<0?o.scrollTop(t,O.top+k.top):o.scrollTop(t,O.top+j.top):i||((c=void 0===c||!!c)?o.scrollTop(t,O.top+k.top):o.scrollTop(t,O.top+j.top)),r&&(k.left<0||j.left>0?!0===a?o.scrollLeft(t,O.left+k.left):!1===a?o.scrollLeft(t,O.left+j.left):k.left<0?o.scrollLeft(t,O.left+k.left):o.scrollLeft(t,O.left+j.left):i||((a=void 0===a||!!a)?o.scrollLeft(t,O.left+k.left):o.scrollLeft(t,O.left+j.left)))}},116:function(e,t,n){"use strict";var o=Object.assign||function(e){for(var t=1;t All rights reserved. Redistribution and use of this software in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Kevin Decker nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. @license */ var o;o=function(){return function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={exports:{},id:o,loaded:!1};return e[o].call(r.exports,r,r.exports,n),r.loaded=!0,r.exports}return n.m=e,n.c=t,n.p="",n(0)}([function(e,t,n){"use strict";t.__esModule=!0,t.canonicalize=t.convertChangesToXML=t.convertChangesToDMP=t.merge=t.parsePatch=t.applyPatches=t.applyPatch=t.createPatch=t.createTwoFilesPatch=t.structuredPatch=t.diffArrays=t.diffJson=t.diffCss=t.diffSentences=t.diffTrimmedLines=t.diffLines=t.diffWordsWithSpace=t.diffWords=t.diffChars=t.Diff=void 0;var o,r=n(1),i=(o=r)&&o.__esModule?o:{default:o},c=n(2),a=n(3),l=n(5),s=n(6),u=n(7),d=n(8),b=n(9),f=n(10),p=n(11),h=n(13),v=n(14),m=n(16),g=n(17);t.Diff=i.default,t.diffChars=c.diffChars,t.diffWords=a.diffWords,t.diffWordsWithSpace=a.diffWordsWithSpace,t.diffLines=l.diffLines,t.diffTrimmedLines=l.diffTrimmedLines,t.diffSentences=s.diffSentences,t.diffCss=u.diffCss,t.diffJson=d.diffJson,t.diffArrays=b.diffArrays,t.structuredPatch=v.structuredPatch,t.createTwoFilesPatch=v.createTwoFilesPatch,t.createPatch=v.createPatch,t.applyPatch=f.applyPatch,t.applyPatches=f.applyPatches,t.parsePatch=p.parsePatch,t.merge=h.merge,t.convertChangesToDMP=m.convertChangesToDMP,t.convertChangesToXML=g.convertChangesToXML,t.canonicalize=d.canonicalize},function(e,t){"use strict";function n(){}function o(e,t,n,o,r){for(var i=0,c=t.length,a=0,l=0;ie.length?n:e}),s.value=e.join(d)}else s.value=e.join(n.slice(a,a+s.count));a+=s.count,s.added||(l+=s.count)}}var b=t[c-1];return c>1&&"string"==typeof b.value&&(b.added||b.removed)&&e.equals("",b.value)&&(t[c-2].value+=b.value,t.pop()),t}t.__esModule=!0,t.default=n,n.prototype={diff:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.callback;"function"==typeof n&&(r=n,n={}),this.options=n;var i=this;function c(e){return r?(setTimeout(function(){r(void 0,e)},0),!0):e}e=this.castInput(e),t=this.castInput(t),e=this.removeEmpty(this.tokenize(e));var a=(t=this.removeEmpty(this.tokenize(t))).length,l=e.length,s=1,u=a+l,d=[{newPos:-1,components:[]}],b=this.extractCommon(d[0],t,e,0);if(d[0].newPos+1>=a&&b+1>=l)return c([{value:this.join(t),count:t.length}]);function f(){for(var n=-1*s;n<=s;n+=2){var r=void 0,u=d[n-1],b=d[n+1],f=(b?b.newPos:0)-n;u&&(d[n-1]=void 0);var p=u&&u.newPos+1=a&&f+1>=l)return c(o(i,r.components,t,e,i.useLongestToken));d[n]=r}else d[n]=void 0}var v;s++}if(r)!function e(){setTimeout(function(){if(s>u)return r();f()||e()},0)}();else for(;s<=u;){var p=f();if(p)return p}},pushComponent:function(e,t,n){var o=e[e.length-1];o&&o.added===t&&o.removed===n?e[e.length-1]={count:o.count+1,added:t,removed:n}:e.push({count:1,added:t,removed:n})},extractCommon:function(e,t,n,o){for(var r=t.length,i=n.length,c=e.newPos,a=c-o,l=0;c+12&&void 0!==arguments[2]?arguments[2]:{};if("string"==typeof t&&(t=(0,r.parsePatch)(t)),Array.isArray(t)){if(t.length>1)throw new Error("applyPatch only works with a single input.");t=t[0]}var o=e.split(/\r\n|[\n\v\f\r\x85]/),i=e.match(/\r\n|[\n\v\f\r\x85]/g)||[],a=t.hunks,l=n.compareLine||function(e,t,n,o){return t===o},s=0,u=n.fuzzFactor||0,d=0,b=0,f=void 0,p=void 0;function h(e,t){for(var n=0;n0?r[0]:" ",c=r.length>0?r.substr(1):r;if(" "===i||"-"===i){if(!l(t+1,o[t],i,c)&&++s>u)return!1;t++}}return!0}for(var v=0;v0?w[0]:" ",T=w.length>0?w.substr(1):w,B=S.linedelimiters[E];if(" "===I)C++;else if("-"===I)o.splice(C,1),i.splice(C,1);else if("+"===I)o.splice(C,0,T),i.splice(C,0,B),C++;else if("\\"===I){var x=S.lines[E-1]?S.lines[E-1][0]:null;"+"===x?f=!0:"-"===x&&(p=!0)}}}if(f)for(;!o[o.length-1];)o.pop(),i.pop();else p&&(o.push(""),i.push("\n"));for(var L=0;L1&&void 0!==arguments[1]?arguments[1]:{},n=e.split(/\r\n|[\n\v\f\r\x85]/),o=e.match(/\r\n|[\n\v\f\r\x85]/g)||[],r=[],i=0;function c(){var e={};for(r.push(e);i0?u(a.lines.slice(-l.context)):[],b-=p.length,f-=p.length)}(c=p).push.apply(c,r(o.map(function(e){return(t.added?"+":"-")+e}))),t.added?v+=o.length:h+=o.length}else{if(b)if(o.length<=2*l.context&&e=s.length-2&&o.length<=l.context){var j=/\n$/.test(n),y=/\n$/.test(i);0!=o.length||j?j&&y||p.push("\\ No newline at end of file"):p.splice(k.oldLines,0,"\\ No newline at end of file")}d.push(k),b=0,f=0,p=[]}h+=o.length,v+=o.length}},g=0;ge.length)return!1;for(var n=0;n/g,">")).replace(/"/g,""")}t.__esModule=!0,t.convertChangesToXML=function(e){for(var t=[],o=0;o"):r.removed&&t.push(""),t.push(n(r.value)),r.added?t.push(""):r.removed&&t.push("")}return t.join("")}}])},e.exports=o()},21:function(e,t,n){"use strict";function o(e,t){if(null==e)return{};var n,o,r=function(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}n.d(t,"a",function(){return o})},23:function(e,t,n){e.exports=n(54)},24:function(e,t){!function(){e.exports=this.wp.dom}()},25:function(e,t){!function(){e.exports=this.wp.url}()},26:function(e,t){!function(){e.exports=this.wp.hooks}()},27:function(e,t){!function(){e.exports=this.React}()},28:function(e,t,n){"use strict";var o=n(37);var r=n(38);function i(e,t){return Object(o.a)(e)||function(e,t){var n=[],o=!0,r=!1,i=void 0;try{for(var c,a=e[Symbol.iterator]();!(o=(c=a.next()).done)&&(n.push(c.value),!t||n.length!==t);o=!0);}catch(e){r=!0,i=e}finally{try{o||null==a.return||a.return()}finally{if(r)throw i}}return n}(e,t)||Object(r.a)()}n.d(t,"a",function(){return i})},3:function(e,t,n){"use strict";function o(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.d(t,"a",function(){return o})},30:function(e,t,n){"use strict";var o,r;function i(e){return[e]}function c(){var e={clear:function(){e.head=null}};return e}function a(e,t,n){var o;if(e.length!==t.length)return!1;for(o=n;o3&&void 0!==arguments[3]?arguments[3]:1,r=Object(d.a)(e);return r.splice(t,o),m(r,e.slice(t,t+o),n)}function O(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=Object(b.a)({},t,[]);return e.forEach(function(e){var o=e.clientId,r=e.innerBlocks;n[t].push(o),Object.assign(n,O(r,o))}),n}function k(e,t){for(var n={},o=Object(d.a)(e);o.length;){var r=o.shift(),i=r.innerBlocks,c=Object(u.a)(r,["innerBlocks"]);o.push.apply(o,Object(d.a)(i)),n[c.clientId]=t(c)}return n}function j(e){return k(e,function(e){return Object(f.omit)(e,"attributes")})}function y(e){return k(e,function(e){return e.attributes})}function _(e,t){return"UPDATE_BLOCK_ATTRIBUTES"===e.type&&void 0!==t&&"UPDATE_BLOCK_ATTRIBUTES"===t.type&&e.clientId===t.clientId&&(n=e.attributes,o=t.attributes,Object(f.isEqual)(Object(f.keys)(n),Object(f.keys)(o)));var n,o}var S=Object(f.flow)(l.combineReducers,function(e){return function(t,n){if(t&&"REMOVE_BLOCKS"===n.type){for(var o=Object(d.a)(n.clientIds),r=0;r1&&void 0!==arguments[1]?arguments[1]:"";return Object(f.reduce)(t[n],function(n,o){return[].concat(Object(d.a)(n),[o],Object(d.a)(e(t,o)))},[])}(t.order);return Object(s.a)({},t,{byClientId:Object(s.a)({},Object(f.omit)(t.byClientId,o),j(n.blocks)),attributes:Object(s.a)({},Object(f.omit)(t.attributes,o),y(n.blocks)),order:Object(s.a)({},Object(f.omit)(t.order,o),O(n.blocks))})}return e(t,n)}},function(e){return function(t,n){if(t&&"SAVE_REUSABLE_BLOCK_SUCCESS"===n.type){var o=n.id,r=n.updatedId;if(o===r)return t;(t=Object(s.a)({},t)).attributes=Object(f.mapValues)(t.attributes,function(e,n){return"core/block"===t.byClientId[n].name&&e.ref===o?Object(s.a)({},e,{ref:r}):e})}return e(t,n)}},function(e){var t;return function(n,o){var r=e(n,o),i="MARK_LAST_CHANGE_AS_PERSISTENT"===o.type;if(n===r&&!i){var c=Object(f.get)(n,["isPersistentChange"],!0);return n.isPersistentChange===c?n:Object(s.a)({},r,{isPersistentChange:c})}return r=Object(s.a)({},r,{isPersistentChange:i||!_(o,t)}),t=o,r}},function(e){var t=new Set(["RECEIVE_BLOCKS"]);return function(n,o){var r=e(n,o);return r!==n&&(r.isIgnoredChange=t.has(o.type)),r}})({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 j(t.blocks);case"RECEIVE_BLOCKS":return Object(s.a)({},e,j(t.blocks));case"UPDATE_BLOCK":if(!e[t.clientId])return e;var n=Object(f.omit)(t.updates,"attributes");return Object(f.isEmpty)(n)?e:Object(s.a)({},e,Object(b.a)({},t.clientId,Object(s.a)({},e[t.clientId],n)));case"INSERT_BLOCKS":return Object(s.a)({},e,j(t.blocks));case"REPLACE_BLOCKS":return t.blocks?Object(s.a)({},Object(f.omit)(e,t.clientIds),j(t.blocks)):e;case"REMOVE_BLOCKS":return Object(f.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 y(t.blocks);case"RECEIVE_BLOCKS":return Object(s.a)({},e,y(t.blocks));case"UPDATE_BLOCK":return e[t.clientId]&&t.updates.attributes?Object(s.a)({},e,Object(b.a)({},t.clientId,Object(s.a)({},e[t.clientId],t.updates.attributes))):e;case"UPDATE_BLOCK_ATTRIBUTES":if(!e[t.clientId])return e;var n=Object(f.reduce)(t.attributes,function(n,o,r){var i,c;return o!==n[r]&&((n=(i=e[t.clientId])===(c=n)?Object(s.a)({},i):c)[r]=o),n},e[t.clientId]);return n===e[t.clientId]?e:Object(s.a)({},e,Object(b.a)({},t.clientId,n));case"INSERT_BLOCKS":return Object(s.a)({},e,y(t.blocks));case"REPLACE_BLOCKS":return t.blocks?Object(s.a)({},Object(f.omit)(e,t.clientIds),y(t.blocks)):e;case"REMOVE_BLOCKS":return Object(f.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 O(t.blocks);case"RECEIVE_BLOCKS":return Object(s.a)({},e,Object(f.omit)(O(t.blocks),""));case"INSERT_BLOCKS":var n=t.rootClientId,o=void 0===n?"":n,r=e[o]||[],i=O(t.blocks,o),c=t.index,a=void 0===c?r.length:c;return Object(s.a)({},e,i,Object(b.a)({},o,m(r,i[o],a)));case"MOVE_BLOCK_TO_POSITION":var l,u=t.fromRootClientId,p=void 0===u?"":u,h=t.toRootClientId,v=void 0===h?"":h,k=t.clientId,j=t.index,y=void 0===j?e[v].length:j;if(p===v){var _=e[v].indexOf(k);return Object(s.a)({},e,Object(b.a)({},v,g(e[v],_,y)))}return Object(s.a)({},e,(l={},Object(b.a)(l,p,Object(f.without)(e[p],k)),Object(b.a)(l,v,m(e[v],k,y)),l));case"MOVE_BLOCKS_UP":var S=t.clientIds,C=t.rootClientId,E=void 0===C?"":C,w=Object(f.first)(S),I=e[E];if(!I.length||w===Object(f.first)(I))return e;var T=I.indexOf(w);return Object(s.a)({},e,Object(b.a)({},E,g(I,T,T-1,S.length)));case"MOVE_BLOCKS_DOWN":var B=t.clientIds,x=t.rootClientId,L=void 0===x?"":x,N=Object(f.first)(B),M=Object(f.last)(B),R=e[L];if(!R.length||M===Object(f.last)(R))return e;var A=R.indexOf(N);return Object(s.a)({},e,Object(b.a)({},L,g(R,A,A+1,B.length)));case"REPLACE_BLOCKS":var D=t.clientIds;if(!t.blocks)return e;var P=O(t.blocks);return Object(f.flow)([function(e){return Object(f.omit)(e,D)},function(e){return Object(s.a)({},e,Object(f.omit)(P,""))},function(e){return Object(f.mapValues)(e,function(e){return Object(f.reduce)(e,function(e,t){return t===D[0]?[].concat(Object(d.a)(e),Object(d.a)(P[""])):(-1===D.indexOf(t)&&e.push(t),e)},[])})}])(e);case"REMOVE_BLOCKS":return Object(f.flow)([function(e){return Object(f.omit)(e,t.clientIds)},function(e){return Object(f.mapValues)(e,function(e){return f.without.apply(void 0,[e].concat(Object(d.a)(t.clientIds)))})}])(e)}return e}});var C=Object(l.combineReducers)({blocks:S,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]:{start:null,end:null,isMultiSelecting:!1,isEnabled:!0,initialPosition:null},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"CLEAR_SELECTED_BLOCK":return null!==e.start||null!==e.end||e.isMultiSelecting?Object(s.a)({},e,{start:null,end:null,isMultiSelecting:!1,initialPosition:null}):e;case"START_MULTI_SELECT":return e.isMultiSelecting?e:Object(s.a)({},e,{isMultiSelecting:!0,initialPosition:null});case"STOP_MULTI_SELECT":return e.isMultiSelecting?Object(s.a)({},e,{isMultiSelecting:!1,initialPosition:null}):e;case"MULTI_SELECT":return Object(s.a)({},e,{start:t.start,end:t.end,initialPosition:null});case"SELECT_BLOCK":return t.clientId===e.start&&t.clientId===e.end?e:Object(s.a)({},e,{start:t.clientId,end:t.clientId,initialPosition:t.initialPosition});case"REPLACE_INNER_BLOCKS":case"INSERT_BLOCKS":return t.updateSelection?Object(s.a)({},e,{start:t.blocks[0].clientId,end:t.blocks[0].clientId,initialPosition:null,isMultiSelecting:!1}):e;case"REMOVE_BLOCKS":return t.clientIds&&t.clientIds.length&&-1!==t.clientIds.indexOf(e.start)?Object(s.a)({},e,{start:null,end:null,initialPosition:null,isMultiSelecting:!1}):e;case"REPLACE_BLOCKS":if(-1===t.clientIds.indexOf(e.start))return e;var n=Object(f.last)(t.blocks),o=n?n.clientId:null;return o===e.start&&o===e.end?e:Object(s.a)({},e,{start:o,end:o,initialPosition:null,isMultiSelecting:!1});case"TOGGLE_SELECTION":return Object(s.a)({},e,{isEnabled:t.isSelectionEnabled})}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 Object(s.a)({},e,Object(b.a)({},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(f.omit)(e,t.clientIds);case"UPDATE_BLOCK_LIST_SETTINGS":var n=t.clientId;return t.settings?Object(f.isEqual)(e[n],t.settings)?e:Object(s.a)({},e,Object(b.a)({},n,t.settings)):e.hasOwnProperty(n)?Object(f.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 Object(s.a)({},e,{isValid:t.isValid})}return e},settings:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:v,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"UPDATE_SETTINGS":return Object(s.a)({},e,t.settings)}return e},preferences:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:h,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 o=n.name,r={name:n.name};return Object(i.isReusableBlock)(n)&&(r.ref=n.attributes.ref,o+="/"+n.attributes.ref),Object(s.a)({},e,{insertUsage:Object(s.a)({},e.insertUsage,Object(b.a)({},o,{time:t.time,count:e.insertUsage[o]?e.insertUsage[o].count+1:1,insert:r}))})},e)}return e}}),E=n(70),w=n.n(E),I=n(97),T=n.n(I),B=n(28),x=n(48),L=n(23),N=n.n(L);function M(e,t){for(var n=arguments.length,o=new Array(n>2?n-2:0),r=2;r1&&void 0!==arguments[1]?arguments[1]:null,clientId:e}}function $(e){var t;return N.a.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,M("core/block-editor","getPreviousBlockClientId",e);case 2:return t=n.sent,n.next=5,Y(t,-1);case 5:case"end":return n.stop()}},D,this)}function X(e){var t;return N.a.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,M("core/block-editor","getNextBlockClientId",e);case 2:return t=n.sent,n.next=5,Y(t);case 5:case"end":return n.stop()}},P,this)}function J(){return{type:"START_MULTI_SELECT"}}function Z(){return{type:"STOP_MULTI_SELECT"}}function Q(e,t){return{type:"MULTI_SELECT",start:e,end:t}}function ee(){return{type:"CLEAR_SELECTED_BLOCK"}}function te(){return{type:"TOGGLE_SELECTION",isSelectionEnabled:!(arguments.length>0&&void 0!==arguments[0])||arguments[0]}}function ne(e,t){var n,o,r;return N.a.wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return e=Object(f.castArray)(e),t=Object(f.castArray)(t),i.next=4,M("core/block-editor","getBlockRootClientId",Object(f.first)(e));case 4:n=i.sent,o=0;case 6:if(!(o3&&void 0!==arguments[3])||arguments[3])}function se(e,t,n){var o,r,i,c,a,l,s,u,d=arguments;return N.a.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:o=!(d.length>3&&void 0!==d[3])||d[3],e=Object(f.castArray)(e),r=[],i=!0,c=!1,a=void 0,b.prev=6,l=e[Symbol.iterator]();case 8:if(i=(s=l.next()).done){b.next=17;break}return u=s.value,b.next=12,M("core/block-editor","canInsertBlockType",u.name,n);case 12:b.sent&&r.push(u);case 14:i=!0,b.next=8;break;case 17:b.next=23;break;case 19:b.prev=19,b.t0=b.catch(6),c=!0,a=b.t0;case 23:b.prev=23,b.prev=24,i||null==l.return||l.return();case 26:if(b.prev=26,!c){b.next=29;break}throw a;case 29:return b.finish(26);case 30:return b.finish(23);case 31:if(!r.length){b.next=33;break}return b.abrupt("return",{type:"INSERT_BLOCKS",blocks:r,index:t,rootClientId:n,time:Date.now(),updateSelection:o});case 33:case"end":return b.stop()}},U,this,[[6,19,23,31],[24,,26,30]])}function ue(e,t){return{type:"SHOW_INSERTION_POINT",rootClientId:e,index:t}}function de(){return{type:"HIDE_INSERTION_POINT"}}function be(e){return{type:"SET_TEMPLATE_VALIDITY",isValid:e}}function fe(){return{type:"SYNCHRONIZE_TEMPLATE"}}function pe(e,t){return{type:"MERGE_BLOCKS",blocks:[e,t]}}function he(e){var t,n=arguments;return N.a.wrap(function(o){for(;;)switch(o.prev=o.next){case 0:if(t=!(n.length>1&&void 0!==n[1])||n[1],e=Object(f.castArray)(e),!t){o.next=5;break}return o.next=5,$(e[0]);case 5:return o.next=7,{type:"REMOVE_BLOCKS",clientIds:e};case 7:return o.delegateYield(z(),"t0",8);case 8:case"end":return o.stop()}},V,this)}function ve(e,t){return he([e],t)}function me(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 ge(e){return{type:"TOGGLE_BLOCK_MODE",clientId:e}}function Oe(){return{type:"START_TYPING"}}function ke(){return{type:"STOP_TYPING"}}function je(){return{type:"ENTER_FORMATTED_TEXT"}}function ye(){return{type:"EXIT_FORMATTED_TEXT"}}function _e(e,t,n){return le(Object(i.createBlock)(Object(i.getDefaultBlockName)(),e),n,t)}function Se(e,t){return{type:"UPDATE_BLOCK_LIST_SETTINGS",clientId:e,settings:t}}function Ce(e){return{type:"UPDATE_SETTINGS",settings:e}}function Ee(e,t){return{type:"SAVE_REUSABLE_BLOCK_SUCCESS",id:e,updatedId:t}}function we(){return{type:"MARK_LAST_CHANGE_AS_PERSISTENT"}}var Ie=n(30),Te=3,Be=2,xe=1,Le=0,Ne=[],Me={},Re=Object(Ie.a)(function(){return[]},function(e,t){return Object(f.map)(ht(e,t),function(t){return Fe(e,t)})});function Ae(e,t){var n=e.blocks.byClientId[t];return n?n.name:null}function De(e,t){var n=e.blocks.byClientId[t];return!!n&&n.isValid}var Pe=Object(Ie.a)(function(e,t){var n=e.blocks.byClientId[t];if(!n)return null;var o=e.blocks.attributes[t],r=Object(i.getBlockType)(n.name);return r&&(o=Object(f.reduce)(r.attributes,function(t,n,r){return"meta"===n.source&&(t===o&&(t=Object(s.a)({},t)),t[r]=Vt(e,n.meta)),t},o)),o},function(e,t){return[e.blocks.byClientId[t],e.blocks.attributes[t],Vt(e)]}),Fe=Object(Ie.a)(function(e,t){var n=e.blocks.byClientId[t];return n?Object(s.a)({},n,{attributes:Pe(e,t),innerBlocks:Ue(e,t)}):null},function(e,t){return[].concat(Object(d.a)(Pe.getDependants(e,t)),[Re(e,t)])}),He=Object(Ie.a)(function(e,t){var n=e.blocks.byClientId[t];return n?Object(s.a)({},n,{attributes:Pe(e,t)}):null},function(e,t){return[e.blocks.byClientId[t]].concat(Object(d.a)(Pe.getDependants(e,t)))}),Ue=Object(Ie.a)(function(e,t){return Object(f.map)(ht(e,t),function(t){return Fe(e,t)})},function(e){return[e.blocks.byClientId,e.blocks.order,e.blocks.attributes]}),Ve=function e(t,n){return Object(f.flatMap)(n,function(n){var o=ht(t,n);return[].concat(Object(d.a)(o),Object(d.a)(e(t,o)))})},ze=Object(Ie.a)(function(e){var t=ht(e);return[].concat(Object(d.a)(t),Object(d.a)(Ve(e,t)))},function(e){return[e.blocks.order]}),Ke=Object(Ie.a)(function(e,t){var n=ze(e);return t?Object(f.reduce)(n,function(n,o){return e.blocks.byClientId[o].name===t?n+1:n},0):n.length},function(e){return[e.blocks.order,e.blocks.byClientId]}),We=Object(Ie.a)(function(e,t){return Object(f.map)(Object(f.castArray)(t),function(t){return Fe(e,t)})},function(e){return[Vt(e),e.blocks.byClientId,e.blocks.order,e.blocks.attributes]});function Ge(e,t){return ht(e,t).length}function qe(e){return e.blockSelection.start}function Ye(e){return e.blockSelection.end}function $e(e){var t=it(e).length;return t||(e.blockSelection.start?1:0)}function Xe(e){var t=e.blockSelection,n=t.start,o=t.end;return!!n&&n===o}function Je(e){var t=e.blockSelection,n=t.start,o=t.end;return n&&n===o&&e.blocks.byClientId[n]?n:null}function Ze(e){var t=Je(e);return t?Fe(e,t):null}var Qe=Object(Ie.a)(function(e,t){var n=e.blocks.order;for(var o in n)if(Object(f.includes)(n[o],t))return o;return null},function(e){return[e.blocks.order]}),et=Object(Ie.a)(function(e,t){for(var n=t,o=t;n;)n=Qe(e,o=n);return o},function(e){return[e.blocks.order]});function tt(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;if(void 0===t&&(t=Je(e)),void 0===t&&(t=n<0?at(e):lt(e)),!t)return null;var o=Qe(e,t);if(null===o)return null;var r=e.blocks.order[o],i=r.indexOf(t)+1*n;return i<0?null:i===r.length?null:r[i]}function nt(e,t){return tt(e,t,-1)}function ot(e,t){return tt(e,t,1)}function rt(e){var t=e.blockSelection,n=t.start;return n===t.end&&n?e.blockSelection.initialPosition:null}var it=Object(Ie.a)(function(e){var t=e.blockSelection,n=t.start,o=t.end;if(n===o)return[];var r=Qe(e,n);if(null===r)return[];var i=ht(e,r),c=i.indexOf(n),a=i.indexOf(o);return c>a?i.slice(a,c+1):i.slice(c,a+1)},function(e){return[e.blocks.order,e.blockSelection.start,e.blockSelection.end]}),ct=Object(Ie.a)(function(e){var t=it(e);return t.length?t.map(function(t){return Fe(e,t)}):Ne},function(e){return[].concat(Object(d.a)(it.getDependants(e)),[e.blocks.byClientId,e.blocks.order,e.blocks.attributes,Vt(e)])});function at(e){return Object(f.first)(it(e))||null}function lt(e){return Object(f.last)(it(e))||null}var st=Object(Ie.a)(function(e,t,n){for(var o=n;t!==o&&o;)o=Qe(e,o);return t===o},function(e){return[e.blocks.order]});function ut(e,t){return at(e)===t}function dt(e,t){return-1!==it(e).indexOf(t)}var bt=Object(Ie.a)(function(e,t){for(var n=t,o=!1;n&&!o;)o=dt(e,n=Qe(e,n));return o},function(e){return[e.blocks.order,e.blockSelection.start,e.blockSelection.end]});function ft(e){var t=e.blockSelection,n=t.start;return n===t.end?null:n||null}function pt(e){var t=e.blockSelection,n=t.start,o=t.end;return n===o?null:o||null}function ht(e,t){return e.blocks.order[t||""]||Ne}function vt(e,t,n){return ht(e,n).indexOf(t)}function mt(e,t){var n=e.blockSelection,o=n.start;return o===n.end&&o===t}function gt(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return Object(f.some)(ht(e,t),function(t){return mt(e,t)||dt(e,t)||n&>(e,t,n)})}function Ot(e,t){if(!t)return!1;var n=it(e),o=n.indexOf(t);return o>-1&&o2&&void 0!==arguments[2]?arguments[2]:null,o=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return Object(f.isBoolean)(e)?e:Object(f.isArray)(e)?Object(f.includes)(e,t):n},r=Object(i.getBlockType)(t);if(!r)return!1;if(!o(Ft(e).allowedBlockTypes,t,!0))return!1;if(!!Bt(e,n))return!1;var c=Pt(e,n),a=o(Object(f.get)(c,["allowedBlocks"]),t),l=o(r.parent,Ae(e,n));return null!==a&&null!==l?a||l:null!==a?a:null===l||l},Lt=Object(Ie.a)(xt,function(e,t,n){return[e.blockListSettings[n],e.blocks.byClientId[n],e.settings.allowedBlockTypes,e.settings.templateLock]});function Nt(e,t){return e.preferences.insertUsage[t]||null}var Mt=function(e,t,n){return!!Object(i.hasBlockSupport)(t,"inserter",!0)&&xt(e,t.name,n)},Rt=function(e,t,n){if(!xt(e,"core/block",n))return!1;var o=Ae(e,t.clientId);return!!o&&(!!Object(i.getBlockType)(o)&&(!!xt(e,o,n)&&!st(e,t.clientId,n)))},At=Object(Ie.a)(function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=function(e,t,n){return n?Te:t>0?Be:"common"===e?xe:Le},o=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}},r=Object(i.getBlockTypes)().filter(function(n){return Mt(e,n,t)}).map(function(t){var r=t.name,c=!1;Object(i.hasBlockSupport)(t.name,"multiple",!0)||(c=Object(f.some)(We(e,ze(e)),{name:t.name}));var a=Object(f.isArray)(t.parent),l=Nt(e,r)||{},s=l.time,u=l.count,d=void 0===u?0:u;return{id:r,name:t.name,initialAttributes:{},title:t.title,icon:t.icon,category:t.category,keywords:t.keywords,isDisabled:c,utility:n(t.category,d,a),frecency:o(s,d),hasChildBlocksWithInserterSupport:Object(i.hasChildBlocksWithInserterSupport)(t.name)}}),c=zt(e).filter(function(n){return Rt(e,n,t)}).map(function(t){var r="core/block/".concat(t.id),c=Ae(e,t.clientId),a=Object(i.getBlockType)(c),l=Nt(e,r)||{},s=l.time,u=l.count,d=void 0===u?0:u,b=n("reusable",d,!1),f=o(s,d);return{id:r,name:"core/block",initialAttributes:{ref:t.id},title:t.title,icon:a.icon,category:"reusable",keywords:[],isDisabled:!1,utility:b,frecency:f}});return Object(f.orderBy)([].concat(Object(d.a)(r),Object(d.a)(c)),["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,zt(e),Object(i.getBlockTypes)()]}),Dt=Object(Ie.a)(function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return!!Object(f.some)(Object(i.getBlockTypes)(),function(n){return Mt(e,n,t)})||Object(f.some)(zt(e),function(n){return Rt(e,n,t)})},function(e,t){return[e.blockListSettings[t],e.blocks.byClientId,e.settings.allowedBlockTypes,e.settings.templateLock,zt(e),Object(i.getBlockTypes)()]});function Pt(e,t){return e.blockListSettings[t]}function Ft(e){return e.settings}function Ht(e){return e.blocks.isPersistentChange}function Ut(e){return e.blocks.isIgnoredChange}function Vt(e,t){return void 0===t?Object(f.get)(e,["settings","__experimentalMetaSource","value"],Me):Object(f.get)(e,["settings","__experimentalMetaSource","value",t])}function zt(e){return Object(f.get)(e,["settings","__experimentalReusableBlocks"],Ne)}var Kt={MERGE_BLOCKS:function(e,t){var n=t.dispatch,o=t.getState(),r=Object(B.a)(e.blocks,2),c=r[0],a=r[1],l=Fe(o,c),u=Object(i.getBlockType)(l.name);if(u.merge){var b=Fe(o,a),f=l.name===b.name?[b]:Object(i.switchToBlockType)(b,l.name);if(f&&f.length){var p=u.merge(l.attributes,f[0].attributes);n(Y(l.clientId,-1)),n(ne([l.clientId,b.clientId],[Object(s.a)({},l,{attributes:Object(s.a)({},l.attributes,p)})].concat(Object(d.a)(f.slice(1)))))}}else n(Y(l.clientId))},RESET_BLOCKS:[function(e,t){var n=t.getState(),o=Tt(n),r=Bt(n),c=!o||"all"!==r||Object(i.doBlocksMatchTemplate)(e.blocks,o);if(c!==It(n))return be(c)}],MULTI_SELECT:function(e,t){var n=$e((0,t.getState)());Object(x.speak)(Object(p.sprintf)(Object(p._n)("%s block selected.","%s blocks selected.",n),n),"assertive")},SYNCHRONIZE_TEMPLATE:function(e,t){var n=(0,t.getState)(),o=Ue(n),r=Tt(n);return K(Object(i.synchronizeBlocksWithTemplate)(o,r))}};var Wt=function(e){var t,n=[w()(Kt),T.a],o=function(){throw new Error("Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")},r={getState:e.getState,dispatch:function(){return o.apply(void 0,arguments)}};return t=n.map(function(e){return e(r)}),o=f.flowRight.apply(void 0,Object(d.a)(t))(e.dispatch),e.dispatch=o,e},Gt=Object(l.registerStore)("core/block-editor",{reducer:C,selectors:r,actions:o,controls:R,persist:["preferences"]});Wt(Gt);var qt=n(19),Yt=n(0),$t=n(16),Xt=n.n($t),Jt=n(6),Zt=n(26),Qt=n(10),en=n(9),tn=n(11),nn=n(12),on=n(13),rn=n(3),cn=n(4),an=Object(Yt.createContext)({name:"",isSelected:!1,focusedElement:null,setFocusedElement:f.noop,clientId:null}),ln=an.Consumer,sn=an.Provider,un=function(e){return Object(Jt.createHigherOrderComponent)(function(t){return function(n){return Object(Yt.createElement)(ln,null,function(o){return Object(Yt.createElement)(t,Object(qt.a)({},n,e(o,n)))})}},"withBlockEditContext")},dn=Object(Jt.createHigherOrderComponent)(function(e){return function(t){return Object(Yt.createElement)(ln,null,function(n){return n.isSelected&&Object(Yt.createElement)(e,t)})}},"ifBlockEditSelected"),bn=[];var fn=Object(Jt.compose)([un(function(e){return{blockName:e.name}}),function(e){return function(t){function n(){var e;return Object(Qt.a)(this,n),(e=Object(tn.a)(this,Object(nn.a)(n).call(this))).state={completers:bn},e.saveParentRef=e.saveParentRef.bind(Object(rn.a)(Object(rn.a)(e))),e.onFocus=e.onFocus.bind(Object(rn.a)(Object(rn.a)(e))),e}return Object(on.a)(n,t),Object(en.a)(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,o=n;Object(Zt.hasFilter)("editor.Autocomplete.completers")&&(n=Object(Zt.applyFilters)("editor.Autocomplete.completers",n&&n.map(f.clone),t)),this.setState({lastFilteredCompletersProp:o,completers:n||bn})}},{key:"saveParentRef",value:function(e){this.parentNode=e}},{key:"render",value:function(){var t=this.state.completers,n=Object(s.a)({},this.props,{completers:t});return Object(Yt.createElement)("div",{onFocus:this.onFocus,ref:this.saveParentRef},Object(Yt.createElement)(e,Object(qt.a)({onFocus:this.onFocus},n)))}}]),n}(Yt.Component)}])(cn.Autocomplete),pn=[{icon:"editor-alignleft",title:Object(p.__)("Align text left"),align:"left"},{icon:"editor-aligncenter",title:Object(p.__)("Align text center"),align:"center"},{icon:"editor-alignright",title:Object(p.__)("Align text right"),align:"right"}];var hn=Object(Jt.compose)(un(function(e){return{clientId:e.clientId}}),Object(a.withViewportMatch)({isLargeViewport:"medium"}),Object(l.withSelect)(function(e,t){var n=t.clientId,o=t.isLargeViewport,r=t.isCollapsed,i=e("core/block-editor"),c=i.getBlockRootClientId,a=i.getSettings;return{isCollapsed:r||!o||!a().hasFixedToolbar&&c(n)}}))(function(e){var t=e.isCollapsed,n=e.value,o=e.onChange,r=e.alignmentControls,i=void 0===r?pn:r;function c(e){return function(){return o(n===e?void 0:e)}}var a=Object(f.find)(i,function(e){return e.align===n});return Object(Yt.createElement)(cn.Toolbar,{isCollapsed:t,icon:a?a.icon:"editor-alignleft",label:Object(p.__)("Change Text Alignment"),controls:i.map(function(e){var t=e.align,o=n===t;return Object(s.a)({},e,{isActive:o,onClick:c(t)})})})}),vn={left:{icon:"align-left",title:Object(p.__)("Align left")},center:{icon:"align-center",title:Object(p.__)("Align center")},right:{icon:"align-right",title:Object(p.__)("Align right")},wide:{icon:"align-wide",title:Object(p.__)("Wide width")},full:{icon:"align-full-width",title:Object(p.__)("Full width")}},mn=["left","center","right","wide","full"],gn=["wide","full"];var On=Object(Jt.compose)(un(function(e){return{clientId:e.clientId}}),Object(a.withViewportMatch)({isLargeViewport:"medium"}),Object(l.withSelect)(function(e,t){var n=t.clientId,o=t.isLargeViewport,r=t.isCollapsed,i=e("core/block-editor"),c=i.getBlockRootClientId,a=(0,i.getSettings)();return{wideControlsEnabled:a.alignWide,isCollapsed:r||!o||!a.hasFixedToolbar&&c(n)}}))(function(e){var t=e.isCollapsed,n=e.value,o=e.onChange,r=e.controls,i=void 0===r?mn:r,c=e.wideControlsEnabled,a=void 0!==c&&c?i:i.filter(function(e){return-1===gn.indexOf(e)}),l=vn[n];return Object(Yt.createElement)(cn.Toolbar,{isCollapsed:t,icon:l?l.icon:"align-left",label:Object(p.__)("Change Alignment"),controls:a.map(function(e){return Object(s.a)({},vn[e],{isActive:n===e,onClick:(t=e,function(){return o(n===t?void 0:t)})});var t})})}),kn=Object(cn.createSlotFill)("BlockControls"),jn=kn.Fill,yn=kn.Slot,_n=dn(function(e){var t=e.controls,n=e.children;return Object(Yt.createElement)(jn,null,Object(Yt.createElement)(cn.Toolbar,{controls:t}),n)});_n.Slot=yn;var Sn=_n,Cn=Object(cn.withFilters)("editor.BlockEdit")(function(e){var t=e.attributes,n=void 0===t?{}:t,o=e.name,r=Object(i.getBlockType)(o);if(!r)return null;var c=Object(i.hasBlockSupport)(r,"className",!0)?Object(i.getBlockDefaultClassName)(o):null,a=Xt()(c,n.className),l=r.edit||r.save;return Object(Yt.createElement)(l,Object(qt.a)({},e,{className:a}))}),En=function(e){function t(e){var n;return Object(Qt.a)(this,t),(n=Object(tn.a)(this,Object(nn.a)(t).call(this,e))).setFocusedElement=n.setFocusedElement.bind(Object(rn.a)(Object(rn.a)(n))),n.state={focusedElement:null,setFocusedElement:n.setFocusedElement},n}return Object(on.a)(t,e),Object(en.a)(t,[{key:"setFocusedElement",value:function(e){this.setState(function(t){return t.focusedElement===e?null:{focusedElement:e}})}},{key:"render",value:function(){return Object(Yt.createElement)(sn,{value:this.state},Object(Yt.createElement)(Cn,this.props))}}],[{key:"getDerivedStateFromProps",value:function(e){var t=e.clientId;return{name:e.name,isSelected:e.isSelected,clientId:t}}}]),t}(Yt.Component),wn=Object(cn.createSlotFill)("BlockFormatControls"),In=wn.Fill,Tn=wn.Slot,Bn=dn(In);Bn.Slot=Tn;var xn=Bn,Ln=n(18);function Nn(e){var t=e.icon,n=e.showColors,o=void 0!==n&&n,r=e.className;"block-default"===Object(f.get)(t,["src"])&&(t={src:Object(Yt.createElement)(cn.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(Yt.createElement)(cn.Path,{d:"M19 7h-1V5h-4v2h-4V5H6v2H5c-1.1 0-2 .9-2 2v10h18V9c0-1.1-.9-2-2-2zm0 10H5V9h14v8z"}))});var i=Object(Yt.createElement)(cn.Icon,{icon:t&&t.src?t.src:t}),c=o?{backgroundColor:t&&t.background,color:t&&t.foreground}:{};return Object(Yt.createElement)("span",{style:c,className:Xt()("editor-block-icon block-editor-block-icon",r,{"has-colors":o})},i)}function Mn(e){var t=e.blocks,n=e.selectedBlockClientId,o=e.selectBlock,r=e.showNestedBlocks;return Object(Yt.createElement)("ul",{className:"editor-block-navigation__list block-editor-block-navigation__list",role:"list"},Object(f.map)(t,function(e){var t=Object(i.getBlockType)(e.name),c=e.clientId===n;return Object(Yt.createElement)("li",{key:e.clientId},Object(Yt.createElement)("div",{className:"editor-block-navigation__item block-editor-block-navigation__item"},Object(Yt.createElement)(cn.Button,{className:Xt()("editor-block-navigation__item-button block-editor-block-navigation__item-button",{"is-selected":c}),onClick:function(){return o(e.clientId)}},Object(Yt.createElement)(Nn,{icon:t.icon,showColors:!0}),t.title,c&&Object(Yt.createElement)("span",{className:"screen-reader-text"},Object(p.__)("(selected block)")))),r&&!!e.innerBlocks&&!!e.innerBlocks.length&&Object(Yt.createElement)(Mn,{blocks:e.innerBlocks,selectedBlockClientId:n,selectBlock:o,showNestedBlocks:!0}))}))}var Rn=Object(Jt.compose)(Object(l.withSelect)(function(e){var t=e("core/block-editor"),n=t.getSelectedBlockClientId,o=t.getBlockHierarchyRootClientId,r=t.getBlock,i=t.getBlocks,c=n();return{rootBlocks:i(),rootBlock:c?r(o(c)):null,selectedBlockClientId:c}}),Object(l.withDispatch)(function(e,t){var n=t.onSelect,o=void 0===n?f.noop:n;return{selectBlock:function(t){e("core/block-editor").selectBlock(t),o(t)}}}))(function(e){var t=e.rootBlock,n=e.rootBlocks,o=e.selectedBlockClientId,r=e.selectBlock;if(!n||0===n.length)return null;var i=t&&(t.clientId!==o||t.innerBlocks&&0!==t.innerBlocks.length);return Object(Yt.createElement)(cn.NavigableMenu,{role:"presentation",className:"editor-block-navigation__container block-editor-block-navigation__container"},Object(Yt.createElement)("p",{className:"editor-block-navigation__label block-editor-block-navigation__label"},Object(p.__)("Block Navigation")),i&&Object(Yt.createElement)(Mn,{blocks:[t],selectedBlockClientId:o,selectBlock:r,showNestedBlocks:!0}),!i&&Object(Yt.createElement)(Mn,{blocks:n,selectedBlockClientId:o,selectBlock:r}))}),An=Object(Yt.createElement)(cn.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"20",height:"20"},Object(Yt.createElement)(cn.Path,{d:"M5 5H3v2h2V5zm3 8h11v-2H8v2zm9-8H6v2h11V5zM7 11H5v2h2v-2zm0 8h2v-2H7v2zm3-2v2h11v-2H10z"}));var Dn=Object(l.withSelect)(function(e){return{hasBlocks:!!e("core/block-editor").getBlockCount()}})(function(e){var t=e.hasBlocks,n=e.isDisabled,o=t&&!n;return Object(Yt.createElement)(cn.Dropdown,{renderToggle:function(e){var t=e.isOpen,n=e.onToggle;return Object(Yt.createElement)(Yt.Fragment,null,o&&Object(Yt.createElement)(cn.KeyboardShortcuts,{bindGlobal:!0,shortcuts:Object(b.a)({},Ln.rawShortcut.access("o"),n)}),Object(Yt.createElement)(cn.IconButton,{icon:An,"aria-expanded":t,onClick:o?n:void 0,label:Object(p.__)("Block Navigation"),className:"editor-block-navigation block-editor-block-navigation",shortcut:Ln.displayShortcut.access("o"),"aria-disabled":!o}))},renderContent:function(e){var t=e.onClose;return Object(Yt.createElement)(Rn,{onSelect:t})}})}),Pn=Object(Jt.createHigherOrderComponent)(Object(l.withSelect)(function(e,t){var n=e("core/block-editor").getSettings(),o=void 0===t.colors?n.colors:t.colors,r=void 0===t.disableCustomColors?n.disableCustomColors:t.disableCustomColors;return{colors:o,disableCustomColors:r,hasColorsToChoose:!Object(f.isEmpty)(o)||!r}}),"withColorContext"),Fn=Pn(cn.ColorPalette),Hn=n(45),Un=n.n(Hn),Vn=function(e,t,n){if(t){var o=Object(f.find)(e,{slug:t});if(o)return o}return{color:n}},zn=function(e,t){return Object(f.find)(e,{color:t})};function Kn(e,t){if(e&&t)return"has-".concat(Object(f.kebabCase)(t),"-").concat(e)}var Wn=[],Gn=function(e){return Object(Jt.createHigherOrderComponent)(function(t){return function(n){return Object(Yt.createElement)(t,Object(qt.a)({},n,{colors:e}))}},"withCustomColorPalette")},qn=function(){return Object(l.withSelect)(function(e){var t=e("core/block-editor").getSettings();return{colors:Object(f.get)(t,["colors"],Wn)}})};function Yn(e,t){var n=Object(f.reduce)(e,function(e,t){return Object(s.a)({},e,Object(f.isString)(t)?Object(b.a)({},t,Object(f.kebabCase)(t)):t)},{});return Object(Jt.compose)([t,function(e){return function(t){function o(e){var t;return Object(Qt.a)(this,o),(t=Object(tn.a)(this,Object(nn.a)(o).call(this,e))).setters=t.createSetters(),t.colorUtils={getMostReadableColor:t.getMostReadableColor.bind(Object(rn.a)(Object(rn.a)(t)))},t.state={},t}return Object(on.a)(o,t),Object(en.a)(o,[{key:"getMostReadableColor",value:function(e){return function(e,t){return Un.a.mostReadable(t,Object(f.map)(e,"color")).toHexString()}(this.props.colors,e)}},{key:"createSetters",value:function(){var e=this;return Object(f.reduce)(n,function(t,n,o){var r=Object(f.upperFirst)(o),i="custom".concat(r);return t["set".concat(r)]=e.createSetColor(o,i),t},{})}},{key:"createSetColor",value:function(e,t){var n=this;return function(o){var r,i=zn(n.props.colors,o);n.props.setAttributes((r={},Object(b.a)(r,e,i&&i.slug?i.slug:void 0),Object(b.a)(r,t,i&&i.slug?void 0:o),r))}}},{key:"render",value:function(){return Object(Yt.createElement)(e,Object(s.a)({},this.props,{colors:void 0},this.state,this.setters,{colorUtils:this.colorUtils}))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var o=e.attributes,r=e.colors;return Object(f.reduce)(n,function(e,n,i){var c=Vn(r,o[i],o["custom".concat(Object(f.upperFirst)(i))]),a=t[i];return Object(f.get)(a,["color"])===c.color&&a?e[i]=a:e[i]=Object(s.a)({},c,{class:Kn(n,c.slug)}),e},{})}}]),o}(Yt.Component)}])}function $n(e){return function(){for(var t=Gn(e),n=arguments.length,o=new Array(n),r=0;r=24?"large":"small"}))return null;var s=a.getBrightness()1?function(e,t,n,o,r){var i=t+1;if(r<0&&n)return Object(p.__)("Blocks cannot be moved up as they are already at the top");if(r>0&&o)return Object(p.__)("Blocks cannot be moved down as they are already at the bottom");if(r<0&&!n)return Object(p.sprintf)(Object(p._n)("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(r>0&&!o)return Object(p.sprintf)(Object(p._n)("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,o,r,i):o&&r?Object(p.sprintf)(Object(p.__)("Block %s is the only block, and cannot be moved"),t):i>0&&!r?Object(p.sprintf)(Object(p.__)("Move %1$s block from position %2$d down to position %3$d"),t,c,c+1):i>0&&r?Object(p.sprintf)(Object(p.__)("Block %s is at the end of the content and can’t be moved down"),t):i<0&&!o?Object(p.sprintf)(Object(p.__)("Move %1$s block from position %2$d up to position %3$d"),t,c,c-1):i<0&&o?Object(p.sprintf)(Object(p.__)("Block %s is at the beginning of the content and can’t be moved up"),t):void 0}var co=Object(Yt.createElement)(cn.SVG,{width:"18",height:"18",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 18 18"},Object(Yt.createElement)(cn.Polygon,{points:"9,4.5 3.3,10.1 4.8,11.5 9,7.3 13.2,11.5 14.7,10.1 "})),ao=Object(Yt.createElement)(cn.SVG,{width:"18",height:"18",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 18 18"},Object(Yt.createElement)(cn.Polygon,{points:"9,13.5 14.7,7.9 13.2,6.5 9,10.7 4.8,6.5 3.3,7.9 "})),lo=Object(Yt.createElement)(cn.SVG,{width:"18",height:"18",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 18 18"},Object(Yt.createElement)(cn.Path,{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"})),so=Object(l.withSelect)(function(e,t){var n=t.clientId,o=e("core/block-editor"),r=o.getBlockIndex,i=(0,o.getBlockRootClientId)(n);return{index:r(n,i),rootClientId:i}})(function(e){var t=e.children,n=e.clientId,o=e.rootClientId,r=e.blockElementId,i=e.index,c=e.onDragStart,a=e.onDragEnd,l={type:"block",srcIndex:i,srcRootClientId:o,srcClientId:n};return Object(Yt.createElement)(cn.Draggable,{elementId:r,transferData:l,onDragStart:c,onDragEnd:a},function(e){var n=e.onDraggableStart,o=e.onDraggableEnd;return t({onDraggableStart:n,onDraggableEnd:o})})}),uo=function(e){var t=e.isVisible,n=e.className,o=e.icon,r=e.onDragStart,i=e.onDragEnd,c=e.blockElementId,a=e.clientId;if(!t)return null;var l=Xt()("editor-block-mover__control-drag-handle block-editor-block-mover__control-drag-handle",n);return Object(Yt.createElement)(so,{clientId:a,blockElementId:c,onDragStart:r,onDragEnd:i},function(e){var t=e.onDraggableStart,n=e.onDraggableEnd;return Object(Yt.createElement)("div",{className:l,"aria-hidden":"true",onDragStart:t,onDragEnd:n,draggable:!0},o)})},bo=function(e){function t(){var e;return Object(Qt.a)(this,t),(e=Object(tn.a)(this,Object(nn.a)(t).apply(this,arguments))).state={isFocused:!1},e.onFocus=e.onFocus.bind(Object(rn.a)(Object(rn.a)(e))),e.onBlur=e.onBlur.bind(Object(rn.a)(Object(rn.a)(e))),e}return Object(on.a)(t,e),Object(en.a)(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,o=e.isFirst,r=e.isLast,i=e.isDraggable,c=e.onDragStart,a=e.onDragEnd,l=e.clientIds,s=e.blockElementId,u=e.blockType,d=e.firstIndex,b=e.isLocked,h=e.instanceId,v=e.isHidden,m=this.state.isFocused,g=Object(f.castArray)(l).length;return b||o&&r?null:Object(Yt.createElement)("div",{className:Xt()("editor-block-mover block-editor-block-mover",{"is-visible":m||!v})},Object(Yt.createElement)(cn.IconButton,{className:"editor-block-mover__control block-editor-block-mover__control",onClick:o?null:t,icon:co,label:Object(p.__)("Move up"),"aria-describedby":"block-editor-block-mover__up-description-".concat(h),"aria-disabled":o,onFocus:this.onFocus,onBlur:this.onBlur}),Object(Yt.createElement)(uo,{className:"editor-block-mover__control block-editor-block-mover__control",icon:lo,clientId:l,blockElementId:s,isVisible:i,onDragStart:c,onDragEnd:a}),Object(Yt.createElement)(cn.IconButton,{className:"editor-block-mover__control block-editor-block-mover__control",onClick:r?null:n,icon:ao,label:Object(p.__)("Move down"),"aria-describedby":"block-editor-block-mover__down-description-".concat(h),"aria-disabled":r,onFocus:this.onFocus,onBlur:this.onBlur}),Object(Yt.createElement)("span",{id:"block-editor-block-mover__up-description-".concat(h),className:"editor-block-mover__description block-editor-block-mover__description"},io(g,u&&u.title,d,o,r,-1)),Object(Yt.createElement)("span",{id:"block-editor-block-mover__down-description-".concat(h),className:"editor-block-mover__description block-editor-block-mover__description"},io(g,u&&u.title,d,o,r,1)))}}]),t}(Yt.Component),fo=Object(Jt.compose)(Object(l.withSelect)(function(e,t){var n=t.clientIds,o=e("core/block-editor"),r=o.getBlock,c=o.getBlockIndex,a=o.getTemplateLock,l=o.getBlockRootClientId,s=Object(f.first)(Object(f.castArray)(n)),u=r(s),d=l(Object(f.first)(Object(f.castArray)(n)));return{firstIndex:c(s,d),blockType:u?Object(i.getBlockType)(u.name):null,isLocked:"all"===a(d),rootClientId:d}}),Object(l.withDispatch)(function(e,t){var n=t.clientIds,o=t.rootClientId,r=e("core/block-editor"),i=r.moveBlocksDown,c=r.moveBlocksUp;return{onMoveDown:Object(f.partial)(i,n,o),onMoveUp:Object(f.partial)(c,n,o)}}),Jt.withInstanceId)(bo);var po=Object(l.withSelect)(function(e){var t=e("core").canUser;return{hasUploadPermissions:Object(f.defaultTo)(t("create","media"),!0)}})(function(e){var t=e.hasUploadPermissions,n=e.fallback,o=void 0===n?null:n,r=e.children;return t?r:o}),ho=function(e){function t(){var e;return Object(Qt.a)(this,t),(e=Object(tn.a)(this,Object(nn.a)(t).apply(this,arguments))).onFilesDrop=e.onFilesDrop.bind(Object(rn.a)(Object(rn.a)(e))),e.onHTMLDrop=e.onHTMLDrop.bind(Object(rn.a)(Object(rn.a)(e))),e.onDrop=e.onDrop.bind(Object(rn.a)(Object(rn.a)(e))),e}return Object(on.a)(t,e),Object(en.a)(t,[{key:"getInsertIndex",value:function(e){var t=this.props,n=t.clientId,o=t.rootClientId,r=t.getBlockIndex;if(void 0!==n){var i=r(n,o);return"top"===e.y?i:i+1}}},{key:"onFilesDrop",value:function(e,t){var n=Object(i.findTransform)(Object(i.getBlockTransforms)("from"),function(t){return"files"===t.type&&t.isMatch(e)});if(n){var o=this.getInsertIndex(t),r=n.transform(e,this.props.updateBlockAttributes);this.props.insertBlocks(r,o)}}},{key:"onHTMLDrop",value:function(e,t){var n=Object(i.pasteHandler)({HTML:e,mode:"BLOCKS"});n.length&&this.props.insertBlocks(n,this.getInsertIndex(t))}},{key:"onDrop",value:function(e,t){var n=this.props,o=n.rootClientId,r=n.clientId,i=n.getClientIdsOfDescendants,c=n.getBlockIndex,a=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(e){return t}return t}(e),l=a.srcRootClientId,s=a.srcClientId,u=a.srcIndex,d=a.type;if("block"===d&&s!==r&&!function(e,t){return i([e]).some(function(e){return e===t})}(s,r||o)){var b,f,p=r?c(r,o):void 0,h=this.getInsertIndex(t),v=p&&u0&&Object(Yt.createElement)("div",{className:"editor-warning__actions block-editor-warning__actions"},Yt.Children.map(n,function(e,t){return Object(Yt.createElement)("span",{key:t,className:"editor-warning__action block-editor-warning__action"},e)}))),r&&Object(Yt.createElement)(cn.Dropdown,{className:"editor-warning__secondary block-editor-warning__secondary",position:"bottom left",renderToggle:function(e){var t=e.isOpen,n=e.onToggle;return Object(Yt.createElement)(cn.IconButton,{icon:"ellipsis",label:Object(p.__)("More options"),onClick:n,"aria-expanded":t})},renderContent:function(){return Object(Yt.createElement)(cn.MenuGroup,null,r.map(function(e,t){return Object(Yt.createElement)(cn.MenuItem,{onClick:e.onClick,key:t},e.title)}))}}))},go=n(207),Oo=function(e){var t=e.title,n=e.rawContent,o=e.renderedContent,r=e.action,i=e.actionText,c=e.className;return Object(Yt.createElement)("div",{className:c},Object(Yt.createElement)("div",{className:"editor-block-compare__content block-editor-block-compare__content"},Object(Yt.createElement)("h2",{className:"editor-block-compare__heading block-editor-block-compare__heading"},t),Object(Yt.createElement)("div",{className:"editor-block-compare__html block-editor-block-compare__html"},n),Object(Yt.createElement)("div",{className:"editor-block-compare__preview block-editor-block-compare__preview edit-post-visual-editor"},o)),Object(Yt.createElement)("div",{className:"editor-block-compare__action block-editor-block-compare__action"},Object(Yt.createElement)(cn.Button,{isLarge:!0,tabIndex:"0",onClick:r},i)))},ko=function(e){function t(){return Object(Qt.a)(this,t),Object(tn.a)(this,Object(nn.a)(t).apply(this,arguments))}return Object(on.a)(t,e),Object(en.a)(t,[{key:"getDifference",value:function(e,t){return Object(go.diffChars)(e,t).map(function(e,t){var n=Xt()({"editor-block-compare__added block-editor-block-compare__added":e.added,"editor-block-compare__removed block-editor-block-compare__removed":e.removed});return Object(Yt.createElement)("span",{key:t,className:n},e.value)})}},{key:"getOriginalContent",value:function(e){return{rawContent:e.originalContent,renderedContent:Object(i.getSaveElement)(e.name,e.attributes)}}},{key:"getConvertedContent",value:function(e){var t=Object(f.castArray)(e),n=t.map(function(e){return Object(i.getSaveContent)(e.name,e.attributes,e.innerBlocks)}),o=t.map(function(e){return Object(i.getSaveElement)(e.name,e.attributes,e.innerBlocks)});return{rawContent:n.join(""),renderedContent:o}}},{key:"render",value:function(){var e=this.props,t=e.block,n=e.onKeep,o=e.onConvert,r=e.convertor,i=e.convertButtonText,c=this.getOriginalContent(t),a=this.getConvertedContent(r(t)),l=this.getDifference(c.rawContent,a.rawContent);return Object(Yt.createElement)("div",{className:"editor-block-compare__wrapper block-editor-block-compare__wrapper"},Object(Yt.createElement)(Oo,{title:Object(p.__)("Current"),className:"editor-block-compare__current block-editor-block-compare__current",action:n,actionText:Object(p.__)("Convert to HTML"),rawContent:c.rawContent,renderedContent:c.renderedContent}),Object(Yt.createElement)(Oo,{title:Object(p.__)("After Conversion"),className:"editor-block-compare__converted block-editor-block-compare__converted",action:o,actionText:i,rawContent:l,renderedContent:a.renderedContent}))}}]),t}(Yt.Component),jo=function(e){function t(e){var n;return Object(Qt.a)(this,t),(n=Object(tn.a)(this,Object(nn.a)(t).call(this,e))).state={compare:!1},n.onCompare=n.onCompare.bind(Object(rn.a)(Object(rn.a)(n))),n.onCompareClose=n.onCompareClose.bind(Object(rn.a)(Object(rn.a)(n))),n}return Object(on.a)(t,e),Object(en.a)(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,o=e.convertToClassic,r=e.attemptBlockRecovery,c=e.block,a=!!Object(i.getBlockType)("core/html"),l=this.state.compare,s=[{title:Object(p.__)("Convert to Classic Block"),onClick:o},{title:Object(p.__)("Attempt Block Recovery"),onClick:r}];return l?Object(Yt.createElement)(cn.Modal,{title:Object(p.__)("Resolve Block"),onRequestClose:this.onCompareClose,className:"editor-block-compare block-editor-block-compare"},Object(Yt.createElement)(ko,{block:c,onKeep:t,onConvert:n,convertor:yo,convertButtonText:Object(p.__)("Convert to Blocks")})):Object(Yt.createElement)(mo,{actions:[Object(Yt.createElement)(cn.Button,{key:"convert",onClick:this.onCompare,isLarge:!0,isPrimary:!a},Object(p._x)("Resolve","imperative verb")),a&&Object(Yt.createElement)(cn.Button,{key:"edit",onClick:t,isLarge:!0,isPrimary:!0},Object(p.__)("Convert to HTML"))],secondaryActions:s},Object(p.__)("This block contains unexpected or invalid content."))}}]),t}(Yt.Component),yo=function(e){return Object(i.rawHandler)({HTML:e.originalContent})},_o=Object(Jt.compose)([Object(l.withSelect)(function(e,t){var n=t.clientId;return{block:e("core/block-editor").getBlock(n)}}),Object(l.withDispatch)(function(e,t){var n=t.block,o=e("core/block-editor").replaceBlock;return{convertToClassic:function(){o(n.clientId,function(e){return Object(i.createBlock)("core/freeform",{content:e.originalContent})}(n))},convertToHTML:function(){o(n.clientId,function(e){return Object(i.createBlock)("core/html",{content:e.originalContent})}(n))},convertToBlocks:function(){o(n.clientId,yo(n))},attemptBlockRecovery:function(){var e,t,r,c;o(n.clientId,(t=(e=n).name,r=e.attributes,c=e.innerBlocks,Object(i.createBlock)(t,r,c)))}}})])(jo),So=Object(Yt.createElement)(mo,null,Object(p.__)("This block has encountered an error and cannot be previewed.")),Co=function(){return So},Eo=function(e){function t(){var e;return Object(Qt.a)(this,t),(e=Object(tn.a)(this,Object(nn.a)(t).apply(this,arguments))).state={hasError:!1},e}return Object(on.a)(t,e),Object(en.a)(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}(Yt.Component),wo=n(61),Io=n.n(wo),To=function(e){function t(e){var n;return Object(Qt.a)(this,t),(n=Object(tn.a)(this,Object(nn.a)(t).apply(this,arguments))).onChange=n.onChange.bind(Object(rn.a)(Object(rn.a)(n))),n.onBlur=n.onBlur.bind(Object(rn.a)(Object(rn.a)(n))),n.state={html:e.block.isValid?Object(i.getBlockContent)(e.block):e.block.originalContent},n}return Object(on.a)(t,e),Object(en.a)(t,[{key:"componentDidUpdate",value:function(e){Object(f.isEqual)(this.props.block.attributes,e.block.attributes)||this.setState({html:Object(i.getBlockContent)(this.props.block)})}},{key:"onBlur",value:function(){var e=this.state.html,t=Object(i.getBlockType)(this.props.block.name),n=Object(i.getBlockAttributes)(t,e,this.props.block.attributes),o=e||Object(i.getSaveContent)(t,n),r=!e||Object(i.isValidBlockContent)(t,n,o);this.props.onChange(this.props.clientId,n,o,r),e||this.setState({html:o})}},{key:"onChange",value:function(e){this.setState({html:e.target.value})}},{key:"render",value:function(){var e=this.state.html;return Object(Yt.createElement)(Io.a,{className:"editor-block-list__block-html-textarea block-editor-block-list__block-html-textarea",value:e,onBlur:this.onBlur,onChange:this.onChange})}}]),t}(Yt.Component),Bo=Object(Jt.compose)([Object(l.withSelect)(function(e,t){return{block:e("core/block-editor").getBlock(t.clientId)}}),Object(l.withDispatch)(function(e){return{onChange:function(t,n,o,r){e("core/block-editor").updateBlock(t,{attributes:n,originalContent:o,isValid:r})}}})])(To);var xo=Object(l.withSelect)(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=Object(i.getBlockType)(t);return n?n.title:null}),Lo=function(e){function t(){var e;return Object(Qt.a)(this,t),(e=Object(tn.a)(this,Object(nn.a)(t).apply(this,arguments))).state={isFocused:!1},e.onFocus=e.onFocus.bind(Object(rn.a)(Object(rn.a)(e))),e.onBlur=e.onBlur.bind(Object(rn.a)(Object(rn.a)(e))),e}return Object(on.a)(t,e),Object(en.a)(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(Yt.createElement)("div",{className:"editor-block-list__breadcrumb block-editor-block-list__breadcrumb"},Object(Yt.createElement)(cn.Toolbar,null,n&&Object(Yt.createElement)(Yt.Fragment,null,Object(Yt.createElement)(xo,{clientId:n}),Object(Yt.createElement)("span",{className:"editor-block-list__descendant-arrow block-editor-block-list__descendant-arrow"})),Object(Yt.createElement)(xo,{clientId:t})))}}]),t}(Yt.Component),No=Object(Jt.compose)([Object(l.withSelect)(function(e,t){return{rootClientId:(0,e("core/block-editor").getBlockRootClientId)(t.clientId)}})])(Lo),Mo=window,Ro=Mo.Node,Ao=Mo.getSelection,Do=function(e){function t(){var e;return Object(Qt.a)(this,t),(e=Object(tn.a)(this,Object(nn.a)(t).apply(this,arguments))).focusToolbar=e.focusToolbar.bind(Object(rn.a)(Object(rn.a)(e))),e.focusSelection=e.focusSelection.bind(Object(rn.a)(Object(rn.a)(e))),e.switchOnKeyDown=Object(f.cond)([[Object(f.matchesProperty)(["keyCode"],Ln.ESCAPE),e.focusSelection]]),e.toolbar=Object(Yt.createRef)(),e}return Object(on.a)(t,e),Object(en.a)(t,[{key:"focusToolbar",value:function(){var e=ro.focus.tabbable.find(this.toolbar.current);e.length&&e[0].focus()}},{key:"focusSelection",value:function(){var e=Ao();if(e){var t=e.focusNode;t.nodeType!==Ro.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=Object(u.a)(e,["children"]);return Object(Yt.createElement)(cn.NavigableMenu,Object(qt.a)({orientation:"horizontal",role:"toolbar",ref:this.toolbar,onKeyDown:this.switchOnKeyDown},Object(f.omit)(n,["focusOnMount"])),Object(Yt.createElement)(cn.KeyboardShortcuts,{bindGlobal:!0,eventName:"keydown",shortcuts:{"alt+f10":this.focusToolbar}}),t)}}]),t}(Yt.Component);var Po=function(e){var t=e.focusOnMount;return Object(Yt.createElement)(Do,{focusOnMount:t,className:"editor-block-contextual-toolbar block-editor-block-contextual-toolbar","aria-label":Object(p.__)("Block tools")},Object(Yt.createElement)(ac,null))};var Fo=Object(l.withSelect)(function(e,t){var n=t.clientId,o=e("core/block-editor"),r=o.getMultiSelectedBlockClientIds,i=o.isMultiSelecting,c=o.getBlockIndex,a=o.getBlockCount,l=r(),s=c(Object(f.first)(l),n),u=c(Object(f.last)(l),n);return{multiSelectedBlockClientIds:l,isSelecting:i(),isFirst:0===s,isLast:u+1===a()}})(function(e){var t=e.multiSelectedBlockClientIds,n=e.clientId,o=e.isSelecting,r=e.isFirst,i=e.isLast;return o?null:Object(Yt.createElement)(fo,{key:"mover",clientId:n,clientIds:t,isFirst:r,isLast:i})}),Ho=n(67),Uo=n.n(Ho),Vo=n(25);function zo(e){var t=e.name,n=e.attributes,o=Object(i.createBlock)(t,n);return Object(Yt.createElement)(cn.Disabled,{className:"editor-block-preview__content block-editor-block-preview__content editor-styles-wrapper","aria-hidden":!0},Object(Yt.createElement)(En,{name:t,focus:!1,attributes:o.attributes,setAttributes:f.noop}))}var Ko=function(e){return Object(Yt.createElement)("div",{className:"editor-block-preview block-editor-block-preview"},Object(Yt.createElement)("div",{className:"editor-block-preview__title block-editor-block-preview__title"},Object(p.__)("Preview")),Object(Yt.createElement)(zo,e))};var Wo=function(e){var t=e.icon,n=e.hasChildBlocksWithInserterSupport,o=e.onClick,r=e.isDisabled,i=e.title,c=e.className,a=Object(u.a)(e,["icon","hasChildBlocksWithInserterSupport","onClick","isDisabled","title","className"]),l=t?{backgroundColor:t.background,color:t.foreground}:{},s=t&&t.shadowColor?{backgroundColor:t.shadowColor}:{};return Object(Yt.createElement)("li",{className:"editor-block-types-list__list-item block-editor-block-types-list__list-item"},Object(Yt.createElement)("button",Object(qt.a)({className:Xt()("editor-block-types-list__item block-editor-block-types-list__item",c,{"editor-block-types-list__item-has-children block-editor-block-types-list__item-has-children":n}),onClick:function(e){e.preventDefault(),o()},disabled:r,"aria-label":i},a),Object(Yt.createElement)("span",{className:"editor-block-types-list__item-icon block-editor-block-types-list__item-icon",style:l},Object(Yt.createElement)(Nn,{icon:t,showColors:!0}),n&&Object(Yt.createElement)("span",{className:"editor-block-types-list__item-icon-stack block-editor-block-types-list__item-icon-stack",style:s})),Object(Yt.createElement)("span",{className:"editor-block-types-list__item-title block-editor-block-types-list__item-title"},i)))};var Go=function(e){var t=e.items,n=e.onSelect,o=e.onHover,r=void 0===o?function(){}:o,c=e.children;return Object(Yt.createElement)("ul",{role:"list",className:"editor-block-types-list block-editor-block-types-list"},t&&t.map(function(e){return Object(Yt.createElement)(Wo,{key:e.id,className:Object(i.getBlockMenuDefaultClassName)(e.id),icon:e.icon,hasChildBlocksWithInserterSupport:e.hasChildBlocksWithInserterSupport,onClick:function(){n(e),r(null)},onFocus:function(){return r(e)},onMouseEnter:function(){return r(e)},onMouseLeave:function(){return r(null)},onBlur:function(){return r(null)},isDisabled:e.isDisabled,title:e.title})}),c)};var qo=Object(Jt.compose)(Object(Jt.ifCondition)(function(e){var t=e.items;return t&&t.length>0}),Object(l.withSelect)(function(e,t){var n=t.rootClientId,o=(0,e("core/blocks").getBlockType)((0,e("core/block-editor").getBlockName)(n));return{rootBlockTitle:o&&o.title,rootBlockIcon:o&&o.icon}}))(function(e){var t=e.rootBlockIcon,n=e.rootBlockTitle,o=e.items,r=Object(u.a)(e,["rootBlockIcon","rootBlockTitle","items"]);return Object(Yt.createElement)("div",{className:"editor-inserter__child-blocks block-editor-inserter__child-blocks"},(t||n)&&Object(Yt.createElement)("div",{className:"editor-inserter__parent-block-header block-editor-inserter__parent-block-header"},Object(Yt.createElement)(Nn,{icon:t,showColors:!0}),n&&Object(Yt.createElement)("h2",null,n)),Object(Yt.createElement)(Go,Object(qt.a)({items:o},r)))}),Yo=function(e){return e.stopPropagation()},$o=function(e){return e=(e=(e=(e=Object(f.deburr)(e)).replace(/^\//,"")).toLowerCase()).trim()},Xo=function(e){function t(){var e;return Object(Qt.a)(this,t),(e=Object(tn.a)(this,Object(nn.a)(t).apply(this,arguments))).state={childItems:[],filterValue:"",hoveredItem:null,suggestedItems:[],reusableItems:[],itemsPerCategory:{},openPanels:["suggested"]},e.onChangeSearchInput=e.onChangeSearchInput.bind(Object(rn.a)(Object(rn.a)(e))),e.onHover=e.onHover.bind(Object(rn.a)(Object(rn.a)(e))),e.panels={},e.inserterResults=Object(Yt.createRef)(),e}return Object(on.a)(t,e),Object(en.a)(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,o=t.hideInsertionPoint;e?n():o()}},{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(f.without)(t.state.openPanels,e)}):(t.setState({openPanels:[].concat(Object(d.a)(t.state.openPanels),[e])}),t.props.setTimeout(function(){Uo()(t.panels[e],t.inserterResults.current,{alignWithTop:!0})}))}}},{key:"filterOpenPanels",value:function(e,t,n,o){if(e===this.state.filterValue)return this.state.openPanels;if(!e)return["suggested"];var r=[];return o.length>0&&r.push("reusable"),n.length>0&&(r=r.concat(Object.keys(t))),r}},{key:"filter",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=this.props,n=t.debouncedSpeak,o=t.items,r=t.rootChildBlocks,c=function(e,t){var n=$o(t),o=function(e){return-1!==$o(e).indexOf(n)},r=Object(i.getCategories)();return e.filter(function(e){var t=Object(f.find)(r,{slug:e.category});return o(e.title)||Object(f.some)(e.keywords,o)||t&&o(t.title)})}(o,e),a=Object(f.filter)(c,function(e){var t=e.name;return Object(f.includes)(r,t)}),l=[];if(!e){var s=this.props.maxSuggestedItems||9;l=Object(f.filter)(o,function(e){return e.utility>0}).slice(0,s)}var u=Object(f.filter)(c,{category:"reusable"}),d=function(e){return Object(f.findIndex)(Object(i.getCategories)(),function(t){return t.slug===e.category})},b=Object(f.flow)(function(e){return Object(f.filter)(e,function(e){return"reusable"!==e.category})},function(e){return Object(f.sortBy)(e,d)},function(e){return Object(f.groupBy)(e,"category")})(c);this.setState({hoveredItem:null,childItems:a,filterValue:e,suggestedItems:l,reusableItems:u,itemsPerCategory:b,openPanels:this.filterOpenPanels(e,b,c,u)});var h=Object.keys(b).reduce(function(e,t){return e+b[t].length},0);n(Object(p.sprintf)(Object(p._n)("%d result found.","%d results found.",h),h))}},{key:"onKeyDown",value:function(e){Object(f.includes)([Ln.LEFT,Ln.DOWN,Ln.RIGHT,Ln.UP,Ln.BACKSPACE,Ln.ENTER],e.keyCode)&&e.stopPropagation()}},{key:"render",value:function(){var e=this,t=this.props,n=t.instanceId,o=t.onSelect,r=t.rootClientId,c=this.state,a=c.childItems,l=c.hoveredItem,s=c.itemsPerCategory,u=c.openPanels,d=c.reusableItems,b=c.suggestedItems,h=function(e){return-1!==u.indexOf(e)};return Object(Yt.createElement)("div",{className:"editor-inserter__menu block-editor-inserter__menu",onKeyPress:Yo,onKeyDown:this.onKeyDown},Object(Yt.createElement)("label",{htmlFor:"block-editor-inserter__search-".concat(n),className:"screen-reader-text"},Object(p.__)("Search for a block")),Object(Yt.createElement)("input",{id:"block-editor-inserter__search-".concat(n),type:"search",placeholder:Object(p.__)("Search for a block"),className:"editor-inserter__search block-editor-inserter__search",autoFocus:!0,onChange:this.onChangeSearchInput}),Object(Yt.createElement)("div",{className:"editor-inserter__results block-editor-inserter__results",ref:this.inserterResults,tabIndex:"0",role:"region","aria-label":Object(p.__)("Available block types")},Object(Yt.createElement)(qo,{rootClientId:r,items:a,onSelect:o,onHover:this.onHover}),!!b.length&&Object(Yt.createElement)(cn.PanelBody,{title:Object(p._x)("Most Used","blocks"),opened:h("suggested"),onToggle:this.onTogglePanel("suggested"),ref:this.bindPanel("suggested")},Object(Yt.createElement)(Go,{items:b,onSelect:o,onHover:this.onHover})),Object(f.map)(Object(i.getCategories)(),function(t){var n=s[t.slug];return n&&n.length?Object(Yt.createElement)(cn.PanelBody,{key:t.slug,title:t.title,icon:t.icon,opened:h(t.slug),onToggle:e.onTogglePanel(t.slug),ref:e.bindPanel(t.slug)},Object(Yt.createElement)(Go,{items:n,onSelect:o,onHover:e.onHover})):null}),!!d.length&&Object(Yt.createElement)(cn.PanelBody,{className:"editor-inserter__reusable-blocks-panel block-editor-inserter__reusable-blocks-panel",title:Object(p.__)("Reusable"),opened:h("reusable"),onToggle:this.onTogglePanel("reusable"),icon:"controls-repeat",ref:this.bindPanel("reusable")},Object(Yt.createElement)(Go,{items:d,onSelect:o,onHover:this.onHover}),Object(Yt.createElement)("a",{className:"editor-inserter__manage-reusable-blocks block-editor-inserter__manage-reusable-blocks",href:Object(Vo.addQueryArgs)("edit.php",{post_type:"wp_block"})},Object(p.__)("Manage All Reusable Blocks"))),Object(f.isEmpty)(b)&&Object(f.isEmpty)(d)&&Object(f.isEmpty)(s)&&Object(Yt.createElement)("p",{className:"editor-inserter__no-results block-editor-inserter__no-results"},Object(p.__)("No blocks found."))),l&&Object(i.isReusableBlock)(l)&&Object(Yt.createElement)(Ko,{name:l.name,attributes:l.initialAttributes}))}}]),t}(Yt.Component),Jo=Object(Jt.compose)(Object(l.withSelect)(function(e,t){var n=t.clientId,o=t.isAppender,r=t.rootClientId,i=e("core/block-editor"),c=i.getInserterItems,a=i.getBlockName,l=i.getBlockRootClientId,s=i.getBlockSelectionEnd,u=e("core/blocks").getChildBlockNames,d=r;if(!d&&!n&&!o){var b=s();b&&(d=l(b)||void 0)}return{rootChildBlocks:u(a(d)),items:c(d),destinationRootClientId:d}}),Object(l.withDispatch)(function(e,t,n){var o=n.select,r=e("core/block-editor"),c=r.showInsertionPoint,a=r.hideInsertionPoint;function l(){var e=o("core/block-editor"),n=e.getBlockIndex,r=e.getBlockSelectionEnd,i=e.getBlockOrder,c=t.clientId,a=t.destinationRootClientId,l=t.isAppender;if(c)return n(c,a);var s=r();return!l&&s?n(s,a)+1:i(a).length}return{fetchReusableBlocks:e("core/editor").__experimentalFetchReusableBlocks,showInsertionPoint:function(){var e=l();c(t.destinationRootClientId,e)},hideInsertionPoint:a,onSelect:function(n){var r=e("core/block-editor"),c=r.replaceBlocks,a=r.insertBlock,s=o("core/block-editor").getSelectedBlock,u=t.isAppender,d=n.name,b=n.initialAttributes,f=s(),p=Object(i.createBlock)(d,b);!u&&f&&Object(i.isUnmodifiedDefaultBlock)(f)?c(f.clientId,p):a(p,l(),t.destinationRootClientId),t.onSelect()}}}),cn.withSpokenMessages,Jt.withInstanceId,Jt.withSafeTimeout)(Xo),Zo=function(e){var t=e.onToggle,n=e.disabled,o=e.isOpen;return Object(Yt.createElement)(cn.IconButton,{icon:"insert",label:Object(p.__)("Add block"),labelPosition:"bottom",onClick:t,className:"editor-inserter__toggle block-editor-inserter__toggle","aria-haspopup":"true","aria-expanded":o,disabled:n})},Qo=function(e){function t(){var e;return Object(Qt.a)(this,t),(e=Object(tn.a)(this,Object(nn.a)(t).apply(this,arguments))).onToggle=e.onToggle.bind(Object(rn.a)(Object(rn.a)(e))),e.renderToggle=e.renderToggle.bind(Object(rn.a)(Object(rn.a)(e))),e.renderContent=e.renderContent.bind(Object(rn.a)(Object(rn.a)(e))),e}return Object(on.a)(t,e),Object(en.a)(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,o=this.props,r=o.disabled,i=o.renderToggle,c=void 0===i?Zo:i;return c({onToggle:t,isOpen:n,disabled:r})}},{key:"renderContent",value:function(e){var t=e.onClose,n=this.props,o=n.rootClientId,r=n.clientId,i=n.isAppender;return Object(Yt.createElement)(Jo,{onSelect:t,rootClientId:o,clientId:r,isAppender:i})}},{key:"render",value:function(){var e=this.props,t=e.position,n=e.title;return Object(Yt.createElement)(cn.Dropdown,{className:"editor-inserter block-editor-inserter",contentClassName:"editor-inserter__popover block-editor-inserter__popover",position:t,onToggle:this.onToggle,expandOnMobile:!0,headerTitle:n,renderToggle:this.renderToggle,renderContent:this.renderContent})}}]),t}(Yt.Component),er=Object(Jt.compose)([Object(l.withSelect)(function(e,t){var n=t.rootClientId,o=e("core/block-editor").hasInserterItems;return{title:(0,e("core/editor").getEditedPostAttribute)("title"),hasItems:o(n)}}),Object(Jt.ifCondition)(function(e){return e.hasItems})])(Qo);var tr=Object(a.ifViewportMatches)("< small")(function(e){var t=e.clientId;return Object(Yt.createElement)("div",{className:"editor-block-list__block-mobile-toolbar block-editor-block-list__block-mobile-toolbar"},Object(Yt.createElement)(er,null),Object(Yt.createElement)(fo,{clientIds:[t]}))}),nr=function(e){function t(){var e;return Object(Qt.a)(this,t),(e=Object(tn.a)(this,Object(nn.a)(t).apply(this,arguments))).state={isInserterFocused:!1},e.onBlurInserter=e.onBlurInserter.bind(Object(rn.a)(Object(rn.a)(e))),e.onFocusInserter=e.onFocusInserter.bind(Object(rn.a)(Object(rn.a)(e))),e}return Object(on.a)(t,e),Object(en.a)(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,o=t.rootClientId,r=t.clientId;return Object(Yt.createElement)("div",{className:"editor-block-list__insertion-point block-editor-block-list__insertion-point"},n&&Object(Yt.createElement)("div",{className:"editor-block-list__insertion-point-indicator block-editor-block-list__insertion-point-indicator"}),Object(Yt.createElement)("div",{onFocus:this.onFocusInserter,onBlur:this.onBlurInserter,tabIndex:-1,className:Xt()("editor-block-list__insertion-point-inserter block-editor-block-list__insertion-point-inserter",{"is-visible":e})},Object(Yt.createElement)(er,{rootClientId:o,clientId:r})))}}]),t}(Yt.Component),or=Object(l.withSelect)(function(e,t){var n=t.clientId,o=t.rootClientId,r=e("core/block-editor"),i=r.getBlockIndex,c=r.getBlockInsertionPoint,a=r.isBlockInsertionPointVisible,l=i(n,o),s=c();return{showInsertionPoint:a()&&s.index===l&&s.rootClientId===o}})(nr),rr=function(e){function t(){var e;return Object(Qt.a)(this,t),(e=Object(tn.a)(this,Object(nn.a)(t).apply(this,arguments))).proxyEvent=e.proxyEvent.bind(Object(rn.a)(Object(rn.a)(e))),e.eventMap={},e}return Object(on.a)(t,e),Object(en.a)(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,o=void 0===n?[]:n,r=t.forwardedRef,i=Object(u.a)(t,["childHandledEvents","forwardedRef"]),c=Object(f.reduce)([].concat(Object(d.a)(o),Object(d.a)(Object.keys(i))),function(t,n){var o=n.match(/^on([A-Z][a-zA-Z]+?)(Handled)?$/);if(o){!!o[2]&&delete i[n];var r="on"+o[1];t[r]=e.proxyEvent,e.eventMap[o[1].toLowerCase()]=r}return t},{});return Object(Yt.createElement)("div",Object(qt.a)({ref:r},i,c))}}]),t}(Yt.Component),ir=function(e,t){return Object(Yt.createElement)(rr,Object(qt.a)({},e,{forwardedRef:t}))};ir.displayName="IgnoreNestedEvents";var cr=Object(Yt.forwardRef)(ir);var ar=Object(Jt.compose)(Object(l.withSelect)(function(e,t){var n=t.rootClientId,o=e("core/block-editor"),r=o.getInserterItems,i=o.getTemplateLock;return{items:r(n),isLocked:!!i(n)}}),Object(l.withDispatch)(function(e,t){var n=t.clientId,o=t.rootClientId;return{onInsert:function(t){var r=t.name,c=t.initialAttributes,a=Object(i.createBlock)(r,c);n?e("core/block-editor").replaceBlocks(n,a):e("core/block-editor").insertBlock(a,void 0,o)}}}))(function(e){var t=e.items,n=e.isLocked,o=e.onInsert;if(n)return null;var r=Object(f.filter)(t,function(e){return!(e.isDisabled||e.name===Object(i.getDefaultBlockName)()&&Object(f.isEmpty)(e.initialAttributes))}).slice(0,3);return Object(Yt.createElement)("div",{className:"editor-inserter-with-shortcuts block-editor-inserter-with-shortcuts"},r.map(function(e){return Object(Yt.createElement)(cn.IconButton,{key:e.id,className:"editor-inserter-with-shortcuts__block block-editor-inserter-with-shortcuts__block",onClick:function(){return o(e)},label:Object(p.sprintf)(Object(p.__)("Add %s"),e.title),icon:Object(Yt.createElement)(Nn,{icon:e.icon})})}))}),lr=function(e){function t(){var e;return Object(Qt.a)(this,t),(e=Object(tn.a)(this,Object(nn.a)(t).apply(this,arguments))).state={hoverArea:null},e.onMouseLeave=e.onMouseLeave.bind(Object(rn.a)(Object(rn.a)(e))),e.onMouseMove=e.onMouseMove.bind(Object(rn.a)(Object(rn.a)(e))),e}return Object(on.a)(t,e),Object(en.a)(t,[{key:"componentWillUnmount",value:function(){this.props.container&&this.toggleListeners(this.props.container,!1)}},{key:"componentDidMount",value:function(){this.props.container&&this.toggleListeners(this.props.container)}},{key:"componentDidUpdate",value:function(e){e.container!==this.props.container&&(e.container&&this.toggleListeners(e.container,!1),this.props.container&&this.toggleListeners(this.props.container,!0))}},{key:"toggleListeners",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1]?"addEventListener":"removeEventListener";e[t]("mousemove",this.onMouseMove),e[t]("mouseleave",this.onMouseLeave)}},{key:"onMouseLeave",value:function(){this.state.hoverArea&&this.setState({hoverArea:null})}},{key:"onMouseMove",value:function(e){var t=this.props,n=t.isRTL,o=t.container.getBoundingClientRect(),r=o.width,i=o.left,c=o.right,a=null;e.clientX-i0&&void 0!==arguments[0]?arguments[0]:t.clientId,n=arguments.length>1?arguments[1]:void 0;c(e,n)},onInsertBlocks:function(e,n){var o=t.rootClientId;l(e,n,o)},onInsertDefaultBlockAfter:function(){var e=t.clientId,n=t.rootClientId,r=(0,o("core/block-editor").getBlockIndex)(e,n);s({},n,r+1)},onInsertBlocksAfter:function(e){var n=t.clientId,r=t.rootClientId,i=(0,o("core/block-editor").getBlockIndex)(n,r);l(e,i+1,r)},onRemove:function(e){u(e)},onMerge:function(e){var n=t.clientId,r=o("core/block-editor"),i=r.getPreviousBlockClientId,c=r.getNextBlockClientId;if(e){var a=c(n);a&&d(n,a)}else{var l=i(n);l&&d(l,n)}},onReplace:function(e){b([t.clientId],e)},onMetaChange:function(e){(0,(0,o("core/block-editor").getSettings)().__experimentalMetaSource.onChange)(e)},onShiftSelection:function(){if(t.isSelectionEnabled){var e=o("core/block-editor").getBlockSelectionStart;e()?a(e(),t.clientId):c(t.clientId)}},toggleSelection:function(e){f(e)}}}),pr=Object(Jt.compose)(Jt.pure,Object(a.withViewportMatch)({isLargeViewport:"medium"}),br,fr,Object(cn.withFilters)("editor.BlockListBlock"))(dr),hr=n(57);var vr=Object(Jt.compose)(Object(Jt.withState)({hovered:!1}),Object(l.withSelect)(function(e,t){var n=e("core/block-editor"),o=n.getBlockCount,r=n.getBlockName,c=n.isBlockValid,a=n.getSettings,l=n.getTemplateLock,s=!o(t.rootClientId),u=r(t.lastBlockClientId)===Object(i.getDefaultBlockName)(),d=c(t.lastBlockClientId),b=a().bodyPlaceholder;return{isVisible:s||!u||!d,showPrompt:s,isLocked:!!l(t.rootClientId),placeholder:b}}),Object(l.withDispatch)(function(e,t){var n=e("core/block-editor"),o=n.insertDefaultBlock,r=n.startTyping;return{onAppend:function(){var e=t.rootClientId;o(void 0,e),r()}}}))(function(e){var t=e.isLocked,n=e.isVisible,o=e.onAppend,r=e.showPrompt,i=e.placeholder,c=e.rootClientId,a=e.hovered,l=e.setState;if(t||!n)return null;var s=Object(hr.decodeEntities)(i)||Object(p.__)("Start writing or type / to choose a block");return Object(Yt.createElement)("div",{"data-root-client-id":c||"",className:"wp-block editor-default-block-appender block-editor-default-block-appender",onMouseEnter:function(){return l({hovered:!0})},onMouseLeave:function(){return l({hovered:!1})}},Object(Yt.createElement)(vo,{rootClientId:c}),Object(Yt.createElement)(Io.a,{role:"button","aria-label":Object(p.__)("Add block"),className:"editor-default-block-appender__content block-editor-default-block-appender__content",readOnly:!0,onFocus:o,value:r?s:""}),a&&Object(Yt.createElement)(ar,{rootClientId:c}),Object(Yt.createElement)(er,{rootClientId:c,position:"top right",isAppender:!0}))});var mr=Object(l.withSelect)(function(e,t){var n=t.rootClientId,o=e("core/block-editor"),r=o.getBlockOrder,c=o.canInsertBlockType;return{isLocked:!!(0,o.getTemplateLock)(n),blockClientIds:r(n),canInsertDefaultBlock:c(Object(i.getDefaultBlockName)(),n)}})(function(e){var t=e.blockClientIds,n=e.rootClientId,o=e.canInsertDefaultBlock;return e.isLocked?null:o?Object(Yt.createElement)(cr,{childHandledEvents:["onFocus","onClick","onKeyDown"]},Object(Yt.createElement)(vr,{rootClientId:n,lastBlockClientId:Object(f.last)(t)})):Object(Yt.createElement)("div",{className:"block-list-appender"},Object(Yt.createElement)(er,{rootClientId:n,renderToggle:function(e){var t=e.onToggle,n=e.disabled,o=e.isOpen;return Object(Yt.createElement)(cn.IconButton,{label:Object(p.__)("Add block"),icon:"insert",onClick:t,className:"block-list-appender__toggle","aria-haspopup":"true","aria-expanded":o,disabled:n})},isAppender:!0}))}),gr=function(e){function t(e){var n;return Object(Qt.a)(this,t),(n=Object(tn.a)(this,Object(nn.a)(t).call(this,e))).onSelectionStart=n.onSelectionStart.bind(Object(rn.a)(Object(rn.a)(n))),n.onSelectionEnd=n.onSelectionEnd.bind(Object(rn.a)(Object(rn.a)(n))),n.setBlockRef=n.setBlockRef.bind(Object(rn.a)(Object(rn.a)(n))),n.setLastClientY=n.setLastClientY.bind(Object(rn.a)(Object(rn.a)(n))),n.onPointerMove=Object(f.throttle)(n.onPointerMove.bind(Object(rn.a)(Object(rn.a)(n))),100),n.onScroll=function(){return n.onPointerMove({clientY:n.lastClientY})},n.lastClientY=0,n.nodes={},n}return Object(on.a)(t,e),Object(en.a)(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=Object(s.a)({},this.nodes,Object(b.a)({},t,e))}},{key:"onPointerMove",value:function(e){var t=e.clientY;this.props.isMultiSelecting||this.props.onStartMultiSelect();var n=ur(this.selectionAtStart).getBoundingClientRect();if(!(t>=n.top&&t<=n.bottom)){var o=t-n.top,r=Object(f.findLast)(this.coordMapKeys,function(e){return e0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0;return!function(e,t){return void 0!==t.disableCustomColors?t.disableCustomColors:e}(t,n)||(n.colors||e).length>0}(t,n,e)})})(function(e){var t=e.children,n=e.colors,o=e.colorSettings,r=e.disableCustomColors,i=e.title,c=Object(u.a)(e,["children","colors","colorSettings","disableCustomColors","title"]),a=Object(Yt.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 o=e.value,r=e.label,i=e.colors;if(!o)return null;var c=zn(i||t,o),a=c&&c.name,l=Object(p.sprintf)(Mr,r.toLowerCase(),a||o);return Object(Yt.createElement)(cn.ColorIndicator,{key:n,colorValue:o,"aria-label":l})})}(o,n));return Object(Yt.createElement)(cn.PanelBody,Object(qt.a)({className:"editor-panel-color-settings block-editor-panel-color-settings",title:a},c),o.map(function(e,t){return Object(Yt.createElement)(Nr,Object(qt.a)({key:t},Object(s.a)({colors:n,disableCustomColors:r},e)))}),t)}),Ar=Pn(Rr);var Dr=function(e){var t=e.onChange,n=e.className,o=Object(u.a)(e,["onChange","className"]);return Object(Yt.createElement)(Io.a,Object(qt.a)({className:Xt()("editor-plain-text block-editor-plain-text",n),onChange:function(e){return t(e.target.value)}},o))},Pr=n(41),Fr=n.n(Pr),Hr=n(35),Ur=n(49),Vr=n.n(Ur),zr=Object(l.withSelect)(function(e){return{formatTypes:(0,e("core/rich-text").getFormatTypes)()}})(function(e){var t=e.formatTypes,n=e.onChange,o=e.value;return Object(Yt.createElement)(Yt.Fragment,null,t.map(function(e){var t=e.name,r=e.edit;if(!r)return null;var i=Object(c.getActiveFormat)(o,t),a=void 0!==i,l=Object(c.getActiveObject)(o),s=void 0!==l;return Object(Yt.createElement)(r,{key:t,isActive:a,activeAttributes:a&&i.attributes||{},isObjectActive:s,activeObjectAttributes:s&&l.attributes||{},value:o,onChange:n})}))}),Kr=function(e){var t=e.controls;return Object(Yt.createElement)("div",{className:"editor-format-toolbar block-editor-format-toolbar"},Object(Yt.createElement)(cn.Toolbar,null,t.map(function(e){return Object(Yt.createElement)(cn.Slot,{name:"RichText.ToolbarControls.".concat(e),key:e})}),Object(Yt.createElement)(cn.Slot,{name:"RichText.ToolbarControls"},function(e){return e.length&&Object(Yt.createElement)(cn.DropdownMenu,{icon:!1,position:"bottom left",label:Object(p.__)("More Rich Text Controls"),controls:Object(f.orderBy)(e.map(function(e){return Object(B.a)(e,1)[0].props}),"title")})})))},Wr=function(e){return Object(f.pickBy)(e,function(e,t){return n=t,Object(f.startsWith)(n,"aria-")&&!Object(f.isNil)(e);var n})},Gr=window.navigator.userAgent;var qr=Gr.indexOf("Trident")>=0,Yr=function(e){function t(){var e;return Object(Qt.a)(this,t),(e=Object(tn.a)(this,Object(nn.a)(t).call(this))).bindEditorNode=e.bindEditorNode.bind(Object(rn.a)(Object(rn.a)(e))),e}return Object(on.a)(t,e),Object(en.a)(t,[{key:"shouldComponentUpdate",value:function(e){var t=this;this.configureIsPlaceholderVisible(e.isPlaceholderVisible),Object(f.isEqual)(this.props.style,e.style)||(this.editorNode.setAttribute("style",""),Object.assign(this.editorNode.style,e.style)),Object(f.isEqual)(this.props.className,e.className)||(this.editorNode.className=Xt()("block-editor-rich-text__editable","editor-rich-text__editable",e.className));var n=function(e,t){var n=Object(f.keys)(Wr(e)),o=Object(f.keys)(Wr(t));return{removedKeys:Object(f.difference)(n,o),updatedKeys:o.filter(function(n){return!Object(f.isEqual)(e[n],t[n])})}}(this.props,e),o=n.removedKeys,r=n.updatedKeys;return o.forEach(function(e){return t.editorNode.removeAttribute(e)}),r.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),qr&&(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,o=t.keyCode;if((Ln.BACKSPACE===o||Ln.DELETE===o)&&e.contains(n)){var r=document.createEvent("Event");r.initEvent("input",!0,!1),r.data=null,n.dispatchEvent(r)}}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,o=void 0===n?"div":n,r=t.style,i=t.record,c=t.valueToEditableHTML,a=t.className,l=t.isPlaceholderVisible,d=Object(u.a)(t,["tagName","style","record","valueToEditableHTML","className","isPlaceholderVisible"]);return delete d.setRef,Object(Yt.createElement)(o,Object(s.a)((e={role:"textbox","aria-multiline":!0,className:Xt()("block-editor-rich-text__editable","editor-rich-text__editable",a),contentEditable:!0},Object(b.a)(e,"data-is-placeholder-visible",l),Object(b.a)(e,"ref",this.bindEditorNode),Object(b.a)(e,"style",r),Object(b.a)(e,"suppressContentEditableWarning",!0),Object(b.a)(e,"dangerouslySetInnerHTML",{__html:c(i)}),e),d))}}]),t}(Yt.Component);var $r=function(e){function t(){var e;return Object(Qt.a)(this,t),(e=Object(tn.a)(this,Object(nn.a)(t).apply(this,arguments))).onUse=e.onUse.bind(Object(rn.a)(Object(rn.a)(e))),e}return Object(on.a)(t,e),Object(en.a)(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(Yt.createElement)(cn.KeyboardShortcuts,{bindGlobal:!0,shortcuts:Object(b.a)({},Ln.rawShortcut[n](t),this.onUse)})}}]),t}(Yt.Component),Xr=window.Node,Jr=Xr.TEXT_NODE,Zr=Xr.ELEMENT_NODE;function Qr(){var e=window.getSelection();if(0!==e.rangeCount){var t=e.getRangeAt(0).startContainer;if(t.nodeType===Jr&&(t=t.parentNode),t.nodeType===Zr){var n=t.closest("*[contenteditable]");if(n&&n.contains(t))return t.closest("ol,ul")}}}function ei(){var e=Qr();return!e||"true"===e.contentEditable}function ti(e,t){var n=Qr();return n?n.nodeName.toLowerCase()===e:e===t}var ni=function(e){var t=e.onTagNameChange,n=e.tagName,o=e.value,r=e.onChange;return Object(Yt.createElement)(Yt.Fragment,null,Object(Yt.createElement)($r,{type:"primary",character:"[",onUse:function(){r(Object(c.outdentListItems)(o))}}),Object(Yt.createElement)($r,{type:"primary",character:"]",onUse:function(){r(Object(c.indentListItems)(o,{type:n}))}}),Object(Yt.createElement)($r,{type:"primary",character:"m",onUse:function(){r(Object(c.indentListItems)(o,{type:n}))}}),Object(Yt.createElement)($r,{type:"primaryShift",character:"m",onUse:function(){r(Object(c.outdentListItems)(o))}}),Object(Yt.createElement)(xn,null,Object(Yt.createElement)(cn.Toolbar,{controls:[t&&{icon:"editor-ul",title:Object(p.__)("Convert to unordered list"),isActive:ti("ul",n),onClick:function(){r(Object(c.changeListType)(o,{type:"ul"})),ei()&&t("ul")}},t&&{icon:"editor-ol",title:Object(p.__)("Convert to ordered list"),isActive:ti("ol",n),onClick:function(){r(Object(c.changeListType)(o,{type:"ol"})),ei()&&t("ol")}},{icon:"editor-outdent",title:Object(p.__)("Outdent list item"),shortcut:Object(p._x)("Backspace","keyboard key"),onClick:function(){r(Object(c.outdentListItems)(o))}},{icon:"editor-indent",title:Object(p.__)("Indent list item"),shortcut:Object(p._x)("Space","keyboard key"),onClick:function(){r(Object(c.indentListItems)(o,{type:n}))}}].filter(Boolean)})))},oi=[Ln.rawShortcut.primary("z"),Ln.rawShortcut.primaryShift("z"),Ln.rawShortcut.primary("y")],ri=Object(Yt.createElement)(cn.KeyboardShortcuts,{bindGlobal:!0,shortcuts:Object(f.fromPairs)(oi.map(function(e){return[e,function(e){return e.preventDefault()}]}))}),ii=function(){return ri};function ci(e){var t,n=e.name,o=e.shortcutType,r=e.shortcutCharacter,i=Object(u.a)(e,["name","shortcutType","shortcutCharacter"]),c="RichText.ToolbarControls";return n&&(c+=".".concat(n)),o&&r&&(t=Ln.displayShortcut[o](r)),Object(Yt.createElement)(cn.Fill,{name:c},Object(Yt.createElement)(cn.ToolbarButton,Object(qt.a)({},i,{shortcut:t})))}var ai=function(e){function t(){var e;return Object(Qt.a)(this,t),(e=Object(tn.a)(this,Object(nn.a)(t).apply(this,arguments))).onInput=e.onInput.bind(Object(rn.a)(Object(rn.a)(e))),e}return Object(on.a)(t,e),Object(en.a)(t,[{key:"onInput",value:function(e){e.inputType===this.props.inputType&&this.props.onInput()}},{key:"componentDidMount",value:function(){document.addEventListener("input",this.onInput,!0)}},{key:"componentWillUnmount",value:function(){document.removeEventListener("input",this.onInput,!0)}},{key:"render",value:function(){return null}}]),t}(Yt.Component),li=window,si=li.getSelection,ui=li.getComputedStyle,di=new Set(["insertParagraph","insertOrderedList","insertUnorderedList","insertHorizontalRule","insertLink"]),bi=document.createElement("style");document.head.appendChild(bi);var fi=function(e){function t(e){var n,o=e.value,r=e.onReplace,a=e.multiline;return Object(Qt.a)(this,t),n=Object(tn.a)(this,Object(nn.a)(t).apply(this,arguments)),!0!==a&&"p"!==a&&"li"!==a||(n.multilineTag=!0===a?"p":a),"li"===n.multilineTag&&(n.multilineWrapperTags=["ul","ol"]),n.props.onSplit?(n.onSplit=n.props.onSplit,Vr()("wp.editor.RichText onSplit prop",{plugin:"Gutenberg",alternative:"wp.editor.RichText unstableOnSplit prop"})):n.props.unstableOnSplit&&(n.onSplit=n.props.unstableOnSplit),n.onFocus=n.onFocus.bind(Object(rn.a)(Object(rn.a)(n))),n.onBlur=n.onBlur.bind(Object(rn.a)(Object(rn.a)(n))),n.onChange=n.onChange.bind(Object(rn.a)(Object(rn.a)(n))),n.onDeleteKeyDown=n.onDeleteKeyDown.bind(Object(rn.a)(Object(rn.a)(n))),n.onKeyDown=n.onKeyDown.bind(Object(rn.a)(Object(rn.a)(n))),n.onPaste=n.onPaste.bind(Object(rn.a)(Object(rn.a)(n))),n.onCreateUndoLevel=n.onCreateUndoLevel.bind(Object(rn.a)(Object(rn.a)(n))),n.setFocusedElement=n.setFocusedElement.bind(Object(rn.a)(Object(rn.a)(n))),n.onInput=n.onInput.bind(Object(rn.a)(Object(rn.a)(n))),n.onCompositionEnd=n.onCompositionEnd.bind(Object(rn.a)(Object(rn.a)(n))),n.onSelectionChange=n.onSelectionChange.bind(Object(rn.a)(Object(rn.a)(n))),n.getRecord=n.getRecord.bind(Object(rn.a)(Object(rn.a)(n))),n.createRecord=n.createRecord.bind(Object(rn.a)(Object(rn.a)(n))),n.applyRecord=n.applyRecord.bind(Object(rn.a)(Object(rn.a)(n))),n.isEmpty=n.isEmpty.bind(Object(rn.a)(Object(rn.a)(n))),n.valueToFormat=n.valueToFormat.bind(Object(rn.a)(Object(rn.a)(n))),n.setRef=n.setRef.bind(Object(rn.a)(Object(rn.a)(n))),n.valueToEditableHTML=n.valueToEditableHTML.bind(Object(rn.a)(Object(rn.a)(n))),n.handleHorizontalNavigation=n.handleHorizontalNavigation.bind(Object(rn.a)(Object(rn.a)(n))),n.onPointerDown=n.onPointerDown.bind(Object(rn.a)(Object(rn.a)(n))),n.formatToValue=Fr()(n.formatToValue.bind(Object(rn.a)(Object(rn.a)(n))),{maxSize:1}),n.savedContent=o,n.patterns=function(e){var t=e.onReplace,n=e.valueToFormat,o=Object(i.getBlockTransforms)("from").filter(function(e){return"prefix"===e.type});return[function(e){if(!t)return e;var r=Object(c.getSelectionStart)(e),a=Object(c.getTextContent)(e),l=a.slice(r-1,r);if(!/\s/.test(l))return e;var s=a.slice(0,r).trim(),u=Object(i.findTransform)(o,function(e){var t=e.prefix;return s===t});if(!u)return e;var d=n(Object(c.slice)(e,r,a.length)),b=u.transform(d);return t([b]),e},function(e){var t=Object(c.getSelectionStart)(e),n=Object(c.getTextContent)(e);if("`"!==n.slice(t-1,t))return e;var o=n.slice(0,t-1).lastIndexOf("`");if(-1===o)return e;var r=o,i=t-2;return r===i?e:(e=Object(c.remove)(e,r,r+1),e=Object(c.remove)(e,i,i+1),e=Object(c.applyFormat)(e,{type:"code"},r,i))}]}({onReplace:r,valueToFormat:n.valueToFormat}),n.enterPatterns=Object(i.getBlockTransforms)("from").filter(function(e){return"enter"===e.type}),n.state={},n.usedDeprecatedChildrenSource=Array.isArray(o),n.lastHistoryValue=o,n}return Object(on.a)(t,e),Object(en.a)(t,[{key:"componentWillUnmount",value:function(){document.removeEventListener("selectionchange",this.onSelectionChange)}},{key:"setRef",value:function(e){e?this.editableRef=e:delete this.editableRef}},{key:"setFocusedElement",value:function(){this.props.setFocusedElement&&this.props.setFocusedElement(this.props.instanceId)}},{key:"getRecord",value:function(){var e=this.formatToValue(this.props.value),t=e.formats,n=e.replacements,o=e.text,r=this.state;return{formats:t,replacements:n,text:o,start:r.start,end:r.end,activeFormats:r.activeFormats}}},{key:"createRecord",value:function(){var e=si(),t=e.rangeCount>0?e.getRangeAt(0):null;return Object(c.create)({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]:{}).domOnly;Object(c.apply)({value:e,current:this.editableRef,multilineTag:this.multilineTag,multilineWrapperTags:this.multilineWrapperTags,prepareEditableTree:this.props.prepareEditableTree,__unstableDomOnly:t})}},{key:"isEmpty",value:function(){return Object(c.isEmpty)(this.formatToValue(this.props.value))}},{key:"onPaste",value:function(e){var t=e.clipboardData,n=t.items,o=t.files;n=Object(f.isNil)(n)?[]:n,o=Object(f.isNil)(o)?[]:o;var r="",a="";try{r=t.getData("text/plain"),a=t.getData("text/html")}catch(e){try{a=t.getData("Text")}catch(e){return}}e.preventDefault(),window.console.log("Received HTML:\n\n",a),window.console.log("Received plain text:\n\n",r);var l=Object(f.find)([].concat(Object(d.a)(n),Object(d.a)(o)),function(e){var t=e.type;return/^image\/(?:jpe?g|png|gif)$/.test(t)});if(l&&!a){var s=l.getAsFile?l.getAsFile():l,u=Object(i.pasteHandler)({HTML:''),mode:"BLOCKS",tagName:this.props.tagName}),b=this.props.onReplace&&this.isEmpty();return window.console.log("Received item:\n\n",s),void(b?this.props.onReplace(u):this.onSplit&&this.splitContent(u))}var p=this.getRecord();if(!Object(c.isCollapsed)(p)){var h=(a||r).replace(/<[^>]+>/g,"").trim();if(Object(Vo.isURL)(h))return this.onChange(Object(c.applyFormat)(p,{type:"a",attributes:{href:Object(hr.decodeEntities)(h)}})),void window.console.log("Created link:\n\n",h)}var v=this.props.onReplace&&this.isEmpty(),m="INLINE";v?m="BLOCKS":this.onSplit&&(m="AUTO");var g=Object(i.pasteHandler)({HTML:a,plainText:r,mode:m,tagName:this.props.tagName,canUserUseUnfilteredHTML:this.props.canUserUseUnfilteredHTML});if("string"==typeof g){var O=Object(c.create)({html:g});this.onChange(Object(c.insert)(p,O))}else if(this.onSplit){if(!g.length)return;v?this.props.onReplace(g):this.splitContent(g,{paste:!0})}}},{key:"onFocus",value:function(){var e=this.props.unstableOnFocus;e&&e(),this.recalculateBoundaryStyle(),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")||di.has(t))return void this.applyRecord(this.getRecord())}var n=this.createRecord(),o=this.state,r=o.activeFormats,i=void 0===r?[]:r,a=o.start,l=Object(c.__unstableUpdateFormats)({value:n,start:a,end:n.start,formats:i});this.onChange(l,{withoutHistory:!0});var u=this.patterns.reduce(function(e,t){return t(e)},l);u!==l&&(this.onCreateUndoLevel(),this.onChange(Object(s.a)({},u,{activeFormats:i}))),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;if(t!==this.state.start||n!==this.state.end){var o=this.props.isCaretWithinFormattedText,r=Object(c.__unstableGetActiveFormats)(e);!o&&r.length?this.props.onEnterFormattedText():o&&!r.length&&this.props.onExitFormattedText(),this.setState({start:t,end:n,activeFormats:r}),this.applyRecord(Object(s.a)({},e,{activeFormats:r}),{domOnly:!0}),r.length>0&&this.recalculateBoundaryStyle()}}},{key:"recalculateBoundaryStyle",value:function(){var e=this.editableRef.querySelector("*[data-rich-text-format-boundary]");if(e){var t=ui(e).color.replace(")",", 0.2)").replace("rgb","rgba"),n=".".concat("block-editor-rich-text__editable",":focus ").concat("*[data-rich-text-format-boundary]"),o="background-color: ".concat(t);bi.innerHTML="".concat(n," {").concat(o,"}")}}},{key:"onChangeEditableValue",value:function(e){var t=e.formats,n=e.text;Object(f.get)(this.props,["onChangeEditableValue"],[]).forEach(function(e){e(t,n)})}},{key:"onChange",value:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).withoutHistory;this.applyRecord(e);var n=e.start,o=e.end,r=e.activeFormats,i=void 0===r?[]:r;this.onChangeEditableValue(e),this.savedContent=this.valueToFormat(e),this.props.onChange(this.savedContent),this.setState({start:n,end:o,activeFormats:i}),t||this.onCreateUndoLevel()}},{key:"onCreateUndoLevel",value:function(){this.lastHistoryValue!==this.savedContent&&(this.props.onCreateUndoLevel(),this.lastHistoryValue=this.savedContent)}},{key:"onDeleteKeyDown",value:function(e){var t=this.props,n=t.onMerge,o=t.onRemove;if(n||o){var r=e.keyCode===Ln.BACKSPACE;if(Object(c.isCollapsed)(this.createRecord())){var i=this.isEmpty();(i||Object(ro.isHorizontalEdge)(this.editableRef,r))&&(n&&n(!r),o&&i&&r&&o(!r),e.preventDefault())}}}},{key:"onKeyDown",value:function(e){var t=e.keyCode,n=e.shiftKey,o=e.altKey,r=e.metaKey,a=e.ctrlKey;if(n||o||r||a||t!==Ln.LEFT&&t!==Ln.RIGHT||this.handleHorizontalNavigation(e),t===Ln.SPACE&&"li"===this.multilineTag){var l=this.createRecord();if(Object(c.isCollapsed)(l)){var u=l.text[l.start-1];u&&u!==c.LINE_SEPARATOR||(this.onChange(Object(c.indentListItems)(l,{type:this.props.tagName})),e.preventDefault())}}if(t===Ln.DELETE||t===Ln.BACKSPACE){var b=this.createRecord(),f=b.replacements,p=b.text,h=b.start,v=b.end;if(0===h&&0!==v&&v===b.text.length)return this.onChange(Object(c.remove)(b)),void e.preventDefault();if(this.multilineTag){var m;if(t===Ln.BACKSPACE){var g=h-1;if(p[g]===c.LINE_SEPARATOR){var O=Object(c.isCollapsed)(b);if(O&&f[g]&&f[g].length){var k=f.slice();k[g]=f[g].slice(0,-1),m=Object(s.a)({},b,{replacements:k})}else m=Object(c.remove)(b,O?h-1:h,v)}}else if(p[v]===c.LINE_SEPARATOR){var j=Object(c.isCollapsed)(b);if(j&&f[v]&&f[v].length){var y=f.slice();y[v]=f[v].slice(0,-1),m=Object(s.a)({},b,{replacements:y})}else m=Object(c.remove)(b,h,j?v+1:v)}m&&(this.onChange(m),e.preventDefault())}this.onDeleteKeyDown(e)}else if(t===Ln.ENTER){e.preventDefault();var _=this.createRecord();if(this.props.onReplace){var S=Object(c.getTextContent)(_),C=Object(i.findTransform)(this.enterPatterns,function(e){return e.regExp.test(S)});if(C)return void this.props.onReplace([C.transform({content:S})])}this.multilineTag?e.shiftKey?this.onChange(Object(c.insertLineBreak)(_)):this.onSplit&&Object(c.isEmptyLine)(_)?this.onSplit.apply(this,Object(d.a)(Object(c.split)(_).map(this.valueToFormat))):this.onChange(Object(c.insertLineSeparator)(_)):e.shiftKey||!this.onSplit?this.onChange(Object(c.insertLineBreak)(_)):this.splitContent()}}},{key:"handleHorizontalNavigation",value:function(e){var t=this,n=this.createRecord(),o=n.formats,r=n.text,i=n.start,a=n.end,l=this.state.activeFormats,u=void 0===l?[]:l,d=Object(c.isCollapsed)(n),b="rtl"===ui(this.editableRef).direction?Ln.RIGHT:Ln.LEFT,f=e.keyCode===b;if(d&&0===u.length){if(0===i&&f)return;if(a===r.length&&!f)return}if(d){e.preventDefault();var p=o[i-1]||[],h=o[i]||[],v=u.length,m=h;if(p.length>h.length&&(m=p),p.lengthp.length&&v--):p.length>h.length&&(!f&&u.length>h.length&&v--,f&&u.length0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.onSplit){var n=this.createRecord(),o=Object(c.split)(n),r=Object(B.a)(o,2),i=r[0],a=r[1];Object(c.isEmpty)(a)?i=n:Object(c.isEmpty)(i)&&(a=n),t.paste&&(i=Object(c.isEmpty)(i)?null:i,a=Object(c.isEmpty)(a)?null:a),i&&(i=this.valueToFormat(i)),a&&(a=this.valueToFormat(a)),this.onSplit.apply(this,[i,a].concat(Object(d.a)(e)))}}},{key:"onPointerDown",value:function(e){var t=e.target;if(t!==this.editableRef&&!t.textContent){var n=t.parentNode,o=Array.from(n.childNodes).indexOf(t),r=t.ownerDocument.createRange(),i=si();r.setStart(t.parentNode,o),r.setEnd(t.parentNode,o+1),i.removeAllRanges(),i.addRange(r)}}},{key:"componentDidUpdate",value:function(e){var t=this,n=this.props,o=n.tagName,r=n.value,i=n.isSelected;if(o===e.tagName&&r!==e.value&&r!==this.savedContent){if(Array.isArray(r)&&Object(f.isEqual)(r,this.savedContent))return;var a=this.formatToValue(r);if(i){var l=this.formatToValue(e.value),s=Object(c.getTextContent)(l).length;a.start=s,a.end=s}this.applyRecord(a),this.savedContent=r}if(Object.keys(this.props).some(function(n){return 0===n.indexOf("format_")&&(Object(f.isPlainObject)(t.props[n])?Object.keys(t.props[n]).some(function(o){return t.props[n][o]!==e[n][o]}):t.props[n]!==e[n])})){var u=this.formatToValue(r);i&&(u.start=this.state.start,u.end=this.state.end),this.applyRecord(u)}}},{key:"getFormatProps",value:function(){return Object(f.pickBy)(this.props,function(e,t){return t.startsWith("format_")})}},{key:"formatToValue",value:function(e){return Array.isArray(e)?Object(c.create)({html:i.children.toHTML(e),multilineTag:this.multilineTag,multilineWrapperTags:this.multilineWrapperTags}):"string"===this.props.format?Object(c.create)({html:e,multilineTag:this.multilineTag,multilineWrapperTags:this.multilineWrapperTags}):null===e?Object(c.create)():e}},{key:"valueToEditableHTML",value:function(e){return Object(c.unstableToDom)({value:e,multilineTag:this.multilineTag,prepareEditableTree:this.props.prepareEditableTree}).body.innerHTML}},{key:"removeEditorOnlyFormats",value:function(e){return this.props.formatTypes.forEach(function(t){t.__experimentalCreatePrepareEditableTree&&(e=Object(c.removeFormat)(e,t.name,0,e.text.length))}),e}},{key:"valueToFormat",value:function(e){return e=this.removeEditorOnlyFormats(e),this.usedDeprecatedChildrenSource?i.children.fromDOM(Object(c.unstableToDom)({value:e,multilineTag:this.multilineTag,isEditableTree:!1}).body.childNodes):"string"===this.props.format?Object(c.toHTMLString)({value:e,multilineTag:this.multilineTag}):e}},{key:"render",value:function(){var e=this,t=this.props,n=t.tagName,o=void 0===n?"div":n,r=t.style,i=t.wrapperClassName,c=t.className,a=t.inlineToolbar,l=void 0!==a&&a,s=t.formattingControls,u=t.placeholder,d=t.keepPlaceholderOnFocus,b=void 0!==d&&d,f=t.isSelected,p=t.autocompleters,h=t.onTagNameChange,v=o,m=this.multilineTag,g=Wr(this.props),O=u&&(!f||b)&&this.isEmpty(),k=Xt()(i,"editor-rich-text block-editor-rich-text"),j=this.getRecord();return Object(Yt.createElement)("div",{className:k,onFocus:this.setFocusedElement},f&&"li"===this.multilineTag&&Object(Yt.createElement)(ni,{onTagNameChange:h,tagName:o,value:j,onChange:this.onChange}),f&&!l&&Object(Yt.createElement)(xn,null,Object(Yt.createElement)(Kr,{controls:s})),f&&l&&Object(Yt.createElement)(cn.IsolatedEventContainer,{className:"editor-rich-text__inline-toolbar block-editor-rich-text__inline-toolbar"},Object(Yt.createElement)(Kr,{controls:s})),Object(Yt.createElement)(fn,{onReplace:this.props.onReplace,completers:p,record:j,onChange:this.onChange},function(t){var n=t.listBoxId,i=t.activeId;return Object(Yt.createElement)(Yt.Fragment,null,Object(Yt.createElement)(Yr,Object(qt.a)({tagName:o,style:r,record:j,valueToEditableHTML:e.valueToEditableHTML,isPlaceholderVisible:O,"aria-label":u,"aria-autocomplete":"list","aria-owns":n,"aria-activedescendant":i},g,{className:c,key:v,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})),O&&Object(Yt.createElement)(o,{className:Xt()("editor-rich-text__editable block-editor-rich-text__editable",c),style:r},m?Object(Yt.createElement)(m,null,u):u),f&&Object(Yt.createElement)(zr,{value:j,onChange:e.onChange}))}),f&&Object(Yt.createElement)(ii,null))}}]),t}(Yt.Component);fi.defaultProps={formattingControls:["bold","italic","link","strikethrough"],format:"string",value:""};var pi=Object(Jt.compose)([Jt.withInstanceId,un(function(e,t){return!1===t.isSelected?{clientId:e.clientId}:!0===t.isSelected?{isSelected:e.isSelected,clientId:e.clientId}:{isSelected:e.isSelected&&e.focusedElement===t.instanceId,setFocusedElement:e.setFocusedElement,clientId:e.clientId}}),Object(l.withSelect)(function(e){var t=e("core/editor").canUserUseUnfilteredHTML,n=e("core/block-editor").isCaretWithinFormattedText,o=e("core/rich-text").getFormatTypes;return{canUserUseUnfilteredHTML:t(),isCaretWithinFormattedText:n(),formatTypes:o()}}),Object(l.withDispatch)(function(e){var t=e("core/block-editor");return{onCreateUndoLevel:t.__unstableMarkLastChangeAsPersistent,onEnterFormattedText:t.enterFormattedText,onExitFormattedText:t.exitFormattedText}}),Jt.withSafeTimeout,Object(cn.withFilters)("experimentalRichText")])(fi);pi.Content=function(e){var t,n=e.value,o=e.tagName,r=e.multiline,c=Object(u.a)(e,["value","tagName","multiline"]),a=n;!0!==r&&"p"!==r&&"li"!==r||(t=!0===r?"p":r),Array.isArray(n)&&(a=i.children.toHTML(n)),!a&&t&&(a="<".concat(t,">"));var l=Object(Yt.createElement)(Yt.RawHTML,null,a);return o?Object(Yt.createElement)(o,Object(f.omit)(c,["format"]),l):l},pi.isEmpty=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Array.isArray(e)&&!e||0===e.length},pi.Content.defaultProps={format:"string",value:""};var hi=pi,vi=Object(cn.withFilters)("editor.MediaUpload")(function(){return null}),mi=function(e){function t(){var e;return Object(Qt.a)(this,t),(e=Object(tn.a)(this,Object(nn.a)(t).apply(this,arguments))).toggleSettingsVisibility=e.toggleSettingsVisibility.bind(Object(rn.a)(Object(rn.a)(e))),e.state={isSettingsExpanded:!1},e}return Object(on.a)(t,e),Object(en.a)(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,o=e.position,r=void 0===o?"bottom center":o,i=e.focusOnMount,c=void 0===i?"firstElement":i,a=Object(u.a)(e,["children","renderSettings","position","focusOnMount"]),l=this.state.isSettingsExpanded,s=!!n&&l;return Object(Yt.createElement)(cn.Popover,Object(qt.a)({className:"editor-url-popover block-editor-url-popover",focusOnMount:c,position:r},a),Object(Yt.createElement)("div",{className:"editor-url-popover__row block-editor-url-popover__row"},t,!!n&&Object(Yt.createElement)(cn.IconButton,{className:"editor-url-popover__settings-toggle block-editor-url-popover__settings-toggle",icon:"arrow-down-alt2",label:Object(p.__)("Link Settings"),onClick:this.toggleSettingsVisibility,"aria-expanded":l})),s&&Object(Yt.createElement)("div",{className:"editor-url-popover__row block-editor-url-popover__row editor-url-popover__settings block-editor-url-popover__settings"},n()))}}]),t}(Yt.Component),gi=function(e){var t=e.src,n=e.onChange,o=e.onSubmit,r=e.onClose;return Object(Yt.createElement)(mi,{onClose:r},Object(Yt.createElement)("form",{className:"editor-media-placeholder__url-input-form block-editor-media-placeholder__url-input-form",onSubmit:o},Object(Yt.createElement)("input",{className:"editor-media-placeholder__url-input-field block-editor-media-placeholder__url-input-field",type:"url","aria-label":Object(p.__)("URL"),placeholder:Object(p.__)("Paste or type URL"),onChange:n,value:t}),Object(Yt.createElement)(cn.IconButton,{className:"editor-media-placeholder__url-input-submit-button block-editor-media-placeholder__url-input-submit-button",icon:"editor-break",label:Object(p.__)("Apply"),type:"submit"})))},Oi=function(e){function t(){var e;return Object(Qt.a)(this,t),(e=Object(tn.a)(this,Object(nn.a)(t).apply(this,arguments))).state={src:"",isURLInputVisible:!1},e.onChangeSrc=e.onChangeSrc.bind(Object(rn.a)(Object(rn.a)(e))),e.onSubmitSrc=e.onSubmitSrc.bind(Object(rn.a)(Object(rn.a)(e))),e.onUpload=e.onUpload.bind(Object(rn.a)(Object(rn.a)(e))),e.onFilesUpload=e.onFilesUpload.bind(Object(rn.a)(Object(rn.a)(e))),e.openURLInput=e.openURLInput.bind(Object(rn.a)(Object(rn.a)(e))),e.closeURLInput=e.closeURLInput.bind(Object(rn.a)(Object(rn.a)(e))),e}return Object(on.a)(t,e),Object(en.a)(t,[{key:"onlyAllowsImages",value:function(){var e=this.props.allowedTypes;return!!e&&Object(f.every)(e,function(e){return"image"===e||Object(f.startsWith)(e,"image/")})}},{key:"componentDidMount",value:function(){this.setState({src:Object(f.get)(this.props.value,["src"],"")})}},{key:"componentDidUpdate",value:function(e){Object(f.get)(e.value,["src"],"")!==Object(f.get)(this.props.value,["src"],"")&&this.setState({src:Object(f.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=this.props,n=t.onSelect,o=t.multiple,r=t.onError,i=t.allowedTypes;(0,t.mediaUpload)({allowedTypes:i,filesList:e,onFileChange:o?n:function(e){var t=Object(B.a)(e,1)[0];return n(t)},onError:r})}},{key:"openURLInput",value:function(){this.setState({isURLInputVisible:!0})}},{key:"closeURLInput",value:function(){this.setState({isURLInputVisible:!1})}},{key:"render",value:function(){var e=this.props,t=e.accept,n=e.icon,o=e.className,r=e.labels,i=void 0===r?{}:r,c=e.onSelect,a=e.value,l=void 0===a?{}:a,s=e.onSelectURL,u=e.onHTMLDrop,d=void 0===u?f.noop:u,b=e.multiple,h=void 0!==b&&b,v=e.notices,m=e.allowedTypes,g=void 0===m?[]:m,O=e.hasUploadPermissions,k=e.mediaUpload,j=this.state,y=j.isURLInputVisible,_=j.src,S=i.instructions||"",C=i.title||"";if(O||s||(S=Object(p.__)("To edit this block, you need permission to upload media.")),!S||!C){var E=1===g.length,w=E&&"audio"===g[0],I=E&&"image"===g[0],T=E&&"video"===g[0];S||(O?(S=Object(p.__)("Drag a media file, upload a new one or select a file from your library."),w?S=Object(p.__)("Drag an audio, upload a new one or select a file from your library."):I?S=Object(p.__)("Drag an image, upload a new one or select a file from your library."):T&&(S=Object(p.__)("Drag a video, upload a new one or select a file from your library."))):!O&&s&&(S=Object(p.__)("Given your current role, you can only link a media file, you cannot upload."),w?S=Object(p.__)("Given your current role, you can only link an audio, you cannot upload."):I?S=Object(p.__)("Given your current role, you can only link an image, you cannot upload."):T&&(S=Object(p.__)("Given your current role, you can only link a video, you cannot upload.")))),C||(C=Object(p.__)("Media"),w?C=Object(p.__)("Audio"):I?C=Object(p.__)("Image"):T&&(C=Object(p.__)("Video")))}return Object(Yt.createElement)(cn.Placeholder,{icon:n,label:C,instructions:S,className:Xt()("editor-media-placeholder block-editor-media-placeholder",o),notices:v},Object(Yt.createElement)(po,null,!!k&&Object(Yt.createElement)(Yt.Fragment,null,Object(Yt.createElement)(cn.DropZone,{onFilesDrop:this.onFilesUpload,onHTMLDrop:d}),Object(Yt.createElement)(cn.FormFileUpload,{isLarge:!0,className:"editor-media-placeholder__button block-editor-media-placeholder__button",onChange:this.onUpload,accept:t,multiple:h},Object(p.__)("Upload"))),Object(Yt.createElement)(vi,{gallery:h&&this.onlyAllowsImages(),multiple:h,onSelect:c,allowedTypes:g,value:l.id,render:function(e){var t=e.open;return Object(Yt.createElement)(cn.Button,{isLarge:!0,className:"editor-media-placeholder__button block-editor-media-placeholder__button",onClick:t},Object(p.__)("Media Library"))}})),s&&Object(Yt.createElement)("div",{className:"editor-media-placeholder__url-input-container block-editor-media-placeholder__url-input-container"},Object(Yt.createElement)(cn.Button,{className:"editor-media-placeholder__button block-editor-media-placeholder__button",onClick:this.openURLInput,isToggled:y,isLarge:!0},Object(p.__)("Insert from URL")),y&&Object(Yt.createElement)(gi,{src:_,onChange:this.onChangeSrc,onSubmit:this.onSubmitSrc,onClose:this.closeURLInput})))}}]),t}(Yt.Component),ki=Object(l.withSelect)(function(e){var t=e("core").canUser,n=e("core/block-editor").getSettings;return{hasUploadPermissions:Object(f.defaultTo)(t("create","media"),!0),mediaUpload:n().__experimentalMediaUpload}}),ji=Object(Jt.compose)(ki,Object(cn.withFilters)("editor.MediaPlaceholder"))(Oi),yi=n(33),_i=n.n(yi),Si=function(e){return e.stopPropagation()},Ci=function(e){function t(e){var n,o=e.autocompleteRef;return Object(Qt.a)(this,t),(n=Object(tn.a)(this,Object(nn.a)(t).apply(this,arguments))).onChange=n.onChange.bind(Object(rn.a)(Object(rn.a)(n))),n.onKeyDown=n.onKeyDown.bind(Object(rn.a)(Object(rn.a)(n))),n.autocompleteRef=o||Object(Yt.createRef)(),n.inputRef=Object(Yt.createRef)(),n.updateSuggestions=Object(f.throttle)(n.updateSuggestions.bind(Object(rn.a)(Object(rn.a)(n))),200),n.suggestionNodes=[],n.state={posts:[],showSuggestions:!1,selectedSuggestion:null},n}return Object(on.a)(t,e),Object(en.a)(t,[{key:"componentDidUpdate",value:function(){var e=this,t=this.state,n=t.showSuggestions,o=t.selectedSuggestion;n&&null!==o&&!this.scrollingIntoView&&(this.scrollingIntoView=!0,Uo()(this.suggestionNodes[o],this.autocompleteRef.current,{onlyScrollIfNeeded:!0}),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;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 n=_i()({path:Object(Vo.addQueryArgs)("/wp/v2/search",{search:e,per_page:20,type:"post"})});n.then(function(e){t.suggestionsRequest===n&&(t.setState({posts:e,loading:!1}),e.length?t.props.debouncedSpeak(Object(p.sprintf)(Object(p._n)("%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(Object(p.__)("No results."),"assertive"))}).catch(function(){t.suggestionsRequest===n&&t.setState({loading:!1})}),this.suggestionsRequest=n}}},{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,o=t.selectedSuggestion,r=t.posts,i=t.loading;if(n&&r.length&&!i){var c=this.state.posts[this.state.selectedSuggestion];switch(e.keyCode){case Ln.UP:e.stopPropagation(),e.preventDefault();var a=o?o-1:r.length-1;this.setState({selectedSuggestion:a});break;case Ln.DOWN:e.stopPropagation(),e.preventDefault();var l=null===o||o===r.length-1?0:o+1;this.setState({selectedSuggestion:l});break;case Ln.TAB:null!==this.state.selectedSuggestion&&(this.selectLink(c),this.props.speak(Object(p.__)("Link selected.")));break;case Ln.ENTER:null!==this.state.selectedSuggestion&&(e.stopPropagation(),this.selectLink(c))}}else switch(e.keyCode){case Ln.UP:0!==e.target.selectionStart&&(e.stopPropagation(),e.preventDefault(),e.target.setSelectionRange(0,0));break;case Ln.DOWN: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,o=void 0===n?"":n,r=t.autoFocus,i=void 0===r||r,c=t.instanceId,a=t.className,l=this.state,s=l.showSuggestions,u=l.posts,d=l.selectedSuggestion,b=l.loading;return Object(Yt.createElement)("div",{className:Xt()("editor-url-input block-editor-url-input",a)},Object(Yt.createElement)("input",{autoFocus:i,type:"text","aria-label":Object(p.__)("URL"),required:!0,value:o,onChange:this.onChange,onInput:Si,placeholder:Object(p.__)("Paste URL or type to search"),onKeyDown:this.onKeyDown,role:"combobox","aria-expanded":s,"aria-autocomplete":"list","aria-owns":"block-editor-url-input-suggestions-".concat(c),"aria-activedescendant":null!==d?"block-editor-url-input-suggestion-".concat(c,"-").concat(d):void 0,ref:this.inputRef}),b&&Object(Yt.createElement)(cn.Spinner,null),s&&!!u.length&&Object(Yt.createElement)(cn.Popover,{position:"bottom",noArrow:!0,focusOnMount:!1},Object(Yt.createElement)("div",{className:"editor-url-input__suggestions block-editor-url-input__suggestions",id:"editor-url-input-suggestions-".concat(c),ref:this.autocompleteRef,role:"listbox"},u.map(function(t,n){return Object(Yt.createElement)("button",{key:t.id,role:"option",tabIndex:"-1",id:"block-editor-url-input-suggestion-".concat(c,"-").concat(n),ref:e.bindSuggestionNode(n),className:Xt()("editor-url-input__suggestion block-editor-url-input__suggestion",{"is-selected":n===d}),onClick:function(){return e.handleOnClick(t)},"aria-selected":n===d},Object(hr.decodeEntities)(t.title)||Object(p.__)("(no title)"))}))))}}]),t}(Yt.Component),Ei=Object(cn.withSpokenMessages)(Object(Jt.withInstanceId)(Ci)),wi=function(e){function t(){var e;return Object(Qt.a)(this,t),(e=Object(tn.a)(this,Object(nn.a)(t).apply(this,arguments))).toggle=e.toggle.bind(Object(rn.a)(Object(rn.a)(e))),e.submitLink=e.submitLink.bind(Object(rn.a)(Object(rn.a)(e))),e.state={expanded:!1},e}return Object(on.a)(t,e),Object(en.a)(t,[{key:"toggle",value:function(){this.setState({expanded:!this.state.expanded})}},{key:"submitLink",value:function(e){e.preventDefault(),this.toggle()}},{key:"render",value:function(){var e=this.props,t=e.url,n=e.onChange,o=this.state.expanded,r=t?Object(p.__)("Edit Link"):Object(p.__)("Insert Link");return Object(Yt.createElement)("div",{className:"editor-url-input__button block-editor-url-input__button"},Object(Yt.createElement)(cn.IconButton,{icon:"admin-links",label:r,onClick:this.toggle,className:Xt()("components-toolbar__control",{"is-active":t})}),o&&Object(Yt.createElement)("form",{className:"editor-url-input__button-modal block-editor-url-input__button-modal",onSubmit:this.submitLink},Object(Yt.createElement)("div",{className:"editor-url-input__button-modal-line block-editor-url-input__button-modal-line"},Object(Yt.createElement)(cn.IconButton,{className:"editor-url-input__back block-editor-url-input__back",icon:"arrow-left-alt",label:Object(p.__)("Close"),onClick:this.toggle}),Object(Yt.createElement)(Ei,{value:t||"",onChange:n}),Object(Yt.createElement)(cn.IconButton,{icon:"editor-break",label:Object(p.__)("Submit"),type:"submit"}))))}}]),t}(Yt.Component);var Ii=Object(Jt.compose)([Object(l.withSelect)(function(e,t){var n=e("core/block-editor"),o=n.getBlocksByClientId,r=n.getTemplateLock,c=n.getBlockRootClientId,a=o(t.clientIds),l=Object(f.every)(a,function(e){return!!e&&Object(i.hasBlockSupport)(e.name,"multiple",!0)}),s=c(t.clientIds[0]);return{isLocked:!!r(s),blocks:a,canDuplicate:l,rootClientId:s,extraProps:t}}),Object(l.withDispatch)(function(e,t,n){var o=n.select,r=t.clientIds,c=t.rootClientId,a=t.blocks,l=t.isLocked,s=t.canDuplicate,u=e("core/block-editor"),d=u.insertBlocks,b=u.multiSelect,p=u.removeBlocks,h=u.insertDefaultBlock;return{onDuplicate:function(){if(!l&&s){var e=(0,o("core/block-editor").getBlockIndex)(Object(f.last)(Object(f.castArray)(r)),c),t=a.map(function(e){return Object(i.cloneBlock)(e)});d(t,e+1,c),t.length>1&&b(Object(f.first)(t).clientId,Object(f.last)(t).clientId)}},onRemove:function(){l||p(r)},onInsertBefore:function(){if(!l){var e=(0,o("core/block-editor").getBlockIndex)(Object(f.first)(Object(f.castArray)(r)),c);h({},c,e)}},onInsertAfter:function(){if(!l){var e=(0,o("core/block-editor").getBlockIndex)(Object(f.last)(Object(f.castArray)(r)),c);h({},c,e+1)}}}})])(function(e){var t=e.onDuplicate,n=e.onRemove,o=e.onInsertBefore,r=e.onInsertAfter,i=e.isLocked,c=e.canDuplicate;return(0,e.children)({onDuplicate:t,onRemove:n,onInsertAfter:r,onInsertBefore:o,isLocked:i,canDuplicate:c})}),Ti=function(e){return e.preventDefault(),e},Bi={duplicate:{raw:Ln.rawShortcut.primaryShift("d"),display:Ln.displayShortcut.primaryShift("d")},removeBlock:{raw:Ln.rawShortcut.access("z"),display:Ln.displayShortcut.access("z")},insertBefore:{raw:Ln.rawShortcut.primaryAlt("t"),display:Ln.displayShortcut.primaryAlt("t")},insertAfter:{raw:Ln.rawShortcut.primaryAlt("y"),display:Ln.displayShortcut.primaryAlt("y")}},xi=function(e){function t(){var e;return Object(Qt.a)(this,t),(e=Object(tn.a)(this,Object(nn.a)(t).apply(this,arguments))).selectAll=e.selectAll.bind(Object(rn.a)(Object(rn.a)(e))),e.deleteSelectedBlocks=e.deleteSelectedBlocks.bind(Object(rn.a)(Object(rn.a)(e))),e.clearMultiSelection=e.clearMultiSelection.bind(Object(rn.a)(Object(rn.a)(e))),e}return Object(on.a)(t,e),Object(en.a)(t,[{key:"selectAll",value:function(e){var t=this.props,n=t.rootBlocksClientIds,o=t.onMultiSelect;e.preventDefault(),o(Object(f.first)(n),Object(f.last)(n))}},{key:"deleteSelectedBlocks",value:function(e){var t=this.props,n=t.selectedBlockClientIds,o=t.hasMultiSelection,r=t.onRemove,i=t.isLocked;o&&(e.preventDefault(),i||r(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(Yt.createElement)(Yt.Fragment,null,Object(Yt.createElement)(cn.KeyboardShortcuts,{shortcuts:(e={},Object(b.a)(e,Ln.rawShortcut.primary("a"),this.selectAll),Object(b.a)(e,"backspace",this.deleteSelectedBlocks),Object(b.a)(e,"del",this.deleteSelectedBlocks),Object(b.a)(e,"escape",this.clearMultiSelection),e)}),t.length>0&&Object(Yt.createElement)(Ii,{clientIds:t},function(e){var t,n=e.onDuplicate,o=e.onRemove,r=e.onInsertAfter,i=e.onInsertBefore;return Object(Yt.createElement)(cn.KeyboardShortcuts,{bindGlobal:!0,shortcuts:(t={},Object(b.a)(t,Bi.duplicate.raw,Object(f.flow)(Ti,n)),Object(b.a)(t,Bi.removeBlock.raw,Object(f.flow)(Ti,o)),Object(b.a)(t,Bi.insertBefore.raw,Object(f.flow)(Ti,i)),Object(b.a)(t,Bi.insertAfter.raw,Object(f.flow)(Ti,r)),t)})}))}}]),t}(Yt.Component),Li=Object(Jt.compose)([Object(l.withSelect)(function(e){var t=e("core/block-editor"),n=t.getBlockOrder,o=t.getMultiSelectedBlockClientIds,r=t.hasMultiSelection,i=t.getBlockRootClientId,c=t.getTemplateLock,a=(0,t.getSelectedBlockClientId)(),l=a?[a]:o();return{rootBlocksClientIds:n(),hasMultiSelection:r(),isLocked:Object(f.some)(l,function(e){return!!c(i(e))}),selectedBlockClientIds:l}}),Object(l.withDispatch)(function(e){var t=e("core/block-editor");return{clearSelectedBlock:t.clearSelectedBlock,onMultiSelect:t.multiSelect,onRemove:t.removeBlocks}})])(xi),Ni=Object(l.withSelect)(function(e){return{selectedBlockClientId:e("core/block-editor").getBlockSelectionStart()}})(function(e){var t=e.selectedBlockClientId;return t&&Object(Yt.createElement)(cn.Button,{isDefault:!0,type:"button",className:"editor-skip-to-selected-block block-editor-skip-to-selected-block",onClick:function(){ur(t).closest(".block-editor-block-list__block").focus()}},Object(p.__)("Skip to the selected block"))}),Mi=n(135),Ri=n.n(Mi);function Ai(e,t,n){var o=new Ri.a(e);return t&&o.remove("is-style-"+t.name),o.add("is-style-"+n.name),o.value}var Di=Object(Jt.compose)([Object(l.withSelect)(function(e,t){var n=t.clientId,o=e("core/block-editor").getBlock,r=e("core/blocks").getBlockStyles,c=o(n),a=Object(i.getBlockType)(c.name);return{name:c.name,attributes:c.attributes,className:c.attributes.className||"",styles:r(c.name),type:a}}),Object(l.withDispatch)(function(e,t){var n=t.clientId;return{onChangeClassName:function(t){e("core/block-editor").updateBlockAttributes(n,{className:t})}}})])(function(e){var t=e.styles,n=e.className,o=e.onChangeClassName,r=e.name,i=e.attributes,c=e.type,a=e.onSwitch,l=void 0===a?f.noop:a,u=e.onHoverClassName,b=void 0===u?f.noop:u;if(!t||0===t.length)return null;c.styles||Object(f.find)(t,"isDefault")||(t=[{name:"default",label:Object(p._x)("Default","block style"),isDefault:!0}].concat(Object(d.a)(t)));var h=function(e,t){var n=!0,o=!1,r=void 0;try{for(var i,c=new Ri.a(t).values()[Symbol.iterator]();!(n=(i=c.next()).done);n=!0){var a=i.value;if(-1!==a.indexOf("is-style-")){var l=a.substring(9),s=Object(f.find)(e,{name:l});if(s)return s}}}catch(e){o=!0,r=e}finally{try{n||null==c.return||c.return()}finally{if(o)throw r}}return Object(f.find)(e,"isDefault")}(t,n);function v(e){var t=Ai(n,h,e);o(t),b(null),l()}return Object(Yt.createElement)("div",{className:"editor-block-styles block-editor-block-styles"},t.map(function(e){var t=Ai(n,h,e);return Object(Yt.createElement)("div",{key:e.name,className:Xt()("editor-block-styles__item block-editor-block-styles__item",{"is-active":h===e}),onClick:function(){return v(e)},onKeyDown:function(t){Ln.ENTER!==t.keyCode&&Ln.SPACE!==t.keyCode||(t.preventDefault(),v(e))},onMouseEnter:function(){return b(t)},onMouseLeave:function(){return b(null)},role:"button",tabIndex:"0","aria-label":e.label||e.name},Object(Yt.createElement)("div",{className:"editor-block-styles__item-preview block-editor-block-styles__item-preview"},Object(Yt.createElement)(zo,{name:r,attributes:Object(s.a)({},i,{className:t})})),Object(Yt.createElement)("div",{className:"editor-block-styles__item-label block-editor-block-styles__item-label"},e.label||e.name))}))}),Pi=n(98);var Fi=Object(l.withSelect)(function(e){return{blocks:(0,e("core/block-editor").getMultiSelectedBlocks)()}})(function(e){var t=e.blocks,n=Object(Pi.count)(Object(i.serialize)(t),"words");return Object(Yt.createElement)("div",{className:"editor-multi-selection-inspector__card block-editor-multi-selection-inspector__card"},Object(Yt.createElement)(Nn,{icon:Object(Yt.createElement)(cn.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(Yt.createElement)(cn.Path,{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(Yt.createElement)("div",{className:"editor-multi-selection-inspector__card-content block-editor-multi-selection-inspector__card-content"},Object(Yt.createElement)("div",{className:"editor-multi-selection-inspector__card-title block-editor-multi-selection-inspector__card-title"},Object(p.sprintf)(Object(p._n)("%d block","%d blocks",t.length),t.length)),Object(Yt.createElement)("div",{className:"editor-multi-selection-inspector__card-description block-editor-multi-selection-inspector__card-description"},Object(p.sprintf)(Object(p._n)("%d word","%d words",n),n))))}),Hi=Object(l.withSelect)(function(e){var t=e("core/block-editor"),n=t.getSelectedBlockClientId,o=t.getSelectedBlockCount,r=t.getBlockName,c=e("core/blocks").getBlockStyles,a=n(),l=a&&r(a),s=a&&Object(i.getBlockType)(l),u=a&&c(l);return{count:o(),hasBlockStyles:u&&u.length>0,selectedBlockName:l,selectedBlockClientId:a,blockType:s}})(function(e){var t=e.selectedBlockClientId,n=e.selectedBlockName,o=e.blockType,r=e.count,c=e.hasBlockStyles;if(r>1)return Object(Yt.createElement)(Fi,null);var a=n===Object(i.getUnregisteredTypeHandlerName)();return o&&t&&!a?Object(Yt.createElement)(Yt.Fragment,null,Object(Yt.createElement)("div",{className:"editor-block-inspector__card block-editor-block-inspector__card"},Object(Yt.createElement)(Nn,{icon:o.icon,showColors:!0}),Object(Yt.createElement)("div",{className:"editor-block-inspector__card-content block-editor-block-inspector__card-content"},Object(Yt.createElement)("div",{className:"editor-block-inspector__card-title block-editor-block-inspector__card-title"},o.title),Object(Yt.createElement)("div",{className:"editor-block-inspector__card-description block-editor-block-inspector__card-description"},o.description))),c&&Object(Yt.createElement)("div",null,Object(Yt.createElement)(cn.PanelBody,{title:Object(p.__)("Styles"),initialOpen:!1},Object(Yt.createElement)(Di,{clientId:t}))),Object(Yt.createElement)("div",null,Object(Yt.createElement)(xr.Slot,null)),Object(Yt.createElement)("div",null,Object(Yt.createElement)(Er.Slot,null,function(e){return!Object(f.isEmpty)(e)&&Object(Yt.createElement)(cn.PanelBody,{className:"editor-block-inspector__advanced block-editor-block-inspector__advanced",title:Object(p.__)("Advanced"),initialOpen:!1},e)})),Object(Yt.createElement)(Ni,{key:"back"})):Object(Yt.createElement)("span",{className:"editor-block-inspector__no-blocks block-editor-block-inspector__no-blocks"},Object(p.__)("No block selected."))}),Ui=function(e){function t(){var e;return Object(Qt.a)(this,t),(e=Object(tn.a)(this,Object(nn.a)(t).apply(this,arguments))).bindContainer=e.bindContainer.bind(Object(rn.a)(Object(rn.a)(e))),e.clearSelectionIfFocusTarget=e.clearSelectionIfFocusTarget.bind(Object(rn.a)(Object(rn.a)(e))),e}return Object(on.a)(t,e),Object(en.a)(t,[{key:"bindContainer",value:function(e){this.container=e}},{key:"clearSelectionIfFocusTarget",value:function(e){var t=this.props,n=t.hasSelectedBlock,o=t.hasMultiSelection,r=t.clearSelectedBlock,i=n||o;e.target===this.container&&i&&r()}},{key:"render",value:function(){return Object(Yt.createElement)("div",Object(qt.a)({tabIndex:-1,onFocus:this.clearSelectionIfFocusTarget,ref:this.bindContainer},Object(f.omit)(this.props,["clearSelectedBlock","hasSelectedBlock","hasMultiSelection"])))}}]),t}(Yt.Component),Vi=Object(Jt.compose)([Object(l.withSelect)(function(e){var t=e("core/block-editor"),n=t.hasSelectedBlock,o=t.hasMultiSelection;return{hasSelectedBlock:n(),hasMultiSelection:o()}}),Object(l.withDispatch)(function(e){return{clearSelectedBlock:e("core/block-editor").clearSelectedBlock}})])(Ui);var zi=Object(Jt.compose)([Object(l.withSelect)(function(e,t){var n=t.clientId,o=e("core/block-editor"),r=o.getBlock,c=o.getBlockMode,a=r(n);return{mode:c(n),blockType:a?Object(i.getBlockType)(a.name):null}}),Object(l.withDispatch)(function(e,t){var n=t.onToggle,o=void 0===n?f.noop:n,r=t.clientId;return{onToggleMode:function(){e("core/block-editor").toggleBlockMode(r),o()}}})])(function(e){var t=e.blockType,n=e.mode,o=e.onToggleMode,r=e.small,c=void 0!==r&&r;if(!Object(i.hasBlockSupport)(t,"html",!0))return null;var a="visual"===n?Object(p.__)("Edit as HTML"):Object(p.__)("Edit visually");return Object(Yt.createElement)(cn.MenuItem,{className:"editor-block-settings-menu__control block-editor-block-settings-menu__control",onClick:o,icon:"html"},!c&&a)});var Ki=Object(Jt.compose)([Object(l.withSelect)(function(e,t){var n=t.clientIds,o=e("core/block-editor"),r=o.getBlocksByClientId,c=o.canInsertBlockType,a=e("core/editor").__experimentalGetReusableBlock,l=e("core").canUser,s=r(n),u=1===s.length&&s[0]&&Object(i.isReusableBlock)(s[0])&&!!a(s[0].attributes.ref);return{isReusable:u,isVisible:u||c("core/block")&&Object(f.every)(s,function(e){return!!e&&e.isValid&&Object(i.hasBlockSupport)(e.name,"reusable",!0)})&&!!l("create","blocks")}}),Object(l.withDispatch)(function(e,t){var n=t.clientIds,o=t.onToggle,r=void 0===o?f.noop:o,i=e("core/editor"),c=i.__experimentalConvertBlockToReusable,a=i.__experimentalConvertBlockToStatic;return{onConvertToStatic:function(){1===n.length&&(a(n[0]),r())},onConvertToReusable:function(){c(n),r()}}})])(function(e){var t=e.isVisible,n=e.isReusable,o=e.onConvertToStatic,r=e.onConvertToReusable;return t?Object(Yt.createElement)(Yt.Fragment,null,!n&&Object(Yt.createElement)(cn.MenuItem,{className:"editor-block-settings-menu__control block-editor-block-settings-menu__control",icon:"controls-repeat",onClick:r},Object(p.__)("Add to Reusable Blocks")),n&&Object(Yt.createElement)(cn.MenuItem,{className:"editor-block-settings-menu__control block-editor-block-settings-menu__control",icon:"controls-repeat",onClick:o},Object(p.__)("Convert to Regular Block"))):null});var Wi=Object(Jt.compose)([Object(l.withSelect)(function(e,t){var n=t.clientId,o=e("core/block-editor").getBlock,r=e("core").canUser,c=e("core/editor").__experimentalGetReusableBlock,a=o(n),l=a&&Object(i.isReusableBlock)(a)?c(a.attributes.ref):null;return{isVisible:!!l&&!!r("delete","blocks",l.id),isDisabled:l&&l.isTemporary}}),Object(l.withDispatch)(function(e,t,n){var o=t.clientId,r=t.onToggle,i=void 0===r?f.noop:r,c=n.select,a=e("core/editor").__experimentalDeleteReusableBlock,l=c("core/block-editor").getBlock;return{onDelete:function(){if(window.confirm(Object(p.__)("Are you sure you want to delete this Reusable Block?\n\nIt will be permanently removed from all posts and pages that use it."))){var e=l(o);a(e.attributes.ref),i()}}}})])(function(e){var t=e.isVisible,n=e.isDisabled,o=e.onDelete;return t?Object(Yt.createElement)(cn.MenuItem,{className:"editor-block-settings-menu__control block-editor-block-settings-menu__control",icon:"no",disabled:n,onClick:function(){return o()}},Object(p.__)("Remove from Reusable Blocks")):null});function Gi(e){var t=e.shouldRender,n=e.onClick,o=e.small;if(!t)return null;var r=Object(p.__)("Convert to Blocks");return Object(Yt.createElement)(cn.MenuItem,{className:"editor-block-settings-menu__control block-editor-block-settings-menu__control",onClick:n,icon:"screenoptions"},!o&&r)}var qi=Object(Jt.compose)(Object(l.withSelect)(function(e,t){var n=t.clientId,o=e("core/block-editor").getBlock(n);return{block:o,shouldRender:o&&"core/html"===o.name}}),Object(l.withDispatch)(function(e,t){var n=t.block;return{onClick:function(){return e("core/block-editor").replaceBlocks(n.clientId,Object(i.rawHandler)({HTML:Object(i.getBlockContent)(n)}))}}}))(Gi),Yi=Object(Jt.compose)(Object(l.withSelect)(function(e,t){var n=t.clientId,o=e("core/block-editor").getBlock(n);return{block:o,shouldRender:o&&o.name===Object(i.getFreeformContentHandlerName)()}}),Object(l.withDispatch)(function(e,t){var n=t.block;return{onClick:function(){return e("core/block-editor").replaceBlocks(n.clientId,Object(i.rawHandler)({HTML:Object(i.serialize)(n)}))}}}))(Gi),$i=Object(cn.createSlotFill)("_BlockSettingsMenuFirstItem"),Xi=$i.Fill,Ji=$i.Slot;Xi.Slot=Ji;var Zi=Xi,Qi=Object(cn.createSlotFill)("_BlockSettingsMenuPluginsExtension"),ec=Qi.Fill,tc=Qi.Slot;ec.Slot=tc;var nc=ec;var oc=Object(l.withDispatch)(function(e){var t=e("core/block-editor").selectBlock;return{onSelect:function(e){t(e)}}})(function(e){var t=e.clientIds,n=e.onSelect,o=Object(f.castArray)(t),r=o.length,i=o[0];return Object(Yt.createElement)(Ii,{clientIds:t},function(e){var o=e.onDuplicate,c=e.onRemove,a=e.onInsertAfter,l=e.onInsertBefore,s=e.canDuplicate,u=e.isLocked;return Object(Yt.createElement)(cn.Dropdown,{contentClassName:"editor-block-settings-menu__popover block-editor-block-settings-menu__popover",position:"bottom right",renderToggle:function(e){var t=e.onToggle,o=e.isOpen,c=Xt()("editor-block-settings-menu__toggle block-editor-block-settings-menu__toggle",{"is-opened":o}),a=o?Object(p.__)("Hide options"):Object(p.__)("More options");return Object(Yt.createElement)(cn.Toolbar,{controls:[{icon:"ellipsis",title:a,onClick:function(){1===r&&n(i),t()},className:c,extraProps:{"aria-expanded":o}}]})},renderContent:function(e){var n=e.onClose;return Object(Yt.createElement)(cn.NavigableMenu,{className:"editor-block-settings-menu__content block-editor-block-settings-menu__content"},Object(Yt.createElement)(Zi.Slot,{fillProps:{onClose:n}}),1===r&&Object(Yt.createElement)(Yi,{clientId:i}),1===r&&Object(Yt.createElement)(qi,{clientId:i}),!u&&s&&Object(Yt.createElement)(cn.MenuItem,{className:"editor-block-settings-menu__control block-editor-block-settings-menu__control",onClick:o,icon:"admin-page",shortcut:Bi.duplicate.display},Object(p.__)("Duplicate")),!u&&Object(Yt.createElement)(Yt.Fragment,null,Object(Yt.createElement)(cn.MenuItem,{className:"editor-block-settings-menu__control block-editor-block-settings-menu__control",onClick:l,icon:"insert-before",shortcut:Bi.insertBefore.display},Object(p.__)("Insert Before")),Object(Yt.createElement)(cn.MenuItem,{className:"editor-block-settings-menu__control block-editor-block-settings-menu__control",onClick:a,icon:"insert-after",shortcut:Bi.insertAfter.display},Object(p.__)("Insert After"))),1===r&&Object(Yt.createElement)(zi,{clientId:i,onToggle:n}),Object(Yt.createElement)(Ki,{clientIds:t,onToggle:n}),Object(Yt.createElement)(nc.Slot,{fillProps:{clientIds:t,onClose:n}}),Object(Yt.createElement)("div",{className:"editor-block-settings-menu__separator block-editor-block-settings-menu__separator"}),1===r&&Object(Yt.createElement)(Wi,{clientId:i,onToggle:n}),!u&&Object(Yt.createElement)(cn.MenuItem,{className:"editor-block-settings-menu__control block-editor-block-settings-menu__control",onClick:c,icon:"trash",shortcut:Bi.removeBlock.display},Object(p.__)("Remove Block")))}})})}),rc=function(e){function t(){var e;return Object(Qt.a)(this,t),(e=Object(tn.a)(this,Object(nn.a)(t).apply(this,arguments))).state={hoveredClassName:null},e.onHoverClassName=e.onHoverClassName.bind(Object(rn.a)(Object(rn.a)(e))),e}return Object(on.a)(t,e),Object(en.a)(t,[{key:"onHoverClassName",value:function(e){this.setState({hoveredClassName:e})}},{key:"render",value:function(){var e=this,t=this.props,n=t.blocks,o=t.onTransform,r=t.inserterItems,c=t.hasBlockStyles,a=this.state.hoveredClassName;if(!n||!n.length)return null;var l,u=Object(f.mapKeys)(r,function(e){return e.name}),d=Object(f.orderBy)(Object(f.filter)(Object(i.getPossibleBlockTransformations)(n),function(e){return e&&!!u[e.name]}),function(e){return u[e.name].frecency},"desc");if(1===Object(f.uniq)(Object(f.map)(n,"name")).length){var b=n[0].name,h=Object(i.getBlockType)(b);l=h.icon}else l="layout";return c||d.length?Object(Yt.createElement)(cn.Dropdown,{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,o=e.isOpen,r=1===n.length?Object(p.__)("Change block type or style"):Object(p.sprintf)(Object(p._n)("Change type of %d block","Change type of %d blocks",n.length),n.length);return Object(Yt.createElement)(cn.Toolbar,null,Object(Yt.createElement)(cn.IconButton,{className:"editor-block-switcher__toggle block-editor-block-switcher__toggle",onClick:t,"aria-haspopup":"true","aria-expanded":o,label:r,tooltip:r,onKeyDown:function(e){o||e.keyCode!==Ln.DOWN||(e.preventDefault(),e.stopPropagation(),t())},icon:Object(Yt.createElement)(Yt.Fragment,null,Object(Yt.createElement)(Nn,{icon:l,showColors:!0}),Object(Yt.createElement)(cn.SVG,{className:"editor-block-switcher__transform block-editor-block-switcher__transform",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(Yt.createElement)(cn.Path,{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 r=t.onClose;return Object(Yt.createElement)(Yt.Fragment,null,c&&Object(Yt.createElement)(cn.PanelBody,{title:Object(p.__)("Block Styles"),initialOpen:!0},Object(Yt.createElement)(Di,{clientId:n[0].clientId,onSwitch:r,onHoverClassName:e.onHoverClassName})),0!==d.length&&Object(Yt.createElement)(cn.PanelBody,{title:Object(p.__)("Transform To:"),initialOpen:!0},Object(Yt.createElement)(Go,{items:d.map(function(e){return{id:e.name,icon:e.icon,title:e.title,hasChildBlocksWithInserterSupport:Object(i.hasChildBlocksWithInserterSupport)(e.name)}}),onSelect:function(e){o(n,e.id),r()}})),null!==a&&Object(Yt.createElement)(Ko,{name:n[0].name,attributes:Object(s.a)({},n[0].attributes,{className:a})}))}}):Object(Yt.createElement)(cn.Toolbar,null,Object(Yt.createElement)(cn.IconButton,{disabled:!0,className:"editor-block-switcher__no-switcher-icon block-editor-block-switcher__no-switcher-icon",label:Object(p.__)("Block icon")},Object(Yt.createElement)(Nn,{icon:l,showColors:!0})))}}]),t}(Yt.Component),ic=Object(Jt.compose)(Object(l.withSelect)(function(e,t){var n=t.clientIds,o=e("core/block-editor"),r=o.getBlocksByClientId,i=o.getBlockRootClientId,c=o.getInserterItems,a=e("core/blocks").getBlockStyles,l=i(Object(f.first)(Object(f.castArray)(n))),s=r(n),u=s&&1===s.length?s[0]:null,d=u&&a(u.name);return{blocks:s,inserterItems:c(l),hasBlockStyles:d&&d.length>0}}),Object(l.withDispatch)(function(e,t){return{onTransform:function(n,o){e("core/block-editor").replaceBlocks(t.clientIds,Object(i.switchToBlockType)(n,o))}}}))(rc);var cc=Object(l.withSelect)(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(Yt.createElement)(ic,{key:"switcher",clientIds:n}):null});var ac=Object(l.withSelect)(function(e){var t=e("core/block-editor"),n=t.getSelectedBlockClientId,o=t.getBlockMode,r=t.getMultiSelectedBlockClientIds,i=t.isBlockValid,c=n();return{blockClientIds:c?[c]:r(),isValid:c?i(c):null,mode:c?o(c):null}})(function(e){var t=e.blockClientIds,n=e.isValid,o=e.mode;return 0===t.length?null:t.length>1?Object(Yt.createElement)("div",{className:"editor-block-toolbar block-editor-block-toolbar"},Object(Yt.createElement)(cc,null),Object(Yt.createElement)(oc,{clientIds:t})):Object(Yt.createElement)("div",{className:"editor-block-toolbar block-editor-block-toolbar"},"visual"===o&&n&&Object(Yt.createElement)(Yt.Fragment,null,Object(Yt.createElement)(ic,{clientIds:t}),Object(Yt.createElement)(Sn.Slot,null),Object(Yt.createElement)(xn.Slot,null)),Object(Yt.createElement)(oc,{clientIds:t}))});var lc=Object(Jt.compose)([Object(l.withDispatch)(function(e,t,n){var o=(0,n.select)("core/block-editor"),r=o.getBlocksByClientId,c=o.getMultiSelectedBlockClientIds,a=o.getSelectedBlockClientId,l=o.hasMultiSelection,s=e("core/block-editor").removeBlocks,u=function(e){var t=a()?[a()]:c();if(0!==t.length&&(l()||!Object(ro.documentHasSelection)())){var n=Object(i.serialize)(r(t));e.clipboardData.setData("text/plain",n),e.clipboardData.setData("text/html",n),e.preventDefault()}};return{onCopy:u,onCut:function(e){if(u(e),l()){var t=a()?[a()]:c();s(t)}}}})])(function(e){var t=e.children,n=e.onCopy,o=e.onCut;return Object(Yt.createElement)("div",{onCopy:n,onCut:o},t)}),sc=function(e){function t(){return Object(Qt.a)(this,t),Object(tn.a)(this,Object(nn.a)(t).apply(this,arguments))}return Object(on.a)(t,e),Object(en.a)(t,[{key:"componentDidUpdate",value:function(){this.scrollIntoView()}},{key:"scrollIntoView",value:function(){var e=this.props.extentClientId;if(e){var t=ur(e);if(t){var n=Object(ro.getScrollContainer)(t);n&&Uo()(t,n,{onlyScrollIfNeeded:!0})}}}},{key:"render",value:function(){return null}}]),t}(Yt.Component),uc=Object(l.withSelect)(function(e){return{extentClientId:(0,e("core/block-editor").getLastMultiSelectedBlockClientId)()}})(sc),dc=[Ln.UP,Ln.RIGHT,Ln.DOWN,Ln.LEFT,Ln.ENTER,Ln.BACKSPACE];var bc=function(e){function t(){var e;return Object(Qt.a)(this,t),(e=Object(tn.a)(this,Object(nn.a)(t).apply(this,arguments))).stopTypingOnSelectionUncollapse=e.stopTypingOnSelectionUncollapse.bind(Object(rn.a)(Object(rn.a)(e))),e.stopTypingOnMouseMove=e.stopTypingOnMouseMove.bind(Object(rn.a)(Object(rn.a)(e))),e.startTypingInTextField=e.startTypingInTextField.bind(Object(rn.a)(Object(rn.a)(e))),e.stopTypingOnNonTextField=e.stopTypingOnNonTextField.bind(Object(rn.a)(Object(rn.a)(e))),e.stopTypingOnEscapeKey=e.stopTypingOnEscapeKey.bind(Object(rn.a)(Object(rn.a)(e))),e.onKeyDown=Object(f.over)([e.startTypingInTextField,e.stopTypingOnEscapeKey]),e.lastMouseMove=null,e}return Object(on.a)(t,e),Object(en.a)(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 o=this.lastMouseMove,r=o.clientX,i=o.clientY;r===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===Ln.ESCAPE&&this.props.onStopTyping()}},{key:"startTypingInTextField",value:function(e){var t=this.props,n=t.isTyping,o=t.onStartTyping,r=e.type,i=e.target;n||!Object(ro.isTextField)(i)||i.closest(".block-editor-block-toolbar")||("keydown"!==r||function(e){var t=e.keyCode;return!e.shiftKey&&Object(f.includes)(dc,t)}(e))&&o()}},{key:"stopTypingOnNonTextField",value:function(e){var t=this;e.persist(),this.props.setTimeout(function(){var n=t.props,o=n.isTyping,r=n.onStopTyping,i=e.target;o&&!Object(ro.isTextField)(i)&&r()})}},{key:"render",value:function(){var e=this.props.children;return Object(Yt.createElement)("div",{onFocus:this.stopTypingOnNonTextField,onKeyPress:this.startTypingInTextField,onKeyDown:this.onKeyDown},e)}}]),t}(Yt.Component),fc=Object(Jt.compose)([Object(l.withSelect)(function(e){return{isTyping:(0,e("core/block-editor").isTyping)()}}),Object(l.withDispatch)(function(e){var t=e("core/block-editor");return{onStartTyping:t.startTyping,onStopTyping:t.stopTyping}}),Jt.withSafeTimeout])(bc),pc=function(e){function t(){return Object(Qt.a)(this,t),Object(tn.a)(this,Object(nn.a)(t).apply(this,arguments))}return Object(on.a)(t,e),Object(en.a)(t,[{key:"getSnapshotBeforeUpdate",value:function(e){var t=this.props,n=t.blockOrder,o=t.selectionStart;return n!==e.blockOrder&&o?this.getOffset(o):null}},{key:"componentDidUpdate",value:function(e,t,n){n&&this.restorePreviousOffset(n)}},{key:"getOffset",value:function(e){var t=ur(e);return t?t.getBoundingClientRect().top:null}},{key:"restorePreviousOffset",value:function(e){var t=ur(this.props.selectionStart);if(t){var n=Object(ro.getScrollContainer)(t);n&&(n.scrollTop=n.scrollTop+t.getBoundingClientRect().top-e)}}},{key:"render",value:function(){return null}}]),t}(Yt.Component),hc=Object(l.withSelect)(function(e){return{blockOrder:e("core/block-editor").getBlockOrder(),selectionStart:e("core/block-editor").getBlockSelectionStart()}})(pc),vc=window,mc=vc.getSelection,gc=vc.getComputedStyle,Oc=Object(f.overEvery)([ro.isTextField,ro.focus.tabbable.isTabbableIndex]);var kc=function(e){function t(){var e;return Object(Qt.a)(this,t),(e=Object(tn.a)(this,Object(nn.a)(t).apply(this,arguments))).onKeyDown=e.onKeyDown.bind(Object(rn.a)(Object(rn.a)(e))),e.bindContainer=e.bindContainer.bind(Object(rn.a)(Object(rn.a)(e))),e.clearVerticalRect=e.clearVerticalRect.bind(Object(rn.a)(Object(rn.a)(e))),e.focusLastTextField=e.focusLastTextField.bind(Object(rn.a)(Object(rn.a)(e))),e.verticalRect=null,e}return Object(on.a)(t,e),Object(en.a)(t,[{key:"bindContainer",value:function(e){this.container=e}},{key:"clearVerticalRect",value:function(){this.verticalRect=null}},{key:"getClosestTabbable",value:function(e,t){var n=ro.focus.focusable.find(this.container);return t&&(n=Object(f.reverse)(n)),n=n.slice(n.indexOf(e)+1),Object(f.find)(n,function t(n,o,r){if(!ro.focus.tabbable.isTabbableIndex(n))return!1;if(Object(ro.isTextField)(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,c=1;(i=r[o+c])&&n.contains(i);c++)if(t(i,o+c,r))return!1;return!0})}},{key:"expandSelection",value:function(e){var t=this.props,n=t.selectedBlockClientId,o=t.selectionStartClientId,r=t.selectionBeforeEndClientId,i=t.selectionAfterEndClientId,c=e?r:i;c&&this.props.onMultiSelect(o||n,c)}},{key:"moveSelection",value:function(e){var t=this.props,n=t.selectedFirstClientId,o=t.selectedLastClientId,r=e?n:o;r&&this.props.onSelectBlock(r)}},{key:"isTabbableEdge",value:function(e,t){var n,o,r=this.getClosestTabbable(e,t);return!(r&&(n=e,o=r,n.closest("[data-block]")===o.closest("[data-block]")))}},{key:"onKeyDown",value:function(e){var t=this.props,n=t.hasMultiSelection,o=t.onMultiSelect,r=t.blocks,i=t.selectionBeforeEndClientId,c=t.selectionAfterEndClientId,a=e.keyCode,l=e.target,s=a===Ln.UP,u=a===Ln.DOWN,d=a===Ln.LEFT,b=a===Ln.RIGHT,p=s||d,h=d||b,v=s||u,m=h||v,g=e.shiftKey,O=g||e.ctrlKey||e.altKey||e.metaKey,k=v?ro.isVerticalEdge:ro.isHorizontalEdge;if(v?this.verticalRect||(this.verticalRect=Object(ro.computeCaretRect)(l)):this.verticalRect=null,!m)return Ln.isKeyboardEvent.primary(e)&&(this.isEntirelySelected=Object(ro.isEntirelySelected)(l)),void(Ln.isKeyboardEvent.primary(e,"a")&&((l.isContentEditable?this.isEntirelySelected:Object(ro.isEntirelySelected)(l))&&(o(Object(f.first)(r),Object(f.last)(r)),e.preventDefault()),this.isEntirelySelected=!0));if(!e.nativeEvent.defaultPrevented&&function(e,t,n){if((t===Ln.UP||t===Ln.DOWN)&&!n)return!0;var o=e.tagName;return"INPUT"!==o&&"TEXTAREA"!==o}(l,a,O)){var j="rtl"===gc(l).direction?!p:p;if(g)(p&&i||!p&&c)&&(n||this.isTabbableEdge(l,p)&&k(l,p))&&(this.expandSelection(p),e.preventDefault());else if(n)this.moveSelection(p),e.preventDefault();else if(v&&Object(ro.isVerticalEdge)(l,p)){var y=this.getClosestTabbable(l,p);y&&(Object(ro.placeCaretAtVerticalEdge)(y,p,this.verticalRect),e.preventDefault())}else if(h&&mc().isCollapsed&&Object(ro.isHorizontalEdge)(l,j)){var _=this.getClosestTabbable(l,j);Object(ro.placeCaretAtHorizontalEdge)(_,j),e.preventDefault()}}}},{key:"focusLastTextField",value:function(){var e=ro.focus.focusable.find(this.container),t=Object(f.findLast)(e,Oc);t&&Object(ro.placeCaretAtHorizontalEdge)(t,!0)}},{key:"render",value:function(){var e=this.props.children;return Object(Yt.createElement)("div",{className:"editor-writing-flow block-editor-writing-flow"},Object(Yt.createElement)("div",{ref:this.bindContainer,onKeyDown:this.onKeyDown,onMouseDown:this.clearVerticalRect},e),Object(Yt.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}(Yt.Component),jc=Object(Jt.compose)([Object(l.withSelect)(function(e){var t=e("core/block-editor"),n=t.getSelectedBlockClientId,o=t.getMultiSelectedBlocksStartClientId,r=t.getMultiSelectedBlocksEndClientId,i=t.getPreviousBlockClientId,c=t.getNextBlockClientId,a=t.getFirstMultiSelectedBlockClientId,l=t.getLastMultiSelectedBlockClientId,s=t.hasMultiSelection,u=t.getBlockOrder,d=n(),b=o(),f=r();return{selectedBlockClientId:d,selectionStartClientId:b,selectionBeforeEndClientId:i(f||d),selectionAfterEndClientId:c(f||d),selectedFirstClientId:a(),selectedLastClientId:l(),hasMultiSelection:s(),blocks:u()}}),Object(l.withDispatch)(function(e){var t=e("core/block-editor");return{onMultiSelect:t.multiSelect,onSelectBlock:t.selectBlock}})])(kc),yc=function(e){function t(){return Object(Qt.a)(this,t),Object(tn.a)(this,Object(nn.a)(t).apply(this,arguments))}return Object(on.a)(t,e),Object(en.a)(t,[{key:"componentDidMount",value:function(){this.props.updateSettings(this.props.settings),this.props.resetBlocks(this.props.value),this.attachChangeObserver(this.props.registry)}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.settings,o=t.updateSettings,r=t.value,i=t.resetBlocks,c=t.registry;n!==e.settings&&o(n),c!==e.registry&&this.attachChangeObserver(c),this.isSyncingOutcomingValue?this.isSyncingOutcomingValue=!1:r!==e.value&&(this.isSyncingIncomingValue=!0,i(r))}},{key:"componentWillUnmount",value:function(){this.unsubscribe&&this.unsubscribe()}},{key:"attachChangeObserver",value:function(e){var t=this;this.unsubscribe&&this.unsubscribe();var n=e.select("core/block-editor"),o=n.getBlocks,r=n.isLastBlockChangePersistent,i=n.__unstableIsLastBlockChangeIgnored,c=o(),a=r();this.unsubscribe=e.subscribe(function(){var e=t.props,n=e.onChange,l=e.onInput,s=o(),u=r();if(s!==c&&(t.isSyncingIncomingValue||i()))return t.isSyncingIncomingValue=!1,c=s,void(a=u);(s!==c||u&&!a)&&(s!==c&&(t.isSyncingOutcomingValue=!0),c=s,(a=u)?n(c):l(c))})}},{key:"render",value:function(){var e=this.props.children;return Object(Yt.createElement)(cn.SlotFillProvider,null,Object(Yt.createElement)(cn.DropZoneProvider,null,e))}}]),t}(Yt.Component),_c=Object(Jt.compose)([Object(l.withDispatch)(function(e){var t=e("core/block-editor");return{updateSettings:t.updateSettings,resetBlocks:t.resetBlocks}}),l.withRegistry])(yc),Sc=["left","center","right","wide","full"],Cc=["wide","full"];function Ec(e){var t,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return t=Array.isArray(e)?e:!0===e?Sc:[],!o||!0===e&&!n?f.without.apply(void 0,[t].concat(Cc)):t}var wc=Object(Jt.createHigherOrderComponent)(function(e){return function(t){var n=t.name,o=Ec(Object(i.getBlockSupport)(n,"align"),Object(i.hasBlockSupport)(n,"alignWide",!0));return[o.length>0&&t.isSelected&&Object(Yt.createElement)(Sn,{key:"align-controls"},Object(Yt.createElement)(On,{value:t.attributes.align,onChange:function(e){if(!e){var n=Object(i.getBlockType)(t.name);Object(f.get)(n,["attributes","align","default"])&&(e="")}t.setAttributes({align:e})},controls:o})),Object(Yt.createElement)(e,Object(qt.a)({key:"edit"},t))]}},"withToolbarControls"),Ic=Object(Jt.createHigherOrderComponent)(Object(Jt.compose)([Object(l.withSelect)(function(e){return{hasWideEnabled:!!(0,e("core/block-editor").getSettings)().alignWide}}),function(e){return function(t){var n=t.name,o=t.attributes,r=t.hasWideEnabled,c=o.align,a=Ec(Object(i.getBlockSupport)(n,"align"),Object(i.hasBlockSupport)(n,"alignWide",!0),r),l=t.wrapperProps;return Object(f.includes)(a,c)&&(l=Object(s.a)({},l,{"data-align":c})),Object(Yt.createElement)(e,Object(qt.a)({},t,{wrapperProps:l}))}}]));Object(Zt.addFilter)("blocks.registerBlockType","core/align/addAttribute",function(e){return Object(f.has)(e.attributes,["align","type"])?e:(Object(i.hasBlockSupport)(e,"align")&&(e.attributes=Object(f.assign)(e.attributes,{align:{type:"string"}})),e)}),Object(Zt.addFilter)("editor.BlockListBlock","core/editor/align/with-data-align",Ic),Object(Zt.addFilter)("editor.BlockEdit","core/editor/align/with-toolbar-controls",wc),Object(Zt.addFilter)("blocks.getSaveContent.extraProps","core/align/addAssignedAlign",function(e,t,n){var o=n.align,r=Object(i.getBlockSupport)(t,"align"),c=Object(i.hasBlockSupport)(t,"alignWide",!0);return Object(f.includes)(Ec(r,c),o)&&(e.className=Xt()("align".concat(o),e.className)),e});var Tc=/[\s#]/g;var Bc=Object(Jt.createHigherOrderComponent)(function(e){return function(t){return Object(i.hasBlockSupport)(t.name,"anchor")&&t.isSelected?Object(Yt.createElement)(Yt.Fragment,null,Object(Yt.createElement)(e,t),Object(Yt.createElement)(Er,null,Object(Yt.createElement)(cn.TextControl,{label:Object(p.__)("HTML Anchor"),help:Object(p.__)("Anchors lets you link directly to a section on a page."),value:t.attributes.anchor||"",onChange:function(e){e=e.replace(Tc,"-"),t.setAttributes({anchor:e})}}))):Object(Yt.createElement)(e,t)}},"withInspectorControl");Object(Zt.addFilter)("blocks.registerBlockType","core/anchor/attribute",function(e){return Object(i.hasBlockSupport)(e,"anchor")&&(e.attributes=Object(f.assign)(e.attributes,{anchor:{type:"string",source:"attribute",attribute:"id",selector:"*"}})),e}),Object(Zt.addFilter)("editor.BlockEdit","core/editor/anchor/with-inspector-control",Bc),Object(Zt.addFilter)("blocks.getSaveContent.extraProps","core/anchor/save-props",function(e,t,n){return Object(i.hasBlockSupport)(t,"anchor")&&(e.id=""===n.anchor?null:n.anchor),e});var xc=Object(Jt.createHigherOrderComponent)(function(e){return function(t){return Object(i.hasBlockSupport)(t.name,"customClassName",!0)&&t.isSelected?Object(Yt.createElement)(Yt.Fragment,null,Object(Yt.createElement)(e,t),Object(Yt.createElement)(Er,null,Object(Yt.createElement)(cn.TextControl,{label:Object(p.__)("Additional CSS Class"),value:t.attributes.className||"",onChange:function(e){t.setAttributes({className:""!==e?e:void 0})}}))):Object(Yt.createElement)(e,t)}},"withInspectorControl");function Lc(e){e="
".concat(e,"
");var t=Object(i.parseWithAttributeSchema)(e,{type:"string",source:"attribute",selector:"[data-custom-class-name] > *",attribute:"class"});return t?t.trim().split(/\s+/):[]}Object(Zt.addFilter)("blocks.registerBlockType","core/custom-class-name/attribute",function(e){return Object(i.hasBlockSupport)(e,"customClassName",!0)&&(e.attributes=Object(f.assign)(e.attributes,{className:{type:"string"}})),e}),Object(Zt.addFilter)("editor.BlockEdit","core/editor/custom-class-name/with-inspector-control",xc),Object(Zt.addFilter)("blocks.getSaveContent.extraProps","core/custom-class-name/save-props",function(e,t,n){return Object(i.hasBlockSupport)(t,"customClassName",!0)&&n.className&&(e.className=Xt()(e.className,n.className)),e}),Object(Zt.addFilter)("blocks.getBlockAttributes","core/custom-class-name/addParsedDifference",function(e,t,n){if(Object(i.hasBlockSupport)(t,"customClassName",!0)){var o=Object(f.omit)(e,["className"]),r=Object(i.getSaveContent)(t,o),c=Lc(r),a=Lc(n),l=Object(f.difference)(a,c);l.length?e.className=l.join(" "):r&&delete e.className}return e}),Object(Zt.addFilter)("blocks.getSaveContent.extraProps","core/generated-class-name/save-props",function(e,t){return Object(i.hasBlockSupport)(t,"className",!0)&&("string"==typeof e.className?e.className=Object(f.uniq)([Object(i.getBlockDefaultClassName)(t.name)].concat(Object(d.a)(e.className.split(" ")))).join(" ").trim():e.className=Object(i.getBlockDefaultClassName)(t.name)),e}),n.d(t,"Autocomplete",function(){return fn}),n.d(t,"AlignmentToolbar",function(){return hn}),n.d(t,"BlockAlignmentToolbar",function(){return On}),n.d(t,"BlockControls",function(){return Sn}),n.d(t,"BlockEdit",function(){return En}),n.d(t,"BlockFormatControls",function(){return xn}),n.d(t,"BlockNavigationDropdown",function(){return Dn}),n.d(t,"BlockIcon",function(){return Nn}),n.d(t,"ColorPalette",function(){return Fn}),n.d(t,"withColorContext",function(){return Pn}),n.d(t,"ContrastChecker",function(){return Jn}),n.d(t,"InnerBlocks",function(){return jr}),n.d(t,"InspectorAdvancedControls",function(){return Er}),n.d(t,"InspectorControls",function(){return xr}),n.d(t,"PanelColorSettings",function(){return Ar}),n.d(t,"PlainText",function(){return Dr}),n.d(t,"RichText",function(){return hi}),n.d(t,"RichTextShortcut",function(){return $r}),n.d(t,"RichTextToolbarButton",function(){return ci}),n.d(t,"UnstableRichTextInputEvent",function(){return ai}),n.d(t,"MediaPlaceholder",function(){return ji}),n.d(t,"MediaUpload",function(){return vi}),n.d(t,"MediaUploadCheck",function(){return po}),n.d(t,"URLInput",function(){return Ei}),n.d(t,"URLInputButton",function(){return wi}),n.d(t,"URLPopover",function(){return mi}),n.d(t,"BlockEditorKeyboardShortcuts",function(){return Li}),n.d(t,"BlockInspector",function(){return Hi}),n.d(t,"BlockList",function(){return Or}),n.d(t,"BlockMover",function(){return fo}),n.d(t,"BlockSelectionClearer",function(){return Vi}),n.d(t,"BlockSettingsMenu",function(){return oc}),n.d(t,"_BlockSettingsMenuFirstItem",function(){return Zi}),n.d(t,"_BlockSettingsMenuPluginsExtension",function(){return nc}),n.d(t,"BlockTitle",function(){return xo}),n.d(t,"BlockToolbar",function(){return ac}),n.d(t,"CopyHandler",function(){return lc}),n.d(t,"DefaultBlockAppender",function(){return vr}),n.d(t,"Inserter",function(){return er}),n.d(t,"MultiBlocksSwitcher",function(){return cc}),n.d(t,"MultiSelectScrollIntoView",function(){return uc}),n.d(t,"NavigableToolbar",function(){return Do}),n.d(t,"ObserveTyping",function(){return fc}),n.d(t,"PreserveScrollInReorder",function(){return hc}),n.d(t,"SkipToSelectedBlock",function(){return Ni}),n.d(t,"Warning",function(){return mo}),n.d(t,"WritingFlow",function(){return jc}),n.d(t,"BlockEditorProvider",function(){return _c}),n.d(t,"getColorClassName",function(){return Kn}),n.d(t,"getColorObjectByAttributeValues",function(){return Vn}),n.d(t,"getColorObjectByColorValue",function(){return zn}),n.d(t,"createCustomColorsHOC",function(){return $n}),n.d(t,"withColors",function(){return Xn}),n.d(t,"getFontSize",function(){return Zn}),n.d(t,"getFontSizeClass",function(){return Qn}),n.d(t,"FontSizePicker",function(){return eo}),n.d(t,"withFontSizes",function(){return to}),n.d(t,"SETTINGS_DEFAULTS",function(){return v})},37:function(e,t,n){"use strict";function o(e){if(Array.isArray(e))return e}n.d(t,"a",function(){return o})},38:function(e,t,n){"use strict";function o(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}n.d(t,"a",function(){return o})},4:function(e,t){!function(){e.exports=this.wp.components}()},40:function(e,t){!function(){e.exports=this.wp.viewport}()},41:function(e,t,n){e.exports=function(e,t){var n,o,r,i=0;function c(){var t,c,a=o,l=arguments.length;e:for(;a;){if(a.args.length===arguments.length){for(c=0;c1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}if(e=N(e,360),t=N(t,100),n=N(n,100),0===t)o=r=i=n;else{var a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;o=c(l,a,e+1/3),r=c(l,a,e),i=c(l,a,e-1/3)}return{r:255*o,g:255*r,b:255*i}}(e.h,o,l),d=!0,b="hsl"),e.hasOwnProperty("a")&&(n=e.a));var f,p,h;return n=L(n),{ok:d,format:e.format||b,r:s(255,u(t.r,0)),g:s(255,u(t.g,0)),b:s(255,u(t.b,0)),a:n}}(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=l(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.gradientType,this._r<1&&(this._r=l(this._r)),this._g<1&&(this._g=l(this._g)),this._b<1&&(this._b=l(this._b)),this._ok=n.ok,this._tc_id=a++}function f(e,t,n){e=N(e,255),t=N(t,255),n=N(n,255);var o,r,i=u(e,t,n),c=s(e,t,n),a=(i+c)/2;if(i==c)o=r=0;else{var l=i-c;switch(r=a>.5?l/(2-i-c):l/(i+c),i){case e:o=(t-n)/l+(t>1)+720)%360;--t;)o.h=(o.h+r)%360,i.push(b(o));return i}function T(e,t){t=t||6;for(var n=b(e).toHsv(),o=n.h,r=n.s,i=n.v,c=[],a=1/t;t--;)c.push(b({h:o,s:r,v:i})),i=(i+a)%1;return c}b.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,t,n,o=this.toRgb();return e=o.r/255,t=o.g/255,n=o.b/255,.2126*(e<=.03928?e/12.92:r.pow((e+.055)/1.055,2.4))+.7152*(t<=.03928?t/12.92:r.pow((t+.055)/1.055,2.4))+.0722*(n<=.03928?n/12.92:r.pow((n+.055)/1.055,2.4))},setAlpha:function(e){return this._a=L(e),this._roundA=l(100*this._a)/100,this},toHsv:function(){var e=p(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=p(this._r,this._g,this._b),t=l(360*e.h),n=l(100*e.s),o=l(100*e.v);return 1==this._a?"hsv("+t+", "+n+"%, "+o+"%)":"hsva("+t+", "+n+"%, "+o+"%, "+this._roundA+")"},toHsl:function(){var e=f(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=f(this._r,this._g,this._b),t=l(360*e.h),n=l(100*e.s),o=l(100*e.l);return 1==this._a?"hsl("+t+", "+n+"%, "+o+"%)":"hsla("+t+", "+n+"%, "+o+"%, "+this._roundA+")"},toHex:function(e){return h(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return function(e,t,n,o,r){var i=[A(l(e).toString(16)),A(l(t).toString(16)),A(l(n).toString(16)),A(P(o))];if(r&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)&&i[3].charAt(0)==i[3].charAt(1))return i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0)+i[3].charAt(0);return i.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:l(this._r),g:l(this._g),b:l(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+l(this._r)+", "+l(this._g)+", "+l(this._b)+")":"rgba("+l(this._r)+", "+l(this._g)+", "+l(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:l(100*N(this._r,255))+"%",g:l(100*N(this._g,255))+"%",b:l(100*N(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+l(100*N(this._r,255))+"%, "+l(100*N(this._g,255))+"%, "+l(100*N(this._b,255))+"%)":"rgba("+l(100*N(this._r,255))+"%, "+l(100*N(this._g,255))+"%, "+l(100*N(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(x[h(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+v(this._r,this._g,this._b,this._a),n=t,o=this._gradientType?"GradientType = 1, ":"";if(e){var r=b(e);n="#"+v(r._r,r._g,r._b,r._a)}return"progid:DXImageTransform.Microsoft.gradient("+o+"startColorstr="+t+",endColorstr="+n+")"},toString:function(e){var t=!!e;e=e||this._format;var n=!1,o=this._a<1&&this._a>=0;return t||!o||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(n=this.toRgbString()),"prgb"===e&&(n=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(n=this.toHexString()),"hex3"===e&&(n=this.toHexString(!0)),"hex4"===e&&(n=this.toHex8String(!0)),"hex8"===e&&(n=this.toHex8String()),"name"===e&&(n=this.toName()),"hsl"===e&&(n=this.toHslString()),"hsv"===e&&(n=this.toHsvString()),n||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return b(this.toString())},_applyModification:function(e,t){var n=e.apply(null,[this].concat([].slice.call(t)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(k,arguments)},brighten:function(){return this._applyModification(j,arguments)},darken:function(){return this._applyModification(y,arguments)},desaturate:function(){return this._applyModification(m,arguments)},saturate:function(){return this._applyModification(g,arguments)},greyscale:function(){return this._applyModification(O,arguments)},spin:function(){return this._applyModification(_,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(I,arguments)},complement:function(){return this._applyCombination(S,arguments)},monochromatic:function(){return this._applyCombination(T,arguments)},splitcomplement:function(){return this._applyCombination(w,arguments)},triad:function(){return this._applyCombination(C,arguments)},tetrad:function(){return this._applyCombination(E,arguments)}},b.fromRatio=function(e,t){if("object"==typeof e){var n={};for(var o in e)e.hasOwnProperty(o)&&(n[o]="a"===o?e[o]:D(e[o]));e=n}return b(e,t)},b.equals=function(e,t){return!(!e||!t)&&b(e).toRgbString()==b(t).toRgbString()},b.random=function(){return b.fromRatio({r:d(),g:d(),b:d()})},b.mix=function(e,t,n){n=0===n?0:n||50;var o=b(e).toRgb(),r=b(t).toRgb(),i=n/100;return b({r:(r.r-o.r)*i+o.r,g:(r.g-o.g)*i+o.g,b:(r.b-o.b)*i+o.b,a:(r.a-o.a)*i+o.a})},b.readability=function(e,t){var n=b(e),o=b(t);return(r.max(n.getLuminance(),o.getLuminance())+.05)/(r.min(n.getLuminance(),o.getLuminance())+.05)},b.isReadable=function(e,t,n){var o,r,i=b.readability(e,t);switch(r=!1,(o=function(e){var t,n;t=((e=e||{level:"AA",size:"small"}).level||"AA").toUpperCase(),n=(e.size||"small").toLowerCase(),"AA"!==t&&"AAA"!==t&&(t="AA");"small"!==n&&"large"!==n&&(n="small");return{level:t,size:n}}(n)).level+o.size){case"AAsmall":case"AAAlarge":r=i>=4.5;break;case"AAlarge":r=i>=3;break;case"AAAsmall":r=i>=7}return r},b.mostReadable=function(e,t,n){var o,r,i,c,a=null,l=0;r=(n=n||{}).includeFallbackColors,i=n.level,c=n.size;for(var s=0;sl&&(l=o,a=b(t[s]));return b.isReadable(e,a,{level:i,size:c})||!r?a:(n.includeFallbackColors=!1,b.mostReadable(e,["#fff","#000"],n))};var B=b.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},x=b.hexNames=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}(B);function L(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function N(e,t){(function(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var n=function(e){return"string"==typeof e&&-1!=e.indexOf("%")}(e);return e=s(t,u(0,parseFloat(e))),n&&(e=parseInt(e*t,10)/100),r.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function M(e){return s(1,u(0,e))}function R(e){return parseInt(e,16)}function A(e){return 1==e.length?"0"+e:""+e}function D(e){return e<=1&&(e=100*e+"%"),e}function P(e){return r.round(255*parseFloat(e)).toString(16)}function F(e){return R(e)/255}var H,U,V,z=(U="[\\s|\\(]+("+(H="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+H+")[,|\\s]+("+H+")\\s*\\)?",V="[\\s|\\(]+("+H+")[,|\\s]+("+H+")[,|\\s]+("+H+")[,|\\s]+("+H+")\\s*\\)?",{CSS_UNIT:new RegExp(H),rgb:new RegExp("rgb"+U),rgba:new RegExp("rgba"+V),hsl:new RegExp("hsl"+U),hsla:new RegExp("hsla"+V),hsv:new RegExp("hsv"+U),hsva:new RegExp("hsva"+V),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function K(e){return!!z.CSS_UNIT.exec(e)}e.exports?e.exports=b:void 0===(o=function(){return b}.call(t,n,t,e))||(e.exports=o)}(Math)},48:function(e,t){!function(){e.exports=this.wp.a11y}()},49:function(e,t){!function(){e.exports=this.wp.deprecated}()},5:function(e,t){!function(){e.exports=this.wp.data}()},54:function(e,t,n){var o=function(){return this||"object"==typeof self&&self}()||Function("return this")(),r=o.regeneratorRuntime&&Object.getOwnPropertyNames(o).indexOf("regeneratorRuntime")>=0,i=r&&o.regeneratorRuntime;if(o.regeneratorRuntime=void 0,e.exports=n(55),r)o.regeneratorRuntime=i;else try{delete o.regeneratorRuntime}catch(e){o.regeneratorRuntime=void 0}},55:function(e,t){!function(t){"use strict";var n,o=Object.prototype,r=o.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag",s="object"==typeof e,u=t.regeneratorRuntime;if(u)s&&(e.exports=u);else{(u=t.regeneratorRuntime=s?e.exports:{}).wrap=k;var d="suspendedStart",b="suspendedYield",f="executing",p="completed",h={},v={};v[c]=function(){return this};var m=Object.getPrototypeOf,g=m&&m(m(x([])));g&&g!==o&&r.call(g,c)&&(v=g);var O=S.prototype=y.prototype=Object.create(v);_.prototype=O.constructor=S,S.constructor=_,S[l]=_.displayName="GeneratorFunction",u.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===_||"GeneratorFunction"===(t.displayName||t.name))},u.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,S):(e.__proto__=S,l in e||(e[l]="GeneratorFunction")),e.prototype=Object.create(O),e},u.awrap=function(e){return{__await:e}},C(E.prototype),E.prototype[a]=function(){return this},u.AsyncIterator=E,u.async=function(e,t,n,o){var r=new E(k(e,t,n,o));return u.isGeneratorFunction(t)?r:r.next().then(function(e){return e.done?e.value:r.next()})},C(O),O[l]="Generator",O[c]=function(){return this},O.toString=function(){return"[object Generator]"},u.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var o=t.pop();if(o in e)return n.value=o,n.done=!1,n}return n.done=!0,n}},u.values=x,B.prototype={constructor:B,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=n,this.done=!1,this.delegate=null,this.method="next",this.arg=n,this.tryEntries.forEach(T),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=n)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function o(o,r){return a.type="throw",a.arg=e,t.next=o,r&&(t.method="next",t.arg=n),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var c=this.tryEntries[i],a=c.completion;if("root"===c.tryLoc)return o("end");if(c.tryLoc<=this.prev){var l=r.call(c,"catchLoc"),s=r.call(c,"finallyLoc");if(l&&s){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),T(n),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var o=n.completion;if("throw"===o.type){var r=o.arg;T(n)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,o){return this.delegate={iterator:x(e),resultName:t,nextLoc:o},"next"===this.method&&(this.arg=n),h}}}function k(e,t,n,o){var r=t&&t.prototype instanceof y?t:y,i=Object.create(r.prototype),c=new B(o||[]);return i._invoke=function(e,t,n){var o=d;return function(r,i){if(o===f)throw new Error("Generator is already running");if(o===p){if("throw"===r)throw i;return L()}for(n.method=r,n.arg=i;;){var c=n.delegate;if(c){var a=w(c,n);if(a){if(a===h)continue;return a}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===d)throw o=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=f;var l=j(e,t,n);if("normal"===l.type){if(o=n.done?p:b,l.arg===h)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=p,n.method="throw",n.arg=l.arg)}}}(e,n,c),i}function j(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}function y(){}function _(){}function S(){}function C(e){["next","throw","return"].forEach(function(t){e[t]=function(e){return this._invoke(t,e)}})}function E(e){var t;this._invoke=function(n,o){function i(){return new Promise(function(t,i){!function t(n,o,i,c){var a=j(e[n],e,o);if("throw"!==a.type){var l=a.arg,s=l.value;return s&&"object"==typeof s&&r.call(s,"__await")?Promise.resolve(s.__await).then(function(e){t("next",e,i,c)},function(e){t("throw",e,i,c)}):Promise.resolve(s).then(function(e){l.value=e,i(l)},function(e){return t("throw",e,i,c)})}c(a.arg)}(n,o,t,i)})}return t=t?t.then(i,i):i()}}function w(e,t){var o=e.iterator[t.method];if(o===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=n,w(e,t),"throw"===t.method))return h;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var r=j(o,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,h;var i=r.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=n),t.delegate=null,h):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,h)}function I(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function B(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(I,this),this.reset(!0)}function x(e){if(e){var t=e[c];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function t(){for(;++o