whoami7 - Manager
:
/
home
/
techyfnq
/
www
/
wp-content
/
plugins
/
mailpoet
/
assets
/
dist
/
js
/
Upload File:
files >> //home/techyfnq/www/wp-content/plugins/mailpoet/assets/dist/js/form_editor.fde42355.js
/*! For license information please see form_editor.fde42355.js.LICENSE.txt */ (self.webpackChunkMailPoet3=self.webpackChunkMailPoet3||[]).push([[514],{81506:function(e){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},e.exports.default=e.exports,e.exports.__esModule=!0},67154:function(e){function t(){return e.exports=t=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},e.exports.default=e.exports,e.exports.__esModule=!0,t.apply(this,arguments)}e.exports=t,e.exports.default=e.exports,e.exports.__esModule=!0},85354:function(e,t,n){var r=n(99489);e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,r(e,t)},e.exports.default=e.exports,e.exports.__esModule=!0},37316:function(e){e.exports=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o},e.exports.default=e.exports,e.exports.__esModule=!0},99489:function(e){function t(n,r){return e.exports=t=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},e.exports.default=e.exports,e.exports.__esModule=!0,t(n,r)}e.exports=t,e.exports.default=e.exports,e.exports.__esModule=!0},32901:function(e,t){"use strict";function n(){}function r(e,t,n,r,o){for(var i=0,a=t.length,l=0,s=0;i<a;i++){var c=t[i];if(c.removed){if(c.value=e.join(r.slice(s,s+c.count)),s+=c.count,i&&t[i-1].added){var u=t[i-1];t[i-1]=t[i],t[i]=u}}else{if(!c.added&&o){var d=n.slice(l,l+c.count);d=d.map((function(e,t){var n=r[s+t];return n.length>e.length?n:e})),c.value=e.join(d)}else c.value=e.join(n.slice(l,l+c.count));l+=c.count,c.added||(s+=c.count)}}var p=t[a-1];return a>1&&"string"==typeof p.value&&(p.added||p.removed)&&e.equals("",p.value)&&(t[a-2].value+=p.value,t.pop()),t}function o(e){return{newPos:e.newPos,components:e.components.slice(0)}}Object.defineProperty(t,"__esModule",{value:!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 a=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 s=(t=this.removeEmpty(this.tokenize(t))).length,c=e.length,u=1,d=s+c,p=[{newPos:-1,components:[]}],m=this.extractCommon(p[0],t,e,0);if(p[0].newPos+1>=s&&m+1>=c)return l([{value:this.join(t),count:t.length}]);function f(){for(var n=-1*u;n<=u;n+=2){var i=void 0,d=p[n-1],m=p[n+1],f=(m?m.newPos:0)-n;d&&(p[n-1]=void 0);var h=d&&d.newPos+1<s,g=m&&0<=f&&f<c;if(h||g){if(!h||g&&d.newPos<m.newPos?(i=o(m),a.pushComponent(i.components,void 0,!0)):((i=d).newPos++,a.pushComponent(i.components,!0,void 0)),f=a.extractCommon(i,t,e,n),i.newPos+1>=s&&f+1>=c)return l(r(a,i.components,t,e,a.useLongestToken));p[n]=i}else p[n]=void 0}u++}if(i)!function e(){setTimeout((function(){if(u>d)return i();f()||e()}),0)}();else for(;u<=d;){var h=f();if(h)return h}},pushComponent:function(e,t,n){var r=e[e.length-1];r&&r.added===t&&r.removed===n?e[e.length-1]={count:r.count+1,added:t,removed:n}:e.push({count:1,added:t,removed:n})},extractCommon:function(e,t,n,r){for(var o=t.length,i=n.length,a=e.newPos,l=a-r,s=0;a+1<o&&l+1<i&&this.equals(t[a+1],n[l+1]);)a++,l++,s++;return s&&e.components.push({count:s}),e.newPos=a,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("")}}},36884:function(e,t,n){"use strict";var r;t.Kx=function(e,t,n){return o.diff(e,t,n)};var o=new(((r=n(32901))&&r.__esModule?r:{default:r}).default)},9936:function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=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}r(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,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},a=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&(n[r[o]]=e[r[o]])}return n};t.__esModule=!0;var l=n(93858),s=n(45697),c=n(79367),u=n(58303),d="autosize:resized",p=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={lineHeight:null},t.textarea=null,t.onResize=function(e){t.props.onResize&&t.props.onResize(e)},t.updateLineHeight=function(){t.textarea&&t.setState({lineHeight:u(t.textarea)})},t.onChange=function(e){var n=t.props.onChange;t.currentValue=e.currentTarget.value,n&&n(e)},t}return o(t,e),t.prototype.componentDidMount=function(){var e=this,t=this.props,n=t.maxRows,r=t.async;"number"==typeof n&&this.updateLineHeight(),"number"==typeof n||r?setTimeout((function(){return e.textarea&&c(e.textarea)})):this.textarea&&c(this.textarea),this.textarea&&this.textarea.addEventListener(d,this.onResize)},t.prototype.componentWillUnmount=function(){this.textarea&&(this.textarea.removeEventListener(d,this.onResize),c.destroy(this.textarea))},t.prototype.render=function(){var e=this,t=this.props,n=(t.onResize,t.maxRows),r=(t.onChange,t.style),o=(t.innerRef,t.children),s=a(t,["onResize","maxRows","onChange","style","innerRef","children"]),c=this.state.lineHeight,u=n&&c?c*n:null;return l.createElement("textarea",i({},s,{onChange:this.onChange,style:u?i({},r,{maxHeight:u}):r,ref:function(t){e.textarea=t,"function"==typeof e.props.innerRef?e.props.innerRef(t):e.props.innerRef&&(e.props.innerRef.current=t)}}),o)},t.prototype.componentDidUpdate=function(){this.textarea&&c.update(this.textarea)},t.defaultProps={rows:1,async:!1},t.propTypes={rows:s.number,maxRows:s.number,onResize:s.func,innerRef:s.any,async:s.bool},t}(l.Component);t.TextareaAutosize=l.forwardRef((function(e,t){return l.createElement(p,i({},e,{innerRef:t}))}))},94773:function(e,t,n){"use strict";var r=n(9936);t.Z=r.TextareaAutosize},90520:function(e,t,n){"use strict";var r=n(27418),o="function"==typeof Symbol&&Symbol.for,i=o?Symbol.for("react.element"):60103,a=o?Symbol.for("react.portal"):60106,l=o?Symbol.for("react.fragment"):60107,s=o?Symbol.for("react.strict_mode"):60108,c=o?Symbol.for("react.profiler"):60114,u=o?Symbol.for("react.provider"):60109,d=o?Symbol.for("react.context"):60110,p=o?Symbol.for("react.forward_ref"):60112,m=o?Symbol.for("react.suspense"):60113,f=o?Symbol.for("react.memo"):60115,h=o?Symbol.for("react.lazy"):60116,g="function"==typeof Symbol&&Symbol.iterator;function v(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},y={};function w(e,t,n){this.props=e,this.context=t,this.refs=y,this.updater=n||b}function k(){}function E(e,t,n){this.props=e,this.context=t,this.refs=y,this.updater=n||b}w.prototype.isReactComponent={},w.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error(v(85));this.updater.enqueueSetState(this,e,t,"setState")},w.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},k.prototype=w.prototype;var _=E.prototype=new k;_.constructor=E,r(_,w.prototype),_.isPureReactComponent=!0;var C={current:null},x=Object.prototype.hasOwnProperty,S={key:!0,ref:!0,__self:!0,__source:!0};function I(e,t,n){var r,o={},a=null,l=null;if(null!=t)for(r in void 0!==t.ref&&(l=t.ref),void 0!==t.key&&(a=""+t.key),t)x.call(t,r)&&!S.hasOwnProperty(r)&&(o[r]=t[r]);var s=arguments.length-2;if(1===s)o.children=n;else if(1<s){for(var c=Array(s),u=0;u<s;u++)c[u]=arguments[u+2];o.children=c}if(e&&e.defaultProps)for(r in s=e.defaultProps)void 0===o[r]&&(o[r]=s[r]);return{$$typeof:i,type:e,key:a,ref:l,props:o,_owner:C.current}}function T(e){return"object"==typeof e&&null!==e&&e.$$typeof===i}var N=/\/+/g,A=[];function R(e,t,n,r){if(A.length){var o=A.pop();return o.result=e,o.keyPrefix=t,o.func=n,o.context=r,o.count=0,o}return{result:e,keyPrefix:t,func:n,context:r,count:0}}function L(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,10>A.length&&A.push(e)}function P(e,t,n,r){var o=typeof e;"undefined"!==o&&"boolean"!==o||(e=null);var l=!1;if(null===e)l=!0;else switch(o){case"string":case"number":l=!0;break;case"object":switch(e.$$typeof){case i:case a:l=!0}}if(l)return n(r,e,""===t?"."+D(e,0):t),1;if(l=0,t=""===t?".":t+":",Array.isArray(e))for(var s=0;s<e.length;s++){var c=t+D(o=e[s],s);l+=P(o,c,n,r)}else if("function"==typeof(c=null===e||"object"!=typeof e?null:"function"==typeof(c=g&&e[g]||e["@@iterator"])?c:null))for(e=c.call(e),s=0;!(o=e.next()).done;)l+=P(o=o.value,c=t+D(o,s++),n,r);else if("object"===o)throw n=""+e,Error(v(31,"[object Object]"===n?"object with keys {"+Object.keys(e).join(", ")+"}":n,""));return l}function O(e,t,n){return null==e?0:P(e,"",t,n)}function D(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+(""+e).replace(/[=:]/g,(function(e){return t[e]}))}(e.key):t.toString(36)}function M(e,t){e.func.call(e.context,t,e.count++)}function B(e,t,n){var r=e.result,o=e.keyPrefix;e=e.func.call(e.context,t,e.count++),Array.isArray(e)?F(e,r,n,(function(e){return e})):null!=e&&(T(e)&&(e=function(e,t){return{$$typeof:i,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(e,o+(!e.key||t&&t.key===e.key?"":(""+e.key).replace(N,"$&/")+"/")+n)),r.push(e))}function F(e,t,n,r,o){var i="";null!=n&&(i=(""+n).replace(N,"$&/")+"/"),O(e,B,t=R(t,i,r,o)),L(t)}var z={current:null};function H(){var e=z.current;if(null===e)throw Error(v(321));return e}var V={ReactCurrentDispatcher:z,ReactCurrentBatchConfig:{suspense:null},ReactCurrentOwner:C,IsSomeRendererActing:{current:!1},assign:r};t.Children={map:function(e,t,n){if(null==e)return e;var r=[];return F(e,r,null,t,n),r},forEach:function(e,t,n){if(null==e)return e;O(e,M,t=R(null,null,t,n)),L(t)},count:function(e){return O(e,(function(){return null}),null)},toArray:function(e){var t=[];return F(e,t,null,(function(e){return e})),t},only:function(e){if(!T(e))throw Error(v(143));return e}},t.Component=w,t.Fragment=l,t.Profiler=c,t.PureComponent=E,t.StrictMode=s,t.Suspense=m,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=V,t.cloneElement=function(e,t,n){if(null==e)throw Error(v(267,e));var o=r({},e.props),a=e.key,l=e.ref,s=e._owner;if(null!=t){if(void 0!==t.ref&&(l=t.ref,s=C.current),void 0!==t.key&&(a=""+t.key),e.type&&e.type.defaultProps)var c=e.type.defaultProps;for(u in t)x.call(t,u)&&!S.hasOwnProperty(u)&&(o[u]=void 0===t[u]&&void 0!==c?c[u]:t[u])}var u=arguments.length-2;if(1===u)o.children=n;else if(1<u){c=Array(u);for(var d=0;d<u;d++)c[d]=arguments[d+2];o.children=c}return{$$typeof:i,type:e.type,key:a,ref:l,props:o,_owner:s}},t.createContext=function(e,t){return void 0===t&&(t=null),(e={$$typeof:d,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:u,_context:e},e.Consumer=e},t.createElement=I,t.createFactory=function(e){var t=I.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:p,render:e}},t.isValidElement=T,t.lazy=function(e){return{$$typeof:h,_ctor:e,_status:-1,_result:null}},t.memo=function(e,t){return{$$typeof:f,type:e,compare:void 0===t?null:t}},t.useCallback=function(e,t){return H().useCallback(e,t)},t.useContext=function(e,t){return H().useContext(e,t)},t.useDebugValue=function(){},t.useEffect=function(e,t){return H().useEffect(e,t)},t.useImperativeHandle=function(e,t,n){return H().useImperativeHandle(e,t,n)},t.useLayoutEffect=function(e,t){return H().useLayoutEffect(e,t)},t.useMemo=function(e,t){return H().useMemo(e,t)},t.useReducer=function(e,t,n){return H().useReducer(e,t,n)},t.useRef=function(e){return H().useRef(e)},t.useState=function(e){return H().useState(e)},t.version="16.14.0"},93858:function(e,t,n){"use strict";e.exports=n(90520)},10721:function(e,t,n){var r;!function(){"use strict";var o={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function i(e){return l(c(e),arguments)}function a(e,t){return i.apply(null,[e].concat(t||[]))}function l(e,t){var n,r,a,l,s,c,u,d,p,m=1,f=e.length,h="";for(r=0;r<f;r++)if("string"==typeof e[r])h+=e[r];else if("object"==typeof e[r]){if((l=e[r]).keys)for(n=t[m],a=0;a<l.keys.length;a++){if(null==n)throw new Error(i('[sprintf] Cannot access property "%s" of undefined value "%s"',l.keys[a],l.keys[a-1]));n=n[l.keys[a]]}else n=l.param_no?t[l.param_no]:t[m++];if(o.not_type.test(l.type)&&o.not_primitive.test(l.type)&&n instanceof Function&&(n=n()),o.numeric_arg.test(l.type)&&"number"!=typeof n&&isNaN(n))throw new TypeError(i("[sprintf] expecting number but found %T",n));switch(o.number.test(l.type)&&(d=n>=0),l.type){case"b":n=parseInt(n,10).toString(2);break;case"c":n=String.fromCharCode(parseInt(n,10));break;case"d":case"i":n=parseInt(n,10);break;case"j":n=JSON.stringify(n,null,l.width?parseInt(l.width):0);break;case"e":n=l.precision?parseFloat(n).toExponential(l.precision):parseFloat(n).toExponential();break;case"f":n=l.precision?parseFloat(n).toFixed(l.precision):parseFloat(n);break;case"g":n=l.precision?String(Number(n.toPrecision(l.precision))):parseFloat(n);break;case"o":n=(parseInt(n,10)>>>0).toString(8);break;case"s":n=String(n),n=l.precision?n.substring(0,l.precision):n;break;case"t":n=String(!!n),n=l.precision?n.substring(0,l.precision):n;break;case"T":n=Object.prototype.toString.call(n).slice(8,-1).toLowerCase(),n=l.precision?n.substring(0,l.precision):n;break;case"u":n=parseInt(n,10)>>>0;break;case"v":n=n.valueOf(),n=l.precision?n.substring(0,l.precision):n;break;case"x":n=(parseInt(n,10)>>>0).toString(16);break;case"X":n=(parseInt(n,10)>>>0).toString(16).toUpperCase()}o.json.test(l.type)?h+=n:(!o.number.test(l.type)||d&&!l.sign?p="":(p=d?"+":"-",n=n.toString().replace(o.sign,"")),c=l.pad_char?"0"===l.pad_char?"0":l.pad_char.charAt(1):" ",u=l.width-(p+n).length,s=l.width&&u>0?c.repeat(u):"",h+=l.align?p+n+s:"0"===c?p+s+n:s+p+n)}return h}var s=Object.create(null);function c(e){if(s[e])return s[e];for(var t,n=e,r=[],i=0;n;){if(null!==(t=o.text.exec(n)))r.push(t[0]);else if(null!==(t=o.modulo.exec(n)))r.push("%");else{if(null===(t=o.placeholder.exec(n)))throw new SyntaxError("[sprintf] unexpected placeholder");if(t[2]){i|=1;var a=[],l=t[2],c=[];if(null===(c=o.key.exec(l)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(a.push(c[1]);""!==(l=l.substring(c[0].length));)if(null!==(c=o.key_access.exec(l)))a.push(c[1]);else{if(null===(c=o.index_access.exec(l)))throw new SyntaxError("[sprintf] failed to parse named argument key");a.push(c[1])}t[2]=a}else i|=2;if(3===i)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");r.push({placeholder:t[0],param_no:t[1],keys:t[2],sign:t[3],pad_char:t[4],align:t[5],width:t[6],precision:t[7],type:t[8]})}n=n.substring(t[0].length)}return s[e]=r}t.sprintf=i,t.vsprintf=a,"undefined"!=typeof window&&(window.sprintf=i,window.vsprintf=a,void 0===(r=function(){return{sprintf:i,vsprintf:a}}.call(t,n,t,e))||(e.exports=r))}()},79892:function(e,t,n){e=n.nmd(e),function(t){"use strict";var n,r="function"==typeof(n=t.atob)?n:"function"==typeof Buffer?function(e){return new Buffer(e,"base64").toString("binary")}:"object"==typeof t.base64js?function(e){var n=t.base64js.b64ToByteArray(e);return Array.prototype.map.call(n,(function(e){return String.fromCharCode(e)})).join("")}:function(){throw new Error("You're probably in an old browser or an iOS webworker. It might help to include beatgammit's base64-js.")};t.atob=r,e&&e.exports&&(e.exports=r)}(window)},79367:function(e,t){var n,r;void 0===(r="function"==typeof(n=function(e,t){"use strict";var n,r,o="function"==typeof Map?new Map:(n=[],r=[],{has:function(e){return n.indexOf(e)>-1},get:function(e){return r[n.indexOf(e)]},set:function(e,t){-1===n.indexOf(e)&&(n.push(e),r.push(t))},delete:function(e){var t=n.indexOf(e);t>-1&&(n.splice(t,1),r.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 a(e){if(e&&e.nodeName&&"TEXTAREA"===e.nodeName&&!o.has(e)){var t=null,n=null,r=null,a=function(){e.clientWidth!==n&&d()},l=function(t){window.removeEventListener("resize",a,!1),e.removeEventListener("input",d,!1),e.removeEventListener("keyup",d,!1),e.removeEventListener("autosize:destroy",l,!1),e.removeEventListener("autosize:update",d,!1),Object.keys(t).forEach((function(n){e.style[n]=t[n]})),o.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",l,!1),"onpropertychange"in e&&"oninput"in e&&e.addEventListener("keyup",d,!1),window.addEventListener("resize",a,!1),e.addEventListener("input",d,!1),e.addEventListener("autosize:update",d,!1),e.style.overflowX="hidden",e.style.wordWrap="break-word",o.set(e,{destroy:l,update:d}),"vertical"===(s=window.getComputedStyle(e,null)).resize?e.style.resize="none":"both"===s.resize&&(e.style.resize="horizontal"),t="content-box"===s.boxSizing?-(parseFloat(s.paddingTop)+parseFloat(s.paddingBottom)):parseFloat(s.borderTopWidth)+parseFloat(s.borderBottomWidth),isNaN(t)&&(t=0),d()}var s;function c(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 r=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),o=document.documentElement&&document.documentElement.scrollTop;e.style.height="",e.style.height=e.scrollHeight+t+"px",n=e.clientWidth,r.forEach((function(e){e.node.scrollTop=e.scrollTop})),o&&(document.documentElement.scrollTop=o)}}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&&(c("scroll"),u(),o="content-box"===n.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight):"hidden"!==n.overflowY&&(c("hidden"),u(),o="content-box"===n.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight),r!==o){r=o;var a=i("autosize:resized");try{e.dispatchEvent(a)}catch(e){}}}}function l(e){var t=o.get(e);t&&t.destroy()}function s(e){var t=o.get(e);t&&t.update()}var c=null;"undefined"==typeof window||"function"!=typeof window.getComputedStyle?((c=function(e){return e}).destroy=function(e){return e},c.update=function(e){return e}):((c=function(e,t){return e&&Array.prototype.forEach.call(e.length?e:[e],(function(e){return a(e)})),e}).destroy=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],l),e},c.update=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],s),e}),t.default=c,e.exports=t.default})?n.apply(t,[e,t]):n)||(e.exports=r)},78104:function(e,t,n){"use strict";var r={};n.r(r),n.d(r,{__unstableAcquireStoreLock:function(){return Ve},__unstableEnqueueLockRequest:function(){return We},__unstableProcessPendingLockRequests:function(){return je},__unstableReleaseStoreLock:function(){return Ze}});var o={};n.r(o),n.d(o,{__experimentalBatch:function(){return ct},__experimentalSaveSpecifiedEntityEdits:function(){return dt},__unstableCreateUndoLevel:function(){return lt},addEntities:function(){return Je},deleteEntityRecord:function(){return rt},editEntityRecord:function(){return ot},receiveAutosaves:function(){return ft},receiveCurrentTheme:function(){return et},receiveCurrentUser:function(){return Xe},receiveEmbedPreview:function(){return nt},receiveEntityRecords:function(){return Qe},receiveThemeSupports:function(){return tt},receiveUploadPermissions:function(){return pt},receiveUserPermission:function(){return mt},receiveUserQuery:function(){return Ye},redo:function(){return at},saveEditedEntityRecord:function(){return ut},saveEntityRecord:function(){return st},undo:function(){return it}});var i={};n.r(i),n.d(i,{__experimentalGetDirtyEntityRecords:function(){return on},__experimentalGetEntitiesBeingSaved:function(){return an},__experimentalGetEntityRecordNoResolver:function(){return en},__experimentalGetTemplateForLink:function(){return Rn},canUser:function(){return xn},canUserEditEntityRecord:function(){return Sn},getAuthors:function(){return Gt},getAutosave:function(){return Tn},getAutosaves:function(){return In},getCurrentTheme:function(){return kn},getCurrentUser:function(){return Kt},getEditedEntityRecord:function(){return un},getEmbedPreview:function(){return _n},getEntitiesByKind:function(){return Xt},getEntity:function(){return Jt},getEntityRecord:function(){return Qt},getEntityRecordEdits:function(){return ln},getEntityRecordNonTransientEdits:function(){return sn},getEntityRecords:function(){return rn},getLastEntityDeleteError:function(){return hn},getLastEntitySaveError:function(){return fn},getRawEntityRecord:function(){return tn},getRedoEdit:function(){return bn},getReferenceByDistinctEdits:function(){return An},getThemeSupports:function(){return En},getUndoEdit:function(){return vn},getUserQueryResults:function(){return Yt},hasEditsForEntityRecord:function(){return cn},hasEntityRecords:function(){return nn},hasFetchedAutosaves:function(){return Nn},hasRedo:function(){return wn},hasUndo:function(){return yn},isAutosavingEntityRecord:function(){return dn},isDeletingEntityRecord:function(){return mn},isPreviewEmbedFallback:function(){return Cn},isRequestingEmbedPreview:function(){return qt},isSavingEntityRecord:function(){return pn}});var a={};n.r(a),n.d(a,{__experimentalGetTemplateForLink:function(){return $n},canUser:function(){return Wn},canUserEditEntityRecord:function(){return Zn},getAuthors:function(){return Pn},getAutosave:function(){return Un},getAutosaves:function(){return jn},getCurrentTheme:function(){return zn},getCurrentUser:function(){return On},getEditedEntityRecord:function(){return Bn},getEmbedPreview:function(){return Vn},getEntityRecord:function(){return Dn},getEntityRecords:function(){return Fn},getRawEntityRecord:function(){return Mn},getThemeSupports:function(){return Hn}});var l={};n.r(l),n.d(l,{__unstableGetPendingLockRequests:function(){return qn},__unstableIsLockAvailable:function(){return Gn}});var s={};n.r(s),n.d(s,{find:function(){return to}});var c={};n.r(c),n.d(c,{find:function(){return so},findNext:function(){return uo},findPrevious:function(){return co},isTabbableIndex:function(){return ro}});var u={};n.r(u),n.d(u,{getActiveBlockVariation:function(){return Da},getBlockStyles:function(){return Pa},getBlockSupport:function(){return ja},getBlockType:function(){return La},getBlockTypes:function(){return Ra},getBlockVariations:function(){return Oa},getCategories:function(){return Ba},getChildBlockNames:function(){return Za},getCollections:function(){return Fa},getDefaultBlockName:function(){return za},getDefaultBlockVariation:function(){return Ma},getFreeformFallbackBlockName:function(){return Ha},getGroupingBlockName:function(){return Wa},getUnregisteredFallbackBlockName:function(){return Va},hasBlockSupport:function(){return Ua},hasChildBlocks:function(){return qa},hasChildBlocksWithInserterSupport:function(){return Ga},isMatchingSearchTerm:function(){return $a}});var d={};n.r(d),n.d(d,{addBlockCollection:function(){return ll},addBlockStyles:function(){return Xa},addBlockTypes:function(){return Ka},addBlockVariations:function(){return Qa},removeBlockCollection:function(){return sl},removeBlockStyles:function(){return Ja},removeBlockTypes:function(){return Ya},removeBlockVariations:function(){return el},setCategories:function(){return il},setDefaultBlockName:function(){return tl},setFreeformFallbackBlockName:function(){return nl},setGroupingBlockName:function(){return ol},setUnregisteredFallbackBlockName:function(){return rl},updateCategory:function(){return al}});var p={};n.r(p),n.d(p,{__experimentalGetActiveBlockIdByBlockNames:function(){return Zf},__experimentalGetAllowedBlocks:function(){return _f},__experimentalGetAllowedPatterns:function(){return Sf},__experimentalGetBlockListSettingsForBlocks:function(){return Lf},__experimentalGetLastBlockAttributeChanges:function(){return Mf},__experimentalGetParsedPattern:function(){return Cf},__experimentalGetParsedReusableBlock:function(){return Pf},__experimentalGetPatternTransformItems:function(){return Tf},__experimentalGetPatternsByBlockTypes:function(){return If},__experimentalGetReusableBlockTitle:function(){return Of},__unstableGetBlockTree:function(){return cm},__unstableGetBlockWithBlockTree:function(){return sm},__unstableGetBlockWithoutInnerBlocks:function(){return am},__unstableGetClientIdWithClientIdsTree:function(){return um},__unstableGetClientIdsTree:function(){return dm},__unstableIsLastBlockChangeIgnored:function(){return Df},areInnerBlocksControlled:function(){return Wf},canInsertBlockType:function(){return mf},canInsertBlocks:function(){return ff},didAutomaticChange:function(){return Hf},getAdjacentBlockClientId:function(){return Am},getBlock:function(){return im},getBlockAttributes:function(){return om},getBlockCount:function(){return gm},getBlockHierarchyRootClientId:function(){return Tm},getBlockIndex:function(){return Um},getBlockInsertionPoint:function(){return af},getBlockListSettings:function(){return Nf},getBlockMode:function(){return Jm},getBlockName:function(){return nm},getBlockOrder:function(){return jm},getBlockParents:function(){return Sm},getBlockParentsByBlockName:function(){return Im},getBlockRootClientId:function(){return xm},getBlockSelectionEnd:function(){return wm},getBlockSelectionStart:function(){return ym},getBlockTransformItems:function(){return kf},getBlocks:function(){return lm},getBlocksByClientId:function(){return hm},getClientIdsOfDescendants:function(){return pm},getClientIdsWithDescendants:function(){return mm},getDraggedBlockClientIds:function(){return tf},getFirstMultiSelectedBlockClientId:function(){return Bm},getGlobalBlockCount:function(){return fm},getInserterItems:function(){return wf},getLastMultiSelectedBlockClientId:function(){return Fm},getLowestCommonAncestorWithSelectedBlock:function(){return Nm},getMultiSelectedBlockClientIds:function(){return Dm},getMultiSelectedBlocks:function(){return Mm},getMultiSelectedBlocksEndClientId:function(){return Zm},getMultiSelectedBlocksStartClientId:function(){return Wm},getNextBlockClientId:function(){return Lm},getPreviousBlockClientId:function(){return Rm},getSelectedBlock:function(){return Cm},getSelectedBlockClientId:function(){return _m},getSelectedBlockClientIds:function(){return Om},getSelectedBlockCount:function(){return km},getSelectedBlocksInitialCaretPosition:function(){return Pm},getSelectionEnd:function(){return bm},getSelectionStart:function(){return vm},getSettings:function(){return Af},getTemplate:function(){return cf},getTemplateLock:function(){return uf},hasBlockMovingClientId:function(){return zf},hasInserterItems:function(){return Ef},hasMultiSelection:function(){return Km},hasSelectedBlock:function(){return Em},hasSelectedInnerBlock:function(){return qm},isAncestorBeingDragged:function(){return rf},isAncestorMultiSelected:function(){return Vm},isBlockBeingDragged:function(){return nf},isBlockHighlighted:function(){return Vf},isBlockInsertionPointVisible:function(){return lf},isBlockMultiSelected:function(){return Hm},isBlockSelected:function(){return $m},isBlockValid:function(){return rm},isBlockWithinSelection:function(){return Gm},isCaretWithinFormattedText:function(){return of},isDraggingBlocks:function(){return ef},isFirstMultiSelectedBlock:function(){return zm},isLastBlockChangePersistent:function(){return Rf},isMultiSelecting:function(){return Ym},isNavigationMode:function(){return Ff},isSelectionEnabled:function(){return Xm},isTyping:function(){return Qm},isValidTemplate:function(){return sf},wasBlockJustInserted:function(){return jf}});var m={};n.r(m),n.d(m,{getFormatType:function(){return Xf},getFormatTypeForBareElement:function(){return Jf},getFormatTypeForClassName:function(){return Qf},getFormatTypes:function(){return Yf}});var f={};n.r(f),n.d(f,{addFormatTypes:function(){return eh},removeFormatTypes:function(){return th}});var h={};n.r(h),n.d(h,{__unstableMarkAutomaticChange:function(){return gv},__unstableMarkAutomaticChangeFinal:function(){return vv},__unstableMarkLastChangeAsPersistent:function(){return fv},__unstableMarkNextChangeAsNotPersistent:function(){return hv},__unstableSaveReusableBlock:function(){return mv},clearSelectedBlock:function(){return Mg},duplicateBlocks:function(){return wv},enterFormattedText:function(){return lv},exitFormattedText:function(){return sv},flashBlock:function(){return Cv},hideInsertionPoint:function(){return Kg},insertAfterBlock:function(){return Ev},insertBeforeBlock:function(){return kv},insertBlock:function(){return $g},insertBlocks:function(){return qg},insertDefaultBlock:function(){return uv},mergeBlocks:function(){return Jg},moveBlockToPosition:function(){return Ug},moveBlocksDown:function(){return Wg},moveBlocksToPosition:function(){return jg},moveBlocksUp:function(){return Zg},multiSelect:function(){return Dg},receiveBlocks:function(){return Ig},removeBlock:function(){return ev},removeBlocks:function(){return Qg},replaceBlock:function(){return Hg},replaceBlocks:function(){return zg},replaceInnerBlocks:function(){return tv},resetBlocks:function(){return Cg},resetSelection:function(){return Sg},selectBlock:function(){return Ag},selectNextBlock:function(){return Lg},selectPreviousBlock:function(){return Rg},selectionChange:function(){return cv},setBlockMovingClientId:function(){return yv},setHasControlledInnerBlocks:function(){return xv},setNavigationMode:function(){return bv},setTemplateValidity:function(){return Yg},showInsertionPoint:function(){return Gg},startDraggingBlocks:function(){return iv},startMultiSelect:function(){return Pg},startTyping:function(){return rv},stopDraggingBlocks:function(){return av},stopMultiSelect:function(){return Og},stopTyping:function(){return ov},synchronizeTemplate:function(){return Xg},toggleBlockHighlight:function(){return _v},toggleBlockMode:function(){return nv},toggleSelection:function(){return Bg},updateBlock:function(){return Ng},updateBlockAttributes:function(){return Tg},updateBlockListSettings:function(){return dv},updateSettings:function(){return pv},validateBlocksToTemplate:function(){return xg}});var g={};n.r(g),n.d(g,{Text:function(){return ey},block:function(){return ty},destructive:function(){return ry},highlighterText:function(){return iy},muted:function(){return oy},positive:function(){return ny},upperCase:function(){return ay}});var v={};n.r(v),n.d(v,{registerShortcut:function(){return DR},unregisterShortcut:function(){return MR}});var b={};n.r(b),n.d(b,{getAllShortcutKeyCombinations:function(){return jR},getAllShortcutRawKeyCombinations:function(){return UR},getCategoryShortcuts:function(){return $R},getShortcutAliases:function(){return ZR},getShortcutDescription:function(){return WR},getShortcutKeyCombination:function(){return HR},getShortcutRepresentation:function(){return VR}});var y={};n.r(y),n.d(y,{createErrorNotice:function(){return kP},createInfoNotice:function(){return wP},createNotice:function(){return bP},createSuccessNotice:function(){return yP},createWarningNotice:function(){return EP},removeNotice:function(){return _P}});var w={};n.r(w),n.d(w,{getNotices:function(){return xP}});var k={};n.r(k),n.d(k,{applyStylesToAllTextInputs:function(){return qH},blocksChangedInBlockEditor:function(){return $H},changeActiveSidebar:function(){return OH},changeFormBlocks:function(){return vH},changeFormName:function(){return bH},changeFormSettings:function(){return AH},changeFormStyles:function(){return EH},changePreviewSettings:function(){return DH},createCustomField:function(){return jH},createCustomFieldDone:function(){return IH},createCustomFieldFailed:function(){return NH},createCustomFieldStarted:function(){return TH},customFieldEdited:function(){return _H},deleteCustomField:function(){return UH},deleteCustomFieldDone:function(){return wH},deleteCustomFieldFailed:function(){return kH},deleteCustomFieldStarted:function(){return yH},hidePreview:function(){return FH},historyRedo:function(){return KH},historyUndo:function(){return GH},removeNotice:function(){return zH},saveCustomField:function(){return ZH},saveCustomFieldDone:function(){return CH},saveCustomFieldFailed:function(){return SH},saveCustomFieldStarted:function(){return xH},saveForm:function(){return WH},saveFormDone:function(){return RH},saveFormFailed:function(){return PH},saveFormStarted:function(){return LH},showPlacementSettings:function(){return MH},showPreview:function(){return BH},switchDefaultSidebarTab:function(){return HH},toggleForm:function(){return hH},toggleFullscreen:function(){return gH},toggleInserter:function(){return fH},toggleSidebar:function(){return mH},toggleSidebarPanel:function(){return VH},tutorialDismissed:function(){return YH}});var E={};n.r(E),n.d(E,{selectCategory:function(){return wJ},selectTemplate:function(){return yJ}});var _=n(45993),C=n.n(_),x=n(97846),S=n.n(x),I=n(59588),T=n.n(I),N=n(10721),A=n.n(N);const R=T()(console.error);function L(e,...t){try{return A().sprintf(e,...t)}catch(t){return R("sprintf error: \n\n"+t.toString()),e}}var P,O,D,M;P={"(":9,"!":8,"*":7,"/":7,"%":7,"+":6,"-":6,"<":5,"<=":5,">":5,">=":5,"==":4,"!=":4,"&&":3,"||":2,"?":1,"?:":1},O=["(","?"],D={")":["("],":":["?","?:"]},M=/<=|>=|==|!=|&&|\|\||\?:|\(|!|\*|\/|%|\+|-|<|>|\?|\)|:/;var B={"!":function(e){return!e},"*":function(e,t){return e*t},"/":function(e,t){return e/t},"%":function(e,t){return e%t},"+":function(e,t){return e+t},"-":function(e,t){return e-t},"<":function(e,t){return e<t},"<=":function(e,t){return e<=t},">":function(e,t){return e>t},">=":function(e,t){return e>=t},"==":function(e,t){return e===t},"!=":function(e,t){return e!==t},"&&":function(e,t){return e&&t},"||":function(e,t){return e||t},"?:":function(e,t,n){if(e)throw t;return n}};var F={contextDelimiter:"",onMissingKey:null};function z(e,t){var n;for(n in this.data=e,this.pluralForms={},this.options={},F)this.options[n]=void 0!==t&&n in t?t[n]:F[n]}z.prototype.getPluralForm=function(e,t){var n,r,o,i,a=this.pluralForms[e];return a||("function"!=typeof(o=(n=this.data[e][""])["Plural-Forms"]||n["plural-forms"]||n.plural_forms)&&(r=function(e){var t,n,r;for(t=e.split(";"),n=0;n<t.length;n++)if(0===(r=t[n].trim()).indexOf("plural="))return r.substr(7)}(n["Plural-Forms"]||n["plural-forms"]||n.plural_forms),i=function(e){var t=function(e){for(var t,n,r,o,i=[],a=[];t=e.match(M);){for(n=t[0],(r=e.substr(0,t.index).trim())&&i.push(r);o=a.pop();){if(D[n]){if(D[n][0]===o){n=D[n][1]||n;break}}else if(O.indexOf(o)>=0||P[o]<P[n]){a.push(o);break}i.push(o)}D[n]||a.push(n),e=e.substr(t.index+n.length)}return(e=e.trim())&&i.push(e),i.concat(a.reverse())}(e);return function(e){return function(e,t){var n,r,o,i,a,l,s=[];for(n=0;n<e.length;n++){if(a=e[n],i=B[a]){for(r=i.length,o=Array(r);r--;)o[r]=s.pop();try{l=i.apply(null,o)}catch(e){return e}}else l=t.hasOwnProperty(a)?t[a]:+a;s.push(l)}return s[0]}(t,e)}}(r),o=function(e){return+i({n:e})}),a=this.pluralForms[e]=o),a(t)},z.prototype.dcnpgettext=function(e,t,n,r,o){var i,a,l;return i=void 0===o?0:this.getPluralForm(e,o),a=n,t&&(a=t+this.options.contextDelimiter+n),(l=this.data[e][a])&&l[i]?l[i]:(this.options.onMissingKey&&this.options.onMissingKey(n,e),0===i?n:r)};const H={"":{plural_forms:e=>1===e?0:1}},V=/^i18n\.(n?gettext|has_translation)(_|$)/;var W=n(52416);const Z=((e,t,n)=>{const r=new z({}),o=new Set,i=()=>{o.forEach((e=>e()))},a=(e,t="default")=>{r.data[t]={...H,...r.data[t],...e},r.data[t][""]={...H[""],...r.data[t][""]}},l=(e,t)=>{a(e,t),i()},s=(e="default",t,n,o,i)=>(r.data[e]||a(void 0,e),r.dcnpgettext(e,t,n,o,i)),c=(e="default")=>e,u=(e,t,r)=>{let o=s(r,t,e);return n?(o=n.applyFilters("i18n.gettext_with_context",o,e,t,r),n.applyFilters("i18n.gettext_with_context_"+c(r),o,e,t,r)):o};if(n){const e=e=>{V.test(e)&&i()};n.addAction("hookAdded","core/i18n",e),n.addAction("hookRemoved","core/i18n",e)}return{getLocaleData:(e="default")=>r.data[e],setLocaleData:l,resetLocaleData:(e,t)=>{r.data={},r.pluralForms={},l(e,t)},subscribe:e=>(o.add(e),()=>o.delete(e)),__:(e,t)=>{let r=s(t,void 0,e);return n?(r=n.applyFilters("i18n.gettext",r,e,t),n.applyFilters("i18n.gettext_"+c(t),r,e,t)):r},_x:u,_n:(e,t,r,o)=>{let i=s(o,void 0,e,t,r);return n?(i=n.applyFilters("i18n.ngettext",i,e,t,r,o),n.applyFilters("i18n.ngettext_"+c(o),i,e,t,r,o)):i},_nx:(e,t,r,o,i)=>{let a=s(i,o,e,t,r);return n?(a=n.applyFilters("i18n.ngettext_with_context",a,e,t,r,o,i),n.applyFilters("i18n.ngettext_with_context_"+c(i),a,e,t,r,o,i)):a},isRTL:()=>"rtl"===u("ltr","text direction"),hasTranslation:(e,t,o)=>{var i,a;const l=t?t+""+e:e;let s=!(null===(i=r.data)||void 0===i||null===(a=i[null!=o?o:"default"])||void 0===a||!a[l]);return n&&(s=n.applyFilters("i18n.has_translation",s,e,t,o),s=n.applyFilters("i18n.has_translation_"+c(o),s,e,t,o)),s}}})(0,0,W.JQ);Z.getLocaleData.bind(Z);const j=Z.setLocaleData.bind(Z),U=(Z.resetLocaleData.bind(Z),Z.subscribe.bind(Z),Z.__.bind(Z)),$=Z._x.bind(Z),q=Z._n.bind(Z),G=(Z._nx.bind(Z),Z.isRTL.bind(Z));Z.hasTranslation.bind(Z);var K=(e,t)=>{let n,r,o=e.path;return"string"==typeof e.namespace&&"string"==typeof e.endpoint&&(n=e.namespace.replace(/^\/|\/$/g,""),r=e.endpoint.replace(/^\//,""),o=r?n+"/"+r:n),delete e.namespace,delete e.endpoint,t({...e,path:o})};function Y(e){const t=e.split("?"),n=t[1],r=t[0];return n?r+"?"+n.split("&").map((e=>e.split("="))).sort(((e,t)=>e[0].localeCompare(t[0]))).map((e=>e.join("="))).join("&"):r}function X(e){let t;try{t=new URL(e,"http://example.com").search.substring(1)}catch(e){}if(t)return t}function J(e){return(X(e)||"").replace(/\+/g,"%20").split("&").reduce(((e,t)=>{const[n,r=""]=t.split("=").filter(Boolean).map(decodeURIComponent);return n&&function(e,t,n){const r=t.length,o=r-1;for(let i=0;i<r;i++){let r=t[i];!r&&Array.isArray(e)&&(r=e.length.toString());const a=!isNaN(Number(t[i+1]));e[r]=i===o?n:e[r]||(a?[]:{}),Array.isArray(e[r])&&!a&&(e[r]={...e[r]}),e=e[r]}}(e,n.replace(/\]/g,"").split("["),r),e}),{})}function Q(e="",t){if(!t||!Object.keys(t).length)return e;let n=e;const r=e.indexOf("?");return-1!==r&&(t=Object.assign(J(e),t),n=n.substr(0,r)),n+"?"+function(e){let t="";const n=Object.entries(e);let r;for(;r=n.shift();){let[e,o]=r;if(Array.isArray(o)||o&&o.constructor===Object){const t=Object.entries(o).reverse();for(const[r,o]of t)n.unshift([`${e}[${r}]`,o])}else void 0!==o&&(null===o&&(o=""),t+="&"+[e,o].map(encodeURIComponent).join("="))}return t.substr(1)}(t)}const ee=({path:e,url:t,...n},r)=>({...n,url:t&&Q(t,r),path:e&&Q(e,r)}),te=e=>e.json?e.json():Promise.reject(e),ne=e=>{const{next:t}=(e=>{if(!e)return{};const t=e.match(/<([^>]+)>; rel="next"/);return t?{next:t[1]}:{}})(e.headers.get("link"));return t};var re=async(e,t)=>{if(!1===e.parse)return t(e);if(!(e=>{const t=!!e.path&&-1!==e.path.indexOf("per_page=-1"),n=!!e.url&&-1!==e.url.indexOf("per_page=-1");return t||n})(e))return t(e);const n=await he({...ee(e,{per_page:100}),parse:!1}),r=await te(n);if(!Array.isArray(r))return r;let o=ne(n);if(!o)return r;let i=[].concat(r);for(;o;){const t=await he({...e,path:void 0,url:o,parse:!1}),n=await te(t);i=i.concat(n),o=ne(t)}return i};const oe=new Set(["PATCH","PUT","DELETE"]),ie="GET";function ae(e,t){return void 0!==function(e,t){return J(e)[t]}(e,t)}const le=(e,t=!0)=>Promise.resolve(((e,t=!0)=>t?204===e.status?null:e.json?e.json():Promise.reject(e):e)(e,t)).catch((e=>se(e,t)));function se(e,t=!0){if(!t)throw e;return(e=>{const t={code:"invalid_json",message:U("The response is not a valid JSON response.")};if(!e||!e.json)throw t;return e.json().catch((()=>{throw t}))})(e).then((e=>{const t={code:"unknown_error",message:U("An unknown error occurred.")};throw e||t}))}const ce={Accept:"application/json, */*;q=0.1"},ue={credentials:"include"},de=[(e,t)=>("string"!=typeof e.url||ae(e.url,"_locale")||(e.url=Q(e.url,{_locale:"user"})),"string"!=typeof e.path||ae(e.path,"_locale")||(e.path=Q(e.path,{_locale:"user"})),t(e)),K,(e,t)=>{const{method:n=ie}=e;return oe.has(n.toUpperCase())&&(e={...e,headers:{...e.headers,"X-HTTP-Method-Override":n,"Content-Type":"application/json"},method:"POST"}),t(e)},re],pe=e=>{if(e.status>=200&&e.status<300)return e;throw e};let me=e=>{const{url:t,path:n,data:r,parse:o=!0,...i}=e;let{body:a,headers:l}=e;return l={...ce,...l},r&&(a=JSON.stringify(r),l["Content-Type"]="application/json"),window.fetch(t||n||window.location.href,{...ue,...i,body:a,headers:l}).then((e=>Promise.resolve(e).then(pe).catch((e=>se(e,o))).then((e=>le(e,o)))),(e=>{if(e&&"AbortError"===e.name)throw e;throw{code:"fetch_error",message:U("You are probably offline.")}}))};function fe(e){return de.reduceRight(((e,t)=>n=>t(n,e)),me)(e).catch((t=>"rest_cookie_invalid_nonce"!==t.code?Promise.reject(t):window.fetch(fe.nonceEndpoint).then(pe).then((e=>e.text())).then((t=>(fe.nonceMiddleware.nonce=t,fe(e))))))}fe.use=function(e){de.unshift(e)},fe.setFetchHandler=function(e){me=e},fe.createNonceMiddleware=function(e){const t=(e,n)=>{const{headers:r={}}=e;for(const o in r)if("x-wp-nonce"===o.toLowerCase()&&r[o]===t.nonce)return n(e);return n({...e,headers:{...r,"X-WP-Nonce":t.nonce}})};return t.nonce=e,t},fe.createPreloadingMiddleware=function(e){const t=Object.keys(e).reduce(((t,n)=>(t[Y(n)]=e[n],t)),{});return(e,n)=>{const{parse:r=!0}=e;if("string"==typeof e.path){const n=e.method||"GET",o=Y(e.path);if("GET"===n&&t[o]){const e=t[o];return delete t[o],Promise.resolve(r?e.body:new window.Response(JSON.stringify(e.body),{status:200,statusText:"OK",headers:e.headers}))}if("OPTIONS"===n&&t[n]&&t[n][o])return Promise.resolve(r?t[n][o].body:t[n][o])}return n(e)}},fe.createRootURLMiddleware=e=>(t,n)=>K(t,(t=>{let r,o=t.url,i=t.path;return"string"==typeof i&&(r=e,-1!==e.indexOf("?")&&(i=i.replace("?","&")),i=i.replace(/^\//,""),"string"==typeof r&&-1!==r.indexOf("?")&&(i=i.replace("?","&")),o=r+i),n({...t,url:o})})),fe.fetchAllMiddleware=re,fe.mediaUploadMiddleware=(e,t)=>{if(!(e.path&&-1!==e.path.indexOf("/wp/v2/media")||e.url&&-1!==e.url.indexOf("/wp/v2/media")))return t(e);let n=0;const r=e=>(n++,t({path:`/wp/v2/media/${e}/post-process`,method:"POST",data:{action:"create-image-subsizes"},parse:!1}).catch((()=>n<5?r(e):(t({path:`/wp/v2/media/${e}?force=true`,method:"DELETE"}),Promise.reject()))));return t({...e,parse:!1}).catch((t=>{const n=t.headers.get("x-wp-upload-attachment-id");return t.status>=500&&t.status<600&&n?r(n).catch((()=>!1!==e.parse?Promise.reject({code:"post_process",message:U("Media upload failed. If this is a photo or a large image, please scale it down and try again.")}):Promise.reject(t))):se(t,e.parse)})).then((t=>le(t,e.parse)))};var he=fe,ge=n(71304),ve=n(93726),be=n(61299),ye=n(99926);function we(e){return{type:"API_FETCH",request:e}}const ke=function(e){return{type:"AWAIT_PROMISE",promise:e}},Ee={AWAIT_PROMISE:({promise:e})=>e,API_FETCH:({request:e})=>he(e)};var _e,Ce=n(96486),xe=n(49884),Se=n.n(xe),Ie=n(26015),Te=e=>t=>(n,r)=>void 0===n||e(r)?t(n,r):n,Ne=e=>t=>(n,r)=>t(n,e(r)),Ae=e=>t=>(n={},r)=>{const o=r[e];if(void 0===o)return n;const i=t(n[o],r);return i===n[o]?n:{...n,[o]:i}},Re=n(66209),Le=new Uint8Array(16);function Pe(){if(!_e&&!(_e="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return _e(Le)}for(var Oe=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,De=function(e){return"string"==typeof e&&Oe.test(e)},Me=[],Be=0;Be<256;++Be)Me.push((Be+256).toString(16).substr(1));var Fe=function(e,t,n){var r=(e=e||{}).random||(e.rng||Pe)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var o=0;o<16;++o)t[n+o]=r[o];return t}return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(Me[e[t+0]]+Me[e[t+1]]+Me[e[t+2]]+Me[e[t+3]]+"-"+Me[e[t+4]]+Me[e[t+5]]+"-"+Me[e[t+6]]+Me[e[t+7]]+"-"+Me[e[t+8]]+Me[e[t+9]]+"-"+Me[e[t+10]]+Me[e[t+11]]+Me[e[t+12]]+Me[e[t+13]]+Me[e[t+14]]+Me[e[t+15]]).toLowerCase();if(!De(n))throw TypeError("Stringified UUID is invalid");return n}(r)};function ze(e,t){return{type:"RECEIVE_ITEMS",items:(0,Ce.castArray)(e),persistedEdits:t}}const He="core";function*Ve(e,t,{exclusive:n}){const r=yield*We(e,t,{exclusive:n});return yield*je(),yield ke(r)}function*We(e,t,{exclusive:n}){let r;const o=new Promise((e=>{r=e}));return yield{type:"ENQUEUE_LOCK_REQUEST",request:{store:e,path:t,exclusive:n,notifyAcquired:r}},o}function*Ze(e){yield{type:"RELEASE_LOCK",lock:e},yield*je()}function*je(){yield{type:"PROCESS_PENDING_LOCK_REQUESTS"};const e=yield Re.a.select(He,"__unstableGetPendingLockRequests");for(const t of e){const{store:e,path:n,exclusive:r,notifyAcquired:o}=t;if(yield Re.a.select(He,"__unstableIsLockAvailable",e,n,{exclusive:r})){const i={store:e,path:n,exclusive:r};yield{type:"GRANT_LOCK_REQUEST",lock:i,request:t},o(i)}}}async function Ue(e){const t=await he({path:"/batch/v1",method:"POST",data:{validation:"require-all-validate",requests:e.map((e=>({path:e.path,body:e.data,method:e.method,headers:e.headers})))}});return t.failed?t.responses.map((e=>({error:null==e?void 0:e.body}))):t.responses.map((e=>{const t={};return e.status>=200&&e.status<300?t.output=e.body:t.error=e.body,t}))}function $e(e=Ue){let t=0,n=[];const r=new qe;return{add(e){const o=++t;r.add(o);const i=e=>new Promise(((t,i)=>{n.push({input:e,resolve:t,reject:i}),r.delete(o)}));return(0,Ce.isFunction)(e)?Promise.resolve(e(i)).finally((()=>{r.delete(o)})):i(e)},async run(){let t;r.size&&await new Promise((e=>{const t=r.subscribe((()=>{r.size||(t(),e())}))}));try{if(t=await e(n.map((({input:e})=>e))),t.length!==n.length)throw new Error("run: Array returned by processor must be same size as input array.")}catch(e){for(const{reject:t}of n)t(e);throw e}let o=!0;for(const[e,{resolve:r,reject:a}]of(0,Ce.zip)(t,n)){var i;null!=e&&e.error?(a(e.error),o=!1):r(null!==(i=null==e?void 0:e.output)&&void 0!==i?i:e)}return n=[],o}}}class qe{constructor(...e){this.set=new Set(...e),this.subscribers=new Set}get size(){return this.set.size}add(...e){return this.set.add(...e),this.subscribers.forEach((e=>e())),this}delete(...e){const t=this.set.delete(...e);return this.subscribers.forEach((e=>e())),t}subscribe(e){return this.subscribers.add(e),()=>{this.subscribers.delete(e)}}}var Ge=n(67775),Ke={async REGULAR_FETCH({url:e}){const{data:t}=await window.fetch(e).then((e=>e.json()));return t},GET_DISPATCH:(0,Ge.R)((({dispatch:e})=>()=>e))};function Ye(e,t){return{type:"RECEIVE_USER_QUERY",users:(0,Ce.castArray)(t),queryID:e}}function Xe(e){return{type:"RECEIVE_CURRENT_USER",currentUser:e}}function Je(e){return{type:"ADD_ENTITIES",entities:e}}function Qe(e,t,n,r,o=!1,i){let a;return"postType"===e&&(n=(0,Ce.castArray)(n).map((e=>"auto-draft"===e.status?{...e,title:""}:e))),a=r?function(e,t={},n){return{...ze(e,n),query:t}}(n,r,i):ze(n,i),{...a,kind:e,name:t,invalidateCache:o}}function et(e){return{type:"RECEIVE_CURRENT_THEME",currentTheme:e}}function tt(e){return{type:"RECEIVE_THEME_SUPPORTS",themeSupports:e}}function nt(e,t){return{type:"RECEIVE_EMBED_PREVIEW",url:e,preview:t}}function*rt(e,t,n,r,{__unstableFetch:o=null}={}){const i=yield wt(e),a=(0,Ce.find)(i,{kind:e,name:t});let l,s=!1;if(!a)return;const c=yield*Ve(He,["entities","data",e,t,n],{exclusive:!0});try{yield{type:"DELETE_ENTITY_RECORD_START",kind:e,name:t,recordId:n};try{let i=`${a.baseURL}/${n}`;r&&(i=Q(i,r));const l={path:i,method:"DELETE"};s=o?yield ke(o(l)):yield we(l),yield function(e,t,n,r=!1){return{type:"REMOVE_ITEMS",itemIds:(0,Ce.castArray)(n),kind:e,name:t,invalidateCache:r}}(e,t,n,!0)}catch(e){l=e}return yield{type:"DELETE_ENTITY_RECORD_FINISH",kind:e,name:t,recordId:n,error:l},s}finally{yield*Ze(c)}}function*ot(e,t,n,r,o={}){const i=yield Re.a.select(He,"getEntity",e,t);if(!i)throw new Error(`The entity being edited (${e}, ${t}) does not have a loaded config.`);const{transientEdits:a={},mergedEdits:l={}}=i,s=yield Re.a.select(He,"getRawEntityRecord",e,t,n),c=yield Re.a.select(He,"getEditedEntityRecord",e,t,n),u={kind:e,name:t,recordId:n,edits:Object.keys(r).reduce(((e,t)=>{const n=s[t],o=c[t],i=l[t]?{...o,...r[t]}:r[t];return e[t]=(0,Ce.isEqual)(n,i)?void 0:i,e}),{}),transientEdits:a};return{type:"EDIT_ENTITY_RECORD",...u,meta:{undo:!o.undoIgnore&&{...u,edits:Object.keys(r).reduce(((e,t)=>(e[t]=c[t],e)),{})}}}}function*it(){const e=yield Re.a.select(He,"getUndoEdit");e&&(yield{type:"EDIT_ENTITY_RECORD",...e,meta:{isUndo:!0}})}function*at(){const e=yield Re.a.select(He,"getRedoEdit");e&&(yield{type:"EDIT_ENTITY_RECORD",...e,meta:{isRedo:!0}})}function lt(){return{type:"CREATE_UNDO_LEVEL"}}function*st(e,t,n,{isAutosave:r=!1,__unstableFetch:o=null}={}){const i=yield wt(e),a=(0,Ce.find)(i,{kind:e,name:t});if(!a)return;const l=n[a.key||ht],s=yield*Ve(He,["entities","data",e,t,l||Fe()],{exclusive:!0});try{for(const[r,o]of Object.entries(n))if("function"==typeof o){const i=o(yield Re.a.select(He,"getEditedEntityRecord",e,t,l));yield ot(e,t,l,{[r]:i},{undoIgnore:!0}),n[r]=i}let i,c;yield{type:"SAVE_ENTITY_RECORD_START",kind:e,name:t,recordId:l,isAutosave:r};try{const s=`${a.baseURL}${l?"/"+l:""}`,c=yield Re.a.select(He,"getRawEntityRecord",e,t,l);if(r){const r=yield Re.a.select(He,"getCurrentUser"),a=r?r.id:void 0,l=yield Re.a.select(He,"getAutosave",c.type,c.id,a);let u={...c,...l,...n};u=Object.keys(u).reduce(((e,t)=>(["title","excerpt","content"].includes(t)&&(e[t]=(0,Ce.get)(u[t],"raw",u[t])),e)),{status:"auto-draft"===u.status?"draft":u.status});const d={path:`${s}/autosaves`,method:"POST",data:u};if(i=o?yield ke(o(d)):yield we(d),c.id===i.id){let n={...c,...u,...i};n=Object.keys(n).reduce(((e,t)=>(["title","excerpt","content"].includes(t)?e[t]=(0,Ce.get)(n[t],"raw",n[t]):e[t]="status"===t?"auto-draft"===c.status&&"draft"===n.status?n.status:c.status:(0,Ce.get)(c[t],"raw",c[t]),e)),{}),yield Qe(e,t,n,void 0,!0)}else yield ft(c.id,i)}else{let r=n;a.__unstablePrePersist&&(r={...r,...a.__unstablePrePersist(c,r)});const u={path:s,method:l?"PUT":"POST",data:r};i=o?yield ke(o(u)):yield we(u),yield Qe(e,t,i,void 0,!0,r)}}catch(e){c=e}return yield{type:"SAVE_ENTITY_RECORD_FINISH",kind:e,name:t,recordId:l,error:c,isAutosave:r},i}finally{yield*Ze(s)}}function*ct(e){const t=$e(),n=yield{type:"GET_DISPATCH"},r={saveEntityRecord:(e,r,o,i)=>t.add((t=>n(He).saveEntityRecord(e,r,o,{...i,__unstableFetch:t}))),saveEditedEntityRecord:(e,r,o,i)=>t.add((t=>n(He).saveEditedEntityRecord(e,r,o,{...i,__unstableFetch:t}))),deleteEntityRecord:(e,r,o,i,a)=>t.add((t=>n(He).deleteEntityRecord(e,r,o,i,{...a,__unstableFetch:t})))},o=e.map((e=>e(r))),[,...i]=yield ke(Promise.all([t.run(),...o]));return i}function*ut(e,t,n,r){if(!(yield Re.a.select(He,"hasEditsForEntityRecord",e,t,n)))return;const o={id:n,...yield Re.a.select(He,"getEntityRecordNonTransientEdits",e,t,n)};return yield*st(e,t,o,r)}function*dt(e,t,n,r,o){if(!(yield Re.a.select(He,"hasEditsForEntityRecord",e,t,n)))return;const i=yield Re.a.select(He,"getEntityRecordNonTransientEdits",e,t,n),a={};for(const e in i)r.some((t=>t===e))&&(a[e]=i[e]);return yield*st(e,t,a,o)}function pt(e){return{type:"RECEIVE_USER_PERMISSION",key:"create/media",isAllowed:e}}function mt(e,t){return{type:"RECEIVE_USER_PERMISSION",key:e,isAllowed:t}}function ft(e,t){return{type:"RECEIVE_AUTOSAVES",postId:e,autosaves:(0,Ce.castArray)(t)}}const ht="id",gt=[{label:U("Base"),name:"__unstableBase",kind:"root",baseURL:""},{label:U("Site"),name:"site",kind:"root",baseURL:"/wp/v2/settings",getTitle:e=>(0,Ce.get)(e,["title"],U("Site Title"))},{label:U("Post Type"),name:"postType",kind:"root",key:"slug",baseURL:"/wp/v2/types",baseURLParams:{context:"edit"}},{name:"media",kind:"root",baseURL:"/wp/v2/media",baseURLParams:{context:"edit"},plural:"mediaItems",label:U("Media")},{name:"taxonomy",kind:"root",key:"slug",baseURL:"/wp/v2/taxonomies",baseURLParams:{context:"edit"},plural:"taxonomies",label:U("Taxonomy")},{name:"sidebar",kind:"root",baseURL:"/wp/v2/sidebars",plural:"sidebars",transientEdits:{blocks:!0},label:U("Widget areas")},{name:"widget",kind:"root",baseURL:"/wp/v2/widgets",baseURLParams:{context:"edit"},plural:"widgets",transientEdits:{blocks:!0},label:U("Widgets")},{name:"widgetType",kind:"root",baseURL:"/wp/v2/widget-types",baseURLParams:{context:"edit"},plural:"widgetTypes",label:U("Widget types")},{label:U("User"),name:"user",kind:"root",baseURL:"/wp/v2/users",baseURLParams:{context:"edit"},plural:"users"},{name:"comment",kind:"root",baseURL:"/wp/v2/comments",baseURLParams:{context:"edit"},plural:"comments",label:U("Comment")},{name:"menu",kind:"root",baseURL:"/__experimental/menus",baseURLParams:{context:"edit"},plural:"menus",label:U("Menu")},{name:"menuItem",kind:"root",baseURL:"/__experimental/menu-items",baseURLParams:{context:"edit"},plural:"menuItems",label:U("Menu Item")},{name:"menuLocation",kind:"root",baseURL:"/__experimental/menu-locations",baseURLParams:{context:"edit"},plural:"menuLocations",label:U("Menu Location"),key:"name"}],vt=[{name:"postType",loadEntities:function*(){const e=yield we({path:"/wp/v2/types?context=edit"});return(0,Ce.map)(e,((e,t)=>{const n=["wp_template","wp_template_part"].includes(t);return{kind:"postType",baseURL:"/wp/v2/"+e.rest_base,baseURLParams:{context:"edit"},name:t,label:e.labels.singular_name,transientEdits:{blocks:!0,selection:!0},mergedEdits:{meta:!0},getTitle:e=>{var t;return(null==e||null===(t=e.title)||void 0===t?void 0:t.rendered)||(null==e?void 0:e.title)||(n?(0,Ce.startCase)(e.slug):String(e.id))},__unstablePrePersist:n?void 0:bt,__unstable_rest_base:e.rest_base}}))}},{name:"taxonomy",loadEntities:function*(){const e=yield we({path:"/wp/v2/taxonomies?context=edit"});return(0,Ce.map)(e,((e,t)=>({kind:"taxonomy",baseURL:"/wp/v2/"+e.rest_base,baseURLParams:{context:"edit"},name:t,label:e.labels.singular_name})))}}],bt=(e,t)=>{const n={};return"auto-draft"===(null==e?void 0:e.status)&&(t.status||n.status||(n.status="draft"),t.title&&"Auto Draft"!==t.title||n.title||null!=e&&e.title&&"Auto Draft"!==(null==e?void 0:e.title)||(n.title="")),n},yt=(e,t,n="get",r=!1)=>{const o=(0,Ce.find)(gt,{kind:e,name:t}),i="root"===e?"":(0,Ce.upperFirst)((0,Ce.camelCase)(e)),a=(0,Ce.upperFirst)((0,Ce.camelCase)(t))+(r?"s":"");return`${n}${i}${r&&o.plural?(0,Ce.upperFirst)((0,Ce.camelCase)(o.plural)):a}`};function*wt(e){let t=yield Re.a.select(He,"getEntitiesByKind",e);if(t&&0!==t.length)return t;const n=(0,Ce.find)(vt,{name:e});return n?(t=yield n.loadEntities(),yield Je(t),t):[]}var kt=function(e){return"string"==typeof e?e.split(","):Array.isArray(e)?e:null},Et=function(e){const t=new WeakMap;return e=>{let n;return t.has(e)?n=t.get(e):(n=function(e){const t={stableKey:"",page:1,perPage:10,fields:null,include:null,context:"default"},n=Object.keys(e).sort();for(let r=0;r<n.length;r++){const o=n[r];let i=e[o];switch(o){case"page":t[o]=Number(i);break;case"per_page":t.perPage=Number(i);break;case"include":t.include=kt(i).map(Number);break;case"context":t.context=i;break;default:"_fields"===o&&(t.fields=kt(i),i=t.fields.join()),t.stableKey+=(t.stableKey?"&":"")+Q("",{[o]:i}).slice(1)}}return t}(e),(0,Ce.isObjectLike)(e)&&t.set(e,n)),n}}();function _t(e){const{query:t}=e;return t?Et(t).context:"default"}const Ct=(0,Ce.flowRight)([Te((e=>"query"in e)),Ne((e=>e.query?{...e,...Et(e.query)}:e)),Ae("context"),Ae("stableKey")])(((e=null,t)=>{const{type:n,page:r,perPage:o,key:i=ht}=t;return"RECEIVE_ITEMS"!==n?e:function(e,t,n,r){if(1===n&&-1===r)return t;const o=(n-1)*r,i=Math.max(e.length,o+t.length),a=new Array(i);for(let n=0;n<i;n++){const r=n>=o&&n<o+t.length;a[n]=r?t[n-o]:e[n]}return a}(e||[],(0,Ce.map)(t.items,i),r,o)}));var xt=Se()({items:function(e={},t){switch(t.type){case"RECEIVE_ITEMS":{const n=_t(t),r=t.key||ht;return{...e,[n]:{...e[n],...t.items.reduce(((t,o)=>{var i;const a=o[r];return t[a]=function(e,t){if(!e)return t;let n=!1;const r={};for(const o in t)(0,Ce.isEqual)(e[o],t[o])?r[o]=e[o]:(n=!0,r[o]=t[o]);if(!n)return e;for(const t in e)r.hasOwnProperty(t)||(r[t]=e[t]);return r}(null==e||null===(i=e[n])||void 0===i?void 0:i[a],o),t}),{})}}}case"REMOVE_ITEMS":return(0,Ce.mapValues)(e,(e=>(0,Ce.omit)(e,t.itemIds)))}return e},itemIsComplete:function(e={},t){switch(t.type){case"RECEIVE_ITEMS":{const n=_t(t),{query:r,key:o=ht}=t,i=r?Et(r):{},a=!r||!Array.isArray(i.fields);return{...e,[n]:{...e[n],...t.items.reduce(((t,r)=>{var i;const l=r[o];return t[l]=(null==e||null===(i=e[n])||void 0===i?void 0:i[l])||a,t}),{})}}}case"REMOVE_ITEMS":return(0,Ce.mapValues)(e,(e=>(0,Ce.omit)(e,t.itemIds)))}return e},queries:(e={},t)=>{switch(t.type){case"RECEIVE_ITEMS":return Ct(e,t);case"REMOVE_ITEMS":const n=t.itemIds.reduce(((e,t)=>(e[t]=!0,e)),{});return(0,Ce.mapValues)(e,(e=>(0,Ce.mapValues)(e,(e=>(0,Ce.filter)(e,(e=>!n[e]))))));default:return e}}});function St(e,t){const n={...e};let r=n;for(const e of t)r.children={...r.children,[e]:{locks:[],children:{},...r.children[e]}},r=r.children[e];return n}function It(e,t){let n=e;for(const e of t){const t=n.children[e];if(!t)return null;n=t}return n}function Tt({exclusive:e},t){return!(!e||!t.length)||!(e||!t.filter((e=>e.exclusive)).length)}const Nt={requests:[],tree:{locks:[],children:{}}};function At(e){return(0,Ce.flowRight)([Te((t=>t.name&&t.kind&&t.name===e.name&&t.kind===e.kind)),Ne((t=>({...t,key:e.key||ht})))])(Se()({queriedData:xt,edits:(e={},t)=>{var n,r;switch(t.type){case"RECEIVE_ITEMS":if("default"!==(null!==(n=null==t||null===(r=t.query)||void 0===r?void 0:r.context)&&void 0!==n?n:"default"))return e;const o={...e};for(const e of t.items){const n=e[t.key],r=o[n];if(!r)continue;const i=Object.keys(r).reduce(((n,o)=>((0,Ce.isEqual)(r[o],(0,Ce.get)(e[o],"raw",e[o]))||t.persistedEdits&&(0,Ce.isEqual)(r[o],t.persistedEdits[o])||(n[o]=r[o]),n)),{});Object.keys(i).length?o[n]=i:delete o[n]}return o;case"EDIT_ENTITY_RECORD":const i={...e[t.recordId],...t.edits};return Object.keys(i).forEach((e=>{void 0===i[e]&&delete i[e]})),{...e,[t.recordId]:i}}return e},saving:(e={},t)=>{switch(t.type){case"SAVE_ENTITY_RECORD_START":case"SAVE_ENTITY_RECORD_FINISH":return{...e,[t.recordId]:{pending:"SAVE_ENTITY_RECORD_START"===t.type,error:t.error,isAutosave:t.isAutosave}}}return e},deleting:(e={},t)=>{switch(t.type){case"DELETE_ENTITY_RECORD_START":case"DELETE_ENTITY_RECORD_FINISH":return{...e,[t.recordId]:{pending:"DELETE_ENTITY_RECORD_START"===t.type,error:t.error}}}return e}}))}const Rt=[];let Lt;Rt.offset=0;var Pt,Ot,Dt=Se()({terms:function(e={},t){switch(t.type){case"RECEIVE_TERMS":return{...e,[t.taxonomy]:t.terms}}return e},users:function(e={byId:{},queries:{}},t){switch(t.type){case"RECEIVE_USER_QUERY":return{byId:{...e.byId,...(0,Ce.keyBy)(t.users,"id")},queries:{...e.queries,[t.queryID]:(0,Ce.map)(t.users,(e=>e.id))}}}return e},currentTheme:function(e,t){switch(t.type){case"RECEIVE_CURRENT_THEME":return t.currentTheme.stylesheet}return e},currentUser:function(e={},t){switch(t.type){case"RECEIVE_CURRENT_USER":return t.currentUser}return e},taxonomies:function(e=[],t){switch(t.type){case"RECEIVE_TAXONOMIES":return t.taxonomies}return e},themes:function(e={},t){switch(t.type){case"RECEIVE_CURRENT_THEME":return{...e,[t.currentTheme.stylesheet]:t.currentTheme}}return e},themeSupports:function(e={},t){switch(t.type){case"RECEIVE_THEME_SUPPORTS":return{...e,...t.themeSupports}}return e},entities:(e={},t)=>{const n=function(e=gt,t){switch(t.type){case"ADD_ENTITIES":return[...e,...t.entities]}return e}(e.config,t);let r=e.reducer;if(!r||n!==e.config){const e=(0,Ce.groupBy)(n,"kind");r=Se()(Object.entries(e).reduce(((e,[t,n])=>{const r=Se()(n.reduce(((e,t)=>({...e,[t.name]:At(t)})),{}));return e[t]=r,e}),{}))}const o=r(e.data,t);return o===e.data&&n===e.config&&r===e.reducer?e:{reducer:r,data:o,config:n}},undo:function(e=Rt,t){switch(t.type){case"EDIT_ENTITY_RECORD":case"CREATE_UNDO_LEVEL":let n="CREATE_UNDO_LEVEL"===t.type;const r=!n&&(t.meta.isUndo||t.meta.isRedo);let o;if(n?t=Lt:r||(Lt=Object.keys(t.edits).some((e=>!t.transientEdits[e]))?t:{...t,edits:{...Lt&&Lt.edits,...t.edits}}),r){if(o=[...e],o.offset=e.offset+(t.meta.isUndo?-1:1),!e.flattenedUndo)return o;n=!0,t=Lt}if(!t.meta.undo)return e;if(!n&&!Object.keys(t.edits).some((e=>!t.transientEdits[e])))return o=[...e],o.flattenedUndo={...e.flattenedUndo,...t.edits},o.offset=e.offset,o;o=o||e.slice(0,e.offset||void 0),o.offset=o.offset||0,o.pop(),n||o.push({kind:t.meta.undo.kind,name:t.meta.undo.name,recordId:t.meta.undo.recordId,edits:{...e.flattenedUndo,...t.meta.undo.edits}});const i=Object.values(t.meta.undo.edits).filter((e=>"function"!=typeof e)),a=Object.values(t.edits).filter((e=>"function"!=typeof e));return(0,Ie.ZP)(i,a)||o.push({kind:t.kind,name:t.name,recordId:t.recordId,edits:n?{...e.flattenedUndo,...t.edits}:t.edits}),o}return e},embedPreviews:function(e={},t){switch(t.type){case"RECEIVE_EMBED_PREVIEW":const{url:n,preview:r}=t;return{...e,[n]:r}}return e},userPermissions:function(e={},t){switch(t.type){case"RECEIVE_USER_PERMISSION":return{...e,[t.key]:t.isAllowed}}return e},autosaves:function(e={},t){switch(t.type){case"RECEIVE_AUTOSAVES":const{postId:n,autosaves:r}=t;return{...e,[n]:r}}return e},locks:function(e=Nt,t){switch(t.type){case"ENQUEUE_LOCK_REQUEST":{const{request:n}=t;return{...e,requests:[n,...e.requests]}}case"GRANT_LOCK_REQUEST":{const{lock:n,request:r}=t,{store:o,path:i}=r,a=[o,...i],l=St(e.tree,a),s=It(l,a);return s.locks=[...s.locks,n],{...e,requests:e.requests.filter((e=>e!==r)),tree:l}}case"RELEASE_LOCK":{const{lock:n}=t,r=[n.store,...n.path],o=St(e.tree,r),i=It(o,r);return i.locks=i.locks.filter((e=>e!==n)),{...e,tree:o}}}return e}});function Mt(e){return[e]}function Bt(){var e={clear:function(){e.head=null}};return e}function Ft(e,t,n){var r;if(e.length!==t.length)return!1;for(r=n;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}function zt(e,t){var n,r;function o(){n=Ot?new WeakMap:Bt()}function i(){var n,o,i,a,l,s=arguments.length;for(a=new Array(s),i=0;i<s;i++)a[i]=arguments[i];for(l=t.apply(null,a),(n=r(l)).isUniqueByDependants||(n.lastDependants&&!Ft(l,n.lastDependants,0)&&n.clear(),n.lastDependants=l),o=n.head;o;){if(Ft(o.args,a,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,a)},a[0]=null,o.args=a,n.head&&(n.head.prev=o,o.next=n.head),n.head=o,o.val}return t||(t=Mt),r=Ot?function(e){var t,r,o,i,a,l=n,s=!0;for(t=0;t<e.length;t++){if(!(a=r=e[t])||"object"!=typeof a){s=!1;break}l.has(r)?l=l.get(r):(o=new WeakMap,l.set(r,o),l=o)}return l.has(Pt)||((i=Bt()).isUniqueByDependants=s,l.set(Pt,i)),l.get(Pt)}:function(){return n},i.getDependants=t,i.clear=o,o(),i}Pt={},Ot="undefined"!=typeof WeakMap;const Ht=Object.create(null);function Vt(e,t={}){const{since:n,version:r,alternative:o,plugin:i,link:a,hint:l}=t,s=`${e} is deprecated${n?` since version ${n}`:""}${r?` and will be removed${i?` from ${i}`:""} in version ${r}`:""}.${o?` Please use ${o} instead.`:""}${a?` See: ${a}`:""}${l?` Note: ${l}`:""}`;s in Ht||((0,W.Kw)("deprecated",e,t,s),console.warn(s),Ht[s]=!0)}var Wt=n(83909),Zt=n.n(Wt);const jt=new WeakMap,Ut=zt(((e,t={})=>{let n=jt.get(e);if(n){const e=n.get(t);if(void 0!==e)return e}else n=new(Zt()),jt.set(e,n);const r=function(e,t){var n,r;const{stableKey:o,page:i,perPage:a,include:l,fields:s,context:c}=Et(t);let u;if(Array.isArray(l)&&!o?u=l:null!==(n=e.queries)&&void 0!==n&&null!==(r=n[c])&&void 0!==r&&r[o]&&(u=e.queries[c][o]),!u)return null;const d=-1===a?0:(i-1)*a,p=-1===a?u.length:Math.min(d+a,u.length),m=[];for(let t=d;t<p;t++){var f;const n=u[t];if(Array.isArray(l)&&!l.includes(n))continue;if(null===(f=e.items[c])||void 0===f||!f.hasOwnProperty(n))return null;const r=e.items[c][n];let o;if(Array.isArray(s)){o={};for(let e=0;e<s.length;e++){const t=s[e].split("."),n=(0,Ce.get)(r,t);(0,Ce.set)(o,t,n)}}else{var h;if(null===(h=e.itemIsComplete[c])||void 0===h||!h[n])return null;o=r}m.push(o)}return m}(e,t);return n.set(t,r),r})),$t=[],qt=(0,Ge.M)((e=>(t,n)=>e(He).isResolving("getEmbedPreview",[n])));function Gt(e,t){Vt("select( 'core' ).getAuthors()",{since:"5.9",alternative:"select( 'core' ).getUsers({ who: 'authors' })"});const n=Q("/wp/v2/users/?who=authors&per_page=100",t);return Yt(e,n)}function Kt(e){return e.currentUser}const Yt=zt(((e,t)=>{const n=e.users.queries[t];return(0,Ce.map)(n,(t=>e.users.byId[t]))}),((e,t)=>[e.users.queries[t],e.users.byId]));function Xt(e,t){return(0,Ce.filter)(e.entities.config,{kind:t})}function Jt(e,t,n){return(0,Ce.find)(e.entities.config,{kind:t,name:n})}function Qt(e,t,n,r,o){var i,a;const l=(0,Ce.get)(e.entities.data,[t,n,"queriedData"]);if(!l)return;const s=null!==(i=null==o?void 0:o.context)&&void 0!==i?i:"default";if(void 0===o){var c;if(null===(c=l.itemIsComplete[s])||void 0===c||!c[r])return;return l.items[s][r]}const u=null===(a=l.items[s])||void 0===a?void 0:a[r];if(u&&o._fields){const e={},t=kt(o._fields);for(let n=0;n<t.length;n++){const r=t[n].split("."),o=(0,Ce.get)(u,r);(0,Ce.set)(e,r,o)}return e}return u}function en(e,t,n,r){return Qt(e,t,n,r)}const tn=zt(((e,t,n,r)=>{const o=Qt(e,t,n,r);return o&&Object.keys(o).reduce(((e,t)=>(e[t]=(0,Ce.get)(o[t],"raw",o[t]),e)),{})}),(e=>[e.entities.data]));function nn(e,t,n,r){return Array.isArray(rn(e,t,n,r))}function rn(e,t,n,r){const o=(0,Ce.get)(e.entities.data,[t,n,"queriedData"]);return o?Ut(o,r):$t}const on=zt((e=>{const{entities:{data:t}}=e,n=[];return Object.keys(t).forEach((r=>{Object.keys(t[r]).forEach((o=>{const i=Object.keys(t[r][o].edits).filter((t=>cn(e,r,o,t)));if(i.length){const t=Jt(e,r,o);i.forEach((i=>{var a;const l=un(e,r,o,i);n.push({key:l[t.key||ht],title:(null==t||null===(a=t.getTitle)||void 0===a?void 0:a.call(t,l))||"",name:o,kind:r})}))}}))})),n}),(e=>[e.entities.data])),an=zt((e=>{const{entities:{data:t}}=e,n=[];return Object.keys(t).forEach((r=>{Object.keys(t[r]).forEach((o=>{const i=Object.keys(t[r][o].saving).filter((t=>pn(e,r,o,t)));if(i.length){const t=Jt(e,r,o);i.forEach((i=>{var a;const l=un(e,r,o,i);n.push({key:l[t.key||ht],title:(null==t||null===(a=t.getTitle)||void 0===a?void 0:a.call(t,l))||"",name:o,kind:r})}))}}))})),n}),(e=>[e.entities.data]));function ln(e,t,n,r){return(0,Ce.get)(e.entities.data,[t,n,"edits",r])}const sn=zt(((e,t,n,r)=>{const{transientEdits:o}=Jt(e,t,n)||{},i=ln(e,t,n,r)||{};return o?Object.keys(i).reduce(((e,t)=>(o[t]||(e[t]=i[t]),e)),{}):i}),(e=>[e.entities.config,e.entities.data]));function cn(e,t,n,r){return pn(e,t,n,r)||Object.keys(sn(e,t,n,r)).length>0}const un=zt(((e,t,n,r)=>({...tn(e,t,n,r),...ln(e,t,n,r)})),(e=>[e.entities.data]));function dn(e,t,n,r){const{pending:o,isAutosave:i}=(0,Ce.get)(e.entities.data,[t,n,"saving",r],{});return Boolean(o&&i)}function pn(e,t,n,r){return(0,Ce.get)(e.entities.data,[t,n,"saving",r,"pending"],!1)}function mn(e,t,n,r){return(0,Ce.get)(e.entities.data,[t,n,"deleting",r,"pending"],!1)}function fn(e,t,n,r){return(0,Ce.get)(e.entities.data,[t,n,"saving",r,"error"])}function hn(e,t,n,r){return(0,Ce.get)(e.entities.data,[t,n,"deleting",r,"error"])}function gn(e){return e.undo.offset}function vn(e){return e.undo[e.undo.length-2+gn(e)]}function bn(e){return e.undo[e.undo.length+gn(e)]}function yn(e){return Boolean(vn(e))}function wn(e){return Boolean(bn(e))}function kn(e){return e.themes[e.currentTheme]}function En(e){return e.themeSupports}function _n(e,t){return e.embedPreviews[t]}function Cn(e,t){const n=e.embedPreviews[t],r='<a href="'+t+'">'+t+"</a>";return!!n&&n.html===r}function xn(e,t,n,r){const o=(0,Ce.compact)([t,n,r]).join("/");return(0,Ce.get)(e,["userPermissions",o])}function Sn(e,t,n,r){const o=Jt(e,t,n);return!!o&&xn(e,"update",o.__unstable_rest_base,r)}function In(e,t,n){return e.autosaves[n]}function Tn(e,t,n,r){if(void 0===r)return;const o=e.autosaves[n];return(0,Ce.find)(o,{author:r})}const Nn=(0,Ge.M)((e=>(t,n,r)=>e(He).hasFinishedResolution("getAutosaves",[n,r]))),An=zt((()=>[]),(e=>[e.undo.length,e.undo.offset,e.undo.flattenedUndo]));function Rn(e,t){const n=rn(e,"postType","wp_template",{"find-template":t}),r=null!=n&&n.length?n[0]:null;return r?un(e,"postType","wp_template",r.id):r}var Ln=(e,t)=>function*(...n){(yield Re.a.select(He,"hasStartedResolution",t,n))||(yield*e(...n))};function*Pn(e){const t=Q("/wp/v2/users/?who=authors&per_page=100",e),n=yield we({path:t});yield Ye(t,n)}function*On(){const e=yield we({path:"/wp/v2/users/me"});yield Xe(e)}function*Dn(e,t,n="",r){const o=yield wt(e),i=(0,Ce.find)(o,{kind:e,name:t});if(!i)return;const a=yield*Ve(He,["entities","data",e,t,n],{exclusive:!1});try{void 0!==r&&r._fields&&(r={...r,_fields:(0,Ce.uniq)([...kt(r._fields)||[],i.key||ht]).join()});const o=Q(i.baseURL+"/"+n,{...i.baseURLParams,...r});if(void 0!==r&&(r={...r,include:[n]},yield Re.a.select(He,"hasEntityRecords",e,t,r)))return;const l=yield we({path:o});yield Qe(e,t,l,r)}catch(e){}finally{yield*Ze(a)}}const Mn=Ln(Dn,"getEntityRecord"),Bn=Ln(Mn,"getRawEntityRecord");function*Fn(e,t,n={}){const r=yield wt(e),o=(0,Ce.find)(r,{kind:e,name:t});if(!o)return;const i=yield*Ve(He,["entities","data",e,t],{exclusive:!1});try{var a;n._fields&&(n={...n,_fields:(0,Ce.uniq)([...kt(n._fields)||[],o.key||ht]).join()});const r=Q(o.baseURL,{...o.baseURLParams,...n});let l=Object.values(yield we({path:r}));if(n._fields&&(l=l.map((e=>(n._fields.split(",").forEach((t=>{e.hasOwnProperty(t)||(e[t]=void 0)})),e)))),yield Qe(e,t,l,n),!(null!==(a=n)&&void 0!==a&&a._fields||n.context)){const n=o.key||ht,r=l.filter((e=>e[n])).map((r=>[e,t,r[n]]));yield{type:"START_RESOLUTIONS",selectorName:"getEntityRecord",args:r},yield{type:"FINISH_RESOLUTIONS",selectorName:"getEntityRecord",args:r}}}finally{yield*Ze(i)}}function*zn(){const e=yield we({path:"/wp/v2/themes?status=active"});yield et(e[0])}function*Hn(){const e=yield we({path:"/wp/v2/themes?status=active"});yield tt(e[0].theme_supports)}function*Vn(e){try{const t=yield we({path:Q("/oembed/1.0/proxy",{url:e})});yield nt(e,t)}catch(t){yield nt(e,!1)}}function*Wn(e,t,n){const r={create:"POST",read:"GET",update:"PUT",delete:"DELETE"}[e];if(!r)throw new Error(`'${e}' is not a valid action.`);const o=n?`/wp/v2/${t}/${n}`:`/wp/v2/${t}`;let i,a;try{i=yield we({path:o,method:n?"GET":"OPTIONS",parse:!1})}catch(e){return}a=(0,Ce.hasIn)(i,["headers","get"])?i.headers.get("allow"):(0,Ce.get)(i,["headers","Allow"],"");const l=(0,Ce.compact)([e,t,n]).join("/"),s=(0,Ce.includes)(a,r);yield mt(l,s)}function*Zn(e,t,n){const r=yield wt(e),o=(0,Ce.find)(r,{kind:e,name:t});if(!o)return;const i=o.__unstable_rest_base;yield Wn("update",i,n)}function*jn(e,t){const{rest_base:n}=yield Re.a.resolveSelect(He,"getPostType",e),r=yield we({path:`/wp/v2/${n}/${t}/autosaves?context=edit`});r&&r.length&&(yield ft(t,r))}function*Un(e,t){yield Re.a.resolveSelect(He,"getAutosaves",e,t)}function*$n(e){let t;try{t=yield(n=Q(e,{"_wp-find-template":!0}),{type:"REGULAR_FETCH",url:n})}catch(e){}var n;if(!t)return;yield Dn("postType","wp_template",t.id);const r=yield Re.a.select(He,"getEntityRecord","postType","wp_template",t.id);r&&(yield Qe("postType","wp_template",[r],{"find-template":e}))}function qn(e){return e.locks.requests}function Gn(e,t,n,{exclusive:r}){const o=[t,...n],i=e.locks.tree;for(const e of function*(e,t){let n=e;yield n;for(const e of t){const t=n.children[e];if(!t)break;yield t,n=t}}(i,o))if(Tt({exclusive:r},e.locks))return!1;const a=It(i,o);if(!a)return!0;for(const e of function*(e){const t=Object.values(e.children);for(;t.length;){const e=t.pop();yield e,t.push(...Object.values(e.children))}}(a))if(Tt({exclusive:r},e.locks))return!1;return!0}Fn.shouldInvalidate=(e,t,n)=>("RECEIVE_ITEMS"===e.type||"REMOVE_ITEMS"===e.type)&&e.invalidateCache&&t===e.kind&&n===e.name,$n.shouldInvalidate=e=>("RECEIVE_ITEMS"===e.type||"REMOVE_ITEMS"===e.type)&&e.invalidateCache&&"postType"===e.kind&&"wp_template"===e.name;const Kn=gt.reduce(((e,t)=>{const{kind:n,name:r}=t;return e[yt(n,r)]=(e,t,o)=>Qt(e,n,r,t,o),e[yt(n,r,"get",!0)]=(e,...t)=>rn(e,n,r,...t),e}),{}),Yn=gt.reduce(((e,t)=>{const{kind:n,name:r}=t;e[yt(n,r)]=(e,t)=>Dn(n,r,e,t);const o=yt(n,r,"get",!0);return e[o]=(...e)=>Fn(n,r,...e),e[o].shouldInvalidate=(e,...t)=>Fn.shouldInvalidate(e,n,r,...t),e}),{}),Xn=gt.reduce(((e,t)=>{const{kind:n,name:r}=t;return e[yt(n,r,"save")]=e=>st(n,r,e),e[yt(n,r,"delete")]=(e,t)=>rt(n,r,e,t),e}),{}),Jn={reducer:Dt,controls:{...Ke,...Ee},actions:{...o,...Xn,...r},selectors:{...i,...Kn,...l},resolvers:{...a,...Yn}},Qn=(0,ye.Z)(He,Jn);(0,be.z2)(Qn);var er=n(94878),tr=n(41882),nr=n(87462),rr=(0,_.createContext)({registerSlot:()=>{},unregisterSlot:()=>{},registerFill:()=>{},unregisterFill:()=>{},getSlot:()=>{},getFills:()=>{},subscribe:()=>{}});function or({name:e,children:t,registerFill:n,unregisterFill:r}){const o=(e=>{const{getSlot:t,subscribe:n}=(0,_.useContext)(rr),[r,o]=(0,_.useState)(t(e));return(0,_.useEffect)((()=>(o(t(e)),n((()=>{o(t(e))})))),[e]),r})(e),i=(0,_.useRef)({name:e,children:t});return(0,_.useLayoutEffect)((()=>(n(e,i.current),()=>r(e,i.current))),[]),(0,_.useLayoutEffect)((()=>{i.current.children=t,o&&o.forceUpdate()}),[t]),(0,_.useLayoutEffect)((()=>{e!==i.current.name&&(r(i.current.name,i.current),i.current.name=e,n(e,i.current))}),[e]),o&&o.node?((0,Ce.isFunction)(t)&&(t=t(o.props.fillProps)),(0,x.createPortal)(t,o.node)):null}var ir=e=>(0,_.createElement)(rr.Consumer,null,(({registerFill:t,unregisterFill:n})=>(0,_.createElement)(or,(0,nr.Z)({},e,{registerFill:t,unregisterFill:n}))));const ar=e=>!(0,Ce.isNumber)(e)&&((0,Ce.isString)(e)||(0,Ce.isArray)(e)?!e.length:!e);class lr extends _.Component{constructor(){super(...arguments),this.isUnmounted=!1,this.bindNode=this.bindNode.bind(this)}componentDidMount(){const{registerSlot:e}=this.props;e(this.props.name,this)}componentWillUnmount(){const{unregisterSlot:e}=this.props;this.isUnmounted=!0,e(this.props.name,this)}componentDidUpdate(e){const{name:t,unregisterSlot:n,registerSlot:r}=this.props;e.name!==t&&(n(e.name),r(t,this))}bindNode(e){this.node=e}forceUpdate(){this.isUnmounted||super.forceUpdate()}render(){const{children:e,name:t,fillProps:n={},getFills:r}=this.props,o=(0,Ce.map)(r(t,this),(e=>{const t=(0,Ce.isFunction)(e.children)?e.children(n):e.children;return _.Children.map(t,((e,t)=>{if(!e||(0,Ce.isString)(e))return e;const n=e.key||t;return(0,_.cloneElement)(e,{key:n})}))})).filter((0,Ce.negate)(ar));return(0,_.createElement)(_.Fragment,null,(0,Ce.isFunction)(e)?e(o):o)}}var sr=e=>(0,_.createElement)(rr.Consumer,null,(({registerSlot:t,unregisterSlot:n,getFills:r})=>(0,_.createElement)(lr,(0,nr.Z)({},e,{registerSlot:t,unregisterSlot:n,getFills:r})))),cr=n(34155),ur=(0,_.createContext)({slots:{},fills:{},registerSlot:()=>{void 0!==cr&&cr.env},updateSlot:()=>{},unregisterSlot:()=>{},registerFill:()=>{},unregisterFill:()=>{}});function dr(e){const t=(0,_.useContext)(ur),n=t.slots[e]||{},r=t.fills[e],o=(0,_.useMemo)((()=>r||[]),[r]);return{...n,updateSlot:(0,_.useCallback)((n=>{t.updateSlot(e,n)}),[e,t.updateSlot]),unregisterSlot:(0,_.useCallback)((n=>{t.unregisterSlot(e,n)}),[e,t.unregisterSlot]),fills:o,registerFill:(0,_.useCallback)((n=>{t.registerFill(e,n)}),[e,t.registerFill]),unregisterFill:(0,_.useCallback)((n=>{t.unregisterFill(e,n)}),[e,t.unregisterFill])}}function pr(){const[,e]=(0,_.useState)({}),t=(0,_.useRef)(!0);return(0,_.useEffect)((()=>()=>{t.current=!1}),[]),()=>{t.current&&e({})}}function mr({name:e,children:t}){const n=dr(e),r=(0,_.useRef)({rerender:pr()});return(0,_.useEffect)((()=>(n.registerFill(r),()=>{n.unregisterFill(r)})),[n.registerFill,n.unregisterFill]),n.ref&&n.ref.current?("function"==typeof t&&(t=t(n.fillProps)),(0,x.createPortal)(t,n.ref.current)):null}function fr(e,t){"function"==typeof e?e(t):e&&e.hasOwnProperty("current")&&(e.current=t)}function hr(e){const t=(0,_.useRef)(),n=(0,_.useRef)(!1),r=(0,_.useRef)([]),o=(0,_.useRef)(e);return o.current=e,(0,_.useLayoutEffect)((()=>{!1===n.current&&e.forEach(((e,n)=>{const o=r.current[n];e!==o&&(fr(o,null),fr(e,t.current))})),r.current=e}),e),(0,_.useLayoutEffect)((()=>{n.current=!1})),(0,_.useCallback)((e=>{fr(t,e),n.current=!0;const i=e?o.current:r.current;for(const t of i)fr(t,e)}),[])}var gr=(0,_.forwardRef)((function({name:e,fillProps:t={},as:n="div",...r},o){const i=(0,_.useContext)(ur),a=(0,_.useRef)();return(0,_.useLayoutEffect)((()=>(i.registerSlot(e,a,t),()=>{i.unregisterSlot(e,a)})),[i.registerSlot,i.unregisterSlot,e]),(0,_.useLayoutEffect)((()=>{i.updateSlot(e,t)})),(0,_.createElement)(n,(0,nr.Z)({ref:hr([o,a])},r))}));function vr({children:e}){const t=function(){const[e,t]=(0,_.useState)({}),[n,r]=(0,_.useState)({}),o=(0,_.useCallback)(((e,n,r)=>{t((t=>{const o=t[e]||{};return{...t,[e]:{...o,ref:n||o.ref,fillProps:r||o.fillProps||{}}}}))}),[]),i=(0,_.useCallback)(((e,n)=>{t((t=>{const{[e]:r,...o}=t;return(null==r?void 0:r.ref)===n?o:t}))}),[]),a=(0,_.useCallback)(((t,r)=>{const o=e[t];if(o&&!(0,Ie.ZP)(o.fillProps,r)){o.fillProps=r;const e=n[t];e&&e.map((e=>e.current.rerender()))}}),[e,n]),l=(0,_.useCallback)(((e,t)=>{r((n=>({...n,[e]:[...n[e]||[],t]})))}),[]),s=(0,_.useCallback)(((e,t)=>{r((n=>n[e]?{...n,[e]:n[e].filter((e=>e!==t))}:n))}),[]);return(0,_.useMemo)((()=>({slots:e,fills:n,registerSlot:o,updateSlot:a,unregisterSlot:i,registerFill:l,unregisterFill:s})),[e,n,o,a,i,l,s])}();return(0,_.createElement)(ur.Provider,{value:t},e)}class br extends _.Component{constructor(){super(...arguments),this.registerSlot=this.registerSlot.bind(this),this.registerFill=this.registerFill.bind(this),this.unregisterSlot=this.unregisterSlot.bind(this),this.unregisterFill=this.unregisterFill.bind(this),this.getSlot=this.getSlot.bind(this),this.getFills=this.getFills.bind(this),this.hasFills=this.hasFills.bind(this),this.subscribe=this.subscribe.bind(this),this.slots={},this.fills={},this.listeners=[],this.contextValue={registerSlot:this.registerSlot,unregisterSlot:this.unregisterSlot,registerFill:this.registerFill,unregisterFill:this.unregisterFill,getSlot:this.getSlot,getFills:this.getFills,hasFills:this.hasFills,subscribe:this.subscribe}}registerSlot(e,t){const n=this.slots[e];this.slots[e]=t,this.triggerListeners(),this.forceUpdateSlot(e),n&&n.forceUpdate()}registerFill(e,t){this.fills[e]=[...this.fills[e]||[],t],this.forceUpdateSlot(e)}unregisterSlot(e,t){this.slots[e]===t&&(delete this.slots[e],this.triggerListeners())}unregisterFill(e,t){this.fills[e]=(0,Ce.without)(this.fills[e],t),this.forceUpdateSlot(e)}getSlot(e){return this.slots[e]}getFills(e,t){return this.slots[e]!==t?[]:this.fills[e]}hasFills(e){return this.fills[e]&&!!this.fills[e].length}forceUpdateSlot(e){const t=this.getSlot(e);t&&t.forceUpdate()}triggerListeners(){this.listeners.forEach((e=>e()))}subscribe(e){return this.listeners.push(e),()=>{this.listeners=(0,Ce.without)(this.listeners,e)}}render(){return(0,_.createElement)(rr.Provider,{value:this.contextValue},this.props.children)}}function yr(e){return(0,_.createElement)(_.Fragment,null,(0,_.createElement)(ir,e),(0,_.createElement)(mr,e))}const wr=(0,_.forwardRef)((({bubblesVirtually:e,...t},n)=>e?(0,_.createElement)(gr,(0,nr.Z)({},t,{ref:n})):(0,_.createElement)(sr,t)));function kr({children:e,...t}){return(0,_.createElement)(br,t,(0,_.createElement)(vr,null,e))}function Er(e){const t=t=>(0,_.createElement)(yr,(0,nr.Z)({name:e},t));t.displayName=e+"Fill";const n=t=>(0,_.createElement)(wr,(0,nr.Z)({name:e},t));return n.displayName=e+"Slot",n.__unstableName=e,{Fill:t,Slot:n}}var _r=n(89457),Cr=n.n(_r);function xr(e){if(!e.collapsed){const t=Array.from(e.getClientRects());if(1===t.length)return t[0];const n=t.filter((({width:e})=>e>1));if(0===n.length)return e.getBoundingClientRect();if(1===n.length)return n[0];let{top:r,bottom:o,left:i,right:a}=n[0];for(const{top:e,bottom:t,left:l,right:s}of n)e<r&&(r=e),t>o&&(o=t),l<i&&(i=l),s>a&&(a=s);return new window.DOMRect(i,r,a-i,o-r)}const{startContainer:t}=e,{ownerDocument:n}=t;if("BR"===t.nodeName){const{parentNode:r}=t,o=Array.from(r.childNodes).indexOf(t);(e=n.createRange()).setStart(r,o),e.setEnd(r,o)}let r=e.getClientRects()[0];if(!r){const t=n.createTextNode("");(e=e.cloneRange()).insertNode(t),r=e.getClientRects()[0],t.parentNode,t.parentNode.removeChild(t)}return r}function Sr(e){const[t,n]=(0,_.useState)((()=>!(!e||"undefined"==typeof window||!window.matchMedia(e).matches)));return(0,_.useEffect)((()=>{if(!e)return;const t=()=>n(window.matchMedia(e).matches);t();const r=window.matchMedia(e);return r.addListener(t),()=>{r.removeListener(t)}}),[e]),!!e&&t}const Ir={huge:1440,wide:1280,large:960,medium:782,small:600,mobile:480},Tr={">=":"min-width","<":"max-width"},Nr={">=":(e,t)=>t>=e,"<":(e,t)=>t<e},Ar=(0,_.createContext)(null),Rr=(e,t=">=")=>{const n=(0,_.useContext)(Ar),r=Sr(!n&&`(${Tr[t]}: ${Ir[e]}px)`||void 0);return n?Nr[t](Ir[e],n):r};Rr.__experimentalWidthProvider=Ar.Provider;var Lr=Rr,Pr=n(5464),Or=n.n(Pr),Dr=Or();function Mr(e=null){if(!e){if("undefined"==typeof window)return!1;e=window}const{platform:t}=e.navigator;return-1!==t.indexOf("Mac")||(0,Ce.includes)(["iPad","iPhone"],t)}const Br=13,Fr=27,zr=37,Hr=38,Vr=39,Wr=40,Zr="alt",jr="ctrl",Ur="meta",$r="shift",qr={primary:e=>e()?[Ur]:[jr],primaryShift:e=>e()?[$r,Ur]:[jr,$r],primaryAlt:e=>e()?[Zr,Ur]:[jr,Zr],secondary:e=>e()?[$r,Zr,Ur]:[jr,$r,Zr],access:e=>e()?[jr,Zr]:[$r,Zr],ctrl:()=>[jr],alt:()=>[Zr],ctrlShift:()=>[jr,$r],shift:()=>[$r],shiftAlt:()=>[$r,Zr],undefined:()=>[]},Gr=(0,Ce.mapValues)(qr,(e=>(t,n=Mr)=>[...e(n),t.toLowerCase()].join("+"))),Kr=(0,Ce.mapValues)(qr,(e=>(t,n=Mr)=>{const r=n(),o={[Zr]:r?"⌥":"Alt",[jr]:r?"⌃":"Ctrl",[Ur]:"⌘",[$r]:r?"⇧":"Shift"};return[...e(n).reduce(((e,t)=>{const n=(0,Ce.get)(o,t,t);return r?[...e,n]:[...e,n,"+"]}),[]),(0,Ce.capitalize)(t)]})),Yr=(0,Ce.mapValues)(Kr,(e=>(t,n=Mr)=>e(t,n).join(""))),Xr=(0,Ce.mapValues)(qr,(e=>(t,n=Mr)=>{const r=n(),o={[$r]:"Shift",[Ur]:r?"Command":"Control",[jr]:"Control",[Zr]:r?"Option":"Alt",",":U("Comma"),".":U("Period"),"`":U("Backtick")};return[...e(n),t].map((e=>(0,Ce.capitalize)((0,Ce.get)(o,e,e)))).join(r?" ":" + ")})),Jr=(0,Ce.mapValues)(qr,(e=>(t,n,r=Mr)=>{const o=e(r),i=function(e){return[Zr,jr,Ur,$r].filter((t=>e[`${t}Key`]))}(t);if((0,Ce.xor)(o,i).length)return!1;let a=t.key.toLowerCase();return n?(t.altKey&&(a=String.fromCharCode(t.keyCode).toLowerCase()),"del"===n&&(n="delete"),a===n):(0,Ce.includes)(o,a)})),Qr=["[tabindex]","a[href]","button:not([disabled])",'input:not([type="hidden"]):not([disabled])',"select:not([disabled])","textarea:not([disabled])","iframe","object","embed","area[href]","[contenteditable]:not([contenteditable=false])"].join(",");function eo(e){return e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0}function to(e){const t=e.querySelectorAll(Qr);return Array.from(t).filter((e=>{if(!eo(e)||function(e){return"iframe"===e.nodeName.toLowerCase()&&"-1"===e.getAttribute("tabindex")}(e))return!1;const{nodeName:t}=e;return"AREA"!==t||function(e){const t=e.closest("map[name]");if(!t)return!1;const n=e.ownerDocument.querySelector('img[usemap="#'+t.name+'"]');return!!n&&eo(n)}(e)}))}function no(e){const t=e.getAttribute("tabindex");return null===t?0:parseInt(t,10)}function ro(e){return-1!==no(e)}function oo(e,t){return{element:e,index:t}}function io(e){return e.element}function ao(e,t){const n=no(e.element),r=no(t.element);return n===r?e.index-t.index:n-r}function lo(e){return e.filter(ro).map(oo).sort(ao).map(io).reduce(function(){const e={};return function(t,n){const{nodeName:r,type:o,checked:i,name:a}=n;if("INPUT"!==r||"radio"!==o||!a)return t.concat(n);const l=e.hasOwnProperty(a);if(!i&&l)return t;if(l){const n=e[a];t=(0,Ce.without)(t,n)}return e[a]=n,t.concat(n)}}(),[])}function so(e){return lo(to(e))}function co(e){const t=to(e.ownerDocument.body),n=t.indexOf(e);return t.length=n,(0,Ce.last)(lo(t))}function uo(e){const t=to(e.ownerDocument.body),n=t.indexOf(e),r=t.slice(n+1).filter((t=>!e.contains(t)));return(0,Ce.first)(lo(r))}const po={focusable:s,tabbable:c};var mo=function(){return(0,_.useCallback)((e=>{e&&e.addEventListener("keydown",(t=>{if(!(t instanceof window.KeyboardEvent))return;if(9!==t.keyCode)return;const n=po.tabbable.find(e);if(!n.length)return;const r=n[0],o=n[n.length-1];t.shiftKey&&t.target===r?(t.preventDefault(),o.focus()):(t.shiftKey||t.target!==o)&&n.includes(t.target)||(t.preventDefault(),r.focus())}))}),[])};function fo(e="firstElement"){const t=(0,_.useRef)(e);return(0,_.useEffect)((()=>{t.current=e}),[e]),(0,_.useCallback)((e=>{var n,r;if(!e||!1===t.current)return;if(e.contains(null!==(n=null===(r=e.ownerDocument)||void 0===r?void 0:r.activeElement)&&void 0!==n?n:null))return;let o=e;if("firstElement"===t.current){const t=po.tabbable.find(e)[0];t&&(o=t)}o.focus()}),[])}var ho=function(e){const t=(0,_.useRef)(null),n=(0,_.useRef)(null),r=(0,_.useRef)(e);return(0,_.useEffect)((()=>{r.current=e}),[e]),(0,_.useCallback)((e=>{if(e){if(t.current=e,n.current)return;n.current=e.ownerDocument.activeElement}else if(n.current){var o,i,a;const e=null===(o=t.current)||void 0===o?void 0:o.contains(null===(i=t.current)||void 0===i?void 0:i.ownerDocument.activeElement);if(null!==(a=t.current)&&void 0!==a&&a.isConnected&&!e)return;var l;r.current?r.current():null===(l=n.current)||void 0===l||l.focus()}}),[])};const go=["button","submit"];function vo(e){const t=(0,_.useRef)(e);(0,_.useEffect)((()=>{t.current=e}),[e]);const n=(0,_.useRef)(!1),r=(0,_.useRef)(),o=(0,_.useCallback)((()=>{clearTimeout(r.current)}),[]);(0,_.useEffect)((()=>()=>o()),[]),(0,_.useEffect)((()=>{e||o()}),[e,o]);const i=(0,_.useCallback)((e=>{const{type:t,target:r}=e;(0,Ce.includes)(["mouseup","touchend"],t)?n.current=!1:function(e){if(!(e instanceof window.HTMLElement))return!1;switch(e.nodeName){case"A":case"BUTTON":return!0;case"INPUT":return(0,Ce.includes)(go,e.type)}return!1}(r)&&(n.current=!0)}),[]),a=(0,_.useCallback)((e=>{e.persist(),n.current||(r.current=setTimeout((()=>{document.hasFocus()?"function"==typeof t.current&&t.current(e):e.preventDefault()}),0))}),[]);return{onFocus:o,onMouseDown:i,onMouseUp:i,onTouchStart:i,onTouchEnd:i,onBlur:a}}const bo=e=>(0,_.createElement)("g",e),yo=e=>(0,_.createElement)("path",e),wo=e=>(0,_.createElement)("rect",e),ko=({className:e,isPressed:t,...n})=>{const r={...n,className:Cr()(e,{"is-pressed":t})||void 0,role:"img","aria-hidden":!0,focusable:!1};return(0,_.createElement)("svg",r)};var Eo=(0,_.createElement)(ko,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,_.createElement)(yo,{d:"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"}));function _o(e,t,n){const{defaultView:r}=t,{frameElement:o}=r;if(!o||t===n.ownerDocument)return e;const i=o.getBoundingClientRect();return new r.DOMRect(e.left+i.left,e.top+i.top,e.width,e.height)}var Co=n(51163);function xo(e,t,n){const r=(0,Co.Pr)((()=>(0,Ce.debounce)(e,t,n)),[e,t,n]);return(0,_.useEffect)((()=>()=>r.cancel()),[r]),r}var So=function({shortcut:e,className:t}){if(!e)return null;let n,r;return(0,Ce.isString)(e)&&(n=e),(0,Ce.isObject)(e)&&(n=e.display,r=e.ariaLabel),(0,_.createElement)("span",{className:t,"aria-label":r},n)};const Io=(0,_.createElement)("div",{className:"event-catcher"}),To=({eventHandlers:e,child:t,childrenWithPopover:n})=>(0,_.cloneElement)((0,_.createElement)("span",{className:"disabled-element-wrapper"},(0,_.cloneElement)(Io,e),(0,_.cloneElement)(t,{children:n}),","),e),No=({child:e,eventHandlers:t,childrenWithPopover:n})=>(0,_.cloneElement)(e,{...t,children:n}),Ao=({grandchildren:e,isOver:t,position:n,text:r,shortcut:o})=>function(...e){return e.reduce(((e,t,n)=>(_.Children.forEach(t,((t,r)=>{t&&"string"!=typeof t&&(t=(0,_.cloneElement)(t,{key:[n,r].join()})),e.push(t)})),e)),[])}(e,t&&(0,_.createElement)(ia,{focusOnMount:!1,position:n,className:"components-tooltip","aria-hidden":"true",animate:!1,noArrow:!0},r,(0,_.createElement)(So,{className:"components-tooltip__shortcut",shortcut:o}))),Ro=(e,t,n)=>{if(1!==_.Children.count(e))return;const r=_.Children.only(e);"function"==typeof r.props[t]&&r.props[t](n)};var Lo=function({children:e,position:t,text:n,shortcut:r}){const[o,i]=(0,_.useState)(!1),[a,l]=(0,_.useState)(!1),s=xo(l,700),c=t=>{Ro(e,"onMouseDown",t),document.addEventListener("mouseup",p),i(!0)},u=t=>{Ro(e,"onMouseUp",t),document.removeEventListener("mouseup",p),i(!1)},d=e=>"mouseUp"===e?u:"mouseDown"===e?c:void 0,p=d("mouseUp"),m=(t,n)=>r=>{if(Ro(e,t,r),r.currentTarget.disabled)return;if("focus"===r.type&&o)return;s.cancel();const i=(0,Ce.includes)(["focus","mouseenter"],r.type);i!==a&&(n?s(i):l(i))},f=()=>{s.cancel(),document.removeEventListener("mouseup",p)};if((0,_.useEffect)((()=>f),[]),1!==_.Children.count(e))return e;const h={onMouseEnter:m("onMouseEnter",!0),onMouseLeave:m("onMouseLeave"),onClick:m("onClick"),onFocus:m("onFocus"),onBlur:m("onBlur"),onMouseDown:d("mouseDown")},g=_.Children.only(e),{children:v,disabled:b}=g.props;return(b?To:No)({child:g,eventHandlers:h,childrenWithPopover:Ao({grandchildren:v,isOver:a,position:t,text:n,shortcut:r})})},Po=function({icon:e,className:t,...n}){const r=["dashicon","dashicons","dashicons-"+e,t].filter(Boolean).join(" ");return(0,_.createElement)("span",(0,nr.Z)({className:r},n))},Oo=function({icon:e=null,size:t=24,...n}){if("string"==typeof e)return(0,_.createElement)(Po,(0,nr.Z)({icon:e},n));if((0,_.isValidElement)(e)&&Po===e.type)return(0,_.cloneElement)(e,{...n});if("function"==typeof e)return e.prototype instanceof _.Component?(0,_.createElement)(e,{size:t,...n}):e({size:t,...n});if(e&&("svg"===e.type||e.type===ko)){const r={width:t,height:t,...e.props,...n};return(0,_.createElement)(ko,r)}return(0,_.isValidElement)(e)?(0,_.cloneElement)(e,{size:t,...n}):e},Do=n(34155);const Mo=(0,_.createContext)({}),Bo=()=>(0,_.useContext)(Mo);function Fo({value:e}){const t=Bo(),n=(0,_.useRef)(e);return function(t,r){const o=(0,_.useRef)(!1);(0,_.useEffect)((()=>{o.current?(0,Ce.isEqual)(n.current,e)&&n.current!==e&&void 0!==Do&&Do.env:o.current=!0}),r)}(0,[e]),(0,_.useMemo)((()=>(0,Ce.merge)((0,Ce.cloneDeep)(t),e)),[t,e])}(0,_.memo)((({children:e,value:t})=>{const n=Fo({value:t});return(0,_.createElement)(Mo.Provider,{value:n},e)}));const zo=T()((function(e){return`components-${(0,Ce.kebabCase)(e)}`}));var Ho=n(34759);function Vo(e,t,n){var r="";return n.split(" ").forEach((function(n){void 0!==e[n]?t.push(e[n]+";"):r+=n+" "})),r}var Wo=function(e,t,n){var r=e.key+"-"+t.name;if(!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles),void 0===e.inserted[t.name]){var o=t;do{e.insert(t===o?"."+r:"",o,e.sheet,!0),o=o.next}while(void 0!==o)}},Zo=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(t);try{n.insertRule(e,n.cssRules.length)}catch(e){}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach((function(e){return e.parentNode.removeChild(e)})),this.tags=[],this.ctr=0},e}(),jo=n(46411),Uo=n(26686),$o=n(19685),qo=n(20211),Go=n(92190),Ko=new WeakMap,Yo=function(e){if("rule"===e.type&&e.parent&&e.length){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||Ko.get(n))&&!r){Ko.set(e,!0);for(var o=[],i=function(e,t){return(0,jo.cE)(function(e,t){var n=-1,r=44;do{switch((0,jo.r)(r)){case 0:38===r&&12===(0,jo.fj)()&&(t[n]=1),e[n]+=(0,jo.QU)(jo.FK-1);break;case 2:e[n]+=(0,jo.iF)(r);break;case 4:if(44===r){e[++n]=58===(0,jo.fj)()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=(0,Uo.Dp)(r)}}while(r=(0,jo.lp)());return e}((0,jo.un)(e),t))}(t,o),a=n.props,l=0,s=0;l<i.length;l++)for(var c=0;c<a.length;c++,s++)e.props[s]=o[l]?i[l].replace(/&\f/g,a[c]):a[c]+" "+i[l]}}},Xo=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}},Jo=[$o.Ji],Qo=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,(function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))}))}var r,o,i=e.stylisPlugins||Jo,a={},l=[];r=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n<t.length;n++)a[t[n]]=!0;l.push(e)}));var s,c=[Yo,Xo],u=[qo.P,(0,$o.cD)((function(e){s.insert(e)}))],d=(0,$o.qR)(c.concat(i,u));o=function(e,t,n,r){s=n,function(e){(0,qo.q)((0,Go.MY)(e),d)}(e?e+"{"+t.styles+"}":t.styles),r&&(p.inserted[t.name]=!0)};var p={key:t,sheet:new Zo({key:t,container:r,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend}),nonce:e.nonce,inserted:a,registered:{},insert:o};return p.sheet.hydrate(l),p},ei=n(62506),ti=n(40351),ni=n(12717),ri=/[A-Z]|^ms/g,oi=/_EMO_([^_]+?)_([^]*?)_EMO_/g,ii=function(e){return 45===e.charCodeAt(1)},ai=function(e){return null!=e&&"boolean"!=typeof e},li=(0,ni.Z)((function(e){return ii(e)?e:e.replace(ri,"-$&").toLowerCase()})),si=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(oi,(function(e,t,n){return ui={name:t,styles:n,next:ui},t}))}return 1===ti.Z[e]||ii(e)||"number"!=typeof t||0===t?t:t+"px"};function ci(e,t,n){if(null==n)return"";if(void 0!==n.__emotion_styles)return n;switch(typeof n){case"boolean":return"";case"object":if(1===n.anim)return ui={name:n.name,styles:n.styles,next:ui},n.name;if(void 0!==n.styles){var r=n.next;if(void 0!==r)for(;void 0!==r;)ui={name:r.name,styles:r.styles,next:ui},r=r.next;return n.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=ci(e,t,n[o])+";";else for(var i in n){var a=n[i];if("object"!=typeof a)null!=t&&void 0!==t[a]?r+=i+"{"+t[a]+"}":ai(a)&&(r+=li(i)+":"+si(i,a)+";");else if(!Array.isArray(a)||"string"!=typeof a[0]||null!=t&&void 0!==t[a[0]]){var l=ci(e,t,a);switch(i){case"animation":case"animationName":r+=li(i)+":"+l+";";break;default:r+=i+"{"+l+"}"}}else for(var s=0;s<a.length;s++)ai(a[s])&&(r+=li(i)+":"+si(i,a[s])+";")}return r}(e,t,n);case"function":if(void 0!==e){var o=ui,i=n(e);return ui=o,ci(e,t,i)}}if(null==t)return n;var a=t[n];return void 0!==a?a:n}var ui,di=/label:\s*([^\s;\n{]+)\s*(;|$)/g,pi=function(e,t,n){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var r=!0,o="";ui=void 0;var i=e[0];null==i||void 0===i.raw?(r=!1,o+=ci(n,t,i)):o+=i[0];for(var a=1;a<e.length;a++)o+=ci(n,t,e[a]),r&&(o+=i[a]);di.lastIndex=0;for(var l,s="";null!==(l=di.exec(o));)s+="-"+l[1];return{name:(0,ei.Z)(o)+s,styles:o,next:ui}};function mi(e,t){if(void 0===e.inserted[t.name])return e.insert("",t,e.sheet,!0)}function fi(e,t,n){var r=[],o=Vo(e,r,n);return r.length<2?n:o+t(r)}var hi=function e(t){for(var n="",r=0;r<t.length;r++){var o=t[r];if(null!=o){var i=void 0;switch(typeof o){case"boolean":break;case"object":if(Array.isArray(o))i=e(o);else for(var a in i="",o)o[a]&&a&&(i&&(i+=" "),i+=a);break;default:i=o}i&&(n&&(n+=" "),n+=i)}}return n},gi=function(e){var t=Qo({key:"css"});t.sheet.speedy=function(e){this.isSpeedy=e},t.compat=!0;var n=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var o=pi(n,t.registered,void 0);return Wo(t,o,!1),t.key+"-"+o.name};return{css:n,cx:function(){for(var e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];return fi(t.registered,n,hi(r))},injectGlobal:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var o=pi(n,t.registered);mi(t,o)},keyframes:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var o=pi(n,t.registered),i="animation-"+o.name;return mi(t,{name:o.name,styles:"@keyframes "+i+"{"+o.styles+"}"}),i},hydrate:function(e){e.forEach((function(e){t.inserted[e]=!0}))},flush:function(){t.registered={},t.inserted={},t.sheet.flush()},sheet:t.sheet,cache:t,getRegisteredStyles:Vo.bind(null,t.registered),merge:fi.bind(null,t.registered,n)}}(),vi=(gi.flush,gi.hydrate,gi.cx);gi.merge,gi.getRegisteredStyles,gi.injectGlobal,gi.keyframes,gi.css,gi.sheet,gi.cache;const bi=()=>{const e=(0,Ho._)();return(0,_.useCallback)(((...t)=>{if(null===e)throw new Error("The `useCx` hook should be only used within a valid Emotion Cache Context");return vi(...t.map((t=>{return null!=(n=t)&&["name","styles"].every((e=>void 0!==n[e]))?(Wo(e,t,!1),`${e.key}-${t.name}`):t;var n})))}),[e])};var yi=n(34155);function wi(e,t){const n=Bo();void 0===t&&void 0!==yi&&yi.env;const r=(null==n?void 0:n[t])||{},o={"data-wp-c16t":!0,...(i=t,{"data-wp-component":i})};var i;const{_overrides:a,...l}=r,s=Object.entries(l).length?Object.assign({},l,e):e,c=bi()(zo(t),e.className),u="function"==typeof s.renderChildren?s.renderChildren(s):s.children;for(const e in s)o[e]=s[e];for(const e in a)o[e]=a[e];return o.children=u,o.className=c,o}var ki=n(34155);function Ei(e,t,n={}){const{memo:r=!1}=n;let o=(0,_.forwardRef)(e);r&&(o=(0,_.memo)(o)),void 0===t&&void 0!==ki&&ki.env;let i=o.__contextSystemKey__||[t];return Array.isArray(t)&&(i=[...i,...t]),"string"==typeof t&&(i=[...i,t]),o.displayName=t,o.__contextSystemKey__=(0,Ce.uniq)(i),o.selector=`.${zo(t)}`,o}function _i(e){if(!e)return[];let t=[];return e.__contextSystemKey__&&(t=e.__contextSystemKey__),e.type&&e.type.__contextSystemKey__&&(t=e.type.__contextSystemKey__),t}const Ci={border:0,clip:"rect(1px, 1px, 1px, 1px)",WebkitClipPath:"inset( 50% )",clipPath:"inset( 50% )",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",wordWrap:"normal"};var xi=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,Si=(0,ni.Z)((function(e){return xi.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91}));function Ii(e,t,n){var r="";return n.split(" ").forEach((function(n){void 0!==e[n]?t.push(e[n]+";"):r+=n+" "})),r}var Ti=function(e,t,n){var r=e.key+"-"+t.name;if(!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles),void 0===e.inserted[t.name]){var o=t;do{e.insert(t===o?"."+r:"",o,e.sheet,!0),o=o.next}while(void 0!==o)}},Ni=/[A-Z]|^ms/g,Ai=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Ri=function(e){return 45===e.charCodeAt(1)},Li=function(e){return null!=e&&"boolean"!=typeof e},Pi=(0,ni.Z)((function(e){return Ri(e)?e:e.replace(Ni,"-$&").toLowerCase()})),Oi=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(Ai,(function(e,t,n){return Mi={name:t,styles:n,next:Mi},t}))}return 1===ti.Z[e]||Ri(e)||"number"!=typeof t||0===t?t:t+"px"};function Di(e,t,n){if(null==n)return"";if(void 0!==n.__emotion_styles)return n;switch(typeof n){case"boolean":return"";case"object":if(1===n.anim)return Mi={name:n.name,styles:n.styles,next:Mi},n.name;if(void 0!==n.styles){var r=n.next;if(void 0!==r)for(;void 0!==r;)Mi={name:r.name,styles:r.styles,next:Mi},r=r.next;return n.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=Di(e,t,n[o])+";";else for(var i in n){var a=n[i];if("object"!=typeof a)null!=t&&void 0!==t[a]?r+=i+"{"+t[a]+"}":Li(a)&&(r+=Pi(i)+":"+Oi(i,a)+";");else if(!Array.isArray(a)||"string"!=typeof a[0]||null!=t&&void 0!==t[a[0]]){var l=Di(e,t,a);switch(i){case"animation":case"animationName":r+=Pi(i)+":"+l+";";break;default:r+=i+"{"+l+"}"}}else for(var s=0;s<a.length;s++)Li(a[s])&&(r+=Pi(i)+":"+Oi(i,a[s])+";")}return r}(e,t,n);case"function":if(void 0!==e){var o=Mi,i=n(e);return Mi=o,Di(e,t,i)}}if(null==t)return n;var a=t[n];return void 0!==a?a:n}var Mi,Bi=/label:\s*([^\s;\n{]+)\s*(;|$)/g,Fi=function(e,t,n){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var r=!0,o="";Mi=void 0;var i=e[0];null==i||void 0===i.raw?(r=!1,o+=Di(n,t,i)):o+=i[0];for(var a=1;a<e.length;a++)o+=Di(n,t,e[a]),r&&(o+=i[a]);Bi.lastIndex=0;for(var l,s="";null!==(l=Bi.exec(o));)s+="-"+l[1];return{name:(0,ei.Z)(o)+s,styles:o,next:Mi}},zi=Si,Hi=function(e){return"theme"!==e},Vi=function(e){return"string"==typeof e&&e.charCodeAt(0)>96?zi:Hi},Wi=function(e,t,n){var r;if(t){var o=t.shouldForwardProp;r=e.__emotion_forwardProp&&o?function(t){return e.__emotion_forwardProp(t)&&o(t)}:o}return"function"!=typeof r&&n&&(r=e.__emotion_forwardProp),r},Zi=function e(t,n){var r,o,i=t.__emotion_real===t,a=i&&t.__emotion_base||t;void 0!==n&&(r=n.label,o=n.target);var l=Wi(t,n,i),s=l||Vi(a),c=!s("as");return function(){var u=arguments,d=i&&void 0!==t.__emotion_styles?t.__emotion_styles.slice(0):[];if(void 0!==r&&d.push("label:"+r+";"),null==u[0]||void 0===u[0].raw)d.push.apply(d,u);else{d.push(u[0][0]);for(var p=u.length,m=1;m<p;m++)d.push(u[m],u[0][m])}var f=(0,Ho.w)((function(e,t,n){var r=c&&e.as||a,i="",u=[],p=e;if(null==e.theme){for(var m in p={},e)p[m]=e[m];p.theme=(0,_.useContext)(Ho.T)}"string"==typeof e.className?i=Ii(t.registered,u,e.className):null!=e.className&&(i=e.className+" ");var f=Fi(d.concat(u),t.registered,p);Ti(t,f,"string"==typeof r),i+=t.key+"-"+f.name,void 0!==o&&(i+=" "+o);var h=c&&void 0===l?Vi(r):s,g={};for(var v in e)c&&"as"===v||h(v)&&(g[v]=e[v]);return g.className=i,g.ref=n,(0,_.createElement)(r,g)}));return f.displayName=void 0!==r?r:"Styled("+("string"==typeof a?a:a.displayName||a.name||"Component")+")",f.defaultProps=t.defaultProps,f.__emotion_real=f,f.__emotion_base=a,f.__emotion_styles=d,f.__emotion_forwardProp=l,Object.defineProperty(f,"toString",{value:function(){return"."+o}}),f.withComponent=function(t,r){return e(t,(0,nr.Z)({},n,r,{shouldForwardProp:Wi(f,r,!0)})).apply(void 0,d)},f}};const ji=Zi("div",{target:"em57xhy0"})("");ji.selector=".components-view",ji.displayName="View";var Ui=ji,$i=Ei((function(e,t){const{style:n,...r}=wi(e,"VisuallyHidden");return(0,_.createElement)(Ui,(0,nr.Z)({ref:t},r,{style:{...Ci,...n||{}}}))}),"VisuallyHidden");const qi=["onMouseDown","onClick"];var Gi=(0,_.forwardRef)((function(e,t){const{href:n,target:r,isSmall:o,isPressed:i,isBusy:a,isDestructive:l,className:s,disabled:c,icon:u,iconPosition:d="left",iconSize:p,showTooltip:m,tooltipPosition:f,shortcut:h,label:g,children:v,text:b,variant:y,__experimentalIsFocusable:w,describedBy:k,...E}=function({isDefault:e,isPrimary:t,isSecondary:n,isTertiary:r,isLink:o,variant:i,...a}){let l=i;var s,c,u,d,p;return t&&(null!==(s=l)&&void 0!==s||(l="primary")),r&&(null!==(c=l)&&void 0!==c||(l="tertiary")),n&&(null!==(u=l)&&void 0!==u||(l="secondary")),e&&(Vt("Button isDefault prop",{since:"5.4",alternative:'variant="secondary"'}),null!==(d=l)&&void 0!==d||(l="secondary")),o&&(null!==(p=l)&&void 0!==p||(l="link")),{...a,variant:l}}(e),C=Cr()("components-button",s,{"is-secondary":"secondary"===y,"is-primary":"primary"===y,"is-small":o,"is-tertiary":"tertiary"===y,"is-pressed":i,"is-busy":a,"is-link":"link"===y,"is-destructive":l,"has-text":!!u&&!!v,"has-icon":!!u}),x=c&&!w,S=void 0===n||x?"button":"a",I="a"===S?{href:n,target:r}:{type:"button",disabled:x,"aria-pressed":i};if(c&&w){I["aria-disabled"]=!0;for(const e of qi)E[e]=e=>{e.stopPropagation(),e.preventDefault()}}const T=!x&&(m&&g||h||!!g&&(!v||(0,Ce.isArray)(v)&&!v.length)&&!1!==m),N=k?(0,Ce.uniqueId)():null,A=E["aria-describedby"]||N,R=(0,_.createElement)(S,(0,nr.Z)({},I,E,{className:C,"aria-label":E["aria-label"]||g,"aria-describedby":A,ref:t}),u&&"left"===d&&(0,_.createElement)(Oo,{icon:u,size:p}),b&&(0,_.createElement)(_.Fragment,null,b),u&&"right"===d&&(0,_.createElement)(Oo,{icon:u,size:p}),v);return T?(0,_.createElement)(_.Fragment,null,(0,_.createElement)(Lo,{text:k||g,shortcut:h,position:f},R),k&&(0,_.createElement)($i,null,(0,_.createElement)("span",{id:N},k))):(0,_.createElement)(_.Fragment,null,R,k&&(0,_.createElement)($i,null,(0,_.createElement)("span",{id:N},k)))}));let Ki=0;function Yi(e){const t=document.scrollingElement||document.body;e&&(Ki=t.scrollTop);const n=e?"add":"remove";t.classList[n]("lockscroll"),document.documentElement.classList[n]("lockscroll"),e||(t.scrollTop=Ki)}let Xi=0;function Ji(){return(0,_.useEffect)((()=>(0===Xi&&Yi(!0),++Xi,()=>{1===Xi&&Yi(!1),--Xi})),[]),null}function Qi(e){return"appear"===e?"top":"left"}function ea(e,t){const{paddingTop:n,paddingBottom:r,paddingLeft:o,paddingRight:i}=(u=t).ownerDocument.defaultView.getComputedStyle(u),a=n?parseInt(n,10):0,l=r?parseInt(r,10):0,s=o?parseInt(o,10):0,c=i?parseInt(i,10):0;var u;return{x:e.left+s,y:e.top+a,width:e.width-s-c,height:e.height-a-l,left:e.left+s,right:e.right-c,top:e.top+a,bottom:e.bottom-l}}function ta(e,t,n){n?e.getAttribute(t)!==n&&e.setAttribute(t,n):e.hasAttribute(t)&&e.removeAttribute(t)}function na(e,t,n=""){e.style[t]!==n&&(e.style[t]=n)}function ra(e,t,n){n?e.classList.contains(t)||e.classList.add(t):e.classList.contains(t)&&e.classList.remove(t)}const oa=(0,_.forwardRef)((({headerTitle:e,onClose:t,children:n,className:r,noArrow:o=!0,isAlternate:i,position:a="bottom right",range:l,focusOnMount:s="firstElement",anchorRef:c,shouldAnchorIncludePadding:u,anchorRect:d,getAnchorRect:p,expandOnMobile:m,animate:f=!0,onClickOutside:h,onFocusOutside:g,__unstableStickyBoundaryElement:v,__unstableSlotName:b="Popover",__unstableObserveElement:y,__unstableBoundaryParent:w,__unstableForcePosition:k,__unstableForceXAlignment:E,...C},x)=>{const S=(0,_.useRef)(null),I=(0,_.useRef)(null),T=(0,_.useRef)(),N=Lr("medium","<"),[A,R]=(0,_.useState)(),L=dr(b),P=m&&N,[O,D]=Dr();o=P||o,(0,_.useLayoutEffect)((()=>{if(P)return ra(T.current,"is-without-arrow",o),ra(T.current,"is-alternate",i),ta(T.current,"data-x-axis"),ta(T.current,"data-y-axis"),na(T.current,"top"),na(T.current,"left"),na(I.current,"maxHeight"),void na(I.current,"maxWidth");const e=()=>{if(!T.current||!I.current)return;let e=function(e,t,n,r=!1,o,i){if(t)return t;if(n){if(!e.current)return;const t=n(e.current);return _o(t,t.ownerDocument||e.current.ownerDocument,i)}if(!1!==r){if(!(r&&window.Range&&window.Element&&window.DOMRect))return;if("function"==typeof(null==r?void 0:r.cloneRange))return _o(xr(r),r.endContainer.ownerDocument,i);if("function"==typeof(null==r?void 0:r.getBoundingClientRect)){const e=_o(r.getBoundingClientRect(),r.ownerDocument,i);return o?e:ea(e,r)}const{top:e,bottom:t}=r,n=e.getBoundingClientRect(),a=t.getBoundingClientRect(),l=_o(new window.DOMRect(n.left,n.top,n.width,a.bottom-n.top),e.ownerDocument,i);return o?l:ea(l,r)}if(!e.current)return;const{parentNode:a}=e.current,l=a.getBoundingClientRect();return o?l:ea(l,a)}(S,d,p,c,u,T.current);if(!e)return;const{offsetParent:t,ownerDocument:n}=T.current;let r,l=0;if(t&&t!==n.body){const n=t.getBoundingClientRect();l=n.top,e=new window.DOMRect(e.left-n.left,e.top-n.top,e.width,e.height)}var s;w&&(r=null===(s=T.current.closest(".popover-slot"))||void 0===s?void 0:s.parentNode);const m=D.height?D:I.current.getBoundingClientRect(),{popoverTop:f,popoverLeft:h,xAxis:g,yAxis:b,contentHeight:y,contentWidth:_}=function(e,t,n="top",r,o,i,a,l,s){const[c,u="center",d]=n.split(" "),p=function(e,t,n,r,o,i,a,l){const{height:s}=t;if(o){const t=o.getBoundingClientRect().top+s-a;if(e.top<=t)return{yAxis:n,popoverTop:Math.min(e.bottom,t)}}let c=e.top+e.height/2;"bottom"===r?c=e.bottom:"top"===r&&(c=e.top);const u={popoverTop:c,contentHeight:(c-s/2>0?s/2:c)+(c+s/2>window.innerHeight?window.innerHeight-c:s/2)},d={popoverTop:e.top,contentHeight:e.top-10-s>0?s:e.top-10},p={popoverTop:e.bottom,contentHeight:e.bottom+10+s>window.innerHeight?window.innerHeight-10-e.bottom:s};let m,f=n,h=null;if(!o&&!l)if("middle"===n&&u.contentHeight===s)f="middle";else if("top"===n&&d.contentHeight===s)f="top";else if("bottom"===n&&p.contentHeight===s)f="bottom";else{f=d.contentHeight>p.contentHeight?"top":"bottom";const e="top"===f?d.contentHeight:p.contentHeight;h=e!==s?e:null}return m="middle"===f?u.popoverTop:"top"===f?d.popoverTop:p.popoverTop,{yAxis:f,popoverTop:m,contentHeight:h}}(e,t,c,d,r,0,i,l);return{...function(e,t,n,r,o,i,a,l,s){const{width:c}=t;"left"===n&&G()?n="right":"right"===n&&G()&&(n="left"),"left"===r&&G()?r="right":"right"===r&&G()&&(r="left");const u=Math.round(e.left+e.width/2),d={popoverLeft:u,contentWidth:(u-c/2>0?c/2:u)+(u+c/2>window.innerWidth?window.innerWidth-u:c/2)};let p=e.left;"right"===r?p=e.right:"middle"===i||s||(p=u);let m=e.right;"left"===r?m=e.left:"middle"===i||s||(m=u);const f={popoverLeft:p,contentWidth:p-c>0?c:p},h={popoverLeft:m,contentWidth:m+c>window.innerWidth?window.innerWidth-m:c};let g,v=n,b=null;if(!o&&!l)if("center"===n&&d.contentWidth===c)v="center";else if("left"===n&&f.contentWidth===c)v="left";else if("right"===n&&h.contentWidth===c)v="right";else{v=f.contentWidth>h.contentWidth?"left":"right";const e="left"===v?f.contentWidth:h.contentWidth;c>window.innerWidth&&(b=window.innerWidth),e!==c&&(v="center",d.popoverLeft=window.innerWidth/2)}if(g="center"===v?d.popoverLeft:"left"===v?f.popoverLeft:h.popoverLeft,a){const e=a.getBoundingClientRect();g=Math.min(g,e.right-c),G()||(g=Math.max(g,0))}return{xAxis:v,popoverLeft:g,contentWidth:b}}(e,t,u,d,r,p.yAxis,a,l,s),...p}}(e,m,a,v,T.current,l,r,k,E);"number"==typeof f&&"number"==typeof h&&(na(T.current,"top",f+"px"),na(T.current,"left",h+"px")),ra(T.current,"is-without-arrow",o||"center"===g&&"middle"===b),ra(T.current,"is-alternate",i),ta(T.current,"data-x-axis",g),ta(T.current,"data-y-axis",b),na(I.current,"maxHeight","number"==typeof y?y+"px":""),na(I.current,"maxWidth","number"==typeof _?_+"px":""),R(({left:"right",right:"left"}[g]||"center")+" "+({top:"bottom",bottom:"top"}[b]||"middle"))};e();const{ownerDocument:t}=T.current,{defaultView:n}=t,r=n.setInterval(e,500);let l;const s=()=>{n.cancelAnimationFrame(l),l=n.requestAnimationFrame(e)};n.addEventListener("click",s),n.addEventListener("resize",e),n.addEventListener("scroll",e,!0);const m=function(e){if(e)return e.endContainer?e.endContainer.ownerDocument:e.top?e.top.ownerDocument:e.ownerDocument}(c);let f;return m&&m!==t&&(m.defaultView.addEventListener("resize",e),m.defaultView.addEventListener("scroll",e,!0)),y&&(f=new n.MutationObserver(e),f.observe(y,{attributes:!0})),()=>{n.clearInterval(r),n.removeEventListener("resize",e),n.removeEventListener("scroll",e,!0),n.removeEventListener("click",s),n.cancelAnimationFrame(l),m&&m!==t&&(m.defaultView.removeEventListener("resize",e),m.defaultView.removeEventListener("scroll",e,!0)),f&&f.disconnect()}}),[P,d,p,c,u,a,D,v,y,w]);const M=(e,n)=>{if("focus-outside"===e&&g)g(n);else if("focus-outside"===e&&h){const e=new window.MouseEvent("click");Object.defineProperty(e,"target",{get:()=>n.relatedTarget}),Vt("Popover onClickOutside prop",{since:"5.3",alternative:"onFocusOutside"}),h(e)}else t&&t()},[B,F]=function(e){const t=(0,_.useRef)();(0,_.useEffect)((()=>{t.current=e}),Object.values(e));const n=mo(),r=fo(e.focusOnMount),o=ho(),i=vo((e=>{var n,r;null!==(n=t.current)&&void 0!==n&&n.__unstableOnClose?t.current.__unstableOnClose("focus-outside",e):null!==(r=t.current)&&void 0!==r&&r.onClose&&t.current.onClose()})),a=(0,_.useCallback)((e=>{e&&e.addEventListener("keydown",(e=>{var n;e.keyCode===Fr&&!e.defaultPrevented&&null!==(n=t.current)&&void 0!==n&&n.onClose&&(e.preventDefault(),t.current.onClose())}))}),[]);return[hr([!1!==e.focusOnMount?n:null,!1!==e.focusOnMount?o:null,!1!==e.focusOnMount?r:null,a]),{...i,tabIndex:"-1"}]}({focusOnMount:s,__unstableOnClose:M,onClose:M}),z=hr([T,B,x]),H=Boolean(f&&A)&&function(e){if("loading"===e.type)return Cr()("components-animate__loading");const{type:t,origin:n=Qi(t)}=e;if("appear"===t){const[e,t="center"]=n.split(" ");return Cr()("components-animate__appear",{["is-from-"+t]:"center"!==t,["is-from-"+e]:"middle"!==e})}return"slide-in"===t?Cr()("components-animate__slide-in","is-from-"+n):void 0}({type:"appear",origin:A});let V=(0,_.createElement)("div",(0,nr.Z)({className:Cr()("components-popover",r,H,{"is-expanded":P,"is-without-arrow":o,"is-alternate":i})},C,{ref:z},F,{tabIndex:"-1"}),P&&(0,_.createElement)(Ji,null),P&&(0,_.createElement)("div",{className:"components-popover__header"},(0,_.createElement)("span",{className:"components-popover__header-title"},e),(0,_.createElement)(Gi,{className:"components-popover__close",icon:Eo,onClick:t})),(0,_.createElement)("div",{ref:I,className:"components-popover__content"},(0,_.createElement)("div",{style:{position:"relative"}},O,n)));return L.ref&&(V=(0,_.createElement)(yr,{name:b},V)),c||d?V:(0,_.createElement)("span",{ref:S},V)}));oa.Slot=(0,_.forwardRef)((function({name:e="Popover"},t){return(0,_.createElement)(wr,{bubblesVirtually:!0,name:e,className:"popover-slot",ref:t})}));var ia=oa;const{wp:aa}=window,la=[],sa=()=>aa.media.view.MediaFrame.Select.extend({featuredImageToolbar(e){this.createSelectToolbar(e,{text:aa.media.view.l10n.setFeaturedImage,state:this.options.state})},editState(){const e=this.state("featured-image").get("selection"),t=new aa.media.view.EditImage({model:e.single(),controller:this}).render();this.content.set(t),t.loadEditor()},createStates:function(){this.on("toolbar:create:featured-image",this.featuredImageToolbar,this),this.on("content:render:edit-image",this.editState,this),this.states.add([new aa.media.controller.FeaturedImage,new aa.media.controller.EditImage({model:this.options.editImage})])}}),ca=()=>aa.media.view.MediaFrame.Post.extend({galleryToolbar(){const e=this.state().get("editing");this.toolbar.set(new aa.media.view.Toolbar({controller:this,items:{insert:{style:"primary",text:e?aa.media.view.l10n.updateGallery:aa.media.view.l10n.insertGallery,priority:80,requires:{library:!0},click(){const e=this.controller,t=e.state();e.close(),t.trigger("update",t.get("library")),e.setState(e.options.state),e.reset()}}}}))},editState(){const e=this.state("gallery").get("selection"),t=new aa.media.view.EditImage({model:e.single(),controller:this}).render();this.content.set(t),t.loadEditor()},createStates:function(){this.on("toolbar:create:main-gallery",this.galleryToolbar,this),this.on("content:render:edit-image",this.editState,this),this.states.add([new aa.media.controller.Library({id:"gallery",title:aa.media.view.l10n.createGalleryTitle,priority:40,toolbar:"main-gallery",filterable:"uploaded",multiple:"add",editable:!1,library:aa.media.query((0,Ce.defaults)({type:"image"},this.options.library))}),new aa.media.controller.EditImage({model:this.options.editImage}),new aa.media.controller.GalleryEdit({library:this.options.selection,editing:this.options.editing,menu:"gallery",displaySettings:!1,multiple:!0}),new aa.media.controller.GalleryAdd])}}),ua=e=>(0,Ce.pick)(e,["sizes","mime","type","subtype","id","url","alt","link","caption"]),da=e=>aa.media.query({order:"ASC",orderby:"post__in",post__in:e,posts_per_page:-1,query:!0,type:"image"});class pa extends _.Component{constructor({allowedTypes:e,gallery:t=!1,unstableFeaturedImageFlow:n=!1,modalClass:r,multiple:o=!1,title:i=U("Select or Upload Media")}){if(super(...arguments),this.openModal=this.openModal.bind(this),this.onOpen=this.onOpen.bind(this),this.onSelect=this.onSelect.bind(this),this.onUpdate=this.onUpdate.bind(this),this.onClose=this.onClose.bind(this),t)this.buildAndSetGalleryFrame();else{const t={title:i,multiple:o};e&&(t.library={type:e}),this.frame=aa.media(t)}r&&this.frame.$el.addClass(r),n&&this.buildAndSetFeatureImageFrame(),this.initializeListeners()}initializeListeners(){this.frame.on("select",this.onSelect),this.frame.on("update",this.onUpdate),this.frame.on("open",this.onOpen),this.frame.on("close",this.onClose)}buildAndSetGalleryFrame(){const{addToGallery:e=!1,allowedTypes:t,multiple:n=!1,value:r=la}=this.props;if(r===this.lastGalleryValue)return;let o;this.lastGalleryValue=r,this.frame&&this.frame.remove(),o=e?"gallery-library":r&&r.length?"gallery-edit":"gallery",this.GalleryDetailsMediaFrame||(this.GalleryDetailsMediaFrame=ca());const i=da(r),a=new aa.media.model.Selection(i.models,{props:i.props.toJSON(),multiple:n});this.frame=new this.GalleryDetailsMediaFrame({mimeType:t,state:o,multiple:n,selection:a,editing:!(!r||!r.length)}),aa.media.frame=this.frame,this.initializeListeners()}buildAndSetFeatureImageFrame(){const e=sa(),t=da(this.props.value),n=new aa.media.model.Selection(t.models,{props:t.props.toJSON()});this.frame=new e({mimeType:this.props.allowedTypes,state:"featured-image",multiple:this.props.multiple,selection:n,editing:!!this.props.value}),aa.media.frame=this.frame}componentWillUnmount(){this.frame.remove()}onUpdate(e){const{onSelect:t,multiple:n=!1}=this.props,r=this.frame.state(),o=e||r.get("selection");o&&o.models.length&&t(n?o.models.map((e=>ua(e.toJSON()))):ua(o.models[0].toJSON()))}onSelect(){const{onSelect:e,multiple:t=!1}=this.props,n=this.frame.state().get("selection").toJSON();e(t?n:n[0])}onOpen(){var e;if(this.updateCollection(),Array.isArray(this.props.value)?null!==(e=this.props.value)&&void 0!==e&&e.length:this.props.value){if(!this.props.gallery){const e=this.frame.state().get("selection");(0,Ce.castArray)(this.props.value).forEach((t=>{e.add(aa.media.attachment(t))}))}da((0,Ce.castArray)(this.props.value)).more()}}onClose(){const{onClose:e}=this.props;e&&e()}updateCollection(){const e=this.frame.content.get();if(e&&e.collection){const t=e.collection;t.toArray().forEach((e=>e.trigger("destroy",e))),t.mirroring._hasMore=!0,t.more()}}openModal(){this.props.gallery&&this.buildAndSetGalleryFrame(),this.frame.open()}render(){return this.props.render({open:this.openModal})}}var ma=pa;const{createObjectURL:fa,revokeObjectURL:ha}=window.URL,ga={};function va(e){const t=fa(e);return ga[t]=e,t}function ba(e){ga[e]&&ha(e),delete ga[e]}function ya(e){return!(!e||!e.indexOf)&&0===e.indexOf("blob:")}async function wa({allowedTypes:e,additionalData:t={},filesList:n,maxUploadFileSize:r,onError:o=Ce.noop,onFileChange:i,wpAllowedMimeTypes:a=null}){const l=[...n],s=[],c=(e,t)=>{ba((0,Ce.get)(s,[e,"url"])),s[e]=t,i((0,Ce.compact)(s))},u=t=>!e||(0,Ce.some)(e,(e=>(0,Ce.includes)(e,"/")?e===t:(0,Ce.startsWith)(t,`${e}/`))),d=(p=a)?(0,Ce.flatMap)(p,((e,t)=>{const[n]=e.split("/"),r=t.split("|");return[e,...(0,Ce.map)(r,(e=>`${n}/${e}`))]})):p;var p;const m=e=>{e.message=[(0,_.createElement)("strong",{key:"filename"},e.file.name),": ",e.message],o(e)},f=[];for(const e of l)d&&e.type&&(h=e.type,!(0,Ce.includes)(d,h))?m({code:"MIME_TYPE_NOT_ALLOWED_FOR_USER",message:U("Sorry, this file type is not permitted for security reasons."),file:e}):!e.type||u(e.type)?r&&e.size>r?m({code:"SIZE_ABOVE_LIMIT",message:U("This file exceeds the maximum upload size for this site."),file:e}):e.size<=0?m({code:"EMPTY_FILE",message:U("This file is empty."),file:e}):(f.push(e),s.push({url:va(e)}),i(s)):m({code:"MIME_TYPE_NOT_SUPPORTED",message:U("Sorry, this file type is not supported here."),file:e});var h;for(let e=0;e<f.length;++e){const n=f[e];try{const r=await ka(n,t);c(e,{...(0,Ce.omit)(r,["alt_text","source_url"]),alt:r.alt_text,caption:(0,Ce.get)(r,["caption","raw"],""),title:r.title.raw,url:r.source_url})}catch(t){let r;c(e,null),r=(0,Ce.has)(t,["message"])?(0,Ce.get)(t,["message"]):L(U("Error while uploading file %s to the media library."),n.name),o({code:"GENERAL",message:r,file:n})}}}function ka(e,t){const n=new window.FormData;return n.append("file",e,e.name||e.type.replace("/",".")),(0,Ce.forEach)(t,((e,t)=>n.append(t,e))),he({path:"/wp/v2/media",body:n,method:"POST"})}var Ea=function(e,t){return n=>{const r=e(n),o=n.displayName||n.name||"Component";return r.displayName=`${(0,Ce.upperFirst)((0,Ce.camelCase)(t))}(${o})`,r}};const _a=[{slug:"text",title:U("Text")},{slug:"media",title:U("Media")},{slug:"design",title:U("Design")},{slug:"widgets",title:U("Widgets")},{slug:"theme",title:U("Theme")},{slug:"embed",title:U("Embeds")},{slug:"reusable",title:U("Reusable blocks")}];function Ca(e){return(t=null,n)=>{switch(n.type){case"REMOVE_BLOCK_TYPES":return-1!==n.names.indexOf(t)?null:t;case e:return n.name||null}return t}}const xa=Ca("SET_DEFAULT_BLOCK_NAME"),Sa=Ca("SET_FREEFORM_FALLBACK_BLOCK_NAME"),Ia=Ca("SET_UNREGISTERED_FALLBACK_BLOCK_NAME"),Ta=Ca("SET_GROUPING_BLOCK_NAME");var Na=Se()({blockTypes:function(e={},t){switch(t.type){case"ADD_BLOCK_TYPES":return{...e,...(0,Ce.keyBy)((0,Ce.map)(t.blockTypes,(e=>(0,Ce.omit)(e,"styles "))),"name")};case"REMOVE_BLOCK_TYPES":return(0,Ce.omit)(e,t.names)}return e},blockStyles:function(e={},t){switch(t.type){case"ADD_BLOCK_TYPES":return{...e,...(0,Ce.mapValues)((0,Ce.keyBy)(t.blockTypes,"name"),(t=>(0,Ce.uniqBy)([...(0,Ce.get)(t,["styles"],[]),...(0,Ce.get)(e,[t.name],[])],(e=>e.name))))};case"ADD_BLOCK_STYLES":return{...e,[t.blockName]:(0,Ce.uniqBy)([...(0,Ce.get)(e,[t.blockName],[]),...t.styles],(e=>e.name))};case"REMOVE_BLOCK_STYLES":return{...e,[t.blockName]:(0,Ce.filter)((0,Ce.get)(e,[t.blockName],[]),(e=>-1===t.styleNames.indexOf(e.name)))}}return e},blockVariations:function(e={},t){switch(t.type){case"ADD_BLOCK_TYPES":return{...e,...(0,Ce.mapValues)((0,Ce.keyBy)(t.blockTypes,"name"),(t=>(0,Ce.uniqBy)([...(0,Ce.get)(t,["variations"],[]),...(0,Ce.get)(e,[t.name],[])],(e=>e.name))))};case"ADD_BLOCK_VARIATIONS":return{...e,[t.blockName]:(0,Ce.uniqBy)([...(0,Ce.get)(e,[t.blockName],[]),...t.variations],(e=>e.name))};case"REMOVE_BLOCK_VARIATIONS":return{...e,[t.blockName]:(0,Ce.filter)((0,Ce.get)(e,[t.blockName],[]),(e=>-1===t.variationNames.indexOf(e.name)))}}return e},defaultBlockName:xa,freeformFallbackBlockName:Sa,unregisteredFallbackBlockName:Ia,groupingBlockName:Ta,categories:function(e=_a,t){switch(t.type){case"SET_CATEGORIES":return t.categories||[];case"UPDATE_CATEGORY":if(!t.category||(0,Ce.isEmpty)(t.category))return e;if((0,Ce.find)(e,["slug",t.slug]))return(0,Ce.map)(e,(e=>e.slug===t.slug?{...e,...t.category}:e))}return e},collections:function(e={},t){switch(t.type){case"ADD_BLOCK_COLLECTION":return{...e,[t.namespace]:{title:t.title,icon:t.icon}};case"REMOVE_BLOCK_COLLECTION":return(0,Ce.omit)(e,t.namespace)}return e}});const Aa=(e,t)=>"string"==typeof t?La(e,t):t,Ra=zt((e=>Object.values(e.blockTypes).map((t=>({...t,variations:Oa(e,t.name)})))),(e=>[e.blockTypes,e.blockVariations]));function La(e,t){return e.blockTypes[t]}function Pa(e,t){return e.blockStyles[t]}const Oa=zt(((e,t,n)=>{const r=e.blockVariations[t];return r&&n?r.filter((e=>(e.scope||["block","inserter"]).includes(n))):r}),((e,t)=>[e.blockVariations[t]]));function Da(e,t,n,r){const o=Oa(e,t,r);return null==o?void 0:o.find((r=>{var o;if(Array.isArray(r.isActive)){const o=La(e,t),i=Object.keys(o.attributes||{}),a=r.isActive.filter((e=>i.includes(e)));return 0!==a.length&&a.every((e=>n[e]===r.attributes[e]))}return null===(o=r.isActive)||void 0===o?void 0:o.call(r,n,r.attributes)}))}function Ma(e,t,n){const r=Oa(e,t,n);return(0,Ce.findLast)(r,"isDefault")||(0,Ce.first)(r)}function Ba(e){return e.categories}function Fa(e){return e.collections}function za(e){return e.defaultBlockName}function Ha(e){return e.freeformFallbackBlockName}function Va(e){return e.unregisteredFallbackBlockName}function Wa(e){return e.groupingBlockName}const Za=zt(((e,t)=>(0,Ce.map)((0,Ce.filter)(e.blockTypes,(e=>(0,Ce.includes)(e.parent,t))),(({name:e})=>e))),(e=>[e.blockTypes])),ja=(e,t,n,r)=>{const o=Aa(e,t);return null!=o&&o.supports?(0,Ce.get)(o.supports,n,r):r};function Ua(e,t,n,r){return!!ja(e,t,n,r)}function $a(e,t,n){const r=Aa(e,t),o=(0,Ce.flow)([Ce.deburr,e=>e.toLowerCase(),e=>e.trim()]),i=o(n),a=(0,Ce.flow)([o,e=>(0,Ce.includes)(e,i)]);return a(r.title)||(0,Ce.some)(r.keywords,a)||a(r.category)}const qa=(e,t)=>Za(e,t).length>0,Ga=(e,t)=>(0,Ce.some)(Za(e,t),(t=>Ua(e,t,"inserter",!0)));function Ka(e){return{type:"ADD_BLOCK_TYPES",blockTypes:(0,Ce.castArray)(e)}}function Ya(e){return{type:"REMOVE_BLOCK_TYPES",names:(0,Ce.castArray)(e)}}function Xa(e,t){return{type:"ADD_BLOCK_STYLES",styles:(0,Ce.castArray)(t),blockName:e}}function Ja(e,t){return{type:"REMOVE_BLOCK_STYLES",styleNames:(0,Ce.castArray)(t),blockName:e}}function Qa(e,t){return{type:"ADD_BLOCK_VARIATIONS",variations:(0,Ce.castArray)(t),blockName:e}}function el(e,t){return{type:"REMOVE_BLOCK_VARIATIONS",variationNames:(0,Ce.castArray)(t),blockName:e}}function tl(e){return{type:"SET_DEFAULT_BLOCK_NAME",name:e}}function nl(e){return{type:"SET_FREEFORM_FALLBACK_BLOCK_NAME",name:e}}function rl(e){return{type:"SET_UNREGISTERED_FALLBACK_BLOCK_NAME",name:e}}function ol(e){return{type:"SET_GROUPING_BLOCK_NAME",name:e}}function il(e){return{type:"SET_CATEGORIES",categories:e}}function al(e,t){return{type:"UPDATE_CATEGORY",slug:e,category:t}}function ll(e,t,n){return{type:"ADD_BLOCK_COLLECTION",namespace:e,title:t,icon:n}}function sl(e){return{type:"REMOVE_BLOCK_COLLECTION",namespace:e}}const cl=(0,ye.Z)("core/blocks",{reducer:Na,selectors:u,actions:d});var ul;(0,be.z2)(cl);var dl=new Uint8Array(16);function pl(){if(!ul&&!(ul="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return ul(dl)}for(var ml=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,fl=function(e){return"string"==typeof e&&ml.test(e)},hl=[],gl=0;gl<256;++gl)hl.push((gl+256).toString(16).substr(1));var vl=function(e,t,n){var r=(e=e||{}).random||(e.rng||pl)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var o=0;o<16;++o)t[n+o]=r[o];return t}return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(hl[e[t+0]]+hl[e[t+1]]+hl[e[t+2]]+hl[e[t+3]]+"-"+hl[e[t+4]]+hl[e[t+5]]+"-"+hl[e[t+6]]+hl[e[t+7]]+"-"+hl[e[t+8]]+hl[e[t+9]]+"-"+hl[e[t+10]]+hl[e[t+11]]+hl[e[t+12]]+hl[e[t+13]]+hl[e[t+14]]+hl[e[t+15]]).toLowerCase();if(!fl(n))throw TypeError("Stringified UUID is invalid");return n}(r)},bl=(0,_.createElement)(ko,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,_.createElement)(yo,{d:"M19 8h-1V6h-5v2h-2V6H6v2H5c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-8c0-1.1-.9-2-2-2zm.5 10c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-8c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v8z"})),yl=n(17621),wl=n.n(yl);const kl=["#191e23","#f8f9f9"];function El(e){const t=Fl();if(e.name!==t)return!1;El.block&&El.block.name===t||(El.block=Ul(t));const n=El.block,r=zl(t);return(0,Ce.every)(r.attributes,((t,r)=>n.attributes[r]===e.attributes[r]))}function _l(e){return!!e&&((0,Ce.isString)(e)||(0,_.isValidElement)(e)||(0,Ce.isFunction)(e)||e instanceof _.Component)}function Cl(e){return(0,Ce.isString)(e)?zl(e):e}function xl(e,t,n="visual"){const{__experimentalLabel:r,title:o}=e,i=r&&r(t,{context:n});return i?(a=i,(new window.DOMParser).parseFromString(a,"text/html").body.textContent||""):o;var a}function Sl(e,t){const n=zl(e);if(void 0===n)throw new Error(`Block type '${e}' is not registered.`);return(0,Ce.reduce)(n.attributes,((e,n,r)=>{const o=t[r];return void 0!==o?e[r]=o:n.hasOwnProperty("default")&&(e[r]=n.default),-1!==["node","children"].indexOf(n.source)&&("string"==typeof e[r]?e[r]=[e[r]]:Array.isArray(e[r])||(e[r]=[])),e}),{})}const Il=["attributes","supports","save","migrate","isEligible","apiVersion"],Tl={"--wp--style--color--link":{value:["color","link"],support:["color","link"]},background:{value:["color","gradient"],support:["color","gradients"]},backgroundColor:{value:["color","background"],support:["color"]},borderColor:{value:["border","color"],support:["__experimentalBorder","color"]},borderRadius:{value:["border","radius"],support:["__experimentalBorder","radius"],properties:{borderTopLeftRadius:"topLeft",borderTopRightRadius:"topRight",borderBottomLeftRadius:"bottomLeft",borderBottomRightRadius:"bottomRight"}},borderStyle:{value:["border","style"],support:["__experimentalBorder","style"]},borderWidth:{value:["border","width"],support:["__experimentalBorder","width"]},color:{value:["color","text"],support:["color"]},linkColor:{value:["elements","link","color","text"],support:["color","link"]},fontFamily:{value:["typography","fontFamily"],support:["typography","__experimentalFontFamily"]},fontSize:{value:["typography","fontSize"],support:["typography","fontSize"]},fontStyle:{value:["typography","fontStyle"],support:["typography","__experimentalFontStyle"]},fontWeight:{value:["typography","fontWeight"],support:["typography","__experimentalFontWeight"]},lineHeight:{value:["typography","lineHeight"],support:["typography","lineHeight"]},margin:{value:["spacing","margin"],support:["spacing","margin"],properties:{marginTop:"top",marginRight:"right",marginBottom:"bottom",marginLeft:"left"}},padding:{value:["spacing","padding"],support:["spacing","padding"],properties:{paddingTop:"top",paddingRight:"right",paddingBottom:"bottom",paddingLeft:"left"}},textDecoration:{value:["typography","textDecoration"],support:["typography","__experimentalTextDecoration"]},textTransform:{value:["typography","textTransform"],support:["typography","__experimentalTextTransform"]},letterSpacing:{value:["typography","letterSpacing"],support:["__experimentalLetterSpacing"]}},Nl={link:"a",h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6"},Al={title:"block title",description:"block description",keywords:["block keyword"],styles:[{label:"block style label"}],variations:[{title:"block variation title",description:"block variation description",keywords:["block variation keyword"]}]},Rl={common:"text",formatting:"text",layout:"design"},Ll={};function Pl({textdomain:e,...t}){const n=(0,Ce.pick)(t,["apiVersion","title","category","parent","icon","description","keywords","attributes","providesContext","usesContext","supports","styles","example","variations"]);return e&&Object.keys(Al).forEach((t=>{n[t]&&(n[t]=Dl(Al[t],n[t],e))})),n}function Ol(e,t){const n=(0,Ce.isObject)(e)?e.name:e;if("string"!=typeof n)return void console.error("Block names must be strings.");if((0,Ce.isObject)(e)&&function(e){for(const t of Object.keys(e))Ll[t]?void 0===Ll[t].apiVersion&&e[t].apiVersion&&(Ll[t].apiVersion=e[t].apiVersion):Ll[t]=(0,Ce.mapKeys)((0,Ce.pickBy)(e[t],(e=>!(0,Ce.isNil)(e))),((e,t)=>(0,Ce.camelCase)(t)))}({[n]:Pl(e)}),t={name:n,icon:bl,keywords:[],attributes:{},providesContext:{},usesContext:[],supports:{},styles:[],save:()=>null,...null==Ll?void 0:Ll[n],...t},!/^[a-z][a-z0-9-]*\/[a-z][a-z0-9-]*$/.test(n))return void console.error("Block names must contain a namespace prefix, include only lowercase alphanumeric characters or dashes, and start with a letter. Example: my-plugin/my-custom-block");if((0,be.Ys)(cl).getBlockType(n))return void console.error('Block "'+n+'" is already registered.');const r={...t};if((t=(0,W.O)("blocks.registerBlockType",t,n)).deprecated&&(t.deprecated=t.deprecated.map((e=>(0,Ce.pick)((0,W.O)("blocks.registerBlockType",{...(0,Ce.omit)(r,Il),...e},n),Il)))),(0,Ce.isPlainObject)(t))if((0,Ce.isFunction)(t.save))if(!("edit"in t)||(0,Ce.isFunction)(t.edit))if(Rl.hasOwnProperty(t.category)&&(t.category=Rl[t.category]),"category"in t&&!(0,Ce.some)((0,be.Ys)(cl).getCategories(),{slug:t.category})&&(console.warn('The block "'+n+'" is registered with an invalid category "'+t.category+'".'),delete t.category),"title"in t&&""!==t.title)if("string"==typeof t.title){if(t.icon=function(e){if(_l(e))return{src:e};if((0,Ce.has)(e,["background"])){const t=wl()(e.background);return{...e,foreground:e.foreground?e.foreground:(0,yl.mostReadable)(t,kl,{includeFallbackColors:!0,level:"AA",size:"large"}).toHexString(),shadowColor:t.setAlpha(.3).toRgbString()}}return e}(t.icon),_l(t.icon.src))return(0,be.WI)(cl).addBlockTypes(t),t;console.error("The icon passed is invalid. The icon should be a string, an element, a function, or an object following the specifications documented in https://developer.wordpress.org/block-editor/developers/block-api/block-registration/#icon-optional")}else console.error("Block titles must be strings.");else console.error('The block "'+n+'" must have a title.');else console.error('The "edit" property must be a valid function.');else console.error('The "save" property must be a valid function.');else console.error("Block settings must be a valid object.")}function Dl(e,t,n){return(0,Ce.isString)(e)&&(0,Ce.isString)(t)?$(t,e,n):(0,Ce.isArray)(e)&&!(0,Ce.isEmpty)(e)&&(0,Ce.isArray)(t)?t.map((t=>Dl(e[0],t,n))):(0,Ce.isObject)(e)&&!(0,Ce.isEmpty)(e)&&(0,Ce.isObject)(t)?Object.keys(t).reduce(((r,o)=>e[o]?(r[o]=Dl(e[o],t[o],n),r):(r[o]=t[o],r)),{}):t}function Ml(){return(0,be.Ys)(cl).getFreeformFallbackBlockName()}function Bl(){return(0,be.Ys)(cl).getUnregisteredFallbackBlockName()}function Fl(){return(0,be.Ys)(cl).getDefaultBlockName()}function zl(e){return(0,be.Ys)(cl).getBlockType(e)}function Hl(){return(0,be.Ys)(cl).getBlockTypes()}function Vl(e,t,n){return(0,be.Ys)(cl).getBlockSupport(e,t,n)}function Wl(e,t,n){return(0,be.Ys)(cl).hasBlockSupport(e,t,n)}function Zl(e){return"core/block"===e.name}const jl=(e,t)=>(0,be.Ys)(cl).getBlockVariations(e,t);function Ul(e,t={},n=[]){const r=Sl(e,t);return{clientId:vl(),name:e,isValid:!0,attributes:r,innerBlocks:n}}function $l(e=[]){return e.map((e=>{const t=Array.isArray(e)?e:[e.name,e.attributes,e.innerBlocks],[n,r,o=[]]=t;return Ul(n,r,$l(o))}))}function ql(e,t={},n){const r=vl(),o=Sl(e.name,{...e.attributes,...t});return{...e,clientId:r,attributes:o,innerBlocks:n||e.innerBlocks.map((e=>ql(e)))}}function Gl(e,t={},n){const r=vl();return{...e,clientId:r,attributes:{...e.attributes,...t},innerBlocks:n||e.innerBlocks.map((e=>Gl(e)))}}const Kl=(e,t,n)=>{if((0,Ce.isEmpty)(n))return!1;const r=n.length>1,o=(0,Ce.first)(n).name;if(!Yl(e)&&r&&!e.isMultiBlock)return!1;if(!Yl(e)&&!(0,Ce.every)(n,{name:o}))return!1;if("block"!==e.type)return!1;const i=(0,Ce.first)(n);if("from"===t&&-1===e.blocks.indexOf(i.name)&&!Yl(e))return!1;if(!r&&Xl(i.name)&&Xl(e.blockName))return!1;if((0,Ce.isFunction)(e.isMatch)){const t=e.isMultiBlock?n.map((e=>e.attributes)):i.attributes;if(!e.isMatch(t))return!1}return!(e.usingMobileTransformations&&Yl(e)&&!Xl(i.name))},Yl=e=>e&&"block"===e.type&&Array.isArray(e.blocks)&&e.blocks.includes("*"),Xl=e=>e===(0,be.Ys)(cl).getGroupingBlockName();function Jl(e,t){const n=(0,W.Hu)();for(let r=0;r<e.length;r++){const o=e[r];t(o)&&n.addFilter("transform","transform/"+r.toString(),(e=>e||o),o.priority)}return n.applyFilters("transform",null)}function Ql(e,t){if(void 0===t)return(0,Ce.flatMap)(Hl(),(({name:t})=>Ql(e,t)));const n=Cl(t),{name:r,transforms:o}=n||{};if(!o||!Array.isArray(o[e]))return[];const i=o.supportedMobileTransforms&&Array.isArray(o.supportedMobileTransforms);return(i?(0,Ce.filter)(o[e],(e=>"raw"===e.type||!(!e.blocks||!e.blocks.length)&&(!!Yl(e)||(0,Ce.every)(e.blocks,(e=>o.supportedMobileTransforms.includes(e)))))):o[e]).map((e=>({...e,blockName:r,usingMobileTransformations:i})))}function es(e,t){const n=(0,Ce.castArray)(e),r=n.length>1,o=n[0],i=o.name,a=Ql("from",t),l=Jl(Ql("to",i),(e=>"block"===e.type&&(Yl(e)||-1!==e.blocks.indexOf(t))&&(!r||e.isMultiBlock)))||Jl(a,(e=>"block"===e.type&&(Yl(e)||-1!==e.blocks.indexOf(i))&&(!r||e.isMultiBlock)));if(!l)return null;let s;return s=l.isMultiBlock?(0,Ce.has)(l,"__experimentalConvert")?l.__experimentalConvert(n):l.transform(n.map((e=>e.attributes)),n.map((e=>e.innerBlocks))):(0,Ce.has)(l,"__experimentalConvert")?l.__experimentalConvert(o):l.transform(o.attributes,o.innerBlocks),(0,Ce.isObjectLike)(s)?(s=(0,Ce.castArray)(s),s.some((e=>!zl(e.name)))?null:(0,Ce.some)(s,(e=>e.name===t))?s.map((t=>(0,W.O)("blocks.switchToBlockType.transformedBlock",t,e))):null):null}const ts=(e,t)=>Ul(e,t.attributes,(0,Ce.map)(t.innerBlocks,(e=>ts(e.name,e))));let ns,rs,os,is;const as=/<!--\s+(\/)?wp:([a-z][a-z0-9_-]*\/)?([a-z][a-z0-9_-]*)\s+({(?:(?=([^}]+|}+(?=})|(?!}\s+\/?-->)[^])*)\5|[^]*?)}\s+)?(\/)?-->/g;function ls(e,t,n,r,o){return{blockName:e,attrs:t,innerBlocks:n,innerHTML:r,innerContent:o}}function ss(e){return ls(null,{},[],e,[e])}function cs(){const e=function(){const e=as.exec(ns);if(null===e)return["no-more-tokens"];const t=e.index,[n,r,o,i,a,,l]=e,s=n.length,c=!!r,u=!!l,d=(o||"core/")+i,p=!!a?function(e){try{return JSON.parse(e)}catch(e){return null}}(a):{};return u?["void-block",d,p,t,s]:c?["block-closer",d,null,t,s]:["block-opener",d,p,t,s]}(),[t,n,r,o,i]=e,a=is.length,l=o>rs?rs:null;switch(t){case"no-more-tokens":if(0===a)return us(),!1;if(1===a)return ps(),!1;for(;0<is.length;)ps();return!1;case"void-block":return 0===a?(null!==l&&os.push(ss(ns.substr(l,o-l))),os.push(ls(n,r,[],"",[])),rs=o+i,!0):(ds(ls(n,r,[],"",[]),o,i),rs=o+i,!0);case"block-opener":return is.push(function(e,t,n,r,o){return{block:e,tokenStart:t,tokenLength:n,prevOffset:r||t+n,leadingHtmlStart:o}}(ls(n,r,[],"",[]),o,i,o+i,l)),rs=o+i,!0;case"block-closer":if(0===a)return us(),!1;if(1===a)return ps(o),rs=o+i,!0;const e=is.pop(),t=ns.substr(e.prevOffset,o-e.prevOffset);return e.block.innerHTML+=t,e.block.innerContent.push(t),e.prevOffset=o+i,ds(e.block,e.tokenStart,e.tokenLength,o+i),rs=o+i,!0;default:return us(),!1}}function us(e){const t=e||ns.length-rs;0!==t&&os.push(ss(ns.substr(rs,t)))}function ds(e,t,n,r){const o=is[is.length-1];o.block.innerBlocks.push(e);const i=ns.substr(o.prevOffset,t-o.prevOffset);i&&(o.block.innerHTML+=i,o.block.innerContent.push(i)),o.block.innerContent.push(null),o.prevOffset=r||t+n}function ps(e){const{block:t,leadingHtmlStart:n,prevOffset:r,tokenStart:o}=is.pop(),i=e?ns.substr(r,e-r):ns.substr(r);i&&(t.innerHTML+=i,t.innerContent.push(i)),null!==n&&os.push(ss(ns.substr(n,o-n))),os.push(t)}const ms=new RegExp("(<((?=!--|!\\[CDATA\\[)((?=!-)!(?:-(?!->)[^\\-]*)*(?:--\x3e)?|!\\[CDATA\\[[^\\]]*(?:](?!]>)[^\\]]*)*?(?:]]>)?)|[^>]*>?))");var fs=n(56692);function hs({children:e,...t}){let n="";return _.Children.toArray(e).forEach((e=>{"string"==typeof e&&""!==e.trim()&&(n+=e)})),(0,_.createElement)("div",{dangerouslySetInnerHTML:{__html:n},...t})}const{Provider:gs,Consumer:vs}=(0,_.createContext)(void 0),bs=(0,_.forwardRef)((()=>null)),ys=new Set(["string","boolean","number"]),ws=new Set(["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]),ks=new Set(["allowfullscreen","allowpaymentrequest","allowusermedia","async","autofocus","autoplay","checked","controls","default","defer","disabled","download","formnovalidate","hidden","ismap","itemscope","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected","typemustmatch"]),Es=new Set(["autocapitalize","autocomplete","charset","contenteditable","crossorigin","decoding","dir","draggable","enctype","formenctype","formmethod","http-equiv","inputmode","kind","method","preload","scope","shape","spellcheck","translate","type","wrap"]),_s=new Set(["animation","animationIterationCount","baselineShift","borderImageOutset","borderImageSlice","borderImageWidth","columnCount","cx","cy","fillOpacity","flexGrow","flexShrink","floodOpacity","fontWeight","gridColumnEnd","gridColumnStart","gridRowEnd","gridRowStart","lineHeight","opacity","order","orphans","r","rx","ry","shapeImageThreshold","stopOpacity","strokeDasharray","strokeDashoffset","strokeMiterlimit","strokeOpacity","strokeWidth","tabSize","widows","x","y","zIndex","zoom"]);function Cs(e,t){return t.some((t=>0===e.indexOf(t)))}function xs(e){return"key"===e||"children"===e}function Ss(e,t){switch(e){case"style":return function(e){if(!(0,Ce.isPlainObject)(e))return e;let t;for(const n in e){const r=e[n];null!=r&&(t?t+=";":t="",t+=Ts(n)+":"+Ns(n,r))}return t}(t)}return t}function Is(e){switch(e){case"htmlFor":return"for";case"className":return"class"}return e.toLowerCase()}function Ts(e){return(0,Ce.startsWith)(e,"--")?e:Cs(e,["ms","O","Moz","Webkit"])?"-"+(0,Ce.kebabCase)(e):(0,Ce.kebabCase)(e)}function Ns(e,t){return"number"!=typeof t||0===t||_s.has(e)?t:t+"px"}function As(e,t,n={}){if(null==e||!1===e)return"";if(Array.isArray(e))return Ls(e,t,n);switch(typeof e){case"string":return(0,fs.r)(e);case"number":return e.toString()}const{type:r,props:o}=e;switch(r){case _.StrictMode:case _.Fragment:return Ls(o.children,t,n);case hs:const{children:e,...r}=o;return Rs((0,Ce.isEmpty)(r)?null:"div",{...r,dangerouslySetInnerHTML:{__html:e}},t,n)}switch(typeof r){case"string":return Rs(r,o,t,n);case"function":return r.prototype&&"function"==typeof r.prototype.render?function(e,t,n,r={}){const o=new e(t,r);return"function"==typeof o.getChildContext&&Object.assign(r,o.getChildContext()),As(o.render(),n,r)}(r,o,t,n):As(r(o,n),t,n)}switch(r&&r.$$typeof){case gs.$$typeof:return Ls(o.children,o.value,n);case vs.$$typeof:return As(o.children(t||r._currentValue),t,n);case bs.$$typeof:return As(r.render(o),t,n)}return""}function Rs(e,t,n,r={}){let o="";if("textarea"===e&&t.hasOwnProperty("value")?(o=Ls(t.value,n,r),t=(0,Ce.omit)(t,"value")):t.dangerouslySetInnerHTML&&"string"==typeof t.dangerouslySetInnerHTML.__html?o=t.dangerouslySetInnerHTML.__html:void 0!==t.children&&(o=Ls(t.children,n,r)),!e)return o;const i=function(e){let t="";for(const n in e){const r=Is(n);if(!(0,fs.$b)(r))continue;let o=Ss(n,e[n]);if(!ys.has(typeof o))continue;if(xs(n))continue;const i=ks.has(r);if(i&&!1===o)continue;const a=i||Cs(n,["data-","aria-"])||Es.has(r);("boolean"!=typeof o||a)&&(t+=" "+r,i||("string"==typeof o&&(o=(0,fs.kb)(o)),t+='="'+o+'"'))}return t}(t);return ws.has(e)?"<"+e+i+"/>":"<"+e+i+">"+o+"</"+e+">"}function Ls(e,t,n={}){let r="";e=(0,Ce.castArray)(e);for(let o=0;o<e.length;o++)r+=As(e[o],t,n);return r}var Ps=As;const{Consumer:Os,Provider:Ds}=(0,_.createContext)((()=>{})),Ms=Ea((e=>t=>(0,_.createElement)(Os,null,(n=>(0,_.createElement)(e,(0,nr.Z)({},t,{BlockContent:n}))))),"withBlockContentContext");var Bs=({children:e,innerBlocks:t})=>(0,_.createElement)(Ds,{value:()=>{const e=js(t,{isInnerBlocks:!0});return(0,_.createElement)(hs,null,e)}},e);function Fs(e){const t="wp-block-"+e.replace(/\//,"-").replace(/^core-/,"");return(0,W.O)("blocks.getBlockDefaultClassName",t,e)}function zs(e){const t="editor-block-list-item-"+e.replace(/\//,"-").replace(/^core-/,"");return(0,W.O)("blocks.getBlockMenuDefaultClassName",t,e)}const Hs={};function Vs(e,t,n){const r=Cl(e);return Ps(function(e,t,n=[]){const r=Cl(e);let{save:o}=r;if(o.prototype instanceof _.Component){const e=new o({attributes:t});o=e.render.bind(e)}Hs.blockType=r,Hs.attributes=t;let i=o({attributes:t,innerBlocks:n});const a=r.apiVersion>1||Wl(r,"lightBlockWrapper",!1);if((0,Ce.isObject)(i)&&(0,W.H7)("blocks.getSaveContent.extraProps")&&!a){const e=(0,W.O)("blocks.getSaveContent.extraProps",{...i.props},r,t);(0,Ie.ZP)(e,i.props)||(i=(0,_.cloneElement)(i,e))}return i=(0,W.O)("blocks.getSaveElement",i,r,t),(0,_.createElement)(Bs,{innerBlocks:n},i)}(r,t,n))}function Ws(e){let t=e.originalContent;if(e.isValid||e.innerBlocks.length)try{t=Vs(e.name,e.attributes,e.innerBlocks)}catch(e){}return t}function Zs(e,t,n){const r=(0,Ce.isEmpty)(t)?"":function(e){return JSON.stringify(e).replace(/--/g,"\\u002d\\u002d").replace(/</g,"\\u003c").replace(/>/g,"\\u003e").replace(/&/g,"\\u0026").replace(/\\"/g,"\\u0022")}(t)+" ",o=(0,Ce.startsWith)(e,"core/")?e.slice(5):e;return n?`\x3c!-- wp:${o} ${r}--\x3e\n`+n+`\n\x3c!-- /wp:${o} --\x3e`:`\x3c!-- wp:${o} ${r}/--\x3e`}function js(e,t){return(0,Ce.castArray)(e).map((e=>function(e,{isInnerBlocks:t=!1}={}){const n=e.name,r=Ws(e);return n===Bl()||!t&&n===Ml()?r:Zs(n,(o=zl(n),i=e.attributes,(0,Ce.reduce)(o.attributes,((e,t,n)=>{const r=i[n];return void 0===r||void 0!==t.source||"default"in t&&t.default===r||(e[n]=r),e}),{})),r);var o,i}(e,t))).join("\n\n")}var Us=/[\t\n\f ]/,$s=/[A-Za-z]/,qs=/\r\n?/g;function Gs(e){return Us.test(e)}function Ks(e){return $s.test(e)}var Ys=function(){function e(e,t,n){void 0===n&&(n="precompile"),this.delegate=e,this.entityParser=t,this.mode=n,this.state="beforeData",this.line=-1,this.column=-1,this.input="",this.index=-1,this.tagNameBuffer="",this.states={beforeData:function(){var e=this.peek();if("<"!==e||this.isIgnoredEndTag()){if("precompile"===this.mode&&"\n"===e){var t=this.tagNameBuffer.toLowerCase();"pre"!==t&&"textarea"!==t||this.consume()}this.transitionTo("data"),this.delegate.beginData()}else this.transitionTo("tagOpen"),this.markTagStart(),this.consume()},data:function(){var e=this.peek(),t=this.tagNameBuffer;"<"!==e||this.isIgnoredEndTag()?"&"===e&&"script"!==t&&"style"!==t?(this.consume(),this.delegate.appendToData(this.consumeCharRef()||"&")):(this.consume(),this.delegate.appendToData(e)):(this.delegate.finishData(),this.transitionTo("tagOpen"),this.markTagStart(),this.consume())},tagOpen:function(){var e=this.consume();"!"===e?this.transitionTo("markupDeclarationOpen"):"/"===e?this.transitionTo("endTagOpen"):("@"===e||":"===e||Ks(e))&&(this.transitionTo("tagName"),this.tagNameBuffer="",this.delegate.beginStartTag(),this.appendToTagName(e))},markupDeclarationOpen:function(){var e=this.consume();"-"===e&&"-"===this.peek()?(this.consume(),this.transitionTo("commentStart"),this.delegate.beginComment()):"DOCTYPE"===e.toUpperCase()+this.input.substring(this.index,this.index+6).toUpperCase()&&(this.consume(),this.consume(),this.consume(),this.consume(),this.consume(),this.consume(),this.transitionTo("doctype"),this.delegate.beginDoctype&&this.delegate.beginDoctype())},doctype:function(){Gs(this.consume())&&this.transitionTo("beforeDoctypeName")},beforeDoctypeName:function(){var e=this.consume();Gs(e)||(this.transitionTo("doctypeName"),this.delegate.appendToDoctypeName&&this.delegate.appendToDoctypeName(e.toLowerCase()))},doctypeName:function(){var e=this.consume();Gs(e)?this.transitionTo("afterDoctypeName"):">"===e?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypeName&&this.delegate.appendToDoctypeName(e.toLowerCase())},afterDoctypeName:function(){var e=this.consume();if(!Gs(e))if(">"===e)this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData");else{var t=e.toUpperCase()+this.input.substring(this.index,this.index+5).toUpperCase(),n="PUBLIC"===t.toUpperCase(),r="SYSTEM"===t.toUpperCase();(n||r)&&(this.consume(),this.consume(),this.consume(),this.consume(),this.consume(),this.consume()),n?this.transitionTo("afterDoctypePublicKeyword"):r&&this.transitionTo("afterDoctypeSystemKeyword")}},afterDoctypePublicKeyword:function(){var e=this.peek();Gs(e)?(this.transitionTo("beforeDoctypePublicIdentifier"),this.consume()):'"'===e?(this.transitionTo("doctypePublicIdentifierDoubleQuoted"),this.consume()):"'"===e?(this.transitionTo("doctypePublicIdentifierSingleQuoted"),this.consume()):">"===e&&(this.consume(),this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData"))},doctypePublicIdentifierDoubleQuoted:function(){var e=this.consume();'"'===e?this.transitionTo("afterDoctypePublicIdentifier"):">"===e?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypePublicIdentifier&&this.delegate.appendToDoctypePublicIdentifier(e)},doctypePublicIdentifierSingleQuoted:function(){var e=this.consume();"'"===e?this.transitionTo("afterDoctypePublicIdentifier"):">"===e?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypePublicIdentifier&&this.delegate.appendToDoctypePublicIdentifier(e)},afterDoctypePublicIdentifier:function(){var e=this.consume();Gs(e)?this.transitionTo("betweenDoctypePublicAndSystemIdentifiers"):">"===e?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):'"'===e?this.transitionTo("doctypeSystemIdentifierDoubleQuoted"):"'"===e&&this.transitionTo("doctypeSystemIdentifierSingleQuoted")},betweenDoctypePublicAndSystemIdentifiers:function(){var e=this.consume();Gs(e)||(">"===e?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):'"'===e?this.transitionTo("doctypeSystemIdentifierDoubleQuoted"):"'"===e&&this.transitionTo("doctypeSystemIdentifierSingleQuoted"))},doctypeSystemIdentifierDoubleQuoted:function(){var e=this.consume();'"'===e?this.transitionTo("afterDoctypeSystemIdentifier"):">"===e?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypeSystemIdentifier&&this.delegate.appendToDoctypeSystemIdentifier(e)},doctypeSystemIdentifierSingleQuoted:function(){var e=this.consume();"'"===e?this.transitionTo("afterDoctypeSystemIdentifier"):">"===e?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypeSystemIdentifier&&this.delegate.appendToDoctypeSystemIdentifier(e)},afterDoctypeSystemIdentifier:function(){var e=this.consume();Gs(e)||">"===e&&(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData"))},commentStart:function(){var e=this.consume();"-"===e?this.transitionTo("commentStartDash"):">"===e?(this.delegate.finishComment(),this.transitionTo("beforeData")):(this.delegate.appendToCommentData(e),this.transitionTo("comment"))},commentStartDash:function(){var e=this.consume();"-"===e?this.transitionTo("commentEnd"):">"===e?(this.delegate.finishComment(),this.transitionTo("beforeData")):(this.delegate.appendToCommentData("-"),this.transitionTo("comment"))},comment:function(){var e=this.consume();"-"===e?this.transitionTo("commentEndDash"):this.delegate.appendToCommentData(e)},commentEndDash:function(){var e=this.consume();"-"===e?this.transitionTo("commentEnd"):(this.delegate.appendToCommentData("-"+e),this.transitionTo("comment"))},commentEnd:function(){var e=this.consume();">"===e?(this.delegate.finishComment(),this.transitionTo("beforeData")):(this.delegate.appendToCommentData("--"+e),this.transitionTo("comment"))},tagName:function(){var e=this.consume();Gs(e)?this.transitionTo("beforeAttributeName"):"/"===e?this.transitionTo("selfClosingStartTag"):">"===e?(this.delegate.finishTag(),this.transitionTo("beforeData")):this.appendToTagName(e)},endTagName:function(){var e=this.consume();Gs(e)?(this.transitionTo("beforeAttributeName"),this.tagNameBuffer=""):"/"===e?(this.transitionTo("selfClosingStartTag"),this.tagNameBuffer=""):">"===e?(this.delegate.finishTag(),this.transitionTo("beforeData"),this.tagNameBuffer=""):this.appendToTagName(e)},beforeAttributeName:function(){var e=this.peek();Gs(e)?this.consume():"/"===e?(this.transitionTo("selfClosingStartTag"),this.consume()):">"===e?(this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):"="===e?(this.delegate.reportSyntaxError("attribute name cannot start with equals sign"),this.transitionTo("attributeName"),this.delegate.beginAttribute(),this.consume(),this.delegate.appendToAttributeName(e)):(this.transitionTo("attributeName"),this.delegate.beginAttribute())},attributeName:function(){var e=this.peek();Gs(e)?(this.transitionTo("afterAttributeName"),this.consume()):"/"===e?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.transitionTo("selfClosingStartTag")):"="===e?(this.transitionTo("beforeAttributeValue"),this.consume()):">"===e?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):'"'===e||"'"===e||"<"===e?(this.delegate.reportSyntaxError(e+" is not a valid character within attribute names"),this.consume(),this.delegate.appendToAttributeName(e)):(this.consume(),this.delegate.appendToAttributeName(e))},afterAttributeName:function(){var e=this.peek();Gs(e)?this.consume():"/"===e?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.transitionTo("selfClosingStartTag")):"="===e?(this.consume(),this.transitionTo("beforeAttributeValue")):">"===e?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.transitionTo("attributeName"),this.delegate.beginAttribute(),this.consume(),this.delegate.appendToAttributeName(e))},beforeAttributeValue:function(){var e=this.peek();Gs(e)?this.consume():'"'===e?(this.transitionTo("attributeValueDoubleQuoted"),this.delegate.beginAttributeValue(!0),this.consume()):"'"===e?(this.transitionTo("attributeValueSingleQuoted"),this.delegate.beginAttributeValue(!0),this.consume()):">"===e?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):(this.transitionTo("attributeValueUnquoted"),this.delegate.beginAttributeValue(!1),this.consume(),this.delegate.appendToAttributeValue(e))},attributeValueDoubleQuoted:function(){var e=this.consume();'"'===e?(this.delegate.finishAttributeValue(),this.transitionTo("afterAttributeValueQuoted")):"&"===e?this.delegate.appendToAttributeValue(this.consumeCharRef()||"&"):this.delegate.appendToAttributeValue(e)},attributeValueSingleQuoted:function(){var e=this.consume();"'"===e?(this.delegate.finishAttributeValue(),this.transitionTo("afterAttributeValueQuoted")):"&"===e?this.delegate.appendToAttributeValue(this.consumeCharRef()||"&"):this.delegate.appendToAttributeValue(e)},attributeValueUnquoted:function(){var e=this.peek();Gs(e)?(this.delegate.finishAttributeValue(),this.consume(),this.transitionTo("beforeAttributeName")):"/"===e?(this.delegate.finishAttributeValue(),this.consume(),this.transitionTo("selfClosingStartTag")):"&"===e?(this.consume(),this.delegate.appendToAttributeValue(this.consumeCharRef()||"&")):">"===e?(this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):(this.consume(),this.delegate.appendToAttributeValue(e))},afterAttributeValueQuoted:function(){var e=this.peek();Gs(e)?(this.consume(),this.transitionTo("beforeAttributeName")):"/"===e?(this.consume(),this.transitionTo("selfClosingStartTag")):">"===e?(this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):this.transitionTo("beforeAttributeName")},selfClosingStartTag:function(){">"===this.peek()?(this.consume(),this.delegate.markTagAsSelfClosing(),this.delegate.finishTag(),this.transitionTo("beforeData")):this.transitionTo("beforeAttributeName")},endTagOpen:function(){var e=this.consume();("@"===e||":"===e||Ks(e))&&(this.transitionTo("endTagName"),this.tagNameBuffer="",this.delegate.beginEndTag(),this.appendToTagName(e))}},this.reset()}return e.prototype.reset=function(){this.transitionTo("beforeData"),this.input="",this.tagNameBuffer="",this.index=0,this.line=1,this.column=0,this.delegate.reset()},e.prototype.transitionTo=function(e){this.state=e},e.prototype.tokenize=function(e){this.reset(),this.tokenizePart(e),this.tokenizeEOF()},e.prototype.tokenizePart=function(e){for(this.input+=function(e){return e.replace(qs,"\n")}(e);this.index<this.input.length;){var t=this.states[this.state];if(void 0===t)throw new Error("unhandled state "+this.state);t.call(this)}},e.prototype.tokenizeEOF=function(){this.flushData()},e.prototype.flushData=function(){"data"===this.state&&(this.delegate.finishData(),this.transitionTo("beforeData"))},e.prototype.peek=function(){return this.input.charAt(this.index)},e.prototype.consume=function(){var e=this.peek();return this.index++,"\n"===e?(this.line++,this.column=0):this.column++,e},e.prototype.consumeCharRef=function(){var e=this.input.indexOf(";",this.index);if(-1!==e){var t=this.input.slice(this.index,e),n=this.entityParser.parse(t);if(n){for(var r=t.length;r;)this.consume(),r--;return this.consume(),n}}},e.prototype.markTagStart=function(){this.delegate.tagOpen()},e.prototype.appendToTagName=function(e){this.tagNameBuffer+=e,this.delegate.appendToTagName(e)},e.prototype.isIgnoredEndTag=function(){var e=this.tagNameBuffer;return"title"===e&&"</title>"!==this.input.substring(this.index,this.index+8)||"style"===e&&"</style>"!==this.input.substring(this.index,this.index+8)||"script"===e&&"<\/script>"!==this.input.substring(this.index,this.index+9)},e}(),Xs=function(){function e(e,t){void 0===t&&(t={}),this.options=t,this.token=null,this.startLine=1,this.startColumn=0,this.tokens=[],this.tokenizer=new Ys(this,e,t.mode),this._currentAttribute=void 0}return e.prototype.tokenize=function(e){return this.tokens=[],this.tokenizer.tokenize(e),this.tokens},e.prototype.tokenizePart=function(e){return this.tokens=[],this.tokenizer.tokenizePart(e),this.tokens},e.prototype.tokenizeEOF=function(){return this.tokens=[],this.tokenizer.tokenizeEOF(),this.tokens[0]},e.prototype.reset=function(){this.token=null,this.startLine=1,this.startColumn=0},e.prototype.current=function(){var e=this.token;if(null===e)throw new Error("token was unexpectedly null");if(0===arguments.length)return e;for(var t=0;t<arguments.length;t++)if(e.type===arguments[t])return e;throw new Error("token type was unexpectedly "+e.type)},e.prototype.push=function(e){this.token=e,this.tokens.push(e)},e.prototype.currentAttribute=function(){return this._currentAttribute},e.prototype.addLocInfo=function(){this.options.loc&&(this.current().loc={start:{line:this.startLine,column:this.startColumn},end:{line:this.tokenizer.line,column:this.tokenizer.column}}),this.startLine=this.tokenizer.line,this.startColumn=this.tokenizer.column},e.prototype.beginDoctype=function(){this.push({type:"Doctype",name:""})},e.prototype.appendToDoctypeName=function(e){this.current("Doctype").name+=e},e.prototype.appendToDoctypePublicIdentifier=function(e){var t=this.current("Doctype");void 0===t.publicIdentifier?t.publicIdentifier=e:t.publicIdentifier+=e},e.prototype.appendToDoctypeSystemIdentifier=function(e){var t=this.current("Doctype");void 0===t.systemIdentifier?t.systemIdentifier=e:t.systemIdentifier+=e},e.prototype.endDoctype=function(){this.addLocInfo()},e.prototype.beginData=function(){this.push({type:"Chars",chars:""})},e.prototype.appendToData=function(e){this.current("Chars").chars+=e},e.prototype.finishData=function(){this.addLocInfo()},e.prototype.beginComment=function(){this.push({type:"Comment",chars:""})},e.prototype.appendToCommentData=function(e){this.current("Comment").chars+=e},e.prototype.finishComment=function(){this.addLocInfo()},e.prototype.tagOpen=function(){},e.prototype.beginStartTag=function(){this.push({type:"StartTag",tagName:"",attributes:[],selfClosing:!1})},e.prototype.beginEndTag=function(){this.push({type:"EndTag",tagName:""})},e.prototype.finishTag=function(){this.addLocInfo()},e.prototype.markTagAsSelfClosing=function(){this.current("StartTag").selfClosing=!0},e.prototype.appendToTagName=function(e){this.current("StartTag","EndTag").tagName+=e},e.prototype.beginAttribute=function(){this._currentAttribute=["","",!1]},e.prototype.appendToAttributeName=function(e){this.currentAttribute()[0]+=e},e.prototype.beginAttributeValue=function(e){this.currentAttribute()[2]=e},e.prototype.appendToAttributeValue=function(e){this.currentAttribute()[1]+=e},e.prototype.finishAttributeValue=function(){this.current("StartTag").attributes.push(this._currentAttribute)},e.prototype.reportSyntaxError=function(e){this.current().syntaxError=e},e}();let Js;function Qs(e){if("string"!=typeof e||-1===e.indexOf("&"))return e;void 0===Js&&(Js=document.implementation&&document.implementation.createHTMLDocument?document.implementation.createHTMLDocument("").createElement("textarea"):document.createElement("textarea")),Js.innerHTML=e;const t=Js.textContent;return Js.innerHTML="",t}function ec(){function e(e){return(t,...n)=>e("Block validation: "+t,...n)}return{error:e(console.error),warning:e(console.warn),getItems:()=>[]}}const tc=/[\t\n\r\v\f ]+/g,nc=/^[\t\n\r\v\f ]*$/,rc=/^url\s*\(['"\s]*(.*?)['"\s]*\)$/,oc=["allowfullscreen","allowpaymentrequest","allowusermedia","async","autofocus","autoplay","checked","controls","default","defer","disabled","download","formnovalidate","hidden","ismap","itemscope","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected","typemustmatch"],ic=[...oc,"autocapitalize","autocomplete","charset","contenteditable","crossorigin","decoding","dir","draggable","enctype","formenctype","formmethod","http-equiv","inputmode","kind","method","preload","scope","shape","spellcheck","translate","type","wrap"],ac=[Ce.identity,function(e){return dc(e).join(" ")}],lc=/^[\da-z]+$/i,sc=/^#\d+$/,cc=/^#x[\da-f]+$/i;class uc{parse(e){if(t=e,lc.test(t)||sc.test(t)||cc.test(t))return Qs("&"+e+";");var t}}function dc(e){return e.trim().split(tc)}function pc(e){return e.attributes.filter((e=>{const[t,n]=e;return n||0===t.indexOf("data-")||(0,Ce.includes)(ic,t)}))}function mc(e,t,n=ec()){let r=e.chars,o=t.chars;for(let e=0;e<ac.length;e++){const t=ac[e];if(r=t(r),o=t(o),r===o)return!0}return n.warning("Expected text `%s`, saw `%s`.",t.chars,e.chars),!1}function fc(e){return 0===parseFloat(e)?"0":0===e.indexOf(".")?"0"+e:e}function hc(e){return dc(e).map(fc).join(" ").replace(rc,"url($1)")}function gc(e){const t=e.replace(/;?\s*$/,"").split(";").map((e=>{const[t,...n]=e.split(":"),r=n.join(":");return[t.trim(),hc(r.trim())]}));return(0,Ce.fromPairs)(t)}const vc={class:(e,t)=>!(0,Ce.xor)(...[e,t].map(dc)).length,style:(e,t)=>(0,Ce.isEqual)(...[e,t].map(gc)),...(0,Ce.fromPairs)(oc.map((e=>[e,Ce.stubTrue])))},bc={StartTag:(e,t,n=ec())=>e.tagName!==t.tagName&&e.tagName.toLowerCase()!==t.tagName.toLowerCase()?(n.warning("Expected tag name `%s`, instead saw `%s`.",t.tagName,e.tagName),!1):function(e,t,n=ec()){if(e.length!==t.length)return n.warning("Expected attributes %o, instead saw %o.",t,e),!1;const r={};for(let e=0;e<t.length;e++)r[t[e][0].toLowerCase()]=t[e][1];for(let t=0;t<e.length;t++){const[o,i]=e[t],a=o.toLowerCase();if(!r.hasOwnProperty(a))return n.warning("Encountered unexpected attribute `%s`.",o),!1;const l=r[a],s=vc[a];if(s){if(!s(i,l))return n.warning("Expected attribute `%s` of value `%s`, saw `%s`.",o,l,i),!1}else if(i!==l)return n.warning("Expected attribute `%s` of value `%s`, saw `%s`.",o,l,i),!1}return!0}(...[e,t].map(pc),n),Chars:mc,Comment:mc};function yc(e){let t;for(;t=e.shift();){if("Chars"!==t.type)return t;if(!nc.test(t.chars))return t}}function wc(e,t){return!!e.selfClosing&&!(!t||t.tagName!==e.tagName||"EndTag"!==t.type)}function kc(e,t){if(e.name===Ml()||e.name===Bl())return[!0];const n=function(){const e=[],t=ec();return{error(...n){e.push({log:t.error,args:n})},warning(...n){e.push({log:t.warning,args:n})},getItems:()=>e}}(),r=Cl(t);let o;try{o=Vs(r,e.attributes)}catch(e){return n.error("Block validation failed because an error occurred while generating block content:\n\n%s",e.toString()),[!1,n.getItems()]}const i=function(e,t,n=ec()){if(e===t)return!0;const[r,o]=[e,t].map((e=>function(e,t=ec()){try{return new Xs(new uc).tokenize(e)}catch(n){t.warning("Malformed HTML detected: %s",e)}return null}(e,n)));if(!r||!o)return!1;let i,a;for(;i=yc(r);){if(a=yc(o),!a)return n.warning("Expected end of content, instead saw %o.",i),!1;if(i.type!==a.type)return n.warning("Expected token of type `%s` (%o), instead saw `%s` (%o).",a.type,a,i.type,i),!1;const e=bc[i.type];if(e&&!e(i,a,n))return!1;wc(i,o[0])?yc(o):wc(a,r[0])&&yc(r)}return!(a=yc(o))||(n.warning("Expected %o, instead saw end of content.",a),!1)}(e.originalContent,o,n);return i||n.error("Block validation failed for `%s` (%o).\n\nContent generated by `save` function:\n\n%s\n\nContent retrieved from post body:\n\n%s",r.name,r,o,e.originalContent),[i,n.getItems()]}function Ec(e,t){const n={...t};if("core/cover-image"===e&&(e="core/cover"),"core/text"!==e&&"core/cover-text"!==e||(e="core/paragraph"),e&&0===e.indexOf("core/social-link-")&&(n.service=e.substring(17),e="core/social-link"),e&&0===e.indexOf("core-embed/")){const t=e.substring(11),r={speaker:"speaker-deck",polldaddy:"crowdsignal"};n.providerNameSlug=t in r?r[t]:t,["amazon-kindle","wordpress"].includes(t)||(n.responsive=!0),e="core/embed"}return"core/query-loop"===e&&(e="core/post-template"),[e,n]}function _c(e,t={}){const{isCommentDelimited:n=!0}=t,{blockName:r,attrs:o={},innerBlocks:i=[],innerContent:a=[]}=e;let l=0;const s=a.map((e=>null!==e?e:_c(i[l++],t))).join("\n").replace(/\n+/g,"\n").trim();return n?Zs(r,o,s):s}function Cc(e,t){for(var n,r=t.split(".");n=r.shift();){if(!(n in e))return;e=e[n]}return e}var xc,Sc=function(){return xc||(xc=document.implementation.createHTMLDocument("")),xc};function Ic(e,t){if(t){if("string"==typeof e){var n=Sc();n.body.innerHTML=e,e=n.body}if("function"==typeof t)return t(e);if(Object===t.constructor)return Object.keys(t).reduce((function(n,r){return n[r]=Ic(e,t[r]),n}),{})}}function Tc(e,t){return 1===arguments.length&&(t=e,e=void 0),function(n){var r=n;if(e&&(r=n.querySelector(e)),r)return Cc(r,t)}}function Nc(e){const t={};for(let n=0;n<e.length;n++){const{name:r,value:o}=e[n];t[r]=o}return t}function Ac(e){if(e.nodeType===e.TEXT_NODE)return e.nodeValue;if(e.nodeType!==e.ELEMENT_NODE)throw new TypeError("A block node can only be created from a node of type text or element.");return{type:e.nodeName.toLowerCase(),props:{...Nc(e.attributes),children:Rc(e.childNodes)}}}function Rc(e){const t=[];for(let n=0;n<e.length;n++)try{t.push(Ac(e[n]))}catch(e){}return t}function Lc(e){return t=>{let n=t;return e&&(n=t.querySelector(e)),n?Rc(n.childNodes):[]}}var Pc={concat:function(...e){const t=[];for(let n=0;n<e.length;n++){const r=(0,Ce.castArray)(e[n]);for(let e=0;e<r.length;e++){const n=r[e];"string"==typeof n&&"string"==typeof t[t.length-1]?t[t.length-1]+=n:t.push(n)}}return t},getChildrenArray:function(e){return e},fromDOM:Rc,toHTML:function(e){return Ps(e)},matcher:Lc};function Oc(e,t,n,r){const{type:o,enum:i}=t;let a;switch(t.source){case void 0:a=r?r[e]:void 0;break;case"attribute":case"property":case"html":case"text":case"children":case"node":case"query":case"tag":a=Mc(n,t)}return function(e,t){return void 0===t||function(e,t){return t.some((t=>function(e,t){switch(t){case"string":return"string"==typeof e;case"boolean":return"boolean"==typeof e;case"object":return!!e&&e.constructor===Object;case"null":return null===e;case"array":return Array.isArray(e);case"integer":case"number":return"number"==typeof e}return!0}(e,t)))}(e,(0,Ce.castArray)(t))}(a,o)&&function(e,t){return!Array.isArray(t)||t.includes(e)}(a,i)||(a=void 0),void 0===a?t.default:a}function Dc(e){switch(e.source){case"attribute":let t=function(e,t){return 1===arguments.length&&(t=e,e=void 0),function(n){var r=Tc(e,"attributes")(n);if(r&&r.hasOwnProperty(t))return r[t].value}}(e.selector,e.attribute);return"boolean"===e.type&&(t=(e=>(0,Ce.flow)([e,e=>void 0!==e]))(t)),t;case"html":return function(e,t){return n=>{let r=n;if(e&&(r=n.querySelector(e)),!r)return"";if(t){let e="";const n=r.children.length;for(let o=0;o<n;o++){const n=r.children[o];n.nodeName.toLowerCase()===t&&(e+=n.outerHTML)}return e}return r.innerHTML}}(e.selector,e.multiline);case"text":return function(e){return Tc(e,"textContent")}(e.selector);case"children":return Lc(e.selector);case"node":return function(e){return t=>{let n=t;e&&(n=t.querySelector(e));try{return Ac(n)}catch(e){return null}}}(e.selector);case"query":const n=(0,Ce.mapValues)(e.query,Dc);return function(e,t){return function(n){var r=n.querySelectorAll(e);return[].map.call(r,(function(e){return Ic(e,t)}))}}(e.selector,n);case"tag":return(0,Ce.flow)([Tc(e.selector,"nodeName"),e=>e?e.toLowerCase():void 0]);default:console.error(`Unknown source type "${e.source}"`)}}function Mc(e,t){return Ic(e,Dc(t))}function Bc(e,t,n={}){const r=Cl(e),o=(0,Ce.mapValues)(r.attributes,((e,r)=>Oc(r,e,t,n)));return(0,W.O)("blocks.getBlockAttributes",o,r,t,n)}function Fc(e){const t=Mc(e=`<div data-custom-class-name>${e}</div>`,{type:"string",source:"attribute",selector:"[data-custom-class-name] > *",attribute:"class"});return t?t.trim().split(/\s+/):[]}function zc(e,t){const n=function(e,t,n){if(Wl(t,"customClassName",!0)){const r=Vs(t,(0,Ce.omit)(e,["className"])),o=Fc(r),i=Fc(n),a=(0,Ce.difference)(i,o);a.length?e.className=a.join(" "):r&&delete e.className}return e}(e.attributes,t,e.originalContent);return{...e,attributes:n}}function Hc(e){const t=Ml(),n=e.blockName||Ml(),r=e.attrs||{},o=e.innerBlocks||[];let i=e.innerHTML.trim();return n===t&&(i=function(e,t=!0){const n=[];if(""===e.trim())return"";if(-1!==(e+="\n").indexOf("<pre")){const t=e.split("</pre>"),r=t.pop();e="";for(let r=0;r<t.length;r++){const o=t[r],i=o.indexOf("<pre");if(-1===i){e+=o;continue}const a="<pre wp-pre-tag-"+r+"></pre>";n.push([a,o.substr(i)+"</pre>"]),e+=o.substr(0,i)+a}e+=r}const r="(?:table|thead|tfoot|caption|col|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|form|map|area|blockquote|address|math|style|p|h[1-6]|hr|fieldset|legend|section|article|aside|hgroup|header|footer|nav|figure|figcaption|details|menu|summary)";-1!==(e=function(e,t){const n=function(e){const t=[];let n,r=e;for(;n=r.match(ms);){const e=n.index;t.push(r.slice(0,e)),t.push(n[0]),r=r.slice(e+n[0].length)}return r.length&&t.push(r),t}(e);let r=!1;const o=Object.keys(t);for(let e=1;e<n.length;e+=2)for(let i=0;i<o.length;i++){const a=o[i];if(-1!==n[e].indexOf(a)){n[e]=n[e].replace(new RegExp(a,"g"),t[a]),r=!0;break}}return r&&(e=n.join("")),e}(e=(e=(e=(e=e.replace(/<br\s*\/?>\s*<br\s*\/?>/g,"\n\n")).replace(new RegExp("(<"+r+"[\\s/>])","g"),"\n\n$1")).replace(new RegExp("(</"+r+">)","g"),"$1\n\n")).replace(/\r\n|\r/g,"\n"),{"\n":" \x3c!-- wpnl --\x3e "})).indexOf("<option")&&(e=(e=e.replace(/\s*<option/g,"<option")).replace(/<\/option>\s*/g,"</option>")),-1!==e.indexOf("</object>")&&(e=(e=(e=e.replace(/(<object[^>]*>)\s*/g,"$1")).replace(/\s*<\/object>/g,"</object>")).replace(/\s*(<\/?(?:param|embed)[^>]*>)\s*/g,"$1")),-1===e.indexOf("<source")&&-1===e.indexOf("<track")||(e=(e=(e=e.replace(/([<\[](?:audio|video)[^>\]]*[>\]])\s*/g,"$1")).replace(/\s*([<\[]\/(?:audio|video)[>\]])/g,"$1")).replace(/\s*(<(?:source|track)[^>]*>)\s*/g,"$1")),-1!==e.indexOf("<figcaption")&&(e=(e=e.replace(/\s*(<figcaption[^>]*>)/,"$1")).replace(/<\/figcaption>\s*/,"</figcaption>"));const o=(e=e.replace(/\n\n+/g,"\n\n")).split(/\n\s*\n/).filter(Boolean);return e="",o.forEach((t=>{e+="<p>"+t.replace(/^\n*|\n*$/g,"")+"</p>\n"})),e=(e=(e=(e=(e=(e=(e=(e=e.replace(/<p>\s*<\/p>/g,"")).replace(/<p>([^<]+)<\/(div|address|form)>/g,"<p>$1</p></$2>")).replace(new RegExp("<p>\\s*(</?"+r+"[^>]*>)\\s*</p>","g"),"$1")).replace(/<p>(<li.+?)<\/p>/g,"$1")).replace(/<p><blockquote([^>]*)>/gi,"<blockquote$1><p>")).replace(/<\/blockquote><\/p>/g,"</p></blockquote>")).replace(new RegExp("<p>\\s*(</?"+r+"[^>]*>)","g"),"$1")).replace(new RegExp("(</?"+r+"[^>]*>)\\s*</p>","g"),"$1"),t&&(e=(e=(e=(e=e.replace(/<(script|style).*?<\/\\1>/g,(e=>e[0].replace(/\n/g,"<WPPreserveNewline />")))).replace(/<br>|<br\/>/g,"<br />")).replace(/(<br \/>)?\s*\n/g,((e,t)=>t?e:"<br />\n"))).replace(/<WPPreserveNewline \/>/g,"\n")),e=(e=(e=e.replace(new RegExp("(</?"+r+"[^>]*>)\\s*<br />","g"),"$1")).replace(/<br \/>(\s*<\/?(?:p|li|div|dl|dd|dt|th|pre|td|ul|ol)[^>]*>)/g,"$1")).replace(/\n<\/p>$/g,"</p>"),n.forEach((t=>{const[n,r]=t;e=e.replace(n,r)})),-1!==e.indexOf("\x3c!-- wpnl --\x3e")&&(e=e.replace(/\s?<!-- wpnl -->\s?/g,"\n")),e}(i).trim()),{...e,blockName:n,attrs:r,innerHTML:i,innerBlocks:o}}function Vc(e){let t=Hc(e);t=function(e){const[t,n]=Ec(e.blockName,e.attrs);return{...e,blockName:t,attrs:n}}(t);let n=zl(t.blockName);n||(t=function(e){const t=Bl()||Ml(),n=_c(e,{isCommentDelimited:!1}),r=_c(e,{isCommentDelimited:!0});return{blockName:t,attrs:{originalName:e.blockName,originalContent:r,originalUndelimitedContent:n},innerHTML:e.blockName?r:e.innerHTML,innerBlocks:e.innerBlocks,innerContent:e.innerContent}}(t),n=zl(t.blockName));const r=t.blockName===Ml()||t.blockName===Bl();if(!n||!t.innerHTML&&r)return;const o=t.innerBlocks.map(Vc).filter((e=>!!e));let i=Ul(t.blockName,Bc(n,t.innerHTML,t.attrs),o);i.originalContent=t.innerHTML;let[a,l]=kc(i,n);return a||(i=zc(i,n),[a,l]=kc(i,n)),i.isValid=a,i.validationIssues=l,i=function(e,t,n){const r=t.attrs,{deprecated:o}=n;if(!o||!o.length)return e;for(let t=0;t<o.length;t++){const{isEligible:i=Ce.stubFalse}=o[t];if(e.isValid&&!i(r,e.innerBlocks))continue;const a=Object.assign((0,Ce.omit)(n,Il),o[t]);let l={...e,attributes:Bc(a,e.originalContent,r)},[s]=kc(l,a);if(s||(l=zc(l,a),[s]=kc(l,a)),!s)continue;let c=l.innerBlocks,u=l.attributes;const{migrate:d}=a;d&&([u=r,c=e.innerBlocks]=(0,Ce.castArray)(d(u,e.innerBlocks))),e={...e,attributes:u,innerBlocks:c,isValid:!0,validationIssues:[]}}return e}(i,t,n),l&&l.length>0&&(i.isValid?console.info("Block successfully updated for `%s` (%o).\n\nNew content generated by `save` function:\n\n%s\n\nContent retrieved from post body:\n\n%s",n.name,n,Vs(n,i.attributes),i.originalContent):l.forEach((({log:e,args:t})=>e(...t)))),i}function Wc(e){return(e=>{ns=e,rs=0,os=[],is=[],as.lastIndex=0;do{}while(cs());return os})(e).reduce(((e,t)=>{const n=Vc(t);return n&&e.push(n),e}),[])}function Zc(){return(0,Ce.filter)(Ql("from"),{type:"raw"}).map((e=>e.isMatch?e:{...e,isMatch:t=>e.selector&&t.matches(e.selector)}))}function jc(e){const t=document.implementation.createHTMLDocument("");return t.body.innerHTML=e,Array.from(t.body.children).flatMap((e=>{const t=Jl(Zc(),(({isMatch:t})=>t(e)));if(!t)return Ul("core/html",Bc("core/html",e.outerHTML));const{transform:n,blockName:r}=t;return n?n(e):Ul(r,Bc(r,e.outerHTML))}))}function Uc(e){switch(e.nodeType){case e.TEXT_NODE:return/^[ \f\n\r\t\v\u00a0]*$/.test(e.nodeValue||"");case e.ELEMENT_NODE:return!e.hasAttributes()&&(!e.hasChildNodes()||Array.from(e.childNodes).every(Uc));default:return!0}}const $c={strong:{},em:{},s:{},del:{},ins:{},a:{attributes:["href","target","rel"]},code:{},abbr:{attributes:["title"]},sub:{},sup:{},br:{},small:{},q:{attributes:["cite"]},dfn:{attributes:["title"]},data:{attributes:["value"]},time:{attributes:["datetime"]},var:{},samp:{},kbd:{},i:{},b:{},u:{},mark:{},ruby:{},rt:{},rp:{},bdi:{attributes:["dir"]},bdo:{attributes:["dir"]},wbr:{},"#text":{}};(0,Ce.without)(Object.keys($c),"#text","br").forEach((e=>{$c[e].children=(0,Ce.omit)($c,e)}));const qc={...$c,audio:{attributes:["src","preload","autoplay","mediagroup","loop","muted"]},canvas:{attributes:["width","height"]},embed:{attributes:["src","type","width","height"]},img:{attributes:["alt","src","srcset","usemap","ismap","width","height"]},object:{attributes:["data","type","name","usemap","form","width","height"]},video:{attributes:["src","poster","preload","autoplay","mediagroup","loop","muted","controls","width","height"]}};function Gc(e){return"paste"!==e?qc:(0,Ce.omit)({...qc,ins:{children:qc.ins.children},del:{children:qc.del.children}},["u","abbr","data","time","wbr","bdi","bdo"])}function Kc(e){const t=e.nodeName.toLowerCase();return Gc().hasOwnProperty(t)||"span"===t}function Yc(e){const t=e.nodeName.toLowerCase();return $c.hasOwnProperty(t)||"span"===t}function Xc(e){const t=document.implementation.createHTMLDocument(""),n=document.implementation.createHTMLDocument(""),r=t.body,o=n.body;for(r.innerHTML=e;r.firstChild;){const e=r.firstChild;e.nodeType===e.TEXT_NODE?Uc(e)?r.removeChild(e):(o.lastChild&&"P"===o.lastChild.nodeName||o.appendChild(n.createElement("P")),o.lastChild.appendChild(e)):e.nodeType===e.ELEMENT_NODE?"BR"===e.nodeName?(e.nextSibling&&"BR"===e.nextSibling.nodeName&&(o.appendChild(n.createElement("P")),r.removeChild(e.nextSibling)),o.lastChild&&"P"===o.lastChild.nodeName&&o.lastChild.hasChildNodes()?o.lastChild.appendChild(e):r.removeChild(e)):"P"===e.nodeName?Uc(e)?r.removeChild(e):o.appendChild(e):Kc(e)?(o.lastChild&&"P"===o.lastChild.nodeName||o.appendChild(n.createElement("P")),o.lastChild.appendChild(e)):o.appendChild(e):r.removeChild(e)}return o.innerHTML}function Jc(e,t){t.parentNode,t.parentNode.insertBefore(e,t.nextSibling)}function Qc(e){e.parentNode,e.parentNode.removeChild(e)}function eu(e,t){e.parentNode,Jc(t,e.parentNode),Qc(e)}function tu(e,t){if(e.nodeType===e.COMMENT_NODE)if("nextpage"!==e.nodeValue){if(0===e.nodeValue.indexOf("more")){const n=e.nodeValue.slice(4).trim();let r=e,o=!1;for(;r=r.nextSibling;)if(r.nodeType===r.COMMENT_NODE&&"noteaser"===r.nodeValue){o=!0,Qc(r);break}eu(e,function(e,t,n){const r=n.createElement("wp-block");return r.dataset.block="core/more",e&&(r.dataset.customText=e),t&&(r.dataset.noTeaser=""),r}(n,o,t))}}else eu(e,function(e){const t=e.createElement("wp-block");return t.dataset.block="core/nextpage",t}(t))}function nu(e){const t=e.parentNode;for(;e.firstChild;)t.insertBefore(e.firstChild,e);t.removeChild(e)}function ru(e){return"OL"===e.nodeName||"UL"===e.nodeName}function ou(e){if(!ru(e))return;const t=e,n=e.previousElementSibling;if(n&&n.nodeName===e.nodeName&&1===t.children.length){for(;t.firstChild;)n.appendChild(t.firstChild);t.parentNode.removeChild(t)}const r=e.parentNode;if(r&&"LI"===r.nodeName&&1===r.children.length&&!/\S/.test((o=r,Array.from(o.childNodes).map((({nodeValue:e=""})=>e)).join("")))){const e=r,n=e.previousElementSibling,o=e.parentNode;n?(n.appendChild(t),o.removeChild(e)):(o.parentNode.insertBefore(t,o),o.parentNode.removeChild(o))}var o;if(r&&ru(r)){const t=e.previousElementSibling;t?t.appendChild(e):nu(e)}}function iu(e){"BLOCKQUOTE"===e.nodeName&&(e.innerHTML=Xc(e.innerHTML))}function au(e,t=e){const n=e.ownerDocument.createElement("figure");t.parentNode.insertBefore(n,t),n.appendChild(e)}function lu(e,t,n){if(!function(e,t){const n=e.nodeName.toLowerCase();return"figcaption"!==n&&!Yc(e)&&(0,Ce.has)(t,["figure","children",n])}(e,n))return;let r=e;const o=e.parentNode;(function(e,t){const n=e.nodeName.toLowerCase();return(0,Ce.has)(t,["figure","children","a","children",n])})(e,n)&&"A"===o.nodeName&&1===o.childNodes.length&&(r=e.parentNode);const i=r.closest("p,div");i?e.classList?(e.classList.contains("alignright")||e.classList.contains("alignleft")||e.classList.contains("aligncenter")||!i.textContent.trim())&&au(r,i):au(r,i):"BODY"===r.parentNode.nodeName&&au(r)}function su(e,t,n=0){const r=cu(e);r.lastIndex=n;const o=r.exec(t);if(!o)return;if("["===o[1]&&"]"===o[7])return su(e,t,r.lastIndex);const i={index:o.index,content:o[0],shortcode:du(o)};return o[1]&&(i.content=i.content.slice(1),i.index++),o[7]&&(i.content=i.content.slice(0,-1)),i}function cu(e){return new RegExp("\\[(\\[?)("+e+")(?![\\w-])([^\\]\\/]*(?:\\/(?!\\])[^\\]\\/]*)*?)(?:(\\/)\\]|\\](?:([^\\[]*(?:\\[(?!\\/\\2\\])[^\\[]*)*)(\\[\\/\\2\\]))?)(\\]?)","g")}const uu=T()((e=>{const t={},n=[],r=/([\w-]+)\s*=\s*"([^"]*)"(?:\s|$)|([\w-]+)\s*=\s*'([^']*)'(?:\s|$)|([\w-]+)\s*=\s*([^\s'"]+)(?:\s|$)|"([^"]*)"(?:\s|$)|'([^']*)'(?:\s|$)|(\S+)(?:\s|$)/g;let o;for(e=e.replace(/[\u00a0\u200b]/g," ");o=r.exec(e);)o[1]?t[o[1].toLowerCase()]=o[2]:o[3]?t[o[3].toLowerCase()]=o[4]:o[5]?t[o[5].toLowerCase()]=o[6]:o[7]?n.push(o[7]):o[8]?n.push(o[8]):o[9]&&n.push(o[9]);return{named:t,numeric:n}}));function du(e){let t;return t=e[4]?"self-closing":e[6]?"closed":"single",new pu({tag:e[2],attrs:e[3],type:t,content:e[5]})}const pu=(0,Ce.extend)((function(e){(0,Ce.extend)(this,(0,Ce.pick)(e||{},"tag","attrs","type","content"));const t=this.attrs;this.attrs={named:{},numeric:[]},t&&((0,Ce.isString)(t)?this.attrs=uu(t):(0,Ce.isEqual)(Object.keys(t),["named","numeric"])?this.attrs=t:(0,Ce.forEach)(t,((e,t)=>{this.set(t,e)})))}),{next:su,replace:function(e,t,n){return t.replace(cu(e),(function(e,t,r,o,i,a,l,s){if("["===t&&"]"===s)return e;const c=n(du(arguments));return c||""===c?t+c+s:e}))},string:function(e){return new pu(e).string()},regexp:cu,attrs:uu,fromMatch:du});(0,Ce.extend)(pu.prototype,{get(e){return this.attrs[(0,Ce.isNumber)(e)?"numeric":"named"][e]},set(e,t){return this.attrs[(0,Ce.isNumber)(e)?"numeric":"named"][e]=t,this},string(){let e="["+this.tag;return(0,Ce.forEach)(this.attrs.numeric,(t=>{/\s/.test(t)?e+=' "'+t+'"':e+=" "+t})),(0,Ce.forEach)(this.attrs.named,((t,n)=>{e+=" "+n+'="'+t+'"'})),"single"===this.type?e+"]":"self-closing"===this.type?e+" /]":(e+="]",this.content&&(e+=this.content),e+"[/"+this.tag+"]")}});var mu=function e(t,n=0,r=[]){const o=Jl(Ql("from"),(e=>-1===r.indexOf(e.blockName)&&"shortcode"===e.type&&(0,Ce.some)((0,Ce.castArray)(e.tag),(e=>cu(e).test(t)))));if(!o)return[t];const i=(0,Ce.castArray)(o.tag),a=(0,Ce.find)(i,(e=>cu(e).test(t)));let l;const s=n;if(l=su(a,t,n)){n=l.index+l.content.length;const i=t.substr(0,l.index),a=t.substr(n);if(!((0,Ce.includes)(l.shortcode.content||"","<")||/(\n|<p>)\s*$/.test(i)&&/^\s*(\n|<\/p>)/.test(a)))return e(t,n);if(o.isMatch&&!o.isMatch(l.shortcode.attrs))return e(t,s,[...r,o.blockName]);const c=(0,Ce.mapValues)((0,Ce.pickBy)(o.attributes,(e=>e.shortcode)),(e=>e.shortcode(l.shortcode.attrs,l))),u={...zl(o.blockName),attributes:o.attributes};let d=Ul(o.blockName,Bc(u,l.shortcode.content,c));return d.originalContent=l.shortcode.content,d=zc(d,u),[...e(i),d,...e(a)]}return[t]};function fu(e){return function(e,t){const n={phrasingContentSchema:Gc(t),isPaste:"paste"===t},r=e.map((({isMatch:e,blockName:t,schema:r})=>{const o=Wl(t,"anchor");return r=(0,Ce.isFunction)(r)?r(n):r,o||e?(0,Ce.mapValues)(r,(t=>{let n=t.attributes||[];return o&&(n=[...n,"id"]),{...t,attributes:n,isMatch:e||void 0}})):r}));return(0,Ce.mergeWith)({},...r,((e,t,n)=>{switch(n){case"children":return"*"===e||"*"===t?"*":{...e,...t};case"attributes":case"require":return[...e||[],...t||[]];case"isMatch":if(!e||!t)return;return(...n)=>e(...n)||t(...n)}}))}(Zc(),e)}function hu(e,t,n,r){Array.from(e).forEach((e=>{hu(e.childNodes,t,n,r),t.forEach((t=>{n.contains(e)&&t(e,n,r)}))}))}function gu(e,t=[],n){const r=document.implementation.createHTMLDocument("");return r.body.innerHTML=e,hu(r.body.childNodes,t,r,n),r.body.innerHTML}function vu(e,t){const n=e[`${t}Sibling`];if(n&&Kc(n))return n;const{parentNode:r}=e;return r&&Kc(r)?vu(r,t):void 0}function bu({HTML:e=""}){if(-1!==e.indexOf("\x3c!-- wp:"))return Wc(e);const t=mu(e),n=fu();return(0,Ce.compact)((0,Ce.flatMap)(t,(e=>"string"!=typeof e?e:jc(e=Xc(e=gu(e,[ou,tu,lu,iu],n))))))}function yu(e,t,n,r){Array.from(e).forEach((e=>{var o,i;const a=e.nodeName.toLowerCase();if(n.hasOwnProperty(a)&&(!n[a].isMatch||null!==(o=(i=n[a]).isMatch)&&void 0!==o&&o.call(i,e))){if(function(e){return!!e&&e.nodeType===e.ELEMENT_NODE}(e)){const{attributes:o=[],classes:i=[],children:l,require:s=[],allowEmpty:c}=n[a];if(l&&!c&&Uc(e))return void Qc(e);if(e.hasAttributes()&&(Array.from(e.attributes).forEach((({name:t})=>{"class"===t||(0,Ce.includes)(o,t)||e.removeAttribute(t)})),e.classList&&e.classList.length)){const t=i.map((e=>"string"==typeof e?t=>t===e:e instanceof RegExp?t=>e.test(t):Ce.noop));Array.from(e.classList).forEach((n=>{t.some((e=>e(n)))||e.classList.remove(n)})),e.classList.length||e.removeAttribute("class")}if(e.hasChildNodes()){if("*"===l)return;if(l)s.length&&!e.querySelector(s.join(","))?(yu(e.childNodes,t,n,r),nu(e)):e.parentNode&&"BODY"===e.parentNode.nodeName&&Kc(e)?(yu(e.childNodes,t,n,r),Array.from(e.childNodes).some((e=>!Kc(e)))&&nu(e)):yu(e.childNodes,t,l,r);else for(;e.firstChild;)Qc(e.firstChild)}}}else yu(e.childNodes,t,n,r),r&&!Kc(e)&&e.nextElementSibling&&Jc(t.createElement("br"),e),nu(e)}))}function wu(e,t,n){const r=document.implementation.createHTMLDocument("");return r.body.innerHTML=e,yu(r.body.childNodes,r,t,n),r.body.innerHTML}function ku(e){e.nodeType===e.COMMENT_NODE&&Qc(e)}function Eu(e,t){return e.every((e=>function(e,t){if(Yc(e))return!0;if(!t)return!1;const n=e.nodeName.toLowerCase();return[["ul","li","ol"],["h1","h2","h3","h4","h5","h6"]].some((e=>0===(0,Ce.difference)([n,t],e).length))}(e,t)&&Eu(Array.from(e.children),t)))}function _u(e){return"BR"===e.nodeName&&e.previousSibling&&"BR"===e.previousSibling.nodeName}function Cu(e,t){t.parentNode,t.parentNode.insertBefore(e,t),e.appendChild(t)}function xu(e,t){const n=e.ownerDocument.createElement(t);for(;e.firstChild;)n.appendChild(e.firstChild);return e.parentNode,e.parentNode.replaceChild(n,e),n}function Su(e,t){if("SPAN"===e.nodeName&&e.style){const{fontWeight:n,fontStyle:r,textDecorationLine:o,textDecoration:i,verticalAlign:a}=e.style;"bold"!==n&&"700"!==n||Cu(t.createElement("strong"),e),"italic"===r&&Cu(t.createElement("em"),e),("line-through"===o||(0,Ce.includes)(i,"line-through"))&&Cu(t.createElement("s"),e),"super"===a?Cu(t.createElement("sup"),e):"sub"===a&&Cu(t.createElement("sub"),e)}else"B"===e.nodeName?e=xu(e,"strong"):"I"===e.nodeName?e=xu(e,"em"):"A"===e.nodeName&&(e.target&&"_blank"===e.target.toLowerCase()?e.rel="noreferrer noopener":(e.removeAttribute("target"),e.removeAttribute("rel")))}function Iu(e){"SCRIPT"!==e.nodeName&&"NOSCRIPT"!==e.nodeName&&"TEMPLATE"!==e.nodeName&&"STYLE"!==e.nodeName||e.parentNode.removeChild(e)}const{parseInt:Tu}=window;function Nu(e){return"OL"===e.nodeName||"UL"===e.nodeName}function Au(e,t){if("P"!==e.nodeName)return;const n=e.getAttribute("style");if(!n)return;if(-1===n.indexOf("mso-list"))return;const r=/mso-list\s*:[^;]+level([0-9]+)/i.exec(n);if(!r)return;let o=Tu(r[1],10)-1||0;const i=e.previousElementSibling;if(!i||!Nu(i)){const n=e.textContent.trim().slice(0,1),r=/[1iIaA]/.test(n),o=t.createElement(r?"ol":"ul");r&&o.setAttribute("type",n),e.parentNode.insertBefore(o,e)}const a=e.previousElementSibling,l=a.nodeName,s=t.createElement("li");let c=a;for(e.removeChild(e.firstElementChild);e.firstChild;)s.appendChild(e.firstChild);for(;o--;)c=c.lastElementChild||c,Nu(c)&&(c=c.lastElementChild||c);Nu(c)||(c=c.appendChild(t.createElement(l))),c.appendChild(s),e.parentNode.removeChild(e)}const{atob:Ru,File:Lu}=window;function Pu(e){if("IMG"===e.nodeName){if(0===e.src.indexOf("file:")&&(e.src=""),0===e.src.indexOf("data:")){const[t,n]=e.src.split(","),[r]=t.slice(5).split(";");if(!n||!r)return void(e.src="");let o;try{o=Ru(n)}catch(t){return void(e.src="")}const i=new Uint8Array(o.length);for(let e=0;e<i.length;e++)i[e]=o.charCodeAt(e);const a=r.replace("/","."),l=new Lu([i],a,{type:r});e.src=va(l)}1!==e.height&&1!==e.width||e.parentNode.removeChild(e)}}var Ou=n(53787);const Du=new(n.n(Ou)().Converter)({noHeaderId:!0,tables:!0,literalMidWordUnderscores:!0,omitExtraWLInCodeBlocks:!0,simpleLineBreaks:!0,strikethrough:!0});function Mu(e){if("IFRAME"===e.nodeName){const t=e.ownerDocument.createTextNode(e.src);e.parentNode.replaceChild(t,e)}}function Bu(e){e.id&&0===e.id.indexOf("docs-internal-guid-")&&nu(e)}function Fu(e){if(e.nodeType!==e.TEXT_NODE)return;let t=e;for(;t=t.parentNode;)if(t.nodeType===t.ELEMENT_NODE&&"PRE"===t.nodeName)return;let n=e.data.replace(/[ \r\n\t]+/g," ");if(" "===n[0]){const t=vu(e,"previous");t&&"BR"!==t.nodeName&&" "!==t.textContent.slice(-1)||(n=n.slice(1))}if(" "===n[n.length-1]){const t=vu(e,"next");(!t||"BR"===t.nodeName||t.nodeType===t.TEXT_NODE&&function(e){return" "===e||"\r"===e||"\n"===e||"\t"===e}(t.textContent[0]))&&(n=n.slice(0,-1))}n?e.data=n:e.parentNode.removeChild(e)}function zu(e){"BR"===e.nodeName&&(vu(e,"next")||e.parentNode.removeChild(e))}function Hu(e){"P"===e.nodeName&&(e.hasChildNodes()||e.parentNode.removeChild(e))}const{console:Vu}=window;function Wu(e,t){return e=wu(e=gu(e,[Bu,Su,ku]),Gc("paste"),{inline:!0}),t||(e=gu(e,[Fu,zu])),Vu.log("Processed inline HTML:\n\n",e),e}function Zu({HTML:e="",plainText:t="",mode:n="AUTO",tagName:r,preserveWhiteSpace:o}){if(e=(e=(e=e.replace(/<meta[^>]+>/g,"")).replace(/^\s*<html[^>]*>\s*<body[^>]*>(?:\s*<!--\s*StartFragment\s*-->)?/i,"")).replace(/(?:<!--\s*EndFragment\s*-->\s*)?<\/body>\s*<\/html>\s*$/i,""),"INLINE"!==n){const n=e||t;if(-1!==n.indexOf("\x3c!-- wp:"))return Wc(n)}var i;if(String.prototype.normalize&&(e=e.normalize()),!t||e&&!function(e){return!/<(?!br[ />])/i.test(e)}(e)||(e=t,/^\s+$/.test(t)||(i=e,e=Du.makeHtml(function(e){return e.replace(/((?:^|\n)```)([^\n`]+)(```(?:$|\n))/,((e,t,n,r)=>`${t}\n${n}\n${r}`))}(i))),"AUTO"===n&&-1===t.indexOf("\n")&&0!==t.indexOf("<p>")&&0===e.indexOf("<p>")&&(n="INLINE")),"INLINE"===n)return Wu(e,o);const a=mu(e),l=a.length>1;if("AUTO"===n&&!l&&function(e,t){const n=document.implementation.createHTMLDocument("");n.body.innerHTML=e;const r=Array.from(n.body.children);return!r.some(_u)&&Eu(r,t)}(e,r))return Wu(e,o);const s=Gc("paste"),c=fu("paste"),u=(0,Ce.compact)((0,Ce.flatMap)(a,(e=>{if("string"!=typeof e)return e;const t=[Bu,Au,Iu,ou,Pu,Su,tu,ku,Mu,lu,iu],n={...c,...s};return e=gu(e,t,c),e=gu(e=Xc(e=wu(e,n)),[Fu,zu,Hu],c),Vu.log("Processed HTML piece:\n\n",e),jc(e)})));if("AUTO"===n&&1===u.length&&Wl(u[0].name,"__unstablePasteTextInline",!1)){const e=t.replace(/^[\n]+|[\n]+$/g,"");if(""!==e&&-1===e.indexOf("\n"))return wu(Ws(u[0]),s)}return u}function ju(e=[],t=[]){return e.length===t.length&&(0,Ce.every)(t,(([t,,n],r)=>{const o=e[r];return t===o.name&&ju(o.innerBlocks,n)}))}function Uu(e=[],t){return t?(0,Ce.map)(t,(([t,n,r],o)=>{const i=e[o];if(i&&i.name===t){const e=Uu(i.innerBlocks,r);return{...i,innerBlocks:e}}const a=zl(t),l=(e,t)=>(0,Ce.mapValues)(t,((t,n)=>s(e[n],t))),s=(e,t)=>{return n=e,"html"===(0,Ce.get)(n,["source"])&&(0,Ce.isArray)(t)?Ps(t):(e=>"query"===(0,Ce.get)(e,["source"]))(e)&&t?t.map((t=>l(e.query,t))):t;var n},c=l((0,Ce.get)(a,["attributes"],{}),n),[u,d]=Ec(t,c);return Ul(u,d,Uu([],r))})):e}var $u,qu=new Uint8Array(16);function Gu(){if(!$u&&!($u="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return $u(qu)}for(var Ku=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,Yu=function(e){return"string"==typeof e&&Ku.test(e)},Xu=[],Ju=0;Ju<256;++Ju)Xu.push((Ju+256).toString(16).substr(1));var Qu=function(e,t,n){var r=(e=e||{}).random||(e.rng||Gu)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var o=0;o<16;++o)t[n+o]=r[o];return t}return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(Xu[e[t+0]]+Xu[e[t+1]]+Xu[e[t+2]]+Xu[e[t+3]]+"-"+Xu[e[t+4]]+Xu[e[t+5]]+"-"+Xu[e[t+6]]+Xu[e[t+7]]+"-"+Xu[e[t+8]]+Xu[e[t+9]]+"-"+Xu[e[t+10]]+Xu[e[t+11]]+Xu[e[t+12]]+Xu[e[t+13]]+Xu[e[t+14]]+Xu[e[t+15]]).toLowerCase();if(!Yu(n))throw TypeError("Stringified UUID is invalid");return n}(r)};const ed=new Set,td=T()((e=>{let t=Qu().replace(/[0-9]/g,"");for(;ed.has(t);)t=Qu().replace(/[0-9]/g,"");return ed.add(t),Qo({container:e,key:t})}));function nd({children:e,document:t}){if(!t)return null;const n=td(t.head);return(0,_.createElement)(Ho.C,{value:n},e)}var rd=(0,_.createContext)();function od(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function id(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ad(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?id(Object(n),!0).forEach((function(t){od(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):id(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ld(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}function sd(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function cd(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return sd(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?sd(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}var ud,dd=(0,_.createContext)({}),pd=function(e,t,n){void 0===n&&(n=t.children);var r=(0,_.useContext)(dd);return r.useCreateElement?r.useCreateElement(e,t,n):"string"==typeof e&&function(e){return"function"==typeof e}(n)?(t.children,n(ld(t,["children"]))):(0,_.createElement)(e,t,n)};function md(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function hd(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?fd(Object(n),!0).forEach((function(t){md(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fd(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function gd(e){var t;if(!function(e){return"object"==typeof e&&null!=e}(e))return!1;var n=Object.getPrototypeOf(e);return null==n||(null===(t=n.constructor)||void 0===t?void 0:t.toString())===Object.toString()}function vd(e,t){for(var n={},r={},o=0,i=Object.keys(e);o<i.length;o++){var a=i[o];t.indexOf(a)>=0?n[a]=e[a]:r[a]=e[a]}return[n,r]}function bd(e,t){if(void 0===t&&(t=[]),!gd(e.state))return vd(e,t);var n=vd(e,[].concat(t,["state"])),r=n[0],o=n[1],i=r.state,a=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(r,["state"]);return[hd(hd({},i),a),o]}function yd(e,t){if(e===t)return!0;if(!e)return!1;if(!t)return!1;if("object"!=typeof e)return!1;if("object"!=typeof t)return!1;var n=Object.keys(e),r=Object.keys(t),o=n.length;if(r.length!==o)return!1;for(var i=0,a=n;i<a.length;i++){var l=a[i];if(e[l]!==t[l])return!1}return!0}function wd(e){return"normalizePropsAreEqualInner"===e.name?e:function(t,n){return gd(t.state)&&gd(n.state)?e(hd(hd({},t.state),t),hd(hd({},n.state),n)):e(t,n)}}function kd(e){var t=e.as,n=e.useHook,r=e.memo,o=e.propsAreEqual,i=void 0===o?null==n?void 0:n.unstable_propsAreEqual:o,a=e.keys,l=void 0===a?(null==n?void 0:n.__keys)||[]:a,s=e.useCreateElement,c=void 0===s?pd:s,u=function(e,r){var o=e.as,i=void 0===o?t:o,a=ld(e,["as"]);if(n){var s,u=bd(a,l),d=u[0],p=u[1],m=n(d,ad({ref:r},p)),f=m.wrapElement,h=ld(m,["wrapElement"]),g=(null===(s=i.render)||void 0===s?void 0:s.__keys)||i.__keys,v=g&&bd(a,g)[0],b=v?ad(ad({},h),v):h,y=c(i,b);return f?f(y):y}return c(i,ad({ref:r},a))};return u=function(e){return(0,_.forwardRef)(e)}(u),r&&(u=function(e,t){return(0,_.memo)(e,t)}(u,i&&wd(i))),u.__keys=l,u.unstable_propsAreEqual=wd(i||yd),u}function Ed(e,t){(0,_.useDebugValue)(e);var n=(0,_.useContext)(dd);return null!=n[e]?n[e]:t}function _d(e){var t,n,r,o=(r=e.compose,Array.isArray(r)?r:void 0!==r?[r]:[]),i=function(t,n){if(e.useOptions&&(t=e.useOptions(t,n)),e.name&&(t=function(e,t,n){void 0===t&&(t={}),void 0===n&&(n={});var r="use"+e+"Options";(0,_.useDebugValue)(r);var o=Ed(r);return o?ad(ad({},t),o(t,n)):t}(e.name,t,n)),e.compose)for(var r,i=cd(o);!(r=i()).done;)t=r.value.__useOptions(t,n);return t},a=function(t,n,r){if(void 0===t&&(t={}),void 0===n&&(n={}),void 0===r&&(r=!1),r||(t=i(t,n)),e.useProps&&(n=e.useProps(t,n)),e.name&&(n=function(e,t,n){void 0===t&&(t={}),void 0===n&&(n={});var r="use"+e+"Props";(0,_.useDebugValue)(r);var o=Ed(r);return o?o(t,n):n}(e.name,t,n)),e.compose)if(e.useComposeOptions&&(t=e.useComposeOptions(t,n)),e.useComposeProps)n=e.useComposeProps(t,n);else for(var a,l=cd(o);!(a=l()).done;)n=(0,a.value)(t,n,!0);var s={},c=n||{};for(var u in c)void 0!==c[u]&&(s[u]=c[u]);return s};a.__useOptions=i;var l=o.reduce((function(e,t){return e.push.apply(e,t.__keys||[]),e}),[]);return a.__keys=[].concat(l,(null===(t=e.useState)||void 0===t?void 0:t.__keys)||[],e.keys||[]),a.unstable_propsAreEqual=e.propsAreEqual||(null===(n=o[0])||void 0===n?void 0:n.unstable_propsAreEqual)||yd,a}function Cd(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Sd(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?xd(Object(n),!0).forEach((function(t){Cd(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xd(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Id(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}function Td(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Nd(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Td(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Td(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function Ad(e,t){void 0===t&&(t=null),e&&("function"==typeof e?e(t):e.current=t)}function Rd(e,t){return(0,_.useMemo)((function(){return null==e&&null==t?null:function(n){Ad(e,n),Ad(t,n)}}),[e,t])}function Ld(e){return e?e.ownerDocument||e:document}try{ud=window}catch(zx){}function Pd(e){return e&&Ld(e).defaultView||ud}var Od=function(){var e=Pd();return Boolean(void 0!==e&&e.document&&e.document.createElement)}(),Dd=Od?_.useLayoutEffect:_.useEffect;function Md(e){var t=(0,_.useRef)(e);return Dd((function(){t.current=e})),t}function Bd(e){return e.target===e.currentTarget}function Fd(e){var t=Ld(e).activeElement;return null!=t&&t.nodeName?t:null}function zd(e,t){return e===t||e.contains(t)}function Hd(e){var t=Fd(e);if(!t)return!1;if(zd(e,t))return!0;var n=t.getAttribute("aria-activedescendant");return!(!n||n!==e.id&&!e.querySelector("#"+n))}function Vd(e){return!zd(e.currentTarget,e.target)}var Wd=["button","color","file","image","reset","submit"];function Zd(e){if("BUTTON"===e.tagName)return!0;if("INPUT"===e.tagName){var t=e;return-1!==Wd.indexOf(t.type)}return!1}function jd(e){return!!Od&&-1!==window.navigator.userAgent.indexOf(e)}var Ud=_d({name:"Role",keys:["unstable_system"],propsAreEqual:function(e,t){var n=e.unstable_system,r=Id(e,["unstable_system"]),o=t.unstable_system,i=Id(t,["unstable_system"]);return!(n!==o&&!yd(n,o))&&yd(r,i)}}),$d=(kd({as:"div",useHook:Ud}),jd("Mac")&&!jd("Chrome")&&(jd("Safari")||jd("Firefox")));function qd(e){!Hd(e)&&function(e){return function(e,t){return"matches"in e?e.matches(t):"msMatchesSelector"in e?e.msMatchesSelector(t):e.webkitMatchesSelector(t)}(e,"input:not([type='hidden']):not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], button:not([disabled]), [tabindex], iframe, object, embed, area[href], audio[controls], video[controls], [contenteditable]:not([contenteditable='false'])")&&function(e){var t=e;return t.offsetWidth>0||t.offsetHeight>0||e.getClientRects().length>0}(e)}(e)&&e.focus()}function Gd(e,t,n,r){return e?t&&!n?-1:void 0:t?r:r||0}function Kd(e,t){return(0,_.useCallback)((function(n){var r;null===(r=e.current)||void 0===r||r.call(e,n),n.defaultPrevented||t&&(n.stopPropagation(),n.preventDefault())}),[e,t])}var Yd=_d({name:"Tabbable",compose:Ud,keys:["disabled","focusable"],useOptions:function(e,t){return Sd({disabled:t.disabled},e)},useProps:function(e,t){var n=t.ref,r=t.tabIndex,o=t.onClickCapture,i=t.onMouseDownCapture,a=t.onMouseDown,l=t.onKeyPressCapture,s=t.style,c=Id(t,["ref","tabIndex","onClickCapture","onMouseDownCapture","onMouseDown","onKeyPressCapture","style"]),u=(0,_.useRef)(null),d=Md(o),p=Md(i),m=Md(a),f=Md(l),h=!!e.disabled&&!e.focusable,g=(0,_.useState)(!0),v=g[0],b=g[1],y=(0,_.useState)(!0),w=y[0],k=y[1],E=e.disabled?Sd({pointerEvents:"none"},s):s;Dd((function(){var e,t=u.current;t&&("BUTTON"!==(e=t).tagName&&"INPUT"!==e.tagName&&"SELECT"!==e.tagName&&"TEXTAREA"!==e.tagName&&"A"!==e.tagName&&b(!1),function(e){return"BUTTON"===e.tagName||"INPUT"===e.tagName||"SELECT"===e.tagName||"TEXTAREA"===e.tagName}(t)||k(!1))}),[]);var C=Kd(d,e.disabled),x=Kd(p,e.disabled),S=Kd(f,e.disabled),I=(0,_.useCallback)((function(e){var t;null===(t=m.current)||void 0===t||t.call(m,e);var n=e.currentTarget;if(!e.defaultPrevented&&$d&&!Vd(e)&&Zd(n)){var r=requestAnimationFrame((function(){n.removeEventListener("mouseup",o,!0),qd(n)})),o=function(){cancelAnimationFrame(r),qd(n)};n.addEventListener("mouseup",o,{once:!0,capture:!0})}}),[]);return Sd({ref:Rd(u,n),style:E,tabIndex:Gd(h,v,w,r),disabled:!(!h||!w)||void 0,"aria-disabled":!!e.disabled||void 0,onClickCapture:C,onMouseDownCapture:x,onMouseDown:I,onKeyPressCapture:S},c)}});kd({as:"div",useHook:Yd});var Xd=_d({name:"Clickable",compose:Yd,keys:["unstable_clickOnEnter","unstable_clickOnSpace"],useOptions:function(e){var t=e.unstable_clickOnEnter,n=void 0===t||t,r=e.unstable_clickOnSpace;return Sd({unstable_clickOnEnter:n,unstable_clickOnSpace:void 0===r||r},Id(e,["unstable_clickOnEnter","unstable_clickOnSpace"]))},useProps:function(e,t){var n=t.onKeyDown,r=t.onKeyUp,o=Id(t,["onKeyDown","onKeyUp"]),i=(0,_.useState)(!1),a=i[0],l=i[1],s=Md(n),c=Md(r),u=(0,_.useCallback)((function(t){var n;if(null===(n=s.current)||void 0===n||n.call(s,t),!t.defaultPrevented&&!e.disabled&&!t.metaKey&&Bd(t)){var r=e.unstable_clickOnEnter&&"Enter"===t.key,o=e.unstable_clickOnSpace&&" "===t.key;if(r||o){if(function(e){var t=e.currentTarget;return!!e.isTrusted&&(Zd(t)||"INPUT"===t.tagName||"TEXTAREA"===t.tagName||"A"===t.tagName||"SELECT"===t.tagName)}(t))return;t.preventDefault(),r?t.currentTarget.click():o&&l(!0)}}}),[e.disabled,e.unstable_clickOnEnter,e.unstable_clickOnSpace]),d=(0,_.useCallback)((function(t){var n;if(null===(n=c.current)||void 0===n||n.call(c,t),!t.defaultPrevented&&!e.disabled&&!t.metaKey){var r=e.unstable_clickOnSpace&&" "===t.key;a&&r&&(l(!1),t.currentTarget.click())}}),[e.disabled,e.unstable_clickOnSpace,a]);return Sd({"data-active":a||void 0,onKeyDown:u,onKeyUp:d},o)}});function Jd(e,t){return t?e.find((function(e){return!e.disabled&&e.id!==t})):e.find((function(e){return!e.disabled}))}function Qd(e,t){var n;return t||null===t?t:e.currentId||null===e.currentId?e.currentId:null===(n=Jd(e.items||[]))||void 0===n?void 0:n.id}kd({as:"button",memo:!0,useHook:Xd});var ep=["baseId","unstable_idCountRef","setBaseId","unstable_virtual","rtl","orientation","items","groups","currentId","loop","wrap","shift","unstable_moves","unstable_hasActiveWidget","unstable_includesBaseElement","registerItem","unregisterItem","registerGroup","unregisterGroup","move","next","previous","up","down","first","last","sort","unstable_setVirtual","setRTL","setOrientation","setCurrentId","setLoop","setWrap","setShift","reset","unstable_setIncludesBaseElement","unstable_setHasActiveWidget"],tp=ep,np=tp;function rp(e){e.userFocus=!0,e.focus(),e.userFocus=!1}function op(e,t){e.userFocus=t}function ip(e){try{var t=e instanceof HTMLInputElement&&null!==e.selectionStart,n="TEXTAREA"===e.tagName,r="true"===e.contentEditable;return t||n||r||!1}catch(e){return!1}}function ap(e){var t=Fd(e);if(!t)return!1;if(t===e)return!0;var n=t.getAttribute("aria-activedescendant");return!!n&&n===e.id}function lp(e){return void 0===e&&(e="id"),(e?e+"-":"")+Math.random().toString(32).substr(2,6)}var sp=(0,_.createContext)(lp),cp=_d({keys:[].concat(["baseId","unstable_idCountRef","setBaseId"],["id"]),useOptions:function(e,t){var n=(0,_.useContext)(sp),r=(0,_.useState)((function(){return e.unstable_idCountRef?(e.unstable_idCountRef.current+=1,"-"+e.unstable_idCountRef.current):e.baseId?"-"+n(""):""}))[0],o=(0,_.useMemo)((function(){return e.baseId||n()}),[e.baseId,n]),i=t.id||e.id||""+o+r;return Sd(Sd({},e),{},{id:i})},useProps:function(e,t){return Sd({id:e.id},t)}});function up(e,t,n){if("function"==typeof Event)return new Event(t,n);var r=Ld(e).createEvent("Event");return r.initEvent(t,null==n?void 0:n.bubbles,null==n?void 0:n.cancelable),r}function dp(e,t){if(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement){var n,r=Object.getPrototypeOf(e),o=null===(n=Object.getOwnPropertyDescriptor(r,"value"))||void 0===n?void 0:n.set;o&&(o.call(e,t),function(e,t,n){e.dispatchEvent(up(e,"input",{bubbles:!0}))}(e))}}function pp(e){return e.querySelector("[data-composite-item-widget]")}kd({as:"div",useHook:cp});var mp=_d({name:"CompositeItem",compose:[Xd,cp],keys:np,propsAreEqual:function(e,t){if(!t.id||e.id!==t.id)return Xd.unstable_propsAreEqual(e,t);var n=e.currentId,r=e.unstable_moves,o=Id(e,["currentId","unstable_moves"]),i=t.currentId,a=t.unstable_moves,l=Id(t,["currentId","unstable_moves"]);if(i!==n){if(t.id===i||t.id===n)return!1}else if(r!==a)return!1;return Xd.unstable_propsAreEqual(o,l)},useOptions:function(e){return Sd(Sd({},e),{},{id:e.id,currentId:Qd(e),unstable_clickOnSpace:!e.unstable_hasActiveWidget&&e.unstable_clickOnSpace})},useProps:function(e,t){var n,r=t.ref,o=t.tabIndex,i=void 0===o?0:o,a=t.onMouseDown,l=t.onFocus,s=t.onBlurCapture,c=t.onKeyDown,u=t.onClick,d=Id(t,["ref","tabIndex","onMouseDown","onFocus","onBlurCapture","onKeyDown","onClick"]),p=(0,_.useRef)(null),m=e.id,f=e.disabled&&!e.focusable,h=e.currentId===m,g=Md(h),v=(0,_.useRef)(!1),b=function(e){return(0,_.useMemo)((function(){var t;return null===(t=e.items)||void 0===t?void 0:t.find((function(t){return e.id&&t.id===e.id}))}),[e.items,e.id])}(e),y=Md(a),w=Md(l),k=Md(s),E=Md(c),C=Md(u),x=!e.unstable_virtual&&!e.unstable_hasActiveWidget&&h||!(null!==(n=e.items)&&void 0!==n&&n.length);(0,_.useEffect)((function(){var t;if(m)return null===(t=e.registerItem)||void 0===t||t.call(e,{id:m,ref:p,disabled:!!f}),function(){var t;null===(t=e.unregisterItem)||void 0===t||t.call(e,m)}}),[m,f,e.registerItem,e.unregisterItem]),(0,_.useEffect)((function(){var t=p.current;t&&e.unstable_moves&&g.current&&rp(t)}),[e.unstable_moves]);var S=(0,_.useCallback)((function(e){var t;null===(t=y.current)||void 0===t||t.call(y,e),op(e.currentTarget,!0)}),[]),I=(0,_.useCallback)((function(t){var n,r,o=!!t.currentTarget.userFocus;if(op(t.currentTarget,!1),null===(n=w.current)||void 0===n||n.call(w,t),!t.defaultPrevented&&!Vd(t)&&m&&!function(e,t){if(Bd(e))return!1;for(var n,r=Nd(t);!(n=r()).done;)if(n.value.ref.current===e.target)return!0;return!1}(t,e.items)&&(null===(r=e.setCurrentId)||void 0===r||r.call(e,m),o&&e.unstable_virtual&&e.baseId&&Bd(t))){var i=Ld(t.target).getElementById(e.baseId);i&&(v.current=!0,function(e,t){var n={},r=n.preventScroll,o=n.isActive,i=void 0===o?ap:o;i(e)||(e.focus({preventScroll:r}),i(e)||requestAnimationFrame((function(){e.focus({preventScroll:r})})))}(i))}}),[m,e.items,e.setCurrentId,e.unstable_virtual,e.baseId]),T=(0,_.useCallback)((function(t){var n;null===(n=k.current)||void 0===n||n.call(k,t),t.defaultPrevented||e.unstable_virtual&&v.current&&(v.current=!1,t.preventDefault(),t.stopPropagation())}),[e.unstable_virtual]),N=(0,_.useCallback)((function(t){var n;if(Bd(t)){var r="horizontal"!==e.orientation,o="vertical"!==e.orientation,i=!(null==b||!b.groupId),a={ArrowUp:(i||r)&&e.up,ArrowRight:(i||o)&&e.next,ArrowDown:(i||r)&&e.down,ArrowLeft:(i||o)&&e.previous,Home:function(){var n,r;!i||t.ctrlKey?null===(n=e.first)||void 0===n||n.call(e):null===(r=e.previous)||void 0===r||r.call(e,!0)},End:function(){var n,r;!i||t.ctrlKey?null===(n=e.last)||void 0===n||n.call(e):null===(r=e.next)||void 0===r||r.call(e,!0)},PageUp:function(){var t,n;i?null===(t=e.up)||void 0===t||t.call(e,!0):null===(n=e.first)||void 0===n||n.call(e)},PageDown:function(){var t,n;i?null===(t=e.down)||void 0===t||t.call(e,!0):null===(n=e.last)||void 0===n||n.call(e)}}[t.key];if(a)return t.preventDefault(),void a();if(null===(n=E.current)||void 0===n||n.call(E,t),!t.defaultPrevented)if(1===t.key.length&&" "!==t.key){var l=pp(t.currentTarget);l&&ip(l)&&(l.focus(),dp(l,""))}else if("Delete"===t.key||"Backspace"===t.key){var s=pp(t.currentTarget);s&&ip(s)&&(t.preventDefault(),dp(s,""))}}}),[e.orientation,b,e.up,e.next,e.down,e.previous,e.first,e.last]),A=(0,_.useCallback)((function(e){var t;if(null===(t=C.current)||void 0===t||t.call(C,e),!e.defaultPrevented){var n=pp(e.currentTarget);n&&!Hd(n)&&n.focus()}}),[]);return Sd({ref:Rd(p,r),id:m,tabIndex:x?i:-1,"aria-selected":!(!e.unstable_virtual||!h)||void 0,onMouseDown:S,onFocus:I,onBlurCapture:T,onKeyDown:N,onClick:A},d)}}),fp=kd({as:"button",memo:!0,useHook:mp}),hp=["baseId","unstable_idCountRef","unstable_virtual","rtl","orientation","items","groups","currentId","loop","wrap","shift","unstable_moves","unstable_hasActiveWidget","unstable_includesBaseElement","setBaseId","registerItem","unregisterItem","registerGroup","unregisterGroup","move","next","previous","up","down","first","last","sort","unstable_setVirtual","setRTL","setOrientation","setCurrentId","setLoop","setWrap","setShift","reset","unstable_setIncludesBaseElement","unstable_setHasActiveWidget"],gp=kd({as:"button",memo:!0,useHook:_d({name:"ToolbarItem",compose:mp,keys:hp})}),vp=n(34155),bp=(0,_.forwardRef)((function({children:e,as:t,...n},r){const o=(0,_.useContext)(rd);if("function"!=typeof e&&!t)return void 0!==vp&&vp.env,null;const i={...n,ref:r,"data-toolbar-item":!0};return o?(0,_.createElement)(gp,(0,nr.Z)({},o,i,{as:t}),e):t?(0,_.createElement)(t,i,e):e(i)})),yp=e=>(0,_.createElement)("div",{className:e.className},e.children),kp=(0,_.forwardRef)((function({containerClassName:e,className:t,extraProps:n,children:r,title:o,isActive:i,isDisabled:a,...l},s){return(0,_.useContext)(rd)?(0,_.createElement)(bp,(0,nr.Z)({className:Cr()("components-toolbar-button",t)},n,l,{ref:s}),(e=>(0,_.createElement)(Gi,(0,nr.Z)({label:o,isPressed:i,disabled:a},e),r))):(0,_.createElement)(yp,{className:e},(0,_.createElement)(Gi,(0,nr.Z)({ref:s,icon:l.icon,label:o,shortcut:l.shortcut,"data-subscript":l.subscript,onClick:e=>{e.stopPropagation(),l.onClick&&l.onClick(e)},className:Cr()("components-toolbar__control",t),isPressed:i,disabled:a,"data-toolbar-item":!0},n,l),r))})),Ep=({className:e,children:t,...n})=>(0,_.createElement)("div",(0,nr.Z)({className:e},n),t),_p=(0,_.createElement)(ko,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,_.createElement)(yo,{d:"M5 5v1.5h14V5H5zm0 7.8h14v-1.5H5v1.5zM5 19h14v-1.5H5V19z"}));function Cp({renderContent:e,renderToggle:t,position:n="bottom right",className:r,contentClassName:o,expandOnMobile:i,headerTitle:a,focusOnMount:l,popoverProps:s,onClose:c,onToggle:u}){var d;const p=(0,_.useRef)(),[m,f]=function(e,t){const[n,r]=(0,_.useState)(!1);return[n,e=>{r(e),t&&t(e)}]}(0,u);function h(){c&&c(),f(!1)}(0,_.useEffect)((()=>()=>{u&&u(!1)}),[]);const g={isOpen:m,onToggle:function(){f(!m)},onClose:h};return(0,_.createElement)("div",{className:Cr()("components-dropdown",r),ref:p},t(g),m&&(0,_.createElement)(ia,(0,nr.Z)({position:n,onClose:h,onFocusOutside:function(){const{ownerDocument:e}=p.current,t=e.activeElement.closest('[role="dialog"]');p.current.contains(e.activeElement)||t&&!t.contains(p.current)||h()},expandOnMobile:i,headerTitle:a,focusOnMount:l},s,{anchorRef:null!==(d=null==s?void 0:s.anchorRef)&&void 0!==d?d:p.current,className:Cr()("components-dropdown__content",s?s.className:void 0,o)}),e(g)))}const xp=["menuitem","menuitemradio","menuitemcheckbox"];class Sp extends _.Component{constructor(){super(...arguments),this.onKeyDown=this.onKeyDown.bind(this),this.bindContainer=this.bindContainer.bind(this),this.getFocusableContext=this.getFocusableContext.bind(this),this.getFocusableIndex=this.getFocusableIndex.bind(this)}componentDidMount(){this.container.addEventListener("keydown",this.onKeyDown),this.container.addEventListener("focus",this.onFocus)}componentWillUnmount(){this.container.removeEventListener("keydown",this.onKeyDown),this.container.removeEventListener("focus",this.onFocus)}bindContainer(e){const{forwardedRef:t}=this.props;this.container=e,(0,Ce.isFunction)(t)?t(e):t&&"current"in t&&(t.current=e)}getFocusableContext(e){const{onlyBrowserTabstops:t}=this.props,n=(t?po.tabbable:po.focusable).find(this.container),r=this.getFocusableIndex(n,e);return r>-1&&e?{index:r,target:e,focusables:n}:null}getFocusableIndex(e,t){const n=e.indexOf(t);if(-1!==n)return n}onKeyDown(e){this.props.onKeyDown&&this.props.onKeyDown(e);const{getFocusableContext:t}=this,{cycle:n=!0,eventToOffset:r,onNavigate:o=Ce.noop,stopNavigationEvents:i}=this.props,a=r(e);if(void 0!==a&&i){e.stopImmediatePropagation();const t=e.target.getAttribute("role");xp.includes(t)&&e.preventDefault()}if(!a)return;const l=t(e.target.ownerDocument.activeElement);if(!l)return;const{index:s,focusables:c}=l,u=n?function(e,t,n){const r=e+n;return r<0?t+r:r>=t?r-t:r}(s,c.length,a):s+a;u>=0&&u<c.length&&(c[u].focus(),o(u,c[u]))}render(){const{children:e,...t}=this.props;return(0,_.createElement)("div",(0,nr.Z)({ref:this.bindContainer},(0,Ce.omit)(t,["stopNavigationEvents","eventToOffset","onNavigate","onKeyDown","cycle","onlyBrowserTabstops","forwardedRef"])),e)}}const Ip=(e,t)=>(0,_.createElement)(Sp,(0,nr.Z)({},e,{forwardedRef:t}));Ip.displayName="NavigableContainer";var Tp=(0,_.forwardRef)(Ip),Np=(0,_.forwardRef)((function({role:e="menu",orientation:t="vertical",...n},r){return(0,_.createElement)(Tp,(0,nr.Z)({ref:r,stopNavigationEvents:!0,onlyBrowserTabstops:!1,role:e,"aria-orientation":"presentation"===e?null:t,eventToOffset:e=>{const{keyCode:n}=e;let r=[Wr],o=[Hr];return"horizontal"===t&&(r=[Vr],o=[zr]),"both"===t&&(r=[Vr,Wr],o=[zr,Hr]),(0,Ce.includes)(r,n)?1:(0,Ce.includes)(o,n)?-1:(0,Ce.includes)([Wr,Hr,zr,Vr],n)?0:void 0}},n))}));function Ap(e={},t={}){const n={...e,...t};return t.className&&e.className&&(n.className=Cr()(t.className,e.className)),n}var Rp=function({children:e,className:t,controls:n,icon:r=_p,label:o,popoverProps:i,toggleProps:a,menuProps:l,disableOpenOnArrowDown:s=!1,text:c,menuLabel:u,position:d,noIcons:p}){if(u&&Vt("`menuLabel` prop in `DropdownComponent`",{since:"5.3",alternative:"`menuProps` object and its `aria-label` property"}),d&&Vt("`position` prop in `DropdownComponent`",{since:"5.3",alternative:"`popoverProps` object and its `position` property"}),(0,Ce.isEmpty)(n)&&!(0,Ce.isFunction)(e))return null;let m;(0,Ce.isEmpty)(n)||(m=n,Array.isArray(m[0])||(m=[m]));const f=Ap({className:"components-dropdown-menu__popover",position:d},i);return(0,_.createElement)(Cp,{className:Cr()("components-dropdown-menu",t),popoverProps:f,renderToggle:({isOpen:e,onToggle:t})=>{var n;const i=Ap({className:Cr()("components-dropdown-menu__toggle",{"is-opened":e})},a);return(0,_.createElement)(Gi,(0,nr.Z)({},i,{icon:r,onClick:e=>{t(e),i.onClick&&i.onClick(e)},onKeyDown:n=>{(n=>{s||e||n.keyCode!==Wr||(n.preventDefault(),t())})(n),i.onKeyDown&&i.onKeyDown(n)},"aria-haspopup":"true","aria-expanded":e,label:o,text:c,showTooltip:null===(n=null==a?void 0:a.showTooltip)||void 0===n||n}),i.children)},renderContent:t=>{const n=Ap({"aria-label":u||o,className:Cr()("components-dropdown-menu__menu",{"no-icons":p})},l);return(0,_.createElement)(Np,(0,nr.Z)({},n,{role:"menu"}),(0,Ce.isFunction)(e)?e(t):null,(0,Ce.flatMap)(m,((e,n)=>e.map(((e,r)=>(0,_.createElement)(Gi,{key:[n,r].join(),onClick:n=>{n.stopPropagation(),t.onClose(),e.onClick&&e.onClick()},className:Cr()("components-dropdown-menu__menu-item",{"has-separator":n>0&&0===r,"is-active":e.isActive}),icon:e.icon,"aria-checked":"menuitemcheckbox"===e.role||"menuitemradio"===e.role?e.isActive:void 0,role:"menuitemcheckbox"===e.role||"menuitemradio"===e.role?e.role:"menuitem",disabled:e.isDisabled},e.title))))))}})},Lp=function({controls:e=[],toggleProps:t,...n}){const r=t=>(0,_.createElement)(Rp,(0,nr.Z)({controls:e,toggleProps:{...t,"data-toolbar-item":!0}},n));return(0,_.useContext)(rd)?(0,_.createElement)(bp,t,r):r(t)},Pp=function({controls:e=[],children:t,className:n,isCollapsed:r,title:o,...i}){const a=(0,_.useContext)(rd);if(!(e&&e.length||t))return null;const l=Cr()(a?"components-toolbar-group":"components-toolbar",n);let s=e;return Array.isArray(s[0])||(s=[s]),r?(0,_.createElement)(Lp,(0,nr.Z)({label:o,controls:s,className:l,children:t},i)):(0,_.createElement)(Ep,(0,nr.Z)({className:l},i),(0,Ce.flatMap)(s,((e,t)=>e.map(((e,n)=>(0,_.createElement)(kp,(0,nr.Z)({key:[t,n].join(),containerClassName:t>0&&0===n?"has-left-divider":null},e)))))),t)};const Op=(0,_.createContext)({name:"",isSelected:!1,clientId:null}),{Provider:Dp}=Op;function Mp(){return(0,_.useContext)(Op)}const Bp={insertUsage:{}},Fp={alignWide:!1,supportsLayout:!0,colors:[{name:U("Black"),slug:"black",color:"#000000"},{name:U("Cyan bluish gray"),slug:"cyan-bluish-gray",color:"#abb8c3"},{name:U("White"),slug:"white",color:"#ffffff"},{name:U("Pale pink"),slug:"pale-pink",color:"#f78da7"},{name:U("Vivid red"),slug:"vivid-red",color:"#cf2e2e"},{name:U("Luminous vivid orange"),slug:"luminous-vivid-orange",color:"#ff6900"},{name:U("Luminous vivid amber"),slug:"luminous-vivid-amber",color:"#fcb900"},{name:U("Light green cyan"),slug:"light-green-cyan",color:"#7bdcb5"},{name:U("Vivid green cyan"),slug:"vivid-green-cyan",color:"#00d084"},{name:U("Pale cyan blue"),slug:"pale-cyan-blue",color:"#8ed1fc"},{name:U("Vivid cyan blue"),slug:"vivid-cyan-blue",color:"#0693e3"},{name:U("Vivid purple"),slug:"vivid-purple",color:"#9b51e0"}],fontSizes:[{name:$("Small","font size name"),size:13,slug:"small"},{name:$("Normal","font size name"),size:16,slug:"normal"},{name:$("Medium","font size name"),size:20,slug:"medium"},{name:$("Large","font size name"),size:36,slug:"large"},{name:$("Huge","font size name"),size:42,slug:"huge"}],imageDefaultSize:"large",imageSizes:[{slug:"thumbnail",name:U("Thumbnail")},{slug:"medium",name:U("Medium")},{slug:"large",name:U("Large")},{slug:"full",name:U("Full Size")}],imageEditing:!0,maxWidth:580,allowedBlockTypes:!0,maxUploadFileSize:0,allowedMimeTypes:null,__experimentalCanUserUseUnfilteredHTML:!1,__experimentalBlockDirectory:!1,__mobileEnablePageTemplates:!1,__experimentalBlockPatterns:[],__experimentalBlockPatternCategories:[],__experimentalSpotlightEntityBlocks:[],gradients:[{name:U("Vivid cyan blue to vivid purple"),gradient:"linear-gradient(135deg,rgba(6,147,227,1) 0%,rgb(155,81,224) 100%)",slug:"vivid-cyan-blue-to-vivid-purple"},{name:U("Light green cyan to vivid green cyan"),gradient:"linear-gradient(135deg,rgb(122,220,180) 0%,rgb(0,208,130) 100%)",slug:"light-green-cyan-to-vivid-green-cyan"},{name:U("Luminous vivid amber to luminous vivid orange"),gradient:"linear-gradient(135deg,rgba(252,185,0,1) 0%,rgba(255,105,0,1) 100%)",slug:"luminous-vivid-amber-to-luminous-vivid-orange"},{name:U("Luminous vivid orange to vivid red"),gradient:"linear-gradient(135deg,rgba(255,105,0,1) 0%,rgb(207,46,46) 100%)",slug:"luminous-vivid-orange-to-vivid-red"},{name:U("Very light gray to cyan bluish gray"),gradient:"linear-gradient(135deg,rgb(238,238,238) 0%,rgb(169,184,195) 100%)",slug:"very-light-gray-to-cyan-bluish-gray"},{name:U("Cool to warm spectrum"),gradient:"linear-gradient(135deg,rgb(74,234,220) 0%,rgb(151,120,209) 20%,rgb(207,42,186) 40%,rgb(238,44,130) 60%,rgb(251,105,98) 80%,rgb(254,248,76) 100%)",slug:"cool-to-warm-spectrum"},{name:U("Blush light purple"),gradient:"linear-gradient(135deg,rgb(255,206,236) 0%,rgb(152,150,240) 100%)",slug:"blush-light-purple"},{name:U("Blush bordeaux"),gradient:"linear-gradient(135deg,rgb(254,205,165) 0%,rgb(254,45,45) 50%,rgb(107,0,62) 100%)",slug:"blush-bordeaux"},{name:U("Luminous dusk"),gradient:"linear-gradient(135deg,rgb(255,203,112) 0%,rgb(199,81,192) 50%,rgb(65,88,208) 100%)",slug:"luminous-dusk"},{name:U("Pale ocean"),gradient:"linear-gradient(135deg,rgb(255,245,203) 0%,rgb(182,227,212) 50%,rgb(51,167,181) 100%)",slug:"pale-ocean"},{name:U("Electric grass"),gradient:"linear-gradient(135deg,rgb(202,248,128) 0%,rgb(113,206,126) 100%)",slug:"electric-grass"},{name:U("Midnight"),gradient:"linear-gradient(135deg,rgb(2,3,129) 0%,rgb(40,116,252) 100%)",slug:"midnight"}]};function zp(e,t,n){return[...e.slice(0,n),...(0,Ce.castArray)(t),...e.slice(n)]}function Hp(e,t,n,r=1){const o=[...e];return o.splice(t,r),zp(o,e.slice(t,t+r),n)}function Vp(e,t=""){const n={[t]:[]};return e.forEach((e=>{const{clientId:r,innerBlocks:o}=e;n[t].push(r),Object.assign(n,Vp(o,r))})),n}function Wp(e,t=""){return e.reduce(((e,n)=>Object.assign(e,{[n.clientId]:t},Wp(n.innerBlocks,n.clientId))),{})}function Zp(e,t=Ce.identity){const n={},r=[...e];for(;r.length;){const{innerBlocks:e,...o}=r.shift();r.push(...e),n[o.clientId]=t(o)}return n}function jp(e){return Zp(e,(e=>(0,Ce.omit)(e,"attributes")))}function Up(e){return Zp(e,(e=>e.attributes))}function $p(e,t="",n={}){return(0,Ce.reduce)(e[t],((t,r)=>n[r]?t:[...t,r,...$p(e,r)]),[])}function qp(e,t){return"UPDATE_BLOCK_ATTRIBUTES"===e.type&&void 0!==t&&"UPDATE_BLOCK_ATTRIBUTES"===t.type&&(0,Ce.isEqual)(e.clientIds,t.clientIds)&&(n=e.attributes,r=t.attributes,(0,Ce.isEqual)((0,Ce.keys)(n),(0,Ce.keys)(r)));var n,r}const Gp=e=>e.reduce(((e,t)=>(e[t]={},e)),{}),Kp=(0,Ce.flow)(Se(),(e=>(t,n)=>{if(t&&"SAVE_REUSABLE_BLOCK_SUCCESS"===n.type){const{id:e,updatedId:r}=n;if(e===r)return t;(t={...t}).attributes=(0,Ce.mapValues)(t.attributes,((n,o)=>{const{name:i}=t.byClientId[o];return"core/block"===i&&n.ref===e?{...n,ref:r}:n}))}return e(t,n)}),(e=>(t={},n)=>{const r=e(t,n);if(r===t)return t;r.cache=t.cache?t.cache:{};const o=e=>e.reduce(((e,n)=>{let r=n;do{e.push(r),r=t.parents[r]}while(r&&!t.controlledInnerBlocks[r]);return e}),[]);switch(n.type){case"RESET_BLOCKS":r.cache=(0,Ce.mapValues)(Zp(n.blocks),(()=>({})));break;case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":{const e=(0,Ce.keys)(Zp(n.blocks));n.rootClientId&&!t.controlledInnerBlocks[n.rootClientId]&&e.push(n.rootClientId),r.cache={...r.cache,...Gp(o(e))};break}case"UPDATE_BLOCK":r.cache={...r.cache,...Gp(o([n.clientId]))};break;case"UPDATE_BLOCK_ATTRIBUTES":r.cache={...r.cache,...Gp(o(n.clientIds))};break;case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":const e=Gp(o(n.replacedClientIds));r.cache={...(0,Ce.omit)(r.cache,n.replacedClientIds),...(0,Ce.omit)(e,n.replacedClientIds),...Gp((0,Ce.keys)(Zp(n.blocks)))};break;case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":r.cache={...(0,Ce.omit)(r.cache,n.removedClientIds),...Gp((0,Ce.difference)(o(n.clientIds),n.clientIds))};break;case"MOVE_BLOCKS_TO_POSITION":{const e=[...n.clientIds];n.fromRootClientId&&e.push(n.fromRootClientId),n.toRootClientId&&e.push(n.toRootClientId),r.cache={...r.cache,...Gp(o(e))};break}case"MOVE_BLOCKS_UP":case"MOVE_BLOCKS_DOWN":{const e=[];n.rootClientId&&e.push(n.rootClientId),r.cache={...r.cache,...Gp(o(e))};break}case"SAVE_REUSABLE_BLOCK_SUCCESS":{const e=(0,Ce.keys)((0,Ce.omitBy)(r.attributes,((e,t)=>"core/block"!==r.byClientId[t].name||e.ref!==n.updatedId)));r.cache={...r.cache,...Gp(o(e))}}}return r}),(e=>(t,n)=>{const r=e=>{let r=e;for(let o=0;o<r.length;o++)!t.order[r[o]]||n.keepControlledInnerBlocks&&n.keepControlledInnerBlocks[r[o]]||(r===e&&(r=[...r]),r.push(...t.order[r[o]]));return r};if(t)switch(n.type){case"REMOVE_BLOCKS":n={...n,type:"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN",removedClientIds:r(n.clientIds)};break;case"REPLACE_BLOCKS":n={...n,type:"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN",replacedClientIds:r(n.clientIds)}}return e(t,n)}),(e=>(t,n)=>{if("REPLACE_INNER_BLOCKS"!==n.type)return e(t,n);const r={};if(Object.keys(t.controlledInnerBlocks).length){const e=[...n.blocks];for(;e.length;){const{innerBlocks:n,...o}=e.shift();e.push(...n),t.controlledInnerBlocks[o.clientId]&&(r[o.clientId]=!0)}}let o=t;t.order[n.rootClientId]&&(o=e(o,{type:"REMOVE_BLOCKS",keepControlledInnerBlocks:r,clientIds:t.order[n.rootClientId]}));let i=o;return n.blocks.length&&(i=e(i,{...n,type:"INSERT_BLOCKS",index:0}),i.order={...i.order,...(0,Ce.reduce)(r,((e,n,r)=>(t.order[r]&&(e[r]=t.order[r]),e)),{})}),i}),(e=>(t,n)=>{if(t&&"RESET_BLOCKS"===n.type){const e=$p(t.order,"",t.controlledInnerBlocks),r=Object.keys((0,Ce.pickBy)(t.controlledInnerBlocks));return{...t,byClientId:{...(0,Ce.omit)(t.byClientId,e),...jp(n.blocks)},attributes:{...(0,Ce.omit)(t.attributes,e),...Up(n.blocks)},order:{...(0,Ce.omit)(t.order,e),...(0,Ce.omit)(Vp(n.blocks),r)},parents:{...(0,Ce.omit)(t.parents,e),...Wp(n.blocks)},cache:{...(0,Ce.omit)(t.cache,e),...(0,Ce.omit)((0,Ce.mapValues)(Zp(n.blocks),(()=>({}))),r)}}}return e(t,n)}),(function(e){let t,n=!1;return(r,o)=>{let i=e(r,o);const a="MARK_LAST_CHANGE_AS_PERSISTENT"===o.type||n;if(r===i&&!a){var l;n="MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"===o.type;const e=null===(l=null==r?void 0:r.isPersistentChange)||void 0===l||l;return r.isPersistentChange===e?r:{...i,isPersistentChange:e}}return i={...i,isPersistentChange:a?!n:!qp(o,t)},t=o,n="MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"===o.type,i}}),(function(e){const t=new Set(["RECEIVE_BLOCKS"]);return(n,r)=>{const o=e(n,r);return o!==n&&(o.isIgnoredChange=t.has(r.type)),o}}))({byClientId(e={},t){switch(t.type){case"RESET_BLOCKS":return jp(t.blocks);case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":return{...e,...jp(t.blocks)};case"UPDATE_BLOCK":if(!e[t.clientId])return e;const n=(0,Ce.omit)(t.updates,"attributes");return(0,Ce.isEmpty)(n)?e:{...e,[t.clientId]:{...e[t.clientId],...n}};case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":return t.blocks?{...(0,Ce.omit)(e,t.replacedClientIds),...jp(t.blocks)}:e;case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return(0,Ce.omit)(e,t.removedClientIds)}return e},attributes(e={},t){switch(t.type){case"RESET_BLOCKS":return Up(t.blocks);case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":return{...e,...Up(t.blocks)};case"UPDATE_BLOCK":return e[t.clientId]&&t.updates.attributes?{...e,[t.clientId]:{...e[t.clientId],...t.updates.attributes}}:e;case"UPDATE_BLOCK_ATTRIBUTES":{if(t.clientIds.every((t=>!e[t])))return e;const n=t.clientIds.reduce(((n,r)=>({...n,[r]:(0,Ce.reduce)(t.uniqueByBlock?t.attributes[r]:t.attributes,((t,n,o)=>{var i,a;return n!==t[o]&&((t=(i=e[r])===(a=t)?{...i}:a)[o]=n),t}),e[r])})),{});return t.clientIds.every((t=>n[t]===e[t]))?e:{...e,...n}}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":return t.blocks?{...(0,Ce.omit)(e,t.replacedClientIds),...Up(t.blocks)}:e;case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return(0,Ce.omit)(e,t.removedClientIds)}return e},order(e={},t){switch(t.type){case"RESET_BLOCKS":return Vp(t.blocks);case"RECEIVE_BLOCKS":return{...e,...(0,Ce.omit)(Vp(t.blocks),"")};case"INSERT_BLOCKS":{const{rootClientId:n=""}=t,r=e[n]||[],o=Vp(t.blocks,n),{index:i=r.length}=t;return{...e,...o,[n]:zp(r,o[n],i)}}case"MOVE_BLOCKS_TO_POSITION":{const{fromRootClientId:n="",toRootClientId:r="",clientIds:o}=t,{index:i=e[r].length}=t;if(n===r){const t=e[r].indexOf(o[0]);return{...e,[r]:Hp(e[r],t,i,o.length)}}return{...e,[n]:(0,Ce.without)(e[n],...o),[r]:zp(e[r],o,i)}}case"MOVE_BLOCKS_UP":{const{clientIds:n,rootClientId:r=""}=t,o=(0,Ce.first)(n),i=e[r];if(!i.length||o===(0,Ce.first)(i))return e;const a=i.indexOf(o);return{...e,[r]:Hp(i,a,a-1,n.length)}}case"MOVE_BLOCKS_DOWN":{const{clientIds:n,rootClientId:r=""}=t,o=(0,Ce.first)(n),i=(0,Ce.last)(n),a=e[r];if(!a.length||i===(0,Ce.last)(a))return e;const l=a.indexOf(o);return{...e,[r]:Hp(a,l,l+1,n.length)}}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const{clientIds:n}=t;if(!t.blocks)return e;const r=Vp(t.blocks);return(0,Ce.flow)([e=>(0,Ce.omit)(e,t.replacedClientIds),e=>({...e,...(0,Ce.omit)(r,"")}),e=>(0,Ce.mapValues)(e,(e=>(0,Ce.reduce)(e,((e,t)=>t===n[0]?[...e,...r[""]]:(-1===n.indexOf(t)&&e.push(t),e)),[])))])(e)}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return(0,Ce.flow)([e=>(0,Ce.omit)(e,t.removedClientIds),e=>(0,Ce.mapValues)(e,(e=>(0,Ce.without)(e,...t.removedClientIds)))])(e)}return e},parents(e={},t){switch(t.type){case"RESET_BLOCKS":return Wp(t.blocks);case"RECEIVE_BLOCKS":return{...e,...Wp(t.blocks)};case"INSERT_BLOCKS":return{...e,...Wp(t.blocks,t.rootClientId||"")};case"MOVE_BLOCKS_TO_POSITION":return{...e,...t.clientIds.reduce(((e,n)=>(e[n]=t.toRootClientId||"",e)),{})};case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":return{...(0,Ce.omit)(e,t.replacedClientIds),...Wp(t.blocks,e[t.clientIds[0]])};case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return(0,Ce.omit)(e,t.removedClientIds)}return e},controlledInnerBlocks:(e={},{type:t,clientId:n,hasControlledInnerBlocks:r})=>"SET_HAS_CONTROLLED_INNER_BLOCKS"===t?{...e,[n]:r}:e});function Yp(e={},t){switch(t.type){case"CLEAR_SELECTED_BLOCK":return e.clientId?{}:e;case"SELECT_BLOCK":return t.clientId===e.clientId?e:{clientId:t.clientId};case"REPLACE_INNER_BLOCKS":case"INSERT_BLOCKS":return t.updateSelection&&t.blocks.length?{clientId:t.blocks[0].clientId}:e;case"REMOVE_BLOCKS":return t.clientIds&&t.clientIds.length&&-1!==t.clientIds.indexOf(e.clientId)?{}:e;case"REPLACE_BLOCKS":{if(-1===t.clientIds.indexOf(e.clientId))return e;const n=t.indexToSelect||t.blocks.length-1,r=t.blocks[n];return r?r.clientId===e.clientId?e:{clientId:r.clientId}:{}}}return e}var Xp=Se()({blocks:Kp,isTyping:function(e=!1,t){switch(t.type){case"START_TYPING":return!0;case"STOP_TYPING":return!1}return e},draggedBlocks:function(e=[],t){switch(t.type){case"START_DRAGGING_BLOCKS":return t.clientIds;case"STOP_DRAGGING_BLOCKS":return[]}return e},isCaretWithinFormattedText:function(e=!1,t){switch(t.type){case"ENTER_FORMATTED_TEXT":return!0;case"EXIT_FORMATTED_TEXT":return!1}return e},selection:function(e={},t){var n,r;switch(t.type){case"SELECTION_CHANGE":return{selectionStart:{clientId:t.clientId,attributeKey:t.attributeKey,offset:t.startOffset},selectionEnd:{clientId:t.clientId,attributeKey:t.attributeKey,offset:t.endOffset}};case"RESET_SELECTION":const{selectionStart:o,selectionEnd:i}=t;return{selectionStart:o,selectionEnd:i};case"MULTI_SELECT":const{start:a,end:l}=t;return{selectionStart:{clientId:a},selectionEnd:{clientId:l}};case"RESET_BLOCKS":const s=null==e||null===(n=e.selectionStart)||void 0===n?void 0:n.clientId,c=null==e||null===(r=e.selectionEnd)||void 0===r?void 0:r.clientId;if(!s&&!c)return e;if(!t.blocks.some((e=>e.clientId===s)))return{selectionStart:{},selectionEnd:{}};if(!t.blocks.some((e=>e.clientId===c)))return{...e,selectionEnd:e.selectionStart}}return{selectionStart:Yp(e.selectionStart,t),selectionEnd:Yp(e.selectionEnd,t)}},isMultiSelecting:function(e=!1,t){switch(t.type){case"START_MULTI_SELECT":return!0;case"STOP_MULTI_SELECT":return!1}return e},isSelectionEnabled:function(e=!0,t){switch(t.type){case"TOGGLE_SELECTION":return t.isSelectionEnabled}return e},initialPosition:function(e=null,t){return"REPLACE_BLOCKS"===t.type&&void 0!==t.initialPosition||["SELECT_BLOCK","RESET_SELECTION","INSERT_BLOCKS","REPLACE_INNER_BLOCKS"].includes(t.type)?t.initialPosition:e},blocksMode:function(e={},t){if("TOGGLE_BLOCK_MODE"===t.type){const{clientId:n}=t;return{...e,[n]:e[n]&&"html"===e[n]?"visual":"html"}}return e},blockListSettings:(e={},t)=>{switch(t.type){case"REPLACE_BLOCKS":case"REMOVE_BLOCKS":return(0,Ce.omit)(e,t.clientIds);case"UPDATE_BLOCK_LIST_SETTINGS":{const{clientId:n}=t;return t.settings?(0,Ce.isEqual)(e[n],t.settings)?e:{...e,[n]:t.settings}:e.hasOwnProperty(n)?(0,Ce.omit)(e,n):e}}return e},insertionPoint:function(e=null,t){switch(t.type){case"SHOW_INSERTION_POINT":const{rootClientId:e,index:n,__unstableWithInserter:r}=t;return{rootClientId:e,index:n,__unstableWithInserter:r};case"HIDE_INSERTION_POINT":return null}return e},template:function(e={isValid:!0},t){switch(t.type){case"SET_TEMPLATE_VALIDITY":return{...e,isValid:t.isValid}}return e},settings:function(e=Fp,t){switch(t.type){case"UPDATE_SETTINGS":return{...e,...t.settings}}return e},preferences:function(e=Bp,t){switch(t.type){case"INSERT_BLOCKS":case"REPLACE_BLOCKS":return t.blocks.reduce(((e,n)=>{const{attributes:r,name:o}=n,i=(0,be.Ys)(cl).getActiveBlockVariation(o,r);let a=null!=i&&i.name?`${o}/${i.name}`:o;const l={name:a};return"core/block"===o&&(l.ref=r.ref,a+="/"+r.ref),{...e,insertUsage:{...e.insertUsage,[a]:{time:t.time,count:e.insertUsage[a]?e.insertUsage[a].count+1:1,insert:l}}}}),e)}return e},lastBlockAttributesChange:function(e,t){switch(t.type){case"UPDATE_BLOCK":if(!t.updates.attributes)break;return{[t.clientId]:t.updates.attributes};case"UPDATE_BLOCK_ATTRIBUTES":return t.clientIds.reduce(((e,n)=>({...e,[n]:t.uniqueByBlock?t.attributes[n]:t.attributes})),{})}return null},isNavigationMode:function(e=!1,t){return"INSERT_BLOCKS"!==t.type&&("SET_NAVIGATION_MODE"===t.type?t.isNavigationMode:e)},hasBlockMovingClientId:function(e=null,t){return"SET_BLOCK_MOVING_MODE"===t.type?t.hasBlockMovingClientId:"SET_NAVIGATION_MODE"===t.type?null:e},automaticChangeStatus:function(e,t){switch(t.type){case"MARK_AUTOMATIC_CHANGE":return"pending";case"MARK_AUTOMATIC_CHANGE_FINAL":return"pending"===e?"final":void 0;case"SELECTION_CHANGE":return"final"!==e?e:void 0;case"START_TYPING":case"STOP_TYPING":return e}},highlightedBlock:function(e,t){switch(t.type){case"TOGGLE_BLOCK_HIGHLIGHT":const{clientId:n,isHighlighted:r}=t;return r?n:e===n?null:e;case"SELECT_BLOCK":if(t.clientId!==e)return null}return e},lastBlockInserted:function(e={},t){var n;switch(t.type){case"INSERT_BLOCKS":return t.blocks.length?{clientId:t.blocks[0].clientId,source:null===(n=t.meta)||void 0===n?void 0:n.source}:e;case"RESET_BLOCKS":return{}}return e}}),Jp="web",Qp=e=>"web"in e?e.web:e.default,em=(0,_.createElement)(ko,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,_.createElement)(yo,{d:"M21.3 10.8l-5.6-5.6c-.7-.7-1.8-.7-2.5 0l-5.6 5.6c-.7.7-.7 1.8 0 2.5l5.6 5.6c.3.3.8.5 1.2.5s.9-.2 1.2-.5l5.6-5.6c.8-.7.8-1.9.1-2.5zm-1 1.4l-5.6 5.6c-.1.1-.3.1-.4 0l-5.6-5.6c-.1-.1-.1-.3 0-.4l5.6-5.6s.1-.1.2-.1.1 0 .2.1l5.6 5.6c.1.1.1.3 0 .4zm-16.6-.4L10 5.5l-1-1-6.3 6.3c-.7.7-.7 1.8 0 2.5L9 19.5l1.1-1.1-6.3-6.3c-.2 0-.2-.2-.1-.3z"}));const tm=[];function nm(e,t){const n=e.blocks.byClientId[t],r="core/social-link";if("web"!==Jp&&(null==n?void 0:n.name)===r){const n=e.blocks.attributes[t],{service:o}=n;return o?`core/social-link-${o}`:r}return n?n.name:null}function rm(e,t){const n=e.blocks.byClientId[t];return!!n&&n.isValid}function om(e,t){return e.blocks.byClientId[t]?e.blocks.attributes[t]:null}const im=zt(((e,t)=>{const n=e.blocks.byClientId[t];return n?{...n,attributes:om(e,t),innerBlocks:Wf(e,t)?tm:lm(e,t)}:null}),((e,t)=>[e.blocks.cache[t]])),am=zt(((e,t)=>{const n=e.blocks.byClientId[t];return n?{...n,attributes:om(e,t)}:null}),((e,t)=>[e.blocks.byClientId[t],e.blocks.attributes[t]])),lm=zt(((e,t)=>(0,Ce.map)(jm(e,t),(t=>im(e,t)))),((e,t)=>(0,Ce.map)(e.blocks.order[t||""],(t=>e.blocks.cache[t])))),sm=zt(((e,t)=>{const n=e.blocks.byClientId[t];return n?{...n,attributes:om(e,t),innerBlocks:cm(e,t)}:null}),(e=>[e.blocks.byClientId,e.blocks.order,e.blocks.attributes])),cm=zt(((e,t="")=>(0,Ce.map)(jm(e,t),(t=>sm(e,t)))),(e=>[e.blocks.byClientId,e.blocks.order,e.blocks.attributes])),um=zt(((e,t)=>({clientId:t,innerBlocks:dm(e,t)})),(e=>[e.blocks.order])),dm=zt(((e,t="")=>(0,Ce.map)(jm(e,t),(t=>um(e,t)))),(e=>[e.blocks.order])),pm=(e,t)=>(0,Ce.flatMap)(t,(t=>{const n=jm(e,t);return[...n,...pm(e,n)]})),mm=zt((e=>{const t=jm(e);return[...t,...pm(e,t)]}),(e=>[e.blocks.order])),fm=zt(((e,t)=>{const n=mm(e);return t?(0,Ce.reduce)(n,((n,r)=>e.blocks.byClientId[r].name===t?n+1:n),0):n.length}),(e=>[e.blocks.order,e.blocks.byClientId])),hm=zt(((e,t)=>(0,Ce.map)((0,Ce.castArray)(t),(t=>im(e,t)))),(e=>[e.blocks.byClientId,e.blocks.order,e.blocks.attributes]));function gm(e,t){return jm(e,t).length}function vm(e){return e.selection.selectionStart}function bm(e){return e.selection.selectionEnd}function ym(e){return e.selection.selectionStart.clientId}function wm(e){return e.selection.selectionEnd.clientId}function km(e){return Dm(e).length||(e.selection.selectionStart.clientId?1:0)}function Em(e){const{selectionStart:t,selectionEnd:n}=e.selection;return!!t.clientId&&t.clientId===n.clientId}function _m(e){const{selectionStart:t,selectionEnd:n}=e.selection,{clientId:r}=t;return r&&r===n.clientId?r:null}function Cm(e){const t=_m(e);return t?im(e,t):null}function xm(e,t){return void 0!==e.blocks.parents[t]?e.blocks.parents[t]:null}const Sm=zt(((e,t,n=!1)=>{const r=[];let o=t;for(;e.blocks.parents[o];)o=e.blocks.parents[o],r.push(o);return n?r:r.reverse()}),(e=>[e.blocks.parents])),Im=zt(((e,t,n,r=!1)=>{const o=Sm(e,t,r);return(0,Ce.map)((0,Ce.filter)((0,Ce.map)(o,(t=>({id:t,name:nm(e,t)}))),(({name:e})=>Array.isArray(n)?n.includes(e):e===n)),(({id:e})=>e))}),(e=>[e.blocks.parents]));function Tm(e,t){let n,r=t;do{n=r,r=e.blocks.parents[r]}while(r);return n}function Nm(e,t){const n=_m(e),r=[...Sm(e,t),t],o=[...Sm(e,n),n];let i;const a=Math.min(r.length,o.length);for(let e=0;e<a&&r[e]===o[e];e++)i=r[e];return i}function Am(e,t,n=1){if(void 0===t&&(t=_m(e)),void 0===t&&(t=n<0?Bm(e):Fm(e)),!t)return null;const r=xm(e,t);if(null===r)return null;const{order:o}=e.blocks,i=o[r],a=i.indexOf(t)+1*n;return a<0||a===i.length?null:i[a]}function Rm(e,t){return Am(e,t,-1)}function Lm(e,t){return Am(e,t,1)}function Pm(e){return e.initialPosition}const Om=zt((e=>{const{selectionStart:t,selectionEnd:n}=e.selection;if(void 0===t.clientId||void 0===n.clientId)return tm;if(t.clientId===n.clientId)return[t.clientId];const r=xm(e,t.clientId);if(null===r)return tm;const o=jm(e,r),i=o.indexOf(t.clientId),a=o.indexOf(n.clientId);return i>a?o.slice(a,i+1):o.slice(i,a+1)}),(e=>[e.blocks.order,e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId]));function Dm(e){const{selectionStart:t,selectionEnd:n}=e.selection;return t.clientId===n.clientId?tm:Om(e)}const Mm=zt((e=>{const t=Dm(e);return t.length?t.map((t=>im(e,t))):tm}),(e=>[...Om.getDependants(e),e.blocks.byClientId,e.blocks.order,e.blocks.attributes]));function Bm(e){return(0,Ce.first)(Dm(e))||null}function Fm(e){return(0,Ce.last)(Dm(e))||null}function zm(e,t){return Bm(e)===t}function Hm(e,t){return-1!==Dm(e).indexOf(t)}const Vm=zt(((e,t)=>{let n=t,r=!1;for(;n&&!r;)n=xm(e,n),r=Hm(e,n);return r}),(e=>[e.blocks.order,e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId]));function Wm(e){const{selectionStart:t,selectionEnd:n}=e.selection;return t.clientId===n.clientId?null:t.clientId||null}function Zm(e){const{selectionStart:t,selectionEnd:n}=e.selection;return t.clientId===n.clientId?null:n.clientId||null}function jm(e,t){return e.blocks.order[t||""]||tm}function Um(e,t,n){return jm(e,n).indexOf(t)}function $m(e,t){const{selectionStart:n,selectionEnd:r}=e.selection;return n.clientId===r.clientId&&n.clientId===t}function qm(e,t,n=!1){return(0,Ce.some)(jm(e,t),(t=>$m(e,t)||Hm(e,t)||n&&qm(e,t,n)))}function Gm(e,t){if(!t)return!1;const n=Dm(e),r=n.indexOf(t);return r>-1&&r<n.length-1}function Km(e){const{selectionStart:t,selectionEnd:n}=e.selection;return t.clientId!==n.clientId}function Ym(e){return e.isMultiSelecting}function Xm(e){return e.isSelectionEnabled}function Jm(e,t){return e.blocksMode[t]||"visual"}function Qm(e){return e.isTyping}function ef(e){return!!e.draggedBlocks.length}function tf(e){return e.draggedBlocks}function nf(e,t){return e.draggedBlocks.includes(t)}function rf(e,t){if(!ef(e))return!1;const n=Sm(e,t);return(0,Ce.some)(n,(t=>nf(e,t)))}function of(e){return e.isCaretWithinFormattedText}function af(e){let t,n;const{insertionPoint:r,selection:{selectionEnd:o}}=e;if(null!==r)return r;const{clientId:i}=o;return i?(t=xm(e,i)||void 0,n=Um(e,o.clientId,t)+1):n=jm(e).length,{rootClientId:t,index:n}}function lf(e){return null!==e.insertionPoint}function sf(e){return e.template.isValid}function cf(e){return e.settings.template}function uf(e,t){if(!t)return e.settings.templateLock;const n=Nf(e,t);return n?n.templateLock:null}const df=(e,t,n=null)=>(0,Ce.isBoolean)(e)?e:(0,Ce.isArray)(e)?!(!e.includes("core/post-content")||null!==t)||e.includes(t):n,pf=(e,t,n=null)=>{let r;if(t&&"object"==typeof t?(r=t,t=r.name):r=zl(t),!r)return!1;const{allowedBlockTypes:o}=Af(e);if(!df(o,t,!0))return!1;if(uf(e,n))return!1;const i=Nf(e,n);if(n&&void 0===i)return!1;const a=null==i?void 0:i.allowedBlocks,l=df(a,t),s=r.parent,c=nm(e,n),u=df(s,c);return null!==l&&null!==u?l||u:null!==l?l:null===u||u},mf=zt(pf,((e,t,n)=>[e.blockListSettings[n],e.blocks.byClientId[n],e.settings.allowedBlockTypes,e.settings.templateLock]));function ff(e,t,n=null){return t.every((t=>mf(e,nm(e,t),n)))}function hf(e,t){var n,r;return null!==(n=null===(r=e.preferences.insertUsage)||void 0===r?void 0:r[t])&&void 0!==n?n:null}const gf=(e,t,n)=>!!Wl(t,"inserter",!0)&&pf(e,t.name,n),vf=(e,t)=>n=>{const r=`${t.id}/${n.name}`,{time:o,count:i=0}=hf(e,r)||{};return{...t,id:r,icon:n.icon||t.icon,title:n.title||t.title,description:n.description||t.description,category:n.category||t.category,example:n.hasOwnProperty("example")?n.example:t.example,initialAttributes:{...t.initialAttributes,...n.attributes},innerBlocks:n.innerBlocks,keywords:n.keywords||t.keywords,frecency:bf(o,i)}},bf=(e,t)=>{if(!e)return t;const 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}},yf=(e,{buildScope:t="inserter"})=>n=>{const r=n.name;let o=!1;Wl(n.name,"multiple",!0)||(o=(0,Ce.some)(hm(e,mm(e)),{name:n.name}));const{time:i,count:a=0}=hf(e,r)||{},l={id:r,name:n.name,title:n.title,icon:n.icon,isDisabled:o,frecency:bf(i,a)};if("transform"===t)return l;const s=n.variations.filter((({scope:e})=>!e||e.includes("inserter")));return{...l,initialAttributes:{},description:n.description,category:n.category,keywords:n.keywords,variations:s,example:n.example,utility:1}},wf=zt(((e,t=null)=>{const n=yf(e,{buildScope:"inserter"}),r=Hl().filter((n=>gf(e,n,t))).map(n),o=pf(e,"core/block",t)?Bf(e).map((t=>{const n=`core/block/${t.id}`,r=Pf(e,t.id);let o;1===r.length&&(o=zl(r[0].name));const{time:i,count:a=0}=hf(e,n)||{},l=bf(i,a);return{id:n,name:"core/block",initialAttributes:{ref:t.id},title:t.title.raw,icon:o?o.icon:em,category:"reusable",keywords:[],isDisabled:!1,utility:1,frecency:l}})):[],i=r.filter((({variations:e=[]})=>!e.some((({isDefault:e})=>e)))),a=[];for(const t of r){const{variations:n=[]}=t;if(n.length){const r=vf(e,t);a.push(...n.map(r))}}return[...[...i,...a].sort(((e,t)=>{const n="core/",r=e.name.startsWith(n),o=t.name.startsWith(n);return r&&o?0:r&&!o?-1:1})),...o]}),((e,t)=>[e.blockListSettings[t],e.blocks.byClientId,e.blocks.order,e.preferences.insertUsage,e.settings.allowedBlockTypes,e.settings.templateLock,Bf(e),Hl()])),kf=zt(((e,t,n=null)=>{const r=yf(e,{buildScope:"transform"}),o=Hl().filter((t=>gf(e,t,n))).map(r),i=(0,Ce.mapKeys)(o,(({name:e})=>e)),a=function(e){if((0,Ce.isEmpty)(e))return[];const t=(e=>{if((0,Ce.isEmpty)(e))return[];const t=Hl();return(0,Ce.filter)(t,(t=>!!Jl(Ql("from",t.name),(t=>Kl(t,"from",e)))))})(e),n=(e=>{if((0,Ce.isEmpty)(e))return[];const t=Ql("to",zl((0,Ce.first)(e).name).name),n=(0,Ce.filter)(t,(t=>t&&Kl(t,"to",e)));return(0,Ce.flatMap)(n,(e=>e.blocks)).map((e=>zl(e)))})(e);return(0,Ce.uniq)([...t,...n])}(t).reduce(((e,t)=>(i[null==t?void 0:t.name]&&e.push(i[t.name]),e)),[]);return(0,Ce.orderBy)(a,(e=>i[e.name].frecency),"desc")}),((e,t)=>[e.blockListSettings[t],e.blocks.byClientId,e.preferences.insertUsage,e.settings.allowedBlockTypes,e.settings.templateLock,Hl()])),Ef=zt(((e,t=null)=>!!(0,Ce.some)(Hl(),(n=>gf(e,n,t)))||pf(e,"core/block",t)&&Bf(e).length>0),((e,t)=>[e.blockListSettings[t],e.blocks.byClientId,e.settings.allowedBlockTypes,e.settings.templateLock,Bf(e),Hl()])),_f=zt(((e,t=null)=>{if(t)return(0,Ce.filter)(Hl(),(n=>gf(e,n,t)))}),((e,t)=>[e.blockListSettings[t],e.blocks.byClientId,e.settings.allowedBlockTypes,e.settings.templateLock,Hl()])),Cf=zt(((e,t)=>{const n=e.settings.__experimentalBlockPatterns.find((({name:e})=>e===t));return n?{...n,blocks:Wc(n.content)}:null}),(e=>[e.settings.__experimentalBlockPatterns])),xf=zt((e=>{const t=e.settings.__experimentalBlockPatterns,{allowedBlockTypes:n}=Af(e);return t.map((({name:t})=>Cf(e,t))).filter((({blocks:e})=>((e,t)=>{if((0,Ce.isBoolean)(t))return t;const n=[...e];for(;n.length>0;){var r;const e=n.shift();if(!df(t,e.name||e.blockName,!0))return!1;null===(r=e.innerBlocks)||void 0===r||r.forEach((e=>{n.push(e)}))}return!0})(e,n)))}),(e=>[e.settings.__experimentalBlockPatterns,e.settings.allowedBlockTypes])),Sf=zt(((e,t=null)=>{const n=xf(e);return(0,Ce.filter)(n,(({blocks:n})=>n.every((({name:n})=>mf(e,n,t)))))}),((e,t)=>[e.settings.__experimentalBlockPatterns,e.settings.allowedBlockTypes,e.settings.templateLock,e.blockListSettings[t],e.blocks.byClientId[t]])),If=zt(((e,t,n=null)=>{if(!t)return tm;const r=Sf(e,n),o=Array.isArray(t)?t:[t];return r.filter((e=>{var t,n;return null==e||null===(t=e.blockTypes)||void 0===t||null===(n=t.some)||void 0===n?void 0:n.call(t,(e=>o.includes(e)))}))}),((e,t)=>[...Sf.getDependants(e,t)])),Tf=zt(((e,t,n=null)=>{if(!t)return tm;if(t.some((({clientId:t,innerBlocks:n})=>n.length||Wf(e,t))))return tm;const r=Array.from(new Set(t.map((({name:e})=>e))));return If(e,r,n)}),((e,t)=>[...If.getDependants(e,t)]));function Nf(e,t){return e.blockListSettings[t]}function Af(e){return e.settings}function Rf(e){return e.blocks.isPersistentChange}const Lf=zt(((e,t=[])=>t.reduce(((t,n)=>e.blockListSettings[n]?{...t,[n]:e.blockListSettings[n]}:t),{})),(e=>[e.blockListSettings])),Pf=zt(((e,t)=>{const n=(0,Ce.find)(Bf(e),(e=>e.id===t));return n?Wc("string"==typeof n.content.raw?n.content.raw:n.content):null}),(e=>[Bf(e)])),Of=zt(((e,t)=>{var n;const r=(0,Ce.find)(Bf(e),(e=>e.id===t));return r?null===(n=r.title)||void 0===n?void 0:n.raw:null}),(e=>[Bf(e)]));function Df(e){return e.blocks.isIgnoredChange}function Mf(e){return e.lastBlockAttributesChange}function Bf(e){var t,n;return null!==(t=null==e||null===(n=e.settings)||void 0===n?void 0:n.__experimentalReusableBlocks)&&void 0!==t?t:tm}function Ff(e){return e.isNavigationMode}function zf(e){return e.hasBlockMovingClientId}function Hf(e){return!!e.automaticChangeStatus}function Vf(e,t){return e.highlightedBlock===t}function Wf(e,t){return!!e.blocks.controlledInnerBlocks[t]}const Zf=zt(((e,t)=>{if(!t.length)return null;const n=_m(e);if(t.includes(nm(e,n)))return n;const r=Dm(e),o=Im(e,n||r[0],t);return o?(0,Ce.last)(o):null}),((e,t)=>[e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId,t]));function jf(e,t,n){const{lastBlockInserted:r}=e;return r.clientId===t&&r.source===n}function Uf(e="polite"){const t=document.createElement("div");t.id=`a11y-speak-${e}`,t.className="a11y-speak-region",t.setAttribute("style","position: absolute;margin: -1px;padding: 0;height: 1px;width: 1px;overflow: hidden;clip: rect(1px, 1px, 1px, 1px);-webkit-clip-path: inset(50%);clip-path: inset(50%);border: 0;word-wrap: normal !important;"),t.setAttribute("aria-live",e),t.setAttribute("aria-relevant","additions text"),t.setAttribute("aria-atomic","true");const{body:n}=document;return n&&n.appendChild(t),t}let $f="";var qf;function Gf(e,t){!function(){const e=document.getElementsByClassName("a11y-speak-region"),t=document.getElementById("a11y-speak-intro-text");for(let t=0;t<e.length;t++)e[t].textContent="";t&&t.setAttribute("hidden","hidden")}(),e=function(e){return e=e.replace(/<[^<>]+>/g," "),$f===e&&(e+=" "),$f=e,e}(e);const n=document.getElementById("a11y-speak-intro-text"),r=document.getElementById("a11y-speak-assertive"),o=document.getElementById("a11y-speak-polite");r&&"assertive"===t?r.textContent=e:o&&(o.textContent=e),n&&n.removeAttribute("hidden")}qf=function(){const e=document.getElementById("a11y-speak-intro-text"),t=document.getElementById("a11y-speak-assertive"),n=document.getElementById("a11y-speak-polite");null===e&&function(){const e=document.createElement("p");e.id="a11y-speak-intro-text",e.className="a11y-speak-intro-text",e.textContent=U("Notifications"),e.setAttribute("style","position: absolute;margin: -1px;padding: 0;height: 1px;width: 1px;overflow: hidden;clip: rect(1px, 1px, 1px, 1px);-webkit-clip-path: inset(50%);clip-path: inset(50%);border: 0;word-wrap: normal !important;"),e.setAttribute("hidden","hidden");const{body:t}=document;t&&t.appendChild(e)}(),null===t&&Uf("assertive"),null===n&&Uf("polite")},"undefined"!=typeof document&&("complete"!==document.readyState&&"interactive"!==document.readyState?document.addEventListener("DOMContentLoaded",qf):qf());var Kf=Se()({formatTypes:function(e={},t){switch(t.type){case"ADD_FORMAT_TYPES":return{...e,...(0,Ce.keyBy)(t.formatTypes,"name")};case"REMOVE_FORMAT_TYPES":return(0,Ce.omit)(e,t.names)}return e}});const Yf=zt((e=>Object.values(e.formatTypes)),(e=>[e.formatTypes]));function Xf(e,t){return e.formatTypes[t]}function Jf(e,t){return(0,Ce.find)(Yf(e),(({className:e,tagName:n})=>null===e&&t===n))}function Qf(e,t){return(0,Ce.find)(Yf(e),(({className:e})=>null!==e&&` ${t} `.indexOf(` ${e} `)>=0))}function eh(e){return{type:"ADD_FORMAT_TYPES",formatTypes:(0,Ce.castArray)(e)}}function th(e){return{type:"REMOVE_FORMAT_TYPES",names:(0,Ce.castArray)(e)}}const nh=(0,ye.Z)("core/rich-text",{reducer:Kf,selectors:m,actions:f});function rh(e,t){if(e===t)return!0;if(!e||!t)return!1;if(e.type!==t.type)return!1;const n=e.attributes,r=t.attributes;if(n===r)return!0;if(!n||!r)return!1;const o=Object.keys(n),i=Object.keys(r);if(o.length!==i.length)return!1;const a=o.length;for(let e=0;e<a;e++){const t=o[e];if(n[t]!==r[t])return!1}return!0}function oh(e){const t=e.formats.slice();return t.forEach(((e,n)=>{const r=t[n-1];if(r){const o=e.slice();o.forEach(((e,t)=>{const n=r[t];rh(e,n)&&(o[t]=n)})),t[n]=o}})),{...e,formats:t}}function ih(e,t,n){return(e=e.slice())[t]=n,e}function ah(e,t,n=e.start,r=e.end){const{formats:o,activeFormats:i}=e,a=o.slice();if(n===r){const e=(0,Ce.find)(a[n],{type:t.type});if(e){const o=a[n].indexOf(e);for(;a[n]&&a[n][o]===e;)a[n]=ih(a[n],o,t),n--;for(r++;a[r]&&a[r][o]===e;)a[r]=ih(a[r],o,t),r++}}else{let e=1/0;for(let o=n;o<r;o++)if(a[o]){a[o]=a[o].filter((({type:e})=>e!==t.type));const n=a[o].length;n<e&&(e=n)}else a[o]=[],e=0;for(let o=n;o<r;o++)a[o].splice(e,0,t)}return oh({...e,formats:a,activeFormats:[...(0,Ce.reject)(i,{type:t.type}),t]})}function lh({implementation:e},t){return lh.body||(lh.body=e.createHTMLDocument("").body),lh.body.innerHTML=t,lh.body}function sh(e,t){return e.formats=e.formats.concat(t.formats),e.replacements=e.replacements.concat(t.replacements),e.text+=t.text,e}(0,be.z2)(nh);const ch="\u2028",uh="";function dh(e,t){for(const n in e)if(e[n]===t)return n}function ph({type:e,attributes:t}){let n;if(t&&t.class&&(n=(0,be.Ys)(nh).getFormatTypeForClassName(t.class),n&&(t.class=` ${t.class} `.replace(` ${n.className} `," ").trim(),t.class||delete t.class)),n||(n=(0,be.Ys)(nh).getFormatTypeForBareElement(e)),!n)return t?{type:e,attributes:t}:{type:e};if(n.__experimentalCreatePrepareEditableTree&&!n.__experimentalCreateOnChangeEditableValue)return null;if(!t)return{type:n.name};const r={},o={};for(const e in t){const i=dh(n.attributes,e);i?r[i]=t[e]:o[e]=t[e]}return{type:n.name,attributes:r,unregisteredAttributes:o}}function mh({element:e,text:t,html:n,range:r,multilineTag:o,multilineWrapperTags:i,__unstableIsEditableTree:a,preserveWhiteSpace:l}={}){return"string"==typeof t&&t.length>0?{formats:Array(t.length),replacements:Array(t.length),text:t}:("string"==typeof n&&n.length>0&&(e=lh(document,n)),"object"!=typeof e?{formats:[],replacements:[],text:""}:o?wh({element:e,range:r,multilineTag:o,multilineWrapperTags:i,isEditableTree:a,preserveWhiteSpace:l}):yh({element:e,range:r,isEditableTree:a,preserveWhiteSpace:l}))}function fh(e,t,n,r){if(!n)return;const{parentNode:o}=t,{startContainer:i,startOffset:a,endContainer:l,endOffset:s}=n,c=e.text.length;void 0!==r.start?e.start=c+r.start:t===i&&t.nodeType===t.TEXT_NODE?e.start=c+a:o===i&&t===i.childNodes[a]?e.start=c:o===i&&t===i.childNodes[a-1]?e.start=c+r.text.length:t===i&&(e.start=c),void 0!==r.end?e.end=c+r.end:t===l&&t.nodeType===t.TEXT_NODE?e.end=c+s:o===l&&t===l.childNodes[s-1]?e.end=c+r.text.length:o===l&&t===l.childNodes[s]?e.end=c:t===l&&(e.end=c+s)}function hh(e,t,n){if(!t)return;const{startContainer:r,endContainer:o}=t;let{startOffset:i,endOffset:a}=t;return e===r&&(i=n(e.nodeValue.slice(0,i)).length),e===o&&(a=n(e.nodeValue.slice(0,a)).length),{startContainer:r,startOffset:i,endContainer:o,endOffset:a}}function gh(e){return e.replace(/[\n\r\t]+/g," ")}const vh=new RegExp("\ufeff","g");function bh(e){return e.replace(vh,"")}function yh({element:e,range:t,multilineTag:n,multilineWrapperTags:r,currentWrapperTags:o=[],isEditableTree:i,preserveWhiteSpace:a}){const l={formats:[],replacements:[],text:""};if(!e)return l;if(!e.hasChildNodes())return fh(l,e,t,{formats:[],replacements:[],text:""}),l;const s=e.childNodes.length;for(let c=0;c<s;c++){const s=e.childNodes[c],u=s.nodeName.toLowerCase();if(s.nodeType===s.TEXT_NODE){let e=bh;a||(e=e=>bh(gh(e)));const n=e(s.nodeValue);fh(l,s,t=hh(s,t,e),{text:n}),l.formats.length+=n.length,l.replacements.length+=n.length,l.text+=n;continue}if(s.nodeType!==s.ELEMENT_NODE)continue;if(i&&(s.getAttribute("data-rich-text-placeholder")||"br"===u&&!s.getAttribute("data-rich-text-line-break"))){fh(l,s,t,{formats:[],replacements:[],text:""});continue}if("script"===u){const e={formats:[,],replacements:[{type:u,attributes:{"data-rich-text-script":s.getAttribute("data-rich-text-script")||encodeURIComponent(s.innerHTML)}}],text:uh};fh(l,s,t,e),sh(l,e);continue}if("br"===u){fh(l,s,t,{formats:[],replacements:[],text:""}),sh(l,mh({text:"\n"}));continue}const d=l.formats[l.formats.length-1],p=d&&d[d.length-1],m=ph({type:u,attributes:kh({element:s})}),f=rh(m,p)?p:m;if(r&&-1!==r.indexOf(u)){const e=wh({element:s,range:t,multilineTag:n,multilineWrapperTags:r,currentWrapperTags:[...o,f],isEditableTree:i,preserveWhiteSpace:a});fh(l,s,t,e),sh(l,e);continue}const h=yh({element:s,range:t,multilineTag:n,multilineWrapperTags:r,isEditableTree:i,preserveWhiteSpace:a});if(fh(l,s,t,h),f)if(0===h.text.length)f.attributes&&sh(l,{formats:[,],replacements:[f],text:uh});else{function e(t){if(e.formats===t)return e.newFormats;const n=t?[f,...t]:[f];return e.formats=t,e.newFormats=n,n}e.newFormats=[f],sh(l,{...h,formats:Array.from(h.formats,e)})}else sh(l,h)}return l}function wh({element:e,range:t,multilineTag:n,multilineWrapperTags:r,currentWrapperTags:o=[],isEditableTree:i,preserveWhiteSpace:a}){const l={formats:[],replacements:[],text:""};if(!e||!e.hasChildNodes())return l;const s=e.children.length;for(let c=0;c<s;c++){const s=e.children[c];if(s.nodeName.toLowerCase()!==n)continue;const u=yh({element:s,range:t,multilineTag:n,multilineWrapperTags:r,currentWrapperTags:o,isEditableTree:i,preserveWhiteSpace:a});(0!==c||o.length>0)&&sh(l,{formats:[,],replacements:o.length>0?[o]:[,],text:ch}),fh(l,s,t,u),sh(l,u)}return l}function kh({element:e}){if(!e.hasAttributes())return;const t=e.attributes.length;let n;for(let r=0;r<t;r++){const{name:t,value:o}=e.attributes[r];0!==t.indexOf("data-rich-text-")&&(n=n||{},n[/^on/i.test(t)?"data-disable-rich-text-"+t:t]=o)}return n}function Eh({formats:e,start:t,end:n,activeFormats:r},o=[]){if(void 0===t)return o;if(t===n){if(r)return r;const n=e[t-1]||o,i=e[t]||o;return n.length<i.length?n:i}return e[t]||o}function _h(e,t){return(0,Ce.find)(Eh(e),{type:t})}function Ch({text:e}){return e.replace(new RegExp(uh,"g"),"").replace(new RegExp(ch,"g"),"\n")}function xh({start:e,end:t}){if(void 0!==e&&void 0!==t)return e===t}function Sh({text:e}){return 0===e.length}function Ih({text:e,start:t,end:n}){return t===n&&(0===e.length||0===t&&e.slice(0,1)===ch||t===e.length&&e.slice(-1)===ch||"\u2028\u2028"===e.slice(t-1,n+1))}function Th(e,t){if("string"==typeof(t={name:e,...t}).name)if(/^[a-z][a-z0-9-]*\/[a-z][a-z0-9-]*$/.test(t.name))if((0,be.Ys)(nh).getFormatType(t.name))window.console.error('Format "'+t.name+'" is already registered.');else if("string"==typeof t.tagName&&""!==t.tagName)if("string"==typeof t.className&&""!==t.className||null===t.className)if(/^[_a-zA-Z]+[a-zA-Z0-9-]*$/.test(t.className)){if(null===t.className){const e=(0,be.Ys)(nh).getFormatTypeForBareElement(t.tagName);if(e)return void window.console.error(`Format "${e.name}" is already registered to handle bare tag name "${t.tagName}".`)}else{const e=(0,be.Ys)(nh).getFormatTypeForClassName(t.className);if(e)return void window.console.error(`Format "${e.name}" is already registered to handle class name "${t.className}".`)}if("title"in t&&""!==t.title)if("keywords"in t&&t.keywords.length>3)window.console.error('The format "'+t.name+'" can have a maximum of 3 keywords.');else{if("string"==typeof t.title)return(0,be.WI)(nh).addFormatTypes(t),t;window.console.error("Format titles must be strings.")}else window.console.error('The format "'+t.name+'" must have a title.')}else window.console.error("A class name must begin with a letter, followed by any number of hyphens, letters, or numbers.");else window.console.error("Format class names must be a string, or null to handle bare elements.");else window.console.error("Format tag names must be a string.");else window.console.error("Format names must contain a namespace prefix, include only lowercase alphanumeric characters or dashes, and start with a letter. Example: my-plugin/my-custom-format");else window.console.error("Format names must be strings.")}function Nh(e,t,n=e.start,r=e.end){const{formats:o,activeFormats:i}=e,a=o.slice();if(n===r){const e=(0,Ce.find)(a[n],{type:t});if(e){for(;(0,Ce.find)(a[n],e);)Ah(a,n,t),n--;for(r++;(0,Ce.find)(a[r],e);)Ah(a,r,t),r++}}else for(let e=n;e<r;e++)a[e]&&Ah(a,e,t);return oh({...e,formats:a,activeFormats:(0,Ce.reject)(i,{type:t})})}function Ah(e,t,n){const r=e[t].filter((({type:e})=>e!==n));r.length?e[t]=r:delete e[t]}function Rh(e,t,n=e.start,r=e.end){const{formats:o,replacements:i,text:a}=e;"string"==typeof t&&(t=mh({text:t}));const l=n+t.text.length;return oh({formats:o.slice(0,n).concat(t.formats,o.slice(r)),replacements:i.slice(0,n).concat(t.replacements,i.slice(r)),text:a.slice(0,n)+t.text+a.slice(r),start:l,end:l})}function Lh(e,t,n){return Rh(e,mh(),t,n)}function Ph({formats:e,replacements:t,text:n,start:r,end:o},i,a){return n=n.replace(i,((n,...i)=>{const l=i[i.length-2];let s,c,u=a;return"function"==typeof u&&(u=a(n,...i)),"object"==typeof u?(s=u.formats,c=u.replacements,u=u.text):(s=Array(u.length),c=Array(u.length),e[l]&&(s=s.fill(e[l]))),e=e.slice(0,l).concat(s,e.slice(l+n.length)),t=t.slice(0,l).concat(c,t.slice(l+n.length)),r&&(r=o=l+u.length),u})),oh({formats:e,replacements:t,text:n,start:r,end:o})}function Oh(e,t=e.start,n=e.end){const{formats:r,replacements:o,text:i}=e;return void 0===t||void 0===n?{...e}:{formats:r.slice(t,n),replacements:o.slice(t,n),text:i.slice(t,n)}}function Dh({formats:e,replacements:t,text:n,start:r,end:o},i=r,a=o){if(void 0===r||void 0===o)return;const l={formats:e.slice(0,i),replacements:t.slice(0,i),text:n.slice(0,i)},s={formats:e.slice(a),replacements:t.slice(a),text:n.slice(a),start:0,end:0};return[Ph(l,/\u2028+$/,""),Ph(s,/^\u2028+/,"")]}function Mh(e,t){if(t)return e;const n={};for(const t in e){let r=t;t.startsWith("data-disable-rich-text-")&&(r=t.slice("data-disable-rich-text-".length)),n[r]=e[t]}return n}function Bh({type:e,attributes:t,unregisteredAttributes:n,object:r,boundaryClass:o,isEditableTree:i}){const a=(l=e,(0,be.Ys)(nh).getFormatType(l));var l;let s={};if(o&&(s["data-rich-text-format-boundary"]="true"),!a)return t&&(s={...t,...s}),{type:e,attributes:Mh(s,i),object:r};s={...n,...s};for(const e in t){const n=!!a.attributes&&a.attributes[e];n?s[n]=t[e]:s[e]=t[e]}return a.className&&(s.class?s.class=`${a.className} ${s.class}`:s.class=a.className),{type:a.tagName,object:a.object,attributes:Mh(s,i)}}function Fh(e,t,n){do{if(e[n]!==t[n])return!1}while(n--);return!0}function zh({value:e,multilineTag:t,preserveWhiteSpace:n,createEmpty:r,append:o,getLastChild:i,getParent:a,isText:l,getText:s,remove:c,appendText:u,onStartIndex:d,onEndIndex:p,isEditableTree:m,placeholder:f}){const{formats:h,replacements:g,text:v,start:b,end:y}=e,w=h.length+1,k=r(),E={type:t},_=Eh(e),C=_[_.length-1];let x,S,I;t?(o(o(k,{type:t}),""),S=x=[E]):o(k,"");for(let e=0;e<w;e++){const r=v.charAt(e),w=m&&(!I||I===ch||"\n"===I);let _=h[e];t&&(_=r===ch?x=(g[e]||[]).reduce(((e,t)=>(e.push(t,E),e)),[E]):[...x,..._||[]]);let T=i(k);if(w&&r===ch){let e=T;for(;!l(e);)e=i(e);o(a(e),"\ufeff")}if(I===ch){let t=T;for(;!l(t);)t=i(t);d&&b===e&&d(k,t),p&&y===e&&p(k,t)}_&&_.forEach(((e,t)=>{if(T&&S&&Fh(_,S,t)&&(r!==ch||_.length-1!==t))return void(T=i(T));const{type:n,attributes:u,unregisteredAttributes:d}=e,p=m&&r!==ch&&e===C,f=a(T),h=o(f,Bh({type:n,attributes:u,unregisteredAttributes:d,boundaryClass:p,isEditableTree:m}));l(T)&&0===s(T).length&&c(T),T=o(h,"")})),r!==ch?(0===e&&(d&&0===b&&d(k,T),p&&0===y&&p(k,T)),r===uh?(m||"script"!==g[e].type?T=o(a(T),Bh({...g[e],object:!0,isEditableTree:m})):(T=o(a(T),Bh({type:"script",isEditableTree:m})),o(T,{html:decodeURIComponent(g[e].attributes["data-rich-text-script"])})),T=o(a(T),"")):n||"\n"!==r?l(T)?u(T,r):T=o(a(T),r):(T=o(a(T),{type:"br",attributes:m?{"data-rich-text-line-break":"true"}:void 0,object:!0}),T=o(a(T),"")),d&&b===e+1&&d(k,T),p&&y===e+1&&p(k,T),w&&e===v.length&&(o(a(T),"\ufeff"),f&&0===v.length&&o(a(T),{type:"span",attributes:{"data-rich-text-placeholder":f,contenteditable:"false",style:"pointer-events:none;user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;"}})),S=_,I=r):(S=_,I=r)}return k}function Hh({value:e,multilineTag:t,preserveWhiteSpace:n}){return Kh(zh({value:e,multilineTag:t,preserveWhiteSpace:n,createEmpty:Vh,append:Zh,getLastChild:Wh,getParent:Uh,isText:$h,getText:qh,remove:Gh,appendText:jh}).children)}function Vh(){return{}}function Wh({children:e}){return e&&e[e.length-1]}function Zh(e,t){return"string"==typeof t&&(t={text:t}),t.parent=e,e.children=e.children||[],e.children.push(t),t}function jh(e,t){e.text+=t}function Uh({parent:e}){return e}function $h({text:e}){return"string"==typeof e}function qh({text:e}){return e}function Gh(e){const t=e.parent.children.indexOf(e);return-1!==t&&e.parent.children.splice(t,1),e}function Kh(e=[]){return e.map((e=>void 0!==e.html?e.html:void 0===e.text?function({type:e,attributes:t,object:n,children:r}){let o="";for(const e in t)(0,fs.$b)(e)&&(o+=` ${e}="${(0,fs.kb)(t[e])}"`);return n?`<${e}${o}>`:`<${e}${o}>${Kh(r)}</${e}>`}(e):(0,fs.N2)(e.text))).join("")}function Yh(e,t){return _h(e,t.type)?Nh(e,t.type):ah(e,t)}function Xh({ref:e,value:t,settings:n={}}){const{tagName:r,className:o,name:i}=n,a=i?_h(t,i):void 0;return(0,_.useMemo)((()=>{if(!e.current)return;const{ownerDocument:{defaultView:t}}=e.current,n=t.getSelection();if(!n.rangeCount)return;const i=n.getRangeAt(0);if(!a)return i;let l=i.startContainer;for(l=l.nextElementSibling||l;l.nodeType!==l.ELEMENT_NODE;)l=l.parentNode;return l.closest(r+(o?"."+o:""))}),[a,t.start,t.end,r,o])}function Jh(e,t){const n=(0,_.useRef)();return(0,_.useCallback)((t=>{t?n.current=e(t):n.current&&n.current()}),t)}function Qh(e,t,n){const r=e.parentNode;let o=0;for(;e=e.previousSibling;)o++;return n=[o,...n],r!==t&&(n=Qh(r,t,n)),n}function eg(e,t){for(t=[...t];e&&t.length>1;)e=e.childNodes[t.shift()];return{node:e,offset:t[0]}}function tg(e,t){"string"==typeof t&&(t=e.ownerDocument.createTextNode(t));const{type:n,attributes:r}=t;if(n){t=e.ownerDocument.createElement(n);for(const e in r)t.setAttribute(e,r[e])}return e.appendChild(t)}function ng(e,t){e.appendData(t)}function rg({lastChild:e}){return e}function og({parentNode:e}){return e}function ig(e){return e.nodeType===e.TEXT_NODE}function ag({nodeValue:e}){return e}function lg(e){return e.parentNode.removeChild(e)}function sg({value:e,current:t,multilineTag:n,prepareEditableTree:r,__unstableDomOnly:o,placeholder:i}){const{body:a,selection:l}=function({value:e,multilineTag:t,prepareEditableTree:n,isEditableTree:r=!0,placeholder:o,doc:i=document}){let a=[],l=[];return n&&(e={...e,formats:n(e)}),{body:zh({value:e,multilineTag:t,createEmpty:()=>lh(i,""),append:tg,getLastChild:rg,getParent:og,isText:ig,getText:ag,remove:lg,appendText:ng,onStartIndex(e,t){a=Qh(t,e,[t.nodeValue.length])},onEndIndex(e,t){l=Qh(t,e,[t.nodeValue.length])},isEditableTree:r,placeholder:o}),selection:{startPath:a,endPath:l}}}({value:e,multilineTag:n,prepareEditableTree:r,placeholder:i,doc:t.ownerDocument});cg(a,t),void 0===e.start||o||function({startPath:e,endPath:t},n){const{node:r,offset:o}=eg(n,e),{node:i,offset:a}=eg(n,t),{ownerDocument:l}=n,{defaultView:s}=l,c=s.getSelection(),u=l.createRange();u.setStart(r,o),u.setEnd(i,a);const{activeElement:d}=l;if(c.rangeCount>0){if(p=u,m=c.getRangeAt(0),p.startContainer===m.startContainer&&p.startOffset===m.startOffset&&p.endContainer===m.endContainer&&p.endOffset===m.endOffset)return;c.removeAllRanges()}var p,m;c.addRange(u),d!==l.activeElement&&d instanceof s.HTMLElement&&d.focus()}(l,t)}function cg(e,t){let n,r=0;for(;n=e.firstChild;){const o=t.childNodes[r];if(o)if(o.isEqualNode(n))e.removeChild(n);else if(o.nodeName!==n.nodeName||o.nodeType===o.TEXT_NODE&&o.data!==n.data)t.replaceChild(n,o);else{const t=o.attributes,r=n.attributes;if(t){let e=t.length;for(;e--;){const{name:r}=t[e];n.getAttribute(r)||o.removeAttribute(r)}}if(r)for(let e=0;e<r.length;e++){const{name:t,value:n}=r[e];o.getAttribute(t)!==n&&o.setAttribute(t,n)}cg(n,o),e.removeChild(n)}else t.appendChild(n);r++}for(;t.childNodes[r];)t.removeChild(t.childNodes[r])}function ug({record:e}){const t=(0,_.useRef)(),{activeFormats:n=[]}=e.current;return(0,_.useEffect)((()=>{if(!n||!n.length)return;const e="*[data-rich-text-format-boundary]",r=t.current.querySelector(e);if(!r)return;const{ownerDocument:o}=r,{defaultView:i}=o,a=`.rich-text:focus ${e} {background-color: ${i.getComputedStyle(r).color.replace(")",", 0.2)").replace("rgb","rgba")}}`,l="rich-text-boundary-style";let s=o.getElementById(l);s||(s=o.createElement("style"),s.id=l,o.head.appendChild(s)),s.innerHTML!==a&&(s.innerHTML=a)}),[n]),t}function dg(e){const t=(0,_.useRef)(e);return t.current=e,Jh((e=>{function n(n){const{record:r,multilineTag:o,preserveWhiteSpace:i}=t.current;if(xh(r.current)||!e.contains(e.ownerDocument.activeElement))return;const a=Oh(r.current),l=Ch(a),s=Hh({value:a,multilineTag:o,preserveWhiteSpace:i});n.clipboardData.setData("text/plain",l),n.clipboardData.setData("text/html",s),n.clipboardData.setData("rich-text","true"),n.preventDefault()}return e.addEventListener("copy",n),()=>{e.removeEventListener("copy",n)}}),[])}const pg=[];function mg(e){const[,t]=(0,_.useReducer)((()=>({}))),n=(0,_.useRef)(e);return n.current=e,Jh((e=>{function r(r){const{keyCode:o,shiftKey:i,altKey:a,metaKey:l,ctrlKey:s}=r;if(i||a||l||s||o!==zr&&o!==Vr)return;const{record:c,applyRecord:u}=n.current,{text:d,formats:p,start:m,end:f,activeFormats:h=[]}=c.current,g=xh(c.current),{ownerDocument:v}=e,{defaultView:b}=v,{direction:y}=b.getComputedStyle(e),w="rtl"===y?Vr:zr,k=r.keyCode===w;if(g&&0===h.length){if(0===m&&k)return;if(f===d.length&&!k)return}if(!g)return;const E=p[m-1]||pg,_=p[m]||pg;let C=h.length,x=_;if(E.length>_.length&&(x=E),E.length<_.length?(!k&&h.length<_.length&&C++,k&&h.length>E.length&&C--):E.length>_.length&&(!k&&h.length>_.length&&C--,k&&h.length<E.length&&C++),C===h.length)return void(c.current._newActiveFormats=k?E:_);r.preventDefault();const S=x.slice(0,C),I={...c.current,activeFormats:S};c.current=I,u(I),t()}return e.addEventListener("keydown",r),()=>{e.removeEventListener("keydown",r)}}),[])}function fg({start:e,text:t},n=e){let r=n;for(;r--;)if(t[r]===ch)return r}function hg(e){const t=(0,_.useRef)(e);return t.current=e,Jh((e=>{function n(n){const{keyCode:r,shiftKey:o,altKey:i,metaKey:a,ctrlKey:l}=n,{multilineTag:s,createRecord:c,handleChange:u}=t.current;if(o||i||a||l||32!==r||"li"!==s)return;const d=c();if(!xh(d))return;const{text:p,start:m}=d,f=p[m-1];f&&f!==ch||(u(function(e,t){if(!function(e){const t=fg(e);if(void 0===t)return!1;const{replacements:n}=e,r=fg(e,t),o=n[t]||[],i=n[r]||[];return o.length<=i.length}(e))return e;const n=fg(e),r=fg(e,n),{text:o,replacements:i,end:a}=e,l=i.slice(),s=function({text:e,replacements:t},n){const r=t[n]||[];let o=n;for(;o-- >=0;){if(e[o]!==ch)continue;const n=t[o]||[];if(n.length===r.length+1)return o;if(n.length<=r.length)return}}(e,n);for(let e=n;e<a;e++)if(o[e]===ch)if(s){const t=i[s]||[];l[e]=t.concat((l[e]||[]).slice(t.length-1))}else{const n=i[r]||[],o=n[n.length-1]||t;l[e]=n.concat([o],(l[e]||[]).slice(n.length))}return{...e,replacements:l}}(d,{type:e.tagName.toLowerCase()})),n.preventDefault())}return e.addEventListener("keydown",n),()=>{e.removeEventListener("keydown",n)}}),[])}const gg=new Set(["insertParagraph","insertOrderedList","insertUnorderedList","insertHorizontalRule","insertLink"]),vg=[];function bg(e){const t=(0,_.useRef)(e);return t.current=e,Jh((e=>{const{ownerDocument:n}=e,{defaultView:r}=n;let o,i=!1;function a(e){if(i)return;let n;e&&(n=e.inputType);const{record:r,applyRecord:o,createRecord:a,handleChange:l}=t.current;if(n&&(0===n.indexOf("format")||gg.has(n)))return void o(r.current);const s=a(),{start:c,activeFormats:u=[]}=r.current;l(function({value:e,start:t,end:n,formats:r}){const o=e.formats[t-1]||[],i=e.formats[n]||[];for(e.activeFormats=r.map(((e,t)=>{if(o[t]){if(rh(e,o[t]))return o[t]}else if(i[t]&&rh(e,i[t]))return i[t];return e}));--n>=t;)e.activeFormats.length>0?e.formats[n]=e.activeFormats:delete e.formats[n];return e}({value:s,start:c,end:s.start,formats:u}))}function l(o){if(n.activeElement!==e)return;const{record:l,applyRecord:s,createRecord:c,isSelected:u,onSelectionChange:d}=t.current;if("selectionchange"!==o.type&&!u)return;if("true"!==e.contentEditable)return;if(i)return;const{start:p,end:m,text:f}=c(),h=l.current;if(f!==h.text)return void a();if(p===h.start&&m===h.end)return void(0===h.text.length&&0===p&&function(e){const t=e.getSelection(),{anchorNode:n,anchorOffset:r}=t;if(n.nodeType!==n.ELEMENT_NODE)return;const o=n.childNodes[r];o&&o.nodeType===o.ELEMENT_NODE&&o.getAttribute("data-rich-text-placeholder")&&t.collapseToStart()}(r));const g={...h,start:p,end:m,activeFormats:h._newActiveFormats,_newActiveFormats:void 0},v=Eh(g,vg);g.activeFormats=v,l.current=g,s(g,{domOnly:!0}),d(p,m)}function s(){i=!0,n.removeEventListener("selectionchange",l)}function c(){i=!1,a({inputType:"insertText"}),n.addEventListener("selectionchange",l)}function u(){const{record:e,isSelected:i,onSelectionChange:a}=t.current;if(i)a(e.current.start,e.current.end);else{const t=void 0;e.current={...e.current,start:t,end:t,activeFormats:vg},a(t,t)}o=r.requestAnimationFrame(l),n.addEventListener("selectionchange",l)}function d(){n.removeEventListener("selectionchange",l)}return e.addEventListener("input",a),e.addEventListener("compositionstart",s),e.addEventListener("compositionend",c),e.addEventListener("focus",u),e.addEventListener("blur",d),e.addEventListener("keyup",l),e.addEventListener("mouseup",l),e.addEventListener("touchend",l),()=>{e.removeEventListener("input",a),e.removeEventListener("compositionstart",s),e.removeEventListener("compositionend",c),e.removeEventListener("focus",u),e.removeEventListener("blur",d),e.removeEventListener("keyup",l),e.removeEventListener("mouseup",l),e.removeEventListener("touchend",l),n.removeEventListener("selectionchange",l),r.cancelAnimationFrame(o)}}),[])}function yg(e,t=!0){const{replacements:n,text:r,start:o,end:i}=e,a=xh(e);let l,s=o-1,c=a?o-1:o,u=i;if(t||(s=i,c=o,u=a?i+1:i),r[s]===ch){if(a&&n[s]&&n[s].length){const t=n.slice();t[s]=n[s].slice(0,-1),l={...e,replacements:t}}else l=Lh(e,c,u);return l}}function wg(e){const t=(0,_.useRef)(e);return t.current=e,Jh((e=>{function n(e){const{keyCode:n}=e,{createRecord:r,handleChange:o,multilineTag:i}=t.current;if(e.defaultPrevented)return;if(46!==n&&8!==n)return;const a=r(),{start:l,end:s,text:c}=a,u=8===n;if(0===l&&0!==s&&s===c.length)return o(Lh(a)),void e.preventDefault();if(i){let t;t=u&&0===a.start&&0===a.end&&Ih(a)?yg(a,!u):yg(a,u),t&&(o(t),e.preventDefault())}}return e.addEventListener("keydown",n),()=>{e.removeEventListener("keydown",n)}}),[])}var kg={SLEEP:({duration:e})=>new Promise((t=>{setTimeout(t,e)})),MARK_AUTOMATIC_CHANGE_FINAL_CONTROL:(0,Ge.R)((e=>()=>{const{requestIdleCallback:t=(e=>setTimeout(e,100))}=window;t((()=>e.dispatch(Iv).__unstableMarkAutomaticChangeFinal()))}))};const Eg="core/block-editor";function*_g(){if(0===(yield Re.a.select(Eg,"getBlockCount"))){const{__unstableHasCustomAppender:e}=yield Re.a.select(Eg,"getSettings");if(e)return;return yield uv()}}function*Cg(e){return yield{type:"RESET_BLOCKS",blocks:e},yield*xg(e)}function*xg(e){const t=yield Re.a.select(Eg,"getTemplate"),n=yield Re.a.select(Eg,"getTemplateLock"),r=!t||"all"!==n||ju(e,t);if(r!==(yield Re.a.select(Eg,"isValidTemplate")))return yield Yg(r),r}function Sg(e,t,n){return{type:"RESET_SELECTION",selectionStart:e,selectionEnd:t,initialPosition:n}}function Ig(e){return{type:"RECEIVE_BLOCKS",blocks:e}}function Tg(e,t,n=!1){return{type:"UPDATE_BLOCK_ATTRIBUTES",clientIds:(0,Ce.castArray)(e),attributes:t,uniqueByBlock:n}}function Ng(e,t){return{type:"UPDATE_BLOCK",clientId:e,updates:t}}function Ag(e,t=0){return{type:"SELECT_BLOCK",initialPosition:t,clientId:e}}function*Rg(e){const t=yield Re.a.select(Eg,"getPreviousBlockClientId",e);if(t)return yield Ag(t,-1),[t]}function*Lg(e){const t=yield Re.a.select(Eg,"getNextBlockClientId",e);if(t)return yield Ag(t),[t]}function Pg(){return{type:"START_MULTI_SELECT"}}function Og(){return{type:"STOP_MULTI_SELECT"}}function*Dg(e,t){if((yield Re.a.select(Eg,"getBlockRootClientId",e))!==(yield Re.a.select(Eg,"getBlockRootClientId",t)))return;yield{type:"MULTI_SELECT",start:e,end:t};const n=yield Re.a.select(Eg,"getSelectedBlockCount");Gf(L(q("%s block selected.","%s blocks selected.",n),n),"assertive")}function Mg(){return{type:"CLEAR_SELECTED_BLOCK"}}function Bg(e=!0){return{type:"TOGGLE_SELECTION",isSelectionEnabled:e}}function Fg(e,t){var n,r;const o=null!==(n=null==t||null===(r=t.__experimentalPreferredStyleVariations)||void 0===r?void 0:r.value)&&void 0!==n?n:{};return e.map((e=>{var t;const n=e.name;if(!Wl(n,"defaultStylePicker",!0))return e;if(!o[n])return e;const r=null===(t=e.attributes)||void 0===t?void 0:t.className;if(null!=r&&r.includes("is-style-"))return e;const{attributes:i={}}=e,a=o[n];return{...e,attributes:{...i,className:`${r||""} is-style-${a}`.trim()}}}))}function*zg(e,t,n,r=0,o){e=(0,Ce.castArray)(e),t=Fg((0,Ce.castArray)(t),yield Re.a.select(Eg,"getSettings"));const i=yield Re.a.select(Eg,"getBlockRootClientId",(0,Ce.first)(e));for(let e=0;e<t.length;e++){const n=t[e];if(!(yield Re.a.select(Eg,"canInsertBlockType",n.name,i)))return}yield{type:"REPLACE_BLOCKS",clientIds:e,blocks:t,time:Date.now(),indexToSelect:n,initialPosition:r,meta:o},yield*_g()}function Hg(e,t){return zg(e,t)}function Vg(e){return(t,n)=>({clientIds:(0,Ce.castArray)(t),type:e,rootClientId:n})}const Wg=Vg("MOVE_BLOCKS_DOWN"),Zg=Vg("MOVE_BLOCKS_UP");function*jg(e,t="",n="",r){const o=yield Re.a.select(Eg,"getTemplateLock",t);if("all"===o)return;const i={type:"MOVE_BLOCKS_TO_POSITION",fromRootClientId:t,toRootClientId:n,clientIds:e,index:r};t!==n?"insert"!==o&&(yield Re.a.select(Eg,"canInsertBlocks",e,n))&&(yield i):yield i}function*Ug(e,t="",n="",r){yield jg([e],t,n,r)}function $g(e,t,n,r=!0,o){return qg([e],t,n,r,0,o)}function*qg(e,t,n,r=!0,o=0,i){(0,Ce.isObject)(o)&&(i=o,o=0,Vt("meta argument in wp.data.dispatch('core/block-editor')",{since:"10.1",plugin:"Gutenberg",hint:"The meta argument is now the 6th argument of the function"})),e=Fg((0,Ce.castArray)(e),yield Re.a.select(Eg,"getSettings"));const a=[];for(const t of e)(yield Re.a.select(Eg,"canInsertBlockType",t.name,n))&&a.push(t);if(a.length)return{type:"INSERT_BLOCKS",blocks:a,index:t,rootClientId:n,time:Date.now(),updateSelection:r,initialPosition:r?o:null,meta:i}}function Gg(e,t,n={}){const{__unstableWithInserter:r}=n;return{type:"SHOW_INSERTION_POINT",rootClientId:e,index:t,__unstableWithInserter:r}}function Kg(){return{type:"HIDE_INSERTION_POINT"}}function Yg(e){return{type:"SET_TEMPLATE_VALIDITY",isValid:e}}function*Xg(){yield{type:"SYNCHRONIZE_TEMPLATE"};const e=Uu(yield Re.a.select(Eg,"getBlocks"),yield Re.a.select(Eg,"getTemplate"));return yield Cg(e)}function*Jg(e,t){const n=[e,t];yield{type:"MERGE_BLOCKS",blocks:n};const[r,o]=n,i=yield Re.a.select(Eg,"getBlock",r),a=zl(i.name);if(!a.merge)return void(yield Ag(i.clientId));const l=yield Re.a.select(Eg,"getBlock",o),s=zl(l.name),{clientId:c,attributeKey:u,offset:d}=yield Re.a.select(Eg,"getSelectionStart"),p=(c===r?a:s).attributes[u],m=(c===r||c===o)&&void 0!==u&&void 0!==d&&!!p;p||("number"==typeof u?window.console.error("RichText needs an identifier prop that is the block attribute key of the attribute it controls. Its type is expected to be a string, but was "+typeof u):window.console.error("The RichText identifier prop does not match any attributes defined by the block."));const f=Gl(i),h=Gl(l);if(m){const e=c===r?f:h,t=e.attributes[u],{multiline:n,__unstableMultilineWrapperTags:o,__unstablePreserveWhiteSpace:i}=p,a=Rh(mh({html:t,multilineTag:n,multilineWrapperTags:o,preserveWhiteSpace:i}),"",d,d);e.attributes[u]=Hh({value:a,multilineTag:n,preserveWhiteSpace:i})}const g=i.name===l.name?[h]:es(h,i.name);if(!g||!g.length)return;const v=a.merge(f.attributes,g[0].attributes);if(m){const e=(0,Ce.findKey)(v,(e=>"string"==typeof e&&-1!==e.indexOf(""))),t=v[e],{multiline:n,__unstableMultilineWrapperTags:r,__unstablePreserveWhiteSpace:o}=a.attributes[e],l=mh({html:t,multilineTag:n,multilineWrapperTags:r,preserveWhiteSpace:o}),s=l.text.indexOf(""),c=Hh({value:Lh(l,s,s+1),multilineTag:n,preserveWhiteSpace:o});v[e]=c,yield cv(i.clientId,e,s,s)}yield*zg([i.clientId,l.clientId],[{...i,attributes:{...i.attributes,...v}},...g.slice(1)])}function*Qg(e,t=!0){if(!e||!e.length)return;e=(0,Ce.castArray)(e);const n=yield Re.a.select(Eg,"getBlockRootClientId",e[0]);if(yield Re.a.select(Eg,"getTemplateLock",n))return;let r;r=t?yield Rg(e[0]):yield Re.a.select(Eg,"getPreviousBlockClientId",e[0]),yield{type:"REMOVE_BLOCKS",clientIds:e};const o=yield*_g();return[r||o]}function ev(e,t){return Qg([e],t)}function tv(e,t,n=!1,r=0){return{type:"REPLACE_INNER_BLOCKS",rootClientId:e,blocks:t,updateSelection:n,initialPosition:n?r:null,time:Date.now()}}function nv(e){return{type:"TOGGLE_BLOCK_MODE",clientId:e}}function rv(){return{type:"START_TYPING"}}function ov(){return{type:"STOP_TYPING"}}function iv(e=[]){return{type:"START_DRAGGING_BLOCKS",clientIds:e}}function av(){return{type:"STOP_DRAGGING_BLOCKS"}}function lv(){return{type:"ENTER_FORMATTED_TEXT"}}function sv(){return{type:"EXIT_FORMATTED_TEXT"}}function cv(e,t,n,r){return{type:"SELECTION_CHANGE",clientId:e,attributeKey:t,startOffset:n,endOffset:r}}function uv(e,t,n){const r=Fl();if(r)return $g(Ul(r,e),n,t)}function dv(e,t){return{type:"UPDATE_BLOCK_LIST_SETTINGS",clientId:e,settings:t}}function pv(e){return{type:"UPDATE_SETTINGS",settings:e}}function mv(e,t){return{type:"SAVE_REUSABLE_BLOCK_SUCCESS",id:e,updatedId:t}}function fv(){return{type:"MARK_LAST_CHANGE_AS_PERSISTENT"}}function hv(){return{type:"MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"}}function*gv(){yield{type:"MARK_AUTOMATIC_CHANGE"},yield{type:"MARK_AUTOMATIC_CHANGE_FINAL_CONTROL"}}function vv(){return{type:"MARK_AUTOMATIC_CHANGE_FINAL"}}function*bv(e=!0){yield{type:"SET_NAVIGATION_MODE",isNavigationMode:e},Gf(U(e?"You are currently in navigation mode. Navigate blocks using the Tab key and Arrow keys. Use Left and Right Arrow keys to move between nesting levels. To exit navigation mode and edit the selected block, press Enter.":"You are currently in edit mode. To return to the navigation mode, press Escape."))}function*yv(e=null){yield{type:"SET_BLOCK_MOVING_MODE",hasBlockMovingClientId:e},e&&Gf(U("Use the Tab key and Arrow keys to choose new block location. Use Left and Right Arrow keys to move between nesting levels. Once location is selected press Enter or Space to move the block."))}function*wv(e,t=!0){if(!e&&!e.length)return;const n=yield Re.a.select(Eg,"getBlocksByClientId",e),r=yield Re.a.select(Eg,"getBlockRootClientId",e[0]);if((0,Ce.some)(n,(e=>!e)))return;const o=n.map((e=>e.name));if((0,Ce.some)(o,(e=>!Wl(e,"multiple",!0))))return;const i=yield Re.a.select(Eg,"getBlockIndex",(0,Ce.last)((0,Ce.castArray)(e)),r),a=n.map((e=>ql(e)));return yield qg(a,i+1,r,t),a.length>1&&t&&(yield Dg((0,Ce.first)(a).clientId,(0,Ce.last)(a).clientId)),a.map((e=>e.clientId))}function*kv(e){if(!e)return;const t=yield Re.a.select(Eg,"getBlockRootClientId",e);if(yield Re.a.select(Eg,"getTemplateLock",t))return;const n=yield Re.a.select(Eg,"getBlockIndex",e,t);return yield uv({},t,n)}function*Ev(e){if(!e)return;const t=yield Re.a.select(Eg,"getBlockRootClientId",e);if(yield Re.a.select(Eg,"getTemplateLock",t))return;const n=yield Re.a.select(Eg,"getBlockIndex",e,t);return yield uv({},t,n+1)}function _v(e,t){return{type:"TOGGLE_BLOCK_HIGHLIGHT",clientId:e,isHighlighted:t}}function*Cv(e){yield _v(e,!0),yield{type:"SLEEP",duration:150},yield _v(e,!1)}function xv(e,t){return{type:"SET_HAS_CONTROLLED_INNER_BLOCKS",hasControlledInnerBlocks:t,clientId:e}}const Sv={reducer:Xp,selectors:p,actions:h,controls:kg},Iv=(0,ye.Z)(Eg,{...Sv,persist:["preferences"]});function Tv(){const{isSelected:e,clientId:t,name:n}=Mp(),r=(0,er.Z)((r=>{if(e)return;const{getBlockName:o,isFirstMultiSelectedBlock:i,getMultiSelectedBlockClientIds:a}=r(Iv);return!!i(t)&&a().every((e=>o(e)===n))}),[t,e,n]);return e||r}(0,be.R9)(Eg,{...Sv,persist:["preferences"]});var Nv={default:Er("BlockControls"),block:Er("BlockControlsBlock"),inline:Er("BlockFormatControls"),other:Er("BlockControlsOther")};function Av({group:e="default",controls:t,children:n}){if(!Tv())return null;const r=Nv[e].Fill;return(0,_.createElement)(nd,{document:document},(0,_.createElement)(r,null,(r=>{const o=(0,Ce.isEmpty)(r)?null:r;return(0,_.createElement)(rd.Provider,{value:o},"default"===e&&(0,_.createElement)(Pp,{controls:t}),n)})))}function Rv({group:e="default",...t}){const n=(0,_.useContext)(rd),r=Nv[e].Slot,o=dr(r.__unstableName);return Boolean(o.fills&&o.fills.length)?"default"===e?(0,_.createElement)(r,(0,nr.Z)({},t,{bubblesVirtually:!0,fillProps:n})):(0,_.createElement)(Pp,null,(0,_.createElement)(r,(0,nr.Z)({},t,{bubblesVirtually:!0,fillProps:n}))):null}const Lv=Av;Lv.Slot=Rv;const Pv=e=>(0,_.createElement)(Av,(0,nr.Z)({group:"inline"},e));Pv.Slot=e=>(0,_.createElement)(Rv,(0,nr.Z)({group:"inline"},e));var Ov=Lv,Dv=(0,_.forwardRef)((function(e,t){return(0,_.useContext)(rd)?(0,_.createElement)(bp,(0,nr.Z)({ref:t},e.toggleProps),(t=>(0,_.createElement)(Rp,(0,nr.Z)({},e,{popoverProps:{isAlternate:!0,...e.popoverProps},toggleProps:t})))):(0,_.createElement)(Rp,e)})),Mv=(0,_.createElement)(ko,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,_.createElement)(yo,{d:"M4 9v6h14V9H4zm8-4.8H4v1.5h8V4.2zM4 19.8h8v-1.5H4v1.5z"})),Bv=(0,_.createElement)(ko,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,_.createElement)(yo,{d:"M5 15h14V9H5v6zm0 4.8h14v-1.5H5v1.5zM5 4.2v1.5h14V4.2H5z"})),Fv=(0,_.createElement)(ko,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,_.createElement)(yo,{d:"M6 15h14V9H6v6zm6-10.8v1.5h8V4.2h-8zm0 15.6h8v-1.5h-8v1.5z"})),zv=(0,_.createElement)(ko,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,_.createElement)(yo,{d:"M5 9v6h14V9H5zm11-4.8H8v1.5h8V4.2zM8 19.8h8v-1.5H8v1.5z"})),Hv=(0,_.createElement)(ko,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,_.createElement)(yo,{d:"M5 4v11h14V4H5zm3 15.8h8v-1.5H8v1.5z"}));function Vv(e,t=""){return e.split(",").map((e=>`.editor-styles-wrapper ${e} ${t}`)).join(",")}var Wv={name:"flex",label:U("Flex"),edit:()=>null,save:function({selector:e}){return(0,_.createElement)("style",null,`${Vv(e)} {\n display: flex;\n column-gap: 0.5em;\n align-items: center;\n }`)},getOrientation:()=>"horizontal",getAlignments:()=>[]};const Zv="web"===Jp,jv={px:{value:"px",label:Zv?"px":U("Pixels (px)"),default:"",a11yLabel:U("Pixels (px)"),step:1},percent:{value:"%",label:Zv?"%":U("Percentage (%)"),default:"",a11yLabel:U("Percent (%)"),step:.1},em:{value:"em",label:Zv?"em":U("Relative to parent font size (em)"),default:"",a11yLabel:$("ems","Relative to parent font size (em)"),step:.01},rem:{value:"rem",label:Zv?"rem":U("Relative to root font size (rem)"),default:"",a11yLabel:$("rems","Relative to root font size (rem)"),step:.01},vw:{value:"vw",label:Zv?"vw":U("Viewport width (vw)"),default:"",a11yLabel:U("Viewport width (vw)"),step:.1},vh:{value:"vh",label:Zv?"vh":U("Viewport height (vh)"),default:"",a11yLabel:U("Viewport height (vh)"),step:.1},vmin:{value:"vmin",label:Zv?"vmin":U("Viewport smallest dimension (vmin)"),default:"",a11yLabel:U("Viewport smallest dimension (vmin)"),step:.1},vmax:{value:"vmax",label:Zv?"vmax":U("Viewport largest dimension (vmax)"),default:"",a11yLabel:U("Viewport largest dimension (vmax)"),step:.1},ch:{value:"ch",label:Zv?"ch":U("Width of the zero (0) character (ch)"),default:"",a11yLabel:U("Width of the zero (0) character (ch)"),step:.01},ex:{value:"ex",label:Zv?"ex":U("x-height of the font (ex)"),default:"",a11yLabel:U("x-height of the font (ex)"),step:.01},cm:{value:"cm",label:Zv?"cm":U("Centimeters (cm)"),default:"",a11yLabel:U("Centimeters (cm)"),step:.001},mm:{value:"mm",label:Zv?"mm":U("Millimeters (mm)"),default:"",a11yLabel:U("Millimeters (mm)"),step:.1},in:{value:"in",label:Zv?"in":U("Inches (in)"),default:"",a11yLabel:U("Inches (in)"),step:.001},pc:{value:"pc",label:Zv?"pc":U("Picas (pc)"),default:"",a11yLabel:U("Picas (pc)"),step:1},pt:{value:"pt",label:Zv?"pt":U("Points (pt)"),default:"",a11yLabel:U("Points (pt)"),step:1}},Uv=Object.values(jv),$v=[jv.px,jv.percent,jv.em,jv.rem,jv.vw,jv.vh],qv=jv.px;function Gv(e){return!(0,Ce.isEmpty)(e)&&!1!==e}function Kv(e,t=Uv){const n=String(e).trim();let r=parseFloat(n,10);r=isNaN(r)?"":r;const o=n.match(/[\d.\-\+]*\s*(.*)/)[1];let i=void 0!==o?o:"";if(i=i.toLowerCase(),Gv(t)){const e=t.find((e=>e.value===i));i=null==e?void 0:e.value}else i=qv.value;return[r,i]}function Yv(e,t,n,r){const[o,i]=Kv(e,t);let a,l=o;var s;return(isNaN(o)||""===o)&&(l=n),a=i||r,Gv(t)&&!a&&(a=null===(s=t[0])||void 0===s?void 0:s.value),[l,a]}const Xv=({units:e,availableUnits:t,defaultValues:n})=>{const r=function(e=[],t=[]){return t.filter((t=>e.includes(t.value)))}(t||[],e=e||Uv);return n&&r.forEach(((e,t)=>{n[e.value]&&(r[t].default=n[e.value])})),0!==r.length&&r},Jv="CHANGE",Qv="COMMIT",eb="DRAG_END",tb="DRAG_START",nb="DRAG",rb="INVALIDATE",ob="PRESS_DOWN",ib="PRESS_ENTER",ab="PRESS_UP",lb="RESET",sb="UPDATE",cb=e=>e,ub={_event:{},error:null,initialValue:"",isDirty:!1,isDragEnabled:!1,isDragging:!1,isPressEnterToChange:!1,value:""},db=(...e)=>(...t)=>e.reduceRight(((e,n)=>{const r=n(...t);return(0,Ce.isEmpty)(r)?e:{...e,...r}}),{});var pb=n(70917);const mb=new RegExp(/-left/g),fb=new RegExp(/-right/g),hb=new RegExp(/Left/g),gb=new RegExp(/Right/g);function vb(e={},t){return()=>t?G()?(0,pb.iv)(t,""):(0,pb.iv)(e,""):G()?(0,pb.iv)(((e={})=>(0,Ce.mapKeys)(e,((e,t)=>function(e){return"left"===e?"right":"right"===e?"left":mb.test(e)?e.replace(mb,"-right"):fb.test(e)?e.replace(fb,"-left"):hb.test(e)?e.replace(hb,"Right"):gb.test(e)?e.replace(gb,"Left"):e}(t))))(e),""):(0,pb.iv)(e,"")}function bb(e="",t=1){const{r:n,g:r,b:o}=wl()(e).toRgb();return`rgba(${n}, ${r}, ${o}, ${t})`}vb.watch=()=>G();const yb={black:"#000",white:"#fff"},wb={blue:{medium:{focus:"#007cba",focusDark:"#fff"}},gray:{900:"#1e1e1e",700:"#757575",600:"#949494",400:"#ccc",200:"#ddd",100:"#f0f0f0"},darkGray:{primary:"#1e1e1e",heading:"#050505"},mediumGray:{text:"#757575"},lightGray:{ui:"#949494",secondary:"#ccc",tertiary:"#e7e8e9"}},kb={900:"#191e23",800:"#23282d",700:"#32373c",600:"#40464d",500:"#555d66",400:"#606a73",300:"#6c7781",200:"#7e8993",150:"#8d96a0",100:"#8f98a1",placeholder:bb(wb.gray[900],.62)},Eb={900:bb("#000510",.9),800:bb("#00000a",.85),700:bb("#06060b",.8),600:bb("#000913",.75),500:bb("#0a1829",.7),400:bb("#0a1829",.65),300:bb("#0e1c2e",.62),200:bb("#162435",.55),100:bb("#223443",.5),backgroundFill:bb(kb[700],.7)},_b={900:bb("#304455",.45),800:bb("#425863",.4),700:bb("#667886",.35),600:bb("#7b86a2",.3),500:bb("#9197a2",.25),400:bb("#95959c",.2),300:bb("#829493",.15),200:bb("#8b8b96",.1),100:bb("#747474",.05)},Cb={900:"#a2aab2",800:"#b5bcc2",700:"#ccd0d4",600:"#d7dade",500:"#e2e4e7",400:"#e8eaeb",300:"#edeff0",200:"#f3f4f5",100:"#f8f9f9",placeholder:bb(yb.white,.65)},xb={900:bb(yb.white,.5),800:bb(yb.white,.45),700:bb(yb.white,.4),600:bb(yb.white,.35),500:bb(yb.white,.3),400:bb(yb.white,.25),300:bb(yb.white,.2),200:bb(yb.white,.15),100:bb(yb.white,.1),backgroundFill:bb(Cb[300],.8)},Sb={wordpress:{700:"#00669b"},dark:{900:"#0071a1"},medium:{900:"#006589",800:"#00739c",700:"#007fac",600:"#008dbe",500:"#00a0d2",400:"#33b3db",300:"#66c6e4",200:"#bfe7f3",100:"#e5f5fa",highlight:"#b3e7fe",focus:"#007cba"}},Ib={theme:`var( --wp-admin-theme-color, ${Sb.wordpress[700]})`,themeDark10:`var( --wp-admin-theme-color-darker-10, ${Sb.medium.focus})`},Tb={theme:Ib.theme,background:yb.white,backgroundDisabled:Cb[200],border:wb.gray[700],borderHover:wb.gray[700],borderFocus:Ib.themeDark10,borderDisabled:wb.gray[400],borderLight:wb.gray[200],label:kb[500],textDisabled:kb[150],textDark:yb.white,textLight:yb.black},Nb={...yb,darkGray:(0,Ce.merge)({},kb,wb.darkGray),darkOpacity:Eb,darkOpacityLight:_b,mediumGray:wb.mediumGray,gray:wb.gray,lightGray:(0,Ce.merge)({},Cb,wb.lightGray),lightGrayLight:xb,blue:(0,Ce.merge)({},Sb,wb.blue),alert:{yellow:"#f0b849",red:"#d94f4f",green:"#4ab866"},admin:Ib,ui:Tb},Ab=new WeakMap;function Rb(e,t,n=""){return(0,_.useMemo)((()=>{if(n)return n;const r=function(e){const t=Ab.get(e)||0;return Ab.set(e,t+1),t}(e);return t?`${t}-${r}`:r}),[e])}const Lb=["40em","52em","64em"];function Pb(e){var t,n;if(void 0===e)return;if(!e)return"0";const r="number"==typeof e?e:Number(e);return null!==(t=(n=CSS).supports)&&void 0!==t&&t.call(n,"margin",e.toString())||Number.isNaN(r)?e.toString():`calc(4px * ${e})`}const Ob={name:"zjik7",styles:"display:flex"},Db={name:"qgaee5",styles:"display:block;max-height:100%;max-width:100%;min-height:0;min-width:0"},Mb={name:"82a6rk",styles:"flex:1"},Bb={name:"13nosa1",styles:">*{min-height:0;}"},Fb={name:"1pwxzk4",styles:">*{min-width:0;}"};function zb(e){const{align:t="center",className:n,direction:r="row",expanded:o=!0,gap:i=2,justify:a="space-between",wrap:l=!1,...s}=wi(function({isReversed:e,...t}){return void 0!==e?(Vt("Flex isReversed",{alternative:'Flex direction="row-reverse" or "column-reverse"',since:"5.9"}),{...t,direction:e?"row-reverse":"row"}):t}(e),"Flex"),c=function(e,t={}){const n=((e={})=>{const{defaultIndex:t=0}=e;if("number"!=typeof t)throw new TypeError(`Default breakpoint index should be a number. Got: ${t}, ${typeof t}`);if(t<0||t>Lb.length-1)throw new RangeError(`Default breakpoint index out of range. Theme has ${Lb.length} breakpoints, got index ${t}`);const[n,r]=(0,_.useState)(t);return(0,_.useEffect)((()=>{const e=()=>{const e=Lb.filter((e=>"undefined"!=typeof window&&window.matchMedia(`screen and (min-width: ${e})`).matches)).length;n!==e&&r(e)};return e(),"undefined"!=typeof window&&window.addEventListener("resize",e),()=>{"undefined"!=typeof window&&window.removeEventListener("resize",e)}}),[n]),n})(t);if(!Array.isArray(e)&&"function"!=typeof e)return e;const r=e||[];return r[n>=r.length?r.length-1:n]}(Array.isArray(r)?r:[r]),u="string"==typeof c&&!!c.includes("column"),d="string"==typeof c&&c.includes("reverse"),p=bi();return{...s,className:(0,_.useMemo)((()=>{const e={};return e.Base=(0,pb.iv)({alignItems:u?"normal":t,flexDirection:c,flexWrap:l?"wrap":void 0,justifyContent:a,height:u&&o?"100%":void 0,width:!u&&o?"100%":void 0,marginBottom:l?`calc(${Pb(i)} * -1)`:void 0},"",""),e.Items=(0,pb.iv)({"> * + *:not(marquee)":{marginTop:u?Pb(i):void 0,marginRight:!u&&d?Pb(i):void 0,marginLeft:u||d?void 0:Pb(i)}},"",""),e.WrapItems=(0,pb.iv)({"> *:not(marquee)":{marginBottom:Pb(i),marginLeft:!u&&d?Pb(i):void 0,marginRight:u||d?void 0:Pb(i)},"> *:last-child:not(marquee)":{marginLeft:!u&&d?0:void 0,marginRight:u||d?void 0:0}},"",""),p(Ob,e.Base,l?e.WrapItems:e.Items,u?Bb:Fb,n)}),[t,n,c,o,i,u,d,a,l]),isColumn:u}}const Hb=(0,_.createContext)({flexItemDisplay:void 0});var Vb=Ei((function(e,t){const{children:n,isColumn:r,...o}=zb(e);return(0,_.createElement)(Hb.Provider,{value:{flexItemDisplay:r?"block":void 0}},(0,_.createElement)(Ui,(0,nr.Z)({},o,{ref:t}),n))}),"Flex");const Wb=({as:e,name:t,useHook:n,memo:r=!1})=>{function o(t,r){const o=n(t);return(0,_.createElement)(Ui,(0,nr.Z)({as:e||"div"},o,{ref:r}))}return o.displayName=t,Ei(o,t,{memo:r})};function Zb(e){const{className:t,display:n,isBlock:r=!1,...o}=wi(e,"FlexItem"),i={},a=(0,_.useContext)(Hb).flexItemDisplay;return i.Base=(0,pb.iv)({display:n||a},"",""),{...o,className:bi()(Db,i.Base,r&&Mb,t)}}var jb=Wb({as:"div",useHook:Zb,name:"FlexItem"});const Ub={name:"hdknak",styles:"display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap"},$b="…",qb={auto:"auto",head:"head",middle:"middle",tail:"tail",none:"none"},Gb={ellipsis:$b,ellipsizeMode:qb.auto,limit:0,numberOfLines:0};let Kb;const Yb=T()((function(e){var t,n;if("string"!=typeof e)return"";if("string"==typeof(n=e)&&wl()(n).isValid())return e;if(!e.includes("var("))return"";if("undefined"==typeof document)return"";const r=function(){if("undefined"!=typeof document){if(!Kb){const e=document.createElement("div");e.setAttribute("data-g2-color-computation-node",""),document.body.appendChild(e),Kb=e}return Kb}}();if(!r)return"";r.style.background=e;const o=null===(t=window)||void 0===t?void 0:t.getComputedStyle(r).background;return r.style.background="",o||""}));const Xb={controlSurfaceColor:Nb.white,controlTextActiveColor:Nb.ui.theme,controlPaddingX:"12px",controlPaddingXLarge:"calc(12px * 1.3334)",controlPaddingXSmall:"calc(12px / 1.3334)",controlBackgroundColor:Nb.white,controlBorderRadius:"2px",controlBorderColor:Nb.gray[700],controlBoxShadow:"transparent",controlBorderColorHover:Nb.gray[700],controlBoxShadowFocus:`0 0 0 0.5px ${Nb.admin.theme}`,controlDestructiveBorderColor:Nb.alert.red,controlHeight:"36px",controlHeightXSmall:"calc( 36px * 0.6 )",controlHeightSmall:"calc( 36px * 0.8 )",controlHeightLarge:"calc( 36px * 1.2 )",controlHeightXLarge:"calc( 36px * 1.4 )"},Jb={segmentedControlBackgroundColor:Xb.controlBackgroundColor,segmentedControlBorderColor:Nb.ui.border,segmentedControlBackdropBackgroundColor:Xb.controlSurfaceColor,segmentedControlBackdropBorderColor:Nb.ui.border,segmentedControlBackdropBoxShadow:"transparent",segmentedControlButtonColorActive:Xb.controlBackgroundColor};var Qb={...Xb,...Jb,colorDivider:"rgba(0, 0, 0, 0.1)",colorScrollbarThumb:"rgba(0, 0, 0, 0.2)",colorScrollbarThumbHover:"rgba(0, 0, 0, 0.5)",colorScrollbarTrack:"rgba(0, 0, 0, 0.04)",elevationIntensity:1,radiusBlockUi:"2px",borderWidth:"1px",borderWidthFocus:"1.5px",borderWidthTab:"4px",spinnerSize:"18px",fontSize:"13px",fontSizeH1:"calc(2.44 * 13px)",fontSizeH2:"calc(1.95 * 13px)",fontSizeH3:"calc(1.56 * 13px)",fontSizeH4:"calc(1.25 * 13px)",fontSizeH5:"13px",fontSizeH6:"calc(0.8 * 13px)",fontSizeInputMobile:"16px",fontSizeMobile:"15px",fontSizeSmall:"calc(0.92 * 13px)",fontSizeXSmall:"calc(0.75 * 13px)",fontLineHeightBase:"1.2",fontWeight:"normal",fontWeightHeading:"600",gridBase:"4px",cardBorderRadius:"2px",cardPaddingXSmall:`${Pb(2)}`,cardPaddingSmall:`${Pb(4)}`,cardPaddingMedium:`${Pb(4)} ${Pb(6)}`,cardPaddingLarge:`${Pb(6)} ${Pb(8)}`,surfaceBackgroundColor:Nb.white,surfaceBackgroundSubtleColor:"#F3F3F3",surfaceBackgroundTintColor:"#F5F5F5",surfaceBorderColor:"rgba(0, 0, 0, 0.1)",surfaceBorderBoldColor:"rgba(0, 0, 0, 0.15)",surfaceBorderSubtleColor:"rgba(0, 0, 0, 0.05)",surfaceBackgroundTertiaryColor:Nb.white,surfaceColor:Nb.white,transitionDuration:"200ms",transitionDurationFast:"160ms",transitionDurationFaster:"120ms",transitionDurationFastest:"100ms",transitionTimingFunction:"cubic-bezier(0.08, 0.52, 0.52, 1)",transitionTimingFunctionControl:"cubic-bezier(0.12, 0.8, 0.32, 1)"};const ey=(0,pb.iv)("color:",Nb.black,";line-height:",Qb.fontLineHeightBase,";margin:0;",""),ty={name:"4zleql",styles:"display:block"},ny=(0,pb.iv)("color:",Nb.alert.green,";",""),ry=(0,pb.iv)("color:",Nb.alert.red,";",""),oy=(0,pb.iv)("color:",Nb.mediumGray.text,";",""),iy=(0,pb.iv)("mark{background:",Nb.alert.yellow,";border-radius:2px;box-shadow:0 0 0 1px rgba( 0, 0, 0, 0.05 ) inset,0 -1px 0 rgba( 0, 0, 0, 0.1 ) inset;}",""),ay={name:"50zrmy",styles:"text-transform:uppercase"};var ly=n(96928);const sy=T()((e=>{const t={};for(const n in e)t[n.toLowerCase()]=e[n];return t})),cy={body:13,caption:10,footnote:11,largeTitle:28,subheadline:12,title:20};function uy(e=13){if(e in cy)return uy(cy[e]);if("number"!=typeof e){const t=parseFloat(e);if(Number.isNaN(t))return e;e=t}return`calc((${e} / 13) * ${Qb.fontSize})`}[1,2,3,4,5,6].flatMap((e=>[e,e.toString()]));var dy={name:"50zrmy",styles:"text-transform:uppercase"},py=Wb({as:"span",useHook:function(e){const{adjustLineHeightForInnerControls:t,align:n,children:r,className:o,color:i,ellipsizeMode:a,isDestructive:l=!1,display:s,highlightEscape:c=!1,highlightCaseSensitive:u=!1,highlightWords:d,highlightSanitize:p,isBlock:m=!1,letterSpacing:f,lineHeight:h,optimizeReadabilityFor:v,size:b,truncate:y=!1,upperCase:w=!1,variant:k,weight:E=Qb.fontWeight,...C}=wi(e,"Text");let x=r;const S=Array.isArray(d),I="caption"===b;if(S){if("string"!=typeof r)throw new TypeError("`children` of `Text` must only be `string` types when `highlightWords` is defined");x=function({activeClassName:e="",activeIndex:t=-1,activeStyle:n,autoEscape:r,caseSensitive:o=!1,children:i,findChunks:a,highlightClassName:l="",highlightStyle:s={},highlightTag:c="mark",sanitize:u,searchWords:d=[],unhighlightClassName:p="",unhighlightStyle:m}){if(!i)return null;if("string"!=typeof i)return i;const f=i,h=(0,ly.findAll)({autoEscape:r,caseSensitive:o,findChunks:a,sanitize:u,searchWords:d,textToHighlight:f}),g=c;let v,b=-1,y="";return h.map(((r,i)=>{const a=f.substr(r.start,r.end-r.start);if(r.highlight){let r;b++,r="object"==typeof l?o?l[a]:(l=sy(l))[a.toLowerCase()]:l;const c=b===+t;y=`${r} ${c?e:""}`,v=!0===c&&null!==n?Object.assign({},s,n):s;const u={children:a,className:y,key:i,style:v};return"string"!=typeof g&&(u.highlightIndex=b),(0,_.createElement)(g,u)}return(0,_.createElement)("span",{children:a,className:p,key:i,style:m})}))}({autoEscape:c,children:r,caseSensitive:u,searchWords:d,sanitize:p})}const T=bi();let N;!0===y&&(N="auto"),!1===y&&(N="none");const A=function(e){const{className:t,children:n,ellipsis:r=$b,ellipsizeMode:o=qb.auto,limit:i=0,numberOfLines:a=0,...l}=wi(e,"Truncate"),s=bi(),c=function(e="",t){const n={...Gb,...t},{ellipsis:r,ellipsizeMode:o,limit:i}=n;if(o===qb.none)return e;let a,l;switch(o){case qb.head:a=0,l=i;break;case qb.middle:a=Math.floor(i/2),l=Math.floor(i/2);break;default:a=i,l=0}return o!==qb.auto?function(e,t,n,r){if("string"!=typeof e)return"";const o=e.length,i=~~t,a=~~n,l=(0,Ce.isNil)(r)?$b:r;return 0===i&&0===a||i>=o||a>=o||i+a>=o?e:0===a?e.slice(0,i)+l:e.slice(0,i)+l+e.slice(o-a)}(e,a,l,r):e}("string"==typeof n?n:"",{ellipsis:r,ellipsizeMode:o,limit:i,numberOfLines:a}),u=o===qb.auto;return{...l,className:(0,_.useMemo)((()=>{const e={};return e.numberOfLines=(0,pb.iv)("-webkit-box-orient:vertical;-webkit-line-clamp:",a,";display:-webkit-box;overflow:hidden;",""),s(u&&!a&&Ub,u&&!!a&&e.numberOfLines,t)}),[t,a,u]),children:c}}({...C,className:(0,_.useMemo)((()=>{const e={},r=function(e,t){if(t)return t;if(!e)return;let n=`calc(${Qb.controlHeight} + ${Pb(2)})`;switch(e){case"large":n=`calc(${Qb.controlHeightLarge} + ${Pb(2)})`;break;case"small":n=`calc(${Qb.controlHeightSmall} + ${Pb(2)})`;break;case"xSmall":n=`calc(${Qb.controlHeightXSmall} + ${Pb(2)})`}return n}(t,h);if(e.Base=(0,pb.iv)({color:i,display:s,fontSize:uy(b),fontWeight:E,lineHeight:r,letterSpacing:f,textAlign:n},"",""),e.upperCase=dy,e.optimalTextColor=null,v){const t="dark"==("#000000"===function(e){const t=Yb(e);return wl().isReadable(t,"#000000")?"#000000":"#ffffff"}(v)?"dark":"light");e.optimalTextColor=t?(0,pb.iv)({color:Nb.black},"",""):(0,pb.iv)({color:Nb.white},"","")}return T(ey,e.Base,e.optimalTextColor,l&&ry,!!S&&iy,m&&ty,I&&oy,k&&g[k],w&&e.upperCase,o)}),[t,n,o,i,s,m,I,l,S,f,h,v,b,w,k,E]),children:r,ellipsizeMode:a||N});return!y&&Array.isArray(r)&&(x=_.Children.map(r,(e=>(0,Ce.isPlainObject)(e)&&"props"in e&&function(e,t){return!!e&&("string"==typeof t?_i(e).includes(t):!!Array.isArray(t)&&t.some((t=>_i(e).includes(t))))}(e,["Link"])?(0,_.cloneElement)(e,{size:e.props.size||"inherit"}):e))),{...A,children:y?A.children:x}},name:"Text"}),my={name:"1739oy8",styles:"z-index:1"};const fy=({isFocused:e})=>e?my:"";var hy={name:"2o6p8u",styles:"justify-content:space-between"},gy={name:"14qk3ip",styles:"align-items:flex-start;flex-direction:column-reverse"},vy={name:"hbng6e",styles:"align-items:flex-start;flex-direction:column"};const by=({labelPosition:e})=>{switch(e){case"top":return vy;case"bottom":return gy;case"edge":return hy;default:return""}},yy=Zi(Vb,{target:"em5sgkm7"})("position:relative;border-radius:2px;padding-top:0;",fy," ",by,";");var wy={name:"wyxldh",styles:"margin:0 !important"},ky={name:"1d3w5wq",styles:"width:100%"};const Ey=Zi("div",{target:"em5sgkm6"})("align-items:center;box-sizing:border-box;border-radius:inherit;display:flex;flex:1;position:relative;",(({disabled:e})=>{const t=e?Nb.ui.backgroundDisabled:Nb.ui.background;return(0,pb.iv)({backgroundColor:t},"","")})," ",(({hideLabel:e})=>e?wy:null)," ",(({__unstableInputWidth:e,labelPosition:t})=>e?"side"===t?"":"edge"===t?(0,pb.iv)({flex:`0 0 ${e}`},"",""):(0,pb.iv)({width:e},"",""):ky),";"),_y=Zi("input",{target:"em5sgkm5"})("&&&{background-color:transparent;box-sizing:border-box;border:none;box-shadow:none!important;color:",Nb.black,";display:block;margin:0;outline:none;padding-left:8px;padding-right:8px;width:100%;",(({isDragging:e,dragCursor:t})=>{let n,r;return e&&(n=(0,pb.iv)("cursor:",t,";user-select:none;&::-webkit-outer-spin-button,&::-webkit-inner-spin-button{-webkit-appearance:none!important;margin:0!important;}","")),e&&t&&(r=(0,pb.iv)("&:active{cursor:",t,";}","")),(0,pb.iv)(n," ",r,";","")})," ",(({disabled:e})=>e?(0,pb.iv)({color:Nb.ui.textDisabled},"",""):"")," ",(({inputSize:e})=>{const t={default:"13px",small:"11px"},n=t[e]||t.default;return n?(0,pb.iv)("font-size:","16px",";@media ( min-width: 600px ){font-size:",n,";}",""):""})," ",(({inputSize:e})=>{const t={default:{height:30,lineHeight:1,minHeight:30},small:{height:24,lineHeight:1,minHeight:24}},n=t[e]||t.default;return(0,pb.iv)(n,"","")})," &::-webkit-input-placeholder{line-height:normal;}}"),Cy=({labelPosition:e})=>{let t=4;return"edge"!==e&&"side"!==e||(t=0),(0,pb.iv)({paddingTop:0,paddingBottom:t},"","")},xy=Zi(py,{target:"em5sgkm4"})("&&&{box-sizing:border-box;color:currentColor;display:block;margin:0;max-width:100%;z-index:1;",Cy," overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}"),Sy=e=>(0,_.createElement)(xy,(0,nr.Z)({},e,{as:"label"})),Iy=Zi(jb,{target:"em5sgkm3"})({name:"1b6uupn",styles:"max-width:calc( 100% - 10px )"}),Ty=Zi("div",{target:"em5sgkm2"})("&&&{box-sizing:border-box;border-radius:inherit;bottom:0;left:0;margin:0;padding:0;pointer-events:none;position:absolute;right:0;top:0;",(({disabled:e,isFocused:t})=>{let n,r=t?Nb.ui.borderFocus:Nb.ui.border;return t&&(n=`0 0 0 1px ${Nb.ui.borderFocus} inset`),e&&(r=Nb.ui.borderDisabled),(0,pb.iv)({boxShadow:n,borderColor:r,borderStyle:"solid",borderWidth:1},"","")})," ",vb({paddingLeft:2}),";}"),Ny=Zi("span",{target:"em5sgkm1"})({name:"pvvbxf",styles:"box-sizing:border-box;display:block"}),Ay=Zi("span",{target:"em5sgkm0"})({name:"pvvbxf",styles:"box-sizing:border-box;display:block"});var Ry=(0,_.memo)((function({disabled:e=!1,isFocused:t=!1}){return(0,_.createElement)(Ty,{"aria-hidden":"true",className:"components-input-control__backdrop",disabled:e,isFocused:t})}));function Ly({children:e,hideLabelFromVision:t,htmlFor:n,...r}){return e?t?(0,_.createElement)($i,{as:"label",htmlFor:n},e):(0,_.createElement)(Sy,(0,nr.Z)({htmlFor:n},r),e):null}var Py=(0,_.forwardRef)((function e({__unstableInputWidth:t,children:n,className:r,disabled:o=!1,hideLabelFromVision:i=!1,labelPosition:a,id:l,isFocused:s=!1,label:c,prefix:u,size:d="default",suffix:p,...m},f){const h=function(t){const n=Rb(e);return t||`input-base-control-${n}`}(l),g=i||!c;return(0,_.createElement)(yy,(0,nr.Z)({},m,function(e){const t={};switch(e){case"top":t.direction="column",t.gap=0;break;case"bottom":t.direction="column-reverse",t.gap=0;break;case"edge":t.justify="space-between"}return t}(a),{className:r,isFocused:s,labelPosition:a,ref:f}),(0,_.createElement)(Iy,null,(0,_.createElement)(Ly,{className:"components-input-control__label",hideLabelFromVision:i,labelPosition:a,htmlFor:h,size:d},c)),(0,_.createElement)(Ey,{__unstableInputWidth:t,className:"components-input-control__container",disabled:o,hideLabel:g,labelPosition:a},u&&(0,_.createElement)(Ny,{className:"components-input-control__prefix"},u),n,p&&(0,_.createElement)(Ay,{className:"components-input-control__suffix"},p),(0,_.createElement)(Ry,{disabled:o,isFocused:s})))}));function Oy(e,t){return e.map((function(e,n){return e+t[n]}))}function Dy(e,t){return e.map((function(e,n){return e-t[n]}))}function My(e){return Math.hypot.apply(Math,e)}function By(e){return Math.sign?Math.sign(e):Number(e>0)-Number(e<0)||+e}function Fy(e,t,n){return 0===t||Math.abs(t)===1/0?function(e,t){return Math.pow(e,5*t)}(e,n):e*t*n/(t+n*e)}function zy(e,t,n,r){return void 0===r&&(r=.15),0===r?function(e,t,n){return Math.max(t,Math.min(e,n))}(e,t,n):e<t?-Fy(t-e,n-t,r)+t:e>n?+Fy(e-n,n-t,r)+n:e}function Hy(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Vy(){return(Vy=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Wy(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function Zy(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}function jy(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Uy(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function $y(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Uy(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Uy(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function qy(){}function Gy(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return 0===t.length?qy:1===t.length?t[0]:function(){for(var e,n,r=$y(t);!(n=r()).done;){var o=n.value;e=o.apply(this,arguments)||e}return e}}function Ky(e,t){if(void 0===e){if(void 0===t)throw new Error("Must define fallback value if undefined is expected");e=t}return Array.isArray(e)?e:[e,e]}function Yy(e){if("function"==typeof e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return e.apply(void 0,n)}return e}function Xy(e,t){void 0===e&&(e={});for(var n={},r=0,o=Object.entries(t);r<o.length;r++){var i=o[r],a=i[0],l=i[1];switch(typeof l){case"function":n[a]=l.call(n,e[a],a,e);break;case"object":n[a]=Xy(e[a],l);break;case"boolean":l&&(n[a]=e[a])}}return n}function Jy(){return"undefined"!=typeof window&&"ontouchstart"in window}function Qy(e){return"pointerId"in e?null:"touchend"===e.type?e.changedTouches:e.targetTouches}function ew(e){return Array.from(Qy(e)).map((function(e){return e.identifier}))}function tw(e){return{buttons:"buttons"in e?e.buttons:0,shiftKey:e.shiftKey,altKey:e.altKey,metaKey:e.metaKey,ctrlKey:e.ctrlKey}}var nw=function(e){return e};function rw(e,t){void 0===t&&(t=nw);var n=Qy(e),r=n?n[0]:e;return t([r.clientX,r.clientY])}var ow=Vy({},{threshold:function(e){return void 0===e&&(e=0),Ky(e)},rubberband:function(e){switch(void 0===e&&(e=0),e){case!0:return Ky(.15);case!1:return Ky(0);default:return Ky(e)}},enabled:function(e){return void 0===e&&(e=!0),e},triggerAllEvents:function(e){return void 0===e&&(e=!1),e},initial:function(e){return void 0===e&&(e=0),"function"==typeof e?e:Ky(e)},transform:!0},{axis:!0,lockDirection:function(e){return void 0===e&&(e=!1),e},bounds:function(e){if(void 0===e&&(e={}),"function"==typeof e)return function(t){return ow.bounds(e(t))};var t=e,n=t.left,r=void 0===n?-1/0:n,o=t.right,i=void 0===o?1/0:o,a=t.top,l=void 0===a?-1/0:a,s=t.bottom;return[[r,i],[l,void 0===s?1/0:s]]}}),iw="undefined"!=typeof window&&window.document&&window.document.createElement,aw={enabled:function(e){return void 0===e&&(e=!0),e},domTarget:!0,window:function(e){function t(t){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(e){return void 0===e&&(e=iw?window:void 0),e})),eventOptions:function(e){var t=void 0===e?{}:e,n=t.passive,r=void 0===n||n,o=t.capture;return{passive:r,capture:void 0!==o&&o}},transform:!0},lw=Vy({},ow,{useTouch:function(e){void 0===e&&(e=!1);var t=Jy(),n="undefined"!=typeof window&&"onpointerdown"in window;return!(!e||!t)||!(!t||n)},experimental_preventWindowScrollY:function(e){return void 0===e&&(e=!1),e},threshold:function(e,t,n){var r=n.filterTaps,o=void 0!==r&&r,i=n.lockDirection,a=void 0!==i&&i,l=n.axis,s=Ky(e,o?3:a||(void 0===l?void 0:l)?1:0);return this.filterTaps=o,s},swipeVelocity:function(e){return void 0===e&&(e=.5),Ky(e)},swipeDistance:function(e){return void 0===e&&(e=50),Ky(e)},swipeDuration:function(e){return void 0===e&&(e=250),e},delay:function(e){switch(void 0===e&&(e=0),e){case!0:return 180;case!1:return 0;default:return e}}});function sw(e){return void 0===e&&(e={}),Xy(e,aw)}function cw(e){var t=e.domTarget,n=e.eventOptions,r=e.window,o=e.enabled,i=Zy(e,["domTarget","eventOptions","window","enabled"]),a=sw({domTarget:t,eventOptions:n,window:r,enabled:o});return a.hover=Vy({enabled:!0},i),a}function uw(e){var t,n=e.domTarget,r=e.eventOptions,o=e.window,i=e.enabled,a=Zy(e,["domTarget","eventOptions","window","enabled"]),l=sw({domTarget:n,eventOptions:r,window:o,enabled:i});return l.drag=(void 0===(t=a)&&(t={}),Xy(t,lw)),l}function dw(e){return Vy({_active:!1,_blocked:!1,_intentional:[!1,!1],_movement:[0,0],_initial:[0,0],_bounds:[[-1/0,1/0],[-1/0,1/0]],_threshold:[0,0],_lastEventType:void 0,_dragStarted:!1,_dragPreventScroll:!1,_dragIsTap:!0,_dragDelayed:!1,event:void 0,intentional:!1,values:[0,0],velocities:[0,0],delta:[0,0],movement:[0,0],offset:[0,0],lastOffset:[0,0],direction:[0,0],initial:[0,0],previous:[0,0],first:!1,last:!1,active:!1,timeStamp:0,startTime:0,elapsedTime:0,cancel:qy,canceled:!1,memo:void 0,args:void 0},e)}function pw(){return{shared:{hovering:!1,scrolling:!1,wheeling:!1,dragging:!1,moving:!1,pinching:!1,touches:0,buttons:0,down:!1,shiftKey:!1,altKey:!1,metaKey:!1,ctrlKey:!1,locked:!1},drag:dw({_pointerId:void 0,axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0,tap:!1,swipe:[0,0]}),pinch:dw({_pointerIds:[],da:[0,0],vdva:[0,0],origin:void 0,turns:0}),wheel:dw({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0}),move:dw({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0}),scroll:dw({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0})}}var mw=new Map,fw=function(e){return e};function hw(e,t){return Math.abs(e)>=t&&By(e)*t}function gw(e,t,n){var r=t[0],o=t[1],i=n[0],a=n[1],l=e[0],s=l[0],c=l[1],u=e[1],d=u[0],p=u[1];return[zy(r,s,c,i),zy(o,d,p,a)]}function vw(e,t,n){var r=e.state,o=t.timeStamp,i=t.type,a=r.values;return{_lastEventType:i,event:t,timeStamp:o,elapsedTime:n?0:o-r.startTime,previous:a}}function bw(e,t,n,r){var o=e.state,i=e.config,a=e.stateKey,l=e.args,s=e.transform,c=o.offset,u=n.timeStamp,d=i.initial,p=i.bounds,m=Dy(s(i.threshold),s([0,0])).map(Math.abs),f=Vy({},pw()[a],{_active:!0,args:l,values:t,initial:null!=r?r:t,_threshold:m,offset:c,lastOffset:c,startTime:u});return Vy({},f,{_initial:Yy(d,f),_bounds:Yy(p,f)})}var yw=function(e){var t=this;this.classes=e,this.pointerIds=new Set,this.touchIds=new Set,this.supportsTouchEvents=Jy(),this.supportsGestureEvents=function(){try{return"constructor"in GestureEvent}catch(e){return!1}}(),this.bind=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];for(var o,i={},a=$y(t.classes);!(o=a()).done;){var l=o.value;new l(t,n).addBindings(i)}var s=function(e){Tw(i,e,(function(r){return t.nativeRefs[e](Vy({},t.state.shared,{event:r,args:n}))}))};for(var c in t.nativeRefs)s(c);return t.config.domTarget?Cw(t,i):xw(t,i)},this.effect=function(){return t.config.domTarget&&t.bind(),t.clean},this.clean=function(){var e=Iw(t.config),n=t.config.eventOptions;e&&Aw(e,Sw(t.domListeners),n),Object.values(t.timeouts).forEach(clearTimeout),function(e){var t=e.config,n=t.window,r=t.eventOptions,o=e.windowListeners;if(n){for(var i in o)Aw(n,o[i],r);e.windowListeners={}}}(t)},this.classes=e,this.state=pw(),this.timeouts={},this.domListeners=[],this.windowListeners={}};function ww(e,t){"pointerId"in t?e.pointerIds.add(t.pointerId):e.touchIds=new Set(ew(t))}function kw(e,t){"pointerId"in t?e.pointerIds.delete(t.pointerId):ew(t).forEach((function(t){return e.touchIds.delete(t)}))}function Ew(e,t,n){var r=e.config,o=e.windowListeners;void 0===n&&(n=r.eventOptions),r.window&&(Aw(r.window,o[t],n),delete o[t])}function _w(e,t,n,r){var o=e.config,i=e.windowListeners;void 0===n&&(n=[]),void 0===r&&(r=o.eventOptions),o.window&&(Aw(o.window,i[t],r),Nw(o.window,i[t]=n,r))}function Cw(e,t){var n=e.config,r=e.domListeners,o=Iw(n);if(!o)throw new Error("domTarget must be defined");var i=n.eventOptions;Aw(o,Sw(r),i);for(var a=0,l=Object.entries(t);a<l.length;a++){var s=l[a],c=s[0],u=s[1],d=c.slice(2).toLowerCase();r.push([d,Gy.apply(void 0,u)])}Nw(o,r,i)}function xw(e,t){for(var n={},r=e.config.eventOptions.capture?"Capture":"",o=0,i=Object.entries(t);o<i.length;o++){var a=i[o],l=a[0],s=a[1],c=Array.isArray(s)?s:[s];n[l+r]=Gy.apply(void 0,c)}return n}function Sw(e){return void 0===e&&(e=[]),e.splice(0,e.length)}function Iw(e){var t=e.domTarget;return t&&"current"in t?t.current:t}function Tw(e,t,n){e[t]||(e[t]=[]),e[t].push(n)}function Nw(e,t,n){void 0===t&&(t=[]),void 0===n&&(n={});for(var r,o=$y(t);!(r=o()).done;){var i=r.value,a=i[0],l=i[1];e.addEventListener(a,l,n)}}function Aw(e,t,n){void 0===t&&(t=[]),void 0===n&&(n={});for(var r,o=$y(t);!(r=o()).done;){var i=r.value,a=i[0],l=i[1];e.removeEventListener(a,l,n)}}function Rw(e,t,n){void 0===n&&(n={});var r=function(e){var t=new Set;return e.drag&&t.add(mw.get("drag")),e.wheel&&t.add(mw.get("wheel")),e.scroll&&t.add(mw.get("scroll")),e.move&&t.add(mw.get("move")),e.pinch&&t.add(mw.get("pinch")),e.hover&&t.add(mw.get("hover")),t}(e),o=C().useMemo((function(){return new yw(r)}),[]);return o.config=t,o.handlers=e,o.nativeRefs=n,C().useEffect(o.effect,[]),o.config.domTarget?Lw:o.bind}function Lw(){}var Pw=function(e){function t(){return e.apply(this,arguments)||this}Wy(t,e);var n=t.prototype;return n.getInternalMovement=function(e,t){return Dy(e,t.initial)},n.checkIntentionality=function(e,t){if(!1===e[0]&&!1===e[1])return{_intentional:e,axis:this.state.axis};var n=t.map(Math.abs),r=n[0],o=n[1],i=this.state.axis||(r>o?"x":r<o?"y":void 0);return this.config.axis||this.config.lockDirection?i?this.config.axis&&i!==this.config.axis?{_intentional:e,_blocked:!0,axis:i}:(e["x"===i?1:0]=!1,{_intentional:e,_blocked:!1,axis:i}):{_intentional:[!1,!1],_blocked:!1,axis:i}:{_intentional:e,_blocked:!1,axis:i}},n.getKinematics=function(e,t){var n=this.getMovement(e);if(!n._blocked){var r=t.timeStamp-this.state.timeStamp;Object.assign(n,function(e,t,n){var r=My(t),o=0===r?0:1/r,i=0===n?0:1/n,a=i*r,l=t.map((function(e){return i*e})),s=t.map((function(e){return o*e}));return{velocities:l,velocity:a,distance:My(e),direction:s}}(n.movement,n.delta,r))}return n},n.mapStateValues=function(e){return{xy:e.values,vxvy:e.velocities}},t}(function(){function e(e,t){var n=this;void 0===t&&(t=[]),this.controller=e,this.args=t,this.debounced=!0,this.setTimeout=function(e,t){var r;void 0===t&&(t=140),clearTimeout(n.controller.timeouts[n.stateKey]);for(var o=arguments.length,i=new Array(o>2?o-2:0),a=2;a<o;a++)i[a-2]=arguments[a];n.controller.timeouts[n.stateKey]=(r=window).setTimeout.apply(r,[e,t].concat(i))},this.clearTimeout=function(){clearTimeout(n.controller.timeouts[n.stateKey])},this.fireGestureHandler=function(e){if(void 0===e&&(e=!1),n.state._blocked)return n.debounced||(n.state._active=!1,n.clean()),null;if(!e&&!n.state.intentional&&!n.config.triggerAllEvents)return null;if(n.state.intentional){var t=n.state.active,r=n.state._active;n.state.active=r,n.state.first=r&&!t,n.state.last=t&&!r,n.controller.state.shared[n.ingKey]=r}var o=n.controller.pointerIds.size||n.controller.touchIds.size,i=n.controller.state.shared.buttons>0||o>0,a=Vy({},n.controller.state.shared,n.state,n.mapStateValues(n.state),{locked:!!document.pointerLockElement,touches:o,down:i}),l=n.handler(a);return n.state.memo=void 0!==l?l:n.state.memo,a},this.controller=e,this.args=t}var t,n,r=e.prototype;return r.updateSharedState=function(e){Object.assign(this.controller.state.shared,e)},r.updateGestureState=function(e){Object.assign(this.state,e)},r.checkIntentionality=function(e,t){return{_intentional:e,_blocked:!1}},r.getMovement=function(e){var t=this.config.rubberband,n=this.state,r=n._bounds,o=n._initial,i=n._active,a=n._intentional,l=n.lastOffset,s=n.movement,c=n._threshold,u=this.getInternalMovement(e,this.state),d=!1===a[0]?hw(u[0],c[0]):a[0],p=!1===a[1]?hw(u[1],c[1]):a[1],m=this.checkIntentionality([d,p],u);if(m._blocked)return Vy({},m,{_movement:u,delta:[0,0]});var f=m._intentional,h=u,g=[!1!==f[0]?u[0]-f[0]:0,!1!==f[1]?u[1]-f[1]:0],v=Oy(g,l),b=i?t:[0,0];return g=gw(r,Oy(g,o),b),Vy({},m,{intentional:!1!==f[0]||!1!==f[1],_initial:o,_movement:h,movement:g,values:e,offset:gw(r,v,b),delta:Dy(g,s)})},r.clean=function(){this.clearTimeout()},t=e,(n=[{key:"config",get:function(){return this.controller.config[this.stateKey]}},{key:"enabled",get:function(){return this.controller.config.enabled&&this.config.enabled}},{key:"state",get:function(){return this.controller.state[this.stateKey]}},{key:"handler",get:function(){return this.controller.handlers[this.stateKey]}},{key:"transform",get:function(){return this.config.transform||this.controller.config.transform||fw}}])&&Hy(t.prototype,n),e}());function Ow(e){"persist"in e&&"function"==typeof e.persist&&e.persist()}var Dw=function(e){function t(){var t;return(t=e.apply(this,arguments)||this).ingKey="dragging",t.stateKey="drag",t.setPointerCapture=function(e){if(!t.config.useTouch&&!document.pointerLockElement){var n=e.target,r=e.pointerId;n&&"setPointerCapture"in n&&n.setPointerCapture(r),t.updateGestureState({_dragTarget:n,_dragPointerId:r})}},t.releasePointerCapture=function(){if(!t.config.useTouch&&!document.pointerLockElement){var e=t.state,n=e._dragTarget,r=e._dragPointerId;if(r&&n&&"releasePointerCapture"in n&&(!("hasPointerCapture"in n)||n.hasPointerCapture(r)))try{n.releasePointerCapture(r)}catch(e){}}},t.preventScroll=function(e){t.state._dragPreventScroll&&e.cancelable&&e.preventDefault()},t.getEventId=function(e){return t.config.useTouch?e.changedTouches[0].identifier:e.pointerId},t.isValidEvent=function(e){return t.state._pointerId===t.getEventId(e)},t.shouldPreventWindowScrollY=t.config.experimental_preventWindowScrollY&&t.controller.supportsTouchEvents,t.setUpWindowScrollDetection=function(e){Ow(e),_w(t.controller,t.stateKey,[["touchmove",t.preventScroll],["touchend",t.clean.bind(jy(t))],["touchcancel",t.clean.bind(jy(t))]],{passive:!1}),t.setTimeout(t.startDrag.bind(jy(t)),250,e)},t.setUpDelayedDragTrigger=function(e){t.state._dragDelayed=!0,Ow(e),t.setTimeout(t.startDrag.bind(jy(t)),t.config.delay,e)},t.setStartState=function(e){var n=rw(e,t.transform);t.updateSharedState(tw(e)),t.updateGestureState(Vy({},bw(jy(t),n,e),vw(jy(t),e,!0),{_pointerId:t.getEventId(e)})),t.updateGestureState(t.getMovement(n))},t.onDragStart=function(e){ww(t.controller,e),t.enabled&&!t.state._active&&(t.setStartState(e),t.setPointerCapture(e),t.shouldPreventWindowScrollY?t.setUpWindowScrollDetection(e):t.config.delay>0?t.setUpDelayedDragTrigger(e):t.startDrag(e,!0))},t.onDragChange=function(e){if(!t.state.canceled&&t.state._active&&t.isValidEvent(e)&&(t.state._lastEventType!==e.type||e.timeStamp!==t.state.timeStamp)){var n;if(document.pointerLockElement){var r=e.movementX,o=e.movementY;n=Oy(t.transform([r,o]),t.state.values)}else n=rw(e,t.transform);var i=t.getKinematics(n,e);if(!t.state._dragStarted){if(t.state._dragDelayed)return void t.startDrag(e);if(!t.shouldPreventWindowScrollY)return;if(t.state._dragPreventScroll||!i.axis)return;if("x"!==i.axis)return void(t.state._active=!1);t.startDrag(e)}var a=tw(e);t.updateSharedState(a);var l=vw(jy(t),e),s=My(i._movement),c=t.state._dragIsTap;c&&s>=3&&(c=!1),t.updateGestureState(Vy({},l,i,{_dragIsTap:c})),t.fireGestureHandler()}},t.onDragEnd=function(e){if(kw(t.controller,e),t.isValidEvent(e)&&(t.clean(),t.state._active)){t.state._active=!1;var n=t.state._dragIsTap,r=t.state.velocities,o=r[0],i=r[1],a=t.state.movement,l=a[0],s=a[1],c=t.state._intentional,u=c[0],d=c[1],p=t.config.swipeVelocity,m=p[0],f=p[1],h=t.config.swipeDistance,g=h[0],v=h[1],b=t.config.swipeDuration,y=Vy({},vw(jy(t),e),t.getMovement(t.state.values)),w=[0,0];y.elapsedTime<b&&(!1!==u&&Math.abs(o)>m&&Math.abs(l)>g&&(w[0]=By(o)),!1!==d&&Math.abs(i)>f&&Math.abs(s)>v&&(w[1]=By(i))),t.updateSharedState({buttons:0}),t.updateGestureState(Vy({},y,{tap:n,swipe:w})),t.fireGestureHandler(t.config.filterTaps&&!0===n)}},t.clean=function(){e.prototype.clean.call(jy(t)),t.state._dragStarted=!1,t.releasePointerCapture(),Ew(t.controller,t.stateKey)},t.onCancel=function(){t.state.canceled||(t.updateGestureState({canceled:!0,_active:!1}),t.updateSharedState({buttons:0}),setTimeout((function(){return t.fireGestureHandler()}),0))},t.onClick=function(e){t.state._dragIsTap||e.stopPropagation()},t}Wy(t,e);var n=t.prototype;return n.startDrag=function(e,t){void 0===t&&(t=!1),this.state._active&&!this.state._dragStarted&&(t||this.setStartState(e),this.updateGestureState({_dragStarted:!0,_dragPreventScroll:!0,cancel:this.onCancel}),this.clearTimeout(),this.fireGestureHandler())},n.addBindings=function(e){this.config.useTouch?(Tw(e,"onTouchStart",this.onDragStart),Tw(e,"onTouchMove",this.onDragChange),Tw(e,"onTouchEnd",this.onDragEnd),Tw(e,"onTouchCancel",this.onDragEnd)):(Tw(e,"onPointerDown",this.onDragStart),Tw(e,"onPointerMove",this.onDragChange),Tw(e,"onPointerUp",this.onDragEnd),Tw(e,"onPointerCancel",this.onDragEnd)),this.config.filterTaps&&Tw(e,this.controller.config.eventOptions.capture?"onClick":"onClickCapture",this.onClick)},t}(Pw);function Mw(e,t){var n,r,o=[],i=!1;return function(){for(var a=arguments.length,l=new Array(a),s=0;s<a;s++)l[s]=arguments[s];return i&&n===this&&t(l,o)||(r=e.apply(this,l),i=!0,n=this,o=l),r}}function Bw(e,t){if(e===t)return!0;if(e&&t&&"object"==typeof e&&"object"==typeof t){if(e.constructor!==t.constructor)return!1;var n,r,o,i;if(Array.isArray(e)){if((n=e.length)!==t.length)return!1;for(r=n;0!=r--;)if(!Bw(e[r],t[r]))return!1;return!0}if("function"==typeof Map&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(i=e.entries();!(r=i.next()).done;)if(!t.has(r.value[0]))return!1;for(i=e.entries();!(r=i.next()).done;)if(!Bw(r.value[1],t.get(r.value[0])))return!1;return!0}if("function"==typeof Set&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(i=e.entries();!(r=i.next()).done;)if(!t.has(r.value[0]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if((n=(o=Object.keys(e)).length)!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!Object.prototype.hasOwnProperty.call(t,o[r]))return!1;if("undefined"!=typeof Element&&e instanceof Element)return!1;for(r=n;0!=r--;)if(!("_owner"===o[r]&&e.$$typeof||Bw(e[o[r]],t[o[r]])))return!1;return!0}return e!=e&&t!=t}function Fw(e,t){try{return Bw(e,t)}catch(e){if((e.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw e}}var zw=function(e){function t(){var t;return(t=e.apply(this,arguments)||this).ingKey="moving",t.stateKey="move",t.debounced=!0,t.onMove=function(e){t.enabled&&(t.setTimeout(t.onMoveEnd),t.state._active?t.onMoveChange(e):t.onMoveStart(e))},t.onMoveStart=function(e){t.updateSharedState(tw(e));var n=rw(e,t.transform);t.updateGestureState(Vy({},bw(jy(t),n,e),vw(jy(t),e,!0))),t.updateGestureState(t.getMovement(n)),t.fireGestureHandler()},t.onMoveChange=function(e){t.updateSharedState(tw(e));var n=rw(e,t.transform);t.updateGestureState(Vy({},vw(jy(t),e),t.getKinematics(n,e))),t.fireGestureHandler()},t.onMoveEnd=function(){if(t.clean(),t.state._active){var e=t.state.values;t.updateGestureState(t.getMovement(e)),t.updateGestureState({velocities:[0,0],velocity:0,_active:!1}),t.fireGestureHandler()}},t.hoverTransform=function(){return t.controller.config.hover.transform||t.controller.config.transform},t.onPointerEnter=function(e){if(t.controller.state.shared.hovering=!0,t.controller.config.enabled){if(t.controller.config.hover.enabled){var n=rw(e,t.hoverTransform()),r=Vy({},t.controller.state.shared,t.state,vw(jy(t),e,!0),{args:t.args,values:n,active:!0,hovering:!0});t.controller.handlers.hover(Vy({},r,t.mapStateValues(r)))}"move"in t.controller.handlers&&t.onMoveStart(e)}},t.onPointerLeave=function(e){if(t.controller.state.shared.hovering=!1,"move"in t.controller.handlers&&t.onMoveEnd(),t.controller.config.hover.enabled){var n=rw(e,t.hoverTransform()),r=Vy({},t.controller.state.shared,t.state,vw(jy(t),e),{args:t.args,values:n,active:!1});t.controller.handlers.hover(Vy({},r,t.mapStateValues(r)))}},t}return Wy(t,e),t.prototype.addBindings=function(e){"move"in this.controller.handlers&&Tw(e,"onPointerMove",this.onMove),"hover"in this.controller.handlers&&(Tw(e,"onPointerEnter",this.onPointerEnter),Tw(e,"onPointerLeave",this.onPointerLeave))},t}(Pw);function Hw(e){return null!=e}function Vw(e){const t=""===e;return!Hw(e)||t}var Ww=function(e,t){const n=(0,_.useRef)(!1);(0,_.useEffect)((()=>{if(n.current)return e();n.current=!0}),t)},Zw=(0,_.forwardRef)((function({disabled:e=!1,dragDirection:t="n",dragThreshold:n=10,id:r,isDragEnabled:o=!1,isFocused:i,isPressEnterToChange:a=!1,onBlur:l=Ce.noop,onChange:s=Ce.noop,onDrag:c=Ce.noop,onDragEnd:u=Ce.noop,onDragStart:d=Ce.noop,onFocus:p=Ce.noop,onKeyDown:m=Ce.noop,onValidate:f=Ce.noop,size:h="default",setIsFocused:g,stateReducer:v=(e=>e),value:b,type:y,...w},k){const{state:E,change:C,commit:x,drag:S,dragEnd:I,dragStart:T,invalidate:N,pressDown:A,pressEnter:R,pressUp:L,reset:P,update:O}=function(e=cb,t=ub){const[n,r]=(0,_.useReducer)((o=e,(e,t)=>{const n={...e};switch(t.type){case ab:case ob:n.isDirty=!1;break;case tb:n.isDragging=!0;break;case eb:n.isDragging=!1;break;case Jv:n.error=null,n.value=t.payload.value,e.isPressEnterToChange&&(n.isDirty=!0);break;case Qv:n.value=t.payload.value,n.isDirty=!1;break;case lb:n.error=null,n.isDirty=!1,n.value=t.payload.value||e.initialValue;break;case sb:n.value=t.payload.value,n.isDirty=!1;break;case rb:n.error=t.payload.error}return t.payload.event&&(n._event=t.payload.event),o(n,t)}),function(e=ub){const{value:t}=e;return{...ub,...e,initialValue:t}}(t));var o;const i=e=>(t,n)=>{n&&n.persist&&n.persist(),r({type:e,payload:{value:t,event:n}})},a=e=>t=>{t&&t.persist&&t.persist(),r({type:e,payload:{event:t}})},l=e=>t=>{r({type:e,payload:t})},s=i(Jv),c=i(lb),u=i(Qv),d=i(sb),p=l(tb),m=l(nb),f=l(eb),h=a(ab),g=a(ob),v=a(ib);return{change:s,commit:u,dispatch:r,drag:m,dragEnd:f,dragStart:p,invalidate:(e,t)=>r({type:rb,payload:{error:e,event:t}}),pressDown:g,pressEnter:v,pressUp:h,reset:c,state:n,update:d}}(v,{isDragEnabled:o,value:b,isPressEnterToChange:a}),{_event:D,value:M,isDragging:B,isDirty:F}=E,z=(0,_.useRef)(!1),H=function(e,t){const n=function(e){let t="ns-resize";switch(e){case"n":case"s":t="ns-resize";break;case"e":case"w":t="ew-resize"}return t}(t);return(0,_.useEffect)((()=>{document.documentElement.style.cursor=e?n:null}),[e]),n}(B,t);Ww((()=>{b!==M&&(i||z.current?F||(s(M,{event:D}),z.current=!1):O(b,D))}),[M,F,i,b]);const V=e=>{const t=e.currentTarget.value;try{f(t),x(t,e)}catch(t){N(t,e)}},W=function(e,t){void 0===t&&(t={}),mw.set("drag",Dw);var n=(0,_.useRef)();return n.current||(n.current=Mw(uw,Fw)),Rw({drag:e=>{const{distance:t,dragging:n,event:r}=e;if(r.persist(),t){if(r.stopPropagation(),!n)return u(e),void I(e);c(e),S(e),B||(d(e),T(e))}}},n.current(t))}(0,{threshold:n,enabled:o}),Z=o?W():{};let j;return"number"===y&&(j=e=>{var t;null===(t=w.onMouseDown)||void 0===t||t.call(w,e),e.currentTarget!==e.currentTarget.ownerDocument.activeElement&&e.currentTarget.focus()}),(0,_.createElement)(_y,(0,nr.Z)({},w,Z,{className:"components-input-control__input",disabled:e,dragCursor:H,isDragging:B,id:r,onBlur:e=>{l(e),null==g||g(!1),a&&F&&(z.current=!0,Vw(M)?P(b,e):V(e))},onChange:e=>{const t=e.target.value;C(t,e)},onFocus:e=>{p(e),null==g||g(!0)},onKeyDown:e=>{const{keyCode:t}=e;switch(m(e),t){case Hr:L(e);break;case Wr:A(e);break;case Br:R(e),a&&(e.preventDefault(),V(e))}},onMouseDown:j,ref:k,inputSize:h,value:M,type:y}))}));const jw=(0,_.forwardRef)((function e({__unstableStateReducer:t=(e=>e),__unstableInputWidth:n,className:r,disabled:o=!1,hideLabelFromVision:i=!1,id:a,isPressEnterToChange:l=!1,label:s,labelPosition:c="top",onChange:u=Ce.noop,onValidate:d=Ce.noop,onKeyDown:p=Ce.noop,prefix:m,size:f="default",suffix:h,value:g,...v},b){const[y,w]=(0,_.useState)(!1),k=function(t){const n=Rb(e);return t||`inspector-input-control-${n}`}(a),E=Cr()("components-input-control",r);return(0,_.createElement)(Py,{__unstableInputWidth:n,className:E,disabled:o,gap:3,hideLabelFromVision:i,id:k,isFocused:y,justify:"left",label:s,labelPosition:c,prefix:m,size:f,suffix:h},(0,_.createElement)(Zw,(0,nr.Z)({},v,{className:"components-input-control__input",disabled:o,id:k,isFocused:y,isPressEnterToChange:l,onChange:u,onKeyDown:p,onValidate:d,ref:b,setIsFocused:w,size:f,stateReducer:t,value:g})))}));var Uw={name:"euqsgg",styles:"input[type='number']::-webkit-outer-spin-button,input[type='number']::-webkit-inner-spin-button{-webkit-appearance:none!important;margin:0!important;}input[type='number']{-moz-appearance:textfield;}"};const $w=({hideHTMLArrows:e})=>e?Uw:"",qw=Zi(jw,{target:"ep48uk90"})($w,";");function Gw(e){const t=Number(e);return isNaN(t)?0:t}function Kw(...e){return e.reduce(((e,t)=>e+Gw(t)),0)}function Yw(e=0,t=1/0,n=1/0,r=1){const o=Gw(e),i=Gw(r),a=function(e){const t=(e+"").split(".");return void 0!==t[1]?t[1].length:0}(r),l=Math.round(o/i)*i,s=(0,Ce.clamp)(l,t,n);return a?Gw(s.toFixed(a)):s}var Xw=function({isShiftStepEnabled:e=!0,shiftStep:t=10,step:n=1}){const[r,o]=(0,_.useState)(!1);return(0,_.useEffect)((()=>{const e=e=>{o(e.shiftKey)};return window.addEventListener("keydown",e),window.addEventListener("keyup",e),()=>{window.removeEventListener("keydown",e),window.removeEventListener("keyup",e)}}),[]),e&&r?t*n:n},Jw=(0,_.forwardRef)((function({__unstableStateReducer:e=(e=>e),className:t,dragDirection:n="n",hideHTMLArrows:r=!1,isDragEnabled:o=!0,isShiftStepEnabled:i=!0,label:a,max:l=1/0,min:s=-1/0,required:c=!1,shiftStep:u=10,step:d=1,type:p="number",value:m,...f},h){const g=Yw(0,s,l,d),v=Xw({step:d,shiftStep:u,isShiftStepEnabled:i}),b="number"===p?"off":null,y=Cr()("components-number-control",t);return(0,_.createElement)(qw,(0,nr.Z)({autoComplete:b,inputMode:"numeric"},f,{className:y,dragDirection:n,hideHTMLArrows:r,isDragEnabled:o,label:a,max:l,min:s,ref:h,required:c,step:v,type:p,value:m,__unstableStateReducer:db(((e,t)=>{const{type:r,payload:a}=t,p=null==a?void 0:a.event,m=e.value;if(r===ab||r===ob){const t=p.shiftKey&&i?parseFloat(u)*parseFloat(d):parseFloat(d);let n=Vw(m)?g:m;null!=p&&p.preventDefault&&p.preventDefault(),r===ab&&(n=Kw(n,t)),r===ob&&(n=function(...e){return e.reduce(((e,t,n)=>{const r=Gw(t);return 0===n?r:e-r}),0)}(n,t)),n=Yw(n,s,l,t),e.value=n}if(r===nb&&o){const{delta:t,shiftKey:r}=a,[o,i]=t,c=r?parseFloat(u)*parseFloat(d):parseFloat(d);let p,f;switch(n){case"n":f=i,p=-1;break;case"e":f=o,p=G()?-1:1;break;case"s":f=i,p=1;break;case"w":f=o,p=G()?1:-1}const h=f*c*p;let g;0!==h&&(g=Yw(Kw(m,h),s,l,c),e.value=g)}if(r===ib||r===Qv){const t=!1===c&&""===m;e.value=t?m:Yw(m,s,l,d)}return e}),e)}))}));const Qw=Zi("div",{target:"e1agakv03"})({name:"100d0a9",styles:"box-sizing:border-box;position:relative"}),ek=({disableUnits:e})=>{const t=e?3:24;return(0,pb.iv)(vb({paddingRight:t})(),";","")};var tk={name:"1y65o8",styles:"&::-webkit-outer-spin-button,&::-webkit-inner-spin-button{-webkit-appearance:none;margin:0;}"};const nk=({disableUnits:e})=>e?"":tk,rk=Zi(Jw,{target:"e1agakv02"})("&&&{input{appearance:none;-moz-appearance:textfield;display:block;width:100%;",nk,";",ek,";}}"),ok=e=>(0,pb.iv)("appearance:none;background:transparent;border-radius:2px;border:none;box-sizing:border-box;color:",Nb.darkGray[500],";display:block;font-size:8px;line-height:1;letter-spacing:-0.5px;outline:none;padding:2px 1px;position:absolute;text-align-last:center;text-transform:uppercase;width:20px;",vb({borderTopLeftRadius:0,borderBottomLeftRadius:0})()," ",vb({right:0})()," ",(({size:e})=>(0,pb.iv)({default:{height:28,lineHeight:"24px",minHeight:28,top:1},small:{height:22,lineHeight:"18px",minHeight:22,top:1}}[e],"",""))(e),";",""),ik=Zi("div",{target:"e1agakv01"})("&&&{pointer-events:none;",ok,";}"),ak=Zi("select",{target:"e1agakv00"})("&&&{",ok,";cursor:pointer;border:1px solid transparent;&:hover{background-color:",Nb.lightGray[300],";}&:focus{border-color:",Nb.ui.borderFocus,";outline:2px solid transparent;outline-offset:0;}&:disabled{cursor:initial;&:hover{background-color:transparent;}}}");function lk({className:e,isTabbable:t=!0,options:n=$v,onChange:r=Ce.noop,size:o="default",value:i="px",...a}){if(!Gv(n)||1===n.length)return(0,_.createElement)(ik,{className:"components-unit-control__unit-label",size:o},i);const l=Cr()("components-unit-control__select",e);return(0,_.createElement)(ak,(0,nr.Z)({className:l,onChange:e=>{const{value:t}=e.target,o=n.find((e=>e.value===t));r(t,{event:e,data:o})},size:o,tabIndex:t?null:"-1",value:i},a),n.map((e=>(0,_.createElement)("option",{value:e.value,key:e.value},e.label))))}const sk={initial:void 0,fallback:""};var ck=function(e,t=sk){const{initial:n,fallback:r}={...sk,...t},[o,i]=(0,_.useState)(e),a=Hw(e);return(0,_.useEffect)((()=>{a&&o&&i(void 0)}),[a,o]),[function(e=[],t){var n;return null!==(n=e.find(Hw))&&void 0!==n?n:t}([e,o,n],r),e=>{a||i(e)}]},uk=(0,_.forwardRef)((function({__unstableStateReducer:e=(e=>e),autoComplete:t="off",className:n,disabled:r=!1,disableUnits:o=!1,isPressEnterToChange:i=!1,isResetValueOnUnitChange:a=!1,isUnitSelectTabbable:l=!0,label:s,onChange:c=Ce.noop,onUnitChange:u=Ce.noop,size:d="default",style:p,unit:m,units:f=$v,value:h,...g},v){const[b,y]=function(e,t,n){return Kv(t?`${e}${t}`:e,n)}(h,m,f),[w,k]=ck(m,{initial:y}),E=(0,_.useRef)(null),C=Cr()("components-unit-control",n),x=e=>{if(!isNaN(e.target.value))return void(E.current=null);const[t,n]=Yv(e.target.value,f,b,w);if(E.current=t,i&&n!==w){const r={event:e,data:f.find((e=>e.value===n))};c(`${t}${n}`,r),u(n,r),k(n)}},S=x,I=o?null:(0,_.createElement)(lk,{"aria-label":U("Select unit"),disabled:r,isTabbable:l,options:f,onChange:(e,t)=>{const{data:n}=t;let r=`${b}${e}`;a&&void 0!==(null==n?void 0:n.default)&&(r=`${n.default}${e}`),c(r,t),u(e,t),k(e)},size:d,value:w});let T=g.step;if(!T&&f){var N;const e=f.find((e=>e.value===w));T=null!==(N=null==e?void 0:e.step)&&void 0!==N?N:1}return(0,_.createElement)(Qw,{className:"components-unit-control-wrapper",style:p},(0,_.createElement)(rk,(0,nr.Z)({"aria-label":s,type:i?"text":"number"},(0,Ce.omit)(g,["children"]),{autoComplete:t,className:C,disabled:r,disableUnits:o,isPressEnterToChange:i,label:s,onBlur:S,onKeyDown:e=>{const{keyCode:t}=e;t===Br&&x(e)},onChange:(e,t)=>{""!==e?(e=Yv(e,f,b,w).join(""),c(e,t)):c("",t)},ref:v,size:d,suffix:I,value:b,step:T,__unstableStateReducer:db(((e,t)=>(t.type===Qv&&null!==E.current&&(e.value=E.current,E.current=null),e)),e)})))})),dk=function({icon:e,size:t=24,...n}){return(0,_.cloneElement)(e,{width:t,height:t,...n})};const pk={"color.palette":e=>void 0===e.colors?void 0:e.colors,"color.gradients":e=>void 0===e.gradients?void 0:e.gradients,"color.custom":e=>void 0===e.disableCustomColors?void 0:!e.disableCustomColors,"color.customGradient":e=>void 0===e.disableCustomGradients?void 0:!e.disableCustomGradients,"typography.fontSizes":e=>void 0===e.fontSizes?void 0:e.fontSizes,"typography.customFontSize":e=>void 0===e.disableCustomFontSizes?void 0:!e.disableCustomFontSizes,"typography.customLineHeight":e=>e.enableCustomLineHeight,"spacing.units":e=>{if(void 0!==e.enableCustomUnits)return!0===e.enableCustomUnits?["px","em","rem","vh","vw","%"]:e.enableCustomUnits},"spacing.customPadding":e=>e.enableCustomSpacing},mk={"color.gradients":!0,"color.palette":!0,"typography.fontFamilies":!0,"typography.fontSizes":!0};function fk(e){const{name:t}=Mp();return(0,er.Z)((n=>{var r;const o=n(Iv).getSettings(),i=`__experimentalFeatures.${e}`,a=`__experimentalFeatures.blocks.${t}.${e}`,l=null!==(r=(0,Ce.get)(o,a))&&void 0!==r?r:(0,Ce.get)(o,i);var s,c;if(void 0!==l)return mk[e]?null!==(s=null!==(c=l.user)&&void 0!==c?c:l.theme)&&void 0!==s?s:l.core:l;const u=pk[e]?pk[e](o):void 0;return void 0!==u?u:"typography.dropCap"===e||void 0}),[t,e])}const hk=[{name:"default",label:U("Flow"),edit:function({layout:e,onChange:t}){const{wideSize:n,contentSize:r}=e,o=Xv({availableUnits:fk("spacing.units")||["%","px","em","rem","vw"]});return(0,_.createElement)(_.Fragment,null,(0,_.createElement)("div",{className:"block-editor-hooks__layout-controls"},(0,_.createElement)("div",{className:"block-editor-hooks__layout-controls-unit"},(0,_.createElement)(uk,{label:U("Content"),labelPosition:"top",__unstableInputWidth:"80px",value:r||n||"",onChange:n=>{n=0>parseFloat(n)?"0":n,t({...e,contentSize:n})},units:o}),(0,_.createElement)(dk,{icon:Bv})),(0,_.createElement)("div",{className:"block-editor-hooks__layout-controls-unit"},(0,_.createElement)(uk,{label:U("Wide"),labelPosition:"top",__unstableInputWidth:"80px",value:n||r||"",onChange:n=>{n=0>parseFloat(n)?"0":n,t({...e,wideSize:n})},units:o}),(0,_.createElement)(dk,{icon:zv}))),(0,_.createElement)("div",{className:"block-editor-hooks__layout-controls-reset"},(0,_.createElement)(Gi,{variant:"secondary",isSmall:!0,disabled:!r&&!n,onClick:()=>t({contentSize:void 0,wideSize:void 0,inherit:!1})},U("Reset"))),(0,_.createElement)("p",{className:"block-editor-hooks__layout-controls-helptext"},U("Customize the width for all elements that are assigned to the center or wide columns.")))},save:function({selector:e,layout:t={}}){const{contentSize:n,wideSize:r}=t;let o=n||r?`\n\t\t\t\t\t${Vv(e,"> *")} {\n\t\t\t\t\t\tmax-width: ${null!=n?n:r};\n\t\t\t\t\t\tmargin-left: auto !important;\n\t\t\t\t\t\tmargin-right: auto !important;\n\t\t\t\t\t}\n\t\n\t\t\t\t\t${Vv(e,'> [data-align="wide"]')} {\n\t\t\t\t\t\tmax-width: ${null!=r?r:n};\n\t\t\t\t\t}\n\t\n\t\t\t\t\t${Vv(e,'> [data-align="full"]')} {\n\t\t\t\t\t\tmax-width: none;\n\t\t\t\t\t}\n\t\t\t\t`:"";return o+=`\n\t\t\t${Vv(e,'> [data-align="left"]')} {\n\t\t\t\tfloat: left;\n\t\t\t\tmargin-right: 2em;\n\t\t\t}\n\t\n\t\t\t${Vv(e,'> [data-align="right"]')} {\n\t\t\t\tfloat: right;\n\t\t\t\tmargin-left: 2em;\n\t\t\t}\n\t\t`,(0,_.createElement)("style",null,o)},getOrientation:()=>"vertical",getAlignments:e=>void 0!==e.alignments?e.alignments:e.contentSize||e.wideSize?["wide","full","left","center","right"]:["left","center","right"]},Wv];function gk(e="default"){return hk.find((t=>t.name===e))}const vk={type:"default"},bk=(0,_.createContext)(vk),yk=bk.Provider;function wk({layout:e={},...t}){const n=gk(e.type);return n?(0,_.createElement)(n.save,(0,nr.Z)({layout:e},t)):null}const kk=["left","center","right","wide","full"],Ek=["wide","full"];function _k(e=kk){const{wideControlsEnabled:t=!1,themeSupportsLayout:n}=(0,er.Z)((e=>{const{getSettings:t}=e(Iv),n=t();return{wideControlsEnabled:n.alignWide,themeSupportsLayout:n.supportsLayout}}),[]),r=(0,_.useContext)(bk),o=gk(null==r?void 0:r.type),i=o.getAlignments(r);if(n)return i.filter((t=>e.includes(t)));if("default"!==o.name)return[];const{alignments:a=kk}=r;return e.filter((e=>(r.alignments||t||!Ek.includes(e))&&a.includes(e)))}const Ck={left:{icon:Mv,title:U("Align left")},center:{icon:Bv,title:U("Align center")},right:{icon:Fv,title:U("Align right")},wide:{icon:zv,title:U("Wide width")},full:{icon:Hv,title:U("Full width")}},xk={isAlternate:!0};var Sk=function({value:e,onChange:t,controls:n,isToolbar:r,isCollapsed:o=!0}){const i=_k(n);if(0===i.length)return null;const a=Ck[e],l=Ck.center,s=r?Pp:Dv,c=r?{isCollapsed:o}:{};return(0,_.createElement)(s,(0,nr.Z)({popoverProps:xk,icon:a?a.icon:l.icon,label:U("Align"),toggleProps:{describedBy:U("Change alignment")},controls:i.map((n=>{return{...Ck[n],isActive:e===n,role:o?"menuitemradio":void 0,onClick:(r=n,()=>t(e===r?void 0:r))};var r}))},c))};function Ik(e){return(0,_.createElement)(Sk,(0,nr.Z)({},e,{isToolbar:!1}))}const Tk=["left","center","right","wide","full"],Nk=["wide","full"];function Ak(e,t=!0,n=!0){let r;return r=Array.isArray(e)?Tk.filter((t=>e.includes(t))):!0===e?Tk:[],!n||!0===e&&!t?(0,Ce.without)(r,...Nk):r}const Rk=Ea((e=>t=>{const{name:n}=t,r=_k(Ak(Vl(n,"align"),Wl(n,"alignWide",!0)));return[r.length>0&&t.isSelected&&(0,_.createElement)(Ov,{key:"align-controls",group:"block"},(0,_.createElement)(Ik,{value:t.attributes.align,onChange:e=>{var n,r;e||(null===(n=zl(t.name).attributes)||void 0===n||null===(r=n.align)||void 0===r?void 0:r.default)&&(e="");t.setAttributes({align:e})},controls:r})),(0,_.createElement)(e,(0,nr.Z)({key:"edit"},t))]}),"withToolbarControls"),Lk=Ea((e=>t=>{const{name:n,attributes:r}=t,{align:o}=r,i=_k(Ak(Vl(n,"align"),Wl(n,"alignWide",!0)));if(void 0===o)return(0,_.createElement)(e,t);let a=t.wrapperProps;return i.includes(o)&&(a={...a,"data-align":o}),(0,_.createElement)(e,(0,nr.Z)({},t,{wrapperProps:a}))}));(0,W.KJ)("blocks.registerBlockType","core/align/addAttribute",(function(e){return(0,Ce.has)(e.attributes,["align","type"])||Wl(e,"align")&&(e.attributes={...e.attributes,align:{type:"string",enum:[...Tk,""]}}),e})),(0,W.KJ)("editor.BlockListBlock","core/editor/align/with-data-align",Lk),(0,W.KJ)("editor.BlockEdit","core/editor/align/with-toolbar-controls",Rk),(0,W.KJ)("blocks.getSaveContent.extraProps","core/align/addAssignedAlign",(function(e,t,n){const{align:r}=n;return Ak(Vl(t,"align"),Wl(t,"alignWide",!0)).includes(r)&&(e.className=Cr()(`align${r}`,e.className)),e}));var Pk={"default.fontFamily":"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif","default.fontSize":"13px","helpText.fontSize":"12px",mobileTextMinFontSize:"16px"};function Ok(e){return(0,Ce.get)(Pk,e,"")}const Dk=Zi("div",{target:"e1puf3u3"})("font-family:",Ok("default.fontFamily"),";font-size:",Ok("default.fontSize"),";"),Mk=Zi("div",{target:"e1puf3u2"})("margin-bottom:",Pb(2),";.components-panel__row &{margin-bottom:inherit;}"),Bk=Zi("label",{target:"e1puf3u1"})("display:inline-block;margin-bottom:",Pb(2),";"),Fk=Zi("p",{target:"e1puf3u0"})("font-size:",Ok("helpText.fontSize"),";font-style:normal;color:",Nb.mediumGray.text,";");function zk({id:e,label:t,hideLabelFromVision:n,help:r,className:o,children:i}){return(0,_.createElement)(Dk,{className:Cr()("components-base-control",o)},(0,_.createElement)(Mk,{className:"components-base-control__field"},t&&e&&(n?(0,_.createElement)($i,{as:"label",htmlFor:e},t):(0,_.createElement)(Bk,{className:"components-base-control__label",htmlFor:e},t)),t&&!e&&(n?(0,_.createElement)($i,{as:"label"},t):(0,_.createElement)(zk.VisualLabel,null,t)),i),!!r&&(0,_.createElement)(Fk,{id:e+"__help",className:"components-base-control__help"},r))}zk.VisualLabel=({className:e,children:t})=>(e=Cr()("components-base-control__label",e),(0,_.createElement)("span",{className:e},t));var Hk=zk,Vk=(0,_.forwardRef)((function e({label:t,hideLabelFromVision:n,value:r,help:o,className:i,onChange:a,type:l="text",...s},c){const u=`inspector-text-control-${Rb(e)}`;return(0,_.createElement)(Hk,{label:t,hideLabelFromVision:n,id:u,help:o,className:i},(0,_.createElement)("input",(0,nr.Z)({className:"components-text-control__input",type:l,id:u,value:r,onChange:e=>a(e.target.value),"aria-describedby":o?u+"__help":void 0,ref:c},s)))})),Wk=(0,_.createElement)(ko,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,_.createElement)(yo,{d:"M18.2 17c0 .7-.6 1.2-1.2 1.2H7c-.7 0-1.2-.6-1.2-1.2V7c0-.7.6-1.2 1.2-1.2h3.2V4.2H7C5.5 4.2 4.2 5.5 4.2 7v10c0 1.5 1.2 2.8 2.8 2.8h10c1.5 0 2.8-1.2 2.8-2.8v-3.6h-1.5V17zM14.9 3v1.5h3.7l-6.4 6.4 1.1 1.1 6.4-6.4v3.7h1.5V3h-6.3z"}));const Zk=Zi(dk,{target:"etxm6pv0"})({name:"bqq7t3",styles:"width:1.4em;height:1.4em;margin:-0.2em 0.1em 0;vertical-align:middle;fill:currentColor"});var jk=(0,_.forwardRef)((function({href:e,children:t,className:n,rel:r="",...o},i){r=(0,Ce.uniq)((0,Ce.compact)([...r.split(" "),"external","noreferrer","noopener"])).join(" ");const a=Cr()("components-external-link",n);return(0,_.createElement)("a",(0,nr.Z)({},o,{className:a,href:e,target:"_blank",rel:r,ref:i}),t,(0,_.createElement)($i,{as:"span"},U("(opens in a new tab)")),(0,_.createElement)(Zk,{icon:Wk,className:"components-external-link__icon"}))})),Uk=n(34155);const $k="undefined"!=typeof window&&window.navigator.userAgent.indexOf("Trident")>=0;var qk=Uk.env.FORCE_REDUCED_MOTION||$k?()=>!0:()=>Sr("(prefers-reduced-motion: reduce)"),Gk=(0,_.createElement)(ko,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,_.createElement)(yo,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"})),Kk=(0,_.createElement)(ko,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,_.createElement)(yo,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"}));const Yk=(0,_.forwardRef)((({isOpened:e,icon:t,title:n,...r},o)=>n?(0,_.createElement)("h2",{className:"components-panel__body-title"},(0,_.createElement)(Gi,(0,nr.Z)({className:"components-panel__body-toggle","aria-expanded":e,ref:o},r),(0,_.createElement)("span",{"aria-hidden":"true"},(0,_.createElement)(Oo,{className:"components-panel__arrow",icon:e?Gk:Kk})),n,t&&(0,_.createElement)(Oo,{icon:t,className:"components-panel__icon",size:20}))):null)),Xk=(0,_.forwardRef)((function({buttonProps:e={},children:t,className:n,icon:r,initialOpen:o,onToggle:i=Ce.noop,opened:a,title:l,scrollAfterOpen:s=!0},c){const[u,d]=ck(a,{initial:void 0===o||o}),p=(0,_.useRef)(),m=qk()?"auto":"smooth",f=(0,_.useRef)();f.current=s,Ww((()=>{var e;u&&f.current&&null!==(e=p.current)&&void 0!==e&&e.scrollIntoView&&p.current.scrollIntoView({inline:"nearest",block:"nearest",behavior:m})}),[u,m]);const h=Cr()("components-panel__body",n,{"is-opened":u});return(0,_.createElement)("div",{className:h,ref:hr([p,c])},(0,_.createElement)(Yk,(0,nr.Z)({icon:r,isOpened:u,onClick:e=>{e.preventDefault();const t=!u;d(t),i(t)},title:l},e)),"function"==typeof t?t({opened:u}):u&&t)}));Xk.displayName="PanelBody";var Jk=Xk;const Qk="InspectorAdvancedControls",{Fill:eE,Slot:tE}=Er(Qk);function nE({children:e}){const{isSelected:t}=Mp();return t?(0,_.createElement)(nd,{document:document},(0,_.createElement)(eE,null,e)):null}nE.slotName=Qk,nE.Slot=tE;var rE=nE;const{Fill:oE,Slot:iE}=Er("InspectorControls");function aE({children:e}){return Tv()?(0,_.createElement)(nd,{document:document},(0,_.createElement)(oE,null,e)):null}aE.Slot=iE;var lE=aE;const sE=/[\s#]/g,cE=Ea((e=>t=>{if(Wl(t.name,"anchor")&&t.isSelected){const n="web"===Jp,r=(0,_.createElement)(Vk,{className:"html-anchor-control",label:U("HTML anchor"),help:(0,_.createElement)(_.Fragment,null,U("Enter a word or two — without spaces — to make a unique web address just for this block, called an “anchor.” Then, you’ll be able to link directly to this section of your page."),n&&(0,_.createElement)(jk,{href:"https://wordpress.org/support/article/page-jumps/"},U("Learn more about anchors"))),value:t.attributes.anchor||"",placeholder:n?null:U("Add an anchor"),onChange:e=>{e=e.replace(sE,"-"),t.setAttributes({anchor:e})},autoCapitalize:"none",autoComplete:"off"});return(0,_.createElement)(_.Fragment,null,(0,_.createElement)(e,t),n&&(0,_.createElement)(rE,null,r),!n&&"core/heading"===t.name&&(0,_.createElement)(lE,null,(0,_.createElement)(Jk,{title:U("Heading settings")},r)))}return(0,_.createElement)(e,t)}),"withInspectorControl");(0,W.KJ)("blocks.registerBlockType","core/anchor/attribute",(function(e){return(0,Ce.has)(e.attributes,["anchor","type"])||Wl(e,"anchor")&&(e.attributes={...e.attributes,anchor:{type:"string",source:"attribute",attribute:"id",selector:"*"}}),e})),(0,W.KJ)("editor.BlockEdit","core/editor/anchor/with-inspector-control",cE),(0,W.KJ)("blocks.getSaveContent.extraProps","core/anchor/save-props",(function(e,t,n){return Wl(t,"anchor")&&(e.id=""===n.anchor?null:n.anchor),e}));const uE=Ea((e=>t=>Wl(t.name,"customClassName",!0)&&t.isSelected?(0,_.createElement)(_.Fragment,null,(0,_.createElement)(e,t),(0,_.createElement)(rE,null,(0,_.createElement)(Vk,{autoComplete:"off",label:U("Additional CSS class(es)"),value:t.attributes.className||"",onChange:e=>{t.setAttributes({className:""!==e?e:void 0})},help:U("Separate multiple classes with spaces.")}))):(0,_.createElement)(e,t)),"withInspectorControl");(0,W.KJ)("blocks.registerBlockType","core/custom-class-name/attribute",(function(e){return Wl(e,"customClassName",!0)&&(e.attributes={...e.attributes,className:{type:"string"}}),e})),(0,W.KJ)("editor.BlockEdit","core/editor/custom-class-name/with-inspector-control",uE),(0,W.KJ)("blocks.getSaveContent.extraProps","core/custom-class-name/save-props",(function(e,t,n){return Wl(t,"customClassName",!0)&&n.className&&(e.className=Cr()(e.className,n.className)),e})),(0,W.KJ)("blocks.getSaveContent.extraProps","core/generated-class-name/save-props",(function(e,t){return Wl(t,"className",!0)&&("string"==typeof e.className?e.className=(0,Ce.uniq)([Fs(t.name),...e.className.split(" ")]).join(" ").trim():e.className=Fs(t.name)),e}));var dE=({className:e,colorValue:t,...n})=>(0,_.createElement)("span",(0,nr.Z)({className:Cr()("component-color-indicator",e),style:{background:t}},n)),pE=(0,_.forwardRef)((function({className:e,...t},n){const r=Cr()("components-button-group",e);return(0,_.createElement)("div",(0,nr.Z)({ref:n,role:"group",className:r},t))})),mE=Ea((e=>e.prototype instanceof _.Component?class extends e{shouldComponentUpdate(e,t){return!(0,Ie.ZP)(e,this.props)||!(0,Ie.ZP)(t,this.state)}}:class extends _.Component{shouldComponentUpdate(e){return!(0,Ie.ZP)(e,this.props)}render(){return(0,_.createElement)(e,this.props)}}),"pure");function fE(e={},t=!1){const n=e.hex?wl()(e.hex):wl()(e),r=n.toHsl();r.h=Math.round(r.h),r.s=Math.round(100*r.s),r.l=Math.round(100*r.l);const o=n.toHsv();o.h=Math.round(o.h),o.s=Math.round(100*o.s),o.v=Math.round(100*o.v);const i=n.toRgb(),a=n.toHex();return 0===r.s&&(r.h=t||0,o.h=t||0),{color:n,hex:"000000"===a&&0===i.a?"transparent":`#${a}`,hsl:r,hsv:o,oldHue:e.h||t||r.h,rgb:i,source:e.source}}function hE(e,t){e.preventDefault();const{left:n,top:r,width:o,height:i}=t.getBoundingClientRect(),a="number"==typeof e.pageX?e.pageX:e.touches[0].pageX,l="number"==typeof e.pageY?e.pageY:e.touches[0].pageY;let s=a-(n+window.pageXOffset),c=l-(r+window.pageYOffset);return s<0?s=0:s>o?s=o:c<0?c=0:c>i&&(c=i),{top:c,left:s,width:o,height:i}}function gE(e){const t="#"===String(e).charAt(0)?1:0;return e.length!==4+t&&e.length<7+t&&wl()(e).isValid()}var vE=n(42441),bE=n.n(vE);n(23956);var yE=function(e,t,{bindGlobal:n=!1,eventName:r="keydown",isDisabled:o=!1,target:i}={}){const a=(0,_.useRef)(t);(0,_.useEffect)((()=>{a.current=t}),[t]),(0,_.useEffect)((()=>{if(o)return;const t=new(bE())(i&&i.current?i.current:document);return(0,Ce.castArray)(e).forEach((e=>{const o=e.split("+"),i=new Set(o.filter((e=>e.length>1))),l=i.has("alt"),s=i.has("shift");if(function(e=window){const{platform:t}=e.navigator;return-1!==t.indexOf("Mac")||(0,Ce.includes)(["iPad","iPhone"],t)}()&&(1===i.size&&l||2===i.size&&l&&s))throw new Error(`Cannot bind ${e}. Alt and Shift+Alt modifiers are reserved for character input.`);t[n?"bindGlobal":"bind"](e,((...e)=>a.current(...e)),r)})),()=>{t.reset()}}),[e,n,r,i,o])};function wE({target:e,callback:t,shortcut:n,bindGlobal:r,eventName:o}){return yE(n,t,{bindGlobal:r,target:e,eventName:o}),null}var kE=function({children:e,shortcuts:t,bindGlobal:n,eventName:r}){const o=(0,_.useRef)(),i=(0,Ce.map)(t,((e,t)=>(0,_.createElement)(wE,{key:t,shortcut:t,callback:e,bindGlobal:n,eventName:r,target:o})));return _.Children.count(e)?(0,_.createElement)("div",{ref:o},i,e):i};class EE extends _.Component{constructor(){super(...arguments),this.container=(0,_.createRef)(),this.increase=this.increase.bind(this),this.decrease=this.decrease.bind(this),this.handleChange=this.handleChange.bind(this),this.handleMouseDown=this.handleMouseDown.bind(this),this.handleMouseUp=this.handleMouseUp.bind(this)}componentWillUnmount(){this.unbindEventListeners()}increase(e=.01){const{hsl:t,onChange:n=Ce.noop}=this.props;e=parseInt(100*e,10),n({h:t.h,s:t.s,l:t.l,a:(parseInt(100*t.a,10)+e)/100,source:"rgb"})}decrease(e=.01){const{hsl:t,onChange:n=Ce.noop}=this.props,r=parseInt(100*t.a,10)-parseInt(100*e,10);n({h:t.h,s:t.s,l:t.l,a:t.a<=e?0:r/100,source:"rgb"})}handleChange(e){const{onChange:t=Ce.noop}=this.props,n=function(e,t,n){const{left:r,width:o}=hE(e,n),i=r<0?0:Math.round(100*r/o)/100;return t.hsl.a!==i?{h:t.hsl.h,s:t.hsl.s,l:t.hsl.l,a:i,source:"rgb"}:null}(e,this.props,this.container.current);n&&t(n,e)}handleMouseDown(e){this.handleChange(e),window.addEventListener("mousemove",this.handleChange),window.addEventListener("mouseup",this.handleMouseUp)}handleMouseUp(){this.unbindEventListeners()}preventKeyEvents(e){9!==e.keyCode&&e.preventDefault()}unbindEventListeners(){window.removeEventListener("mousemove",this.handleChange),window.removeEventListener("mouseup",this.handleMouseUp)}render(){const{rgb:e}=this.props,t=`${e.r},${e.g},${e.b}`,n={background:`linear-gradient(to right, rgba(${t}, 0) 0%, rgba(${t}, 1) 100%)`},r={left:100*e.a+"%"},o={up:()=>this.increase(),right:()=>this.increase(),"shift+up":()=>this.increase(.1),"shift+right":()=>this.increase(.1),pageup:()=>this.increase(.1),end:()=>this.increase(1),down:()=>this.decrease(),left:()=>this.decrease(),"shift+down":()=>this.decrease(.1),"shift+left":()=>this.decrease(.1),pagedown:()=>this.decrease(.1),home:()=>this.decrease(1)};return(0,_.createElement)(kE,{shortcuts:o},(0,_.createElement)("div",{className:"components-color-picker__alpha"},(0,_.createElement)("div",{className:"components-color-picker__alpha-gradient",style:n}),(0,_.createElement)("div",{className:"components-color-picker__alpha-bar",ref:this.container,onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},(0,_.createElement)("div",{tabIndex:"0",role:"slider","aria-valuemax":"1","aria-valuemin":"0","aria-valuenow":e.a,"aria-orientation":"horizontal","aria-label":U("Alpha value, from 0 (transparent) to 1 (fully opaque)."),className:"components-color-picker__alpha-pointer",style:r,onKeyDown:this.preventKeyEvents}))))}}var _E=mE(EE),CE=Ce.flowRight,xE=Ea((e=>t=>{const n=Rb(e);return(0,_.createElement)(e,(0,nr.Z)({},t,{instanceId:n}))}),"withInstanceId");class SE extends _.Component{constructor(){super(...arguments),this.container=(0,_.createRef)(),this.increase=this.increase.bind(this),this.decrease=this.decrease.bind(this),this.handleChange=this.handleChange.bind(this),this.handleMouseDown=this.handleMouseDown.bind(this),this.handleMouseUp=this.handleMouseUp.bind(this)}componentWillUnmount(){this.unbindEventListeners()}increase(e=1){const{hsl:t,onChange:n=Ce.noop}=this.props;n({h:t.h+e>=359?359:t.h+e,s:t.s,l:t.l,a:t.a,source:"rgb"})}decrease(e=1){const{hsl:t,onChange:n=Ce.noop}=this.props;n({h:t.h<=e?0:t.h-e,s:t.s,l:t.l,a:t.a,source:"rgb"})}handleChange(e){const{onChange:t=Ce.noop}=this.props,n=function(e,t,n){const{left:r,width:o}=hE(e,n),i=r>=o?359:100*r/o*360/100;return t.hsl.h!==i?{h:i,s:t.hsl.s,l:t.hsl.l,a:t.hsl.a,source:"rgb"}:null}(e,this.props,this.container.current);n&&t(n,e)}handleMouseDown(e){this.handleChange(e),window.addEventListener("mousemove",this.handleChange),window.addEventListener("mouseup",this.handleMouseUp)}handleMouseUp(){this.unbindEventListeners()}preventKeyEvents(e){9!==e.keyCode&&e.preventDefault()}unbindEventListeners(){window.removeEventListener("mousemove",this.handleChange),window.removeEventListener("mouseup",this.handleMouseUp)}render(){const{hsl:e={},instanceId:t}=this.props,n={left:100*e.h/360+"%"},r={up:()=>this.increase(),right:()=>this.increase(),"shift+up":()=>this.increase(10),"shift+right":()=>this.increase(10),pageup:()=>this.increase(10),end:()=>this.increase(359),down:()=>this.decrease(),left:()=>this.decrease(),"shift+down":()=>this.decrease(10),"shift+left":()=>this.decrease(10),pagedown:()=>this.decrease(10),home:()=>this.decrease(359)};return(0,_.createElement)(kE,{shortcuts:r},(0,_.createElement)("div",{className:"components-color-picker__hue"},(0,_.createElement)("div",{className:"components-color-picker__hue-gradient"}),(0,_.createElement)("div",{className:"components-color-picker__hue-bar",ref:this.container,onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},(0,_.createElement)("div",{tabIndex:"0",role:"slider","aria-valuemax":"1","aria-valuemin":"359","aria-valuenow":e.h,"aria-orientation":"horizontal","aria-label":U("Hue value in degrees, from 0 to 359."),"aria-describedby":`components-color-picker__hue-description-${t}`,className:"components-color-picker__hue-pointer",style:n,onKeyDown:this.preventKeyEvents}),(0,_.createElement)($i,{as:"p",id:`components-color-picker__hue-description-${t}`},U("Move the arrow left or right to change hue.")))))}}var IE=CE(mE,xE)(SE);class TE extends _.Component{constructor(){super(...arguments),this.handleBlur=this.handleBlur.bind(this),this.handleChange=this.handleChange.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this)}handleBlur(){const{value:e,valueKey:t,onChange:n,source:r}=this.props;n({source:r,state:"commit",value:e,valueKey:t})}handleChange(e){const{valueKey:t,onChange:n,source:r}=this.props;e.length>4&&gE(e)?n({source:r,state:"commit",value:e,valueKey:t}):n({source:r,state:"draft",value:e,valueKey:t})}handleKeyDown({keyCode:e}){if(e!==Br&&e!==Hr&&e!==Wr)return;const{value:t,valueKey:n,onChange:r,source:o}=this.props;r({source:o,state:"commit",value:t,valueKey:n})}render(){const{label:e,value:t,...n}=this.props;return(0,_.createElement)(Vk,(0,nr.Z)({className:"components-color-picker__inputs-field",label:e,value:t,onChange:e=>this.handleChange(e),onBlur:this.handleBlur,onKeyDown:this.handleKeyDown},(0,Ce.omit)(n,["onChange","valueKey","source"])))}}const NE=mE(Gi);class AE extends _.Component{constructor({hsl:e}){super(...arguments);const t=1===e.a?"hex":"rgb";this.state={view:t},this.toggleViews=this.toggleViews.bind(this),this.resetDraftValues=this.resetDraftValues.bind(this),this.handleChange=this.handleChange.bind(this),this.normalizeValue=this.normalizeValue.bind(this)}static getDerivedStateFromProps(e,t){return 1!==e.hsl.a&&"hex"===t.view?{view:"rgb"}:null}toggleViews(){"hex"===this.state.view?(this.setState({view:"rgb"},this.resetDraftValues),Gf(U("RGB mode active"))):"rgb"===this.state.view?(this.setState({view:"hsl"},this.resetDraftValues),Gf(U("Hue/saturation/lightness mode active"))):"hsl"===this.state.view&&(1===this.props.hsl.a?(this.setState({view:"hex"},this.resetDraftValues),Gf(U("Hex color mode active"))):(this.setState({view:"rgb"},this.resetDraftValues),Gf(U("RGB mode active"))))}resetDraftValues(){return this.props.onChange({state:"reset"})}normalizeValue(e,t){return"a"!==e?t:t<0?0:t>1?1:Math.round(100*t)/100}handleChange({source:e,state:t,value:n,valueKey:r}){this.props.onChange({source:e,state:t,valueKey:r,value:this.normalizeValue(r,n)})}renderFields(){const{disableAlpha:e=!1}=this.props;if("hex"===this.state.view)return(0,_.createElement)("div",{className:"components-color-picker__inputs-fields"},(0,_.createElement)(TE,{source:this.state.view,label:U("Color value in hexadecimal"),valueKey:"hex",value:this.props.hex,onChange:this.handleChange}));if("rgb"===this.state.view){const t=U(e?"Color value in RGB":"Color value in RGBA");return(0,_.createElement)("fieldset",null,(0,_.createElement)($i,{as:"legend"},t),(0,_.createElement)("div",{className:"components-color-picker__inputs-fields"},(0,_.createElement)(TE,{source:this.state.view,label:"r",valueKey:"r",value:this.props.rgb.r,onChange:this.handleChange,type:"number",min:"0",max:"255"}),(0,_.createElement)(TE,{source:this.state.view,label:"g",valueKey:"g",value:this.props.rgb.g,onChange:this.handleChange,type:"number",min:"0",max:"255"}),(0,_.createElement)(TE,{source:this.state.view,label:"b",valueKey:"b",value:this.props.rgb.b,onChange:this.handleChange,type:"number",min:"0",max:"255"}),e?null:(0,_.createElement)(TE,{source:this.state.view,label:"a",valueKey:"a",value:this.props.rgb.a,onChange:this.handleChange,type:"number",min:"0",max:"1",step:"0.01"})))}if("hsl"===this.state.view){const t=U(e?"Color value in HSL":"Color value in HSLA");return(0,_.createElement)("fieldset",null,(0,_.createElement)($i,{as:"legend"},t),(0,_.createElement)("div",{className:"components-color-picker__inputs-fields"},(0,_.createElement)(TE,{source:this.state.view,label:"h",valueKey:"h",value:this.props.hsl.h,onChange:this.handleChange,type:"number",min:"0",max:"359"}),(0,_.createElement)(TE,{source:this.state.view,label:"s",valueKey:"s",value:this.props.hsl.s,onChange:this.handleChange,type:"number",min:"0",max:"100"}),(0,_.createElement)(TE,{source:this.state.view,label:"l",valueKey:"l",value:this.props.hsl.l,onChange:this.handleChange,type:"number",min:"0",max:"100"}),e?null:(0,_.createElement)(TE,{source:this.state.view,label:"a",valueKey:"a",value:this.props.hsl.a,onChange:this.handleChange,type:"number",min:"0",max:"1",step:"0.05"})))}}render(){return(0,_.createElement)("div",{className:"components-color-picker__inputs-wrapper"},this.renderFields(),(0,_.createElement)("div",{className:"components-color-picker__inputs-toggle-wrapper"},(0,_.createElement)(NE,{className:"components-color-picker__inputs-toggle",icon:Kk,label:U("Change color format"),onClick:this.toggleViews})))}}var RE=AE;class LE extends _.Component{constructor(e){super(e),this.throttle=(0,Ce.throttle)(((e,t,n)=>{e(t,n)}),50),this.container=(0,_.createRef)(),this.saturate=this.saturate.bind(this),this.brighten=this.brighten.bind(this),this.handleChange=this.handleChange.bind(this),this.handleMouseDown=this.handleMouseDown.bind(this),this.handleMouseUp=this.handleMouseUp.bind(this)}componentWillUnmount(){this.throttle.cancel(),this.unbindEventListeners()}saturate(e=.01){const{hsv:t,onChange:n=Ce.noop}=this.props,r=(0,Ce.clamp)(t.s+Math.round(100*e),0,100);n({h:t.h,s:r,v:t.v,a:t.a,source:"rgb"})}brighten(e=.01){const{hsv:t,onChange:n=Ce.noop}=this.props,r=(0,Ce.clamp)(t.v+Math.round(100*e),0,100);n({h:t.h,s:t.s,v:r,a:t.a,source:"rgb"})}handleChange(e){const{onChange:t=Ce.noop}=this.props,n=function(e,t,n){const{top:r,left:o,width:i,height:a}=hE(e,n),l=o<0?0:100*o/i;let s=r>=a?0:-100*r/a+100;return s<1&&(s=0),{h:t.hsl.h,s:l,v:s,a:t.hsl.a,source:"rgb"}}(e,this.props,this.container.current);this.throttle(t,n,e)}handleMouseDown(e){this.handleChange(e),window.addEventListener("mousemove",this.handleChange),window.addEventListener("mouseup",this.handleMouseUp)}handleMouseUp(){this.unbindEventListeners()}preventKeyEvents(e){9!==e.keyCode&&e.preventDefault()}unbindEventListeners(){window.removeEventListener("mousemove",this.handleChange),window.removeEventListener("mouseup",this.handleMouseUp)}render(){const{hsv:e,hsl:t,instanceId:n}=this.props,r={top:100-e.v+"%",left:`${e.s}%`},o={up:()=>this.brighten(),"shift+up":()=>this.brighten(.1),pageup:()=>this.brighten(1),down:()=>this.brighten(-.01),"shift+down":()=>this.brighten(-.1),pagedown:()=>this.brighten(-1),right:()=>this.saturate(),"shift+right":()=>this.saturate(.1),end:()=>this.saturate(1),left:()=>this.saturate(-.01),"shift+left":()=>this.saturate(-.1),home:()=>this.saturate(-1)};return(0,_.createElement)(kE,{shortcuts:o},(0,_.createElement)("div",{style:{background:`hsl(${t.h},100%, 50%)`},className:"components-color-picker__saturation-color",ref:this.container,onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange,role:"application"},(0,_.createElement)("div",{className:"components-color-picker__saturation-white"}),(0,_.createElement)("div",{className:"components-color-picker__saturation-black"}),(0,_.createElement)(Gi,{"aria-label":U("Choose a shade"),"aria-describedby":`color-picker-saturation-${n}`,className:"components-color-picker__saturation-pointer",style:r,onKeyDown:this.preventKeyEvents}),(0,_.createElement)($i,{id:`color-picker-saturation-${n}`},U("Use your arrow keys to change the base color. Move up to lighten the color, down to darken, left to decrease saturation, and right to increase saturation."))))}}var PE=CE(mE,xE)(LE);const OE=e=>String(e).toLowerCase(),DE=(e,{source:t,valueKey:n,value:r})=>"hex"===t?{source:t,[t]:r}:{source:t,...{...e[t],[n]:r}};class ME extends _.Component{constructor({color:e="0071a1"}){super(...arguments);const t=fE(e);this.state={...t,draftHex:OE(t.hex),draftRgb:t.rgb,draftHsl:t.hsl},this.commitValues=this.commitValues.bind(this),this.setDraftValues=this.setDraftValues.bind(this),this.resetDraftValues=this.resetDraftValues.bind(this),this.handleInputChange=this.handleInputChange.bind(this)}commitValues(e){const{oldHue:t,onChangeComplete:n=Ce.noop}=this.props;if((r=e).hex?gE(r.hex):function(e){let t=0,n=0;return(0,Ce.each)(["r","g","b","a","h","s","l","v"],(r=>{e[r]&&(t+=1,isNaN(e[r])||(n+=1))})),t===n&&e}(r)){const r=fE(e,e.h||t);this.setState({...r,draftHex:OE(r.hex),draftHsl:r.hsl,draftRgb:r.rgb},(0,Ce.debounce)((0,Ce.partial)(n,r),100))}var r}resetDraftValues(){this.setState({draftHex:this.state.hex,draftHsl:this.state.hsl,draftRgb:this.state.rgb})}setDraftValues(e){switch(e.source){case"hex":this.setState({draftHex:OE(e.hex)});break;case"rgb":this.setState({draftRgb:e});break;case"hsl":this.setState({draftHsl:e})}}handleInputChange(e){switch(e.state){case"reset":this.resetDraftValues();break;case"commit":const t=DE(this.state,e);(e=>"hex"===e.source&&void 0===e.hex||"hsl"===e.source&&(void 0===e.h||void 0===e.s||void 0===e.l)||!("rgb"!==e.source||void 0!==e.r&&void 0!==e.g&&void 0!==e.b||void 0!==e.h&&void 0!==e.s&&void 0!==e.v&&void 0!==e.a||void 0!==e.h&&void 0!==e.s&&void 0!==e.l&&void 0!==e.a))(t)||this.commitValues(t);break;case"draft":this.setDraftValues(DE(this.state,e))}}render(){const{className:e,disableAlpha:t}=this.props,{color:n,hsl:r,hsv:o,rgb:i,draftHex:a,draftHsl:l,draftRgb:s}=this.state,c=Cr()(e,{"components-color-picker":!0,"is-alpha-disabled":t,"is-alpha-enabled":!t});return(0,_.createElement)("div",{className:c},(0,_.createElement)("div",{className:"components-color-picker__saturation"},(0,_.createElement)(PE,{hsl:r,hsv:o,onChange:this.commitValues})),(0,_.createElement)("div",{className:"components-color-picker__body"},(0,_.createElement)("div",{className:"components-color-picker__controls"},(0,_.createElement)("div",{className:"components-color-picker__swatch"},(0,_.createElement)("div",{className:"components-color-picker__active",style:{backgroundColor:n&&n.toRgbString()}})),(0,_.createElement)("div",{className:"components-color-picker__toggles"},(0,_.createElement)(IE,{hsl:r,onChange:this.commitValues}),t?null:(0,_.createElement)(_E,{rgb:i,hsl:r,onChange:this.commitValues}))),(0,_.createElement)(RE,{rgb:s,hsl:l,hex:a,onChange:this.handleInputChange,disableAlpha:t})))}}var BE=(0,_.createElement)(ko,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,_.createElement)(yo,{d:"M18.3 5.6L9.9 16.9l-4.6-3.4-.9 1.2 5.8 4.3 9.3-12.6z"}));function FE({actions:e,className:t,options:n,children:r}){return(0,_.createElement)("div",{className:Cr()("components-circular-option-picker",t)},(0,_.createElement)("div",{className:"components-circular-option-picker__swatches"},n),r,e&&(0,_.createElement)("div",{className:"components-circular-option-picker__custom-clear-wrapper"},e))}function zE({clearable:e=!0,className:t,colors:n,disableCustomColors:r=!1,onChange:o,value:i}){const a=(0,_.useCallback)((()=>o(void 0)),[o]),l=(0,_.useMemo)((()=>(0,Ce.map)(n,(({color:e,name:t})=>(0,_.createElement)(FE.Option,{key:e,isSelected:i===e,selectedIconProps:i===e?{fill:wl().mostReadable(e,["#000","#fff"]).toHexString()}:{},tooltipText:t||L(U("Color code: %s"),e),style:{backgroundColor:e,color:e},onClick:i===e?a:()=>o(e),"aria-label":t?L(U("Color: %s"),t):L(U("Color code: %s"),e)})))),[n,i,o,a]);return(0,_.createElement)(FE,{className:t,options:l,actions:(0,_.createElement)(_.Fragment,null,!r&&(0,_.createElement)(FE.DropdownLinkAction,{dropdownProps:{renderContent:()=>(0,_.createElement)(ME,{color:i,onChangeComplete:e=>o(e.hex),disableAlpha:!0}),contentClassName:"components-color-palette__picker"},buttonProps:{"aria-label":U("Custom color picker")},linkText:U("Custom color")}),!!e&&(0,_.createElement)(FE.ButtonAction,{onClick:a},U("Clear")))})}FE.Option=function({className:e,isSelected:t,selectedIconProps:n,tooltipText:r,...o}){const i=(0,_.createElement)(Gi,(0,nr.Z)({isPressed:t,className:Cr()(e,"components-circular-option-picker__option")},o));return(0,_.createElement)("div",{className:"components-circular-option-picker__option-wrapper"},r?(0,_.createElement)(Lo,{text:r},i):i,t&&(0,_.createElement)(dk,(0,nr.Z)({icon:BE},n||{})))},FE.ButtonAction=function({className:e,children:t,...n}){return(0,_.createElement)(Gi,(0,nr.Z)({className:Cr()("components-circular-option-picker__clear",e),isSmall:!0,variant:"secondary"},n),t)},FE.DropdownLinkAction=function({buttonProps:e,className:t,dropdownProps:n,linkText:r}){return(0,_.createElement)(Cp,(0,nr.Z)({className:Cr()("components-circular-option-picker__dropdown-link-action",t),renderToggle:({isOpen:t,onToggle:n})=>(0,_.createElement)(Gi,(0,nr.Z)({"aria-expanded":t,"aria-haspopup":"true",onClick:n,variant:"link"},e),r)},n))};var HE=Wb({as:"div",useHook:function(e){return Zb({isBlock:!0,...wi(e,"FlexBlock")})},name:"FlexBlock"}),VE=n(78361);const WE=Zi(Vb,{target:"e65ony43"})({name:"1ww443i",styles:"max-width:200px"}),ZE=Zi("div",{target:"e65ony42"})("border-radius:50%;border:1px solid ",Nb.ui.borderLight,";box-sizing:border-box;cursor:grab;height:",30,"px;overflow:hidden;width:",30,"px;"),jE=Zi("div",{target:"e65ony41"})({name:"1bhd2sw",styles:"box-sizing:border-box;position:relative;width:100%;height:100%"}),UE=Zi("div",{target:"e65ony40"})("background:",Nb.ui.border,";border-radius:50%;border:3px solid ",Nb.ui.border,";bottom:0;box-sizing:border-box;display:block;height:1px;left:0;margin:auto;position:absolute;right:0;top:-",15,"px;width:1px;");var $E=function({value:e,onChange:t,...n}){const r=(0,_.useRef)(),o=(0,_.useRef)(),i=(0,_.useRef)(),a=e=>{const{x:n,y:i}=o.current,{ownerDocument:a}=r.current;e.preventDefault(),a.activeElement.blur(),t(function(e,t,n,r){const o=r-t,i=n-e,a=Math.atan2(o,i),l=Math.round(a*(180/Math.PI))+90;return l<0?360+l:l}(n,i,e.clientX,e.clientY))},{startDrag:l,isDragging:s}=function({onDragStart:e,onDragMove:t,onDragEnd:n}){const[r,o]=(0,_.useState)(!1),i=(0,_.useRef)({onDragStart:e,onDragMove:t,onDragEnd:n});(0,VE.Z)((()=>{i.current.onDragStart=e,i.current.onDragMove=t,i.current.onDragEnd=n}),[e,t,n]);const a=(0,_.useCallback)((e=>i.current.onDragMove&&i.current.onDragMove(e)),[]),l=(0,_.useCallback)((e=>{i.current.onDragEnd&&i.current.onDragEnd(e),document.removeEventListener("mousemove",a),document.removeEventListener("mouseup",l),o(!1)}),[]),s=(0,_.useCallback)((e=>{i.current.onDragStart&&i.current.onDragStart(e),document.addEventListener("mousemove",a),document.addEventListener("mouseup",l),o(!0)}),[]);return(0,_.useEffect)((()=>()=>{r&&(document.removeEventListener("mousemove",a),document.removeEventListener("mouseup",l))}),[r]),{startDrag:s,endDrag:l,isDragging:r}}({onDragStart:e=>{(()=>{const e=r.current.getBoundingClientRect();o.current={x:e.x+e.width/2,y:e.y+e.height/2}})(),a(e)},onDragMove:a,onDragEnd:a});return(0,_.useEffect)((()=>{s?(void 0===i.current&&(i.current=document.body.style.cursor),document.body.style.cursor="grabbing"):(document.body.style.cursor=i.current||null,i.current=void 0)}),[s]),(0,_.createElement)(ZE,(0,nr.Z)({ref:r,onMouseDown:l,className:"components-angle-picker-control__angle-circle",style:s?{cursor:"grabbing"}:void 0},n),(0,_.createElement)(jE,{style:e?{transform:`rotate(${e}deg)`}:void 0,className:"components-angle-picker-control__angle-circle-indicator-wrapper"},(0,_.createElement)(UE,{className:"components-angle-picker-control__angle-circle-indicator"})))};function qE({className:e,hideLabelFromVision:t,id:n,label:r=U("Angle"),onChange:o,value:i,...a}){const l=Rb(qE,"components-angle-picker-control__input"),s=n||l,c=Cr()("components-angle-picker-control",e);return(0,_.createElement)(Hk,(0,nr.Z)({className:c,hideLabelFromVision:t,id:s,label:r},a),(0,_.createElement)(WE,null,(0,_.createElement)(HE,null,(0,_.createElement)(Jw,{className:"components-angle-picker-control__input-field",id:s,max:360,min:0,onChange:e=>{const t=""!==e?parseInt(e,10):0;o(t)},step:"1",value:i})),(0,_.createElement)(jb,null,(0,_.createElement)($E,{"aria-hidden":"true",value:i,onChange:o}))))}var GE=(0,_.createElement)(ko,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,_.createElement)(yo,{d:"M18 11.2h-5.2V6h-1.6v5.2H6v1.6h5.2V18h1.6v-5.2H18z"}));const KE={className:"components-custom-gradient-picker__color-picker-popover",position:"top"};function YE(e){return Math.max(0,Math.min(100,e))}function XE(e,t,n){const r=e.slice();return r[t]=n,r}function JE(e,t,n){return function(e,t,n,r=0){const o=e[t].position,i=Math.min(o,n),a=Math.max(o,n);return e.some((({position:e},o)=>o!==t&&(Math.abs(e-n)<r||i<e&&e<a)))}(e,t,n)?e:XE(e,t,{...e[t],position:n})}function QE(e,t,n){return XE(e,t,{...e[t],color:n})}function e_(e,t,n){if(!t)return;const{x:r,width:o}=t.getBoundingClientRect(),i=e-r-5-n/2,a=o-5-23;return Math.round(YE(100*i/a))}function t_({value:e,onChange:t,children:n}){const r={right(n){n.stopPropagation();const r=YE(e+10);t(r)},left(n){n.stopPropagation();const r=YE(e-10);t(r)}};return(0,_.createElement)(kE,{shortcuts:r},n)}function n_({isOpen:e,position:t,color:n,onChange:r,...o}){const i=`components-custom-gradient-picker__control-point-button-description-${Rb(n_)}`;return(0,_.createElement)(t_,{value:t,onChange:r},(0,_.createElement)(Gi,(0,nr.Z)({"aria-label":L(U("Gradient control point at position %1$s%% with color code %2$s."),t,n),"aria-describedby":i,"aria-haspopup":"true","aria-expanded":e,className:Cr()("components-custom-gradient-picker__control-point-button",{"is-active":e}),style:{left:`${t}%`}},o)),(0,_.createElement)($i,{id:i},U("Use your left or right arrow keys or drag and drop with the mouse to change the gradient position. Press the button to change the color or remove the control point.")))}function r_({disableRemove:e,disableAlpha:t,gradientPickerDomRef:n,ignoreMarkerPosition:r,value:o,onChange:i,onStartControlPointChange:a,onStopControlPointChange:l}){const s=(0,_.useRef)(),c=e=>{const t=e_(e.clientX,n.current,18),{initialPosition:r,index:a,significantMoveHappened:l}=s.current;!l&&Math.abs(r-t)>=5&&(s.current.significantMoveHappened=!0),i(JE(o,a,t))},u=()=>{window&&window.removeEventListener&&s.current&&s.current.listenersActivated&&(window.removeEventListener("mousemove",c),window.removeEventListener("mouseup",u),l(),s.current.listenersActivated=!1)};return(0,_.useEffect)((()=>()=>{u()}),[]),o.map(((n,d)=>{const p=null==n?void 0:n.position;return r!==p&&(0,_.createElement)(Cp,{key:d,onClose:l,renderToggle:({isOpen:e,onToggle:t})=>(0,_.createElement)(n_,{key:d,onClick:()=>{s.current&&s.current.significantMoveHappened||(e?l():a(),t())},onMouseDown:()=>{window&&window.addEventListener&&(s.current={initialPosition:p,index:d,significantMoveHappened:!1,listenersActivated:!0},a(),window.addEventListener("mousemove",c),window.addEventListener("mouseup",u))},isOpen:e,position:n.position,color:n.color,onChange:e=>{i(JE(o,d,e))}}),renderContent:({onClose:r})=>(0,_.createElement)(_.Fragment,null,(0,_.createElement)(ME,{disableAlpha:t,color:n.color,onChangeComplete:({color:e})=>{i(QE(o,d,e.toRgbString()))}}),!e&&(0,_.createElement)(Gi,{className:"components-custom-gradient-picker__remove-control-point",onClick:()=>{i(function(e,t){return e.filter(((e,n)=>n!==t))}(o,d)),r()},variant:"link"},U("Remove Control Point"))),popoverProps:KE})}))}r_.InsertPoint=function({value:e,onChange:t,onOpenInserter:n,onCloseInserter:r,insertPosition:o,disableAlpha:i}){const[a,l]=(0,_.useState)(!1);return(0,_.createElement)(Cp,{className:"components-custom-gradient-picker__inserter",onClose:()=>{r()},renderToggle:({isOpen:e,onToggle:t})=>(0,_.createElement)(Gi,{"aria-expanded":e,"aria-haspopup":"true",onClick:()=>{e?r():(l(!1),n()),t()},className:"components-custom-gradient-picker__insert-point",icon:GE,style:{left:null!==o?`${o}%`:void 0}}),renderContent:()=>(0,_.createElement)(ME,{disableAlpha:i,onChangeComplete:({color:n})=>{a?t(function(e,t,n){const r=e.findIndex((e=>e.position===t));return QE(e,r,n)}(e,o,n.toRgbString())):(t(function(e,t,n){const r=e.findIndex((e=>e.position>t)),o={color:n,position:t},i=e.slice();return i.splice(r-1,0,o),i}(e,o,n.toRgbString())),l(!0))}}),popoverProps:KE})};var o_=r_;function i_(e,t){switch(t.type){case"MOVE_INSERTER":if("IDLE"===e.id||"MOVING_INSERTER"===e.id)return{id:"MOVING_INSERTER",insertPosition:t.insertPosition};break;case"STOP_INSERTER_MOVE":if("MOVING_INSERTER"===e.id)return{id:"IDLE"};break;case"OPEN_INSERTER":if("MOVING_INSERTER"===e.id)return{id:"INSERTING_CONTROL_POINT",insertPosition:e.insertPosition};break;case"CLOSE_INSERTER":if("INSERTING_CONTROL_POINT"===e.id)return{id:"IDLE"};break;case"START_CONTROL_CHANGE":if("IDLE"===e.id)return{id:"MOVING_CONTROL_POINT"};break;case"STOP_CONTROL_CHANGE":if("MOVING_CONTROL_POINT"===e.id)return{id:"IDLE"}}return e}const a_={id:"IDLE"};function l_({background:e,hasGradient:t,value:n,onChange:r,disableInserter:o=!1,disableAlpha:i=!1}){const a=(0,_.useRef)(),[l,s]=(0,_.useReducer)(i_,a_),c=e=>{const t=e_(e.clientX,a.current,23);(0,Ce.some)(n,(({position:e})=>Math.abs(t-e)<10))?"MOVING_INSERTER"===l.id&&s({type:"STOP_INSERTER_MOVE"}):s({type:"MOVE_INSERTER",insertPosition:t})},u="MOVING_INSERTER"===l.id,d="INSERTING_CONTROL_POINT"===l.id;return(0,_.createElement)("div",{ref:a,className:Cr()("components-custom-gradient-picker__gradient-bar",{"has-gradient":t}),onMouseEnter:c,onMouseMove:c,style:{background:e},onMouseLeave:()=>{s({type:"STOP_INSERTER_MOVE"})}},(0,_.createElement)("div",{className:"components-custom-gradient-picker__markers-container"},!o&&(u||d)&&(0,_.createElement)(o_.InsertPoint,{disableAlpha:i,insertPosition:l.insertPosition,value:n,onChange:r,onOpenInserter:()=>{s({type:"OPEN_INSERTER"})},onCloseInserter:()=>{s({type:"CLOSE_INSERTER"})}}),(0,_.createElement)(o_,{disableAlpha:i,disableRemove:o,gradientPickerDomRef:a,ignoreMarkerPosition:d?l.insertPosition:void 0,value:n,onChange:r,onStartControlPointChange:()=>{s({type:"START_CONTROL_CHANGE"})},onStopControlPointChange:()=>{s({type:"STOP_CONTROL_CHANGE"})}})))}const s_=Zi("select",{target:"e1mv6sxx1"})("&&&{appearance:none;background:transparent;box-sizing:border-box;border:none;box-shadow:none!important;color:",Nb.black,";display:block;margin:0;width:100%;",(({disabled:e})=>e?(0,pb.iv)({color:Nb.ui.textDisabled},"",""):""),";",(({selectSize:e})=>{const t={default:"13px",small:"11px"}[e];return t?(0,pb.iv)("font-size:","16px",";@media ( min-width: 600px ){font-size:",t,";}",""):""}),";",(({selectSize:e})=>{const t={default:{height:30,lineHeight:1,minHeight:30},small:{height:24,lineHeight:1,minHeight:24}},n=t[e]||t.default;return(0,pb.iv)(n,"","")}),";",vb({paddingLeft:8,paddingRight:24}),";}"),c_=Zi("div",{target:"e1mv6sxx0"})("align-items:center;bottom:0;box-sizing:border-box;display:flex;padding:0 4px;pointer-events:none;position:absolute;top:0;",vb({right:0})," svg{display:block;}");var u_=(0,_.forwardRef)((function e({className:t,disabled:n=!1,help:r,hideLabelFromVision:o,id:i,label:a,multiple:l=!1,onBlur:s=Ce.noop,onChange:c=Ce.noop,onFocus:u=Ce.noop,options:d=[],size:p="default",value:m,labelPosition:f="top",prefix:h,suffix:g,...v},b){const[y,w]=(0,_.useState)(!1),k=function(t){const n=Rb(e);return t||`inspector-select-control-${n}`}(i),E=r?`${k}__help`:void 0;if((0,Ce.isEmpty)(d))return null;const C=Cr()("components-select-control",t);return(0,_.createElement)(Hk,{help:r,id:k},(0,_.createElement)(Py,{className:C,disabled:n,hideLabelFromVision:o,id:k,isFocused:y,label:a,size:p,suffix:g||(0,_.createElement)(c_,null,(0,_.createElement)(dk,{icon:Kk,size:18})),prefix:h,labelPosition:f},(0,_.createElement)(s_,(0,nr.Z)({},v,{"aria-describedby":E,className:"components-select-control__input",disabled:n,id:k,multiple:l,onBlur:e=>{s(e),w(!1)},onChange:e=>{if(l){const t=Array.from(e.target.options).filter((({selected:e})=>e)).map((({value:e})=>e));c(t)}else c(e.target.value,{event:e})},onFocus:e=>{u(e),w(!0)},ref:b,selectSize:p,value:m}),d.map(((e,t)=>{const n=e.id||`${e.label}-${e.value}-${t}`;return(0,_.createElement)("option",{key:n,value:e.value,disabled:e.disabled},e.label)})))))})),d_=n(49948);const p_="linear-gradient(135deg, rgba(6, 147, 227, 1) 0%, rgb(155, 81, 224) 100%)",m_={type:"angular",value:90},f_=[{value:"linear-gradient",label:U("Linear")},{value:"radial-gradient",label:U("Radial")}],h_={top:0,"top right":45,"right top":45,right:90,"right bottom":135,"bottom right":135,bottom:180,"bottom left":225,"left bottom":225,left:270,"top left":315,"left top":315};function g_({type:e,value:t,length:n}){return`${function({type:e,value:t}){return"literal"===e?t:"hex"===e?`#${t}`:`${e}(${t.join(",")})`}({type:e,value:t})} ${function(e){if(!e)return"";const{value:t,type:n}=e;return`${t}${n}`}(n)}`}function v_({type:e,orientation:t,colorStops:n}){const r=function(e){if(e&&"angular"===e.type)return`${e.value}deg`}(t),o=n.sort(((e,t)=>(0,Ce.get)(e,["length","value"],0)-(0,Ce.get)(t,["length","value"],0))).map(g_);return`${e}(${(0,Ce.compact)([r,...o]).join(",")})`}function b_(e){return void 0===e.length||"%"!==e.length.type}function y_(e){switch(e.type){case"hex":return`#${e.value}`;case"literal":return e.value;case"rgb":case"rgba":return`${e.type}(${e.value.join(",")})`;default:return"transparent"}}const w_=Zi(HE,{target:"e99xvul1"})({name:"1gvx10y",styles:"flex-grow:5"}),k_=Zi(HE,{target:"e99xvul0"})({name:"aco78w",styles:"flex-grow:4"}),E_=({gradientAST:e,hasGradient:t,onChange:n})=>{const r=(0,Ce.get)(e,["orientation","value"],180);return(0,_.createElement)(qE,{hideLabelFromVision:!0,onChange:t=>{n(v_({...e,orientation:{type:"angular",value:t}}))},value:t?r:""})},__=({gradientAST:e,hasGradient:t,onChange:n})=>{const{type:r}=e;return(0,_.createElement)(u_,{className:"components-custom-gradient-picker__type-picker",label:U("Type"),labelPosition:"side",onChange:t=>{"linear-gradient"===t&&n(v_({...e,...e.orientation?{}:{orientation:m_},type:"linear-gradient"})),"radial-gradient"===t&&n(v_({...(0,Ce.omit)(e,["orientation"]),type:"radial-gradient"}))},options:f_,value:t&&r})};function C_({value:e,onChange:t}){const n=function(e){var t;let n;try{n=d_.parse(e)[0],n.value=e}catch(e){n=d_.parse(p_)[0],n.value=p_}if("directional"===(null===(t=n.orientation)||void 0===t?void 0:t.type)&&(n.orientation.type="angular",n.orientation.value=h_[n.orientation.value].toString()),n.colorStops.some(b_)){const{colorStops:e}=n,t=100/(e.length-1);e.forEach(((e,n)=>{e.length={value:t*n,type:"%"}})),n.value=v_(n)}return n}(e),r="radial-gradient"===n.type?function(e){return v_({type:"linear-gradient",orientation:m_,colorStops:e.colorStops})}(n):n.value,o=n.value!==p_,i=n.colorStops.map((e=>({color:y_(e),position:parseInt(e.length.value)})));return(0,_.createElement)("div",{className:"components-custom-gradient-picker"},(0,_.createElement)(l_,{background:r,hasGradient:o,value:i,onChange:e=>{t(v_(function(e,t){return{...e,colorStops:t.map((({position:e,color:t})=>{const{r:n,g:r,b:o,a:i}=wl()(t).toRgb();return{length:{type:"%",value:e.toString()},type:i<1?"rgba":"rgb",value:i<1?[n,r,o,i]:[n,r,o]}}))}}(n,e)))}}),(0,_.createElement)(Vb,{gap:3,className:"components-custom-gradient-picker__ui-line"},(0,_.createElement)(w_,null,(0,_.createElement)(__,{gradientAST:n,hasGradient:o,onChange:t})),(0,_.createElement)(k_,null,"linear-gradient"===n.type&&(0,_.createElement)(E_,{gradientAST:n,hasGradient:o,onChange:t}))))}function x_({className:e,gradients:t,onChange:n,value:r,clearable:o=!0,disableCustomGradients:i=!1}){const a=(0,_.useCallback)((()=>n(void 0)),[n]),l=(0,_.useMemo)((()=>(0,Ce.map)(t,(({gradient:e,name:t})=>(0,_.createElement)(FE.Option,{key:e,value:e,isSelected:r===e,tooltipText:t||L(U("Gradient code: %s"),e),style:{color:"rgba( 0,0,0,0 )",background:e},onClick:r===e?a:()=>n(e),"aria-label":t?L(U("Gradient: %s"),t):L(U("Gradient code: %s"),e)})))),[t,r,n,a]);return(0,_.createElement)(FE,{className:e,options:l,actions:o&&(0,_.createElement)(FE.ButtonAction,{onClick:a},U("Clear"))},!i&&(0,_.createElement)(C_,{value:r,onChange:n}))}const S_=(e,t,n)=>{if(t){const n=(0,Ce.find)(e,{slug:t});if(n)return n}return{color:n}},I_=(e,t)=>(0,Ce.find)(e,{color:t});function T_(e,t){if(e&&t)return`has-${(0,Ce.kebabCase)(t)}-${e}`}function N_(e,t){return(0,Ce.find)(e,["gradient",t])}const A_=U("(Color: %s)"),R_=U("(Gradient: %s)"),L_=["colors","disableCustomColors","gradients","disableCustomGradients"];function P_({colors:e,gradients:t,label:n,currentTab:r,colorValue:o,gradientValue:i}){let a,l;if("color"===r){if(o){a=o;const t=I_(e,a),n=t&&t.name;l=L(A_,n||a)}}else if("gradient"===r&&i){a=i;const e=N_(t,a),n=e&&e.name;l=L(R_,n||a)}return(0,_.createElement)(_.Fragment,null,n,!!a&&(0,_.createElement)(dE,{colorValue:a,"aria-label":l}))}function O_({colors:e,gradients:t,disableCustomColors:n,disableCustomGradients:r,className:o,label:i,onColorChange:a,onGradientChange:l,colorValue:s,gradientValue:c,clearable:u}){const d=a&&(!(0,Ce.isEmpty)(e)||!n),p=l&&(!(0,Ce.isEmpty)(t)||!r),[m,f]=(0,_.useState)(c?"gradient":!!d&&"color");return d||p?(0,_.createElement)(Hk,{className:Cr()("block-editor-color-gradient-control",o)},(0,_.createElement)("fieldset",null,(0,_.createElement)("legend",null,(0,_.createElement)("div",{className:"block-editor-color-gradient-control__color-indicator"},(0,_.createElement)(Hk.VisualLabel,null,(0,_.createElement)(P_,{currentTab:m,label:i,colorValue:s,gradientValue:c})))),d&&p&&(0,_.createElement)(pE,{className:"block-editor-color-gradient-control__button-tabs"},(0,_.createElement)(Gi,{isSmall:!0,isPressed:"color"===m,onClick:()=>f("color")},U("Solid")),(0,_.createElement)(Gi,{isSmall:!0,isPressed:"gradient"===m,onClick:()=>f("gradient")},U("Gradient"))),("color"===m||!p)&&(0,_.createElement)(zE,{value:s,onChange:p?e=>{a(e),l()}:a,colors:e,disableCustomColors:n,clearable:u}),("gradient"===m||!d)&&(0,_.createElement)(x_,{value:c,onChange:d?e=>{l(e),a()}:l,gradients:t,disableCustomGradients:r,clearable:u}))):null}function D_(e){const t={};return t.colors=fk("color.palette"),t.gradients=fk("color.gradients"),t.disableCustomColors=!fk("color.custom"),t.disableCustomGradients=!fk("color.customGradient"),(0,_.createElement)(O_,(0,nr.Z)({},t,e))}var M_=function(e){return(0,Ce.every)(L_,(t=>e.hasOwnProperty(t)))?(0,_.createElement)(O_,e):(0,_.createElement)(D_,e)};const B_=e=>{if(!(0,Ce.isObject)(e)||Array.isArray(e))return e;const t=(0,Ce.pickBy)((0,Ce.mapValues)(e,B_),Ce.identity);return(0,Ce.isEmpty)(t)?void 0:t},F_=[];function z_(e){var t;const{attributes:{borderColor:n,style:r},setAttributes:o}=e,i=fk("color.palette")||F_,a=!fk("color.custom"),l=!fk("color.customGradient");return(0,_.createElement)(M_,{label:U("Color"),value:n||(null==r||null===(t=r.border)||void 0===t?void 0:t.color),colors:i,gradients:void 0,disableCustomColors:a,disableCustomGradients:l,onColorChange:e=>{const t=I_(i,e),n={...r,border:{...null==r?void 0:r.border,color:null!=t&&t.slug?void 0:e}},a=null!=t&&t.slug?t.slug:void 0;o({style:B_(n),borderColor:a})}})}function H_(e,t,n){var r;if(!zC(t,"color")||HC(t))return e;const{borderColor:o,style:i}=n,a=T_("border-color",o),l=Cr()(e.className,{"has-border-color":o||(null==i||null===(r=i.border)||void 0===r?void 0:r.color),[a]:!!a});return e.className=l||void 0,e}const V_=Ea((e=>t=>{var n,r;const{name:o,attributes:i}=t,{borderColor:a}=i,l=fk("color.palette")||F_;if(!zC(o,"color")||HC(o))return(0,_.createElement)(e,t);const s={borderColor:a?null===(n=S_(l,a))||void 0===n?void 0:n.color:void 0};let c=t.wrapperProps;return c={...t.wrapperProps,style:{...s,...null===(r=t.wrapperProps)||void 0===r?void 0:r.style}},(0,_.createElement)(e,(0,nr.Z)({},t,{wrapperProps:c}))}));function W_(e,t,n){return"number"!=typeof e?null:parseFloat((0,Ce.clamp)(e,t,n))}(0,W.KJ)("blocks.registerBlockType","core/border/addAttributes",(function(e){return zC(e,"color")?e.attributes.borderColor?e:{...e,attributes:{...e.attributes,borderColor:{type:"string"}}}:e})),(0,W.KJ)("blocks.getSaveContent.extraProps","core/border/addSaveProps",H_),(0,W.KJ)("blocks.registerBlockType","core/border/addEditProps",(function(e){if(!zC(e,"color")||HC(e))return e;const t=e.getEditWrapperProps;return e.getEditWrapperProps=n=>{let r={};return t&&(r=t(n)),H_(r,e,n)},e})),(0,W.KJ)("editor.BlockListBlock","core/border/with-border-color-palette-styles",V_);var Z_={name:"b1qlpp",styles:"height:30px;min-height:30px"};const j_=()=>Z_,U_=Zi("div",{target:"exqw8y214"})({name:"17z6zai",styles:"-webkit-tap-highlight-color:transparent;box-sizing:border-box;align-items:flex-start;display:inline-flex;justify-content:flex-start;padding:0;position:relative;touch-action:none;width:100%"}),$_=Zi("div",{target:"exqw8y213"})("box-sizing:border-box;color:",Nb.blue.medium.focus,";display:block;flex:1;padding-top:18px;position:relative;width:100%;",(({color:e=Nb.ui.borderFocus})=>(0,pb.iv)({color:e},"","")),";",j_,";",(({marks:e})=>(0,pb.iv)({marginBottom:e?16:null},"","")),";"),q_=Zi("span",{target:"exqw8y212"})("margin-top:3px;",vb({marginRight:6}),";"),G_=Zi("span",{target:"exqw8y211"})("margin-top:3px;",vb({marginLeft:16}),";"),K_=Zi("span",{target:"exqw8y210"})("background-color:",Nb.lightGray[600],";box-sizing:border-box;left:0;pointer-events:none;right:0;display:block;height:3px;position:absolute;margin-top:14px;top:0;border-radius:9999px;",(({disabled:e,railColor:t})=>{let n=t||null;return e&&(n=Nb.lightGray[400]),(0,pb.iv)({background:n},"","")}),";"),Y_=Zi("span",{target:"exqw8y29"})("background-color:currentColor;border-radius:9999px;box-sizing:border-box;height:3px;pointer-events:none;display:block;position:absolute;margin-top:14px;top:0;",(({disabled:e,trackColor:t})=>{let n=t||"currentColor";return e&&(n=Nb.lightGray[800]),(0,pb.iv)({background:n},"","")}),";"),X_=Zi("span",{target:"exqw8y28"})({name:"1xuuvmv",styles:"box-sizing:border-box;display:block;pointer-events:none;position:relative;width:100%;user-select:none"}),J_=Zi("span",{target:"exqw8y27"})("box-sizing:border-box;height:9px;left:0;position:absolute;top:-4px;width:1px;",(({disabled:e,isFilled:t})=>{let n=t?"currentColor":Nb.lightGray[600];return e&&(n=Nb.lightGray[800]),(0,pb.iv)({backgroundColor:n},"","")}),";"),Q_=Zi("span",{target:"exqw8y26"})("box-sizing:border-box;color:",Nb.lightGray[600],";left:0;font-size:11px;position:absolute;top:12px;transform:translateX( -50% );white-space:nowrap;",(({isFilled:e})=>(0,pb.iv)({color:e?Nb.darkGray[300]:Nb.lightGray[600]},"","")),";");var eC={name:"1sb75b3",styles:"background-color:var( --wp-admin-theme-color )"};const tC=({disabled:e})=>e?(0,pb.iv)("background-color:",Nb.lightGray[800],";",""):eC,nC=Zi("span",{target:"exqw8y25"})("align-items:center;box-sizing:border-box;display:flex;height:",12,"px;justify-content:center;margin-top:9px;outline:0;pointer-events:none;position:absolute;top:0;user-select:none;width:",12,"px;border-radius:50%;transform:translateX( 4.5px );",tC,";",vb({marginLeft:-10}),";"),rC=Zi("span",{target:"exqw8y24"})("align-items:center;border-radius:50%;box-sizing:border-box;height:100%;outline:0;position:absolute;user-select:none;width:100%;",tC,";",(({isFocused:e})=>e?(0,pb.iv)("&::before{content:' ';position:absolute;background-color:transparent;box-shadow:0 0 0 1.5px var( --wp-admin-theme-color );border-radius:50%;height:",16,"px;width:",16,"px;top:-2px;left:-2px;}",""):""),";"),oC=Zi("input",{target:"exqw8y23"})("box-sizing:border-box;cursor:pointer;display:block;height:100%;left:0;margin:0 -",6,"px;opacity:0;outline:none;position:absolute;right:0;top:0;width:calc( 100% + ",12,"px );");var iC={name:"1lr98c4",styles:"bottom:-80%"},aC={name:"1cypxip",styles:"top:-80%"};const lC=Zi("span",{target:"exqw8y22"})("background:",Nb.ui.border,";border-radius:2px;box-sizing:border-box;color:white;display:inline-block;font-size:12px;min-width:32px;opacity:0;padding:4px 8px;pointer-events:none;position:absolute;text-align:center;transition:opacity 120ms ease;user-select:none;line-height:1.4;",(({show:e})=>(0,pb.iv)({opacity:e?1:0},"","")),";",(({position:e})=>"top"===e?aC:iC),";",function(e="transition"){let t;switch(e){case"transition":t="transition-duration: 0ms;";break;case"animation":t="animation-duration: 1ms;";break;default:t="\n\t\t\t\tanimation-duration: 1ms;\n\t\t\t\ttransition-duration: 0ms;\n\t\t\t"}return`\n\t\t@media ( prefers-reduced-motion: reduce ) {\n\t\t\t${t};\n\t\t}\n\t`}("transition"),";",vb({transform:"translateX(-50%)"},{transform:"translateX(50%)"}),";"),sC=Zi(Jw,{target:"exqw8y21"})("box-sizing:border-box;display:inline-block;font-size:13px;margin-top:0;width:",Pb(16),"!important;input[type='number']&{",j_,";}",vb({marginLeft:`${Pb(4)} !important`}),";"),cC=Zi("span",{target:"exqw8y20"})("box-sizing:border-box;display:block;margin-top:0;button,button.is-small{margin-left:0;",j_,";}",vb({marginLeft:8}),";");var uC=(0,_.forwardRef)((function({describedBy:e,isShiftStepEnabled:t=!0,label:n,onHideTooltip:r=Ce.noop,onMouseLeave:o=Ce.noop,step:i=1,onBlur:a=Ce.noop,onChange:l=Ce.noop,onFocus:s=Ce.noop,onMouseMove:c=Ce.noop,onShowTooltip:u=Ce.noop,shiftStep:d=10,value:p,...m},f){const h=Xw({step:i,shiftStep:d,isShiftStepEnabled:t}),g=function({onHide:e=Ce.noop,onMouseLeave:t=Ce.noop,onMouseMove:n=Ce.noop,onShow:r=Ce.noop,timeout:o=300}){const[i,a]=(0,_.useState)(!1),l=(0,_.useRef)(),s=(0,_.useCallback)((e=>{window.clearTimeout(l.current),l.current=setTimeout(e,o)}),[o]),c=(0,_.useCallback)((e=>{n(e),s((()=>{i||(a(!0),r())}))}),[]),u=(0,_.useCallback)((n=>{t(n),s((()=>{a(!1),e()}))}),[]);return(0,_.useEffect)((()=>()=>{window.clearTimeout(l.current)})),{onMouseMove:c,onMouseLeave:u}}({onHide:r,onMouseLeave:o,onMouseMove:c,onShow:u});return(0,_.createElement)(oC,(0,nr.Z)({},m,g,{"aria-describedby":e,"aria-label":n,"aria-hidden":!1,onBlur:a,onChange:l,onFocus:s,ref:f,step:h,tabIndex:0,type:"range",value:p}))}));function dC({className:e,isFilled:t=!1,label:n,style:r={},...o}){const i=Cr()("components-range-control__mark",t&&"is-filled",e),a=Cr()("components-range-control__mark-label",t&&"is-filled");return(0,_.createElement)(_.Fragment,null,(0,_.createElement)(J_,(0,nr.Z)({},o,{"aria-hidden":"true",className:i,isFilled:t,style:r})),n&&(0,_.createElement)(Q_,{"aria-hidden":"true",className:a,isFilled:t,style:r},n))}function pC({disabled:e=!1,marks:t=!1,min:n=0,max:r=100,step:o=1,value:i=0,...a}){return(0,_.createElement)(_.Fragment,null,(0,_.createElement)(K_,(0,nr.Z)({disabled:e},a)),t&&(0,_.createElement)(mC,{disabled:e,marks:t,min:n,max:r,step:o,value:i}))}function mC({disabled:e=!1,marks:t=!1,min:n=0,max:r=100,step:o=1,value:i=0}){const a=function({marks:e,min:t=0,max:n=100,step:r=1,value:o=0}){if(!e)return[];const i=n-t;if(!Array.isArray(e)){e=[];const n=1+Math.round(i/r);for(;n>e.push({value:r*e.length+t}););}const a=[];return e.forEach(((e,r)=>{if(e.value<t||e.value>n)return;const l=`mark-${r}`,s=e.value<=o,c=(e.value-t)/i*100+"%",u={[G()?"right":"left"]:c};a.push({...e,isFilled:s,key:l,style:u})})),a}({marks:t,min:n,max:r,step:o,value:i});return(0,_.createElement)(X_,{"aria-hidden":"true",className:"components-range-control__marks"},a.map((t=>(0,_.createElement)(dC,(0,nr.Z)({},t,{key:t.key,"aria-hidden":"true",disabled:e})))))}function fC({className:e,inputRef:t,position:n="auto",show:r=!1,style:o={},value:i=0,renderTooltipContent:a=(e=>e),zIndex:l=100,...s}){const c=function({inputRef:e,position:t}){const[n,r]=(0,_.useState)("top"),o=(0,_.useCallback)((()=>{if(e&&e.current){let n=t;if("auto"===t){const{top:t}=e.current.getBoundingClientRect();n=t-32<0?"bottom":"top"}r(n)}}),[t]);return(0,_.useEffect)((()=>{o()}),[o]),(0,_.useEffect)((()=>(window.addEventListener("resize",o),()=>{window.removeEventListener("resize",o)}))),n}({inputRef:t,position:n}),u=Cr()("components-simple-tooltip",e),d={...o,zIndex:l};return(0,_.createElement)(lC,(0,nr.Z)({},s,{"aria-hidden":r,className:u,position:c,show:r,role:"tooltip",style:d}),a(i))}var hC=(0,_.forwardRef)((function e({afterIcon:t,allowReset:n=!1,beforeIcon:r,className:o,currentInput:i,color:a=Nb.ui.theme,disabled:l=!1,help:s,initialPosition:c,isShiftStepEnabled:u=!0,label:d,hideLabelFromVision:p=!1,marks:m=!1,max:f=100,min:h=0,onBlur:g=Ce.noop,onChange:v=Ce.noop,onFocus:b=Ce.noop,onMouseMove:y=Ce.noop,onMouseLeave:w=Ce.noop,railColor:k,resetFallbackValue:E,renderTooltipContent:C=(e=>e),showTooltip:x,shiftStep:S=10,step:I=1,trackColor:T,value:N,withInputField:A=!0,...R},L){var P;const[O,D]=function({min:e,max:t,value:n,initial:r}){const[o,i]=ck(W_(n,e,t),{initial:r,fallback:null});return[o,(0,_.useCallback)((n=>{i(null===n?null:W_(n,e,t))}),[e,t])]}({min:h,max:f,value:N,initial:c}),M=(0,_.useRef)(!1),[B,F]=(0,_.useState)(x),[z,H]=(0,_.useState)(!1),V=(0,_.useRef)(),W=null===(P=V.current)||void 0===P?void 0:P.matches(":focus"),Z=!l&&z,j=null===O,$=j?"":void 0!==O?O:i,q=j?(f-h)/2+h:O,K=j?50:(O-h)/(f-h)*100,Y=`${(0,Ce.clamp)(K,0,100)}%`,X=Cr()("components-range-control",o),J=Cr()("components-range-control__wrapper",!!m&&"is-marked"),Q=Rb(e,"inspector-range-control"),ee=s?`${Q}__help`:void 0,te=!1!==x&&(0,Ce.isFinite)(O),ne=()=>{let e=parseFloat(E),t=e;isNaN(e)&&(e=null,t=void 0),D(e),v(t)},re={[G()?"right":"left"]:Y};return(0,_.createElement)(Hk,{className:X,label:d,hideLabelFromVision:p,id:Q,help:s},(0,_.createElement)(U_,{className:"components-range-control__root"},r&&(0,_.createElement)(q_,null,(0,_.createElement)(Oo,{icon:r})),(0,_.createElement)($_,{className:J,color:a,marks:!!m},(0,_.createElement)(uC,(0,nr.Z)({},R,{className:"components-range-control__slider",describedBy:ee,disabled:l,id:Q,isShiftStepEnabled:u,label:d,max:f,min:h,onBlur:e=>{g(e),H(!1),F(!1)},onChange:e=>{const t=parseFloat(e.target.value);D(t),v(t)},onFocus:e=>{b(e),H(!0),F(!0)},onMouseMove:y,onMouseLeave:w,ref:e=>{V.current=e,L&&L(e)},shiftStep:S,step:I,value:$})),(0,_.createElement)(pC,{"aria-hidden":!0,disabled:l,marks:m,max:f,min:h,railColor:k,step:I,value:q}),(0,_.createElement)(Y_,{"aria-hidden":!0,className:"components-range-control__track",disabled:l,style:{width:Y},trackColor:T}),(0,_.createElement)(nC,{style:re,disabled:l},(0,_.createElement)(rC,{"aria-hidden":!0,isFocused:Z,disabled:l})),te&&(0,_.createElement)(fC,{className:"components-range-control__tooltip",inputRef:V,renderTooltipContent:C,show:W||B,style:re,value:O})),t&&(0,_.createElement)(G_,null,(0,_.createElement)(Oo,{icon:t})),A&&(0,_.createElement)(sC,{"aria-label":d,className:"components-range-control__number",disabled:l,inputMode:"decimal",isShiftStepEnabled:u,max:f,min:h,onBlur:()=>{M.current&&(ne(),M.current=!1)},onChange:e=>{e=parseFloat(e),D(e),isNaN(e)?n&&(M.current=!0):((e<h||e>f)&&(e=W_(e,h,f)),v(e),M.current=!1)},shiftStep:S,step:I,value:$}),n&&(0,_.createElement)(cC,null,(0,_.createElement)(Gi,{className:"components-range-control__reset",disabled:l||void 0===O,variant:"secondary",isSmall:!0,onClick:ne},U("Reset")))))}));function gC(e){return e.sort(((t,n)=>e.filter((e=>e===t)).length-e.filter((e=>e===n)).length)).pop()}function vC(e={}){if("string"==typeof e)return e;const t=Object.values(e).map((e=>Kv(e))),n=t.map((e=>e[0])),r=t.map((e=>e[1])),o=n.every((e=>e===n[0]))?n[0]:"",i=gC(r);return 0===o||o?`${o}${i}`:null}function bC(e={}){const t=vC(e);return isNaN(parseFloat(t))}function yC(e){return!!e&&("string"==typeof e||!!Object.values(e).filter((e=>!!e||0===e)).length)}function wC({onChange:e,values:t,...n}){const r=vC(t),o=yC(t)&&bC(t),i=o?U("Mixed"):null;return(0,_.createElement)(uk,(0,nr.Z)({},n,{"aria-label":U("Border radius"),disableUnits:o,isOnly:!0,value:r,onChange:e,placeholder:i}))}const kC={topLeft:U("Top left"),topRight:U("Top right"),bottomLeft:U("Bottom left"),bottomRight:U("Bottom right")};function EC({onChange:e,values:t,...n}){const r="string"!=typeof t?t:{topLeft:t,topRight:t,bottomLeft:t,bottomRight:t};return(0,_.createElement)("div",{className:"components-border-radius-control__input-controls-wrapper"},Object.entries(kC).map((([t,o])=>{return(0,_.createElement)(uk,(0,nr.Z)({},n,{key:t,"aria-label":o,value:r[t],onChange:(i=t,t=>{e&&e({...r,[i]:t||void 0})})}));var i})))}var _C=(0,_.createElement)(ko,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,_.createElement)(yo,{d:"M15.6 7.2H14v1.5h1.6c2 0 3.7 1.7 3.7 3.7s-1.7 3.7-3.7 3.7H14v1.5h1.6c2.8 0 5.2-2.3 5.2-5.2 0-2.9-2.3-5.2-5.2-5.2zM4.7 12.4c0-2 1.7-3.7 3.7-3.7H10V7.2H8.4c-2.9 0-5.2 2.3-5.2 5.2 0 2.9 2.3 5.2 5.2 5.2H10v-1.5H8.4c-2 0-3.7-1.7-3.7-3.7zm4.6.9h5.3v-1.5H9.3v1.5z"})),CC=(0,_.createElement)(ko,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,_.createElement)(yo,{d:"M15.6 7.3h-.7l1.6-3.5-.9-.4-3.9 8.5H9v1.5h2l-1.3 2.8H8.4c-2 0-3.7-1.7-3.7-3.7s1.7-3.7 3.7-3.7H10V7.3H8.4c-2.9 0-5.2 2.3-5.2 5.2 0 2.9 2.3 5.2 5.2 5.2H9l-1.4 3.2.9.4 5.7-12.5h1.4c2 0 3.7 1.7 3.7 3.7s-1.7 3.7-3.7 3.7H14v1.5h1.6c2.9 0 5.2-2.3 5.2-5.2 0-2.9-2.4-5.2-5.2-5.2z"}));function xC({isLinked:e,...t}){const n=U(e?"Unlink Radii":"Link Radii");return(0,_.createElement)(Lo,{text:n},(0,_.createElement)(Gi,(0,nr.Z)({},t,{className:"component-border-radius-control__linked-button",isPrimary:e,isSecondary:!e,isSmall:!0,icon:e?_C:CC,iconSize:16,"aria-label":n})))}const SC={topLeft:null,topRight:null,bottomLeft:null,bottomRight:null},IC={px:100,em:20,rem:20};function TC({onChange:e,values:t}){const[n,r]=(0,_.useState)(!yC(t)||!bC(t)),o=Xv({availableUnits:fk("spacing.units")||["px","em","rem"]}),i=function(e={}){if("string"==typeof e){const[,t]=Kv(e);return t||"px"}return gC(Object.values(e).map((e=>{const[,t]=Kv(e);return t})))}(t),a=o&&o.find((e=>e.value===i)),l=(null==a?void 0:a.step)||1,[s]=Kv(vC(t));return(0,_.createElement)("fieldset",{className:"components-border-radius-control"},(0,_.createElement)("legend",null,U("Radius")),(0,_.createElement)("div",{className:"components-border-radius-control__wrapper"},n?(0,_.createElement)(_.Fragment,null,(0,_.createElement)(wC,{className:"components-border-radius-control__unit-control",values:t,min:0,onChange:e,unit:i,units:o}),(0,_.createElement)(hC,{className:"components-border-radius-control__range-control",value:s,min:0,max:IC[i],initialPosition:0,withInputField:!1,onChange:t=>{e(void 0!==t?`${t}${i}`:void 0)},step:l})):(0,_.createElement)(EC,{min:0,onChange:e,values:t||SC,units:o}),(0,_.createElement)(xC,{onClick:()=>r(!n),isLinked:n})))}function NC(e){var t;const{attributes:{style:n},setAttributes:r}=e;return(0,_.createElement)(TC,{values:null==n||null===(t=n.border)||void 0===t?void 0:t.radius,onChange:e=>{let t={...n,border:{...null==n?void 0:n.border,radius:e}};void 0!==e&&""!==e||(t=B_(t)),r({style:t})}})}var AC=(0,_.createElement)(ko,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none"},(0,_.createElement)(yo,{d:"M5 11.25h14v1.5H5z"})),RC=(0,_.createElement)(ko,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none"},(0,_.createElement)(yo,{fillRule:"evenodd",d:"M5 11.25h3v1.5H5v-1.5zm5.5 0h3v1.5h-3v-1.5zm8.5 0h-3v1.5h3v-1.5z",clipRule:"evenodd"})),LC=(0,_.createElement)(ko,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none"},(0,_.createElement)(yo,{fillRule:"evenodd",d:"M5.25 11.25h1.5v1.5h-1.5v-1.5zm3 0h1.5v1.5h-1.5v-1.5zm4.5 0h-1.5v1.5h1.5v-1.5zm1.5 0h1.5v1.5h-1.5v-1.5zm4.5 0h-1.5v1.5h1.5v-1.5z",clipRule:"evenodd"}));const PC=[{label:U("Solid"),icon:AC,value:"solid"},{label:U("Dashed"),icon:RC,value:"dashed"},{label:U("Dotted"),icon:LC,value:"dotted"}];function OC({onChange:e,value:t}){return(0,_.createElement)("fieldset",{className:"components-border-style-control"},(0,_.createElement)("legend",null,U("Style")),(0,_.createElement)("div",{className:"components-border-style-control__buttons"},PC.map((n=>(0,_.createElement)(Gi,{key:n.value,icon:n.icon,isSmall:!0,isPressed:n.value===t,onClick:()=>e(n.value===t?void 0:n.value),"aria-label":n.label})))))}const DC=e=>{var t;const{attributes:{style:n},setAttributes:r}=e;return(0,_.createElement)(OC,{value:null==n||null===(t=n.border)||void 0===t?void 0:t.style,onChange:e=>{const t={...n,border:{...null==n?void 0:n.border,style:e}};r({style:B_(t)})}})},MC=e=>{const{attributes:{borderColor:t,style:n},setAttributes:r}=e,{width:o,color:i,style:a}=(null==n?void 0:n.border)||{},[l,s]=(0,_.useState)(),[c,u]=(0,_.useState)();(0,_.useEffect)((()=>{"none"!==a&&s(a)}),[a]),(0,_.useEffect)((()=>{(t||i)&&u({name:t||void 0,color:i||void 0})}),[t,i]);const d=Xv({availableUnits:fk("spacing.units")||["px","em","rem"]});return(0,_.createElement)(uk,{value:o,label:U("Width"),min:0,onChange:e=>{let o={...n,border:{...null==n?void 0:n.border,width:e}},i=t;const s=0===parseFloat(e);s&&(i=void 0,o.border.color=void 0,o.border.style="none"),s||"none"!==a||(o.border.style=l),s||void 0!==t||(i=null==c?void 0:c.name,o.border.color=null==c?void 0:c.color),void 0!==e&&""!==e||(o=B_(o)),r({borderColor:i,style:o})},units:d})},BC="__experimentalBorder";function FC(e){const t=VC(e),n=zC(e.name),r=fk("border.customColor")&&zC(e.name,"color"),o=fk("border.customRadius")&&zC(e.name,"radius"),i=fk("border.customStyle")&&zC(e.name,"style"),a=fk("border.customWidth")&&zC(e.name,"width");return t||!n?null:(0,_.createElement)(lE,null,(0,_.createElement)(Jk,{className:"block-editor-hooks__border-controls",title:U("Border"),initialOpen:!1},(a||i)&&(0,_.createElement)("div",{className:"block-editor-hooks__border-controls-row"},a&&(0,_.createElement)(MC,e),i&&(0,_.createElement)(DC,e)),r&&(0,_.createElement)(z_,e),o&&(0,_.createElement)(NC,e)))}function zC(e,t="any"){if("web"!==Jp)return!1;const n=Vl(e,BC);return!!(!0===n||("any"===t?null!=n&&n.color||null!=n&&n.radius||null!=n&&n.width||null!=n&&n.style:null!=n&&n[t]))}function HC(e){const t=Vl(e,BC);return null==t?void 0:t.__experimentalSkipSerialization}const VC=()=>[!fk("border.customColor"),!fk("border.customRadius"),!fk("border.customStyle"),!fk("border.customWidth")].every(Boolean),WC=U("(%s: color %s)"),ZC=U("(%s: gradient %s)"),jC=["colors","disableCustomColors","gradients","disableCustomGradients"],UC=({colors:e,gradients:t,settings:n})=>n.map((({colorValue:n,gradientValue:r,label:o,colors:i,gradients:a},l)=>{if(!n&&!r)return null;let s;if(n){const t=I_(i||e,n);s=L(WC,o.toLowerCase(),t&&t.name||n)}else{const e=N_(a||t,n);s=L(ZC,o.toLowerCase(),e&&e.name||r)}return(0,_.createElement)(dE,{key:l,colorValue:n||r,"aria-label":s})})),$C=({className:e,colors:t,gradients:n,disableCustomColors:r,disableCustomGradients:o,children:i,settings:a,title:l,...s})=>{if((0,Ce.isEmpty)(t)&&(0,Ce.isEmpty)(n)&&r&&o&&(0,Ce.every)(a,(e=>(0,Ce.isEmpty)(e.colors)&&(0,Ce.isEmpty)(e.gradients)&&(void 0===e.disableCustomColors||e.disableCustomColors)&&(void 0===e.disableCustomGradients||e.disableCustomGradients))))return null;const c=(0,_.createElement)("span",{className:"block-editor-panel-color-gradient-settings__panel-title"},l,(0,_.createElement)(UC,{colors:t,gradients:n,settings:a}));return(0,_.createElement)(Jk,(0,nr.Z)({className:Cr()("block-editor-panel-color-gradient-settings",e),title:c},s),a.map(((e,i)=>(0,_.createElement)(M_,(0,nr.Z)({key:i,colors:t,gradients:n,disableCustomColors:r,disableCustomGradients:o},e)))),i)},qC=e=>{const t={};return t.colors=fk("color.palette"),t.gradients=fk("color.gradients"),t.disableCustomColors=!fk("color.custom"),t.disableCustomGradients=!fk("color.customGradient"),(0,_.createElement)($C,(0,nr.Z)({},t,e))};var GC=e=>(0,Ce.every)(jC,(t=>e.hasOwnProperty(t)))?(0,_.createElement)($C,e):(0,_.createElement)(qC,e);function KC(e){switch(e){case"success":case"warning":case"info":return"polite";case"error":default:return"assertive"}}var YC=function({className:e,status:t="info",children:n,spokenMessage:r=n,onRemove:o=Ce.noop,isDismissible:i=!0,actions:a=[],politeness:l=KC(t),__unstableHTML:s,onDismiss:c=Ce.noop}){!function(e,t){const n="string"==typeof e?e:Ps(e);(0,_.useEffect)((()=>{n&&Gf(n,t)}),[n,t])}(r,l);const u=Cr()(e,"components-notice","is-"+t,{"is-dismissible":i});return s&&(n=(0,_.createElement)(hs,null,n)),(0,_.createElement)("div",{className:u},(0,_.createElement)("div",{className:"components-notice__content"},n,(0,_.createElement)("div",{className:"components-notice__actions"},a.map((({className:e,label:t,isPrimary:n,variant:r,noDefaultClasses:o=!1,onClick:i,url:a},l)=>{let s=r;return"primary"===r||o||(s=a?"link":"secondary"),void 0===s&&n&&(s="primary"),(0,_.createElement)(Gi,{key:l,href:a,variant:s,onClick:a?void 0:i,className:Cr()("components-notice__action",e)},t)})))),i&&(0,_.createElement)(Gi,{className:"components-notice__dismiss",icon:Eo,label:U("Dismiss this notice"),onClick:e=>{var t;null==e||null===(t=e.preventDefault)||void 0===t||t.call(e),c(),o()},showTooltip:!1}))};function XC({tinyBackgroundColor:e,tinyTextColor:t,backgroundColor:n,textColor:r}){const o=e.getBrightness()<t.getBrightness()?U("This color combination may be hard for people to read. Try using a darker background color and/or a brighter text color."):U("This color combination may be hard for people to read. Try using a brighter background color and/or a darker text color.");return(0,_.useEffect)((()=>{Gf(U("This color combination may be hard for people to read."))}),[n,r]),(0,_.createElement)("div",{className:"block-editor-contrast-checker"},(0,_.createElement)(YC,{spokenMessage:null,status:"warning",isDismissible:!1},o))}var JC=function({backgroundColor:e,fallbackBackgroundColor:t,fallbackTextColor:n,fontSize:r,isLargeText:o,textColor:i}){if(!e&&!t||!i&&!n)return null;const a=wl()(e||t),l=wl()(i||n);return 1!==a.getAlpha()||1!==l.getAlpha()||wl().isReadable(a,l,{level:"AA",size:o||!1!==o&&r>=24?"large":"small"})?null:(0,_.createElement)(XC,{backgroundColor:e,textColor:i,tinyBackgroundColor:a,tinyTextColor:l})};const QC=(0,_.createContext)();function ex({children:e}){const t=(0,_.useMemo)((()=>({refs:new Map,callbacks:new Map})),[]);return(0,_.createElement)(QC.Provider,{value:t},e)}function tx(e){const{refs:t,callbacks:n}=(0,_.useContext)(QC),r=(0,_.useRef)();return(0,_.useLayoutEffect)((()=>(t.set(r,e),()=>{t.delete(r)})),[e]),Jh((t=>{r.current=t,n.forEach(((n,r)=>{e===n&&r(t)}))}),[e])}function nx(e){const{refs:t}=(0,_.useContext)(QC),n=(0,_.useRef)();return n.current=e,(0,_.useMemo)((()=>({get current(){let e=null;for(const[r,o]of t.entries())o===n.current&&r.current&&(e=r.current);return e}})),[])}function rx(e){const{callbacks:t}=(0,_.useContext)(QC),n=nx(e),[r,o]=(0,_.useState)(null);return(0,_.useLayoutEffect)((()=>{if(e)return t.set(o,e),()=>{t.delete(o)}}),[e]),n.current||r}function ox(e){return e.ownerDocument.defaultView.getComputedStyle(e)}function ix({settings:e,clientId:t,enableContrastChecking:n=!0}){const[r,o]=(0,_.useState)(),[i,a]=(0,_.useState)(),l=nx(t);return(0,_.useEffect)((()=>{if(!n)return;if(!l.current)return;a(ox(l.current).color);let e=l.current,t=ox(e).backgroundColor;for(;"rgba(0, 0, 0, 0)"===t&&e.parentNode&&e.parentNode.nodeType===e.parentNode.ELEMENT_NODE;)e=e.parentNode,t=ox(e).backgroundColor;o(t)})),(0,_.createElement)(lE,null,(0,_.createElement)(GC,{title:U("Color"),initialOpen:!1,settings:e},n&&(0,_.createElement)(JC,{backgroundColor:r,textColor:i})))}const ax="color",lx=[],sx=e=>{const t=Vl(e,ax);return t&&(!0===t.link||!0===t.gradient||!1!==t.background||!1!==t.text)},cx=e=>{const t=Vl(e,ax);return null==t?void 0:t.__experimentalSkipSerialization},ux=e=>{const t=Vl(e,ax);return(0,Ce.isObject)(t)&&!!t.gradients};function dx(e,t,n){var r,o,i,a,l,s;if(!sx(t)||cx(t))return e;const c=ux(t),{backgroundColor:u,textColor:d,gradient:p,style:m}=n,f=T_("background-color",u),h=function(e){if(e)return`has-${e}-gradient-background`}(p),g=T_("color",d),v=Cr()(e.className,g,h,{[f]:!(c&&null!=m&&null!==(r=m.color)&&void 0!==r&&r.gradient||!f),"has-text-color":d||(null==m||null===(o=m.color)||void 0===o?void 0:o.text),"has-background":u||(null==m||null===(i=m.color)||void 0===i?void 0:i.background)||c&&(p||(null==m||null===(a=m.color)||void 0===a?void 0:a.gradient)),"has-link-color":null==m||null===(l=m.elements)||void 0===l||null===(s=l.link)||void 0===s?void 0:s.color});return e.className=v||void 0,e}const px=(e,t)=>{const n=/var:preset\|color\|(.+)/.exec(t);return n&&n[1]?S_(e,n[1]).color:t};function mx(e){var t,n,r,o,i,a,l,s,c;const{name:u,attributes:d}=e,p=fk("color.palette")||lx,m=fk("color.gradients")||lx,f=fk("color.custom"),h=fk("color.customGradient"),g=fk("color.link"),v=(0,_.useRef)(d);if((0,_.useEffect)((()=>{v.current=d}),[d]),!sx(u))return null;const b=(e=>{if("web"!==Jp)return!1;const t=Vl(e,ax);return(0,Ce.isObject)(t)&&!!t.link})(u)&&g&&(p.length>0||f),y=(e=>{const t=Vl(e,ax);return t&&!1!==t.text})(u)&&(p.length>0||f),w=(e=>{const t=Vl(e,ax);return t&&!1!==t.background})(u)&&(p.length>0||f),k=ux(u)&&(m.length>0||h);if(!(b||y||w||k))return null;const{style:E,textColor:C,backgroundColor:x,gradient:S}=d;let I;if(k&&S)I=function(e,t){const n=(0,Ce.find)(e,["slug",t]);return n&&n.gradient}(m,S);else if(k){var T;I=null==E||null===(T=E.color)||void 0===T?void 0:T.gradient}const N=t=>n=>{var r,o;const i=I_(p,n),a=t+"Color",l={...v.current.style,color:{...null===(r=v.current)||void 0===r||null===(o=r.style)||void 0===o?void 0:o.color,[t]:null!=i&&i.slug?void 0:n}},s=null!=i&&i.slug?i.slug:void 0,c={style:B_(l),[a]:s};e.setAttributes(c),v.current={...v.current,...c}};return(0,_.createElement)(ix,{enableContrastChecking:!("web"!==Jp||S||null!=E&&null!==(t=E.color)&&void 0!==t&&t.gradient),clientId:e.clientId,settings:[...y?[{label:U("Text color"),onColorChange:N("text"),colorValue:S_(p,C,null==E||null===(n=E.color)||void 0===n?void 0:n.text).color}]:[],...w||k?[{label:U("Background color"),onColorChange:w?N("background"):void 0,colorValue:S_(p,x,null==E||null===(r=E.color)||void 0===r?void 0:r.background).color,gradientValue:I,onGradientChange:k?t=>{const n=function(e,t){const n=N_(e,t);return n&&n.slug}(m,t);let r;if(n){var o,i,a;const e={...null===(o=v.current)||void 0===o?void 0:o.style,color:{...null===(i=v.current)||void 0===i||null===(a=i.style)||void 0===a?void 0:a.color,gradient:void 0}};r={style:B_(e),gradient:n}}else{var l,s,c;const e={...null===(l=v.current)||void 0===l?void 0:l.style,color:{...null===(s=v.current)||void 0===s||null===(c=s.style)||void 0===c?void 0:c.color,gradient:t}};r={style:B_(e),gradient:void 0}}e.setAttributes(r),v.current={...v.current,...r}}:void 0}]:[],...b?[{label:U("Link Color"),onColorChange:t=>{const n=I_(p,t),r=null!=n&&n.slug?`var:preset|color|${n.slug}`:t,o=function(e,t,n){return(0,Ce.setWith)(e?(0,Ce.clone)(e):{},["elements","link","color","text"],n,Ce.clone)}(E,0,r);e.setAttributes({style:o})},colorValue:px(p,null==E||null===(o=E.elements)||void 0===o||null===(i=o.link)||void 0===i||null===(a=i.color)||void 0===a?void 0:a.text),clearable:!(null==E||null===(l=E.elements)||void 0===l||null===(s=l.link)||void 0===s||null===(c=s.color)||void 0===c||!c.text)}]:[]]})}const fx=Ea((e=>t=>{var n,r,o;const{name:i,attributes:a}=t,{backgroundColor:l,textColor:s}=a,c=fk("color.palette")||lx;if(!sx(i)||cx(i))return(0,_.createElement)(e,t);const u={color:s?null===(n=S_(c,s))||void 0===n?void 0:n.color:void 0,backgroundColor:l?null===(r=S_(c,l))||void 0===r?void 0:r.color:void 0};let d=t.wrapperProps;return d={...t.wrapperProps,style:{...u,...null===(o=t.wrapperProps)||void 0===o?void 0:o.style}},(0,_.createElement)(e,(0,nr.Z)({},t,{wrapperProps:d}))}));(0,W.KJ)("blocks.registerBlockType","core/color/addAttribute",(function(e){return sx(e)?(e.attributes.backgroundColor||Object.assign(e.attributes,{backgroundColor:{type:"string"}}),e.attributes.textColor||Object.assign(e.attributes,{textColor:{type:"string"}}),ux(e)&&!e.attributes.gradient&&Object.assign(e.attributes,{gradient:{type:"string"}}),e):e})),(0,W.KJ)("blocks.getSaveContent.extraProps","core/color/addSaveProps",dx),(0,W.KJ)("blocks.registerBlockType","core/color/addEditProps",(function(e){if(!sx(e)||cx(e))return e;const t=e.getEditWrapperProps;return e.getEditWrapperProps=n=>{let r={};return t&&(r=t(n)),dx(r,e,n)},e})),(0,W.KJ)("editor.BlockListBlock","core/color/with-color-palette-styles",fx);var hx=(0,_.createElement)(ko,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,_.createElement)(yo,{d:"M7 18v1h10v-1H7zm5-2c1.5 0 2.6-.4 3.4-1.2.8-.8 1.1-2 1.1-3.5V5H15v5.8c0 1.2-.2 2.1-.6 2.8-.4.7-1.2 1-2.4 1s-2-.3-2.4-1c-.4-.7-.6-1.6-.6-2.8V5H7.5v6.2c0 1.5.4 2.7 1.1 3.5.8.9 1.9 1.3 3.4 1.3z"})),gx=(0,_.createElement)(ko,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,_.createElement)(yo,{d:"M9.1 9v-.5c0-.6.2-1.1.7-1.4.5-.3 1.2-.5 2-.5.7 0 1.4.1 2.1.3.7.2 1.4.5 2.1.9l.2-1.9c-.6-.3-1.2-.5-1.9-.7-.8-.1-1.6-.2-2.4-.2-1.5 0-2.7.3-3.6 1-.8.7-1.2 1.5-1.2 2.6V9h2zM20 12H4v1h8.3c.3.1.6.2.8.3.5.2.9.5 1.1.8.3.3.4.7.4 1.2 0 .7-.2 1.1-.8 1.5-.5.3-1.2.5-2.1.5-.8 0-1.6-.1-2.4-.3-.8-.2-1.5-.5-2.2-.8L7 18.1c.5.2 1.2.4 2 .6.8.2 1.6.3 2.4.3 1.7 0 3-.3 3.9-1 .9-.7 1.3-1.6 1.3-2.8 0-.9-.2-1.7-.7-2.2H20v-1z"}));const vx=[{name:U("Underline"),value:"underline",icon:hx},{name:U("Strikethrough"),value:"line-through",icon:gx}];function bx({value:e,onChange:t}){return(0,_.createElement)("fieldset",{className:"block-editor-text-decoration-control"},(0,_.createElement)("legend",null,U("Decoration")),(0,_.createElement)("div",{className:"block-editor-text-decoration-control__buttons"},vx.map((n=>(0,_.createElement)(Gi,{key:n.value,icon:n.icon,isSmall:!0,isPressed:n.value===e,onClick:()=>t(n.value===e?void 0:n.value),"aria-label":n.name})))))}const yx="typography.__experimentalTextDecoration";function wx(e){var t;const{attributes:{style:n},setAttributes:r}=e;return kx(e)?null:(0,_.createElement)(bx,{value:null==n||null===(t=n.typography)||void 0===t?void 0:t.textDecoration,onChange:function(e){r({style:B_({...n,typography:{...null==n?void 0:n.typography,textDecoration:e}})})}})}function kx({name:e}={}){const t=!Wl(e,yx),n=fk("typography.customTextDecorations");return t||!n}var Ex=(0,_.createElement)(ko,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,_.createElement)(yo,{d:"M6.1 6.8L2.1 18h1.6l1.1-3h4.3l1.1 3h1.6l-4-11.2H6.1zm-.8 6.8L7 8.9l1.7 4.7H5.3zm15.1-.7c-.4-.5-.9-.8-1.6-1 .4-.2.7-.5.8-.9.2-.4.3-.9.3-1.4 0-.9-.3-1.6-.8-2-.6-.5-1.3-.7-2.4-.7h-3.5V18h4.2c1.1 0 2-.3 2.6-.8.6-.6 1-1.4 1-2.4-.1-.8-.3-1.4-.6-1.9zm-5.7-4.7h1.8c.6 0 1.1.1 1.4.4.3.2.5.7.5 1.3 0 .6-.2 1.1-.5 1.3-.3.2-.8.4-1.4.4h-1.8V8.2zm4 8c-.4.3-.9.5-1.5.5h-2.6v-3.8h2.6c1.4 0 2 .6 2 1.9.1.6-.1 1-.5 1.4z"})),_x=(0,_.createElement)(ko,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,_.createElement)(yo,{d:"M11 16.8c-.1-.1-.2-.3-.3-.5v-2.6c0-.9-.1-1.7-.3-2.2-.2-.5-.5-.9-.9-1.2-.4-.2-.9-.3-1.6-.3-.5 0-1 .1-1.5.2s-.9.3-1.2.6l.2 1.2c.4-.3.7-.4 1.1-.5.3-.1.7-.2 1-.2.6 0 1 .1 1.3.4.3.2.4.7.4 1.4-1.2 0-2.3.2-3.3.7s-1.4 1.1-1.4 2.1c0 .7.2 1.2.7 1.6.4.4 1 .6 1.8.6.9 0 1.7-.4 2.4-1.2.1.3.2.5.4.7.1.2.3.3.6.4.3.1.6.1 1.1.1h.1l.2-1.2h-.1c-.4.1-.6 0-.7-.1zM9.2 16c-.2.3-.5.6-.9.8-.3.1-.7.2-1.1.2-.4 0-.7-.1-.9-.3-.2-.2-.3-.5-.3-.9 0-.6.2-1 .7-1.3.5-.3 1.3-.4 2.5-.5v2zm10.6-3.9c-.3-.6-.7-1.1-1.2-1.5-.6-.4-1.2-.6-1.9-.6-.5 0-.9.1-1.4.3-.4.2-.8.5-1.1.8V6h-1.4v12h1.3l.2-1c.2.4.6.6 1 .8.4.2.9.3 1.4.3.7 0 1.2-.2 1.8-.5.5-.4 1-.9 1.3-1.5.3-.6.5-1.3.5-2.1-.1-.6-.2-1.3-.5-1.9zm-1.7 4c-.4.5-.9.8-1.6.8s-1.2-.2-1.7-.7c-.4-.5-.7-1.2-.7-2.1 0-.9.2-1.6.7-2.1.4-.5 1-.7 1.7-.7s1.2.3 1.6.8c.4.5.6 1.2.6 2s-.2 1.4-.6 2z"})),Cx=(0,_.createElement)(ko,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,_.createElement)(yo,{d:"M7.1 6.8L3.1 18h1.6l1.1-3h4.3l1.1 3h1.6l-4-11.2H7.1zm-.8 6.8L8 8.9l1.7 4.7H6.3zm14.5-1.5c-.3-.6-.7-1.1-1.2-1.5-.6-.4-1.2-.6-1.9-.6-.5 0-.9.1-1.4.3-.4.2-.8.5-1.1.8V6h-1.4v12h1.3l.2-1c.2.4.6.6 1 .8.4.2.9.3 1.4.3.7 0 1.2-.2 1.8-.5.5-.4 1-.9 1.3-1.5.3-.6.5-1.3.5-2.1-.1-.6-.2-1.3-.5-1.9zm-1.7 4c-.4.5-.9.8-1.6.8s-1.2-.2-1.7-.7c-.4-.5-.7-1.2-.7-2.1 0-.9.2-1.6.7-2.1.4-.5 1-.7 1.7-.7s1.2.3 1.6.8c.4.5.6 1.2.6 2 .1.8-.2 1.4-.6 2z"}));const xx=[{name:U("Uppercase"),value:"uppercase",icon:Ex},{name:U("Lowercase"),value:"lowercase",icon:_x},{name:U("Capitalize"),value:"capitalize",icon:Cx}];function Sx({value:e,onChange:t}){return(0,_.createElement)("fieldset",{className:"block-editor-text-transform-control"},(0,_.createElement)("legend",null,U("Letter case")),(0,_.createElement)("div",{className:"block-editor-text-transform-control__buttons"},xx.map((n=>(0,_.createElement)(Gi,{key:n.value,icon:n.icon,isSmall:!0,isPressed:e===n.value,"aria-label":n.name,onClick:()=>t(e===n.value?void 0:n.value)})))))}const Ix="typography.__experimentalTextTransform";function Tx(e){var t;const{attributes:{style:n},setAttributes:r}=e;return Nx(e)?null:(0,_.createElement)(Sx,{value:null==n||null===(t=n.typography)||void 0===t?void 0:t.textTransform,onChange:function(e){r({style:B_({...n,typography:{...null==n?void 0:n.typography,textTransform:e}})})}})}function Nx({name:e}={}){const t=!Wl(e,Ix),n=fk("typography.customTextTransforms");return t||!n}function Ax(e){const t=!kx(e),n=!Nx(e);return t||n?(0,_.createElement)("div",{className:"block-editor-text-decoration-and-transform"},t&&(0,_.createElement)(wx,e),n&&(0,_.createElement)(Tx,e)):null}function Rx({value:e,onChange:t}){const n=function(e){return void 0!==e&&""!==e}(e),r=n?e:"";return(0,_.createElement)("div",{className:"block-editor-line-height-control"},(0,_.createElement)(Vk,{autoComplete:"off",onKeyDown:e=>{const{keyCode:r}=e;48!==r||n||(e.preventDefault(),t("0"))},onChange:e=>{if(n)return void t(e);let r=e;switch(e){case"0.1":r=1.6;break;case"0":r=1.4}t(r)},label:U("Line height"),placeholder:1.5,step:.1,type:"number",value:r,min:0}))}const Lx="typography.lineHeight";function Px(e){var t;const{attributes:{style:n}}=e;return Ox(e)?null:(0,_.createElement)(Rx,{value:null==n||null===(t=n.typography)||void 0===t?void 0:t.lineHeight,onChange:t=>{const r={...n,typography:{...null==n?void 0:n.typography,lineHeight:t}};e.setAttributes({style:B_(r)})}})}function Ox({name:e}={}){const t=!fk("typography.customLineHeight");return!Wl(e,Lx)||t}var Dx=n(63366),Mx=n(45697),Bx=n.n(Mx);function Fx(e){return"object"==typeof e&&null!=e&&1===e.nodeType}function zx(e,t){return(!t||"hidden"!==e)&&"visible"!==e&&"clip"!==e}function Hx(e,t){if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){var n=getComputedStyle(e,null);return zx(n.overflowY,t)||zx(n.overflowX,t)||function(e){var t=function(e){if(!e.ownerDocument||!e.ownerDocument.defaultView)return null;try{return e.ownerDocument.defaultView.frameElement}catch(e){return null}}(e);return!!t&&(t.clientHeight<e.scrollHeight||t.clientWidth<e.scrollWidth)}(e)}return!1}function Vx(e,t,n,r,o,i,a,l){return i<e&&a>t||i>e&&a<t?0:i<=e&&l<=n||a>=t&&l>=n?i-e-r:a>t&&l<n||i<e&&l>n?a-t+o:0}n(21726);var Wx=0;function Zx(){}function jx(e,t,n){return e===t||t instanceof n.Node&&e.contains&&e.contains(t)}function Ux(e,t){var n;function r(){n&&clearTimeout(n)}function o(){for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];r(),n=setTimeout((function(){n=null,e.apply(void 0,i)}),t)}return o.cancel=r,o}function $x(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return t.some((function(t){return t&&t.apply(void 0,[e].concat(r)),e.preventDownshiftDefault||e.hasOwnProperty("nativeEvent")&&e.nativeEvent.preventDownshiftDefault}))}}function qx(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){t.forEach((function(t){"function"==typeof t?t(e):t&&(t.current=e)}))}}function Gx(e,t){return Object.keys(e).reduce((function(n,r){return n[r]=function(e,t){return void 0!==e[t]}(t,r)?t[r]:e[r],n}),{})}function Kx(e){var t=e.key,n=e.keyCode;return n>=37&&n<=40&&0!==t.indexOf("Arrow")?"Arrow"+t:t}function Yx(e,t,n,r,o){if(void 0===o&&(o=!0),0===n)return-1;var i=n-1;("number"!=typeof t||t<0||t>=n)&&(t=e>0?-1:i+1);var a=t+e;a<0?a=o?i:0:a>i&&(a=o?0:i);var l=Xx(e,a,n,r,o);return-1===l?t>=n?-1:t:l}function Xx(e,t,n,r,o){var i=r(t);if(!i||!i.hasAttribute("disabled"))return t;if(e>0){for(var a=t+1;a<n;a++)if(!r(a).hasAttribute("disabled"))return a}else for(var l=t-1;l>=0;l--)if(!r(l).hasAttribute("disabled"))return l;return o?e>0?Xx(1,0,n,r,!1):Xx(-1,n-1,n,r,!1):-1}function Jx(e,t,n,r){return void 0===r&&(r=!0),t.some((function(t){return t&&(jx(t,e,n)||r&&jx(t,n.document.activeElement,n))}))}var Qx=Ux((function(e){eS(e).textContent=""}),500);function eS(e){void 0===e&&(e=document);var t=e.getElementById("a11y-status-message");return t||((t=e.createElement("div")).setAttribute("id","a11y-status-message"),t.setAttribute("role","status"),t.setAttribute("aria-live","polite"),t.setAttribute("aria-relevant","additions text"),Object.assign(t.style,{border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px"}),e.body.appendChild(t),t)}var tS={highlightedIndex:-1,isOpen:!1,selectedItem:null,inputValue:""};var nS=Ux((function(e,t){var n,r,o;n=e(),o=eS(r=t),n&&(o.textContent=n,Qx(r))}),200),rS="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?_.useLayoutEffect:_.useEffect;function oS(e){var t=e.id,n=void 0===t?"downshift-"+String(Wx++):t,r=e.labelId,o=e.menuId,i=e.getItemId,a=e.toggleButtonId,l=e.inputId;return(0,_.useRef)({labelId:r||n+"-label",menuId:o||n+"-menu",getItemId:i||function(e){return n+"-item-"+e},toggleButtonId:a||n+"-toggle-button",inputId:l||n+"-input"}).current}function iS(e){return/^\S{1}$/.test(e)}function aS(e){return""+e.slice(0,1).toUpperCase()+e.slice(1)}function lS(e){var t=(0,_.useRef)(e);return t.current=e,t}function sS(e,t,n){var r=(0,_.useRef)(),o=(0,_.useRef)(),i=(0,_.useCallback)((function(t,n){o.current=n,t=Gx(t,n.props);var r=e(t,n);return n.props.stateReducer(t,(0,nr.Z)({},n,{changes:r}))}),[e]),a=(0,_.useReducer)(i,t),l=a[0],s=a[1],c=lS(n),u=(0,_.useCallback)((function(e){return s((0,nr.Z)({props:c.current},e))}),[c]),d=o.current;return(0,_.useEffect)((function(){d&&r.current&&r.current!==l&&function(e,t,n){var r=e.props,o=e.type,i={};Object.keys(t).forEach((function(r){!function(e,t,n,r){var o=t.props,i=t.type,a="on"+aS(e)+"Change";o[a]&&void 0!==r[e]&&r[e]!==n[e]&&o[a]((0,nr.Z)({type:i},r))}(r,e,t,n),n[r]!==t[r]&&(i[r]=n[r])})),r.onStateChange&&Object.keys(i).length&&r.onStateChange((0,nr.Z)({type:o},i))}(d,Gx(r.current,d.props),l),r.current=l}),[l,n,d]),[l,u]}var cS={itemToString:function(e){return e?String(e):""},stateReducer:function(e,t){return t.changes},getA11ySelectionMessage:function(e){var t=e.selectedItem,n=e.itemToString;return t?n(t)+" has been selected.":""},scrollIntoView:function(e,t){e&&function(e,t){var n=window,r=t.scrollMode,o=t.block,i=t.inline,a=t.boundary,l=t.skipOverflowHiddenElements,s="function"==typeof a?a:function(e){return e!==a};if(!Fx(e))throw new TypeError("Invalid target");for(var c=document.scrollingElement||document.documentElement,u=[],d=e;Fx(d)&&s(d);){if((d=d.parentElement)===c){u.push(d);break}null!=d&&d===document.body&&Hx(d)&&!Hx(document.documentElement)||null!=d&&Hx(d,l)&&u.push(d)}for(var p=n.visualViewport?n.visualViewport.width:innerWidth,m=n.visualViewport?n.visualViewport.height:innerHeight,f=window.scrollX||pageXOffset,h=window.scrollY||pageYOffset,g=e.getBoundingClientRect(),v=g.height,b=g.width,y=g.top,w=g.right,k=g.bottom,E=g.left,_="start"===o||"nearest"===o?y:"end"===o?k:y+v/2,C="center"===i?E+b/2:"end"===i?w:E,x=[],S=0;S<u.length;S++){var I=u[S],T=I.getBoundingClientRect(),N=T.height,A=T.width,R=T.top,L=T.right,P=T.bottom,O=T.left;if("if-needed"===r&&y>=0&&E>=0&&k<=m&&w<=p&&y>=R&&k<=P&&E>=O&&w<=L)return x;var D=getComputedStyle(I),M=parseInt(D.borderLeftWidth,10),B=parseInt(D.borderTopWidth,10),F=parseInt(D.borderRightWidth,10),z=parseInt(D.borderBottomWidth,10),H=0,V=0,W="offsetWidth"in I?I.offsetWidth-I.clientWidth-M-F:0,Z="offsetHeight"in I?I.offsetHeight-I.clientHeight-B-z:0;if(c===I)H="start"===o?_:"end"===o?_-m:"nearest"===o?Vx(h,h+m,m,B,z,h+_,h+_+v,v):_-m/2,V="start"===i?C:"center"===i?C-p/2:"end"===i?C-p:Vx(f,f+p,p,M,F,f+C,f+C+b,b),H=Math.max(0,H+h),V=Math.max(0,V+f);else{H="start"===o?_-R-B:"end"===o?_-P+z+Z:"nearest"===o?Vx(R,P,N,B,z+Z,_,_+v,v):_-(R+N/2)+Z/2,V="start"===i?C-O-M:"center"===i?C-(O+A/2)+W/2:"end"===i?C-L+F+W:Vx(O,L,A,M,F+W,C,C+b,b);var j=I.scrollLeft,U=I.scrollTop;_+=U-(H=Math.max(0,Math.min(U+H,I.scrollHeight-N+Z))),C+=j-(V=Math.max(0,Math.min(j+V,I.scrollWidth-A+W)))}x.push({el:I,top:H,left:V})}return x}(e,{boundary:t,block:"nearest",scrollMode:"if-needed"}).forEach((function(e){var t=e.el,n=e.top,r=e.left;t.scrollTop=n,t.scrollLeft=r}))},circularNavigation:!1,environment:"undefined"==typeof window?{}:window};function uS(e,t,n){void 0===n&&(n=tS);var r="default"+aS(t);return r in e?e[r]:n[t]}function dS(e,t,n){if(void 0===n&&(n=tS),t in e)return e[t];var r="initial"+aS(t);return r in e?e[r]:uS(e,t,n)}function pS(e,t,n,r){var o=e.items,i=e.initialHighlightedIndex,a=e.defaultHighlightedIndex,l=t.selectedItem,s=t.highlightedIndex;return 0===o.length?-1:void 0!==i&&s===i?i:void 0!==a?a:l?0===n?o.indexOf(l):Yx(n,o.indexOf(l),o.length,r,!1):0===n?-1:n<0?o.length-1:0}function mS(e,t,n){var r=n.isInitialMount,o=n.highlightedIndex,i=n.items,a=n.environment,l=(0,Dx.Z)(n,["isInitialMount","highlightedIndex","items","environment"]);(0,_.useEffect)((function(){r||nS((function(){return e((0,nr.Z)({highlightedIndex:o,highlightedItem:i[o],resultCount:i.length},l))}),a.document)}),t)}var fS=Zx;function hS(e,t,n,r,o){for(var i=e.toLowerCase(),a=0;a<n.length;a++){var l=(a+t+1)%n.length;if(r(n[l]).toLowerCase().startsWith(i)){var s=o(l);if(!s||!s.hasAttribute("disabled"))return l}}return t}Bx().array.isRequired,Bx().func,Bx().func,Bx().func,Bx().bool,Bx().number,Bx().number,Bx().number,Bx().bool,Bx().bool,Bx().bool,Bx().any,Bx().any,Bx().any,Bx().string,Bx().string,Bx().string,Bx().func,Bx().string,Bx().func,Bx().func,Bx().func,Bx().func,Bx().func,Bx().shape({addEventListener:Bx().func,removeEventListener:Bx().func,document:Bx().shape({getElementById:Bx().func,activeElement:Bx().any,body:Bx().any})});var gS=(0,nr.Z)({},cS,{getA11yStatusMessage:function(e){var t=e.isOpen,n=e.resultCount,r=e.previousResultCount;return t?n?n!==r?n+" result"+(1===n?" is":"s are")+" available, use up and down arrow keys to navigate. Press Enter or Space Bar keys to select.":"":"No results are available.":""}}),vS=Zx,bS=Object.freeze({__proto__:null,MenuKeyDownArrowDown:0,MenuKeyDownArrowUp:1,MenuKeyDownEscape:2,MenuKeyDownHome:3,MenuKeyDownEnd:4,MenuKeyDownEnter:5,MenuKeyDownSpaceButton:6,MenuKeyDownCharacter:7,MenuBlur:8,MenuMouseLeave:9,ItemMouseMove:10,ItemClick:11,ToggleButtonClick:12,ToggleButtonKeyDownArrowDown:13,ToggleButtonKeyDownArrowUp:14,ToggleButtonKeyDownCharacter:15,FunctionToggleMenu:16,FunctionOpenMenu:17,FunctionCloseMenu:18,FunctionSetHighlightedIndex:19,FunctionSelectItem:20,FunctionSetInputValue:21,FunctionReset:22});function yS(e,t){var n,r=t.type,o=t.props,i=t.shiftKey;switch(r){case 11:n={isOpen:uS(o,"isOpen"),highlightedIndex:uS(o,"highlightedIndex"),selectedItem:o.items[t.index]};break;case 15:var a=t.key,l=""+e.inputValue+a,s=hS(l,e.selectedItem?o.items.indexOf(e.selectedItem):-1,o.items,o.itemToString,t.getItemNodeFromIndex);n=(0,nr.Z)({inputValue:l},s>=0&&{selectedItem:o.items[s]});break;case 13:n={highlightedIndex:pS(o,e,1,t.getItemNodeFromIndex),isOpen:!0};break;case 14:n={highlightedIndex:pS(o,e,-1,t.getItemNodeFromIndex),isOpen:!0};break;case 5:case 6:n=(0,nr.Z)({isOpen:uS(o,"isOpen"),highlightedIndex:uS(o,"highlightedIndex")},e.highlightedIndex>=0&&{selectedItem:o.items[e.highlightedIndex]});break;case 3:n={highlightedIndex:Xx(1,0,o.items.length,t.getItemNodeFromIndex,!1)};break;case 4:n={highlightedIndex:Xx(-1,o.items.length-1,o.items.length,t.getItemNodeFromIndex,!1)};break;case 2:case 8:n={isOpen:!1,highlightedIndex:-1};break;case 7:var c=t.key,u=""+e.inputValue+c,d=hS(u,e.highlightedIndex,o.items,o.itemToString,t.getItemNodeFromIndex);n=(0,nr.Z)({inputValue:u},d>=0&&{highlightedIndex:d});break;case 0:n={highlightedIndex:Yx(i?5:1,e.highlightedIndex,o.items.length,t.getItemNodeFromIndex,o.circularNavigation)};break;case 1:n={highlightedIndex:Yx(i?-5:-1,e.highlightedIndex,o.items.length,t.getItemNodeFromIndex,o.circularNavigation)};break;case 20:n={selectedItem:t.selectedItem};break;default:return function(e,t,n){var r,o=t.type,i=t.props;switch(o){case n.ItemMouseMove:r={highlightedIndex:t.index};break;case n.MenuMouseLeave:r={highlightedIndex:-1};break;case n.ToggleButtonClick:case n.FunctionToggleMenu:r={isOpen:!e.isOpen,highlightedIndex:e.isOpen?-1:pS(i,e,0)};break;case n.FunctionOpenMenu:r={isOpen:!0,highlightedIndex:pS(i,e,0)};break;case n.FunctionCloseMenu:r={isOpen:!1};break;case n.FunctionSetHighlightedIndex:r={highlightedIndex:t.highlightedIndex};break;case n.FunctionSetInputValue:r={inputValue:t.inputValue};break;case n.FunctionReset:r={highlightedIndex:uS(i,"highlightedIndex"),isOpen:uS(i,"isOpen"),selectedItem:uS(i,"selectedItem"),inputValue:uS(i,"inputValue")};break;default:throw new Error("Reducer called without proper action type.")}return(0,nr.Z)({},e,r)}(e,t,bS)}return(0,nr.Z)({},e,n)}function wS(e){void 0===e&&(e={}),vS(e,wS);var t=(0,nr.Z)({},gS,e),n=t.items,r=t.scrollIntoView,o=t.environment,i=t.initialIsOpen,a=t.defaultIsOpen,l=t.itemToString,s=t.getA11ySelectionMessage,c=t.getA11yStatusMessage,u=function(e,t,n){var r=sS(e,t,n),o=r[0],i=r[1];return[Gx(o,n),i]}(yS,function(e){var t=dS(e,"selectedItem"),n=dS(e,"isOpen"),r=dS(e,"highlightedIndex"),o=dS(e,"inputValue");return{highlightedIndex:r<0&&t&&n?e.items.indexOf(t):r,isOpen:n,selectedItem:t,inputValue:o}}(t),t),d=u[0],p=u[1],m=d.isOpen,f=d.highlightedIndex,h=d.selectedItem,g=d.inputValue,v=(0,_.useRef)(null),b=(0,_.useRef)(null),y=(0,_.useRef)({}),w=(0,_.useRef)(!0),k=(0,_.useRef)(null),E=oS(t),C=(0,_.useRef)(),x=(0,_.useRef)(!0),S=lS({state:d,props:t}),I=(0,_.useCallback)((function(e){return y.current[E.getItemId(e)]}),[E]);mS(c,[m,f,g,n],(0,nr.Z)({isInitialMount:x.current,previousResultCount:C.current,items:n,environment:o,itemToString:l},d)),mS(s,[h],(0,nr.Z)({isInitialMount:x.current,previousResultCount:C.current,items:n,environment:o,itemToString:l},d));var T=function(e){var t=e.highlightedIndex,n=e.isOpen,r=e.itemRefs,o=e.getItemNodeFromIndex,i=e.menuElement,a=e.scrollIntoView,l=(0,_.useRef)(!0);return rS((function(){t<0||!n||!Object.keys(r.current).length||(!1===l.current?l.current=!0:a(o(t),i))}),[t]),l}({menuElement:b.current,highlightedIndex:f,isOpen:m,itemRefs:y,scrollIntoView:r,getItemNodeFromIndex:I});(0,_.useEffect)((function(){return k.current=Ux((function(e){e({type:21,inputValue:""})}),500),function(){k.current.cancel()}}),[]),(0,_.useEffect)((function(){g&&k.current(p)}),[p,g]),fS({isInitialMount:x.current,props:t,state:d}),(0,_.useEffect)((function(){x.current?(i||a||m)&&b.current&&b.current.focus():m?b.current&&b.current.focus():o.document.activeElement===b.current&&v.current&&(w.current=!1,v.current.focus())}),[m]),(0,_.useEffect)((function(){x.current||(C.current=n.length)}));var N=function(e,t,n,r){var o=(0,_.useRef)({isMouseDown:!1,isTouchMove:!1});return(0,_.useEffect)((function(){var i=function(){o.current.isMouseDown=!0},a=function(i){o.current.isMouseDown=!1,e&&!Jx(i.target,t.map((function(e){return e.current})),n)&&r()},l=function(){o.current.isTouchMove=!1},s=function(){o.current.isTouchMove=!0},c=function(i){!e||o.current.isTouchMove||Jx(i.target,t.map((function(e){return e.current})),n,!1)||r()};return n.addEventListener("mousedown",i),n.addEventListener("mouseup",a),n.addEventListener("touchstart",l),n.addEventListener("touchmove",s),n.addEventListener("touchend",c),function(){n.removeEventListener("mousedown",i),n.removeEventListener("mouseup",a),n.removeEventListener("touchstart",l),n.removeEventListener("touchmove",s),n.removeEventListener("touchend",c)}}),[e,n]),o}(m,[b,v],o,(function(){p({type:8})})),A=Zx;(0,_.useEffect)((function(){x.current=!1}),[]),(0,_.useEffect)((function(){m||(y.current={})}),[m]);var R=(0,_.useMemo)((function(){return{ArrowDown:function(e){e.preventDefault(),p({type:13,getItemNodeFromIndex:I,shiftKey:e.shiftKey})},ArrowUp:function(e){e.preventDefault(),p({type:14,getItemNodeFromIndex:I,shiftKey:e.shiftKey})}}}),[p,I]),L=(0,_.useMemo)((function(){return{ArrowDown:function(e){e.preventDefault(),p({type:0,getItemNodeFromIndex:I,shiftKey:e.shiftKey})},ArrowUp:function(e){e.preventDefault(),p({type:1,getItemNodeFromIndex:I,shiftKey:e.shiftKey})},Home:function(e){e.preventDefault(),p({type:3,getItemNodeFromIndex:I})},End:function(e){e.preventDefault(),p({type:4,getItemNodeFromIndex:I})},Escape:function(){p({type:2})},Enter:function(e){e.preventDefault(),p({type:5})}," ":function(e){e.preventDefault(),p({type:6})}}}),[p,I]),P=(0,_.useCallback)((function(){p({type:16})}),[p]),O=(0,_.useCallback)((function(){p({type:18})}),[p]),D=(0,_.useCallback)((function(){p({type:17})}),[p]),M=(0,_.useCallback)((function(e){p({type:19,highlightedIndex:e})}),[p]),B=(0,_.useCallback)((function(e){p({type:20,selectedItem:e})}),[p]),F=(0,_.useCallback)((function(){p({type:22})}),[p]),z=(0,_.useCallback)((function(e){p({type:21,inputValue:e})}),[p]),H=(0,_.useCallback)((function(e){return(0,nr.Z)({id:E.labelId,htmlFor:E.toggleButtonId},e)}),[E]),V=(0,_.useCallback)((function(e,t){var n,r=void 0===e?{}:e,o=r.onMouseLeave,i=r.refKey,a=void 0===i?"ref":i,l=r.onKeyDown,s=r.onBlur,c=r.ref,u=(0,Dx.Z)(r,["onMouseLeave","refKey","onKeyDown","onBlur","ref"]),d=(void 0===t?{}:t).suppressRefError,m=void 0!==d&&d,f=S.current.state;return A("getMenuProps",m,a,b),(0,nr.Z)(((n={})[a]=qx(c,(function(e){b.current=e})),n.id=E.menuId,n.role="listbox",n["aria-labelledby"]=E.labelId,n.tabIndex=-1,n),f.isOpen&&f.highlightedIndex>-1&&{"aria-activedescendant":E.getItemId(f.highlightedIndex)},{onMouseLeave:$x(o,(function(){p({type:9})})),onKeyDown:$x(l,(function(e){var t=Kx(e);t&&L[t]?L[t](e):iS(t)&&p({type:7,key:t,getItemNodeFromIndex:I})})),onBlur:$x(s,(function(){!1!==w.current?!N.current.isMouseDown&&p({type:8}):w.current=!0}))},u)}),[p,S,L,N,A,E,I]);return{getToggleButtonProps:(0,_.useCallback)((function(e,t){var n,r=void 0===e?{}:e,o=r.onClick,i=r.onKeyDown,a=r.refKey,l=void 0===a?"ref":a,s=r.ref,c=(0,Dx.Z)(r,["onClick","onKeyDown","refKey","ref"]),u=(void 0===t?{}:t).suppressRefError,d=void 0!==u&&u,m=(0,nr.Z)(((n={})[l]=qx(s,(function(e){v.current=e})),n.id=E.toggleButtonId,n["aria-haspopup"]="listbox",n["aria-expanded"]=S.current.state.isOpen,n["aria-labelledby"]=E.labelId+" "+E.toggleButtonId,n),c);return c.disabled||(m.onClick=$x(o,(function(){p({type:12})})),m.onKeyDown=$x(i,(function(e){var t=Kx(e);t&&R[t]?R[t](e):iS(t)&&p({type:15,key:t,getItemNodeFromIndex:I})}))),A("getToggleButtonProps",d,l,v),m}),[p,S,R,A,E,I]),getLabelProps:H,getMenuProps:V,getItemProps:(0,_.useCallback)((function(e){var t,n=void 0===e?{}:e,r=n.item,o=n.index,i=n.onMouseMove,a=n.onClick,l=n.refKey,s=void 0===l?"ref":l,c=n.ref,u=(0,Dx.Z)(n,["item","index","onMouseMove","onClick","refKey","ref"]),d=S.current,m=d.state,f=d.props,h=function(e,t,n){return void 0!==e?e:0===n.length?-1:n.indexOf(t)}(o,r,f.items);if(h<0)throw new Error("Pass either item or item index in getItemProps!");var g=(0,nr.Z)(((t={role:"option","aria-selected":""+(h===m.highlightedIndex),id:E.getItemId(h)})[s]=qx(c,(function(e){e&&(y.current[E.getItemId(h)]=e)})),t),u);return u.disabled||(g.onMouseMove=$x(i,(function(){o!==m.highlightedIndex&&(T.current=!1,p({type:10,index:o}))})),g.onClick=$x(a,(function(){p({type:11,index:o})}))),g}),[p,S,T,E]),toggleMenu:P,openMenu:D,closeMenu:O,setHighlightedIndex:M,selectItem:B,reset:F,setInputValue:z,highlightedIndex:f,isOpen:m,selectedItem:h,inputValue:g}}wS.stateChangeTypes=bS,Bx().array.isRequired,Bx().func,Bx().func,Bx().func,Bx().bool,Bx().number,Bx().number,Bx().number,Bx().bool,Bx().bool,Bx().bool,Bx().any,Bx().any,Bx().any,Bx().string,Bx().string,Bx().string,Bx().string,Bx().string,Bx().string,Bx().func,Bx().string,Bx().string,Bx().func,Bx().func,Bx().func,Bx().func,Bx().func,Bx().func,Bx().shape({addEventListener:Bx().func,removeEventListener:Bx().func,document:Bx().shape({getElementById:Bx().func,activeElement:Bx().any,body:Bx().any})}),(0,nr.Z)({},cS,{getA11yStatusMessage:function(e){var t=e.isOpen,n=e.resultCount,r=e.previousResultCount;return t?n?n!==r?n+" result"+(1===n?" is":"s are")+" available, use up and down arrow keys to navigate. Press Enter key to select.":"":"No results are available.":""},circularNavigation:!0}),Bx().array,Bx().array,Bx().array,Bx().func,Bx().func,Bx().func,Bx().number,Bx().number,Bx().number,Bx().func,Bx().func,Bx().string,Bx().string,Bx().shape({addEventListener:Bx().func,removeEventListener:Bx().func,document:Bx().shape({getElementById:Bx().func,activeElement:Bx().any,body:Bx().any})});const kS=e=>e&&e.name,ES=({selectedItem:e},{type:t,changes:n,props:{items:r}})=>{switch(t){case wS.stateChangeTypes.ToggleButtonKeyDownArrowDown:return{selectedItem:r[e?Math.min(r.indexOf(e)+1,r.length-1):0]};case wS.stateChangeTypes.ToggleButtonKeyDownArrowUp:return{selectedItem:r[e?Math.max(r.indexOf(e)-1,0):r.length-1]};default:return n}};function _S({className:e,hideLabelFromVision:t,label:n,options:r,onChange:o,value:i}){const{getLabelProps:a,getToggleButtonProps:l,getMenuProps:s,getItemProps:c,isOpen:u,highlightedIndex:d,selectedItem:p}=wS({initialSelectedItem:r[0],items:r,itemToString:kS,onSelectedItemChange:o,selectedItem:i,stateReducer:ES}),m=s({className:"components-custom-select-control__menu","aria-hidden":!u});return m["aria-activedescendant"]&&"downshift-null"===m["aria-activedescendant"].slice(0,"downshift-null".length)&&delete m["aria-activedescendant"],(0,_.createElement)("div",{className:Cr()("components-custom-select-control",e)},t?(0,_.createElement)($i,(0,nr.Z)({as:"label"},a()),n):(0,_.createElement)("label",a({className:"components-custom-select-control__label"}),n),(0,_.createElement)(Gi,l({"aria-label":n,"aria-labelledby":void 0,className:"components-custom-select-control__button",isSmall:!0}),kS(p),(0,_.createElement)(dk,{icon:Kk,className:"components-custom-select-control__button-icon"})),(0,_.createElement)("ul",m,u&&r.map(((e,t)=>(0,_.createElement)("li",c({item:e,index:t,key:e.key,className:Cr()(e.className,"components-custom-select-control__item",{"is-highlighted":t===d}),style:e.style}),e.name,e===p&&(0,_.createElement)(dk,{icon:BE,className:"components-custom-select-control__item-icon"}))))))}const CS=[{name:U("Regular"),value:"normal"},{name:U("Italic"),value:"italic"}],xS=[{name:U("Thin"),value:"100"},{name:U("Extra Light"),value:"200"},{name:U("Light"),value:"300"},{name:U("Regular"),value:"400"},{name:U("Medium"),value:"500"},{name:U("Semi Bold"),value:"600"},{name:U("Bold"),value:"700"},{name:U("Extra Bold"),value:"800"},{name:U("Black"),value:"900"}];function SS(e){const{onChange:t,hasFontStyles:n=!0,hasFontWeights:r=!0,value:{fontStyle:o,fontWeight:i}}=e,a=n||r,l={key:"default",name:U("Default"),style:{fontStyle:void 0,fontWeight:void 0}},s=(0,_.useMemo)((()=>n&&r?(()=>{const e=[l];return CS.forEach((({name:t,value:n})=>{xS.forEach((({name:r,value:o})=>{const i="normal"===n?r:L(U("%1$s %2$s"),r,t);e.push({key:`${n}-${o}`,name:i,style:{fontStyle:n,fontWeight:o}})}))})),e})():n?(()=>{const e=[l];return CS.forEach((({name:t,value:n})=>{e.push({key:n,name:t,style:{fontStyle:n,fontWeight:void 0}})})),e})():(()=>{const e=[l];return xS.forEach((({name:t,value:n})=>{e.push({key:n,name:t,style:{fontStyle:void 0,fontWeight:n}})})),e})()),[e.options]),c=s.find((e=>e.style.fontStyle===o&&e.style.fontWeight===i));return(0,_.createElement)("fieldset",{className:"components-font-appearance-control"},a&&(0,_.createElement)(_S,{className:"components-font-appearance-control__select",label:U(n?r?"Appearance":"Font style":"Font weight"),options:s,value:c,onChange:({selectedItem:e})=>t(e.style)}))}const IS="typography.__experimentalFontStyle",TS="typography.__experimentalFontWeight";function NS(e){var t,n;const{attributes:{style:r},setAttributes:o}=e,i=!AS(e),a=!RS(e);if(!i&&!a)return null;const l=null==r||null===(t=r.typography)||void 0===t?void 0:t.fontStyle,s=null==r||null===(n=r.typography)||void 0===n?void 0:n.fontWeight;return(0,_.createElement)(SS,{onChange:e=>{o({style:B_({...r,typography:{...null==r?void 0:r.typography,fontStyle:e.fontStyle,fontWeight:e.fontWeight}})})},hasFontStyles:i,hasFontWeights:a,value:{fontStyle:l,fontWeight:s}})}function AS({name:e}={}){const t=Wl(e,IS),n=fk("typography.customFontStyle");return!t||!n}function RS({name:e}={}){const t=Wl(e,TS),n=fk("typography.customFontWeight");return!t||!n}function LS(e){const t=AS(e),n=RS(e);return t&&n}function PS({value:e="",onChange:t,fontFamilies:n,...r}){const o=fk("typography.fontFamilies");if(n||(n=o),(0,Ce.isEmpty)(n))return null;const i=[{value:"",label:U("Default")},...n.map((({fontFamily:e,name:t})=>({value:e,label:t||e})))];return(0,_.createElement)(u_,(0,nr.Z)({label:U("Font family"),options:i,value:e,onChange:t,labelPosition:"top"},r))}const OS="typography.__experimentalFontFamily";function DS({name:e,setAttributes:t,attributes:{style:n={}}}){var r;const o=fk("typography.fontFamilies");if(MS({name:e}))return null;const i=((e,t)=>{const n=/var:preset\|font-family\|(.+)/.exec(t);if(n&&n[1]){const t=(0,Ce.find)(e,(({slug:e})=>e===n[1]));if(t)return t.fontFamily}return t})(o,null===(r=n.typography)||void 0===r?void 0:r.fontFamily);return(0,_.createElement)(PS,{className:"block-editor-hooks-font-family-control",fontFamilies:o,value:i,onChange:function(e){const r=(0,Ce.find)(o,(({fontFamily:t})=>t===e));t({style:B_({...n,typography:{...n.typography||{},fontFamily:r?`var:preset|font-family|${r.slug}`:e||void 0}})})}})}function MS({name:e}){const t=fk("typography.fontFamilies");return!t||0===t.length||!Wl(e,OS)}class BS{constructor(e=""){this.value=e,this._currentValue,this._valueAsArray}entries(...e){return this._valueAsArray.entries(...e)}forEach(...e){return this._valueAsArray.forEach(...e)}keys(...e){return this._valueAsArray.keys(...e)}values(...e){return this._valueAsArray.values(...e)}get value(){return this._currentValue}set value(e){e=String(e),this._valueAsArray=(0,Ce.uniq)((0,Ce.compact)(e.split(/\s+/g))),this._currentValue=this._valueAsArray.join(" ")}get length(){return this._valueAsArray.length}toString(){return this.value}*[Symbol.iterator](){return yield*this._valueAsArray}item(e){return this._valueAsArray[e]}contains(e){return-1!==this._valueAsArray.indexOf(e)}add(...e){this.value+=" "+e.join(" ")}remove(...e){this.value=(0,Ce.without)(this._valueAsArray,...e).join(" ")}toggle(e,t){return void 0===t&&(t=!this.contains(e)),t?this.add(e):this.remove(e),t}replace(e,t){return!!this.contains(e)&&(this.remove(e),this.add(t),!0)}supports(){return!0}}const FS=(e,t,n)=>{if(t){const n=(0,Ce.find)(e,{slug:t});if(n)return n}return{size:n}};function zS(e){if(e)return`has-${(0,Ce.kebabCase)(e)}-font-size`}var HS=(0,_.createElement)(ko,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,_.createElement)(yo,{d:"M12.9 6h-2l-4 11h1.9l1.1-3h4.2l1.1 3h1.9L12.9 6zm-2.5 6.5l1.5-4.9 1.7 4.9h-3.2z"}));const VS="default",WS="custom";var ZS=(0,_.forwardRef)((function({fallbackFontSize:e,fontSizes:t=[],disableCustomFontSizes:n=!1,onChange:r,value:o,withSlider:i=!1},a){const l=(0,Ce.isString)(o)||t[0]&&(0,Ce.isString)(t[0].size);let s;s=l?parseInt(o):o;const c=(0,Ce.isNumber)(o)||(0,Ce.isString)(o)&&o.endsWith("px"),u=Xv({availableUnits:["px","em","rem"]}),d=(0,_.useMemo)((()=>function(e,t){return t&&!e.length?null:(e=[{slug:VS,name:U("Default")},...e,...t?[]:[{slug:WS,name:U("Custom")}]]).map((e=>({key:e.slug,name:e.name,size:e.size,style:{fontSize:`min( ${e.size}, 25px )`}})))}(t,n)),[t,n]);if(!d)return null;const p=function(e,t){if(t){const n=e.find((e=>e.size===t));return n?n.slug:WS}return VS}(t,o);return(0,_.createElement)("fieldset",(0,nr.Z)({className:"components-font-size-picker"},a?{}:{ref:a}),(0,_.createElement)($i,{as:"legend"},U("Font size")),(0,_.createElement)("div",{className:"components-font-size-picker__controls"},t.length>0&&(0,_.createElement)(_S,{className:"components-font-size-picker__select",label:U("Font size"),options:d,value:d.find((e=>e.key===p)),onChange:({selectedItem:e})=>{r(l?e.size:Number(e.size))}}),!i&&!n&&(0,_.createElement)(uk,{label:U("Custom"),labelPosition:"top",__unstableInputWidth:"60px",value:o,onChange:e=>{0!==parseFloat(e)&&e?r(l?e:parseInt(e,10)):r(void 0)},units:!!l&&u}),(0,_.createElement)(Gi,{className:"components-color-palette__clear",disabled:void 0===o,onClick:()=>{r(void 0)},isSmall:!0,variant:"secondary"},U("Reset"))),i&&(0,_.createElement)(hC,{className:"components-font-size-picker__custom-input",label:U("Custom Size"),value:c&&s||"",initialPosition:e,onChange:e=>{r(l?e+"px":e)},min:12,max:100,beforeIcon:HS,afterIcon:HS}))})),jS=function(e){const t=fk("typography.fontSizes"),n=!fk("typography.customFontSize");return(0,_.createElement)(ZS,(0,nr.Z)({},e,{fontSizes:t,disableCustomFontSizes:n}))};const US="typography.fontSize";function $S(e,t,n){if(!Wl(t,US))return e;if(Wl(t,"typography.__experimentalSkipSerialization"))return e;const r=new BS(e.className);r.add(zS(n.fontSize));const o=r.value;return e.className=o||void 0,e}function qS(e){var t,n;const{attributes:{fontSize:r,style:o},setAttributes:i}=e,a=GS(e),l=fk("typography.fontSizes");if(a)return null;const s=FS(l,r,null==o||null===(t=o.typography)||void 0===t?void 0:t.fontSize),c=(null==s?void 0:s.size)||(null==o||null===(n=o.typography)||void 0===n?void 0:n.fontSize)||r;return(0,_.createElement)(jS,{onChange:e=>{const t=function(e,t){return(0,Ce.find)(e,{size:t})||{size:t}}(l,e).slug;i({style:B_({...o,typography:{...null==o?void 0:o.typography,fontSize:t?void 0:e}}),fontSize:t})},value:c})}function GS({name:e}={}){const t=fk("typography.fontSizes"),n=!(null==t||!t.length);return!Wl(e,US)||!n}const KS=Ea((e=>t=>{var n,r;const o=fk("typography.fontSizes"),{name:i,attributes:{fontSize:a,style:l},wrapperProps:s}=t;if(!Wl(i,US)||Wl(i,"typography.__experimentalSkipSerialization")||!a||null!=l&&null!==(n=l.typography)&&void 0!==n&&n.fontSize)return(0,_.createElement)(e,t);const c=FS(o,a,null==l||null===(r=l.typography)||void 0===r?void 0:r.fontSize).size,u={...t,wrapperProps:{...s,style:{fontSize:c,...null==s?void 0:s.style}}};return(0,_.createElement)(e,u)}),"withFontSizeInlineStyles");function YS({value:e,onChange:t}){const n=Xv({availableUnits:fk("spacing.units")||["px","em","rem"],defaultValues:{px:"2",em:".2",rem:".2"}});return(0,_.createElement)(uk,{label:U("Letter-spacing"),value:e,__unstableInputWidth:"60px",units:n,onChange:t})}(0,W.KJ)("blocks.registerBlockType","core/font/addAttribute",(function(e){return Wl(e,US)?(e.attributes.fontSize||Object.assign(e.attributes,{fontSize:{type:"string"}}),e):e})),(0,W.KJ)("blocks.getSaveContent.extraProps","core/font/addSaveProps",$S),(0,W.KJ)("blocks.registerBlockType","core/font/addEditProps",(function(e){if(!Wl(e,US))return e;const t=e.getEditWrapperProps;return e.getEditWrapperProps=n=>{let r={};return t&&(r=t(n)),$S(r,e,n)},e})),(0,W.KJ)("editor.BlockListBlock","core/font-size/with-font-size-inline-styles",KS);const XS="__experimentalLetterSpacing";function JS(e){var t;const{attributes:{style:n},setAttributes:r}=e;return QS(e)?null:(0,_.createElement)(YS,{value:null==n||null===(t=n.typography)||void 0===t?void 0:t.letterSpacing,onChange:function(e){r({style:B_({...n,typography:{...null==n?void 0:n.typography,letterSpacing:e}})})}})}function QS({name:e}={}){const t=!Wl(e,XS),n=fk("typography.customLetterSpacing");return t||!n}const eI=[Lx,US,IS,TS,OS,yx,Ix,XS];function tI(e){const t=function(e={}){const t=[LS(e),GS(e),Ox(e),MS(e),kx(e),Nx(e),QS(e)];return t.filter(Boolean).length===t.length}(e),n=nI(e.name);return t||!n?null:(0,_.createElement)(lE,null,(0,_.createElement)(Jk,{title:U("Typography")},(0,_.createElement)(DS,e),(0,_.createElement)(qS,e),(0,_.createElement)(NS,e),(0,_.createElement)(Px,e),(0,_.createElement)(Ax,e),(0,_.createElement)(JS,e)))}const nI=e=>"web"===Jp&&eI.some((t=>Wl(e,t)));var rI=(0,_.createElement)(ko,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,_.createElement)(yo,{d:"M11 13h2v-2h-2v2zm-6 0h2v-2H5v2zm12-2v2h2v-2h-2z"})),oI=function e({children:t,className:n="",label:r,hideSeparator:o}){const i=Rb(e);if(!_.Children.count(t))return null;const a=`components-menu-group-label-${i}`,l=Cr()(n,"components-menu-group",{"has-hidden-separator":o});return(0,_.createElement)("div",{className:l},r&&(0,_.createElement)("div",{className:"components-menu-group__label",id:a,"aria-hidden":"true"},r),(0,_.createElement)("div",{role:"group","aria-labelledby":r?a:null},t))},iI=(0,_.forwardRef)((function({children:e,info:t,className:n,icon:r,shortcut:o,isSelected:i,role:a="menuitem",...l},s){return n=Cr()("components-menu-item__button",n),t&&(e=(0,_.createElement)("span",{className:"components-menu-item__info-wrapper"},(0,_.createElement)("span",{className:"components-menu-item__item"},e),(0,_.createElement)("span",{className:"components-menu-item__info"},t))),r&&!(0,Ce.isString)(r)&&(r=(0,_.cloneElement)(r,{className:"components-menu-items__item-icon"})),(0,_.createElement)(Gi,(0,nr.Z)({ref:s,"aria-checked":"menuitemcheckbox"===a||"menuitemradio"===a?i:void 0,role:a,className:n},l),(0,_.createElement)("span",{className:"components-menu-item__item"},e),(0,_.createElement)(So,{className:"components-menu-item__shortcut",shortcut:o}),r&&(0,_.createElement)(Oo,{icon:r}))}));const aI=(0,pb.iv)("border-top:",Qb.borderWidth," solid ",Nb.gray[200],";column-gap:",Pb(4),";display:grid;grid-template-columns:1fr 1fr;margin-top:-1px;padding:",Pb(4),";row-gap:",Pb(6),";",""),lI=(0,pb.iv)("align-items:center;display:flex;font-size:inherit;font-weight:500;grid-column:span 2;justify-content:space-between;line-height:normal;.components-tools-panel &{margin:0;}.components-dropdown-menu{margin-top:",Pb(-1),";margin-bottom:",Pb(-1),";height:",Pb(6),";}.components-dropdown-menu__toggle{padding:0;height:",Pb(6),";min-width:",Pb(6),";width:",Pb(6),";}",""),sI={name:"12lwk96",styles:"grid-column:span 2;&.single-column{grid-column:span 1;}&>div,&>fieldset{padding-bottom:0;margin-bottom:0;max-width:100%;}"},cI=(0,_.createContext)({}),uI=()=>(0,_.useContext)(cI);var dI=Ei(((e,t)=>{const{hasMenuItems:n,header:r,menuItems:o,menuLabel:i,resetAll:a,toggleItem:l,...s}=function(e){const{className:t,...n}=wi(e,"ToolsPanelHeader"),r=bi(),o=(0,_.useMemo)((()=>r(lI,t)),[t]),{menuItems:i}=uI();return{...n,hasMenuItems:!!Object.entries(i).length,menuItems:i,className:o}}(e);return r?(0,_.createElement)("h2",(0,nr.Z)({},s,{ref:t}),r,n&&(0,_.createElement)(Rp,{icon:rI,label:i},(({onClose:e})=>(0,_.createElement)(_.Fragment,null,(0,_.createElement)(oI,{label:U("Display options")},Object.entries(o).map((([t,n])=>(0,_.createElement)(iI,{key:t,icon:n&&BE,isSelected:n,onClick:()=>{l(t),e()},role:"menuitemcheckbox"},t)))),(0,_.createElement)(oI,null,(0,_.createElement)(iI,{onClick:()=>{a(),e()}},U("Reset all"))))))):null}),"ToolsPanelHeader"),pI=Ei(((e,t)=>{const{children:n,header:r,label:o,panelContext:i,resetAllItems:a,toggleItem:l,...s}=function(e){const{className:t,resetAll:n,...r}=wi(e,"ToolsPanel"),o=bi(),i=(0,_.useMemo)((()=>o(aI,t)),[t]),[a,l]=(0,_.useState)([]),[s,c]=(0,_.useState)({});return(0,_.useEffect)((()=>{const e={};a.forEach((({hasValue:t,isShownByDefault:n,label:r})=>{e[r]=n||t()})),c(e)}),[a]),{...r,panelContext:{menuItems:s,registerPanelItem:e=>{l((t=>[...t,e]))}},resetAllItems:()=>{"function"==typeof n&&n();const e={};a.forEach((({label:t,isShownByDefault:n})=>{e[t]=!!n})),c(e)},toggleItem:e=>{c({...s,[e]:!s[e]})},className:i}}(e);return(0,_.createElement)(Ui,(0,nr.Z)({},s,{ref:t}),(0,_.createElement)(cI.Provider,{value:i},(0,_.createElement)(dI,{header:r,menuLabel:o,resetAll:a,toggleItem:l}),n))}),"ToolsPanel");function mI(e){const t=(0,_.useRef)(void 0);return(0,_.useEffect)((()=>{t.current=e}),[e]),t.current}var fI=Ei(((e,t)=>{const{children:n,isShown:r,...o}=function(e){const{className:t,hasValue:n,isShownByDefault:r,label:o,onDeselect:i=(()=>{}),onSelect:a=(()=>{}),...l}=wi(e,"ToolsPanelItem"),s=bi(),c=(0,_.useMemo)((()=>s(sI,t))),{menuItems:u,registerPanelItem:d}=uI();(0,_.useEffect)((()=>{d({hasValue:n,isShownByDefault:r,label:o})}),[]);const p=n(),m=u[o],f=mI(m);return(0,_.useEffect)((()=>{!m||p||f||a(),!m&&f&&i()}),[m,f,p]),{...l,isShown:m,className:c}}(e);return r?(0,_.createElement)(Ui,(0,nr.Z)({},o,{ref:t}),n):null}),"ToolsPanelItem");const hI=Zi("div",{target:"e7pk0lh6"})({name:"14bvcyk",styles:"box-sizing:border-box;max-width:235px;padding-bottom:12px;width:100%"}),gI=Zi(Vb,{target:"e7pk0lh5"})("color:",Nb.ui.label,";padding-bottom:8px;"),vI=Zi(Vb,{target:"e7pk0lh4"})({name:"aujtid",styles:"min-height:30px;gap:0"}),bI=Zi("div",{target:"e7pk0lh3"})({name:"112jwab",styles:"box-sizing:border-box;max-width:80px"}),yI=Zi(Vb,{target:"e7pk0lh2"})({name:"xy18ro",styles:"justify-content:center;padding-top:8px"}),wI=Zi(Vb,{target:"e7pk0lh1"})({name:"3tw5wk",styles:"position:relative;height:100%;width:100%;justify-content:flex-start"});var kI={name:"1ch9yvl",styles:"border-radius:0"},EI={name:"tg3mx0",styles:"border-radius:2px"};const _I=({isFirst:e,isLast:t,isOnly:n})=>e?vb({borderTopRightRadius:0,borderBottomRightRadius:0})():t?vb({borderTopLeftRadius:0,borderBottomLeftRadius:0})():n?EI:kI,CI=({isFirst:e,isOnly:t})=>vb({marginLeft:e||t?0:-1})(),xI=Zi(uk,{target:"e7pk0lh0"})("max-width:60px;",_I,";",CI,";");function SI({isFirst:e,isLast:t,isOnly:n,onHoverOn:r=Ce.noop,onHoverOff:o=Ce.noop,label:i,value:a,...l}){const s=function(e,t){void 0===t&&(t={}),mw.set("hover",zw);var n=(0,_.useRef)();return n.current||(n.current=Mw(cw,Fw)),Rw({hover:({event:e,...t})=>{t.hovering?r(e,t):o(e,t)}},n.current(t))}();return(0,_.createElement)(bI,s(),(0,_.createElement)(II,{text:i},(0,_.createElement)(xI,(0,nr.Z)({"aria-label":i,className:"component-box-control__unit-control",hideHTMLArrows:!0,isFirst:e,isLast:t,isOnly:n,isPressEnterToChange:!0,isResetValueOnUnitChange:!1,value:a},l))))}function II({children:e,text:t}){return t?(0,_.createElement)(Lo,{text:t,position:"top"},(0,_.createElement)("div",null,e)):e}const TI={all:U("All"),top:U("Top"),bottom:U("Bottom"),left:U("Left"),right:U("Right"),mixed:U("Mixed"),vertical:U("Vertical"),horizontal:U("Horizontal")},NI={top:null,right:null,bottom:null,left:null},AI={top:!1,right:!1,bottom:!1,left:!1},RI=["top","right","bottom","left"];function LI(e){return e.sort(((t,n)=>e.filter((e=>e===t)).length-e.filter((e=>e===n)).length)).pop()}function PI(e={},t=RI){const n=function(e){const t=[];if(null==e||!e.length)return RI;if(e.includes("vertical"))t.push("top","bottom");else if(e.includes("horizontal"))t.push("left","right");else{const n=RI.filter((t=>e.includes(t)));t.push(...n)}return t}(t).map((t=>Kv(e[t]))),r=n.map((e=>e[0])),o=n.map((e=>e[1])),i=r.every((e=>e===r[0]))?r[0]:"",a=LI(o);return(0,Ce.isNumber)(i)?`${i}${a}`:null}function OI(e={},t=RI){const n=PI(e,t);return isNaN(parseFloat(n))}function DI(e){return void 0!==e&&!(0,Ce.isEmpty)(Object.values(e).filter((e=>!!e&&/\d/.test(e))))}function MI(e,t){let n="all";return e||(n=t?"vertical":"top"),n}function BI({onChange:e=Ce.noop,onFocus:t=Ce.noop,onHoverOn:n=Ce.noop,onHoverOff:r=Ce.noop,values:o,sides:i,selectedUnits:a,setSelectedUnits:l,...s}){const c=PI(o,i),u=DI(o)&&OI(o,i),d=u?TI.mixed:null,p=c?void 0:function(e){if(e&&"object"==typeof e)return LI(Object.values(e).filter(Boolean))}(a),m=(e,t)=>{const n={...e};return null!=i&&i.length?i.forEach((e=>{"vertical"===e?(n.top=t,n.bottom=t):"horizontal"===e?(n.left=t,n.right=t):n[e]=t})):RI.forEach((e=>n[e]=t)),n};return(0,_.createElement)(SI,(0,nr.Z)({},s,{disableUnits:u,isOnly:!0,value:c,unit:p,onChange:t=>{const n=!isNaN(parseFloat(t)),r=m(o,n?t:void 0);e(r)},onUnitChange:e=>{const t=m(a,e);l(t)},onFocus:e=>{t(e,{side:"all"})},onHoverOn:()=>{n({top:!0,bottom:!0,left:!0,right:!0})},onHoverOff:()=>{r({top:!1,bottom:!1,left:!1,right:!1})},placeholder:d}))}function FI({onChange:e=Ce.noop,onFocus:t=Ce.noop,onHoverOn:n=Ce.noop,onHoverOff:r=Ce.noop,values:o,selectedUnits:i,setSelectedUnits:a,sides:l,...s}){const c=e=>n=>{t(n,{side:e})},u=e=>()=>{n({[e]:!0})},d=e=>()=>{r({[e]:!1})},p=t=>(n,{event:r})=>{const{altKey:i}=r,a={...o},l=isNaN(parseFloat(n))?void 0:n;if(a[t]=l,i)switch(t){case"top":a.bottom=l;break;case"bottom":a.top=l;break;case"left":a.right=l;break;case"right":a.left=l}(t=>{e(t)})(a)},m=e=>t=>{const n={...i};n[e]=t,a(n)},f=null!=l&&l.length?RI.filter((e=>l.includes(e))):RI,h=f[0],g=f[f.length-1],v=h===g&&h;return(0,_.createElement)(yI,{className:"component-box-control__input-controls-wrapper"},(0,_.createElement)(wI,{gap:0,align:"top",className:"component-box-control__input-controls"},f.map((e=>(0,_.createElement)(SI,(0,nr.Z)({},s,{isFirst:h===e,isLast:g===e,isOnly:v===e,value:o[e],unit:o[e]?void 0:i[e],onChange:p(e),onUnitChange:m(e),onFocus:c(e),onHoverOn:u(e),onHoverOff:d(e),label:TI[e],key:`box-control-${e}`}))))))}const zI=["vertical","horizontal"];function HI({onChange:e,onFocus:t,onHoverOn:n,onHoverOff:r,values:o,selectedUnits:i,setSelectedUnits:a,sides:l,...s}){const c=e=>n=>{t&&t(n,{side:e})},u=e=>()=>{n&&("vertical"===e&&n({top:!0,bottom:!0}),"horizontal"===e&&n({left:!0,right:!0}))},d=e=>()=>{r&&("vertical"===e&&r({top:!1,bottom:!1}),"horizontal"===e&&r({left:!1,right:!1}))},p=t=>n=>{if(!e)return;const r={...o},i=isNaN(parseFloat(n))?void 0:n;"vertical"===t&&(r.top=i,r.bottom=i),"horizontal"===t&&(r.left=i,r.right=i),e(r)},m=e=>t=>{const n={...i};"vertical"===e&&(n.top=t,n.bottom=t),"horizontal"===e&&(n.left=t,n.right=t),a(n)},f=null!=l&&l.length?zI.filter((e=>l.includes(e))):zI,h=f[0],g=f[f.length-1],v=h===g;return(0,_.createElement)(wI,{gap:0,align:"top",className:"component-box-control__vertical-horizontal-input-controls"},f.map((e=>(0,_.createElement)(SI,(0,nr.Z)({},s,{isFirst:h===e,isLast:g===e,isOnly:v===e,value:"vertical"===e?o.top:o.left,unit:"vertical"===e?i.top:i.left,onChange:p(e),onUnitChange:m(e),onFocus:c(e),onHoverOn:u(e),onHoverOff:d(e),label:TI[e],key:e})))))}const VI=Zi("span",{target:"eaw9yqk8"})({name:"1w884gc",styles:"box-sizing:border-box;display:block;width:24px;height:24px;position:relative;padding:4px"}),WI=Zi("span",{target:"eaw9yqk7"})({name:"i6vjox",styles:"box-sizing:border-box;display:block;position:relative;width:100%;height:100%"}),ZI=Zi("span",{target:"eaw9yqk6"})("box-sizing:border-box;display:block;pointer-events:none;position:absolute;",(({isFocused:e})=>(0,pb.iv)({backgroundColor:"currentColor",opacity:e?1:.3},"","")),";"),jI=Zi(ZI,{target:"eaw9yqk5"})({name:"1k2w39q",styles:"bottom:3px;top:3px;width:2px"}),UI=Zi(ZI,{target:"eaw9yqk4"})({name:"1q9b07k",styles:"height:2px;left:3px;right:3px"}),$I=Zi(UI,{target:"eaw9yqk3"})({name:"abcix4",styles:"top:0"}),qI=Zi(jI,{target:"eaw9yqk2"})({name:"1wf8jf",styles:"right:0"}),GI=Zi(UI,{target:"eaw9yqk1"})({name:"8tapst",styles:"bottom:0"}),KI=Zi(jI,{target:"eaw9yqk0"})({name:"1ode3cm",styles:"left:0"});function YI({size:e=24,side:t="all",sides:n,...r}){const o=e=>!(e=>(null==n?void 0:n.length)&&!n.includes(e))(e)&&("all"===t||t===e),i=o("top")||o("vertical"),a=o("right")||o("horizontal"),l=o("bottom")||o("vertical"),s=o("left")||o("horizontal"),c=e/24;return(0,_.createElement)(VI,(0,nr.Z)({style:{transform:`scale(${c})`}},r),(0,_.createElement)(WI,null,(0,_.createElement)($I,{isFocused:i}),(0,_.createElement)(qI,{isFocused:a}),(0,_.createElement)(GI,{isFocused:l}),(0,_.createElement)(KI,{isFocused:s})))}function XI({isLinked:e,...t}){const n=U(e?"Unlink Sides":"Link Sides");return(0,_.createElement)(Lo,{text:n},(0,_.createElement)("span",null,(0,_.createElement)(Gi,(0,nr.Z)({},t,{className:"component-box-control__linked-button",variant:e?"primary":"secondary",isSmall:!0,icon:e?_C:CC,iconSize:16,"aria-label":n}))))}var JI={name:"11f5o9n",styles:"bottom:0;left:0;pointer-events:none;position:absolute;right:0;top:0;z-index:1"};const QI=Zi("div",{target:"e1df9b4q5"})("box-sizing:border-box;position:relative;",(({isPositionAbsolute:e})=>e?JI:""),";"),eT=Zi("div",{target:"e1df9b4q4"})("box-sizing:border-box;background:",Nb.blue.wordpress[700],";background:",Nb.ui.theme,";filter:brightness( 1 );opacity:0;position:absolute;pointer-events:none;transition:opacity 120ms linear;z-index:1;",(({isActive:e})=>e&&"\n\t\topacity: 0.3;\n\t"),";"),tT=Zi(eT,{target:"e1df9b4q3"})({name:"5i97ct",styles:"top:0;left:0;right:0"}),nT=Zi(eT,{target:"e1df9b4q2"})("top:0;bottom:0;",vb({right:0}),";"),rT=Zi(eT,{target:"e1df9b4q1"})({name:"8cxke2",styles:"bottom:0;left:0;right:0"}),oT=Zi(eT,{target:"e1df9b4q0"})("top:0;bottom:0;",vb({left:0}),";");function iT({showValues:e=AI,values:t}){const{top:n,right:r,bottom:o,left:i}=t;return(0,_.createElement)(_.Fragment,null,(0,_.createElement)(aT,{isVisible:e.top,value:n}),(0,_.createElement)(lT,{isVisible:e.right,value:r}),(0,_.createElement)(sT,{isVisible:e.bottom,value:o}),(0,_.createElement)(cT,{isVisible:e.left,value:i}))}function aT({isVisible:e=!1,value:t}){const n=t,r=uT(n).isActive||e;return(0,_.createElement)(tT,{isActive:r,style:{height:n}})}function lT({isVisible:e=!1,value:t}){const n=t,r=uT(n).isActive||e;return(0,_.createElement)(nT,{isActive:r,style:{width:n}})}function sT({isVisible:e=!1,value:t}){const n=t,r=uT(n).isActive||e;return(0,_.createElement)(rT,{isActive:r,style:{height:n}})}function cT({isVisible:e=!1,value:t}){const n=t,r=uT(n).isActive||e;return(0,_.createElement)(oT,{isActive:r,style:{width:n}})}function uT(e){const[t,n]=(0,_.useState)(!1),r=(0,_.useRef)(e),o=(0,_.useRef)(),i=()=>{o.current&&window.clearTimeout(o.current)};return(0,_.useEffect)((()=>(e!==r.current&&(n(!0),r.current=e,i(),o.current=setTimeout((()=>{n(!1)}),400)),()=>i())),[e]),{isActive:t}}const dT={min:0};function pT({id:e,inputProps:t=dT,onChange:n=Ce.noop,onChangeShowVisualizer:r=Ce.noop,label:o=U("Box Control"),values:i,units:a,sides:l,splitOnAxis:s=!1,allowReset:c=!0,resetValues:u=NI}){const[d,p]=ck(i,{fallback:NI}),m=d||NI,f=DI(i),h=1===(null==l?void 0:l.length),[g,v]=(0,_.useState)(f),[b,y]=(0,_.useState)(!f||!OI(m)||h),[w,k]=(0,_.useState)(MI(b,s)),[E,C]=(0,_.useState)({top:Kv(null==i?void 0:i.top)[1],right:Kv(null==i?void 0:i.right)[1],bottom:Kv(null==i?void 0:i.bottom)[1],left:Kv(null==i?void 0:i.left)[1]}),x=function(e){const t=Rb(pT,"inspector-box-control");return e||t}(e),S=`${x}-heading`,I={...t,onChange:e=>{n(e),p(e),v(!0)},onFocus:(e,{side:t})=>{k(t)},onHoverOn:(e={})=>{r({...AI,...e})},onHoverOff:(e={})=>{r({...AI,...e})},isLinked:b,units:a,selectedUnits:E,setSelectedUnits:C,sides:l,values:m};return(0,_.createElement)(hI,{id:x,role:"region","aria-labelledby":S},(0,_.createElement)(gI,{className:"component-box-control__header"},(0,_.createElement)(jb,null,(0,_.createElement)(py,{id:S,className:"component-box-control__label"},o)),c&&(0,_.createElement)(jb,null,(0,_.createElement)(Gi,{className:"component-box-control__reset-button",isSecondary:!0,isSmall:!0,onClick:()=>{n(u),p(u),C(u),v(!1)},disabled:!g},U("Reset")))),(0,_.createElement)(vI,{className:"component-box-control__header-control-wrapper"},(0,_.createElement)(jb,null,(0,_.createElement)(YI,{side:w,sides:l})),b&&(0,_.createElement)(HE,null,(0,_.createElement)(BI,(0,nr.Z)({"aria-label":o},I))),!b&&s&&(0,_.createElement)(HE,null,(0,_.createElement)(HI,I)),!h&&(0,_.createElement)(jb,null,(0,_.createElement)(XI,{onClick:()=>{y(!b),k(MI(!b,s))},isLinked:b}))),!b&&!s&&(0,_.createElement)(FI,I))}function mT(e){const t=Vl(e,yT);return!!(!0===t||null!=t&&t.margin)}function fT({name:e}={}){const t=!fk("spacing.customMargin");return!mT(e)||t}function hT(e){var t;const{name:n,attributes:{style:r},setAttributes:o}=e,i=Xv({availableUnits:fk("spacing.units")||["%","px","em","rem","vw"]}),a=ET(n,"margin");return fT(e)?null:Qp({web:(0,_.createElement)(_.Fragment,null,(0,_.createElement)(pT,{values:null==r||null===(t=r.spacing)||void 0===t?void 0:t.margin,onChange:e=>{const t={...r,spacing:{...null==r?void 0:r.spacing,margin:e}};o({style:B_(t)})},onChangeShowVisualizer:e=>{const t={...r,visualizers:{margin:e}};o({style:B_(t)})},label:U("Margin"),sides:a,units:i,allowReset:!1})),native:null})}function gT(e){const t=Vl(e,yT);return!!(!0===t||null!=t&&t.padding)}function vT({name:e}={}){const t=!fk("spacing.customPadding");return!gT(e)||t}function bT(e){var t;const{name:n,attributes:{style:r},setAttributes:o}=e,i=Xv({availableUnits:fk("spacing.units")||["%","px","em","rem","vw"]}),a=ET(n,"padding");return vT(e)?null:Qp({web:(0,_.createElement)(_.Fragment,null,(0,_.createElement)(pT,{values:null==r||null===(t=r.spacing)||void 0===t?void 0:t.padding,onChange:e=>{const t={...r,spacing:{...null==r?void 0:r.spacing,padding:e}};o({style:B_(t)})},onChangeShowVisualizer:e=>{const t={...r,visualizers:{padding:e}};o({style:B_(t)})},label:U("Padding"),sides:a,units:i,allowReset:!1})),native:null})}pT.__Visualizer=function({children:e,showValues:t=AI,values:n=NI,...r}){const o=!e;return(0,_.createElement)(QI,(0,nr.Z)({},r,{isPositionAbsolute:o,"aria-hidden":"true"}),(0,_.createElement)(iT,{showValues:t,values:n}),e)};const yT="spacing";function wT(e){const t=vT(e),n=fT(e),r=kT(e),o=(i=e.name,"web"===Jp&&(gT(i)||mT(i)));var i;if(r||!o)return null;const a=Vl(e.name,[yT,"__experimentalDefaultControls"]);return(0,_.createElement)(lE,{key:"dimensions"},(0,_.createElement)(pI,{label:U("Dimensions options"),header:U("Dimensions"),resetAll:()=>{const{style:t}=e.attributes;e.setAttributes({style:B_({...t,spacing:{...null==t?void 0:t.spacing,margin:void 0,padding:void 0}})})}},!t&&(0,_.createElement)(fI,{hasValue:()=>function(e){var t,n;return void 0!==(null===(t=e.attributes.style)||void 0===t||null===(n=t.spacing)||void 0===n?void 0:n.padding)}(e),label:U("Padding"),onDeselect:()=>function({attributes:e={},setAttributes:t}){const{style:n}=e;t({style:B_({...n,spacing:{...null==n?void 0:n.spacing,padding:void 0}})})}(e),isShownByDefault:null==a?void 0:a.padding},(0,_.createElement)(bT,e)),!n&&(0,_.createElement)(fI,{hasValue:()=>function(e){var t,n;return void 0!==(null===(t=e.attributes.style)||void 0===t||null===(n=t.spacing)||void 0===n?void 0:n.margin)}(e),label:U("Margin"),onDeselect:()=>function({attributes:e={},setAttributes:t}){const{style:n}=e;t({style:B_({...n,spacing:{...null==n?void 0:n.spacing,margin:void 0}})})}(e),isShownByDefault:null==a?void 0:a.margin},(0,_.createElement)(hT,e))))}const kT=(e={})=>{const t=vT(e),n=fT(e);return t&&n};function ET(e,t){const n=Vl(e,yT);if("boolean"!=typeof n[t])return n[t]}const _T=[...eI,BC,ax,yT],CT=e=>_T.some((t=>Wl(e,t))),xT="var:";function ST(e){return(0,Ce.startsWith)(e,xT)?`var(--wp--${e.slice(xT.length).split("|").join("--")})`:e}function IT(e={}){const t={};return Object.keys(Tl).forEach((n=>{const r=Tl[n].value,o=Tl[n].properties;if((0,Ce.has)(e,r)&&"elements"!==(0,Ce.first)(r)){const i=(0,Ce.get)(e,r);o&&!(0,Ce.isString)(i)?Object.entries(o).forEach((e=>{const[n,r]=e,o=(0,Ce.get)(i,[r]);o&&(t[n]=ST(o))})):t[n]=ST((0,Ce.get)(e,r))}})),t}const TT={"__experimentalBorder.__experimentalSkipSerialization":["border"],"color.__experimentalSkipSerialization":[ax],"typography.__experimentalSkipSerialization":["typography"],[`${yT}.__experimentalSkipSerialization`]:["spacing"]};function NT(e,t,n){if(!CT(t))return e;let{style:r}=n;return(0,Ce.forEach)(TT,((e,n)=>{Vl(t,n)&&(r=(0,Ce.omit)(r,e))})),e.style={...IT(r),...e.style},e}const AT=Ea((e=>t=>{const n=Tv();return(0,_.createElement)(_.Fragment,null,n&&(0,_.createElement)(_.Fragment,null,(0,_.createElement)(tI,t),(0,_.createElement)(FC,t),(0,_.createElement)(mx,t),(0,_.createElement)(wT,t)),(0,_.createElement)(e,t))}),"withToolbarControls"),RT=Ea((e=>t=>{var n,r;const o=null===(n=t.attributes.style)||void 0===n?void 0:n.elements,i=`wp-elements-${Rb(e)}`,a=function(e,t={}){return(0,Ce.map)(t,((t,n)=>{const r=IT(t);return(0,Ce.isEmpty)(r)?"":[`.${e} ${Nl[n]}{`,...(0,Ce.map)(r,((e,t)=>`\t${(0,Ce.kebabCase)(t)}: ${e}${"link"===n?"!important":""};`)),"}"].join("\n")})).join("\n")}(i,null===(r=t.attributes.style)||void 0===r?void 0:r.elements);return(0,_.createElement)(_.Fragment,null,o&&(0,_.createElement)("style",{dangerouslySetInnerHTML:{__html:a}}),(0,_.createElement)(e,(0,nr.Z)({},t,{className:o?Cr()(t.className,i):t.className})))}));(0,W.KJ)("blocks.registerBlockType","core/style/addAttribute",(function(e){return CT(e)?(e.attributes.style||Object.assign(e.attributes,{style:{type:"object"}}),e):e})),(0,W.KJ)("blocks.getSaveContent.extraProps","core/style/addSaveProps",NT),(0,W.KJ)("blocks.registerBlockType","core/style/addEditProps",(function(e){if(!CT(e))return e;const t=e.getEditWrapperProps;return e.getEditWrapperProps=n=>{let r={};return t&&(r=t(n)),NT(r,e,n)},e})),(0,W.KJ)("editor.BlockEdit","core/style/with-block-controls",AT),(0,W.KJ)("editor.BlockListBlock","core/editor/with-elements-styles",RT);var LT=(0,_.createElement)(ko,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,_.createElement)(yo,{d:"M5 17.7c.4.5.8.9 1.2 1.2l1.1-1.4c-.4-.3-.7-.6-1-1L5 17.7zM5 6.3l1.4 1.1c.3-.4.6-.7 1-1L6.3 5c-.5.4-.9.8-1.3 1.3zm.1 7.8l-1.7.5c.2.6.4 1.1.7 1.6l1.5-.8c-.2-.4-.4-.8-.5-1.3zM4.8 12v-.7L3 11.1v1.8l1.7-.2c.1-.2.1-.5.1-.7zm3 7.9c.5.3 1.1.5 1.6.7l.5-1.7c-.5-.1-.9-.3-1.3-.5l-.8 1.5zM19 6.3c-.4-.5-.8-.9-1.2-1.2l-1.1 1.4c.4.3.7.6 1 1L19 6.3zm-.1 3.6l1.7-.5c-.2-.6-.4-1.1-.7-1.6l-1.5.8c.2.4.4.8.5 1.3zM5.6 8.6l-1.5-.8c-.3.5-.5 1-.7 1.6l1.7.5c.1-.5.3-.9.5-1.3zm2.2-4.5l.8 1.5c.4-.2.8-.4 1.3-.5l-.5-1.7c-.6.2-1.1.4-1.6.7zm8.8 13.5l1.1 1.4c.5-.4.9-.8 1.2-1.2l-1.4-1.1c-.2.3-.5.6-.9.9zm1.8-2.2l1.5.8c.3-.5.5-1.1.7-1.6l-1.7-.5c-.1.5-.3.9-.5 1.3zm2.6-4.3l-1.7.2v1.4l1.7.2V12v-.9zM11.1 3l.2 1.7h1.4l.2-1.7h-1.8zm3 2.1c.5.1.9.3 1.3.5l.8-1.5c-.5-.3-1.1-.5-1.6-.7l-.5 1.7zM12 19.2h-.7l-.2 1.8h1.8l-.2-1.7c-.2-.1-.5-.1-.7-.1zm2.1-.3l.5 1.7c.6-.2 1.1-.4 1.6-.7l-.8-1.5c-.4.2-.8.4-1.3.5z"})),PT=function({fill:e}){return e?(0,_.createElement)("span",{className:"components-swatch",style:{background:e}}):(0,_.createElement)(Oo,{icon:LT})};function OT(e=[],t="90deg"){const n=100/e.length;return`linear-gradient( ${t}, ${e.map(((e,t)=>`${e} ${t*n}%, ${e} ${(t+1)*n}%`)).join(", ")} )`}var DT=function({values:e}){return(0,_.createElement)(PT,{fill:e&&OT(e,"135deg")})};function MT({label:e,value:t,colors:n,disableCustomColors:r,onChange:o}){const[i,a]=(0,_.useState)(!1);return(0,_.createElement)(_.Fragment,null,(0,_.createElement)(Gi,{className:"components-color-list-picker__swatch-button",icon:(0,_.createElement)(PT,{fill:t}),onClick:()=>a((e=>!e))},e),i&&(0,_.createElement)(zE,{colors:n,value:t,clearable:!1,onChange:o,disableCustomColors:r}))}var BT=function({colors:e,labels:t,value:n=[],disableCustomColors:r,onChange:o}){return(0,_.createElement)("div",{className:"components-color-list-picker"},t.map(((t,i)=>(0,_.createElement)(MT,{key:i,label:t,value:n[i],colors:e,disableCustomColors:r,onChange:e=>{const t=n.slice();t[i]=e,o(t)}}))))};const FT=["#333","#CCC"];function zT({value:e,onChange:t}){const n=!!e,r=n?e:FT,o=OT(r),i=(a=r).map(((e,t)=>({position:100*t/(a.length-1),color:e})));var a;return(0,_.createElement)(l_,{disableInserter:!0,disableAlpha:!0,background:o,hasGradient:n,value:i,onChange:e=>{const n=function(e=[]){return e.map((({color:e})=>e))}(e);t(n)}})}var HT=function({colorPalette:e,duotonePalette:t,disableCustomColors:n,disableCustomDuotone:r,value:o,onChange:i}){const[a,l]=(0,_.useMemo)((()=>{return!(t=e)||t.length<2?["#000","#fff"]:t.map((({color:e})=>({color:e,brightness:wl()(e).getBrightness()/255}))).reduce((([e,t],n)=>[n.brightness<=e.brightness?n:e,n.brightness>=t.brightness?n:t]),[{brightness:1},{brightness:0}]).map((({color:e})=>e));var t}),[e]);return(0,_.createElement)(FE,{options:t.map((({colors:e,slug:t,name:n})=>{const r={background:OT(e,"135deg"),color:"transparent"},a=null!=n?n:L(U("Duotone code: %s"),t),l=n?L(U("Duotone: %s"),n):a,s=(0,Ce.isEqual)(e,o);return(0,_.createElement)(FE.Option,{key:t,value:e,isSelected:s,"aria-label":l,tooltipText:a,style:r,onClick:()=>{i(s?void 0:e)}})})),actions:(0,_.createElement)(FE.ButtonAction,{onClick:()=>i(void 0)},U("Clear"))},!n&&!r&&(0,_.createElement)(zT,{value:o,onChange:i}),!r&&(0,_.createElement)(BT,{labels:[U("Shadows"),U("Highlights")],colors:e,value:o,disableCustomColors:n,onChange:e=>{e[0]||(e[0]=a),e[1]||(e[1]=l);const t=e.length>=2?e:void 0;i(t)}}))},VT=function({value:e,onChange:t,onToggle:n,duotonePalette:r,colorPalette:o,disableCustomColors:i,disableCustomDuotone:a}){return(0,_.createElement)(ia,{className:"block-editor-duotone-control__popover",headerTitle:U("Duotone"),onFocusOutside:n},(0,_.createElement)(oI,{label:U("Duotone")},(0,_.createElement)(HT,{colorPalette:o,duotonePalette:r,disableCustomColors:i,disableCustomDuotone:a,value:e,onChange:t})))},WT=function({colorPalette:e,duotonePalette:t,disableCustomColors:n,disableCustomDuotone:r,value:o,onChange:i}){const[a,l]=(0,_.useState)(!1),s=()=>{l((e=>!e))};return(0,_.createElement)(_.Fragment,null,(0,_.createElement)(kp,{showTooltip:!0,onClick:s,"aria-haspopup":"true","aria-expanded":a,onKeyDown:e=>{a||e.keyCode!==Wr||(e.preventDefault(),s())},label:U("Apply duotone filter"),icon:(0,_.createElement)(DT,{values:o})}),a&&(0,_.createElement)(VT,{value:o,onChange:i,onToggle:s,duotonePalette:t,colorPalette:e,disableCustomColors:n,disableCustomDuotone:r}))};const ZT=(0,_.createContext)();function jT({children:e}){const[t,n]=(0,_.useState)();return(0,_.createElement)(ZT.Provider,{value:t},(0,_.createElement)("div",{ref:n}),e)}jT.context=ZT;const UT=[];function $T(e=[]){const t={r:[],g:[],b:[]};return e.forEach((e=>{const n=wl()(e);t.r.push(n._r/255),t.g.push(n._g/255),t.b.push(n._b/255)})),t}function qT({selector:e,id:t,values:n}){const r=`\n${e} {\n\tfilter: url( #${t} );\n}\n`;return(0,_.createElement)(_.Fragment,null,(0,_.createElement)(ko,{xmlnsXlink:"http://www.w3.org/1999/xlink",viewBox:"0 0 0 0",width:"0",height:"0",focusable:"false",role:"none",style:{visibility:"hidden",position:"absolute",left:"-9999px",overflow:"hidden"}},(0,_.createElement)("defs",null,(0,_.createElement)("filter",{id:t},(0,_.createElement)("feColorMatrix",{type:"matrix",values:".299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 0 0 0 1 0"}),(0,_.createElement)("feComponentTransfer",{colorInterpolationFilters:"sRGB"},(0,_.createElement)("feFuncR",{type:"table",tableValues:n.r.join(" ")}),(0,_.createElement)("feFuncG",{type:"table",tableValues:n.g.join(" ")}),(0,_.createElement)("feFuncB",{type:"table",tableValues:n.b.join(" ")}))))),(0,_.createElement)("style",{dangerouslySetInnerHTML:{__html:r}}))}function GT({attributes:e,setAttributes:t}){var n;const r=null==e?void 0:e.style,o=null==r||null===(n=r.color)||void 0===n?void 0:n.duotone,i=fk("color.duotone")||UT,a=fk("color.palette")||UT,l=!fk("color.custom"),s=!fk("color.customDuotone")||0===(null==a?void 0:a.length)&&l;return 0===(null==i?void 0:i.length)&&s?null:(0,_.createElement)(Ov,{group:"block"},(0,_.createElement)(WT,{duotonePalette:i,colorPalette:a,disableCustomDuotone:s,disableCustomColors:l,value:o,onChange:e=>{const n={...r,color:{...null==r?void 0:r.color,duotone:e}};t({style:n})}}))}const KT=Ea((e=>t=>{const n=Wl(t.name,"color.__experimentalDuotone");return(0,_.createElement)(_.Fragment,null,(0,_.createElement)(e,t),n&&(0,_.createElement)(GT,t))}),"withDuotoneControls"),YT=Ea((e=>t=>{var n,r,o;const i=Vl(t.name,"color.__experimentalDuotone"),a=null==t||null===(n=t.attributes)||void 0===n||null===(r=n.style)||void 0===r||null===(o=r.color)||void 0===o?void 0:o.duotone;if(!i||!a)return(0,_.createElement)(e,t);const l=`wp-duotone-filter-${Rb(e)}`,s=i.split(",").map((e=>`.${l} ${e.trim()}`)).join(", "),c=Cr()(null==t?void 0:t.className,l),u=(0,_.useContext)(jT.context);return(0,_.createElement)(_.Fragment,null,u&&(0,x.createPortal)((0,_.createElement)(qT,{selector:s,id:l,values:$T(a)}),u),(0,_.createElement)(e,(0,nr.Z)({},t,{className:c})))}),"withDuotoneStyles");(0,W.KJ)("blocks.registerBlockType","core/editor/duotone/add-attributes",(function(e){return Wl(e,"color.__experimentalDuotone")?(e.attributes.style||Object.assign(e.attributes,{style:{type:"object"}}),e):e})),(0,W.KJ)("editor.BlockEdit","core/editor/duotone/with-editor-controls",KT),(0,W.KJ)("editor.BlockListBlock","core/editor/duotone/with-styles",YT);var XT=function({className:e,checked:t,id:n,disabled:r,onChange:o=Ce.noop,...i}){const a=Cr()("components-form-toggle",e,{"is-checked":t,"is-disabled":r});return(0,_.createElement)("span",{className:a},(0,_.createElement)("input",(0,nr.Z)({className:"components-form-toggle__input",id:n,type:"checkbox",checked:t,onChange:o,disabled:r},i)),(0,_.createElement)("span",{className:"components-form-toggle__track"}),(0,_.createElement)("span",{className:"components-form-toggle__thumb"}))};function JT({label:e,checked:t,help:n,className:r,onChange:o,disabled:i}){const a=`inspector-toggle-control-${Rb(JT)}`;let l,s;return n&&(l=a+"__help",s=(0,Ce.isFunction)(n)?n(t):n),(0,_.createElement)(Hk,{id:a,help:s,className:Cr()("components-toggle-control",r)},(0,_.createElement)(XT,{id:a,checked:t,onChange:function(e){o(e.target.checked)},"aria-describedby":l,disabled:i}),(0,_.createElement)("label",{htmlFor:a,className:"components-toggle-control__label"},e))}const QT="__experimentalLayout";function eN({setAttributes:e,attributes:t,name:n}){const{layout:r={}}=t,o=fk("layout");if(!(0,er.Z)((e=>{const{getSettings:t}=e(Iv);return t().supportsLayout}),[]))return null;const i=(e=>{const t=Vl(e,QT);return null==t?void 0:t.allowSwitching})(n),{inherit:a=!1,type:l="default"}=r,s=gk(l);return(0,_.createElement)(lE,null,(0,_.createElement)(Jk,{title:U("Layout")},!!o&&(0,_.createElement)(JT,{label:U("Inherit default layout"),checked:!!a,onChange:()=>e({layout:{inherit:!a}})}),!a&&i&&(0,_.createElement)(tN,{type:l,onChange:t=>e({layout:{type:t}})}),!a&&s&&(0,_.createElement)(s.edit,{layout:r,onChange:t=>e({layout:t})})))}function tN({type:e,onChange:t}){return(0,_.createElement)(pE,null,hk.map((({name:n,label:r})=>(0,_.createElement)(Gi,{key:n,isPressed:e===n,onClick:()=>t(n)},r))))}const nN=Ea((e=>t=>{const{name:n}=t;return[Wl(n,QT)&&(0,_.createElement)(eN,(0,nr.Z)({key:"layout"},t)),(0,_.createElement)(e,(0,nr.Z)({key:"edit"},t))]}),"withInspectorControls"),rN=Ea((e=>t=>{const{name:n,attributes:r}=t,o=Wl(n,QT),i=Rb(e),a=fk("layout")||{};if(!o)return(0,_.createElement)(e,t);const{layout:l={}}=r,s=l&&l.inherit?a:l,c=Cr()(null==t?void 0:t.className,`wp-container-${i}`),u=(0,_.useContext)(jT.context);return(0,_.createElement)(_.Fragment,null,u&&(0,x.createPortal)((0,_.createElement)(wk,{selector:`.wp-container-${i}`,layout:s}),u),(0,_.createElement)(e,(0,nr.Z)({},t,{className:c})))}));(0,W.KJ)("blocks.registerBlockType","core/layout/addAttribute",(function(e){return(0,Ce.has)(e.attributes,["layout","type"])||Wl(e,QT)&&(e.attributes={...e.attributes,layout:{type:"object"}}),e})),(0,W.KJ)("editor.BlockListBlock","core/editor/layout/with-layout-styles",rN),(0,W.KJ)("editor.BlockEdit","core/editor/layout/with-inspector-controls",nN);var oN=(0,_.createElement)(ko,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,_.createElement)(yo,{d:"M4 19.8h8.9v-1.5H4v1.5zm8.9-15.6H4v1.5h8.9V4.2zm-8.9 7v1.5h16v-1.5H4z"})),iN=(0,_.createElement)(ko,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,_.createElement)(yo,{d:"M16.4 4.2H7.6v1.5h8.9V4.2zM4 11.2v1.5h16v-1.5H4zm3.6 8.6h8.9v-1.5H7.6v1.5z"})),aN=(0,_.createElement)(ko,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,_.createElement)(yo,{d:"M11.1 19.8H20v-1.5h-8.9v1.5zm0-15.6v1.5H20V4.2h-8.9zM4 12.8h16v-1.5H4v1.5z"}));const lN=[{icon:oN,title:U("Align text left"),align:"left"},{icon:iN,title:U("Align text center"),align:"center"},{icon:aN,title:U("Align text right"),align:"right"}],sN={position:"bottom right",isAlternate:!0};var cN=function({value:e,onChange:t,alignmentControls:n=lN,label:r=U("Align"),describedBy:o=U("Change text alignment"),isCollapsed:i=!0,isToolbar:a}){function l(n){return()=>t(e===n?void 0:n)}const s=(0,Ce.find)(n,(t=>t.align===e)),c=a?Pp:Dv,u=a?{isCollapsed:i}:{};return(0,_.createElement)(c,(0,nr.Z)({icon:s?s.icon:G()?aN:oN,label:r,toggleProps:{describedBy:o},popoverProps:sN,controls:n.map((t=>{const{align:n}=t,r=e===n;return{...t,isActive:r,role:i?"menuitemradio":void 0,onClick:l(n)}}))},u))};function uN(e){return(0,_.createElement)(cN,(0,nr.Z)({},e,{isToolbar:!1}))}function dN({icon:e,showColors:t=!1,className:n}){var r;"block-default"===(null===(r=e)||void 0===r?void 0:r.src)&&(e={src:bl});const o=(0,_.createElement)(Oo,{icon:e&&e.src?e.src:e}),i=t?{backgroundColor:e&&e.background,color:e&&e.foreground}:{};return(0,_.createElement)("span",{style:i,className:Cr()("block-editor-block-icon",n,{"has-colors":t})},o)}var pN=function({icon:e,children:t,label:n,instructions:r,className:o,notices:i,preview:a,isColumnLayout:l,...s}){const[c,{width:u}]=Dr();let d;"number"==typeof u&&(d={"is-large":u>=480,"is-medium":u>=160&&u<480,"is-small":u<160});const p=Cr()("components-placeholder",o,d),m=Cr()("components-placeholder__fieldset",{"is-column-layout":l});return(0,_.createElement)("div",(0,nr.Z)({},s,{className:p}),c,i,a&&(0,_.createElement)("div",{className:"components-placeholder__preview"},a),(0,_.createElement)("div",{className:"components-placeholder__label"},(0,_.createElement)(Oo,{icon:e}),n),!!r&&(0,_.createElement)("div",{className:"components-placeholder__instructions"},r),(0,_.createElement)("div",{className:m},t))},mN=(0,_.createElement)(ko,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,_.createElement)(yo,{d:"M18 5.5H6a.5.5 0 00-.5.5v3h13V6a.5.5 0 00-.5-.5zm.5 5H10v8h8a.5.5 0 00.5-.5v-7.5zm-10 0h-3V18a.5.5 0 00.5.5h2.5v-8zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"})),fN=function({icon:e=mN,label:t=U("Choose variation"),instructions:n=U("Select a variation to start with."),variations:r,onSelect:o,allowSkip:i}){const a=Cr()("block-editor-block-variation-picker",{"has-many-variations":r.length>4});return(0,_.createElement)(pN,{icon:e,label:t,instructions:n,className:a},(0,_.createElement)("ul",{className:"block-editor-block-variation-picker__variations",role:"list","aria-label":U("Block variations")},r.map((e=>(0,_.createElement)("li",{key:e.name},(0,_.createElement)(Gi,{variant:"secondary",icon:e.icon,iconSize:48,onClick:()=>o(e),className:"block-editor-block-variation-picker__variation",label:e.description||e.title}),(0,_.createElement)("span",{className:"block-editor-block-variation-picker__variation-label",role:"presentation"},e.title))))),i&&(0,_.createElement)("div",{className:"block-editor-block-variation-picker__skip"},(0,_.createElement)(Gi,{variant:"link",onClick:()=>o()},U("Skip"))))};const hN=(0,_.createElement)(ko,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,_.createElement)(yo,{d:"M15 4H9v11h6V4zM4 18.5V20h16v-1.5H4z"})),gN=(0,_.createElement)(ko,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,_.createElement)(yo,{d:"M20 11h-5V4H9v7H4v1.5h5V20h6v-7.5h5z"})),vN={top:{icon:(0,_.createElement)(ko,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,_.createElement)(yo,{d:"M9 20h6V9H9v11zM4 4v1.5h16V4H4z"})),title:$("Align top","Block vertical alignment setting")},center:{icon:gN,title:$("Align middle","Block vertical alignment setting")},bottom:{icon:hN,title:$("Align bottom","Block vertical alignment setting")}},bN=["top","center","bottom"],yN={isAlternate:!0};var wN=function({value:e,onChange:t,controls:n=bN,isCollapsed:r=!0,isToolbar:o}){const i=vN[e],a=vN.top,l=o?Pp:Dv,s=o?{isCollapsed:r}:{};return(0,_.createElement)(l,(0,nr.Z)({popoverProps:yN,icon:i?i.icon:a.icon,label:$("Change vertical alignment","Block vertical alignment setting label"),controls:n.map((n=>{return{...vN[n],isActive:e===n,role:r?"menuitemradio":void 0,onClick:(o=n,()=>t(e===o?void 0:o))};var o}))},s))};function kN(e){return(0,_.createElement)(wN,(0,nr.Z)({},e,{isToolbar:!0}))}var EN=Ea((e=>t=>{const n=fk("color.palette"),r=!fk("color.custom"),o=void 0===t.colors?n:t.colors,i=void 0===t.disableCustomColors?r:t.disableCustomColors,a=!(0,Ce.isEmpty)(o)||!i;return(0,_.createElement)(e,(0,nr.Z)({},t,{colors:o,disableCustomColors:i,hasColorsToChoose:a}))}),"withColorContext")(zE);const _N=[25,50,75,100];function CN({imageWidth:e,imageHeight:t,imageSizeOptions:n=[],isResizable:r=!0,slug:o,width:i,height:a,onChange:l,onChangeImage:s=Ce.noop}){const{currentHeight:c,currentWidth:u,updateDimension:d,updateDimensions:p}=function(e,t,n,r,o){var i,a;const[l,s]=(0,_.useState)(null!==(i=null!=t?t:r)&&void 0!==i?i:""),[c,u]=(0,_.useState)(null!==(a=null!=e?e:n)&&void 0!==a?a:"");return(0,_.useEffect)((()=>{void 0===t&&void 0!==r&&s(r),void 0===e&&void 0!==n&&u(n)}),[r,n]),{currentHeight:c,currentWidth:l,updateDimension:(e,t)=>{"width"===e?s(t):u(t),o({[e]:""===t?void 0:parseInt(t,10)})},updateDimensions:(e,t)=>{u(null!=e?e:n),s(null!=t?t:r),o({height:e,width:t})}}}(a,i,t,e,l);return(0,_.createElement)(_.Fragment,null,!(0,Ce.isEmpty)(n)&&(0,_.createElement)(u_,{label:U("Image size"),value:o,options:n,onChange:s}),r&&(0,_.createElement)("div",{className:"block-editor-image-size-control"},(0,_.createElement)("p",{className:"block-editor-image-size-control__row"},U("Image dimensions")),(0,_.createElement)("div",{className:"block-editor-image-size-control__row"},(0,_.createElement)(Vk,{type:"number",className:"block-editor-image-size-control__width",label:U("Width"),value:u,min:1,onChange:e=>d("width",e)}),(0,_.createElement)(Vk,{type:"number",className:"block-editor-image-size-control__height",label:U("Height"),value:c,min:1,onChange:e=>d("height",e)})),(0,_.createElement)("div",{className:"block-editor-image-size-control__row"},(0,_.createElement)(pE,{"aria-label":U("Image size presets")},_N.map((n=>{const r=Math.round(e*(n/100)),o=Math.round(t*(n/100)),i=u===r&&c===o;return(0,_.createElement)(Gi,{key:n,isSmall:!0,variant:i?"primary":void 0,isPressed:i,onClick:()=>p(o,r)},n,"%")}))),(0,_.createElement)(Gi,{isSmall:!0,onClick:()=>p()},U("Reset")))))}var xN=e=>Ea((t=>mE((n=>{const r=(0,er.Z)(((t,r)=>e(t,n,r)));return(0,_.createElement)(t,(0,nr.Z)({},n,r))}))),"withSelect"),SN=n(57589),IN=e=>Ea((t=>n=>{const r=((e,t)=>{const n=(0,SN.Z)(),r=(0,_.useRef)(e);return(0,VE.Z)((()=>{r.current=e})),(0,_.useMemo)((()=>{const e=r.current(n.dispatch,n);return(0,Ce.mapValues)(e,((e,t)=>("function"!=typeof e&&console.warn(`Property ${t} returned from dispatchMap in useDispatchWithMap must be a function.`),(...e)=>r.current(n.dispatch,n)[t](...e))))}),[n,...t])})(((t,r)=>e(t,n,r)),[]);return(0,_.createElement)(t,(0,nr.Z)({},n,r))}),"withDispatch"),TN=e=>Ea((t=>n=>e(n)?(0,_.createElement)(t,n):null),"ifCondition"),NN=(0,_.createElement)(ko,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,_.createElement)(yo,{d:"M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"})),AN=(0,_.createElement)(ko,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,_.createElement)(yo,{d:"M13.5 6C10.5 6 8 8.5 8 11.5c0 1.1.3 2.1.9 3l-3.4 3 1 1.1 3.4-2.9c1 .9 2.2 1.4 3.6 1.4 3 0 5.5-2.5 5.5-5.5C19 8.5 16.5 6 13.5 6zm0 9.5c-2.2 0-4-1.8-4-4s1.8-4 4-4 4 1.8 4 4-1.8 4-4 4z"})),RN=function e({className:t,onChange:n,value:r,label:o,placeholder:i=U("Search"),hideLabelFromVision:a=!0,help:l}){const s=Rb(e),c=(0,_.useRef)(),u=`components-search-control-${s}`;return(0,_.createElement)(Hk,{label:o,id:u,hideLabelFromVision:a,help:l,className:Cr()(t,"components-search-control")},(0,_.createElement)("div",{className:"components-search-control__input-wrapper"},(0,_.createElement)("input",{ref:c,className:"components-search-control__input",id:u,type:"search",placeholder:i,onChange:e=>n(e.target.value),autoComplete:"off",value:r||""}),(0,_.createElement)("div",{className:"components-search-control__icon"},!!r&&(0,_.createElement)(Gi,{icon:NN,label:U("Reset search"),onClick:()=>{n(""),c.current.focus()}}),!r&&(0,_.createElement)(dk,{icon:AN}))))};let LN,PN,ON,DN;const MN=/<(\/)?(\w+)\s*(\/)?>/g;function BN(e,t,n,r,o){return{element:e,tokenStart:t,tokenLength:n,prevOffset:r,leadingTextStart:o,children:[]}}function FN(e){const t=function(){const e=MN.exec(LN);if(null===e)return["no-more-tokens"];const t=e.index,[n,r,o,i]=e,a=n.length;return i?["self-closed",o,t,a]:r?["closer",o,t,a]:["opener",o,t,a]}(),[n,r,o,i]=t,a=DN.length,l=o>PN?PN:null;if(!e[r])return zN(),!1;switch(n){case"no-more-tokens":if(0!==a){const{leadingTextStart:e,tokenStart:t}=DN.pop();ON.push(LN.substr(e,t))}return zN(),!1;case"self-closed":return 0===a?(null!==l&&ON.push(LN.substr(l,o-l)),ON.push(e[r]),PN=o+i,!0):(HN(BN(e[r],o,i)),PN=o+i,!0);case"opener":return DN.push(BN(e[r],o,i,o+i,l)),PN=o+i,!0;case"closer":if(1===a)return function(e){const{element:t,leadingTextStart:n,prevOffset:r,tokenStart:o,children:i}=DN.pop(),a=e?LN.substr(r,e-r):LN.substr(r);a&&i.push(a),null!==n&&ON.push(LN.substr(n,o-n)),ON.push((0,_.cloneElement)(t,null,...i))}(o),PN=o+i,!0;const t=DN.pop(),n=LN.substr(t.prevOffset,o-t.prevOffset);t.children.push(n),t.prevOffset=o+i;const s=BN(t.element,t.tokenStart,t.tokenLength,o+i);return s.children=t.children,HN(s),PN=o+i,!0;default:return zN(),!1}}function zN(){const e=LN.length-PN;0!==e&&ON.push(LN.substr(PN,e))}function HN(e){const{element:t,tokenStart:n,tokenLength:r,prevOffset:o,children:i}=e,a=DN[DN.length-1],l=LN.substr(a.prevOffset,n-a.prevOffset);l&&a.children.push(l),a.children.push((0,_.cloneElement)(t,null,...i)),a.prevOffset=o||n+r}var VN=(e,t)=>{if(LN=e,PN=0,ON=[],DN=[],MN.lastIndex=0,!(e=>{const t="object"==typeof e,n=t&&Object.values(e);return t&&n.length&&n.every((e=>(0,_.isValidElement)(e)))})(t))throw new TypeError("The conversionMap provided is not valid. It must be an object with values that are WPElements");do{}while(FN(t));return(0,_.createElement)(_.Fragment,null,...ON)},WN=function(e){return(0,_.createElement)("div",{className:"components-tip"},(0,_.createElement)(ko,{width:"24",height:"24",viewBox:"0 0 24 24"},(0,_.createElement)(yo,{d:"M12 15.8c-3.7 0-6.8-3-6.8-6.8s3-6.8 6.8-6.8c3.7 0 6.8 3 6.8 6.8s-3.1 6.8-6.8 6.8zm0-12C9.1 3.8 6.8 6.1 6.8 9s2.4 5.2 5.2 5.2c2.9 0 5.2-2.4 5.2-5.2S14.9 3.8 12 3.8zM8 17.5h8V19H8zM10 20.5h4V22h-4z"})),(0,_.createElement)("p",null,e.children))};const ZN=[VN(U("While writing, you can press <kbd>/</kbd> to quickly insert new blocks."),{kbd:(0,_.createElement)("kbd",null)}),VN(U("Indent a list by pressing <kbd>space</kbd> at the beginning of a line."),{kbd:(0,_.createElement)("kbd",null)}),VN(U("Outdent a list by pressing <kbd>backspace</kbd> at the beginning of a line."),{kbd:(0,_.createElement)("kbd",null)}),U("Drag files into the editor to automatically insert media blocks."),U("Change a block's type by pressing the block icon on the toolbar.")];var jN=function(){const[e]=(0,_.useState)(Math.floor(Math.random()*ZN.length));return(0,_.createElement)(WN,null,ZN[e])},UN=function({title:e,icon:t,description:n,blockType:r}){return r&&(Vt("`blockType` property in `BlockCard component`",{since:"5.7",alternative:"`title, icon and description` properties"}),({title:e,icon:t,description:n}=r)),(0,_.createElement)("div",{className:"block-editor-block-card"},(0,_.createElement)(dN,{icon:t,showColors:!0}),(0,_.createElement)("div",{className:"block-editor-block-card__content"},(0,_.createElement)("h2",{className:"block-editor-block-card__title"},e),(0,_.createElement)("span",{className:"block-editor-block-card__description"},n)))},$N=n(65758),qN=Ea((e=>t=>(0,_.createElement)($N.yE,null,(n=>(0,_.createElement)(e,(0,nr.Z)({},t,{registry:n}))))),"withRegistry"),GN=n(33494);function KN({clientId:e=null,value:t,selection:n,onChange:r=Ce.noop,onInput:o=Ce.noop}){const i=(0,SN.Z)(),{resetBlocks:a,resetSelection:l,replaceInnerBlocks:s,setHasControlledInnerBlocks:c,__unstableMarkNextChangeAsNotPersistent:u}=i.dispatch(Iv),{getBlockName:d,getBlocks:p}=i.select(Iv),m=(0,_.useRef)({incoming:null,outgoing:[]}),f=(0,_.useRef)(!1),h=(0,_.useRef)(o),g=(0,_.useRef)(r);(0,_.useEffect)((()=>{h.current=o,g.current=r}),[o,r]),(0,_.useEffect)((()=>{m.current.outgoing.includes(t)?(0,Ce.last)(m.current.outgoing)===t&&(m.current.outgoing=[]):p(e)!==t&&(m.current.outgoing=[],(()=>{if(t)if(u(),e){c(e,!0),u();const n=t.map((e=>Gl(e)));f.current&&(m.current.incoming=n),s(e,n)}else f.current&&(m.current.incoming=t),a(t)})(),n&&l(n.selectionStart,n.selectionEnd,n.initialPosition))}),[t,e]),(0,_.useEffect)((()=>{const{getSelectionStart:t,getSelectionEnd:n,getSelectedBlocksInitialCaretPosition:r,isLastBlockChangePersistent:o,__unstableIsLastBlockChangeIgnored:a}=i.select(Iv);let l=p(e),s=o(),c=!1;f.current=!0;const u=i.subscribe((()=>{if(null!==e&&null===d(e))return;const i=o(),u=p(e),f=u!==l;if(l=u,f&&(m.current.incoming||a()))return m.current.incoming=null,void(s=i);(f||c&&!f&&i&&!s)&&(s=i,m.current.outgoing.push(l),(s?g.current:h.current)(l,{selection:{selectionStart:t(),selectionEnd:n(),initialPosition:r()}})),c=f}));return()=>u()}),[i,e])}var YN=Ea((e=>qN((({useSubRegistry:t=!0,registry:n,...r})=>{if(!t)return(0,_.createElement)(e,(0,nr.Z)({registry:n},r));const[o,i]=(0,_.useState)(null);return(0,_.useEffect)((()=>{const e=(0,GN.p)({},n);e.registerStore(Eg,Sv),i(e)}),[n]),o?(0,_.createElement)($N.ZP,{value:o},(0,_.createElement)(e,(0,nr.Z)({registry:o},r))):null}))),"withRegistryProvider")((function(e){const{children:t,settings:n}=e,{updateSettings:r}=(0,tr.Z)(Iv);return(0,_.useEffect)((()=>{r(n)}),[n]),KN(e),(0,_.createElement)(ex,null,t)}));const XN=Zi("div",{target:"e1ac3xxk0"})({name:"u2jump",styles:"position:relative;pointer-events:none;&::after{content:'';position:absolute;top:0;right:0;bottom:0;left:0;}*{pointer-events:none;}"}),JN=(0,_.createContext)(!1),{Consumer:QN,Provider:eA}=JN,tA=["BUTTON","FIELDSET","INPUT","OPTGROUP","OPTION","SELECT","TEXTAREA"];function nA({className:e,children:t,isDisabled:n=!0,...r}){const o=(0,_.useRef)(null),i=()=>{o.current&&po.focusable.find(o.current).forEach((e=>{(0,Ce.includes)(tA,e.nodeName)&&e.setAttribute("disabled",""),"A"===e.nodeName&&e.setAttribute("tabindex","-1");const t=e.getAttribute("tabindex");null!==t&&"-1"!==t&&e.removeAttribute("tabindex"),e.hasAttribute("contenteditable")&&e.setAttribute("contenteditable","false")}))},a=(0,_.useCallback)((0,Ce.debounce)(i,void 0,{leading:!0}),[]);return(0,_.useLayoutEffect)((()=>{if(!n)return;let e;return i(),o.current&&(e=new window.MutationObserver(a),e.observe(o.current,{childList:!0,attributes:!0,subtree:!0})),()=>{e&&e.disconnect(),a.cancel()}}),[]),n?(0,_.createElement)(eA,{value:!0},(0,_.createElement)(XN,(0,nr.Z)({ref:o,className:Cr()(e,"components-disabled")},r),t)):(0,_.createElement)(eA,{value:!1},t)}nA.Context=JN,nA.Consumer=QN;var rA=nA,oA=n(93361);function iA(e){return Ea((t=>{const n="core/with-filters/"+e;let r;class o extends _.Component{constructor(){super(...arguments),void 0===r&&(r=(0,W.O)(e,t))}componentDidMount(){o.instances.push(this),1===o.instances.length&&((0,W.KG)("hookRemoved",n,a),(0,W.KG)("hookAdded",n,a))}componentWillUnmount(){o.instances=(0,Ce.without)(o.instances,this),0===o.instances.length&&((0,W.iR)("hookRemoved",n),(0,W.iR)("hookAdded",n))}render(){return(0,_.createElement)(r,this.props)}}o.instances=[];const i=(0,Ce.debounce)((()=>{r=(0,W.O)(e,t),o.instances.forEach((e=>{e.forceUpdate()}))}),16);function a(t){t===e&&i()}return o}),"withFilters")}function aA(e){const{body:t}=document.implementation.createHTMLDocument("");t.innerHTML=e;const n=t.getElementsByTagName("*");let r=n.length;for(;r--;){const e=n[r];if("SCRIPT"===e.tagName)Qc(e);else{let t=e.attributes.length;for(;t--;){const{name:n}=e.attributes[t];n.startsWith("on")&&e.removeAttribute(n)}}}return t.innerHTML}const lA=(0,_.createContext)({});function sA({value:e,children:t}){const n=(0,_.useContext)(lA),r=(0,_.useMemo)((()=>({...n,...e})),[n,e]);return(0,_.createElement)(lA.Provider,{value:r,children:t})}var cA=lA;const uA={};var dA=iA("editor.BlockEdit")((e=>{const{attributes:t={},name:n}=e,r=zl(n),o=(0,_.useContext)(cA),i=(0,_.useMemo)((()=>r&&r.usesContext?(0,Ce.pick)(o,r.usesContext):uA),[r,o]);if(!r)return null;const a=r.edit||r.save;if(r.apiVersion>1||Wl(r,"lightBlockWrapper",!1))return(0,_.createElement)(a,(0,nr.Z)({},e,{context:i}));const l=Wl(r,"className",!0)?Fs(n):null,s=Cr()(l,t.className);return(0,_.createElement)(a,(0,nr.Z)({},e,{context:i,className:s}))}));function pA(e){const{name:t,isSelected:n,clientId:r}=e,o={name:t,isSelected:n,clientId:r};return(0,_.createElement)(Dp,{value:(0,_.useMemo)((()=>o),Object.values(o))},(0,_.createElement)(dA,e))}var mA=Ea((e=>t=>{const[n,r]=(0,_.useState)(),o=(0,_.useCallback)((e=>r((()=>null!=e&&e.handleFocusOutside?e.handleFocusOutside.bind(e):void 0))),[]);return(0,_.createElement)("div",vo(n),(0,_.createElement)(e,(0,nr.Z)({ref:o},t)))}),"withFocusOutside");function fA({overlayClassName:e,contentLabel:t,aria:{describedby:n,labelledby:r},children:o,className:i,role:a,style:l,focusOnMount:s,shouldCloseOnEsc:c,onRequestClose:u}){const d=fo(s),p=mo(),m=ho();return(0,_.createElement)("div",{className:Cr()("components-modal__screen-overlay",e),onKeyDown:function(e){c&&e.keyCode===Fr&&!e.defaultPrevented&&(e.preventDefault(),u&&u(e))}},(0,_.createElement)("div",{className:Cr()("components-modal__frame",i),style:l,ref:hr([p,m,d]),role:a,"aria-label":t,"aria-labelledby":t?null:r,"aria-describedby":n,tabIndex:"-1"},o))}class hA extends _.Component{constructor(){super(...arguments),this.handleFocusOutside=this.handleFocusOutside.bind(this)}handleFocusOutside(e){this.props.shouldCloseOnClickOutside&&this.props.onRequestClose&&this.props.onRequestClose(e)}render(){return(0,_.createElement)(fA,this.props)}}var gA=mA(hA),vA=({icon:e,title:t,onClose:n,closeLabel:r,headingId:o,isDismissible:i})=>{const a=r||U("Close dialog");return(0,_.createElement)("div",{className:"components-modal__header"},(0,_.createElement)("div",{className:"components-modal__header-heading-container"},e&&(0,_.createElement)("span",{className:"components-modal__icon-container","aria-hidden":!0},e),t&&(0,_.createElement)("h1",{id:o,className:"components-modal__header-heading"},t)),i&&(0,_.createElement)(Gi,{onClick:n,icon:NN,label:a}))};const bA=new Set(["alert","status","log","marquee","timer"]);let yA=[],wA=!1;let kA,EA=0;class _A extends _.Component{constructor(e){super(e),this.prepareDOM()}componentDidMount(){EA++,1===EA&&this.openFirstModal()}componentWillUnmount(){EA--,0===EA&&this.closeLastModal(),this.cleanDOM()}prepareDOM(){kA||(kA=document.createElement("div"),document.body.appendChild(kA)),this.node=document.createElement("div"),kA.appendChild(this.node)}cleanDOM(){kA.removeChild(this.node)}openFirstModal(){(function(e){if(wA)return;const t=document.body.children;(0,Ce.forEach)(t,(t=>{t!==e&&function(e){const t=e.getAttribute("role");return!("SCRIPT"===e.tagName||e.hasAttribute("aria-hidden")||e.hasAttribute("aria-live")||bA.has(t))}(t)&&(t.setAttribute("aria-hidden","true"),yA.push(t))})),wA=!0})(kA),document.body.classList.add(this.props.bodyOpenClassName)}closeLastModal(){document.body.classList.remove(this.props.bodyOpenClassName),wA&&((0,Ce.forEach)(yA,(e=>{e.removeAttribute("aria-hidden")})),yA=[],wA=!1)}render(){const{onRequestClose:e,title:t,icon:n,closeButtonLabel:r,children:o,aria:i,instanceId:a,isDismissible:l,isDismissable:s,...c}=this.props,u=t?`components-modal-header-${a}`:i.labelledby;return s&&Vt("isDismissable prop of the Modal component",{since:"5.4",alternative:"isDismissible prop (renamed) of the Modal component"}),(0,x.createPortal)((0,_.createElement)(gA,(0,nr.Z)({onRequestClose:e,aria:{labelledby:u,describedby:i.describedby}},c),(0,_.createElement)("div",{className:"components-modal__content",role:"document"},(0,_.createElement)(vA,{closeLabel:r,headingId:t&&u,icon:n,isDismissible:l||s,onClose:e,title:t}),o)),this.node)}}_A.defaultProps={bodyOpenClassName:"modal-open",role:"dialog",title:null,focusOnMount:!0,shouldCloseOnEsc:!0,shouldCloseOnClickOutside:!0,isDismissible:!0,aria:{labelledby:null,describedby:null}};var CA=xE(_A),xA=function({className:e,actions:t,children:n,secondaryActions:r}){return(0,_.createElement)("div",{className:Cr()(e,"block-editor-warning")},(0,_.createElement)("div",{className:"block-editor-warning__contents"},(0,_.createElement)("p",{className:"block-editor-warning__message"},n),(_.Children.count(t)>0||r)&&(0,_.createElement)("div",{className:"block-editor-warning__actions"},_.Children.count(t)>0&&_.Children.map(t,((e,t)=>(0,_.createElement)("span",{key:t,className:"block-editor-warning__action"},e))),r&&(0,_.createElement)(Rp,{className:"block-editor-warning__secondary",icon:rI,label:U("More options"),popoverProps:{position:"bottom left",className:"block-editor-warning__dropdown"},noIcons:!0},(()=>(0,_.createElement)(oI,null,r.map(((e,t)=>(0,_.createElement)(iI,{onClick:e.onClick,key:t},e.title)))))))))},SA=n(36884);function IA({title:e,rawContent:t,renderedContent:n,action:r,actionText:o,className:i}){return(0,_.createElement)("div",{className:i},(0,_.createElement)("div",{className:"block-editor-block-compare__content"},(0,_.createElement)("h2",{className:"block-editor-block-compare__heading"},e),(0,_.createElement)("div",{className:"block-editor-block-compare__html"},t),(0,_.createElement)("div",{className:"block-editor-block-compare__preview edit-post-visual-editor"},(0,_.createElement)(hs,null,aA(n)))),(0,_.createElement)("div",{className:"block-editor-block-compare__action"},(0,_.createElement)(Gi,{variant:"secondary",tabIndex:"0",onClick:r},o)))}var TA=function({block:e,onKeep:t,onConvert:n,convertor:r,convertButtonText:o}){const i=(a=r(e),(0,Ce.castArray)(a).map((e=>Vs(e.name,e.attributes,e.innerBlocks))).join(""));var a;const l=(s=e.originalContent,c=i,(0,SA.Kx)(s,c).map(((e,t)=>{const n=Cr()({"block-editor-block-compare__added":e.added,"block-editor-block-compare__removed":e.removed});return(0,_.createElement)("span",{key:t,className:n},e.value)})));var s,c;return(0,_.createElement)("div",{className:"block-editor-block-compare__wrapper"},(0,_.createElement)(IA,{title:U("Current"),className:"block-editor-block-compare__current",action:t,actionText:U("Convert to HTML"),rawContent:e.originalContent,renderedContent:e.originalContent}),(0,_.createElement)(IA,{title:U("After Conversion"),className:"block-editor-block-compare__converted",action:n,actionText:o,rawContent:l,renderedContent:i}))};const NA=e=>bu({HTML:e.originalContent});var AA=CE([xN(((e,{clientId:t})=>({block:e(Iv).getBlock(t)}))),IN(((e,{block:t})=>{const{replaceBlock:n}=e(Iv);return{convertToClassic(){n(t.clientId,(e=>Ul("core/freeform",{content:e.originalContent}))(t))},convertToHTML(){n(t.clientId,(e=>Ul("core/html",{content:e.originalContent}))(t))},convertToBlocks(){n(t.clientId,NA(t))},attemptBlockRecovery(){n(t.clientId,(({name:e,attributes:t,innerBlocks:n})=>Ul(e,t,n))(t))}}}))])((function({convertToHTML:e,convertToBlocks:t,convertToClassic:n,attemptBlockRecovery:r,block:o}){const i=!!zl("core/html"),[a,l]=(0,_.useState)(!1),s=(0,_.useCallback)((()=>l(!0)),[]),c=(0,_.useCallback)((()=>l(!1)),[]),u=(0,_.useMemo)((()=>[{title:$("Resolve","imperative verb"),onClick:s},i&&{title:U("Convert to HTML"),onClick:e},{title:U("Convert to Classic Block"),onClick:n}].filter(Boolean)),[s,e,n]);return(0,_.createElement)(_.Fragment,null,(0,_.createElement)(xA,{actions:[(0,_.createElement)(Gi,{key:"recover",onClick:r,variant:"primary"},U("Attempt Block Recovery"))],secondaryActions:u},U("This block contains unexpected or invalid content.")),a&&(0,_.createElement)(CA,{title:U("Resolve Block"),onRequestClose:c,className:"block-editor-block-compare"},(0,_.createElement)(TA,{block:o,onKeep:e,onConvert:t,convertor:NA,convertButtonText:U("Convert to Blocks")})))}));const RA=(0,_.createElement)(xA,{className:"block-editor-block-list__block-crash-warning"},U("This block has encountered an error and cannot be previewed."));var LA=()=>RA;class PA extends _.Component{constructor(){super(...arguments),this.state={hasError:!1}}componentDidCatch(){this.setState({hasError:!0})}render(){return this.state.hasError?this.props.fallback:this.props.children}}var OA=PA,DA=n(94773),MA=function({clientId:e}){const[t,n]=(0,_.useState)(""),r=(0,er.Z)((t=>t(Iv).getBlock(e)),[e]),{updateBlock:o}=(0,tr.Z)(Iv);return(0,_.useEffect)((()=>{n(Ws(r))}),[r]),(0,_.createElement)(DA.Z,{className:"block-editor-block-list__block-html-textarea",value:t,onBlur:()=>{const i=zl(r.name),a=Bc(i,t,r.attributes),l=t||Vs(i,a),s=!t||function(e,t,n){const r=Cl(e),o={name:r.name,attributes:t,innerBlocks:[],originalContent:n},[i]=kc(o,r);return i}(i,a,l);o(e,{attributes:a,originalContent:l,isValid:s}),t||n({content:l})},onChange:e=>n(e.target.value)})},BA=n(48088);function FA(e){return e.ownerDocument.defaultView,e.ownerDocument.defaultView.getComputedStyle(e)}function zA(e){if(e){if(e.scrollHeight>e.clientHeight){const{overflowY:t}=FA(e);if(/(auto|scroll)/.test(t))return e}return zA(e.parentNode)}}const HA=e=>e+1,VA=e=>({top:e.offsetTop,left:e.offsetLeft});var WA=function({isSelected:e,adjustScrolling:t,enableAnimation:n,triggerAnimationOnChange:r}){const o=(0,_.useRef)(),i=qk()||!n,[a,l]=(0,_.useReducer)(HA,0),[s,c]=(0,_.useReducer)(HA,0),[u,d]=(0,_.useState)({x:0,y:0}),p=(0,_.useMemo)((()=>o.current?VA(o.current):null),[r]),m=(0,_.useMemo)((()=>{if(!t||!o.current)return()=>{};const e=zA(o.current);if(!e)return()=>{};const n=o.current.getBoundingClientRect();return()=>{const t=o.current.getBoundingClientRect().top-n.top;t&&(e.scrollTop+=t)}}),[r,t]);function f({x:t,y:n}){t=Math.round(t),n=Math.round(n),t===f.x&&n===f.y||(function({x:t,y:n}){if(!o.current)return;const r=0===t&&0===n;o.current.style.transformOrigin=r?"":"center",o.current.style.transform=r?"":`translate3d(${t}px,${n}px,0)`,o.current.style.zIndex=!e||r?"":"1",m()}({x:t,y:n}),f.x=t,f.y=n)}return(0,_.useLayoutEffect)((()=>{a&&c()}),[a]),(0,_.useLayoutEffect)((()=>{if(!p)return;if(i)return void m();o.current.style.transform="";const e=VA(o.current);l(),d({x:Math.round(p.left-e.left),y:Math.round(p.top-e.top)})}),[r]),f.x=0,f.y=0,(0,BA.q_)({from:{x:u.x,y:u.y},to:{x:0,y:0},reset:a!==s,config:{mass:5,tension:2e3,friction:200},immediate:i,onFrame:f}),o};function ZA(e){return function(e){return!!e&&"INPUT"===e.nodeName}(e)&&e.type&&!["button","checkbox","hidden","file","radio","image","range","reset","submit","number"].includes(e.type)||"TEXTAREA"===e.nodeName||"true"===e.contentEditable}function jA(e,t,n,r){const o=r.style.zIndex,i=r.style.position,{position:a="static"}=FA(r);"static"===a&&(r.style.position="relative"),r.style.zIndex="10000";const l=function(e,t,n){if(e.caretRangeFromPoint)return e.caretRangeFromPoint(t,n);if(!e.caretPositionFromPoint)return null;const r=e.caretPositionFromPoint(t,n);if(!r)return null;const o=e.createRange();return o.setStart(r.offsetNode,r.offset),o.collapse(!0),o}(e,t,n);return r.style.zIndex=o,r.style.position=i,l}function UA(e){return"INPUT"===e.tagName||"TEXTAREA"===e.tagName}function $A(e){return"rtl"===FA(e).direction}function qA(e,t){const{ownerDocument:n}=e,r=$A(e)?!t:t,o=e.getBoundingClientRect();return jA(n,t?o.right-1:o.left+1,r?o.bottom-1:o.top+1,e)}function GA(e,t){if(!e)return;if(e.focus(),UA(e)){if("number"!=typeof e.selectionStart)return;return void(t?(e.selectionStart=e.value.length,e.selectionEnd=e.value.length):(e.selectionStart=0,e.selectionEnd=0))}if(!e.isContentEditable)return;let n=qA(e,t);if(!(n&&n.startContainer&&e.contains(n.startContainer)||(e.scrollIntoView(t),n=qA(e,t),n&&n.startContainer&&e.contains(n.startContainer))))return;const{ownerDocument:r}=e,{defaultView:o}=r,i=o.getSelection();i.removeAllRanges(),i.addRange(n)}const KA=".block-editor-block-list__block",YA=".block-list-appender";function XA(e,t){return t.closest([KA,YA].join(","))===e}function JA(e){const t=(0,_.useRef)(),n=function(e){return(0,er.Z)((t=>{const{getSelectedBlocksInitialCaretPosition:n,isMultiSelecting:r,isNavigationMode:o,isBlockSelected:i}=t(Iv);if(i(e)&&!r()&&!o())return n()}),[e])}(e);return(0,_.useEffect)((()=>{if(null==n)return;if(!t.current)return;const{ownerDocument:e}=t.current;if(t.current.contains(e.activeElement))return;const r=po.tabbable.find(t.current).filter((e=>ZA(e))),o=-1===n,i=(o?Ce.last:Ce.first)(r)||t.current;XA(t.current,i)?GA(i,o):t.current.focus()}),[n]),t}function QA(e){if(e.defaultPrevented)return;const t="mouseover"===e.type?"add":"remove";e.preventDefault(),e.currentTarget.classList[t]("is-hovered")}function eR(){const e=(0,er.Z)((e=>{const{isNavigationMode:t,getSettings:n}=e(Iv);return t()||n().outlineMode}),[]);return Jh((t=>{if(e)return t.addEventListener("mouseout",QA),t.addEventListener("mouseover",QA),()=>{t.removeEventListener("mouseout",QA),t.removeEventListener("mouseover",QA),t.classList.remove("is-hovered")}}),[e])}function tR(e){return(0,er.Z)((t=>{const{isBlockBeingDragged:n,isBlockHighlighted:r,isBlockSelected:o,isBlockMultiSelected:i,getBlockName:a,getSettings:l,hasSelectedInnerBlock:s,isTyping:c,__experimentalGetActiveBlockIdByBlockNames:u}=t(Iv),{__experimentalSpotlightEntityBlocks:d,outlineMode:p}=l(),m=n(e),f=o(e),h=a(e),g=s(e,!0),v=u(d);return Cr()({"is-selected":f,"is-highlighted":r(e),"is-multi-selected":i(e),"is-reusable":Zl(zl(h)),"is-dragging":m,"has-child-selected":g,"has-active-entity":v,"is-active-entity":v===e,"remove-outline":f&&p&&c()})}),[e])}function nR(e){return(0,er.Z)((t=>{const n=t(Iv).getBlockName(e),r=zl(n);if(r.apiVersion>1||Wl(r,"lightBlockWrapper",!1))return Fs(n)}),[e])}function rR(e){return(0,er.Z)((t=>{const{getBlockName:n,getBlockAttributes:r}=t(Iv),{className:o}=r(e);if(!o)return;const i=zl(n(e));return i.apiVersion>1||Wl(i,"lightBlockWrapper",!1)?o:void 0}),[e])}function oR(e){return(0,er.Z)((t=>{const{hasBlockMovingClientId:n,canInsertBlockType:r,getBlockName:o,getBlockRootClientId:i,isBlockSelected:a}=t(Iv);if(!a(e))return;const l=n();return l?Cr()("is-block-moving-mode",{"can-insert-moving-block":r(o(l),i(e))}):void 0}),[e])}function iR(e){const{isBlockSelected:t}=(0,er.Z)(Iv),{selectBlock:n,selectionChange:r}=(0,tr.Z)(Iv);return Jh((o=>{function i(i){t(e)?i.target.isContentEditable||r(e):XA(o,i.target)&&n(e)}return o.addEventListener("focusin",i),()=>{o.removeEventListener("focusin",i)}}),[t,n])}function aR(e){const t=(0,er.Z)((t=>t(Iv).isBlockSelected(e)),[e]),{getBlockRootClientId:n,getBlockIndex:r}=(0,er.Z)(Iv),{insertDefaultBlock:o,removeBlock:i}=(0,tr.Z)(Iv);return Jh((a=>{if(t)return a.addEventListener("keydown",l),a.addEventListener("dragstart",s),()=>{a.removeEventListener("keydown",l),a.removeEventListener("dragstart",s)};function l(t){const{keyCode:l,target:s}=t;l!==Br&&8!==l&&46!==l||s!==a||ZA(s)||(t.preventDefault(),l===Br?o({},n(e),r(e)+1):i(e))}function s(e){e.preventDefault()}}),[e,t,n,r,o,i])}function lR(e){const{isNavigationMode:t,isBlockSelected:n}=(0,er.Z)(Iv),{setNavigationMode:r,selectBlock:o}=(0,tr.Z)(Iv);return Jh((i=>{function a(i){t()&&!i.defaultPrevented&&(i.preventDefault(),n(e)?r(!1):o(e))}return i.addEventListener("mousedown",a),()=>{i.addEventListener("mousedown",a)}}),[e,t,n,r])}var sR=n(34979),cR=n.n(sR);function uR(e){const t=(0,_.useRef)(),n=(0,er.Z)((t=>{const{isBlockSelected:n,getBlockSelectionEnd:r}=t(Iv);return n(e)||r()===e}),[e]);return(0,_.useEffect)((()=>{if(!n)return;const e=t.current;if(!e)return;if(e.contains(e.ownerDocument.activeElement))return;const r=zA(e)||e.ownerDocument.defaultView;r&&cR()(e,r,{onlyScrollIfNeeded:!0})}),[n]),t}function dR(e,t){Array.from(e.closest(".is-root-container").querySelectorAll(".rich-text")).forEach((e=>{t?e.setAttribute("contenteditable",!0):e.removeAttribute("contenteditable")}))}function pR(e){const{startMultiSelect:t,stopMultiSelect:n,multiSelect:r,selectBlock:o}=(0,tr.Z)(Iv),{isSelectionEnabled:i,isBlockSelected:a,getBlockParents:l,getBlockSelectionStart:s,hasMultiSelection:c}=(0,er.Z)(Iv);return Jh((u=>{const{ownerDocument:d}=u,{defaultView:p}=d;let m,f;function h({isSelectionEnd:t}){const n=p.getSelection();if(!n.rangeCount||n.isCollapsed)return void dR(u,!0);const i=function(e){for(;e&&e.nodeType!==e.ELEMENT_NODE;)e=e.parentNode;if(!e)return;const t=e.closest(KA);return t?t.id.slice("block-".length):void 0}(n.focusNode);if(e===i){if(o(e),t&&(dR(u,!0),n.rangeCount)){const{commonAncestorContainer:e}=n.getRangeAt(0);m.contains(e)&&m.focus()}}else{const t=[...l(e),e],n=[...l(i),i],o=Math.min(t.length,n.length)-1;r(t[o],n[o])}}function g(){d.removeEventListener("selectionchange",h),p.removeEventListener("mouseup",g),f=p.requestAnimationFrame((()=>{h({isSelectionEnd:!0}),n()}))}function v({buttons:n}){1===n&&i()&&a(e)&&(m=d.activeElement,t(),d.addEventListener("selectionchange",h),p.addEventListener("mouseup",g),dR(u,!1))}function b(t){if(i()&&0===t.button)if(t.shiftKey){const n=s();n!==e&&(dR(u,!1),r(n,e),t.preventDefault())}else c()&&o(e)}return u.addEventListener("mousedown",b),u.addEventListener("mouseleave",v),()=>{u.removeEventListener("mousedown",b),u.removeEventListener("mouseleave",v),d.removeEventListener("selectionchange",h),p.removeEventListener("mouseup",g),p.cancelAnimationFrame(f)}}),[e,t,n,r,o,i,a,l])}function mR(){const e=(0,_.useContext)(XP);return Jh((t=>{if(e)return e.observe(t),()=>{e.unobserve(t)}}),[e])}var fR=n(34155);function hR(e={},{__unstableIsHtml:t}={}){const{clientId:n,className:r,wrapperProps:o={},isAligned:i}=(0,_.useContext)(gR),{index:a,mode:l,name:s,blockTitle:c,isPartOfSelection:u,adjustScrolling:d,enableAnimation:p,lightBlockWrapper:m}=(0,er.Z)((e=>{const{getBlockRootClientId:t,getBlockIndex:r,getBlockMode:o,getBlockName:i,isTyping:a,getGlobalBlockCount:l,isBlockSelected:s,isBlockMultiSelected:c,isAncestorMultiSelected:u,isFirstMultiSelectedBlock:d}=e(Iv),p=s(n),m=c(n)||u(n),f=i(n),h=t(n),g=zl(f);return{index:r(n,h),mode:o(n),name:f,blockTitle:g.title,isPartOfSelection:p||m,adjustScrolling:p||d(n),enableAnimation:!a()&&l()<=200,lightBlockWrapper:g.apiVersion>1||Wl(g,"lightBlockWrapper",!1)}}),[n]),f=L(U("Block: %s"),c),h="html"!==l||t?"":"-visual",g=hr([e.ref,JA(n),uR(n),tx(n),iR(n),pR(n),aR(n),lR(n),eR(),mR(),WA({isSelected:u,adjustScrolling:d,enableAnimation:p,triggerAnimationOnChange:a})]),v=Mp();return m||n!==v.clientId||void 0!==fR&&fR.env,{...o,...e,ref:g,id:`block-${n}${h}`,tabIndex:0,role:"document","aria-label":f,"data-block":n,"data-type":s,"data-title":c,className:Cr()(Cr()("block-editor-block-list__block",{"wp-block":!i}),r,e.className,o.className,tR(n),nR(n),rR(n),oR(n)),style:{...o.style,...e.style}}}hR.save=function(e={}){const{blockType:t,attributes:n}=Hs;return(0,W.O)("blocks.getSaveContent.extraProps",{...e},t,n)};const gR=(0,_.createContext)();function vR({children:e,isHtml:t,...n}){return(0,_.createElement)("div",hR(n,{__unstableIsHtml:t}),e)}const bR=xN(((e,{clientId:t,rootClientId:n})=>{const{isBlockSelected:r,getBlockMode:o,isSelectionEnabled:i,getTemplateLock:a,__unstableGetBlockWithoutInnerBlocks:l}=e(Iv),s=l(t),c=r(t),u=a(n),{name:d,attributes:p,isValid:m}=s||{};return{mode:o(t),isSelectionEnabled:i(),isLocked:!!u,block:s,name:d,attributes:p,isValid:m,isSelected:c}})),yR=IN(((e,t,{select:n})=>{const{updateBlockAttributes:r,insertBlocks:o,mergeBlocks:i,replaceBlocks:a,toggleSelection:l,__unstableMarkLastChangeAsPersistent:s}=e(Iv);return{setAttributes(e){const{getMultiSelectedBlockClientIds:o}=n(Iv),i=o(),{clientId:a}=t,l=i.length?i:[a];r(l,e)},onInsertBlocks(e,n){const{rootClientId:r}=t;o(e,n,r)},onInsertBlocksAfter(e){const{clientId:r,rootClientId:i}=t,{getBlockIndex:a}=n(Iv),l=a(r,i);o(e,l+1,i)},onMerge(e){const{clientId:r}=t,{getPreviousBlockClientId:o,getNextBlockClientId:a}=n(Iv);if(e){const e=a(r);e&&i(r,e)}else{const e=o(r);e&&i(e,r)}},onReplace(e,n,r){e.length&&!El(e[e.length-1])&&s(),a([t.clientId],e,n,r)},toggleSelection(e){l(e)}}}));var wR=CE(mE,bR,yR,TN((({block:e})=>!!e)),iA("editor.BlockListBlock"))((function({mode:e,isLocked:t,clientId:n,isSelected:r,isSelectionEnabled:o,className:i,name:a,isValid:l,attributes:s,wrapperProps:c,setAttributes:u,onReplace:d,onInsertBlocksAfter:p,onMerge:m,toggleSelection:f}){const{removeBlock:h}=(0,tr.Z)(Iv),g=(0,_.useCallback)((()=>h(n)),[n]);let v=(0,_.createElement)(pA,{name:a,isSelected:r,attributes:s,setAttributes:u,insertBlocksAfter:t?void 0:p,onReplace:t?void 0:d,onRemove:t?void 0:g,mergeBlocks:t?void 0:m,clientId:n,isSelectionEnabled:o,toggleSelection:f});const b=zl(a),y=b.apiVersion>1||Wl(b,"lightBlockWrapper",!1);b.getEditWrapperProps&&(c=function(e,t){const n={...e,...t};return e&&t&&e.className&&t.className&&(n.className=Cr()(e.className,t.className)),e&&t&&e.style&&t.style&&(n.style={...e.style,...t.style}),n}(c,b.getEditWrapperProps(s)));const w=c&&!!c["data-align"];let k;if(w&&(v=(0,_.createElement)("div",{className:"wp-block","data-align":c["data-align"]},v)),l)k="html"===e?(0,_.createElement)(_.Fragment,null,(0,_.createElement)("div",{style:{display:"none"}},v),(0,_.createElement)(vR,{isHtml:!0},(0,_.createElement)(MA,{clientId:n}))):y?v:(0,_.createElement)(vR,c,v);else{const e=Vs(b,s);k=(0,_.createElement)(vR,{className:"has-warning"},(0,_.createElement)(AA,{clientId:n}),(0,_.createElement)(hs,null,aA(e)))}const E={clientId:n,className:i,wrapperProps:(0,Ce.omit)(c,["data-align"]),isAligned:w},C=(0,_.useMemo)((()=>E),Object.values(E));return(0,_.createElement)(gR.Provider,{value:C},(0,_.createElement)(OA,{fallback:(0,_.createElement)(vR,{className:"has-warning"},(0,_.createElement)(LA,null))},k))})),kR=CE(xN(((e,t)=>{const{getBlockCount:n,getBlockName:r,isBlockValid:o,getSettings:i,getTemplateLock:a}=e(Iv),l=!n(t.rootClientId),s=r(t.lastBlockClientId)===Fl(),c=o(t.lastBlockClientId),{bodyPlaceholder:u}=i();return{isVisible:l||!s||!c,showPrompt:l,isLocked:!!a(t.rootClientId),placeholder:u}})),IN(((e,t)=>{const{insertDefaultBlock:n,startTyping:r}=e(Iv);return{onAppend(){const{rootClientId:e}=t;n(void 0,e),r()}}})))((function({isLocked:e,isVisible:t,onAppend:n,showPrompt:r,placeholder:o,rootClientId:i}){if(e||!t)return null;const a=Qs(o)||U("Type / to choose a block");return(0,_.createElement)("div",{"data-root-client-id":i||"",className:Cr()("block-editor-default-block-appender",{"has-visible-prompt":r})},(0,_.createElement)("p",{tabIndex:"0",contentEditable:!0,suppressContentEditableWarning:!0,role:"button","aria-label":U("Add block"),className:"wp-block block-editor-default-block-appender__content",onFocus:n},r?a:"\ufeff"),(0,_.createElement)(lD,{rootClientId:i,position:"bottom right",isAppender:!0,__experimentalIsQuick:!0}))})),ER=xN(((e,{rootClientId:t})=>{const{getBlockOrder:n,canInsertBlockType:r,getTemplateLock:o,getSelectedBlockClientId:i}=e(Iv);return{isLocked:!!o(t),blockClientIds:n(t),canInsertDefaultBlock:r(Fl(),t),selectedBlockClientId:i()}}))((function({blockClientIds:e,rootClientId:t,canInsertDefaultBlock:n,isLocked:r,renderAppender:o,className:i,selectedBlockClientId:a,tagName:l="div"}){if(r||!1===o)return null;let s;if(o)s=(0,_.createElement)(o,null);else{const r=!t,o=a===t,i=a&&!e.includes(a);if(!r&&!o&&(!a||i))return null;s=n?(0,_.createElement)(kR,{rootClientId:t,lastBlockClientId:(0,Ce.last)(e)}):(0,_.createElement)(cD,{rootClientId:t,className:"block-list-appender__toggle"})}return(0,_.createElement)(l,{tabIndex:-1,className:Cr()("block-list-appender wp-block",i)},s)}));function _R(e){const t=(0,_.useRef)();return t.current=e,t}function CR({isDisabled:e,onDrop:t,onDragStart:n,onDragEnter:r,onDragLeave:o,onDragEnd:i,onDragOver:a}){const l=_R(t),s=_R(n),c=_R(r),u=_R(o),d=_R(i),p=_R(a);return Jh((t=>{if(e)return;let n=!1;const{ownerDocument:r}=t;function o(e){n||(n=!0,r.removeEventListener("dragenter",o),r.addEventListener("dragend",h),r.addEventListener("mousemove",h),s.current&&s.current(e))}function i(e){e.preventDefault(),t.contains(e.relatedTarget)||c.current&&c.current(e)}function a(e){!e.defaultPrevented&&p.current&&p.current(e),e.preventDefault()}function m(e){(function(e){if(!e||!t.contains(e))return!1;do{if(e.dataset.isDropZone)return e===t}while(e=e.parentElement);return!1})(e.relatedTarget)||u.current&&u.current(e)}function f(e){e.defaultPrevented||(e.preventDefault(),e.dataTransfer&&e.dataTransfer.files.length,l.current&&l.current(e),h(e))}function h(e){n&&(n=!1,r.addEventListener("dragenter",o),r.removeEventListener("dragend",h),r.removeEventListener("mousemove",h),d.current&&d.current(e))}return t.dataset.isDropZone="true",t.addEventListener("drop",f),t.addEventListener("dragenter",i),t.addEventListener("dragover",a),t.addEventListener("dragleave",m),r.addEventListener("dragenter",o),()=>{delete t.dataset.isDropZone,t.removeEventListener("drop",f),t.removeEventListener("dragenter",i),t.removeEventListener("dragover",a),t.removeEventListener("dragleave",m),r.removeEventListener("dragend",h),r.removeEventListener("mousemove",h),r.addEventListener("dragenter",o)}}),[e])}function xR(e){const t=Array.from(e.files);return Array.from(e.items).forEach((e=>{const n=e.getAsFile();n&&!t.find((({name:e,type:t,size:r})=>e===n.name&&t===n.type&&r===n.size))&&t.push(n)})),t}function SR(e,t){const n=(0,er.Z)((e=>e(Iv).getSettings().mediaUpload),[]),{canInsertBlockType:r,getBlockIndex:o,getClientIdsOfDescendants:i}=(0,er.Z)(Iv),{insertBlocks:a,moveBlocksToPosition:l,updateBlockAttributes:s,clearSelectedBlock:c}=(0,tr.Z)(Iv),u=function(e,t,n,r,o,i,a){return l=>{const{srcRootClientId:s,srcClientIds:c,type:u,blocks:d}=function(e){let t={srcRootClientId:null,srcClientIds:null,srcIndex:null,type:null,blocks:null};if(!e.dataTransfer)return t;try{t=Object.assign(t,JSON.parse(e.dataTransfer.getData("wp-blocks")))}catch(e){return t}return t}(l);if("inserter"===u&&(a(),i(d,t,e,!0,null)),"block"===u){const i=n(c[0],s);if(s===e&&i===t)return;if(c.includes(e)||r(c).some((t=>t===e)))return;const a=s===e,l=c.length;o(c,s,e,a&&i<t?t-l:t)}}}(e,t,o,i,l,a,c),d=function(e,t,n,r,o,i){return a=>{if(!n)return;const l=Jl(Ql("from"),(t=>"files"===t.type&&o(t.blockName,e)&&t.isMatch(a)));if(l){const n=l.transform(a,r);i(n,t,e)}}}(e,t,n,s,r,a),p=function(e,t,n){return r=>{const o=Zu({HTML:r,mode:"BLOCKS"});o.length&&n(o,t,e)}}(e,t,a);return e=>{const t=xR(e.dataTransfer),n=e.dataTransfer.getData("text/html");t.length?d(t):n?p(n):u(e)}}function IR({rootClientId:e=""}={}){const[t,n]=(0,_.useState)(null),r=(0,er.Z)((t=>{const{getTemplateLock:n}=t(Iv);return"all"===n(e)}),[e]),{getBlockListSettings:o}=(0,er.Z)(Iv),{showInsertionPoint:i,hideInsertionPoint:a}=(0,tr.Z)(Iv),l=SR(e,t),s=function(e,t,n){const r=(0,Co.Pr)((()=>(0,Ce.throttle)(e,200,n)),[e,200,n]);return(0,_.useEffect)((()=>()=>r.cancel()),[r]),r}((0,_.useCallback)(((t,r)=>{var a;const l=function(e,t,n){const r="horizontal"===n?["left","right"]:["top","bottom"],o=G();let i,a;return e.forEach(((e,n)=>{const l=e.getBoundingClientRect(),[s,c]=function(e,t,n=["top","bottom","left","right"]){let r,o;return n.forEach((n=>{const i=function(e,t,n){const r="top"===n||"bottom"===n,{x:o,y:i}=e,a=r?o:i,l=r?i:o,s=r?t.left:t.top,c=r?t.right:t.bottom,u=t[n];let d;return d=a>=s&&a<=c?a:a<c?s:c,Math.sqrt((a-d)**2+(l-u)**2)}(e,t,n);(void 0===r||i<r)&&(r=i,o=n)})),[r,o]}(t,l,r);(void 0===a||s<a)&&(a=s,i=n+("bottom"===c||!o&&"right"===c||o&&"left"===c?1:0))})),i}(Array.from(r.children).filter((e=>e.classList.contains("wp-block"))),{x:t.clientX,y:t.clientY},null===(a=o(e))||void 0===a?void 0:a.orientation);n(void 0===l?0:l),null!==l&&i(e,l)}),[]));return CR({isDisabled:r,onDrop:l,onDragOver(e){s(e,e.currentTarget)},onDragLeave(){s.cancel(),a(),n(null)},onDragEnd(){s.cancel(),a(),n(null)}})}function TR(e){return Jh((t=>{if(!e)return;function n(t){const{deltaX:n,deltaY:r}=t;e.current.scrollBy(n,r)}const r={passive:!0};return t.addEventListener("wheel",n,r),()=>{t.removeEventListener("wheel",n,r)}}),[e])}const NR=(0,_.createContext)();function AR({__unstablePopoverSlot:e,__unstableContentRef:t}){const{selectBlock:n}=(0,tr.Z)(Iv),r=(0,_.useContext)(NR),o=(0,_.useRef)(),{orientation:i,previousClientId:a,nextClientId:l,rootClientId:s,isInserterShown:c}=(0,er.Z)((e=>{var t;const{getBlockOrder:n,getBlockListSettings:r,getBlockInsertionPoint:o,isBlockBeingDragged:i,getPreviousBlockClientId:a,getNextBlockClientId:l}=e(Iv),s=o(),c=n(s.rootClientId);if(!c.length)return{};let u=c[s.index-1],d=c[s.index];for(;i(u);)u=a(u);for(;i(d);)d=l(d);return{previousClientId:u,nextClientId:d,orientation:(null===(t=r(s.rootClientId))||void 0===t?void 0:t.orientation)||"vertical",rootClientId:s.rootClientId,isInserterShown:null==s?void 0:s.__unstableWithInserter}}),[]),u=rx(a),d=rx(l),p=(0,_.useMemo)((()=>{if(!u&&!d)return{};const e=u?u.getBoundingClientRect():null,t=d?d.getBoundingClientRect():null;if("vertical"===i)return{width:u?u.offsetWidth:d.offsetWidth,height:t&&e?t.top-e.bottom:0};let n=0;return e&&t&&(n=G()?e.left-t.right:t.left-e.right),{width:n,height:u?u.offsetHeight:d.offsetHeight}}),[u,d]),m=(0,_.useCallback)((()=>{if(!u&&!d)return{};const{ownerDocument:e}=u||d,t=u?u.getBoundingClientRect():null,n=d?d.getBoundingClientRect():null;return"vertical"===i?G()?{top:t?t.bottom:n.top,left:t?t.right:n.right,right:t?t.left:n.left,bottom:n?n.top:t.bottom,ownerDocument:e}:{top:t?t.bottom:n.top,left:t?t.left:n.left,right:t?t.right:n.right,bottom:n?n.top:t.bottom,ownerDocument:e}:G()?{top:t?t.top:n.top,left:t?t.left:n.right,right:n?n.right:t.left,bottom:t?t.bottom:n.bottom,ownerDocument:e}:{top:t?t.top:n.top,left:t?t.right:n.left,right:n?n.left:t.right,bottom:t?t.bottom:n.bottom,ownerDocument:e}}),[u,d]),f=TR(t),h=Cr()("block-editor-block-list__insertion-point","is-"+i),g=u&&d&&c;return(0,_.createElement)(ia,{ref:f,noArrow:!0,animate:!1,getAnchorRect:m,focusOnMount:!1,className:"block-editor-block-list__insertion-point-popover",__unstableSlotName:e||null},(0,_.createElement)("div",{ref:o,tabIndex:-1,onClick:function(e){e.target===o.current&&l&&n(l,-1)},onFocus:function(e){e.target!==o.current&&(r.current=!0)},className:Cr()(h,{"is-with-inserter":g}),style:p},(0,_.createElement)("div",{className:"block-editor-block-list__insertion-point-indicator"}),g&&(0,_.createElement)("div",{className:Cr()("block-editor-block-list__insertion-point-inserter")},(0,_.createElement)(lD,{position:"bottom center",clientId:l,rootClientId:s,__experimentalIsQuick:!0,onToggle:e=>{r.current=e},onSelectOrClose:()=>{r.current=!1}}))))}function RR({children:e,__unstablePopoverSlot:t,__unstableContentRef:n}){const r=(0,er.Z)((e=>e(Iv).isBlockInsertionPointVisible()),[]);return(0,_.createElement)(NR.Provider,{value:(0,_.useRef)(!1)},r&&(0,_.createElement)(AR,{__unstablePopoverSlot:t,__unstableContentRef:n}),e)}function LR(){const e=(0,_.useContext)(NR),t=(0,er.Z)((e=>e(Iv).getSettings().hasReducedUI),[]),{getBlockListSettings:n,getBlockRootClientId:r,getBlockIndex:o,isBlockInsertionPointVisible:i,isMultiSelecting:a,getSelectedBlockClientIds:l,getTemplateLock:s}=(0,er.Z)(Iv),{showInsertionPoint:c,hideInsertionPoint:u}=(0,tr.Z)(Iv);return Jh((r=>{if(!t)return r.addEventListener("mousemove",d),()=>{r.removeEventListener("mousemove",d)};function d(t){var r;if(e.current)return;if(a())return;if(!t.target.classList.contains("block-editor-block-list__layout"))return void(i()&&u());let d;if(t.target.classList.contains("is-root-container")||(d=(t.target.getAttribute("data-block")?t.target:t.target.closest("[data-block]")).getAttribute("data-block")),s(d))return;const p=(null===(r=n(d))||void 0===r?void 0:r.orientation)||"vertical",m=t.target.getBoundingClientRect(),f=t.clientY-m.top,h=t.clientX-m.left;let g=Array.from(t.target.children).find((e=>e.classList.contains("wp-block")&&"vertical"===p&&e.offsetTop>f||e.classList.contains("wp-block")&&"horizontal"===p&&e.offsetLeft>h));if(!g)return;if(!g.id&&(g=g.firstElementChild,!g))return;const v=g.id.slice("block-".length);if(!v)return;if(l().includes(v))return;const b=g.getBoundingClientRect();if("horizontal"===p&&(t.clientY>b.bottom||t.clientY<b.top)||"vertical"===p&&(t.clientX>b.right||t.clientX<b.left))return void(i()&&u());const y=o(v,d);0!==y?c(d,y,{__unstableWithInserter:!0}):i()&&u()}}),[e,n,r,o,i,a,c,u,l])}const PR="undefined"==typeof window?e=>{setTimeout((()=>e(Date.now())),0)}:window.requestIdleCallback||window.requestAnimationFrame,OR="undefined"==typeof window?clearTimeout:window.cancelIdleCallback||window.cancelAnimationFrame;function DR({name:e,category:t,description:n,keyCombination:r,aliases:o}){return{type:"REGISTER_SHORTCUT",name:e,category:t,keyCombination:r,aliases:o,description:n}}function MR(e){return{type:"UNREGISTER_SHORTCUT",name:e}}const BR=[],FR={display:Yr,raw:Gr,ariaLabel:Xr};function zR(e,t){return e?e.modifier?FR[t][e.modifier](e.character):e.character:null}function HR(e,t){return e[t]?e[t].keyCombination:null}function VR(e,t,n="display"){return zR(HR(e,t),n)}function WR(e,t){return e[t]?e[t].description:null}function ZR(e,t){return e[t]&&e[t].aliases?e[t].aliases:BR}const jR=zt(((e,t)=>(0,Ce.compact)([HR(e,t),...ZR(e,t)])),((e,t)=>[e[t]])),UR=zt(((e,t)=>jR(e,t).map((e=>zR(e,"raw")))),((e,t)=>[e[t]])),$R=zt(((e,t)=>Object.entries(e).filter((([,e])=>e.category===t)).map((([e])=>e))),(e=>[e])),qR=(0,ye.Z)("core/keyboard-shortcuts",{reducer:function(e={},t){switch(t.type){case"REGISTER_SHORTCUT":return{...e,[t.name]:{category:t.category,keyCombination:t.keyCombination,aliases:t.aliases,description:t.description}};case"UNREGISTER_SHORTCUT":return(0,Ce.omit)(e,t.name)}return e},actions:v,selectors:b});(0,be.z2)(qR);var GR=function(e,t,n){const r=(0,er.Z)((t=>t(qR).getAllShortcutRawKeyCombinations(e)),[e]);yE(r,t,n)};function KR(){const{getAllShortcutKeyCombinations:e}=(0,er.Z)(qR);return function(t,n){return e(t).some((({modifier:e,character:t})=>Jr[e](n,t)))}}var YR=(0,_.createElement)(ko,{width:"18",height:"18",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 18 18"},(0,_.createElement)(yo,{d:"M5 4h2V2H5v2zm6-2v2h2V2h-2zm-6 8h2V8H5v2zm6 0h2V8h-2v2zm-6 6h2v-2H5v2zm6 0h2v-2h-2v2z"}));function XR(e){return(0,er.Z)((t=>{if(!e)return null;const{getBlockName:n,getBlockAttributes:r}=t(Iv),{getBlockType:o,getActiveBlockVariation:i}=t(cl),a=n(e),l=o(a);if(!l)return null;const s=r(e),c=i(a,s),u={title:l.title,icon:l.icon,description:l.description,anchor:null==s?void 0:s.anchor};return c?{title:c.title||l.title,icon:c.icon||l.icon,description:c.description||l.description}:u}),[e])}function JR({clientId:e}){const{attributes:t,name:n,reusableBlockTitle:r}=(0,er.Z)((t=>{if(!e)return{};const{getBlockName:n,getBlockAttributes:r,__experimentalGetReusableBlockTitle:o}=t(Iv),i=n(e);if(!i)return{};const a=Zl(zl(i));return{attributes:r(e),name:i,reusableBlockTitle:a&&o(r(e).ref)}}),[e]),o=XR(e);if(!n||!o)return null;const i=zl(n),a=r||xl(i,t);return a!==i.title?(0,Ce.truncate)(a,{length:35}):o.title}const QR="is-dragging-components-draggable";function eL({children:e,onDragStart:t,onDragOver:n,onDragEnd:r,cloneClassname:o,elementId:i,transferData:a,__experimentalTransferDataType:l="text",__experimentalDragComponent:s}){const c=(0,_.useRef)(null),u=(0,_.useRef)((()=>{}));return(0,_.useEffect)((()=>()=>{u.current()}),[]),(0,_.createElement)(_.Fragment,null,e({onDraggableStart:function(e){const{ownerDocument:r}=e.target;e.dataTransfer.setData(l,JSON.stringify(a));const s=r.createElement("div");s.style.top=0,s.style.left=0;const d=r.createElement("div");"function"==typeof e.dataTransfer.setDragImage&&(d.classList.add("components-draggable__invisible-drag-image"),r.body.appendChild(d),e.dataTransfer.setDragImage(d,0,0)),s.classList.add("components-draggable__clone"),o&&s.classList.add(o);let p=0,m=0;if(c.current){p=e.clientX,m=e.clientY,s.style.transform=`translate( ${p}px, ${m}px )`;const t=r.createElement("div");t.innerHTML=c.current.innerHTML,s.appendChild(t),r.body.appendChild(s)}else{const e=r.getElementById(i),t=e.getBoundingClientRect(),n=e.parentNode,o=parseInt(t.top,10),a=parseInt(t.left,10);s.style.width=`${t.width+0}px`;const l=e.cloneNode(!0);l.id=`clone-${i}`,p=a-0,m=o-0,s.style.transform=`translate( ${p}px, ${m}px )`,Array.from(l.querySelectorAll("iframe")).forEach((e=>e.parentNode.removeChild(e))),s.appendChild(l),n.appendChild(s)}let f=e.clientX,h=e.clientY;const g=(0,Ce.throttle)((function(e){if(f===e.clientX&&h===e.clientY)return;const t=p+e.clientX-f,r=m+e.clientY-h;s.style.transform=`translate( ${t}px, ${r}px )`,f=e.clientX,h=e.clientY,p=t,m=r,n&&n(e)}),16);let v;r.addEventListener("dragover",g),r.body.classList.add(QR),e.persist(),t&&(v=setTimeout((()=>t(e)))),u.current=()=>{s&&s.parentNode&&s.parentNode.removeChild(s),d&&d.parentNode&&d.parentNode.removeChild(d),r.body.classList.remove(QR),r.removeEventListener("dragover",g),clearTimeout(v)}},onDraggableEnd:function(e){e.preventDefault(),u.current(),r&&r(e)}}),s&&(0,_.createElement)("div",{className:"components-draggable-drag-component-root",style:{display:"none"},ref:c},s))}function tL({count:e,icon:t}){return(0,_.createElement)("div",{className:"block-editor-block-draggable-chip-wrapper"},(0,_.createElement)("div",{className:"block-editor-block-draggable-chip"},(0,_.createElement)(Vb,{justify:"center",className:"block-editor-block-draggable-chip__content"},(0,_.createElement)(jb,null,t?(0,_.createElement)(dN,{icon:t}):L(q("%d block","%d blocks",e),e)),(0,_.createElement)(jb,null,(0,_.createElement)(dN,{icon:YR})))))}var nL=({children:e,clientIds:t,cloneClassname:n,onDragStart:r,onDragEnd:o})=>{const{srcRootClientId:i,isDraggable:a,icon:l}=(0,er.Z)((e=>{var n;const{getBlockRootClientId:r,getTemplateLock:o,getBlockName:i}=e(Iv),a=r(t[0]);return{srcRootClientId:a,isDraggable:"all"!==(a?o(a):null),icon:null===(n=zl(i(t[0])))||void 0===n?void 0:n.icon}}),[t]),s=(0,_.useRef)(!1),[c,u,d]=function(){const e=(0,_.useRef)(null),t=(0,_.useRef)(null),n=(0,_.useRef)(null),r=(0,_.useRef)(null);return(0,_.useEffect)((()=>()=>{r.current&&(clearInterval(r.current),r.current=null)}),[]),[(0,_.useCallback)((o=>{e.current=o.clientY,n.current=zA(o.target),r.current=setInterval((()=>{if(n.current&&t.current){const e=n.current.scrollTop+t.current;n.current.scroll({top:e})}}),25)}),[]),(0,_.useCallback)((r=>{if(!n.current)return;const o=n.current.offsetHeight,i=e.current-n.current.offsetTop,a=r.clientY-n.current.offsetTop;if(r.clientY>i){const e=Math.max(o-i-50,0),n=Math.max(a-i-50,0)/e;t.current=25*n}else if(r.clientY<i){const e=Math.max(i-50,0),n=Math.max(i-a-50,0)/e;t.current=-25*n}else t.current=0}),[]),()=>{e.current=null,n.current=null,r.current&&(clearInterval(r.current),r.current=null)}]}(),{startDraggingBlocks:p,stopDraggingBlocks:m}=(0,tr.Z)(Iv);if((0,_.useEffect)((()=>()=>{s.current&&m()}),[]),!a)return e({isDraggable:!1});const f={type:"block",srcClientIds:t,srcRootClientId:i};return(0,_.createElement)(eL,{cloneClassname:n,__experimentalTransferDataType:"wp-blocks",transferData:f,onDragStart:e=>{p(t),s.current=!0,c(e),r&&r()},onDragOver:u,onDragEnd:()=>{m(),s.current=!1,d(),o&&o()},__experimentalDragComponent:(0,_.createElement)(tL,{count:t.length,icon:l})},(({onDraggableStart:t,onDraggableEnd:n})=>e({draggable:!0,onDragStart:t,onDragEnd:n})))},rL=function({clientId:e,rootClientId:t,blockElement:n}){const r=XR(e),o=(0,er.Z)((n=>{var r;const{__unstableGetBlockWithoutInnerBlocks:o,getBlockIndex:i,hasBlockMovingClientId:a,getBlockListSettings:l}=n(Iv),s=i(e,t),{name:c,attributes:u}=o(e);return{index:s,name:c,attributes:u,blockMovingMode:a(),orientation:null===(r=l(t))||void 0===r?void 0:r.orientation}}),[e,t]),{index:i,name:a,attributes:l,blockMovingMode:s,orientation:c}=o,{setNavigationMode:u,removeBlock:d}=(0,tr.Z)(Iv),p=(0,_.useRef)(),m=function(e,t,n,r="vertical"){const{title:o}=e,i=xl(e,t,"accessibility"),a=void 0!==n,l=i&&i!==o;return a&&"vertical"===r?l?L(U("%1$s Block. Row %2$d. %3$s"),o,n,i):L(U("%1$s Block. Row %2$d"),o,n):a&&"horizontal"===r?l?L(U("%1$s Block. Column %2$d. %3$s"),o,n,i):L(U("%1$s Block. Column %2$d"),o,n):l?L(U("%1$s Block. %2$s"),o,i):L(U("%s Block"),o)}(zl(a),l,i+1,c);(0,_.useEffect)((()=>{p.current.focus(),Gf(m)}),[m]);const{hasBlockMovingClientId:f,getBlockIndex:h,getBlockRootClientId:g,getClientIdsOfDescendants:v,getSelectedBlockClientId:b,getMultiSelectedBlocksEndClientId:y,getPreviousBlockClientId:w,getNextBlockClientId:k}=(0,er.Z)(Iv),{selectBlock:E,clearSelectedBlock:C,setBlockMovingClientId:x,moveBlockToPosition:S}=(0,tr.Z)(Iv),I=Cr()("block-editor-block-list__block-selection-button",{"is-block-moving-mode":!!s}),T=U("Drag");return(0,_.createElement)("div",{className:I},(0,_.createElement)(Vb,{justify:"center",className:"block-editor-block-list__block-selection-button__content"},(0,_.createElement)(jb,null,(0,_.createElement)(dN,{icon:null==r?void 0:r.icon,showColors:!0})),(0,_.createElement)(jb,null,(0,_.createElement)(nL,{clientIds:[e]},(e=>(0,_.createElement)(Gi,(0,nr.Z)({icon:YR,className:"block-selection-button_drag-handle","aria-hidden":"true",label:T,tabIndex:"-1"},e))))),(0,_.createElement)(jb,null,(0,_.createElement)(Gi,{ref:p,onClick:()=>u(!1),onKeyDown:function(t){const{keyCode:r}=t,o=r===Hr,i=r===Wr,a=r===zr,l=r===Vr,s=9===r,c=r===Fr,u=r===Br,p=32===r,m=t.shiftKey;if(8===r||46===r)return d(e),void t.preventDefault();const _=b(),I=y(),T=w(I||_),N=k(I||_),A=s&&m||o,R=s&&!m||i,L=a,P=l;let O;if(A)O=T;else if(R)O=N;else if(L){var D;O=null!==(D=g(_))&&void 0!==D?D:_}else if(P){var M;O=null!==(M=v([_])[0])&&void 0!==M?M:_}const B=f();if(c&&B&&!t.defaultPrevented&&(x(null),t.preventDefault()),(u||p)&&B){const e=g(B),t=g(_),n=h(B,e);let r=h(_,t);n<r&&e===t&&(r-=1),S(B,e,t,r),E(B),x(null)}if(R||A||L||P)if(O)t.preventDefault(),E(O);else if(s&&_){let e;R?(e=po.tabbable.findNext(n),e||(e=n.ownerDocument.defaultView.frameElement,e=po.tabbable.findNext(e))):e=po.tabbable.findPrevious(n),e&&(t.preventDefault(),e.focus(),C())}},label:m,className:"block-selection-button_select-button"},(0,_.createElement)(JR,{clientId:e})))))};function oL(e){return(0,_.useState)(e)[0]}function iL(e){for(var t,n=[[]],r=function(){var e=t.value,r=n.find((function(t){return!t[0]||t[0].groupId===e.groupId}));r?r.push(e):n.push([e])},o=Nd(e);!(t=o()).done;)r();return n}function aL(e){for(var t,n=[],r=Nd(e);!(t=r()).done;){var o=t.value;n.push.apply(n,o)}return n}function lL(e){return e.slice().reverse()}function sL(e,t){if(t)return null==e?void 0:e.find((function(e){return e.id===t&&!e.disabled}))}function cL(e,t){return function(e){return"function"==typeof e}(e)?e(t):e}function uL(e,t){return Boolean(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}function dL(e,t){return e.findIndex((function(e){return!(!e.ref.current||!t.ref.current)&&uL(t.ref.current,e.ref.current)}))}function pL(e){for(var t,n=0,r=Nd(e);!(t=r()).done;){var o=t.value.length;o>n&&(n=o)}return n}function mL(e){for(var t=iL(e),n=pL(t),r=[],o=0;o<n;o+=1)for(var i,a=Nd(t);!(i=a()).done;){var l=i.value;l[o]&&r.push(Sd(Sd({},l[o]),{},{groupId:l[o].groupId?""+o:void 0}))}return r}function fL(e,t,n){for(var r,o=pL(e),i=Nd(e);!(r=i()).done;)for(var a=r.value,l=0;l<o;l+=1){var s=a[l];if(!s||n&&s.disabled){var c=0===l&&n?Jd(a):a[l-1];a[l]=c&&t!==(null==c?void 0:c.id)&&n?c:{id:"__EMPTY_ITEM__",disabled:!0,ref:{current:null},groupId:null==c?void 0:c.groupId}}}return e}var hL={id:null,ref:{current:null}};function gL(e,t){return e.filter((function(e){return e.groupId===t}))}var vL={horizontal:"vertical",vertical:"horizontal"};function bL(e,t,n){return n in e?[].concat(e.slice(0,n),[t],e.slice(n)):[].concat(e,[t])}function yL(e){var t=e.map((function(e,t){return[t,e]})),n=!1;return t.sort((function(e,t){var r=e[0],o=e[1],i=t[0],a=t[1],l=o.ref.current,s=a.ref.current;return l&&s?uL(l,s)?(r>i&&(n=!0),-1):(r<i&&(n=!0),1):0})),n?t.map((function(e){return e[0],e[1]})):e}function wL(e,t){var n=yL(e);e!==n&&t(n)}function kL(e,t){"function"==typeof IntersectionObserver?function(e,t){var n=(0,_.useRef)([]);(0,_.useEffect)((function(){for(var r,o=function(e){for(var t,n=e[0],r=e.slice(1),o=null==n||null===(t=n.ref.current)||void 0===t?void 0:t.parentElement,i=function(){var e=o;if(r.every((function(t){return e.contains(t.ref.current)})))return{v:o};o=o.parentElement};o;){var a=i();if("object"==typeof a)return a.v}return Ld(o).body}(e),i=new IntersectionObserver((function(){!!n.current.length&&wL(e,t),n.current=e}),{root:o}),a=Nd(e);!(r=a()).done;){var l=r.value;l.ref.current&&i.observe(l.ref.current)}return function(){i.disconnect()}}),[e])}(e,t):function(e,t){(0,_.useEffect)((function(){var n=setTimeout((function(){return wL(e,t)}),250);return function(){return clearTimeout(n)}}))}(e,t)}function EL(e,t){var n=e.unstable_virtual,r=e.rtl,o=e.orientation,i=e.items,a=e.groups,l=e.currentId,s=e.loop,c=e.wrap,u=e.pastIds,d=e.shift,p=e.unstable_moves,m=e.unstable_includesBaseElement,f=e.initialVirtual,h=e.initialRTL,g=e.initialOrientation,v=e.initialCurrentId,b=e.initialLoop,y=e.initialWrap,w=e.initialShift,k=e.hasSetCurrentId;switch(t.type){case"registerGroup":var E=t.group;if(0===a.length)return Sd(Sd({},e),{},{groups:[E]});var _=dL(a,E);return Sd(Sd({},e),{},{groups:bL(a,E,_)});case"unregisterGroup":var C=t.id,x=a.filter((function(e){return e.id!==C}));return x.length===a.length?e:Sd(Sd({},e),{},{groups:x});case"registerItem":var S,I=t.item,T=a.find((function(e){var t;return null===(t=e.ref.current)||void 0===t?void 0:t.contains(I.ref.current)})),N=Sd({groupId:null==T?void 0:T.id},I),A=dL(i,N),R=Sd(Sd({},e),{},{items:bL(i,N,A)});return k||p||void 0!==v?R:Sd(Sd({},R),{},{currentId:null===(S=Jd(R.items))||void 0===S?void 0:S.id});case"unregisterItem":var L=t.id,P=i.filter((function(e){return e.id!==L}));if(P.length===i.length)return e;var O=u.filter((function(e){return e!==L})),D=Sd(Sd({},e),{},{pastIds:O,items:P});if(l&&l===L){var M=m?null:Qd(Sd(Sd({},D),{},{currentId:O[0]}));return Sd(Sd({},D),{},{currentId:M})}return D;case"move":var B=t.id;if(void 0===B)return e;var F=u.filter((function(e){return e!==l&&e!==B})),z=l?[l].concat(F):F,H=Sd(Sd({},e),{},{pastIds:z});if(null===B)return Sd(Sd({},H),{},{unstable_moves:p+1,currentId:Qd(H,B)});var V=sL(i,B);return Sd(Sd({},H),{},{unstable_moves:V?p+1:p,currentId:Qd(H,null==V?void 0:V.id)});case"next":if(null==l)return EL(e,Sd(Sd({},t),{},{type:"first"}));var W=r&&"vertical"!==o,Z=W?lL(i):i,j=Z.find((function(e){return e.id===l}));if(!j)return EL(e,Sd(Sd({},t),{},{type:"first"}));var U=!!j.groupId,$=Z.indexOf(j),q=Z.slice($+1),G=gL(q,j.groupId);if(t.allTheWay){var K=Jd(W?gL(Z,j.groupId):lL(G));return EL(e,Sd(Sd({},t),{},{type:"move",id:null==K?void 0:K.id}))}var Y=function(e){return e&&vL[e]}(U?o||"horizontal":o),X=s&&s!==Y,J=U&&c&&c!==Y,Q=t.hasNullItem||!U&&X&&m;if(X){var ee=Jd(function(e,t,n){var r=e.findIndex((function(e){return e.id===t}));return[].concat(e.slice(r+1),n?[hL]:[],e.slice(0,r))}(J&&!Q?Z:gL(Z,j.groupId),l,Q),l);return EL(e,Sd(Sd({},t),{},{type:"move",id:null==ee?void 0:ee.id}))}if(J){var te=Jd(Q?G:q,l),ne=Q?(null==te?void 0:te.id)||null:null==te?void 0:te.id;return EL(e,Sd(Sd({},t),{},{type:"move",id:ne}))}var re=Jd(G,l);return EL(e,Sd(Sd({},t),{},!re&&Q?{type:"move",id:null}:{type:"move",id:null==re?void 0:re.id}));case"previous":var oe=!a.length&&m,ie=EL(Sd(Sd({},e),{},{items:lL(i)}),Sd(Sd({},t),{},{type:"next",hasNullItem:oe}));return Sd(Sd({},ie),{},{items:i});case"down":var ae=d&&!t.allTheWay,le=mL(aL(fL(iL(i),l,ae))),se=s&&"horizontal"!==s&&m,ce=EL(Sd(Sd({},e),{},{orientation:"vertical",items:le}),Sd(Sd({},t),{},{type:"next",hasNullItem:se}));return Sd(Sd({},ce),{},{orientation:o,items:i});case"up":var ue=d&&!t.allTheWay,de=mL(lL(aL(fL(iL(i),l,ue)))),pe=m,me=EL(Sd(Sd({},e),{},{orientation:"vertical",items:de}),Sd(Sd({},t),{},{type:"next",hasNullItem:pe}));return Sd(Sd({},me),{},{orientation:o,items:i});case"first":var fe=Jd(i);return EL(e,Sd(Sd({},t),{},{type:"move",id:null==fe?void 0:fe.id}));case"last":var he=EL(Sd(Sd({},e),{},{items:lL(i)}),Sd(Sd({},t),{},{type:"first"}));return Sd(Sd({},he),{},{items:i});case"sort":return Sd(Sd({},e),{},{items:yL(i),groups:yL(a)});case"setVirtual":return Sd(Sd({},e),{},{unstable_virtual:cL(t.virtual,n)});case"setRTL":return Sd(Sd({},e),{},{rtl:cL(t.rtl,r)});case"setOrientation":return Sd(Sd({},e),{},{orientation:cL(t.orientation,o)});case"setCurrentId":var ge=Qd(Sd(Sd({},e),{},{currentId:cL(t.currentId,l)}));return Sd(Sd({},e),{},{currentId:ge,hasSetCurrentId:!0});case"setLoop":return Sd(Sd({},e),{},{loop:cL(t.loop,s)});case"setWrap":return Sd(Sd({},e),{},{wrap:cL(t.wrap,c)});case"setShift":return Sd(Sd({},e),{},{shift:cL(t.shift,d)});case"setIncludesBaseElement":return Sd(Sd({},e),{},{unstable_includesBaseElement:cL(t.includesBaseElement,m)});case"reset":return Sd(Sd({},e),{},{unstable_virtual:f,rtl:h,orientation:g,currentId:Qd(Sd(Sd({},e),{},{currentId:v})),loop:b,wrap:y,shift:w,unstable_moves:0,pastIds:[]});case"setItems":return Sd(Sd({},e),{},{items:t.items});default:throw new Error}}function _L(e){return(0,_.useCallback)(e,[])}function CL(e){void 0===e&&(e={});var t=oL(e),n=t.unstable_virtual,r=void 0!==n&&n,o=t.rtl,i=void 0!==o&&o,a=t.orientation,l=t.currentId,s=t.loop,c=void 0!==s&&s,u=t.wrap,d=void 0!==u&&u,p=t.shift,m=void 0!==p&&p,f=t.unstable_includesBaseElement,h=function(e){void 0===e&&(e={});var t=oL(e).baseId,n=(0,_.useContext)(sp),r=(0,_.useRef)(0),o=(0,_.useState)((function(){return t||n()}));return{baseId:o[0],setBaseId:o[1],unstable_idCountRef:r}}(Id(t,["unstable_virtual","rtl","orientation","currentId","loop","wrap","shift","unstable_includesBaseElement"])),g=(0,_.useReducer)(EL,{unstable_virtual:r,rtl:i,orientation:a,items:[],groups:[],currentId:l,loop:c,wrap:d,shift:m,unstable_moves:0,pastIds:[],unstable_includesBaseElement:null!=f?f:null===l,initialVirtual:r,initialRTL:i,initialOrientation:a,initialCurrentId:l,initialLoop:c,initialWrap:d,initialShift:m}),v=g[0],b=(v.pastIds,v.initialVirtual,v.initialRTL,v.initialOrientation,v.initialCurrentId,v.initialLoop,v.initialWrap,v.initialShift,v.hasSetCurrentId,Id(v,["pastIds","initialVirtual","initialRTL","initialOrientation","initialCurrentId","initialLoop","initialWrap","initialShift","hasSetCurrentId"])),y=g[1],w=(0,_.useState)(!1),k=w[0],E=w[1],C=function(){var e=(0,_.useRef)(!1);return Dd((function(){return function(){e.current=!0}}),[]),e}(),x=(0,_.useCallback)((function(e){return y({type:"setItems",items:e})}),[]);return kL(b.items,x),Sd(Sd(Sd({},h),b),{},{unstable_hasActiveWidget:k,unstable_setHasActiveWidget:E,registerItem:_L((function(e){C.current||y({type:"registerItem",item:e})})),unregisterItem:_L((function(e){C.current||y({type:"unregisterItem",id:e})})),registerGroup:_L((function(e){C.current||y({type:"registerGroup",group:e})})),unregisterGroup:_L((function(e){C.current||y({type:"unregisterGroup",id:e})})),move:_L((function(e){return y({type:"move",id:e})})),next:_L((function(e){return y({type:"next",allTheWay:e})})),previous:_L((function(e){return y({type:"previous",allTheWay:e})})),up:_L((function(e){return y({type:"up",allTheWay:e})})),down:_L((function(e){return y({type:"down",allTheWay:e})})),first:_L((function(){return y({type:"first"})})),last:_L((function(){return y({type:"last"})})),sort:_L((function(){return y({type:"sort"})})),unstable_setVirtual:_L((function(e){return y({type:"setVirtual",virtual:e})})),setRTL:_L((function(e){return y({type:"setRTL",rtl:e})})),setOrientation:_L((function(e){return y({type:"setOrientation",orientation:e})})),setCurrentId:_L((function(e){return y({type:"setCurrentId",currentId:e})})),setLoop:_L((function(e){return y({type:"setLoop",loop:e})})),setWrap:_L((function(e){return y({type:"setWrap",wrap:e})})),setShift:_L((function(e){return y({type:"setShift",shift:e})})),unstable_setIncludesBaseElement:_L((function(e){return y({type:"setIncludesBaseElement",includesBaseElement:e})})),reset:_L((function(){return y({type:"reset"})}))})}function xL(e,t,n){return void 0===n&&(n={}),"function"==typeof FocusEvent?new FocusEvent(t,n):up(e,t,n)}function SL(e,t){var n=xL(e,"blur",t),r=e.dispatchEvent(n),o=hd(hd({},t),{},{bubbles:!0});return e.dispatchEvent(xL(e,"focusout",o)),r}var IL=Od&&"msCrypto"in window,TL=Od&&"msCrypto"in window;function NL(e,t,n){var r=Md(n);return(0,_.useCallback)((function(n){var o,i,a,l;if(null===(o=r.current)||void 0===o||o.call(r,n),!n.defaultPrevented&&e&&function(e){return!!Bd(e)&&!e.metaKey&&"Tab"!==e.key}(n)){var s=null==t?void 0:t.ref.current;s&&(i=s,a=n.type,l=n,i.dispatchEvent(function(e,t,n){if(void 0===n&&(n={}),"function"==typeof KeyboardEvent)return new KeyboardEvent(t,n);var r=Ld(e).createEvent("KeyboardEvent");return r.initKeyboardEvent(t,n.bubbles,n.cancelable,Pd(e),n.key,n.location,n.ctrlKey,n.altKey,n.shiftKey,n.metaKey),r}(i,a,l))||n.preventDefault(),n.currentTarget.contains(s)&&n.stopPropagation())}}),[e,t])}function AL(e,t){return null==e?void 0:e.some((function(e){return!!t&&e.ref.current===t}))}var RL=_d({name:"Composite",compose:[Yd],keys:ep,useOptions:function(e){return Sd(Sd({},e),{},{currentId:Qd(e)})},useProps:function(e,t){var n=t.ref,r=t.onFocusCapture,o=t.onFocus,i=t.onBlurCapture,a=t.onKeyDown,l=t.onKeyDownCapture,s=t.onKeyUpCapture,c=Id(t,["ref","onFocusCapture","onFocus","onBlurCapture","onKeyDown","onKeyDownCapture","onKeyUpCapture"]),u=(0,_.useRef)(null),d=sL(e.items,e.currentId),p=(0,_.useRef)(null),m=Md(r),f=Md(o),h=Md(i),g=Md(a),v=function(e){var t=Md(e),n=(0,_.useReducer)((function(e){return e+1}),0),r=n[0],o=n[1];return(0,_.useEffect)((function(){var e,n=null===(e=t.current)||void 0===e?void 0:e.ref.current;r&&n&&rp(n)}),[r]),o}(d),b=TL?function(e){var t=(0,_.useRef)(null);return(0,_.useEffect)((function(){var n=Ld(e.current),r=function(e){var n=e.target;t.current=n};return n.addEventListener("focus",r,!0),function(){n.removeEventListener("focus",r,!0)}}),[]),t}(u):void 0;(0,_.useEffect)((function(){var t=u.current;e.unstable_moves&&!d&&(null==t||t.focus())}),[e.unstable_moves,d]);var y=NL(e.unstable_virtual,d,l),w=NL(e.unstable_virtual,d,s),k=(0,_.useCallback)((function(t){var n;if(null===(n=m.current)||void 0===n||n.call(m,t),!t.defaultPrevented&&e.unstable_virtual){var r=(null==b?void 0:b.current)||t.relatedTarget,o=AL(e.items,r);Bd(t)&&o&&(t.stopPropagation(),p.current=r)}}),[e.unstable_virtual,e.items]),E=(0,_.useCallback)((function(t){var n;if(null===(n=f.current)||void 0===n||n.call(f,t),!t.defaultPrevented)if(e.unstable_virtual)Bd(t)&&v();else if(Bd(t)){var r;null===(r=e.setCurrentId)||void 0===r||r.call(e,null)}}),[e.unstable_virtual,e.setCurrentId]),C=(0,_.useCallback)((function(t){var n;if(null===(n=h.current)||void 0===n||n.call(h,t),!t.defaultPrevented&&e.unstable_virtual){var r=(null==d?void 0:d.ref.current)||null,o=function(e){return IL?Fd(e.currentTarget):e.relatedTarget}(t),i=AL(e.items,o);Bd(t)&&i?(o===r?p.current&&p.current!==o&&SL(p.current,t):r&&SL(r,t),t.stopPropagation()):!AL(e.items,t.target)&&r&&SL(r,t)}}),[e.unstable_virtual,e.items,d]),x=(0,_.useCallback)((function(t){var n,r;if(null===(n=g.current)||void 0===n||n.call(g,t),!t.defaultPrevented&&null===e.currentId&&Bd(t)){var o="horizontal"!==e.orientation,i="vertical"!==e.orientation,a=!(null===(r=e.groups)||void 0===r||!r.length),l={ArrowUp:(a||o)&&function(){if(a){var t,n=Jd(aL(lL(iL(e.items))));null!=n&&n.id&&(null===(t=e.move)||void 0===t||t.call(e,n.id))}else{var r;null===(r=e.last)||void 0===r||r.call(e)}},ArrowRight:(a||i)&&e.first,ArrowDown:(a||o)&&e.first,ArrowLeft:(a||i)&&e.last,Home:e.first,End:e.last,PageUp:e.first,PageDown:e.last}[t.key];l&&(t.preventDefault(),l())}}),[e.currentId,e.orientation,e.groups,e.items,e.move,e.last,e.first]);return Sd({ref:Rd(u,n),id:e.baseId,onFocus:E,onFocusCapture:k,onBlurCapture:C,onKeyDownCapture:y,onKeyDown:x,onKeyUpCapture:w,"aria-activedescendant":e.unstable_virtual&&(null==d?void 0:d.id)||void 0},c)},useComposeProps:function(e,t){t=Ud(e,t,!0);var n=Yd(e,t,!0);return e.unstable_virtual||null===e.currentId?Sd({tabIndex:0},n):Sd(Sd({},t),{},{ref:n.ref})}}),LL=kd({as:"div",useHook:RL,useCreateElement:function(e,t,n){return pd(e,t,n)}}),PL=kd({as:"div",useHook:_d({name:"Toolbar",compose:RL,keys:hp,useProps:function(e,t){return Sd({role:"toolbar","aria-orientation":e.orientation},t)}}),useCreateElement:function(e,t,n){return pd(e,t,n)}}),OL=(0,_.forwardRef)((function({label:e,...t},n){const r=function(e){void 0===e&&(e={});var t=oL(e),n=t.orientation;return CL(Sd({orientation:void 0===n?"horizontal":n},Id(t,["orientation"])))}({loop:!0,baseId:t.id,rtl:G()});return(0,_.createElement)(rd.Provider,{value:r},(0,_.createElement)(PL,(0,nr.Z)({ref:n,"aria-label":e},r,t)))})),DL=(0,_.forwardRef)((function({className:e,label:t,...n},r){if(!t)return Vt("Using Toolbar without label prop",{since:"5.6",alternative:"ToolbarGroup component",link:"https://developer.wordpress.org/block-editor/components/toolbar/"}),(0,_.createElement)(Pp,(0,nr.Z)({},n,{className:e}));const o=Cr()("components-accessible-toolbar",e);return(0,_.createElement)(OL,(0,nr.Z)({className:o,label:t,ref:r},n))}));function ML(e){return Array.from(e.querySelectorAll("[data-toolbar-item]"))}var BL=function({children:e,focusOnMount:t,__experimentalInitialIndex:n,__experimentalOnIndexChange:r,...o}){const i=(0,_.useRef)(),a=function(e){const[t,n]=(0,_.useState)(!0),r=(0,_.useCallback)((()=>{const t=!po.tabbable.find(e.current).some((e=>!("toolbarItem"in e.dataset)));t||Vt("Using custom components as toolbar controls",{since:"5.6",alternative:"ToolbarItem, ToolbarButton or ToolbarDropdownMenu components",link:"https://developer.wordpress.org/block-editor/components/toolbar-button/#inside-blockcontrols"}),n(t)}),[]);return(0,_.useLayoutEffect)((()=>{const t=new window.MutationObserver(r);return t.observe(e.current,{childList:!0,subtree:!0}),()=>t.disconnect()}),[t]),t}(i);return function(e,t,n,r,o){const[i]=(0,_.useState)(t),[a]=(0,_.useState)(r),l=(0,_.useCallback)((()=>{!function(e){const[t]=po.tabbable.find(e);t&&t.focus()}(e.current)}),[]);GR("core/block-editor/focus-toolbar",l,{bindGlobal:!0,eventName:"keydown"}),(0,_.useEffect)((()=>{i&&l()}),[n,i,l]),(0,_.useEffect)((()=>{let t=0;return a&&!i&&(t=window.requestAnimationFrame((()=>{const t=ML(e.current),n=a||0;t[n]&&function(e){return e.contains(e.ownerDocument.activeElement)}(e.current)&&t[n].focus()}))),()=>{if(window.cancelAnimationFrame(t),!o||!e.current)return;const n=ML(e.current).findIndex((e=>0===e.tabIndex));o(n)}}),[a,i])}(i,t,a,n,r),a?(0,_.createElement)(DL,(0,nr.Z)({label:o["aria-label"],ref:i},o),e):(0,_.createElement)(Np,(0,nr.Z)({orientation:"horizontal",role:"toolbar",ref:i},o),e)},FL=(0,_.createElement)(ko,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,_.createElement)(yo,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"})),zL=(0,_.createElement)(ko,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,_.createElement)(yo,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"}));const HL=(e,t)=>"up"===e?"horizontal"===t?G()?FL:zL:Gk:"down"===e?"horizontal"===t?G()?zL:FL:Kk:null,VL=(e,t)=>"up"===e?"horizontal"===t?G()?U("Move right"):U("Move left"):U("Move up"):"down"===e?"horizontal"===t?G()?U("Move left"):U("Move right"):U("Move down"):null,WL=(0,_.forwardRef)((({clientIds:e,direction:t,orientation:n,...r},o)=>{const i=Rb(WL),a=(0,Ce.castArray)(e).length,{blockType:l,isDisabled:s,rootClientId:c,isFirst:u,isLast:d,firstIndex:p,orientation:m="vertical"}=(0,er.Z)((r=>{const{getBlockIndex:o,getBlockRootClientId:i,getBlockOrder:a,getBlock:l,getBlockListSettings:s}=r(Iv),c=(0,Ce.castArray)(e),u=(0,Ce.first)(c),d=i(u),p=o(u,d),m=o((0,Ce.last)(c),d),f=a(d),h=l(u),g=0===p,v=m===f.length-1,{orientation:b}=s(d)||{};return{blockType:h?zl(h.name):null,isDisabled:"up"===t?g:v,rootClientId:d,firstIndex:p,isFirst:g,isLast:v,orientation:n||b}}),[e,t]),{moveBlocksDown:f,moveBlocksUp:h}=(0,tr.Z)(Iv),g="up"===t?h:f,v=`block-editor-block-mover-button__description-${i}`;return(0,_.createElement)(_.Fragment,null,(0,_.createElement)(Gi,(0,nr.Z)({ref:o,className:Cr()("block-editor-block-mover-button",`is-${t}-button`),icon:HL(t,m),label:VL(t,m),"aria-describedby":v},r,{onClick:s?null:t=>{g(e,c),r.onClick&&r.onClick(t)},"aria-disabled":s})),(0,_.createElement)("span",{id:v,className:"block-editor-block-mover-button__description"},function(e,t,n,r,o,i,a){const l=n+1,s=e=>"up"===e?"horizontal"===a?G()?"right":"left":"up":"down"===e?"horizontal"===a?G()?"left":"right":"down":null;if(e>1)return function(e,t,n,r,o){const i=t+1;return o<0&&n?U("Blocks cannot be moved up as they are already at the top"):o>0&&r?U("Blocks cannot be moved down as they are already at the bottom"):o<0&&!n?L(q("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):o>0&&!r?L(q("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):void 0}(e,n,r,o,i);if(r&&o)return L(U("Block %s is the only block, and cannot be moved"),t);if(i>0&&!o){const e=s("down");if("down"===e)return L(U("Move %1$s block from position %2$d down to position %3$d"),t,l,l+1);if("left"===e)return L(U("Move %1$s block from position %2$d left to position %3$d"),t,l,l+1);if("right"===e)return L(U("Move %1$s block from position %2$d right to position %3$d"),t,l,l+1)}if(i>0&&o){const e=s("down");if("down"===e)return L(U("Block %1$s is at the end of the content and can’t be moved down"),t);if("left"===e)return L(U("Block %1$s is at the end of the content and can’t be moved left"),t);if("right"===e)return L(U("Block %1$s is at the end of the content and can’t be moved right"),t)}if(i<0&&!r){const e=s("up");if("up"===e)return L(U("Move %1$s block from position %2$d up to position %3$d"),t,l,l-1);if("left"===e)return L(U("Move %1$s block from position %2$d left to position %3$d"),t,l,l-1);if("right"===e)return L(U("Move %1$s block from position %2$d right to position %3$d"),t,l,l-1)}if(i<0&&r){const e=s("up");if("up"===e)return L(U("Block %1$s is at the beginning of the content and can’t be moved up"),t);if("left"===e)return L(U("Block %1$s is at the beginning of the content and can’t be moved left"),t);if("right"===e)return L(U("Block %1$s is at the beginning of the content and can’t be moved right"),t)}}(a,l&&l.title,p,u,d,"up"===t?-1:1,m)))})),ZL=(0,_.forwardRef)(((e,t)=>(0,_.createElement)(WL,(0,nr.Z)({direction:"up",ref:t},e)))),jL=(0,_.forwardRef)(((e,t)=>(0,_.createElement)(WL,(0,nr.Z)({direction:"down",ref:t},e))));var UL=xN(((e,{clientIds:t})=>{var n;const{getBlock:r,getBlockIndex:o,getBlockListSettings:i,getTemplateLock:a,getBlockOrder:l,getBlockRootClientId:s}=e(Iv),c=(0,Ce.castArray)(t),u=(0,Ce.first)(c),d=r(u),p=s((0,Ce.first)(c)),m=o(u,p),f=0===m,h=o((0,Ce.last)(c),p)===l(p).length-1;return{blockType:d?zl(d.name):null,isLocked:"all"===a(p),rootClientId:p,firstIndex:m,isFirst:f,isLast:h,orientation:null===(n=i(p))||void 0===n?void 0:n.orientation}}))((function({isFirst:e,isLast:t,clientIds:n,isLocked:r,isHidden:o,rootClientId:i,orientation:a,hideDragHandle:l}){const[s,c]=(0,_.useState)(!1),u=()=>c(!0),d=()=>c(!1);if(r||e&&t&&!i)return null;const p=U("Drag");return(0,_.createElement)("div",{className:Cr()("block-editor-block-mover",{"is-visible":s||!o,"is-horizontal":"horizontal"===a})},!l&&(0,_.createElement)(nL,{clientIds:n,cloneClassname:"block-editor-block-mover__drag-clone"},(e=>(0,_.createElement)(Gi,(0,nr.Z)({icon:YR,className:"block-editor-block-mover__drag-handle","aria-hidden":"true",label:p,tabIndex:"-1"},e)))),(0,_.createElement)(Pp,{className:"block-editor-block-mover__move-button-container"},(0,_.createElement)(bp,{onFocus:u,onBlur:d},(e=>(0,_.createElement)(ZL,(0,nr.Z)({clientIds:n},e)))),(0,_.createElement)(bp,{onFocus:u,onBlur:d},(e=>(0,_.createElement)(jL,(0,nr.Z)({clientIds:n},e))))))}));const{clearTimeout:$L,setTimeout:qL}=window;function GL({ref:e,isFocused:t,debounceTimeout:n=200,onChange:r=Ce.noop}){const[o,i]=(0,_.useState)(!1),a=(0,_.useRef)(),l=t=>{null!=e&&e.current&&i(t),r(t)},s=()=>{const e=a.current;e&&$L&&$L(e)};return(0,_.useEffect)((()=>()=>s()),[]),{showMovers:o,debouncedShowMovers:e=>{e&&e.stopPropagation(),s(),o||l(!0)},debouncedHideMovers:r=>{r&&r.stopPropagation(),s(),a.current=qL((()=>{(()=>{const n=(null==e?void 0:e.current)&&e.current.matches(":hover");return!t&&!n})()&&l(!1)}),n)}}}function KL({ref:e,debounceTimeout:t=200,onChange:n=Ce.noop}){const[r,o]=(0,_.useState)(!1),{showMovers:i,debouncedShowMovers:a,debouncedHideMovers:l}=GL({ref:e,debounceTimeout:t,isFocused:r,onChange:n}),s=(0,_.useRef)(!1),c=()=>(null==e?void 0:e.current)&&e.current.contains(e.current.ownerDocument.activeElement);return(0,_.useEffect)((()=>{const t=e.current,n=()=>{c()&&(o(!0),a())},r=()=>{c()||(o(!1),l())};return t&&!s.current&&(t.addEventListener("focus",n,!0),t.addEventListener("blur",r,!0),s.current=!0),()=>{t&&(t.removeEventListener("focus",n),t.removeEventListener("blur",r))}}),[e,s,o,a,l]),{showMovers:i,gestures:{onMouseMove:a,onMouseLeave:l}}}function YL(){const{selectBlock:e,toggleBlockHighlight:t}=(0,tr.Z)(Iv),{firstParentClientId:n,shouldHide:r,hasReducedUI:o}=(0,er.Z)((e=>{const{getBlockName:t,getBlockParents:n,getSelectedBlockClientId:r,getSettings:o}=e(Iv),{hasBlockSupport:i}=e(cl),a=n(r()),l=a[a.length-1],s=zl(t(l)),c=o();return{firstParentClientId:l,shouldHide:!i(s,"__experimentalParentSelector",!0),hasReducedUI:c.hasReducedUI}}),[]),i=XR(n),a=(0,_.useRef)(),{gestures:l}=KL({ref:a,onChange(e){e&&o||t(n,e)}});return r||void 0===n?null:(0,_.createElement)("div",(0,nr.Z)({className:"block-editor-block-parent-selector",key:n,ref:a},l),(0,_.createElement)(kp,{className:"block-editor-block-parent-selector__button",onClick:()=>e(n),label:L(U("Select %s"),i.title),showTooltip:!0,icon:(0,_.createElement)(dN,{icon:i.icon})}))}var XL=(0,_.createElement)(ko,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,_.createElement)(yo,{d:"M20.2 8v11c0 .7-.6 1.2-1.2 1.2H6v1.5h13c1.5 0 2.7-1.2 2.7-2.8V8zM18 16.4V4.6c0-.9-.7-1.6-1.6-1.6H4.6C3.7 3 3 3.7 3 4.6v11.8c0 .9.7 1.6 1.6 1.6h11.8c.9 0 1.6-.7 1.6-1.6zm-13.5 0V4.6c0-.1.1-.1.1-.1h11.8c.1 0 .1.1.1.1v11.8c0 .1-.1.1-.1.1H4.6l-.1-.1z"}));function JL({blocks:e}){return(0,_.createElement)("div",{className:"block-editor-block-switcher__popover__preview__parent"},(0,_.createElement)("div",{className:"block-editor-block-switcher__popover__preview__container"},(0,_.createElement)(ia,{className:"block-editor-block-switcher__preview__popover",position:"bottom right",focusOnMount:!1},(0,_.createElement)("div",{className:"block-editor-block-switcher__preview"},(0,_.createElement)("div",{className:"block-editor-block-switcher__preview-title"},U("Preview")),(0,_.createElement)(iO,{viewportWidth:500,blocks:e})))))}var QL=({className:e,possibleBlockTransformations:t,onSelect:n,blocks:r})=>{const[o,i]=(0,_.useState)();return(0,_.createElement)(oI,{label:U("Transform to"),className:e},o&&(0,_.createElement)(JL,{blocks:es(r,o)}),t.map((e=>{const{name:t,icon:r,title:o,isDisabled:a}=e;return(0,_.createElement)(iI,{key:t,className:zs(t),onClick:e=>{e.preventDefault(),n(t)},disabled:a,onMouseLeave:()=>i(null),onMouseEnter:()=>i(t)},(0,_.createElement)(dN,{icon:r,showColors:!0}),o)})))};const eP={};function tP({genericPreviewBlock:e,style:t,isActive:n,onBlur:r,onHover:o,onSelect:i,styleClassName:a,itemRole:l}){const s=(0,_.useMemo)((()=>({...e,attributes:{...e.attributes,className:a}})),[e,a]);return(0,_.createElement)("div",{key:t.name,className:Cr()("block-editor-block-styles__item",{"is-active":n}),onClick:()=>i(),onKeyDown:e=>{Br!==e.keyCode&&32!==e.keyCode||(e.preventDefault(),i())},onMouseEnter:o,onMouseLeave:r,role:l||"button",tabIndex:"0","aria-label":t.label||t.name},(0,_.createElement)("div",{className:"block-editor-block-styles__item-preview"},(0,_.createElement)(iO,{viewportWidth:500,blocks:s})),(0,_.createElement)("div",{className:"block-editor-block-styles__item-label"},t.label||t.name))}var nP=function({clientId:e,onSwitch:t=Ce.noop,onHoverClassName:n=Ce.noop,itemRole:r}){const{styles:o,block:i,type:a,className:l}=(0,er.Z)((t=>{const{getBlock:n}=t(Iv),r=n(e);if(!r)return eP;const o=zl(r.name),{getBlockStyles:i}=t(cl);return{block:r,type:o,styles:i(r.name),className:r.attributes.className||""}}),[e]),{updateBlockAttributes:s}=(0,tr.Z)(Iv),c=function(e,t){return(0,_.useMemo)((()=>{const n=null==t?void 0:t.example,r=null==t?void 0:t.name;return n&&r?ts(r,{attributes:n.attributes,innerBlocks:n.innerBlocks}):e?Gl(e):void 0}),[null!=t&&t.example?null==e?void 0:e.name:e,t])}(i,a);if(!o||0===o.length)return null;const u=(0,Ce.find)(o,"isDefault")?o:[{name:"default",label:$("Default","block style"),isDefault:!0},...o],d=function(e,t){for(const n of new BS(t).values()){if(-1===n.indexOf("is-style-"))continue;const t=n.substring(9),r=(0,Ce.find)(e,{name:t});if(r)return r}return(0,Ce.find)(e,"isDefault")}(u,l);return(0,_.createElement)("div",{className:"block-editor-block-styles"},u.map((o=>{const i=function(e,t,n){const r=new BS(e);return t&&r.remove("is-style-"+t.name),r.add("is-style-"+n.name),r.value}(l,d,o);return(0,_.createElement)(tP,{genericPreviewBlock:c,className:l,isActive:d===o,key:o.name,onSelect:()=>{s(e,{className:i}),n(null),t()},onBlur:()=>n(null),onHover:()=>n(i),style:o,styleClassName:i,itemRole:r})})))};function rP({hoveredBlock:e,onSwitch:t}){const{name:n,clientId:r}=e,[o,i]=(0,_.useState)(),a=(0,er.Z)((e=>e(cl).getBlockType(n)),[n]);return(0,_.createElement)(oI,{label:U("Styles"),className:"block-editor-block-switcher__styles__menugroup"},o&&(0,_.createElement)(JL,{blocks:a.example?ts(a.name,{attributes:{...a.example.attributes,className:o},innerBlocks:a.example.innerBlocks}):Gl(e,{className:o})}),(0,_.createElement)(nP,{clientId:r,onSwitch:t,onHoverClassName:i,itemRole:"menuitem"}))}const oP=(e,t,n=new Set)=>{const{clientId:r,name:o,innerBlocks:i=[]}=e;if(!n.has(r)){if(o===t)return e;for(const e of i){const r=oP(e,t,n);if(r)return r}}},iP=(e,t)=>{const n=((e,t)=>{const n=function(e,t){var n;const r=null===(n=zl(e))||void 0===n?void 0:n.attributes;if(!r)return[];return Object.keys(r).filter((e=>{var n;return(null===(n=r[e])||void 0===n?void 0:n.__experimentalRole)===t}))}(e,"content");return null!=n&&n.length?n.reduce(((e,n)=>(t[n]&&(e[n]=t[n]),e)),{}):t})(t.name,t.attributes);e.attributes={...e.attributes,...n}};function aP({patterns:e,onSelect:t}){return(0,_.createElement)("div",{className:"block-editor-block-switcher__popover__preview__parent"},(0,_.createElement)("div",{className:"block-editor-block-switcher__popover__preview__container"},(0,_.createElement)(ia,{className:"block-editor-block-switcher__preview__popover",position:"bottom right"},(0,_.createElement)("div",{className:"block-editor-block-switcher__preview"},(0,_.createElement)("div",{className:"block-editor-block-switcher__preview-title"},U("Preview")),(0,_.createElement)(lP,{patterns:e,onSelect:t})))))}function lP({patterns:e,onSelect:t}){const n=CL();return(0,_.createElement)(LL,(0,nr.Z)({},n,{role:"listbox",className:"block-editor-block-switcher__preview-patterns-container","aria-label":U("Patterns list")}),e.map((e=>(0,_.createElement)(sP,{key:e.name,pattern:e,onSelect:t,composite:n}))))}function sP({pattern:e,onSelect:t,composite:n}){const r="block-editor-block-switcher__preview-patterns-container",o=Rb(sP,`${r}-list__item-description`);return(0,_.createElement)("div",{className:`${r}-list__list-item`,"aria-label":e.title,"aria-describedby":e.description?o:void 0},(0,_.createElement)(fp,(0,nr.Z)({role:"option",as:"div"},n,{className:`${r}-list__item`,onClick:()=>t(e.transformedBlocks)}),(0,_.createElement)(iO,{blocks:e.transformedBlocks,viewportWidth:e.viewportWidth||500}),(0,_.createElement)("div",{className:`${r}-list__item-title`},e.title)),!!e.description&&(0,_.createElement)($i,{id:o},e.description))}var cP=function({blocks:e,patterns:t,onSelect:n}){const[r,o]=(0,_.useState)(!1),i=((e,t)=>(0,_.useMemo)((()=>e.reduce(((e,n)=>{const r=((e,t)=>{const n=t.map((e=>Gl(e))),r=new Set;for(const t of e){let e=!1;for(const o of n){const n=oP(o,t.name,r);if(n){e=!0,r.add(n.clientId),iP(n,t);break}}if(!e)return}return n})(t,n.blocks);return r&&e.push({...n,transformedBlocks:r}),e}),[])),[e,t]))(t,e);return i.length?(0,_.createElement)(oI,{className:"block-editor-block-switcher__pattern__transforms__menugroup"},r&&(0,_.createElement)(aP,{patterns:i,onSelect:n}),(0,_.createElement)(iI,{onClick:e=>{e.preventDefault(),o(!r)},icon:FL},U("Patterns"))):null};const uP=({clientIds:e,blocks:t})=>{const{replaceBlocks:n}=(0,tr.Z)(Iv),r=XR(t[0].clientId),{possibleBlockTransformations:o,hasBlockStyles:i,icon:a,blockTitle:l,patterns:s}=(0,er.Z)((n=>{const{getBlockRootClientId:o,getBlockTransformItems:i,__experimentalGetPatternTransformItems:a}=n(Iv),{getBlockStyles:l,getBlockType:s}=n(cl),c=o((0,Ce.castArray)(e)[0]),[{name:u}]=t,d=1===t.length,p=d&&l(u);let m;var f;d?m=null==r?void 0:r.icon:m=1===(0,Ce.uniq)(t.map((({name:e})=>e))).length?null===(f=s(u))||void 0===f?void 0:f.icon:XL;return{possibleBlockTransformations:i(t,c),hasBlockStyles:!(null==p||!p.length),icon:m,blockTitle:s(u).title,patterns:a(t,c)}}),[e,t,null==r?void 0:r.icon]),c=1===t.length&&Zl(t[0]),u=1===t.length&&"core/template-part"===t[0].name,d=!!o.length,p=!(null==s||!s.length);if(!i&&!d)return(0,_.createElement)(Pp,null,(0,_.createElement)(kp,{disabled:!0,className:"block-editor-block-switcher__no-switcher-icon",title:l,icon:(0,_.createElement)(dN,{icon:a,showColors:!0})}));const m=l,f=1===t.length?L(U("%s: Change block type or style"),l):L(q("Change type of %d block","Change type of %d blocks",t.length),t.length),h=i||d||p;return(0,_.createElement)(Pp,null,(0,_.createElement)(bp,null,(r=>(0,_.createElement)(Rp,{className:"block-editor-block-switcher",label:m,popoverProps:{position:"bottom right",isAlternate:!0,className:"block-editor-block-switcher__popover"},icon:(0,_.createElement)(_.Fragment,null,(0,_.createElement)(dN,{icon:a,className:"block-editor-block-switcher__toggle",showColors:!0}),(c||u)&&(0,_.createElement)("span",{className:"block-editor-block-switcher__toggle-text"},(0,_.createElement)(JR,{clientId:e}))),toggleProps:{describedBy:f,...r},menuProps:{orientation:"both"}},(({onClose:r})=>h&&(0,_.createElement)("div",{className:"block-editor-block-switcher__container"},p&&(0,_.createElement)(cP,{blocks:t,patterns:s,onSelect:t=>{(t=>{n(e,t)})(t),r()}}),d&&(0,_.createElement)(QL,{className:"block-editor-block-switcher__transforms__menugroup",possibleBlockTransformations:o,blocks:t,onSelect:o=>{(r=>{n(e,es(t,r))})(o),r()}}),i&&(0,_.createElement)(rP,{hoveredBlock:t[0],onSwitch:r})))))))};var dP=({clientIds:e})=>{const t=(0,er.Z)((t=>t(Iv).getBlocksByClientId(e)),[e]);return!t.length||t.some((e=>!e))?null:(0,_.createElement)(uP,{clientIds:e,blocks:t})},pP=(0,_.createElement)(ko,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,_.createElement)(yo,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"})),mP=n(42152),fP=n.n(mP);function hP(e){const t=(0,_.useRef)(e);return t.current=e,t}var gP=(e=>(t={},n)=>{const r=n.context;if(void 0===r)return t;const o=e(t[r],n);return o===t[r]?t:{...t,[r]:o}})(((e=[],t)=>{switch(t.type){case"CREATE_NOTICE":return[...(0,Ce.reject)(e,{id:t.notice.id}),t.notice];case"REMOVE_NOTICE":return(0,Ce.reject)(e,{id:t.id})}return e}));const vP="global";function bP(e="info",t,n={}){const{speak:r=!0,isDismissible:o=!0,context:i=vP,id:a=(0,Ce.uniqueId)(i),actions:l=[],type:s="default",__unstableHTML:c,icon:u=null,explicitDismiss:d=!1,onDismiss:p}=n;return{type:"CREATE_NOTICE",context:i,notice:{id:a,status:e,content:t=String(t),spokenMessage:r?t:null,__unstableHTML:c,isDismissible:o,actions:l,type:s,icon:u,explicitDismiss:d,onDismiss:p}}}function yP(e,t){return bP("success",e,t)}function wP(e,t){return bP("info",e,t)}function kP(e,t){return bP("error",e,t)}function EP(e,t){return bP("warning",e,t)}function _P(e,t=vP){return{type:"REMOVE_NOTICE",id:e,context:t}}const CP=[];function xP(e,t=vP){return e[t]||CP}const SP=(0,ye.Z)("core/notices",{reducer:gP,actions:y,selectors:w});function IP({clientIds:e,children:t,__experimentalUpdateSelection:n}){const{canInsertBlockType:r,getBlockRootClientId:o,getBlocksByClientId:i,getTemplateLock:a}=(0,er.Z)((e=>e(Iv)),[]),{getDefaultBlockName:l,getGroupingBlockName:s}=(0,er.Z)((e=>e(cl)),[]),c=i(e),u=o(e[0]),d=(0,Ce.every)(c,(e=>!!e&&Wl(e.name,"multiple",!0)&&r(e.name,u))),p=r(l(),u),{removeBlocks:m,replaceBlocks:f,duplicateBlocks:h,insertAfterBlock:g,insertBeforeBlock:v,flashBlock:b,setBlockMovingClientId:y,setNavigationMode:w,selectBlock:k}=(0,tr.Z)(Iv),E=function(){const{getBlockName:e}=(0,er.Z)(Iv),{getBlockType:t}=(0,er.Z)(cl),{createSuccessNotice:n}=(0,tr.Z)(SP);return(0,_.useCallback)(((r,o)=>{let i="";if(1===o.length){const n=o[0],{title:a}=t(e(n));i=L(U("copy"===r?'Copied "%s" to clipboard.':'Moved "%s" to clipboard.'),a)}else i=L("copy"===r?q("Copied %d block to clipboard.","Copied %d blocks to clipboard.",o.length):q("Moved %d block to clipboard.","Moved %d blocks to clipboard.",o.length),o.length);n(i,{type:"snackbar"})}),[])}();return t({canDuplicate:d,canInsertDefaultBlock:p,isLocked:!!a(u),rootClientId:u,blocks:c,onDuplicate:()=>h(e,n),onRemove:()=>m(e,n),onInsertBefore(){v((0,Ce.first)((0,Ce.castArray)(e)))},onInsertAfter(){g((0,Ce.last)((0,Ce.castArray)(e)))},onMoveTo(){w(!0),k(e[0]),y(e[0])},onGroup(){if(!c.length)return;const t=s(),n=es(c,t);n&&f(e,n)},onUngroup(){if(!c.length)return;const t=c[0].innerBlocks;t.length&&f(e,t)},onCopy(){const e=c.map((({clientId:e})=>e));1===c.length&&b(e[0]),E("copy",e)}})}(0,be.z2)(SP);var TP=CE([xN(((e,{clientId:t})=>{const{getBlock:n,getBlockMode:r,getSettings:o}=e(Iv),i=n(t),a=o().codeEditingEnabled;return{mode:r(t),blockType:i?zl(i.name):null,isCodeEditingEnabled:a}})),IN(((e,{onToggle:t=Ce.noop,clientId:n})=>({onToggleMode(){e(Iv).toggleBlockMode(n),t()}})))])((function({blockType:e,mode:t,onToggleMode:n,small:r=!1,isCodeEditingEnabled:o=!0}){if(!Wl(e,"html",!0)||!o)return null;const i=U("visual"===t?"Edit as HTML":"Edit visually");return(0,_.createElement)(iI,{onClick:n},!r&&i)})),NP=CE(xN(((e,{clientId:t})=>{const n=e(Iv).getBlock(t);return{block:n,shouldRender:n&&"core/html"===n.name}})),IN(((e,{block:t})=>({onClick:()=>e(Iv).replaceBlocks(t.clientId,bu({HTML:Ws(t)}))}))))((function({shouldRender:e,onClick:t,small:n}){if(!e)return null;const r=U("Convert to Blocks");return(0,_.createElement)(iI,{onClick:t},!n&&r)}));const{Fill:AP,Slot:RP}=Er("__unstableBlockSettingsMenuFirstItem");AP.Slot=RP;var LP=AP;function PP({clientIds:e,isGroupable:t,isUngroupable:n,blocksSelection:r,groupingBlockName:o,onClose:i=(()=>{})}){const{replaceBlocks:a}=(0,tr.Z)(Iv);return t||n?(0,_.createElement)(_.Fragment,null,t&&(0,_.createElement)(iI,{onClick:()=>{(()=>{const t=es(r,o);t&&a(e,t)})(),i()}},$("Group","verb")),n&&(0,_.createElement)(iI,{onClick:()=>{(()=>{const t=r[0].innerBlocks;t.length&&a(e,t)})(),i()}},$("Ungroup","Ungrouping blocks from within a Group block back into individual blocks within the Editor "))):null}const{Fill:OP,Slot:DP}=Er("BlockSettingsMenuControls");function MP({...e}){return(0,_.createElement)(nd,{document:document},(0,_.createElement)(OP,e))}MP.Slot=({fillProps:e,clientIds:t=null})=>{const n=(0,er.Z)((e=>{const{getBlocksByClientId:n,getSelectedBlockClientIds:r}=e(Iv),o=null!==t?t:r();return(0,Ce.map)((0,Ce.compact)(n(o)),(e=>e.name))}),[t]),r=function(){const{clientIds:e,isGroupable:t,isUngroupable:n,blocksSelection:r,groupingBlockName:o}=(0,er.Z)((e=>{var t;const{getBlockRootClientId:n,getBlocksByClientId:r,canInsertBlockType:o,getSelectedBlockClientIds:i}=e(Iv),{getGroupingBlockName:a}=e(cl),l=i(),s=a(),c=o(s,null!=l&&l.length?n(l[0]):void 0),u=r(l),d=1===u.length&&(null===(t=u[0])||void 0===t?void 0:t.name)===s;return{clientIds:l,isGroupable:c&&u.length&&!d,isUngroupable:d&&!!u[0].innerBlocks.length,blocksSelection:u,groupingBlockName:s}}),[]);return{clientIds:e,isGroupable:t,isUngroupable:n,blocksSelection:r,groupingBlockName:o}}(),{isGroupable:o,isUngroupable:i}=r,a=o||i;return(0,_.createElement)(DP,{fillProps:{...e,selectedBlocks:n}},(t=>{if((null==t?void 0:t.length)>0||a)return(0,_.createElement)(oI,null,t,(0,_.createElement)(PP,(0,nr.Z)({},r,{onClose:null==e?void 0:e.onClose})))}))};var BP=MP;const FP={className:"block-editor-block-settings-menu__popover",position:"bottom right",isAlternate:!0};function zP({blocks:e,onCopy:t}){const n=function(t,n){const r=hP((()=>js(e))),o=hP(n);return Jh((e=>{const t=new(fP())(e,{text:()=>"function"==typeof r.current?r.current():r.current||""});return t.on("success",(({clearSelection:t})=>{t(),e.focus(),o.current&&o.current()})),()=>{t.destroy()}}),[])}(0,t);return(0,_.createElement)(iI,{ref:n},U("Copy"))}var HP=function({clientIds:e,__experimentalSelectBlock:t,children:n,...r}){const o=(0,Ce.castArray)(e),i=o.length,a=o[0],l=(0,er.Z)((e=>1===e(Iv).getBlockCount()),[]),s=(0,er.Z)((e=>{const{getShortcutRepresentation:t}=e(qR);return{duplicate:t("core/block-editor/duplicate"),remove:t("core/block-editor/remove"),insertAfter:t("core/block-editor/insert-after"),insertBefore:t("core/block-editor/insert-before")}}),[]),c=(0,_.useCallback)(t?async e=>{const n=await e;n&&n[0]&&t(n[0])}:Ce.noop,[t]),u=U(1===i?"Remove block":"Remove blocks");return(0,_.createElement)(IP,{clientIds:e,__experimentalUpdateSelection:!t},(({canDuplicate:t,canInsertDefaultBlock:o,isLocked:d,onDuplicate:p,onInsertAfter:m,onInsertBefore:f,onRemove:h,onCopy:g,onMoveTo:v,blocks:b})=>(0,_.createElement)(Rp,(0,nr.Z)({icon:pP,label:U("Options"),className:"block-editor-block-settings-menu",popoverProps:FP,noIcons:!0},r),(({onClose:r})=>(0,_.createElement)(_.Fragment,null,(0,_.createElement)(oI,null,(0,_.createElement)(LP.Slot,{fillProps:{onClose:r}}),1===i&&(0,_.createElement)(NP,{clientId:a}),(0,_.createElement)(zP,{blocks:b,onCopy:g}),t&&(0,_.createElement)(iI,{onClick:(0,Ce.flow)(r,p,c),shortcut:s.duplicate},U("Duplicate")),o&&(0,_.createElement)(_.Fragment,null,(0,_.createElement)(iI,{onClick:(0,Ce.flow)(r,f),shortcut:s.insertBefore},U("Insert before")),(0,_.createElement)(iI,{onClick:(0,Ce.flow)(r,m),shortcut:s.insertAfter},U("Insert after"))),!d&&!l&&(0,_.createElement)(iI,{onClick:(0,Ce.flow)(r,v)},U("Move to")),1===i&&(0,_.createElement)(TP,{clientId:a,onToggle:r})),(0,_.createElement)(BP.Slot,{fillProps:{onClose:r},clientIds:e}),"function"==typeof n?n({onClose:r}):_.Children.map((e=>(0,_.cloneElement)(e,{onClose:r}))),(0,_.createElement)(oI,null,!d&&(0,_.createElement)(iI,{onClick:(0,Ce.flow)(r,h,c),shortcut:s.remove},u)))))))},VP=function({clientIds:e,...t}){return(0,_.createElement)(Pp,null,(0,_.createElement)(bp,null,(n=>(0,_.createElement)(HP,(0,nr.Z)({clientIds:e,toggleProps:n},t)))))};function WP({hideDragHandle:e}){const{blockClientIds:t,blockClientId:n,blockType:r,hasFixedToolbar:o,hasReducedUI:i,isValid:a,isVisual:l}=(0,er.Z)((e=>{const{getBlockName:t,getBlockMode:n,getSelectedBlockClientIds:r,isBlockValid:o,getBlockRootClientId:i,getSettings:a}=e(Iv),l=r(),s=l[0],c=i(s),u=a();return{blockClientIds:l,blockClientId:s,blockType:s&&zl(t(s)),hasFixedToolbar:u.hasFixedToolbar,hasReducedUI:u.hasReducedUI,rootClientId:c,isValid:l.every((e=>o(e))),isVisual:l.every((e=>"visual"===n(e)))}}),[]),{toggleBlockHighlight:s}=(0,tr.Z)(Iv),c=(0,_.useRef)(),{showMovers:u,gestures:d}=KL({ref:c,onChange(e){e&&i||s(n,e)}}),p=Lr("medium","<")||o;if(r&&!Wl(r,"__experimentalToolbar",!0))return null;const m=p||u;if(0===t.length)return null;const f=a&&l,h=t.length>1,g=Cr()("block-editor-block-toolbar",m&&"is-showing-movers");return(0,_.createElement)("div",{className:g},!h&&!p&&(0,_.createElement)(YL,{clientIds:t}),(0,_.createElement)("div",(0,nr.Z)({ref:c},d),(f||h)&&(0,_.createElement)(Pp,{className:"block-editor-block-toolbar__block-controls"},(0,_.createElement)(dP,{clientIds:t}),(0,_.createElement)(UL,{clientIds:t,hideDragHandle:e||i}))),f&&(0,_.createElement)(_.Fragment,null,(0,_.createElement)(Ov.Slot,{group:"block",className:"block-editor-block-toolbar__slot"}),(0,_.createElement)(Ov.Slot,{className:"block-editor-block-toolbar__slot"}),(0,_.createElement)(Ov.Slot,{group:"inline",className:"block-editor-block-toolbar__slot"}),(0,_.createElement)(Ov.Slot,{group:"other",className:"block-editor-block-toolbar__slot"})),(0,_.createElement)(VP,{clientIds:t}))}var ZP=function({focusOnMount:e,isFixed:t,...n}){const{blockType:r,hasParents:o,showParentSelector:i}=(0,er.Z)((e=>{const{getBlockName:t,getBlockParents:n,getSelectedBlockClientIds:r}=e(Iv),{getBlockType:o}=e(cl),i=r()[0],a=n(i),l=o(t(a[a.length-1]));return{blockType:i&&o(t(i)),hasParents:a.length,showParentSelector:Wl(l,"__experimentalParentSelector",!0)}}),[]);if(r&&!Wl(r,"__experimentalToolbar",!0))return null;const a=Cr()("block-editor-block-contextual-toolbar",{"has-parent":o&&i,"is-fixed":t});return(0,_.createElement)(BL,(0,nr.Z)({focusOnMount:e,className:a,"aria-label":U("Block tools")},n),(0,_.createElement)(WP,{hideDragHandle:t}))};function jP(e){const{isNavigationMode:t,isMultiSelecting:n,hasMultiSelection:r,isTyping:o,isCaretWithinFormattedText:i,getSettings:a,getLastMultiSelectedBlockClientId:l}=e(Iv);return{isNavigationMode:t(),isMultiSelecting:n(),isTyping:o(),isCaretWithinFormattedText:i(),hasMultiSelection:r(),hasFixedToolbar:a().hasFixedToolbar,lastClientId:l()}}function UP({clientId:e,rootClientId:t,isValid:n,isEmptyDefaultBlock:r,capturingClientId:o,__unstablePopoverSlot:i,__unstableContentRef:a}){const{isNavigationMode:l,isMultiSelecting:s,isTyping:c,isCaretWithinFormattedText:u,hasMultiSelection:d,hasFixedToolbar:p,lastClientId:m}=(0,er.Z)(jP,[]),f=(0,er.Z)((t=>{const{isBlockInsertionPointVisible:n,getBlockInsertionPoint:r,getBlockOrder:o}=t(Iv);if(!n())return!1;const i=r();return o(i.rootClientId)[i.index]===e}),[e]),h=Lr("medium"),[g,v]=(0,_.useState)(!1),[b,y]=(0,_.useState)(!1),{stopTyping:w}=(0,tr.Z)(Iv),k=!c&&!l&&r&&n,E=l,C=!l&&!p&&h&&!k&&!s&&(!c||u),x=!(l||C||p||r);GR("core/block-editor/focus-toolbar",(0,_.useCallback)((()=>{v(!0),w(!0)}),[]),{bindGlobal:!0,eventName:"keydown",isDisabled:!x}),(0,_.useEffect)((()=>{C||v(!1)}),[C]);const S=(0,_.useRef)(),I=rx(e),T=rx(m),N=rx(o),A=TR(a);if(!(E||C||g||k))return null;let R=I;if(!R)return null;o&&(R=N);let L=R;if(d){if(!T)return null;L={top:R,bottom:T}}const P=k?"top left right":"top right left",{ownerDocument:O}=R,D=k?void 0:O.defaultView.frameElement||zA(R)||O.body;return(0,_.createElement)(ia,{ref:A,noArrow:!0,animate:!1,position:P,focusOnMount:!1,anchorRef:L,className:Cr()("block-editor-block-list__block-popover",{"is-insertion-point-visible":f}),__unstableStickyBoundaryElement:D,__unstableSlotName:i||null,__unstableBoundaryParent:!0,__unstableObserveElement:R,shouldAnchorIncludePadding:!0},(C||g)&&(0,_.createElement)("div",{onFocus:function(){y(!0)},onBlur:function(){y(!1)},tabIndex:-1,className:Cr()("block-editor-block-list__block-popover-inserter",{"is-visible":b})},(0,_.createElement)(lD,{clientId:e,rootClientId:t,__experimentalIsQuick:!0})),(C||g)&&(0,_.createElement)(ZP,{focusOnMount:g,__experimentalInitialIndex:S.current,__experimentalOnIndexChange:e=>{S.current=e},key:e}),E&&(0,_.createElement)(rL,{clientId:e,rootClientId:t,blockElement:R}),k&&(0,_.createElement)("div",{className:"block-editor-block-list__empty-block-inserter"},(0,_.createElement)(lD,{position:"bottom right",rootClientId:t,clientId:e,__experimentalIsQuick:!0})))}function $P(e){const{getSelectedBlockClientId:t,getFirstMultiSelectedBlockClientId:n,getBlockRootClientId:r,__unstableGetBlockWithoutInnerBlocks:o,getBlockParents:i,__experimentalGetBlockListSettingsForBlocks:a}=e(Iv),l=t()||n();if(!l)return;const{name:s,attributes:c={},isValid:u}=o(l)||{},d=i(l),p=a(d),m=(0,Ce.find)(d,(e=>{var t;return null===(t=p[e])||void 0===t?void 0:t.__experimentalCaptureToolbars}));return{clientId:l,rootClientId:r(l),name:s,isValid:u,isEmptyDefaultBlock:s&&El({name:s,attributes:c}),capturingClientId:m}}function qP({__unstablePopoverSlot:e,__unstableContentRef:t}){const n=(0,er.Z)($P,[]);if(!n)return null;const{clientId:r,rootClientId:o,name:i,isValid:a,isEmptyDefaultBlock:l,capturingClientId:s}=n;return i?(0,_.createElement)(UP,{clientId:r,rootClientId:o,isValid:a,isEmptyDefaultBlock:l,capturingClientId:s,__unstablePopoverSlot:e,__unstableContentRef:t}):null}function GP({children:e}){const t=(0,_.useContext)(NR),n=(0,_.useContext)(rA.Context);return t||n?e:(Vt('wp.components.Popover.Slot name="block-toolbar"',{alternative:"wp.blockEditor.BlockTools"}),(0,_.createElement)(RR,{__unstablePopoverSlot:"block-toolbar"},(0,_.createElement)(qP,{__unstablePopoverSlot:"block-toolbar"}),e))}function KP(){const{hasSelectedBlock:e,hasMultiSelection:t}=(0,er.Z)(Iv),{clearSelectedBlock:n}=(0,tr.Z)(Iv);return Jh((r=>{function o(o){(e()||t())&&o.target===r&&n()}return r.addEventListener("mousedown",o),()=>{r.removeEventListener("mousedown",o)}}),[e,t,n])}function YP(e){return(0,_.createElement)("div",(0,nr.Z)({ref:KP()},e))}const XP=(0,_.createContext)();function JP({className:e,children:t}){const n=Lr("medium"),{isOutlineMode:r,isFocusMode:o,isNavigationMode:i}=(0,er.Z)((e=>{const{getSettings:t,isNavigationMode:n}=e(Iv),{outlineMode:r,focusMode:o}=t();return{isOutlineMode:r,isFocusMode:o,isNavigationMode:n()}}),[]);return(0,_.createElement)(jT,null,(0,_.createElement)("div",{ref:hr([KP(),IR(),LR()]),className:Cr()("block-editor-block-list__layout is-root-container",e,{"is-outline-mode":r,"is-focus-mode":o&&n,"is-navigate-mode":i})},t))}function QP({className:e,...t}){return function(){const e=(0,er.Z)((e=>e(Iv).getSettings().__experimentalBlockPatterns),[]);(0,_.useEffect)((()=>{if(null==e||!e.length)return;let t,n=-1;const r=()=>{n++,n>=e.length||((0,be.Ys)(Iv).__experimentalGetParsedPattern(e[n].name),t=PR(r))};return t=PR(r),()=>OR(t)}),[e])}(),(0,_.createElement)(GP,null,(0,_.createElement)(JP,{className:e},(0,_.createElement)(tO,t)))}function eO({placeholder:e,rootClientId:t,renderAppender:n,__experimentalAppenderTagName:r,__experimentalLayout:o=vk}){const[i,a]=(0,_.useState)(new Set),l=(0,_.useMemo)((()=>{const{IntersectionObserver:e}=window;if(e)return new e((e=>{a((t=>{const n=new Set(t);for(const t of e){const e=t.target.getAttribute("data-block");n[t.isIntersecting?"add":"delete"](e)}return n}))}))}),[a]),{order:s,selectedBlocks:c}=(0,er.Z)((e=>{const{getBlockOrder:n,getSelectedBlockClientIds:r}=e(Iv);return{order:n(t),selectedBlocks:r()}}),[t]);return(0,_.createElement)(yk,{value:o},(0,_.createElement)(XP.Provider,{value:l},s.map((e=>(0,_.createElement)(oA.ZP,{key:e,value:!i.has(e)&&!c.includes(e)},(0,_.createElement)(wR,{rootClientId:t,clientId:e}))))),s.length<1&&e,(0,_.createElement)(ER,{tagName:r,rootClientId:t,renderAppender:n}))}function tO(e){return(0,_.createElement)(oA.ZP,{value:!1},(0,_.createElement)(eO,e))}function nO({onClick:e}){return(0,_.createElement)("div",{tabIndex:0,role:"button",onClick:e,onKeyPress:e},(0,_.createElement)(rA,null,(0,_.createElement)(QP,null)))}let rO;var oO=function({viewportWidth:e,__experimentalPadding:t}){const[n,{width:r}]=Dr(),[o,{height:i}]=Dr();rO=rO||mE(QP);const a=(r-2*t)/e;return(0,_.createElement)("div",{className:"block-editor-block-preview__container editor-styles-wrapper","aria-hidden":!0,style:{height:i*a+2*t}},n,(0,_.createElement)(rA,{style:{transform:`scale(${a})`,width:e,left:t,right:t,top:t},className:"block-editor-block-preview__content"},o,(0,_.createElement)(rO,null)))},iO=(0,_.memo)((function({blocks:e,__experimentalPadding:t=0,viewportWidth:n=1200,__experimentalLive:r=!1,__experimentalOnClick:o}){const i=(0,er.Z)((e=>e(Iv).getSettings()),[]),a=(0,_.useMemo)((()=>{const e={...i};return e.__experimentalBlockPatterns=[],e}),[i]),l=(0,_.useMemo)((()=>(0,Ce.castArray)(e)),[e]);return e&&0!==e.length?(0,_.createElement)(YN,{value:l,settings:a},r?(0,_.createElement)(nO,{onClick:o}):(0,_.createElement)(oO,{viewportWidth:n,__experimentalPadding:t})):null})),aO=function({item:e}){var t,n;const{name:r,title:o,icon:i,description:a,initialAttributes:l}=e,s=zl(r),c=Zl(e);return(0,_.createElement)("div",{className:"block-editor-inserter__preview-container"},(0,_.createElement)("div",{className:"block-editor-inserter__preview"},c||s.example?(0,_.createElement)("div",{className:"block-editor-inserter__preview-content"},(0,_.createElement)(iO,{__experimentalPadding:16,viewportWidth:null!==(t=null===(n=s.example)||void 0===n?void 0:n.viewportWidth)&&void 0!==t?t:500,blocks:s.example?ts(e.name,{attributes:{...s.example.attributes,...l},innerBlocks:s.example.innerBlocks}):Ul(r,l)})):(0,_.createElement)("div",{className:"block-editor-inserter__preview-content-missing"},U("No Preview Available."))),!c&&(0,_.createElement)(UN,{title:o,icon:i,description:a}))},lO=n(24565),sO=function(e,t={step:1}){const{step:n=1}=t,[r,o]=(0,_.useState)([]);return(0,_.useEffect)((()=>{let t=function(e,t){const n=[];for(let r=0;r<e.length;r++){const o=e[r];if(!t.includes(o))break;n.push(o)}return n}(e,r);t.length<n&&(t=t.concat(e.slice(t.length,n))),o(t);let i=t.length;const a=(0,lO.j)(),l=()=>{e.length<=i||(o((t=>[...t,...e.slice(i,i+n)])),i+=n,a.add({},l))};return a.add({},l),()=>a.reset()}),[e]),r},cO=(0,_.createContext)(),uO=(0,_.forwardRef)((function({isFirst:e,as:t,children:n,...r},o){const i=(0,_.useContext)(cO);return(0,_.createElement)(fp,(0,nr.Z)({ref:o,state:i,role:"option",focusable:!0},r),(r=>{const o={...r,tabIndex:e?0:r.tabIndex};return t?(0,_.createElement)(t,o,n):"function"==typeof n?n(o):(0,_.createElement)(Gi,o,n)}))})),dO=({isEnabled:e,blocks:t,icon:n,children:r})=>{const o={type:"inserter",blocks:t};return(0,_.createElement)(eL,{__experimentalTransferDataType:"wp-blocks",transferData:o,__experimentalDragComponent:(0,_.createElement)(tL,{count:t.length,icon:n})},(({onDraggableStart:t,onDraggableEnd:n})=>r({draggable:e,onDragStart:e?t:void 0,onDragEnd:e?n:void 0})))};function pO(e=window){const{platform:t}=e.navigator;return-1!==t.indexOf("Mac")||["iPad","iPhone"].includes(t)}var mO=(0,_.memo)((function({className:e,isFirst:t,item:n,onSelect:r,onHover:o,isDraggable:i,...a}){const l=(0,_.useRef)(!1),s=n.icon?{backgroundColor:n.icon.background,color:n.icon.foreground}:{},c=(0,_.useMemo)((()=>[Ul(n.name,n.initialAttributes,$l(n.innerBlocks))]),[n.name,n.initialAttributes,n.initialAttributes]);return(0,_.createElement)(dO,{isEnabled:i&&!n.disabled,blocks:c,icon:n.icon},(({draggable:i,onDragStart:c,onDragEnd:u})=>(0,_.createElement)("div",{className:"block-editor-block-types-list__list-item",draggable:i,onDragStart:e=>{l.current=!0,c&&(o(null),c(e))},onDragEnd:e=>{l.current=!1,u&&u(e)}},(0,_.createElement)(uO,(0,nr.Z)({isFirst:t,className:Cr()("block-editor-block-types-list__item",e),disabled:n.isDisabled,onClick:e=>{e.preventDefault(),r(n,pO()?e.metaKey:e.ctrlKey),o(null)},onKeyDown:e=>{const{keyCode:t}=e;t===Br&&(e.preventDefault(),r(n,pO()?e.metaKey:e.ctrlKey),o(null))},onFocus:()=>{l.current||o(n)},onMouseEnter:()=>{l.current||o(n)},onMouseLeave:()=>o(null),onBlur:()=>o(null)},a),(0,_.createElement)("span",{className:"block-editor-block-types-list__item-icon",style:s},(0,_.createElement)(dN,{icon:n.icon,showColors:!0})),(0,_.createElement)("span",{className:"block-editor-block-types-list__item-title"},n.title)))))})),fO=(0,_.forwardRef)((function(e,t){const[n,r]=(0,_.useState)(!1);return(0,_.useEffect)((()=>{n&&Gf(U("Use left and right arrow keys to move through blocks"))}),[n]),(0,_.createElement)("div",(0,nr.Z)({ref:t,role:"listbox","aria-orientation":"horizontal",onFocus:()=>{r(!0)},onBlur:e=>{!e.currentTarget.contains(e.relatedTarget)&&r(!1)}},e))})),hO=_d({name:"Group",compose:Ud,keys:[],useProps:function(e,t){return Sd({role:"group"},t)}}),gO=(kd({as:"div",useHook:hO}),kd({as:"div",useHook:_d({name:"CompositeGroup",compose:[hO,cp],keys:tp,propsAreEqual:function(e,t){if(!t.id||e.id!==t.id)return hO.unstable_propsAreEqual(e,t);var n=e.currentId,r=(e.unstable_moves,Id(e,["currentId","unstable_moves"])),o=t.currentId,i=(t.unstable_moves,Id(t,["currentId","unstable_moves"]));if(e.items&&t.items){var a=sL(e.items,n),l=sL(t.items,o),s=null==a?void 0:a.groupId,c=null==l?void 0:l.groupId;if(t.id===c||t.id===s)return!1}return hO.unstable_propsAreEqual(r,i)},useProps:function(e,t){var n=t.ref,r=Id(t,["ref"]),o=(0,_.useRef)(null),i=e.id;return Dd((function(){var t;if(i)return null===(t=e.registerGroup)||void 0===t||t.call(e,{id:i,ref:o}),function(){var t;null===(t=e.unregisterGroup)||void 0===t||t.call(e,i)}}),[i,e.registerGroup,e.unregisterGroup]),Sd({ref:Rd(o,n)},r)}})})),vO=(0,_.forwardRef)((function(e,t){const n=(0,_.useContext)(cO);return(0,_.createElement)(gO,(0,nr.Z)({state:n,role:"presentation",ref:t},e))})),bO=function({items:e=[],onSelect:t,onHover:n=(()=>{}),children:r,label:o,isDraggable:i=!0}){return(0,_.createElement)(fO,{className:"block-editor-block-types-list","aria-label":o},function(e,t){const n=[];for(let t=0,r=e.length;t<r;t+=3)n.push(e.slice(t,t+3));return n}(e).map(((e,r)=>(0,_.createElement)(vO,{key:r},e.map(((e,o)=>(0,_.createElement)(mO,{key:e.id,item:e,className:zs(e.id),onSelect:t,onHover:n,isDraggable:i,isFirst:0===r&&0===o})))))),r)},yO=function({title:e,icon:t,children:n}){return(0,_.createElement)(_.Fragment,null,(0,_.createElement)("div",{className:"block-editor-inserter__panel-header"},(0,_.createElement)("h2",{className:"block-editor-inserter__panel-title"},e),(0,_.createElement)(Oo,{icon:t})),(0,_.createElement)("div",{className:"block-editor-inserter__panel-content"},n))},wO=(e,t)=>{const{categories:n,collections:r,items:o}=(0,er.Z)((t=>{const{getInserterItems:n}=t(Iv),{getCategories:r,getCollections:o}=t(cl);return{categories:r(),collections:o(),items:n(e)}}),[e]);return[o,n,r,(0,_.useCallback)((({name:e,initialAttributes:n,innerBlocks:r},o)=>{const i=Ul(e,n,$l(r));t(i,void 0,o)}),[t])]},kO=function({children:e}){const t=CL({shift:!0,wrap:"horizontal"});return(0,_.createElement)(cO.Provider,{value:t},e)};const EO=[];var _O=function({rootClientId:e,onInsert:t,onHover:n,showMostUsedBlocks:r}){const[o,i,a,l]=wO(e,t),s=(0,_.useMemo)((()=>(0,Ce.orderBy)(o,["frecency"],["desc"]).slice(0,6)),[o]),c=(0,_.useMemo)((()=>o.filter((e=>!e.category))),[o]),u=(0,_.useMemo)((()=>(0,Ce.flow)((e=>e.filter((e=>e.category&&"reusable"!==e.category))),(e=>(0,Ce.groupBy)(e,"category")))(o)),[o]),d=(0,_.useMemo)((()=>{const e={...a};return Object.keys(a).forEach((t=>{e[t]=o.filter((e=>(e=>e.name.split("/")[0])(e)===t)),0===e[t].length&&delete e[t]})),e}),[o,a]);(0,_.useEffect)((()=>()=>n(null)),[]);const p=sO(i),m=i.length===p.length,f=(0,_.useMemo)((()=>Object.entries(a)),[a]),h=sO(m?f:EO);return(0,_.createElement)(kO,null,(0,_.createElement)("div",null,r&&!!s.length&&(0,_.createElement)(yO,{title:$("Most used","blocks")},(0,_.createElement)(bO,{items:s,onSelect:l,onHover:n,label:$("Most used","blocks")})),(0,Ce.map)(p,(e=>{const t=u[e.slug];return t&&t.length?(0,_.createElement)(yO,{key:e.slug,title:e.title,icon:e.icon},(0,_.createElement)(bO,{items:t,onSelect:l,onHover:n,label:e.title})):null})),m&&c.length>0&&(0,_.createElement)(yO,{className:"block-editor-inserter__uncategorized-blocks-panel",title:U("Uncategorized")},(0,_.createElement)(bO,{items:c,onSelect:l,onHover:n,label:U("Uncategorized")})),(0,Ce.map)(h,(([e,t])=>{const r=d[e];return r&&r.length?(0,_.createElement)(yO,{key:e,title:t.title,icon:t.icon},(0,_.createElement)(bO,{items:r,onSelect:l,onHover:n,label:t.title})):null}))))},CO=function({selectedCategory:e,patternCategories:t,onClickCategory:n,children:r}){return(0,_.createElement)(_.Fragment,null,(0,_.createElement)("div",{className:Cr()("block-editor-inserter__panel-header","block-editor-inserter__panel-header-patterns")},(0,_.createElement)(u_,{className:"block-editor-inserter__panel-dropdown",label:U("Filter patterns"),hideLabelFromVision:!0,value:e.name,onChange:e=>{n(t.find((t=>e===t.name)))},onBlur:e=>{null!=e&&e.relatedTarget||e.stopPropagation()},options:(()=>{const e=[];return t.map((t=>e.push({value:t.name,label:t.label}))),e})()})),(0,_.createElement)("div",{className:"block-editor-inserter__panel-content"},r))},xO=(e,t)=>{const{patternCategories:n,patterns:r}=(0,er.Z)((e=>{const{__experimentalGetAllowedPatterns:n,getSettings:r}=e(Iv);return{patterns:n(t),patternCategories:r().__experimentalBlockPatternCategories}}),[t]),{createSuccessNotice:o}=(0,tr.Z)(SP);return[r,n,(0,_.useCallback)(((t,n)=>{e((0,Ce.map)(n,(e=>Gl(e))),t.name),o(L(U('Block pattern "%s" inserted.'),t.title),{type:"snackbar"})}),[])]};function SO({isDraggable:e,pattern:t,onClick:n,composite:r}){const{name:o,viewportWidth:i}=t,{blocks:a}=(0,er.Z)((e=>e(Iv).__experimentalGetParsedPattern(o)),[o]),l=`block-editor-block-patterns-list__item-description-${Rb(SO)}`;return(0,_.createElement)(dO,{isEnabled:e,blocks:a},(({draggable:e,onDragStart:o,onDragEnd:s})=>(0,_.createElement)("div",{className:"block-editor-block-patterns-list__list-item","aria-label":t.title,"aria-describedby":t.description?l:void 0,draggable:e,onDragStart:o,onDragEnd:s},(0,_.createElement)(fp,(0,nr.Z)({role:"option",as:"div"},r,{className:"block-editor-block-patterns-list__item",onClick:()=>n(t,a)}),(0,_.createElement)(iO,{blocks:a,viewportWidth:i}),(0,_.createElement)("div",{className:"block-editor-block-patterns-list__item-title"},t.title),!!t.description&&(0,_.createElement)($i,{id:l},t.description)))))}function IO(){return(0,_.createElement)("div",{className:"block-editor-block-patterns-list__item is-placeholder"})}var TO=function({isDraggable:e,blockPatterns:t,shownPatterns:n,onClickPattern:r,orientation:o,label:i=U("Block Patterns")}){const a=CL({orientation:o});return(0,_.createElement)(LL,(0,nr.Z)({},a,{role:"listbox",className:"block-editor-block-patterns-list","aria-label":i}),t.map((t=>n.includes(t)?(0,_.createElement)(SO,{key:t.name,pattern:t,onClick:r,isDraggable:e,composite:a}):(0,_.createElement)(IO,{key:t.name}))))};function NO({rootClientId:e,onInsert:t,selectedCategory:n,onClickCategory:r}){const[o,i,a]=xO(t,e),l=(0,_.useMemo)((()=>i.filter((e=>o.some((t=>{var n;return null===(n=t.categories)||void 0===n?void 0:n.includes(e.name)}))))),[o,i]),s=n||l[0];(0,_.useEffect)((()=>{o.some((e=>c(e)===1/0))&&!l.find((e=>"uncategorized"===e.name))&&l.push({name:"uncategorized",label:$("Uncategorized")})}),[l,o]);const c=(0,_.useCallback)((e=>{if(!e.categories||!e.categories.length)return 1/0;const t=(0,Ce.fromPairs)(l.map((({name:e},t)=>[e,t])));return Math.min(...e.categories.map((e=>void 0!==t[e]?t[e]:1/0)))}),[l]),u=(0,_.useMemo)((()=>o.filter((e=>"uncategorized"===s.name?c(e)===1/0:e.categories&&e.categories.includes(s.name)))),[o,s]),d=(0,_.useMemo)((()=>u.sort(((e,t)=>c(e)-c(t)))),[u,c]),p=sO(d);return(0,_.createElement)(_.Fragment,null,!!u.length&&(0,_.createElement)(CO,{selectedCategory:s,patternCategories:l,onClickCategory:r},(0,_.createElement)(TO,{shownPatterns:p,blockPatterns:u,onClickPattern:a,label:s.label,orientation:"vertical",isDraggable:!0})))}var AO=function({rootClientId:e,onInsert:t,onClickCategory:n,selectedCategory:r}){return(0,_.createElement)(NO,{rootClientId:e,selectedCategory:r,onInsert:t,onClickCategory:n})},RO=function(){return(0,_.createElement)("div",{className:"block-editor-inserter__no-results"},(0,_.createElement)(dk,{className:"block-editor-inserter__no-results-icon",icon:bl}),(0,_.createElement)("p",null,U("No results found.")))};function LO({onHover:e,onInsert:t,rootClientId:n}){const[r,,,o]=wO(n,t),i=(0,_.useMemo)((()=>r.filter((({category:e})=>"reusable"===e))),[r]);return 0===i.length?(0,_.createElement)(RO,null):(0,_.createElement)(yO,{title:U("Reusable blocks")},(0,_.createElement)(bO,{items:i,onSelect:o,onHover:e,label:U("Reusable blocks")}))}var PO=function({rootClientId:e,onInsert:t,onHover:n}){return(0,_.createElement)(_.Fragment,null,(0,_.createElement)(LO,{onHover:n,onInsert:t,rootClientId:e}),(0,_.createElement)("div",{className:"block-editor-inserter__manage-reusable-blocks-container"},(0,_.createElement)("a",{className:"block-editor-inserter__manage-reusable-blocks",href:Q("edit.php",{post_type:"wp_block"})},U("Manage Reusable blocks"))))};const{Fill:OO,Slot:DO}=Er("__unstableInserterMenuExtension");OO.Slot=DO;var MO=OO,BO=function({rootClientId:e="",insertionIndex:t,clientId:n,isAppender:r,onSelect:o,shouldFocusBlock:i=!0}){const{getSelectedBlock:a}=(0,er.Z)(Iv),{destinationRootClientId:l,destinationIndex:s}=(0,er.Z)((o=>{const{getSelectedBlockClientId:i,getBlockRootClientId:a,getBlockIndex:l,getBlockOrder:s}=o(Iv),c=i();let u,d=e;return void 0!==t?u=t:n?u=l(n,d):!r&&c?(d=a(c),u=l(c,d)+1):u=s(d).length,{destinationRootClientId:d,destinationIndex:u}}),[e,t,n,r]),{replaceBlocks:c,insertBlocks:u,showInsertionPoint:d,hideInsertionPoint:p}=(0,tr.Z)(Iv),m=(0,_.useCallback)(((e,t,n=!1)=>{const d=a();!r&&d&&El(d)?c(d.clientId,e,null,i||n?0:null,t):u(e,s,l,!0,i||n?0:null,t),Gf(L(q("%d block added.","%d blocks added.",(0,Ce.castArray)(e).length),(0,Ce.castArray)(e).length)),o&&o()}),[r,a,c,u,l,s,o,i]),f=(0,_.useCallback)((e=>{e?d(l,s):p()}),[d,p,l,s]);return[l,m,f]};const FO=e=>e.name||"",zO=e=>e.title,HO=e=>e.description||"",VO=e=>e.keywords||[],WO=e=>e.category,ZO=()=>null;function jO(e=""){return(e=(e=(0,Ce.deburr)(e)).replace(/^\//,"")).toLowerCase()}const UO=(e="")=>(0,Ce.words)(jO(e)),$O=(e,t,n,r)=>0===UO(r).length?e:qO(e,r,{getCategory:e=>{var n;return null===(n=(0,Ce.find)(t,{slug:e.category}))||void 0===n?void 0:n.title},getCollection:e=>{var t;return null===(t=n[e.name.split("/")[0]])||void 0===t?void 0:t.title}}),qO=(e=[],t="",n={})=>{if(0===UO(t).length)return e;const r=e.map((e=>[e,GO(e,t,n)])).filter((([,e])=>e>0));return r.sort((([,e],[,t])=>t-e)),r.map((([e])=>e))};function GO(e,t,n={}){const{getName:r=FO,getTitle:o=zO,getDescription:i=HO,getKeywords:a=VO,getCategory:l=WO,getCollection:s=ZO}=n,c=r(e),u=o(e),d=i(e),p=a(e),m=l(e),f=s(e),h=jO(t),g=jO(u);let v=0;if(h===g)v+=30;else if(g.startsWith(h))v+=20;else{const e=[c,u,d,...p,m,f].join(" ");0===(b=(0,Ce.words)(h),y=e,(0,Ce.differenceWith)(b,UO(y),((e,t)=>t.includes(e)))).length&&(v+=10)}var b,y;return 0!==v&&c.startsWith("core/")&&v++,v}const KO=[];var YO=function({filterValue:e,onSelect:t,onHover:n,rootClientId:r,clientId:o,isAppender:i,__experimentalInsertionIndex:a,maxBlockPatterns:l,maxBlockTypes:s,showBlockDirectory:c=!1,isDraggable:u=!0,shouldFocusBlock:d=!0}){const p=xo(Gf,500),[m,f]=BO({onSelect:t,rootClientId:r,clientId:o,isAppender:i,insertionIndex:a,shouldFocusBlock:d}),[h,g,v,b]=wO(m,f),[y,,w]=xO(f,m),k=(0,_.useMemo)((()=>{const t=$O((0,Ce.orderBy)(h,["frecency"],["desc"]),g,v,e);return void 0!==s?t.slice(0,s):t}),[e,h,g,v,s]),E=(0,_.useMemo)((()=>{const t=qO(y,e);return void 0!==l?t.slice(0,l):t}),[e,y,l]);(0,_.useEffect)((()=>{if(!e)return;const t=k.length+E.length,n=L(q("%d result found.","%d results found.",t),t);p(n)}),[e,p]);const C=sO(k,{step:9}),x=sO(C.length===k.length?E:KO),S=!(0,Ce.isEmpty)(k)||!(0,Ce.isEmpty)(E);return(0,_.createElement)(kO,null,!c&&!S&&(0,_.createElement)(RO,null),!!k.length&&(0,_.createElement)(yO,{title:(0,_.createElement)($i,null,U("Blocks"))},(0,_.createElement)(bO,{items:C,onSelect:b,onHover:n,label:U("Blocks"),isDraggable:u})),!!k.length&&!!E.length&&(0,_.createElement)("div",{className:"block-editor-inserter__quick-inserter-separator"}),!!E.length&&(0,_.createElement)(yO,{title:(0,_.createElement)($i,null,U("Block Patterns"))},(0,_.createElement)("div",{className:"block-editor-inserter__quick-inserter-patterns"},(0,_.createElement)(TO,{shownPatterns:x,blockPatterns:E,onClickPattern:w,isDraggable:u}))),c&&(0,_.createElement)(MO.Slot,{fillProps:{onSelect:b,onHover:n,filterValue:e,hasItems:S,rootClientId:m}},(e=>e.length?e:S?null:(0,_.createElement)(RO,null))))};const XO=({tabId:e,onClick:t,children:n,selected:r,...o})=>(0,_.createElement)(Gi,(0,nr.Z)({role:"tab",tabIndex:r?null:-1,"aria-selected":r,id:e,onClick:t},o),n);function JO({className:e,children:t,tabs:n,initialTabName:r,orientation:o="horizontal",activeClass:i="is-active",onSelect:a=Ce.noop}){var l;const s=Rb(JO,"tab-panel"),[c,u]=(0,_.useState)(null),d=e=>{u(e),a(e)},p=(0,Ce.find)(n,{name:c}),m=`${s}-${null!==(l=null==p?void 0:p.name)&&void 0!==l?l:"none"}`;return(0,_.useEffect)((()=>{(0,Ce.find)(n,{name:c})||u(r||(n.length>0?n[0].name:null))}),[n]),(0,_.createElement)("div",{className:e},(0,_.createElement)(Np,{role:"tablist",orientation:o,onNavigate:(e,t)=>{t.click()},className:"components-tab-panel__tabs"},n.map((e=>(0,_.createElement)(XO,{className:Cr()("components-tab-panel__tabs-item",e.className,{[i]:e.name===c}),tabId:`${s}-${e.name}`,"aria-controls":`${s}-${e.name}-view`,selected:e.name===c,key:e.name,onClick:(0,Ce.partial)(d,e.name)},e.title)))),p&&(0,_.createElement)("div",{key:m,"aria-labelledby":m,role:"tabpanel",id:`${m}-view`,className:"components-tab-panel__tab-content"},t(p)))}const QO={name:"blocks",title:U("Blocks")},eD={name:"patterns",title:U("Patterns")},tD={name:"reusable",title:U("Reusable")};var nD=function({children:e,showPatterns:t=!1,showReusableBlocks:n=!1,onSelect:r}){const o=(0,_.useMemo)((()=>{const e=[QO];return t&&e.push(eD),n&&e.push(tD),e}),[QO,t,eD,n,tD]);return(0,_.createElement)(JO,{className:"block-editor-inserter__tabs",tabs:o,onSelect:r},e)},rD=function({rootClientId:e,clientId:t,isAppender:n,__experimentalInsertionIndex:r,onSelect:o,showInserterHelpPanel:i,showMostUsedBlocks:a,shouldFocusBlock:l=!0}){const[s,c]=(0,_.useState)(""),[u,d]=(0,_.useState)(null),[p,m]=(0,_.useState)(null),[f,h,g]=BO({rootClientId:e,clientId:t,isAppender:n,insertionIndex:r,shouldFocusBlock:l}),{showPatterns:v,hasReusableBlocks:b}=(0,er.Z)((e=>{var t;const{__experimentalGetAllowedPatterns:n,getSettings:r}=e(Iv);return{showPatterns:!!n(f).length,hasReusableBlocks:!(null===(t=r().__experimentalReusableBlocks)||void 0===t||!t.length)}}),[f]),y=(0,_.useCallback)(((e,t,n)=>{h(e,t,n),o()}),[h,o]),w=(0,_.useCallback)(((e,t)=>{h(e,{patternName:t}),o()}),[h,o]),k=(0,_.useCallback)((e=>{g(!!e),d(e)}),[g,d]),E=(0,_.useCallback)((e=>{m(e)}),[m]),C=(0,_.useMemo)((()=>(0,_.createElement)(_.Fragment,null,(0,_.createElement)("div",{className:"block-editor-inserter__block-list"},(0,_.createElement)(_O,{rootClientId:f,onInsert:y,onHover:k,showMostUsedBlocks:a})),i&&(0,_.createElement)("div",{className:"block-editor-inserter__tips"},(0,_.createElement)($i,{as:"h2"},U("A tip for using the block editor")),(0,_.createElement)(jN,null)))),[f,y,k,s,a,i]),x=(0,_.useMemo)((()=>(0,_.createElement)(AO,{rootClientId:f,onInsert:w,onClickCategory:E,selectedCategory:p})),[f,w,E,p]),S=(0,_.useMemo)((()=>(0,_.createElement)(PO,{rootClientId:f,onInsert:y,onHover:k})),[f,y,k]),I=(0,_.useCallback)((e=>"blocks"===e.name?C:"patterns"===e.name?x:S),[C,x,S]);return(0,_.createElement)("div",{className:"block-editor-inserter__menu"},(0,_.createElement)("div",{className:"block-editor-inserter__main-area"},(0,_.createElement)("div",{className:"block-editor-inserter__content"},(0,_.createElement)(RN,{className:"block-editor-inserter__search",onChange:e=>{u&&d(null),c(e)},value:s,label:U("Search for blocks and patterns"),placeholder:U("Search")}),!!s&&(0,_.createElement)(YO,{filterValue:s,onSelect:o,onHover:k,rootClientId:e,clientId:t,isAppender:n,__experimentalInsertionIndex:r,showBlockDirectory:!0,shouldFocusBlock:l}),!s&&(v||b)&&(0,_.createElement)(nD,{showPatterns:v,showReusableBlocks:b},I),!s&&!v&&!b&&C)),i&&u&&(0,_.createElement)(aO,{item:u}))};function oD({onSelect:e,rootClientId:t,clientId:n,isAppender:r}){const[o,i]=(0,_.useState)(""),[a,l]=BO({onSelect:e,rootClientId:t,clientId:n,isAppender:r}),[s]=wO(a,l),[c]=xO(l,a),u=c.length&&!!o,d=u&&c.length>6||s.length>6,{setInserterIsOpened:p,insertionIndex:m}=(0,er.Z)((e=>{const{getSettings:r,getBlockIndex:o,getBlockCount:i}=e(Iv),a=o(n,t);return{setInserterIsOpened:r().__experimentalSetIsInserterOpened,insertionIndex:-1===a?i():a}}),[n,t]);return(0,_.useEffect)((()=>{p&&p(!1)}),[p]),(0,_.createElement)("div",{className:Cr()("block-editor-inserter__quick-inserter",{"has-search":d,"has-expand":p})},d&&(0,_.createElement)(RN,{className:"block-editor-inserter__search",value:o,onChange:e=>{i(e)},label:U("Search for blocks and patterns"),placeholder:U("Search")}),(0,_.createElement)("div",{className:"block-editor-inserter__quick-inserter-results"},(0,_.createElement)(YO,{filterValue:o,onSelect:e,rootClientId:t,clientId:n,isAppender:r,maxBlockPatterns:u?2:0,maxBlockTypes:6,isDraggable:!1})),p&&(0,_.createElement)(Gi,{className:"block-editor-inserter__quick-inserter-expand",onClick:()=>{p({rootClientId:t,insertionIndex:m})},"aria-label":U("Browse all. This will open the main inserter panel in the editor toolbar.")},U("Browse all")))}const iD=({onToggle:e,disabled:t,isOpen:n,blockTitle:r,hasSingleBlockType:o,toggleProps:i={}})=>{let a;a=o?L($("Add %s","directly add the only allowed block"),r):$("Add block","Generic label for block inserter button");const{onClick:l,...s}=i;return(0,_.createElement)(Gi,(0,nr.Z)({icon:GE,label:a,tooltipPosition:"bottom",onClick:function(t){e&&e(t),l&&l(t)},className:"block-editor-inserter__toggle","aria-haspopup":!o&&"true","aria-expanded":!o&&n,disabled:t},s))};class aD extends _.Component{constructor(){super(...arguments),this.onToggle=this.onToggle.bind(this),this.renderToggle=this.renderToggle.bind(this),this.renderContent=this.renderContent.bind(this)}onToggle(e){const{onToggle:t}=this.props;t&&t(e)}renderToggle({onToggle:e,isOpen:t}){const{disabled:n,blockTitle:r,hasSingleBlockType:o,toggleProps:i,hasItems:a,renderToggle:l=iD}=this.props;return l({onToggle:e,isOpen:t,disabled:n||!a,blockTitle:r,hasSingleBlockType:o,toggleProps:i})}renderContent({onClose:e}){const{rootClientId:t,clientId:n,isAppender:r,showInserterHelpPanel:o,__experimentalIsQuick:i}=this.props;return i?(0,_.createElement)(oD,{onSelect:()=>{e()},rootClientId:t,clientId:n,isAppender:r}):(0,_.createElement)(rD,{onSelect:()=>{e()},rootClientId:t,clientId:n,isAppender:r,showInserterHelpPanel:o})}render(){const{position:e,hasSingleBlockType:t,insertOnlyAllowedBlock:n,__experimentalIsQuick:r,onSelectOrClose:o}=this.props;return t?this.renderToggle({onToggle:n}):(0,_.createElement)(Cp,{className:"block-editor-inserter",contentClassName:Cr()("block-editor-inserter__popover",{"is-quick":r}),position:e,onToggle:this.onToggle,expandOnMobile:!0,headerTitle:U("Add a block"),renderToggle:this.renderToggle,renderContent:this.renderContent,onClose:o})}}var lD=CE([xN(((e,{clientId:t,rootClientId:n})=>{const{getBlockRootClientId:r,hasInserterItems:o,__experimentalGetAllowedBlocks:i}=e(Iv),{getBlockVariations:a}=e(cl),l=i(n=n||r(t)||void 0),s=1===(0,Ce.size)(l)&&0===(0,Ce.size)(a(l[0].name,"inserter"));let c=!1;return s&&(c=l[0]),{hasItems:o(n),hasSingleBlockType:s,blockTitle:c?c.title:"",allowedBlockType:c,rootClientId:n}})),IN(((e,t,{select:n})=>({insertOnlyAllowedBlock(){const{rootClientId:r,clientId:o,isAppender:i,hasSingleBlockType:a,allowedBlockType:l,onSelectOrClose:s}=t;if(!a)return;const{insertBlock:c}=e(Iv);c(Ul(l.name),function(){const{getBlockIndex:e,getBlockSelectionEnd:t,getBlockOrder:a,getBlockRootClientId:l}=n(Iv);if(o)return e(o,r);const s=t();return!i&&s&&l(s)===r?e(s,r)+1:a(r).length}(),r),s&&s(),Gf(L(U("%s block added"),l.title))}}))),TN((({hasItems:e,isAppender:t,rootClientId:n,clientId:r})=>e||!t&&!n&&!r))])(aD);function sD({rootClientId:e,className:t,onFocus:n,tabIndex:r},o){return(0,_.createElement)(lD,{position:"bottom center",rootClientId:e,__experimentalIsQuick:!0,renderToggle:({onToggle:e,disabled:i,isOpen:a,blockTitle:l,hasSingleBlockType:s})=>{let c;c=s?L($("Add %s","directly add the only allowed block"),l):$("Add block","Generic label for block inserter button");const u=!s;let d=(0,_.createElement)(Gi,{ref:o,onFocus:n,tabIndex:r,className:Cr()(t,"block-editor-button-block-appender"),onClick:e,"aria-haspopup":u?"true":void 0,"aria-expanded":u?a:void 0,disabled:i,label:c},!s&&(0,_.createElement)($i,{as:"span"},c),(0,_.createElement)(dk,{icon:GE}));return(u||s)&&(d=(0,_.createElement)(Lo,{text:c},d)),d},isAppender:!0})}(0,_.forwardRef)(((e,t)=>(Vt("wp.blockEditor.ButtonBlockerAppender",{alternative:"wp.blockEditor.ButtonBlockAppender"}),sD(e,t))));var cD=(0,_.forwardRef)(sD),uD=Ea((e=>t=>{const{clientId:n}=Mp();return(0,_.createElement)(e,(0,nr.Z)({},t,{clientId:n}))}),"withClientId"),dD=uD((({clientId:e,showSeparator:t,isFloating:n,onAddBlock:r})=>(0,_.createElement)(cD,{rootClientId:e,showSeparator:t,isFloating:n,onAddBlock:r}))),pD=CE([uD,xN(((e,{clientId:t})=>{const{getBlockOrder:n}=e(Iv),r=n(t);return{lastBlockClientId:(0,Ce.last)(r)}}))])((({clientId:e,lastBlockClientId:t})=>(0,_.createElement)(kR,{rootClientId:e,lastBlockClientId:t})));const mD=new WeakMap;function fD(e){const{clientId:t,allowedBlocks:n,template:r,templateLock:o,wrapperRef:i,templateInsertUpdatesSelection:a,__experimentalCaptureToolbars:l,__experimentalAppenderTagName:s,renderAppender:c,orientation:u,placeholder:d,__experimentalLayout:p}=e;!function(e,t,n,r,o,i){const{updateBlockListSettings:a}=(0,tr.Z)(Iv),{blockListSettings:l,parentLock:s}=(0,er.Z)((t=>{const n=t(Iv).getBlockRootClientId(e);return{blockListSettings:t(Iv).getBlockListSettings(e),parentLock:t(Iv).getTemplateLock(n)}}),[e]),c=(0,_.useMemo)((()=>t),t);(0,_.useLayoutEffect)((()=>{const t={allowedBlocks:c,templateLock:void 0===n?s:n};if(void 0!==r&&(t.__experimentalCaptureToolbars=r),void 0!==o)t.orientation=o;else{const e=gk(null==i?void 0:i.type);t.orientation=e.getOrientation(i)}(0,Ie.ZP)(l,t)||a(e,t)}),[e,l,c,n,s,r,o,a,i])}(t,n,o,l,u,p),function(e,t,n,r){const{getSelectedBlocksInitialCaretPosition:o}=(0,er.Z)(Iv),{replaceInnerBlocks:i}=(0,tr.Z)(Iv),a=(0,er.Z)((t=>t(Iv).getBlocks(e)),[e]),l=(0,_.useRef)(null);(0,_.useLayoutEffect)((()=>{if((0===a.length||"all"===n)&&!(0,Ce.isEqual)(t,l.current)){l.current=t;const n=Uu(a,t);(0,Ce.isEqual)(n,a)||i(e,n,0===a.length&&r&&0!==n.length,o())}}),[a,t,n,e])}(t,r,o,a);const m=(0,er.Z)((e=>{const n=e(Iv).getBlock(t),r=zl(n.name);if(r&&r.providesContext)return function(e,t){mD.has(t)||mD.set(t,new WeakMap);const n=mD.get(t);if(!n.has(e)){const r=(0,Ce.mapValues)(t.providesContext,(t=>e[t]));n.set(e,r)}return n.get(e)}(n.attributes,r)}),[t]);return(0,_.createElement)(sA,{value:m},(0,_.createElement)(tO,{rootClientId:t,renderAppender:c,__experimentalAppenderTagName:s,__experimentalLayout:p,wrapperRef:i,placeholder:d}))}function hD(e){return KN(e),(0,_.createElement)(fD,e)}const gD=(0,_.forwardRef)(((e,t)=>{const n=vD({ref:t},e);return(0,_.createElement)("div",{className:"block-editor-inner-blocks"},(0,_.createElement)("div",n))}));function vD(e={},t={}){const{clientId:n}=Mp(),r=Lr("medium","<"),o=(0,er.Z)((e=>{const{getBlockName:t,isBlockSelected:o,hasSelectedInnerBlock:i,isNavigationMode:a}=e(Iv),l=a()||r;return"core/template"!==t(n)&&!o(n)&&!i(n,!0)&&l}),[n,r]),i=hr([e.ref,IR({rootClientId:n})]),a=t.value&&t.onChange?hD:fD;return{...e,ref:i,className:Cr()(e.className,"block-editor-block-list__layout",{"has-overlay":o}),children:(0,_.createElement)(a,(0,nr.Z)({},t,{clientId:n}))}}gD.DefaultBlockAppender=pD,gD.ButtonBlockAppender=dD,gD.Content=Ms((({BlockContent:e})=>(0,_.createElement)(e,null)));var bD=gD;const yD=pb.F4` from { transform: rotate(0deg); } to { transform: rotate(360deg); } `,wD=`calc( ( ${Qb.spinnerSize} - ${Qb.spinnerSize} * ( 2 / 3 ) ) / 2 )`,kD=Zi("span",{target:"e1s472tg0"})("display:inline-block;background-color:",Nb.gray[600],";width:",Qb.spinnerSize,";height:",Qb.spinnerSize,";opacity:0.7;margin:5px 11px 0;border-radius:100%;position:relative;&::before{content:'';position:absolute;background-color:",Nb.white,";top:",wD,";left:",wD,";width:calc( ",Qb.spinnerSize," / 4.5 );height:calc( ",Qb.spinnerSize," / 4.5 );border-radius:100%;transform-origin:calc( ",Qb.spinnerSize," / 3 ) calc( ",Qb.spinnerSize," / 3 );animation:",yD," 1s infinite linear;}");function ED(){return(0,_.createElement)(kD,{className:"components-spinner"})}var _D=(0,_.createElement)(ko,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},(0,_.createElement)(yo,{d:"M6.734 16.106l2.176-2.38-1.093-1.028-3.846 4.158 3.846 4.157 1.093-1.027-2.176-2.38h2.811c1.125 0 2.25.03 3.374 0 1.428-.001 3.362-.25 4.963-1.277 1.66-1.065 2.868-2.906 2.868-5.859 0-2.479-1.327-4.896-3.65-5.93-1.82-.813-3.044-.8-4.806-.788l-.567.002v1.5c.184 0 .368 0 .553-.002 1.82-.007 2.704-.014 4.21.657 1.854.827 2.76 2.657 2.76 4.561 0 2.472-.973 3.824-2.178 4.596-1.258.807-2.864 1.04-4.163 1.04h-.02c-1.115.03-2.229 0-3.344 0H6.734z"})),CD=({value:e,onChange:t=Ce.noop,settings:n})=>{if(!n||!n.length)return null;const r=n=>r=>{t({...e,[n.id]:r})},o=n.map((t=>(0,_.createElement)(JT,{className:"block-editor-link-control__setting",key:t.id,label:t.title,onChange:r(t),checked:!!e&&!!e[t.id]})));return(0,_.createElement)("fieldset",{className:"block-editor-link-control__settings"},(0,_.createElement)($i,{as:"legend"},U("Currently selected link settings")),o)},xD=Ea((e=>t=>(0,_.createElement)(e,(0,nr.Z)({},t,{speak:Gf,debouncedSpeak:xo(Gf,500)}))),"withSpokenMessages"),SD=Ea((e=>class extends _.Component{constructor(e){super(e),this.timeouts=[],this.setTimeout=this.setTimeout.bind(this),this.clearTimeout=this.clearTimeout.bind(this)}componentWillUnmount(){this.timeouts.forEach(clearTimeout)}setTimeout(e,t){const n=setTimeout((()=>{e(),this.clearTimeout(n)}),t);return this.timeouts.push(n),n}clearTimeout(e){clearTimeout(e),this.timeouts=(0,Ce.without)(this.timeouts,e)}render(){const t={...this.props,setTimeout:this.setTimeout,clearTimeout:this.clearTimeout};return(0,_.createElement)(e,t)}}),"withSafeTimeout");function ID(e){try{return new URL(e),!0}catch{return!1}}class TD extends _.Component{constructor(e){super(e),this.onChange=this.onChange.bind(this),this.onFocus=this.onFocus.bind(this),this.onKeyDown=this.onKeyDown.bind(this),this.selectLink=this.selectLink.bind(this),this.handleOnClick=this.handleOnClick.bind(this),this.bindSuggestionNode=this.bindSuggestionNode.bind(this),this.autocompleteRef=e.autocompleteRef||(0,_.createRef)(),this.inputRef=(0,_.createRef)(),this.updateSuggestions=(0,Ce.debounce)(this.updateSuggestions.bind(this),200),this.suggestionNodes=[],this.isUpdatingSuggestions=!1,this.state={suggestions:[],showSuggestions:!1,selectedSuggestion:null,suggestionsListboxId:"",suggestionOptionIdPrefix:""}}componentDidUpdate(e){const{showSuggestions:t,selectedSuggestion:n}=this.state,{value:r}=this.props;t&&null!==n&&this.suggestionNodes[n]&&!this.scrollingIntoView&&(this.scrollingIntoView=!0,cR()(this.suggestionNodes[n],this.autocompleteRef.current,{onlyScrollIfNeeded:!0}),this.props.setTimeout((()=>{this.scrollingIntoView=!1}),100)),e.value!==r&&this.shouldShowInitialSuggestions()&&this.updateSuggestions()}componentDidMount(){this.shouldShowInitialSuggestions()&&this.updateSuggestions()}componentWillUnmount(){var e,t;null===(e=this.suggestionsRequest)||void 0===e||null===(t=e.cancel)||void 0===t||t.call(e),delete this.suggestionsRequest}bindSuggestionNode(e){return t=>{this.suggestionNodes[e]=t}}shouldShowInitialSuggestions(){const{suggestions:e}=this.state,{__experimentalShowInitialSuggestions:t=!1,value:n}=this.props;return!this.isUpdatingSuggestions&&t&&!(n&&n.length)&&!(e&&e.length)}updateSuggestions(e=""){const{__experimentalFetchLinkSuggestions:t,__experimentalHandleURLSuggestions:n}=this.props;if(!t)return;const r=!(e&&e.length);if(!r&&(e.length<2||!n&&ID(e)))return void this.setState({showSuggestions:!1,selectedSuggestion:null,loading:!1});this.isUpdatingSuggestions=!0,this.setState({selectedSuggestion:null,loading:!0});const o=t(e,{isInitialSuggestions:r});o.then((e=>{this.suggestionsRequest===o&&(this.setState({suggestions:e,loading:!1,showSuggestions:!!e.length}),e.length?this.props.debouncedSpeak(L(q("%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"):this.props.debouncedSpeak(U("No results."),"assertive"),this.isUpdatingSuggestions=!1)})).catch((()=>{this.suggestionsRequest===o&&(this.setState({loading:!1}),this.isUpdatingSuggestions=!1)})),this.suggestionsRequest=o}onChange(e){const t=e.target.value;this.props.onChange(t),this.props.disableSuggestions||this.updateSuggestions(t.trim())}onFocus(){const{suggestions:e}=this.state,{disableSuggestions:t,value:n}=this.props;!n||t||this.isUpdatingSuggestions||e&&e.length||this.updateSuggestions(n.trim())}onKeyDown(e){const{showSuggestions:t,selectedSuggestion:n,suggestions:r,loading:o}=this.state;if(!t||!r.length||o){switch(e.keyCode){case Hr:0!==e.target.selectionStart&&(e.preventDefault(),e.target.setSelectionRange(0,0));break;case Wr:this.props.value.length!==e.target.selectionStart&&(e.preventDefault(),e.target.setSelectionRange(this.props.value.length,this.props.value.length));break;case Br:this.props.onSubmit&&this.props.onSubmit()}return}const i=this.state.suggestions[this.state.selectedSuggestion];switch(e.keyCode){case Hr:{e.preventDefault();const t=n?n-1:r.length-1;this.setState({selectedSuggestion:t});break}case Wr:{e.preventDefault();const t=null===n||n===r.length-1?0:n+1;this.setState({selectedSuggestion:t});break}case 9:null!==this.state.selectedSuggestion&&(this.selectLink(i),this.props.speak(U("Link selected.")));break;case Br:null!==this.state.selectedSuggestion?(this.selectLink(i),this.props.onSubmit&&this.props.onSubmit(i)):this.props.onSubmit&&this.props.onSubmit()}}selectLink(e){this.props.onChange(e.url,e),this.setState({selectedSuggestion:null,showSuggestions:!1})}handleOnClick(e){this.selectLink(e),this.inputRef.current.focus()}static getDerivedStateFromProps({value:e,instanceId:t,disableSuggestions:n,__experimentalShowInitialSuggestions:r=!1},{showSuggestions:o}){let i=o;const a=e&&e.length;return r||a||(i=!1),!0===n&&(i=!1),{showSuggestions:i,suggestionsListboxId:`block-editor-url-input-suggestions-${t}`,suggestionOptionIdPrefix:`block-editor-url-input-suggestion-${t}`}}render(){return(0,_.createElement)(_.Fragment,null,this.renderControl(),this.renderSuggestions())}renderControl(){const{label:e,className:t,isFullWidth:n,instanceId:r,placeholder:o=U("Paste URL or type to search"),__experimentalRenderControl:i,value:a=""}=this.props,{loading:l,showSuggestions:s,selectedSuggestion:c,suggestionsListboxId:u,suggestionOptionIdPrefix:d}=this.state,p={id:`url-input-control-${r}`,label:e,className:Cr()("block-editor-url-input",t,{"is-full-width":n})},m={value:a,required:!0,className:"block-editor-url-input__input",type:"text",onChange:this.onChange,onFocus:this.onFocus,placeholder:o,onKeyDown:this.onKeyDown,role:"combobox","aria-label":U("URL"),"aria-expanded":s,"aria-autocomplete":"list","aria-owns":u,"aria-activedescendant":null!==c?`${d}-${c}`:void 0,ref:this.inputRef};return i?i(p,m,l):(0,_.createElement)(Hk,p,(0,_.createElement)("input",m),l&&(0,_.createElement)(ED,null))}renderSuggestions(){const{className:e,__experimentalRenderSuggestions:t,value:n="",__experimentalShowInitialSuggestions:r=!1}=this.props,{showSuggestions:o,suggestions:i,selectedSuggestion:a,suggestionsListboxId:l,suggestionOptionIdPrefix:s,loading:c}=this.state,u={id:l,ref:this.autocompleteRef,role:"listbox"},d=(e,t)=>({role:"option",tabIndex:"-1",id:`${s}-${t}`,ref:this.bindSuggestionNode(t),"aria-selected":t===a});return(0,Ce.isFunction)(t)&&o&&i.length?t({suggestions:i,selectedSuggestion:a,suggestionsListProps:u,buildSuggestionItemProps:d,isLoading:c,handleSuggestionClick:this.handleOnClick,isInitialSuggestions:r&&!(n&&n.length)}):!(0,Ce.isFunction)(t)&&o&&i.length?(0,_.createElement)(ia,{position:"bottom",noArrow:!0,focusOnMount:!1},(0,_.createElement)("div",(0,nr.Z)({},u,{className:Cr()("block-editor-url-input__suggestions",`${e}__suggestions`)}),i.map(((e,t)=>(0,_.createElement)(Gi,(0,nr.Z)({},d(0,t),{key:e.id,className:Cr()("block-editor-url-input__suggestion",{"is-selected":t===a}),onClick:()=>this.handleOnClick(e)}),e.title))))):null}}var ND=CE(SD,xD,xE,xN(((e,t)=>{if((0,Ce.isFunction)(t.__experimentalFetchLinkSuggestions))return;const{getSettings:n}=e(Iv);return{__experimentalFetchLinkSuggestions:n().__experimentalFetchLinkSuggestions}})))(TD),AD=({searchTerm:e,onClick:t,itemProps:n,isSelected:r,buttonText:o})=>{if(!e)return null;let i;return i=o?(0,Ce.isFunction)(o)?o(e):o:VN(L(U("Create: <mark>%s</mark>"),e),{mark:(0,_.createElement)("mark",null)}),(0,_.createElement)(Gi,(0,nr.Z)({},n,{className:Cr()("block-editor-link-control__search-create block-editor-link-control__search-item",{"is-selected":r}),onClick:t}),(0,_.createElement)(dk,{className:"block-editor-link-control__search-item-icon",icon:GE}),(0,_.createElement)("span",{className:"block-editor-link-control__search-item-header"},(0,_.createElement)("span",{className:"block-editor-link-control__search-item-title"},i)))};function RD(e,t=null){let n=e.replace(/^(?:https?:)\/\/(?:www\.)?/,"");if(n.match(/^[^\/]+\/$/)&&(n=n.replace("/","")),!t||n.length<=t||!n.match(/([\w|:])*\.(?:jpg|jpeg|gif|png|svg)/))return n;n=n.split("?")[0];const r=n.split("/"),o=r[r.length-1];if(o.length<=t)return"…"+n.slice(-t);const i=o.lastIndexOf("."),[a,l]=[o.slice(0,i),o.slice(i+1)],s=a.slice(-3)+"."+l;return o.slice(0,t-s.length-1)+"…"+s}function LD(e){try{return decodeURI(e)}catch(t){return e}}var PD=({text:e="",highlight:t=""})=>{const n=t.trim();if(!n)return e;const r=new RegExp(`(${(0,Ce.escapeRegExp)(n)})`,"gi");return VN(e.replace(r,"<mark>$&</mark>"),{mark:(0,_.createElement)("mark",null)})},OD=(0,_.createElement)(ko,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},(0,_.createElement)(yo,{d:"M9 0C4.03 0 0 4.03 0 9s4.03 9 9 9 9-4.03 9-9-4.03-9-9-9zM1.11 9.68h2.51c.04.91.167 1.814.38 2.7H1.84c-.403-.85-.65-1.764-.73-2.7zm8.57-5.4V1.19c.964.366 1.756 1.08 2.22 2 .205.347.386.708.54 1.08l-2.76.01zm3.22 1.35c.232.883.37 1.788.41 2.7H9.68v-2.7h3.22zM8.32 1.19v3.09H5.56c.154-.372.335-.733.54-1.08.462-.924 1.255-1.64 2.22-2.01zm0 4.44v2.7H4.7c.04-.912.178-1.817.41-2.7h3.21zm-4.7 2.69H1.11c.08-.936.327-1.85.73-2.7H4c-.213.886-.34 1.79-.38 2.7zM4.7 9.68h3.62v2.7H5.11c-.232-.883-.37-1.788-.41-2.7zm3.63 4v3.09c-.964-.366-1.756-1.08-2.22-2-.205-.347-.386-.708-.54-1.08l2.76-.01zm1.35 3.09v-3.04h2.76c-.154.372-.335.733-.54 1.08-.464.92-1.256 1.634-2.22 2v-.04zm0-4.44v-2.7h3.62c-.04.912-.178 1.817-.41 2.7H9.68zm4.71-2.7h2.51c-.08.936-.327 1.85-.73 2.7H14c.21-.87.337-1.757.38-2.65l.01-.05zm0-1.35c-.046-.894-.176-1.78-.39-2.65h2.16c.403.85.65 1.764.73 2.7l-2.5-.05zm1-4H13.6c-.324-.91-.793-1.76-1.39-2.52 1.244.56 2.325 1.426 3.14 2.52h.04zm-9.6-2.52c-.597.76-1.066 1.61-1.39 2.52H2.65c.815-1.094 1.896-1.96 3.14-2.52zm-3.15 12H4.4c.324.91.793 1.76 1.39 2.52-1.248-.567-2.33-1.445-3.14-2.55l-.01.03zm9.56 2.52c.597-.76 1.066-1.61 1.39-2.52h1.76c-.82 1.08-1.9 1.933-3.14 2.48l-.01.04z"})),DD=({itemProps:e,suggestion:t,isSelected:n=!1,onClick:r,isURL:o=!1,searchTerm:i="",shouldShowType:a=!1})=>(0,_.createElement)(Gi,(0,nr.Z)({},e,{onClick:r,className:Cr()("block-editor-link-control__search-item",{"is-selected":n,"is-url":o,"is-entity":!o})}),o&&(0,_.createElement)(dk,{className:"block-editor-link-control__search-item-icon",icon:OD}),(0,_.createElement)("span",{className:"block-editor-link-control__search-item-header"},(0,_.createElement)("span",{className:"block-editor-link-control__search-item-title"},(0,_.createElement)(PD,{text:t.title,highlight:i})),(0,_.createElement)("span",{"aria-hidden":!o,className:"block-editor-link-control__search-item-info"},!o&&(RD(LD(t.url))||""),o&&U("Press ENTER to add this link"))),a&&t.type&&(0,_.createElement)("span",{className:"block-editor-link-control__search-item-type"},"post_tag"===t.type?"tag":t.type));const MD="__CREATE__",BD=[{id:"opensInNewTab",title:U("Open in new tab")}];function FD({instanceId:e,withCreateSuggestion:t,currentInputValue:n,handleSuggestionClick:r,suggestionsListProps:o,buildSuggestionItemProps:i,suggestions:a,selectedSuggestion:l,isLoading:s,isInitialSuggestions:c,createSuggestionButtonText:u,suggestionsQuery:d}){const p=Cr()("block-editor-link-control__search-results",{"is-loading":s}),m=["url","mailto","tel","internal"],f=1===a.length&&m.includes(a[0].type.toLowerCase()),h=t&&!f&&!c,g=!(null!=d&&d.type),v=`block-editor-link-control-search-results-label-${e}`,b=c?U("Recently updated"):L(U('Search results for "%s"'),n),y=(0,_.createElement)(c?_.Fragment:$i,{},(0,_.createElement)("span",{className:"block-editor-link-control__search-results-label",id:v},b));return(0,_.createElement)("div",{className:"block-editor-link-control__search-results-wrapper"},y,(0,_.createElement)("div",(0,nr.Z)({},o,{className:p,"aria-labelledby":v}),a.map(((e,t)=>h&&MD===e.type?(0,_.createElement)(AD,{searchTerm:n,buttonText:u,onClick:()=>r(e),key:e.type,itemProps:i(e,t),isSelected:t===l}):MD===e.type?null:(0,_.createElement)(DD,{key:`${e.id}-${e.type}`,itemProps:i(e,t),suggestion:e,index:t,onClick:()=>{r(e)},isSelected:t===l,isURL:m.includes(e.type.toLowerCase()),searchTerm:n,shouldShowType:g})))))}function zD(e){const t=/^([^\s:]+:)/.exec(e);if(t)return t[1]}const HD=/^(mailto:)?[a-z0-9._%+-]+@[a-z0-9][a-z0-9.-]*\.[a-z]{2,63}$/i;function VD(e){return HD.test(e)}const WD=/^(?:[a-z]+:|#|\?|\.|\/)/i;function ZD(e){return e?(e=e.trim(),WD.test(e)||VD(e)?e:"http://"+e):e}function jD(e){const t=(0,Ce.startsWith)(e,"#");return ID(e)||e&&e.includes("www.")||t}const UD=()=>Promise.resolve([]),$D=e=>{let t="URL";const n=zD(e)||"";return n.includes("mailto")&&(t="mailto"),n.includes("tel")&&(t="tel"),(0,Ce.startsWith)(e,"#")&&(t="internal"),Promise.resolve([{id:e,title:e,url:"URL"===t?ZD(e):e,type:t}])};const qD=()=>Promise.resolve([]),GD=(0,_.forwardRef)((({value:e,children:t,currentLink:n={},className:r=null,placeholder:o=null,withCreateSuggestion:i=!1,onCreateSuggestion:a=Ce.noop,onChange:l=Ce.noop,onSelect:s=Ce.noop,showSuggestions:c=!0,renderSuggestions:u=(e=>(0,_.createElement)(FD,e)),fetchSuggestions:d=null,allowDirectEntry:p=!0,showInitialSuggestions:m=!1,suggestionsQuery:f={},withURLSuggestion:h=!0,createSuggestionButtonText:g},v)=>{const b=function(e,t,n,r){const{fetchSearchSuggestions:o}=(0,er.Z)((e=>{const{getSettings:t}=e(Iv);return{fetchSearchSuggestions:t().__experimentalFetchLinkSuggestions}}),[]),i=t?$D:UD;return(0,_.useCallback)(((t,{isInitialSuggestions:a})=>jD(t)?i(t,{isInitialSuggestions:a}):(async(e,t,n,r,o,i)=>{const{isInitialSuggestions:a}=t;let l=await Promise.all([n(e,t),r(e)]);return l=e.includes(" ")||!i||a?l[0]:l[0].concat(l[1]),a||jD(e)||!o?l:l.concat({title:e,url:e,type:MD})})(t,{...e,isInitialSuggestions:a},o,i,n,r)),[i,o,n])}(f,p,i,h),y=c?d||b:qD,w=Rb(GD),[k,E]=(0,_.useState)(),C=async e=>{let t=e;if(MD!==e.type)(p||t&&Object.keys(t).length>=1)&&s({...(0,Ce.omit)(n,"id","url"),...t},t);else try{var r;t=await a(e.title),null!==(r=t)&&void 0!==r&&r.url&&s(t)}catch(e){}};return(0,_.createElement)("div",null,(0,_.createElement)(ND,{className:r,value:e,onChange:(e,t)=>{l(e),E(t)},placeholder:null!=o?o:U("Search or type url"),__experimentalRenderSuggestions:c?t=>u({...t,instanceId:w,withCreateSuggestion:i,currentInputValue:e,createSuggestionButtonText:g,suggestionsQuery:f,handleSuggestionClick:e=>{t.handleSuggestionClick&&t.handleSuggestionClick(e),C(e)}}):null,__experimentalFetchLinkSuggestions:y,__experimentalHandleURLSuggestions:!0,__experimentalShowInitialSuggestions:m,onSubmit:t=>{C(t||k||{url:e})},ref:v}),t)}));var KD=GD;const{Slot:YD,Fill:XD}=Er("BlockEditorLinkControlViewer");function JD(e,t){switch(t.type){case"RESOLVED":return{...e,isFetching:!1,richData:t.richData};case"ERROR":return{...e,isFetching:!1,richData:null};case"LOADING":return{...e,isFetching:!0};default:throw new Error(`Unexpected action type ${t.type}`)}}function QD({value:e,onEditClick:t,hasRichPreviews:n=!1}){const r=n?null==e?void 0:e.url:null,{richData:o,isFetching:i}=function(e){const[t,n]=(0,_.useReducer)(JD,{richData:null,isFetching:!1}),{fetchRichUrlData:r}=(0,er.Z)((e=>{const{getSettings:t}=e(Iv);return{fetchRichUrlData:t().__experimentalFetchRichUrlData}}),[]);return(0,_.useEffect)((()=>{if(null!=e&&e.length&&r&&"undefined"!=typeof AbortController){n({type:"LOADING"});const t=new window.AbortController,o=t.signal;return r(e,{signal:o}).then((e=>{n({type:"RESOLVED",richData:e})})).catch((()=>{o.aborted||n({type:"ERROR"})})),()=>{t.abort()}}}),[e]),t}(r),a=o&&Object.keys(o).length,l=e&&RD(LD(e.url),16)||"";return(0,_.createElement)("div",{"aria-label":U("Currently selected"),"aria-selected":"true",className:Cr()("block-editor-link-control__search-item",{"is-current":!0,"is-rich":a,"is-fetching":!!i,"is-preview":!0})},(0,_.createElement)("div",{className:"block-editor-link-control__search-item-top"},(0,_.createElement)("span",{className:"block-editor-link-control__search-item-header"},(0,_.createElement)("span",{className:Cr()("block-editor-link-control__search-item-icon",{"is-image":null==o?void 0:o.icon})},null!=o&&o.icon?(0,_.createElement)("img",{src:null==o?void 0:o.icon,alt:""}):(0,_.createElement)(dk,{icon:OD})),(0,_.createElement)("span",{className:"block-editor-link-control__search-item-details"},(0,_.createElement)(jk,{className:"block-editor-link-control__search-item-title",href:e.url},(null==o?void 0:o.title)||(null==e?void 0:e.title)||l),(null==e?void 0:e.url)&&(0,_.createElement)("span",{className:"block-editor-link-control__search-item-info"},l))),(0,_.createElement)(Gi,{variant:"secondary",onClick:()=>t(),className:"block-editor-link-control__search-item-action"},U("Edit")),(0,_.createElement)(YD,{fillProps:e})),(a&&((null==o?void 0:o.image)||(null==o?void 0:o.description))||i)&&(0,_.createElement)("div",{className:"block-editor-link-control__search-item-bottom"},((null==o?void 0:o.image)||i)&&(0,_.createElement)("div",{"aria-hidden":!(null!=o&&o.image),className:Cr()("block-editor-link-control__search-item-image",{"is-placeholder":!(null!=o&&o.image)})},(null==o?void 0:o.image)&&(0,_.createElement)("img",{src:null==o?void 0:o.image,alt:""})),((null==o?void 0:o.description)||i)&&(0,_.createElement)("div",{"aria-hidden":!(null!=o&&o.description),className:Cr()("block-editor-link-control__search-item-description",{"is-placeholder":!(null!=o&&o.description)})},(null==o?void 0:o.description)&&(0,_.createElement)(py,{truncate:!0,numberOfLines:"2"},o.description))))}function eM({searchInputPlaceholder:e,value:t,settings:n=BD,onChange:r=Ce.noop,onRemove:o,noDirectEntry:i=!1,showSuggestions:a=!0,showInitialSuggestions:l,forceIsEditingLink:s,createSuggestion:c,withCreateSuggestion:u,inputValue:d="",suggestionsQuery:p={},noURLSuggestion:m=!1,createSuggestionButtonText:f,hasRichPreviews:h=!1}){void 0===u&&c&&(u=!0);const g=(0,_.useRef)(!0),v=(0,_.useRef)(),[b,y]=(0,_.useState)(t&&t.url||""),w=d||b,[k,E]=(0,_.useState)(void 0!==s?s:!t||!t.url),C=(0,_.useRef)(!1);function x(){var e;C.current=!(null===(e=v.current)||void 0===e||!e.contains(v.current.ownerDocument.activeElement)),E(!1)}(0,_.useEffect)((()=>{void 0!==s&&s!==k&&E(s)}),[s]),(0,_.useEffect)((()=>{g.current?g.current=!1:((po.focusable.find(v.current)[0]||v.current).focus(),C.current=!1)}),[k]);const{createPage:S,isCreatingPage:I,errorMessage:T}=function(e){const t=(0,_.useRef)(),[n,r]=(0,_.useState)(!1),[o,i]=(0,_.useState)(null);return(0,_.useEffect)((()=>()=>{t.current&&t.current.cancel()}),[]),{createPage:async function(n){r(!0),i(null);try{return t.current=(e=>{let t=!1;return{promise:new Promise(((n,r)=>{e.then((e=>t?r({isCanceled:!0}):n(e)),(e=>r(t?{isCanceled:!0}:e)))})),cancel(){t=!0}}})(Promise.resolve(e(n))),await t.current.promise}catch(e){if(e&&e.isCanceled)return;throw i(e.message||U("An unknown error occurred during creation. Please try again.")),e}finally{r(!1)}},isCreatingPage:n,errorMessage:o}}(c),N=()=>{w!==(null==t?void 0:t.url)&&r({url:w}),x()},A=o&&t&&!k&&!I,R=!(null==n||!n.length);return(0,_.createElement)("div",{tabIndex:-1,ref:v,className:"block-editor-link-control"},I&&(0,_.createElement)("div",{className:"block-editor-link-control__loading"},(0,_.createElement)(ED,null)," ",U("Creating"),"…"),(k||!t)&&!I&&(0,_.createElement)(_.Fragment,null,(0,_.createElement)("div",{className:"block-editor-link-control__search-input-wrapper"},(0,_.createElement)(KD,{currentLink:t,className:"block-editor-link-control__search-input",placeholder:e,value:w,withCreateSuggestion:u,onCreateSuggestion:S,onChange:y,onSelect:e=>{r(e),x()},showInitialSuggestions:l,allowDirectEntry:!i,showSuggestions:a,suggestionsQuery:p,withURLSuggestion:!m,createSuggestionButtonText:f},(0,_.createElement)("div",{className:"block-editor-link-control__search-actions"},(0,_.createElement)(Gi,{onClick:()=>N(),onKeyDown:e=>{const{keyCode:t}=e;t===Br&&(e.preventDefault(),N())},label:U("Submit"),icon:_D,className:"block-editor-link-control__search-submit"})))),T&&(0,_.createElement)(YC,{className:"block-editor-link-control__search-error",status:"error",isDismissible:!1},T)),t&&!k&&!I&&(0,_.createElement)(QD,{key:null==t?void 0:t.url,value:t,onEditClick:()=>E(!0),hasRichPreviews:h}),(R||A)&&(0,_.createElement)("div",{className:"block-editor-link-control__tools"},(0,_.createElement)(CD,{value:t,settings:n,onChange:r}),A&&(0,_.createElement)(Gi,{className:"block-editor-link-control__unlink",isDestructive:!0,variant:"link",onClick:o},U("Unlink"))))}eM.ViewerFill=XD;var tM=eM,nM=function({accept:e,children:t,multiple:n=!1,onChange:r,render:o,...i}){const a=(0,_.useRef)(),l=()=>{a.current.click()},s=o?o({openFileDialog:l}):(0,_.createElement)(Gi,(0,nr.Z)({onClick:l},i),t);return(0,_.createElement)("div",{className:"components-form-file-upload"},s,(0,_.createElement)("input",{type:"file",ref:a,multiple:n,style:{display:"none"},accept:e,onChange:r}))},rM=(0,_.createElement)(ko,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,_.createElement)(yo,{d:"M18.7 3H5.3C4 3 3 4 3 5.3v13.4C3 20 4 21 5.3 21h13.4c1.3 0 2.3-1 2.3-2.3V5.3C21 4 20 3 18.7 3zm.8 15.7c0 .4-.4.8-.8.8H5.3c-.4 0-.8-.4-.8-.8V5.3c0-.4.4-.8.8-.8h13.4c.4 0 .8.4.8.8v13.4zM10 15l5-3-5-3v6z"})),oM=(0,_.createElement)(ko,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,_.createElement)(yo,{d:"M18.5 15v3.5H13V6.7l4.5 4.1 1-1.1-6.2-5.8-5.8 5.8 1 1.1 4-4v11.7h-6V15H4v5h16v-5z"})),iM=iA("editor.MediaUpload")((()=>null)),aM=function({fallback:e=null,children:t}){return(0,er.Z)((e=>{const{getSettings:t}=e(Iv);return!!t().mediaUpload}),[])?t:e},lM=CE([IN((e=>{const{createNotice:t,removeNotice:n}=e(SP);return{createNotice:t,removeNotice:n}})),iA("editor.MediaReplaceFlow")])((({mediaURL:e,mediaId:t,allowedTypes:n,accept:r,onSelect:o,onSelectURL:i,onFilesUpload:a=Ce.noop,name:l=U("Replace"),createNotice:s,removeNotice:c})=>{const[u,d]=(0,_.useState)(e),p=(0,er.Z)((e=>e(Iv).getSettings().mediaUpload),[]),m=(0,_.createRef)(),f=(0,Ce.uniqueId)("block-editor/media-replace-flow/error-notice/"),h=e=>{const t=document.createElement("div");t.innerHTML=Ps(e);const n=t.textContent||t.innerText||"";setTimeout((()=>{s("error",n,{speak:!0,id:f,isDismissible:!0})}),1e3)},g=e=>{o(e),d(e.url),Gf(U("The media file has been replaced")),c(f)},v=e=>{e.keyCode===Wr&&(e.preventDefault(),e.target.click())};return(0,_.createElement)(Cp,{popoverProps:{isAlternate:!0},contentClassName:"block-editor-media-replace-flow__options",renderToggle:({isOpen:e,onToggle:t})=>(0,_.createElement)(kp,{ref:m,"aria-expanded":e,"aria-haspopup":"true",onClick:t,onKeyDown:v},l),renderContent:({onClose:e})=>(0,_.createElement)(_.Fragment,null,(0,_.createElement)(Np,{className:"block-editor-media-replace-flow__media-upload-menu"},(0,_.createElement)(iM,{value:t,onSelect:e=>g(e),allowedTypes:n,render:({open:e})=>(0,_.createElement)(iI,{icon:rM,onClick:e},U("Open Media Library"))}),(0,_.createElement)(aM,null,(0,_.createElement)(nM,{onChange:e=>{(e=>{const t=e.target.files;a(t),p({allowedTypes:n,filesList:t,onFileChange:([e])=>{g(e)},onError:h})})(e)},accept:r,render:({openFileDialog:e})=>(0,_.createElement)(iI,{icon:oM,onClick:()=>{e()}},U("Upload"))}))),i&&(0,_.createElement)("form",{className:"block-editor-media-flow__url-input"},(0,_.createElement)("span",{className:"block-editor-media-replace-flow__image-url-label"},U("Current media URL:")),(0,_.createElement)(tM,{value:{url:u},settings:[],showSuggestions:!1,onChange:({url:e})=>{d(e),i(e),m.current.focus()}})))})}));function sM({className:e,label:t,onFilesDrop:n,onHTMLDrop:r,onDrop:o}){const[i,a]=(0,_.useState)(),[l,s]=(0,_.useState)(),[c,u]=(0,_.useState)(),d=CR({onDrop(e){const t=xR(e.dataTransfer),i=e.dataTransfer.getData("text/html");t.length&&n?n(t):i&&r?r(i):o&&o(e)},onDragStart(e){a(!0);let t="default";(0,Ce.includes)(e.dataTransfer.types,"Files")||xR(e.dataTransfer).length>0?t="file":(0,Ce.includes)(e.dataTransfer.types,"text/html")&&(t="html"),u(t)},onDragEnd(){a(!1),u()},onDragEnter(){s(!0)},onDragLeave(){s(!1)}});let p;l&&(p=(0,_.createElement)("div",{className:"components-drop-zone__content"},(0,_.createElement)(dk,{icon:oM,className:"components-drop-zone__content-icon"}),(0,_.createElement)("span",{className:"components-drop-zone__content-text"},t||U("Drop files to upload"))));const m=Cr()("components-drop-zone",e,{"is-active":(i||l)&&("file"===c&&n||"html"===c&&r||"default"===c&&o),"is-dragging-over-document":i,"is-dragging-over-element":l,[`is-dragging-${c}`]:!!c});return(0,_.createElement)("div",{ref:d,className:m},p)}var cM=(0,_.createElement)(ko,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,_.createElement)(yo,{d:"M20.1 5.1L16.9 2 6.2 12.7l-1.3 4.4 4.5-1.3L20.1 5.1zM4 20.8h8v-1.5H4v1.5z"}));function uM({url:e,urlLabel:t,className:n}){const r=Cr()(n,"block-editor-url-popover__link-viewer-url");return e?(0,_.createElement)(jk,{className:r,href:e},t||RD(LD(e))):(0,_.createElement)("span",{className:r})}function dM({additionalControls:e,children:t,renderSettings:n,position:r="bottom center",focusOnMount:o="firstElement",...i}){const[a,l]=(0,_.useState)(!1),s=!!n&&a;return(0,_.createElement)(ia,(0,nr.Z)({className:"block-editor-url-popover",focusOnMount:o,position:r},i),(0,_.createElement)("div",{className:"block-editor-url-popover__input-container"},(0,_.createElement)("div",{className:"block-editor-url-popover__row"},t,!!n&&(0,_.createElement)(Gi,{className:"block-editor-url-popover__settings-toggle",icon:Kk,label:U("Link settings"),onClick:()=>{l(!a)},"aria-expanded":a})),s&&(0,_.createElement)("div",{className:"block-editor-url-popover__row block-editor-url-popover__settings"},n())),e&&!s&&(0,_.createElement)("div",{className:"block-editor-url-popover__additional-controls"},e))}dM.LinkEditor=function({autocompleteRef:e,className:t,onChangeInputValue:n,value:r,...o}){return(0,_.createElement)("form",(0,nr.Z)({className:Cr()("block-editor-url-popover__link-editor",t)},o),(0,_.createElement)(ND,{value:r,onChange:n,autocompleteRef:e}),(0,_.createElement)(Gi,{icon:_D,label:U("Apply"),type:"submit"}))},dM.LinkViewer=function({className:e,linkClassName:t,onEditLinkClick:n,url:r,urlLabel:o,...i}){return(0,_.createElement)("div",(0,nr.Z)({className:Cr()("block-editor-url-popover__link-viewer",e)},i),(0,_.createElement)(uM,{url:r,urlLabel:o,className:t}),n&&(0,_.createElement)(Gi,{icon:cM,label:U("Edit"),onClick:n}))};var pM=dM;const mM=({src:e,onChange:t,onSubmit:n,onClose:r})=>(0,_.createElement)(pM,{onClose:r},(0,_.createElement)("form",{className:"block-editor-media-placeholder__url-input-form",onSubmit:n},(0,_.createElement)("input",{className:"block-editor-media-placeholder__url-input-field",type:"url","aria-label":U("URL"),placeholder:U("Paste or type URL"),onChange:t,value:e}),(0,_.createElement)(Gi,{className:"block-editor-media-placeholder__url-input-submit-button",icon:_D,label:U("Apply"),type:"submit"})));var fM=iA("editor.MediaPlaceholder")((function({value:e={},allowedTypes:t,className:n,icon:r,labels:o={},mediaPreview:i,notices:a,isAppender:l,accept:s,addToGallery:c,multiple:u=!1,dropZoneUIOnly:d,disableDropZone:p,disableMediaButtons:m,onError:f,onSelect:h,onCancel:g,onSelectURL:v,onDoubleClick:b,onFilesPreUpload:y=Ce.noop,onHTMLDrop:w=Ce.noop,children:k}){const E=(0,er.Z)((e=>{const{getSettings:t}=e(Iv);return t().mediaUpload}),[]),[C,x]=(0,_.useState)(""),[S,I]=(0,_.useState)(!1);(0,_.useEffect)((()=>{var t;x(null!==(t=null==e?void 0:e.src)&&void 0!==t?t:"")}),[null==e?void 0:e.src]);const T=e=>{x(e.target.value)},N=()=>{I(!0)},A=()=>{I(!1)},R=e=>{e.preventDefault(),C&&v&&(v(C),A())},L=n=>{let r;if(y(n),u)if(c){let t=[];r=n=>{const r=(null!=e?e:[]).filter((e=>e.id?!t.some((({id:t})=>Number(t)===Number(e.id))):!t.some((({urlSlug:t})=>e.url.includes(t)))));h(r.concat(n)),t=n.map((e=>{const t=e.url.lastIndexOf("."),n=e.url.slice(0,t);return{id:e.id,urlSlug:n}}))}}else r=h;else r=([e])=>h(e);E({allowedTypes:t,filesList:n,onFileChange:r,onError:f})},P=e=>{L(e.target.files)},O=(e,s)=>{let{instructions:c,title:u}=o;if(E||v||(c=U("To edit this block, you need permission to upload media.")),void 0===c||void 0===u){const e=null!=t?t:[],[n]=e,r=1===e.length,o=r&&"audio"===n,i=r&&"image"===n,a=r&&"video"===n;void 0===c&&E&&(c=U("Upload a media file or pick one from your media library."),o?c=U("Upload an audio file, pick one from your media library, or add one with a URL."):i?c=U("Upload an image file, pick one from your media library, or add one with a URL."):a&&(c=U("Upload a video file, pick one from your media library, or add one with a URL."))),void 0===u&&(u=U("Media"),o?u=U("Audio"):i?u=U("Image"):a&&(u=U("Video")))}const d=Cr()("block-editor-media-placeholder",n,{"is-appender":l});return(0,_.createElement)(pN,{icon:r,label:u,instructions:c,className:d,notices:a,onClick:s,onDoubleClick:b,preview:i},e,k)},D=()=>p?null:(0,_.createElement)(sM,{onFilesDrop:L,onHTMLDrop:w}),M=()=>g&&(0,_.createElement)(Gi,{className:"block-editor-media-placeholder__cancel-button",title:U("Cancel"),variant:"link",onClick:g},U("Cancel")),B=()=>v&&(0,_.createElement)("div",{className:"block-editor-media-placeholder__url-input-container"},(0,_.createElement)(Gi,{className:"block-editor-media-placeholder__button",onClick:N,isPressed:S,variant:"tertiary"},U("Insert from URL")),S&&(0,_.createElement)(mM,{src:C,onChange:T,onSubmit:R,onClose:A}));return d||m?(d&&Vt("wp.blockEditor.MediaPlaceholder dropZoneUIOnly prop",{since:"5.4",alternative:"disableMediaButtons"}),(0,_.createElement)(aM,null,D())):(0,_.createElement)(aM,{fallback:O(B())},(()=>{const n=(0,_.createElement)(iM,{addToGallery:c,gallery:u&&!(!t||0===t.length)&&t.every((e=>"image"===e||e.startsWith("image/"))),multiple:u,onSelect:h,allowedTypes:t,value:Array.isArray(e)?e.map((({id:e})=>e)):e.id,render:({open:e})=>(0,_.createElement)(Gi,{variant:"tertiary",onClick:()=>{e()}},U("Media Library"))});if(E&&l)return(0,_.createElement)(_.Fragment,null,D(),(0,_.createElement)(nM,{onChange:P,accept:s,multiple:u,render:({openFileDialog:e})=>{const t=(0,_.createElement)(_.Fragment,null,(0,_.createElement)(Gi,{variant:"primary",className:Cr()("block-editor-media-placeholder__button","block-editor-media-placeholder__upload-button")},U("Upload")),n,B(),M());return O(t,e)}}));if(E){const e=(0,_.createElement)(_.Fragment,null,D(),(0,_.createElement)(nM,{variant:"primary",className:Cr()("block-editor-media-placeholder__button","block-editor-media-placeholder__upload-button"),onChange:P,accept:s,multiple:u},U("Upload")),n,B(),M());return O(e)}return O(n)})())}));function hM({record:e,onChange:t,onReplace:n,completers:r,contentRef:o}){const i=xo(Gf,500),a=Rb(hM),[l,s]=(0,_.useState)(0),[c,u]=(0,_.useState)([]),[d,p]=(0,_.useState)(""),[m,f]=(0,_.useState)(null),[h,g]=(0,_.useState)(null),[v,b]=(0,_.useState)(!1);function y(r){const{getOptionCompletion:o}=m||{};if(!r.isDisabled){if(o){const i=o(r.value,d),{action:a,value:l}=void 0===i.action||void 0===i.value?{action:"insert-at-caret",value:i}:i;if("replace"===a)return void n([l]);"insert-at-caret"===a&&function(n){const r=e.start,o=r-m.triggerPrefix.length-d.length,i=mh({html:Ps(n)});t(Rh(e,i,o,r))}(l)}w()}}function w(){s(0),u([]),p(""),f(null),g(null)}let k;xh(e)&&(k=Ch(Oh(e,0))),(0,_.useEffect)((()=>{if(!k)return void w();const t=(0,Ce.deburr)(k),n=Ch(Oh(e,void 0,Ch(e).length)),o=(0,Ce.find)(r,(({triggerPrefix:e,allowContext:r})=>{const o=t.lastIndexOf(e);if(-1===o)return!1;const i=t.slice(o+e.length);if(i.length>50)return!1;const a=0===c.length,l=1===i.split(/\s/).length,s=v&&i.split(/\s/).length<=3;return!(a&&!s&&!l)&&!(r&&!r(t.slice(0,o),n))&&!/^\s/.test(i)&&!/\s\s+$/.test(i)&&/[\u0000-\uFFFF]*$/.test(i)}));if(!o)return void w();const i=(0,Ce.escapeRegExp)(o.triggerPrefix),a=t.slice(t.lastIndexOf(o.triggerPrefix)).match(new RegExp(`${i}([\0-]*)$`)),l=a&&a[1];f(o),g((()=>o!==m?function(e){const t=e.useItems?e.useItems:function(e){return t=>{const[n,r]=(0,_.useState)([]);return(0,_.useLayoutEffect)((()=>{const{options:n,isDebounced:o}=e,i=(0,Ce.debounce)((()=>{const o=Promise.resolve("function"==typeof n?n(t):n).then((n=>{if(o.canceled)return;const i=n.map(((t,n)=>({key:`${e.name}-${n}`,value:t,label:e.getOptionLabel(t),keywords:e.getOptionKeywords?e.getOptionKeywords(t):[],isDisabled:!!e.isOptionDisabled&&e.isOptionDisabled(t)}))),a=new RegExp("(?:\\b|\\s|^)"+(0,Ce.escapeRegExp)(t),"i");r(function(e,t=[],n=10){const r=[];for(let o=0;o<t.length;o++){const i=t[o];let{keywords:a=[]}=i;if("string"==typeof i.label&&(a=[...a,i.label]),a.some((t=>e.test((0,Ce.deburr)(t))))&&(r.push(i),r.length===n))break}return r}(a,i))}));return o}),o?250:0),a=i();return()=>{i.cancel(),a&&(a.canceled=!0)}}),[t]),[n]}}(e);return function({filterValue:e,instanceId:n,listBoxId:r,className:o,selectedIndex:i,onChangeOptions:a,onSelect:l,onReset:s,value:c,contentRef:u}){const[d]=t(e),p=Xh({ref:u,value:c});return(0,_.useLayoutEffect)((()=>{a(d)}),[d]),!d.length>0?null:(0,_.createElement)(ia,{focusOnMount:!1,onClose:s,position:"top right",className:"components-autocomplete__popover",anchorRef:p},(0,_.createElement)("div",{id:r,role:"listbox",className:"components-autocomplete__results"},(0,Ce.map)(d,((e,t)=>(0,_.createElement)(Gi,{key:e.key,id:`components-autocomplete-item-${n}-${e.key}`,role:"option","aria-selected":t===i,disabled:e.isDisabled,className:Cr()("components-autocomplete__result",o,{"is-selected":t===i}),onClick:()=>l(e)},e.label)))))}}(o):h)),p(l)}),[k]);const{key:E=""}=c[l]||{},{className:C}=m||{},x=!!m&&c.length>0,S=x?`components-autocomplete-listbox-${a}`:null;return{listBoxId:S,activeId:x?`components-autocomplete-item-${a}-${E}`:null,onKeyDown:function(e){if(b(8===e.keyCode),m&&0!==c.length&&!e.defaultPrevented){switch(e.keyCode){case Hr:s((0===l?c.length:l)-1);break;case Wr:s((l+1)%c.length);break;case Fr:f(null),g(null),e.preventDefault();break;case Br:y(c[l]);break;case zr:case Vr:return void w();default:return}e.preventDefault()}},popover:void 0!==e.start&&h&&(0,_.createElement)(h,{className:C,filterValue:d,instanceId:a,listBoxId:S,selectedIndex:l,onChangeOptions:function(e){s(e.length===c.length?l:0),u(e),function(e){i&&(e.length?i(L(q("%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"):i(U("No results."),"assertive"))}(e)},onSelect:y,value:e,contentRef:o,reset:w})}}var gM={name:"blocks",className:"block-editor-autocompleters__block",triggerPrefix:"/",useItems(e){const{rootClientId:t,selectedBlockName:n}=(0,er.Z)((e=>{const{getSelectedBlockClientId:t,getBlockName:n,getBlockInsertionPoint:r}=e(Iv),o=t();return{selectedBlockName:o?n(o):null,rootClientId:r().rootClientId}}),[]),[r,o,i]=wO(t,Ce.noop),a=(0,_.useMemo)((()=>(e.trim()?$O(r,o,i,e):(0,Ce.orderBy)(r,["frecency"],["desc"])).filter((e=>e.name!==n)).slice(0,9)),[e,n,r,o,i]);return[(0,_.useMemo)((()=>a.map((e=>{const{title:t,icon:n,isDisabled:r}=e;return{key:`block-${e.id}`,value:e,label:(0,_.createElement)(_.Fragment,null,(0,_.createElement)(dN,{key:"icon",icon:n,showColors:!0}),t),isDisabled:r}}))),[a])]},allowContext:(e,t)=>!(/\S/.test(e)||/\S/.test(t)),getOptionCompletion(e){const{name:t,initialAttributes:n,innerBlocks:r}=e;return{action:"replace",value:Ul(t,n,$l(r))}}};const vM=[];function bM({completers:e=vM}){const{name:t}=Mp();return(0,_.useMemo)((()=>{let n=e;return t===Fl()&&(n=n.concat([gM])),(0,W.H7)("editor.Autocomplete.completers")&&(n===e&&(n=n.map(Ce.clone)),n=(0,W.O)("editor.Autocomplete.completers",n,t)),n}),[e,t])}const yM={position:"bottom right",isAlternate:!0};var wM=()=>(0,_.createElement)(_.Fragment,null,["bold","italic","link","text-color"].map((e=>(0,_.createElement)(wr,{name:`RichText.ToolbarControls.${e}`,key:e}))),(0,_.createElement)(wr,{name:"RichText.ToolbarControls"},(e=>0!==e.length&&(0,_.createElement)(bp,null,(t=>(0,_.createElement)(Rp,{icon:Kk,label:U("More"),toggleProps:t,controls:(0,Ce.orderBy)(e.map((([{props:e}])=>e)),"title"),popoverProps:yM})))))),kM=({inline:e,anchorRef:t})=>e?(0,_.createElement)(ia,{noArrow:!0,position:"top center",focusOnMount:!1,anchorRef:t,className:"block-editor-rich-text__inline-format-toolbar",__unstableSlotName:"block-toolbar"},(0,_.createElement)("div",{className:"block-editor-rich-text__inline-format-toolbar-group"},(0,_.createElement)(Pp,null,(0,_.createElement)(wM,null)))):(0,_.createElement)(Ov,{group:"inline"},(0,_.createElement)(wM,null));function EM(){const{didAutomaticChange:e,getSettings:t}=(0,er.Z)(Iv);return Jh((n=>{function r(n){const{keyCode:r}=n;n.defaultPrevented||46!==r&&8!==r&&r!==Fr||e()&&(n.preventDefault(),t().__experimentalUndo())}return n.addEventListener("keydown",r),()=>{n.removeEventListener("keydown",r)}}),[])}function _M(e){return e.filter((({type:e})=>/^image\/(?:jpe?g|png|gif)$/.test(e))).map((e=>`<img src="${va(e)}">`)).join("")}function CM(e,t){if(null!=t&&t.length){let n=e.formats.length;for(;n--;)e.formats[n]=[...t,...e.formats[n]||[]]}}function xM(e){if(!0===e||"p"===e||"li"===e)return!0===e?"p":e}function SM({allowedFormats:e,formattingControls:t,disableFormats:n}){return n?SM.EMPTY_ARRAY:e||t?e||(Vt("wp.blockEditor.RichText formattingControls prop",{since:"5.4",alternative:"allowedFormats"}),t.map((e=>`core/${e}`))):void 0}function IM({value:e,pastedBlocks:t=[],onReplace:n,onSplit:r,onSplitMiddle:o,multilineTag:i}){if(!n||!r)return;const a=[],[l,s]=function({formats:e,replacements:t,text:n,start:r,end:o},i){if("string"!=typeof i)return Dh(...arguments);let a=0;return n.split(i).map((n=>{const l=a,s={formats:e.slice(l,l+n.length),replacements:t.slice(l,l+n.length),text:n};return a+=i.length+n.length,void 0!==r&&void 0!==o&&(r>=l&&r<a?s.start=r-l:r<l&&o>l&&(s.start=0),o>=l&&o<a?s.end=o-l:r<a&&o>a&&(s.end=n.length)),s}))}(e),c=t.length>0;let u=-1;const d=Sh(l)&&!Sh(s);c&&Sh(l)||(a.push(r(Hh({value:l,multilineTag:i}),!d)),u+=1),c?(a.push(...t),u+=t.length):o&&a.push(o()),(c||o)&&Sh(s)||a.push(r(Hh({value:s,multilineTag:i}),d)),n(a,c?u:1,c?-1:0)}function TM(e){const t=(0,_.useRef)(e);return t.current=e,Jh((e=>{function n(e){const{isSelected:n,disableFormats:r,onChange:o,value:i,formatTypes:a,tagName:l,onReplace:s,onSplit:c,onSplitMiddle:u,__unstableEmbedURLOnPaste:d,multilineTag:p,preserveWhiteSpace:m,pastePlainText:f}=t.current;if(!n)return void e.preventDefault();const{clipboardData:h}=e;let g="",v="";try{g=h.getData("text/plain"),v=h.getData("text/html")}catch(e){try{v=h.getData("Text")}catch(e){return}}if(e.preventDefault(),window.console.log("Received HTML:\n\n",v),window.console.log("Received plain text:\n\n",g),r)return void o(Rh(i,g));const b=a.reduce(((e,{__unstablePasteRule:t})=>(t&&e===i&&(e=t(i,{html:v,plainText:g})),e)),i);if(b!==i)return void o(b);const y=[...xR(h)];if("true"===h.getData("rich-text")){const e=mh({html:v,multilineTag:p,multilineWrapperTags:"li"===p?["ul","ol"]:void 0,preserveWhiteSpace:m});return CM(e,i.activeFormats),void o(Rh(i,e))}if(f)return void o(Rh(i,mh({text:g})));if(y&&y.length&&!v){const e=Zu({HTML:_M(y),mode:"BLOCKS",tagName:l,preserveWhiteSpace:m});return window.console.log("Received items:\n\n",y),void(s&&Sh(i)?s(e):IM({value:i,pastedBlocks:e,onReplace:s,onSplit:c,onSplitMiddle:u,multilineTag:p}))}let w=s&&c?"AUTO":"INLINE";var k;"AUTO"===w&&Sh(i)&&(k=g,cu(".*").test(k))&&(w="BLOCKS"),d&&Sh(i)&&ID(g.trim())&&(w="BLOCKS");const E=Zu({HTML:v,plainText:g,mode:w,tagName:l,preserveWhiteSpace:m});if("string"==typeof E){let e=mh({html:E});CM(e,i.activeFormats),p&&(e=Ph(e,/\n+/g,ch)),o(Rh(i,e))}else E.length>0&&(s&&Sh(i)?s(E,E.length-1,-1):IM({value:i,pastedBlocks:E,onReplace:s,onSplit:c,onSplitMiddle:u,multilineTag:p}))}return e.addEventListener("paste",n),()=>{e.removeEventListener("paste",n)}}),[])}function NM(e){const{__unstableMarkLastChangeAsPersistent:t,__unstableMarkAutomaticChange:n}=(0,tr.Z)(Iv),r=(0,_.useRef)(e);return r.current=e,Jh((e=>{function o(){const{value:e,onReplace:t}=r.current;if(!t)return;const{start:o,text:i}=e;if(" "!==i.slice(o-1,o))return;const a=i.slice(0,o).trim(),l=Jl(Ql("from").filter((({type:e})=>"prefix"===e)),(({prefix:e})=>a===e));if(!l)return;const s=Hh({value:Oh(e,o,i.length)});t([l.transform(s)]),n()}function i(e){const{inputType:i,type:a}=e,{value:l,onChange:s,__unstableAllowPrefixTransformations:c,formatTypes:u}=r.current;if("insertText"!==i&&"compositionend"!==a)return;c&&o&&o();const d=u.reduce(((e,{__unstableInputRule:t})=>(t&&(e=t(e)),e)),l);d!==l&&(t(),s({...d,activeFormats:l.activeFormats}),n())}return e.addEventListener("input",i),e.addEventListener("compositionend",i),()=>{e.removeEventListener("input",i),e.removeEventListener("compositionend",i)}}),[])}function AM(e){const{__unstableMarkAutomaticChange:t}=(0,tr.Z)(Iv),n=(0,_.useRef)(e);return n.current=e,Jh((e=>{function r(e){if(e.defaultPrevented)return;const{removeEditorOnlyFormats:r,value:o,onReplace:i,onSplit:a,onSplitMiddle:l,multilineTag:s,onChange:c,disableLineBreaks:u,onSplitAtEnd:d}=n.current;if(e.keyCode!==Br)return;e.preventDefault();const p={...o};p.formats=r(o);const m=i&&a;if(i){const e=Jl(Ql("from").filter((({type:e})=>"enter"===e)),(e=>e.regExp.test(p.text)));e&&(i([e.transform({content:p.text})]),t())}if(s)e.shiftKey?u||c(Rh(p,"\n")):m&&Ih(p)?IM({value:p,onReplace:i,onSplit:a,onSplitMiddle:l,multilineTag:s}):c(function(e,t=e.start,n=e.end){const r=e.text.slice(0,t).lastIndexOf(ch),o=e.replacements[r];let i=[,];return o&&(i=[o]),Rh(e,{formats:[,],replacements:i,text:ch},t,n)}(p));else{const{text:t,start:n,end:r}=p,o=d&&n===r&&r===t.length;e.shiftKey||!m&&!o?u||c(Rh(p,"\n")):!m&&o?d():m&&IM({value:p,onReplace:i,onSplit:a,onSplitMiddle:l,multilineTag:s})}}return e.addEventListener("keydown",r),()=>{e.removeEventListener("keydown",r)}}),[])}function RM(e){return e(nh).getFormatTypes()}SM.EMPTY_ARRAY=[];const LM=new Set(["a","audio","button","details","embed","iframe","input","label","select","textarea","video"]);function PM({formatTypes:e,onChange:t,onFocus:n,value:r,forwardedRef:o}){return e.map((e=>{const{name:i,edit:a}=e;if(!a)return null;const l=_h(r,i),s=void 0!==l,c=function({start:e,end:t,replacements:n,text:r}){if(e+1===t&&r[e]===uh)return n[e]}(r),u=void 0!==c&&c.type===i;return(0,_.createElement)(a,{key:i,isActive:s,activeAttributes:s&&l.attributes||{},isObjectActive:u,activeObjectAttributes:u&&c.attributes||{},value:r,onChange:t,onFocus:n,contentRef:o})}))}const OM=(0,_.forwardRef)((function e({children:t,tagName:n="div",value:r="",onChange:o,isSelected:i,multiline:a,inlineToolbar:l,wrapperClassName:s,autocompleters:c,onReplace:u,placeholder:d,allowedFormats:p,formattingControls:m,withoutInteractiveFormatting:f,onRemove:h,onMerge:g,onSplit:v,__unstableOnSplitAtEnd:b,__unstableOnSplitMiddle:y,identifier:w,preserveWhiteSpace:k,__unstablePastePlainText:E,__unstableEmbedURLOnPaste:C,__unstableDisableFormats:x,disableLineBreaks:S,unstableOnFocus:I,__unstableAllowPrefixTransformations:T,...N},A){const R=Rb(e);w=w||R,N=function(e){return(0,Ce.omit)(e,["__unstableMobileNoFocusOnMount","deleteEnter","placeholderTextColor","textAlign","selectionColor","tagsToEliminate","rootTagsToEliminate","disableEditingMenu","fontSize","fontFamily","fontWeight","fontStyle","minWidth","maxWidth","setRef"])}(N);const L=(0,_.useRef)(),{clientId:P}=Mp(),{selectionStart:O,selectionEnd:D,isSelected:M,disabled:B}=(0,er.Z)((e=>{const{getSelectionStart:t,getSelectionEnd:n,isMultiSelecting:r,hasMultiSelection:o}=e(Iv),a=t(),l=n();let s;return void 0===i?s=a.clientId===P&&a.attributeKey===w:i&&(s=a.clientId===P),{selectionStart:s?a.offset:void 0,selectionEnd:s?l.offset:void 0,isSelected:s,disabled:r()||o()}})),{selectionChange:F}=(0,tr.Z)(Iv),z=xM(a),H=SM({allowedFormats:p,formattingControls:m,disableFormats:x}),V=!H||H.length>0;let W=r,Z=o;Array.isArray(r)&&(W=Pc.toHTML(r),Z=e=>o(Pc.fromDOM(lh(document,e).childNodes)));const j=(0,_.useCallback)(((e,t)=>{F(P,w,e,t)}),[P,w]),{formatTypes:U,prepareHandlers:$,valueHandlers:q,changeHandlers:G,dependencies:K}=function({clientId:e,identifier:t,withoutInteractiveFormatting:n,allowedFormats:r}){const o=(0,er.Z)(RM,[]),i=(0,_.useMemo)((()=>o.filter((({name:e,tagName:t})=>!(r&&!r.includes(e)||n&&LM.has(t))))),[o,r,LM]),a=(0,er.Z)((n=>i.reduce(((r,o)=>(o.__experimentalGetPropsForEditableTreePreparation&&(r[o.name]=o.__experimentalGetPropsForEditableTreePreparation(n,{richTextIdentifier:t,blockClientId:e})),r)),{})),[i,e,t]),l=(0,tr.Z)(),s=[],c=[],u=[],d=[];return i.forEach((n=>{if(n.__experimentalCreatePrepareEditableTree){const r=a[n.name],o=n.__experimentalCreatePrepareEditableTree(r,{richTextIdentifier:t,blockClientId:e});n.__experimentalCreateOnChangeEditableValue?c.push(o):s.push(o);for(const e in r)d.push(r[e])}if(n.__experimentalCreateOnChangeEditableValue){let r={};n.__experimentalGetPropsForEditableTreeChangeHandler&&(r=n.__experimentalGetPropsForEditableTreeChangeHandler(l,{richTextIdentifier:t,blockClientId:e})),u.push(n.__experimentalCreateOnChangeEditableValue({...a[n.name]||{},...r},{richTextIdentifier:t,blockClientId:e}))}})),{formatTypes:i,prepareHandlers:s,valueHandlers:c,changeHandlers:u,dependencies:d}}({clientId:P,identifier:w,withoutInteractiveFormatting:f,allowedFormats:H});function Y(e){return U.forEach((t=>{t.__experimentalCreatePrepareEditableTree&&(e=Nh(e,t.name,0,e.text.length))})),e.formats}const{value:X,onChange:J,onFocus:Q,ref:ee}=function({value:e="",selectionStart:t,selectionEnd:n,placeholder:r,preserveWhiteSpace:o,onSelectionChange:i,onChange:a,__unstableMultilineTag:l,__unstableDisableFormats:s,__unstableIsSelected:c,__unstableDependencies:u,__unstableAfterParse:d,__unstableBeforeSerialize:p,__unstableAddInvisibleFormats:m}){const[,f]=(0,_.useReducer)((()=>({}))),h=(0,_.useRef)();function g(){const{ownerDocument:{defaultView:e}}=h.current,t=e.getSelection(),n=t.rangeCount>0?t.getRangeAt(0):null;return mh({element:h.current,range:n,multilineTag:l,multilineWrapperTags:"li"===l?["ul","ol"]:void 0,__unstableIsEditableTree:!0,preserveWhiteSpace:o})}function v(e,{domOnly:t}={}){sg({value:e,current:h.current,multilineTag:l,multilineWrapperTags:"li"===l?["ul","ol"]:void 0,prepareEditableTree:m,__unstableDomOnly:t,placeholder:r})}const b=(0,_.useRef)(e),y=(0,_.useRef)();function w(){b.current=e,y.current=mh({html:e,multilineTag:l,multilineWrapperTags:"li"===l?["ul","ol"]:void 0,preserveWhiteSpace:o}),s&&(y.current.formats=Array(e.length),y.current.replacements=Array(e.length)),y.current.formats=d(y.current),y.current.start=t,y.current.end=n}const k=(0,_.useRef)(!1);function E(e){v(e),b.current=s?e.text:Hh({value:{...e,formats:p(e)},multilineTag:l,preserveWhiteSpace:o}),y.current=e;const{start:t,end:n,formats:r,text:c}=e;i(t,n),a(b.current,{__unstableFormats:r,__unstableText:c}),f()}function C(){w(),v(y.current)}y.current?t===y.current.start&&n===y.current.end||(k.current=c,y.current={...y.current,start:t,end:n}):w();const x=(0,_.useRef)(!1);(0,_.useLayoutEffect)((()=>{x.current&&e!==b.current&&C()}),[e]),(0,_.useLayoutEffect)((()=>{k.current&&(C(),k.current=!1)}),[k.current]);const S=hr([h,(0,_.useCallback)((e=>{e&&(e.style.whiteSpace="pre-wrap",e.style.minWidth="1px")}),[]),ug({record:y}),dg({record:y,multilineTag:l,preserveWhiteSpace:o}),Jh((e=>{function t(t){const{target:n}=t;if(n===e||n.textContent)return;const{ownerDocument:r}=n,{defaultView:o}=r,i=r.createRange(),a=o.getSelection();i.selectNode(n),a.removeAllRanges(),a.addRange(i)}return e.addEventListener("click",t),()=>{e.removeEventListener("click",t)}}),[]),mg({record:y,applyRecord:v}),wg({createRecord:g,handleChange:E,multilineTag:l}),hg({multilineTag:l,createRecord:g,handleChange:E}),bg({record:y,applyRecord:v,createRecord:g,handleChange:E,isSelected:c,onSelectionChange:i}),Jh((()=>{C(),x.current=!0}),[r,...u])]);return{value:y.current,onChange:E,onFocus:function(){h.current.focus(),v(y.current)},ref:S}}({value:W,onChange(e,{__unstableFormats:t,__unstableText:n}){Z(e),Object.values(G).forEach((e=>{e(t,n)}))},selectionStart:O,selectionEnd:D,onSelectionChange:j,placeholder:d,__unstableIsSelected:M,__unstableMultilineTag:z,__unstableDisableFormats:x,preserveWhiteSpace:k,__unstableDependencies:[...K,n],__unstableAfterParse:function(e){return q.reduce(((t,n)=>n(t,e.text)),e.formats)},__unstableBeforeSerialize:Y,__unstableAddInvisibleFormats:function(e){return $.reduce(((t,n)=>n(t,e.text)),e.formats)}}),te=function(e){return function(e){const t=(0,_.useRef)(),n=(0,_.useRef)(),{popover:r,listBoxId:o,activeId:i,onKeyDown:a}=hM({...e,contentRef:t});return n.current=a,{ref:hr([t,Jh((e=>{function t(e){n.current(e)}return e.addEventListener("keydown",t),()=>{e.removeEventListener("keydown",t)}}),[])]),children:r,"aria-autocomplete":o?"list":void 0,"aria-owns":o,"aria-activedescendant":i}}({...e,completers:bM(e)})}({onReplace:u,completers:c,record:X,onChange:J});!function({value:e}){const t=e.activeFormats&&!!e.activeFormats.length,{isCaretWithinFormattedText:n}=(0,er.Z)(Iv),{enterFormattedText:r,exitFormattedText:o}=(0,tr.Z)(Iv);(0,_.useEffect)((()=>{t?n()||r():n()&&o()}),[t])}({value:X}),function({html:e,value:t}){const n=(0,_.useRef)(),r=t.activeFormats&&!!t.activeFormats.length,{__unstableMarkLastChangeAsPersistent:o}=(0,tr.Z)(Iv);(0,_.useLayoutEffect)((()=>{if(n.current){if(n.current!==t.text){const e=window.setTimeout((()=>{o()}),1e3);return n.current=t.text,()=>{window.clearTimeout(e)}}o()}else n.current=t.text}),[e,r])}({html:W,value:X});const ne=n,re=(0,_.createElement)(_.Fragment,null,M&&t&&t({value:X,onChange:J,onFocus:Q}),M&&(0,_.createElement)(PM,{value:X,onChange:J,onFocus:Q,formatTypes:U,forwardedRef:L}),M&&V&&(0,_.createElement)(kM,{inline:l,anchorRef:L.current}),(0,_.createElement)(ne,(0,nr.Z)({role:"textbox","aria-multiline":!0,"aria-label":d},N,te,{ref:hr([te.ref,N.ref,ee,NM({value:X,onChange:J,__unstableAllowPrefixTransformations:T,formatTypes:U,onReplace:u}),Jh((e=>{function t(e){(Jr.primary(e,"z")||Jr.primary(e,"y")||Jr.primaryShift(e,"z"))&&e.preventDefault()}return e.addEventListener("keydown",t),()=>{e.addEventListener("keydown",t)}}),[]),EM(),TM({isSelected:M,disableFormats:x,onChange:J,value:X,formatTypes:U,tagName:n,onReplace:u,onSplit:v,onSplitMiddle:y,__unstableEmbedURLOnPaste:C,multilineTag:z,preserveWhiteSpace:k,pastePlainText:E}),AM({removeEditorOnlyFormats:Y,value:X,onReplace:u,onSplit:v,onSplitMiddle:y,multilineTag:z,onChange:J,disableLineBreaks:S,onSplitAtEnd:b}),L,A]),contentEditable:!B||void 0,suppressContentEditableWarning:!B,className:Cr()("block-editor-rich-text__editable",N.className,"rich-text"),onFocus:I,onKeyDown:function(e){const{keyCode:t}=e;if(!e.defaultPrevented&&(46===t||8===t)){const{start:n,end:r,text:o}=X,i=8===t,a=X.activeFormats&&!!X.activeFormats.length;if(!xh(X)||a||i&&0!==n||!i&&r!==o.length)return;g&&g(!i),h&&Sh(X)&&i&&h(!i),e.preventDefault()}}})));if(!s)return re;Vt("wp.blockEditor.RichText wrapperClassName prop",{since:"5.4",alternative:"className prop or create your own wrapper div"});const oe=Cr()("block-editor-rich-text",s);return(0,_.createElement)("div",{className:oe},re)}));OM.Content=({value:e,tagName:t,multiline:n,...r})=>{Array.isArray(e)&&(e=Pc.toHTML(e));const o=xM(n);!e&&o&&(e=`<${o}></${o}>`);const i=(0,_.createElement)(hs,null,e);return t?(0,_.createElement)(t,(0,Ce.omit)(r,["format"]),i):i},OM.isEmpty=e=>!e||0===e.length;var DM=OM;function MM({character:e,type:t,onUse:n}){return yE(Gr[t](e),(()=>(n(),!1)),{bindGlobal:!0}),null}function BM({name:e,shortcutType:t,shortcutCharacter:n,...r}){let o,i="RichText.ToolbarControls";return e&&(i+=`.${e}`),t&&n&&(o=Yr[t](n)),(0,_.createElement)(yr,{name:i},(0,_.createElement)(kp,(0,nr.Z)({},r,{shortcut:o})))}class FM extends _.Component{constructor(){super(...arguments),this.onInput=this.onInput.bind(this)}onInput(e){e.inputType===this.props.inputType&&this.props.onInput()}componentDidMount(){document.addEventListener("input",this.onInput,!0)}componentWillUnmount(){document.removeEventListener("input",this.onInput,!0)}render(){return null}}const zM="none",HM="custom",VM="media",WM="attachment",ZM=["noreferrer","noopener"],jM=(0,_.createElement)(ko,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,_.createElement)(yo,{d:"M0,0h24v24H0V0z",fill:"none"}),(0,_.createElement)(yo,{d:"m19 5v14h-14v-14h14m0-2h-14c-1.1 0-2 0.9-2 2v14c0 1.1 0.9 2 2 2h14c1.1 0 2-0.9 2-2v-14c0-1.1-0.9-2-2-2z"}),(0,_.createElement)(yo,{d:"m14.14 11.86l-3 3.87-2.14-2.59-3 3.86h12l-3.86-5.14z"})),UM=({linkDestination:e,onChangeUrl:t,url:n,mediaType:r="image",mediaUrl:o,mediaLink:i,linkTarget:a,linkClass:l,rel:s})=>{const[c,u]=(0,_.useState)(!1),d=(0,_.useCallback)((()=>{u(!0)})),[p,m]=(0,_.useState)(!1),[f,h]=(0,_.useState)(null),g=(0,_.useRef)(null),v=(0,_.useCallback)((()=>{e!==VM&&e!==WM||h(""),m(!0)})),b=(0,_.useCallback)((()=>{m(!1)})),y=(0,_.useCallback)((()=>{h(null),b(),u(!1)})),w=e=>{let t=e;return void 0===e||(0,Ce.isEmpty)(t)||(0,Ce.isEmpty)(t)||((0,Ce.each)(ZM,(e=>{const n=new RegExp("\\b"+e+"\\b","gi");t=t.replace(n,"")})),t!==e&&(t=t.trim()),(0,Ce.isEmpty)(t)&&(t=void 0)),t},k=(0,_.useCallback)((()=>e=>{const t=g.current;t&&t.contains(e.target)||(u(!1),h(null),b())})),E=(0,_.useCallback)((()=>e=>{if(f){var n;const e=(null===(n=x().find((e=>e.url===f)))||void 0===n?void 0:n.linkDestination)||HM;t({href:f,linkDestination:e})}b(),h(null),e.preventDefault()})),C=(0,_.useCallback)((()=>{t({linkDestination:zM,href:""})})),x=()=>{const e=[{linkDestination:VM,title:U("Media File"),url:"image"===r?o:void 0,icon:jM}];return"image"===r&&i&&e.push({linkDestination:WM,title:U("Attachment Page"),url:"image"===r?i:void 0,icon:(0,_.createElement)(ko,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,_.createElement)(yo,{d:"M0 0h24v24H0V0z",fill:"none"}),(0,_.createElement)(yo,{d:"M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zM6 20V4h7v5h5v11H6z"}))}),e},S=(0,_.createElement)(_.Fragment,null,(0,_.createElement)(JT,{label:U("Open in new tab"),onChange:e=>{const n=(e=>{const t=e?"_blank":void 0;let n;return n=t||s?w(s):void 0,{linkTarget:t,rel:n}})(e);t(n)},checked:"_blank"===a}),(0,_.createElement)(Vk,{label:U("Link Rel"),value:w(s)||"",onChange:e=>{t({rel:e})}}),(0,_.createElement)(Vk,{label:U("Link CSS Class"),value:l||"",onChange:e=>{t({linkClass:e})}})),I=null!==f?f:n,T=((0,Ce.find)(x(),["linkDestination",e])||{}).title;return(0,_.createElement)(_.Fragment,null,(0,_.createElement)(kp,{icon:_C,className:"components-toolbar__control",label:U(n?"Edit link":"Insert link"),"aria-expanded":c,onClick:d}),c&&(0,_.createElement)(pM,{onFocusOutside:k(),onClose:y,renderSettings:()=>S,additionalControls:!I&&(0,_.createElement)(Np,null,(0,Ce.map)(x(),(e=>(0,_.createElement)(iI,{key:e.linkDestination,icon:e.icon,onClick:()=>{h(null),(e=>{const n=x();let r;r=e?((0,Ce.find)(n,(t=>t.url===e))||{linkDestination:HM}).linkDestination:zM,t({linkDestination:r,href:e})})(e.url),b()}},e.title))))},(!n||p)&&(0,_.createElement)(pM.LinkEditor,{className:"block-editor-format-toolbar__link-container-content",value:I,onChangeInputValue:h,onSubmit:E(),autocompleteRef:g}),n&&!p&&(0,_.createElement)(_.Fragment,null,(0,_.createElement)(pM.LinkViewer,{className:"block-editor-format-toolbar__link-container-content",url:n,onEditLinkClick:v,urlLabel:T}),(0,_.createElement)(Gi,{icon:Eo,label:U("Remove link"),onClick:C}))))};var $M=xN((e=>({selectedBlockClientId:e(Iv).getBlockSelectionStart()})))((({selectedBlockClientId:e})=>{const t=nx(e);return e?(0,_.createElement)(Gi,{variant:"secondary",className:"block-editor-skip-to-selected-block",onClick:()=>{t.current.focus()}},U("Skip to the selected block")):null}));const qM={HTMLRegExp:/<\/?[a-z][^>]*?>/gi,HTMLcommentRegExp:/<!--[\s\S]*?-->/g,spaceRegExp:/ | /gi,HTMLEntityRegExp:/&\S+?;/g,connectorRegExp:/--|\u2014/g,removeRegExp:new RegExp(["[","!-/:-@[-`{-~","-¿×÷"," -⯿","⸀-","]"].join(""),"g"),astralRegExp:/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,wordsRegExp:/\S\s+/g,characters_excluding_spacesRegExp:/\S/g,characters_including_spacesRegExp:/[^\f\n\r\t\v\u00AD\u2028\u2029]/g,l10n:{type:"words"}};function GM(e,t){return t.replace(e.HTMLRegExp,"\n")}function KM(e,t){return t.replace(e.astralRegExp,"a")}function YM(e,t){return t.replace(e.HTMLEntityRegExp,"")}function XM(e,t){return t.replace(e.connectorRegExp," ")}function JM(e,t){return t.replace(e.removeRegExp,"")}function QM(e,t){return t.replace(e.HTMLcommentRegExp,"")}function eB(e,t){return e.shortcodesRegExp?t.replace(e.shortcodesRegExp,"\n"):t}function tB(e,t){return t.replace(e.spaceRegExp," ")}function nB(e,t){return t.replace(e.HTMLEntityRegExp,"a")}function rB(e,t,n){var r,o;return e=(0,Ce.flow)(GM.bind(null,n),QM.bind(null,n),eB.bind(null,n),KM.bind(null,n),tB.bind(null,n),nB.bind(null,n))(e),null!==(r=null===(o=(e+="\n").match(t))||void 0===o?void 0:o.length)&&void 0!==r?r:0}var oB=xN((e=>{const{getMultiSelectedBlocks:t}=e(Iv);return{blocks:t()}}))((function({blocks:e}){const t=function(e,t,n){const r=function(e,t){var n,r;const o=(0,Ce.extend)({},qM,t);return o.shortcodes=null!==(n=null===(r=o.l10n)||void 0===r?void 0:r.shortcodes)&&void 0!==n?n:[],o.shortcodes&&o.shortcodes.length&&(o.shortcodesRegExp=new RegExp("\\[\\/?(?:"+o.shortcodes.join("|")+")[^\\]]*?\\]","g")),o.type=e,"characters_excluding_spaces"!==o.type&&"characters_including_spaces"!==o.type&&(o.type="words"),o}(t,n);let o;switch(r.type){case"words":return o=r.wordsRegExp,function(e,t,n){var r,o;return e=(0,Ce.flow)(GM.bind(null,n),QM.bind(null,n),eB.bind(null,n),tB.bind(null,n),YM.bind(null,n),XM.bind(null,n),JM.bind(null,n))(e),null!==(r=null===(o=(e+="\n").match(t))||void 0===o?void 0:o.length)&&void 0!==r?r:0}(e,o,r);case"characters_including_spaces":return o=r.characters_including_spacesRegExp,rB(e,o,r);case"characters_excluding_spaces":return o=r.characters_excluding_spacesRegExp,rB(e,o,r);default:return 0}}(js(e),"words");return(0,_.createElement)("div",{className:"block-editor-multi-selection-inspector__card"},(0,_.createElement)(dN,{icon:XL,showColors:!0}),(0,_.createElement)("div",{className:"block-editor-multi-selection-inspector__card-content"},(0,_.createElement)("div",{className:"block-editor-multi-selection-inspector__card-title"},L(q("%d block","%d blocks",e.length),e.length)),(0,_.createElement)("div",{className:"block-editor-multi-selection-inspector__card-description"},L(q("%d word","%d words",t),t))))}));function iB({blockName:e}){const{preferredStyle:t,onUpdatePreferredStyleVariations:n,styles:r}=(0,er.Z)((t=>{var n,r;const o=t(Iv).getSettings().__experimentalPreferredStyleVariations;return{preferredStyle:null==o||null===(n=o.value)||void 0===n?void 0:n[e],onUpdatePreferredStyleVariations:null!==(r=null==o?void 0:o.onChange)&&void 0!==r?r:null,styles:t(cl).getBlockStyles(e)}}),[e]),o=(0,_.useMemo)((()=>[{label:U("Not set"),value:""},...r.map((({label:e,name:t})=>({label:e,value:t})))]),[r]),i=(0,_.useCallback)((t=>{n(e,t)}),[e,n]);return n&&(0,_.createElement)(u_,{options:o,value:t||"",label:U("Default Style"),onChange:i})}function aB({choices:e=[],onHover:t=Ce.noop,onSelect:n,value:r}){return e.map((e=>{const o=r===e.value;return(0,_.createElement)(iI,{key:e.value,role:"menuitemradio",icon:o&&BE,info:e.info,isSelected:o,shortcut:e.shortcut,className:"components-menu-items-choice",onClick:()=>{o||n(e.value)},onMouseEnter:()=>t(e.value),onMouseLeave:()=>t(null),"aria-label":e["aria-label"]},e.label)}))}var lB=function({blockClientId:e}){const[t,n]=(0,_.useState)(),{updateBlockAttributes:r}=(0,tr.Z)(Iv),{variations:o,blockAttributes:i}=(0,er.Z)((t=>{const{getBlockVariations:n}=t(cl),{getBlockName:r,getBlockAttributes:o}=t(Iv),i=e&&r(e);return{variations:i&&n(i,"transform"),blockAttributes:o(e)}}),[e]);if((0,_.useEffect)((()=>{var e;n(null===(e=((e,t)=>{if(!t||!e)return;const n=t.filter((({attributes:t})=>!(!t||!Object.keys(t).length)&&(0,Ce.isMatch)(e,t)));return 1===n.length?n[0]:void 0})(i,o))||void 0===e?void 0:e.name)}),[i,o]),null==o||!o.length)return null;const a=o.map((({name:e,title:t,description:n})=>({value:e,label:t,info:n}))),l=t=>{r(e,{...o.find((({name:e})=>e===t)).attributes})},s="block-editor-block-variation-transforms";return(0,_.createElement)(Rp,{className:s,label:U("Transform to variation"),text:U("Transform to variation"),popoverProps:{position:"bottom center",className:`${s}__popover`},icon:Kk,toggleProps:{iconPosition:"right"}},(()=>(0,_.createElement)("div",{className:`${s}__container`},(0,_.createElement)(oI,null,(0,_.createElement)(aB,{choices:a,value:t,onSelect:l})))))};const sB=({clientId:e,blockName:t,hasBlockStyles:n,bubblesVirtually:r})=>{const o=XR(e);return(0,_.createElement)("div",{className:"block-editor-block-inspector"},(0,_.createElement)(UN,o),(0,_.createElement)(lB,{blockClientId:e}),n&&(0,_.createElement)("div",null,(0,_.createElement)(Jk,{title:U("Styles")},(0,_.createElement)(nP,{clientId:e}),Wl(t,"defaultStylePicker",!0)&&(0,_.createElement)(iB,{blockName:t}))),(0,_.createElement)(lE.Slot,{bubblesVirtually:r}),(0,_.createElement)("div",null,(0,_.createElement)(cB,{slotName:rE.slotName,bubblesVirtually:r})),(0,_.createElement)($M,{key:"back"}))},cB=({slotName:e,bubblesVirtually:t})=>{const n=dr(e);return Boolean(n.fills&&n.fills.length)?(0,_.createElement)(Jk,{className:"block-editor-block-inspector__advanced",title:U("Advanced"),initialOpen:!1},(0,_.createElement)(rE.Slot,{bubblesVirtually:t})):null};var uB=({showNoBlockSelectedMessage:e=!0,bubblesVirtually:t=!0})=>{const{count:n,hasBlockStyles:r,selectedBlockName:o,selectedBlockClientId:i,blockType:a}=(0,er.Z)((e=>{const{getSelectedBlockClientId:t,getSelectedBlockCount:n,getBlockName:r}=e(Iv),{getBlockStyles:o}=e(cl),i=t(),a=i&&r(i),l=a&&zl(a),s=a&&o(a);return{count:n(),selectedBlockClientId:i,selectedBlockName:a,blockType:l,hasBlockStyles:s&&s.length>0}}),[]);if(n>1)return(0,_.createElement)("div",{className:"block-editor-block-inspector"},(0,_.createElement)(oB,null),(0,_.createElement)(lE.Slot,{bubblesVirtually:t}));const l=o===Bl();return a&&i&&!l?(0,_.createElement)(sB,{clientId:i,blockName:a.name,hasBlockStyles:r,bubblesVirtually:t}):e?(0,_.createElement)("span",{className:"block-editor-block-inspector__no-blocks"},U("No block selected.")):null};function dB({children:e,__unstableContentRef:t,...n}){const r=Lr("medium"),o=(0,er.Z)((e=>e(Iv).getSettings().hasFixedToolbar),[]),i=KR(),{getSelectedBlockClientIds:a,getBlockRootClientId:l}=(0,er.Z)(Iv),{duplicateBlocks:s,removeBlocks:c,insertAfterBlock:u,insertBeforeBlock:d,clearSelectedBlock:p,moveBlocksUp:m,moveBlocksDown:f}=(0,tr.Z)(Iv);return(0,_.createElement)("div",(0,nr.Z)({},n,{onKeyDown:function(e){if(i("core/block-editor/move-up",e)){const t=a();if(t.length){e.preventDefault();const n=l((0,Ce.first)(t));m(t,n)}}else if(i("core/block-editor/move-down",e)){const t=a();if(t.length){e.preventDefault();const n=l((0,Ce.first)(t));f(t,n)}}else if(i("core/block-editor/duplicate",e)){const t=a();t.length&&(e.preventDefault(),s(t))}else if(i("core/block-editor/remove",e)){const t=a();t.length&&(e.preventDefault(),c(t))}else if(i("core/block-editor/insert-after",e)){const t=a();t.length&&(e.preventDefault(),u((0,Ce.last)(t)))}else if(i("core/block-editor/insert-before",e)){const t=a();t.length&&(e.preventDefault(),d((0,Ce.first)(t)))}else if(i("core/block-editor/delete-multi-selection",e)){const t=a();t.length>1&&(e.preventDefault(),c(t))}else i("core/block-editor/unselect",e)&&a().length>1&&(e.preventDefault(),p(),e.target.ownerDocument.defaultView.getSelection().removeAllRanges())}}),(0,_.createElement)(RR,{__unstableContentRef:t},(o||!r)&&(0,_.createElement)(ZP,{isFixed:!0}),(0,_.createElement)(qP,{__unstableContentRef:t}),(0,_.createElement)(ia.Slot,{name:"block-toolbar",ref:TR(t)}),e))}var pB=function({rootClientId:e,clientId:t,isAppender:n,showInserterHelpPanel:r,showMostUsedBlocks:o=!1,__experimentalInsertionIndex:i,onSelect:a=Ce.noop,shouldFocusBlock:l=!1}){const s=(0,er.Z)((n=>{const{getBlockRootClientId:r}=n(Iv);return e||r(t)||void 0}),[t,e]);return(0,_.createElement)(rD,{onSelect:a,rootClientId:s,clientId:t,isAppender:n,showInserterHelpPanel:r,showMostUsedBlocks:o,__experimentalInsertionIndex:i,shouldFocusBlock:l})};function mB(){return null}mB.Register=function(){const{registerShortcut:e}=(0,tr.Z)(qR);return(0,_.useEffect)((()=>{e({name:"core/block-editor/duplicate",category:"block",description:U("Duplicate the selected block(s)."),keyCombination:{modifier:"primaryShift",character:"d"}}),e({name:"core/block-editor/remove",category:"block",description:U("Remove the selected block(s)."),keyCombination:{modifier:"access",character:"z"}}),e({name:"core/block-editor/insert-before",category:"block",description:U("Insert a new block before the selected block(s)."),keyCombination:{modifier:"primaryAlt",character:"t"}}),e({name:"core/block-editor/insert-after",category:"block",description:U("Insert a new block after the selected block(s)."),keyCombination:{modifier:"primaryAlt",character:"y"}}),e({name:"core/block-editor/delete-multi-selection",category:"block",description:U("Remove multiple selected blocks."),keyCombination:{character:"del"},aliases:[{character:"backspace"}]}),e({name:"core/block-editor/select-all",category:"selection",description:U("Select all text when typing. Press again to select all blocks."),keyCombination:{modifier:"primary",character:"a"}}),e({name:"core/block-editor/unselect",category:"selection",description:U("Clear selection."),keyCombination:{character:"escape"}}),e({name:"core/block-editor/focus-toolbar",category:"global",description:U("Navigate to the nearest toolbar."),keyCombination:{modifier:"alt",character:"F10"}}),e({name:"core/block-editor/move-up",category:"block",description:U("Move the selected block(s) up."),keyCombination:{modifier:"secondary",character:"t"}}),e({name:"core/block-editor/move-down",category:"block",description:U("Move the selected block(s) down."),keyCombination:{modifier:"secondary",character:"y"}})}),[e]),null};var fB=mB;const hB=new Set([Hr,Vr,Wr,zr,Br,8]);function gB(){const e=(0,er.Z)((e=>e(Iv).isTyping())),{startTyping:t,stopTyping:n}=(0,tr.Z)(Iv);return hr([function(){const e=(0,er.Z)((e=>e(Iv).isTyping())),{stopTyping:t}=(0,tr.Z)(Iv);return Jh((n=>{if(!e)return;const{ownerDocument:r}=n;let o,i;function a(e){const{clientX:n,clientY:r}=e;o&&i&&(o!==n||i!==r)&&t(),o=n,i=r}return r.addEventListener("mousemove",a),()=>{r.removeEventListener("mousemove",a)}}),[e,t])}(),Jh((r=>{const{ownerDocument:o}=r,{defaultView:i}=o;if(e){let e;function t(t){const{target:r}=t;e=i.setTimeout((()=>{ZA(r)||n()}))}function a(e){const{keyCode:t}=e;t!==Fr&&9!==t||n()}function l(){const e=i.getSelection();e.rangeCount>0&&e.getRangeAt(0).collapsed||n()}return r.addEventListener("focus",t),r.addEventListener("keydown",a),o.addEventListener("selectionchange",l),()=>{i.clearTimeout(e),r.removeEventListener("focus",t),r.removeEventListener("keydown",a),o.removeEventListener("selectionchange",l)}}function a(e){const{type:n,target:o}=e;ZA(o)&&r.contains(o)&&("keydown"!==n||function(e){const{keyCode:t,shiftKey:n}=e;return!n&&hB.has(t)}(e))&&t()}return r.addEventListener("keypress",a),r.addEventListener("keydown",a),()=>{r.removeEventListener("keypress",a),r.removeEventListener("keydown",a)}}),[e,t,n])])}var vB=function({children:e}){return(0,_.createElement)("div",{ref:gB()},e)};function bB(e,t){const n="start"===t?"firstChild":"lastChild",r="start"===t?"nextSibling":"previousSibling";for(;e[n];)for(e=e[n];e.nodeType===e.TEXT_NODE&&/^[ \t\n]*$/.test(e.data)&&e[r];)e=e[r];return e}function yB(e){const{isMultiSelecting:t,getMultiSelectedBlockClientIds:n,hasMultiSelection:r,getSelectedBlockClientId:o}=e(Iv);return{isMultiSelecting:t(),multiSelectedBlockClientIds:n(),hasMultiSelection:r(),selectedBlockClientId:o()}}function wB(){const{isMultiSelecting:e,multiSelectedBlockClientIds:t,hasMultiSelection:n,selectedBlockClientId:r}=(0,er.Z)(yB,[]),o=nx(r),i=nx((0,Ce.first)(t)),a=nx((0,Ce.last)(t));return Jh((l=>{const{ownerDocument:s}=l,{defaultView:c}=s;if(!n||e){if(!r||e)return;const t=c.getSelection();if(t.rangeCount&&!t.isCollapsed){const e=o.current,{startContainer:n,endContainer:r}=t.getRangeAt(0);!e||e.contains(n)&&e.contains(r)||t.removeAllRanges()}return}const{length:u}=t;if(u<2)return;l.focus();const d=c.getSelection(),p=s.createRange(),m=bB(i.current,"start"),f=bB(a.current,"end");!function(e,t){Array.from(e.querySelectorAll(".rich-text")).forEach((e=>{e.removeAttribute("contenteditable")}))}(l),p.setStartBefore(m),p.setEndAfter(f),d.removeAllRanges(),d.addRange(p)}),[n,e,t,r])}function kB(e){const{tagName:t}=e;return"INPUT"===t||"BUTTON"===t||"SELECT"===t||"TEXTAREA"===t}function EB(e,t,n=!1){if(UA(e))return e.selectionStart===e.selectionEnd&&(t?0===e.selectionStart:e.value.length===e.selectionStart);if(!e.isContentEditable)return!0;const{ownerDocument:r}=e,{defaultView:o}=r,i=o.getSelection();if(!i||!i.rangeCount)return!1;const a=i.getRangeAt(0),l=a.cloneRange(),s=function(e){const{anchorNode:t,focusNode:n,anchorOffset:r,focusOffset:o}=e,i=t.compareDocumentPosition(n);return!(i&t.DOCUMENT_POSITION_PRECEDING)&&(!!(i&t.DOCUMENT_POSITION_FOLLOWING)||0!==i||r<=o)}(i),c=i.isCollapsed;c||l.collapse(!s);const u=xr(l),d=xr(a);if(!u||!d)return!1;const p=function(e){const t=Array.from(e.getClientRects());if(!t.length)return;const n=Math.min(...t.map((({top:e})=>e)));return Math.max(...t.map((({bottom:e})=>e)))-n}(a);if(!c&&p&&p>u.height&&s===t)return!1;const m=$A(e)?!t:t,f=e.getBoundingClientRect(),h=jA(r,m?f.left+1:f.right-1,t?f.top+1:f.bottom-1,e);if(!h)return!1;const g=xr(h);if(!g)return!1;const v=t?"top":"bottom",b=m?"left":"right",y=g[v]-d[v],w=g[b]-u[b],k=Math.abs(y)<=1,E=Math.abs(w)<=1;return n?k:k&&E}function _B(e,t){return EB(e,t,!0)}function CB(e,t){return EB(e,t)}function xB(e,t,n,r=!0){if(!e)return;if(!n||!e.isContentEditable)return void GA(e,t);e.focus();const o=n.height/2,i=e.getBoundingClientRect(),a=n.left,l=t?i.bottom-o:i.top+o,{ownerDocument:s}=e,{defaultView:c}=s,u=jA(s,a,l,e);if(!u||!e.contains(u.startContainer))return!r||u&&u.startContainer&&u.startContainer.contains(e)?void GA(e,t):(e.scrollIntoView(t),void xB(e,t,n,!1));const d=c.getSelection();d.removeAllRanges(),d.addRange(u)}function SB(e,t,n,r){let o,i=po.focusable.find(n);return t&&(i=(0,Ce.reverse)(i)),i=i.slice(i.indexOf(e)+1),r&&(o=e.getBoundingClientRect()),(0,Ce.find)(i,(function(e){if(!po.tabbable.isTabbableIndex(e))return!1;if(e.isContentEditable&&"true"!==e.contentEditable)return!1;if(r){const t=e.getBoundingClientRect();if(t.left>=o.right||t.right<=o.left)return!1}return!0}))}function IB(){const{getSelectedBlockClientId:e,getMultiSelectedBlocksStartClientId:t,getMultiSelectedBlocksEndClientId:n,getPreviousBlockClientId:r,getNextBlockClientId:o,getFirstMultiSelectedBlockClientId:i,getLastMultiSelectedBlockClientId:a,getSettings:l,hasMultiSelection:s}=(0,er.Z)(Iv),{multiSelect:c,selectBlock:u}=(0,tr.Z)(Iv);return Jh((d=>{let p;function m(){p=null}function f(i){const a=e(),l=t(),s=n(),d=r(s||a),p=o(s||a),m=i?d:p;m&&(l===m?u(m):c(l||a,m))}function h(e){const t=i(),n=a(),r=e?t:n;r&&u(r)}function g(t){const{keyCode:i,target:a}=t,c=i===Hr,u=i===zr,m=c||u,g=u||i===Vr,v=c||i===Wr,b=g||v,y=t.shiftKey,w=y||t.ctrlKey||t.altKey||t.metaKey,k=v?_B:CB,{ownerDocument:E}=d,{defaultView:_}=E;if(s())return void(b&&((y?f:h)(m),t.preventDefault()));if(v?p||(p=function(e){const t=e.getSelection(),n=t.rangeCount?t.getRangeAt(0):null;return n?xr(n):null}(_)):p=null,t.defaultPrevented)return;if(!b)return;if(!function(e,t,n){if((t===Hr||t===Wr)&&!n)return!0;const{tagName:r}=e;return"INPUT"!==r&&"TEXTAREA"!==r}(a,i,w))return;const C=$A(a)?!m:m,{keepCaretInsideBlock:x}=l(),S=e();if(y){const e=n(),i=r(e||S),l=o(e||S);(m&&i||!m&&l)&&function(e,t){const n=SB(e,t,d);return!(n&&(r=e,o=n,r.closest(KA)===o.closest(KA)));var r,o}(a,m)&&k(a,m)&&(f(m),t.preventDefault())}else if(v&&_B(a,m)&&!x){const e=SB(a,m,d,!0);e&&(xB(e,m,p),t.preventDefault())}else g&&_.getSelection().isCollapsed&&CB(a,C)&&!x&&(GA(SB(a,C,d),m),t.preventDefault())}return d.addEventListener("mousedown",m),d.addEventListener("keydown",g),()=>{d.removeEventListener("mousedown",m),d.removeEventListener("keydown",g)}}),[])}function TB(e,t,n){let r=t;do{if(e===r)return!0;r=r[n]}while(r);return!1}function NB(){const{getBlockOrder:e,getSelectedBlockClientIds:t,getBlockRootClientId:n}=(0,er.Z)(Iv),{multiSelect:r}=(0,tr.Z)(Iv),o=KR();return Jh((i=>{function a(i){if(!o("core/block-editor/select-all",i))return;if(!function(e){if(UA(e))return 0===e.selectionStart&&e.value.length===e.selectionEnd;if(!e.isContentEditable)return!0;const{ownerDocument:t}=e,{defaultView:n}=t,r=n.getSelection(),o=r.rangeCount?r.getRangeAt(0):null;if(!o)return!0;const{startContainer:i,endContainer:a,startOffset:l,endOffset:s}=o;if(i===e&&a===e&&0===l&&s===e.childNodes.length)return!0;e.lastChild;const c=a.nodeType===a.TEXT_NODE?a.data.length:a.childNodes.length;return TB(i,e,"firstChild")&&TB(a,e,"lastChild")&&0===l&&s===c}(i.target))return;const a=t(),[l]=a,s=n(l);let c=e(s);a.length===c.length&&(c=e(n(s)));const u=(0,Ce.first)(c),d=(0,Ce.last)(c);u!==d&&(r(u,d),i.preventDefault())}return i.addEventListener("keydown",a),()=>{i.removeEventListener("keydown",a)}}),[])}var AB=(0,_.forwardRef)((function({children:e,...t},n){const[r,o,i]=function(){const[e,t,n]=function(){const e=(0,_.useRef)(),t=(0,_.useRef)(),n=(0,_.useRef)(),r=(0,_.useRef)(),{hasMultiSelection:o,getSelectedBlockClientId:i}=(0,er.Z)(Iv),{setNavigationMode:a}=(0,tr.Z)(Iv),l=(0,er.Z)((e=>e(Iv).isNavigationMode()),[])?void 0:"0",s=(0,_.useRef)();function c(t){if(s.current)s.current=null;else if(o())e.current.focus();else if(i())r.current.focus();else{a(!0);const n=t.target.compareDocumentPosition(e.current)&t.target.DOCUMENT_POSITION_FOLLOWING?"findNext":"findPrevious";po.tabbable[n](t.target).focus()}}const u=(0,_.createElement)("div",{ref:t,tabIndex:l,onFocus:c}),d=(0,_.createElement)("div",{ref:n,tabIndex:l,onFocus:c}),p=Jh((l=>{function c(e){if(e.defaultPrevented)return;if(e.keyCode===Fr&&!o())return e.preventDefault(),void a(!0);if(9!==e.keyCode)return;const r=e.shiftKey,c=r?"findPrevious":"findNext";if(!o()&&!i())return void(e.target===l&&a(!0));if(kB(e.target)&&kB(po.tabbable[c](e.target)))return;const u=r?t:n;s.current=!0,u.current.focus({preventScroll:!0})}function u(e){r.current=e.target}function d(r){var o;if(9!==r.keyCode)return;if("region"===(null===(o=r.target)||void 0===o?void 0:o.getAttribute("role")))return;if(e.current===r.target)return;const i=r.shiftKey?"findPrevious":"findNext",a=po.tabbable[i](r.target);a!==t.current&&a!==n.current||(r.preventDefault(),a.focus({preventScroll:!0}))}return l.ownerDocument.defaultView.addEventListener("keydown",d),l.addEventListener("keydown",c),l.addEventListener("focusout",u),()=>{l.ownerDocument.defaultView.removeEventListener("keydown",d),l.removeEventListener("keydown",c),l.removeEventListener("focusout",u)}}),[]);return[u,hr([e,p]),d]}(),r=(0,er.Z)((e=>e(Iv).hasMultiSelection()),[]);return[e,hr([t,wB(),NB(),IB(),Jh((e=>{if(e.tabIndex=-1,r)return e.setAttribute("aria-label",U("Multiple selected blocks")),()=>{e.removeAttribute("aria-label")}}),[r])]),n]}();return(0,_.createElement)(_.Fragment,null,r,(0,_.createElement)("div",(0,nr.Z)({},t,{ref:hr([o,n]),className:Cr()(t.className,"block-editor-writing-flow")}),e),i)})),RB=n(13692),LB=n.n(RB);const PB=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;function OB(e,t){t=t||{};let n=1,r=1;function o(e){const t=e.match(/\n/g);t&&(n+=t.length);const o=e.lastIndexOf("\n");r=~o?e.length-o:r+e.length}function i(){const e={line:n,column:r};return function(t){return t.position=new a(e),m(),t}}function a(e){this.start=e,this.end={line:n,column:r},this.source=t.source}a.prototype.content=e;const l=[];function s(o){const i=new Error(t.source+":"+n+":"+r+": "+o);if(i.reason=o,i.filename=t.source,i.line=n,i.column=r,i.source=e,!t.silent)throw i;l.push(i)}function c(){return p(/^{\s*/)}function u(){return p(/^}/)}function d(){let t;const n=[];for(m(),f(n);e.length&&"}"!==e.charAt(0)&&(t=C()||x());)!1!==t&&(n.push(t),f(n));return n}function p(t){const n=t.exec(e);if(!n)return;const r=n[0];return o(r),e=e.slice(r.length),n}function m(){p(/^\s*/)}function f(e){let t;for(e=e||[];t=h();)!1!==t&&e.push(t);return e}function h(){const t=i();if("/"!==e.charAt(0)||"*"!==e.charAt(1))return;let n=2;for(;""!==e.charAt(n)&&("*"!==e.charAt(n)||"/"!==e.charAt(n+1));)++n;if(n+=2,""===e.charAt(n-1))return s("End of comment missing");const a=e.slice(2,n-2);return r+=2,o(a),e=e.slice(n),r+=2,t({type:"comment",comment:a})}function g(){const e=p(/^([^{]+)/);if(e)return DB(e[0]).replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*\/+/g,"").replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g,(function(e){return e.replace(/,/g,"")})).split(/\s*(?![^(]*\)),\s*/).map((function(e){return e.replace(/\u200C/g,",")}))}function v(){const e=i();let t=p(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(!t)return;if(t=DB(t[0]),!p(/^:\s*/))return s("property missing ':'");const n=p(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),r=e({type:"declaration",property:t.replace(PB,""),value:n?DB(n[0]).replace(PB,""):""});return p(/^[;\s]*/),r}function b(){const e=[];if(!c())return s("missing '{'");let t;for(f(e);t=v();)!1!==t&&(e.push(t),f(e));return u()?e:s("missing '}'")}function y(){let e;const t=[],n=i();for(;e=p(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)t.push(e[1]),p(/^,\s*/);if(t.length)return n({type:"keyframe",values:t,declarations:b()})}const w=_("import"),k=_("charset"),E=_("namespace");function _(e){const t=new RegExp("^@"+e+"\\s*([^;]+);");return function(){const n=i(),r=p(t);if(!r)return;const o={type:e};return o[e]=r[1].trim(),n(o)}}function C(){if("@"===e[0])return function(){const e=i();let t=p(/^@([-\w]+)?keyframes\s*/);if(!t)return;const n=t[1];if(t=p(/^([-\w]+)\s*/),!t)return s("@keyframes missing name");const r=t[1];if(!c())return s("@keyframes missing '{'");let o,a=f();for(;o=y();)a.push(o),a=a.concat(f());return u()?e({type:"keyframes",name:r,vendor:n,keyframes:a}):s("@keyframes missing '}'")}()||function(){const e=i(),t=p(/^@media *([^{]+)/);if(!t)return;const n=DB(t[1]);if(!c())return s("@media missing '{'");const r=f().concat(d());return u()?e({type:"media",media:n,rules:r}):s("@media missing '}'")}()||function(){const e=i(),t=p(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(t)return e({type:"custom-media",name:DB(t[1]),media:DB(t[2])})}()||function(){const e=i(),t=p(/^@supports *([^{]+)/);if(!t)return;const n=DB(t[1]);if(!c())return s("@supports missing '{'");const r=f().concat(d());return u()?e({type:"supports",supports:n,rules:r}):s("@supports missing '}'")}()||w()||k()||E()||function(){const e=i(),t=p(/^@([-\w]+)?document *([^{]+)/);if(!t)return;const n=DB(t[1]),r=DB(t[2]);if(!c())return s("@document missing '{'");const o=f().concat(d());return u()?e({type:"document",document:r,vendor:n,rules:o}):s("@document missing '}'")}()||function(){const e=i();if(!p(/^@page */))return;const t=g()||[];if(!c())return s("@page missing '{'");let n,r=f();for(;n=v();)r.push(n),r=r.concat(f());return u()?e({type:"page",selectors:t,declarations:r}):s("@page missing '}'")}()||function(){const e=i();if(!p(/^@host\s*/))return;if(!c())return s("@host missing '{'");const t=f().concat(d());return u()?e({type:"host",rules:t}):s("@host missing '}'")}()||function(){const e=i();if(!p(/^@font-face\s*/))return;if(!c())return s("@font-face missing '{'");let t,n=f();for(;t=v();)n.push(t),n=n.concat(f());return u()?e({type:"font-face",declarations:n}):s("@font-face missing '}'")}()}function x(){const e=i(),t=g();return t?(f(),e({type:"rule",selectors:t,declarations:b()})):s("selector missing")}return MB(function(){const e=d();return{type:"stylesheet",stylesheet:{source:t.source,rules:e,parsingErrors:l}}}())}function DB(e){return e?e.replace(/^\s+|\s+$/g,""):""}function MB(e,t){const n=e&&"string"==typeof e.type,r=n?e:t;for(const t in e){const n=e[t];Array.isArray(n)?n.forEach((function(e){MB(e,r)})):n&&"object"==typeof n&&MB(n,r)}return n&&Object.defineProperty(e,"parent",{configurable:!0,writable:!0,enumerable:!1,value:t||null}),e}var BB=n(35717),FB=n.n(BB),zB=HB;function HB(e){this.options=e||{}}HB.prototype.emit=function(e){return e},HB.prototype.visit=function(e){return this[e.type](e)},HB.prototype.mapVisit=function(e,t){let n="";t=t||"";for(let r=0,o=e.length;r<o;r++)n+=this.visit(e[r]),t&&r<o-1&&(n+=this.emit(t));return n};var VB=WB;function WB(e){zB.call(this,e)}FB()(WB,zB),WB.prototype.compile=function(e){return e.stylesheet.rules.map(this.visit,this).join("")},WB.prototype.comment=function(e){return this.emit("",e.position)},WB.prototype.import=function(e){return this.emit("@import "+e.import+";",e.position)},WB.prototype.media=function(e){return this.emit("@media "+e.media,e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")},WB.prototype.document=function(e){const t="@"+(e.vendor||"")+"document "+e.document;return this.emit(t,e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")},WB.prototype.charset=function(e){return this.emit("@charset "+e.charset+";",e.position)},WB.prototype.namespace=function(e){return this.emit("@namespace "+e.namespace+";",e.position)},WB.prototype.supports=function(e){return this.emit("@supports "+e.supports,e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")},WB.prototype.keyframes=function(e){return this.emit("@"+(e.vendor||"")+"keyframes "+e.name,e.position)+this.emit("{")+this.mapVisit(e.keyframes)+this.emit("}")},WB.prototype.keyframe=function(e){const t=e.declarations;return this.emit(e.values.join(","),e.position)+this.emit("{")+this.mapVisit(t)+this.emit("}")},WB.prototype.page=function(e){const t=e.selectors.length?e.selectors.join(", "):"";return this.emit("@page "+t,e.position)+this.emit("{")+this.mapVisit(e.declarations)+this.emit("}")},WB.prototype["font-face"]=function(e){return this.emit("@font-face",e.position)+this.emit("{")+this.mapVisit(e.declarations)+this.emit("}")},WB.prototype.host=function(e){return this.emit("@host",e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")},WB.prototype["custom-media"]=function(e){return this.emit("@custom-media "+e.name+" "+e.media+";",e.position)},WB.prototype.rule=function(e){const t=e.declarations;return t.length?this.emit(e.selectors.join(","),e.position)+this.emit("{")+this.mapVisit(t)+this.emit("}"):""},WB.prototype.declaration=function(e){return this.emit(e.property+":"+e.value,e.position)+this.emit(";")};var ZB=jB;function jB(e){e=e||{},zB.call(this,e),this.indentation=e.indent}FB()(jB,zB),jB.prototype.compile=function(e){return this.stylesheet(e)},jB.prototype.stylesheet=function(e){return this.mapVisit(e.stylesheet.rules,"\n\n")},jB.prototype.comment=function(e){return this.emit(this.indent()+"/*"+e.comment+"*/",e.position)},jB.prototype.import=function(e){return this.emit("@import "+e.import+";",e.position)},jB.prototype.media=function(e){return this.emit("@media "+e.media,e.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(e.rules,"\n\n")+this.emit(this.indent(-1)+"\n}")},jB.prototype.document=function(e){const t="@"+(e.vendor||"")+"document "+e.document;return this.emit(t,e.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(e.rules,"\n\n")+this.emit(this.indent(-1)+"\n}")},jB.prototype.charset=function(e){return this.emit("@charset "+e.charset+";",e.position)},jB.prototype.namespace=function(e){return this.emit("@namespace "+e.namespace+";",e.position)},jB.prototype.supports=function(e){return this.emit("@supports "+e.supports,e.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(e.rules,"\n\n")+this.emit(this.indent(-1)+"\n}")},jB.prototype.keyframes=function(e){return this.emit("@"+(e.vendor||"")+"keyframes "+e.name,e.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(e.keyframes,"\n")+this.emit(this.indent(-1)+"}")},jB.prototype.keyframe=function(e){const t=e.declarations;return this.emit(this.indent())+this.emit(e.values.join(", "),e.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(t,"\n")+this.emit(this.indent(-1)+"\n"+this.indent()+"}\n")},jB.prototype.page=function(e){const t=e.selectors.length?e.selectors.join(", ")+" ":"";return this.emit("@page "+t,e.position)+this.emit("{\n")+this.emit(this.indent(1))+this.mapVisit(e.declarations,"\n")+this.emit(this.indent(-1))+this.emit("\n}")},jB.prototype["font-face"]=function(e){return this.emit("@font-face ",e.position)+this.emit("{\n")+this.emit(this.indent(1))+this.mapVisit(e.declarations,"\n")+this.emit(this.indent(-1))+this.emit("\n}")},jB.prototype.host=function(e){return this.emit("@host",e.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(e.rules,"\n\n")+this.emit(this.indent(-1)+"\n}")},jB.prototype["custom-media"]=function(e){return this.emit("@custom-media "+e.name+" "+e.media+";",e.position)},jB.prototype.rule=function(e){const t=this.indent(),n=e.declarations;return n.length?this.emit(e.selectors.map((function(e){return t+e})).join(",\n"),e.position)+this.emit(" {\n")+this.emit(this.indent(1))+this.mapVisit(n,"\n")+this.emit(this.indent(-1))+this.emit("\n"+this.indent()+"}"):""},jB.prototype.declaration=function(e){return this.emit(this.indent())+this.emit(e.property+": "+e.value,e.position)+this.emit(";")},jB.prototype.indent=function(e){return this.level=this.level||1,null!==e?(this.level+=e,""):Array(this.level).join(this.indentation||" ")};function UB(e){return 0!==e.value.indexOf("data:")&&0!==e.value.indexOf("#")&&(t=e.value,!/^\/(?!\/)/.test(t)&&!function(e){return/^(?:https?:)?\/\//.test(e)}(e.value));var t}function $B(e,t){return new URL(e,t).toString()}const qB=/^(body|html|:root).*$/;var GB=(e,t="")=>(0,Ce.map)(e,(({css:e,baseURL:n,__experimentalNoWrapper:r=!1})=>{const o=[];return t&&!r&&o.push(((e,t=[])=>n=>"rule"===n.type?{...n,selectors:n.selectors.map((n=>t.includes(n.trim())?n:n.match(qB)?n.replace(/^(body|html|:root)/,e):e+" "+n))}:n)(t)),n&&o.push((i=n,e=>{if("declaration"===e.type){const o=function(e){const t=/url\((\s*)(['"]?)(.+?)\2(\s*)\)/g;let n;const r=[];for(;null!==(n=t.exec(e));){const e={source:n[0],before:n[1],quote:n[2],value:n[3],after:n[4]};UB(e)&&r.push(e)}return r}(e.value).map((r=i,e=>({...e,newUrl:"url("+e.before+e.quote+$B(e.value,r)+e.quote+e.after+")"})));return{...e,value:(t=e.value,n=o,n.forEach((e=>{t=t.replace(e.source,e.newUrl)})),t)}}var t,n,r;return e})),o.length?function(e,t){try{const o=OB(e);return n=LB().map(o,(function(e){if(!e)return e;const n=t(e);return this.update(n)})),((r=r||{}).compress?new VB(r):new ZB(r)).compile(n)}catch(e){return console.warn("Error while traversing the CSS: "+e),null}var n,r}(e,CE(o)):e;var i})),KB=n(76867),YB=async(e,{perPage:t=20}={})=>{const n=await he({path:Q("/wp/v2/search",{search:e,per_page:t,type:"post"})});return Array.isArray(n)?n.map((e=>({id:e.id,url:e.url,title:Qs(e.title)||`(${KB.Z.I18n.t("noName")})`,type:e.subtype||e.type}))):[]};const XB=({isActive:e,label:t,info:n,onToggle:r})=>C().createElement(iI,{icon:e&&BE,isSelected:e,onClick:r,role:"menuitemcheckbox",info:n},t);XB.propTypes={isActive:Bx().bool.isRequired,label:Bx().string.isRequired,onToggle:Bx().func.isRequired};var JB=XB,QB=n(73126),eF=(0,_.createElement)(ko,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,_.createElement)(yo,{d:"M18.3 11.7c-.6-.6-1.4-.9-2.3-.9H6.7l2.9-3.3-1.1-1-4.5 5L8.5 16l1-1-2.7-2.7H16c.5 0 .9.2 1.3.5 1 1 1 3.4 1 4.5v.3h1.5v-.2c0-1.5 0-4.3-1.5-5.7z"})),tF=function(e){const t=(0,er.Z)((e=>e("mailpoet-form-editor").hasEditorUndo()),[]),{historyUndo:n}=(0,tr.Z)("mailpoet-form-editor"),{registerShortcut:r}=(0,tr.Z)("core/keyboard-shortcuts");return GR("mailpoet-form-editor/undo",(e=>{n(),e.preventDefault()})),(0,_.useEffect)((()=>{r({name:"mailpoet-form-editor/undo",category:"block",description:U("Undo your last changes."),keyCombination:{modifier:"primary",character:"z"}})}),[r]),C().createElement(Gi,(0,QB.Z)({},e,{icon:eF,label:U("Undo"),shortcut:Yr.primary("z"),"aria-disabled":!t,onClick:t?()=>{n()}:void 0,className:"editor-history__undo"}))},nF=(0,_.createElement)(ko,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,_.createElement)(yo,{d:"M15.6 6.5l-1.1 1 2.9 3.3H8c-.9 0-1.7.3-2.3.9-1.4 1.5-1.4 4.2-1.4 5.6v.2h1.5v-.3c0-1.1 0-3.5 1-4.5.3-.3.7-.5 1.3-.5h9.2L14.5 15l1.1 1.1 4.6-4.6-4.6-5z"})),rF=function(e){const t=(0,er.Z)((e=>e("mailpoet-form-editor").hasEditorRedo()),[]),{historyRedo:n}=(0,tr.Z)("mailpoet-form-editor"),{registerShortcut:r}=(0,tr.Z)("core/keyboard-shortcuts"),o=()=>{n()};return GR("mailpoet-form-editor/redo",(e=>{o(),e.preventDefault()})),(0,_.useEffect)((()=>{r({name:"mailpoet-form-editor/redo",category:"block",description:U("Redo your last undo."),keyCombination:{modifier:"primaryShift",character:"z"}})}),[r]),C().createElement(Gi,(0,QB.Z)({},e,{icon:nF,label:U("Redo"),shortcut:Yr.primaryShift("z"),"aria-disabled":!t,onClick:t?o:void 0,className:"editor-history__redo"}))};const oF=({isInserterOpened:e,setIsInserterOpened:t})=>{const n=(0,er.Z)((e=>e("mailpoet-form-editor").getSidebarOpened()),[]),r=(0,er.Z)((e=>e("mailpoet-form-editor").getIsFormSaving()),[]),o=(0,er.Z)((e=>e("mailpoet-form-editor").getIsPreviewShown()),[]),i=(0,er.Z)((e=>e("mailpoet-form-editor").isFullscreenEnabled()),[]),{toggleSidebar:a,saveForm:l,showPreview:s,toggleFullscreen:c}=(0,tr.Z)("mailpoet-form-editor");return C().createElement("div",{className:"edit-post-header"},C().createElement("div",{className:"edit-post-header__settings"},C().createElement(Gi,{isSecondary:!0,onClick:s,isPressed:o,className:"mailpoet-preview-button","data-automation-id":"form_preview_button"},U("Preview")),C().createElement(Gi,{isPrimary:!0,className:"editor-post-publish-button","data-automation-id":"form_save_button",isBusy:r,onClick:l},r?`${U("Saving")}`:U("Save")),C().createElement(Gi,{icon:"admin-generic",label:KB.Z.I18n.t("formSettings"),tooltipPosition:"down",onClick:()=>a(!n),isPressed:n,className:"mailpoet-editor-header-button"}),C().createElement(Rp,{icon:pP,label:U("More tools & options"),className:"edit-post-more-menu",popoverProps:{className:"edit-post-more-menu__content"}},(()=>C().createElement(oI,{label:$("View","noun"),className:"mailpoet-dropdown-menu-group"},C().createElement(JB,{shortcut:"Ctrl+Shift+Alt+F",label:U("Fullscreen mode"),info:U("Work without distraction"),isActive:i,onToggle:()=>c(!i)}))))),C().createElement("div",{className:"edit-post-header__toolbar"},C().createElement("div",{className:"toolbar edit-post-header-toolbar edit-post-header-toolbar__left"},C().createElement(Gi,{isSecondary:!0,href:"?page=mailpoet-forms#/",className:"mailpoet-editor-header-button"},KB.Z.I18n.t("back")),C().createElement(bp,{as:Gi,"data-automation-id":"form_inserter_open",className:"edit-post-header-toolbar__inserter-toggle",isPrimary:!0,isPressed:e,onClick:()=>t(!e),icon:GE,label:$("Add block","Generic label for block inserter button")}),C().createElement(tF,{"data-automation-id":"form_undo_button"}),C().createElement(rF,{"data-automation-id":"form_redo_button"}))))};oF.propTypes={isInserterOpened:Bx().bool.isRequired,setIsInserterOpened:Bx().func.isRequired};var iF=oF,aF=n(57040),lF=n(22529);const sF=()=>{const e=(0,er.Z)((e=>e("mailpoet-form-editor").getTutorialUrl()),[]),t=(0,er.Z)((e=>e("mailpoet-form-editor").getTutorialSeen()),[]),{tutorialDismissed:n}=(0,tr.Z)("mailpoet-form-editor"),r=(0,_.useCallback)((()=>{n()}),[n]);return t?null:C().createElement(aF.Z,{isDismissible:!0,onRequestClose:r},C().createElement("div",{className:"mailpoet_drag_and_drop_tutorial","data-automation-id":"form-editor-tutorial"},C().createElement(lF.Z,{level:2},KB.Z.I18n.t("tutorialHeading")),C().createElement("video",{style:{height:"640px"},src:e,controls:!0,autoPlay:!0})))};var cF=function({label:e,children:t}){return(0,_.createElement)("div",{className:"components-panel__header"},e&&(0,_.createElement)("h2",null,e),t)},uF=(0,_.forwardRef)((function({header:e,className:t,children:n},r){const o=Cr()(t,"components-panel");return(0,_.createElement)("div",{className:o,ref:r},e&&(0,_.createElement)(cF,{label:e}),n)}));function dF({label:e,className:t,selected:n,help:r,onChange:o,hideLabelFromVision:i,options:a=[],...l}){const s=`inspector-radio-control-${Rb(dF)}`,c=e=>o(e.target.value);return!(0,Ce.isEmpty)(a)&&(0,_.createElement)(Hk,{label:e,id:s,hideLabelFromVision:i,help:r,className:Cr()(t,"components-radio-control")},a.map(((e,t)=>(0,_.createElement)("div",{key:`${s}-${t}`,className:"components-radio-control__option"},(0,_.createElement)("input",(0,nr.Z)({id:`${s}-${t}`,className:"components-radio-control__input",type:"radio",name:s,value:e.value,onChange:c,checked:e.value===n,"aria-describedby":r?`${s}__help`:void 0},l)),(0,_.createElement)("label",{htmlFor:`${s}-${t}`},e.label)))))}const pF=(0,pb.iv)("box-shadow:0 0 0 transparent;transition:box-shadow 0.1s linear;border-radius:",Qb.radiusBlockUi,";border:",Qb.borderWidth," solid ",Nb.ui.border,";",""),mF=(0,pb.iv)("border-color:var( --wp-admin-theme-color );box-shadow:0 0 0 calc( ",Qb.borderWidthFocus," - ",Qb.borderWidth," ) var( --wp-admin-theme-color );outline:2px solid transparent;","");const fF=(0,pb.iv)("font-family:",Ok("default.fontFamily"),";padding:6px 8px;",pF,";font-size:",Ok("mobileTextMinFontSize"),";line-height:normal;","@media (min-width: 600px)","{font-size:",Ok("default.fontSize"),";line-height:normal;}&:focus{",mF,";}&::-webkit-input-placeholder{color:",Nb.darkGray.placeholder,";}&::-moz-placeholder{opacity:1;color:",Nb.darkGray.placeholder,";}&:-ms-input-placeholder{color:",Nb.darkGray.placeholder,";}.is-dark-theme &{&::-webkit-input-placeholder{color:",Nb.lightGray.placeholder,";}&::-moz-placeholder{opacity:1;color:",Nb.lightGray.placeholder,";}&:-ms-input-placeholder{color:",Nb.lightGray.placeholder,";}}",""),hF=Zi("textarea",{target:"ebk7yr50"})("width:100%;",fF,";");function gF({label:e,hideLabelFromVision:t,value:n,help:r,onChange:o,rows:i=4,className:a,...l}){const s=`inspector-textarea-control-${Rb(gF)}`;return(0,_.createElement)(Hk,{label:e,hideLabelFromVision:t,id:s,help:r,className:a},(0,_.createElement)(hF,(0,nr.Z)({className:"components-textarea-control__input",id:s,rows:i,onChange:e=>o(e.target.value),"aria-describedby":r?s+"__help":void 0,value:n},l)))}var vF=n(44845),bF=n(65311),yF=n.n(bF),wF=n(59050);n(40686);class kF extends C().Component{constructor(e){super(e),(0,vF.Z)(this,"getFieldId",(e=>{const t=e||this.props;return t.field.id||t.field.name})),(0,vF.Z)(this,"getSelectedValues",(()=>{if(void 0!==this.props.field.selected)return this.props.field.selected(this.props.item);if(void 0!==this.props.item&&void 0!==this.props.field.name){if(!this.allowMultipleValues())return this.props.item[this.props.field.name];if(wF.ZP.isArray(this.props.item[this.props.field.name]))return this.props.item[this.props.field.name].map((e=>e.id))}return null})),(0,vF.Z)(this,"getItems",(()=>{let e;return void 0!==window[`mailpoet_${this.props.field.endpoint}`]?e=window[`mailpoet_${this.props.field.endpoint}`]:void 0!==this.props.field.values&&(e=this.props.field.values),wF.ZP.isArray(e)&&void 0!==this.props.field.filter&&(e=e.filter(this.props.field.filter)),e})),(0,vF.Z)(this,"getLabel",(e=>void 0!==this.props.field.getLabel?this.props.field.getLabel(e,this.props.item):e.name)),(0,vF.Z)(this,"getSearchLabel",(e=>void 0!==this.props.field.getSearchLabel?this.props.field.getSearchLabel(e,this.props.item):null)),(0,vF.Z)(this,"getValue",(e=>void 0!==this.props.field.getValue?this.props.field.getValue(e,this.props.item):e.id)),(0,vF.Z)(this,"setupSelect2",(()=>{if(this.isSelect2Initialized())return;let e={disabled:this.props.disabled||!1,width:this.props.width||"",placeholder:{id:"",text:this.props.field.placeholder},templateResult:function(e){return e.element&&e.element.selected?null:e.title?e.title:e.text}};this.props.dropDownParent&&(e.dropdownParent=yF()(this.props.dropDownParent));const t=this.props.field.remoteQuery||null;t&&(e=Object.assign(e,{ajax:{url:window.ajaxurl,type:"POST",dataType:"json",data:function(e){return{action:"mailpoet",api_version:window.mailpoet_api_version,token:window.mailpoet_token,endpoint:t.endpoint,method:t.method,data:Object.assign(t.data,{query:e.term})}},processResults:function(e){let t;return t=wF.ZP.has(e,"data")?e.data.map((e=>({id:e.id||e.value,text:e.name||e.text}))):[],{results:t}}},minimumInputLength:t.minimumInputLength||2})),void 0!==this.props.field.extendSelect2Options&&(e=Object.assign(e,this.props.field.extendSelect2Options));const n=yF()(`#${this.selectRef.current.id}`).select2(e);let r=!1;n.on("select2:unselecting",(()=>{r=!0})),n.on("select2:opening",(e=>{!0===r&&(r=!1,e.preventDefault())})),n.on("change",this.handleChange)})),(0,vF.Z)(this,"resetSelect2",(()=>{this.destroySelect2(),this.setupSelect2()})),(0,vF.Z)(this,"destroySelect2",(()=>{this.isSelect2Initialized()&&(yF()(`#${this.selectRef.current.id}`).select2("destroy"),this.cleanupAfterSelect2())})),(0,vF.Z)(this,"cleanupAfterSelect2",(()=>{yF()(`#${this.selectRef.current.id}`).find("option:not(.default)").remove(),yF()(`#${this.selectRef.current.id}`).off("select2:unselecting").off("select2:opening")})),(0,vF.Z)(this,"allowMultipleValues",(()=>!0===this.props.field.multiple)),(0,vF.Z)(this,"isSelect2Initialized",(()=>!0===yF()(`#${this.selectRef.current.id}`).hasClass("select2-hidden-accessible"))),(0,vF.Z)(this,"isSelect2Component",(()=>this.allowMultipleValues()||this.props.field.forceSelect2)),(0,vF.Z)(this,"handleChange",(e=>{if(void 0===this.props.onValueChange)return;const t=yF()(`#${this.selectRef.current.id}`).children(":selected").map((function(){return{id:yF()(this).val(),text:yF()(this).text()}})),n=this.props.field.multiple?wF.ZP.pluck(t,"id"):wF.ZP.pluck(t,"id").toString(),r=this.transformChangedValue(n,t);this.props.onValueChange({target:{value:r,name:this.props.field.name,id:e.target.id}})})),(0,vF.Z)(this,"transformChangedValue",((e,t)=>"function"==typeof this.props.field.transformChangedValue?this.props.field.transformChangedValue.call(this,e,t):e)),(0,vF.Z)(this,"insertEmptyOption",(()=>{if(!this.allowMultipleValues())return this.props.field.placeholder?C().createElement("option",{className:"default"}):void 0})),this.selectRef=C().createRef()}componentDidMount(){this.isSelect2Component()&&this.setupSelect2()}componentDidUpdate(e){void 0!==this.props.item&&void 0!==e.item&&this.props.item.id!==e.item.id&&yF()(`#${this.selectRef.current.id}`).val(this.getSelectedValues()).trigger("change"),void 0!==this.props.item&&void 0!==e.item&&this.allowMultipleValues()&&wF.ZP.isArray(this.props.item[this.props.field.name])&&!wF.ZP.isEqual(this.props.item[this.props.field.name],e.item[this.props.field.name])&&yF()(`#${this.selectRef.current.id}`).val(this.getSelectedValues()).trigger("change"),this.isSelect2Initialized()&&this.getFieldId(this.props)!==this.getFieldId(e)&&void 0!==this.props.field.resetSelect2OnUpdate&&this.resetSelect2()}componentWillUnmount(){this.isSelect2Component()&&this.destroySelect2()}render(){const e=this.getItems(this.props.field),t=this.getSelectedValues(),n=e.map((e=>{const t=this.getLabel(e),n=this.getSearchLabel(e),r=this.getValue(e);return C().createElement("option",{key:`option-${e.id}`,className:"default",value:r,title:n},t)}));return C().createElement("select",(0,QB.Z)({id:this.getFieldId(),ref:this.selectRef,disabled:this.props.field.disabled,"data-placeholder":this.props.field.placeholder,multiple:this.props.field.multiple,defaultValue:t},this.props.field.validation),this.insertEmptyOption(),n)}}kF.propTypes={onValueChange:Bx().func,field:Bx().shape({name:Bx().string.isRequired,values:Bx().oneOfType([Bx().object,Bx().array]),getLabel:Bx().func,resetSelect2OnUpdate:Bx().bool,selected:Bx().func,endpoint:Bx().string,filter:Bx().func,getSearchLabel:Bx().func,getValue:Bx().func,placeholder:Bx().string,remoteQuery:Bx().object,extendSelect2Options:Bx().object,multiple:Bx().bool,forceSelect2:Bx().bool,transformChangedValue:Bx().func,disabled:Bx().bool,validation:Bx().shape({"data-parsley-required":Bx().bool,"data-parsley-required-message":Bx().string,"data-parsley-type":Bx().string,"data-parsley-errors-container":Bx().string,maxLength:Bx().number})}).isRequired,item:Bx().object,disabled:Bx().bool,width:Bx().string,dropDownParent:Bx().string},kF.defaultProps={onValueChange:function(){},disabled:!1,width:"",item:void 0,dropDownParent:void 0};var EF=kF,_F=()=>{const[e,t]=(0,_.useState)(!1),n=(0,er.Z)((e=>e("mailpoet-form-editor").getFormName()),[]),r=Cr()({"is-selected":e}),{changeFormName:o}=(0,tr.Z)("mailpoet-form-editor");return C().createElement("div",{className:r},C().createElement("label",{htmlFor:"post-title",className:"screen-reader-text"},KB.Z.I18n.t("addFormName")),C().createElement("input",{id:"form-title",className:"form-editor-title",placeholder:KB.Z.I18n.t("addFormName"),"data-automation-id":"form_title_input",type:"text",onKeyPress:()=>t(!1),onBlur:()=>t(!1),onChange:e=>o(e.target.value),value:n}))};const CF=({onToggle:e,isOpened:t})=>{const n=(0,er.Z)((e=>e("mailpoet-form-editor").getFormSettings()),[]),r=(0,er.Z)((e=>e("mailpoet-form-editor").getAllAvailableSegments()),[]),o=(0,er.Z)((e=>e("mailpoet-form-editor").getAllAvailablePages()),[]),i=(0,er.Z)((e=>e("mailpoet-form-editor").getNotice("missing-lists")),[]),a=(0,er.Z)((e=>e("mailpoet-form-editor").isFormEnabled()),[]),{changeFormSettings:l,toggleForm:s}=(0,tr.Z)("mailpoet-form-editor"),c=n.segments?r.filter((e=>n.segments.includes(e.id.toString()))):[],u=i&&!c.length;return C().createElement(uF,null,C().createElement(Jk,{title:KB.Z.I18n.t("formSettings"),opened:t,onToggle:e},C().createElement(_F,null),C().createElement(JT,{label:KB.Z.I18n.t("displayForm"),checked:a,onChange:s}),C().createElement(Hk,{label:KB.Z.I18n.t("settingsListLabel"),className:Cr()({"mailpoet-form-missing-lists":u})},u?C().createElement("span",{className:"mailpoet-form-lists-error"},KB.Z.I18n.t("settingsPleaseSelectList")):null,C().createElement(EF,{item:{segments:c},onValueChange:e=>{(0,Ce.isEqual)(n.segments,e.target.value)||l({...n,segments:e.target.value})},field:{id:"segments",name:"segments",values:r,multiple:!0,placeholder:KB.Z.I18n.t("settingsPleaseSelectList"),getLabel:e=>`${e.name} (${parseInt(e.subscribers,10).toLocaleString()})`,filter:e=>!(e.deleted_at||"default"!==e.type)}})),C().createElement(dF,{className:"mailpoet-form-success-types__control",onChange:e=>{l({...n,on_success:e})},selected:n.on_success||"message",label:KB.Z.I18n.t("settingsAfterSubmit"),options:[{label:KB.Z.I18n.t("settingsShowMessage"),value:"message"},{label:KB.Z.I18n.t("settingsGoToPage"),value:"page"}]}),"page"===n.on_success?C().createElement(u_,{value:n.success_page,options:o.map((e=>({value:e.id.toString(),label:e.title}))),onChange:e=>{l({...n,success_page:e})}}):C().createElement(gF,{value:n.success_message,onChange:e=>{l({...n,success_message:e})},rows:3})))};CF.propTypes={onToggle:Bx().func.isRequired,isOpened:Bx().bool.isRequired};var xF,SF=CF;!function(e){e.Left="left",e.Center="center",e.Right="right"}(xF||(xF={}));var IF=xF;const TF=({name:e,value:t,onChange:n})=>{const r=fk("color.palette");return C().createElement("div",null,C().createElement("h3",{className:"mailpoet-styles-settings-heading"},e,void 0!==t&&C().createElement(dE,{colorValue:t})),C().createElement(zE,{value:t,onChange:n,colors:r,className:"block-editor-panel-color-gradient-settings"}))};TF.propTypes={name:Bx().string.isRequired,onChange:Bx().func.isRequired};var NF=TF;const AF=({name:e,colorValue:t,gradientValue:n,onColorChange:r,onGradientChange:o})=>{const i=fk("color.palette"),a=fk("color.gradients");return C().createElement("div",null,C().createElement(M_,{colorValue:t,gradientValue:n,onColorChange:r,onGradientChange:o,colors:i,gradients:a,label:e,className:"mailpoet-color-gradient-picker block-editor-panel-color-gradient-settings"}))};AF.propTypes={name:Bx().string.isRequired,onColorChange:Bx().func.isRequired,onGradientChange:Bx().func.isRequired};var RF=AF;const LF=({value:e,onChange:t})=>{const n=fk("typography.fontSizes");return C().createElement(ZS,{value:e,onChange:t,fontSizes:n})};LF.propTypes={onChange:Bx().func.isRequired};var PF=LF;const OF=({name:e,imageUrl:t,onImageUrlChange:n,imageDisplay:r,onImageDisplayChange:o})=>C().createElement("div",{className:"mailpoet-styles-settings-image-url"},C().createElement("h3",{className:"mailpoet-styles-settings-heading"},e),C().createElement("div",{className:"mailpoet-styles-settings-image-url-body"},C().createElement("input",{type:"text",value:null!=t?t:"",onChange:e=>n(e.target.value)}),C().createElement(iM,{value:t,onSelect:e=>n(e.url),allowedTypes:["image"],render:({open:e})=>C().createElement(Gi,{isSecondary:!0,isSmall:!0,onClick:e},KB.Z.I18n.t("formSettingsStylesSelectImage"))})),C().createElement("div",{className:"mailpoet-styles-settings-image-url-display"},C().createElement(u_,{value:r,options:[{label:KB.Z.I18n.t("imagePlacementScale"),value:"scale"},{label:KB.Z.I18n.t("imagePlacementFit"),value:"fit"},{label:KB.Z.I18n.t("imagePlacementTile"),value:"tile"}],onChange:o})));OF.propTypes={name:Bx().string.isRequired,imageUrl:Bx().string,onImageUrlChange:Bx().func.isRequired,imageDisplay:Bx().string,onImageDisplayChange:Bx().func.isRequired};var DF=OF,MF=C().createElement(ko,{width:"14px",height:"14px",viewBox:"0 0 14 14",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},C().createElement(bo,{id:"Symbols",stroke:"none",strokeWidth:"1"},C().createElement(bo,{id:"icons/ic_settings"},C().createElement(yo,{d:"M8.05,0 L8.05101528,2.11065231 C8.65254335,2.23933489 9.2139617,2.47621094 9.71391655,2.7999267 L11.2072853,1.30779041 L12.6922096,2.79271465 L11.199432,4.28509331 C11.5234762,4.78529701 11.7605802,5.34705952 11.8893477,5.94898472 L14,5.95 L14,8.05 L11.8895604,8.05002048 C11.7608414,8.65232154 11.5236547,9.21442744 11.199432,9.71490669 L12.6922096,11.2072853 L11.2072853,12.6922096 L9.71391655,11.2000733 C9.2139617,11.5237891 8.65254335,11.7606651 8.05101528,11.8893477 L8.05,14 L5.95,14 L5.94898472,11.8893477 C5.34705952,11.7605802 4.78529701,11.5234762 4.28509331,11.199432 L2.79271465,12.6922096 L1.30779041,11.2072853 L2.7999267,9.71391655 C2.4760325,9.21368611 2.23907376,8.65192438 2.11043961,8.05002048 L8.8817842e-16,8.05 L1.01676633e-15,5.95 L2.11065231,5.94898472 C2.23933489,5.34745665 2.47621094,4.7860383 2.7999267,4.28608345 L1.30779041,2.79271465 L2.79271465,1.30779041 L4.28509331,2.80056797 C4.78529701,2.47652376 5.34705952,2.23941984 5.94898472,2.11065231 L5.95,0 L8.05,0 Z M7,4 C5.34314575,4 4,5.34314575 4,7 C4,8.65685425 5.34314575,10 7,10 C8.65685425,10 10,8.65685425 10,7 C10,5.34314575 8.65685425,4 7,4 Z",id:"ic_settings"})))),BF=C().createElement(ko,{width:"13",height:"13",viewBox:"4 4 16 16",xmlns:"http://www.w3.org/2000/svg"},C().createElement(bo,{id:"icons/checkbox-on-small",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},C().createElement(yo,{d:"M12,4 C16.418278,4 20,7.581722 20,12 C20,16.418278 16.418278,20 12,20 C7.581722,20 4,16.418278 4,12 C4,7.581722 7.581722,4 12,4 Z M15.5939818,8.20494484 C15.1497095,7.86124495 14.5235958,7.95992422 14.1955177,8.42535116 L14.1955177,8.42535116 L11.2218999,12.6438652 L9.73479332,10.9561217 C9.36019283,10.530981 8.72753928,10.5044698 8.32172209,10.8969074 C7.91590488,11.289345 7.89059874,11.9521231 8.26519924,12.3772638 L8.26519924,12.3772638 L10.5728715,14.9962817 C10.9986562,15.4795122 11.7391892,15.4370557 12.1120948,14.9080343 L12.1120948,14.9080343 L15.8043703,9.66999857 C16.1324484,9.20457165 16.0382543,8.54864475 15.5939818,8.20494484 Z",id:"Combined-Shape",fill:"#ff5301",fillRule:"nonzero"})));const FF=({label:e,active:t,canBeActive:n,onClick:r,children:o,className:i,automationId:a,displaySettingsIcon:l})=>{const[s,c]=(0,_.useState)(!1);return C().createElement("div",{key:e,"data-automation-id":a,className:Cr()(i,"selection-item",{"selection-item-active":t&&n}),onMouseEnter:()=>c(!0),onMouseLeave:()=>c(!1),onClick:r,onKeyDown:e=>{["keydown","keypress"].includes(e.type)&&["Enter"," "].includes(e.key)&&(e.preventDefault(),r())},role:"button",tabIndex:0},C().createElement("div",{className:"selection-item-body"},C().createElement("div",{className:"selection-item-settings"},l?C().createElement("div",{className:Cr()("selection-item-icon",{"selection-item-icon-hover":s})},MF):C().createElement("div",null),s&&!t&&n&&C().createElement("div",{className:"selection-item-settings-oval"}),t&&n&&C().createElement("div",{className:"selection-item-check"},BF)),o),s&&C().createElement("div",{className:"selection-item-overlay"}))};FF.propTypes={label:Bx().string.isRequired,active:Bx().bool.isRequired,displaySettingsIcon:Bx().bool,canBeActive:Bx().bool,onClick:Bx().func.isRequired,className:Bx().string,children:Bx().node.isRequired,automationId:Bx().string},FF.defaultProps={canBeActive:!0,displaySettingsIcon:!0,className:void 0,automationId:void 0};var zF=FF;const HF=({label:e,active:t,onClick:n,iconUrl:r})=>C().createElement(zF,{label:e,onClick:n,active:t,canBeActive:!0,displaySettingsIcon:!1,className:"close-button-selection-item"},C().createElement("img",{src:r,alt:e.replace("_"," "),className:"close-button-selection-item-icon"}));HF.propTypes={label:Bx().string.isRequired,active:Bx().bool.isRequired,onClick:Bx().func.isRequired,iconUrl:Bx().string.isRequired};const VF=({name:e,value:t,onChange:n})=>{const r=(0,er.Z)((e=>e("mailpoet-form-editor").getCloseIconsUrl()),[]);return C().createElement("div",null,C().createElement("h3",{className:"mailpoet-styles-settings-heading"},e),C().createElement("div",{className:"close-button-selection-item-list"},C().createElement(HF,{label:"round_white",active:"round_white"===t,iconUrl:r.replace("img/form_close_icon","img/form_close_icon/round_white.svg"),onClick:()=>n("round_white")}),C().createElement(HF,{label:"round_black",active:"round_black"===t,iconUrl:r.replace("img/form_close_icon","img/form_close_icon/round_black.svg"),onClick:()=>n("round_black")}),C().createElement(HF,{label:"square_white",active:"square_white"===t,iconUrl:r.replace("img/form_close_icon","img/form_close_icon/square_white.svg"),onClick:()=>n("square_white")}),C().createElement(HF,{label:"square_black",active:"square_black"===t,iconUrl:r.replace("img/form_close_icon","img/form_close_icon/square_black.svg"),onClick:()=>n("square_black")}),C().createElement(HF,{label:"classic",active:"classic"===t,iconUrl:r.replace("img/form_close_icon","img/form_close_icon/classic.svg"),onClick:()=>n("classic")}),C().createElement(HF,{label:"classic_white",active:"classic_white"===t,iconUrl:r.replace("img/form_close_icon","img/form_close_icon/classic_white.svg"),onClick:()=>n("classic_white")})))};VF.propTypes={name:Bx().string.isRequired,onChange:Bx().func.isRequired};const WF={width:{unit:"percent",value:100}},ZF={width:{unit:"pixel",value:560}},jF={width:{unit:"percent",value:100}},UF={width:{unit:"percent",value:100}},$F={width:{unit:"pixel",value:560}},qF={formPadding:20,inputPadding:5,borderSize:0,borderRadius:0,alignment:"left",closeButton:"round_white"},GF=["Arial","Comic Sans MS","Courier New","Georgia","Lucida","Tahoma","Times New Roman","Trebuchet MS","Verdana"],KF=({onChange:e,value:t,name:n,hideLabelFromVision:r=!1})=>{const o=(0,er.Z)((e=>e("mailpoet-form-editor").getAllCustomFonts()),[]),i={color:"lightgray",backgroundColor:"white",cursor:"default"},a=e=>({fontFamily:e,cursor:"default",marginLeft:16}),l=[{key:KB.Z.I18n.t("formFontsDefaultTheme"),name:KB.Z.I18n.t("formFontsDefaultTheme"),selectable:!0,value:""},{key:KB.Z.I18n.t("formFontsStandard"),name:KB.Z.I18n.t("formFontsStandard"),selectable:!1,style:i},...GF.map((e=>({key:e,name:e,selectable:!0,style:a(e),value:e})))];KB.Z.libs3rdPartyEnabled&&(l.push({key:KB.Z.I18n.t("formFontsCustom"),name:KB.Z.I18n.t("formFontsCustom"),selectable:!1,style:i}),o.forEach((e=>{l.push({key:e,name:e,selectable:!0,style:a(e),value:e})})));let s=void 0!==t&&l.find((e=>e.value===t));return s||(s=l[0]),C().createElement(_S,{options:l,onChange:t=>{t.selectedItem.selectable&&e(t.selectedItem.value)},value:s,label:n,className:"mailpoet-font-family-select",hideLabelFromVision:r})};KF.propTypes={onChange:Bx().func.isRequired,value:Bx().string,name:Bx().string.isRequired,hideLabelFromVision:Bx().bool};var YF=KF;const XF=()=>{const e=(0,er.Z)((e=>e("mailpoet-form-editor").getAllCustomFonts()),[]);if(!KB.Z.libs3rdPartyEnabled)return null;const t=e.map((e=>e.replace(" ","+"))).map((e=>e.concat(":400,400i,700,700i"))).join("|");return C().createElement("link",{rel:"stylesheet",href:`https://fonts.googleapis.com/css?family=${t}`})},JF=({onToggle:e,isOpened:t})=>{const{changeFormSettings:n}=(0,tr.Z)("mailpoet-form-editor"),r=(0,er.Z)((e=>e("mailpoet-form-editor").getFormSettings()),[]),o=(0,_.useRef)(r);(0,_.useEffect)((()=>{o.current=r}),[r]);const i=(e,t)=>{var r;const i={...o.current};i[e]=null!=t?t:null!==(r=qF[e])&&void 0!==r?r:void 0,n(i),o.current=i};return C().createElement(uF,null,C().createElement(Jk,{title:KB.Z.I18n.t("formSettingsStyles"),opened:t,onToggle:e},C().createElement("div",{className:"mailpoet-styles-settings"},C().createElement(RF,{name:KB.Z.I18n.t("formSettingsStylesBackgroundColor"),colorValue:r.backgroundColor,gradientValue:r.gradient,onColorChange:(0,Ce.partial)(i,"backgroundColor"),onGradientChange:(0,Ce.partial)(i,"gradient")}),C().createElement(DF,{name:KB.Z.I18n.t("formSettingsStylesBackgroundImage"),imageUrl:r.backgroundImageUrl,onImageUrlChange:(0,Ce.partial)(i,"backgroundImageUrl"),imageDisplay:r.backgroundImageDisplay,onImageDisplayChange:(0,Ce.partial)(i,"backgroundImageDisplay")}),C().createElement(NF,{name:KB.Z.I18n.t("formSettingsStylesFontColor"),value:r.fontColor,onChange:(0,Ce.partial)(i,"fontColor")}),C().createElement(PF,{value:r.fontSize,onChange:(0,Ce.partial)(i,"fontSize")}),C().createElement(YF,{name:KB.Z.I18n.t("formSettingsStylesFontFamily"),value:r.fontFamily,onChange:(0,Ce.partial)(i,"fontFamily")}),C().createElement(hC,{label:KB.Z.I18n.t("formSettingsInputPadding"),value:r.inputPadding,min:0,max:30,allowReset:!0,onChange:(0,Ce.partial)(i,"inputPadding")}),C().createElement(hC,{label:KB.Z.I18n.t("formSettingsBorderSize"),value:void 0!==r.borderSize?r.borderSize:0,min:0,max:10,allowReset:!0,onChange:(0,Ce.partial)(i,"borderSize"),className:"mailpoet-automation-styles-border-size"}),C().createElement(hC,{label:KB.Z.I18n.t("formSettingsBorderRadius"),value:void 0!==r.borderRadius?r.borderRadius:0,min:0,max:40,allowReset:!0,onChange:(0,Ce.partial)(i,"borderRadius")}),C().createElement(NF,{name:KB.Z.I18n.t("formSettingsBorderColor"),value:r.borderColor,onChange:(0,Ce.partial)(i,"borderColor")}),C().createElement(u_,{label:KB.Z.I18n.t("formSettingsAlignment"),onChange:(0,Ce.partial)(i,"alignment"),options:[{value:IF.Left,label:KB.Z.I18n.t("formSettingsAlignmentLeft")},{value:IF.Center,label:KB.Z.I18n.t("formSettingsAlignmentCenter")},{value:IF.Right,label:KB.Z.I18n.t("formSettingsAlignmentRight")}],value:r.alignment}),C().createElement(hC,{label:KB.Z.I18n.t("formSettingsFormPadding"),value:r.formPadding,min:0,max:40,allowReset:!0,onChange:(0,Ce.partial)(i,"formPadding")}),C().createElement(NF,{name:KB.Z.I18n.t("successValidationColorTitle"),value:r.successValidationColor,onChange:(0,Ce.partial)(i,"successValidationColor")}),C().createElement(NF,{name:KB.Z.I18n.t("errorValidationColorTitle"),value:r.errorValidationColor,onChange:(0,Ce.partial)(i,"errorValidationColor")}),C().createElement(VF,{name:KB.Z.I18n.t("closeButtonHeading"),value:r.closeButton,onChange:(0,Ce.partial)(i,"closeButton")}))))};JF.propTypes={onToggle:Bx().func.isRequired,isOpened:Bx().bool.isRequired};var QF=JF,ez=C().createElement(ko,{width:"144",height:"120",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 144 120"},C().createElement("defs",null,C().createElement(wo,{id:"a",x:"8",y:"8",width:"128",height:"68",rx:"1"}),C().createElement(wo,{id:"b",x:"8",y:"100",width:"128",height:"12",rx:"1"})),C().createElement(bo,{fill:"none",fillRule:"evenodd"},C().createElement(yo,{d:"M4 0h136a4 4 0 0 1 4 4v112a4 4 0 0 1-4 4H4a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4z",fill:"#FFF",fillRule:"nonzero"}),C().createElement("use",{fill:"#FFF",xlinkHref:"#a"}),C().createElement("use",{fillOpacity:".4",fill:"#E5E9F8",xlinkHref:"#a"}),C().createElement("use",{fill:"#FFF",xlinkHref:"#b"}),C().createElement("use",{fillOpacity:".4",fill:"#E5E9F8",xlinkHref:"#b"}),C().createElement(wo,{fill:"#FF5301",fillRule:"nonzero",x:"98",y:"84",width:"38",height:"8",rx:"1"}),C().createElement(wo,{fill:"#FFE0D0",fillRule:"nonzero",x:"53",y:"84",width:"38",height:"8",rx:"1"}),C().createElement(wo,{fill:"#FFE0D0",fillRule:"nonzero",x:"8",y:"84",width:"38",height:"8",rx:"1"})));const tz=({label:e,icon:t,active:n,canBeActive:r,onClick:o})=>C().createElement(zF,{label:e,onClick:o,active:n,canBeActive:r,className:"form-placement-option",automationId:`form-placement-option-${e}`},C().createElement("div",{className:"form-placement-option-icon"},t),C().createElement("div",{className:"form-placement-option-label"},C().createElement("p",null,e)));tz.propTypes={label:Bx().string.isRequired,icon:Bx().element.isRequired,active:Bx().bool.isRequired,canBeActive:Bx().bool,onClick:Bx().func.isRequired},tz.defaultProps={canBeActive:!0};var nz=tz,rz=()=>{const e=(0,er.Z)((e=>e("mailpoet-form-editor").getFormSettings()),[]),{showPlacementSettings:t}=(0,tr.Z)("mailpoet-form-editor");return C().createElement(nz,{active:e.formPlacement.belowPosts.enabled,label:KB.Z.I18n.t("placeFormBellowPages"),icon:ez,onClick:()=>t("below_post"),canBeActive:!0})},oz=C().createElement(ko,{width:"144",height:"120",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 144 120"},C().createElement("defs",null,C().createElement(wo,{id:"popup_icon_a",x:"8",y:"8",width:"128",height:"104",rx:"1"}),C().createElement(yo,{d:"M49 34h46a4 4 0 0 1 4 4v40a4 4 0 0 1-4 4H49a4 4 0 0 1-4-4V38a4 4 0 0 1 4-4z",id:"popup_icon_c"}),C().createElement("filter",{x:"-61.1%",y:"-56.2%",width:"222.2%",height:"237.5%",filterUnits:"objectBoundingBox",id:"popup_icon_b"},C().createElement("feOffset",{dy:"6",in:"SourceAlpha",result:"shadowOffsetOuter1"}),C().createElement("feGaussianBlur",{stdDeviation:"10",in:"shadowOffsetOuter1",result:"shadowBlurOuter1"}),C().createElement("feColorMatrix",{values:"0 0 0 0 0.265158067 0 0 0 0 0.293073922 0 0 0 0 0.400749362 0 0 0 0.145352129 0",in:"shadowBlurOuter1"}))),C().createElement(bo,{fill:"none",fillRule:"evenodd"},C().createElement(yo,{d:"M4 0h136a4 4 0 0 1 4 4v112a4 4 0 0 1-4 4H4a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4z",fill:"#FFF",fillRule:"nonzero"}),C().createElement("use",{fill:"#FFF",xlinkHref:"#popup_icon_a"}),C().createElement("use",{fillOpacity:".4",fill:"#E5E9F8",xlinkHref:"#popup_icon_a"}),C().createElement(bo,{fillRule:"nonzero"},C().createElement("use",{fill:"#000",filter:"url(#popup_icon_b)",xlinkHref:"#popup_icon_c"}),C().createElement("use",{fill:"#FFF",xlinkHref:"#popup_icon_c"})),C().createElement(wo,{fill:"#FF5301",fillRule:"nonzero",x:"53",y:"66",width:"38",height:"8",rx:"1"}),C().createElement(wo,{fill:"#FFE0D0",fillRule:"nonzero",x:"53",y:"54",width:"38",height:"8",rx:"1"}),C().createElement(wo,{fill:"#FFE0D0",fillRule:"nonzero",x:"53",y:"42",width:"38",height:"8",rx:"1"}))),iz=()=>{const e=(0,er.Z)((e=>e("mailpoet-form-editor").getFormSettings()),[]),{showPlacementSettings:t}=(0,tr.Z)("mailpoet-form-editor");return C().createElement(nz,{active:e.formPlacement.popup.enabled,label:KB.Z.I18n.t("placePopupFormOnPages"),icon:oz,onClick:()=>t("popup"),canBeActive:!0})},az=C().createElement(ko,{width:"144",height:"120",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 144 120"},C().createElement("defs",null,C().createElement(wo,{id:"fixed_bar_a",x:"8",y:"24",width:"128",height:"88",rx:"1"})),C().createElement(bo,{fill:"none",fillRule:"evenodd"},C().createElement(yo,{d:"M4 0h136a4 4 0 0 1 4 4v112a4 4 0 0 1-4 4H4a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4z",fill:"#FFF",fillRule:"nonzero"}),C().createElement("use",{fill:"#FFF",xlinkHref:"#a"}),C().createElement("use",{fillOpacity:".4",fill:"#E5E9F8",xlinkHref:"#fixed_bar_a"}),C().createElement(wo,{fill:"#FF5301",fillRule:"nonzero",x:"98",y:"8",width:"38",height:"8",rx:"1"}),C().createElement(wo,{fill:"#FFE0D0",fillRule:"nonzero",x:"53",y:"8",width:"38",height:"8",rx:"1"}),C().createElement(wo,{fill:"#FFE0D0",fillRule:"nonzero",x:"8",y:"8",width:"38",height:"8",rx:"1"}))),lz=()=>{const e=(0,er.Z)((e=>e("mailpoet-form-editor").getFormSettings()),[]),{showPlacementSettings:t}=(0,tr.Z)("mailpoet-form-editor");return C().createElement(nz,{active:e.formPlacement.fixedBar.enabled,label:KB.Z.I18n.t("placeFixedBarFormOnPages"),icon:az,onClick:()=>t("fixed_bar"),canBeActive:!0})},sz=C().createElement(ko,{xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",width:"76",height:"63",viewBox:"0 0 76 63"},C().createElement("defs",null,C().createElement("filter",{id:"slide_in_prefix__a",width:"216.9%",height:"245.3%",x:"-55.8%",y:"-67.2%",filterUnits:"objectBoundingBox"},C().createElement("feOffset",{dy:"4",in:"SourceAlpha",result:"shadowOffsetOuter1"}),C().createElement("feGaussianBlur",{in:"shadowOffsetOuter1",result:"shadowBlurOuter1",stdDeviation:"9"}),C().createElement("feColorMatrix",{in:"shadowBlurOuter1",result:"shadowMatrixOuter1",values:"0 0 0 0 0.265158067 0 0 0 0 0.293073922 0 0 0 0 0.400749362 0 0 0 0.145352129 0"}),C().createElement("feMerge",null,C().createElement("feMergeNode",{in:"shadowMatrixOuter1"}),C().createElement("feMergeNode",{in:"SourceGraphic"}))),C().createElement("filter",{id:"slide_in_prefix__c",width:"226.3%",height:"255.8%",x:"-73.7%",y:"-77.9%",filterUnits:"objectBoundingBox"},C().createElement("feOffset",{dx:"-3",in:"SourceAlpha",result:"shadowOffsetOuter1"}),C().createElement("feGaussianBlur",{in:"shadowOffsetOuter1",result:"shadowBlurOuter1",stdDeviation:"5.5"}),C().createElement("feColorMatrix",{in:"shadowBlurOuter1",values:"0 0 0 0 0.265158067 0 0 0 0 0.293073922 0 0 0 0 0.400749362 0 0 0 0.145352129 0"})),C().createElement(wo,{id:"slide_in_prefix__b",width:"67.556",height:"54.6",x:"4.222",y:"4.2",rx:".525"}),C().createElement(yo,{id:"slide_in_prefix__d",d:"M.525 0h27.45c.29 0 .525.235.525.525v22.05c0 .29-.235.525-.525.525H.525c-.29 0-.525-.235-.525-.525V.525C0 .235.235 0 .525 0z"})),C().createElement(bo,{fill:"none",fillRule:"evenodd",filter:"url(#slide_in_prefix__a)"},C().createElement(yo,{fill:"#FFF",fillRule:"nonzero",d:"M2.1 0h71.8c1.16 0 2.1.94 2.1 2.1v58.8c0 1.16-.94 2.1-2.1 2.1H2.1C.94 63 0 62.06 0 60.9V2.1C0 .94.94 0 2.1 0z"}),C().createElement("use",{fill:"#FFF",xlinkHref:"#slide_in_prefix__b"}),C().createElement("use",{fill:"#E5E9F8",fillOpacity:".4",xlinkHref:"#slide_in_prefix__b"}),C().createElement(bo,{fillRule:"nonzero",transform:"translate(43.278 35.7)"},C().createElement("use",{fill:"#000",filter:"url(#slide_in_prefix__c)",xlinkHref:"#slide_in_prefix__d"}),C().createElement("use",{fill:"#FFF",xlinkHref:"#slide_in_prefix__d"}),C().createElement(wo,{width:"15.833",height:"4.2",x:"6.333",y:"14.7",fill:"#FF5301",rx:".525"}),C().createElement(wo,{width:"15.833",height:"4.2",x:"6.333",y:"9.45",fill:"#FFE0D0",rx:".525"}),C().createElement(wo,{width:"15.833",height:"4.2",x:"6.333",y:"4.2",fill:"#FFE0D0",rx:".525"})))),cz=()=>{const e=(0,er.Z)((e=>e("mailpoet-form-editor").getFormSettings()),[]),{showPlacementSettings:t}=(0,tr.Z)("mailpoet-form-editor");return C().createElement(nz,{active:e.formPlacement.slideIn.enabled,label:KB.Z.I18n.t("placeSlideInFormOnPages"),icon:sz,onClick:()=>t("slide_in"),canBeActive:!0})},uz=C().createElement(ko,{xmlns:"http://www.w3.org/2000/svg",width:"144",height:"120",viewBox:"0 0 144 120"},C().createElement("defs",null,C().createElement(wo,{id:"sidebar_icon_prefix__b",width:"82",height:"104",x:"8",y:"8",rx:"1"}),C().createElement(wo,{id:"sidebar_icon_prefix__c",width:"38",height:"30",x:"98",y:"8",rx:"1"}),C().createElement(wo,{id:"sidebar_icon_prefix__d",width:"38",height:"30",x:"98",y:"82",rx:"1"}),C().createElement("filter",{id:"sidebar_icon_prefix__a",width:"212.5%",height:"235%",x:"-56.2%",y:"-67.5%",filterUnits:"objectBoundingBox"},C().createElement("feOffset",{dy:"7",in:"SourceAlpha",result:"shadowOffsetOuter1"}),C().createElement("feGaussianBlur",{in:"shadowOffsetOuter1",result:"shadowBlurOuter1",stdDeviation:"17.5"}),C().createElement("feColorMatrix",{in:"shadowBlurOuter1",result:"shadowMatrixOuter1",values:"0 0 0 0 0.265158067 0 0 0 0 0.293073922 0 0 0 0 0.400749362 0 0 0 0.145352129 0"}),C().createElement("feMerge",null,C().createElement("feMergeNode",{in:"shadowMatrixOuter1"}),C().createElement("feMergeNode",{in:"SourceGraphic"})))),C().createElement(bo,{fill:"none",fillRule:"evenodd",filter:"url(#sidebar_icon_prefix__a)"},C().createElement(yo,{fill:"#FFF",fillRule:"nonzero",d:"M4 0h136c2.21 0 4 1.79 4 4v112c0 2.21-1.79 4-4 4H4c-2.21 0-4-1.79-4-4V4c0-2.21 1.79-4 4-4z"}),C().createElement("use",{fill:"#FFF",xlinkHref:"#sidebar_icon_prefix__b"}),C().createElement("use",{fill:"#E5E9F8",fillOpacity:".4",xlinkHref:"#sidebar_icon_prefix__b"}),C().createElement("use",{fill:"#FFF",xlinkHref:"#sidebar_icon_prefix__c"}),C().createElement("use",{fill:"#E5E9F8",fillOpacity:".4",xlinkHref:"#sidebar_icon_prefix__c"}),C().createElement("use",{fill:"#FFF",xlinkHref:"#sidebar_icon_prefix__d"}),C().createElement("use",{fill:"#E5E9F8",fillOpacity:".4",xlinkHref:"#sidebar_icon_prefix__d"}),C().createElement(wo,{width:"38",height:"8",x:"98",y:"66",fill:"#FF5301",fillRule:"nonzero",rx:"1"}),C().createElement(wo,{width:"38",height:"8",x:"98",y:"56",fill:"#FFE0D0",fillRule:"nonzero",rx:"1"}),C().createElement(wo,{width:"38",height:"8",x:"98",y:"46",fill:"#FFE0D0",fillRule:"nonzero",rx:"1"}))),dz=()=>{const{showPlacementSettings:e}=(0,tr.Z)("mailpoet-form-editor");return C().createElement(nz,{active:!1,label:KB.Z.I18n.t("formPlacementOtherLabel"),icon:uz,onClick:()=>e("others"),canBeActive:!1})};const pz=({onToggle:e,isOpened:t})=>C().createElement(uF,null,C().createElement(Jk,{title:KB.Z.I18n.t("formPlacement"),opened:t,onToggle:e,className:"form-sidebar-form-placement-panel"},C().createElement("div",{className:"form-placement-option-list"},C().createElement(rz,null),C().createElement(lz,null),C().createElement(iz,null),C().createElement(cz,null),C().createElement(dz,null))));pz.propTypes={onToggle:Bx().func.isRequired,isOpened:Bx().bool.isRequired};var mz=pz,fz=n(4631),hz=n.n(fz);n(36629);const gz=({options:e,value:t,onChange:n})=>{const r=(0,_.useRef)(null),o=(0,_.useRef)(null),i=(0,_.useCallback)((e=>{n(e.getValue())}),[n]);return(0,_.useEffect)((()=>(o.current=hz().fromTextArea(r.current,e),o.current.on("change",i),()=>{o.current&&o.current.toTextArea()})),[e,i]),(0,_.useEffect)((()=>{o.current.getValue()!==t&&(o.current.off("change",i),o.current.setValue(t),o.current.on("change",i))}),[t,i]),C().createElement("div",null,C().createElement("textarea",{ref:r,name:"name",defaultValue:t,autoComplete:"off"}))};gz.propTypes={value:Bx().string.isRequired,onChange:Bx().func.isRequired,options:Bx().shape({lineNumbers:Bx().bool,tabMode:Bx().string,matchBrackets:Bx().bool,theme:Bx().string,mode:Bx().string})},gz.defaultProps={options:{lineNumbers:!0,tabMode:"indent",matchBrackets:!0,theme:"neo",mode:"css"}};var vz=gz;const bz=({onToggle:e,isOpened:t})=>{const n=(0,er.Z)((e=>e("mailpoet-form-editor").getFormStyles()),[]),{changeFormStyles:r}=(0,tr.Z)("mailpoet-form-editor");return C().createElement(uF,null,C().createElement(Jk,{title:KB.Z.I18n.t("customCss"),opened:t,onToggle:e},C().createElement(vz,{value:n,onChange:r})))};bz.propTypes={onToggle:Bx().func.isRequired,isOpened:Bx().bool.isRequired};var yz=bz,wz=()=>{const{toggleSidebarPanel:e}=(0,tr.Z)("mailpoet-form-editor"),t=(0,er.Z)((e=>e("mailpoet-form-editor").getSidebarOpenedPanels()),[]);return C().createElement(C().Fragment,null,C().createElement(SF,{isOpened:t.includes("basic-settings"),onToggle:(0,Ce.partial)(e,"basic-settings")}),C().createElement(QF,{isOpened:t.includes("styles-settings"),onToggle:(0,Ce.partial)(e,"styles-settings")}),C().createElement(mz,{isOpened:t.includes("form-placement"),onToggle:(0,Ce.partial)(e,"form-placement")}),C().createElement(yz,{isOpened:t.includes("custom-css"),onToggle:(0,Ce.partial)(e,"custom-css")}))},kz=()=>C().createElement(uF,null,C().createElement(uB,null));const Ez=({children:e,closeSidebar:t})=>C().createElement(C().Fragment,null,C().createElement("div",{className:"components-panel__header interface-complementary-area-header__small"},C().createElement("span",{className:"interface-complementary-area-header__small-title"},KB.Z.I18n.t("formSettings")),C().createElement(Gi,{onClick:t,icon:"no-alt"})),C().createElement("div",{className:"components-panel__header interface-complementary-area-header edit-post-sidebar__panel-tabs"},e,C().createElement(Gi,{onClick:t,icon:"no-alt"})));Ez.propTypes={closeSidebar:Bx().func.isRequired,children:Bx().node.isRequired};var _z=Ez,Cz=({onClose:e})=>{const t=(0,er.Z)((e=>e("mailpoet-form-editor").getDefaultSidebarActiveTab()),[]),n=(0,er.Z)((e=>e("core/block-editor").getSelectedBlockClientId()),[]),{switchDefaultSidebarTab:r}=(0,tr.Z)("mailpoet-form-editor");return(0,_.useEffect)((()=>{r(n?"block":"form")}),[n,r]),C().createElement(C().Fragment,null,C().createElement(_z,{closeSidebar:e},C().createElement("ul",null,C().createElement("li",null,C().createElement("button",{onClick:()=>r("form"),className:Cr()("components-button edit-post-sidebar__panel-tab",{"is-active":"form"===t}),"data-automation-id":"mailpoet_form_settings_tab",type:"button"},KB.Z.I18n.t("form"))),C().createElement("li",null,C().createElement("button",{onClick:()=>r("block"),className:Cr()("components-button edit-post-sidebar__panel-tab",{"is-active":"block"===t}),"data-automation-id":"mailpoet_block_settings_tab",type:"button"},U("Block"))))),"form"===t?C().createElement(wz,null):C().createElement(kz,null))},xz=n(78230);const Sz=({label:e,minPercents:t=0,maxPercents:n=100,minPixels:r=10,maxPixels:o=1e3,value:i,defaultPercentValue:a=50,defaultPixelValue:l=200,onChange:s})=>{var c;const[u,d]=(0,_.useState)(null!=i?i:{unit:"pixel",value:void 0});return(0,_.useEffect)((()=>{d(i)}),[i]),C().createElement("div",{className:"mailpoet-size-settings-control"},C().createElement("h3",{className:"mailpoet-styles-settings-heading"},e),C().createElement(dF,{selected:u.unit||"pixel",options:[{label:"px",value:"pixel"},{label:"%",value:"percent"}],onChange:e=>{const t={value:"pixel"===e?l:a,unit:e};d(t),s(t)}}),C().createElement(hC,{value:null!==(c=u.value)&&void 0!==c?c:"pixel"===u.unit?l:a,min:"pixel"===u.unit?r:t,max:"pixel"===u.unit?o:n,onChange:e=>{const t={unit:"pixel"===u.unit?"pixel":"percent",value:e};d(t),s(t)}}))};Sz.propTypes={label:Bx().string.isRequired,minPercents:Bx().number,maxPercents:Bx().number,minPixels:Bx().number,maxPixels:Bx().number,defaultPercentValue:Bx().number,defaultPixelValue:Bx().number,onChange:Bx().func.isRequired};const Iz=({settingsPlacementKey:e})=>{const t=(0,er.Z)((e=>e("mailpoet-form-editor").getFormSettings()),[]),n=(0,er.Z)((e=>(0,xz.sortBy)("name",e("mailpoet-form-editor").getAllWPTags().concat(e("mailpoet-form-editor").getAllWooCommerceTags()))),[]),r=(0,er.Z)((e=>(0,xz.sortBy)("name",e("mailpoet-form-editor").getAllWPCategories().concat(e("mailpoet-form-editor").getAllWooCommerceCategories()))),[]),o=(0,er.Z)((e=>e("mailpoet-form-editor").getAllWPPages()),[]),i=(0,er.Z)((e=>(0,xz.sortBy)("name",e("mailpoet-form-editor").getAllWPPosts().concat(e("mailpoet-form-editor").getAllWooCommerceProducts()))),[]),a=(0,er.Z)((e=>e("mailpoet-form-editor").getIsPreviewShown()),[]),{changeFormSettings:l}=(0,tr.Z)("mailpoet-form-editor");let s="no-preview";return a&&(s="preview"),C().createElement(C().Fragment,null,C().createElement(JT,{label:KB.Z.I18n.t("placeFormOnAllPages"),checked:t.formPlacement[e].pages.all,onChange:n=>{(0,xz.compose)([l,(0,xz.assocPath)(`formPlacement.${e}.pages.all`,n),(0,xz.cond)([[()=>n,(0,xz.compose)([(0,xz.assocPath)(`formPlacement.${e}.pages.selected`,[]),(0,xz.assocPath)(`formPlacement.${e}.categories`,[]),(0,xz.assocPath)(`formPlacement.${e}.tags`,[])])],[()=>!n,xz.identity]])])(t)}}),C().createElement("div",{"data-automation-id":"form-placement-select-page"},C().createElement("div",{className:"form-editor-placement-selection"},C().createElement(EF,{dropDownParent:a?".mailpoet-modal-content":void 0,item:{id:`${s}${t.formPlacement[e].pages.selected.join()}`},onValueChange:n=>{const r=t.formPlacement[e].pages.selected;(0,xz.isEqual)(r,n.target.value)||(0,xz.compose)([l,(0,xz.assocPath)(`formPlacement.${e}.pages.selected`,n.target.value),(0,xz.cond)([[()=>!!n.target.value.length,(0,xz.assocPath)(`formPlacement.${e}.pages.all`,!1)],[()=>!n.target.value.length,xz.identity]])])(t)},field:{id:`${s}pages`,name:"pages",values:o,multiple:!0,placeholder:KB.Z.I18n.t("selectPage"),getLabel:e=>e.name,selected:()=>t.formPlacement[e].pages.selected}}))),C().createElement(JT,{label:KB.Z.I18n.t("placeFormOnAllPosts"),checked:t.formPlacement[e].posts.all,onChange:n=>{(0,xz.compose)([l,(0,xz.assocPath)(`formPlacement.${e}.posts.all`,n),(0,xz.cond)([[()=>n,(0,xz.compose)([(0,xz.assocPath)(`formPlacement.${e}.posts.selected`,[]),(0,xz.assocPath)(`formPlacement.${e}.categories`,[]),(0,xz.assocPath)(`formPlacement.${e}.tags`,[])])],[()=>!n,xz.identity]])])(t)}}),C().createElement("div",{className:"form-editor-placement-selection"},C().createElement(EF,{dropDownParent:a?".mailpoet-modal-content":void 0,item:{id:`${s}${t.formPlacement[e].posts.selected.join()}`},onValueChange:n=>{const r=t.formPlacement[e].posts.selected;(0,xz.isEqual)(r,n.target.value)||(0,xz.compose)([l,(0,xz.assocPath)(`formPlacement.${e}.posts.selected`,n.target.value),(0,xz.cond)([[()=>!!n.target.value.length,(0,xz.assocPath)(`formPlacement.${e}.posts.all`,!1)],[()=>!n.target.value.length,xz.identity]])])(t)},field:{id:`${s}posts`,name:"posts",values:i,multiple:!0,placeholder:KB.Z.I18n.t("selectPage"),getLabel:e=>e.name,selected:()=>t.formPlacement[e].posts.selected}})),C().createElement("div",null,C().createElement("h3",{className:"form-editor-sidebar-heading"},KB.Z.I18n.t("displayOnCategories")),C().createElement("div",{className:"form-editor-placement-selection"},C().createElement(EF,{dropDownParent:a?".mailpoet-modal-content":void 0,item:{id:`${s}${t.formPlacement[e].categories.join()}`},onValueChange:n=>{const r=t.formPlacement[e].categories;(0,xz.isEqual)(r,n.target.value)||(0,xz.compose)([l,(0,xz.assocPath)(`formPlacement.${e}.categories`,n.target.value),(0,xz.cond)([[()=>!!n.target.value.length,(0,xz.compose)([(0,xz.assocPath)(`formPlacement.${e}.pages.all`,!1),(0,xz.assocPath)(`formPlacement.${e}.posts.all`,!1)])],[()=>!n.target.value.length,xz.identity]])])(t)},field:{id:`${s}categories`,name:"categories",values:r,multiple:!0,placeholder:KB.Z.I18n.t("selectPage"),getLabel:e=>e.name,selected:()=>t.formPlacement[e].categories}}))),C().createElement("div",null,C().createElement("h3",{className:"form-editor-sidebar-heading"},KB.Z.I18n.t("displayOnTags")),C().createElement("div",{className:"form-editor-placement-selection"},C().createElement(EF,{dropDownParent:a?".mailpoet-modal-content":void 0,item:{id:`${s}${t.formPlacement[e].tags.join()}`},onValueChange:n=>{const r=t.formPlacement[e].tags;(0,xz.isEqual)(r,n.target.value)||(0,xz.compose)([l,(0,xz.assocPath)(`formPlacement.${e}.tags`,n.target.value),(0,xz.cond)([[()=>!!n.target.value.length,(0,xz.compose)([(0,xz.assocPath)(`formPlacement.${e}.pages.all`,!1),(0,xz.assocPath)(`formPlacement.${e}.posts.all`,!1)])],[()=>!n.target.value.length,xz.identity]])])(t)},field:{id:`${s}tags`,name:"tags",values:n,multiple:!0,placeholder:KB.Z.I18n.t("selectPage"),getLabel:e=>e.name,selected:()=>t.formPlacement[e].tags}}))))};Iz.propTypes={settingsPlacementKey:Bx().string.isRequired};var Tz=Iz,Nz=()=>{const e=(0,er.Z)((e=>e("mailpoet-form-editor").getFormSettings()),[]),{changeFormSettings:t}=(0,tr.Z)("mailpoet-form-editor"),n=e.formPlacement.belowPosts.enabled;return C().createElement(C().Fragment,null,C().createElement("p",null,KB.Z.I18n.t("placeFormBellowPagesDescription")),C().createElement(JT,{label:KB.Z.I18n.t("enable"),checked:n,onChange:(0,xz.compose)([t,(0,xz.assocPath)("formPlacement.belowPosts.enabled",xz.__,e)])}),n&&C().createElement(C().Fragment,null,C().createElement(Sz,{label:KB.Z.I18n.t("formSettingsWidth"),value:e.formPlacement.belowPosts.styles.width,minPixels:200,maxPixels:1200,minPercents:10,maxPercents:100,defaultPixelValue:560,defaultPercentValue:100,onChange:n=>t((0,xz.assocPath)("formPlacement.belowPosts.styles.width",n,e))}),C().createElement(Tz,{settingsPlacementKey:"belowPosts"})))};const Az=({settingsPlacementKey:e})=>{const t=(0,er.Z)((e=>e("mailpoet-form-editor").getFormSettings()),[]),{changeFormSettings:n}=(0,tr.Z)("mailpoet-form-editor");return C().createElement(u_,{label:KB.Z.I18n.t("animationHeader"),value:t.formPlacement[e].animation,options:[{label:KB.Z.I18n.t("animationNone"),value:"none"},{label:"Fade In",value:"fadein"},{label:"Slide Right",value:"slideright"},{label:"Slide Left",value:"slideleft"},{label:"Slide Up",value:"slideup"},{label:"Slide Down",value:"slidedown"},{label:"Zoom Out",value:"zoomout"},{label:"Zoom In",value:"zoomin"},{label:"Flip",value:"flip"}],onChange:(0,xz.compose)([n,(0,xz.assocPath)(`formPlacement.${e}.animation`,xz.__,t)])})};Az.propTypes={settingsPlacementKey:Bx().string.isRequired};var Rz=Az;const Lz=[0,2,5,10,15,30,45,60,120,180,240];var Pz=()=>{const e=(0,er.Z)((e=>e("mailpoet-form-editor").getFormSettings()),[]),{changeFormSettings:t}=(0,tr.Z)("mailpoet-form-editor"),n=e.formPlacement.popup.enabled;return C().createElement(C().Fragment,null,C().createElement("p",null,KB.Z.I18n.t("placePopupFormOnPagesDescription")),C().createElement(JT,{label:KB.Z.I18n.t("enable"),checked:n,onChange:(0,xz.compose)([t,(0,xz.assocPath)("formPlacement.popup.enabled",xz.__,e)])}),n&&C().createElement(C().Fragment,null,C().createElement("hr",null),C().createElement(Sz,{label:KB.Z.I18n.t("formSettingsWidth"),value:e.formPlacement.popup.styles.width,minPixels:200,maxPixels:1200,minPercents:10,maxPercents:100,defaultPixelValue:560,defaultPercentValue:100,onChange:n=>t((0,xz.assocPath)("formPlacement.popup.styles.width",n,e))}),C().createElement(Tz,{settingsPlacementKey:"popup"}),C().createElement(Rz,{settingsPlacementKey:"popup"}),C().createElement(u_,{label:KB.Z.I18n.t("formPlacementDelay"),value:e.formPlacement.popup.delay,onChange:(0,xz.compose)([t,(0,xz.assocPath)("formPlacement.popup.delay",xz.__,e)]),options:Lz.map((e=>({value:e,label:KB.Z.I18n.t("formPlacementDelaySeconds").replace("%1s",e)})))}),C().createElement("div",null,C().createElement("p",null,C().createElement("b",null,KB.Z.I18n.t("exitIntentTitle"))),C().createElement("p",null,KB.Z.I18n.t("exitIntentDescription")),C().createElement(JT,{label:KB.Z.I18n.t("exitIntentSwitch"),checked:e.formPlacement.popup.exitIntentEnabled,onChange:(0,xz.compose)([t,(0,xz.assocPath)("formPlacement.popup.exitIntentEnabled",xz.__,e)])}))))},Oz=n(27927),Dz=n.n(Oz),Mz=()=>{const[e,t]=(0,_.useState)(null),n=(0,er.Z)((e=>e("mailpoet-form-editor").getFormExports()),[]),r=(0,er.Z)((e=>e("mailpoet-form-editor").getFormSettings()),[]),o=(0,er.Z)((e=>e("mailpoet-form-editor").isFormSaved()),[]),{changeFormSettings:i}=(0,tr.Z)("mailpoet-form-editor"),a=Dz()(KB.Z.I18n.t("addFormWidgetHint"),/\[link](.*?)\[\/link]/g,(e=>C().createElement("a",{key:"addFormWidgetHintLink",href:"widgets.php",target:"_blank"},e))),l=Dz()(KB.Z.I18n.t("addFormShortcodeHint"),/\[shortcode]/g,(e=>C().createElement("code",{key:e},n.shortcode))),s=(0,Ce.curry)(((e,r)=>(r.preventDefault(),KB.Z.trackEvent("Forms > Embed",{"Embed type":e}),t("php"===e?n.php:n.iframe)))),c=Dz()(KB.Z.I18n.t("addFormPhpIframeHint"),/\[link](.*?)\[\/link]/g,(e=>"PHP"===e?C().createElement("a",{key:"exportPHP",href:"#",onClick:s("php")},e):C().createElement("a",{key:"exportIframe",href:"#",onClick:s("iframe")},e)));return o?C().createElement(C().Fragment,null,C().createElement("p",null,a),C().createElement("p",null,l),C().createElement("p",null,c),e?C().createElement(gF,{key:"copyTextArea",readOnly:!0,onClick:e=>e.target.select(),rows:8,value:e}):null,C().createElement("hr",null),C().createElement(Sz,{label:KB.Z.I18n.t("formSettingsWidth"),value:r.formPlacement.others.styles.width,minPixels:200,maxPixels:1200,minPercents:10,maxPercents:100,defaultPixelValue:200,defaultPercentValue:100,onChange:e=>i((0,xz.assocPath)("formPlacement.others.styles.width",e,r))})):C().createElement("p",null,KB.Z.I18n.t("saveFormFirst"))};const Bz=[0,2,5,10,15,30,45,60,120,180,240];var Fz=()=>{const e=(0,er.Z)((e=>e("mailpoet-form-editor").getFormSettings()),[]),{changeFormSettings:t}=(0,tr.Z)("mailpoet-form-editor"),n=e.formPlacement.fixedBar.enabled;return C().createElement(C().Fragment,null,C().createElement("p",null,KB.Z.I18n.t("placeFixedBarFormOnPagesDescription")),C().createElement(JT,{label:KB.Z.I18n.t("enable"),checked:n,onChange:(0,xz.compose)([t,(0,xz.assocPath)("formPlacement.fixedBar.enabled",xz.__,e)])}),n&&C().createElement(C().Fragment,null,C().createElement("hr",null),C().createElement(dF,{label:KB.Z.I18n.t("formPlacementPlacementPosition"),selected:e.formPlacement.fixedBar.position,options:[{label:KB.Z.I18n.t("formPlacementPlacementPositionTop"),value:"top"},{label:KB.Z.I18n.t("formPlacementPlacementPositionBottom"),value:"bottom"}],onChange:(0,xz.compose)([t,(0,xz.assocPath)("formPlacement.fixedBar.position",xz.__,e)])}),C().createElement(Sz,{label:KB.Z.I18n.t("formSettingsWidth"),value:e.formPlacement.fixedBar.styles.width,minPixels:200,maxPixels:1200,minPercents:10,maxPercents:100,defaultPixelValue:560,defaultPercentValue:100,onChange:n=>t((0,xz.assocPath)("formPlacement.fixedBar.styles.width",n,e))}),C().createElement(Tz,{settingsPlacementKey:"fixedBar"}),C().createElement(Rz,{settingsPlacementKey:"fixedBar"}),C().createElement(u_,{label:KB.Z.I18n.t("formPlacementDelay"),value:e.formPlacement.fixedBar.delay,onChange:(0,xz.compose)([t,(0,xz.assocPath)("formPlacement.fixedBar.delay",xz.__,e)]),options:Bz.map((e=>({value:e,label:KB.Z.I18n.t("formPlacementDelaySeconds").replace("%1s",e)})))})))};const zz=[0,2,5,10,15,30,45,60,120,180,240];var Hz=()=>{const e=(0,er.Z)((e=>e("mailpoet-form-editor").getFormSettings()),[]),{changeFormSettings:t}=(0,tr.Z)("mailpoet-form-editor"),n=e.formPlacement.slideIn.enabled;return C().createElement(C().Fragment,null,C().createElement("p",null,KB.Z.I18n.t("placeSlideInFormOnPagesDescription")),C().createElement(JT,{label:KB.Z.I18n.t("enable"),checked:n,onChange:(0,xz.compose)([t,(0,xz.assocPath)("formPlacement.slideIn.enabled",xz.__,e)])}),n&&C().createElement(C().Fragment,null,C().createElement("hr",null),C().createElement(dF,{label:KB.Z.I18n.t("formPlacementPlacementPosition"),selected:e.formPlacement.slideIn.position,options:[{label:KB.Z.I18n.t("formPlacementPlacementPositionLeft"),value:"left"},{label:KB.Z.I18n.t("formPlacementPlacementPositionRight"),value:"right"}],onChange:(0,xz.compose)([t,(0,xz.assocPath)("formPlacement.slideIn.position",xz.__,e)])}),C().createElement(Sz,{label:KB.Z.I18n.t("formSettingsWidth"),value:e.formPlacement.slideIn.styles.width,minPixels:200,maxPixels:1200,minPercents:10,maxPercents:100,defaultPixelValue:560,defaultPercentValue:100,onChange:n=>t((0,xz.assocPath)("formPlacement.slideIn.styles.width",n,e))}),C().createElement(Tz,{settingsPlacementKey:"slideIn"}),C().createElement(Rz,{settingsPlacementKey:"slideIn"}),C().createElement(u_,{label:KB.Z.I18n.t("formPlacementDelay"),value:e.formPlacement.slideIn.delay,onChange:(0,xz.compose)([t,(0,xz.assocPath)("formPlacement.slideIn.delay",xz.__,e)]),options:zz.map((e=>({value:e,label:KB.Z.I18n.t("formPlacementDelaySeconds").replace("%1s",e)})))})))};const Vz=({activePanel:e})=>C().createElement("div",{className:"mailpoet-styles-settings"},"others"===e&&C().createElement(Mz,null),"below_post"===e&&C().createElement(Nz,null),"fixed_bar"===e&&C().createElement(Fz,null),"popup"===e&&C().createElement(Pz,null),"slide_in"===e&&C().createElement(Hz,null));Vz.propTypes={activePanel:Bx().string.isRequired};var Wz=Vz,Zz=({onClose:e})=>{const t=(0,er.Z)((e=>e("mailpoet-form-editor").getPreviewSettings()),[]);return C().createElement(C().Fragment,null,C().createElement(_z,{closeSidebar:e},C().createElement("h3",{className:"mailpoet-sidebar-header-heading"},"others"===t.formType&&KB.Z.I18n.t("placeFormOthers"),"below_post"===t.formType&&KB.Z.I18n.t("placeFormBellowPages"),"fixed_bar"===t.formType&&KB.Z.I18n.t("placeFixedBarFormOnPages"),"popup"===t.formType&&KB.Z.I18n.t("placePopupFormOnPages"),"slide_in"===t.formType&&KB.Z.I18n.t("placeSlideInFormOnPages"))),C().createElement(uF,null,C().createElement(Jk,null,C().createElement(Wz,{activePanel:t.formType}))))},jz=()=>{const{toggleSidebar:e,changeActiveSidebar:t}=(0,tr.Z)("mailpoet-form-editor"),n=(0,er.Z)((e=>e("mailpoet-form-editor").getActiveSidebar()),[]),r=(0,er.Z)((e=>e("core/block-editor").getSelectedBlockClientId()),[]);return(0,_.useEffect)((()=>{r&&t("default")}),[r,t]),C().createElement("div",{className:"edit-post-sidebar interface-complementary-area mailpoet_form_editor_sidebar"},"default"===n&&C().createElement(Cz,{onClose:()=>e(!1)}),"placement_settings"===n&&C().createElement(Zz,{onClose:()=>{t("default")}}))};const Uz=({setIsInserterOpened:e})=>{var t,n;const r=(0,er.Z)((e=>e("mailpoet-form-editor").getInserterPanelInsertPoint()),[]);return C().createElement("div",{className:"edit-post-editor__inserter-panel"},C().createElement("div",{className:"edit-post-editor__inserter-panel-header"},C().createElement(Gi,{icon:Eo,onClick:()=>e(!1)})),C().createElement("div",{className:"edit-post-editor__inserter-panel-content"},C().createElement(pB,{showMostUsedBlocks:!0,showInserterHelpPanel:!1,rootClientId:null!==(t=r.rootClientId)&&void 0!==t?t:void 0,__experimentalInsertionIndex:null!==(n=r.insertionIndex)&&void 0!==n?n:void 0})))};Uz.propTypes={setIsInserterOpened:Bx().func.isRequired};var $z=Uz,qz=function({notices:e,onRemove:t=Ce.noop,className:n,children:r}){return n=Cr()("components-notice-list",n),(0,_.createElement)("div",{className:n},r,[...e].reverse().map((e=>{return(0,_.createElement)(YC,(0,nr.Z)({},(0,Ce.omit)(e,["content"]),{key:e.id,onRemove:(n=e.id,()=>t(n))}),e.content);var n})))},Gz=()=>{const e=(0,er.Z)((e=>e("mailpoet-form-editor").getDismissibleNotices()),[]),t=(0,er.Z)((e=>e("mailpoet-form-editor").getNonDismissibleNotices()),[]),{removeNotice:n}=(0,tr.Z)("mailpoet-form-editor"),r=(0,Ce.memoize)((e=>{setTimeout((()=>n(e)),5e3)}));return e.forEach((e=>r(e.id))),C().createElement(C().Fragment,null,C().createElement(qz,{notices:t,className:"components-editor-notices__pinned"}),C().createElement(qz,{notices:e,className:"components-editor-notices__dismissible automation-dismissible-notices",onRemove:n}))},Kz=function(){const e=(0,er.Z)((e=>e("mailpoet-form-editor").hasUnsavedChanges()),[]);function t(t){return e?(t.returnValue=KB.Z.I18n.t("changesNotSaved"),t.returnValue):""}return(0,_.useEffect)((()=>(window.addEventListener("beforeunload",t),()=>window.removeEventListener("beforeunload",t)))),C().createElement(C().Fragment,null)},Yz=n(70057),Xz=()=>{const e=document.getElementById("mailpoet-form-editor-form-styles"),t=(0,er.Z)((e=>e("mailpoet-form-editor").getFormStyles()),[]);try{Yz.parse(t)}catch(t){return S().createPortal(null,e)}const n=GB([{css:t}],".editor-styles-wrapper");return S().createPortal(n[0],e)},Jz=()=>C().createElement("svg",{xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",width:"16px",height:"24px",viewBox:"0 0 16 24",version:"1.1"},C().createElement("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},C().createElement("g",{className:"mailpoet_preview_icon_fill",transform:"translate(-760.000000, -64.000000)",fillRule:"nonzero"},C().createElement("g",{transform:"translate(712.000000, 64.000000)"},C().createElement("g",{transform:"translate(48.000000, 0.000000)"},C().createElement("path",{d:"M16,3 C16,1.34314575 14.6568542,0 13,0 L3,0 C1.34314575,0 0,1.34314575 0,3 L0,21 C0,22.6568542 1.34314575,24 3,24 L13,24 C14.6568542,24 16,22.6568542 16,21 L16,3 Z M14,5.5 L14,17.5 C14,18.0522847 13.5522847,18.5 13,18.5 L3,18.5 C2.44771525,18.5 2,18.0522847 2,17.5 L2,5.5 C2,4.94771525 2.44771525,4.5 3,4.5 L13,4.5 C13.5522847,4.5 14,4.94771525 14,5.5 Z M7,21 C7,20.4477153 7.44771525,20 8,20 C8.55228475,20 9,20.4477153 9,21 C9,21.5522847 8.55228475,22 8,22 C7.44771525,22 7,21.5522847 7,21 Z",id:"Shape"})))))),Qz=()=>C().createElement("svg",{xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",width:"24px",height:"24px",viewBox:"0 0 24 24",version:"1.1"},C().createElement("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},C().createElement("g",{className:"mailpoet_preview_icon_fill",transform:"translate(-712.000000, -64.000000)",fillRule:"nonzero"},C().createElement("g",{transform:"translate(712.000000, 64.000000)"},C().createElement("g",null,C().createElement("path",{d:"M13.965,20.5 C14.1138804,20.5 14.2550143,20.5663566 14.35,20.681 L14.35,20.681 L16.449,23.213 C16.5561084,23.3657981 16.5692196,23.5655248 16.4830056,23.7310137 C16.3967915,23.8965027 16.2255996,24.0002137 16.039,24 L16.039,24 L7.96,24 C7.7734004,24.0002137 7.60220849,23.8965027 7.51599443,23.7310137 C7.42978036,23.5655248 7.44289164,23.3657981 7.55,23.213 L7.55,23.213 L9.65,20.681 C9.74498572,20.5663566 9.88611956,20.5 10.035,20.5 L10.035,20.5 Z M22.5,-4.08562073e-14 C23.3284271,-4.08562073e-14 24,0.671572875 24,1.5 L24,1.5 L24,17.5 C24,18.3284271 23.3284271,19 22.5,19 L22.5,19 L1.5,19 C0.671572875,19 0,18.3284271 0,17.5 L0,17.5 L0,1.5 C0,0.671572875 0.671572875,-4.08562073e-14 1.5,-4.08562073e-14 L1.5,-4.08562073e-14 Z M21.5,2 L2.5,2 C2.22385763,2 2,2.22385763 2,2.5 L2,2.5 L2,14.5 C2,14.7761424 2.22385763,15 2.5,15 L2.5,15 L21.5,15 C21.7761424,15 22,14.7761424 22,14.5 L22,14.5 L22,2.5 C22,2.22385763 21.7761424,2 21.5,2 L21.5,2 Z"}))))));function eH({children:e,onDisplayTypeChange:t,selectedDisplayType:n}){const[r,o]=(0,_.useState)(n),i=e=>{o(e),t(e)};return C().createElement("div",{className:"mailpoet_browser_preview"},C().createElement("div",{className:"mailpoet_browser_preview_toggle"},C().createElement("a",{className:Cr()("mailpoet_browser_preview_icon",{mailpoet_active:"desktop"===r}),onClick:e=>{e.preventDefault(),i("desktop")},title:KB.Z.I18n.t("formPreviewDesktop"),href:"#","data-automation-id":"preview_type_desktop"},C().createElement(Qz,null)),C().createElement("a",{className:Cr()("mailpoet_browser_preview_icon",{mailpoet_active:"mobile"===r}),onClick:e=>{e.preventDefault(),i("mobile")},title:KB.Z.I18n.t("formPreviewMobile"),href:"#","data-automation-id":"preview_type_mobile"},C().createElement(Jz,null))),C().createElement("div",{className:Cr()("mailpoet_browser_preview_container",{mailpoet_browser_preview_container_mobile:"desktop"!==r},{mailpoet_browser_preview_container_desktop:"desktop"===r})},C().createElement("div",{className:"mailpoet_browser_preview_border"},e)),"desktop"!==r&&C().createElement("p",{className:"mailpoet_form_preview_disclaimer"},KB.Z.I18n.t("formPreviewMobileDisclaimer")))}eH.propTypes={children:Bx().node.isRequired,onDisplayTypeChange:Bx().func,selectedDisplayType:Bx().string},eH.defaultProps={onDisplayTypeChange:()=>{},selectedDisplayType:"desktop"};var tH=eH,nH=()=>{const e=(0,_.useRef)(null),[t,n]=(0,_.useState)(!1),{hidePreview:r,changePreviewSettings:o}=(0,tr.Z)("mailpoet-form-editor"),i=(0,er.Z)((e=>e("mailpoet-form-editor").getIsPreviewShown()),[]),a=(0,er.Z)((e=>e("mailpoet-form-editor").getIsPreviewReady()),[]),l=(0,er.Z)((e=>e("mailpoet-form-editor").getPreviewSettings()),[]),s=(0,er.Z)((e=>e("mailpoet-form-editor").getFormSettings()),[]),c=(0,er.Z)((e=>e("mailpoet-form-editor").getFormData().id),[]),u=(0,er.Z)((e=>e("mailpoet-form-editor").getEditorUrl()),[]),d=(0,er.Z)((e=>e("mailpoet-form-editor").getPreviewPageUrl()),[]);(0,_.useEffect)((()=>{n(!1);const e=document.getElementById("beacon-container");i&&e&&(e.style.display="none")}),[i]),(0,_.useEffect)((()=>{if(!e.current||!t)return;const n={formType:l.formType,formSettings:s};e.current.contentWindow.postMessage(n,d)}),[s,e,l,t,d]);const p=(0,_.useCallback)((()=>{const e=document.getElementById("beacon-container");e&&(e.style.display="block"),r()}),[r]),m=(0,_.useCallback)((e=>{n(!1),o({...l,formType:e})}),[o,l]),f=(0,_.useCallback)((e=>{o({...l,displayType:e})}),[o,l]);if(!i)return null;const h={id:c,form_type:l.formType,editor_url:u};let g=`${d}&data=${btoa(JSON.stringify(h))}`;return["below_post"].includes(l.formType)&&(g+=`#mailpoet_form_preview_${c}`),C().createElement(aF.Z,{onRequestClose:p,fullScreen:!0,contentClassName:"mailpoet_form_preview_modal",overlayClassName:"mailpoet_form_preview_modal_overlay"},!a&&C().createElement("div",{className:"mailpoet_spinner_wrapper"},C().createElement(ED,null)),a&&C().createElement("div",{className:"mailpoet_preview_content_wrapper"},C().createElement("div",{className:"mailpoet_preview_sidebar"},C().createElement(u_,{label:KB.Z.I18n.t("formPlacementLabel"),value:l.formType,onChange:m,className:"mailpoet_preview_form_type_selection","data-automation-id":"form_type_selection",options:[{value:"others",label:KB.Z.I18n.t("placeFormOthers")},{value:"below_post",label:KB.Z.I18n.t("placeFormBellowPages")},{value:"fixed_bar",label:KB.Z.I18n.t("placeFixedBarFormOnPages")},{value:"popup",label:KB.Z.I18n.t("placePopupFormOnPages")},{value:"slide_in",label:KB.Z.I18n.t("placeSlideInFormOnPages")}]}),C().createElement(Wz,{activePanel:l.formType})),C().createElement(tH,{onDisplayTypeChange:f,selectedDisplayType:l.displayType},!t&&C().createElement("div",{className:"mailpoet_spinner_wrapper"},C().createElement(ED,null)),C().createElement("iframe",{ref:e,className:"mailpoet_form_preview_iframe",src:g,title:KB.Z.I18n.t("formPreview"),onLoad:()=>n(!0),"data-automation-id":"form_preview_iframe",scrolling:"others"===l.formType?"no":"yes"}),"others"===l.formType&&"desktop"===l.displayType&&C().createElement("div",{className:"mailpoet_form_preview_disclaimer"},KB.Z.I18n.t("formPreviewOthersDisclaimer")))))};const rH=({children:e})=>{const{fontColor:t,backgroundColor:n,gradient:r,fontSize:o,borderRadius:i,borderSize:a,borderColor:l,alignment:s,formPadding:c,backgroundImageUrl:u,backgroundImageDisplay:d,fontFamily:p}=(0,er.Z)((e=>e("mailpoet-form-editor").getFormSettings()),[]),m=(0,er.Z)((e=>e("mailpoet-form-editor").getPreviewSettings()),[]),f=(0,er.Z)((e=>e("mailpoet-form-editor").getFormWidth(m.formType)),[m.formType]);let h;a&&l&&(h="solid");let g,v,b,y="";o&&(y=Number(o)),i&&(g=Number(i)),c&&(v=Number(c)),s&&(b=s);const w=[],k={color:t,fontSize:y,fontFamily:p,lineHeight:1.2,borderRadius:g,borderWidth:a,borderColor:l,borderStyle:h,textAlign:b,padding:v,width:"pixel"===f.unit?f.value:`${f.value}%`,margin:"0 auto",maxWidth:"100%"};if(["others","below_post"].includes(m.formType)&&"percent"===f.unit&&(k.maxWidth=600),void 0!==u&&u){let e="center",t="no-repeat",n="cover";"fit"===d&&(n="auto",e="center top"),"tile"===d&&(t="repeat",n="auto"),w.push(`url(${u}) ${e}/${n} ${t}`)}if(r&&w.push(r),n&&w.push(n),w.length&&(k.background=w.join(", ")),"fixed_bar"===m.formType){const t={width:k.width,margin:"0 auto"};return k.width="max-content",k.minWidth="100%",k.maxWidth="auto",C().createElement("div",{className:"mailpoet-form-background",style:k},C().createElement("div",{style:t},e))}return C().createElement("div",{className:"mailpoet-form-background",style:k},e)};rH.propTypes={children:Bx().node.isRequired};var oH=rH,iH=()=>{const e=(0,er.Z)((e=>e("mailpoet-form-editor").isFullscreenEnabled()),[]);return(0,_.useEffect)((()=>{e?document.body.classList.add("is-fullscreen-mode"):document.body.classList.remove("is-fullscreen-mode")}),[e]),null},aH=()=>{const e=(0,er.Z)((e=>e("mailpoet-form-editor").getSidebarOpened()),[]),t=(0,er.Z)((e=>e("mailpoet-form-editor").isInserterOpened()),[]),n=(0,er.Z)((e=>e("mailpoet-form-editor").getFormBlocks()),[]),r=(0,er.Z)((e=>e("core").canUser("create","media")),[]),o=(0,er.Z)((e=>e("core/block-editor").getSelectedBlock()),[]),i=Cr()("edit-post-layout interface-interface-skeleton",o?o.name.replace("/","-"):null,{"is-sidebar-opened":e}),{blocksChangedInBlockEditor:a,toggleInserter:l}=(0,tr.Z)("mailpoet-form-editor"),s={mediaUpload:r?wa:null,maxWidth:580,enableCustomSpacing:!0,enableCustomLineHeight:!0,disableCustomFontSizes:!1,enableCustomUnits:!0,disableCustomGradients:!1,disableCustomColors:!1,__experimentalFetchLinkSuggestions:YB,__experimentalBlockPatterns:[],__experimentalBlockPatternCategories:[],__experimentalSetIsInserterOpened:l};return C().createElement(C().Fragment,null,C().createElement(XF,null),C().createElement(kr,null,C().createElement("div",{className:i},C().createElement("div",{className:"interface-interface-skeleton__editor"},C().createElement("div",{className:"interface-interface-skeleton__header"},C().createElement(iF,{isInserterOpened:t,setIsInserterOpened:l})),C().createElement("div",{className:"interface-interface-skeleton__body"},C().createElement(YN,{value:n,onInput:a,onChange:a,settings:s,useSubRegistry:!1},t&&C().createElement("div",{className:"interface-interface-skeleton__secondary-sidebar"},C().createElement($z,{setIsInserterOpened:l})),C().createElement("div",{className:"interface-interface-skeleton__content"},C().createElement(dB,null),C().createElement(Gz,null),C().createElement(Kz,null),C().createElement(YP,{className:"edit-post-visual-editor editor-styles-wrapper"},C().createElement(fB,null),C().createElement(fB.Register,null),C().createElement("div",{className:"mailpoet_form"},C().createElement(AB,null,C().createElement(vB,null,C().createElement(oH,null,C().createElement(QP,null))))))),e&&C().createElement("div",{className:"interface-interface-skeleton__sidebar"},C().createElement(jz,null)))),C().createElement(Xz,null),C().createElement(iH,null)),C().createElement(ia.Slot,null))),C().createElement(nH,null),C().createElement(sF,null))};const lH=e=>{const t={full_width:e.fullWidth?"1":"0"};return e.inheritFromTheme||(t.bold=e.bold?"1":"0",(0,Ce.has)(e,"backgroundColor")&&e.backgroundColor&&(t.background_color=e.backgroundColor),(0,Ce.has)(e,"gradient")&&e.gradient&&(t.gradient=e.gradient),(0,Ce.has)(e,"fontSize")&&void 0!==e.fontSize&&(t.font_size=e.fontSize),(0,Ce.has)(e,"fontColor")&&e.fontColor&&(t.font_color=e.fontColor),(0,Ce.has)(e,"borderSize")&&void 0!==e.borderSize&&(t.border_size=e.borderSize),(0,Ce.has)(e,"borderRadius")&&void 0!==e.borderRadius&&(t.border_radius=e.borderRadius),(0,Ce.has)(e,"borderColor")&&e.borderColor&&(t.border_color=e.borderColor),(0,Ce.has)(e,"padding")&&void 0!==e.padding&&(t.padding=e.padding),(0,Ce.has)(e,"fontFamily")&&e.fontFamily&&(t.font_family=e.fontFamily)),t},sH=(e,t,n=null)=>{const r=e.find((e=>e.slug===t));return r?r.color:n},cH=(e,t,n=null)=>{const r=e.find((e=>e.slug===t));return r?r.gradient:n},uH=(e,t,n=null)=>{const r=e.find((e=>e.slug===t));return r?r.size:n};var dH=(e,t,n,r)=>{if(!Array.isArray(r))throw new Error("Mapper expects customFields to be an array.");const o=i=>{if(!Array.isArray(i))throw new Error("Mapper expects blocks to be an array.");return i.map((i=>{var a,l,s,c,u,d,p,m,f,h,g,v,b,y,w,k,E,_,C,x,S,I,T,N,A,R,L,P,O,D;const M={type:"text",params:{label:i.attributes.label,class_name:i.attributes.className||null}};switch(i.attributes.mandatory&&(M.params.required="1"),i.attributes.labelWithinInput&&(M.params.label_within="1"),i.name){case"core/heading":return{type:"heading",id:"heading",params:{content:i.attributes.content,level:i.attributes.level,align:i.attributes.textAlign||"left",font_size:uH(e,i.attributes.fontSize,null===(a=i.attributes.style)||void 0===a||null===(l=a.typography)||void 0===l?void 0:l.fontSize),text_color:sH(t,i.attributes.textColor,null===(s=i.attributes.style)||void 0===s||null===(c=s.color)||void 0===c?void 0:c.text),line_height:null===(u=i.attributes.style)||void 0===u||null===(d=u.typography)||void 0===d?void 0:d.lineHeight,background_color:sH(t,i.attributes.backgroundColor,null===(p=i.attributes.style)||void 0===p||null===(m=p.color)||void 0===m?void 0:m.background),anchor:i.attributes.anchor||null,class_name:i.attributes.className||null}};case"core/paragraph":return{type:"paragraph",id:"paragraph",params:{content:i.attributes.content,drop_cap:i.attributes.dropCap?"1":"0",align:i.attributes.align||"left",font_size:uH(e,i.attributes.fontSize,null===(f=i.attributes.style)||void 0===f||null===(h=f.typography)||void 0===h?void 0:h.fontSize),line_height:null===(g=i.attributes.style)||void 0===g||null===(v=g.typography)||void 0===v?void 0:v.lineHeight,text_color:sH(t,i.attributes.textColor,null===(b=i.attributes.style)||void 0===b||null===(y=b.color)||void 0===y?void 0:y.text),background_color:sH(t,i.attributes.backgroundColor,null===(w=i.attributes.style)||void 0===w||null===(k=w.color)||void 0===k?void 0:k.background),class_name:i.attributes.className||null}};case"core/image":return{type:"image",id:"image",params:{class_name:i.attributes.className||null,align:i.attributes.align||null,url:i.attributes.url||null,alt:i.attributes.alt||null,title:i.attributes.title||null,caption:i.attributes.caption||null,link_destination:i.attributes.linkDestination||null,link:i.attributes.link||null,href:i.attributes.href||null,link_class:i.attributes.linkClass||null,rel:i.attributes.rel||null,link_target:i.attributes.linkTarget||null,id:i.attributes.id||null,size_slug:i.attributes.sizeSlug||null,width:i.attributes.width||null,height:i.attributes.height||null}};case"core/column":return{type:"column",body:o(i.innerBlocks),params:{class_name:i.attributes.className||null,vertical_alignment:i.attributes.verticalAlignment||null,width:i.attributes.width||null,padding:(null===(E=i.attributes.style)||void 0===E||null===(_=E.spacing)||void 0===_?void 0:_.padding)||null,text_color:sH(t,i.attributes.textColor,null===(C=i.attributes.style)||void 0===C||null===(x=C.color)||void 0===x?void 0:x.text),background_color:sH(t,i.attributes.backgroundColor,null===(S=i.attributes.style)||void 0===S||null===(I=S.color)||void 0===I?void 0:I.background),gradient:cH(n,i.attributes.gradient,null===(T=i.attributes.style)||void 0===T||null===(N=T.color)||void 0===N?void 0:N.gradient)}};case"core/columns":return{type:"columns",body:o(i.innerBlocks),params:{vertical_alignment:i.attributes.verticalAlignment||null,is_stacked_on_mobile:i.attributes.isStackedOnMobile||void 0===i.attributes.isStackedOnMobile?"1":"0",class_name:i.attributes.className||null,text_color:sH(t,i.attributes.textColor,null===(A=i.attributes.style)||void 0===A||null===(R=A.color)||void 0===R?void 0:R.text),background_color:sH(t,i.attributes.backgroundColor,null===(L=i.attributes.style)||void 0===L||null===(P=L.color)||void 0===P?void 0:P.background),gradient:cH(n,i.attributes.gradient,null===(O=i.attributes.style)||void 0===O||null===(D=O.color)||void 0===D?void 0:D.gradient)}};case"mailpoet-form/email-input":return{...M,id:"email",name:"Email",params:{...M.params,required:"1"},styles:lH(i.attributes.styles)};case"mailpoet-form/first-name-input":return{...M,id:"first_name",name:"First name",styles:lH(i.attributes.styles)};case"mailpoet-form/last-name-input":return{...M,id:"last_name",name:"Last name",styles:lH(i.attributes.styles)};case"mailpoet-form/segment-select":return{...M,id:"segments",type:"segment",name:"List selection",params:{...M.params,values:i.attributes.values.map((e=>({id:e.id,is_checked:e.isChecked?"1":void 0})))}};case"mailpoet-form/submit-button":return{...M,id:"submit",type:"submit",name:"Submit",styles:lH(i.attributes.styles)};case"mailpoet-form/divider":return{...M,id:"divider",type:"divider",name:"Divider",params:{class_name:i.attributes.className||null,height:i.attributes.height,type:i.attributes.type,style:i.attributes.style,divider_height:i.attributes.dividerHeight,divider_width:i.attributes.dividerWidth,color:i.attributes.color}};case"mailpoet-form/html":return{...M,id:"html",type:"html",name:"Custom text or HTML",params:{text:i.attributes&&i.attributes.content?i.attributes.content:"",nl2br:i.attributes&&i.attributes.nl2br?"1":"0",class_name:i.attributes.className||null}};default:return i.name.startsWith("mailpoet-form/custom-")?((e,t,n)=>{const r=t.find((t=>t.id===e.attributes.customFieldId));if(!r)return null;const o={...n,id:e.attributes.customFieldId.toString(),name:r.name};return e.name.startsWith("mailpoet-form/custom-date")&&(o.type="date"),e.name.startsWith("mailpoet-form/custom-text")&&(o.type="text",o.styles=lH(e.attributes.styles)),e.name.startsWith("mailpoet-form/custom-textarea")&&(o.type="textarea",o.styles=lH(e.attributes.styles)),e.name.startsWith("mailpoet-form/custom-radio")&&(o.type="radio"),e.name.startsWith("mailpoet-form/custom-checkbox")&&(o.type="checkbox"),e.name.startsWith("mailpoet-form/custom-select")&&(o.type="select"),(0,Ce.has)(e.attributes,"validate")&&(o.params.validate=e.attributes.validate),(0,Ce.has)(e.attributes,"hideLabel")&&e.attributes.hideLabel&&(o.params.hide_label="1"),(0,Ce.has)(e.attributes,"defaultToday")&&e.attributes.defaultToday&&(o.params.is_default_today="1"),(0,Ce.has)(e.attributes,"dateType")&&(o.params.date_type=e.attributes.dateType),(0,Ce.has)(e.attributes,"lines")&&(o.params.lines=e.attributes.lines),(0,Ce.has)(e.attributes,"dateFormat")&&(o.params.date_format=e.attributes.dateFormat),(0,Ce.has)(e.attributes,"values")&&(o.params.values=e.attributes.values.map((e=>{const t={value:e.name};return(0,Ce.has)(e,"isChecked")&&e.isChecked&&(t.is_checked="1"),t}))),o})(i,r,M):null}})).filter(Boolean)};return o};function pH(e){var t,n,r,o,i,a,l,s,c,u,d,p,m,f,h,g,v,b,y,w,k,E,_,C,x,S,I,T,N,A,R,L,P,O,D,M,B,F,z,H,V,W,Z,j,U,$,q,G,K,Y,X,J,Q,ee,te,ne,re,oe,ie,ae,le,se,ce,ue,de,pe,me,fe,he,ge,ve,be,ye,we,ke,Ee,_e,Ce,xe,Se,Ie,Te,Ne,Ae,Re,Le,Pe,Oe,De,Me,Be,Fe,ze,He,Ve,We,Ze,je,Ue,$e,qe,Ge,Ke,Ye,Xe,Je,Qe,et;const tt={...e,settings:{...e.settings,form_placement:{popup:{enabled:!0===(null===(t=e.settings.formPlacement)||void 0===t||null===(n=t.popup)||void 0===n?void 0:n.enabled)?"1":"",exit_intent_enabled:null!==(r=e.settings.formPlacement)&&void 0!==r&&null!==(o=r.popup)&&void 0!==o&&o.exitIntentEnabled?"1":"",delay:null===(i=e.settings.formPlacement)||void 0===i||null===(a=i.popup)||void 0===a?void 0:a.delay,styles:null===(l=e.settings.formPlacement)||void 0===l||null===(s=l.popup)||void 0===s?void 0:s.styles,animation:null===(c=e.settings.formPlacement)||void 0===c||null===(u=c.popup)||void 0===u?void 0:u.animation,categories:null!==(d=null===(p=e.settings.formPlacement)||void 0===p||null===(m=p.popup)||void 0===m?void 0:m.categories)&&void 0!==d?d:[],tags:null!==(f=null===(h=e.settings.formPlacement)||void 0===h||null===(g=h.popup)||void 0===g?void 0:g.tags)&&void 0!==f?f:[],posts:{all:!0===(null===(v=e.settings.formPlacement)||void 0===v||null===(b=v.popup)||void 0===b||null===(y=b.posts)||void 0===y?void 0:y.all)?"1":"",selected:null===(w=e.settings.formPlacement)||void 0===w||null===(k=w.popup)||void 0===k||null===(E=k.posts)||void 0===E?void 0:E.selected},pages:{all:!0===(null===(_=e.settings.formPlacement)||void 0===_||null===(C=_.popup)||void 0===C||null===(x=C.pages)||void 0===x?void 0:x.all)?"1":"",selected:null===(S=e.settings.formPlacement)||void 0===S||null===(I=S.popup)||void 0===I||null===(T=I.pages)||void 0===T?void 0:T.selected}},fixed_bar:{enabled:!0===(null===(N=e.settings.formPlacement)||void 0===N||null===(A=N.fixedBar)||void 0===A?void 0:A.enabled)?"1":"",delay:null===(R=e.settings.formPlacement)||void 0===R||null===(L=R.fixedBar)||void 0===L?void 0:L.delay,styles:null===(P=e.settings.formPlacement)||void 0===P||null===(O=P.fixedBar)||void 0===O?void 0:O.styles,position:null===(D=e.settings.formPlacement)||void 0===D||null===(M=D.fixedBar)||void 0===M?void 0:M.position,animation:null===(B=e.settings.formPlacement)||void 0===B||null===(F=B.fixedBar)||void 0===F?void 0:F.animation,categories:null!==(z=null===(H=e.settings.formPlacement)||void 0===H||null===(V=H.fixedBar)||void 0===V?void 0:V.categories)&&void 0!==z?z:[],tags:null!==(W=null===(Z=e.settings.formPlacement)||void 0===Z||null===(j=Z.fixedBar)||void 0===j?void 0:j.tags)&&void 0!==W?W:[],posts:{all:!0===(null===(U=e.settings.formPlacement)||void 0===U||null===($=U.fixedBar)||void 0===$||null===(q=$.posts)||void 0===q?void 0:q.all)?"1":"",selected:null===(G=e.settings.formPlacement)||void 0===G||null===(K=G.fixedBar)||void 0===K||null===(Y=K.posts)||void 0===Y?void 0:Y.selected},pages:{all:!0===(null===(X=e.settings.formPlacement)||void 0===X||null===(J=X.fixedBar)||void 0===J||null===(Q=J.pages)||void 0===Q?void 0:Q.all)?"1":"",selected:null===(ee=e.settings.formPlacement)||void 0===ee||null===(te=ee.fixedBar)||void 0===te||null===(ne=te.pages)||void 0===ne?void 0:ne.selected}},below_posts:{enabled:!0===(null===(re=e.settings.formPlacement)||void 0===re||null===(oe=re.belowPosts)||void 0===oe?void 0:oe.enabled)?"1":"",styles:null===(ie=e.settings.formPlacement)||void 0===ie||null===(ae=ie.belowPosts)||void 0===ae?void 0:ae.styles,categories:null!==(le=null===(se=e.settings.formPlacement)||void 0===se||null===(ce=se.belowPosts)||void 0===ce?void 0:ce.categories)&&void 0!==le?le:[],tags:null!==(ue=null===(de=e.settings.formPlacement)||void 0===de||null===(pe=de.belowPosts)||void 0===pe?void 0:pe.tags)&&void 0!==ue?ue:[],posts:{all:!0===(null===(me=e.settings.formPlacement)||void 0===me||null===(fe=me.belowPosts)||void 0===fe||null===(he=fe.posts)||void 0===he?void 0:he.all)?"1":"",selected:null===(ge=e.settings.formPlacement)||void 0===ge||null===(ve=ge.belowPosts)||void 0===ve||null===(be=ve.posts)||void 0===be?void 0:be.selected},pages:{all:!0===(null===(ye=e.settings.formPlacement)||void 0===ye||null===(we=ye.belowPosts)||void 0===we||null===(ke=we.pages)||void 0===ke?void 0:ke.all)?"1":"",selected:null===(Ee=e.settings.formPlacement)||void 0===Ee||null===(_e=Ee.belowPosts)||void 0===_e||null===(Ce=_e.pages)||void 0===Ce?void 0:Ce.selected}},slide_in:{enabled:!0===(null===(xe=e.settings.formPlacement)||void 0===xe||null===(Se=xe.slideIn)||void 0===Se?void 0:Se.enabled)?"1":"",delay:null===(Ie=e.settings.formPlacement)||void 0===Ie||null===(Te=Ie.slideIn)||void 0===Te?void 0:Te.delay,position:null===(Ne=e.settings.formPlacement)||void 0===Ne||null===(Ae=Ne.slideIn)||void 0===Ae?void 0:Ae.position,animation:null===(Re=e.settings.formPlacement)||void 0===Re||null===(Le=Re.slideIn)||void 0===Le?void 0:Le.animation,styles:null===(Pe=e.settings.formPlacement)||void 0===Pe||null===(Oe=Pe.slideIn)||void 0===Oe?void 0:Oe.styles,categories:null!==(De=null===(Me=e.settings.formPlacement)||void 0===Me||null===(Be=Me.slideIn)||void 0===Be?void 0:Be.categories)&&void 0!==De?De:[],tags:null!==(Fe=null===(ze=e.settings.formPlacement)||void 0===ze||null===(He=ze.slideIn)||void 0===He?void 0:He.tags)&&void 0!==Fe?Fe:[],posts:{all:!0===(null===(Ve=e.settings.formPlacement)||void 0===Ve||null===(We=Ve.slideIn)||void 0===We||null===(Ze=We.posts)||void 0===Ze?void 0:Ze.all)?"1":"",selected:null===(je=e.settings.formPlacement)||void 0===je||null===(Ue=je.slideIn)||void 0===Ue||null===($e=Ue.posts)||void 0===$e?void 0:$e.selected},pages:{all:!0===(null===(qe=e.settings.formPlacement)||void 0===qe||null===(Ge=qe.slideIn)||void 0===Ge||null===(Ke=Ge.pages)||void 0===Ke?void 0:Ke.all)?"1":"",selected:null===(Ye=e.settings.formPlacement)||void 0===Ye||null===(Xe=Ye.slideIn)||void 0===Xe||null===(Je=Xe.pages)||void 0===Je?void 0:Je.selected}},others:{styles:null===(Qe=e.settings.formPlacement)||void 0===Qe||null===(et=Qe.others)||void 0===et?void 0:et.styles}},border_radius:e.settings.borderRadius,border_size:e.settings.borderSize,form_padding:e.settings.formPadding,input_padding:e.settings.inputPadding,border_color:e.settings.borderColor,font_family:e.settings.fontFamily,success_validation_color:e.settings.successValidationColor,error_validation_color:e.settings.errorValidationColor,background_image_url:e.settings.backgroundImageUrl,background_image_display:e.settings.backgroundImageDisplay,close_button:e.settings.closeButton}};return""===tt.settings.font_family&&delete tt.settings.font_family,delete tt.settings.formPlacement,delete tt.settings.successValidationColor,delete tt.settings.errorValidationColor,delete tt.settings.borderRadius,delete tt.settings.borderSize,delete tt.settings.formPadding,delete tt.settings.inputPadding,delete tt.settings.borderColor,delete tt.settings.backgroundImageUrl,delete tt.settings.backgroundImageDisplay,delete tt.settings.fontFamily,delete tt.settings.closeButton,tt}function mH(e){return{type:"TOGGLE_SIDEBAR",toggleTo:e}}function fH(e){return{type:"TOGGLE_INSERTER_SIDEBAR",value:e}}function hH(e){return e?{type:"ENABLE_FORM"}:{type:"DISABLE_FORM"}}function*gH(e){yield{type:"STORE_LOCALLY",key:"mailpoet_form_view_options",value:e},yield{type:"TOGGLE_FULLSCREEN",toggleTo:e}}function vH(e){return{type:"CHANGE_FORM_BLOCKS",blocks:e}}function bH(e){return{type:"CHANGE_FORM_NAME",name:e}}function yH(){return{type:"DELETE_CUSTOM_FIELD_STARTED"}}function wH(e,t){return{type:"DELETE_CUSTOM_FIELD_DONE",customFieldId:e,clientId:t}}function kH(e){return{type:"DELETE_CUSTOM_FIELD_FAILED",message:e}}function EH(e){return{type:"CHANGE_FORM_STYLES",styles:e}}function _H(){return{type:"CUSTOM_FIELD_EDITED"}}function CH(e,t){return{type:"SAVE_CUSTOM_FIELD_DONE",customFieldId:e,response:t}}function xH(){return{type:"SAVE_CUSTOM_FIELD_STARTED"}}function SH(e){return{type:"SAVE_CUSTOM_FIELD_FAILED",message:e}}function IH(e){return{type:"CREATE_CUSTOM_FIELD_DONE",response:e}}function TH(e){return{type:"CREATE_CUSTOM_FIELD_STARTED",customField:e}}function NH(e){return{type:"CREATE_CUSTOM_FIELD_FAILED",message:e}}function AH(e){return{type:"CHANGE_FORM_SETTINGS",settings:e}}function*RH(e){yield{type:"SAVE_FORM_DONE",formId:e},yield{type:"ENSURE_BROWSER_URL",formId:e}}function LH(){return{type:"SAVE_FORM_STARTED"}}function PH(e){return{type:"SAVE_FORM_FAILED",message:e}}function OH(e){return"placement_settings"===e&&(0,be.WI)("core/block-editor").clearSelectedBlock(),{type:"CHANGE_ACTIVE_SIDEBAR",sidebar:e}}function*DH(e){const t=(0,be.Ys)("mailpoet-form-editor").getFormData();yield{type:"STORE_LOCALLY",key:`mailpoet_form_preview_settings${t.id}`,value:e},yield{type:"CHANGE_PREVIEW_SETTINGS",settings:e}}function*MH(e){const t={...(0,be.Ys)("mailpoet-form-editor").getPreviewSettings(),formType:e};return yield*DH(t),OH("placement_settings")}function*BH(){yield{type:"SHOW_PREVIEW"},yield OH("default");const e=(0,be.Ys)("mailpoet-form-editor").getAllAvailableCustomFields(),t=(0,be.Ys)("mailpoet-form-editor").getFormData(),n=(0,be.Ys)("mailpoet-form-editor").getFormBlocks(),r=dH(Fp.fontSizes,Fp.colors,Fp.gradients,e),{success:o,error:i}=yield{type:"CALL_API",endpoint:"forms",action:"previewEditor",data:{...pH(t),body:r(n)}};return o?{type:"PREVIEW_DATA_SAVED"}:{type:"PREVIEW_DATA_NOT_SAVED",error:i}}function FH(){return{type:"HIDE_PREVIEW"}}function zH(e){return{type:"REMOVE_NOTICE",id:e}}function HH(e){return{type:"SWITCH_DEFAULT_SIDEBAR_TAB",id:e}}function VH(e,t){return{type:"TOGGLE_SIDEBAR_PANEL",id:e,toggleTo:t}}function*WH(){yield{type:"SAVE_FORM"}}function*ZH(e){yield{type:"SAVE_CUSTOM_FIELD",...e}}function*jH(e,t){yield{type:"CREATE_CUSTOM_FIELD",clientId:t,data:e}}function*UH(e,t){yield{type:"DELETE_CUSTOM_FIELD",customFieldId:e,clientId:t}}function*$H(e){yield{type:"BLOCKS_CHANGED_IN_BLOCK_EDITOR",blocks:e}}function*qH(e){yield{type:"APPLY_STYLES_TO_ALL_TEXT_INPUTS",styles:e}}function GH(){return{type:"HISTORY_UNDO"}}function KH(){return{type:"HISTORY_REDO"}}function*YH(){yield{type:"TUTORIAL_DISMISS"},yield{type:"TUTORIAL_DISMISSED"}}const XH=(e,t)=>e.reduce(((e,n)=>e||(n.name===t?n:Array.isArray(n.innerBlocks)&&n.innerBlocks.length?XH(n.innerBlocks,t):null)),null);var JH=XH,QH=(e,t)=>{if(!e||!e.settings||!Array.isArray(e.settings.segments))throw new Error("formData.settings.segments are expected to be an array.");if(!Array.isArray(t))throw new Error("formBlocks are expected to be an array.");const n=JH(t,"mailpoet-form/segment-select"),r=[];n&&0!==n.attributes.values.length||e.settings.segments&&0!==e.settings.segments.length||r.push("missing-lists"),n&&0===n.attributes.values.length&&r.push("missing-lists-in-custom-segments-block");const o=JH(t,"mailpoet-form/email-input"),i=JH(t,"mailpoet-form/submit-button");return o||r.push("missing-email-input"),i||r.push("missing-submit"),r};const eV=e=>{let t=e.editorHistory,n=e.editorHistoryOffset;const r=((e,t)=>{const n=e[e.length-1],r=Date.now();if(void 0!==n&&r-n.time<1e3&&e.length>1)return e.pop(),{blocks:t.formBlocks,data:t.formData,time:n.time};const o={blocks:t.formBlocks,data:t.formData,time:r};return void 0!==n&&(0,Ce.isEqual)(n.data,o.data)&&(0,Ce.isEqual)(n.blocks,o.blocks)?null:o})(t,e);if(null===r)return e;if(0!==e.editorHistoryOffset){const r=e.editorHistory.length-(e.editorHistoryOffset+1);n=0,t=t.slice(0,r)}return t.length>=100&&t.shift(),t.push(r),{...e,editorHistory:t,editorHistoryOffset:n}},tV=(e,t)=>{let n=e.editorHistoryOffset;0===n&&eV(e),n+=t;const r=e.editorHistory.length-(n+1);let o,i;if(void 0===e.editorHistory[r])return e;{const t=e.editorHistory[r];o=t.blocks,i=t.data}return{...e,editorHistoryOffset:n,formBlocks:o,formData:i}},nV=(rV=KB.Z,(e,t)=>{const n=e.notices.filter((e=>"custom-field"!==e.id)),r=(0,Ce.trim)(t.customField.name),o=e.customFields.find((e=>e.name===r));return o&&n.push({id:"custom-field",content:rV.I18n.t("customFieldWithNameExists").replace("[name]",r),isDismissible:!0,status:"error"}),{...e,isCustomFieldCreating:!o,notices:n}});var rV;const oV=(e=>t=>{const n=t.notices.filter((e=>!["missing-lists-in-custom-segments-block","save-form","missing-lists","missing-block"].includes(e.id))),r=t.formErrors.includes("missing-lists")||t.formErrors.includes("missing-lists-in-custom-segments-block"),o=[...t.sidebar.openedPanels];r&&(n.push({id:"missing-lists",content:e.I18n.t("settingsPleaseSelectList"),isDismissible:!0,status:"error"}),o.includes("basic-settings")||o.push("basic-settings"));const i=t.formErrors.includes("missing-email-input"),a=t.formErrors.includes("missing-submit");return(i||a)&&n.push({id:"missing-block",content:e.I18n.t("missingObligatoryBlock"),isDismissible:!0,status:"error"}),{...t,isFormSaving:!r,sidebar:{...t.sidebar,activeTab:r?"form":t.sidebar.activeTab,openedPanels:o},notices:n}})(KB.Z);var iV=e=>(t=e,n)=>((e,t)=>{switch(t.type){case"ENABLE_FORM":return(e=>({...e,formData:{...e.formData,hasUnsavedChanges:!0,status:"enabled"}}))(e);case"DISABLE_FORM":return(e=>({...e,formData:{...e.formData,hasUnsavedChanges:!0,status:"disabled"}}))(e);case"TOGGLE_FULLSCREEN":return((e,t)=>({...e,fullscreenStatus:t.toggleTo}))(e,t);case"CREATE_CUSTOM_FIELD_DONE":return((e,t)=>{const n=e.notices.filter((e=>"custom-field"!==e.id));n.push({id:"custom-field",content:KB.Z.I18n.t("customFieldSaved"),isDismissible:!0,status:"success"});const r=[...e.customFields];return r.push(t.response),{...e,isCustomFieldCreating:!1,notices:n,customFields:r}})(e,t);case"CREATE_CUSTOM_FIELD_FAILED":return((e,t)=>{const n=e.notices.filter((e=>"custom-field"!==e.id));return n.push({id:"custom-field",content:t.message,isDismissible:!0,status:"error"}),{...e,isCustomFieldCreating:!1,notices:n}})(e,t);case"CREATE_CUSTOM_FIELD_STARTED":return nV(e,t);case"CHANGE_FORM_BLOCKS":return((e,t)=>{const n={...e,formBlocks:t.blocks};return{...n,hasUnsavedChanges:!0,formErrors:QH(n.formData,n.formBlocks)}})(e,t);case"CHANGE_FORM_NAME":return((e,t)=>({...e,formData:{...e.formData,hasUnsavedChanges:!0,name:t.name}}))(e,t);case"CHANGE_FORM_SETTINGS":return((e,t)=>{const n={...e,formData:{...e.formData,settings:t.settings}};return{...n,hasUnsavedChanges:!0,formErrors:QH(n.formData,n.formBlocks)}})(e,t);case"CHANGE_FORM_STYLES":return((e,t)=>({...e,formData:{...e.formData,styles:t.styles,hasUnsavedChanges:!0}}))(e,t);case"CHANGE_PREVIEW_SETTINGS":return((e,{settings:t})=>({...e,previewSettings:t}))(e,t);case"CUSTOM_FIELD_EDITED":return(e=>({...e,hasUnsavedChanges:!0}))(e);case"REMOVE_NOTICE":return((e,t)=>({...e,notices:[...e.notices].filter((e=>e.id!==t.id))}))(e,t);case"SHOW_PREVIEW":return(e=>({...e,isPreviewShown:!0}))(e);case"HIDE_PREVIEW":return(e=>({...e,isPreviewShown:!1,isPreviewReady:!1}))(e);case"PREVIEW_DATA_NOT_SAVED":return(e=>({...e,isPreviewReady:!1}))(e);case"PREVIEW_DATA_SAVED":return(e=>({...e,isPreviewReady:!0}))(e);case"SAVE_FORM_DONE":return((e,t)=>{const n=e.notices.filter((e=>"save-form"!==e.id));return n.push({id:"save-form",content:`${KB.Z.I18n.t("formSaved")} ${KB.Z.I18n.t("formSavedAppendix")}`,isDismissible:!0,status:"success"}),{...e,formData:{...e.formData,id:parseInt(t.formId,10)},isFormSaving:!1,hasUnsavedChanges:!1,notices:n}})(e,t);case"SAVE_FORM_FAILED":return((e,t)=>{const n=e.notices.filter((e=>"save-form"!==e.id));return n.push({id:"save-form",content:t.message,isDismissible:!0,status:"error"}),{...e,isFormSaving:!1,notices:n}})(e,t);case"SAVE_FORM_STARTED":return oV(e);case"SAVE_CUSTOM_FIELD_DONE":return((e,t)=>{const n=e.notices.filter((e=>"custom-field"!==e.id));n.push({id:"custom-field",content:KB.Z.I18n.t("customFieldSaved"),isDismissible:!0,status:"success"});const r=e.customFields.map((e=>e.id===t.customFieldId?t.response:e));return{...e,isCustomFieldSaving:!1,notices:n,customFields:r}})(e,t);case"SAVE_CUSTOM_FIELD_FAILED":return((e,t)=>{const n=e.notices.filter((e=>"custom-field"!==e.id));return n.push({id:"custom-field",content:t.message,isDismissible:!0,status:"error"}),{...e,isCustomFieldSaving:!1,notices:n}})(e,t);case"SAVE_CUSTOM_FIELD_STARTED":return(e=>{const t=e.notices.filter((e=>"custom-field"!==e.id));return{...e,isCustomFieldSaving:!0,notices:t}})(e);case"SWITCH_DEFAULT_SIDEBAR_TAB":return((e,t)=>({...e,sidebar:{...e.sidebar,activeTab:t.id}}))(e,t);case"TOGGLE_SIDEBAR":return((e,t)=>({...e,sidebarOpened:t.toggleTo}))(e,t);case"TOGGLE_INSERTER_SIDEBAR":return((e,t)=>{let n;return n=t.value?!0===t.value?{rootClientId:void 0,insertionIndex:void 0}:t.value:null,{...e,inserterPanel:n}})(e,t);case"TOGGLE_SIDEBAR_PANEL":return((e,t)=>{let n;!0===t.toggleTo&&(n="opened"),!1===t.toggleTo&&(n="closed");const r=[...e.sidebar.openedPanels],o=((e,t,n)=>{const r=e.includes(t);let o=n;return void 0===o&&(o=r?"closed":"opened"),r&&"closed"===o?"close":r||"opened"!==o?null:"open"})(r,t.id,n);return"open"===o?r.push(t.id):"close"===o&&(0,Ce.remove)(r,(e=>e===t.id)),{...e,sidebar:{...e.sidebar,openedPanels:r}}})(e,t);case"DELETE_CUSTOM_FIELD_STARTED":return(e=>{const t=e.notices.filter((e=>"custom-field"!==e.id));return{...e,...t,isCustomFieldDeleting:!0}})(e);case"DELETE_CUSTOM_FIELD_DONE":return((e,t)=>{const n=e.customFields.filter((e=>e.id!==t.customFieldId)),r=e.formBlocks.filter((e=>e.clientId!==t.clientId));return{...e,formBlocks:r,isCustomFieldDeleting:!1,customFields:n}})(e,t);case"DELETE_CUSTOM_FIELD_FAILED":return((e,t)=>{const n=e.notices.filter((e=>"custom-field"!==e.id));return n.push({id:"custom-field",content:t.message,isDismissible:!0,status:"error"}),{...e,isCustomFieldSaving:!1,notices:n}})(e,t);case"CHANGE_ACTIVE_SIDEBAR":return((e,t)=>({...e,sidebar:{...e.sidebar,activeSidebar:t.sidebar}}))(e,t);case"HISTORY_UNDO":return(e=>tV(e,1))(e);case"HISTORY_REDO":return(e=>tV(e,-1))(e);case"TUTORIAL_DISMISSED":return(e=>({...e,tutorialSeen:!0}))(e);default:return e}})(((e,t)=>"CHANGE_FORM_BLOCKS"===t.type||"CHANGE_FORM_NAME"===t.type||"CHANGE_FORM_SETTINGS"===t.type||"CHANGE_FORM_STYLES"===t.type?eV(e):e)(t,n),n);const aV=(e,t,n=[])=>e.reduce(((e,r)=>e.length?e:Array.isArray(r.innerBlocks)&&r.innerBlocks.length?(n.push(r),r.innerBlocks.find((e=>e.clientId===t))?n:aV(r.innerBlocks,t,n)):[]),[]);var lV={isFormSaved:e=>"number"==typeof e.formData.id,isFormEnabled:e=>"enabled"===e.formData.status,isFullscreenEnabled:e=>e.fullscreenStatus,isInserterOpened:e=>!!e.inserterPanel,getInserterPanelInsertPoint:e=>e.inserterPanel,getSidebarOpened:e=>e.sidebarOpened,getFormName:e=>e.formData.name,getFormData:e=>e.formData,getFormStyles:e=>e.formData.styles,getFormExports:e=>Object.fromEntries(Object.entries(e.formExports).map((([t,n])=>[t,n.replace(":form_id:",e.formData.id)]))),getFormSettings:e=>e.formData.settings,getAllAvailableSegments:e=>e.segments,getAllAvailableCustomFields:e=>e.customFields,getAllAvailablePages:e=>e.allWpPages.map((e=>({id:e.id,title:e.name}))),getIsFormSaving:e=>e.isFormSaving,getIsPreviewShown:e=>e.isPreviewShown,getIsPreviewReady:e=>e.isPreviewReady,getPreviewSettings(e){if(e.previewSettings)return e.previewSettings;const t={displayType:"desktop",formType:"others"},n=e.formData.settings;return n.formPlacement.belowPosts.enabled&&(t.formType="below_post"),n.formPlacement.popup.enabled&&(t.formType="popup"),n.formPlacement.fixedBar.enabled&&(t.formType="fixed_bar"),n.formPlacement.slideIn.enabled&&(t.formType="slide_in"),t},getFormWidth(e,t){const n=e.formData.settings;switch(t){case"below_post":return n.formPlacement.belowPosts.styles.width;case"popup":return n.formPlacement.popup.styles.width;case"slide_in":return n.formPlacement.slideIn.styles.width;case"fixed_bar":return n.formPlacement.fixedBar.styles.width;case"others":return n.formPlacement.others.styles.width;default:throw Error(`Invalid form display type ${t}`)}},getIsCustomFieldSaving:e=>e.isCustomFieldSaving,getIsCustomFieldDeleting:e=>e.isCustomFieldDeleting,getDismissibleNotices:e=>e.notices.filter((e=>!0===e.isDismissible)),getNonDismissibleNotices:e=>e.notices.filter((e=>!1===e.isDismissible)),getNotice:(e,t)=>e.notices.find((e=>e.id===t)),getFormErrors:e=>e.formErrors,getDefaultSidebarActiveTab:e=>e.sidebar.activeTab,getSidebarOpenedPanels:e=>e.sidebar.openedPanels,getFormBlocks:e=>e.formBlocks,getDateSettingsData:e=>e.dateSettingData,getIsCustomFieldCreating:e=>e.isCustomFieldCreating,hasUnsavedChanges:e=>e.hasUnsavedChanges,getEditorUrl:e=>e.editorUrl,getPreviewPageUrl:e=>e.previewPageUrl,getCloseIconsUrl:e=>e.closeIconsUrl,getAllCustomFonts:e=>e.customFonts,getActiveSidebar:e=>e.sidebar.activeSidebar,getAllWPPosts:e=>e.allWpPosts,getAllWPPages:e=>e.allWpPages,getAllWPCategories:e=>e.allWpCategories,getAllWPTags:e=>e.allWpTags,getAllWooCommerceProducts:e=>e.allWooCommerceProducts,getAllWooCommerceCategories:e=>e.allWooCommerceCategories,getAllWooCommerceTags:e=>e.allWooCommerceTags,getTutorialSeen:e=>e.tutorialSeen,getFormEditorUrl:e=>e.formEditorUrl,getTutorialUrl:e=>e.tutorialUrl,getClosestParentAttribute:(e,t,n)=>aV(e.formBlocks,t).reduce(((e,t)=>t.attributes&&void 0!==t.attributes[n]?t.attributes[n]:e),null),hasEditorUndo(e){let t=e.editorHistory.length;return e.editorHistory.length>1&&(t-=1),t>0&&t>e.editorHistoryOffset},hasEditorRedo:e=>e.editorHistoryOffset>0,isUserAdministrator:e=>e.user.isAdministrator},sV=n(36808),cV=n.n(sV),uV=n(25643),dV=n(31304),pV=n.n(dV),mV=function(e,t){return`${e}-${pV()(t.name,{lower:!0}).replace(/[^a-z0-9]+/g,"").replace(/-$/,"")}`},fV=C().createElement(ko,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},C().createElement(yo,{d:"M0,0h24v24H0V0z",fill:"none"}),C().createElement(yo,{d:"M20,4H4C2.9,4,2,4.9,2,6v12c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V6C22,4.9,21.1,4,20,4z M20,18H4V6h16V18z"}),C().createElement(wo,{x:"6",y:"10",width:"2",height:"2"}),C().createElement(wo,{x:"6",y:"14",width:"8",height:"2"}),C().createElement(wo,{x:"16",y:"14",width:"2",height:"2"}),C().createElement(wo,{x:"10",y:"10",width:"8",height:"2"})),hV=n(30381),gV=n.n(hV);const vV=({children:e,className:t})=>C().createElement("div",{className:Cr()("mailpoet_paragraph",t)},e);vV.propTypes={children:Bx().node.isRequired,className:Bx().string},vV.defaultProps={className:""};var bV=vV;const yV=({isBusy:e,onDelete:t})=>{const n=(0,_.useCallback)((()=>{window.confirm(KB.Z.I18n.t("customFieldDeleteConfirm"))&&t()}),[t]);return C().createElement(Gi,{isDestructive:!0,isLink:!0,isBusy:e,onClick:n,className:"button-on-top"},KB.Z.I18n.t("customFieldDeleteCTA"))};yV.propTypes={isBusy:Bx().bool,onDelete:Bx().func},yV.defaultProps={isBusy:!1,onDelete:()=>{}};var wV=yV;const kV=({label:e,mandatory:t,dateType:n,dateFormat:r,defaultToday:o,dateSettings:i,isSaving:a,onSave:l,isDeleting:s,onCustomFieldDelete:c,onChange:u})=>{const[d,p]=(0,_.useState)(e),[m,f]=(0,_.useState)(t),[h,g]=(0,_.useState)(o),[v,b]=(0,_.useState)(n),[y,w]=(0,_.useState)(r),k=(0,_.useMemo)((()=>({label:d,mandatory:m,dateType:v,dateFormat:y,defaultToday:h})),[d,m,v,y,h]),E=m!==t||h!==o||v!==n||y!==r||d!==e;return(0,_.useEffect)((()=>{u&&u(k,E)}),[k,u,E]),C().createElement("div",{className:"custom-field-settings"},C().createElement(Vk,{label:KB.Z.I18n.t("label"),value:d,"data-automation-id":"settings_custom_date_label_input",onChange:p}),C().createElement(JT,{label:KB.Z.I18n.t("blockMandatory"),checked:m,onChange:f}),C().createElement(JT,{label:KB.Z.I18n.t("customFieldDefaultToday"),checked:h,onChange:g}),C().createElement(u_,{label:KB.Z.I18n.t("customFieldDateType"),"data-automation-id":"settings_custom_date_type",value:v,onChange:e=>{b(e);const t=i.dateFormats[e];w(t[0])},options:i.dateTypes}),(()=>{const e=i.dateFormats[v];return Array.isArray(e)&&1===e.length?null:C().createElement(u_,{label:KB.Z.I18n.t("customFieldDateFormat"),"data-automation-id":"settings_custom_date_format",value:y,onChange:e=>w(e),options:e.map((e=>({value:e,label:e})))})})(),l?C().createElement(Gi,{isPrimary:!0,onClick:()=>l({mandatory:m,dateType:v,dateFormat:y,defaultToday:h,label:d}),isBusy:a,disabled:a||!E,className:"button-on-top","data-automation-id":"custom_field_save"},KB.Z.I18n.t("customFieldSaveCTA")):null,c?C().createElement(wV,{isBusy:a||s,onDelete:c}):null)};kV.propTypes={mandatory:Bx().bool,label:Bx().string,dateType:Bx().string,dateFormat:Bx().string,defaultToday:Bx().bool,onSave:Bx().func,isSaving:Bx().bool,dateSettings:Bx().shape({dateTypes:Bx().arrayOf(Bx().shape({label:Bx().string,value:Bx().string})),dateFormats:Bx().objectOf(Bx().arrayOf(Bx().string)),months:Bx().arrayOf(Bx().string)}).isRequired,isDeleting:Bx().bool,onCustomFieldDelete:Bx().func,onChange:Bx().func},kV.defaultProps={label:"",mandatory:!1,isSaving:!1,dateType:null,dateFormat:null,defaultToday:!1,isDeleting:!1,onCustomFieldDelete:null,onSave:null,onChange:null};var EV=kV;function _V(e){const t=[];void 0!==e.placeholder&&t.push(C().createElement("option",{value:"",key:0},e.placeholder));const n=gV()().year();for(let e=n;e>=n-100;e-=1)t.push(C().createElement("option",{key:e,value:e},e));return C().createElement("select",{name:`${e.name}[year]`,value:e.year,onChange:e.onValueChange,className:Cr()({mailpoet_date_year:e.addDefaultClasses})},t)}function CV(e){const t=[];void 0!==e.placeholder&&t.push(C().createElement("option",{value:"",key:0},e.placeholder));for(let n=1;n<=12;n+=1)t.push(C().createElement("option",{key:n,value:n},e.monthNames[n-1]));return C().createElement("select",{name:`${e.name}[month]`,value:e.month,onChange:e.onValueChange,className:Cr()({mailpoet_date_month:e.addDefaultClasses})},t)}function xV(e){const t=[];void 0!==e.placeholder&&t.push(C().createElement("option",{value:"",key:0},e.placeholder));for(let e=1;e<=31;e+=1)t.push(C().createElement("option",{key:e,value:e},e));return C().createElement("select",{name:`${e.name}[day]`,value:e.day,onChange:e.onValueChange,className:Cr()({mailpoet_date_day:e.addDefaultClasses})},t)}_V.propTypes={name:Bx().string.isRequired,placeholder:Bx().string.isRequired,onValueChange:Bx().func.isRequired,year:Bx().oneOfType([Bx().string,Bx().number]).isRequired,addDefaultClasses:Bx().bool.isRequired},CV.propTypes={name:Bx().string.isRequired,placeholder:Bx().string.isRequired,onValueChange:Bx().func.isRequired,month:Bx().oneOfType([Bx().string,Bx().number]).isRequired,monthNames:Bx().arrayOf(Bx().string).isRequired,addDefaultClasses:Bx().bool.isRequired},xV.propTypes={name:Bx().string.isRequired,placeholder:Bx().string.isRequired,onValueChange:Bx().func.isRequired,day:Bx().oneOfType([Bx().string,Bx().number]).isRequired,addDefaultClasses:Bx().bool.isRequired};class SV extends C().Component{constructor(e){super(e),this.state={year:"",month:"",day:""},this.onValueChange=this.onValueChange.bind(this)}componentDidMount(){this.extractDateParts()}componentDidUpdate(e){void 0!==this.props.item&&void 0!==e.item&&this.props.item.id!==e.item.id&&this.extractDateParts()}onValueChange(e){const t=e.target.name.match(/(.*?)\[(.*?)\]/);let n=null,r=null;if(null!==t&&3===t.length){[,n,r]=t;const o=Number(e.target.value);this.setState({[`${r}`]:o},(()=>{this.props.onValueChange({target:{name:n,value:this.formatValue()}})}))}}formatValue(){let e;switch(this.props.field.params.date_type){case"year_month_day":e={year:this.state.year,month:this.state.month,day:this.state.day};break;case"year_month":e={year:this.state.year,month:this.state.month};break;case"month":e={month:this.state.month};break;case"year":e={year:this.state.year};break;default:e={value:"invalid type"}}return e}extractDateParts(){const e=void 0!==this.props.item[this.props.field.name]?this.props.item[this.props.field.name].trim():"";if(""===e)return;const t=gV()(e);this.setState({year:t.format("YYYY"),month:t.format("M"),day:t.format("D")})}render(){const e=window.mailpoet_month_names||[];let t=(window.mailpoet_date_formats||{})[this.props.field.params.date_type][0];this.props.field.params.date_format&&(t=this.props.field.params.date_format);const n=t.split("/").map((t=>{switch(t){case"YYYY":return C().createElement(_V,{onValueChange:this.onValueChange,key:"year",name:this.props.field.name,addDefaultClasses:this.props.addDefaultClasses,year:this.state.year,placeholder:this.props.field.year_placeholder});case"MM":return C().createElement(CV,{onValueChange:this.onValueChange,key:"month",name:this.props.field.name,addDefaultClasses:this.props.addDefaultClasses,month:this.state.month,monthNames:e,placeholder:this.props.field.month_placeholder});case"DD":return C().createElement(xV,{onValueChange:this.onValueChange,key:"day",name:this.props.field.name,addDefaultClasses:this.props.addDefaultClasses,day:this.state.day,placeholder:this.props.field.day_placeholder});default:return C().createElement("div",null,"Invalid date type")}}));return C().createElement("div",null,n)}}SV.propTypes={item:Bx().object.isRequired,field:Bx().shape({name:Bx().string,day_placeholder:Bx().string,month_placeholder:Bx().string,year_placeholder:Bx().string,params:Bx().object}).isRequired,onValueChange:Bx().func.isRequired,addDefaultClasses:Bx().bool},SV.defaultProps={addDefaultClasses:!1};var IV=SV,TV=e=>{const t=e.label?e.label:"";return e.mandatory?`${t} *`:t},NV=function(e,t){switch(e){case"checkbox":return{label:t.label,required:t.mandatory?"1":"",values:[{is_checked:t.isChecked?"1":"",value:t.checkboxLabel}]};case"date":return{label:t.label,required:t.mandatory?"1":"",date_type:t.dateType,date_format:t.dateFormat,is_default_today:t.defaultToday?"1":""};case"radio":case"select":return{required:t.mandatory?"1":"",label:t.label,values:t.values.map((e=>{const t={value:e.name};return e.isChecked?t.is_checked="1":t.is_checked="",t}))};case"text":return{required:t.mandatory?"1":"",validate:t.validate,label:t.label};case"textarea":return{required:t.mandatory?"1":"",validate:t.validate,lines:t.lines?t.lines:"1",label:t.label};default:throw new Error(`Invalid custom field type ${e}!`)}};const AV=({attributes:e,setAttributes:t,clientId:n})=>{const r=(0,er.Z)((e=>e("mailpoet-form-editor").getIsCustomFieldSaving()),[]),o=(0,er.Z)((e=>e("mailpoet-form-editor").getDateSettingsData()),[]),i=(0,er.Z)((e=>e("mailpoet-form-editor").getIsCustomFieldDeleting()),[]),{saveCustomField:a,deleteCustomField:l,customFieldEdited:s}=(0,tr.Z)("mailpoet-form-editor"),c=C().createElement(lE,null,C().createElement(uF,null,C().createElement(Jk,{title:KB.Z.I18n.t("customFieldSettings"),initialOpen:!0},C().createElement(EV,{label:e.label,mandatory:e.mandatory,dateSettings:o,defaultToday:e.defaultToday,dateFormat:e.dateFormat,dateType:e.dateType,isSaving:r,onSave:n=>a({customFieldId:e.customFieldId,data:{params:NV("date",n)},onFinish:()=>t({mandatory:n.mandatory,dateType:n.dateType,dateFormat:n.dateFormat,defaultToday:n.defaultToday,label:n.label})}),onCustomFieldDelete:()=>l(e.customFieldId,n),isDeleting:i,onChange:(e,t)=>t&&s()}))));return C().createElement(bV,{className:e.className},C().createElement("div",{className:"mailpoet_custom_date"},c,C().createElement("label",{className:"mailpoet_date_label","data-automation-id":"editor_custom_date_label",htmlFor:n},TV(e)),C().createElement(IV,{field:{name:n,day_placeholder:KB.Z.I18n.t("customFieldDay"),month_placeholder:KB.Z.I18n.t("customFieldMonth"),year_placeholder:KB.Z.I18n.t("customFieldYear"),params:{date_type:e.dateType,date_format:e.dateFormat}},item:{[n]:e.defaultToday?gV()().format("YYYY-MM-DD"):""},addDefaultClasses:!0,onValueChange:()=>{}})))};AV.propTypes={attributes:Bx().shape({label:Bx().string.isRequired,dateFormat:Bx().string.isRequired,dateType:Bx().string.isRequired,defaultToday:Bx().bool,mandatory:Bx().bool.isRequired,customFieldId:Bx().number.isRequired,className:Bx().string}).isRequired,clientId:Bx().string.isRequired,setAttributes:Bx().func.isRequired};var RV=AV;function LV(e){return{title:e.name,description:"",icon:fV,category:"custom-fields",attributes:{label:{type:"string",default:e.name},mandatory:{type:"boolean",default:!!e.params.required&&!!e.params.required},defaultToday:{type:"boolean",default:!1},dateType:{type:"string",default:e.params.date_type},dateFormat:{type:"string",default:e.params.date_format},customFieldId:{type:"string",default:e.id}},supports:{html:!1,multiple:!1},edit:RV,save:()=>null}}var PV=function(e){const t=parseInt(e,10);if(!Number.isNaN(t))return t};const OV={fullWidth:!0,inheritFromTheme:!0},DV={fullWidth:!1,inheritFromTheme:!0},MV=e=>{if(!e)return DV;const t={fullWidth:"1"===e.full_width||!0===e.full_width,inheritFromTheme:!(0,Ce.has)(e,"bold")};return t.inheritFromTheme||(t.bold="1"===e.bold||!0===e.bold,(0,Ce.has)(e,"background_color")&&e.background_color&&(t.backgroundColor=e.background_color),(0,Ce.has)(e,"gradient")&&e.gradient&&(t.gradient=e.gradient),(0,Ce.has)(e,"border_size")&&void 0!==e.border_size&&(t.borderSize=Number(e.border_size)),(0,Ce.has)(e,"font_size")&&void 0!==e.font_size&&(t.fontSize=Number(e.font_size)),(0,Ce.has)(e,"font_color")&&e.font_color&&(t.fontColor=e.font_color),(0,Ce.has)(e,"border_radius")&&void 0!==e.border_radius&&(t.borderRadius=Number(e.border_radius)),(0,Ce.has)(e,"border_color")&&e.border_color&&(t.borderColor=e.border_color),(0,Ce.has)(e,"padding")&&void 0!==e.padding&&(t.padding=Number(e.padding)),(0,Ce.has)(e,"font_family")&&e.font_family&&(t.fontFamily=e.font_family)),t},BV=(e,t)=>{const n=e.find((e=>e.color===t));return n?n.slug:void 0},FV=({label:e,mandatory:t,validate:n,isSaving:r,onSave:o,isDeleting:i,onCustomFieldDelete:a,onChange:l,fieldType:s})=>{const[c,u]=(0,_.useState)(e),[d,p]=(0,_.useState)(t),[m,f]=(0,_.useState)(n),h=(0,_.useMemo)((()=>({label:c,mandatory:d,validate:m})),[c,d,m]),g=d!==t||m!==n||c!==e;return(0,_.useEffect)((()=>{l&&l(h,g)}),[h,l,g,s]),C().createElement(C().Fragment,null,C().createElement(Vk,{label:KB.Z.I18n.t("label"),value:c,"data-automation-id":"settings_custom_text_label_input",onChange:u}),C().createElement(JT,{label:KB.Z.I18n.t("blockMandatory"),checked:d,onChange:p}),C().createElement(u_,{label:`${KB.Z.I18n.t("customFieldValidateFor")}:`,"data-automation-id":"settings_custom_text_input_validation_type",options:[{label:KB.Z.I18n.t("customFieldValidateNothing"),value:""},{label:KB.Z.I18n.t("customFieldValidateNumbersOnly"),value:"number"},{label:KB.Z.I18n.t("customFieldValidateAlphanumerical"),value:"alphanum"},{label:KB.Z.I18n.t("customFieldValidatePhoneNumber"),value:"phone"}],value:m,onChange:f}),o?C().createElement(Gi,{isPrimary:!0,onClick:()=>o(h),isBusy:r,disabled:r||i||!g,className:"button-on-top","data-automation-id":"custom_field_save"},KB.Z.I18n.t("customFieldSaveCTA")):null,a?C().createElement(wV,{isBusy:r||i,onDelete:a}):null)};FV.propTypes={label:Bx().string,mandatory:Bx().bool,validate:Bx().string,onSave:Bx().func,isSaving:Bx().bool,isDeleting:Bx().bool,onCustomFieldDelete:Bx().func,onChange:Bx().func,fieldType:Bx().string},FV.defaultProps={label:"",mandatory:!1,fieldType:"",isSaving:!1,validate:"",isDeleting:!1,onCustomFieldDelete:null,onSave:null,onChange:null};var zV=FV;const HV=({styles:e,onChange:t})=>{const n=(0,_.useRef)(e),r=n.current,{applyStylesToAllTextInputs:o}=(0,tr.Z)("mailpoet-form-editor"),i=(e,r)=>{const o={...n.current};o[e]=r,t(o),n.current=o};return C().createElement(uF,{className:"mailpoet-automation-input-styles-panel"},C().createElement(Jk,{title:KB.Z.I18n.t("formSettingsStyles"),initialOpen:!1},C().createElement("div",{className:"mailpoet-styles-settings","data-automation-id":"input_styles_settings"},C().createElement(JT,{label:KB.Z.I18n.t("formSettingsDisplayFullWidth"),checked:r.fullWidth,onChange:(0,Ce.partial)(i,"fullWidth")}),C().createElement(JT,{label:KB.Z.I18n.t("formSettingsInheritStyleFromTheme"),checked:r.inheritFromTheme,onChange:e=>{if(e)return void i("inheritFromTheme",e);const r={...n.current};r.backgroundColor="#ffffff",r.bold=!1,r.borderRadius=0,r.borderSize=1,r.borderColor="#313131",r.inheritFromTheme=e,t(r),n.current=r},className:"mailpoet-automation-inherit-theme-toggle"}),r.inheritFromTheme?null:C().createElement(C().Fragment,null,C().createElement(NF,{name:KB.Z.I18n.t("formSettingsStylesFontColor"),value:r.fontColor,onChange:(0,Ce.partial)(i,"fontColor")}),C().createElement(NF,{name:KB.Z.I18n.t("formSettingsStylesBackgroundColor"),value:r.backgroundColor,onChange:(0,Ce.partial)(i,"backgroundColor")}),C().createElement(JT,{label:KB.Z.I18n.t("formSettingsBold"),checked:r.bold||!1,onChange:(0,Ce.partial)(i,"bold"),className:"mailpoet-automation-styles-bold-toggle"}),C().createElement(hC,{label:KB.Z.I18n.t("formSettingsBorderSize"),value:void 0===r.borderSize?1:r.borderSize,min:0,max:10,allowReset:!0,onChange:(0,Ce.partial)(i,"borderSize"),className:"mailpoet-automation-styles-border-size"}),C().createElement(hC,{label:KB.Z.I18n.t("formSettingsBorderRadius"),value:void 0===r.borderRadius?1:r.borderRadius,min:0,max:40,allowReset:!0,onChange:(0,Ce.partial)(i,"borderRadius")}),C().createElement(NF,{name:KB.Z.I18n.t("formSettingsBorderColor"),value:r.borderColor,onChange:(0,Ce.partial)(i,"borderColor")})),C().createElement("div",null,C().createElement(Gi,{isPrimary:!0,onClick:()=>o(r),"data-automation-id":"styles_apply_to_all"},KB.Z.I18n.t("formSettingsApplyToAll"))))))},VV=Bx().shape({fullWidth:Bx().bool.isRequired,inheritFromTheme:Bx().bool.isRequired,bold:Bx().bool,backgroundColor:Bx().string,borderSize:Bx().number,borderRadius:Bx().number,borderColor:Bx().string});HV.propTypes={styles:VV.isRequired,onChange:Bx().func.isRequired};var WV=function(e){return e===IF.Right?"0 0 0 auto":e===IF.Center?"0 auto":"auto 0"};const ZV=({label:e,labelWithinInput:t,name:n,mandatory:r,styles:o,className:i})=>{const a=(0,er.Z)((e=>e("mailpoet-form-editor").getFormSettings()),[]),l=(0,_.useRef)(null),s=`${n}_${Math.random().toString(36).substring(2,15)}`,[c,u]=(0,_.useState)(""),d=o.inheritFromTheme?{}:{fontWeight:o.bold?"bold":"inherit"},p=o.inheritFromTheme?{}:{borderRadius:o.borderRadius?`${o.borderRadius}px`:0,borderWidth:void 0!==o.borderSize?`${o.borderSize}px`:"1px",borderColor:o.borderColor||"initial",borderStyle:"solid"};void 0!==a.inputPadding&&(p.padding=a.inputPadding),void 0!==a.inputPadding&&(p.padding=a.inputPadding),void 0!==a.alignment&&(p.textAlign=a.alignment,p.margin=WV(p.textAlign)),o.fullWidth&&(p.width="100%"),o.backgroundColor&&!o.inheritFromTheme&&(p.backgroundColor=o.backgroundColor);const m={};return o.fontColor&&!o.inheritFromTheme&&(p.color=o.fontColor,t&&(m.color=o.fontColor)),C().createElement(bV,{className:i},t?null:C().createElement("label",{className:"mailpoet_text_label","data-automation-id":`editor_${n}_label`,htmlFor:s,style:d},TV({label:e,mandatory:r})),(e=>{let t=`#${s}::placeholder {`;return void 0!==m.color&&(t+=`color: ${m.color};`),a.fontFamily&&(t+=`font-family: ${a.fontFamily};`),t+="}",C().createElement(C().Fragment,null,C().createElement("style",null,t),C().createElement("input",{id:s,ref:l,className:"mailpoet_text",type:"text",name:n,value:c,onChange:()=>u(""),placeholder:e,"data-automation-id":`editor_${n}_input`,style:p,autoComplete:"off"}))})(t?TV({label:e,mandatory:r}):""))};ZV.propTypes={label:Bx().string.isRequired,labelWithinInput:Bx().bool.isRequired,name:Bx().string.isRequired,mandatory:Bx().bool.isRequired,className:Bx().string,styles:VV.isRequired},ZV.defaultProps={className:""};var jV=ZV;const UV=({attributes:e,setAttributes:t,clientId:n})=>{const r=(0,er.Z)((e=>e("mailpoet-form-editor").getIsCustomFieldSaving()),[]),o=(0,er.Z)((e=>e("mailpoet-form-editor").getIsCustomFieldDeleting()),[]),{saveCustomField:i,deleteCustomField:a,customFieldEdited:l}=(0,tr.Z)("mailpoet-form-editor"),s=C().createElement(lE,null,C().createElement(uF,null,C().createElement(Jk,{title:KB.Z.I18n.t("customFieldSettings"),initialOpen:!0},C().createElement(zV,{updateAttributes:e=>t(e),customFieldId:e.customFieldId,label:e.label,mandatory:e.mandatory,validate:e.validate,isSaving:r,onSave:n=>{i({customFieldId:e.customFieldId,data:{params:NV("text",n)},onFinish:()=>t({mandatory:n.mandatory,validate:n.validate,label:n.label})})},onCustomFieldDelete:()=>a(e.customFieldId,n),isDeleting:o,onChange:(e,t)=>t&&l()}))),C().createElement(uF,null,C().createElement(Jk,{title:KB.Z.I18n.t("customFieldsFormSettings"),initialOpen:!0},C().createElement(JT,{label:KB.Z.I18n.t("displayLabelWithinInput"),checked:e.labelWithinInput,onChange:e=>t({labelWithinInput:e})}))),C().createElement(HV,{styles:e.styles,onChange:e=>t({styles:e})}));return C().createElement(C().Fragment,null,s,C().createElement(jV,{className:e.className,name:"custom_text",mandatory:e.mandatory,labelWithinInput:e.labelWithinInput,label:e.label,styles:e.styles}))};UV.propTypes={attributes:Bx().shape({label:Bx().string.isRequired,validate:Bx().string,labelWithinInput:Bx().bool.isRequired,mandatory:Bx().bool.isRequired,customFieldId:Bx().number.isRequired,styles:VV.isRequired,className:Bx().string}).isRequired,setAttributes:Bx().func.isRequired,clientId:Bx().string.isRequired};var $V=UV;function qV(e){return{title:e.name,description:"",icon:fV,category:"custom-fields",attributes:{label:{type:"string",default:e.name},labelWithinInput:{type:"boolean",default:!0},mandatory:{type:"boolean",default:!!e.params.required&&!!e.params.required},validate:{type:"string",default:e.params.validate?e.params.validate:""},customFieldId:{type:"string",default:e.id},styles:{type:"object",default:OV}},supports:{html:!1,multiple:!1},edit:$V,save:()=>null}}const GV=({name:e,attributes:t,setAttributes:n,clientId:r})=>{const o=`${e.replace(/[^a-zA-Z]/g,"")}_${Math.random().toString(36).substring(2,15)}`,i=(0,er.Z)((e=>e("mailpoet-form-editor").getFormSettings()),[]),a=(0,er.Z)((e=>e("mailpoet-form-editor").getIsCustomFieldSaving()),[]),l=(0,er.Z)((e=>e("mailpoet-form-editor").getIsCustomFieldDeleting()),[]),[s,c]=(0,_.useState)(""),{saveCustomField:u,deleteCustomField:d,customFieldEdited:p}=(0,tr.Z)("mailpoet-form-editor"),m=C().createElement(lE,null,C().createElement(uF,null,C().createElement(Jk,{title:KB.Z.I18n.t("customFieldSettings"),initialOpen:!0},C().createElement(zV,{label:t.label,mandatory:t.mandatory,validate:t.validate,isSaving:a,onSave:e=>u({customFieldId:t.customFieldId,data:{params:NV("textarea",e)},onFinish:()=>n({mandatory:e.mandatory,validate:e.validate,lines:e.lines,label:e.label})}),onCustomFieldDelete:()=>d(t.customFieldId,r),isDeleting:l,onChange:(e,t)=>t&&p()}))),C().createElement(uF,null,C().createElement(Jk,{title:KB.Z.I18n.t("formSettings"),initialOpen:!0},C().createElement(JT,{label:KB.Z.I18n.t("displayLabelWithinInput"),checked:t.labelWithinInput,onChange:e=>n({labelWithinInput:e})}),C().createElement(u_,{label:`${KB.Z.I18n.t("customFieldNumberOfLines")}:`,"data-automation-id":"settings_custom_text_area_number_of_lines",value:t.lines,options:[{label:KB.Z.I18n.t("customField1Line"),value:"1"},{label:KB.Z.I18n.t("customField2Lines"),value:"2"},{label:KB.Z.I18n.t("customField3Lines"),value:"3"},{label:KB.Z.I18n.t("customField4Lines"),value:"4"},{label:KB.Z.I18n.t("customField5Lines"),value:"5"}],onChange:e=>n({lines:e})}))),C().createElement(HV,{styles:t.styles,onChange:e=>n({styles:e})})),f=t.styles.inheritFromTheme?{}:{fontWeight:t.styles.bold?"bold":"inherit"},h=t.styles.inheritFromTheme?{}:{borderRadius:t.styles.borderRadius?`${t.styles.borderRadius}px`:0,borderWidth:void 0!==t.styles.borderSize?`${t.styles.borderSize}px`:"1px",borderColor:t.styles.borderColor||"initial",borderStyle:"solid"};t.styles.fullWidth&&(h.width="100%"),t.styles.backgroundColor&&!t.styles.inheritFromTheme&&(h.backgroundColor=t.styles.backgroundColor),void 0!==i.inputPadding&&(h.padding=i.inputPadding),void 0!==i.alignment&&(h.textAlign=i.alignment,h.margin=WV(h.textAlign)),h.resize="none";const g={};t.styles.fontColor&&!t.styles.inheritFromTheme&&(h.color=t.styles.fontColor,t.labelWithinInput&&(g.color=t.styles.fontColor));const v=(0,_.useRef)(null),b=e=>{let n=`#${o}::placeholder {`;return void 0!==g.color&&(n+=`color: ${g.color};`),i.fontFamily&&(n+=`font-family: ${i.fontFamily};`),n+="}",C().createElement(C().Fragment,null,C().createElement("style",null,n),C().createElement("textarea",{id:o,ref:v,className:"mailpoet_textarea",name:"custom_text","data-automation-id":"editor_custom_textarea_input",rows:t.lines,style:h,onChange:()=>c(""),placeholder:e,value:s}))};return C().createElement(bV,{className:t.className},m,t.labelWithinInput?b(TV(t)):C().createElement(C().Fragment,null,C().createElement("label",{className:"mailpoet_textarea_label","data-automation-id":"editor_custom_text_label",htmlFor:o,style:f},TV(t)),b("")))};GV.propTypes={attributes:Bx().shape({label:Bx().string.isRequired,customFieldId:Bx().number.isRequired,validate:Bx().string,labelWithinInput:Bx().bool.isRequired,mandatory:Bx().bool.isRequired,lines:Bx().string,styles:VV.isRequired,className:Bx().string}).isRequired,setAttributes:Bx().func.isRequired,clientId:Bx().string.isRequired,name:Bx().string.isRequired};var KV=GV;function YV(e){return{title:e.name,description:"",icon:fV,category:"custom-fields",attributes:{label:{type:"string",default:e.name},labelWithinInput:{type:"boolean",default:!0},mandatory:{type:"boolean",default:!!e.params.required&&!!e.params.required},validate:{type:"string",default:e.params.validate?e.params.validate:""},lines:{type:"string",default:"1"},customFieldId:{type:"string",default:e.id},styles:{type:"object",default:OV}},supports:{html:!1,multiple:!1},edit:KV,save:()=>null}}var XV=n(94578),JV=n(97779),QV=C().createContext(null),eW=function(e){e()},tW=function(){return eW},nW={notify:function(){}},rW=function(){function e(e,t){this.store=e,this.parentSub=t,this.unsubscribe=null,this.listeners=nW,this.handleChangeWrapper=this.handleChangeWrapper.bind(this)}var t=e.prototype;return t.addNestedSub=function(e){return this.trySubscribe(),this.listeners.subscribe(e)},t.notifyNestedSubs=function(){this.listeners.notify()},t.handleChangeWrapper=function(){this.onStateChange&&this.onStateChange()},t.isSubscribed=function(){return Boolean(this.unsubscribe)},t.trySubscribe=function(){this.unsubscribe||(this.unsubscribe=this.parentSub?this.parentSub.addNestedSub(this.handleChangeWrapper):this.store.subscribe(this.handleChangeWrapper),this.listeners=function(){var e=tW(),t=null,n=null;return{clear:function(){t=null,n=null},notify:function(){e((function(){for(var e=t;e;)e.callback(),e=e.next}))},get:function(){for(var e=[],n=t;n;)e.push(n),n=n.next;return e},subscribe:function(e){var r=!0,o=n={callback:e,next:null,prev:n};return o.prev?o.prev.next=o:t=o,function(){r&&null!==t&&(r=!1,o.next?o.next.prev=o.prev:n=o.prev,o.prev?o.prev.next=o.next:t=o.next)}}}}())},t.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null,this.listeners.clear(),this.listeners=nW)},e}(),oW=function(e){var t=e.store,n=e.context,r=e.children,o=(0,_.useMemo)((function(){var e=new rW(t);return e.onStateChange=e.notifyNestedSubs,{store:t,subscription:e}}),[t]),i=(0,_.useMemo)((function(){return t.getState()}),[t]);(0,_.useEffect)((function(){var e=o.subscription;return e.trySubscribe(),i!==t.getState()&&e.notifyNestedSubs(),function(){e.tryUnsubscribe(),e.onStateChange=null}}),[o,i]);var a=n||QV;return C().createElement(a.Provider,{value:o},r)},iW=n(8679),aW=n.n(iW),lW=n(59864),sW="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?_.useLayoutEffect:_.useEffect,cW=[],uW=[null,null];function dW(e,t){var n=e[1];return[t.payload,n+1]}function pW(e,t,n){sW((function(){return e.apply(void 0,t)}),n)}function mW(e,t,n,r,o,i,a){e.current=r,t.current=o,n.current=!1,i.current&&(i.current=null,a())}function fW(e,t,n,r,o,i,a,l,s,c){if(e){var u=!1,d=null,p=function(){if(!u){var e,n,p=t.getState();try{e=r(p,o.current)}catch(e){n=e,d=e}n||(d=null),e===i.current?a.current||s():(i.current=e,l.current=e,a.current=!0,c({type:"STORE_UPDATED",payload:{error:n}}))}};return n.onStateChange=p,n.trySubscribe(),p(),function(){if(u=!0,n.tryUnsubscribe(),n.onStateChange=null,d)throw d}}}var hW=function(){return[null,0]};function gW(e,t){void 0===t&&(t={});var n=t,r=n.getDisplayName,o=void 0===r?function(e){return"ConnectAdvanced("+e+")"}:r,i=n.methodName,a=void 0===i?"connectAdvanced":i,l=n.renderCountProp,s=void 0===l?void 0:l,c=n.shouldHandleStateChanges,u=void 0===c||c,d=n.storeKey,p=void 0===d?"store":d,m=(n.withRef,n.forwardRef),f=void 0!==m&&m,h=n.context,g=void 0===h?QV:h,v=(0,Dx.Z)(n,["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef","forwardRef","context"]),b=g;return function(t){var n=t.displayName||t.name||"Component",r=o(n),i=(0,nr.Z)({},v,{getDisplayName:o,methodName:a,renderCountProp:s,shouldHandleStateChanges:u,storeKey:p,displayName:r,wrappedComponentName:n,WrappedComponent:t}),l=v.pure,c=l?_.useMemo:function(e){return e()};function d(n){var r=(0,_.useMemo)((function(){var e=n.forwardedRef,t=(0,Dx.Z)(n,["forwardedRef"]);return[n.context,e,t]}),[n]),o=r[0],a=r[1],l=r[2],s=(0,_.useMemo)((function(){return o&&o.Consumer&&(0,lW.isContextConsumer)(C().createElement(o.Consumer,null))?o:b}),[o,b]),d=(0,_.useContext)(s),p=Boolean(n.store)&&Boolean(n.store.getState)&&Boolean(n.store.dispatch);Boolean(d)&&Boolean(d.store);var m=p?n.store:d.store,f=(0,_.useMemo)((function(){return function(t){return e(t.dispatch,i)}(m)}),[m]),h=(0,_.useMemo)((function(){if(!u)return uW;var e=new rW(m,p?null:d.subscription),t=e.notifyNestedSubs.bind(e);return[e,t]}),[m,p,d]),g=h[0],v=h[1],y=(0,_.useMemo)((function(){return p?d:(0,nr.Z)({},d,{subscription:g})}),[p,d,g]),w=(0,_.useReducer)(dW,cW,hW),k=w[0][0],E=w[1];if(k&&k.error)throw k.error;var x=(0,_.useRef)(),S=(0,_.useRef)(l),I=(0,_.useRef)(),T=(0,_.useRef)(!1),N=c((function(){return I.current&&l===S.current?I.current:f(m.getState(),l)}),[m,k,l]);pW(mW,[S,x,T,l,N,I,v]),pW(fW,[u,m,g,f,S,x,T,I,v,E],[m,g,f]);var A=(0,_.useMemo)((function(){return C().createElement(t,(0,nr.Z)({},N,{ref:a}))}),[a,t,N]);return(0,_.useMemo)((function(){return u?C().createElement(s.Provider,{value:y},A):A}),[s,A,y])}var m=l?C().memo(d):d;if(m.WrappedComponent=t,m.displayName=r,f){var h=C().forwardRef((function(e,t){return C().createElement(m,(0,nr.Z)({},e,{forwardedRef:t}))}));return h.displayName=r,h.WrappedComponent=t,aW()(h,t)}return aW()(m,t)}}function vW(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function bW(e,t){if(vW(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var o=0;o<n.length;o++)if(!Object.prototype.hasOwnProperty.call(t,n[o])||!vW(e[n[o]],t[n[o]]))return!1;return!0}function yW(e){return function(t,n){var r=e(t,n);function o(){return r}return o.dependsOnOwnProps=!1,o}}function wW(e){return null!==e.dependsOnOwnProps&&void 0!==e.dependsOnOwnProps?Boolean(e.dependsOnOwnProps):1!==e.length}function kW(e,t){return function(t,n){n.displayName;var r=function(e,t){return r.dependsOnOwnProps?r.mapToProps(e,t):r.mapToProps(e)};return r.dependsOnOwnProps=!0,r.mapToProps=function(t,n){r.mapToProps=e,r.dependsOnOwnProps=wW(e);var o=r(t,n);return"function"==typeof o&&(r.mapToProps=o,r.dependsOnOwnProps=wW(o),o=r(t,n)),o},r}}var EW=[function(e){return"function"==typeof e?kW(e):void 0},function(e){return e?void 0:yW((function(e){return{dispatch:e}}))},function(e){return e&&"object"==typeof e?yW((function(t){return(0,JV.DE)(e,t)})):void 0}],_W=[function(e){return"function"==typeof e?kW(e):void 0},function(e){return e?void 0:yW((function(){return{}}))}];function CW(e,t,n){return(0,nr.Z)({},n,{},e,{},t)}var xW=[function(e){return"function"==typeof e?function(e){return function(t,n){n.displayName;var r,o=n.pure,i=n.areMergedPropsEqual,a=!1;return function(t,n,l){var s=e(t,n,l);return a?o&&i(s,r)||(r=s):(a=!0,r=s),r}}}(e):void 0},function(e){return e?void 0:function(){return CW}}];function SW(e,t,n,r){return function(o,i){return n(e(o,i),t(r,i),i)}}function IW(e,t,n,r,o){var i,a,l,s,c,u=o.areStatesEqual,d=o.areOwnPropsEqual,p=o.areStatePropsEqual,m=!1;return function(o,f){return m?function(o,m){var f,h,g=!d(m,a),v=!u(o,i);return i=o,a=m,g&&v?(l=e(i,a),t.dependsOnOwnProps&&(s=t(r,a)),c=n(l,s,a)):g?(e.dependsOnOwnProps&&(l=e(i,a)),t.dependsOnOwnProps&&(s=t(r,a)),c=n(l,s,a)):v?(f=e(i,a),h=!p(f,l),l=f,h&&(c=n(l,s,a)),c):c}(o,f):(l=e(i=o,a=f),s=t(r,a),c=n(l,s,a),m=!0,c)}}function TW(e,t){var n=t.initMapStateToProps,r=t.initMapDispatchToProps,o=t.initMergeProps,i=(0,Dx.Z)(t,["initMapStateToProps","initMapDispatchToProps","initMergeProps"]),a=n(e,i),l=r(e,i),s=o(e,i);return(i.pure?IW:SW)(a,l,s,e,i)}function NW(e,t,n){for(var r=t.length-1;r>=0;r--){var o=t[r](e);if(o)return o}return function(t,r){throw new Error("Invalid value of type "+typeof e+" for "+n+" argument when connecting component "+r.wrappedComponentName+".")}}function AW(e,t){return e===t}function RW(e){var t=void 0===e?{}:e,n=t.connectHOC,r=void 0===n?gW:n,o=t.mapStateToPropsFactories,i=void 0===o?_W:o,a=t.mapDispatchToPropsFactories,l=void 0===a?EW:a,s=t.mergePropsFactories,c=void 0===s?xW:s,u=t.selectorFactory,d=void 0===u?TW:u;return function(e,t,n,o){void 0===o&&(o={});var a=o,s=a.pure,u=void 0===s||s,p=a.areStatesEqual,m=void 0===p?AW:p,f=a.areOwnPropsEqual,h=void 0===f?bW:f,g=a.areStatePropsEqual,v=void 0===g?bW:g,b=a.areMergedPropsEqual,y=void 0===b?bW:b,w=(0,Dx.Z)(a,["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"]),k=NW(e,i,"mapStateToProps"),E=NW(t,l,"mapDispatchToProps"),_=NW(n,c,"mergeProps");return r(d,(0,nr.Z)({methodName:"connect",getDisplayName:function(e){return"Connect("+e+")"},shouldHandleStateChanges:Boolean(e),initMapStateToProps:k,initMapDispatchToProps:E,initMergeProps:_,pure:u,areStatesEqual:m,areOwnPropsEqual:h,areStatePropsEqual:v,areMergedPropsEqual:y},w))}}var LW,PW=RW();LW=x.unstable_batchedUpdates,eW=LW;var OW=n(2177),DW=function(e){var t=e.top,n=e.right,r=e.bottom,o=e.left;return{top:t,right:n,bottom:r,left:o,width:n-o,height:r-t,x:o,y:t,center:{x:(n+o)/2,y:(r+t)/2}}},MW=function(e,t){return{top:e.top-t.top,left:e.left-t.left,bottom:e.bottom+t.bottom,right:e.right+t.right}},BW=function(e,t){return{top:e.top+t.top,left:e.left+t.left,bottom:e.bottom-t.bottom,right:e.right-t.right}},FW={top:0,right:0,bottom:0,left:0},zW=function(e){var t=e.borderBox,n=e.margin,r=void 0===n?FW:n,o=e.border,i=void 0===o?FW:o,a=e.padding,l=void 0===a?FW:a,s=DW(MW(t,r)),c=DW(BW(t,i)),u=DW(BW(c,l));return{marginBox:s,borderBox:DW(t),paddingBox:c,contentBox:u,margin:r,border:i,padding:l}},HW=function(e){var t=e.slice(0,-2);if("px"!==e.slice(-2))return 0;var n=Number(t);return isNaN(n)&&(0,OW.default)(!1),n},VW=function(e,t){var n,r,o=e.borderBox,i=e.border,a=e.margin,l=e.padding,s=(r=t,{top:(n=o).top+r.y,left:n.left+r.x,bottom:n.bottom+r.y,right:n.right+r.x});return zW({borderBox:s,border:i,margin:a,padding:l})},WW=function(e,t){return void 0===t&&(t={x:window.pageXOffset,y:window.pageYOffset}),VW(e,t)},ZW=function(e,t){var n={top:HW(t.marginTop),right:HW(t.marginRight),bottom:HW(t.marginBottom),left:HW(t.marginLeft)},r={top:HW(t.paddingTop),right:HW(t.paddingRight),bottom:HW(t.paddingBottom),left:HW(t.paddingLeft)},o={top:HW(t.borderTopWidth),right:HW(t.borderRightWidth),bottom:HW(t.borderBottomWidth),left:HW(t.borderLeftWidth)};return zW({borderBox:e,margin:n,padding:r,border:o})},jW=function(e){var t=e.getBoundingClientRect(),n=window.getComputedStyle(e);return ZW(t,n)},UW=n(30845),$W=function(e){var t=[],n=null,r=function(){for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];t=o,n||(n=requestAnimationFrame((function(){n=null,e.apply(void 0,t)})))};return r.cancel=function(){n&&(cancelAnimationFrame(n),n=null)},r};function qW(e,t){}function GW(){}function KW(e,t,n){var r=t.map((function(t){var r,o,i=(r=n,o=t.options,(0,nr.Z)({},r,{},o));return e.addEventListener(t.eventName,t.fn,i),function(){e.removeEventListener(t.eventName,t.fn,i)}}));return function(){r.forEach((function(e){e()}))}}qW.bind(null,"warn"),qW.bind(null,"error");function YW(e){this.message=e}function XW(e,t){if(!e)throw new YW("Invariant failed")}YW.prototype.toString=function(){return this.message};var JW=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).callbacks=null,t.unbind=GW,t.onWindowError=function(e){var n=t.getCallbacks();n.isDragging()&&n.tryAbort(),e.error instanceof YW&&e.preventDefault()},t.getCallbacks=function(){if(!t.callbacks)throw new Error("Unable to find AppCallbacks in <ErrorBoundary/>");return t.callbacks},t.setCallbacks=function(e){t.callbacks=e},t}(0,XV.Z)(t,e);var n=t.prototype;return n.componentDidMount=function(){this.unbind=KW(window,[{eventName:"error",fn:this.onWindowError}])},n.componentDidCatch=function(e){if(!(e instanceof YW))throw e;this.setState({})},n.componentWillUnmount=function(){this.unbind()},n.render=function(){return this.props.children(this.setCallbacks)},t}(C().Component),QW=function(e){return e+1},eZ=function(e,t){var n=e.droppableId===t.droppableId,r=QW(e.index),o=QW(t.index);return n?"\n You have moved the item from position "+r+"\n to position "+o+"\n ":"\n You have moved the item from position "+r+"\n in list "+e.droppableId+"\n to list "+t.droppableId+"\n in position "+o+"\n "},tZ=function(e,t,n){return t.droppableId===n.droppableId?"\n The item "+e+"\n has been combined with "+n.draggableId:"\n The item "+e+"\n in list "+t.droppableId+"\n has been combined with "+n.draggableId+"\n in list "+n.droppableId+"\n "},nZ=function(e){return"\n The item has returned to its starting position\n of "+QW(e.index)+"\n"},rZ=function(e){return"\n You have lifted an item in position "+QW(e.source.index)+"\n"},oZ=function(e){var t=e.destination;if(t)return eZ(e.source,t);var n=e.combine;return n?tZ(e.draggableId,e.source,n):"You are over an area that cannot be dropped on"},iZ=function(e){if("CANCEL"===e.reason)return"\n Movement cancelled.\n "+nZ(e.source)+"\n ";var t=e.destination,n=e.combine;return t?"\n You have dropped the item.\n "+eZ(e.source,t)+"\n ":n?"\n You have dropped the item.\n "+tZ(e.draggableId,e.source,n)+"\n ":"\n The item has been dropped while not over a drop area.\n "+nZ(e.source)+"\n "},aZ={x:0,y:0},lZ=function(e,t){return{x:e.x+t.x,y:e.y+t.y}},sZ=function(e,t){return{x:e.x-t.x,y:e.y-t.y}},cZ=function(e,t){return e.x===t.x&&e.y===t.y},uZ=function(e){return{x:0!==e.x?-e.x:0,y:0!==e.y?-e.y:0}},dZ=function(e,t,n){var r;return void 0===n&&(n=0),(r={})[e]=t,r["x"===e?"y":"x"]=n,r},pZ=function(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))},mZ=function(e,t){return Math.min.apply(Math,t.map((function(t){return pZ(e,t)})))},fZ=function(e){return function(t){return{x:e(t.x),y:e(t.y)}}},hZ=function(e,t){return{top:e.top+t.y,left:e.left+t.x,bottom:e.bottom+t.y,right:e.right+t.x}},gZ=function(e){return[{x:e.left,y:e.top},{x:e.right,y:e.top},{x:e.left,y:e.bottom},{x:e.right,y:e.bottom}]},vZ=function(e,t){return t&&t.shouldClipSubject?function(e,t){var n=DW({top:Math.max(t.top,e.top),right:Math.min(t.right,e.right),bottom:Math.min(t.bottom,e.bottom),left:Math.max(t.left,e.left)});return n.width<=0||n.height<=0?null:n}(t.pageMarginBox,e):DW(e)},bZ=function(e){var t=e.page,n=e.withPlaceholder,r=e.axis,o=e.frame,i=function(e,t,n){var r;return n&&n.increasedBy?(0,nr.Z)({},e,((r={})[t.end]=e[t.end]+n.increasedBy[t.line],r)):e}(function(e,t){return t?hZ(e,t.scroll.diff.displacement):e}(t.marginBox,o),r,n);return{page:t,withPlaceholder:n,active:vZ(i,o)}},yZ=function(e,t){e.frame||XW(!1);var n=e.frame,r=sZ(t,n.scroll.initial),o=uZ(r),i=(0,nr.Z)({},n,{scroll:{initial:n.scroll.initial,current:t,diff:{value:r,displacement:o},max:n.scroll.max}}),a=bZ({page:e.subject.page,withPlaceholder:e.subject.withPlaceholder,axis:e.axis,frame:i});return(0,nr.Z)({},e,{frame:i,subject:a})};function wZ(e){return Object.values?Object.values(e):Object.keys(e).map((function(t){return e[t]}))}function kZ(e,t){if(e.findIndex)return e.findIndex(t);for(var n=0;n<e.length;n++)if(t(e[n]))return n;return-1}function EZ(e,t){if(e.find)return e.find(t);var n=kZ(e,t);return-1!==n?e[n]:void 0}function _Z(e){return Array.prototype.slice.call(e)}var CZ=(0,UW.Z)((function(e){return e.reduce((function(e,t){return e[t.descriptor.id]=t,e}),{})})),xZ=(0,UW.Z)((function(e){return e.reduce((function(e,t){return e[t.descriptor.id]=t,e}),{})})),SZ=(0,UW.Z)((function(e){return wZ(e)})),IZ=(0,UW.Z)((function(e){return wZ(e)})),TZ=(0,UW.Z)((function(e,t){return IZ(t).filter((function(t){return e===t.descriptor.droppableId})).sort((function(e,t){return e.descriptor.index-t.descriptor.index}))}));function NZ(e){return e.at&&"REORDER"===e.at.type?e.at.destination:null}function AZ(e){return e.at&&"COMBINE"===e.at.type?e.at.combine:null}var RZ=(0,UW.Z)((function(e,t){return t.filter((function(t){return t.descriptor.id!==e.descriptor.id}))})),LZ=function(e,t){return e.descriptor.droppableId===t.descriptor.id},PZ={point:aZ,value:0},OZ={invisible:{},visible:{},all:[]},DZ={displaced:OZ,displacedBy:PZ,at:null},MZ=function(e,t){return function(n){return e<=n&&n<=t}},BZ=function(e){var t=MZ(e.top,e.bottom),n=MZ(e.left,e.right);return function(r){if(t(r.top)&&t(r.bottom)&&n(r.left)&&n(r.right))return!0;var o=t(r.top)||t(r.bottom),i=n(r.left)||n(r.right);if(o&&i)return!0;var a=r.top<e.top&&r.bottom>e.bottom,l=r.left<e.left&&r.right>e.right;return!(!a||!l)||a&&i||l&&o}},FZ=function(e){var t=MZ(e.top,e.bottom),n=MZ(e.left,e.right);return function(e){return t(e.top)&&t(e.bottom)&&n(e.left)&&n(e.right)}},zZ={direction:"vertical",line:"y",crossAxisLine:"x",start:"top",end:"bottom",size:"height",crossAxisStart:"left",crossAxisEnd:"right",crossAxisSize:"width"},HZ={direction:"horizontal",line:"x",crossAxisLine:"y",start:"left",end:"right",size:"width",crossAxisStart:"top",crossAxisEnd:"bottom",crossAxisSize:"height"},VZ=function(e){var t=e.target,n=e.destination,r=e.viewport,o=e.withDroppableDisplacement,i=e.isVisibleThroughFrameFn,a=o?function(e,t){var n=t.frame?t.frame.scroll.diff.displacement:aZ;return hZ(e,n)}(t,n):t;return function(e,t,n){return!!t.subject.active&&n(t.subject.active)(e)}(a,n,i)&&function(e,t,n){return n(t)(e)}(a,r,i)},WZ=function(e){return VZ((0,nr.Z)({},e,{isVisibleThroughFrameFn:FZ}))};function ZZ(e){var t=e.afterDragging,n=e.destination,r=e.displacedBy,o=e.viewport,i=e.forceShouldAnimate,a=e.last;return t.reduce((function(e,t){var l,s=function(e,t){var n=e.page.marginBox,r={top:t.point.y,right:0,bottom:0,left:t.point.x};return DW(MW(n,r))}(t,r),c=t.descriptor.id;if(e.all.push(c),l={target:s,destination:n,viewport:o,withDroppableDisplacement:!0},!VZ((0,nr.Z)({},l,{isVisibleThroughFrameFn:BZ})))return e.invisible[t.descriptor.id]=!0,e;var u={draggableId:c,shouldAnimate:function(e,t,n){if("boolean"==typeof n)return n;if(!t)return!0;var r=t.invisible,o=t.visible;if(r[e])return!1;var i=o[e];return!i||i.shouldAnimate}(c,a,i)};return e.visible[c]=u,e}),{all:[],visible:{},invisible:{}})}function jZ(e){var t=e.insideDestination,n=e.inHomeList,r=e.displacedBy,o=e.destination,i=function(e,t){if(!e.length)return 0;var n=e[e.length-1].descriptor.index;return t.inHomeList?n:n+1}(t,{inHomeList:n});return{displaced:OZ,displacedBy:r,at:{type:"REORDER",destination:{droppableId:o.descriptor.id,index:i}}}}function UZ(e){var t=e.draggable,n=e.insideDestination,r=e.destination,o=e.viewport,i=e.displacedBy,a=e.last,l=e.index,s=e.forceShouldAnimate,c=LZ(t,r);if(null==l)return jZ({insideDestination:n,inHomeList:c,displacedBy:i,destination:r});var u=EZ(n,(function(e){return e.descriptor.index===l}));if(!u)return jZ({insideDestination:n,inHomeList:c,displacedBy:i,destination:r});var d=RZ(t,n),p=n.indexOf(u);return{displaced:ZZ({afterDragging:d.slice(p),destination:r,displacedBy:i,last:a,viewport:o.frame,forceShouldAnimate:s}),displacedBy:i,at:{type:"REORDER",destination:{droppableId:r.descriptor.id,index:l}}}}function $Z(e,t){return Boolean(t.effected[e])}var qZ=function(e,t){return t.margin[e.start]+t.borderBox[e.size]/2},GZ=function(e,t,n){return t[e.crossAxisStart]+n.margin[e.crossAxisStart]+n.borderBox[e.crossAxisSize]/2},KZ=function(e){var t=e.axis,n=e.moveRelativeTo,r=e.isMoving;return dZ(t.line,n.marginBox[t.end]+qZ(t,r),GZ(t,n.marginBox,r))},YZ=function(e){var t=e.axis,n=e.moveRelativeTo,r=e.isMoving;return dZ(t.line,n.marginBox[t.start]-function(e,t){return t.margin[e.end]+t.borderBox[e.size]/2}(t,r),GZ(t,n.marginBox,r))},XZ=function(e,t){var n=e.frame;return n?lZ(t,n.scroll.diff.displacement):t},JZ=function(e){var t=function(e){var t=e.impact,n=e.draggable,r=e.droppable,o=e.draggables,i=e.afterCritical,a=n.page.borderBox.center,l=t.at;return r&&l?"REORDER"===l.type?function(e){var t=e.impact,n=e.draggable,r=e.draggables,o=e.droppable,i=e.afterCritical,a=TZ(o.descriptor.id,r),l=n.page,s=o.axis;if(!a.length)return function(e){var t=e.axis,n=e.moveInto,r=e.isMoving;return dZ(t.line,n.contentBox[t.start]+qZ(t,r),GZ(t,n.contentBox,r))}({axis:s,moveInto:o.page,isMoving:l});var c=t.displaced,u=t.displacedBy,d=c.all[0];if(d){var p=r[d];if($Z(d,i))return YZ({axis:s,moveRelativeTo:p.page,isMoving:l});var m=VW(p.page,u.point);return YZ({axis:s,moveRelativeTo:m,isMoving:l})}var f=a[a.length-1];if(f.descriptor.id===n.descriptor.id)return l.borderBox.center;if($Z(f.descriptor.id,i)){var h=VW(f.page,uZ(i.displacedBy.point));return KZ({axis:s,moveRelativeTo:h,isMoving:l})}return KZ({axis:s,moveRelativeTo:f.page,isMoving:l})}({impact:t,draggable:n,draggables:o,droppable:r,afterCritical:i}):function(e){var t=e.afterCritical,n=e.impact,r=e.draggables,o=AZ(n);o||XW(!1);var i=o.draggableId,a=r[i].page.borderBox.center,l=function(e){var t=e.displaced,n=e.afterCritical,r=e.combineWith,o=e.displacedBy,i=Boolean(t.visible[r]||t.invisible[r]);return $Z(r,n)?i?aZ:uZ(o.point):i?o.point:aZ}({displaced:n.displaced,afterCritical:t,combineWith:i,displacedBy:n.displacedBy});return lZ(a,l)}({impact:t,draggables:o,afterCritical:i}):a}(e),n=e.droppable;return n?XZ(n,t):t},QZ=function(e,t){var n=sZ(t,e.scroll.initial),r=uZ(n);return{frame:DW({top:t.y,bottom:t.y+e.frame.height,left:t.x,right:t.x+e.frame.width}),scroll:{initial:e.scroll.initial,max:e.scroll.max,current:t,diff:{value:n,displacement:r}}}};function ej(e,t){return e.map((function(e){return t[e]}))}var tj=function(e){var t,n,r=e.pageBorderBoxCenter,o=e.draggable,i=(t=e.viewport,n=r,lZ(t.scroll.diff.displacement,n)),a=sZ(i,o.page.borderBox.center);return lZ(o.client.borderBox.center,a)},nj=function(e){var t=e.draggable,n=e.destination,r=e.newPageBorderBoxCenter,o=e.viewport,i=e.withDroppableDisplacement,a=e.onlyOnMainAxis,l=void 0!==a&&a,s=sZ(r,t.page.borderBox.center),c={target:hZ(t.page.borderBox,s),destination:n,withDroppableDisplacement:i,viewport:o};return l?function(e){return VZ((0,nr.Z)({},e,{isVisibleThroughFrameFn:(t=e.destination.axis,function(e){var n=MZ(e.top,e.bottom),r=MZ(e.left,e.right);return function(e){return t===zZ?n(e.top)&&n(e.bottom):r(e.left)&&r(e.right)}})}));var t}(c):WZ(c)},rj=function(e){var t=e.isMovingForward,n=e.draggable,r=e.destination,o=e.draggables,i=e.previousImpact,a=e.viewport,l=e.previousPageBorderBoxCenter,s=e.previousClientSelection,c=e.afterCritical;if(!r.isEnabled)return null;var u=TZ(r.descriptor.id,o),d=LZ(n,r),p=function(e){var t=e.isMovingForward,n=e.draggable,r=e.destination,o=e.insideDestination,i=e.previousImpact;if(!r.isCombineEnabled)return null;if(!NZ(i))return null;function a(e){var t={type:"COMBINE",combine:{draggableId:e,droppableId:r.descriptor.id}};return(0,nr.Z)({},i,{at:t})}var l=i.displaced.all,s=l.length?l[0]:null;if(t)return s?a(s):null;var c=RZ(n,o);if(!s)return c.length?a(c[c.length-1].descriptor.id):null;var u=kZ(c,(function(e){return e.descriptor.id===s}));-1===u&&XW(!1);var d=u-1;return d<0?null:a(c[d].descriptor.id)}({isMovingForward:t,draggable:n,destination:r,insideDestination:u,previousImpact:i})||function(e){var t=e.isMovingForward,n=e.isInHomeList,r=e.draggable,o=e.draggables,i=e.destination,a=e.insideDestination,l=e.previousImpact,s=e.viewport,c=e.afterCritical,u=l.at;if(u||XW(!1),"REORDER"===u.type){var d=function(e){var t=e.isMovingForward,n=e.isInHomeList,r=e.insideDestination,o=e.location;if(!r.length)return null;var i=o.index,a=t?i+1:i-1,l=r[0].descriptor.index,s=r[r.length-1].descriptor.index;return a<l||a>(n?s:s+1)?null:a}({isMovingForward:t,isInHomeList:n,location:u.destination,insideDestination:a});return null==d?null:UZ({draggable:r,insideDestination:a,destination:i,viewport:s,last:l.displaced,displacedBy:l.displacedBy,index:d})}var p=function(e){var t=e.isMovingForward,n=e.draggables,r=e.combine,o=e.afterCritical;if(!e.destination.isCombineEnabled)return null;var i=r.draggableId,a=n[i].descriptor.index;return $Z(i,o)?t?a:a-1:t?a+1:a}({isMovingForward:t,destination:i,displaced:l.displaced,draggables:o,combine:u.combine,afterCritical:c});return null==p?null:UZ({draggable:r,insideDestination:a,destination:i,viewport:s,last:l.displaced,displacedBy:l.displacedBy,index:p})}({isMovingForward:t,isInHomeList:d,draggable:n,draggables:o,destination:r,insideDestination:u,previousImpact:i,viewport:a,afterCritical:c});if(!p)return null;var m=JZ({impact:p,draggable:n,droppable:r,draggables:o,afterCritical:c});if(nj({draggable:n,destination:r,newPageBorderBoxCenter:m,viewport:a.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0}))return{clientSelection:tj({pageBorderBoxCenter:m,draggable:n,viewport:a}),impact:p,scrollJumpRequest:null};var f=sZ(m,l);return{clientSelection:s,impact:function(e){var t=e.impact,n=e.viewport,r=e.destination,o=e.draggables,i=e.maxScrollChange,a=QZ(n,lZ(n.scroll.current,i)),l=r.frame?yZ(r,lZ(r.frame.scroll.current,i)):r,s=t.displaced,c=ZZ({afterDragging:ej(s.all,o),destination:r,displacedBy:t.displacedBy,viewport:a.frame,last:s,forceShouldAnimate:!1}),u=ZZ({afterDragging:ej(s.all,o),destination:l,displacedBy:t.displacedBy,viewport:n.frame,last:s,forceShouldAnimate:!1}),d={},p={},m=[s,c,u];return s.all.forEach((function(e){var t=function(e,t){for(var n=0;n<t.length;n++){var r=t[n].visible[e];if(r)return r}return null}(e,m);t?p[e]=t:d[e]=!0})),(0,nr.Z)({},t,{displaced:{all:s.all,invisible:d,visible:p}})}({impact:p,viewport:a,destination:r,draggables:o,maxScrollChange:f}),scrollJumpRequest:f}},oj=function(e){var t=e.subject.active;return t||XW(!1),t},ij=function(e,t){var n=e.page.borderBox.center;return $Z(e.descriptor.id,t)?sZ(n,t.displacedBy.point):n},aj=function(e,t){var n=e.page.borderBox;return $Z(e.descriptor.id,t)?hZ(n,uZ(t.displacedBy.point)):n},lj=(0,UW.Z)((function(e,t){var n=t[e.line];return{value:n,point:dZ(e.line,n)}})),sj=function(e,t){return(0,nr.Z)({},e,{scroll:(0,nr.Z)({},e.scroll,{max:t})})},cj=function(e,t,n){var r=e.frame;LZ(t,e)&&XW(!1),e.subject.withPlaceholder&&XW(!1);var o=lj(e.axis,t.displaceBy).point,i=function(e,t,n){var r=e.axis;if("virtual"===e.descriptor.mode)return dZ(r.line,t[r.line]);var o=e.subject.page.contentBox[r.size],i=TZ(e.descriptor.id,n).reduce((function(e,t){return e+t.client.marginBox[r.size]}),0)+t[r.line]-o;return i<=0?null:dZ(r.line,i)}(e,o,n),a={placeholderSize:o,increasedBy:i,oldFrameMaxScroll:e.frame?e.frame.scroll.max:null};if(!r){var l=bZ({page:e.subject.page,withPlaceholder:a,axis:e.axis,frame:e.frame});return(0,nr.Z)({},e,{subject:l})}var s=i?lZ(r.scroll.max,i):r.scroll.max,c=sj(r,s),u=bZ({page:e.subject.page,withPlaceholder:a,axis:e.axis,frame:c});return(0,nr.Z)({},e,{subject:u,frame:c})},uj=function(e){var t=e.at;return t?"REORDER"===t.type?t.destination.droppableId:t.combine.droppableId:null},dj=function(e){var t=e.state,n=e.type,r=function(e,t){var n=uj(e);return n?t[n]:null}(t.impact,t.dimensions.droppables),o=Boolean(r),i=t.dimensions.droppables[t.critical.droppable.id],a=r||i,l=a.axis.direction,s="vertical"===l&&("MOVE_UP"===n||"MOVE_DOWN"===n)||"horizontal"===l&&("MOVE_LEFT"===n||"MOVE_RIGHT"===n);if(s&&!o)return null;var c="MOVE_DOWN"===n||"MOVE_RIGHT"===n,u=t.dimensions.draggables[t.critical.draggable.id],d=t.current.page.borderBoxCenter,p=t.dimensions,m=p.draggables,f=p.droppables;return s?rj({isMovingForward:c,previousPageBorderBoxCenter:d,draggable:u,destination:a,draggables:m,viewport:t.viewport,previousClientSelection:t.current.client.selection,previousImpact:t.impact,afterCritical:t.afterCritical}):function(e){var t=e.isMovingForward,n=e.previousPageBorderBoxCenter,r=e.draggable,o=e.isOver,i=e.draggables,a=e.droppables,l=e.viewport,s=e.afterCritical,c=function(e){var t=e.isMovingForward,n=e.pageBorderBoxCenter,r=e.source,o=e.droppables,i=e.viewport,a=r.subject.active;if(!a)return null;var l=r.axis,s=MZ(a[l.start],a[l.end]),c=SZ(o).filter((function(e){return e!==r})).filter((function(e){return e.isEnabled})).filter((function(e){return Boolean(e.subject.active)})).filter((function(e){return BZ(i.frame)(oj(e))})).filter((function(e){var n=oj(e);return t?a[l.crossAxisEnd]<n[l.crossAxisEnd]:n[l.crossAxisStart]<a[l.crossAxisStart]})).filter((function(e){var t=oj(e),n=MZ(t[l.start],t[l.end]);return s(t[l.start])||s(t[l.end])||n(a[l.start])||n(a[l.end])})).sort((function(e,n){var r=oj(e)[l.crossAxisStart],o=oj(n)[l.crossAxisStart];return t?r-o:o-r})).filter((function(e,t,n){return oj(e)[l.crossAxisStart]===oj(n[0])[l.crossAxisStart]}));if(!c.length)return null;if(1===c.length)return c[0];var u=c.filter((function(e){return MZ(oj(e)[l.start],oj(e)[l.end])(n[l.line])}));return 1===u.length?u[0]:u.length>1?u.sort((function(e,t){return oj(e)[l.start]-oj(t)[l.start]}))[0]:c.sort((function(e,t){var r=mZ(n,gZ(oj(e))),o=mZ(n,gZ(oj(t)));return r!==o?r-o:oj(e)[l.start]-oj(t)[l.start]}))[0]}({isMovingForward:t,pageBorderBoxCenter:n,source:o,droppables:a,viewport:l});if(!c)return null;var u=TZ(c.descriptor.id,i),d=function(e){var t=e.previousPageBorderBoxCenter,n=e.moveRelativeTo,r=e.insideDestination,o=e.draggable,i=e.draggables,a=e.destination,l=e.viewport,s=e.afterCritical;if(!n){if(r.length)return null;var c={displaced:OZ,displacedBy:PZ,at:{type:"REORDER",destination:{droppableId:a.descriptor.id,index:0}}},u=JZ({impact:c,draggable:o,droppable:a,draggables:i,afterCritical:s}),d=LZ(o,a)?a:cj(a,o,i);return nj({draggable:o,destination:d,newPageBorderBoxCenter:u,viewport:l.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0})?c:null}var p,m=Boolean(t[a.axis.line]<=n.page.borderBox.center[a.axis.line]),f=(p=n.descriptor.index,n.descriptor.id===o.descriptor.id||m?p:p+1);return UZ({draggable:o,insideDestination:r,destination:a,viewport:l,displacedBy:lj(a.axis,o.displaceBy),last:OZ,index:f})}({previousPageBorderBoxCenter:n,destination:c,draggable:r,draggables:i,moveRelativeTo:function(e){var t=e.pageBorderBoxCenter,n=e.viewport,r=e.destination,o=e.afterCritical;return e.insideDestination.filter((function(e){return WZ({target:aj(e,o),destination:r,viewport:n.frame,withDroppableDisplacement:!0})})).sort((function(e,n){var i=pZ(t,XZ(r,ij(e,o))),a=pZ(t,XZ(r,ij(n,o)));return i<a?-1:a<i?1:e.descriptor.index-n.descriptor.index}))[0]||null}({pageBorderBoxCenter:n,viewport:l,destination:c,insideDestination:u,afterCritical:s}),insideDestination:u,viewport:l,afterCritical:s});if(!d)return null;var p=JZ({impact:d,draggable:r,droppable:c,draggables:i,afterCritical:s});return{clientSelection:tj({pageBorderBoxCenter:p,draggable:r,viewport:l}),impact:d,scrollJumpRequest:null}}({isMovingForward:c,previousPageBorderBoxCenter:d,draggable:u,isOver:a,draggables:m,droppables:f,viewport:t.viewport,afterCritical:t.afterCritical})};function pj(e){return"DRAGGING"===e.phase||"COLLECTING"===e.phase}function mj(e){var t=MZ(e.top,e.bottom),n=MZ(e.left,e.right);return function(e){return t(e.y)&&n(e.x)}}var fj=function(e,t){return DW(hZ(e,t))};function hj(e){var t=e.displaced,n=e.id;return Boolean(t.visible[n]||t.invisible[n])}var gj=function(e){var t=e.pageOffset,n=e.draggable,r=e.draggables,o=e.droppables,i=e.previousImpact,a=e.viewport,l=e.afterCritical,s=fj(n.page.borderBox,t),c=function(e){var t=e.pageBorderBox,n=e.draggable,r=e.droppables,o=SZ(r).filter((function(e){if(!e.isEnabled)return!1;var n,r,o=e.subject.active;if(!o)return!1;if(r=o,!((n=t).left<r.right&&n.right>r.left&&n.top<r.bottom&&n.bottom>r.top))return!1;if(mj(o)(t.center))return!0;var i=e.axis,a=o.center[i.crossAxisLine],l=t[i.crossAxisStart],s=t[i.crossAxisEnd],c=MZ(o[i.crossAxisStart],o[i.crossAxisEnd]),u=c(l),d=c(s);return!u&&!d||(u?l<a:s>a)}));return o.length?1===o.length?o[0].descriptor.id:function(e){var t=e.pageBorderBox,n=e.candidates,r=e.draggable.page.borderBox.center,o=n.map((function(e){var n=e.axis,o=dZ(e.axis.line,t.center[n.line],e.page.borderBox.center[n.crossAxisLine]);return{id:e.descriptor.id,distance:pZ(r,o)}})).sort((function(e,t){return t.distance-e.distance}));return o[0]?o[0].id:null}({pageBorderBox:t,draggable:n,candidates:o}):null}({pageBorderBox:s,draggable:n,droppables:o});if(!c)return DZ;var u=o[c],d=TZ(u.descriptor.id,r),p=function(e,t){var n=e.frame;return n?fj(t,n.scroll.diff.value):t}(u,s);return function(e){var t=e.draggable,n=e.pageBorderBoxWithDroppableScroll,r=e.previousImpact,o=e.destination,i=e.insideDestination,a=e.afterCritical;if(!o.isCombineEnabled)return null;var l=o.axis,s=lj(o.axis,t.displaceBy),c=s.value,u=n[l.start],d=n[l.end],p=EZ(RZ(t,i),(function(e){var t=e.descriptor.id,n=e.page.borderBox,o=n[l.size]/4,i=$Z(t,a),s=hj({displaced:r.displaced,id:t});return i?s?d>n[l.start]+o&&d<n[l.end]-o:u>n[l.start]-c+o&&u<n[l.end]-c-o:s?d>n[l.start]+c+o&&d<n[l.end]+c-o:u>n[l.start]+o&&u<n[l.end]-o}));return p?{displacedBy:s,displaced:r.displaced,at:{type:"COMBINE",combine:{draggableId:p.descriptor.id,droppableId:o.descriptor.id}}}:null}({pageBorderBoxWithDroppableScroll:p,draggable:n,previousImpact:i,destination:u,insideDestination:d,afterCritical:l})||function(e){var t=e.pageBorderBoxWithDroppableScroll,n=e.draggable,r=e.destination,o=e.insideDestination,i=e.last,a=e.viewport,l=e.afterCritical,s=r.axis,c=lj(r.axis,n.displaceBy),u=c.value,d=t[s.start],p=t[s.end],m=function(e){var t=e.draggable,n=e.closest;return n?e.inHomeList&&n.descriptor.index>t.descriptor.index?n.descriptor.index-1:n.descriptor.index:null}({draggable:n,closest:EZ(RZ(n,o),(function(e){var t=e.descriptor.id,n=e.page.borderBox.center[s.line],r=$Z(t,l),o=hj({displaced:i,id:t});return r?o?p<=n:d<n-u:o?p<=n+u:d<n})),inHomeList:LZ(n,r)});return UZ({draggable:n,insideDestination:o,destination:r,viewport:a,last:i,displacedBy:c,index:m})}({pageBorderBoxWithDroppableScroll:p,draggable:n,destination:u,insideDestination:d,last:i.displaced,viewport:a,afterCritical:l})},vj=function(e,t){var n;return(0,nr.Z)({},e,((n={})[t.descriptor.id]=t,n))},bj=function(e){var t=e.state,n=e.clientSelection,r=e.dimensions,o=e.viewport,i=e.impact,a=e.scrollJumpRequest,l=o||t.viewport,s=r||t.dimensions,c=n||t.current.client.selection,u=sZ(c,t.initial.client.selection),d={offset:u,selection:c,borderBoxCenter:lZ(t.initial.client.borderBoxCenter,u)},p={selection:lZ(d.selection,l.scroll.current),borderBoxCenter:lZ(d.borderBoxCenter,l.scroll.current),offset:lZ(d.offset,l.scroll.diff.value)},m={client:d,page:p};if("COLLECTING"===t.phase)return(0,nr.Z)({phase:"COLLECTING"},t,{dimensions:s,viewport:l,current:m});var f=s.draggables[t.critical.draggable.id],h=i||gj({pageOffset:p.offset,draggable:f,draggables:s.draggables,droppables:s.droppables,previousImpact:t.impact,viewport:l,afterCritical:t.afterCritical}),g=function(e){var t=e.draggable,n=e.draggables,r=e.droppables,o=e.impact,i=function(e){var t=e.previousImpact,n=e.impact,r=e.droppables,o=uj(t),i=uj(n);if(!o)return r;if(o===i)return r;var a=r[o];if(!a.subject.withPlaceholder)return r;var l=function(e){var t=e.subject.withPlaceholder;t||XW(!1);var n=e.frame;if(!n){var r=bZ({page:e.subject.page,axis:e.axis,frame:null,withPlaceholder:null});return(0,nr.Z)({},e,{subject:r})}var o=t.oldFrameMaxScroll;o||XW(!1);var i=sj(n,o),a=bZ({page:e.subject.page,axis:e.axis,frame:i,withPlaceholder:null});return(0,nr.Z)({},e,{subject:a,frame:i})}(a);return vj(r,l)}({previousImpact:e.previousImpact,impact:o,droppables:r}),a=uj(o);if(!a)return i;var l=r[a];if(LZ(t,l))return i;if(l.subject.withPlaceholder)return i;var s=cj(l,t,n);return vj(i,s)}({draggable:f,impact:h,previousImpact:t.impact,draggables:s.draggables,droppables:s.droppables});return(0,nr.Z)({},t,{current:m,dimensions:{draggables:s.draggables,droppables:g},impact:h,viewport:l,scrollJumpRequest:a||null,forceShouldAnimate:!a&&null})},yj=function(e){var t=e.impact,n=e.viewport,r=e.draggables,o=e.destination,i=e.forceShouldAnimate,a=t.displaced,l=ZZ({afterDragging:function(e,t){return e.map((function(e){return t[e]}))}(a.all,r),destination:o,displacedBy:t.displacedBy,viewport:n.frame,forceShouldAnimate:i,last:a});return(0,nr.Z)({},t,{displaced:l})},wj=function(e){var t=e.impact,n=e.draggable,r=e.droppable,o=e.draggables,i=e.viewport,a=e.afterCritical,l=JZ({impact:t,draggable:n,draggables:o,droppable:r,afterCritical:a});return tj({pageBorderBoxCenter:l,draggable:n,viewport:i})},kj=function(e){var t=e.state,n=e.dimensions,r=e.viewport;"SNAP"!==t.movementMode&&XW(!1);var o=t.impact,i=r||t.viewport,a=n||t.dimensions,l=a.draggables,s=a.droppables,c=l[t.critical.draggable.id],u=uj(o);u||XW(!1);var d=s[u],p=yj({impact:o,viewport:i,destination:d,draggables:l}),m=wj({impact:p,draggable:c,droppable:d,draggables:l,viewport:i,afterCritical:t.afterCritical});return bj({impact:p,clientSelection:m,state:t,dimensions:a,viewport:i})},Ej=function(e){var t=e.draggable,n=e.home,r=e.draggables,o=e.viewport,i=lj(n.axis,t.displaceBy),a=TZ(n.descriptor.id,r),l=a.indexOf(t);-1===l&&XW(!1);var s,c=a.slice(l+1),u=c.reduce((function(e,t){return e[t.descriptor.id]=!0,e}),{}),d={inVirtualList:"virtual"===n.descriptor.mode,displacedBy:i,effected:u};return{impact:{displaced:ZZ({afterDragging:c,destination:n,displacedBy:i,last:null,viewport:o.frame,forceShouldAnimate:!1}),displacedBy:i,at:{type:"REORDER",destination:(s=t.descriptor,{index:s.index,droppableId:s.droppableId})}},afterCritical:d}},_j=function(e){return"SNAP"===e.movementMode},Cj=function(e,t,n){var r=function(e,t){return{draggables:e.draggables,droppables:vj(e.droppables,t)}}(e.dimensions,t);return!_j(e)||n?bj({state:e,dimensions:r}):kj({state:e,dimensions:r})};function xj(e){return e.isDragging&&"SNAP"===e.movementMode?(0,nr.Z)({phase:"DRAGGING"},e,{scrollJumpRequest:null}):e}var Sj={phase:"IDLE",completed:null,shouldFlush:!1},Ij=function(e,t){if(void 0===e&&(e=Sj),"FLUSH"===t.type)return(0,nr.Z)({},Sj,{shouldFlush:!0});if("INITIAL_PUBLISH"===t.type){"IDLE"!==e.phase&&XW(!1);var n=t.payload,r=n.critical,o=n.clientSelection,i=n.viewport,a=n.dimensions,l=n.movementMode,s=a.draggables[r.draggable.id],c=a.droppables[r.droppable.id],u={selection:o,borderBoxCenter:s.client.borderBox.center,offset:aZ},d={client:u,page:{selection:lZ(u.selection,i.scroll.initial),borderBoxCenter:lZ(u.selection,i.scroll.initial),offset:lZ(u.selection,i.scroll.diff.value)}},p=SZ(a.droppables).every((function(e){return!e.isFixedOnPage})),m=Ej({draggable:s,home:c,draggables:a.draggables,viewport:i}),f=m.impact;return{phase:"DRAGGING",isDragging:!0,critical:r,movementMode:l,dimensions:a,initial:d,current:d,isWindowScrollAllowed:p,impact:f,afterCritical:m.afterCritical,onLiftImpact:f,viewport:i,scrollJumpRequest:null,forceShouldAnimate:null}}if("COLLECTION_STARTING"===t.type)return"COLLECTING"===e.phase||"DROP_PENDING"===e.phase?e:("DRAGGING"!==e.phase&&XW(!1),(0,nr.Z)({phase:"COLLECTING"},e,{phase:"COLLECTING"}));if("PUBLISH_WHILE_DRAGGING"===t.type)return"COLLECTING"!==e.phase&&"DROP_PENDING"!==e.phase&&XW(!1),function(e){var t=e.state,n=e.published,r=n.modified.map((function(e){var n=t.dimensions.droppables[e.droppableId];return yZ(n,e.scroll)})),o=(0,nr.Z)({},t.dimensions.droppables,{},CZ(r)),i=xZ(function(e){var t=e.additions,n=e.updatedDroppables,r=e.viewport,o=r.scroll.diff.value;return t.map((function(e){var t=e.descriptor.droppableId,i=function(e){var t=e.frame;return t||XW(!1),t}(n[t]).scroll.diff.value;return function(e){var t=e.draggable,n=e.offset,r=e.initialWindowScroll,o=VW(t.client,n),i=WW(o,r);return(0,nr.Z)({},t,{placeholder:(0,nr.Z)({},t.placeholder,{client:o}),client:o,page:i})}({draggable:e,offset:lZ(o,i),initialWindowScroll:r.scroll.initial})}))}({additions:n.additions,updatedDroppables:o,viewport:t.viewport})),a=(0,nr.Z)({},t.dimensions.draggables,{},i);n.removals.forEach((function(e){delete a[e]}));var l={droppables:o,draggables:a},s=uj(t.impact),c=s?l.droppables[s]:null,u=l.draggables[t.critical.draggable.id],d=l.droppables[t.critical.droppable.id],p=Ej({draggable:u,home:d,draggables:a,viewport:t.viewport}),m=p.impact,f=p.afterCritical,h=c&&c.isCombineEnabled?t.impact:m,g=gj({pageOffset:t.current.page.offset,draggable:l.draggables[t.critical.draggable.id],draggables:l.draggables,droppables:l.droppables,previousImpact:h,viewport:t.viewport,afterCritical:f}),v=(0,nr.Z)({phase:"DRAGGING"},t,{phase:"DRAGGING",impact:g,onLiftImpact:m,dimensions:l,afterCritical:f,forceShouldAnimate:!1});return"COLLECTING"===t.phase?v:(0,nr.Z)({phase:"DROP_PENDING"},v,{phase:"DROP_PENDING",reason:t.reason,isWaiting:!1})}({state:e,published:t.payload});if("MOVE"===t.type){if("DROP_PENDING"===e.phase)return e;pj(e)||XW(!1);var h=t.payload.client;return cZ(h,e.current.client.selection)?e:bj({state:e,clientSelection:h,impact:_j(e)?e.impact:null})}if("UPDATE_DROPPABLE_SCROLL"===t.type){if("DROP_PENDING"===e.phase)return xj(e);if("COLLECTING"===e.phase)return xj(e);pj(e)||XW(!1);var g=t.payload,v=g.id,b=g.newScroll,y=e.dimensions.droppables[v];if(!y)return e;var w=yZ(y,b);return Cj(e,w,!1)}if("UPDATE_DROPPABLE_IS_ENABLED"===t.type){if("DROP_PENDING"===e.phase)return e;pj(e)||XW(!1);var k=t.payload,E=k.id,_=k.isEnabled,C=e.dimensions.droppables[E];C||XW(!1),C.isEnabled===_&&XW(!1);var x=(0,nr.Z)({},C,{isEnabled:_});return Cj(e,x,!0)}if("UPDATE_DROPPABLE_IS_COMBINE_ENABLED"===t.type){if("DROP_PENDING"===e.phase)return e;pj(e)||XW(!1);var S=t.payload,I=S.id,T=S.isCombineEnabled,N=e.dimensions.droppables[I];N||XW(!1),N.isCombineEnabled===T&&XW(!1);var A=(0,nr.Z)({},N,{isCombineEnabled:T});return Cj(e,A,!0)}if("MOVE_BY_WINDOW_SCROLL"===t.type){if("DROP_PENDING"===e.phase||"DROP_ANIMATING"===e.phase)return e;pj(e)||XW(!1),e.isWindowScrollAllowed||XW(!1);var R=t.payload.newScroll;if(cZ(e.viewport.scroll.current,R))return xj(e);var L=QZ(e.viewport,R);return _j(e)?kj({state:e,viewport:L}):bj({state:e,viewport:L})}if("UPDATE_VIEWPORT_MAX_SCROLL"===t.type){if(!pj(e))return e;var P=t.payload.maxScroll;if(cZ(P,e.viewport.scroll.max))return e;var O=(0,nr.Z)({},e.viewport,{scroll:(0,nr.Z)({},e.viewport.scroll,{max:P})});return(0,nr.Z)({phase:"DRAGGING"},e,{viewport:O})}if("MOVE_UP"===t.type||"MOVE_DOWN"===t.type||"MOVE_LEFT"===t.type||"MOVE_RIGHT"===t.type){if("COLLECTING"===e.phase||"DROP_PENDING"===e.phase)return e;"DRAGGING"!==e.phase&&XW(!1);var D=dj({state:e,type:t.type});return D?bj({state:e,impact:D.impact,clientSelection:D.clientSelection,scrollJumpRequest:D.scrollJumpRequest}):e}if("DROP_PENDING"===t.type){var M=t.payload.reason;return"COLLECTING"!==e.phase&&XW(!1),(0,nr.Z)({phase:"DROP_PENDING"},e,{phase:"DROP_PENDING",isWaiting:!0,reason:M})}if("DROP_ANIMATE"===t.type){var B=t.payload,F=B.completed,z=B.dropDuration,H=B.newHomeClientOffset;return"DRAGGING"!==e.phase&&"DROP_PENDING"!==e.phase&&XW(!1),{phase:"DROP_ANIMATING",completed:F,dropDuration:z,newHomeClientOffset:H,dimensions:e.dimensions}}return"DROP_COMPLETE"===t.type?{phase:"IDLE",completed:t.payload.completed,shouldFlush:!1}:e},Tj=function(e){return{type:"PUBLISH_WHILE_DRAGGING",payload:e}},Nj=function(){return{type:"COLLECTION_STARTING",payload:null}},Aj=function(e){return{type:"UPDATE_DROPPABLE_SCROLL",payload:e}},Rj=function(e){return{type:"UPDATE_DROPPABLE_IS_ENABLED",payload:e}},Lj=function(e){return{type:"UPDATE_DROPPABLE_IS_COMBINE_ENABLED",payload:e}},Pj=function(e){return{type:"MOVE",payload:e}},Oj=function(){return{type:"MOVE_UP",payload:null}},Dj=function(){return{type:"MOVE_DOWN",payload:null}},Mj=function(){return{type:"MOVE_RIGHT",payload:null}},Bj=function(){return{type:"MOVE_LEFT",payload:null}},Fj=function(e){return{type:"DROP_COMPLETE",payload:e}},zj=function(e){return{type:"DROP",payload:e}},Hj="cubic-bezier(.2,1,.1,1)",Vj=0,Wj=.7,Zj=.75,jj="0.2s cubic-bezier(0.2, 0, 0, 1)",Uj={fluid:"opacity "+jj,snap:"transform "+jj+", opacity "+jj,drop:function(e){var t=e+"s "+Hj;return"transform "+t+", opacity "+t},outOfTheWay:"transform "+jj,placeholder:"height "+jj+", width "+jj+", margin "+jj},$j=function(e){return cZ(e,aZ)?null:"translate("+e.x+"px, "+e.y+"px)"},qj=$j,Gj=.33,Kj=function(e){var t=e.getState,n=e.dispatch;return function(e){return function(r){if("DROP"===r.type){var o=t(),i=r.payload.reason;if("COLLECTING"!==o.phase){if("IDLE"!==o.phase){"DROP_PENDING"===o.phase&&o.isWaiting&&XW(!1),"DRAGGING"!==o.phase&&"DROP_PENDING"!==o.phase&&XW(!1);var a=o.critical,l=o.dimensions,s=l.draggables[o.critical.draggable.id],c=function(e){var t=e.draggables,n=e.reason,r=e.lastImpact,o=e.home,i=e.viewport,a=e.onLiftImpact;return r.at&&"DROP"===n?"REORDER"===r.at.type?{impact:r,didDropInsideDroppable:!0}:{impact:(0,nr.Z)({},r,{displaced:OZ}),didDropInsideDroppable:!0}:{impact:yj({draggables:t,impact:a,destination:o,viewport:i,forceShouldAnimate:!0}),didDropInsideDroppable:!1}}({reason:i,lastImpact:o.impact,afterCritical:o.afterCritical,onLiftImpact:o.onLiftImpact,home:o.dimensions.droppables[o.critical.droppable.id],viewport:o.viewport,draggables:o.dimensions.draggables}),u=c.impact,d=c.didDropInsideDroppable,p=d?NZ(u):null,m=d?AZ(u):null,f={index:a.draggable.index,droppableId:a.droppable.id},h={draggableId:s.descriptor.id,type:s.descriptor.type,source:f,reason:i,mode:o.movementMode,destination:p,combine:m},g=function(e){var t=e.impact,n=e.draggable,r=e.dimensions,o=e.viewport,i=e.afterCritical,a=r.draggables,l=r.droppables,s=uj(t),c=s?l[s]:null,u=l[n.descriptor.droppableId],d=wj({impact:t,draggable:n,draggables:a,afterCritical:i,droppable:c||u,viewport:o});return sZ(d,n.client.borderBox.center)}({impact:u,draggable:s,dimensions:l,viewport:o.viewport,afterCritical:o.afterCritical}),v={critical:o.critical,afterCritical:o.afterCritical,result:h,impact:u};if(!cZ(o.current.client.offset,g)||Boolean(h.combine)){var b=function(e){var t=e.reason,n=pZ(e.current,e.destination);if(n<=0)return Gj;if(n>=1500)return.55;var r=Gj+n/1500*.22000000000000003;return Number(("CANCEL"===t?.6*r:r).toFixed(2))}({current:o.current.client.offset,destination:g,reason:i});n({type:"DROP_ANIMATE",payload:{newHomeClientOffset:g,dropDuration:b,completed:v}})}else n(Fj({completed:v}))}}else n(function(e){return{type:"DROP_PENDING",payload:e}}({reason:i}))}else e(r)}}},Yj=function(){return{x:window.pageXOffset,y:window.pageYOffset}};var Xj=function(e){var t=function(e){var t=e.onWindowScroll,n=$W((function(){t(Yj())})),r=function(e){return{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(t){t.target!==window&&t.target!==window.document||e()}}}(n),o=GW;function i(){return o!==GW}return{start:function(){i()&&XW(!1),o=KW(window,[r])},stop:function(){i()||XW(!1),n.cancel(),o(),o=GW},isActive:i}}({onWindowScroll:function(t){e.dispatch({type:"MOVE_BY_WINDOW_SCROLL",payload:{newScroll:t}})}});return function(e){return function(n){t.isActive()||"INITIAL_PUBLISH"!==n.type||t.start(),t.isActive()&&function(e){return"DROP_COMPLETE"===e.type||"DROP_ANIMATE"===e.type||"FLUSH"===e.type}(n)&&t.stop(),e(n)}}},Jj=function(e,t){t()},Qj=function(e,t){return{draggableId:e.draggable.id,type:e.droppable.type,source:{droppableId:e.droppable.id,index:e.draggable.index},mode:t}},eU=function(e,t,n,r){if(e){var o=function(e){var t=!1,n=!1,r=setTimeout((function(){n=!0})),o=function(o){t||n||(t=!0,e(o),clearTimeout(r))};return o.wasCalled=function(){return t},o}(n);e(t,{announce:o}),o.wasCalled()||n(r(t))}else n(r(t))},tU=function(e,t){var n=function(e,t){var n,r=(n=[],{add:function(e){var t=setTimeout((function(){return function(e){var t=kZ(n,(function(t){return t.timerId===e}));-1===t&&XW(!1),n.splice(t,1)[0].callback()}(t)})),r={timerId:t,callback:e};n.push(r)},flush:function(){if(n.length){var e=[].concat(n);n.length=0,e.forEach((function(e){clearTimeout(e.timerId),e.callback()}))}}}),o=null,i=function(n){o||XW(!1),o=null,Jj(0,(function(){return eU(e().onDragEnd,n,t,iZ)}))};return{beforeCapture:function(t,n){o&&XW(!1),Jj(0,(function(){var r=e().onBeforeCapture;r&&r({draggableId:t,mode:n})}))},beforeStart:function(t,n){o&&XW(!1),Jj(0,(function(){var r=e().onBeforeDragStart;r&&r(Qj(t,n))}))},start:function(n,i){o&&XW(!1);var a=Qj(n,i);o={mode:i,lastCritical:n,lastLocation:a.source,lastCombine:null},r.add((function(){Jj(0,(function(){return eU(e().onDragStart,a,t,rZ)}))}))},update:function(n,i){var a=NZ(i),l=AZ(i);o||XW(!1);var s=!function(e,t){if(e===t)return!0;var n=e.draggable.id===t.draggable.id&&e.draggable.droppableId===t.draggable.droppableId&&e.draggable.type===t.draggable.type&&e.draggable.index===t.draggable.index,r=e.droppable.id===t.droppable.id&&e.droppable.type===t.droppable.type;return n&&r}(n,o.lastCritical);s&&(o.lastCritical=n);var c,u,d=(u=a,!(null==(c=o.lastLocation)&&null==u||null!=c&&null!=u&&c.droppableId===u.droppableId&&c.index===u.index));d&&(o.lastLocation=a);var p=!function(e,t){return null==e&&null==t||null!=e&&null!=t&&e.draggableId===t.draggableId&&e.droppableId===t.droppableId}(o.lastCombine,l);if(p&&(o.lastCombine=l),s||d||p){var m=(0,nr.Z)({},Qj(n,o.mode),{combine:l,destination:a});r.add((function(){Jj(0,(function(){return eU(e().onDragUpdate,m,t,oZ)}))}))}},flush:function(){o||XW(!1),r.flush()},drop:i,abort:function(){if(o){var e=(0,nr.Z)({},Qj(o.lastCritical,o.mode),{combine:null,destination:null,reason:"CANCEL"});i(e)}}}}(e,t);return function(e){return function(t){return function(r){if("BEFORE_INITIAL_CAPTURE"!==r.type){if("INITIAL_PUBLISH"===r.type){var o=r.payload.critical;return n.beforeStart(o,r.payload.movementMode),t(r),void n.start(o,r.payload.movementMode)}if("DROP_COMPLETE"===r.type){var i=r.payload.completed.result;return n.flush(),t(r),void n.drop(i)}if(t(r),"FLUSH"!==r.type){var a=e.getState();"DRAGGING"===a.phase&&n.update(a.critical,a.impact)}else n.abort()}else n.beforeCapture(r.payload.draggableId,r.payload.movementMode)}}}},nU=function(e){return function(t){return function(n){if("DROP_ANIMATION_FINISHED"===n.type){var r=e.getState();"DROP_ANIMATING"!==r.phase&&XW(!1),e.dispatch(Fj({completed:r.completed}))}else t(n)}}},rU=function(e){var t=null,n=null;return function(r){return function(o){if("FLUSH"!==o.type&&"DROP_COMPLETE"!==o.type&&"DROP_ANIMATION_FINISHED"!==o.type||(n&&(cancelAnimationFrame(n),n=null),t&&(t(),t=null)),r(o),"DROP_ANIMATE"===o.type){var i={eventName:"scroll",options:{capture:!0,passive:!1,once:!0},fn:function(){"DROP_ANIMATING"===e.getState().phase&&e.dispatch({type:"DROP_ANIMATION_FINISHED",payload:null})}};n=requestAnimationFrame((function(){n=null,t=KW(window,[i])}))}}}},oU=function(e){return function(t){return function(n){if(t(n),"PUBLISH_WHILE_DRAGGING"===n.type){var r=e.getState();"DROP_PENDING"===r.phase&&(r.isWaiting||e.dispatch(zj({reason:r.reason})))}}}},iU=JV.qC,aU=function(e){var t=e.scrollHeight,n=e.scrollWidth,r=e.height,o=e.width,i=sZ({x:n,y:t},{x:o,y:r});return{x:Math.max(0,i.x),y:Math.max(0,i.y)}},lU=function(){var e=document.documentElement;return e||XW(!1),e},sU=function(){var e=lU();return aU({scrollHeight:e.scrollHeight,scrollWidth:e.scrollWidth,width:e.clientWidth,height:e.clientHeight})};function cU(e,t,n){return n.descriptor.id!==t.id&&n.descriptor.type===t.type&&"virtual"===e.droppable.getById(n.descriptor.droppableId).descriptor.mode}var uU,dU,pU=function(e,t){var n=null,r=function(e){var t=e.registry,n=e.callbacks,r={additions:{},removals:{},modified:{}},o=null,i=function(){o||(n.collectionStarting(),o=requestAnimationFrame((function(){o=null;var e=r,i=e.additions,a=e.removals,l=e.modified,s=Object.keys(i).map((function(e){return t.draggable.getById(e).getDimension(aZ)})).sort((function(e,t){return e.descriptor.index-t.descriptor.index})),c=Object.keys(l).map((function(e){return{droppableId:e,scroll:t.droppable.getById(e).callbacks.getScrollWhileDragging()}})),u={additions:s,removals:Object.keys(a),modified:c};r={additions:{},removals:{},modified:{}},n.publish(u)})))};return{add:function(e){var t=e.descriptor.id;r.additions[t]=e,r.modified[e.descriptor.droppableId]=!0,r.removals[t]&&delete r.removals[t],i()},remove:function(e){var t=e.descriptor;r.removals[t.id]=!0,r.modified[t.droppableId]=!0,r.additions[t.id]&&delete r.additions[t.id],i()},stop:function(){o&&(cancelAnimationFrame(o),o=null,r={additions:{},removals:{},modified:{}})}}}({callbacks:{publish:t.publishWhileDragging,collectionStarting:t.collectionStarting},registry:e}),o=function(t){n||XW(!1);var o=n.critical.draggable;"ADDITION"===t.type&&cU(e,o,t.value)&&r.add(t.value),"REMOVAL"===t.type&&cU(e,o,t.value)&&r.remove(t.value)};return{updateDroppableIsEnabled:function(r,o){e.droppable.exists(r)||XW(!1),n&&t.updateDroppableIsEnabled({id:r,isEnabled:o})},updateDroppableIsCombineEnabled:function(r,o){n&&(e.droppable.exists(r)||XW(!1),t.updateDroppableIsCombineEnabled({id:r,isCombineEnabled:o}))},scrollDroppable:function(t,r){n&&e.droppable.getById(t).callbacks.scroll(r)},updateDroppableScroll:function(r,o){n&&(e.droppable.exists(r)||XW(!1),t.updateDroppableScroll({id:r,newScroll:o}))},startPublishing:function(t){n&&XW(!1);var r=e.draggable.getById(t.draggableId),i=e.droppable.getById(r.descriptor.droppableId),a={draggable:r.descriptor,droppable:i.descriptor},l=e.subscribe(o);return n={critical:a,unsubscribe:l},function(e){var t=e.critical,n=e.scrollOptions,r=e.registry,o=function(){var e=Yj(),t=sU(),n=e.y,r=e.x,o=lU(),i=o.clientWidth,a=o.clientHeight;return{frame:DW({top:n,left:r,right:r+i,bottom:n+a}),scroll:{initial:e,current:e,max:t,diff:{value:aZ,displacement:aZ}}}}(),i=o.scroll.current,a=t.droppable,l=r.droppable.getAllByType(a.type).map((function(e){return e.callbacks.getDimensionAndWatchScroll(i,n)})),s=r.draggable.getAllByType(t.draggable.type).map((function(e){return e.getDimension(i)}));return{dimensions:{draggables:xZ(s),droppables:CZ(l)},critical:t,viewport:o}}({critical:a,registry:e,scrollOptions:t.scrollOptions})},stopPublishing:function(){if(n){r.stop();var t=n.critical.droppable;e.droppable.getAllByType(t.type).forEach((function(e){return e.callbacks.dragStopped()})),n.unsubscribe(),n=null}}}},mU=function(e,t){return"IDLE"===e.phase||"DROP_ANIMATING"===e.phase&&e.completed.result.draggableId!==t&&"DROP"===e.completed.result.reason},fU=function(e){window.scrollBy(e.x,e.y)},hU=(0,UW.Z)((function(e){return SZ(e).filter((function(e){return!!e.isEnabled&&!!e.frame}))})),gU=function(e){return Math.pow(e,2)},vU=function(e){var t=e.startOfRange,n=e.endOfRange,r=e.current,o=n-t;return 0===o?0:(r-t)/o},bU=360,yU=1200,wU=function(e){var t=e.distanceToEdge,n=e.thresholds,r=e.dragStartTime,o=e.shouldUseTimeDampening,i=function(e,t){if(e>t.startScrollingFrom)return 0;if(e<=t.maxScrollValueAt)return 28;if(e===t.startScrollingFrom)return 1;var n=vU({startOfRange:t.maxScrollValueAt,endOfRange:t.startScrollingFrom,current:e}),r=28*gU(1-n);return Math.ceil(r)}(t,n);return 0===i?0:o?Math.max(function(e,t){var n=t,r=yU,o=Date.now()-n;if(o>=yU)return e;if(o<bU)return 1;var i=vU({startOfRange:bU,endOfRange:r,current:o}),a=e*gU(i);return Math.ceil(a)}(i,r),1):i},kU=function(e){var t=e.container,n=e.distanceToEdges,r=e.dragStartTime,o=e.axis,i=e.shouldUseTimeDampening,a=function(e,t){return{startScrollingFrom:.25*e[t.size],maxScrollValueAt:.05*e[t.size]}}(t,o);return n[o.end]<n[o.start]?wU({distanceToEdge:n[o.end],thresholds:a,dragStartTime:r,shouldUseTimeDampening:i}):-1*wU({distanceToEdge:n[o.start],thresholds:a,dragStartTime:r,shouldUseTimeDampening:i})},EU=fZ((function(e){return 0===e?0:e})),_U=function(e){var t=e.dragStartTime,n=e.container,r=e.subject,o=e.center,i=e.shouldUseTimeDampening,a={top:o.y-n.top,right:n.right-o.x,bottom:n.bottom-o.y,left:o.x-n.left},l=kU({container:n,distanceToEdges:a,dragStartTime:t,axis:zZ,shouldUseTimeDampening:i}),s=kU({container:n,distanceToEdges:a,dragStartTime:t,axis:HZ,shouldUseTimeDampening:i}),c=EU({x:s,y:l});if(cZ(c,aZ))return null;var u=function(e){var t=e.container,n=e.subject,r=e.proposedScroll,o=n.height>t.height,i=n.width>t.width;return i||o?i&&o?null:{x:i?0:r.x,y:o?0:r.y}:r}({container:n,subject:r,proposedScroll:c});return u?cZ(u,aZ)?null:u:null},CU=fZ((function(e){return 0===e?0:e>0?1:-1})),xU=(uU=function(e,t){return e<0?e:e>t?e-t:0},function(e){var t=e.current,n=e.max,r=e.change,o=lZ(t,r),i={x:uU(o.x,n.x),y:uU(o.y,n.y)};return cZ(i,aZ)?null:i}),SU=function(e){var t=e.max,n=e.current,r=e.change,o={x:Math.max(n.x,t.x),y:Math.max(n.y,t.y)},i=CU(r),a=xU({max:o,current:n,change:i});return!a||0!==i.x&&0===a.x||0!==i.y&&0===a.y},IU=function(e,t){return SU({current:e.scroll.current,max:e.scroll.max,change:t})},TU=function(e,t){var n=e.frame;return!!n&&SU({current:n.scroll.current,max:n.scroll.max,change:t})},NU=function(e){var t=e.state,n=e.dragStartTime,r=e.shouldUseTimeDampening,o=e.scrollWindow,i=e.scrollDroppable,a=t.current.page.borderBoxCenter,l=t.dimensions.draggables[t.critical.draggable.id].page.marginBox;if(t.isWindowScrollAllowed){var s=function(e){var t=e.viewport,n=e.subject,r=e.center,o=e.shouldUseTimeDampening,i=_U({dragStartTime:e.dragStartTime,container:t.frame,subject:n,center:r,shouldUseTimeDampening:o});return i&&IU(t,i)?i:null}({dragStartTime:n,viewport:t.viewport,subject:l,center:a,shouldUseTimeDampening:r});if(s)return void o(s)}var c=function(e){var t=e.center,n=e.destination,r=e.droppables;if(n){var o=r[n];return o.frame?o:null}return function(e,t){return EZ(hU(t),(function(t){return t.frame||XW(!1),mj(t.frame.pageMarginBox)(e)}))}(t,r)}({center:a,destination:uj(t.impact),droppables:t.dimensions.droppables});if(c){var u=function(e){var t=e.droppable,n=e.subject,r=e.center,o=e.dragStartTime,i=e.shouldUseTimeDampening,a=t.frame;if(!a)return null;var l=_U({dragStartTime:o,container:a.pageMarginBox,subject:n,center:r,shouldUseTimeDampening:i});return l&&TU(t,l)?l:null}({dragStartTime:n,droppable:c,subject:l,center:a,shouldUseTimeDampening:r});u&&i(c.descriptor.id,u)}},AU=function(e){var t=e.move,n=e.scrollDroppable,r=e.scrollWindow;return function(e){var o=e.scrollJumpRequest;if(o){var i=uj(e.impact);i||XW(!1);var a=function(e,t){if(!TU(e,t))return t;var r=function(e,t){var n=e.frame;return n&&TU(e,t)?xU({current:n.scroll.current,max:n.scroll.max,change:t}):null}(e,t);if(!r)return n(e.descriptor.id,t),null;var o=sZ(t,r);return n(e.descriptor.id,o),sZ(t,o)}(e.dimensions.droppables[i],o);if(a){var l=e.viewport,s=function(e,t,n){if(!e)return n;if(!IU(t,n))return n;var o=function(e,t){if(!IU(e,t))return null;var n=e.scroll.max,r=e.scroll.current;return xU({current:r,max:n,change:t})}(t,n);if(!o)return r(n),null;var i=sZ(n,o);return r(i),sZ(n,i)}(e.isWindowScrollAllowed,l,a);s&&function(e,n){var r=lZ(e.current.client.selection,n);t({client:r})}(e,s)}}}},RU={base:dU="data-rbd-drag-handle",draggableId:dU+"-draggable-id",contextId:dU+"-context-id"},LU=function(){var e="data-rbd-draggable";return{base:e,contextId:e+"-context-id",id:e+"-id"}}(),PU=function(){var e="data-rbd-droppable";return{base:e,contextId:e+"-context-id",id:e+"-id"}}(),OU="data-rbd-scroll-container-context-id",DU=function(e,t){return e.map((function(e){var n=e.styles[t];return n?e.selector+" { "+n+" }":""})).join(" ")},MU="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?_.useLayoutEffect:_.useEffect,BU=function(){var e=document.querySelector("head");return e||XW(!1),e},FU=function(e){var t=document.createElement("style");return e&&t.setAttribute("nonce",e),t.type="text/css",t};var zU=function(e){return e&&e.ownerDocument?e.ownerDocument.defaultView:window};function HU(e){return e instanceof zU(e).HTMLElement}function VU(){var e={draggables:{},droppables:{}},t=[];function n(e){t.length&&t.forEach((function(t){return t(e)}))}function r(t){return e.draggables[t]||null}function o(t){return e.droppables[t]||null}return{draggable:{register:function(t){e.draggables[t.descriptor.id]=t,n({type:"ADDITION",value:t})},update:function(t,n){var r=e.draggables[n.descriptor.id];r&&r.uniqueId===t.uniqueId&&(delete e.draggables[n.descriptor.id],e.draggables[t.descriptor.id]=t)},unregister:function(t){var o=t.descriptor.id,i=r(o);i&&t.uniqueId===i.uniqueId&&(delete e.draggables[o],n({type:"REMOVAL",value:t}))},getById:function(e){var t=r(e);return t||XW(!1),t},findById:r,exists:function(e){return Boolean(r(e))},getAllByType:function(t){return wZ(e.draggables).filter((function(e){return e.descriptor.type===t}))}},droppable:{register:function(t){e.droppables[t.descriptor.id]=t},unregister:function(t){var n=o(t.descriptor.id);n&&t.uniqueId===n.uniqueId&&delete e.droppables[t.descriptor.id]},getById:function(e){var t=o(e);return t||XW(!1),t},findById:o,exists:function(e){return Boolean(o(e))},getAllByType:function(t){return wZ(e.droppables).filter((function(e){return e.descriptor.type===t}))}},subscribe:function(e){return t.push(e),function(){var n=t.indexOf(e);-1!==n&&t.splice(n,1)}},clean:function(){e.draggables={},e.droppables={},t.length=0}}}var WU=C().createContext(null),ZU=function(){var e=document.body;return e||XW(!1),e},jU={position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0 0 0 0)","clip-path":"inset(100%)"},UU=0,$U={separator:"::"};function qU(e,t){return void 0===t&&(t=$U),(0,Co.Ye)((function(){return""+e+t.separator+UU++}),[t.separator,e])}var GU=C().createContext(null);function KU(e){var t=(0,_.useRef)(e);return(0,_.useEffect)((function(){t.current=e})),t}var YU,XU,JU=((YU={})[13]=!0,YU[9]=!0,YU),QU=function(e){JU[e.keyCode]&&e.preventDefault()},e$=function(){var e="visibilitychange";return"undefined"==typeof document?e:EZ([e,"ms"+e,"webkit"+e,"moz"+e,"o"+e],(function(e){return"on"+e in document}))||e}(),t$={type:"IDLE"};function n$(){}var r$=((XU={})[34]=!0,XU[33]=!0,XU[36]=!0,XU[35]=!0,XU);var o$={type:"IDLE"},i$={input:!0,button:!0,textarea:!0,select:!0,option:!0,optgroup:!0,video:!0,audio:!0};function a$(e,t){if(null==t)return!1;if(Boolean(i$[t.tagName.toLowerCase()]))return!0;var n=t.getAttribute("contenteditable");return"true"===n||""===n||t!==e&&a$(e,t.parentElement)}function l$(e,t){var n=t.target;return!!HU(n)&&a$(e,n)}var s$=function(e){return DW(e.getBoundingClientRect()).center},c$=function(){var e="matches";return"undefined"==typeof document?e:EZ([e,"msMatchesSelector","webkitMatchesSelector"],(function(e){return e in Element.prototype}))||e}();function u$(e,t){return null==e?null:e[c$](t)?e:u$(e.parentElement,t)}function d$(e,t){return e.closest?e.closest(t):u$(e,t)}function p$(e){e.preventDefault()}function m$(e){var t=e.expected,n=e.phase,r=e.isLockActive;return e.shouldWarn,!!r()&&t===n}function f$(e){var t=e.lockAPI,n=e.store,r=e.registry,o=e.draggableId;if(t.isClaimed())return!1;var i=r.draggable.findById(o);return!!i&&!!i.options.isEnabled&&!!mU(n.getState(),o)}var h$=[function(e){var t=(0,_.useRef)(t$),n=(0,_.useRef)(GW),r=(0,Co.Ye)((function(){return{eventName:"mousedown",fn:function(t){if(!t.defaultPrevented&&0===t.button&&!(t.ctrlKey||t.metaKey||t.shiftKey||t.altKey)){var r=e.findClosestDraggableId(t);if(r){var o=e.tryGetLock(r,a,{sourceEvent:t});if(o){t.preventDefault();var i={x:t.clientX,y:t.clientY};n.current(),c(o,i)}}}}}}),[e]),o=(0,Co.Ye)((function(){return{eventName:"webkitmouseforcewillbegin",fn:function(t){if(!t.defaultPrevented){var n=e.findClosestDraggableId(t);if(n){var r=e.findOptionsForDraggable(n);r&&(r.shouldRespectForcePress||e.canGetLock(n)&&t.preventDefault())}}}}}),[e]),i=(0,Co.I4)((function(){n.current=KW(window,[o,r],{passive:!1,capture:!0})}),[o,r]),a=(0,Co.I4)((function(){"IDLE"!==t.current.type&&(t.current=t$,n.current(),i())}),[i]),l=(0,Co.I4)((function(){var e=t.current;a(),"DRAGGING"===e.type&&e.actions.cancel({shouldBlockNextClick:!0}),"PENDING"===e.type&&e.actions.abort()}),[a]),s=(0,Co.I4)((function(){var e=function(e){var t=e.cancel,n=e.completed,r=e.getPhase,o=e.setPhase;return[{eventName:"mousemove",fn:function(e){var t=e.button,n=e.clientX,i=e.clientY;if(0===t){var a={x:n,y:i},l=r();if("DRAGGING"===l.type)return e.preventDefault(),void l.actions.move(a);if("PENDING"!==l.type&&XW(!1),s=l.point,c=a,Math.abs(c.x-s.x)>=5||Math.abs(c.y-s.y)>=5){var s,c;e.preventDefault();var u=l.actions.fluidLift(a);o({type:"DRAGGING",actions:u})}}}},{eventName:"mouseup",fn:function(e){var o=r();"DRAGGING"===o.type?(e.preventDefault(),o.actions.drop({shouldBlockNextClick:!0}),n()):t()}},{eventName:"mousedown",fn:function(e){"DRAGGING"===r().type&&e.preventDefault(),t()}},{eventName:"keydown",fn:function(e){if("PENDING"!==r().type)return 27===e.keyCode?(e.preventDefault(),void t()):void QU(e);t()}},{eventName:"resize",fn:t},{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(){"PENDING"===r().type&&t()}},{eventName:"webkitmouseforcedown",fn:function(e){var n=r();"IDLE"===n.type&&XW(!1),n.actions.shouldRespectForcePress()?t():e.preventDefault()}},{eventName:e$,fn:t}]}({cancel:l,completed:a,getPhase:function(){return t.current},setPhase:function(e){t.current=e}});n.current=KW(window,e,{capture:!0,passive:!1})}),[l,a]),c=(0,Co.I4)((function(e,n){"IDLE"!==t.current.type&&XW(!1),t.current={type:"PENDING",point:n,actions:e},s()}),[s]);MU((function(){return i(),function(){n.current()}}),[i])},function(e){var t=(0,_.useRef)(n$),n=(0,Co.Ye)((function(){return{eventName:"keydown",fn:function(n){if(!n.defaultPrevented&&32===n.keyCode){var o=e.findClosestDraggableId(n);if(o){var i=e.tryGetLock(o,s,{sourceEvent:n});if(i){n.preventDefault();var a=!0,l=i.snapLift();t.current(),t.current=KW(window,function(e,t){function n(){t(),e.cancel()}return[{eventName:"keydown",fn:function(r){return 27===r.keyCode?(r.preventDefault(),void n()):32===r.keyCode?(r.preventDefault(),t(),void e.drop()):40===r.keyCode?(r.preventDefault(),void e.moveDown()):38===r.keyCode?(r.preventDefault(),void e.moveUp()):39===r.keyCode?(r.preventDefault(),void e.moveRight()):37===r.keyCode?(r.preventDefault(),void e.moveLeft()):void(r$[r.keyCode]?r.preventDefault():QU(r))}},{eventName:"mousedown",fn:n},{eventName:"mouseup",fn:n},{eventName:"click",fn:n},{eventName:"touchstart",fn:n},{eventName:"resize",fn:n},{eventName:"wheel",fn:n,options:{passive:!0}},{eventName:e$,fn:n}]}(l,s),{capture:!0,passive:!1})}}}function s(){a||XW(!1),a=!1,t.current(),r()}}}}),[e]),r=(0,Co.I4)((function(){t.current=KW(window,[n],{passive:!1,capture:!0})}),[n]);MU((function(){return r(),function(){t.current()}}),[r])},function(e){var t=(0,_.useRef)(o$),n=(0,_.useRef)(GW),r=(0,Co.I4)((function(){return t.current}),[]),o=(0,Co.I4)((function(e){t.current=e}),[]),i=(0,Co.Ye)((function(){return{eventName:"touchstart",fn:function(t){if(!t.defaultPrevented){var r=e.findClosestDraggableId(t);if(r){var o=e.tryGetLock(r,l,{sourceEvent:t});if(o){var i=t.touches[0],a={x:i.clientX,y:i.clientY};n.current(),d(o,a)}}}}}}),[e]),a=(0,Co.I4)((function(){n.current=KW(window,[i],{capture:!0,passive:!1})}),[i]),l=(0,Co.I4)((function(){var e=t.current;"IDLE"!==e.type&&("PENDING"===e.type&&clearTimeout(e.longPressTimerId),o(o$),n.current(),a())}),[a,o]),s=(0,Co.I4)((function(){var e=t.current;l(),"DRAGGING"===e.type&&e.actions.cancel({shouldBlockNextClick:!0}),"PENDING"===e.type&&e.actions.abort()}),[l]),c=(0,Co.I4)((function(){var e={capture:!0,passive:!1},t={cancel:s,completed:l,getPhase:r},o=KW(window,function(e){var t=e.cancel,n=e.completed,r=e.getPhase;return[{eventName:"touchmove",options:{capture:!1},fn:function(e){var n=r();if("DRAGGING"===n.type){n.hasMoved=!0;var o=e.touches[0],i={x:o.clientX,y:o.clientY};e.preventDefault(),n.actions.move(i)}else t()}},{eventName:"touchend",fn:function(e){var o=r();"DRAGGING"===o.type?(e.preventDefault(),o.actions.drop({shouldBlockNextClick:!0}),n()):t()}},{eventName:"touchcancel",fn:function(e){"DRAGGING"===r().type?(e.preventDefault(),t()):t()}},{eventName:"touchforcechange",fn:function(e){var n=r();"IDLE"===n.type&&XW(!1);var o=e.touches[0];if(o&&o.force>=.15){var i=n.actions.shouldRespectForcePress();if("PENDING"!==n.type)return i?n.hasMoved?void e.preventDefault():void t():void e.preventDefault();i&&t()}}},{eventName:e$,fn:t}]}(t),e),i=KW(window,function(e){var t=e.cancel,n=e.getPhase;return[{eventName:"orientationchange",fn:t},{eventName:"resize",fn:t},{eventName:"contextmenu",fn:function(e){e.preventDefault()}},{eventName:"keydown",fn:function(e){"DRAGGING"===n().type?(27===e.keyCode&&e.preventDefault(),t()):t()}},{eventName:e$,fn:t}]}(t),e);n.current=function(){o(),i()}}),[s,r,l]),u=(0,Co.I4)((function(){var e=r();"PENDING"!==e.type&&XW(!1);var t=e.actions.fluidLift(e.point);o({type:"DRAGGING",actions:t,hasMoved:!1})}),[r,o]),d=(0,Co.I4)((function(e,t){"IDLE"!==r().type&&XW(!1);var n=setTimeout(u,120);o({type:"PENDING",point:t,actions:e,longPressTimerId:n}),c()}),[c,r,o,u]);MU((function(){return a(),function(){n.current();var e=r();"PENDING"===e.type&&(clearTimeout(e.longPressTimerId),o(o$))}}),[r,a,o]),MU((function(){return KW(window,[{eventName:"touchmove",fn:function(){},options:{capture:!1,passive:!1}}])}),[])}];function g$(e){var t=e.contextId,n=e.store,r=e.registry,o=e.customSensors,i=e.enableDefaultSensors,a=[].concat(i?h$:[],o||[]),l=(0,_.useState)((function(){return function(){var e=null;function t(){e||XW(!1),e=null}return{isClaimed:function(){return Boolean(e)},isActive:function(t){return t===e},claim:function(t){e&&XW(!1);var n={abandon:t};return e=n,n},release:t,tryAbandon:function(){e&&(e.abandon(),t())}}}()}))[0],s=(0,Co.I4)((function(e,t){e.isDragging&&!t.isDragging&&l.tryAbandon()}),[l]);MU((function(){var e=n.getState();return n.subscribe((function(){var t=n.getState();s(e,t),e=t}))}),[l,n,s]),MU((function(){return l.tryAbandon}),[l.tryAbandon]);for(var c=(0,Co.I4)((function(e){return f$({lockAPI:l,registry:r,store:n,draggableId:e})}),[l,r,n]),u=(0,Co.I4)((function(e,o,i){return function(e){var t=e.lockAPI,n=e.contextId,r=e.store,o=e.registry,i=e.draggableId,a=e.forceSensorStop,l=e.sourceEvent;if(!f$({lockAPI:t,store:r,registry:o,draggableId:i}))return null;var s=o.draggable.getById(i),c=function(e,t){var n="["+LU.contextId+'="'+e+'"]',r=EZ(_Z(document.querySelectorAll(n)),(function(e){return e.getAttribute(LU.id)===t}));return r&&HU(r)?r:null}(n,s.descriptor.id);if(!c)return null;if(l&&!s.options.canDragInteractiveElements&&l$(c,l))return null;var u=t.claim(a||GW),d="PRE_DRAG";function p(){return s.options.shouldRespectForcePress}function m(){return t.isActive(u)}var f=function(e,t){m$({expected:e,phase:d,isLockActive:m,shouldWarn:!0})&&r.dispatch(t())}.bind(null,"DRAGGING");function h(e){function n(){t.release(),d="COMPLETED"}function o(t,o){if(void 0===o&&(o={shouldBlockNextClick:!1}),e.cleanup(),o.shouldBlockNextClick){var i=KW(window,[{eventName:"click",fn:p$,options:{once:!0,passive:!1,capture:!0}}]);setTimeout(i)}n(),r.dispatch(zj({reason:t}))}return"PRE_DRAG"!==d&&(n(),"PRE_DRAG"!==d&&XW(!1)),r.dispatch(function(e){return{type:"LIFT",payload:e}}(e.liftActionArgs)),d="DRAGGING",(0,nr.Z)({isActive:function(){return m$({expected:"DRAGGING",phase:d,isLockActive:m,shouldWarn:!1})},shouldRespectForcePress:p,drop:function(e){return o("DROP",e)},cancel:function(e){return o("CANCEL",e)}},e.actions)}return{isActive:function(){return m$({expected:"PRE_DRAG",phase:d,isLockActive:m,shouldWarn:!1})},shouldRespectForcePress:p,fluidLift:function(e){var t=$W((function(e){f((function(){return Pj({client:e})}))})),n=h({liftActionArgs:{id:i,clientSelection:e,movementMode:"FLUID"},cleanup:function(){return t.cancel()},actions:{move:t}});return(0,nr.Z)({},n,{move:t})},snapLift:function(){var e={moveUp:function(){return f(Oj)},moveRight:function(){return f(Mj)},moveDown:function(){return f(Dj)},moveLeft:function(){return f(Bj)}};return h({liftActionArgs:{id:i,clientSelection:s$(c),movementMode:"SNAP"},cleanup:GW,actions:e})},abort:function(){m$({expected:"PRE_DRAG",phase:d,isLockActive:m,shouldWarn:!0})&&t.release()}}}({lockAPI:l,registry:r,contextId:t,store:n,draggableId:e,forceSensorStop:o,sourceEvent:i&&i.sourceEvent?i.sourceEvent:null})}),[t,l,r,n]),d=(0,Co.I4)((function(e){return function(e,t){var n=function(e,t){var n,r=t.target;if(!((n=r)instanceof zU(n).Element))return null;var o=d$(r,function(e){return"["+RU.contextId+'="'+e+'"]'}(e));return o&&HU(o)?o:null}(e,t);return n?n.getAttribute(RU.draggableId):null}(t,e)}),[t]),p=(0,Co.I4)((function(e){var t=r.draggable.findById(e);return t?t.options:null}),[r.draggable]),m=(0,Co.I4)((function(){l.isClaimed()&&(l.tryAbandon(),"IDLE"!==n.getState().phase&&n.dispatch({type:"FLUSH",payload:null}))}),[l,n]),f=(0,Co.I4)(l.isClaimed,[l]),h=(0,Co.Ye)((function(){return{canGetLock:c,tryGetLock:u,findClosestDraggableId:d,findOptionsForDraggable:p,tryReleaseLock:m,isLockClaimed:f}}),[c,u,d,p,m,f]),g=0;g<a.length;g++)a[g](h)}function v$(e){return e.current||XW(!1),e.current}function b$(e){var t=e.contextId,n=e.setCallbacks,r=e.sensors,o=e.nonce,i=e.dragHandleUsageInstructions,a=(0,_.useRef)(null),l=KU(e),s=(0,Co.I4)((function(){return function(e){return{onBeforeCapture:e.onBeforeCapture,onBeforeDragStart:e.onBeforeDragStart,onDragStart:e.onDragStart,onDragEnd:e.onDragEnd,onDragUpdate:e.onDragUpdate}}(l.current)}),[l]),c=function(e){var t=(0,Co.Ye)((function(){return function(e){return"rbd-announcement-"+e}(e)}),[e]),n=(0,_.useRef)(null);return(0,_.useEffect)((function(){var e=document.createElement("div");return n.current=e,e.id=t,e.setAttribute("aria-live","assertive"),e.setAttribute("aria-atomic","true"),(0,nr.Z)(e.style,jU),ZU().appendChild(e),function(){setTimeout((function(){var t=ZU();t.contains(e)&&t.removeChild(e),e===n.current&&(n.current=null)}))}}),[t]),(0,Co.I4)((function(e){var t=n.current;t&&(t.textContent=e)}),[])}(t),u=function(e){var t=e.contextId,n=e.text,r=qU("hidden-text",{separator:"-"}),o=(0,Co.Ye)((function(){return function(e){return"rbd-hidden-text-"+e.contextId+"-"+e.uniqueId}({contextId:t,uniqueId:r})}),[r,t]);return(0,_.useEffect)((function(){var e=document.createElement("div");return e.id=o,e.textContent=n,e.style.display="none",ZU().appendChild(e),function(){var t=ZU();t.contains(e)&&t.removeChild(e)}}),[o,n]),o}({contextId:t,text:i}),d=function(e,t){var n=(0,Co.Ye)((function(){return function(e){var t,n,r=function(e){return function(t){return"["+t+'="'+e+'"]'}}(e),o=(t="\n cursor: -webkit-grab;\n cursor: grab;\n ",{selector:r(RU.contextId),styles:{always:"\n -webkit-touch-callout: none;\n -webkit-tap-highlight-color: rgba(0,0,0,0);\n touch-action: manipulation;\n ",resting:t,dragging:"pointer-events: none;",dropAnimating:t}}),i=[(n="\n transition: "+Uj.outOfTheWay+";\n ",{selector:r(LU.contextId),styles:{dragging:n,dropAnimating:n,userCancel:n}}),o,{selector:r(PU.contextId),styles:{always:"overflow-anchor: none;"}},{selector:"body",styles:{dragging:"\n cursor: grabbing;\n cursor: -webkit-grabbing;\n user-select: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n overflow-anchor: none;\n "}}];return{always:DU(i,"always"),resting:DU(i,"resting"),dragging:DU(i,"dragging"),dropAnimating:DU(i,"dropAnimating"),userCancel:DU(i,"userCancel")}}(e)}),[e]),r=(0,_.useRef)(null),o=(0,_.useRef)(null),i=(0,Co.I4)((0,UW.Z)((function(e){var t=o.current;t||XW(!1),t.textContent=e})),[]),a=(0,Co.I4)((function(e){var t=r.current;t||XW(!1),t.textContent=e}),[]);MU((function(){(r.current||o.current)&&XW(!1);var l=FU(t),s=FU(t);return r.current=l,o.current=s,l.setAttribute("data-rbd-always",e),s.setAttribute("data-rbd-dynamic",e),BU().appendChild(l),BU().appendChild(s),a(n.always),i(n.resting),function(){var e=function(e){var t=e.current;t||XW(!1),BU().removeChild(t),e.current=null};e(r),e(o)}}),[t,a,i,n.always,n.resting,e]);var l=(0,Co.I4)((function(){return i(n.dragging)}),[i,n.dragging]),s=(0,Co.I4)((function(e){i("DROP"!==e?n.userCancel:n.dropAnimating)}),[i,n.dropAnimating,n.userCancel]),c=(0,Co.I4)((function(){o.current&&i(n.resting)}),[i,n.resting]);return(0,Co.Ye)((function(){return{dragging:l,dropping:s,resting:c}}),[l,s,c])}(t,o),p=(0,Co.I4)((function(e){v$(a).dispatch(e)}),[]),m=(0,Co.Ye)((function(){return(0,JV.DE)({publishWhileDragging:Tj,updateDroppableScroll:Aj,updateDroppableIsEnabled:Rj,updateDroppableIsCombineEnabled:Lj,collectionStarting:Nj},p)}),[p]),f=function(){var e=(0,Co.Ye)(VU,[]);return(0,_.useEffect)((function(){return function(){requestAnimationFrame(e.clean)}}),[e]),e}(),h=(0,Co.Ye)((function(){return pU(f,m)}),[f,m]),g=(0,Co.Ye)((function(){return function(e){var t=e.scrollDroppable,n=e.scrollWindow,r=e.move,o=function(e){var t=e.scrollDroppable,n=$W(e.scrollWindow),r=$W(t),o=null,i=function(e){o||XW(!1);var t=o,i=t.shouldUseTimeDampening,a=t.dragStartTime;NU({state:e,scrollWindow:n,scrollDroppable:r,dragStartTime:a,shouldUseTimeDampening:i})};return{start:function(e){o&&XW(!1);var t=Date.now(),n=!1,r=function(){n=!0};NU({state:e,dragStartTime:0,shouldUseTimeDampening:!1,scrollWindow:r,scrollDroppable:r}),o={dragStartTime:t,shouldUseTimeDampening:n},n&&i(e)},stop:function(){o&&(n.cancel(),r.cancel(),o=null)},scroll:i}}({scrollWindow:n,scrollDroppable:t}),i=AU({move:r,scrollWindow:n,scrollDroppable:t});return{scroll:function(e){"DRAGGING"===e.phase&&("FLUID"!==e.movementMode?e.scrollJumpRequest&&i(e):o.scroll(e))},start:o.start,stop:o.stop}}((0,nr.Z)({scrollWindow:fU,scrollDroppable:h.scrollDroppable},(0,JV.DE)({move:Pj},p)))}),[h.scrollDroppable,p]),v=function(e){var t=(0,_.useRef)({}),n=(0,_.useRef)(null),r=(0,_.useRef)(null),o=(0,_.useRef)(!1),i=(0,Co.I4)((function(e,n){var r={id:e,focus:n};return t.current[e]=r,function(){var n=t.current;n[e]!==r&&delete n[e]}}),[]),a=(0,Co.I4)((function(t){var n=function(e,t){var n="["+RU.contextId+'="'+e+'"]',r=_Z(document.querySelectorAll(n));if(!r.length)return null;var o=EZ(r,(function(e){return e.getAttribute(RU.draggableId)===t}));return o&&HU(o)?o:null}(e,t);n&&n!==document.activeElement&&n.focus()}),[e]),l=(0,Co.I4)((function(e,t){n.current===e&&(n.current=t)}),[]),s=(0,Co.I4)((function(){r.current||o.current&&(r.current=requestAnimationFrame((function(){r.current=null;var e=n.current;e&&a(e)})))}),[a]),c=(0,Co.I4)((function(e){n.current=null;var t=document.activeElement;t&&t.getAttribute(RU.draggableId)===e&&(n.current=e)}),[]);return MU((function(){return o.current=!0,function(){o.current=!1;var e=r.current;e&&cancelAnimationFrame(e)}}),[]),(0,Co.Ye)((function(){return{register:i,tryRecordFocus:c,tryRestoreFocusRecorded:s,tryShiftRecord:l}}),[i,c,s,l])}(t),b=(0,Co.Ye)((function(){return function(e){var t,n=e.dimensionMarshal,r=e.focusMarshal,o=e.styleMarshal,i=e.getResponders,a=e.announce,l=e.autoScroller;return(0,JV.MT)(Ij,iU((0,JV.md)((t=o,function(){return function(e){return function(n){"INITIAL_PUBLISH"===n.type&&t.dragging(),"DROP_ANIMATE"===n.type&&t.dropping(n.payload.completed.result.reason),"FLUSH"!==n.type&&"DROP_COMPLETE"!==n.type||t.resting(),e(n)}}}),function(e){return function(){return function(t){return function(n){"DROP_COMPLETE"!==n.type&&"FLUSH"!==n.type&&"DROP_ANIMATE"!==n.type||e.stopPublishing(),t(n)}}}}(n),function(e){return function(t){var n=t.getState,r=t.dispatch;return function(t){return function(o){if("LIFT"===o.type){var i=o.payload,a=i.id,l=i.clientSelection,s=i.movementMode,c=n();"DROP_ANIMATING"===c.phase&&r(Fj({completed:c.completed})),"IDLE"!==n().phase&&XW(!1),r({type:"FLUSH",payload:null}),r({type:"BEFORE_INITIAL_CAPTURE",payload:{draggableId:a,movementMode:s}});var u={draggableId:a,scrollOptions:{shouldPublishImmediately:"SNAP"===s}},d=e.startPublishing(u),p=d.critical,m=d.dimensions,f=d.viewport;r({type:"INITIAL_PUBLISH",payload:{critical:p,dimensions:m,clientSelection:l,movementMode:s,viewport:f}})}else t(o)}}}}(n),Kj,nU,rU,oU,function(e){return function(t){return function(n){return function(r){if(function(e){return"DROP_COMPLETE"===e.type||"DROP_ANIMATE"===e.type||"FLUSH"===e.type}(r))return e.stop(),void n(r);if("INITIAL_PUBLISH"===r.type){n(r);var o=t.getState();return"DRAGGING"!==o.phase&&XW(!1),void e.start(o)}n(r),e.scroll(t.getState())}}}}(l),Xj,function(e){var t=!1;return function(){return function(n){return function(r){if("INITIAL_PUBLISH"===r.type)return t=!0,e.tryRecordFocus(r.payload.critical.draggable.id),n(r),void e.tryRestoreFocusRecorded();if(n(r),t){if("FLUSH"===r.type)return t=!1,void e.tryRestoreFocusRecorded();if("DROP_COMPLETE"===r.type){t=!1;var o=r.payload.completed.result;o.combine&&e.tryShiftRecord(o.draggableId,o.combine.draggableId),e.tryRestoreFocusRecorded()}}}}}}(r),tU(i,a))))}({announce:c,autoScroller:g,dimensionMarshal:h,focusMarshal:v,getResponders:s,styleMarshal:d})}),[c,g,h,v,s,d]);a.current=b;var y=(0,Co.I4)((function(){var e=v$(a);"IDLE"!==e.getState().phase&&e.dispatch({type:"FLUSH",payload:null})}),[]),w=(0,Co.I4)((function(){var e=v$(a).getState();return e.isDragging||"DROP_ANIMATING"===e.phase}),[]);n((0,Co.Ye)((function(){return{isDragging:w,tryAbort:y}}),[w,y]));var k=(0,Co.I4)((function(e){return mU(v$(a).getState(),e)}),[]),E=(0,Co.I4)((function(){return pj(v$(a).getState())}),[]),x=(0,Co.Ye)((function(){return{marshal:h,focus:v,contextId:t,canLift:k,isMovementAllowed:E,dragHandleUsageInstructionsId:u,registry:f}}),[t,h,u,v,k,E,f]);return g$({contextId:t,store:b,registry:f,customSensors:r,enableDefaultSensors:!1!==e.enableDefaultSensors}),(0,_.useEffect)((function(){return y}),[y]),C().createElement(GU.Provider,{value:x},C().createElement(oW,{context:WU,store:b},e.children))}var y$=0;function w$(e){var t=(0,Co.Ye)((function(){return""+y$++}),[]),n=e.dragHandleUsageInstructions||"\n Press space bar to start a drag.\n When dragging you can use the arrow keys to move the item around and escape to cancel.\n Some screen readers may require you to be in focus mode or to use your pass through key\n";return C().createElement(JW,null,(function(r){return C().createElement(b$,{nonce:e.nonce,contextId:t,setCallbacks:r,dragHandleUsageInstructions:n,enableDefaultSensors:e.enableDefaultSensors,sensors:e.sensors,onBeforeCapture:e.onBeforeCapture,onBeforeDragStart:e.onBeforeDragStart,onDragStart:e.onDragStart,onDragUpdate:e.onDragUpdate,onDragEnd:e.onDragEnd},e.children)}))}var k$=function(e){return function(t){return e===t}},E$=k$("scroll"),_$=k$("auto"),C$=(k$("visible"),function(e,t){return t(e.overflowX)||t(e.overflowY)}),x$=function e(t){return null==t||t===document.body||t===document.documentElement?null:function(e){var t=window.getComputedStyle(e),n={overflowX:t.overflowX,overflowY:t.overflowY};return C$(n,E$)||C$(n,_$)}(t)?t:e(t.parentElement)},S$=function(e){return{x:e.scrollLeft,y:e.scrollTop}},I$=function e(t){return!!t&&("fixed"===window.getComputedStyle(t).position||e(t.parentElement))},T$={passive:!1},N$={passive:!0},A$=function(e){return e.shouldPublishImmediately?T$:N$};function R$(e){var t=(0,_.useContext)(e);return t||XW(!1),t}var L$=function(e){return e&&e.env.closestScrollable||null};function P$(){}var O$={width:0,height:0,margin:{top:0,right:0,bottom:0,left:0}},D$=C().memo((function(e){var t=(0,_.useRef)(null),n=(0,Co.I4)((function(){t.current&&(clearTimeout(t.current),t.current=null)}),[]),r=e.animate,o=e.onTransitionEnd,i=e.onClose,a=e.contextId,l=(0,_.useState)("open"===e.animate),s=l[0],c=l[1];(0,_.useEffect)((function(){return s?"open"!==r?(n(),c(!1),P$):t.current?P$:(t.current=setTimeout((function(){t.current=null,c(!1)})),n):P$}),[r,s,n]);var u=(0,Co.I4)((function(e){"height"===e.propertyName&&(o(),"close"===r&&i())}),[r,i,o]),d=function(e){var t=e.isAnimatingOpenOnMount,n=e.placeholder,r=e.animate,o=function(e){var t=e.placeholder;return e.isAnimatingOpenOnMount||"close"===e.animate?O$:{height:t.client.borderBox.height,width:t.client.borderBox.width,margin:t.client.margin}}({isAnimatingOpenOnMount:t,placeholder:n,animate:r});return{display:n.display,boxSizing:"border-box",width:o.width,height:o.height,marginTop:o.margin.top,marginRight:o.margin.right,marginBottom:o.margin.bottom,marginLeft:o.margin.left,flexShrink:"0",flexGrow:"0",pointerEvents:"none",transition:"none"!==r?Uj.placeholder:null}}({isAnimatingOpenOnMount:s,animate:e.animate,placeholder:e.placeholder});return C().createElement(e.placeholder.tagName,{style:d,"data-rbd-placeholder-context-id":a,onTransitionEnd:u,ref:e.innerRef})})),M$=C().createContext(null),B$=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).state={isVisible:Boolean(t.props.on),data:t.props.on,animate:t.props.shouldAnimate&&t.props.on?"open":"none"},t.onClose=function(){"close"===t.state.animate&&t.setState({isVisible:!1})},t}return(0,XV.Z)(t,e),t.getDerivedStateFromProps=function(e,t){return e.shouldAnimate?e.on?{isVisible:!0,data:e.on,animate:"open"}:t.isVisible?{isVisible:!0,data:t.data,animate:"close"}:{isVisible:!1,animate:"close",data:null}:{isVisible:Boolean(e.on),data:e.on,animate:"none"}},t.prototype.render=function(){if(!this.state.isVisible)return null;var e={onClose:this.onClose,data:this.state.data,animate:this.state.animate};return this.props.children(e)},t}(C().PureComponent),F$=function(e,t){return t?Uj.drop(t.duration):e?Uj.snap:Uj.fluid},z$=function(e,t){return e?t?Vj:Wj:null};function H$(e){return"DRAGGING"===e.type?function(e){var t=e.dimension.client,n=e.offset,r=e.combineWith,o=e.dropping,i=Boolean(r),a=function(e){return null!=e.forceShouldAnimate?e.forceShouldAnimate:"SNAP"===e.mode}(e),l=Boolean(o),s=l?function(e,t){var n=$j(e);return n?t?n+" scale("+Zj+")":n:null}(n,i):qj(n);return{position:"fixed",top:t.marginBox.top,left:t.marginBox.left,boxSizing:"border-box",width:t.borderBox.width,height:t.borderBox.height,transition:F$(a,o),transform:s,opacity:z$(i,l),zIndex:l?4500:5e3,pointerEvents:"none"}}(e):{transform:qj((t=e).offset),transition:t.shouldAnimateDisplacement?null:"none"};var t}function V$(e){e.preventDefault()}var W$=function(e,t){return e===t},Z$=function(e){var t=e.combine,n=e.destination;return n?n.droppableId:t?t.droppableId:null};function j$(e){return{isDragging:!1,isDropAnimating:!1,isClone:!1,dropAnimation:null,mode:null,draggingOver:null,combineTargetFor:e,combineWith:null}}var U$={mapped:{type:"SECONDARY",offset:aZ,combineTargetFor:null,shouldAnimateDisplacement:!0,snapshot:j$(null)}},$$=PW((function(){var e,t,n,r=(e=(0,UW.Z)((function(e,t){return{x:e,y:t}})),t=(0,UW.Z)((function(e,t,n,r,o){return{isDragging:!0,isClone:t,isDropAnimating:Boolean(o),dropAnimation:o,mode:e,draggingOver:n,combineWith:r,combineTargetFor:null}})),n=(0,UW.Z)((function(e,n,r,o,i,a,l){return{mapped:{type:"DRAGGING",dropping:null,draggingOver:i,combineWith:a,mode:n,offset:e,dimension:r,forceShouldAnimate:l,snapshot:t(n,o,i,a,null)}}})),function(r,o){if(r.isDragging){if(r.critical.draggable.id!==o.draggableId)return null;var i=r.current.client.offset,a=r.dimensions.draggables[o.draggableId],l=uj(r.impact),s=(u=r.impact).at&&"COMBINE"===u.at.type?u.at.combine.draggableId:null,c=r.forceShouldAnimate;return n(e(i.x,i.y),r.movementMode,a,o.isClone,l,s,c)}var u;if("DROP_ANIMATING"===r.phase){var d=r.completed;if(d.result.draggableId!==o.draggableId)return null;var p=o.isClone,m=r.dimensions.draggables[o.draggableId],f=d.result,h=f.mode,g=Z$(f),v=function(e){return e.combine?e.combine.draggableId:null}(f),b={duration:r.dropDuration,curve:Hj,moveTo:r.newHomeClientOffset,opacity:v?Vj:null,scale:v?Zj:null};return{mapped:{type:"DRAGGING",offset:r.newHomeClientOffset,dimension:m,dropping:b,draggingOver:g,combineWith:v,mode:h,forceShouldAnimate:null,snapshot:t(h,p,g,v,b)}}}return null}),o=function(){var e=(0,UW.Z)((function(e,t){return{x:e,y:t}})),t=(0,UW.Z)(j$),n=(0,UW.Z)((function(e,n,r){return void 0===n&&(n=null),{mapped:{type:"SECONDARY",offset:e,combineTargetFor:n,shouldAnimateDisplacement:r,snapshot:t(n)}}})),r=function(e){return e?n(aZ,e,!0):null},o=function(t,o,i,a){var l=i.displaced.visible[t],s=Boolean(a.inVirtualList&&a.effected[t]),c=AZ(i),u=c&&c.draggableId===t?o:null;if(!l){if(!s)return r(u);if(i.displaced.invisible[t])return null;var d=uZ(a.displacedBy.point),p=e(d.x,d.y);return n(p,u,!0)}if(s)return r(u);var m=i.displacedBy.point,f=e(m.x,m.y);return n(f,u,l.shouldAnimate)};return function(e,t){if(e.isDragging)return e.critical.draggable.id===t.draggableId?null:o(t.draggableId,e.critical.draggable.id,e.impact,e.afterCritical);if("DROP_ANIMATING"===e.phase){var n=e.completed;return n.result.draggableId===t.draggableId?null:o(t.draggableId,n.result.draggableId,n.impact,n.afterCritical)}return null}}();return function(e,t){return r(e,t)||o(e,t)||U$}}),{dropAnimationFinished:function(){return{type:"DROP_ANIMATION_FINISHED",payload:null}}},null,{context:WU,pure:!0,areStatePropsEqual:W$})((function(e){var t=(0,_.useRef)(null),n=(0,Co.I4)((function(e){t.current=e}),[]),r=(0,Co.I4)((function(){return t.current}),[]),o=R$(GU),i=o.contextId,a=o.dragHandleUsageInstructionsId,l=o.registry,s=R$(M$),c=s.type,u=s.droppableId,d=(0,Co.Ye)((function(){return{id:e.draggableId,index:e.index,type:c,droppableId:u}}),[e.draggableId,e.index,c,u]),p=e.children,m=e.draggableId,f=e.isEnabled,h=e.shouldRespectForcePress,g=e.canDragInteractiveElements,v=e.isClone,b=e.mapped,y=e.dropAnimationFinished;v||function(e){var t=qU("draggable"),n=e.descriptor,r=e.registry,o=e.getDraggableRef,i=e.canDragInteractiveElements,a=e.shouldRespectForcePress,l=e.isEnabled,s=(0,Co.Ye)((function(){return{canDragInteractiveElements:i,shouldRespectForcePress:a,isEnabled:l}}),[i,l,a]),c=(0,Co.I4)((function(e){var t=o();return t||XW(!1),function(e,t,n){void 0===n&&(n=aZ);var r=window.getComputedStyle(t),o=t.getBoundingClientRect(),i=ZW(o,r),a=WW(i,n);return{descriptor:e,placeholder:{client:i,tagName:t.tagName.toLowerCase(),display:r.display},displaceBy:{x:i.marginBox.width,y:i.marginBox.height},client:i,page:a}}(n,t,e)}),[n,o]),u=(0,Co.Ye)((function(){return{uniqueId:t,descriptor:n,options:s,getDimension:c}}),[n,c,s,t]),d=(0,_.useRef)(u),p=(0,_.useRef)(!0);MU((function(){return r.draggable.register(d.current),function(){return r.draggable.unregister(d.current)}}),[r.draggable]),MU((function(){if(p.current)p.current=!1;else{var e=d.current;d.current=u,r.draggable.update(u,e)}}),[u,r.draggable])}((0,Co.Ye)((function(){return{descriptor:d,registry:l,getDraggableRef:r,canDragInteractiveElements:g,shouldRespectForcePress:h,isEnabled:f}}),[d,l,r,g,h,f]));var w=(0,Co.Ye)((function(){return f?{tabIndex:0,role:"button","aria-describedby":a,"data-rbd-drag-handle-draggable-id":m,"data-rbd-drag-handle-context-id":i,draggable:!1,onDragStart:V$}:null}),[i,a,m,f]),k=(0,Co.I4)((function(e){"DRAGGING"===b.type&&b.dropping&&"transform"===e.propertyName&&y()}),[y,b]),E=(0,Co.Ye)((function(){var e=H$(b),t="DRAGGING"===b.type&&b.dropping?k:null;return{innerRef:n,draggableProps:{"data-rbd-draggable-context-id":i,"data-rbd-draggable-id":m,style:e,onTransitionEnd:t},dragHandleProps:w}}),[i,w,m,b,k,n]),C=(0,Co.Ye)((function(){return{draggableId:d.id,type:d.type,source:{index:d.index,droppableId:d.droppableId}}}),[d.droppableId,d.id,d.index,d.type]);return p(E,b.snapshot,C)}));function q$(e){return R$(M$).isUsingCloneFor!==e.draggableId||e.isClone?C().createElement($$,e):null}function G$(e){var t="boolean"!=typeof e.isDragDisabled||!e.isDragDisabled,n=Boolean(e.disableInteractiveElementBlocking),r=Boolean(e.shouldRespectForcePress);return C().createElement(q$,(0,nr.Z)({},e,{isClone:!1,isEnabled:t,canDragInteractiveElements:n,shouldRespectForcePress:r}))}var K$=function(e,t){return e===t.droppable.type},Y$=function(e,t){return t.draggables[e.draggable.id]},X$={mode:"standard",type:"DEFAULT",direction:"vertical",isDropDisabled:!1,isCombineEnabled:!1,ignoreContainerClipping:!1,renderClone:null,getContainerForClone:function(){return document.body||XW(!1),document.body}},J$=PW((function(){var e={placeholder:null,shouldAnimatePlaceholder:!0,snapshot:{isDraggingOver:!1,draggingOverWith:null,draggingFromThisWith:null,isUsingPlaceholder:!1},useClone:null},t=(0,nr.Z)({},e,{shouldAnimatePlaceholder:!1}),n=(0,UW.Z)((function(e){return{draggableId:e.id,type:e.type,source:{index:e.index,droppableId:e.droppableId}}})),r=(0,UW.Z)((function(r,o,i,a,l,s){var c=l.descriptor.id;if(l.descriptor.droppableId===r){var u=s?{render:s,dragging:n(l.descriptor)}:null,d={isDraggingOver:i,draggingOverWith:i?c:null,draggingFromThisWith:c,isUsingPlaceholder:!0};return{placeholder:l.placeholder,shouldAnimatePlaceholder:!1,snapshot:d,useClone:u}}if(!o)return t;if(!a)return e;var p={isDraggingOver:i,draggingOverWith:c,draggingFromThisWith:null,isUsingPlaceholder:!0};return{placeholder:l.placeholder,shouldAnimatePlaceholder:!0,snapshot:p,useClone:null}}));return function(n,o){var i=o.droppableId,a=o.type,l=!o.isDropDisabled,s=o.renderClone;if(n.isDragging){var c=n.critical;if(!K$(a,c))return t;var u=Y$(c,n.dimensions),d=uj(n.impact)===i;return r(i,l,d,d,u,s)}if("DROP_ANIMATING"===n.phase){var p=n.completed;if(!K$(a,p.critical))return t;var m=Y$(p.critical,n.dimensions);return r(i,l,Z$(p.result)===i,uj(p.impact)===i,m,s)}if("IDLE"===n.phase&&n.completed&&!n.shouldFlush){var f=n.completed;if(!K$(a,f.critical))return t;var h=uj(f.impact)===i,g=Boolean(f.impact.at&&"COMBINE"===f.impact.at.type),v=f.critical.droppable.id===i;return h?g?e:t:v?e:t}return t}}),{updateViewportMaxScroll:function(e){return{type:"UPDATE_VIEWPORT_MAX_SCROLL",payload:e}}},null,{context:WU,pure:!0,areStatePropsEqual:W$})((function(e){var t=(0,_.useContext)(GU);t||XW(!1);var n=t.contextId,r=t.isMovementAllowed,o=(0,_.useRef)(null),i=(0,_.useRef)(null),a=e.children,l=e.droppableId,s=e.type,c=e.mode,u=e.direction,d=e.ignoreContainerClipping,p=e.isDropDisabled,m=e.isCombineEnabled,f=e.snapshot,h=e.useClone,g=e.updateViewportMaxScroll,v=e.getContainerForClone,b=(0,Co.I4)((function(){return o.current}),[]),y=(0,Co.I4)((function(e){o.current=e}),[]),w=((0,Co.I4)((function(){return i.current}),[]),(0,Co.I4)((function(e){i.current=e}),[])),k=(0,Co.I4)((function(){r()&&g({maxScroll:sU()})}),[r,g]);!function(e){var t=(0,_.useRef)(null),n=R$(GU),r=qU("droppable"),o=n.registry,i=n.marshal,a=KU(e),l=(0,Co.Ye)((function(){return{id:e.droppableId,type:e.type,mode:e.mode}}),[e.droppableId,e.mode,e.type]),s=(0,_.useRef)(l),c=(0,Co.Ye)((function(){return(0,UW.Z)((function(e,n){t.current||XW(!1);var r={x:e,y:n};i.updateDroppableScroll(l.id,r)}))}),[l.id,i]),u=(0,Co.I4)((function(){var e=t.current;return e&&e.env.closestScrollable?S$(e.env.closestScrollable):aZ}),[]),d=(0,Co.I4)((function(){var e=u();c(e.x,e.y)}),[u,c]),p=(0,Co.Ye)((function(){return $W(d)}),[d]),m=(0,Co.I4)((function(){var e=t.current,n=L$(e);e&&n||XW(!1),e.scrollOptions.shouldPublishImmediately?d():p()}),[p,d]),f=(0,Co.I4)((function(e,r){t.current&&XW(!1);var o=a.current,i=o.getDroppableRef();i||XW(!1);var s=function(e){return{closestScrollable:x$(e),isFixedOnPage:I$(e)}}(i),c={ref:i,descriptor:l,env:s,scrollOptions:r};t.current=c;var u=function(e){var t=e.ref,n=e.descriptor,r=e.env,o=e.windowScroll,i=e.direction,a=e.isDropDisabled,l=e.isCombineEnabled,s=e.shouldClipSubject,c=r.closestScrollable,u=function(e,t){var n=jW(e);if(!t)return n;if(e!==t)return n;var r=n.paddingBox.top-t.scrollTop,o=n.paddingBox.left-t.scrollLeft,i=r+t.scrollHeight,a=o+t.scrollWidth,l=MW({top:r,right:a,bottom:i,left:o},n.border);return zW({borderBox:l,margin:n.margin,border:n.border,padding:n.padding})}(t,c),d=WW(u,o),p=function(){if(!c)return null;var e=jW(c),t={scrollHeight:c.scrollHeight,scrollWidth:c.scrollWidth};return{client:e,page:WW(e,o),scroll:S$(c),scrollSize:t,shouldClipSubject:s}}();return function(e){var t=e.descriptor,n=e.isEnabled,r=e.isCombineEnabled,o=e.isFixedOnPage,i=e.direction,a=e.client,l=e.page,s=e.closest,c=function(){if(!s)return null;var e=s.scrollSize,t=s.client,n=aU({scrollHeight:e.scrollHeight,scrollWidth:e.scrollWidth,height:t.paddingBox.height,width:t.paddingBox.width});return{pageMarginBox:s.page.marginBox,frameClient:t,scrollSize:e,shouldClipSubject:s.shouldClipSubject,scroll:{initial:s.scroll,current:s.scroll,max:n,diff:{value:aZ,displacement:aZ}}}}(),u="vertical"===i?zZ:HZ;return{descriptor:t,isCombineEnabled:r,isFixedOnPage:o,axis:u,isEnabled:n,client:a,page:l,frame:c,subject:bZ({page:l,withPlaceholder:null,axis:u,frame:c})}}({descriptor:n,isEnabled:!a,isCombineEnabled:l,isFixedOnPage:r.isFixedOnPage,direction:i,client:u,page:d,closest:p})}({ref:i,descriptor:l,env:s,windowScroll:e,direction:o.direction,isDropDisabled:o.isDropDisabled,isCombineEnabled:o.isCombineEnabled,shouldClipSubject:!o.ignoreContainerClipping}),d=s.closestScrollable;return d&&(d.setAttribute(OU,n.contextId),d.addEventListener("scroll",m,A$(c.scrollOptions))),u}),[n.contextId,l,m,a]),h=(0,Co.I4)((function(){var e=t.current,n=L$(e);return e&&n||XW(!1),S$(n)}),[]),g=(0,Co.I4)((function(){var e=t.current;e||XW(!1);var n=L$(e);t.current=null,n&&(p.cancel(),n.removeAttribute(OU),n.removeEventListener("scroll",m,A$(e.scrollOptions)))}),[m,p]),v=(0,Co.I4)((function(e){var n=t.current;n||XW(!1);var r=L$(n);r||XW(!1),r.scrollTop+=e.y,r.scrollLeft+=e.x}),[]),b=(0,Co.Ye)((function(){return{getDimensionAndWatchScroll:f,getScrollWhileDragging:h,dragStopped:g,scroll:v}}),[g,f,h,v]),y=(0,Co.Ye)((function(){return{uniqueId:r,descriptor:l,callbacks:b}}),[b,l,r]);MU((function(){return s.current=y.descriptor,o.droppable.register(y),function(){t.current&&g(),o.droppable.unregister(y)}}),[b,l,g,y,i,o.droppable]),MU((function(){t.current&&i.updateDroppableIsEnabled(s.current.id,!e.isDropDisabled)}),[e.isDropDisabled,i]),MU((function(){t.current&&i.updateDroppableIsCombineEnabled(s.current.id,e.isCombineEnabled)}),[e.isCombineEnabled,i])}({droppableId:l,type:s,mode:c,direction:u,isDropDisabled:p,isCombineEnabled:m,ignoreContainerClipping:d,getDroppableRef:b});var E=C().createElement(B$,{on:e.placeholder,shouldAnimate:e.shouldAnimatePlaceholder},(function(e){var t=e.onClose,r=e.data,o=e.animate;return C().createElement(D$,{placeholder:r,onClose:t,innerRef:w,animate:o,contextId:n,onTransitionEnd:k})})),x=(0,Co.Ye)((function(){return{innerRef:y,placeholder:E,droppableProps:{"data-rbd-droppable-id":l,"data-rbd-droppable-context-id":n}}}),[n,l,E,y]),I=h?h.dragging.draggableId:null,T=(0,Co.Ye)((function(){return{droppableId:l,type:s,isUsingCloneFor:I}}),[l,I,s]);return C().createElement(M$.Provider,{value:T},a(x,f),function(){if(!h)return null;var e=h.dragging,t=h.render,n=C().createElement(q$,{draggableId:e.draggableId,index:e.source.index,isClone:!0,isEnabled:!0,shouldRespectForcePress:!1,canDragInteractiveElements:!0},(function(n,r){return t(n,r,e)}));return S().createPortal(n,v())}())}));J$.defaultProps=X$;const Q$=({value:e,remove:t,onUpdate:n,onCheck:r,index:o})=>C().createElement("div",{className:"mailpoet-form-segments-settings-list","data-automation-id":"custom_field_value_settings",key:e.id},C().createElement("input",{type:"checkbox",defaultChecked:e.isChecked||!1,onChange:t=>r(e.id,t.target.checked),key:`check-${e.id}`}),C().createElement("input",{type:"text",value:e.name,"data-automation-id":"custom_field_value_settings_value",onChange:t=>n(e.id,t.target.value)}),0!==o&&C().createElement(Po,{icon:"no-alt",color:"#900",className:"mailpoet-form-segments-segment-remove",onClick:(0,Ce.partial)(t,e.id)}));Q$.propTypes={value:Bx().shape({name:Bx().string.isRequired,id:Bx().string.isRequired,isChecked:Bx().bool}).isRequired,onUpdate:Bx().func.isRequired,onCheck:Bx().func.isRequired,index:Bx().number.isRequired,remove:Bx().func.isRequired};const eq=({values:e,update:t,remove:n,onReorder:r})=>{const[o,i]=(0,_.useState)(e);if((0,_.useEffect)((()=>{i(e)}),[e]),0===o.length)return null;const a=(e,n)=>{const r=o.find((t=>t.id===e));r.name=n,t(r)},l=(e,n)=>{const r=o.find((t=>t.id===e));if(n){const e=o.find((e=>e.isChecked));e&&(delete e.isChecked,t(e)),r.isChecked=!0}else delete r.isChecked;t(r)};return C().createElement("div",{className:"mailpoet-dnd-items-list"},C().createElement(w$,{onDragEnd:e=>{const t=e.source.index,n=e.destination.index,a=[...o],[l]=a.splice(t,1);a.splice(n,0,l),i(a),r(a)}},C().createElement(J$,{droppableId:"droppable"},(e=>C().createElement("div",(0,QB.Z)({},e.droppableProps,{ref:e.innerRef}),o.map(((e,t)=>C().createElement(G$,{key:e.id,draggableId:e.id,index:t},(r=>C().createElement("div",(0,QB.Z)({ref:r.innerRef},r.draggableProps,r.dragHandleProps),C().createElement(Q$,{key:`inner${e.id}`,index:t,value:e,remove:n,onCheck:l,onUpdate:a})))))),e.placeholder)))))};eq.propTypes={values:Bx().arrayOf(Bx().shape({name:Bx().string.isRequired,id:Bx().string.isRequired}).isRequired).isRequired,update:Bx().func.isRequired,remove:Bx().func.isRequired,onReorder:Bx().func.isRequired};var tq=eq;const nq=({label:e,mandatory:t,values:n,isSaving:r,onSave:o,isDeleting:i,onCustomFieldDelete:a,onChange:l,useDragAndDrop:s})=>{const[c,u]=(0,_.useState)(e),[d,p]=(0,_.useState)(t),[m,f]=(0,_.useState)(JSON.parse(JSON.stringify(n))),h=(0,_.useMemo)((()=>({label:c,mandatory:d,values:m,isValid:(0,Ce.reduce)(m,((e,t)=>!(0,Ce.isEmpty)(t.name)&&e),!0)})),[c,d,m]),g=d!==t||!(0,Ce.isEqualWith)(n,m)||c!==e;return(0,_.useEffect)((()=>{l&&l(h,g)}),[h,l,g]),C().createElement("div",{className:"custom-field-settings","data-automation-id":"custom_field_settings"},C().createElement(Vk,{label:KB.Z.I18n.t("label"),value:c,"data-automation-id":"settings_custom_text_label_input",onChange:u}),C().createElement(JT,{label:KB.Z.I18n.t("blockMandatory"),checked:d,onChange:p}),C().createElement(tq,{remove:e=>{f(m.filter((t=>e!==t.id)))},update:e=>{f(m.map((t=>e.id!==t.id?t:e)))},values:m,onReorder:f,useDragAndDrop:s}),C().createElement(Gi,{isLink:!0,onClick:()=>f([...m,{id:`${1e3*Math.random()}-${Date.now()}`,name:`Option ${m.length+1}`}]),className:"button-on-top","data-automation-id":"custom_field_values_add_item"},KB.Z.I18n.t("customFieldAddItem")),C().createElement("br",null),o?C().createElement(Gi,{isPrimary:!0,onClick:()=>o({mandatory:d,values:m,label:c}),isBusy:r,disabled:r||!g,className:"button-on-top","data-automation-id":"custom_field_save"},KB.Z.I18n.t("customFieldSaveCTA")):null,a?C().createElement(wV,{isBusy:r||i,onDelete:a}):null)};nq.propTypes={label:Bx().string,mandatory:Bx().bool,values:Bx().arrayOf(Bx().shape({name:Bx().string.isRequired,id:Bx().string.isRequired})),onSave:Bx().func,isSaving:Bx().bool,isDeleting:Bx().bool,onCustomFieldDelete:Bx().func,onChange:Bx().func,useDragAndDrop:Bx().bool},nq.defaultProps={label:"",mandatory:!1,isSaving:!1,values:[],isDeleting:!1,onCustomFieldDelete:null,onSave:null,onChange:null,useDragAndDrop:!0};var rq=nq;const oq=({attributes:e,setAttributes:t,clientId:n})=>{const r=(0,er.Z)((e=>e("mailpoet-form-editor").getIsCustomFieldSaving()),[]),o=(0,er.Z)((e=>e("mailpoet-form-editor").getIsCustomFieldDeleting()),[]),{saveCustomField:i,deleteCustomField:a,customFieldEdited:l}=(0,tr.Z)("mailpoet-form-editor"),s=C().createElement(lE,null,C().createElement(uF,null,C().createElement(Jk,{title:KB.Z.I18n.t("customFieldSettings"),initialOpen:!0},C().createElement(rq,{label:e.label,mandatory:e.mandatory,values:e.values,isSaving:r,onSave:n=>i({customFieldId:e.customFieldId,data:{params:NV("radio",n)},onFinish:()=>t({mandatory:n.mandatory,values:n.values,label:n.label})}),onCustomFieldDelete:()=>a(e.customFieldId,n),isDeleting:o,onChange:(e,t)=>t&&l()}))),C().createElement(uF,null,C().createElement(Jk,{title:KB.Z.I18n.t("formSettings"),initialOpen:!0},C().createElement(JT,{label:KB.Z.I18n.t("displayLabel"),checked:!e.hideLabel,onChange:e=>t({hideLabel:!e})}))));return C().createElement(bV,{className:e.className},s,C().createElement("span",{className:"mailpoet_radio_label","data-automation-id":"editor_custom_field_radio_buttons_block"},e.hideLabel?null:TV(e)),Array.isArray(e.values)&&e.values.map((e=>C().createElement("div",{key:e.id},C().createElement("label",null,C().createElement("input",{type:"radio",disabled:!0,checked:e.isChecked||!1,className:"mailpoet_radio"}),e.name)))))};oq.propTypes={attributes:Bx().shape({label:Bx().string.isRequired,customFieldId:Bx().number.isRequired,values:Bx().arrayOf(Bx().shape({name:Bx().string.isRequired,id:Bx().string.isRequired,isChecked:Bx().bool})),mandatory:Bx().bool.isRequired,hideLabel:Bx().bool,className:Bx().string}).isRequired,setAttributes:Bx().func.isRequired,clientId:Bx().string.isRequired};var iq=oq;let aq,lq;!function(e){e.Divider="divider",e.Spacer="spacer"}(aq||(aq={})),function(e){e.Solid="solid",e.Dashed="dashed",e.Dotted="dotted"}(lq||(lq={}));const sq={className:void 0,height:1,type:aq.Divider,style:lq.Solid,dividerHeight:1,dividerWidth:100,color:"black"},cq=()=>`${Math.random().toString()}-${Date.now()}`,uq=e=>e.map((e=>{const t={name:e.value,id:cq()};return(0,Ce.has)(e,"is_checked")&&e.is_checked&&(t.isChecked=!0),t})),dq=(e,t,n,r=[])=>{if(!Array.isArray(r))throw new Error("Mapper expects customFields to be an array.");return o=>{if(!Array.isArray(o))throw new Error("Mapper expects form body to be an array.");return o.map((o=>{var i,a,l,s,c,u,d,p,m,f,h,g,v,b,y,w,k,E,_,C,x,S,I,T,N,A,R,L,P,O,D,M,B,F,z,H;if(["column","columns"].includes(o.type))return((e,t,n,r,o=[])=>{const i=dq(t,n,r,o),a={clientId:cq(),name:`core/${e.type}`,isValid:!0,attributes:{style:{color:{}}},innerBlocks:i(e.body?e.body:[])},l=BV(n,e.params.text_color),s=BV(n,e.params.background_color),c=((e,t)=>{const n=e.find((e=>e.gradient===t));return n?n.slug:void 0})(r,e.params.gradient);return(0,Ce.has)(e.params,"width")&&(a.attributes.width=Number.isNaN(Number(e.params.width))?e.params.width:`${e.params.width}%`),(0,Ce.has)(e.params,"vertical_alignment")&&(a.attributes.verticalAlignment=e.params.vertical_alignment),(0,Ce.has)(e.params,"text_color")&&(a.attributes.textColor=l,a.attributes.style.color.text=l?void 0:e.params.text_color),(0,Ce.has)(e.params,"background_color")&&(a.attributes.backgroundColor=s,a.attributes.style.color.background=s?void 0:e.params.background_color),(0,Ce.has)(e.params,"gradient")&&(a.attributes.gradient=c,a.attributes.style.color.gradient=c?void 0:e.params.gradient),(0,Ce.has)(e.params,"class_name")&&e.params.class_name&&(a.attributes.className=e.params.class_name),(0,Ce.has)(e.params,"padding")&&(a.attributes.style.spacing={padding:e.params.padding}),(0,Ce.has)(e.params,"is_stacked_on_mobile")&&(a.attributes.isStackedOnMobile="1"===e.params.is_stacked_on_mobile),"columns"!==e.type||(0,Ce.has)(e.params,"is_stacked_on_mobile")||(a.attributes.isStackedOnMobile=!0),a})(o,e,t,n,r);const V={clientId:`${o.id}_${cq()}`,isValid:!0,innerBlocks:[],attributes:{labelWithinInput:!1,mandatory:!1,className:null}};if(["heading","paragraph"].includes(o.type)&&(V.attributes.style={color:{text:void 0,background:void 0},typography:{fontSize:void 0,lineHeight:void 0}}),o.params&&(0,Ce.has)(o.params,"class_name")&&(V.attributes.className=o.params.class_name),o.params&&(0,Ce.has)(o.params,"required")&&(V.attributes.mandatory=!!o.params.required),o.params&&(0,Ce.has)(o.params,"label_within")&&(V.attributes.labelWithinInput=!!o.params.label_within),o.params&&(V.attributes.label=o.params.label?o.params.label:""),o.params&&(0,Ce.has)(o.params,"text_color")){const e=BV(t,o.params.text_color);V.attributes.textColor=e,["heading","paragraph"].includes(o.type)?V.attributes.style.color.text=e?void 0:o.params.text_color:V.attributes.customTextColor=e?void 0:o.params.text_color}if(o.params&&(0,Ce.has)(o.params,"background_color")){const e=BV(t,o.params.background_color);V.attributes.backgroundColor=e,["heading","paragraph"].includes(o.type)?V.attributes.style.color.background=e?void 0:o.params.background_color:V.attributes.customBackgroundColor=e?void 0:o.params.background_color}if(o.params&&(0,Ce.has)(o.params,"font_size")){const t=((e,t)=>{let n=0;t&&(n=PV(t),void 0===n&&(n=2));const r=e.find((e=>e.size===n));return r?r.slug:void 0})(e,o.params.font_size);V.attributes.fontSize=t,V.attributes.style.typography.fontSize=t?void 0:PV(o.params.font_size)}o.params&&(0,Ce.has)(o.params,"line_height")&&(V.attributes.style.typography.lineHeight=o.params.line_height);let W=2;switch(o.id){case"email":return{...V,name:"mailpoet-form/email-input",attributes:{...V.attributes,styles:MV(o.styles)}};case"heading":return o.params&&(0,Ce.has)(o.params,"level")&&(W=PV(o.params.level),void 0===W&&(W=2)),{...V,attributes:{...V.attributes,content:(null===(i=o.params)||void 0===i?void 0:i.content)||"",level:W,textAlign:null===(a=o.params)||void 0===a?void 0:a.align,anchor:null===(l=o.params)||void 0===l?void 0:l.anchor,className:null===(s=o.params)||void 0===s?void 0:s.class_name},name:"core/heading"};case"paragraph":return{...V,attributes:{...V.attributes,content:(null===(c=o.params)||void 0===c?void 0:c.content)||"",align:null===(u=o.params)||void 0===u?void 0:u.align,className:null===(d=o.params)||void 0===d?void 0:d.class_name,dropCap:"1"===(null===(p=o.params)||void 0===p?void 0:p.drop_cap)},name:"core/paragraph"};case"image":return{...V,name:"core/image",attributes:{className:(null===(m=o.params)||void 0===m?void 0:m.class_name)||"",align:null===(f=o.params)||void 0===f?void 0:f.align,url:null===(h=o.params)||void 0===h?void 0:h.url,alt:null===(g=o.params)||void 0===g?void 0:g.alt,title:null===(v=o.params)||void 0===v?void 0:v.title,caption:null===(b=o.params)||void 0===b?void 0:b.caption,linkDestination:null===(y=o.params)||void 0===y?void 0:y.link_destination,link:null===(w=o.params)||void 0===w?void 0:w.link,href:null===(k=o.params)||void 0===k?void 0:k.href,linkClass:null===(E=o.params)||void 0===E?void 0:E.link_class,rel:null===(_=o.params)||void 0===_?void 0:_.rel,linkTarget:null===(C=o.params)||void 0===C?void 0:C.link_target,id:null===(x=o.params)||void 0===x?void 0:x.id,sizeSlug:null===(S=o.params)||void 0===S?void 0:S.size_slug,width:null===(I=o.params)||void 0===I?void 0:I.width,height:null===(T=o.params)||void 0===T?void 0:T.height}};case"first_name":return{...V,name:"mailpoet-form/first-name-input",attributes:{...V.attributes,styles:MV(o.styles)}};case"last_name":return{...V,name:"mailpoet-form/last-name-input",attributes:{...V.attributes,styles:MV(o.styles)}};case"segments":return o.params&&(0,Ce.has)(o.params,"values")&&Array.isArray(o.params.values)?V.attributes.values=o.params.values.map((e=>({id:e.id,isChecked:"1"===e.is_checked||void 0}))):V.attributes.values=[],{...V,name:"mailpoet-form/segment-select"};case"submit":return{...V,name:"mailpoet-form/submit-button",attributes:{...V.attributes,styles:MV(o.styles)}};case"divider":return delete V.attributes.label,{...V,name:"mailpoet-form/divider",attributes:{className:V.attributes.className,height:PV(null!==(N=null===(A=o.params)||void 0===A?void 0:A.height)&&void 0!==N?N:sq.height),type:null!==(R=null===(L=o.params)||void 0===L?void 0:L.type)&&void 0!==R?R:sq.type,style:null!==(P=null===(O=o.params)||void 0===O?void 0:O.style)&&void 0!==P?P:sq.style,dividerHeight:PV(null!==(D=null===(M=o.params)||void 0===M?void 0:M.divider_height)&&void 0!==D?D:sq.dividerHeight),dividerWidth:PV(null!==(B=null===(F=o.params)||void 0===F?void 0:F.divider_width)&&void 0!==B?B:sq.dividerWidth),color:null!==(z=null===(H=o.params)||void 0===H?void 0:H.color)&&void 0!==z?z:sq.color}};case"html":return{...V,name:"mailpoet-form/html",attributes:{className:V.attributes.className,content:o.params&&o.params.text?o.params.text:"",nl2br:!(!o.params||!o.params.nl2br||!o.params.nl2br)}};default:return Number.isInteger(parseInt(o.id,10))?((e,t,n)=>{const r=t.find((t=>t.id===parseInt(e.id,10)));if(!r)return null;const o={...n,name:mV({text:"mailpoet-form/custom-text",textarea:"mailpoet-form/custom-textarea",radio:"mailpoet-form/custom-radio",checkbox:"mailpoet-form/custom-checkbox",select:"mailpoet-form/custom-select",date:"mailpoet-form/custom-date"}[r.type],r)};return o.attributes.customFieldId=r.id,e.params&&((0,Ce.has)(e.params,"validate")&&e.params.validate&&(o.attributes.validate=e.params.validate),(0,Ce.has)(e.params,"hide_label")&&(o.attributes.hideLabel=!!e.params.hide_label),(0,Ce.has)(e.params,"lines")&&(o.attributes.lines=e.params.lines),(0,Ce.has)(e.params,"date_type")&&(o.attributes.dateType=e.params.date_type),(0,Ce.has)(e.params,"date_format")&&(o.attributes.dateFormat=e.params.date_format),(0,Ce.has)(e.params,"is_default_today")&&(o.attributes.defaultToday=!!e.params.is_default_today),(0,Ce.has)(e.params,"values")&&Array.isArray(e.params.values)&&(o.attributes.values=uq(e.params.values))),"text"!==r.type&&"textarea"!==r.type||(o.attributes.styles=MV(e.styles)),o})(o,r,V):null}})).filter(Boolean)}};function pq(e){return{title:e.name,description:"",icon:fV,category:"custom-fields",attributes:{label:{type:"string",default:e.name},hideLabel:{type:"boolean",default:!1},mandatory:{type:"boolean",default:!!e.params.required&&!!e.params.required},values:{type:"array",default:e.params.values?uq(e.params.values):[]},customFieldId:{type:"string",default:e.id}},supports:{html:!1,multiple:!1},edit:iq,save:()=>null}}const mq=({label:e,mandatory:t,isSaving:n,onSave:r,isChecked:o,checkboxLabel:i,isDeleting:a,onCustomFieldDelete:l,onChange:s})=>{const[c,u]=(0,_.useState)(e),[d,p]=(0,_.useState)(t),[m,f]=(0,_.useState)(o),[h,g]=(0,_.useState)(i),v=d!==t||m!==o||c!==e||h!==i,b=(0,_.useMemo)((()=>({mandatory:d,isChecked:m,label:c,checkboxLabel:h,isValid:!(0,Ce.isEmpty)(h)})),[c,d,m,h]);return(0,_.useEffect)((()=>{s(b,v)}),[b,s,v]),C().createElement("div",{className:"custom-field-settings"},C().createElement(Vk,{label:KB.Z.I18n.t("label"),value:c,"data-automation-id":"settings_custom_text_label_input",onChange:u}),C().createElement(JT,{label:KB.Z.I18n.t("blockMandatory"),checked:d,onChange:p}),C().createElement(Hk,null,C().createElement("input",{type:"checkbox",checked:m,onChange:e=>f(!!e.target.checked)}),C().createElement("input",{value:h,"data-automation-id":"settings_custom_checkbox_value",type:"text",onChange:e=>g(e.target.value)})),r?C().createElement(Gi,{isPrimary:!0,onClick:()=>r(b),isBusy:n,disabled:n||!v,className:"button-on-top","data-automation-id":"custom_field_save"},KB.Z.I18n.t("customFieldSaveCTA")):null,l?C().createElement(wV,{isBusy:n||a,onDelete:l}):null)};mq.propTypes={label:Bx().string,mandatory:Bx().bool,onSave:Bx().func,isSaving:Bx().bool,isChecked:Bx().bool,checkboxLabel:Bx().string,isDeleting:Bx().bool,onCustomFieldDelete:Bx().func,onChange:Bx().func},mq.defaultProps={label:"",mandatory:!1,onSave:null,isSaving:!1,isChecked:!1,checkboxLabel:"",isDeleting:!1,onCustomFieldDelete:null,onChange:()=>{}};var fq=mq;const hq=({attributes:e,setAttributes:t,clientId:n})=>{const r=(0,er.Z)((e=>e("mailpoet-form-editor").getIsCustomFieldSaving()),[]),o=(0,er.Z)((e=>e("mailpoet-form-editor").getIsCustomFieldDeleting()),[]),{saveCustomField:i,deleteCustomField:a,customFieldEdited:l}=(0,tr.Z)("mailpoet-form-editor"),s=()=>{if(Array.isArray(e.values)){const t=e.values[0];if(t)return t.name}return""},c=()=>{let t=!1;if(Array.isArray(e.values)){const n=e.values[0];n&&n.isChecked&&(t=!0)}return t},u=C().createElement(lE,null,C().createElement(uF,null,C().createElement(Jk,{title:KB.Z.I18n.t("customFieldSettings"),initialOpen:!0},C().createElement(fq,{label:e.label,mandatory:e.mandatory,isSaving:r,isChecked:c(),checkboxLabel:s(),onSave:n=>i({customFieldId:e.customFieldId,data:{params:NV("checkbox",n)},onFinish:()=>t({mandatory:n.mandatory,label:n.label,values:[{isChecked:n.isChecked,name:n.checkboxLabel}]})}),onCustomFieldDelete:()=>a(e.customFieldId,n),isDeleting:o,onChange:(e,t)=>t&&l()}))),C().createElement(uF,null,C().createElement(Jk,{title:KB.Z.I18n.t("formSettings"),initialOpen:!0},C().createElement(JT,{label:KB.Z.I18n.t("displayLabel"),checked:!e.hideLabel,onChange:e=>t({hideLabel:!e})}))));let d=s();return e.mandatory&&(d+=" *"),C().createElement(bV,{className:e.className},u,C().createElement("span",{className:"mailpoet_checkbox_label","data-automation-id":"editor_custom_field_checkbox_block"},e.hideLabel||!e.label?null:e.label),C().createElement("div",null,C().createElement("label",null,C().createElement("input",{type:"checkbox",disabled:!0,checked:c(),className:"mailpoet_checkbox"}),C().createElement("span",{dangerouslySetInnerHTML:{__html:d}}))))};hq.propTypes={attributes:Bx().shape({label:Bx().string.isRequired,customFieldId:Bx().number.isRequired,mandatory:Bx().bool.isRequired,hideLabel:Bx().bool,className:Bx().string,values:Bx().arrayOf(Bx().shape({name:Bx().string.isRequired,isChecked:Bx().bool}))}).isRequired,setAttributes:Bx().func.isRequired,clientId:Bx().string.isRequired};var gq=hq;function vq(e){return{title:e.name,description:"",icon:fV,category:"custom-fields",attributes:{label:{type:"string",default:e.name},hideLabel:{type:"boolean",default:!1},values:{type:"array",default:e.params.values?uq(e.params.values):[]},mandatory:{type:"boolean",default:!!e.params.required&&!!e.params.required},customFieldId:{type:"string",default:e.id}},supports:{html:!1,multiple:!1},edit:gq,save:()=>null}}const bq=({attributes:e,setAttributes:t,clientId:n})=>{const r=(0,er.Z)((e=>e("mailpoet-form-editor").getFormSettings()),[]),o=(0,er.Z)((e=>e("mailpoet-form-editor").getIsCustomFieldSaving()),[]),i=(0,er.Z)((e=>e("mailpoet-form-editor").getIsCustomFieldDeleting()),[]),{saveCustomField:a,deleteCustomField:l,customFieldEdited:s}=(0,tr.Z)("mailpoet-form-editor"),c=C().createElement(lE,null,C().createElement(uF,null,C().createElement(Jk,{title:KB.Z.I18n.t("customFieldSettings"),initialOpen:!0},C().createElement(rq,{label:e.label,mandatory:e.mandatory,values:e.values,isSaving:o,onSave:n=>a({customFieldId:e.customFieldId,data:{params:NV("select",n)},onFinish:()=>t({mandatory:n.mandatory,values:n.values,label:n.label})}),onCustomFieldDelete:()=>l(e.customFieldId,n),isDeleting:i,onChange:(e,t)=>t&&s()}))),C().createElement(uF,null,C().createElement(Jk,{title:KB.Z.I18n.t("formSettings"),initialOpen:!0},C().createElement(JT,{label:KB.Z.I18n.t("displayLabelWithinInput"),checked:e.labelWithinInput,onChange:e=>t({labelWithinInput:e})}))));return C().createElement(bV,{className:e.className},c,C().createElement("div",{className:"mailpoet_custom_select","data-automation-id":"custom_select_block"},e.labelWithinInput?null:C().createElement("label",{className:"mailpoet_select_label",htmlFor:n},TV(e)),(()=>{let t=e.labelWithinInput?TV(e):"-";const o=[{label:t}];!Array.isArray(e.values)&&e.values.length||e.values.forEach((n=>{o.push({label:n.name}),!e.labelWithinInput&&n.isChecked&&(t=n.name)}));const i={};return void 0!==r.inputPadding&&(i.padding=r.inputPadding),void 0!==r.alignment&&(i.textAlign=r.alignment,i.margin=WV(i.textAlign)),r.fontFamily&&(i.fontFamily=r.fontFamily),C().createElement("select",{style:i,className:"mailpoet_select",id:n,value:t,readOnly:!0},o.map(((e,t)=>C().createElement("option",{key:e.label,value:e.label,disabled:0===t},e.label))))})()))};bq.propTypes={attributes:Bx().shape({customFieldId:Bx().number.isRequired,labelWithinInput:Bx().bool.isRequired,label:Bx().string.isRequired,values:Bx().arrayOf(Bx().shape({name:Bx().string.isRequired,isChecked:Bx().bool,id:Bx().string.isRequired})),mandatory:Bx().bool.isRequired,className:Bx().string}).isRequired,setAttributes:Bx().func.isRequired,clientId:Bx().string.isRequired};var yq=bq;function wq(e){return{title:e.name,description:"",icon:fV,category:"custom-fields",attributes:{label:{type:"string",default:e.name},labelWithinInput:{type:"boolean",default:!0},mandatory:{type:"boolean",default:!!e.params.required&&!!e.params.required},values:{type:"array",default:e.params.values?uq(e.params.values):[]},customFieldId:{type:"string",default:e.id}},supports:{html:!1,multiple:!1},edit:yq,save:()=>null}}function kq(e){return{date:{name:"mailpoet-form/custom-date",settings:LV(e)},text:{name:"mailpoet-form/custom-text",settings:qV(e)},textarea:{name:"mailpoet-form/custom-textarea",settings:YV(e)},radio:{name:"mailpoet-form/custom-radio",settings:pq(e)},checkbox:{name:"mailpoet-form/custom-checkbox",settings:vq(e)},select:{name:"mailpoet-form/custom-select",settings:wq(e)}}}var Eq=C().createElement(ko,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},C().createElement(yo,{fill:"none",d:"M0 0h24v24H0V0z"}),C().createElement(yo,{d:"M19 13H5v-2h14v2z"}));const _q=({attributes:e,setAttributes:t})=>{var n,r,o;const i=null!==(n=e.dividerHeight)&&void 0!==n?n:sq.dividerHeight,a=null!==(r=e.dividerWidth)&&void 0!==r?r:sq.dividerWidth,l=null!==(o=e.height)&&void 0!==o?o:sq.height,s=C().createElement(C().Fragment,null,C().createElement(u_,{label:KB.Z.I18n.t("blockDividerStyle"),"data-automation-id":"settings_divider_style",value:e.style,onChange:e=>t({style:e}),options:[{value:lq.Solid,label:KB.Z.I18n.t("blockDividerStyleSolid")},{value:lq.Dashed,label:KB.Z.I18n.t("blockDividerStyleDashed")},{value:lq.Dotted,label:KB.Z.I18n.t("blockDividerStyleDotted")}]}),C().createElement(hC,{label:KB.Z.I18n.t("blockDividerDividerHeight"),className:"mailpoet-automation-styles-divider-height",value:i,min:1,max:40,allowReset:!0,onChange:e=>{let n=l;void 0!==e&&(n=Math.max(e,l)),t({dividerHeight:e,height:n})}}),C().createElement(hC,{label:KB.Z.I18n.t("blockDividerDividerWidth"),className:"mailpoet-automation-styles-divider-width",value:a,min:1,max:100,allowReset:!0,onChange:e=>t({dividerWidth:e})}),C().createElement(NF,{name:KB.Z.I18n.t("blockDividerColor"),value:e.color,onChange:e=>t({color:e})})),c={};return e.type===aq.Divider&&(c.borderTopStyle=e.style,c.borderTopWidth=i,c.borderTopColor=e.color,c.height=i,c.width=`${a}%`),C().createElement(C().Fragment,null,C().createElement(lE,null,C().createElement(uF,null,C().createElement(Jk,{title:KB.Z.I18n.t("formSettingsStyles"),initialOpen:!0},C().createElement(hC,{label:KB.Z.I18n.t("blockSpacerHeight"),className:"mailpoet-automation-spacer-height-size",value:l,min:1,max:400,allowReset:!0,onChange:e=>{let n=i;n=void 0!==e?Math.min(e,i):1,t({height:e,dividerHeight:n})}}),C().createElement(JT,{label:KB.Z.I18n.t("blockSpacerEnableDivider"),className:"mailpoet-automation-divider-togle-enable",checked:e.type===aq.Divider,onChange:e=>t({type:e?aq.Divider:aq.Spacer})}),e.type===aq.Divider&&s))),C().createElement("div",{className:Cr()("mailpoet_spacer",e.className),"data-automation-id":"editor_spacer_block",style:{height:l,display:"flex",flexDirection:"column",alignItems:"center",width:"100%",justifyContent:"center"}},C().createElement("div",{className:"mailpoet_divider","data-automation-id":"editor_divider_block",style:c})))};_q.propTypes={setAttributes:Bx().func.isRequired};var Cq=_q;const xq={title:KB.Z.I18n.t("blockDivider"),description:null,icon:Eq,category:"design",attributes:{height:{type:"number",default:sq.height},type:{type:"string",default:sq.type},style:{type:"string",default:sq.style},dividerHeight:{type:"number",default:sq.dividerHeight},dividerWidth:{type:"number",default:sq.dividerWidth},color:{type:"string",default:sq.color}},supports:{html:!1,multiple:!0},edit:Cq,save:()=>null},Sq=({attributes:e,setAttributes:t})=>{const n=C().createElement(lE,null,C().createElement(uF,null,C().createElement(Jk,{title:KB.Z.I18n.t("formSettings"),initialOpen:!0},C().createElement(Vk,{label:KB.Z.I18n.t("label"),value:e.label,"data-automation-id":"settings_email_label_input",onChange:e=>t({label:e})}),C().createElement(JT,{label:KB.Z.I18n.t("displayLabelWithinInput"),checked:e.labelWithinInput,onChange:e=>t({labelWithinInput:e})}))),C().createElement(HV,{styles:e.styles,onChange:e=>t({styles:e})}));return C().createElement(C().Fragment,null,n,C().createElement(jV,{className:e.className,name:"email",label:e.label,labelWithinInput:!!e.labelWithinInput,mandatory:!0,styles:e.styles}))};Sq.propTypes={attributes:Bx().shape({label:Bx().string.isRequired,labelWithinInput:Bx().bool.isRequired,className:Bx().string,styles:VV.isRequired}).isRequired,setAttributes:Bx().func.isRequired};var Iq=Sq,Tq=C().createElement(ko,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},C().createElement(yo,{fill:"none",d:"M0 0h24v24H0V0z"}),C().createElement(bo,null,C().createElement(yo,{fill:"#32373C",d:"m18.82592,6.5l-14,0c-0.8,0 -1.5,0.7 -1.5,1.5l0,8c0,0.8 0.7,1.5 1.5,1.5l14,0c0.8,0 1.5,-0.7 1.5,-1.5l0,-8c0,-0.8 -0.7,-1.5 -1.5,-1.5zm-1.2,1l-5.8,4.9l-5.8,-4.9l11.6,0zm1.7,8.5c0,0.3 -0.2,0.5 -0.5,0.5l-14,0c-0.3,0 -0.5,-0.2 -0.5,-0.5l0,-8c0,-0.2 0.1,-0.4 0.3,-0.4l6.9,5.9c0.1,0.1 0.2,0.1 0.3,0.1s0.2,0 0.3,-0.1l6.9,-5.9c0.2,0.1 0.3,0.2 0.3,0.4l0,8z"})));const Nq={title:KB.Z.I18n.t("blockEmail"),description:KB.Z.I18n.t("blockEmailDescription"),icon:Tq,category:"obligatory",attributes:{label:{type:"string",default:KB.Z.I18n.t("blockEmail")},labelWithinInput:{type:"boolean",default:!0},styles:{type:"object",default:OV}},supports:{html:!1,inserter:!1,multiple:!1},edit:Iq,save:()=>null},Aq=({styles:e,onChange:t,formInputPadding:n,formFontFamily:r})=>{const o=(0,_.useRef)(e),i=o.current,a=(e,n)=>{const r={...o.current};r[e]=n,t(r),o.current=r};return C().createElement(uF,{className:"mailpoet-automation-input-styles-panel"},C().createElement(Jk,{title:KB.Z.I18n.t("formSettingsStyles"),initialOpen:!1},C().createElement("div",{className:"mailpoet-styles-settings","data-automation-id":"input_styles_settings"},C().createElement(JT,{label:KB.Z.I18n.t("formSettingsDisplayFullWidth"),checked:i.fullWidth,onChange:(0,Ce.partial)(a,"fullWidth")}),C().createElement(JT,{label:KB.Z.I18n.t("formSettingsInheritStyleFromTheme"),checked:i.inheritFromTheme,onChange:e=>{if(e)return void a("inheritFromTheme",e);const r={...o.current};r.backgroundColor="#eeeeee",r.bold=!1,r.borderRadius=0,r.borderSize=1,r.borderColor="#313131",r.fontColor="#313131",r.fontSize=void 0,r.padding=n,r.inheritFromTheme=e,t(r),o.current=r},className:"mailpoet-automation-inherit-theme-toggle"}),i.inheritFromTheme?null:C().createElement(C().Fragment,null,C().createElement(RF,{name:KB.Z.I18n.t("formSettingsStylesBackgroundColor"),colorValue:e.backgroundColor,gradientValue:e.gradient,onColorChange:(0,Ce.partial)(a,"backgroundColor"),onGradientChange:(0,Ce.partial)(a,"gradient")}),C().createElement(NF,{name:KB.Z.I18n.t("formSettingsStylesFontColor"),value:e.fontColor,onChange:(0,Ce.partial)(a,"fontColor")}),C().createElement(PF,{value:e.fontSize,onChange:(0,Ce.partial)(a,"fontSize")}),C().createElement(JT,{label:KB.Z.I18n.t("formSettingsBold"),checked:i.bold||!1,onChange:(0,Ce.partial)(a,"bold"),className:"mailpoet-automation-styles-bold-toggle"}),C().createElement(YF,{name:KB.Z.I18n.t("formSettingsStylesFontFamily"),value:e.fontFamily||r,onChange:(0,Ce.partial)(a,"fontFamily")}),C().createElement(hC,{label:KB.Z.I18n.t("formSettingsInputPadding"),value:void 0!==i.padding?i.padding:n,min:0,max:30,allowReset:!0,onChange:(0,Ce.partial)(a,"padding")}),C().createElement(hC,{label:KB.Z.I18n.t("formSettingsBorderSize"),value:void 0!==i.borderSize?i.borderSize:1,min:0,max:10,allowReset:!0,onChange:(0,Ce.partial)(a,"borderSize"),className:"mailpoet-automation-styles-border-size"}),C().createElement(hC,{label:KB.Z.I18n.t("formSettingsBorderRadius"),value:void 0!==i.borderRadius?i.borderRadius:0,min:0,max:40,allowReset:!0,onChange:(0,Ce.partial)(a,"borderRadius")}),C().createElement(NF,{name:KB.Z.I18n.t("formSettingsBorderColor"),value:i.borderColor,onChange:(0,Ce.partial)(a,"borderColor")})))))};Aq.propTypes={onChange:Bx().func.isRequired,formInputPadding:Bx().number.isRequired,formFontFamily:Bx().string};var Rq=Aq;const Lq=({attributes:e,setAttributes:t})=>{const n=(0,er.Z)((e=>e("mailpoet-form-editor").getFormSettings()),[]),r=C().createElement(lE,null,C().createElement(uF,null,C().createElement(Jk,{title:KB.Z.I18n.t("formSettings"),initialOpen:!0},C().createElement(Vk,{label:KB.Z.I18n.t("label"),value:e.label,onChange:e=>t({label:e}),"data-automation-id":"settings_submit_label_input"}))),C().createElement(Rq,{onChange:e=>t({styles:e}),styles:e.styles,formInputPadding:n.inputPadding,formFontFamily:n.fontFamily})),o=e.styles.inheritFromTheme?{}:{fontWeight:e.styles.bold?"bold":"inherit",borderRadius:void 0!==e.styles.borderRadius?`${e.styles.borderRadius}px`:0,borderWidth:void 0!==e.styles.borderSize?`${e.styles.borderSize}px`:"1px",borderColor:e.styles.borderColor||"transparent",borderStyle:"solid",fontSize:e.styles.fontSize?`${e.styles.fontSize}px`:"inherit",color:e.styles.fontColor||"inherit"};e.styles.fullWidth&&(o.width="100%"),void 0===e.styles.padding||e.styles.inheritFromTheme?void 0!==n.inputPadding&&(o.padding=n.inputPadding):o.padding=e.styles.padding,e.styles.backgroundColor&&!e.styles.inheritFromTheme&&(o.backgroundColor=e.styles.backgroundColor),e.styles.backgroundColor&&!e.styles.inheritFromTheme&&(o.backgroundColor=e.styles.backgroundColor),e.styles.gradient&&!e.styles.inheritFromTheme&&(o.backgroundColor=void 0,o.background=e.styles.gradient),e.styles.fontFamily&&!e.styles.inheritFromTheme&&(o.fontFamily=e.styles.fontFamily);const i=Cr()("mailpoet_submit",{button:e.styles.inheritFromTheme});return C().createElement(bV,{className:e.className},r,C().createElement("input",{className:i,type:"submit",value:e.label,"data-automation-id":"editor_submit_input",style:o}))};Lq.propTypes={attributes:Bx().shape({label:Bx().string.isRequired,className:Bx().oneOfType([Bx().string,Bx().oneOf([null])])}).isRequired,setAttributes:Bx().func.isRequired};var Pq=Lq,Oq=C().createElement(ko,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},C().createElement(yo,{fill:"none",d:"M0 0h24v24H0V0z"}),C().createElement(bo,null,C().createElement(yo,{d:"M19 6H5c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm0 10H5V8h14v8z"})));const Dq={title:KB.Z.I18n.t("blockSubmit"),description:KB.Z.I18n.t("blockSubmitDescription"),icon:Oq,category:"obligatory",attributes:{label:{type:"string",default:KB.Z.I18n.t("blockSubmitLabel")},styles:{type:"object",default:{fullWidth:!0,inheritFromTheme:!0}}},supports:{html:!1,inserter:!1,multiple:!1},edit:Pq,save:()=>null};var Mq=C().createElement(ko,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},C().createElement(yo,{fill:"none",d:"M0 0h24v24H0V0z"}),C().createElement(bo,null,C().createElement(yo,{d:"M19 6H5c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm0 10H5V8h14v8z"})));const Bq=({attributes:e,setAttributes:t})=>{const n=C().createElement(lE,null,C().createElement(uF,null,C().createElement(Jk,{title:KB.Z.I18n.t("formSettings"),initialOpen:!0},C().createElement(Vk,{label:KB.Z.I18n.t("label"),value:e.label,"data-automation-id":"settings_first_name_label_input",onChange:e=>t({label:e})}),C().createElement(JT,{label:KB.Z.I18n.t("displayLabelWithinInput"),checked:e.labelWithinInput,onChange:e=>t({labelWithinInput:e}),className:"mailpoet-automation-label-within-input-toggle"}),C().createElement(JT,{label:KB.Z.I18n.t("blockMandatory"),checked:e.mandatory,onChange:e=>t({mandatory:e})}))),C().createElement(HV,{styles:e.styles,onChange:e=>t({styles:e})}));return C().createElement(C().Fragment,null,n,C().createElement(jV,{className:e.className,name:"first_name",mandatory:e.mandatory,labelWithinInput:e.labelWithinInput,label:e.label,styles:e.styles}))};Bq.propTypes={attributes:Bx().shape({label:Bx().string.isRequired,labelWithinInput:Bx().bool.isRequired,mandatory:Bx().bool.isRequired,className:Bx().string,styles:VV.isRequired}).isRequired,setAttributes:Bx().func.isRequired};var Fq=Bq;const zq={title:KB.Z.I18n.t("blockFirstName"),description:KB.Z.I18n.t("blockFirstNameDescription"),icon:Mq,category:"fields",attributes:{label:{type:"string",default:KB.Z.I18n.t("blockFirstName")},labelWithinInput:{type:"boolean",default:!0},mandatory:{type:"boolean",default:!1},styles:{type:"object",default:OV}},supports:{html:!1,multiple:!1},edit:Fq,save:()=>null};var Hq=C().createElement(ko,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},C().createElement(yo,{fill:"none",d:"M0 0h24v24H0V0z"}),C().createElement(bo,null,C().createElement(yo,{d:"M19 6H5c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm0 10H5V8h14v8z"})));const Vq=({attributes:e,setAttributes:t})=>{const n=C().createElement(lE,null,C().createElement(uF,null,C().createElement(Jk,{title:KB.Z.I18n.t("formSettings"),initialOpen:!0},C().createElement(Vk,{label:KB.Z.I18n.t("label"),value:e.label,"data-automation-id":"settings_last_name_label_input",onChange:e=>t({label:e})}),C().createElement(JT,{label:KB.Z.I18n.t("displayLabelWithinInput"),checked:e.labelWithinInput,onChange:e=>t({labelWithinInput:e})}),C().createElement(JT,{label:KB.Z.I18n.t("blockMandatory"),checked:e.mandatory,onChange:e=>t({mandatory:e})}))),C().createElement(HV,{styles:e.styles,onChange:e=>t({styles:e})}));return C().createElement(C().Fragment,null,n,C().createElement(jV,{className:e.className,name:"last_name",mandatory:e.mandatory,labelWithinInput:e.labelWithinInput,label:e.label,styles:e.styles}))};Vq.propTypes={attributes:Bx().shape({label:Bx().string.isRequired,labelWithinInput:Bx().bool.isRequired,mandatory:Bx().bool.isRequired,className:Bx().string,styles:VV.isRequired}).isRequired,setAttributes:Bx().func.isRequired};var Wq=Vq;const Zq={title:KB.Z.I18n.t("blockLastName"),description:KB.Z.I18n.t("blockLastNameDescription"),icon:Hq,category:"fields",attributes:{label:{type:"string",default:KB.Z.I18n.t("blockLastName")},labelWithinInput:{type:"boolean",default:!0},mandatory:{type:"boolean",default:!1},styles:{type:"object",default:OV}},supports:{html:!1,multiple:!1},edit:Wq,save:()=>null};var jq=C().createElement(ko,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},C().createElement(bo,null,C().createElement(yo,{d:"M9 19h12v-2H9v2zm0-6h12v-2H9v2zm0-8v2h12V5H9zm-4-.5c-.828 0-1.5.672-1.5 1.5S4.172 7.5 5 7.5 6.5 6.828 6.5 6 5.828 4.5 5 4.5zm0 6c-.828 0-1.5.672-1.5 1.5s.672 1.5 1.5 1.5 1.5-.672 1.5-1.5-.672-1.5-1.5-1.5zm0 6c-.828 0-1.5.672-1.5 1.5s.672 1.5 1.5 1.5 1.5-.672 1.5-1.5-.672-1.5-1.5-1.5z"}))),Uq=(0,_.forwardRef)((({className:e,children:t},n)=>(0,_.createElement)("div",{className:Cr()("components-panel__row",e),ref:n},t)));function $q({label:e,className:t,heading:n,checked:r,help:o,onChange:i,...a}){n&&Vt("`heading` prop in `CheckboxControl`",{alternative:"a separate element to implement a heading",plugin:"Gutenberg"});const l=`inspector-checkbox-control-${Rb($q)}`;return(0,_.createElement)(Hk,{label:n,id:l,help:o,className:Cr()("components-checkbox-control",t)},(0,_.createElement)("span",{className:"components-checkbox-control__input-container"},(0,_.createElement)("input",(0,nr.Z)({id:l,className:"components-checkbox-control__input",type:"checkbox",value:"1",onChange:e=>i(e.target.checked),checked:r,"aria-describedby":o?l+"__help":void 0},a)),r?(0,_.createElement)(dk,{icon:BE,className:"components-checkbox-control__checked",role:"presentation"}):null),(0,_.createElement)("label",{className:"components-checkbox-control__label",htmlFor:l},e))}const qq=({segment:e,removeSegment:t,onCheck:n})=>C().createElement("div",{className:"mailpoet-form-segments-settings-list",key:e.id},C().createElement($q,{label:e.name,defaultChecked:!!e.isChecked,onChange:(0,Ce.partial)(n,e.id),key:`check-${e.id}`}),C().createElement(Po,{icon:"no-alt",color:"#900",className:"mailpoet-form-segments-segment-remove",onClick:(0,Ce.partial)(t,e.id)}));qq.propTypes={segment:Bx().shape({name:Bx().string.isRequired,isChecked:Bx().bool,id:Bx().string.isRequired}).isRequired,onCheck:Bx().func.isRequired,removeSegment:Bx().func.isRequired};const Gq=({segments:e,updateSegment:t,removeSegment:n,onSegmentsReorder:r})=>{const[o,i]=(0,_.useState)(e);if((0,_.useEffect)((()=>{i(e)}),[e]),0===o.length)return null;const a=(e,n)=>{const r=o.find((t=>t.id===e));r.isChecked=n,t(r)};return C().createElement(w$,{onDragEnd:e=>{const t=e.source.index,n=e.destination.index,a=[...o],[l]=a.splice(t,1);a.splice(n,0,l),i(a),r(a)}},C().createElement(J$,{droppableId:"droppable"},(e=>C().createElement("div",(0,QB.Z)({},e.droppableProps,{ref:e.innerRef}),o.map(((e,t)=>C().createElement(G$,{key:e.id,draggableId:e.id,index:t},(r=>C().createElement("div",(0,QB.Z)({ref:r.innerRef},r.draggableProps,r.dragHandleProps),C().createElement(qq,{key:e.id,index:t,segment:e,onCheck:a,removeSegment:n})))))),e.placeholder))))};Gq.propTypes={segments:Bx().arrayOf(Bx().shape({name:Bx().string.isRequired,isChecked:Bx().bool,id:Bx().string.isRequired}).isRequired).isRequired,updateSegment:Bx().func.isRequired,removeSegment:Bx().func.isRequired,onSegmentsReorder:Bx().func.isRequired};var Kq=Gq;const Yq=(e,t)=>e.find((e=>e.id===t)),Xq=({label:e,onLabelChanged:t,segmentsAddedIntoSelection:n,addSegmentIntoSelection:r,setNewSelection:o})=>{const i=(0,er.Z)((e=>e("mailpoet-form-editor").getAllAvailableSegments()),[]),a=i.map((e=>({label:e.name,value:e.id}))).filter((e=>!Yq(n,e.value)));return C().createElement(lE,null,C().createElement(uF,null,C().createElement(Jk,{title:KB.Z.I18n.t("formSettings"),initialOpen:!0},C().createElement(Uq,null,C().createElement(Vk,{label:KB.Z.I18n.t("label"),value:e,"data-automation-id":"settings_first_name_label_input",onChange:t})),C().createElement(Uq,null,a.length?C().createElement(u_,{label:`${KB.Z.I18n.t("blockSegmentSelectListLabel")}:`,"data-automation-id":"select_list_selections_list",options:[{label:KB.Z.I18n.t("settingsPleaseSelectList"),value:null},...a],onChange:e=>{const t=Yq(i,e);r({name:t.name,isChecked:!1,id:e})}}):null),C().createElement(Kq,{segments:n,updateSegment:e=>{o(n.map((t=>e.id!==t?t:e)))},removeSegment:e=>{o(n.filter((t=>e!==t.id)))},onSegmentsReorder:o}))))};Xq.propTypes={label:Bx().string.isRequired,onLabelChanged:Bx().func.isRequired,addSegmentIntoSelection:Bx().func.isRequired,setNewSelection:Bx().func.isRequired,segmentsAddedIntoSelection:Bx().arrayOf(Bx().shape({name:Bx().string.isRequired,isChecked:Bx().bool,id:Bx().string.isRequired}).isRequired).isRequired};var Jq=Xq;const Qq=({attributes:e,setAttributes:t})=>{const n=(0,er.Z)((e=>e("mailpoet-form-editor").getAllAvailableSegments()),[]),r=(0,_.useMemo)((()=>e.values.map((e=>{const t={...e},r=n.find((t=>parseInt(t.id,10)===parseInt(e.id,10)));return t.name=r?r.name:"",t}))),[e.values,n]),o=e=>e.map((e=>{const t={...e};return delete t.name,t}));return C().createElement(bV,{className:e.className},C().createElement(Jq,{label:e.label,onLabelChanged:e=>t({label:e}),segmentsAddedIntoSelection:r,setNewSelection:e=>t({values:o(e)}),addSegmentIntoSelection:n=>t({values:o([...e.values,n])})}),C().createElement("span",{className:"mailpoet_segment_label","data-automation-id":"mailpoet_list_selection_block"},e.label),0===e.values.length?C().createElement("p",{className:"mailpoet_error"},KB.Z.I18n.t("blockSegmentSelectNoLists")):r.map((e=>C().createElement("label",{key:e.id,className:"mailpoet_checkbox_label"},C().createElement("input",{type:"checkbox",disabled:!0,key:e.id,checked:!!e.isChecked,className:"mailpoet_checkbox"}),e.name))))};Qq.propTypes={attributes:Bx().shape({label:Bx().string.isRequired,className:Bx().string,values:Bx().arrayOf(Bx().shape({isChecked:Bx().boolean,id:Bx().string.isRequired})).isRequired}).isRequired,setAttributes:Bx().func.isRequired};var eG=Qq;const tG={title:KB.Z.I18n.t("blockSegmentSelect"),description:KB.Z.I18n.t("blockLastNameDescription"),icon:jq,category:"fields",attributes:{label:{type:"string",default:KB.Z.I18n.t("blockSegmentSelectLabel")},values:{type:"array",default:[]}},supports:{html:!1,multiple:!1},edit:eG,save:()=>null};var nG=C().createElement(ko,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},C().createElement(yo,{d:"M4.5,11h-2V9H1v6h1.5v-2.5h2V15H6V9H4.5V11z M7,10.5h1.5V15H10v-4.5h1.5V9H7V10.5z M14.5,10l-1-1H12v6h1.5v-3.9 l1,1l1-1V15H17V9h-1.5L14.5,10z M19.5,13.5V9H18v6h5v-1.5H19.5z"}));function rG({iframeRef:e,...t}){const n=(0,_.useRef)(),r=hr([e,n]);return(0,_.useEffect)((()=>{const e=n.current,{ownerDocument:t}=e,{defaultView:r}=t;function o(){t.activeElement===e&&e.focus()}return r.addEventListener("blur",o),()=>{r.removeEventListener("blur",o)}}),[]),(0,_.createElement)("iframe",(0,nr.Z)({ref:r},t))}function oG({html:e="",title:t="",type:n,styles:r=[],scripts:o=[],onFocus:i}){const a=(0,_.useRef)(),[l,s]=(0,_.useState)(0),[c,u]=(0,_.useState)(0);function d(i=!1){if(!function(){try{return!!a.current.contentDocument.body}catch(e){return!1}}())return;const{contentDocument:l,ownerDocument:s}=a.current,{body:c}=l;if(!i&&null!==c.getAttribute("data-resizable-iframe-connected"))return;const u=(0,_.createElement)("html",{lang:s.documentElement.lang,className:n},(0,_.createElement)("head",null,(0,_.createElement)("title",null,t),(0,_.createElement)("style",{dangerouslySetInnerHTML:{__html:"\n\tbody {\n\t\tmargin: 0;\n\t}\n\thtml,\n\tbody,\n\tbody > div,\n\tbody > div iframe {\n\t\twidth: 100%;\n\t}\n\thtml.wp-has-aspect-ratio,\n\tbody.wp-has-aspect-ratio,\n\tbody.wp-has-aspect-ratio > div,\n\tbody.wp-has-aspect-ratio > div iframe {\n\t\theight: 100%;\n\t\toverflow: hidden; /* If it has an aspect ratio, it shouldn't scroll. */\n\t}\n\tbody > div > * {\n\t\tmargin-top: 0 !important; /* Has to have !important to override inline styles. */\n\t\tmargin-bottom: 0 !important;\n\t}\n"}}),r.map(((e,t)=>(0,_.createElement)("style",{key:t,dangerouslySetInnerHTML:{__html:e}})))),(0,_.createElement)("body",{"data-resizable-iframe-connected":"data-resizable-iframe-connected",className:n},(0,_.createElement)("div",{dangerouslySetInnerHTML:{__html:e}}),(0,_.createElement)("script",{type:"text/javascript",dangerouslySetInnerHTML:{__html:"\n\t( function() {\n\t\tvar observer;\n\n\t\tif ( ! window.MutationObserver || ! document.body || ! window.parent ) {\n\t\t\treturn;\n\t\t}\n\n\t\tfunction sendResize() {\n\t\t\tvar clientBoundingRect = document.body.getBoundingClientRect();\n\n\t\t\twindow.parent.postMessage( {\n\t\t\t\taction: 'resize',\n\t\t\t\twidth: clientBoundingRect.width,\n\t\t\t\theight: clientBoundingRect.height,\n\t\t\t}, '*' );\n\t\t}\n\n\t\tobserver = new MutationObserver( sendResize );\n\t\tobserver.observe( document.body, {\n\t\t\tattributes: true,\n\t\t\tattributeOldValue: false,\n\t\t\tcharacterData: true,\n\t\t\tcharacterDataOldValue: false,\n\t\t\tchildList: true,\n\t\t\tsubtree: true\n\t\t} );\n\n\t\twindow.addEventListener( 'load', sendResize, true );\n\n\t\t// Hack: Remove viewport unit styles, as these are relative\n\t\t// the iframe root and interfere with our mechanism for\n\t\t// determining the unconstrained page bounds.\n\t\tfunction removeViewportStyles( ruleOrNode ) {\n\t\t\tif( ruleOrNode.style ) {\n\t\t\t\t[ 'width', 'height', 'minHeight', 'maxHeight' ].forEach( function( style ) {\n\t\t\t\t\tif ( /^\\d+(vmin|vmax|vh|vw)$/.test( ruleOrNode.style[ style ] ) ) {\n\t\t\t\t\t\truleOrNode.style[ style ] = '';\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t}\n\t\t}\n\n\t\tArray.prototype.forEach.call( document.querySelectorAll( '[style]' ), removeViewportStyles );\n\t\tArray.prototype.forEach.call( document.styleSheets, function( stylesheet ) {\n\t\t\tArray.prototype.forEach.call( stylesheet.cssRules || stylesheet.rules, removeViewportStyles );\n\t\t} );\n\n\t\tdocument.body.style.position = 'absolute';\n\t\tdocument.body.style.width = '100%';\n\t\tdocument.body.setAttribute( 'data-resizable-iframe-connected', '' );\n\n\t\tsendResize();\n\n\t\t// Resize events can change the width of elements with 100% width, but we don't\n\t\t// get an DOM mutations for that, so do the resize when the window is resized, too.\n\t\twindow.addEventListener( 'resize', sendResize, true );\n} )();"}}),o.map((e=>(0,_.createElement)("script",{key:e,src:e})))));l.open(),l.write("<!DOCTYPE html>"+Ps(u)),l.close()}return(0,_.useEffect)((()=>{function e(){d(!1)}function t(e){const t=a.current;if(!t||t.contentWindow!==e.source)return;let n=e.data||{};if("string"==typeof n)try{n=JSON.parse(n)}catch(e){}"resize"===n.action&&(s(n.width),u(n.height))}d();const{ownerDocument:n}=a.current,{defaultView:r}=n;return a.current.addEventListener("load",e,!1),r.addEventListener("message",t),()=>{var n;null===(n=a.current)||void 0===n||n.removeEventListener("load",e,!1),r.addEventListener("message",t)}}),[]),(0,_.useEffect)((()=>{d()}),[t,n,r,o]),(0,_.useEffect)((()=>{d(!0)}),[e]),(0,_.createElement)(rG,{iframeRef:a,title:t,className:"components-sandbox",sandbox:"allow-scripts allow-same-origin allow-presentation",onFocus:i,width:Math.ceil(l),height:Math.ceil(c)})}const iG=({attributes:e,setAttributes:t,clientId:n})=>{const r=fk("color.palette"),{fontColor:o,fontSize:i,alignment:a,fontFamily:l}=(0,er.Z)((e=>{const t=e("mailpoet-form-editor").getFormSettings(),o=sH(r,e("mailpoet-form-editor").getClosestParentAttribute(n,"backgroundColor"),e("mailpoet-form-editor").getClosestParentAttribute(n,"customBackgroundColor")),i=sH(r,e("mailpoet-form-editor").getClosestParentAttribute(n,"textColor"),e("mailpoet-form-editor").getClosestParentAttribute(n,"customTextColor"));return{backgroundColor:o||t.backgroundColor,fontColor:i||t.fontColor,fontSize:t.fontSize,alignment:t.alignment,fontFamily:t.fontFamily}}),[]),[s,c]=(0,_.useState)(e.content),u=(0,_.useCallback)((0,Ce.debounce)((e=>{c(e)}),300),[]),d=C().createElement(lE,null,C().createElement(uF,null,C().createElement(Jk,{title:KB.Z.I18n.t("formSettings"),initialOpen:!0},C().createElement(gF,{label:KB.Z.I18n.t("blockCustomHtmlContentLabel"),value:e.content,"data-automation-id":"settings_custom_html_content",rows:4,onChange:e=>{t({content:e}),u(e)}}),C().createElement(JT,{label:KB.Z.I18n.t("blockCustomHtmlNl2br"),checked:e.nl2br,onChange:e=>t({nl2br:e})})))),p=e.nl2br?["body { white-space: pre-line; }"]:[];p.push(` body {font-family: ${getComputedStyle(document.body).fontFamily};}`),o?p.push(` body {color: ${o};}`):p.push(` body {color: ${getComputedStyle(document.body).color};}`),i?p.push(` body {font-size: ${i}px }`):p.push(` body {font-size: ${getComputedStyle(document.body).fontSize};}`),a&&p.push(` body {text-align: ${a}}`),l&&p.push(` body {font-family: "${l}"}`);const m=`${s}_${p}`;return C().createElement(bV,{className:e.className},d,C().createElement("div",{className:"mailpoet-html-block-editor-content-wrapper"},C().createElement(oG,{html:s,styles:p,key:m})))};iG.propTypes={attributes:Bx().shape({content:Bx().string.isRequired,nl2br:Bx().bool.isRequired,className:Bx().string}).isRequired,setAttributes:Bx().func.isRequired,clientId:Bx().string.isRequired};var aG=iG;const lG={title:KB.Z.I18n.t("blockCustomHtml"),description:KB.Z.I18n.t("blockCustomHtmlDescription"),icon:nG,category:"fields",attributes:{content:{type:"string",default:KB.Z.I18n.t("blockCustomHtmlDefault")},nl2br:{type:"boolean",default:!0}},supports:{html:!1,multiple:!0},edit:aG,save:()=>null};var sG=C().createElement(ko,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 694 694"},C().createElement(bo,null,C().createElement(yo,{d:"m 347,44.407738 c 25.64881,0 46.33333,21.800595 46.33333,47.96131 V 299.03869 h 195.26191 c 24.82143,0 45.50595,21.8006 45.50595,47.96131 0,27.03274 -20.68452,48.83333 -45.50595,48.83333 H 393.33333 v 205.79762 c 0,26.16072 -20.68452,47.96131 -46.33333,47.96131 -24.82143,0 -45.50595,-21.80059 -45.50595,-47.96131 V 395.83333 H 105.40476 c -24.821427,0 -45.50595,-21.80059 -45.50595,-48.83333 0,-26.16071 20.684523,-47.96131 45.50595,-47.96131 H 301.49405 V 92.369048 c 0,-26.160715 20.68452,-47.96131 45.50595,-47.96131 z",fillRule:"evenodd",clipRule:"evenodd"})));const cG=[{value:"text",label:KB.Z.I18n.t("customFieldTypeText")},{value:"textarea",label:KB.Z.I18n.t("customFieldTypeTextarea")},{value:"radio",label:KB.Z.I18n.t("customFieldTypeRadio")},{value:"checkbox",label:KB.Z.I18n.t("customFieldTypeCheckbox")},{value:"select",label:KB.Z.I18n.t("customFieldTypeSelect")},{value:"date",label:KB.Z.I18n.t("customFieldTypeDate")}],uG=({dateSettings:e,onSubmit:t})=>{const[n,r]=(0,_.useState)("text"),[o,i]=(0,_.useState)(null),[a,l]=(0,_.useState)({}),s=o&&!(0,Ce.isEmpty)(a)&&!1!==a.isValid,c=e.dateTypes[0].value,u=e.dateFormats[c][0];return C().createElement("div",{className:"mailpoet_custom_field_add_form","data-automation-id":"create_custom_field_form"},C().createElement("hr",null),C().createElement(u_,{label:KB.Z.I18n.t("selectCustomFieldType"),options:cG,"data-automation-id":"create_custom_field_type_select",onChange:e=>{l({}),r(e)}}),C().createElement(Vk,{label:KB.Z.I18n.t("customFieldName"),onChange:i,"data-automation-id":"create_custom_field_name_input"}),C().createElement("hr",null),(()=>{switch(n){case"checkbox":return C().createElement(fq,{mandatory:!!a.mandatory&&a.mandatory,isChecked:!!a.isChecked&&a.isChecked,checkboxLabel:a.checkboxLabel?a.checkboxLabel:"",onChange:l});case"date":return C().createElement(EV,{dateSettings:e,mandatory:!!a.mandatory&&a.mandatory,dateFormat:a.dateFormat?a.dateFormat:u,dateType:a.dateType?a.dateType:c,defaultToday:!!a.defaultToday&&a.defaultToday,onChange:l});case"radio":case"select":return C().createElement(rq,{mandatory:!!a.mandatory&&a.mandatory,values:a.values?a.values:[{name:"",id:Math.random().toString()}],onChange:l});default:return C().createElement(zV,{mandatory:!!a.mandatory&&a.mandatory,validate:a.validate?a.validate:"",fieldType:n,onChange:l})}})(),C().createElement(Gi,{isSecondary:!0,disabled:!s,"data-automation-id":"create_custom_field_submit",onClick:()=>{const e={name:o,type:n,params:NV(n,a)};t(e)}},KB.Z.I18n.t("blockCreateButton")))};uG.propTypes={dateSettings:Bx().shape({dateTypes:Bx().arrayOf(Bx().shape({label:Bx().string,value:Bx().string})),dateFormats:Bx().objectOf(Bx().arrayOf(Bx().string)),months:Bx().arrayOf(Bx().string)}).isRequired,onSubmit:Bx().func.isRequired};var dG=uG;const pG=({clientId:e})=>{const{createCustomField:t}=(0,tr.Z)("mailpoet-form-editor"),n=(0,er.Z)((e=>e("mailpoet-form-editor").getDateSettingsData()),[]),r=(0,er.Z)((e=>e("mailpoet-form-editor").getIsCustomFieldCreating()),[]);return C().createElement(pN,{icon:C().createElement(dN,{icon:sG,showColors:!0}),label:KB.Z.I18n.t("blockAddCustomFieldFormHeading"),className:"mailpoet_custom_field_add_placeholder"},r?C().createElement(ED,null):C().createElement(C().Fragment,null,C().createElement("p",null,KB.Z.I18n.t("blockAddCustomFieldDescription")),C().createElement(dG,{onSubmit:n=>{t(n,e)},dateSettings:n})))};pG.propTypes={clientId:Bx().string.isRequired};var mG=pG;const fG={title:KB.Z.I18n.t("blockAddCustomField"),description:KB.Z.I18n.t("blockAddCustomFieldDescription"),icon:sG,category:"custom-fields",attributes:{},supports:{html:!1,multiple:!1},edit:mG,save:()=>null};var hG=(0,_.createElement)(ko,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,_.createElement)(yo,{d:"M19 6H6c-1.1 0-2 .9-2 2v9c0 1.1.9 2 2 2h13c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm-4.1 1.5v10H10v-10h4.9zM5.5 17V8c0-.3.2-.5.5-.5h2.5v10H6c-.3 0-.5-.2-.5-.5zm14 0c0 .3-.2.5-.5.5h-2.6v-10H19c.3 0 .5.2.5.5v9z"}));function gG(e){let t,{doc:n}=gG;n||(n=document.implementation.createHTMLDocument(""),gG.doc=n),n.body.innerHTML=e;for(const e of n.body.firstChild.classList)if(t=e.match(/^layout-column-(\d+)$/))return Number(t[1])-1}var vG=[{attributes:{verticalAlignment:{type:"string"},backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},customTextColor:{type:"string"},textColor:{type:"string"}},migrate:e=>{if(!e.customTextColor&&!e.customBackgroundColor)return e;const t={color:{}};return e.customTextColor&&(t.color.text=e.customTextColor),e.customBackgroundColor&&(t.color.background=e.customBackgroundColor),{...(0,Ce.omit)(e,["customTextColor","customBackgroundColor"]),style:t,isStackedOnMobile:!0}},save({attributes:e}){const{verticalAlignment:t,backgroundColor:n,customBackgroundColor:r,textColor:o,customTextColor:i}=e,a=T_("background-color",n),l=T_("color",o),s=Cr()({"has-background":n||r,"has-text-color":o||i,[a]:a,[l]:l,[`are-vertically-aligned-${t}`]:t}),c={backgroundColor:a?void 0:r,color:l?void 0:i};return(0,_.createElement)("div",{className:s||void 0,style:c},(0,_.createElement)(bD.Content,null))}},{attributes:{columns:{type:"number",default:2}},isEligible:(e,t)=>!!t.some((e=>/layout-column-\d+/.test(e.originalContent)))&&t.some((e=>void 0!==gG(e.originalContent))),migrate(e,t){const n=t.reduce(((e,t)=>{const{originalContent:n}=t;let r=gG(n);return void 0===r&&(r=0),e[r]||(e[r]=[]),e[r].push(t),e}),[]).map((e=>Ul("core/column",{},e)));return[{...(0,Ce.omit)(e,["columns"]),isStackedOnMobile:!0},n]},save({attributes:e}){const{columns:t}=e;return(0,_.createElement)("div",{className:`has-${t}-columns`},(0,_.createElement)(bD.Content,null))}},{attributes:{columns:{type:"number",default:2}},migrate:(e,t)=>[e={...(0,Ce.omit)(e,["columns"]),isStackedOnMobile:!0},t],save({attributes:e}){const{verticalAlignment:t,columns:n}=e,r=Cr()(`has-${n}-columns`,{[`are-vertically-aligned-${t}`]:t});return(0,_.createElement)("div",{className:r},(0,_.createElement)(bD.Content,null))}}];const bG=e=>{const t=parseFloat(e);return Number.isFinite(t)?parseFloat(t.toFixed(2)):void 0};function yG(e,t){const{width:n=100/t}=e.attributes;return bG(n)}function wG(e,t,n=e.length){const r=function(e,t=e.length){return(0,Ce.sumBy)(e,(e=>yG(e,t)))}(e,n);return(0,Ce.mapValues)(function(e,t=e.length){return e.reduce(((e,n)=>{const r=yG(n,t);return Object.assign(e,{[n.clientId]:r})}),{})}(e,n),(e=>bG(t*e/r)))}function kG(e,t){return e.map((e=>(0,Ce.merge)({},e,{attributes:{width:`${t[e.clientId]}%`}})))}const EG=["core/column"],_G=IN(((e,t,n)=>({updateAlignment(r){const{clientId:o,setAttributes:i}=t,{updateBlockAttributes:a}=e(Iv),{getBlockOrder:l}=n.select(Iv);i({verticalAlignment:r}),l(o).forEach((e=>{a(e,{verticalAlignment:r})}))},updateColumns(r,o){const{clientId:i}=t,{replaceInnerBlocks:a}=e(Iv),{getBlocks:l}=n.select(Iv);let s=l(i);const c=function(e){return e.every((e=>{var t;const n=e.attributes.width;return Number.isFinite(null!=n&&null!==(t=n.endsWith)&&void 0!==t&&t.call(n,"%")?parseFloat(n):n)}))}(s),u=o>r;if(u&&c){const e=bG(100/o);s=[...kG(s,wG(s,100-e)),...(0,Ce.times)(o-r,(()=>Ul("core/column",{width:`${e}%`})))]}else u?s=[...s,...(0,Ce.times)(o-r,(()=>Ul("core/column")))]:(s=(0,Ce.dropRight)(s,r-o),c&&(s=kG(s,wG(s,100))));a(i,s)}})))((function({attributes:e,setAttributes:t,updateAlignment:n,updateColumns:r,clientId:o}){const{isStackedOnMobile:i,verticalAlignment:a}=e,{count:l}=(0,er.Z)((e=>({count:e(Iv).getBlockCount(o)})),[o]),s=vD(hR({className:Cr()({[`are-vertically-aligned-${a}`]:a,"is-not-stacked-on-mobile":!i})}),{allowedBlocks:EG,orientation:"horizontal",renderAppender:!1});return(0,_.createElement)(_.Fragment,null,(0,_.createElement)(Ov,null,(0,_.createElement)(kN,{onChange:n,value:a})),(0,_.createElement)(lE,null,(0,_.createElement)(Jk,null,(0,_.createElement)(hC,{label:U("Columns"),value:l,onChange:e=>r(l,e),min:1,max:Math.max(6,l)}),l>6&&(0,_.createElement)(YC,{status:"warning",isDismissible:!1},U("This column count exceeds the recommended amount and may cause visual breakage.")),(0,_.createElement)(JT,{label:U("Stack on mobile"),checked:i,onChange:()=>t({isStackedOnMobile:!i})}))),(0,_.createElement)("div",s))}));function CG({clientId:e,name:t,setAttributes:n}){const{blockType:r,defaultVariation:o,variations:i}=(0,er.Z)((e=>{const{getBlockVariations:n,getBlockType:r,getDefaultBlockVariation:o}=e(cl);return{blockType:r(t),defaultVariation:o(t,"block"),variations:n(t,"block")}}),[t]),{replaceInnerBlocks:a}=(0,tr.Z)(Iv),l=hR();return(0,_.createElement)("div",l,(0,_.createElement)(fN,{icon:(0,Ce.get)(r,["icon","src"]),label:(0,Ce.get)(r,["title"]),variations:i,onSelect:(t=o)=>{t.attributes&&n(t.attributes),t.innerBlocks&&a(e,$l(t.innerBlocks),!0)},allowSkip:!0}))}var xG=[{name:"one-column-full",title:U("100"),description:U("One column"),icon:(0,_.createElement)(ko,{width:"48",height:"48",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg"},(0,_.createElement)(yo,{fillRule:"evenodd",clipRule:"evenodd",d:"m39.0625 14h-30.0625v20.0938h30.0625zm-30.0625-2c-1.10457 0-2 .8954-2 2v20.0938c0 1.1045.89543 2 2 2h30.0625c1.1046 0 2-.8955 2-2v-20.0938c0-1.1046-.8954-2-2-2z"})),innerBlocks:[["core/column"]],scope:["block"]},{name:"two-columns-equal",title:U("50 / 50"),description:U("Two columns; equal split"),icon:(0,_.createElement)(ko,{width:"48",height:"48",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg"},(0,_.createElement)(yo,{fillRule:"evenodd",clipRule:"evenodd",d:"M39 12C40.1046 12 41 12.8954 41 14V34C41 35.1046 40.1046 36 39 36H9C7.89543 36 7 35.1046 7 34V14C7 12.8954 7.89543 12 9 12H39ZM39 34V14H25V34H39ZM23 34H9V14H23V34Z"})),isDefault:!0,innerBlocks:[["core/column"],["core/column"]],scope:["block"]},{name:"two-columns-one-third-two-thirds",title:U("30 / 70"),description:U("Two columns; one-third, two-thirds split"),icon:(0,_.createElement)(ko,{width:"48",height:"48",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg"},(0,_.createElement)(yo,{fillRule:"evenodd",clipRule:"evenodd",d:"M39 12C40.1046 12 41 12.8954 41 14V34C41 35.1046 40.1046 36 39 36H9C7.89543 36 7 35.1046 7 34V14C7 12.8954 7.89543 12 9 12H39ZM39 34V14H20V34H39ZM18 34H9V14H18V34Z"})),innerBlocks:[["core/column",{width:"33.33%"}],["core/column",{width:"66.66%"}]],scope:["block"]},{name:"two-columns-two-thirds-one-third",title:U("70 / 30"),description:U("Two columns; two-thirds, one-third split"),icon:(0,_.createElement)(ko,{width:"48",height:"48",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg"},(0,_.createElement)(yo,{fillRule:"evenodd",clipRule:"evenodd",d:"M39 12C40.1046 12 41 12.8954 41 14V34C41 35.1046 40.1046 36 39 36H9C7.89543 36 7 35.1046 7 34V14C7 12.8954 7.89543 12 9 12H39ZM39 34V14H30V34H39ZM28 34H9V14H28V34Z"})),innerBlocks:[["core/column",{width:"66.66%"}],["core/column",{width:"33.33%"}]],scope:["block"]},{name:"three-columns-equal",title:U("33 / 33 / 33"),description:U("Three columns; equal split"),icon:(0,_.createElement)(ko,{width:"48",height:"48",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg"},(0,_.createElement)(yo,{fillRule:"evenodd",d:"M41 14a2 2 0 0 0-2-2H9a2 2 0 0 0-2 2v20a2 2 0 0 0 2 2h30a2 2 0 0 0 2-2V14zM28.5 34h-9V14h9v20zm2 0V14H39v20h-8.5zm-13 0H9V14h8.5v20z"})),innerBlocks:[["core/column"],["core/column"],["core/column"]],scope:["block"]},{name:"three-columns-wider-center",title:U("25 / 50 / 25"),description:U("Three columns; wide center column"),icon:(0,_.createElement)(ko,{width:"48",height:"48",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg"},(0,_.createElement)(yo,{fillRule:"evenodd",d:"M41 14a2 2 0 0 0-2-2H9a2 2 0 0 0-2 2v20a2 2 0 0 0 2 2h30a2 2 0 0 0 2-2V14zM31 34H17V14h14v20zm2 0V14h6v20h-6zm-18 0H9V14h6v20z"})),innerBlocks:[["core/column",{width:"25%"}],["core/column",{width:"50%"}],["core/column",{width:"25%"}]],scope:["block"]}],SG={from:[{type:"block",isMultiBlock:!0,blocks:["*"],__experimentalConvert:e=>{const t=+(100/e.length).toFixed(2);return Ul("core/columns",{},$l(e.map((({name:e,attributes:n,innerBlocks:r})=>["core/column",{width:`${t}%`},[[e,{...n},r]]]))))},isMatch:({length:e})=>e&&e<=6},{type:"block",blocks:["core/media-text"],priority:1,transform:(e,t)=>{const{align:n,backgroundColor:r,textColor:o,style:i,mediaAlt:a,mediaId:l,mediaPosition:s,mediaSizeSlug:c,mediaType:u,mediaUrl:d,mediaWidth:p,verticalAlignment:m}=e;let f;f="image"!==u&&u?["core/video",{id:l,src:d}]:["core/image",{id:l,alt:a,url:d,sizeSlug:c,href:e.href,linkClass:e.linkClass,linkDestination:e.linkDestination,linkTarget:e.linkTarget,rel:e.rel}];const h=[["core/column",{width:`${p}%`},[f]],["core/column",{width:100-p+"%"},t]];return"right"===s&&h.reverse(),Ul("core/columns",{align:n,backgroundColor:r,textColor:o,style:i,verticalAlignment:m},$l(h))}}]};const IG={apiVersion:2,name:"core/columns",title:"Columns",category:"design",description:"Add a block that displays content in multiple columns, then add whatever content blocks you’d like.",textdomain:"default",attributes:{verticalAlignment:{type:"string"},isStackedOnMobile:{type:"boolean",default:!0}},supports:{anchor:!0,align:["wide","full"],html:!1,color:{gradients:!0,link:!0}},editorStyle:"wp-block-columns-editor",style:"wp-block-columns"},{name:TG}=IG,NG={icon:hG,variations:xG,example:{innerBlocks:[{name:"core/column",innerBlocks:[{name:"core/paragraph",attributes:{content:U("Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent et eros eu felis.")}},{name:"core/image",attributes:{url:"https://s.w.org/images/core/5.3/Windbuchencom.jpg"}},{name:"core/paragraph",attributes:{content:U("Suspendisse commodo neque lacus, a dictum orci interdum et.")}}]},{name:"core/column",innerBlocks:[{name:"core/paragraph",attributes:{content:U("Etiam et egestas lorem. Vivamus sagittis sit amet dolor quis lobortis. Integer sed fermentum arcu, id vulputate lacus. Etiam fermentum sem eu quam hendrerit.")}},{name:"core/paragraph",attributes:{content:U("Nam risus massa, ullamcorper consectetur eros fermentum, porta aliquet ligula. Sed vel mauris nec enim.")}}]}]},deprecated:vG,edit:e=>{const{clientId:t}=e,n=(0,er.Z)((e=>e(Iv).getBlocks(t).length>0),[t])?_G:CG;return(0,_.createElement)(n,e)},save:function({attributes:e}){const{isStackedOnMobile:t,verticalAlignment:n}=e,r=Cr()({[`are-vertically-aligned-${n}`]:n,"is-not-stacked-on-mobile":!t});return(0,_.createElement)("div",hR.save({className:r}),(0,_.createElement)(bD.Content,null))},transforms:SG},AG="core/columns",RG={name:AG,examples:null,deprecated:null,save:()=>null},LG={...IG,...NG,...RG,category:"design",supports:{...IG.supports,anchor:!1}};var PG=(0,_.createElement)(ko,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,_.createElement)(yo,{d:"M19 6H6c-1.1 0-2 .9-2 2v9c0 1.1.9 2 2 2h13c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zM6 17.5c-.3 0-.5-.2-.5-.5V8c0-.3.2-.5.5-.5h3v10H6zm13.5-.5c0 .3-.2.5-.5.5h-3v-10h3c.3 0 .5.2.5.5v9z"})),OG=[{attributes:{verticalAlignment:{type:"string"},width:{type:"number",min:0,max:100}},isEligible:({width:e})=>isFinite(e),migrate:e=>({...e,width:`${e.width}%`}),save({attributes:e}){const{verticalAlignment:t,width:n}=e,r=Cr()({[`is-vertically-aligned-${t}`]:t}),o={flexBasis:n+"%"};return(0,_.createElement)("div",{className:r,style:o},(0,_.createElement)(bD.Content,null))}}];const DG={apiVersion:2,name:"core/column",title:"Column",category:"text",parent:["core/columns"],description:"A single column within a columns block.",textdomain:"default",attributes:{verticalAlignment:{type:"string"},width:{type:"string"},templateLock:{enum:["all","insert",!1]}},supports:{anchor:!0,reusable:!1,html:!1,color:{gradients:!0,link:!0},spacing:{padding:!0}}},{name:MG}=DG,BG={icon:PG,edit:function({attributes:{verticalAlignment:e,width:t,templateLock:n=!1},setAttributes:r,clientId:o}){const i=Cr()("block-core-columns",{[`is-vertically-aligned-${e}`]:e}),a=Xv({availableUnits:fk("spacing.units")||["%","px","em","rem","vw"]}),{columnsIds:l,hasChildBlocks:s,rootClientId:c}=(0,er.Z)((e=>{const{getBlockOrder:t,getBlockRootClientId:n}=e(Iv),r=n(o);return{hasChildBlocks:t(o).length>0,rootClientId:r,columnsIds:t(r)}}),[o]),{updateBlockAttributes:u}=(0,tr.Z)(Iv),d=Number.isFinite(t)?t+"%":t,p=hR({className:i,style:d?{flexBasis:d}:void 0}),m=l.length,f=l.indexOf(o)+1,h=L(U("%1$s (%2$d of %3$d)"),p["aria-label"],f,m),g=vD({...p,"aria-label":h},{templateLock:n,renderAppender:s?void 0:bD.ButtonBlockAppender});return(0,_.createElement)(_.Fragment,null,(0,_.createElement)(Ov,null,(0,_.createElement)(kN,{onChange:e=>{r({verticalAlignment:e}),u(c,{verticalAlignment:null})},value:e})),(0,_.createElement)(lE,null,(0,_.createElement)(Jk,{title:U("Column settings")},(0,_.createElement)(uk,{label:U("Width"),labelPosition:"edge",__unstableInputWidth:"80px",value:t||"",onChange:e=>{e=0>parseFloat(e)?"0":e,r({width:e})},units:a}))),(0,_.createElement)("div",g))},save:function({attributes:e}){const{verticalAlignment:t,width:n}=e,r=Cr()({[`is-vertically-aligned-${t}`]:t});let o;return n&&(o={flexBasis:Number.isFinite(n)?n+"%":n}),(0,_.createElement)("div",hR.save({className:r,style:o}),(0,_.createElement)(bD.Content,null))},deprecated:OG},FG="core/column",zG={name:FG,examples:null,deprecated:null,save:()=>null},HG={...DG,...BG,...zG,category:"design",supports:{...DG.supports,anchor:!1}};var VG=(0,_.createElement)(ko,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,_.createElement)(yo,{d:"M6.2 5.2v13.4l5.8-4.8 5.8 4.8V5.2z"}));const WG={className:!1,anchor:!0},ZG={align:{type:"string"},content:{type:"string",source:"html",selector:"h1,h2,h3,h4,h5,h6",default:""},level:{type:"number",default:2},placeholder:{type:"string"}},jG=e=>{if(!e.customTextColor)return e;const t={color:{text:e.customTextColor}};return{...(0,Ce.omit)(e,["customTextColor"]),style:t}},UG=["left","right","center"],$G=e=>{const{align:t,...n}=e;return UG.includes(t)?{...n,textAlign:t}:e};var qG=[{supports:{align:["wide","full"],anchor:!0,className:!1,color:{link:!0},fontSize:!0,lineHeight:!0,__experimentalSelector:{"core/heading/h1":"h1","core/heading/h2":"h2","core/heading/h3":"h3","core/heading/h4":"h4","core/heading/h5":"h5","core/heading/h6":"h6"},__unstablePasteTextInline:!0},attributes:ZG,isEligible:({align:e})=>UG.includes(e),migrate:$G,save({attributes:e}){const{align:t,content:n,level:r}=e,o="h"+r,i=Cr()({[`has-text-align-${t}`]:t});return(0,_.createElement)(o,hR.save({className:i}),(0,_.createElement)(DM.Content,{value:n}))}},{supports:WG,attributes:{...ZG,customTextColor:{type:"string"},textColor:{type:"string"}},migrate:e=>jG($G(e)),save({attributes:e}){const{align:t,content:n,customTextColor:r,level:o,textColor:i}=e,a="h"+o,l=T_("color",i),s=Cr()({[l]:l,"has-text-color":i||r,[`has-text-align-${t}`]:t});return(0,_.createElement)(DM.Content,{className:s||void 0,tagName:a,style:{color:l?void 0:r},value:n})}},{attributes:{...ZG,customTextColor:{type:"string"},textColor:{type:"string"}},migrate:e=>jG($G(e)),save({attributes:e}){const{align:t,content:n,customTextColor:r,level:o,textColor:i}=e,a="h"+o,l=T_("color",i),s=Cr()({[l]:l,[`has-text-align-${t}`]:t});return(0,_.createElement)(DM.Content,{className:s||void 0,tagName:a,style:{color:l?void 0:r},value:n})},supports:WG},{supports:WG,attributes:{...ZG,customTextColor:{type:"string"},textColor:{type:"string"}},migrate:e=>jG($G(e)),save({attributes:e}){const{align:t,level:n,content:r,textColor:o,customTextColor:i}=e,a="h"+n,l=T_("color",o),s=Cr()({[l]:l});return(0,_.createElement)(DM.Content,{className:s||void 0,tagName:a,style:{textAlign:t,color:l?void 0:i},value:r})}}];function GG({level:e,isPressed:t=!1}){const n={1:"M9 5h2v10H9v-4H5v4H3V5h2v4h4V5zm6.6 0c-.6.9-1.5 1.7-2.6 2v1h2v7h2V5h-1.4z",2:"M7 5h2v10H7v-4H3v4H1V5h2v4h4V5zm8 8c.5-.4.6-.6 1.1-1.1.4-.4.8-.8 1.2-1.3.3-.4.6-.8.9-1.3.2-.4.3-.8.3-1.3 0-.4-.1-.9-.3-1.3-.2-.4-.4-.7-.8-1-.3-.3-.7-.5-1.2-.6-.5-.2-1-.2-1.5-.2-.4 0-.7 0-1.1.1-.3.1-.7.2-1 .3-.3.1-.6.3-.9.5-.3.2-.6.4-.8.7l1.2 1.2c.3-.3.6-.5 1-.7.4-.2.7-.3 1.2-.3s.9.1 1.3.4c.3.3.5.7.5 1.1 0 .4-.1.8-.4 1.1-.3.5-.6.9-1 1.2-.4.4-1 .9-1.6 1.4-.6.5-1.4 1.1-2.2 1.6V15h8v-2H15z",3:"M12.1 12.2c.4.3.8.5 1.2.7.4.2.9.3 1.4.3.5 0 1-.1 1.4-.3.3-.1.5-.5.5-.8 0-.2 0-.4-.1-.6-.1-.2-.3-.3-.5-.4-.3-.1-.7-.2-1-.3-.5-.1-1-.1-1.5-.1V9.1c.7.1 1.5-.1 2.2-.4.4-.2.6-.5.6-.9 0-.3-.1-.6-.4-.8-.3-.2-.7-.3-1.1-.3-.4 0-.8.1-1.1.3-.4.2-.7.4-1.1.6l-1.2-1.4c.5-.4 1.1-.7 1.6-.9.5-.2 1.2-.3 1.8-.3.5 0 1 .1 1.6.2.4.1.8.3 1.2.5.3.2.6.5.8.8.2.3.3.7.3 1.1 0 .5-.2.9-.5 1.3-.4.4-.9.7-1.5.9v.1c.6.1 1.2.4 1.6.8.4.4.7.9.7 1.5 0 .4-.1.8-.3 1.2-.2.4-.5.7-.9.9-.4.3-.9.4-1.3.5-.5.1-1 .2-1.6.2-.8 0-1.6-.1-2.3-.4-.6-.2-1.1-.6-1.6-1l1.1-1.4zM7 9H3V5H1v10h2v-4h4v4h2V5H7v4z",4:"M9 15H7v-4H3v4H1V5h2v4h4V5h2v10zm10-2h-1v2h-2v-2h-5v-2l4-6h3v6h1v2zm-3-2V7l-2.8 4H16z",5:"M12.1 12.2c.4.3.7.5 1.1.7.4.2.9.3 1.3.3.5 0 1-.1 1.4-.4.4-.3.6-.7.6-1.1 0-.4-.2-.9-.6-1.1-.4-.3-.9-.4-1.4-.4H14c-.1 0-.3 0-.4.1l-.4.1-.5.2-1-.6.3-5h6.4v1.9h-4.3L14 8.8c.2-.1.5-.1.7-.2.2 0 .5-.1.7-.1.5 0 .9.1 1.4.2.4.1.8.3 1.1.6.3.2.6.6.8.9.2.4.3.9.3 1.4 0 .5-.1 1-.3 1.4-.2.4-.5.8-.9 1.1-.4.3-.8.5-1.3.7-.5.2-1 .3-1.5.3-.8 0-1.6-.1-2.3-.4-.6-.2-1.1-.6-1.6-1-.1-.1 1-1.5 1-1.5zM9 15H7v-4H3v4H1V5h2v4h4V5h2v10z",6:"M9 15H7v-4H3v4H1V5h2v4h4V5h2v10zm8.6-7.5c-.2-.2-.5-.4-.8-.5-.6-.2-1.3-.2-1.9 0-.3.1-.6.3-.8.5l-.6.9c-.2.5-.2.9-.2 1.4.4-.3.8-.6 1.2-.8.4-.2.8-.3 1.3-.3.4 0 .8 0 1.2.2.4.1.7.3 1 .6.3.3.5.6.7.9.2.4.3.8.3 1.3s-.1.9-.3 1.4c-.2.4-.5.7-.8 1-.4.3-.8.5-1.2.6-1 .3-2 .3-3 0-.5-.2-1-.5-1.4-.9-.4-.4-.8-.9-1-1.5-.2-.6-.3-1.3-.3-2.1s.1-1.6.4-2.3c.2-.6.6-1.2 1-1.6.4-.4.9-.7 1.4-.9.6-.3 1.1-.4 1.7-.4.7 0 1.4.1 2 .3.5.2 1 .5 1.4.8 0 .1-1.3 1.4-1.3 1.4zm-2.4 5.8c.2 0 .4 0 .6-.1.2 0 .4-.1.5-.2.1-.1.3-.3.4-.5.1-.2.1-.5.1-.7 0-.4-.1-.8-.4-1.1-.3-.2-.7-.3-1.1-.3-.3 0-.7.1-1 .2-.4.2-.7.4-1 .7 0 .3.1.7.3 1 .1.2.3.4.4.6.2.1.3.3.5.3.2.1.5.2.7.1z"};return n.hasOwnProperty(e)?(0,_.createElement)(ko,{width:"24",height:"24",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",isPressed:t},(0,_.createElement)(yo,{d:n[e]})):null}const KG=[1,2,3,4,5,6],YG={className:"block-library-heading-level-dropdown",isAlternate:!0};function XG({selectedLevel:e,onChange:t}){return(0,_.createElement)(Cp,{popoverProps:YG,renderToggle:({onToggle:t,isOpen:n})=>(0,_.createElement)(kp,{"aria-expanded":n,"aria-haspopup":"true",icon:(0,_.createElement)(GG,{level:e}),label:U("Change heading level"),onClick:t,onKeyDown:e=>{n||e.keyCode!==Wr||(e.preventDefault(),t())},showTooltip:!0}),renderContent:()=>(0,_.createElement)(DL,{className:"block-library-heading-level-toolbar",label:U("Change heading level")},(0,_.createElement)(Pp,{isCollapsed:!1,controls:KG.map((n=>{const r=n===e;return{icon:(0,_.createElement)(GG,{level:n,isPressed:r}),title:L(U("Heading %d"),n),isActive:r,onClick(){t(n)}}}))}))})}const{name:JG}={apiVersion:2,name:"core/heading",title:"Heading",category:"text",description:"Introduce new sections and organize content to help visitors (and search engines) understand the structure of your content.",keywords:["title","subtitle"],textdomain:"default",attributes:{textAlign:{type:"string"},content:{type:"string",source:"html",selector:"h1,h2,h3,h4,h5,h6",default:"",__experimentalRole:"content"},level:{type:"number",default:2},placeholder:{type:"string"}},supports:{align:["wide","full"],anchor:!0,className:!1,color:{link:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontWeight:!0},__experimentalSelector:"h1,h2,h3,h4,h5,h6",__unstablePasteTextInline:!0},editorStyle:"wp-block-heading-editor",style:"wp-block-heading"};var QG={from:[{type:"block",isMultiBlock:!0,blocks:["core/paragraph"],transform:e=>e.map((({content:e,anchor:t})=>Ul(JG,{content:e,anchor:t})))},{type:"raw",selector:"h1,h2,h3,h4,h5,h6",schema:({phrasingContentSchema:e,isPaste:t})=>{const n={children:e,attributes:t?[]:["style","id"]};return{h1:n,h2:n,h3:n,h4:n,h5:n,h6:n}},transform(e){const t=Bc(JG,e.outerHTML),{textAlign:n}=e.style||{};var r;return t.level=(r=e.nodeName,Number(r.substr(1))),"left"!==n&&"center"!==n&&"right"!==n||(t.align=n),Ul(JG,t)}},...[1,2,3,4,5,6].map((e=>({type:"prefix",prefix:Array(e+1).join("#"),transform:t=>Ul(JG,{level:e,content:t})}))),...[1,2,3,4,5,6].map((e=>({type:"enter",regExp:new RegExp(`^/(h|H)${e}$`),transform:t=>Ul(JG,{level:e,content:t})})))],to:[{type:"block",isMultiBlock:!0,blocks:["core/paragraph"],transform:e=>e.map((({content:e,anchor:t})=>Ul("core/paragraph",{content:e,anchor:t})))}]};const eK={apiVersion:2,name:"core/heading",title:"Heading",category:"text",description:"Introduce new sections and organize content to help visitors (and search engines) understand the structure of your content.",keywords:["title","subtitle"],textdomain:"default",attributes:{textAlign:{type:"string"},content:{type:"string",source:"html",selector:"h1,h2,h3,h4,h5,h6",default:"",__experimentalRole:"content"},level:{type:"number",default:2},placeholder:{type:"string"}},supports:{align:["wide","full"],anchor:!0,className:!1,color:{link:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontWeight:!0},__experimentalSelector:"h1,h2,h3,h4,h5,h6",__unstablePasteTextInline:!0},editorStyle:"wp-block-heading-editor",style:"wp-block-heading"},{name:tK}=eK,nK={icon:VG,example:{attributes:{content:U("Code is Poetry"),level:2}},__experimentalLabel(e,{context:t}){if("accessibility"===t){const{content:t,level:n}=e;return(0,Ce.isEmpty)(t)?L(U("Level %s. Empty."),n):L(U("Level %1$s. %2$s"),n,t)}},transforms:QG,deprecated:qG,merge:(e,t)=>({content:(e.content||"")+(t.content||"")}),edit:function({attributes:e,setAttributes:t,mergeBlocks:n,onReplace:r,style:o,clientId:i}){const{textAlign:a,content:l,level:s,placeholder:c}=e,u="h"+s,d=hR({className:Cr()({[`has-text-align-${a}`]:a}),style:o});return(0,_.createElement)(_.Fragment,null,(0,_.createElement)(Ov,{group:"block"},(0,_.createElement)(XG,{selectedLevel:s,onChange:e=>t({level:e})}),(0,_.createElement)(uN,{value:a,onChange:e=>{t({textAlign:e})}})),(0,_.createElement)(DM,(0,nr.Z)({identifier:"content",tagName:u,value:l,onChange:e=>t({content:e}),onMerge:n,onSplit:(t,n)=>{let r;return r=n||t?Ul("core/heading",{...e,content:t}):Ul("core/paragraph"),n&&(r.clientId=i),r},onReplace:r,onRemove:()=>r([]),"aria-label":U("Heading text"),placeholder:c||U("Heading"),textAlign:a},d)))},save:function({attributes:e}){const{textAlign:t,content:n,level:r}=e,o="h"+r,i=Cr()({[`has-text-align-${t}`]:t});return(0,_.createElement)(o,hR.save({className:i}),(0,_.createElement)(DM.Content,{value:n}))}},rK="core/heading",oK={name:rK,examples:null,deprecated:null,save:()=>null},iK={...eK,...nK,...oK,category:"design",supports:{...eK.supports,html:!1}};var aK=(0,_.createElement)(ko,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,_.createElement)(yo,{d:"M18.3 4H9.9v-.1l-.9.2c-2.3.4-4 2.4-4 4.8s1.7 4.4 4 4.8l.7.1V20h1.5V5.5h2.9V20h1.5V5.5h2.7V4z"}));const lK={className:!1},sK={align:{type:"string"},content:{type:"string",source:"html",selector:"p",default:""},dropCap:{type:"boolean",default:!1},placeholder:{type:"string"},textColor:{type:"string"},backgroundColor:{type:"string"},fontSize:{type:"string"},direction:{type:"string",enum:["ltr","rtl"]},style:{type:"object"}},cK=e=>{if(!e.customTextColor&&!e.customBackgroundColor&&!e.customFontSize)return e;const t={};return(e.customTextColor||e.customBackgroundColor)&&(t.color={}),e.customTextColor&&(t.color.text=e.customTextColor),e.customBackgroundColor&&(t.color.background=e.customBackgroundColor),e.customFontSize&&(t.typography={fontSize:e.customFontSize}),{...(0,Ce.omit)(e,["customTextColor","customBackgroundColor","customFontSize"]),style:t}};var uK=[{supports:lK,attributes:{...(0,Ce.omit)(sK,["style"]),customTextColor:{type:"string"},customBackgroundColor:{type:"string"},customFontSize:{type:"number"}},migrate:cK,save({attributes:e}){const{align:t,content:n,dropCap:r,backgroundColor:o,textColor:i,customBackgroundColor:a,customTextColor:l,fontSize:s,customFontSize:c,direction:u}=e,d=T_("color",i),p=T_("background-color",o),m=zS(s),f=Cr()({"has-text-color":i||l,"has-background":o||a,"has-drop-cap":r,[`has-text-align-${t}`]:t,[m]:m,[d]:d,[p]:p}),h={backgroundColor:p?void 0:a,color:d?void 0:l,fontSize:m?void 0:c};return(0,_.createElement)(DM.Content,{tagName:"p",style:h,className:f||void 0,value:n,dir:u})}},{supports:lK,attributes:{...(0,Ce.omit)(sK,["style"]),customTextColor:{type:"string"},customBackgroundColor:{type:"string"},customFontSize:{type:"number"}},migrate:cK,save({attributes:e}){const{align:t,content:n,dropCap:r,backgroundColor:o,textColor:i,customBackgroundColor:a,customTextColor:l,fontSize:s,customFontSize:c,direction:u}=e,d=T_("color",i),p=T_("background-color",o),m=zS(s),f=Cr()({"has-text-color":i||l,"has-background":o||a,"has-drop-cap":r,[m]:m,[d]:d,[p]:p}),h={backgroundColor:p?void 0:a,color:d?void 0:l,fontSize:m?void 0:c,textAlign:t};return(0,_.createElement)(DM.Content,{tagName:"p",style:h,className:f||void 0,value:n,dir:u})}},{supports:lK,attributes:{...(0,Ce.omit)(sK,["style"]),customTextColor:{type:"string"},customBackgroundColor:{type:"string"},customFontSize:{type:"number"},width:{type:"string"}},migrate:cK,save({attributes:e}){const{width:t,align:n,content:r,dropCap:o,backgroundColor:i,textColor:a,customBackgroundColor:l,customTextColor:s,fontSize:c,customFontSize:u}=e,d=T_("color",a),p=T_("background-color",i),m=c&&`is-${c}-text`,f=Cr()({[`align${t}`]:t,"has-background":i||l,"has-drop-cap":o,[m]:m,[d]:d,[p]:p}),h={backgroundColor:p?void 0:l,color:d?void 0:s,fontSize:m?void 0:u,textAlign:n};return(0,_.createElement)(DM.Content,{tagName:"p",style:h,className:f||void 0,value:r})}},{supports:lK,attributes:(0,Ce.omit)({...sK,fontSize:{type:"number"}},["style"]),save({attributes:e}){const{width:t,align:n,content:r,dropCap:o,backgroundColor:i,textColor:a,fontSize:l}=e,s=Cr()({[`align${t}`]:t,"has-background":i,"has-drop-cap":o}),c={backgroundColor:i,color:a,fontSize:l,textAlign:n};return(0,_.createElement)("p",{style:c,className:s||void 0},r)},migrate:e=>cK((0,Ce.omit)({...e,customFontSize:(0,Ce.isFinite)(e.fontSize)?e.fontSize:void 0,customTextColor:e.textColor&&"#"===e.textColor[0]?e.textColor:void 0,customBackgroundColor:e.backgroundColor&&"#"===e.backgroundColor[0]?e.backgroundColor:void 0}))},{supports:lK,attributes:{...sK,content:{type:"string",source:"html",default:""}},save:({attributes:e})=>(0,_.createElement)(hs,null,e.content),migrate:e=>e}],dK=(0,_.createElement)(ko,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},(0,_.createElement)(yo,{d:"M5.52 2h7.43c.55 0 1 .45 1 1s-.45 1-1 1h-1v13c0 .55-.45 1-1 1s-1-.45-1-1V5c0-.55-.45-1-1-1s-1 .45-1 1v12c0 .55-.45 1-1 1s-1-.45-1-1v-5.96h-.43C3.02 11.04 1 9.02 1 6.52S3.02 2 5.52 2zM14 14l5-4-5-4v8z"}));function pK({direction:e,setDirection:t}){return G()&&(0,_.createElement)(Dv,{controls:[{icon:dK,title:$("Left to right","editor button"),isActive:"ltr"===e,onClick(){t("ltr"===e?void 0:"ltr")}}]})}const{name:mK}={apiVersion:2,name:"core/paragraph",title:"Paragraph",category:"text",description:"Start with the building block of all narrative.",keywords:["text"],textdomain:"default",attributes:{align:{type:"string"},content:{type:"string",source:"html",selector:"p",default:"",__experimentalRole:"content"},dropCap:{type:"boolean",default:!1},placeholder:{type:"string"},direction:{type:"string",enum:["ltr","rtl"]}},supports:{anchor:!0,className:!1,color:{link:!0},typography:{fontSize:!0,lineHeight:!0},__experimentalSelector:"p",__unstablePasteTextInline:!0},editorStyle:"wp-block-paragraph-editor",style:"wp-block-paragraph"};var fK={from:[{type:"raw",priority:20,selector:"p",schema:({phrasingContentSchema:e,isPaste:t})=>({p:{children:e,attributes:t?[]:["style","id"]}}),transform(e){const t=Bc(mK,e.outerHTML),{textAlign:n}=e.style||{};return"left"!==n&&"center"!==n&&"right"!==n||(t.align=n),Ul(mK,t)}}]};const hK={apiVersion:2,name:"core/paragraph",title:"Paragraph",category:"text",description:"Start with the building block of all narrative.",keywords:["text"],textdomain:"default",attributes:{align:{type:"string"},content:{type:"string",source:"html",selector:"p",default:"",__experimentalRole:"content"},dropCap:{type:"boolean",default:!1},placeholder:{type:"string"},direction:{type:"string",enum:["ltr","rtl"]}},supports:{anchor:!0,className:!1,color:{link:!0},typography:{fontSize:!0,lineHeight:!0},__experimentalSelector:"p",__unstablePasteTextInline:!0},editorStyle:"wp-block-paragraph-editor",style:"wp-block-paragraph"},{name:gK}=hK,vK={icon:aK,example:{attributes:{content:U("In a village of La Mancha, the name of which I have no desire to call to mind, there lived not long since one of those gentlemen that keep a lance in the lance-rack, an old buckler, a lean hack, and a greyhound for coursing."),style:{typography:{fontSize:28}},dropCap:!0}},__experimentalLabel(e,{context:t}){if("accessibility"===t){const{content:t}=e;return(0,Ce.isEmpty)(t)?U("Empty"):t}},transforms:fK,deprecated:uK,merge:(e,t)=>({content:(e.content||"")+(t.content||"")}),edit:function({attributes:e,mergeBlocks:t,onReplace:n,onRemove:r,setAttributes:o,clientId:i}){const{align:a,content:l,direction:s,dropCap:c,placeholder:u}=e,d=fk("typography.dropCap"),p=hR({className:Cr()({"has-drop-cap":c,[`has-text-align-${a}`]:a}),style:{direction:s}});return(0,_.createElement)(_.Fragment,null,(0,_.createElement)(Ov,{group:"block"},(0,_.createElement)(uN,{value:a,onChange:e=>o({align:e})}),(0,_.createElement)(pK,{direction:s,setDirection:e=>o({direction:e})})),d&&(0,_.createElement)(lE,null,(0,_.createElement)(Jk,{title:U("Text settings")},(0,_.createElement)(JT,{label:U("Drop cap"),checked:!!c,onChange:()=>o({dropCap:!c}),help:U(c?"Showing large initial letter.":"Toggle to show a large initial letter.")}))),(0,_.createElement)(DM,(0,nr.Z)({identifier:"content",tagName:"p"},p,{value:l,onChange:e=>o({content:e}),onSplit:(t,n)=>{let r;(n||t)&&(r={...e,content:t});const o=Ul("core/paragraph",r);return n&&(o.clientId=i),o},onMerge:t,onReplace:n,onRemove:r,"aria-label":U(l?"Paragraph block":"Empty block; start writing or type forward slash to choose a block"),"data-empty":!l,placeholder:u||U("Type / to choose a block"),__unstableEmbedURLOnPaste:!0,__unstableAllowPrefixTransformations:!0})))},save:function({attributes:e}){const{align:t,content:n,dropCap:r,direction:o}=e,i=Cr()({"has-drop-cap":r,[`has-text-align-${t}`]:t});return(0,_.createElement)("p",hR.save({className:i,dir:o}),(0,_.createElement)(DM.Content,{value:n}))}},bK="core/paragraph",yK={name:bK,examples:null,deprecated:null,save:()=>null},wK={...hK,...vK,...yK,category:"design",supports:{...hK.supports,html:!1,anchor:!1}};var kK=(0,_.createElement)(ko,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,_.createElement)(yo,{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM5 4.5h14c.3 0 .5.2.5.5v8.4l-3-2.9c-.3-.3-.8-.3-1 0L11.9 14 9 12c-.3-.2-.6-.2-.8 0l-3.6 2.6V5c-.1-.3.1-.5.4-.5zm14 15H5c-.3 0-.5-.2-.5-.5v-2.4l4.1-3 3 1.9c.3.2.7.2.9-.1L16 12l3.5 3.4V19c0 .3-.2.5-.5.5z"}));const EK={align:{type:"string"},url:{type:"string",source:"attribute",selector:"img",attribute:"src"},alt:{type:"string",source:"attribute",selector:"img",attribute:"alt",default:""},caption:{type:"string",source:"html",selector:"figcaption"},href:{type:"string",source:"attribute",selector:"figure > a",attribute:"href"},rel:{type:"string",source:"attribute",selector:"figure > a",attribute:"rel"},linkClass:{type:"string",source:"attribute",selector:"figure > a",attribute:"class"},id:{type:"number"},width:{type:"number"},height:{type:"number"},linkDestination:{type:"string"},linkTarget:{type:"string",source:"attribute",selector:"figure > a",attribute:"target"}};var _K=[{attributes:EK,save({attributes:e}){const{url:t,alt:n,caption:r,align:o,href:i,width:a,height:l,id:s}=e,c=Cr()({[`align${o}`]:o,"is-resized":a||l}),u=(0,_.createElement)("img",{src:t,alt:n,className:s?`wp-image-${s}`:null,width:a,height:l});return(0,_.createElement)("figure",{className:c},i?(0,_.createElement)("a",{href:i},u):u,!DM.isEmpty(r)&&(0,_.createElement)(DM.Content,{tagName:"figcaption",value:r}))}},{attributes:EK,save({attributes:e}){const{url:t,alt:n,caption:r,align:o,href:i,width:a,height:l,id:s}=e,c=(0,_.createElement)("img",{src:t,alt:n,className:s?`wp-image-${s}`:null,width:a,height:l});return(0,_.createElement)("figure",{className:o?`align${o}`:null},i?(0,_.createElement)("a",{href:i},c):c,!DM.isEmpty(r)&&(0,_.createElement)(DM.Content,{tagName:"figcaption",value:r}))}},{attributes:EK,save({attributes:e}){const{url:t,alt:n,caption:r,align:o,href:i,width:a,height:l}=e,s=a||l?{width:a,height:l}:{},c=(0,_.createElement)("img",(0,nr.Z)({src:t,alt:n},s));let u={};return a?u={width:a}:"left"!==o&&"right"!==o||(u={maxWidth:"50%"}),(0,_.createElement)("figure",{className:o?`align${o}`:null,style:u},i?(0,_.createElement)("a",{href:i},c):c,!DM.isEmpty(r)&&(0,_.createElement)(DM.Content,{tagName:"figcaption",value:r}))}}],CK=Ea((e=>{function t(t,r){const[o,i]=(0,_.useState)([]),a=(0,_.useMemo)((()=>{const e=e=>{const t=e.id?e:{...e,id:Qu()};i((e=>[...e,t]))};return{createNotice:e,createErrorNotice:t=>{e({status:"error",content:t})},removeNotice:e=>{i((t=>t.filter((t=>t.id!==e))))},removeAllNotices:()=>{i([])}}}),[]),l={...t,noticeList:o,noticeOperations:a,noticeUI:o.length>0&&(0,_.createElement)(qz,{className:"components-with-notices-ui",notices:o,onRemove:a.removeNotice})};return n?(0,_.createElement)(e,(0,nr.Z)({},l,{ref:r})):(0,_.createElement)(e,l)}let n;const{render:r}=e;return"function"==typeof r?(n=!0,(0,_.forwardRef)(t)):t})),xK=function(){var e=function(t,n){return(e=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])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),SK=function(){return(SK=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},IK={top:{width:"100%",height:"10px",top:"-5px",left:"0px",cursor:"row-resize"},right:{width:"10px",height:"100%",top:"0px",right:"-5px",cursor:"col-resize"},bottom:{width:"100%",height:"10px",bottom:"-5px",left:"0px",cursor:"row-resize"},left:{width:"10px",height:"100%",top:"0px",left:"-5px",cursor:"col-resize"},topRight:{width:"20px",height:"20px",position:"absolute",right:"-10px",top:"-10px",cursor:"ne-resize"},bottomRight:{width:"20px",height:"20px",position:"absolute",right:"-10px",bottom:"-10px",cursor:"se-resize"},bottomLeft:{width:"20px",height:"20px",position:"absolute",left:"-10px",bottom:"-10px",cursor:"sw-resize"},topLeft:{width:"20px",height:"20px",position:"absolute",left:"-10px",top:"-10px",cursor:"nw-resize"}},TK=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.onMouseDown=function(e){t.props.onResizeStart(e,t.props.direction)},t.onTouchStart=function(e){t.props.onResizeStart(e,t.props.direction)},t}return xK(t,e),t.prototype.render=function(){return _.createElement("div",{className:this.props.className||"",style:SK(SK({position:"absolute",userSelect:"none"},IK[this.props.direction]),this.props.replaceStyles||{}),onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart},this.props.children)},t}(_.PureComponent),NK=n(53316),AK=n.n(NK),RK=function(){var e=function(t,n){return(e=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])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),LK=function(){return(LK=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},PK={width:"auto",height:"auto"},OK=AK()((function(e,t,n){return Math.max(Math.min(e,n),t)})),DK=AK()((function(e,t){return Math.round(e/t)*t})),MK=AK()((function(e,t){return new RegExp(e,"i").test(t)})),BK=function(e){return Boolean(e.touches&&e.touches.length)},FK=AK()((function(e,t,n){void 0===n&&(n=0);var r=t.reduce((function(n,r,o){return Math.abs(r-e)<Math.abs(t[n]-e)?o:n}),0),o=Math.abs(t[r]-e);return 0===n||o<n?t[r]:e})),zK=AK()((function(e,t){return e.substr(e.length-t.length,t.length)===t})),HK=AK()((function(e){return"auto"===(e=e.toString())||zK(e,"px")||zK(e,"%")||zK(e,"vh")||zK(e,"vw")||zK(e,"vmax")||zK(e,"vmin")?e:e+"px"})),VK=function(e,t,n,r){if(e&&"string"==typeof e){if(zK(e,"px"))return Number(e.replace("px",""));if(zK(e,"%"))return t*(Number(e.replace("%",""))/100);if(zK(e,"vw"))return n*(Number(e.replace("vw",""))/100);if(zK(e,"vh"))return r*(Number(e.replace("vh",""))/100)}return e},WK=AK()((function(e,t,n,r,o,i,a){return r=VK(r,e.width,t,n),o=VK(o,e.height,t,n),i=VK(i,e.width,t,n),a=VK(a,e.height,t,n),{maxWidth:void 0===r?void 0:Number(r),maxHeight:void 0===o?void 0:Number(o),minWidth:void 0===i?void 0:Number(i),minHeight:void 0===a?void 0:Number(a)}})),ZK=["as","style","className","grid","snap","bounds","boundsByDirection","size","defaultSize","minWidth","minHeight","maxWidth","maxHeight","lockAspectRatio","lockAspectRatioExtraWidth","lockAspectRatioExtraHeight","enable","handleStyles","handleClasses","handleWrapperStyle","handleWrapperClass","children","onResizeStart","onResize","onResizeStop","handleComponent","scale","resizeRatio","snapGap"],jK="__resizable_base__",UK=function(e){function t(t){var n=e.call(this,t)||this;return n.ratio=1,n.resizable=null,n.parentLeft=0,n.parentTop=0,n.resizableLeft=0,n.resizableRight=0,n.resizableTop=0,n.resizableBottom=0,n.targetLeft=0,n.targetTop=0,n.appendBase=function(){if(!n.resizable||!n.window)return null;var e=n.parentNode;if(!e)return null;var t=n.window.document.createElement("div");return t.style.width="100%",t.style.height="100%",t.style.position="absolute",t.style.transform="scale(0, 0)",t.style.left="0",t.style.flex="0",t.classList?t.classList.add(jK):t.className+=jK,e.appendChild(t),t},n.removeBase=function(e){var t=n.parentNode;t&&t.removeChild(e)},n.ref=function(e){e&&(n.resizable=e)},n.state={isResizing:!1,width:void 0===(n.propsSize&&n.propsSize.width)?"auto":n.propsSize&&n.propsSize.width,height:void 0===(n.propsSize&&n.propsSize.height)?"auto":n.propsSize&&n.propsSize.height,direction:"right",original:{x:0,y:0,width:0,height:0},backgroundStyle:{height:"100%",width:"100%",backgroundColor:"rgba(0,0,0,0)",cursor:"auto",opacity:0,position:"fixed",zIndex:9999,top:"0",left:"0",bottom:"0",right:"0"},flexBasis:void 0},n.onResizeStart=n.onResizeStart.bind(n),n.onMouseMove=n.onMouseMove.bind(n),n.onMouseUp=n.onMouseUp.bind(n),n}return RK(t,e),Object.defineProperty(t.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"window",{get:function(){return this.resizable&&this.resizable.ownerDocument?this.resizable.ownerDocument.defaultView:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||PK},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){var e=0,t=0;if(this.resizable&&this.window){var n=this.resizable.offsetWidth,r=this.resizable.offsetHeight,o=this.resizable.style.position;"relative"!==o&&(this.resizable.style.position="relative"),e="auto"!==this.resizable.style.width?this.resizable.offsetWidth:n,t="auto"!==this.resizable.style.height?this.resizable.offsetHeight:r,this.resizable.style.position=o}return{width:e,height:t}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sizeStyle",{get:function(){var e=this,t=this.props.size,n=function(t){if(void 0===e.state[t]||"auto"===e.state[t])return"auto";if(e.propsSize&&e.propsSize[t]&&zK(e.propsSize[t].toString(),"%")){if(zK(e.state[t].toString(),"%"))return e.state[t].toString();var n=e.getParentSize();return Number(e.state[t].toString().replace("px",""))/n[t]*100+"%"}return HK(e.state[t])};return{width:t&&void 0!==t.width&&!this.state.isResizing?HK(t.width):n("width"),height:t&&void 0!==t.height&&!this.state.isResizing?HK(t.height):n("height")}},enumerable:!1,configurable:!0}),t.prototype.getParentSize=function(){if(!this.parentNode)return this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0};var e=this.appendBase();if(!e)return{width:0,height:0};var t=!1,n=this.parentNode.style.flexWrap;"wrap"!==n&&(t=!0,this.parentNode.style.flexWrap="wrap"),e.style.position="relative",e.style.minWidth="100%";var r={width:e.offsetWidth,height:e.offsetHeight};return t&&(this.parentNode.style.flexWrap=n),this.removeBase(e),r},t.prototype.bindEvents=function(){this.window&&(this.window.addEventListener("mouseup",this.onMouseUp),this.window.addEventListener("mousemove",this.onMouseMove),this.window.addEventListener("mouseleave",this.onMouseUp),this.window.addEventListener("touchmove",this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener("touchend",this.onMouseUp))},t.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener("mouseup",this.onMouseUp),this.window.removeEventListener("mousemove",this.onMouseMove),this.window.removeEventListener("mouseleave",this.onMouseUp),this.window.removeEventListener("touchmove",this.onMouseMove,!0),this.window.removeEventListener("touchend",this.onMouseUp))},t.prototype.componentDidMount=function(){if(this.resizable&&this.window){var e=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:"auto"!==e.flexBasis?e.flexBasis:void 0})}},t.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},t.prototype.createSizeForCssProperty=function(e,t){var n=this.propsSize&&this.propsSize[t];return"auto"!==this.state[t]||this.state.original[t]!==e||void 0!==n&&"auto"!==n?e:"auto"},t.prototype.calculateNewMaxFromBoundary=function(e,t){var n,r,o=this.props.boundsByDirection,i=this.state.direction,a=o&&MK("left",i),l=o&&MK("top",i);if("parent"===this.props.bounds){var s=this.parentNode;s&&(n=a?this.resizableRight-this.parentLeft:s.offsetWidth+(this.parentLeft-this.resizableLeft),r=l?this.resizableBottom-this.parentTop:s.offsetHeight+(this.parentTop-this.resizableTop))}else"window"===this.props.bounds?this.window&&(n=a?this.resizableRight:this.window.innerWidth-this.resizableLeft,r=l?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(n=a?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),r=l?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return n&&Number.isFinite(n)&&(e=e&&e<n?e:n),r&&Number.isFinite(r)&&(t=t&&t<r?t:r),{maxWidth:e,maxHeight:t}},t.prototype.calculateNewSizeFromDirection=function(e,t){var n=this.props.scale||1,r=this.props.resizeRatio||1,o=this.state,i=o.direction,a=o.original,l=this.props,s=l.lockAspectRatio,c=l.lockAspectRatioExtraHeight,u=l.lockAspectRatioExtraWidth,d=a.width,p=a.height,m=c||0,f=u||0;return MK("right",i)&&(d=a.width+(e-a.x)*r/n,s&&(p=(d-f)/this.ratio+m)),MK("left",i)&&(d=a.width-(e-a.x)*r/n,s&&(p=(d-f)/this.ratio+m)),MK("bottom",i)&&(p=a.height+(t-a.y)*r/n,s&&(d=(p-m)*this.ratio+f)),MK("top",i)&&(p=a.height-(t-a.y)*r/n,s&&(d=(p-m)*this.ratio+f)),{newWidth:d,newHeight:p}},t.prototype.calculateNewSizeFromAspectRatio=function(e,t,n,r){var o=this.props,i=o.lockAspectRatio,a=o.lockAspectRatioExtraHeight,l=o.lockAspectRatioExtraWidth,s=void 0===r.width?10:r.width,c=void 0===n.width||n.width<0?e:n.width,u=void 0===r.height?10:r.height,d=void 0===n.height||n.height<0?t:n.height,p=a||0,m=l||0;if(i){var f=(u-p)*this.ratio+m,h=(d-p)*this.ratio+m,g=(s-m)/this.ratio+p,v=(c-m)/this.ratio+p,b=Math.max(s,f),y=Math.min(c,h),w=Math.max(u,g),k=Math.min(d,v);e=OK(e,b,y),t=OK(t,w,k)}else e=OK(e,s,c),t=OK(t,u,d);return{newWidth:e,newHeight:t}},t.prototype.setBoundingClientRect=function(){if("parent"===this.props.bounds){var e=this.parentNode;if(e){var t=e.getBoundingClientRect();this.parentLeft=t.left,this.parentTop=t.top}}if(this.props.bounds&&"string"!=typeof this.props.bounds){var n=this.props.bounds.getBoundingClientRect();this.targetLeft=n.left,this.targetTop=n.top}if(this.resizable){var r=this.resizable.getBoundingClientRect(),o=r.left,i=r.top,a=r.right,l=r.bottom;this.resizableLeft=o,this.resizableRight=a,this.resizableTop=i,this.resizableBottom=l}},t.prototype.onResizeStart=function(e,t){if(this.resizable&&this.window){var n,r=0,o=0;if(e.nativeEvent&&function(e){return Boolean((e.clientX||0===e.clientX)&&(e.clientY||0===e.clientY))}(e.nativeEvent)){if(r=e.nativeEvent.clientX,o=e.nativeEvent.clientY,3===e.nativeEvent.which)return}else e.nativeEvent&&BK(e.nativeEvent)&&(r=e.nativeEvent.touches[0].clientX,o=e.nativeEvent.touches[0].clientY);if(this.props.onResizeStart&&this.resizable&&!1===this.props.onResizeStart(e,t,this.resizable))return;this.props.size&&(void 0!==this.props.size.height&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),void 0!==this.props.size.width&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width})),this.ratio="number"==typeof this.props.lockAspectRatio?this.props.lockAspectRatio:this.size.width/this.size.height;var i=this.window.getComputedStyle(this.resizable);if("auto"!==i.flexBasis){var a=this.parentNode;if(a){var l=this.window.getComputedStyle(a).flexDirection;this.flexDir=l.startsWith("row")?"row":"column",n=i.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var s={original:{x:r,y:o,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:LK(LK({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(e.target).cursor||"auto"}),direction:t,flexBasis:n};this.setState(s)}},t.prototype.onMouseMove=function(e){if(this.state.isResizing&&this.resizable&&this.window){if(this.window.TouchEvent&&BK(e))try{e.preventDefault(),e.stopPropagation()}catch(e){}var t=this.props,n=t.maxWidth,r=t.maxHeight,o=t.minWidth,i=t.minHeight,a=BK(e)?e.touches[0].clientX:e.clientX,l=BK(e)?e.touches[0].clientY:e.clientY,s=this.state,c=s.direction,u=s.original,d=s.width,p=s.height,m=this.getParentSize(),f=WK(m,this.window.innerWidth,this.window.innerHeight,n,r,o,i);n=f.maxWidth,r=f.maxHeight,o=f.minWidth,i=f.minHeight;var h=this.calculateNewSizeFromDirection(a,l),g=h.newHeight,v=h.newWidth,b=this.calculateNewMaxFromBoundary(n,r),y=this.calculateNewSizeFromAspectRatio(v,g,{width:b.maxWidth,height:b.maxHeight},{width:o,height:i});if(v=y.newWidth,g=y.newHeight,this.props.grid){var w=DK(v,this.props.grid[0]),k=DK(g,this.props.grid[1]),E=this.props.snapGap||0;v=0===E||Math.abs(w-v)<=E?w:v,g=0===E||Math.abs(k-g)<=E?k:g}this.props.snap&&this.props.snap.x&&(v=FK(v,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(g=FK(g,this.props.snap.y,this.props.snapGap));var _={width:v-u.width,height:g-u.height};d&&"string"==typeof d&&(zK(d,"%")?v=v/m.width*100+"%":zK(d,"vw")?v=v/this.window.innerWidth*100+"vw":zK(d,"vh")&&(v=v/this.window.innerHeight*100+"vh")),p&&"string"==typeof p&&(zK(p,"%")?g=g/m.height*100+"%":zK(p,"vw")?g=g/this.window.innerWidth*100+"vw":zK(p,"vh")&&(g=g/this.window.innerHeight*100+"vh"));var C={width:this.createSizeForCssProperty(v,"width"),height:this.createSizeForCssProperty(g,"height")};"row"===this.flexDir?C.flexBasis=C.width:"column"===this.flexDir&&(C.flexBasis=C.height),this.setState(C),this.props.onResize&&this.props.onResize(e,c,this.resizable,_)}},t.prototype.onMouseUp=function(e){var t=this.state,n=t.isResizing,r=t.direction,o=t.original;if(n&&this.resizable){var i={width:this.size.width-o.width,height:this.size.height-o.height};this.props.onResizeStop&&this.props.onResizeStop(e,r,this.resizable,i),this.props.size&&this.setState(this.props.size),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:LK(LK({},this.state.backgroundStyle),{cursor:"auto"})})}},t.prototype.updateSize=function(e){this.setState({width:e.width,height:e.height})},t.prototype.renderResizer=function(){var e=this,t=this.props,n=t.enable,r=t.handleStyles,o=t.handleClasses,i=t.handleWrapperStyle,a=t.handleWrapperClass,l=t.handleComponent;if(!n)return null;var s=Object.keys(n).map((function(t){return!1!==n[t]?_.createElement(TK,{key:t,direction:t,onResizeStart:e.onResizeStart,replaceStyles:r&&r[t],className:o&&o[t]},l&&l[t]?l[t]:null):null}));return _.createElement("div",{className:a,style:i},s)},t.prototype.render=function(){var e=this,t=Object.keys(this.props).reduce((function(t,n){return-1!==ZK.indexOf(n)||(t[n]=e.props[n]),t}),{}),n=LK(LK(LK({position:"relative",userSelect:this.state.isResizing?"none":"auto"},this.props.style),this.sizeStyle),{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:"border-box",flexShrink:0});this.state.flexBasis&&(n.flexBasis=this.state.flexBasis);var r=this.props.as||"div";return _.createElement(r,LK({ref:this.ref,style:n,className:this.props.className},t),this.state.isResizing&&_.createElement("div",{style:this.state.backgroundStyle}),this.props.children,this.renderResizer())},t.defaultProps={as:"div",onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},t}(_.PureComponent);const{clearTimeout:$K,setTimeout:qK}="undefined"!=typeof window?window:{},GK="bottom",KK="corner";const YK=Zi("div",{target:"ekdag503"})({name:"1cd7zoc",styles:"bottom:0;box-sizing:border-box;left:0;pointer-events:none;position:absolute;right:0;top:0"}),XK=Zi("div",{target:"ekdag502"})({name:"ajymcs",styles:"align-items:center;box-sizing:border-box;display:inline-flex;justify-content:center;opacity:0;pointer-events:none;transition:opacity 120ms linear"}),JK=Zi("div",{target:"ekdag501"})("background:",Nb.ui.border,";border-radius:2px;box-sizing:border-box;font-size:12px;color:",Nb.ui.textDark,";padding:4px 8px;position:relative;"),QK=Zi(py,{target:"ekdag500"})({name:"1kboj1g",styles:"&&&{color:white;display:block;font-size:13px;line-height:1.4;}"});var eY=(0,_.forwardRef)((function({label:e,position:t="corner",zIndex:n=1e3,...r},o){const i=!!e,a=t===KK;if(!i)return null;let l={opacity:i?1:null,zIndex:n},s={};return t===GK&&(l={...l,position:"absolute",bottom:-10,left:"50%",transform:"translate(-50%, 0)"},s={transform:"translate(0, 100%)"}),a&&(l={...l,position:"absolute",top:4,right:G()?null:4,left:G()?4:null}),(0,_.createElement)(XK,(0,nr.Z)({"aria-hidden":"true",className:"components-resizable-tooltip__tooltip-wrapper",isActive:i,ref:o,style:l},r),(0,_.createElement)(JK,{className:"components-resizable-tooltip__tooltip",style:s},(0,_.createElement)(QK,{as:"span"},e)))})),tY=(0,_.forwardRef)((function({axis:e,className:t,fadeTimeout:n=180,isVisible:r=!0,labelRef:o,onResize:i=Ce.noop,position:a="bottom",showPx:l=!0,zIndex:s=1e3,...c},u){const{label:d,resizeListener:p}=function({axis:e,fadeTimeout:t=180,onResize:n=Ce.noop,position:r="bottom",showPx:o=!1}){const[i,a]=Or()(),l=!!e,[s,c]=(0,_.useState)(!1),[u,d]=(0,_.useState)(!1),{width:p,height:m}=a,f=(0,_.useRef)(m),h=(0,_.useRef)(p),g=(0,_.useRef)(),v=()=>{l||(c(!1),d(!1))};return(0,_.useEffect)((()=>{if(null===p&&null===m)return;const e=p!==h.current,r=m!==f.current;if(e||r){if(p&&!h.current&&m&&!f.current)return h.current=p,void(f.current=m);e&&(c(!0),h.current=p),r&&(d(!0),f.current=m),n({width:p,height:m}),g.current&&$K(g.current),g.current=qK(v,t)}}),[p,m]),{label:function({axis:e,height:t,moveX:n=!1,moveY:r=!1,position:o="bottom",showPx:i=!1,width:a}){if(!n&&!r)return null;if(o===KK)return`${a} x ${t}`;const l=i?" px":"";if(e){if("x"===e&&n)return`${a}${l}`;if("y"===e&&r)return`${t}${l}`}return n&&r?`${a} x ${t}`:n?`${a}${l}`:r?`${t}${l}`:null}({axis:e,height:m,moveX:s,moveY:u,position:r,showPx:o,width:p}),resizeListener:i}}({axis:e,fadeTimeout:n,onResize:i,showPx:l,position:a});if(!r)return null;const m=Cr()("components-resize-tooltip",t);return(0,_.createElement)(YK,(0,nr.Z)({"aria-hidden":"true",className:m,ref:u},c),p,(0,_.createElement)(eY,{"aria-hidden":c["aria-hidden"],fadeTimeout:n,isVisible:r,label:d,position:a,ref:o,zIndex:s}))})),nY=(0,_.forwardRef)((function({className:e,children:t,showHandle:n=!0,__experimentalShowTooltip:r=!1,__experimentalTooltipProps:o={},...i},a){const l={width:null,height:null,top:null,right:null,bottom:null,left:null},s="components-resizable-box__handle",c="components-resizable-box__side-handle",u="components-resizable-box__corner-handle";return(0,_.createElement)(UK,(0,nr.Z)({className:Cr()("components-resizable-box__container",n&&"has-show-handle",e),handleClasses:{top:Cr()(s,c,"components-resizable-box__handle-top"),right:Cr()(s,c,"components-resizable-box__handle-right"),bottom:Cr()(s,c,"components-resizable-box__handle-bottom"),left:Cr()(s,c,"components-resizable-box__handle-left"),topLeft:Cr()(s,u,"components-resizable-box__handle-top","components-resizable-box__handle-left"),topRight:Cr()(s,u,"components-resizable-box__handle-top","components-resizable-box__handle-right"),bottomRight:Cr()(s,u,"components-resizable-box__handle-bottom","components-resizable-box__handle-right"),bottomLeft:Cr()(s,u,"components-resizable-box__handle-bottom","components-resizable-box__handle-left")},handleStyles:{top:l,right:l,bottom:l,left:l,topLeft:l,topRight:l,bottomRight:l,bottomLeft:l},ref:a},i),t,r&&(0,_.createElement)(tY,o))}));function rY(e){const t=/^[^\/\s:]+:(?:\/\/)?[^\/\s#?]+[\/]([^\s#?]+)[#?]{0,1}\S*$/.exec(e);if(t)return t[1]}var oY=(0,_.createElement)(ko,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,_.createElement)(yo,{d:"M16.5 7.8v7H18v-7c0-1-.8-1.8-1.8-1.8h-7v1.5h7c.2 0 .3.1.3.3zm-8.7 8.7c-.1 0-.2-.1-.2-.2V2H6v4H2v1.5h4v8.8c0 1 .8 1.8 1.8 1.8h8.8v4H18v-4h4v-1.5H7.8z"})),iY=(0,_.createElement)(ko,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,_.createElement)(yo,{d:"M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12-9.8c.4 0 .8-.3.9-.7l1.1-3h3.6l.5 1.7h1.9L13 9h-2.2l-3.4 9.5H6c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h12c.3 0 .5.2.5.5v12H20V6c0-1.1-.9-2-2-2zm-6 7l1.4 3.9h-2.7L12 11z"}));const aY=[{ratio:"2.33",className:"wp-embed-aspect-21-9"},{ratio:"2.00",className:"wp-embed-aspect-18-9"},{ratio:"1.78",className:"wp-embed-aspect-16-9"},{ratio:"1.33",className:"wp-embed-aspect-4-3"},{ratio:"1.00",className:"wp-embed-aspect-1-1"},{ratio:"0.56",className:"wp-embed-aspect-9-16"},{ratio:"0.50",className:"wp-embed-aspect-1-2"}],lY="wp-embed";var sY=n(51991),cY=n.n(sY);const{name:uY}={apiVersion:2,name:"core/embed",title:"Embed",category:"embed",description:"Add a block that displays content pulled from other sites, like Twitter or YouTube.",textdomain:"default",attributes:{url:{type:"string"},caption:{type:"string",source:"html",selector:"figcaption"},type:{type:"string"},providerNameSlug:{type:"string"},allowResponsive:{type:"boolean",default:!0},responsive:{type:"boolean",default:!1},previewable:{type:"boolean",default:!0}},supports:{align:!0},editorStyle:"wp-block-embed-editor",style:"wp-block-embed"},dY=e=>e&&e.includes('class="wp-embedded-content"'),pY=e=>{if(!e)return e;const t=aY.reduce(((e,{className:t})=>(e[t]=!1,e)),{"wp-has-aspect-ratio":!1});return cY()(e,t)};T()(((e,t,n,r,o=!0)=>{if(!e)return{};const i={};let{type:a="rich"}=e;const{html:l,provider_name:s}=e,c=(0,Ce.kebabCase)((s||t).toLowerCase());return dY(l)&&(a=lY),(l||"photo"===a)&&(i.type=a,i.providerNameSlug=c),i.className=function(e,t,n=!0){if(!n)return pY(t);const r=document.implementation.createHTMLDocument("");r.body.innerHTML=e;const o=r.body.querySelector("iframe");if(o&&o.height&&o.width){const e=(o.width/o.height).toFixed(2);for(let n=0;n<aY.length;n++){const r=aY[n];if(e>=r.ratio)return e-r.ratio>.1?pY(t):cY()(pY(t),r.className,"wp-has-aspect-ratio")}}return t}(l,n,r&&o),i}));var mY=function(e,t){return(mY=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},fY=function(){return(fY=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};Object.create,Object.create;var hY=n(52796),gY=n.n(hY);function vY(e,t,n,r,o,i){void 0===i&&(i=0);var a=TY(e,t,i),l=a.width,s=a.height,c=Math.min(l,n),u=Math.min(s,r);return c>u*o?{width:u*o,height:u}:{width:c,height:c/o}}function bY(e,t,n,r,o){void 0===o&&(o=0);var i=TY(t.width,t.height,o),a=i.width,l=i.height;return{x:yY(e.x,a,n.width,r),y:yY(e.y,l,n.height,r)}}function yY(e,t,n,r){var o=t*r/2-n/2;return Math.min(o,Math.max(e,-o))}function wY(e,t){return Math.sqrt(Math.pow(e.y-t.y,2)+Math.pow(e.x-t.x,2))}function kY(e,t){return 180*Math.atan2(t.y-e.y,t.x-e.x)/Math.PI}function EY(e,t,n,r,o,i,a){void 0===i&&(i=0),void 0===a&&(a=!0);var l=a&&0===i?_Y:CY,s={x:l(100,((t.width-n.width/o)/2-e.x/o)/t.width*100),y:l(100,((t.height-n.height/o)/2-e.y/o)/t.height*100),width:l(100,n.width/t.width*100/o),height:l(100,n.height/t.height*100/o)},c=Math.round(l(t.naturalWidth,s.width*t.naturalWidth/100)),u=Math.round(l(t.naturalHeight,s.height*t.naturalHeight/100)),d=t.naturalWidth>=t.naturalHeight*r?{width:Math.round(u*r),height:u}:{width:c,height:Math.round(c/r)};return{croppedAreaPercentages:s,croppedAreaPixels:fY(fY({},d),{x:Math.round(l(t.naturalWidth-d.width,s.x*t.naturalWidth/100)),y:Math.round(l(t.naturalHeight-d.height,s.y*t.naturalHeight/100))})}}function _Y(e,t){return Math.min(e,Math.max(0,t))}function CY(e,t){return t}function xY(e,t,n){var r=t.width/t.naturalWidth,o=function(e,t,n){var r=t.width/t.naturalWidth;if(n)return n.height>n.width?n.height/r/e.height:n.width/r/e.width;var o=e.width/e.height;return t.naturalWidth>=t.naturalHeight*o?t.naturalHeight/e.height:t.naturalWidth/e.width}(e,t,n),i=r*o;return{crop:{x:((t.naturalWidth-e.width)/2-e.x)*i,y:((t.naturalHeight-e.height)/2-e.y)*i},zoom:o}}function SY(e,t){return{x:(t.x+e.x)/2,y:(t.y+e.y)/2}}function IY(e,t,n,r,o){var i=Math.cos,a=Math.sin,l=o*Math.PI/180;return[(e-n)*i(l)-(t-r)*a(l)+n,(e-n)*a(l)+(t-r)*i(l)+r]}function TY(e,t,n){var r=e/2,o=t/2,i=[IY(0,0,r,o,n),IY(e,0,r,o,n),IY(e,t,r,o,n),IY(0,t,r,o,n)],a=Math.min.apply(Math,i.map((function(e){return e[0]}))),l=Math.max.apply(Math,i.map((function(e){return e[0]}))),s=Math.min.apply(Math,i.map((function(e){return e[1]})));return{width:l-a,height:Math.max.apply(Math,i.map((function(e){return e[1]})))-s}}function NY(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.filter((function(e){return"string"==typeof e&&e.length>0})).join(" ").trim()}var AY=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.imageRef=null,n.videoRef=null,n.containerRef=null,n.styleRef=null,n.containerRect=null,n.mediaSize={width:0,height:0,naturalWidth:0,naturalHeight:0},n.dragStartPosition={x:0,y:0},n.dragStartCrop={x:0,y:0},n.lastPinchDistance=0,n.lastPinchRotation=0,n.rafDragTimeout=null,n.rafPinchTimeout=null,n.wheelTimer=null,n.state={cropSize:null,hasWheelJustStarted:!1},n.preventZoomSafari=function(e){return e.preventDefault()},n.cleanEvents=function(){document.removeEventListener("mousemove",n.onMouseMove),document.removeEventListener("mouseup",n.onDragStopped),document.removeEventListener("touchmove",n.onTouchMove),document.removeEventListener("touchend",n.onDragStopped)},n.clearScrollEvent=function(){n.containerRef&&n.containerRef.removeEventListener("wheel",n.onWheel),n.wheelTimer&&clearTimeout(n.wheelTimer)},n.onMediaLoad=function(){n.computeSizes(),n.emitCropData(),n.setInitialCrop(),n.props.onMediaLoaded&&n.props.onMediaLoaded(n.mediaSize)},n.setInitialCrop=function(){var e=n.props,t=e.initialCroppedAreaPixels,r=e.cropSize;if(t){var o=xY(t,n.mediaSize,r),i=o.crop,a=o.zoom;n.props.onCropChange(i),n.props.onZoomChange&&n.props.onZoomChange(a)}},n.computeSizes=function(){var e,t,r,o,i,a,l=n.imageRef||n.videoRef;if(l&&n.containerRef){n.containerRect=n.containerRef.getBoundingClientRect(),n.mediaSize={width:l.offsetWidth,height:l.offsetHeight,naturalWidth:(null===(e=n.imageRef)||void 0===e?void 0:e.naturalWidth)||(null===(t=n.videoRef)||void 0===t?void 0:t.videoWidth)||0,naturalHeight:(null===(r=n.imageRef)||void 0===r?void 0:r.naturalHeight)||(null===(o=n.videoRef)||void 0===o?void 0:o.videoHeight)||0};var s=n.props.cropSize?n.props.cropSize:vY(l.offsetWidth,l.offsetHeight,n.containerRect.width,n.containerRect.height,n.props.aspect,n.props.rotation);(null===(i=n.state.cropSize)||void 0===i?void 0:i.height)===s.height&&(null===(a=n.state.cropSize)||void 0===a?void 0:a.width)===s.width||n.props.onCropSizeChange&&n.props.onCropSizeChange(s),n.setState({cropSize:s},n.recomputeCropPosition)}},n.onMouseDown=function(e){e.preventDefault(),document.addEventListener("mousemove",n.onMouseMove),document.addEventListener("mouseup",n.onDragStopped),n.onDragStart(t.getMousePoint(e))},n.onMouseMove=function(e){return n.onDrag(t.getMousePoint(e))},n.onTouchStart=function(e){e.preventDefault(),document.addEventListener("touchmove",n.onTouchMove,{passive:!1}),document.addEventListener("touchend",n.onDragStopped),2===e.touches.length?n.onPinchStart(e):1===e.touches.length&&n.onDragStart(t.getTouchPoint(e.touches[0]))},n.onTouchMove=function(e){e.preventDefault(),2===e.touches.length?n.onPinchMove(e):1===e.touches.length&&n.onDrag(t.getTouchPoint(e.touches[0]))},n.onDragStart=function(e){var t,r,o=e.x,i=e.y;n.dragStartPosition={x:o,y:i},n.dragStartCrop=fY({},n.props.crop),null===(r=(t=n.props).onInteractionStart)||void 0===r||r.call(t)},n.onDrag=function(e){var t=e.x,r=e.y;n.rafDragTimeout&&window.cancelAnimationFrame(n.rafDragTimeout),n.rafDragTimeout=window.requestAnimationFrame((function(){if(n.state.cropSize&&void 0!==t&&void 0!==r){var e=t-n.dragStartPosition.x,o=r-n.dragStartPosition.y,i={x:n.dragStartCrop.x+e,y:n.dragStartCrop.y+o},a=n.props.restrictPosition?bY(i,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):i;n.props.onCropChange(a)}}))},n.onDragStopped=function(){var e,t;n.cleanEvents(),n.emitCropData(),null===(t=(e=n.props).onInteractionEnd)||void 0===t||t.call(e)},n.onWheel=function(e){e.preventDefault();var r=t.getMousePoint(e),o=gY()(e).pixelY,i=n.props.zoom-o*n.props.zoomSpeed/200;n.setNewZoom(i,r),n.state.hasWheelJustStarted||n.setState({hasWheelJustStarted:!0},(function(){var e,t;return null===(t=(e=n.props).onInteractionStart)||void 0===t?void 0:t.call(e)})),n.wheelTimer&&clearTimeout(n.wheelTimer),n.wheelTimer=window.setTimeout((function(){return n.setState({hasWheelJustStarted:!1},(function(){var e,t;return null===(t=(e=n.props).onInteractionEnd)||void 0===t?void 0:t.call(e)}))}),250)},n.getPointOnContainer=function(e){var t=e.x,r=e.y;if(!n.containerRect)throw new Error("The Cropper is not mounted");return{x:n.containerRect.width/2-(t-n.containerRect.left),y:n.containerRect.height/2-(r-n.containerRect.top)}},n.getPointOnMedia=function(e){var t=e.x,r=e.y,o=n.props,i=o.crop,a=o.zoom;return{x:(t+i.x)/a,y:(r+i.y)/a}},n.setNewZoom=function(e,t){if(n.state.cropSize&&n.props.onZoomChange){var r=n.getPointOnContainer(t),o=n.getPointOnMedia(r),i=Math.min(n.props.maxZoom,Math.max(e,n.props.minZoom)),a={x:o.x*i-r.x,y:o.y*i-r.y},l=n.props.restrictPosition?bY(a,n.mediaSize,n.state.cropSize,i,n.props.rotation):a;n.props.onCropChange(l),n.props.onZoomChange(i)}},n.getCropData=function(){return n.state.cropSize?EY(n.props.restrictPosition?bY(n.props.crop,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):n.props.crop,n.mediaSize,n.state.cropSize,n.getAspect(),n.props.zoom,n.props.rotation,n.props.restrictPosition):null},n.emitCropData=function(){var e=n.getCropData();if(e){var t=e.croppedAreaPercentages,r=e.croppedAreaPixels;n.props.onCropComplete&&n.props.onCropComplete(t,r),n.props.onCropAreaChange&&n.props.onCropAreaChange(t,r)}},n.emitCropAreaChange=function(){var e=n.getCropData();if(e){var t=e.croppedAreaPercentages,r=e.croppedAreaPixels;n.props.onCropAreaChange&&n.props.onCropAreaChange(t,r)}},n.recomputeCropPosition=function(){if(n.state.cropSize){var e=n.props.restrictPosition?bY(n.props.crop,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):n.props.crop;n.props.onCropChange(e),n.emitCropData()}},n}return function(e,t){function n(){this.constructor=e}mY(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t.prototype.componentDidMount=function(){window.addEventListener("resize",this.computeSizes),this.containerRef&&(this.props.zoomWithScroll&&this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}),this.containerRef.addEventListener("gesturestart",this.preventZoomSafari),this.containerRef.addEventListener("gesturechange",this.preventZoomSafari)),this.props.disableAutomaticStylesInjection||(this.styleRef=document.createElement("style"),this.styleRef.setAttribute("type","text/css"),this.styleRef.innerHTML=".reactEasyCrop_Container {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n overflow: hidden;\n user-select: none;\n touch-action: none;\n cursor: move;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.reactEasyCrop_Image,\n.reactEasyCrop_Video {\n will-change: transform; /* this improves performances and prevent painting issues on iOS Chrome */\n}\n\n.reactEasyCrop_Contain {\n max-width: 100%;\n max-height: 100%;\n margin: auto;\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n}\n.reactEasyCrop_Cover_Horizontal {\n width: 100%;\n height: auto;\n}\n.reactEasyCrop_Cover_Vertical {\n width: auto;\n height: 100%;\n}\n\n.reactEasyCrop_CropArea {\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n border: 1px solid rgba(255, 255, 255, 0.5);\n box-sizing: border-box;\n box-shadow: 0 0 0 9999em;\n color: rgba(0, 0, 0, 0.5);\n overflow: hidden;\n}\n\n.reactEasyCrop_CropAreaRound {\n border-radius: 50%;\n}\n\n.reactEasyCrop_CropAreaGrid::before {\n content: ' ';\n box-sizing: border-box;\n position: absolute;\n border: 1px solid rgba(255, 255, 255, 0.5);\n top: 0;\n bottom: 0;\n left: 33.33%;\n right: 33.33%;\n border-top: 0;\n border-bottom: 0;\n}\n\n.reactEasyCrop_CropAreaGrid::after {\n content: ' ';\n box-sizing: border-box;\n position: absolute;\n border: 1px solid rgba(255, 255, 255, 0.5);\n top: 33.33%;\n bottom: 33.33%;\n left: 0;\n right: 0;\n border-left: 0;\n border-right: 0;\n}\n",document.head.appendChild(this.styleRef)),this.imageRef&&this.imageRef.complete&&this.onMediaLoad()},t.prototype.componentWillUnmount=function(){var e;window.removeEventListener("resize",this.computeSizes),this.containerRef&&(this.containerRef.removeEventListener("gesturestart",this.preventZoomSafari),this.containerRef.removeEventListener("gesturechange",this.preventZoomSafari)),this.styleRef&&(null===(e=this.styleRef.parentNode)||void 0===e||e.removeChild(this.styleRef)),this.cleanEvents(),this.props.zoomWithScroll&&this.clearScrollEvent()},t.prototype.componentDidUpdate=function(e){var t,n,r,o,i,a,l,s,c;e.rotation!==this.props.rotation?(this.computeSizes(),this.recomputeCropPosition()):e.aspect!==this.props.aspect?this.computeSizes():e.zoom!==this.props.zoom?this.recomputeCropPosition():(null===(t=e.cropSize)||void 0===t?void 0:t.height)!==(null===(n=this.props.cropSize)||void 0===n?void 0:n.height)||(null===(r=e.cropSize)||void 0===r?void 0:r.width)!==(null===(o=this.props.cropSize)||void 0===o?void 0:o.width)?this.computeSizes():(null===(i=e.crop)||void 0===i?void 0:i.x)===(null===(a=this.props.crop)||void 0===a?void 0:a.x)&&(null===(l=e.crop)||void 0===l?void 0:l.y)===(null===(s=this.props.crop)||void 0===s?void 0:s.y)||this.emitCropAreaChange(),e.zoomWithScroll!==this.props.zoomWithScroll&&this.containerRef&&(this.props.zoomWithScroll?this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}):this.clearScrollEvent()),e.video!==this.props.video&&(null===(c=this.videoRef)||void 0===c||c.load())},t.prototype.getAspect=function(){var e=this.props,t=e.cropSize,n=e.aspect;return t?t.width/t.height:n},t.prototype.onPinchStart=function(e){var n=t.getTouchPoint(e.touches[0]),r=t.getTouchPoint(e.touches[1]);this.lastPinchDistance=wY(n,r),this.lastPinchRotation=kY(n,r),this.onDragStart(SY(n,r))},t.prototype.onPinchMove=function(e){var n=this,r=t.getTouchPoint(e.touches[0]),o=t.getTouchPoint(e.touches[1]),i=SY(r,o);this.onDrag(i),this.rafPinchTimeout&&window.cancelAnimationFrame(this.rafPinchTimeout),this.rafPinchTimeout=window.requestAnimationFrame((function(){var e=wY(r,o),t=n.props.zoom*(e/n.lastPinchDistance);n.setNewZoom(t,i),n.lastPinchDistance=e;var a=kY(r,o),l=n.props.rotation+(a-n.lastPinchRotation);n.props.onRotationChange&&n.props.onRotationChange(l),n.lastPinchRotation=a}))},t.prototype.render=function(){var e=this,t=this.props,n=t.image,r=t.video,o=t.mediaProps,i=t.transform,a=t.crop,l=a.x,s=a.y,c=t.rotation,u=t.zoom,d=t.cropShape,p=t.showGrid,m=t.style,f=m.containerStyle,h=m.cropAreaStyle,g=m.mediaStyle,v=t.classes,b=v.containerClassName,y=v.cropAreaClassName,w=v.mediaClassName,k=t.objectFit;return C().createElement("div",{onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,ref:function(t){return e.containerRef=t},"data-testid":"container",style:f,className:NY("reactEasyCrop_Container",b)},n?C().createElement("img",fY({alt:"",className:NY("reactEasyCrop_Image","contain"===k&&"reactEasyCrop_Contain","horizontal-cover"===k&&"reactEasyCrop_Cover_Horizontal","vertical-cover"===k&&"reactEasyCrop_Cover_Vertical",w)},o,{src:n,ref:function(t){return e.imageRef=t},style:fY(fY({},g),{transform:i||"translate("+l+"px, "+s+"px) rotate("+c+"deg) scale("+u+")"}),onLoad:this.onMediaLoad})):r&&C().createElement("video",fY({autoPlay:!0,loop:!0,muted:!0,className:NY("reactEasyCrop_Video","contain"===k&&"reactEasyCrop_Contain","horizontal-cover"===k&&"reactEasyCrop_Cover_Horizontal","vertical-cover"===k&&"reactEasyCrop_Cover_Vertical",w)},o,{ref:function(t){return e.videoRef=t},onLoadedMetadata:this.onMediaLoad,style:fY(fY({},g),{transform:i||"translate("+l+"px, "+s+"px) rotate("+c+"deg) scale("+u+")"}),controls:!1}),(Array.isArray(r)?r:[{src:r}]).map((function(e){return C().createElement("source",fY({key:e.src},e))}))),this.state.cropSize&&C().createElement("div",{style:fY(fY({},h),{width:this.state.cropSize.width,height:this.state.cropSize.height}),"data-testid":"cropper",className:NY("reactEasyCrop_CropArea","round"===d&&"reactEasyCrop_CropAreaRound",p&&"reactEasyCrop_CropAreaGrid",y)}))},t.defaultProps={zoom:1,rotation:0,aspect:4/3,maxZoom:3,minZoom:1,cropShape:"rect",objectFit:"contain",showGrid:!0,style:{},classes:{},mediaProps:{},zoomSpeed:1,restrictPosition:!0,zoomWithScroll:!0},t.getMousePoint=function(e){return{x:Number(e.clientX),y:Number(e.clientY)}},t.getTouchPoint=function(e){return{x:Number(e.clientX),y:Number(e.clientY)}},t}(C().Component);const RY={position:"bottom right",isAlternate:!0};const LY=(0,_.createContext)({}),PY=()=>(0,_.useContext)(LY);function OY({id:e,url:t,naturalWidth:n,naturalHeight:r,isEditing:o,onFinishEditing:i,onSaveImage:a,children:l}){const s=function(e,t){const n=function({url:e,naturalWidth:t,naturalHeight:n}){const[r,o]=(0,_.useState)(),[i,a]=(0,_.useState)(),[l,s]=(0,_.useState)({x:0,y:0}),[c,u]=(0,_.useState)(),[d,p]=(0,_.useState)(),[m,f]=(0,_.useState)(),[h,g]=(0,_.useState)(),v=(0,_.useCallback)((()=>{s({x:0,y:0}),u(100),p(0),f(t/n),g(t/n)}),[t,n,s,u,p,f,g]),b=(0,_.useCallback)((()=>{const r=(d+90)%360;let i=t/n;if(d%180==90&&(i=n/t),0===r)return o(),p(r),f(1/m),void s({x:-l.y*i,y:l.x*i});const a=new window.Image;a.src=e,a.onload=function(e){const t=document.createElement("canvas");let n=0,a=0;r%180?(t.width=e.target.height,t.height=e.target.width):(t.width=e.target.width,t.height=e.target.height),90!==r&&180!==r||(n=t.width),270!==r&&180!==r||(a=t.height);const c=t.getContext("2d");c.translate(n,a),c.rotate(r*Math.PI/180),c.drawImage(e.target,0,0),t.toBlob((e=>{o(URL.createObjectURL(e)),p(r),f(1/m),s({x:-l.y*i,y:l.x*i})}))};const c=(0,W.O)("media.crossOrigin",void 0,e);"string"==typeof c&&(a.crossOrigin=c)}),[d,t,n,o,p,f,s]);return(0,_.useMemo)((()=>({editedUrl:r,setEditedUrl:o,crop:i,setCrop:a,position:l,setPosition:s,zoom:c,setZoom:u,rotation:d,setRotation:p,rotateClockwise:b,aspect:m,setAspect:f,defaultAspect:h,initializeTransformValues:v})),[r,o,i,a,l,s,c,u,d,p,b,m,f,h,v])}(e),{initializeTransformValues:r}=n;return(0,_.useEffect)((()=>{t&&r()}),[t,r]),n}({url:t,naturalWidth:n,naturalHeight:r},o),c=function({crop:e,rotation:t,height:n,width:r,aspect:o,url:i,id:a,onSaveImage:l,onFinishEditing:s}){const{createErrorNotice:c}=(0,tr.Z)(SP),[u,d]=(0,_.useState)(!1),p=(0,_.useCallback)((()=>{d(!1),s()}),[d,s]),m=(0,_.useCallback)((()=>{d(!0);let u={};(e.width<99.9||e.height<99.9)&&(u=e),t>0&&(u.rotation=t),u.src=i,he({path:`/wp/v2/media/${a}/edit`,method:"POST",data:u}).then((e=>{l({id:e.id,url:e.source_url,height:n&&r?r/o:void 0})})).catch((e=>{c(L(U("Could not edit image. %s"),e.message),{id:"image-editing-error",type:"snackbar"})})).finally((()=>{d(!1),s()}))}),[d,e,t,n,r,o,i,l,c,d,s]);return(0,_.useMemo)((()=>({isInProgress:u,apply:m,cancel:p})),[u,m,p])}({id:e,url:t,onSaveImage:a,onFinishEditing:i,...s}),u=(0,_.useMemo)((()=>({...s,...c})),[s,c]);return(0,_.createElement)(LY.Provider,{value:u},l)}function DY({url:e,width:t,height:n,clientWidth:r,naturalHeight:o,naturalWidth:i}){const{isInProgress:a,editedUrl:l,position:s,zoom:c,aspect:u,setPosition:d,setCrop:p,setZoom:m,rotation:f}=PY();let h=n||r*o/i;return f%180==90&&(h=r*i/o),(0,_.createElement)("div",{className:Cr()("wp-block-image__crop-area",{"is-applying":a}),style:{width:t||r,height:h}},(0,_.createElement)(AY,{image:l||e,disabled:a,minZoom:1,maxZoom:3,crop:s,zoom:c/100,aspect:u,onCropChange:d,onCropComplete:e=>{p(e)},onZoomChange:e=>{m(100*e)}}),a&&(0,_.createElement)(ED,null))}function MY(){const{isInProgress:e,zoom:t,setZoom:n}=PY();return(0,_.createElement)(Cp,{contentClassName:"wp-block-image__zoom",popoverProps:RY,renderToggle:({isOpen:t,onToggle:n})=>(0,_.createElement)(kp,{icon:AN,label:U("Zoom"),onClick:n,"aria-expanded":t,disabled:e}),renderContent:()=>(0,_.createElement)(hC,{label:U("Zoom"),min:100,max:300,value:Math.round(t),onChange:n})})}var BY=(0,_.createElement)(ko,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,_.createElement)(yo,{d:"M18.5 5.5h-13c-1.1 0-2 .9-2 2v9c0 1.1.9 2 2 2h13c1.1 0 2-.9 2-2v-9c0-1.1-.9-2-2-2zm.5 11c0 .3-.2.5-.5.5h-13c-.3 0-.5-.2-.5-.5v-9c0-.3.2-.5.5-.5h13c.3 0 .5.2.5.5v9zM6.5 12H8v-2h2V8.5H6.5V12zm9.5 2h-2v1.5h3.5V12H16v2z"}));function FY({aspectRatios:e,isDisabled:t,label:n,onClick:r,value:o}){return(0,_.createElement)(oI,{label:n},e.map((({title:e,aspect:n})=>(0,_.createElement)(iI,{key:n,disabled:t,onClick:()=>{r(n)},role:"menuitemradio",isSelected:n===o,icon:n===o?BE:void 0},e))))}function zY({toggleProps:e}){const{isInProgress:t,aspect:n,setAspect:r,defaultAspect:o}=PY();return(0,_.createElement)(Rp,{icon:BY,label:U("Aspect Ratio"),popoverProps:RY,toggleProps:e,className:"wp-block-image__aspect-ratio"},(({onClose:e})=>(0,_.createElement)(_.Fragment,null,(0,_.createElement)(FY,{isDisabled:t,onClick:t=>{r(t),e()},value:n,aspectRatios:[{title:U("Original"),aspect:o},{title:U("Square"),aspect:1}]}),(0,_.createElement)(FY,{label:U("Landscape"),isDisabled:t,onClick:t=>{r(t),e()},value:n,aspectRatios:[{title:U("16:10"),aspect:1.6},{title:U("16:9"),aspect:16/9},{title:U("4:3"),aspect:4/3},{title:U("3:2"),aspect:1.5}]}),(0,_.createElement)(FY,{label:U("Portrait"),isDisabled:t,onClick:t=>{r(t),e()},value:n,aspectRatios:[{title:U("10:16"),aspect:.625},{title:U("9:16"),aspect:9/16},{title:U("3:4"),aspect:3/4},{title:U("2:3"),aspect:2/3}]}))))}var HY=(0,_.createElement)(ko,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,_.createElement)(yo,{d:"M15.1 4.8l-3-2.5V4c-4.4 0-8 3.6-8 8 0 3.7 2.5 6.9 6 7.7.3.1.6.1 1 .2l.2-1.5c-.4 0-.7-.1-1.1-.2l-.1.2v-.2c-2.6-.8-4.5-3.3-4.5-6.2 0-3.6 2.9-6.5 6.5-6.5v1.8l3-2.5zM20 11c-.2-1.4-.7-2.7-1.6-3.8l-1.2.8c.7.9 1.1 2 1.3 3.1L20 11zm-1.5 1.8c-.1.5-.2 1.1-.4 1.6s-.5 1-.8 1.5l1.2.9c.4-.5.8-1.1 1-1.8s.5-1.3.5-2l-1.5-.2zm-5.6 5.6l.2 1.5c1.4-.2 2.7-.7 3.8-1.6l-.9-1.1c-.9.7-2 1.1-3.1 1.2z"}));function VY(){const{isInProgress:e,rotateClockwise:t}=PY();return(0,_.createElement)(kp,{icon:HY,label:U("Rotate"),onClick:t,disabled:e})}function WY(){const{isInProgress:e,apply:t,cancel:n}=PY();return(0,_.createElement)(_.Fragment,null,(0,_.createElement)(kp,{onClick:t,disabled:e},U("Apply")),(0,_.createElement)(kp,{onClick:n},U("Cancel")))}function ZY({url:e,width:t,height:n,clientWidth:r,naturalHeight:o,naturalWidth:i}){return(0,_.createElement)(_.Fragment,null,(0,_.createElement)(DY,{url:e,width:t,height:n,clientWidth:r,naturalHeight:o,naturalWidth:i}),(0,_.createElement)(Ov,null,(0,_.createElement)(Pp,null,(0,_.createElement)(MY,null),(0,_.createElement)(bp,null,(e=>(0,_.createElement)(zY,{toggleProps:e}))),(0,_.createElement)(VY,null)),(0,_.createElement)(Pp,null,(0,_.createElement)(WY,null))))}const jY="none",UY="media",$Y="attachment",qY="custom",GY=["image"];function KY({temporaryURL:e,attributes:{url:t="",alt:n,caption:r,align:o,id:i,href:a,rel:l,linkClass:s,linkDestination:c,title:u,width:d,height:p,linkTarget:m,sizeSlug:f},setAttributes:h,isSelected:g,insertBlocksAfter:v,onReplace:b,onSelectImage:y,onSelectURL:w,onUploadError:k,containerRef:E,clientId:C}){const x=(0,_.useRef)(),S=mI(t),{getBlock:I}=(0,er.Z)(Iv),{image:T,multiImageSelection:N}=(0,er.Z)((e=>{const{getMedia:t}=e(Qn),{getMultiSelectedBlockClientIds:n,getBlockName:r}=e(Iv),o=n();return{image:i&&g?t(i):null,multiImageSelection:o.length&&o.every((e=>"core/image"===r(e)))}}),[i,g]),{canInsertCover:A,imageEditing:R,imageSizes:P,maxWidth:O,mediaUpload:D}=(0,er.Z)((e=>{const{getBlockRootClientId:t,getSettings:n,canInsertBlockType:r}=e(Iv),o=t(C);return{...(0,Ce.pick)(n(),["imageEditing","imageSizes","maxWidth","mediaUpload"]),canInsertCover:r("core/cover",o)}}),[C]),{replaceBlocks:M,toggleSelection:B}=(0,tr.Z)(Iv),{createErrorNotice:F,createSuccessNotice:z}=(0,tr.Z)(SP),H=Lr("medium"),V=(0,Ce.includes)(["wide","full"],o),[{naturalWidth:W,naturalHeight:Z},j]=(0,_.useState)({}),[$,q]=(0,_.useState)(!1),[K,Y]=(0,_.useState)(),X=function(e,t){const[n,r]=(0,_.useState)();function o(){r(e.current.clientWidth)}return(0,_.useEffect)(o,t),(0,_.useEffect)((()=>{const{defaultView:t}=e.current.ownerDocument;return t.addEventListener("resize",o),()=>{t.removeEventListener("resize",o)}}),[]),n}(E,[o]),J=!V&&H,Q=(0,Ce.map)((0,Ce.filter)(P,(({slug:e})=>(0,Ce.get)(T,["media_details","sizes",e,"source_url"]))),(({name:e,slug:t})=>({value:t,label:e})));(0,_.useEffect)((()=>{YY(i,t)&&g&&!K&&window.fetch(t).then((e=>e.blob())).then((e=>Y(e))).catch((()=>{}))}),[i,t,g,K]),(0,_.useEffect)((()=>{t&&!S&&g&&x.current.focus()}),[t,S]),(0,_.useEffect)((()=>{g||q(!1)}),[g]);const ee=i&&W&&Z&&R,te=!N&&ee&&!$,ne=(0,_.createElement)(_.Fragment,null,(0,_.createElement)(Ov,{group:"block"},(0,_.createElement)(Ik,{value:o,onChange:function(e){const t=["wide","full"].includes(e)?{width:void 0,height:void 0}:{};h({...t,align:e})}}),!N&&!$&&(0,_.createElement)(UM,{url:a||"",onChangeUrl:function(e){h(e)},linkDestination:c,mediaUrl:T&&T.source_url||t,mediaLink:T&&T.link,linkTarget:m,linkClass:s,rel:l}),te&&(0,_.createElement)(kp,{onClick:()=>q(!0),icon:oY,label:U("Crop")}),K&&(0,_.createElement)(kp,{onClick:function(){D({filesList:[K],onFileChange([e]){y(e),ya(e.url)||(Y(),z(U("Image uploaded."),{type:"snackbar"}))},allowedTypes:GY,onError(e){F(e,{type:"snackbar"})}})},icon:oM,label:U("Upload external image")}),!N&&A&&(0,_.createElement)(kp,{icon:iY,label:U("Add text over image"),onClick:function(){M(C,es(I(C),"core/cover"))}})),!N&&!$&&(0,_.createElement)(Ov,{group:"other"},(0,_.createElement)(lM,{mediaId:i,mediaURL:t,allowedTypes:GY,accept:"image/*",onSelect:y,onSelectURL:w,onError:k})),(0,_.createElement)(lE,null,(0,_.createElement)(Jk,{title:U("Image settings")},!N&&(0,_.createElement)(gF,{label:U("Alt text (alternative text)"),value:n,onChange:function(e){h({alt:e})},help:(0,_.createElement)(_.Fragment,null,(0,_.createElement)(jk,{href:"https://www.w3.org/WAI/tutorials/images/decision-tree"},U("Describe the purpose of the image")),U("Leave empty if the image is purely decorative."))}),(0,_.createElement)(CN,{onChangeImage:function(e){const t=(0,Ce.get)(T,["media_details","sizes",e,"source_url"]);if(!t)return null;h({url:t,width:void 0,height:void 0,sizeSlug:e})},onChange:e=>h(e),slug:f,width:d,height:p,imageSizeOptions:Q,isResizable:J,imageWidth:W,imageHeight:Z}))),(0,_.createElement)(rE,null,(0,_.createElement)(Vk,{label:U("Title attribute"),value:u||"",onChange:function(e){h({title:e})},help:(0,_.createElement)(_.Fragment,null,U("Describe the role of this image on the page."),(0,_.createElement)(jk,{href:"https://www.w3.org/TR/html52/dom.html#the-title-attribute"},U("(Note: many devices and browsers do not display this text.)")))}))),re=function(e){const t=rY(e);if(t)return(0,Ce.last)(t.split("/"))}(t);let oe;oe=n||(re?L(U("This image has an empty alt attribute; its file name is %s"),re):U("This image has an empty alt attribute"));let ie,ae,le=(0,_.createElement)(_.Fragment,null,(0,_.createElement)("img",{src:e||t,alt:oe,onError:()=>function(){const e=((e,t={})=>{var n;const{preview:r,attributes:o={}}=e,{url:i,providerNameSlug:a,type:l,...s}=o;if(!i||!zl(uY))return;const c=(e=>{var t;return null===(t=jl(uY))||void 0===t?void 0:t.find((({patterns:t})=>((e,t=[])=>t.some((t=>e.match(t))))(e,t)))})(i),u="wordpress"===a||l===lY;if(!u&&c&&(c.attributes.providerNameSlug!==a||!a))return Ul(uY,{url:i,...s,...c.attributes});const d=null===(n=jl(uY))||void 0===n?void 0:n.find((({name:e})=>"wordpress"===e));return d&&r&&dY(r.html)&&!u?Ul(uY,{url:i,...d.attributes,...t}):void 0})({attributes:{url:t}});void 0!==e&&b(e)}(),onLoad:e=>{j((0,Ce.pick)(e.target,["naturalWidth","naturalHeight"]))}}),e&&(0,_.createElement)(ED,null));if(X&&W&&Z){const e=W>X,t=Z/W;ie=e?X:W,ae=e?X*t:Z}if(ee&&$)le=(0,_.createElement)(ZY,{url:t,width:d,height:p,clientWidth:X,naturalHeight:Z,naturalWidth:W});else if(J&&ie){const e=d||ie,t=p||ae,n=W/Z,r=W<Z?20:20*n,i=Z<W?20:20/n,a=2.5*O;let l=!1,s=!1;"center"===o?(l=!0,s=!0):G()?"left"===o?l=!0:s=!0:"right"===o?s=!0:l=!0,le=(0,_.createElement)(nY,{size:{width:null!=d?d:"auto",height:null!=p?p:"auto"},showHandle:g,minWidth:r,maxWidth:a,minHeight:i,maxHeight:a/n,lockAspectRatio:!0,enable:{top:!1,right:l,bottom:!0,left:s},onResizeStart:function(){B(!1)},onResizeStop:(n,r,o,i)=>{B(!0),h({width:parseInt(e+i.width,10),height:parseInt(t+i.height,10)})}},le)}else le=(0,_.createElement)("div",{style:{width:d,height:p}},le);return(0,_.createElement)(OY,{id:i,url:t,naturalWidth:W,naturalHeight:Z,clientWidth:X,onSaveImage:e=>h(e),isEditing:$,onFinishEditing:()=>q(!1)},!e&&ne,le,(!DM.isEmpty(r)||g)&&(0,_.createElement)(DM,{ref:x,tagName:"figcaption","aria-label":U("Image caption text"),placeholder:U("Add caption"),value:r,onChange:e=>h({caption:e}),inlineToolbar:!0,__unstableOnSplitAtEnd:()=>v(Ul("core/paragraph"))}))}const YY=(e,t)=>t&&!e&&!ya(t);var XY=CK((function({attributes:e,setAttributes:t,isSelected:n,className:r,noticeUI:o,insertBlocksAfter:i,noticeOperations:a,onReplace:l,clientId:s}){const{url:c="",alt:u,caption:d,align:p,id:m,width:f,height:h,sizeSlug:g}=e,[v,b]=(0,_.useState)(),y=(0,_.useRef)();(0,_.useEffect)((()=>{y.current=u}),[u]);const w=(0,_.useRef)();(0,_.useEffect)((()=>{w.current=d}),[d]);const k=(0,_.useRef)(),{imageDefaultSize:E,mediaUpload:C}=(0,er.Z)((e=>{const{getSettings:t}=e(Iv);return(0,Ce.pick)(t(),["imageDefaultSize","mediaUpload"])}),[]);function x(e){a.removeAllNotices(),a.createErrorNotice(e)}function S(n){var r,o,i,a,l;if(!n||!n.url)return void t({url:void 0,alt:void 0,id:void 0,title:void 0,caption:void 0});if(ya(n.url))return void b(n.url);b();let s,u=((e,t)=>{const n=(0,Ce.pick)(e,["alt","id","link","caption"]);return n.url=(0,Ce.get)(e,["sizes",t,"url"])||(0,Ce.get)(e,["media_details","sizes",t,"source_url"])||e.url,n})(n,E);var d,p;w.current&&!(0,Ce.get)(u,["caption"])&&(u=(0,Ce.omit)(u,["caption"])),s=n.id&&n.id===m?{url:c}:{width:void 0,height:void 0,sizeSlug:(d=n,p=E,(0,Ce.has)(d,["sizes",p,"url"])||(0,Ce.has)(d,["media_details","sizes",p,"source_url"])?E:"full")};let f,h=e.linkDestination;if(!h)switch((null===(r=wp)||void 0===r||null===(o=r.media)||void 0===o||null===(i=o.view)||void 0===i||null===(a=i.settings)||void 0===a||null===(l=a.defaultProps)||void 0===l?void 0:l.link)||jY){case"file":case UY:h=UY;break;case"post":case $Y:h=$Y;break;case qY:h=qY;break;case jY:h=jY}switch(h){case UY:f=n.url;break;case $Y:f=n.link}u.href=f,t({...u,...s,linkDestination:h})}function I(e){e!==c&&t({url:e,id:void 0,width:void 0,height:void 0,sizeSlug:E})}const T=((e,t)=>!e&&ya(t))(m,c);(0,_.useEffect)((()=>{if(!T)return;const e=function(e){return ga[e]}(c);e&&C({filesList:[e],onFileChange:([e])=>{S(e)},allowedTypes:GY,onError:e=>{a.createErrorNotice(e),t({src:void 0,id:void 0,url:void 0})}})}),[]),(0,_.useEffect)((()=>{if(v)return()=>{ba(v)}}),[v]);const N=YY(m,c)?c:void 0,A=!!c&&(0,_.createElement)("img",{alt:U("Edit image"),title:U("Edit image"),className:"edit-image-preview",src:c}),R=hR({ref:k,className:Cr()(r,{"is-transient":v,"is-resized":!!f||!!h,[`size-${g}`]:g})});return(0,_.createElement)("figure",R,(v||c)&&(0,_.createElement)(KY,{temporaryURL:v,attributes:e,setAttributes:t,isSelected:n,insertBlocksAfter:i,onReplace:l,onSelectImage:S,onSelectURL:I,onUploadError:x,containerRef:k,clientId:s}),!c&&(0,_.createElement)(Ov,{group:"block"},(0,_.createElement)(Ik,{value:p,onChange:function(e){const n=["wide","full"].includes(e)?{width:void 0,height:void 0}:{};t({...n,align:e})}})),(0,_.createElement)(fM,{icon:(0,_.createElement)(dN,{icon:kK}),onSelect:S,onSelectURL:I,notices:o,onError:x,accept:"image/*",allowedTypes:GY,value:{id:m,src:N},mediaPreview:A,disableMediaButtons:v||c}))}));function JY(e,t){const{body:n}=document.implementation.createHTMLDocument("");n.innerHTML=e;const{firstElementChild:r}=n;if(r&&"A"===r.nodeName)return r.getAttribute(t)||void 0}const QY={img:{attributes:["src","alt","title"],classes:["alignleft","aligncenter","alignright","alignnone",/^wp-image-\d+$/]}};var eX={from:[{type:"raw",isMatch:e=>"FIGURE"===e.nodeName&&!!e.querySelector("img"),schema:({phrasingContentSchema:e})=>({figure:{require:["img"],children:{...QY,a:{attributes:["href","rel","target"],children:QY},figcaption:{children:e}}}}),transform:e=>{const t=e.className+" "+e.querySelector("img").className,n=/(?:^|\s)align(left|center|right)(?:$|\s)/.exec(t),r=""===e.id?void 0:e.id,o=n?n[1]:void 0,i=/(?:^|\s)wp-image-(\d+)(?:$|\s)/.exec(t),a=i?Number(i[1]):void 0,l=e.querySelector("a"),s=l&&l.href?"custom":void 0,c=l&&l.href?l.href:void 0,u=l&&l.rel?l.rel:void 0,d=l&&l.className?l.className:void 0;return Ul("core/image",Bc("core/image",e.outerHTML,{align:o,id:a,linkDestination:s,href:c,rel:u,linkClass:d,anchor:r}))}},{type:"files",isMatch:e=>1===e.length&&0===e[0].type.indexOf("image/"),transform:e=>Ul("core/image",{url:va(e[0])})},{type:"shortcode",tag:"caption",attributes:{url:{type:"string",source:"attribute",attribute:"src",selector:"img"},alt:{type:"string",source:"attribute",attribute:"alt",selector:"img"},caption:{shortcode:function(e,{shortcode:t}){const{body:n}=document.implementation.createHTMLDocument("");n.innerHTML=t.content;let r=n.querySelector("img");for(;r&&r.parentNode&&r.parentNode!==n;)r=r.parentNode;return r&&r.parentNode.removeChild(r),n.innerHTML.trim()}},href:{shortcode:(e,{shortcode:t})=>JY(t.content,"href")},rel:{shortcode:(e,{shortcode:t})=>JY(t.content,"rel")},linkClass:{shortcode:(e,{shortcode:t})=>JY(t.content,"class")},id:{type:"number",shortcode:({named:{id:e}})=>{if(e)return parseInt(e.replace("attachment_",""),10)}},align:{type:"string",shortcode:({named:{align:e="alignnone"}})=>e.replace("align","")}}}]};const tX={apiVersion:2,name:"core/image",title:"Image",category:"media",description:"Insert an image to make a visual statement.",keywords:["img","photo","picture"],textdomain:"default",attributes:{align:{type:"string"},url:{type:"string",source:"attribute",selector:"img",attribute:"src"},alt:{type:"string",source:"attribute",selector:"img",attribute:"alt",default:""},caption:{type:"string",source:"html",selector:"figcaption"},title:{type:"string",source:"attribute",selector:"img",attribute:"title"},href:{type:"string",source:"attribute",selector:"figure > a",attribute:"href"},rel:{type:"string",source:"attribute",selector:"figure > a",attribute:"rel"},linkClass:{type:"string",source:"attribute",selector:"figure > a",attribute:"class"},id:{type:"number"},width:{type:"number"},height:{type:"number"},sizeSlug:{type:"string"},linkDestination:{type:"string"},linkTarget:{type:"string",source:"attribute",selector:"figure > a",attribute:"target"}},supports:{anchor:!0,color:{__experimentalDuotone:"img",text:!1,background:!1},__experimentalBorder:{radius:!0}},styles:[{name:"default",label:"Default",isDefault:!0},{name:"rounded",label:"Rounded"}],editorStyle:"wp-block-image-editor",style:"wp-block-image"},{name:nX}=tX,rX={icon:kK,example:{attributes:{sizeSlug:"large",url:"https://s.w.org/images/core/5.3/MtBlanc1.jpg",caption:U("Mont Blanc appears—still, snowy, and serene.")}},__experimentalLabel(e,{context:t}){if("accessibility"===t){const{caption:t,alt:n,url:r}=e;return r?n?n+(t?". "+t:""):t||"":U("Empty")}},getEditWrapperProps:e=>({"data-align":e.align}),transforms:eX,edit:XY,save:function({attributes:e}){const{url:t,alt:n,caption:r,align:o,href:i,rel:a,linkClass:l,width:s,height:c,id:u,linkTarget:d,sizeSlug:p,title:m}=e,f=(0,Ce.isEmpty)(a)?void 0:a,h=Cr()({[`align${o}`]:o,[`size-${p}`]:p,"is-resized":s||c}),g=(0,_.createElement)("img",{src:t,alt:n,className:u?`wp-image-${u}`:null,width:s,height:c,title:m}),v=(0,_.createElement)(_.Fragment,null,i?(0,_.createElement)("a",{className:l,href:i,target:d,rel:f},g):g,!DM.isEmpty(r)&&(0,_.createElement)(DM.Content,{tagName:"figcaption",value:r}));return"left"===o||"right"===o||"center"===o?(0,_.createElement)("div",hR.save(),(0,_.createElement)("figure",{className:h},v)):(0,_.createElement)("figure",hR.save({className:h}),v)},deprecated:_K},oX="core/image",iX={name:oX,examples:null,deprecated:null,save:()=>null},aX={...tX,...rX,...iX,category:"design",supports:{...tX.supports,html:!1,anchor:!1}},lX=e=>{const t=kq(e);if(!t[e.type])return null;const n=mV(t[e.type].name,e);return Ol(n,t[e.type].settings),n},sX=e=>{let t=null;return e.errors.length>0&&(t=e.errors.map((e=>e.message)),t=t.join(", ")),t},cX=(e,t)=>e.map((e=>{const n=t(e);return e.innerBlocks&&(n.innerBlocks=cX(e.innerBlocks,t)),n}));var uX={SAVE_FORM(){if((0,be.Ys)("mailpoet-form-editor").getIsFormSaving())return;if((0,be.WI)("mailpoet-form-editor").saveFormStarted(),(0,be.Ys)("mailpoet-form-editor").getFormErrors().length)return;const e=(0,be.Ys)("mailpoet-form-editor").getFormData(),t=(0,be.Ys)("mailpoet-form-editor").getFormBlocks(),n=(0,be.Ys)("mailpoet-form-editor").getAllAvailableCustomFields(),r=dH(Fp.fontSizes,Fp.colors,Fp.gradients,n),o={...pH(e),body:r(t),editor_version:2};KB.Z.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"forms",action:"saveEditor",data:o}).done((e=>{(0,be.WI)("mailpoet-form-editor").saveFormDone(e.data.id),cV().remove("popup_form_dismissed",{path:"/"})})).fail((e=>{(0,be.WI)("mailpoet-form-editor").saveFormFailed(sX(e))}))},SAVE_CUSTOM_FIELD(e){(0,be.WI)("mailpoet-form-editor").saveCustomFieldStarted();const t=(0,be.Ys)("mailpoet-form-editor").getAllAvailableCustomFields().find((t=>t.id===e.customFieldId)),n={};(0,Ce.merge)(n,t,e.data),KB.Z.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"customFields",action:"save",data:n}).then((n=>{(0,be.WI)("mailpoet-form-editor").saveCustomFieldDone(t.id,n.data),"function"==typeof e.onFinish&&e.onFinish()})).then((0,be.WI)("mailpoet-form-editor").saveForm).fail((e=>{(0,be.WI)("mailpoet-form-editor").saveCustomFieldFailed(sX(e))}))},CREATE_CUSTOM_FIELD(e){(0,be.Ys)("mailpoet-form-editor").getIsCustomFieldCreating()||((0,be.WI)("mailpoet-form-editor").createCustomFieldStarted(e.data),(0,be.Ys)("mailpoet-form-editor").getIsCustomFieldCreating()&&KB.Z.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"customFields",action:"save",data:e.data}).then((t=>{const n=t.data;KB.Z.trackEvent("Forms > Add new custom field",{"Field type":n.type});const r=Ul(lX(n));(0,be.WI)("core/block-editor").replaceBlock(e.clientId,r),(0,be.WI)("mailpoet-form-editor").createCustomFieldDone(t.data)})).fail((e=>{(0,be.WI)("mailpoet-form-editor").createCustomFieldFailed(sX(e))})))},DELETE_CUSTOM_FIELD(e){(0,be.WI)("mailpoet-form-editor").deleteCustomFieldStarted();const t=(0,be.Ys)("mailpoet-form-editor").getAllAvailableCustomFields().find((t=>t.id===e.customFieldId)),n=kq(t);KB.Z.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"customFields",action:"delete",data:{id:e.customFieldId}}).then((()=>{KB.Z.trackEvent("Forms > Delete custom field",{"Field type":t.type}),(0,be.WI)("mailpoet-form-editor").deleteCustomFieldDone(e.customFieldId,e.clientId),(0,be.WI)("core/block-editor").removeBlock(e.clientId),function(e){const t=(0,be.Ys)(cl).getBlockType(e);if(t)return(0,be.WI)(cl).removeBlockTypes(e),t;console.error('Block "'+e+'" is not registered.')}(mV(n[t.type].name,t))})).fail((e=>{(0,be.WI)("mailpoet-form-editor").deleteCustomFieldFailed(sX(e))}))},APPLY_STYLES_TO_ALL_TEXT_INPUTS(e){const t=(0,be.Ys)("mailpoet-form-editor").getFormBlocks(),n=cX(t,(t=>{const n={...t};return(["mailpoet-form/last-name-input","mailpoet-form/first-name-input","mailpoet-form/email-input"].includes(t.name)||t.name.startsWith("mailpoet-form/custom-text"))&&(n.attributes={...n.attributes,styles:e.styles}),n}));(0,be.WI)("core/block-editor").resetBlocks(n)},TUTORIAL_DISMISS(){KB.Z.Ajax.post({api_version:KB.Z.apiVersion,endpoint:"user_flags",action:"set",data:{form_editor_tutorial_seen:1}})},BLOCKS_CHANGED_IN_BLOCK_EDITOR(e){const t=e.blocks,n=JH(t,"mailpoet-form/email-input"),r=JH(t,"mailpoet-form/submit-button");if(n&&r)return void(0,be.WI)("mailpoet-form-editor").changeFormBlocks(t);const o=(0,be.Ys)("mailpoet-form-editor").getFormBlocks(),i=[...t];if(!n){let e=JH(o,"mailpoet-form/email-input");e||(e=Ul("mailpoet-form/email-input")),i.unshift(e)}if(!r){let e=JH(o,"mailpoet-form/submit-button");e||(e=Ul("mailpoet-form/submit-button")),i.push(e)}(0,be.WI)("core/block-editor").resetBlocks(i)},STORE_LOCALLY({key:e,value:t}){window.localStorage.setItem(e,JSON.stringify(t))},CALL_API:uV.Z,ENSURE_BROWSER_URL({formId:e}){let t=(0,be.Ys)("mailpoet-form-editor").getFormEditorUrl();t=`${t}${e}`,window.location!==t&&window.history.replaceState(null,"",t)}};function dX(e){var t,n,r,o,i,a,l,s,c,u,d,p,m,f,h,g,v,b,y,w,k,E,_,C,x,S,I,T,N,A,R,L,P,O,D,M,B,F,z,H,V,W,Z,j,U,$,q,G,K,Y,X,J,Q,ee,te,ne,re,oe,ie,ae,le,se,ce,ue,de,pe,me,fe,he,ge,ve,be,ye,we,ke,Ee,_e,Ce,xe,Se,Ie,Te,Ne,Ae,Re,Le,Pe,Oe,De,Me,Be,Fe,ze,He,Ve,We,Ze,je,Ue,$e,qe,Ge,Ke,Ye,Xe,Je,Qe,et,tt,nt,rt,ot,it,at,lt,st,ct,ut,dt,pt,mt,ft,ht,gt,vt,bt,yt,wt,kt,Et,_t,Ct,xt,St,It,Tt,Nt,At,Rt,Lt,Pt,Ot,Dt,Mt,Bt,Ft;const zt={...e,settings:{...e.settings,formPlacement:{popup:{enabled:"1"===(null===(t=e.settings.form_placement)||void 0===t||null===(n=t.popup)||void 0===n?void 0:n.enabled),exitIntentEnabled:"1"===(null===(r=e.settings.form_placement)||void 0===r||null===(o=r.popup)||void 0===o?void 0:o.exit_intent_enabled),delay:void 0!==(null===(i=e.settings.form_placement)||void 0===i||null===(a=i.popup)||void 0===a?void 0:a.delay)?PV(null===(l=e.settings.form_placement)||void 0===l||null===(s=l.popup)||void 0===s?void 0:s.delay):15,animation:void 0!==(null===(c=e.settings.form_placement)||void 0===c||null===(u=c.popup)||void 0===u?void 0:u.animation)?null===(d=e.settings.form_placement)||void 0===d||null===(p=d.popup)||void 0===p?void 0:p.animation:"slideup",styles:{...ZF,...null===(m=e.settings.form_placement)||void 0===m||null===(f=m.popup)||void 0===f?void 0:f.styles},categories:null!==(h=null===(g=e.settings.form_placement)||void 0===g||null===(v=g.popup)||void 0===v?void 0:v.categories)&&void 0!==h?h:[],tags:null!==(b=null===(y=e.settings.form_placement)||void 0===y||null===(w=y.popup)||void 0===w?void 0:w.tags)&&void 0!==b?b:[],posts:{all:"1"===(null===(k=e.settings.form_placement)||void 0===k||null===(E=k.popup)||void 0===E||null===(_=E.posts)||void 0===_?void 0:_.all),selected:Array.isArray(null===(C=e.settings.form_placement)||void 0===C||null===(x=C.popup)||void 0===x||null===(S=x.posts)||void 0===S?void 0:S.selected)?null===(I=e.settings.form_placement)||void 0===I||null===(T=I.popup)||void 0===T||null===(N=T.posts)||void 0===N?void 0:N.selected:[]},pages:{all:"1"===(null===(A=e.settings.form_placement)||void 0===A||null===(R=A.popup)||void 0===R||null===(L=R.pages)||void 0===L?void 0:L.all),selected:Array.isArray(null===(P=e.settings.form_placement)||void 0===P||null===(O=P.popup)||void 0===O||null===(D=O.pages)||void 0===D?void 0:D.selected)?null===(M=e.settings.form_placement)||void 0===M||null===(B=M.popup)||void 0===B||null===(F=B.pages)||void 0===F?void 0:F.selected:[]}},fixedBar:{enabled:"1"===(null===(z=e.settings.form_placement)||void 0===z||null===(H=z.fixed_bar)||void 0===H?void 0:H.enabled),delay:void 0!==(null===(V=e.settings.form_placement)||void 0===V||null===(W=V.fixed_bar)||void 0===W?void 0:W.delay)?PV(null===(Z=e.settings.form_placement)||void 0===Z||null===(j=Z.fixed_bar)||void 0===j?void 0:j.delay):15,animation:null!==(U=null===($=e.settings.form_placement)||void 0===$||null===(q=$.fixed_bar)||void 0===q?void 0:q.animation)&&void 0!==U?U:"slideup",styles:{...jF,...null===(G=e.settings.form_placement)||void 0===G||null===(K=G.fixed_bar)||void 0===K?void 0:K.styles},position:null!==(Y=null===(X=e.settings.form_placement)||void 0===X||null===(J=X.fixed_bar)||void 0===J?void 0:J.position)&&void 0!==Y?Y:"top",categories:null!==(Q=null===(ee=e.settings.form_placement)||void 0===ee||null===(te=ee.fixed_bar)||void 0===te?void 0:te.categories)&&void 0!==Q?Q:[],tags:null!==(ne=null===(re=e.settings.form_placement)||void 0===re||null===(oe=re.fixed_bar)||void 0===oe?void 0:oe.tags)&&void 0!==ne?ne:[],posts:{all:"1"===(null===(ie=e.settings.form_placement)||void 0===ie||null===(ae=ie.fixed_bar)||void 0===ae||null===(le=ae.posts)||void 0===le?void 0:le.all),selected:Array.isArray(null===(se=e.settings.form_placement)||void 0===se||null===(ce=se.fixed_bar)||void 0===ce||null===(ue=ce.posts)||void 0===ue?void 0:ue.selected)?null===(de=e.settings.form_placement)||void 0===de||null===(pe=de.fixed_bar)||void 0===pe||null===(me=pe.posts)||void 0===me?void 0:me.selected:[]},pages:{all:"1"===(null===(fe=e.settings.form_placement)||void 0===fe||null===(he=fe.fixed_bar)||void 0===he||null===(ge=he.pages)||void 0===ge?void 0:ge.all),selected:Array.isArray(null===(ve=e.settings.form_placement)||void 0===ve||null===(be=ve.fixed_bar)||void 0===be||null===(ye=be.pages)||void 0===ye?void 0:ye.selected)?null===(we=e.settings.form_placement)||void 0===we||null===(ke=we.fixed_bar)||void 0===ke||null===(Ee=ke.pages)||void 0===Ee?void 0:Ee.selected:[]}},belowPosts:{enabled:"1"===(null===(_e=e.settings.form_placement)||void 0===_e||null===(Ce=_e.below_posts)||void 0===Ce?void 0:Ce.enabled),styles:{...WF,...null===(xe=e.settings.form_placement)||void 0===xe||null===(Se=xe.below_posts)||void 0===Se?void 0:Se.styles},categories:null!==(Ie=null===(Te=e.settings.form_placement)||void 0===Te||null===(Ne=Te.below_posts)||void 0===Ne?void 0:Ne.categories)&&void 0!==Ie?Ie:[],tags:null!==(Ae=null===(Re=e.settings.form_placement)||void 0===Re||null===(Le=Re.below_posts)||void 0===Le?void 0:Le.tags)&&void 0!==Ae?Ae:[],posts:{all:"1"===(null===(Pe=e.settings.form_placement)||void 0===Pe||null===(Oe=Pe.below_posts)||void 0===Oe||null===(De=Oe.posts)||void 0===De?void 0:De.all),selected:Array.isArray(null===(Me=e.settings.form_placement)||void 0===Me||null===(Be=Me.below_posts)||void 0===Be||null===(Fe=Be.posts)||void 0===Fe?void 0:Fe.selected)?null===(ze=e.settings.form_placement)||void 0===ze||null===(He=ze.below_posts)||void 0===He||null===(Ve=He.posts)||void 0===Ve?void 0:Ve.selected:[]},pages:{all:"1"===(null===(We=e.settings.form_placement)||void 0===We||null===(Ze=We.below_posts)||void 0===Ze||null===(je=Ze.pages)||void 0===je?void 0:je.all),selected:Array.isArray(null===(Ue=e.settings.form_placement)||void 0===Ue||null===($e=Ue.below_posts)||void 0===$e||null===(qe=$e.pages)||void 0===qe?void 0:qe.selected)?null===(Ge=e.settings.form_placement)||void 0===Ge||null===(Ke=Ge.below_posts)||void 0===Ke||null===(Ye=Ke.pages)||void 0===Ye?void 0:Ye.selected:[]}},slideIn:{enabled:"1"===(null===(Xe=e.settings.form_placement)||void 0===Xe||null===(Je=Xe.slide_in)||void 0===Je?void 0:Je.enabled),delay:void 0!==(null===(Qe=e.settings.form_placement)||void 0===Qe||null===(et=Qe.slide_in)||void 0===et?void 0:et.delay)?PV(null===(tt=e.settings.form_placement)||void 0===tt||null===(nt=tt.slide_in)||void 0===nt?void 0:nt.delay):15,position:null!==(rt=null===(ot=e.settings.form_placement)||void 0===ot||null===(it=ot.slide_in)||void 0===it?void 0:it.position)&&void 0!==rt?rt:"right",animation:null!==(at=null===(lt=e.settings.form_placement)||void 0===lt||null===(st=lt.slide_in)||void 0===st?void 0:st.animation)&&void 0!==at?at:"slideup",styles:{...$F,...null===(ct=e.settings.form_placement)||void 0===ct||null===(ut=ct.slide_in)||void 0===ut?void 0:ut.styles},categories:null!==(dt=null===(pt=e.settings.form_placement)||void 0===pt||null===(mt=pt.slide_in)||void 0===mt?void 0:mt.categories)&&void 0!==dt?dt:[],tags:null!==(ft=null===(ht=e.settings.form_placement)||void 0===ht||null===(gt=ht.slide_in)||void 0===gt?void 0:gt.tags)&&void 0!==ft?ft:[],posts:{all:"1"===(null===(vt=e.settings.form_placement)||void 0===vt||null===(bt=vt.slide_in)||void 0===bt||null===(yt=bt.posts)||void 0===yt?void 0:yt.all),selected:Array.isArray(null===(wt=e.settings.form_placement)||void 0===wt||null===(kt=wt.slide_in)||void 0===kt||null===(Et=kt.posts)||void 0===Et?void 0:Et.selected)?null===(_t=e.settings.form_placement)||void 0===_t||null===(Ct=_t.slide_in)||void 0===Ct||null===(xt=Ct.posts)||void 0===xt?void 0:xt.selected:[]},pages:{all:"1"===(null===(St=e.settings.form_placement)||void 0===St||null===(It=St.slide_in)||void 0===It||null===(Tt=It.pages)||void 0===Tt?void 0:Tt.all),selected:Array.isArray(null===(Nt=e.settings.form_placement)||void 0===Nt||null===(At=Nt.slide_in)||void 0===At||null===(Rt=At.pages)||void 0===Rt?void 0:Rt.selected)?null===(Lt=e.settings.form_placement)||void 0===Lt||null===(Pt=Lt.slide_in)||void 0===Pt||null===(Ot=Pt.pages)||void 0===Ot?void 0:Ot.selected:[]}},others:{styles:{...UF,...null===(Dt=e.settings.form_placement)||void 0===Dt||null===(Mt=Dt.others)||void 0===Mt?void 0:Mt.styles}}},alignment:null!==(Bt=e.settings.alignment)&&void 0!==Bt?Bt:qF.alignment,borderRadius:void 0!==e.settings.border_radius?PV(e.settings.border_radius):qF.borderRadius,borderSize:void 0!==e.settings.border_size?PV(e.settings.border_size):qF.borderSize,formPadding:void 0!==e.settings.form_padding?PV(e.settings.form_padding):qF.formPadding,inputPadding:void 0!==e.settings.input_padding?PV(e.settings.input_padding):qF.inputPadding,borderColor:e.settings.border_color,fontFamily:e.settings.font_family,fontSize:e.settings.fontSize&&PV(e.settings.fontSize),successValidationColor:e.settings.success_validation_color,errorValidationColor:e.settings.error_validation_color,backgroundImageUrl:e.settings.background_image_url,backgroundImageDisplay:e.settings.background_image_display,closeButton:null!==(Ft=e.settings.close_button)&&void 0!==Ft?Ft:qF.closeButton}};return zt.settings.formPlacement.belowPosts.styles.width.value=PV(zt.settings.formPlacement.belowPosts.styles.width.value),zt.settings.formPlacement.slideIn.styles.width.value=PV(zt.settings.formPlacement.slideIn.styles.width.value),zt.settings.formPlacement.fixedBar.styles.width.value=PV(zt.settings.formPlacement.fixedBar.styles.width.value),zt.settings.formPlacement.popup.styles.width.value=PV(zt.settings.formPlacement.popup.styles.width.value),zt.settings.formPlacement.others.styles.width.value=PV(zt.settings.formPlacement.others.styles.width.value),delete zt.settings.border_radius,delete zt.settings.border_size,delete zt.settings.border_color,delete zt.settings.input_padding,delete zt.settings.form_padding,delete zt.settings.close_button,delete zt.settings.font_family,delete zt.settings.background_image_display,delete zt.settings.background_image_url,zt}const pX=CE(xN(((e,t)=>{if(Wl(t.name,"multiple",!0))return{};const n=e(Iv).getBlocks(),r=(0,Ce.find)(n,(({name:e})=>t.name===e));return{originalBlockClientId:r&&r.clientId!==t.clientId&&r.clientId}})),IN(((e,{originalBlockClientId:t})=>({selectFirst:()=>e(Iv).selectBlock(t)})))),mX=Ea((e=>pX((({originalBlockClientId:t,selectFirst:n,...r})=>{if(!t)return(0,_.createElement)(e,r);const o=zl(r.name),i=function(e){const t=Jl(Ql("to",e),(({type:e,blocks:t})=>"block"===e&&1===t.length));return t?zl(t.blocks[0]):null}(r.name);return[(0,_.createElement)("div",{key:"invalid-preview",style:{minHeight:"60px"}},(0,_.createElement)(e,(0,nr.Z)({key:"block-edit"},r))),(0,_.createElement)(xA,{key:"multiple-use-warning",actions:[(0,_.createElement)(Gi,{key:"find-original",variant:"secondary",onClick:n},U("Find original")),(0,_.createElement)(Gi,{key:"remove",variant:"secondary",onClick:()=>r.onReplace([])},U("Remove")),i&&(0,_.createElement)(Gi,{key:"transform",variant:"secondary",onClick:()=>r.onReplace(Ul(i.name,r.attributes))},U("Transform into:")," ",i.title)]},(0,_.createElement)("strong",null,o.title,": "),U("This block can only be used once."))]}))),"withMultipleValidation");(0,W.KJ)("editor.BlockEdit","core/edit-post/validate-multiple-use/with-multiple-validation",mX);var fX=(0,_.createElement)(ko,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,_.createElement)(yo,{d:"M14.7 11.3c1-.6 1.5-1.6 1.5-3 0-2.3-1.3-3.4-4-3.4H7v14h5.8c1.4 0 2.5-.3 3.3-1 .8-.7 1.2-1.7 1.2-2.9.1-1.9-.8-3.1-2.6-3.7zm-5.1-4h2.3c.6 0 1.1.1 1.4.4.3.3.5.7.5 1.2s-.2 1-.5 1.2c-.3.3-.8.4-1.4.4H9.6V7.3zm4.6 9c-.4.3-1 .4-1.7.4H9.6v-3.9h2.9c.7 0 1.3.2 1.7.5.4.3.6.8.6 1.5s-.2 1.2-.6 1.5z"}));const hX="core/bold",gX=U("Bold"),vX={name:hX,title:gX,tagName:"strong",className:null,edit({isActive:e,value:t,onChange:n,onFocus:r}){function o(){n(Yh(t,{type:hX}))}return(0,_.createElement)(_.Fragment,null,(0,_.createElement)(MM,{type:"primary",character:"b",onUse:o}),(0,_.createElement)(BM,{name:"bold",icon:fX,title:gX,onClick:function(){o(),r()},isActive:e,shortcutType:"primary",shortcutCharacter:"b"}),(0,_.createElement)(FM,{inputType:"formatBold",onInput:o}))}};var bX=(0,_.createElement)(ko,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,_.createElement)(yo,{d:"M20.8 10.7l-4.3-4.3-1.1 1.1 4.3 4.3c.1.1.1.3 0 .4l-4.3 4.3 1.1 1.1 4.3-4.3c.7-.8.7-1.9 0-2.6zM4.2 11.8l4.3-4.3-1-1-4.3 4.3c-.7.7-.7 1.8 0 2.5l4.3 4.3 1.1-1.1-4.3-4.3c-.2-.1-.2-.3-.1-.4z"}));const yX="core/code",wX=U("Inline code"),kX={name:yX,title:wX,tagName:"code",className:null,__unstableInputRule(e){const{start:t,text:n}=e;if("`"!==n.slice(t-1,t))return e;const r=n.slice(0,t-1).lastIndexOf("`");if(-1===r)return e;const o=r,i=t-2;return o===i?e:(e=Lh(e,o,o+1),e=ah(e=Lh(e,i,i+1),{type:yX},o,i))},edit:({value:e,onChange:t,onFocus:n,isActive:r})=>(0,_.createElement)(BM,{icon:bX,title:wX,onClick:function(){t(Yh(e,{type:yX})),n()},isActive:r})},EX=["image"],_X="core/image",CX=U("Inline image"),xX={name:_X,title:CX,keywords:[U("photo"),U("media")],object:!0,tagName:"img",className:null,attributes:{className:"class",style:"style",url:"src",alt:"alt"},edit:function({value:e,onChange:t,onFocus:n,isObjectActive:r,activeObjectAttributes:o,contentRef:i}){const[a,l]=(0,_.useState)(!1);function s(){l(!1)}return(0,_.createElement)(aM,null,(0,_.createElement)(BM,{icon:(0,_.createElement)(ko,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,_.createElement)(yo,{d:"M4 18.5h16V17H4v1.5zM16 13v1.5h4V13h-4zM5.1 15h7.8c.6 0 1.1-.5 1.1-1.1V6.1c0-.6-.5-1.1-1.1-1.1H5.1C4.5 5 4 5.5 4 6.1v7.8c0 .6.5 1.1 1.1 1.1zm.4-8.5h7V10l-1-1c-.3-.3-.8-.3-1 0l-1.6 1.5-1.2-.7c-.3-.2-.6-.2-.9 0l-1.3 1V6.5zm0 6.1l1.8-1.3 1.3.8c.3.2.7.2.9-.1l1.5-1.4 1.5 1.4v1.5h-7v-.9z"})),title:CX,onClick:function(){l(!0)},isActive:r}),a&&(0,_.createElement)(iM,{allowedTypes:EX,onSelect:({id:r,url:o,alt:i,width:a})=>{s(),t(function(e,t,n,r){return Rh(e,{formats:[,],replacements:[t],text:uh},void 0,void 0)}(e,{type:_X,attributes:{className:`wp-image-${r}`,style:`width: ${Math.min(a,150)}px;`,url:o,alt:i}})),n()},onClose:s,render:({open:e})=>(e(),null)}),r&&(0,_.createElement)(SX,{value:e,onChange:t,activeObjectAttributes:o,contentRef:i}))}};function SX({value:e,onChange:t,activeObjectAttributes:n,contentRef:r}){const{style:o}=n,[i,a]=(0,_.useState)(null==o?void 0:o.replace(/\D/g,"")),l=Xh({ref:r,value:e,settings:xX});return(0,_.createElement)(ia,{position:"bottom center",focusOnMount:!1,anchorRef:l,className:"block-editor-format-toolbar__image-popover"},(0,_.createElement)("form",{className:"block-editor-format-toolbar__image-container-content",onSubmit:r=>{const o=e.replacements.slice();o[e.start]={type:_X,attributes:{...n,style:i?`width: ${i}px;`:""}},t({...e,replacements:o}),r.preventDefault()}},(0,_.createElement)(Vk,{className:"block-editor-format-toolbar__image-container-value",type:"number",label:U("Width"),value:i,min:1,onChange:e=>a(e)}),(0,_.createElement)(Gi,{icon:_D,label:U("Apply"),type:"submit"})))}var IX=(0,_.createElement)(ko,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,_.createElement)(yo,{d:"M12.5 5L10 19h1.9l2.5-14z"}));const TX="core/italic",NX=U("Italic"),AX={name:TX,title:NX,tagName:"em",className:null,edit({isActive:e,value:t,onChange:n,onFocus:r}){function o(){n(Yh(t,{type:TX}))}return(0,_.createElement)(_.Fragment,null,(0,_.createElement)(MM,{type:"primary",character:"i",onUse:o}),(0,_.createElement)(BM,{name:"italic",icon:IX,title:NX,onClick:function(){o(),r()},isActive:e,shortcutType:"primary",shortcutCharacter:"i"}),(0,_.createElement)(FM,{inputType:"formatItalic",onInput:o}))}};function RX(e){return!!e&&/^#[^\s#?\/]*$/.test(e)}function LX(e){if(!e)return!1;const t=e.trim();if(!t)return!1;if(/^\S+:/.test(t)){const e=zD(t);if(!function(e){return!!e&&/^[a-z\-.\+]+[0-9]*:$/i.test(e)}(e))return!1;if((0,Ce.startsWith)(e,"http")&&!/^https?:\/\/[^\/\s]/i.test(t))return!1;if(!(n=function(e){const t=/^[^\/\s:]+:(?:\/\/)?\/?([^\/\s#?]+)[\/#?]{0,1}\S*$/.exec(e);if(t)return t[1]}(t))||!/^[^\s#?]+$/.test(n))return!1;const r=rY(t);if(r&&!function(e){return!!e&&/^[^\s#?]+$/.test(e)}(r))return!1;const o=X(t);if(o&&!function(e){return!!e&&/^[^\s#?\/]+$/.test(e)}(o))return!1;const i=function(e){const t=/^\S+?(#[^\s\?]*)/.exec(e);if(t)return t[1]}(t);if(i&&!RX(i))return!1}var n;return!((0,Ce.startsWith)(t,"#")&&!RX(t))}var PX=xD((function({isActive:e,activeAttributes:t,addingLink:n,value:r,onChange:o,speak:i,stopAddingLink:a,contentRef:l}){const[s,c]=(0,_.useState)(),u={url:t.url,type:t.type,id:t.id,opensInNewTab:"_blank"===t.target,...s},d=Xh({ref:l,value:r,settings:MX}),p=(0,_.useRef)(!!n&&"firstElement");return(0,_.createElement)(ia,{anchorRef:d,focusOnMount:p.current,onClose:a,position:"bottom center"},(0,_.createElement)(tM,{value:u,onChange:function(t){t={...s,...t};const n=u.opensInNewTab!==t.opensInNewTab&&u.url===t.url,l=n&&void 0===t.url;if(c(l?t:void 0),l)return;const d=ZD(t.url),p=function({url:e,type:t,id:n,opensInNewWindow:r}){const o={type:"core/link",attributes:{url:e}};return t&&(o.attributes.type=t),n&&(o.attributes.id=n),r&&(o.attributes.target="_blank",o.attributes.rel="noreferrer noopener"),o}({url:d,type:t.type,id:void 0!==t.id&&null!==t.id?String(t.id):void 0,opensInNewWindow:t.opensInNewTab});if(xh(r)&&!e){const e=t.title||d,n=ah(mh({text:e}),p,0,e.length);o(Rh(r,n))}else{const e=ah(r,p);e.start=e.end,e.activeFormats=[],o(e)}n||a(),LX(d)?i(U(e?"Link edited.":"Link inserted."),"assertive"):i(U("Warning: the link has been inserted but may have errors. Please test it."),"assertive")},onRemove:function(){const e=Nh(r,"core/link");o(e),a(),i(U("Link removed."),"assertive")},forceIsEditingLink:n,hasRichPreviews:!0}))}));const OX="core/link",DX=U("Link"),MX={name:OX,title:DX,tagName:"a",className:null,attributes:{url:"href",type:"data-type",id:"data-id",target:"target"},__unstablePasteRule(e,{html:t,plainText:n}){if(xh(e))return e;const r=(t||n).replace(/<[^>]+>/g,"").trim();return ID(r)?(window.console.log("Created link:\n\n",r),ah(e,{type:OX,attributes:{url:Qs(r)}})):e},edit:function({isActive:e,activeAttributes:t,value:n,onChange:r,onFocus:o,contentRef:i}){const[a,l]=(0,_.useState)(!1);function s(){const e=Ch(Oh(n));e&&ID(e)&&LX(e)?r(ah(n,{type:OX,attributes:{url:e}})):e&&VD(e)?r(ah(n,{type:OX,attributes:{url:`mailto:${e}`}})):l(!0)}function c(){r(Nh(n,OX)),Gf(U("Link removed."),"assertive")}return(0,_.createElement)(_.Fragment,null,(0,_.createElement)(MM,{type:"primary",character:"k",onUse:s}),(0,_.createElement)(MM,{type:"primaryShift",character:"k",onUse:c}),e&&(0,_.createElement)(BM,{name:"link",icon:CC,title:U("Unlink"),onClick:c,isActive:e,shortcutType:"primaryShift",shortcutCharacter:"k"}),!e&&(0,_.createElement)(BM,{name:"link",icon:_C,title:DX,onClick:s,isActive:e,shortcutType:"primary",shortcutCharacter:"k"}),(a||e)&&(0,_.createElement)(PX,{addingLink:a,stopAddingLink:function(){l(!1),o()},isActive:e,activeAttributes:t,value:n,onChange:r,contentRef:i}))}},BX="core/strikethrough",FX=U("Strikethrough"),zX={name:BX,title:FX,tagName:"s",className:null,edit:({isActive:e,value:t,onChange:n,onFocus:r})=>(0,_.createElement)(BM,{icon:gx,title:FX,onClick:function(){n(Yh(t,{type:BX})),r()},isActive:e})},HX="core/underline",VX={name:HX,title:U("Underline"),tagName:"span",className:null,attributes:{style:"style"},edit({value:e,onChange:t}){const n=()=>{t(Yh(e,{type:HX,attributes:{style:"text-decoration: underline;"}}))};return(0,_.createElement)(_.Fragment,null,(0,_.createElement)(MM,{type:"primary",character:"u",onUse:n}),(0,_.createElement)(FM,{inputType:"formatUnderline",onInput:n}))}};function WX(e,t,n){const r=_h(t,e);if(!r)return;const o=r.attributes.style;if(o)return o.replace(new RegExp("^color:\\s*"),"");const i=r.attributes.class;if(i){const e=i.replace(/.*has-([^\s]*)-color.*/,"$1");return S_(n,e).color}}const ZX=({name:e,value:t,onChange:n})=>{const r=(0,er.Z)((e=>{const{getSettings:t}=e(Iv);return(0,Ce.get)(t(),["colors"],[])})),o=(0,_.useCallback)((o=>{if(o){const i=I_(r,o);n(ah(t,{type:e,attributes:i?{class:T_("color",i.slug)}:{style:`color:${o}`}}))}else n(Nh(t,e))}),[r,n]),i=(0,_.useMemo)((()=>WX(e,t,r)),[e,t,r]);return(0,_.createElement)(EN,{value:i,onChange:o})};function jX({name:e,value:t,onChange:n,onClose:r,contentRef:o}){const i=Xh({ref:o,value:t,settings:GX});return(0,_.createElement)(pM,{value:t,onClose:r,className:"components-inline-color-popover",anchorRef:i},(0,_.createElement)(ZX,{name:e,value:t,onChange:n}))}const UX="core/text-color",$X=U("Text color"),qX=[],GX={name:UX,title:$X,tagName:"span",className:"has-inline-color",attributes:{style:"style",class:"class"},edit:function({value:e,onChange:t,isActive:n,activeAttributes:r,contentRef:o}){const i=fk("color.custom"),a=fk("color.palette")||qX,[l,s]=(0,_.useState)(!1),c=(0,_.useCallback)((()=>s(!0)),[s]),u=(0,_.useCallback)((()=>s(!1)),[s]),d=(0,_.useMemo)((()=>{const t=WX(UX,e,a);if(t)return{backgroundColor:t}}),[e,a]),p=!(0,Ce.isEmpty)(a)||!i;return p||n?(0,_.createElement)(_.Fragment,null,(0,_.createElement)(BM,{key:n?"text-color":"text-color-not-active",className:"format-library-text-color-button",name:n?"text-color":void 0,icon:(0,_.createElement)(_.Fragment,null,(0,_.createElement)(dk,{icon:HS}),n&&(0,_.createElement)("span",{className:"format-library-text-color-button__indicator",style:d})),title:$X,onClick:p?c:()=>t(Nh(e,UX))}),l&&(0,_.createElement)(jX,{name:UX,onClose:u,activeAttributes:r,value:e,onChange:t,contentRef:o})):null}};var KX=(0,_.createElement)(ko,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,_.createElement)(yo,{d:"M16.9 18.3l.8-1.2c.4-.6.7-1.2.9-1.6.2-.4.3-.8.3-1.2 0-.3-.1-.7-.2-1-.1-.3-.4-.5-.6-.7-.3-.2-.6-.3-1-.3s-.8.1-1.1.2c-.3.1-.7.3-1 .6l.2 1.3c.3-.3.5-.5.8-.6s.6-.2.9-.2c.3 0 .5.1.7.2.2.2.2.4.2.7 0 .3-.1.5-.2.8-.1.3-.4.7-.8 1.3L15 19.4h4.3v-1.2h-2.4zM14.1 7.2h-2L9.5 11 6.9 7.2h-2l3.6 5.3L4.7 18h2l2.7-4 2.7 4h2l-3.8-5.5 3.8-5.3z"}));const YX="core/subscript",XX=U("Subscript"),JX={name:YX,title:XX,tagName:"sub",className:null,edit:({isActive:e,value:t,onChange:n,onFocus:r})=>(0,_.createElement)(BM,{icon:KX,title:XX,onClick:function(){n(Yh(t,{type:YX})),r()},isActive:e})};var QX=(0,_.createElement)(ko,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,_.createElement)(yo,{d:"M16.9 10.3l.8-1.3c.4-.6.7-1.2.9-1.6.2-.4.3-.8.3-1.2 0-.3-.1-.7-.2-1-.2-.2-.4-.4-.7-.6-.3-.2-.6-.3-1-.3s-.8.1-1.1.2c-.3.1-.7.3-1 .6l.1 1.3c.3-.3.5-.5.8-.6s.6-.2.9-.2c.3 0 .5.1.7.2.2.2.2.4.2.7 0 .3-.1.5-.2.8-.1.3-.4.7-.8 1.3l-1.8 2.8h4.3v-1.2h-2.2zm-2.8-3.1h-2L9.5 11 6.9 7.2h-2l3.6 5.3L4.7 18h2l2.7-4 2.7 4h2l-3.8-5.5 3.8-5.3z"}));const eJ="core/superscript",tJ=U("Superscript"),nJ={name:eJ,title:tJ,tagName:"sup",className:null,edit:({isActive:e,value:t,onChange:n,onFocus:r})=>(0,_.createElement)(BM,{icon:QX,title:tJ,onClick:function(){n(Yh(t,{type:eJ})),r()},isActive:e})};var rJ=(0,_.createElement)(ko,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,_.createElement)(yo,{d:"M19 6.5H5c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-7c0-1.1-.9-2-2-2zm.5 9c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-7c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v7zM8 12.8h8v-1.5H8v1.5z"}));const oJ="core/keyboard",iJ=U("Keyboard input");[vX,kX,xX,AX,MX,zX,VX,GX,JX,nJ,{name:oJ,title:iJ,tagName:"kbd",className:null,edit:({isActive:e,value:t,onChange:n,onFocus:r})=>(0,_.createElement)(BM,{icon:rJ,title:iJ,onClick:function(){n(Yh(t,{type:oJ})),r()},isActive:e})}].forEach((({name:e,...t})=>Th(e,t)));const aJ="mailpoet-form/font-selection",lJ=["core/paragraph","core/heading"],sJ=({value:e,onChange:t,activeAttributes:n})=>{const r=(0,er.Z)((e=>e("core/block-editor").getSelectedBlock()),[]);return lJ.includes(r.name)?C().createElement(Pv,null,C().createElement("div",{className:"mailpoet_toolbar_item"},C().createElement(YF,{value:n.font,onChange:n=>{t(ah(e,{type:"mailpoet-form/font-selection",attributes:{style:`font-family: ${n}`,font:n}}))},name:KB.Z.I18n.t("formSettingsStylesFontFamily"),hideLabelFromVision:!0}))):null};sJ.propTypes={value:Bx().shape({formats:Bx().arrayOf(Bx().arrayOf(Bx().shape({attributes:Bx().shape({font:Bx().string,style:Bx().string}),type:Bx().string,unregisteredAttributes:Bx().shape({font:Bx().string,style:Bx().string})}))).isRequired,replacements:Bx().arrayOf(Bx().string).isRequired,text:Bx().string.isRequired,activeFormats:Bx().arrayOf(Bx().shape({attributes:Bx().shape({font:Bx().string,style:Bx().string}),type:Bx().string,unregisteredAttributes:Bx().shape({font:Bx().string,style:Bx().string})})),start:Bx().number,end:Bx().number}).isRequired,onChange:Bx().func.isRequired,activeAttributes:Bx().shape({font:Bx().string}).isRequired};const cJ={name:aJ,title:"Font Selection",tagName:"span",className:"mailpoet-has-font",attributes:{style:"style",font:"data-font"},edit:sJ};var uJ=n(80416),dJ=n(86529),pJ=n(5830),mJ=n(12912),fJ=n(73816),hJ=n(38287),gJ=()=>{const e=[{name:"popup",label:KB.Z.I18n.t("popupCategory")},{name:"slide_in",label:KB.Z.I18n.t("slideInCategory")},{name:"fixed_bar",label:KB.Z.I18n.t("fixedBarCategory")},{name:"below_posts",label:KB.Z.I18n.t("belowPagesCategory")},{name:"others",label:KB.Z.I18n.t("othersCategory")}],t=(0,er.Z)((e=>e("mailpoet-form-editor-templates").getSelectedCategory()),[]),n=(0,er.Z)((e=>e("mailpoet-form-editor-templates").getTemplates()),[]),r=(0,er.Z)((e=>e("mailpoet-form-editor-templates").getLoading()),[]),o=(0,er.Z)((e=>e("mailpoet-form-editor-templates").getSelectTemplateFailed()),[]),{selectTemplate:i,selectCategory:a}=(0,tr.Z)("mailpoet-form-editor-templates");return C().createElement(C().Fragment,null,e.map((e=>n[e.name].map(((e,t)=>t<4&&C().createElement("link",{key:`thumbnail_prefetch_${e.id}`,rel:"preload",href:e.thumbnail,as:"image"}))))),C().createElement("div",{className:"mailpoet-template-selection-header"},C().createElement(lF.Z,{level:4},KB.Z.I18n.t("selectTemplate")),C().createElement(fJ.Button,{automationId:"create_blank_form",onClick:()=>i("initial_form","Blank template")},KB.Z.I18n.t("createBlankTemplate"))),o&&C().createElement(hJ.Z,{type:"error",scroll:!0,renderInPlace:!0},C().createElement("p",null,KB.Z.I18n.t("createFormError"))),C().createElement("div",{"data-automation-id":"template_selection_list"},C().createElement(dJ.Z,{color:"#fff"}),C().createElement("div",{className:"mailpoet-templates"},C().createElement(uJ.Z,{categories:e,active:t,onSelect:a}),n[t].map((e=>C().createElement(mJ.Z,{key:e.id,onSelect:()=>i(e.id,e.name),label:e.name,automationId:`select_template_${e.id}`,className:"mailpoet-form-template"},C().createElement("div",{className:"mailpoet-template-thumbnail"},C().createElement("img",{src:e.thumbnail,alt:e.name,width:"480",height:"317",loading:"lazy"}))))))),r&&C().createElement(pJ.Z,null))},vJ={getTemplates:e=>e.templates,getFormEditorUrl:e=>e.formEditorUrl,getSelectTemplateFailed:e=>e.selectTemplateFailed,getLoading:e=>e.loading,getSelectedCategory:e=>e.activeCategory},bJ=e=>(t=e,n)=>{switch(n.type){case"SELECT_TEMPLATE_ERROR":return(e=>({...e,selectTemplateFailed:!0,loading:!1}))(t);case"SELECT_TEMPLATE_START":return(e=>({...e,selectTemplateFailed:!1,loading:!0}))(t);case"SELECT_CATEGORY":return((e,t)=>({...e,activeCategory:t.category}))(t,n);default:return t}};function*yJ(e,t){yield{type:"SELECT_TEMPLATE_START"},yield{type:"TRACK_EVENT",name:"Forms > Template selected",data:{"Template id":e,"Template name":t},timeout:200};const n=(0,be.Ys)("mailpoet-form-editor-templates").getFormEditorUrl();return window.location.href=`${n}${e}`,{}}function wJ(e){return{type:"SELECT_CATEGORY",category:e}}var kJ={CALL_API:uV.Z,TRACK_EVENT:async function({name:e,data:t,timeout:n=0}){return KB.Z.trackEvent(e,t),r=n,new Promise((e=>setTimeout(e,r)));var r}};let EJ;!function(e){e.Popup="popup",e.SlideIn="slide_in",e.FixedBar="fixed_bar",e.BelowPosts="below_posts",e.Others="others"}(EJ||(EJ={}));const _J=()=>C().createElement(ge.k.Provider,{value:(0,ge.S)(window)},C().createElement(C().Fragment,null,C().createElement(ve.Z,null),C().createElement(gJ,null))),CJ=document.querySelector("#mailpoet_form_edit_templates");CJ&&((()=>{const e={templates:window.mailpoet_templates,formEditorUrl:window.mailpoet_form_edit_url,selectTemplateFailed:!1,loading:!1,activeCategory:EJ.Popup},t={selectors:vJ,actions:E,controls:kJ,reducer:bJ(e),resolvers:{}};(0,be.R9)("mailpoet-form-editor-templates",t)})(),S().render(C().createElement(C().StrictMode,null,C().createElement(_J,null)),CJ));const xJ=()=>C().createElement(ge.k.Provider,{value:(0,ge.S)(window)},C().createElement(C().Fragment,null,C().createElement(ve.Z,null),C().createElement(aH,null)));window.addEventListener("DOMContentLoaded",(()=>{const e=document.querySelector("#mailpoet_form_edit");e&&(he.use(he.createRootURLMiddleware(window.wpApiSettings.root)),he.use(he.createNonceMiddleware(window.wpApiSettings.nonce)),(0,W.KJ)("editor.MediaUpload","mailpoet/form-editor/replace-media-upload",(()=>ma)),(()=>{const e=window.mailpoet_custom_fields.map((e=>({...e,params:e.params||{}}))),t=dq(Fp.fontSizes,Fp.colors,Fp.gradients,e),n={...window.mailpoet_form_data},r=t(n.body);delete n.body;const o={dateTypes:window.mailpoet_date_types,dateFormats:window.mailpoet_date_formats,months:window.mailpoet_month_names};n.settings.segments=n.settings.segments?n.settings.segments:[];let i=null;try{i=JSON.parse(window.localStorage.getItem(`mailpoet_form_preview_settings${n.id}`))}catch(e){}let a=null;try{a=JSON.parse(window.localStorage.getItem("mailpoet_form_view_options"))}catch(e){a="disabled"}const l={editorHistory:[],editorHistoryOffset:0,formBlocks:r,formData:dX(n),dateSettingData:o,sidebarOpened:!0,formExports:window.mailpoet_form_exports,formErrors:QH(n,r),segments:window.mailpoet_form_segments,customFields:e,isFormSaving:!1,isCustomFieldSaving:!1,isCustomFieldCreating:!1,inserterPanel:null,notices:[],hasUnsavedChanges:!1,sidebar:{activeSidebar:"default",activeTab:"form",openedPanels:["basic-settings"]},previewSettings:i,fullscreenStatus:a,editorUrl:window.location.href,formEditorUrl:window.mailpoet_form_edit_url,previewPageUrl:window.mailpoet_form_preview_page,closeIconsUrl:window.mailpoet_close_icons_url,customFonts:window.mailpoet_custom_fonts,allWpPosts:window.mailpoet_all_wp_posts,allWpPages:window.mailpoet_all_wp_pages,allWpCategories:window.mailpoet_all_wp_categories,allWpTags:window.mailpoet_all_wp_tags,allWooCommerceProducts:window.mailpoet_woocommerce_products,allWooCommerceCategories:window.mailpoet_woocommerce_categories,allWooCommerceTags:window.mailpoet_woocommerce_tags,tutorialSeen:"1"===window.mailpoet_tutorial_seen,tutorialUrl:window.mailpoet_tutorial_url,user:{isAdministrator:window.mailpoet_is_administrator}},s={reducer:iV(l),actions:k,selectors:lV,controls:uX,resolvers:{}};(0,be.R9)("mailpoet-form-editor",s)})(),(()=>{const e=(0,be.Ys)("mailpoet-form-editor").getAllAvailableCustomFields();lG.supports.inserter=(0,be.Ys)("mailpoet-form-editor").isUserAdministrator();const t=[{slug:"obligatory",title:""}];t.push({slug:"design",title:KB.Z.I18n.t("layoutBlocksCategory")}),t.push({slug:"fields",title:KB.Z.I18n.t("fieldsBlocksCategory")}),t.push({slug:"custom-fields",title:KB.Z.I18n.t("customFieldsBlocksCategory")}),function(e){(0,be.WI)(cl).setCategories(e)}(t),Ol("mailpoet-form/divider",xq),Ol("mailpoet-form/email-input",Nq),Ol("mailpoet-form/submit-button",Dq),Ol("mailpoet-form/first-name-input",zq),Ol("mailpoet-form/last-name-input",Zq),Ol("mailpoet-form/segment-select",tG),Ol("mailpoet-form/html",lG),Ol("mailpoet-form/add-custom-field",fG),Ol(AG,LG),Ol(FG,HG),Ol(bK,wK),Ol(rK,iK),Ol(oX,aX),Array.isArray(e)&&e.forEach(lX)})(),Th(aJ,cJ),window.mailpoet_translations.forEach((e=>{var t;const n=JSON.parse(e);n&&null!==(t=n.locale_data)&&void 0!==t&&t.messages&&j(n.locale_data.messages)})),S().render(C().createElement(C().StrictMode,null,C().createElement(xJ,null)),e))}))},51991:function(e,t){var n;!function(){"use strict";var r=function(){function e(){}function t(e,t){for(var n=t.length,r=0;r<n;++r)o(e,t[r])}e.prototype=Object.create(null);var n={}.hasOwnProperty,r=/\s+/;function o(e,o){if(o){var i=typeof o;"string"===i?function(e,t){for(var n=t.split(r),o=n.length,i=0;i<o;++i)e[n[i]]=!0}(e,o):Array.isArray(o)?t(e,o):"object"===i?function(e,t){if(t.toString===Object.prototype.toString)for(var r in t)n.call(t,r)&&(e[r]=!!t[r]);else e[t.toString()]=!0}(e,o):"number"===i&&function(e,t){e[t]=!0}(e,o)}}return function(){for(var n=arguments.length,r=Array(n),o=0;o<n;o++)r[o]=arguments[o];var i=new e;t(i,r);var a=[];for(var l in i)i[l]&&a.push(l);return a.join(" ")}}();e.exports?(r.default=r,e.exports=r):void 0===(n=function(){return r}.apply(t,[]))||(e.exports=n)}()},42152:function(e){var t;t=function(){return function(){var e={134:function(e,t,n){"use strict";n.d(t,{default:function(){return b}});var r=n(279),o=n.n(r),i=n(370),a=n.n(i),l=n(817),s=n.n(l);function c(e){return(c="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 u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var d=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.resolveOptions(t),this.initSelection()}var t,n;return t=e,(n=[{key:"resolveOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.action=e.action,this.container=e.container,this.emitter=e.emitter,this.target=e.target,this.text=e.text,this.trigger=e.trigger,this.selectedText=""}},{key:"initSelection",value:function(){this.text?this.selectFake():this.target&&this.selectTarget()}},{key:"createFakeElement",value:function(){var e="rtl"===document.documentElement.getAttribute("dir");this.fakeElem=document.createElement("textarea"),this.fakeElem.style.fontSize="12pt",this.fakeElem.style.border="0",this.fakeElem.style.padding="0",this.fakeElem.style.margin="0",this.fakeElem.style.position="absolute",this.fakeElem.style[e?"right":"left"]="-9999px";var t=window.pageYOffset||document.documentElement.scrollTop;return this.fakeElem.style.top="".concat(t,"px"),this.fakeElem.setAttribute("readonly",""),this.fakeElem.value=this.text,this.fakeElem}},{key:"selectFake",value:function(){var e=this,t=this.createFakeElement();this.fakeHandlerCallback=function(){return e.removeFake()},this.fakeHandler=this.container.addEventListener("click",this.fakeHandlerCallback)||!0,this.container.appendChild(t),this.selectedText=s()(t),this.copyText(),this.removeFake()}},{key:"removeFake",value:function(){this.fakeHandler&&(this.container.removeEventListener("click",this.fakeHandlerCallback),this.fakeHandler=null,this.fakeHandlerCallback=null),this.fakeElem&&(this.container.removeChild(this.fakeElem),this.fakeElem=null)}},{key:"selectTarget",value:function(){this.selectedText=s()(this.target),this.copyText()}},{key:"copyText",value:function(){var e;try{e=document.execCommand(this.action)}catch(t){e=!1}this.handleResult(e)}},{key:"handleResult",value:function(e){this.emitter.emit(e?"success":"error",{action:this.action,text:this.selectedText,trigger:this.trigger,clearSelection:this.clearSelection.bind(this)})}},{key:"clearSelection",value:function(){this.trigger&&this.trigger.focus(),document.activeElement.blur(),window.getSelection().removeAllRanges()}},{key:"destroy",value:function(){this.removeFake()}},{key:"action",set:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"copy";if(this._action=e,"copy"!==this._action&&"cut"!==this._action)throw new Error('Invalid "action" value, use either "copy" or "cut"')},get:function(){return this._action}},{key:"target",set:function(e){if(void 0!==e){if(!e||"object"!==c(e)||1!==e.nodeType)throw new Error('Invalid "target" value, use a valid Element');if("copy"===this.action&&e.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if("cut"===this.action&&(e.hasAttribute("readonly")||e.hasAttribute("disabled")))throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes');this._target=e}},get:function(){return this._target}}])&&u(t.prototype,n),e}();function p(e){return(p="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 m(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function f(e,t){return(f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function h(e,t){return!t||"object"!==p(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function g(e){return(g=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function v(e,t){var n="data-clipboard-".concat(e);if(t.hasAttribute(n))return t.getAttribute(n)}var b=function(e){!function(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&&f(e,t)}(s,e);var t,n,r,o,i,l=(o=s,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=g(o);if(i){var n=g(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return h(this,e)});function s(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),(n=l.call(this)).resolveOptions(t),n.listenClick(e),n}return t=s,r=[{key:"isSupported",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["copy","cut"],t="string"==typeof e?[e]:e,n=!!document.queryCommandSupported;return t.forEach((function(e){n=n&&!!document.queryCommandSupported(e)})),n}}],(n=[{key:"resolveOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.action="function"==typeof e.action?e.action:this.defaultAction,this.target="function"==typeof e.target?e.target:this.defaultTarget,this.text="function"==typeof e.text?e.text:this.defaultText,this.container="object"===p(e.container)?e.container:document.body}},{key:"listenClick",value:function(e){var t=this;this.listener=a()(e,"click",(function(e){return t.onClick(e)}))}},{key:"onClick",value:function(e){var t=e.delegateTarget||e.currentTarget;this.clipboardAction&&(this.clipboardAction=null),this.clipboardAction=new d({action:this.action(t),target:this.target(t),text:this.text(t),container:this.container,trigger:t,emitter:this})}},{key:"defaultAction",value:function(e){return v("action",e)}},{key:"defaultTarget",value:function(e){var t=v("target",e);if(t)return document.querySelector(t)}},{key:"defaultText",value:function(e){return v("text",e)}},{key:"destroy",value:function(){this.listener.destroy(),this.clipboardAction&&(this.clipboardAction.destroy(),this.clipboardAction=null)}}])&&m(t.prototype,n),r&&m(t,r),s}(o())},828:function(e){if("undefined"!=typeof Element&&!Element.prototype.matches){var t=Element.prototype;t.matches=t.matchesSelector||t.mozMatchesSelector||t.msMatchesSelector||t.oMatchesSelector||t.webkitMatchesSelector}e.exports=function(e,t){for(;e&&9!==e.nodeType;){if("function"==typeof e.matches&&e.matches(t))return e;e=e.parentNode}}},438:function(e,t,n){var r=n(828);function o(e,t,n,r,o){var a=i.apply(this,arguments);return e.addEventListener(n,a,o),{destroy:function(){e.removeEventListener(n,a,o)}}}function i(e,t,n,o){return function(n){n.delegateTarget=r(n.target,t),n.delegateTarget&&o.call(e,n)}}e.exports=function(e,t,n,r,i){return"function"==typeof e.addEventListener?o.apply(null,arguments):"function"==typeof n?o.bind(null,document).apply(null,arguments):("string"==typeof e&&(e=document.querySelectorAll(e)),Array.prototype.map.call(e,(function(e){return o(e,t,n,r,i)})))}},879:function(e,t){t.node=function(e){return void 0!==e&&e instanceof HTMLElement&&1===e.nodeType},t.nodeList=function(e){var n=Object.prototype.toString.call(e);return void 0!==e&&("[object NodeList]"===n||"[object HTMLCollection]"===n)&&"length"in e&&(0===e.length||t.node(e[0]))},t.string=function(e){return"string"==typeof e||e instanceof String},t.fn=function(e){return"[object Function]"===Object.prototype.toString.call(e)}},370:function(e,t,n){var r=n(879),o=n(438);e.exports=function(e,t,n){if(!e&&!t&&!n)throw new Error("Missing required arguments");if(!r.string(t))throw new TypeError("Second argument must be a String");if(!r.fn(n))throw new TypeError("Third argument must be a Function");if(r.node(e))return function(e,t,n){return e.addEventListener(t,n),{destroy:function(){e.removeEventListener(t,n)}}}(e,t,n);if(r.nodeList(e))return function(e,t,n){return Array.prototype.forEach.call(e,(function(e){e.addEventListener(t,n)})),{destroy:function(){Array.prototype.forEach.call(e,(function(e){e.removeEventListener(t,n)}))}}}(e,t,n);if(r.string(e))return function(e,t,n){return o(document.body,e,t,n)}(e,t,n);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}},817:function(e){e.exports=function(e){var t;if("SELECT"===e.nodeName)e.focus(),t=e.value;else if("INPUT"===e.nodeName||"TEXTAREA"===e.nodeName){var n=e.hasAttribute("readonly");n||e.setAttribute("readonly",""),e.select(),e.setSelectionRange(0,e.value.length),n||e.removeAttribute("readonly"),t=e.value}else{e.hasAttribute("contenteditable")&&e.focus();var r=window.getSelection(),o=document.createRange();o.selectNodeContents(e),r.removeAllRanges(),r.addRange(o),t=r.toString()}return t}},279:function(e){function t(){}t.prototype={on:function(e,t,n){var r=this.e||(this.e={});return(r[e]||(r[e]=[])).push({fn:t,ctx:n}),this},once:function(e,t,n){var r=this;function o(){r.off(e,o),t.apply(n,arguments)}return o._=t,this.on(e,o,n)},emit:function(e){for(var t=[].slice.call(arguments,1),n=((this.e||(this.e={}))[e]||[]).slice(),r=0,o=n.length;r<o;r++)n[r].fn.apply(n[r].ctx,t);return this},off:function(e,t){var n=this.e||(this.e={}),r=n[e],o=[];if(r&&t)for(var i=0,a=r.length;i<a;i++)r[i].fn!==t&&r[i].fn._!==t&&o.push(r[i]);return o.length?n[e]=o:delete n[e],this}},e.exports=t,e.exports.TinyEmitter=t}},t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={exports:{}};return e[r](o,o.exports,n),o.exports}return n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n(134)}().default},e.exports=t()},4631:function(e){e.exports=function(){"use strict";var e=navigator.userAgent,t=navigator.platform,n=/gecko\/\d/i.test(e),r=/MSIE \d/.test(e),o=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(e),i=/Edge\/(\d+)/.exec(e),a=r||o||i,l=a&&(r?document.documentMode||6:+(i||o)[1]),s=!i&&/WebKit\//.test(e),c=s&&/Qt\/\d+\.\d+/.test(e),u=!i&&/Chrome\//.test(e),d=/Opera\//.test(e),p=/Apple Computer/.test(navigator.vendor),m=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(e),f=/PhantomJS/.test(e),h=p&&(/Mobile\/\w+/.test(e)||navigator.maxTouchPoints>2),g=/Android/.test(e),v=h||g||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(e),b=h||/Mac/.test(t),y=/\bCrOS\b/.test(e),w=/win/i.test(t),k=d&&e.match(/Version\/(\d*\.\d*)/);k&&(k=Number(k[1])),k&&k>=15&&(d=!1,s=!0);var E=b&&(c||d&&(null==k||k<12.11)),_=n||a&&l>=9;function C(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var x,S=function(e,t){var n=e.className,r=C(t).exec(n);if(r){var o=n.slice(r.index+r[0].length);e.className=n.slice(0,r.index)+(o?r[1]+o:"")}};function I(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function T(e,t){return I(e).appendChild(t)}function N(e,t,n,r){var o=document.createElement(e);if(n&&(o.className=n),r&&(o.style.cssText=r),"string"==typeof t)o.appendChild(document.createTextNode(t));else if(t)for(var i=0;i<t.length;++i)o.appendChild(t[i]);return o}function A(e,t,n,r){var o=N(e,t,n,r);return o.setAttribute("role","presentation"),o}function R(e,t){if(3==t.nodeType&&(t=t.parentNode),e.contains)return e.contains(t);do{if(11==t.nodeType&&(t=t.host),t==e)return!0}while(t=t.parentNode)}function L(){var e;try{e=document.activeElement}catch(t){e=document.body||null}for(;e&&e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}function P(e,t){var n=e.className;C(t).test(n)||(e.className+=(n?" ":"")+t)}function O(e,t){for(var n=e.split(" "),r=0;r<n.length;r++)n[r]&&!C(n[r]).test(t)&&(t+=" "+n[r]);return t}x=document.createRange?function(e,t,n,r){var o=document.createRange();return o.setEnd(r||e,n),o.setStart(e,t),o}:function(e,t,n){var r=document.body.createTextRange();try{r.moveToElementText(e.parentNode)}catch(e){return r}return r.collapse(!0),r.moveEnd("character",n),r.moveStart("character",t),r};var D=function(e){e.select()};function M(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function B(e,t,n){for(var r in t||(t={}),e)!e.hasOwnProperty(r)||!1===n&&t.hasOwnProperty(r)||(t[r]=e[r]);return t}function F(e,t,n,r,o){null==t&&-1==(t=e.search(/[^\s\u00a0]/))&&(t=e.length);for(var i=r||0,a=o||0;;){var l=e.indexOf("\t",i);if(l<0||l>=t)return a+(t-i);a+=l-i,a+=n-a%n,i=l+1}}h?D=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:a&&(D=function(e){try{e.select()}catch(e){}});var z=function(){this.id=null,this.f=null,this.time=0,this.handler=M(this.onTimeout,this)};function H(e,t){for(var n=0;n<e.length;++n)if(e[n]==t)return n;return-1}z.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},z.prototype.set=function(e,t){this.f=t;var n=+new Date+e;(!this.id||n<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=n)};var V={toString:function(){return"CodeMirror.Pass"}},W={scroll:!1},Z={origin:"*mouse"},j={origin:"+move"};function U(e,t,n){for(var r=0,o=0;;){var i=e.indexOf("\t",r);-1==i&&(i=e.length);var a=i-r;if(i==e.length||o+a>=t)return r+Math.min(a,t-o);if(o+=i-r,r=i+1,(o+=n-o%n)>=t)return r}}var $=[""];function q(e){for(;$.length<=e;)$.push(G($)+" ");return $[e]}function G(e){return e[e.length-1]}function K(e,t){for(var n=[],r=0;r<e.length;r++)n[r]=t(e[r],r);return n}function Y(){}function X(e,t){var n;return Object.create?n=Object.create(e):(Y.prototype=e,n=new Y),t&&B(t,n),n}var J=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function Q(e){return/\w/.test(e)||e>""&&(e.toUpperCase()!=e.toLowerCase()||J.test(e))}function ee(e,t){return t?!!(t.source.indexOf("\\w")>-1&&Q(e))||t.test(e):Q(e)}function te(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var ne=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function re(e){return e.charCodeAt(0)>=768&&ne.test(e)}function oe(e,t,n){for(;(n<0?t>0:t<e.length)&&re(e.charAt(t));)t+=n;return t}function ie(e,t,n){for(var r=t>n?-1:1;;){if(t==n)return t;var o=(t+n)/2,i=r<0?Math.ceil(o):Math.floor(o);if(i==t)return e(i)?t:n;e(i)?n=i:t=i+r}}var ae=null;function le(e,t,n){var r;ae=null;for(var o=0;o<e.length;++o){var i=e[o];if(i.from<t&&i.to>t)return o;i.to==t&&(i.from!=i.to&&"before"==n?r=o:ae=o),i.from==t&&(i.from!=i.to&&"before"!=n?r=o:ae=o)}return null!=r?r:ae}var se=function(){var e=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,t=/[stwN]/,n=/[LRr]/,r=/[Lb1n]/,o=/[1n]/;function i(e,t,n){this.level=e,this.from=t,this.to=n}return function(a,l){var s,c="ltr"==l?"L":"R";if(0==a.length||"ltr"==l&&!e.test(a))return!1;for(var u=a.length,d=[],p=0;p<u;++p)d.push((s=a.charCodeAt(p))<=247?"bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN".charAt(s):1424<=s&&s<=1524?"R":1536<=s&&s<=1785?"nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111".charAt(s-1536):1774<=s&&s<=2220?"r":8192<=s&&s<=8203?"w":8204==s?"b":"L");for(var m=0,f=c;m<u;++m){var h=d[m];"m"==h?d[m]=f:f=h}for(var g=0,v=c;g<u;++g){var b=d[g];"1"==b&&"r"==v?d[g]="n":n.test(b)&&(v=b,"r"==b&&(d[g]="R"))}for(var y=1,w=d[0];y<u-1;++y){var k=d[y];"+"==k&&"1"==w&&"1"==d[y+1]?d[y]="1":","!=k||w!=d[y+1]||"1"!=w&&"n"!=w||(d[y]=w),w=k}for(var E=0;E<u;++E){var _=d[E];if(","==_)d[E]="N";else if("%"==_){var C=void 0;for(C=E+1;C<u&&"%"==d[C];++C);for(var x=E&&"!"==d[E-1]||C<u&&"1"==d[C]?"1":"N",S=E;S<C;++S)d[S]=x;E=C-1}}for(var I=0,T=c;I<u;++I){var N=d[I];"L"==T&&"1"==N?d[I]="L":n.test(N)&&(T=N)}for(var A=0;A<u;++A)if(t.test(d[A])){var R=void 0;for(R=A+1;R<u&&t.test(d[R]);++R);for(var L="L"==(A?d[A-1]:c),P=L==("L"==(R<u?d[R]:c))?L?"L":"R":c,O=A;O<R;++O)d[O]=P;A=R-1}for(var D,M=[],B=0;B<u;)if(r.test(d[B])){var F=B;for(++B;B<u&&r.test(d[B]);++B);M.push(new i(0,F,B))}else{var z=B,H=M.length,V="rtl"==l?1:0;for(++B;B<u&&"L"!=d[B];++B);for(var W=z;W<B;)if(o.test(d[W])){z<W&&(M.splice(H,0,new i(1,z,W)),H+=V);var Z=W;for(++W;W<B&&o.test(d[W]);++W);M.splice(H,0,new i(2,Z,W)),H+=V,z=W}else++W;z<B&&M.splice(H,0,new i(1,z,B))}return"ltr"==l&&(1==M[0].level&&(D=a.match(/^\s+/))&&(M[0].from=D[0].length,M.unshift(new i(0,0,D[0].length))),1==G(M).level&&(D=a.match(/\s+$/))&&(G(M).to-=D[0].length,M.push(new i(0,u-D[0].length,u)))),"rtl"==l?M.reverse():M}}();function ce(e,t){var n=e.order;return null==n&&(n=e.order=se(e.text,t)),n}var ue=[],de=function(e,t,n){if(e.addEventListener)e.addEventListener(t,n,!1);else if(e.attachEvent)e.attachEvent("on"+t,n);else{var r=e._handlers||(e._handlers={});r[t]=(r[t]||ue).concat(n)}};function pe(e,t){return e._handlers&&e._handlers[t]||ue}function me(e,t,n){if(e.removeEventListener)e.removeEventListener(t,n,!1);else if(e.detachEvent)e.detachEvent("on"+t,n);else{var r=e._handlers,o=r&&r[t];if(o){var i=H(o,n);i>-1&&(r[t]=o.slice(0,i).concat(o.slice(i+1)))}}}function fe(e,t){var n=pe(e,t);if(n.length)for(var r=Array.prototype.slice.call(arguments,2),o=0;o<n.length;++o)n[o].apply(null,r)}function he(e,t,n){return"string"==typeof t&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),fe(e,n||t.type,e,t),ke(t)||t.codemirrorIgnore}function ge(e){var t=e._handlers&&e._handlers.cursorActivity;if(t)for(var n=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),r=0;r<t.length;++r)-1==H(n,t[r])&&n.push(t[r])}function ve(e,t){return pe(e,t).length>0}function be(e){e.prototype.on=function(e,t){de(this,e,t)},e.prototype.off=function(e,t){me(this,e,t)}}function ye(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function we(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function ke(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function Ee(e){ye(e),we(e)}function _e(e){return e.target||e.srcElement}function Ce(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),b&&e.ctrlKey&&1==t&&(t=3),t}var xe,Se,Ie=function(){if(a&&l<9)return!1;var e=N("div");return"draggable"in e||"dragDrop"in e}();function Te(e){if(null==xe){var t=N("span","");T(e,N("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(xe=t.offsetWidth<=1&&t.offsetHeight>2&&!(a&&l<8))}var n=xe?N("span",""):N("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}function Ne(e){if(null!=Se)return Se;var t=T(e,document.createTextNode("AخA")),n=x(t,0,1).getBoundingClientRect(),r=x(t,1,2).getBoundingClientRect();return I(e),!(!n||n.left==n.right)&&(Se=r.right-n.right<3)}var Ae,Re=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,n=[],r=e.length;t<=r;){var o=e.indexOf("\n",t);-1==o&&(o=e.length);var i=e.slice(t,"\r"==e.charAt(o-1)?o-1:o),a=i.indexOf("\r");-1!=a?(n.push(i.slice(0,a)),t+=a+1):(n.push(i),t=o+1)}return n}:function(e){return e.split(/\r\n?|\n/)},Le=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(e){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(e){}return!(!t||t.parentElement()!=e)&&0!=t.compareEndPoints("StartToEnd",t)},Pe="oncopy"in(Ae=N("div"))||(Ae.setAttribute("oncopy","return;"),"function"==typeof Ae.oncopy),Oe=null;var De={},Me={};function Be(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),De[e]=t}function Fe(e){if("string"==typeof e&&Me.hasOwnProperty(e))e=Me[e];else if(e&&"string"==typeof e.name&&Me.hasOwnProperty(e.name)){var t=Me[e.name];"string"==typeof t&&(t={name:t}),(e=X(t,e)).name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Fe("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Fe("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function ze(e,t){t=Fe(t);var n=De[t.name];if(!n)return ze(e,"text/plain");var r=n(e,t);if(He.hasOwnProperty(t.name)){var o=He[t.name];for(var i in o)o.hasOwnProperty(i)&&(r.hasOwnProperty(i)&&(r["_"+i]=r[i]),r[i]=o[i])}if(r.name=t.name,t.helperType&&(r.helperType=t.helperType),t.modeProps)for(var a in t.modeProps)r[a]=t.modeProps[a];return r}var He={};function Ve(e,t){B(t,He.hasOwnProperty(e)?He[e]:He[e]={})}function We(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var o=t[r];o instanceof Array&&(o=o.concat([])),n[r]=o}return n}function Ze(e,t){for(var n;e.innerMode&&(n=e.innerMode(t))&&n.mode!=e;)t=n.state,e=n.mode;return n||{mode:e,state:t}}function je(e,t,n){return!e.startState||e.startState(t,n)}var Ue=function(e,t,n){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};function $e(e,t){if((t-=e.first)<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var n=e;!n.lines;)for(var r=0;;++r){var o=n.children[r],i=o.chunkSize();if(t<i){n=o;break}t-=i}return n.lines[t]}function qe(e,t,n){var r=[],o=t.line;return e.iter(t.line,n.line+1,(function(e){var i=e.text;o==n.line&&(i=i.slice(0,n.ch)),o==t.line&&(i=i.slice(t.ch)),r.push(i),++o})),r}function Ge(e,t,n){var r=[];return e.iter(t,n,(function(e){r.push(e.text)})),r}function Ke(e,t){var n=t-e.height;if(n)for(var r=e;r;r=r.parent)r.height+=n}function Ye(e){if(null==e.parent)return null;for(var t=e.parent,n=H(t.lines,e),r=t.parent;r;t=r,r=r.parent)for(var o=0;r.children[o]!=t;++o)n+=r.children[o].chunkSize();return n+t.first}function Xe(e,t){var n=e.first;e:do{for(var r=0;r<e.children.length;++r){var o=e.children[r],i=o.height;if(t<i){e=o;continue e}t-=i,n+=o.chunkSize()}return n}while(!e.lines);for(var a=0;a<e.lines.length;++a){var l=e.lines[a].height;if(t<l)break;t-=l}return n+a}function Je(e,t){return t>=e.first&&t<e.first+e.size}function Qe(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function et(e,t,n){if(void 0===n&&(n=null),!(this instanceof et))return new et(e,t,n);this.line=e,this.ch=t,this.sticky=n}function tt(e,t){return e.line-t.line||e.ch-t.ch}function nt(e,t){return e.sticky==t.sticky&&0==tt(e,t)}function rt(e){return et(e.line,e.ch)}function ot(e,t){return tt(e,t)<0?t:e}function it(e,t){return tt(e,t)<0?e:t}function at(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function lt(e,t){if(t.line<e.first)return et(e.first,0);var n=e.first+e.size-1;return t.line>n?et(n,$e(e,n).text.length):function(e,t){var n=e.ch;return null==n||n>t?et(e.line,t):n<0?et(e.line,0):e}(t,$e(e,t.line).text.length)}function st(e,t){for(var n=[],r=0;r<t.length;r++)n[r]=lt(e,t[r]);return n}Ue.prototype.eol=function(){return this.pos>=this.string.length},Ue.prototype.sol=function(){return this.pos==this.lineStart},Ue.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Ue.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Ue.prototype.eat=function(e){var t=this.string.charAt(this.pos);if("string"==typeof e?t==e:t&&(e.test?e.test(t):e(t)))return++this.pos,t},Ue.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},Ue.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Ue.prototype.skipToEnd=function(){this.pos=this.string.length},Ue.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},Ue.prototype.backUp=function(e){this.pos-=e},Ue.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=F(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?F(this.string,this.lineStart,this.tabSize):0)},Ue.prototype.indentation=function(){return F(this.string,null,this.tabSize)-(this.lineStart?F(this.string,this.lineStart,this.tabSize):0)},Ue.prototype.match=function(e,t,n){if("string"!=typeof e){var r=this.string.slice(this.pos).match(e);return r&&r.index>0?null:(r&&!1!==t&&(this.pos+=r[0].length),r)}var o=function(e){return n?e.toLowerCase():e};if(o(this.string.substr(this.pos,e.length))==o(e))return!1!==t&&(this.pos+=e.length),!0},Ue.prototype.current=function(){return this.string.slice(this.start,this.pos)},Ue.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},Ue.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},Ue.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var ct=function(e,t){this.state=e,this.lookAhead=t},ut=function(e,t,n,r){this.state=t,this.doc=e,this.line=n,this.maxLookAhead=r||0,this.baseTokens=null,this.baseTokenPos=1};function dt(e,t,n,r){var o=[e.state.modeGen],i={};wt(e,t.text,e.doc.mode,n,(function(e,t){return o.push(e,t)}),i,r);for(var a=n.state,l=function(r){n.baseTokens=o;var l=e.state.overlays[r],s=1,c=0;n.state=!0,wt(e,t.text,l.mode,n,(function(e,t){for(var n=s;c<e;){var r=o[s];r>e&&o.splice(s,1,e,o[s+1],r),s+=2,c=Math.min(e,r)}if(t)if(l.opaque)o.splice(n,s-n,e,"overlay "+t),s=n+2;else for(;n<s;n+=2){var i=o[n+1];o[n+1]=(i?i+" ":"")+"overlay "+t}}),i),n.state=a,n.baseTokens=null,n.baseTokenPos=1},s=0;s<e.state.overlays.length;++s)l(s);return{styles:o,classes:i.bgClass||i.textClass?i:null}}function pt(e,t,n){if(!t.styles||t.styles[0]!=e.state.modeGen){var r=mt(e,Ye(t)),o=t.text.length>e.options.maxHighlightLength&&We(e.doc.mode,r.state),i=dt(e,t,r);o&&(r.state=o),t.stateAfter=r.save(!o),t.styles=i.styles,i.classes?t.styleClasses=i.classes:t.styleClasses&&(t.styleClasses=null),n===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function mt(e,t,n){var r=e.doc,o=e.display;if(!r.mode.startState)return new ut(r,!0,t);var i=function(e,t,n){for(var r,o,i=e.doc,a=n?-1:t-(e.doc.mode.innerMode?1e3:100),l=t;l>a;--l){if(l<=i.first)return i.first;var s=$e(i,l-1),c=s.stateAfter;if(c&&(!n||l+(c instanceof ct?c.lookAhead:0)<=i.modeFrontier))return l;var u=F(s.text,null,e.options.tabSize);(null==o||r>u)&&(o=l-1,r=u)}return o}(e,t,n),a=i>r.first&&$e(r,i-1).stateAfter,l=a?ut.fromSaved(r,a,i):new ut(r,je(r.mode),i);return r.iter(i,t,(function(n){ft(e,n.text,l);var r=l.line;n.stateAfter=r==t-1||r%5==0||r>=o.viewFrom&&r<o.viewTo?l.save():null,l.nextLine()})),n&&(r.modeFrontier=l.line),l}function ft(e,t,n,r){var o=e.doc.mode,i=new Ue(t,e.options.tabSize,n);for(i.start=i.pos=r||0,""==t&&ht(o,n.state);!i.eol();)gt(o,i,n.state),i.start=i.pos}function ht(e,t){if(e.blankLine)return e.blankLine(t);if(e.innerMode){var n=Ze(e,t);return n.mode.blankLine?n.mode.blankLine(n.state):void 0}}function gt(e,t,n,r){for(var o=0;o<10;o++){r&&(r[0]=Ze(e,n).mode);var i=e.token(t,n);if(t.pos>t.start)return i}throw new Error("Mode "+e.name+" failed to advance stream.")}ut.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},ut.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},ut.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},ut.fromSaved=function(e,t,n){return t instanceof ct?new ut(e,We(e.mode,t.state),n,t.lookAhead):new ut(e,We(e.mode,t),n)},ut.prototype.save=function(e){var t=!1!==e?We(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new ct(t,this.maxLookAhead):t};var vt=function(e,t,n){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=n};function bt(e,t,n,r){var o,i,a=e.doc,l=a.mode,s=$e(a,(t=lt(a,t)).line),c=mt(e,t.line,n),u=new Ue(s.text,e.options.tabSize,c);for(r&&(i=[]);(r||u.pos<t.ch)&&!u.eol();)u.start=u.pos,o=gt(l,u,c.state),r&&i.push(new vt(u,o,We(a.mode,c.state)));return r?i:new vt(u,o,c.state)}function yt(e,t){if(e)for(;;){var n=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!n)break;e=e.slice(0,n.index)+e.slice(n.index+n[0].length);var r=n[1]?"bgClass":"textClass";null==t[r]?t[r]=n[2]:new RegExp("(?:^|\\s)"+n[2]+"(?:$|\\s)").test(t[r])||(t[r]+=" "+n[2])}return e}function wt(e,t,n,r,o,i,a){var l=n.flattenSpans;null==l&&(l=e.options.flattenSpans);var s,c=0,u=null,d=new Ue(t,e.options.tabSize,r),p=e.options.addModeClass&&[null];for(""==t&&yt(ht(n,r.state),i);!d.eol();){if(d.pos>e.options.maxHighlightLength?(l=!1,a&&ft(e,t,r,d.pos),d.pos=t.length,s=null):s=yt(gt(n,d,r.state,p),i),p){var m=p[0].name;m&&(s="m-"+(s?m+" "+s:m))}if(!l||u!=s){for(;c<d.start;)o(c=Math.min(d.start,c+5e3),u);u=s}d.start=d.pos}for(;c<d.pos;){var f=Math.min(d.pos,c+5e3);o(f,u),c=f}}var kt=!1,Et=!1;function _t(e,t,n){this.marker=e,this.from=t,this.to=n}function Ct(e,t){if(e)for(var n=0;n<e.length;++n){var r=e[n];if(r.marker==t)return r}}function xt(e,t){for(var n,r=0;r<e.length;++r)e[r]!=t&&(n||(n=[])).push(e[r]);return n}function St(e,t){if(t.full)return null;var n=Je(e,t.from.line)&&$e(e,t.from.line).markedSpans,r=Je(e,t.to.line)&&$e(e,t.to.line).markedSpans;if(!n&&!r)return null;var o=t.from.ch,i=t.to.ch,a=0==tt(t.from,t.to),l=function(e,t,n){var r;if(e)for(var o=0;o<e.length;++o){var i=e[o],a=i.marker;if(null==i.from||(a.inclusiveLeft?i.from<=t:i.from<t)||i.from==t&&"bookmark"==a.type&&(!n||!i.marker.insertLeft)){var l=null==i.to||(a.inclusiveRight?i.to>=t:i.to>t);(r||(r=[])).push(new _t(a,i.from,l?null:i.to))}}return r}(n,o,a),s=function(e,t,n){var r;if(e)for(var o=0;o<e.length;++o){var i=e[o],a=i.marker;if(null==i.to||(a.inclusiveRight?i.to>=t:i.to>t)||i.from==t&&"bookmark"==a.type&&(!n||i.marker.insertLeft)){var l=null==i.from||(a.inclusiveLeft?i.from<=t:i.from<t);(r||(r=[])).push(new _t(a,l?null:i.from-t,null==i.to?null:i.to-t))}}return r}(r,i,a),c=1==t.text.length,u=G(t.text).length+(c?o:0);if(l)for(var d=0;d<l.length;++d){var p=l[d];if(null==p.to){var m=Ct(s,p.marker);m?c&&(p.to=null==m.to?null:m.to+u):p.to=o}}if(s)for(var f=0;f<s.length;++f){var h=s[f];null!=h.to&&(h.to+=u),null==h.from?Ct(l,h.marker)||(h.from=u,c&&(l||(l=[])).push(h)):(h.from+=u,c&&(l||(l=[])).push(h))}l&&(l=It(l)),s&&s!=l&&(s=It(s));var g=[l];if(!c){var v,b=t.text.length-2;if(b>0&&l)for(var y=0;y<l.length;++y)null==l[y].to&&(v||(v=[])).push(new _t(l[y].marker,null,null));for(var w=0;w<b;++w)g.push(v);g.push(s)}return g}function It(e){for(var t=0;t<e.length;++t){var n=e[t];null!=n.from&&n.from==n.to&&!1!==n.marker.clearWhenEmpty&&e.splice(t--,1)}return e.length?e:null}function Tt(e){var t=e.markedSpans;if(t){for(var n=0;n<t.length;++n)t[n].marker.detachLine(e);e.markedSpans=null}}function Nt(e,t){if(t){for(var n=0;n<t.length;++n)t[n].marker.attachLine(e);e.markedSpans=t}}function At(e){return e.inclusiveLeft?-1:0}function Rt(e){return e.inclusiveRight?1:0}function Lt(e,t){var n=e.lines.length-t.lines.length;if(0!=n)return n;var r=e.find(),o=t.find(),i=tt(r.from,o.from)||At(e)-At(t);return i?-i:tt(r.to,o.to)||Rt(e)-Rt(t)||t.id-e.id}function Pt(e,t){var n,r=Et&&e.markedSpans;if(r)for(var o=void 0,i=0;i<r.length;++i)(o=r[i]).marker.collapsed&&null==(t?o.from:o.to)&&(!n||Lt(n,o.marker)<0)&&(n=o.marker);return n}function Ot(e){return Pt(e,!0)}function Dt(e){return Pt(e,!1)}function Mt(e,t){var n,r=Et&&e.markedSpans;if(r)for(var o=0;o<r.length;++o){var i=r[o];i.marker.collapsed&&(null==i.from||i.from<t)&&(null==i.to||i.to>t)&&(!n||Lt(n,i.marker)<0)&&(n=i.marker)}return n}function Bt(e,t,n,r,o){var i=$e(e,t),a=Et&&i.markedSpans;if(a)for(var l=0;l<a.length;++l){var s=a[l];if(s.marker.collapsed){var c=s.marker.find(0),u=tt(c.from,n)||At(s.marker)-At(o),d=tt(c.to,r)||Rt(s.marker)-Rt(o);if(!(u>=0&&d<=0||u<=0&&d>=0)&&(u<=0&&(s.marker.inclusiveRight&&o.inclusiveLeft?tt(c.to,n)>=0:tt(c.to,n)>0)||u>=0&&(s.marker.inclusiveRight&&o.inclusiveLeft?tt(c.from,r)<=0:tt(c.from,r)<0)))return!0}}}function Ft(e){for(var t;t=Ot(e);)e=t.find(-1,!0).line;return e}function zt(e,t){var n=$e(e,t),r=Ft(n);return n==r?t:Ye(r)}function Ht(e,t){if(t>e.lastLine())return t;var n,r=$e(e,t);if(!Vt(e,r))return t;for(;n=Dt(r);)r=n.find(1,!0).line;return Ye(r)+1}function Vt(e,t){var n=Et&&t.markedSpans;if(n)for(var r=void 0,o=0;o<n.length;++o)if((r=n[o]).marker.collapsed){if(null==r.from)return!0;if(!r.marker.widgetNode&&0==r.from&&r.marker.inclusiveLeft&&Wt(e,t,r))return!0}}function Wt(e,t,n){if(null==n.to){var r=n.marker.find(1,!0);return Wt(e,r.line,Ct(r.line.markedSpans,n.marker))}if(n.marker.inclusiveRight&&n.to==t.text.length)return!0;for(var o=void 0,i=0;i<t.markedSpans.length;++i)if((o=t.markedSpans[i]).marker.collapsed&&!o.marker.widgetNode&&o.from==n.to&&(null==o.to||o.to!=n.from)&&(o.marker.inclusiveLeft||n.marker.inclusiveRight)&&Wt(e,t,o))return!0}function Zt(e){for(var t=0,n=(e=Ft(e)).parent,r=0;r<n.lines.length;++r){var o=n.lines[r];if(o==e)break;t+=o.height}for(var i=n.parent;i;i=(n=i).parent)for(var a=0;a<i.children.length;++a){var l=i.children[a];if(l==n)break;t+=l.height}return t}function jt(e){if(0==e.height)return 0;for(var t,n=e.text.length,r=e;t=Ot(r);){var o=t.find(0,!0);r=o.from.line,n+=o.from.ch-o.to.ch}for(r=e;t=Dt(r);){var i=t.find(0,!0);n-=r.text.length-i.from.ch,n+=(r=i.to.line).text.length-i.to.ch}return n}function Ut(e){var t=e.display,n=e.doc;t.maxLine=$e(n,n.first),t.maxLineLength=jt(t.maxLine),t.maxLineChanged=!0,n.iter((function(e){var n=jt(e);n>t.maxLineLength&&(t.maxLineLength=n,t.maxLine=e)}))}var $t=function(e,t,n){this.text=e,Nt(this,t),this.height=n?n(this):1};function qt(e){e.parent=null,Tt(e)}$t.prototype.lineNo=function(){return Ye(this)},be($t);var Gt={},Kt={};function Yt(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?Kt:Gt;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function Xt(e,t){var n=A("span",null,null,s?"padding-right: .1px":null),r={pre:A("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var o=0;o<=(t.rest?t.rest.length:0);o++){var i=o?t.rest[o-1]:t.line,a=void 0;r.pos=0,r.addToken=Qt,Ne(e.display.measure)&&(a=ce(i,e.doc.direction))&&(r.addToken=en(r.addToken,a)),r.map=[],nn(i,r,pt(e,i,t!=e.display.externalMeasured&&Ye(i))),i.styleClasses&&(i.styleClasses.bgClass&&(r.bgClass=O(i.styleClasses.bgClass,r.bgClass||"")),i.styleClasses.textClass&&(r.textClass=O(i.styleClasses.textClass,r.textClass||""))),0==r.map.length&&r.map.push(0,0,r.content.appendChild(Te(e.display.measure))),0==o?(t.measure.map=r.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(r.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(s){var l=r.content.lastChild;(/\bcm-tab\b/.test(l.className)||l.querySelector&&l.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return fe(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=O(r.pre.className,r.textClass||"")),r}function Jt(e){var t=N("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function Qt(e,t,n,r,o,i,s){if(t){var c,u=e.splitSpaces?function(e,t){if(e.length>1&&!/ /.test(e))return e;for(var n=t,r="",o=0;o<e.length;o++){var i=e.charAt(o);" "!=i||!n||o!=e.length-1&&32!=e.charCodeAt(o+1)||(i=" "),r+=i,n=" "==i}return r}(t,e.trailingSpace):t,d=e.cm.state.specialChars,p=!1;if(d.test(t)){c=document.createDocumentFragment();for(var m=0;;){d.lastIndex=m;var f=d.exec(t),h=f?f.index-m:t.length-m;if(h){var g=document.createTextNode(u.slice(m,m+h));a&&l<9?c.appendChild(N("span",[g])):c.appendChild(g),e.map.push(e.pos,e.pos+h,g),e.col+=h,e.pos+=h}if(!f)break;m+=h+1;var v=void 0;if("\t"==f[0]){var b=e.cm.options.tabSize,y=b-e.col%b;(v=c.appendChild(N("span",q(y),"cm-tab"))).setAttribute("role","presentation"),v.setAttribute("cm-text","\t"),e.col+=y}else"\r"==f[0]||"\n"==f[0]?((v=c.appendChild(N("span","\r"==f[0]?"␍":"","cm-invalidchar"))).setAttribute("cm-text",f[0]),e.col+=1):((v=e.cm.options.specialCharPlaceholder(f[0])).setAttribute("cm-text",f[0]),a&&l<9?c.appendChild(N("span",[v])):c.appendChild(v),e.col+=1);e.map.push(e.pos,e.pos+1,v),e.pos++}}else e.col+=t.length,c=document.createTextNode(u),e.map.push(e.pos,e.pos+t.length,c),a&&l<9&&(p=!0),e.pos+=t.length;if(e.trailingSpace=32==u.charCodeAt(t.length-1),n||r||o||p||i||s){var w=n||"";r&&(w+=r),o&&(w+=o);var k=N("span",[c],w,i);if(s)for(var E in s)s.hasOwnProperty(E)&&"style"!=E&&"class"!=E&&k.setAttribute(E,s[E]);return e.content.appendChild(k)}e.content.appendChild(c)}}function en(e,t){return function(n,r,o,i,a,l,s){o=o?o+" cm-force-border":"cm-force-border";for(var c=n.pos,u=c+r.length;;){for(var d=void 0,p=0;p<t.length&&!((d=t[p]).to>c&&d.from<=c);p++);if(d.to>=u)return e(n,r,o,i,a,l,s);e(n,r.slice(0,d.to-c),o,i,null,l,s),i=null,r=r.slice(d.to-c),c=d.to}}}function tn(e,t,n,r){var o=!r&&n.widgetNode;o&&e.map.push(e.pos,e.pos+t,o),!r&&e.cm.display.input.needsContentAttribute&&(o||(o=e.content.appendChild(document.createElement("span"))),o.setAttribute("cm-marker",n.id)),o&&(e.cm.display.input.setUneditable(o),e.content.appendChild(o)),e.pos+=t,e.trailingSpace=!1}function nn(e,t,n){var r=e.markedSpans,o=e.text,i=0;if(r)for(var a,l,s,c,u,d,p,m=o.length,f=0,h=1,g="",v=0;;){if(v==f){s=c=u=l="",p=null,d=null,v=1/0;for(var b=[],y=void 0,w=0;w<r.length;++w){var k=r[w],E=k.marker;if("bookmark"==E.type&&k.from==f&&E.widgetNode)b.push(E);else if(k.from<=f&&(null==k.to||k.to>f||E.collapsed&&k.to==f&&k.from==f)){if(null!=k.to&&k.to!=f&&v>k.to&&(v=k.to,c=""),E.className&&(s+=" "+E.className),E.css&&(l=(l?l+";":"")+E.css),E.startStyle&&k.from==f&&(u+=" "+E.startStyle),E.endStyle&&k.to==v&&(y||(y=[])).push(E.endStyle,k.to),E.title&&((p||(p={})).title=E.title),E.attributes)for(var _ in E.attributes)(p||(p={}))[_]=E.attributes[_];E.collapsed&&(!d||Lt(d.marker,E)<0)&&(d=k)}else k.from>f&&v>k.from&&(v=k.from)}if(y)for(var C=0;C<y.length;C+=2)y[C+1]==v&&(c+=" "+y[C]);if(!d||d.from==f)for(var x=0;x<b.length;++x)tn(t,0,b[x]);if(d&&(d.from||0)==f){if(tn(t,(null==d.to?m+1:d.to)-f,d.marker,null==d.from),null==d.to)return;d.to==f&&(d=!1)}}if(f>=m)break;for(var S=Math.min(m,v);;){if(g){var I=f+g.length;if(!d){var T=I>S?g.slice(0,S-f):g;t.addToken(t,T,a?a+s:s,u,f+T.length==v?c:"",l,p)}if(I>=S){g=g.slice(S-f),f=S;break}f=I,u=""}g=o.slice(i,i=n[h++]),a=Yt(n[h++],t.cm.options)}}else for(var N=1;N<n.length;N+=2)t.addToken(t,o.slice(i,i=n[N]),Yt(n[N+1],t.cm.options))}function rn(e,t,n){this.line=t,this.rest=function(e){for(var t,n;t=Dt(e);)e=t.find(1,!0).line,(n||(n=[])).push(e);return n}(t),this.size=this.rest?Ye(G(this.rest))-n+1:1,this.node=this.text=null,this.hidden=Vt(e,t)}function on(e,t,n){for(var r,o=[],i=t;i<n;i=r){var a=new rn(e.doc,$e(e.doc,i),i);r=i+a.size,o.push(a)}return o}var an=null;var ln=null;function sn(e,t){var n=pe(e,t);if(n.length){var r,o=Array.prototype.slice.call(arguments,2);an?r=an.delayedCallbacks:ln?r=ln:(r=ln=[],setTimeout(cn,0));for(var i=function(e){r.push((function(){return n[e].apply(null,o)}))},a=0;a<n.length;++a)i(a)}}function cn(){var e=ln;ln=null;for(var t=0;t<e.length;++t)e[t]()}function un(e,t,n,r){for(var o=0;o<t.changes.length;o++){var i=t.changes[o];"text"==i?mn(e,t):"gutter"==i?hn(e,t,n,r):"class"==i?fn(e,t):"widget"==i&&gn(e,t,r)}t.changes=null}function dn(e){return e.node==e.text&&(e.node=N("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),a&&l<8&&(e.node.style.zIndex=2)),e.node}function pn(e,t){var n=e.display.externalMeasured;return n&&n.line==t.line?(e.display.externalMeasured=null,t.measure=n.measure,n.built):Xt(e,t)}function mn(e,t){var n=t.text.className,r=pn(e,t);t.text==t.node&&(t.node=r.pre),t.text.parentNode.replaceChild(r.pre,t.text),t.text=r.pre,r.bgClass!=t.bgClass||r.textClass!=t.textClass?(t.bgClass=r.bgClass,t.textClass=r.textClass,fn(e,t)):n&&(t.text.className=n)}function fn(e,t){(function(e,t){var n=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(n&&(n+=" CodeMirror-linebackground"),t.background)n?t.background.className=n:(t.background.parentNode.removeChild(t.background),t.background=null);else if(n){var r=dn(t);t.background=r.insertBefore(N("div",null,n),r.firstChild),e.display.input.setUneditable(t.background)}})(e,t),t.line.wrapClass?dn(t).className=t.line.wrapClass:t.node!=t.text&&(t.node.className="");var n=t.textClass?t.textClass+" "+(t.line.textClass||""):t.line.textClass;t.text.className=n||""}function hn(e,t,n,r){if(t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null),t.gutterBackground&&(t.node.removeChild(t.gutterBackground),t.gutterBackground=null),t.line.gutterClass){var o=dn(t);t.gutterBackground=N("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px; width: "+r.gutterTotalWidth+"px"),e.display.input.setUneditable(t.gutterBackground),o.insertBefore(t.gutterBackground,t.text)}var i=t.line.gutterMarkers;if(e.options.lineNumbers||i){var a=dn(t),l=t.gutter=N("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px");if(l.setAttribute("aria-hidden","true"),e.display.input.setUneditable(l),a.insertBefore(l,t.text),t.line.gutterClass&&(l.className+=" "+t.line.gutterClass),!e.options.lineNumbers||i&&i["CodeMirror-linenumbers"]||(t.lineNumber=l.appendChild(N("div",Qe(e.options,n),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+r.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),i)for(var s=0;s<e.display.gutterSpecs.length;++s){var c=e.display.gutterSpecs[s].className,u=i.hasOwnProperty(c)&&i[c];u&&l.appendChild(N("div",[u],"CodeMirror-gutter-elt","left: "+r.gutterLeft[c]+"px; width: "+r.gutterWidth[c]+"px"))}}}function gn(e,t,n){t.alignable&&(t.alignable=null);for(var r=C("CodeMirror-linewidget"),o=t.node.firstChild,i=void 0;o;o=i)i=o.nextSibling,r.test(o.className)&&t.node.removeChild(o);bn(e,t,n)}function vn(e,t,n,r){var o=pn(e,t);return t.text=t.node=o.pre,o.bgClass&&(t.bgClass=o.bgClass),o.textClass&&(t.textClass=o.textClass),fn(e,t),hn(e,t,n,r),bn(e,t,r),t.node}function bn(e,t,n){if(yn(e,t.line,t,n,!0),t.rest)for(var r=0;r<t.rest.length;r++)yn(e,t.rest[r],t,n,!1)}function yn(e,t,n,r,o){if(t.widgets)for(var i=dn(n),a=0,l=t.widgets;a<l.length;++a){var s=l[a],c=N("div",[s.node],"CodeMirror-linewidget"+(s.className?" "+s.className:""));s.handleMouseEvents||c.setAttribute("cm-ignore-events","true"),wn(s,c,n,r),e.display.input.setUneditable(c),o&&s.above?i.insertBefore(c,n.gutter||n.text):i.appendChild(c),sn(s,"redraw")}}function wn(e,t,n,r){if(e.noHScroll){(n.alignable||(n.alignable=[])).push(t);var o=r.wrapperWidth;t.style.left=r.fixedPos+"px",e.coverGutter||(o-=r.gutterTotalWidth,t.style.paddingLeft=r.gutterTotalWidth+"px"),t.style.width=o+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-r.gutterTotalWidth+"px"))}function kn(e){if(null!=e.height)return e.height;var t=e.doc.cm;if(!t)return 0;if(!R(document.body,e.node)){var n="position: relative;";e.coverGutter&&(n+="margin-left: -"+t.display.gutters.offsetWidth+"px;"),e.noHScroll&&(n+="width: "+t.display.wrapper.clientWidth+"px;"),T(t.display.measure,N("div",[e.node],null,n))}return e.height=e.node.parentNode.offsetHeight}function En(e,t){for(var n=_e(t);n!=e.wrapper;n=n.parentNode)if(!n||1==n.nodeType&&"true"==n.getAttribute("cm-ignore-events")||n.parentNode==e.sizer&&n!=e.mover)return!0}function _n(e){return e.lineSpace.offsetTop}function Cn(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function xn(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=T(e.measure,N("pre","x","CodeMirror-line-like")),n=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,r={left:parseInt(n.paddingLeft),right:parseInt(n.paddingRight)};return isNaN(r.left)||isNaN(r.right)||(e.cachedPaddingH=r),r}function Sn(e){return 50-e.display.nativeBarWidth}function In(e){return e.display.scroller.clientWidth-Sn(e)-e.display.barWidth}function Tn(e){return e.display.scroller.clientHeight-Sn(e)-e.display.barHeight}function Nn(e,t,n){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var r=0;r<e.rest.length;r++)if(e.rest[r]==t)return{map:e.measure.maps[r],cache:e.measure.caches[r]};for(var o=0;o<e.rest.length;o++)if(Ye(e.rest[o])>n)return{map:e.measure.maps[o],cache:e.measure.caches[o],before:!0}}function An(e,t,n,r){return Pn(e,Ln(e,t),n,r)}function Rn(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[ur(e,t)];var n=e.display.externalMeasured;return n&&t>=n.lineN&&t<n.lineN+n.size?n:void 0}function Ln(e,t){var n=Ye(t),r=Rn(e,n);r&&!r.text?r=null:r&&r.changes&&(un(e,r,n,ir(e)),e.curOp.forceUpdate=!0),r||(r=function(e,t){var n=Ye(t=Ft(t)),r=e.display.externalMeasured=new rn(e.doc,t,n);r.lineN=n;var o=r.built=Xt(e,r);return r.text=o.pre,T(e.display.lineMeasure,o.pre),r}(e,t));var o=Nn(r,t,n);return{line:t,view:r,rect:null,map:o.map,cache:o.cache,before:o.before,hasHeights:!1}}function Pn(e,t,n,r,o){t.before&&(n=-1);var i,s=n+(r||"");return t.cache.hasOwnProperty(s)?i=t.cache[s]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(function(e,t,n){var r=e.options.lineWrapping,o=r&&In(e);if(!t.measure.heights||r&&t.measure.width!=o){var i=t.measure.heights=[];if(r){t.measure.width=o;for(var a=t.text.firstChild.getClientRects(),l=0;l<a.length-1;l++){var s=a[l],c=a[l+1];Math.abs(s.bottom-c.bottom)>2&&i.push((s.bottom+c.top)/2-n.top)}}i.push(n.bottom-n.top)}}(e,t.view,t.rect),t.hasHeights=!0),(i=function(e,t,n,r){var o,i=Mn(t.map,n,r),s=i.node,c=i.start,u=i.end,d=i.collapse;if(3==s.nodeType){for(var p=0;p<4;p++){for(;c&&re(t.line.text.charAt(i.coverStart+c));)--c;for(;i.coverStart+u<i.coverEnd&&re(t.line.text.charAt(i.coverStart+u));)++u;if((o=a&&l<9&&0==c&&u==i.coverEnd-i.coverStart?s.parentNode.getBoundingClientRect():Bn(x(s,c,u).getClientRects(),r)).left||o.right||0==c)break;u=c,c-=1,d="right"}a&&l<11&&(o=function(e,t){if(!window.screen||null==screen.logicalXDPI||screen.logicalXDPI==screen.deviceXDPI||!function(e){if(null!=Oe)return Oe;var t=T(e,N("span","x")),n=t.getBoundingClientRect(),r=x(t,0,1).getBoundingClientRect();return Oe=Math.abs(n.left-r.left)>1}(e))return t;var n=screen.logicalXDPI/screen.deviceXDPI,r=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*n,right:t.right*n,top:t.top*r,bottom:t.bottom*r}}(e.display.measure,o))}else{var m;c>0&&(d=r="right"),o=e.options.lineWrapping&&(m=s.getClientRects()).length>1?m["right"==r?m.length-1:0]:s.getBoundingClientRect()}if(a&&l<9&&!c&&(!o||!o.left&&!o.right)){var f=s.parentNode.getClientRects()[0];o=f?{left:f.left,right:f.left+or(e.display),top:f.top,bottom:f.bottom}:Dn}for(var h=o.top-t.rect.top,g=o.bottom-t.rect.top,v=(h+g)/2,b=t.view.measure.heights,y=0;y<b.length-1&&!(v<b[y]);y++);var w=y?b[y-1]:0,k=b[y],E={left:("right"==d?o.right:o.left)-t.rect.left,right:("left"==d?o.left:o.right)-t.rect.left,top:w,bottom:k};return o.left||o.right||(E.bogus=!0),e.options.singleCursorHeightPerLine||(E.rtop=h,E.rbottom=g),E}(e,t,n,r)).bogus||(t.cache[s]=i)),{left:i.left,right:i.right,top:o?i.rtop:i.top,bottom:o?i.rbottom:i.bottom}}var On,Dn={left:0,right:0,top:0,bottom:0};function Mn(e,t,n){for(var r,o,i,a,l,s,c=0;c<e.length;c+=3)if(l=e[c],s=e[c+1],t<l?(o=0,i=1,a="left"):t<s?i=1+(o=t-l):(c==e.length-3||t==s&&e[c+3]>t)&&(o=(i=s-l)-1,t>=s&&(a="right")),null!=o){if(r=e[c+2],l==s&&n==(r.insertLeft?"left":"right")&&(a=n),"left"==n&&0==o)for(;c&&e[c-2]==e[c-3]&&e[c-1].insertLeft;)r=e[2+(c-=3)],a="left";if("right"==n&&o==s-l)for(;c<e.length-3&&e[c+3]==e[c+4]&&!e[c+5].insertLeft;)r=e[(c+=3)+2],a="right";break}return{node:r,start:o,end:i,collapse:a,coverStart:l,coverEnd:s}}function Bn(e,t){var n=Dn;if("left"==t)for(var r=0;r<e.length&&(n=e[r]).left==n.right;r++);else for(var o=e.length-1;o>=0&&(n=e[o]).left==n.right;o--);return n}function Fn(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t<e.rest.length;t++)e.measure.caches[t]={}}function zn(e){e.display.externalMeasure=null,I(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)Fn(e.display.view[t])}function Hn(e){zn(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function Vn(){return u&&g?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function Wn(){return u&&g?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function Zn(e){var t=0;if(e.widgets)for(var n=0;n<e.widgets.length;++n)e.widgets[n].above&&(t+=kn(e.widgets[n]));return t}function jn(e,t,n,r,o){if(!o){var i=Zn(t);n.top+=i,n.bottom+=i}if("line"==r)return n;r||(r="local");var a=Zt(t);if("local"==r?a+=_n(e.display):a-=e.display.viewOffset,"page"==r||"window"==r){var l=e.display.lineSpace.getBoundingClientRect();a+=l.top+("window"==r?0:Wn());var s=l.left+("window"==r?0:Vn());n.left+=s,n.right+=s}return n.top+=a,n.bottom+=a,n}function Un(e,t,n){if("div"==n)return t;var r=t.left,o=t.top;if("page"==n)r-=Vn(),o-=Wn();else if("local"==n||!n){var i=e.display.sizer.getBoundingClientRect();r+=i.left,o+=i.top}var a=e.display.lineSpace.getBoundingClientRect();return{left:r-a.left,top:o-a.top}}function $n(e,t,n,r,o){return r||(r=$e(e.doc,t.line)),jn(e,r,An(e,r,t.ch,o),n)}function qn(e,t,n,r,o,i){function a(t,a){var l=Pn(e,o,t,a?"right":"left",i);return a?l.left=l.right:l.right=l.left,jn(e,r,l,n)}r=r||$e(e.doc,t.line),o||(o=Ln(e,r));var l=ce(r,e.doc.direction),s=t.ch,c=t.sticky;if(s>=r.text.length?(s=r.text.length,c="before"):s<=0&&(s=0,c="after"),!l)return a("before"==c?s-1:s,"before"==c);function u(e,t,n){return a(n?e-1:e,1==l[t].level!=n)}var d=le(l,s,c),p=ae,m=u(s,d,"before"==c);return null!=p&&(m.other=u(s,p,"before"!=c)),m}function Gn(e,t){var n=0;t=lt(e.doc,t),e.options.lineWrapping||(n=or(e.display)*t.ch);var r=$e(e.doc,t.line),o=Zt(r)+_n(e.display);return{left:n,right:n,top:o,bottom:o+r.height}}function Kn(e,t,n,r,o){var i=et(e,t,n);return i.xRel=o,r&&(i.outside=r),i}function Yn(e,t,n){var r=e.doc;if((n+=e.display.viewOffset)<0)return Kn(r.first,0,null,-1,-1);var o=Xe(r,n),i=r.first+r.size-1;if(o>i)return Kn(r.first+r.size-1,$e(r,i).text.length,null,1,1);t<0&&(t=0);for(var a=$e(r,o);;){var l=er(e,a,o,t,n),s=Mt(a,l.ch+(l.xRel>0||l.outside>0?1:0));if(!s)return l;var c=s.find(1);if(c.line==o)return c;a=$e(r,o=c.line)}}function Xn(e,t,n,r){r-=Zn(t);var o=t.text.length,i=ie((function(t){return Pn(e,n,t-1).bottom<=r}),o,0);return{begin:i,end:o=ie((function(t){return Pn(e,n,t).top>r}),i,o)}}function Jn(e,t,n,r){return n||(n=Ln(e,t)),Xn(e,t,n,jn(e,t,Pn(e,n,r),"line").top)}function Qn(e,t,n,r){return!(e.bottom<=n)&&(e.top>n||(r?e.left:e.right)>t)}function er(e,t,n,r,o){o-=Zt(t);var i=Ln(e,t),a=Zn(t),l=0,s=t.text.length,c=!0,u=ce(t,e.doc.direction);if(u){var d=(e.options.lineWrapping?nr:tr)(e,t,n,i,u,r,o);l=(c=1!=d.level)?d.from:d.to-1,s=c?d.to:d.from-1}var p,m,f=null,h=null,g=ie((function(t){var n=Pn(e,i,t);return n.top+=a,n.bottom+=a,!!Qn(n,r,o,!1)&&(n.top<=o&&n.left<=r&&(f=t,h=n),!0)}),l,s),v=!1;if(h){var b=r-h.left<h.right-r,y=b==c;g=f+(y?0:1),m=y?"after":"before",p=b?h.left:h.right}else{c||g!=s&&g!=l||g++,m=0==g?"after":g==t.text.length?"before":Pn(e,i,g-(c?1:0)).bottom+a<=o==c?"after":"before";var w=qn(e,et(n,g,m),"line",t,i);p=w.left,v=o<w.top?-1:o>=w.bottom?1:0}return Kn(n,g=oe(t.text,g,1),m,v,r-p)}function tr(e,t,n,r,o,i,a){var l=ie((function(l){var s=o[l],c=1!=s.level;return Qn(qn(e,et(n,c?s.to:s.from,c?"before":"after"),"line",t,r),i,a,!0)}),0,o.length-1),s=o[l];if(l>0){var c=1!=s.level,u=qn(e,et(n,c?s.from:s.to,c?"after":"before"),"line",t,r);Qn(u,i,a,!0)&&u.top>a&&(s=o[l-1])}return s}function nr(e,t,n,r,o,i,a){var l=Xn(e,t,r,a),s=l.begin,c=l.end;/\s/.test(t.text.charAt(c-1))&&c--;for(var u=null,d=null,p=0;p<o.length;p++){var m=o[p];if(!(m.from>=c||m.to<=s)){var f=Pn(e,r,1!=m.level?Math.min(c,m.to)-1:Math.max(s,m.from)).right,h=f<i?i-f+1e9:f-i;(!u||d>h)&&(u=m,d=h)}}return u||(u=o[o.length-1]),u.from<s&&(u={from:s,to:u.to,level:u.level}),u.to>c&&(u={from:u.from,to:c,level:u.level}),u}function rr(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==On){On=N("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)On.appendChild(document.createTextNode("x")),On.appendChild(N("br"));On.appendChild(document.createTextNode("x"))}T(e.measure,On);var n=On.offsetHeight/50;return n>3&&(e.cachedTextHeight=n),I(e.measure),n||1}function or(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=N("span","xxxxxxxxxx"),n=N("pre",[t],"CodeMirror-line-like");T(e.measure,n);var r=t.getBoundingClientRect(),o=(r.right-r.left)/10;return o>2&&(e.cachedCharWidth=o),o||10}function ir(e){for(var t=e.display,n={},r={},o=t.gutters.clientLeft,i=t.gutters.firstChild,a=0;i;i=i.nextSibling,++a){var l=e.display.gutterSpecs[a].className;n[l]=i.offsetLeft+i.clientLeft+o,r[l]=i.clientWidth}return{fixedPos:ar(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:t.wrapper.clientWidth}}function ar(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function lr(e){var t=rr(e.display),n=e.options.lineWrapping,r=n&&Math.max(5,e.display.scroller.clientWidth/or(e.display)-3);return function(o){if(Vt(e.doc,o))return 0;var i=0;if(o.widgets)for(var a=0;a<o.widgets.length;a++)o.widgets[a].height&&(i+=o.widgets[a].height);return n?i+(Math.ceil(o.text.length/r)||1)*t:i+t}}function sr(e){var t=e.doc,n=lr(e);t.iter((function(e){var t=n(e);t!=e.height&&Ke(e,t)}))}function cr(e,t,n,r){var o=e.display;if(!n&&"true"==_e(t).getAttribute("cm-not-content"))return null;var i,a,l=o.lineSpace.getBoundingClientRect();try{i=t.clientX-l.left,a=t.clientY-l.top}catch(e){return null}var s,c=Yn(e,i,a);if(r&&c.xRel>0&&(s=$e(e.doc,c.line).text).length==c.ch){var u=F(s,s.length,e.options.tabSize)-s.length;c=et(c.line,Math.max(0,Math.round((i-xn(e.display).left)/or(e.display))-u))}return c}function ur(e,t){if(t>=e.display.viewTo)return null;if((t-=e.display.viewFrom)<0)return null;for(var n=e.display.view,r=0;r<n.length;r++)if((t-=n[r].size)<0)return r}function dr(e,t,n,r){null==t&&(t=e.doc.first),null==n&&(n=e.doc.first+e.doc.size),r||(r=0);var o=e.display;if(r&&n<o.viewTo&&(null==o.updateLineNumbers||o.updateLineNumbers>t)&&(o.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=o.viewTo)Et&&zt(e.doc,t)<o.viewTo&&mr(e);else if(n<=o.viewFrom)Et&&Ht(e.doc,n+r)>o.viewFrom?mr(e):(o.viewFrom+=r,o.viewTo+=r);else if(t<=o.viewFrom&&n>=o.viewTo)mr(e);else if(t<=o.viewFrom){var i=fr(e,n,n+r,1);i?(o.view=o.view.slice(i.index),o.viewFrom=i.lineN,o.viewTo+=r):mr(e)}else if(n>=o.viewTo){var a=fr(e,t,t,-1);a?(o.view=o.view.slice(0,a.index),o.viewTo=a.lineN):mr(e)}else{var l=fr(e,t,t,-1),s=fr(e,n,n+r,1);l&&s?(o.view=o.view.slice(0,l.index).concat(on(e,l.lineN,s.lineN)).concat(o.view.slice(s.index)),o.viewTo+=r):mr(e)}var c=o.externalMeasured;c&&(n<c.lineN?c.lineN+=r:t<c.lineN+c.size&&(o.externalMeasured=null))}function pr(e,t,n){e.curOp.viewChanged=!0;var r=e.display,o=e.display.externalMeasured;if(o&&t>=o.lineN&&t<o.lineN+o.size&&(r.externalMeasured=null),!(t<r.viewFrom||t>=r.viewTo)){var i=r.view[ur(e,t)];if(null!=i.node){var a=i.changes||(i.changes=[]);-1==H(a,n)&&a.push(n)}}}function mr(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function fr(e,t,n,r){var o,i=ur(e,t),a=e.display.view;if(!Et||n==e.doc.first+e.doc.size)return{index:i,lineN:n};for(var l=e.display.viewFrom,s=0;s<i;s++)l+=a[s].size;if(l!=t){if(r>0){if(i==a.length-1)return null;o=l+a[i].size-t,i++}else o=l-t;t+=o,n+=o}for(;zt(e.doc,n)!=n;){if(i==(r<0?0:a.length-1))return null;n+=r*a[i-(r<0?1:0)].size,i+=r}return{index:i,lineN:n}}function hr(e){for(var t=e.display.view,n=0,r=0;r<t.length;r++){var o=t[r];o.hidden||o.node&&!o.changes||++n}return n}function gr(e){e.display.input.showSelection(e.display.input.prepareSelection())}function vr(e,t){void 0===t&&(t=!0);for(var n=e.doc,r={},o=r.cursors=document.createDocumentFragment(),i=r.selection=document.createDocumentFragment(),a=0;a<n.sel.ranges.length;a++)if(t||a!=n.sel.primIndex){var l=n.sel.ranges[a];if(!(l.from().line>=e.display.viewTo||l.to().line<e.display.viewFrom)){var s=l.empty();(s||e.options.showCursorWhenSelecting)&&br(e,l.head,o),s||wr(e,l,i)}}return r}function br(e,t,n){var r=qn(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),o=n.appendChild(N("div"," ","CodeMirror-cursor"));if(o.style.left=r.left+"px",o.style.top=r.top+"px",o.style.height=Math.max(0,r.bottom-r.top)*e.options.cursorHeight+"px",/\bcm-fat-cursor\b/.test(e.getWrapperElement().className)){var i=$n(e,t,"div",null,null);i.right-i.left>0&&(o.style.width=i.right-i.left+"px")}if(r.other){var a=n.appendChild(N("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));a.style.display="",a.style.left=r.other.left+"px",a.style.top=r.other.top+"px",a.style.height=.85*(r.other.bottom-r.other.top)+"px"}}function yr(e,t){return e.top-t.top||e.left-t.left}function wr(e,t,n){var r=e.display,o=e.doc,i=document.createDocumentFragment(),a=xn(e.display),l=a.left,s=Math.max(r.sizerWidth,In(e)-r.sizer.offsetLeft)-a.right,c="ltr"==o.direction;function u(e,t,n,r){t<0&&(t=0),t=Math.round(t),r=Math.round(r),i.appendChild(N("div",null,"CodeMirror-selected","position: absolute; left: "+e+"px;\n top: "+t+"px; width: "+(null==n?s-e:n)+"px;\n height: "+(r-t)+"px"))}function d(t,n,r){var i,a,d=$e(o,t),p=d.text.length;function m(n,r){return $n(e,et(t,n),"div",d,r)}function f(t,n,r){var o=Jn(e,d,null,t),i="ltr"==n==("after"==r)?"left":"right";return m("after"==r?o.begin:o.end-(/\s/.test(d.text.charAt(o.end-1))?2:1),i)[i]}var h=ce(d,o.direction);return function(e,t,n,r){if(!e)return r(t,n,"ltr",0);for(var o=!1,i=0;i<e.length;++i){var a=e[i];(a.from<n&&a.to>t||t==n&&a.to==t)&&(r(Math.max(a.from,t),Math.min(a.to,n),1==a.level?"rtl":"ltr",i),o=!0)}o||r(t,n,"ltr")}(h,n||0,null==r?p:r,(function(e,t,o,d){var g="ltr"==o,v=m(e,g?"left":"right"),b=m(t-1,g?"right":"left"),y=null==n&&0==e,w=null==r&&t==p,k=0==d,E=!h||d==h.length-1;if(b.top-v.top<=3){var _=(c?w:y)&&E,C=(c?y:w)&&k?l:(g?v:b).left,x=_?s:(g?b:v).right;u(C,v.top,x-C,v.bottom)}else{var S,I,T,N;g?(S=c&&y&&k?l:v.left,I=c?s:f(e,o,"before"),T=c?l:f(t,o,"after"),N=c&&w&&E?s:b.right):(S=c?f(e,o,"before"):l,I=!c&&y&&k?s:v.right,T=!c&&w&&E?l:b.left,N=c?f(t,o,"after"):s),u(S,v.top,I-S,v.bottom),v.bottom<b.top&&u(l,v.bottom,null,b.top),u(T,b.top,N-T,b.bottom)}(!i||yr(v,i)<0)&&(i=v),yr(b,i)<0&&(i=b),(!a||yr(v,a)<0)&&(a=v),yr(b,a)<0&&(a=b)})),{start:i,end:a}}var p=t.from(),m=t.to();if(p.line==m.line)d(p.line,p.ch,m.ch);else{var f=$e(o,p.line),h=$e(o,m.line),g=Ft(f)==Ft(h),v=d(p.line,p.ch,g?f.text.length+1:null).end,b=d(m.line,g?0:null,m.ch).start;g&&(v.top<b.top-2?(u(v.right,v.top,null,v.bottom),u(l,b.top,b.left,b.bottom)):u(v.right,v.top,b.left-v.right,v.bottom)),v.bottom<b.top&&u(l,v.bottom,null,b.top)}n.appendChild(i)}function kr(e){if(e.state.focused){var t=e.display;clearInterval(t.blinker);var n=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval((function(){e.hasFocus()||xr(e),t.cursorDiv.style.visibility=(n=!n)?"":"hidden"}),e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function Er(e){e.hasFocus()||(e.display.input.focus(),e.state.focused||Cr(e))}function _r(e){e.state.delayingBlurEvent=!0,setTimeout((function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,e.state.focused&&xr(e))}),100)}function Cr(e,t){e.state.delayingBlurEvent&&!e.state.draggingText&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(fe(e,"focus",e,t),e.state.focused=!0,P(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),s&&setTimeout((function(){return e.display.input.reset(!0)}),20)),e.display.input.receivedFocus()),kr(e))}function xr(e,t){e.state.delayingBlurEvent||(e.state.focused&&(fe(e,"blur",e,t),e.state.focused=!1,S(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout((function(){e.state.focused||(e.display.shift=!1)}),150))}function Sr(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=Math.max(0,t.scroller.getBoundingClientRect().top),o=t.lineDiv.getBoundingClientRect().top,i=0,s=0;s<t.view.length;s++){var c=t.view[s],u=e.options.lineWrapping,d=void 0,p=0;if(!c.hidden){if(o+=c.line.height,a&&l<8){var m=c.node.offsetTop+c.node.offsetHeight;d=m-n,n=m}else{var f=c.node.getBoundingClientRect();d=f.bottom-f.top,!u&&c.text.firstChild&&(p=c.text.firstChild.getBoundingClientRect().right-f.left-1)}var h=c.line.height-d;if((h>.005||h<-.005)&&(o<r&&(i-=h),Ke(c.line,d),Ir(c.line),c.rest))for(var g=0;g<c.rest.length;g++)Ir(c.rest[g]);if(p>e.display.sizerWidth){var v=Math.ceil(p/or(e.display));v>e.display.maxLineLength&&(e.display.maxLineLength=v,e.display.maxLine=c.line,e.display.maxLineChanged=!0)}}}Math.abs(i)>2&&(t.scroller.scrollTop+=i)}function Ir(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t){var n=e.widgets[t],r=n.node.parentNode;r&&(n.height=r.offsetHeight)}}function Tr(e,t,n){var r=n&&null!=n.top?Math.max(0,n.top):e.scroller.scrollTop;r=Math.floor(r-_n(e));var o=n&&null!=n.bottom?n.bottom:r+e.wrapper.clientHeight,i=Xe(t,r),a=Xe(t,o);if(n&&n.ensure){var l=n.ensure.from.line,s=n.ensure.to.line;l<i?(i=l,a=Xe(t,Zt($e(t,l))+e.wrapper.clientHeight)):Math.min(s,t.lastLine())>=a&&(i=Xe(t,Zt($e(t,s))-e.wrapper.clientHeight),a=s)}return{from:i,to:Math.max(a,i+1)}}function Nr(e,t){var n=e.display,r=rr(e.display);t.top<0&&(t.top=0);var o=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:n.scroller.scrollTop,i=Tn(e),a={};t.bottom-t.top>i&&(t.bottom=t.top+i);var l=e.doc.height+Cn(n),s=t.top<r,c=t.bottom>l-r;if(t.top<o)a.scrollTop=s?0:t.top;else if(t.bottom>o+i){var u=Math.min(t.top,(c?l:t.bottom)-i);u!=o&&(a.scrollTop=u)}var d=e.options.fixedGutter?0:n.gutters.offsetWidth,p=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:n.scroller.scrollLeft-d,m=In(e)-n.gutters.offsetWidth,f=t.right-t.left>m;return f&&(t.right=t.left+m),t.left<10?a.scrollLeft=0:t.left<p?a.scrollLeft=Math.max(0,t.left+d-(f?0:10)):t.right>m+p-3&&(a.scrollLeft=t.right+(f?0:10)-m),a}function Ar(e,t){null!=t&&(Pr(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function Rr(e){Pr(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function Lr(e,t,n){null==t&&null==n||Pr(e),null!=t&&(e.curOp.scrollLeft=t),null!=n&&(e.curOp.scrollTop=n)}function Pr(e){var t=e.curOp.scrollToPos;t&&(e.curOp.scrollToPos=null,Or(e,Gn(e,t.from),Gn(e,t.to),t.margin))}function Or(e,t,n,r){var o=Nr(e,{left:Math.min(t.left,n.left),top:Math.min(t.top,n.top)-r,right:Math.max(t.right,n.right),bottom:Math.max(t.bottom,n.bottom)+r});Lr(e,o.scrollLeft,o.scrollTop)}function Dr(e,t){Math.abs(e.doc.scrollTop-t)<2||(n||so(e,{top:t}),Mr(e,t,!0),n&&so(e),ro(e,100))}function Mr(e,t,n){t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),(e.display.scroller.scrollTop!=t||n)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function Br(e,t,n,r){t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(n?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!r||(e.doc.scrollLeft=t,po(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function Fr(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+Cn(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?n:0,docHeight:r,scrollHeight:r+Sn(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}var zr=function(e,t,n){this.cm=n;var r=this.vert=N("div",[N("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),o=this.horiz=N("div",[N("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=o.tabIndex=-1,e(r),e(o),de(r,"scroll",(function(){r.clientHeight&&t(r.scrollTop,"vertical")})),de(o,"scroll",(function(){o.clientWidth&&t(o.scrollLeft,"horizontal")})),this.checkedZeroWidth=!1,a&&l<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};zr.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=t?r+"px":"0";var o=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+o)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=n?r+"px":"0",this.horiz.style.left=e.barLeft+"px";var i=e.viewWidth-e.barLeft-(n?r:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+i)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(0==r&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?r:0,bottom:t?r:0}},zr.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},zr.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},zr.prototype.zeroWidthHack=function(){var e=b&&!m?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new z,this.disableVert=new z},zr.prototype.enableZeroWidthBar=function(e,t,n){e.style.pointerEvents="auto",t.set(1e3,(function r(){var o=e.getBoundingClientRect();("vert"==n?document.elementFromPoint(o.right-1,(o.top+o.bottom)/2):document.elementFromPoint((o.right+o.left)/2,o.bottom-1))!=e?e.style.pointerEvents="none":t.set(1e3,r)}))},zr.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var Hr=function(){};function Vr(e,t){t||(t=Fr(e));var n=e.display.barWidth,r=e.display.barHeight;Wr(e,t);for(var o=0;o<4&&n!=e.display.barWidth||r!=e.display.barHeight;o++)n!=e.display.barWidth&&e.options.lineWrapping&&Sr(e),Wr(e,Fr(e)),n=e.display.barWidth,r=e.display.barHeight}function Wr(e,t){var n=e.display,r=n.scrollbars.update(t);n.sizer.style.paddingRight=(n.barWidth=r.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=r.bottom)+"px",n.heightForcer.style.borderBottom=r.bottom+"px solid transparent",r.right&&r.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=r.bottom+"px",n.scrollbarFiller.style.width=r.right+"px"):n.scrollbarFiller.style.display="",r.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=r.bottom+"px",n.gutterFiller.style.width=t.gutterWidth+"px"):n.gutterFiller.style.display=""}Hr.prototype.update=function(){return{bottom:0,right:0}},Hr.prototype.setScrollLeft=function(){},Hr.prototype.setScrollTop=function(){},Hr.prototype.clear=function(){};var Zr={native:zr,null:Hr};function jr(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&S(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new Zr[e.options.scrollbarStyle]((function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),de(t,"mousedown",(function(){e.state.focused&&setTimeout((function(){return e.display.input.focus()}),0)})),t.setAttribute("cm-not-content","true")}),(function(t,n){"horizontal"==n?Br(e,t):Dr(e,t)}),e),e.display.scrollbars.addClass&&P(e.display.wrapper,e.display.scrollbars.addClass)}var Ur=0;function $r(e){var t;e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Ur,markArrays:null},t=e.curOp,an?an.ops.push(t):t.ownsGroup=an={ops:[t],delayedCallbacks:[]}}function qr(e){var t=e.curOp;t&&function(e,t){var n=e.ownsGroup;if(n)try{!function(e){var t=e.delayedCallbacks,n=0;do{for(;n<t.length;n++)t[n].call(null);for(var r=0;r<e.ops.length;r++){var o=e.ops[r];if(o.cursorActivityHandlers)for(;o.cursorActivityCalled<o.cursorActivityHandlers.length;)o.cursorActivityHandlers[o.cursorActivityCalled++].call(null,o.cm)}}while(n<t.length)}(n)}finally{an=null,t(n)}}(t,(function(e){for(var t=0;t<e.ops.length;t++)e.ops[t].cm.curOp=null;!function(e){for(var t=e.ops,n=0;n<t.length;n++)Gr(t[n]);for(var r=0;r<t.length;r++)Kr(t[r]);for(var o=0;o<t.length;o++)Yr(t[o]);for(var i=0;i<t.length;i++)Xr(t[i]);for(var a=0;a<t.length;a++)Jr(t[a])}(e)}))}function Gr(e){var t=e.cm,n=t.display;(function(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=Sn(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=Sn(e)+"px",t.scrollbarsClipped=!0)})(t),e.updateMaxLine&&Ut(t),e.mustUpdate=e.viewChanged||e.forceUpdate||null!=e.scrollTop||e.scrollToPos&&(e.scrollToPos.from.line<n.viewFrom||e.scrollToPos.to.line>=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new io(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Kr(e){e.updatedDisplay=e.mustUpdate&&ao(e.cm,e.update)}function Yr(e){var t=e.cm,n=t.display;e.updatedDisplay&&Sr(t),e.barMeasure=Fr(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=An(t,n.maxLine,n.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+e.adjustWidthTo+Sn(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-In(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection())}function Xr(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&Br(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var n=e.focus&&e.focus==L();e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,n),(e.updatedDisplay||e.startHeight!=t.doc.height)&&Vr(t,e.barMeasure),e.updatedDisplay&&uo(t,e.barMeasure),e.selectionChanged&&kr(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),n&&Er(e.cm)}function Jr(e){var t=e.cm,n=t.display,r=t.doc;e.updatedDisplay&&lo(t,e.update),null==n.wheelStartX||null==e.scrollTop&&null==e.scrollLeft&&!e.scrollToPos||(n.wheelStartX=n.wheelStartY=null),null!=e.scrollTop&&Mr(t,e.scrollTop,e.forceScroll),null!=e.scrollLeft&&Br(t,e.scrollLeft,!0,!0),e.scrollToPos&&function(e,t){if(!he(e,"scrollCursorIntoView")){var n=e.display,r=n.sizer.getBoundingClientRect(),o=null;if(t.top+r.top<0?o=!0:t.bottom+r.top>(window.innerHeight||document.documentElement.clientHeight)&&(o=!1),null!=o&&!f){var i=N("div","",null,"position: absolute;\n top: "+(t.top-n.viewOffset-_n(e.display))+"px;\n height: "+(t.bottom-t.top+Sn(e)+n.barHeight)+"px;\n left: "+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(i),i.scrollIntoView(o),e.display.lineSpace.removeChild(i)}}}(t,function(e,t,n,r){var o;null==r&&(r=0),e.options.lineWrapping||t!=n||(n="before"==t.sticky?et(t.line,t.ch+1,"before"):t,t=t.ch?et(t.line,"before"==t.sticky?t.ch-1:t.ch,"after"):t);for(var i=0;i<5;i++){var a=!1,l=qn(e,t),s=n&&n!=t?qn(e,n):l,c=Nr(e,o={left:Math.min(l.left,s.left),top:Math.min(l.top,s.top)-r,right:Math.max(l.left,s.left),bottom:Math.max(l.bottom,s.bottom)+r}),u=e.doc.scrollTop,d=e.doc.scrollLeft;if(null!=c.scrollTop&&(Dr(e,c.scrollTop),Math.abs(e.doc.scrollTop-u)>1&&(a=!0)),null!=c.scrollLeft&&(Br(e,c.scrollLeft),Math.abs(e.doc.scrollLeft-d)>1&&(a=!0)),!a)break}return o}(t,lt(r,e.scrollToPos.from),lt(r,e.scrollToPos.to),e.scrollToPos.margin));var o=e.maybeHiddenMarkers,i=e.maybeUnhiddenMarkers;if(o)for(var a=0;a<o.length;++a)o[a].lines.length||fe(o[a],"hide");if(i)for(var l=0;l<i.length;++l)i[l].lines.length&&fe(i[l],"unhide");n.wrapper.offsetHeight&&(r.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&fe(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function Qr(e,t){if(e.curOp)return t();$r(e);try{return t()}finally{qr(e)}}function eo(e,t){return function(){if(e.curOp)return t.apply(e,arguments);$r(e);try{return t.apply(e,arguments)}finally{qr(e)}}}function to(e){return function(){if(this.curOp)return e.apply(this,arguments);$r(this);try{return e.apply(this,arguments)}finally{qr(this)}}}function no(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);$r(t);try{return e.apply(this,arguments)}finally{qr(t)}}}function ro(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,M(oo,e))}function oo(e){var t=e.doc;if(!(t.highlightFrontier>=e.display.viewTo)){var n=+new Date+e.options.workTime,r=mt(e,t.highlightFrontier),o=[];t.iter(r.line,Math.min(t.first+t.size,e.display.viewTo+500),(function(i){if(r.line>=e.display.viewFrom){var a=i.styles,l=i.text.length>e.options.maxHighlightLength?We(t.mode,r.state):null,s=dt(e,i,r,!0);l&&(r.state=l),i.styles=s.styles;var c=i.styleClasses,u=s.classes;u?i.styleClasses=u:c&&(i.styleClasses=null);for(var d=!a||a.length!=i.styles.length||c!=u&&(!c||!u||c.bgClass!=u.bgClass||c.textClass!=u.textClass),p=0;!d&&p<a.length;++p)d=a[p]!=i.styles[p];d&&o.push(r.line),i.stateAfter=r.save(),r.nextLine()}else i.text.length<=e.options.maxHighlightLength&&ft(e,i.text,r),i.stateAfter=r.line%5==0?r.save():null,r.nextLine();if(+new Date>n)return ro(e,e.options.workDelay),!0})),t.highlightFrontier=r.line,t.modeFrontier=Math.max(t.modeFrontier,r.line),o.length&&Qr(e,(function(){for(var t=0;t<o.length;t++)pr(e,o[t],"text")}))}}var io=function(e,t,n){var r=e.display;this.viewport=t,this.visible=Tr(r,e.doc,t),this.editorIsHidden=!r.wrapper.offsetWidth,this.wrapperHeight=r.wrapper.clientHeight,this.wrapperWidth=r.wrapper.clientWidth,this.oldDisplayWidth=In(e),this.force=n,this.dims=ir(e),this.events=[]};function ao(e,t){var n=e.display,r=e.doc;if(t.editorIsHidden)return mr(e),!1;if(!t.force&&t.visible.from>=n.viewFrom&&t.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==hr(e))return!1;mo(e)&&(mr(e),t.dims=ir(e));var o=r.first+r.size,i=Math.max(t.visible.from-e.options.viewportMargin,r.first),a=Math.min(o,t.visible.to+e.options.viewportMargin);n.viewFrom<i&&i-n.viewFrom<20&&(i=Math.max(r.first,n.viewFrom)),n.viewTo>a&&n.viewTo-a<20&&(a=Math.min(o,n.viewTo)),Et&&(i=zt(e.doc,i),a=Ht(e.doc,a));var l=i!=n.viewFrom||a!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;(function(e,t,n){var r=e.display;0==r.view.length||t>=r.viewTo||n<=r.viewFrom?(r.view=on(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=on(e,t,r.viewFrom).concat(r.view):r.viewFrom<t&&(r.view=r.view.slice(ur(e,t))),r.viewFrom=t,r.viewTo<n?r.view=r.view.concat(on(e,r.viewTo,n)):r.viewTo>n&&(r.view=r.view.slice(0,ur(e,n)))),r.viewTo=n})(e,i,a),n.viewOffset=Zt($e(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var c=hr(e);if(!l&&0==c&&!t.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var u=function(e){if(e.hasFocus())return null;var t=L();if(!t||!R(e.display.lineDiv,t))return null;var n={activeElt:t};if(window.getSelection){var r=window.getSelection();r.anchorNode&&r.extend&&R(e.display.lineDiv,r.anchorNode)&&(n.anchorNode=r.anchorNode,n.anchorOffset=r.anchorOffset,n.focusNode=r.focusNode,n.focusOffset=r.focusOffset)}return n}(e);return c>4&&(n.lineDiv.style.display="none"),function(e,t,n){var r=e.display,o=e.options.lineNumbers,i=r.lineDiv,a=i.firstChild;function l(t){var n=t.nextSibling;return s&&b&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),n}for(var c=r.view,u=r.viewFrom,d=0;d<c.length;d++){var p=c[d];if(p.hidden);else if(p.node&&p.node.parentNode==i){for(;a!=p.node;)a=l(a);var m=o&&null!=t&&t<=u&&p.lineNumber;p.changes&&(H(p.changes,"gutter")>-1&&(m=!1),un(e,p,u,n)),m&&(I(p.lineNumber),p.lineNumber.appendChild(document.createTextNode(Qe(e.options,u)))),a=p.node.nextSibling}else{var f=vn(e,p,u,n);i.insertBefore(f,a)}u+=p.size}for(;a;)a=l(a)}(e,n.updateLineNumbers,t.dims),c>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,function(e){if(e&&e.activeElt&&e.activeElt!=L()&&(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&R(document.body,e.anchorNode)&&R(document.body,e.focusNode))){var t=window.getSelection(),n=document.createRange();n.setEnd(e.anchorNode,e.anchorOffset),n.collapse(!1),t.removeAllRanges(),t.addRange(n),t.extend(e.focusNode,e.focusOffset)}}(u),I(n.cursorDiv),I(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,l&&(n.lastWrapHeight=t.wrapperHeight,n.lastWrapWidth=t.wrapperWidth,ro(e,400)),n.updateLineNumbers=null,!0}function lo(e,t){for(var n=t.viewport,r=!0;;r=!1){if(r&&e.options.lineWrapping&&t.oldDisplayWidth!=In(e))r&&(t.visible=Tr(e.display,e.doc,n));else if(n&&null!=n.top&&(n={top:Math.min(e.doc.height+Cn(e.display)-Tn(e),n.top)}),t.visible=Tr(e.display,e.doc,n),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break;if(!ao(e,t))break;Sr(e);var o=Fr(e);gr(e),Vr(e,o),uo(e,o),t.force=!1}t.signal(e,"update",e),e.display.viewFrom==e.display.reportedViewFrom&&e.display.viewTo==e.display.reportedViewTo||(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function so(e,t){var n=new io(e,t);if(ao(e,n)){Sr(e),lo(e,n);var r=Fr(e);gr(e),Vr(e,r),uo(e,r),n.finish()}}function co(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px",sn(e,"gutterChanged",e)}function uo(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+Sn(e)+"px"}function po(e){var t=e.display,n=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var r=ar(t)-t.scroller.scrollLeft+e.doc.scrollLeft,o=t.gutters.offsetWidth,i=r+"px",a=0;a<n.length;a++)if(!n[a].hidden){e.options.fixedGutter&&(n[a].gutter&&(n[a].gutter.style.left=i),n[a].gutterBackground&&(n[a].gutterBackground.style.left=i));var l=n[a].alignable;if(l)for(var s=0;s<l.length;s++)l[s].style.left=i}e.options.fixedGutter&&(t.gutters.style.left=r+o+"px")}}function mo(e){if(!e.options.lineNumbers)return!1;var t=e.doc,n=Qe(e.options,t.first+t.size-1),r=e.display;if(n.length!=r.lineNumChars){var o=r.measure.appendChild(N("div",[N("div",n)],"CodeMirror-linenumber CodeMirror-gutter-elt")),i=o.firstChild.offsetWidth,a=o.offsetWidth-i;return r.lineGutter.style.width="",r.lineNumInnerWidth=Math.max(i,r.lineGutter.offsetWidth-a)+1,r.lineNumWidth=r.lineNumInnerWidth+a,r.lineNumChars=r.lineNumInnerWidth?n.length:-1,r.lineGutter.style.width=r.lineNumWidth+"px",co(e.display),!0}return!1}function fo(e,t){for(var n=[],r=!1,o=0;o<e.length;o++){var i=e[o],a=null;if("string"!=typeof i&&(a=i.style,i=i.className),"CodeMirror-linenumbers"==i){if(!t)continue;r=!0}n.push({className:i,style:a})}return t&&!r&&n.push({className:"CodeMirror-linenumbers",style:null}),n}function ho(e){var t=e.gutters,n=e.gutterSpecs;I(t),e.lineGutter=null;for(var r=0;r<n.length;++r){var o=n[r],i=o.className,a=o.style,l=t.appendChild(N("div",null,"CodeMirror-gutter "+i));a&&(l.style.cssText=a),"CodeMirror-linenumbers"==i&&(e.lineGutter=l,l.style.width=(e.lineNumWidth||1)+"px")}t.style.display=n.length?"":"none",co(e)}function go(e){ho(e.display),dr(e),po(e)}function vo(e,t,r,o){var i=this;this.input=r,i.scrollbarFiller=N("div",null,"CodeMirror-scrollbar-filler"),i.scrollbarFiller.setAttribute("cm-not-content","true"),i.gutterFiller=N("div",null,"CodeMirror-gutter-filler"),i.gutterFiller.setAttribute("cm-not-content","true"),i.lineDiv=A("div",null,"CodeMirror-code"),i.selectionDiv=N("div",null,null,"position: relative; z-index: 1"),i.cursorDiv=N("div",null,"CodeMirror-cursors"),i.measure=N("div",null,"CodeMirror-measure"),i.lineMeasure=N("div",null,"CodeMirror-measure"),i.lineSpace=A("div",[i.measure,i.lineMeasure,i.selectionDiv,i.cursorDiv,i.lineDiv],null,"position: relative; outline: none");var c=A("div",[i.lineSpace],"CodeMirror-lines");i.mover=N("div",[c],null,"position: relative"),i.sizer=N("div",[i.mover],"CodeMirror-sizer"),i.sizerWidth=null,i.heightForcer=N("div",null,null,"position: absolute; height: 50px; width: 1px;"),i.gutters=N("div",null,"CodeMirror-gutters"),i.lineGutter=null,i.scroller=N("div",[i.sizer,i.heightForcer,i.gutters],"CodeMirror-scroll"),i.scroller.setAttribute("tabIndex","-1"),i.wrapper=N("div",[i.scrollbarFiller,i.gutterFiller,i.scroller],"CodeMirror"),i.wrapper.setAttribute("translate","no"),a&&l<8&&(i.gutters.style.zIndex=-1,i.scroller.style.paddingRight=0),s||n&&v||(i.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(i.wrapper):e(i.wrapper)),i.viewFrom=i.viewTo=t.first,i.reportedViewFrom=i.reportedViewTo=t.first,i.view=[],i.renderedView=null,i.externalMeasured=null,i.viewOffset=0,i.lastWrapHeight=i.lastWrapWidth=0,i.updateLineNumbers=null,i.nativeBarWidth=i.barHeight=i.barWidth=0,i.scrollbarsClipped=!1,i.lineNumWidth=i.lineNumInnerWidth=i.lineNumChars=null,i.alignWidgets=!1,i.cachedCharWidth=i.cachedTextHeight=i.cachedPaddingH=null,i.maxLine=null,i.maxLineLength=0,i.maxLineChanged=!1,i.wheelDX=i.wheelDY=i.wheelStartX=i.wheelStartY=null,i.shift=!1,i.selForContextMenu=null,i.activeTouch=null,i.gutterSpecs=fo(o.gutters,o.lineNumbers),ho(i),r.init(i)}io.prototype.signal=function(e,t){ve(e,t)&&this.events.push(arguments)},io.prototype.finish=function(){for(var e=0;e<this.events.length;e++)fe.apply(null,this.events[e])};var bo=0,yo=null;function wo(e){var t=e.wheelDeltaX,n=e.wheelDeltaY;return null==t&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),null==n&&e.detail&&e.axis==e.VERTICAL_AXIS?n=e.detail:null==n&&(n=e.wheelDelta),{x:t,y:n}}function ko(e){var t=wo(e);return t.x*=yo,t.y*=yo,t}function Eo(e,t){var r=wo(t),o=r.x,i=r.y,a=yo;0===t.deltaMode&&(o=t.deltaX,i=t.deltaY,a=1);var l=e.display,c=l.scroller,u=c.scrollWidth>c.clientWidth,p=c.scrollHeight>c.clientHeight;if(o&&u||i&&p){if(i&&b&&s)e:for(var m=t.target,f=l.view;m!=c;m=m.parentNode)for(var h=0;h<f.length;h++)if(f[h].node==m){e.display.currentWheelTarget=m;break e}if(o&&!n&&!d&&null!=a)return i&&p&&Dr(e,Math.max(0,c.scrollTop+i*a)),Br(e,Math.max(0,c.scrollLeft+o*a)),(!i||i&&p)&&ye(t),void(l.wheelStartX=null);if(i&&null!=a){var g=i*a,v=e.doc.scrollTop,y=v+l.wrapper.clientHeight;g<0?v=Math.max(0,v+g-50):y=Math.min(e.doc.height,y+g+50),so(e,{top:v,bottom:y})}bo<20&&0!==t.deltaMode&&(null==l.wheelStartX?(l.wheelStartX=c.scrollLeft,l.wheelStartY=c.scrollTop,l.wheelDX=o,l.wheelDY=i,setTimeout((function(){if(null!=l.wheelStartX){var e=c.scrollLeft-l.wheelStartX,t=c.scrollTop-l.wheelStartY,n=t&&l.wheelDY&&t/l.wheelDY||e&&l.wheelDX&&e/l.wheelDX;l.wheelStartX=l.wheelStartY=null,n&&(yo=(yo*bo+n)/(bo+1),++bo)}}),200)):(l.wheelDX+=o,l.wheelDY+=i))}}a?yo=-.53:n?yo=15:u?yo=-.7:p&&(yo=-1/3);var _o=function(e,t){this.ranges=e,this.primIndex=t};_o.prototype.primary=function(){return this.ranges[this.primIndex]},_o.prototype.equals=function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t<this.ranges.length;t++){var n=this.ranges[t],r=e.ranges[t];if(!nt(n.anchor,r.anchor)||!nt(n.head,r.head))return!1}return!0},_o.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new Co(rt(this.ranges[t].anchor),rt(this.ranges[t].head));return new _o(e,this.primIndex)},_o.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},_o.prototype.contains=function(e,t){t||(t=e);for(var n=0;n<this.ranges.length;n++){var r=this.ranges[n];if(tt(t,r.from())>=0&&tt(e,r.to())<=0)return n}return-1};var Co=function(e,t){this.anchor=e,this.head=t};function xo(e,t,n){var r=e&&e.options.selectionsMayTouch,o=t[n];t.sort((function(e,t){return tt(e.from(),t.from())})),n=H(t,o);for(var i=1;i<t.length;i++){var a=t[i],l=t[i-1],s=tt(l.to(),a.from());if(r&&!a.empty()?s>0:s>=0){var c=it(l.from(),a.from()),u=ot(l.to(),a.to()),d=l.empty()?a.from()==a.head:l.from()==l.head;i<=n&&--n,t.splice(--i,2,new Co(d?u:c,d?c:u))}}return new _o(t,n)}function So(e,t){return new _o([new Co(e,t||e)],0)}function Io(e){return e.text?et(e.from.line+e.text.length-1,G(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function To(e,t){if(tt(e,t.from)<0)return e;if(tt(e,t.to)<=0)return Io(t);var n=e.line+t.text.length-(t.to.line-t.from.line)-1,r=e.ch;return e.line==t.to.line&&(r+=Io(t).ch-t.to.ch),et(n,r)}function No(e,t){for(var n=[],r=0;r<e.sel.ranges.length;r++){var o=e.sel.ranges[r];n.push(new Co(To(o.anchor,t),To(o.head,t)))}return xo(e.cm,n,e.sel.primIndex)}function Ao(e,t,n){return e.line==t.line?et(n.line,e.ch-t.ch+n.ch):et(n.line+(e.line-t.line),e.ch)}function Ro(e){e.doc.mode=ze(e.options,e.doc.modeOption),Lo(e)}function Lo(e){e.doc.iter((function(e){e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null)})),e.doc.modeFrontier=e.doc.highlightFrontier=e.doc.first,ro(e,100),e.state.modeGen++,e.curOp&&dr(e)}function Po(e,t){return 0==t.from.ch&&0==t.to.ch&&""==G(t.text)&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function Oo(e,t,n,r){function o(e){return n?n[e]:null}function i(e,n,o){(function(e,t,n,r){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),null!=e.order&&(e.order=null),Tt(e),Nt(e,n);var o=r?r(e):1;o!=e.height&&Ke(e,o)})(e,n,o,r),sn(e,"change",e,t)}function a(e,t){for(var n=[],i=e;i<t;++i)n.push(new $t(c[i],o(i),r));return n}var l=t.from,s=t.to,c=t.text,u=$e(e,l.line),d=$e(e,s.line),p=G(c),m=o(c.length-1),f=s.line-l.line;if(t.full)e.insert(0,a(0,c.length)),e.remove(c.length,e.size-c.length);else if(Po(e,t)){var h=a(0,c.length-1);i(d,d.text,m),f&&e.remove(l.line,f),h.length&&e.insert(l.line,h)}else if(u==d)if(1==c.length)i(u,u.text.slice(0,l.ch)+p+u.text.slice(s.ch),m);else{var g=a(1,c.length-1);g.push(new $t(p+u.text.slice(s.ch),m,r)),i(u,u.text.slice(0,l.ch)+c[0],o(0)),e.insert(l.line+1,g)}else if(1==c.length)i(u,u.text.slice(0,l.ch)+c[0]+d.text.slice(s.ch),o(0)),e.remove(l.line+1,f);else{i(u,u.text.slice(0,l.ch)+c[0],o(0)),i(d,p+d.text.slice(s.ch),m);var v=a(1,c.length-1);f>1&&e.remove(l.line+1,f-1),e.insert(l.line+1,v)}sn(e,"change",e,t)}function Do(e,t,n){!function e(r,o,i){if(r.linked)for(var a=0;a<r.linked.length;++a){var l=r.linked[a];if(l.doc!=o){var s=i&&l.sharedHist;n&&!s||(t(l.doc,s),e(l.doc,r,s))}}}(e,null,!0)}function Mo(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,sr(e),Ro(e),Bo(e),e.options.direction=t.direction,e.options.lineWrapping||Ut(e),e.options.mode=t.modeOption,dr(e)}function Bo(e){("rtl"==e.doc.direction?P:S)(e.display.lineDiv,"CodeMirror-rtl")}function Fo(e){this.done=[],this.undone=[],this.undoDepth=e?e.undoDepth:1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=e?e.maxGeneration:1}function zo(e,t){var n={from:rt(t.from),to:Io(t),text:qe(e,t.from,t.to)};return jo(e,n,t.from.line,t.to.line+1),Do(e,(function(e){return jo(e,n,t.from.line,t.to.line+1)}),!0),n}function Ho(e){for(;e.length&&G(e).ranges;)e.pop()}function Vo(e,t,n,r){var o=e.history;o.undone.length=0;var i,a,l=+new Date;if((o.lastOp==r||o.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&o.lastModTime>l-(e.cm?e.cm.options.historyEventDelay:500)||"*"==t.origin.charAt(0)))&&(i=function(e,t){return t?(Ho(e.done),G(e.done)):e.done.length&&!G(e.done).ranges?G(e.done):e.done.length>1&&!e.done[e.done.length-2].ranges?(e.done.pop(),G(e.done)):void 0}(o,o.lastOp==r)))a=G(i.changes),0==tt(t.from,t.to)&&0==tt(t.from,a.to)?a.to=Io(t):i.changes.push(zo(e,t));else{var s=G(o.done);for(s&&s.ranges||Zo(e.sel,o.done),i={changes:[zo(e,t)],generation:o.generation},o.done.push(i);o.done.length>o.undoDepth;)o.done.shift(),o.done[0].ranges||o.done.shift()}o.done.push(n),o.generation=++o.maxGeneration,o.lastModTime=o.lastSelTime=l,o.lastOp=o.lastSelOp=r,o.lastOrigin=o.lastSelOrigin=t.origin,a||fe(e,"historyAdded")}function Wo(e,t,n,r){var o=e.history,i=r&&r.origin;n==o.lastSelOp||i&&o.lastSelOrigin==i&&(o.lastModTime==o.lastSelTime&&o.lastOrigin==i||function(e,t,n,r){var o=t.charAt(0);return"*"==o||"+"==o&&n.ranges.length==r.ranges.length&&n.somethingSelected()==r.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}(e,i,G(o.done),t))?o.done[o.done.length-1]=t:Zo(t,o.done),o.lastSelTime=+new Date,o.lastSelOrigin=i,o.lastSelOp=n,r&&!1!==r.clearRedo&&Ho(o.undone)}function Zo(e,t){var n=G(t);n&&n.ranges&&n.equals(e)||t.push(e)}function jo(e,t,n,r){var o=t["spans_"+e.id],i=0;e.iter(Math.max(e.first,n),Math.min(e.first+e.size,r),(function(n){n.markedSpans&&((o||(o=t["spans_"+e.id]={}))[i]=n.markedSpans),++i}))}function Uo(e){if(!e)return null;for(var t,n=0;n<e.length;++n)e[n].marker.explicitlyCleared?t||(t=e.slice(0,n)):t&&t.push(e[n]);return t?t.length?t:null:e}function $o(e,t){var n=function(e,t){var n=t["spans_"+e.id];if(!n)return null;for(var r=[],o=0;o<t.text.length;++o)r.push(Uo(n[o]));return r}(e,t),r=St(e,t);if(!n)return r;if(!r)return n;for(var o=0;o<n.length;++o){var i=n[o],a=r[o];if(i&&a)e:for(var l=0;l<a.length;++l){for(var s=a[l],c=0;c<i.length;++c)if(i[c].marker==s.marker)continue e;i.push(s)}else a&&(n[o]=a)}return n}function qo(e,t,n){for(var r=[],o=0;o<e.length;++o){var i=e[o];if(i.ranges)r.push(n?_o.prototype.deepCopy.call(i):i);else{var a=i.changes,l=[];r.push({changes:l});for(var s=0;s<a.length;++s){var c=a[s],u=void 0;if(l.push({from:c.from,to:c.to,text:c.text}),t)for(var d in c)(u=d.match(/^spans_(\d+)$/))&&H(t,Number(u[1]))>-1&&(G(l)[d]=c[d],delete c[d])}}}return r}function Go(e,t,n,r){if(r){var o=e.anchor;if(n){var i=tt(t,o)<0;i!=tt(n,o)<0?(o=t,t=n):i!=tt(t,n)<0&&(t=n)}return new Co(o,t)}return new Co(n||t,t)}function Ko(e,t,n,r,o){null==o&&(o=e.cm&&(e.cm.display.shift||e.extend)),ei(e,new _o([Go(e.sel.primary(),t,n,o)],0),r)}function Yo(e,t,n){for(var r=[],o=e.cm&&(e.cm.display.shift||e.extend),i=0;i<e.sel.ranges.length;i++)r[i]=Go(e.sel.ranges[i],t[i],null,o);ei(e,xo(e.cm,r,e.sel.primIndex),n)}function Xo(e,t,n,r){var o=e.sel.ranges.slice(0);o[t]=n,ei(e,xo(e.cm,o,e.sel.primIndex),r)}function Jo(e,t,n,r){ei(e,So(t,n),r)}function Qo(e,t,n){var r=e.history.done,o=G(r);o&&o.ranges?(r[r.length-1]=t,ti(e,t,n)):ei(e,t,n)}function ei(e,t,n){ti(e,t,n),Wo(e,e.sel,e.cm?e.cm.curOp.id:NaN,n)}function ti(e,t,n){(ve(e,"beforeSelectionChange")||e.cm&&ve(e.cm,"beforeSelectionChange"))&&(t=function(e,t,n){var r={ranges:t.ranges,update:function(t){this.ranges=[];for(var n=0;n<t.length;n++)this.ranges[n]=new Co(lt(e,t[n].anchor),lt(e,t[n].head))},origin:n&&n.origin};return fe(e,"beforeSelectionChange",e,r),e.cm&&fe(e.cm,"beforeSelectionChange",e.cm,r),r.ranges!=t.ranges?xo(e.cm,r.ranges,r.ranges.length-1):t}(e,t,n));var r=n&&n.bias||(tt(t.primary().head,e.sel.primary().head)<0?-1:1);ni(e,oi(e,t,r,!0)),n&&!1===n.scroll||!e.cm||"nocursor"==e.cm.getOption("readOnly")||Rr(e.cm)}function ni(e,t){t.equals(e.sel)||(e.sel=t,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,ge(e.cm)),sn(e,"cursorActivity",e))}function ri(e){ni(e,oi(e,e.sel,null,!1))}function oi(e,t,n,r){for(var o,i=0;i<t.ranges.length;i++){var a=t.ranges[i],l=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[i],s=ai(e,a.anchor,l&&l.anchor,n,r),c=ai(e,a.head,l&&l.head,n,r);(o||s!=a.anchor||c!=a.head)&&(o||(o=t.ranges.slice(0,i)),o[i]=new Co(s,c))}return o?xo(e.cm,o,t.primIndex):t}function ii(e,t,n,r,o){var i=$e(e,t.line);if(i.markedSpans)for(var a=0;a<i.markedSpans.length;++a){var l=i.markedSpans[a],s=l.marker,c="selectLeft"in s?!s.selectLeft:s.inclusiveLeft,u="selectRight"in s?!s.selectRight:s.inclusiveRight;if((null==l.from||(c?l.from<=t.ch:l.from<t.ch))&&(null==l.to||(u?l.to>=t.ch:l.to>t.ch))){if(o&&(fe(s,"beforeCursorEnter"),s.explicitlyCleared)){if(i.markedSpans){--a;continue}break}if(!s.atomic)continue;if(n){var d=s.find(r<0?1:-1),p=void 0;if((r<0?u:c)&&(d=li(e,d,-r,d&&d.line==t.line?i:null)),d&&d.line==t.line&&(p=tt(d,n))&&(r<0?p<0:p>0))return ii(e,d,t,r,o)}var m=s.find(r<0?-1:1);return(r<0?c:u)&&(m=li(e,m,r,m.line==t.line?i:null)),m?ii(e,m,t,r,o):null}}return t}function ai(e,t,n,r,o){var i=r||1;return ii(e,t,n,i,o)||!o&&ii(e,t,n,i,!0)||ii(e,t,n,-i,o)||!o&&ii(e,t,n,-i,!0)||(e.cantEdit=!0,et(e.first,0))}function li(e,t,n,r){return n<0&&0==t.ch?t.line>e.first?lt(e,et(t.line-1)):null:n>0&&t.ch==(r||$e(e,t.line)).text.length?t.line<e.first+e.size-1?et(t.line+1,0):null:new et(t.line,t.ch+n)}function si(e){e.setSelection(et(e.firstLine(),0),et(e.lastLine()),W)}function ci(e,t,n){var r={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){return r.canceled=!0}};return n&&(r.update=function(t,n,o,i){t&&(r.from=lt(e,t)),n&&(r.to=lt(e,n)),o&&(r.text=o),void 0!==i&&(r.origin=i)}),fe(e,"beforeChange",e,r),e.cm&&fe(e.cm,"beforeChange",e.cm,r),r.canceled?(e.cm&&(e.cm.curOp.updateInput=2),null):{from:r.from,to:r.to,text:r.text,origin:r.origin}}function ui(e,t,n){if(e.cm){if(!e.cm.curOp)return eo(e.cm,ui)(e,t,n);if(e.cm.state.suppressEdits)return}if(!(ve(e,"beforeChange")||e.cm&&ve(e.cm,"beforeChange"))||(t=ci(e,t,!0))){var r=kt&&!n&&function(e,t,n){var r=null;if(e.iter(t.line,n.line+1,(function(e){if(e.markedSpans)for(var t=0;t<e.markedSpans.length;++t){var n=e.markedSpans[t].marker;!n.readOnly||r&&-1!=H(r,n)||(r||(r=[])).push(n)}})),!r)return null;for(var o=[{from:t,to:n}],i=0;i<r.length;++i)for(var a=r[i],l=a.find(0),s=0;s<o.length;++s){var c=o[s];if(!(tt(c.to,l.from)<0||tt(c.from,l.to)>0)){var u=[s,1],d=tt(c.from,l.from),p=tt(c.to,l.to);(d<0||!a.inclusiveLeft&&!d)&&u.push({from:c.from,to:l.from}),(p>0||!a.inclusiveRight&&!p)&&u.push({from:l.to,to:c.to}),o.splice.apply(o,u),s+=u.length-3}}return o}(e,t.from,t.to);if(r)for(var o=r.length-1;o>=0;--o)di(e,{from:r[o].from,to:r[o].to,text:o?[""]:t.text,origin:t.origin});else di(e,t)}}function di(e,t){if(1!=t.text.length||""!=t.text[0]||0!=tt(t.from,t.to)){var n=No(e,t);Vo(e,t,n,e.cm?e.cm.curOp.id:NaN),fi(e,t,n,St(e,t));var r=[];Do(e,(function(e,n){n||-1!=H(r,e.history)||(bi(e.history,t),r.push(e.history)),fi(e,t,null,St(e,t))}))}}function pi(e,t,n){var r=e.cm&&e.cm.state.suppressEdits;if(!r||n){for(var o,i=e.history,a=e.sel,l="undo"==t?i.done:i.undone,s="undo"==t?i.undone:i.done,c=0;c<l.length&&(o=l[c],n?!o.ranges||o.equals(e.sel):o.ranges);c++);if(c!=l.length){for(i.lastOrigin=i.lastSelOrigin=null;;){if(!(o=l.pop()).ranges){if(r)return void l.push(o);break}if(Zo(o,s),n&&!o.equals(e.sel))return void ei(e,o,{clearRedo:!1});a=o}var u=[];Zo(a,s),s.push({changes:u,generation:i.generation}),i.generation=o.generation||++i.maxGeneration;for(var d=ve(e,"beforeChange")||e.cm&&ve(e.cm,"beforeChange"),p=function(n){var r=o.changes[n];if(r.origin=t,d&&!ci(e,r,!1))return l.length=0,{};u.push(zo(e,r));var i=n?No(e,r):G(l);fi(e,r,i,$o(e,r)),!n&&e.cm&&e.cm.scrollIntoView({from:r.from,to:Io(r)});var a=[];Do(e,(function(e,t){t||-1!=H(a,e.history)||(bi(e.history,r),a.push(e.history)),fi(e,r,null,$o(e,r))}))},m=o.changes.length-1;m>=0;--m){var f=p(m);if(f)return f.v}}}}function mi(e,t){if(0!=t&&(e.first+=t,e.sel=new _o(K(e.sel.ranges,(function(e){return new Co(et(e.anchor.line+t,e.anchor.ch),et(e.head.line+t,e.head.ch))})),e.sel.primIndex),e.cm)){dr(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,r=n.viewFrom;r<n.viewTo;r++)pr(e.cm,r,"gutter")}}function fi(e,t,n,r){if(e.cm&&!e.cm.curOp)return eo(e.cm,fi)(e,t,n,r);if(t.to.line<e.first)mi(e,t.text.length-1-(t.to.line-t.from.line));else if(!(t.from.line>e.lastLine())){if(t.from.line<e.first){var o=t.text.length-1-(e.first-t.from.line);mi(e,o),t={from:et(e.first,0),to:et(t.to.line+o,t.to.ch),text:[G(t.text)],origin:t.origin}}var i=e.lastLine();t.to.line>i&&(t={from:t.from,to:et(i,$e(e,i).text.length),text:[t.text[0]],origin:t.origin}),t.removed=qe(e,t.from,t.to),n||(n=No(e,t)),e.cm?function(e,t,n){var r=e.doc,o=e.display,i=t.from,a=t.to,l=!1,s=i.line;e.options.lineWrapping||(s=Ye(Ft($e(r,i.line))),r.iter(s,a.line+1,(function(e){if(e==o.maxLine)return l=!0,!0}))),r.sel.contains(t.from,t.to)>-1&&ge(e),Oo(r,t,n,lr(e)),e.options.lineWrapping||(r.iter(s,i.line+t.text.length,(function(e){var t=jt(e);t>o.maxLineLength&&(o.maxLine=e,o.maxLineLength=t,o.maxLineChanged=!0,l=!1)})),l&&(e.curOp.updateMaxLine=!0)),function(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontier<t-10)){for(var n=e.first,r=t-1;r>n;r--){var o=$e(e,r).stateAfter;if(o&&(!(o instanceof ct)||r+o.lookAhead<t)){n=r+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,n)}}(r,i.line),ro(e,400);var c=t.text.length-(a.line-i.line)-1;t.full?dr(e):i.line!=a.line||1!=t.text.length||Po(e.doc,t)?dr(e,i.line,a.line+1,c):pr(e,i.line,"text");var u=ve(e,"changes"),d=ve(e,"change");if(d||u){var p={from:i,to:a,text:t.text,removed:t.removed,origin:t.origin};d&&sn(e,"change",e,p),u&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(p)}e.display.selForContextMenu=null}(e.cm,t,r):Oo(e,t,r),ti(e,n,W),e.cantEdit&&ai(e,et(e.firstLine(),0))&&(e.cantEdit=!1)}}function hi(e,t,n,r,o){var i;r||(r=n),tt(r,n)<0&&(n=(i=[r,n])[0],r=i[1]),"string"==typeof t&&(t=e.splitLines(t)),ui(e,{from:n,to:r,text:t,origin:o})}function gi(e,t,n,r){n<e.line?e.line+=r:t<e.line&&(e.line=t,e.ch=0)}function vi(e,t,n,r){for(var o=0;o<e.length;++o){var i=e[o],a=!0;if(i.ranges){i.copied||((i=e[o]=i.deepCopy()).copied=!0);for(var l=0;l<i.ranges.length;l++)gi(i.ranges[l].anchor,t,n,r),gi(i.ranges[l].head,t,n,r)}else{for(var s=0;s<i.changes.length;++s){var c=i.changes[s];if(n<c.from.line)c.from=et(c.from.line+r,c.from.ch),c.to=et(c.to.line+r,c.to.ch);else if(t<=c.to.line){a=!1;break}}a||(e.splice(0,o+1),o=0)}}}function bi(e,t){var n=t.from.line,r=t.to.line,o=t.text.length-(r-n)-1;vi(e.done,n,r,o),vi(e.undone,n,r,o)}function yi(e,t,n,r){var o=t,i=t;return"number"==typeof t?i=$e(e,at(e,t)):o=Ye(t),null==o?null:(r(i,o)&&e.cm&&pr(e.cm,o,n),i)}function wi(e){this.lines=e,this.parent=null;for(var t=0,n=0;n<e.length;++n)e[n].parent=this,t+=e[n].height;this.height=t}function ki(e){this.children=e;for(var t=0,n=0,r=0;r<e.length;++r){var o=e[r];t+=o.chunkSize(),n+=o.height,o.parent=this}this.size=t,this.height=n,this.parent=null}Co.prototype.from=function(){return it(this.anchor,this.head)},Co.prototype.to=function(){return ot(this.anchor,this.head)},Co.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch},wi.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var n=e,r=e+t;n<r;++n){var o=this.lines[n];this.height-=o.height,qt(o),sn(o,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,n){this.height+=n,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var r=0;r<t.length;++r)t[r].parent=this},iterN:function(e,t,n){for(var r=e+t;e<r;++e)if(n(this.lines[e]))return!0}},ki.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var n=0;n<this.children.length;++n){var r=this.children[n],o=r.chunkSize();if(e<o){var i=Math.min(t,o-e),a=r.height;if(r.removeInner(e,i),this.height-=a-r.height,o==i&&(this.children.splice(n--,1),r.parent=null),0==(t-=i))break;e=0}else e-=o}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof wi))){var l=[];this.collapse(l),this.children=[new wi(l)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t<this.children.length;++t)this.children[t].collapse(e)},insertInner:function(e,t,n){this.size+=t.length,this.height+=n;for(var r=0;r<this.children.length;++r){var o=this.children[r],i=o.chunkSize();if(e<=i){if(o.insertInner(e,t,n),o.lines&&o.lines.length>50){for(var a=o.lines.length%25+25,l=a;l<o.lines.length;){var s=new wi(o.lines.slice(l,l+=25));o.height-=s.height,this.children.splice(++r,0,s),s.parent=this}o.lines=o.lines.slice(0,a),this.maybeSpill()}break}e-=i}},maybeSpill:function(){if(!(this.children.length<=10)){var e=this;do{var t=new ki(e.children.splice(e.children.length-5,5));if(e.parent){e.size-=t.size,e.height-=t.height;var n=H(e.parent.children,e);e.parent.children.splice(n+1,0,t)}else{var r=new ki(e.children);r.parent=e,e.children=[r,t],e=r}t.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()}},iterN:function(e,t,n){for(var r=0;r<this.children.length;++r){var o=this.children[r],i=o.chunkSize();if(e<i){var a=Math.min(t,i-e);if(o.iterN(e,a,n))return!0;if(0==(t-=a))break;e=0}else e-=i}}};var Ei=function(e,t,n){if(n)for(var r in n)n.hasOwnProperty(r)&&(this[r]=n[r]);this.doc=e,this.node=t};function _i(e,t,n){Zt(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&Ar(e,n)}Ei.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,n=this.line,r=Ye(n);if(null!=r&&t){for(var o=0;o<t.length;++o)t[o]==this&&t.splice(o--,1);t.length||(n.widgets=null);var i=kn(this);Ke(n,Math.max(0,n.height-i)),e&&(Qr(e,(function(){_i(e,n,-i),pr(e,r,"widget")})),sn(e,"lineWidgetCleared",e,this,r))}},Ei.prototype.changed=function(){var e=this,t=this.height,n=this.doc.cm,r=this.line;this.height=null;var o=kn(this)-t;o&&(Vt(this.doc,r)||Ke(r,r.height+o),n&&Qr(n,(function(){n.curOp.forceUpdate=!0,_i(n,r,o),sn(n,"lineWidgetChanged",n,e,Ye(r))})))},be(Ei);var Ci=0,xi=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++Ci};function Si(e,t,n,r,o){if(r&&r.shared)return function(e,t,n,r,o){(r=B(r)).shared=!1;var i=[Si(e,t,n,r,o)],a=i[0],l=r.widgetNode;return Do(e,(function(e){l&&(r.widgetNode=l.cloneNode(!0)),i.push(Si(e,lt(e,t),lt(e,n),r,o));for(var s=0;s<e.linked.length;++s)if(e.linked[s].isParent)return;a=G(i)})),new Ii(i,a)}(e,t,n,r,o);if(e.cm&&!e.cm.curOp)return eo(e.cm,Si)(e,t,n,r,o);var i=new xi(e,o),a=tt(t,n);if(r&&B(r,i,!1),a>0||0==a&&!1!==i.clearWhenEmpty)return i;if(i.replacedWith&&(i.collapsed=!0,i.widgetNode=A("span",[i.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||i.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(i.widgetNode.insertLeft=!0)),i.collapsed){if(Bt(e,t.line,t,n,i)||t.line!=n.line&&Bt(e,n.line,t,n,i))throw new Error("Inserting collapsed marker partially overlapping an existing one");Et=!0}i.addToHistory&&Vo(e,{from:t,to:n,origin:"markText"},e.sel,NaN);var l,s=t.line,c=e.cm;if(e.iter(s,n.line+1,(function(r){c&&i.collapsed&&!c.options.lineWrapping&&Ft(r)==c.display.maxLine&&(l=!0),i.collapsed&&s!=t.line&&Ke(r,0),function(e,t,n){var r=n&&window.WeakSet&&(n.markedSpans||(n.markedSpans=new WeakSet));r&&r.has(e.markedSpans)?e.markedSpans.push(t):(e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],r&&r.add(e.markedSpans)),t.marker.attachLine(e)}(r,new _t(i,s==t.line?t.ch:null,s==n.line?n.ch:null),e.cm&&e.cm.curOp),++s})),i.collapsed&&e.iter(t.line,n.line+1,(function(t){Vt(e,t)&&Ke(t,0)})),i.clearOnEnter&&de(i,"beforeCursorEnter",(function(){return i.clear()})),i.readOnly&&(kt=!0,(e.history.done.length||e.history.undone.length)&&e.clearHistory()),i.collapsed&&(i.id=++Ci,i.atomic=!0),c){if(l&&(c.curOp.updateMaxLine=!0),i.collapsed)dr(c,t.line,n.line+1);else if(i.className||i.startStyle||i.endStyle||i.css||i.attributes||i.title)for(var u=t.line;u<=n.line;u++)pr(c,u,"text");i.atomic&&ri(c.doc),sn(c,"markerAdded",c,i)}return i}xi.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&$r(e),ve(this,"clear")){var n=this.find();n&&sn(this,"clear",n.from,n.to)}for(var r=null,o=null,i=0;i<this.lines.length;++i){var a=this.lines[i],l=Ct(a.markedSpans,this);e&&!this.collapsed?pr(e,Ye(a),"text"):e&&(null!=l.to&&(o=Ye(a)),null!=l.from&&(r=Ye(a))),a.markedSpans=xt(a.markedSpans,l),null==l.from&&this.collapsed&&!Vt(this.doc,a)&&e&&Ke(a,rr(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var s=0;s<this.lines.length;++s){var c=Ft(this.lines[s]),u=jt(c);u>e.display.maxLineLength&&(e.display.maxLine=c,e.display.maxLineLength=u,e.display.maxLineChanged=!0)}null!=r&&e&&this.collapsed&&dr(e,r,o+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&ri(e.doc)),e&&sn(e,"markerCleared",e,this,r,o),t&&qr(e),this.parent&&this.parent.clear()}},xi.prototype.find=function(e,t){var n,r;null==e&&"bookmark"==this.type&&(e=1);for(var o=0;o<this.lines.length;++o){var i=this.lines[o],a=Ct(i.markedSpans,this);if(null!=a.from&&(n=et(t?i:Ye(i),a.from),-1==e))return n;if(null!=a.to&&(r=et(t?i:Ye(i),a.to),1==e))return r}return n&&{from:n,to:r}},xi.prototype.changed=function(){var e=this,t=this.find(-1,!0),n=this,r=this.doc.cm;t&&r&&Qr(r,(function(){var o=t.line,i=Ye(t.line),a=Rn(r,i);if(a&&(Fn(a),r.curOp.selectionChanged=r.curOp.forceUpdate=!0),r.curOp.updateMaxLine=!0,!Vt(n.doc,o)&&null!=n.height){var l=n.height;n.height=null;var s=kn(n)-l;s&&Ke(o,o.height+s)}sn(r,"markerChanged",r,e)}))},xi.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;t.maybeHiddenMarkers&&-1!=H(t.maybeHiddenMarkers,this)||(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},xi.prototype.detachLine=function(e){if(this.lines.splice(H(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},be(xi);var Ii=function(e,t){this.markers=e,this.primary=t;for(var n=0;n<e.length;++n)e[n].parent=this};function Ti(e){return e.findMarks(et(e.first,0),e.clipPos(et(e.lastLine())),(function(e){return e.parent}))}function Ni(e){for(var t=function(t){var n=e[t],r=[n.primary.doc];Do(n.primary.doc,(function(e){return r.push(e)}));for(var o=0;o<n.markers.length;o++){var i=n.markers[o];-1==H(r,i.doc)&&(i.parent=null,n.markers.splice(o--,1))}},n=0;n<e.length;n++)t(n)}Ii.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();sn(this,"clear")}},Ii.prototype.find=function(e,t){return this.primary.find(e,t)},be(Ii);var Ai=0,Ri=function(e,t,n,r,o){if(!(this instanceof Ri))return new Ri(e,t,n,r,o);null==n&&(n=0),ki.call(this,[new wi([new $t("",null)])]),this.first=n,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=n;var i=et(n,0);this.sel=So(i),this.history=new Fo(null),this.id=++Ai,this.modeOption=t,this.lineSep=r,this.direction="rtl"==o?"rtl":"ltr",this.extend=!1,"string"==typeof e&&(e=this.splitLines(e)),Oo(this,{from:i,to:i,text:e}),ei(this,So(i),W)};Ri.prototype=X(ki.prototype,{constructor:Ri,iter:function(e,t,n){n?this.iterN(e-this.first,t-e,n):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var n=0,r=0;r<t.length;++r)n+=t[r].height;this.insertInner(e-this.first,t,n)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=Ge(this,this.first,this.first+this.size);return!1===e?t:t.join(e||this.lineSeparator())},setValue:no((function(e){var t=et(this.first,0),n=this.first+this.size-1;ui(this,{from:t,to:et(n,$e(this,n).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&Lr(this.cm,0,0),ei(this,So(t),W)})),replaceRange:function(e,t,n,r){hi(this,e,t=lt(this,t),n=n?lt(this,n):t,r)},getRange:function(e,t,n){var r=qe(this,lt(this,e),lt(this,t));return!1===n?r:""===n?r.join(""):r.join(n||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(Je(this,e))return $e(this,e)},getLineNumber:function(e){return Ye(e)},getLineHandleVisualStart:function(e){return"number"==typeof e&&(e=$e(this,e)),Ft(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return lt(this,e)},getCursor:function(e){var t=this.sel.primary();return null==e||"head"==e?t.head:"anchor"==e?t.anchor:"end"==e||"to"==e||!1===e?t.to():t.from()},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:no((function(e,t,n){Jo(this,lt(this,"number"==typeof e?et(e,t||0):e),null,n)})),setSelection:no((function(e,t,n){Jo(this,lt(this,e),lt(this,t||e),n)})),extendSelection:no((function(e,t,n){Ko(this,lt(this,e),t&<(this,t),n)})),extendSelections:no((function(e,t){Yo(this,st(this,e),t)})),extendSelectionsBy:no((function(e,t){Yo(this,st(this,K(this.sel.ranges,e)),t)})),setSelections:no((function(e,t,n){if(e.length){for(var r=[],o=0;o<e.length;o++)r[o]=new Co(lt(this,e[o].anchor),lt(this,e[o].head||e[o].anchor));null==t&&(t=Math.min(e.length-1,this.sel.primIndex)),ei(this,xo(this.cm,r,t),n)}})),addSelection:no((function(e,t,n){var r=this.sel.ranges.slice(0);r.push(new Co(lt(this,e),lt(this,t||e))),ei(this,xo(this.cm,r,r.length-1),n)})),getSelection:function(e){for(var t,n=this.sel.ranges,r=0;r<n.length;r++){var o=qe(this,n[r].from(),n[r].to());t=t?t.concat(o):o}return!1===e?t:t.join(e||this.lineSeparator())},getSelections:function(e){for(var t=[],n=this.sel.ranges,r=0;r<n.length;r++){var o=qe(this,n[r].from(),n[r].to());!1!==e&&(o=o.join(e||this.lineSeparator())),t[r]=o}return t},replaceSelection:function(e,t,n){for(var r=[],o=0;o<this.sel.ranges.length;o++)r[o]=e;this.replaceSelections(r,t,n||"+input")},replaceSelections:no((function(e,t,n){for(var r=[],o=this.sel,i=0;i<o.ranges.length;i++){var a=o.ranges[i];r[i]={from:a.from(),to:a.to(),text:this.splitLines(e[i]),origin:n}}for(var l=t&&"end"!=t&&function(e,t,n){for(var r=[],o=et(e.first,0),i=o,a=0;a<t.length;a++){var l=t[a],s=Ao(l.from,o,i),c=Ao(Io(l),o,i);if(o=l.to,i=c,"around"==n){var u=e.sel.ranges[a],d=tt(u.head,u.anchor)<0;r[a]=new Co(d?c:s,d?s:c)}else r[a]=new Co(s,s)}return new _o(r,e.sel.primIndex)}(this,r,t),s=r.length-1;s>=0;s--)ui(this,r[s]);l?Qo(this,l):this.cm&&Rr(this.cm)})),undo:no((function(){pi(this,"undo")})),redo:no((function(){pi(this,"redo")})),undoSelection:no((function(){pi(this,"undo",!0)})),redoSelection:no((function(){pi(this,"redo",!0)})),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,n=0,r=0;r<e.done.length;r++)e.done[r].ranges||++t;for(var o=0;o<e.undone.length;o++)e.undone[o].ranges||++n;return{undo:t,redo:n}},clearHistory:function(){var e=this;this.history=new Fo(this.history),Do(this,(function(t){return t.history=e.history}),!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(e){return e&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(e){return this.history.generation==(e||this.cleanGeneration)},getHistory:function(){return{done:qo(this.history.done),undone:qo(this.history.undone)}},setHistory:function(e){var t=this.history=new Fo(this.history);t.done=qo(e.done.slice(0),null,!0),t.undone=qo(e.undone.slice(0),null,!0)},setGutterMarker:no((function(e,t,n){return yi(this,e,"gutter",(function(e){var r=e.gutterMarkers||(e.gutterMarkers={});return r[t]=n,!n&&te(r)&&(e.gutterMarkers=null),!0}))})),clearGutter:no((function(e){var t=this;this.iter((function(n){n.gutterMarkers&&n.gutterMarkers[e]&&yi(t,n,"gutter",(function(){return n.gutterMarkers[e]=null,te(n.gutterMarkers)&&(n.gutterMarkers=null),!0}))}))})),lineInfo:function(e){var t;if("number"==typeof e){if(!Je(this,e))return null;if(t=e,!(e=$e(this,e)))return null}else if(null==(t=Ye(e)))return null;return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},addLineClass:no((function(e,t,n){return yi(this,e,"gutter"==t?"gutter":"class",(function(e){var r="text"==t?"textClass":"background"==t?"bgClass":"gutter"==t?"gutterClass":"wrapClass";if(e[r]){if(C(n).test(e[r]))return!1;e[r]+=" "+n}else e[r]=n;return!0}))})),removeLineClass:no((function(e,t,n){return yi(this,e,"gutter"==t?"gutter":"class",(function(e){var r="text"==t?"textClass":"background"==t?"bgClass":"gutter"==t?"gutterClass":"wrapClass",o=e[r];if(!o)return!1;if(null==n)e[r]=null;else{var i=o.match(C(n));if(!i)return!1;var a=i.index+i[0].length;e[r]=o.slice(0,i.index)+(i.index&&a!=o.length?" ":"")+o.slice(a)||null}return!0}))})),addLineWidget:no((function(e,t,n){return function(e,t,n,r){var o=new Ei(e,n,r),i=e.cm;return i&&o.noHScroll&&(i.display.alignWidgets=!0),yi(e,t,"widget",(function(t){var n=t.widgets||(t.widgets=[]);if(null==o.insertAt?n.push(o):n.splice(Math.min(n.length,Math.max(0,o.insertAt)),0,o),o.line=t,i&&!Vt(e,t)){var r=Zt(t)<e.scrollTop;Ke(t,t.height+kn(o)),r&&Ar(i,o.height),i.curOp.forceUpdate=!0}return!0})),i&&sn(i,"lineWidgetAdded",i,o,"number"==typeof t?t:Ye(t)),o}(this,e,t,n)})),removeLineWidget:function(e){e.clear()},markText:function(e,t,n){return Si(this,lt(this,e),lt(this,t),n,n&&n.type||"range")},setBookmark:function(e,t){var n={replacedWith:t&&(null==t.nodeType?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return Si(this,e=lt(this,e),e,n,"bookmark")},findMarksAt:function(e){var t=[],n=$e(this,(e=lt(this,e)).line).markedSpans;if(n)for(var r=0;r<n.length;++r){var o=n[r];(null==o.from||o.from<=e.ch)&&(null==o.to||o.to>=e.ch)&&t.push(o.marker.parent||o.marker)}return t},findMarks:function(e,t,n){e=lt(this,e),t=lt(this,t);var r=[],o=e.line;return this.iter(e.line,t.line+1,(function(i){var a=i.markedSpans;if(a)for(var l=0;l<a.length;l++){var s=a[l];null!=s.to&&o==e.line&&e.ch>=s.to||null==s.from&&o!=e.line||null!=s.from&&o==t.line&&s.from>=t.ch||n&&!n(s.marker)||r.push(s.marker.parent||s.marker)}++o})),r},getAllMarks:function(){var e=[];return this.iter((function(t){var n=t.markedSpans;if(n)for(var r=0;r<n.length;++r)null!=n[r].from&&e.push(n[r].marker)})),e},posFromIndex:function(e){var t,n=this.first,r=this.lineSeparator().length;return this.iter((function(o){var i=o.text.length+r;if(i>e)return t=e,!0;e-=i,++n})),lt(this,et(n,t))},indexFromPos:function(e){var t=(e=lt(this,e)).ch;if(e.line<this.first||e.ch<0)return 0;var n=this.lineSeparator().length;return this.iter(this.first,e.line,(function(e){t+=e.text.length+n})),t},copy:function(e){var t=new Ri(Ge(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return t.scrollTop=this.scrollTop,t.scrollLeft=this.scrollLeft,t.sel=this.sel,t.extend=!1,e&&(t.history.undoDepth=this.history.undoDepth,t.setHistory(this.getHistory())),t},linkedDoc:function(e){e||(e={});var t=this.first,n=this.first+this.size;null!=e.from&&e.from>t&&(t=e.from),null!=e.to&&e.to<n&&(n=e.to);var r=new Ri(Ge(this,t,n),e.mode||this.modeOption,t,this.lineSep,this.direction);return e.sharedHist&&(r.history=this.history),(this.linked||(this.linked=[])).push({doc:r,sharedHist:e.sharedHist}),r.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n],o=r.find(),i=e.clipPos(o.from),a=e.clipPos(o.to);if(tt(i,a)){var l=Si(e,i,a,r.primary,r.primary.type);r.markers.push(l),l.parent=r}}}(r,Ti(this)),r},unlinkDoc:function(e){if(e instanceof Ia&&(e=e.doc),this.linked)for(var t=0;t<this.linked.length;++t)if(this.linked[t].doc==e){this.linked.splice(t,1),e.unlinkDoc(this),Ni(Ti(this));break}if(e.history==this.history){var n=[e.id];Do(e,(function(e){return n.push(e.id)}),!0),e.history=new Fo(null),e.history.done=qo(this.history.done,n),e.history.undone=qo(this.history.undone,n)}},iterLinkedDocs:function(e){Do(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):Re(e)},lineSeparator:function(){return this.lineSep||"\n"},setDirection:no((function(e){var t;"rtl"!=e&&(e="ltr"),e!=this.direction&&(this.direction=e,this.iter((function(e){return e.order=null})),this.cm&&Qr(t=this.cm,(function(){Bo(t),dr(t)})))}))}),Ri.prototype.eachLine=Ri.prototype.iter;var Li=0;function Pi(e){var t=this;if(Oi(t),!he(t,e)&&!En(t.display,e)){ye(e),a&&(Li=+new Date);var n=cr(t,e,!0),r=e.dataTransfer.files;if(n&&!t.isReadOnly())if(r&&r.length&&window.FileReader&&window.File)for(var o=r.length,i=Array(o),l=0,s=function(){++l==o&&eo(t,(function(){var e={from:n=lt(t.doc,n),to:n,text:t.doc.splitLines(i.filter((function(e){return null!=e})).join(t.doc.lineSeparator())),origin:"paste"};ui(t.doc,e),Qo(t.doc,So(lt(t.doc,n),lt(t.doc,Io(e))))}))()},c=function(e,n){if(t.options.allowDropFileTypes&&-1==H(t.options.allowDropFileTypes,e.type))s();else{var r=new FileReader;r.onerror=function(){return s()},r.onload=function(){var e=r.result;/[\x00-\x08\x0e-\x1f]{2}/.test(e)||(i[n]=e),s()},r.readAsText(e)}},u=0;u<r.length;u++)c(r[u],u);else{if(t.state.draggingText&&t.doc.sel.contains(n)>-1)return t.state.draggingText(e),void setTimeout((function(){return t.display.input.focus()}),20);try{var d=e.dataTransfer.getData("Text");if(d){var p;if(t.state.draggingText&&!t.state.draggingText.copy&&(p=t.listSelections()),ti(t.doc,So(n,n)),p)for(var m=0;m<p.length;++m)hi(t.doc,"",p[m].anchor,p[m].head,"drag");t.replaceSelection(d,"around","paste"),t.display.input.focus()}}catch(e){}}}}function Oi(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function Di(e){if(document.getElementsByClassName){for(var t=document.getElementsByClassName("CodeMirror"),n=[],r=0;r<t.length;r++){var o=t[r].CodeMirror;o&&n.push(o)}n.length&&n[0].operation((function(){for(var t=0;t<n.length;t++)e(n[t])}))}}var Mi=!1;function Bi(){var e;Mi||(de(window,"resize",(function(){null==e&&(e=setTimeout((function(){e=null,Di(Fi)}),100))})),de(window,"blur",(function(){return Di(xr)})),Mi=!0)}function Fi(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var zi={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",224:"Mod",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},Hi=0;Hi<10;Hi++)zi[Hi+48]=zi[Hi+96]=String(Hi);for(var Vi=65;Vi<=90;Vi++)zi[Vi]=String.fromCharCode(Vi);for(var Wi=1;Wi<=12;Wi++)zi[Wi+111]=zi[Wi+63235]="F"+Wi;var Zi={};function ji(e){var t,n,r,o,i=e.split(/-(?!$)/);e=i[i.length-1];for(var a=0;a<i.length-1;a++){var l=i[a];if(/^(cmd|meta|m)$/i.test(l))o=!0;else if(/^a(lt)?$/i.test(l))t=!0;else if(/^(c|ctrl|control)$/i.test(l))n=!0;else{if(!/^s(hift)?$/i.test(l))throw new Error("Unrecognized modifier name: "+l);r=!0}}return t&&(e="Alt-"+e),n&&(e="Ctrl-"+e),o&&(e="Cmd-"+e),r&&(e="Shift-"+e),e}function Ui(e){var t={};for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];if(/^(name|fallthrough|(de|at)tach)$/.test(n))continue;if("..."==r){delete e[n];continue}for(var o=K(n.split(" "),ji),i=0;i<o.length;i++){var a=void 0,l=void 0;i==o.length-1?(l=o.join(" "),a=r):(l=o.slice(0,i+1).join(" "),a="...");var s=t[l];if(s){if(s!=a)throw new Error("Inconsistent bindings for "+l)}else t[l]=a}delete e[n]}for(var c in t)e[c]=t[c];return e}function $i(e,t,n,r){var o=(t=Yi(t)).call?t.call(e,r):t[e];if(!1===o)return"nothing";if("..."===o)return"multi";if(null!=o&&n(o))return"handled";if(t.fallthrough){if("[object Array]"!=Object.prototype.toString.call(t.fallthrough))return $i(e,t.fallthrough,n,r);for(var i=0;i<t.fallthrough.length;i++){var a=$i(e,t.fallthrough[i],n,r);if(a)return a}}}function qi(e){var t="string"==typeof e?e:zi[e.keyCode];return"Ctrl"==t||"Alt"==t||"Shift"==t||"Mod"==t}function Gi(e,t,n){var r=e;return t.altKey&&"Alt"!=r&&(e="Alt-"+e),(E?t.metaKey:t.ctrlKey)&&"Ctrl"!=r&&(e="Ctrl-"+e),(E?t.ctrlKey:t.metaKey)&&"Mod"!=r&&(e="Cmd-"+e),!n&&t.shiftKey&&"Shift"!=r&&(e="Shift-"+e),e}function Ki(e,t){if(d&&34==e.keyCode&&e.char)return!1;var n=zi[e.keyCode];return null!=n&&!e.altGraphKey&&(3==e.keyCode&&e.code&&(n=e.code),Gi(n,e,t))}function Yi(e){return"string"==typeof e?Zi[e]:e}function Xi(e,t){for(var n=e.doc.sel.ranges,r=[],o=0;o<n.length;o++){for(var i=t(n[o]);r.length&&tt(i.from,G(r).to)<=0;){var a=r.pop();if(tt(a.from,i.from)<0){i.from=a.from;break}}r.push(i)}Qr(e,(function(){for(var t=r.length-1;t>=0;t--)hi(e.doc,"",r[t].from,r[t].to,"+delete");Rr(e)}))}function Ji(e,t,n){var r=oe(e.text,t+n,n);return r<0||r>e.text.length?null:r}function Qi(e,t,n){var r=Ji(e,t.ch,n);return null==r?null:new et(t.line,r,n<0?"after":"before")}function ea(e,t,n,r,o){if(e){"rtl"==t.doc.direction&&(o=-o);var i=ce(n,t.doc.direction);if(i){var a,l=o<0?G(i):i[0],s=o<0==(1==l.level)?"after":"before";if(l.level>0||"rtl"==t.doc.direction){var c=Ln(t,n);a=o<0?n.text.length-1:0;var u=Pn(t,c,a).top;a=ie((function(e){return Pn(t,c,e).top==u}),o<0==(1==l.level)?l.from:l.to-1,a),"before"==s&&(a=Ji(n,a,1))}else a=o<0?l.to:l.from;return new et(r,a,s)}}return new et(r,o<0?n.text.length:0,o<0?"before":"after")}Zi.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},Zi.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},Zi.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},Zi.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},Zi.default=b?Zi.macDefault:Zi.pcDefault;var ta={selectAll:si,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),W)},killLine:function(e){return Xi(e,(function(t){if(t.empty()){var n=$e(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.line<e.lastLine()?{from:t.head,to:et(t.head.line+1,0)}:{from:t.head,to:et(t.head.line,n)}}return{from:t.from(),to:t.to()}}))},deleteLine:function(e){return Xi(e,(function(t){return{from:et(t.from().line,0),to:lt(e.doc,et(t.to().line+1,0))}}))},delLineLeft:function(e){return Xi(e,(function(e){return{from:et(e.from().line,0),to:e.from()}}))},delWrappedLineLeft:function(e){return Xi(e,(function(t){var n=e.charCoords(t.head,"div").top+5;return{from:e.coordsChar({left:0,top:n},"div"),to:t.from()}}))},delWrappedLineRight:function(e){return Xi(e,(function(t){var n=e.charCoords(t.head,"div").top+5,r=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:n},"div");return{from:t.from(),to:r}}))},undo:function(e){return e.undo()},redo:function(e){return e.redo()},undoSelection:function(e){return e.undoSelection()},redoSelection:function(e){return e.redoSelection()},goDocStart:function(e){return e.extendSelection(et(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(et(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy((function(t){return na(e,t.head.line)}),{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy((function(t){return ra(e,t.head)}),{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy((function(t){return function(e,t){var n=$e(e.doc,t),r=function(e){for(var t;t=Dt(e);)e=t.find(1,!0).line;return e}(n);return r!=n&&(t=Ye(r)),ea(!0,e,n,t,-1)}(e,t.head.line)}),{origin:"+move",bias:-1})},goLineRight:function(e){return e.extendSelectionsBy((function(t){var n=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:n},"div")}),j)},goLineLeft:function(e){return e.extendSelectionsBy((function(t){var n=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:0,top:n},"div")}),j)},goLineLeftSmart:function(e){return e.extendSelectionsBy((function(t){var n=e.cursorCoords(t.head,"div").top+5,r=e.coordsChar({left:0,top:n},"div");return r.ch<e.getLine(r.line).search(/\S/)?ra(e,t.head):r}),j)},goLineUp:function(e){return e.moveV(-1,"line")},goLineDown:function(e){return e.moveV(1,"line")},goPageUp:function(e){return e.moveV(-1,"page")},goPageDown:function(e){return e.moveV(1,"page")},goCharLeft:function(e){return e.moveH(-1,"char")},goCharRight:function(e){return e.moveH(1,"char")},goColumnLeft:function(e){return e.moveH(-1,"column")},goColumnRight:function(e){return e.moveH(1,"column")},goWordLeft:function(e){return e.moveH(-1,"word")},goGroupRight:function(e){return e.moveH(1,"group")},goGroupLeft:function(e){return e.moveH(-1,"group")},goWordRight:function(e){return e.moveH(1,"word")},delCharBefore:function(e){return e.deleteH(-1,"codepoint")},delCharAfter:function(e){return e.deleteH(1,"char")},delWordBefore:function(e){return e.deleteH(-1,"word")},delWordAfter:function(e){return e.deleteH(1,"word")},delGroupBefore:function(e){return e.deleteH(-1,"group")},delGroupAfter:function(e){return e.deleteH(1,"group")},indentAuto:function(e){return e.indentSelection("smart")},indentMore:function(e){return e.indentSelection("add")},indentLess:function(e){return e.indentSelection("subtract")},insertTab:function(e){return e.replaceSelection("\t")},insertSoftTab:function(e){for(var t=[],n=e.listSelections(),r=e.options.tabSize,o=0;o<n.length;o++){var i=n[o].from(),a=F(e.getLine(i.line),i.ch,r);t.push(q(r-a%r))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return Qr(e,(function(){for(var t=e.listSelections(),n=[],r=0;r<t.length;r++)if(t[r].empty()){var o=t[r].head,i=$e(e.doc,o.line).text;if(i)if(o.ch==i.length&&(o=new et(o.line,o.ch-1)),o.ch>0)o=new et(o.line,o.ch+1),e.replaceRange(i.charAt(o.ch-1)+i.charAt(o.ch-2),et(o.line,o.ch-2),o,"+transpose");else if(o.line>e.doc.first){var a=$e(e.doc,o.line-1).text;a&&(o=new et(o.line,1),e.replaceRange(i.charAt(0)+e.doc.lineSeparator()+a.charAt(a.length-1),et(o.line-1,a.length-1),o,"+transpose"))}n.push(new Co(o,o))}e.setSelections(n)}))},newlineAndIndent:function(e){return Qr(e,(function(){for(var t=e.listSelections(),n=t.length-1;n>=0;n--)e.replaceRange(e.doc.lineSeparator(),t[n].anchor,t[n].head,"+input");t=e.listSelections();for(var r=0;r<t.length;r++)e.indentLine(t[r].from().line,null,!0);Rr(e)}))},openLine:function(e){return e.replaceSelection("\n","start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function na(e,t){var n=$e(e.doc,t),r=Ft(n);return r!=n&&(t=Ye(r)),ea(!0,e,r,t,1)}function ra(e,t){var n=na(e,t.line),r=$e(e.doc,n.line),o=ce(r,e.doc.direction);if(!o||0==o[0].level){var i=Math.max(n.ch,r.text.search(/\S/)),a=t.line==n.line&&t.ch<=i&&t.ch;return et(n.line,a?0:i,n.sticky)}return n}function oa(e,t,n){if("string"==typeof t&&!(t=ta[t]))return!1;e.display.input.ensurePolled();var r=e.display.shift,o=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),n&&(e.display.shift=!1),o=t(e)!=V}finally{e.display.shift=r,e.state.suppressEdits=!1}return o}var ia=new z;function aa(e,t,n,r){var o=e.state.keySeq;if(o){if(qi(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:ia.set(50,(function(){e.state.keySeq==o&&(e.state.keySeq=null,e.display.input.reset())})),la(e,o+" "+t,n,r))return!0}return la(e,t,n,r)}function la(e,t,n,r){var o=function(e,t,n){for(var r=0;r<e.state.keyMaps.length;r++){var o=$i(t,e.state.keyMaps[r],n,e);if(o)return o}return e.options.extraKeys&&$i(t,e.options.extraKeys,n,e)||$i(t,e.options.keyMap,n,e)}(e,t,r);return"multi"==o&&(e.state.keySeq=t),"handled"==o&&sn(e,"keyHandled",e,t,n),"handled"!=o&&"multi"!=o||(ye(n),kr(e)),!!o}function sa(e,t){var n=Ki(t,!0);return!!n&&(t.shiftKey&&!e.state.keySeq?aa(e,"Shift-"+n,t,(function(t){return oa(e,t,!0)}))||aa(e,n,t,(function(t){if("string"==typeof t?/^go[A-Z]/.test(t):t.motion)return oa(e,t)})):aa(e,n,t,(function(t){return oa(e,t)})))}var ca=null;function ua(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField()||(t.curOp.focus=L(),he(t,e)))){a&&l<11&&27==e.keyCode&&(e.returnValue=!1);var r=e.keyCode;t.display.shift=16==r||e.shiftKey;var o=sa(t,e);d&&(ca=o?r:null,o||88!=r||Pe||!(b?e.metaKey:e.ctrlKey)||t.replaceSelection("",null,"cut")),n&&!b&&!o&&46==r&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),18!=r||/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)||function(e){var t=e.display.lineDiv;function n(e){18!=e.keyCode&&e.altKey||(S(t,"CodeMirror-crosshair"),me(document,"keyup",n),me(document,"mouseover",n))}P(t,"CodeMirror-crosshair"),de(document,"keyup",n),de(document,"mouseover",n)}(t)}}function da(e){16==e.keyCode&&(this.doc.sel.shift=!1),he(this,e)}function pa(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField()||En(t.display,e)||he(t,e)||e.ctrlKey&&!e.altKey||b&&e.metaKey)){var n=e.keyCode,r=e.charCode;if(d&&n==ca)return ca=null,void ye(e);if(!d||e.which&&!(e.which<10)||!sa(t,e)){var o=String.fromCharCode(null==r?n:r);"\b"!=o&&(function(e,t,n){return aa(e,"'"+n+"'",t,(function(t){return oa(e,t,!0)}))}(t,e,o)||t.display.input.onKeyPress(e))}}}var ma,fa,ha=function(e,t,n){this.time=e,this.pos=t,this.button=n};function ga(e){var t=this,n=t.display;if(!(he(t,e)||n.activeTouch&&n.input.supportsTouch()))if(n.input.ensurePolled(),n.shift=e.shiftKey,En(n,e))s||(n.scroller.draggable=!1,setTimeout((function(){return n.scroller.draggable=!0}),100));else if(!ya(t,e)){var r=cr(t,e),o=Ce(e),i=r?function(e,t){var n=+new Date;return fa&&fa.compare(n,e,t)?(ma=fa=null,"triple"):ma&&ma.compare(n,e,t)?(fa=new ha(n,e,t),ma=null,"double"):(ma=new ha(n,e,t),fa=null,"single")}(r,o):"single";window.focus(),1==o&&t.state.selectingText&&t.state.selectingText(e),r&&function(e,t,n,r,o){var i="Click";return"double"==r?i="Double"+i:"triple"==r&&(i="Triple"+i),aa(e,Gi(i=(1==t?"Left":2==t?"Middle":"Right")+i,o),o,(function(t){if("string"==typeof t&&(t=ta[t]),!t)return!1;var r=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),r=t(e,n)!=V}finally{e.state.suppressEdits=!1}return r}))}(t,o,r,i,e)||(1==o?r?function(e,t,n,r){a?setTimeout(M(Er,e),0):e.curOp.focus=L();var o,i=function(e,t,n){var r=e.getOption("configureMouse"),o=r?r(e,t,n):{};if(null==o.unit){var i=y?n.shiftKey&&n.metaKey:n.altKey;o.unit=i?"rectangle":"single"==t?"char":"double"==t?"word":"line"}return(null==o.extend||e.doc.extend)&&(o.extend=e.doc.extend||n.shiftKey),null==o.addNew&&(o.addNew=b?n.metaKey:n.ctrlKey),null==o.moveOnDrag&&(o.moveOnDrag=!(b?n.altKey:n.ctrlKey)),o}(e,n,r),c=e.doc.sel;e.options.dragDrop&&Ie&&!e.isReadOnly()&&"single"==n&&(o=c.contains(t))>-1&&(tt((o=c.ranges[o]).from(),t)<0||t.xRel>0)&&(tt(o.to(),t)>0||t.xRel<0)?function(e,t,n,r){var o=e.display,i=!1,c=eo(e,(function(t){s&&(o.scroller.draggable=!1),e.state.draggingText=!1,e.state.delayingBlurEvent&&(e.hasFocus()?e.state.delayingBlurEvent=!1:_r(e)),me(o.wrapper.ownerDocument,"mouseup",c),me(o.wrapper.ownerDocument,"mousemove",u),me(o.scroller,"dragstart",d),me(o.scroller,"drop",c),i||(ye(t),r.addNew||Ko(e.doc,n,null,null,r.extend),s&&!p||a&&9==l?setTimeout((function(){o.wrapper.ownerDocument.body.focus({preventScroll:!0}),o.input.focus()}),20):o.input.focus())})),u=function(e){i=i||Math.abs(t.clientX-e.clientX)+Math.abs(t.clientY-e.clientY)>=10},d=function(){return i=!0};s&&(o.scroller.draggable=!0),e.state.draggingText=c,c.copy=!r.moveOnDrag,de(o.wrapper.ownerDocument,"mouseup",c),de(o.wrapper.ownerDocument,"mousemove",u),de(o.scroller,"dragstart",d),de(o.scroller,"drop",c),e.state.delayingBlurEvent=!0,setTimeout((function(){return o.input.focus()}),20),o.scroller.dragDrop&&o.scroller.dragDrop()}(e,r,t,i):function(e,t,n,r){a&&_r(e);var o=e.display,i=e.doc;ye(t);var l,s,c=i.sel,u=c.ranges;if(r.addNew&&!r.extend?(s=i.sel.contains(n),l=s>-1?u[s]:new Co(n,n)):(l=i.sel.primary(),s=i.sel.primIndex),"rectangle"==r.unit)r.addNew||(l=new Co(n,n)),n=cr(e,t,!0,!0),s=-1;else{var d=va(e,n,r.unit);l=r.extend?Go(l,d.anchor,d.head,r.extend):d}r.addNew?-1==s?(s=u.length,ei(i,xo(e,u.concat([l]),s),{scroll:!1,origin:"*mouse"})):u.length>1&&u[s].empty()&&"char"==r.unit&&!r.extend?(ei(i,xo(e,u.slice(0,s).concat(u.slice(s+1)),0),{scroll:!1,origin:"*mouse"}),c=i.sel):Xo(i,s,l,Z):(s=0,ei(i,new _o([l],0),Z),c=i.sel);var p=n;function m(t){if(0!=tt(p,t))if(p=t,"rectangle"==r.unit){for(var o=[],a=e.options.tabSize,u=F($e(i,n.line).text,n.ch,a),d=F($e(i,t.line).text,t.ch,a),m=Math.min(u,d),f=Math.max(u,d),h=Math.min(n.line,t.line),g=Math.min(e.lastLine(),Math.max(n.line,t.line));h<=g;h++){var v=$e(i,h).text,b=U(v,m,a);m==f?o.push(new Co(et(h,b),et(h,b))):v.length>b&&o.push(new Co(et(h,b),et(h,U(v,f,a))))}o.length||o.push(new Co(n,n)),ei(i,xo(e,c.ranges.slice(0,s).concat(o),s),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var y,w=l,k=va(e,t,r.unit),E=w.anchor;tt(k.anchor,E)>0?(y=k.head,E=it(w.from(),k.anchor)):(y=k.anchor,E=ot(w.to(),k.head));var _=c.ranges.slice(0);_[s]=function(e,t){var n=t.anchor,r=t.head,o=$e(e.doc,n.line);if(0==tt(n,r)&&n.sticky==r.sticky)return t;var i=ce(o);if(!i)return t;var a=le(i,n.ch,n.sticky),l=i[a];if(l.from!=n.ch&&l.to!=n.ch)return t;var s,c=a+(l.from==n.ch==(1!=l.level)?0:1);if(0==c||c==i.length)return t;if(r.line!=n.line)s=(r.line-n.line)*("ltr"==e.doc.direction?1:-1)>0;else{var u=le(i,r.ch,r.sticky),d=u-a||(r.ch-n.ch)*(1==l.level?-1:1);s=u==c-1||u==c?d<0:d>0}var p=i[c+(s?-1:0)],m=s==(1==p.level),f=m?p.from:p.to,h=m?"after":"before";return n.ch==f&&n.sticky==h?t:new Co(new et(n.line,f,h),r)}(e,new Co(lt(i,E),y)),ei(i,xo(e,_,s),Z)}}var f=o.wrapper.getBoundingClientRect(),h=0;function g(t){var n=++h,a=cr(e,t,!0,"rectangle"==r.unit);if(a)if(0!=tt(a,p)){e.curOp.focus=L(),m(a);var l=Tr(o,i);(a.line>=l.to||a.line<l.from)&&setTimeout(eo(e,(function(){h==n&&g(t)})),150)}else{var s=t.clientY<f.top?-20:t.clientY>f.bottom?20:0;s&&setTimeout(eo(e,(function(){h==n&&(o.scroller.scrollTop+=s,g(t))})),50)}}function v(t){e.state.selectingText=!1,h=1/0,t&&(ye(t),o.input.focus()),me(o.wrapper.ownerDocument,"mousemove",b),me(o.wrapper.ownerDocument,"mouseup",y),i.history.lastSelOrigin=null}var b=eo(e,(function(e){0!==e.buttons&&Ce(e)?g(e):v(e)})),y=eo(e,v);e.state.selectingText=y,de(o.wrapper.ownerDocument,"mousemove",b),de(o.wrapper.ownerDocument,"mouseup",y)}(e,r,t,i)}(t,r,i,e):_e(e)==n.scroller&&ye(e):2==o?(r&&Ko(t.doc,r),setTimeout((function(){return n.input.focus()}),20)):3==o&&(_?t.display.input.onContextMenu(e):_r(t)))}}function va(e,t,n){if("char"==n)return new Co(t,t);if("word"==n)return e.findWordAt(t);if("line"==n)return new Co(et(t.line,0),lt(e.doc,et(t.line+1,0)));var r=n(e,t);return new Co(r.from,r.to)}function ba(e,t,n,r){var o,i;if(t.touches)o=t.touches[0].clientX,i=t.touches[0].clientY;else try{o=t.clientX,i=t.clientY}catch(e){return!1}if(o>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&ye(t);var a=e.display,l=a.lineDiv.getBoundingClientRect();if(i>l.bottom||!ve(e,n))return ke(t);i-=l.top-a.viewOffset;for(var s=0;s<e.display.gutterSpecs.length;++s){var c=a.gutters.childNodes[s];if(c&&c.getBoundingClientRect().right>=o)return fe(e,n,e,Xe(e.doc,i),e.display.gutterSpecs[s].className,t),ke(t)}}function ya(e,t){return ba(e,t,"gutterClick",!0)}function wa(e,t){En(e.display,t)||function(e,t){return!!ve(e,"gutterContextMenu")&&ba(e,t,"gutterContextMenu",!1)}(e,t)||he(e,t,"contextmenu")||_||e.display.input.onContextMenu(t)}function ka(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Hn(e)}ha.prototype.compare=function(e,t,n){return this.time+400>e&&0==tt(t,this.pos)&&n==this.button};var Ea={toString:function(){return"CodeMirror.Init"}},_a={},Ca={};function xa(e,t,n){if(!t!=!(n&&n!=Ea)){var r=e.display.dragFunctions,o=t?de:me;o(e.display.scroller,"dragstart",r.start),o(e.display.scroller,"dragenter",r.enter),o(e.display.scroller,"dragover",r.over),o(e.display.scroller,"dragleave",r.leave),o(e.display.scroller,"drop",r.drop)}}function Sa(e){e.options.lineWrapping?(P(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(S(e.display.wrapper,"CodeMirror-wrap"),Ut(e)),sr(e),dr(e),Hn(e),setTimeout((function(){return Vr(e)}),100)}function Ia(e,t){var n=this;if(!(this instanceof Ia))return new Ia(e,t);this.options=t=t?B(t):{},B(_a,t,!1);var r=t.value;"string"==typeof r?r=new Ri(r,t.mode,null,t.lineSeparator,t.direction):t.mode&&(r.modeOption=t.mode),this.doc=r;var o=new Ia.inputStyles[t.inputStyle](this),i=this.display=new vo(e,r,o,t);for(var c in i.wrapper.CodeMirror=this,ka(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),jr(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new z,keySeq:null,specialChars:null},t.autofocus&&!v&&i.input.focus(),a&&l<11&&setTimeout((function(){return n.display.input.reset(!0)}),20),function(e){var t=e.display;de(t.scroller,"mousedown",eo(e,ga)),de(t.scroller,"dblclick",a&&l<11?eo(e,(function(t){if(!he(e,t)){var n=cr(e,t);if(n&&!ya(e,t)&&!En(e.display,t)){ye(t);var r=e.findWordAt(n);Ko(e.doc,r.anchor,r.head)}}})):function(t){return he(e,t)||ye(t)}),de(t.scroller,"contextmenu",(function(t){return wa(e,t)})),de(t.input.getField(),"contextmenu",(function(n){t.scroller.contains(n.target)||wa(e,n)}));var n,r={end:0};function o(){t.activeTouch&&(n=setTimeout((function(){return t.activeTouch=null}),1e3),(r=t.activeTouch).end=+new Date)}function i(e){if(1!=e.touches.length)return!1;var t=e.touches[0];return t.radiusX<=1&&t.radiusY<=1}function s(e,t){if(null==t.left)return!0;var n=t.left-e.left,r=t.top-e.top;return n*n+r*r>400}de(t.scroller,"touchstart",(function(o){if(!he(e,o)&&!i(o)&&!ya(e,o)){t.input.ensurePolled(),clearTimeout(n);var a=+new Date;t.activeTouch={start:a,moved:!1,prev:a-r.end<=300?r:null},1==o.touches.length&&(t.activeTouch.left=o.touches[0].pageX,t.activeTouch.top=o.touches[0].pageY)}})),de(t.scroller,"touchmove",(function(){t.activeTouch&&(t.activeTouch.moved=!0)})),de(t.scroller,"touchend",(function(n){var r=t.activeTouch;if(r&&!En(t,n)&&null!=r.left&&!r.moved&&new Date-r.start<300){var i,a=e.coordsChar(t.activeTouch,"page");i=!r.prev||s(r,r.prev)?new Co(a,a):!r.prev.prev||s(r,r.prev.prev)?e.findWordAt(a):new Co(et(a.line,0),lt(e.doc,et(a.line+1,0))),e.setSelection(i.anchor,i.head),e.focus(),ye(n)}o()})),de(t.scroller,"touchcancel",o),de(t.scroller,"scroll",(function(){t.scroller.clientHeight&&(Dr(e,t.scroller.scrollTop),Br(e,t.scroller.scrollLeft,!0),fe(e,"scroll",e))})),de(t.scroller,"mousewheel",(function(t){return Eo(e,t)})),de(t.scroller,"DOMMouseScroll",(function(t){return Eo(e,t)})),de(t.wrapper,"scroll",(function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0})),t.dragFunctions={enter:function(t){he(e,t)||Ee(t)},over:function(t){he(e,t)||(function(e,t){var n=cr(e,t);if(n){var r=document.createDocumentFragment();br(e,n,r),e.display.dragCursor||(e.display.dragCursor=N("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),T(e.display.dragCursor,r)}}(e,t),Ee(t))},start:function(t){return function(e,t){if(a&&(!e.state.draggingText||+new Date-Li<100))Ee(t);else if(!he(e,t)&&!En(e.display,t)&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!p)){var n=N("img",null,null,"position: fixed; left: 0; top: 0;");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",d&&(n.width=n.height=1,e.display.wrapper.appendChild(n),n._top=n.offsetTop),t.dataTransfer.setDragImage(n,0,0),d&&n.parentNode.removeChild(n)}}(e,t)},drop:eo(e,Pi),leave:function(t){he(e,t)||Oi(e)}};var c=t.input.getField();de(c,"keyup",(function(t){return da.call(e,t)})),de(c,"keydown",eo(e,ua)),de(c,"keypress",eo(e,pa)),de(c,"focus",(function(t){return Cr(e,t)})),de(c,"blur",(function(t){return xr(e,t)}))}(this),Bi(),$r(this),this.curOp.forceUpdate=!0,Mo(this,r),t.autofocus&&!v||this.hasFocus()?setTimeout((function(){n.hasFocus()&&!n.state.focused&&Cr(n)}),20):xr(this),Ca)Ca.hasOwnProperty(c)&&Ca[c](this,t[c],Ea);mo(this),t.finishInit&&t.finishInit(this);for(var u=0;u<Ta.length;++u)Ta[u](this);qr(this),s&&t.lineWrapping&&"optimizelegibility"==getComputedStyle(i.lineDiv).textRendering&&(i.lineDiv.style.textRendering="auto")}Ia.defaults=_a,Ia.optionHandlers=Ca;var Ta=[];function Na(e,t,n,r){var o,i=e.doc;null==n&&(n="add"),"smart"==n&&(i.mode.indent?o=mt(e,t).state:n="prev");var a=e.options.tabSize,l=$e(i,t),s=F(l.text,null,a);l.stateAfter&&(l.stateAfter=null);var c,u=l.text.match(/^\s*/)[0];if(r||/\S/.test(l.text)){if("smart"==n&&((c=i.mode.indent(o,l.text.slice(u.length),l.text))==V||c>150)){if(!r)return;n="prev"}}else c=0,n="not";"prev"==n?c=t>i.first?F($e(i,t-1).text,null,a):0:"add"==n?c=s+e.options.indentUnit:"subtract"==n?c=s-e.options.indentUnit:"number"==typeof n&&(c=s+n),c=Math.max(0,c);var d="",p=0;if(e.options.indentWithTabs)for(var m=Math.floor(c/a);m;--m)p+=a,d+="\t";if(p<c&&(d+=q(c-p)),d!=u)return hi(i,d,et(t,0),et(t,u.length),"+input"),l.stateAfter=null,!0;for(var f=0;f<i.sel.ranges.length;f++){var h=i.sel.ranges[f];if(h.head.line==t&&h.head.ch<u.length){var g=et(t,u.length);Xo(i,f,new Co(g,g));break}}}Ia.defineInitHook=function(e){return Ta.push(e)};var Aa=null;function Ra(e){Aa=e}function La(e,t,n,r,o){var i=e.doc;e.display.shift=!1,r||(r=i.sel);var a=+new Date-200,l="paste"==o||e.state.pasteIncoming>a,s=Re(t),c=null;if(l&&r.ranges.length>1)if(Aa&&Aa.text.join("\n")==t){if(r.ranges.length%Aa.text.length==0){c=[];for(var u=0;u<Aa.text.length;u++)c.push(i.splitLines(Aa.text[u]))}}else s.length==r.ranges.length&&e.options.pasteLinesPerSelection&&(c=K(s,(function(e){return[e]})));for(var d=e.curOp.updateInput,p=r.ranges.length-1;p>=0;p--){var m=r.ranges[p],f=m.from(),h=m.to();m.empty()&&(n&&n>0?f=et(f.line,f.ch-n):e.state.overwrite&&!l?h=et(h.line,Math.min($e(i,h.line).text.length,h.ch+G(s).length)):l&&Aa&&Aa.lineWise&&Aa.text.join("\n")==s.join("\n")&&(f=h=et(f.line,0)));var g={from:f,to:h,text:c?c[p%c.length]:s,origin:o||(l?"paste":e.state.cutIncoming>a?"cut":"+input")};ui(e.doc,g),sn(e,"inputRead",e,g)}t&&!l&&Oa(e,t),Rr(e),e.curOp.updateInput<2&&(e.curOp.updateInput=d),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Pa(e,t){var n=e.clipboardData&&e.clipboardData.getData("Text");if(n)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||Qr(t,(function(){return La(t,n,0,null,"paste")})),!0}function Oa(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var n=e.doc.sel,r=n.ranges.length-1;r>=0;r--){var o=n.ranges[r];if(!(o.head.ch>100||r&&n.ranges[r-1].head.line==o.head.line)){var i=e.getModeAt(o.head),a=!1;if(i.electricChars){for(var l=0;l<i.electricChars.length;l++)if(t.indexOf(i.electricChars.charAt(l))>-1){a=Na(e,o.head.line,"smart");break}}else i.electricInput&&i.electricInput.test($e(e.doc,o.head.line).text.slice(0,o.head.ch))&&(a=Na(e,o.head.line,"smart"));a&&sn(e,"electricInput",e,o.head.line)}}}function Da(e){for(var t=[],n=[],r=0;r<e.doc.sel.ranges.length;r++){var o=e.doc.sel.ranges[r].head.line,i={anchor:et(o,0),head:et(o+1,0)};n.push(i),t.push(e.getRange(i.anchor,i.head))}return{text:t,ranges:n}}function Ma(e,t,n,r){e.setAttribute("autocorrect",n?"":"off"),e.setAttribute("autocapitalize",r?"":"off"),e.setAttribute("spellcheck",!!t)}function Ba(){var e=N("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; min-height: 1em; outline: none"),t=N("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return s?e.style.width="1000px":e.setAttribute("wrap","off"),h&&(e.style.border="1px solid black"),Ma(e),t}function Fa(e,t,n,r,o){var i=t,a=n,l=$e(e,t.line),s=o&&"rtl"==e.direction?-n:n;function c(i){var a,c;if("codepoint"==r){var u=l.text.charCodeAt(t.ch+(n>0?0:-1));if(isNaN(u))a=null;else{var d=n>0?u>=55296&&u<56320:u>=56320&&u<57343;a=new et(t.line,Math.max(0,Math.min(l.text.length,t.ch+n*(d?2:1))),-n)}}else a=o?function(e,t,n,r){var o=ce(t,e.doc.direction);if(!o)return Qi(t,n,r);n.ch>=t.text.length?(n.ch=t.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var i=le(o,n.ch,n.sticky),a=o[i];if("ltr"==e.doc.direction&&a.level%2==0&&(r>0?a.to>n.ch:a.from<n.ch))return Qi(t,n,r);var l,s=function(e,n){return Ji(t,e instanceof et?e.ch:e,n)},c=function(n){return e.options.lineWrapping?(l=l||Ln(e,t),Jn(e,t,l,n)):{begin:0,end:t.text.length}},u=c("before"==n.sticky?s(n,-1):n.ch);if("rtl"==e.doc.direction||1==a.level){var d=1==a.level==r<0,p=s(n,d?1:-1);if(null!=p&&(d?p<=a.to&&p<=u.end:p>=a.from&&p>=u.begin)){var m=d?"before":"after";return new et(n.line,p,m)}}var f=function(e,t,r){for(var i=function(e,t){return t?new et(n.line,s(e,1),"before"):new et(n.line,e,"after")};e>=0&&e<o.length;e+=t){var a=o[e],l=t>0==(1!=a.level),c=l?r.begin:s(r.end,-1);if(a.from<=c&&c<a.to)return i(c,l);if(c=l?a.from:s(a.to,-1),r.begin<=c&&c<r.end)return i(c,l)}},h=f(i+r,r,u);if(h)return h;var g=r>0?u.end:s(u.begin,-1);return null==g||r>0&&g==t.text.length||!(h=f(r>0?0:o.length-1,r,c(g)))?null:h}(e.cm,l,t,n):Qi(l,t,n);if(null==a){if(i||((c=t.line+s)<e.first||c>=e.first+e.size||(t=new et(c,t.ch,t.sticky),!(l=$e(e,c)))))return!1;t=ea(o,e.cm,l,t.line,s)}else t=a;return!0}if("char"==r||"codepoint"==r)c();else if("column"==r)c(!0);else if("word"==r||"group"==r)for(var u=null,d="group"==r,p=e.cm&&e.cm.getHelper(t,"wordChars"),m=!0;!(n<0)||c(!m);m=!1){var f=l.text.charAt(t.ch)||"\n",h=ee(f,p)?"w":d&&"\n"==f?"n":!d||/\s/.test(f)?null:"p";if(!d||m||h||(h="s"),u&&u!=h){n<0&&(n=1,c(),t.sticky="after");break}if(h&&(u=h),n>0&&!c(!m))break}var g=ai(e,t,i,a,!0);return nt(i,g)&&(g.hitSide=!0),g}function za(e,t,n,r){var o,i,a=e.doc,l=t.left;if("page"==r){var s=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),c=Math.max(s-.5*rr(e.display),3);o=(n>0?t.bottom:t.top)+n*c}else"line"==r&&(o=n>0?t.bottom+3:t.top-3);for(;(i=Yn(e,l,o)).outside;){if(n<0?o<=0:o>=a.height){i.hitSide=!0;break}o+=5*n}return i}var Ha=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new z,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function Va(e,t){var n=Rn(e,t.line);if(!n||n.hidden)return null;var r=$e(e.doc,t.line),o=Nn(n,r,t.line),i=ce(r,e.doc.direction),a="left";i&&(a=le(i,t.ch)%2?"right":"left");var l=Mn(o.map,t.ch,a);return l.offset="right"==l.collapse?l.end:l.start,l}function Wa(e,t){return t&&(e.bad=!0),e}function Za(e,t,n){var r;if(t==e.display.lineDiv){if(!(r=e.display.lineDiv.childNodes[n]))return Wa(e.clipPos(et(e.display.viewTo-1)),!0);t=null,n=0}else for(r=t;;r=r.parentNode){if(!r||r==e.display.lineDiv)return null;if(r.parentNode&&r.parentNode==e.display.lineDiv)break}for(var o=0;o<e.display.view.length;o++){var i=e.display.view[o];if(i.node==r)return ja(i,t,n)}}function ja(e,t,n){var r=e.text.firstChild,o=!1;if(!t||!R(r,t))return Wa(et(Ye(e.line),0),!0);if(t==r&&(o=!0,t=r.childNodes[n],n=0,!t)){var i=e.rest?G(e.rest):e.line;return Wa(et(Ye(i),i.text.length),o)}var a=3==t.nodeType?t:null,l=t;for(a||1!=t.childNodes.length||3!=t.firstChild.nodeType||(a=t.firstChild,n&&(n=a.nodeValue.length));l.parentNode!=r;)l=l.parentNode;var s=e.measure,c=s.maps;function u(t,n,r){for(var o=-1;o<(c?c.length:0);o++)for(var i=o<0?s.map:c[o],a=0;a<i.length;a+=3){var l=i[a+2];if(l==t||l==n){var u=Ye(o<0?e.line:e.rest[o]),d=i[a]+r;return(r<0||l!=t)&&(d=i[a+(r?1:0)]),et(u,d)}}}var d=u(a,l,n);if(d)return Wa(d,o);for(var p=l.nextSibling,m=a?a.nodeValue.length-n:0;p;p=p.nextSibling){if(d=u(p,p.firstChild,0))return Wa(et(d.line,d.ch-m),o);m+=p.textContent.length}for(var f=l.previousSibling,h=n;f;f=f.previousSibling){if(d=u(f,f.firstChild,-1))return Wa(et(d.line,d.ch+h),o);h+=f.textContent.length}}Ha.prototype.init=function(e){var t=this,n=this,r=n.cm,o=n.div=e.lineDiv;function i(e){for(var t=e.target;t;t=t.parentNode){if(t==o)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(t.className))break}return!1}function a(e){if(i(e)&&!he(r,e)){if(r.somethingSelected())Ra({lineWise:!1,text:r.getSelections()}),"cut"==e.type&&r.replaceSelection("",null,"cut");else{if(!r.options.lineWiseCopyCut)return;var t=Da(r);Ra({lineWise:!0,text:t.text}),"cut"==e.type&&r.operation((function(){r.setSelections(t.ranges,0,W),r.replaceSelection("",null,"cut")}))}if(e.clipboardData){e.clipboardData.clearData();var a=Aa.text.join("\n");if(e.clipboardData.setData("Text",a),e.clipboardData.getData("Text")==a)return void e.preventDefault()}var l=Ba(),s=l.firstChild;r.display.lineSpace.insertBefore(l,r.display.lineSpace.firstChild),s.value=Aa.text.join("\n");var c=L();D(s),setTimeout((function(){r.display.lineSpace.removeChild(l),c.focus(),c==o&&n.showPrimarySelection()}),50)}}o.contentEditable=!0,Ma(o,r.options.spellcheck,r.options.autocorrect,r.options.autocapitalize),de(o,"paste",(function(e){!i(e)||he(r,e)||Pa(e,r)||l<=11&&setTimeout(eo(r,(function(){return t.updateFromDOM()})),20)})),de(o,"compositionstart",(function(e){t.composing={data:e.data,done:!1}})),de(o,"compositionupdate",(function(e){t.composing||(t.composing={data:e.data,done:!1})})),de(o,"compositionend",(function(e){t.composing&&(e.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)})),de(o,"touchstart",(function(){return n.forceCompositionEnd()})),de(o,"input",(function(){t.composing||t.readFromDOMSoon()})),de(o,"copy",a),de(o,"cut",a)},Ha.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},Ha.prototype.prepareSelection=function(){var e=vr(this.cm,!1);return e.focus=L()==this.div,e},Ha.prototype.showSelection=function(e,t){e&&this.cm.display.view.length&&((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},Ha.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Ha.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,r=t.doc.sel.primary(),o=r.from(),i=r.to();if(t.display.viewTo==t.display.viewFrom||o.line>=t.display.viewTo||i.line<t.display.viewFrom)e.removeAllRanges();else{var a=Za(t,e.anchorNode,e.anchorOffset),l=Za(t,e.focusNode,e.focusOffset);if(!a||a.bad||!l||l.bad||0!=tt(it(a,l),o)||0!=tt(ot(a,l),i)){var s=t.display.view,c=o.line>=t.display.viewFrom&&Va(t,o)||{node:s[0].measure.map[2],offset:0},u=i.line<t.display.viewTo&&Va(t,i);if(!u){var d=s[s.length-1].measure,p=d.maps?d.maps[d.maps.length-1]:d.map;u={node:p[p.length-1],offset:p[p.length-2]-p[p.length-3]}}if(c&&u){var m,f=e.rangeCount&&e.getRangeAt(0);try{m=x(c.node,c.offset,u.offset,u.node)}catch(e){}m&&(!n&&t.state.focused?(e.collapse(c.node,c.offset),m.collapsed||(e.removeAllRanges(),e.addRange(m))):(e.removeAllRanges(),e.addRange(m)),f&&null==e.anchorNode?e.addRange(f):n&&this.startGracePeriod()),this.rememberSelection()}else e.removeAllRanges()}}},Ha.prototype.startGracePeriod=function(){var e=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout((function(){e.gracePeriod=!1,e.selectionChanged()&&e.cm.operation((function(){return e.cm.curOp.selectionChanged=!0}))}),20)},Ha.prototype.showMultipleSelections=function(e){T(this.cm.display.cursorDiv,e.cursors),T(this.cm.display.selectionDiv,e.selection)},Ha.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},Ha.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return R(this.div,t)},Ha.prototype.focus=function(){"nocursor"!=this.cm.options.readOnly&&(this.selectionInEditor()&&L()==this.div||this.showSelection(this.prepareSelection(),!0),this.div.focus())},Ha.prototype.blur=function(){this.div.blur()},Ha.prototype.getField=function(){return this.div},Ha.prototype.supportsTouch=function(){return!0},Ha.prototype.receivedFocus=function(){var e=this,t=this;this.selectionInEditor()?setTimeout((function(){return e.pollSelection()}),20):Qr(this.cm,(function(){return t.cm.curOp.selectionChanged=!0})),this.polling.set(this.cm.options.pollInterval,(function e(){t.cm.state.focused&&(t.pollSelection(),t.polling.set(t.cm.options.pollInterval,e))}))},Ha.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},Ha.prototype.pollSelection=function(){if(null==this.readDOMTimeout&&!this.gracePeriod&&this.selectionChanged()){var e=this.getSelection(),t=this.cm;if(g&&u&&this.cm.display.gutterSpecs.length&&function(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}(e.anchorNode))return this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),void this.focus();if(!this.composing){this.rememberSelection();var n=Za(t,e.anchorNode,e.anchorOffset),r=Za(t,e.focusNode,e.focusOffset);n&&r&&Qr(t,(function(){ei(t.doc,So(n,r),W),(n.bad||r.bad)&&(t.curOp.selectionChanged=!0)}))}}},Ha.prototype.pollContent=function(){null!=this.readDOMTimeout&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e,t,n,r=this.cm,o=r.display,i=r.doc.sel.primary(),a=i.from(),l=i.to();if(0==a.ch&&a.line>r.firstLine()&&(a=et(a.line-1,$e(r.doc,a.line-1).length)),l.ch==$e(r.doc,l.line).text.length&&l.line<r.lastLine()&&(l=et(l.line+1,0)),a.line<o.viewFrom||l.line>o.viewTo-1)return!1;a.line==o.viewFrom||0==(e=ur(r,a.line))?(t=Ye(o.view[0].line),n=o.view[0].node):(t=Ye(o.view[e].line),n=o.view[e-1].node.nextSibling);var s,c,u=ur(r,l.line);if(u==o.view.length-1?(s=o.viewTo-1,c=o.lineDiv.lastChild):(s=Ye(o.view[u+1].line)-1,c=o.view[u+1].node.previousSibling),!n)return!1;for(var d=r.doc.splitLines(function(e,t,n,r,o){var i="",a=!1,l=e.doc.lineSeparator(),s=!1;function c(){a&&(i+=l,s&&(i+=l),a=s=!1)}function u(e){e&&(c(),i+=e)}function d(t){if(1==t.nodeType){var n=t.getAttribute("cm-text");if(n)return void u(n);var i,p=t.getAttribute("cm-marker");if(p){var m=e.findMarks(et(r,0),et(o+1,0),(g=+p,function(e){return e.id==g}));return void(m.length&&(i=m[0].find(0))&&u(qe(e.doc,i.from,i.to).join(l)))}if("false"==t.getAttribute("contenteditable"))return;var f=/^(pre|div|p|li|table|br)$/i.test(t.nodeName);if(!/^br$/i.test(t.nodeName)&&0==t.textContent.length)return;f&&c();for(var h=0;h<t.childNodes.length;h++)d(t.childNodes[h]);/^(pre|p)$/i.test(t.nodeName)&&(s=!0),f&&(a=!0)}else 3==t.nodeType&&u(t.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "));var g}for(;d(t),t!=n;)t=t.nextSibling,s=!1;return i}(r,n,c,t,s)),p=qe(r.doc,et(t,0),et(s,$e(r.doc,s).text.length));d.length>1&&p.length>1;)if(G(d)==G(p))d.pop(),p.pop(),s--;else{if(d[0]!=p[0])break;d.shift(),p.shift(),t++}for(var m=0,f=0,h=d[0],g=p[0],v=Math.min(h.length,g.length);m<v&&h.charCodeAt(m)==g.charCodeAt(m);)++m;for(var b=G(d),y=G(p),w=Math.min(b.length-(1==d.length?m:0),y.length-(1==p.length?m:0));f<w&&b.charCodeAt(b.length-f-1)==y.charCodeAt(y.length-f-1);)++f;if(1==d.length&&1==p.length&&t==a.line)for(;m&&m>a.ch&&b.charCodeAt(b.length-f-1)==y.charCodeAt(y.length-f-1);)m--,f++;d[d.length-1]=b.slice(0,b.length-f).replace(/^\u200b+/,""),d[0]=d[0].slice(m).replace(/\u200b+$/,"");var k=et(t,m),E=et(s,p.length?G(p).length-f:0);return d.length>1||d[0]||tt(k,E)?(hi(r.doc,d,k,E,"+input"),!0):void 0},Ha.prototype.ensurePolled=function(){this.forceCompositionEnd()},Ha.prototype.reset=function(){this.forceCompositionEnd()},Ha.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Ha.prototype.readFromDOMSoon=function(){var e=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout((function(){if(e.readDOMTimeout=null,e.composing){if(!e.composing.done)return;e.composing=null}e.updateFromDOM()}),80))},Ha.prototype.updateFromDOM=function(){var e=this;!this.cm.isReadOnly()&&this.pollContent()||Qr(this.cm,(function(){return dr(e.cm)}))},Ha.prototype.setUneditable=function(e){e.contentEditable="false"},Ha.prototype.onKeyPress=function(e){0==e.charCode||this.composing||(e.preventDefault(),this.cm.isReadOnly()||eo(this.cm,La)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},Ha.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},Ha.prototype.onContextMenu=function(){},Ha.prototype.resetPosition=function(){},Ha.prototype.needsContentAttribute=!0;var Ua=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new z,this.hasSelection=!1,this.composing=null};Ua.prototype.init=function(e){var t=this,n=this,r=this.cm;this.createField(e);var o=this.textarea;function i(e){if(!he(r,e)){if(r.somethingSelected())Ra({lineWise:!1,text:r.getSelections()});else{if(!r.options.lineWiseCopyCut)return;var t=Da(r);Ra({lineWise:!0,text:t.text}),"cut"==e.type?r.setSelections(t.ranges,null,W):(n.prevInput="",o.value=t.text.join("\n"),D(o))}"cut"==e.type&&(r.state.cutIncoming=+new Date)}}e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),h&&(o.style.width="0px"),de(o,"input",(function(){a&&l>=9&&t.hasSelection&&(t.hasSelection=null),n.poll()})),de(o,"paste",(function(e){he(r,e)||Pa(e,r)||(r.state.pasteIncoming=+new Date,n.fastPoll())})),de(o,"cut",i),de(o,"copy",i),de(e.scroller,"paste",(function(t){if(!En(e,t)&&!he(r,t)){if(!o.dispatchEvent)return r.state.pasteIncoming=+new Date,void n.focus();var i=new Event("paste");i.clipboardData=t.clipboardData,o.dispatchEvent(i)}})),de(e.lineSpace,"selectstart",(function(t){En(e,t)||ye(t)})),de(o,"compositionstart",(function(){var e=r.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:e,range:r.markText(e,r.getCursor("to"),{className:"CodeMirror-composing"})}})),de(o,"compositionend",(function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)}))},Ua.prototype.createField=function(e){this.wrapper=Ba(),this.textarea=this.wrapper.firstChild},Ua.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},Ua.prototype.prepareSelection=function(){var e=this.cm,t=e.display,n=e.doc,r=vr(e);if(e.options.moveInputWithCursor){var o=qn(e,n.sel.primary().head,"div"),i=t.wrapper.getBoundingClientRect(),a=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,o.top+a.top-i.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,o.left+a.left-i.left))}return r},Ua.prototype.showSelection=function(e){var t=this.cm.display;T(t.cursorDiv,e.cursors),T(t.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},Ua.prototype.reset=function(e){if(!this.contextMenuPending&&!this.composing){var t=this.cm;if(t.somethingSelected()){this.prevInput="";var n=t.getSelection();this.textarea.value=n,t.state.focused&&D(this.textarea),a&&l>=9&&(this.hasSelection=n)}else e||(this.prevInput=this.textarea.value="",a&&l>=9&&(this.hasSelection=null))}},Ua.prototype.getField=function(){return this.textarea},Ua.prototype.supportsTouch=function(){return!1},Ua.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!v||L()!=this.textarea))try{this.textarea.focus()}catch(e){}},Ua.prototype.blur=function(){this.textarea.blur()},Ua.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Ua.prototype.receivedFocus=function(){this.slowPoll()},Ua.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,(function(){e.poll(),e.cm.state.focused&&e.slowPoll()}))},Ua.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0,t.polling.set(20,(function n(){t.poll()||e?(t.pollingFast=!1,t.slowPoll()):(e=!0,t.polling.set(60,n))}))},Ua.prototype.poll=function(){var e=this,t=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||!t.state.focused||Le(n)&&!r&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var o=n.value;if(o==r&&!t.somethingSelected())return!1;if(a&&l>=9&&this.hasSelection===o||b&&/[\uf700-\uf7ff]/.test(o))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var i=o.charCodeAt(0);if(8203!=i||r||(r=""),8666==i)return this.reset(),this.cm.execCommand("undo")}for(var s=0,c=Math.min(r.length,o.length);s<c&&r.charCodeAt(s)==o.charCodeAt(s);)++s;return Qr(t,(function(){La(t,o.slice(s),r.length-s,null,e.composing?"*compose":null),o.length>1e3||o.indexOf("\n")>-1?n.value=e.prevInput="":e.prevInput=o,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))})),!0},Ua.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Ua.prototype.onKeyPress=function(){a&&l>=9&&(this.hasSelection=null),this.fastPoll()},Ua.prototype.onContextMenu=function(e){var t=this,n=t.cm,r=n.display,o=t.textarea;t.contextMenuPending&&t.contextMenuPending();var i=cr(n,e),c=r.scroller.scrollTop;if(i&&!d){n.options.resetSelectionOnContextMenu&&-1==n.doc.sel.contains(i)&&eo(n,ei)(n.doc,So(i),W);var u,p=o.style.cssText,m=t.wrapper.style.cssText,f=t.wrapper.offsetParent.getBoundingClientRect();if(t.wrapper.style.cssText="position: static",o.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(e.clientY-f.top-5)+"px; left: "+(e.clientX-f.left-5)+"px;\n z-index: 1000; background: "+(a?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",s&&(u=window.scrollY),r.input.focus(),s&&window.scrollTo(null,u),r.input.reset(),n.somethingSelected()||(o.value=t.prevInput=" "),t.contextMenuPending=v,r.selForContextMenu=n.doc.sel,clearTimeout(r.detectingSelectAll),a&&l>=9&&g(),_){Ee(e);var h=function(){me(window,"mouseup",h),setTimeout(v,20)};de(window,"mouseup",h)}else setTimeout(v,50)}function g(){if(null!=o.selectionStart){var e=n.somethingSelected(),i=""+(e?o.value:"");o.value="⇚",o.value=i,t.prevInput=e?"":"",o.selectionStart=1,o.selectionEnd=i.length,r.selForContextMenu=n.doc.sel}}function v(){if(t.contextMenuPending==v&&(t.contextMenuPending=!1,t.wrapper.style.cssText=m,o.style.cssText=p,a&&l<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=c),null!=o.selectionStart)){(!a||a&&l<9)&&g();var e=0,i=function(){r.selForContextMenu==n.doc.sel&&0==o.selectionStart&&o.selectionEnd>0&&""==t.prevInput?eo(n,si)(n):e++<10?r.detectingSelectAll=setTimeout(i,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(i,200)}}},Ua.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled="nocursor"==e,this.textarea.readOnly=!!e},Ua.prototype.setUneditable=function(){},Ua.prototype.needsContentAttribute=!1,function(e){var t=e.optionHandlers;function n(n,r,o,i){e.defaults[n]=r,o&&(t[n]=i?function(e,t,n){n!=Ea&&o(e,t,n)}:o)}e.defineOption=n,e.Init=Ea,n("value","",(function(e,t){return e.setValue(t)}),!0),n("mode",null,(function(e,t){e.doc.modeOption=t,Ro(e)}),!0),n("indentUnit",2,Ro,!0),n("indentWithTabs",!1),n("smartIndent",!0),n("tabSize",4,(function(e){Lo(e),Hn(e),dr(e)}),!0),n("lineSeparator",null,(function(e,t){if(e.doc.lineSep=t,t){var n=[],r=e.doc.first;e.doc.iter((function(e){for(var o=0;;){var i=e.text.indexOf(t,o);if(-1==i)break;o=i+t.length,n.push(et(r,i))}r++}));for(var o=n.length-1;o>=0;o--)hi(e.doc,t,n[o],et(n[o].line,n[o].ch+t.length))}})),n("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,(function(e,t,n){e.state.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),n!=Ea&&e.refresh()})),n("specialCharPlaceholder",Jt,(function(e){return e.refresh()}),!0),n("electricChars",!0),n("inputStyle",v?"contenteditable":"textarea",(function(){throw new Error("inputStyle can not (yet) be changed in a running editor")}),!0),n("spellcheck",!1,(function(e,t){return e.getInputField().spellcheck=t}),!0),n("autocorrect",!1,(function(e,t){return e.getInputField().autocorrect=t}),!0),n("autocapitalize",!1,(function(e,t){return e.getInputField().autocapitalize=t}),!0),n("rtlMoveVisually",!w),n("wholeLineUpdateBefore",!0),n("theme","default",(function(e){ka(e),go(e)}),!0),n("keyMap","default",(function(e,t,n){var r=Yi(t),o=n!=Ea&&Yi(n);o&&o.detach&&o.detach(e,r),r.attach&&r.attach(e,o||null)})),n("extraKeys",null),n("configureMouse",null),n("lineWrapping",!1,Sa,!0),n("gutters",[],(function(e,t){e.display.gutterSpecs=fo(t,e.options.lineNumbers),go(e)}),!0),n("fixedGutter",!0,(function(e,t){e.display.gutters.style.left=t?ar(e.display)+"px":"0",e.refresh()}),!0),n("coverGutterNextToScrollbar",!1,(function(e){return Vr(e)}),!0),n("scrollbarStyle","native",(function(e){jr(e),Vr(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)}),!0),n("lineNumbers",!1,(function(e,t){e.display.gutterSpecs=fo(e.options.gutters,t),go(e)}),!0),n("firstLineNumber",1,go,!0),n("lineNumberFormatter",(function(e){return e}),go,!0),n("showCursorWhenSelecting",!1,gr,!0),n("resetSelectionOnContextMenu",!0),n("lineWiseCopyCut",!0),n("pasteLinesPerSelection",!0),n("selectionsMayTouch",!1),n("readOnly",!1,(function(e,t){"nocursor"==t&&(xr(e),e.display.input.blur()),e.display.input.readOnlyChanged(t)})),n("screenReaderLabel",null,(function(e,t){t=""===t?null:t,e.display.input.screenReaderLabelChanged(t)})),n("disableInput",!1,(function(e,t){t||e.display.input.reset()}),!0),n("dragDrop",!0,xa),n("allowDropFileTypes",null),n("cursorBlinkRate",530),n("cursorScrollMargin",0),n("cursorHeight",1,gr,!0),n("singleCursorHeightPerLine",!0,gr,!0),n("workTime",100),n("workDelay",100),n("flattenSpans",!0,Lo,!0),n("addModeClass",!1,Lo,!0),n("pollInterval",100),n("undoDepth",200,(function(e,t){return e.doc.history.undoDepth=t})),n("historyEventDelay",1250),n("viewportMargin",10,(function(e){return e.refresh()}),!0),n("maxHighlightLength",1e4,Lo,!0),n("moveInputWithCursor",!0,(function(e,t){t||e.display.input.resetPosition()})),n("tabindex",null,(function(e,t){return e.display.input.getField().tabIndex=t||""})),n("autofocus",null),n("direction","ltr",(function(e,t){return e.doc.setDirection(t)}),!0),n("phrases",null)}(Ia),function(e){var t=e.optionHandlers,n=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(e,n){var r=this.options,o=r[e];r[e]==n&&"mode"!=e||(r[e]=n,t.hasOwnProperty(e)&&eo(this,t[e])(this,n,o),fe(this,"optionChange",this,e))},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,t){this.state.keyMaps[t?"push":"unshift"](Yi(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,n=0;n<t.length;++n)if(t[n]==e||t[n].name==e)return t.splice(n,1),!0},addOverlay:to((function(t,n){var r=t.token?t:e.getMode(this.options,t);if(r.startState)throw new Error("Overlays may not be stateful.");(function(e,t,n){for(var r=0,o=n(t);r<e.length&&n(e[r])<=o;)r++;e.splice(r,0,t)})(this.state.overlays,{mode:r,modeSpec:t,opaque:n&&n.opaque,priority:n&&n.priority||0},(function(e){return e.priority})),this.state.modeGen++,dr(this)})),removeOverlay:to((function(e){for(var t=this.state.overlays,n=0;n<t.length;++n){var r=t[n].modeSpec;if(r==e||"string"==typeof e&&r.name==e)return t.splice(n,1),this.state.modeGen++,void dr(this)}})),indentLine:to((function(e,t,n){"string"!=typeof t&&"number"!=typeof t&&(t=null==t?this.options.smartIndent?"smart":"prev":t?"add":"subtract"),Je(this.doc,e)&&Na(this,e,t,n)})),indentSelection:to((function(e){for(var t=this.doc.sel.ranges,n=-1,r=0;r<t.length;r++){var o=t[r];if(o.empty())o.head.line>n&&(Na(this,o.head.line,e,!0),n=o.head.line,r==this.doc.sel.primIndex&&Rr(this));else{var i=o.from(),a=o.to(),l=Math.max(n,i.line);n=Math.min(this.lastLine(),a.line-(a.ch?0:1))+1;for(var s=l;s<n;++s)Na(this,s,e);var c=this.doc.sel.ranges;0==i.ch&&t.length==c.length&&c[r].from().ch>0&&Xo(this.doc,r,new Co(i,c[r].to()),W)}}})),getTokenAt:function(e,t){return bt(this,e,t)},getLineTokens:function(e,t){return bt(this,et(e),t,!0)},getTokenTypeAt:function(e){e=lt(this.doc,e);var t,n=pt(this,$e(this.doc,e.line)),r=0,o=(n.length-1)/2,i=e.ch;if(0==i)t=n[2];else for(;;){var a=r+o>>1;if((a?n[2*a-1]:0)>=i)o=a;else{if(!(n[2*a+1]<i)){t=n[2*a+2];break}r=a+1}}var l=t?t.indexOf("overlay "):-1;return l<0?t:0==l?null:t.slice(0,l-1)},getModeAt:function(t){var n=this.doc.mode;return n.innerMode?e.innerMode(n,this.getTokenAt(t).state).mode:n},getHelper:function(e,t){return this.getHelpers(e,t)[0]},getHelpers:function(e,t){var r=[];if(!n.hasOwnProperty(t))return r;var o=n[t],i=this.getModeAt(e);if("string"==typeof i[t])o[i[t]]&&r.push(o[i[t]]);else if(i[t])for(var a=0;a<i[t].length;a++){var l=o[i[t][a]];l&&r.push(l)}else i.helperType&&o[i.helperType]?r.push(o[i.helperType]):o[i.name]&&r.push(o[i.name]);for(var s=0;s<o._global.length;s++){var c=o._global[s];c.pred(i,this)&&-1==H(r,c.val)&&r.push(c.val)}return r},getStateAfter:function(e,t){var n=this.doc;return mt(this,(e=at(n,null==e?n.first+n.size-1:e))+1,t).state},cursorCoords:function(e,t){var n=this.doc.sel.primary();return qn(this,null==e?n.head:"object"==typeof e?lt(this.doc,e):e?n.from():n.to(),t||"page")},charCoords:function(e,t){return $n(this,lt(this.doc,e),t||"page")},coordsChar:function(e,t){return Yn(this,(e=Un(this,e,t||"page")).left,e.top)},lineAtHeight:function(e,t){return e=Un(this,{top:e,left:0},t||"page").top,Xe(this.doc,e+this.display.viewOffset)},heightAtLine:function(e,t,n){var r,o=!1;if("number"==typeof e){var i=this.doc.first+this.doc.size-1;e<this.doc.first?e=this.doc.first:e>i&&(e=i,o=!0),r=$e(this.doc,e)}else r=e;return jn(this,r,{top:0,left:0},t||"page",n||o).top+(o?this.doc.height-Zt(r):0)},defaultTextHeight:function(){return rr(this.display)},defaultCharWidth:function(){return or(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,n,r,o){var i,a,l,s=this.display,c=(e=qn(this,lt(this.doc,e))).bottom,u=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),s.sizer.appendChild(t),"over"==r)c=e.top;else if("above"==r||"near"==r){var d=Math.max(s.wrapper.clientHeight,this.doc.height),p=Math.max(s.sizer.clientWidth,s.lineSpace.clientWidth);("above"==r||e.bottom+t.offsetHeight>d)&&e.top>t.offsetHeight?c=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=d&&(c=e.bottom),u+t.offsetWidth>p&&(u=p-t.offsetWidth)}t.style.top=c+"px",t.style.left=t.style.right="","right"==o?(u=s.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==o?u=0:"middle"==o&&(u=(s.sizer.clientWidth-t.offsetWidth)/2),t.style.left=u+"px"),n&&(i=this,a={left:u,top:c,right:u+t.offsetWidth,bottom:c+t.offsetHeight},null!=(l=Nr(i,a)).scrollTop&&Dr(i,l.scrollTop),null!=l.scrollLeft&&Br(i,l.scrollLeft))},triggerOnKeyDown:to(ua),triggerOnKeyPress:to(pa),triggerOnKeyUp:da,triggerOnMouseDown:to(ga),execCommand:function(e){if(ta.hasOwnProperty(e))return ta[e].call(null,this)},triggerElectric:to((function(e){Oa(this,e)})),findPosH:function(e,t,n,r){var o=1;t<0&&(o=-1,t=-t);for(var i=lt(this.doc,e),a=0;a<t&&!(i=Fa(this.doc,i,o,n,r)).hitSide;++a);return i},moveH:to((function(e,t){var n=this;this.extendSelectionsBy((function(r){return n.display.shift||n.doc.extend||r.empty()?Fa(n.doc,r.head,e,t,n.options.rtlMoveVisually):e<0?r.from():r.to()}),j)})),deleteH:to((function(e,t){var n=this.doc.sel,r=this.doc;n.somethingSelected()?r.replaceSelection("",null,"+delete"):Xi(this,(function(n){var o=Fa(r,n.head,e,t,!1);return e<0?{from:o,to:n.head}:{from:n.head,to:o}}))})),findPosV:function(e,t,n,r){var o=1,i=r;t<0&&(o=-1,t=-t);for(var a=lt(this.doc,e),l=0;l<t;++l){var s=qn(this,a,"div");if(null==i?i=s.left:s.left=i,(a=za(this,s,o,n)).hitSide)break}return a},moveV:to((function(e,t){var n=this,r=this.doc,o=[],i=!this.display.shift&&!r.extend&&r.sel.somethingSelected();if(r.extendSelectionsBy((function(a){if(i)return e<0?a.from():a.to();var l=qn(n,a.head,"div");null!=a.goalColumn&&(l.left=a.goalColumn),o.push(l.left);var s=za(n,l,e,t);return"page"==t&&a==r.sel.primary()&&Ar(n,$n(n,s,"div").top-l.top),s}),j),o.length)for(var a=0;a<r.sel.ranges.length;a++)r.sel.ranges[a].goalColumn=o[a]})),findWordAt:function(e){var t=$e(this.doc,e.line).text,n=e.ch,r=e.ch;if(t){var o=this.getHelper(e,"wordChars");"before"!=e.sticky&&r!=t.length||!n?++r:--n;for(var i=t.charAt(n),a=ee(i,o)?function(e){return ee(e,o)}:/\s/.test(i)?function(e){return/\s/.test(e)}:function(e){return!/\s/.test(e)&&!ee(e)};n>0&&a(t.charAt(n-1));)--n;for(;r<t.length&&a(t.charAt(r));)++r}return new Co(et(e.line,n),et(e.line,r))},toggleOverwrite:function(e){null!=e&&e==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?P(this.display.cursorDiv,"CodeMirror-overwrite"):S(this.display.cursorDiv,"CodeMirror-overwrite"),fe(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==L()},isReadOnly:function(){return!(!this.options.readOnly&&!this.doc.cantEdit)},scrollTo:to((function(e,t){Lr(this,e,t)})),getScrollInfo:function(){var e=this.display.scroller;return{left:e.scrollLeft,top:e.scrollTop,height:e.scrollHeight-Sn(this)-this.display.barHeight,width:e.scrollWidth-Sn(this)-this.display.barWidth,clientHeight:Tn(this),clientWidth:In(this)}},scrollIntoView:to((function(e,t){null==e?(e={from:this.doc.sel.primary().head,to:null},null==t&&(t=this.options.cursorScrollMargin)):"number"==typeof e?e={from:et(e,0),to:null}:null==e.from&&(e={from:e,to:null}),e.to||(e.to=e.from),e.margin=t||0,null!=e.from.line?function(e,t){Pr(e),e.curOp.scrollToPos=t}(this,e):Or(this,e.from,e.to,e.margin)})),setSize:to((function(e,t){var n=this,r=function(e){return"number"==typeof e||/^\d+$/.test(String(e))?e+"px":e};null!=e&&(this.display.wrapper.style.width=r(e)),null!=t&&(this.display.wrapper.style.height=r(t)),this.options.lineWrapping&&zn(this);var o=this.display.viewFrom;this.doc.iter(o,this.display.viewTo,(function(e){if(e.widgets)for(var t=0;t<e.widgets.length;t++)if(e.widgets[t].noHScroll){pr(n,o,"widget");break}++o})),this.curOp.forceUpdate=!0,fe(this,"refresh",this)})),operation:function(e){return Qr(this,e)},startOperation:function(){return $r(this)},endOperation:function(){return qr(this)},refresh:to((function(){var e=this.display.cachedTextHeight;dr(this),this.curOp.forceUpdate=!0,Hn(this),Lr(this,this.doc.scrollLeft,this.doc.scrollTop),co(this.display),(null==e||Math.abs(e-rr(this.display))>.5||this.options.lineWrapping)&&sr(this),fe(this,"refresh",this)})),swapDoc:to((function(e){var t=this.doc;return t.cm=null,this.state.selectingText&&this.state.selectingText(),Mo(this,e),Hn(this),this.display.input.reset(),Lr(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,sn(this,"swapDoc",this,t),t})),phrase:function(e){var t=this.options.phrases;return t&&Object.prototype.hasOwnProperty.call(t,e)?t[e]:e},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},be(e),e.registerHelper=function(t,r,o){n.hasOwnProperty(t)||(n[t]=e[t]={_global:[]}),n[t][r]=o},e.registerGlobalHelper=function(t,r,o,i){e.registerHelper(t,r,i),n[t]._global.push({pred:o,val:i})}}(Ia);var $a="iter insert remove copy getEditor constructor".split(" ");for(var qa in Ri.prototype)Ri.prototype.hasOwnProperty(qa)&&H($a,qa)<0&&(Ia.prototype[qa]=function(e){return function(){return e.apply(this.doc,arguments)}}(Ri.prototype[qa]));return be(Ri),Ia.inputStyles={textarea:Ua,contenteditable:Ha},Ia.defineMode=function(e){Ia.defaults.mode||"null"==e||(Ia.defaults.mode=e),Be.apply(this,arguments)},Ia.defineMIME=function(e,t){Me[e]=t},Ia.defineMode("null",(function(){return{token:function(e){return e.skipToEnd()}}})),Ia.defineMIME("text/plain","null"),Ia.defineExtension=function(e,t){Ia.prototype[e]=t},Ia.defineDocExtension=function(e,t){Ri.prototype[e]=t},Ia.fromTextArea=function(e,t){if((t=t?B(t):{}).value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),null==t.autofocus){var n=L();t.autofocus=n==e||null!=e.getAttribute("autofocus")&&n==document.body}function r(){e.value=l.getValue()}var o;if(e.form&&(de(e.form,"submit",r),!t.leaveSubmitMethodAlone)){var i=e.form;o=i.submit;try{var a=i.submit=function(){r(),i.submit=o,i.submit(),i.submit=a}}catch(e){}}t.finishInit=function(n){n.save=r,n.getTextArea=function(){return e},n.toTextArea=function(){n.toTextArea=isNaN,r(),e.parentNode.removeChild(n.getWrapperElement()),e.style.display="",e.form&&(me(e.form,"submit",r),t.leaveSubmitMethodAlone||"function"!=typeof e.form.submit||(e.form.submit=o))}},e.style.display="none";var l=Ia((function(t){return e.parentNode.insertBefore(t,e.nextSibling)}),t);return l},function(e){e.off=me,e.on=de,e.wheelEventPixels=ko,e.Doc=Ri,e.splitLines=Re,e.countColumn=F,e.findColumn=U,e.isWordChar=Q,e.Pass=V,e.signal=fe,e.Line=$t,e.changeEnd=Io,e.scrollbarModel=Zr,e.Pos=et,e.cmpPos=tt,e.modes=De,e.mimeModes=Me,e.resolveMode=Fe,e.getMode=ze,e.modeExtensions=He,e.extendMode=Ve,e.copyState=We,e.startState=je,e.innerMode=Ze,e.commands=ta,e.keyMap=Zi,e.keyName=Ki,e.isModifierKey=qi,e.lookupKey=$i,e.normalizeKeyMap=Ui,e.StringStream=Ue,e.SharedTextMarker=Ii,e.TextMarker=xi,e.LineWidget=Ei,e.e_preventDefault=ye,e.e_stopPropagation=we,e.e_stop=Ee,e.addClass=P,e.contains=R,e.rmClass=S,e.keyNames=zi}(Ia),Ia.version="5.63.3",Ia}()},36629:function(e,t,n){!function(e){"use strict";function t(e){for(var t={},n=0;n<e.length;++n)t[e[n].toLowerCase()]=!0;return t}e.defineMode("css",(function(t,n){var r=n.inline;n.propertyKeywords||(n=e.resolveMode("text/css"));var o,i,a=t.indentUnit,l=n.tokenHooks,s=n.documentTypes||{},c=n.mediaTypes||{},u=n.mediaFeatures||{},d=n.mediaValueKeywords||{},p=n.propertyKeywords||{},m=n.nonStandardPropertyKeywords||{},f=n.fontProperties||{},h=n.counterDescriptors||{},g=n.colorKeywords||{},v=n.valueKeywords||{},b=n.allowNested,y=n.lineComment,w=!0===n.supportsAtComponent,k=!1!==t.highlightNonStandardPropertyKeywords;function E(e,t){return o=t,e}function _(e,t){var n=e.next();if(l[n]){var r=l[n](e,t);if(!1!==r)return r}return"@"==n?(e.eatWhile(/[\w\\\-]/),E("def",e.current())):"="==n||("~"==n||"|"==n)&&e.eat("=")?E(null,"compare"):'"'==n||"'"==n?(t.tokenize=C(n),t.tokenize(e,t)):"#"==n?(e.eatWhile(/[\w\\\-]/),E("atom","hash")):"!"==n?(e.match(/^\s*\w*/),E("keyword","important")):/\d/.test(n)||"."==n&&e.eat(/\d/)?(e.eatWhile(/[\w.%]/),E("number","unit")):"-"!==n?/[,+>*\/]/.test(n)?E(null,"select-op"):"."==n&&e.match(/^-?[_a-z][_a-z0-9-]*/i)?E("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(n)?E(null,n):e.match(/^[\w-.]+(?=\()/)?(/^(url(-prefix)?|domain|regexp)$/i.test(e.current())&&(t.tokenize=x),E("variable callee","variable")):/[\w\\\-]/.test(n)?(e.eatWhile(/[\w\\\-]/),E("property","word")):E(null,null):/[\d.]/.test(e.peek())?(e.eatWhile(/[\w.%]/),E("number","unit")):e.match(/^-[\w\\\-]*/)?(e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?E("variable-2","variable-definition"):E("variable-2","variable")):e.match(/^\w+-/)?E("meta","meta"):void 0}function C(e){return function(t,n){for(var r,o=!1;null!=(r=t.next());){if(r==e&&!o){")"==e&&t.backUp(1);break}o=!o&&"\\"==r}return(r==e||!o&&")"!=e)&&(n.tokenize=null),E("string","string")}}function x(e,t){return e.next(),e.match(/^\s*[\"\')]/,!1)?t.tokenize=null:t.tokenize=C(")"),E(null,"(")}function S(e,t,n){this.type=e,this.indent=t,this.prev=n}function I(e,t,n,r){return e.context=new S(n,t.indentation()+(!1===r?0:a),e.context),n}function T(e){return e.context.prev&&(e.context=e.context.prev),e.context.type}function N(e,t,n){return L[n.context.type](e,t,n)}function A(e,t,n,r){for(var o=r||1;o>0;o--)n.context=n.context.prev;return N(e,t,n)}function R(e){var t=e.current().toLowerCase();i=v.hasOwnProperty(t)?"atom":g.hasOwnProperty(t)?"keyword":"variable"}var L={top:function(e,t,n){if("{"==e)return I(n,t,"block");if("}"==e&&n.context.prev)return T(n);if(w&&/@component/i.test(e))return I(n,t,"atComponentBlock");if(/^@(-moz-)?document$/i.test(e))return I(n,t,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/i.test(e))return I(n,t,"atBlock");if(/^@(font-face|counter-style)/i.test(e))return n.stateArg=e,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(e))return"keyframes";if(e&&"@"==e.charAt(0))return I(n,t,"at");if("hash"==e)i="builtin";else if("word"==e)i="tag";else{if("variable-definition"==e)return"maybeprop";if("interpolation"==e)return I(n,t,"interpolation");if(":"==e)return"pseudo";if(b&&"("==e)return I(n,t,"parens")}return n.context.type},block:function(e,t,n){if("word"==e){var r=t.current().toLowerCase();return p.hasOwnProperty(r)?(i="property","maybeprop"):m.hasOwnProperty(r)?(i=k?"string-2":"property","maybeprop"):b?(i=t.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(i+=" error","maybeprop")}return"meta"==e?"block":b||"hash"!=e&&"qualifier"!=e?L.top(e,t,n):(i="error","block")},maybeprop:function(e,t,n){return":"==e?I(n,t,"prop"):N(e,t,n)},prop:function(e,t,n){if(";"==e)return T(n);if("{"==e&&b)return I(n,t,"propBlock");if("}"==e||"{"==e)return A(e,t,n);if("("==e)return I(n,t,"parens");if("hash"!=e||/^#([0-9a-fA-f]{3,4}|[0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/.test(t.current())){if("word"==e)R(t);else if("interpolation"==e)return I(n,t,"interpolation")}else i+=" error";return"prop"},propBlock:function(e,t,n){return"}"==e?T(n):"word"==e?(i="property","maybeprop"):n.context.type},parens:function(e,t,n){return"{"==e||"}"==e?A(e,t,n):")"==e?T(n):"("==e?I(n,t,"parens"):"interpolation"==e?I(n,t,"interpolation"):("word"==e&&R(t),"parens")},pseudo:function(e,t,n){return"meta"==e?"pseudo":"word"==e?(i="variable-3",n.context.type):N(e,t,n)},documentTypes:function(e,t,n){return"word"==e&&s.hasOwnProperty(t.current())?(i="tag",n.context.type):L.atBlock(e,t,n)},atBlock:function(e,t,n){if("("==e)return I(n,t,"atBlock_parens");if("}"==e||";"==e)return A(e,t,n);if("{"==e)return T(n)&&I(n,t,b?"block":"top");if("interpolation"==e)return I(n,t,"interpolation");if("word"==e){var r=t.current().toLowerCase();i="only"==r||"not"==r||"and"==r||"or"==r?"keyword":c.hasOwnProperty(r)?"attribute":u.hasOwnProperty(r)?"property":d.hasOwnProperty(r)?"keyword":p.hasOwnProperty(r)?"property":m.hasOwnProperty(r)?k?"string-2":"property":v.hasOwnProperty(r)?"atom":g.hasOwnProperty(r)?"keyword":"error"}return n.context.type},atComponentBlock:function(e,t,n){return"}"==e?A(e,t,n):"{"==e?T(n)&&I(n,t,b?"block":"top",!1):("word"==e&&(i="error"),n.context.type)},atBlock_parens:function(e,t,n){return")"==e?T(n):"{"==e||"}"==e?A(e,t,n,2):L.atBlock(e,t,n)},restricted_atBlock_before:function(e,t,n){return"{"==e?I(n,t,"restricted_atBlock"):"word"==e&&"@counter-style"==n.stateArg?(i="variable","restricted_atBlock_before"):N(e,t,n)},restricted_atBlock:function(e,t,n){return"}"==e?(n.stateArg=null,T(n)):"word"==e?(i="@font-face"==n.stateArg&&!f.hasOwnProperty(t.current().toLowerCase())||"@counter-style"==n.stateArg&&!h.hasOwnProperty(t.current().toLowerCase())?"error":"property","maybeprop"):"restricted_atBlock"},keyframes:function(e,t,n){return"word"==e?(i="variable","keyframes"):"{"==e?I(n,t,"top"):N(e,t,n)},at:function(e,t,n){return";"==e?T(n):"{"==e||"}"==e?A(e,t,n):("word"==e?i="tag":"hash"==e&&(i="builtin"),"at")},interpolation:function(e,t,n){return"}"==e?T(n):"{"==e||";"==e?A(e,t,n):("word"==e?i="variable":"variable"!=e&&"("!=e&&")"!=e&&(i="error"),"interpolation")}};return{startState:function(e){return{tokenize:null,state:r?"block":"top",stateArg:null,context:new S(r?"block":"top",e||0,null)}},token:function(e,t){if(!t.tokenize&&e.eatSpace())return null;var n=(t.tokenize||_)(e,t);return n&&"object"==typeof n&&(o=n[1],n=n[0]),i=n,"comment"!=o&&(t.state=L[t.state](o,e,t)),i},indent:function(e,t){var n=e.context,r=t&&t.charAt(0),o=n.indent;return"prop"!=n.type||"}"!=r&&")"!=r||(n=n.prev),n.prev&&("}"!=r||"block"!=n.type&&"top"!=n.type&&"interpolation"!=n.type&&"restricted_atBlock"!=n.type?(")"!=r||"parens"!=n.type&&"atBlock_parens"!=n.type)&&("{"!=r||"at"!=n.type&&"atBlock"!=n.type)||(o=Math.max(0,n.indent-a)):o=(n=n.prev).indent),o},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:y,fold:"brace"}}));var n=["domain","regexp","url","url-prefix"],r=t(n),o=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],i=t(o),a=["width","min-width","max-width","height","min-height","max-height","device-width","min-device-width","max-device-width","device-height","min-device-height","max-device-height","aspect-ratio","min-aspect-ratio","max-aspect-ratio","device-aspect-ratio","min-device-aspect-ratio","max-device-aspect-ratio","color","min-color","max-color","color-index","min-color-index","max-color-index","monochrome","min-monochrome","max-monochrome","resolution","min-resolution","max-resolution","scan","grid","orientation","device-pixel-ratio","min-device-pixel-ratio","max-device-pixel-ratio","pointer","any-pointer","hover","any-hover","prefers-color-scheme"],l=t(a),s=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive","dark","light"],c=t(s),u=["align-content","align-items","align-self","alignment-adjust","alignment-baseline","all","anchor-point","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","appearance","azimuth","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","binding","bleed","block-size","bookmark-label","bookmark-level","bookmark-state","bookmark-target","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","color","color-profile","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","content","counter-increment","counter-reset","crop","cue","cue-after","cue-before","cursor","direction","display","dominant-baseline","drop-initial-after-adjust","drop-initial-after-align","drop-initial-before-adjust","drop-initial-before-align","drop-initial-size","drop-initial-value","elevation","empty-cells","fit","fit-content","fit-position","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","float-offset","flow-from","flow-into","font","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-size","font-size-adjust","font-stretch","font-style","font-synthesis","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","gap","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-gap","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-gap","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","inline-box-align","inset","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","left","letter-spacing","line-break","line-height","line-height-step","line-stacking","line-stacking-ruby","line-stacking-shift","line-stacking-strategy","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marks","marquee-direction","marquee-loop","marquee-play-count","marquee-speed","marquee-style","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","move-to","nav-down","nav-index","nav-left","nav-right","nav-up","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-style","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","page-policy","pause","pause-after","pause-before","perspective","perspective-origin","pitch","pitch-range","place-content","place-items","place-self","play-during","position","presentation-level","punctuation-trim","quotes","region-break-after","region-break-before","region-break-inside","region-fragment","rendering-intent","resize","rest","rest-after","rest-before","richness","right","rotate","rotation","rotation-point","row-gap","ruby-align","ruby-overhang","ruby-position","ruby-span","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-type","shape-image-threshold","shape-inside","shape-margin","shape-outside","size","speak","speak-as","speak-header","speak-numeral","speak-punctuation","speech-rate","stress","string-set","tab-size","table-layout","target","target-name","target-new","target-position","text-align","text-align-last","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-height","text-indent","text-justify","text-orientation","text-outline","text-overflow","text-rendering","text-shadow","text-size-adjust","text-space-collapse","text-transform","text-underline-position","text-wrap","top","touch-action","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-select","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","z-index","clip-path","clip-rule","mask","enable-background","filter","flood-color","flood-opacity","lighting-color","stop-color","stop-opacity","pointer-events","color-interpolation","color-interpolation-filters","color-rendering","fill","fill-opacity","fill-rule","image-rendering","marker","marker-end","marker-mid","marker-start","paint-order","shape-rendering","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-rendering","baseline-shift","dominant-baseline","glyph-orientation-horizontal","glyph-orientation-vertical","text-anchor","writing-mode"],d=t(u),p=["accent-color","aspect-ratio","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","content-visibility","margin-block","margin-block-end","margin-block-start","margin-inline","margin-inline-end","margin-inline-start","overflow-anchor","overscroll-behavior","padding-block","padding-block-end","padding-block-start","padding-inline","padding-inline-end","padding-inline-start","scroll-snap-stop","scrollbar-3d-light-color","scrollbar-arrow-color","scrollbar-base-color","scrollbar-dark-shadow-color","scrollbar-face-color","scrollbar-highlight-color","scrollbar-shadow-color","scrollbar-track-color","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","shape-inside","zoom"],m=t(p),f=t(["font-display","font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"]),h=t(["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"]),g=["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],v=t(g),b=["above","absolute","activeborder","additive","activecaption","afar","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","amharic","amharic-abegede","antialiased","appworkspace","arabic-indic","armenian","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","binary","bengali","blink","block","block-axis","blur","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","brightness","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","cambodian","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","cjk-earthly-branch","cjk-heavenly-stem","cjk-ideographic","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","contrast","copy","counter","counters","cover","crop","cross","crosshair","cubic-bezier","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","devanagari","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","drop-shadow","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic","ethiopic-abegede","ethiopic-abegede-am-et","ethiopic-abegede-gez","ethiopic-abegede-ti-er","ethiopic-abegede-ti-et","ethiopic-halehame-aa-er","ethiopic-halehame-aa-et","ethiopic-halehame-am-et","ethiopic-halehame-gez","ethiopic-halehame-om-et","ethiopic-halehame-sid-et","ethiopic-halehame-so-et","ethiopic-halehame-ti-er","ethiopic-halehame-ti-et","ethiopic-halehame-tig","ethiopic-numeric","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","georgian","grayscale","graytext","grid","groove","gujarati","gurmukhi","hand","hangul","hangul-consonant","hard-light","hebrew","help","hidden","hide","higher","highlight","highlighttext","hiragana","hiragana-iroha","horizontal","hsl","hsla","hue","hue-rotate","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","japanese-formal","japanese-informal","justify","kannada","katakana","katakana-iroha","keep-all","khmer","korean-hangul-formal","korean-hanja-formal","korean-hanja-informal","landscape","lao","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-alpha","lower-armenian","lower-greek","lower-hexadecimal","lower-latin","lower-norwegian","lower-roman","lowercase","ltr","luminosity","malayalam","manipulation","match","matrix","matrix3d","media-controls-background","media-current-time-display","media-fullscreen-button","media-mute-button","media-play-button","media-return-to-realtime-button","media-rewind-button","media-seek-back-button","media-seek-forward-button","media-slider","media-sliderthumb","media-time-remaining-display","media-volume-slider","media-volume-slider-container","media-volume-sliderthumb","medium","menu","menulist","menulist-button","menulist-text","menulist-textfield","menutext","message-box","middle","min-intrinsic","mix","mongolian","monospace","move","multiple","multiple_mask_images","multiply","myanmar","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","octal","opacity","open-quote","optimizeLegibility","optimizeSpeed","oriya","oromo","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","persian","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturate","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","searchfield","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","self-start","self-end","semi-condensed","semi-expanded","separate","sepia","serif","show","sidama","simp-chinese-formal","simp-chinese-informal","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","somali","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","square-button","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","tamil","telugu","text","text-bottom","text-top","textarea","textfield","thai","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","tibetan","tigre","tigrinya-er","tigrinya-er-abegede","tigrinya-et","tigrinya-et-abegede","to","top","trad-chinese-formal","trad-chinese-informal","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-alpha","upper-armenian","upper-greek","upper-hexadecimal","upper-latin","upper-norwegian","upper-roman","uppercase","urdu","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"],y=t(b),w=n.concat(o).concat(a).concat(s).concat(u).concat(p).concat(g).concat(b);function k(e,t){for(var n,r=!1;null!=(n=e.next());){if(r&&"/"==n){t.tokenize=null;break}r="*"==n}return["comment","comment"]}e.registerHelper("hintWords","css",w),e.defineMIME("text/css",{documentTypes:r,mediaTypes:i,mediaFeatures:l,mediaValueKeywords:c,propertyKeywords:d,nonStandardPropertyKeywords:m,fontProperties:f,counterDescriptors:h,colorKeywords:v,valueKeywords:y,tokenHooks:{"/":function(e,t){return!!e.eat("*")&&(t.tokenize=k,k(e,t))}},name:"css"}),e.defineMIME("text/x-scss",{mediaTypes:i,mediaFeatures:l,mediaValueKeywords:c,propertyKeywords:d,nonStandardPropertyKeywords:m,colorKeywords:v,valueKeywords:y,fontProperties:f,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(e,t){return e.eat("/")?(e.skipToEnd(),["comment","comment"]):e.eat("*")?(t.tokenize=k,k(e,t)):["operator","operator"]},":":function(e){return!!e.match(/^\s*\{/,!1)&&[null,null]},$:function(e){return e.match(/^[\w-]+/),e.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"]},"#":function(e){return!!e.eat("{")&&[null,"interpolation"]}},name:"css",helperType:"scss"}),e.defineMIME("text/x-less",{mediaTypes:i,mediaFeatures:l,mediaValueKeywords:c,propertyKeywords:d,nonStandardPropertyKeywords:m,colorKeywords:v,valueKeywords:y,fontProperties:f,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(e,t){return e.eat("/")?(e.skipToEnd(),["comment","comment"]):e.eat("*")?(t.tokenize=k,k(e,t)):["operator","operator"]},"@":function(e){return e.eat("{")?[null,"interpolation"]:!e.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/i,!1)&&(e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"])},"&":function(){return["atom","atom"]}},name:"css",helperType:"less"}),e.defineMIME("text/x-gss",{documentTypes:r,mediaTypes:i,mediaFeatures:l,propertyKeywords:d,nonStandardPropertyKeywords:m,fontProperties:f,counterDescriptors:h,colorKeywords:v,valueKeywords:y,supportsAtComponent:!0,tokenHooks:{"/":function(e,t){return!!e.eat("*")&&(t.tokenize=k,k(e,t))}},name:"css",helperType:"gss"})}(n(4631))},31934:function(e){e.exports=function(e,t,n){return((n=window.getComputedStyle)?n(e):e.currentStyle)[t.replace(/-(\w)/gi,(function(e,t){return t.toUpperCase()}))]}},70057:function(e,t,n){t.parse=n(49951),t.stringify=n(29980)},49951:function(e){var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;function n(e){return e?e.replace(/^\s+|\s+$/g,""):""}function r(e,t){var n=e&&"string"==typeof e.type,o=n?e:t;for(var i in e){var a=e[i];Array.isArray(a)?a.forEach((function(e){r(e,o)})):a&&"object"==typeof a&&r(a,o)}return n&&Object.defineProperty(e,"parent",{configurable:!0,writable:!0,enumerable:!1,value:t||null}),e}e.exports=function(e,o){o=o||{};var i=1,a=1;function l(e){var t=e.match(/\n/g);t&&(i+=t.length);var n=e.lastIndexOf("\n");a=~n?e.length-n:a+e.length}function s(){var e={line:i,column:a};return function(t){return t.position=new c(e),g(),t}}function c(e){this.start=e,this.end={line:i,column:a},this.source=o.source}c.prototype.content=e;var u=[];function d(t){var n=new Error(o.source+":"+i+":"+a+": "+t);if(n.reason=t,n.filename=o.source,n.line=i,n.column=a,n.source=e,!o.silent)throw n;u.push(n)}function p(){return h(/^{\s*/)}function m(){return h(/^}/)}function f(){var t,n,r,o=[];for(g(),v(o);e.length&&"}"!=e.charAt(0)&&(t=T()||(n=void 0,r=void 0,n=s(),(r=y())?(v(),n({type:"rule",selectors:r,declarations:k()})):d("selector missing")));)!1!==t&&(o.push(t),v(o));return o}function h(t){var n=t.exec(e);if(n){var r=n[0];return l(r),e=e.slice(r.length),n}}function g(){h(/^\s*/)}function v(e){var t;for(e=e||[];t=b();)!1!==t&&e.push(t);return e}function b(){var t=s();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var n=2;""!=e.charAt(n)&&("*"!=e.charAt(n)||"/"!=e.charAt(n+1));)++n;if(n+=2,""===e.charAt(n-1))return d("End of comment missing");var r=e.slice(2,n-2);return a+=2,l(r),e=e.slice(n),a+=2,t({type:"comment",comment:r})}}function y(){var e=h(/^([^{]+)/);if(e)return n(e[0]).replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*\/+/g,"").replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g,(function(e){return e.replace(/,/g,"")})).split(/\s*(?![^(]*\)),\s*/).map((function(e){return e.replace(/\u200C/g,",")}))}function w(){var e=s(),r=h(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(r){if(r=n(r[0]),!h(/^:\s*/))return d("property missing ':'");var o=h(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),i=e({type:"declaration",property:r.replace(t,""),value:o?n(o[0]).replace(t,""):""});return h(/^[;\s]*/),i}}function k(){var e,t=[];if(!p())return d("missing '{'");for(v(t);e=w();)!1!==e&&(t.push(e),v(t));return m()?t:d("missing '}'")}function E(){for(var e,t=[],n=s();e=h(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)t.push(e[1]),h(/^,\s*/);if(t.length)return n({type:"keyframe",values:t,declarations:k()})}var _,C=I("import"),x=I("charset"),S=I("namespace");function I(e){var t=new RegExp("^@"+e+"\\s*([^;]+);");return function(){var n=s(),r=h(t);if(r){var o={type:e};return o[e]=r[1].trim(),n(o)}}}function T(){if("@"==e[0])return function(){var e=s();if(t=h(/^@([-\w]+)?keyframes\s*/)){var t,n=t[1];if(!(t=h(/^([-\w]+)\s*/)))return d("@keyframes missing name");var r,o=t[1];if(!p())return d("@keyframes missing '{'");for(var i=v();r=E();)i.push(r),i=i.concat(v());return m()?e({type:"keyframes",name:o,vendor:n,keyframes:i}):d("@keyframes missing '}'")}}()||function(){var e=s(),t=h(/^@media *([^{]+)/);if(t){var r=n(t[1]);if(!p())return d("@media missing '{'");var o=v().concat(f());return m()?e({type:"media",media:r,rules:o}):d("@media missing '}'")}}()||function(){var e=s(),t=h(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(t)return e({type:"custom-media",name:n(t[1]),media:n(t[2])})}()||function(){var e=s(),t=h(/^@supports *([^{]+)/);if(t){var r=n(t[1]);if(!p())return d("@supports missing '{'");var o=v().concat(f());return m()?e({type:"supports",supports:r,rules:o}):d("@supports missing '}'")}}()||C()||x()||S()||function(){var e=s(),t=h(/^@([-\w]+)?document *([^{]+)/);if(t){var r=n(t[1]),o=n(t[2]);if(!p())return d("@document missing '{'");var i=v().concat(f());return m()?e({type:"document",document:o,vendor:r,rules:i}):d("@document missing '}'")}}()||function(){var e=s();if(h(/^@page */)){var t=y()||[];if(!p())return d("@page missing '{'");for(var n,r=v();n=w();)r.push(n),r=r.concat(v());return m()?e({type:"page",selectors:t,declarations:r}):d("@page missing '}'")}}()||function(){var e=s();if(h(/^@host\s*/)){if(!p())return d("@host missing '{'");var t=v().concat(f());return m()?e({type:"host",rules:t}):d("@host missing '}'")}}()||function(){var e=s();if(h(/^@font-face\s*/)){if(!p())return d("@font-face missing '{'");for(var t,n=v();t=w();)n.push(t),n=n.concat(v());return m()?e({type:"font-face",declarations:n}):d("@font-face missing '}'")}}()}return r((_=f(),{type:"stylesheet",stylesheet:{source:o.source,rules:_,parsingErrors:u}}))}},57146:function(e){function t(e){this.options=e||{}}e.exports=t,t.prototype.emit=function(e){return e},t.prototype.visit=function(e){return this[e.type](e)},t.prototype.mapVisit=function(e,t){var n="";t=t||"";for(var r=0,o=e.length;r<o;r++)n+=this.visit(e[r]),t&&r<o-1&&(n+=this.emit(t));return n}},25078:function(e,t,n){var r=n(57146),o=n(33597);function i(e){r.call(this,e)}e.exports=i,o(i,r),i.prototype.compile=function(e){return e.stylesheet.rules.map(this.visit,this).join("")},i.prototype.comment=function(e){return this.emit("",e.position)},i.prototype.import=function(e){return this.emit("@import "+e.import+";",e.position)},i.prototype.media=function(e){return this.emit("@media "+e.media,e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")},i.prototype.document=function(e){var t="@"+(e.vendor||"")+"document "+e.document;return this.emit(t,e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")},i.prototype.charset=function(e){return this.emit("@charset "+e.charset+";",e.position)},i.prototype.namespace=function(e){return this.emit("@namespace "+e.namespace+";",e.position)},i.prototype.supports=function(e){return this.emit("@supports "+e.supports,e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")},i.prototype.keyframes=function(e){return this.emit("@"+(e.vendor||"")+"keyframes "+e.name,e.position)+this.emit("{")+this.mapVisit(e.keyframes)+this.emit("}")},i.prototype.keyframe=function(e){var t=e.declarations;return this.emit(e.values.join(","),e.position)+this.emit("{")+this.mapVisit(t)+this.emit("}")},i.prototype.page=function(e){var t=e.selectors.length?e.selectors.join(", "):"";return this.emit("@page "+t,e.position)+this.emit("{")+this.mapVisit(e.declarations)+this.emit("}")},i.prototype["font-face"]=function(e){return this.emit("@font-face",e.position)+this.emit("{")+this.mapVisit(e.declarations)+this.emit("}")},i.prototype.host=function(e){return this.emit("@host",e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")},i.prototype["custom-media"]=function(e){return this.emit("@custom-media "+e.name+" "+e.media+";",e.position)},i.prototype.rule=function(e){var t=e.declarations;return t.length?this.emit(e.selectors.join(","),e.position)+this.emit("{")+this.mapVisit(t)+this.emit("}"):""},i.prototype.declaration=function(e){return this.emit(e.property+":"+e.value,e.position)+this.emit(";")}},4483:function(e,t,n){var r=n(57146),o=n(33597);function i(e){e=e||{},r.call(this,e),this.indentation=e.indent}e.exports=i,o(i,r),i.prototype.compile=function(e){return this.stylesheet(e)},i.prototype.stylesheet=function(e){return this.mapVisit(e.stylesheet.rules,"\n\n")},i.prototype.comment=function(e){return this.emit(this.indent()+"/*"+e.comment+"*/",e.position)},i.prototype.import=function(e){return this.emit("@import "+e.import+";",e.position)},i.prototype.media=function(e){return this.emit("@media "+e.media,e.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(e.rules,"\n\n")+this.emit(this.indent(-1)+"\n}")},i.prototype.document=function(e){var t="@"+(e.vendor||"")+"document "+e.document;return this.emit(t,e.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(e.rules,"\n\n")+this.emit(this.indent(-1)+"\n}")},i.prototype.charset=function(e){return this.emit("@charset "+e.charset+";",e.position)},i.prototype.namespace=function(e){return this.emit("@namespace "+e.namespace+";",e.position)},i.prototype.supports=function(e){return this.emit("@supports "+e.supports,e.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(e.rules,"\n\n")+this.emit(this.indent(-1)+"\n}")},i.prototype.keyframes=function(e){return this.emit("@"+(e.vendor||"")+"keyframes "+e.name,e.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(e.keyframes,"\n")+this.emit(this.indent(-1)+"}")},i.prototype.keyframe=function(e){var t=e.declarations;return this.emit(this.indent())+this.emit(e.values.join(", "),e.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(t,"\n")+this.emit(this.indent(-1)+"\n"+this.indent()+"}\n")},i.prototype.page=function(e){var t=e.selectors.length?e.selectors.join(", ")+" ":"";return this.emit("@page "+t,e.position)+this.emit("{\n")+this.emit(this.indent(1))+this.mapVisit(e.declarations,"\n")+this.emit(this.indent(-1))+this.emit("\n}")},i.prototype["font-face"]=function(e){return this.emit("@font-face ",e.position)+this.emit("{\n")+this.emit(this.indent(1))+this.mapVisit(e.declarations,"\n")+this.emit(this.indent(-1))+this.emit("\n}")},i.prototype.host=function(e){return this.emit("@host",e.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(e.rules,"\n\n")+this.emit(this.indent(-1)+"\n}")},i.prototype["custom-media"]=function(e){return this.emit("@custom-media "+e.name+" "+e.media+";",e.position)},i.prototype.rule=function(e){var t=this.indent(),n=e.declarations;return n.length?this.emit(e.selectors.map((function(e){return t+e})).join(",\n"),e.position)+this.emit(" {\n")+this.emit(this.indent(1))+this.mapVisit(n,"\n")+this.emit(this.indent(-1))+this.emit("\n"+this.indent()+"}"):""},i.prototype.declaration=function(e){return this.emit(this.indent())+this.emit(e.property+": "+e.value,e.position)+this.emit(";")},i.prototype.indent=function(e){return this.level=this.level||1,null!=e?(this.level+=e,""):Array(this.level).join(this.indentation||" ")}},29980:function(e,t,n){var r=n(25078),o=n(4483);e.exports=function(e,t){var i=(t=t||{}).compress?new r(t):new o(t);if(t.sourcemap){n(98835)(i);var a=i.compile(e);return i.applySourceMaps(),{code:a,map:"generator"===t.sourcemap?i.map:i.map.toJSON()}}return i.compile(e)}},98835:function(e,t,n){var r=n(49125).SourceMapGenerator,o=n(49125).SourceMapConsumer,i=n(6603),a=n(91343),l=n(26470);e.exports=function(e){for(var n in e._comment=e.comment,e.map=new r,e.position={line:1,column:1},e.files={},t)e[n]=t[n]};const s=function(e){return"\\"===l.sep?e.replace(/\\/g,"/").replace(/^[a-z]:\/?/i,"/"):e};t.updatePosition=function(e){var t=e.match(/\n/g);t&&(this.position.line+=t.length);var n=e.lastIndexOf("\n");this.position.column=~n?e.length-n:this.position.column+e.length},t.emit=function(e,t){if(t){var n=s(t.source||"source.css");this.map.addMapping({source:n,generated:{line:this.position.line,column:Math.max(this.position.column-1,0)},original:{line:t.start.line,column:t.start.column-1}}),this.addFile(n,t)}return this.updatePosition(e),e},t.addFile=function(e,t){"string"==typeof t.content&&(Object.prototype.hasOwnProperty.call(this.files,e)||(this.files[e]=t.content))},t.applySourceMaps=function(){Object.keys(this.files).forEach((function(e){var t=this.files[e];if(this.map.setSourceContent(e,t),!1!==this.options.inputSourcemaps){var n=i.resolveSync(t,e,a.readFileSync);if(n){var r=new o(n.map),c=n.sourcesRelativeTo;this.map.applySourceMap(r,e,s(l.dirname(c)))}}}),this)},t.comment=function(e){return/^# sourceMappingURL=/.test(e.comment)?this.emit("",e.position):this._comment(e)}},33597:function(e){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}},6603:function(e,t,n){var r=n(79892),o=n(8575),i=n(26470),a=n(44020);function l(){return Array.prototype.reduce.call(arguments,(function(e,t){return o.resolve(e,t)}))}function s(e){return"\\"===i.sep?e.replace(/\\/g,"/").replace(/^[a-z]:\/?/i,"/"):e}function c(e){return a(e.replace(/\+/g,"%2B"))}function u(e,t,n){setImmediate((function(){e(t,n)}))}function d(e,t){try{return JSON.parse(e.replace(/^\)\]\}'/,""))}catch(e){throw e.sourceMapData=t,e}}function p(e,t,n){var r=c(t);try{return String(e(r))}catch(e){throw e.sourceMapData=n,e}}var m=/[#@] sourceMappingURL=([^\s'"]*)/,f=RegExp("(?:/\\*(?:\\s*\r?\n(?://)?)?(?:"+m.source+")\\s*\\*/|//(?:"+m.source+"))\\s*");function h(e,t,n,r){var o;try{o=y(e,t)}catch(e){return u(r,e)}if(!o||o.map)return u(r,null,o);n(c(o.url),(function(e,t){if(e)return e.sourceMapData=o,r(e);o.map=String(t);try{o.map=d(o.map,o)}catch(e){return r(e)}r(null,o)}))}function g(e,t,n){var r=y(e,t);return!r||r.map||(r.map=p(n,r.url,r),r.map=d(r.map,r)),r}var v=/^data:([^,;]*)(;[^,;]*)*(?:,(.*))?$/,b=/^(?:application|text)\/json$/;function y(e,t){t=s(t);var n=function(e){var t=e.match(f);return t?t[1]||t[2]||"":null}(e);if(!n)return null;var o=n.match(v);if(o){var i=o[1]||"text/plain",a=o[2]||"",c=o[3]||"",u={sourceMappingURL:n,url:null,sourcesRelativeTo:t,map:c};if(!b.test(i)){var p=new Error("Unuseful data uri mime type: "+i);throw p.sourceMapData=u,p}try{u.map=d(";base64"===a?function(e){if("undefined"==typeof TextDecoder||"undefined"==typeof Uint8Array)return r(e);var t=function(e){for(var t=r(e),n=t.length,o=new Uint8Array(n),i=0;i<n;i++)o[i]=t.charCodeAt(i);return o}(e);return new TextDecoder("utf-8",{fatal:!0}).decode(t)}(c):decodeURIComponent(c),u)}catch(p){throw p.sourceMapData=u,p}return u}var m=l(t,n);return{sourceMappingURL:n,url:m,sourcesRelativeTo:m,map:null}}function w(e,t,n,r,o){"function"==typeof r&&(o=r,r={});var i=e.sources?e.sources.length:0,a={sourcesResolved:[],sourcesContent:[]};if(0!==i){var l=function(){0==--i&&o(null,a)};_(e,t,r,(function(e,t,r){if(a.sourcesResolved[r]=e,"string"==typeof t)a.sourcesContent[r]=t,u(l,null);else{var o=c(e);n(o,(function(e,t){a.sourcesContent[r]=e||String(t),l()}))}}))}else u(o,null,a)}function k(e,t,n,r){var o={sourcesResolved:[],sourcesContent:[]};return e.sources&&0!==e.sources.length?(_(e,t,r,(function(e,t,r){if(o.sourcesResolved[r]=e,null!==n)if("string"==typeof t)o.sourcesContent[r]=t;else{var i=c(e);try{o.sourcesContent[r]=String(n(i))}catch(e){o.sourcesContent[r]=e}}})),o):o}var E=/\/?$/;function _(e,t,n,r){var o;n=n||{},t=s(t);for(var i=0,a=e.sources.length;i<a;i++)o=null,"string"==typeof n.sourceRoot?o=n.sourceRoot:"string"==typeof e.sourceRoot&&!1!==n.sourceRoot&&(o=e.sourceRoot),r(null===o||""===o?l(t,e.sources[i]):l(t,o.replace(E,"/"),e.sources[i]),(e.sourcesContent||[])[i],i)}e.exports={resolveSourceMap:h,resolveSourceMapSync:g,resolveSources:w,resolveSourcesSync:k,resolve:function(e,t,n,r,o){if("function"==typeof r&&(o=r,r={}),null===e){var i={sourceMappingURL:null,url:t,sourcesRelativeTo:t,map:null},a=c(t);n(a,(function(e,t){if(e)return e.sourceMapData=i,o(e);i.map=String(t);try{i.map=d(i.map,i)}catch(e){return o(e)}l(i)}))}else h(e,t,n,(function(e,t){return e?o(e):t?void l(t):o(null,null)}));function l(e){w(e.map,e.sourcesRelativeTo,n,r,(function(t,n){if(t)return o(t);e.sourcesResolved=n.sourcesResolved,e.sourcesContent=n.sourcesContent,o(null,e)}))}},resolveSync:function(e,t,n,r){var o;if(null===e)(o={sourceMappingURL:null,url:t,sourcesRelativeTo:t,map:null}).map=p(n,t,o),o.map=d(o.map,o);else if(!(o=g(e,t,n)))return null;var i=k(o.map,o.sourcesRelativeTo,n,r);return o.sourcesResolved=i.sourcesResolved,o.sourcesContent=i.sourcesContent,o},parseMapToJSON:d}},44020:function(e){"use strict";var t="%[a-f0-9]{2}",n=new RegExp(t,"gi"),r=new RegExp("("+t+")+","gi");function o(e,t){try{return decodeURIComponent(e.join(""))}catch(e){}if(1===e.length)return e;t=t||1;var n=e.slice(0,t),r=e.slice(t);return Array.prototype.concat.call([],o(n),o(r))}function i(e){try{return decodeURIComponent(e)}catch(i){for(var t=e.match(n),r=1;r<t.length;r++)t=(e=o(t,r).join("")).match(n);return e}}e.exports=function(e){if("string"!=typeof e)throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return e=e.replace(/\+/g," "),decodeURIComponent(e)}catch(t){return function(e){for(var t={"%FE%FF":"��","%FF%FE":"��"},n=r.exec(e);n;){try{t[n[0]]=decodeURIComponent(n[0])}catch(e){var o=i(n[0]);o!==n[0]&&(t[n[0]]=o)}n=r.exec(e)}t["%C2"]="�";for(var a=Object.keys(t),l=0;l<a.length;l++){var s=a[l];e=e.replace(new RegExp(s,"g"),t[s])}return e}(e)}}},89010:function(e,t,n){"use strict";var r=n(54657);e.exports=function(e,t,n){n=n||{},9===t.nodeType&&(t=r.getWindow(t));var o=n.allowHorizontalScroll,i=n.onlyScrollIfNeeded,a=n.alignWithTop,l=n.alignWithLeft,s=n.offsetTop||0,c=n.offsetLeft||0,u=n.offsetBottom||0,d=n.offsetRight||0;o=void 0===o||o;var p=r.isWindow(t),m=r.offset(e),f=r.outerHeight(e),h=r.outerWidth(e),g=void 0,v=void 0,b=void 0,y=void 0,w=void 0,k=void 0,E=void 0,_=void 0,C=void 0,x=void 0;p?(E=t,x=r.height(E),C=r.width(E),_={left:r.scrollLeft(E),top:r.scrollTop(E)},w={left:m.left-_.left-c,top:m.top-_.top-s},k={left:m.left+h-(_.left+C)+d,top:m.top+f-(_.top+x)+u},y=_):(g=r.offset(t),v=t.clientHeight,b=t.clientWidth,y={left:t.scrollLeft,top:t.scrollTop},w={left:m.left-(g.left+(parseFloat(r.css(t,"borderLeftWidth"))||0))-c,top:m.top-(g.top+(parseFloat(r.css(t,"borderTopWidth"))||0))-s},k={left:m.left+h-(g.left+b+(parseFloat(r.css(t,"borderRightWidth"))||0))+d,top:m.top+f-(g.top+v+(parseFloat(r.css(t,"borderBottomWidth"))||0))+u}),w.top<0||k.top>0?!0===a?r.scrollTop(t,y.top+w.top):!1===a?r.scrollTop(t,y.top+k.top):w.top<0?r.scrollTop(t,y.top+w.top):r.scrollTop(t,y.top+k.top):i||((a=void 0===a||!!a)?r.scrollTop(t,y.top+w.top):r.scrollTop(t,y.top+k.top)),o&&(w.left<0||k.left>0?!0===l?r.scrollLeft(t,y.left+w.left):!1===l?r.scrollLeft(t,y.left+k.left):w.left<0?r.scrollLeft(t,y.left+w.left):r.scrollLeft(t,y.left+k.left):i||((l=void 0===l||!!l)?r.scrollLeft(t,y.left+w.left):r.scrollLeft(t,y.left+k.left)))}},34979:function(e,t,n){"use strict";e.exports=n(89010)},54657:function(e){"use strict";var t=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},n="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 r(e,t){var n=e["page"+(t?"Y":"X")+"Offset"],r="scroll"+(t?"Top":"Left");if("number"!=typeof n){var o=e.document;"number"!=typeof(n=o.documentElement[r])&&(n=o.body[r])}return n}function o(e){return r(e)}function i(e){return r(e,!0)}function a(e){var t=function(e){var t,n=void 0,r=void 0,o=e.ownerDocument,i=o.body,a=o&&o.documentElement;return n=(t=e.getBoundingClientRect()).left,r=t.top,{left:n-=a.clientLeft||i.clientLeft||0,top:r-=a.clientTop||i.clientTop||0}}(e),n=e.ownerDocument,r=n.defaultView||n.parentWindow;return t.left+=o(r),t.top+=i(r),t}var l=new RegExp("^("+/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source+")(?!px)[a-z%]+$","i"),s=/^(top|right|bottom|left)$/,c=void 0;function u(e,t){for(var n=0;n<e.length;n++)t(e[n])}function d(e){return"border-box"===c(e,"boxSizing")}"undefined"!=typeof window&&(c=window.getComputedStyle?function(e,t,n){var r="",o=e.ownerDocument,i=n||o.defaultView.getComputedStyle(e,null);return i&&(r=i.getPropertyValue(t)||i[t]),r}:function(e,t){var n=e.currentStyle&&e.currentStyle[t];if(l.test(n)&&!s.test(t)){var r=e.style,o=r.left,i=e.runtimeStyle.left;e.runtimeStyle.left=e.currentStyle.left,r.left="fontSize"===t?"1em":n||0,n=r.pixelLeft+"px",r.left=o,e.runtimeStyle.left=i}return""===n?"auto":n});var p=["margin","border","padding"];function m(e,t,n){var r={},o=e.style,i=void 0;for(i in t)t.hasOwnProperty(i)&&(r[i]=o[i],o[i]=t[i]);for(i in n.call(e),t)t.hasOwnProperty(i)&&(o[i]=r[i])}function f(e,t,n){var r=0,o=void 0,i=void 0,a=void 0;for(i=0;i<t.length;i++)if(o=t[i])for(a=0;a<n.length;a++){var l;l="border"===o?o+n[a]+"Width":o+n[a],r+=parseFloat(c(e,l))||0}return r}function h(e){return null!=e&&e==e.window}var g={};function v(e,t,n){if(h(e))return"width"===t?g.viewportWidth(e):g.viewportHeight(e);if(9===e.nodeType)return"width"===t?g.docWidth(e):g.docHeight(e);var r="width"===t?["Left","Right"]:["Top","Bottom"],o="width"===t?e.offsetWidth:e.offsetHeight,i=(c(e),d(e)),a=0;(null==o||o<=0)&&(o=void 0,(null==(a=c(e,t))||Number(a)<0)&&(a=e.style[t]||0),a=parseFloat(a)||0),void 0===n&&(n=i?1:-1);var l=void 0!==o||i,s=o||a;if(-1===n)return l?s-f(e,["border","padding"],r):a;if(l){var u=2===n?-f(e,["border"],r):f(e,["margin"],r);return s+(1===n?0:u)}return a+f(e,p.slice(n),r)}u(["Width","Height"],(function(e){g["doc"+e]=function(t){var n=t.document;return Math.max(n.documentElement["scroll"+e],n.body["scroll"+e],g["viewport"+e](n))},g["viewport"+e]=function(t){var n="client"+e,r=t.document,o=r.body,i=r.documentElement[n];return"CSS1Compat"===r.compatMode&&i||o&&o[n]||i}}));var b={position:"absolute",visibility:"hidden",display:"block"};function y(e){var t=void 0,n=arguments;return 0!==e.offsetWidth?t=v.apply(void 0,n):m(e,b,(function(){t=v.apply(void 0,n)})),t}function w(e,t,r){var o=r;if("object"!==(void 0===t?"undefined":n(t)))return void 0!==o?("number"==typeof o&&(o+="px"),void(e.style[t]=o)):c(e,t);for(var i in t)t.hasOwnProperty(i)&&w(e,i,t[i])}u(["width","height"],(function(e){var t=e.charAt(0).toUpperCase()+e.slice(1);g["outer"+t]=function(t,n){return t&&y(t,e,n?0:1)};var n="width"===e?["Left","Right"]:["Top","Bottom"];g[e]=function(t,r){return void 0===r?t&&y(t,e,-1):t?(c(t),d(t)&&(r+=f(t,["padding","border"],n)),w(t,e,r)):void 0}})),e.exports=t({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"===w(e,"position")&&(e.style.position="relative");var n=a(e),r={},o=void 0,i=void 0;for(i in t)t.hasOwnProperty(i)&&(o=parseFloat(w(e,i))||0,r[i]=o+t[i]-n[i]);w(e,r)}(e,t)},isWindow:h,each:u,css:w,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(h(e)){if(void 0===t)return o(e);window.scrollTo(t,i(e))}else{if(void 0===t)return e.scrollLeft;e.scrollLeft=t}},scrollTop:function(e,t){if(h(e)){if(void 0===t)return i(e);window.scrollTo(o(e),t)}else{if(void 0===t)return e.scrollTop;e.scrollTop=t}},viewportWidth:0,viewportHeight:0},g)},56781:function(e,t){"use strict";if("function"==typeof Symbol&&Symbol.for){var n=Symbol.for;n("react.element"),n("react.portal"),n("react.fragment"),n("react.strict_mode"),n("react.profiler"),n("react.provider"),n("react.context"),n("react.forward_ref"),n("react.suspense"),n("react.suspense_list"),n("react.memo"),n("react.lazy"),n("react.block"),n("react.server.block"),n("react.fundamental"),n("react.debug_trace_mode"),n("react.legacy_hidden")}},21726:function(e,t,n){"use strict";n(56781)},53316:function(e){function t(e,t,n,r){var o,i=null==(o=r)||"number"==typeof o||"boolean"==typeof o?r:n(r),a=t.get(i);return void 0===a&&(a=e.call(this,r),t.set(i,a)),a}function n(e,t,n){var r=Array.prototype.slice.call(arguments,3),o=n(r),i=t.get(o);return void 0===i&&(i=e.apply(this,r),t.set(o,i)),i}function r(e,t,n,r,o){return n.bind(t,e,r,o)}function o(e,o){return r(e,this,1===e.length?t:n,o.cache.create(),o.serializer)}function i(){return JSON.stringify(arguments)}function a(){this.cache=Object.create(null)}a.prototype.has=function(e){return e in this.cache},a.prototype.get=function(e){return this.cache[e]},a.prototype.set=function(e,t){this.cache[e]=t};var l={create:function(){return new a}};e.exports=function(e,t){var n=t&&t.cache?t.cache:l,r=t&&t.serializer?t.serializer:i;return(t&&t.strategy?t.strategy:o)(e,{cache:n,serializer:r})},e.exports.strategies={variadic:function(e,t){return r(e,this,n,t.cache.create(),t.serializer)},monadic:function(e,n){return r(e,this,t,n.cache.create(),n.serializer)}}},49948:function(e,t){var n={};n.parse=function(){var e=/^(\-(webkit|o|ms|moz)\-)?(linear\-gradient)/i,t=/^(\-(webkit|o|ms|moz)\-)?(repeating\-linear\-gradient)/i,n=/^(\-(webkit|o|ms|moz)\-)?(radial\-gradient)/i,r=/^(\-(webkit|o|ms|moz)\-)?(repeating\-radial\-gradient)/i,o=/^to (left (top|bottom)|right (top|bottom)|left|right|top|bottom)/i,i=/^(closest\-side|closest\-corner|farthest\-side|farthest\-corner|contain|cover)/,a=/^(left|center|right|top|bottom)/i,l=/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))px/,s=/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))\%/,c=/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))em/,u=/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))deg/,d=/^\(/,p=/^\)/,m=/^,/,f=/^\#([0-9a-fA-F]+)/,h=/^([a-zA-Z]+)/,g=/^rgb/i,v=/^rgba/i,b=/^(([0-9]*\.[0-9]+)|([0-9]+\.?))/,y="";function w(e){var t=new Error(y+": "+e);throw t.source=y,t}function k(){return E("linear-gradient",e,C)||E("repeating-linear-gradient",t,C)||E("radial-gradient",n,x)||E("repeating-radial-gradient",r,x)}function E(e,t,n){return _(t,(function(t){var r=n();return r&&(D(m)||w("Missing comma before color stops")),{type:e,orientation:r,colorStops:N(A)}}))}function _(e,t){var n=D(e);if(n)return D(d)||w("Missing ("),result=t(n),D(p)||w("Missing )"),result}function C(){return O("directional",o,1)||O("angular",u,1)}function x(){var e,t,n=S();return n&&((e=[]).push(n),t=y,D(m)&&((n=S())?e.push(n):y=t)),e}function S(){var e,t,n=((t=O("shape",/^(circle)/i,0))&&(t.style=P()||I()),t||((e=O("shape",/^(ellipse)/i,0))&&(e.style=L()||I()),e));if(n)n.at=function(){if(O("position",/^at/,0)){var e=T();return e||w("Missing positioning value"),e}}();else{var r=T();r&&(n={type:"default-radial",at:r})}return n}function I(){return O("extent-keyword",i,1)}function T(){var e={x:L(),y:L()};if(e.x||e.y)return{type:"position",value:e}}function N(e){var t=e(),n=[];if(t)for(n.push(t);D(m);)(t=e())?n.push(t):w("One extra comma");return n}function A(){var e=O("hex",f,1)||_(v,(function(){return{type:"rgba",value:N(R)}}))||_(g,(function(){return{type:"rgb",value:N(R)}}))||O("literal",h,0);return e||w("Expected color definition"),e.length=L(),e}function R(){return D(b)[1]}function L(){return O("%",s,1)||O("position-keyword",a,1)||P()}function P(){return O("px",l,1)||O("em",c,1)}function O(e,t,n){var r=D(t);if(r)return{type:e,value:r[n]}}function D(e){var t,n;return(n=/^[\n\r\t\s]+/.exec(y))&&M(n[0].length),(t=e.exec(y))&&M(t[0].length),t}function M(e){y=y.substr(e)}return function(e){return y=e.toString(),t=N(k),y.length>0&&w("Invalid input not EOF"),t;var t}}(),t.parse=(n||{}).parse},96928:function(e){e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}return n.m=e,n.c=t,n.p="",n(0)}([function(e,t,n){e.exports=n(1)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2);Object.defineProperty(t,"combineChunks",{enumerable:!0,get:function(){return r.combineChunks}}),Object.defineProperty(t,"fillInChunks",{enumerable:!0,get:function(){return r.fillInChunks}}),Object.defineProperty(t,"findAll",{enumerable:!0,get:function(){return r.findAll}}),Object.defineProperty(t,"findChunks",{enumerable:!0,get:function(){return r.findChunks}})},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.findAll=function(e){var t=e.autoEscape,i=e.caseSensitive,a=void 0!==i&&i,l=e.findChunks,s=void 0===l?r:l,c=e.sanitize,u=e.searchWords,d=e.textToHighlight;return o({chunksToHighlight:n({chunks:s({autoEscape:t,caseSensitive:a,sanitize:c,searchWords:u,textToHighlight:d})}),totalLength:d?d.length:0})};var n=t.combineChunks=function(e){var t=e.chunks;return t.sort((function(e,t){return e.start-t.start})).reduce((function(e,t){if(0===e.length)return[t];var n=e.pop();if(t.start<=n.end){var r=Math.max(n.end,t.end);e.push({highlight:!1,start:n.start,end:r})}else e.push(n,t);return e}),[])},r=function(e){var t=e.autoEscape,n=e.caseSensitive,r=e.sanitize,o=void 0===r?i:r,a=e.searchWords,l=e.textToHighlight;return l=o(l),a.filter((function(e){return e})).reduce((function(e,r){r=o(r),t&&(r=r.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"));for(var i=new RegExp(r,n?"g":"gi"),a=void 0;a=i.exec(l);){var s=a.index,c=i.lastIndex;c>s&&e.push({highlight:!1,start:s,end:c}),a.index===i.lastIndex&&i.lastIndex++}return e}),[])};t.findChunks=r;var o=t.fillInChunks=function(e){var t=e.chunksToHighlight,n=e.totalLength,r=[],o=function(e,t,n){t-e>0&&r.push({start:e,end:t,highlight:n})};if(0===t.length)o(0,n,!1);else{var i=0;t.forEach((function(e){o(i,e.start,!1),o(e.start,e.end,!0),i=e.end})),o(i,n,!1)}return r};function i(e){return e}}])},36808:function(e,t,n){var r,o,i;void 0===(o="function"==typeof(r=i=function(){function e(){for(var e=0,t={};e<arguments.length;e++){var n=arguments[e];for(var r in n)t[r]=n[r]}return t}function t(e){return e.replace(/(%[0-9A-Z]{2})+/g,decodeURIComponent)}return function n(r){function o(){}function i(t,n,i){if("undefined"!=typeof document){"number"==typeof(i=e({path:"/"},o.defaults,i)).expires&&(i.expires=new Date(1*new Date+864e5*i.expires)),i.expires=i.expires?i.expires.toUTCString():"";try{var a=JSON.stringify(n);/^[\{\[]/.test(a)&&(n=a)}catch(e){}n=r.write?r.write(n,t):encodeURIComponent(String(n)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),t=encodeURIComponent(String(t)).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/[\(\)]/g,escape);var l="";for(var s in i)i[s]&&(l+="; "+s,!0!==i[s]&&(l+="="+i[s].split(";")[0]));return document.cookie=t+"="+n+l}}function a(e,n){if("undefined"!=typeof document){for(var o={},i=document.cookie?document.cookie.split("; "):[],a=0;a<i.length;a++){var l=i[a].split("="),s=l.slice(1).join("=");n||'"'!==s.charAt(0)||(s=s.slice(1,-1));try{var c=t(l[0]);if(s=(r.read||r)(s,c)||t(s),n)try{s=JSON.parse(s)}catch(e){}if(o[c]=s,e===c)break}catch(e){}}return e?o[e]:o}}return o.set=i,o.get=function(e){return a(e,!1)},o.getJSON=function(e){return a(e,!0)},o.remove=function(t,n){i(t,"",e(n,{expires:-1}))},o.defaults={},o.withConverter=n,o}((function(){}))})?r.call(t,n,t,e):r)||(e.exports=o),e.exports=i()},58303:function(e,t,n){var r=n(31934);e.exports=function(e){var t=r(e,"line-height"),n=parseFloat(t,10);if(t===n+""){var o=e.style.lineHeight;e.style.lineHeight=t+"em",t=r(e,"line-height"),n=parseFloat(t,10),o?e.style.lineHeight=o: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,a=document.createElement(i);a.innerHTML=" ","TEXTAREA"===i.toUpperCase()&&a.setAttribute("rows","1");var l=r(e,"font-size");a.style.fontSize=l,a.style.padding="0px",a.style.border="0px";var s=document.body;s.appendChild(a),n=a.offsetHeight,s.removeChild(a)}return n}},59588:function(e){e.exports=function(e,t){var n,r,o=0;function i(){var i,a,l=n,s=arguments.length;e:for(;l;){if(l.args.length===arguments.length){for(a=0;a<s;a++)if(l.args[a]!==arguments[a]){l=l.next;continue e}return l!==n&&(l===r&&(r=l.prev),l.prev.next=l.next,l.next&&(l.next.prev=l.prev),l.next=n,l.prev=null,n.prev=l,n=l),l.val}l=l.next}for(i=new Array(s),a=0;a<s;a++)i[a]=arguments[a];return l={args:i,val:e.apply(null,i)},n?(n.prev=l,l.next=n):r=l,o===t.maxSize?(r=r.prev).next=null:o++,n=l,l.val}return t=t||{},i.clear=function(){n=null,r=null,o=0},i}},23956:function(){!function(e){if(e){var t={},n=e.prototype.stopCallback;e.prototype.stopCallback=function(e,r,o,i){return!!this.paused||!t[o]&&!t[i]&&n.call(this,e,r,o)},e.prototype.bindGlobal=function(e,n,r){if(this.bind(e,n,r),e instanceof Array)for(var o=0;o<e.length;o++)t[e[o]]=!0;else t[e]=!0},e.init()}}("undefined"!=typeof Mousetrap?Mousetrap:void 0)},52796:function(e,t,n){e.exports=n(10643)},13264:function(e){"use strict";var t=!("undefined"==typeof window||!window.document||!window.document.createElement),n={canUseDOM:t,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:t&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:t&&!!window.screen,isInWorker:!t};e.exports=n},84518:function(e){var t,n,r,o,i,a,l,s,c,u,d,p,m,f,h,g=!1;function v(){if(!g){g=!0;var e=navigator.userAgent,v=/(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\d+\.\d+))|(?:Opera(?:.+Version.|.)(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))|(?:Trident\/\d+\.\d+.*rv:(\d+\.\d+))/.exec(e),b=/(Mac OS X)|(Windows)|(Linux)/.exec(e);if(p=/\b(iPhone|iP[ao]d)/.exec(e),m=/\b(iP[ao]d)/.exec(e),u=/Android/i.exec(e),f=/FBAN\/\w+;/i.exec(e),h=/Mobile/i.exec(e),d=!!/Win64/.exec(e),v){(t=v[1]?parseFloat(v[1]):v[5]?parseFloat(v[5]):NaN)&&document&&document.documentMode&&(t=document.documentMode);var y=/(?:Trident\/(\d+.\d+))/.exec(e);a=y?parseFloat(y[1])+4:t,n=v[2]?parseFloat(v[2]):NaN,r=v[3]?parseFloat(v[3]):NaN,(o=v[4]?parseFloat(v[4]):NaN)?(v=/(?:Chrome\/(\d+\.\d+))/.exec(e),i=v&&v[1]?parseFloat(v[1]):NaN):i=NaN}else t=n=r=i=o=NaN;if(b){if(b[1]){var w=/(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(e);l=!w||parseFloat(w[1].replace("_","."))}else l=!1;s=!!b[2],c=!!b[3]}else l=s=c=!1}}var b={ie:function(){return v()||t},ieCompatibilityMode:function(){return v()||a>t},ie64:function(){return b.ie()&&d},firefox:function(){return v()||n},opera:function(){return v()||r},webkit:function(){return v()||o},safari:function(){return b.webkit()},chrome:function(){return v()||i},windows:function(){return v()||s},osx:function(){return v()||l},linux:function(){return v()||c},iphone:function(){return v()||p},mobile:function(){return v()||p||m||u||h},nativeApp:function(){return v()||f},android:function(){return v()||u},ipad:function(){return v()||m}};e.exports=b},96534:function(e,t,n){"use strict";var r,o=n(13264);o.canUseDOM&&(r=document.implementation&&document.implementation.hasFeature&&!0!==document.implementation.hasFeature("","")),e.exports=function(e,t){if(!o.canUseDOM||t&&!("addEventListener"in document))return!1;var n="on"+e,i=n in document;if(!i){var a=document.createElement("div");a.setAttribute(n,"return;"),i="function"==typeof a[n]}return!i&&r&&"wheel"===e&&(i=document.implementation.hasFeature("Events.wheel","3.0")),i}},10643:function(e,t,n){"use strict";var r=n(84518),o=n(96534);function i(e){var t=0,n=0,r=0,o=0;return"detail"in e&&(n=e.detail),"wheelDelta"in e&&(n=-e.wheelDelta/120),"wheelDeltaY"in e&&(n=-e.wheelDeltaY/120),"wheelDeltaX"in e&&(t=-e.wheelDeltaX/120),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(t=n,n=0),r=10*t,o=10*n,"deltaY"in e&&(o=e.deltaY),"deltaX"in e&&(r=e.deltaX),(r||o)&&e.deltaMode&&(1==e.deltaMode?(r*=40,o*=40):(r*=800,o*=800)),r&&!t&&(t=r<1?-1:1),o&&!n&&(n=o<1?-1:1),{spinX:t,spinY:n,pixelX:r,pixelY:o}}i.getEventType=function(){return r.firefox()?"DOMMouseScroll":o("wheel")?"wheel":"mousewheel"},e.exports=i},26470:function(e,t,n){var r=n(34155);function o(e,t){for(var n=0,r=e.length-1;r>=0;r--){var o=e[r];"."===o?e.splice(r,1):".."===o?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n--;n)e.unshift("..");return e}function i(e,t){if(e.filter)return e.filter(t);for(var n=[],r=0;r<e.length;r++)t(e[r],r,e)&&n.push(e[r]);return n}t.resolve=function(){for(var e="",t=!1,n=arguments.length-1;n>=-1&&!t;n--){var a=n>=0?arguments[n]:r.cwd();if("string"!=typeof a)throw new TypeError("Arguments to path.resolve must be strings");a&&(e=a+"/"+e,t="/"===a.charAt(0))}return(t?"/":"")+(e=o(i(e.split("/"),(function(e){return!!e})),!t).join("/"))||"."},t.normalize=function(e){var n=t.isAbsolute(e),r="/"===a(e,-1);return(e=o(i(e.split("/"),(function(e){return!!e})),!n).join("/"))||n||(e="."),e&&r&&(e+="/"),(n?"/":"")+e},t.isAbsolute=function(e){return"/"===e.charAt(0)},t.join=function(){var e=Array.prototype.slice.call(arguments,0);return t.normalize(i(e,(function(e,t){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");return e})).join("/"))},t.relative=function(e,n){function r(e){for(var t=0;t<e.length&&""===e[t];t++);for(var n=e.length-1;n>=0&&""===e[n];n--);return t>n?[]:e.slice(t,n-t+1)}e=t.resolve(e).substr(1),n=t.resolve(n).substr(1);for(var o=r(e.split("/")),i=r(n.split("/")),a=Math.min(o.length,i.length),l=a,s=0;s<a;s++)if(o[s]!==i[s]){l=s;break}var c=[];for(s=l;s<o.length;s++)c.push("..");return(c=c.concat(i.slice(l))).join("/")},t.sep="/",t.delimiter=":",t.dirname=function(e){if("string"!=typeof e&&(e+=""),0===e.length)return".";for(var t=e.charCodeAt(0),n=47===t,r=-1,o=!0,i=e.length-1;i>=1;--i)if(47===(t=e.charCodeAt(i))){if(!o){r=i;break}}else o=!1;return-1===r?n?"/":".":n&&1===r?"/":e.slice(0,r)},t.basename=function(e,t){var n=function(e){"string"!=typeof e&&(e+="");var t,n=0,r=-1,o=!0;for(t=e.length-1;t>=0;--t)if(47===e.charCodeAt(t)){if(!o){n=t+1;break}}else-1===r&&(o=!1,r=t+1);return-1===r?"":e.slice(n,r)}(e);return t&&n.substr(-1*t.length)===t&&(n=n.substr(0,n.length-t.length)),n},t.extname=function(e){"string"!=typeof e&&(e+="");for(var t=-1,n=0,r=-1,o=!0,i=0,a=e.length-1;a>=0;--a){var l=e.charCodeAt(a);if(47!==l)-1===r&&(o=!1,r=a+1),46===l?-1===t?t=a:1!==i&&(i=1):-1!==t&&(i=-1);else if(!o){n=a+1;break}}return-1===t||-1===r||0===i||1===i&&t===r-1&&t===n+1?"":e.slice(t,r)};var a=function(e,t,n){return e.substr(t,n)}},34155:function(e){var t,n,r=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function a(e){if(t===setTimeout)return setTimeout(e,0);if((t===o||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:o}catch(e){t=o}try{n="function"==typeof clearTimeout?clearTimeout:i}catch(e){n=i}}();var l,s=[],c=!1,u=-1;function d(){c&&l&&(c=!1,l.length?s=l.concat(s):u=-1,s.length&&p())}function p(){if(!c){var e=a(d);c=!0;for(var t=s.length;t;){for(l=s,s=[];++u<t;)l&&l[u].run();u=-1,t=s.length}l=null,c=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===i||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function m(e,t){this.fun=e,this.array=t}function f(){}r.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];s.push(new m(e,t)),1!==s.length||c||a(p)},m.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=f,r.addListener=f,r.once=f,r.off=f,r.removeListener=f,r.removeAllListeners=f,r.emit=f,r.prependListener=f,r.prependOnceListener=f,r.listeners=function(e){return[]},r.binding=function(e){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(e){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}},5464:function(e,t,n){var r=n(45993),o={display:"block",opacity:0,position:"absolute",top:0,left:0,height:"100%",width:"100%",overflow:"hidden",pointerEvents:"none",zIndex:-1},i=function(e){var t=e.onResize,n=r.useRef();return function(e,t){var n=function(){return e.current&&e.current.contentDocument&&e.current.contentDocument.defaultView};function o(){t();var e=n();e&&e.addEventListener("resize",t)}r.useEffect((function(){return n()?o():e.current&&e.current.addEventListener&&e.current.addEventListener("load",o),function(){var e=n();e&&"function"==typeof e.removeEventListener&&e.removeEventListener("resize",t)}}),[])}(n,(function(){return t(n)})),r.createElement("iframe",{style:o,src:"about:blank",ref:n,"aria-hidden":!0,tabIndex:-1,frameBorder:0})},a=function(e){return{width:null!=e?e.offsetWidth:null,height:null!=e?e.offsetHeight:null}};e.exports=function(e){void 0===e&&(e=a);var t=r.useState(e(null)),n=t[0],o=t[1],l=r.useCallback((function(t){return o(e(t.current))}),[e]);return[r.useMemo((function(){return r.createElement(i,{onResize:l})}),[l]),n]}},48088:function(e,t,n){"use strict";function r(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var o=r(n(67154)),i=r(n(37316)),a=n(45993),l=r(a),s=r(n(85354)),c=r(n(81506)),u={arr:Array.isArray,obj:function(e){return"[object Object]"===Object.prototype.toString.call(e)},fun:function(e){return"function"==typeof e},str:function(e){return"string"==typeof e},num:function(e){return"number"==typeof e},und:function(e){return void 0===e},nul:function(e){return null===e},set:function(e){return e instanceof Set},map:function(e){return e instanceof Map},equ:function(e,t){if(typeof e!=typeof t)return!1;if(u.str(e)||u.num(e))return e===t;if(u.obj(e)&&u.obj(t)&&Object.keys(e).length+Object.keys(t).length===0)return!0;var n;for(n in e)if(!(n in t))return!1;for(n in t)if(e[n]!==t[n])return!1;return!u.und(n)||e===t}};function d(e,t){return u.und(e)||u.nul(e)?t:e}function p(e){return u.und(e)?[]:u.arr(e)?e:[e]}function m(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return u.fun(e)?e.apply(void 0,n):e}function f(e){var t=function(e){return e.to,e.from,e.config,e.onStart,e.onRest,e.onFrame,e.children,e.reset,e.reverse,e.force,e.immediate,e.delay,e.attach,e.destroyed,e.interpolateTo,e.ref,e.lazy,i(e,["to","from","config","onStart","onRest","onFrame","children","reset","reverse","force","immediate","delay","attach","destroyed","interpolateTo","ref","lazy"])}(e);if(u.und(t))return o({to:t},e);var n=Object.keys(e).reduce((function(n,r){var i;return u.und(t[r])?o({},n,((i={})[r]=e[r],i)):n}),{});return o({to:t},n)}var h,g,v=function(){function e(){this.payload=void 0,this.children=[]}var t=e.prototype;return t.getAnimatedValue=function(){return this.getValue()},t.getPayload=function(){return this.payload||this},t.attach=function(){},t.detach=function(){},t.getChildren=function(){return this.children},t.addChild=function(e){0===this.children.length&&this.attach(),this.children.push(e)},t.removeChild=function(e){var t=this.children.indexOf(e);this.children.splice(t,1),0===this.children.length&&this.detach()},e}(),b=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).payload=[],t.attach=function(){return t.payload.forEach((function(e){return e instanceof v&&e.addChild(c(t))}))},t.detach=function(){return t.payload.forEach((function(e){return e instanceof v&&e.removeChild(c(t))}))},t}return s(t,e),t}(v),y=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).payload={},t.attach=function(){return Object.values(t.payload).forEach((function(e){return e instanceof v&&e.addChild(c(t))}))},t.detach=function(){return Object.values(t.payload).forEach((function(e){return e instanceof v&&e.removeChild(c(t))}))},t}s(t,e);var n=t.prototype;return n.getValue=function(e){void 0===e&&(e=!1);var t={};for(var n in this.payload){var r=this.payload[n];(!e||r instanceof v)&&(t[n]=r instanceof v?r[e?"getAnimatedValue":"getValue"]():r)}return t},n.getAnimatedValue=function(){return this.getValue(!0)},t}(v);function w(e,t){h={fn:e,transform:t}}function k(e){g=e}var E,_=function(e){return"undefined"!=typeof window?window.requestAnimationFrame(e):-1};function C(e){E=e}var x=function(){return Date.now()};function S(e){e}var I,T,N=function(e){return e.current};function A(e){I=e}var R=function(e){function t(t,n){var r;return(r=e.call(this)||this).update=void 0,r.payload=t.style?o({},t,{style:I(t.style)}):t,r.update=n,r.attach(),r}return s(t,e),t}(y),L=!1,P=new Set,O=function e(){if(!L)return!1;var t=x(),n=P,r=Array.isArray(n),o=0;for(n=r?n:n[Symbol.iterator]();;){var i;if(r){if(o>=n.length)break;i=n[o++]}else{if((o=n.next()).done)break;i=o.value}for(var a=i,l=!1,s=0;s<a.configs.length;s++){for(var c=a.configs[s],u=void 0,d=void 0,p=0;p<c.animatedValues.length;p++){var m=c.animatedValues[p];if(!m.done){var f=c.fromValues[p],h=c.toValues[p],g=m.lastPosition,b=h instanceof v,y=Array.isArray(c.initialVelocity)?c.initialVelocity[p]:c.initialVelocity;if(b&&(h=h.getValue()),c.immediate)m.setValue(h),m.done=!0;else if("string"!=typeof f&&"string"!=typeof h){if(void 0!==c.duration)g=f+c.easing((t-m.startTime)/c.duration)*(h-f),u=t>=m.startTime+c.duration;else if(c.decay)g=f+y/(1-.998)*(1-Math.exp(-(1-.998)*(t-m.startTime))),(u=Math.abs(m.lastPosition-g)<.1)&&(h=g);else{d=void 0!==m.lastTime?m.lastTime:t,y=void 0!==m.lastVelocity?m.lastVelocity:c.initialVelocity,t>d+64&&(d=t);for(var w=Math.floor(t-d),k=0;k<w;++k)g+=1*(y+=(-c.tension*(g-h)+-c.friction*y)/c.mass*1/1e3)/1e3;var E=!(!c.clamp||0===c.tension)&&(f<h?g>h:g<h),C=Math.abs(y)<=c.precision,S=0===c.tension||Math.abs(h-g)<=c.precision;u=E||C&&S,m.lastVelocity=y,m.lastTime=t}b&&!c.toValues[p].done&&(u=!1),u?(m.value!==h&&(g=h),m.done=!0):l=!0,m.setValue(g),m.lastPosition=g}else m.setValue(h),m.done=!0}}a.props.onFrame&&(a.values[c.name]=c.interpolation.getValue())}a.props.onFrame&&a.props.onFrame(a.values),l||(P.delete(a),a.stop(!0))}return P.size?T?T():_(e):L=!1,L};function D(e,t,n){if("function"==typeof e)return e;if(Array.isArray(e))return D({range:e,output:t,extrapolate:n});if(E&&"string"==typeof e.output[0])return E(e);var r=e,o=r.output,i=r.range||[0,1],a=r.extrapolateLeft||r.extrapolate||"extend",l=r.extrapolateRight||r.extrapolate||"extend",s=r.easing||function(e){return e};return function(e){var t=function(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}(e,i);return function(e,t,n,r,o,i,a,l,s){var c=s?s(e):e;if(c<t){if("identity"===a)return c;"clamp"===a&&(c=t)}if(c>n){if("identity"===l)return c;"clamp"===l&&(c=n)}return r===o?r:t===n?e<=t?r:o:(t===-1/0?c=-c:n===1/0?c-=t:c=(c-t)/(n-t),c=i(c),r===-1/0?c=-c:o===1/0?c+=r:c=c*(o-r)+r,c)}(e,i[t],i[t+1],o[t],o[t+1],s,a,l,r.map)}}var M=function(e){function t(n,r,o,i){var a;return(a=e.call(this)||this).calc=void 0,a.payload=n instanceof b&&!(n instanceof t)?n.getPayload():Array.isArray(n)?n:[n],a.calc=D(r,o,i),a}s(t,e);var n=t.prototype;return n.getValue=function(){return this.calc.apply(this,this.payload.map((function(e){return e.getValue()})))},n.updateConfig=function(e,t,n){this.calc=D(e,t,n)},n.interpolate=function(e,n,r){return new t(this,e,n,r)},t}(b);function B(e,t){"update"in e?t.add(e):e.getChildren().forEach((function(e){return B(e,t)}))}var F=function(e){function t(t){var n;return(n=e.call(this)||this).animatedStyles=new Set,n.value=void 0,n.startPosition=void 0,n.lastPosition=void 0,n.lastVelocity=void 0,n.startTime=void 0,n.lastTime=void 0,n.done=!1,n.setValue=function(e,t){void 0===t&&(t=!0),n.value=e,t&&n.flush()},n.value=t,n.startPosition=t,n.lastPosition=t,n}s(t,e);var n=t.prototype;return n.flush=function(){0===this.animatedStyles.size&&B(this,this.animatedStyles),this.animatedStyles.forEach((function(e){return e.update()}))},n.clearStyles=function(){this.animatedStyles.clear()},n.getValue=function(){return this.value},n.interpolate=function(e,t,n){return new M(this,e,t,n)},t}(v),z=function(e){function t(t){var n;return(n=e.call(this)||this).payload=t.map((function(e){return new F(e)})),n}s(t,e);var n=t.prototype;return n.setValue=function(e,t){var n=this;void 0===t&&(t=!0),Array.isArray(e)?e.length===this.payload.length&&e.forEach((function(e,r){return n.payload[r].setValue(e,t)})):this.payload.forEach((function(n){return n.setValue(e,t)}))},n.getValue=function(){return this.payload.map((function(e){return e.getValue()}))},n.interpolate=function(e,t){return new M(this,e,t)},t}(b),H=0,V=function(){function e(){var e=this;this.id=void 0,this.idle=!0,this.hasChanged=!1,this.guid=0,this.local=0,this.props={},this.merged={},this.animations={},this.interpolations={},this.values={},this.configs=[],this.listeners=[],this.queue=[],this.localQueue=void 0,this.getValues=function(){return e.interpolations},this.id=H++}var t=e.prototype;return t.update=function(e){if(!e)return this;var t=f(e),n=t.delay,r=void 0===n?0:n,a=t.to,l=i(t,["delay","to"]);if(u.arr(a)||u.fun(a))this.queue.push(o({},l,{delay:r,to:a}));else if(a){var s={};Object.entries(a).forEach((function(e){var t,n=e[0],i=e[1],a=o({to:(t={},t[n]=i,t),delay:m(r,n)},l),c=s[a.delay]&&s[a.delay].to;s[a.delay]=o({},s[a.delay],a,{to:o({},c,a.to)})})),this.queue=Object.values(s)}return this.queue=this.queue.sort((function(e,t){return e.delay-t.delay})),this.diff(l),this},t.start=function(e){var t=this;if(this.queue.length){this.idle=!1,this.localQueue&&this.localQueue.forEach((function(e){var n=e.from,r=void 0===n?{}:n,i=e.to,a=void 0===i?{}:i;u.obj(r)&&(t.merged=o({},r,t.merged)),u.obj(a)&&(t.merged=o({},t.merged,a))}));var n=this.local=++this.guid,r=this.localQueue=this.queue;this.queue=[],r.forEach((function(o,a){var l=o.delay,s=i(o,["delay"]),c=function(o){a===r.length-1&&n===t.guid&&o&&(t.idle=!0,t.props.onRest&&t.props.onRest(t.merged)),e&&e()},d=u.arr(s.to)||u.fun(s.to);l?setTimeout((function(){n===t.guid&&(d?t.runAsync(s,c):t.diff(s).start(c))}),l):d?t.runAsync(s,c):t.diff(s).start(c)}))}else u.fun(e)&&this.listeners.push(e),this.props.onStart&&this.props.onStart(),this,P.has(this)||P.add(this),L||(L=!0,_(T||O));return this},t.stop=function(e){return this.listeners.forEach((function(t){return t(e)})),this.listeners=[],this},t.pause=function(e){return this.stop(!0),e&&(this,P.has(this)&&P.delete(this)),this},t.runAsync=function(e,t){var n=this,r=(e.delay,i(e,["delay"])),a=this.local,l=Promise.resolve(void 0);if(u.arr(r.to))for(var s=function(e){var t=e,i=o({},r,f(r.to[t]));u.arr(i.config)&&(i.config=i.config[t]),l=l.then((function(){if(a===n.guid)return new Promise((function(e){return n.diff(i).start(e)}))}))},c=0;c<r.to.length;c++)s(c);else if(u.fun(r.to)){var d,p=0;l=l.then((function(){return r.to((function(e){var t=o({},r,f(e));if(u.arr(t.config)&&(t.config=t.config[p]),p++,a===n.guid)return d=new Promise((function(e){return n.diff(t).start(e)}))}),(function(e){return void 0===e&&(e=!0),n.stop(e)})).then((function(){return d}))}))}l.then(t)},t.diff=function(e){var t=this;this.props=o({},this.props,e);var n=this.props,r=n.from,i=void 0===r?{}:r,a=n.to,l=void 0===a?{}:a,s=n.config,c=void 0===s?{}:s,f=n.reverse,h=n.attach,v=n.reset,b=n.immediate;if(f){var y=[l,i];i=y[0],l=y[1]}this.merged=o({},i,this.merged,l),this.hasChanged=!1;var w=h&&h(this);if(this.animations=Object.entries(this.merged).reduce((function(e,n){var r=n[0],a=n[1],l=e[r]||{},s=u.num(a),f=u.str(a)&&!a.startsWith("#")&&!/\d/.test(a)&&!g[a],h=u.arr(a),y=!s&&!h&&!f,k=u.und(i[r])?a:i[r],_=s||h||f?a:1,C=m(c,r);w&&(_=w.animations[r].parent);var S,I=l.parent,T=l.interpolation,N=p(w?_.getPayload():_),A=a;y&&(A=E({range:[0,1],output:[a,a]})(1));var R,L=T&&T.getValue(),P=!u.und(I)&&l.animatedValues.some((function(e){return!e.done})),O=!u.equ(A,L),D=!u.equ(A,l.previous),M=!u.equ(C,l.config);if(v||D&&O||M){var B;if(s||f)I=T=l.parent||new F(k);else if(h)I=T=l.parent||new z(k);else if(y){var H=l.interpolation&&l.interpolation.calc(l.parent.value);H=void 0===H||v?k:H,l.parent?(I=l.parent).setValue(0,!1):I=new F(0);var V={output:[H,a]};l.interpolation?(T=l.interpolation,l.interpolation.updateConfig(V)):T=I.interpolate(V)}return N=p(w?_.getPayload():_),S=p(I.getPayload()),v&&!y&&I.setValue(k,!1),t.hasChanged=!0,S.forEach((function(e){e.startPosition=e.value,e.lastPosition=e.value,e.lastVelocity=P?e.lastVelocity:void 0,e.lastTime=P?e.lastTime:void 0,e.startTime=x(),e.done=!1,e.animatedStyles.clear()})),m(b,r)&&I.setValue(y?_:a,!1),o({},e,((B={})[r]=o({},l,{name:r,parent:I,interpolation:T,animatedValues:S,toValues:N,previous:A,config:C,fromValues:p(I.getValue()),immediate:m(b,r),initialVelocity:d(C.velocity,0),clamp:d(C.clamp,!1),precision:d(C.precision,.01),tension:d(C.tension,170),friction:d(C.friction,26),mass:d(C.mass,1),duration:C.duration,easing:d(C.easing,(function(e){return e})),decay:C.decay}),B))}return O?e:(y&&(I.setValue(1,!1),T.updateConfig({output:[A,A]})),I.done=!0,t.hasChanged=!0,o({},e,((R={})[r]=o({},e[r],{previous:A}),R)))}),this.animations),this.hasChanged)for(var k in this.configs=Object.values(this.animations),this.values={},this.interpolations={},this.animations)this.interpolations[k]=this.animations[k].interpolation,this.values[k]=this.animations[k].interpolation.getValue();return this},t.destroy=function(){this.stop(),this.props={},this.merged={},this.animations={},this.interpolations={},this.values={},this.configs=[],this.local=0},e}();var W=function(e){function t(t){var n;return void 0===t&&(t={}),n=e.call(this)||this,!t.transform||t.transform instanceof v||(t=h.transform(t)),n.payload=t,n}return s(t,e),t}(y),Z={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},j="[-+]?\\d*\\.?\\d+",U=j+"%";function $(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return"\\(\\s*("+t.join(")\\s*,\\s*(")+")\\s*\\)"}var q=new RegExp("rgb"+$(j,j,j)),G=new RegExp("rgba"+$(j,j,j,j)),K=new RegExp("hsl"+$(j,U,U)),Y=new RegExp("hsla"+$(j,U,U,j)),X=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,J=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,Q=/^#([0-9a-fA-F]{6})$/,ee=/^#([0-9a-fA-F]{8})$/;function te(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}function ne(e,t,n){var r=n<.5?n*(1+t):n+t-n*t,o=2*n-r,i=te(o,r,e+1/3),a=te(o,r,e),l=te(o,r,e-1/3);return Math.round(255*i)<<24|Math.round(255*a)<<16|Math.round(255*l)<<8}function re(e){var t=parseInt(e,10);return t<0?0:t>255?255:t}function oe(e){return(parseFloat(e)%360+360)%360/360}function ie(e){var t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function ae(e){var t=parseFloat(e);return t<0?0:t>100?1:t/100}function le(e){var t,n,r="number"==typeof(t=e)?t>>>0===t&&t>=0&&t<=4294967295?t:null:(n=Q.exec(t))?parseInt(n[1]+"ff",16)>>>0:Z.hasOwnProperty(t)?Z[t]:(n=q.exec(t))?(re(n[1])<<24|re(n[2])<<16|re(n[3])<<8|255)>>>0:(n=G.exec(t))?(re(n[1])<<24|re(n[2])<<16|re(n[3])<<8|ie(n[4]))>>>0:(n=X.exec(t))?parseInt(n[1]+n[1]+n[2]+n[2]+n[3]+n[3]+"ff",16)>>>0:(n=ee.exec(t))?parseInt(n[1],16)>>>0:(n=J.exec(t))?parseInt(n[1]+n[1]+n[2]+n[2]+n[3]+n[3]+n[4]+n[4],16)>>>0:(n=K.exec(t))?(255|ne(oe(n[1]),ae(n[2]),ae(n[3])))>>>0:(n=Y.exec(t))?(ne(oe(n[1]),ae(n[2]),ae(n[3]))|ie(n[4]))>>>0:null;return null===r?e:"rgba("+((4278190080&(r=r||0))>>>24)+", "+((16711680&r)>>>16)+", "+((65280&r)>>>8)+", "+(255&r)/255+")"}var se=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,ce=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,ue=new RegExp("("+Object.keys(Z).join("|")+")","g"),de={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},pe=["Webkit","Ms","Moz","O"];function me(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||de.hasOwnProperty(e)&&de[e]?(""+t).trim():t+"px"}de=Object.keys(de).reduce((function(e,t){return pe.forEach((function(n){return e[function(e,t){return e+t.charAt(0).toUpperCase()+t.substring(1)}(n,t)]=e[t]})),e}),de);var fe={};A((function(e){return new W(e)})),S("div"),C((function(e){var t=e.output.map((function(e){return e.replace(ce,le)})).map((function(e){return e.replace(ue,le)})),n=t[0].match(se).map((function(){return[]}));t.forEach((function(e){e.match(se).forEach((function(e,t){return n[t].push(+e)}))}));var r=t[0].match(se).map((function(t,r){return D(o({},e,{output:n[r]}))}));return function(e){var n=0;return t[0].replace(se,(function(){return r[n++](e)})).replace(/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,(function(e,t,n,r,o){return"rgba("+Math.round(t)+", "+Math.round(n)+", "+Math.round(r)+", "+o+")"}))}})),k(Z),w((function(e,t){if(!e.nodeType||void 0===e.setAttribute)return!1;var n=t.style,r=t.children,o=t.scrollTop,a=t.scrollLeft,l=i(t,["style","children","scrollTop","scrollLeft"]),s="filter"===e.nodeName||e.parentNode&&"filter"===e.parentNode.nodeName;for(var c in void 0!==o&&(e.scrollTop=o),void 0!==a&&(e.scrollLeft=a),void 0!==r&&(e.textContent=r),n)if(n.hasOwnProperty(c)){var u=0===c.indexOf("--"),d=me(c,n[c],u);"float"===c&&(c="cssFloat"),u?e.style.setProperty(c,d):e.style[c]=d}for(var p in l){var m=s?p:fe[p]||(fe[p]=p.replace(/([A-Z])/g,(function(e){return"-"+e.toLowerCase()})));void 0!==e.getAttribute(m)&&e.setAttribute(m,l[p])}}),(function(e){return e}));var he,ge;(he=function(e){return a.forwardRef((function(t,n){var r,s=(r=a.useState(!1)[1],a.useCallback((function(){return r((function(e){return!e}))}),[])),c=a.useRef(!0),d=a.useRef(null),p=a.useRef(null),m=a.useCallback((function(e){var t=d.current;d.current=new R(e,(function(){var e=!1;p.current&&(e=h.fn(p.current,d.current.getAnimatedValue())),p.current&&!1!==e||s()})),t&&t.detach()}),[]);a.useEffect((function(){return function(){c.current=!1,d.current&&d.current.detach()}}),[]),a.useImperativeHandle(n,(function(){return N(p,c,s)})),m(t);var f,g=d.current.getValue(),v=(g.scrollTop,g.scrollLeft,i(g,["scrollTop","scrollLeft"])),b=(f=e,!u.fun(f)||f.prototype instanceof l.Component?function(e){return p.current=function(e,t){return t&&(u.fun(t)?t(e):u.obj(t)&&(t.current=e)),e}(e,n)}:void 0);return l.createElement(e,o({},v,{ref:b}))}))},void 0===(ge=!1)&&(ge=!0),function(e){return(u.arr(e)?e:Object.keys(e)).reduce((function(e,t){var n=ge?t[0].toLowerCase()+t.substring(1):t;return e[n]=he(n),e}),he)})(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]);t.q_=function(e){var t=u.fun(e),n=function(e,t){var n=a.useRef(!1),r=a.useRef(),o=u.fun(t),i=a.useMemo((function(){var n;return r.current&&(r.current.map((function(e){return e.destroy()})),r.current=void 0),[new Array(e).fill().map((function(e,r){var i=new V,a=o?m(t,r,i):t[r];return 0===r&&(n=a.ref),i.update(a),n||i.start(),i})),n]}),[e]),l=i[0],s=i[1];r.current=l,a.useImperativeHandle(s,(function(){return{start:function(){return Promise.all(r.current.map((function(e){return new Promise((function(t){return e.start(t)}))})))},stop:function(e){return r.current.forEach((function(t){return t.stop(e)}))},get controllers(){return r.current}}}));var c=a.useMemo((function(){return function(e){return r.current.map((function(t,n){t.update(o?m(e,n,t):e[n]),s||t.start()}))}}),[e]);a.useEffect((function(){n.current?o||c(t):s||r.current.forEach((function(e){return e.start()}))})),a.useEffect((function(){return n.current=!0,function(){return r.current.forEach((function(e){return e.destroy()}))}}),[]);var d=r.current.map((function(e){return e.getValues()}));return o?[d,c,function(e){return r.current.forEach((function(t){return t.pause(e)}))}]:d}(1,t?e:[e]),r=n[0],o=n[1],i=n[2];return t?[r[0],o,i]:r}},53787:function(e,t,n){var r;(function(){function o(e){"use strict";var t={omitExtraWLInCodeBlocks:{defaultValue:!1,describe:"Omit the default extra whiteline added to code blocks",type:"boolean"},noHeaderId:{defaultValue:!1,describe:"Turn on/off generated header id",type:"boolean"},prefixHeaderId:{defaultValue:!1,describe:"Add a prefix to the generated header ids. Passing a string will prefix that string to the header id. Setting to true will add a generic 'section-' prefix",type:"string"},rawPrefixHeaderId:{defaultValue:!1,describe:'Setting this option to true will prevent showdown from modifying the prefix. This might result in malformed IDs (if, for instance, the " char is used in the prefix)',type:"boolean"},ghCompatibleHeaderId:{defaultValue:!1,describe:"Generate header ids compatible with github style (spaces are replaced with dashes, a bunch of non alphanumeric chars are removed)",type:"boolean"},rawHeaderId:{defaultValue:!1,describe:"Remove only spaces, ' and \" from generated header ids (including prefixes), replacing them with dashes (-). WARNING: This might result in malformed ids",type:"boolean"},headerLevelStart:{defaultValue:!1,describe:"The header blocks level start",type:"integer"},parseImgDimensions:{defaultValue:!1,describe:"Turn on/off image dimension parsing",type:"boolean"},simplifiedAutoLink:{defaultValue:!1,describe:"Turn on/off GFM autolink style",type:"boolean"},excludeTrailingPunctuationFromURLs:{defaultValue:!1,describe:"Excludes trailing punctuation from links generated with autoLinking",type:"boolean"},literalMidWordUnderscores:{defaultValue:!1,describe:"Parse midword underscores as literal underscores",type:"boolean"},literalMidWordAsterisks:{defaultValue:!1,describe:"Parse midword asterisks as literal asterisks",type:"boolean"},strikethrough:{defaultValue:!1,describe:"Turn on/off strikethrough support",type:"boolean"},tables:{defaultValue:!1,describe:"Turn on/off tables support",type:"boolean"},tablesHeaderId:{defaultValue:!1,describe:"Add an id to table headers",type:"boolean"},ghCodeBlocks:{defaultValue:!0,describe:"Turn on/off GFM fenced code blocks support",type:"boolean"},tasklists:{defaultValue:!1,describe:"Turn on/off GFM tasklist support",type:"boolean"},smoothLivePreview:{defaultValue:!1,describe:"Prevents weird effects in live previews due to incomplete input",type:"boolean"},smartIndentationFix:{defaultValue:!1,description:"Tries to smartly fix indentation in es6 strings",type:"boolean"},disableForced4SpacesIndentedSublists:{defaultValue:!1,description:"Disables the requirement of indenting nested sublists by 4 spaces",type:"boolean"},simpleLineBreaks:{defaultValue:!1,description:"Parses simple line breaks as <br> (GFM Style)",type:"boolean"},requireSpaceBeforeHeadingText:{defaultValue:!1,description:"Makes adding a space between `#` and the header text mandatory (GFM Style)",type:"boolean"},ghMentions:{defaultValue:!1,description:"Enables github @mentions",type:"boolean"},ghMentionsLink:{defaultValue:"https://github.com/{u}",description:"Changes the link generated by @mentions. Only applies if ghMentions option is enabled.",type:"string"},encodeEmails:{defaultValue:!0,description:"Encode e-mail addresses through the use of Character Entities, transforming ASCII e-mail addresses into its equivalent decimal entities",type:"boolean"},openLinksInNewWindow:{defaultValue:!1,description:"Open all links in new windows",type:"boolean"},backslashEscapesHTMLTags:{defaultValue:!1,description:"Support for HTML Tag escaping. ex: <div>foo</div>",type:"boolean"},emoji:{defaultValue:!1,description:"Enable emoji support. Ex: `this is a :smile: emoji`",type:"boolean"},underline:{defaultValue:!1,description:"Enable support for underline. Syntax is double or triple underscores: `__underline word__`. With this option enabled, underscores no longer parses into `<em>` and `<strong>`",type:"boolean"},completeHTMLDocument:{defaultValue:!1,description:"Outputs a complete html document, including `<html>`, `<head>` and `<body>` tags",type:"boolean"},metadata:{defaultValue:!1,description:"Enable support for document metadata (defined at the top of the document between `«««` and `»»»` or between `---` and `---`).",type:"boolean"},splitAdjacentBlockquotes:{defaultValue:!1,description:"Split adjacent blockquote blocks",type:"boolean"}};if(!1===e)return JSON.parse(JSON.stringify(t));var n={};for(var r in t)t.hasOwnProperty(r)&&(n[r]=t[r].defaultValue);return n}var i={},a={},l={},s=o(!0),c="vanilla",u={github:{omitExtraWLInCodeBlocks:!0,simplifiedAutoLink:!0,excludeTrailingPunctuationFromURLs:!0,literalMidWordUnderscores:!0,strikethrough:!0,tables:!0,tablesHeaderId:!0,ghCodeBlocks:!0,tasklists:!0,disableForced4SpacesIndentedSublists:!0,simpleLineBreaks:!0,requireSpaceBeforeHeadingText:!0,ghCompatibleHeaderId:!0,ghMentions:!0,backslashEscapesHTMLTags:!0,emoji:!0,splitAdjacentBlockquotes:!0},original:{noHeaderId:!0,ghCodeBlocks:!1},ghost:{omitExtraWLInCodeBlocks:!0,parseImgDimensions:!0,simplifiedAutoLink:!0,excludeTrailingPunctuationFromURLs:!0,literalMidWordUnderscores:!0,strikethrough:!0,tables:!0,tablesHeaderId:!0,ghCodeBlocks:!0,tasklists:!0,smoothLivePreview:!0,simpleLineBreaks:!0,requireSpaceBeforeHeadingText:!0,ghMentions:!1,encodeEmails:!0},vanilla:o(!0),allOn:function(){"use strict";var e=o(!0),t={};for(var n in e)e.hasOwnProperty(n)&&(t[n]=!0);return t}()};function d(e,t){"use strict";var n=t?"Error in "+t+" extension->":"Error in unnamed extension",r={valid:!0,error:""};i.helper.isArray(e)||(e=[e]);for(var o=0;o<e.length;++o){var a=n+" sub-extension "+o+": ",l=e[o];if("object"!=typeof l)return r.valid=!1,r.error=a+"must be an object, but "+typeof l+" given",r;if(!i.helper.isString(l.type))return r.valid=!1,r.error=a+'property "type" must be a string, but '+typeof l.type+" given",r;var s=l.type=l.type.toLowerCase();if("language"===s&&(s=l.type="lang"),"html"===s&&(s=l.type="output"),"lang"!==s&&"output"!==s&&"listener"!==s)return r.valid=!1,r.error=a+"type "+s+' is not recognized. Valid values: "lang/language", "output/html" or "listener"',r;if("listener"===s){if(i.helper.isUndefined(l.listeners))return r.valid=!1,r.error=a+'. Extensions of type "listener" must have a property called "listeners"',r}else if(i.helper.isUndefined(l.filter)&&i.helper.isUndefined(l.regex))return r.valid=!1,r.error=a+s+' extensions must define either a "regex" property or a "filter" method',r;if(l.listeners){if("object"!=typeof l.listeners)return r.valid=!1,r.error=a+'"listeners" property must be an object but '+typeof l.listeners+" given",r;for(var c in l.listeners)if(l.listeners.hasOwnProperty(c)&&"function"!=typeof l.listeners[c])return r.valid=!1,r.error=a+'"listeners" property must be an hash of [event name]: [callback]. listeners.'+c+" must be a function but "+typeof l.listeners[c]+" given",r}if(l.filter){if("function"!=typeof l.filter)return r.valid=!1,r.error=a+'"filter" must be a function, but '+typeof l.filter+" given",r}else if(l.regex){if(i.helper.isString(l.regex)&&(l.regex=new RegExp(l.regex,"g")),!(l.regex instanceof RegExp))return r.valid=!1,r.error=a+'"regex" property must either be a string or a RegExp object, but '+typeof l.regex+" given",r;if(i.helper.isUndefined(l.replace))return r.valid=!1,r.error=a+'"regex" extensions must implement a replace string or function',r}}return r}function p(e,t){"use strict";return"¨E"+t.charCodeAt(0)+"E"}i.helper={},i.extensions={},i.setOption=function(e,t){"use strict";return s[e]=t,this},i.getOption=function(e){"use strict";return s[e]},i.getOptions=function(){"use strict";return s},i.resetOptions=function(){"use strict";s=o(!0)},i.setFlavor=function(e){"use strict";if(!u.hasOwnProperty(e))throw Error(e+" flavor was not found");i.resetOptions();var t=u[e];for(var n in c=e,t)t.hasOwnProperty(n)&&(s[n]=t[n])},i.getFlavor=function(){"use strict";return c},i.getFlavorOptions=function(e){"use strict";if(u.hasOwnProperty(e))return u[e]},i.getDefaultOptions=function(e){"use strict";return o(e)},i.subParser=function(e,t){"use strict";if(i.helper.isString(e)){if(void 0===t){if(a.hasOwnProperty(e))return a[e];throw Error("SubParser named "+e+" not registered!")}a[e]=t}},i.extension=function(e,t){"use strict";if(!i.helper.isString(e))throw Error("Extension 'name' must be a string");if(e=i.helper.stdExtName(e),i.helper.isUndefined(t)){if(!l.hasOwnProperty(e))throw Error("Extension named "+e+" is not registered!");return l[e]}"function"==typeof t&&(t=t()),i.helper.isArray(t)||(t=[t]);var n=d(t,e);if(!n.valid)throw Error(n.error);l[e]=t},i.getAllExtensions=function(){"use strict";return l},i.removeExtension=function(e){"use strict";delete l[e]},i.resetExtensions=function(){"use strict";l={}},i.validateExtension=function(e){"use strict";var t=d(e,null);return!!t.valid||(console.warn(t.error),!1)},i.hasOwnProperty("helper")||(i.helper={}),i.helper.isString=function(e){"use strict";return"string"==typeof e||e instanceof String},i.helper.isFunction=function(e){"use strict";return e&&"[object Function]"==={}.toString.call(e)},i.helper.isArray=function(e){"use strict";return Array.isArray(e)},i.helper.isUndefined=function(e){"use strict";return void 0===e},i.helper.forEach=function(e,t){"use strict";if(i.helper.isUndefined(e))throw new Error("obj param is required");if(i.helper.isUndefined(t))throw new Error("callback param is required");if(!i.helper.isFunction(t))throw new Error("callback param must be a function/closure");if("function"==typeof e.forEach)e.forEach(t);else if(i.helper.isArray(e))for(var n=0;n<e.length;n++)t(e[n],n,e);else{if("object"!=typeof e)throw new Error("obj does not seem to be an array or an iterable object");for(var r in e)e.hasOwnProperty(r)&&t(e[r],r,e)}},i.helper.stdExtName=function(e){"use strict";return e.replace(/[_?*+\/\\.^-]/g,"").replace(/\s/g,"").toLowerCase()},i.helper.escapeCharactersCallback=p,i.helper.escapeCharacters=function(e,t,n){"use strict";var r="(["+t.replace(/([\[\]\\])/g,"\\$1")+"])";n&&(r="\\\\"+r);var o=new RegExp(r,"g");return e.replace(o,p)},i.helper.unescapeHTMLEntities=function(e){"use strict";return e.replace(/"/g,'"').replace(/</g,"<").replace(/>/g,">").replace(/&/g,"&")};var m=function(e,t,n,r){"use strict";var o,i,a,l,s,c=r||"",u=c.indexOf("g")>-1,d=new RegExp(t+"|"+n,"g"+c.replace(/g/g,"")),p=new RegExp(t,c.replace(/g/g,"")),m=[];do{for(o=0;a=d.exec(e);)if(p.test(a[0]))o++||(l=(i=d.lastIndex)-a[0].length);else if(o&&!--o){s=a.index+a[0].length;var f={left:{start:l,end:i},match:{start:i,end:a.index},right:{start:a.index,end:s},wholeMatch:{start:l,end:s}};if(m.push(f),!u)return m}}while(o&&(d.lastIndex=i));return m};i.helper.matchRecursiveRegExp=function(e,t,n,r){"use strict";for(var o=m(e,t,n,r),i=[],a=0;a<o.length;++a)i.push([e.slice(o[a].wholeMatch.start,o[a].wholeMatch.end),e.slice(o[a].match.start,o[a].match.end),e.slice(o[a].left.start,o[a].left.end),e.slice(o[a].right.start,o[a].right.end)]);return i},i.helper.replaceRecursiveRegExp=function(e,t,n,r,o){"use strict";if(!i.helper.isFunction(t)){var a=t;t=function(){return a}}var l=m(e,n,r,o),s=e,c=l.length;if(c>0){var u=[];0!==l[0].wholeMatch.start&&u.push(e.slice(0,l[0].wholeMatch.start));for(var d=0;d<c;++d)u.push(t(e.slice(l[d].wholeMatch.start,l[d].wholeMatch.end),e.slice(l[d].match.start,l[d].match.end),e.slice(l[d].left.start,l[d].left.end),e.slice(l[d].right.start,l[d].right.end))),d<c-1&&u.push(e.slice(l[d].wholeMatch.end,l[d+1].wholeMatch.start));l[c-1].wholeMatch.end<e.length&&u.push(e.slice(l[c-1].wholeMatch.end)),s=u.join("")}return s},i.helper.regexIndexOf=function(e,t,n){"use strict";if(!i.helper.isString(e))throw"InvalidArgumentError: first parameter of showdown.helper.regexIndexOf function must be a string";if(t instanceof RegExp==0)throw"InvalidArgumentError: second parameter of showdown.helper.regexIndexOf function must be an instance of RegExp";var r=e.substring(n||0).search(t);return r>=0?r+(n||0):r},i.helper.splitAtIndex=function(e,t){"use strict";if(!i.helper.isString(e))throw"InvalidArgumentError: first parameter of showdown.helper.regexIndexOf function must be a string";return[e.substring(0,t),e.substring(t)]},i.helper.encodeEmailAddress=function(e){"use strict";var t=[function(e){return"&#"+e.charCodeAt(0)+";"},function(e){return"&#x"+e.charCodeAt(0).toString(16)+";"},function(e){return e}];return e.replace(/./g,(function(e){if("@"===e)e=t[Math.floor(2*Math.random())](e);else{var n=Math.random();e=n>.9?t[2](e):n>.45?t[1](e):t[0](e)}return e}))},i.helper.padEnd=function(e,t,n){"use strict";return t>>=0,n=String(n||" "),e.length>t?String(e):((t-=e.length)>n.length&&(n+=n.repeat(t/n.length)),String(e)+n.slice(0,t))},"undefined"==typeof console&&(console={warn:function(e){"use strict";alert(e)},log:function(e){"use strict";alert(e)},error:function(e){"use strict";throw e}}),i.helper.regexes={asteriskDashAndColon:/([*_:~])/g},i.helper.emojis={"+1":"👍","-1":"👎",100:"💯",1234:"🔢","1st_place_medal":"🥇","2nd_place_medal":"🥈","3rd_place_medal":"🥉","8ball":"🎱",a:"🅰️",ab:"🆎",abc:"🔤",abcd:"🔡",accept:"🉑",aerial_tramway:"🚡",airplane:"✈️",alarm_clock:"⏰",alembic:"⚗️",alien:"👽",ambulance:"🚑",amphora:"🏺",anchor:"⚓️",angel:"👼",anger:"💢",angry:"😠",anguished:"😧",ant:"🐜",apple:"🍎",aquarius:"♒️",aries:"♈️",arrow_backward:"◀️",arrow_double_down:"⏬",arrow_double_up:"⏫",arrow_down:"⬇️",arrow_down_small:"🔽",arrow_forward:"▶️",arrow_heading_down:"⤵️",arrow_heading_up:"⤴️",arrow_left:"⬅️",arrow_lower_left:"↙️",arrow_lower_right:"↘️",arrow_right:"➡️",arrow_right_hook:"↪️",arrow_up:"⬆️",arrow_up_down:"↕️",arrow_up_small:"🔼",arrow_upper_left:"↖️",arrow_upper_right:"↗️",arrows_clockwise:"🔃",arrows_counterclockwise:"🔄",art:"🎨",articulated_lorry:"🚛",artificial_satellite:"🛰",astonished:"😲",athletic_shoe:"👟",atm:"🏧",atom_symbol:"⚛️",avocado:"🥑",b:"🅱️",baby:"👶",baby_bottle:"🍼",baby_chick:"🐤",baby_symbol:"🚼",back:"🔙",bacon:"🥓",badminton:"🏸",baggage_claim:"🛄",baguette_bread:"🥖",balance_scale:"⚖️",balloon:"🎈",ballot_box:"🗳",ballot_box_with_check:"☑️",bamboo:"🎍",banana:"🍌",bangbang:"‼️",bank:"🏦",bar_chart:"📊",barber:"💈",baseball:"⚾️",basketball:"🏀",basketball_man:"⛹️",basketball_woman:"⛹️‍♀️",bat:"🦇",bath:"🛀",bathtub:"🛁",battery:"🔋",beach_umbrella:"🏖",bear:"🐻",bed:"🛏",bee:"🐝",beer:"🍺",beers:"🍻",beetle:"🐞",beginner:"🔰",bell:"🔔",bellhop_bell:"🛎",bento:"🍱",biking_man:"🚴",bike:"🚲",biking_woman:"🚴‍♀️",bikini:"👙",biohazard:"☣️",bird:"🐦",birthday:"🎂",black_circle:"⚫️",black_flag:"🏴",black_heart:"🖤",black_joker:"🃏",black_large_square:"⬛️",black_medium_small_square:"◾️",black_medium_square:"◼️",black_nib:"✒️",black_small_square:"▪️",black_square_button:"🔲",blonde_man:"👱",blonde_woman:"👱‍♀️",blossom:"🌼",blowfish:"🐡",blue_book:"📘",blue_car:"🚙",blue_heart:"💙",blush:"😊",boar:"🐗",boat:"⛵️",bomb:"💣",book:"📖",bookmark:"🔖",bookmark_tabs:"📑",books:"📚",boom:"💥",boot:"👢",bouquet:"💐",bowing_man:"🙇",bow_and_arrow:"🏹",bowing_woman:"🙇‍♀️",bowling:"🎳",boxing_glove:"🥊",boy:"👦",bread:"🍞",bride_with_veil:"👰",bridge_at_night:"🌉",briefcase:"💼",broken_heart:"💔",bug:"🐛",building_construction:"🏗",bulb:"💡",bullettrain_front:"🚅",bullettrain_side:"🚄",burrito:"🌯",bus:"🚌",business_suit_levitating:"🕴",busstop:"🚏",bust_in_silhouette:"👤",busts_in_silhouette:"👥",butterfly:"🦋",cactus:"🌵",cake:"🍰",calendar:"📆",call_me_hand:"🤙",calling:"📲",camel:"🐫",camera:"📷",camera_flash:"📸",camping:"🏕",cancer:"♋️",candle:"🕯",candy:"🍬",canoe:"🛶",capital_abcd:"🔠",capricorn:"♑️",car:"🚗",card_file_box:"🗃",card_index:"📇",card_index_dividers:"🗂",carousel_horse:"🎠",carrot:"🥕",cat:"🐱",cat2:"🐈",cd:"💿",chains:"⛓",champagne:"🍾",chart:"💹",chart_with_downwards_trend:"📉",chart_with_upwards_trend:"📈",checkered_flag:"🏁",cheese:"🧀",cherries:"🍒",cherry_blossom:"🌸",chestnut:"🌰",chicken:"🐔",children_crossing:"🚸",chipmunk:"🐿",chocolate_bar:"🍫",christmas_tree:"🎄",church:"⛪️",cinema:"🎦",circus_tent:"🎪",city_sunrise:"🌇",city_sunset:"🌆",cityscape:"🏙",cl:"🆑",clamp:"🗜",clap:"👏",clapper:"🎬",classical_building:"🏛",clinking_glasses:"🥂",clipboard:"📋",clock1:"🕐",clock10:"🕙",clock1030:"🕥",clock11:"🕚",clock1130:"🕦",clock12:"🕛",clock1230:"🕧",clock130:"🕜",clock2:"🕑",clock230:"🕝",clock3:"🕒",clock330:"🕞",clock4:"🕓",clock430:"🕟",clock5:"🕔",clock530:"🕠",clock6:"🕕",clock630:"🕡",clock7:"🕖",clock730:"🕢",clock8:"🕗",clock830:"🕣",clock9:"🕘",clock930:"🕤",closed_book:"📕",closed_lock_with_key:"🔐",closed_umbrella:"🌂",cloud:"☁️",cloud_with_lightning:"🌩",cloud_with_lightning_and_rain:"⛈",cloud_with_rain:"🌧",cloud_with_snow:"🌨",clown_face:"🤡",clubs:"♣️",cocktail:"🍸",coffee:"☕️",coffin:"⚰️",cold_sweat:"😰",comet:"☄️",computer:"💻",computer_mouse:"🖱",confetti_ball:"🎊",confounded:"😖",confused:"😕",congratulations:"㊗️",construction:"🚧",construction_worker_man:"👷",construction_worker_woman:"👷‍♀️",control_knobs:"🎛",convenience_store:"🏪",cookie:"🍪",cool:"🆒",policeman:"👮",copyright:"©️",corn:"🌽",couch_and_lamp:"🛋",couple:"👫",couple_with_heart_woman_man:"💑",couple_with_heart_man_man:"👨‍❤️‍👨",couple_with_heart_woman_woman:"👩‍❤️‍👩",couplekiss_man_man:"👨‍❤️‍💋‍👨",couplekiss_man_woman:"💏",couplekiss_woman_woman:"👩‍❤️‍💋‍👩",cow:"🐮",cow2:"🐄",cowboy_hat_face:"🤠",crab:"🦀",crayon:"🖍",credit_card:"💳",crescent_moon:"🌙",cricket:"🏏",crocodile:"🐊",croissant:"🥐",crossed_fingers:"🤞",crossed_flags:"🎌",crossed_swords:"⚔️",crown:"👑",cry:"😢",crying_cat_face:"😿",crystal_ball:"🔮",cucumber:"🥒",cupid:"💘",curly_loop:"➰",currency_exchange:"💱",curry:"🍛",custard:"🍮",customs:"🛃",cyclone:"🌀",dagger:"🗡",dancer:"💃",dancing_women:"👯",dancing_men:"👯‍♂️",dango:"🍡",dark_sunglasses:"🕶",dart:"🎯",dash:"💨",date:"📅",deciduous_tree:"🌳",deer:"🦌",department_store:"🏬",derelict_house:"🏚",desert:"🏜",desert_island:"🏝",desktop_computer:"🖥",male_detective:"🕵️",diamond_shape_with_a_dot_inside:"💠",diamonds:"♦️",disappointed:"😞",disappointed_relieved:"😥",dizzy:"💫",dizzy_face:"😵",do_not_litter:"🚯",dog:"🐶",dog2:"🐕",dollar:"💵",dolls:"🎎",dolphin:"🐬",door:"🚪",doughnut:"🍩",dove:"🕊",dragon:"🐉",dragon_face:"🐲",dress:"👗",dromedary_camel:"🐪",drooling_face:"🤤",droplet:"💧",drum:"🥁",duck:"🦆",dvd:"📀","e-mail":"📧",eagle:"🦅",ear:"👂",ear_of_rice:"🌾",earth_africa:"🌍",earth_americas:"🌎",earth_asia:"🌏",egg:"🥚",eggplant:"🍆",eight_pointed_black_star:"✴️",eight_spoked_asterisk:"✳️",electric_plug:"🔌",elephant:"🐘",email:"✉️",end:"🔚",envelope_with_arrow:"📩",euro:"💶",european_castle:"🏰",european_post_office:"🏤",evergreen_tree:"🌲",exclamation:"❗️",expressionless:"😑",eye:"👁",eye_speech_bubble:"👁‍🗨",eyeglasses:"👓",eyes:"👀",face_with_head_bandage:"🤕",face_with_thermometer:"🤒",fist_oncoming:"👊",factory:"🏭",fallen_leaf:"🍂",family_man_woman_boy:"👪",family_man_boy:"👨‍👦",family_man_boy_boy:"👨‍👦‍👦",family_man_girl:"👨‍👧",family_man_girl_boy:"👨‍👧‍👦",family_man_girl_girl:"👨‍👧‍👧",family_man_man_boy:"👨‍👨‍👦",family_man_man_boy_boy:"👨‍👨‍👦‍👦",family_man_man_girl:"👨‍👨‍👧",family_man_man_girl_boy:"👨‍👨‍👧‍👦",family_man_man_girl_girl:"👨‍👨‍👧‍👧",family_man_woman_boy_boy:"👨‍👩‍👦‍👦",family_man_woman_girl:"👨‍👩‍👧",family_man_woman_girl_boy:"👨‍👩‍👧‍👦",family_man_woman_girl_girl:"👨‍👩‍👧‍👧",family_woman_boy:"👩‍👦",family_woman_boy_boy:"👩‍👦‍👦",family_woman_girl:"👩‍👧",family_woman_girl_boy:"👩‍👧‍👦",family_woman_girl_girl:"👩‍👧‍👧",family_woman_woman_boy:"👩‍👩‍👦",family_woman_woman_boy_boy:"👩‍👩‍👦‍👦",family_woman_woman_girl:"👩‍👩‍👧",family_woman_woman_girl_boy:"👩‍👩‍👧‍👦",family_woman_woman_girl_girl:"👩‍👩‍👧‍👧",fast_forward:"⏩",fax:"📠",fearful:"😨",feet:"🐾",female_detective:"🕵️‍♀️",ferris_wheel:"🎡",ferry:"⛴",field_hockey:"🏑",file_cabinet:"🗄",file_folder:"📁",film_projector:"📽",film_strip:"🎞",fire:"🔥",fire_engine:"🚒",fireworks:"🎆",first_quarter_moon:"🌓",first_quarter_moon_with_face:"🌛",fish:"🐟",fish_cake:"🍥",fishing_pole_and_fish:"🎣",fist_raised:"✊",fist_left:"🤛",fist_right:"🤜",flags:"🎏",flashlight:"🔦",fleur_de_lis:"⚜️",flight_arrival:"🛬",flight_departure:"🛫",floppy_disk:"💾",flower_playing_cards:"🎴",flushed:"😳",fog:"🌫",foggy:"🌁",football:"🏈",footprints:"👣",fork_and_knife:"🍴",fountain:"⛲️",fountain_pen:"🖋",four_leaf_clover:"🍀",fox_face:"🦊",framed_picture:"🖼",free:"🆓",fried_egg:"🍳",fried_shrimp:"🍤",fries:"🍟",frog:"🐸",frowning:"😦",frowning_face:"☹️",frowning_man:"🙍‍♂️",frowning_woman:"🙍",middle_finger:"🖕",fuelpump:"⛽️",full_moon:"🌕",full_moon_with_face:"🌝",funeral_urn:"⚱️",game_die:"🎲",gear:"⚙️",gem:"💎",gemini:"♊️",ghost:"👻",gift:"🎁",gift_heart:"💝",girl:"👧",globe_with_meridians:"🌐",goal_net:"🥅",goat:"🐐",golf:"⛳️",golfing_man:"🏌️",golfing_woman:"🏌️‍♀️",gorilla:"🦍",grapes:"🍇",green_apple:"🍏",green_book:"📗",green_heart:"💚",green_salad:"🥗",grey_exclamation:"❕",grey_question:"❔",grimacing:"😬",grin:"😁",grinning:"😀",guardsman:"💂",guardswoman:"💂‍♀️",guitar:"🎸",gun:"🔫",haircut_woman:"💇",haircut_man:"💇‍♂️",hamburger:"🍔",hammer:"🔨",hammer_and_pick:"⚒",hammer_and_wrench:"🛠",hamster:"🐹",hand:"✋",handbag:"👜",handshake:"🤝",hankey:"💩",hatched_chick:"🐥",hatching_chick:"🐣",headphones:"🎧",hear_no_evil:"🙉",heart:"❤️",heart_decoration:"💟",heart_eyes:"😍",heart_eyes_cat:"😻",heartbeat:"💓",heartpulse:"💗",hearts:"♥️",heavy_check_mark:"✔️",heavy_division_sign:"➗",heavy_dollar_sign:"💲",heavy_heart_exclamation:"❣️",heavy_minus_sign:"➖",heavy_multiplication_x:"✖️",heavy_plus_sign:"➕",helicopter:"🚁",herb:"🌿",hibiscus:"🌺",high_brightness:"🔆",high_heel:"👠",hocho:"🔪",hole:"🕳",honey_pot:"🍯",horse:"🐴",horse_racing:"🏇",hospital:"🏥",hot_pepper:"🌶",hotdog:"🌭",hotel:"🏨",hotsprings:"♨️",hourglass:"⌛️",hourglass_flowing_sand:"⏳",house:"🏠",house_with_garden:"🏡",houses:"🏘",hugs:"🤗",hushed:"😯",ice_cream:"🍨",ice_hockey:"🏒",ice_skate:"⛸",icecream:"🍦",id:"🆔",ideograph_advantage:"🉐",imp:"👿",inbox_tray:"📥",incoming_envelope:"📨",tipping_hand_woman:"💁",information_source:"ℹ️",innocent:"😇",interrobang:"⁉️",iphone:"📱",izakaya_lantern:"🏮",jack_o_lantern:"🎃",japan:"🗾",japanese_castle:"🏯",japanese_goblin:"👺",japanese_ogre:"👹",jeans:"👖",joy:"😂",joy_cat:"😹",joystick:"🕹",kaaba:"🕋",key:"🔑",keyboard:"⌨️",keycap_ten:"🔟",kick_scooter:"🛴",kimono:"👘",kiss:"💋",kissing:"😗",kissing_cat:"😽",kissing_closed_eyes:"😚",kissing_heart:"😘",kissing_smiling_eyes:"😙",kiwi_fruit:"🥝",koala:"🐨",koko:"🈁",label:"🏷",large_blue_circle:"🔵",large_blue_diamond:"🔷",large_orange_diamond:"🔶",last_quarter_moon:"🌗",last_quarter_moon_with_face:"🌜",latin_cross:"✝️",laughing:"😆",leaves:"🍃",ledger:"📒",left_luggage:"🛅",left_right_arrow:"↔️",leftwards_arrow_with_hook:"↩️",lemon:"🍋",leo:"♌️",leopard:"🐆",level_slider:"🎚",libra:"♎️",light_rail:"🚈",link:"🔗",lion:"🦁",lips:"👄",lipstick:"💄",lizard:"🦎",lock:"🔒",lock_with_ink_pen:"🔏",lollipop:"🍭",loop:"➿",loud_sound:"🔊",loudspeaker:"📢",love_hotel:"🏩",love_letter:"💌",low_brightness:"🔅",lying_face:"🤥",m:"Ⓜ️",mag:"🔍",mag_right:"🔎",mahjong:"🀄️",mailbox:"📫",mailbox_closed:"📪",mailbox_with_mail:"📬",mailbox_with_no_mail:"📭",man:"👨",man_artist:"👨‍🎨",man_astronaut:"👨‍🚀",man_cartwheeling:"🤸‍♂️",man_cook:"👨‍🍳",man_dancing:"🕺",man_facepalming:"🤦‍♂️",man_factory_worker:"👨‍🏭",man_farmer:"👨‍🌾",man_firefighter:"👨‍🚒",man_health_worker:"👨‍⚕️",man_in_tuxedo:"🤵",man_judge:"👨‍⚖️",man_juggling:"🤹‍♂️",man_mechanic:"👨‍🔧",man_office_worker:"👨‍💼",man_pilot:"👨‍✈️",man_playing_handball:"🤾‍♂️",man_playing_water_polo:"🤽‍♂️",man_scientist:"👨‍🔬",man_shrugging:"🤷‍♂️",man_singer:"👨‍🎤",man_student:"👨‍🎓",man_teacher:"👨‍🏫",man_technologist:"👨‍💻",man_with_gua_pi_mao:"👲",man_with_turban:"👳",tangerine:"🍊",mans_shoe:"👞",mantelpiece_clock:"🕰",maple_leaf:"🍁",martial_arts_uniform:"🥋",mask:"😷",massage_woman:"💆",massage_man:"💆‍♂️",meat_on_bone:"🍖",medal_military:"🎖",medal_sports:"🏅",mega:"📣",melon:"🍈",memo:"📝",men_wrestling:"🤼‍♂️",menorah:"🕎",mens:"🚹",metal:"🤘",metro:"🚇",microphone:"🎤",microscope:"🔬",milk_glass:"🥛",milky_way:"🌌",minibus:"🚐",minidisc:"💽",mobile_phone_off:"📴",money_mouth_face:"🤑",money_with_wings:"💸",moneybag:"💰",monkey:"🐒",monkey_face:"🐵",monorail:"🚝",moon:"🌔",mortar_board:"🎓",mosque:"🕌",motor_boat:"🛥",motor_scooter:"🛵",motorcycle:"🏍",motorway:"🛣",mount_fuji:"🗻",mountain:"⛰",mountain_biking_man:"🚵",mountain_biking_woman:"🚵‍♀️",mountain_cableway:"🚠",mountain_railway:"🚞",mountain_snow:"🏔",mouse:"🐭",mouse2:"🐁",movie_camera:"🎥",moyai:"🗿",mrs_claus:"🤶",muscle:"💪",mushroom:"🍄",musical_keyboard:"🎹",musical_note:"🎵",musical_score:"🎼",mute:"🔇",nail_care:"💅",name_badge:"📛",national_park:"🏞",nauseated_face:"🤢",necktie:"👔",negative_squared_cross_mark:"❎",nerd_face:"🤓",neutral_face:"😐",new:"🆕",new_moon:"🌑",new_moon_with_face:"🌚",newspaper:"📰",newspaper_roll:"🗞",next_track_button:"⏭",ng:"🆖",no_good_man:"🙅‍♂️",no_good_woman:"🙅",night_with_stars:"🌃",no_bell:"🔕",no_bicycles:"🚳",no_entry:"⛔️",no_entry_sign:"🚫",no_mobile_phones:"📵",no_mouth:"😶",no_pedestrians:"🚷",no_smoking:"🚭","non-potable_water":"🚱",nose:"👃",notebook:"📓",notebook_with_decorative_cover:"📔",notes:"🎶",nut_and_bolt:"🔩",o:"⭕️",o2:"🅾️",ocean:"🌊",octopus:"🐙",oden:"🍢",office:"🏢",oil_drum:"🛢",ok:"🆗",ok_hand:"👌",ok_man:"🙆‍♂️",ok_woman:"🙆",old_key:"🗝",older_man:"👴",older_woman:"👵",om:"🕉",on:"🔛",oncoming_automobile:"🚘",oncoming_bus:"🚍",oncoming_police_car:"🚔",oncoming_taxi:"🚖",open_file_folder:"📂",open_hands:"👐",open_mouth:"😮",open_umbrella:"☂️",ophiuchus:"⛎",orange_book:"📙",orthodox_cross:"☦️",outbox_tray:"📤",owl:"🦉",ox:"🐂",package:"📦",page_facing_up:"📄",page_with_curl:"📃",pager:"📟",paintbrush:"🖌",palm_tree:"🌴",pancakes:"🥞",panda_face:"🐼",paperclip:"📎",paperclips:"🖇",parasol_on_ground:"⛱",parking:"🅿️",part_alternation_mark:"〽️",partly_sunny:"⛅️",passenger_ship:"🛳",passport_control:"🛂",pause_button:"⏸",peace_symbol:"☮️",peach:"🍑",peanuts:"🥜",pear:"🍐",pen:"🖊",pencil2:"✏️",penguin:"🐧",pensive:"😔",performing_arts:"🎭",persevere:"😣",person_fencing:"🤺",pouting_woman:"🙎",phone:"☎️",pick:"⛏",pig:"🐷",pig2:"🐖",pig_nose:"🐽",pill:"💊",pineapple:"🍍",ping_pong:"🏓",pisces:"♓️",pizza:"🍕",place_of_worship:"🛐",plate_with_cutlery:"🍽",play_or_pause_button:"⏯",point_down:"👇",point_left:"👈",point_right:"👉",point_up:"☝️",point_up_2:"👆",police_car:"🚓",policewoman:"👮‍♀️",poodle:"🐩",popcorn:"🍿",post_office:"🏣",postal_horn:"📯",postbox:"📮",potable_water:"🚰",potato:"🥔",pouch:"👝",poultry_leg:"🍗",pound:"💷",rage:"😡",pouting_cat:"😾",pouting_man:"🙎‍♂️",pray:"🙏",prayer_beads:"📿",pregnant_woman:"🤰",previous_track_button:"⏮",prince:"🤴",princess:"👸",printer:"🖨",purple_heart:"💜",purse:"👛",pushpin:"📌",put_litter_in_its_place:"🚮",question:"❓",rabbit:"🐰",rabbit2:"🐇",racehorse:"🐎",racing_car:"🏎",radio:"📻",radio_button:"🔘",radioactive:"☢️",railway_car:"🚃",railway_track:"🛤",rainbow:"🌈",rainbow_flag:"🏳️‍🌈",raised_back_of_hand:"🤚",raised_hand_with_fingers_splayed:"🖐",raised_hands:"🙌",raising_hand_woman:"🙋",raising_hand_man:"🙋‍♂️",ram:"🐏",ramen:"🍜",rat:"🐀",record_button:"⏺",recycle:"♻️",red_circle:"🔴",registered:"®️",relaxed:"☺️",relieved:"😌",reminder_ribbon:"🎗",repeat:"🔁",repeat_one:"🔂",rescue_worker_helmet:"⛑",restroom:"🚻",revolving_hearts:"💞",rewind:"⏪",rhinoceros:"🦏",ribbon:"🎀",rice:"🍚",rice_ball:"🍙",rice_cracker:"🍘",rice_scene:"🎑",right_anger_bubble:"🗯",ring:"💍",robot:"🤖",rocket:"🚀",rofl:"🤣",roll_eyes:"🙄",roller_coaster:"🎢",rooster:"🐓",rose:"🌹",rosette:"🏵",rotating_light:"🚨",round_pushpin:"📍",rowing_man:"🚣",rowing_woman:"🚣‍♀️",rugby_football:"🏉",running_man:"🏃",running_shirt_with_sash:"🎽",running_woman:"🏃‍♀️",sa:"🈂️",sagittarius:"♐️",sake:"🍶",sandal:"👡",santa:"🎅",satellite:"📡",saxophone:"🎷",school:"🏫",school_satchel:"🎒",scissors:"✂️",scorpion:"🦂",scorpius:"♏️",scream:"😱",scream_cat:"🙀",scroll:"📜",seat:"💺",secret:"㊙️",see_no_evil:"🙈",seedling:"🌱",selfie:"🤳",shallow_pan_of_food:"🥘",shamrock:"☘️",shark:"🦈",shaved_ice:"🍧",sheep:"🐑",shell:"🐚",shield:"🛡",shinto_shrine:"⛩",ship:"🚢",shirt:"👕",shopping:"🛍",shopping_cart:"🛒",shower:"🚿",shrimp:"🦐",signal_strength:"📶",six_pointed_star:"🔯",ski:"🎿",skier:"⛷",skull:"💀",skull_and_crossbones:"☠️",sleeping:"😴",sleeping_bed:"🛌",sleepy:"😪",slightly_frowning_face:"🙁",slightly_smiling_face:"🙂",slot_machine:"🎰",small_airplane:"🛩",small_blue_diamond:"🔹",small_orange_diamond:"🔸",small_red_triangle:"🔺",small_red_triangle_down:"🔻",smile:"😄",smile_cat:"😸",smiley:"😃",smiley_cat:"😺",smiling_imp:"😈",smirk:"😏",smirk_cat:"😼",smoking:"🚬",snail:"🐌",snake:"🐍",sneezing_face:"🤧",snowboarder:"🏂",snowflake:"❄️",snowman:"⛄️",snowman_with_snow:"☃️",sob:"😭",soccer:"⚽️",soon:"🔜",sos:"🆘",sound:"🔉",space_invader:"👾",spades:"♠️",spaghetti:"🍝",sparkle:"❇️",sparkler:"🎇",sparkles:"✨",sparkling_heart:"💖",speak_no_evil:"🙊",speaker:"🔈",speaking_head:"🗣",speech_balloon:"💬",speedboat:"🚤",spider:"🕷",spider_web:"🕸",spiral_calendar:"🗓",spiral_notepad:"🗒",spoon:"🥄",squid:"🦑",stadium:"🏟",star:"⭐️",star2:"🌟",star_and_crescent:"☪️",star_of_david:"✡️",stars:"🌠",station:"🚉",statue_of_liberty:"🗽",steam_locomotive:"🚂",stew:"🍲",stop_button:"⏹",stop_sign:"🛑",stopwatch:"⏱",straight_ruler:"📏",strawberry:"🍓",stuck_out_tongue:"😛",stuck_out_tongue_closed_eyes:"😝",stuck_out_tongue_winking_eye:"😜",studio_microphone:"🎙",stuffed_flatbread:"🥙",sun_behind_large_cloud:"🌥",sun_behind_rain_cloud:"🌦",sun_behind_small_cloud:"🌤",sun_with_face:"🌞",sunflower:"🌻",sunglasses:"😎",sunny:"☀️",sunrise:"🌅",sunrise_over_mountains:"🌄",surfing_man:"🏄",surfing_woman:"🏄‍♀️",sushi:"🍣",suspension_railway:"🚟",sweat:"😓",sweat_drops:"💦",sweat_smile:"😅",sweet_potato:"🍠",swimming_man:"🏊",swimming_woman:"🏊‍♀️",symbols:"🔣",synagogue:"🕍",syringe:"💉",taco:"🌮",tada:"🎉",tanabata_tree:"🎋",taurus:"♉️",taxi:"🚕",tea:"🍵",telephone_receiver:"📞",telescope:"🔭",tennis:"🎾",tent:"⛺️",thermometer:"🌡",thinking:"🤔",thought_balloon:"💭",ticket:"🎫",tickets:"🎟",tiger:"🐯",tiger2:"🐅",timer_clock:"⏲",tipping_hand_man:"💁‍♂️",tired_face:"😫",tm:"™️",toilet:"🚽",tokyo_tower:"🗼",tomato:"🍅",tongue:"👅",top:"🔝",tophat:"🎩",tornado:"🌪",trackball:"🖲",tractor:"🚜",traffic_light:"🚥",train:"🚋",train2:"🚆",tram:"🚊",triangular_flag_on_post:"🚩",triangular_ruler:"📐",trident:"🔱",triumph:"😤",trolleybus:"🚎",trophy:"🏆",tropical_drink:"🍹",tropical_fish:"🐠",truck:"🚚",trumpet:"🎺",tulip:"🌷",tumbler_glass:"🥃",turkey:"🦃",turtle:"🐢",tv:"📺",twisted_rightwards_arrows:"🔀",two_hearts:"💕",two_men_holding_hands:"👬",two_women_holding_hands:"👭",u5272:"🈹",u5408:"🈴",u55b6:"🈺",u6307:"🈯️",u6708:"🈷️",u6709:"🈶",u6e80:"🈵",u7121:"🈚️",u7533:"🈸",u7981:"🈲",u7a7a:"🈳",umbrella:"☔️",unamused:"😒",underage:"🔞",unicorn:"🦄",unlock:"🔓",up:"🆙",upside_down_face:"🙃",v:"✌️",vertical_traffic_light:"🚦",vhs:"📼",vibration_mode:"📳",video_camera:"📹",video_game:"🎮",violin:"🎻",virgo:"♍️",volcano:"🌋",volleyball:"🏐",vs:"🆚",vulcan_salute:"🖖",walking_man:"🚶",walking_woman:"🚶‍♀️",waning_crescent_moon:"🌘",waning_gibbous_moon:"🌖",warning:"⚠️",wastebasket:"🗑",watch:"⌚️",water_buffalo:"🐃",watermelon:"🍉",wave:"👋",wavy_dash:"〰️",waxing_crescent_moon:"🌒",wc:"🚾",weary:"😩",wedding:"💒",weight_lifting_man:"🏋️",weight_lifting_woman:"🏋️‍♀️",whale:"🐳",whale2:"🐋",wheel_of_dharma:"☸️",wheelchair:"♿️",white_check_mark:"✅",white_circle:"⚪️",white_flag:"🏳️",white_flower:"💮",white_large_square:"⬜️",white_medium_small_square:"◽️",white_medium_square:"◻️",white_small_square:"▫️",white_square_button:"🔳",wilted_flower:"🥀",wind_chime:"🎐",wind_face:"🌬",wine_glass:"🍷",wink:"😉",wolf:"🐺",woman:"👩",woman_artist:"👩‍🎨",woman_astronaut:"👩‍🚀",woman_cartwheeling:"🤸‍♀️",woman_cook:"👩‍🍳",woman_facepalming:"🤦‍♀️",woman_factory_worker:"👩‍🏭",woman_farmer:"👩‍🌾",woman_firefighter:"👩‍🚒",woman_health_worker:"👩‍⚕️",woman_judge:"👩‍⚖️",woman_juggling:"🤹‍♀️",woman_mechanic:"👩‍🔧",woman_office_worker:"👩‍💼",woman_pilot:"👩‍✈️",woman_playing_handball:"🤾‍♀️",woman_playing_water_polo:"🤽‍♀️",woman_scientist:"👩‍🔬",woman_shrugging:"🤷‍♀️",woman_singer:"👩‍🎤",woman_student:"👩‍🎓",woman_teacher:"👩‍🏫",woman_technologist:"👩‍💻",woman_with_turban:"👳‍♀️",womans_clothes:"👚",womans_hat:"👒",women_wrestling:"🤼‍♀️",womens:"🚺",world_map:"🗺",worried:"😟",wrench:"🔧",writing_hand:"✍️",x:"❌",yellow_heart:"💛",yen:"💴",yin_yang:"☯️",yum:"😋",zap:"⚡️",zipper_mouth_face:"🤐",zzz:"💤",octocat:'<img alt=":octocat:" height="20" width="20" align="absmiddle" src="https://assets-cdn.github.com/images/icons/emoji/octocat.png">',showdown:"<span style=\"font-family: 'Anonymous Pro', monospace; text-decoration: underline; text-decoration-style: dashed; text-decoration-color: #3e8b8a;text-underline-position: under;\">S</span>"},i.Converter=function(e){"use strict";var t={},n=[],r=[],o={},a=c,p={parsed:{},raw:"",format:""};function m(e,t){if(t=t||null,i.helper.isString(e)){if(t=e=i.helper.stdExtName(e),i.extensions[e])return console.warn("DEPRECATION WARNING: "+e+" is an old extension that uses a deprecated loading method.Please inform the developer that the extension should be updated!"),void function(e,t){"function"==typeof e&&(e=e(new i.Converter)),i.helper.isArray(e)||(e=[e]);var o=d(e,t);if(!o.valid)throw Error(o.error);for(var a=0;a<e.length;++a)switch(e[a].type){case"lang":n.push(e[a]);break;case"output":r.push(e[a]);break;default:throw Error("Extension loader error: Type unrecognized!!!")}}(i.extensions[e],e);if(i.helper.isUndefined(l[e]))throw Error('Extension "'+e+'" could not be loaded. It was either not found or is not a valid extension.');e=l[e]}"function"==typeof e&&(e=e()),i.helper.isArray(e)||(e=[e]);var o=d(e,t);if(!o.valid)throw Error(o.error);for(var a=0;a<e.length;++a){switch(e[a].type){case"lang":n.push(e[a]);break;case"output":r.push(e[a])}if(e[a].hasOwnProperty("listeners"))for(var s in e[a].listeners)e[a].listeners.hasOwnProperty(s)&&f(s,e[a].listeners[s])}}function f(e,t){if(!i.helper.isString(e))throw Error("Invalid argument in converter.listen() method: name must be a string, but "+typeof e+" given");if("function"!=typeof t)throw Error("Invalid argument in converter.listen() method: callback must be a function, but "+typeof t+" given");o.hasOwnProperty(e)||(o[e]=[]),o[e].push(t)}!function(){for(var n in e=e||{},s)s.hasOwnProperty(n)&&(t[n]=s[n]);if("object"!=typeof e)throw Error("Converter expects the passed parameter to be an object, but "+typeof e+" was passed instead.");for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);t.extensions&&i.helper.forEach(t.extensions,m)}(),this._dispatch=function(e,t,n,r){if(o.hasOwnProperty(e))for(var i=0;i<o[e].length;++i){var a=o[e][i](e,t,this,n,r);a&&void 0!==a&&(t=a)}return t},this.listen=function(e,t){return f(e,t),this},this.makeHtml=function(e){if(!e)return e;var o={gHtmlBlocks:[],gHtmlMdBlocks:[],gHtmlSpans:[],gUrls:{},gTitles:{},gDimensions:{},gListLevel:0,hashLinkCounts:{},langExtensions:n,outputModifiers:r,converter:this,ghCodeBlocks:[],metadata:{parsed:{},raw:"",format:""}};return e=(e=(e=(e=(e=e.replace(/¨/g,"¨T")).replace(/\$/g,"¨D")).replace(/\r\n/g,"\n")).replace(/\r/g,"\n")).replace(/\u00A0/g," "),t.smartIndentationFix&&(e=function(e){var t=e.match(/^\s*/)[0].length,n=new RegExp("^\\s{0,"+t+"}","gm");return e.replace(n,"")}(e)),e="\n\n"+e+"\n\n",e=(e=i.subParser("detab")(e,t,o)).replace(/^[ \t]+$/gm,""),i.helper.forEach(n,(function(n){e=i.subParser("runExtension")(n,e,t,o)})),e=i.subParser("metadata")(e,t,o),e=i.subParser("hashPreCodeTags")(e,t,o),e=i.subParser("githubCodeBlocks")(e,t,o),e=i.subParser("hashHTMLBlocks")(e,t,o),e=i.subParser("hashCodeTags")(e,t,o),e=i.subParser("stripLinkDefinitions")(e,t,o),e=i.subParser("blockGamut")(e,t,o),e=i.subParser("unhashHTMLSpans")(e,t,o),e=(e=(e=i.subParser("unescapeSpecialChars")(e,t,o)).replace(/¨D/g,"$$")).replace(/¨T/g,"¨"),e=i.subParser("completeHTMLDocument")(e,t,o),i.helper.forEach(r,(function(n){e=i.subParser("runExtension")(n,e,t,o)})),p=o.metadata,e},this.makeMarkdown=this.makeMd=function(e,t){if(e=(e=(e=e.replace(/\r\n/g,"\n")).replace(/\r/g,"\n")).replace(/>[ \t]+</,">¨NBSP;<"),!t){if(!window||!window.document)throw new Error("HTMLParser is undefined. If in a webworker or nodejs environment, you need to provide a WHATWG DOM and HTML such as JSDOM");t=window.document}var n=t.createElement("div");n.innerHTML=e;var r={preList:function(e){for(var t=e.querySelectorAll("pre"),n=[],r=0;r<t.length;++r)if(1===t[r].childElementCount&&"code"===t[r].firstChild.tagName.toLowerCase()){var o=t[r].firstChild.innerHTML.trim(),a=t[r].firstChild.getAttribute("data-language")||"";if(""===a)for(var l=t[r].firstChild.className.split(" "),s=0;s<l.length;++s){var c=l[s].match(/^language-(.+)$/);if(null!==c){a=c[1];break}}o=i.helper.unescapeHTMLEntities(o),n.push(o),t[r].outerHTML='<precode language="'+a+'" precodenum="'+r.toString()+'"></precode>'}else n.push(t[r].innerHTML),t[r].innerHTML="",t[r].setAttribute("prenum",r.toString());return n}(n)};!function e(t){for(var n=0;n<t.childNodes.length;++n){var r=t.childNodes[n];3===r.nodeType?/\S/.test(r.nodeValue)?(r.nodeValue=r.nodeValue.split("\n").join(" "),r.nodeValue=r.nodeValue.replace(/(\s)+/g,"$1")):(t.removeChild(r),--n):1===r.nodeType&&e(r)}}(n);for(var o=n.childNodes,a="",l=0;l<o.length;l++)a+=i.subParser("makeMarkdown.node")(o[l],r);return a},this.setOption=function(e,n){t[e]=n},this.getOption=function(e){return t[e]},this.getOptions=function(){return t},this.addExtension=function(e,t){m(e,t=t||null)},this.useExtension=function(e){m(e)},this.setFlavor=function(e){if(!u.hasOwnProperty(e))throw Error(e+" flavor was not found");var n=u[e];for(var r in a=e,n)n.hasOwnProperty(r)&&(t[r]=n[r])},this.getFlavor=function(){return a},this.removeExtension=function(e){i.helper.isArray(e)||(e=[e]);for(var t=0;t<e.length;++t){for(var o=e[t],a=0;a<n.length;++a)n[a]===o&&n[a].splice(a,1);for(;0<r.length;++a)r[0]===o&&r[0].splice(a,1)}},this.getAllExtensions=function(){return{language:n,output:r}},this.getMetadata=function(e){return e?p.raw:p.parsed},this.getMetadataFormat=function(){return p.format},this._setMetadataPair=function(e,t){p.parsed[e]=t},this._setMetadataFormat=function(e){p.format=e},this._setMetadataRaw=function(e){p.raw=e}},i.subParser("anchors",(function(e,t,n){"use strict";var r=function(e,r,o,a,l,s,c){if(i.helper.isUndefined(c)&&(c=""),o=o.toLowerCase(),e.search(/\(<?\s*>? ?(['"].*['"])?\)$/m)>-1)a="";else if(!a){if(o||(o=r.toLowerCase().replace(/ ?\n/g," ")),a="#"+o,i.helper.isUndefined(n.gUrls[o]))return e;a=n.gUrls[o],i.helper.isUndefined(n.gTitles[o])||(c=n.gTitles[o])}var u='<a href="'+(a=a.replace(i.helper.regexes.asteriskDashAndColon,i.helper.escapeCharactersCallback))+'"';return""!==c&&null!==c&&(u+=' title="'+(c=(c=c.replace(/"/g,""")).replace(i.helper.regexes.asteriskDashAndColon,i.helper.escapeCharactersCallback))+'"'),t.openLinksInNewWindow&&!/^#/.test(a)&&(u+=' rel="noopener noreferrer" target="¨E95Eblank"'),u+">"+r+"</a>"};return e=(e=(e=(e=(e=n.converter._dispatch("anchors.before",e,t,n)).replace(/\[((?:\[[^\]]*]|[^\[\]])*)] ?(?:\n *)?\[(.*?)]()()()()/g,r)).replace(/\[((?:\[[^\]]*]|[^\[\]])*)]()[ \t]*\([ \t]?<([^>]*)>(?:[ \t]*((["'])([^"]*?)\5))?[ \t]?\)/g,r)).replace(/\[((?:\[[^\]]*]|[^\[\]])*)]()[ \t]*\([ \t]?<?([\S]+?(?:\([\S]*?\)[\S]*?)?)>?(?:[ \t]*((["'])([^"]*?)\5))?[ \t]?\)/g,r)).replace(/\[([^\[\]]+)]()()()()()/g,r),t.ghMentions&&(e=e.replace(/(^|\s)(\\)?(@([a-z\d]+(?:[a-z\d.-]+?[a-z\d]+)*))/gim,(function(e,n,r,o,a){if("\\"===r)return n+o;if(!i.helper.isString(t.ghMentionsLink))throw new Error("ghMentionsLink option must be a string");var l=t.ghMentionsLink.replace(/\{u}/g,a),s="";return t.openLinksInNewWindow&&(s=' rel="noopener noreferrer" target="¨E95Eblank"'),n+'<a href="'+l+'"'+s+">"+o+"</a>"}))),n.converter._dispatch("anchors.after",e,t,n)}));var f=/([*~_]+|\b)(((https?|ftp|dict):\/\/|www\.)[^'">\s]+?\.[^'">\s]+?)()(\1)?(?=\s|$)(?!["<>])/gi,h=/([*~_]+|\b)(((https?|ftp|dict):\/\/|www\.)[^'">\s]+\.[^'">\s]+?)([.!?,()\[\]])?(\1)?(?=\s|$)(?!["<>])/gi,g=/()<(((https?|ftp|dict):\/\/|www\.)[^'">\s]+)()>()/gi,v=/(^|\s)(?:mailto:)?([A-Za-z0-9!#$%&'*+-/=?^_`{|}~.]+@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)(?=$|\s)/gim,b=/<()(?:mailto:)?([-.\w]+@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)>/gi,y=function(e){"use strict";return function(t,n,r,o,a,l,s){var c=r=r.replace(i.helper.regexes.asteriskDashAndColon,i.helper.escapeCharactersCallback),u="",d="",p=n||"",m=s||"";return/^www\./i.test(r)&&(r=r.replace(/^www\./i,"http://www.")),e.excludeTrailingPunctuationFromURLs&&l&&(u=l),e.openLinksInNewWindow&&(d=' rel="noopener noreferrer" target="¨E95Eblank"'),p+'<a href="'+r+'"'+d+">"+c+"</a>"+u+m}},w=function(e,t){"use strict";return function(n,r,o){var a="mailto:";return r=r||"",o=i.subParser("unescapeSpecialChars")(o,e,t),e.encodeEmails?(a=i.helper.encodeEmailAddress(a+o),o=i.helper.encodeEmailAddress(o)):a+=o,r+'<a href="'+a+'">'+o+"</a>"}};i.subParser("autoLinks",(function(e,t,n){"use strict";return e=(e=(e=n.converter._dispatch("autoLinks.before",e,t,n)).replace(g,y(t))).replace(b,w(t,n)),n.converter._dispatch("autoLinks.after",e,t,n)})),i.subParser("simplifiedAutoLinks",(function(e,t,n){"use strict";return t.simplifiedAutoLink?(e=n.converter._dispatch("simplifiedAutoLinks.before",e,t,n),e=(e=t.excludeTrailingPunctuationFromURLs?e.replace(h,y(t)):e.replace(f,y(t))).replace(v,w(t,n)),e=n.converter._dispatch("simplifiedAutoLinks.after",e,t,n)):e})),i.subParser("blockGamut",(function(e,t,n){"use strict";return e=n.converter._dispatch("blockGamut.before",e,t,n),e=i.subParser("blockQuotes")(e,t,n),e=i.subParser("headers")(e,t,n),e=i.subParser("horizontalRule")(e,t,n),e=i.subParser("lists")(e,t,n),e=i.subParser("codeBlocks")(e,t,n),e=i.subParser("tables")(e,t,n),e=i.subParser("hashHTMLBlocks")(e,t,n),e=i.subParser("paragraphs")(e,t,n),n.converter._dispatch("blockGamut.after",e,t,n)})),i.subParser("blockQuotes",(function(e,t,n){"use strict";e=n.converter._dispatch("blockQuotes.before",e,t,n),e+="\n\n";var r=/(^ {0,3}>[ \t]?.+\n(.+\n)*\n*)+/gm;return t.splitAdjacentBlockquotes&&(r=/^ {0,3}>[\s\S]*?(?:\n\n)/gm),e=e.replace(r,(function(e){return e=(e=(e=e.replace(/^[ \t]*>[ \t]?/gm,"")).replace(/¨0/g,"")).replace(/^[ \t]+$/gm,""),e=i.subParser("githubCodeBlocks")(e,t,n),e=(e=(e=i.subParser("blockGamut")(e,t,n)).replace(/(^|\n)/g,"$1 ")).replace(/(\s*<pre>[^\r]+?<\/pre>)/gm,(function(e,t){var n=t;return(n=n.replace(/^ /gm,"¨0")).replace(/¨0/g,"")})),i.subParser("hashBlock")("<blockquote>\n"+e+"\n</blockquote>",t,n)})),n.converter._dispatch("blockQuotes.after",e,t,n)})),i.subParser("codeBlocks",(function(e,t,n){"use strict";return e=n.converter._dispatch("codeBlocks.before",e,t,n),e=(e=(e+="¨0").replace(/(?:\n\n|^)((?:(?:[ ]{4}|\t).*\n+)+)(\n*[ ]{0,3}[^ \t\n]|(?=¨0))/g,(function(e,r,o){var a=r,l=o,s="\n";return a=i.subParser("outdent")(a,t,n),a=i.subParser("encodeCode")(a,t,n),a=(a=(a=i.subParser("detab")(a,t,n)).replace(/^\n+/g,"")).replace(/\n+$/g,""),t.omitExtraWLInCodeBlocks&&(s=""),a="<pre><code>"+a+s+"</code></pre>",i.subParser("hashBlock")(a,t,n)+l}))).replace(/¨0/,""),n.converter._dispatch("codeBlocks.after",e,t,n)})),i.subParser("codeSpans",(function(e,t,n){"use strict";return void 0===(e=n.converter._dispatch("codeSpans.before",e,t,n))&&(e=""),e=e.replace(/(^|[^\\])(`+)([^\r]*?[^`])\2(?!`)/gm,(function(e,r,o,a){var l=a;return l=(l=l.replace(/^([ \t]*)/g,"")).replace(/[ \t]*$/g,""),l=r+"<code>"+(l=i.subParser("encodeCode")(l,t,n))+"</code>",i.subParser("hashHTMLSpans")(l,t,n)})),n.converter._dispatch("codeSpans.after",e,t,n)})),i.subParser("completeHTMLDocument",(function(e,t,n){"use strict";if(!t.completeHTMLDocument)return e;e=n.converter._dispatch("completeHTMLDocument.before",e,t,n);var r="html",o="<!DOCTYPE HTML>\n",i="",a='<meta charset="utf-8">\n',l="",s="";for(var c in void 0!==n.metadata.parsed.doctype&&(o="<!DOCTYPE "+n.metadata.parsed.doctype+">\n","html"!==(r=n.metadata.parsed.doctype.toString().toLowerCase())&&"html5"!==r||(a='<meta charset="utf-8">')),n.metadata.parsed)if(n.metadata.parsed.hasOwnProperty(c))switch(c.toLowerCase()){case"doctype":break;case"title":i="<title>"+n.metadata.parsed.title+"</title>\n";break;case"charset":a="html"===r||"html5"===r?'<meta charset="'+n.metadata.parsed.charset+'">\n':'<meta name="charset" content="'+n.metadata.parsed.charset+'">\n';break;case"language":case"lang":l=' lang="'+n.metadata.parsed[c]+'"',s+='<meta name="'+c+'" content="'+n.metadata.parsed[c]+'">\n';break;default:s+='<meta name="'+c+'" content="'+n.metadata.parsed[c]+'">\n'}return e=o+"<html"+l+">\n<head>\n"+i+a+s+"</head>\n<body>\n"+e.trim()+"\n</body>\n</html>",n.converter._dispatch("completeHTMLDocument.after",e,t,n)})),i.subParser("detab",(function(e,t,n){"use strict";return e=(e=(e=(e=(e=(e=n.converter._dispatch("detab.before",e,t,n)).replace(/\t(?=\t)/g," ")).replace(/\t/g,"¨A¨B")).replace(/¨B(.+?)¨A/g,(function(e,t){for(var n=t,r=4-n.length%4,o=0;o<r;o++)n+=" ";return n}))).replace(/¨A/g," ")).replace(/¨B/g,""),n.converter._dispatch("detab.after",e,t,n)})),i.subParser("ellipsis",(function(e,t,n){"use strict";return e=(e=n.converter._dispatch("ellipsis.before",e,t,n)).replace(/\.\.\./g,"…"),n.converter._dispatch("ellipsis.after",e,t,n)})),i.subParser("emoji",(function(e,t,n){"use strict";return t.emoji?(e=(e=n.converter._dispatch("emoji.before",e,t,n)).replace(/:([\S]+?):/g,(function(e,t){return i.helper.emojis.hasOwnProperty(t)?i.helper.emojis[t]:e})),n.converter._dispatch("emoji.after",e,t,n)):e})),i.subParser("encodeAmpsAndAngles",(function(e,t,n){"use strict";return e=(e=(e=(e=(e=n.converter._dispatch("encodeAmpsAndAngles.before",e,t,n)).replace(/&(?!#?[xX]?(?:[0-9a-fA-F]+|\w+);)/g,"&")).replace(/<(?![a-z\/?$!])/gi,"<")).replace(/</g,"<")).replace(/>/g,">"),n.converter._dispatch("encodeAmpsAndAngles.after",e,t,n)})),i.subParser("encodeBackslashEscapes",(function(e,t,n){"use strict";return e=(e=(e=n.converter._dispatch("encodeBackslashEscapes.before",e,t,n)).replace(/\\(\\)/g,i.helper.escapeCharactersCallback)).replace(/\\([`*_{}\[\]()>#+.!~=|-])/g,i.helper.escapeCharactersCallback),n.converter._dispatch("encodeBackslashEscapes.after",e,t,n)})),i.subParser("encodeCode",(function(e,t,n){"use strict";return e=(e=n.converter._dispatch("encodeCode.before",e,t,n)).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/([*_{}\[\]\\=~-])/g,i.helper.escapeCharactersCallback),n.converter._dispatch("encodeCode.after",e,t,n)})),i.subParser("escapeSpecialCharsWithinTagAttributes",(function(e,t,n){"use strict";return e=(e=(e=n.converter._dispatch("escapeSpecialCharsWithinTagAttributes.before",e,t,n)).replace(/<\/?[a-z\d_:-]+(?:[\s]+[\s\S]+?)?>/gi,(function(e){return e.replace(/(.)<\/?code>(?=.)/g,"$1`").replace(/([\\`*_~=|])/g,i.helper.escapeCharactersCallback)}))).replace(/<!(--(?:(?:[^>-]|-[^>])(?:[^-]|-[^-])*)--)>/gi,(function(e){return e.replace(/([\\`*_~=|])/g,i.helper.escapeCharactersCallback)})),n.converter._dispatch("escapeSpecialCharsWithinTagAttributes.after",e,t,n)})),i.subParser("githubCodeBlocks",(function(e,t,n){"use strict";return t.ghCodeBlocks?(e=n.converter._dispatch("githubCodeBlocks.before",e,t,n),e=(e=(e+="¨0").replace(/(?:^|\n)(?: {0,3})(```+|~~~+)(?: *)([^\s`~]*)\n([\s\S]*?)\n(?: {0,3})\1/g,(function(e,r,o,a){var l=t.omitExtraWLInCodeBlocks?"":"\n";return a=i.subParser("encodeCode")(a,t,n),a="<pre><code"+(o?' class="'+o+" language-"+o+'"':"")+">"+(a=(a=(a=i.subParser("detab")(a,t,n)).replace(/^\n+/g,"")).replace(/\n+$/g,""))+l+"</code></pre>",a=i.subParser("hashBlock")(a,t,n),"\n\n¨G"+(n.ghCodeBlocks.push({text:e,codeblock:a})-1)+"G\n\n"}))).replace(/¨0/,""),n.converter._dispatch("githubCodeBlocks.after",e,t,n)):e})),i.subParser("hashBlock",(function(e,t,n){"use strict";return e=(e=n.converter._dispatch("hashBlock.before",e,t,n)).replace(/(^\n+|\n+$)/g,""),e="\n\n¨K"+(n.gHtmlBlocks.push(e)-1)+"K\n\n",n.converter._dispatch("hashBlock.after",e,t,n)})),i.subParser("hashCodeTags",(function(e,t,n){"use strict";return e=n.converter._dispatch("hashCodeTags.before",e,t,n),e=i.helper.replaceRecursiveRegExp(e,(function(e,r,o,a){var l=o+i.subParser("encodeCode")(r,t,n)+a;return"¨C"+(n.gHtmlSpans.push(l)-1)+"C"}),"<code\\b[^>]*>","</code>","gim"),n.converter._dispatch("hashCodeTags.after",e,t,n)})),i.subParser("hashElement",(function(e,t,n){"use strict";return function(e,t){var r=t;return r=(r=(r=r.replace(/\n\n/g,"\n")).replace(/^\n/,"")).replace(/\n+$/g,""),"\n\n¨K"+(n.gHtmlBlocks.push(r)-1)+"K\n\n"}})),i.subParser("hashHTMLBlocks",(function(e,t,n){"use strict";e=n.converter._dispatch("hashHTMLBlocks.before",e,t,n);var r=["pre","div","h1","h2","h3","h4","h5","h6","blockquote","table","dl","ol","ul","script","noscript","form","fieldset","iframe","math","style","section","header","footer","nav","article","aside","address","audio","canvas","figure","hgroup","output","video","p"],o=function(e,t,r,o){var i=e;return-1!==r.search(/\bmarkdown\b/)&&(i=r+n.converter.makeHtml(t)+o),"\n\n¨K"+(n.gHtmlBlocks.push(i)-1)+"K\n\n"};t.backslashEscapesHTMLTags&&(e=e.replace(/\\<(\/?[^>]+?)>/g,(function(e,t){return"<"+t+">"})));for(var a=0;a<r.length;++a)for(var l,s=new RegExp("^ {0,3}(<"+r[a]+"\\b[^>]*>)","im"),c="<"+r[a]+"\\b[^>]*>",u="</"+r[a]+">";-1!==(l=i.helper.regexIndexOf(e,s));){var d=i.helper.splitAtIndex(e,l),p=i.helper.replaceRecursiveRegExp(d[1],o,c,u,"im");if(p===d[1])break;e=d[0].concat(p)}return e=e.replace(/(\n {0,3}(<(hr)\b([^<>])*?\/?>)[ \t]*(?=\n{2,}))/g,i.subParser("hashElement")(e,t,n)),e=(e=i.helper.replaceRecursiveRegExp(e,(function(e){return"\n\n¨K"+(n.gHtmlBlocks.push(e)-1)+"K\n\n"}),"^ {0,3}\x3c!--","--\x3e","gm")).replace(/(?:\n\n)( {0,3}(?:<([?%])[^\r]*?\2>)[ \t]*(?=\n{2,}))/g,i.subParser("hashElement")(e,t,n)),n.converter._dispatch("hashHTMLBlocks.after",e,t,n)})),i.subParser("hashHTMLSpans",(function(e,t,n){"use strict";function r(e){return"¨C"+(n.gHtmlSpans.push(e)-1)+"C"}return e=(e=(e=(e=(e=n.converter._dispatch("hashHTMLSpans.before",e,t,n)).replace(/<[^>]+?\/>/gi,(function(e){return r(e)}))).replace(/<([^>]+?)>[\s\S]*?<\/\1>/g,(function(e){return r(e)}))).replace(/<([^>]+?)\s[^>]+?>[\s\S]*?<\/\1>/g,(function(e){return r(e)}))).replace(/<[^>]+?>/gi,(function(e){return r(e)})),n.converter._dispatch("hashHTMLSpans.after",e,t,n)})),i.subParser("unhashHTMLSpans",(function(e,t,n){"use strict";e=n.converter._dispatch("unhashHTMLSpans.before",e,t,n);for(var r=0;r<n.gHtmlSpans.length;++r){for(var o=n.gHtmlSpans[r],i=0;/¨C(\d+)C/.test(o);){var a=RegExp.$1;if(o=o.replace("¨C"+a+"C",n.gHtmlSpans[a]),10===i){console.error("maximum nesting of 10 spans reached!!!");break}++i}e=e.replace("¨C"+r+"C",o)}return n.converter._dispatch("unhashHTMLSpans.after",e,t,n)})),i.subParser("hashPreCodeTags",(function(e,t,n){"use strict";return e=n.converter._dispatch("hashPreCodeTags.before",e,t,n),e=i.helper.replaceRecursiveRegExp(e,(function(e,r,o,a){var l=o+i.subParser("encodeCode")(r,t,n)+a;return"\n\n¨G"+(n.ghCodeBlocks.push({text:e,codeblock:l})-1)+"G\n\n"}),"^ {0,3}<pre\\b[^>]*>\\s*<code\\b[^>]*>","^ {0,3}</code>\\s*</pre>","gim"),n.converter._dispatch("hashPreCodeTags.after",e,t,n)})),i.subParser("headers",(function(e,t,n){"use strict";e=n.converter._dispatch("headers.before",e,t,n);var r=isNaN(parseInt(t.headerLevelStart))?1:parseInt(t.headerLevelStart),o=t.smoothLivePreview?/^(.+)[ \t]*\n={2,}[ \t]*\n+/gm:/^(.+)[ \t]*\n=+[ \t]*\n+/gm,a=t.smoothLivePreview?/^(.+)[ \t]*\n-{2,}[ \t]*\n+/gm:/^(.+)[ \t]*\n-+[ \t]*\n+/gm;e=(e=e.replace(o,(function(e,o){var a=i.subParser("spanGamut")(o,t,n),l=t.noHeaderId?"":' id="'+s(o)+'"',c="<h"+r+l+">"+a+"</h"+r+">";return i.subParser("hashBlock")(c,t,n)}))).replace(a,(function(e,o){var a=i.subParser("spanGamut")(o,t,n),l=t.noHeaderId?"":' id="'+s(o)+'"',c=r+1,u="<h"+c+l+">"+a+"</h"+c+">";return i.subParser("hashBlock")(u,t,n)}));var l=t.requireSpaceBeforeHeadingText?/^(#{1,6})[ \t]+(.+?)[ \t]*#*\n+/gm:/^(#{1,6})[ \t]*(.+?)[ \t]*#*\n+/gm;function s(e){var r,o;if(t.customizedHeaderId){var a=e.match(/\{([^{]+?)}\s*$/);a&&a[1]&&(e=a[1])}return r=e,o=i.helper.isString(t.prefixHeaderId)?t.prefixHeaderId:!0===t.prefixHeaderId?"section-":"",t.rawPrefixHeaderId||(r=o+r),r=t.ghCompatibleHeaderId?r.replace(/ /g,"-").replace(/&/g,"").replace(/¨T/g,"").replace(/¨D/g,"").replace(/[&+$,\/:;=?@"#{}|^¨~\[\]`\\*)(%.!'<>]/g,"").toLowerCase():t.rawHeaderId?r.replace(/ /g,"-").replace(/&/g,"&").replace(/¨T/g,"¨").replace(/¨D/g,"$").replace(/["']/g,"-").toLowerCase():r.replace(/[^\w]/g,"").toLowerCase(),t.rawPrefixHeaderId&&(r=o+r),n.hashLinkCounts[r]?r=r+"-"+n.hashLinkCounts[r]++:n.hashLinkCounts[r]=1,r}return e=e.replace(l,(function(e,o,a){var l=a;t.customizedHeaderId&&(l=a.replace(/\s?\{([^{]+?)}\s*$/,""));var c=i.subParser("spanGamut")(l,t,n),u=t.noHeaderId?"":' id="'+s(a)+'"',d=r-1+o.length,p="<h"+d+u+">"+c+"</h"+d+">";return i.subParser("hashBlock")(p,t,n)})),n.converter._dispatch("headers.after",e,t,n)})),i.subParser("horizontalRule",(function(e,t,n){"use strict";e=n.converter._dispatch("horizontalRule.before",e,t,n);var r=i.subParser("hashBlock")("<hr />",t,n);return e=(e=(e=e.replace(/^ {0,2}( ?-){3,}[ \t]*$/gm,r)).replace(/^ {0,2}( ?\*){3,}[ \t]*$/gm,r)).replace(/^ {0,2}( ?_){3,}[ \t]*$/gm,r),n.converter._dispatch("horizontalRule.after",e,t,n)})),i.subParser("images",(function(e,t,n){"use strict";function r(e,t,r,o,a,l,s,c){var u=n.gUrls,d=n.gTitles,p=n.gDimensions;if(r=r.toLowerCase(),c||(c=""),e.search(/\(<?\s*>? ?(['"].*['"])?\)$/m)>-1)o="";else if(""===o||null===o){if(""!==r&&null!==r||(r=t.toLowerCase().replace(/ ?\n/g," ")),o="#"+r,i.helper.isUndefined(u[r]))return e;o=u[r],i.helper.isUndefined(d[r])||(c=d[r]),i.helper.isUndefined(p[r])||(a=p[r].width,l=p[r].height)}t=t.replace(/"/g,""").replace(i.helper.regexes.asteriskDashAndColon,i.helper.escapeCharactersCallback);var m='<img src="'+(o=o.replace(i.helper.regexes.asteriskDashAndColon,i.helper.escapeCharactersCallback))+'" alt="'+t+'"';return c&&i.helper.isString(c)&&(m+=' title="'+(c=c.replace(/"/g,""").replace(i.helper.regexes.asteriskDashAndColon,i.helper.escapeCharactersCallback))+'"'),a&&l&&(m+=' width="'+(a="*"===a?"auto":a)+'"',m+=' height="'+(l="*"===l?"auto":l)+'"'),m+" />"}return e=(e=(e=(e=(e=(e=n.converter._dispatch("images.before",e,t,n)).replace(/!\[([^\]]*?)] ?(?:\n *)?\[([\s\S]*?)]()()()()()/g,r)).replace(/!\[([^\]]*?)][ \t]*()\([ \t]?<?(data:.+?\/.+?;base64,[A-Za-z0-9+/=\n]+?)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(["'])([^"]*?)\6)?[ \t]?\)/g,(function(e,t,n,o,i,a,l,s){return r(e,t,n,o=o.replace(/\s/g,""),i,a,0,s)}))).replace(/!\[([^\]]*?)][ \t]*()\([ \t]?<([^>]*)>(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(?:(["'])([^"]*?)\6))?[ \t]?\)/g,r)).replace(/!\[([^\]]*?)][ \t]*()\([ \t]?<?([\S]+?(?:\([\S]*?\)[\S]*?)?)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(["'])([^"]*?)\6)?[ \t]?\)/g,r)).replace(/!\[([^\[\]]+)]()()()()()/g,r),n.converter._dispatch("images.after",e,t,n)})),i.subParser("italicsAndBold",(function(e,t,n){"use strict";function r(e,t,n){return t+e+n}return e=n.converter._dispatch("italicsAndBold.before",e,t,n),e=t.literalMidWordUnderscores?(e=(e=e.replace(/\b___(\S[\s\S]*?)___\b/g,(function(e,t){return r(t,"<strong><em>","</em></strong>")}))).replace(/\b__(\S[\s\S]*?)__\b/g,(function(e,t){return r(t,"<strong>","</strong>")}))).replace(/\b_(\S[\s\S]*?)_\b/g,(function(e,t){return r(t,"<em>","</em>")})):(e=(e=e.replace(/___(\S[\s\S]*?)___/g,(function(e,t){return/\S$/.test(t)?r(t,"<strong><em>","</em></strong>"):e}))).replace(/__(\S[\s\S]*?)__/g,(function(e,t){return/\S$/.test(t)?r(t,"<strong>","</strong>"):e}))).replace(/_([^\s_][\s\S]*?)_/g,(function(e,t){return/\S$/.test(t)?r(t,"<em>","</em>"):e})),e=t.literalMidWordAsterisks?(e=(e=e.replace(/([^*]|^)\B\*\*\*(\S[\s\S]*?)\*\*\*\B(?!\*)/g,(function(e,t,n){return r(n,t+"<strong><em>","</em></strong>")}))).replace(/([^*]|^)\B\*\*(\S[\s\S]*?)\*\*\B(?!\*)/g,(function(e,t,n){return r(n,t+"<strong>","</strong>")}))).replace(/([^*]|^)\B\*(\S[\s\S]*?)\*\B(?!\*)/g,(function(e,t,n){return r(n,t+"<em>","</em>")})):(e=(e=e.replace(/\*\*\*(\S[\s\S]*?)\*\*\*/g,(function(e,t){return/\S$/.test(t)?r(t,"<strong><em>","</em></strong>"):e}))).replace(/\*\*(\S[\s\S]*?)\*\*/g,(function(e,t){return/\S$/.test(t)?r(t,"<strong>","</strong>"):e}))).replace(/\*([^\s*][\s\S]*?)\*/g,(function(e,t){return/\S$/.test(t)?r(t,"<em>","</em>"):e})),n.converter._dispatch("italicsAndBold.after",e,t,n)})),i.subParser("lists",(function(e,t,n){"use strict";function r(e,r){n.gListLevel++,e=e.replace(/\n{2,}$/,"\n");var o=/(\n)?(^ {0,3})([*+-]|\d+[.])[ \t]+((\[(x|X| )?])?[ \t]*[^\r]+?(\n{1,2}))(?=\n*(¨0| {0,3}([*+-]|\d+[.])[ \t]+))/gm,a=/\n[ \t]*\n(?!¨0)/.test(e+="¨0");return t.disableForced4SpacesIndentedSublists&&(o=/(\n)?(^ {0,3})([*+-]|\d+[.])[ \t]+((\[(x|X| )?])?[ \t]*[^\r]+?(\n{1,2}))(?=\n*(¨0|\2([*+-]|\d+[.])[ \t]+))/gm),e=(e=e.replace(o,(function(e,r,o,l,s,c,u){u=u&&""!==u.trim();var d=i.subParser("outdent")(s,t,n),p="";return c&&t.tasklists&&(p=' class="task-list-item" style="list-style-type: none;"',d=d.replace(/^[ \t]*\[(x|X| )?]/m,(function(){var e='<input type="checkbox" disabled style="margin: 0px 0.35em 0.25em -1.6em; vertical-align: middle;"';return u&&(e+=" checked"),e+">"}))),d=d.replace(/^([-*+]|\d\.)[ \t]+[\S\n ]*/g,(function(e){return"¨A"+e})),r||d.search(/\n{2,}/)>-1?(d=i.subParser("githubCodeBlocks")(d,t,n),d=i.subParser("blockGamut")(d,t,n)):(d=(d=i.subParser("lists")(d,t,n)).replace(/\n$/,""),d=(d=i.subParser("hashHTMLBlocks")(d,t,n)).replace(/\n\n+/g,"\n\n"),d=a?i.subParser("paragraphs")(d,t,n):i.subParser("spanGamut")(d,t,n)),"<li"+p+">"+(d=d.replace("¨A",""))+"</li>\n"}))).replace(/¨0/g,""),n.gListLevel--,r&&(e=e.replace(/\s+$/,"")),e}function o(e,t){if("ol"===t){var n=e.match(/^ *(\d+)\./);if(n&&"1"!==n[1])return' start="'+n[1]+'"'}return""}function a(e,n,i){var a=t.disableForced4SpacesIndentedSublists?/^ ?\d+\.[ \t]/gm:/^ {0,3}\d+\.[ \t]/gm,l=t.disableForced4SpacesIndentedSublists?/^ ?[*+-][ \t]/gm:/^ {0,3}[*+-][ \t]/gm,s="ul"===n?a:l,c="";if(-1!==e.search(s))!function t(u){var d=u.search(s),p=o(e,n);-1!==d?(c+="\n\n<"+n+p+">\n"+r(u.slice(0,d),!!i)+"</"+n+">\n",s="ul"==(n="ul"===n?"ol":"ul")?a:l,t(u.slice(d))):c+="\n\n<"+n+p+">\n"+r(u,!!i)+"</"+n+">\n"}(e);else{var u=o(e,n);c="\n\n<"+n+u+">\n"+r(e,!!i)+"</"+n+">\n"}return c}return e=n.converter._dispatch("lists.before",e,t,n),e+="¨0",e=(e=n.gListLevel?e.replace(/^(( {0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(¨0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm,(function(e,t,n){return a(t,n.search(/[*+-]/g)>-1?"ul":"ol",!0)})):e.replace(/(\n\n|^\n?)(( {0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(¨0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm,(function(e,t,n,r){return a(n,r.search(/[*+-]/g)>-1?"ul":"ol",!1)}))).replace(/¨0/,""),n.converter._dispatch("lists.after",e,t,n)})),i.subParser("metadata",(function(e,t,n){"use strict";if(!t.metadata)return e;function r(e){n.metadata.raw=e,(e=(e=e.replace(/&/g,"&").replace(/"/g,""")).replace(/\n {4}/g," ")).replace(/^([\S ]+): +([\s\S]+?)$/gm,(function(e,t,r){return n.metadata.parsed[t]=r,""}))}return e=(e=(e=(e=n.converter._dispatch("metadata.before",e,t,n)).replace(/^\s*«««+(\S*?)\n([\s\S]+?)\n»»»+\n/,(function(e,t,n){return r(n),"¨M"}))).replace(/^\s*---+(\S*?)\n([\s\S]+?)\n---+\n/,(function(e,t,o){return t&&(n.metadata.format=t),r(o),"¨M"}))).replace(/¨M/g,""),n.converter._dispatch("metadata.after",e,t,n)})),i.subParser("outdent",(function(e,t,n){"use strict";return e=(e=(e=n.converter._dispatch("outdent.before",e,t,n)).replace(/^(\t|[ ]{1,4})/gm,"¨0")).replace(/¨0/g,""),n.converter._dispatch("outdent.after",e,t,n)})),i.subParser("paragraphs",(function(e,t,n){"use strict";for(var r=(e=(e=(e=n.converter._dispatch("paragraphs.before",e,t,n)).replace(/^\n+/g,"")).replace(/\n+$/g,"")).split(/\n{2,}/g),o=[],a=r.length,l=0;l<a;l++){var s=r[l];s.search(/¨(K|G)(\d+)\1/g)>=0?o.push(s):s.search(/\S/)>=0&&(s=(s=i.subParser("spanGamut")(s,t,n)).replace(/^([ \t]*)/g,"<p>"),s+="</p>",o.push(s))}for(a=o.length,l=0;l<a;l++){for(var c="",u=o[l],d=!1;/¨(K|G)(\d+)\1/.test(u);){var p=RegExp.$1,m=RegExp.$2;c=(c="K"===p?n.gHtmlBlocks[m]:d?i.subParser("encodeCode")(n.ghCodeBlocks[m].text,t,n):n.ghCodeBlocks[m].codeblock).replace(/\$/g,"$$$$"),u=u.replace(/(\n\n)?¨(K|G)\d+\2(\n\n)?/,c),/^<pre\b[^>]*>\s*<code\b[^>]*>/.test(u)&&(d=!0)}o[l]=u}return e=(e=(e=o.join("\n")).replace(/^\n+/g,"")).replace(/\n+$/g,""),n.converter._dispatch("paragraphs.after",e,t,n)})),i.subParser("runExtension",(function(e,t,n,r){"use strict";if(e.filter)t=e.filter(t,r.converter,n);else if(e.regex){var o=e.regex;o instanceof RegExp||(o=new RegExp(o,"g")),t=t.replace(o,e.replace)}return t})),i.subParser("spanGamut",(function(e,t,n){"use strict";return e=n.converter._dispatch("spanGamut.before",e,t,n),e=i.subParser("codeSpans")(e,t,n),e=i.subParser("escapeSpecialCharsWithinTagAttributes")(e,t,n),e=i.subParser("encodeBackslashEscapes")(e,t,n),e=i.subParser("images")(e,t,n),e=i.subParser("anchors")(e,t,n),e=i.subParser("autoLinks")(e,t,n),e=i.subParser("simplifiedAutoLinks")(e,t,n),e=i.subParser("emoji")(e,t,n),e=i.subParser("underline")(e,t,n),e=i.subParser("italicsAndBold")(e,t,n),e=i.subParser("strikethrough")(e,t,n),e=i.subParser("ellipsis")(e,t,n),e=i.subParser("hashHTMLSpans")(e,t,n),e=i.subParser("encodeAmpsAndAngles")(e,t,n),t.simpleLineBreaks?/\n\n¨K/.test(e)||(e=e.replace(/\n+/g,"<br />\n")):e=e.replace(/ +\n/g,"<br />\n"),n.converter._dispatch("spanGamut.after",e,t,n)})),i.subParser("strikethrough",(function(e,t,n){"use strict";return t.strikethrough&&(e=(e=n.converter._dispatch("strikethrough.before",e,t,n)).replace(/(?:~){2}([\s\S]+?)(?:~){2}/g,(function(e,r){return function(e){return t.simplifiedAutoLink&&(e=i.subParser("simplifiedAutoLinks")(e,t,n)),"<del>"+e+"</del>"}(r)})),e=n.converter._dispatch("strikethrough.after",e,t,n)),e})),i.subParser("stripLinkDefinitions",(function(e,t,n){"use strict";var r=function(e,r,o,a,l,s,c){return r=r.toLowerCase(),o.match(/^data:.+?\/.+?;base64,/)?n.gUrls[r]=o.replace(/\s/g,""):n.gUrls[r]=i.subParser("encodeAmpsAndAngles")(o,t,n),s?s+c:(c&&(n.gTitles[r]=c.replace(/"|'/g,""")),t.parseImgDimensions&&a&&l&&(n.gDimensions[r]={width:a,height:l}),"")};return(e=(e=(e+="¨0").replace(/^ {0,3}\[(.+)]:[ \t]*\n?[ \t]*<?(data:.+?\/.+?;base64,[A-Za-z0-9+/=\n]+?)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*\n?[ \t]*(?:(\n*)["|'(](.+?)["|')][ \t]*)?(?:\n\n|(?=¨0)|(?=\n\[))/gm,r)).replace(/^ {0,3}\[(.+)]:[ \t]*\n?[ \t]*<?([^>\s]+)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*\n?[ \t]*(?:(\n*)["|'(](.+?)["|')][ \t]*)?(?:\n+|(?=¨0))/gm,r)).replace(/¨0/,"")})),i.subParser("tables",(function(e,t,n){"use strict";if(!t.tables)return e;function r(e,r){return"<td"+r+">"+i.subParser("spanGamut")(e,t,n)+"</td>\n"}function o(e){var o,a=e.split("\n");for(o=0;o<a.length;++o)/^ {0,3}\|/.test(a[o])&&(a[o]=a[o].replace(/^ {0,3}\|/,"")),/\|[ \t]*$/.test(a[o])&&(a[o]=a[o].replace(/\|[ \t]*$/,"")),a[o]=i.subParser("codeSpans")(a[o],t,n);var l,s,c,u,d=a[0].split("|").map((function(e){return e.trim()})),p=a[1].split("|").map((function(e){return e.trim()})),m=[],f=[],h=[],g=[];for(a.shift(),a.shift(),o=0;o<a.length;++o)""!==a[o].trim()&&m.push(a[o].split("|").map((function(e){return e.trim()})));if(d.length<p.length)return e;for(o=0;o<p.length;++o)h.push((l=p[o],/^:[ \t]*--*$/.test(l)?' style="text-align:left;"':/^--*[ \t]*:[ \t]*$/.test(l)?' style="text-align:right;"':/^:[ \t]*--*[ \t]*:$/.test(l)?' style="text-align:center;"':""));for(o=0;o<d.length;++o)i.helper.isUndefined(h[o])&&(h[o]=""),f.push((s=d[o],c=h[o],u=void 0,u="",s=s.trim(),(t.tablesHeaderId||t.tableHeaderId)&&(u=' id="'+s.replace(/ /g,"_").toLowerCase()+'"'),"<th"+u+c+">"+(s=i.subParser("spanGamut")(s,t,n))+"</th>\n"));for(o=0;o<m.length;++o){for(var v=[],b=0;b<f.length;++b)i.helper.isUndefined(m[o][b]),v.push(r(m[o][b],h[b]));g.push(v)}return function(e,t){for(var n="<table>\n<thead>\n<tr>\n",r=e.length,o=0;o<r;++o)n+=e[o];for(n+="</tr>\n</thead>\n<tbody>\n",o=0;o<t.length;++o){n+="<tr>\n";for(var i=0;i<r;++i)n+=t[o][i];n+="</tr>\n"}return n+"</tbody>\n</table>\n"}(f,g)}return e=(e=(e=(e=n.converter._dispatch("tables.before",e,t,n)).replace(/\\(\|)/g,i.helper.escapeCharactersCallback)).replace(/^ {0,3}\|?.+\|.+\n {0,3}\|?[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[ \t]*\|[ \t]*:?[ \t]*(?:[-=]){2,}[\s\S]+?(?:\n\n|¨0)/gm,o)).replace(/^ {0,3}\|.+\|[ \t]*\n {0,3}\|[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[ \t]*\|[ \t]*\n( {0,3}\|.+\|[ \t]*\n)*(?:\n|¨0)/gm,o),n.converter._dispatch("tables.after",e,t,n)})),i.subParser("underline",(function(e,t,n){"use strict";return t.underline?(e=n.converter._dispatch("underline.before",e,t,n),e=(e=t.literalMidWordUnderscores?(e=e.replace(/\b___(\S[\s\S]*?)___\b/g,(function(e,t){return"<u>"+t+"</u>"}))).replace(/\b__(\S[\s\S]*?)__\b/g,(function(e,t){return"<u>"+t+"</u>"})):(e=e.replace(/___(\S[\s\S]*?)___/g,(function(e,t){return/\S$/.test(t)?"<u>"+t+"</u>":e}))).replace(/__(\S[\s\S]*?)__/g,(function(e,t){return/\S$/.test(t)?"<u>"+t+"</u>":e}))).replace(/(_)/g,i.helper.escapeCharactersCallback),e=n.converter._dispatch("underline.after",e,t,n)):e})),i.subParser("unescapeSpecialChars",(function(e,t,n){"use strict";return e=(e=n.converter._dispatch("unescapeSpecialChars.before",e,t,n)).replace(/¨E(\d+)E/g,(function(e,t){var n=parseInt(t);return String.fromCharCode(n)})),n.converter._dispatch("unescapeSpecialChars.after",e,t,n)})),i.subParser("makeMarkdown.blockquote",(function(e,t){"use strict";var n="";if(e.hasChildNodes())for(var r=e.childNodes,o=r.length,a=0;a<o;++a){var l=i.subParser("makeMarkdown.node")(r[a],t);""!==l&&(n+=l)}return"> "+(n=n.trim()).split("\n").join("\n> ")})),i.subParser("makeMarkdown.codeBlock",(function(e,t){"use strict";var n=e.getAttribute("language"),r=e.getAttribute("precodenum");return"```"+n+"\n"+t.preList[r]+"\n```"})),i.subParser("makeMarkdown.codeSpan",(function(e){"use strict";return"`"+e.innerHTML+"`"})),i.subParser("makeMarkdown.emphasis",(function(e,t){"use strict";var n="";if(e.hasChildNodes()){n+="*";for(var r=e.childNodes,o=r.length,a=0;a<o;++a)n+=i.subParser("makeMarkdown.node")(r[a],t);n+="*"}return n})),i.subParser("makeMarkdown.header",(function(e,t,n){"use strict";var r=new Array(n+1).join("#"),o="";if(e.hasChildNodes()){o=r+" ";for(var a=e.childNodes,l=a.length,s=0;s<l;++s)o+=i.subParser("makeMarkdown.node")(a[s],t)}return o})),i.subParser("makeMarkdown.hr",(function(){"use strict";return"---"})),i.subParser("makeMarkdown.image",(function(e){"use strict";var t="";return e.hasAttribute("src")&&(t+="+">",e.hasAttribute("width")&&e.hasAttribute("height")&&(t+=" ="+e.getAttribute("width")+"x"+e.getAttribute("height")),e.hasAttribute("title")&&(t+=' "'+e.getAttribute("title")+'"'),t+=")"),t})),i.subParser("makeMarkdown.links",(function(e,t){"use strict";var n="";if(e.hasChildNodes()&&e.hasAttribute("href")){var r=e.childNodes,o=r.length;n="[";for(var a=0;a<o;++a)n+=i.subParser("makeMarkdown.node")(r[a],t);n+="](",n+="<"+e.getAttribute("href")+">",e.hasAttribute("title")&&(n+=' "'+e.getAttribute("title")+'"'),n+=")"}return n})),i.subParser("makeMarkdown.list",(function(e,t,n){"use strict";var r="";if(!e.hasChildNodes())return"";for(var o=e.childNodes,a=o.length,l=e.getAttribute("start")||1,s=0;s<a;++s)void 0!==o[s].tagName&&"li"===o[s].tagName.toLowerCase()&&(r+=("ol"===n?l.toString()+". ":"- ")+i.subParser("makeMarkdown.listItem")(o[s],t),++l);return(r+="\n\x3c!-- --\x3e\n").trim()})),i.subParser("makeMarkdown.listItem",(function(e,t){"use strict";for(var n="",r=e.childNodes,o=r.length,a=0;a<o;++a)n+=i.subParser("makeMarkdown.node")(r[a],t);return/\n$/.test(n)?n=n.split("\n").join("\n ").replace(/^ {4}$/gm,"").replace(/\n\n+/g,"\n\n"):n+="\n",n})),i.subParser("makeMarkdown.node",(function(e,t,n){"use strict";n=n||!1;var r="";if(3===e.nodeType)return i.subParser("makeMarkdown.txt")(e,t);if(8===e.nodeType)return"\x3c!--"+e.data+"--\x3e\n\n";if(1!==e.nodeType)return"";switch(e.tagName.toLowerCase()){case"h1":n||(r=i.subParser("makeMarkdown.header")(e,t,1)+"\n\n");break;case"h2":n||(r=i.subParser("makeMarkdown.header")(e,t,2)+"\n\n");break;case"h3":n||(r=i.subParser("makeMarkdown.header")(e,t,3)+"\n\n");break;case"h4":n||(r=i.subParser("makeMarkdown.header")(e,t,4)+"\n\n");break;case"h5":n||(r=i.subParser("makeMarkdown.header")(e,t,5)+"\n\n");break;case"h6":n||(r=i.subParser("makeMarkdown.header")(e,t,6)+"\n\n");break;case"p":n||(r=i.subParser("makeMarkdown.paragraph")(e,t)+"\n\n");break;case"blockquote":n||(r=i.subParser("makeMarkdown.blockquote")(e,t)+"\n\n");break;case"hr":n||(r=i.subParser("makeMarkdown.hr")(e,t)+"\n\n");break;case"ol":n||(r=i.subParser("makeMarkdown.list")(e,t,"ol")+"\n\n");break;case"ul":n||(r=i.subParser("makeMarkdown.list")(e,t,"ul")+"\n\n");break;case"precode":n||(r=i.subParser("makeMarkdown.codeBlock")(e,t)+"\n\n");break;case"pre":n||(r=i.subParser("makeMarkdown.pre")(e,t)+"\n\n");break;case"table":n||(r=i.subParser("makeMarkdown.table")(e,t)+"\n\n");break;case"code":r=i.subParser("makeMarkdown.codeSpan")(e,t);break;case"em":case"i":r=i.subParser("makeMarkdown.emphasis")(e,t);break;case"strong":case"b":r=i.subParser("makeMarkdown.strong")(e,t);break;case"del":r=i.subParser("makeMarkdown.strikethrough")(e,t);break;case"a":r=i.subParser("makeMarkdown.links")(e,t);break;case"img":r=i.subParser("makeMarkdown.image")(e,t);break;default:r=e.outerHTML+"\n\n"}return r})),i.subParser("makeMarkdown.paragraph",(function(e,t){"use strict";var n="";if(e.hasChildNodes())for(var r=e.childNodes,o=r.length,a=0;a<o;++a)n+=i.subParser("makeMarkdown.node")(r[a],t);return n.trim()})),i.subParser("makeMarkdown.pre",(function(e,t){"use strict";var n=e.getAttribute("prenum");return"<pre>"+t.preList[n]+"</pre>"})),i.subParser("makeMarkdown.strikethrough",(function(e,t){"use strict";var n="";if(e.hasChildNodes()){n+="~~";for(var r=e.childNodes,o=r.length,a=0;a<o;++a)n+=i.subParser("makeMarkdown.node")(r[a],t);n+="~~"}return n})),i.subParser("makeMarkdown.strong",(function(e,t){"use strict";var n="";if(e.hasChildNodes()){n+="**";for(var r=e.childNodes,o=r.length,a=0;a<o;++a)n+=i.subParser("makeMarkdown.node")(r[a],t);n+="**"}return n})),i.subParser("makeMarkdown.table",(function(e,t){"use strict";var n,r,o="",a=[[],[]],l=e.querySelectorAll("thead>tr>th"),s=e.querySelectorAll("tbody>tr");for(n=0;n<l.length;++n){var c=i.subParser("makeMarkdown.tableCell")(l[n],t),u="---";if(l[n].hasAttribute("style"))switch(l[n].getAttribute("style").toLowerCase().replace(/\s/g,"")){case"text-align:left;":u=":---";break;case"text-align:right;":u="---:";break;case"text-align:center;":u=":---:"}a[0][n]=c.trim(),a[1][n]=u}for(n=0;n<s.length;++n){var d=a.push([])-1,p=s[n].getElementsByTagName("td");for(r=0;r<l.length;++r){var m=" ";void 0!==p[r]&&(m=i.subParser("makeMarkdown.tableCell")(p[r],t)),a[d].push(m)}}var f=3;for(n=0;n<a.length;++n)for(r=0;r<a[n].length;++r){var h=a[n][r].length;h>f&&(f=h)}for(n=0;n<a.length;++n){for(r=0;r<a[n].length;++r)1===n?":"===a[n][r].slice(-1)?a[n][r]=i.helper.padEnd(a[n][r].slice(-1),f-1,"-")+":":a[n][r]=i.helper.padEnd(a[n][r],f,"-"):a[n][r]=i.helper.padEnd(a[n][r],f);o+="| "+a[n].join(" | ")+" |\n"}return o.trim()})),i.subParser("makeMarkdown.tableCell",(function(e,t){"use strict";var n="";if(!e.hasChildNodes())return"";for(var r=e.childNodes,o=r.length,a=0;a<o;++a)n+=i.subParser("makeMarkdown.node")(r[a],t,!0);return n.trim()})),i.subParser("makeMarkdown.txt",(function(e){"use strict";var t=e.nodeValue;return t=(t=t.replace(/ +/g," ")).replace(/¨NBSP;/g," "),(t=(t=(t=(t=(t=(t=(t=(t=i.helper.unescapeHTMLEntities(t)).replace(/([*_~|`])/g,"\\$1")).replace(/^(\s*)>/g,"\\$1>")).replace(/^#/gm,"\\#")).replace(/^(\s*)([-=]{3,})(\s*)$/,"$1\\$2$3")).replace(/^( {0,3}\d+)\./gm,"$1\\.")).replace(/^( {0,3})([+-])/gm,"$1\\$2")).replace(/]([\s]*)\(/g,"\\]$1\\(")).replace(/^ {0,3}\[([\S \t]*?)]:/gm,"\\[$1]:")})),void 0===(r=function(){"use strict";return i}.call(t,n,t,e))||(e.exports=r)}).call(this)},78213:function(e,t,n){var r=n(32728),o=Object.prototype.hasOwnProperty,i="undefined"!=typeof Map;function a(){this._array=[],this._set=i?new Map:Object.create(null)}a.fromArray=function(e,t){for(var n=new a,r=0,o=e.length;r<o;r++)n.add(e[r],t);return n},a.prototype.size=function(){return i?this._set.size:Object.getOwnPropertyNames(this._set).length},a.prototype.add=function(e,t){var n=i?e:r.toSetString(e),a=i?this.has(e):o.call(this._set,n),l=this._array.length;a&&!t||this._array.push(e),a||(i?this._set.set(e,l):this._set[n]=l)},a.prototype.has=function(e){if(i)return this._set.has(e);var t=r.toSetString(e);return o.call(this._set,t)},a.prototype.indexOf=function(e){if(i){var t=this._set.get(e);if(t>=0)return t}else{var n=r.toSetString(e);if(o.call(this._set,n))return this._set[n]}throw new Error('"'+e+'" is not in the set.')},a.prototype.at=function(e){if(e>=0&&e<this._array.length)return this._array[e];throw new Error("No element indexed by "+e)},a.prototype.toArray=function(){return this._array.slice()},t.I=a},16400:function(e,t,n){var r=n(67923);t.encode=function(e){var t,n="",o=function(e){return e<0?1+(-e<<1):0+(e<<1)}(e);do{t=31&o,(o>>>=5)>0&&(t|=32),n+=r.encode(t)}while(o>0);return n},t.decode=function(e,t,n){var o,i,a,l,s=e.length,c=0,u=0;do{if(t>=s)throw new Error("Expected more digits in base 64 VLQ value.");if(-1===(i=r.decode(e.charCodeAt(t++))))throw new Error("Invalid base64 digit: "+e.charAt(t-1));o=!!(32&i),c+=(i&=31)<<u,u+=5}while(o);n.value=(l=(a=c)>>1,1==(1&a)?-l:l),n.rest=t}},67923:function(e,t){var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");t.encode=function(e){if(0<=e&&e<n.length)return n[e];throw new TypeError("Must be between 0 and 63: "+e)},t.decode=function(e){return 65<=e&&e<=90?e-65:97<=e&&e<=122?e-97+26:48<=e&&e<=57?e-48+52:43==e?62:47==e?63:-1}},9216:function(e,t){function n(e,r,o,i,a,l){var s=Math.floor((r-e)/2)+e,c=a(o,i[s],!0);return 0===c?s:c>0?r-s>1?n(s,r,o,i,a,l):l==t.LEAST_UPPER_BOUND?r<i.length?r:-1:s:s-e>1?n(e,s,o,i,a,l):l==t.LEAST_UPPER_BOUND?s:e<0?-1:e}t.GREATEST_LOWER_BOUND=1,t.LEAST_UPPER_BOUND=2,t.search=function(e,r,o,i){if(0===r.length)return-1;var a=n(-1,r.length,e,r,o,i||t.GREATEST_LOWER_BOUND);if(a<0)return-1;for(;a-1>=0&&0===o(r[a],r[a-1],!0);)--a;return a}},21188:function(e,t,n){var r=n(32728);function o(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}o.prototype.unsortedForEach=function(e,t){this._array.forEach(e,t)},o.prototype.add=function(e){var t,n,o,i,a,l;n=e,o=(t=this._last).generatedLine,i=n.generatedLine,a=t.generatedColumn,l=n.generatedColumn,i>o||i==o&&l>=a||r.compareByGeneratedPositionsInflated(t,n)<=0?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))},o.prototype.toArray=function(){return this._sorted||(this._array.sort(r.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},t.H=o},22826:function(e,t){function n(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function r(e,t,o,i){if(o<i){var a=o-1;n(e,(u=o,d=i,Math.round(u+Math.random()*(d-u))),i);for(var l=e[i],s=o;s<i;s++)t(e[s],l)<=0&&n(e,a+=1,s);n(e,a+1,s);var c=a+1;r(e,t,o,c-1),r(e,t,c+1,i)}var u,d}t.U=function(e,t){r(e,t,0,e.length-1)}},76771:function(e,t,n){var r=n(32728),o=n(9216),i=n(78213).I,a=n(16400),l=n(22826).U;function s(e,t){var n=e;return"string"==typeof e&&(n=r.parseSourceMapInput(e)),null!=n.sections?new d(n,t):new c(n,t)}function c(e,t){var n=e;"string"==typeof e&&(n=r.parseSourceMapInput(e));var o=r.getArg(n,"version"),a=r.getArg(n,"sources"),l=r.getArg(n,"names",[]),s=r.getArg(n,"sourceRoot",null),c=r.getArg(n,"sourcesContent",null),u=r.getArg(n,"mappings"),d=r.getArg(n,"file",null);if(o!=this._version)throw new Error("Unsupported version: "+o);s&&(s=r.normalize(s)),a=a.map(String).map(r.normalize).map((function(e){return s&&r.isAbsolute(s)&&r.isAbsolute(e)?r.relative(s,e):e})),this._names=i.fromArray(l.map(String),!0),this._sources=i.fromArray(a,!0),this._absoluteSources=this._sources.toArray().map((function(e){return r.computeSourceURL(s,e,t)})),this.sourceRoot=s,this.sourcesContent=c,this._mappings=u,this._sourceMapURL=t,this.file=d}function u(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}function d(e,t){var n=e;"string"==typeof e&&(n=r.parseSourceMapInput(e));var o=r.getArg(n,"version"),a=r.getArg(n,"sections");if(o!=this._version)throw new Error("Unsupported version: "+o);this._sources=new i,this._names=new i;var l={line:-1,column:0};this._sections=a.map((function(e){if(e.url)throw new Error("Support for url field in sections not implemented.");var n=r.getArg(e,"offset"),o=r.getArg(n,"line"),i=r.getArg(n,"column");if(o<l.line||o===l.line&&i<l.column)throw new Error("Section offsets must be ordered and non-overlapping.");return l=n,{generatedOffset:{generatedLine:o+1,generatedColumn:i+1},consumer:new s(r.getArg(e,"map"),t)}}))}s.fromSourceMap=function(e,t){return c.fromSourceMap(e,t)},s.prototype._version=3,s.prototype.__generatedMappings=null,Object.defineProperty(s.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}}),s.prototype.__originalMappings=null,Object.defineProperty(s.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}}),s.prototype._charIsMappingSeparator=function(e,t){var n=e.charAt(t);return";"===n||","===n},s.prototype._parseMappings=function(e,t){throw new Error("Subclasses must implement _parseMappings")},s.GENERATED_ORDER=1,s.ORIGINAL_ORDER=2,s.GREATEST_LOWER_BOUND=1,s.LEAST_UPPER_BOUND=2,s.prototype.eachMapping=function(e,t,n){var o,i=t||null;switch(n||s.GENERATED_ORDER){case s.GENERATED_ORDER:o=this._generatedMappings;break;case s.ORIGINAL_ORDER:o=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var a=this.sourceRoot;o.map((function(e){var t=null===e.source?null:this._sources.at(e.source);return{source:t=r.computeSourceURL(a,t,this._sourceMapURL),generatedLine:e.generatedLine,generatedColumn:e.generatedColumn,originalLine:e.originalLine,originalColumn:e.originalColumn,name:null===e.name?null:this._names.at(e.name)}}),this).forEach(e,i)},s.prototype.allGeneratedPositionsFor=function(e){var t=r.getArg(e,"line"),n={source:r.getArg(e,"source"),originalLine:t,originalColumn:r.getArg(e,"column",0)};if(n.source=this._findSourceIndex(n.source),n.source<0)return[];var i=[],a=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",r.compareByOriginalPositions,o.LEAST_UPPER_BOUND);if(a>=0){var l=this._originalMappings[a];if(void 0===e.column)for(var s=l.originalLine;l&&l.originalLine===s;)i.push({line:r.getArg(l,"generatedLine",null),column:r.getArg(l,"generatedColumn",null),lastColumn:r.getArg(l,"lastGeneratedColumn",null)}),l=this._originalMappings[++a];else for(var c=l.originalColumn;l&&l.originalLine===t&&l.originalColumn==c;)i.push({line:r.getArg(l,"generatedLine",null),column:r.getArg(l,"generatedColumn",null),lastColumn:r.getArg(l,"lastGeneratedColumn",null)}),l=this._originalMappings[++a]}return i},t.SourceMapConsumer=s,c.prototype=Object.create(s.prototype),c.prototype.consumer=s,c.prototype._findSourceIndex=function(e){var t,n=e;if(null!=this.sourceRoot&&(n=r.relative(this.sourceRoot,n)),this._sources.has(n))return this._sources.indexOf(n);for(t=0;t<this._absoluteSources.length;++t)if(this._absoluteSources[t]==e)return t;return-1},c.fromSourceMap=function(e,t){var n=Object.create(c.prototype),o=n._names=i.fromArray(e._names.toArray(),!0),a=n._sources=i.fromArray(e._sources.toArray(),!0);n.sourceRoot=e._sourceRoot,n.sourcesContent=e._generateSourcesContent(n._sources.toArray(),n.sourceRoot),n.file=e._file,n._sourceMapURL=t,n._absoluteSources=n._sources.toArray().map((function(e){return r.computeSourceURL(n.sourceRoot,e,t)}));for(var s=e._mappings.toArray().slice(),d=n.__generatedMappings=[],p=n.__originalMappings=[],m=0,f=s.length;m<f;m++){var h=s[m],g=new u;g.generatedLine=h.generatedLine,g.generatedColumn=h.generatedColumn,h.source&&(g.source=a.indexOf(h.source),g.originalLine=h.originalLine,g.originalColumn=h.originalColumn,h.name&&(g.name=o.indexOf(h.name)),p.push(g)),d.push(g)}return l(n.__originalMappings,r.compareByOriginalPositions),n},c.prototype._version=3,Object.defineProperty(c.prototype,"sources",{get:function(){return this._absoluteSources.slice()}}),c.prototype._parseMappings=function(e,t){for(var n,o,i,s,c,d=1,p=0,m=0,f=0,h=0,g=0,v=e.length,b=0,y={},w={},k=[],E=[];b<v;)if(";"===e.charAt(b))d++,b++,p=0;else if(","===e.charAt(b))b++;else{for((n=new u).generatedLine=d,s=b;s<v&&!this._charIsMappingSeparator(e,s);s++);if(i=y[o=e.slice(b,s)])b+=o.length;else{for(i=[];b<s;)a.decode(e,b,w),c=w.value,b=w.rest,i.push(c);if(2===i.length)throw new Error("Found a source, but no line and column");if(3===i.length)throw new Error("Found a source and line, but no column");y[o]=i}n.generatedColumn=p+i[0],p=n.generatedColumn,i.length>1&&(n.source=h+i[1],h+=i[1],n.originalLine=m+i[2],m=n.originalLine,n.originalLine+=1,n.originalColumn=f+i[3],f=n.originalColumn,i.length>4&&(n.name=g+i[4],g+=i[4])),E.push(n),"number"==typeof n.originalLine&&k.push(n)}l(E,r.compareByGeneratedPositionsDeflated),this.__generatedMappings=E,l(k,r.compareByOriginalPositions),this.__originalMappings=k},c.prototype._findMapping=function(e,t,n,r,i,a){if(e[n]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+e[n]);if(e[r]<0)throw new TypeError("Column must be greater than or equal to 0, got "+e[r]);return o.search(e,t,i,a)},c.prototype.computeColumnSpans=function(){for(var e=0;e<this._generatedMappings.length;++e){var t=this._generatedMappings[e];if(e+1<this._generatedMappings.length){var n=this._generatedMappings[e+1];if(t.generatedLine===n.generatedLine){t.lastGeneratedColumn=n.generatedColumn-1;continue}}t.lastGeneratedColumn=1/0}},c.prototype.originalPositionFor=function(e){var t={generatedLine:r.getArg(e,"line"),generatedColumn:r.getArg(e,"column")},n=this._findMapping(t,this._generatedMappings,"generatedLine","generatedColumn",r.compareByGeneratedPositionsDeflated,r.getArg(e,"bias",s.GREATEST_LOWER_BOUND));if(n>=0){var o=this._generatedMappings[n];if(o.generatedLine===t.generatedLine){var i=r.getArg(o,"source",null);null!==i&&(i=this._sources.at(i),i=r.computeSourceURL(this.sourceRoot,i,this._sourceMapURL));var a=r.getArg(o,"name",null);return null!==a&&(a=this._names.at(a)),{source:i,line:r.getArg(o,"originalLine",null),column:r.getArg(o,"originalColumn",null),name:a}}}return{source:null,line:null,column:null,name:null}},c.prototype.hasContentsOfAllSources=function(){return!!this.sourcesContent&&this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some((function(e){return null==e}))},c.prototype.sourceContentFor=function(e,t){if(!this.sourcesContent)return null;var n=this._findSourceIndex(e);if(n>=0)return this.sourcesContent[n];var o,i=e;if(null!=this.sourceRoot&&(i=r.relative(this.sourceRoot,i)),null!=this.sourceRoot&&(o=r.urlParse(this.sourceRoot))){var a=i.replace(/^file:\/\//,"");if("file"==o.scheme&&this._sources.has(a))return this.sourcesContent[this._sources.indexOf(a)];if((!o.path||"/"==o.path)&&this._sources.has("/"+i))return this.sourcesContent[this._sources.indexOf("/"+i)]}if(t)return null;throw new Error('"'+i+'" is not in the SourceMap.')},c.prototype.generatedPositionFor=function(e){var t=r.getArg(e,"source");if((t=this._findSourceIndex(t))<0)return{line:null,column:null,lastColumn:null};var n={source:t,originalLine:r.getArg(e,"line"),originalColumn:r.getArg(e,"column")},o=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",r.compareByOriginalPositions,r.getArg(e,"bias",s.GREATEST_LOWER_BOUND));if(o>=0){var i=this._originalMappings[o];if(i.source===n.source)return{line:r.getArg(i,"generatedLine",null),column:r.getArg(i,"generatedColumn",null),lastColumn:r.getArg(i,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}},d.prototype=Object.create(s.prototype),d.prototype.constructor=s,d.prototype._version=3,Object.defineProperty(d.prototype,"sources",{get:function(){for(var e=[],t=0;t<this._sections.length;t++)for(var n=0;n<this._sections[t].consumer.sources.length;n++)e.push(this._sections[t].consumer.sources[n]);return e}}),d.prototype.originalPositionFor=function(e){var t={generatedLine:r.getArg(e,"line"),generatedColumn:r.getArg(e,"column")},n=o.search(t,this._sections,(function(e,t){return e.generatedLine-t.generatedOffset.generatedLine||e.generatedColumn-t.generatedOffset.generatedColumn})),i=this._sections[n];return i?i.consumer.originalPositionFor({line:t.generatedLine-(i.generatedOffset.generatedLine-1),column:t.generatedColumn-(i.generatedOffset.generatedLine===t.generatedLine?i.generatedOffset.generatedColumn-1:0),bias:e.bias}):{source:null,line:null,column:null,name:null}},d.prototype.hasContentsOfAllSources=function(){return this._sections.every((function(e){return e.consumer.hasContentsOfAllSources()}))},d.prototype.sourceContentFor=function(e,t){for(var n=0;n<this._sections.length;n++){var r=this._sections[n].consumer.sourceContentFor(e,!0);if(r)return r}if(t)return null;throw new Error('"'+e+'" is not in the SourceMap.')},d.prototype.generatedPositionFor=function(e){for(var t=0;t<this._sections.length;t++){var n=this._sections[t];if(-1!==n.consumer._findSourceIndex(r.getArg(e,"source"))){var o=n.consumer.generatedPositionFor(e);if(o)return{line:o.line+(n.generatedOffset.generatedLine-1),column:o.column+(n.generatedOffset.generatedLine===o.line?n.generatedOffset.generatedColumn-1:0)}}}return{line:null,column:null}},d.prototype._parseMappings=function(e,t){this.__generatedMappings=[],this.__originalMappings=[];for(var n=0;n<this._sections.length;n++)for(var o=this._sections[n],i=o.consumer._generatedMappings,a=0;a<i.length;a++){var s=i[a],c=o.consumer._sources.at(s.source);c=r.computeSourceURL(o.consumer.sourceRoot,c,this._sourceMapURL),this._sources.add(c),c=this._sources.indexOf(c);var u=null;s.name&&(u=o.consumer._names.at(s.name),this._names.add(u),u=this._names.indexOf(u));var d={source:c,generatedLine:s.generatedLine+(o.generatedOffset.generatedLine-1),generatedColumn:s.generatedColumn+(o.generatedOffset.generatedLine===s.generatedLine?o.generatedOffset.generatedColumn-1:0),originalLine:s.originalLine,originalColumn:s.originalColumn,name:u};this.__generatedMappings.push(d),"number"==typeof d.originalLine&&this.__originalMappings.push(d)}l(this.__generatedMappings,r.compareByGeneratedPositionsDeflated),l(this.__originalMappings,r.compareByOriginalPositions)}},34433:function(e,t,n){var r=n(16400),o=n(32728),i=n(78213).I,a=n(21188).H;function l(e){e||(e={}),this._file=o.getArg(e,"file",null),this._sourceRoot=o.getArg(e,"sourceRoot",null),this._skipValidation=o.getArg(e,"skipValidation",!1),this._sources=new i,this._names=new i,this._mappings=new a,this._sourcesContents=null}l.prototype._version=3,l.fromSourceMap=function(e){var t=e.sourceRoot,n=new l({file:e.file,sourceRoot:t});return e.eachMapping((function(e){var r={generated:{line:e.generatedLine,column:e.generatedColumn}};null!=e.source&&(r.source=e.source,null!=t&&(r.source=o.relative(t,r.source)),r.original={line:e.originalLine,column:e.originalColumn},null!=e.name&&(r.name=e.name)),n.addMapping(r)})),e.sources.forEach((function(r){var i=r;null!==t&&(i=o.relative(t,r)),n._sources.has(i)||n._sources.add(i);var a=e.sourceContentFor(r);null!=a&&n.setSourceContent(r,a)})),n},l.prototype.addMapping=function(e){var t=o.getArg(e,"generated"),n=o.getArg(e,"original",null),r=o.getArg(e,"source",null),i=o.getArg(e,"name",null);this._skipValidation||this._validateMapping(t,n,r,i),null!=r&&(r=String(r),this._sources.has(r)||this._sources.add(r)),null!=i&&(i=String(i),this._names.has(i)||this._names.add(i)),this._mappings.add({generatedLine:t.line,generatedColumn:t.column,originalLine:null!=n&&n.line,originalColumn:null!=n&&n.column,source:r,name:i})},l.prototype.setSourceContent=function(e,t){var n=e;null!=this._sourceRoot&&(n=o.relative(this._sourceRoot,n)),null!=t?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[o.toSetString(n)]=t):this._sourcesContents&&(delete this._sourcesContents[o.toSetString(n)],0===Object.keys(this._sourcesContents).length&&(this._sourcesContents=null))},l.prototype.applySourceMap=function(e,t,n){var r=t;if(null==t){if(null==e.file)throw new Error('SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map\'s "file" property. Both were omitted.');r=e.file}var a=this._sourceRoot;null!=a&&(r=o.relative(a,r));var l=new i,s=new i;this._mappings.unsortedForEach((function(t){if(t.source===r&&null!=t.originalLine){var i=e.originalPositionFor({line:t.originalLine,column:t.originalColumn});null!=i.source&&(t.source=i.source,null!=n&&(t.source=o.join(n,t.source)),null!=a&&(t.source=o.relative(a,t.source)),t.originalLine=i.line,t.originalColumn=i.column,null!=i.name&&(t.name=i.name))}var c=t.source;null==c||l.has(c)||l.add(c);var u=t.name;null==u||s.has(u)||s.add(u)}),this),this._sources=l,this._names=s,e.sources.forEach((function(t){var r=e.sourceContentFor(t);null!=r&&(null!=n&&(t=o.join(n,t)),null!=a&&(t=o.relative(a,t)),this.setSourceContent(t,r))}),this)},l.prototype._validateMapping=function(e,t,n,r){if(t&&"number"!=typeof t.line&&"number"!=typeof t.column)throw new Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if((!(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0)||t||n||r)&&!(e&&"line"in e&&"column"in e&&t&&"line"in t&&"column"in t&&e.line>0&&e.column>=0&&t.line>0&&t.column>=0&&n))throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:n,original:t,name:r}))},l.prototype._serializeMappings=function(){for(var e,t,n,i,a=0,l=1,s=0,c=0,u=0,d=0,p="",m=this._mappings.toArray(),f=0,h=m.length;f<h;f++){if(e="",(t=m[f]).generatedLine!==l)for(a=0;t.generatedLine!==l;)e+=";",l++;else if(f>0){if(!o.compareByGeneratedPositionsInflated(t,m[f-1]))continue;e+=","}e+=r.encode(t.generatedColumn-a),a=t.generatedColumn,null!=t.source&&(i=this._sources.indexOf(t.source),e+=r.encode(i-d),d=i,e+=r.encode(t.originalLine-1-c),c=t.originalLine-1,e+=r.encode(t.originalColumn-s),s=t.originalColumn,null!=t.name&&(n=this._names.indexOf(t.name),e+=r.encode(n-u),u=n)),p+=e}return p},l.prototype._generateSourcesContent=function(e,t){return e.map((function(e){if(!this._sourcesContents)return null;null!=t&&(e=o.relative(t,e));var n=o.toSetString(e);return Object.prototype.hasOwnProperty.call(this._sourcesContents,n)?this._sourcesContents[n]:null}),this)},l.prototype.toJSON=function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return null!=this._file&&(e.file=this._file),null!=this._sourceRoot&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e},l.prototype.toString=function(){return JSON.stringify(this.toJSON())},t.SourceMapGenerator=l},17085:function(e,t,n){var r=n(34433).SourceMapGenerator,o=n(32728),i=/(\r?\n)/,a="$$$isSourceNode$$$";function l(e,t,n,r,o){this.children=[],this.sourceContents={},this.line=null==e?null:e,this.column=null==t?null:t,this.source=null==n?null:n,this.name=null==o?null:o,this[a]=!0,null!=r&&this.add(r)}l.fromStringWithSourceMap=function(e,t,n){var r=new l,a=e.split(i),s=0,c=function(){return e()+(e()||"");function e(){return s<a.length?a[s++]:void 0}},u=1,d=0,p=null;return t.eachMapping((function(e){if(null!==p){if(!(u<e.generatedLine)){var t=(n=a[s]||"").substr(0,e.generatedColumn-d);return a[s]=n.substr(e.generatedColumn-d),d=e.generatedColumn,m(p,t),void(p=e)}m(p,c()),u++,d=0}for(;u<e.generatedLine;)r.add(c()),u++;if(d<e.generatedColumn){var n=a[s]||"";r.add(n.substr(0,e.generatedColumn)),a[s]=n.substr(e.generatedColumn),d=e.generatedColumn}p=e}),this),s<a.length&&(p&&m(p,c()),r.add(a.splice(s).join(""))),t.sources.forEach((function(e){var i=t.sourceContentFor(e);null!=i&&(null!=n&&(e=o.join(n,e)),r.setSourceContent(e,i))})),r;function m(e,t){if(null===e||void 0===e.source)r.add(t);else{var i=n?o.join(n,e.source):e.source;r.add(new l(e.originalLine,e.originalColumn,i,t,e.name))}}},l.prototype.add=function(e){if(Array.isArray(e))e.forEach((function(e){this.add(e)}),this);else{if(!e[a]&&"string"!=typeof e)throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);e&&this.children.push(e)}return this},l.prototype.prepend=function(e){if(Array.isArray(e))for(var t=e.length-1;t>=0;t--)this.prepend(e[t]);else{if(!e[a]&&"string"!=typeof e)throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);this.children.unshift(e)}return this},l.prototype.walk=function(e){for(var t,n=0,r=this.children.length;n<r;n++)(t=this.children[n])[a]?t.walk(e):""!==t&&e(t,{source:this.source,line:this.line,column:this.column,name:this.name})},l.prototype.join=function(e){var t,n,r=this.children.length;if(r>0){for(t=[],n=0;n<r-1;n++)t.push(this.children[n]),t.push(e);t.push(this.children[n]),this.children=t}return this},l.prototype.replaceRight=function(e,t){var n=this.children[this.children.length-1];return n[a]?n.replaceRight(e,t):"string"==typeof n?this.children[this.children.length-1]=n.replace(e,t):this.children.push("".replace(e,t)),this},l.prototype.setSourceContent=function(e,t){this.sourceContents[o.toSetString(e)]=t},l.prototype.walkSourceContents=function(e){for(var t=0,n=this.children.length;t<n;t++)this.children[t][a]&&this.children[t].walkSourceContents(e);var r=Object.keys(this.sourceContents);for(t=0,n=r.length;t<n;t++)e(o.fromSetString(r[t]),this.sourceContents[r[t]])},l.prototype.toString=function(){var e="";return this.walk((function(t){e+=t})),e},l.prototype.toStringWithSourceMap=function(e){var t={code:"",line:1,column:0},n=new r(e),o=!1,i=null,a=null,l=null,s=null;return this.walk((function(e,r){t.code+=e,null!==r.source&&null!==r.line&&null!==r.column?(i===r.source&&a===r.line&&l===r.column&&s===r.name||n.addMapping({source:r.source,original:{line:r.line,column:r.column},generated:{line:t.line,column:t.column},name:r.name}),i=r.source,a=r.line,l=r.column,s=r.name,o=!0):o&&(n.addMapping({generated:{line:t.line,column:t.column}}),i=null,o=!1);for(var c=0,u=e.length;c<u;c++)10===e.charCodeAt(c)?(t.line++,t.column=0,c+1===u?(i=null,o=!1):o&&n.addMapping({source:r.source,original:{line:r.line,column:r.column},generated:{line:t.line,column:t.column},name:r.name})):t.column++})),this.walkSourceContents((function(e,t){n.setSourceContent(e,t)})),{code:t.code,map:n}}},32728:function(e,t){t.getArg=function(e,t,n){if(t in e)return e[t];if(3===arguments.length)return n;throw new Error('"'+t+'" is a required argument.')};var n=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,r=/^data:.+\,.+$/;function o(e){var t=e.match(n);return t?{scheme:t[1],auth:t[2],host:t[3],port:t[4],path:t[5]}:null}function i(e){var t="";return e.scheme&&(t+=e.scheme+":"),t+="//",e.auth&&(t+=e.auth+"@"),e.host&&(t+=e.host),e.port&&(t+=":"+e.port),e.path&&(t+=e.path),t}function a(e){var n=e,r=o(e);if(r){if(!r.path)return e;n=r.path}for(var a,l=t.isAbsolute(n),s=n.split(/\/+/),c=0,u=s.length-1;u>=0;u--)"."===(a=s[u])?s.splice(u,1):".."===a?c++:c>0&&(""===a?(s.splice(u+1,c),c=0):(s.splice(u,2),c--));return""===(n=s.join("/"))&&(n=l?"/":"."),r?(r.path=n,i(r)):n}function l(e,t){""===e&&(e="."),""===t&&(t=".");var n=o(t),l=o(e);if(l&&(e=l.path||"/"),n&&!n.scheme)return l&&(n.scheme=l.scheme),i(n);if(n||t.match(r))return t;if(l&&!l.host&&!l.path)return l.host=t,i(l);var s="/"===t.charAt(0)?t:a(e.replace(/\/+$/,"")+"/"+t);return l?(l.path=s,i(l)):s}t.urlParse=o,t.urlGenerate=i,t.normalize=a,t.join=l,t.isAbsolute=function(e){return"/"===e.charAt(0)||n.test(e)},t.relative=function(e,t){""===e&&(e="."),e=e.replace(/\/$/,"");for(var n=0;0!==t.indexOf(e+"/");){var r=e.lastIndexOf("/");if(r<0)return t;if((e=e.slice(0,r)).match(/^([^\/]+:\/)?\/*$/))return t;++n}return Array(n+1).join("../")+t.substr(e.length+1)};var s=!("__proto__"in Object.create(null));function c(e){return e}function u(e){if(!e)return!1;var t=e.length;if(t<9)return!1;if(95!==e.charCodeAt(t-1)||95!==e.charCodeAt(t-2)||111!==e.charCodeAt(t-3)||116!==e.charCodeAt(t-4)||111!==e.charCodeAt(t-5)||114!==e.charCodeAt(t-6)||112!==e.charCodeAt(t-7)||95!==e.charCodeAt(t-8)||95!==e.charCodeAt(t-9))return!1;for(var n=t-10;n>=0;n--)if(36!==e.charCodeAt(n))return!1;return!0}function d(e,t){return e===t?0:null===e?1:null===t?-1:e>t?1:-1}t.toSetString=s?c:function(e){return u(e)?"$"+e:e},t.fromSetString=s?c:function(e){return u(e)?e.slice(1):e},t.compareByOriginalPositions=function(e,t,n){var r=d(e.source,t.source);return 0!==r||0!=(r=e.originalLine-t.originalLine)||0!=(r=e.originalColumn-t.originalColumn)||n||0!=(r=e.generatedColumn-t.generatedColumn)||0!=(r=e.generatedLine-t.generatedLine)?r:d(e.name,t.name)},t.compareByGeneratedPositionsDeflated=function(e,t,n){var r=e.generatedLine-t.generatedLine;return 0!==r||0!=(r=e.generatedColumn-t.generatedColumn)||n||0!==(r=d(e.source,t.source))||0!=(r=e.originalLine-t.originalLine)||0!=(r=e.originalColumn-t.originalColumn)?r:d(e.name,t.name)},t.compareByGeneratedPositionsInflated=function(e,t){var n=e.generatedLine-t.generatedLine;return 0!==n||0!=(n=e.generatedColumn-t.generatedColumn)||0!==(n=d(e.source,t.source))||0!=(n=e.originalLine-t.originalLine)||0!=(n=e.originalColumn-t.originalColumn)?n:d(e.name,t.name)},t.parseSourceMapInput=function(e){return JSON.parse(e.replace(/^\)]}'[^\n]*\n/,""))},t.computeSourceURL=function(e,t,n){if(t=t||"",e&&("/"!==e[e.length-1]&&"/"!==t[0]&&(e+="/"),t=e+t),n){var r=o(n);if(!r)throw new Error("sourceMapURL could not be parsed");if(r.path){var s=r.path.lastIndexOf("/");s>=0&&(r.path=r.path.substring(0,s+1))}t=l(i(r),t)}return a(t)}},49125:function(e,t,n){t.SourceMapGenerator=n(34433).SourceMapGenerator,t.SourceMapConsumer=n(76771).SourceMapConsumer,n(17085)},17621:function(e,t,n){var r;!function(o){var i=/^\s+/,a=/\s+$/,l=0,s=o.round,c=o.min,u=o.max,d=o.random;function p(e,t){if(t=t||{},(e=e||"")instanceof p)return e;if(!(this instanceof p))return new p(e,t);var n=function(e){var t,n,r,l={r:0,g:0,b:0},s=1,d=null,p=null,m=null,f=!1,h=!1;return"string"==typeof e&&(e=function(e){e=e.replace(i,"").replace(a,"").toLowerCase();var t,n=!1;if(A[e])e=A[e],n=!0;else if("transparent"==e)return{r:0,g:0,b:0,a:0,format:"name"};return(t=Z.rgb.exec(e))?{r:t[1],g:t[2],b:t[3]}:(t=Z.rgba.exec(e))?{r:t[1],g:t[2],b:t[3],a:t[4]}:(t=Z.hsl.exec(e))?{h:t[1],s:t[2],l:t[3]}:(t=Z.hsla.exec(e))?{h:t[1],s:t[2],l:t[3],a:t[4]}:(t=Z.hsv.exec(e))?{h:t[1],s:t[2],v:t[3]}:(t=Z.hsva.exec(e))?{h:t[1],s:t[2],v:t[3],a:t[4]}:(t=Z.hex8.exec(e))?{r:D(t[1]),g:D(t[2]),b:D(t[3]),a:z(t[4]),format:n?"name":"hex8"}:(t=Z.hex6.exec(e))?{r:D(t[1]),g:D(t[2]),b:D(t[3]),format:n?"name":"hex"}:(t=Z.hex4.exec(e))?{r:D(t[1]+""+t[1]),g:D(t[2]+""+t[2]),b:D(t[3]+""+t[3]),a:z(t[4]+""+t[4]),format:n?"name":"hex8"}:!!(t=Z.hex3.exec(e))&&{r:D(t[1]+""+t[1]),g:D(t[2]+""+t[2]),b:D(t[3]+""+t[3]),format:n?"name":"hex"}}(e)),"object"==typeof e&&(j(e.r)&&j(e.g)&&j(e.b)?(t=e.r,n=e.g,r=e.b,l={r:255*P(t,255),g:255*P(n,255),b:255*P(r,255)},f=!0,h="%"===String(e.r).substr(-1)?"prgb":"rgb"):j(e.h)&&j(e.s)&&j(e.v)?(d=B(e.s),p=B(e.v),l=function(e,t,n){e=6*P(e,360),t=P(t,100),n=P(n,100);var r=o.floor(e),i=e-r,a=n*(1-t),l=n*(1-i*t),s=n*(1-(1-i)*t),c=r%6;return{r:255*[n,l,a,a,s,n][c],g:255*[s,n,n,l,a,a][c],b:255*[a,a,s,n,n,l][c]}}(e.h,d,p),f=!0,h="hsv"):j(e.h)&&j(e.s)&&j(e.l)&&(d=B(e.s),m=B(e.l),l=function(e,t,n){var r,o,i;function a(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=P(e,360),t=P(t,100),n=P(n,100),0===t)r=o=i=n;else{var l=n<.5?n*(1+t):n+t-n*t,s=2*n-l;r=a(s,l,e+1/3),o=a(s,l,e),i=a(s,l,e-1/3)}return{r:255*r,g:255*o,b:255*i}}(e.h,d,m),f=!0,h="hsl"),e.hasOwnProperty("a")&&(s=e.a)),s=L(s),{ok:f,format:e.format||h,r:c(255,u(l.r,0)),g:c(255,u(l.g,0)),b:c(255,u(l.b,0)),a:s}}(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=s(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.gradientType,this._r<1&&(this._r=s(this._r)),this._g<1&&(this._g=s(this._g)),this._b<1&&(this._b=s(this._b)),this._ok=n.ok,this._tc_id=l++}function m(e,t,n){e=P(e,255),t=P(t,255),n=P(n,255);var r,o,i=u(e,t,n),a=c(e,t,n),l=(i+a)/2;if(i==a)r=o=0;else{var s=i-a;switch(o=l>.5?s/(2-i-a):s/(i+a),i){case e:r=(t-n)/s+(t<n?6:0);break;case t:r=(n-e)/s+2;break;case n:r=(e-t)/s+4}r/=6}return{h:r,s:o,l:l}}function f(e,t,n){e=P(e,255),t=P(t,255),n=P(n,255);var r,o,i=u(e,t,n),a=c(e,t,n),l=i,s=i-a;if(o=0===i?0:s/i,i==a)r=0;else{switch(i){case e:r=(t-n)/s+(t<n?6:0);break;case t:r=(n-e)/s+2;break;case n:r=(e-t)/s+4}r/=6}return{h:r,s:o,v:l}}function h(e,t,n,r){var o=[M(s(e).toString(16)),M(s(t).toString(16)),M(s(n).toString(16))];return r&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0):o.join("")}function g(e,t,n,r){return[M(F(r)),M(s(e).toString(16)),M(s(t).toString(16)),M(s(n).toString(16))].join("")}function v(e,t){t=0===t?0:t||10;var n=p(e).toHsl();return n.s-=t/100,n.s=O(n.s),p(n)}function b(e,t){t=0===t?0:t||10;var n=p(e).toHsl();return n.s+=t/100,n.s=O(n.s),p(n)}function y(e){return p(e).desaturate(100)}function w(e,t){t=0===t?0:t||10;var n=p(e).toHsl();return n.l+=t/100,n.l=O(n.l),p(n)}function k(e,t){t=0===t?0:t||10;var n=p(e).toRgb();return n.r=u(0,c(255,n.r-s(-t/100*255))),n.g=u(0,c(255,n.g-s(-t/100*255))),n.b=u(0,c(255,n.b-s(-t/100*255))),p(n)}function E(e,t){t=0===t?0:t||10;var n=p(e).toHsl();return n.l-=t/100,n.l=O(n.l),p(n)}function _(e,t){var n=p(e).toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,p(n)}function C(e){var t=p(e).toHsl();return t.h=(t.h+180)%360,p(t)}function x(e){var t=p(e).toHsl(),n=t.h;return[p(e),p({h:(n+120)%360,s:t.s,l:t.l}),p({h:(n+240)%360,s:t.s,l:t.l})]}function S(e){var t=p(e).toHsl(),n=t.h;return[p(e),p({h:(n+90)%360,s:t.s,l:t.l}),p({h:(n+180)%360,s:t.s,l:t.l}),p({h:(n+270)%360,s:t.s,l:t.l})]}function I(e){var t=p(e).toHsl(),n=t.h;return[p(e),p({h:(n+72)%360,s:t.s,l:t.l}),p({h:(n+216)%360,s:t.s,l:t.l})]}function T(e,t,n){t=t||6,n=n||30;var r=p(e).toHsl(),o=360/n,i=[p(e)];for(r.h=(r.h-(o*t>>1)+720)%360;--t;)r.h=(r.h+o)%360,i.push(p(r));return i}function N(e,t){t=t||6;for(var n=p(e).toHsv(),r=n.h,o=n.s,i=n.v,a=[],l=1/t;t--;)a.push(p({h:r,s:o,v:i})),i=(i+l)%1;return a}p.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,r=this.toRgb();return e=r.r/255,t=r.g/255,n=r.b/255,.2126*(e<=.03928?e/12.92:o.pow((e+.055)/1.055,2.4))+.7152*(t<=.03928?t/12.92:o.pow((t+.055)/1.055,2.4))+.0722*(n<=.03928?n/12.92:o.pow((n+.055)/1.055,2.4))},setAlpha:function(e){return this._a=L(e),this._roundA=s(100*this._a)/100,this},toHsv:function(){var e=f(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=f(this._r,this._g,this._b),t=s(360*e.h),n=s(100*e.s),r=s(100*e.v);return 1==this._a?"hsv("+t+", "+n+"%, "+r+"%)":"hsva("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHsl:function(){var e=m(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=m(this._r,this._g,this._b),t=s(360*e.h),n=s(100*e.s),r=s(100*e.l);return 1==this._a?"hsl("+t+", "+n+"%, "+r+"%)":"hsla("+t+", "+n+"%, "+r+"%, "+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,r,o){var i=[M(s(e).toString(16)),M(s(t).toString(16)),M(s(n).toString(16)),M(F(r))];return o&&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)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0)+i[3].charAt(0):i.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:s(this._r),g:s(this._g),b:s(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+s(this._r)+", "+s(this._g)+", "+s(this._b)+")":"rgba("+s(this._r)+", "+s(this._g)+", "+s(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:s(100*P(this._r,255))+"%",g:s(100*P(this._g,255))+"%",b:s(100*P(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+s(100*P(this._r,255))+"%, "+s(100*P(this._g,255))+"%, "+s(100*P(this._b,255))+"%)":"rgba("+s(100*P(this._r,255))+"%, "+s(100*P(this._g,255))+"%, "+s(100*P(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(R[h(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+g(this._r,this._g,this._b,this._a),n=t,r=this._gradientType?"GradientType = 1, ":"";if(e){var o=p(e);n="#"+g(o._r,o._g,o._b,o._a)}return"progid:DXImageTransform.Microsoft.gradient("+r+"startColorstr="+t+",endColorstr="+n+")"},toString:function(e){var t=!!e;e=e||this._format;var n=!1,r=this._a<1&&this._a>=0;return t||!r||"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 p(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(w,arguments)},brighten:function(){return this._applyModification(k,arguments)},darken:function(){return this._applyModification(E,arguments)},desaturate:function(){return this._applyModification(v,arguments)},saturate:function(){return this._applyModification(b,arguments)},greyscale:function(){return this._applyModification(y,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(T,arguments)},complement:function(){return this._applyCombination(C,arguments)},monochromatic:function(){return this._applyCombination(N,arguments)},splitcomplement:function(){return this._applyCombination(I,arguments)},triad:function(){return this._applyCombination(x,arguments)},tetrad:function(){return this._applyCombination(S,arguments)}},p.fromRatio=function(e,t){if("object"==typeof e){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]="a"===r?e[r]:B(e[r]));e=n}return p(e,t)},p.equals=function(e,t){return!(!e||!t)&&p(e).toRgbString()==p(t).toRgbString()},p.random=function(){return p.fromRatio({r:d(),g:d(),b:d()})},p.mix=function(e,t,n){n=0===n?0:n||50;var r=p(e).toRgb(),o=p(t).toRgb(),i=n/100;return p({r:(o.r-r.r)*i+r.r,g:(o.g-r.g)*i+r.g,b:(o.b-r.b)*i+r.b,a:(o.a-r.a)*i+r.a})},p.readability=function(e,t){var n=p(e),r=p(t);return(o.max(n.getLuminance(),r.getLuminance())+.05)/(o.min(n.getLuminance(),r.getLuminance())+.05)},p.isReadable=function(e,t,n){var r,o,i,a,l,s=p.readability(e,t);switch(o=!1,(i=n,"AA"!==(a=((i=i||{level:"AA",size:"small"}).level||"AA").toUpperCase())&&"AAA"!==a&&(a="AA"),"small"!==(l=(i.size||"small").toLowerCase())&&"large"!==l&&(l="small"),r={level:a,size:l}).level+r.size){case"AAsmall":case"AAAlarge":o=s>=4.5;break;case"AAlarge":o=s>=3;break;case"AAAsmall":o=s>=7}return o},p.mostReadable=function(e,t,n){var r,o,i,a,l=null,s=0;o=(n=n||{}).includeFallbackColors,i=n.level,a=n.size;for(var c=0;c<t.length;c++)(r=p.readability(e,t[c]))>s&&(s=r,l=p(t[c]));return p.isReadable(e,l,{level:i,size:a})||!o?l:(n.includeFallbackColors=!1,p.mostReadable(e,["#fff","#000"],n))};var A=p.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"},R=p.hexNames=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}(A);function L(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function P(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=c(t,u(0,parseFloat(e))),n&&(e=parseInt(e*t,10)/100),o.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function O(e){return c(1,u(0,e))}function D(e){return parseInt(e,16)}function M(e){return 1==e.length?"0"+e:""+e}function B(e){return e<=1&&(e=100*e+"%"),e}function F(e){return o.round(255*parseFloat(e)).toString(16)}function z(e){return D(e)/255}var H,V,W,Z=(V="[\\s|\\(]+("+(H="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+H+")[,|\\s]+("+H+")\\s*\\)?",W="[\\s|\\(]+("+H+")[,|\\s]+("+H+")[,|\\s]+("+H+")[,|\\s]+("+H+")\\s*\\)?",{CSS_UNIT:new RegExp(H),rgb:new RegExp("rgb"+V),rgba:new RegExp("rgba"+W),hsl:new RegExp("hsl"+V),hsla:new RegExp("hsla"+W),hsv:new RegExp("hsv"+V),hsva:new RegExp("hsva"+W),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 j(e){return!!Z.CSS_UNIT.exec(e)}e.exports?e.exports=p:void 0===(r=function(){return p}.call(t,n,t,e))||(e.exports=r)}(Math)},13692:function(e){var t=e.exports=function(e){return new n(e)};function n(e){this.value=e}function r(e,t,n){var r=[],a=[],u=!0;return function e(d){var p=n?o(d):d,m={},f=!0,h={node:p,node_:d,path:[].concat(r),parent:a[a.length-1],parents:a,key:r.slice(-1)[0],isRoot:0===r.length,level:r.length,circular:null,update:function(e,t){h.isRoot||(h.parent.node[h.key]=e),h.node=e,t&&(f=!1)},delete:function(e){delete h.parent.node[h.key],e&&(f=!1)},remove:function(e){l(h.parent.node)?h.parent.node.splice(h.key,1):delete h.parent.node[h.key],e&&(f=!1)},keys:null,before:function(e){m.before=e},after:function(e){m.after=e},pre:function(e){m.pre=e},post:function(e){m.post=e},stop:function(){u=!1},block:function(){f=!1}};if(!u)return h;function g(){if("object"==typeof h.node&&null!==h.node){h.keys&&h.node_===h.node||(h.keys=i(h.node)),h.isLeaf=0==h.keys.length;for(var e=0;e<a.length;e++)if(a[e].node_===d){h.circular=a[e];break}}else h.isLeaf=!0,h.keys=null;h.notLeaf=!h.isLeaf,h.notRoot=!h.isRoot}g();var v=t.call(h,h.node);return void 0!==v&&h.update&&h.update(v),m.before&&m.before.call(h,h.node),f?("object"!=typeof h.node||null===h.node||h.circular||(a.push(h),g(),s(h.keys,(function(t,o){r.push(t),m.pre&&m.pre.call(h,h.node[t],t);var i=e(h.node[t]);n&&c.call(h.node,t)&&(h.node[t]=i.node),i.isLast=o==h.keys.length-1,i.isFirst=0==o,m.post&&m.post.call(h,i),r.pop()})),a.pop()),m.after&&m.after.call(h,h.node),h):h}(e).node}function o(e){if("object"==typeof e&&null!==e){var t;if(l(e))t=[];else if("[object Date]"===a(e))t=new Date(e.getTime?e.getTime():e);else if("[object RegExp]"===a(e))t=new RegExp(e);else if(function(e){return"[object Error]"===a(e)}(e))t={message:e.message};else if(function(e){return"[object Boolean]"===a(e)}(e))t=new Boolean(e);else if(function(e){return"[object Number]"===a(e)}(e))t=new Number(e);else if(function(e){return"[object String]"===a(e)}(e))t=new String(e);else if(Object.create&&Object.getPrototypeOf)t=Object.create(Object.getPrototypeOf(e));else if(e.constructor===Object)t={};else{var n=e.constructor&&e.constructor.prototype||e.__proto__||{},r=function(){};r.prototype=n,t=new r}return s(i(e),(function(n){t[n]=e[n]})),t}return e}n.prototype.get=function(e){for(var t=this.value,n=0;n<e.length;n++){var r=e[n];if(!t||!c.call(t,r)){t=void 0;break}t=t[r]}return t},n.prototype.has=function(e){for(var t=this.value,n=0;n<e.length;n++){var r=e[n];if(!t||!c.call(t,r))return!1;t=t[r]}return!0},n.prototype.set=function(e,t){for(var n=this.value,r=0;r<e.length-1;r++){var o=e[r];c.call(n,o)||(n[o]={}),n=n[o]}return n[e[r]]=t,t},n.prototype.map=function(e){return r(this.value,e,!0)},n.prototype.forEach=function(e){return this.value=r(this.value,e,!1),this.value},n.prototype.reduce=function(e,t){var n=1===arguments.length,r=n?this.value:t;return this.forEach((function(t){this.isRoot&&n||(r=e.call(this,r,t))})),r},n.prototype.paths=function(){var e=[];return this.forEach((function(t){e.push(this.path)})),e},n.prototype.nodes=function(){var e=[];return this.forEach((function(t){e.push(this.node)})),e},n.prototype.clone=function(){var e=[],t=[];return function n(r){for(var a=0;a<e.length;a++)if(e[a]===r)return t[a];if("object"==typeof r&&null!==r){var l=o(r);return e.push(r),t.push(l),s(i(r),(function(e){l[e]=n(r[e])})),e.pop(),t.pop(),l}return r}(this.value)};var i=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};function a(e){return Object.prototype.toString.call(e)}var l=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},s=function(e,t){if(e.forEach)return e.forEach(t);for(var n=0;n<e.length;n++)t(e[n],n,e)};s(i(n.prototype),(function(e){t[e]=function(t){var r=[].slice.call(arguments,1),o=new n(t);return o[e].apply(o,r)}}));var c=Object.hasOwnProperty||function(e,t){return t in e}},52511:function(e,t,n){var r;e=n.nmd(e),function(o){t&&t.nodeType,e&&e.nodeType;var i="object"==typeof n.g&&n.g;i.global!==i&&i.window!==i&&i.self;var a,l=2147483647,s=36,c=/^xn--/,u=/[^\x20-\x7E]/,d=/[\x2E\u3002\uFF0E\uFF61]/g,p={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},m=Math.floor,f=String.fromCharCode;function h(e){throw RangeError(p[e])}function g(e,t){for(var n=e.length,r=[];n--;)r[n]=t(e[n]);return r}function v(e,t){var n=e.split("@"),r="";return n.length>1&&(r=n[0]+"@",e=n[1]),r+g((e=e.replace(d,".")).split("."),t).join(".")}function b(e){for(var t,n,r=[],o=0,i=e.length;o<i;)(t=e.charCodeAt(o++))>=55296&&t<=56319&&o<i?56320==(64512&(n=e.charCodeAt(o++)))?r.push(((1023&t)<<10)+(1023&n)+65536):(r.push(t),o--):r.push(t);return r}function y(e){return g(e,(function(e){var t="";return e>65535&&(t+=f((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+f(e)})).join("")}function w(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function k(e,t,n){var r=0;for(e=n?m(e/700):e>>1,e+=m(e/t);e>455;r+=s)e=m(e/35);return m(r+36*e/(e+38))}function E(e){var t,n,r,o,i,a,c,u,d,p,f,g=[],v=e.length,b=0,w=128,E=72;for((n=e.lastIndexOf("-"))<0&&(n=0),r=0;r<n;++r)e.charCodeAt(r)>=128&&h("not-basic"),g.push(e.charCodeAt(r));for(o=n>0?n+1:0;o<v;){for(i=b,a=1,c=s;o>=v&&h("invalid-input"),((u=(f=e.charCodeAt(o++))-48<10?f-22:f-65<26?f-65:f-97<26?f-97:s)>=s||u>m((l-b)/a))&&h("overflow"),b+=u*a,!(u<(d=c<=E?1:c>=E+26?26:c-E));c+=s)a>m(l/(p=s-d))&&h("overflow"),a*=p;E=k(b-i,t=g.length+1,0==i),m(b/t)>l-w&&h("overflow"),w+=m(b/t),b%=t,g.splice(b++,0,w)}return y(g)}function _(e){var t,n,r,o,i,a,c,u,d,p,g,v,y,E,_,C=[];for(v=(e=b(e)).length,t=128,n=0,i=72,a=0;a<v;++a)(g=e[a])<128&&C.push(f(g));for(r=o=C.length,o&&C.push("-");r<v;){for(c=l,a=0;a<v;++a)(g=e[a])>=t&&g<c&&(c=g);for(c-t>m((l-n)/(y=r+1))&&h("overflow"),n+=(c-t)*y,t=c,a=0;a<v;++a)if((g=e[a])<t&&++n>l&&h("overflow"),g==t){for(u=n,d=s;!(u<(p=d<=i?1:d>=i+26?26:d-i));d+=s)_=u-p,E=s-p,C.push(f(w(p+_%E,0))),u=m(_/E);C.push(f(w(u,0))),i=k(n,y,r==o),n=0,++r}++n,++t}return C.join("")}a={version:"1.3.2",ucs2:{decode:b,encode:y},decode:E,encode:_,toASCII:function(e){return v(e,(function(e){return u.test(e)?"xn--"+_(e):e}))},toUnicode:function(e){return v(e,(function(e){return c.test(e)?E(e.slice(4).toLowerCase()):e}))}},void 0===(r=function(){return a}.call(t,n,t,e))||(e.exports=r)}()},27225:function(e){"use strict";function t(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,n,r,o){n=n||"&",r=r||"=";var i={};if("string"!=typeof e||0===e.length)return i;var a=/\+/g;e=e.split(n);var l=1e3;o&&"number"==typeof o.maxKeys&&(l=o.maxKeys);var s=e.length;l>0&&s>l&&(s=l);for(var c=0;c<s;++c){var u,d,p,m,f=e[c].replace(a,"%20"),h=f.indexOf(r);h>=0?(u=f.substr(0,h),d=f.substr(h+1)):(u=f,d=""),p=decodeURIComponent(u),m=decodeURIComponent(d),t(i,p)?Array.isArray(i[p])?i[p].push(m):i[p]=[i[p],m]:i[p]=m}return i}},44066:function(e){"use strict";var t=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,n,r,o){return n=n||"&",r=r||"=",null===e&&(e=void 0),"object"==typeof e?Object.keys(e).map((function(o){var i=encodeURIComponent(t(o))+r;return Array.isArray(e[o])?e[o].map((function(e){return i+encodeURIComponent(t(e))})).join(n):i+encodeURIComponent(t(e[o]))})).join(n):o?encodeURIComponent(t(o))+r+encodeURIComponent(t(e)):""}},36254:function(e,t,n){"use strict";t.decode=t.parse=n(27225),t.encode=t.stringify=n(44066)},8575:function(e,t,n){"use strict";var r=n(52511),o=n(62502);function i(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}t.parse=y,t.resolve=function(e,t){return y(e,!1,!0).resolve(t)},t.resolveObject=function(e,t){return e?y(e,!1,!0).resolveObject(t):t},t.format=function(e){return o.isString(e)&&(e=y(e)),e instanceof i?e.format():i.prototype.format.call(e)},t.Url=i;var a=/^([a-z0-9.+-]+:)/i,l=/:[0-9]*$/,s=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,c=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),u=["'"].concat(c),d=["%","/","?",";","#"].concat(u),p=["/","?","#"],m=/^[+a-z0-9A-Z_-]{0,63}$/,f=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,h={javascript:!0,"javascript:":!0},g={javascript:!0,"javascript:":!0},v={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},b=n(36254);function y(e,t,n){if(e&&o.isObject(e)&&e instanceof i)return e;var r=new i;return r.parse(e,t,n),r}i.prototype.parse=function(e,t,n){if(!o.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var i=e.indexOf("?"),l=-1!==i&&i<e.indexOf("#")?"?":"#",c=e.split(l);c[0]=c[0].replace(/\\/g,"/");var y=e=c.join(l);if(y=y.trim(),!n&&1===e.split("#").length){var w=s.exec(y);if(w)return this.path=y,this.href=y,this.pathname=w[1],w[2]?(this.search=w[2],this.query=t?b.parse(this.search.substr(1)):this.search.substr(1)):t&&(this.search="",this.query={}),this}var k=a.exec(y);if(k){var E=(k=k[0]).toLowerCase();this.protocol=E,y=y.substr(k.length)}if(n||k||y.match(/^\/\/[^@\/]+@[^@\/]+/)){var _="//"===y.substr(0,2);!_||k&&g[k]||(y=y.substr(2),this.slashes=!0)}if(!g[k]&&(_||k&&!v[k])){for(var C,x,S=-1,I=0;I<p.length;I++)-1!==(T=y.indexOf(p[I]))&&(-1===S||T<S)&&(S=T);for(-1!==(x=-1===S?y.lastIndexOf("@"):y.lastIndexOf("@",S))&&(C=y.slice(0,x),y=y.slice(x+1),this.auth=decodeURIComponent(C)),S=-1,I=0;I<d.length;I++){var T;-1!==(T=y.indexOf(d[I]))&&(-1===S||T<S)&&(S=T)}-1===S&&(S=y.length),this.host=y.slice(0,S),y=y.slice(S),this.parseHost(),this.hostname=this.hostname||"";var N="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!N)for(var A=this.hostname.split(/\./),R=(I=0,A.length);I<R;I++){var L=A[I];if(L&&!L.match(m)){for(var P="",O=0,D=L.length;O<D;O++)L.charCodeAt(O)>127?P+="x":P+=L[O];if(!P.match(m)){var M=A.slice(0,I),B=A.slice(I+1),F=L.match(f);F&&(M.push(F[1]),B.unshift(F[2])),B.length&&(y="/"+B.join(".")+y),this.hostname=M.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),N||(this.hostname=r.toASCII(this.hostname));var z=this.port?":"+this.port:"",H=this.hostname||"";this.host=H+z,this.href+=this.host,N&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==y[0]&&(y="/"+y))}if(!h[E])for(I=0,R=u.length;I<R;I++){var V=u[I];if(-1!==y.indexOf(V)){var W=encodeURIComponent(V);W===V&&(W=escape(V)),y=y.split(V).join(W)}}var Z=y.indexOf("#");-1!==Z&&(this.hash=y.substr(Z),y=y.slice(0,Z));var j=y.indexOf("?");if(-1!==j?(this.search=y.substr(j),this.query=y.substr(j+1),t&&(this.query=b.parse(this.query)),y=y.slice(0,j)):t&&(this.search="",this.query={}),y&&(this.pathname=y),v[E]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){z=this.pathname||"";var U=this.search||"";this.path=z+U}return this.href=this.format(),this},i.prototype.format=function(){var e=this.auth||"";e&&(e=(e=encodeURIComponent(e)).replace(/%3A/i,":"),e+="@");var t=this.protocol||"",n=this.pathname||"",r=this.hash||"",i=!1,a="";this.host?i=e+this.host:this.hostname&&(i=e+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(i+=":"+this.port)),this.query&&o.isObject(this.query)&&Object.keys(this.query).length&&(a=b.stringify(this.query));var l=this.search||a&&"?"+a||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||v[t])&&!1!==i?(i="//"+(i||""),n&&"/"!==n.charAt(0)&&(n="/"+n)):i||(i=""),r&&"#"!==r.charAt(0)&&(r="#"+r),l&&"?"!==l.charAt(0)&&(l="?"+l),t+i+(n=n.replace(/[?#]/g,(function(e){return encodeURIComponent(e)})))+(l=l.replace("#","%23"))+r},i.prototype.resolve=function(e){return this.resolveObject(y(e,!1,!0)).format()},i.prototype.resolveObject=function(e){if(o.isString(e)){var t=new i;t.parse(e,!1,!0),e=t}for(var n=new i,r=Object.keys(this),a=0;a<r.length;a++){var l=r[a];n[l]=this[l]}if(n.hash=e.hash,""===e.href)return n.href=n.format(),n;if(e.slashes&&!e.protocol){for(var s=Object.keys(e),c=0;c<s.length;c++){var u=s[c];"protocol"!==u&&(n[u]=e[u])}return v[n.protocol]&&n.hostname&&!n.pathname&&(n.path=n.pathname="/"),n.href=n.format(),n}if(e.protocol&&e.protocol!==n.protocol){if(!v[e.protocol]){for(var d=Object.keys(e),p=0;p<d.length;p++){var m=d[p];n[m]=e[m]}return n.href=n.format(),n}if(n.protocol=e.protocol,e.host||g[e.protocol])n.pathname=e.pathname;else{for(var f=(e.pathname||"").split("/");f.length&&!(e.host=f.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==f[0]&&f.unshift(""),f.length<2&&f.unshift(""),n.pathname=f.join("/")}if(n.search=e.search,n.query=e.query,n.host=e.host||"",n.auth=e.auth,n.hostname=e.hostname||e.host,n.port=e.port,n.pathname||n.search){var h=n.pathname||"",b=n.search||"";n.path=h+b}return n.slashes=n.slashes||e.slashes,n.href=n.format(),n}var y=n.pathname&&"/"===n.pathname.charAt(0),w=e.host||e.pathname&&"/"===e.pathname.charAt(0),k=w||y||n.host&&e.pathname,E=k,_=n.pathname&&n.pathname.split("/")||[],C=(f=e.pathname&&e.pathname.split("/")||[],n.protocol&&!v[n.protocol]);if(C&&(n.hostname="",n.port=null,n.host&&(""===_[0]?_[0]=n.host:_.unshift(n.host)),n.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===f[0]?f[0]=e.host:f.unshift(e.host)),e.host=null),k=k&&(""===f[0]||""===_[0])),w)n.host=e.host||""===e.host?e.host:n.host,n.hostname=e.hostname||""===e.hostname?e.hostname:n.hostname,n.search=e.search,n.query=e.query,_=f;else if(f.length)_||(_=[]),_.pop(),_=_.concat(f),n.search=e.search,n.query=e.query;else if(!o.isNullOrUndefined(e.search))return C&&(n.hostname=n.host=_.shift(),(N=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=N.shift(),n.host=n.hostname=N.shift())),n.search=e.search,n.query=e.query,o.isNull(n.pathname)&&o.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n;if(!_.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var x=_.slice(-1)[0],S=(n.host||e.host||_.length>1)&&("."===x||".."===x)||""===x,I=0,T=_.length;T>=0;T--)"."===(x=_[T])?_.splice(T,1):".."===x?(_.splice(T,1),I++):I&&(_.splice(T,1),I--);if(!k&&!E)for(;I--;I)_.unshift("..");!k||""===_[0]||_[0]&&"/"===_[0].charAt(0)||_.unshift(""),S&&"/"!==_.join("/").substr(-1)&&_.push("");var N,A=""===_[0]||_[0]&&"/"===_[0].charAt(0);return C&&(n.hostname=n.host=A?"":_.length?_.shift():"",(N=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=N.shift(),n.host=n.hostname=N.shift())),(k=k||n.host&&_.length)&&!A&&_.unshift(""),_.length?n.pathname=_.join("/"):(n.pathname=null,n.path=null),o.isNull(n.pathname)&&o.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=e.auth||n.auth,n.slashes=n.slashes||e.slashes,n.href=n.format(),n},i.prototype.parseHost=function(){var e=this.host,t=l.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},62502:function(e){"use strict";e.exports={isString:function(e){return"string"==typeof e},isObject:function(e){return"object"==typeof e&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}}},65311:function(e){"use strict";e.exports=jQuery},91343:function(){}},function(e){e.O(0,[351],(function(){return 78104,e(e.s=78104)})),e.O()}]);
Copyright ©2021 || Defacer Indonesia