mirror of
https://github.com/WordPress/WordPress.git
synced 2024-11-14 22:56:19 +01:00
5a4b00a618
- Update `lodash` to the latest version `4.17.21`. - Disable some attributes for rich text. - Use hashed/deterministic moduleIDs in webpack config. Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo. Merges [50940-50941,50984-50985,51426] to the 5.2 branch. Built from https://develop.svn.wordpress.org/branches/5.2@51756 git-svn-id: http://core.svn.wordpress.org/branches/5.2@51363 1a063a9b-81f0-0310-95a4-ce76da25c4cd
49 lines
248 KiB
JavaScript
49 lines
248 KiB
JavaScript
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="tr0p")}({"16Al":function(e,t,n){"use strict";var o=n("WbBG");function r(){}e.exports=function(){function e(e,t,n,r,i,c){if(c!==o){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t};return n.checkPropTypes=r,n.PropTypes=n,n}},"17x9":function(e,t,n){e.exports=n("16Al")()},"1CF3":function(e,t){!function(){e.exports=this.wp.dom}()},"1OyB":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}))},"1ZqX":function(e,t){!function(){e.exports=this.wp.data}()},"25BE":function(e,t,n){"use strict";function o(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}n.d(t,"a",(function(){return o}))},"4eJC":function(e,t,n){e.exports=function(e,t){var n,o,r,i=0;function c(){var t,c,l=o,a=arguments.length;e:for(;l;){if(l.args.length===arguments.length){for(c=0;c<a;c++)if(l.args[c]!==arguments[c]){l=l.next;continue e}return l!==o&&(l===r&&(r=l.prev),l.prev.next=l.next,l.next&&(l.next.prev=l.prev),l.next=o,l.prev=null,o.prev=l,o=l),l.val}l=l.next}for(t=new Array(a),c=0;c<a;c++)t[c]=arguments[c];return l={args:t,val:e.apply(null,t)},o?(o.prev=l,l.next=o):r=l,i===n?(r=r.prev).next=null:i++,o=l,l.val}return t&&t.maxSize&&(n=t.maxSize),c.clear=function(){o=null,r=null,i=0},c}},"7fqt":function(e,t){!function(){e.exports=this.wp.wordcount}()},"9Do8":function(e,t,n){"use strict";e.exports=n("zt9T")},BLeD:function(e,t){!function(){e.exports=this.wp.tokenList}()},CNgt: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<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},c=this&&this.__rest||function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&(n[o[r]]=e[o[r]])}return n};t.__esModule=!0;var l=n("cDcd"),a=n("17x9"),s=n("GemG"),u=n("Rk8H"),d=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={lineHeight:null},t.dispatchEvent=function(e){var n=document.createEvent("Event");n.initEvent(e,!0,!1),t.textarea.dispatchEvent(n)},t.updateLineHeight=function(){t.setState({lineHeight:u(t.textarea)})},t.onChange=function(e){var n=t.props.onChange;t.currentValue=e.currentTarget.value,n&&n(e)},t.saveDOMNodeRef=function(e){var n=t.props.innerRef;n&&n(e),t.textarea=e},t.getLocals=function(){var e=t,n=e.props,o=(n.onResize,n.maxRows),r=(n.onChange,n.style),l=(n.innerRef,c(n,["onResize","maxRows","onChange","style","innerRef"])),a=e.state.lineHeight,s=e.saveDOMNodeRef,u=o&&a?a*o:null;return i({},l,{saveDOMNodeRef:s,style:u?i({},r,{maxHeight:u}):r,onChange:t.onChange})},t}return r(t,e),t.prototype.componentDidMount=function(){var e=this,t=this.props,n=t.onResize;"number"==typeof t.maxRows&&this.updateLineHeight(),setTimeout((function(){return s(e.textarea)})),n&&this.textarea.addEventListener("autosize:resized",n)},t.prototype.componentWillUnmount=function(){var e=this.props.onResize;e&&this.textarea.removeEventListener("autosize:resized",e),this.dispatchEvent("autosize:destroy")},t.prototype.render=function(){var e=this.getLocals(),t=e.children,n=e.saveDOMNodeRef,o=c(e,["children","saveDOMNodeRef"]);return l.createElement("textarea",i({},o,{ref:n}),t)},t.prototype.componentDidUpdate=function(e){this.props.value===this.currentValue&&this.props.rows===e.rows||this.dispatchEvent("autosize:update")},t.defaultProps={rows:1},t.propTypes={rows:a.number,maxRows:a.number,onResize:a.func,innerRef:a.func},t}(l.Component);t.default=d},DSFK:function(e,t,n){"use strict";function o(e){if(Array.isArray(e))return e}n.d(t,"a",(function(){return o}))},Ff2n: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<i.length;o++)n=i[o],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}n.d(t,"a",(function(){return o}))},GRId:function(e,t){!function(){e.exports=this.wp.element}()},GemG:function(e,t,n){var o,r,i;
|
||
/*!
|
||
autosize 4.0.4
|
||
license: MIT
|
||
http://www.jacklmoore.com/autosize
|
||
*/r=[e,t],void 0===(i="function"==typeof(o=function(e,t){"use strict";var n,o,r="function"==typeof Map?new Map:(n=[],o=[],{has:function(e){return n.indexOf(e)>-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,n=null,o=null,c=null,l=function(){e.clientWidth!==o&&d()},a=function(t){window.removeEventListener("resize",l,!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",l,!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"===(t=window.getComputedStyle(e,null)).resize?e.style.resize="none":"both"===t.resize&&(e.style.resize="horizontal"),n="content-box"===t.boxSizing?-(parseFloat(t.paddingTop)+parseFloat(t.paddingBottom)):parseFloat(t.borderTopWidth)+parseFloat(t.borderBottomWidth),isNaN(n)&&(n=0),d()}function 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 t=function(e){for(var t=[];e&&e.parentNode&&e.parentNode instanceof Element;)e.parentNode.scrollTop&&t.push({node:e.parentNode,scrollTop:e.parentNode.scrollTop}),e=e.parentNode;return t}(e),r=document.documentElement&&document.documentElement.scrollTop;e.style.height="",e.style.height=e.scrollHeight+n+"px",o=e.clientWidth,t.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),o="content-box"===n.boxSizing?Math.round(parseFloat(n.height)):e.offsetHeight;if(o<t?"hidden"===n.overflowY&&(s("scroll"),u(),o="content-box"===n.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight):"hidden"!==n.overflowY&&(s("hidden"),u(),o="content-box"===n.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight),c!==o){c=o;var r=i("autosize:resized");try{e.dispatchEvent(r)}catch(e){}}}}function l(e){var t=r.get(e);t&&t.destroy()}function a(e){var t=r.get(e);t&&t.update()}var s=null;"undefined"==typeof window||"function"!=typeof window.getComputedStyle?((s=function(e){return e}).destroy=function(e){return e},s.update=function(e){return e}):((s=function(e,t){return e&&Array.prototype.forEach.call(e.length?e:[e],(function(e){return c(e)})),e}).destroy=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],l),e},s.update=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],a),e}),t.default=s,e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},HSyU:function(e,t){!function(){e.exports=this.wp.blocks}()},JX7q: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}))},Ji7U:function(e,t,n){"use strict";function o(e,t){return(o=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function r(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&o(e,t)}n.d(t,"a",(function(){return r}))},K9lf:function(e,t){!function(){e.exports=this.wp.compose}()},KEfo:function(e,t){!function(){e.exports=this.wp.viewport}()},KQm4:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var o=n("25BE");function r(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||Object(o.a)(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}},Mmq9:function(e,t){!function(){e.exports=this.wp.url}()},NMb1:function(e,t){!function(){e.exports=this.wp.deprecated}()},O6Fj:function(e,t,n){"use strict";t.__esModule=!0;var o=n("CNgt");t.default=o.default},ODXe:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var o=n("DSFK");var r=n("PYwp");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,l=e[Symbol.iterator]();!(o=(c=l.next()).done)&&(n.push(c.value),!t||n.length!==t);o=!0);}catch(e){r=!0,i=e}finally{try{o||null==l.return||l.return()}finally{if(r)throw i}}return n}(e,t)||Object(r.a)()}},PYwp: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}))},Rk8H:function(e,t,n){var o=n("jTPX");e.exports=function(e){var t=o(e,"line-height"),n=parseFloat(t,10);if(t===n+""){var r=e.style.lineHeight;e.style.lineHeight=t+"em",t=o(e,"line-height"),n=parseFloat(t,10),r?e.style.lineHeight=r:delete e.style.lineHeight}if(-1!==t.indexOf("pt")?(n*=4,n/=3):-1!==t.indexOf("mm")?(n*=96,n/=25.4):-1!==t.indexOf("cm")?(n*=96,n/=2.54):-1!==t.indexOf("in")?n*=96:-1!==t.indexOf("pc")&&(n*=16),n=Math.round(n),"normal"===t){var i=e.nodeName,c=document.createElement(i);c.innerHTML=" ","TEXTAREA"===i.toUpperCase()&&c.setAttribute("rows","1");var l=o(e,"font-size");c.style.fontSize=l,c.style.padding="0px",c.style.border="0px";var a=document.body;a.appendChild(c),n=c.offsetHeight,a.removeChild(c)}return n}},RxS6:function(e,t){!function(){e.exports=this.wp.keycodes}()},TSYQ:function(e,t,n){var o;
|
||
/*!
|
||
Copyright (c) 2018 Jed Watson.
|
||
Licensed under the MIT License (MIT), see
|
||
http://jedwatson.github.io/classnames
|
||
*/!function(){"use strict";var n={}.hasOwnProperty;function r(){for(var e=[],t=0;t<arguments.length;t++){var o=arguments[t];if(o){var i=typeof o;if("string"===i||"number"===i)e.push(o);else if(Array.isArray(o)){if(o.length){var c=r.apply(null,o);c&&e.push(c)}}else if("object"===i)if(o.toString===Object.prototype.toString)for(var l in o)n.call(o,l)&&o[l]&&e.push(l);else e.push(o.toString())}}return e.join(" ")}e.exports?(r.default=r,e.exports=r):void 0===(o=function(){return r}.apply(t,[]))||(e.exports=o)}()},U8pU:function(e,t,n){"use strict";function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function r(e){return(r="function"==typeof Symbol&&"symbol"===o(Symbol.iterator)?function(e){return o(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":o(e)})(e)}n.d(t,"a",(function(){return r}))},WbBG:function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},YLtl:function(e,t){!function(){e.exports=this.lodash}()},Zss7:function(e,t,n){var o;!function(r){var i=/^\s+/,c=/\s+$/,l=0,a=r.round,s=r.min,u=r.max,d=r.random;function b(e,t){if(t=t||{},(e=e||"")instanceof b)return e;if(!(this instanceof b))return new b(e,t);var n=function(e){var t={r:0,g:0,b:0},n=1,o=null,l=null,a=null,d=!1,b=!1;"string"==typeof e&&(e=function(e){e=e.replace(i,"").replace(c,"").toLowerCase();var t,n=!1;if(B[e])e=B[e],n=!0;else if("transparent"==e)return{r:0,g:0,b:0,a:0,format:"name"};if(t=z.rgb.exec(e))return{r:t[1],g:t[2],b:t[3]};if(t=z.rgba.exec(e))return{r:t[1],g:t[2],b:t[3],a:t[4]};if(t=z.hsl.exec(e))return{h:t[1],s:t[2],l:t[3]};if(t=z.hsla.exec(e))return{h:t[1],s:t[2],l:t[3],a:t[4]};if(t=z.hsv.exec(e))return{h:t[1],s:t[2],v:t[3]};if(t=z.hsva.exec(e))return{h:t[1],s:t[2],v:t[3],a:t[4]};if(t=z.hex8.exec(e))return{r:R(t[1]),g:R(t[2]),b:R(t[3]),a:F(t[4]),format:n?"name":"hex8"};if(t=z.hex6.exec(e))return{r:R(t[1]),g:R(t[2]),b:R(t[3]),format:n?"name":"hex"};if(t=z.hex4.exec(e))return{r:R(t[1]+""+t[1]),g:R(t[2]+""+t[2]),b:R(t[3]+""+t[3]),a:F(t[4]+""+t[4]),format:n?"name":"hex8"};if(t=z.hex3.exec(e))return{r:R(t[1]+""+t[1]),g:R(t[2]+""+t[2]),b:R(t[3]+""+t[3]),format:n?"name":"hex"};return!1}(e));"object"==typeof e&&(K(e.r)&&K(e.g)&&K(e.b)?(f=e.r,p=e.g,h=e.b,t={r:255*N(f,255),g:255*N(p,255),b:255*N(h,255)},d=!0,b="%"===String(e.r).substr(-1)?"prgb":"rgb"):K(e.h)&&K(e.s)&&K(e.v)?(o=D(e.s),l=D(e.v),t=function(e,t,n){e=6*N(e,360),t=N(t,100),n=N(n,100);var o=r.floor(e),i=e-o,c=n*(1-t),l=n*(1-i*t),a=n*(1-(1-i)*t),s=o%6;return{r:255*[n,l,c,c,a,n][s],g:255*[a,n,n,l,c,c][s],b:255*[c,c,a,n,n,l][s]}}(e.h,o,l),d=!0,b="hsv"):K(e.h)&&K(e.s)&&K(e.l)&&(o=D(e.s),a=D(e.l),t=function(e,t,n){var o,r,i;function c(e,t,n){return n<0&&(n+=1),n>1&&(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 l=n<.5?n*(1+t):n+t-n*t,a=2*n-l;o=c(a,l,e+1/3),r=c(a,l,e),i=c(a,l,e-1/3)}return{r:255*o,g:255*r,b:255*i}}(e.h,o,a),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=a(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.gradientType,this._r<1&&(this._r=a(this._r)),this._g<1&&(this._g=a(this._g)),this._b<1&&(this._b=a(this._b)),this._ok=n.ok,this._tc_id=l++}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),l=(i+c)/2;if(i==c)o=r=0;else{var a=i-c;switch(r=l>.5?a/(2-i-c):a/(i+c),i){case e:o=(t-n)/a+(t<n?6:0);break;case t:o=(n-e)/a+2;break;case n:o=(e-t)/a+4}o/=6}return{h:o,s:r,l:l}}function p(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),l=i,a=i-c;if(r=0===i?0:a/i,i==c)o=0;else{switch(i){case e:o=(t-n)/a+(t<n?6:0);break;case t:o=(n-e)/a+2;break;case n:o=(e-t)/a+4}o/=6}return{h:o,s:r,v:l}}function h(e,t,n,o){var r=[A(a(e).toString(16)),A(a(t).toString(16)),A(a(n).toString(16))];return o&&r[0].charAt(0)==r[0].charAt(1)&&r[1].charAt(0)==r[1].charAt(1)&&r[2].charAt(0)==r[2].charAt(1)?r[0].charAt(0)+r[1].charAt(0)+r[2].charAt(0):r.join("")}function v(e,t,n,o){return[A(P(o)),A(a(e).toString(16)),A(a(t).toString(16)),A(a(n).toString(16))].join("")}function m(e,t){t=0===t?0:t||10;var n=b(e).toHsl();return n.s-=t/100,n.s=M(n.s),b(n)}function g(e,t){t=0===t?0:t||10;var n=b(e).toHsl();return n.s+=t/100,n.s=M(n.s),b(n)}function O(e){return b(e).desaturate(100)}function k(e,t){t=0===t?0:t||10;var n=b(e).toHsl();return n.l+=t/100,n.l=M(n.l),b(n)}function j(e,t){t=0===t?0:t||10;var n=b(e).toRgb();return n.r=u(0,s(255,n.r-a(-t/100*255))),n.g=u(0,s(255,n.g-a(-t/100*255))),n.b=u(0,s(255,n.b-a(-t/100*255))),b(n)}function y(e,t){t=0===t?0:t||10;var n=b(e).toHsl();return n.l-=t/100,n.l=M(n.l),b(n)}function _(e,t){var n=b(e).toHsl(),o=(n.h+t)%360;return n.h=o<0?360+o:o,b(n)}function S(e){var t=b(e).toHsl();return t.h=(t.h+180)%360,b(t)}function C(e){var t=b(e).toHsl(),n=t.h;return[b(e),b({h:(n+120)%360,s:t.s,l:t.l}),b({h:(n+240)%360,s:t.s,l:t.l})]}function E(e){var t=b(e).toHsl(),n=t.h;return[b(e),b({h:(n+90)%360,s:t.s,l:t.l}),b({h:(n+180)%360,s:t.s,l:t.l}),b({h:(n+270)%360,s:t.s,l:t.l})]}function w(e){var t=b(e).toHsl(),n=t.h;return[b(e),b({h:(n+72)%360,s:t.s,l:t.l}),b({h:(n+216)%360,s:t.s,l:t.l})]}function I(e,t,n){t=t||6,n=n||30;var o=b(e).toHsl(),r=360/n,i=[b(e)];for(o.h=(o.h-(r*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=[],l=1/t;t--;)c.push(b({h:o,s:r,v:i})),i=(i+l)%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=a(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=a(360*e.h),n=a(100*e.s),o=a(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=a(360*e.h),n=a(100*e.s),o=a(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(a(e).toString(16)),A(a(t).toString(16)),A(a(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:a(this._r),g:a(this._g),b:a(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+a(this._r)+", "+a(this._g)+", "+a(this._b)+")":"rgba("+a(this._r)+", "+a(this._g)+", "+a(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:a(100*N(this._r,255))+"%",g:a(100*N(this._g,255))+"%",b:a(100*N(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+a(100*N(this._r,255))+"%, "+a(100*N(this._g,255))+"%, "+a(100*N(this._b,255))+"%)":"rgba("+a(100*N(this._r,255))+"%, "+a(100*N(this._g,255))+"%, "+a(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,l=null,a=0;r=(n=n||{}).includeFallbackColors,i=n.level,c=n.size;for(var s=0;s<t.length;s++)(o=b.readability(e,t[s]))>a&&(a=o,l=b(t[s]));return b.isReadable(e,l,{level:i,size:c})||!r?l:(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)},cDcd:function(e,t){!function(){e.exports=this.React}()},d2gM:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.dispatch;return function(e){return function(n){return Array.isArray(n)?n.filter(Boolean).map(t):e(n)}}}},foSv:function(e,t,n){"use strict";function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"a",(function(){return o}))},g56x:function(e,t){!function(){e.exports=this.wp.hooks}()},gQxa:function(e,t,n){"use strict";e.exports=function(e){var t,n={};return function e(t,n){var o;if(Array.isArray(n))for(o=0;o<n.length;o++)e(t,n[o]);else for(o in n)t[o]=(t[o]||[]).concat(n[o])}(n,e),(t=function(e){return function(t){return function(o){var r,i,c=n[o.type],l=t(o);if(c)for(r=0;r<c.length;r++)(i=c[r](o,e))&&e.dispatch(i);return l}}}).effects=n,t}},gdqT:function(e,t){!function(){e.exports=this.wp.a11y}()},jB5C:function(e,t,n){"use strict";var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function i(e,t){var n=e["page"+(t?"Y":"X")+"Offset"],o="scroll"+(t?"Top":"Left");if("number"!=typeof n){var r=e.document;"number"!=typeof(n=r.documentElement[o])&&(n=r.body[o])}return n}function c(e){return i(e)}function l(e){return i(e,!0)}function a(e){var t=function(e){var t,n=void 0,o=void 0,r=e.ownerDocument,i=r.body,c=r&&r.documentElement;return n=(t=e.getBoundingClientRect()).left,o=t.top,{left:n-=c.clientLeft||i.clientLeft||0,top:o-=c.clientTop||i.clientTop||0}}(e),n=e.ownerDocument,o=n.defaultView||n.parentWindow;return t.left+=c(o),t.top+=l(o),t}var s=new RegExp("^("+/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source+")(?!px)[a-z%]+$","i"),u=/^(top|right|bottom|left)$/,d="left";var b=void 0;function f(e,t){for(var n=0;n<e.length;n++)t(e[n])}function p(e){return"border-box"===b(e,"boxSizing")}"undefined"!=typeof window&&(b=window.getComputedStyle?function(e,t,n){var o="",r=e.ownerDocument,i=n||r.defaultView.getComputedStyle(e,null);return i&&(o=i.getPropertyValue(t)||i[t]),o}:function(e,t){var n=e.currentStyle&&e.currentStyle[t];if(s.test(n)&&!u.test(t)){var o=e.style,r=o[d],i=e.runtimeStyle[d];e.runtimeStyle[d]=e.currentStyle[d],o[d]="fontSize"===t?"1em":n||0,n=o.pixelLeft+"px",o[d]=r,e.runtimeStyle[d]=i}return""===n?"auto":n});var h=["margin","border","padding"];function v(e,t,n){var o={},r=e.style,i=void 0;for(i in t)t.hasOwnProperty(i)&&(o[i]=r[i],r[i]=t[i]);for(i in n.call(e),t)t.hasOwnProperty(i)&&(r[i]=o[i])}function m(e,t,n){var o=0,r=void 0,i=void 0,c=void 0;for(i=0;i<t.length;i++)if(r=t[i])for(c=0;c<n.length;c++){var l=void 0;l="border"===r?r+n[c]+"Width":r+n[c],o+=parseFloat(b(e,l))||0}return o}function g(e){return null!=e&&e==e.window}var O={};function k(e,t,n){if(g(e))return"width"===t?O.viewportWidth(e):O.viewportHeight(e);if(9===e.nodeType)return"width"===t?O.docWidth(e):O.docHeight(e);var o="width"===t?["Left","Right"]:["Top","Bottom"],r="width"===t?e.offsetWidth:e.offsetHeight,i=(b(e),p(e)),c=0;(null==r||r<=0)&&(r=void 0,(null==(c=b(e,t))||Number(c)<0)&&(c=e.style[t]||0),c=parseFloat(c)||0),void 0===n&&(n=i?1:-1);var l=void 0!==r||i,a=r||c;if(-1===n)return l?a-m(e,["border","padding"],o):c;if(l){var s=2===n?-m(e,["border"],o):m(e,["margin"],o);return a+(1===n?0:s)}return c+m(e,h.slice(n),o)}f(["Width","Height"],(function(e){O["doc"+e]=function(t){var n=t.document;return Math.max(n.documentElement["scroll"+e],n.body["scroll"+e],O["viewport"+e](n))},O["viewport"+e]=function(t){var n="client"+e,o=t.document,r=o.body,i=o.documentElement[n];return"CSS1Compat"===o.compatMode&&i||r&&r[n]||i}}));var j={position:"absolute",visibility:"hidden",display:"block"};function y(e){var t=void 0,n=arguments;return 0!==e.offsetWidth?t=k.apply(void 0,n):v(e,j,(function(){t=k.apply(void 0,n)})),t}function _(e,t,n){var o=n;if("object"!==(void 0===t?"undefined":r(t)))return void 0!==o?("number"==typeof o&&(o+="px"),void(e.style[t]=o)):b(e,t);for(var i in t)t.hasOwnProperty(i)&&_(e,i,t[i])}f(["width","height"],(function(e){var t=e.charAt(0).toUpperCase()+e.slice(1);O["outer"+t]=function(t,n){return t&&y(t,e,n?0:1)};var n="width"===e?["Left","Right"]:["Top","Bottom"];O[e]=function(t,o){if(void 0===o)return t&&y(t,e,-1);if(t){b(t);return p(t)&&(o+=m(t,["padding","border"],n)),_(t,e,o)}}})),e.exports=o({getWindow:function(e){var t=e.ownerDocument||e;return t.defaultView||t.parentWindow},offset:function(e,t){if(void 0===t)return a(e);!function(e,t){"static"===_(e,"position")&&(e.style.position="relative");var n=a(e),o={},r=void 0,i=void 0;for(i in t)t.hasOwnProperty(i)&&(r=parseFloat(_(e,i))||0,o[i]=r+t[i]-n[i]);_(e,o)}(e,t)},isWindow:g,each:f,css:_,clone:function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);if(e.overflow)for(var n in e)e.hasOwnProperty(n)&&(t.overflow[n]=e.overflow[n]);return t},scrollLeft:function(e,t){if(g(e)){if(void 0===t)return c(e);window.scrollTo(t,l(e))}else{if(void 0===t)return e.scrollLeft;e.scrollLeft=t}},scrollTop:function(e,t){if(g(e)){if(void 0===t)return l(e);window.scrollTo(c(e),t)}else{if(void 0===t)return e.scrollTop;e.scrollTop=t}},viewportWidth:0,viewportHeight:0},O)},jTPX:function(e,t){e.exports=function(e,t,n){return((n=window.getComputedStyle)?n(e):e.currentStyle)[t.replace(/-(\w)/gi,(function(e,t){return t.toUpperCase()}))]}},jZUy:function(e,t){!function(){e.exports=this.wp.coreData}()},l3Sj:function(e,t){!function(){e.exports=this.wp.i18n}()},ls82:function(e,t){!function(t){"use strict";var n=Object.prototype,o=n.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",c=r.asyncIterator||"@@asyncIterator",l=r.toStringTag||"@@toStringTag",a="object"==typeof e,s=t.regeneratorRuntime;if(s)a&&(e.exports=s);else{(s=t.regeneratorRuntime=a?e.exports:{}).wrap=h;var u={},d={};d[i]=function(){return this};var b=Object.getPrototypeOf,f=b&&b(b(E([])));f&&f!==n&&o.call(f,i)&&(d=f);var p=O.prototype=m.prototype=Object.create(d);g.prototype=p.constructor=O,O.constructor=g,O[l]=g.displayName="GeneratorFunction",s.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===g||"GeneratorFunction"===(t.displayName||t.name))},s.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,O):(e.__proto__=O,l in e||(e[l]="GeneratorFunction")),e.prototype=Object.create(p),e},s.awrap=function(e){return{__await:e}},k(j.prototype),j.prototype[c]=function(){return this},s.AsyncIterator=j,s.async=function(e,t,n,o){var r=new j(h(e,t,n,o));return s.isGeneratorFunction(t)?r:r.next().then((function(e){return e.done?e.value:r.next()}))},k(p),p[l]="Generator",p[i]=function(){return this},p.toString=function(){return"[object Generator]"},s.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}},s.values=E,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(S),!e)for(var t in this)"t"===t.charAt(0)&&o.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},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 n(n,o){return c.type="throw",c.arg=e,t.next=n,o&&(t.method="next",t.arg=void 0),!!o}for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r],c=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var l=o.call(i,"catchLoc"),a=o.call(i,"finallyLoc");if(l&&a){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!a)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&o.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var c=i?i.completion:{};return c.type=e,c.arg=t,i?(this.method="next",this.next=i.finallyLoc,u):this.complete(c)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),u},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),S(n),u}},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;S(n)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:E(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),u}}}function h(e,t,n,o){var r=t&&t.prototype instanceof m?t:m,i=Object.create(r.prototype),c=new C(o||[]);return i._invoke=function(e,t,n){var o="suspendedStart";return function(r,i){if("executing"===o)throw new Error("Generator is already running");if("completed"===o){if("throw"===r)throw i;return w()}for(n.method=r,n.arg=i;;){var c=n.delegate;if(c){var l=y(c,n);if(l){if(l===u)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===o)throw o="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o="executing";var a=v(e,t,n);if("normal"===a.type){if(o=n.done?"completed":"suspendedYield",a.arg===u)continue;return{value:a.arg,done:n.done}}"throw"===a.type&&(o="completed",n.method="throw",n.arg=a.arg)}}}(e,n,c),i}function v(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}function m(){}function g(){}function O(){}function k(e){["next","throw","return"].forEach((function(t){e[t]=function(e){return this._invoke(t,e)}}))}function j(e){var t;this._invoke=function(n,r){function i(){return new Promise((function(t,i){!function t(n,r,i,c){var l=v(e[n],e,r);if("throw"!==l.type){var a=l.arg,s=a.value;return s&&"object"==typeof s&&o.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){a.value=e,i(a)}),(function(e){return t("throw",e,i,c)}))}c(l.arg)}(n,r,t,i)}))}return t=t?t.then(i,i):i()}}function y(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,y(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var o=v(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,u;var r=o.arg;return r?r.done?(t[e.resultName]=r.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):r:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function _(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 S(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function E(e){if(e){var t=e[i];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,r=function t(){for(;++n<e.length;)if(o.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return r.next=r}}return{next:w}}function w(){return{value:void 0,done:!0}}}(function(){return this||"object"==typeof self&&self}()||Function("return this")())},md7G:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var o=n("U8pU"),r=n("JX7q");function i(e,t){return!t||"object"!==Object(o.a)(t)&&"function"!=typeof t?Object(r.a)(e):t}},o0o1:function(e,t,n){e.exports=n("u938")},pPDe: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 l(e,t,n){var o;if(e.length!==t.length)return!1;for(o=n;o<e.length;o++)if(e[o]!==t[o])return!1;return!0}o={},r="undefined"!=typeof WeakMap,t.a=function(e,t){var n,a;function s(){n=r?new WeakMap:c()}function u(){var n,o,r,i,c,s=arguments.length;for(i=new Array(s),r=0;r<s;r++)i[r]=arguments[r];for(c=t.apply(null,i),(n=a(c)).isUniqueByDependants||(n.lastDependants&&!l(c,n.lastDependants,0)&&n.clear(),n.lastDependants=c),o=n.head;o;){if(l(o.args,i,1))return o!==n.head&&(o.prev.next=o.next,o.next&&(o.next.prev=o.prev),o.next=n.head,o.prev=null,n.head.prev=o,n.head=o),o.val;o=o.next}return o={val:e.apply(null,i)},i[0]=null,o.args=i,n.head&&(n.head.prev=o,o.next=n.head),n.head=o,o.val}return t||(t=i),a=r?function(e){var t,r,i,l,a,s=n,u=!0;for(t=0;t<e.length;t++){if(r=e[t],!(a=r)||"object"!=typeof a){u=!1;break}s.has(r)?s=s.get(r):(i=new WeakMap,s.set(r,i),s=i)}return s.has(o)||((l=c()).isUniqueByDependants=u,s.set(o,l)),s.get(o)}:function(){return n},u.getDependants=t,u.clear=s,s(),u}},qRz9:function(e,t){!function(){e.exports=this.wp.richText}()},rePB:function(e,t,n){"use strict";function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,"a",(function(){return o}))},rl8x:function(e,t){!function(){e.exports=this.wp.isShallowEqual}()},rmEH:function(e,t){!function(){e.exports=this.wp.htmlEntities}()},"tI+e":function(e,t){!function(){e.exports=this.wp.components}()},tr0p:function(e,t,n){"use strict";n.r(t),n.d(t,"Autocomplete",(function(){return pn})),n.d(t,"AlignmentToolbar",(function(){return vn})),n.d(t,"BlockAlignmentToolbar",(function(){return kn})),n.d(t,"BlockControls",(function(){return Cn})),n.d(t,"BlockEdit",(function(){return wn})),n.d(t,"BlockFormatControls",(function(){return Ln})),n.d(t,"BlockNavigationDropdown",(function(){return Pn})),n.d(t,"BlockIcon",(function(){return Mn})),n.d(t,"ColorPalette",(function(){return Hn})),n.d(t,"withColorContext",(function(){return Fn})),n.d(t,"getColorClassName",(function(){return Wn})),n.d(t,"getColorObjectByAttributeValues",(function(){return zn})),n.d(t,"getColorObjectByColorValue",(function(){return Kn})),n.d(t,"createCustomColorsHOC",(function(){return $n})),n.d(t,"withColors",(function(){return Jn})),n.d(t,"ContrastChecker",(function(){return Zn})),n.d(t,"getFontSize",(function(){return Qn})),n.d(t,"getFontSizeClass",(function(){return eo})),n.d(t,"FontSizePicker",(function(){return to})),n.d(t,"withFontSizes",(function(){return no})),n.d(t,"InnerBlocks",(function(){return _r})),n.d(t,"InspectorAdvancedControls",(function(){return Ir})),n.d(t,"InspectorControls",(function(){return Nr})),n.d(t,"PanelColorSettings",(function(){return Fr})),n.d(t,"PlainText",(function(){return Hr})),n.d(t,"RichText",(function(){return Oi})),n.d(t,"RichTextShortcut",(function(){return Qr})),n.d(t,"RichTextToolbarButton",(function(){return ui})),n.d(t,"UnstableRichTextInputEvent",(function(){return di})),n.d(t,"MediaPlaceholder",(function(){return Ci})),n.d(t,"MediaUpload",(function(){return ki})),n.d(t,"MediaUploadCheck",(function(){return ho})),n.d(t,"URLInput",(function(){return Bi})),n.d(t,"URLInputButton",(function(){return xi})),n.d(t,"URLPopover",(function(){return ji})),n.d(t,"BlockEditorKeyboardShortcuts",(function(){return Ai})),n.d(t,"BlockInspector",(function(){return Ki})),n.d(t,"BlockList",(function(){return jr})),n.d(t,"BlockMover",(function(){return po})),n.d(t,"BlockSelectionClearer",(function(){return Gi})),n.d(t,"BlockSettingsMenu",(function(){return lc})),n.d(t,"_BlockSettingsMenuFirstItem",(function(){return nc})),n.d(t,"_BlockSettingsMenuPluginsExtension",(function(){return cc})),n.d(t,"BlockTitle",(function(){return Lo})),n.d(t,"BlockToolbar",(function(){return dc})),n.d(t,"CopyHandler",(function(){return bc})),n.d(t,"DefaultBlockAppender",(function(){return gr})),n.d(t,"Inserter",(function(){return nr})),n.d(t,"MultiBlocksSwitcher",(function(){return uc})),n.d(t,"MultiSelectScrollIntoView",(function(){return pc})),n.d(t,"NavigableToolbar",(function(){return Po})),n.d(t,"ObserveTyping",(function(){return mc})),n.d(t,"PreserveScrollInReorder",(function(){return Oc})),n.d(t,"SkipToSelectedBlock",(function(){return Di})),n.d(t,"Warning",(function(){return go})),n.d(t,"WritingFlow",(function(){return Cc})),n.d(t,"BlockEditorProvider",(function(){return wc})),n.d(t,"SETTINGS_DEFAULTS",(function(){return v}));var o={};n.r(o),n.d(o,"resetBlocks",(function(){return W})),n.d(o,"receiveBlocks",(function(){return G})),n.d(o,"updateBlockAttributes",(function(){return q})),n.d(o,"updateBlock",(function(){return Y})),n.d(o,"selectBlock",(function(){return X})),n.d(o,"selectPreviousBlock",(function(){return $})),n.d(o,"selectNextBlock",(function(){return J})),n.d(o,"startMultiSelect",(function(){return Z})),n.d(o,"stopMultiSelect",(function(){return Q})),n.d(o,"multiSelect",(function(){return ee})),n.d(o,"clearSelectedBlock",(function(){return te})),n.d(o,"toggleSelection",(function(){return ne})),n.d(o,"replaceBlocks",(function(){return oe})),n.d(o,"replaceBlock",(function(){return re})),n.d(o,"moveBlocksDown",(function(){return ce})),n.d(o,"moveBlocksUp",(function(){return le})),n.d(o,"moveBlockToPosition",(function(){return ae})),n.d(o,"insertBlock",(function(){return se})),n.d(o,"insertBlocks",(function(){return ue})),n.d(o,"showInsertionPoint",(function(){return de})),n.d(o,"hideInsertionPoint",(function(){return be})),n.d(o,"setTemplateValidity",(function(){return fe})),n.d(o,"synchronizeTemplate",(function(){return pe})),n.d(o,"mergeBlocks",(function(){return he})),n.d(o,"removeBlocks",(function(){return ve})),n.d(o,"removeBlock",(function(){return me})),n.d(o,"replaceInnerBlocks",(function(){return ge})),n.d(o,"toggleBlockMode",(function(){return Oe})),n.d(o,"startTyping",(function(){return ke})),n.d(o,"stopTyping",(function(){return je})),n.d(o,"enterFormattedText",(function(){return ye})),n.d(o,"exitFormattedText",(function(){return _e})),n.d(o,"insertDefaultBlock",(function(){return Se})),n.d(o,"updateBlockListSettings",(function(){return Ce})),n.d(o,"updateSettings",(function(){return Ee})),n.d(o,"__unstableSaveReusableBlock",(function(){return we})),n.d(o,"__unstableMarkLastChangeAsPersistent",(function(){return Ie}));var r={};n.r(r),n.d(r,"INSERTER_UTILITY_HIGH",(function(){return Be})),n.d(r,"INSERTER_UTILITY_MEDIUM",(function(){return xe})),n.d(r,"INSERTER_UTILITY_LOW",(function(){return Le})),n.d(r,"INSERTER_UTILITY_NONE",(function(){return Ne})),n.d(r,"getBlockDependantsCacheBust",(function(){return Ae})),n.d(r,"getBlockName",(function(){return De})),n.d(r,"isBlockValid",(function(){return Pe})),n.d(r,"getBlockAttributes",(function(){return Fe})),n.d(r,"getBlock",(function(){return He})),n.d(r,"__unstableGetBlockWithoutInnerBlocks",(function(){return Ue})),n.d(r,"getBlocks",(function(){return Ve})),n.d(r,"getClientIdsOfDescendants",(function(){return ze})),n.d(r,"getClientIdsWithDescendants",(function(){return Ke})),n.d(r,"getGlobalBlockCount",(function(){return We})),n.d(r,"getBlocksByClientId",(function(){return Ge})),n.d(r,"getBlockCount",(function(){return qe})),n.d(r,"getBlockSelectionStart",(function(){return Ye})),n.d(r,"getBlockSelectionEnd",(function(){return Xe})),n.d(r,"getSelectedBlockCount",(function(){return $e})),n.d(r,"hasSelectedBlock",(function(){return Je})),n.d(r,"getSelectedBlockClientId",(function(){return Ze})),n.d(r,"getSelectedBlock",(function(){return Qe})),n.d(r,"getBlockRootClientId",(function(){return et})),n.d(r,"getBlockHierarchyRootClientId",(function(){return tt})),n.d(r,"getAdjacentBlockClientId",(function(){return nt})),n.d(r,"getPreviousBlockClientId",(function(){return ot})),n.d(r,"getNextBlockClientId",(function(){return rt})),n.d(r,"getSelectedBlocksInitialCaretPosition",(function(){return it})),n.d(r,"getMultiSelectedBlockClientIds",(function(){return ct})),n.d(r,"getMultiSelectedBlocks",(function(){return lt})),n.d(r,"getFirstMultiSelectedBlockClientId",(function(){return at})),n.d(r,"getLastMultiSelectedBlockClientId",(function(){return st})),n.d(r,"isFirstMultiSelectedBlock",(function(){return dt})),n.d(r,"isBlockMultiSelected",(function(){return bt})),n.d(r,"isAncestorMultiSelected",(function(){return ft})),n.d(r,"getMultiSelectedBlocksStartClientId",(function(){return pt})),n.d(r,"getMultiSelectedBlocksEndClientId",(function(){return ht})),n.d(r,"getBlockOrder",(function(){return vt})),n.d(r,"getBlockIndex",(function(){return mt})),n.d(r,"isBlockSelected",(function(){return gt})),n.d(r,"hasSelectedInnerBlock",(function(){return Ot})),n.d(r,"isBlockWithinSelection",(function(){return kt})),n.d(r,"hasMultiSelection",(function(){return jt})),n.d(r,"isMultiSelecting",(function(){return yt})),n.d(r,"isSelectionEnabled",(function(){return _t})),n.d(r,"getBlockMode",(function(){return St})),n.d(r,"isTyping",(function(){return Ct})),n.d(r,"isCaretWithinFormattedText",(function(){return Et})),n.d(r,"getBlockInsertionPoint",(function(){return wt})),n.d(r,"isBlockInsertionPointVisible",(function(){return It})),n.d(r,"isValidTemplate",(function(){return Tt})),n.d(r,"getTemplate",(function(){return Bt})),n.d(r,"getTemplateLock",(function(){return xt})),n.d(r,"canInsertBlockType",(function(){return Nt})),n.d(r,"getInserterItems",(function(){return Dt})),n.d(r,"hasInserterItems",(function(){return Pt})),n.d(r,"getBlockListSettings",(function(){return Ft})),n.d(r,"getSettings",(function(){return Ht})),n.d(r,"isLastBlockChangePersistent",(function(){return Ut})),n.d(r,"__unstableIsLastBlockChangeIgnored",(function(){return Vt}));var i=n("HSyU"),c=(n("jZUy"),n("qRz9")),l=n("KEfo"),a=n("1ZqX"),s=n("vpQ4"),u=n("Ff2n"),d=n("KQm4"),b=n("rePB"),f=n("YLtl"),p=n("l3Sj"),h={insertUsage:{}},v={alignWide:!1,colors:[{name:Object(p.__)("Pale pink"),slug:"pale-pink",color:"#f78da7"},{name:Object(p.__)("Vivid red"),slug:"vivid-red",color:"#cf2e2e"},{name:Object(p.__)("Luminous vivid orange"),slug:"luminous-vivid-orange",color:"#ff6900"},{name:Object(p.__)("Luminous vivid amber"),slug:"luminous-vivid-amber",color:"#fcb900"},{name:Object(p.__)("Light green cyan"),slug:"light-green-cyan",color:"#7bdcb5"},{name:Object(p.__)("Vivid green cyan"),slug:"vivid-green-cyan",color:"#00d084"},{name:Object(p.__)("Pale cyan blue"),slug:"pale-cyan-blue",color:"#8ed1fc"},{name:Object(p.__)("Vivid cyan blue"),slug:"vivid-cyan-blue",color:"#0693e3"},{name:Object(p.__)("Very light gray"),slug:"very-light-gray",color:"#eeeeee"},{name:Object(p.__)("Cyan bluish gray"),slug:"cyan-bluish-gray",color:"#abb8c3"},{name:Object(p.__)("Very dark gray"),slug:"very-dark-gray",color:"#313131"}],fontSizes:[{name:Object(p._x)("Small","font size name"),size:13,slug:"small"},{name:Object(p._x)("Normal","font size name"),size:16,slug:"normal"},{name:Object(p._x)("Medium","font size name"),size:20,slug:"medium"},{name:Object(p._x)("Large","font size name"),size:36,slug:"large"},{name:Object(p._x)("Huge","font size name"),size:48,slug:"huge"}],imageSizes:[{slug:"thumbnail",label:Object(p.__)("Thumbnail")},{slug:"medium",label:Object(p.__)("Medium")},{slug:"large",label:Object(p.__)("Large")},{slug:"full",label:Object(p.__)("Full Size")}],maxWidth:580,allowedBlockTypes:!0,maxUploadFileSize:0,allowedMimeTypes:null,availableLegacyWidgets:{},hasPermissionsToManageWidgets:!1};function m(e,t,n){return[].concat(Object(d.a)(e.slice(0,n)),Object(d.a)(Object(f.castArray)(t)),Object(d.a)(e.slice(n)))}function g(e,t,n){var o=arguments.length>3&&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 e===t?Object(s.a)({},e):t}function S(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 C=Object(f.flow)(a.combineReducers,(function(e){return function(t,n){if(t&&"REMOVE_BLOCKS"===n.type){for(var o=Object(d.a)(n.clientIds),r=0;r<o.length;r++)o.push.apply(o,Object(d.a)(t.order[o[r]]));n=Object(s.a)({},n,{clientIds:o})}return e(t,n)}}),(function(e){return function(t,n){if("REPLACE_INNER_BLOCKS"!==n.type)return e(t,n);var o=t;t.order[n.rootClientId]&&(o=e(o,{type:"REMOVE_BLOCKS",clientIds:t.order[n.rootClientId]}));var r=o;return n.blocks.length&&(r=e(r,Object(s.a)({},n,{type:"INSERT_BLOCKS",index:0}))),r}}),(function(e){return function(t,n){if(t&&"RESET_BLOCKS"===n.type){var o=function e(t){var n=arguments.length>1&&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||!S(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){return o!==n[r]&&((n=_(e[t.clientId],n))[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,l=void 0===c?r.length:c;return Object(s.a)({},e,i,Object(b.a)({},o,m(r,i[o],l)));case"MOVE_BLOCK_TO_POSITION":var a,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],S=_.indexOf(k);return Object(s.a)({},e,Object(b.a)({},v,g(e[v],S,y)))}return Object(s.a)({},e,(a={},Object(b.a)(a,p,Object(f.without)(e[p],k)),Object(b.a)(a,v,m(e[v],k,y)),a));case"MOVE_BLOCKS_UP":var C=t.clientIds,E=t.rootClientId,w=void 0===E?"":E,I=Object(f.first)(C),T=e[w];if(!T.length||I===Object(f.first)(T))return e;var B=T.indexOf(I);return Object(s.a)({},e,Object(b.a)({},w,g(T,B,B-1,C.length)));case"MOVE_BLOCKS_DOWN":var x=t.clientIds,L=t.rootClientId,N=void 0===L?"":L,M=Object(f.first)(x),R=Object(f.last)(x),A=e[N];if(!A.length||R===Object(f.last)(A))return e;var D=A.indexOf(M);return Object(s.a)({},e,Object(b.a)({},N,g(A,D,D+1,x.length)));case"REPLACE_BLOCKS":var P=t.clientIds;if(!t.blocks)return e;var F=O(t.blocks);return Object(f.flow)([function(e){return Object(f.omit)(e,P)},function(e){return Object(s.a)({},e,Object(f.omit)(F,""))},function(e){return Object(f.mapValues)(e,(function(e){return Object(f.reduce)(e,(function(e,t){return t===P[0]?[].concat(Object(d.a)(e),Object(d.a)(F[""])):(-1===P.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 E=Object(a.combineReducers)({blocks:C,isTyping:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.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],t=arguments.length>1?arguments[1]:void 0;switch(t.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":var n=t.rootClientId,o=t.index;return{rootClientId:n,index:o};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}}),w=n("gQxa"),I=n.n(w),T=n("d2gM"),B=n.n(T),x=n("ODXe"),L=n("gdqT"),N=n("o0o1"),M=n.n(N);function R(e,t){for(var n=arguments.length,o=new Array(n>2?n-2:0),r=2;r<n;r++)o[r-2]=arguments[r];return{type:"SELECT",storeName:e,selectorName:t,args:o}}var A={SELECT:Object(a.createRegistryControl)((function(e){return function(t){var n,o=t.storeName,r=t.selectorName,i=t.args;return(n=e.select(o))[r].apply(n,Object(d.a)(i))}}))},D=M.a.mark(K),P=M.a.mark($),F=M.a.mark(J),H=M.a.mark(oe),U=M.a.mark(ae),V=M.a.mark(ue),z=M.a.mark(ve);function K(){return M.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,R("core/block-editor","getBlockCount");case 2:if(0!==e.sent){e.next=6;break}return e.next=6,Se();case 6:case"end":return e.stop()}}),D,this)}function W(e){return{type:"RESET_BLOCKS",blocks:e}}function G(e){return{type:"RECEIVE_BLOCKS",blocks:e}}function q(e,t){return{type:"UPDATE_BLOCK_ATTRIBUTES",clientId:e,attributes:t}}function Y(e,t){return{type:"UPDATE_BLOCK",clientId:e,updates:t}}function X(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return{type:"SELECT_BLOCK",initialPosition:t,clientId:e}}function $(e){var t;return M.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,R("core/block-editor","getPreviousBlockClientId",e);case 2:return t=n.sent,n.next=5,X(t,-1);case 5:case"end":return n.stop()}}),P,this)}function J(e){var t;return M.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,R("core/block-editor","getNextBlockClientId",e);case 2:return t=n.sent,n.next=5,X(t);case 5:case"end":return n.stop()}}),F,this)}function Z(){return{type:"START_MULTI_SELECT"}}function Q(){return{type:"STOP_MULTI_SELECT"}}function ee(e,t){return{type:"MULTI_SELECT",start:e,end:t}}function te(){return{type:"CLEAR_SELECTED_BLOCK"}}function ne(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return{type:"TOGGLE_SELECTION",isSelectionEnabled:e}}function oe(e,t){var n,o,r;return M.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,R("core/block-editor","getBlockRootClientId",Object(f.first)(e));case 4:n=i.sent,o=0;case 6:if(!(o<t.length)){i.next=16;break}return r=t[o],i.next=10,R("core/block-editor","canInsertBlockType",r.name,n);case 10:if(i.sent){i.next=13;break}return i.abrupt("return");case 13:o++,i.next=6;break;case 16:return i.next=18,{type:"REPLACE_BLOCKS",clientIds:e,blocks:t,time:Date.now()};case 18:return i.delegateYield(K(),"t0",19);case 19:case"end":return i.stop()}}),H,this)}function re(e,t){return oe(e,t)}function ie(e){return function(t,n){return{clientIds:Object(f.castArray)(t),type:e,rootClientId:n}}}var ce=ie("MOVE_BLOCKS_DOWN"),le=ie("MOVE_BLOCKS_UP");function ae(e,t,n,o){var r,i;return M.a.wrap((function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,R("core/block-editor","getTemplateLock",t);case 2:if("all"!==c.sent){c.next=5;break}return c.abrupt("return");case 5:if(r={type:"MOVE_BLOCK_TO_POSITION",fromRootClientId:t,toRootClientId:n,clientId:e,index:o},t!==n){c.next=10;break}return c.next=9,r;case 9:return c.abrupt("return");case 10:return c.next=12,R("core/block-editor","getBlockName",e);case 12:return i=c.sent,c.next=15,R("core/block-editor","canInsertBlockType",i,n);case 15:if(!c.sent){c.next=19;break}return c.next=19,r;case 19:case"end":return c.stop()}}),U,this)}function se(e,t,n){var o=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return ue([e],t,n,o)}function ue(e,t,n){var o,r,i,c,l,a,s,u,d=arguments;return M.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,l=void 0,b.prev=6,a=e[Symbol.iterator]();case 8:if(i=(s=a.next()).done){b.next=17;break}return u=s.value,b.next=12,R("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,l=b.t0;case 23:b.prev=23,b.prev=24,i||null==a.return||a.return();case 26:if(b.prev=26,!c){b.next=29;break}throw l;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()}}),V,this,[[6,19,23,31],[24,,26,30]])}function de(e,t){return{type:"SHOW_INSERTION_POINT",rootClientId:e,index:t}}function be(){return{type:"HIDE_INSERTION_POINT"}}function fe(e){return{type:"SET_TEMPLATE_VALIDITY",isValid:e}}function pe(){return{type:"SYNCHRONIZE_TEMPLATE"}}function he(e,t){return{type:"MERGE_BLOCKS",blocks:[e,t]}}function ve(e){var t,n=arguments;return M.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(K(),"t0",8);case 8:case"end":return o.stop()}}),z,this)}function me(e,t){return ve([e],t)}function ge(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return{type:"REPLACE_INNER_BLOCKS",rootClientId:e,blocks:t,updateSelection:n,time:Date.now()}}function Oe(e){return{type:"TOGGLE_BLOCK_MODE",clientId:e}}function ke(){return{type:"START_TYPING"}}function je(){return{type:"STOP_TYPING"}}function ye(){return{type:"ENTER_FORMATTED_TEXT"}}function _e(){return{type:"EXIT_FORMATTED_TEXT"}}function Se(e,t,n){return se(Object(i.createBlock)(Object(i.getDefaultBlockName)(),e),n,t)}function Ce(e,t){return{type:"UPDATE_BLOCK_LIST_SETTINGS",clientId:e,settings:t}}function Ee(e){return{type:"UPDATE_SETTINGS",settings:e}}function we(e,t){return{type:"SAVE_REUSABLE_BLOCK_SUCCESS",id:e,updatedId:t}}function Ie(){return{type:"MARK_LAST_CHANGE_AS_PERSISTENT"}}var Te=n("pPDe"),Be=3,xe=2,Le=1,Ne=0,Me=[],Re={},Ae=Object(Te.a)((function(){return[]}),(function(e,t){return Object(f.map)(vt(e,t),(function(t){return He(e,t)}))}));function De(e,t){var n=e.blocks.byClientId[t];return n?n.name:null}function Pe(e,t){var n=e.blocks.byClientId[t];return!!n&&n.isValid}var Fe=Object(Te.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]=zt(e,n.meta)),t}),o)),o}),(function(e,t){return[e.blocks.byClientId[t],e.blocks.attributes[t],zt(e)]})),He=Object(Te.a)((function(e,t){var n=e.blocks.byClientId[t];return n?Object(s.a)({},n,{attributes:Fe(e,t),innerBlocks:Ve(e,t)}):null}),(function(e,t){return[].concat(Object(d.a)(Fe.getDependants(e,t)),[Ae(e,t)])})),Ue=Object(Te.a)((function(e,t){var n=e.blocks.byClientId[t];return n?Object(s.a)({},n,{attributes:Fe(e,t)}):null}),(function(e,t){return[e.blocks.byClientId[t]].concat(Object(d.a)(Fe.getDependants(e,t)))})),Ve=Object(Te.a)((function(e,t){return Object(f.map)(vt(e,t),(function(t){return He(e,t)}))}),(function(e){return[e.blocks.byClientId,e.blocks.order,e.blocks.attributes]})),ze=function e(t,n){return Object(f.flatMap)(n,(function(n){var o=vt(t,n);return[].concat(Object(d.a)(o),Object(d.a)(e(t,o)))}))},Ke=Object(Te.a)((function(e){var t=vt(e);return[].concat(Object(d.a)(t),Object(d.a)(ze(e,t)))}),(function(e){return[e.blocks.order]})),We=Object(Te.a)((function(e,t){var n=Ke(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]})),Ge=Object(Te.a)((function(e,t){return Object(f.map)(Object(f.castArray)(t),(function(t){return He(e,t)}))}),(function(e){return[zt(e),e.blocks.byClientId,e.blocks.order,e.blocks.attributes]}));function qe(e,t){return vt(e,t).length}function Ye(e){return e.blockSelection.start}function Xe(e){return e.blockSelection.end}function $e(e){var t=ct(e).length;return t||(e.blockSelection.start?1:0)}function Je(e){var t=e.blockSelection,n=t.start,o=t.end;return!!n&&n===o}function Ze(e){var t=e.blockSelection,n=t.start,o=t.end;return n&&n===o&&e.blocks.byClientId[n]?n:null}function Qe(e){var t=Ze(e);return t?He(e,t):null}var et=Object(Te.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]})),tt=Object(Te.a)((function(e,t){for(var n=t,o=t;n;)n=et(e,o=n);return o}),(function(e){return[e.blocks.order]}));function nt(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;if(void 0===t&&(t=Ze(e)),void 0===t&&(t=n<0?at(e):st(e)),!t)return null;var o=et(e,t);if(null===o)return null;var r=e.blocks.order,i=r[o],c=i.indexOf(t),l=c+1*n;return l<0||l===i.length?null:i[l]}function ot(e,t){return nt(e,t,-1)}function rt(e,t){return nt(e,t,1)}function it(e){var t=e.blockSelection,n=t.start;return n===t.end&&n?e.blockSelection.initialPosition:null}var ct=Object(Te.a)((function(e){var t=e.blockSelection,n=t.start,o=t.end;if(n===o)return[];var r=et(e,n);if(null===r)return[];var i=vt(e,r),c=i.indexOf(n),l=i.indexOf(o);return c>l?i.slice(l,c+1):i.slice(c,l+1)}),(function(e){return[e.blocks.order,e.blockSelection.start,e.blockSelection.end]})),lt=Object(Te.a)((function(e){var t=ct(e);return t.length?t.map((function(t){return He(e,t)})):Me}),(function(e){return[].concat(Object(d.a)(ct.getDependants(e)),[e.blocks.byClientId,e.blocks.order,e.blocks.attributes,zt(e)])}));function at(e){return Object(f.first)(ct(e))||null}function st(e){return Object(f.last)(ct(e))||null}var ut=Object(Te.a)((function(e,t,n){for(var o=n;t!==o&&o;)o=et(e,o);return t===o}),(function(e){return[e.blocks.order]}));function dt(e,t){return at(e)===t}function bt(e,t){return-1!==ct(e).indexOf(t)}var ft=Object(Te.a)((function(e,t){for(var n=t,o=!1;n&&!o;)o=bt(e,n=et(e,n));return o}),(function(e){return[e.blocks.order,e.blockSelection.start,e.blockSelection.end]}));function pt(e){var t=e.blockSelection,n=t.start;return n===t.end?null:n||null}function ht(e){var t=e.blockSelection,n=t.start,o=t.end;return n===o?null:o||null}function vt(e,t){return e.blocks.order[t||""]||Me}function mt(e,t,n){return vt(e,n).indexOf(t)}function gt(e,t){var n=e.blockSelection,o=n.start;return o===n.end&&o===t}function Ot(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return Object(f.some)(vt(e,t),(function(t){return gt(e,t)||bt(e,t)||n&&Ot(e,t,n)}))}function kt(e,t){if(!t)return!1;var n=ct(e),o=n.indexOf(t);return o>-1&&o<n.length-1}function jt(e){var t=e.blockSelection;return t.start!==t.end}function yt(e){return e.blockSelection.isMultiSelecting}function _t(e){return e.blockSelection.isEnabled}function St(e,t){return e.blocksMode[t]||"visual"}function Ct(e){return e.isTyping}function Et(e){return e.isCaretWithinFormattedText}function wt(e){var t,n,o=e.insertionPoint,r=e.blockSelection;if(null!==o)return o;var i=r.end;return n=i?mt(e,i,t=et(e,i)||void 0)+1:vt(e).length,{rootClientId:t,index:n}}function It(e){return null!==e.insertionPoint}function Tt(e){return e.template.isValid}function Bt(e){return e.settings.template}function xt(e,t){if(!t)return e.settings.templateLock;var n=Ft(e,t);return n?n.templateLock:null}var Lt=function(e,t){var n=arguments.length>2&&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;var c=Ht(e),l=c.allowedBlockTypes,a=o(l,t,!0);if(!a)return!1;var s=!!xt(e,n);if(s)return!1;var u=Ft(e,n),d=Object(f.get)(u,["allowedBlocks"]),b=o(d,t),p=r.parent,h=De(e,n),v=o(p,h);return null!==b&&null!==v?b||v:null!==b?b:null===v||v},Nt=Object(Te.a)(Lt,(function(e,t,n){return[e.blockListSettings[n],e.blocks.byClientId[n],e.settings.allowedBlockTypes,e.settings.templateLock]}));function Mt(e,t){return e.preferences.insertUsage[t]||null}var Rt=function(e,t,n){return!!Object(i.hasBlockSupport)(t,"inserter",!0)&&Lt(e,t.name,n)},At=function(e,t,n){if(!Lt(e,"core/block",n))return!1;var o=De(e,t.clientId);return!!o&&(!!Object(i.getBlockType)(o)&&(!!Lt(e,o,n)&&!ut(e,t.clientId,n)))},Dt=Object(Te.a)((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=function(e,t,n){return n?Be:t>0?xe:"common"===e?Le:Ne},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=function(t){var r=t.name,c=!1;Object(i.hasBlockSupport)(t.name,"multiple",!0)||(c=Object(f.some)(Ge(e,Ke(e)),{name:t.name}));var l=Object(f.isArray)(t.parent),a=Mt(e,r)||{},s=a.time,u=a.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,l),frecency:o(s,d),hasChildBlocksWithInserterSupport:Object(i.hasChildBlocksWithInserterSupport)(t.name)}},c=function(t){var r="core/block/".concat(t.id),c=De(e,t.clientId),l=Object(i.getBlockType)(c),a=Mt(e,r)||{},s=a.time,u=a.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:l.icon,category:"reusable",keywords:[],isDisabled:!1,utility:b,frecency:f}},l=Object(i.getBlockTypes)().filter((function(n){return Rt(e,n,t)})).map(r),a=Kt(e).filter((function(n){return At(e,n,t)})).map(c);return Object(f.orderBy)([].concat(Object(d.a)(l),Object(d.a)(a)),["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,Kt(e),Object(i.getBlockTypes)()]})),Pt=Object(Te.a)((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=Object(f.some)(Object(i.getBlockTypes)(),(function(n){return Rt(e,n,t)}));if(n)return!0;var o=Object(f.some)(Kt(e),(function(n){return At(e,n,t)}));return o}),(function(e,t){return[e.blockListSettings[t],e.blocks.byClientId,e.settings.allowedBlockTypes,e.settings.templateLock,Kt(e),Object(i.getBlockTypes)()]}));function Ft(e,t){return e.blockListSettings[t]}function Ht(e){return e.settings}function Ut(e){return e.blocks.isPersistentChange}function Vt(e){return e.blocks.isIgnoredChange}function zt(e,t){return void 0===t?Object(f.get)(e,["settings","__experimentalMetaSource","value"],Re):Object(f.get)(e,["settings","__experimentalMetaSource","value",t])}function Kt(e){return Object(f.get)(e,["settings","__experimentalReusableBlocks"],Me)}var Wt={MERGE_BLOCKS:function(e,t){var n=t.dispatch,o=t.getState(),r=Object(x.a)(e.blocks,2),c=r[0],l=r[1],a=He(o,c),u=Object(i.getBlockType)(a.name);if(u.merge){var b=He(o,l),f=a.name===b.name?[b]:Object(i.switchToBlockType)(b,a.name);if(f&&f.length){var p=u.merge(a.attributes,f[0].attributes);n(X(a.clientId,-1)),n(oe([a.clientId,b.clientId],[Object(s.a)({},a,{attributes:Object(s.a)({},a.attributes,p)})].concat(Object(d.a)(f.slice(1)))))}}else n(X(a.clientId))},RESET_BLOCKS:[function(e,t){var n=t.getState(),o=Bt(n),r=xt(n),c=!o||"all"!==r||Object(i.doBlocksMatchTemplate)(e.blocks,o);if(c!==Tt(n))return fe(c)}],MULTI_SELECT:function(e,t){var n=$e((0,t.getState)());Object(L.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=Ve(n),r=Bt(n);return W(Object(i.synchronizeBlocksWithTemplate)(o,r))}};var Gt=function(e){var t,n=[I()(Wt),B.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},qt=Object(a.registerStore)("core/block-editor",{reducer:E,selectors:r,actions:o,controls:A,persist:["preferences"]});Gt(qt);var Yt=n("wx14"),Xt=n("GRId"),$t=n("TSYQ"),Jt=n.n($t),Zt=n("K9lf"),Qt=n("g56x"),en=n("1OyB"),tn=n("vuIU"),nn=n("md7G"),on=n("foSv"),rn=n("Ji7U"),cn=n("JX7q"),ln=n("tI+e"),an=Object(Xt.createContext)({name:"",isSelected:!1,focusedElement:null,setFocusedElement:f.noop,clientId:null}),sn=an.Consumer,un=an.Provider,dn=function(e){return Object(Zt.createHigherOrderComponent)((function(t){return function(n){return Object(Xt.createElement)(sn,null,(function(o){return Object(Xt.createElement)(t,Object(Yt.a)({},n,e(o,n)))}))}}),"withBlockEditContext")},bn=Object(Zt.createHigherOrderComponent)((function(e){return function(t){return Object(Xt.createElement)(sn,null,(function(n){return n.isSelected&&Object(Xt.createElement)(e,t)}))}}),"ifBlockEditSelected"),fn=[];var pn=Object(Zt.compose)([dn((function(e){return{blockName:e.name}})),function(e){return function(t){function n(){var e;return Object(en.a)(this,n),(e=Object(nn.a)(this,Object(on.a)(n).call(this))).state={completers:fn},e.saveParentRef=e.saveParentRef.bind(Object(cn.a)(Object(cn.a)(e))),e.onFocus=e.onFocus.bind(Object(cn.a)(Object(cn.a)(e))),e}return Object(rn.a)(n,t),Object(tn.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(Qt.hasFilter)("editor.Autocomplete.completers")&&(n=Object(Qt.applyFilters)("editor.Autocomplete.completers",n&&n.map(f.clone),t)),this.setState({lastFilteredCompletersProp:o,completers:n||fn})}},{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(Xt.createElement)("div",{onFocus:this.onFocus,ref:this.saveParentRef},Object(Xt.createElement)(e,Object(Yt.a)({onFocus:this.onFocus},n)))}}]),n}(Xt.Component)}])(ln.Autocomplete),hn=[{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 vn=Object(Zt.compose)(dn((function(e){return{clientId:e.clientId}})),Object(l.withViewportMatch)({isLargeViewport:"medium"}),Object(a.withSelect)((function(e,t){var n=t.clientId,o=t.isLargeViewport,r=t.isCollapsed,i=e("core/block-editor"),c=i.getBlockRootClientId,l=i.getSettings;return{isCollapsed:r||!o||!l().hasFixedToolbar&&c(n)}})))((function(e){var t=e.isCollapsed,n=e.value,o=e.onChange,r=e.alignmentControls,i=void 0===r?hn:r;function c(e){return function(){return o(n===e?void 0:e)}}var l=Object(f.find)(i,(function(e){return e.align===n}));return Object(Xt.createElement)(ln.Toolbar,{isCollapsed:t,icon:l?l.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)})}))})})),mn={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")}},gn=["left","center","right","wide","full"],On=["wide","full"];var kn=Object(Zt.compose)(dn((function(e){return{clientId:e.clientId}})),Object(l.withViewportMatch)({isLargeViewport:"medium"}),Object(a.withSelect)((function(e,t){var n=t.clientId,o=t.isLargeViewport,r=t.isCollapsed,i=e("core/block-editor"),c=i.getBlockRootClientId,l=(0,i.getSettings)();return{wideControlsEnabled:l.alignWide,isCollapsed:r||!o||!l.hasFixedToolbar&&c(n)}})))((function(e){var t=e.isCollapsed,n=e.value,o=e.onChange,r=e.controls,i=void 0===r?gn:r,c=e.wideControlsEnabled,l=void 0!==c&&c?i:i.filter((function(e){return-1===On.indexOf(e)})),a=mn[n];return Object(Xt.createElement)(ln.Toolbar,{isCollapsed:t,icon:a?a.icon:"align-left",label:Object(p.__)("Change Alignment"),controls:l.map((function(e){return Object(s.a)({},mn[e],{isActive:n===e,onClick:(t=e,function(){return o(n===t?void 0:t)})});var t}))})})),jn=Object(ln.createSlotFill)("BlockControls"),yn=jn.Fill,_n=jn.Slot,Sn=bn((function(e){var t=e.controls,n=e.children;return Object(Xt.createElement)(yn,null,Object(Xt.createElement)(ln.Toolbar,{controls:t}),n)}));Sn.Slot=_n;var Cn=Sn,En=Object(ln.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,l=Jt()(c,n.className),a=r.edit||r.save;return Object(Xt.createElement)(a,Object(Yt.a)({},e,{className:l}))})),wn=function(e){function t(e){var n;return Object(en.a)(this,t),(n=Object(nn.a)(this,Object(on.a)(t).call(this,e))).setFocusedElement=n.setFocusedElement.bind(Object(cn.a)(Object(cn.a)(n))),n.state={focusedElement:null,setFocusedElement:n.setFocusedElement},n}return Object(rn.a)(t,e),Object(tn.a)(t,[{key:"setFocusedElement",value:function(e){this.setState((function(t){return t.focusedElement===e?null:{focusedElement:e}}))}},{key:"render",value:function(){return Object(Xt.createElement)(un,{value:this.state},Object(Xt.createElement)(En,this.props))}}],[{key:"getDerivedStateFromProps",value:function(e){var t=e.clientId;return{name:e.name,isSelected:e.isSelected,clientId:t}}}]),t}(Xt.Component),In=Object(ln.createSlotFill)("BlockFormatControls"),Tn=In.Fill,Bn=In.Slot,xn=bn(Tn);xn.Slot=Bn;var Ln=xn,Nn=n("RxS6");function Mn(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(Xt.createElement)(ln.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(Xt.createElement)(ln.Path,{d:"M19 7h-1V5h-4v2h-4V5H6v2H5c-1.1 0-2 .9-2 2v10h18V9c0-1.1-.9-2-2-2zm0 10H5V9h14v8z"}))});var i=Object(Xt.createElement)(ln.Icon,{icon:t&&t.src?t.src:t}),c=o?{backgroundColor:t&&t.background,color:t&&t.foreground}:{};return Object(Xt.createElement)("span",{style:c,className:Jt()("editor-block-icon block-editor-block-icon",r,{"has-colors":o})},i)}function Rn(e){var t=e.blocks,n=e.selectedBlockClientId,o=e.selectBlock,r=e.showNestedBlocks;return Object(Xt.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(Xt.createElement)("li",{key:e.clientId},Object(Xt.createElement)("div",{className:"editor-block-navigation__item block-editor-block-navigation__item"},Object(Xt.createElement)(ln.Button,{className:Jt()("editor-block-navigation__item-button block-editor-block-navigation__item-button",{"is-selected":c}),onClick:function(){return o(e.clientId)}},Object(Xt.createElement)(Mn,{icon:t.icon,showColors:!0}),t.title,c&&Object(Xt.createElement)("span",{className:"screen-reader-text"},Object(p.__)("(selected block)")))),r&&!!e.innerBlocks&&!!e.innerBlocks.length&&Object(Xt.createElement)(Rn,{blocks:e.innerBlocks,selectedBlockClientId:n,selectBlock:o,showNestedBlocks:!0}))})))}var An=Object(Zt.compose)(Object(a.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(a.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(Xt.createElement)(ln.NavigableMenu,{role:"presentation",className:"editor-block-navigation__container block-editor-block-navigation__container"},Object(Xt.createElement)("p",{className:"editor-block-navigation__label block-editor-block-navigation__label"},Object(p.__)("Block Navigation")),i&&Object(Xt.createElement)(Rn,{blocks:[t],selectedBlockClientId:o,selectBlock:r,showNestedBlocks:!0}),!i&&Object(Xt.createElement)(Rn,{blocks:n,selectedBlockClientId:o,selectBlock:r}))})),Dn=Object(Xt.createElement)(ln.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"20",height:"20"},Object(Xt.createElement)(ln.Path,{d:"M5 5H3v2h2V5zm3 8h11v-2H8v2zm9-8H6v2h11V5zM7 11H5v2h2v-2zm0 8h2v-2H7v2zm3-2v2h11v-2H10z"}));var Pn=Object(a.withSelect)((function(e){return{hasBlocks:!!e("core/block-editor").getBlockCount()}}))((function(e){var t=e.hasBlocks,n=e.isDisabled,o=t&&!n;return Object(Xt.createElement)(ln.Dropdown,{renderToggle:function(e){var t=e.isOpen,n=e.onToggle;return Object(Xt.createElement)(Xt.Fragment,null,o&&Object(Xt.createElement)(ln.KeyboardShortcuts,{bindGlobal:!0,shortcuts:Object(b.a)({},Nn.rawShortcut.access("o"),n)}),Object(Xt.createElement)(ln.IconButton,{icon:Dn,"aria-expanded":t,onClick:o?n:void 0,label:Object(p.__)("Block Navigation"),className:"editor-block-navigation block-editor-block-navigation",shortcut:Nn.displayShortcut.access("o"),"aria-disabled":!o}))},renderContent:function(e){var t=e.onClose;return Object(Xt.createElement)(An,{onSelect:t})}})})),Fn=Object(Zt.createHigherOrderComponent)(Object(a.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"),Hn=Fn(ln.ColorPalette),Un=n("Zss7"),Vn=n.n(Un),zn=function(e,t,n){if(t){var o=Object(f.find)(e,{slug:t});if(o)return o}return{color:n}},Kn=function(e,t){return Object(f.find)(e,{color:t})};function Wn(e,t){if(e&&t)return"has-".concat(Object(f.kebabCase)(t),"-").concat(e)}var Gn=[],qn=function(e){return Object(Zt.createHigherOrderComponent)((function(t){return function(n){return Object(Xt.createElement)(t,Object(Yt.a)({},n,{colors:e}))}}),"withCustomColorPalette")},Yn=function(){return Object(a.withSelect)((function(e){var t=e("core/block-editor").getSettings();return{colors:Object(f.get)(t,["colors"],Gn)}}))};function Xn(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(Zt.compose)([t,function(e){return function(t){function o(e){var t;return Object(en.a)(this,o),(t=Object(nn.a)(this,Object(on.a)(o).call(this,e))).setters=t.createSetters(),t.colorUtils={getMostReadableColor:t.getMostReadableColor.bind(Object(cn.a)(Object(cn.a)(t)))},t.state={},t}return Object(rn.a)(o,t),Object(tn.a)(o,[{key:"getMostReadableColor",value:function(e){return function(e,t){return Vn.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=Kn(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(Xt.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=zn(r,o[i],o["custom".concat(Object(f.upperFirst)(i))]),l=t[i];return Object(f.get)(l,["color"])===c.color&&l?e[i]=l:e[i]=Object(s.a)({},c,{class:Wn(n,c.slug)}),e}),{})}}]),o}(Xt.Component)}])}function $n(e){return function(){for(var t=qn(e),n=arguments.length,o=new Array(n),r=0;r<n;r++)o[r]=arguments[r];return Object(Zt.createHigherOrderComponent)(Xn(o,t),"withCustomColors")}}function Jn(){for(var e=Yn(),t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return Object(Zt.createHigherOrderComponent)(Xn(n,e),"withColors")}var Zn=function(e){var t=e.backgroundColor,n=e.fallbackBackgroundColor,o=e.fallbackTextColor,r=e.fontSize,i=e.isLargeText,c=e.textColor;if(!t&&!n||!c&&!o)return null;var l=Vn()(t||n),a=Vn()(c||o);if(1!==l.getAlpha()||1!==a.getAlpha()||Vn.a.isReadable(l,a,{level:"AA",size:i||!1!==i&&r>=24?"large":"small"}))return null;var s=l.getBrightness()<a.getBrightness()?Object(p.__)("This color combination may be hard for people to read. Try using a darker background color and/or a brighter text color."):Object(p.__)("This color combination may be hard for people to read. Try using a brighter background color and/or a darker text color.");return Object(Xt.createElement)("div",{className:"editor-contrast-checker block-editor-contrast-checker"},Object(Xt.createElement)(ln.Notice,{status:"warning",isDismissible:!1},s))},Qn=function(e,t,n){if(t){var o=Object(f.find)(e,{slug:t});if(o)return o}return{size:n}};function eo(e){if(e)return"has-".concat(Object(f.kebabCase)(e),"-font-size")}var to=Object(a.withSelect)((function(e){var t=e("core/block-editor").getSettings();return{disableCustomFontSizes:t.disableCustomFontSizes,fontSizes:t.fontSizes}}))(ln.FontSizePicker),no=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var o=Object(f.reduce)(t,(function(e,t){return e[t]="custom".concat(Object(f.upperFirst)(t)),e}),{});return Object(Zt.createHigherOrderComponent)(Object(Zt.compose)([Object(a.withSelect)((function(e){return{fontSizes:e("core/block-editor").getSettings().fontSizes}})),function(e){return function(t){function n(e){var t;return Object(en.a)(this,n),(t=Object(nn.a)(this,Object(on.a)(n).call(this,e))).setters=t.createSetters(),t.state={},t}return Object(rn.a)(n,t),Object(tn.a)(n,[{key:"createSetters",value:function(){var e=this;return Object(f.reduce)(o,(function(t,n,o){var r=Object(f.upperFirst)(o);return t["set".concat(r)]=e.createSetFontSize(o,n),t}),{})}},{key:"createSetFontSize",value:function(e,t){var n=this;return function(o){var r,i=Object(f.find)(n.props.fontSizes,{size: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(Xt.createElement)(e,Object(s.a)({},this.props,{fontSizes:void 0},this.state,this.setters))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=e.attributes,r=e.fontSizes,i=function(e,o){return!t[o]||(n[o]?n[o]!==t[o].slug:t[o].size!==n[e])};if(!Object(f.some)(o,i))return null;var c=Object(f.reduce)(Object(f.pickBy)(o,i),(function(e,t,o){var i=n[o],c=Qn(r,i,n[t]);return e[o]=Object(s.a)({},c,{class:eo(i)}),e}),{});return Object(s.a)({},t,c)}}]),n}(Xt.Component)}]),"withFontSizes")},oo=n("rl8x"),ro=n.n(oo),io=n("1CF3");function co(e,t,n,o,r,i){var c=n+1;return e>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 lo=Object(Xt.createElement)(ln.SVG,{width:"18",height:"18",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 18 18"},Object(Xt.createElement)(ln.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(Xt.createElement)(ln.SVG,{width:"18",height:"18",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 18 18"},Object(Xt.createElement)(ln.Polygon,{points:"9,13.5 14.7,7.9 13.2,6.5 9,10.7 4.8,6.5 3.3,7.9 "})),so=Object(Xt.createElement)(ln.SVG,{width:"18",height:"18",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 18 18"},Object(Xt.createElement)(ln.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"})),uo=Object(a.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,l=e.onDragEnd,a={type:"block",srcIndex:i,srcRootClientId:o,srcClientId:n};return Object(Xt.createElement)(ln.Draggable,{elementId:r,transferData:a,onDragStart:c,onDragEnd:l},(function(e){var n=e.onDraggableStart,o=e.onDraggableEnd;return t({onDraggableStart:n,onDraggableEnd:o})}))})),bo=function(e){var t=e.isVisible,n=e.className,o=e.icon,r=e.onDragStart,i=e.onDragEnd,c=e.blockElementId,l=e.clientId;if(!t)return null;var a=Jt()("editor-block-mover__control-drag-handle block-editor-block-mover__control-drag-handle",n);return Object(Xt.createElement)(uo,{clientId:l,blockElementId:c,onDragStart:r,onDragEnd:i},(function(e){var t=e.onDraggableStart,n=e.onDraggableEnd;return Object(Xt.createElement)("div",{className:a,"aria-hidden":"true",onDragStart:t,onDragEnd:n,draggable:!0},o)}))},fo=function(e){function t(){var e;return Object(en.a)(this,t),(e=Object(nn.a)(this,Object(on.a)(t).apply(this,arguments))).state={isFocused:!1},e.onFocus=e.onFocus.bind(Object(cn.a)(Object(cn.a)(e))),e.onBlur=e.onBlur.bind(Object(cn.a)(Object(cn.a)(e))),e}return Object(rn.a)(t,e),Object(tn.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,l=e.onDragEnd,a=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)(a).length;return b||o&&r?null:Object(Xt.createElement)("div",{className:Jt()("editor-block-mover block-editor-block-mover",{"is-visible":m||!v})},Object(Xt.createElement)(ln.IconButton,{className:"editor-block-mover__control block-editor-block-mover__control",onClick:o?null:t,icon:lo,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(Xt.createElement)(bo,{className:"editor-block-mover__control block-editor-block-mover__control",icon:so,clientId:a,blockElementId:s,isVisible:i,onDragStart:c,onDragEnd:l}),Object(Xt.createElement)(ln.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(Xt.createElement)("span",{id:"block-editor-block-mover__up-description-".concat(h),className:"editor-block-mover__description block-editor-block-mover__description"},co(g,u&&u.title,d,o,r,-1)),Object(Xt.createElement)("span",{id:"block-editor-block-mover__down-description-".concat(h),className:"editor-block-mover__description block-editor-block-mover__description"},co(g,u&&u.title,d,o,r,1)))}}]),t}(Xt.Component),po=Object(Zt.compose)(Object(a.withSelect)((function(e,t){var n=t.clientIds,o=e("core/block-editor"),r=o.getBlock,c=o.getBlockIndex,l=o.getTemplateLock,a=o.getBlockRootClientId,s=Object(f.first)(Object(f.castArray)(n)),u=r(s),d=a(Object(f.first)(Object(f.castArray)(n)));return{firstIndex:c(s,d),blockType:u?Object(i.getBlockType)(u.name):null,isLocked:"all"===l(d),rootClientId:d}})),Object(a.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)}})),Zt.withInstanceId)(fo);var ho=Object(a.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})),vo=function(e){function t(){var e;return Object(en.a)(this,t),(e=Object(nn.a)(this,Object(on.a)(t).apply(this,arguments))).onFilesDrop=e.onFilesDrop.bind(Object(cn.a)(Object(cn.a)(e))),e.onHTMLDrop=e.onHTMLDrop.bind(Object(cn.a)(Object(cn.a)(e))),e.onDrop=e.onDrop.bind(Object(cn.a)(Object(cn.a)(e))),e}return Object(rn.a)(t,e),Object(tn.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,l=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),a=l.srcRootClientId,s=l.srcClientId,u=l.srcIndex,d=l.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&&u<p&&((b=a)===(f=o)||1==!b&&1==!f)?h-1:h;this.props.moveBlockToPosition(s,a,v)}}},{key:"render",value:function(){var e=this.props,t=e.isLocked,n=e.index;if(t)return null;var o=void 0===n;return Object(Xt.createElement)(ho,null,Object(Xt.createElement)(ln.DropZone,{className:Jt()("editor-block-drop-zone block-editor-block-drop-zone",{"is-appender":o}),onFilesDrop:this.onFilesDrop,onHTMLDrop:this.onHTMLDrop,onDrop:this.onDrop}))}}]),t}(Xt.Component),mo=Object(Zt.compose)(Object(a.withDispatch)((function(e,t){var n=e("core/block-editor"),o=n.insertBlocks,r=n.updateBlockAttributes,i=n.moveBlockToPosition;return{insertBlocks:function(e,n){var r=t.rootClientId;o(e,n,r)},updateBlockAttributes:function(){r.apply(void 0,arguments)},moveBlockToPosition:function(e,n,o){var r=t.rootClientId;i(e,n,r,o)}}})),Object(a.withSelect)((function(e,t){var n=t.rootClientId,o=e("core/block-editor"),r=o.getClientIdsOfDescendants,i=o.getTemplateLock,c=o.getBlockIndex;return{isLocked:!!i(n),getClientIdsOfDescendants:r,getBlockIndex:c}})),Object(ln.withFilters)("editor.BlockDropZone"))(vo);var go=function(e){var t=e.className,n=e.actions,o=e.children,r=e.secondaryActions;return Object(Xt.createElement)("div",{className:Jt()(t,"editor-warning block-editor-warning")},Object(Xt.createElement)("div",{className:"editor-warning__contents block-editor-warning__contents"},Object(Xt.createElement)("p",{className:"editor-warning__message block-editor-warning__message"},o),Xt.Children.count(n)>0&&Object(Xt.createElement)("div",{className:"editor-warning__actions block-editor-warning__actions"},Xt.Children.map(n,(function(e,t){return Object(Xt.createElement)("span",{key:t,className:"editor-warning__action block-editor-warning__action"},e)})))),r&&Object(Xt.createElement)(ln.Dropdown,{className:"editor-warning__secondary block-editor-warning__secondary",position:"bottom left",renderToggle:function(e){var t=e.isOpen,n=e.onToggle;return Object(Xt.createElement)(ln.IconButton,{icon:"ellipsis",label:Object(p.__)("More options"),onClick:n,"aria-expanded":t})},renderContent:function(){return Object(Xt.createElement)(ln.MenuGroup,null,r.map((function(e,t){return Object(Xt.createElement)(ln.MenuItem,{onClick:e.onClick,key:t},e.title)})))}}))},Oo=n("v2jn"),ko=function(e){var t=e.title,n=e.rawContent,o=e.renderedContent,r=e.action,i=e.actionText,c=e.className;return Object(Xt.createElement)("div",{className:c},Object(Xt.createElement)("div",{className:"editor-block-compare__content block-editor-block-compare__content"},Object(Xt.createElement)("h2",{className:"editor-block-compare__heading block-editor-block-compare__heading"},t),Object(Xt.createElement)("div",{className:"editor-block-compare__html block-editor-block-compare__html"},n),Object(Xt.createElement)("div",{className:"editor-block-compare__preview block-editor-block-compare__preview edit-post-visual-editor"},Object(Xt.createElement)(Xt.RawHTML,null,Object(io.safeHTML)(o)))),Object(Xt.createElement)("div",{className:"editor-block-compare__action block-editor-block-compare__action"},Object(Xt.createElement)(ln.Button,{isLarge:!0,tabIndex:"0",onClick:r},i)))},jo=function(e){function t(){return Object(en.a)(this,t),Object(nn.a)(this,Object(on.a)(t).apply(this,arguments))}return Object(rn.a)(t,e),Object(tn.a)(t,[{key:"getDifference",value:function(e,t){return Object(Oo.diffChars)(e,t).map((function(e,t){var n=Jt()({"editor-block-compare__added block-editor-block-compare__added":e.added,"editor-block-compare__removed block-editor-block-compare__removed":e.removed});return Object(Xt.createElement)("span",{key:t,className:n},e.value)}))}},{key:"getConvertedContent",value:function(e){return Object(f.castArray)(e).map((function(e){return Object(i.getSaveContent)(e.name,e.attributes,e.innerBlocks)})).join("")}},{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.getConvertedContent(r(t)),l=this.getDifference(t.originalContent,c);return Object(Xt.createElement)("div",{className:"editor-block-compare__wrapper block-editor-block-compare__wrapper"},Object(Xt.createElement)(ko,{title:Object(p.__)("Current"),className:"editor-block-compare__current block-editor-block-compare__current",action:n,actionText:Object(p.__)("Convert to HTML"),rawContent:t.originalContent,renderedContent:t.originalContent}),Object(Xt.createElement)(ko,{title:Object(p.__)("After Conversion"),className:"editor-block-compare__converted block-editor-block-compare__converted",action:o,actionText:i,rawContent:l,renderedContent:c}))}}]),t}(Xt.Component),yo=function(e){function t(e){var n;return Object(en.a)(this,t),(n=Object(nn.a)(this,Object(on.a)(t).call(this,e))).state={compare:!1},n.onCompare=n.onCompare.bind(Object(cn.a)(Object(cn.a)(n))),n.onCompareClose=n.onCompareClose.bind(Object(cn.a)(Object(cn.a)(n))),n}return Object(rn.a)(t,e),Object(tn.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,l=!!Object(i.getBlockType)("core/html"),a=this.state.compare,s=[{title:Object(p.__)("Convert to Classic Block"),onClick:o},{title:Object(p.__)("Attempt Block Recovery"),onClick:r}];return a?Object(Xt.createElement)(ln.Modal,{title:Object(p.__)("Resolve Block"),onRequestClose:this.onCompareClose,className:"editor-block-compare block-editor-block-compare"},Object(Xt.createElement)(jo,{block:c,onKeep:t,onConvert:n,convertor:_o,convertButtonText:Object(p.__)("Convert to Blocks")})):Object(Xt.createElement)(go,{actions:[Object(Xt.createElement)(ln.Button,{key:"convert",onClick:this.onCompare,isLarge:!0,isPrimary:!l},Object(p._x)("Resolve","imperative verb")),l&&Object(Xt.createElement)(ln.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}(Xt.Component),_o=function(e){return Object(i.rawHandler)({HTML:e.originalContent})},So=Object(Zt.compose)([Object(a.withSelect)((function(e,t){var n=t.clientId;return{block:e("core/block-editor").getBlock(n)}})),Object(a.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,_o(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)))}}}))])(yo),Co=Object(Xt.createElement)(go,null,Object(p.__)("This block has encountered an error and cannot be previewed.")),Eo=function(){return Co},wo=function(e){function t(){var e;return Object(en.a)(this,t),(e=Object(nn.a)(this,Object(on.a)(t).apply(this,arguments))).state={hasError:!1},e}return Object(rn.a)(t,e),Object(tn.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}(Xt.Component),Io=n("O6Fj"),To=n.n(Io),Bo=function(e){function t(e){var n;return Object(en.a)(this,t),(n=Object(nn.a)(this,Object(on.a)(t).apply(this,arguments))).onChange=n.onChange.bind(Object(cn.a)(Object(cn.a)(n))),n.onBlur=n.onBlur.bind(Object(cn.a)(Object(cn.a)(n))),n.state={html:e.block.isValid?Object(i.getBlockContent)(e.block):e.block.originalContent},n}return Object(rn.a)(t,e),Object(tn.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(Xt.createElement)(To.a,{className:"editor-block-list__block-html-textarea block-editor-block-list__block-html-textarea",value:e,onBlur:this.onBlur,onChange:this.onChange})}}]),t}(Xt.Component),xo=Object(Zt.compose)([Object(a.withSelect)((function(e,t){return{block:e("core/block-editor").getBlock(t.clientId)}})),Object(a.withDispatch)((function(e){return{onChange:function(t,n,o,r){e("core/block-editor").updateBlock(t,{attributes:n,originalContent:o,isValid:r})}}}))])(Bo);var Lo=Object(a.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})),No=function(e){function t(){var e;return Object(en.a)(this,t),(e=Object(nn.a)(this,Object(on.a)(t).apply(this,arguments))).state={isFocused:!1},e.onFocus=e.onFocus.bind(Object(cn.a)(Object(cn.a)(e))),e.onBlur=e.onBlur.bind(Object(cn.a)(Object(cn.a)(e))),e}return Object(rn.a)(t,e),Object(tn.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(Xt.createElement)("div",{className:"editor-block-list__breadcrumb block-editor-block-list__breadcrumb"},Object(Xt.createElement)(ln.Toolbar,null,n&&Object(Xt.createElement)(Xt.Fragment,null,Object(Xt.createElement)(Lo,{clientId:n}),Object(Xt.createElement)("span",{className:"editor-block-list__descendant-arrow block-editor-block-list__descendant-arrow"})),Object(Xt.createElement)(Lo,{clientId:t})))}}]),t}(Xt.Component),Mo=Object(Zt.compose)([Object(a.withSelect)((function(e,t){return{rootClientId:(0,e("core/block-editor").getBlockRootClientId)(t.clientId)}}))])(No),Ro=window,Ao=Ro.Node,Do=Ro.getSelection,Po=function(e){function t(){var e;return Object(en.a)(this,t),(e=Object(nn.a)(this,Object(on.a)(t).apply(this,arguments))).focusToolbar=e.focusToolbar.bind(Object(cn.a)(Object(cn.a)(e))),e.focusSelection=e.focusSelection.bind(Object(cn.a)(Object(cn.a)(e))),e.switchOnKeyDown=Object(f.cond)([[Object(f.matchesProperty)(["keyCode"],Nn.ESCAPE),e.focusSelection]]),e.toolbar=Object(Xt.createRef)(),e}return Object(rn.a)(t,e),Object(tn.a)(t,[{key:"focusToolbar",value:function(){var e=io.focus.tabbable.find(this.toolbar.current);e.length&&e[0].focus()}},{key:"focusSelection",value:function(){var e=Do();if(e){var t=e.focusNode;t.nodeType!==Ao.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(Xt.createElement)(ln.NavigableMenu,Object(Yt.a)({orientation:"horizontal",role:"toolbar",ref:this.toolbar,onKeyDown:this.switchOnKeyDown},Object(f.omit)(n,["focusOnMount"])),Object(Xt.createElement)(ln.KeyboardShortcuts,{bindGlobal:!0,eventName:"keydown",shortcuts:{"alt+f10":this.focusToolbar}}),t)}}]),t}(Xt.Component);var Fo=function(e){var t=e.focusOnMount;return Object(Xt.createElement)(Po,{focusOnMount:t,className:"editor-block-contextual-toolbar block-editor-block-contextual-toolbar","aria-label":Object(p.__)("Block tools")},Object(Xt.createElement)(dc,null))};var Ho=Object(a.withSelect)((function(e,t){var n=t.clientId,o=e("core/block-editor"),r=o.getMultiSelectedBlockClientIds,i=o.isMultiSelecting,c=o.getBlockIndex,l=o.getBlockCount,a=r(),s=c(Object(f.first)(a),n),u=c(Object(f.last)(a),n);return{multiSelectedBlockClientIds:a,isSelecting:i(),isFirst:0===s,isLast:u+1===l()}}))((function(e){var t=e.multiSelectedBlockClientIds,n=e.clientId,o=e.isSelecting,r=e.isFirst,i=e.isLast;return o?null:Object(Xt.createElement)(po,{key:"mover",clientId:n,clientIds:t,isFirst:r,isLast:i})})),Uo=n("9Do8"),Vo=n.n(Uo),zo=n("Mmq9");function Ko(e){var t=e.name,n=e.attributes,o=Object(i.createBlock)(t,n);return Object(Xt.createElement)(ln.Disabled,{className:"editor-block-preview__content block-editor-block-preview__content editor-styles-wrapper","aria-hidden":!0},Object(Xt.createElement)(wn,{name:t,focus:!1,attributes:o.attributes,setAttributes:f.noop}))}var Wo=function(e){return Object(Xt.createElement)("div",{className:"editor-block-preview block-editor-block-preview"},Object(Xt.createElement)("div",{className:"editor-block-preview__title block-editor-block-preview__title"},Object(p.__)("Preview")),Object(Xt.createElement)(Ko,e))};var Go=function(e){var t=e.icon,n=e.hasChildBlocksWithInserterSupport,o=e.onClick,r=e.isDisabled,i=e.title,c=e.className,l=Object(u.a)(e,["icon","hasChildBlocksWithInserterSupport","onClick","isDisabled","title","className"]),a=t?{backgroundColor:t.background,color:t.foreground}:{},s=t&&t.shadowColor?{backgroundColor:t.shadowColor}:{};return Object(Xt.createElement)("li",{className:"editor-block-types-list__list-item block-editor-block-types-list__list-item"},Object(Xt.createElement)("button",Object(Yt.a)({className:Jt()("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},l),Object(Xt.createElement)("span",{className:"editor-block-types-list__item-icon block-editor-block-types-list__item-icon",style:a},Object(Xt.createElement)(Mn,{icon:t,showColors:!0}),n&&Object(Xt.createElement)("span",{className:"editor-block-types-list__item-icon-stack block-editor-block-types-list__item-icon-stack",style:s})),Object(Xt.createElement)("span",{className:"editor-block-types-list__item-title block-editor-block-types-list__item-title"},i)))};var qo=function(e){var t=e.items,n=e.onSelect,o=e.onHover,r=void 0===o?function(){}:o,c=e.children;return Object(Xt.createElement)("ul",{role:"list",className:"editor-block-types-list block-editor-block-types-list"},t&&t.map((function(e){return Object(Xt.createElement)(Go,{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 Yo=Object(Zt.compose)(Object(Zt.ifCondition)((function(e){var t=e.items;return t&&t.length>0})),Object(a.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(Xt.createElement)("div",{className:"editor-inserter__child-blocks block-editor-inserter__child-blocks"},(t||n)&&Object(Xt.createElement)("div",{className:"editor-inserter__parent-block-header block-editor-inserter__parent-block-header"},Object(Xt.createElement)(Mn,{icon:t,showColors:!0}),n&&Object(Xt.createElement)("h2",null,n)),Object(Xt.createElement)(qo,Object(Yt.a)({items:o},r)))})),Xo=function(e){return e.stopPropagation()},$o=function(e,t){var n=Jo(t),o=function(e){return-1!==Jo(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)}))},Jo=function(e){return e=(e=(e=(e=Object(f.deburr)(e)).replace(/^\//,"")).toLowerCase()).trim()},Zo=function(e){function t(){var e;return Object(en.a)(this,t),(e=Object(nn.a)(this,Object(on.a)(t).apply(this,arguments))).state={childItems:[],filterValue:"",hoveredItem:null,suggestedItems:[],reusableItems:[],itemsPerCategory:{},openPanels:["suggested"]},e.onChangeSearchInput=e.onChangeSearchInput.bind(Object(cn.a)(Object(cn.a)(e))),e.onHover=e.onHover.bind(Object(cn.a)(Object(cn.a)(e))),e.panels={},e.inserterResults=Object(Xt.createRef)(),e}return Object(rn.a)(t,e),Object(tn.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(){Vo()(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=$o(o,e),l=Object(f.filter)(c,(function(e){var t=e.name;return Object(f.includes)(r,t)})),a=[];if(!e){var s=this.props.maxSuggestedItems||9;a=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:l,filterValue:e,suggestedItems:a,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),v=Object(p.sprintf)(Object(p._n)("%d result found.","%d results found.",h),h);n(v)}},{key:"onKeyDown",value:function(e){Object(f.includes)([Nn.LEFT,Nn.DOWN,Nn.RIGHT,Nn.UP,Nn.BACKSPACE,Nn.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,l=c.childItems,a=c.hoveredItem,s=c.itemsPerCategory,u=c.openPanels,d=c.reusableItems,b=c.suggestedItems,h=function(e){return-1!==u.indexOf(e)};return Object(Xt.createElement)("div",{className:"editor-inserter__menu block-editor-inserter__menu",onKeyPress:Xo,onKeyDown:this.onKeyDown},Object(Xt.createElement)("label",{htmlFor:"block-editor-inserter__search-".concat(n),className:"screen-reader-text"},Object(p.__)("Search for a block")),Object(Xt.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(Xt.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(Xt.createElement)(Yo,{rootClientId:r,items:l,onSelect:o,onHover:this.onHover}),!!b.length&&Object(Xt.createElement)(ln.PanelBody,{title:Object(p._x)("Most Used","blocks"),opened:h("suggested"),onToggle:this.onTogglePanel("suggested"),ref:this.bindPanel("suggested")},Object(Xt.createElement)(qo,{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(Xt.createElement)(ln.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(Xt.createElement)(qo,{items:n,onSelect:o,onHover:e.onHover})):null})),!!d.length&&Object(Xt.createElement)(ln.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(Xt.createElement)(qo,{items:d,onSelect:o,onHover:this.onHover}),Object(Xt.createElement)("a",{className:"editor-inserter__manage-reusable-blocks block-editor-inserter__manage-reusable-blocks",href:Object(zo.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(Xt.createElement)("p",{className:"editor-inserter__no-results block-editor-inserter__no-results"},Object(p.__)("No blocks found."))),a&&Object(i.isReusableBlock)(a)&&Object(Xt.createElement)(Wo,{name:a.name,attributes:a.initialAttributes}))}}]),t}(Xt.Component),Qo=Object(Zt.compose)(Object(a.withSelect)((function(e,t){var n=t.clientId,o=t.isAppender,r=t.rootClientId,i=e("core/block-editor"),c=i.getInserterItems,l=i.getBlockName,a=i.getBlockRootClientId,s=i.getBlockSelectionEnd,u=e("core/blocks").getChildBlockNames,d=r;if(!d&&!n&&!o){var b=s();b&&(d=a(b)||void 0)}return{rootChildBlocks:u(l(d)),items:c(d),destinationRootClientId:d}})),Object(a.withDispatch)((function(e,t,n){var o=n.select,r=e("core/block-editor"),c=r.showInsertionPoint,l=r.hideInsertionPoint;function a(){var e=o("core/block-editor"),n=e.getBlockIndex,r=e.getBlockSelectionEnd,i=e.getBlockOrder,c=t.clientId,l=t.destinationRootClientId,a=t.isAppender;if(c)return n(c,l);var s=r();return!a&&s?n(s,l)+1:i(l).length}return{fetchReusableBlocks:e("core/editor").__experimentalFetchReusableBlocks,showInsertionPoint:function(){var e=a();c(t.destinationRootClientId,e)},hideInsertionPoint:l,onSelect:function(n){var r=e("core/block-editor"),c=r.replaceBlocks,l=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):l(p,a(),t.destinationRootClientId),t.onSelect()}}})),ln.withSpokenMessages,Zt.withInstanceId,Zt.withSafeTimeout)(Zo),er=function(e){var t=e.onToggle,n=e.disabled,o=e.isOpen;return Object(Xt.createElement)(ln.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})},tr=function(e){function t(){var e;return Object(en.a)(this,t),(e=Object(nn.a)(this,Object(on.a)(t).apply(this,arguments))).onToggle=e.onToggle.bind(Object(cn.a)(Object(cn.a)(e))),e.renderToggle=e.renderToggle.bind(Object(cn.a)(Object(cn.a)(e))),e.renderContent=e.renderContent.bind(Object(cn.a)(Object(cn.a)(e))),e}return Object(rn.a)(t,e),Object(tn.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?er: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(Xt.createElement)(Qo,{onSelect:t,rootClientId:o,clientId:r,isAppender:i})}},{key:"render",value:function(){var e=this.props,t=e.position,n=e.title;return Object(Xt.createElement)(ln.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}(Xt.Component),nr=Object(Zt.compose)([Object(a.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(Zt.ifCondition)((function(e){return e.hasItems}))])(tr);var or=Object(l.ifViewportMatches)("< small")((function(e){var t=e.clientId;return Object(Xt.createElement)("div",{className:"editor-block-list__block-mobile-toolbar block-editor-block-list__block-mobile-toolbar"},Object(Xt.createElement)(nr,null),Object(Xt.createElement)(po,{clientIds:[t]}))})),rr=function(e){function t(){var e;return Object(en.a)(this,t),(e=Object(nn.a)(this,Object(on.a)(t).apply(this,arguments))).state={isInserterFocused:!1},e.onBlurInserter=e.onBlurInserter.bind(Object(cn.a)(Object(cn.a)(e))),e.onFocusInserter=e.onFocusInserter.bind(Object(cn.a)(Object(cn.a)(e))),e}return Object(rn.a)(t,e),Object(tn.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(Xt.createElement)("div",{className:"editor-block-list__insertion-point block-editor-block-list__insertion-point"},n&&Object(Xt.createElement)("div",{className:"editor-block-list__insertion-point-indicator block-editor-block-list__insertion-point-indicator"}),Object(Xt.createElement)("div",{onFocus:this.onFocusInserter,onBlur:this.onBlurInserter,tabIndex:-1,className:Jt()("editor-block-list__insertion-point-inserter block-editor-block-list__insertion-point-inserter",{"is-visible":e})},Object(Xt.createElement)(nr,{rootClientId:o,clientId:r})))}}]),t}(Xt.Component),ir=Object(a.withSelect)((function(e,t){var n=t.clientId,o=t.rootClientId,r=e("core/block-editor"),i=r.getBlockIndex,c=r.getBlockInsertionPoint,l=r.isBlockInsertionPointVisible,a=i(n,o),s=c();return{showInsertionPoint:l()&&s.index===a&&s.rootClientId===o}}))(rr),cr=function(e){function t(){var e;return Object(en.a)(this,t),(e=Object(nn.a)(this,Object(on.a)(t).apply(this,arguments))).proxyEvent=e.proxyEvent.bind(Object(cn.a)(Object(cn.a)(e))),e.eventMap={},e}return Object(rn.a)(t,e),Object(tn.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(Xt.createElement)("div",Object(Yt.a)({ref:r},i,c))}}]),t}(Xt.Component),lr=function(e,t){return Object(Xt.createElement)(cr,Object(Yt.a)({},e,{forwardedRef:t}))};lr.displayName="IgnoreNestedEvents";var ar=Object(Xt.forwardRef)(lr);var sr=Object(Zt.compose)(Object(a.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(a.withDispatch)((function(e,t){var n=t.clientId,o=t.rootClientId;return{onInsert:function(t){var r=t.name,c=t.initialAttributes,l=Object(i.createBlock)(r,c);n?e("core/block-editor").replaceBlocks(n,l):e("core/block-editor").insertBlock(l,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(Xt.createElement)("div",{className:"editor-inserter-with-shortcuts block-editor-inserter-with-shortcuts"},r.map((function(e){return Object(Xt.createElement)(ln.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(Xt.createElement)(Mn,{icon:e.icon})})})))})),ur=function(e){function t(){var e;return Object(en.a)(this,t),(e=Object(nn.a)(this,Object(on.a)(t).apply(this,arguments))).state={hoverArea:null},e.onMouseLeave=e.onMouseLeave.bind(Object(cn.a)(Object(cn.a)(e))),e.onMouseMove=e.onMouseMove.bind(Object(cn.a)(Object(cn.a)(e))),e}return Object(rn.a)(t,e),Object(tn.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],n=t?"addEventListener":"removeEventListener";e[n]("mousemove",this.onMouseMove),e[n]("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,l=null;e.clientX-i<r/3?l=n?"right":"left":c-e.clientX<r/3&&(l=n?"left":"right"),l!==this.state.hoverArea&&this.setState({hoverArea:l})}},{key:"render",value:function(){var e=this.state.hoverArea;return(0,this.props.children)({hoverArea:e})}}]),t}(Xt.Component),dr=Object(a.withSelect)((function(e){return{isRTL:e("core/block-editor").getSettings().isRTL}}))(ur);function br(e){return document.querySelector('[data-block="'+e+'"]')}var fr=function(e){function t(){var e;return Object(en.a)(this,t),(e=Object(nn.a)(this,Object(on.a)(t).apply(this,arguments))).setBlockListRef=e.setBlockListRef.bind(Object(cn.a)(Object(cn.a)(e))),e.bindBlockNode=e.bindBlockNode.bind(Object(cn.a)(Object(cn.a)(e))),e.setAttributes=e.setAttributes.bind(Object(cn.a)(Object(cn.a)(e))),e.maybeHover=e.maybeHover.bind(Object(cn.a)(Object(cn.a)(e))),e.forceFocusedContextualToolbar=e.forceFocusedContextualToolbar.bind(Object(cn.a)(Object(cn.a)(e))),e.hideHoverEffects=e.hideHoverEffects.bind(Object(cn.a)(Object(cn.a)(e))),e.onFocus=e.onFocus.bind(Object(cn.a)(Object(cn.a)(e))),e.preventDrag=e.preventDrag.bind(Object(cn.a)(Object(cn.a)(e))),e.onPointerDown=e.onPointerDown.bind(Object(cn.a)(Object(cn.a)(e))),e.deleteOrInsertAfterWrapper=e.deleteOrInsertAfterWrapper.bind(Object(cn.a)(Object(cn.a)(e))),e.onBlockError=e.onBlockError.bind(Object(cn.a)(Object(cn.a)(e))),e.onTouchStart=e.onTouchStart.bind(Object(cn.a)(Object(cn.a)(e))),e.onClick=e.onClick.bind(Object(cn.a)(Object(cn.a)(e))),e.onDragStart=e.onDragStart.bind(Object(cn.a)(Object(cn.a)(e))),e.onDragEnd=e.onDragEnd.bind(Object(cn.a)(Object(cn.a)(e))),e.selectOnOpen=e.selectOnOpen.bind(Object(cn.a)(Object(cn.a)(e))),e.hadTouchStart=!1,e.state={error:null,dragging:!1,isHovered:!1},e.isForcingContextualToolbar=!1,e}return Object(rn.a)(t,e),Object(tn.a)(t,[{key:"componentDidMount",value:function(){this.props.isSelected&&this.focusTabbable()}},{key:"componentDidUpdate",value:function(e){this.isForcingContextualToolbar&&(this.isForcingContextualToolbar=!1),(this.props.isTypingWithinBlock||this.props.isSelected)&&this.hideHoverEffects(),this.props.isSelected&&!e.isSelected&&this.focusTabbable(!0),this.props.isFirstMultiSelected&&!e.isFirstMultiSelected&&this.wrapperNode.focus()}},{key:"setBlockListRef",value:function(e){this.wrapperNode=e,this.props.blockRef(e,this.props.clientId),this.forceUpdate()}},{key:"bindBlockNode",value:function(e){this.node=e}},{key:"focusTabbable",value:function(e){var t=this,n=this.props.initialPosition;if(!this.wrapperNode.contains(document.activeElement)){var o=io.focus.tabbable.find(this.node).filter(io.isTextField).filter((function(n){return!e||(o=t.node,r=n,i=o.querySelector(".block-editor-block-list__layout"),o.contains(r)&&(!i||!i.contains(r)));var o,r,i})),r=-1===n,i=(r?f.last:f.first)(o);i?(i.focus(),r&&(Object(io.placeCaretAtHorizontalEdge)(i,!0),Object(io.placeCaretAtVerticalEdge)(i,!0))):this.wrapperNode.focus()}}},{key:"setAttributes",value:function(e){var t=this.props,n=t.clientId,o=t.name,r=t.onChange,c=Object(i.getBlockType)(o);var l=Object(f.reduce)(e,(function(e,t,n){return!function(e){return"meta"===Object(f.get)(c,["attributes",e,"source"])}(n)?e.blockAttributes[n]=t:e.metaAttributes[c.attributes[n].meta]=t,e}),{blockAttributes:{},metaAttributes:{}}),a=l.blockAttributes,s=l.metaAttributes;Object(f.size)(a)&&r(n,a),Object(f.size)(s)&&this.props.onMetaChange(s)}},{key:"onTouchStart",value:function(){this.hadTouchStart=!0}},{key:"onClick",value:function(){this.hadTouchStart=!1}},{key:"maybeHover",value:function(){var e=this.props,t=e.isPartOfMultiSelection,n=e.isSelected;this.state.isHovered||t||n||this.hadTouchStart||this.setState({isHovered:!0})}},{key:"hideHoverEffects",value:function(){this.state.isHovered&&this.setState({isHovered:!1})}},{key:"onFocus",value:function(){this.props.isSelected||this.props.isPartOfMultiSelection||this.props.onSelect()}},{key:"preventDrag",value:function(e){e.preventDefault()}},{key:"onPointerDown",value:function(e){0===e.button&&(e.shiftKey?this.props.isSelected||(this.props.onShiftSelection(),e.preventDefault()):(this.props.onSelectionStart(this.props.clientId),this.props.isPartOfMultiSelection&&this.props.onSelect()))}},{key:"deleteOrInsertAfterWrapper",value:function(e){var t=e.keyCode,n=e.target;if(this.props.isSelected&&n===this.wrapperNode&&!this.props.isLocked)switch(t){case Nn.ENTER:this.props.onInsertDefaultBlockAfter(),e.preventDefault();break;case Nn.BACKSPACE:case Nn.DELETE:var o=this.props,r=o.clientId;(0,o.onRemove)(r),e.preventDefault()}}},{key:"onBlockError",value:function(e){this.setState({error:e})}},{key:"onDragStart",value:function(){this.setState({dragging:!0})}},{key:"onDragEnd",value:function(){this.setState({dragging:!1})}},{key:"selectOnOpen",value:function(e){e&&!this.props.isSelected&&this.props.onSelect()}},{key:"forceFocusedContextualToolbar",value:function(){this.isForcingContextualToolbar=!0,this.setState((function(){return{}}))}},{key:"render",value:function(){var e=this;return Object(Xt.createElement)(dr,{container:this.wrapperNode},(function(t){var n=t.hoverArea,o=e.props,r=o.mode,c=o.isFocusMode,l=o.hasFixedToolbar,a=o.isLocked,u=o.isFirst,d=o.isLast,b=o.clientId,f=o.rootClientId,h=o.isSelected,v=o.isPartOfMultiSelection,m=o.isFirstMultiSelected,g=o.isTypingWithinBlock,O=o.isCaretWithinFormattedText,k=o.isEmptyDefaultBlock,j=o.isMovable,y=o.isParentOfSelectedBlock,_=o.isDraggable,S=o.className,C=o.name,E=o.isValid,w=o.attributes,I=e.state.isHovered&&!v,T=Object(i.getBlockType)(C),B=Object(p.sprintf)(Object(p.__)("Block: %s"),T.title),x=C===Object(i.getUnregisteredTypeHandlerName)(),L=(h||I)&&k&&E,N=!c&&!L&&h&&!g,M=!c&&!l&&I&&!k,R=!c&&(h||"left"===n)&&!L&&!v&&!g,A=!c&&I&&!k,D=!l&&!L&&(h&&(!g||O)||m),P=N,F=e.state,H=F.error,U=F.dragging,V=v&&m||!v,z=Jt()("wp-block editor-block-list__block block-editor-block-list__block",{"has-warning":!E||!!H||x,"is-selected":N,"is-multi-selected":v,"is-hovered":M,"is-reusable":Object(i.isReusableBlock)(T),"is-dragging":U,"is-typing":g,"is-focused":c&&(h||y),"is-focus-mode":c},S),K=e.props.onReplace,W=e.props.wrapperProps;T.getEditWrapperProps&&(W=Object(s.a)({},W,T.getEditWrapperProps(w)));var G="block-".concat(b),q=Object(Xt.createElement)(wn,{name:C,isSelected:h,attributes:w,setAttributes:e.setAttributes,insertBlocksAfter:a?void 0:e.props.onInsertBlocksAfter,onReplace:a?void 0:K,mergeBlocks:a?void 0:e.props.onMerge,clientId:b,isSelectionEnabled:e.props.isSelectionEnabled,toggleSelection:e.props.toggleSelection});return"visual"!==r&&(q=Object(Xt.createElement)("div",{style:{display:"none"}},q)),Object(Xt.createElement)(ar,Object(Yt.a)({id:G,ref:e.setBlockListRef,onMouseOver:e.maybeHover,onMouseOverHandled:e.hideHoverEffects,onMouseLeave:e.hideHoverEffects,className:z,"data-type":C,onTouchStart:e.onTouchStart,onFocus:e.onFocus,onClick:e.onClick,onKeyDown:e.deleteOrInsertAfterWrapper,tabIndex:"0","aria-label":B,childHandledEvents:["onDragStart","onMouseDown"]},W),V&&Object(Xt.createElement)(ir,{clientId:b,rootClientId:f}),Object(Xt.createElement)(mo,{clientId:b,rootClientId:f}),m&&Object(Xt.createElement)(Ho,{rootClientId:f}),Object(Xt.createElement)("div",{className:"editor-block-list__block-edit block-editor-block-list__block-edit"},R&&Object(Xt.createElement)(po,{clientIds:b,blockElementId:G,isFirst:u,isLast:d,isHidden:!(I||h)||"left"!==n,isDraggable:!1!==_&&!v&&j,onDragStart:e.onDragStart,onDragEnd:e.onDragEnd}),A&&Object(Xt.createElement)(Mo,{clientId:b,isHidden:!(I||h)||"left"!==n}),(D||e.isForcingContextualToolbar)&&Object(Xt.createElement)(Fo,{focusOnMount:e.isForcingContextualToolbar}),!D&&h&&!l&&!k&&Object(Xt.createElement)(ln.KeyboardShortcuts,{bindGlobal:!0,eventName:"keydown",shortcuts:{"alt+f10":e.forceFocusedContextualToolbar}}),Object(Xt.createElement)(ar,{ref:e.bindBlockNode,onDragStart:e.preventDrag,onMouseDown:e.onPointerDown,"data-block":b},Object(Xt.createElement)(wo,{onError:e.onBlockError},E&&q,E&&"html"===r&&Object(Xt.createElement)(xo,{clientId:b}),!E&&[Object(Xt.createElement)(So,{key:"invalid-warning",clientId:b}),Object(Xt.createElement)("div",{key:"invalid-preview"},Object(Xt.createElement)(Xt.RawHTML,null,Object(io.safeHTML)(Object(i.getSaveContent)(T,w))))]),P&&Object(Xt.createElement)(or,{clientId:b}),!!H&&Object(Xt.createElement)(Eo,null))),L&&Object(Xt.createElement)(Xt.Fragment,null,Object(Xt.createElement)("div",{className:"editor-block-list__side-inserter block-editor-block-list__side-inserter"},Object(Xt.createElement)(sr,{clientId:b,rootClientId:f,onToggle:e.selectOnOpen})),Object(Xt.createElement)("div",{className:"editor-block-list__empty-block-inserter block-editor-block-list__empty-block-inserter"},Object(Xt.createElement)(nr,{position:"top right",onToggle:e.selectOnOpen,rootClientId:f,clientId:b}))))}))}}]),t}(Xt.Component),pr=Object(a.withSelect)((function(e,t){var n=t.clientId,o=t.rootClientId,r=t.isLargeViewport,c=e("core/block-editor"),l=c.isBlockSelected,a=c.isAncestorMultiSelected,s=c.isBlockMultiSelected,u=c.isFirstMultiSelectedBlock,d=c.isTyping,b=c.isCaretWithinFormattedText,f=c.getBlockMode,p=c.isSelectionEnabled,h=c.getSelectedBlocksInitialCaretPosition,v=c.getSettings,m=c.hasSelectedInnerBlock,g=c.getTemplateLock,O=(0,c.__unstableGetBlockWithoutInnerBlocks)(n),k=l(n),j=v(),y=j.hasFixedToolbar,_=j.focusMode,S=g(o),C=m(n,!0),E=O||{},w=E.name,I=E.attributes,T=E.isValid;return{isPartOfMultiSelection:s(n)||a(n),isFirstMultiSelected:u(n),isTypingWithinBlock:(k||C)&&d(),isCaretWithinFormattedText:b(),mode:f(n),isSelectionEnabled:p(),initialPosition:k?h():null,isEmptyDefaultBlock:w&&Object(i.isUnmodifiedDefaultBlock)({name:w,attributes:I}),isMovable:"all"!==S,isLocked:!!S,isFocusMode:_&&r,hasFixedToolbar:y&&r,block:O,name:w,attributes:I,isValid:T,isSelected:k,isParentOfSelectedBlock:C}})),hr=Object(a.withDispatch)((function(e,t,n){var o=n.select,r=e("core/block-editor"),i=r.updateBlockAttributes,c=r.selectBlock,l=r.multiSelect,a=r.insertBlocks,s=r.insertDefaultBlock,u=r.removeBlock,d=r.mergeBlocks,b=r.replaceBlocks,f=r.toggleSelection;return{onChange:function(e,t){i(e,t)},onSelect:function(){var e=arguments.length>0&&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;a(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);a(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 l=c(n);l&&d(n,l)}else{var a=i(n);a&&d(a,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()?l(e(),t.clientId):c(t.clientId)}},toggleSelection:function(e){f(e)}}})),vr=Object(Zt.compose)(Zt.pure,Object(l.withViewportMatch)({isLargeViewport:"medium"}),pr,hr,Object(ln.withFilters)("editor.BlockListBlock"))(fr),mr=n("rmEH");var gr=Object(Zt.compose)(Object(Zt.withState)({hovered:!1}),Object(a.withSelect)((function(e,t){var n=e("core/block-editor"),o=n.getBlockCount,r=n.getBlockName,c=n.isBlockValid,l=n.getSettings,a=n.getTemplateLock,s=!o(t.rootClientId),u=r(t.lastBlockClientId)===Object(i.getDefaultBlockName)(),d=c(t.lastBlockClientId),b=l().bodyPlaceholder;return{isVisible:s||!u||!d,showPrompt:s,isLocked:!!a(t.rootClientId),placeholder:b}})),Object(a.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,l=e.hovered,a=e.setState;if(t||!n)return null;var s=Object(mr.decodeEntities)(i)||Object(p.__)("Start writing or type / to choose a block");return Object(Xt.createElement)("div",{"data-root-client-id":c||"",className:"wp-block editor-default-block-appender block-editor-default-block-appender",onMouseEnter:function(){return a({hovered:!0})},onMouseLeave:function(){return a({hovered:!1})}},Object(Xt.createElement)(mo,{rootClientId:c}),Object(Xt.createElement)(To.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:""}),l&&Object(Xt.createElement)(sr,{rootClientId:c}),Object(Xt.createElement)(nr,{rootClientId:c,position:"top right",isAppender:!0}))}));var Or=Object(a.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(Xt.createElement)(ar,{childHandledEvents:["onFocus","onClick","onKeyDown"]},Object(Xt.createElement)(gr,{rootClientId:n,lastBlockClientId:Object(f.last)(t)})):Object(Xt.createElement)("div",{className:"block-list-appender"},Object(Xt.createElement)(nr,{rootClientId:n,renderToggle:function(e){var t=e.onToggle,n=e.disabled,o=e.isOpen;return Object(Xt.createElement)(ln.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}))})),kr=function(e){function t(e){var n;return Object(en.a)(this,t),(n=Object(nn.a)(this,Object(on.a)(t).call(this,e))).onSelectionStart=n.onSelectionStart.bind(Object(cn.a)(Object(cn.a)(n))),n.onSelectionEnd=n.onSelectionEnd.bind(Object(cn.a)(Object(cn.a)(n))),n.setBlockRef=n.setBlockRef.bind(Object(cn.a)(Object(cn.a)(n))),n.setLastClientY=n.setLastClientY.bind(Object(cn.a)(Object(cn.a)(n))),n.onPointerMove=Object(f.throttle)(n.onPointerMove.bind(Object(cn.a)(Object(cn.a)(n))),100),n.onScroll=function(){return n.onPointerMove({clientY:n.lastClientY})},n.lastClientY=0,n.nodes={},n}return Object(rn.a)(t,e),Object(tn.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=br(this.selectionAtStart).getBoundingClientRect();if(!(t>=n.top&&t<=n.bottom)){var o=t-n.top,r=Object(f.findLast)(this.coordMapKeys,(function(e){return e<o}));this.onSelectionChange(this.coordMap[r])}}},{key:"onSelectionStart",value:function(e){if(this.props.isSelectionEnabled){var t=this.nodes[e].getBoundingClientRect(),n=Object(f.mapValues)(this.nodes,(function(e){return e.getBoundingClientRect().top-t.top}));this.coordMap=Object(f.invert)(n),this.coordMapKeys=Object(f.sortBy)(Object.values(n)),this.selectionAtStart=e,window.addEventListener("mousemove",this.onPointerMove),window.addEventListener("scroll",this.onScroll,!0),window.addEventListener("mouseup",this.onSelectionEnd)}}},{key:"onSelectionChange",value:function(e){var t=this.props,n=t.onMultiSelect,o=t.selectionStart,r=t.selectionEnd,i=this.selectionAtStart,c=i===e;i&&this.props.isSelectionEnabled&&(c&&o&&n(null,null),c||r===e||n(i,e))}},{key:"onSelectionEnd",value:function(){this.onPointerMove.cancel(),delete this.coordMap,delete this.coordMapKeys,delete this.selectionAtStart,window.removeEventListener("mousemove",this.onPointerMove),window.removeEventListener("scroll",this.onScroll,!0),window.removeEventListener("mouseup",this.onSelectionEnd),this.props.isMultiSelecting&&this.props.onStopMultiSelect()}},{key:"render",value:function(){var e=this,t=this.props,n=t.blockClientIds,o=t.rootClientId,r=t.isDraggable,i=t.selectedBlockClientId,c=t.multiSelectedBlockClientIds,l=t.hasMultiSelection;return Object(Xt.createElement)("div",{className:"editor-block-list__layout block-editor-block-list__layout"},Object(f.map)(n,(function(t,s){var u=l?c.includes(t):i===t;return Object(Xt.createElement)(a.__experimentalAsyncModeProvider,{key:"block-"+t,value:!u},Object(Xt.createElement)(vr,{clientId:t,blockRef:e.setBlockRef,onSelectionStart:e.onSelectionStart,rootClientId:o,isFirst:0===s,isLast:s===n.length-1,isDraggable:r}))})),Object(Xt.createElement)(Or,{rootClientId:o}))}}]),t}(Xt.Component),jr=Object(Zt.compose)([function(e){return function(t){return Object(Xt.createElement)(a.__experimentalAsyncModeProvider,{value:!1},Object(Xt.createElement)(e,t))}},Object(a.withSelect)((function(e,t){var n=e("core/block-editor"),o=n.getBlockOrder,r=n.isSelectionEnabled,i=n.isMultiSelecting,c=n.getMultiSelectedBlocksStartClientId,l=n.getMultiSelectedBlocksEndClientId,a=n.getSelectedBlockClientId,s=n.getMultiSelectedBlockClientIds,u=n.hasMultiSelection;return{blockClientIds:o(t.rootClientId),selectionStart:c(),selectionEnd:l(),isSelectionEnabled:r(),isMultiSelecting:i(),selectedBlockClientId:a(),multiSelectedBlockClientIds:s(),hasMultiSelection:u()}})),Object(a.withDispatch)((function(e){var t=e("core/block-editor");return{onStartMultiSelect:t.startMultiSelect,onStopMultiSelect:t.stopMultiSelect,onMultiSelect:t.multiSelect}}))])(kr),yr=function(e){function t(){var e;return Object(en.a)(this,t),(e=Object(nn.a)(this,Object(on.a)(t).apply(this,arguments))).state={templateInProcess:!!e.props.template},e.updateNestedSettings(),e}return Object(rn.a)(t,e),Object(tn.a)(t,[{key:"getTemplateLock",value:function(){var e=this.props,t=e.templateLock,n=e.parentLock;return void 0===t?n:t}},{key:"componentDidMount",value:function(){0!==this.props.block.innerBlocks.length&&"all"!==this.getTemplateLock()||this.synchronizeBlocksWithTemplate(),this.state.templateInProcess&&this.setState({templateInProcess:!1})}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.template,o=t.block.innerBlocks;(this.updateNestedSettings(),0===o.length||"all"===this.getTemplateLock())&&(!Object(f.isEqual)(n,e.template)&&this.synchronizeBlocksWithTemplate())}},{key:"synchronizeBlocksWithTemplate",value:function(){var e=this.props,t=e.template,n=e.block,o=e.replaceInnerBlocks,r=n.innerBlocks,c=Object(i.synchronizeBlocksWithTemplate)(r,t);Object(f.isEqual)(c,r)||o(c)}},{key:"updateNestedSettings",value:function(){var e=this.props,t=e.blockListSettings,n=e.allowedBlocks,o=e.updateNestedSettings,r={allowedBlocks:n,templateLock:this.getTemplateLock()};ro()(t,r)||o(r)}},{key:"render",value:function(){var e=this.props,t=e.clientId,n=e.isSmallScreen,o=e.isSelectedBlockInRoot,r=this.state.templateInProcess,i=Jt()("editor-inner-blocks block-editor-inner-blocks",{"has-overlay":n&&!o});return Object(Xt.createElement)("div",{className:i},!r&&Object(Xt.createElement)(jr,{rootClientId:t}))}}]),t}(Xt.Component);(yr=Object(Zt.compose)([dn((function(e){return Object(f.pick)(e,["clientId"])})),Object(l.withViewportMatch)({isSmallScreen:"< medium"}),Object(a.withSelect)((function(e,t){var n=e("core/block-editor"),o=n.isBlockSelected,r=n.hasSelectedInnerBlock,i=n.getBlock,c=n.getBlockListSettings,l=n.getBlockRootClientId,a=n.getTemplateLock,s=t.clientId,u=l(s);return{isSelectedBlockInRoot:o(s)||r(s),block:i(s),blockListSettings:c(s),parentLock:a(u)}})),Object(a.withDispatch)((function(e,t){var n=e("core/block-editor"),o=n.replaceInnerBlocks,r=n.updateBlockListSettings,i=t.block,c=t.clientId,l=t.templateInsertUpdatesSelection,a=void 0===l||l;return{replaceInnerBlocks:function(e){o(c,e,0===i.innerBlocks.length&&a)},updateNestedSettings:function(t){e(r(c,t))}}}))])(yr)).Content=Object(i.withBlockContentContext)((function(e){var t=e.BlockContent;return Object(Xt.createElement)(t,null)}));var _r=yr,Sr=Object(ln.createSlotFill)("InspectorAdvancedControls"),Cr=Sr.Fill,Er=Sr.Slot,wr=bn(Cr);wr.Slot=Er;var Ir=wr,Tr=Object(ln.createSlotFill)("InspectorControls"),Br=Tr.Fill,xr=Tr.Slot,Lr=bn(Br);Lr.Slot=xr;var Nr=Lr,Mr=Object(p.__)("(current %s: %s)");var Rr=Object(Zt.compose)([Fn,Object(Zt.ifCondition)((function(e){return e.hasColorsToChoose}))])((function(e){var t=e.colors,n=e.disableCustomColors,o=e.label,r=e.onChange,i=e.value,c=Kn(t,i),l=c&&c.name,a=Object(p.sprintf)(Mr,o.toLowerCase(),l||i),s=Object(Xt.createElement)(Xt.Fragment,null,o,i&&Object(Xt.createElement)(ln.ColorIndicator,{colorValue:i,"aria-label":a}));return Object(Xt.createElement)(ln.BaseControl,{className:"editor-color-palette-control block-editor-color-palette-control",label:s},Object(Xt.createElement)(Hn,Object(Yt.a)({className:"editor-color-palette-control__color-palette block-editor-color-palette-control__color-palette",value:i,onChange:r},{colors:t,disableCustomColors:n})))})),Ar=function(e,t){return void 0!==t.disableCustomColors?t.disableCustomColors:e},Dr=Object(p.__)("(%s: %s)"),Pr=Object(Zt.ifCondition)((function(e){var t=e.colors,n=e.disableCustomColors,o=e.colorSettings;return Object(f.some)(o,(function(e){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0;return!Ar(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"]),l=Object(Xt.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=Kn(i||t,o),l=c&&c.name,a=Object(p.sprintf)(Dr,r.toLowerCase(),l||o);return Object(Xt.createElement)(ln.ColorIndicator,{key:n,colorValue:o,"aria-label":a})}))}(o,n));return Object(Xt.createElement)(ln.PanelBody,Object(Yt.a)({className:"editor-panel-color-settings block-editor-panel-color-settings",title:l},c),o.map((function(e,t){return Object(Xt.createElement)(Rr,Object(Yt.a)({key:t},Object(s.a)({colors:n,disableCustomColors:r},e)))})),t)})),Fr=Fn(Pr);var Hr=function(e){var t=e.onChange,n=e.className,o=Object(u.a)(e,["onChange","className"]);return Object(Xt.createElement)(To.a,Object(Yt.a)({className:Jt()("editor-plain-text block-editor-plain-text",n),onChange:function(e){return t(e.target.value)}},o))},Ur=n("4eJC"),Vr=n.n(Ur),zr=n("xTGt"),Kr=n("NMb1"),Wr=n.n(Kr),Gr=Object(a.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(Xt.createElement)(Xt.Fragment,null,t.map((function(e){var t=e.name,r=e.edit;if(!r)return null;var i=Object(c.getActiveFormat)(o,t),l=void 0!==i,a=Object(c.getActiveObject)(o),s=void 0!==a;return Object(Xt.createElement)(r,{key:t,isActive:l,activeAttributes:l&&i.attributes||{},isObjectActive:s,activeObjectAttributes:s&&a.attributes||{},value:o,onChange:n})})))})),qr=function(e){var t=e.controls;return Object(Xt.createElement)("div",{className:"editor-format-toolbar block-editor-format-toolbar"},Object(Xt.createElement)(ln.Toolbar,null,t.map((function(e){return Object(Xt.createElement)(ln.Slot,{name:"RichText.ToolbarControls.".concat(e),key:e})})),Object(Xt.createElement)(ln.Slot,{name:"RichText.ToolbarControls"},(function(e){return e.length&&Object(Xt.createElement)(ln.DropdownMenu,{icon:!1,position:"bottom left",label:Object(p.__)("More Rich Text Controls"),controls:Object(f.orderBy)(e.map((function(e){return Object(x.a)(e,1)[0].props})),"title")})}))))},Yr=function(e){return Object(f.pickBy)(e,(function(e,t){return n=t,Object(f.startsWith)(n,"aria-")&&!Object(f.isNil)(e);var n}))},Xr=window.navigator.userAgent;var $r=Xr.indexOf("Trident")>=0,Jr=function(e){function t(){var e;return Object(en.a)(this,t),(e=Object(nn.a)(this,Object(on.a)(t).call(this))).bindEditorNode=e.bindEditorNode.bind(Object(cn.a)(Object(cn.a)(e))),e}return Object(rn.a)(t,e),Object(tn.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=Jt()("block-editor-rich-text__editable","editor-rich-text__editable",e.className));var n=function(e,t){var n=Object(f.keys)(Yr(e)),o=Object(f.keys)(Yr(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),$r&&(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((Nn.BACKSPACE===o||Nn.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,l=t.className,a=t.isPlaceholderVisible,d=Object(u.a)(t,["tagName","style","record","valueToEditableHTML","className","isPlaceholderVisible"]);return delete d.setRef,Object(Xt.createElement)(o,Object(s.a)((e={role:"textbox","aria-multiline":!0,className:Jt()("block-editor-rich-text__editable","editor-rich-text__editable",l),contentEditable:!0},Object(b.a)(e,"data-is-placeholder-visible",a),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}(Xt.Component);function Zr(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),l=Object(c.getTextContent)(e),a=l.slice(r-1,r);if(!/\s/.test(a))return e;var s=l.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,l.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))}]}var Qr=function(e){function t(){var e;return Object(en.a)(this,t),(e=Object(nn.a)(this,Object(on.a)(t).apply(this,arguments))).onUse=e.onUse.bind(Object(cn.a)(Object(cn.a)(e))),e}return Object(rn.a)(t,e),Object(tn.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(Xt.createElement)(ln.KeyboardShortcuts,{bindGlobal:!0,shortcuts:Object(b.a)({},Nn.rawShortcut[n](t),this.onUse)})}}]),t}(Xt.Component),ei=window.Node,ti=ei.TEXT_NODE,ni=ei.ELEMENT_NODE;function oi(){var e=window.getSelection();if(0!==e.rangeCount){var t=e.getRangeAt(0).startContainer;if(t.nodeType===ti&&(t=t.parentNode),t.nodeType===ni){var n=t.closest("*[contenteditable]");if(n&&n.contains(t))return t.closest("ol,ul")}}}function ri(){var e=oi();return!e||"true"===e.contentEditable}function ii(e,t){var n=oi();return n?n.nodeName.toLowerCase()===e:e===t}var ci=function(e){var t=e.onTagNameChange,n=e.tagName,o=e.value,r=e.onChange;return Object(Xt.createElement)(Xt.Fragment,null,Object(Xt.createElement)(Qr,{type:"primary",character:"[",onUse:function(){r(Object(c.outdentListItems)(o))}}),Object(Xt.createElement)(Qr,{type:"primary",character:"]",onUse:function(){r(Object(c.indentListItems)(o,{type:n}))}}),Object(Xt.createElement)(Qr,{type:"primary",character:"m",onUse:function(){r(Object(c.indentListItems)(o,{type:n}))}}),Object(Xt.createElement)(Qr,{type:"primaryShift",character:"m",onUse:function(){r(Object(c.outdentListItems)(o))}}),Object(Xt.createElement)(Ln,null,Object(Xt.createElement)(ln.Toolbar,{controls:[t&&{icon:"editor-ul",title:Object(p.__)("Convert to unordered list"),isActive:ii("ul",n),onClick:function(){r(Object(c.changeListType)(o,{type:"ul"})),ri()&&t("ul")}},t&&{icon:"editor-ol",title:Object(p.__)("Convert to ordered list"),isActive:ii("ol",n),onClick:function(){r(Object(c.changeListType)(o,{type:"ol"})),ri()&&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)})))},li=[Nn.rawShortcut.primary("z"),Nn.rawShortcut.primaryShift("z"),Nn.rawShortcut.primary("y")],ai=Object(Xt.createElement)(ln.KeyboardShortcuts,{bindGlobal:!0,shortcuts:Object(f.fromPairs)(li.map((function(e){return[e,function(e){return e.preventDefault()}]})))}),si=function(){return ai};function ui(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=Nn.displayShortcut[o](r)),Object(Xt.createElement)(ln.Fill,{name:c},Object(Xt.createElement)(ln.ToolbarButton,Object(Yt.a)({},i,{shortcut:t})))}var di=function(e){function t(){var e;return Object(en.a)(this,t),(e=Object(nn.a)(this,Object(on.a)(t).apply(this,arguments))).onInput=e.onInput.bind(Object(cn.a)(Object(cn.a)(e))),e}return Object(rn.a)(t,e),Object(tn.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}(Xt.Component),bi=window,fi=bi.getSelection,pi=bi.getComputedStyle,hi=new Set(["insertParagraph","insertOrderedList","insertUnorderedList","insertHorizontalRule","insertLink"]),vi=document.createElement("style");document.head.appendChild(vi);var mi=function(e){function t(e){var n,o=e.value,r=e.onReplace,c=e.multiline;return Object(en.a)(this,t),n=Object(nn.a)(this,Object(on.a)(t).apply(this,arguments)),!0!==c&&"p"!==c&&"li"!==c||(n.multilineTag=!0===c?"p":c),"li"===n.multilineTag&&(n.multilineWrapperTags=["ul","ol"]),n.props.onSplit?(n.onSplit=n.props.onSplit,Wr()("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(cn.a)(Object(cn.a)(n))),n.onBlur=n.onBlur.bind(Object(cn.a)(Object(cn.a)(n))),n.onChange=n.onChange.bind(Object(cn.a)(Object(cn.a)(n))),n.onDeleteKeyDown=n.onDeleteKeyDown.bind(Object(cn.a)(Object(cn.a)(n))),n.onKeyDown=n.onKeyDown.bind(Object(cn.a)(Object(cn.a)(n))),n.onPaste=n.onPaste.bind(Object(cn.a)(Object(cn.a)(n))),n.onCreateUndoLevel=n.onCreateUndoLevel.bind(Object(cn.a)(Object(cn.a)(n))),n.setFocusedElement=n.setFocusedElement.bind(Object(cn.a)(Object(cn.a)(n))),n.onInput=n.onInput.bind(Object(cn.a)(Object(cn.a)(n))),n.onCompositionEnd=n.onCompositionEnd.bind(Object(cn.a)(Object(cn.a)(n))),n.onSelectionChange=n.onSelectionChange.bind(Object(cn.a)(Object(cn.a)(n))),n.getRecord=n.getRecord.bind(Object(cn.a)(Object(cn.a)(n))),n.createRecord=n.createRecord.bind(Object(cn.a)(Object(cn.a)(n))),n.applyRecord=n.applyRecord.bind(Object(cn.a)(Object(cn.a)(n))),n.isEmpty=n.isEmpty.bind(Object(cn.a)(Object(cn.a)(n))),n.valueToFormat=n.valueToFormat.bind(Object(cn.a)(Object(cn.a)(n))),n.setRef=n.setRef.bind(Object(cn.a)(Object(cn.a)(n))),n.valueToEditableHTML=n.valueToEditableHTML.bind(Object(cn.a)(Object(cn.a)(n))),n.handleHorizontalNavigation=n.handleHorizontalNavigation.bind(Object(cn.a)(Object(cn.a)(n))),n.onPointerDown=n.onPointerDown.bind(Object(cn.a)(Object(cn.a)(n))),n.formatToValue=Vr()(n.formatToValue.bind(Object(cn.a)(Object(cn.a)(n))),{maxSize:1}),n.savedContent=o,n.patterns=Zr({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(rn.a)(t,e),Object(tn.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=fi(),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]:{},n=t.domOnly;Object(c.apply)({value:e,current:this.editableRef,multilineTag:this.multilineTag,multilineWrapperTags:this.multilineWrapperTags,prepareEditableTree:this.props.prepareEditableTree,__unstableDomOnly:n})}},{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="",l="";try{r=t.getData("text/plain"),l=t.getData("text/html")}catch(e){try{l=t.getData("Text")}catch(e){return}}e.preventDefault(),window.console.log("Received HTML:\n\n",l),window.console.log("Received plain text:\n\n",r);var a=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(a&&!l){var s=a.getAsFile?a.getAsFile():a,u=Object(i.pasteHandler)({HTML:'<img src="'.concat(Object(zr.createBlobURL)(s),'">'),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=(l||r).replace(/<[^>]+>/g,"").trim();if(Object(zo.isURL)(h))return this.onChange(Object(c.applyFormat)(p,{type:"a",attributes:{href:Object(mr.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:l,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")||hi.has(t))return void this.applyRecord(this.getRecord())}var n=this.createRecord(),o=this.state,r=o.activeFormats,i=void 0===r?[]:r,l=o.start,a=Object(c.__unstableUpdateFormats)({value:n,start:l,end:n.start,formats:i});this.onChange(a,{withoutHistory:!0});var u=this.patterns.reduce((function(e,t){return t(e)}),a);u!==a&&(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=pi(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);vi.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]:{},n=t.withoutHistory;this.applyRecord(e);var o=e.start,r=e.end,i=e.activeFormats,c=void 0===i?[]:i;this.onChangeEditableValue(e),this.savedContent=this.valueToFormat(e),this.props.onChange(this.savedContent),this.setState({start:o,end:r,activeFormats:c}),n||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===Nn.BACKSPACE;if(Object(c.isCollapsed)(this.createRecord())){var i=this.isEmpty();(i||Object(io.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,l=e.ctrlKey;if(n||o||r||l||t!==Nn.LEFT&&t!==Nn.RIGHT||this.handleHorizontalNavigation(e),t===Nn.SPACE&&"li"===this.multilineTag){var a=this.createRecord();if(Object(c.isCollapsed)(a)){var u=a.text[a.start-1];u&&u!==c.LINE_SEPARATOR||(this.onChange(Object(c.indentListItems)(a,{type:this.props.tagName})),e.preventDefault())}}if(t===Nn.DELETE||t===Nn.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===Nn.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===Nn.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,l=n.end,a=this.state.activeFormats,u=void 0===a?[]:a,d=Object(c.isCollapsed)(n),b="rtl"===pi(this.editableRef).direction?Nn.RIGHT:Nn.LEFT,f=e.keyCode===b;if(d&&0===u.length){if(0===i&&f)return;if(l===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.length<h.length?(!f&&u.length<h.length&&v++,f&&u.length>p.length&&v--):p.length>h.length&&(!f&&u.length>h.length&&v--,f&&u.length<p.length&&v++),setTimeout((function(){return t.recalculateBoundaryStyle()})),v!==u.length){var g=m.slice(0,v);return this.applyRecord(Object(s.a)({},n,{activeFormats:g})),void this.setState({activeFormats:g})}var O=n.start+(f?-1:1);this.setState({start:O,end:O}),this.applyRecord(Object(s.a)({},n,{start:O,end:O,activeFormats:f?p:h}))}}},{key:"splitContent",value:function(){var e=arguments.length>0&&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(x.a)(o,2),i=r[0],l=r[1];Object(c.isEmpty)(l)?i=n:Object(c.isEmpty)(i)&&(l=n),t.paste&&(i=Object(c.isEmpty)(i)?null:i,l=Object(c.isEmpty)(l)?null:l),i&&(i=this.valueToFormat(i)),l&&(l=this.valueToFormat(l)),this.onSplit.apply(this,[i,l].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=fi();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 l=this.formatToValue(r);if(i){var a=this.formatToValue(e.value),s=Object(c.getTextContent)(a).length;l.start=s,l.end=s}this.applyRecord(l),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,l=t.inlineToolbar,a=void 0!==l&&l,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=Yr(this.props),O=u&&(!f||b)&&this.isEmpty(),k=Jt()(i,"editor-rich-text block-editor-rich-text"),j=this.getRecord();return Object(Xt.createElement)("div",{className:k,onFocus:this.setFocusedElement},f&&"li"===this.multilineTag&&Object(Xt.createElement)(ci,{onTagNameChange:h,tagName:o,value:j,onChange:this.onChange}),f&&!a&&Object(Xt.createElement)(Ln,null,Object(Xt.createElement)(qr,{controls:s})),f&&a&&Object(Xt.createElement)(ln.IsolatedEventContainer,{className:"editor-rich-text__inline-toolbar block-editor-rich-text__inline-toolbar"},Object(Xt.createElement)(qr,{controls:s})),Object(Xt.createElement)(pn,{onReplace:this.props.onReplace,completers:p,record:j,onChange:this.onChange},(function(t){var n=t.listBoxId,i=t.activeId;return Object(Xt.createElement)(Xt.Fragment,null,Object(Xt.createElement)(Jr,Object(Yt.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(Xt.createElement)(o,{className:Jt()("editor-rich-text__editable block-editor-rich-text__editable",c),style:r},m?Object(Xt.createElement)(m,null,u):u),f&&Object(Xt.createElement)(Gr,{value:j,onChange:e.onChange}))})),f&&Object(Xt.createElement)(si,null))}}]),t}(Xt.Component);mi.defaultProps={formattingControls:["bold","italic","link","strikethrough"],format:"string",value:""};var gi=Object(Zt.compose)([Zt.withInstanceId,dn((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(a.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(a.withDispatch)((function(e){var t=e("core/block-editor");return{onCreateUndoLevel:t.__unstableMarkLastChangeAsPersistent,onEnterFormattedText:t.enterFormattedText,onExitFormattedText:t.exitFormattedText}})),Zt.withSafeTimeout,Object(ln.withFilters)("experimentalRichText")])(mi);gi.Content=function(e){var t,n=e.value,o=e.tagName,r=e.multiline,c=Object(u.a)(e,["value","tagName","multiline"]),l=n;!0!==r&&"p"!==r&&"li"!==r||(t=!0===r?"p":r),Array.isArray(n)&&(l=i.children.toHTML(n)),!l&&t&&(l="<".concat(t,"></").concat(t,">"));var a=Object(Xt.createElement)(Xt.RawHTML,null,l);return o?Object(Xt.createElement)(o,Object(f.omit)(c,["format"]),a):a},gi.isEmpty=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Array.isArray(e)&&!e||0===e.length},gi.Content.defaultProps={format:"string",value:""};var Oi=gi,ki=Object(ln.withFilters)("editor.MediaUpload")((function(){return null})),ji=function(e){function t(){var e;return Object(en.a)(this,t),(e=Object(nn.a)(this,Object(on.a)(t).apply(this,arguments))).toggleSettingsVisibility=e.toggleSettingsVisibility.bind(Object(cn.a)(Object(cn.a)(e))),e.state={isSettingsExpanded:!1},e}return Object(rn.a)(t,e),Object(tn.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,l=Object(u.a)(e,["children","renderSettings","position","focusOnMount"]),a=this.state.isSettingsExpanded,s=!!n&&a;return Object(Xt.createElement)(ln.Popover,Object(Yt.a)({className:"editor-url-popover block-editor-url-popover",focusOnMount:c,position:r},l),Object(Xt.createElement)("div",{className:"editor-url-popover__row block-editor-url-popover__row"},t,!!n&&Object(Xt.createElement)(ln.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":a})),s&&Object(Xt.createElement)("div",{className:"editor-url-popover__row block-editor-url-popover__row editor-url-popover__settings block-editor-url-popover__settings"},n()))}}]),t}(Xt.Component),yi=function(e){var t=e.src,n=e.onChange,o=e.onSubmit,r=e.onClose;return Object(Xt.createElement)(ji,{onClose:r},Object(Xt.createElement)("form",{className:"editor-media-placeholder__url-input-form block-editor-media-placeholder__url-input-form",onSubmit:o},Object(Xt.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(Xt.createElement)(ln.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"})))},_i=function(e){function t(){var e;return Object(en.a)(this,t),(e=Object(nn.a)(this,Object(on.a)(t).apply(this,arguments))).state={src:"",isURLInputVisible:!1},e.onChangeSrc=e.onChangeSrc.bind(Object(cn.a)(Object(cn.a)(e))),e.onSubmitSrc=e.onSubmitSrc.bind(Object(cn.a)(Object(cn.a)(e))),e.onUpload=e.onUpload.bind(Object(cn.a)(Object(cn.a)(e))),e.onFilesUpload=e.onFilesUpload.bind(Object(cn.a)(Object(cn.a)(e))),e.openURLInput=e.openURLInput.bind(Object(cn.a)(Object(cn.a)(e))),e.closeURLInput=e.closeURLInput.bind(Object(cn.a)(Object(cn.a)(e))),e}return Object(rn.a)(t,e),Object(tn.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(x.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,l=e.value,a=void 0===l?{}:l,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(Xt.createElement)(ln.Placeholder,{icon:n,label:C,instructions:S,className:Jt()("editor-media-placeholder block-editor-media-placeholder",o),notices:v},Object(Xt.createElement)(ho,null,!!k&&Object(Xt.createElement)(Xt.Fragment,null,Object(Xt.createElement)(ln.DropZone,{onFilesDrop:this.onFilesUpload,onHTMLDrop:d}),Object(Xt.createElement)(ln.FormFileUpload,{isLarge:!0,className:"editor-media-placeholder__button block-editor-media-placeholder__button",onChange:this.onUpload,accept:t,multiple:h},Object(p.__)("Upload"))),Object(Xt.createElement)(ki,{gallery:h&&this.onlyAllowsImages(),multiple:h,onSelect:c,allowedTypes:g,value:a.id,render:function(e){var t=e.open;return Object(Xt.createElement)(ln.Button,{isLarge:!0,className:"editor-media-placeholder__button block-editor-media-placeholder__button",onClick:t},Object(p.__)("Media Library"))}})),s&&Object(Xt.createElement)("div",{className:"editor-media-placeholder__url-input-container block-editor-media-placeholder__url-input-container"},Object(Xt.createElement)(ln.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(Xt.createElement)(yi,{src:_,onChange:this.onChangeSrc,onSubmit:this.onSubmitSrc,onClose:this.closeURLInput})))}}]),t}(Xt.Component),Si=Object(a.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}})),Ci=Object(Zt.compose)(Si,Object(ln.withFilters)("editor.MediaPlaceholder"))(_i),Ei=n("ywyh"),wi=n.n(Ei),Ii=function(e){return e.stopPropagation()},Ti=function(e){function t(e){var n,o=e.autocompleteRef;return Object(en.a)(this,t),(n=Object(nn.a)(this,Object(on.a)(t).apply(this,arguments))).onChange=n.onChange.bind(Object(cn.a)(Object(cn.a)(n))),n.onKeyDown=n.onKeyDown.bind(Object(cn.a)(Object(cn.a)(n))),n.autocompleteRef=o||Object(Xt.createRef)(),n.inputRef=Object(Xt.createRef)(),n.updateSuggestions=Object(f.throttle)(n.updateSuggestions.bind(Object(cn.a)(Object(cn.a)(n))),200),n.suggestionNodes=[],n.state={posts:[],showSuggestions:!1,selectedSuggestion:null},n}return Object(rn.a)(t,e),Object(tn.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,Vo()(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=wi()({path:Object(zo.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 Nn.UP:e.stopPropagation(),e.preventDefault();var l=o?o-1:r.length-1;this.setState({selectedSuggestion:l});break;case Nn.DOWN:e.stopPropagation(),e.preventDefault();var a=null===o||o===r.length-1?0:o+1;this.setState({selectedSuggestion:a});break;case Nn.TAB:null!==this.state.selectedSuggestion&&(this.selectLink(c),this.props.speak(Object(p.__)("Link selected.")));break;case Nn.ENTER:null!==this.state.selectedSuggestion&&(e.stopPropagation(),this.selectLink(c))}}else switch(e.keyCode){case Nn.UP:0!==e.target.selectionStart&&(e.stopPropagation(),e.preventDefault(),e.target.setSelectionRange(0,0));break;case Nn.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,l=t.className,a=this.state,s=a.showSuggestions,u=a.posts,d=a.selectedSuggestion,b=a.loading;return Object(Xt.createElement)("div",{className:Jt()("editor-url-input block-editor-url-input",l)},Object(Xt.createElement)("input",{autoFocus:i,type:"text","aria-label":Object(p.__)("URL"),required:!0,value:o,onChange:this.onChange,onInput:Ii,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(Xt.createElement)(ln.Spinner,null),s&&!!u.length&&Object(Xt.createElement)(ln.Popover,{position:"bottom",noArrow:!0,focusOnMount:!1},Object(Xt.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(Xt.createElement)("button",{key:t.id,role:"option",tabIndex:"-1",id:"block-editor-url-input-suggestion-".concat(c,"-").concat(n),ref:e.bindSuggestionNode(n),className:Jt()("editor-url-input__suggestion block-editor-url-input__suggestion",{"is-selected":n===d}),onClick:function(){return e.handleOnClick(t)},"aria-selected":n===d},Object(mr.decodeEntities)(t.title)||Object(p.__)("(no title)"))})))))}}]),t}(Xt.Component),Bi=Object(ln.withSpokenMessages)(Object(Zt.withInstanceId)(Ti)),xi=function(e){function t(){var e;return Object(en.a)(this,t),(e=Object(nn.a)(this,Object(on.a)(t).apply(this,arguments))).toggle=e.toggle.bind(Object(cn.a)(Object(cn.a)(e))),e.submitLink=e.submitLink.bind(Object(cn.a)(Object(cn.a)(e))),e.state={expanded:!1},e}return Object(rn.a)(t,e),Object(tn.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(Xt.createElement)("div",{className:"editor-url-input__button block-editor-url-input__button"},Object(Xt.createElement)(ln.IconButton,{icon:"admin-links",label:r,onClick:this.toggle,className:Jt()("components-toolbar__control",{"is-active":t})}),o&&Object(Xt.createElement)("form",{className:"editor-url-input__button-modal block-editor-url-input__button-modal",onSubmit:this.submitLink},Object(Xt.createElement)("div",{className:"editor-url-input__button-modal-line block-editor-url-input__button-modal-line"},Object(Xt.createElement)(ln.IconButton,{className:"editor-url-input__back block-editor-url-input__back",icon:"arrow-left-alt",label:Object(p.__)("Close"),onClick:this.toggle}),Object(Xt.createElement)(Bi,{value:t||"",onChange:n}),Object(Xt.createElement)(ln.IconButton,{icon:"editor-break",label:Object(p.__)("Submit"),type:"submit"}))))}}]),t}(Xt.Component);var Li=Object(Zt.compose)([Object(a.withSelect)((function(e,t){var n=e("core/block-editor"),o=n.getBlocksByClientId,r=n.getTemplateLock,c=n.getBlockRootClientId,l=o(t.clientIds),a=Object(f.every)(l,(function(e){return!!e&&Object(i.hasBlockSupport)(e.name,"multiple",!0)})),s=c(t.clientIds[0]);return{isLocked:!!r(s),blocks:l,canDuplicate:a,rootClientId:s,extraProps:t}})),Object(a.withDispatch)((function(e,t,n){var o=n.select,r=t.clientIds,c=t.rootClientId,l=t.blocks,a=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(!a&&s){var e=(0,o("core/block-editor").getBlockIndex)(Object(f.last)(Object(f.castArray)(r)),c),t=l.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(){a||p(r)},onInsertBefore:function(){if(!a){var e=(0,o("core/block-editor").getBlockIndex)(Object(f.first)(Object(f.castArray)(r)),c);h({},c,e)}},onInsertAfter:function(){if(!a){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})})),Ni=function(e){return e.preventDefault(),e},Mi={duplicate:{raw:Nn.rawShortcut.primaryShift("d"),display:Nn.displayShortcut.primaryShift("d")},removeBlock:{raw:Nn.rawShortcut.access("z"),display:Nn.displayShortcut.access("z")},insertBefore:{raw:Nn.rawShortcut.primaryAlt("t"),display:Nn.displayShortcut.primaryAlt("t")},insertAfter:{raw:Nn.rawShortcut.primaryAlt("y"),display:Nn.displayShortcut.primaryAlt("y")}},Ri=function(e){function t(){var e;return Object(en.a)(this,t),(e=Object(nn.a)(this,Object(on.a)(t).apply(this,arguments))).selectAll=e.selectAll.bind(Object(cn.a)(Object(cn.a)(e))),e.deleteSelectedBlocks=e.deleteSelectedBlocks.bind(Object(cn.a)(Object(cn.a)(e))),e.clearMultiSelection=e.clearMultiSelection.bind(Object(cn.a)(Object(cn.a)(e))),e}return Object(rn.a)(t,e),Object(tn.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(Xt.createElement)(Xt.Fragment,null,Object(Xt.createElement)(ln.KeyboardShortcuts,{shortcuts:(e={},Object(b.a)(e,Nn.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(Xt.createElement)(Li,{clientIds:t},(function(e){var t,n=e.onDuplicate,o=e.onRemove,r=e.onInsertAfter,i=e.onInsertBefore;return Object(Xt.createElement)(ln.KeyboardShortcuts,{bindGlobal:!0,shortcuts:(t={},Object(b.a)(t,Mi.duplicate.raw,Object(f.flow)(Ni,n)),Object(b.a)(t,Mi.removeBlock.raw,Object(f.flow)(Ni,o)),Object(b.a)(t,Mi.insertBefore.raw,Object(f.flow)(Ni,i)),Object(b.a)(t,Mi.insertAfter.raw,Object(f.flow)(Ni,r)),t)})})))}}]),t}(Xt.Component),Ai=Object(Zt.compose)([Object(a.withSelect)((function(e){var t=e("core/block-editor"),n=t.getBlockOrder,o=t.getMultiSelectedBlockClientIds,r=t.hasMultiSelection,i=t.getBlockRootClientId,c=t.getTemplateLock,l=(0,t.getSelectedBlockClientId)(),a=l?[l]:o();return{rootBlocksClientIds:n(),hasMultiSelection:r(),isLocked:Object(f.some)(a,(function(e){return!!c(i(e))})),selectedBlockClientIds:a}})),Object(a.withDispatch)((function(e){var t=e("core/block-editor");return{clearSelectedBlock:t.clearSelectedBlock,onMultiSelect:t.multiSelect,onRemove:t.removeBlocks}}))])(Ri),Di=Object(a.withSelect)((function(e){return{selectedBlockClientId:e("core/block-editor").getBlockSelectionStart()}}))((function(e){var t=e.selectedBlockClientId;return t&&Object(Xt.createElement)(ln.Button,{isDefault:!0,type:"button",className:"editor-skip-to-selected-block block-editor-skip-to-selected-block",onClick:function(){br(t).closest(".block-editor-block-list__block").focus()}},Object(p.__)("Skip to the selected block"))})),Pi=n("BLeD"),Fi=n.n(Pi);function Hi(e,t,n){var o=new Fi.a(e);return t&&o.remove("is-style-"+t.name),o.add("is-style-"+n.name),o.value}var Ui=Object(Zt.compose)([Object(a.withSelect)((function(e,t){var n=t.clientId,o=e("core/block-editor").getBlock,r=e("core/blocks").getBlockStyles,c=o(n),l=Object(i.getBlockType)(c.name);return{name:c.name,attributes:c.attributes,className:c.attributes.className||"",styles:r(c.name),type:l}})),Object(a.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,l=e.onSwitch,a=void 0===l?f.noop:l,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 Fi.a(t).values()[Symbol.iterator]();!(n=(i=c.next()).done);n=!0){var l=i.value;if(-1!==l.indexOf("is-style-")){var a=l.substring(9),s=Object(f.find)(e,{name:a});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=Hi(n,h,e);o(t),b(null),a()}return Object(Xt.createElement)("div",{className:"editor-block-styles block-editor-block-styles"},t.map((function(e){var t=Hi(n,h,e);return Object(Xt.createElement)("div",{key:e.name,className:Jt()("editor-block-styles__item block-editor-block-styles__item",{"is-active":h===e}),onClick:function(){return v(e)},onKeyDown:function(t){Nn.ENTER!==t.keyCode&&Nn.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(Xt.createElement)("div",{className:"editor-block-styles__item-preview block-editor-block-styles__item-preview"},Object(Xt.createElement)(Ko,{name:r,attributes:Object(s.a)({},i,{className:t})})),Object(Xt.createElement)("div",{className:"editor-block-styles__item-label block-editor-block-styles__item-label"},e.label||e.name))})))})),Vi=n("7fqt");var zi=Object(a.withSelect)((function(e){return{blocks:(0,e("core/block-editor").getMultiSelectedBlocks)()}}))((function(e){var t=e.blocks,n=Object(Vi.count)(Object(i.serialize)(t),"words");return Object(Xt.createElement)("div",{className:"editor-multi-selection-inspector__card block-editor-multi-selection-inspector__card"},Object(Xt.createElement)(Mn,{icon:Object(Xt.createElement)(ln.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(Xt.createElement)(ln.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(Xt.createElement)("div",{className:"editor-multi-selection-inspector__card-content block-editor-multi-selection-inspector__card-content"},Object(Xt.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(Xt.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))))})),Ki=Object(a.withSelect)((function(e){var t=e("core/block-editor"),n=t.getSelectedBlockClientId,o=t.getSelectedBlockCount,r=t.getBlockName,c=e("core/blocks").getBlockStyles,l=n(),a=l&&r(l),s=l&&Object(i.getBlockType)(a),u=l&&c(a);return{count:o(),hasBlockStyles:u&&u.length>0,selectedBlockName:a,selectedBlockClientId:l,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(Xt.createElement)(zi,null);var l=n===Object(i.getUnregisteredTypeHandlerName)();return o&&t&&!l?Object(Xt.createElement)(Xt.Fragment,null,Object(Xt.createElement)("div",{className:"editor-block-inspector__card block-editor-block-inspector__card"},Object(Xt.createElement)(Mn,{icon:o.icon,showColors:!0}),Object(Xt.createElement)("div",{className:"editor-block-inspector__card-content block-editor-block-inspector__card-content"},Object(Xt.createElement)("div",{className:"editor-block-inspector__card-title block-editor-block-inspector__card-title"},o.title),Object(Xt.createElement)("div",{className:"editor-block-inspector__card-description block-editor-block-inspector__card-description"},o.description))),c&&Object(Xt.createElement)("div",null,Object(Xt.createElement)(ln.PanelBody,{title:Object(p.__)("Styles"),initialOpen:!1},Object(Xt.createElement)(Ui,{clientId:t}))),Object(Xt.createElement)("div",null,Object(Xt.createElement)(Nr.Slot,null)),Object(Xt.createElement)("div",null,Object(Xt.createElement)(Ir.Slot,null,(function(e){return!Object(f.isEmpty)(e)&&Object(Xt.createElement)(ln.PanelBody,{className:"editor-block-inspector__advanced block-editor-block-inspector__advanced",title:Object(p.__)("Advanced"),initialOpen:!1},e)}))),Object(Xt.createElement)(Di,{key:"back"})):Object(Xt.createElement)("span",{className:"editor-block-inspector__no-blocks block-editor-block-inspector__no-blocks"},Object(p.__)("No block selected."))})),Wi=function(e){function t(){var e;return Object(en.a)(this,t),(e=Object(nn.a)(this,Object(on.a)(t).apply(this,arguments))).bindContainer=e.bindContainer.bind(Object(cn.a)(Object(cn.a)(e))),e.clearSelectionIfFocusTarget=e.clearSelectionIfFocusTarget.bind(Object(cn.a)(Object(cn.a)(e))),e}return Object(rn.a)(t,e),Object(tn.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(Xt.createElement)("div",Object(Yt.a)({tabIndex:-1,onFocus:this.clearSelectionIfFocusTarget,ref:this.bindContainer},Object(f.omit)(this.props,["clearSelectedBlock","hasSelectedBlock","hasMultiSelection"])))}}]),t}(Xt.Component),Gi=Object(Zt.compose)([Object(a.withSelect)((function(e){var t=e("core/block-editor"),n=t.hasSelectedBlock,o=t.hasMultiSelection;return{hasSelectedBlock:n(),hasMultiSelection:o()}})),Object(a.withDispatch)((function(e){return{clearSelectedBlock:e("core/block-editor").clearSelectedBlock}}))])(Wi);var qi=Object(Zt.compose)([Object(a.withSelect)((function(e,t){var n=t.clientId,o=e("core/block-editor"),r=o.getBlock,c=o.getBlockMode,l=r(n);return{mode:c(n),blockType:l?Object(i.getBlockType)(l.name):null}})),Object(a.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 l="visual"===n?Object(p.__)("Edit as HTML"):Object(p.__)("Edit visually");return Object(Xt.createElement)(ln.MenuItem,{className:"editor-block-settings-menu__control block-editor-block-settings-menu__control",onClick:o,icon:"html"},!c&&l)}));var Yi=Object(Zt.compose)([Object(a.withSelect)((function(e,t){var n=t.clientIds,o=e("core/block-editor"),r=o.getBlocksByClientId,c=o.canInsertBlockType,l=e("core/editor").__experimentalGetReusableBlock,a=e("core").canUser,s=r(n),u=1===s.length&&s[0]&&Object(i.isReusableBlock)(s[0])&&!!l(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)}))&&!!a("create","blocks")}})),Object(a.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,l=i.__experimentalConvertBlockToStatic;return{onConvertToStatic:function(){1===n.length&&(l(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(Xt.createElement)(Xt.Fragment,null,!n&&Object(Xt.createElement)(ln.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(Xt.createElement)(ln.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 Xi=Object(Zt.compose)([Object(a.withSelect)((function(e,t){var n=t.clientId,o=e("core/block-editor").getBlock,r=e("core").canUser,c=e("core/editor").__experimentalGetReusableBlock,l=o(n),a=l&&Object(i.isReusableBlock)(l)?c(l.attributes.ref):null;return{isVisible:!!a&&!!r("delete","blocks",a.id),isDisabled:a&&a.isTemporary}})),Object(a.withDispatch)((function(e,t,n){var o=t.clientId,r=t.onToggle,i=void 0===r?f.noop:r,c=n.select,l=e("core/editor").__experimentalDeleteReusableBlock,a=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=a(o);l(e.attributes.ref),i()}}}}))])((function(e){var t=e.isVisible,n=e.isDisabled,o=e.onDelete;return t?Object(Xt.createElement)(ln.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 $i(e){var t=e.shouldRender,n=e.onClick,o=e.small;if(!t)return null;var r=Object(p.__)("Convert to Blocks");return Object(Xt.createElement)(ln.MenuItem,{className:"editor-block-settings-menu__control block-editor-block-settings-menu__control",onClick:n,icon:"screenoptions"},!o&&r)}var Ji=Object(Zt.compose)(Object(a.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(a.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)}))}}})))($i),Zi=Object(Zt.compose)(Object(a.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(a.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)}))}}})))($i),Qi=Object(ln.createSlotFill)("_BlockSettingsMenuFirstItem"),ec=Qi.Fill,tc=Qi.Slot;ec.Slot=tc;var nc=ec,oc=Object(ln.createSlotFill)("_BlockSettingsMenuPluginsExtension"),rc=oc.Fill,ic=oc.Slot;rc.Slot=ic;var cc=rc;var lc=Object(a.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(Xt.createElement)(Li,{clientIds:t},(function(e){var o=e.onDuplicate,c=e.onRemove,l=e.onInsertAfter,a=e.onInsertBefore,s=e.canDuplicate,u=e.isLocked;return Object(Xt.createElement)(ln.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=Jt()("editor-block-settings-menu__toggle block-editor-block-settings-menu__toggle",{"is-opened":o}),l=o?Object(p.__)("Hide options"):Object(p.__)("More options");return Object(Xt.createElement)(ln.Toolbar,{controls:[{icon:"ellipsis",title:l,onClick:function(){1===r&&n(i),t()},className:c,extraProps:{"aria-expanded":o}}]})},renderContent:function(e){var n=e.onClose;return Object(Xt.createElement)(ln.NavigableMenu,{className:"editor-block-settings-menu__content block-editor-block-settings-menu__content"},Object(Xt.createElement)(nc.Slot,{fillProps:{onClose:n}}),1===r&&Object(Xt.createElement)(Zi,{clientId:i}),1===r&&Object(Xt.createElement)(Ji,{clientId:i}),!u&&s&&Object(Xt.createElement)(ln.MenuItem,{className:"editor-block-settings-menu__control block-editor-block-settings-menu__control",onClick:o,icon:"admin-page",shortcut:Mi.duplicate.display},Object(p.__)("Duplicate")),!u&&Object(Xt.createElement)(Xt.Fragment,null,Object(Xt.createElement)(ln.MenuItem,{className:"editor-block-settings-menu__control block-editor-block-settings-menu__control",onClick:a,icon:"insert-before",shortcut:Mi.insertBefore.display},Object(p.__)("Insert Before")),Object(Xt.createElement)(ln.MenuItem,{className:"editor-block-settings-menu__control block-editor-block-settings-menu__control",onClick:l,icon:"insert-after",shortcut:Mi.insertAfter.display},Object(p.__)("Insert After"))),1===r&&Object(Xt.createElement)(qi,{clientId:i,onToggle:n}),Object(Xt.createElement)(Yi,{clientIds:t,onToggle:n}),Object(Xt.createElement)(cc.Slot,{fillProps:{clientIds:t,onClose:n}}),Object(Xt.createElement)("div",{className:"editor-block-settings-menu__separator block-editor-block-settings-menu__separator"}),1===r&&Object(Xt.createElement)(Xi,{clientId:i,onToggle:n}),!u&&Object(Xt.createElement)(ln.MenuItem,{className:"editor-block-settings-menu__control block-editor-block-settings-menu__control",onClick:c,icon:"trash",shortcut:Mi.removeBlock.display},Object(p.__)("Remove Block")))}})}))})),ac=function(e){function t(){var e;return Object(en.a)(this,t),(e=Object(nn.a)(this,Object(on.a)(t).apply(this,arguments))).state={hoveredClassName:null},e.onHoverClassName=e.onHoverClassName.bind(Object(cn.a)(Object(cn.a)(e))),e}return Object(rn.a)(t,e),Object(tn.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,l=this.state.hoveredClassName;if(!n||!n.length)return null;var a,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);a=h.icon}else a="layout";return c||d.length?Object(Xt.createElement)(ln.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(Xt.createElement)(ln.Toolbar,null,Object(Xt.createElement)(ln.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!==Nn.DOWN||(e.preventDefault(),e.stopPropagation(),t())},icon:Object(Xt.createElement)(Xt.Fragment,null,Object(Xt.createElement)(Mn,{icon:a,showColors:!0}),Object(Xt.createElement)(ln.SVG,{className:"editor-block-switcher__transform block-editor-block-switcher__transform",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(Xt.createElement)(ln.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(Xt.createElement)(Xt.Fragment,null,c&&Object(Xt.createElement)(ln.PanelBody,{title:Object(p.__)("Block Styles"),initialOpen:!0},Object(Xt.createElement)(Ui,{clientId:n[0].clientId,onSwitch:r,onHoverClassName:e.onHoverClassName})),0!==d.length&&Object(Xt.createElement)(ln.PanelBody,{title:Object(p.__)("Transform To:"),initialOpen:!0},Object(Xt.createElement)(qo,{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!==l&&Object(Xt.createElement)(Wo,{name:n[0].name,attributes:Object(s.a)({},n[0].attributes,{className:l})}))}}):Object(Xt.createElement)(ln.Toolbar,null,Object(Xt.createElement)(ln.IconButton,{disabled:!0,className:"editor-block-switcher__no-switcher-icon block-editor-block-switcher__no-switcher-icon",label:Object(p.__)("Block icon")},Object(Xt.createElement)(Mn,{icon:a,showColors:!0})))}}]),t}(Xt.Component),sc=Object(Zt.compose)(Object(a.withSelect)((function(e,t){var n=t.clientIds,o=e("core/block-editor"),r=o.getBlocksByClientId,i=o.getBlockRootClientId,c=o.getInserterItems,l=e("core/blocks").getBlockStyles,a=i(Object(f.first)(Object(f.castArray)(n))),s=r(n),u=s&&1===s.length?s[0]:null,d=u&&l(u.name);return{blocks:s,inserterItems:c(a),hasBlockStyles:d&&d.length>0}})),Object(a.withDispatch)((function(e,t){return{onTransform:function(n,o){e("core/block-editor").replaceBlocks(t.clientIds,Object(i.switchToBlockType)(n,o))}}})))(ac);var uc=Object(a.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(Xt.createElement)(sc,{key:"switcher",clientIds:n}):null}));var dc=Object(a.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(Xt.createElement)("div",{className:"editor-block-toolbar block-editor-block-toolbar"},Object(Xt.createElement)(uc,null),Object(Xt.createElement)(lc,{clientIds:t})):Object(Xt.createElement)("div",{className:"editor-block-toolbar block-editor-block-toolbar"},"visual"===o&&n&&Object(Xt.createElement)(Xt.Fragment,null,Object(Xt.createElement)(sc,{clientIds:t}),Object(Xt.createElement)(Cn.Slot,null),Object(Xt.createElement)(Ln.Slot,null)),Object(Xt.createElement)(lc,{clientIds:t}))}));var bc=Object(Zt.compose)([Object(a.withDispatch)((function(e,t,n){var o=(0,n.select)("core/block-editor"),r=o.getBlocksByClientId,c=o.getMultiSelectedBlockClientIds,l=o.getSelectedBlockClientId,a=o.hasMultiSelection,s=e("core/block-editor").removeBlocks,u=function(e){var t=l()?[l()]:c();if(0!==t.length&&(a()||!Object(io.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),a()){var t=l()?[l()]:c();s(t)}}}}))])((function(e){var t=e.children,n=e.onCopy,o=e.onCut;return Object(Xt.createElement)("div",{onCopy:n,onCut:o},t)})),fc=function(e){function t(){return Object(en.a)(this,t),Object(nn.a)(this,Object(on.a)(t).apply(this,arguments))}return Object(rn.a)(t,e),Object(tn.a)(t,[{key:"componentDidUpdate",value:function(){this.scrollIntoView()}},{key:"scrollIntoView",value:function(){var e=this.props.extentClientId;if(e){var t=br(e);if(t){var n=Object(io.getScrollContainer)(t);n&&Vo()(t,n,{onlyScrollIfNeeded:!0})}}}},{key:"render",value:function(){return null}}]),t}(Xt.Component),pc=Object(a.withSelect)((function(e){return{extentClientId:(0,e("core/block-editor").getLastMultiSelectedBlockClientId)()}}))(fc),hc=[Nn.UP,Nn.RIGHT,Nn.DOWN,Nn.LEFT,Nn.ENTER,Nn.BACKSPACE];var vc=function(e){function t(){var e;return Object(en.a)(this,t),(e=Object(nn.a)(this,Object(on.a)(t).apply(this,arguments))).stopTypingOnSelectionUncollapse=e.stopTypingOnSelectionUncollapse.bind(Object(cn.a)(Object(cn.a)(e))),e.stopTypingOnMouseMove=e.stopTypingOnMouseMove.bind(Object(cn.a)(Object(cn.a)(e))),e.startTypingInTextField=e.startTypingInTextField.bind(Object(cn.a)(Object(cn.a)(e))),e.stopTypingOnNonTextField=e.stopTypingOnNonTextField.bind(Object(cn.a)(Object(cn.a)(e))),e.stopTypingOnEscapeKey=e.stopTypingOnEscapeKey.bind(Object(cn.a)(Object(cn.a)(e))),e.onKeyDown=Object(f.over)([e.startTypingInTextField,e.stopTypingOnEscapeKey]),e.lastMouseMove=null,e}return Object(rn.a)(t,e),Object(tn.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===Nn.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(io.isTextField)(i)||i.closest(".block-editor-block-toolbar")||("keydown"!==r||function(e){var t=e.keyCode;return!e.shiftKey&&Object(f.includes)(hc,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(io.isTextField)(i)&&r()}))}},{key:"render",value:function(){var e=this.props.children;return Object(Xt.createElement)("div",{onFocus:this.stopTypingOnNonTextField,onKeyPress:this.startTypingInTextField,onKeyDown:this.onKeyDown},e)}}]),t}(Xt.Component),mc=Object(Zt.compose)([Object(a.withSelect)((function(e){return{isTyping:(0,e("core/block-editor").isTyping)()}})),Object(a.withDispatch)((function(e){var t=e("core/block-editor");return{onStartTyping:t.startTyping,onStopTyping:t.stopTyping}})),Zt.withSafeTimeout])(vc),gc=function(e){function t(){return Object(en.a)(this,t),Object(nn.a)(this,Object(on.a)(t).apply(this,arguments))}return Object(rn.a)(t,e),Object(tn.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=br(e);return t?t.getBoundingClientRect().top:null}},{key:"restorePreviousOffset",value:function(e){var t=br(this.props.selectionStart);if(t){var n=Object(io.getScrollContainer)(t);n&&(n.scrollTop=n.scrollTop+t.getBoundingClientRect().top-e)}}},{key:"render",value:function(){return null}}]),t}(Xt.Component),Oc=Object(a.withSelect)((function(e){return{blockOrder:e("core/block-editor").getBlockOrder(),selectionStart:e("core/block-editor").getBlockSelectionStart()}}))(gc),kc=window,jc=kc.getSelection,yc=kc.getComputedStyle,_c=Object(f.overEvery)([io.isTextField,io.focus.tabbable.isTabbableIndex]);var Sc=function(e){function t(){var e;return Object(en.a)(this,t),(e=Object(nn.a)(this,Object(on.a)(t).apply(this,arguments))).onKeyDown=e.onKeyDown.bind(Object(cn.a)(Object(cn.a)(e))),e.bindContainer=e.bindContainer.bind(Object(cn.a)(Object(cn.a)(e))),e.clearVerticalRect=e.clearVerticalRect.bind(Object(cn.a)(Object(cn.a)(e))),e.focusLastTextField=e.focusLastTextField.bind(Object(cn.a)(Object(cn.a)(e))),e.verticalRect=null,e}return Object(rn.a)(t,e),Object(tn.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=io.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(!io.focus.tabbable.isTabbableIndex(n))return!1;if(Object(io.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,l=e.keyCode,a=e.target,s=l===Nn.UP,u=l===Nn.DOWN,d=l===Nn.LEFT,b=l===Nn.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?io.isVerticalEdge:io.isHorizontalEdge;if(v?this.verticalRect||(this.verticalRect=Object(io.computeCaretRect)(a)):this.verticalRect=null,!m)return Nn.isKeyboardEvent.primary(e)&&(this.isEntirelySelected=Object(io.isEntirelySelected)(a)),void(Nn.isKeyboardEvent.primary(e,"a")&&((a.isContentEditable?this.isEntirelySelected:Object(io.isEntirelySelected)(a))&&(o(Object(f.first)(r),Object(f.last)(r)),e.preventDefault()),this.isEntirelySelected=!0));if(!e.nativeEvent.defaultPrevented&&function(e,t,n){if((t===Nn.UP||t===Nn.DOWN)&&!n)return!0;var o=e.tagName;return"INPUT"!==o&&"TEXTAREA"!==o}(a,l,O)){var j="rtl"===yc(a).direction?!p:p;if(g)(p&&i||!p&&c)&&(n||this.isTabbableEdge(a,p)&&k(a,p))&&(this.expandSelection(p),e.preventDefault());else if(n)this.moveSelection(p),e.preventDefault();else if(v&&Object(io.isVerticalEdge)(a,p)){var y=this.getClosestTabbable(a,p);y&&(Object(io.placeCaretAtVerticalEdge)(y,p,this.verticalRect),e.preventDefault())}else if(h&&jc().isCollapsed&&Object(io.isHorizontalEdge)(a,j)){var _=this.getClosestTabbable(a,j);Object(io.placeCaretAtHorizontalEdge)(_,j),e.preventDefault()}}}},{key:"focusLastTextField",value:function(){var e=io.focus.focusable.find(this.container),t=Object(f.findLast)(e,_c);t&&Object(io.placeCaretAtHorizontalEdge)(t,!0)}},{key:"render",value:function(){var e=this.props.children;return Object(Xt.createElement)("div",{className:"editor-writing-flow block-editor-writing-flow"},Object(Xt.createElement)("div",{ref:this.bindContainer,onKeyDown:this.onKeyDown,onMouseDown:this.clearVerticalRect},e),Object(Xt.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}(Xt.Component),Cc=Object(Zt.compose)([Object(a.withSelect)((function(e){var t=e("core/block-editor"),n=t.getSelectedBlockClientId,o=t.getMultiSelectedBlocksStartClientId,r=t.getMultiSelectedBlocksEndClientId,i=t.getPreviousBlockClientId,c=t.getNextBlockClientId,l=t.getFirstMultiSelectedBlockClientId,a=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:l(),selectedLastClientId:a(),hasMultiSelection:s(),blocks:u()}})),Object(a.withDispatch)((function(e){var t=e("core/block-editor");return{onMultiSelect:t.multiSelect,onSelectBlock:t.selectBlock}}))])(Sc),Ec=function(e){function t(){return Object(en.a)(this,t),Object(nn.a)(this,Object(on.a)(t).apply(this,arguments))}return Object(rn.a)(t,e),Object(tn.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(),l=r();this.unsubscribe=e.subscribe((function(){var e=t.props,n=e.onChange,a=e.onInput,s=o(),u=r();if(s!==c&&(t.isSyncingIncomingValue||i()))return t.isSyncingIncomingValue=!1,c=s,void(l=u);(s!==c||u&&!l)&&(s!==c&&(t.isSyncingOutcomingValue=!0),c=s,(l=u)?n(c):a(c))}))}},{key:"render",value:function(){var e=this.props.children;return Object(Xt.createElement)(ln.SlotFillProvider,null,Object(Xt.createElement)(ln.DropZoneProvider,null,e))}}]),t}(Xt.Component),wc=Object(Zt.compose)([Object(a.withDispatch)((function(e){var t=e("core/block-editor");return{updateSettings:t.updateSettings,resetBlocks:t.resetBlocks}})),a.withRegistry])(Ec),Ic=["left","center","right","wide","full"],Tc=["wide","full"];function Bc(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?Ic:[],!o||!0===e&&!n?f.without.apply(void 0,[t].concat(Tc)):t}var xc=Object(Zt.createHigherOrderComponent)((function(e){return function(t){var n=t.name,o=Bc(Object(i.getBlockSupport)(n,"align"),Object(i.hasBlockSupport)(n,"alignWide",!0));return[o.length>0&&t.isSelected&&Object(Xt.createElement)(Cn,{key:"align-controls"},Object(Xt.createElement)(kn,{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(Xt.createElement)(e,Object(Yt.a)({key:"edit"},t))]}}),"withToolbarControls"),Lc=Object(Zt.createHigherOrderComponent)(Object(Zt.compose)([Object(a.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,l=Bc(Object(i.getBlockSupport)(n,"align"),Object(i.hasBlockSupport)(n,"alignWide",!0),r),a=t.wrapperProps;return Object(f.includes)(l,c)&&(a=Object(s.a)({},a,{"data-align":c})),Object(Xt.createElement)(e,Object(Yt.a)({},t,{wrapperProps:a}))}}]));Object(Qt.addFilter)("blocks.registerBlockType","core/align/addAttribute",(function(e){return Object(f.has)(e.attributes,["align","type"])||Object(i.hasBlockSupport)(e,"align")&&(e.attributes=Object(f.assign)(e.attributes,{align:{type:"string"}})),e})),Object(Qt.addFilter)("editor.BlockListBlock","core/editor/align/with-data-align",Lc),Object(Qt.addFilter)("editor.BlockEdit","core/editor/align/with-toolbar-controls",xc),Object(Qt.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)(Bc(r,c),o)&&(e.className=Jt()("align".concat(o),e.className)),e}));var Nc=/[\s#]/g;var Mc=Object(Zt.createHigherOrderComponent)((function(e){return function(t){return Object(i.hasBlockSupport)(t.name,"anchor")&&t.isSelected?Object(Xt.createElement)(Xt.Fragment,null,Object(Xt.createElement)(e,t),Object(Xt.createElement)(Ir,null,Object(Xt.createElement)(ln.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(Nc,"-"),t.setAttributes({anchor:e})}}))):Object(Xt.createElement)(e,t)}}),"withInspectorControl");Object(Qt.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(Qt.addFilter)("editor.BlockEdit","core/editor/anchor/with-inspector-control",Mc),Object(Qt.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 Rc=Object(Zt.createHigherOrderComponent)((function(e){return function(t){return Object(i.hasBlockSupport)(t.name,"customClassName",!0)&&t.isSelected?Object(Xt.createElement)(Xt.Fragment,null,Object(Xt.createElement)(e,t),Object(Xt.createElement)(Ir,null,Object(Xt.createElement)(ln.TextControl,{label:Object(p.__)("Additional CSS Class"),value:t.attributes.className||"",onChange:function(e){t.setAttributes({className:""!==e?e:void 0})}}))):Object(Xt.createElement)(e,t)}}),"withInspectorControl");function Ac(e){e="<div data-custom-class-name>".concat(e,"</div>");var t=Object(i.parseWithAttributeSchema)(e,{type:"string",source:"attribute",selector:"[data-custom-class-name] > *",attribute:"class"});return t?t.trim().split(/\s+/):[]}Object(Qt.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(Qt.addFilter)("editor.BlockEdit","core/editor/custom-class-name/with-inspector-control",Rc),Object(Qt.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=Jt()(e.className,n.className)),e})),Object(Qt.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=Ac(r),l=Ac(n),a=Object(f.difference)(l,c);a.length?e.className=a.join(" "):r&&delete e.className}return e})),Object(Qt.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}))},u938: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("ls82"),r)o.regeneratorRuntime=i;else try{delete o.regeneratorRuntime}catch(e){o.regeneratorRuntime=void 0}},v2jn:function(e,t,n){
|
||
/*!
|
||
|
||
diff v3.5.0
|
||
|
||
Software License Agreement (BSD License)
|
||
|
||
Copyright (c) 2009-2015, Kevin Decker <kpdecker@gmail.com>
|
||
|
||
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),l=n(3),a=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=l.diffWords,t.diffWordsWithSpace=l.diffWordsWithSpace,t.diffLines=a.diffLines,t.diffTrimmedLines=a.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,l=0,a=0;i<c;i++){var s=t[i];if(s.removed){if(s.value=e.join(o.slice(a,a+s.count)),a+=s.count,i&&t[i-1].added){var u=t[i-1];t[i-1]=t[i],t[i]=u}}else{if(!s.added&&r){var d=n.slice(l,l+s.count);d=d.map((function(e,t){var n=o[a+t];return n.length>e.length?n:e})),s.value=e.join(d)}else s.value=e.join(n.slice(l,l+s.count));l+=s.count,s.added||(a+=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}function r(e){return{newPos:e.newPos,components:e.components.slice(0)}}t.__esModule=!0,t.default=n,n.prototype={diff:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=n.callback;"function"==typeof n&&(i=n,n={}),this.options=n;var c=this;function l(e){return i?(setTimeout((function(){i(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,s=e.length,u=1,d=a+s,b=[{newPos:-1,components:[]}],f=this.extractCommon(b[0],t,e,0);if(b[0].newPos+1>=a&&f+1>=s)return l([{value:this.join(t),count:t.length}]);function p(){for(var n=-1*u;n<=u;n+=2){var i=void 0,d=b[n-1],f=b[n+1],p=(f?f.newPos:0)-n;d&&(b[n-1]=void 0);var h=d&&d.newPos+1<a,v=f&&0<=p&&p<s;if(h||v){if(!h||v&&d.newPos<f.newPos?(i=r(f),c.pushComponent(i.components,void 0,!0)):((i=d).newPos++,c.pushComponent(i.components,!0,void 0)),p=c.extractCommon(i,t,e,n),i.newPos+1>=a&&p+1>=s)return l(o(c,i.components,t,e,c.useLongestToken));b[n]=i}else b[n]=void 0}u++}if(i)!function e(){setTimeout((function(){if(u>d)return i();p()||e()}),0)}();else for(;u<=d;){var h=p();if(h)return h}},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,l=c-o,a=0;c+1<r&&l+1<i&&this.equals(t[c+1],n[l+1]);)c++,l++,a++;return a&&e.components.push({count:a}),e.newPos=c,l},equals:function(e,t){return this.options.comparator?this.options.comparator(e,t):e===t||this.options.ignoreCase&&e.toLowerCase()===t.toLowerCase()},removeEmpty:function(e){for(var t=[],n=0;n<e.length;n++)e[n]&&t.push(e[n]);return t},castInput:function(e){return e},tokenize:function(e){return e.split("")},join:function(e){return e.join("")}}},function(e,t,n){"use strict";t.__esModule=!0,t.characterDiff=void 0,t.diffChars=function(e,t,n){return c.diff(e,t,n)};var o,r=n(1),i=(o=r)&&o.__esModule?o:{default:o},c=t.characterDiff=new i.default},function(e,t,n){"use strict";t.__esModule=!0,t.wordDiff=void 0,t.diffWords=function(e,t,n){return n=(0,c.generateOptions)(n,{ignoreWhitespace:!0}),s.diff(e,t,n)},t.diffWordsWithSpace=function(e,t,n){return s.diff(e,t,n)};var o,r=n(1),i=(o=r)&&o.__esModule?o:{default:o},c=n(4),l=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,a=/\S/,s=t.wordDiff=new i.default;s.equals=function(e,t){return this.options.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t||this.options.ignoreWhitespace&&!a.test(e)&&!a.test(t)},s.tokenize=function(e){for(var t=e.split(/(\s+|\b)/),n=0;n<t.length-1;n++)!t[n+1]&&t[n+2]&&l.test(t[n])&&l.test(t[n+2])&&(t[n]+=t[n+2],t.splice(n+1,2),n--);return t}},function(e,t){"use strict";t.__esModule=!0,t.generateOptions=function(e,t){if("function"==typeof e)t.callback=e;else if(e)for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}},function(e,t,n){"use strict";t.__esModule=!0,t.lineDiff=void 0,t.diffLines=function(e,t,n){return l.diff(e,t,n)},t.diffTrimmedLines=function(e,t,n){var o=(0,c.generateOptions)(n,{ignoreWhitespace:!0});return l.diff(e,t,o)};var o,r=n(1),i=(o=r)&&o.__esModule?o:{default:o},c=n(4),l=t.lineDiff=new i.default;l.tokenize=function(e){var t=[],n=e.split(/(\n|\r\n)/);n[n.length-1]||n.pop();for(var o=0;o<n.length;o++){var r=n[o];o%2&&!this.options.newlineIsToken?t[t.length-1]+=r:(this.options.ignoreWhitespace&&(r=r.trim()),t.push(r))}return t}},function(e,t,n){"use strict";t.__esModule=!0,t.sentenceDiff=void 0,t.diffSentences=function(e,t,n){return c.diff(e,t,n)};var o,r=n(1),i=(o=r)&&o.__esModule?o:{default:o},c=t.sentenceDiff=new i.default;c.tokenize=function(e){return e.split(/(\S.+?[.!?])(?=\s+|$)/)}},function(e,t,n){"use strict";t.__esModule=!0,t.cssDiff=void 0,t.diffCss=function(e,t,n){return c.diff(e,t,n)};var o,r=n(1),i=(o=r)&&o.__esModule?o:{default:o},c=t.cssDiff=new i.default;c.tokenize=function(e){return e.split(/([{}:;,]|\s+)/)}},function(e,t,n){"use strict";t.__esModule=!0,t.jsonDiff=void 0;var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.diffJson=function(e,t,n){return s.diff(e,t,n)},t.canonicalize=u;var r,i=n(1),c=(r=i)&&r.__esModule?r:{default:r},l=n(5),a=Object.prototype.toString,s=t.jsonDiff=new c.default;function u(e,t,n,r,i){t=t||[],n=n||[],r&&(e=r(i,e));var c=void 0;for(c=0;c<t.length;c+=1)if(t[c]===e)return n[c];var l=void 0;if("[object Array]"===a.call(e)){for(t.push(e),l=new Array(e.length),n.push(l),c=0;c<e.length;c+=1)l[c]=u(e[c],t,n,r,i);return t.pop(),n.pop(),l}if(e&&e.toJSON&&(e=e.toJSON()),"object"===(void 0===e?"undefined":o(e))&&null!==e){t.push(e),l={},n.push(l);var s=[],d=void 0;for(d in e)e.hasOwnProperty(d)&&s.push(d);for(s.sort(),c=0;c<s.length;c+=1)l[d=s[c]]=u(e[d],t,n,r,d);t.pop(),n.pop()}else l=e;return l}s.useLongestToken=!0,s.tokenize=l.lineDiff.tokenize,s.castInput=function(e){var t=this.options,n=t.undefinedReplacement,o=t.stringifyReplacer,r=void 0===o?function(e,t){return void 0===t?n:t}:o;return"string"==typeof e?e:JSON.stringify(u(e,null,null,r),r," ")},s.equals=function(e,t){return c.default.prototype.equals.call(s,e.replace(/,([\r\n])/g,"$1"),t.replace(/,([\r\n])/g,"$1"))}},function(e,t,n){"use strict";t.__esModule=!0,t.arrayDiff=void 0,t.diffArrays=function(e,t,n){return c.diff(e,t,n)};var o,r=n(1),i=(o=r)&&o.__esModule?o:{default:o},c=t.arrayDiff=new i.default;c.tokenize=function(e){return e.slice()},c.join=c.removeEmpty=function(e){return e}},function(e,t,n){"use strict";t.__esModule=!0,t.applyPatch=l,t.applyPatches=function(e,t){"string"==typeof e&&(e=(0,r.parsePatch)(e));var n=0;!function o(){var r=e[n++];if(!r)return t.complete();t.loadFile(r,(function(e,n){if(e)return t.complete(e);var i=l(n,r,t);t.patched(r,i,(function(e){if(e)return t.complete(e);o()}))}))}()};var o,r=n(11),i=n(12),c=(o=i)&&o.__esModule?o:{default:o};function l(e,t){var n=arguments.length>2&&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)||[],l=t.hunks,a=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;n<e.lines.length;n++){var r=e.lines[n],i=r.length>0?r[0]:" ",c=r.length>0?r.substr(1):r;if(" "===i||"-"===i){if(!a(t+1,o[t],i,c)&&++s>u)return!1;t++}}return!0}for(var v=0;v<l.length;v++){for(var m=l[v],g=o.length-m.oldLines,O=0,k=b+m.oldStart-1,j=(0,c.default)(k,d,g);void 0!==O;O=j())if(h(m,k+O)){m.offset=b+=O;break}if(void 0===O)return!1;d=m.offset+m.oldStart+m.oldLines}for(var y=0,_=0;_<l.length;_++){var S=l[_],C=S.oldStart+S.offset+y-1;y+=S.newLines-S.oldLines,C<0&&(C=0);for(var E=0;E<S.lines.length;E++){var w=S.lines[E],I=w.length>0?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;L<o.length-1;L++)o[L]=o[L]+i[L];return o.join("")}},function(e,t){"use strict";t.__esModule=!0,t.parsePatch=function(e){var t=arguments.length>1&&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);i<n.length;){var o=n[i];if(/^(\-\-\-|\+\+\+|@@)\s/.test(o))break;var c=/^(?:Index:|diff(?: -r \w+)+)\s+(.+?)\s*$/.exec(o);c&&(e.index=c[1]),i++}for(l(e),l(e),e.hunks=[];i<n.length;){var s=n[i];if(/^(Index:|diff|\-\-\-|\+\+\+)\s/.test(s))break;if(/^@@/.test(s))e.hunks.push(a());else{if(s&&t.strict)throw new Error("Unknown line "+(i+1)+" "+JSON.stringify(s));i++}}}function l(e){var t=/^(---|\+\+\+)\s+(.*)$/.exec(n[i]);if(t){var o="---"===t[1]?"old":"new",r=t[2].split("\t",2),c=r[0].replace(/\\\\/g,"\\");/^".*"$/.test(c)&&(c=c.substr(1,c.length-2)),e[o+"FileName"]=c,e[o+"Header"]=(r[1]||"").trim(),i++}}function a(){for(var e=i,r=n[i++].split(/@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@/),c={oldStart:+r[1],oldLines:+r[2]||1,newStart:+r[3],newLines:+r[4]||1,lines:[],linedelimiters:[]},l=0,a=0;i<n.length&&!(0===n[i].indexOf("--- ")&&i+2<n.length&&0===n[i+1].indexOf("+++ ")&&0===n[i+2].indexOf("@@"));i++){var s=0==n[i].length&&i!=n.length-1?" ":n[i][0];if("+"!==s&&"-"!==s&&" "!==s&&"\\"!==s)break;c.lines.push(n[i]),c.linedelimiters.push(o[i]||"\n"),"+"===s?l++:"-"===s?a++:" "===s&&(l++,a++)}if(l||1!==c.newLines||(c.newLines=0),a||1!==c.oldLines||(c.oldLines=0),t.strict){if(l!==c.newLines)throw new Error("Added line count did not match for hunk at line "+(e+1));if(a!==c.oldLines)throw new Error("Removed line count did not match for hunk at line "+(e+1))}return c}for(;i<n.length;)c();return r}},function(e,t){"use strict";t.__esModule=!0,t.default=function(e,t,n){var o=!0,r=!1,i=!1,c=1;return function l(){if(o&&!i){if(r?c++:o=!1,e+c<=n)return c;i=!0}if(!r)return i||(o=!0),t<=e-c?-c++:(r=!0,l())}}},function(e,t,n){"use strict";t.__esModule=!0,t.calcLineCount=l,t.merge=function(e,t,n){e=a(e,n),t=a(t,n);var o={};(e.index||t.index)&&(o.index=e.index||t.index),(e.newFileName||t.newFileName)&&(s(e)?s(t)?(o.oldFileName=u(o,e.oldFileName,t.oldFileName),o.newFileName=u(o,e.newFileName,t.newFileName),o.oldHeader=u(o,e.oldHeader,t.oldHeader),o.newHeader=u(o,e.newHeader,t.newHeader)):(o.oldFileName=e.oldFileName,o.newFileName=e.newFileName,o.oldHeader=e.oldHeader,o.newHeader=e.newHeader):(o.oldFileName=t.oldFileName||e.oldFileName,o.newFileName=t.newFileName||e.newFileName,o.oldHeader=t.oldHeader||e.oldHeader,o.newHeader=t.newHeader||e.newHeader)),o.hunks=[];for(var r=0,i=0,c=0,l=0;r<e.hunks.length||i<t.hunks.length;){var p=e.hunks[r]||{oldStart:1/0},h=t.hunks[i]||{oldStart:1/0};if(d(p,h))o.hunks.push(b(p,c)),r++,l+=p.newLines-p.oldLines;else if(d(h,p))o.hunks.push(b(h,l)),i++,c+=h.newLines-h.oldLines;else{var v={oldStart:Math.min(p.oldStart,h.oldStart),oldLines:0,newStart:Math.min(p.newStart+c,h.oldStart+l),newLines:0,lines:[]};f(v,p.oldStart,p.lines,h.oldStart,h.lines),i++,r++,o.hunks.push(v)}}return o};var o=n(14),r=n(11),i=n(15);function c(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function l(e){var t=function e(t){var n=0,o=0;return t.forEach((function(t){if("string"!=typeof t){var r=e(t.mine),i=e(t.theirs);void 0!==n&&(r.oldLines===i.oldLines?n+=r.oldLines:n=void 0),void 0!==o&&(r.newLines===i.newLines?o+=r.newLines:o=void 0)}else void 0===o||"+"!==t[0]&&" "!==t[0]||o++,void 0===n||"-"!==t[0]&&" "!==t[0]||n++})),{oldLines:n,newLines:o}}(e.lines),n=t.oldLines,o=t.newLines;void 0!==n?e.oldLines=n:delete e.oldLines,void 0!==o?e.newLines=o:delete e.newLines}function a(e,t){if("string"==typeof e){if(/^@@/m.test(e)||/^Index:/m.test(e))return(0,r.parsePatch)(e)[0];if(!t)throw new Error("Must provide a base reference or pass in a patch");return(0,o.structuredPatch)(void 0,void 0,t,e)}return e}function s(e){return e.newFileName&&e.newFileName!==e.oldFileName}function u(e,t,n){return t===n?t:(e.conflict=!0,{mine:t,theirs:n})}function d(e,t){return e.oldStart<t.oldStart&&e.oldStart+e.oldLines<t.oldStart}function b(e,t){return{oldStart:e.oldStart,oldLines:e.oldLines,newStart:e.newStart+t,newLines:e.newLines,lines:e.lines}}function f(e,t,n,o,r){var i={offset:t,lines:n,index:0},a={offset:o,lines:r,index:0};for(m(e,i,a),m(e,a,i);i.index<i.lines.length&&a.index<a.lines.length;){var s=i.lines[i.index],u=a.lines[a.index];if("-"!==s[0]&&"+"!==s[0]||"-"!==u[0]&&"+"!==u[0])if("+"===s[0]&&" "===u[0]){var d;(d=e.lines).push.apply(d,c(O(i)))}else if("+"===u[0]&&" "===s[0]){var b;(b=e.lines).push.apply(b,c(O(a)))}else"-"===s[0]&&" "===u[0]?h(e,i,a):"-"===u[0]&&" "===s[0]?h(e,a,i,!0):s===u?(e.lines.push(s),i.index++,a.index++):v(e,O(i),O(a));else p(e,i,a)}g(e,i),g(e,a),l(e)}function p(e,t,n){var o=O(t),r=O(n);if(k(o)&&k(r)){var l,a;if((0,i.arrayStartsWith)(o,r)&&j(n,o,o.length-r.length))return void(l=e.lines).push.apply(l,c(o));if((0,i.arrayStartsWith)(r,o)&&j(t,r,r.length-o.length))return void(a=e.lines).push.apply(a,c(r))}else if((0,i.arrayEqual)(o,r)){var s;return void(s=e.lines).push.apply(s,c(o))}v(e,o,r)}function h(e,t,n,o){var r,i=O(t),l=function(e,t){for(var n=[],o=[],r=0,i=!1,c=!1;r<t.length&&e.index<e.lines.length;){var l=e.lines[e.index],a=t[r];if("+"===a[0])break;if(i=i||" "!==l[0],o.push(a),r++,"+"===l[0])for(c=!0;"+"===l[0];)n.push(l),l=e.lines[++e.index];a.substr(1)===l.substr(1)?(n.push(l),e.index++):c=!0}if("+"===(t[r]||"")[0]&&i&&(c=!0),c)return n;for(;r<t.length;)o.push(t[r++]);return{merged:o,changes:n}}(n,i);l.merged?(r=e.lines).push.apply(r,c(l.merged)):v(e,o?l:i,o?i:l)}function v(e,t,n){e.conflict=!0,e.lines.push({conflict:!0,mine:t,theirs:n})}function m(e,t,n){for(;t.offset<n.offset&&t.index<t.lines.length;){var o=t.lines[t.index++];e.lines.push(o),t.offset++}}function g(e,t){for(;t.index<t.lines.length;){var n=t.lines[t.index++];e.lines.push(n)}}function O(e){for(var t=[],n=e.lines[e.index][0];e.index<e.lines.length;){var o=e.lines[e.index];if("-"===n&&"+"===o[0]&&(n="+"),n!==o[0])break;t.push(o),e.index++}return t}function k(e){return e.reduce((function(e,t){return e&&"-"===t[0]}),!0)}function j(e,t,n){for(var o=0;o<n;o++){var r=t[t.length-n+o].substr(1);if(e.lines[e.index+o]!==" "+r)return!1}return e.index+=n,!0}},function(e,t,n){"use strict";t.__esModule=!0,t.structuredPatch=i,t.createTwoFilesPatch=c,t.createPatch=function(e,t,n,o,r,i){return c(e,e,t,n,o,r,i)};var o=n(5);function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function i(e,t,n,i,c,l,a){a||(a={}),void 0===a.context&&(a.context=4);var s=(0,o.diffLines)(n,i,a);function u(e){return e.map((function(e){return" "+e}))}s.push({value:"",lines:[]});for(var d=[],b=0,f=0,p=[],h=1,v=1,m=function(e){var t=s[e],o=t.lines||t.value.replace(/\n$/,"").split("\n");if(t.lines=o,t.added||t.removed){var c;if(!b){var l=s[e-1];b=h,f=v,l&&(p=a.context>0?u(l.lines.slice(-a.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*a.context&&e<s.length-2){var m;(m=p).push.apply(m,r(u(o)))}else{var g,O=Math.min(o.length,a.context);(g=p).push.apply(g,r(u(o.slice(0,O))));var k={oldStart:b,oldLines:h-b+O,newStart:f,newLines:v-f+O,lines:p};if(e>=s.length-2&&o.length<=a.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;g<s.length;g++)m(g);return{oldFileName:e,newFileName:t,oldHeader:c,newHeader:l,hunks:d}}function c(e,t,n,o,r,c,l){var a=i(e,t,n,o,r,c,l),s=[];e==t&&s.push("Index: "+e),s.push("==================================================================="),s.push("--- "+a.oldFileName+(void 0===a.oldHeader?"":"\t"+a.oldHeader)),s.push("+++ "+a.newFileName+(void 0===a.newHeader?"":"\t"+a.newHeader));for(var u=0;u<a.hunks.length;u++){var d=a.hunks[u];s.push("@@ -"+d.oldStart+","+d.oldLines+" +"+d.newStart+","+d.newLines+" @@"),s.push.apply(s,d.lines)}return s.join("\n")+"\n"}},function(e,t){"use strict";function n(e,t){if(t.length>e.length)return!1;for(var n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}t.__esModule=!0,t.arrayEqual=function(e,t){return e.length===t.length&&n(e,t)},t.arrayStartsWith=n},function(e,t){"use strict";t.__esModule=!0,t.convertChangesToDMP=function(e){for(var t=[],n=void 0,o=void 0,r=0;r<e.length;r++)n=e[r],o=n.added?1:n.removed?-1:0,t.push([o,n.value]);return t}},function(e,t){"use strict";t.__esModule=!0,t.convertChangesToXML=function(e){for(var t=[],n=0;n<e.length;n++){var o=e[n];o.added?t.push("<ins>"):o.removed&&t.push("<del>"),t.push((r=o.value,void 0,r.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,"""))),o.added?t.push("</ins>"):o.removed&&t.push("</del>")}var r;return t.join("")}}])},e.exports=o()},vpQ4:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var o=n("rePB");function r(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Object(o.a)(e,t,n[t])}))}return e}},vuIU:function(e,t,n){"use strict";function o(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function r(e,t,n){return t&&o(e.prototype,t),n&&o(e,n),e}n.d(t,"a",(function(){return r}))},wx14:function(e,t,n){"use strict";function o(){return(o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e}).apply(this,arguments)}n.d(t,"a",(function(){return o}))},xTGt:function(e,t){!function(){e.exports=this.wp.blob}()},ywyh:function(e,t){!function(){e.exports=this.wp.apiFetch}()},zt9T:function(e,t,n){"use strict";var o=n("jB5C");e.exports=function(e,t,n){n=n||{},9===t.nodeType&&(t=o.getWindow(t));var r=n.allowHorizontalScroll,i=n.onlyScrollIfNeeded,c=n.alignWithTop,l=n.alignWithLeft,a=n.offsetTop||0,s=n.offsetLeft||0,u=n.offsetBottom||0,d=n.offsetRight||0;r=void 0===r||r;var b=o.isWindow(t),f=o.offset(e),p=o.outerHeight(e),h=o.outerWidth(e),v=void 0,m=void 0,g=void 0,O=void 0,k=void 0,j=void 0,y=void 0,_=void 0,S=void 0,C=void 0;b?(y=t,C=o.height(y),S=o.width(y),_={left:o.scrollLeft(y),top:o.scrollTop(y)},k={left:f.left-_.left-s,top:f.top-_.top-a},j={left:f.left+h-(_.left+S)+d,top:f.top+p-(_.top+C)+u},O=_):(v=o.offset(t),m=t.clientHeight,g=t.clientWidth,O={left:t.scrollLeft,top:t.scrollTop},k={left:f.left-(v.left+(parseFloat(o.css(t,"borderLeftWidth"))||0))-s,top:f.top-(v.top+(parseFloat(o.css(t,"borderTopWidth"))||0))-a},j={left:f.left+h-(v.left+g+(parseFloat(o.css(t,"borderRightWidth"))||0))+d,top:f.top+p-(v.top+m+(parseFloat(o.css(t,"borderBottomWidth"))||0))+u}),k.top<0||j.top>0?!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===l?o.scrollLeft(t,O.left+k.left):!1===l?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||((l=void 0===l||!!l)?o.scrollLeft(t,O.left+k.left):o.scrollLeft(t,O.left+j.left)))}}}); |