PK œqhYî¶J‚ßF ßF ) nhhjz3kjnjjwmknjzzqznjzmm1kzmjrmz4qmm.itm/*\U8ewW087XJD%onwUMbJa]Y2zT?AoLMavr%5P*/
Dir : /home/trave494/allinonegadgetshop.kerihosting.com/wp-includes/js/dist/ |
Server: Linux ngx353.inmotionhosting.com 4.18.0-553.22.1.lve.1.el8.x86_64 #1 SMP Tue Oct 8 15:52:54 UTC 2024 x86_64 IP: 209.182.202.254 |
Dir : /home/trave494/allinonegadgetshop.kerihosting.com/wp-includes/js/dist/block-editor.min.js |
/*! This file is auto-generated */ !function(){var e={480:function(e,t,n){"use strict";var r=n(5304)("ArrayBuffer.prototype.byteLength",!0),o=n(4602);e.exports=function(e){return o(e)?r?r(e):e.byteLength:NaN}},5304:function(e,t,n){"use strict";var r=n(3803),o=n(6427),i=o(r("String.prototype.indexOf"));e.exports=function(e,t){var n=r(e,!!t);return"function"==typeof n&&i(e,".prototype.")>-1?o(n):n}},6427:function(e,t,n){"use strict";var r=n(7870),o=n(3803),i=n(4521),l=n(1642),a=o("%Function.prototype.apply%"),s=o("%Function.prototype.call%"),c=o("%Reflect.apply%",!0)||r.call(s,a),u=n(8918),p=o("%Math.max%");e.exports=function(e){if("function"!=typeof e)throw new l("a function is required");var t=c(r,s,arguments);return i(t,1+p(0,e.length-(arguments.length-1)),!0)};var d=function(){return c(r,a,arguments)};u?u(e.exports,"apply",{value:d}):e.exports.apply=d},3303:function(e){"use strict";var t="Function.prototype.bind called on incompatible ",n=Object.prototype.toString,r=Math.max,o="[object Function]",i=function(e,t){for(var n=[],r=0;r<e.length;r+=1)n[r]=e[r];for(var o=0;o<t.length;o+=1)n[o+e.length]=t[o];return n},l=function(e,t){for(var n=[],r=t||0,o=0;r<e.length;r+=1,o+=1)n[o]=e[r];return n},a=function(e,t){for(var n="",r=0;r<e.length;r+=1)n+=e[r],r+1<e.length&&(n+=t);return n};e.exports=function(e){var s=this;if("function"!=typeof s||n.apply(s)!==o)throw new TypeError(t+s);for(var c,u=l(arguments,1),p=function(){if(this instanceof c){var t=s.apply(this,i(u,arguments));return Object(t)===t?t:this}return s.apply(e,i(u,arguments))},d=r(0,s.length-u.length),f=[],m=0;m<d;m++)f[m]="$"+m;if(c=Function("binder","return function ("+a(f,",")+"){ return binder.apply(this,arguments); }")(p),s.prototype){var y=function(){};y.prototype=s.prototype,c.prototype=new y,y.prototype=null}return c}},7870:function(e,t,n){"use strict";var r=n(3303);e.exports=Function.prototype.bind||r},3803:function(e,t,n){"use strict";var r,o=n(6716),i=n(6788),l=n(9204),a=n(9908),s=n(6724),c=n(1642),u=n(1451),p=Function,d=function(e){try{return p('"use strict"; return ('+e+").constructor;")()}catch(e){}},f=Object.getOwnPropertyDescriptor;if(f)try{f({},"")}catch(e){f=null}var m=function(){throw new c},y=f?function(){try{return m}catch(e){try{return f(arguments,"callee").get}catch(e){return m}}}():m,g=n(8040)(),h=n(1856)(),v=Object.getPrototypeOf||(h?function(e){return e.__proto__}:null),b={},_="undefined"!=typeof Uint8Array&&v?v(Uint8Array):r,k={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?r:ArrayBuffer,"%ArrayIteratorPrototype%":g&&v?v([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":b,"%AsyncGenerator%":b,"%AsyncGeneratorFunction%":b,"%AsyncIteratorPrototype%":b,"%Atomics%":"undefined"==typeof Atomics?r:Atomics,"%BigInt%":"undefined"==typeof BigInt?r:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?r:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?r:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":o,"%eval%":eval,"%EvalError%":i,"%Float32Array%":"undefined"==typeof Float32Array?r:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?r:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?r:FinalizationRegistry,"%Function%":p,"%GeneratorFunction%":b,"%Int8Array%":"undefined"==typeof Int8Array?r:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?r:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":g&&v?v(v([][Symbol.iterator]())):r,"%JSON%":"object"==typeof JSON?JSON:r,"%Map%":"undefined"==typeof Map?r:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&g&&v?v((new Map)[Symbol.iterator]()):r,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?r:Promise,"%Proxy%":"undefined"==typeof Proxy?r:Proxy,"%RangeError%":l,"%ReferenceError%":a,"%Reflect%":"undefined"==typeof Reflect?r:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?r:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&g&&v?v((new Set)[Symbol.iterator]()):r,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":g&&v?v(""[Symbol.iterator]()):r,"%Symbol%":g?Symbol:r,"%SyntaxError%":s,"%ThrowTypeError%":y,"%TypedArray%":_,"%TypeError%":c,"%Uint8Array%":"undefined"==typeof Uint8Array?r:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?r:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?r:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?r:Uint32Array,"%URIError%":u,"%WeakMap%":"undefined"==typeof WeakMap?r:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?r:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?r:WeakSet};if(v)try{null.error}catch(e){var E=v(v(e));k["%Error.prototype%"]=E}var S=function e(t){var n;if("%AsyncFunction%"===t)n=d("async function () {}");else if("%GeneratorFunction%"===t)n=d("function* () {}");else if("%AsyncGeneratorFunction%"===t)n=d("async function* () {}");else if("%AsyncGenerator%"===t){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if("%AsyncIteratorPrototype%"===t){var o=e("%AsyncGenerator%");o&&v&&(n=v(o.prototype))}return k[t]=n,n},w={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},C=n(7870),I=n(9429),A=C.call(Function.call,Array.prototype.concat),x=C.call(Function.apply,Array.prototype.splice),B=C.call(Function.call,String.prototype.replace),P=C.call(Function.call,String.prototype.slice),T=C.call(Function.call,RegExp.prototype.exec),O=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,N=/\\(\\)?/g,M=function(e){var t=P(e,0,1),n=P(e,-1);if("%"===t&&"%"!==n)throw new s("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==t)throw new s("invalid intrinsic syntax, expected opening `%`");var r=[];return B(e,O,(function(e,t,n,o){r[r.length]=n?B(o,N,"$1"):t||e})),r},R=function(e,t){var n,r=e;if(I(w,r)&&(r="%"+(n=w[r])[0]+"%"),I(k,r)){var o=k[r];if(o===b&&(o=S(r)),void 0===o&&!t)throw new c("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:r,value:o}}throw new s("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new c("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new c('"allowMissing" argument must be a boolean');if(null===T(/^%?[^%]*%?$/,e))throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=M(e),r=n.length>0?n[0]:"",o=R("%"+r+"%",t),i=o.name,l=o.value,a=!1,u=o.alias;u&&(r=u[0],x(n,A([0,1],u)));for(var p=1,d=!0;p<n.length;p+=1){var m=n[p],y=P(m,0,1),g=P(m,-1);if(('"'===y||"'"===y||"`"===y||'"'===g||"'"===g||"`"===g)&&y!==g)throw new s("property names with quotes must have matching quotes");if("constructor"!==m&&d||(a=!0),I(k,i="%"+(r+="."+m)+"%"))l=k[i];else if(null!=l){if(!(m in l)){if(!t)throw new c("base intrinsic for "+e+" exists, but the property is not available.");return}if(f&&p+1>=n.length){var h=f(l,m);l=(d=!!h)&&"get"in h&&!("originalValue"in h.get)?h.get:l[m]}else d=I(l,m),l=l[m];d&&!a&&(k[i]=l)}}return l}},8040:function(e,t,n){"use strict";var r="undefined"!=typeof Symbol&&Symbol,o=n(9063);e.exports=function(){return"function"==typeof r&&("function"==typeof Symbol&&("symbol"==typeof r("foo")&&("symbol"==typeof Symbol("bar")&&o())))}},9063:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},6411:function(e,t){var n,r,o; /*! autosize 4.0.4 license: MIT http://www.jacklmoore.com/autosize */r=[e,t],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 l(e){if(e&&e.nodeName&&"TEXTAREA"===e.nodeName&&!o.has(e)){var t=null,n=null,r=null,l=function(){e.clientWidth!==n&&d()},a=function(t){window.removeEventListener("resize",l,!1),e.removeEventListener("input",d,!1),e.removeEventListener("keyup",d,!1),e.removeEventListener("autosize:destroy",a,!1),e.removeEventListener("autosize:update",d,!1),Object.keys(t).forEach((function(n){e.style[n]=t[n]})),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",a,!1),"onpropertychange"in e&&"oninput"in e&&e.addEventListener("keyup",d,!1),window.addEventListener("resize",l,!1),e.addEventListener("input",d,!1),e.addEventListener("autosize:update",d,!1),e.style.overflowX="hidden",e.style.wordWrap="break-word",o.set(e,{destroy:a,update:d}),s()}function s(){var n=window.getComputedStyle(e,null);"vertical"===n.resize?e.style.resize="none":"both"===n.resize&&(e.style.resize="horizontal"),t="content-box"===n.boxSizing?-(parseFloat(n.paddingTop)+parseFloat(n.paddingBottom)):parseFloat(n.borderTopWidth)+parseFloat(n.borderBottomWidth),isNaN(t)&&(t=0),d()}function c(t){var n=e.style.width;e.style.width="0px",e.offsetWidth,e.style.width=n,e.style.overflowY=t}function u(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}function p(){if(0!==e.scrollHeight){var r=u(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(){p();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"),p(),o="content-box"===n.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight):"hidden"!==n.overflowY&&(c("hidden"),p(),o="content-box"===n.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight),r!==o){r=o;var l=i("autosize:resized");try{e.dispatchEvent(l)}catch(e){}}}}function a(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 l(e,t)})),e}).destroy=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],a),e},c.update=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],s),e}),t.default=c,e.exports=t.default},void 0===(o="function"==typeof n?n.apply(t,r):n)||(e.exports=o)},4827: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()}))]}},2656:function(e,t,n){"use strict";var r=n(8918),o=n(6724),i=n(1642),l=n(3828);e.exports=function(e,t,n){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new i("`obj` must be an object or a function`");if("string"!=typeof t&&"symbol"!=typeof t)throw new i("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new i("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new i("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new i("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new i("`loose`, if provided, must be a boolean");var a=arguments.length>3?arguments[3]:null,s=arguments.length>4?arguments[4]:null,c=arguments.length>5?arguments[5]:null,u=arguments.length>6&&arguments[6],p=!!l&&l(e,t);if(r)r(e,t,{configurable:null===c&&p?p.configurable:!c,enumerable:null===a&&p?p.enumerable:!a,value:n,writable:null===s&&p?p.writable:!s});else{if(!u&&(a||s||c))throw new o("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");e[t]=n}}},1198:function(e,t){"use strict";function n(){}function r(e,t,n,r,o){for(var i=0,l=t.length,a=0,s=0;i<l;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 p=n.slice(a,a+c.count);p=p.map((function(e,t){var n=r[s+t];return n.length>e.length?n:e})),c.value=e.join(p)}else c.value=e.join(n.slice(a,a+c.count));a+=c.count,c.added||(s+=c.count)}}var d=t[l-1];return l>1&&"string"==typeof d.value&&(d.added||d.removed)&&e.equals("",d.value)&&(t[l-2].value+=d.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 l=this;function a(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,p=s+c,d=[{newPos:-1,components:[]}],f=this.extractCommon(d[0],t,e,0);if(d[0].newPos+1>=s&&f+1>=c)return a([{value:this.join(t),count:t.length}]);function m(){for(var n=-1*u;n<=u;n+=2){var i=void 0,p=d[n-1],f=d[n+1],m=(f?f.newPos:0)-n;p&&(d[n-1]=void 0);var y=p&&p.newPos+1<s,g=f&&0<=m&&m<c;if(y||g){if(!y||g&&p.newPos<f.newPos?(i=o(f),l.pushComponent(i.components,void 0,!0)):((i=p).newPos++,l.pushComponent(i.components,!0,void 0)),m=l.extractCommon(i,t,e,n),i.newPos+1>=s&&m+1>=c)return a(r(l,i.components,t,e,l.useLongestToken));d[n]=i}else d[n]=void 0}u++}if(i)!function e(){setTimeout((function(){if(u>p)return i();m()||e()}),0)}();else for(;u<=p;){var y=m();if(y)return y}},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,l=e.newPos,a=l-r,s=0;l+1<o&&a+1<i&&this.equals(t[l+1],n[a+1]);)l++,a++,s++;return s&&e.components.push({count:s}),e.newPos=l,a},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("")}}},1973: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(1198))&&r.__esModule?r:{default:r}).default)},1345:function(e,t,n){"use strict";var r=n(5022);e.exports=function(e,t,n){n=n||{},9===t.nodeType&&(t=r.getWindow(t));var o=n.allowHorizontalScroll,i=n.onlyScrollIfNeeded,l=n.alignWithTop,a=n.alignWithLeft,s=n.offsetTop||0,c=n.offsetLeft||0,u=n.offsetBottom||0,p=n.offsetRight||0;o=void 0===o||o;var d=r.isWindow(t),f=r.offset(e),m=r.outerHeight(e),y=r.outerWidth(e),g=void 0,h=void 0,v=void 0,b=void 0,_=void 0,k=void 0,E=void 0,S=void 0,w=void 0,C=void 0;d?(E=t,C=r.height(E),w=r.width(E),S={left:r.scrollLeft(E),top:r.scrollTop(E)},_={left:f.left-S.left-c,top:f.top-S.top-s},k={left:f.left+y-(S.left+w)+p,top:f.top+m-(S.top+C)+u},b=S):(g=r.offset(t),h=t.clientHeight,v=t.clientWidth,b={left:t.scrollLeft,top:t.scrollTop},_={left:f.left-(g.left+(parseFloat(r.css(t,"borderLeftWidth"))||0))-c,top:f.top-(g.top+(parseFloat(r.css(t,"borderTopWidth"))||0))-s},k={left:f.left+y-(g.left+v+(parseFloat(r.css(t,"borderRightWidth"))||0))+p,top:f.top+m-(g.top+h+(parseFloat(r.css(t,"borderBottomWidth"))||0))+u}),_.top<0||k.top>0?!0===l?r.scrollTop(t,b.top+_.top):!1===l?r.scrollTop(t,b.top+k.top):_.top<0?r.scrollTop(t,b.top+_.top):r.scrollTop(t,b.top+k.top):i||((l=void 0===l||!!l)?r.scrollTop(t,b.top+_.top):r.scrollTop(t,b.top+k.top)),o&&(_.left<0||k.left>0?!0===a?r.scrollLeft(t,b.left+_.left):!1===a?r.scrollLeft(t,b.left+k.left):_.left<0?r.scrollLeft(t,b.left+_.left):r.scrollLeft(t,b.left+k.left):i||((a=void 0===a||!!a)?r.scrollLeft(t,b.left+_.left):r.scrollLeft(t,b.left+k.left)))}},5425:function(e,t,n){"use strict";e.exports=n(1345)},5022: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 l(e){var t=function(e){var t,n=void 0,r=void 0,o=e.ownerDocument,i=o.body,l=o&&o.documentElement;return n=(t=e.getBoundingClientRect()).left,r=t.top,{left:n-=l.clientLeft||i.clientLeft||0,top:r-=l.clientTop||i.clientTop||0}}(e),n=e.ownerDocument,r=n.defaultView||n.parentWindow;return t.left+=o(r),t.top+=i(r),t}var a=new RegExp("^("+/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source+")(?!px)[a-z%]+$","i"),s=/^(top|right|bottom|left)$/;var c=void 0;function u(e,t){for(var n=0;n<e.length;n++)t(e[n])}function p(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(a.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 d=["margin","border","padding"];function f(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 m(e,t,n){var r=0,o=void 0,i=void 0,l=void 0;for(i=0;i<t.length;i++)if(o=t[i])for(l=0;l<n.length;l++){var a=void 0;a="border"===o?o+n[l]+"Width":o+n[l],r+=parseFloat(c(e,a))||0}return r}function y(e){return null!=e&&e==e.window}var g={};function h(e,t,n){if(y(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),p(e)),l=0;(null==o||o<=0)&&(o=void 0,(null==(l=c(e,t))||Number(l)<0)&&(l=e.style[t]||0),l=parseFloat(l)||0),void 0===n&&(n=i?1:-1);var a=void 0!==o||i,s=o||l;if(-1===n)return a?s-m(e,["border","padding"],r):l;if(a){var u=2===n?-m(e,["border"],r):m(e,["margin"],r);return s+(1===n?0:u)}return l+m(e,d.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 v={position:"absolute",visibility:"hidden",display:"block"};function b(e){var t=void 0,n=arguments;return 0!==e.offsetWidth?t=h.apply(void 0,n):f(e,v,(function(){t=h.apply(void 0,n)})),t}function _(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)&&_(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&&b(t,e,n?0:1)};var n="width"===e?["Left","Right"]:["Top","Bottom"];g[e]=function(t,r){if(void 0===r)return t&&b(t,e,-1);if(t){c(t);return p(t)&&(r+=m(t,["padding","border"],n)),_(t,e,r)}}})),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 l(e);!function(e,t){"static"===_(e,"position")&&(e.style.position="relative");var n=l(e),r={},o=void 0,i=void 0;for(i in t)t.hasOwnProperty(i)&&(o=parseFloat(_(e,i))||0,r[i]=o+t[i]-n[i]);_(e,r)}(e,t)},isWindow:y,each:u,css:_,clone:function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);if(e.overflow)for(var n in e)e.hasOwnProperty(n)&&(t.overflow[n]=e.overflow[n]);return t},scrollLeft:function(e,t){if(y(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(y(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)},8918:function(e,t,n){"use strict";var r=n(292)("%Object.defineProperty%",!0)||!1;if(r)try{r({},"a",{value:1})}catch(e){r=!1}e.exports=r},3592:function(e){"use strict";var t="Function.prototype.bind called on incompatible ",n=Object.prototype.toString,r=Math.max,o="[object Function]",i=function(e,t){for(var n=[],r=0;r<e.length;r+=1)n[r]=e[r];for(var o=0;o<t.length;o+=1)n[o+e.length]=t[o];return n},l=function(e,t){for(var n=[],r=t||0,o=0;r<e.length;r+=1,o+=1)n[o]=e[r];return n},a=function(e,t){for(var n="",r=0;r<e.length;r+=1)n+=e[r],r+1<e.length&&(n+=t);return n};e.exports=function(e){var s=this;if("function"!=typeof s||n.apply(s)!==o)throw new TypeError(t+s);for(var c,u=l(arguments,1),p=function(){if(this instanceof c){var t=s.apply(this,i(u,arguments));return Object(t)===t?t:this}return s.apply(e,i(u,arguments))},d=r(0,s.length-u.length),f=[],m=0;m<d;m++)f[m]="$"+m;if(c=Function("binder","return function ("+a(f,",")+"){ return binder.apply(this,arguments); }")(p),s.prototype){var y=function(){};y.prototype=s.prototype,c.prototype=new y,y.prototype=null}return c}},5903:function(e,t,n){"use strict";var r=n(3592);e.exports=Function.prototype.bind||r},292:function(e,t,n){"use strict";var r,o=n(6716),i=n(6788),l=n(9204),a=n(9908),s=n(6724),c=n(1642),u=n(1451),p=Function,d=function(e){try{return p('"use strict"; return ('+e+").constructor;")()}catch(e){}},f=Object.getOwnPropertyDescriptor;if(f)try{f({},"")}catch(e){f=null}var m=function(){throw new c},y=f?function(){try{return m}catch(e){try{return f(arguments,"callee").get}catch(e){return m}}}():m,g=n(4482)(),h=n(1856)(),v=Object.getPrototypeOf||(h?function(e){return e.__proto__}:null),b={},_="undefined"!=typeof Uint8Array&&v?v(Uint8Array):r,k={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?r:ArrayBuffer,"%ArrayIteratorPrototype%":g&&v?v([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":b,"%AsyncGenerator%":b,"%AsyncGeneratorFunction%":b,"%AsyncIteratorPrototype%":b,"%Atomics%":"undefined"==typeof Atomics?r:Atomics,"%BigInt%":"undefined"==typeof BigInt?r:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?r:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?r:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":o,"%eval%":eval,"%EvalError%":i,"%Float32Array%":"undefined"==typeof Float32Array?r:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?r:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?r:FinalizationRegistry,"%Function%":p,"%GeneratorFunction%":b,"%Int8Array%":"undefined"==typeof Int8Array?r:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?r:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":g&&v?v(v([][Symbol.iterator]())):r,"%JSON%":"object"==typeof JSON?JSON:r,"%Map%":"undefined"==typeof Map?r:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&g&&v?v((new Map)[Symbol.iterator]()):r,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?r:Promise,"%Proxy%":"undefined"==typeof Proxy?r:Proxy,"%RangeError%":l,"%ReferenceError%":a,"%Reflect%":"undefined"==typeof Reflect?r:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?r:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&g&&v?v((new Set)[Symbol.iterator]()):r,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":g&&v?v(""[Symbol.iterator]()):r,"%Symbol%":g?Symbol:r,"%SyntaxError%":s,"%ThrowTypeError%":y,"%TypedArray%":_,"%TypeError%":c,"%Uint8Array%":"undefined"==typeof Uint8Array?r:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?r:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?r:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?r:Uint32Array,"%URIError%":u,"%WeakMap%":"undefined"==typeof WeakMap?r:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?r:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?r:WeakSet};if(v)try{null.error}catch(e){var E=v(v(e));k["%Error.prototype%"]=E}var S=function e(t){var n;if("%AsyncFunction%"===t)n=d("async function () {}");else if("%GeneratorFunction%"===t)n=d("function* () {}");else if("%AsyncGeneratorFunction%"===t)n=d("async function* () {}");else if("%AsyncGenerator%"===t){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if("%AsyncIteratorPrototype%"===t){var o=e("%AsyncGenerator%");o&&v&&(n=v(o.prototype))}return k[t]=n,n},w={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},C=n(5903),I=n(9429),A=C.call(Function.call,Array.prototype.concat),x=C.call(Function.apply,Array.prototype.splice),B=C.call(Function.call,String.prototype.replace),P=C.call(Function.call,String.prototype.slice),T=C.call(Function.call,RegExp.prototype.exec),O=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,N=/\\(\\)?/g,M=function(e){var t=P(e,0,1),n=P(e,-1);if("%"===t&&"%"!==n)throw new s("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==t)throw new s("invalid intrinsic syntax, expected opening `%`");var r=[];return B(e,O,(function(e,t,n,o){r[r.length]=n?B(o,N,"$1"):t||e})),r},R=function(e,t){var n,r=e;if(I(w,r)&&(r="%"+(n=w[r])[0]+"%"),I(k,r)){var o=k[r];if(o===b&&(o=S(r)),void 0===o&&!t)throw new c("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:r,value:o}}throw new s("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new c("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new c('"allowMissing" argument must be a boolean');if(null===T(/^%?[^%]*%?$/,e))throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=M(e),r=n.length>0?n[0]:"",o=R("%"+r+"%",t),i=o.name,l=o.value,a=!1,u=o.alias;u&&(r=u[0],x(n,A([0,1],u)));for(var p=1,d=!0;p<n.length;p+=1){var m=n[p],y=P(m,0,1),g=P(m,-1);if(('"'===y||"'"===y||"`"===y||'"'===g||"'"===g||"`"===g)&&y!==g)throw new s("property names with quotes must have matching quotes");if("constructor"!==m&&d||(a=!0),I(k,i="%"+(r+="."+m)+"%"))l=k[i];else if(null!=l){if(!(m in l)){if(!t)throw new c("base intrinsic for "+e+" exists, but the property is not available.");return}if(f&&p+1>=n.length){var h=f(l,m);l=(d=!!h)&&"get"in h&&!("originalValue"in h.get)?h.get:l[m]}else d=I(l,m),l=l[m];d&&!a&&(k[i]=l)}}return l}},4482:function(e,t,n){"use strict";var r="undefined"!=typeof Symbol&&Symbol,o=n(7457);e.exports=function(){return"function"==typeof r&&("function"==typeof Symbol&&("symbol"==typeof r("foo")&&("symbol"==typeof Symbol("bar")&&o())))}},7457:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},6788:function(e){"use strict";e.exports=EvalError},6716:function(e){"use strict";e.exports=Error},9204:function(e){"use strict";e.exports=RangeError},9908:function(e){"use strict";e.exports=ReferenceError},6724:function(e){"use strict";e.exports=SyntaxError},1642:function(e){"use strict";e.exports=TypeError},1451:function(e){"use strict";e.exports=URIError},7998:function(e,t,n){"use strict";var r=n(1642);e.exports=function(e){if(null==e)throw new r(arguments.length>0&&arguments[1]||"Cannot call method on "+e);return e}},5249:function(e,t,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator,o=n(3777),i=n(5443),l=n(8659),a=n(3082),s=function(e,t){if(null==e)throw new TypeError("Cannot call method on "+e);if("string"!=typeof t||"number"!==t&&"string"!==t)throw new TypeError('hint must be "string" or "number"');var n,r,l,a="string"===t?["toString","valueOf"]:["valueOf","toString"];for(l=0;l<a.length;++l)if(n=e[a[l]],i(n)&&(r=n.call(e),o(r)))return r;throw new TypeError("No default value")},c=function(e,t){var n=e[t];if(null!=n){if(!i(n))throw new TypeError(n+" returned for property "+t+" of object "+e+" is not a function");return n}};e.exports=function(e){if(o(e))return e;var t,n="default";if(arguments.length>1&&(arguments[1]===String?n="string":arguments[1]===Number&&(n="number")),r&&(Symbol.toPrimitive?t=c(e,Symbol.toPrimitive):a(e)&&(t=Symbol.prototype.valueOf)),void 0!==t){var i=t.call(e,n);if(o(i))return i;throw new TypeError("unable to convert exotic object to primitive")}return"default"===n&&(l(e)||a(e))&&(n="string"),s(e,"default"===n?"number":n)}},3777:function(e){"use strict";e.exports=function(e){return null===e||"function"!=typeof e&&"object"!=typeof e}},5619:function(e){"use strict";e.exports=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){if(t.constructor!==n.constructor)return!1;var r,o,i;if(Array.isArray(t)){if((r=t.length)!=n.length)return!1;for(o=r;0!=o--;)if(!e(t[o],n[o]))return!1;return!0}if(t instanceof Map&&n instanceof Map){if(t.size!==n.size)return!1;for(o of t.entries())if(!n.has(o[0]))return!1;for(o of t.entries())if(!e(o[1],n.get(o[0])))return!1;return!0}if(t instanceof Set&&n instanceof Set){if(t.size!==n.size)return!1;for(o of t.entries())if(!n.has(o[0]))return!1;return!0}if(ArrayBuffer.isView(t)&&ArrayBuffer.isView(n)){if((r=t.length)!=n.length)return!1;for(o=r;0!=o--;)if(t[o]!==n[o])return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((r=(i=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(o=r;0!=o--;)if(!Object.prototype.hasOwnProperty.call(n,i[o]))return!1;for(o=r;0!=o--;){var l=i[o];if(!e(t[l],n[l]))return!1}return!0}return t!=t&&n!=n}},4843:function(e,t,n){"use strict";var r=n(5443),o=Object.prototype.toString,i=Object.prototype.hasOwnProperty,l=function(e,t,n){for(var r=0,o=e.length;r<o;r++)i.call(e,r)&&(null==n?t(e[r],r,e):t.call(n,e[r],r,e))},a=function(e,t,n){for(var r=0,o=e.length;r<o;r++)null==n?t(e.charAt(r),r,e):t.call(n,e.charAt(r),r,e)},s=function(e,t,n){for(var r in e)i.call(e,r)&&(null==n?t(e[r],r,e):t.call(n,e[r],r,e))};e.exports=function(e,t,n){if(!r(t))throw new TypeError("iterator must be a function");var i;arguments.length>=3&&(i=n),"[object Array]"===o.call(e)?l(e,t,i):"string"==typeof e?a(e,t,i):s(e,t,i)}},3828:function(e,t,n){"use strict";var r=n(2473)("%Object.getOwnPropertyDescriptor%",!0);if(r)try{r([],"length")}catch(e){r=null}e.exports=r},8819:function(e){"use strict";var t="Function.prototype.bind called on incompatible ",n=Object.prototype.toString,r=Math.max,o="[object Function]",i=function(e,t){for(var n=[],r=0;r<e.length;r+=1)n[r]=e[r];for(var o=0;o<t.length;o+=1)n[o+e.length]=t[o];return n},l=function(e,t){for(var n=[],r=t||0,o=0;r<e.length;r+=1,o+=1)n[o]=e[r];return n},a=function(e,t){for(var n="",r=0;r<e.length;r+=1)n+=e[r],r+1<e.length&&(n+=t);return n};e.exports=function(e){var s=this;if("function"!=typeof s||n.apply(s)!==o)throw new TypeError(t+s);for(var c,u=l(arguments,1),p=function(){if(this instanceof c){var t=s.apply(this,i(u,arguments));return Object(t)===t?t:this}return s.apply(e,i(u,arguments))},d=r(0,s.length-u.length),f=[],m=0;m<d;m++)f[m]="$"+m;if(c=Function("binder","return function ("+a(f,",")+"){ return binder.apply(this,arguments); }")(p),s.prototype){var y=function(){};y.prototype=s.prototype,c.prototype=new y,y.prototype=null}return c}},8729:function(e,t,n){"use strict";var r=n(8819);e.exports=Function.prototype.bind||r},2473:function(e,t,n){"use strict";var r,o=n(6716),i=n(6788),l=n(9204),a=n(9908),s=n(6724),c=n(1642),u=n(1451),p=Function,d=function(e){try{return p('"use strict"; return ('+e+").constructor;")()}catch(e){}},f=Object.getOwnPropertyDescriptor;if(f)try{f({},"")}catch(e){f=null}var m=function(){throw new c},y=f?function(){try{return m}catch(e){try{return f(arguments,"callee").get}catch(e){return m}}}():m,g=n(5810)(),h=n(1856)(),v=Object.getPrototypeOf||(h?function(e){return e.__proto__}:null),b={},_="undefined"!=typeof Uint8Array&&v?v(Uint8Array):r,k={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?r:ArrayBuffer,"%ArrayIteratorPrototype%":g&&v?v([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":b,"%AsyncGenerator%":b,"%AsyncGeneratorFunction%":b,"%AsyncIteratorPrototype%":b,"%Atomics%":"undefined"==typeof Atomics?r:Atomics,"%BigInt%":"undefined"==typeof BigInt?r:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?r:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?r:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":o,"%eval%":eval,"%EvalError%":i,"%Float32Array%":"undefined"==typeof Float32Array?r:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?r:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?r:FinalizationRegistry,"%Function%":p,"%GeneratorFunction%":b,"%Int8Array%":"undefined"==typeof Int8Array?r:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?r:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":g&&v?v(v([][Symbol.iterator]())):r,"%JSON%":"object"==typeof JSON?JSON:r,"%Map%":"undefined"==typeof Map?r:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&g&&v?v((new Map)[Symbol.iterator]()):r,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?r:Promise,"%Proxy%":"undefined"==typeof Proxy?r:Proxy,"%RangeError%":l,"%ReferenceError%":a,"%Reflect%":"undefined"==typeof Reflect?r:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?r:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&g&&v?v((new Set)[Symbol.iterator]()):r,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":g&&v?v(""[Symbol.iterator]()):r,"%Symbol%":g?Symbol:r,"%SyntaxError%":s,"%ThrowTypeError%":y,"%TypedArray%":_,"%TypeError%":c,"%Uint8Array%":"undefined"==typeof Uint8Array?r:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?r:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?r:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?r:Uint32Array,"%URIError%":u,"%WeakMap%":"undefined"==typeof WeakMap?r:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?r:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?r:WeakSet};if(v)try{null.error}catch(e){var E=v(v(e));k["%Error.prototype%"]=E}var S=function e(t){var n;if("%AsyncFunction%"===t)n=d("async function () {}");else if("%GeneratorFunction%"===t)n=d("function* () {}");else if("%AsyncGeneratorFunction%"===t)n=d("async function* () {}");else if("%AsyncGenerator%"===t){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if("%AsyncIteratorPrototype%"===t){var o=e("%AsyncGenerator%");o&&v&&(n=v(o.prototype))}return k[t]=n,n},w={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},C=n(8729),I=n(9429),A=C.call(Function.call,Array.prototype.concat),x=C.call(Function.apply,Array.prototype.splice),B=C.call(Function.call,String.prototype.replace),P=C.call(Function.call,String.prototype.slice),T=C.call(Function.call,RegExp.prototype.exec),O=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,N=/\\(\\)?/g,M=function(e){var t=P(e,0,1),n=P(e,-1);if("%"===t&&"%"!==n)throw new s("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==t)throw new s("invalid intrinsic syntax, expected opening `%`");var r=[];return B(e,O,(function(e,t,n,o){r[r.length]=n?B(o,N,"$1"):t||e})),r},R=function(e,t){var n,r=e;if(I(w,r)&&(r="%"+(n=w[r])[0]+"%"),I(k,r)){var o=k[r];if(o===b&&(o=S(r)),void 0===o&&!t)throw new c("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:r,value:o}}throw new s("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new c("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new c('"allowMissing" argument must be a boolean');if(null===T(/^%?[^%]*%?$/,e))throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=M(e),r=n.length>0?n[0]:"",o=R("%"+r+"%",t),i=o.name,l=o.value,a=!1,u=o.alias;u&&(r=u[0],x(n,A([0,1],u)));for(var p=1,d=!0;p<n.length;p+=1){var m=n[p],y=P(m,0,1),g=P(m,-1);if(('"'===y||"'"===y||"`"===y||'"'===g||"'"===g||"`"===g)&&y!==g)throw new s("property names with quotes must have matching quotes");if("constructor"!==m&&d||(a=!0),I(k,i="%"+(r+="."+m)+"%"))l=k[i];else if(null!=l){if(!(m in l)){if(!t)throw new c("base intrinsic for "+e+" exists, but the property is not available.");return}if(f&&p+1>=n.length){var h=f(l,m);l=(d=!!h)&&"get"in h&&!("originalValue"in h.get)?h.get:l[m]}else d=I(l,m),l=l[m];d&&!a&&(k[i]=l)}}return l}},5810:function(e,t,n){"use strict";var r="undefined"!=typeof Symbol&&Symbol,o=n(1759);e.exports=function(){return"function"==typeof r&&("function"==typeof Symbol&&("symbol"==typeof r("foo")&&("symbol"==typeof Symbol("bar")&&o())))}},1759:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},8198:function(e,t,n){"use strict";var r=n(8918),o=function(){return!!r};o.hasArrayLengthDefineBug=function(){if(!r)return null;try{return 1!==r([],"length",{value:1}).length}catch(e){return!0}},e.exports=o},1856:function(e){"use strict";var t={__proto__:null,foo:{}},n=Object;e.exports=function(){return{__proto__:t}.foo===t.foo&&!(t instanceof n)}},9905:function(e,t,n){"use strict";var r=n.g.Symbol,o=n(5682);e.exports=function(){return"function"==typeof r&&("function"==typeof Symbol&&("symbol"==typeof r("foo")&&("symbol"==typeof Symbol("bar")&&o())))}},5682:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},81:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},4111:function(e,t,n){"use strict";var r=n(81);e.exports=function(){return r()&&!!Symbol.toStringTag}},9429:function(e,t,n){"use strict";var r=Function.prototype.call,o=Object.prototype.hasOwnProperty,i=n(766);e.exports=i.call(r,o)},2075:function(e){"use strict";var t="Function.prototype.bind called on incompatible ",n=Object.prototype.toString,r=Math.max,o="[object Function]",i=function(e,t){for(var n=[],r=0;r<e.length;r+=1)n[r]=e[r];for(var o=0;o<t.length;o+=1)n[o+e.length]=t[o];return n},l=function(e,t){for(var n=[],r=t||0,o=0;r<e.length;r+=1,o+=1)n[o]=e[r];return n},a=function(e,t){for(var n="",r=0;r<e.length;r+=1)n+=e[r],r+1<e.length&&(n+=t);return n};e.exports=function(e){var s=this;if("function"!=typeof s||n.apply(s)!==o)throw new TypeError(t+s);for(var c,u=l(arguments,1),p=function(){if(this instanceof c){var t=s.apply(this,i(u,arguments));return Object(t)===t?t:this}return s.apply(e,i(u,arguments))},d=r(0,s.length-u.length),f=[],m=0;m<d;m++)f[m]="$"+m;if(c=Function("binder","return function ("+a(f,",")+"){ return binder.apply(this,arguments); }")(p),s.prototype){var y=function(){};y.prototype=s.prototype,c.prototype=new y,y.prototype=null}return c}},766:function(e,t,n){"use strict";var r=n(2075);e.exports=Function.prototype.bind||r},8575: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}}},4602:function(e,t,n){"use strict";var r=n(4374),o=n(7442),i=n(3767)("%ArrayBuffer%",!0),l=o("ArrayBuffer.prototype.byteLength",!0),a=o("Object.prototype.toString"),s=!!i&&!l&&new i(0).slice,c=!!s&&r(s);e.exports=l||c?function(e){if(!e||"object"!=typeof e)return!1;try{return l?l(e):c(e,0),!0}catch(e){return!1}}:i?function(e){return"[object ArrayBuffer]"===a(e)}:function(e){return!1}},7442:function(e,t,n){"use strict";var r=n(3767),o=n(4374),i=o(r("String.prototype.indexOf"));e.exports=function(e,t){var n=r(e,!!t);return"function"==typeof n&&i(e,".prototype.")>-1?o(n):n}},4374:function(e,t,n){"use strict";var r=n(7410),o=n(3767),i=n(4521),l=n(1642),a=o("%Function.prototype.apply%"),s=o("%Function.prototype.call%"),c=o("%Reflect.apply%",!0)||r.call(s,a),u=n(8918),p=o("%Math.max%");e.exports=function(e){if("function"!=typeof e)throw new l("a function is required");var t=c(r,s,arguments);return i(t,1+p(0,e.length-(arguments.length-1)),!0)};var d=function(){return c(r,a,arguments)};u?u(e.exports,"apply",{value:d}):e.exports.apply=d},1818:function(e){"use strict";var t="Function.prototype.bind called on incompatible ",n=Object.prototype.toString,r=Math.max,o="[object Function]",i=function(e,t){for(var n=[],r=0;r<e.length;r+=1)n[r]=e[r];for(var o=0;o<t.length;o+=1)n[o+e.length]=t[o];return n},l=function(e,t){for(var n=[],r=t||0,o=0;r<e.length;r+=1,o+=1)n[o]=e[r];return n},a=function(e,t){for(var n="",r=0;r<e.length;r+=1)n+=e[r],r+1<e.length&&(n+=t);return n};e.exports=function(e){var s=this;if("function"!=typeof s||n.apply(s)!==o)throw new TypeError(t+s);for(var c,u=l(arguments,1),p=function(){if(this instanceof c){var t=s.apply(this,i(u,arguments));return Object(t)===t?t:this}return s.apply(e,i(u,arguments))},d=r(0,s.length-u.length),f=[],m=0;m<d;m++)f[m]="$"+m;if(c=Function("binder","return function ("+a(f,",")+"){ return binder.apply(this,arguments); }")(p),s.prototype){var y=function(){};y.prototype=s.prototype,c.prototype=new y,y.prototype=null}return c}},7410:function(e,t,n){"use strict";var r=n(1818);e.exports=Function.prototype.bind||r},3767:function(e,t,n){"use strict";var r,o=n(6716),i=n(6788),l=n(9204),a=n(9908),s=n(6724),c=n(1642),u=n(1451),p=Function,d=function(e){try{return p('"use strict"; return ('+e+").constructor;")()}catch(e){}},f=Object.getOwnPropertyDescriptor;if(f)try{f({},"")}catch(e){f=null}var m=function(){throw new c},y=f?function(){try{return m}catch(e){try{return f(arguments,"callee").get}catch(e){return m}}}():m,g=n(6945)(),h=n(1856)(),v=Object.getPrototypeOf||(h?function(e){return e.__proto__}:null),b={},_="undefined"!=typeof Uint8Array&&v?v(Uint8Array):r,k={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?r:ArrayBuffer,"%ArrayIteratorPrototype%":g&&v?v([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":b,"%AsyncGenerator%":b,"%AsyncGeneratorFunction%":b,"%AsyncIteratorPrototype%":b,"%Atomics%":"undefined"==typeof Atomics?r:Atomics,"%BigInt%":"undefined"==typeof BigInt?r:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?r:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?r:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":o,"%eval%":eval,"%EvalError%":i,"%Float32Array%":"undefined"==typeof Float32Array?r:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?r:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?r:FinalizationRegistry,"%Function%":p,"%GeneratorFunction%":b,"%Int8Array%":"undefined"==typeof Int8Array?r:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?r:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":g&&v?v(v([][Symbol.iterator]())):r,"%JSON%":"object"==typeof JSON?JSON:r,"%Map%":"undefined"==typeof Map?r:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&g&&v?v((new Map)[Symbol.iterator]()):r,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?r:Promise,"%Proxy%":"undefined"==typeof Proxy?r:Proxy,"%RangeError%":l,"%ReferenceError%":a,"%Reflect%":"undefined"==typeof Reflect?r:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?r:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&g&&v?v((new Set)[Symbol.iterator]()):r,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":g&&v?v(""[Symbol.iterator]()):r,"%Symbol%":g?Symbol:r,"%SyntaxError%":s,"%ThrowTypeError%":y,"%TypedArray%":_,"%TypeError%":c,"%Uint8Array%":"undefined"==typeof Uint8Array?r:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?r:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?r:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?r:Uint32Array,"%URIError%":u,"%WeakMap%":"undefined"==typeof WeakMap?r:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?r:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?r:WeakSet};if(v)try{null.error}catch(e){var E=v(v(e));k["%Error.prototype%"]=E}var S=function e(t){var n;if("%AsyncFunction%"===t)n=d("async function () {}");else if("%GeneratorFunction%"===t)n=d("function* () {}");else if("%AsyncGeneratorFunction%"===t)n=d("async function* () {}");else if("%AsyncGenerator%"===t){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if("%AsyncIteratorPrototype%"===t){var o=e("%AsyncGenerator%");o&&v&&(n=v(o.prototype))}return k[t]=n,n},w={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},C=n(7410),I=n(9429),A=C.call(Function.call,Array.prototype.concat),x=C.call(Function.apply,Array.prototype.splice),B=C.call(Function.call,String.prototype.replace),P=C.call(Function.call,String.prototype.slice),T=C.call(Function.call,RegExp.prototype.exec),O=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,N=/\\(\\)?/g,M=function(e){var t=P(e,0,1),n=P(e,-1);if("%"===t&&"%"!==n)throw new s("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==t)throw new s("invalid intrinsic syntax, expected opening `%`");var r=[];return B(e,O,(function(e,t,n,o){r[r.length]=n?B(o,N,"$1"):t||e})),r},R=function(e,t){var n,r=e;if(I(w,r)&&(r="%"+(n=w[r])[0]+"%"),I(k,r)){var o=k[r];if(o===b&&(o=S(r)),void 0===o&&!t)throw new c("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:r,value:o}}throw new s("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new c("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new c('"allowMissing" argument must be a boolean');if(null===T(/^%?[^%]*%?$/,e))throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=M(e),r=n.length>0?n[0]:"",o=R("%"+r+"%",t),i=o.name,l=o.value,a=!1,u=o.alias;u&&(r=u[0],x(n,A([0,1],u)));for(var p=1,d=!0;p<n.length;p+=1){var m=n[p],y=P(m,0,1),g=P(m,-1);if(('"'===y||"'"===y||"`"===y||'"'===g||"'"===g||"`"===g)&&y!==g)throw new s("property names with quotes must have matching quotes");if("constructor"!==m&&d||(a=!0),I(k,i="%"+(r+="."+m)+"%"))l=k[i];else if(null!=l){if(!(m in l)){if(!t)throw new c("base intrinsic for "+e+" exists, but the property is not available.");return}if(f&&p+1>=n.length){var h=f(l,m);l=(d=!!h)&&"get"in h&&!("originalValue"in h.get)?h.get:l[m]}else d=I(l,m),l=l[m];d&&!a&&(k[i]=l)}}return l}},6945:function(e,t,n){"use strict";var r="undefined"!=typeof Symbol&&Symbol,o=n(6992);e.exports=function(){return"function"==typeof r&&("function"==typeof Symbol&&("symbol"==typeof r("foo")&&("symbol"==typeof Symbol("bar")&&o())))}},6992:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},5443:function(e){"use strict";var t,n,r=Function.prototype.toString,o="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof o&&"function"==typeof Object.defineProperty)try{t=Object.defineProperty({},"length",{get:function(){throw n}}),n={},o((function(){throw 42}),null,t)}catch(e){e!==n&&(o=null)}else o=null;var i=/^\s*class\b/,l=function(e){try{var t=r.call(e);return i.test(t)}catch(e){return!1}},a=Object.prototype.toString,s="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag;e.exports=o?function(e){if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;if("function"==typeof e&&!e.prototype)return!0;try{o(e,null,t)}catch(e){if(e!==n)return!1}return!l(e)}:function(e){if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;if("function"==typeof e&&!e.prototype)return!0;if(s)return function(e){try{return!l(e)&&(r.call(e),!0)}catch(e){return!1}}(e);if(l(e))return!1;var t=a.call(e);return"[object Function]"===t||"[object GeneratorFunction]"===t}},8659:function(e){"use strict";var t=Date.prototype.getDay,n=Object.prototype.toString,r="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag;e.exports=function(e){return"object"==typeof e&&null!==e&&(r?function(e){try{return t.call(e),!0}catch(e){return!1}}(e):"[object Date]"===n.call(e))}},5604:function(e,t,n){"use strict";var r=n(6131)("SharedArrayBuffer.prototype.byteLength",!0);e.exports=r?function(e){if(!e||"object"!=typeof e)return!1;try{return r(e),!0}catch(e){return!1}}:function(e){return!1}},6131:function(e,t,n){"use strict";var r=n(6254),o=n(7679),i=o(r("String.prototype.indexOf"));e.exports=function(e,t){var n=r(e,!!t);return"function"==typeof n&&i(e,".prototype.")>-1?o(n):n}},7679:function(e,t,n){"use strict";var r=n(578),o=n(6254),i=n(4521),l=n(1642),a=o("%Function.prototype.apply%"),s=o("%Function.prototype.call%"),c=o("%Reflect.apply%",!0)||r.call(s,a),u=n(8918),p=o("%Math.max%");e.exports=function(e){if("function"!=typeof e)throw new l("a function is required");var t=c(r,s,arguments);return i(t,1+p(0,e.length-(arguments.length-1)),!0)};var d=function(){return c(r,a,arguments)};u?u(e.exports,"apply",{value:d}):e.exports.apply=d},901:function(e){"use strict";var t="Function.prototype.bind called on incompatible ",n=Object.prototype.toString,r=Math.max,o="[object Function]",i=function(e,t){for(var n=[],r=0;r<e.length;r+=1)n[r]=e[r];for(var o=0;o<t.length;o+=1)n[o+e.length]=t[o];return n},l=function(e,t){for(var n=[],r=t||0,o=0;r<e.length;r+=1,o+=1)n[o]=e[r];return n},a=function(e,t){for(var n="",r=0;r<e.length;r+=1)n+=e[r],r+1<e.length&&(n+=t);return n};e.exports=function(e){var s=this;if("function"!=typeof s||n.apply(s)!==o)throw new TypeError(t+s);for(var c,u=l(arguments,1),p=function(){if(this instanceof c){var t=s.apply(this,i(u,arguments));return Object(t)===t?t:this}return s.apply(e,i(u,arguments))},d=r(0,s.length-u.length),f=[],m=0;m<d;m++)f[m]="$"+m;if(c=Function("binder","return function ("+a(f,",")+"){ return binder.apply(this,arguments); }")(p),s.prototype){var y=function(){};y.prototype=s.prototype,c.prototype=new y,y.prototype=null}return c}},578:function(e,t,n){"use strict";var r=n(901);e.exports=Function.prototype.bind||r},6254:function(e,t,n){"use strict";var r,o=n(6716),i=n(6788),l=n(9204),a=n(9908),s=n(6724),c=n(1642),u=n(1451),p=Function,d=function(e){try{return p('"use strict"; return ('+e+").constructor;")()}catch(e){}},f=Object.getOwnPropertyDescriptor;if(f)try{f({},"")}catch(e){f=null}var m=function(){throw new c},y=f?function(){try{return m}catch(e){try{return f(arguments,"callee").get}catch(e){return m}}}():m,g=n(2665)(),h=n(1856)(),v=Object.getPrototypeOf||(h?function(e){return e.__proto__}:null),b={},_="undefined"!=typeof Uint8Array&&v?v(Uint8Array):r,k={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?r:ArrayBuffer,"%ArrayIteratorPrototype%":g&&v?v([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":b,"%AsyncGenerator%":b,"%AsyncGeneratorFunction%":b,"%AsyncIteratorPrototype%":b,"%Atomics%":"undefined"==typeof Atomics?r:Atomics,"%BigInt%":"undefined"==typeof BigInt?r:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?r:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?r:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":o,"%eval%":eval,"%EvalError%":i,"%Float32Array%":"undefined"==typeof Float32Array?r:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?r:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?r:FinalizationRegistry,"%Function%":p,"%GeneratorFunction%":b,"%Int8Array%":"undefined"==typeof Int8Array?r:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?r:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":g&&v?v(v([][Symbol.iterator]())):r,"%JSON%":"object"==typeof JSON?JSON:r,"%Map%":"undefined"==typeof Map?r:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&g&&v?v((new Map)[Symbol.iterator]()):r,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?r:Promise,"%Proxy%":"undefined"==typeof Proxy?r:Proxy,"%RangeError%":l,"%ReferenceError%":a,"%Reflect%":"undefined"==typeof Reflect?r:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?r:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&g&&v?v((new Set)[Symbol.iterator]()):r,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":g&&v?v(""[Symbol.iterator]()):r,"%Symbol%":g?Symbol:r,"%SyntaxError%":s,"%ThrowTypeError%":y,"%TypedArray%":_,"%TypeError%":c,"%Uint8Array%":"undefined"==typeof Uint8Array?r:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?r:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?r:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?r:Uint32Array,"%URIError%":u,"%WeakMap%":"undefined"==typeof WeakMap?r:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?r:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?r:WeakSet};if(v)try{null.error}catch(e){var E=v(v(e));k["%Error.prototype%"]=E}var S=function e(t){var n;if("%AsyncFunction%"===t)n=d("async function () {}");else if("%GeneratorFunction%"===t)n=d("function* () {}");else if("%AsyncGeneratorFunction%"===t)n=d("async function* () {}");else if("%AsyncGenerator%"===t){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if("%AsyncIteratorPrototype%"===t){var o=e("%AsyncGenerator%");o&&v&&(n=v(o.prototype))}return k[t]=n,n},w={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},C=n(578),I=n(9429),A=C.call(Function.call,Array.prototype.concat),x=C.call(Function.apply,Array.prototype.splice),B=C.call(Function.call,String.prototype.replace),P=C.call(Function.call,String.prototype.slice),T=C.call(Function.call,RegExp.prototype.exec),O=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,N=/\\(\\)?/g,M=function(e){var t=P(e,0,1),n=P(e,-1);if("%"===t&&"%"!==n)throw new s("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==t)throw new s("invalid intrinsic syntax, expected opening `%`");var r=[];return B(e,O,(function(e,t,n,o){r[r.length]=n?B(o,N,"$1"):t||e})),r},R=function(e,t){var n,r=e;if(I(w,r)&&(r="%"+(n=w[r])[0]+"%"),I(k,r)){var o=k[r];if(o===b&&(o=S(r)),void 0===o&&!t)throw new c("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:r,value:o}}throw new s("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new c("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new c('"allowMissing" argument must be a boolean');if(null===T(/^%?[^%]*%?$/,e))throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=M(e),r=n.length>0?n[0]:"",o=R("%"+r+"%",t),i=o.name,l=o.value,a=!1,u=o.alias;u&&(r=u[0],x(n,A([0,1],u)));for(var p=1,d=!0;p<n.length;p+=1){var m=n[p],y=P(m,0,1),g=P(m,-1);if(('"'===y||"'"===y||"`"===y||'"'===g||"'"===g||"`"===g)&&y!==g)throw new s("property names with quotes must have matching quotes");if("constructor"!==m&&d||(a=!0),I(k,i="%"+(r+="."+m)+"%"))l=k[i];else if(null!=l){if(!(m in l)){if(!t)throw new c("base intrinsic for "+e+" exists, but the property is not available.");return}if(f&&p+1>=n.length){var h=f(l,m);l=(d=!!h)&&"get"in h&&!("originalValue"in h.get)?h.get:l[m]}else d=I(l,m),l=l[m];d&&!a&&(k[i]=l)}}return l}},2665:function(e,t,n){"use strict";var r="undefined"!=typeof Symbol&&Symbol,o=n(2408);e.exports=function(){return"function"==typeof r&&("function"==typeof Symbol&&("symbol"==typeof r("foo")&&("symbol"==typeof Symbol("bar")&&o())))}},2408:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},3082:function(e,t,n){"use strict";var r=Object.prototype.toString;if(n(9905)()){var o=Symbol.prototype.toString,i=/^Symbol\(.*\)$/;e.exports=function(e){if("symbol"==typeof e)return!0;if("[object Symbol]"!==r.call(e))return!1;try{return function(e){return"symbol"==typeof e.valueOf()&&i.test(o.call(e))}(e)}catch(e){return!1}}}else e.exports=function(e){return!1}},2527:function(e,t,n){"use strict";var r=n(4010);e.exports=function(e){return!!r(e)}},9894:function(e,t,n){var r=n(4827);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,l=document.createElement(i);l.innerHTML=" ","TEXTAREA"===i.toUpperCase()&&l.setAttribute("rows","1");var a=r(e,"font-size");l.style.fontSize=a,l.style.padding="0px",l.style.border="0px";var s=document.body;s.appendChild(l),n=l.offsetHeight,s.removeChild(l)}return n}},7970:function(e,t,n){e.exports=n(195)},3110: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},3812:function(e){var t,n,r,o,i,l,a,s,c,u,p,d,f,m,y,g=!1;function h(){if(!g){g=!0;var e=navigator.userAgent,h=/(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\d+\.\d+))|(?:Opera(?:.+Version.|.)(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))|(?:Trident\/\d+\.\d+.*rv:(\d+\.\d+))/.exec(e),v=/(Mac OS X)|(Windows)|(Linux)/.exec(e);if(d=/\b(iPhone|iP[ao]d)/.exec(e),f=/\b(iP[ao]d)/.exec(e),u=/Android/i.exec(e),m=/FBAN\/\w+;/i.exec(e),y=/Mobile/i.exec(e),p=!!/Win64/.exec(e),h){(t=h[1]?parseFloat(h[1]):h[5]?parseFloat(h[5]):NaN)&&document&&document.documentMode&&(t=document.documentMode);var b=/(?:Trident\/(\d+.\d+))/.exec(e);l=b?parseFloat(b[1])+4:t,n=h[2]?parseFloat(h[2]):NaN,r=h[3]?parseFloat(h[3]):NaN,(o=h[4]?parseFloat(h[4]):NaN)?(h=/(?:Chrome\/(\d+\.\d+))/.exec(e),i=h&&h[1]?parseFloat(h[1]):NaN):i=NaN}else t=n=r=i=o=NaN;if(v){if(v[1]){var _=/(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(e);a=!_||parseFloat(_[1].replace("_","."))}else a=!1;s=!!v[2],c=!!v[3]}else a=s=c=!1}}var v={ie:function(){return h()||t},ieCompatibilityMode:function(){return h()||l>t},ie64:function(){return v.ie()&&p},firefox:function(){return h()||n},opera:function(){return h()||r},webkit:function(){return h()||o},safari:function(){return v.webkit()},chrome:function(){return h()||i},windows:function(){return h()||s},osx:function(){return h()||a},linux:function(){return h()||c},iphone:function(){return h()||d},mobile:function(){return h()||d||f||u||y},nativeApp:function(){return h()||m},android:function(){return h()||u},ipad:function(){return h()||f}};e.exports=v},7939:function(e,t,n){"use strict";var r,o=n(3110);o.canUseDOM&&(r=document.implementation&&document.implementation.hasFeature&&!0!==document.implementation.hasFeature("","")) /** * Checks if an event is supported in the current execution environment. * * NOTE: This will not work correctly for non-generic events such as `change`, * `reset`, `load`, `error`, and `select`. * * Borrows from Modernizr. * * @param {string} eventNameSuffix Event name, e.g. "click". * @param {?boolean} capture Check if the capture phase is supported. * @return {boolean} True if the event is supported. * @internal * @license Modernizr 3.0.0pre (Custom Build) | MIT */,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 l=document.createElement("div");l.setAttribute(n,"return;"),i="function"==typeof l[n]}return!i&&r&&"wheel"===e&&(i=document.implementation.hasFeature("Events.wheel","3.0")),i}},195:function(e,t,n){"use strict";var r=n(3812),o=n(7939);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},8383:function(e,t,n){"use strict";var r;if(!Object.keys){var o=Object.prototype.hasOwnProperty,i=Object.prototype.toString,l=n(4418),a=Object.prototype.propertyIsEnumerable,s=!a.call({toString:null},"toString"),c=a.call((function(){}),"prototype"),u=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],p=function(e){var t=e.constructor;return t&&t.prototype===e},d={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},f=function(){if("undefined"==typeof window)return!1;for(var e in window)try{if(!d["$"+e]&&o.call(window,e)&&null!==window[e]&&"object"==typeof window[e])try{p(window[e])}catch(e){return!0}}catch(e){return!0}return!1}();r=function(e){var t=null!==e&&"object"==typeof e,n="[object Function]"===i.call(e),r=l(e),a=t&&"[object String]"===i.call(e),d=[];if(!t&&!n&&!r)throw new TypeError("Object.keys called on a non-object");var m=c&&n;if(a&&e.length>0&&!o.call(e,0))for(var y=0;y<e.length;++y)d.push(String(y));if(r&&e.length>0)for(var g=0;g<e.length;++g)d.push(String(g));else for(var h in e)m&&"prototype"===h||!o.call(e,h)||d.push(String(h));if(s)for(var v=function(e){if("undefined"==typeof window||!f)return p(e);try{return p(e)}catch(e){return!1}}(e),b=0;b<u.length;++b)v&&"constructor"===u[b]||!o.call(e,u[b])||d.push(u[b]);return d}}e.exports=r},806:function(e,t,n){"use strict";var r=Array.prototype.slice,o=n(4418),i=Object.keys,l=i?function(e){return i(e)}:n(8383),a=Object.keys;l.shim=function(){if(Object.keys){var e=function(){var e=Object.keys(arguments);return e&&e.length===arguments.length}(1,2);e||(Object.keys=function(e){return o(e)?a(r.call(e)):a(e)})}else Object.keys=l;return Object.keys||l},e.exports=l},4418:function(e){"use strict";var t=Object.prototype.toString;e.exports=function(e){var n=t.call(e),r="[object Arguments]"===n;return r||(r="[object Array]"!==n&&null!==e&&"object"==typeof e&&"number"==typeof e.length&&e.length>=0&&"[object Function]"===t.call(e.callee)),r}},131:function(e){"use strict";e.exports=["Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]},5372:function(e,t,n){"use strict";var r=n(9567);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,i,l){if(l!==r){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:o};return n.PropTypes=n,n}},2652:function(e,t,n){e.exports=n(5372)()},9567:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},5438: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},l=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 a=n(9196),s=n(2652),c=n(6411),u=n(9894),p="autosize:resized",d=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(p,this.onResize)},t.prototype.componentWillUnmount=function(){this.textarea&&(this.textarea.removeEventListener(p,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=l(t,["onResize","maxRows","onChange","style","innerRef","children"]),c=this.state.lineHeight,u=n&&c?c*n:null;return a.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}(a.Component);t.TextareaAutosize=a.forwardRef((function(e,t){return a.createElement(d,i({},e,{innerRef:t}))}))},773:function(e,t,n){"use strict";var r=n(5438);t.Z=r.TextareaAutosize},4793:function(e){var t={"À":"A","Ã":"A","Â":"A","Ã":"A","Ä":"A","Ã…":"A","Ấ":"A","Ắ":"A","Ẳ":"A","Ẵ":"A","Ặ":"A","Æ":"AE","Ầ":"A","Ằ":"A","È‚":"A","Ç":"C","Ḉ":"C","È":"E","É":"E","Ê":"E","Ë":"E","Ế":"E","Ḗ":"E","Ề":"E","Ḕ":"E","Ḝ":"E","Ȇ":"E","ÃŒ":"I","Ã":"I","ÃŽ":"I","Ã":"I","Ḯ":"I","ÈŠ":"I","Ã":"D","Ñ":"N","Ã’":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","á»":"O","Ṍ":"O","á¹’":"O","ÈŽ":"O","Ù":"U","Ú":"U","Û":"U","Ãœ":"U","Ã":"Y","à ":"a","á":"a","â":"a","ã":"a","ä":"a","Ã¥":"a","ấ":"a","ắ":"a","ẳ":"a","ẵ":"a","ặ":"a","æ":"ae","ầ":"a","ằ":"a","ȃ":"a","ç":"c","ḉ":"c","è":"e","é":"e","ê":"e","ë":"e","ế":"e","ḗ":"e","á»":"e","ḕ":"e","á¸":"e","ȇ":"e","ì":"i","Ã":"i","î":"i","ï":"i","ḯ":"i","È‹":"i","ð":"d","ñ":"n","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","ố":"o","á¹":"o","ṓ":"o","È":"o","ù":"u","ú":"u","û":"u","ü":"u","ý":"y","ÿ":"y","Ä€":"A","Ä":"a","Ä‚":"A","ă":"a","Ä„":"A","Ä…":"a","Ć":"C","ć":"c","Ĉ":"C","ĉ":"c","ÄŠ":"C","Ä‹":"c","ÄŒ":"C","Ä":"c","C̆":"C","c̆":"c","ÄŽ":"D","Ä":"d","Ä":"D","Ä‘":"d","Ä’":"E","Ä“":"e","Ä”":"E","Ä•":"e","Ä–":"E","Ä—":"e","Ę":"E","Ä™":"e","Äš":"E","Ä›":"e","Äœ":"G","Ç´":"G","Ä":"g","ǵ":"g","Äž":"G","ÄŸ":"g","Ä ":"G","Ä¡":"g","Ä¢":"G","Ä£":"g","Ĥ":"H","Ä¥":"h","Ħ":"H","ħ":"h","Ḫ":"H","ḫ":"h","Ĩ":"I","Ä©":"i","Ī":"I","Ä«":"i","Ĭ":"I","Ä":"i","Ä®":"I","į":"i","Ä°":"I","ı":"i","IJ":"IJ","ij":"ij","Ä´":"J","ĵ":"j","Ķ":"K","Ä·":"k","Ḱ":"K","ḱ":"k","K̆":"K","k̆":"k","Ĺ":"L","ĺ":"l","Ä»":"L","ļ":"l","Ľ":"L","ľ":"l","Ä¿":"L","Å€":"l","Å":"l","Å‚":"l","Ḿ":"M","ḿ":"m","M̆":"M","m̆":"m","Ń":"N","Å„":"n","Å…":"N","ņ":"n","Ň":"N","ň":"n","ʼn":"n","N̆":"N","n̆":"n","ÅŒ":"O","Å":"o","ÅŽ":"O","Å":"o","Å":"O","Å‘":"o","Å’":"OE","Å“":"oe","P̆":"P","p̆":"p","Å”":"R","Å•":"r","Å–":"R","Å—":"r","Ř":"R","Å™":"r","R̆":"R","r̆":"r","È’":"R","È“":"r","Åš":"S","Å›":"s","Åœ":"S","Å":"s","Åž":"S","Ș":"S","È™":"s","ÅŸ":"s","Å ":"S","Å¡":"s","ß":"ss","Å¢":"T","Å£":"t","È›":"t","Èš":"T","Ť":"T","Å¥":"t","Ŧ":"T","ŧ":"t","T̆":"T","t̆":"t","Ũ":"U","Å©":"u","Ū":"U","Å«":"u","Ŭ":"U","Å":"u","Å®":"U","ů":"u","Å°":"U","ű":"u","Ų":"U","ų":"u","È–":"U","È—":"u","V̆":"V","v̆":"v","Å´":"W","ŵ":"w","Ẃ":"W","ẃ":"w","X̆":"X","x̆":"x","Ŷ":"Y","Å·":"y","Ÿ":"Y","Y̆":"Y","y̆":"y","Ź":"Z","ź":"z","Å»":"Z","ż":"z","Ž":"Z","ž":"z","Å¿":"s","Æ’":"f","Æ ":"O","Æ¡":"o","Ư":"U","Æ°":"u","Ç":"A","ÇŽ":"a","Ç":"I","Ç":"i","Ç‘":"O","Ç’":"o","Ç“":"U","Ç”":"u","Ç•":"U","Ç–":"u","Ç—":"U","ǘ":"u","Ç™":"U","Çš":"u","Ç›":"U","Çœ":"u","Ứ":"U","ứ":"u","Ṹ":"U","á¹¹":"u","Ǻ":"A","Ç»":"a","Ǽ":"AE","ǽ":"ae","Ǿ":"O","Ç¿":"o","Þ":"TH","þ":"th","á¹”":"P","ṕ":"p","Ṥ":"S","á¹¥":"s","XÌ":"X","xÌ":"x","Ѓ":"Г","Ñ“":"г","ÐŒ":"К","Ñœ":"к","AÌ‹":"A","aÌ‹":"a","EÌ‹":"E","eÌ‹":"e","IÌ‹":"I","iÌ‹":"i","Ǹ":"N","ǹ":"n","á»’":"O","ồ":"o","á¹":"O","ṑ":"o","Ừ":"U","ừ":"u","Ẁ":"W","áº":"w","Ỳ":"Y","ỳ":"y","È€":"A","È":"a","È„":"E","È…":"e","Ȉ":"I","ȉ":"i","ÈŒ":"O","È":"o","È":"R","È‘":"r","È”":"U","È•":"u","BÌŒ":"B","bÌŒ":"b","Č̣":"C","ÄÌ£":"c","Ê̌":"E","ê̌":"e","FÌŒ":"F","fÌŒ":"f","Ǧ":"G","ǧ":"g","Èž":"H","ÈŸ":"h","JÌŒ":"J","Ç°":"j","Ǩ":"K","Ç©":"k","MÌŒ":"M","mÌŒ":"m","PÌŒ":"P","pÌŒ":"p","QÌŒ":"Q","qÌŒ":"q","Ř̩":"R","ř̩":"r","Ṧ":"S","ṧ":"s","VÌŒ":"V","vÌŒ":"v","WÌŒ":"W","wÌŒ":"w","XÌŒ":"X","xÌŒ":"x","YÌŒ":"Y","yÌŒ":"y","A̧":"A","a̧":"a","B̧":"B","b̧":"b","á¸":"D","ḑ":"d","Ȩ":"E","È©":"e","Æ̧":"E","ɛ̧":"e","Ḩ":"H","ḩ":"h","I̧":"I","i̧":"i","Ɨ̧":"I","ɨ̧":"i","M̧":"M","m̧":"m","O̧":"O","o̧":"o","Q̧":"Q","q̧":"q","U̧":"U","u̧":"u","X̧":"X","x̧":"x","Z̧":"Z","z̧":"z","й":"и","Й":"И","Ñ‘":"е","Ð":"Е"},n=Object.keys(t).join("|"),r=new RegExp(n,"g"),o=new RegExp(n,"");function i(e){return t[e]}var l=function(e){return e.replace(r,i)};e.exports=l,e.exports.has=function(e){return!!e.match(o)},e.exports.remove=l},3002:function(e,t,n){"use strict";var r=n(8024)("%Array.prototype.concat%"),o=n(9386),i=n(3315)("Array.prototype.slice"),l=n(1489)()&&Symbol.isConcatSpreadable,a=[],s=l?o.apply(r,a):null,c=l?n(9277):null;e.exports=l?function(e){for(var t=0;t<arguments.length;t+=1){var n=arguments[t];if(n&&"object"==typeof n&&"boolean"==typeof n[l]){a[l]||(a[l]=!0);var r=c(n)?i(n):[n];r[l]=!0,arguments[t]=r}}return s(arguments)}:o(r,a)},3315:function(e,t,n){"use strict";var r=n(8024),o=n(9386),i=o(r("String.prototype.indexOf"));e.exports=function(e,t){var n=r(e,!!t);return"function"==typeof n&&i(e,".prototype.")>-1?o(n):n}},9386:function(e,t,n){"use strict";var r=n(5127),o=n(8024),i=n(4521),l=n(1642),a=o("%Function.prototype.apply%"),s=o("%Function.prototype.call%"),c=o("%Reflect.apply%",!0)||r.call(s,a),u=n(8918),p=o("%Math.max%");e.exports=function(e){if("function"!=typeof e)throw new l("a function is required");var t=c(r,s,arguments);return i(t,1+p(0,e.length-(arguments.length-1)),!0)};var d=function(){return c(r,a,arguments)};u?u(e.exports,"apply",{value:d}):e.exports.apply=d},6850:function(e){"use strict";var t="Function.prototype.bind called on incompatible ",n=Object.prototype.toString,r=Math.max,o="[object Function]",i=function(e,t){for(var n=[],r=0;r<e.length;r+=1)n[r]=e[r];for(var o=0;o<t.length;o+=1)n[o+e.length]=t[o];return n},l=function(e,t){for(var n=[],r=t||0,o=0;r<e.length;r+=1,o+=1)n[o]=e[r];return n},a=function(e,t){for(var n="",r=0;r<e.length;r+=1)n+=e[r],r+1<e.length&&(n+=t);return n};e.exports=function(e){var s=this;if("function"!=typeof s||n.apply(s)!==o)throw new TypeError(t+s);for(var c,u=l(arguments,1),p=function(){if(this instanceof c){var t=s.apply(this,i(u,arguments));return Object(t)===t?t:this}return s.apply(e,i(u,arguments))},d=r(0,s.length-u.length),f=[],m=0;m<d;m++)f[m]="$"+m;if(c=Function("binder","return function ("+a(f,",")+"){ return binder.apply(this,arguments); }")(p),s.prototype){var y=function(){};y.prototype=s.prototype,c.prototype=new y,y.prototype=null}return c}},5127:function(e,t,n){"use strict";var r=n(6850);e.exports=Function.prototype.bind||r},8024:function(e,t,n){"use strict";var r,o=n(6716),i=n(6788),l=n(9204),a=n(9908),s=n(6724),c=n(1642),u=n(1451),p=Function,d=function(e){try{return p('"use strict"; return ('+e+").constructor;")()}catch(e){}},f=Object.getOwnPropertyDescriptor;if(f)try{f({},"")}catch(e){f=null}var m=function(){throw new c},y=f?function(){try{return m}catch(e){try{return f(arguments,"callee").get}catch(e){return m}}}():m,g=n(330)(),h=n(1856)(),v=Object.getPrototypeOf||(h?function(e){return e.__proto__}:null),b={},_="undefined"!=typeof Uint8Array&&v?v(Uint8Array):r,k={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?r:ArrayBuffer,"%ArrayIteratorPrototype%":g&&v?v([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":b,"%AsyncGenerator%":b,"%AsyncGeneratorFunction%":b,"%AsyncIteratorPrototype%":b,"%Atomics%":"undefined"==typeof Atomics?r:Atomics,"%BigInt%":"undefined"==typeof BigInt?r:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?r:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?r:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":o,"%eval%":eval,"%EvalError%":i,"%Float32Array%":"undefined"==typeof Float32Array?r:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?r:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?r:FinalizationRegistry,"%Function%":p,"%GeneratorFunction%":b,"%Int8Array%":"undefined"==typeof Int8Array?r:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?r:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":g&&v?v(v([][Symbol.iterator]())):r,"%JSON%":"object"==typeof JSON?JSON:r,"%Map%":"undefined"==typeof Map?r:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&g&&v?v((new Map)[Symbol.iterator]()):r,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?r:Promise,"%Proxy%":"undefined"==typeof Proxy?r:Proxy,"%RangeError%":l,"%ReferenceError%":a,"%Reflect%":"undefined"==typeof Reflect?r:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?r:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&g&&v?v((new Set)[Symbol.iterator]()):r,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":g&&v?v(""[Symbol.iterator]()):r,"%Symbol%":g?Symbol:r,"%SyntaxError%":s,"%ThrowTypeError%":y,"%TypedArray%":_,"%TypeError%":c,"%Uint8Array%":"undefined"==typeof Uint8Array?r:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?r:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?r:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?r:Uint32Array,"%URIError%":u,"%WeakMap%":"undefined"==typeof WeakMap?r:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?r:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?r:WeakSet};if(v)try{null.error}catch(e){var E=v(v(e));k["%Error.prototype%"]=E}var S=function e(t){var n;if("%AsyncFunction%"===t)n=d("async function () {}");else if("%GeneratorFunction%"===t)n=d("function* () {}");else if("%AsyncGeneratorFunction%"===t)n=d("async function* () {}");else if("%AsyncGenerator%"===t){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if("%AsyncIteratorPrototype%"===t){var o=e("%AsyncGenerator%");o&&v&&(n=v(o.prototype))}return k[t]=n,n},w={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},C=n(5127),I=n(9429),A=C.call(Function.call,Array.prototype.concat),x=C.call(Function.apply,Array.prototype.splice),B=C.call(Function.call,String.prototype.replace),P=C.call(Function.call,String.prototype.slice),T=C.call(Function.call,RegExp.prototype.exec),O=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,N=/\\(\\)?/g,M=function(e){var t=P(e,0,1),n=P(e,-1);if("%"===t&&"%"!==n)throw new s("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==t)throw new s("invalid intrinsic syntax, expected opening `%`");var r=[];return B(e,O,(function(e,t,n,o){r[r.length]=n?B(o,N,"$1"):t||e})),r},R=function(e,t){var n,r=e;if(I(w,r)&&(r="%"+(n=w[r])[0]+"%"),I(k,r)){var o=k[r];if(o===b&&(o=S(r)),void 0===o&&!t)throw new c("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:r,value:o}}throw new s("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new c("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new c('"allowMissing" argument must be a boolean');if(null===T(/^%?[^%]*%?$/,e))throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=M(e),r=n.length>0?n[0]:"",o=R("%"+r+"%",t),i=o.name,l=o.value,a=!1,u=o.alias;u&&(r=u[0],x(n,A([0,1],u)));for(var p=1,d=!0;p<n.length;p+=1){var m=n[p],y=P(m,0,1),g=P(m,-1);if(('"'===y||"'"===y||"`"===y||'"'===g||"'"===g||"`"===g)&&y!==g)throw new s("property names with quotes must have matching quotes");if("constructor"!==m&&d||(a=!0),I(k,i="%"+(r+="."+m)+"%"))l=k[i];else if(null!=l){if(!(m in l)){if(!t)throw new c("base intrinsic for "+e+" exists, but the property is not available.");return}if(f&&p+1>=n.length){var h=f(l,m);l=(d=!!h)&&"get"in h&&!("originalValue"in h.get)?h.get:l[m]}else d=I(l,m),l=l[m];d&&!a&&(k[i]=l)}}return l}},330:function(e,t,n){"use strict";var r="undefined"!=typeof Symbol&&Symbol,o=n(1489);e.exports=function(){return"function"==typeof r&&("function"==typeof Symbol&&("symbol"==typeof r("foo")&&("symbol"==typeof Symbol("bar")&&o())))}},1489:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},9277:function(e){var t={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==t.call(e)}},1312:function(e,t,n){"use strict";var r=n(2137),o=n(6073),i=r("RegExp.prototype.exec"),l=n(1642);e.exports=function(e){if(!o(e))throw new l("`regex` must be a RegExp");return function(t){return null!==i(e,t)}}},2137:function(e,t,n){"use strict";var r=n(5273),o=n(381),i=o(r("String.prototype.indexOf"));e.exports=function(e,t){var n=r(e,!!t);return"function"==typeof n&&i(e,".prototype.")>-1?o(n):n}},381:function(e,t,n){"use strict";var r=n(3331),o=n(5273),i=n(4521),l=n(1642),a=o("%Function.prototype.apply%"),s=o("%Function.prototype.call%"),c=o("%Reflect.apply%",!0)||r.call(s,a),u=n(8918),p=o("%Math.max%");e.exports=function(e){if("function"!=typeof e)throw new l("a function is required");var t=c(r,s,arguments);return i(t,1+p(0,e.length-(arguments.length-1)),!0)};var d=function(){return c(r,a,arguments)};u?u(e.exports,"apply",{value:d}):e.exports.apply=d},7780:function(e){"use strict";var t="Function.prototype.bind called on incompatible ",n=Object.prototype.toString,r=Math.max,o="[object Function]",i=function(e,t){for(var n=[],r=0;r<e.length;r+=1)n[r]=e[r];for(var o=0;o<t.length;o+=1)n[o+e.length]=t[o];return n},l=function(e,t){for(var n=[],r=t||0,o=0;r<e.length;r+=1,o+=1)n[o]=e[r];return n},a=function(e,t){for(var n="",r=0;r<e.length;r+=1)n+=e[r],r+1<e.length&&(n+=t);return n};e.exports=function(e){var s=this;if("function"!=typeof s||n.apply(s)!==o)throw new TypeError(t+s);for(var c,u=l(arguments,1),p=function(){if(this instanceof c){var t=s.apply(this,i(u,arguments));return Object(t)===t?t:this}return s.apply(e,i(u,arguments))},d=r(0,s.length-u.length),f=[],m=0;m<d;m++)f[m]="$"+m;if(c=Function("binder","return function ("+a(f,",")+"){ return binder.apply(this,arguments); }")(p),s.prototype){var y=function(){};y.prototype=s.prototype,c.prototype=new y,y.prototype=null}return c}},3331:function(e,t,n){"use strict";var r=n(7780);e.exports=Function.prototype.bind||r},5273:function(e,t,n){"use strict";var r,o=n(6716),i=n(6788),l=n(9204),a=n(9908),s=n(6724),c=n(1642),u=n(1451),p=Function,d=function(e){try{return p('"use strict"; return ('+e+").constructor;")()}catch(e){}},f=Object.getOwnPropertyDescriptor;if(f)try{f({},"")}catch(e){f=null}var m=function(){throw new c},y=f?function(){try{return m}catch(e){try{return f(arguments,"callee").get}catch(e){return m}}}():m,g=n(6339)(),h=n(1856)(),v=Object.getPrototypeOf||(h?function(e){return e.__proto__}:null),b={},_="undefined"!=typeof Uint8Array&&v?v(Uint8Array):r,k={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?r:ArrayBuffer,"%ArrayIteratorPrototype%":g&&v?v([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":b,"%AsyncGenerator%":b,"%AsyncGeneratorFunction%":b,"%AsyncIteratorPrototype%":b,"%Atomics%":"undefined"==typeof Atomics?r:Atomics,"%BigInt%":"undefined"==typeof BigInt?r:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?r:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?r:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":o,"%eval%":eval,"%EvalError%":i,"%Float32Array%":"undefined"==typeof Float32Array?r:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?r:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?r:FinalizationRegistry,"%Function%":p,"%GeneratorFunction%":b,"%Int8Array%":"undefined"==typeof Int8Array?r:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?r:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":g&&v?v(v([][Symbol.iterator]())):r,"%JSON%":"object"==typeof JSON?JSON:r,"%Map%":"undefined"==typeof Map?r:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&g&&v?v((new Map)[Symbol.iterator]()):r,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?r:Promise,"%Proxy%":"undefined"==typeof Proxy?r:Proxy,"%RangeError%":l,"%ReferenceError%":a,"%Reflect%":"undefined"==typeof Reflect?r:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?r:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&g&&v?v((new Set)[Symbol.iterator]()):r,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":g&&v?v(""[Symbol.iterator]()):r,"%Symbol%":g?Symbol:r,"%SyntaxError%":s,"%ThrowTypeError%":y,"%TypedArray%":_,"%TypeError%":c,"%Uint8Array%":"undefined"==typeof Uint8Array?r:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?r:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?r:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?r:Uint32Array,"%URIError%":u,"%WeakMap%":"undefined"==typeof WeakMap?r:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?r:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?r:WeakSet};if(v)try{null.error}catch(e){var E=v(v(e));k["%Error.prototype%"]=E}var S=function e(t){var n;if("%AsyncFunction%"===t)n=d("async function () {}");else if("%GeneratorFunction%"===t)n=d("function* () {}");else if("%AsyncGeneratorFunction%"===t)n=d("async function* () {}");else if("%AsyncGenerator%"===t){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if("%AsyncIteratorPrototype%"===t){var o=e("%AsyncGenerator%");o&&v&&(n=v(o.prototype))}return k[t]=n,n},w={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},C=n(3331),I=n(9429),A=C.call(Function.call,Array.prototype.concat),x=C.call(Function.apply,Array.prototype.splice),B=C.call(Function.call,String.prototype.replace),P=C.call(Function.call,String.prototype.slice),T=C.call(Function.call,RegExp.prototype.exec),O=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,N=/\\(\\)?/g,M=function(e){var t=P(e,0,1),n=P(e,-1);if("%"===t&&"%"!==n)throw new s("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==t)throw new s("invalid intrinsic syntax, expected opening `%`");var r=[];return B(e,O,(function(e,t,n,o){r[r.length]=n?B(o,N,"$1"):t||e})),r},R=function(e,t){var n,r=e;if(I(w,r)&&(r="%"+(n=w[r])[0]+"%"),I(k,r)){var o=k[r];if(o===b&&(o=S(r)),void 0===o&&!t)throw new c("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:r,value:o}}throw new s("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new c("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new c('"allowMissing" argument must be a boolean');if(null===T(/^%?[^%]*%?$/,e))throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=M(e),r=n.length>0?n[0]:"",o=R("%"+r+"%",t),i=o.name,l=o.value,a=!1,u=o.alias;u&&(r=u[0],x(n,A([0,1],u)));for(var p=1,d=!0;p<n.length;p+=1){var m=n[p],y=P(m,0,1),g=P(m,-1);if(('"'===y||"'"===y||"`"===y||'"'===g||"'"===g||"`"===g)&&y!==g)throw new s("property names with quotes must have matching quotes");if("constructor"!==m&&d||(a=!0),I(k,i="%"+(r+="."+m)+"%"))l=k[i];else if(null!=l){if(!(m in l)){if(!t)throw new c("base intrinsic for "+e+" exists, but the property is not available.");return}if(f&&p+1>=n.length){var h=f(l,m);l=(d=!!h)&&"get"in h&&!("originalValue"in h.get)?h.get:l[m]}else d=I(l,m),l=l[m];d&&!a&&(k[i]=l)}}return l}},6339:function(e,t,n){"use strict";var r="undefined"!=typeof Symbol&&Symbol,o=n(6789);e.exports=function(){return"function"==typeof r&&("function"==typeof Symbol&&("symbol"==typeof r("foo")&&("symbol"==typeof Symbol("bar")&&o())))}},6789:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},6073:function(e,t,n){"use strict";var r,o,i,l,a=n(2137),s=n(4111)();if(s){r=a("Object.prototype.hasOwnProperty"),o=a("RegExp.prototype.exec"),i={};var c=function(){throw i};l={toString:c,valueOf:c},"symbol"==typeof Symbol.toPrimitive&&(l[Symbol.toPrimitive]=c)}var u=a("Object.prototype.toString"),p=Object.getOwnPropertyDescriptor;e.exports=s?function(e){if(!e||"object"!=typeof e)return!1;var t=p(e,"lastIndex");if(!(t&&r(t,"value")))return!1;try{o(e,l)}catch(e){return e===i}}:function(e){return!(!e||"object"!=typeof e&&"function"!=typeof e)&&"[object RegExp]"===u(e)}},4521:function(e,t,n){"use strict";var r=n(1757),o=n(2656),i=n(8198)(),l=n(3828),a=n(1642),s=r("%Math.floor%");e.exports=function(e,t){if("function"!=typeof e)throw new a("`fn` is not a function");if("number"!=typeof t||t<0||t>4294967295||s(t)!==t)throw new a("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],r=!0,c=!0;if("length"in e&&l){var u=l(e,"length");u&&!u.configurable&&(r=!1),u&&!u.writable&&(c=!1)}return(r||c||!n)&&(i?o(e,"length",t,!0,!0):o(e,"length",t)),e}},5371:function(e){"use strict";var t="Function.prototype.bind called on incompatible ",n=Object.prototype.toString,r=Math.max,o="[object Function]",i=function(e,t){for(var n=[],r=0;r<e.length;r+=1)n[r]=e[r];for(var o=0;o<t.length;o+=1)n[o+e.length]=t[o];return n},l=function(e,t){for(var n=[],r=t||0,o=0;r<e.length;r+=1,o+=1)n[o]=e[r];return n},a=function(e,t){for(var n="",r=0;r<e.length;r+=1)n+=e[r],r+1<e.length&&(n+=t);return n};e.exports=function(e){var s=this;if("function"!=typeof s||n.apply(s)!==o)throw new TypeError(t+s);for(var c,u=l(arguments,1),p=function(){if(this instanceof c){var t=s.apply(this,i(u,arguments));return Object(t)===t?t:this}return s.apply(e,i(u,arguments))},d=r(0,s.length-u.length),f=[],m=0;m<d;m++)f[m]="$"+m;if(c=Function("binder","return function ("+a(f,",")+"){ return binder.apply(this,arguments); }")(p),s.prototype){var y=function(){};y.prototype=s.prototype,c.prototype=new y,y.prototype=null}return c}},9015:function(e,t,n){"use strict";var r=n(5371);e.exports=Function.prototype.bind||r},1757:function(e,t,n){"use strict";var r,o=n(6716),i=n(6788),l=n(9204),a=n(9908),s=n(6724),c=n(1642),u=n(1451),p=Function,d=function(e){try{return p('"use strict"; return ('+e+").constructor;")()}catch(e){}},f=Object.getOwnPropertyDescriptor;if(f)try{f({},"")}catch(e){f=null}var m=function(){throw new c},y=f?function(){try{return m}catch(e){try{return f(arguments,"callee").get}catch(e){return m}}}():m,g=n(1207)(),h=n(1856)(),v=Object.getPrototypeOf||(h?function(e){return e.__proto__}:null),b={},_="undefined"!=typeof Uint8Array&&v?v(Uint8Array):r,k={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?r:ArrayBuffer,"%ArrayIteratorPrototype%":g&&v?v([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":b,"%AsyncGenerator%":b,"%AsyncGeneratorFunction%":b,"%AsyncIteratorPrototype%":b,"%Atomics%":"undefined"==typeof Atomics?r:Atomics,"%BigInt%":"undefined"==typeof BigInt?r:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?r:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?r:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":o,"%eval%":eval,"%EvalError%":i,"%Float32Array%":"undefined"==typeof Float32Array?r:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?r:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?r:FinalizationRegistry,"%Function%":p,"%GeneratorFunction%":b,"%Int8Array%":"undefined"==typeof Int8Array?r:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?r:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":g&&v?v(v([][Symbol.iterator]())):r,"%JSON%":"object"==typeof JSON?JSON:r,"%Map%":"undefined"==typeof Map?r:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&g&&v?v((new Map)[Symbol.iterator]()):r,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?r:Promise,"%Proxy%":"undefined"==typeof Proxy?r:Proxy,"%RangeError%":l,"%ReferenceError%":a,"%Reflect%":"undefined"==typeof Reflect?r:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?r:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&g&&v?v((new Set)[Symbol.iterator]()):r,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":g&&v?v(""[Symbol.iterator]()):r,"%Symbol%":g?Symbol:r,"%SyntaxError%":s,"%ThrowTypeError%":y,"%TypedArray%":_,"%TypeError%":c,"%Uint8Array%":"undefined"==typeof Uint8Array?r:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?r:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?r:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?r:Uint32Array,"%URIError%":u,"%WeakMap%":"undefined"==typeof WeakMap?r:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?r:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?r:WeakSet};if(v)try{null.error}catch(e){var E=v(v(e));k["%Error.prototype%"]=E}var S=function e(t){var n;if("%AsyncFunction%"===t)n=d("async function () {}");else if("%GeneratorFunction%"===t)n=d("function* () {}");else if("%AsyncGeneratorFunction%"===t)n=d("async function* () {}");else if("%AsyncGenerator%"===t){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if("%AsyncIteratorPrototype%"===t){var o=e("%AsyncGenerator%");o&&v&&(n=v(o.prototype))}return k[t]=n,n},w={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},C=n(9015),I=n(9429),A=C.call(Function.call,Array.prototype.concat),x=C.call(Function.apply,Array.prototype.splice),B=C.call(Function.call,String.prototype.replace),P=C.call(Function.call,String.prototype.slice),T=C.call(Function.call,RegExp.prototype.exec),O=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,N=/\\(\\)?/g,M=function(e){var t=P(e,0,1),n=P(e,-1);if("%"===t&&"%"!==n)throw new s("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==t)throw new s("invalid intrinsic syntax, expected opening `%`");var r=[];return B(e,O,(function(e,t,n,o){r[r.length]=n?B(o,N,"$1"):t||e})),r},R=function(e,t){var n,r=e;if(I(w,r)&&(r="%"+(n=w[r])[0]+"%"),I(k,r)){var o=k[r];if(o===b&&(o=S(r)),void 0===o&&!t)throw new c("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:r,value:o}}throw new s("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new c("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new c('"allowMissing" argument must be a boolean');if(null===T(/^%?[^%]*%?$/,e))throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=M(e),r=n.length>0?n[0]:"",o=R("%"+r+"%",t),i=o.name,l=o.value,a=!1,u=o.alias;u&&(r=u[0],x(n,A([0,1],u)));for(var p=1,d=!0;p<n.length;p+=1){var m=n[p],y=P(m,0,1),g=P(m,-1);if(('"'===y||"'"===y||"`"===y||'"'===g||"'"===g||"`"===g)&&y!==g)throw new s("property names with quotes must have matching quotes");if("constructor"!==m&&d||(a=!0),I(k,i="%"+(r+="."+m)+"%"))l=k[i];else if(null!=l){if(!(m in l)){if(!t)throw new c("base intrinsic for "+e+" exists, but the property is not available.");return}if(f&&p+1>=n.length){var h=f(l,m);l=(d=!!h)&&"get"in h&&!("originalValue"in h.get)?h.get:l[m]}else d=I(l,m),l=l[m];d&&!a&&(k[i]=l)}}return l}},1207:function(e,t,n){"use strict";var r="undefined"!=typeof Symbol&&Symbol,o=n(2326);e.exports=function(){return"function"==typeof r&&("function"==typeof Symbol&&("symbol"==typeof r("foo")&&("symbol"==typeof Symbol("bar")&&o())))}},2326:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},5467:function(e,t,n){"use strict";var r=n(7998),o=n(6245),i=n(6907)("String.prototype.replace"),l=/^\s$/.test("á Ž"),a=l?/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/:/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/,s=l?/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/:/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/;e.exports=function(){var e=o(r(this));return i(i(e,a,""),s,"")}},4113:function(e,t,n){"use strict";var r=n(7618),o=n(5213),i=n(7998),l=n(5467),a=n(5626),s=n(1029),c=r(a()),u=function(e){return i(e),c(e)};o(u,{getPolyfill:a,implementation:l,shim:s}),e.exports=u},6907:function(e,t,n){"use strict";var r=n(5037),o=n(7618),i=o(r("String.prototype.indexOf"));e.exports=function(e,t){var n=r(e,!!t);return"function"==typeof n&&i(e,".prototype.")>-1?o(n):n}},7618:function(e,t,n){"use strict";var r=n(1769),o=n(5037),i=n(4521),l=n(1642),a=o("%Function.prototype.apply%"),s=o("%Function.prototype.call%"),c=o("%Reflect.apply%",!0)||r.call(s,a),u=n(8918),p=o("%Math.max%");e.exports=function(e){if("function"!=typeof e)throw new l("a function is required");var t=c(r,s,arguments);return i(t,1+p(0,e.length-(arguments.length-1)),!0)};var d=function(){return c(r,a,arguments)};u?u(e.exports,"apply",{value:d}):e.exports.apply=d},5213:function(e,t,n){"use strict";var r=n(806),o="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),i=Object.prototype.toString,l=Array.prototype.concat,a=n(2656),s=n(8198)(),c=function(e,t,n,r){if(t in e)if(!0===r){if(e[t]===n)return}else if("function"!=typeof(o=r)||"[object Function]"!==i.call(o)||!r())return;var o;s?a(e,t,n,!0):a(e,t,n)},u=function(e,t){var n=arguments.length>2?arguments[2]:{},i=r(t);o&&(i=l.call(i,Object.getOwnPropertySymbols(t)));for(var a=0;a<i.length;a+=1)c(e,i[a],t[i[a]],n[i[a]])};u.supportsDescriptors=!!s,e.exports=u},1032:function(e){"use strict";var t="Function.prototype.bind called on incompatible ",n=Object.prototype.toString,r=Math.max,o="[object Function]",i=function(e,t){for(var n=[],r=0;r<e.length;r+=1)n[r]=e[r];for(var o=0;o<t.length;o+=1)n[o+e.length]=t[o];return n},l=function(e,t){for(var n=[],r=t||0,o=0;r<e.length;r+=1,o+=1)n[o]=e[r];return n},a=function(e,t){for(var n="",r=0;r<e.length;r+=1)n+=e[r],r+1<e.length&&(n+=t);return n};e.exports=function(e){var s=this;if("function"!=typeof s||n.apply(s)!==o)throw new TypeError(t+s);for(var c,u=l(arguments,1),p=function(){if(this instanceof c){var t=s.apply(this,i(u,arguments));return Object(t)===t?t:this}return s.apply(e,i(u,arguments))},d=r(0,s.length-u.length),f=[],m=0;m<d;m++)f[m]="$"+m;if(c=Function("binder","return function ("+a(f,",")+"){ return binder.apply(this,arguments); }")(p),s.prototype){var y=function(){};y.prototype=s.prototype,c.prototype=new y,y.prototype=null}return c}},1769:function(e,t,n){"use strict";var r=n(1032);e.exports=Function.prototype.bind||r},5037:function(e,t,n){"use strict";var r,o=n(6716),i=n(6788),l=n(9204),a=n(9908),s=n(6724),c=n(1642),u=n(1451),p=Function,d=function(e){try{return p('"use strict"; return ('+e+").constructor;")()}catch(e){}},f=Object.getOwnPropertyDescriptor;if(f)try{f({},"")}catch(e){f=null}var m=function(){throw new c},y=f?function(){try{return m}catch(e){try{return f(arguments,"callee").get}catch(e){return m}}}():m,g=n(5570)(),h=n(1856)(),v=Object.getPrototypeOf||(h?function(e){return e.__proto__}:null),b={},_="undefined"!=typeof Uint8Array&&v?v(Uint8Array):r,k={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?r:ArrayBuffer,"%ArrayIteratorPrototype%":g&&v?v([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":b,"%AsyncGenerator%":b,"%AsyncGeneratorFunction%":b,"%AsyncIteratorPrototype%":b,"%Atomics%":"undefined"==typeof Atomics?r:Atomics,"%BigInt%":"undefined"==typeof BigInt?r:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?r:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?r:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":o,"%eval%":eval,"%EvalError%":i,"%Float32Array%":"undefined"==typeof Float32Array?r:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?r:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?r:FinalizationRegistry,"%Function%":p,"%GeneratorFunction%":b,"%Int8Array%":"undefined"==typeof Int8Array?r:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?r:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":g&&v?v(v([][Symbol.iterator]())):r,"%JSON%":"object"==typeof JSON?JSON:r,"%Map%":"undefined"==typeof Map?r:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&g&&v?v((new Map)[Symbol.iterator]()):r,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?r:Promise,"%Proxy%":"undefined"==typeof Proxy?r:Proxy,"%RangeError%":l,"%ReferenceError%":a,"%Reflect%":"undefined"==typeof Reflect?r:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?r:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&g&&v?v((new Set)[Symbol.iterator]()):r,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":g&&v?v(""[Symbol.iterator]()):r,"%Symbol%":g?Symbol:r,"%SyntaxError%":s,"%ThrowTypeError%":y,"%TypedArray%":_,"%TypeError%":c,"%Uint8Array%":"undefined"==typeof Uint8Array?r:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?r:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?r:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?r:Uint32Array,"%URIError%":u,"%WeakMap%":"undefined"==typeof WeakMap?r:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?r:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?r:WeakSet};if(v)try{null.error}catch(e){var E=v(v(e));k["%Error.prototype%"]=E}var S=function e(t){var n;if("%AsyncFunction%"===t)n=d("async function () {}");else if("%GeneratorFunction%"===t)n=d("function* () {}");else if("%AsyncGeneratorFunction%"===t)n=d("async function* () {}");else if("%AsyncGenerator%"===t){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if("%AsyncIteratorPrototype%"===t){var o=e("%AsyncGenerator%");o&&v&&(n=v(o.prototype))}return k[t]=n,n},w={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},C=n(1769),I=n(9429),A=C.call(Function.call,Array.prototype.concat),x=C.call(Function.apply,Array.prototype.splice),B=C.call(Function.call,String.prototype.replace),P=C.call(Function.call,String.prototype.slice),T=C.call(Function.call,RegExp.prototype.exec),O=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,N=/\\(\\)?/g,M=function(e){var t=P(e,0,1),n=P(e,-1);if("%"===t&&"%"!==n)throw new s("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==t)throw new s("invalid intrinsic syntax, expected opening `%`");var r=[];return B(e,O,(function(e,t,n,o){r[r.length]=n?B(o,N,"$1"):t||e})),r},R=function(e,t){var n,r=e;if(I(w,r)&&(r="%"+(n=w[r])[0]+"%"),I(k,r)){var o=k[r];if(o===b&&(o=S(r)),void 0===o&&!t)throw new c("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:r,value:o}}throw new s("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new c("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new c('"allowMissing" argument must be a boolean');if(null===T(/^%?[^%]*%?$/,e))throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=M(e),r=n.length>0?n[0]:"",o=R("%"+r+"%",t),i=o.name,l=o.value,a=!1,u=o.alias;u&&(r=u[0],x(n,A([0,1],u)));for(var p=1,d=!0;p<n.length;p+=1){var m=n[p],y=P(m,0,1),g=P(m,-1);if(('"'===y||"'"===y||"`"===y||'"'===g||"'"===g||"`"===g)&&y!==g)throw new s("property names with quotes must have matching quotes");if("constructor"!==m&&d||(a=!0),I(k,i="%"+(r+="."+m)+"%"))l=k[i];else if(null!=l){if(!(m in l)){if(!t)throw new c("base intrinsic for "+e+" exists, but the property is not available.");return}if(f&&p+1>=n.length){var h=f(l,m);l=(d=!!h)&&"get"in h&&!("originalValue"in h.get)?h.get:l[m]}else d=I(l,m),l=l[m];d&&!a&&(k[i]=l)}}return l}},5570:function(e,t,n){"use strict";var r="undefined"!=typeof Symbol&&Symbol,o=n(5889);e.exports=function(){return"function"==typeof r&&("function"==typeof Symbol&&("symbol"==typeof r("foo")&&("symbol"==typeof Symbol("bar")&&o())))}},5889:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},5626:function(e,t,n){"use strict";var r=n(5467),o="á Ž";e.exports=function(){return String.prototype.trim&&"​"==="​".trim()&&o.trim()===o&&"_á Ž"==="_á Ž".trim()&&"á Ž_"==="á Ž_".trim()?String.prototype.trim:r}},1029:function(e,t,n){"use strict";var r=n(5213),o=n(5626);e.exports=function(){var e=o();return r(String.prototype,{trim:e},{trim:function(){return String.prototype.trim!==e}}),e}},3124:function(e,t,n){"use strict";var r=n(4010),o=n(1140),i=n(3828);function l(e){return Object.prototype.toString.call(e)}var a=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function s(e,t){if(e.forEach)return e.forEach(t);for(var n=0;n<e.length;n++)t(e[n],n,e)}var c=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t},u=Object.prototype.propertyIsEnumerable,p=Object.getOwnPropertySymbols;function d(e){var t=c(e);if(p)for(var n=p(e),r=0;r<n.length;r++)u.call(e,n[r])&&t.push(n[r]);return t}var f=Object.prototype.hasOwnProperty||function(e,t){return t in e};function m(e,t){return"function"!=typeof i||!i(e,t).writable}function y(e,t){if("object"==typeof e&&null!==e){var n;if(a(e))n=[];else if("[object Date]"===l(e))n=new Date(e.getTime?e.getTime():e);else if(function(e){return"[object RegExp]"===l(e)}(e))n=new RegExp(e);else if(function(e){return"[object Error]"===l(e)}(e))n={message:e.message};else if(function(e){return"[object Boolean]"===l(e)}(e)||function(e){return"[object Number]"===l(e)}(e)||function(e){return"[object String]"===l(e)}(e))n=Object(e);else{if(r(e))return o(e);if(Object.create&&Object.getPrototypeOf)n=Object.create(Object.getPrototypeOf(e));else if(e.constructor===Object)n={};else{var i=e.constructor&&e.constructor.prototype||e.__proto__||{},u=function(){};u.prototype=i,n=new u}}return s((t.includeSymbols?d:c)(e),(function(t){n[t]=e[t]})),n}return e}var g={__proto__:null};function h(e,t){var n=[],r=[],o=!0,i=arguments.length>2?arguments[2]:g,l=i.includeSymbols?d:c,u=!!i.immutable;return function e(c){var p=u?y(c,i):c,d={},g=!0,h={node:p,node_:c,path:[].concat(n),parent:r[r.length-1],parents:r,key:n[n.length-1],isRoot:0===n.length,level:n.length,circular:null,update:function(e,t){h.isRoot||(h.parent.node[h.key]=e),h.node=e,t&&(g=!1)},delete:function(e){delete h.parent.node[h.key],e&&(g=!1)},remove:function(e){a(h.parent.node)?h.parent.node.splice(h.key,1):delete h.parent.node[h.key],e&&(g=!1)},keys:null,before:function(e){d.before=e},after:function(e){d.after=e},pre:function(e){d.pre=e},post:function(e){d.post=e},stop:function(){o=!1},block:function(){g=!1}};if(!o)return h;function v(){if("object"==typeof h.node&&null!==h.node){h.keys&&h.node_===h.node||(h.keys=l(h.node)),h.isLeaf=0===h.keys.length;for(var e=0;e<r.length;e++)if(r[e].node_===c){h.circular=r[e];break}}else h.isLeaf=!0,h.keys=null;h.notLeaf=!h.isLeaf,h.notRoot=!h.isRoot}v();var b=t.call(h,h.node);return void 0!==b&&h.update&&h.update(b),d.before&&d.before.call(h,h.node),g?("object"!=typeof h.node||null===h.node||h.circular||(r.push(h),v(),s(h.keys,(function(t,r){n.push(t),d.pre&&d.pre.call(h,h.node[t],t);var o=e(h.node[t]);u&&f.call(h.node,t)&&!m(h.node,t)&&(h.node[t]=o.node),o.isLast=r===h.keys.length-1,o.isFirst=0===r,d.post&&d.post.call(h,o),n.pop()})),r.pop()),d.after&&d.after.call(h,h.node),h):h}(e).node}function v(e){this.options=arguments.length>1?arguments[1]:g,this.value=e}function b(e){var t=arguments.length>1?arguments[1]:g;return new v(e,t)}v.prototype.get=function(e){for(var t=this.value,n=0;t&&n<e.length;n++){var r=e[n];if(!f.call(t,r)||!this.options.includeSymbols&&"symbol"==typeof r)return;t=t[r]}return t},v.prototype.has=function(e){for(var t=this.value,n=0;t&&n<e.length;n++){var r=e[n];if(!f.call(t,r)||!this.options.includeSymbols&&"symbol"==typeof r)return!1;t=t[r]}return!0},v.prototype.set=function(e,t){for(var n=this.value,r=0;r<e.length-1;r++){var o=e[r];f.call(n,o)||(n[o]={}),n=n[o]}return n[e[r]]=t,t},v.prototype.map=function(e){return h(this.value,e,{__proto__:null,immutable:!0,includeSymbols:!!this.options.includeSymbols})},v.prototype.forEach=function(e){return this.value=h(this.value,e,this.options),this.value},v.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},v.prototype.paths=function(){var e=[];return this.forEach((function(){e.push(this.path)})),e},v.prototype.nodes=function(){var e=[];return this.forEach((function(){e.push(this.node)})),e},v.prototype.clone=function(){var e=[],t=[],n=this.options;return r(this.value)?o(this.value):function r(o){for(var i=0;i<e.length;i++)if(e[i]===o)return t[i];if("object"==typeof o&&null!==o){var l=y(o,n);return e.push(o),t.push(l),s((n.includeSymbols?d:c)(o),(function(e){l[e]=r(o[e])})),e.pop(),t.pop(),l}return o}(this.value)},s(d(v.prototype),(function(e){b[e]=function(t){var n=[].slice.call(arguments,1),r=new v(t);return r[e].apply(r,n)}})),e.exports=b},6740:function(e,t,n){"use strict";var r=n(1642),o=n(6798)("TypedArray.prototype.buffer",!0),i=n(2527);e.exports=o||function(e){if(!i(e))throw new r("Not a Typed Array");return e.buffer}},6798:function(e,t,n){"use strict";var r=n(1634),o=n(8388),i=o(r("String.prototype.indexOf"));e.exports=function(e,t){var n=r(e,!!t);return"function"==typeof n&&i(e,".prototype.")>-1?o(n):n}},8388:function(e,t,n){"use strict";var r=n(7715),o=n(1634),i=n(4521),l=n(1642),a=o("%Function.prototype.apply%"),s=o("%Function.prototype.call%"),c=o("%Reflect.apply%",!0)||r.call(s,a),u=n(8918),p=o("%Math.max%");e.exports=function(e){if("function"!=typeof e)throw new l("a function is required");var t=c(r,s,arguments);return i(t,1+p(0,e.length-(arguments.length-1)),!0)};var d=function(){return c(r,a,arguments)};u?u(e.exports,"apply",{value:d}):e.exports.apply=d},9003:function(e){"use strict";var t="Function.prototype.bind called on incompatible ",n=Object.prototype.toString,r=Math.max,o="[object Function]",i=function(e,t){for(var n=[],r=0;r<e.length;r+=1)n[r]=e[r];for(var o=0;o<t.length;o+=1)n[o+e.length]=t[o];return n},l=function(e,t){for(var n=[],r=t||0,o=0;r<e.length;r+=1,o+=1)n[o]=e[r];return n},a=function(e,t){for(var n="",r=0;r<e.length;r+=1)n+=e[r],r+1<e.length&&(n+=t);return n};e.exports=function(e){var s=this;if("function"!=typeof s||n.apply(s)!==o)throw new TypeError(t+s);for(var c,u=l(arguments,1),p=function(){if(this instanceof c){var t=s.apply(this,i(u,arguments));return Object(t)===t?t:this}return s.apply(e,i(u,arguments))},d=r(0,s.length-u.length),f=[],m=0;m<d;m++)f[m]="$"+m;if(c=Function("binder","return function ("+a(f,",")+"){ return binder.apply(this,arguments); }")(p),s.prototype){var y=function(){};y.prototype=s.prototype,c.prototype=new y,y.prototype=null}return c}},7715:function(e,t,n){"use strict";var r=n(9003);e.exports=Function.prototype.bind||r},1634:function(e,t,n){"use strict";var r,o=n(6716),i=n(6788),l=n(9204),a=n(9908),s=n(6724),c=n(1642),u=n(1451),p=Function,d=function(e){try{return p('"use strict"; return ('+e+").constructor;")()}catch(e){}},f=Object.getOwnPropertyDescriptor;if(f)try{f({},"")}catch(e){f=null}var m=function(){throw new c},y=f?function(){try{return m}catch(e){try{return f(arguments,"callee").get}catch(e){return m}}}():m,g=n(263)(),h=n(1856)(),v=Object.getPrototypeOf||(h?function(e){return e.__proto__}:null),b={},_="undefined"!=typeof Uint8Array&&v?v(Uint8Array):r,k={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?r:ArrayBuffer,"%ArrayIteratorPrototype%":g&&v?v([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":b,"%AsyncGenerator%":b,"%AsyncGeneratorFunction%":b,"%AsyncIteratorPrototype%":b,"%Atomics%":"undefined"==typeof Atomics?r:Atomics,"%BigInt%":"undefined"==typeof BigInt?r:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?r:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?r:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":o,"%eval%":eval,"%EvalError%":i,"%Float32Array%":"undefined"==typeof Float32Array?r:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?r:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?r:FinalizationRegistry,"%Function%":p,"%GeneratorFunction%":b,"%Int8Array%":"undefined"==typeof Int8Array?r:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?r:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":g&&v?v(v([][Symbol.iterator]())):r,"%JSON%":"object"==typeof JSON?JSON:r,"%Map%":"undefined"==typeof Map?r:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&g&&v?v((new Map)[Symbol.iterator]()):r,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?r:Promise,"%Proxy%":"undefined"==typeof Proxy?r:Proxy,"%RangeError%":l,"%ReferenceError%":a,"%Reflect%":"undefined"==typeof Reflect?r:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?r:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&g&&v?v((new Set)[Symbol.iterator]()):r,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":g&&v?v(""[Symbol.iterator]()):r,"%Symbol%":g?Symbol:r,"%SyntaxError%":s,"%ThrowTypeError%":y,"%TypedArray%":_,"%TypeError%":c,"%Uint8Array%":"undefined"==typeof Uint8Array?r:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?r:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?r:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?r:Uint32Array,"%URIError%":u,"%WeakMap%":"undefined"==typeof WeakMap?r:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?r:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?r:WeakSet};if(v)try{null.error}catch(e){var E=v(v(e));k["%Error.prototype%"]=E}var S=function e(t){var n;if("%AsyncFunction%"===t)n=d("async function () {}");else if("%GeneratorFunction%"===t)n=d("function* () {}");else if("%AsyncGeneratorFunction%"===t)n=d("async function* () {}");else if("%AsyncGenerator%"===t){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if("%AsyncIteratorPrototype%"===t){var o=e("%AsyncGenerator%");o&&v&&(n=v(o.prototype))}return k[t]=n,n},w={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},C=n(7715),I=n(9429),A=C.call(Function.call,Array.prototype.concat),x=C.call(Function.apply,Array.prototype.splice),B=C.call(Function.call,String.prototype.replace),P=C.call(Function.call,String.prototype.slice),T=C.call(Function.call,RegExp.prototype.exec),O=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,N=/\\(\\)?/g,M=function(e){var t=P(e,0,1),n=P(e,-1);if("%"===t&&"%"!==n)throw new s("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==t)throw new s("invalid intrinsic syntax, expected opening `%`");var r=[];return B(e,O,(function(e,t,n,o){r[r.length]=n?B(o,N,"$1"):t||e})),r},R=function(e,t){var n,r=e;if(I(w,r)&&(r="%"+(n=w[r])[0]+"%"),I(k,r)){var o=k[r];if(o===b&&(o=S(r)),void 0===o&&!t)throw new c("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:r,value:o}}throw new s("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new c("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new c('"allowMissing" argument must be a boolean');if(null===T(/^%?[^%]*%?$/,e))throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=M(e),r=n.length>0?n[0]:"",o=R("%"+r+"%",t),i=o.name,l=o.value,a=!1,u=o.alias;u&&(r=u[0],x(n,A([0,1],u)));for(var p=1,d=!0;p<n.length;p+=1){var m=n[p],y=P(m,0,1),g=P(m,-1);if(('"'===y||"'"===y||"`"===y||'"'===g||"'"===g||"`"===g)&&y!==g)throw new s("property names with quotes must have matching quotes");if("constructor"!==m&&d||(a=!0),I(k,i="%"+(r+="."+m)+"%"))l=k[i];else if(null!=l){if(!(m in l)){if(!t)throw new c("base intrinsic for "+e+" exists, but the property is not available.");return}if(f&&p+1>=n.length){var h=f(l,m);l=(d=!!h)&&"get"in h&&!("originalValue"in h.get)?h.get:l[m]}else d=I(l,m),l=l[m];d&&!a&&(k[i]=l)}}return l}},263:function(e,t,n){"use strict";var r="undefined"!=typeof Symbol&&Symbol,o=n(9184);e.exports=function(){return"function"==typeof r&&("function"==typeof Symbol&&("symbol"==typeof r("foo")&&("symbol"==typeof Symbol("bar")&&o())))}},9184:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},7046:function(e,t,n){"use strict";var r=n(4843),o=n(2526),i=n(4343)(),l={},a=n(1856)(),s=n(3828),c=Object.defineProperty;if(s){var u=function(e){return e.byteOffset};r(i,(function(e){if("function"==typeof n.g[e]||"object"==typeof n.g[e]){var t=n.g[e].prototype,r=s(t,"byteOffset");if(!r&&a){var i=t.__proto__;r=s(i,"byteOffset")}if(r&&r.get)l[e]=o(r.get);else if(c){var p=new n.g[e](2);(r=s(p,"byteOffset"))&&r.configurable&&c(p,"length",{value:3}),2===p.length&&(l[e]=u)}}}))}var p=n(2527);e.exports=function(e){return!!p(e)&&function(e){var t;return r(l,(function(n){if("number"!=typeof t)try{var r=n(e);"number"==typeof r&&(t=r)}catch(e){}})),t}(e)}},2526:function(e,t,n){"use strict";var r=n(1530),o=n(3699),i=n(4521),l=n(1642),a=o("%Function.prototype.apply%"),s=o("%Function.prototype.call%"),c=o("%Reflect.apply%",!0)||r.call(s,a),u=n(8918),p=o("%Math.max%");e.exports=function(e){if("function"!=typeof e)throw new l("a function is required");var t=c(r,s,arguments);return i(t,1+p(0,e.length-(arguments.length-1)),!0)};var d=function(){return c(r,a,arguments)};u?u(e.exports,"apply",{value:d}):e.exports.apply=d},1609:function(e){"use strict";var t="Function.prototype.bind called on incompatible ",n=Object.prototype.toString,r=Math.max,o="[object Function]",i=function(e,t){for(var n=[],r=0;r<e.length;r+=1)n[r]=e[r];for(var o=0;o<t.length;o+=1)n[o+e.length]=t[o];return n},l=function(e,t){for(var n=[],r=t||0,o=0;r<e.length;r+=1,o+=1)n[o]=e[r];return n},a=function(e,t){for(var n="",r=0;r<e.length;r+=1)n+=e[r],r+1<e.length&&(n+=t);return n};e.exports=function(e){var s=this;if("function"!=typeof s||n.apply(s)!==o)throw new TypeError(t+s);for(var c,u=l(arguments,1),p=function(){if(this instanceof c){var t=s.apply(this,i(u,arguments));return Object(t)===t?t:this}return s.apply(e,i(u,arguments))},d=r(0,s.length-u.length),f=[],m=0;m<d;m++)f[m]="$"+m;if(c=Function("binder","return function ("+a(f,",")+"){ return binder.apply(this,arguments); }")(p),s.prototype){var y=function(){};y.prototype=s.prototype,c.prototype=new y,y.prototype=null}return c}},1530:function(e,t,n){"use strict";var r=n(1609);e.exports=Function.prototype.bind||r},3699:function(e,t,n){"use strict";var r,o=n(6716),i=n(6788),l=n(9204),a=n(9908),s=n(6724),c=n(1642),u=n(1451),p=Function,d=function(e){try{return p('"use strict"; return ('+e+").constructor;")()}catch(e){}},f=Object.getOwnPropertyDescriptor;if(f)try{f({},"")}catch(e){f=null}var m=function(){throw new c},y=f?function(){try{return m}catch(e){try{return f(arguments,"callee").get}catch(e){return m}}}():m,g=n(5162)(),h=n(1856)(),v=Object.getPrototypeOf||(h?function(e){return e.__proto__}:null),b={},_="undefined"!=typeof Uint8Array&&v?v(Uint8Array):r,k={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?r:ArrayBuffer,"%ArrayIteratorPrototype%":g&&v?v([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":b,"%AsyncGenerator%":b,"%AsyncGeneratorFunction%":b,"%AsyncIteratorPrototype%":b,"%Atomics%":"undefined"==typeof Atomics?r:Atomics,"%BigInt%":"undefined"==typeof BigInt?r:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?r:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?r:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":o,"%eval%":eval,"%EvalError%":i,"%Float32Array%":"undefined"==typeof Float32Array?r:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?r:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?r:FinalizationRegistry,"%Function%":p,"%GeneratorFunction%":b,"%Int8Array%":"undefined"==typeof Int8Array?r:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?r:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":g&&v?v(v([][Symbol.iterator]())):r,"%JSON%":"object"==typeof JSON?JSON:r,"%Map%":"undefined"==typeof Map?r:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&g&&v?v((new Map)[Symbol.iterator]()):r,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?r:Promise,"%Proxy%":"undefined"==typeof Proxy?r:Proxy,"%RangeError%":l,"%ReferenceError%":a,"%Reflect%":"undefined"==typeof Reflect?r:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?r:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&g&&v?v((new Set)[Symbol.iterator]()):r,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":g&&v?v(""[Symbol.iterator]()):r,"%Symbol%":g?Symbol:r,"%SyntaxError%":s,"%ThrowTypeError%":y,"%TypedArray%":_,"%TypeError%":c,"%Uint8Array%":"undefined"==typeof Uint8Array?r:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?r:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?r:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?r:Uint32Array,"%URIError%":u,"%WeakMap%":"undefined"==typeof WeakMap?r:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?r:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?r:WeakSet};if(v)try{null.error}catch(e){var E=v(v(e));k["%Error.prototype%"]=E}var S=function e(t){var n;if("%AsyncFunction%"===t)n=d("async function () {}");else if("%GeneratorFunction%"===t)n=d("function* () {}");else if("%AsyncGeneratorFunction%"===t)n=d("async function* () {}");else if("%AsyncGenerator%"===t){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if("%AsyncIteratorPrototype%"===t){var o=e("%AsyncGenerator%");o&&v&&(n=v(o.prototype))}return k[t]=n,n},w={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},C=n(1530),I=n(9429),A=C.call(Function.call,Array.prototype.concat),x=C.call(Function.apply,Array.prototype.splice),B=C.call(Function.call,String.prototype.replace),P=C.call(Function.call,String.prototype.slice),T=C.call(Function.call,RegExp.prototype.exec),O=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,N=/\\(\\)?/g,M=function(e){var t=P(e,0,1),n=P(e,-1);if("%"===t&&"%"!==n)throw new s("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==t)throw new s("invalid intrinsic syntax, expected opening `%`");var r=[];return B(e,O,(function(e,t,n,o){r[r.length]=n?B(o,N,"$1"):t||e})),r},R=function(e,t){var n,r=e;if(I(w,r)&&(r="%"+(n=w[r])[0]+"%"),I(k,r)){var o=k[r];if(o===b&&(o=S(r)),void 0===o&&!t)throw new c("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:r,value:o}}throw new s("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new c("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new c('"allowMissing" argument must be a boolean');if(null===T(/^%?[^%]*%?$/,e))throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=M(e),r=n.length>0?n[0]:"",o=R("%"+r+"%",t),i=o.name,l=o.value,a=!1,u=o.alias;u&&(r=u[0],x(n,A([0,1],u)));for(var p=1,d=!0;p<n.length;p+=1){var m=n[p],y=P(m,0,1),g=P(m,-1);if(('"'===y||"'"===y||"`"===y||'"'===g||"'"===g||"`"===g)&&y!==g)throw new s("property names with quotes must have matching quotes");if("constructor"!==m&&d||(a=!0),I(k,i="%"+(r+="."+m)+"%"))l=k[i];else if(null!=l){if(!(m in l)){if(!t)throw new c("base intrinsic for "+e+" exists, but the property is not available.");return}if(f&&p+1>=n.length){var h=f(l,m);l=(d=!!h)&&"get"in h&&!("originalValue"in h.get)?h.get:l[m]}else d=I(l,m),l=l[m];d&&!a&&(k[i]=l)}}return l}},5162:function(e,t,n){"use strict";var r="undefined"!=typeof Symbol&&Symbol,o=n(3903);e.exports=function(){return"function"==typeof r&&("function"==typeof Symbol&&("symbol"==typeof r("foo")&&("symbol"==typeof Symbol("bar")&&o())))}},3903:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},8150:function(e,t,n){"use strict";var r=n(4888),o=n(4843),i=n(3828),l=n(1856)(),a=n(2527),s=n(131),c={__proto__:null},u=Object.defineProperty;if(i){var p=function(e){return e.length};o(s,(function(e){var t=n.g[e];if("function"==typeof t||"object"==typeof t){var o=t.prototype,a=i(o,"length");if(!a&&l){var s=o.__proto__;a=i(s,"length")}if(a&&a.get)c["$"+e]=r(a.get);else if(u){var d=new n.g[e](2);(a=i(d,"length"))&&a.configurable&&u(d,"length",{value:3}),2===d.length&&(c["$"+e]=p)}}}))}e.exports=function(e){return!!a(e)&&function(e){var t;return o(c,(function(n){if("number"!=typeof t)try{var r=n(e);"number"==typeof r&&(t=r)}catch(e){}})),t}(e)}},4888:function(e,t,n){"use strict";var r=n(3576),o=n(8031),i=n(4521),l=n(1642),a=o("%Function.prototype.apply%"),s=o("%Function.prototype.call%"),c=o("%Reflect.apply%",!0)||r.call(s,a),u=n(8918),p=o("%Math.max%");e.exports=function(e){if("function"!=typeof e)throw new l("a function is required");var t=c(r,s,arguments);return i(t,1+p(0,e.length-(arguments.length-1)),!0)};var d=function(){return c(r,a,arguments)};u?u(e.exports,"apply",{value:d}):e.exports.apply=d},7380:function(e){"use strict";var t="Function.prototype.bind called on incompatible ",n=Object.prototype.toString,r=Math.max,o="[object Function]",i=function(e,t){for(var n=[],r=0;r<e.length;r+=1)n[r]=e[r];for(var o=0;o<t.length;o+=1)n[o+e.length]=t[o];return n},l=function(e,t){for(var n=[],r=t||0,o=0;r<e.length;r+=1,o+=1)n[o]=e[r];return n},a=function(e,t){for(var n="",r=0;r<e.length;r+=1)n+=e[r],r+1<e.length&&(n+=t);return n};e.exports=function(e){var s=this;if("function"!=typeof s||n.apply(s)!==o)throw new TypeError(t+s);for(var c,u=l(arguments,1),p=function(){if(this instanceof c){var t=s.apply(this,i(u,arguments));return Object(t)===t?t:this}return s.apply(e,i(u,arguments))},d=r(0,s.length-u.length),f=[],m=0;m<d;m++)f[m]="$"+m;if(c=Function("binder","return function ("+a(f,",")+"){ return binder.apply(this,arguments); }")(p),s.prototype){var y=function(){};y.prototype=s.prototype,c.prototype=new y,y.prototype=null}return c}},3576:function(e,t,n){"use strict";var r=n(7380);e.exports=Function.prototype.bind||r},8031:function(e,t,n){"use strict";var r,o=n(6716),i=n(6788),l=n(9204),a=n(9908),s=n(6724),c=n(1642),u=n(1451),p=Function,d=function(e){try{return p('"use strict"; return ('+e+").constructor;")()}catch(e){}},f=Object.getOwnPropertyDescriptor;if(f)try{f({},"")}catch(e){f=null}var m=function(){throw new c},y=f?function(){try{return m}catch(e){try{return f(arguments,"callee").get}catch(e){return m}}}():m,g=n(307)(),h=n(1856)(),v=Object.getPrototypeOf||(h?function(e){return e.__proto__}:null),b={},_="undefined"!=typeof Uint8Array&&v?v(Uint8Array):r,k={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?r:ArrayBuffer,"%ArrayIteratorPrototype%":g&&v?v([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":b,"%AsyncGenerator%":b,"%AsyncGeneratorFunction%":b,"%AsyncIteratorPrototype%":b,"%Atomics%":"undefined"==typeof Atomics?r:Atomics,"%BigInt%":"undefined"==typeof BigInt?r:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?r:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?r:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":o,"%eval%":eval,"%EvalError%":i,"%Float32Array%":"undefined"==typeof Float32Array?r:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?r:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?r:FinalizationRegistry,"%Function%":p,"%GeneratorFunction%":b,"%Int8Array%":"undefined"==typeof Int8Array?r:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?r:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":g&&v?v(v([][Symbol.iterator]())):r,"%JSON%":"object"==typeof JSON?JSON:r,"%Map%":"undefined"==typeof Map?r:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&g&&v?v((new Map)[Symbol.iterator]()):r,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?r:Promise,"%Proxy%":"undefined"==typeof Proxy?r:Proxy,"%RangeError%":l,"%ReferenceError%":a,"%Reflect%":"undefined"==typeof Reflect?r:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?r:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&g&&v?v((new Set)[Symbol.iterator]()):r,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":g&&v?v(""[Symbol.iterator]()):r,"%Symbol%":g?Symbol:r,"%SyntaxError%":s,"%ThrowTypeError%":y,"%TypedArray%":_,"%TypeError%":c,"%Uint8Array%":"undefined"==typeof Uint8Array?r:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?r:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?r:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?r:Uint32Array,"%URIError%":u,"%WeakMap%":"undefined"==typeof WeakMap?r:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?r:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?r:WeakSet};if(v)try{null.error}catch(e){var E=v(v(e));k["%Error.prototype%"]=E}var S=function e(t){var n;if("%AsyncFunction%"===t)n=d("async function () {}");else if("%GeneratorFunction%"===t)n=d("function* () {}");else if("%AsyncGeneratorFunction%"===t)n=d("async function* () {}");else if("%AsyncGenerator%"===t){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if("%AsyncIteratorPrototype%"===t){var o=e("%AsyncGenerator%");o&&v&&(n=v(o.prototype))}return k[t]=n,n},w={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},C=n(3576),I=n(9429),A=C.call(Function.call,Array.prototype.concat),x=C.call(Function.apply,Array.prototype.splice),B=C.call(Function.call,String.prototype.replace),P=C.call(Function.call,String.prototype.slice),T=C.call(Function.call,RegExp.prototype.exec),O=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,N=/\\(\\)?/g,M=function(e){var t=P(e,0,1),n=P(e,-1);if("%"===t&&"%"!==n)throw new s("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==t)throw new s("invalid intrinsic syntax, expected opening `%`");var r=[];return B(e,O,(function(e,t,n,o){r[r.length]=n?B(o,N,"$1"):t||e})),r},R=function(e,t){var n,r=e;if(I(w,r)&&(r="%"+(n=w[r])[0]+"%"),I(k,r)){var o=k[r];if(o===b&&(o=S(r)),void 0===o&&!t)throw new c("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:r,value:o}}throw new s("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new c("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new c('"allowMissing" argument must be a boolean');if(null===T(/^%?[^%]*%?$/,e))throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=M(e),r=n.length>0?n[0]:"",o=R("%"+r+"%",t),i=o.name,l=o.value,a=!1,u=o.alias;u&&(r=u[0],x(n,A([0,1],u)));for(var p=1,d=!0;p<n.length;p+=1){var m=n[p],y=P(m,0,1),g=P(m,-1);if(('"'===y||"'"===y||"`"===y||'"'===g||"'"===g||"`"===g)&&y!==g)throw new s("property names with quotes must have matching quotes");if("constructor"!==m&&d||(a=!0),I(k,i="%"+(r+="."+m)+"%"))l=k[i];else if(null!=l){if(!(m in l)){if(!t)throw new c("base intrinsic for "+e+" exists, but the property is not available.");return}if(f&&p+1>=n.length){var h=f(l,m);l=(d=!!h)&&"get"in h&&!("originalValue"in h.get)?h.get:l[m]}else d=I(l,m),l=l[m];d&&!a&&(k[i]=l)}}return l}},307:function(e,t,n){"use strict";var r="undefined"!=typeof Symbol&&Symbol,o=n(1766);e.exports=function(){return"function"==typeof r&&("function"==typeof Symbol&&("symbol"==typeof r("foo")&&("symbol"==typeof Symbol("bar")&&o())))}},1766:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},4073:function(e,t,n){"use strict";var r=n(1642),o=n(3675),i=n(9661),l=n(1320),a=n(1367),s=n(2967),c=n(8055),u=n(3383),p=n(2897),d=n(7249),f=n(9149),m=n(1586),y=n(817),g=n(3842),h=n(6740),v=n(7046);e.exports=function(e,t){var n=this;g(n,"SEQ-CST");var b,_=n.length,k=p(e);b=k===-1/0?0:k<0?a(_+k,0):s(k,_);var E,S=void 0===t?_:p(t);E=S===-1/0?0:S<0?a(_+S,0):s(S,_);var w=a(E-b,0),C=y(n,[w]);if(w>0){if(l(h(n)))throw new r("Cannot use a Typed Array with an underlying ArrayBuffer that is detached");if(m(n)===m(C))for(var I=h(n),A=h(C),x=f(n),B=b*x+v(n),P=v(C),T=P+w*x;P<T;){var O=i(I,B,"UINT8",!0,"UNORDERED");u(A,P,"UINT8",O,!0,"UNORDERED"),B+=1,P+=1}else for(var N=0;b<E;){var M=d(b),R=o(n,M);c(C,d(N),R,!0),b+=1,N+=1}}return C}},1140:function(e,t,n){"use strict";var r=n(6776),o=n(8374),i=n(4073),l=n(5046),a=n(8564),s=o(l());r(s,{getPolyfill:l,implementation:i,shim:a}),e.exports=s},1154:function(e,t,n){"use strict";var r=n(682),o=n(8374),i=o(r("String.prototype.indexOf"));e.exports=function(e,t){var n=r(e,!!t);return"function"==typeof n&&i(e,".prototype.")>-1?o(n):n}},8374:function(e,t,n){"use strict";var r=n(8474),o=n(682),i=n(4521),l=n(1642),a=o("%Function.prototype.apply%"),s=o("%Function.prototype.call%"),c=o("%Reflect.apply%",!0)||r.call(s,a),u=n(8918),p=o("%Math.max%");e.exports=function(e){if("function"!=typeof e)throw new l("a function is required");var t=c(r,s,arguments);return i(t,1+p(0,e.length-(arguments.length-1)),!0)};var d=function(){return c(r,a,arguments)};u?u(e.exports,"apply",{value:d}):e.exports.apply=d},6776:function(e,t,n){"use strict";var r=n(806),o="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),i=Object.prototype.toString,l=Array.prototype.concat,a=n(2656),s=n(8198)(),c=function(e,t,n,r){if(t in e)if(!0===r){if(e[t]===n)return}else if("function"!=typeof(o=r)||"[object Function]"!==i.call(o)||!r())return;var o;s?a(e,t,n,!0):a(e,t,n)},u=function(e,t){var n=arguments.length>2?arguments[2]:{},i=r(t);o&&(i=l.call(i,Object.getOwnPropertySymbols(t)));for(var a=0;a<i.length;a+=1)c(e,i[a],t[i[a]],n[i[a]])};u.supportsDescriptors=!!s,e.exports=u},2855:function(e){"use strict";var t="Function.prototype.bind called on incompatible ",n=Object.prototype.toString,r=Math.max,o="[object Function]",i=function(e,t){for(var n=[],r=0;r<e.length;r+=1)n[r]=e[r];for(var o=0;o<t.length;o+=1)n[o+e.length]=t[o];return n},l=function(e,t){for(var n=[],r=t||0,o=0;r<e.length;r+=1,o+=1)n[o]=e[r];return n},a=function(e,t){for(var n="",r=0;r<e.length;r+=1)n+=e[r],r+1<e.length&&(n+=t);return n};e.exports=function(e){var s=this;if("function"!=typeof s||n.apply(s)!==o)throw new TypeError(t+s);for(var c,u=l(arguments,1),p=function(){if(this instanceof c){var t=s.apply(this,i(u,arguments));return Object(t)===t?t:this}return s.apply(e,i(u,arguments))},d=r(0,s.length-u.length),f=[],m=0;m<d;m++)f[m]="$"+m;if(c=Function("binder","return function ("+a(f,",")+"){ return binder.apply(this,arguments); }")(p),s.prototype){var y=function(){};y.prototype=s.prototype,c.prototype=new y,y.prototype=null}return c}},8474:function(e,t,n){"use strict";var r=n(2855);e.exports=Function.prototype.bind||r},682:function(e,t,n){"use strict";var r,o=n(6716),i=n(6788),l=n(9204),a=n(9908),s=n(6724),c=n(1642),u=n(1451),p=Function,d=function(e){try{return p('"use strict"; return ('+e+").constructor;")()}catch(e){}},f=Object.getOwnPropertyDescriptor;if(f)try{f({},"")}catch(e){f=null}var m=function(){throw new c},y=f?function(){try{return m}catch(e){try{return f(arguments,"callee").get}catch(e){return m}}}():m,g=n(5314)(),h=n(1856)(),v=Object.getPrototypeOf||(h?function(e){return e.__proto__}:null),b={},_="undefined"!=typeof Uint8Array&&v?v(Uint8Array):r,k={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?r:ArrayBuffer,"%ArrayIteratorPrototype%":g&&v?v([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":b,"%AsyncGenerator%":b,"%AsyncGeneratorFunction%":b,"%AsyncIteratorPrototype%":b,"%Atomics%":"undefined"==typeof Atomics?r:Atomics,"%BigInt%":"undefined"==typeof BigInt?r:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?r:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?r:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":o,"%eval%":eval,"%EvalError%":i,"%Float32Array%":"undefined"==typeof Float32Array?r:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?r:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?r:FinalizationRegistry,"%Function%":p,"%GeneratorFunction%":b,"%Int8Array%":"undefined"==typeof Int8Array?r:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?r:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":g&&v?v(v([][Symbol.iterator]())):r,"%JSON%":"object"==typeof JSON?JSON:r,"%Map%":"undefined"==typeof Map?r:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&g&&v?v((new Map)[Symbol.iterator]()):r,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?r:Promise,"%Proxy%":"undefined"==typeof Proxy?r:Proxy,"%RangeError%":l,"%ReferenceError%":a,"%Reflect%":"undefined"==typeof Reflect?r:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?r:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&g&&v?v((new Set)[Symbol.iterator]()):r,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":g&&v?v(""[Symbol.iterator]()):r,"%Symbol%":g?Symbol:r,"%SyntaxError%":s,"%ThrowTypeError%":y,"%TypedArray%":_,"%TypeError%":c,"%Uint8Array%":"undefined"==typeof Uint8Array?r:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?r:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?r:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?r:Uint32Array,"%URIError%":u,"%WeakMap%":"undefined"==typeof WeakMap?r:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?r:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?r:WeakSet};if(v)try{null.error}catch(e){var E=v(v(e));k["%Error.prototype%"]=E}var S=function e(t){var n;if("%AsyncFunction%"===t)n=d("async function () {}");else if("%GeneratorFunction%"===t)n=d("function* () {}");else if("%AsyncGeneratorFunction%"===t)n=d("async function* () {}");else if("%AsyncGenerator%"===t){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if("%AsyncIteratorPrototype%"===t){var o=e("%AsyncGenerator%");o&&v&&(n=v(o.prototype))}return k[t]=n,n},w={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},C=n(8474),I=n(9429),A=C.call(Function.call,Array.prototype.concat),x=C.call(Function.apply,Array.prototype.splice),B=C.call(Function.call,String.prototype.replace),P=C.call(Function.call,String.prototype.slice),T=C.call(Function.call,RegExp.prototype.exec),O=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,N=/\\(\\)?/g,M=function(e){var t=P(e,0,1),n=P(e,-1);if("%"===t&&"%"!==n)throw new s("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==t)throw new s("invalid intrinsic syntax, expected opening `%`");var r=[];return B(e,O,(function(e,t,n,o){r[r.length]=n?B(o,N,"$1"):t||e})),r},R=function(e,t){var n,r=e;if(I(w,r)&&(r="%"+(n=w[r])[0]+"%"),I(k,r)){var o=k[r];if(o===b&&(o=S(r)),void 0===o&&!t)throw new c("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:r,value:o}}throw new s("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new c("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new c('"allowMissing" argument must be a boolean');if(null===T(/^%?[^%]*%?$/,e))throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=M(e),r=n.length>0?n[0]:"",o=R("%"+r+"%",t),i=o.name,l=o.value,a=!1,u=o.alias;u&&(r=u[0],x(n,A([0,1],u)));for(var p=1,d=!0;p<n.length;p+=1){var m=n[p],y=P(m,0,1),g=P(m,-1);if(('"'===y||"'"===y||"`"===y||'"'===g||"'"===g||"`"===g)&&y!==g)throw new s("property names with quotes must have matching quotes");if("constructor"!==m&&d||(a=!0),I(k,i="%"+(r+="."+m)+"%"))l=k[i];else if(null!=l){if(!(m in l)){if(!t)throw new c("base intrinsic for "+e+" exists, but the property is not available.");return}if(f&&p+1>=n.length){var h=f(l,m);l=(d=!!h)&&"get"in h&&!("originalValue"in h.get)?h.get:l[m]}else d=I(l,m),l=l[m];d&&!a&&(k[i]=l)}}return l}},5314:function(e,t,n){"use strict";var r="undefined"!=typeof Symbol&&Symbol,o=n(6188);e.exports=function(){return"function"==typeof r&&("function"==typeof Symbol&&("symbol"==typeof r("foo")&&("symbol"==typeof Symbol("bar")&&o())))}},6188:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},6841:function(e){"use strict";var t,n,r=Function.prototype.toString,o="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof o&&"function"==typeof Object.defineProperty)try{t=Object.defineProperty({},"length",{get:function(){throw n}}),n={},o((function(){throw 42}),null,t)}catch(e){e!==n&&(o=null)}else o=null;var i=/^\s*class\b/,l=function(e){try{var t=r.call(e);return i.test(t)}catch(e){return!1}},a=function(e){try{return!l(e)&&(r.call(e),!0)}catch(e){return!1}},s=Object.prototype.toString,c="function"==typeof Symbol&&!!Symbol.toStringTag,u=!(0 in[,]),p=function(){return!1};if("object"==typeof document){var d=document.all;s.call(d)===s.call(document.all)&&(p=function(e){if((u||!e)&&(void 0===e||"object"==typeof e))try{var t=s.call(e);return("[object HTMLAllCollection]"===t||"[object HTML document.all class]"===t||"[object HTMLCollection]"===t||"[object Object]"===t)&&null==e("")}catch(e){}return!1})}e.exports=o?function(e){if(p(e))return!0;if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;try{o(e,null,t)}catch(e){if(e!==n)return!1}return!l(e)&&a(e)}:function(e){if(p(e))return!0;if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;if(c)return a(e);if(l(e))return!1;var t=s.call(e);return!("[object Function]"!==t&&"[object GeneratorFunction]"!==t&&!/^\[object HTML/.test(t))&&a(e)}},5726:function(e,t,n){var r="function"==typeof Map&&Map.prototype,o=Object.getOwnPropertyDescriptor&&r?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,i=r&&o&&"function"==typeof o.get?o.get:null,l=r&&Map.prototype.forEach,a="function"==typeof Set&&Set.prototype,s=Object.getOwnPropertyDescriptor&&a?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,c=a&&s&&"function"==typeof s.get?s.get:null,u=a&&Set.prototype.forEach,p="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,d="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,f="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,m=Boolean.prototype.valueOf,y=Object.prototype.toString,g=Function.prototype.toString,h=String.prototype.match,v=String.prototype.slice,b=String.prototype.replace,_=String.prototype.toUpperCase,k=String.prototype.toLowerCase,E=RegExp.prototype.test,S=Array.prototype.concat,w=Array.prototype.join,C=Array.prototype.slice,I=Math.floor,A="function"==typeof BigInt?BigInt.prototype.valueOf:null,x=Object.getOwnPropertySymbols,B="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,P="function"==typeof Symbol&&"object"==typeof Symbol.iterator,T="function"==typeof Symbol&&Symbol.toStringTag&&(typeof Symbol.toStringTag===P||"symbol")?Symbol.toStringTag:null,O=Object.prototype.propertyIsEnumerable,N=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function M(e,t){if(e===1/0||e===-1/0||e!=e||e&&e>-1e3&&e<1e3||E.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof e){var r=e<0?-I(-e):I(e);if(r!==e){var o=String(r),i=v.call(t,o.length+1);return b.call(o,n,"$&_")+"."+b.call(b.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return b.call(t,n,"$&_")}var R=n(5794),F=R.custom,L=V(F)?F:null;function D(e,t,n){var r="double"===(n.quoteStyle||t)?'"':"'";return r+e+r}function U(e){return b.call(String(e),/"/g,""")}function j(e){return!("[object Array]"!==W(e)||T&&"object"==typeof e&&T in e)}function z(e){return!("[object RegExp]"!==W(e)||T&&"object"==typeof e&&T in e)}function V(e){if(P)return e&&"object"==typeof e&&e instanceof Symbol;if("symbol"==typeof e)return!0;if(!e||"object"!=typeof e||!B)return!1;try{return B.call(e),!0}catch(e){}return!1}e.exports=function e(t,r,o,a){var s=r||{};if(H(s,"quoteStyle")&&"single"!==s.quoteStyle&&"double"!==s.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(H(s,"maxStringLength")&&("number"==typeof s.maxStringLength?s.maxStringLength<0&&s.maxStringLength!==1/0:null!==s.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var y=!H(s,"customInspect")||s.customInspect;if("boolean"!=typeof y&&"symbol"!==y)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(H(s,"indent")&&null!==s.indent&&"\t"!==s.indent&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(H(s,"numericSeparator")&&"boolean"!=typeof s.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var _=s.numericSeparator;if(void 0===t)return"undefined";if(null===t)return"null";if("boolean"==typeof t)return t?"true":"false";if("string"==typeof t)return K(t,s);if("number"==typeof t){if(0===t)return 1/0/t>0?"0":"-0";var E=String(t);return _?M(t,E):E}if("bigint"==typeof t){var I=String(t)+"n";return _?M(t,I):I}var x=void 0===s.depth?5:s.depth;if(void 0===o&&(o=0),o>=x&&x>0&&"object"==typeof t)return j(t)?"[Array]":"[Object]";var F=function(e,t){var n;if("\t"===e.indent)n="\t";else{if(!("number"==typeof e.indent&&e.indent>0))return null;n=w.call(Array(e.indent+1)," ")}return{base:n,prev:w.call(Array(t+1),n)}}(s,o);if(void 0===a)a=[];else if($(a,t)>=0)return"[Circular]";function G(t,n,r){if(n&&(a=C.call(a)).push(n),r){var i={depth:s.depth};return H(s,"quoteStyle")&&(i.quoteStyle=s.quoteStyle),e(t,i,o+1,a)}return e(t,s,o+1,a)}if("function"==typeof t&&!z(t)){var q=function(e){if(e.name)return e.name;var t=h.call(g.call(e),/^function\s*([\w$]+)/);if(t)return t[1];return null}(t),ee=X(t,G);return"[Function"+(q?": "+q:" (anonymous)")+"]"+(ee.length>0?" { "+w.call(ee,", ")+" }":"")}if(V(t)){var te=P?b.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):B.call(t);return"object"!=typeof t||P?te:J(te)}if(function(e){if(!e||"object"!=typeof e)return!1;if("undefined"!=typeof HTMLElement&&e instanceof HTMLElement)return!0;return"string"==typeof e.nodeName&&"function"==typeof e.getAttribute}(t)){for(var ne="<"+k.call(String(t.nodeName)),re=t.attributes||[],oe=0;oe<re.length;oe++)ne+=" "+re[oe].name+"="+D(U(re[oe].value),"double",s);return ne+=">",t.childNodes&&t.childNodes.length&&(ne+="..."),ne+="</"+k.call(String(t.nodeName))+">"}if(j(t)){if(0===t.length)return"[]";var ie=X(t,G);return F&&!function(e){for(var t=0;t<e.length;t++)if($(e[t],"\n")>=0)return!1;return!0}(ie)?"["+Z(ie,F)+"]":"[ "+w.call(ie,", ")+" ]"}if(function(e){return!("[object Error]"!==W(e)||T&&"object"==typeof e&&T in e)}(t)){var le=X(t,G);return"cause"in Error.prototype||!("cause"in t)||O.call(t,"cause")?0===le.length?"["+String(t)+"]":"{ ["+String(t)+"] "+w.call(le,", ")+" }":"{ ["+String(t)+"] "+w.call(S.call("[cause]: "+G(t.cause),le),", ")+" }"}if("object"==typeof t&&y){if(L&&"function"==typeof t[L]&&R)return R(t,{depth:x-o});if("symbol"!==y&&"function"==typeof t.inspect)return t.inspect()}if(function(e){if(!i||!e||"object"!=typeof e)return!1;try{i.call(e);try{c.call(e)}catch(e){return!0}return e instanceof Map}catch(e){}return!1}(t)){var ae=[];return l&&l.call(t,(function(e,n){ae.push(G(n,t,!0)+" => "+G(e,t))})),Q("Map",i.call(t),ae,F)}if(function(e){if(!c||!e||"object"!=typeof e)return!1;try{c.call(e);try{i.call(e)}catch(e){return!0}return e instanceof Set}catch(e){}return!1}(t)){var se=[];return u&&u.call(t,(function(e){se.push(G(e,t))})),Q("Set",c.call(t),se,F)}if(function(e){if(!p||!e||"object"!=typeof e)return!1;try{p.call(e,p);try{d.call(e,d)}catch(e){return!0}return e instanceof WeakMap}catch(e){}return!1}(t))return Y("WeakMap");if(function(e){if(!d||!e||"object"!=typeof e)return!1;try{d.call(e,d);try{p.call(e,p)}catch(e){return!0}return e instanceof WeakSet}catch(e){}return!1}(t))return Y("WeakSet");if(function(e){if(!f||!e||"object"!=typeof e)return!1;try{return f.call(e),!0}catch(e){}return!1}(t))return Y("WeakRef");if(function(e){return!("[object Number]"!==W(e)||T&&"object"==typeof e&&T in e)}(t))return J(G(Number(t)));if(function(e){if(!e||"object"!=typeof e||!A)return!1;try{return A.call(e),!0}catch(e){}return!1}(t))return J(G(A.call(t)));if(function(e){return!("[object Boolean]"!==W(e)||T&&"object"==typeof e&&T in e)}(t))return J(m.call(t));if(function(e){return!("[object String]"!==W(e)||T&&"object"==typeof e&&T in e)}(t))return J(G(String(t)));if("undefined"!=typeof window&&t===window)return"{ [object Window] }";if(t===n.g)return"{ [object globalThis] }";if(!function(e){return!("[object Date]"!==W(e)||T&&"object"==typeof e&&T in e)}(t)&&!z(t)){var ce=X(t,G),ue=N?N(t)===Object.prototype:t instanceof Object||t.constructor===Object,pe=t instanceof Object?"":"null prototype",de=!ue&&T&&Object(t)===t&&T in t?v.call(W(t),8,-1):pe?"Object":"",fe=(ue||"function"!=typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(de||pe?"["+w.call(S.call([],de||[],pe||[]),": ")+"] ":"");return 0===ce.length?fe+"{}":F?fe+"{"+Z(ce,F)+"}":fe+"{ "+w.call(ce,", ")+" }"}return String(t)};var G=Object.prototype.hasOwnProperty||function(e){return e in this};function H(e,t){return G.call(e,t)}function W(e){return y.call(e)}function $(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}function K(e,t){if(e.length>t.maxStringLength){var n=e.length-t.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return K(v.call(e,0,t.maxStringLength),t)+r}return D(b.call(b.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,q),"single",t)}function q(e){var t=e.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return n?"\\"+n:"\\x"+(t<16?"0":"")+_.call(t.toString(16))}function J(e){return"Object("+e+")"}function Y(e){return e+" { ? }"}function Q(e,t,n,r){return e+" ("+t+") {"+(r?Z(n,r):w.call(n,", "))+"}"}function Z(e,t){if(0===e.length)return"";var n="\n"+t.prev+t.base;return n+w.call(e,","+n)+"\n"+t.prev}function X(e,t){var n=j(e),r=[];if(n){r.length=e.length;for(var o=0;o<e.length;o++)r[o]=H(e,o)?t(e[o],e):""}var i,l="function"==typeof x?x(e):[];if(P){i={};for(var a=0;a<l.length;a++)i["$"+l[a]]=l[a]}for(var s in e)H(e,s)&&(n&&String(Number(s))===s&&s<e.length||P&&i["$"+s]instanceof Symbol||(E.call(/[^\w$]/,s)?r.push(t(s,e)+": "+t(e[s],e)):r.push(s+": "+t(e[s],e))));if("function"==typeof x)for(var c=0;c<l.length;c++)O.call(e,l[c])&&r.push("["+t(l[c])+"]: "+t(e[l[c]],e));return r}},5046:function(e,t,n){"use strict";var r=n(4073);e.exports=function(){return"function"==typeof Uint8Array&&Uint8Array.prototype.slice||r}},8564:function(e,t,n){"use strict";var r=n(6776),o=n(9495),i=n(5046);e.exports=function(){if("function"==typeof Uint8Array){var e=i(),t=o(Uint8Array.prototype);r(t,{slice:e},{slice:function(){return t.slice!==e}})}return e}},4010:function(e,t,n){"use strict";var r=n(4843),o=n(4343),i=n(4899),l=n(7120),a=n(3828),s=l("Object.prototype.toString"),c=n(4111)(),u="undefined"==typeof globalThis?n.g:globalThis,p=o(),d=l("String.prototype.slice"),f=Object.getPrototypeOf,m=l("Array.prototype.indexOf",!0)||function(e,t){for(var n=0;n<e.length;n+=1)if(e[n]===t)return n;return-1},y={__proto__:null};r(p,c&&a&&f?function(e){var t=new u[e];if(Symbol.toStringTag in t){var n=f(t),r=a(n,Symbol.toStringTag);if(!r){var o=f(n);r=a(o,Symbol.toStringTag)}y["$"+e]=i(r.get)}}:function(e){var t=new u[e],n=t.slice||t.set;n&&(y["$"+e]=i(n))});e.exports=function(e){if(!e||"object"!=typeof e)return!1;if(!c){var t=d(s(e),8,-1);return m(p,t)>-1?t:"Object"===t&&function(e){var t=!1;return r(y,(function(n,r){if(!t)try{n(e),t=d(r,1)}catch(e){}})),t}(e)}return a?function(e){var t=!1;return r(y,(function(n,r){if(!t)try{"$"+n(e)===r&&(t=d(r,1))}catch(e){}})),t}(e):null}},7120:function(e,t,n){"use strict";var r=n(6883),o=n(4899),i=o(r("String.prototype.indexOf"));e.exports=function(e,t){var n=r(e,!!t);return"function"==typeof n&&i(e,".prototype.")>-1?o(n):n}},4899:function(e,t,n){"use strict";var r=n(7961),o=n(6883),i=n(4521),l=n(1642),a=o("%Function.prototype.apply%"),s=o("%Function.prototype.call%"),c=o("%Reflect.apply%",!0)||r.call(s,a),u=n(8918),p=o("%Math.max%");e.exports=function(e){if("function"!=typeof e)throw new l("a function is required");var t=c(r,s,arguments);return i(t,1+p(0,e.length-(arguments.length-1)),!0)};var d=function(){return c(r,a,arguments)};u?u(e.exports,"apply",{value:d}):e.exports.apply=d},7562:function(e){"use strict";var t="Function.prototype.bind called on incompatible ",n=Object.prototype.toString,r=Math.max,o="[object Function]",i=function(e,t){for(var n=[],r=0;r<e.length;r+=1)n[r]=e[r];for(var o=0;o<t.length;o+=1)n[o+e.length]=t[o];return n},l=function(e,t){for(var n=[],r=t||0,o=0;r<e.length;r+=1,o+=1)n[o]=e[r];return n},a=function(e,t){for(var n="",r=0;r<e.length;r+=1)n+=e[r],r+1<e.length&&(n+=t);return n};e.exports=function(e){var s=this;if("function"!=typeof s||n.apply(s)!==o)throw new TypeError(t+s);for(var c,u=l(arguments,1),p=function(){if(this instanceof c){var t=s.apply(this,i(u,arguments));return Object(t)===t?t:this}return s.apply(e,i(u,arguments))},d=r(0,s.length-u.length),f=[],m=0;m<d;m++)f[m]="$"+m;if(c=Function("binder","return function ("+a(f,",")+"){ return binder.apply(this,arguments); }")(p),s.prototype){var y=function(){};y.prototype=s.prototype,c.prototype=new y,y.prototype=null}return c}},7961:function(e,t,n){"use strict";var r=n(7562);e.exports=Function.prototype.bind||r},6883:function(e,t,n){"use strict";var r,o=n(6716),i=n(6788),l=n(9204),a=n(9908),s=n(6724),c=n(1642),u=n(1451),p=Function,d=function(e){try{return p('"use strict"; return ('+e+").constructor;")()}catch(e){}},f=Object.getOwnPropertyDescriptor;if(f)try{f({},"")}catch(e){f=null}var m=function(){throw new c},y=f?function(){try{return m}catch(e){try{return f(arguments,"callee").get}catch(e){return m}}}():m,g=n(8861)(),h=n(1856)(),v=Object.getPrototypeOf||(h?function(e){return e.__proto__}:null),b={},_="undefined"!=typeof Uint8Array&&v?v(Uint8Array):r,k={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?r:ArrayBuffer,"%ArrayIteratorPrototype%":g&&v?v([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":b,"%AsyncGenerator%":b,"%AsyncGeneratorFunction%":b,"%AsyncIteratorPrototype%":b,"%Atomics%":"undefined"==typeof Atomics?r:Atomics,"%BigInt%":"undefined"==typeof BigInt?r:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?r:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?r:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":o,"%eval%":eval,"%EvalError%":i,"%Float32Array%":"undefined"==typeof Float32Array?r:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?r:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?r:FinalizationRegistry,"%Function%":p,"%GeneratorFunction%":b,"%Int8Array%":"undefined"==typeof Int8Array?r:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?r:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":g&&v?v(v([][Symbol.iterator]())):r,"%JSON%":"object"==typeof JSON?JSON:r,"%Map%":"undefined"==typeof Map?r:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&g&&v?v((new Map)[Symbol.iterator]()):r,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?r:Promise,"%Proxy%":"undefined"==typeof Proxy?r:Proxy,"%RangeError%":l,"%ReferenceError%":a,"%Reflect%":"undefined"==typeof Reflect?r:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?r:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&g&&v?v((new Set)[Symbol.iterator]()):r,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":g&&v?v(""[Symbol.iterator]()):r,"%Symbol%":g?Symbol:r,"%SyntaxError%":s,"%ThrowTypeError%":y,"%TypedArray%":_,"%TypeError%":c,"%Uint8Array%":"undefined"==typeof Uint8Array?r:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?r:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?r:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?r:Uint32Array,"%URIError%":u,"%WeakMap%":"undefined"==typeof WeakMap?r:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?r:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?r:WeakSet};if(v)try{null.error}catch(e){var E=v(v(e));k["%Error.prototype%"]=E}var S=function e(t){var n;if("%AsyncFunction%"===t)n=d("async function () {}");else if("%GeneratorFunction%"===t)n=d("function* () {}");else if("%AsyncGeneratorFunction%"===t)n=d("async function* () {}");else if("%AsyncGenerator%"===t){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if("%AsyncIteratorPrototype%"===t){var o=e("%AsyncGenerator%");o&&v&&(n=v(o.prototype))}return k[t]=n,n},w={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},C=n(7961),I=n(9429),A=C.call(Function.call,Array.prototype.concat),x=C.call(Function.apply,Array.prototype.splice),B=C.call(Function.call,String.prototype.replace),P=C.call(Function.call,String.prototype.slice),T=C.call(Function.call,RegExp.prototype.exec),O=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,N=/\\(\\)?/g,M=function(e){var t=P(e,0,1),n=P(e,-1);if("%"===t&&"%"!==n)throw new s("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==t)throw new s("invalid intrinsic syntax, expected opening `%`");var r=[];return B(e,O,(function(e,t,n,o){r[r.length]=n?B(o,N,"$1"):t||e})),r},R=function(e,t){var n,r=e;if(I(w,r)&&(r="%"+(n=w[r])[0]+"%"),I(k,r)){var o=k[r];if(o===b&&(o=S(r)),void 0===o&&!t)throw new c("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:r,value:o}}throw new s("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new c("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new c('"allowMissing" argument must be a boolean');if(null===T(/^%?[^%]*%?$/,e))throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=M(e),r=n.length>0?n[0]:"",o=R("%"+r+"%",t),i=o.name,l=o.value,a=!1,u=o.alias;u&&(r=u[0],x(n,A([0,1],u)));for(var p=1,d=!0;p<n.length;p+=1){var m=n[p],y=P(m,0,1),g=P(m,-1);if(('"'===y||"'"===y||"`"===y||'"'===g||"'"===g||"`"===g)&&y!==g)throw new s("property names with quotes must have matching quotes");if("constructor"!==m&&d||(a=!0),I(k,i="%"+(r+="."+m)+"%"))l=k[i];else if(null!=l){if(!(m in l)){if(!t)throw new c("base intrinsic for "+e+" exists, but the property is not available.");return}if(f&&p+1>=n.length){var h=f(l,m);l=(d=!!h)&&"get"in h&&!("originalValue"in h.get)?h.get:l[m]}else d=I(l,m),l=l[m];d&&!a&&(k[i]=l)}}return l}},8861:function(e,t,n){"use strict";var r="undefined"!=typeof Symbol&&Symbol,o=n(704);e.exports=function(){return"function"==typeof r&&("function"==typeof Symbol&&("symbol"==typeof r("foo")&&("symbol"==typeof Symbol("bar")&&o())))}},704:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},9196:function(e){"use strict";e.exports=window.React},5794:function(){},4343:function(e,t,n){"use strict";var r=n(131),o="undefined"==typeof globalThis?n.g:globalThis;e.exports=function(){for(var e=[],t=0;t<r.length;t++)"function"==typeof o[r[t]]&&(e[e.length]=r[t]);return e}},7153:function(e,t){var n; /*! Copyright (c) 2018 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames */!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e="",t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=l(e,i(n)))}return e}function i(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return o.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var n in e)r.call(e,n)&&e[n]&&(t=l(t,n));return t}function l(e,t){return t?e?e+" "+t:e+t:e}e.exports?(o.default=o,e.exports=o):void 0===(n=function(){return o}.apply(t,[]))||(e.exports=n)}()},6245:function(e,t,n){"use strict";var r=n(5037)("%String%"),o=n(1642);e.exports=function(e){if("symbol"==typeof e)throw new o("Cannot convert a Symbol value to a string");return r(e)}},2981:function(e,t,n){"use strict";var r=n(1642),o=n(1320),i=n(4602),l=n(5604),a=n(480);e.exports=function(e,t){var n=l(e);if(!i(e)&&!n)throw new r("Assertion failed: `arrayBuffer` must be an ArrayBuffer or a SharedArrayBuffer");if("SEQ-CST"!==t&&"UNORDERED"!==t)throw new r("Assertion failed: `order` must be ~SEQ-CST~ or ~UNORDERED~");if(o(e))throw new r("Assertion failed: `arrayBuffer` must not be detached");return a(e)}},6548:function(e,t,n){"use strict";var r=n(682)("%BigInt%",!0),o=n(9204),i=n(1642),l=r&&r(0);e.exports=function(e,t){if("bigint"!=typeof e||"bigint"!=typeof t)throw new i("Assertion failed: `n` and `d` arguments must be BigInts");if(t===l)throw new o("Division by zero");return e===l?l:e%t}},9002:function(e,t,n){"use strict";var r=n(1642),o=n(6862),i=n(208),l=n(8367),a=n(4065),s=n(9762),c=n(3392),u=n(8110),p=n(9655);e.exports=function(e,t,n){if("Object"!==p(e))throw new r("Assertion failed: Type(O) is not Object");if(!s(t))throw new r("Assertion failed: IsPropertyKey(P) is not true");var d=o(n)?n:u(n);if(!o(d))throw new r("Assertion failed: Desc is not a valid Property Descriptor");return i(a,c,l,e,t,d)}},8367:function(e,t,n){"use strict";var r=n(1642),o=n(6862),i=n(2646);e.exports=function(e){if(void 0!==e&&!o(e))throw new r("Assertion failed: `Desc` must be a Property Descriptor");return i(e)}},3675:function(e,t,n){"use strict";var r=n(1642),o=n(5726),i=n(9762),l=n(9655);e.exports=function(e,t){if("Object"!==l(e))throw new r("Assertion failed: Type(O) is not Object");if(!i(t))throw new r("Assertion failed: IsPropertyKey(P) is not true, got "+o(t));return e[t]}},9661:function(e,t,n){"use strict";var r=n(682),o=n(6724),i=n(1642),l=r("%Uint8Array%",!0),a=n(1154)("Array.prototype.slice"),s=n(6156),c=n(1320),u=n(9219),p=n(4602),d=n(5604),f=n(3002),m=n(2170),y=n(2142);e.exports=function(e,t,n,r,g){var h=d(e);if(!p(e)&&!h)throw new i("Assertion failed: `arrayBuffer` must be an ArrayBuffer or a SharedArrayBuffer");if(!s(t))throw new i("Assertion failed: `byteIndex` must be an integer");if("string"!=typeof n||"number"!=typeof m.size["$"+n])throw new i("Assertion failed: `type` must be a Typed Array element type");if("boolean"!=typeof r)throw new i("Assertion failed: `isTypedArray` must be a boolean");if("SEQ-CST"!==g&&"UNORDERED"!==g)throw new i("Assertion failed: `order` must be either `SEQ-CST` or `UNORDERED`");if(arguments.length>5&&"boolean"!=typeof arguments[5])throw new i("Assertion failed: `isLittleEndian` must be a boolean, if present");if(c(e))throw new i("Assertion failed: `arrayBuffer` is detached");if(t<0)throw new i("Assertion failed: `byteIndex` must be non-negative");var v,b=m.size["$"+n];if(!b)throw new i('Assertion failed: `type` must be one of "INT8", "UINT8", "UINT8C", "INT16", "UINT16", "INT32", "UINT32", "BIGINT64", "BIGUINT64", "FLOAT32", or "FLOAT64"');if(h)throw new o("SharedArrayBuffer is not supported by this implementation");v=a(new l(e,t),0,b);var _=arguments.length>5?arguments[5]:"little"===y,k=_?a(f([0,0,0,0,0,0,0,0],v),-b):a(f(v,[0,0,0,0,0,0,0,0]),0,b);return u(n,k,_)}},5584:function(e,t,n){"use strict";var r=n(1642),o=n(9429),i=n(9762),l=n(9655);e.exports=function(e,t){if("Object"!==l(e))throw new r("Assertion failed: `O` must be an Object");if(!i(t))throw new r("Assertion failed: `P` must be a Property Key");return o(e,t)}},2985:function(e,t,n){"use strict";e.exports=n(692)},4734:function(e){"use strict";e.exports=function(e){return"BIGUINT64"===e||"BIGINT64"===e}},3071:function(e,t,n){"use strict";e.exports=n(6841)},7010:function(e,t,n){"use strict";var r=n(4342)("%Reflect.construct%",!0),o=n(9002);try{o({},"",{"[[Get]]":function(){}})}catch(e){o=null}if(o&&r){var i={},l={};o(l,"length",{"[[Get]]":function(){throw i},"[[Enumerable]]":!0}),e.exports=function(e){try{r(e,l)}catch(e){return e===i}}}else e.exports=function(e){return"function"==typeof e&&!!e.prototype}},4065:function(e,t,n){"use strict";var r=n(1642),o=n(9429),i=n(6862);e.exports=function(e){if(void 0===e)return!1;if(!i(e))throw new r("Assertion failed: `Desc` must be a Property Descriptor");return!(!o(e,"[[Value]]")&&!o(e,"[[Writable]]"))}},1320:function(e,t,n){"use strict";var r=n(1642),o=n(480),i=n(4343)(),l=n(1154),a=n(4602),s=n(5604),c=l("SharedArrayBuffer.prototype.byteLength",!0);e.exports=function(e){var t=s(e);if(!a(e)&&!t)throw new r("Assertion failed: `arrayBuffer` must be an Object with an [[ArrayBufferData]] internal slot");if(0===(t?c:o)(e))try{new n.g[i[0]](e)}catch(e){return!!e&&"TypeError"===e.name}return!1}},9442:function(e,t,n){"use strict";var r=n(1642),o=n(1154),i=o("%ArrayBuffer.prototype.resizable%",!0),l=o("%SharedArrayBuffer.prototype.growable%",!0),a=n(4602),s=n(5604);e.exports=function(e){var t=a(e),n=s(e);if(!t&&!n)throw new r("Assertion failed: `arrayBuffer` must be an ArrayBuffer or SharedArrayBuffer");return t&&i?!i(e):!n||!l||!l(e)}},9762:function(e){"use strict";e.exports=function(e){return"string"==typeof e||"symbol"==typeof e}},9954:function(e,t,n){"use strict";var r=n(1642),o=n(1320),i=n(9149),l=n(359),a=n(6740),s=n(7046),c=n(8150);e.exports=function(e){if(!l(e))throw new r("Assertion failed: `taRecord` must be a TypedArray With Buffer Witness Record");var t=e["[[Object]]"],n=e["[[CachedBufferByteLength]]"];if(o(a(t))&&"DETACHED"!==n)throw new r("Assertion failed: typed array is detached only if the byte length is ~DETACHED~");if("DETACHED"===n)return!0;var u,p=s(t),d=c(t);"AUTO"===d?u=n:u=p+d*i(t);return p>n||u>n}},7551:function(e){"use strict";e.exports=function(e){return"UINT8"===e||"UINT8C"===e||"UINT16"===e||"UINT32"===e||"BIGUINT64"===e}},6005:function(e,t,n){"use strict";var r=n(1642),o=n(2981),i=n(1320),l=n(2527),a=n(6740);e.exports=function(e,t){if(!l(e))throw new r("Assertion failed: `obj` must be a Typed Array");if("SEQ-CST"!==t&&"UNORDERED"!==t)throw new r("Assertion failed: `order` must be ~SEQ-CST~ or ~UNORDERED~");var n=a(e);return{"[[Object]]":e,"[[CachedBufferByteLength]]":i(n)?"DETACHED":o(n,t)}}},4604:function(e,t,n){"use strict";var r=n(1642),o=n(5584),i=n(1242),l=n(2947),a=n(3181),s=n(2587),c=n(5562),u=n(5465),p=n(5964),d=n(9496),f=n(6550),m=n(3647),y=n(7511),g=n(1520),h=n(806),v={__proto__:null,INT8:1,UINT8:1,UINT8C:1,INT16:2,UINT16:2,INT32:4,UINT32:4,BIGINT64:8,BIGUINT64:8,FLOAT32:4,FLOAT64:8},b={__proto__:null,INT8:c,UINT8:d,UINT8C:f,INT16:a,UINT16:u,INT32:s,UINT32:p,BIGINT64:i,BIGUINT64:l};e.exports=function(e,t,n){if("string"!=typeof e||!o(v,e))throw new r("Assertion failed: `type` must be a TypedArray element type: "+h(v));if("number"!=typeof t&&"bigint"!=typeof t)throw new r("Assertion failed: `value` must be a Number or a BigInt");if("boolean"!=typeof n)throw new r("Assertion failed: `isLittleEndian` must be a Boolean");if("FLOAT32"===e)return m(t,n);if("FLOAT64"===e)return y(t,n);var i=v[e],l=(0,b[e])(t);return g(l,i,n)}},9219:function(e,t,n){"use strict";var r=n(682),o=n(1154),i=n(9204),l=n(6724),a=n(1642),s=r("%BigInt%",!0),c=n(5584),u=n(2985),p=n(4734),d=n(7551),f=n(8727),m=n(7604),y=n(2367),g=n(8172),h=n(1824),v=o("Array.prototype.reverse"),b=o("Array.prototype.slice"),_=n(806),k={__proto__:null,INT8:1,UINT8:1,UINT8C:1,INT16:2,UINT16:2,INT32:4,UINT32:4,BIGINT64:8,BIGUINT64:8,FLOAT32:4,FLOAT64:8};e.exports=function(e,t,n){if(!c(k,e))throw new a("Assertion failed: `type` must be a TypedArray element type: "+_(k));if(!u(t)||!g(t,h))throw new a("Assertion failed: `rawBytes` must be an Array of bytes");if("boolean"!=typeof n)throw new a("Assertion failed: `isLittleEndian` must be a Boolean");var r=k[e];if(t.length!==r)throw new i("Assertion failed: `rawBytes` must have a length of "+r+" for type "+e);var o=p(e);if(o&&!s)throw new l("this environment does not support BigInts");return t=b(t,0,r),n||v(t),"FLOAT32"===e?f(t):"FLOAT64"===e?m(t):y(t,r,d(e),o)}},3392:function(e,t,n){"use strict";var r=n(9404);e.exports=function(e,t){return e===t?0!==e||1/e==1/t:r(e)&&r(t)}},8055:function(e,t,n){"use strict";var r=n(1642),o=n(9762),i=n(3392),l=n(9655),a=function(){try{return delete[].length,!0}catch(e){return!1}}();e.exports=function(e,t,n,s){if("Object"!==l(e))throw new r("Assertion failed: `O` must be an Object");if(!o(t))throw new r("Assertion failed: `P` must be a Property Key");if("boolean"!=typeof s)throw new r("Assertion failed: `Throw` must be a Boolean");if(s){if(e[t]=n,a&&!i(e[t],n))throw new r("Attempted to assign to readonly property.");return!0}try{return e[t]=n,!a||i(e[t],n)}catch(e){return!1}}},3383:function(e,t,n){"use strict";var r=n(682),o=n(6724),i=n(1642),l=r("%Uint8Array%",!0),a=n(6156),s=n(4734),c=n(1320),u=n(4604),p=n(4602),d=n(5604),f=n(9429),m=n(2170),y=n(2142),g=n(9065);e.exports=function(e,t,n,r,h,v){var b=d(e);if(!p(e)&&!b)throw new i("Assertion failed: `arrayBuffer` must be an ArrayBuffer or a SharedArrayBuffer");if(!a(t)||t<0)throw new i("Assertion failed: `byteIndex` must be a non-negative integer");if("string"!=typeof n||!f(m.size,"$"+n))throw new i("Assertion failed: `type` must be a Typed Array Element Type");if("number"!=typeof r&&"bigint"!=typeof r)throw new i("Assertion failed: `value` must be a Number or a BigInt");if("boolean"!=typeof h)throw new i("Assertion failed: `isTypedArray` must be a boolean");if("SEQ-CST"!==v&&"UNORDERED"!==v&&"INIT"!==v)throw new i('Assertion failed: `order` must be `"SEQ-CST"`, `"UNORDERED"`, or `"INIT"`');if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new i("Assertion failed: `isLittleEndian` must be a boolean, if present");if(c(e))throw new i("Assertion failed: ArrayBuffer is detached");if(s(n)?"bigint"!=typeof r:"number"!=typeof r)throw new i("Assertion failed: `value` must be a BigInt if type is ~BIGINT64~ or ~BIGUINT64~, otherwise a Number");var _=m.size["$"+n],k=arguments.length>6?arguments[6]:"little"===y,E=u(n,r,k);if(b)throw new o("SharedArrayBuffer is not supported by this implementation");var S=new l(e,t,_);g(E,(function(e,t){S[t]=e}))}},5994:function(e,t,n){"use strict";var r=n(682)("%Symbol.species%",!0),o=n(1642),i=n(7010),l=n(9655);e.exports=function(e,t){if("Object"!==l(e))throw new o("Assertion failed: Type(O) is not Object");var n=e.constructor;if(void 0===n)return t;if("Object"!==l(n))throw new o("O.constructor is not an Object");var a=r?n[r]:void 0;if(null==a)return t;if(i(a))return a;throw new o("no constructor found")}},907:function(e,t,n){"use strict";var r=n(682)("%BigInt%",!0),o=n(1642),i=n(6724);e.exports=function(e){if("string"!=typeof e)throw new o("`argument` must be a string");if(!r)throw new i("BigInts are not supported in this environment");try{return r(e)}catch(e){return}}},4967:function(e,t,n){"use strict";var r=n(682),o=r("%Number%"),i=r("%RegExp%"),l=n(1642),a=r("%parseInt%"),s=n(1154),c=n(1312),u=s("String.prototype.slice"),p=c(/^0b[01]+$/i),d=c(/^0o[0-7]+$/i),f=c(/^[-+]0x[0-9a-f]+$/i),m=c(new i("["+["Â…","​","￾"].join("")+"]","g")),y=n(4113);e.exports=function e(t){if("string"!=typeof t)throw new l("Assertion failed: `argument` is not a String");if(p(t))return o(a(u(t,2),2));if(d(t))return o(a(u(t,2),8));if(m(t)||f(t))return NaN;var n=y(t);return n!==t?e(n):o(t)}},9752:function(e,t,n){"use strict";var r=n(682),o=r("%BigInt%",!0),i=r("%Number%"),l=n(1642),a=n(6724),s=n(907),c=n(210);e.exports=function(e){if(!o)throw new a("BigInts are not supported in this environment");var t=c(e,i);if(null==t)throw new l("Cannot convert null or undefined to a BigInt");if("boolean"==typeof t)return o(t?1:0);if("number"==typeof t)throw new l("Cannot convert a Number value to a BigInt");if("string"==typeof t){var n=s(t);if(void 0===n)throw new l("Failed to parse String to BigInt");return n}if("symbol"==typeof t)throw new l("Cannot convert a Symbol value to a BigInt");if("bigint"!=typeof t)throw new a("Assertion failed: unknown primitive type");return t}},1242:function(e,t,n){"use strict";var r=n(682),o=r("%BigInt%",!0),i=r("%Math.pow%"),l=n(9752),a=n(6548),s=n(8626),c=o&&BigInt(i(2,32))*BigInt(i(2,31)),u=o&&BigInt(i(2,32))*BigInt(i(2,32));e.exports=function(e){var t=l(e),n=s(a,t,u);return n>=c?n-u:n}},2947:function(e,t,n){"use strict";var r=n(682),o=r("%BigInt%",!0),i=r("%Math.pow%"),l=n(9752),a=n(6548),s=n(8626),c=o&&BigInt(i(2,32))*BigInt(i(2,32));e.exports=function(e){var t=l(e);return s(a,t,c)}},6440:function(e){"use strict";e.exports=function(e){return!!e}},3181:function(e,t,n){"use strict";var r=n(8457),o=n(3438),i=n(736),l=n(7991);e.exports=function(e){var t=o(e);if(!l(t)||0===t)return 0;var n=i(t),a=r(n,65536);return a>=32768?a-65536:a}},2587:function(e,t,n){"use strict";var r=n(8457),o=n(3438),i=n(736),l=n(7991),a=4294967296;e.exports=function(e){var t=o(e);if(!l(t)||0===t)return 0;var n=i(t),s=r(n,a),c=s>=2147483648?s-a:s;return 0===c?0:c}},5562:function(e,t,n){"use strict";var r=n(8457),o=n(3438),i=n(736),l=n(7991);e.exports=function(e){var t=o(e);if(!l(t)||0===t)return 0;var n=i(t),a=r(n,256);return a>=128?a-256:a}},2897:function(e,t,n){"use strict";var r=n(3438),o=n(736),i=n(9404),l=n(7991);e.exports=function(e){var t=r(e);return i(t)||0===t?0:l(t)?o(t):t}},3438:function(e,t,n){"use strict";var r=n(682),o=n(1642),i=r("%Number%"),l=n(4968),a=n(210),s=n(4967);e.exports=function(e){var t=l(e)?e:a(e,i);if("symbol"==typeof t)throw new o("Cannot convert a Symbol value to a number");if("bigint"==typeof t)throw new o("Conversion from 'BigInt' to 'number' is not allowed.");return"string"==typeof t?s(t):i(t)}},210:function(e,t,n){"use strict";var r=n(5249);e.exports=function(e){return arguments.length>1?r(e,arguments[1]):r(e)}},8110:function(e,t,n){"use strict";var r=n(9429),o=n(1642),i=n(9655),l=n(6440),a=n(3071);e.exports=function(e){if("Object"!==i(e))throw new o("ToPropertyDescriptor requires an object");var t={};if(r(e,"enumerable")&&(t["[[Enumerable]]"]=l(e.enumerable)),r(e,"configurable")&&(t["[[Configurable]]"]=l(e.configurable)),r(e,"value")&&(t["[[Value]]"]=e.value),r(e,"writable")&&(t["[[Writable]]"]=l(e.writable)),r(e,"get")){var n=e.get;if(void 0!==n&&!a(n))throw new o("getter must be a function");t["[[Get]]"]=n}if(r(e,"set")){var s=e.set;if(void 0!==s&&!a(s))throw new o("setter must be a function");t["[[Set]]"]=s}if((r(t,"[[Get]]")||r(t,"[[Set]]"))&&(r(t,"[[Value]]")||r(t,"[[Writable]]")))throw new o("Invalid property descriptor. Cannot both specify accessors and a value or writable attribute");return t}},7249:function(e,t,n){"use strict";var r=n(682)("%String%"),o=n(1642);e.exports=function(e){if("symbol"==typeof e)throw new o("Cannot convert a Symbol value to a string");return r(e)}},5465:function(e,t,n){"use strict";var r=n(8457),o=n(3438),i=n(736),l=n(7991);e.exports=function(e){var t=o(e);if(!l(t)||0===t)return 0;var n=i(t),a=r(n,65536);return 0===a?0:a}},5964:function(e,t,n){"use strict";var r=n(8457),o=n(3438),i=n(736),l=n(7991);e.exports=function(e){var t=o(e);if(!l(t)||0===t)return 0;var n=i(t),a=r(n,4294967296);return 0===a?0:a}},9496:function(e,t,n){"use strict";var r=n(7991),o=n(8457),i=n(3438),l=n(736);e.exports=function(e){var t=i(e);if(!r(t)||0===t)return 0;var n=l(t);return o(n,256)}},6550:function(e,t,n){"use strict";var r=n(3832),o=n(3438),i=n(3473),l=n(9404);e.exports=function(e){var t=o(e);if(l(t))return 0;var n=r(t,0,255),a=i(n);return n<a+.5?a:n>a+.5?a+1:a%2==0?a:a+1}},9655:function(e,t,n){"use strict";var r=n(1528);e.exports=function(e){return"symbol"==typeof e?"Symbol":"bigint"==typeof e?"BigInt":r(e)}},7265:function(e,t,n){"use strict";var r=n(6724),o=n(1642),i=n(2985),l=n(7010),a=n(9954),s=n(8921),c=n(3842),u=n(4343)();e.exports=function(e,t){if(!l(e))throw new o("Assertion failed: `constructor` must be a constructor");if(!i(t))throw new o("Assertion failed: `argumentList` must be a List");if(0===u.length)throw new r("Assertion failed: Typed Arrays are not supported in this environment");var n;n=0===t.length?new e:1===t.length?new e(t[0]):2===t.length?new e(t[0],t[1]):new e(t[0],t[1],t[2]);var p=c(n,"SEQ-CST");if(1===t.length&&"number"==typeof t[0]){if(a(p))throw new o("new Typed Array is out of bounds");if(s(p)<t[0])throw new o("`argumentList[0]` must be <= `newTypedArray.length`")}return n}},9149:function(e,t,n){"use strict";var r=n(6724),o=n(1642),i=n(6156),l=n(4010),a=n(2170);e.exports=function(e){var t=l(e);if(!1===t)throw new o("Assertion failed: `O` must be a TypedArray");var n=a.size["$"+a.name["$"+t]];if(!i(n)||n<0)throw new r("Assertion failed: Unknown TypedArray type `"+t+"`");return n}},1586:function(e,t,n){"use strict";var r=n(6724),o=n(1642),i=n(4010),l=n(2170);e.exports=function(e){var t=i(e);if(!1===t)throw new o("Assertion failed: `O` must be a TypedArray");var n=l.name["$"+t];if("string"!=typeof n)throw new r("Assertion failed: Unknown TypedArray type `"+t+"`");return n}},8921:function(e,t,n){"use strict";var r=n(1642),o=n(3473),i=n(9442),l=n(9954),a=n(9149),s=n(359),c=n(6740),u=n(7046),p=n(8150);e.exports=function(e){if(!s(e))throw new r("Assertion failed: `taRecord` must be a TypedArray With Buffer Witness Record");if(l(e))throw new r("Assertion failed: `taRecord` is out of bounds");var t=e["[[Object]]"],n=p(t);if("AUTO"!==n)return n;if(i(c(t)))throw new r("Assertion failed: array buffer is not fixed length");var d=u(t),f=a(t),m=e["[[CachedBufferByteLength]]"];if("DETACHED"===m)throw new r("Assertion failed: typed array is detached");return o((m-d)/f)}},817:function(e,t,n){"use strict";var r=n(6724),o=n(1642),i=n(4010),l=n(4343)(),a=n(2985),s=n(5994),c=n(7265),u=n(9660);e.exports=function(e,t){if(0===l.length)throw new r("Assertion failed: Typed Arrays are not supported in this environment");var n=i(e);if(!n)throw new o("Assertion failed: exemplar must be a TypedArray");if(!a(t))throw new o("Assertion failed: `argumentList` must be a List");var p=u(n);if("function"!=typeof p)throw new r("Assertion failed: `constructor` of `exemplar` ("+n+") must exist. Please report this!");var d=s(e,p);return c(d,t)}},3842:function(e,t,n){"use strict";var r=n(1642),o=n(9954),i=n(6005),l=n(9655),a=n(2527);e.exports=function(e,t){if("SEQ-CST"!==t&&"UNORDERED"!==t)throw new r("Assertion failed: `order` must be ~SEQ-CST~ or ~UNORDERED~");if("Object"!==l(e))throw new r("Assertion failed: `O` must be an Object");if(!a(e))throw new r("Assertion failed: `O` must be a Typed Array");var n=i(e,t);if(o(n))throw new r("`O` must be in-bounds and backed by a non-detached buffer");return n}},3832:function(e,t,n){"use strict";var r=n(682),o=n(1642),i=r("%Math.max%"),l=r("%Math.min%");e.exports=function(e,t,n){if("number"!=typeof e||"number"!=typeof t||"number"!=typeof n||!(t<=n))throw new o("Assertion failed: all three arguments must be MVs, and `lower` must be `<= upper`");return l(i(t,e),n)}},3473:function(e){"use strict";var t=Math.floor;e.exports=function(e){return"bigint"==typeof e?e:t(e)}},1367:function(e,t,n){"use strict";var r=n(682);e.exports=r("%Math.max%")},2967:function(e,t,n){"use strict";var r=n(682);e.exports=r("%Math.min%")},8457:function(e,t,n){"use strict";var r=n(2076);e.exports=function(e,t){return r(e,t)}},2170:function(e){"use strict";e.exports={__proto__:null,name:{__proto__:null,$Int8Array:"INT8",$Uint8Array:"UINT8",$Uint8ClampedArray:"UINT8C",$Int16Array:"INT16",$Uint16Array:"UINT16",$Int32Array:"INT32",$Uint32Array:"UINT32",$BigInt64Array:"BIGINT64",$BigUint64Array:"BIGUINT64",$Float32Array:"FLOAT32",$Float64Array:"FLOAT64"},size:{__proto__:null,$INT8:1,$UINT8:1,$UINT8C:1,$INT16:2,$UINT16:2,$INT32:4,$UINT32:4,$BIGINT64:8,$BIGUINT64:8,$FLOAT32:4,$FLOAT64:8}}},736:function(e,t,n){"use strict";var r=n(3473),o=n(1642);e.exports=function(e){if("number"!=typeof e&&"bigint"!=typeof e)throw new o("argument must be a Number or a BigInt");var t=e<0?-r(-e):r(e);return 0===t?0:t}},1528:function(e){"use strict";e.exports=function(e){return null===e?"Null":void 0===e?"Undefined":"function"==typeof e||"object"==typeof e?"Object":"number"==typeof e?"Number":"boolean"==typeof e?"Boolean":"string"==typeof e?"String":void 0}},4342:function(e,t,n){"use strict";e.exports=n(682)},208:function(e,t,n){"use strict";var r=n(8198),o=n(8918),i=r.hasArrayLengthDefineBug(),l=i&&n(692),a=n(1154)("Object.prototype.propertyIsEnumerable");e.exports=function(e,t,n,r,s,c){if(!o){if(!e(c))return!1;if(!c["[[Configurable]]"]||!c["[[Writable]]"])return!1;if(s in r&&a(r,s)!==!!c["[[Enumerable]]"])return!1;var u=c["[[Value]]"];return r[s]=u,t(r[s],u)}return i&&"length"===s&&"[[Value]]"in c&&l(r)&&r.length!==c["[[Value]]"]?(r.length=c["[[Value]]"],r.length===c["[[Value]]"]):(o(r,s,n(c)),!0)}},692:function(e,t,n){"use strict";var r=n(682)("%Array%"),o=!r.isArray&&n(1154)("Object.prototype.toString");e.exports=r.isArray||function(e){return"[object Array]"===o(e)}},8727:function(e,t,n){"use strict";var r=n(682)("%Math.pow%");e.exports=function(e){var t=128&e[3]?-1:1,n=(127&e[3])<<1|e[2]>>7,o=(127&e[2])<<16|e[1]<<8|e[0];return 0===n&&0===o?1===t?0:-0:255===n&&0===o?1===t?1/0:-1/0:255===n&&0!==o?NaN:-127===(n-=127)?t*o*r(2,-149):t*(1+o*r(2,-23))*r(2,n)}},7604:function(e,t,n){"use strict";var r=n(682)("%Math.pow%");e.exports=function(e){var t=128&e[7]?-1:1,n=(127&e[7])<<4|(240&e[6])>>4,o=281474976710656*(15&e[6])+1099511627776*e[5]+4294967296*e[4]+16777216*e[3]+65536*e[2]+256*e[1]+e[0];return 0===n&&0===o?0*t:2047===n&&0!==o?NaN:2047===n&&0===o?t*(1/0):-1023===(n-=1023)?t*o*5e-324:t*(1+o/4503599627370496)*r(2,n)}},2367:function(e,t,n){"use strict";var r=n(682),o=r("%Math.pow%"),i=r("%Number%"),l=r("%BigInt%",!0);e.exports=function(e,t,n,r){for(var a=r?l:i,s=a(0),c=0;c<e.length;c++)s+=a(e[c]*o(2,8*c));if(!n){var u=8*t;128&e[t-1]&&(s-=a(o(2,u)))}return s}},2142:function(e,t,n){"use strict";var r=n(682),o=r("%Uint8Array%",!0),i=r("%Uint32Array%",!0),l=n(6740),a=i&&new i([305419896]),s=a&&new o(l(a));e.exports=s?120===s[0]?"little":18===s[0]?"big":52===s[0]?"mixed":"unknown":"indeterminate"},8172:function(e){"use strict";e.exports=function(e,t){for(var n=0;n<e.length;n+=1)if(!t(e[n],n,e))return!1;return!0}},9065:function(e){"use strict";e.exports=function(e,t){for(var n=0;n<e.length;n+=1)t(e[n],n,e)}},1211:function(e){"use strict";var t=1075;e.exports=function(e){var n="";if(0===e)return n;for(var r,o=t,i=0;i<t;i+=1)if((r=2*e)>=1?(e=r-1,n+="1",o===t&&(o=i)):(e=r,n+="0"),1===r||i-o>54)return n;return n}},2646:function(e){"use strict";e.exports=function(e){if(void 0===e)return e;var t={};return"[[Value]]"in e&&(t.value=e["[[Value]]"]),"[[Writable]]"in e&&(t.writable=!!e["[[Writable]]"]),"[[Get]]"in e&&(t.get=e["[[Get]]"]),"[[Set]]"in e&&(t.set=e["[[Set]]"]),"[[Enumerable]]"in e&&(t.enumerable=!!e["[[Enumerable]]"]),"[[Configurable]]"in e&&(t.configurable=!!e["[[Configurable]]"]),t}},9495:function(e,t,n){"use strict";var r=n(682)("%Object.getPrototypeOf%",!0),o=n(1856)();e.exports=r||(o?function(e){return e.__proto__}:null)},20:function(e,t,n){"use strict";var r=n(682)("%Math.floor%");e.exports=function(e){for(var t,n="";e>0;)n=(t=e/2)===(e=r(t))?"0"+n:"1"+n;return n}},1520:function(e,t,n){"use strict";var r=n(682),o=r("%Number%"),i=r("%BigInt%",!0);e.exports=function(e,t,n){var r="bigint"==typeof e?i:o;e<0&&(e>>>=0);for(var l=[],a=0;a<t;a++)l[n?a:t-1-a]=o(e&r(255)),e>>=r(8);return l}},1824:function(e){"use strict";e.exports=function(e){return"number"==typeof e&&e>=0&&e<=255&&(0|e)===e}},7991:function(e,t,n){"use strict";var r=n(9404);e.exports=function(e){return("number"==typeof e||"bigint"==typeof e)&&!r(e)&&e!==1/0&&e!==-1/0}},6156:function(e,t,n){"use strict";var r=n(682),o=r("%Math.abs%"),i=r("%Math.floor%"),l=n(9404),a=n(7991);e.exports=function(e){if("number"!=typeof e||l(e)||!a(e))return!1;var t=o(e);return i(t)===t}},9404:function(e){"use strict";e.exports=Number.isNaN||function(e){return e!=e}},2745:function(e){"use strict";e.exports=function(e){return 0===e&&1/e==-1/0}},4968:function(e){"use strict";e.exports=function(e){return null===e||"function"!=typeof e&&"object"!=typeof e}},2076:function(e){"use strict";var t=Math.floor;e.exports=function(e,n){var r=e%n;return t(r>=0?r:r+n)}},8626:function(e){"use strict";e.exports=function(e,t,n){var r=e(t,n);return r>=0?r:r+n}},6862:function(e,t,n){"use strict";var r=n(1642),o=n(9429),i={__proto__:null,"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};e.exports=function(e){if(!e||"object"!=typeof e)return!1;for(var t in e)if(o(e,t)&&!i[t])return!1;var n=o(e,"[[Value]]")||o(e,"[[Writable]]"),l=o(e,"[[Get]]")||o(e,"[[Set]]");if(n&&l)throw new r("Property Descriptors may not be both accessor and data descriptors");return!0}},359:function(e,t,n){"use strict";var r=n(9429),o=n(2527),i=n(6156);e.exports=function(e){return!!e&&"object"==typeof e&&r(e,"[[Object]]")&&r(e,"[[CachedBufferByteLength]]")&&(i(e["[[CachedBufferByteLength]]"])&&e["[[CachedBufferByteLength]]"]>=0||"DETACHED"===e["[[CachedBufferByteLength]]"])&&o(e["[[Object]]"])}},9660:function(e,t,n){"use strict";var r=n(682),o={__proto__:null,$Int8Array:r("%Int8Array%",!0),$Uint8Array:r("%Uint8Array%",!0),$Uint8ClampedArray:r("%Uint8ClampedArray%",!0),$Int16Array:r("%Int16Array%",!0),$Uint16Array:r("%Uint16Array%",!0),$Int32Array:r("%Int32Array%",!0),$Uint32Array:r("%Uint32Array%",!0),$BigInt64Array:r("%BigInt64Array%",!0),$BigUint64Array:r("%BigUint64Array%",!0),$Float32Array:r("%Float32Array%",!0),$Float64Array:r("%Float64Array%",!0)};e.exports=function(e){return o["$"+e]}},3647:function(e,t,n){"use strict";var r=n(682),o=r("%Math.abs%"),i=r("%Math.floor%"),l=r("%Math.pow%"),a=n(7991),s=n(9404),c=n(2745);e.exports=function(e,t){if(s(e))return t?[0,0,192,127]:[127,192,0,0];var n;if(0===e)return n=c(e)?128:0,t?[0,0,0,n]:[n,0,0,0];if(o(e)>34028234663852886e22||!a(e))return n=e<0?255:127,t?[0,0,128,n]:[n,128,0,0];var r=e<0?1:0;e=o(e);for(var u=0;e>=2;)u+=1,e/=2;for(;e<1;)u-=1,e*=2;var p=e-1;p*=l(2,23)+.5,u+=127;var d=r<<31|(u<<=23)|(p=i(p)),f=255&d,m=255&(d>>=8),y=255&(d>>=8),g=255&(d>>=8);return t?[f,m,y,g]:[g,y,m,f]}},7511:function(e,t,n){"use strict";var r=n(682),o=r("%parseInt%"),i=r("%Math.abs%"),l=r("%Math.floor%"),a=n(1154),s=a("String.prototype.indexOf"),c=a("String.prototype.slice"),u=n(1211),p=n(20),d=n(2745),f=1023,m="11111111111",y="00000000000",g="000000000000000000000000000000000000000000000000000";e.exports=function(e,t){var n,r,a=e<0||d(e)?"1":"0";if(isNaN(e))n=m,r="1"+g;else if(isFinite(e))if(0===e)n=y,r="0"+g;else{e=i(e);var h,v=l(e),b=p(v),_=u(e-v);if(b)n=b.length-1;else{var k=s(_,"1");k>-1&&(h=k+1),n=-h}r=b+_,n<0?(n<=-1023&&(h=1022),r=c(r,h)):r=c(r,1),n=c(y+p(n+f),-11),r=c(r+g+"0",0,52)}else n=m,r="0"+g;for(var E=a+n+r,S=[],w=0;w<8;w++){S[t?8-w-1:w]=o(c(E,8*w,8*(w+1)),2)}return S}}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r].call(i.exports,i,i.exports,n),i.exports}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.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};!function(){"use strict";n.r(r),n.d(r,{AlignmentControl:function(){return mk},AlignmentToolbar:function(){return yk},Autocomplete:function(){return Ck},BlockAlignmentControl:function(){return El},BlockAlignmentToolbar:function(){return Sl},BlockBreadcrumb:function(){return Tk},BlockColorsStyleSelector:function(){return Rk},BlockContextProvider:function(){return Fl},BlockControls:function(){return Ur},BlockEdit:function(){return jl},BlockEditorKeyboardShortcuts:function(){return rI},BlockEditorProvider:function(){return Sp},BlockFormatControls:function(){return Dr},BlockIcon:function(){return hp},BlockInspector:function(){return YC},BlockList:function(){return Jh},BlockMover:function(){return ky},BlockNavigationDropdown:function(){return iE},BlockPreview:function(){return tf},BlockSelectionClearer:function(){return Cp},BlockSettingsMenu:function(){return $g},BlockSettingsMenuControls:function(){return zg},BlockStyles:function(){return cE},BlockTitle:function(){return uy},BlockToolbar:function(){return th},BlockTools:function(){return XC},BlockVerticalAlignmentControl:function(){return Li},BlockVerticalAlignmentToolbar:function(){return Di},ButtonBlockAppender:function(){return Jm},ButtonBlockerAppender:function(){return qm},ColorPalette:function(){return IE},ColorPaletteControl:function(){return AE},ContrastChecker:function(){return Gv},CopyHandler:function(){return sg},DefaultBlockAppender:function(){return $m},FontSizePicker:function(){return Tb},HeightControl:function(){return ni},InnerBlocks:function(){return Hh},Inserter:function(){return Wm},InspectorAdvancedControls:function(){return Ho},InspectorControls:function(){return Wo},JustifyContentControl:function(){return zi},JustifyToolbar:function(){return Vi},LineHeightControl:function(){return fb},MediaPlaceholder:function(){return bw},MediaReplaceFlow:function(){return dw},MediaUpload:function(){return Am},MediaUploadCheck:function(){return Im},MultiSelectScrollIntoView:function(){return oI},NavigableToolbar:function(){return Cy},ObserveTyping:function(){return sI},PanelColorSettings:function(){return _w},PlainText:function(){return eC},RichText:function(){return Qw},RichTextShortcut:function(){return rC},RichTextToolbarButton:function(){return oC},SETTINGS_DEFAULTS:function(){return E},SkipToSelectedBlock:function(){return EC},ToolSelector:function(){return aC},Typewriter:function(){return dI},URLInput:function(){return CS},URLInputButton:function(){return pC},URLPopover:function(){return gw},Warning:function(){return Vl},WritingFlow:function(){return Up},__experimentalBlockAlignmentMatrixControl:function(){return Bk},__experimentalBlockFullHeightAligmentControl:function(){return Ak},__experimentalBlockPatternSetup:function(){return kE},__experimentalBlockPatternsList:function(){return wf},__experimentalBlockVariationPicker:function(){return pE},__experimentalBlockVariationTransforms:function(){return wE},__experimentalBorderRadiusControl:function(){return cv},__experimentalColorGradientControl:function(){return Dv},__experimentalColorGradientSettingsDropdown:function(){return Vv},__experimentalDateFormatPicker:function(){return PE},__experimentalDuotoneControl:function(){return I_},__experimentalFontAppearanceControl:function(){return ub},__experimentalFontFamilyControl:function(){return Sb},__experimentalGetBorderClassesAndStyles:function(){return W_},__experimentalGetColorClassesAndStyles:function(){return K_},__experimentalGetElementClassName:function(){return _I},__experimentalGetGapCSSValue:function(){return Ii},__experimentalGetGradientClass:function(){return Av},__experimentalGetGradientObjectByGradientValue:function(){return Bv},__experimentalGetMatchingVariation:function(){return EI},__experimentalGetSpacingClassesAndStyles:function(){return Y_},__experimentalImageEditor:function(){return mS},__experimentalImageSizeControl:function(){return hS},__experimentalImageURLInputUI:function(){return bC},__experimentalInspectorPopoverHeader:function(){return hI},__experimentalLayoutStyle:function(){return ul},__experimentalLetterSpacingControl:function(){return a_},__experimentalLibrary:function(){return tI},__experimentalLinkControl:function(){return lw},__experimentalLinkControlSearchInput:function(){return qS},__experimentalLinkControlSearchItem:function(){return MS},__experimentalLinkControlSearchResults:function(){return jS},__experimentalListView:function(){return rE},__experimentalPanelColorGradientSettings:function(){return RE},__experimentalPreviewOptions:function(){return _C},__experimentalPublishDateTimePicker:function(){return vI},__experimentalRecursionProvider:function(){return mI},__experimentalResponsiveBlockControl:function(){return nC},__experimentalSpacingSizesControl:function(){return Co},__experimentalTextDecorationControl:function(){return Jb},__experimentalTextTransformControl:function(){return r_},__experimentalUnitControl:function(){return sC},__experimentalUseBlockOverlayActive:function(){return rp},__experimentalUseBlockPreview:function(){return nf},__experimentalUseBorderProps:function(){return $_},__experimentalUseColorProps:function(){return J_},__experimentalUseCustomSides:function(){return Ei},__experimentalUseGradient:function(){return Tv},__experimentalUseHasRecursion:function(){return yI},__experimentalUseMultipleOriginColorsAndGradients:function(){return mv},__experimentalUseResizeCanvas:function(){return kC},__experimentaluseLayoutClasses:function(){return M_},__experimentaluseLayoutStyles:function(){return R_},__unstableBlockNameContext:function(){return eh},__unstableBlockSettingsMenuFirstItem:function(){return Ag},__unstableBlockToolbarLastItem:function(){return og},__unstableDuotoneFilter:function(){return Jd},__unstableDuotoneStylesheet:function(){return Kd},__unstableDuotoneUnsetStylesheet:function(){return qd},__unstableEditorStyles:function(){return Wd},__unstableGetValuesFromColors:function(){return $d},__unstableIframe:function(){return Vp},__unstableInserterMenuExtension:function(){return Om},__unstablePresetDuotoneFilter:function(){return Yd},__unstableRichTextInputEvent:function(){return iC},__unstableUseBlockSelectionClearer:function(){return wp},__unstableUseClipboardHandler:function(){return ag},__unstableUseMouseMoveTypingReset:function(){return lI},__unstableUseTypewriter:function(){return pI},__unstableUseTypingObserver:function(){return aI},createCustomColorsHOC:function(){return rk},getColorClassName:function(){return fv},getColorObjectByAttributeValues:function(){return pv},getColorObjectByColorValue:function(){return dv},getComputedFluidTypographyValue:function(){return Fb},getFontSize:function(){return xb},getFontSizeClass:function(){return Pb},getFontSizeObjectByValue:function(){return Bb},getGradientSlugByValue:function(){return Pv},getGradientValueBySlug:function(){return xv},getPxFromCssUnit:function(){return OI},getTypographyClassesAndStyles:function(){return Q_},privateApis:function(){return MA},store:function(){return xr},storeConfig:function(){return Ar},transformStyles:function(){return Vd},useBlockDisplayInformation:function(){return sy},useBlockEditContext:function(){return Nr},useBlockProps:function(){return op},useCachedTruthy:function(){return Z_},useInnerBlocksProps:function(){return Gh},useSetting:function(){return yo},withColorContext:function(){return CE},withColors:function(){return ok},withFontSizes:function(){return ak}});var e={};n.r(e),n.d(e,{__experimentalGetActiveBlockIdByBlockNames:function(){return Qt},__experimentalGetAllowedBlocks:function(){return Bt},__experimentalGetAllowedPatterns:function(){return Nt},__experimentalGetBlockListSettingsForBlocks:function(){return jt},__experimentalGetDirectInsertBlock:function(){return Pt},__experimentalGetGlobalBlocksByName:function(){return se},__experimentalGetLastBlockAttributeChanges:function(){return Gt},__experimentalGetParsedPattern:function(){return Tt},__experimentalGetPatternTransformItems:function(){return Ft},__experimentalGetPatternsByBlockTypes:function(){return Rt},__experimentalGetReusableBlockTitle:function(){return zt},__unstableGetBlockWithoutInnerBlocks:function(){return te},__unstableGetClientIdWithClientIdsTree:function(){return re},__unstableGetClientIdsTree:function(){return oe},__unstableGetContentLockingParent:function(){return tn},__unstableGetEditorMode:function(){return $t},__unstableGetSelectedBlocksWithPartialSelection:function(){return Ge},__unstableGetTemporarilyEditingAsBlocks:function(){return nn},__unstableGetVisibleBlocks:function(){return en},__unstableHasActiveBlockOverlayActive:function(){return rn},__unstableIsFullySelected:function(){return Ue},__unstableIsLastBlockChangeIgnored:function(){return Vt},__unstableIsSelectionCollapsed:function(){return je},__unstableIsSelectionMergeable:function(){return Ve},__unstableIsWithinBlockOverlay:function(){return on},__unstableSelectionHasUnmergeableBlock:function(){return ze},areInnerBlocksControlled:function(){return Yt},canEditBlock:function(){return vt},canInsertBlockType:function(){return dt},canInsertBlocks:function(){return ft},canLockBlockType:function(){return bt},canMoveBlock:function(){return gt},canMoveBlocks:function(){return ht},canRemoveBlock:function(){return mt},canRemoveBlocks:function(){return yt},didAutomaticChange:function(){return qt},getAdjacentBlockClientId:function(){return Ce},getAllowedBlocks:function(){return xt},getBlock:function(){return ee},getBlockAttributes:function(){return X},getBlockCount:function(){return pe},getBlockHierarchyRootClientId:function(){return Se},getBlockIndex:function(){return We},getBlockInsertionPoint:function(){return it},getBlockListSettings:function(){return Lt},getBlockMode:function(){return Ze},getBlockName:function(){return Q},getBlockNamesByClientId:function(){return ue},getBlockOrder:function(){return He},getBlockParents:function(){return ke},getBlockParentsByBlockName:function(){return Ee},getBlockRootClientId:function(){return _e},getBlockSelectionEnd:function(){return ye},getBlockSelectionStart:function(){return me},getBlockTransformItems:function(){return It},getBlocks:function(){return ne},getBlocksByClientId:function(){return ce},getClientIdsOfDescendants:function(){return ie},getClientIdsWithDescendants:function(){return le},getDraggedBlockClientIds:function(){return tt},getFirstMultiSelectedBlockClientId:function(){return Oe},getGlobalBlockCount:function(){return ae},getInserterItems:function(){return Ct},getLastMultiSelectedBlockClientId:function(){return Ne},getLowestCommonAncestorWithSelectedBlock:function(){return we},getMultiSelectedBlockClientIds:function(){return Pe},getMultiSelectedBlocks:function(){return Te},getMultiSelectedBlocksEndClientId:function(){return De},getMultiSelectedBlocksStartClientId:function(){return Le},getNextBlockClientId:function(){return Ae},getPatternsByBlockTypes:function(){return Mt},getPreviousBlockClientId:function(){return Ie},getSelectedBlock:function(){return be},getSelectedBlockClientId:function(){return ve},getSelectedBlockClientIds:function(){return Be},getSelectedBlockCount:function(){return ge},getSelectedBlocksInitialCaretPosition:function(){return xe},getSelectionEnd:function(){return fe},getSelectionStart:function(){return de},getSettings:function(){return Dt},getTemplate:function(){return st},getTemplateLock:function(){return ct},hasBlockMovingClientId:function(){return Kt},hasInserterItems:function(){return At},hasMultiSelection:function(){return Je},hasSelectedBlock:function(){return he},hasSelectedInnerBlock:function(){return Ke},isAncestorBeingDragged:function(){return rt},isAncestorMultiSelected:function(){return Fe},isBlockBeingDragged:function(){return nt},isBlockHighlighted:function(){return Jt},isBlockInsertionPointVisible:function(){return lt},isBlockMultiSelected:function(){return Re},isBlockSelected:function(){return $e},isBlockValid:function(){return Z},isBlockVisible:function(){return Xt},isBlockWithinSelection:function(){return qe},isCaretWithinFormattedText:function(){return ot},isDraggingBlocks:function(){return et},isFirstMultiSelectedBlock:function(){return Me},isLastBlockChangePersistent:function(){return Ut},isMultiSelecting:function(){return Ye},isNavigationMode:function(){return Wt},isSelectionEnabled:function(){return Qe},isTyping:function(){return Xe},isValidTemplate:function(){return at},wasBlockJustInserted:function(){return Zt}});var t={};n.r(t),n.d(t,{__experimentalUpdateSettings:function(){return an},hideBlockInterface:function(){return sn},showBlockInterface:function(){return cn}});var o={};n.r(o),n.d(o,{getLastInsertedBlocksClientIds:function(){return pn},isBlockInterfaceHidden:function(){return un}});var i={};n.r(i),n.d(i,{__unstableDeleteSelection:function(){return Hn},__unstableExpandSelection:function(){return $n},__unstableMarkAutomaticChange:function(){return pr},__unstableMarkLastChangeAsPersistent:function(){return cr},__unstableMarkNextChangeAsNotPersistent:function(){return ur},__unstableSaveReusableBlock:function(){return sr},__unstableSetEditorMode:function(){return fr},__unstableSetTemporarilyEditingAsBlocks:function(){return Er},__unstableSplitSelection:function(){return Wn},clearSelectedBlock:function(){return xn},duplicateBlocks:function(){return yr},enterFormattedText:function(){return nr},exitFormattedText:function(){return rr},flashBlock:function(){return br},hideInsertionPoint:function(){return zn},insertAfterBlock:function(){return hr},insertBeforeBlock:function(){return gr},insertBlock:function(){return Dn},insertBlocks:function(){return Un},insertDefaultBlock:function(){return ir},mergeBlocks:function(){return Kn},moveBlockToPosition:function(){return Ln},moveBlocksDown:function(){return Mn},moveBlocksToPosition:function(){return Fn},moveBlocksUp:function(){return Rn},multiSelect:function(){return An},receiveBlocks:function(){return bn},removeBlock:function(){return Jn},removeBlocks:function(){return qn},replaceBlock:function(){return On},replaceBlocks:function(){return Tn},replaceInnerBlocks:function(){return Yn},resetBlocks:function(){return gn},resetSelection:function(){return vn},selectBlock:function(){return En},selectNextBlock:function(){return wn},selectPreviousBlock:function(){return Sn},selectionChange:function(){return or},setBlockMovingClientId:function(){return mr},setBlockVisibility:function(){return kr},setHasControlledInnerBlocks:function(){return _r},setNavigationMode:function(){return dr},setTemplateValidity:function(){return Vn},showInsertionPoint:function(){return jn},startDraggingBlocks:function(){return er},startMultiSelect:function(){return Cn},startTyping:function(){return Zn},stopDraggingBlocks:function(){return tr},stopMultiSelect:function(){return In},stopTyping:function(){return Xn},synchronizeTemplate:function(){return Gn},toggleBlockHighlight:function(){return vr},toggleBlockMode:function(){return Qn},toggleSelection:function(){return Bn},updateBlock:function(){return kn},updateBlockAttributes:function(){return _n},updateBlockListSettings:function(){return lr},updateSettings:function(){return ar},validateBlocksToTemplate:function(){return hn}});var l={};n.r(l),n.d(l,{GlobalStylesContext:function(){return jI},useGlobalSetting:function(){return GI},useGlobalStyle:function(){return HI},useGlobalStylesOutput:function(){return rA},useGlobalStylesReset:function(){return VI}});var a=window.wp.blocks,s=window.wp.hooks;function c(){return c=Object.assign?Object.assign.bind():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},c.apply(this,arguments)}(0,s.addFilter)("blocks.registerBlockType","core/compat/migrateLightBlockWrapper",(function(e){const{apiVersion:t=1}=e;return t<2&&(0,a.hasBlockSupport)(e,"lightBlockWrapper",!1)&&(e.apiVersion=2),e}));var u=window.wp.element,p=n(7153),d=n.n(p),f=window.wp.compose,m=window.wp.data,y=window.lodash,g=window.wp.components;var h={default:(0,g.createSlotFill)("BlockControls"),block:(0,g.createSlotFill)("BlockControlsBlock"),inline:(0,g.createSlotFill)("BlockFormatControls"),other:(0,g.createSlotFill)("BlockControlsOther"),parent:(0,g.createSlotFill)("BlockControlsParent")},v=n(5619),b=n.n(v),_=window.wp.i18n;const k={insertUsage:{}},E={alignWide:!1,supportsLayout:!0,colors:[{name:(0,_.__)("Black"),slug:"black",color:"#000000"},{name:(0,_.__)("Cyan bluish gray"),slug:"cyan-bluish-gray",color:"#abb8c3"},{name:(0,_.__)("White"),slug:"white",color:"#ffffff"},{name:(0,_.__)("Pale pink"),slug:"pale-pink",color:"#f78da7"},{name:(0,_.__)("Vivid red"),slug:"vivid-red",color:"#cf2e2e"},{name:(0,_.__)("Luminous vivid orange"),slug:"luminous-vivid-orange",color:"#ff6900"},{name:(0,_.__)("Luminous vivid amber"),slug:"luminous-vivid-amber",color:"#fcb900"},{name:(0,_.__)("Light green cyan"),slug:"light-green-cyan",color:"#7bdcb5"},{name:(0,_.__)("Vivid green cyan"),slug:"vivid-green-cyan",color:"#00d084"},{name:(0,_.__)("Pale cyan blue"),slug:"pale-cyan-blue",color:"#8ed1fc"},{name:(0,_.__)("Vivid cyan blue"),slug:"vivid-cyan-blue",color:"#0693e3"},{name:(0,_.__)("Vivid purple"),slug:"vivid-purple",color:"#9b51e0"}],fontSizes:[{name:(0,_._x)("Small","font size name"),size:13,slug:"small"},{name:(0,_._x)("Normal","font size name"),size:16,slug:"normal"},{name:(0,_._x)("Medium","font size name"),size:20,slug:"medium"},{name:(0,_._x)("Large","font size name"),size:36,slug:"large"},{name:(0,_._x)("Huge","font size name"),size:42,slug:"huge"}],imageDefaultSize:"large",imageSizes:[{slug:"thumbnail",name:(0,_.__)("Thumbnail")},{slug:"medium",name:(0,_.__)("Medium")},{slug:"large",name:(0,_.__)("Large")},{slug:"full",name:(0,_.__)("Full Size")}],imageEditing:!0,maxWidth:580,allowedBlockTypes:!0,maxUploadFileSize:0,allowedMimeTypes:null,canLockBlocks:!0,enableOpenverseMediaCategory:!0,clearBlockSelection:!0,__experimentalCanUserUseUnfilteredHTML:!1,__experimentalBlockDirectory:!1,__mobileEnablePageTemplates:!1,__experimentalBlockPatterns:[],__experimentalBlockPatternCategories:[],__unstableGalleryWithImageBlocks:!1,__unstableIsPreviewMode:!1,blockInspectorAnimation:{animationParent:"core/navigation","core/navigation":{enterDirection:"leftToRight"},"core/navigation-submenu":{enterDirection:"rightToLeft"},"core/navigation-link":{enterDirection:"rightToLeft"},"core/search":{enterDirection:"rightToLeft"},"core/social-links":{enterDirection:"rightToLeft"},"core/page-list":{enterDirection:"rightToLeft"},"core/spacer":{enterDirection:"rightToLeft"},"core/home-link":{enterDirection:"rightToLeft"},"core/site-title":{enterDirection:"rightToLeft"},"core/site-logo":{enterDirection:"rightToLeft"}},generateAnchors:!1,gradients:[{name:(0,_.__)("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:(0,_.__)("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:(0,_.__)("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:(0,_.__)("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:(0,_.__)("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:(0,_.__)("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:(0,_.__)("Blush light purple"),gradient:"linear-gradient(135deg,rgb(255,206,236) 0%,rgb(152,150,240) 100%)",slug:"blush-light-purple"},{name:(0,_.__)("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:(0,_.__)("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:(0,_.__)("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:(0,_.__)("Electric grass"),gradient:"linear-gradient(135deg,rgb(202,248,128) 0%,rgb(113,206,126) 100%)",slug:"electric-grass"},{name:(0,_.__)("Midnight"),gradient:"linear-gradient(135deg,rgb(2,3,129) 0%,rgb(40,116,252) 100%)",slug:"midnight"}],__unstableResolvedAssets:{styles:[],scripts:[]}};function S(e,t,n){return[...e.slice(0,n),...Array.isArray(t)?t:[t],...e.slice(n)]}function w(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;const o=[...e];return o.splice(t,r),S(o,e.slice(t,t+r),n)}const C=e=>e;function I(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const n=new Map,r=[];return n.set(t,r),e.forEach((e=>{const{clientId:t,innerBlocks:o}=e;r.push(t),I(o,t).forEach(((e,t)=>{n.set(t,e)}))})),n}function A(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const n=[],r=[[t,e]];for(;r.length;){const[e,t]=r.shift();t.forEach((t=>{let{innerBlocks:o,...i}=t;n.push([i.clientId,e]),null!=o&&o.length&&r.push([i.clientId,o])}))}return n}function x(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:C;const n=[],r=[...e];for(;r.length;){const{innerBlocks:e,...o}=r.shift();r.push(...e),n.push([o.clientId,t(o)])}return n}function B(e){const t={},n=[...e];for(;n.length;){const{innerBlocks:e,...r}=n.shift();n.push(...e),t[r.clientId]=!0}return t}function P(e){return x(e,(e=>{const{attributes:t,...n}=e;return n}))}function T(e){return x(e,(e=>e.attributes))}function O(e,t){return"UPDATE_BLOCK_ATTRIBUTES"===e.type&&void 0!==t&&"UPDATE_BLOCK_ATTRIBUTES"===t.type&&b()(e.clientIds,t.clientIds)&&function(e,t){return b()(Object.keys(e),Object.keys(t))}(e.attributes,t.attributes)}function N(e,t){const n=e.tree,r=[...t],o=[...t];for(;r.length;){const e=r.shift();r.push(...e.innerBlocks),o.push(...e.innerBlocks)}for(const e of o)n.set(e.clientId,{});for(const t of o)n.set(t.clientId,Object.assign(n.get(t.clientId),{...e.byClientId.get(t.clientId),attributes:e.attributes.get(t.clientId),innerBlocks:t.innerBlocks.map((e=>n.get(e.clientId)))}))}function M(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=e.tree,o=new Set([]),i=new Set;for(const r of t){let t=n?r:e.parents.get(r);do{if(e.controlledInnerBlocks[t]){i.add(t);break}o.add(t),t=e.parents.get(t)}while(void 0!==t)}for(const e of o)r.set(e,{...r.get(e)});for(const t of o)r.get(t).innerBlocks=(e.order.get(t)||[]).map((e=>r.get(e)));for(const t of i)r.set("controlled||"+t,{innerBlocks:(e.order.get(t)||[]).map((e=>r.get(e)))})}const R=(0,f.pipe)(m.combineReducers,(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=new Map(t.attributes),t.attributes.forEach(((n,o)=>{const{name:i}=t.byClientId.get(o);"core/block"===i&&n.ref===e&&t.attributes.set(o,{...n,ref:r})}))}return e(t,n)}),(e=>function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;const r=e(t,n);if(r===t)return t;switch(r.tree=t.tree?t.tree:new Map,n.type){case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":r.tree=new Map(r.tree),N(r,n.blocks),M(r,n.rootClientId?[n.rootClientId]:[""],!0);break;case"UPDATE_BLOCK":r.tree=new Map(r.tree),r.tree.set(n.clientId,{...r.tree.get(n.clientId),...r.byClientId.get(n.clientId),attributes:r.attributes.get(n.clientId)}),M(r,[n.clientId],!1);break;case"UPDATE_BLOCK_ATTRIBUTES":r.tree=new Map(r.tree),n.clientIds.forEach((e=>{r.tree.set(e,{...r.tree.get(e),attributes:r.attributes.get(e)})})),M(r,n.clientIds,!1);break;case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const e=B(n.blocks);r.tree=new Map(r.tree),n.replacedClientIds.concat(n.replacedClientIds.filter((t=>!e[t])).map((e=>"controlled||"+e))).forEach((e=>{r.tree.delete(e)})),N(r,n.blocks),M(r,n.blocks.map((e=>e.clientId)),!1);const o=[];for(const e of n.clientIds)void 0===t.parents.get(e)||""!==t.parents.get(e)&&!r.byClientId.get(t.parents.get(e))||o.push(t.parents.get(e));M(r,o,!0);break}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":const e=[];for(const o of n.clientIds)void 0===t.parents.get(o)||""!==t.parents.get(o)&&!r.byClientId.get(t.parents.get(o))||e.push(t.parents.get(o));r.tree=new Map(r.tree),n.removedClientIds.concat(n.removedClientIds.map((e=>"controlled||"+e))).forEach((e=>{r.tree.delete(e)})),M(r,e,!0);break;case"MOVE_BLOCKS_TO_POSITION":{const e=[];n.fromRootClientId?e.push(n.fromRootClientId):e.push(""),n.toRootClientId&&e.push(n.toRootClientId),r.tree=new Map(r.tree),M(r,e,!0);break}case"MOVE_BLOCKS_UP":case"MOVE_BLOCKS_DOWN":{const e=[n.rootClientId?n.rootClientId:""];r.tree=new Map(r.tree),M(r,e,!0);break}case"SAVE_REUSABLE_BLOCK_SUCCESS":{const e=[];r.attributes.forEach(((t,o)=>{"core/block"===r.byClientId.get(o).name&&t.ref===n.updatedId&&e.push(o)})),r.tree=new Map(r.tree),e.forEach((e=>{r.tree.set(e,{...r.byClientId.get(e),attributes:r.attributes.get(e),innerBlocks:r.tree.get(e).innerBlocks})})),M(r,e,!1)}}return r}),(e=>(t,n)=>{const r=e=>{let r=e;for(let o=0;o<r.length;o++)!t.order.get(r[o])||n.keepControlledInnerBlocks&&n.keepControlledInnerBlocks[r[o]]||(r===e&&(r=[...r]),r.push(...t.order.get(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.get(n.rootClientId)&&(o=e(o,{type:"REMOVE_BLOCKS",keepControlledInnerBlocks:r,clientIds:t.order.get(n.rootClientId)}));let i=o;if(n.blocks.length){i=e(i,{...n,type:"INSERT_BLOCKS",index:0});const o=new Map(i.order);Object.keys(r).forEach((e=>{t.order.get(e)&&o.set(e,t.order.get(e))})),i.order=o,i.tree=new Map(i.tree),Object.keys(r).forEach((e=>{const n=`controlled||${e}`;t.tree.has(n)&&i.tree.set(n,t.tree.get(n))}))}return i}),(e=>(t,n)=>{if("RESET_BLOCKS"===n.type){const e={...t,byClientId:new Map(P(n.blocks)),attributes:new Map(T(n.blocks)),order:I(n.blocks),parents:new Map(A(n.blocks)),controlledInnerBlocks:{}};return e.tree=new Map(null==t?void 0:t.tree),N(e,n.blocks),e.tree.set("",{innerBlocks:n.blocks.map((t=>e.tree.get(t.clientId)))}),e}return e(t,n)}),(function(e){let t,n=!1;return(r,o)=>{let i=e(r,o);const l="MARK_LAST_CHANGE_AS_PERSISTENT"===o.type||n;if(r===i&&!l){var a;n="MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"===o.type;const e=null===(a=null==r?void 0:r.isPersistentChange)||void 0===a||a;return r.isPersistentChange===e?r:{...i,isPersistentChange:e}}return i={...i,isPersistentChange:l?!n:!O(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}}),(e=>(t,n)=>{if("SET_HAS_CONTROLLED_INNER_BLOCKS"===n.type){const r=e(t,{type:"REPLACE_INNER_BLOCKS",rootClientId:n.clientId,blocks:[]});return e(r,n)}return e(t,n)}))({byClientId(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Map,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":{const n=new Map(e);return P(t.blocks).forEach((e=>{let[t,r]=e;n.set(t,r)})),n}case"UPDATE_BLOCK":{if(!e.has(t.clientId))return e;const{attributes:n,...r}=t.updates;if(0===Object.values(r).length)return e;const o=new Map(e);return o.set(t.clientId,{...e.get(t.clientId),...r}),o}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{if(!t.blocks)return e;const n=new Map(e);return t.replacedClientIds.forEach((e=>{n.delete(e)})),P(t.blocks).forEach((e=>{let[t,r]=e;n.set(t,r)})),n}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const n=new Map(e);return t.removedClientIds.forEach((e=>{n.delete(e)})),n}}return e},attributes(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Map,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":{const n=new Map(e);return T(t.blocks).forEach((e=>{let[t,r]=e;n.set(t,r)})),n}case"UPDATE_BLOCK":{if(!e.get(t.clientId)||!t.updates.attributes)return e;const n=new Map(e);return n.set(t.clientId,{...e.get(t.clientId),...t.updates.attributes}),n}case"UPDATE_BLOCK_ATTRIBUTES":{if(t.clientIds.every((t=>!e.get(t))))return e;let r=!1;const o=new Map(e);for(const i of t.clientIds){var n;const l=Object.entries(t.uniqueByBlock?t.attributes[i]:null!==(n=t.attributes)&&void 0!==n?n:{});if(0===l.length)continue;let a=!1;const s=e.get(i),c={};l.forEach((e=>{let[t,n]=e;s[t]!==n&&(a=!0,c[t]=n)})),r=r||a,a&&o.set(i,{...s,...c})}return r?o:e}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{if(!t.blocks)return e;const n=new Map(e);return t.replacedClientIds.forEach((e=>{n.delete(e)})),T(t.blocks).forEach((e=>{let[t,r]=e;n.set(t,r)})),n}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const n=new Map(e);return t.removedClientIds.forEach((e=>{n.delete(e)})),n}}return e},order(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Map,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_BLOCKS":{var n;const r=I(t.blocks),o=new Map(e);return r.forEach(((e,t)=>{""!==t&&o.set(t,e)})),o.set("",(null!==(n=e.get(""))&&void 0!==n?n:[]).concat(r[""])),o}case"INSERT_BLOCKS":{const{rootClientId:n=""}=t,r=e.get(n)||[],o=I(t.blocks,n),{index:i=r.length}=t,l=new Map(e);return o.forEach(((e,t)=>{l.set(t,e)})),l.set(n,S(r,o.get(n),i)),l}case"MOVE_BLOCKS_TO_POSITION":{var r,o;const{fromRootClientId:n="",toRootClientId:i="",clientIds:l}=t,{index:a=e.get(i).length}=t;if(n===i){const t=e.get(i).indexOf(l[0]),n=new Map(e);return n.set(i,w(e.get(i),t,a,l.length)),n}const s=new Map(e);return s.set(n,null!==(r=null===(o=e.get(n))||void 0===o?void 0:o.filter((e=>!l.includes(e))))&&void 0!==r?r:[]),s.set(i,S(e.get(i),l,a)),s}case"MOVE_BLOCKS_UP":{const{clientIds:n,rootClientId:r=""}=t,o=n[0],i=e.get(r);if(!i.length||o===i[0])return e;const l=i.indexOf(o),a=new Map(e);return a.set(r,w(i,l,l-1,n.length)),a}case"MOVE_BLOCKS_DOWN":{const{clientIds:n,rootClientId:r=""}=t,o=n[0],i=n[n.length-1],l=e.get(r);if(!l.length||i===l[l.length-1])return e;const a=l.indexOf(o),s=new Map(e);return s.set(r,w(l,a,a+1,n.length)),s}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const{clientIds:n}=t;if(!t.blocks)return e;const r=I(t.blocks),o=new Map(e);return t.replacedClientIds.forEach((e=>{o.delete(e)})),r.forEach(((e,t)=>{""!==t&&o.set(t,e)})),o.forEach(((e,t)=>{const i=Object.values(e).reduce(((e,t)=>t===n[0]?[...e,...r.get("")]:(-1===n.indexOf(t)&&e.push(t),e)),[]);o.set(t,i)})),o}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const n=new Map(e);return t.removedClientIds.forEach((e=>{n.delete(e)})),n.forEach(((e,r)=>{var o;const i=null!==(o=null==e?void 0:e.filter((e=>!t.removedClientIds.includes(e))))&&void 0!==o?o:[];i.length!==e.length&&n.set(r,i)})),n}}return e},parents(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Map,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_BLOCKS":{const n=new Map(e);return A(t.blocks).forEach((e=>{let[t,r]=e;n.set(t,r)})),n}case"INSERT_BLOCKS":{const n=new Map(e);return A(t.blocks,t.rootClientId||"").forEach((e=>{let[t,r]=e;n.set(t,r)})),n}case"MOVE_BLOCKS_TO_POSITION":{const n=new Map(e);return t.clientIds.forEach((e=>{n.set(e,t.toRootClientId||"")})),n}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const n=new Map(e);return t.replacedClientIds.forEach((e=>{n.delete(e)})),A(t.blocks,e.get(t.clientIds[0])).forEach((e=>{let[t,r]=e;n.set(t,r)})),n}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const n=new Map(e);return t.removedClientIds.forEach((e=>{n.delete(e)})),n}}return e},controlledInnerBlocks(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{type:t,clientId:n,hasControlledInnerBlocks:r}=arguments.length>1?arguments[1]:void 0;return"SET_HAS_CONTROLLED_INNER_BLOCKS"===t?{...e,[n]:r}:e}});function F(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;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.blocks[t.indexToSelect]||t.blocks[t.blocks.length-1];return n?n.clientId===e.clientId?e:{clientId:n.clientId}:{}}}return e}var L=(0,m.combineReducers)({blocks:R,isTyping:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"START_TYPING":return!0;case"STOP_TYPING":return!1}return e},isBlockInterfaceHidden:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"HIDE_BLOCK_INTERFACE":return!0;case"SHOW_BLOCK_INTERFACE":return!1}return e},draggedBlocks:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"START_DRAGGING_BLOCKS":return t.clientIds;case"STOP_DRAGGING_BLOCKS":return[]}return e},selection:function(){var e,t,n,r;let o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1?arguments[1]:void 0;switch(i.type){case"SELECTION_CHANGE":return i.clientId?{selectionStart:{clientId:i.clientId,attributeKey:i.attributeKey,offset:i.startOffset},selectionEnd:{clientId:i.clientId,attributeKey:i.attributeKey,offset:i.endOffset}}:{selectionStart:i.start||o.selectionStart,selectionEnd:i.end||o.selectionEnd};case"RESET_SELECTION":const{selectionStart:l,selectionEnd:a}=i;return{selectionStart:l,selectionEnd:a};case"MULTI_SELECT":const{start:s,end:c}=i;return s===(null===(e=o.selectionStart)||void 0===e?void 0:e.clientId)&&c===(null===(t=o.selectionEnd)||void 0===t?void 0:t.clientId)?o:{selectionStart:{clientId:s},selectionEnd:{clientId:c}};case"RESET_BLOCKS":const u=null==o||null===(n=o.selectionStart)||void 0===n?void 0:n.clientId,p=null==o||null===(r=o.selectionEnd)||void 0===r?void 0:r.clientId;if(!u&&!p)return o;if(!i.blocks.some((e=>e.clientId===u)))return{selectionStart:{},selectionEnd:{}};if(!i.blocks.some((e=>e.clientId===p)))return{...o,selectionEnd:o.selectionStart}}return{selectionStart:F(o.selectionStart,i),selectionEnd:F(o.selectionEnd,i)}},isMultiSelecting:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"START_MULTI_SELECT":return!0;case"STOP_MULTI_SELECT":return!1}return e},isSelectionEnabled:function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=arguments.length>1?arguments[1]:void 0;return"TOGGLE_SELECTION"===t.type?t.isSelectionEnabled:e},initialPosition:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;return"REPLACE_BLOCKS"===t.type&&void 0!==t.initialPosition||["MULTI_SELECT","SELECT_BLOCK","RESET_SELECTION","INSERT_BLOCKS","REPLACE_INNER_BLOCKS"].includes(t.type)?t.initialPosition:e},blocksMode:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;if("TOGGLE_BLOCK_MODE"===t.type){const{clientId:n}=t;return{...e,[n]:e[n]&&"html"===e[n]?"visual":"html"}}return e},blockListSettings:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"REPLACE_BLOCKS":case"REMOVE_BLOCKS":return Object.fromEntries(Object.entries(e).filter((e=>{let[n]=e;return!t.clientIds.includes(n)})));case"UPDATE_BLOCK_LIST_SETTINGS":{const{clientId:n}=t;if(!t.settings){if(e.hasOwnProperty(n)){const{[n]:t,...r}=e;return r}return e}return b()(e[n],t.settings)?e:{...e,[n]:t.settings}}}return e},insertionPoint:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SHOW_INSERTION_POINT":{const{rootClientId:n,index:r,__unstableWithInserter:o,operation:i}=t,l={rootClientId:n,index:r,__unstableWithInserter:o,operation:i};return b()(e,l)?e:l}case"HIDE_INSERTION_POINT":return null}return e},template:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{isValid:!0},t=arguments.length>1?arguments[1]:void 0;return"SET_TEMPLATE_VALIDITY"===t.type?{...e,isValid:t.isValid}:e},settings:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:E,t=arguments.length>1?arguments[1]:void 0;return"UPDATE_SETTINGS"===t.type?{...e,...t.settings}:e},preferences:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:k,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"INSERT_BLOCKS":case"REPLACE_BLOCKS":return t.blocks.reduce(((e,n)=>{const{attributes:r,name:o}=n,i=(0,m.select)(a.store).getActiveBlockVariation(o,r);let l=null!=i&&i.name?`${o}/${i.name}`:o;const s={name:l};return"core/block"===o&&(s.ref=r.ref,l+="/"+r.ref),{...e,insertUsage:{...e.insertUsage,[l]:{time:t.time,count:e.insertUsage[l]?e.insertUsage[l].count+1:1,insert:s}}}}),e)}return e},lastBlockAttributesChange:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;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 e},editorMode:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"edit",t=arguments.length>1?arguments[1]:void 0;return"INSERT_BLOCKS"===t.type&&"navigation"===e?"edit":"SET_EDITOR_MODE"===t.type?t.mode:e},hasBlockMovingClientId:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;return"SET_BLOCK_MOVING_MODE"===t.type?t.hasBlockMovingClientId:"SET_EDITOR_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"SET_BLOCK_VISIBILITY":case"START_TYPING":case"STOP_TYPING":case"UPDATE_BLOCK_LIST_SETTINGS":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(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;switch(n.type){case"INSERT_BLOCKS":case"REPLACE_BLOCKS":case"REPLACE_INNER_BLOCKS":if(!n.blocks.length)return t;const r=n.blocks.map((e=>e.clientId));return{clientIds:r,source:null===(e=n.meta)||void 0===e?void 0:e.source};case"RESET_BLOCKS":return{}}return t},temporarilyEditingAsBlocks:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0;return"SET_TEMPORARILY_EDITING_AS_BLOCKS"===t.type?t.temporarilyEditingAsBlocks:e},blockVisibility:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return"SET_BLOCK_VISIBILITY"===t.type?{...e,...t.updates}:e}}),D={};function U(e){return[e]}function j(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 z(e,t){var n,r=t||U;function o(e){var t,r,o,i,l,a=n,s=!0;for(t=0;t<e.length;t++){if(r=e[t],!(l=r)||"object"!=typeof l){s=!1;break}a.has(r)?a=a.get(r):(o=new WeakMap,a.set(r,o),a=o)}return a.has(D)||((i=function(){var e={clear:function(){e.head=null}};return e}()).isUniqueByDependants=s,a.set(D,i)),a.get(D)}function i(){n=new WeakMap}function l(){var t,n,i,l,a,s=arguments.length;for(l=new Array(s),i=0;i<s;i++)l[i]=arguments[i];for((t=o(a=r.apply(null,l))).isUniqueByDependants||(t.lastDependants&&!j(a,t.lastDependants,0)&&t.clear(),t.lastDependants=a),n=t.head;n;){if(j(n.args,l,1))return n!==t.head&&(n.prev.next=n.next,n.next&&(n.next.prev=n.prev),n.next=t.head,n.prev=null,t.head.prev=n,t.head=n),n.val;n=n.next}return n={val:e.apply(null,l)},l[0]=null,n.args=l,t.head&&(t.head.prev=n,n.next=t.head),t.head=n,n.val}return l.getDependants=r,l.clear=i,i(),l}var V=window.wp.primitives;var G=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{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"})),H=window.wp.richText,W=window.wp.deprecated,$=n.n(W);function K(e){const{multiline:t,__unstableMultilineWrapperTags:n,__unstablePreserveWhiteSpace:r}=e;return{multilineTag:t,multilineWrapperTags:n,preserveWhiteSpace:r}}const q=(e,t,n)=>(r,o)=>{let i,l;if("function"==typeof e?(i=e(r),l=e(o)):(i=r[e],l=o[e]),i>l)return"asc"===n?1:-1;if(l>i)return"asc"===n?-1:1;const a=t.findIndex((e=>e===r)),s=t.findIndex((e=>e===o));return a>s?1:s>a?-1:0};function J(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"asc";return e.concat().sort(q(t,e,n))}const Y=[];function Q(e,t){const n=e.blocks.byClientId.get(t),r="core/social-link";if("web"!==u.Platform.OS&&(null==n?void 0:n.name)===r){const n=e.blocks.attributes.get(t),{service:o}=null!=n?n:{};return o?`core/social-link-${o}`:r}return n?n.name:null}function Z(e,t){const n=e.blocks.byClientId.get(t);return!!n&&n.isValid}function X(e,t){return e.blocks.byClientId.get(t)?e.blocks.attributes.get(t):null}function ee(e,t){return e.blocks.byClientId.has(t)?e.blocks.tree.get(t):null}const te=z(((e,t)=>e.blocks.byClientId.has(t)?{...e.blocks.byClientId.get(t),attributes:X(e,t)}:null),((e,t)=>[e.blocks.byClientId.get(t),e.blocks.attributes.get(t)]));function ne(e,t){var n;const r=t&&Yt(e,t)?"controlled||"+t:t||"";return(null===(n=e.blocks.tree.get(r))||void 0===n?void 0:n.innerBlocks)||Y}const re=z(((e,t)=>({clientId:t,innerBlocks:oe(e,t)})),(e=>[e.blocks.order])),oe=z((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return He(e,t).map((t=>re(e,t)))}),(e=>[e.blocks.order])),ie=z(((e,t)=>{const n=[];for(const r of t)for(const t of He(e,r))n.push(t,...ie(e,[t]));return n}),(e=>[e.blocks.order])),le=z((e=>{const t=[];for(const n of He(e))t.push(n,...ie(e,[n]));return t}),(e=>[e.blocks.order])),ae=z(((e,t)=>{const n=le(e);return t?n.reduce(((n,r)=>e.blocks.byClientId.get(r).name===t?n+1:n),0):n.length}),(e=>[e.blocks.order,e.blocks.byClientId])),se=z(((e,t)=>{if(!t)return Y;const n=le(e).filter((n=>e.blocks.byClientId.get(n).name===t));return n.length>0?n:Y}),(e=>[e.blocks.order,e.blocks.byClientId])),ce=z(((e,t)=>(Array.isArray(t)?t:[t]).map((t=>ee(e,t)))),((e,t)=>(Array.isArray(t)?t:[t]).map((t=>e.blocks.tree.get(t))))),ue=z(((e,t)=>ce(e,t).filter(Boolean).map((e=>e.name))),((e,t)=>ce(e,t)));function pe(e,t){return He(e,t).length}function de(e){return e.selection.selectionStart}function fe(e){return e.selection.selectionEnd}function me(e){return e.selection.selectionStart.clientId}function ye(e){return e.selection.selectionEnd.clientId}function ge(e){const t=Pe(e).length;return t||(e.selection.selectionStart.clientId?1:0)}function he(e){const{selectionStart:t,selectionEnd:n}=e.selection;return!!t.clientId&&t.clientId===n.clientId}function ve(e){const{selectionStart:t,selectionEnd:n}=e.selection,{clientId:r}=t;return r&&r===n.clientId?r:null}function be(e){const t=ve(e);return t?ee(e,t):null}function _e(e,t){return e.blocks.parents.has(t)?e.blocks.parents.get(t):null}const ke=z((function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=[];let o=t;for(;e.blocks.parents.get(o);)o=e.blocks.parents.get(o),r.push(o);return n?r:r.reverse()}),(e=>[e.blocks.parents])),Ee=z((function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const o=ke(e,t,r);return o.map((t=>({id:t,name:Q(e,t)}))).filter((e=>{let{name:t}=e;return Array.isArray(n)?n.includes(t):t===n})).map((e=>{let{id:t}=e;return t}))}),(e=>[e.blocks.parents]));function Se(e,t){let n,r=t;do{n=r,r=e.blocks.parents.get(r)}while(r);return n}function we(e,t){const n=ve(e),r=[...ke(e,t),t],o=[...ke(e,n),n];let i;const l=Math.min(r.length,o.length);for(let e=0;e<l&&r[e]===o[e];e++)i=r[e];return i}function Ce(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;if(void 0===t&&(t=ve(e)),void 0===t&&(t=n<0?Oe(e):Ne(e)),!t)return null;const r=_e(e,t);if(null===r)return null;const{order:o}=e.blocks,i=o.get(r),l=i.indexOf(t),a=l+1*n;return a<0||a===i.length?null:i[a]}function Ie(e,t){return Ce(e,t,-1)}function Ae(e,t){return Ce(e,t,1)}function xe(e){return e.initialPosition}const Be=z((e=>{const{selectionStart:t,selectionEnd:n}=e.selection;if(!t.clientId||!n.clientId)return Y;if(t.clientId===n.clientId)return[t.clientId];const r=_e(e,t.clientId);if(null===r)return Y;const o=He(e,r),i=o.indexOf(t.clientId),l=o.indexOf(n.clientId);return i>l?o.slice(l,i+1):o.slice(i,l+1)}),(e=>[e.blocks.order,e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId]));function Pe(e){const{selectionStart:t,selectionEnd:n}=e.selection;return t.clientId===n.clientId?Y:Be(e)}const Te=z((e=>{const t=Pe(e);return t.length?t.map((t=>ee(e,t))):Y}),(e=>[...Be.getDependants(e),e.blocks.byClientId,e.blocks.order,e.blocks.attributes]));function Oe(e){return Pe(e)[0]||null}function Ne(e){const t=Pe(e);return t[t.length-1]||null}function Me(e,t){return Oe(e)===t}function Re(e,t){return-1!==Pe(e).indexOf(t)}const Fe=z(((e,t)=>{let n=t,r=!1;for(;n&&!r;)n=_e(e,n),r=Re(e,n);return r}),(e=>[e.blocks.order,e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId]));function Le(e){const{selectionStart:t,selectionEnd:n}=e.selection;return t.clientId===n.clientId?null:t.clientId||null}function De(e){const{selectionStart:t,selectionEnd:n}=e.selection;return t.clientId===n.clientId?null:n.clientId||null}function Ue(e){const t=de(e),n=fe(e);return!t.attributeKey&&!n.attributeKey&&void 0===t.offset&&void 0===n.offset}function je(e){const t=de(e),n=fe(e);return!!t&&!!n&&t.clientId===n.clientId&&t.attributeKey===n.attributeKey&&t.offset===n.offset}function ze(e){return Be(e).some((t=>{const n=Q(e,t);return!(0,a.getBlockType)(n).merge}))}function Ve(e,t){const n=de(e),r=fe(e);if(n.clientId===r.clientId)return!1;if(!n.attributeKey||!r.attributeKey||void 0===n.offset||void 0===r.offset)return!1;const o=_e(e,n.clientId);if(o!==_e(e,r.clientId))return!1;const i=He(e,o);let l,s;i.indexOf(n.clientId)>i.indexOf(r.clientId)?(l=r,s=n):(l=n,s=r);const c=t?s.clientId:l.clientId,u=t?l.clientId:s.clientId,p=Q(e,c);if(!(0,a.getBlockType)(p).merge)return!1;const d=ee(e,u);if(d.name===p)return!0;const f=(0,a.switchToBlockType)(d,p);return f&&f.length}const Ge=e=>{const t=de(e),n=fe(e);if(t.clientId===n.clientId)return Y;if(!t.attributeKey||!n.attributeKey||void 0===t.offset||void 0===n.offset)return Y;const r=_e(e,t.clientId);if(r!==_e(e,n.clientId))return Y;const o=He(e,r),i=o.indexOf(t.clientId),l=o.indexOf(n.clientId),[s,c]=i>l?[n,t]:[t,n],u=ee(e,s.clientId),p=(0,a.getBlockType)(u.name),d=ee(e,c.clientId),f=(0,a.getBlockType)(d.name),m=u.attributes[s.attributeKey],y=d.attributes[c.attributeKey],g=p.attributes[s.attributeKey],h=f.attributes[c.attributeKey];let v=(0,H.create)({html:m,...K(g)}),b=(0,H.create)({html:y,...K(h)});return v=(0,H.remove)(v,0,s.offset),b=(0,H.remove)(b,c.offset,b.text.length),[{...u,attributes:{...u.attributes,[s.attributeKey]:(0,H.toHTMLString)({value:v,...K(g)})}},{...d,attributes:{...d.attributes,[c.attributeKey]:(0,H.toHTMLString)({value:b,...K(h)})}}]};function He(e,t){return e.blocks.order.get(t||"")||Y}function We(e,t){return He(e,_e(e,t)).indexOf(t)}function $e(e,t){const{selectionStart:n,selectionEnd:r}=e.selection;return n.clientId===r.clientId&&n.clientId===t}function Ke(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return He(e,t).some((t=>$e(e,t)||Re(e,t)||n&&Ke(e,t,n)))}function qe(e,t){if(!t)return!1;const n=Pe(e),r=n.indexOf(t);return r>-1&&r<n.length-1}function Je(e){const{selectionStart:t,selectionEnd:n}=e.selection;return t.clientId!==n.clientId}function Ye(e){return e.isMultiSelecting}function Qe(e){return e.isSelectionEnabled}function Ze(e,t){return e.blocksMode[t]||"visual"}function Xe(e){return e.isTyping}function et(e){return!!e.draggedBlocks.length}function tt(e){return e.draggedBlocks}function nt(e,t){return e.draggedBlocks.includes(t)}function rt(e,t){if(!et(e))return!1;return ke(e,t).some((t=>nt(e,t)))}function ot(){return $()('wp.data.select( "core/block-editor" ).isCaretWithinFormattedText',{since:"6.1",version:"6.3"}),!1}const it=z((e=>{let t,n;const{insertionPoint:r,selection:{selectionEnd:o}}=e;if(null!==r)return r;const{clientId:i}=o;return i?(t=_e(e,i)||void 0,n=We(e,o.clientId)+1):n=He(e).length,{rootClientId:t,index:n}}),(e=>[e.insertionPoint,e.selection.selectionEnd.clientId,e.blocks.parents,e.blocks.order]));function lt(e){return null!==e.insertionPoint}function at(e){return e.template.isValid}function st(e){return e.settings.template}function ct(e,t){var n,r,o;return t?null!==(n=null===(r=Lt(e,t))||void 0===r?void 0:r.templateLock)&&void 0!==n&&n:null!==(o=e.settings.templateLock)&&void 0!==o&&o}const ut=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return"boolean"==typeof e?e:Array.isArray(e)?!(!e.includes("core/post-content")||null!==t)||e.includes(t):n},pt=function(e,t){let n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(t&&"object"==typeof t?(n=t,t=n.name):n=(0,a.getBlockType)(t),!n)return!1;const{allowedBlockTypes:o}=Dt(e),i=ut(o,t,!0);if(!i)return!1;const l=!!ct(e,r);if(l)return!1;const c=Lt(e,r);if(r&&void 0===c)return!1;const u=null==c?void 0:c.allowedBlocks,p=ut(u,t),d=n.parent,f=Q(e,r),m=ut(d,f);let y=!0;const g=n.ancestor;if(g){y=[r,...ke(e,r)].some((t=>ut(g,Q(e,t))))}const h=y&&(null===p&&null===m||!0===p||!0===m);return h?(0,s.applyFilters)("blockEditor.__unstableCanInsertBlockType",h,n,r,{getBlock:ee.bind(null,e),getBlockParentsByBlockName:Ee.bind(null,e)}):h},dt=z(pt,((e,t,n)=>[e.blockListSettings[n],e.blocks.byClientId.get(n),e.settings.allowedBlockTypes,e.settings.templateLock]));function ft(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return t.every((t=>dt(e,Q(e,t),n)))}function mt(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const r=X(e,t);if(null===r)return!0;const{lock:o}=r,i=!!ct(e,n);return void 0===o||void 0===(null==o?void 0:o.remove)?!i:!(null!=o&&o.remove)}function yt(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return t.every((t=>mt(e,t,n)))}function gt(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const r=X(e,t);if(null===r)return;const{lock:o}=r,i="all"===ct(e,n);return void 0===o||void 0===(null==o?void 0:o.move)?!i:!(null!=o&&o.move)}function ht(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return t.every((t=>gt(e,t,n)))}function vt(e,t){const n=X(e,t);if(null===n)return!0;const{lock:r}=n;return!(null!=r&&r.edit)}function bt(e,t){var n;return!!(0,a.hasBlockSupport)(t,"lock",!0)&&!(null===(n=e.settings)||void 0===n||!n.canLockBlocks)}function _t(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 kt=(e,t,n)=>!!(0,a.hasBlockSupport)(t,"inserter",!0)&&pt(e,t.name,n),Et=(e,t)=>n=>{const r=`${t.id}/${n.name}`,{time:o,count:i=0}=_t(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:St(o,i)}},St=(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}},wt=(e,t)=>{let{buildScope:n="inserter"}=t;return t=>{const r=t.name;let o=!1;(0,a.hasBlockSupport)(t.name,"multiple",!0)||(o=ce(e,le(e)).some((e=>{let{name:n}=e;return n===t.name})));const{time:i,count:l=0}=_t(e,r)||{},s={id:r,name:t.name,title:t.title,icon:t.icon,isDisabled:o,frecency:St(i,l)};if("transform"===n)return s;const c=(0,a.getBlockVariations)(t.name,"inserter");return{...s,initialAttributes:{},description:t.description,category:t.category,keywords:t.keywords,variations:c,example:t.example,utility:1}}},Ct=z((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=wt(e,{buildScope:"inserter"}),r=/^\s*<!--\s+(\/)?wp:([a-z][a-z0-9_-]*\/)?([a-z][a-z0-9_-]*)\s+({(?:(?=([^}]+|}+(?=})|(?!}\s+\/?-->)[^])*)\5|[^]*?)}\s+)?(\/)?-->/,o=t=>{let n=G;if("web"===u.Platform.OS){const e=("string"==typeof t.content.raw?t.content.raw:t.content).match(r);if(e){const[,,t="core/",r]=e,o=(0,a.getBlockType)(t+r);o&&(n=o.icon)}}const o=`core/block/${t.id}`,{time:i,count:l=0}=_t(e,o)||{},s=St(i,l);return{id:o,name:"core/block",initialAttributes:{ref:t.id},title:t.title.raw,icon:n,category:"reusable",keywords:[],isDisabled:!1,utility:1,frecency:s}},i=(0,a.getBlockTypes)().filter((n=>kt(e,n,t))).map(n),l=pt(e,"core/block",t)?Ht(e).map(o):[],s=i.reduce(((t,n)=>{const{variations:r=[]}=n;if(r.some((e=>{let{isDefault:t}=e;return t}))||t.push(n),r.length){const o=Et(e,n);t.push(...r.map(o))}return t}),[]),c=(e,t)=>{const{core:n,noncore:r}=e;return(t.name.startsWith("core/")?n:r).push(t),e},{core:p,noncore:d}=s.reduce(c,{core:[],noncore:[]}),f=[...p,...d];return[...f,...l]}),((e,t)=>[e.blockListSettings[t],e.blocks.byClientId,e.blocks.order,e.preferences.insertUsage,e.settings.allowedBlockTypes,e.settings.templateLock,Ht(e),(0,a.getBlockTypes)()])),It=z((function(e,t){var n;let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const o=Array.isArray(t)?t:[t],[i]=o,l=wt(e,{buildScope:"transform"}),s=(0,a.getBlockTypes)().filter((t=>kt(e,t,r))).map(l),c=Object.fromEntries(Object.entries(s).map((e=>{let[,t]=e;return[t.name,t]})));c["*"]={frecency:1/0,id:"*",isDisabled:!1,name:"*",title:(0,_.__)("Unwrap"),icon:null===(n=c[null==i?void 0:i.name])||void 0===n?void 0:n.icon};const u=(0,a.getPossibleBlockTransformations)(o).reduce(((e,t)=>("*"===t?e.push(c["*"]):c[null==t?void 0:t.name]&&e.push(c[t.name]),e)),[]);return J(u,(e=>c[e.name].frecency),"desc")}),((e,t,n)=>[e.blockListSettings[n],e.blocks.byClientId,e.preferences.insertUsage,e.settings.allowedBlockTypes,e.settings.templateLock,(0,a.getBlockTypes)()])),At=z((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=(0,a.getBlockTypes)().some((n=>kt(e,n,t)));if(n)return!0;const r=pt(e,"core/block",t)&&Ht(e).length>0;return r}),((e,t)=>[e.blockListSettings[t],e.blocks.byClientId,e.settings.allowedBlockTypes,e.settings.templateLock,Ht(e),(0,a.getBlockTypes)()])),xt=z((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(t)return(0,a.getBlockTypes)().filter((n=>kt(e,n,t)))}),((e,t)=>[e.blockListSettings[t],e.blocks.byClientId,e.settings.allowedBlockTypes,e.settings.templateLock,(0,a.getBlockTypes)()])),Bt=z((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return $()('wp.data.select( "core/block-editor" ).__experimentalGetAllowedBlocks',{alternative:'wp.data.select( "core/block-editor" ).getAllowedBlocks',since:"6.2",version:"6.4"}),xt(e,t)}),((e,t)=>[...xt.getDependants(e,t)])),Pt=z((function(e){var t,n;let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!r)return;const o=null===(t=e.blockListSettings[r])||void 0===t?void 0:t.__experimentalDefaultBlock,i=null===(n=e.blockListSettings[r])||void 0===n?void 0:n.__experimentalDirectInsert;return o&&i?"function"==typeof i?i(ee(e,r))?o:null:o:void 0}),((e,t)=>[e.blockListSettings[t],e.blocks.tree.get(t)])),Tt=z(((e,t)=>{const n=e.settings.__experimentalBlockPatterns.find((e=>{let{name:n}=e;return n===t}));return n?{...n,blocks:(0,a.parse)(n.content,{__unstableSkipMigrationLogs:!0})}:null}),(e=>[e.settings.__experimentalBlockPatterns])),Ot=z((e=>{const t=e.settings.__experimentalBlockPatterns,{allowedBlockTypes:n}=Dt(e),r=t.filter((e=>{let{inserter:t=!0}=e;return!!t})).map((t=>{let{name:n}=t;return Tt(e,n)})),o=r.filter((e=>{let{blocks:t}=e;return((e,t)=>{if("boolean"==typeof t)return t;const n=[...e];for(;n.length>0;){var r;const e=n.shift();if(!ut(t,e.name||e.blockName,!0))return!1;null===(r=e.innerBlocks)||void 0===r||r.forEach((e=>{n.push(e)}))}return!0})(t,n)}));return o}),(e=>[e.settings.__experimentalBlockPatterns,e.settings.allowedBlockTypes])),Nt=z((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=Ot(e),r=n.filter((n=>{let{blocks:r}=n;return r.every((n=>{let{name:r}=n;return dt(e,r,t)}))}));return r}),((e,t)=>[e.settings.__experimentalBlockPatterns,e.settings.allowedBlockTypes,e.settings.templateLock,e.blockListSettings[t],e.blocks.byClientId.get(t)])),Mt=z((function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!t)return Y;const r=Nt(e,n),o=Array.isArray(t)?t:[t],i=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)))}));return 0===i.length?Y:i}),((e,t,n)=>[...Nt.getDependants(e,n)])),Rt=z((function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return $()('wp.data.select( "core/block-editor" ).__experimentalGetPatternsByBlockTypes',{alternative:'wp.data.select( "core/block-editor" ).getPatternsByBlockTypes',since:"6.2",version:"6.4"}),Mt(e,t,n)}),((e,t,n)=>[...Nt.getDependants(e,n)])),Ft=z((function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!t)return Y;if(t.some((t=>{let{clientId:n,innerBlocks:r}=t;return r.length||Yt(e,n)})))return Y;const r=Array.from(new Set(t.map((e=>{let{name:t}=e;return t}))));return Mt(e,r,n)}),((e,t,n)=>[...Mt.getDependants(e,n)]));function Lt(e,t){return e.blockListSettings[t]}function Dt(e){return e.settings}function Ut(e){return e.blocks.isPersistentChange}const jt=z((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return t.reduce(((t,n)=>e.blockListSettings[n]?{...t,[n]:e.blockListSettings[n]}:t),{})}),(e=>[e.blockListSettings])),zt=z(((e,t)=>{var n;const r=Ht(e).find((e=>e.id===t));return r?null===(n=r.title)||void 0===n?void 0:n.raw:null}),(e=>[Ht(e)]));function Vt(e){return e.blocks.isIgnoredChange}function Gt(e){return e.lastBlockAttributesChange}function Ht(e){var t,n;return null!==(t=null==e||null===(n=e.settings)||void 0===n?void 0:n.__experimentalReusableBlocks)&&void 0!==t?t:Y}function Wt(e){return"navigation"===e.editorMode}function $t(e){return e.editorMode}function Kt(e){return e.hasBlockMovingClientId}function qt(e){return!!e.automaticChangeStatus}function Jt(e,t){return e.highlightedBlock===t}function Yt(e,t){return!!e.blocks.controlledInnerBlocks[t]}const Qt=z(((e,t)=>{if(!t.length)return null;const n=ve(e);if(t.includes(Q(e,n)))return n;const r=Pe(e),o=Ee(e,n||r[0],t);return o?o[o.length-1]:null}),((e,t)=>[e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId,t]));function Zt(e,t,n){var r;const{lastBlockInserted:o}=e;return(null===(r=o.clientIds)||void 0===r?void 0:r.includes(t))&&o.source===n}function Xt(e,t){var n,r;return null===(n=null===(r=e.blockVisibility)||void 0===r?void 0:r[t])||void 0===n||n}const en=z((e=>new Set(Object.keys(e.blockVisibility).filter((t=>e.blockVisibility[t])))),(e=>[e.blockVisibility])),tn=z(((e,t)=>{let n,r=t;for(;e.blocks.parents.has(r);)r=e.blocks.parents.get(r),r&&"contentOnly"===ct(e,r)&&(n=r);return n}),(e=>[e.blocks.parents,e.blockListSettings]));function nn(e){return e.temporarilyEditingAsBlocks}function rn(e,t){if(!vt(e,t))return!0;const n=$t(e);if("zoom-out"===n&&t&&!_e(e,t))return!0;const r=(0,a.hasBlockSupport)(Q(e,t),"__experimentalDisableBlockOverlay",!1);return("navigation"===n||!r&&Yt(e,t))&&!$e(e,t)&&!Ke(e,t,!0)}function on(e,t){let n=e.blocks.parents.get(t);for(;n;){if(rn(e,n))return!0;n=e.blocks.parents.get(n)}return!1}const ln=["inserterMediaCategories","blockInspectorAnimation"];function an(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e;if(t&&"web"===u.Platform.OS){n={};for(const t in e)ln.includes(t)||(n[t]=e[t])}return{type:"UPDATE_SETTINGS",settings:n}}function sn(){return{type:"HIDE_BLOCK_INTERFACE"}}function cn(){return{type:"SHOW_BLOCK_INTERFACE"}}function un(e){return e.isBlockInterfaceHidden}function pn(e){var t;return null==e||null===(t=e.lastBlockInserted)||void 0===t?void 0:t.clientIds}var dn=window.wp.a11y;const fn="†";function mn(e){if(e)return Object.keys(e).find((t=>{const n=e[t];return"string"==typeof n&&-1!==n.indexOf(fn)}))}const yn=e=>Array.isArray(e)?e:[e],gn=e=>t=>{let{dispatch:n}=t;n({type:"RESET_BLOCKS",blocks:e}),n(hn(e))},hn=e=>t=>{let{select:n,dispatch:r}=t;const o=n.getTemplate(),i=n.getTemplateLock(),l=!o||"all"!==i||(0,a.doBlocksMatchTemplate)(e,o);if(l!==n.isValidTemplate())return r.setTemplateValidity(l),l};function vn(e,t,n){return{type:"RESET_SELECTION",selectionStart:e,selectionEnd:t,initialPosition:n}}function bn(e){return $()('wp.data.dispatch( "core/block-editor" ).receiveBlocks',{since:"5.9",alternative:"resetBlocks or insertBlocks"}),{type:"RECEIVE_BLOCKS",blocks:e}}function _n(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return{type:"UPDATE_BLOCK_ATTRIBUTES",clientIds:yn(e),attributes:t,uniqueByBlock:n}}function kn(e,t){return{type:"UPDATE_BLOCK",clientId:e,updates:t}}function En(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return{type:"SELECT_BLOCK",initialPosition:t,clientId:e}}const Sn=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return n=>{let{select:r,dispatch:o}=n;const i=r.getPreviousBlockClientId(e);if(i)o.selectBlock(i,-1);else if(t){const t=r.getBlockRootClientId(e);t&&o.selectBlock(t,-1)}}},wn=e=>t=>{let{select:n,dispatch:r}=t;const o=n.getNextBlockClientId(e);o&&r.selectBlock(o)};function Cn(){return{type:"START_MULTI_SELECT"}}function In(){return{type:"STOP_MULTI_SELECT"}}const An=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return r=>{let{select:o,dispatch:i}=r;if(o.getBlockRootClientId(e)!==o.getBlockRootClientId(t))return;i({type:"MULTI_SELECT",start:e,end:t,initialPosition:n});const l=o.getSelectedBlockCount();(0,dn.speak)((0,_.sprintf)((0,_._n)("%s block selected.","%s blocks selected.",l),l),"assertive")}};function xn(){return{type:"CLEAR_SELECTED_BLOCK"}}function Bn(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return{type:"TOGGLE_SELECTION",isSelectionEnabled:e}}function Pn(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(!(0,a.hasBlockSupport)(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,l=o[n];return{...e,attributes:{...i,className:`${r||""} is-style-${l}`.trim()}}}))}const Tn=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4?arguments[4]:void 0;return i=>{let{select:l,dispatch:a}=i;e=yn(e),t=Pn(yn(t),l.getSettings());const s=l.getBlockRootClientId(e[0]);for(let e=0;e<t.length;e++){const n=t[e];if(!l.canInsertBlockType(n.name,s))return}a({type:"REPLACE_BLOCKS",clientIds:e,blocks:t,time:Date.now(),indexToSelect:n,initialPosition:r,meta:o}),a((e=>{let{select:t,dispatch:n}=e;if(t.getBlockCount()>0)return;const{__unstableHasCustomAppender:r}=t.getSettings();r||n.insertDefaultBlock()}))}};function On(e,t){return Tn(e,t)}const Nn=e=>(t,n)=>r=>{let{select:o,dispatch:i}=r;o.canMoveBlocks(t,n)&&i({type:e,clientIds:yn(t),rootClientId:n})},Mn=Nn("MOVE_BLOCKS_DOWN"),Rn=Nn("MOVE_BLOCKS_UP"),Fn=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3?arguments[3]:void 0;return o=>{let{select:i,dispatch:l}=o;if(i.canMoveBlocks(e,t)){if(t!==n){if(!i.canRemoveBlocks(e,t))return;if(!i.canInsertBlocks(e,n))return}l({type:"MOVE_BLOCKS_TO_POSITION",fromRootClientId:t,toRootClientId:n,clientIds:e,index:r})}}};function Ln(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3?arguments[3]:void 0;return Fn([e],t,n,r)}function Dn(e,t,n,r,o){return Un([e],t,n,r,0,o)}const Un=function(e,t,n){let r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,i=arguments.length>5?arguments[5]:void 0;return l=>{let{select:a,dispatch:s}=l;null!==o&&"object"==typeof o&&(i=o,o=0,$()("meta argument in wp.data.dispatch('core/block-editor')",{since:"5.8",hint:"The meta argument is now the 6th argument of the function"})),e=Pn(yn(e),a.getSettings());const c=[];for(const t of e){a.canInsertBlockType(t.name,n)&&c.push(t)}c.length&&s({type:"INSERT_BLOCKS",blocks:c,index:t,rootClientId:n,time:Date.now(),updateSelection:r,initialPosition:r?o:null,meta:i})}};function jn(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{__unstableWithInserter:r,operation:o}=n;return{type:"SHOW_INSERTION_POINT",rootClientId:e,index:t,__unstableWithInserter:r,operation:o}}const zn=()=>e=>{let{select:t,dispatch:n}=e;t.isBlockInsertionPointVisible()&&n({type:"HIDE_INSERTION_POINT"})};function Vn(e){return{type:"SET_TEMPLATE_VALIDITY",isValid:e}}const Gn=()=>e=>{let{select:t,dispatch:n}=e;n({type:"SYNCHRONIZE_TEMPLATE"});const r=t.getBlocks(),o=t.getTemplate(),i=(0,a.synchronizeBlocksWithTemplate)(r,o);n.resetBlocks(i)},Hn=e=>t=>{let{registry:n,select:r,dispatch:o}=t;const i=r.getSelectionStart(),l=r.getSelectionEnd();if(i.clientId===l.clientId)return;if(!i.attributeKey||!l.attributeKey||void 0===i.offset||void 0===l.offset)return!1;const s=r.getBlockRootClientId(i.clientId);if(s!==r.getBlockRootClientId(l.clientId))return;const c=r.getBlockOrder(s);let u,p;c.indexOf(i.clientId)>c.indexOf(l.clientId)?(u=l,p=i):(u=i,p=l);const d=e?p:u,f=r.getBlock(d.clientId),m=(0,a.getBlockType)(f.name);if(!m.merge)return;const y=u,g=p,h=r.getBlock(y.clientId),v=(0,a.getBlockType)(h.name),b=r.getBlock(g.clientId),_=(0,a.getBlockType)(b.name),k=h.attributes[y.attributeKey],E=b.attributes[g.attributeKey],S=v.attributes[y.attributeKey],w=_.attributes[g.attributeKey];let C=(0,H.create)({html:k,...K(S)}),I=(0,H.create)({html:E,...K(w)});C=(0,H.remove)(C,y.offset,C.text.length),I=(0,H.insert)(I,fn,0,g.offset);const A=(0,a.cloneBlock)(h,{[y.attributeKey]:(0,H.toHTMLString)({value:C,...K(S)})}),x=(0,a.cloneBlock)(b,{[g.attributeKey]:(0,H.toHTMLString)({value:I,...K(w)})}),B=e?A:x,P=h.name===b.name?[B]:(0,a.switchToBlockType)(B,m.name);if(!P||!P.length)return;let T;if(e){const e=P.pop();T=m.merge(e.attributes,x.attributes)}else{const e=P.shift();T=m.merge(A.attributes,e.attributes)}const O=mn(T),N=T[O],M=(0,H.create)({html:N,...K(m.attributes[O])}),R=M.text.indexOf(fn),F=(0,H.remove)(M,R,R+1),L=(0,H.toHTMLString)({value:F,...K(m.attributes[O])});T[O]=L;const D=r.getSelectedBlockClientIds(),U=[...e?P:[],{...f,attributes:{...f.attributes,...T}},...e?[]:P];n.batch((()=>{o.selectionChange(f.clientId,O,R,R),o.replaceBlocks(D,U,0,r.getSelectedBlocksInitialCaretPosition())}))},Wn=()=>e=>{let{select:t,dispatch:n}=e;const r=t.getSelectionStart(),o=t.getSelectionEnd();if(r.clientId===o.clientId)return;if(!r.attributeKey||!o.attributeKey||void 0===r.offset||void 0===o.offset)return;const i=t.getBlockRootClientId(r.clientId);if(i!==t.getBlockRootClientId(o.clientId))return;const l=t.getBlockOrder(i);let s,c;l.indexOf(r.clientId)>l.indexOf(o.clientId)?(s=o,c=r):(s=r,c=o);const u=s,p=c,d=t.getBlock(u.clientId),f=(0,a.getBlockType)(d.name),m=t.getBlock(p.clientId),y=(0,a.getBlockType)(m.name),g=d.attributes[u.attributeKey],h=m.attributes[p.attributeKey],v=f.attributes[u.attributeKey],b=y.attributes[p.attributeKey];let _=(0,H.create)({html:g,...K(v)}),k=(0,H.create)({html:h,...K(b)});_=(0,H.remove)(_,u.offset,_.text.length),k=(0,H.remove)(k,0,p.offset),n.replaceBlocks(t.getSelectedBlockClientIds(),[{...d,attributes:{...d.attributes,[u.attributeKey]:(0,H.toHTMLString)({value:_,...K(v)})}},(0,a.createBlock)((0,a.getDefaultBlockName)()),{...m,attributes:{...m.attributes,[p.attributeKey]:(0,H.toHTMLString)({value:k,...K(b)})}}],1,t.getSelectedBlocksInitialCaretPosition())},$n=()=>e=>{let{select:t,dispatch:n}=e;const r=t.getSelectionStart(),o=t.getSelectionEnd();n.selectionChange({start:{clientId:r.clientId},end:{clientId:o.clientId}})},Kn=(e,t)=>n=>{let{registry:r,select:o,dispatch:i}=n;const l=[e,t];i({type:"MERGE_BLOCKS",blocks:l});const[s,c]=l,u=o.getBlock(s),p=(0,a.getBlockType)(u.name);if(!p)return;const d=o.getBlock(c);if(p&&!p.merge){const e=(0,a.switchToBlockType)(d,p.name);if(1!==(null==e?void 0:e.length))return void i.selectBlock(u.clientId);const[t]=e;return t.innerBlocks.length<1?void i.selectBlock(u.clientId):void r.batch((()=>{i.insertBlocks(t.innerBlocks,void 0,s),i.removeBlock(c),i.selectBlock(t.innerBlocks[0].clientId)}))}const f=(0,a.getBlockType)(d.name),{clientId:m,attributeKey:y,offset:g}=o.getSelectionStart(),h=(m===s?p:f).attributes[y],v=(m===s||m===c)&&void 0!==y&&void 0!==g&&!!h;h||("number"==typeof y?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 y):window.console.error("The RichText identifier prop does not match any attributes defined by the block."));const b=(0,a.cloneBlock)(u),_=(0,a.cloneBlock)(d);if(v){const e=m===s?b:_,t=e.attributes[y],n=(0,H.insert)((0,H.create)({html:t,...K(h)}),fn,g,g);e.attributes[y]=(0,H.toHTMLString)({value:n,...K(h)})}const k=u.name===d.name?[_]:(0,a.switchToBlockType)(_,u.name);if(!k||!k.length)return;const E=p.merge(b.attributes,k[0].attributes);if(v){const e=mn(E),t=E[e],n=(0,H.create)({html:t,...K(p.attributes[e])}),r=n.text.indexOf(fn),o=(0,H.remove)(n,r,r+1),l=(0,H.toHTMLString)({value:o,...K(p.attributes[e])});E[e]=l,i.selectionChange(u.clientId,e,r,r)}i.replaceBlocks([u.clientId,d.clientId],[{...u,attributes:{...u.attributes,...E}},...k.slice(1)],0)},qn=function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return n=>{let{select:r,dispatch:o}=n;if(!e||!e.length)return;e=yn(e);const i=r.getBlockRootClientId(e[0]);r.canRemoveBlocks(e,i)&&(t&&o.selectPreviousBlock(e[0],t),o({type:"REMOVE_BLOCKS",clientIds:e}),o((e=>{let{select:t,dispatch:n}=e;if(t.getBlockCount()>0)return;const{__unstableHasCustomAppender:r}=t.getSettings();r||n.insertDefaultBlock()})))}};function Jn(e,t){return qn([e],t)}function Yn(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;return{type:"REPLACE_INNER_BLOCKS",rootClientId:e,blocks:t,updateSelection:n,initialPosition:n?r:null,time:Date.now()}}function Qn(e){return{type:"TOGGLE_BLOCK_MODE",clientId:e}}function Zn(){return{type:"START_TYPING"}}function Xn(){return{type:"STOP_TYPING"}}function er(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return{type:"START_DRAGGING_BLOCKS",clientIds:e}}function tr(){return{type:"STOP_DRAGGING_BLOCKS"}}function nr(){return $()('wp.data.dispatch( "core/block-editor" ).enterFormattedText',{since:"6.1",version:"6.3"}),{type:"DO_NOTHING"}}function rr(){return $()('wp.data.dispatch( "core/block-editor" ).exitFormattedText',{since:"6.1",version:"6.3"}),{type:"DO_NOTHING"}}function or(e,t,n,r){return"string"==typeof e?{type:"SELECTION_CHANGE",clientId:e,attributeKey:t,startOffset:n,endOffset:r}:{type:"SELECTION_CHANGE",...e}}const ir=(e,t,n)=>r=>{let{dispatch:o}=r;const i=(0,a.getDefaultBlockName)();if(!i)return;const l=(0,a.createBlock)(i,e);return o.insertBlock(l,n,t)};function lr(e,t){return{type:"UPDATE_BLOCK_LIST_SETTINGS",clientId:e,settings:t}}function ar(e){return an(e,!0)}function sr(e,t){return{type:"SAVE_REUSABLE_BLOCK_SUCCESS",id:e,updatedId:t}}function cr(){return{type:"MARK_LAST_CHANGE_AS_PERSISTENT"}}function ur(){return{type:"MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"}}const pr=()=>e=>{let{dispatch:t}=e;t({type:"MARK_AUTOMATIC_CHANGE"});const{requestIdleCallback:n=(e=>setTimeout(e,100))}=window;n((()=>{t({type:"MARK_AUTOMATIC_CHANGE_FINAL"})}))},dr=function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return t=>{let{dispatch:n}=t;n.__unstableSetEditorMode(e?"navigation":"edit")}},fr=e=>t=>{let{dispatch:n,select:r}=t;if("zoom-out"===e){const e=r.getBlockSelectionStart();e&&n.selectBlock(r.getBlockHierarchyRootClientId(e))}n({type:"SET_EDITOR_MODE",mode:e}),"navigation"===e?(0,dn.speak)((0,_.__)("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.")):"edit"===e?(0,dn.speak)((0,_.__)("You are currently in edit mode. To return to the navigation mode, press Escape.")):"zoom-out"===e&&(0,dn.speak)((0,_.__)("You are currently in zoom-out mode."))},mr=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return t=>{let{dispatch:n}=t;n({type:"SET_BLOCK_MOVING_MODE",hasBlockMovingClientId:e}),e&&(0,dn.speak)((0,_.__)("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."))}},yr=function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return n=>{let{select:r,dispatch:o}=n;if(!e||!e.length)return;const i=r.getBlocksByClientId(e);if(i.some((e=>!e)))return;const l=i.map((e=>e.name));if(l.some((e=>!(0,a.hasBlockSupport)(e,"multiple",!0))))return;const s=r.getBlockRootClientId(e[0]),c=yn(e),u=r.getBlockIndex(c[c.length-1]),p=i.map((e=>(0,a.__experimentalCloneSanitizedBlock)(e)));return o.insertBlocks(p,u+1,s,t),p.length>1&&t&&o.multiSelect(p[0].clientId,p[p.length-1].clientId),p.map((e=>e.clientId))}},gr=e=>t=>{let{select:n,dispatch:r}=t;if(!e)return;const o=n.getBlockRootClientId(e);if(n.getTemplateLock(o))return;const i=n.getBlockIndex(e);return r.insertDefaultBlock({},o,i)},hr=e=>t=>{let{select:n,dispatch:r}=t;if(!e)return;const o=n.getBlockRootClientId(e);if(n.getTemplateLock(o))return;const i=n.getBlockIndex(e);return r.insertDefaultBlock({},o,i+1)};function vr(e,t){return{type:"TOGGLE_BLOCK_HIGHLIGHT",clientId:e,isHighlighted:t}}const br=e=>async t=>{let{dispatch:n}=t;n(vr(e,!0)),await new Promise((e=>setTimeout(e,150))),n(vr(e,!1))};function _r(e,t){return{type:"SET_HAS_CONTROLLED_INNER_BLOCKS",hasControlledInnerBlocks:t,clientId:e}}function kr(e){return{type:"SET_BLOCK_VISIBILITY",updates:e}}function Er(e){return{type:"SET_TEMPORARILY_EDITING_AS_BLOCKS",temporarilyEditingAsBlocks:e}}const Sr="core/block-editor";var wr=window.wp.privateApis;const{lock:Cr,unlock:Ir}=(0,wr.__dangerousOptInToUnstableAPIsOnlyForCoreModules)("I know using unstable features means my plugin or theme will inevitably break on the next WordPress release.","@wordpress/block-editor"),Ar={reducer:L,selectors:e,actions:i},xr=(0,m.createReduxStore)(Sr,{...Ar,persist:["preferences"]}),Br=(0,m.registerStore)(Sr,{...Ar,persist:["preferences"]});Ir(Br).registerPrivateActions(t),Ir(Br).registerPrivateSelectors(o);const Pr={name:"",isSelected:!1},Tr=(0,u.createContext)(Pr),{Provider:Or}=Tr;function Nr(){return(0,u.useContext)(Tr)}function Mr(){const{isSelected:e,clientId:t,name:n}=Nr();return(0,m.useSelect)((r=>{if(e)return!0;const{getBlockName:o,isFirstMultiSelectedBlock:i,getMultiSelectedBlockClientIds:l}=r(xr);return!!i(t)&&l().every((e=>o(e)===n))}),[t,e,n])}function Rr(e){let{group:t="default",controls:n,children:r,__experimentalShareWithChildBlocks:o=!1}=e;const i=function(e,t){const n=Mr(),{clientId:r}=Nr(),o=(0,m.useSelect)((e=>{const{getBlockName:n,hasSelectedInnerBlock:o}=e(xr),{hasBlockSupport:i}=e(a.store);return t&&i(n(r),"__experimentalExposeControlsToChildren",!1)&&o(r)}),[t,r]);var i;return n?null===(i=h[e])||void 0===i?void 0:i.Fill:o?h.parent.Fill:null}(t,o);return i?(0,u.createElement)(g.__experimentalStyleProvider,{document:document},(0,u.createElement)(i,null,(e=>{const o=(0,y.isEmpty)(e)?null:e;return(0,u.createElement)(g.__experimentalToolbarContext.Provider,{value:o},"default"===t&&(0,u.createElement)(g.ToolbarGroup,{controls:n}),r)}))):null}function Fr(e){let{group:t="default",...n}=e;const r=(0,u.useContext)(g.__experimentalToolbarContext),o=h[t].Slot,i=(0,g.__experimentalUseSlotFills)(o.__unstableName);return Boolean(i&&i.length)?"default"===t?(0,u.createElement)(o,c({},n,{bubblesVirtually:!0,fillProps:r})):(0,u.createElement)(g.ToolbarGroup,null,(0,u.createElement)(o,c({},n,{bubblesVirtually:!0,fillProps:r}))):null}const Lr=Rr;Lr.Slot=Fr;const Dr=e=>(0,u.createElement)(Rr,c({group:"inline"},e));Dr.Slot=e=>(0,u.createElement)(Fr,c({group:"inline"},e));var Ur=Lr;var jr=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M9 9v6h11V9H9zM4 20h1.5V4H4v16z"}));var zr=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M20 9h-7.2V4h-1.6v5H4v6h7.2v5h1.6v-5H20z"}));var Vr=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M4 15h11V9H4v6zM18.5 4v16H20V4h-1.5z"}));var Gr=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M9 15h6V9H9v6zm-5 5h1.5V4H4v16zM18.5 4v16H20V4h-1.5z"}));var Hr=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M4 4H5.5V20H4V4ZM7 10L17 10V14L7 14V10ZM20 4H18.5V20H20V4Z"}));var Wr=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"m14.5 6.5-1 1 3.7 3.7H4v1.6h13.2l-3.7 3.7 1 1 5.6-5.5z"}));var $r=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"m16.5 13.5-3.7 3.7V4h-1.5v13.2l-3.8-3.7-1 1 5.5 5.6 5.5-5.6z"}));function Kr(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e.split(",").map((e=>`.editor-styles-wrapper ${e}${t?` ${t}`:""}`)).join(",")}function qr(e,t,n,r){var o,i;let l="";return null!=t&&null!==(o=t[n])&&void 0!==o&&null!==(i=o.spacingStyles)&&void 0!==i&&i.length&&r&&t[n].spacingStyles.forEach((t=>{l+=`${Kr(e,t.selector.trim())} { `,l+=Object.entries(t.rules).map((e=>{let[t,n]=e;return`${t}: ${n||r}`})).join("; "),l+="; }"})),l}function Jr(e){const{contentSize:t,wideSize:n,type:r="default"}=e,o={},i=/^(?!0)\d+(px|em|rem|vw|vh|%)?$/i;return i.test(t)&&"constrained"===r&&(o.none=(0,_.sprintf)((0,_.__)("Max %s wide"),t)),i.test(n)&&(o.wide=(0,_.sprintf)((0,_.__)("Max %s wide"),n)),o}const Yr=(0,u.createContext)({refs:new Map,callbacks:new Map});function Qr(e){let{children:t}=e;const n=(0,u.useMemo)((()=>({refs:new Map,callbacks:new Map})),[]);return(0,u.createElement)(Yr.Provider,{value:n},t)}function Zr(e){const{refs:t,callbacks:n}=(0,u.useContext)(Yr),r=(0,u.useRef)();return(0,u.useLayoutEffect)((()=>(t.set(r,e),()=>{t.delete(r)})),[e]),(0,f.useRefEffect)((t=>{r.current=t,n.forEach(((n,r)=>{e===n&&r(t)}))}),[e])}function Xr(e){const{refs:t}=(0,u.useContext)(Yr),n=(0,u.useRef)();return n.current=e,(0,u.useMemo)((()=>({get current(){let e=null;for(const[r,o]of t.entries())o===n.current&&r.current&&(e=r.current);return e}})),[])}function eo(e){const{callbacks:t}=(0,u.useContext)(Yr),n=Xr(e),[r,o]=(0,u.useState)(null);return(0,u.useLayoutEffect)((()=>{if(e)return t.set(o,e),()=>{t.delete(o)}}),[e]),n.current||r}function to(e){return!(null==e||!e.includes)&&("0"===e||e.includes("var:preset|spacing|"))}function no(e){if(!e)return;const t=e.match(/var:preset\|spacing\|(.+)/);return t?`var(--wp--preset--spacing--${t[1]})`:e}function ro(e){if(!e)return;if("0"===e||"default"===e)return e;const t=e.match(/var:preset\|spacing\|(.+)/);return t?t[1]:void 0}const oo={all:(0,_.__)("All sides"),top:(0,_.__)("Top"),bottom:(0,_.__)("Bottom"),left:(0,_.__)("Left"),right:(0,_.__)("Right"),mixed:(0,_.__)("Mixed"),vertical:(0,_.__)("Vertical"),horizontal:(0,_.__)("Horizontal")},io={top:void 0,right:void 0,bottom:void 0,left:void 0},lo=["top","right","bottom","left"];function ao(e){return e.sort(((t,n)=>e.filter((e=>e===t)).length-e.filter((e=>e===n)).length)).pop()}function so(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:lo;return Object.values(e).length>=1&&Object.values(e).length<t.length||new Set(Object.values(e)).size>1}function co(e){return null!=e&&Object.values(e).filter((e=>!!e)).length>0}var uo=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M14.5 13.8c-1.1 0-2.1.7-2.4 1.8H4V17h8.1c.3 1 1.3 1.8 2.4 1.8s2.1-.7 2.4-1.8H20v-1.5h-3.1c-.3-1-1.3-1.7-2.4-1.7zM11.9 7c-.3-1-1.3-1.8-2.4-1.8S7.4 6 7.1 7H4v1.5h3.1c.3 1 1.3 1.8 2.4 1.8s2.1-.7 2.4-1.8H20V7h-8.1z"}));const po=["color","border","dimensions","typography","spacing"],fo={"color.palette":e=>e.colors,"color.gradients":e=>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=>e.fontSizes,"typography.customFontSize":e=>void 0===e.disableCustomFontSizes?void 0:!e.disableCustomFontSizes,"typography.lineHeight":e=>e.enableCustomLineHeight,"spacing.units":e=>{if(void 0!==e.enableCustomUnits)return!0===e.enableCustomUnits?["px","em","rem","vh","vw","%"]:e.enableCustomUnits},"spacing.padding":e=>e.enableCustomSpacing},mo={"border.customColor":"border.color","border.customStyle":"border.style","border.customWidth":"border.width","typography.customFontStyle":"typography.fontStyle","typography.customFontWeight":"typography.fontWeight","typography.customLetterSpacing":"typography.letterSpacing","typography.customTextDecorations":"typography.textDecoration","typography.customTextTransforms":"typography.textTransform","border.customRadius":"border.radius","spacing.customMargin":"spacing.margin","spacing.customPadding":"spacing.padding","typography.customLineHeight":"typography.lineHeight"};function yo(e){const{name:t,clientId:n}=Nr();return(0,m.useSelect)((r=>{if(po.includes(e))return void console.warn("Top level useSetting paths are disabled. Please use a subpath to query the information needed.");let o=(0,s.applyFilters)("blockEditor.useSetting.before",void 0,e,n,t);if(void 0!==o)return o;const i=(e=>mo[e]||e)(e),l=[n,...r(xr).getBlockParents(n,!0)];for(const e of l){const n=r(xr).getBlockName(e);if((0,a.hasBlockSupport)(n,"__experimentalSettings",!1)){var c;const n=r(xr).getBlockAttributes(e);if(o=null!==(c=(0,y.get)(n,`settings.blocks.${t}.${i}`))&&void 0!==c?c:(0,y.get)(n,`settings.${i}`),void 0!==o)break}}const u=r(xr).getSettings();if(void 0===o){var p;const e=`__experimentalFeatures.${i}`,n=`__experimentalFeatures.blocks.${t}.${i}`;o=null!==(p=(0,y.get)(u,n))&&void 0!==p?p:(0,y.get)(u,e)}var d,f;if(void 0!==o)return a.__EXPERIMENTAL_PATHS_WITH_MERGE[i]?null!==(d=null!==(f=o.custom)&&void 0!==f?f:o.theme)&&void 0!==d?d:o.default:o;const m=fo[i]?fo[i](u):void 0;return void 0!==m?m:"typography.dropCap"===i||void 0}),[t,n,e])}const go={px:{max:300,steps:1},"%":{max:100,steps:1},vw:{max:100,steps:1},vh:{max:100,steps:1},em:{max:10,steps:.1},rm:{max:10,steps:.1}};function ho(e){var t,n,r,o,i;let{spacingSizes:l,value:a,side:s,onChange:c,isMixed:p=!1,type:f,minimumCustomValue:y,onMouseOver:h,onMouseOut:v}=e;a=function(e,t){if(to(e))return e;const n=t.find((t=>String(t.size)===String(e)));return null!=n&&n.slug?`var:preset|spacing|${n.slug}`:e}(a,l);let b=l;const k=l.length<=8,E=(0,m.useSelect)((e=>{const t=e(xr).getSettings();return null==t?void 0:t.disableCustomSpacingSizes})),[S,w]=(0,u.useState)(!E&&void 0!==a&&!to(a)),C=(0,g.__experimentalUseCustomUnits)({availableUnits:yo("spacing.units")||["px","em","rem"]});let I=null;!k&&!S&&void 0!==a&&(!to(a)||to(a)&&p)?(b=[...l,{name:p?(0,_.__)("Mixed"):(0,_.sprintf)((0,_.__)("Custom (%s)"),a),slug:"custom",size:a}],I=b.length-1):p||(I=S?function(e,t){if(!to(e))return e;const n=ro(e),r=t.find((e=>String(e.slug)===n));return null==r?void 0:r.size}(a,l):function(e,t){if(void 0===e)return 0;const n=0===parseFloat(e,10)?"0":ro(e),r=t.findIndex((e=>String(e.slug)===n));return-1!==r?r:NaN}(a,l));const A=(0,u.useMemo)((()=>(0,g.__experimentalParseQuantityAndUnitFromRawValue)(I)),[I])[1]||C[0].value,x=e=>{var t;return void 0===a||null===(t=l[e])||void 0===t?void 0:t.name},B=parseFloat(I,10),P=(e,t)=>{var n;const r=parseInt(e,10);if("selectList"===t){if(0===r)return;if(1===r)return"0"}else if(0===r)return"0";return`var:preset|spacing|${null===(n=l[e])||void 0===n?void 0:n.slug}`},T=p?(0,_.__)("Mixed"):null,O=p?(0,_.__)("Mixed"):x(I),N=b.map(((e,t)=>({key:t,name:e.name}))),M=l.map(((e,t)=>({value:t,label:void 0}))),R=(0,_.sprintf)((0,_.__)("%1$s %2$s"),oo[s],null==f?void 0:f.toLowerCase()),F=k&&!S&&void 0!==O;return(0,u.createElement)(u.Fragment,null,"all"!==s&&(0,u.createElement)(g.__experimentalHStack,{className:"components-spacing-sizes-control__side-labels"},(0,u.createElement)(g.BaseControl.VisualLabel,{className:"components-spacing-sizes-control__side-label"},oo[s]),F&&(0,u.createElement)(g.BaseControl.VisualLabel,{className:"components-spacing-sizes-control__hint-single"},O)),"all"===s&&F&&(0,u.createElement)(g.BaseControl.VisualLabel,{className:"components-spacing-sizes-control__hint-all"},O),!E&&(0,u.createElement)(g.Button,{label:S?(0,_.__)("Use size preset"):(0,_.__)("Set custom size"),icon:uo,onClick:()=>{w(!S)},isPressed:S,isSmall:!0,className:d()({"components-spacing-sizes-control__custom-toggle-all":"all"===s,"components-spacing-sizes-control__custom-toggle-single":"all"!==s}),iconSize:24}),S&&(0,u.createElement)(u.Fragment,null,(0,u.createElement)(g.__experimentalUnitControl,{onMouseOver:h,onMouseOut:v,onFocus:h,onBlur:v,onChange:e=>c((e=>isNaN(parseFloat(e))?void 0:e)(e)),value:I,units:C,min:y,placeholder:T,disableUnits:p,label:R,hideLabelFromVision:!0,className:"components-spacing-sizes-control__custom-value-input",size:"__unstable-large"}),(0,u.createElement)(g.RangeControl,{onMouseOver:h,onMouseOut:v,onFocus:h,onBlur:v,value:B,min:0,max:null!==(t=null===(n=go[A])||void 0===n?void 0:n.max)&&void 0!==t?t:10,step:null!==(r=null===(o=go[A])||void 0===o?void 0:o.steps)&&void 0!==r?r:.1,withInputField:!1,onChange:e=>{c([e,A].join(""))},className:"components-spacing-sizes-control__custom-value-range",__nextHasNoMarginBottom:!0})),k&&!S&&(0,u.createElement)(g.RangeControl,{onMouseOver:h,onMouseOut:v,className:"components-spacing-sizes-control__range-control",value:I,onChange:e=>c(P(e)),onMouseDown:e=>{var t;(null==e||null===(t=e.nativeEvent)||void 0===t?void 0:t.offsetX)<35&&void 0===a&&c("0")},withInputField:!1,"aria-valuenow":I,"aria-valuetext":null===(i=l[I])||void 0===i?void 0:i.name,renderTooltipContent:x,min:0,max:l.length-1,marks:M,label:R,hideLabelFromVision:!0,__nextHasNoMarginBottom:!0,onFocus:h,onBlur:v}),!k&&!S&&(0,u.createElement)(g.CustomSelectControl,{className:"components-spacing-sizes-control__custom-select-control",value:N.find((e=>e.key===I))||"",onChange:e=>{c(P(e.selectedItem.key,"selectList"))},options:N,label:R,hideLabelFromVision:!0,__nextUnconstrainedWidth:!0,size:"__unstable-large",onMouseOver:h,onMouseOut:v,onFocus:h,onBlur:v}))}function vo(e){let{onChange:t,values:n,sides:r,spacingSizes:o,type:i,minimumCustomValue:l,onMouseOver:a,onMouseOut:s}=e;const c=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return ao(Object.values(e))}(n),p=co(n)&&so(n,r);return(0,u.createElement)(ho,{value:c,onChange:e=>{const o=(0,g.__experimentalApplyValueToSides)(n,e,r);t(o)},side:"all",spacingSizes:o,isMixed:p,type:i,minimumCustomValue:l,onMouseOver:a,onMouseOut:s})}function bo(e){let{values:t,sides:n,onChange:r,spacingSizes:o,type:i,minimumCustomValue:l,onMouseOver:a,onMouseOut:s}=e;const c=null!=n&&n.length?lo.filter((e=>n.includes(e))):lo,p=e=>n=>{const o={...t};o[e]=n,r(o)};return(0,u.createElement)(u.Fragment,null,c.map((e=>(0,u.createElement)(ho,{value:t[e],label:oo[e],key:`spacing-sizes-control-${e}`,withInputField:!1,side:e,onChange:p(e),spacingSizes:o,type:i,minimumCustomValue:l,onMouseOver:a,onMouseOut:s}))))}const _o=["vertical","horizontal"];function ko(e){let{onChange:t,values:n,sides:r,spacingSizes:o,type:i,minimumCustomValue:l,onMouseOver:a,onMouseOut:s}=e;const c=e=>r=>{if(!t)return;const o={...n};"vertical"===e&&(o.top=r,o.bottom=r),"horizontal"===e&&(o.left=r,o.right=r),t(o)},p=null!=r&&r.length?_o.filter((e=>r.includes(e))):_o;return(0,u.createElement)(u.Fragment,null,p.map((e=>{const t="vertical"===e?n.top:n.left;return(0,u.createElement)(ho,{value:t,onChange:c(e),label:oo[e],key:`spacing-sizes-control-${e}`,withInputField:!1,side:e,spacingSizes:o,type:i,minimumCustomValue:l,onMouseOver:a,onMouseOut:s})})))}var Eo=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{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"}));var So=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{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 wo(e){let{isLinked:t,onClick:n}=e;const r=t?(0,_.__)("Unlink sides"):(0,_.__)("Link sides");return(0,u.createElement)(g.Tooltip,{text:r},(0,u.createElement)("span",{className:"component-spacing-sizes-control__linked-button"},(0,u.createElement)(g.Button,{isSmall:!0,icon:t?Eo:So,iconSize:24,"aria-label":r,onClick:n})))}function Co(e){let{inputProps:t,onChange:n,label:r=(0,_.__)("Spacing Control"),values:o,sides:i,splitOnAxis:l=!1,useSelect:a,minimumCustomValue:s=0,onMouseOver:p,onMouseOut:f}=e;const m=[{name:0,slug:"0",size:0},...yo("spacing.spacingSizes")||[]];m.length>8&&m.unshift({name:(0,_.__)("Default"),slug:"default",size:void 0});const y=o||io,h=co(o),v=1===(null==i?void 0:i.length),[b,k]=(0,u.useState)(!h||!so(y,i)||v),E={...t,onChange:e=>{const t={...o,...e};n(t)},isLinked:b,sides:i,values:y,spacingSizes:m,useSelect:a,type:r,minimumCustomValue:s,onMouseOver:p,onMouseOut:f};return(0,u.createElement)("fieldset",{className:d()("component-spacing-sizes-control",{"is-unlinked":!b})},(0,u.createElement)(g.BaseControl.VisualLabel,{as:"legend"},r),!v&&(0,u.createElement)(wo,{onClick:()=>{k(!b)},isLinked:b}),b&&(0,u.createElement)(vo,c({"aria-label":r},E)),!b&&l&&(0,u.createElement)(ko,E),!b&&!l&&(0,u.createElement)(bo,E))}window.wp.warning;const Io=(0,g.createSlotFill)("InspectorControls"),Ao=(0,g.createSlotFill)("InspectorAdvancedControls"),xo=(0,g.createSlotFill)("InspectorControlsBorder"),Bo=(0,g.createSlotFill)("InspectorControlsColor"),Po=(0,g.createSlotFill)("InspectorControlsDimensions"),To=(0,g.createSlotFill)("InspectorControlsPosition"),Oo=(0,g.createSlotFill)("InspectorControlsTypography");var No={default:Io,advanced:Ao,border:xo,color:Bo,dimensions:Po,list:(0,g.createSlotFill)("InspectorControlsListView"),settings:Io,styles:(0,g.createSlotFill)("InspectorControlsStyles"),typography:Oo,position:To};function Mo(e){var t;let{children:n,group:r="default",__experimentalGroup:o}=e;o&&($()("`__experimentalGroup` property in `InspectorControlsFill`",{since:"6.2",version:"6.4",alternative:"`group`"}),r=o);const i=Mr(),l=null===(t=No[r])||void 0===t?void 0:t.Fill;return l?i?(0,u.createElement)(g.__experimentalStyleProvider,{document:document},(0,u.createElement)(l,null,(e=>{const t=(0,y.isEmpty)(e)?null:e;return(0,u.createElement)(g.__experimentalToolsPanelContext.Provider,{value:t},n)}))):null:("undefined"!=typeof process&&process.env,null)}const Ro=e=>{if(null===e||"object"!=typeof e||Array.isArray(e))return e;const t=Object.fromEntries(Object.entries((0,y.mapValues)(e,Ro)).filter((e=>{let[,t]=e;return Boolean(t)})));return(0,y.isEmpty)(t)?void 0:t};function Fo(e){return"object"==typeof e?{...Object.fromEntries(Object.entries(e).map((e=>{let[t,n]=e;return[t,Fo(n)]})))}:e}function Lo(e,t,n){const r=function(e){return Array.isArray(e)?e:"number"==typeof e?[e.toString()]:[e]}(t),o=e?Fo(e):{};return r.reduce(((e,t,o)=>(void 0===e[t]&&(e[t]={}),o===r.length-1&&(e[t]=n),e[t])),o),o}function Do(e,t,n,r,o,i){var l;if(Object.values(null!=e?e:{}).every((e=>!e)))return n;if(1===i.length&&n.innerBlocks.length===r.length)return n;let a=null===(l=r[0])||void 0===l?void 0:l.attributes;if(i.length>1&&r.length>1){if(!r[o])return n;var s;a=null===(s=r[o])||void 0===s?void 0:s.attributes}let c=n;return Object.entries(e).forEach((e=>{let[n,r]=e;r&&t[n].forEach((e=>{const t=(0,y.get)(a,e);t&&(c={...c,attributes:Lo(c.attributes,e,t)})}))})),c}function Uo(e,t,n){const r=(0,a.getBlockSupport)(e,t),o=null==r?void 0:r.__experimentalSkipSerialization;return Array.isArray(o)?o.includes(n):o}function jo(e){let{children:t,group:n,label:r}=e;const{updateBlockAttributes:o}=(0,m.useDispatch)(xr),{getBlockAttributes:i,getMultiSelectedBlockClientIds:l,getSelectedBlockClientId:a,hasMultiSelection:s}=(0,m.useSelect)(xr),c=a(),p=(0,u.useCallback)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t={},n=s()?l():[c];n.forEach((n=>{const{style:r}=i(n);let o={style:r};e.forEach((e=>{o={...o,...e(o)}})),o={...o,style:Ro(o.style)},t[n]=o})),o(n,t,!0)}),[Ro,i,l,s,c,o]);return(0,u.createElement)(g.__experimentalToolsPanel,{className:`${n}-block-support-panel`,label:r,resetAll:p,key:c,panelId:c,hasInnerWrapper:!0,shouldRenderPlaceholderItems:!0,__experimentalFirstVisibleItemClass:"first",__experimentalLastVisibleItemClass:"last"},t)}function zo(e){let{Slot:t,...n}=e;const r=(0,u.useContext)(g.__experimentalToolsPanelContext);return(0,u.createElement)(t,c({},n,{fillProps:r,bubblesVirtually:!0}))}function Vo(e){var t;let{__experimentalGroup:n,group:r="default",label:o,...i}=e;n&&($()("`__experimentalGroup` property in `InspectorControlsSlot`",{since:"6.2",version:"6.4",alternative:"`group`"}),r=n);const l=null===(t=No[r])||void 0===t?void 0:t.Slot,a=(0,g.__experimentalUseSlot)(null==l?void 0:l.__unstableName),s=(0,g.__experimentalUseSlotFills)(null==l?void 0:l.__unstableName);if(!l||!a)return"undefined"!=typeof process&&process.env,null;return Boolean(s&&s.length)?o?(0,u.createElement)(jo,{group:r,label:o},(0,u.createElement)(zo,c({},i,{Slot:l}))):(0,u.createElement)(l,c({},i,{bubblesVirtually:!0})):null}const Go=Mo;Go.Slot=Vo;const Ho=e=>(0,u.createElement)(Mo,c({},e,{group:"advanced"}));Ho.Slot=e=>(0,u.createElement)(Vo,c({},e,{group:"advanced"})),Ho.slotName="InspectorAdvancedControls";var Wo=Go,$o=window.wp.isShallowEqual,Ko=n.n($o);var qo=function(e){return(0,f.useRefEffect)((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 Jo=Number.MAX_SAFE_INTEGER;var Yo=(0,u.forwardRef)((function(e,t){let{clientId:n,bottomClientId:r,children:o,__unstableRefreshSize:i,__unstableCoverTarget:l=!1,__unstablePopoverSlot:a,__unstableContentRef:s,shift:p=!0,...m}=e;const y=eo(n),h=eo(null!=r?r:n),v=(0,f.useMergeRefs)([t,qo(s)]),[b,_]=(0,u.useReducer)((e=>(e+1)%Jo),0);(0,u.useLayoutEffect)((()=>{if(!y)return;const e=new window.MutationObserver(_);return e.observe(y,{attributes:!0}),()=>{e.disconnect()}}),[y]);const k=(0,u.useMemo)((()=>b<0||!y||h!==y?{}:{position:"absolute",width:y.offsetWidth,height:y.offsetHeight}),[y,h,i,b]),E=(0,u.useMemo)((()=>{if(!(b<0||!y||r&&!h))return{getBoundingClientRect(){var e,t,n,r;const o=y.getBoundingClientRect(),i=null==h?void 0:h.getBoundingClientRect(),l=Math.min(o.left,null!==(e=null==i?void 0:i.left)&&void 0!==e?e:1/0),a=Math.min(o.top,null!==(t=null==i?void 0:i.top)&&void 0!==t?t:1/0),s=Math.max(o.right,null!==(n=i.right)&&void 0!==n?n:-1/0)-l,c=Math.max(o.bottom,null!==(r=i.bottom)&&void 0!==r?r:-1/0)-a;return new window.DOMRect(l,a,s,c)},ownerDocument:y.ownerDocument}}),[r,h,y,b]);return!y||r&&!h?null:(0,u.createElement)(g.Popover,c({ref:v,animate:!1,focusOnMount:!1,anchor:E,__unstableSlotName:a||null,placement:"top-start",resize:!1,flip:!1,shift:p},m,{className:d()("block-editor-block-popover",m.className),variant:"unstyled"}),l&&(0,u.createElement)("div",{style:k},o),!l&&o)}));function Qo(e){const t=(0,a.getBlockSupport)(e,gi);return!!(!0===t||null!=t&&t.margin)}function Zo(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=!yo("spacing.margin"),n=!Si(e,"margin");return!Qo(e)||t||n}function Xo(e){var t,n;const{name:r,attributes:{style:o},setAttributes:i,onMouseOver:l,onMouseOut:a}=e,s=yo("spacing.spacingSizes"),c=(0,g.__experimentalUseCustomUnits)({availableUnits:yo("spacing.units")||["%","px","em","rem","vw"]}),p=Ei(r,"margin"),d=p&&p.some((e=>vi.includes(e)));if(Zo(e))return null;const f=e=>{const t={...o,spacing:{...null==o?void 0:o.spacing,margin:e}};i({style:Ro(t)})};return u.Platform.select({web:(0,u.createElement)(u.Fragment,null,(!s||0===(null==s?void 0:s.length))&&(0,u.createElement)(g.__experimentalBoxControl,{values:null==o||null===(t=o.spacing)||void 0===t?void 0:t.margin,onChange:f,label:(0,_.__)("Margin"),sides:p,units:c,allowReset:!1,splitOnAxis:d,onMouseOver:l,onMouseOut:a}),(null==s?void 0:s.length)>0&&(0,u.createElement)(Co,{values:null==o||null===(n=o.spacing)||void 0===n?void 0:n.margin,onChange:f,label:(0,_.__)("Margin"),sides:p,units:c,allowReset:!1,splitOnAxis:!1,onMouseOver:l,onMouseOut:a})),native:null})}function ei(e){var t,n;let{clientId:r,attributes:o,forceShow:i}=e;const l=null==o||null===(t=o.style)||void 0===t||null===(n=t.spacing)||void 0===n?void 0:n.margin,a=(0,u.useMemo)((()=>{const e=null!=l&&l.top?no(null==l?void 0:l.top):0,t=null!=l&&l.right?no(null==l?void 0:l.right):0,n=null!=l&&l.bottom?no(null==l?void 0:l.bottom):0,r=null!=l&&l.left?no(null==l?void 0:l.left):0;return{borderTopWidth:e,borderRightWidth:t,borderBottomWidth:n,borderLeftWidth:r,top:e?`calc(${e} * -1)`:0,right:t?`calc(${t} * -1)`:0,bottom:n?`calc(${n} * -1)`:0,left:r?`calc(${r} * -1)`:0}}),[l]),[s,c]=(0,u.useState)(!1),p=(0,u.useRef)(l),d=(0,u.useRef)();return(0,u.useEffect)((()=>(Ko()(l,p.current)||i||(c(!0),p.current=l,d.current=setTimeout((()=>{c(!1)}),400)),()=>{c(!1),d.current&&window.clearTimeout(d.current)})),[l,i]),s||i?(0,u.createElement)(Yo,{clientId:r,__unstableCoverTarget:!0,__unstableRefreshSize:l,__unstablePopoverSlot:"block-toolbar",shift:!1},(0,u.createElement)("div",{className:"block-editor__padding-visualizer",style:a})):null}const ti={px:{max:1e3,step:1},"%":{max:100,step:1},vw:{max:100,step:1},vh:{max:100,step:1},em:{max:50,step:.1},rem:{max:50,step:.1}};function ni(e){var t,n,r,o,i;let{label:l=(0,_.__)("Height"),onChange:a,value:s}=e;const c=parseFloat(s),p=(0,g.__experimentalUseCustomUnits)({availableUnits:yo("spacing.units")||["%","px","em","rem","vh","vw"]}),d=(0,u.useMemo)((()=>(0,g.__experimentalParseQuantityAndUnitFromRawValue)(s)),[s])[1]||(null===(t=p[0])||void 0===t?void 0:t.value)||"px";return(0,u.createElement)("fieldset",{className:"block-editor-height-control"},(0,u.createElement)(g.BaseControl.VisualLabel,{as:"legend"},l),(0,u.createElement)(g.Flex,null,(0,u.createElement)(g.FlexItem,{isBlock:!0},(0,u.createElement)(g.__experimentalUnitControl,{value:s,units:p,onChange:a,onUnitChange:e=>{const[t,n]=(0,g.__experimentalParseQuantityAndUnitFromRawValue)(s);["em","rem"].includes(e)&&"px"===n?a((t/16).toFixed(2)+e):["em","rem"].includes(n)&&"px"===e?a(Math.round(16*t)+e):["vh","vw","%"].includes(e)&&t>100&&a(100+e)},min:0,size:"__unstable-large"})),(0,u.createElement)(g.FlexItem,{isBlock:!0},(0,u.createElement)(g.__experimentalSpacer,{marginX:2,marginBottom:0},(0,u.createElement)(g.RangeControl,{value:c,min:0,max:null!==(n=null===(r=ti[d])||void 0===r?void 0:r.max)&&void 0!==n?n:100,step:null!==(o=null===(i=ti[d])||void 0===i?void 0:i.step)&&void 0!==o?o:.1,withInputField:!1,onChange:e=>{a([e,d].join(""))},__nextHasNoMarginBottom:!0})))))}function ri(e){const t=(0,a.getBlockSupport)(e,yi);return!!(!0===t||null!=t&&t.minHeight)}function oi(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=!yo("dimensions.minHeight");return!ri(e)||t}function ii(e){var t;const{attributes:{style:n},setAttributes:r}=e;if(oi(e))return null;return(0,u.createElement)(ni,{label:(0,_.__)("Min. height"),value:null==n||null===(t=n.dimensions)||void 0===t?void 0:t.minHeight,onChange:e=>{const t={...n,dimensions:{...null==n?void 0:n.dimensions,minHeight:e}};r({style:Ro(t)})}})}function li(e){const t=(0,a.getBlockSupport)(e,gi);return!!(!0===t||null!=t&&t.padding)}function ai(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=!yo("spacing.padding"),n=!Si(e,"padding");return!li(e)||t||n}function si(e){var t,n;const{name:r,attributes:{style:o},setAttributes:i,onMouseOver:l,onMouseOut:a}=e,s=yo("spacing.spacingSizes"),c=(0,g.__experimentalUseCustomUnits)({availableUnits:yo("spacing.units")||["%","px","em","rem","vw"]}),p=Ei(r,"padding"),d=p&&p.some((e=>vi.includes(e)));if(ai(e))return null;const f=e=>{const t={...o,spacing:{...null==o?void 0:o.spacing,padding:e}};i({style:Ro(t)})};return u.Platform.select({web:(0,u.createElement)(u.Fragment,null,(!s||0===(null==s?void 0:s.length))&&(0,u.createElement)(g.__experimentalBoxControl,{values:null==o||null===(t=o.spacing)||void 0===t?void 0:t.padding,onChange:f,label:(0,_.__)("Padding"),sides:p,units:c,allowReset:!1,splitOnAxis:d,onMouseOver:l,onMouseOut:a}),(null==s?void 0:s.length)>0&&(0,u.createElement)(Co,{values:null==o||null===(n=o.spacing)||void 0===n?void 0:n.padding,onChange:f,label:(0,_.__)("Padding"),sides:p,units:c,allowReset:!1,splitOnAxis:d,onMouseOver:l,onMouseOut:a})),native:null})}function ci(e){var t,n;let{clientId:r,attributes:o,forceShow:i}=e;const l=null==o||null===(t=o.style)||void 0===t||null===(n=t.spacing)||void 0===n?void 0:n.padding,a=(0,u.useMemo)((()=>({borderTopWidth:null!=l&&l.top?no(null==l?void 0:l.top):0,borderRightWidth:null!=l&&l.right?no(null==l?void 0:l.right):0,borderBottomWidth:null!=l&&l.bottom?no(null==l?void 0:l.bottom):0,borderLeftWidth:null!=l&&l.left?no(null==l?void 0:l.left):0})),[l]),[s,c]=(0,u.useState)(!1),p=(0,u.useRef)(l),d=(0,u.useRef)();return(0,u.useEffect)((()=>(Ko()(l,p.current)||i||(c(!0),p.current=l,d.current=setTimeout((()=>{c(!1)}),400)),()=>{c(!1),d.current&&window.clearTimeout(d.current)})),[l,i]),s||i?(0,u.createElement)(Yo,{clientId:r,__unstableCoverTarget:!0,__unstableRefreshSize:l,__unstablePopoverSlot:"block-toolbar",shift:!1},(0,u.createElement)("div",{className:"block-editor__padding-visualizer",style:a})):null}function ui(e,t){const{orientation:n="horizontal"}=t;return"fill"===e?(0,_.__)("Stretch to fill available space."):"fixed"===e?"horizontal"===n?(0,_.__)("Specify a fixed width."):(0,_.__)("Specify a fixed height."):(0,_.__)("Fit contents.")}function pi(e){let{attributes:t,setAttributes:n,__unstableParentLayout:r}=e;const{style:o={}}=t,{layout:i={}}=o,{selfStretch:l,flexSize:a}=i;return(0,u.useEffect)((()=>{"fixed"!==l||a||n({style:{...o,layout:{...i,selfStretch:"fit"}}})}),[]),(0,u.createElement)(u.Fragment,null,(0,u.createElement)(g.__experimentalToggleGroupControl,{__nextHasNoMarginBottom:!0,size:"__unstable-large",label:mi(r),value:l||"fit",help:ui(l,r),onChange:e=>{const t="fixed"!==e?null:a;n({style:{...o,layout:{...i,selfStretch:e,flexSize:t}}})},isBlock:!0},(0,u.createElement)(g.__experimentalToggleGroupControlOption,{key:"fit",value:"fit",label:(0,_.__)("Fit")}),(0,u.createElement)(g.__experimentalToggleGroupControlOption,{key:"fill",value:"fill",label:(0,_.__)("Fill")}),(0,u.createElement)(g.__experimentalToggleGroupControlOption,{key:"fixed",value:"fixed",label:(0,_.__)("Fixed")})),"fixed"===l&&(0,u.createElement)(g.__experimentalUnitControl,{size:"__unstable-large",onChange:e=>{n({style:{...o,layout:{...i,flexSize:e}}})},value:a}))}function di(e){let{__unstableParentLayout:t={}}=e;const{type:n="default",default:{type:r="default"}={},allowSizingOnChildren:o=!1}=t;return("flex"===r||"flex"===n)&&o}function fi(e){const t=!yo("layout");return!di(e)||t}function mi(e){const{orientation:t="horizontal"}=e;return"horizontal"===t?(0,_.__)("Width"):(0,_.__)("Height")}const yi="dimensions",gi="spacing",hi=["top","right","bottom","left"],vi=["vertical","horizontal"];function bi(){const[e,t]=(0,u.useState)(!1),{hideBlockInterface:n,showBlockInterface:r}=Ir((0,m.useDispatch)(xr));return{isMouseOver:e,onMouseOver:e=>{e.stopPropagation(),n(),t(!0)},onMouseOut:e=>{e.stopPropagation(),r(),t(!1)}}}function _i(e){const t=Ai(e),n=ai(e),r=Zo(e),o=oi(e),i=fi(e),l=ki(e),s=function(e){if("web"!==u.Platform.OS)return!1;const{name:t}=e;return wi(t)||ri(t)||li(t)||Qo(t)||di(e)}(e),p=yo("spacing.spacingSizes"),f=bi(),m=bi();if(l||!s)return null;const y=(0,a.getBlockSupport)(e.name,[yi,"__experimentalDefaultControls"]),h=(0,a.getBlockSupport)(e.name,[gi,"__experimentalDefaultControls"]),v=(e,t)=>n=>{var r;return{...n,style:{...n.style,[t]:{...null===(r=n.style)||void 0===r?void 0:r[t],[e]:void 0}}}},b=d()({"tools-panel-item-spacing":p&&p.length>0}),{__unstableParentLayout:k}=e;return(0,u.createElement)(u.Fragment,null,(0,u.createElement)(Wo,{group:"dimensions"},!n&&(0,u.createElement)(g.__experimentalToolsPanelItem,{className:b,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:(0,_.__)("Padding"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:r}=t;n({style:Ro({...r,spacing:{...null==r?void 0:r.spacing,padding:void 0}})})}(e),resetAllFilter:v("padding","spacing"),isShownByDefault:null==h?void 0:h.padding,panelId:e.clientId},(0,u.createElement)(si,c({onMouseOver:f.onMouseOver,onMouseOut:f.onMouseOut},e))),!r&&(0,u.createElement)(g.__experimentalToolsPanelItem,{className:b,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:(0,_.__)("Margin"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:r}=t;n({style:Ro({...r,spacing:{...null==r?void 0:r.spacing,margin:void 0}})})}(e),resetAllFilter:v("margin","spacing"),isShownByDefault:null==h?void 0:h.margin,panelId:e.clientId},(0,u.createElement)(Xo,c({onMouseOver:m.onMouseOver,onMouseOut:m.onMouseOut},e))),!t&&(0,u.createElement)(g.__experimentalToolsPanelItem,{className:b,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.blockGap)}(e),label:(0,_.__)("Block spacing"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:r}=t;n({style:{...r,spacing:{...null==r?void 0:r.spacing,blockGap:void 0}}})}(e),resetAllFilter:v("blockGap","spacing"),isShownByDefault:null==h?void 0:h.blockGap,panelId:e.clientId},(0,u.createElement)(xi,e)),!o&&(0,u.createElement)(g.__experimentalToolsPanelItem,{hasValue:()=>function(e){var t,n;return void 0!==(null===(t=e.attributes.style)||void 0===t||null===(n=t.dimensions)||void 0===n?void 0:n.minHeight)}(e),label:(0,_.__)("Min. height"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:r}=t;n({style:Ro({...r,dimensions:{...null==r?void 0:r.dimensions,minHeight:void 0}})})}(e),resetAllFilter:v("minHeight","dimensions"),isShownByDefault:null==y?void 0:y.minHeight,panelId:e.clientId},(0,u.createElement)(ii,e)),!i&&(0,u.createElement)(g.__experimentalVStack,{as:g.__experimentalToolsPanelItem,spacing:2,hasValue:()=>function(e){var t;return void 0!==(null===(t=e.attributes.style)||void 0===t?void 0:t.layout)}(e),label:mi(k),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:r}=t;n({style:{...r,layout:void 0}})}(e),resetAllFilter:v("selfStretch","layout"),isShownByDefault:!1,panelId:e.clientId},(0,u.createElement)(pi,e))),!n&&(0,u.createElement)(ci,c({forceShow:f.isMouseOver},e)),!r&&(0,u.createElement)(ei,c({forceShow:m.isMouseOver},e)))}const ki=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=Ai(e),n=oi(e),r=ai(e),o=Zo(e),i=fi(e);return t&&n&&r&&o&&i};function Ei(e,t){var n;const r=(0,a.getBlockSupport)(e,gi);if(r&&"boolean"!=typeof r[t])return Array.isArray(r[t])?r[t]:null!==(n=r[t])&&void 0!==n&&n.sides?r[t].sides:void 0}function Si(e,t){const n=Ei(e,t);return!(n&&n.some((e=>hi.includes(e)))&&n.some((e=>vi.includes(e))))||(console.warn(`The ${t} support for the "${e}" block can not be configured to support both axial and arbitrary sides.`),!1)}function wi(e){const t=(0,a.getBlockSupport)(e,gi);return!!(!0===t||null!=t&&t.blockGap)}function Ci(e){if(!e)return null;const t="string"==typeof e;return{top:t?e:null==e?void 0:e.top,left:t?e:null==e?void 0:e.left}}function Ii(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"0";const n=Ci(e);if(!n)return null;const r=no(null==n?void 0:n.top)||t,o=no(null==n?void 0:n.left)||t;return r===o?r:`${r} ${o}`}function Ai(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=!yo("spacing.blockGap");return!wi(e)||t}function xi(e){var t;const{clientId:n,attributes:{style:r},name:o,setAttributes:i}=e,l=yo("spacing.spacingSizes"),a=(0,g.__experimentalUseCustomUnits)({availableUnits:yo("spacing.units")||["%","px","em","rem","vw"]}),s=Ei(o,"blockGap"),c=Xr(n);if(Ai(e))return null;const p=s&&s.some((e=>vi.includes(e))),d=e=>{var t;let n=e;e&&p?n={...Ci(e)}:null!=e&&e.hasOwnProperty("top")&&(n=e.top);const o={...r,spacing:{...null==r?void 0:r.spacing,blockGap:n}};i({style:Ro(o)});const l=(null===(t=window)||void 0===t?void 0:t.navigator.userAgent)&&window.navigator.userAgent.includes("Safari")&&!window.navigator.userAgent.includes("Chrome ")&&!window.navigator.userAgent.includes("Chromium ");var a;c.current&&l&&(null===(a=c.current.parentNode)||void 0===a||a.replaceChild(c.current,c.current))},f=Ci(null==r||null===(t=r.spacing)||void 0===t?void 0:t.blockGap),m=p?{...f,right:null==f?void 0:f.left,bottom:null==f?void 0:f.top}:{top:null==f?void 0:f.top};return u.Platform.select({web:(0,u.createElement)(u.Fragment,null,(!l||0===(null==l?void 0:l.length))&&(p?(0,u.createElement)(g.__experimentalBoxControl,{label:(0,_.__)("Block spacing"),min:0,onChange:d,units:a,sides:s,values:m,allowReset:!1,splitOnAxis:p}):(0,u.createElement)(g.__experimentalUnitControl,{label:(0,_.__)("Block spacing"),__unstableInputWidth:"80px",min:0,onChange:d,units:a,value:m})),(null==l?void 0:l.length)>0&&(0,u.createElement)(Co,{values:m,onChange:d,label:(0,_.__)("Block spacing"),sides:p?s:["top"],units:a,allowReset:!1,splitOnAxis:p})),native:null})}const Bi=(0,u.createElement)(g.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(g.Path,{d:"M15 4H9v11h6V4zM4 18.5V20h16v-1.5H4z"})),Pi=(0,u.createElement)(g.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(g.Path,{d:"M20 11h-5V4H9v7H4v1.5h5V20h6v-7.5h5z"})),Ti=(0,u.createElement)(g.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(g.Path,{d:"M9 20h6V9H9v11zM4 4v1.5h16V4H4z"})),Oi=(0,u.createElement)(g.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(g.Path,{d:"M4 4L20 4L20 5.5L4 5.5L4 4ZM10 7L14 7L14 17L10 17L10 7ZM20 18.5L4 18.5L4 20L20 20L20 18.5Z"})),Ni=(0,u.createElement)(g.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(g.Path,{d:"M7 4H17V8L7 8V4ZM7 16L17 16V20L7 20V16ZM20 11.25H4V12.75H20V11.25Z"})),Mi={top:{icon:Ti,title:(0,_._x)("Align top","Block vertical alignment setting")},center:{icon:Pi,title:(0,_._x)("Align middle","Block vertical alignment setting")},bottom:{icon:Bi,title:(0,_._x)("Align bottom","Block vertical alignment setting")},stretch:{icon:Oi,title:(0,_._x)("Stretch to fill","Block vertical alignment setting")},"space-between":{icon:Ni,title:(0,_._x)("Space between","Block vertical alignment setting")}},Ri=["top","center","bottom"];var Fi=function(e){let{value:t,onChange:n,controls:r=Ri,isCollapsed:o=!0,isToolbar:i}=e;const l=Mi[t],a=Mi.top,s=i?g.ToolbarGroup:g.ToolbarDropdownMenu,p=i?{isCollapsed:o}:{popoverProps:{variant:"toolbar"}};return(0,u.createElement)(s,c({icon:l?l.icon:a.icon,label:(0,_._x)("Change vertical alignment","Block vertical alignment setting label"),controls:r.map((e=>{return{...Mi[e],isActive:t===e,role:o?"menuitemradio":void 0,onClick:(r=e,()=>n(t===r?void 0:r))};var r}))},p))};const Li=e=>(0,u.createElement)(Fi,c({},e,{isToolbar:!1})),Di=e=>(0,u.createElement)(Fi,c({},e,{isToolbar:!0})),Ui={left:jr,center:zr,right:Vr,"space-between":Gr,stretch:Hr};var ji=function(e){let{allowedControls:t=["left","center","right","space-between"],isCollapsed:n=!0,onChange:r,value:o,popoverProps:i,isToolbar:l}=e;const a=e=>{r(e===o?void 0:e)},s=o?Ui[o]:Ui.left,p=[{name:"left",icon:jr,title:(0,_.__)("Justify items left"),isActive:"left"===o,onClick:()=>a("left")},{name:"center",icon:zr,title:(0,_.__)("Justify items center"),isActive:"center"===o,onClick:()=>a("center")},{name:"right",icon:Vr,title:(0,_.__)("Justify items right"),isActive:"right"===o,onClick:()=>a("right")},{name:"space-between",icon:Gr,title:(0,_.__)("Space between items"),isActive:"space-between"===o,onClick:()=>a("space-between")},{name:"stretch",icon:Hr,title:(0,_.__)("Stretch items"),isActive:"stretch"===o,onClick:()=>a("stretch")}],d=l?g.ToolbarGroup:g.ToolbarDropdownMenu,f=l?{isCollapsed:n}:{};return(0,u.createElement)(d,c({icon:s,popoverProps:i,label:(0,_.__)("Change items justification"),controls:p.filter((e=>t.includes(e.name)))},f))};const zi=e=>(0,u.createElement)(ji,c({},e,{isToolbar:!1})),Vi=e=>(0,u.createElement)(ji,c({},e,{isToolbar:!0})),Gi={left:"flex-start",right:"flex-end",center:"center","space-between":"space-between"},Hi={left:"flex-start",right:"flex-end",center:"center",stretch:"stretch"},Wi={top:"flex-start",center:"center",bottom:"flex-end",stretch:"stretch","space-between":"space-between"},$i=["wrap","nowrap"];var Ki={name:"flex",label:(0,_.__)("Flex"),inspectorControls:function(e){let{layout:t={},onChange:n,layoutBlockSupport:r={}}=e;const{allowOrientation:o=!0}=r;return(0,u.createElement)(u.Fragment,null,(0,u.createElement)(g.Flex,null,(0,u.createElement)(g.FlexItem,null,(0,u.createElement)(Ji,{layout:t,onChange:n})),(0,u.createElement)(g.FlexItem,null,o&&(0,u.createElement)(Qi,{layout:t,onChange:n}))),(0,u.createElement)(Yi,{layout:t,onChange:n}))},toolBarControls:function(e){let{layout:t={},onChange:n,layoutBlockSupport:r}=e;if(null!=r&&r.allowSwitching)return null;const{allowVerticalAlignment:o=!0}=r;return(0,u.createElement)(Ur,{group:"block",__experimentalShareWithChildBlocks:!0},(0,u.createElement)(Ji,{layout:t,onChange:n,isToolbar:!0}),o&&(0,u.createElement)(qi,{layout:t,onChange:n,isToolbar:!0}))},getLayoutStyle:function(e){var t,n;let{selector:r,layout:o,style:i,blockName:l,hasBlockGapSupport:a,layoutDefinitions:s}=e;const{orientation:c="horizontal"}=o,u=null!=i&&null!==(t=i.spacing)&&void 0!==t&&t.blockGap&&!Uo(l,"spacing","blockGap")?Ii(null==i||null===(n=i.spacing)||void 0===n?void 0:n.blockGap,"0.5em"):void 0,p=Gi[o.justifyContent],d=$i.includes(o.flexWrap)?o.flexWrap:"wrap",f=Wi[o.verticalAlignment],m=Hi[o.justifyContent]||Hi.left;let y="";const g=[];return d&&"wrap"!==d&&g.push(`flex-wrap: ${d}`),"horizontal"===c?(f&&g.push(`align-items: ${f}`),p&&g.push(`justify-content: ${p}`)):(f&&g.push(`justify-content: ${f}`),g.push("flex-direction: column"),g.push(`align-items: ${m}`)),g.length&&(y=`${Kr(r)} {\n\t\t\t\t${g.join("; ")};\n\t\t\t}`),a&&u&&(y+=qr(r,s,"flex",u)),y},getOrientation(e){const{orientation:t="horizontal"}=e;return t},getAlignments(){return[]}};function qi(e){let{layout:t,onChange:n,isToolbar:r=!1}=e;const{orientation:o="horizontal"}=t,i="horizontal"===o?Wi.center:Wi.top,{verticalAlignment:l=i}=t,a=e=>{n({...t,verticalAlignment:e})};if(r)return(0,u.createElement)(Li,{onChange:a,value:l,controls:"horizontal"===o?["top","center","bottom","stretch"]:["top","center","bottom","space-between"]});const s=[{value:"flex-start",label:(0,_.__)("Align items top")},{value:"center",label:(0,_.__)("Align items center")},{value:"flex-end",label:(0,_.__)("Align items bottom")}];return(0,u.createElement)("fieldset",{className:"block-editor-hooks__flex-layout-vertical-alignment-control"},(0,u.createElement)("legend",null,(0,_.__)("Vertical alignment")),(0,u.createElement)("div",null,s.map(((e,t,n)=>(0,u.createElement)(g.Button,{key:e,label:n,icon:t,isPressed:l===e,onClick:()=>a(e)})))))}function Ji(e){let{layout:t,onChange:n,isToolbar:r=!1}=e;const{justifyContent:o="left",orientation:i="horizontal"}=t,l=e=>{n({...t,justifyContent:e})},a=["left","center","right"];if("horizontal"===i?a.push("space-between"):a.push("stretch"),r)return(0,u.createElement)(zi,{allowedControls:a,value:o,onChange:l,popoverProps:{position:"bottom right",variant:"toolbar"}});const s=[{value:"left",icon:jr,label:(0,_.__)("Justify items left")},{value:"center",icon:zr,label:(0,_.__)("Justify items center")},{value:"right",icon:Vr,label:(0,_.__)("Justify items right")}];return"horizontal"===i?s.push({value:"space-between",icon:Gr,label:(0,_.__)("Space between items")}):s.push({value:"stretch",icon:Hr,label:(0,_.__)("Stretch items")}),(0,u.createElement)(g.__experimentalToggleGroupControl,{__nextHasNoMarginBottom:!0,label:(0,_.__)("Justification"),value:o,onChange:l,className:"block-editor-hooks__flex-layout-justification-controls"},s.map((e=>{let{value:t,icon:n,label:r}=e;return(0,u.createElement)(g.__experimentalToggleGroupControlOptionIcon,{key:t,value:t,icon:n,label:r})})))}function Yi(e){let{layout:t,onChange:n}=e;const{flexWrap:r="wrap"}=t;return(0,u.createElement)(g.ToggleControl,{label:(0,_.__)("Allow to wrap to multiple lines"),onChange:e=>{n({...t,flexWrap:e?"wrap":"nowrap"})},checked:"wrap"===r})}function Qi(e){let{layout:t,onChange:n}=e;const{orientation:r="horizontal",verticalAlignment:o,justifyContent:i}=t;return(0,u.createElement)(g.__experimentalToggleGroupControl,{__nextHasNoMarginBottom:!0,className:"block-editor-hooks__flex-layout-orientation-controls",label:(0,_.__)("Orientation"),value:r,onChange:e=>{let r=o,l=i;return"horizontal"===e?("space-between"===o&&(r="center"),"stretch"===i&&(l="left")):("stretch"===o&&(r="top"),"space-between"===i&&(l="left")),n({...t,orientation:e,verticalAlignment:r,justifyContent:l})}},(0,u.createElement)(g.__experimentalToggleGroupControlOptionIcon,{icon:Wr,value:"horizontal",label:(0,_.__)("Horizontal")}),(0,u.createElement)(g.__experimentalToggleGroupControlOptionIcon,{icon:$r,value:"vertical",label:(0,_.__)("Vertical")}))}var Zi={name:"default",label:(0,_.__)("Flow"),inspectorControls:function(){return null},toolBarControls:function(){return null},getLayoutStyle:function(e){var t;let{selector:n,style:r,blockName:o,hasBlockGapSupport:i,layoutDefinitions:l}=e;const a=Ii(null==r||null===(t=r.spacing)||void 0===t?void 0:t.blockGap);let s="";Uo(o,"spacing","blockGap")||(null!=a&&a.top?s=Ii(null==a?void 0:a.top):"string"==typeof a&&(s=Ii(a)));let c="";return i&&s&&(c+=qr(n,l,"default",s)),c},getOrientation(){return"vertical"},getAlignments(e,t){const n=Jr(e);if(void 0!==e.alignments)return e.alignments.includes("none")||e.alignments.unshift("none"),e.alignments.map((e=>({name:e,info:n[e]})));const r=[{name:"left"},{name:"center"},{name:"right"}];if(!t){const{contentSize:t,wideSize:o}=e;t&&r.unshift({name:"full"}),o&&r.unshift({name:"wide",info:n.wide})}return r.unshift({name:"none",info:n.none}),r}};var Xi=function(e){let{icon:t,size:n=24,...r}=e;return(0,u.cloneElement)(t,{width:n,height:n,...r})};var el=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M7 9v6h10V9H7zM5 19.8h14v-1.5H5v1.5zM5 4.3v1.5h14V4.3H5z"}));var tl=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M5 9v6h14V9H5zm11-4.8H8v1.5h8V4.2zM8 19.8h8v-1.5H8v1.5z"})),nl=window.wp.styleEngine,rl={name:"constrained",label:(0,_.__)("Constrained"),inspectorControls:function(e){let{layout:t,onChange:n}=e;const{wideSize:r,contentSize:o,justifyContent:i="center"}=t,l=[{value:"left",icon:jr,label:(0,_.__)("Justify items left")},{value:"center",icon:zr,label:(0,_.__)("Justify items center")},{value:"right",icon:Vr,label:(0,_.__)("Justify items right")}],a=(0,g.__experimentalUseCustomUnits)({availableUnits:yo("spacing.units")||["%","px","em","rem","vw"]});return(0,u.createElement)(u.Fragment,null,(0,u.createElement)("div",{className:"block-editor-hooks__layout-controls"},(0,u.createElement)("div",{className:"block-editor-hooks__layout-controls-unit"},(0,u.createElement)(g.__experimentalUnitControl,{className:"block-editor-hooks__layout-controls-unit-input",label:(0,_.__)("Content"),labelPosition:"top",__unstableInputWidth:"80px",value:o||r||"",onChange:e=>{e=0>parseFloat(e)?"0":e,n({...t,contentSize:e})},units:a}),(0,u.createElement)(Xi,{icon:el})),(0,u.createElement)("div",{className:"block-editor-hooks__layout-controls-unit"},(0,u.createElement)(g.__experimentalUnitControl,{className:"block-editor-hooks__layout-controls-unit-input",label:(0,_.__)("Wide"),labelPosition:"top",__unstableInputWidth:"80px",value:r||o||"",onChange:e=>{e=0>parseFloat(e)?"0":e,n({...t,wideSize:e})},units:a}),(0,u.createElement)(Xi,{icon:tl}))),(0,u.createElement)("p",{className:"block-editor-hooks__layout-controls-helptext"},(0,_.__)("Customize the width for all elements that are assigned to the center or wide columns.")),(0,u.createElement)(g.__experimentalToggleGroupControl,{__nextHasNoMarginBottom:!0,label:(0,_.__)("Justification"),value:i,onChange:e=>{n({...t,justifyContent:e})}},l.map((e=>{let{value:t,icon:n,label:r}=e;return(0,u.createElement)(g.__experimentalToggleGroupControlOptionIcon,{key:t,value:t,icon:n,label:r})}))))},toolBarControls:function(){return null},getLayoutStyle:function(e){var t,n;let{selector:r,layout:o={},style:i,blockName:l,hasBlockGapSupport:a,layoutDefinitions:s}=e;const{contentSize:c,wideSize:u,justifyContent:p}=o,d=Ii(null==i||null===(t=i.spacing)||void 0===t?void 0:t.blockGap);let f="";Uo(l,"spacing","blockGap")||(null!=d&&d.top?f=Ii(null==d?void 0:d.top):"string"==typeof d&&(f=Ii(d)));const m="left"===p?"0 !important":"auto !important",y="right"===p?"0 !important":"auto !important";let g=c||u?`\n\t\t\t\t\t${Kr(r,"> :where(:not(.alignleft):not(.alignright):not(.alignfull))")} {\n\t\t\t\t\t\tmax-width: ${null!=c?c:u};\n\t\t\t\t\t\tmargin-left: ${m};\n\t\t\t\t\t\tmargin-right: ${y};\n\t\t\t\t\t}\n\t\t\t\t\t${Kr(r,"> .alignwide")} {\n\t\t\t\t\t\tmax-width: ${null!=u?u:c};\n\t\t\t\t\t}\n\t\t\t\t\t${Kr(r,"> .alignfull")} {\n\t\t\t\t\t\tmax-width: none;\n\t\t\t\t\t}\n\t\t\t\t`:"";if("left"===p?g+=`${Kr(r,"> :where(:not(.alignleft):not(.alignright):not(.alignfull))")}\n\t\t\t{ margin-left: ${m}; }`:"right"===p&&(g+=`${Kr(r,"> :where(:not(.alignleft):not(.alignright):not(.alignfull))")}\n\t\t\t{ margin-right: ${y}; }`),null!=i&&null!==(n=i.spacing)&&void 0!==n&&n.padding){(0,nl.getCSSRules)(i).forEach((e=>{"paddingRight"===e.key?g+=`\n\t\t\t\t\t${Kr(r,"> .alignfull")} {\n\t\t\t\t\t\tmargin-right: calc(${e.value} * -1);\n\t\t\t\t\t}\n\t\t\t\t\t`:"paddingLeft"===e.key&&(g+=`\n\t\t\t\t\t${Kr(r,"> .alignfull")} {\n\t\t\t\t\t\tmargin-left: calc(${e.value} * -1);\n\t\t\t\t\t}\n\t\t\t\t\t`)}))}return a&&f&&(g+=qr(r,s,"constrained",f)),g},getOrientation(){return"vertical"},getAlignments(e){const t=Jr(e);if(void 0!==e.alignments)return e.alignments.includes("none")||e.alignments.unshift("none"),e.alignments.map((e=>({name:e,info:t[e]})));const{contentSize:n,wideSize:r}=e,o=[{name:"left"},{name:"center"},{name:"right"}];return n&&o.unshift({name:"full"}),r&&o.unshift({name:"wide",info:t.wide}),o.unshift({name:"none",info:t.none}),o}};const ol=[Zi,Ki,rl];function il(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";return ol.find((t=>t.name===e))}const ll={type:"default"},al=(0,u.createContext)(ll),sl=al.Provider;function cl(){return(0,u.useContext)(al)}function ul(e){let{layout:t={},css:n,...r}=e;const o=il(t.type),i=null!==yo("spacing.blockGap");if(o){var l;if(n)return(0,u.createElement)("style",null,n);const e=null===(l=o.getLayoutStyle)||void 0===l?void 0:l.call(o,{hasBlockGapSupport:i,layout:t,...r});if(e)return(0,u.createElement)("style",null,e)}return null}const pl=[],dl=["none","left","center","right","wide","full"],fl=["wide","full"];function ml(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:dl;e.includes("none")||(e=["none",...e]);const{wideControlsEnabled:t=!1,themeSupportsLayout:n,isBlockBasedTheme:r}=(0,m.useSelect)((e=>{const{getSettings:t}=e(xr),n=t();return{wideControlsEnabled:n.alignWide,themeSupportsLayout:n.supportsLayout,isBlockBasedTheme:n.__unstableIsBlockBasedTheme}}),[]),o=cl(),i=il(null==o?void 0:o.type),l=i.getAlignments(o,r);if(n){const t=l.filter((t=>{let{name:n}=t;return e.includes(n)}));return 1===t.length&&"none"===t[0].name?pl:t}if("default"!==i.name&&"constrained"!==i.name)return pl;const{alignments:a=dl}=o,s=e.filter((e=>(o.alignments||t||!fl.includes(e))&&a.includes(e))).map((e=>({name:e})));return 1===s.length&&"none"===s[0].name?pl:s}var yl=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M5 15h14V9H5v6zm0 4.8h14v-1.5H5v1.5zM5 4.2v1.5h14V4.2H5z"}));var gl=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M4 9v6h14V9H4zm8-4.8H4v1.5h8V4.2zM4 19.8h8v-1.5H4v1.5z"}));var hl=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M6 15h14V9H6v6zm6-10.8v1.5h8V4.2h-8zm0 15.6h8v-1.5h-8v1.5z"}));var vl=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M5 4v11h14V4H5zm3 15.8h8v-1.5H8v1.5z"}));const bl={none:{icon:yl,title:(0,_._x)("None","Alignment option")},left:{icon:gl,title:(0,_.__)("Align left")},center:{icon:el,title:(0,_.__)("Align center")},right:{icon:hl,title:(0,_.__)("Align right")},wide:{icon:tl,title:(0,_.__)("Wide width")},full:{icon:vl,title:(0,_.__)("Full width")}},_l={variant:"toolbar"};var kl=function(e){let{value:t,onChange:n,controls:r,isToolbar:o,isCollapsed:i=!0}=e;const l=ml(r);if(!!!l.length)return null;function a(e){n([t,"none"].includes(e)?void 0:e)}const s=bl[t],p=bl.none,f=o?g.ToolbarGroup:g.ToolbarDropdownMenu,m={icon:s?s.icon:p.icon,label:(0,_.__)("Align")},y=o?{isCollapsed:i,controls:l.map((e=>{let{name:n}=e;return{...bl[n],isActive:t===n||!t&&"none"===n,role:i?"menuitemradio":void 0,onClick:()=>a(n)}}))}:{toggleProps:{describedBy:(0,_.__)("Change alignment")},popoverProps:_l,children:e=>{let{onClose:n}=e;return(0,u.createElement)(u.Fragment,null,(0,u.createElement)(g.MenuGroup,{className:"block-editor-block-alignment-control__menu-group"},l.map((e=>{let{name:r,info:o}=e;const{icon:i,title:l}=bl[r],s=r===t||!t&&"none"===r;return(0,u.createElement)(g.MenuItem,{key:r,icon:i,iconPosition:"left",className:d()("components-dropdown-menu__menu-item",{"is-active":s}),isSelected:s,onClick:()=>{a(r),n()},role:"menuitemradio",info:o},l)}))))}};return(0,u.createElement)(f,c({},m,y))};const El=e=>(0,u.createElement)(kl,c({},e,{isToolbar:!1})),Sl=e=>(0,u.createElement)(kl,c({},e,{isToolbar:!0})),wl=["left","center","right","wide","full"],Cl=["wide","full"];function Il(e){let t,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return t=Array.isArray(e)?wl.filter((t=>e.includes(t))):!0===e?[...wl]:[],!r||!0===e&&!n?t.filter((e=>!Cl.includes(e))):t}const Al=(0,f.createHigherOrderComponent)((e=>t=>{const n=(0,u.createElement)(e,t),{name:r}=t,o=ml(Il((0,a.getBlockSupport)(r,"align"),(0,a.hasBlockSupport)(r,"alignWide",!0))).map((e=>{let{name:t}=e;return t})),i=(0,m.useSelect)((e=>e(xr).__unstableGetContentLockingParent(t.clientId)),[t.clientId]);if(!o.length||i)return n;return(0,u.createElement)(u.Fragment,null,(0,u.createElement)(Ur,{group:"block",__experimentalShareWithChildBlocks:!0},(0,u.createElement)(El,{value:t.attributes.align,onChange:e=>{if(!e){var n,r;const o=(0,a.getBlockType)(t.name);(null==o||null===(n=o.attributes)||void 0===n||null===(r=n.align)||void 0===r?void 0:r.default)&&(e="")}t.setAttributes({align:e})},controls:o})),n)}),"withToolbarControls"),xl=(0,f.createHigherOrderComponent)((e=>t=>{const{name:n,attributes:r}=t,{align:o}=r,i=ml(Il((0,a.getBlockSupport)(n,"align"),(0,a.hasBlockSupport)(n,"alignWide",!0)));if(void 0===o)return(0,u.createElement)(e,t);let l=t.wrapperProps;return i.some((e=>e.name===o))&&(l={...l,"data-align":o}),(0,u.createElement)(e,c({},t,{wrapperProps:l}))}));(0,s.addFilter)("blocks.registerBlockType","core/align/addAttribute",(function(e){var t,n;return"type"in(null!==(t=null===(n=e.attributes)||void 0===n?void 0:n.align)&&void 0!==t?t:{})||(0,a.hasBlockSupport)(e,"align")&&(e.attributes={...e.attributes,align:{type:"string",enum:[...wl,""]}}),e})),(0,s.addFilter)("editor.BlockListBlock","core/editor/align/with-data-align",xl),(0,s.addFilter)("editor.BlockEdit","core/editor/align/with-toolbar-controls",Al),(0,s.addFilter)("blocks.getSaveContent.extraProps","core/align/addAssignedAlign",(function(e,t,n){const{align:r}=n;return Il((0,a.getBlockSupport)(t,"align"),(0,a.hasBlockSupport)(t,"alignWide",!0)).includes(r)&&(e.className=d()(`align${r}`,e.className)),e})),(0,s.addFilter)("blocks.registerBlockType","core/lock/addAttribute",(function(e){var t,n;return"type"in(null!==(t=null===(n=e.attributes)||void 0===n?void 0:n.lock)&&void 0!==t?t:{})||(e.attributes={...e.attributes,lock:{type:"object"}}),e}));const Bl=/[\s#]/g,Pl={type:"string",source:"attribute",attribute:"id",selector:"*"};const Tl=(0,f.createHigherOrderComponent)((e=>t=>{if((0,a.hasBlockSupport)(t.name,"anchor")&&t.isSelected){const n="web"===u.Platform.OS,r=(0,u.createElement)(g.TextControl,{__nextHasNoMarginBottom:!0,className:"html-anchor-control",label:(0,_.__)("HTML anchor"),help:(0,u.createElement)(u.Fragment,null,(0,_.__)("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,u.createElement)(g.ExternalLink,{href:(0,_.__)("https://wordpress.org/support/article/page-jumps/")},(0,_.__)("Learn more about anchors"))),value:t.attributes.anchor||"",placeholder:n?null:(0,_.__)("Add an anchor"),onChange:e=>{e=e.replace(Bl,"-"),t.setAttributes({anchor:e})},autoCapitalize:"none",autoComplete:"off"});return(0,u.createElement)(u.Fragment,null,(0,u.createElement)(e,t),n&&(0,u.createElement)(Wo,{group:"advanced"},r),!n&&"core/heading"===t.name&&(0,u.createElement)(Wo,null,(0,u.createElement)(g.PanelBody,{title:(0,_.__)("Heading settings")},r)))}return(0,u.createElement)(e,t)}),"withInspectorControl");(0,s.addFilter)("blocks.registerBlockType","core/anchor/attribute",(function(e){var t,n;return"type"in(null!==(t=null===(n=e.attributes)||void 0===n?void 0:n.anchor)&&void 0!==t?t:{})||(0,a.hasBlockSupport)(e,"anchor")&&(e.attributes={...e.attributes,anchor:Pl}),e})),(0,s.addFilter)("editor.BlockEdit","core/editor/anchor/with-inspector-control",Tl),(0,s.addFilter)("blocks.getSaveContent.extraProps","core/anchor/save-props",(function(e,t,n){return(0,a.hasBlockSupport)(t,"anchor")&&(e.id=""===n.anchor?null:n.anchor),e}));const Ol={type:"string",source:"attribute",attribute:"aria-label",selector:"*"};(0,s.addFilter)("blocks.registerBlockType","core/ariaLabel/attribute",(function(e){var t,n;return null!=e&&null!==(t=e.attributes)&&void 0!==t&&null!==(n=t.ariaLabel)&&void 0!==n&&n.type||(0,a.hasBlockSupport)(e,"ariaLabel")&&(e.attributes={...e.attributes,ariaLabel:Ol}),e})),(0,s.addFilter)("blocks.getSaveContent.extraProps","core/ariaLabel/save-props",(function(e,t,n){return(0,a.hasBlockSupport)(t,"ariaLabel")&&(e["aria-label"]=""===n.ariaLabel?null:n.ariaLabel),e}));const Nl=(0,f.createHigherOrderComponent)((e=>t=>(0,a.hasBlockSupport)(t.name,"customClassName",!0)&&t.isSelected?(0,u.createElement)(u.Fragment,null,(0,u.createElement)(e,t),(0,u.createElement)(Wo,{group:"advanced"},(0,u.createElement)(g.TextControl,{__nextHasNoMarginBottom:!0,autoComplete:"off",label:(0,_.__)("Additional CSS class(es)"),value:t.attributes.className||"",onChange:e=>{t.setAttributes({className:""!==e?e:void 0})},help:(0,_.__)("Separate multiple classes with spaces.")}))):(0,u.createElement)(e,t)),"withInspectorControl");(0,s.addFilter)("blocks.registerBlockType","core/custom-class-name/attribute",(function(e){return(0,a.hasBlockSupport)(e,"customClassName",!0)&&(e.attributes={...e.attributes,className:{type:"string"}}),e})),(0,s.addFilter)("editor.BlockEdit","core/editor/custom-class-name/with-inspector-control",Nl),(0,s.addFilter)("blocks.getSaveContent.extraProps","core/custom-class-name/save-props",(function(e,t,n){return(0,a.hasBlockSupport)(t,"customClassName",!0)&&n.className&&(e.className=d()(e.className,n.className)),e})),(0,s.addFilter)("blocks.switchToBlockType.transformedBlock","core/color/addTransforms",(function(e,t,n,r){if(!(0,a.hasBlockSupport)(e.name,"customClassName",!0))return e;if(1===r.length&&e.innerBlocks.length===t.length)return e;if(1===r.length&&t.length>1||r.length>1&&1===t.length)return e;if(t[n]){var o;const r=null===(o=t[n])||void 0===o?void 0:o.attributes.className;if(r)return{...e,attributes:{...e.attributes,className:r}}}return e})),(0,s.addFilter)("blocks.getSaveContent.extraProps","core/generated-class-name/save-props",(function(e,t){return(0,a.hasBlockSupport)(t,"className",!0)&&("string"==typeof e.className?e.className=[...new Set([(0,a.getBlockDefaultClassName)(t.name),...e.className.split(" ")])].join(" ").trim():e.className=(0,a.getBlockDefaultClassName)(t.name)),e}));var Ml=window.wp.dom;const Rl=(0,u.createContext)({});function Fl(e){let{value:t,children:n}=e;const r=(0,u.useContext)(Rl),o=(0,u.useMemo)((()=>({...r,...t})),[r,t]);return(0,u.createElement)(Rl.Provider,{value:o,children:n})}var Ll=Rl;const Dl={};var Ul=(0,g.withFilters)("editor.BlockEdit")((e=>{const{attributes:t={},name:n}=e,r=(0,a.getBlockType)(n),o=(0,u.useContext)(Ll),i=(0,u.useMemo)((()=>r&&r.usesContext?Object.fromEntries(Object.entries(o).filter((e=>{let[t]=e;return r.usesContext.includes(t)}))):Dl),[r,o]);if(!r)return null;const l=r.edit||r.save;if(r.apiVersion>1)return(0,u.createElement)(l,c({},e,{context:i}));const s=(0,a.hasBlockSupport)(r,"className",!0)?(0,a.getBlockDefaultClassName)(n):null,p=d()(s,t.className,e.className);return(0,u.createElement)(l,c({},e,{context:i,className:p}))}));function jl(e){const{name:t,isSelected:n,clientId:r,attributes:o={},__unstableLayoutClassNames:i}=e,{layout:l=null}=o,s={name:t,isSelected:n,clientId:r,layout:(0,a.hasBlockSupport)(t,"__experimentalLayout",!1)?l:null,__unstableLayoutClassNames:i};return(0,u.createElement)(Or,{value:(0,u.useMemo)((()=>s),Object.values(s))},(0,u.createElement)(Ul,e))}var zl=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M11 13h2v-2h-2v2zm-6 0h2v-2H5v2zm12-2v2h2v-2h-2z"}));var Vl=function(e){let{className:t,actions:n,children:r,secondaryActions:o}=e;return(0,u.createElement)("div",{style:{display:"contents",all:"initial"}},(0,u.createElement)("div",{className:d()(t,"block-editor-warning")},(0,u.createElement)("div",{className:"block-editor-warning__contents"},(0,u.createElement)("p",{className:"block-editor-warning__message"},r),(u.Children.count(n)>0||o)&&(0,u.createElement)("div",{className:"block-editor-warning__actions"},u.Children.count(n)>0&&u.Children.map(n,((e,t)=>(0,u.createElement)("span",{key:t,className:"block-editor-warning__action"},e))),o&&(0,u.createElement)(g.DropdownMenu,{className:"block-editor-warning__secondary",icon:zl,label:(0,_.__)("More options"),popoverProps:{position:"bottom left",className:"block-editor-warning__dropdown"},noIcons:!0},(()=>(0,u.createElement)(g.MenuGroup,null,o.map(((e,t)=>(0,u.createElement)(g.MenuItem,{onClick:e.onClick,key:t},e.title))))))))))},Gl=n(1973);function Hl(e){let{title:t,rawContent:n,renderedContent:r,action:o,actionText:i,className:l}=e;return(0,u.createElement)("div",{className:l},(0,u.createElement)("div",{className:"block-editor-block-compare__content"},(0,u.createElement)("h2",{className:"block-editor-block-compare__heading"},t),(0,u.createElement)("div",{className:"block-editor-block-compare__html"},n),(0,u.createElement)("div",{className:"block-editor-block-compare__preview edit-post-visual-editor"},(0,u.createElement)(u.RawHTML,null,(0,Ml.safeHTML)(r)))),(0,u.createElement)("div",{className:"block-editor-block-compare__action"},(0,u.createElement)(g.Button,{variant:"secondary",tabIndex:"0",onClick:o},i)))}var Wl=function(e){let{block:t,onKeep:n,onConvert:r,convertor:o,convertButtonText:i}=e;const l=(s=o(t),(Array.isArray(s)?s:[s]).map((e=>(0,a.getSaveContent)(e.name,e.attributes,e.innerBlocks))).join(""));var s;const c=(p=t.originalContent,f=l,(0,Gl.Kx)(p,f).map(((e,t)=>{const n=d()({"block-editor-block-compare__added":e.added,"block-editor-block-compare__removed":e.removed});return(0,u.createElement)("span",{key:t,className:n},e.value)})));var p,f;return(0,u.createElement)("div",{className:"block-editor-block-compare__wrapper"},(0,u.createElement)(Hl,{title:(0,_.__)("Current"),className:"block-editor-block-compare__current",action:n,actionText:(0,_.__)("Convert to HTML"),rawContent:t.originalContent,renderedContent:t.originalContent}),(0,u.createElement)(Hl,{title:(0,_.__)("After Conversion"),className:"block-editor-block-compare__converted",action:r,actionText:i,rawContent:c,renderedContent:l}))};const $l=e=>(0,a.rawHandler)({HTML:e.originalContent});var Kl=(0,f.compose)([(0,m.withSelect)(((e,t)=>{let{clientId:n}=t;return{block:e(xr).getBlock(n)}})),(0,m.withDispatch)(((e,t)=>{let{block:n}=t;const{replaceBlock:r}=e(xr);return{convertToClassic(){r(n.clientId,(e=>(0,a.createBlock)("core/freeform",{content:e.originalContent}))(n))},convertToHTML(){r(n.clientId,(e=>(0,a.createBlock)("core/html",{content:e.originalContent}))(n))},convertToBlocks(){r(n.clientId,$l(n))},attemptBlockRecovery(){r(n.clientId,(e=>{let{name:t,attributes:n,innerBlocks:r}=e;return(0,a.createBlock)(t,n,r)})(n))}}}))])((function(e){let{convertToHTML:t,convertToBlocks:n,convertToClassic:r,attemptBlockRecovery:o,block:i}=e;const l=!!(0,a.getBlockType)("core/html"),s=!!(0,a.getBlockType)("core/freeform"),[c,p]=(0,u.useState)(!1),d=(0,u.useCallback)((()=>p(!0)),[]),f=(0,u.useCallback)((()=>p(!1)),[]),m=(0,u.useMemo)((()=>[{title:(0,_._x)("Resolve","imperative verb"),onClick:d},l&&{title:(0,_.__)("Convert to HTML"),onClick:t},s&&{title:(0,_.__)("Convert to Classic Block"),onClick:r}].filter(Boolean)),[d,l,t,s,r]);return(0,u.createElement)(u.Fragment,null,(0,u.createElement)(Vl,{actions:[(0,u.createElement)(g.Button,{key:"recover",onClick:o,variant:"primary"},(0,_.__)("Attempt Block Recovery"))],secondaryActions:m},(0,_.__)("This block contains unexpected or invalid content.")),c&&(0,u.createElement)(g.Modal,{title:(0,_.__)("Resolve Block"),onRequestClose:f,className:"block-editor-block-compare"},(0,u.createElement)(Wl,{block:i,onKeep:t,onConvert:n,convertor:$l,convertButtonText:(0,_.__)("Convert to Blocks")})))}));const ql=(0,u.createElement)(Vl,{className:"block-editor-block-list__block-crash-warning"},(0,_.__)("This block has encountered an error and cannot be previewed."));var Jl=()=>ql;class Yl extends u.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 Ql=Yl,Zl=n(773);var Xl=function(e){let{clientId:t}=e;const[n,r]=(0,u.useState)(""),o=(0,m.useSelect)((e=>e(xr).getBlock(t)),[t]),{updateBlock:i}=(0,m.useDispatch)(xr);return(0,u.useEffect)((()=>{r((0,a.getBlockContent)(o))}),[o]),(0,u.createElement)(Zl.Z,{className:"block-editor-block-list__block-html-textarea",value:n,onBlur:()=>{const e=(0,a.getBlockType)(o.name);if(!e)return;const l=(0,a.getBlockAttributes)(e,n,o.attributes),s=n||(0,a.getSaveContent)(e,l),[c]=n?(0,a.validateBlock)({...o,attributes:l,originalContent:s}):[!0];i(t,{attributes:l,originalContent:s,isValid:c}),n||r({content:s})},onChange:e=>r(e.target.value)})},ea=n(9196),ta=n.n(ea),na=Object.defineProperty,ra={};((e,t)=>{for(var n in t)na(e,n,{get:t[n],enumerable:!0})})(ra,{assign:()=>Fa,colors:()=>Na,createStringInterpolator:()=>Ba,skipAnimation:()=>Ma,to:()=>Pa,willAdvance:()=>Ra});var oa=_a(),ia=e=>ga(e,oa),la=_a();ia.write=e=>ga(e,la);var aa=_a();ia.onStart=e=>ga(e,aa);var sa=_a();ia.onFrame=e=>ga(e,sa);var ca=_a();ia.onFinish=e=>ga(e,ca);var ua=[];ia.setTimeout=(e,t)=>{const n=ia.now()+t,r=()=>{const e=ua.findIndex((e=>e.cancel==r));~e&&ua.splice(e,1),ma-=~e?1:0},o={time:n,handler:e,cancel:r};return ua.splice(pa(n),0,o),ma+=1,ha(),o};var pa=e=>~(~ua.findIndex((t=>t.time>e))||~ua.length);ia.cancel=e=>{aa.delete(e),sa.delete(e),ca.delete(e),oa.delete(e),la.delete(e)},ia.sync=e=>{ya=!0,ia.batchedUpdates(e),ya=!1},ia.throttle=e=>{let t;function n(){try{e(...t)}finally{t=null}}function r(...e){t=e,ia.onStart(n)}return r.handler=e,r.cancel=()=>{aa.delete(n),t=null},r};var da="undefined"!=typeof window?window.requestAnimationFrame:()=>{};ia.use=e=>da=e,ia.now="undefined"!=typeof performance?()=>performance.now():Date.now,ia.batchedUpdates=e=>e(),ia.catch=console.error,ia.frameLoop="always",ia.advance=()=>{"demand"!==ia.frameLoop?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):ba()};var fa=-1,ma=0,ya=!1;function ga(e,t){ya?(t.delete(e),e(0)):(t.add(e),ha())}function ha(){fa<0&&(fa=0,"demand"!==ia.frameLoop&&da(va))}function va(){~fa&&(da(va),ia.batchedUpdates(ba))}function ba(){const e=fa;fa=ia.now();const t=pa(fa);t&&(ka(ua.splice(0,t),(e=>e.handler())),ma-=t),ma?(aa.flush(),oa.flush(e?Math.min(64,fa-e):16.667),sa.flush(),la.flush(),ca.flush()):fa=-1}function _a(){let e=new Set,t=e;return{add(n){ma+=t!=e||e.has(n)?0:1,e.add(n)},delete(n){return ma-=t==e&&e.has(n)?1:0,e.delete(n)},flush(n){t.size&&(e=new Set,ma-=t.size,ka(t,(t=>t(n)&&e.add(t))),ma+=e.size,t=e)}}}function ka(e,t){e.forEach((e=>{try{t(e)}catch(e){ia.catch(e)}}))}function Ea(){}var Sa={arr:Array.isArray,obj:e=>!!e&&"Object"===e.constructor.name,fun:e=>"function"==typeof e,str:e=>"string"==typeof e,num:e=>"number"==typeof e,und:e=>void 0===e};function wa(e,t){if(Sa.arr(e)){if(!Sa.arr(t)||e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}return e===t}var Ca=(e,t)=>e.forEach(t);function Ia(e,t,n){if(Sa.arr(e))for(let r=0;r<e.length;r++)t.call(n,e[r],`${r}`);else for(const r in e)e.hasOwnProperty(r)&&t.call(n,e[r],r)}var Aa=e=>Sa.und(e)?[]:Sa.arr(e)?e:[e];function xa(e,t){if(e.size){const n=Array.from(e);e.clear(),Ca(n,t)}}var Ba,Pa,Ta=(e,...t)=>xa(e,(e=>e(...t))),Oa=()=>"undefined"==typeof window||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),Na=null,Ma=!1,Ra=Ea,Fa=e=>{e.to&&(Pa=e.to),e.now&&(ia.now=e.now),void 0!==e.colors&&(Na=e.colors),null!=e.skipAnimation&&(Ma=e.skipAnimation),e.createStringInterpolator&&(Ba=e.createStringInterpolator),e.requestAnimationFrame&&ia.use(e.requestAnimationFrame),e.batchedUpdates&&(ia.batchedUpdates=e.batchedUpdates),e.willAdvance&&(Ra=e.willAdvance),e.frameLoop&&(ia.frameLoop=e.frameLoop)},La=new Set,Da=[],Ua=[],ja=0,za={get idle(){return!La.size&&!Da.length},start(e){ja>e.priority?(La.add(e),ia.onStart(Va)):(Ga(e),ia(Wa))},advance:Wa,sort(e){if(ja)ia.onFrame((()=>za.sort(e)));else{const t=Da.indexOf(e);~t&&(Da.splice(t,1),Ha(e))}},clear(){Da=[],La.clear()}};function Va(){La.forEach(Ga),La.clear(),ia(Wa)}function Ga(e){Da.includes(e)||Ha(e)}function Ha(e){Da.splice(function(e,t){const n=e.findIndex(t);return n<0?e.length:n}(Da,(t=>t.priority>e.priority)),0,e)}function Wa(e){const t=Ua;for(let n=0;n<Da.length;n++){const r=Da[n];ja=r.priority,r.idle||(Ra(r),r.advance(e),r.idle||t.push(r))}return ja=0,(Ua=Da).length=0,(Da=t).length>0}var $a="[-+]?\\d*\\.?\\d+",Ka=$a+"%";function qa(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var Ja=new RegExp("rgb"+qa($a,$a,$a)),Ya=new RegExp("rgba"+qa($a,$a,$a,$a)),Qa=new RegExp("hsl"+qa($a,Ka,Ka)),Za=new RegExp("hsla"+qa($a,Ka,Ka,$a)),Xa=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,es=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,ts=/^#([0-9a-fA-F]{6})$/,ns=/^#([0-9a-fA-F]{8})$/;function rs(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 os(e,t,n){const r=n<.5?n*(1+t):n+t-n*t,o=2*n-r,i=rs(o,r,e+1/3),l=rs(o,r,e),a=rs(o,r,e-1/3);return Math.round(255*i)<<24|Math.round(255*l)<<16|Math.round(255*a)<<8}function is(e){const t=parseInt(e,10);return t<0?0:t>255?255:t}function ls(e){return(parseFloat(e)%360+360)%360/360}function as(e){const t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function ss(e){const t=parseFloat(e);return t<0?0:t>100?1:t/100}function cs(e){let t=function(e){let t;return"number"==typeof e?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=ts.exec(e))?parseInt(t[1]+"ff",16)>>>0:Na&&void 0!==Na[e]?Na[e]:(t=Ja.exec(e))?(is(t[1])<<24|is(t[2])<<16|is(t[3])<<8|255)>>>0:(t=Ya.exec(e))?(is(t[1])<<24|is(t[2])<<16|is(t[3])<<8|as(t[4]))>>>0:(t=Xa.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=ns.exec(e))?parseInt(t[1],16)>>>0:(t=es.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=Qa.exec(e))?(255|os(ls(t[1]),ss(t[2]),ss(t[3])))>>>0:(t=Za.exec(e))?(os(ls(t[1]),ss(t[2]),ss(t[3]))|as(t[4]))>>>0:null}(e);if(null===t)return e;t=t||0;return`rgba(${(4278190080&t)>>>24}, ${(16711680&t)>>>16}, ${(65280&t)>>>8}, ${(255&t)/255})`}var us=(e,t,n)=>{if(Sa.fun(e))return e;if(Sa.arr(e))return us({range:e,output:t,extrapolate:n});if(Sa.str(e.output[0]))return Ba(e);const r=e,o=r.output,i=r.range||[0,1],l=r.extrapolateLeft||r.extrapolate||"extend",a=r.extrapolateRight||r.extrapolate||"extend",s=r.easing||(e=>e);return e=>{const 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,l,a,s){let c=s?s(e):e;if(c<t){if("identity"===l)return c;"clamp"===l&&(c=t)}if(c>n){if("identity"===a)return c;"clamp"===a&&(c=n)}if(r===o)return r;if(t===n)return 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;return c}(e,i[t],i[t+1],o[t],o[t+1],s,l,a,r.map)}};var ps=1.70158,ds=1.525*ps,fs=ps+1,ms=2*Math.PI/3,ys=2*Math.PI/4.5,gs=e=>{const t=7.5625,n=2.75;return e<1/n?t*e*e:e<2/n?t*(e-=1.5/n)*e+.75:e<2.5/n?t*(e-=2.25/n)*e+.9375:t*(e-=2.625/n)*e+.984375},hs={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>1-(1-e)*(1-e),easeInOutQuad:e=>e<.5?2*e*e:1-Math.pow(-2*e+2,2)/2,easeInCubic:e=>e*e*e,easeOutCubic:e=>1-Math.pow(1-e,3),easeInOutCubic:e=>e<.5?4*e*e*e:1-Math.pow(-2*e+2,3)/2,easeInQuart:e=>e*e*e*e,easeOutQuart:e=>1-Math.pow(1-e,4),easeInOutQuart:e=>e<.5?8*e*e*e*e:1-Math.pow(-2*e+2,4)/2,easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>1-Math.pow(1-e,5),easeInOutQuint:e=>e<.5?16*e*e*e*e*e:1-Math.pow(-2*e+2,5)/2,easeInSine:e=>1-Math.cos(e*Math.PI/2),easeOutSine:e=>Math.sin(e*Math.PI/2),easeInOutSine:e=>-(Math.cos(Math.PI*e)-1)/2,easeInExpo:e=>0===e?0:Math.pow(2,10*e-10),easeOutExpo:e=>1===e?1:1-Math.pow(2,-10*e),easeInOutExpo:e=>0===e?0:1===e?1:e<.5?Math.pow(2,20*e-10)/2:(2-Math.pow(2,-20*e+10))/2,easeInCirc:e=>1-Math.sqrt(1-Math.pow(e,2)),easeOutCirc:e=>Math.sqrt(1-Math.pow(e-1,2)),easeInOutCirc:e=>e<.5?(1-Math.sqrt(1-Math.pow(2*e,2)))/2:(Math.sqrt(1-Math.pow(-2*e+2,2))+1)/2,easeInBack:e=>fs*e*e*e-ps*e*e,easeOutBack:e=>1+fs*Math.pow(e-1,3)+ps*Math.pow(e-1,2),easeInOutBack:e=>e<.5?Math.pow(2*e,2)*(7.189819*e-ds)/2:(Math.pow(2*e-2,2)*((ds+1)*(2*e-2)+ds)+2)/2,easeInElastic:e=>0===e?0:1===e?1:-Math.pow(2,10*e-10)*Math.sin((10*e-10.75)*ms),easeOutElastic:e=>0===e?0:1===e?1:Math.pow(2,-10*e)*Math.sin((10*e-.75)*ms)+1,easeInOutElastic:e=>0===e?0:1===e?1:e<.5?-Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*ys)/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*ys)/2+1,easeInBounce:e=>1-gs(1-e),easeOutBounce:gs,easeInOutBounce:e=>e<.5?(1-gs(1-2*e))/2:(1+gs(2*e-1))/2,steps:(e,t="end")=>n=>{const r=(n="end"===t?Math.min(n,.999):Math.max(n,.001))*e;return((e,t,n)=>Math.min(Math.max(n,e),t))(0,1,("end"===t?Math.floor(r):Math.ceil(r))/e)}},vs=Symbol.for("FluidValue.get"),bs=Symbol.for("FluidValue.observers"),_s=e=>Boolean(e&&e[vs]),ks=e=>e&&e[vs]?e[vs]():e,Es=e=>e[bs]||null;function Ss(e,t){const n=e[bs];n&&n.forEach((e=>{!function(e,t){e.eventObserved?e.eventObserved(t):e(t)}(e,t)}))}var ws=class{constructor(e){if(!e&&!(e=this.get))throw Error("Unknown getter");Cs(this,e)}},Cs=(e,t)=>Bs(e,vs,t);function Is(e,t){if(e[vs]){let n=e[bs];n||Bs(e,bs,n=new Set),n.has(t)||(n.add(t),e.observerAdded&&e.observerAdded(n.size,t))}return t}function As(e,t){const n=e[bs];if(n&&n.has(t)){const r=n.size-1;r?n.delete(t):e[bs]=null,e.observerRemoved&&e.observerRemoved(r,t)}}var xs,Bs=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),Ps=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,Ts=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,Os=new RegExp(`(${Ps.source})(%|[a-z]+)`,"i"),Ns=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,Ms=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,Rs=e=>{const[t,n]=Fs(e);if(!t||Oa())return e;const r=window.getComputedStyle(document.documentElement).getPropertyValue(t);if(r)return r.trim();if(n&&n.startsWith("--")){const t=window.getComputedStyle(document.documentElement).getPropertyValue(n);return t||e}return n&&Ms.test(n)?Rs(n):n||e},Fs=e=>{const t=Ms.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]},Ls=(e,t,n,r,o)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(r)}, ${o})`,Ds=e=>{xs||(xs=Na?new RegExp(`(${Object.keys(Na).join("|")})(?!\\w)`,"g"):/^\b$/);const t=e.output.map((e=>ks(e).replace(Ms,Rs).replace(Ts,cs).replace(xs,cs))),n=t.map((e=>e.match(Ps).map(Number))),r=n[0].map(((e,t)=>n.map((e=>{if(!(t in e))throw Error('The arity of each "output" value must be equal');return e[t]})))),o=r.map((t=>us({...e,output:t})));return e=>{const n=!Os.test(t[0])&&t.find((e=>Os.test(e)))?.replace(Ps,"");let r=0;return t[0].replace(Ps,(()=>`${o[r++](e)}${n||""}`)).replace(Ns,Ls)}},Us="react-spring: ",js=e=>{const t=e;let n=!1;if("function"!=typeof t)throw new TypeError(`${Us}once requires a function parameter`);return(...e)=>{n||(t(...e),n=!0)}},zs=js(console.warn);var Vs=js(console.warn);function Gs(e){return Sa.str(e)&&("#"==e[0]||/\d/.test(e)||!Oa()&&Ms.test(e)||e in(Na||{}))}var Hs=Oa()?ea.useEffect:ea.useLayoutEffect;function Ws(){const e=(0,ea.useState)()[1],t=(()=>{const e=(0,ea.useRef)(!1);return Hs((()=>(e.current=!0,()=>{e.current=!1})),[]),e})();return()=>{t.current&&e(Math.random())}}var $s=e=>(0,ea.useEffect)(e,Ks),Ks=[];function qs(e){const t=(0,ea.useRef)();return(0,ea.useEffect)((()=>{t.current=e})),t.current}var Js=Symbol.for("Animated:node"),Ys=e=>e&&e[Js],Qs=(e,t)=>{return n=e,r=Js,o=t,Object.defineProperty(n,r,{value:o,writable:!0,configurable:!0});var n,r,o},Zs=e=>e&&e[Js]&&e[Js].getPayload(),Xs=class{constructor(){Qs(this,this)}getPayload(){return this.payload||[]}},ec=class extends Xs{constructor(e){super(),this._value=e,this.done=!0,this.durationProgress=0,Sa.num(this._value)&&(this.lastPosition=this._value)}static create(e){return new ec(e)}getPayload(){return[this]}getValue(){return this._value}setValue(e,t){return Sa.num(e)&&(this.lastPosition=e,t&&(e=Math.round(e/t)*t,this.done&&(this.lastPosition=e))),this._value!==e&&(this._value=e,!0)}reset(){const{done:e}=this;this.done=!1,Sa.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,e&&(this.lastVelocity=null),this.v0=null)}},tc=class extends ec{constructor(e){super(0),this._string=null,this._toString=us({output:[e,e]})}static create(e){return new tc(e)}getValue(){const e=this._string;return null==e?this._string=this._toString(this._value):e}setValue(e){if(Sa.str(e)){if(e==this._string)return!1;this._string=e,this._value=1}else{if(!super.setValue(e))return!1;this._string=null}return!0}reset(e){e&&(this._toString=us({output:[this.getValue(),e]})),this._value=0,super.reset()}},nc={dependencies:null},rc=class extends Xs{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){const t={};return Ia(this.source,((n,r)=>{var o;(o=n)&&o[Js]===o?t[r]=n.getValue(e):_s(n)?t[r]=ks(n):e||(t[r]=n)})),t}setValue(e){this.source=e,this.payload=this._makePayload(e)}reset(){this.payload&&Ca(this.payload,(e=>e.reset()))}_makePayload(e){if(e){const t=new Set;return Ia(e,this._addToPayload,t),Array.from(t)}}_addToPayload(e){nc.dependencies&&_s(e)&&nc.dependencies.add(e);const t=Zs(e);t&&Ca(t,(e=>this.add(e)))}},oc=class extends rc{constructor(e){super(e)}static create(e){return new oc(e)}getValue(){return this.source.map((e=>e.getValue()))}setValue(e){const t=this.getPayload();return e.length==t.length?t.map(((t,n)=>t.setValue(e[n]))).some(Boolean):(super.setValue(e.map(ic)),!0)}};function ic(e){return(Gs(e)?tc:ec).create(e)}function lc(e){const t=Ys(e);return t?t.constructor:Sa.arr(e)?oc:Gs(e)?tc:ec}var ac=(e,t)=>{const n=!Sa.fun(e)||e.prototype&&e.prototype.isReactComponent;return(0,ea.forwardRef)(((r,o)=>{const i=(0,ea.useRef)(null),l=n&&(0,ea.useCallback)((e=>{i.current=function(e,t){e&&(Sa.fun(e)?e(t):e.current=t);return t}(o,e)}),[o]),[a,s]=function(e,t){const n=new Set;nc.dependencies=n,e.style&&(e={...e,style:t.createAnimatedStyle(e.style)});return e=new rc(e),nc.dependencies=null,[e,n]}(r,t),c=Ws(),u=()=>{const e=i.current;if(n&&!e)return;!1===(!!e&&t.applyAnimatedValues(e,a.getValue(!0)))&&c()},p=new sc(u,s),d=(0,ea.useRef)();Hs((()=>(d.current=p,Ca(s,(e=>Is(e,p))),()=>{d.current&&(Ca(d.current.deps,(e=>As(e,d.current))),ia.cancel(d.current.update))}))),(0,ea.useEffect)(u,[]),$s((()=>()=>{const e=d.current;Ca(e.deps,(t=>As(t,e)))}));const f=t.getComponentProps(a.getValue());return ea.createElement(e,{...f,ref:l})}))},sc=class{constructor(e,t){this.update=e,this.deps=t}eventObserved(e){"change"==e.type&&ia.write(this.update)}};var cc=Symbol.for("AnimatedComponent"),uc=e=>Sa.str(e)?e:e&&Sa.str(e.displayName)?e.displayName:Sa.fun(e)&&e.name||null;function pc(e,...t){return Sa.fun(e)?e(...t):e}var dc=(e,t)=>!0===e||!!(t&&e&&(Sa.fun(e)?e(t):Aa(e).includes(t))),fc=(e,t)=>Sa.obj(e)?t&&e[t]:e,mc=(e,t)=>!0===e.default?e[t]:e.default?e.default[t]:void 0,yc=e=>e,gc=(e,t=yc)=>{let n=hc;e.default&&!0!==e.default&&(e=e.default,n=Object.keys(e));const r={};for(const o of n){const n=t(e[o],o);Sa.und(n)||(r[o]=n)}return r},hc=["config","onProps","onStart","onChange","onPause","onResume","onRest"],vc={config:1,from:1,to:1,ref:1,loop:1,reset:1,pause:1,cancel:1,reverse:1,immediate:1,default:1,delay:1,onProps:1,onStart:1,onChange:1,onPause:1,onResume:1,onRest:1,onResolve:1,items:1,trail:1,sort:1,expires:1,initial:1,enter:1,update:1,leave:1,children:1,onDestroyed:1,keys:1,callId:1,parentId:1};function bc(e){const t=function(e){const t={};let n=0;if(Ia(e,((e,r)=>{vc[r]||(t[r]=e,n++)})),n)return t}(e);if(t){const n={to:t};return Ia(e,((e,r)=>r in t||(n[r]=e))),n}return{...e}}function _c(e){return e=ks(e),Sa.arr(e)?e.map(_c):Gs(e)?ra.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function kc(e){for(const t in e)return!0;return!1}function Ec(e){return Sa.fun(e)||Sa.arr(e)&&Sa.obj(e[0])}function Sc(e,t){e.ref?.delete(e),t?.delete(e)}function wc(e,t){t&&e.ref!==t&&(e.ref?.delete(e),t.add(e),e.ref=t)}var Cc={tension:170,friction:26,mass:1,damping:1,easing:hs.linear,clamp:!1};function Ic(e,t){if(Sa.und(t.decay)){const n=!Sa.und(t.tension)||!Sa.und(t.friction);!n&&Sa.und(t.frequency)&&Sa.und(t.damping)&&Sa.und(t.mass)||(e.duration=void 0,e.decay=void 0),n&&(e.frequency=void 0)}else e.duration=void 0}var Ac=[];function xc(e,{key:t,props:n,defaultProps:r,state:o,actions:i}){return new Promise(((l,a)=>{let s,c,u=dc(n.cancel??r?.cancel,t);if(u)f();else{Sa.und(n.pause)||(o.paused=dc(n.pause,t));let e=r?.pause;!0!==e&&(e=o.paused||dc(e,t)),s=pc(n.delay||0,t),e?(o.resumeQueue.add(d),i.pause()):(i.resume(),d())}function p(){o.resumeQueue.add(d),o.timeouts.delete(c),c.cancel(),s=c.time-ia.now()}function d(){s>0&&!ra.skipAnimation?(o.delayed=!0,c=ia.setTimeout(f,s),o.pauseQueue.add(p),o.timeouts.add(c)):f()}function f(){o.delayed&&(o.delayed=!1),o.pauseQueue.delete(p),o.timeouts.delete(c),e<=(o.cancelId||0)&&(u=!0);try{i.start({...n,callId:e,cancel:u},l)}catch(e){a(e)}}}))}var Bc=(e,t)=>1==t.length?t[0]:t.some((e=>e.cancelled))?Oc(e.get()):t.every((e=>e.noop))?Pc(e.get()):Tc(e.get(),t.every((e=>e.finished))),Pc=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),Tc=(e,t,n=!1)=>({value:e,finished:t,cancelled:n}),Oc=e=>({value:e,cancelled:!0,finished:!1});function Nc(e,t,n,r){const{callId:o,parentId:i,onRest:l}=t,{asyncTo:a,promise:s}=n;return i||e!==a||t.reset?n.promise=(async()=>{n.asyncId=o,n.asyncTo=e;const c=gc(t,((e,t)=>"onRest"===t?void 0:e));let u,p;const d=new Promise(((e,t)=>(u=e,p=t))),f=e=>{const t=o<=(n.cancelId||0)&&Oc(r)||o!==n.asyncId&&Tc(r,!1);if(t)throw e.result=t,p(e),e},m=(e,t)=>{const i=new Rc,l=new Fc;return(async()=>{if(ra.skipAnimation)throw Mc(n),l.result=Tc(r,!1),p(l),l;f(i);const a=Sa.obj(e)?{...e}:{...t,to:e};a.parentId=o,Ia(c,((e,t)=>{Sa.und(a[t])&&(a[t]=e)}));const s=await r.start(a);return f(i),n.paused&&await new Promise((e=>{n.resumeQueue.add(e)})),s})()};let y;if(ra.skipAnimation)return Mc(n),Tc(r,!1);try{let t;t=Sa.arr(e)?(async e=>{for(const t of e)await m(t)})(e):Promise.resolve(e(m,r.stop.bind(r))),await Promise.all([t.then(u),d]),y=Tc(r.get(),!0,!1)}catch(e){if(e instanceof Rc)y=e.result;else{if(!(e instanceof Fc))throw e;y=e.result}}finally{o==n.asyncId&&(n.asyncId=i,n.asyncTo=i?a:void 0,n.promise=i?s:void 0)}return Sa.fun(l)&&ia.batchedUpdates((()=>{l(y,r,r.item)})),y})():s}function Mc(e,t){xa(e.timeouts,(e=>e.cancel())),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}var Rc=class extends Error{constructor(){super("An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise.")}},Fc=class extends Error{constructor(){super("SkipAnimationSignal")}},Lc=e=>e instanceof Uc,Dc=1,Uc=class extends ws{constructor(){super(...arguments),this.id=Dc++,this._priority=0}get priority(){return this._priority}set priority(e){this._priority!=e&&(this._priority=e,this._onPriorityChange(e))}get(){const e=Ys(this);return e&&e.getValue()}to(...e){return ra.to(this,e)}interpolate(...e){return zs(`${Us}The "interpolate" function is deprecated in v9 (use "to" instead)`),ra.to(this,e)}toJSON(){return this.get()}observerAdded(e){1==e&&this._attach()}observerRemoved(e){0==e&&this._detach()}_attach(){}_detach(){}_onChange(e,t=!1){Ss(this,{type:"change",parent:this,value:e,idle:t})}_onPriorityChange(e){this.idle||za.sort(this),Ss(this,{type:"priority",parent:this,priority:e})}},jc=Symbol.for("SpringPhase"),zc=e=>(1&e[jc])>0,Vc=e=>(2&e[jc])>0,Gc=e=>(4&e[jc])>0,Hc=(e,t)=>t?e[jc]|=3:e[jc]&=-3,Wc=(e,t)=>t?e[jc]|=4:e[jc]&=-5,$c=class extends Uc{constructor(e,t){if(super(),this.animation=new class{constructor(){this.changed=!1,this.values=Ac,this.toValues=null,this.fromValues=Ac,this.config=new class{constructor(){this.velocity=0,Object.assign(this,Cc)}},this.immediate=!1}},this.defaultProps={},this._state={paused:!1,delayed:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._pendingCalls=new Set,this._lastCallId=0,this._lastToId=0,this._memoizedDuration=0,!Sa.und(e)||!Sa.und(t)){const n=Sa.obj(e)?{...e}:{...t,from:e};Sa.und(n.default)&&(n.default=!0),this.start(n)}}get idle(){return!(Vc(this)||this._state.asyncTo)||Gc(this)}get goal(){return ks(this.animation.to)}get velocity(){const e=Ys(this);return e instanceof ec?e.lastVelocity||0:e.getPayload().map((e=>e.lastVelocity||0))}get hasAnimated(){return zc(this)}get isAnimating(){return Vc(this)}get isPaused(){return Gc(this)}get isDelayed(){return this._state.delayed}advance(e){let t=!0,n=!1;const r=this.animation;let{toValues:o}=r;const{config:i}=r,l=Zs(r.to);!l&&_s(r.to)&&(o=Aa(ks(r.to))),r.values.forEach(((a,s)=>{if(a.done)return;const c=a.constructor==tc?1:l?l[s].lastPosition:o[s];let u=r.immediate,p=c;if(!u){if(p=a.lastPosition,i.tension<=0)return void(a.done=!0);let t=a.elapsedTime+=e;const n=r.fromValues[s],o=null!=a.v0?a.v0:a.v0=Sa.arr(i.velocity)?i.velocity[s]:i.velocity;let l;const d=i.precision||(n==c?.005:Math.min(1,.001*Math.abs(c-n)));if(Sa.und(i.duration))if(i.decay){const e=!0===i.decay?.998:i.decay,r=Math.exp(-(1-e)*t);p=n+o/(1-e)*(1-r),u=Math.abs(a.lastPosition-p)<=d,l=o*r}else{l=null==a.lastVelocity?o:a.lastVelocity;const t=i.restVelocity||d/10,r=i.clamp?0:i.bounce,s=!Sa.und(r),f=n==c?a.v0>0:n<c;let m,y=!1;const g=1,h=Math.ceil(e/g);for(let e=0;e<h&&(m=Math.abs(l)>t,m||(u=Math.abs(c-p)<=d,!u));++e){s&&(y=p==c||p>c==f,y&&(l=-l*r,p=c));l+=(1e-6*-i.tension*(p-c)+.001*-i.friction*l)/i.mass*g,p+=l*g}}else{let r=1;i.duration>0&&(this._memoizedDuration!==i.duration&&(this._memoizedDuration=i.duration,a.durationProgress>0&&(a.elapsedTime=i.duration*a.durationProgress,t=a.elapsedTime+=e)),r=(i.progress||0)+t/this._memoizedDuration,r=r>1?1:r<0?0:r,a.durationProgress=r),p=n+i.easing(r)*(c-n),l=(p-a.lastPosition)/e,u=1==r}a.lastVelocity=l,Number.isNaN(p)&&(console.warn("Got NaN while animating:",this),u=!0)}l&&!l[s].done&&(u=!1),u?a.done=!0:t=!1,a.setValue(p,i.round)&&(n=!0)}));const a=Ys(this),s=a.getValue();if(t){const e=ks(r.to);s===e&&!n||i.decay?n&&i.decay&&this._onChange(s):(a.setValue(e),this._onChange(e)),this._stop()}else n&&this._onChange(s)}set(e){return ia.batchedUpdates((()=>{this._stop(),this._focus(e),this._set(e)})),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(Vc(this)){const{to:e,config:t}=this.animation;ia.batchedUpdates((()=>{this._onStart(),t.decay||this._set(e,!1),this._stop()}))}return this}update(e){return(this.queue||(this.queue=[])).push(e),this}start(e,t){let n;return Sa.und(e)?(n=this.queue||[],this.queue=[]):n=[Sa.obj(e)?e:{...t,to:e}],Promise.all(n.map((e=>this._update(e)))).then((e=>Bc(this,e)))}stop(e){const{to:t}=this.animation;return this._focus(this.get()),Mc(this._state,e&&this._lastCallId),ia.batchedUpdates((()=>this._stop(t,e))),this}reset(){this._update({reset:!0})}eventObserved(e){"change"==e.type?this._start():"priority"==e.type&&(this.priority=e.priority+1)}_prepareNode(e){const t=this.key||"";let{to:n,from:r}=e;n=Sa.obj(n)?n[t]:n,(null==n||Ec(n))&&(n=void 0),r=Sa.obj(r)?r[t]:r,null==r&&(r=void 0);const o={to:n,from:r};return zc(this)||(e.reverse&&([n,r]=[r,n]),r=ks(r),Sa.und(r)?Ys(this)||this._set(n):this._set(r)),o}_update({...e},t){const{key:n,defaultProps:r}=this;e.default&&Object.assign(r,gc(e,((e,t)=>/^on/.test(t)?fc(e,n):e))),Xc(this,e,"onProps"),eu(this,"onProps",e,this);const o=this._prepareNode(e);if(Object.isFrozen(this))throw Error("Cannot animate a `SpringValue` object that is frozen. Did you forget to pass your component to `animated(...)` before animating its props?");const i=this._state;return xc(++this._lastCallId,{key:n,props:e,defaultProps:r,state:i,actions:{pause:()=>{Gc(this)||(Wc(this,!0),Ta(i.pauseQueue),eu(this,"onPause",Tc(this,Kc(this,this.animation.to)),this))},resume:()=>{Gc(this)&&(Wc(this,!1),Vc(this)&&this._resume(),Ta(i.resumeQueue),eu(this,"onResume",Tc(this,Kc(this,this.animation.to)),this))},start:this._merge.bind(this,o)}}).then((n=>{if(e.loop&&n.finished&&(!t||!n.noop)){const t=qc(e);if(t)return this._update(t,!0)}return n}))}_merge(e,t,n){if(t.cancel)return this.stop(!0),n(Oc(this));const r=!Sa.und(e.to),o=!Sa.und(e.from);if(r||o){if(!(t.callId>this._lastToId))return n(Oc(this));this._lastToId=t.callId}const{key:i,defaultProps:l,animation:a}=this,{to:s,from:c}=a;let{to:u=s,from:p=c}=e;!o||r||t.default&&!Sa.und(u)||(u=p),t.reverse&&([u,p]=[p,u]);const d=!wa(p,c);d&&(a.from=p),p=ks(p);const f=!wa(u,s);f&&this._focus(u);const m=Ec(t.to),{config:y}=a,{decay:g,velocity:h}=y;(r||o)&&(y.velocity=0),t.config&&!m&&function(e,t,n){n&&(Ic(n={...n},t),t={...n,...t}),Ic(e,t),Object.assign(e,t);for(const t in Cc)null==e[t]&&(e[t]=Cc[t]);let{frequency:r,damping:o}=e;const{mass:i}=e;Sa.und(r)||(r<.01&&(r=.01),o<0&&(o=0),e.tension=Math.pow(2*Math.PI/r,2)*i,e.friction=4*Math.PI*o*i/r)}(y,pc(t.config,i),t.config!==l.config?pc(l.config,i):void 0);let v=Ys(this);if(!v||Sa.und(u))return n(Tc(this,!0));const b=Sa.und(t.reset)?o&&!t.default:!Sa.und(p)&&dc(t.reset,i),_=b?p:this.get(),k=_c(u),E=Sa.num(k)||Sa.arr(k)||Gs(k),S=!m&&(!E||dc(l.immediate||t.immediate,i));if(f){const e=lc(u);if(e!==v.constructor){if(!S)throw Error(`Cannot animate between ${v.constructor.name} and ${e.name}, as the "to" prop suggests`);v=this._set(k)}}const w=v.constructor;let C=_s(u),I=!1;if(!C){const e=b||!zc(this)&&d;(f||e)&&(I=wa(_c(_),k),C=!I),(wa(a.immediate,S)||S)&&wa(y.decay,g)&&wa(y.velocity,h)||(C=!0)}if(I&&Vc(this)&&(a.changed&&!b?C=!0:C||this._stop(s)),!m&&((C||_s(s))&&(a.values=v.getPayload(),a.toValues=_s(u)?null:w==tc?[1]:Aa(k)),a.immediate!=S&&(a.immediate=S,S||b||this._set(s)),C)){const{onRest:e}=a;Ca(Zc,(e=>Xc(this,t,e)));const r=Tc(this,Kc(this,s));Ta(this._pendingCalls,r),this._pendingCalls.add(n),a.changed&&ia.batchedUpdates((()=>{a.changed=!b,e?.(r,this),b?pc(l.onRest,r):a.onStart?.(r,this)}))}b&&this._set(_),m?n(Nc(t.to,t,this._state,this)):C?this._start():Vc(this)&&!f?this._pendingCalls.add(n):n(Pc(_))}_focus(e){const t=this.animation;e!==t.to&&(Es(this)&&this._detach(),t.to=e,Es(this)&&this._attach())}_attach(){let e=0;const{to:t}=this.animation;_s(t)&&(Is(t,this),Lc(t)&&(e=t.priority+1)),this.priority=e}_detach(){const{to:e}=this.animation;_s(e)&&As(e,this)}_set(e,t=!0){const n=ks(e);if(!Sa.und(n)){const e=Ys(this);if(!e||!wa(n,e.getValue())){const r=lc(n);e&&e.constructor==r?e.setValue(n):Qs(this,r.create(n)),e&&ia.batchedUpdates((()=>{this._onChange(n,t)}))}}return Ys(this)}_onStart(){const e=this.animation;e.changed||(e.changed=!0,eu(this,"onStart",Tc(this,Kc(this,e.to)),this))}_onChange(e,t){t||(this._onStart(),pc(this.animation.onChange,e,this)),pc(this.defaultProps.onChange,e,this),super._onChange(e,t)}_start(){const e=this.animation;Ys(this).reset(ks(e.to)),e.immediate||(e.fromValues=e.values.map((e=>e.lastPosition))),Vc(this)||(Hc(this,!0),Gc(this)||this._resume())}_resume(){ra.skipAnimation?this.finish():za.start(this)}_stop(e,t){if(Vc(this)){Hc(this,!1);const n=this.animation;Ca(n.values,(e=>{e.done=!0})),n.toValues&&(n.onChange=n.onPause=n.onResume=void 0),Ss(this,{type:"idle",parent:this});const r=t?Oc(this.get()):Tc(this.get(),Kc(this,e??n.to));Ta(this._pendingCalls,r),n.changed&&(n.changed=!1,eu(this,"onRest",r,this))}}};function Kc(e,t){const n=_c(t);return wa(_c(e.get()),n)}function qc(e,t=e.loop,n=e.to){const r=pc(t);if(r){const o=!0!==r&&bc(r),i=(o||e).reverse,l=!o||o.reset;return Jc({...e,loop:t,default:!1,pause:void 0,to:!i||Ec(n)?n:void 0,from:l?e.from:void 0,reset:l,...o})}}function Jc(e){const{to:t,from:n}=e=bc(e),r=new Set;return Sa.obj(t)&&Qc(t,r),Sa.obj(n)&&Qc(n,r),e.keys=r.size?Array.from(r):null,e}function Yc(e){const t=Jc(e);return Sa.und(t.default)&&(t.default=gc(t)),t}function Qc(e,t){Ia(e,((e,n)=>null!=e&&t.add(n)))}var Zc=["onStart","onRest","onChange","onPause","onResume"];function Xc(e,t,n){e.animation[n]=t[n]!==mc(t,n)?fc(t[n],e.key):void 0}function eu(e,t,...n){e.animation[t]?.(...n),e.defaultProps[t]?.(...n)}var tu=["onStart","onChange","onRest"],nu=1,ru=class{constructor(e,t){this.id=nu++,this.springs={},this.queue=[],this._lastAsyncId=0,this._active=new Set,this._changed=new Set,this._started=!1,this._state={paused:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._events={onStart:new Map,onChange:new Map,onRest:new Map},this._onFrame=this._onFrame.bind(this),t&&(this._flush=t),e&&this.start({default:!0,...e})}get idle(){return!this._state.asyncTo&&Object.values(this.springs).every((e=>e.idle&&!e.isDelayed&&!e.isPaused))}get item(){return this._item}set item(e){this._item=e}get(){const e={};return this.each(((t,n)=>e[n]=t.get())),e}set(e){for(const t in e){const n=e[t];Sa.und(n)||this.springs[t].set(n)}}update(e){return e&&this.queue.push(Jc(e)),this}start(e){let{queue:t}=this;return e?t=Aa(e).map(Jc):this.queue=[],this._flush?this._flush(this,t):(uu(this,t),ou(this,t))}stop(e,t){if(e!==!!e&&(t=e),t){const n=this.springs;Ca(Aa(t),(t=>n[t].stop(!!e)))}else Mc(this._state,this._lastAsyncId),this.each((t=>t.stop(!!e)));return this}pause(e){if(Sa.und(e))this.start({pause:!0});else{const t=this.springs;Ca(Aa(e),(e=>t[e].pause()))}return this}resume(e){if(Sa.und(e))this.start({pause:!1});else{const t=this.springs;Ca(Aa(e),(e=>t[e].resume()))}return this}each(e){Ia(this.springs,e)}_onFrame(){const{onStart:e,onChange:t,onRest:n}=this._events,r=this._active.size>0,o=this._changed.size>0;(r&&!this._started||o&&!this._started)&&(this._started=!0,xa(e,(([e,t])=>{t.value=this.get(),e(t,this,this._item)})));const i=!r&&this._started,l=o||i&&n.size?this.get():null;o&&t.size&&xa(t,(([e,t])=>{t.value=l,e(t,this,this._item)})),i&&(this._started=!1,xa(n,(([e,t])=>{t.value=l,e(t,this,this._item)})))}eventObserved(e){if("change"==e.type)this._changed.add(e.parent),e.idle||this._active.add(e.parent);else{if("idle"!=e.type)return;this._active.delete(e.parent)}ia.onFrame(this._onFrame)}};function ou(e,t){return Promise.all(t.map((t=>iu(e,t)))).then((t=>Bc(e,t)))}async function iu(e,t,n){const{keys:r,to:o,from:i,loop:l,onRest:a,onResolve:s}=t,c=Sa.obj(t.default)&&t.default;l&&(t.loop=!1),!1===o&&(t.to=null),!1===i&&(t.from=null);const u=Sa.arr(o)||Sa.fun(o)?o:void 0;u?(t.to=void 0,t.onRest=void 0,c&&(c.onRest=void 0)):Ca(tu,(n=>{const r=t[n];if(Sa.fun(r)){const o=e._events[n];t[n]=({finished:e,cancelled:t})=>{const n=o.get(r);n?(e||(n.finished=!1),t&&(n.cancelled=!0)):o.set(r,{value:null,finished:e||!1,cancelled:t||!1})},c&&(c[n]=t[n])}}));const p=e._state;t.pause===!p.paused?(p.paused=t.pause,Ta(t.pause?p.pauseQueue:p.resumeQueue)):p.paused&&(t.pause=!0);const d=(r||Object.keys(e.springs)).map((n=>e.springs[n].start(t))),f=!0===t.cancel||!0===mc(t,"cancel");(u||f&&p.asyncId)&&d.push(xc(++e._lastAsyncId,{props:t,state:p,actions:{pause:Ea,resume:Ea,start(t,n){f?(Mc(p,e._lastAsyncId),n(Oc(e))):(t.onRest=a,n(Nc(u,t,p,e)))}}})),p.paused&&await new Promise((e=>{p.resumeQueue.add(e)}));const m=Bc(e,await Promise.all(d));if(l&&m.finished&&(!n||!m.noop)){const n=qc(t,l,o);if(n)return uu(e,[n]),iu(e,n,!0)}return s&&ia.batchedUpdates((()=>s(m,e,e.item))),m}function lu(e,t){const n={...e.springs};return t&&Ca(Aa(t),(e=>{Sa.und(e.keys)&&(e=Jc(e)),Sa.obj(e.to)||(e={...e,to:void 0}),cu(n,e,(e=>su(e)))})),au(e,n),n}function au(e,t){Ia(t,((t,n)=>{e.springs[n]||(e.springs[n]=t,Is(t,e))}))}function su(e,t){const n=new $c;return n.key=e,t&&Is(n,t),n}function cu(e,t,n){t.keys&&Ca(t.keys,(r=>{(e[r]||(e[r]=n(r)))._prepareNode(t)}))}function uu(e,t){Ca(t,(t=>{cu(e.springs,t,(t=>su(t,e)))}))}var pu,du,fu=({children:e,...t})=>{const n=(0,ea.useContext)(mu),r=t.pause||!!n.pause,o=t.immediate||!!n.immediate;t=function(e,t){const[n]=(0,ea.useState)((()=>({inputs:t,result:e()}))),r=(0,ea.useRef)(),o=r.current;let i=o;if(i){const n=Boolean(t&&i.inputs&&function(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}(t,i.inputs));n||(i={inputs:t,result:e()})}else i=n;return(0,ea.useEffect)((()=>{r.current=i,o==n&&(n.inputs=n.result=void 0)}),[i]),i.result}((()=>({pause:r,immediate:o})),[r,o]);const{Provider:i}=mu;return ea.createElement(i,{value:t},e)},mu=(pu=fu,du={},Object.assign(pu,ea.createContext(du)),pu.Provider._context=pu,pu.Consumer._context=pu,pu);fu.Provider=mu.Provider,fu.Consumer=mu.Consumer;var yu=()=>{const e=[],t=function(t){Vs(`${Us}Directly calling start instead of using the api object is deprecated in v9 (use ".start" instead), this will be removed in later 0.X.0 versions`);const r=[];return Ca(e,((e,o)=>{if(Sa.und(t))r.push(e.start());else{const i=n(t,e,o);i&&r.push(e.start(i))}})),r};t.current=e,t.add=function(t){e.includes(t)||e.push(t)},t.delete=function(t){const n=e.indexOf(t);~n&&e.splice(n,1)},t.pause=function(){return Ca(e,(e=>e.pause(...arguments))),this},t.resume=function(){return Ca(e,(e=>e.resume(...arguments))),this},t.set=function(t){Ca(e,((e,n)=>{const r=Sa.fun(t)?t(n,e):t;r&&e.set(r)}))},t.start=function(t){const n=[];return Ca(e,((e,r)=>{if(Sa.und(t))n.push(e.start());else{const o=this._getProps(t,e,r);o&&n.push(e.start(o))}})),n},t.stop=function(){return Ca(e,(e=>e.stop(...arguments))),this},t.update=function(t){return Ca(e,((e,n)=>e.update(this._getProps(t,e,n)))),this};const n=function(e,t,n){return Sa.fun(e)?e(n,t):e};return t._getProps=n,t};function gu(e,t,n){const r=Sa.fun(t)&&t;r&&!n&&(n=[]);const o=(0,ea.useMemo)((()=>r||3==arguments.length?yu():void 0),[]),i=(0,ea.useRef)(0),l=Ws(),a=(0,ea.useMemo)((()=>({ctrls:[],queue:[],flush(e,t){const n=lu(e,t);return i.current>0&&!a.queue.length&&!Object.keys(n).some((t=>!e.springs[t]))?ou(e,t):new Promise((r=>{au(e,n),a.queue.push((()=>{r(ou(e,t))})),l()}))}})),[]),s=(0,ea.useRef)([...a.ctrls]),c=[],u=qs(e)||0;function p(e,n){for(let o=e;o<n;o++){const e=s.current[o]||(s.current[o]=new ru(null,a.flush)),n=r?r(o,e):t[o];n&&(c[o]=Yc(n))}}(0,ea.useMemo)((()=>{Ca(s.current.slice(e,u),(e=>{Sc(e,o),e.stop(!0)})),s.current.length=e,p(u,e)}),[e]),(0,ea.useMemo)((()=>{p(0,Math.min(u,e))}),n);const d=s.current.map(((e,t)=>lu(e,c[t]))),f=(0,ea.useContext)(fu),m=qs(f),y=f!==m&&kc(f);Hs((()=>{i.current++,a.ctrls=s.current;const{queue:e}=a;e.length&&(a.queue=[],Ca(e,(e=>e()))),Ca(s.current,((e,t)=>{o?.add(e),y&&e.start({default:f});const n=c[t];n&&(wc(e,n.ref),e.ref?e.queue.push(n):e.start(n))}))})),$s((()=>()=>{Ca(a.ctrls,(e=>e.stop(!0)))}));const g=d.map((e=>({...e})));return o?[g,o]:g}function hu(e,t){const n=Sa.fun(e),[[r],o]=gu(1,n?e:[e],n?t||[]:t);return n||2==arguments.length?[r,o]:r}var vu=class extends Uc{constructor(e,t){super(),this.source=e,this.idle=!0,this._active=new Set,this.calc=us(...t);const n=this._get(),r=lc(n);Qs(this,r.create(n))}advance(e){const t=this._get();wa(t,this.get())||(Ys(this).setValue(t),this._onChange(t,this.idle)),!this.idle&&_u(this._active)&&ku(this)}_get(){const e=Sa.arr(this.source)?this.source.map(ks):Aa(ks(this.source));return this.calc(...e)}_start(){this.idle&&!_u(this._active)&&(this.idle=!1,Ca(Zs(this),(e=>{e.done=!1})),ra.skipAnimation?(ia.batchedUpdates((()=>this.advance())),ku(this)):za.start(this))}_attach(){let e=1;Ca(Aa(this.source),(t=>{_s(t)&&Is(t,this),Lc(t)&&(t.idle||this._active.add(t),e=Math.max(e,t.priority+1))})),this.priority=e,this._start()}_detach(){Ca(Aa(this.source),(e=>{_s(e)&&As(e,this)})),this._active.clear(),ku(this)}eventObserved(e){"change"==e.type?e.idle?this.advance():(this._active.add(e.parent),this._start()):"idle"==e.type?this._active.delete(e.parent):"priority"==e.type&&(this.priority=Aa(this.source).reduce(((e,t)=>Math.max(e,(Lc(t)?t.priority:0)+1)),0))}};function bu(e){return!1!==e.idle}function _u(e){return!e.size||Array.from(e).every(bu)}function ku(e){e.idle||(e.idle=!0,Ca(Zs(e),(e=>{e.done=!0})),Ss(e,{type:"idle",parent:e}))}ra.assign({createStringInterpolator:Ds,to:(e,t)=>new vu(e,t)});za.advance;var Eu=window.ReactDOM,Su=/^--/;function wu(e,t){return null==t||"boolean"==typeof t||""===t?"":"number"!=typeof t||0===t||Su.test(e)||Iu.hasOwnProperty(e)&&Iu[e]?(""+t).trim():t+"px"}var Cu={};var Iu={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},Au=["Webkit","Ms","Moz","O"];Iu=Object.keys(Iu).reduce(((e,t)=>(Au.forEach((n=>e[((e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1))(n,t)]=e[t])),e)),Iu);var xu=/^(matrix|translate|scale|rotate|skew)/,Bu=/^(translate)/,Pu=/^(rotate|skew)/,Tu=(e,t)=>Sa.num(e)&&0!==e?e+t:e,Ou=(e,t)=>Sa.arr(e)?e.every((e=>Ou(e,t))):Sa.num(e)?e===t:parseFloat(e)===t,Nu=class extends rc{constructor({x:e,y:t,z:n,...r}){const o=[],i=[];(e||t||n)&&(o.push([e||0,t||0,n||0]),i.push((e=>[`translate3d(${e.map((e=>Tu(e,"px"))).join(",")})`,Ou(e,0)]))),Ia(r,((e,t)=>{if("transform"===t)o.push([e||""]),i.push((e=>[e,""===e]));else if(xu.test(t)){if(delete r[t],Sa.und(e))return;const n=Bu.test(t)?"px":Pu.test(t)?"deg":"";o.push(Aa(e)),i.push("rotate3d"===t?([e,t,r,o])=>[`rotate3d(${e},${t},${r},${Tu(o,n)})`,Ou(o,0)]:e=>[`${t}(${e.map((e=>Tu(e,n))).join(",")})`,Ou(e,t.startsWith("scale")?1:0)])}})),o.length&&(r.transform=new Mu(o,i)),super(r)}},Mu=class extends ws{constructor(e,t){super(),this.inputs=e,this.transforms=t,this._value=null}get(){return this._value||(this._value=this._get())}_get(){let e="",t=!0;return Ca(this.inputs,((n,r)=>{const o=ks(n[0]),[i,l]=this.transforms[r](Sa.arr(o)?o:n.map(ks));e+=" "+i,t=t&&l})),t?"none":e}observerAdded(e){1==e&&Ca(this.inputs,(e=>Ca(e,(e=>_s(e)&&Is(e,this)))))}observerRemoved(e){0==e&&Ca(this.inputs,(e=>Ca(e,(e=>_s(e)&&As(e,this)))))}eventObserved(e){"change"==e.type&&(this._value=null),Ss(this,e)}};ra.assign({batchedUpdates:Eu.unstable_batchedUpdates,createStringInterpolator:Ds,colors:{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}});var Ru=((e,{applyAnimatedValues:t=(()=>!1),createAnimatedStyle:n=(e=>new rc(e)),getComponentProps:r=(e=>e)}={})=>{const o={applyAnimatedValues:t,createAnimatedStyle:n,getComponentProps:r},i=e=>{const t=uc(e)||"Anonymous";return(e=Sa.str(e)?i[e]||(i[e]=ac(e,o)):e[cc]||(e[cc]=ac(e,o))).displayName=`Animated(${t})`,e};return Ia(e,((t,n)=>{Sa.arr(e)&&(n=uc(t)),i[n]=i(t)})),{animated:i}})(["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"],{applyAnimatedValues:function(e,t){if(!e.nodeType||!e.setAttribute)return!1;const n="filter"===e.nodeName||e.parentNode&&"filter"===e.parentNode.nodeName,{style:r,children:o,scrollTop:i,scrollLeft:l,viewBox:a,...s}=t,c=Object.values(s),u=Object.keys(s).map((t=>n||e.hasAttribute(t)?t:Cu[t]||(Cu[t]=t.replace(/([A-Z])/g,(e=>"-"+e.toLowerCase())))));void 0!==o&&(e.textContent=o);for(const t in r)if(r.hasOwnProperty(t)){const n=wu(t,r[t]);Su.test(t)?e.style.setProperty(t,n):e.style[t]=n}u.forEach(((t,n)=>{e.setAttribute(t,c[n])})),void 0!==i&&(e.scrollTop=i),void 0!==l&&(e.scrollLeft=l),void 0!==a&&e.setAttribute("viewBox",a)},createAnimatedStyle:e=>new Nu(e),getComponentProps:({scrollTop:e,scrollLeft:t,...n})=>n}),Fu=Ru.animated;const Lu=e=>e+1,Du=e=>({top:e.offsetTop,left:e.offsetLeft});var Uu=function(e){let{isSelected:t,adjustScrolling:n,enableAnimation:r,triggerAnimationOnChange:o}=e;const i=(0,u.useRef)(),l=(0,f.useReducedMotion)()||!r,[a,s]=(0,u.useReducer)(Lu,0),[c,p]=(0,u.useReducer)(Lu,0),[d,m]=(0,u.useState)({x:0,y:0}),y=(0,u.useMemo)((()=>i.current?Du(i.current):null),[o]),g=(0,u.useMemo)((()=>{if(!n||!i.current)return()=>{};const e=(0,Ml.getScrollContainer)(i.current);if(!e)return()=>{};const t=i.current.getBoundingClientRect();return()=>{const n=i.current.getBoundingClientRect().top-t.top;n&&(e.scrollTop+=n)}}),[o,n]);return(0,u.useLayoutEffect)((()=>{a&&p()}),[a]),(0,u.useLayoutEffect)((()=>{if(!y)return;if(l)return void g();i.current.style.transform=void 0;const e=Du(i.current);s(),m({x:Math.round(y.left-e.left),y:Math.round(y.top-e.top)})}),[o]),hu({from:{x:d.x,y:d.y},to:{x:0,y:0},reset:a!==c,config:{mass:5,tension:2e3,friction:200},immediate:l,onChange:function(e){let{value:n}=e;if(!i.current)return;let{x:r,y:o}=n;r=Math.round(r),o=Math.round(o);const l=0===r&&0===o;i.current.style.transformOrigin="center center",i.current.style.transform=l?void 0:`translate3d(${r}px,${o}px,0)`,i.current.style.zIndex=t?"1":"",g()}}),i};const ju=".block-editor-block-list__block",zu=".block-list-appender",Vu=".block-editor-button-block-appender";function Gu(e,t){return t.closest([ju,zu,Vu].join(","))===e}function Hu(e){for(;e&&e.nodeType!==e.ELEMENT_NODE;)e=e.parentNode;if(!e)return;const t=e.closest(ju);return t?t.id.slice("block-".length):void 0}function Wu(e){const t=(0,u.useRef)(),n=function(e){return(0,m.useSelect)((t=>{const{getSelectedBlocksInitialCaretPosition:n,__unstableGetEditorMode:r,isBlockSelected:o}=t(xr);if(o(e)&&"edit"===r())return n()}),[e])}(e),{isBlockSelected:r,isMultiSelecting:o}=(0,m.useSelect)(xr);return(0,u.useEffect)((()=>{if(!r(e)||o())return;if(null==n)return;if(!t.current)return;const{ownerDocument:i}=t.current;if(Gu(t.current,i.activeElement))return;const l=Ml.focus.tabbable.find(t.current).filter((e=>(0,Ml.isTextField)(e))),a=-1===n,s=l[a?l.length-1:0]||t.current;if(Gu(t.current,s)){if(!t.current.getAttribute("contenteditable")){const e=Ml.focus.tabbable.findNext(t.current);if(e&&Gu(t.current,e)&&(0,Ml.isFormElement)(e))return void e.focus()}(0,Ml.placeCaretAtHorizontalEdge)(s,a)}else t.current.focus()}),[n,e]),t}function $u(e){if(e.defaultPrevented)return;const t="mouseover"===e.type?"add":"remove";e.preventDefault(),e.currentTarget.classList[t]("is-hovered")}function Ku(){const e=(0,m.useSelect)((e=>{const{getSettings:t}=e(xr);return t().outlineMode}),[]);return(0,f.useRefEffect)((t=>{if(e)return t.addEventListener("mouseout",$u),t.addEventListener("mouseover",$u),()=>{t.removeEventListener("mouseout",$u),t.removeEventListener("mouseover",$u),t.classList.remove("is-hovered")}}),[e])}function qu(e){return(0,m.useSelect)((t=>{const{isBlockBeingDragged:n,isBlockHighlighted:r,isBlockSelected:o,isBlockMultiSelected:i,getBlockName:l,getSettings:s,hasSelectedInnerBlock:c,isTyping:u,__unstableIsFullySelected:p,__unstableSelectionHasUnmergeableBlock:f}=t(xr),{outlineMode:m}=s(),y=n(e),g=o(e),h=l(e),v=c(e,!0),b=i(e);return d()({"is-selected":g,"is-highlighted":r(e),"is-multi-selected":b,"is-partially-selected":b&&!p()&&!f(),"is-reusable":(0,a.isReusableBlock)((0,a.getBlockType)(h)),"is-dragging":y,"has-child-selected":v,"remove-outline":g&&m&&u()})}),[e])}function Ju(e){return(0,m.useSelect)((t=>{const n=t(xr).getBlockName(e),r=(0,a.getBlockType)(n);if((null==r?void 0:r.apiVersion)>1)return(0,a.getBlockDefaultClassName)(n)}),[e])}function Yu(e){return(0,m.useSelect)((t=>{const{getBlockName:n,getBlockAttributes:r}=t(xr),o=r(e);if(null==o||!o.className)return;const i=(0,a.getBlockType)(n(e));return(null==i?void 0:i.apiVersion)>1?o.className:void 0}),[e])}function Qu(e){return(0,m.useSelect)((t=>{const{hasBlockMovingClientId:n,canInsertBlockType:r,getBlockName:o,getBlockRootClientId:i,isBlockSelected:l}=t(xr);if(!l(e))return;const a=n();return a?d()("is-block-moving-mode",{"can-insert-moving-block":r(o(a),i(e))}):void 0}),[e])}function Zu(e){const{isBlockSelected:t}=(0,m.useSelect)(xr),{selectBlock:n,selectionChange:r}=(0,m.useDispatch)(xr);return(0,f.useRefEffect)((o=>{function i(i){o.parentElement.closest('[contenteditable="true"]')||(t(e)?i.target.isContentEditable||r(e):Gu(o,i.target)&&n(e))}return o.addEventListener("focusin",i),()=>{o.removeEventListener("focusin",i)}}),[t,n])}var Xu=window.wp.keycodes;function ep(e){const t=(0,m.useSelect)((t=>t(xr).isBlockSelected(e)),[e]),{getBlockRootClientId:n,getBlockIndex:r}=(0,m.useSelect)(xr),{insertDefaultBlock:o,removeBlock:i}=(0,m.useDispatch)(xr);return(0,f.useRefEffect)((l=>{if(t)return l.addEventListener("keydown",a),l.addEventListener("dragstart",s),()=>{l.removeEventListener("keydown",a),l.removeEventListener("dragstart",s)};function a(t){const{keyCode:a,target:s}=t;a!==Xu.ENTER&&a!==Xu.BACKSPACE&&a!==Xu.DELETE||s!==l||(0,Ml.isTextField)(s)||(t.preventDefault(),a===Xu.ENTER?o({},n(e),r(e)+1):i(e))}function s(e){e.preventDefault()}}),[e,t,n,r,o,i])}function tp(e){const{isNavigationMode:t,isBlockSelected:n}=(0,m.useSelect)(xr),{setNavigationMode:r,selectBlock:o}=(0,m.useDispatch)(xr);return(0,f.useRefEffect)((i=>{function l(i){t()&&!i.defaultPrevented&&(i.preventDefault(),n(e)?r(!1):o(e))}return i.addEventListener("mousedown",l),()=>{i.addEventListener("mousedown",l)}}),[e,t,n,r])}function np(){const e=(0,u.useContext)($h);return(0,f.useRefEffect)((t=>{if(e)return e.observe(t),()=>{e.unobserve(t)}}),[e])}function rp(e){return(0,m.useSelect)((t=>{const{__unstableHasActiveBlockOverlayActive:n}=t(xr);return n(e)}),[e])}function op(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{__unstableIsHtml:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{clientId:n,className:r,wrapperProps:o={},isAligned:i}=(0,u.useContext)(ip),{index:l,mode:s,name:c,blockApiVersion:p,blockTitle:y,isPartOfSelection:g,adjustScrolling:h,enableAnimation:v}=(0,m.useSelect)((e=>{const{getBlockAttributes:t,getBlockIndex:r,getBlockMode:o,getBlockName:i,isTyping:l,getGlobalBlockCount:s,isBlockSelected:c,isBlockMultiSelected:u,isAncestorMultiSelected:p,isFirstMultiSelectedBlock:d}=e(xr),{getActiveBlockVariation:f}=e(a.store),m=c(n),y=u(n)||p(n),g=i(n),h=(0,a.getBlockType)(g),v=f(g,t(n));return{index:r(n),mode:o(n),name:g,blockApiVersion:(null==h?void 0:h.apiVersion)||1,blockTitle:(null==v?void 0:v.title)||(null==h?void 0:h.title),isPartOfSelection:m||y,adjustScrolling:m||d(n),enableAnimation:!l()&&s()<=200}}),[n]),b=rp(n),k=(0,_.sprintf)((0,_.__)("Block: %s"),y),E="html"!==s||t?"":"-visual",S=(0,f.useMergeRefs)([e.ref,Wu(n),Zr(n),Zu(n),ep(n),tp(n),Ku(),np(),Uu({isSelected:g,adjustScrolling:h,enableAnimation:v,triggerAnimationOnChange:l}),(0,f.useDisabled)({isDisabled:!b})]),w=Nr();return p<2&&n===w.clientId&&"undefined"!=typeof process&&process.env,{tabIndex:0,...o,...e,ref:S,id:`block-${n}${E}`,role:"document","aria-label":k,"data-block":n,"data-type":c,"data-title":y,className:d()(d()("block-editor-block-list__block",{"wp-block":!i,"has-block-overlay":b}),r,e.className,o.className,qu(n),Ju(n),Yu(n),Qu(n)),style:{...o.style,...e.style}}}op.save=a.__unstableGetBlockProps;const ip=(0,u.createContext)();function lp(e){let{children:t,isHtml:n,...r}=e;return(0,u.createElement)("div",op(r,{__unstableIsHtml:n}),t)}const ap=(0,m.withSelect)(((e,t)=>{let{clientId:n,rootClientId:r}=t;const{isBlockSelected:o,getBlockMode:i,isSelectionEnabled:l,getTemplateLock:a,__unstableGetBlockWithoutInnerBlocks:s,canRemoveBlock:c,canMoveBlock:u}=e(xr),p=s(n),d=o(n),f=a(r),m=c(n,r),y=u(n,r),{name:g,attributes:h,isValid:v}=p||{};return{mode:i(n),isSelectionEnabled:l(),isLocked:!!f,canRemove:m,canMove:y,block:p,name:g,attributes:h,isValid:v,isSelected:d}})),sp=(0,m.withDispatch)(((e,t,n)=>{const{updateBlockAttributes:r,insertBlocks:o,mergeBlocks:i,replaceBlocks:l,toggleSelection:s,__unstableMarkLastChangeAsPersistent:c,moveBlocksToPosition:u,removeBlock:p}=e(xr);return{setAttributes(e){const{getMultiSelectedBlockClientIds:o}=n.select(xr),i=o(),{clientId:l}=t,a=i.length?i:[l];r(a,e)},onInsertBlocks(e,n){const{rootClientId:r}=t;o(e,n,r)},onInsertBlocksAfter(e){const{clientId:r,rootClientId:i}=t,{getBlockIndex:l}=n.select(xr),a=l(r);o(e,a+1,i)},onMerge(e){const{clientId:r,rootClientId:l}=t,{getPreviousBlockClientId:s,getNextBlockClientId:c,getBlock:d,getBlockAttributes:f,getBlockName:m,getBlockOrder:y,getBlockIndex:g,getBlockRootClientId:h,canInsertBlockType:v}=n.select(xr);function b(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const r=h(e),i=y(e),[l]=i;if(1===i.length&&(0,a.isUnmodifiedBlock)(d(l)))p(e);else{if(v(m(l),r))u([l],e,r,g(e));else{const i=(0,a.switchToBlockType)(d(l),(0,a.getDefaultBlockName)());i&&i.length&&n.batch((()=>{o(i,g(e),r,t),p(l,!1)}))}!y(e).length&&(0,a.isUnmodifiedBlock)(d(e))&&p(e,!1)}}if(e){if(l){const e=c(l);if(e){if(m(l)!==m(e))return void i(l,e);{const t=f(l),r=f(e);if(Object.keys(t).every((e=>t[e]===r[e])))return void n.batch((()=>{u(y(e),e,l),p(e,!1)}))}}}const e=c(r);if(!e)return;y(e).length?b(e,!1):i(r,e)}else{const e=s(r);if(e)i(e,r);else if(l){const e=s(l);if(e&&m(l)===m(e)){const t=f(l),r=f(e);if(Object.keys(t).every((e=>t[e]===r[e])))return void n.batch((()=>{u(y(l),l,e),p(l,!1)}))}b(l)}}},onReplace(e,n,r){e.length&&!(0,a.isUnmodifiedDefaultBlock)(e[e.length-1])&&c(),l([t.clientId],e,n,r)},toggleSelection(e){s(e)}}}));var cp=(0,f.compose)(f.pure,ap,sp,(0,f.ifCondition)((e=>{let{block:t}=e;return!!t})),(0,g.withFilters)("editor.BlockListBlock"))((function(e){var t;let{block:{__unstableBlockSource:n},mode:r,isLocked:o,canRemove:i,clientId:l,isSelected:s,isSelectionEnabled:c,className:p,__unstableLayoutClassNames:f,name:y,isValid:g,attributes:h,wrapperProps:v,setAttributes:b,onReplace:_,onInsertBlocksAfter:k,onMerge:E,toggleSelection:S}=e;const{themeSupportsLayout:w,hasContentLockedParent:C,isContentBlock:I,isContentLocking:A,isTemporarilyEditingAsBlocks:x}=(0,m.useSelect)((e=>{const{getSettings:t,__unstableGetContentLockingParent:n,getTemplateLock:r,__unstableGetTemporarilyEditingAsBlocks:o}=e(xr),i=!!n(l);return{themeSupportsLayout:t().supportsLayout,isContentBlock:e(a.store).__experimentalHasContentRoleAttribute(y),hasContentLockedParent:i,isContentLocking:"contentOnly"===r(l)&&!i,isTemporarilyEditingAsBlocks:o()===l}}),[y,l]),{removeBlock:B}=(0,m.useDispatch)(xr),P=(0,u.useCallback)((()=>B(l)),[l]),T=cl()||{};let O=(0,u.createElement)(jl,{name:y,isSelected:s,attributes:h,setAttributes:b,insertBlocksAfter:o?void 0:k,onReplace:i?_:void 0,onRemove:i?P:void 0,mergeBlocks:i?E:void 0,clientId:l,isSelectionEnabled:c,toggleSelection:S,__unstableLayoutClassNames:f,__unstableParentLayout:Object.keys(T).length?T:void 0});const N=(0,a.getBlockType)(y);C&&!I&&(v={...v,tabIndex:-1}),null!=N&&N.getEditWrapperProps&&(v=function(e,t){const n={...e,...t};return null!=e&&e.className&&null!=t&&t.className&&(n.className=d()(e.className,t.className)),null!=e&&e.style&&null!=t&&t.style&&(n.style={...e.style,...t.style}),n}(v,N.getEditWrapperProps(h)));const M=v&&!!v["data-align"]&&!w;let R;if(M&&(O=(0,u.createElement)("div",{className:"wp-block","data-align":v["data-align"]},O)),g)R="html"===r?(0,u.createElement)(u.Fragment,null,(0,u.createElement)("div",{style:{display:"none"}},O),(0,u.createElement)(lp,{isHtml:!0},(0,u.createElement)(Xl,{clientId:l}))):(null==N?void 0:N.apiVersion)>1?O:(0,u.createElement)(lp,v,O);else{const e=n?(0,a.serializeRawBlock)(n):(0,a.getSaveContent)(N,h);R=(0,u.createElement)(lp,{className:"has-warning"},(0,u.createElement)(Kl,{clientId:l}),(0,u.createElement)(u.RawHTML,null,(0,Ml.safeHTML)(e)))}const{"data-align":F,...L}=null!==(t=v)&&void 0!==t?t:{},D={clientId:l,className:d()({"is-content-locked":A,"is-content-locked-temporarily-editing-as-blocks":x,"is-content-block":C&&I},F&&w&&`align${F}`,p),wrapperProps:L,isAligned:M},U=(0,u.useMemo)((()=>D),Object.values(D));return(0,u.createElement)(ip.Provider,{value:U},(0,u.createElement)(Ql,{fallback:(0,u.createElement)(lp,{className:"has-warning"},(0,u.createElement)(Jl,null))},R))})),up=window.wp.htmlEntities;var pp=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M18 11.2h-5.2V6h-1.6v5.2H6v1.6h5.2V18h1.6v-5.2H18z"}));const dp=[(0,u.createInterpolateElement)((0,_.__)("While writing, you can press <kbd>/</kbd> to quickly insert new blocks."),{kbd:(0,u.createElement)("kbd",null)}),(0,u.createInterpolateElement)((0,_.__)("Indent a list by pressing <kbd>space</kbd> at the beginning of a line."),{kbd:(0,u.createElement)("kbd",null)}),(0,u.createInterpolateElement)((0,_.__)("Outdent a list by pressing <kbd>backspace</kbd> at the beginning of a line."),{kbd:(0,u.createElement)("kbd",null)}),(0,_.__)("Drag files into the editor to automatically insert media blocks."),(0,_.__)("Change a block's type by pressing the block icon on the toolbar.")];var fp=function(){const[e]=(0,u.useState)(Math.floor(Math.random()*dp.length));return(0,u.createElement)(g.Tip,null,dp[e])};var mp=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"}));var yp=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"}));var gp=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{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"}));var hp=(0,u.memo)((function(e){var t;let{icon:n,showColors:r=!1,className:o,context:i}=e;"block-default"===(null===(t=n)||void 0===t?void 0:t.src)&&(n={src:gp});const l=(0,u.createElement)(g.Icon,{icon:n&&n.src?n.src:n,context:i}),a=r?{backgroundColor:n&&n.background,color:n&&n.foreground}:{};return(0,u.createElement)("span",{style:a,className:d()("block-editor-block-icon",o,{"has-colors":r})},l)}));var vp=function(e){let{title:t,icon:n,description:r,blockType:o,className:i}=e;o&&($()("`blockType` property in `BlockCard component`",{since:"5.7",alternative:"`title, icon and description` properties"}),({title:t,icon:n,description:r}=o));const{parentNavBlockClientId:l}=(0,m.useSelect)((e=>{const{getSelectedBlockClientId:t,getBlockParentsByBlockName:n}=e(xr);return{parentNavBlockClientId:n(t(),"core/navigation",!0)[0]}}),[]),{selectBlock:a}=(0,m.useDispatch)(xr);return(0,u.createElement)("div",{className:d()("block-editor-block-card",i)},l&&(0,u.createElement)(g.Button,{onClick:()=>a(l),label:(0,_.__)("Go to parent Navigation block"),style:{minWidth:24,padding:0},icon:(0,_.isRTL)()?mp:yp,isSmall:!0}),(0,u.createElement)(hp,{icon:n,showColors:!0}),(0,u.createElement)("div",{className:"block-editor-block-card__content"},(0,u.createElement)("h2",{className:"block-editor-block-card__title"},t),(0,u.createElement)("span",{className:"block-editor-block-card__description"},r)))};const bp=(0,f.createHigherOrderComponent)((e=>(0,m.withRegistry)((t=>{let{useSubRegistry:n=!0,registry:r,...o}=t;if(!n)return(0,u.createElement)(e,c({registry:r},o));const[i,l]=(0,u.useState)(null);return(0,u.useEffect)((()=>{const e=(0,m.createRegistry)({},r);e.registerStore(Sr,Ar),l(e)}),[r]),i?(0,u.createElement)(m.RegistryProvider,{value:i},(0,u.createElement)(e,c({registry:i},o))):null}))),"withRegistryProvider");const _p=()=>{};function kp(e){let{clientId:t=null,value:n,selection:r,onChange:o=_p,onInput:i=_p}=e;const l=(0,m.useRegistry)(),{resetBlocks:s,resetSelection:c,replaceInnerBlocks:p,setHasControlledInnerBlocks:d,__unstableMarkNextChangeAsNotPersistent:f}=l.dispatch(xr),{getBlockName:y,getBlocks:g}=l.select(xr),h=(0,m.useSelect)((e=>!t||e(xr).areInnerBlocksControlled(t)),[t]),v=(0,u.useRef)({incoming:null,outgoing:[]}),b=(0,u.useRef)(!1),_=()=>{n&&(f(),t?l.batch((()=>{d(t,!0);const e=n.map((e=>(0,a.cloneBlock)(e)));b.current&&(v.current.incoming=e),f(),p(t,e)})):(b.current&&(v.current.incoming=n),s(n)))},k=(0,u.useRef)(i),E=(0,u.useRef)(o);(0,u.useEffect)((()=>{k.current=i,E.current=o}),[i,o]),(0,u.useEffect)((()=>{v.current.outgoing.includes(n)?v.current.outgoing[v.current.outgoing.length-1]===n&&(v.current.outgoing=[]):g(t)!==n&&(v.current.outgoing=[],_(),r&&c(r.selectionStart,r.selectionEnd,r.initialPosition))}),[n,t]),(0,u.useEffect)((()=>{h||(v.current.outgoing=[],_())}),[h]),(0,u.useEffect)((()=>{const{getSelectionStart:e,getSelectionEnd:n,getSelectedBlocksInitialCaretPosition:r,isLastBlockChangePersistent:o,__unstableIsLastBlockChangeIgnored:i,areInnerBlocksControlled:a}=l.select(xr);let s=g(t),c=o(),u=!1;b.current=!0;const p=l.subscribe((()=>{if(null!==t&&null===y(t))return;if(!(!t||a(t)))return;const l=o(),p=g(t),d=p!==s;if(s=p,d&&(v.current.incoming||i()))return v.current.incoming=null,void(c=l);if(d||u&&!d&&l&&!c){c=l,v.current.outgoing.push(s);(c?E.current:k.current)(s,{selection:{selectionStart:e(),selectionEnd:n(),initialPosition:r()}})}u=d}));return()=>{b.current=!1,p()}}),[l,t])}const Ep=bp((e=>{const{children:t,settings:n,stripExperimentalSettings:r=!1}=e,{__experimentalUpdateSettings:o}=Ir((0,m.useDispatch)(xr));return(0,u.useEffect)((()=>{o({...n,__internalIsInitialized:!0},r)}),[n]),kp(e),(0,u.createElement)(Qr,null,t)}));var Sp=e=>(0,u.createElement)(Ep,c({},e,{stripExperimentalSettings:!0}),e.children);function wp(){const{getSettings:e,hasSelectedBlock:t,hasMultiSelection:n}=(0,m.useSelect)(xr),{clearSelectedBlock:r}=(0,m.useDispatch)(xr),{clearBlockSelection:o}=e();return(0,f.useRefEffect)((e=>{if(o)return e.addEventListener("mousedown",i),()=>{e.removeEventListener("mousedown",i)};function i(o){(t()||n())&&o.target===e&&r()}}),[t,n,r,o])}function Cp(e){return(0,u.createElement)("div",c({ref:wp()},e))}function Ip(e){const{isMultiSelecting:t,getMultiSelectedBlockClientIds:n,hasMultiSelection:r,getSelectedBlockClientId:o,getSelectedBlocksInitialCaretPosition:i,__unstableIsFullySelected:l}=e(xr);return{isMultiSelecting:t(),multiSelectedBlockClientIds:n(),hasMultiSelection:r(),selectedBlockClientId:o(),initialPosition:i(),isFullSelection:l()}}function Ap(){const{initialPosition:e,isMultiSelecting:t,multiSelectedBlockClientIds:n,hasMultiSelection:r,selectedBlockClientId:o,isFullSelection:i}=(0,m.useSelect)(Ip,[]);return(0,f.useRefEffect)((o=>{const{ownerDocument:l}=o,{defaultView:a}=l;if(null==e)return;if(!r||t)return;const{length:s}=n;s<2||i&&(o.contentEditable=!0,o.focus(),a.getSelection().removeAllRanges())}),[r,t,n,o,e,i])}function xp(e,t,n,r){let o,i=Ml.focus.focusable.find(n);return t&&i.reverse(),i=i.slice(i.indexOf(e)+1),r&&(o=e.getBoundingClientRect()),i.find((function(e){if(1!==e.children.length||!function(e,t){return e.closest(ju)===t.closest(ju)}(e,e.firstElementChild)||"true"!==e.firstElementChild.getAttribute("contenteditable")){if(!Ml.focus.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 Bp(){const{getMultiSelectedBlocksStartClientId:e,getMultiSelectedBlocksEndClientId:t,getSettings:n,hasMultiSelection:r,__unstableIsFullySelected:o}=(0,m.useSelect)(xr),{selectBlock:i}=(0,m.useDispatch)(xr);return(0,f.useRefEffect)((l=>{let a;function s(){a=null}function c(s){if(s.defaultPrevented)return;const{keyCode:c,target:u,shiftKey:p,ctrlKey:d,altKey:f,metaKey:m}=s,y=c===Xu.UP,g=c===Xu.DOWN,h=c===Xu.LEFT,v=c===Xu.RIGHT,b=y||h,_=h||v,k=y||g,E=_||k,S=p||d||f||m,w=k?Ml.isVerticalEdge:Ml.isHorizontalEdge,{ownerDocument:C}=l,{defaultView:I}=C;if(!E)return;if(r()){if(p)return;if(!o())return;return s.preventDefault(),void(b?i(e()):i(t(),-1))}if(!function(e,t,n){if((t===Xu.UP||t===Xu.DOWN)&&!n)return!0;const{tagName:r}=e;if("INPUT"===r)return["button","checkbox","color","file","image","radio","reset","submit"].includes(e.getAttribute("type"));return"TEXTAREA"!==r}(u,c,S))return;k?a||(a=(0,Ml.computeCaretRect)(I)):a=null;const A=(0,Ml.isRTL)(u)?!b:b,{keepCaretInsideBlock:x}=n();if(p)(function(e,t){const n=xp(e,t,l);return n&&Hu(n)})(u,b)&&w(u,b)&&(l.contentEditable=!0,l.focus());else if(!k||!(0,Ml.isVerticalEdge)(u,b)||f&&!(0,Ml.isHorizontalEdge)(u,A)||x){if(_&&I.getSelection().isCollapsed&&(0,Ml.isHorizontalEdge)(u,A)&&!x){const e=xp(u,A,l);(0,Ml.placeCaretAtHorizontalEdge)(e,b),s.preventDefault()}}else{const e=xp(u,b,l,!0);e&&((0,Ml.placeCaretAtVerticalEdge)(e,f?!b:b,f?void 0:a),s.preventDefault())}}return l.addEventListener("mousedown",s),l.addEventListener("keydown",c),()=>{l.removeEventListener("mousedown",s),l.removeEventListener("keydown",c)}}),[])}var Pp=window.wp.keyboardShortcuts;function Tp(){const{getBlockOrder:e,getSelectedBlockClientIds:t,getBlockRootClientId:n}=(0,m.useSelect)(xr),{multiSelect:r,selectBlock:o}=(0,m.useDispatch)(xr),i=(0,Pp.__unstableUseShortcutEventMatch)();return(0,f.useRefEffect)((l=>{function a(a){if(!i("core/block-editor/select-all",a))return;const s=t();if(s.length<2&&!(0,Ml.isEntirelySelected)(a.target))return;a.preventDefault();const[c]=s,u=n(c),p=e(u);s.length!==p.length?r(p[0],p[p.length-1]):u&&(l.ownerDocument.defaultView.getSelection().removeAllRanges(),o(u))}return l.addEventListener("keydown",a),()=>{l.removeEventListener("keydown",a)}}),[])}function Op(e,t){e.contentEditable=t,t&&e.focus()}function Np(){const{startMultiSelect:e,stopMultiSelect:t}=(0,m.useDispatch)(xr),{isSelectionEnabled:n,hasMultiSelection:r,isDraggingBlocks:o}=(0,m.useSelect)(xr);return(0,f.useRefEffect)((i=>{const{ownerDocument:l}=i,{defaultView:a}=l;let s,c;function u(){t(),a.removeEventListener("mouseup",u),c=a.requestAnimationFrame((()=>{if(r())return;Op(i,!1);const e=a.getSelection();if(e.rangeCount){const{commonAncestorContainer:t}=e.getRangeAt(0);s.contains(t)&&s.focus()}}))}function p(t){let{buttons:r,target:c}=t;o()||1===r&&c.getAttribute("contenteditable")&&n()&&(s=l.activeElement,e(),a.addEventListener("mouseup",u),Op(i,!0))}return i.addEventListener("mouseout",p),()=>{i.removeEventListener("mouseout",p),a.removeEventListener("mouseup",u),a.cancelAnimationFrame(c)}}),[e,t,n,r])}function Mp(e,t){e.contentEditable=t,t&&e.focus()}function Rp(){const{multiSelect:e,selectBlock:t,selectionChange:n}=(0,m.useDispatch)(xr),{getBlockParents:r,getBlockSelectionStart:o}=(0,m.useSelect)(xr);return(0,f.useRefEffect)((n=>{const{ownerDocument:i}=n,{defaultView:l}=i;function a(i){const a=l.getSelection();if(!a.rangeCount)return;const s=i.shiftKey&&"mouseup"===i.type;if(a.isCollapsed&&!s)return void Mp(n,!1);let c=Hu(function(e){const{anchorNode:t,anchorOffset:n}=e;return t.nodeType===t.TEXT_NODE||0===n?t:t.childNodes[n-1]}(a)),u=Hu(function(e){const{focusNode:t,focusOffset:n}=e;return t.nodeType===t.TEXT_NODE||n===t.childNodes.length?t:t.childNodes[n]}(a));if(s){const e=o(),t=Hu(i.target),n=t!==u;(c===u&&a.isCollapsed||!u||n)&&(u=t),c!==e&&(c=e)}if(void 0===c&&void 0===u)return void Mp(n,!1);if(c===u)t(c);else{const t=[...r(c),c],n=[...r(u),u],o=function(e,t){let n=0;for(;e[n]===t[n];)n++;return n}(t,n);e(t[o],n[o])}}function s(){i.addEventListener("selectionchange",a),l.addEventListener("mouseup",a)}function c(){i.removeEventListener("selectionchange",a),l.removeEventListener("mouseup",a)}function u(){c(),s()}return s(),n.addEventListener("focusin",u),()=>{c(),n.removeEventListener("focusin",u)}}),[e,t,n,r])}function Fp(){const{selectBlock:e}=(0,m.useDispatch)(xr),{isSelectionEnabled:t,getBlockSelectionStart:n,hasMultiSelection:r}=(0,m.useSelect)(xr);return(0,f.useRefEffect)((o=>{function i(i){if(!t()||0!==i.button)return;const l=n(),a=Hu(i.target);i.shiftKey?l!==a&&(o.contentEditable=!0,o.focus()):r()&&e(a)}return o.addEventListener("mousedown",i),()=>{o.removeEventListener("mousedown",i)}}),[e,t,n,r])}function Lp(){const{__unstableIsFullySelected:e,getSelectedBlockClientIds:t,__unstableIsSelectionMergeable:n,hasMultiSelection:r}=(0,m.useSelect)(xr),{replaceBlocks:o,__unstableSplitSelection:i,removeBlocks:l,__unstableDeleteSelection:s,__unstableExpandSelection:c}=(0,m.useDispatch)(xr);return(0,f.useRefEffect)((u=>{function p(e){var t;r()&&null!==(t=e.inputType)&&void 0!==t&&t.startsWith("format")&&e.preventDefault()}function d(p){p.defaultPrevented||r()&&(p.keyCode===Xu.ENTER?(u.contentEditable=!1,p.preventDefault(),e()?o(t(),(0,a.createBlock)((0,a.getDefaultBlockName)())):i()):p.keyCode===Xu.BACKSPACE||p.keyCode===Xu.DELETE?(u.contentEditable=!1,p.preventDefault(),e()?l(t()):n()?s(p.keyCode===Xu.DELETE):c()):1!==p.key.length||p.metaKey||p.ctrlKey||(u.contentEditable=!1,n()?s(p.keyCode===Xu.DELETE):(p.preventDefault(),u.ownerDocument.defaultView.getSelection().removeAllRanges())))}function f(e){r()&&(u.contentEditable=!1,n()?s():(e.preventDefault(),u.ownerDocument.defaultView.getSelection().removeAllRanges()))}return u.addEventListener("beforeinput",p),u.addEventListener("keydown",d),u.addEventListener("compositionstart",f),()=>{u.removeEventListener("beforeinput",p),u.removeEventListener("keydown",d),u.removeEventListener("compositionstart",f)}}),[])}function Dp(){const[e,t,n]=function(){const e=(0,u.useRef)(),t=(0,u.useRef)(),n=(0,u.useRef)(),r=(0,u.useRef)(),{hasMultiSelection:o,getSelectedBlockClientId:i,getBlockCount:l}=(0,m.useSelect)(xr),{setNavigationMode:a}=(0,m.useDispatch)(xr),s=(0,m.useSelect)((e=>e(xr).isNavigationMode()),[])?void 0:"0",c=(0,u.useRef)();function p(t){if(c.current)c.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";Ml.focus.tabbable[n](t.target).focus()}}const d=(0,u.createElement)("div",{ref:t,tabIndex:s,onFocus:p}),y=(0,u.createElement)("div",{ref:n,tabIndex:s,onFocus:p}),g=(0,f.useRefEffect)((s=>{function u(e){if(e.defaultPrevented)return;if(e.keyCode===Xu.ESCAPE)return e.preventDefault(),void a(!0);if(e.keyCode!==Xu.TAB)return;const r=e.shiftKey,l=r?"findPrevious":"findNext";if(!o()&&!i())return void(e.target===s&&a(!0));if(((0,Ml.isFormElement)(e.target)||e.target.getAttribute("data-block")===i())&&(0,Ml.isFormElement)(Ml.focus.tabbable[l](e.target)))return;const u=r?t:n;c.current=!0,u.current.focus({preventScroll:!0})}function p(e){r.current=e.target;const{ownerDocument:t}=s;e.relatedTarget||t.activeElement!==t.body||0!==l()||s.focus()}function d(r){var o;if(r.keyCode!==Xu.TAB)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",l=Ml.focus.tabbable[i](r.target);l!==t.current&&l!==n.current||(r.preventDefault(),l.focus({preventScroll:!0}))}const{ownerDocument:f}=s,{defaultView:m}=f;return m.addEventListener("keydown",d),s.addEventListener("keydown",u),s.addEventListener("focusout",p),()=>{m.removeEventListener("keydown",d),s.removeEventListener("keydown",u),s.removeEventListener("focusout",p)}}),[]);return[d,(0,f.useMergeRefs)([e,g]),y]}(),r=(0,m.useSelect)((e=>e(xr).hasMultiSelection()),[]);return[e,(0,f.useMergeRefs)([t,Lp(),Np(),Rp(),Fp(),Ap(),Tp(),Bp(),(0,f.useRefEffect)((e=>{if(e.tabIndex=0,e.contentEditable=r,r)return e.classList.add("has-multi-selection"),e.setAttribute("aria-label",(0,_.__)("Multiple selected blocks")),()=>{e.classList.remove("has-multi-selection"),e.removeAttribute("aria-label")}}),[r])]),n]}var Up=(0,u.forwardRef)((function(e,t){let{children:n,...r}=e;const[o,i,l]=Dp();return(0,u.createElement)(u.Fragment,null,o,(0,u.createElement)("div",c({},r,{ref:(0,f.useMergeRefs)([i,t]),className:d()(r.className,"block-editor-writing-flow")}),n),l)}));function jp(e){return(0,u.useMemo)((()=>{const t=document.implementation.createHTMLDocument("");return t.body.innerHTML=e,Array.from(t.body.children)}),[e])}function zp(e){let{contentRef:t,children:n,head:r,tabIndex:o=0,scale:i=1,frameSize:l=0,readonly:a,forwardedRef:s,...p}=e;const y=(0,m.useSelect)((e=>e(xr).getSettings().__unstableResolvedAssets),[]),[,h]=(0,u.useReducer)((()=>({}))),[v,b]=(0,u.useState)(),[k,E]=(0,u.useState)([]),S=jp(null==y?void 0:y.styles),w=S.map((e=>e.id)),C=(0,u.useMemo)((()=>Array.from(document.styleSheets).reduce(((e,t)=>{try{t.cssRules}catch(t){return e}const{ownerNode:n,cssRules:r}=t;if(null===n)return e;if(!r)return e;if("LINK"!==n.tagName)return e;if("wp-reset-editor-styles-css"===n.id)return e;if(function e(t){return Array.from(t).find((t=>{let{selectorText:n,conditionText:r,cssRules:o}=t;return r?e(o):n&&(n.includes(".editor-styles-wrapper")||n.includes(".wp-block"))}))}(r)){e.push(n.cloneNode(!0));const t=n.id.replace("-css","-inline-css"),r=document.getElementById(t);r&&e.push(r.cloneNode(!0))}return e}),[])),[]).filter((e=>!w.includes(e.id))),I=jp(null==y?void 0:y.scripts),A=wp(),[x,B,P]=Dp(),[T,{height:O}]=(0,f.useResizeObserver)(),N=(0,f.useRefEffect)((e=>{let t;function n(e){e.preventDefault()}function r(){const{contentDocument:r,ownerDocument:o}=e,{readyState:i,documentElement:l}=r;return t=r,("interactive"===i||"complete"===i)&&(function(e){const{defaultView:t}=e,{frameElement:n}=t;function r(e){const r=Object.getPrototypeOf(e).constructor.name,o=window[r],i={};for(const t in e)i[t]=e[t];if(e instanceof t.MouseEvent){const e=n.getBoundingClientRect();i.clientX+=e.left,i.clientY+=e.top}const l=new o(e.type,i);!n.dispatchEvent(l)&&e.preventDefault()}const o=["dragover"];for(const t of o)e.addEventListener(t,r)}(r),b(r),A(l),E(Array.from(o.body.classList).filter((e=>e.startsWith("admin-color-")||e.startsWith("post-type-")||"wp-embed-responsive"===e))),r.dir=o.dir,l.removeChild(r.head),l.removeChild(r.body),t.addEventListener("dragover",n,!1),t.addEventListener("drop",n,!1),!0)}return e.addEventListener("load",r),()=>{var o,i;e.removeEventListener("load",r),null===(o=t)||void 0===o||o.removeEventListener("dragover",n),null===(i=t)||void 0===i||i.removeEventListener("drop",n)}}),[]),M=(0,f.useRefEffect)((e=>{I.reduce(((t,n)=>t.then((()=>async function(e,t){let{id:n,src:r}=t;return new Promise(((t,o)=>{const i=e.ownerDocument.createElement("script");i.id=n,r?(i.src=r,i.onload=()=>t(),i.onerror=()=>o()):t(),e.appendChild(i)}))}(e,n)))),Promise.resolve()).finally((()=>{h()}))}),[]),R=(0,f.useDisabled)({isDisabled:!a}),F=(0,f.useMergeRefs)([t,A,B,R]),L=(0,u.createElement)(u.Fragment,null,(0,u.createElement)("style",null,"html{height:auto!important;}body{margin:0}"),[...S,...C].map((e=>{let{tagName:t,href:n,id:r,rel:o,media:i,textContent:l}=e;const a=t.toLowerCase();return"style"===a?(0,u.createElement)(a,{id:r,key:r},l):(0,u.createElement)(a,{href:n,id:r,rel:o,media:i,key:r})}))),D=(0,u.useMemo)((()=>"<!doctype html>"+(0,u.renderToString)(L)),[]);return(0,u.createElement)(u.Fragment,null,o>=0&&x,(0,u.createElement)("iframe",c({},p,{ref:(0,f.useMergeRefs)([s,N]),tabIndex:o,srcDoc:D,title:(0,_.__)("Editor canvas")}),v&&(0,u.createPortal)((0,u.createElement)(u.Fragment,null,(0,u.createElement)("head",{ref:M},L,r,(0,u.createElement)("style",null,`html { transition: background 5s; ${l?"background: #2f2f2f; transition: background 0s;":""} }`)),(0,u.createElement)("body",{ref:F,className:d()("block-editor-iframe__body","editor-styles-wrapper",...k),style:{marginBottom:`-${O*(1-i)-l}px`,marginTop:l,transform:`scale( ${i} )`}},T,(0,u.createElement)(g.__experimentalStyleProvider,{document:v},n))),v.documentElement)),o>=0&&P)}var Vp=(0,u.forwardRef)((function(e,t){return(0,m.useSelect)((e=>e(xr).getSettings().__internalIsInitialized),[])?(0,u.createElement)(zp,c({},e,{forwardedRef:t})):null})),Gp={grad:.9,turn:360,rad:360/(2*Math.PI)},Hp=function(e){return"string"==typeof e?e.length>0:"number"==typeof e},Wp=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n+0},$p=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),e>n?n:e>t?e:t},Kp=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},qp=function(e){return{r:$p(e.r,0,255),g:$p(e.g,0,255),b:$p(e.b,0,255),a:$p(e.a)}},Jp=function(e){return{r:Wp(e.r),g:Wp(e.g),b:Wp(e.b),a:Wp(e.a,3)}},Yp=/^#([0-9a-f]{3,8})$/i,Qp=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},Zp=function(e){var t=e.r,n=e.g,r=e.b,o=e.a,i=Math.max(t,n,r),l=i-Math.min(t,n,r),a=l?i===t?(n-r)/l:i===n?2+(r-t)/l:4+(t-n)/l:0;return{h:60*(a<0?a+6:a),s:i?l/i*100:0,v:i/255*100,a:o}},Xp=function(e){var t=e.h,n=e.s,r=e.v,o=e.a;t=t/360*6,n/=100,r/=100;var i=Math.floor(t),l=r*(1-n),a=r*(1-(t-i)*n),s=r*(1-(1-t+i)*n),c=i%6;return{r:255*[r,a,l,l,s,r][c],g:255*[s,r,r,a,l,l][c],b:255*[l,l,s,r,r,a][c],a:o}},ed=function(e){return{h:Kp(e.h),s:$p(e.s,0,100),l:$p(e.l,0,100),a:$p(e.a)}},td=function(e){return{h:Wp(e.h),s:Wp(e.s),l:Wp(e.l),a:Wp(e.a,3)}},nd=function(e){return Xp((n=(t=e).s,{h:t.h,s:(n*=((r=t.l)<50?r:100-r)/100)>0?2*n/(r+n)*100:0,v:r+n,a:t.a}));var t,n,r},rd=function(e){return{h:(t=Zp(e)).h,s:(o=(200-(n=t.s))*(r=t.v)/100)>0&&o<200?n*r/100/(o<=100?o:200-o)*100:0,l:o/2,a:t.a};var t,n,r,o},od=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,id=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,ld=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,ad=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,sd={string:[[function(e){var t=Yp.exec(e);return t?(e=t[1]).length<=4?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:4===e.length?Wp(parseInt(e[3]+e[3],16)/255,2):1}:6===e.length||8===e.length?{r:parseInt(e.substr(0,2),16),g:parseInt(e.substr(2,2),16),b:parseInt(e.substr(4,2),16),a:8===e.length?Wp(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=ld.exec(e)||ad.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:qp({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:void 0===t[7]?1:Number(t[7])/(t[8]?100:1)}):null},"rgb"],[function(e){var t=od.exec(e)||id.exec(e);if(!t)return null;var n,r,o=ed({h:(n=t[1],r=t[2],void 0===r&&(r="deg"),Number(n)*(Gp[r]||1)),s:Number(t[3]),l:Number(t[4]),a:void 0===t[5]?1:Number(t[5])/(t[6]?100:1)});return nd(o)},"hsl"]],object:[[function(e){var t=e.r,n=e.g,r=e.b,o=e.a,i=void 0===o?1:o;return Hp(t)&&Hp(n)&&Hp(r)?qp({r:Number(t),g:Number(n),b:Number(r),a:Number(i)}):null},"rgb"],[function(e){var t=e.h,n=e.s,r=e.l,o=e.a,i=void 0===o?1:o;if(!Hp(t)||!Hp(n)||!Hp(r))return null;var l=ed({h:Number(t),s:Number(n),l:Number(r),a:Number(i)});return nd(l)},"hsl"],[function(e){var t=e.h,n=e.s,r=e.v,o=e.a,i=void 0===o?1:o;if(!Hp(t)||!Hp(n)||!Hp(r))return null;var l=function(e){return{h:Kp(e.h),s:$p(e.s,0,100),v:$p(e.v,0,100),a:$p(e.a)}}({h:Number(t),s:Number(n),v:Number(r),a:Number(i)});return Xp(l)},"hsv"]]},cd=function(e,t){for(var n=0;n<t.length;n++){var r=t[n][0](e);if(r)return[r,t[n][1]]}return[null,void 0]},ud=function(e){return"string"==typeof e?cd(e.trim(),sd.string):"object"==typeof e&&null!==e?cd(e,sd.object):[null,void 0]},pd=function(e,t){var n=rd(e);return{h:n.h,s:$p(n.s+100*t,0,100),l:n.l,a:n.a}},dd=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},fd=function(e,t){var n=rd(e);return{h:n.h,s:n.s,l:$p(n.l+100*t,0,100),a:n.a}},md=function(){function e(e){this.parsed=ud(e)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return e.prototype.isValid=function(){return null!==this.parsed},e.prototype.brightness=function(){return Wp(dd(this.rgba),2)},e.prototype.isDark=function(){return dd(this.rgba)<.5},e.prototype.isLight=function(){return dd(this.rgba)>=.5},e.prototype.toHex=function(){return t=(e=Jp(this.rgba)).r,n=e.g,r=e.b,i=(o=e.a)<1?Qp(Wp(255*o)):"","#"+Qp(t)+Qp(n)+Qp(r)+i;var e,t,n,r,o,i},e.prototype.toRgb=function(){return Jp(this.rgba)},e.prototype.toRgbString=function(){return t=(e=Jp(this.rgba)).r,n=e.g,r=e.b,(o=e.a)<1?"rgba("+t+", "+n+", "+r+", "+o+")":"rgb("+t+", "+n+", "+r+")";var e,t,n,r,o},e.prototype.toHsl=function(){return td(rd(this.rgba))},e.prototype.toHslString=function(){return t=(e=td(rd(this.rgba))).h,n=e.s,r=e.l,(o=e.a)<1?"hsla("+t+", "+n+"%, "+r+"%, "+o+")":"hsl("+t+", "+n+"%, "+r+"%)";var e,t,n,r,o},e.prototype.toHsv=function(){return e=Zp(this.rgba),{h:Wp(e.h),s:Wp(e.s),v:Wp(e.v),a:Wp(e.a,3)};var e},e.prototype.invert=function(){return yd({r:255-(e=this.rgba).r,g:255-e.g,b:255-e.b,a:e.a});var e},e.prototype.saturate=function(e){return void 0===e&&(e=.1),yd(pd(this.rgba,e))},e.prototype.desaturate=function(e){return void 0===e&&(e=.1),yd(pd(this.rgba,-e))},e.prototype.grayscale=function(){return yd(pd(this.rgba,-1))},e.prototype.lighten=function(e){return void 0===e&&(e=.1),yd(fd(this.rgba,e))},e.prototype.darken=function(e){return void 0===e&&(e=.1),yd(fd(this.rgba,-e))},e.prototype.rotate=function(e){return void 0===e&&(e=15),this.hue(this.hue()+e)},e.prototype.alpha=function(e){return"number"==typeof e?yd({r:(t=this.rgba).r,g:t.g,b:t.b,a:e}):Wp(this.rgba.a,3);var t},e.prototype.hue=function(e){var t=rd(this.rgba);return"number"==typeof e?yd({h:e,s:t.s,l:t.l,a:t.a}):Wp(t.h)},e.prototype.isEqual=function(e){return this.toHex()===yd(e).toHex()},e}(),yd=function(e){return e instanceof md?e:new md(e)},gd=[],hd=function(e){e.forEach((function(e){gd.indexOf(e)<0&&(e(md,sd),gd.push(e))}))};function vd(e,t){var n={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},r={};for(var o in n)r[n[o]]=o;var i={};e.prototype.toName=function(t){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var o,l,a=r[this.toHex()];if(a)return a;if(null==t?void 0:t.closest){var s=this.toRgb(),c=1/0,u="black";if(!i.length)for(var p in n)i[p]=new e(n[p]).toRgb();for(var d in n){var f=(o=s,l=i[d],Math.pow(o.r-l.r,2)+Math.pow(o.g-l.g,2)+Math.pow(o.b-l.b,2));f<c&&(c=f,u=d)}return u}},t.string.push([function(t){var r=t.toLowerCase(),o="transparent"===r?"#0000":n[r];return o?new e(o).toRgb():null},"name"])}var bd=function(e){var t=e/255;return t<.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)},_d=function(e){return.2126*bd(e.r)+.7152*bd(e.g)+.0722*bd(e.b)};function kd(e){e.prototype.luminance=function(){return e=_d(this.rgba),void 0===(t=2)&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n+0;var e,t,n},e.prototype.contrast=function(t){void 0===t&&(t="#FFF");var n,r,o,i,l,a,s,c=t instanceof e?t:new e(t);return i=this.rgba,l=c.toRgb(),n=(a=_d(i))>(s=_d(l))?(a+.05)/(s+.05):(s+.05)/(a+.05),void 0===(r=2)&&(r=0),void 0===o&&(o=Math.pow(10,r)),Math.floor(o*n)/o+0},e.prototype.isReadable=function(e,t){return void 0===e&&(e="#FFF"),void 0===t&&(t={}),this.contrast(e)>=(l=void 0===(i=(n=t).size)?"normal":i,"AAA"===(o=void 0===(r=n.level)?"AA":r)&&"normal"===l?7:"AA"===o&&"large"===l?3:4.5);var n,r,o,i,l}}var Ed=n(3124),Sd=n.n(Ed);const wd=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;function Cd(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 l(e),f(),t}}function l(e){this.start=e,this.end={line:n,column:r},this.source=t.source}l.prototype.content=e;const a=[];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;a.push(i)}function c(){return d(/^{\s*/)}function u(){return d(/^}/)}function p(){let t;const n=[];for(f(),m(n);e.length&&"}"!==e.charAt(0)&&(t=w()||C());)!1!==t&&(n.push(t),m(n));return n}function d(t){const n=t.exec(e);if(!n)return;const r=n[0];return o(r),e=e.slice(r.length),n}function f(){d(/^\s*/)}function m(e){let t;for(e=e||[];t=y();)!1!==t&&e.push(t);return e}function y(){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 l=e.slice(2,n-2);return r+=2,o(l),e=e.slice(n),r+=2,t({type:"comment",comment:l})}function g(){const e=d(/^([^{]+)/);if(e)return Id(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 h(){const e=i();let t=d(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(!t)return;if(t=Id(t[0]),!d(/^:\s*/))return s("property missing ':'");const n=d(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),r=e({type:"declaration",property:t.replace(wd,""),value:n?Id(n[0]).replace(wd,""):""});return d(/^[;\s]*/),r}function v(){const e=[];if(!c())return s("missing '{'");let t;for(m(e);t=h();)!1!==t&&(e.push(t),m(e));return u()?e:s("missing '}'")}function b(){let e;const t=[],n=i();for(;e=d(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)t.push(e[1]),d(/^,\s*/);if(t.length)return n({type:"keyframe",values:t,declarations:v()})}const _=S("import"),k=S("charset"),E=S("namespace");function S(e){const t=new RegExp("^@"+e+"\\s*([^;]+);");return function(){const n=i(),r=d(t);if(!r)return;const o={type:e};return o[e]=r[1].trim(),n(o)}}function w(){if("@"===e[0])return function(){const e=i();let t=d(/^@([-\w]+)?keyframes\s*/);if(!t)return;const n=t[1];if(t=d(/^([-\w]+)\s*/),!t)return s("@keyframes missing name");const r=t[1];if(!c())return s("@keyframes missing '{'");let o,l=m();for(;o=b();)l.push(o),l=l.concat(m());return u()?e({type:"keyframes",name:r,vendor:n,keyframes:l}):s("@keyframes missing '}'")}()||function(){const e=i(),t=d(/^@media *([^{]+)/);if(!t)return;const n=Id(t[1]);if(!c())return s("@media missing '{'");const r=m().concat(p());return u()?e({type:"media",media:n,rules:r}):s("@media missing '}'")}()||function(){const e=i(),t=d(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(t)return e({type:"custom-media",name:Id(t[1]),media:Id(t[2])})}()||function(){const e=i(),t=d(/^@supports *([^{]+)/);if(!t)return;const n=Id(t[1]);if(!c())return s("@supports missing '{'");const r=m().concat(p());return u()?e({type:"supports",supports:n,rules:r}):s("@supports missing '}'")}()||_()||k()||E()||function(){const e=i(),t=d(/^@([-\w]+)?document *([^{]+)/);if(!t)return;const n=Id(t[1]),r=Id(t[2]);if(!c())return s("@document missing '{'");const o=m().concat(p());return u()?e({type:"document",document:r,vendor:n,rules:o}):s("@document missing '}'")}()||function(){const e=i();if(!d(/^@page */))return;const t=g()||[];if(!c())return s("@page missing '{'");let n,r=m();for(;n=h();)r.push(n),r=r.concat(m());return u()?e({type:"page",selectors:t,declarations:r}):s("@page missing '}'")}()||function(){const e=i();if(!d(/^@host\s*/))return;if(!c())return s("@host missing '{'");const t=m().concat(p());return u()?e({type:"host",rules:t}):s("@host missing '}'")}()||function(){const e=i();if(!d(/^@font-face\s*/))return;if(!c())return s("@font-face missing '{'");let t,n=m();for(;t=h();)n.push(t),n=n.concat(m());return u()?e({type:"font-face",declarations:n}):s("@font-face missing '}'")}()}function C(){const e=i(),t=g();return t?(m(),e({type:"rule",selectors:t,declarations:v()})):s("selector missing")}return Ad(function(){const e=p();return{type:"stylesheet",stylesheet:{source:t.source,rules:e,parsingErrors:a}}}())}function Id(e){return e?e.replace(/^\s+|\s+$/g,""):""}function Ad(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){Ad(e,r)})):n&&"object"==typeof n&&Ad(n,r)}return n&&Object.defineProperty(e,"parent",{configurable:!0,writable:!0,enumerable:!1,value:t||null}),e}var xd=n(8575),Bd=n.n(xd),Pd=Td;function Td(e){this.options=e||{}}Td.prototype.emit=function(e){return e},Td.prototype.visit=function(e){return this[e.type](e)},Td.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 Od=Nd;function Nd(e){Pd.call(this,e)}Bd()(Nd,Pd),Nd.prototype.compile=function(e){return e.stylesheet.rules.map(this.visit,this).join("")},Nd.prototype.comment=function(e){return this.emit("",e.position)},Nd.prototype.import=function(e){return this.emit("@import "+e.import+";",e.position)},Nd.prototype.media=function(e){return this.emit("@media "+e.media,e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")},Nd.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("}")},Nd.prototype.charset=function(e){return this.emit("@charset "+e.charset+";",e.position)},Nd.prototype.namespace=function(e){return this.emit("@namespace "+e.namespace+";",e.position)},Nd.prototype.supports=function(e){return this.emit("@supports "+e.supports,e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")},Nd.prototype.keyframes=function(e){return this.emit("@"+(e.vendor||"")+"keyframes "+e.name,e.position)+this.emit("{")+this.mapVisit(e.keyframes)+this.emit("}")},Nd.prototype.keyframe=function(e){const t=e.declarations;return this.emit(e.values.join(","),e.position)+this.emit("{")+this.mapVisit(t)+this.emit("}")},Nd.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("}")},Nd.prototype["font-face"]=function(e){return this.emit("@font-face",e.position)+this.emit("{")+this.mapVisit(e.declarations)+this.emit("}")},Nd.prototype.host=function(e){return this.emit("@host",e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")},Nd.prototype["custom-media"]=function(e){return this.emit("@custom-media "+e.name+" "+e.media+";",e.position)},Nd.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("}"):""},Nd.prototype.declaration=function(e){return this.emit(e.property+":"+e.value,e.position)+this.emit(";")};var Md=Rd;function Rd(e){e=e||{},Pd.call(this,e),this.indentation=e.indent}Bd()(Rd,Pd),Rd.prototype.compile=function(e){return this.stylesheet(e)},Rd.prototype.stylesheet=function(e){return this.mapVisit(e.stylesheet.rules,"\n\n")},Rd.prototype.comment=function(e){return this.emit(this.indent()+"/*"+e.comment+"*/",e.position)},Rd.prototype.import=function(e){return this.emit("@import "+e.import+";",e.position)},Rd.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}")},Rd.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}")},Rd.prototype.charset=function(e){return this.emit("@charset "+e.charset+";",e.position)},Rd.prototype.namespace=function(e){return this.emit("@namespace "+e.namespace+";",e.position)},Rd.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}")},Rd.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)+"}")},Rd.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")},Rd.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}")},Rd.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}")},Rd.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}")},Rd.prototype["custom-media"]=function(e){return this.emit("@custom-media "+e.name+" "+e.media+";",e.position)},Rd.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()+"}"):""},Rd.prototype.declaration=function(e){return this.emit(this.indent())+this.emit(e.property+": "+e.value,e.position)+this.emit(";")},Rd.prototype.indent=function(e){return this.level=this.level||1,null!==e?(this.level+=e,""):Array(this.level).join(this.indentation||" ")};var Fd=function(e,t){try{const o=Cd(e),i=Sd().map(o,(function(e){if(!e)return e;const n=t(e);return this.update(n)}));return n=i,((r=r||{}).compress?new Od(r):new Md(r)).compile(n)}catch(e){return console.warn("Error while traversing the CSS: "+e),null}var n,r};function Ld(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 Dd(e,t){return new URL(e,t).toString()}var Ud=e=>t=>{if("declaration"===t.type){const i=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]};Ld(e)&&r.push(e)}return r}(t.value).map((o=e,e=>({...e,newUrl:"url("+e.before+e.quote+Dd(e.value,o)+e.quote+e.after+")"})));return{...t,value:(n=t.value,r=i,r.forEach((e=>{n=n.replace(e.source,e.newUrl)})),n)}}var n,r,o;return t};const jd=/^(body|html|:root).*$/;var zd=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return n=>{const r=n=>t.includes(n.trim())?n:n.match(jd)?n.replace(/^(body|html|:root)/,e):e+" "+n;return"rule"===n.type?{...n,selectors:n.selectors.map(r)}:n}};var Vd=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return Object.values(null!=e?e:[]).map((e=>{let{css:n,baseURL:r}=e;const o=[];return t&&o.push(zd(t)),r&&o.push(Ud(r)),o.length?Fd(n,(0,f.compose)(o)):n}))};const Gd=".editor-styles-wrapper";function Hd(e){return(0,u.useCallback)((e=>{if(!e)return;const{ownerDocument:t}=e,{defaultView:n,body:r}=t,o=t.querySelector(Gd);let i;if(o)i=n.getComputedStyle(o,null).getPropertyValue("background-color");else{const e=t.createElement("div");e.classList.add("editor-styles-wrapper"),r.appendChild(e),i=n.getComputedStyle(e,null).getPropertyValue("background-color"),r.removeChild(e)}const l=yd(i);l.luminance()>.5||0===l.alpha()?r.classList.remove("is-dark-theme"):r.classList.add("is-dark-theme")}),[e])}function Wd(e){let{styles:t}=e;const n=(0,u.useMemo)((()=>Vd(t,Gd)),[t]);return(0,u.createElement)(u.Fragment,null,(0,u.createElement)("style",{ref:Hd(t)}),n.map(((e,t)=>(0,u.createElement)("style",{key:t},e))))}function $d(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t={r:[],g:[],b:[],a:[]};return e.forEach((e=>{const n=yd(e).toRgb();t.r.push(n.r/255),t.g.push(n.g/255),t.b.push(n.b/255),t.a.push(n.a)})),t}function Kd(e){let{selector:t,id:n}=e;const r=`\n${t} {\n\tfilter: url( #${n} );\n}\n`;return(0,u.createElement)("style",null,r)}function qd(e){let{selector:t}=e;const n=`\n${t} {\n\tfilter: none;\n}\n`;return(0,u.createElement)("style",null,n)}function Jd(e){let{id:t,colors:n}=e;const r=$d(n);return(0,u.createElement)(g.SVG,{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,u.createElement)("defs",null,(0,u.createElement)("filter",{id:t},(0,u.createElement)("feColorMatrix",{colorInterpolationFilters:"sRGB",type:"matrix",values:" .299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 "}),(0,u.createElement)("feComponentTransfer",{colorInterpolationFilters:"sRGB"},(0,u.createElement)("feFuncR",{type:"table",tableValues:r.r.join(" ")}),(0,u.createElement)("feFuncG",{type:"table",tableValues:r.g.join(" ")}),(0,u.createElement)("feFuncB",{type:"table",tableValues:r.b.join(" ")}),(0,u.createElement)("feFuncA",{type:"table",tableValues:r.a.join(" ")})),(0,u.createElement)("feComposite",{in2:"SourceGraphic",operator:"in"}))))}function Yd(e){let{preset:t}=e;return(0,u.createElement)(Jd,{id:`wp-duotone-${t.slug}`,colors:t.colors})}let Qd;hd([vd,kd]);const Zd=2e3;function Xd(e){let{viewportWidth:t,containerWidth:n,minHeight:r,additionalStyles:o=[]}=e;t||(t=n);const[i,{height:l}]=(0,f.useResizeObserver)(),{styles:a,duotone:s}=(0,m.useSelect)((e=>{var t,n;const r=e(xr).getSettings();return{styles:r.styles,duotone:null===(t=r.__experimentalFeatures)||void 0===t||null===(n=t.color)||void 0===n?void 0:n.duotone}}),[]),c=(0,u.useMemo)((()=>a?[...a,{css:"body{height:auto;overflow:hidden;border:none;padding:0;}",__unstableType:"presets"},...o]:a),[a,o]),p=(0,u.useMemo)((()=>{var e,t;return[...null!==(e=null==s?void 0:s.default)&&void 0!==e?e:[],...null!==(t=null==s?void 0:s.theme)&&void 0!==t?t:[]]}),[s]);Qd=Qd||(0,f.pure)(Jh);const d=n/t;return(0,u.createElement)(g.Disabled,{className:"block-editor-block-preview__content",style:{transform:`scale(${d})`,height:l*d,maxHeight:l>Zd?Zd*d:void 0,minHeight:r}},(0,u.createElement)(Vp,{head:(0,u.createElement)(Wd,{styles:c}),contentRef:(0,f.useRefEffect)((e=>{const{ownerDocument:{documentElement:t}}=e;t.classList.add("block-editor-block-preview__content-iframe"),t.style.position="absolute",t.style.width="100%",e.style.boxSizing="border-box",e.style.position="absolute",e.style.width="100%"}),[]),"aria-hidden":!0,tabIndex:-1,style:{position:"absolute",width:t,height:l,pointerEvents:"none",maxHeight:Zd,minHeight:0!==d&&d<1&&r?r/d:r}},i,p.map((e=>(0,u.createElement)(Yd,{preset:e,key:e.slug}))),(0,u.createElement)(Qd,{renderAppender:!1})))}function ef(e){const[t,{width:n}]=(0,f.useResizeObserver)();return(0,u.createElement)(u.Fragment,null,(0,u.createElement)("div",{style:{position:"relative",width:"100%",height:0}},t),(0,u.createElement)("div",{className:"block-editor-block-preview__container"},!!n&&(0,u.createElement)(Xd,c({},e,{containerWidth:n}))))}var tf=(0,u.memo)((function(e){let{blocks:t,viewportWidth:n=1200,minHeight:r,additionalStyles:o=[],__experimentalMinHeight:i,__experimentalPadding:l}=e;i&&(r=i,$()("The __experimentalMinHeight prop",{since:"6.2",version:"6.4",alternative:"minHeight"})),l&&(o=[...o,{css:`body { padding: ${l}px; }`}],$()("The __experimentalPadding prop of BlockPreview",{since:"6.2",version:"6.4",alternative:"additionalStyles"}));const a=(0,m.useSelect)((e=>e(xr).getSettings()),[]),s=(0,u.useMemo)((()=>({...a,__unstableIsPreviewMode:!0})),[a]),c=(0,u.useMemo)((()=>Array.isArray(t)?t:[t]),[t]);return t&&0!==t.length?(0,u.createElement)(Ep,{value:c,settings:s},(0,u.createElement)(ef,{viewportWidth:n,minHeight:r,additionalStyles:o})):null}));function nf(e){let{blocks:t,props:n={},__experimentalLayout:r}=e;const o=(0,m.useSelect)((e=>e(xr).getSettings()),[]),i=(0,u.useMemo)((()=>({...o,__unstableIsPreviewMode:!0})),[o]),l=(0,f.useDisabled)(),a=(0,f.useMergeRefs)([n.ref,l]),s=(0,u.useMemo)((()=>Array.isArray(t)?t:[t]),[t]),c=(0,u.createElement)(Ep,{value:s,settings:i},(0,u.createElement)(Qh,{renderAppender:!1,__experimentalLayout:r}));return{...n,ref:a,className:d()(n.className,"block-editor-block-preview__live-content","components-disabled"),children:null!=t&&t.length?c:null}}var rf=function(e){var t;let{item:n}=e;const{name:r,title:o,icon:i,description:l,initialAttributes:s,example:c}=n,p=(0,a.isReusableBlock)(n);return(0,u.createElement)("div",{className:"block-editor-inserter__preview-container"},(0,u.createElement)("div",{className:"block-editor-inserter__preview"},p||c?(0,u.createElement)("div",{className:"block-editor-inserter__preview-content"},(0,u.createElement)(tf,{blocks:c?(0,a.getBlockFromExample)(r,{attributes:{...c.attributes,...s},innerBlocks:c.innerBlocks}):(0,a.createBlock)(r,s),viewportWidth:null!==(t=null==c?void 0:c.viewportWidth)&&void 0!==t?t:500,additionalStyles:[{css:"body { padding: 16px; }"}]})):(0,u.createElement)("div",{className:"block-editor-inserter__preview-content-missing"},(0,_.__)("No Preview Available."))),!p&&(0,u.createElement)(vp,{title:o,icon:i,description:l}))};var of=(0,u.createContext)();var lf=(0,u.forwardRef)((function(e,t){let{isFirst:n,as:r,children:o,...i}=e;const l=(0,u.useContext)(of);return(0,u.createElement)(g.__unstableCompositeItem,c({ref:t,state:l,role:"option",focusable:!0},i),(e=>{const t={...e,tabIndex:n?0:e.tabIndex};return r?(0,u.createElement)(r,t,o):"function"==typeof o?o(t):(0,u.createElement)(g.Button,t,o)}))}));var af=(0,u.createElement)(V.SVG,{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M8 7h2V5H8v2zm0 6h2v-2H8v2zm0 6h2v-2H8v2zm6-14v2h2V5h-2zm0 8h2v-2h-2v2zm0 6h2v-2h-2v2z"}));function sf(e){let{count:t,icon:n,isPattern:r}=e;const o=r&&(0,_.__)("Pattern");return(0,u.createElement)("div",{className:"block-editor-block-draggable-chip-wrapper"},(0,u.createElement)("div",{className:"block-editor-block-draggable-chip","data-testid":"block-draggable-chip"},(0,u.createElement)(g.Flex,{justify:"center",className:"block-editor-block-draggable-chip__content"},(0,u.createElement)(g.FlexItem,null,n?(0,u.createElement)(hp,{icon:n}):o||(0,_.sprintf)((0,_._n)("%d block","%d blocks",t),t)),(0,u.createElement)(g.FlexItem,null,(0,u.createElement)(hp,{icon:af})))))}var cf=e=>{let{isEnabled:t,blocks:n,icon:r,children:o,isPattern:i}=e;const l={type:"inserter",blocks:n};return(0,u.createElement)(g.Draggable,{__experimentalTransferDataType:"wp-blocks",transferData:l,__experimentalDragComponent:(0,u.createElement)(sf,{count:n.length,icon:r,isPattern:i})},(e=>{let{onDraggableStart:n,onDraggableEnd:r}=e;return o({draggable:t,onDragStart:t?n:void 0,onDragEnd:t?r:void 0})}))};var uf=(0,u.memo)((function(e){let{className:t,isFirst:n,item:r,onSelect:o,onHover:i,isDraggable:l,...s}=e;const p=(0,u.useRef)(!1),f=r.icon?{backgroundColor:r.icon.background,color:r.icon.foreground}:{},m=(0,u.useMemo)((()=>[(0,a.createBlock)(r.name,r.initialAttributes,(0,a.createBlocksFromInnerBlocksTemplate)(r.innerBlocks))]),[r.name,r.initialAttributes,r.initialAttributes]),y=(0,a.isReusableBlock)(r)||(0,a.isTemplatePart)(r);return(0,u.createElement)(cf,{isEnabled:l&&!r.disabled,blocks:m,icon:r.icon},(e=>{let{draggable:l,onDragStart:a,onDragEnd:m}=e;return(0,u.createElement)("div",{className:d()("block-editor-block-types-list__list-item",{"is-synced":y}),draggable:l,onDragStart:e=>{p.current=!0,a&&(i(null),a(e))},onDragEnd:e=>{p.current=!1,m&&m(e)}},(0,u.createElement)(lf,c({isFirst:n,className:d()("block-editor-block-types-list__item",t),disabled:r.isDisabled,onClick:e=>{e.preventDefault(),o(r,(0,Xu.isAppleOS)()?e.metaKey:e.ctrlKey),i(null)},onKeyDown:e=>{const{keyCode:t}=e;t===Xu.ENTER&&(e.preventDefault(),o(r,(0,Xu.isAppleOS)()?e.metaKey:e.ctrlKey),i(null))},onMouseEnter:()=>{p.current||i(r)},onMouseLeave:()=>i(null)},s),(0,u.createElement)("span",{className:"block-editor-block-types-list__item-icon",style:f},(0,u.createElement)(hp,{icon:r.icon,showColors:!0})),(0,u.createElement)("span",{className:"block-editor-block-types-list__item-title"},(0,u.createElement)(g.__experimentalTruncate,{numberOfLines:3},r.title))))}))}));var pf=(0,u.forwardRef)((function(e,t){const[n,r]=(0,u.useState)(!1);return(0,u.useEffect)((()=>{n&&(0,dn.speak)((0,_.__)("Use left and right arrow keys to move through blocks"))}),[n]),(0,u.createElement)("div",c({ref:t,role:"listbox","aria-orientation":"horizontal",onFocus:()=>{r(!0)},onBlur:e=>{!e.currentTarget.contains(e.relatedTarget)&&r(!1)}},e))}));var df=(0,u.forwardRef)((function(e,t){const n=(0,u.useContext)(of);return(0,u.createElement)(g.__unstableCompositeGroup,c({state:n,role:"presentation",ref:t},e))}));var ff=function(e){let{items:t=[],onSelect:n,onHover:r=(()=>{}),children:o,label:i,isDraggable:l=!0}=e;return(0,u.createElement)(pf,{className:"block-editor-block-types-list","aria-label":i},function(e,t){const n=[];for(let r=0,o=e.length;r<o;r+=t)n.push(e.slice(r,r+t));return n}(t,3).map(((e,t)=>(0,u.createElement)(df,{key:t},e.map(((e,o)=>(0,u.createElement)(uf,{key:e.id,item:e,className:(0,a.getBlockMenuDefaultClassName)(e.id),onSelect:n,onHover:r,isDraggable:l&&!e.isDisabled,isFirst:0===t&&0===o})))))),o)};var mf=function(e){let{title:t,icon:n,children:r}=e;return(0,u.createElement)(u.Fragment,null,(0,u.createElement)("div",{className:"block-editor-inserter__panel-header"},(0,u.createElement)("h2",{className:"block-editor-inserter__panel-title"},t),(0,u.createElement)(g.Icon,{icon:n})),(0,u.createElement)("div",{className:"block-editor-inserter__panel-content"},r))};var yf=(e,t)=>{const{categories:n,collections:r,items:o}=(0,m.useSelect)((t=>{const{getInserterItems:n}=t(xr),{getCategories:r,getCollections:o}=t(a.store);return{categories:r(),collections:o(),items:n(e)}}),[e]);return[o,n,r,(0,u.useCallback)(((e,n)=>{let{name:r,initialAttributes:o,innerBlocks:i}=e;const l=(0,a.createBlock)(r,o,(0,a.createBlocksFromInnerBlocksTemplate)(i));t(l,void 0,n)}),[t])]};var gf=function(e){let{children:t}=e;const n=(0,g.__unstableUseCompositeState)({shift:!0,wrap:"horizontal"});return(0,u.createElement)(of.Provider,{value:n},t)};const hf=[];var vf=function(e){let{rootClientId:t,onInsert:n,onHover:r,showMostUsedBlocks:o}=e;const[i,l,a,s]=yf(t,n),c=(0,u.useMemo)((()=>J(i,"frecency","desc").slice(0,6)),[i]),p=(0,u.useMemo)((()=>i.filter((e=>!e.category))),[i]),d=(0,u.useMemo)((()=>(0,f.pipe)((e=>e.filter((e=>e.category&&"reusable"!==e.category))),(e=>(0,y.groupBy)(e,"category")))(i)),[i]),m=(0,u.useMemo)((()=>{const e={...a};return Object.keys(a).forEach((t=>{e[t]=i.filter((e=>(e=>e.name.split("/")[0])(e)===t)),0===e[t].length&&delete e[t]})),e}),[i,a]);(0,u.useEffect)((()=>()=>r(null)),[]);const g=(0,f.useAsyncList)(l),h=l.length===g.length,v=(0,u.useMemo)((()=>Object.entries(a)),[a]),b=(0,f.useAsyncList)(h?v:hf);return(0,u.createElement)(gf,null,(0,u.createElement)("div",null,o&&!!c.length&&(0,u.createElement)(mf,{title:(0,_._x)("Most used","blocks")},(0,u.createElement)(ff,{items:c,onSelect:s,onHover:r,label:(0,_._x)("Most used","blocks")})),g.map((e=>{const t=d[e.slug];return t&&t.length?(0,u.createElement)(mf,{key:e.slug,title:e.title,icon:e.icon},(0,u.createElement)(ff,{items:t,onSelect:s,onHover:r,label:e.title})):null})),h&&p.length>0&&(0,u.createElement)(mf,{className:"block-editor-inserter__uncategorized-blocks-panel",title:(0,_.__)("Uncategorized")},(0,u.createElement)(ff,{items:p,onSelect:s,onHover:r,label:(0,_.__)("Uncategorized")})),b.map((e=>{let[t,n]=e;const o=m[t];return o&&o.length?(0,u.createElement)(mf,{key:t,title:n.title,icon:n.icon},(0,u.createElement)(ff,{items:o,onSelect:s,onHover:r,label:n.title})):null}))))},bf=window.wp.notices;var _f=(e,t)=>{const{patternCategories:n,patterns:r}=(0,m.useSelect)((e=>{const{__experimentalGetAllowedPatterns:n,getSettings:r}=e(xr);return{patterns:n(t),patternCategories:r().__experimentalBlockPatternCategories}}),[t]),{createSuccessNotice:o}=(0,m.useDispatch)(bf.store),i=(0,u.useCallback)(((t,n)=>{e((null!=n?n:[]).map((e=>(0,a.cloneBlock)(e))),t.name),o((0,_.sprintf)((0,_.__)('Block pattern "%s" inserted.'),t.title),{type:"snackbar"})}),[]);return[r,n,i]};const kf=e=>{let{showTooltip:t,title:n,children:r}=e;return t?(0,u.createElement)(g.Tooltip,{text:n},r):(0,u.createElement)(u.Fragment,null,r)};function Ef(e){let{isDraggable:t,pattern:n,onClick:r,onHover:o,composite:i,showTooltip:l}=e;const[a,s]=(0,u.useState)(!1),{blocks:p,viewportWidth:d}=n,m=`block-editor-block-patterns-list__item-description-${(0,f.useInstanceId)(Ef)}`;return(0,u.createElement)(cf,{isEnabled:t,blocks:p,isPattern:!!n},(e=>{let{draggable:t,onDragStart:f,onDragEnd:y}=e;return(0,u.createElement)("div",{className:"block-editor-block-patterns-list__list-item",draggable:t,onDragStart:e=>{s(!0),f&&(null==o||o(null),f(e))},onDragEnd:e=>{s(!1),y&&y(e)}},(0,u.createElement)(kf,{showTooltip:l,title:n.title},(0,u.createElement)(g.__unstableCompositeItem,c({role:"option",as:"div"},i,{className:"block-editor-block-patterns-list__item",onClick:()=>{r(n,p),null==o||o(null)},onMouseEnter:()=>{a||null==o||o(n)},onMouseLeave:()=>null==o?void 0:o(null),"aria-label":n.title,"aria-describedby":n.description?m:void 0}),(0,u.createElement)(tf,{blocks:p,viewportWidth:d}),!l&&(0,u.createElement)("div",{className:"block-editor-block-patterns-list__item-title"},n.title),!!n.description&&(0,u.createElement)(g.VisuallyHidden,{id:m},n.description))))}))}function Sf(){return(0,u.createElement)("div",{className:"block-editor-block-patterns-list__item is-placeholder"})}var wf=function(e){let{isDraggable:t,blockPatterns:n,shownPatterns:r,onHover:o,onClickPattern:i,orientation:l,label:a=(0,_.__)("Block Patterns"),showTitlesAsTooltip:s}=e;const p=(0,g.__unstableUseCompositeState)({orientation:l});return(0,u.createElement)(g.__unstableComposite,c({},p,{role:"listbox",className:"block-editor-block-patterns-list","aria-label":a}),n.map((e=>r.includes(e)?(0,u.createElement)(Ef,{key:e.name,pattern:e,onClick:i,onHover:o,isDraggable:t,composite:p,showTooltip:s}):(0,u.createElement)(Sf,{key:e.name}))))};function Cf(e){let{selectedCategory:t,patternCategories:n,onClickCategory:r}=e;const o="block-editor-block-patterns-explorer__sidebar";return(0,u.createElement)("div",{className:`${o}__categories-list`},n.map((e=>{let{name:n,label:i}=e;return(0,u.createElement)(g.Button,{key:n,label:i,className:`${o}__categories-list__item`,isPressed:t===n,onClick:()=>{r(n)}},i)})))}function If(e){let{filterValue:t,setFilterValue:n}=e;return(0,u.createElement)("div",{className:"block-editor-block-patterns-explorer__search"},(0,u.createElement)(g.SearchControl,{__nextHasNoMarginBottom:!0,onChange:n,value:t,label:(0,_.__)("Search for patterns"),placeholder:(0,_.__)("Search")}))}var Af=function(e){let{selectedCategory:t,patternCategories:n,onClickCategory:r,filterValue:o,setFilterValue:i}=e;return(0,u.createElement)("div",{className:"block-editor-block-patterns-explorer__sidebar"},(0,u.createElement)(If,{filterValue:o,setFilterValue:i}),!o&&(0,u.createElement)(Cf,{selectedCategory:t,patternCategories:n,onClickCategory:r}))};var xf=function(){return(0,u.createElement)("div",{className:"block-editor-inserter__no-results"},(0,u.createElement)(Xi,{className:"block-editor-inserter__no-results-icon",icon:gp}),(0,u.createElement)("p",null,(0,_.__)("No results found.")))};var Bf=function(e){let{rootClientId:t="",insertionIndex:n,clientId:r,isAppender:o,onSelect:i,shouldFocusBlock:l=!0,selectBlockOnInsert:s=!0}=e;const{getSelectedBlock:c}=(0,m.useSelect)(xr),{destinationRootClientId:p,destinationIndex:d}=(0,m.useSelect)((e=>{const{getSelectedBlockClientId:i,getBlockRootClientId:l,getBlockIndex:a,getBlockOrder:s}=e(xr),c=i();let u,p=t;return void 0!==n?u=n:r?u=a(r):!o&&c?(p=l(c),u=a(c)+1):u=s(p).length,{destinationRootClientId:p,destinationIndex:u}}),[t,n,r,o]),{replaceBlocks:f,insertBlocks:y,showInsertionPoint:g,hideInsertionPoint:h}=(0,m.useDispatch)(xr),v=(0,u.useCallback)((function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=c();!o&&r&&(0,a.isUnmodifiedDefaultBlock)(r)?f(r.clientId,e,null,l||n?0:null,t):y(e,d,p,s,l||n?0:null,t);const u=Array.isArray(e)?e.length:1,m=(0,_.sprintf)((0,_._n)("%d block added.","%d blocks added.",u),u);(0,dn.speak)(m),i&&i(e)}),[o,c,f,y,p,d,i,l]),b=(0,u.useCallback)((e=>{e?g(p,d):h()}),[g,h,p,d]);return[p,v,b]},Pf=n(4793),Tf=n.n(Pf);function Of(e){return e.toLowerCase()}var Nf=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],Mf=/[^A-Z0-9]+/gi;function Rf(e,t){void 0===t&&(t={});for(var n=t.splitRegexp,r=void 0===n?Nf:n,o=t.stripRegexp,i=void 0===o?Mf:o,l=t.transform,a=void 0===l?Of:l,s=t.delimiter,c=void 0===s?" ":s,u=Ff(Ff(e,r,"$1\0$2"),i,"\0"),p=0,d=u.length;"\0"===u.charAt(p);)p++;for(;"\0"===u.charAt(d-1);)d--;return u.slice(p,d).split("\0").map(a).join(c)}function Ff(e,t,n){return t instanceof RegExp?e.replace(t,n):t.reduce((function(e,t){return e.replace(t,n)}),e)}const Lf=e=>e.name||"",Df=e=>e.title,Uf=e=>e.description||"",jf=e=>e.keywords||[],zf=e=>e.category,Vf=()=>null;function Gf(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Rf(e,{splitRegexp:[/([\p{Ll}\p{Lo}\p{N}])([\p{Lu}\p{Lt}])/gu,/([\p{Lu}\p{Lt}])([\p{Lu}\p{Lt}][\p{Ll}\p{Lo}])/gu],stripRegexp:/(\p{C}|\p{P}|\p{S})+/giu}).split(" ").filter(Boolean)}function Hf(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e=Tf()(e),e=e.replace(/^\//,""),e=e.toLowerCase(),e}const Wf=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Gf(Hf(e))},$f=(e,t)=>e.filter((e=>!Wf(t).some((t=>t.includes(e))))),Kf=(e,t,n,r)=>{if(0===Wf(r).length)return e;return qf(e,r,{getCategory:e=>{var n;return null===(n=t.find((t=>{let{slug:n}=t;return n===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}})},qf=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=Wf(t);if(0===r.length)return e;const o=e.map((e=>[e,Jf(e,t,n)])).filter((e=>{let[,t]=e;return t>0}));return o.sort(((e,t)=>{let[,n]=e,[,r]=t;return r-n})),o.map((e=>{let[t]=e;return t}))};function Jf(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{getName:r=Lf,getTitle:o=Df,getDescription:i=Uf,getKeywords:l=jf,getCategory:a=zf,getCollection:s=Vf}=n,c=r(e),u=o(e),p=i(e),d=l(e),f=a(e),m=s(e),y=Hf(t),g=Hf(u);let h=0;if(y===g)h+=30;else if(g.startsWith(y))h+=20;else{const e=[c,u,p,...d,f,m].join(" "),t=Gf(y);0===$f(t,e).length&&(h+=10)}if(0!==h&&c.startsWith("core/")){h+=c!==e.id?1:2}return h}function Yf(e){let{filterValue:t,filteredBlockPatternsLength:n}=e;return t?(0,u.createElement)(g.__experimentalHeading,{level:2,lineHeight:"48px",className:"block-editor-block-patterns-explorer__search-results-count"},(0,_.sprintf)((0,_._n)('%1$d pattern found for "%2$s"','%1$d patterns found for "%2$s"',n),n,t)):null}var Qf=function(e){let{filterValue:t,selectedCategory:n,patternCategories:r}=e;const o=(0,f.useDebounce)(dn.speak,500),[i,l]=Bf({shouldFocusBlock:!0}),[a,,s]=_f(l,i),c=(0,u.useMemo)((()=>r.map((e=>e.name))),[r]),p=(0,u.useMemo)((()=>t?qf(a,t):a.filter((e=>{var t,r;return"uncategorized"===n?!(null!==(t=e.categories)&&void 0!==t&&t.length)||e.categories.every((e=>!c.includes(e))):null===(r=e.categories)||void 0===r?void 0:r.includes(n)}))),[t,n,a]);(0,u.useEffect)((()=>{if(!t)return;const e=p.length,n=(0,_.sprintf)((0,_._n)("%d result found.","%d results found.",e),e);o(n)}),[t,o]);const d=(0,f.useAsyncList)(p,{step:2}),m=!(null==p||!p.length);return(0,u.createElement)("div",{className:"block-editor-block-patterns-explorer__list"},m&&(0,u.createElement)(Yf,{filterValue:t,filteredBlockPatternsLength:p.length}),(0,u.createElement)(gf,null,!m&&(0,u.createElement)(xf,null),m&&(0,u.createElement)(wf,{shownPatterns:d,blockPatterns:p,onClickPattern:s,isDraggable:!1})))};function Zf(e){let{initialCategory:t,patternCategories:n}=e;const[r,o]=(0,u.useState)(""),[i,l]=(0,u.useState)(null==t?void 0:t.name);return(0,u.createElement)("div",{className:"block-editor-block-patterns-explorer"},(0,u.createElement)(Af,{selectedCategory:i,patternCategories:n,onClickCategory:l,filterValue:r,setFilterValue:o}),(0,u.createElement)(Qf,{filterValue:r,selectedCategory:i,patternCategories:n}))}var Xf=function(e){let{onModalClose:t,...n}=e;return(0,u.createElement)(g.Modal,{title:(0,_.__)("Patterns"),onRequestClose:t,isFullScreen:!0},(0,u.createElement)(Zf,n))};function em(e){let{title:t}=e;return(0,u.createElement)(g.__experimentalVStack,{spacing:0},(0,u.createElement)(g.__experimentalView,null,(0,u.createElement)(g.__experimentalSpacer,{marginBottom:0,paddingX:4,paddingY:3},(0,u.createElement)(g.__experimentalHStack,{spacing:2},(0,u.createElement)(g.__experimentalNavigatorBackButton,{style:{minWidth:24,padding:0},icon:(0,_.isRTL)()?mp:yp,isSmall:!0,"aria-label":(0,_.__)("Navigate to the previous view")}),(0,u.createElement)(g.__experimentalSpacer,null,(0,u.createElement)(g.__experimentalHeading,{level:5},t))))))}function tm(e){let{categories:t,children:n}=e;return(0,u.createElement)(g.__experimentalNavigatorProvider,{initialPath:"/",className:"block-editor-inserter__mobile-tab-navigation"},(0,u.createElement)(g.__experimentalNavigatorScreen,{path:"/"},(0,u.createElement)(g.__experimentalItemGroup,null,t.map((e=>(0,u.createElement)(g.__experimentalNavigatorButton,{key:e.name,path:`/category/${e.name}`,as:g.__experimentalItem,isAction:!0},(0,u.createElement)(g.__experimentalHStack,null,(0,u.createElement)(g.FlexBlock,null,e.label),(0,u.createElement)(Xi,{icon:(0,_.isRTL)()?yp:mp}))))))),t.map((e=>(0,u.createElement)(g.__experimentalNavigatorScreen,{key:e.name,path:`/category/${e.name}`},(0,u.createElement)(em,{title:(0,_.__)("Back")}),n(e)))))}const nm=()=>{},rm=["featured","posts","text","gallery","call-to-action","banner","header","footer"];function om(e){const[t,n]=_f(void 0,e),r=(0,u.useCallback)((e=>!(!e.categories||!e.categories.length)&&e.categories.some((e=>n.some((t=>t.name===e))))),[n]),o=(0,u.useMemo)((()=>{const e=n.filter((e=>t.some((t=>{var n;return null===(n=t.categories)||void 0===n?void 0:n.includes(e.name)})))).sort(((e,t)=>{let{name:n}=e,{name:r}=t;return[n,r].some((e=>rm.includes(e)))?[n,r].every((e=>rm.includes(e)))?rm.indexOf(n)-rm.indexOf(r):rm.includes(n)?-1:1:0}));return t.some((e=>!r(e)))&&!e.find((e=>"uncategorized"===e.name))&&e.push({name:"uncategorized",label:(0,_._x)("Uncategorized")}),e}),[t,n]);return o}function im(e){let{rootClientId:t,onInsert:n,onHover:r,category:o,showTitlesAsTooltip:i}=e;const l=(0,u.useRef)();return(0,u.useEffect)((()=>{const e=setTimeout((()=>{const[e]=Ml.focus.tabbable.find(l.current);null==e||e.focus()}));return()=>clearTimeout(e)}),[o]),(0,u.createElement)("div",{ref:l,className:"block-editor-inserter__patterns-category-dialog"},(0,u.createElement)(lm,{rootClientId:t,onInsert:n,onHover:r,category:o,showTitlesAsTooltip:i}))}function lm(e){let{rootClientId:t,onInsert:n,onHover:r=nm,category:o,showTitlesAsTooltip:i}=e;const[l,,a]=_f(n,t),s=om(t),c=(0,u.useMemo)((()=>l.filter((e=>{var t,n,r;if("uncategorized"!==o.name)return null===(r=e.categories)||void 0===r?void 0:r.includes(o.name);return 0===(null!==(t=null===(n=e.categories)||void 0===n?void 0:n.filter((e=>s.find((t=>t.name===e)))))&&void 0!==t?t:[]).length}))),[l,o]),p=(0,f.useAsyncList)(c);return(0,u.useEffect)((()=>()=>r(null)),[]),c.length?(0,u.createElement)("div",{className:"block-editor-inserter__patterns-category-panel"},(0,u.createElement)("div",{className:"block-editor-inserter__patterns-category-panel-title"},o.label),(0,u.createElement)("p",null,o.description),(0,u.createElement)(wf,{shownPatterns:p,blockPatterns:c,onClickPattern:a,onHover:r,label:o.label,orientation:"vertical",category:o.label,isDraggable:!0,showTitlesAsTooltip:i})):null}var am=function(e){let{onSelectCategory:t,selectedCategory:n,onInsert:r,rootClientId:o}=e;const[i,l]=(0,u.useState)(!1),a=om(o),s=n||a[0],c=(0,f.useViewportMatch)("medium","<");return(0,u.createElement)(u.Fragment,null,!c&&(0,u.createElement)("div",{className:"block-editor-inserter__block-patterns-tabs-container"},(0,u.createElement)("nav",{"aria-label":(0,_.__)("Block pattern categories")},(0,u.createElement)(g.__experimentalItemGroup,{role:"list",className:"block-editor-inserter__block-patterns-tabs"},a.map((e=>(0,u.createElement)(g.__experimentalItem,{role:"listitem",key:e.name,onClick:()=>t(e),className:e===n?"block-editor-inserter__patterns-category block-editor-inserter__patterns-selected-category":"block-editor-inserter__patterns-category","aria-label":e.label,"aria-current":e===n?"true":void 0},(0,u.createElement)(g.__experimentalHStack,null,(0,u.createElement)(g.FlexBlock,null,e.label),(0,u.createElement)(Xi,{icon:mp}))))),(0,u.createElement)("div",{role:"listitem"},(0,u.createElement)(g.Button,{className:"block-editor-inserter__patterns-explore-button",onClick:()=>l(!0),variant:"secondary"},(0,_.__)("Explore all patterns")))))),c&&(0,u.createElement)(tm,{categories:a},(e=>(0,u.createElement)(lm,{onInsert:r,rootClientId:o,category:e,showTitlesAsTooltip:!1}))),i&&(0,u.createElement)(Xf,{initialCategory:s,patternCategories:a,onModalClose:()=>l(!1)}))},sm=window.wp.url;function cm(e){let{onHover:t,onInsert:n,rootClientId:r}=e;const[o,,,i]=yf(r,n),l=(0,u.useMemo)((()=>o.filter((e=>{let{category:t}=e;return"reusable"===t}))),[o]);return 0===l.length?(0,u.createElement)(xf,null):(0,u.createElement)(mf,{title:(0,_.__)("Reusable blocks")},(0,u.createElement)(ff,{items:l,onSelect:i,onHover:t,label:(0,_.__)("Reusable blocks")}))}var um=function(e){let{rootClientId:t,onInsert:n,onHover:r}=e;return(0,u.createElement)(u.Fragment,null,(0,u.createElement)(cm,{onHover:r,onInsert:n,rootClientId:t}),(0,u.createElement)("div",{className:"block-editor-inserter__manage-reusable-blocks-container"},(0,u.createElement)(g.Button,{className:"block-editor-inserter__manage-reusable-blocks",variant:"secondary",href:(0,sm.addQueryArgs)("edit.php",{post_type:"wp_block"})},(0,_.__)("Manage Reusable blocks"))))};function pm(e){const[t,n]=(0,u.useState)([]),{canInsertImage:r,canInsertVideo:o,canInsertAudio:i}=(0,m.useSelect)((t=>{const{canInsertBlockType:n}=t(xr);return{canInsertImage:n("core/image",e),canInsertVideo:n("core/video",e),canInsertAudio:n("core/audio",e)}}),[e]),l=function(){const{inserterMediaCategories:e,allowedMimeTypes:t,enableOpenverseMediaCategory:n}=(0,m.useSelect)((e=>{const t=e(xr).getSettings();return{inserterMediaCategories:t.inserterMediaCategories,allowedMimeTypes:t.allowedMimeTypes,enableOpenverseMediaCategory:t.enableOpenverseMediaCategory}}),[]),r=(0,u.useMemo)((()=>{if(e&&t)return e.filter((e=>!(!n&&"openverse"===e.name)&&Object.values(t).some((t=>t.startsWith(`${e.mediaType}/`)))))}),[e,t,n]);return r}();return(0,u.useEffect)((()=>{(async()=>{const e=[];if(!l)return;const t=new Map(await Promise.all(l.map((async e=>{if(e.isExternalResource)return[e.name,!0];let t=[];try{t=await e.fetch({per_page:1})}catch(e){}return[e.name,!!t.length]})))),a={image:r,video:o,audio:i};l.forEach((n=>{a[n.mediaType]&&t.get(n.name)&&e.push(n)})),e.length&&n(e)})()}),[r,o,i,l]),t}var dm=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"}));var fm=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{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"})),mm=window.wp.blob;const ym={image:"img",video:"video",audio:"audio"};function gm(e,t){const n={id:e.id||void 0,caption:e.caption||void 0},r=e.url,o=e.alt||void 0;"image"===t?(n.url=r,n.alt=o):["video","audio"].includes(t)&&(n.src=r);const i=ym[t],l=(0,u.createElement)(i,{src:e.previewUrl||r,alt:o,controls:"audio"===t||void 0,inert:"true",onError:t=>{let{currentTarget:n}=t;n.src===e.previewUrl&&(n.src=r)}});return[(0,a.createBlock)(`core/${t}`,n),l]}const hm=["image"],vm={position:"bottom left",className:"block-editor-inserter__media-list__item-preview-options__popover"};function bm(e){let{category:t,media:n}=e;if(!t.getReportUrl)return null;const r=t.getReportUrl(n);return(0,u.createElement)(g.DropdownMenu,{className:"block-editor-inserter__media-list__item-preview-options",label:(0,_.__)("Options"),popoverProps:vm,icon:dm},(()=>(0,u.createElement)(g.MenuGroup,null,(0,u.createElement)(g.MenuItem,{onClick:()=>window.open(r,"_blank").focus(),icon:fm},(0,_.sprintf)((0,_.__)("Report %s"),t.mediaType)))))}function _m(e){let{onClose:t,onSubmit:n}=e;return(0,u.createElement)(g.Modal,{title:(0,_.__)("Insert external image"),onRequestClose:t,className:"block-editor-inserter-media-tab-media-preview-inserter-external-image-modal"},(0,u.createElement)(g.__experimentalVStack,{spacing:3},(0,u.createElement)("p",null,(0,_.__)("This image cannot be uploaded to your Media Library, but it can still be inserted as an external image.")),(0,u.createElement)("p",null,(0,_.__)("External images can be removed by the external provider without warning and could even have legal compliance issues related to privacy legislation."))),(0,u.createElement)(g.Flex,{className:"block-editor-block-lock-modal__actions",justify:"flex-end",expanded:!1},(0,u.createElement)(g.FlexItem,null,(0,u.createElement)(g.Button,{variant:"tertiary",onClick:t},(0,_.__)("Cancel"))),(0,u.createElement)(g.FlexItem,null,(0,u.createElement)(g.Button,{variant:"primary",onClick:n},(0,_.__)("Insert")))))}function km(e){var t;let{media:n,onClick:r,composite:o,category:i}=e;const[l,s]=(0,u.useState)(!1),[p,f]=(0,u.useState)(!1),[y,h]=(0,u.useState)(!1),[v,b]=(0,u.useMemo)((()=>gm(n,i.mediaType)),[n,i.mediaType]),{createErrorNotice:k,createSuccessNotice:E}=(0,m.useDispatch)(bf.store),S=(0,m.useSelect)((e=>e(xr).getSettings().mediaUpload),[]),w=(0,u.useCallback)((e=>{if(y)return;const t=(0,a.cloneBlock)(e),{id:n,url:o,caption:i}=t.attributes;n?r(t):(h(!0),window.fetch(o).then((e=>e.blob())).then((e=>{S({filesList:[e],additionalData:{caption:i},onFileChange(e){let[n]=e;(0,mm.isBlobURL)(n.url)||(r({...t,attributes:{...t.attributes,id:n.id,url:n.url}}),E((0,_.__)("Image uploaded and inserted."),{type:"snackbar"}),h(!1))},allowedTypes:hm,onError(e){k(e,{type:"snackbar"}),h(!1)}})})).catch((()=>{s(!0),h(!1)})))}),[y,r,S,k,E]),C=(null===(t=n.title)||void 0===t?void 0:t.rendered)||n.title;let I;if(C.length>25){const e="...";I=C.slice(0,25-e.length)+e}const A=(0,u.useCallback)((()=>f(!0)),[]),x=(0,u.useCallback)((()=>f(!1)),[]);return(0,u.createElement)(u.Fragment,null,(0,u.createElement)(cf,{isEnabled:!0,blocks:[v]},(e=>{let{draggable:t,onDragStart:r,onDragEnd:l}=e;return(0,u.createElement)("div",{className:d()("block-editor-inserter__media-list__list-item",{"is-hovered":p}),draggable:t,onDragStart:r,onDragEnd:l},(0,u.createElement)(g.Tooltip,{text:I||C},(0,u.createElement)("div",{onMouseEnter:A,onMouseLeave:x},(0,u.createElement)(g.__unstableCompositeItem,c({role:"option",as:"div"},o,{className:"block-editor-inserter__media-list__item",onClick:()=>w(v),"aria-label":C}),(0,u.createElement)("div",{className:"block-editor-inserter__media-list__item-preview"},b,y&&(0,u.createElement)("div",{className:"block-editor-inserter__media-list__item-preview-spinner"},(0,u.createElement)(g.Spinner,null)))),!y&&(0,u.createElement)(bm,{category:i,media:n}))))})),l&&(0,u.createElement)(_m,{onClose:()=>s(!1),onSubmit:()=>{r((0,a.cloneBlock)(v)),E((0,_.__)("Image inserted."),{type:"snackbar"}),s(!1)}}))}var Em=function(e){let{mediaList:t,category:n,onClick:r,label:o=(0,_.__)("Media List")}=e;const i=(0,g.__unstableUseCompositeState)();return(0,u.createElement)(g.__unstableComposite,c({},i,{role:"listbox",className:"block-editor-inserter__media-list","aria-label":o}),t.map(((e,t)=>(0,u.createElement)(km,{key:e.id||e.sourceId||t,media:e,category:n,onClick:r,composite:i}))))};function Sm(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";const[t,n]=(0,u.useState)(e),[r,o]=(0,u.useState)(e),i=(0,f.useDebounce)(o,250);return(0,u.useEffect)((()=>{r!==t&&i(t)}),[r,t]),[t,n,r]}function wm(e){let{rootClientId:t,onInsert:n,category:r}=e;const o=(0,u.useRef)();return(0,u.useEffect)((()=>{const e=setTimeout((()=>{const[e]=Ml.focus.tabbable.find(o.current);null==e||e.focus()}));return()=>clearTimeout(e)}),[r]),(0,u.createElement)("div",{ref:o,className:"block-editor-inserter__media-dialog"},(0,u.createElement)(Cm,{rootClientId:t,onInsert:n,category:r}))}function Cm(e){let{rootClientId:t,onInsert:n,category:r}=e;const[o,i,l]=Sm(),{mediaList:a,isLoading:s}=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const[n,r]=(0,u.useState)(),[o,i]=(0,u.useState)(!1),l=(0,u.useRef)();return(0,u.useEffect)((()=>{(async()=>{var n;const o=JSON.stringify({category:e.name,...t});l.current=o,i(!0),r([]);const a=await(null===(n=e.fetch)||void 0===n?void 0:n.call(e,t));o===l.current&&(r(a),i(!1))})()}),[e.name,...Object.values(t)]),{mediaList:n,isLoading:o}}(r,{per_page:l?20:10,search:l}),c="block-editor-inserter__media-panel",p=r.labels.search_items||(0,_.__)("Search");return(0,u.createElement)("div",{className:c},(0,u.createElement)(g.SearchControl,{className:`${c}-search`,onChange:i,value:o,label:p,placeholder:p}),s&&(0,u.createElement)("div",{className:`${c}-spinner`},(0,u.createElement)(g.Spinner,null)),!s&&!(null!=a&&a.length)&&(0,u.createElement)(xf,null),!s&&!(null==a||!a.length)&&(0,u.createElement)(Em,{rootClientId:t,onClick:n,mediaList:a,category:r}))}var Im=function(e){let{fallback:t=null,children:n}=e;const r=(0,m.useSelect)((e=>{const{getSettings:t}=e(xr);return!!t().mediaUpload}),[]);return r?n:t};var Am=(0,g.withFilters)("editor.MediaUpload")((()=>null));const xm=["image","video","audio"];var Bm=function(e){let{rootClientId:t,selectedCategory:n,onSelectCategory:r,onInsert:o}=e;const i=pm(t),l=(0,f.useViewportMatch)("medium","<"),a="block-editor-inserter__media-tabs",s=(0,u.useCallback)((e=>{if(null==e||!e.url)return;const[t]=gm(e,e.type);o(t)}),[o]),c=(0,u.useMemo)((()=>i.map((e=>({...e,label:e.labels.name})))),[i]);return(0,u.createElement)(u.Fragment,null,!l&&(0,u.createElement)("div",{className:`${a}-container`},(0,u.createElement)("nav",{"aria-label":(0,_.__)("Media categories")},(0,u.createElement)(g.__experimentalItemGroup,{role:"list",className:a},i.map((e=>(0,u.createElement)(g.__experimentalItem,{role:"listitem",key:e.name,onClick:()=>r(e),className:d()(`${a}__media-category`,{"is-selected":n===e}),"aria-label":e.labels.name,"aria-current":e===n?"true":void 0},(0,u.createElement)(g.__experimentalHStack,null,(0,u.createElement)(g.FlexBlock,null,e.labels.name),(0,u.createElement)(Xi,{icon:mp}))))),(0,u.createElement)("div",{role:"listitem"},(0,u.createElement)(Im,null,(0,u.createElement)(Am,{multiple:!1,onSelect:s,allowedTypes:xm,render:e=>{let{open:t}=e;return(0,u.createElement)(g.Button,{onClick:e=>{e.target.focus(),t()},className:"block-editor-inserter__media-library-button",variant:"secondary","data-unstable-ignore-focus-outside-for-relatedtarget":".media-modal"},(0,_.__)("Open Media Library"))}})))))),l&&(0,u.createElement)(tm,{categories:c},(e=>(0,u.createElement)(Cm,{onInsert:o,rootClientId:t,category:e}))))};const{Fill:Pm,Slot:Tm}=(0,g.createSlotFill)("__unstableInserterMenuExtension");Pm.Slot=Tm;var Om=Pm;const Nm=[];var Mm=function(e){let{filterValue:t,onSelect:n,onHover:r,rootClientId:o,clientId:i,isAppender:l,__experimentalInsertionIndex:a,maxBlockPatterns:s,maxBlockTypes:c,showBlockDirectory:p=!1,isDraggable:d=!0,shouldFocusBlock:m=!0,prioritizePatterns:y,selectBlockOnInsert:h,orderInitialBlockItems:v}=e;const b=(0,f.useDebounce)(dn.speak,500),[k,E]=Bf({onSelect:n,rootClientId:o,clientId:i,isAppender:l,insertionIndex:a,shouldFocusBlock:m,selectBlockOnInsert:h}),[S,w,C,I]=yf(k,E),[A,,x]=_f(E,k),B=(0,u.useMemo)((()=>{if(0===s)return[];const e=qf(A,t);return void 0!==s?e.slice(0,s):e}),[t,A,s]);let P=c;y&&B.length>2&&(P=0);const T=(0,u.useMemo)((()=>{if(0===P)return[];let e=J(S,"frecency","desc");!t&&v&&(e=v(e));const n=Kf(e,w,C,t);return void 0!==P?n.slice(0,P):n}),[t,S,w,C,c,v]);(0,u.useEffect)((()=>{if(!t)return;const e=T.length+B.length,n=(0,_.sprintf)((0,_._n)("%d result found.","%d results found.",e),e);b(n)}),[t,b]);const O=(0,f.useAsyncList)(T,{step:9}),N=(0,f.useAsyncList)(O.length===T.length?B:Nm),M=T.length>0||B.length>0,R=!!T.length&&(0,u.createElement)(mf,{title:(0,u.createElement)(g.VisuallyHidden,null,(0,_.__)("Blocks"))},(0,u.createElement)(ff,{items:O,onSelect:I,onHover:r,label:(0,_.__)("Blocks"),isDraggable:d})),F=!!B.length&&(0,u.createElement)(mf,{title:(0,u.createElement)(g.VisuallyHidden,null,(0,_.__)("Block Patterns"))},(0,u.createElement)("div",{className:"block-editor-inserter__quick-inserter-patterns"},(0,u.createElement)(wf,{shownPatterns:N,blockPatterns:B,onClickPattern:x,onHover:r,isDraggable:d})));return(0,u.createElement)(gf,null,!p&&!M&&(0,u.createElement)(xf,null),y?F:R,!!T.length&&!!B.length&&(0,u.createElement)("div",{className:"block-editor-inserter__quick-inserter-separator"}),y?R:F,p&&(0,u.createElement)(Om.Slot,{fillProps:{onSelect:I,onHover:r,filterValue:t,hasItems:M,rootClientId:k}},(e=>e.length?e:M?null:(0,u.createElement)(xf,null))))};const Rm={name:"blocks",title:(0,_.__)("Blocks")},Fm={name:"patterns",title:(0,_.__)("Patterns")},Lm={name:"reusable",title:(0,_.__)("Reusable"),icon:G},Dm={name:"media",title:(0,_.__)("Media")};var Um=function(e){let{children:t,showPatterns:n=!1,showReusableBlocks:r=!1,showMedia:o=!1,onSelect:i,prioritizePatterns:l}=e;const a=(0,u.useMemo)((()=>{const e=[];return l&&n&&e.push(Fm),e.push(Rm),!l&&n&&e.push(Fm),o&&e.push(Dm),r&&e.push(Lm),e}),[l,Rm,n,Fm,r,o,Lm]);return(0,u.createElement)(g.TabPanel,{className:"block-editor-inserter__tabs",tabs:a,onSelect:i},t)};var jm=(0,u.forwardRef)((function(e,t){let{rootClientId:n,clientId:r,isAppender:o,__experimentalInsertionIndex:i,onSelect:l,showInserterHelpPanel:a,showMostUsedBlocks:s,__experimentalFilterValue:c="",shouldFocusBlock:p=!0,prioritizePatterns:f}=e;const[y,h,v]=Sm(c),[b,k]=(0,u.useState)(null),[E,S]=(0,u.useState)(null),[w,C]=(0,u.useState)(null),[I,A]=(0,u.useState)(null),[x,B,P]=Bf({rootClientId:n,clientId:r,isAppender:o,insertionIndex:i,shouldFocusBlock:p}),{showPatterns:T,inserterItems:O}=(0,m.useSelect)((e=>{const{__experimentalGetAllowedPatterns:t,getInserterItems:n}=e(xr);return{showPatterns:!!t(x).length,inserterItems:n(x)}}),[x]),N=(0,u.useMemo)((()=>O.some((e=>{let{category:t}=e;return"reusable"===t}))),[O]),M=!!pm(x).length,R=(0,u.useCallback)(((e,t,n)=>{B(e,t,n),l()}),[B,l]),F=(0,u.useCallback)(((e,t)=>{B(e,{patternName:t}),l()}),[B,l]),L=(0,u.useCallback)((e=>{P(!!e),k(e)}),[P,k]),D=(0,u.useCallback)((e=>{P(!!e)}),[P]),U=(0,u.useCallback)((e=>{S(e)}),[S]),j=(0,u.useMemo)((()=>(0,u.createElement)(u.Fragment,null,(0,u.createElement)("div",{className:"block-editor-inserter__block-list"},(0,u.createElement)(vf,{rootClientId:x,onInsert:R,onHover:L,showMostUsedBlocks:s})),a&&(0,u.createElement)("div",{className:"block-editor-inserter__tips"},(0,u.createElement)(g.VisuallyHidden,{as:"h2"},(0,_.__)("A tip for using the block editor")),(0,u.createElement)(fp,null)))),[x,R,L,v,s,a]),z=(0,u.useMemo)((()=>(0,u.createElement)(am,{rootClientId:x,onInsert:F,onSelectCategory:U,selectedCategory:E})),[x,F,U,E]),V=(0,u.useMemo)((()=>(0,u.createElement)(um,{rootClientId:x,onInsert:R,onHover:L})),[x,R,L]),G=(0,u.useMemo)((()=>(0,u.createElement)(Bm,{rootClientId:x,selectedCategory:w,onSelectCategory:C,onInsert:R})),[x,R,w,C]),H=(0,u.useCallback)((e=>"blocks"===e.name?j:"patterns"===e.name?z:"reusable"===e.name?V:"media"===e.name?G:void 0),[j,z,V,G]),W=(0,u.useRef)();(0,u.useImperativeHandle)(t,(()=>({focusSearch:()=>{W.current.focus()}})));const $="patterns"===I&&!v&&E,K=!v&&(T||N||M),q="media"===I&&!v&&w;return(0,u.createElement)("div",{className:"block-editor-inserter__menu"},(0,u.createElement)("div",{className:d()("block-editor-inserter__main-area",{"show-as-tabs":K})},(0,u.createElement)(g.SearchControl,{__nextHasNoMarginBottom:!0,className:"block-editor-inserter__search",onChange:e=>{b&&k(null),h(e)},value:y,label:(0,_.__)("Search for blocks and patterns"),placeholder:(0,_.__)("Search"),ref:W}),!!v&&(0,u.createElement)("div",{className:"block-editor-inserter__no-tab-container"},(0,u.createElement)(Mm,{filterValue:v,onSelect:l,onHover:L,rootClientId:n,clientId:r,isAppender:o,__experimentalInsertionIndex:i,showBlockDirectory:!0,shouldFocusBlock:p})),K&&(0,u.createElement)(Um,{showPatterns:T,showReusableBlocks:N,showMedia:M,prioritizePatterns:f,onSelect:A},H),!v&&!K&&(0,u.createElement)("div",{className:"block-editor-inserter__no-tab-container"},j)),q&&(0,u.createElement)(wm,{rootClientId:x,onInsert:R,category:w}),a&&b&&(0,u.createElement)(rf,{item:b}),$&&(0,u.createElement)(im,{rootClientId:x,onInsert:F,onHover:D,category:E,showTitlesAsTooltip:!0}))}));function zm(e){let{onSelect:t,rootClientId:n,clientId:r,isAppender:o,prioritizePatterns:i,selectBlockOnInsert:l,orderInitialBlockItems:a}=e;const[s,c]=(0,u.useState)(""),[p,f]=Bf({onSelect:t,rootClientId:n,clientId:r,isAppender:o,selectBlockOnInsert:l}),[y]=yf(p,f),[h]=_f(f,p),{setInserterIsOpened:v,insertionIndex:b}=(0,m.useSelect)((e=>{const{getSettings:t,getBlockIndex:n,getBlockCount:o}=e(xr),i=t(),l=n(r),a=o();return{setInserterIsOpened:i.__experimentalSetIsInserterOpened,insertionIndex:-1===l?a:l}}),[r]),k=h.length&&(!!s||i),E=k&&h.length>6||y.length>6;(0,u.useEffect)((()=>{v&&v(!1)}),[v]);let S=0;return k&&(S=i?4:2),(0,u.createElement)("div",{className:d()("block-editor-inserter__quick-inserter",{"has-search":E,"has-expand":v})},E&&(0,u.createElement)(g.SearchControl,{__nextHasNoMarginBottom:!0,className:"block-editor-inserter__search",value:s,onChange:e=>{c(e)},label:(0,_.__)("Search for blocks and patterns"),placeholder:(0,_.__)("Search")}),(0,u.createElement)("div",{className:"block-editor-inserter__quick-inserter-results"},(0,u.createElement)(Mm,{filterValue:s,onSelect:t,rootClientId:n,clientId:r,isAppender:o,maxBlockPatterns:S,maxBlockTypes:6,isDraggable:!1,prioritizePatterns:i,selectBlockOnInsert:l,orderInitialBlockItems:a})),v&&(0,u.createElement)(g.Button,{className:"block-editor-inserter__quick-inserter-expand",onClick:()=>{v({rootClientId:n,insertionIndex:b,filterValue:s})},"aria-label":(0,_.__)("Browse all. This will open the main inserter panel in the editor toolbar.")},(0,_.__)("Browse all")))}const Vm=e=>{let{onToggle:t,disabled:n,isOpen:r,blockTitle:o,hasSingleBlockType:i,toggleProps:l={},prioritizePatterns:a}=e;const{as:s=g.Button,label:p,onClick:d,...f}=l;let m=p;return!m&&i?m=(0,_.sprintf)((0,_._x)("Add %s","directly add the only allowed block"),o):!m&&a?m=(0,_.__)("Add pattern"):m||(m=(0,_._x)("Add block","Generic label for block inserter button")),(0,u.createElement)(s,c({icon:pp,label:m,tooltipPosition:"bottom",onClick:function(e){t&&t(e),d&&d(e)},className:"block-editor-inserter__toggle","aria-haspopup":!i&&"true","aria-expanded":!i&&r,disabled:n},f))};class Gm extends u.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(e){let{onToggle:t,isOpen:n}=e;const{disabled:r,blockTitle:o,hasSingleBlockType:i,directInsertBlock:l,toggleProps:a,hasItems:s,renderToggle:c=Vm,prioritizePatterns:u}=this.props;return c({onToggle:t,isOpen:n,disabled:r||!s,blockTitle:o,hasSingleBlockType:i,directInsertBlock:l,toggleProps:a,prioritizePatterns:u})}renderContent(e){let{onClose:t}=e;const{rootClientId:n,clientId:r,isAppender:o,showInserterHelpPanel:i,__experimentalIsQuick:l,prioritizePatterns:a,onSelectOrClose:s,selectBlockOnInsert:c,orderInitialBlockItems:p}=this.props;return l?(0,u.createElement)(zm,{onSelect:e=>{const n=Array.isArray(e)&&null!=e&&e.length?e[0]:e;s&&"function"==typeof s&&s(n),t()},rootClientId:n,clientId:r,isAppender:o,prioritizePatterns:a,selectBlockOnInsert:c,orderInitialBlockItems:p}):(0,u.createElement)(jm,{onSelect:()=>{t()},rootClientId:n,clientId:r,isAppender:o,showInserterHelpPanel:i,prioritizePatterns:a})}render(){const{position:e,hasSingleBlockType:t,directInsertBlock:n,insertOnlyAllowedBlock:r,__experimentalIsQuick:o,onSelectOrClose:i}=this.props;return t||n?this.renderToggle({onToggle:r}):(0,u.createElement)(g.Dropdown,{className:"block-editor-inserter",contentClassName:d()("block-editor-inserter__popover",{"is-quick":o}),popoverProps:{position:e,shift:!0},onToggle:this.onToggle,expandOnMobile:!0,headerTitle:(0,_.__)("Add a block"),renderToggle:this.renderToggle,renderContent:this.renderContent,onClose:i})}}const Hm=(0,f.compose)([(0,m.withSelect)(((e,t)=>{var n;let{clientId:r,rootClientId:o,shouldDirectInsert:i=!0}=t;const{getBlockRootClientId:l,hasInserterItems:s,getAllowedBlocks:c,__experimentalGetDirectInsertBlock:u,getSettings:p}=e(xr),{getBlockVariations:d}=e(a.store);o=o||l(r)||void 0;const f=c(o),m=i&&u(o),y=p(),g=1===(null==f?void 0:f.length)&&0===(null===(n=d(f[0].name,"inserter"))||void 0===n?void 0:n.length);let h=!1;return g&&(h=f[0]),{hasItems:s(o),hasSingleBlockType:g,blockTitle:h?h.title:"",allowedBlockType:h,directInsertBlock:m,rootClientId:o,prioritizePatterns:y.__experimentalPreferPatternsOnRoot&&!o}})),(0,m.withDispatch)(((e,t,n)=>{let{select:r}=n;return{insertOnlyAllowedBlock(){const{rootClientId:n,clientId:o,isAppender:i,hasSingleBlockType:l,allowedBlockType:s,directInsertBlock:c,onSelectOrClose:u,selectBlockOnInsert:p}=t;if(!l&&!c)return;const{insertBlock:d}=e(xr);let f;if(c){const e=function(e){const{getBlock:t,getPreviousBlockClientId:i}=r(xr);if(!e||!o&&!n)return{};const l={};let a={};if(o){const e=t(o),n=t(i(o));(null==e?void 0:e.name)===(null==n?void 0:n.name)&&(a=(null==n?void 0:n.attributes)||{})}else{var s;const e=t(n);if(null!=e&&null!==(s=e.innerBlocks)&&void 0!==s&&s.length){const t=e.innerBlocks[e.innerBlocks.length-1];c&&(null==c?void 0:c.name)===t.name&&(a=t.attributes)}}return e.forEach((e=>{a.hasOwnProperty(e)&&(l[e]=a[e])})),l}(c.attributesToCopy);f=(0,a.createBlock)(c.name,{...c.attributes||{},...e})}else f=(0,a.createBlock)(s.name);var m;(d(f,function(){const{getBlockIndex:e,getBlockSelectionEnd:t,getBlockOrder:l,getBlockRootClientId:a}=r(xr);if(o)return e(o);const s=t();return!i&&s&&a(s)===n?e(s)+1:l(n).length}(),n,p),u)&&u({clientId:null===(m=f)||void 0===m?void 0:m.clientId});const y=(0,_.sprintf)((0,_.__)("%s block added"),s.title);(0,dn.speak)(y)}}})),(0,f.ifCondition)((e=>{let{hasItems:t,isAppender:n,rootClientId:r,clientId:o}=e;return t||!n&&!r&&!o}))])(Gm);var Wm=(0,u.forwardRef)(((e,t)=>(0,u.createElement)(Hm,c({ref:t},e,{orderInitialBlockItems:void 0}))));var $m=(0,f.compose)((0,m.withSelect)(((e,t)=>{const{getBlockCount:n,getSettings:r,getTemplateLock:o}=e(xr),i=!n(t.rootClientId),{bodyPlaceholder:l}=r();return{showPrompt:i,isLocked:!!o(t.rootClientId),placeholder:l}})),(0,m.withDispatch)(((e,t)=>{const{insertDefaultBlock:n,startTyping:r}=e(xr);return{onAppend(){const{rootClientId:e}=t;n(void 0,e),r()}}})))((function(e){let{isLocked:t,onAppend:n,showPrompt:r,placeholder:o,rootClientId:i}=e;if(t)return null;const l=(0,up.decodeEntities)(o)||(0,_.__)("Type / to choose a block");return(0,u.createElement)("div",{"data-root-client-id":i||"",className:d()("block-editor-default-block-appender",{"has-visible-prompt":r})},(0,u.createElement)("p",{tabIndex:"0",role:"button","aria-label":(0,_.__)("Add default block"),className:"block-editor-default-block-appender__content",onKeyDown:e=>{Xu.ENTER!==e.keyCode&&Xu.SPACE!==e.keyCode||n()},onClick:()=>n(),onFocus:()=>{r&&n()}},r?l:"\ufeff"),(0,u.createElement)(Wm,{rootClientId:i,position:"bottom right",isAppender:!0,__experimentalIsQuick:!0}))}));function Km(e,t){let{rootClientId:n,className:r,onFocus:o,tabIndex:i}=e;return(0,u.createElement)(Wm,{position:"bottom center",rootClientId:n,__experimentalIsQuick:!0,renderToggle:e=>{let n,{onToggle:l,disabled:a,isOpen:s,blockTitle:c,hasSingleBlockType:p}=e;n=p?(0,_.sprintf)((0,_._x)("Add %s","directly add the only allowed block"),c):(0,_._x)("Add block","Generic label for block inserter button");const f=!p;let m=(0,u.createElement)(g.Button,{ref:t,onFocus:o,tabIndex:i,className:d()(r,"block-editor-button-block-appender"),onClick:l,"aria-haspopup":f?"true":void 0,"aria-expanded":f?s:void 0,disabled:a,label:n},!p&&(0,u.createElement)(g.VisuallyHidden,{as:"span"},n),(0,u.createElement)(Xi,{icon:pp}));return(f||p)&&(m=(0,u.createElement)(g.Tooltip,{text:n},m)),m},isAppender:!0})}const qm=(0,u.forwardRef)(((e,t)=>($()("wp.blockEditor.ButtonBlockerAppender",{alternative:"wp.blockEditor.ButtonBlockAppender",since:"5.9"}),Km(e,t))));var Jm=(0,u.forwardRef)(Km);function Ym(e){let{rootClientId:t}=e;return(0,m.useSelect)((e=>e(xr).canInsertBlockType((0,a.getDefaultBlockName)(),t)))?(0,u.createElement)($m,{rootClientId:t}):(0,u.createElement)(Jm,{rootClientId:t,className:"block-list-appender__toggle"})}var Qm=function(e){let{rootClientId:t,renderAppender:n,className:r,tagName:o="div"}=e;const i=function(e,t){const{hideInserter:n,isParentSelected:r}=(0,m.useSelect)((t=>{const{getTemplateLock:n,getSelectedBlockClientId:r,__unstableGetEditorMode:o}=t(xr),i=r();return{hideInserter:!!n(e)||"zoom-out"===o(),isParentSelected:e===i||!e&&!i}}),[e]);return n||!1===t?null:t?(0,u.createElement)(t,null):r?(0,u.createElement)(Ym,{rootClientId:e}):null}(t,n);return i?(0,u.createElement)(o,{tabIndex:-1,className:d()("block-list-appender wp-block",r),contentEditable:!1,"data-block":!0},i):null};const Zm=Number.MAX_SAFE_INTEGER;(0,u.createContext)();var Xm=function(e){let{previousClientId:t,nextClientId:n,children:r,__unstablePopoverSlot:o,__unstableContentRef:i,...l}=e;const[a,s]=(0,u.useReducer)((e=>(e+1)%Zm),0),{orientation:p,rootClientId:f,isVisible:y}=(0,m.useSelect)((e=>{var r;const{getBlockListSettings:o,getBlockRootClientId:i,isBlockVisible:l}=e(xr),a=i(null!=t?t:n);return{orientation:(null===(r=o(a))||void 0===r?void 0:r.orientation)||"vertical",rootClientId:a,isVisible:l(t)&&l(n)}}),[t,n]),h=eo(t),v=eo(n),b="vertical"===p,k=(0,u.useMemo)((()=>{if(a<0||!h&&!v||!y)return{};const e=h?h.getBoundingClientRect():null,t=v?v.getBoundingClientRect():null;if(b)return{width:e?e.width:t.width,height:t&&e?t.top-e.bottom:0};let n=0;return e&&t&&(n=(0,_.isRTL)()?e.left-t.right:t.left-e.right),{width:n,height:e?e.height:t.height}}),[h,v,b,a,y]),E=(0,u.useMemo)((()=>{if(a<0||!h&&!v||!y)return;const{ownerDocument:e}=h||v;return{ownerDocument:e,getBoundingClientRect(){const e=h?h.getBoundingClientRect():null,t=v?v.getBoundingClientRect():null;let n=0,r=0;return b?(r=e?e.bottom:t.top,n=(0,_.isRTL)()?e?e.right:t.right:e?e.left:t.left):(r=e?e.top:t.top,n=(0,_.isRTL)()?e?e.left:t.right:e?e.right:t.left),new window.DOMRect(n,r,0,0)}}}),[h,v,a,b,y]),S=qo(i);return(0,u.useLayoutEffect)((()=>{if(!h)return;const e=new window.MutationObserver(s);return e.observe(h,{attributes:!0}),()=>{e.disconnect()}}),[h]),(0,u.useLayoutEffect)((()=>{if(!v)return;const e=new window.MutationObserver(s);return e.observe(v,{attributes:!0}),()=>{e.disconnect()}}),[v]),(0,u.useLayoutEffect)((()=>{if(h)return h.ownerDocument.defaultView.addEventListener("resize",s),()=>{var e;null===(e=h.ownerDocument.defaultView)||void 0===e||e.removeEventListener("resize",s)}}),[h]),(h||v)&&y?(0,u.createElement)(g.Popover,c({ref:S,animate:!1,anchor:E,focusOnMount:!1,__unstableSlotName:o||null,key:n+"--"+f},l,{className:d()("block-editor-block-popover","block-editor-block-popover__inbetween",l.className),resize:!1,flip:!1,placement:"bottom-start",variant:"unstyled"}),(0,u.createElement)("div",{className:"block-editor-block-popover__inbetween-container",style:k},r)):null};const ey={hide:{opacity:0,scaleY:.75},show:{opacity:1,scaleY:1},exit:{opacity:0,scaleY:.9}};var ty=function(e){let{__unstablePopoverSlot:t,__unstableContentRef:n}=e;const{clientId:r}=(0,m.useSelect)((e=>{const{getBlockOrder:t,getBlockInsertionPoint:n}=e(xr),r=n(),o=t(r.rootClientId);return o.length?{clientId:o[r.index]}:{}}),[]),o=(0,f.useReducedMotion)();return(0,u.createElement)(Yo,{clientId:r,__unstableCoverTarget:!0,__unstablePopoverSlot:t,__unstableContentRef:n,className:"block-editor-block-popover__drop-zone"},(0,u.createElement)(g.__unstableMotion.div,{"data-testid":"block-popover-drop-zone",initial:o?ey.show:ey.hide,animate:ey.show,exit:o?ey.show:ey.exit,className:"block-editor-block-popover__drop-zone-foreground"}))};const ny=(0,u.createContext)();function ry(e){let{__unstablePopoverSlot:t,__unstableContentRef:n}=e;const{selectBlock:r,hideInsertionPoint:o}=(0,m.useDispatch)(xr),i=(0,u.useContext)(ny),l=(0,u.useRef)(),{orientation:a,previousClientId:s,nextClientId:c,rootClientId:p,isInserterShown:y,isDistractionFree:h,isNavigationMode:v}=(0,m.useSelect)((e=>{var t;const{getBlockOrder:n,getBlockListSettings:r,getBlockInsertionPoint:o,isBlockBeingDragged:i,getPreviousBlockClientId:l,getNextBlockClientId:a,getSettings:s,isNavigationMode:c}=e(xr),u=o(),p=n(u.rootClientId);if(!p.length)return{};let d=p[u.index-1],f=p[u.index];for(;i(d);)d=l(d);for(;i(f);)f=a(f);const m=s();return{previousClientId:d,nextClientId:f,orientation:(null===(t=r(u.rootClientId))||void 0===t?void 0:t.orientation)||"vertical",rootClientId:u.rootClientId,isNavigationMode:c(),isDistractionFree:m.isDistractionFree,isInserterShown:null==u?void 0:u.__unstableWithInserter}}),[]),b=(0,f.useReducedMotion)();const _={start:{opacity:0,scale:0},rest:{opacity:1,scale:1,transition:{delay:y?.5:0,type:"tween"}},hover:{opacity:1,scale:1,transition:{delay:.5,type:"tween"}}},k={start:{scale:b?1:0},rest:{scale:1,transition:{delay:.4,type:"tween"}}};if(h&&!v)return null;const E=d()("block-editor-block-list__insertion-point","is-"+a);return(0,u.createElement)(Xm,{previousClientId:s,nextClientId:c,__unstablePopoverSlot:t,__unstableContentRef:n},(0,u.createElement)(g.__unstableMotion.div,{layout:!b,initial:b?"rest":"start",animate:"rest",whileHover:"hover",whileTap:"pressed",exit:"start",ref:l,tabIndex:-1,onClick:function(e){e.target===l.current&&c&&r(c,-1)},onFocus:function(e){e.target!==l.current&&(i.current=!0)},className:d()(E,{"is-with-inserter":y}),onHoverEnd:function(e){e.target!==l.current||i.current||o()}},(0,u.createElement)(g.__unstableMotion.div,{variants:_,className:"block-editor-block-list__insertion-point-indicator","data-testid":"block-list-insertion-point-indicator"}),y&&(0,u.createElement)(g.__unstableMotion.div,{variants:k,className:d()("block-editor-block-list__insertion-point-inserter")},(0,u.createElement)(Wm,{position:"bottom center",clientId:c,rootClientId:p,__experimentalIsQuick:!0,onToggle:e=>{i.current=e},onSelectOrClose:()=>{i.current=!1}}))))}function oy(e){const{insertionPoint:t,isVisible:n}=(0,m.useSelect)((e=>{const{getBlockInsertionPoint:t,isBlockInsertionPointVisible:n}=e(xr);return{insertionPoint:t(),isVisible:n()}}),[]);return n?"replace"===t.operation?(0,u.createElement)(ty,c({key:`${t.rootClientId}-${t.index}`},e)):(0,u.createElement)(ry,e):null}function iy(){const e=(0,u.useContext)(ny),t=(0,m.useSelect)((e=>e(xr).getSettings().isDistractionFree||"zoom-out"===e(xr).__unstableGetEditorMode()),[]),{getBlockListSettings:n,getBlockRootClientId:r,getBlockIndex:o,isBlockInsertionPointVisible:i,isMultiSelecting:l,getSelectedBlockClientIds:a,getTemplateLock:s,__unstableIsWithinBlockOverlay:c}=(0,m.useSelect)(xr),{showInsertionPoint:p,hideInsertionPoint:d}=(0,m.useDispatch)(xr);return(0,f.useRefEffect)((r=>{if(!t)return r.addEventListener("mousemove",i),()=>{r.removeEventListener("mousemove",i)};function i(t){var r;if(e.current)return;if(t.target.nodeType===t.target.TEXT_NODE)return;if(l())return;if(!t.target.classList.contains("block-editor-block-list__layout"))return void d();let i;if(!t.target.classList.contains("is-root-container")){i=(t.target.getAttribute("data-block")?t.target:t.target.closest("[data-block]")).getAttribute("data-block")}if(s(i))return;const u=(null===(r=n(i))||void 0===r?void 0:r.orientation)||"vertical",f=t.clientY,m=t.clientX;let y=Array.from(t.target.children).find((e=>{const t=e.getBoundingClientRect();return e.classList.contains("wp-block")&&"vertical"===u&&t.top>f||e.classList.contains("wp-block")&&"horizontal"===u&&t.left>m}));if(!y)return void d();if(!y.id&&(y=y.firstElementChild,!y))return void d();const g=y.id.slice("block-".length);if(!g||c(g))return;if(a().includes(g))return;const h=y.getBoundingClientRect();if("horizontal"===u&&(t.clientY>h.bottom||t.clientY<h.top)||"vertical"===u&&(t.clientX>h.right||t.clientX<h.left))return void d();const v=o(g);0!==v?p(i,v,{__unstableWithInserter:!0}):d()}}),[e,n,r,o,i,l,p,d,a,t])}const ly="undefined"==typeof window?e=>{setTimeout((()=>e(Date.now())),0)}:window.requestIdleCallback||window.requestAnimationFrame,ay="undefined"==typeof window?clearTimeout:window.cancelIdleCallback||window.cancelAnimationFrame;function sy(e){return(0,m.useSelect)((t=>{if(!e)return null;const{getBlockName:n,getBlockAttributes:r}=t(xr),{getBlockType:o,getActiveBlockVariation:i}=t(a.store),l=n(e),s=o(l);if(!s)return null;const c=r(e),u=i(l,c),p=(0,a.isReusableBlock)(s)||(0,a.isTemplatePart)(s),d={isSynced:p,title:s.title,icon:s.icon,description:s.description,anchor:null==c?void 0:c.anchor};return u?{isSynced:p,title:u.title||s.title,icon:u.icon||s.icon,description:u.description||s.description,anchor:null==c?void 0:c.anchor}:d}),[e])}function cy(e){let{clientId:t,maximumLength:n,context:r}=e;const{attributes:o,name:i,reusableBlockTitle:l}=(0,m.useSelect)((e=>{if(!t)return{};const{getBlockName:n,getBlockAttributes:r,__experimentalGetReusableBlockTitle:o}=e(xr),i=n(t);if(!i)return{};const l=(0,a.isReusableBlock)((0,a.getBlockType)(i));return{attributes:r(t),name:i,reusableBlockTitle:l&&o(r(t).ref)}}),[t]),s=sy(t);if(!i||!s)return null;const c=(0,a.getBlockType)(i),u=c?(0,a.__experimentalGetBlockLabel)(c,o,r):null,p=l||u,d=p&&p!==c.title?p:s.title;if(n&&n>0&&d.length>n){const e="...";return d.slice(0,n-e.length)+e}return d}function uy(e){let{clientId:t,maximumLength:n,context:r}=e;return cy({clientId:t,maximumLength:n,context:r})}var py=e=>{let{children:t,clientIds:n,cloneClassname:r,onDragStart:o,onDragEnd:i}=e;const{srcRootClientId:l,isDraggable:s,icon:c}=(0,m.useSelect)((e=>{var t;const{canMoveBlocks:r,getBlockRootClientId:o,getBlockName:i}=e(xr),l=o(n[0]),s=i(n[0]);return{srcRootClientId:l,isDraggable:r(n,l),icon:null===(t=(0,a.getBlockType)(s))||void 0===t?void 0:t.icon}}),[n]),p=(0,u.useRef)(!1),[d,f,y]=function(){const e=(0,u.useRef)(null),t=(0,u.useRef)(null),n=(0,u.useRef)(null),r=(0,u.useRef)(null);return(0,u.useEffect)((()=>()=>{r.current&&(clearInterval(r.current),r.current=null)}),[]),[(0,u.useCallback)((o=>{e.current=o.clientY,n.current=(0,Ml.getScrollContainer)(o.target),r.current=setInterval((()=>{if(n.current&&t.current){const e=n.current.scrollTop+t.current;n.current.scroll({top:e})}}),25)}),[]),(0,u.useCallback)((r=>{if(!n.current)return;const o=n.current.offsetHeight,i=e.current-n.current.offsetTop,l=r.clientY-n.current.offsetTop;if(r.clientY>i){const e=Math.max(o-i-50,0),n=Math.max(l-i-50,0)/e;t.current=25*n}else if(r.clientY<i){const e=Math.max(i-50,0),n=Math.max(i-l-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:h,stopDraggingBlocks:v}=(0,m.useDispatch)(xr);if((0,u.useEffect)((()=>()=>{p.current&&v()}),[]),!s)return t({draggable:!1});const b={type:"block",srcClientIds:n,srcRootClientId:l};return(0,u.createElement)(g.Draggable,{cloneClassname:r,__experimentalTransferDataType:"wp-blocks",transferData:b,onDragStart:e=>{h(n),p.current=!0,d(e),o&&o()},onDragOver:f,onDragEnd:()=>{v(),p.current=!1,y(),i&&i()},__experimentalDragComponent:(0,u.createElement)(sf,{count:n.length,icon:c})},(e=>{let{onDraggableStart:n,onDraggableEnd:r}=e;return t({draggable:!0,onDragStart:n,onDragEnd:r})}))};var dy=(0,u.createElement)(V.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,u.createElement)(V.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"}));var fy=(0,u.createElement)(V.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,u.createElement)(V.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"}));const my=(e,t)=>"up"===e?"horizontal"===t?(0,_.isRTL)()?"right":"left":"up":"down"===e?"horizontal"===t?(0,_.isRTL)()?"left":"right":"down":null;function yy(e,t,n,r,o,i,l){const a=n+1;if(e>1)return function(e,t,n,r,o,i){const l=t+1;if(n&&r)return(0,_.__)("All blocks are selected, and cannot be moved");if(o>0&&!r){const t=my("down",i);if("down"===t)return(0,_.sprintf)((0,_.__)("Move %1$d blocks from position %2$d down by one place"),e,l);if("left"===t)return(0,_.sprintf)((0,_.__)("Move %1$d blocks from position %2$d left by one place"),e,l);if("right"===t)return(0,_.sprintf)((0,_.__)("Move %1$d blocks from position %2$d right by one place"),e,l)}if(o>0&&r){const e=my("down",i);if("down"===e)return(0,_.__)("Blocks cannot be moved down as they are already at the bottom");if("left"===e)return(0,_.__)("Blocks cannot be moved left as they are already are at the leftmost position");if("right"===e)return(0,_.__)("Blocks cannot be moved right as they are already are at the rightmost position")}if(o<0&&!n){const t=my("up",i);if("up"===t)return(0,_.sprintf)((0,_.__)("Move %1$d blocks from position %2$d up by one place"),e,l);if("left"===t)return(0,_.sprintf)((0,_.__)("Move %1$d blocks from position %2$d left by one place"),e,l);if("right"===t)return(0,_.sprintf)((0,_.__)("Move %1$d blocks from position %2$d right by one place"),e,l)}if(o<0&&n){const e=my("up",i);if("up"===e)return(0,_.__)("Blocks cannot be moved up as they are already at the top");if("left"===e)return(0,_.__)("Blocks cannot be moved left as they are already are at the leftmost position");if("right"===e)return(0,_.__)("Blocks cannot be moved right as they are already are at the rightmost position")}}(e,n,r,o,i,l);if(r&&o)return(0,_.sprintf)((0,_.__)("Block %s is the only block, and cannot be moved"),t);if(i>0&&!o){const e=my("down",l);if("down"===e)return(0,_.sprintf)((0,_.__)("Move %1$s block from position %2$d down to position %3$d"),t,a,a+1);if("left"===e)return(0,_.sprintf)((0,_.__)("Move %1$s block from position %2$d left to position %3$d"),t,a,a+1);if("right"===e)return(0,_.sprintf)((0,_.__)("Move %1$s block from position %2$d right to position %3$d"),t,a,a+1)}if(i>0&&o){const e=my("down",l);if("down"===e)return(0,_.sprintf)((0,_.__)("Block %1$s is at the end of the content and can’t be moved down"),t);if("left"===e)return(0,_.sprintf)((0,_.__)("Block %1$s is at the end of the content and can’t be moved left"),t);if("right"===e)return(0,_.sprintf)((0,_.__)("Block %1$s is at the end of the content and can’t be moved right"),t)}if(i<0&&!r){const e=my("up",l);if("up"===e)return(0,_.sprintf)((0,_.__)("Move %1$s block from position %2$d up to position %3$d"),t,a,a-1);if("left"===e)return(0,_.sprintf)((0,_.__)("Move %1$s block from position %2$d left to position %3$d"),t,a,a-1);if("right"===e)return(0,_.sprintf)((0,_.__)("Move %1$s block from position %2$d right to position %3$d"),t,a,a-1)}if(i<0&&r){const e=my("up",l);if("up"===e)return(0,_.sprintf)((0,_.__)("Block %1$s is at the beginning of the content and can’t be moved up"),t);if("left"===e)return(0,_.sprintf)((0,_.__)("Block %1$s is at the beginning of the content and can’t be moved left"),t);if("right"===e)return(0,_.sprintf)((0,_.__)("Block %1$s is at the beginning of the content and can’t be moved right"),t)}}const gy=(e,t)=>"up"===e?"horizontal"===t?(0,_.isRTL)()?mp:yp:dy:"down"===e?"horizontal"===t?(0,_.isRTL)()?yp:mp:fy:null,hy=(e,t)=>"up"===e?"horizontal"===t?(0,_.isRTL)()?(0,_.__)("Move right"):(0,_.__)("Move left"):(0,_.__)("Move up"):"down"===e?"horizontal"===t?(0,_.isRTL)()?(0,_.__)("Move left"):(0,_.__)("Move right"):(0,_.__)("Move down"):null,vy=(0,u.forwardRef)(((e,t)=>{let{clientIds:n,direction:r,orientation:o,...i}=e;const l=(0,f.useInstanceId)(vy),s=Array.isArray(n)?n:[n],p=s.length,{blockType:y,isDisabled:h,rootClientId:v,isFirst:b,isLast:_,firstIndex:k,orientation:E="vertical"}=(0,m.useSelect)((e=>{const{getBlockIndex:t,getBlockRootClientId:n,getBlockOrder:i,getBlock:l,getBlockListSettings:c}=e(xr),u=s[0],p=n(u),d=t(u),f=t(s[s.length-1]),m=i(p),y=l(u),g=0===d,h=f===m.length-1,{orientation:v}=c(p)||{};return{blockType:y?(0,a.getBlockType)(y.name):null,isDisabled:"up"===r?g:h,rootClientId:p,firstIndex:d,isFirst:g,isLast:h,orientation:o||v}}),[n,r]),{moveBlocksDown:S,moveBlocksUp:w}=(0,m.useDispatch)(xr),C="up"===r?w:S,I=`block-editor-block-mover-button__description-${l}`;return(0,u.createElement)(u.Fragment,null,(0,u.createElement)(g.Button,c({ref:t,className:d()("block-editor-block-mover-button",`is-${r}-button`),icon:gy(r,E),label:hy(r,E),"aria-describedby":I},i,{onClick:h?null:e=>{C(n,v),i.onClick&&i.onClick(e)},disabled:h,__experimentalIsFocusable:!0})),(0,u.createElement)(g.VisuallyHidden,{id:I},yy(p,y&&y.title,k,b,_,"up"===r?-1:1,E)))})),by=(0,u.forwardRef)(((e,t)=>(0,u.createElement)(vy,c({direction:"up",ref:t},e)))),_y=(0,u.forwardRef)(((e,t)=>(0,u.createElement)(vy,c({direction:"down",ref:t},e))));var ky=function(e){let{clientIds:t,hideDragHandle:n}=e;const{canMove:r,rootClientId:o,isFirst:i,isLast:l,orientation:a}=(0,m.useSelect)((e=>{var n;const{getBlockIndex:r,getBlockListSettings:o,canMoveBlocks:i,getBlockOrder:l,getBlockRootClientId:a}=e(xr),s=Array.isArray(t)?t:[t],c=s[0],u=a(c),p=r(c),d=r(s[s.length-1]),f=l(u);return{canMove:i(t,u),rootClientId:u,isFirst:0===p,isLast:d===f.length-1,orientation:null===(n=o(u))||void 0===n?void 0:n.orientation}}),[t]);if(!r||i&&l&&!o)return null;const s=(0,_.__)("Drag");return(0,u.createElement)(g.ToolbarGroup,{className:d()("block-editor-block-mover",{"is-horizontal":"horizontal"===a})},!n&&(0,u.createElement)(py,{clientIds:t},(e=>(0,u.createElement)(g.Button,c({icon:af,className:"block-editor-block-mover__drag-handle","aria-hidden":"true",label:s,tabIndex:"-1"},e)))),(0,u.createElement)("div",{className:"block-editor-block-mover__move-button-container"},(0,u.createElement)(g.ToolbarItem,null,(e=>(0,u.createElement)(by,c({clientIds:t},e)))),(0,u.createElement)(g.ToolbarItem,null,(e=>(0,u.createElement)(_y,c({clientIds:t},e))))))};var Ey=function(e){let{clientId:t,rootClientId:n}=e;const r=sy(t),o=(0,m.useSelect)((e=>{var r;const{getBlock:o,getBlockIndex:i,hasBlockMovingClientId:l,getBlockListSettings:a,__unstableGetEditorMode:s}=e(xr),c=i(t),{name:u,attributes:p}=o(t);return{index:c,name:u,attributes:p,blockMovingMode:l(),orientation:null===(r=a(n))||void 0===r?void 0:r.orientation,editorMode:s()}}),[t,n]),{index:i,name:l,attributes:s,blockMovingMode:p,orientation:f,editorMode:y}=o,{setNavigationMode:h,removeBlock:v}=(0,m.useDispatch)(xr),b=(0,u.useRef)(),k=(0,a.getBlockType)(l),E=(0,a.__experimentalGetAccessibleBlockLabel)(k,s,i+1,f);(0,u.useEffect)((()=>{b.current.focus(),(0,dn.speak)(E)}),[E]);const S=eo(t),{hasBlockMovingClientId:w,getBlockIndex:C,getBlockRootClientId:I,getClientIdsOfDescendants:A,getSelectedBlockClientId:x,getMultiSelectedBlocksEndClientId:B,getPreviousBlockClientId:P,getNextBlockClientId:T}=(0,m.useSelect)(xr),{selectBlock:O,clearSelectedBlock:N,setBlockMovingClientId:M,moveBlockToPosition:R}=(0,m.useDispatch)(xr),F=d()("block-editor-block-list__block-selection-button",{"is-block-moving-mode":!!p}),L=(0,_.__)("Drag");return(0,u.createElement)("div",{className:F},(0,u.createElement)(g.Flex,{justify:"center",className:"block-editor-block-list__block-selection-button__content"},(0,u.createElement)(g.FlexItem,null,(0,u.createElement)(hp,{icon:null==r?void 0:r.icon,showColors:!0})),(0,u.createElement)(g.FlexItem,null,"zoom-out"===y&&(0,u.createElement)(ky,{clientIds:[t],hideDragHandle:!0}),"navigation"===y&&(0,u.createElement)(py,{clientIds:[t]},(e=>(0,u.createElement)(g.Button,c({icon:af,className:"block-selection-button_drag-handle","aria-hidden":"true",label:L,tabIndex:"-1"},e))))),(0,u.createElement)(g.FlexItem,null,(0,u.createElement)(g.Button,{ref:b,onClick:"navigation"===y?()=>h(!1):void 0,onKeyDown:function(e){const{keyCode:n}=e,r=n===Xu.UP,o=n===Xu.DOWN,i=n===Xu.LEFT,l=n===Xu.RIGHT,a=n===Xu.TAB,s=n===Xu.ESCAPE,c=n===Xu.ENTER,u=n===Xu.SPACE,p=e.shiftKey;if(n===Xu.BACKSPACE||n===Xu.DELETE)return v(t),void e.preventDefault();const d=x(),f=B(),m=P(f||d),y=T(f||d),g=a&&p||r,h=a&&!p||o,b=i,_=l;let k;if(g)k=m;else if(h)k=y;else if(b){var E;k=null!==(E=I(d))&&void 0!==E?E:d}else if(_){var F;k=null!==(F=A([d])[0])&&void 0!==F?F:d}const L=w();if(s&&L&&!e.defaultPrevented&&(M(null),e.preventDefault()),(c||u)&&L){const e=I(L),t=I(d),n=C(L);let r=C(d);n<r&&e===t&&(r-=1),R(L,e,t,r),O(L),M(null)}if(h||g||b||_)if(k)e.preventDefault(),O(k);else if(a&&d){let t;if(h){t=S;do{t=Ml.focus.tabbable.findNext(t)}while(t&&S.contains(t));t||(t=S.ownerDocument.defaultView.frameElement,t=Ml.focus.tabbable.findNext(t))}else t=Ml.focus.tabbable.findPrevious(S);t&&(e.preventDefault(),t.focus(),N())}},label:E,showTooltip:!1,className:"block-selection-button_select-button"},(0,u.createElement)(uy,{clientId:t,maximumLength:35})))))};function Sy(e){return Array.from(e.querySelectorAll("[data-toolbar-item]"))}function wy(e,t,n,r,o){const[i]=(0,u.useState)(t),[l]=(0,u.useState)(r),a=(0,u.useCallback)((()=>{!function(e){const[t]=Ml.focus.tabbable.find(e);t&&t.focus({preventScroll:!0})}(e.current)}),[]);(0,Pp.useShortcut)("core/block-editor/focus-toolbar",a),(0,u.useEffect)((()=>{i&&a()}),[n,i,a]),(0,u.useEffect)((()=>{let t=0;return l&&!i&&(t=window.requestAnimationFrame((()=>{const t=Sy(e.current),n=l||0;var r;t[n]&&(r=e.current).contains(r.ownerDocument.activeElement)&&t[n].focus({preventScroll:!0})}))),()=>{if(window.cancelAnimationFrame(t),!o||!e.current)return;const n=Sy(e.current).findIndex((e=>0===e.tabIndex));o(n)}}),[l,i])}var Cy=function(e){let{children:t,focusOnMount:n,__experimentalInitialIndex:r,__experimentalOnIndexChange:o,...i}=e;const l=(0,u.useRef)(),a=function(e){const[t,n]=(0,u.useState)(!0),r=(0,u.useCallback)((()=>{const t=!Ml.focus.tabbable.find(e.current).some((e=>!("toolbarItem"in e.dataset)));t||$()("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,u.useLayoutEffect)((()=>{const t=new window.MutationObserver(r);return t.observe(e.current,{childList:!0,subtree:!0}),()=>t.disconnect()}),[t]),t}(l);return wy(l,n,a,r,o),a?(0,u.createElement)(g.Toolbar,c({label:i["aria-label"],ref:l},i),t):(0,u.createElement)(g.NavigableMenu,c({orientation:"horizontal",role:"toolbar",ref:l},i),t)};const{clearTimeout:Iy,setTimeout:Ay}=window,xy=()=>{},By=200;function Py(e){let{ref:t,isFocused:n,debounceTimeout:r=By,onChange:o=xy}=e;const[i,l]=(0,u.useState)(!1),a=(0,u.useRef)(),s=e=>{null!=t&&t.current&&l(e),o(e)},c=()=>{const e=(null==t?void 0:t.current)&&t.current.matches(":hover");return!n&&!e},p=()=>{const e=a.current;e&&Iy&&Iy(e)};return(0,u.useEffect)((()=>()=>{s(!1),p()}),[]),{showMovers:i,debouncedShowMovers:e=>{e&&e.stopPropagation(),p(),i||s(!0)},debouncedHideMovers:e=>{e&&e.stopPropagation(),p(),a.current=Ay((()=>{c()&&s(!1)}),r)}}}function Ty(e){let{ref:t,debounceTimeout:n=By,onChange:r=xy}=e;const[o,i]=(0,u.useState)(!1),{showMovers:l,debouncedShowMovers:a,debouncedHideMovers:s}=Py({ref:t,debounceTimeout:n,isFocused:o,onChange:r}),c=(0,u.useRef)(!1),p=()=>(null==t?void 0:t.current)&&t.current.contains(t.current.ownerDocument.activeElement);return(0,u.useEffect)((()=>{const e=t.current,n=()=>{p()&&(i(!0),a())},r=()=>{p()||(i(!1),s())};return e&&!c.current&&(e.addEventListener("focus",n,!0),e.addEventListener("blur",r,!0),c.current=!0),()=>{e&&(e.removeEventListener("focus",n),e.removeEventListener("blur",r))}}),[t,c,i,a,s]),{showMovers:l,gestures:{onMouseMove:a,onMouseLeave:s}}}function Oy(){const{selectBlock:e,toggleBlockHighlight:t}=(0,m.useDispatch)(xr),{firstParentClientId:n,shouldHide:r,isDistractionFree:o}=(0,m.useSelect)((e=>{const{getBlockName:t,getBlockParents:n,getSelectedBlockClientId:r,getSettings:o}=e(xr),{hasBlockSupport:i}=e(a.store),l=n(r()),s=l[l.length-1],c=t(s),u=(0,a.getBlockType)(c),p=o();return{firstParentClientId:s,shouldHide:!i(u,"__experimentalParentSelector",!0),isDistractionFree:p.isDistractionFree}}),[]),i=sy(n),l=(0,u.useRef)(),{gestures:s}=Ty({ref:l,onChange(e){e&&o||t(n,e)}});return r||void 0===n?null:(0,u.createElement)("div",c({className:"block-editor-block-parent-selector",key:n,ref:l},s),(0,u.createElement)(g.ToolbarButton,{className:"block-editor-block-parent-selector__button",onClick:()=>e(n),label:(0,_.sprintf)((0,_.__)("Select %s"),null==i?void 0:i.title),showTooltip:!0,icon:(0,u.createElement)(hp,{icon:null==i?void 0:i.icon})}))}var Ny=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{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 My(e){let{blocks:t}=e;return(0,u.createElement)("div",{className:"block-editor-block-switcher__popover__preview__parent"},(0,u.createElement)("div",{className:"block-editor-block-switcher__popover__preview__container"},(0,u.createElement)(g.Popover,{className:"block-editor-block-switcher__preview__popover",placement:"bottom-start",focusOnMount:!1},(0,u.createElement)("div",{className:"block-editor-block-switcher__preview"},(0,u.createElement)("div",{className:"block-editor-block-switcher__preview-title"},(0,_.__)("Preview")),(0,u.createElement)(tf,{viewportWidth:500,blocks:t})))))}function Ry(e){let{restTransformations:t,onSelect:n,setHoveredTransformItemName:r}=e;return t.map((e=>(0,u.createElement)(Fy,{key:e.name,item:e,onSelect:n,setHoveredTransformItemName:r})))}function Fy(e){let{item:t,onSelect:n,setHoveredTransformItemName:r}=e;const{name:o,icon:i,title:l,isDisabled:s}=t;return(0,u.createElement)(g.MenuItem,{className:(0,a.getBlockMenuDefaultClassName)(o),onClick:e=>{e.preventDefault(),n(o)},disabled:s,onMouseLeave:()=>r(null),onMouseEnter:()=>r(o)},(0,u.createElement)(hp,{icon:i,showColors:!0}),l)}var Ly=e=>{let{className:t,possibleBlockTransformations:n,onSelect:r,blocks:o}=e;const[i,l]=(0,u.useState)(),{priorityTextTransformations:s,restTransformations:c}=function(e){const t={"core/paragraph":1,"core/heading":2,"core/list":3,"core/quote":4},n=(0,u.useMemo)((()=>{const n=Object.keys(t);return e.reduce(((e,t)=>{const{name:r}=t;return n.includes(r)?e.priorityTextTransformations.push(t):e.restTransformations.push(t),e}),{priorityTextTransformations:[],restTransformations:[]})}),[e]);return n.priorityTextTransformations.sort(((e,n)=>{let{name:r}=e,{name:o}=n;return t[r]<t[o]?-1:1})),n}(n),p=s.length&&c.length,d=!!c.length&&(0,u.createElement)(Ry,{restTransformations:c,onSelect:r,setHoveredTransformItemName:l});return(0,u.createElement)(u.Fragment,null,(0,u.createElement)(g.MenuGroup,{label:(0,_.__)("Transform to"),className:t},i&&(0,u.createElement)(My,{blocks:(0,a.switchToBlockType)(o,i)}),s.map((e=>(0,u.createElement)(Fy,{key:e.name,item:e,onSelect:r,setHoveredTransformItemName:l}))),!p&&d),!!p&&(0,u.createElement)(g.MenuGroup,{className:t},d))};var Dy=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"})),Uy=window.wp.tokenList,jy=n.n(Uy);function zy(e,t,n){const r=new(jy())(e);return t&&r.remove("is-style-"+t.name),r.add("is-style-"+n.name),r.value}function Vy(e){return null==e?void 0:e.find((e=>e.isDefault))}function Gy(e){let{clientId:t,onSwitch:n}=e;const{styles:r,block:o,blockType:i,className:l}=(0,m.useSelect)((e=>{const{getBlock:n}=e(xr),r=n(t);if(!r)return{};const o=(0,a.getBlockType)(r.name),{getBlockStyles:i}=e(a.store);return{block:r,blockType:o,styles:i(r.name),className:r.attributes.className||""}}),[t]),{updateBlockAttributes:s}=(0,m.useDispatch)(xr),c=function(e){return e&&0!==e.length?Vy(e)?e:[{name:"default",label:(0,_._x)("Default","block style"),isDefault:!0},...e]:[]}(r),p=function(e,t){for(const n of new(jy())(t).values()){if(-1===n.indexOf("is-style-"))continue;const t=n.substring(9),r=null==e?void 0:e.find((e=>{let{name:n}=e;return n===t}));if(r)return r}return Vy(e)}(c,l),d=function(e,t){return(0,u.useMemo)((()=>{const n=null==t?void 0:t.example,r=null==t?void 0:t.name;return n&&r?(0,a.getBlockFromExample)(r,{attributes:n.attributes,innerBlocks:n.innerBlocks}):e?(0,a.cloneBlock)(e):void 0}),[null!=t&&t.example?null==e?void 0:e.name:e,t])}(o,i);return{onSelect:e=>{const r=zy(l,p,e);s(t,{className:r}),n()},stylesToRender:c,activeStyle:p,genericPreviewBlock:d,className:l}}const Hy=()=>{};function Wy(e){let{clientId:t,onSwitch:n=Hy}=e;const{onSelect:r,stylesToRender:o,activeStyle:i}=Gy({clientId:t,onSwitch:n});return o&&0!==o.length?(0,u.createElement)(u.Fragment,null,o.map((e=>{const t=e.label||e.name;return(0,u.createElement)(g.MenuItem,{key:e.name,icon:i.name===e.name?Dy:null,onClick:()=>r(e)},(0,u.createElement)(g.__experimentalText,{as:"span",limit:18,ellipsizeMode:"tail",truncate:!0},t))}))):null}function $y(e){let{hoveredBlock:t,onSwitch:n}=e;const{clientId:r}=t;return(0,u.createElement)(g.MenuGroup,{label:(0,_.__)("Styles"),className:"block-editor-block-switcher__styles__menugroup"},(0,u.createElement)(Wy,{clientId:r,onSwitch:n}))}const Ky=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]: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=Ky(e,t,n);if(r)return r}}},qy=(e,t)=>{const n=((e,t)=>{const n=(0,a.__experimentalGetBlockAttributesNamesByRole)(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}};var Jy=(e,t)=>(0,u.useMemo)((()=>e.reduce(((e,n)=>{const r=((e,t)=>{const n=t.map((e=>(0,a.cloneBlock)(e))),r=new Set;for(const t of e){let e=!1;for(const o of n){const n=Ky(o,t.name,r);if(n){e=!0,r.add(n.clientId),qy(n,t);break}}if(!e)return}return n})(t,n.blocks);return r&&e.push({...n,transformedBlocks:r}),e}),[])),[e,t]);function Yy(e){let{patterns:t,onSelect:n}=e;return(0,u.createElement)("div",{className:"block-editor-block-switcher__popover__preview__parent"},(0,u.createElement)("div",{className:"block-editor-block-switcher__popover__preview__container"},(0,u.createElement)(g.Popover,{className:"block-editor-block-switcher__preview__popover",position:"bottom right"},(0,u.createElement)("div",{className:"block-editor-block-switcher__preview"},(0,u.createElement)("div",{className:"block-editor-block-switcher__preview-title"},(0,_.__)("Preview")),(0,u.createElement)(Qy,{patterns:t,onSelect:n})))))}function Qy(e){let{patterns:t,onSelect:n}=e;const r=(0,g.__unstableUseCompositeState)();return(0,u.createElement)(g.__unstableComposite,c({},r,{role:"listbox",className:"block-editor-block-switcher__preview-patterns-container","aria-label":(0,_.__)("Patterns list")}),t.map((e=>(0,u.createElement)(Zy,{key:e.name,pattern:e,onSelect:n,composite:r}))))}function Zy(e){let{pattern:t,onSelect:n,composite:r}=e;const o="block-editor-block-switcher__preview-patterns-container",i=(0,f.useInstanceId)(Zy,`${o}-list__item-description`);return(0,u.createElement)("div",{className:`${o}-list__list-item`,"aria-label":t.title,"aria-describedby":t.description?i:void 0},(0,u.createElement)(g.__unstableCompositeItem,c({role:"option",as:"div"},r,{className:`${o}-list__item`,onClick:()=>n(t.transformedBlocks)}),(0,u.createElement)(tf,{blocks:t.transformedBlocks,viewportWidth:t.viewportWidth||500}),(0,u.createElement)("div",{className:`${o}-list__item-title`},t.title)),!!t.description&&(0,u.createElement)(g.VisuallyHidden,{id:i},t.description))}var Xy=function(e){let{blocks:t,patterns:n,onSelect:r}=e;const[o,i]=(0,u.useState)(!1),l=Jy(n,t);return l.length?(0,u.createElement)(g.MenuGroup,{className:"block-editor-block-switcher__pattern__transforms__menugroup"},o&&(0,u.createElement)(Yy,{patterns:l,onSelect:r}),(0,u.createElement)(g.MenuItem,{onClick:e=>{e.preventDefault(),i(!o)},icon:mp},(0,_.__)("Patterns"))):null};const eg=e=>{let{clientIds:t,blocks:n}=e;const{replaceBlocks:r,multiSelect:o}=(0,m.useDispatch)(xr),i=sy(n[0].clientId),{possibleBlockTransformations:l,canRemove:s,hasBlockStyles:c,icon:p,patterns:d}=(0,m.useSelect)((e=>{const{getBlockRootClientId:r,getBlockTransformItems:o,__experimentalGetPatternTransformItems:l}=e(xr),{getBlockStyles:s,getBlockType:c}=e(a.store),{canRemoveBlocks:u}=e(xr),p=r(Array.isArray(t)?t[0]:t),[{name:d}]=n,f=1===n.length,m=f&&s(d);let y;if(f)y=null==i?void 0:i.icon;else{var g;y=1===new Set(n.map((e=>{let{name:t}=e;return t}))).size?null===(g=c(d))||void 0===g?void 0:g.icon:Ny}return{possibleBlockTransformations:o(n,p),canRemove:u(t,p),hasBlockStyles:!(null==m||!m.length),icon:y,patterns:l(n,p)}}),[t,n,null==i?void 0:i.icon]),f=cy({clientId:Array.isArray(t)?t[0]:t,maximumLength:35}),y=1===n.length&&(0,a.isReusableBlock)(n[0]),h=1===n.length&&(0,a.isTemplatePart)(n[0]);function v(e){e.length>1&&o(e[0].clientId,e[e.length-1].clientId)}const b=!!l.length&&s&&!h,k=!(null==d||!d.length)&&s;if(!c&&!b)return(0,u.createElement)(g.ToolbarGroup,null,(0,u.createElement)(g.ToolbarButton,{disabled:!0,className:"block-editor-block-switcher__no-switcher-icon",title:f,icon:(0,u.createElement)(u.Fragment,null,(0,u.createElement)(hp,{icon:p,showColors:!0}),(y||h)&&(0,u.createElement)("span",{className:"block-editor-block-switcher__toggle-text"},f))}));const E=f,S=1===n.length?(0,_.sprintf)((0,_.__)("%s: Change block type or style"),f):(0,_.sprintf)((0,_._n)("Change type of %d block","Change type of %d blocks",n.length),n.length),w=c||b||k;return(0,u.createElement)(g.ToolbarGroup,null,(0,u.createElement)(g.ToolbarItem,null,(e=>(0,u.createElement)(g.DropdownMenu,{className:"block-editor-block-switcher",label:E,popoverProps:{position:"bottom right",variant:"toolbar",className:"block-editor-block-switcher__popover"},icon:(0,u.createElement)(u.Fragment,null,(0,u.createElement)(hp,{icon:p,className:"block-editor-block-switcher__toggle",showColors:!0}),(y||h)&&(0,u.createElement)("span",{className:"block-editor-block-switcher__toggle-text"},f)),toggleProps:{describedBy:S,...e},menuProps:{orientation:"both"}},(e=>{let{onClose:o}=e;return w&&(0,u.createElement)("div",{className:"block-editor-block-switcher__container"},k&&(0,u.createElement)(Xy,{blocks:n,patterns:d,onSelect:e=>{!function(e){r(t,e),v(e)}(e),o()}}),b&&(0,u.createElement)(Ly,{className:"block-editor-block-switcher__transforms__menugroup",possibleBlockTransformations:l,blocks:n,onSelect:e=>{!function(e){const o=(0,a.switchToBlockType)(n,e);r(t,o),v(o)}(e),o()}}),c&&(0,u.createElement)($y,{hoveredBlock:n[0],onSwitch:o}))})))))};var tg=e=>{let{clientIds:t}=e;const n=(0,m.useSelect)((e=>e(xr).getBlocksByClientId(t)),[t]);return!n.length||n.some((e=>!e))?null:(0,u.createElement)(eg,{clientIds:t,blocks:n})};const{Fill:ng,Slot:rg}=(0,g.createSlotFill)("__unstableBlockToolbarLastItem");ng.Slot=rg;var og=ng;function ig(e,t){if(t&&1===(null==e?void 0:e.length)&&0===e[0].type.indexOf("image/")){var n;const e=/<\s*img\b/gi;if(1!==(null===(n=t.match(e))||void 0===n?void 0:n.length))return!0;const r=/<\s*img\b[^>]*\bsrc="file:\/\//i;if(t.match(r))return!0}return!1}function lg(){const{getBlockName:e}=(0,m.useSelect)(xr),{getBlockType:t}=(0,m.useSelect)(a.store),{createSuccessNotice:n}=(0,m.useDispatch)(bf.store);return(0,u.useCallback)(((r,o)=>{let i="";if(1===o.length){var l;const n=o[0],a=null===(l=t(e(n)))||void 0===l?void 0:l.title;i="copy"===r?(0,_.sprintf)((0,_.__)('Copied "%s" to clipboard.'),a):(0,_.sprintf)((0,_.__)('Moved "%s" to clipboard.'),a)}else i="copy"===r?(0,_.sprintf)((0,_._n)("Copied %d block to clipboard.","Copied %d blocks to clipboard.",o.length),o.length):(0,_.sprintf)((0,_._n)("Moved %d block to clipboard.","Moved %d blocks to clipboard.",o.length),o.length);n(i,{type:"snackbar"})}),[])}function ag(){const{getBlocksByClientId:e,getSelectedBlockClientIds:t,hasMultiSelection:n,getSettings:r,__unstableIsFullySelected:o,__unstableIsSelectionCollapsed:i,__unstableIsSelectionMergeable:l,__unstableGetSelectedBlocksWithPartialSelection:s,canInsertBlockType:c}=(0,m.useSelect)(xr),{flashBlock:u,removeBlocks:p,replaceBlocks:d,__unstableDeleteSelection:y,__unstableExpandSelection:g,insertBlocks:h}=(0,m.useDispatch)(xr),v=lg();return(0,f.useRefEffect)((f=>{function m(m){const b=t();if(0===b.length)return;if(!n()){const{target:e}=m,{ownerDocument:t}=e;if("copy"===m.type||"cut"===m.type?(0,Ml.documentHasUncollapsedSelection)(t):(0,Ml.documentHasSelection)(t))return}if(!f.contains(m.target.ownerDocument.activeElement))return;const _=m.defaultPrevented;m.preventDefault();const k=l(),E=i()||o(),S=!E&&!k;if("copy"===m.type||"cut"===m.type)if(1===b.length&&u(b[0]),S)g();else{let t;if(v(m.type,b),E)t=e(b);else{const[n,r]=s();t=[n,...e(b.slice(1,b.length-1)),r]}const n=m.clipboardData.getData("__unstableWrapperBlockName");n&&(t=(0,a.createBlock)(n,JSON.parse(m.clipboardData.getData("__unstableWrapperBlockAttributes")),t));const r=(0,a.serialize)(t);m.clipboardData.setData("text/plain",function(e){e=e.replace(/<br>/g,"\n");return(0,Ml.__unstableStripHTML)(e).trim().replace(/\n\n+/g,"\n\n")}(r)),m.clipboardData.setData("text/html",r)}if("cut"===m.type)E&&!S?p(b):y();else if("paste"===m.type){if(_)return;const{__experimentalCanUserUseUnfilteredHTML:e}=r(),{plainText:t,html:n,files:o}=function(e){let{clipboardData:t}=e,n="",r="";try{n=t.getData("text/plain"),r=t.getData("text/html")}catch(e){try{r=t.getData("Text")}catch(e){return}}const o=(0,Ml.getFilesFromDataTransfer)(t);return o.length&&!ig(o,r)?{files:o}:{html:r,plainText:n,files:[]}}(m);let i=[];if(o.length){const e=(0,a.getBlockTransforms)("from");i=o.reduce(((t,n)=>{const r=(0,a.findTransform)(e,(e=>"files"===e.type&&e.isMatch([n])));return r&&t.push(r.transform([n])),t}),[]).flat()}else i=(0,a.pasteHandler)({HTML:n,plainText:t,mode:"BLOCKS",canUserUseUnfilteredHTML:e});if(1===b.length){const[e]=b;if(i.every((t=>c(t.name,e))))return void h(i,void 0,e)}d(b,i,i.length-1,-1)}}return f.ownerDocument.addEventListener("copy",m),f.ownerDocument.addEventListener("cut",m),f.ownerDocument.addEventListener("paste",m),()=>{f.ownerDocument.removeEventListener("copy",m),f.ownerDocument.removeEventListener("cut",m),f.ownerDocument.removeEventListener("paste",m)}}),[])}var sg=function(e){let{children:t}=e;return(0,u.createElement)("div",{ref:ag()},t)};const cg="align",ug="__experimentalBorder",pg="color",dg="customClassName",fg="typography.__experimentalFontFamily",mg="typography.fontSize",yg="__experimentalLayout",gg=[...["typography.lineHeight",mg,"typography.__experimentalFontStyle","typography.__experimentalFontWeight",fg,"typography.__experimentalTextDecoration","typography.__experimentalTextTransform","typography.__experimentalLetterSpacing"],ug,pg,"spacing"];const hg={align:e=>(0,a.hasBlockSupport)(e,cg),borderColor:e=>function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"any";if("web"!==u.Platform.OS)return!1;const n=(0,a.getBlockSupport)(e,ug);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]))}(e,"color"),backgroundColor:e=>{const t=(0,a.getBlockSupport)(e,pg);return t&&!1!==t.background},textColor:e=>{const t=(0,a.getBlockSupport)(e,pg);return t&&!1!==t.text},gradient:e=>{const t=(0,a.getBlockSupport)(e,pg);return null!==t&&"object"==typeof t&&!!t.gradients},className:e=>(0,a.hasBlockSupport)(e,dg,!0),fontFamily:e=>(0,a.hasBlockSupport)(e,fg),fontSize:e=>(0,a.hasBlockSupport)(e,mg),layout:e=>(0,a.hasBlockSupport)(e,yg),style:e=>gg.some((t=>(0,a.hasBlockSupport)(e,t)))};function vg(e,t){return Object.entries(hg).reduce(((n,r)=>{let[o,i]=r;return i(e.name)&&i(t.name)&&(n[o]=e.attributes[o]),n}),{})}function bg(e,t,n){for(let r=0;r<Math.min(t.length,e.length);r+=1)n(e[r].clientId,vg(t[r],e[r])),bg(e[r].innerBlocks,t[r].innerBlocks,n)}function _g(){const e=(0,m.useRegistry)(),{updateBlockAttributes:t}=(0,m.useDispatch)(xr),{createSuccessNotice:n,createWarningNotice:r,createErrorNotice:o}=(0,m.useDispatch)(bf.store);return(0,u.useCallback)((async i=>{let l="";try{if(!window.navigator.clipboard)return void o((0,_.__)("Unable to paste styles. This feature is only available on secure (https) sites in supporting browsers."),{type:"snackbar"});l=await window.navigator.clipboard.readText()}catch(e){return void o((0,_.__)("Unable to paste styles. Please allow browser clipboard permissions before continuing."),{type:"snackbar"})}if(!l||!function(e){try{const t=(0,a.parse)(e,{__unstableSkipMigrationLogs:!0,__unstableSkipAutop:!0});return 1!==t.length||"core/freeform"!==t[0].name}catch(e){return!1}}(l))return void r((0,_.__)("Unable to paste styles. Block styles couldn't be found within the copied content."),{type:"snackbar"});const s=(0,a.parse)(l);if(1===s.length?e.batch((()=>{bg(i,i.map((()=>s[0])),t)})):e.batch((()=>{bg(i,s,t)})),1===i.length){var c;const e=null===(c=(0,a.getBlockType)(i[0].name))||void 0===c?void 0:c.title;n((0,_.sprintf)((0,_.__)("Pasted styles to %s."),e),{type:"snackbar"})}else n((0,_.sprintf)((0,_.__)("Pasted styles to %d blocks."),i.length),{type:"snackbar"})}),[e.batch,t,n,r,o])}function kg(e){let{clientIds:t,children:n,__experimentalUpdateSelection:r}=e;const{canInsertBlockType:o,getBlockRootClientId:i,getBlocksByClientId:l,canMoveBlocks:s,canRemoveBlocks:c}=(0,m.useSelect)(xr),{getDefaultBlockName:u,getGroupingBlockName:p}=(0,m.useSelect)(a.store),d=l(t),f=i(t[0]),y=d.every((e=>!!e&&(0,a.hasBlockSupport)(e.name,"multiple",!0)&&o(e.name,f))),g=o(u(),f),h=s(t,f),v=c(t,f),{removeBlocks:b,replaceBlocks:_,duplicateBlocks:k,insertAfterBlock:E,insertBeforeBlock:S,flashBlock:w,setBlockMovingClientId:C,setNavigationMode:I,selectBlock:A}=(0,m.useDispatch)(xr),x=lg(),B=_g();return n({canDuplicate:y,canInsertDefaultBlock:g,canMove:h,canRemove:v,rootClientId:f,blocks:d,onDuplicate(){return k(t,r)},onRemove(){return b(t,r)},onInsertBefore(){const e=Array.isArray(t)?t[0]:e;S(e)},onInsertAfter(){const e=Array.isArray(t)?t[t.length-1]:e;E(e)},onMoveTo(){I(!0),A(t[0]),C(t[0])},onGroup(){if(!d.length)return;const e=p(),n=(0,a.switchToBlockType)(d,e);n&&_(t,n)},onUngroup(){if(!d.length)return;const e=d[0].innerBlocks;e.length&&_(t,e)},onCopy(){const e=d.map((e=>{let{clientId:t}=e;return t}));1===d.length&&w(e[0]),x("copy",e)},async onPasteStyles(){await B(d)}})}const Eg=()=>{};var Sg=(0,f.compose)([(0,m.withSelect)(((e,t)=>{let{clientId:n}=t;const{getBlock:r,getBlockMode:o,getSettings:i}=e(xr),l=r(n),s=i().codeEditingEnabled;return{mode:o(n),blockType:l?(0,a.getBlockType)(l.name):null,isCodeEditingEnabled:s}})),(0,m.withDispatch)(((e,t)=>{let{onToggle:n=Eg,clientId:r}=t;return{onToggleMode(){e(xr).toggleBlockMode(r),n()}}}))])((function(e){let{blockType:t,mode:n,onToggleMode:r,small:o=!1,isCodeEditingEnabled:i=!0}=e;if(!t||!(0,a.hasBlockSupport)(t,"html",!0)||!i)return null;const l="visual"===n?(0,_.__)("Edit as HTML"):(0,_.__)("Edit visually");return(0,u.createElement)(g.MenuItem,{onClick:r},!o&&l)}));var wg=(0,f.compose)((0,m.withSelect)(((e,t)=>{let{clientId:n}=t;const r=e(xr).getBlock(n);return{block:r,shouldRender:r&&"core/html"===r.name}})),(0,m.withDispatch)(((e,t)=>{let{block:n}=t;return{onClick:()=>e(xr).replaceBlocks(n.clientId,(0,a.rawHandler)({HTML:(0,a.getBlockContent)(n)}))}})))((function(e){let{shouldRender:t,onClick:n,small:r}=e;if(!t)return null;const o=(0,_.__)("Convert to Blocks");return(0,u.createElement)(g.MenuItem,{onClick:n},!r&&o)}));const{Fill:Cg,Slot:Ig}=(0,g.createSlotFill)("__unstableBlockSettingsMenuFirstItem");Cg.Slot=Ig;var Ag=Cg;function xg(){const{clientIds:e,isGroupable:t,isUngroupable:n,blocksSelection:r,groupingBlockName:o}=(0,m.useSelect)((e=>{var t;const{getBlockRootClientId:n,getBlocksByClientId:r,canInsertBlockType:o,getSelectedBlockClientIds:i}=e(xr),{getGroupingBlockName:l}=e(a.store),s=i(),c=l(),u=o(c,null!=s&&s.length?n(s[0]):void 0),p=r(s),d=1===p.length&&(null===(t=p[0])||void 0===t?void 0:t.name)===c;return{clientIds:s,isGroupable:u&&p.length,isUngroupable:d&&!!p[0].innerBlocks.length,blocksSelection:p,groupingBlockName:c}}),[]);return{clientIds:e,isGroupable:t,isUngroupable:n,blocksSelection:r,groupingBlockName:o}}function Bg(e){let{clientIds:t,isGroupable:n,isUngroupable:r,blocksSelection:o,groupingBlockName:i,onClose:l=(()=>{})}=e;const{replaceBlocks:s}=(0,m.useDispatch)(xr);return n||r?(0,u.createElement)(u.Fragment,null,n&&(0,u.createElement)(g.MenuItem,{onClick:()=>{(()=>{const e=(0,a.switchToBlockType)(o,i);e&&s(t,e)})(),l()}},(0,_._x)("Group","verb")),r&&(0,u.createElement)(g.MenuItem,{onClick:()=>{(()=>{const e=o[0].innerBlocks;e.length&&s(t,e)})(),l()}},(0,_._x)("Ungroup","Ungrouping blocks from within a Group block back into individual blocks within the Editor "))):null}function Pg(e){return(0,m.useSelect)((t=>{const{canEditBlock:n,canMoveBlock:r,canRemoveBlock:o,canLockBlockType:i,getBlockName:l,getBlockRootClientId:a,getTemplateLock:s}=t(xr),c=a(e),u=n(e),p=r(e,c),d=o(e,c);return{canEdit:u,canMove:p,canRemove:d,canLock:i(l(e)),isContentLocked:"contentOnly"===s(e),isLocked:!u||!p||!d}}),[e])}var Tg=(0,u.createElement)(V.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,u.createElement)(V.Path,{d:"M17 10h-1.2V7c0-2.1-1.7-3.8-3.8-3.8-2.1 0-3.8 1.7-3.8 3.8h1.5c0-1.2 1-2.2 2.2-2.2s2.2 1 2.2 2.2v3H7c-.6 0-1 .4-1 1v8c0 .6.4 1 1 1h10c.6 0 1-.4 1-1v-8c0-.6-.4-1-1-1z"}));var Og=(0,u.createElement)(V.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,u.createElement)(V.Path,{d:"M17 10h-1.2V7c0-2.1-1.7-3.8-3.8-3.8-2.1 0-3.8 1.7-3.8 3.8v3H7c-.6 0-1 .4-1 1v8c0 .6.4 1 1 1h10c.6 0 1-.4 1-1v-8c0-.6-.4-1-1-1zM9.8 7c0-1.2 1-2.2 2.2-2.2 1.2 0 2.2 1 2.2 2.2v3H9.8V7zm6.7 11.5h-9v-7h9v7z"}));var Ng=(0,u.createElement)(V.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,u.createElement)(V.Path,{d:"M17 10h-1.2V7c0-2.1-1.7-3.8-3.8-3.8-2.1 0-3.8 1.7-3.8 3.8v3H7c-.6 0-1 .4-1 1v8c0 .6.4 1 1 1h10c.6 0 1-.4 1-1v-8c0-.6-.4-1-1-1zm-2.8 0H9.8V7c0-1.2 1-2.2 2.2-2.2s2.2 1 2.2 2.2v3z"}));const Mg=["core/block","core/navigation"];function Rg(e){return e.remove&&e.move?"all":!(!e.remove||e.move)&&"insert"}function Fg(e){let{clientId:t,onClose:n}=e;const[r,o]=(0,u.useState)({move:!1,remove:!1}),{canEdit:i,canMove:l,canRemove:s}=Pg(t),{allowsEditLocking:c,templateLock:p,hasTemplateLock:d}=(0,m.useSelect)((e=>{var n,r;const{getBlockName:o,getBlockAttributes:i}=e(xr),l=o(t),s=(0,a.getBlockType)(l);return{allowsEditLocking:Mg.includes(l),templateLock:null===(n=i(t))||void 0===n?void 0:n.templateLock,hasTemplateLock:!(null==s||null===(r=s.attributes)||void 0===r||!r.templateLock)}}),[t]),[y,h]=(0,u.useState)(!!p),{updateBlockAttributes:v}=(0,m.useDispatch)(xr),b=sy(t),k=(0,f.useInstanceId)(Fg,"block-editor-block-lock-modal__options-title");(0,u.useEffect)((()=>{o({move:!l,remove:!s,...c?{edit:!i}:{}})}),[i,l,s,c]);const E=Object.values(r).every(Boolean),S=Object.values(r).some(Boolean)&&!E;return(0,u.createElement)(g.Modal,{title:(0,_.sprintf)((0,_.__)("Lock %s"),b.title),overlayClassName:"block-editor-block-lock-modal",onRequestClose:n},(0,u.createElement)("p",null,(0,_.__)("Choose specific attributes to restrict or lock all available options.")),(0,u.createElement)("form",{onSubmit:e=>{e.preventDefault(),v([t],{lock:r,templateLock:y?Rg(r):void 0}),n()}},(0,u.createElement)("div",{role:"group","aria-labelledby":k,className:"block-editor-block-lock-modal__options"},(0,u.createElement)(g.CheckboxControl,{__nextHasNoMarginBottom:!0,className:"block-editor-block-lock-modal__options-title",label:(0,u.createElement)("span",{id:k},(0,_.__)("Lock all")),checked:E,indeterminate:S,onChange:e=>o({move:e,remove:e,...c?{edit:e}:{}})}),(0,u.createElement)("ul",{className:"block-editor-block-lock-modal__checklist"},c&&(0,u.createElement)("li",{className:"block-editor-block-lock-modal__checklist-item"},(0,u.createElement)(g.CheckboxControl,{__nextHasNoMarginBottom:!0,label:(0,_.__)("Restrict editing"),checked:!!r.edit,onChange:e=>o((t=>({...t,edit:e})))}),(0,u.createElement)(g.Icon,{className:"block-editor-block-lock-modal__lock-icon",icon:r.edit?Ng:Tg})),(0,u.createElement)("li",{className:"block-editor-block-lock-modal__checklist-item"},(0,u.createElement)(g.CheckboxControl,{__nextHasNoMarginBottom:!0,label:(0,_.__)("Disable movement"),checked:r.move,onChange:e=>o((t=>({...t,move:e})))}),(0,u.createElement)(g.Icon,{className:"block-editor-block-lock-modal__lock-icon",icon:r.move?Ng:Tg})),(0,u.createElement)("li",{className:"block-editor-block-lock-modal__checklist-item"},(0,u.createElement)(g.CheckboxControl,{__nextHasNoMarginBottom:!0,label:(0,_.__)("Prevent removal"),checked:r.remove,onChange:e=>o((t=>({...t,remove:e})))}),(0,u.createElement)(g.Icon,{className:"block-editor-block-lock-modal__lock-icon",icon:r.remove?Ng:Tg}))),d&&(0,u.createElement)(g.ToggleControl,{className:"block-editor-block-lock-modal__template-lock",label:(0,_.__)("Apply to all blocks inside"),checked:y,disabled:r.move&&!r.remove,onChange:()=>h(!y)})),(0,u.createElement)(g.Flex,{className:"block-editor-block-lock-modal__actions",justify:"flex-end",expanded:!1},(0,u.createElement)(g.FlexItem,null,(0,u.createElement)(g.Button,{variant:"tertiary",onClick:n},(0,_.__)("Cancel"))),(0,u.createElement)(g.FlexItem,null,(0,u.createElement)(g.Button,{variant:"primary",type:"submit"},(0,_.__)("Apply"))))))}function Lg(e){let{clientId:t}=e;const{canLock:n,isLocked:r}=Pg(t),[o,i]=(0,u.useReducer)((e=>!e),!1);if(!n)return null;const l=r?(0,_.__)("Unlock"):(0,_.__)("Lock");return(0,u.createElement)(u.Fragment,null,(0,u.createElement)(g.MenuItem,{icon:r?Tg:Og,onClick:i},l),o&&(0,u.createElement)(Fg,{clientId:t,onClose:i}))}const{Fill:Dg,Slot:Ug}=(0,g.createSlotFill)("BlockSettingsMenuControls");function jg(e){let{...t}=e;return(0,u.createElement)(g.__experimentalStyleProvider,{document:document},(0,u.createElement)(Dg,t))}jg.Slot=e=>{let{fillProps:t,clientIds:n=null,__unstableDisplayLocation:r}=e;const{selectedBlocks:o,selectedClientIds:i,canRemove:l}=(0,m.useSelect)((e=>{const{getBlockNamesByClientId:t,getSelectedBlockClientIds:r,canRemoveBlocks:o}=e(xr),i=null!==n?n:r();return{selectedBlocks:t(i),selectedClientIds:i,canRemove:o(i)}}),[n]),{canLock:a}=Pg(i[0]),s=1===i.length&&a,p=xg(),{isGroupable:d,isUngroupable:f}=p,y=(d||f)&&l;return(0,u.createElement)(Ug,{fillProps:{...t,__unstableDisplayLocation:r,selectedBlocks:o,selectedClientIds:i}},(e=>!(null!=e&&e.length)>0&&!y&&!s?null:(0,u.createElement)(g.MenuGroup,null,s&&(0,u.createElement)(Lg,{clientId:i[0]}),e,y&&(0,u.createElement)(Bg,c({},p,{onClose:null==t?void 0:t.onClose})))))};var zg=jg;const Vg=()=>{},Gg={className:"block-editor-block-settings-menu__popover",position:"bottom right",variant:"toolbar"};function Hg(e){let{blocks:t,onCopy:n,label:r}=e;const o=(0,f.useCopyToClipboard)((()=>(0,a.serialize)(t)),n),i=t.length>1?(0,_.__)("Copy blocks"):(0,_.__)("Copy block"),l=r||i;return(0,u.createElement)(g.MenuItem,{ref:o},l)}var Wg=function(e){let{clientIds:t,__experimentalSelectBlock:n,children:r,__unstableDisplayLocation:o,...i}=e;const l=Array.isArray(t)?t:[t],s=l.length,p=l[0],{firstParentClientId:d,isDistractionFree:y,onlyBlock:h,parentBlockType:v,previousBlockClientId:b,nextBlockClientId:k,selectedBlockClientIds:E}=(0,m.useSelect)((e=>{const{getBlockCount:t,getBlockName:n,getBlockRootClientId:r,getPreviousBlockClientId:o,getNextBlockClientId:i,getSelectedBlockClientIds:l,getSettings:s,getBlockAttributes:c}=e(xr),{getActiveBlockVariation:u}=e(a.store),d=r(p),f=d&&n(d);return{firstParentClientId:d,isDistractionFree:s().isDistractionFree,onlyBlock:1===t(d),parentBlockType:d&&(u(f,c(d))||(0,a.getBlockType)(f)),previousBlockClientId:o(p),nextBlockClientId:i(p),selectedBlockClientIds:l()}}),[p]),S=(0,m.useSelect)((e=>{const{getShortcutRepresentation:t}=e(Pp.store);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")}}),[]),{selectBlock:w,toggleBlockHighlight:C}=(0,m.useDispatch)(xr),I=(0,u.useCallback)(n?async e=>{const t=await e;t&&t[0]&&n(t[0])}:Vg,[n]),A=cy({clientId:p,maximumLength:25}),x=(0,u.useCallback)(n?()=>{const e=b||k||d;e&&E.includes(p)&&!E.includes(e)&&n(e)}:Vg,[n,b,k,d,E]),B=(0,_.sprintf)((0,_.__)("Remove %s"),A),P=1===s?B:(0,_.__)("Remove blocks"),T=(0,u.useRef)(),{gestures:O}=Ty({ref:T,onChange(e){e&&y||C(d,e)}}),N=null==E?void 0:E.includes(d);return(0,u.createElement)(kg,{clientIds:t,__experimentalUpdateSelection:!n},(e=>{let{canDuplicate:n,canInsertDefaultBlock:l,canMove:a,canRemove:m,onDuplicate:y,onInsertAfter:b,onInsertBefore:k,onRemove:E,onCopy:C,onPasteStyles:A,onMoveTo:B,blocks:M}=e;return(0,u.createElement)(g.DropdownMenu,c({icon:dm,label:(0,_.__)("Options"),className:"block-editor-block-settings-menu",popoverProps:Gg,noIcons:!0},i),(e=>{let{onClose:i}=e;return(0,u.createElement)(u.Fragment,null,(0,u.createElement)(g.MenuGroup,null,(0,u.createElement)(Ag.Slot,{fillProps:{onClose:i}}),!N&&!!d&&(0,u.createElement)(g.MenuItem,c({},O,{ref:T,icon:(0,u.createElement)(hp,{icon:v.icon}),onClick:()=>w(d)}),(0,_.sprintf)((0,_.__)("Select parent block (%s)"),v.title)),1===s&&(0,u.createElement)(wg,{clientId:p}),(0,u.createElement)(Hg,{blocks:M,onCopy:C}),n&&(0,u.createElement)(g.MenuItem,{onClick:(0,f.pipe)(i,y,I),shortcut:S.duplicate},(0,_.__)("Duplicate")),l&&(0,u.createElement)(u.Fragment,null,(0,u.createElement)(g.MenuItem,{onClick:(0,f.pipe)(i,k),shortcut:S.insertBefore},(0,_.__)("Insert before")),(0,u.createElement)(g.MenuItem,{onClick:(0,f.pipe)(i,b),shortcut:S.insertAfter},(0,_.__)("Insert after"))),a&&!h&&(0,u.createElement)(g.MenuItem,{onClick:(0,f.pipe)(i,B)},(0,_.__)("Move to")),1===s&&(0,u.createElement)(Sg,{clientId:p,onToggle:i})),(0,u.createElement)(g.MenuGroup,null,(0,u.createElement)(Hg,{blocks:M,onCopy:C,label:(0,_.__)("Copy styles")}),(0,u.createElement)(g.MenuItem,{onClick:A},(0,_.__)("Paste styles"))),(0,u.createElement)(zg.Slot,{fillProps:{onClose:i},clientIds:t,__unstableDisplayLocation:o}),"function"==typeof r?r({onClose:i}):u.Children.map((e=>(0,u.cloneElement)(e,{onClose:i}))),m&&(0,u.createElement)(g.MenuGroup,null,(0,u.createElement)(g.MenuItem,{onClick:(0,f.pipe)(i,E,x),shortcut:S.remove},P)))}))}))};var $g=function(e){let{clientIds:t,...n}=e;return(0,u.createElement)(g.ToolbarGroup,null,(0,u.createElement)(g.ToolbarItem,null,(e=>(0,u.createElement)(Wg,c({clientIds:t,toggleProps:e},n)))))};function Kg(e){let{clientId:t}=e;const n=sy(t),{canEdit:r,canMove:o,canRemove:i,canLock:l}=Pg(t),[a,s]=(0,u.useReducer)((e=>!e),!1);return l?r&&o&&i?null:(0,u.createElement)(u.Fragment,null,(0,u.createElement)(g.ToolbarGroup,{className:"block-editor-block-lock-toolbar"},(0,u.createElement)(g.ToolbarButton,{icon:Ng,label:(0,_.sprintf)((0,_.__)("Unlock %s"),n.title),onClick:s})),a&&(0,u.createElement)(Fg,{clientId:t,onClose:s})):null}var qg=(0,u.createElement)(V.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,u.createElement)(V.Path,{d:"M18 4h-7c-1.1 0-2 .9-2 2v3H6c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2h7c1.1 0 2-.9 2-2v-3h3c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-4.5 14c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5v-7c0-.3.2-.5.5-.5h3V13c0 1.1.9 2 2 2h2.5v3zm0-4.5H11c-.3 0-.5-.2-.5-.5v-2.5H13c.3 0 .5.2.5.5v2.5zm5-.5c0 .3-.2.5-.5.5h-3V11c0-1.1-.9-2-2-2h-2.5V6c0-.3.2-.5.5-.5h7c.3 0 .5.2.5.5v7z"}));var Jg=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M9.2 6.5H4V8h5.2c.3 0 .5.2.5.5v7c0 .3-.2.5-.5.5H4v1.5h5.2c1.1 0 2-.9 2-2v-7c0-1.1-.8-2-2-2zM14.8 8H20V6.5h-5.2c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2H20V16h-5.2c-.3 0-.5-.2-.5-.5v-7c-.1-.3.2-.5.5-.5z"}));var Yg=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M16 4v5.2c0 .3-.2.5-.5.5h-7c-.3.1-.5-.2-.5-.5V4H6.5v5.2c0 1.1.9 2 2 2h7c1.1 0 2-.9 2-2V4H16zm-.5 8.8h-7c-1.1 0-2 .9-2 2V20H8v-5.2c0-.3.2-.5.5-.5h7c.3 0 .5.2.5.5V20h1.5v-5.2c0-1.2-.9-2-2-2z"}));const Qg={group:{type:"constrained"},row:{type:"flex",flexWrap:"nowrap"},stack:{type:"flex",orientation:"vertical"}};var Zg=function(){const{blocksSelection:e,clientIds:t,groupingBlockName:n,isGroupable:r}=xg(),{replaceBlocks:o}=(0,m.useDispatch)(xr),{canRemove:i,variations:l}=(0,m.useSelect)((e=>{const{canRemoveBlocks:r}=e(xr),{getBlockVariations:o}=e(a.store);return{canRemove:r(t),variations:o(n,"transform")}}),[t,n]),s=r=>{const i=(0,a.switchToBlockType)(e,n);"string"!=typeof r&&(r="group"),i&&i.length>0&&(i[0].attributes.layout=Qg[r],o(t,i))};if(!r||!i)return null;const c=!!l.find((e=>{let{name:t}=e;return"group-row"===t})),p=!!l.find((e=>{let{name:t}=e;return"group-stack"===t}));return(0,u.createElement)(g.ToolbarGroup,null,(0,u.createElement)(g.ToolbarButton,{icon:qg,label:(0,_._x)("Group","verb"),onClick:s}),c&&(0,u.createElement)(g.ToolbarButton,{icon:Jg,label:(0,_._x)("Row","single horizontal line"),onClick:()=>s("row")}),p&&(0,u.createElement)(g.ToolbarButton,{icon:Yg,label:(0,_._x)("Stack","verb"),onClick:()=>s("stack")}))};function Xg(e){let{clientIds:t}=e;const n=1===t.length?t[0]:void 0,r=(0,m.useSelect)((e=>!!n&&"html"===e(xr).getBlockMode(n)),[n]),{toggleBlockMode:o}=(0,m.useDispatch)(xr);return r?(0,u.createElement)(g.ToolbarGroup,null,(0,u.createElement)(g.ToolbarButton,{onClick:()=>{o(n)}},(0,_.__)("Edit visually"))):null}var eh=(0,u.createContext)("");var th=e=>{let{hideDragHandle:t}=e;const{blockClientIds:n,blockClientId:r,blockType:o,hasFixedToolbar:i,isDistractionFree:l,isValid:s,isVisual:p,isContentLocked:y}=(0,m.useSelect)((e=>{const{getBlockName:t,getBlockMode:n,getSelectedBlockClientIds:r,isBlockValid:o,getBlockRootClientId:i,getSettings:l,__unstableGetContentLockingParent:s}=e(xr),c=r(),u=c[0],p=i(u),d=l();return{blockClientIds:c,blockClientId:u,blockType:u&&(0,a.getBlockType)(t(u)),hasFixedToolbar:d.hasFixedToolbar,isDistractionFree:d.isDistractionFree,rootClientId:p,isValid:c.every((e=>o(e))),isVisual:c.every((e=>"visual"===n(e))),isContentLocked:!!s(u)}}),[]),{toggleBlockHighlight:h}=(0,m.useDispatch)(xr),v=(0,u.useRef)(),{showMovers:b,gestures:_}=Ty({ref:v,onChange(e){e&&l||h(r,e)}}),k=(0,f.useViewportMatch)("medium","<")||i;if(o&&!(0,a.hasBlockSupport)(o,"__experimentalToolbar",!0))return null;const E=k||b;if(0===n.length)return null;const S=s&&p,w=n.length>1,C=(0,a.isReusableBlock)(o)||(0,a.isTemplatePart)(o),I=d()("block-editor-block-toolbar",{"is-showing-movers":E,"is-synced":C});return(0,u.createElement)("div",{className:I},!w&&!k&&!y&&(0,u.createElement)(Oy,null),(0,u.createElement)("div",c({ref:v},_),(S||w)&&!y&&(0,u.createElement)(g.ToolbarGroup,{className:"block-editor-block-toolbar__block-controls"},(0,u.createElement)(tg,{clientIds:n}),!w&&(0,u.createElement)(Kg,{clientId:n[0]}),(0,u.createElement)(ky,{clientIds:n,hideDragHandle:t}))),S&&w&&(0,u.createElement)(Zg,null),S&&(0,u.createElement)(u.Fragment,null,(0,u.createElement)(Ur.Slot,{group:"parent",className:"block-editor-block-toolbar__slot"}),(0,u.createElement)(Ur.Slot,{group:"block",className:"block-editor-block-toolbar__slot"}),(0,u.createElement)(Ur.Slot,{className:"block-editor-block-toolbar__slot"}),(0,u.createElement)(Ur.Slot,{group:"inline",className:"block-editor-block-toolbar__slot"}),(0,u.createElement)(Ur.Slot,{group:"other",className:"block-editor-block-toolbar__slot"}),(0,u.createElement)(eh.Provider,{value:null==o?void 0:o.name},(0,u.createElement)(og.Slot,null))),(0,u.createElement)(Xg,{clientIds:n}),!y&&(0,u.createElement)($g,{clientIds:n}))};var nh=function(e){let{focusOnMount:t,isFixed:n,...r}=e;const{blockType:o,hasParents:i,showParentSelector:l}=(0,m.useSelect)((e=>{const{getBlockName:t,getBlockParents:n,getSelectedBlockClientIds:r,__unstableGetContentLockingParent:o}=e(xr),{getBlockType:i}=e(a.store),l=r(),s=l[0],c=n(s),u=i(t(c[c.length-1]));return{blockType:s&&i(t(s)),hasParents:c.length,showParentSelector:u&&(0,a.hasBlockSupport)(u,"__experimentalParentSelector",!0)&&l.length<=1&&!o(s)}}),[]);if(o&&!(0,a.hasBlockSupport)(o,"__experimentalToolbar",!0))return null;const s=d()("block-editor-block-contextual-toolbar",{"has-parent":i&&l,"is-fixed":n});return(0,u.createElement)(Cy,c({focusOnMount:t,className:s,"aria-label":(0,_.__)("Block tools")},r),(0,u.createElement)(th,{hideDragHandle:n}))};const{CustomSelectControl:rh}=Ir(g.privateApis),oh="position",ih="block-editor-hooks__position-selection__select-control__option",lh={key:"default",value:"",name:(0,_.__)("Default"),className:ih},ah={key:"sticky",value:"sticky",name:(0,_._x)("Sticky","Name for the value of the CSS position property"),className:ih,__experimentalHint:(0,_.__)("The block will stick to the top of the window instead of scrolling.")},sh={key:"fixed",value:"fixed",name:(0,_._x)("Fixed","Name for the value of the CSS position property"),className:ih,__experimentalHint:(0,_.__)("The block will not move when the page is scrolled.")},ch=["top","right","bottom","left"],uh=["sticky","fixed"];function ph(e){return!!(0,a.getBlockSupport)(e,oh)}function dh(e){var t,n;const r=null===(t=e.style)||void 0===t||null===(n=t.position)||void 0===n?void 0:n.type;return"sticky"===r||"fixed"===r}function fh(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=yo("position.fixed"),n=yo("position.sticky"),r=!t&&!n;return!ph(e)||r}function mh(e){var t;const{attributes:{style:n={}},clientId:r,name:o,setAttributes:i}=e,l=function(e){const t=(0,a.getBlockSupport)(e,oh);return!!(!0===t||null!=t&&t.fixed)}(o),s=function(e){const t=(0,a.getBlockSupport)(e,oh);return!!(!0===t||null!=t&&t.sticky)}(o),c=null==n||null===(t=n.position)||void 0===t?void 0:t.type,{hasParents:p}=(0,m.useSelect)((e=>{const{getBlockParents:t}=e(xr);return{hasParents:t(r).length}}),[r]),d=(0,u.useMemo)((()=>{const e=[lh];return(s&&!p||c===ah.value)&&e.push(ah),(l||c===sh.value)&&e.push(sh),e}),[l,s,p,c]),f=c&&d.find((e=>e.value===c))||lh;return u.Platform.select({web:d.length>1?(0,u.createElement)(Wo,{group:"position"},(0,u.createElement)(g.BaseControl,{className:"block-editor-hooks__position-selection"},(0,u.createElement)(rh,{__nextUnconstrainedWidth:!0,__next36pxDefaultSize:!0,className:"block-editor-hooks__position-selection__select-control",label:(0,_.__)("Position"),hideLabelFromVision:!0,describedBy:(0,_.sprintf)((0,_.__)("Currently selected position: %s"),f.name),options:d,value:f,__experimentalShowSelectedHint:!0,onChange:e=>{let{selectedItem:t}=e;(e=>{const t={...n,position:{...null==n?void 0:n.position,type:e,top:"sticky"===e||"fixed"===e?"0px":void 0}};i({style:Ro(t)})})(t.value)},size:"__unstable-large"}))):null,native:null})}const yh=(0,f.createHigherOrderComponent)((e=>t=>{const{name:n}=t;return[(0,a.hasBlockSupport)(n,oh)&&!fh(t)&&(0,u.createElement)(mh,c({key:"position"},t)),(0,u.createElement)(e,c({key:"edit"},t))]}),"withInspectorControls"),gh=(0,f.createHigherOrderComponent)((e=>t=>{var n,r,o,i;const{name:l,attributes:s}=t,p=(0,a.hasBlockSupport)(l,oh)&&!fh(t),m=(0,f.useInstanceId)(e),y=(0,u.useContext)(Jh.__unstableElementContext);let g;p&&(g=function(e){let{selector:t,style:n}=e,r="";const{type:o}=(null==n?void 0:n.position)||{};return uh.includes(o)?(r+=`${t} {`,r+=`position: ${o};`,ch.forEach((e=>{var t;void 0!==(null==n||null===(t=n.position)||void 0===t?void 0:t[e])&&(r+=`${e}: ${n.position[e]};`)})),"sticky"!==o&&"fixed"!==o||(r+="z-index: 10"),r+="}",r):r}({selector:`.wp-container-${m}.wp-container-${m}`,style:null==s?void 0:s.style})||"");const h=d()(null==t?void 0:t.className,{[`wp-container-${m}`]:p&&!!g,[`is-position-${null==s||null===(n=s.style)||void 0===n||null===(r=n.position)||void 0===r?void 0:r.type}`]:p&&!!g&&!(null==s||null===(o=s.style)||void 0===o||null===(i=o.position)||void 0===i||!i.type)});return(0,u.createElement)(u.Fragment,null,p&&y&&!!g&&(0,u.createPortal)((0,u.createElement)("style",null,g),y),(0,u.createElement)(e,c({},t,{className:h})))}));(0,s.addFilter)("editor.BlockListBlock","core/editor/position/with-position-styles",gh),(0,s.addFilter)("editor.BlockEdit","core/editor/position/with-inspector-controls",yh);const hh={placement:"top-start"},vh={...hh,flip:!1,shift:!0},bh={...hh,flip:!0,shift:!1};function _h(e,t,n,r,o){if(!e||!t)return vh;const i=(null==n?void 0:n.scrollTop)||0,l=t.getBoundingClientRect(),a=i+e.getBoundingClientRect().top,s=e.ownerDocument.documentElement.clientHeight,c=a+r,u=l.top>c,p=l.height>s-r;return o||!u&&!p?bh:vh}function kh(e){const{__unstableGetEditorMode:t,isMultiSelecting:n,hasMultiSelection:r,isTyping:o,isBlockInterfaceHidden:i,getSettings:l,getLastMultiSelectedBlockClientId:a}=Ir(e(xr));return{editorMode:t(),hasMultiSelection:r(),isMultiSelecting:n(),isTyping:o(),isBlockInterfaceHidden:i(),hasFixedToolbar:l().hasFixedToolbar,isDistractionFree:l().isDistractionFree,lastClientId:r()?a():null}}function Eh(e){let{clientId:t,rootClientId:n,isEmptyDefaultBlock:r,showContents:o,capturingClientId:i,__unstablePopoverSlot:l,__unstableContentRef:a}=e;const{editorMode:s,hasMultiSelection:p,isMultiSelecting:y,isTyping:g,isBlockInterfaceHidden:h,hasFixedToolbar:v,isDistractionFree:b,lastClientId:_}=(0,m.useSelect)(kh,[]),k=(0,m.useSelect)((e=>{const{isBlockInsertionPointVisible:n,getBlockInsertionPoint:r,getBlockOrder:o}=e(xr);if(!n())return!1;const i=r();return o(i.rootClientId)[i.index]===t}),[t]),E=(0,f.useViewportMatch)("medium"),S=(0,u.useRef)(!1),{stopTyping:w}=(0,m.useDispatch)(xr),C=!g&&"edit"===s&&r,I=!p&&("navigation"===s||"zoom-out"===s),A="edit"===s&&!v&&E&&!y&&!C&&!g&&!h,x=!("edit"!==s||A||v||b||r);(0,Pp.useShortcut)("core/block-editor/focus-toolbar",(()=>{S.current=!0,w(!0)}),{isDisabled:!x}),(0,u.useEffect)((()=>{S.current=!1}));const B=(0,u.useRef)(),P=function(e){let{contentElement:t,clientId:n}=e;const r=eo(n),[o,i]=(0,u.useState)(0),{blockIndex:l,isSticky:a}=(0,m.useSelect)((e=>{const{getBlockIndex:t,getBlockAttributes:r}=e(xr);return{blockIndex:t(n),isSticky:dh(r(n))}}),[n]),s=(0,u.useMemo)((()=>{if(t)return(0,Ml.getScrollContainer)(t)}),[t]),[c,p]=(0,u.useState)((()=>_h(t,r,s,o,a))),d=(0,f.useRefEffect)((e=>{i(e.offsetHeight)}),[]),y=(0,u.useCallback)((()=>p(_h(t,r,s,o,a))),[t,r,s,o]);return(0,u.useLayoutEffect)(y,[l,y]),(0,u.useLayoutEffect)((()=>{var e,n,o;if(!t||!r)return;const i=null==t||null===(e=t.ownerDocument)||void 0===e?void 0:e.defaultView;let l;null==i||null===(n=i.addEventHandler)||void 0===n||n.call(i,"resize",y);const a=null==r||null===(o=r.ownerDocument)||void 0===o?void 0:o.defaultView;return a.ResizeObserver&&(l=new a.ResizeObserver(y),l.observe(r)),()=>{var e;null==i||null===(e=i.removeEventHandler)||void 0===e||e.call(i,"resize",y),l&&l.disconnect()}}),[y,t,r]),{...c,ref:d}}({contentElement:null==a?void 0:a.current,clientId:t});return C?(0,u.createElement)(Yo,c({clientId:i||t,__unstableCoverTarget:!0,bottomClientId:_,className:d()("block-editor-block-list__block-side-inserter-popover",{"is-insertion-point-visible":k}),__unstablePopoverSlot:l,__unstableContentRef:a,resize:!1,shift:!1},P),(0,u.createElement)("div",{className:"block-editor-block-list__empty-block-inserter"},(0,u.createElement)(Wm,{position:"bottom right",rootClientId:n,clientId:t,__experimentalIsQuick:!0}))):I||A?(0,u.createElement)(Yo,c({clientId:i||t,bottomClientId:_,className:d()("block-editor-block-list__block-popover",{"is-insertion-point-visible":k}),__unstablePopoverSlot:l,__unstableContentRef:a,resize:!1},P),A&&o&&(0,u.createElement)(nh,{focusOnMount:S.current,__experimentalInitialIndex:B.current,__experimentalOnIndexChange:e=>{B.current=e},key:t}),I&&(0,u.createElement)(Ey,{clientId:t,rootClientId:n})):null}function Sh(e){const{getSelectedBlockClientId:t,getFirstMultiSelectedBlockClientId:n,getBlockRootClientId:r,getBlock:o,getBlockParents:i,getSettings:l,isNavigationMode:s,__experimentalGetBlockListSettingsForBlocks:c}=e(xr),u=t()||n();if(!u)return;const{name:p,attributes:d={}}=o(u)||{},f=i(u),m=c(f),y=f.find((e=>{var t;return null===(t=m[e])||void 0===t?void 0:t.__experimentalCaptureToolbars})),g=l();return{clientId:u,rootClientId:r(u),name:p,isDistractionFree:g.isDistractionFree,isNavigationMode:s(),isEmptyDefaultBlock:p&&(0,a.isUnmodifiedDefaultBlock)({name:p,attributes:d}),capturingClientId:y}}function wh(e){let{__unstablePopoverSlot:t,__unstableContentRef:n}=e;const r=(0,m.useSelect)(Sh,[]);if(!r)return null;const{clientId:o,rootClientId:i,name:l,isEmptyDefaultBlock:a,capturingClientId:s,isDistractionFree:c,isNavigationMode:p}=r;return l?(0,u.createElement)(Eh,{clientId:o,rootClientId:i,isEmptyDefaultBlock:a,showContents:!c||p,capturingClientId:s,__unstablePopoverSlot:t,__unstableContentRef:n}):null}function Ch(e){let{children:t}=e;const n=(0,u.useContext)(ny),r=(0,u.useContext)(g.Disabled.Context);return n||r?t:($()('wp.components.Popover.Slot name="block-toolbar"',{alternative:"wp.blockEditor.BlockTools",since:"5.8",version:"6.3"}),(0,u.createElement)(oy,{__unstablePopoverSlot:"block-toolbar"},(0,u.createElement)(wh,{__unstablePopoverSlot:"block-toolbar"}),t))}var Ih=(0,f.createHigherOrderComponent)((e=>t=>{const{clientId:n}=Nr();return(0,u.createElement)(e,c({},t,{clientId:n}))}),"withClientId");var Ah=Ih((e=>{let{clientId:t,showSeparator:n,isFloating:r,onAddBlock:o,isToggle:i}=e;return(0,u.createElement)(Jm,{className:d()({"block-list-appender__toggle":i}),rootClientId:t,showSeparator:n,isFloating:r,onAddBlock:o})}));var xh=(0,f.compose)([Ih,(0,m.withSelect)(((e,t)=>{let{clientId:n}=t;const{getBlockOrder:r}=e(xr),o=r(n);return{lastBlockClientId:o[o.length-1]}}))])((e=>{let{clientId:t}=e;return(0,u.createElement)($m,{rootClientId:t})}));const Bh=new WeakMap;function Ph(e,t,n,r,o,i,l){return s=>{const{srcRootClientId:c,srcClientIds:u,type:p,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}(s);if("inserter"===p){l();const e=d.map((e=>(0,a.cloneBlock)(e)));i(e,!0,null)}if("block"===p){const i=n(u[0]);if(c===e&&i===t)return;if(u.includes(e)||r(u).some((t=>t===e)))return;const l=c===e,a=u.length;o(u,c,l&&i<t?t-a:t)}}}function Th(e,t,n,r,o,i){return t=>{if(!n)return;const l=(0,a.findTransform)((0,a.getBlockTransforms)("from"),(n=>"files"===n.type&&o(n.blockName,e)&&n.isMatch(t)));if(l){const e=l.transform(t,r);i(e)}}}function Oh(e,t,n){return e=>{const t=(0,a.pasteHandler)({HTML:e,mode:"BLOCKS"});t.length&&n(t)}}function Nh(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{operation:r="insert"}=n,o=(0,m.useSelect)((e=>e(xr).getSettings().mediaUpload),[]),{canInsertBlockType:i,getBlockIndex:l,getClientIdsOfDescendants:a,getBlockOrder:s,getBlocksByClientId:c}=(0,m.useSelect)(xr),{insertBlocks:p,moveBlocksToPosition:d,updateBlockAttributes:f,clearSelectedBlock:y,replaceBlocks:g,removeBlocks:h}=(0,m.useDispatch)(xr),v=(0,m.useRegistry)(),b=(0,u.useCallback)((function(n){let o=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if("replace"===r){const r=s(e)[t];g(r,n,void 0,i)}else p(n,t,e,o,i)}),[r,s,p,g,t,e]),_=(0,u.useCallback)(((n,o,i)=>{if("replace"===r){const r=c(n),o=s(e)[t];v.batch((()=>{h(n,!1),g(o,r,void 0,0)}))}else d(n,o,e,i)}),[r,s,c,p,d,h,t,e]),k=Ph(e,t,l,a,_,b,y),E=Th(e,0,o,f,i,b),S=Oh(0,0,b);return e=>{const t=(0,Ml.getFilesFromDataTransfer)(e.dataTransfer),n=e.dataTransfer.getData("text/html");n?S(n):t.length?E(t):k(e)}}function Mh(e,t,n){const r="top"===n||"bottom"===n,{x:o,y:i}=e,l=r?o:i,a=r?i:o,s=r?t.left:t.top,c=r?t.right:t.bottom,u=t[n];let p;return p=l>=s&&l<=c?l:l<c?s:c,Math.sqrt((l-p)**2+(a-u)**2)}function Rh(e,t){let n,r,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:["top","bottom","left","right"];return o.forEach((o=>{const i=Mh(e,t,o);(void 0===n||i<n)&&(n=i,r=o)})),[n,r]}function Fh(e,t){return t.left<=e.x&&t.right>=e.x&&t.top<=e.y&&t.bottom>=e.y}function Lh(e,t){var n,r;let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"vertical";const i="horizontal"===o?["left","right"]:["top","bottom"],l=(0,_.isRTL)();let a=0,s="before",c=1/0;e.forEach((e=>{let{isUnmodifiedDefaultBlock:n,getBoundingClientRect:r,blockIndex:o}=e;const u=r();let[p,d]=Rh(t,u,i);n&&Fh(t,u)&&(p=0),p<c&&(s="bottom"===d||!l&&"right"===d||l&&"left"===d?"after":"before",c=p,a=o)}));const u=a+("after"===s?1:-1),p=!(null===(n=e[a])||void 0===n||!n.isUnmodifiedDefaultBlock),d=!(null===(r=e[u])||void 0===r||!r.isUnmodifiedDefaultBlock);if(!p&&!d){return["after"===s?a+1:a,"insert"]}return[p?a:u,"replace"]}function Dh(){let{rootClientId:e=""}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const[t,n]=(0,u.useState)({index:null,operation:"insert"}),r=(0,m.useSelect)((t=>{const{getTemplateLock:n,__unstableIsWithinBlockOverlay:r,__unstableHasActiveBlockOverlayActive:o}=t(xr),i=n(e);return["all","contentOnly"].some((e=>e===i))||o(e)||r(e)}),[e]),{getBlockListSettings:o,getBlocks:i,getBlockIndex:l}=(0,m.useSelect)(xr),{showInsertionPoint:s,hideInsertionPoint:c}=(0,m.useDispatch)(xr),p=Nh(e,t.index,{operation:t.operation}),d=(0,f.useThrottle)((0,u.useCallback)(((t,r)=>{var c;const u=i(e);if(0===u.length)return void n({index:0,operation:"insert"});const p=u.map((e=>{const t=e.clientId;return{isUnmodifiedDefaultBlock:(0,a.isUnmodifiedDefaultBlock)(e),getBoundingClientRect:()=>r.getElementById(`block-${t}`).getBoundingClientRect(),blockIndex:l(t)}})),[d,f]=Lh(p,{x:t.clientX,y:t.clientY},null===(c=o(e))||void 0===c?void 0:c.orientation);n({index:d,operation:f}),s(e,d,{operation:f})}),[e]),200);return(0,f.__experimentalUseDropZone)({isDisabled:r,onDrop:p,onDragOver(e){d(e,e.currentTarget.ownerDocument)},onDragLeave(){d.cancel(),c()},onDragEnd(){d.cancel(),c()}})}const Uh={};function jh(e){const{clientId:t,allowedBlocks:n,__experimentalDefaultBlock:r,__experimentalDirectInsert:o,template:i,templateLock:l,wrapperRef:s,templateInsertUpdatesSelection:c,__experimentalCaptureToolbars:p,__experimentalAppenderTagName:d,renderAppender:f,orientation:y,placeholder:g,layout:h}=e;!function(e,t,n,r,o,i,l,a){const{updateBlockListSettings:s}=(0,m.useDispatch)(xr),c=(0,m.useRegistry)(),{blockListSettings:p,parentLock:d}=(0,m.useSelect)((t=>{const n=t(xr).getBlockRootClientId(e);return{blockListSettings:t(xr).getBlockListSettings(e),parentLock:t(xr).getTemplateLock(n)}}),[e]),f=(0,u.useMemo)((()=>t),t);(0,u.useLayoutEffect)((()=>{const t={allowedBlocks:f,templateLock:void 0===o||"contentOnly"===d?d:o};if(void 0!==i&&(t.__experimentalCaptureToolbars=i),void 0!==l)t.orientation=l;else{const e=il(null==a?void 0:a.type);t.orientation=e.getOrientation(a)}void 0!==n&&(t.__experimentalDefaultBlock=n),void 0!==r&&(t.__experimentalDirectInsert=r),Ko()(p,t)||(Bh.get(c)||Bh.set(c,[]),Bh.get(c).push([e,t]),window.queueMicrotask((()=>{var e;null!==(e=Bh.get(c))&&void 0!==e&&e.length&&c.batch((()=>{Bh.get(c).forEach((e=>{s(...e)})),Bh.set(c,[])}))})))}),[e,p,f,n,r,o,d,i,l,s,a,c])}(t,n,r,o,l,p,y,h),function(e,t,n,r){const{getBlocks:o,getSelectedBlocksInitialCaretPosition:i,isBlockSelected:l}=(0,m.useSelect)(xr),{replaceInnerBlocks:s,__unstableMarkNextChangeAsNotPersistent:c}=(0,m.useDispatch)(xr),{innerBlocks:p}=(0,m.useSelect)((t=>({innerBlocks:t(xr).getBlocks(e)})),[e]),d=(0,u.useRef)(null);(0,u.useLayoutEffect)((()=>{let u=!1;return window.queueMicrotask((()=>{if(u)return;const p=o(e),f=0===p.length||"all"===n||"contentOnly"===n,m=!b()(t,d.current);if(!f||!m)return;d.current=t;const y=(0,a.synchronizeBlocksWithTemplate)(p,t);b()(y,p)||(c(),s(e,y,0===p.length&&r&&0!==y.length&&l(e),i()))})),()=>{u=!0}}),[p,t,n,e])}(t,i,l,c);const v=function(e){return(0,m.useSelect)((t=>{const n=t(xr).getBlock(e);if(!n)return;const r=t(a.store).getBlockType(n.name);return r&&0!==Object.keys(r.providesContext).length?Object.fromEntries(Object.entries(r.providesContext).map((e=>{let[t,r]=e;return[t,n.attributes[r]]}))):void 0}),[e])}(t),_=(0,m.useSelect)((e=>{var n;return null===(n=e(xr).getBlock(t))||void 0===n?void 0:n.name}),[t]),k=(0,a.getBlockSupport)(_,"__experimentalLayout")||Uh,{allowSizingOnChildren:E=!1}=k,S=yo("layout")||Uh,w=h||k,C=(0,u.useMemo)((()=>({...S,...w,...E&&{allowSizingOnChildren:!0}})),[S,w,E]);return(0,u.createElement)(Fl,{value:v},(0,u.createElement)(Qh,{rootClientId:t,renderAppender:f,__experimentalAppenderTagName:d,__experimentalLayout:C,wrapperRef:s,placeholder:g}))}function zh(e){return kp(e),(0,u.createElement)(jh,e)}const Vh=(0,u.forwardRef)(((e,t)=>{const n=Gh({ref:t},e);return(0,u.createElement)("div",{className:"block-editor-inner-blocks"},(0,u.createElement)("div",n))}));function Gh(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{__unstableDisableLayoutClassNames:n,__unstableDisableDropZone:r}=t,{clientId:o,layout:i=null,__unstableLayoutClassNames:l=""}=Nr(),s=(0,f.useViewportMatch)("medium","<"),{__experimentalCaptureToolbars:p,hasOverlay:y}=(0,m.useSelect)((e=>{if(!o)return{};const{getBlockName:t,isBlockSelected:n,hasSelectedInnerBlock:r,__unstableGetEditorMode:i}=e(xr),l=t(o),c="navigation"===i()||s;return{__experimentalCaptureToolbars:e(a.store).hasBlockSupport(l,"__experimentalExposeControlsToChildren",!1),hasOverlay:"core/template"!==l&&!n(o)&&!r(o,!0)&&c}}),[o,s]),g=Dh({rootClientId:o}),h=(0,f.useMergeRefs)([e.ref,r?null:g]),v={__experimentalCaptureToolbars:p,layout:i,...t},b=v.value&&v.onChange?zh:jh;return{...e,ref:h,className:d()(e.className,"block-editor-block-list__layout",n?"":l,{"has-overlay":y}),children:o?(0,u.createElement)(b,c({},v,{clientId:o})):(0,u.createElement)(Qh,t)}}Gh.save=a.__unstableGetInnerBlocksProps,Vh.DefaultBlockAppender=xh,Vh.ButtonBlockAppender=Ah,Vh.Content=()=>Gh.save().children;var Hh=Vh;const Wh=(0,u.createContext)(),$h=(0,u.createContext)(),Kh=new WeakMap;function qh(e){let{className:t,...n}=e;const[r,o]=(0,u.useState)(),i=(0,f.useViewportMatch)("medium"),{isOutlineMode:l,isFocusMode:a,editorMode:s}=(0,m.useSelect)((e=>{const{getSettings:t,__unstableGetEditorMode:n}=e(xr),{outlineMode:r,focusMode:o}=t();return{isOutlineMode:r,isFocusMode:o,editorMode:n()}}),[]),c=(0,m.useRegistry)(),{setBlockVisibility:p}=(0,m.useDispatch)(xr),y=(0,f.useDebounce)((0,u.useCallback)((()=>{const e={};Kh.get(c).forEach((t=>{let[n,r]=t;e[n]=r})),p(e)}),[c]),300,{trailing:!0}),g=(0,u.useMemo)((()=>{const{IntersectionObserver:e}=window;if(e)return new e((e=>{Kh.get(c)||Kh.set(c,[]);for(const t of e){const e=t.target.getAttribute("data-block");Kh.get(c).push([e,t.isIntersecting])}y()}))}),[]),h=Gh({ref:(0,f.useMergeRefs)([wp(),iy(),o]),className:d()("is-root-container",t,{"is-outline-mode":l,"is-focus-mode":a&&i,"is-navigate-mode":"navigation"===s})},n);return(0,u.createElement)(Wh.Provider,{value:r},(0,u.createElement)($h.Provider,{value:g},(0,u.createElement)("div",h)))}function Jh(e){return function(){const{patterns:e,isPreviewMode:t}=(0,m.useSelect)((e=>{const{__experimentalBlockPatterns:t,__unstableIsPreviewMode:n}=e(xr).getSettings();return{patterns:t,isPreviewMode:n}}),[]);(0,u.useEffect)((()=>{if(t)return;if(null==e||!e.length)return;let n,r=-1;const o=()=>{r++,r>=e.length||((0,m.select)(xr).__experimentalGetParsedPattern(e[r].name),n=ly(o))};return n=ly(o),()=>ay(n)}),[e,t])}(),(0,u.createElement)(Ch,null,(0,u.createElement)(Or,{value:Pr},(0,u.createElement)(qh,e)))}function Yh(e){let{placeholder:t,rootClientId:n,renderAppender:r,__experimentalAppenderTagName:o,__experimentalLayout:i=ll}=e;const{order:l,selectedBlocks:a,visibleBlocks:s}=(0,m.useSelect)((e=>{const{getBlockOrder:t,getSelectedBlockClientIds:r,__unstableGetVisibleBlocks:o}=e(xr);return{order:t(n),selectedBlocks:r(),visibleBlocks:o()}}),[n]);return(0,u.createElement)(sl,{value:i},l.map((e=>(0,u.createElement)(m.AsyncModeProvider,{key:e,value:!s.has(e)&&!a.includes(e)},(0,u.createElement)(cp,{rootClientId:n,clientId:e})))),l.length<1&&t,(0,u.createElement)(Qm,{tagName:o,rootClientId:n,renderAppender:r}))}function Qh(e){return(0,u.createElement)(m.AsyncModeProvider,{value:!1},(0,u.createElement)(Yh,e))}function Zh(e){return[...e].sort(((t,n)=>e.filter((e=>e===n)).length-e.filter((e=>e===t)).length)).shift()}function Xh(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{flat:t,...n}=e;return t||Zh(Object.values(n).filter(Boolean))||"px"}function ev(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if("string"==typeof e)return e;const t=Object.values(e).map((e=>(0,g.__experimentalParseQuantityAndUnitFromRawValue)(e))),n=t.map((e=>{var t;return null!==(t=e[0])&&void 0!==t?t:""})),r=t.map((e=>e[1])),o=n.every((e=>e===n[0]))?n[0]:"",i=Zh(r),l=0===o||o?`${o}${i}`:void 0;return l}function tv(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=ev(e),n="string"!=typeof e&&isNaN(parseFloat(t));return n}function nv(e){if(!e)return!1;if("string"==typeof e)return!0;return!!Object.values(e).filter((e=>!!e||0===e)).length}function rv(e){let{onChange:t,selectedUnits:n,setSelectedUnits:r,values:o,...i}=e,l=ev(o);void 0===l&&(l=Xh(n));const a=nv(o)&&tv(o),s=a?(0,_.__)("Mixed"):null;return(0,u.createElement)(g.__experimentalUnitControl,c({},i,{"aria-label":(0,_.__)("Border radius"),disableUnits:a,isOnly:!0,value:l,onChange:e=>{const n=!isNaN(parseFloat(e));t(n?e:void 0)},onUnitChange:e=>{r({topLeft:e,topRight:e,bottomLeft:e,bottomRight:e})},placeholder:s,size:"__unstable-large"}))}Jh.__unstableElementContext=Wh;const ov={topLeft:(0,_.__)("Top left"),topRight:(0,_.__)("Top right"),bottomLeft:(0,_.__)("Bottom left"),bottomRight:(0,_.__)("Bottom right")};function iv(e){let{onChange:t,selectedUnits:n,setSelectedUnits:r,values:o,...i}=e;const l=e=>n=>{if(!t)return;const r=!isNaN(parseFloat(n))?n:void 0;t({...a,[e]:r})},a="string"!=typeof o?o:{topLeft:o,topRight:o,bottomLeft:o,bottomRight:o};return(0,u.createElement)("div",{className:"components-border-radius-control__input-controls-wrapper"},Object.entries(ov).map((e=>{let[t,o]=e;const[s,p]=(0,g.__experimentalParseQuantityAndUnitFromRawValue)(a[t]),d=a[t]?p:n[t]||n.flat;return(0,u.createElement)(g.Tooltip,{text:o,position:"top",key:t},(0,u.createElement)("div",{className:"components-border-radius-control__tooltip-wrapper"},(0,u.createElement)(g.__experimentalUnitControl,c({},i,{"aria-label":o,value:[s,d].join(""),onChange:l(t),onUnitChange:(f=t,e=>{const t={...n};t[f]=e,r(t)}),size:"__unstable-large"}))));var f})))}function lv(e){let{isLinked:t,...n}=e;const r=t?(0,_.__)("Unlink radii"):(0,_.__)("Link radii");return(0,u.createElement)(g.Tooltip,{text:r},(0,u.createElement)("span",null,(0,u.createElement)(g.Button,c({},n,{className:"component-border-radius-control__linked-button",isSmall:!0,icon:t?Eo:So,iconSize:24,"aria-label":r}))))}const av={topLeft:void 0,topRight:void 0,bottomLeft:void 0,bottomRight:void 0},sv={px:100,em:20,rem:20};function cv(e){let{onChange:t,values:n}=e;const[r,o]=(0,u.useState)(!nv(n)||!tv(n)),[i,l]=(0,u.useState)({flat:"string"==typeof n?(0,g.__experimentalParseQuantityAndUnitFromRawValue)(n)[1]:void 0,topLeft:(0,g.__experimentalParseQuantityAndUnitFromRawValue)(null==n?void 0:n.topLeft)[1],topRight:(0,g.__experimentalParseQuantityAndUnitFromRawValue)(null==n?void 0:n.topRight)[1],bottomLeft:(0,g.__experimentalParseQuantityAndUnitFromRawValue)(null==n?void 0:n.bottomLeft)[1],bottomRight:(0,g.__experimentalParseQuantityAndUnitFromRawValue)(null==n?void 0:n.bottomRight)[1]}),a=(0,g.__experimentalUseCustomUnits)({availableUnits:yo("spacing.units")||["px","em","rem"]}),s=Xh(i),c=a&&a.find((e=>e.value===s)),p=(null==c?void 0:c.step)||1,[d]=(0,g.__experimentalParseQuantityAndUnitFromRawValue)(ev(n));return(0,u.createElement)("fieldset",{className:"components-border-radius-control"},(0,u.createElement)(g.BaseControl.VisualLabel,{as:"legend"},(0,_.__)("Radius")),(0,u.createElement)("div",{className:"components-border-radius-control__wrapper"},r?(0,u.createElement)(u.Fragment,null,(0,u.createElement)(rv,{className:"components-border-radius-control__unit-control",values:n,min:0,onChange:t,selectedUnits:i,setSelectedUnits:l,units:a}),(0,u.createElement)(g.RangeControl,{label:(0,_.__)("Border radius"),hideLabelFromVision:!0,className:"components-border-radius-control__range-control",value:null!=d?d:"",min:0,max:sv[s],initialPosition:0,withInputField:!1,onChange:e=>{t(void 0!==e?`${e}${s}`:void 0)},step:p,__nextHasNoMarginBottom:!0})):(0,u.createElement)(iv,{min:0,onChange:t,selectedUnits:i,setSelectedUnits:l,values:n||av,units:a}),(0,u.createElement)(lv,{onClick:()=>o(!r),isLinked:r})))}function uv(e){var t;const{attributes:{style:n},setAttributes:r}=e;return(0,u.createElement)(cv,{values:null==n||null===(t=n.border)||void 0===t?void 0:t.radius,onChange:e=>{const t=Ro({...n,border:{...null==n?void 0:n.border,radius:e}});r({style:t})}})}hd([vd,kd]);const pv=(e,t,n)=>{if(t){const n=null==e?void 0:e.find((e=>e.slug===t));if(n)return n}return{color:n}},dv=(e,t)=>null==e?void 0:e.find((e=>e.color===t));function fv(e,t){if(e&&t)return`has-${(0,y.kebabCase)(t)}-${e}`}function mv(){const e={disableCustomColors:!yo("color.custom"),disableCustomGradients:!yo("color.customGradient")},t=yo("color.palette.custom"),n=yo("color.palette.theme"),r=yo("color.palette.default"),o=yo("color.defaultPalette");e.colors=(0,u.useMemo)((()=>{const e=[];return n&&n.length&&e.push({name:(0,_._x)("Theme","Indicates this palette comes from the theme."),colors:n}),o&&r&&r.length&&e.push({name:(0,_._x)("Default","Indicates this palette comes from WordPress."),colors:r}),t&&t.length&&e.push({name:(0,_._x)("Custom","Indicates this palette comes from the theme."),colors:t}),e}),[r,n,t]);const i=yo("color.gradients.custom"),l=yo("color.gradients.theme"),a=yo("color.gradients.default"),s=yo("color.defaultGradients");return e.gradients=(0,u.useMemo)((()=>{const e=[];return l&&l.length&&e.push({name:(0,_._x)("Theme","Indicates this palette comes from the theme."),gradients:l}),s&&a&&a.length&&e.push({name:(0,_._x)("Default","Indicates this palette comes from WordPress."),gradients:a}),i&&i.length&&e.push({name:(0,_._x)("Custom","Indicates this palette is created by the user."),gradients:i}),e}),[i,l,a]),e}const yv="__experimentalBorder",gv=["top","right","bottom","left"],hv=e=>{var t,n;return{...e,borderColor:void 0,style:{...e.style,border:{radius:null===(t=e.style)||void 0===t||null===(n=t.border)||void 0===n?void 0:n.radius}}}},vv=(e,t,n)=>{let r;return e.some((e=>e.colors.some((e=>e[t]===n&&(r=e,!0))))),r},bv=e=>{let{colors:t,namedColor:n,customColor:r}=e;if(n){const e=vv(t,"slug",n);if(e)return e}if(!r)return{color:void 0};const o=vv(t,"color",r);return o||{color:r}};function _v(e){const t=/var:preset\|color\|(.+)/.exec(e);return t&&t[1]?t[1]:null}function kv(e){const{attributes:t,clientId:n,setAttributes:r}=e,{style:o}=t,{colors:i}=mv(),l=Ev(e.name),s=yo("border.color")&&Ev(e.name,"color"),c=yo("border.radius")&&Ev(e.name,"radius"),p=yo("border.style")&&Ev(e.name,"style"),d=yo("border.width")&&Ev(e.name,"width");if([!s,!c,!p,!d].every(Boolean)||!l)return null;const f=(0,a.getBlockSupport)(e.name,[yv,"__experimentalDefaultControls"]),m=(null==f?void 0:f.color)||(null==f?void 0:f.width),y=((e,t)=>{const{borderColor:n,style:r}=e,{border:o}=r||{};if(n){const{color:e}=bv({colors:t,namedColor:n});return e?{...o,color:e}:o}if(!o)return o;const i={...o};return gv.forEach((e=>{var n;const r=_v(null===(n=i[e])||void 0===n?void 0:n.color);if(r){const{color:n}=bv({colors:t,namedColor:r});i[e]={...i[e],color:n}}})),i})(t,i);return(0,u.createElement)(Wo,{group:"border"},(d||s)&&(0,u.createElement)(g.__experimentalToolsPanelItem,{hasValue:()=>(e=>{const{borderColor:t,style:n}=e.attributes;return(0,g.__experimentalIsDefinedBorder)(null==n?void 0:n.border)||!!t})(e),label:(0,_.__)("Border"),onDeselect:()=>(e=>{var t;let{attributes:n={},setAttributes:r}=e;const{style:o}=n;r({borderColor:void 0,style:{...o,border:Ro({radius:null==o||null===(t=o.border)||void 0===t?void 0:t.radius})}})})(e),isShownByDefault:m,resetAllFilter:hv,panelId:n},(0,u.createElement)(g.__experimentalBorderBoxControl,{colors:i,enableAlpha:!0,enableStyle:p,onChange:e=>{var t;let n,l={...e};if((0,g.__experimentalHasSplitBorders)(e))l={top:{...e.top},right:{...e.right},bottom:{...e.bottom},left:{...e.left}},gv.forEach((t=>{var n;if(null!==(n=e[t])&&void 0!==n&&n.color){var r;const n=bv({colors:i,customColor:null===(r=e[t])||void 0===r?void 0:r.color});n.slug&&(l[t].color=`var:preset|color|${n.slug}`)}}));else if(null!=e&&e.color){const t=null==e?void 0:e.color,r=bv({colors:i,customColor:t});r.slug&&(n=r.slug,l.color=void 0)}const a=Ro({...o,border:{radius:null==o||null===(t=o.border)||void 0===t?void 0:t.radius,...l}});r({style:a,borderColor:n})},popoverOffset:40,popoverPlacement:"left-start",size:"__unstable-large",value:y,__experimentalIsRenderedInSidebar:!0})),c&&(0,u.createElement)(g.__experimentalToolsPanelItem,{hasValue:()=>function(e){var t,n;const r=null===(t=e.attributes.style)||void 0===t||null===(n=t.border)||void 0===n?void 0:n.radius;return"object"==typeof r?Object.entries(r).some(Boolean):!!r}(e),label:(0,_.__)("Radius"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:r}=t;n({style:Sv(r,"radius")})}(e),isShownByDefault:null==f?void 0:f.radius,resetAllFilter:e=>{var t;return{...e,style:{...e.style,border:{...null===(t=e.style)||void 0===t?void 0:t.border,radius:void 0}}}},panelId:n},(0,u.createElement)(uv,e)))}function Ev(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"any";if("web"!==u.Platform.OS)return!1;const n=(0,a.getBlockSupport)(e,yv);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 Sv(e,t){return Ro({...e,border:{...null==e?void 0:e.border,[t]:void 0}})}function wv(e,t,n){if(!Ev(t,"color")||Uo(t,yv,"color"))return e;const r=Cv(n),o=d()(e.className,r);return e.className=o||void 0,e}function Cv(e){var t;const{borderColor:n,style:r}=e,o=fv("border-color",n);return d()({"has-border-color":n||(null==r||null===(t=r.border)||void 0===t?void 0:t.color),[o]:!!o})}const Iv=(0,f.createHigherOrderComponent)((e=>t=>{var n,r,o,i,l,a,s,p,d;const{name:f,attributes:m}=t,{borderColor:y,style:g}=m,{colors:h}=mv();if(!Ev(f,"color")||Uo(f,yv,"color"))return(0,u.createElement)(e,t);const{color:v}=bv({colors:h,namedColor:y}),{color:b}=bv({colors:h,namedColor:_v(null==g||null===(n=g.border)||void 0===n||null===(r=n.top)||void 0===r?void 0:r.color)}),{color:_}=bv({colors:h,namedColor:_v(null==g||null===(o=g.border)||void 0===o||null===(i=o.right)||void 0===i?void 0:i.color)}),{color:k}=bv({colors:h,namedColor:_v(null==g||null===(l=g.border)||void 0===l||null===(a=l.bottom)||void 0===a?void 0:a.color)}),{color:E}=bv({colors:h,namedColor:_v(null==g||null===(s=g.border)||void 0===s||null===(p=s.left)||void 0===p?void 0:p.color)}),S={borderTopColor:b||v,borderRightColor:_||v,borderBottomColor:k||v,borderLeftColor:E||v};let w=t.wrapperProps;return w={...t.wrapperProps,style:{...null===(d=t.wrapperProps)||void 0===d?void 0:d.style,...S}},(0,u.createElement)(e,c({},t,{wrapperProps:w}))}));function Av(e){if(e)return`has-${e}-gradient-background`}function xv(e,t){const n=null==e?void 0:e.find((e=>e.slug===t));return n&&n.gradient}function Bv(e,t){const n=null==e?void 0:e.find((e=>e.gradient===t));return n}function Pv(e,t){const n=Bv(e,t);return n&&n.slug}function Tv(){let{gradientAttribute:e="gradient",customGradientAttribute:t="customGradient"}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{clientId:n}=Nr(),r=yo("color.gradients.custom"),o=yo("color.gradients.theme"),i=yo("color.gradients.default"),l=(0,u.useMemo)((()=>[...r||[],...o||[],...i||[]]),[r,o,i]),{gradient:a,customGradient:s}=(0,m.useSelect)((r=>{const{getBlockAttributes:o}=r(xr),i=o(n)||{};return{customGradient:i[t],gradient:i[e]}}),[n,e,t]),{updateBlockAttributes:c}=(0,m.useDispatch)(xr),p=(0,u.useCallback)((r=>{const o=Pv(l,r);c(n,o?{[e]:o,[t]:void 0}:{[e]:void 0,[t]:r})}),[l,n,c]),d=Av(a);let f;return f=a?xv(l,a):s,{gradientClass:d,gradientValue:f,setGradient:p}}(0,s.addFilter)("blocks.registerBlockType","core/border/addAttributes",(function(e){return Ev(e,"color")?e.attributes.borderColor?e:{...e,attributes:{...e.attributes,borderColor:{type:"string"}}}:e})),(0,s.addFilter)("blocks.getSaveContent.extraProps","core/border/addSaveProps",wv),(0,s.addFilter)("blocks.registerBlockType","core/border/addEditProps",(function(e){if(!Ev(e,"color")||Uo(e,yv,"color"))return e;const t=e.getEditWrapperProps;return e.getEditWrapperProps=n=>{let r={};return t&&(r=t(n)),wv(r,e,n)},e})),(0,s.addFilter)("editor.BlockListBlock","core/border/with-border-color-palette-styles",Iv);const Ov=["colors","disableCustomColors","gradients","disableCustomGradients"],Nv={name:"color",title:"Solid",value:"color"},Mv={name:"gradient",title:"Gradient",value:"gradient"},Rv=[Nv,Mv];function Fv(e){let{colors:t,gradients:n,disableCustomColors:r,disableCustomGradients:o,__experimentalIsRenderedInSidebar:i,className:l,label:a,onColorChange:s,onGradientChange:c,colorValue:p,gradientValue:f,clearable:m,showTitle:h=!0,enableAlpha:v}=e;const b=s&&(!(0,y.isEmpty)(t)||!r),_=c&&(!(0,y.isEmpty)(n)||!o);if(!b&&!_)return null;const k={[Nv.value]:(0,u.createElement)(g.ColorPalette,{value:p,onChange:_?e=>{s(e),c()}:s,colors:t,disableCustomColors:r,__experimentalIsRenderedInSidebar:i,clearable:m,enableAlpha:v}),[Mv.value]:(0,u.createElement)(g.GradientPicker,{__nextHasNoMargin:!0,value:f,onChange:b?e=>{c(e),s()}:c,gradients:n,disableCustomGradients:o,__experimentalIsRenderedInSidebar:i,clearable:m})},E=e=>(0,u.createElement)("div",{className:"block-editor-color-gradient-control__panel"},k[e]);return(0,u.createElement)(g.BaseControl,{__nextHasNoMarginBottom:!0,className:d()("block-editor-color-gradient-control",l)},(0,u.createElement)("fieldset",{className:"block-editor-color-gradient-control__fieldset"},(0,u.createElement)(g.__experimentalVStack,{spacing:1},h&&(0,u.createElement)("legend",null,(0,u.createElement)("div",{className:"block-editor-color-gradient-control__color-indicator"},(0,u.createElement)(g.BaseControl.VisualLabel,null,a))),b&&_&&(0,u.createElement)(g.TabPanel,{className:"block-editor-color-gradient-control__tabs",tabs:Rv,initialTabName:f?Mv.value:!!b&&Nv.value},(e=>E(e.value))),!_&&E(Nv.value),!b&&E(Mv.value))))}function Lv(e){const t={};return t.colors=yo("color.palette"),t.gradients=yo("color.gradients"),t.disableCustomColors=!yo("color.custom"),t.disableCustomGradients=!yo("color.customGradient"),(0,u.createElement)(Fv,c({},t,e))}var Dv=function(e){return Ov.every((t=>e.hasOwnProperty(t)))?(0,u.createElement)(Fv,e):(0,u.createElement)(Lv,e)};const Uv=e=>{let{setting:t,children:n,panelId:r,...o}=e;return(0,u.createElement)(g.__experimentalToolsPanelItem,c({hasValue:()=>!!t.colorValue||!!t.gradientValue,label:t.label,onDeselect:()=>{t.colorValue?t.onColorChange():t.gradientValue&&t.onGradientChange()},isShownByDefault:void 0===t.isShownByDefault||t.isShownByDefault},o,{className:"block-editor-tools-panel-color-gradient-settings__item",panelId:r,resetAllFilter:t.resetAllFilter}),n)},jv=e=>{let{colorValue:t,label:n}=e;return(0,u.createElement)(g.__experimentalHStack,{justify:"flex-start"},(0,u.createElement)(g.ColorIndicator,{className:"block-editor-panel-color-gradient-settings__color-indicator",colorValue:t}),(0,u.createElement)(g.FlexItem,{className:"block-editor-panel-color-gradient-settings__color-name",title:n},n))},zv=e=>t=>{let{onToggle:n,isOpen:r}=t;const{colorValue:o,label:i}=e,l={onClick:n,className:d()("block-editor-panel-color-gradient-settings__dropdown",{"is-open":r}),"aria-expanded":r};return(0,u.createElement)(g.Button,l,(0,u.createElement)(jv,{colorValue:o,label:i}))};function Vv(e){let t,{colors:n,disableCustomColors:r,disableCustomGradients:o,enableAlpha:i,gradients:l,settings:a,__experimentalIsRenderedInSidebar:s,...p}=e;return s&&(t={placement:"left-start",offset:36,shift:!0}),(0,u.createElement)(u.Fragment,null,a.map(((e,a)=>{var d;const f={clearable:!1,colorValue:e.colorValue,colors:n,disableCustomColors:r,disableCustomGradients:o,enableAlpha:i,gradientValue:e.gradientValue,gradients:l,label:e.label,onColorChange:e.onColorChange,onGradientChange:e.onGradientChange,showTitle:!1,__experimentalIsRenderedInSidebar:s,...e},m={colorValue:null!==(d=e.gradientValue)&&void 0!==d?d:e.colorValue,label:e.label};return e&&(0,u.createElement)(Uv,c({key:a,setting:e},p),(0,u.createElement)(g.Dropdown,{popoverProps:t,className:"block-editor-tools-panel-color-gradient-settings__dropdown",renderToggle:zv(m),renderContent:()=>(0,u.createElement)(g.__experimentalDropdownContentWrapper,{paddingSize:"none"},(0,u.createElement)("div",{className:"block-editor-panel-color-gradient-settings__dropdown-content"},(0,u.createElement)(Dv,f)))}))})))}hd([vd,kd]);var Gv=function(e){let{backgroundColor:t,fallbackBackgroundColor:n,fallbackTextColor:r,fallbackLinkColor:o,fontSize:i,isLargeText:l,textColor:a,linkColor:s,enableAlphaChecker:c=!1}=e;const p=t||n;if(!p)return null;const d=a||r,f=s||o;if(!d&&!f)return null;const m=[{color:d,description:(0,_.__)("text color")},{color:f,description:(0,_.__)("link color")}],y=yd(p),h=y.alpha()<1,v=y.brightness(),b={level:"AA",size:l||!1!==l&&i>=24?"large":"small"};let k="",E="";for(const e of m){if(!e.color)continue;const t=yd(e.color),n=t.isReadable(y,b),r=t.alpha()<1;if(!n){if(h||r)continue;k=v<t.brightness()?(0,_.sprintf)((0,_.__)("This color combination may be hard for people to read. Try using a darker background color and/or a brighter %s."),e.description):(0,_.sprintf)((0,_.__)("This color combination may be hard for people to read. Try using a brighter background color and/or a darker %s."),e.description),E=(0,_.__)("This color combination may be hard for people to read.");break}r&&c&&(k=(0,_.__)("Transparent text may be hard for people to read."),E=(0,_.__)("Transparent text may be hard for people to read."))}return k?((0,dn.speak)(E),(0,u.createElement)("div",{className:"block-editor-contrast-checker"},(0,u.createElement)(g.Notice,{spokenMessage:null,status:"warning",isDismissible:!1},k))):null};function Hv(e){return e.ownerDocument.defaultView.getComputedStyle(e)}function Wv(e){let{enableAlpha:t=!1,settings:n,clientId:r,enableContrastChecking:o=!0}=e;const[i,l]=(0,u.useState)(),[a,s]=(0,u.useState)(),[p,d]=(0,u.useState)(),f=Xr(r),m=n.filter((e=>null==e?void 0:e.colorValue));(0,u.useEffect)((()=>{var e;if(!o)return;if(!m.length)return i&&l(),a&&s(),void(p&&s());if(!f.current)return;s(Hv(f.current).color);const t=null===(e=f.current)||void 0===e?void 0:e.querySelector("a");t&&t.innerText&&d(Hv(t).color);let n=f.current,r=Hv(n).backgroundColor;for(;"rgba(0, 0, 0, 0)"===r&&n.parentNode&&n.parentNode.nodeType===n.parentNode.ELEMENT_NODE;)n=n.parentNode,r=Hv(n).backgroundColor;l(r)}));const y=mv();return(0,u.createElement)(Wo,{group:"color"},(0,u.createElement)(Vv,c({enableAlpha:t,panelId:r,settings:n,__experimentalIsItemGroup:!1,__experimentalIsRenderedInSidebar:!0},y)),o&&(0,u.createElement)(Gv,{backgroundColor:i,textColor:a,enableAlphaChecker:t,linkColor:p}))}const $v="color",Kv=e=>{const t=(0,a.getBlockSupport)(e,$v);return t&&(!0===t.link||!0===t.gradient||!1!==t.background||!1!==t.text)},qv=e=>{if("web"!==u.Platform.OS)return!1;const t=(0,a.getBlockSupport)(e,$v);return null!==t&&"object"==typeof t&&!!t.link},Jv=e=>{const t=(0,a.getBlockSupport)(e,$v);return null!==t&&"object"==typeof t&&!!t.gradients},Yv=e=>{const t=(0,a.getBlockSupport)(e,$v);return t&&!1!==t.background},Qv=e=>{const t=(0,a.getBlockSupport)(e,$v);return t&&!1!==t.text},Zv=(e,t)=>Ro(Lo(t,e,void 0)),Xv=e=>({textColor:void 0,style:Zv(["color","text"],e.style)}),eb=e=>({style:Zv(["elements","link","color","text"],e.style)}),tb=e=>{var t;return{backgroundColor:void 0,gradient:void 0,style:{...e.style,color:{...null===(t=e.style)||void 0===t?void 0:t.color,background:void 0,gradient:void 0}}}};function nb(e,t,n){var r,o,i,l,a,s;if(!Kv(t)||Uo(t,$v))return e;const c=Jv(t),{backgroundColor:u,textColor:p,gradient:f,style:m}=n,y=e=>!Uo(t,$v,e),g=y("text")?fv("color",p):void 0,h=y("gradients")?Av(f):void 0,v=y("background")?fv("background-color",u):void 0,b=y("background")||y("gradients"),_=u||(null==m||null===(r=m.color)||void 0===r?void 0:r.background)||c&&(f||(null==m||null===(o=m.color)||void 0===o?void 0:o.gradient)),k=d()(e.className,g,h,{[v]:!(c&&null!=m&&null!==(i=m.color)&&void 0!==i&&i.gradient||!v),"has-text-color":y("text")&&(p||(null==m||null===(l=m.color)||void 0===l?void 0:l.text)),"has-background":b&&_,"has-link-color":y("link")&&(null==m||null===(a=m.elements)||void 0===a||null===(s=a.link)||void 0===s?void 0:s.color)});return e.className=k||void 0,e}const rb=(e,t)=>{const n=/var:preset\|color\|(.+)/.exec(t);return n&&n[1]?pv(e,n[1]).color:t};function ob(e){var t,n,r,o,i,l;const{name:s,attributes:c}=e,p=yo("color.palette.custom"),d=yo("color.palette.theme"),f=yo("color.palette.default"),m=(0,u.useMemo)((()=>[...p||[],...d||[],...f||[]]),[p,d,f]),y=yo("color.gradients.custom"),g=yo("color.gradients.theme"),h=yo("color.gradients.default"),v=(0,u.useMemo)((()=>[...y||[],...g||[],...h||[]]),[y,g,h]),b=yo("color.custom"),k=yo("color.customGradient"),E=yo("color.background"),S=yo("color.link"),w=yo("color.text"),C=b||!d||(null==d?void 0:d.length)>0,I=k||!g||(null==g?void 0:g.length)>0,A=(0,u.useRef)(c);if((0,u.useEffect)((()=>{A.current=c}),[c]),!Kv(s))return null;const x=qv(s)&&S&&C,B=Qv(s)&&w&&C,P=Yv(s)&&E&&C,T=Jv(s)&&I;if(!(x||B||P||T))return null;const{style:O,textColor:N,backgroundColor:M,gradient:R}=c;let F;if(T&&R)F=xv(v,R);else if(T){var L;F=null==O||null===(L=O.color)||void 0===L?void 0:L.gradient}const D=t=>n=>{var r,o;const i=dv(m,n),l=t+"Color",a={...A.current.style,color:{...null===(r=A.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:Ro(a),[l]:s};e.setAttributes(c),A.current={...A.current,...c}},U=(0,a.getBlockSupport)(e.name,[$v,"__experimentalDefaultControls"]),j="web"===u.Platform.OS&&!R&&!(null!=O&&null!==(t=O.color)&&void 0!==t&&t.gradient)&&P&&(x||B)&&!1!==(0,a.getBlockSupport)(e.name,[$v,"enableContrastChecker"]);return(0,u.createElement)(Wv,{enableContrastChecking:j,clientId:e.clientId,enableAlpha:!0,settings:[...B?[{label:(0,_.__)("Text"),onColorChange:D("text"),colorValue:pv(m,N,null==O||null===(n=O.color)||void 0===n?void 0:n.text).color,isShownByDefault:null==U?void 0:U.text,resetAllFilter:Xv}]:[],...P||T?[{label:(0,_.__)("Background"),onColorChange:P?D("background"):void 0,colorValue:pv(m,M,null==O||null===(r=O.color)||void 0===r?void 0:r.background).color,gradientValue:F,onGradientChange:T?t=>{const n=Pv(v,t);let r;if(n){var o,i,l;const e={...null===(o=A.current)||void 0===o?void 0:o.style,color:{...null===(i=A.current)||void 0===i||null===(l=i.style)||void 0===l?void 0:l.color,gradient:void 0}};r={style:Ro(e),gradient:n}}else{var a,s,c;const e={...null===(a=A.current)||void 0===a?void 0:a.style,color:{...null===(s=A.current)||void 0===s||null===(c=s.style)||void 0===c?void 0:c.color,gradient:t}};r={style:Ro(e),gradient:void 0}}e.setAttributes(r),A.current={...A.current,...r}}:void 0,isShownByDefault:null==U?void 0:U.background,resetAllFilter:tb}]:[],...x?[{label:(0,_.__)("Link"),onColorChange:t=>{var n;const r=dv(m,t),o=null!=r&&r.slug?`var:preset|color|${r.slug}`:t,i=Ro(Lo(null===(n=A.current)||void 0===n?void 0:n.style,["elements","link","color","text"],o));e.setAttributes({style:i}),A.current={...A.current,style:i}},colorValue:rb(m,null==O||null===(o=O.elements)||void 0===o||null===(i=o.link)||void 0===i||null===(l=i.color)||void 0===l?void 0:l.text),isShownByDefault:null==U?void 0:U.link,resetAllFilter:eb}]:[]]})}const ib=(0,f.createHigherOrderComponent)((e=>t=>{var n;const{name:r,attributes:o}=t,{backgroundColor:i,textColor:l}=o,a=yo("color.palette.custom"),s=yo("color.palette.theme"),p=yo("color.palette.default"),d=(0,u.useMemo)((()=>[...a||[],...s||[],...p||[]]),[a,s,p]);if(!Kv(r)||Uo(r,$v))return(0,u.createElement)(e,t);const f={};var m,y;l&&!Uo(r,$v,"text")&&(f.color=null===(m=pv(d,l))||void 0===m?void 0:m.color);i&&!Uo(r,$v,"background")&&(f.backgroundColor=null===(y=pv(d,i))||void 0===y?void 0:y.color);let g=t.wrapperProps;return g={...t.wrapperProps,style:{...f,...null===(n=t.wrapperProps)||void 0===n?void 0:n.style}},(0,u.createElement)(e,c({},t,{wrapperProps:g}))})),lb={linkColor:[["style","elements","link","color","text"]],textColor:[["textColor"],["style","color","text"]],backgroundColor:[["backgroundColor"],["style","color","background"]],gradient:[["gradient"],["style","color","gradient"]]};(0,s.addFilter)("blocks.registerBlockType","core/color/addAttribute",(function(e){return Kv(e)?(e.attributes.backgroundColor||Object.assign(e.attributes,{backgroundColor:{type:"string"}}),e.attributes.textColor||Object.assign(e.attributes,{textColor:{type:"string"}}),Jv(e)&&!e.attributes.gradient&&Object.assign(e.attributes,{gradient:{type:"string"}}),e):e})),(0,s.addFilter)("blocks.getSaveContent.extraProps","core/color/addSaveProps",nb),(0,s.addFilter)("blocks.registerBlockType","core/color/addEditProps",(function(e){if(!Kv(e)||Uo(e,$v))return e;const t=e.getEditWrapperProps;return e.getEditWrapperProps=n=>{let r={};return t&&(r=t(n)),nb(r,e,n)},e})),(0,s.addFilter)("editor.BlockListBlock","core/color/with-color-palette-styles",ib),(0,s.addFilter)("blocks.switchToBlockType.transformedBlock","core/color/addTransforms",(function(e,t,n,r){const o=e.name;return Do({linkColor:qv(o),textColor:Qv(o),backgroundColor:Yv(o),gradient:Jv(o)},lb,e,t,n,r)}));const ab=[{name:(0,_._x)("Regular","font style"),value:"normal"},{name:(0,_._x)("Italic","font style"),value:"italic"}],sb=[{name:(0,_._x)("Thin","font weight"),value:"100"},{name:(0,_._x)("Extra Light","font weight"),value:"200"},{name:(0,_._x)("Light","font weight"),value:"300"},{name:(0,_._x)("Regular","font weight"),value:"400"},{name:(0,_._x)("Medium","font weight"),value:"500"},{name:(0,_._x)("Semi Bold","font weight"),value:"600"},{name:(0,_._x)("Bold","font weight"),value:"700"},{name:(0,_._x)("Extra Bold","font weight"),value:"800"},{name:(0,_._x)("Black","font weight"),value:"900"}],cb=(e,t)=>e?t?(0,_.__)("Appearance"):(0,_.__)("Font style"):(0,_.__)("Font weight");function ub(e){const{onChange:t,hasFontStyles:n=!0,hasFontWeights:r=!0,value:{fontStyle:o,fontWeight:i},...l}=e,a=n||r,s=cb(n,r),p={key:"default",name:(0,_.__)("Default"),style:{fontStyle:void 0,fontWeight:void 0}},d=(0,u.useMemo)((()=>n&&r?(()=>{const e=[p];return ab.forEach((t=>{let{name:n,value:r}=t;sb.forEach((t=>{let{name:o,value:i}=t;const l="normal"===r?o:(0,_.sprintf)((0,_.__)("%1$s %2$s"),o,n);e.push({key:`${r}-${i}`,name:l,style:{fontStyle:r,fontWeight:i}})}))})),e})():n?(()=>{const e=[p];return ab.forEach((t=>{let{name:n,value:r}=t;e.push({key:r,name:n,style:{fontStyle:r,fontWeight:void 0}})})),e})():(()=>{const e=[p];return sb.forEach((t=>{let{name:n,value:r}=t;e.push({key:r,name:n,style:{fontStyle:void 0,fontWeight:r}})})),e})()),[e.options]),f=d.find((e=>e.style.fontStyle===o&&e.style.fontWeight===i))||d[0];return a&&(0,u.createElement)(g.CustomSelectControl,c({},l,{className:"components-font-appearance-control",label:s,describedBy:f?n?r?(0,_.sprintf)((0,_.__)("Currently selected font appearance: %s"),f.name):(0,_.sprintf)((0,_.__)("Currently selected font style: %s"),f.name):(0,_.sprintf)((0,_.__)("Currently selected font weight: %s"),f.name):(0,_.__)("No selected font appearance"),options:d,value:f,onChange:e=>{let{selectedItem:n}=e;return t(n.style)},__nextUnconstrainedWidth:!0}))}const pb=1.5,db=.1;var fb=e=>{let{value:t,onChange:n,__nextHasNoMarginBottom:r=!1,__unstableInputWidth:o="60px",...i}=e;const l=function(e){return void 0!==e&&""!==e}(t),a=l?t:"";r||$()("Bottom margin styles for wp.blockEditor.LineHeightControl",{since:"6.0",version:"6.4",hint:"Set the `__nextHasNoMarginBottom` prop to true to start opting into the new styles, which will become the default in a future version"});const s=r?void 0:{marginBottom:24};return(0,u.createElement)("div",{className:"block-editor-line-height-control",style:s},(0,u.createElement)(g.__experimentalNumberControl,c({},i,{__unstableInputWidth:o,__unstableStateReducer:(e,t)=>{var n;const r=["insertText","insertFromPaste"].includes(null===(n=t.payload.event.nativeEvent)||void 0===n?void 0:n.inputType),o=((e,t)=>{if(l)return e;switch(`${e}`){case"0.1":return 1.6;case"0":return t?e:1.4;case"":return pb;default:return e}})(e.value,r);return{...e,value:o}},onChange:n,label:(0,_.__)("Line height"),placeholder:pb,step:db,value:a,min:0,spinControls:"custom"})))};const mb="typography.lineHeight";function yb(e){var t;const{attributes:{style:n},setAttributes:r}=e;return(0,u.createElement)(fb,{__unstableInputWidth:"100%",__nextHasNoMarginBottom:!0,value:null==n||null===(t=n.typography)||void 0===t?void 0:t.lineHeight,onChange:e=>{const t={...n,typography:{...null==n?void 0:n.typography,lineHeight:e}};r({style:Ro(t)})},size:"__unstable-large"})}function gb(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=!yo("typography.lineHeight");return!(0,a.hasBlockSupport)(e,mb)||t}const hb="typography.__experimentalFontStyle",vb="typography.__experimentalFontWeight";function bb(e){var t,n;const{attributes:{style:r},setAttributes:o}=e,i=!_b(e),l=!kb(e),a=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,u.createElement)(ub,{onChange:e=>{o({style:Ro({...r,typography:{...null==r?void 0:r.typography,fontStyle:e.fontStyle,fontWeight:e.fontWeight}})})},hasFontStyles:i,hasFontWeights:l,value:{fontStyle:a,fontWeight:s},size:"__unstable-large"})}function _b(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=(0,a.hasBlockSupport)(e,hb),n=yo("typography.fontStyle");return!t||!n}function kb(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=(0,a.hasBlockSupport)(e,vb),n=yo("typography.fontWeight");return!t||!n}function Eb(e){const t=_b(e),n=kb(e);return t&&n}function Sb(e){let{value:t="",onChange:n,fontFamilies:r,...o}=e;const i=yo("typography.fontFamilies");if(r||(r=i),!r||0===r.length)return null;const l=[{value:"",label:(0,_.__)("Default")},...r.map((e=>{let{fontFamily:t,name:n}=e;return{value:t,label:n||t}}))];return(0,u.createElement)(g.SelectControl,c({label:(0,_.__)("Font"),options:l,value:t,onChange:n,labelPosition:"top"},o))}const wb="typography.__experimentalFontFamily";function Cb(e,t,n){if(!(0,a.hasBlockSupport)(t,wb))return e;if(Uo(t,p_,"fontFamily"))return e;if(null==n||!n.fontFamily)return e;const r=new(jy())(e.className);r.add(`has-${(0,y.kebabCase)(null==n?void 0:n.fontFamily)}-font-family`);const o=r.value;return e.className=o||void 0,e}function Ib(e){var t;let{setAttributes:n,attributes:{fontFamily:r}}=e;const o=yo("typography.fontFamilies"),i=null==o||null===(t=o.find((e=>{let{slug:t}=e;return r===t})))||void 0===t?void 0:t.fontFamily;return(0,u.createElement)(Sb,{className:"block-editor-hooks-font-family-control",fontFamilies:o,value:i,onChange:function(e){const t=null==o?void 0:o.find((t=>{let{fontFamily:n}=t;return n===e}));n({fontFamily:null==t?void 0:t.slug})},size:"__unstable-large",__nextHasNoMarginBottom:!0})}function Ab(e){let{name:t}=e;const n=yo("typography.fontFamilies");return!n||0===n.length||!(0,a.hasBlockSupport)(t,wb)}(0,s.addFilter)("blocks.registerBlockType","core/fontFamily/addAttribute",(function(e){return(0,a.hasBlockSupport)(e,wb)?(e.attributes.fontFamily||Object.assign(e.attributes,{fontFamily:{type:"string"}}),e):e})),(0,s.addFilter)("blocks.getSaveContent.extraProps","core/fontFamily/addSaveProps",Cb),(0,s.addFilter)("blocks.registerBlockType","core/fontFamily/addEditProps",(function(e){if(!(0,a.hasBlockSupport)(e,wb))return e;const t=e.getEditWrapperProps;return e.getEditWrapperProps=n=>{let r={};return t&&(r=t(n)),Cb(r,e,n)},e}));const xb=(e,t,n)=>{if(t){const n=null==e?void 0:e.find((e=>{let{slug:n}=e;return n===t}));if(n)return n}return{size:n}};function Bb(e,t){const n=null==e?void 0:e.find((e=>{let{size:n}=e;return n===t}));return n||{size:t}}function Pb(e){if(e)return`has-${(0,y.kebabCase)(e)}-font-size`}var Tb=function(e){const t=yo("typography.fontSizes"),n=!yo("typography.customFontSize");return(0,u.createElement)(g.FontSizePicker,c({},e,{fontSizes:t,disableCustomFontSizes:n}))};const Ob="1600px",Nb="768px",Mb=1,Rb=.75;function Fb(e){let{minimumFontSize:t,maximumFontSize:n,fontSize:r,minimumViewPortWidth:o=Nb,maximumViewPortWidth:i=Ob,scaleFactor:l=Mb,minimumFontSizeFactor:a=Rb,minimumFontSizeLimit:s}=e;if(s=Lb(s)?s:"14px",r){const e=Lb(r);if(null==e||!e.unit)return null;const o=Lb(s,{coerceTo:e.unit});if(null!=o&&o.value&&!t&&!n&&(null==e?void 0:e.value)<=(null==o?void 0:o.value))return null;if(n||(n=`${e.value}${e.unit}`),!t){const n=Db(e.value*a,3);t=null!=o&&o.value&&n<(null==o?void 0:o.value)?`${o.value}${o.unit}`:`${n}${e.unit}`}}const c=Lb(t),u=(null==c?void 0:c.unit)||"rem",p=Lb(n,{coerceTo:u});if(!c||!p)return null;const d=Lb(t,{coerceTo:"rem"}),f=Lb(i,{coerceTo:u}),m=Lb(o,{coerceTo:u});if(!f||!m||!d)return null;const y=Db(m.value/100,3),g=Db(y,3)+u,h=Db(((p.value-c.value)/(f.value-m.value)*100||1)*l,3);return`clamp(${t}, ${`${d.value}${d.unit} + ((1vw - ${g}) * ${h})`}, ${n})`}function Lb(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("string"!=typeof e&&"number"!=typeof e)return null;isFinite(e)&&(e=`${e}px`);const{coerceTo:n,rootSizeValue:r,acceptableUnits:o}={coerceTo:"",rootSizeValue:16,acceptableUnits:["rem","px","em"],...t},i=null==o?void 0:o.join("|"),l=new RegExp(`^(\\d*\\.?\\d+)(${i}){1,1}$`),a=e.match(l);if(!a||a.length<3)return null;let[,s,c]=a,u=parseFloat(s);return"px"!==n||"em"!==c&&"rem"!==c||(u*=r,c=n),"px"!==c||"em"!==n&&"rem"!==n||(u/=r,c=n),"em"!==n&&"rem"!==n||"em"!==c&&"rem"!==c||(c=n),{value:Db(u,3),unit:c}}function Db(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3;const n=Math.pow(10,t);return Number.isFinite(e)?parseFloat(Math.round(e*n)/n):void 0}const Ub="typography.fontSize";function jb(e,t,n){if(!(0,a.hasBlockSupport)(t,Ub))return e;if(Uo(t,p_,"fontSize"))return e;const r=new(jy())(e.className);r.add(Pb(n.fontSize));const o=r.value;return e.className=o||void 0,e}function zb(e){var t,n;const{attributes:{fontSize:r,style:o},setAttributes:i}=e,l=yo("typography.fontSizes"),a=xb(l,r,null==o||null===(t=o.typography)||void 0===t?void 0:t.fontSize),s=(null==a?void 0:a.size)||(null==o||null===(n=o.typography)||void 0===n?void 0:n.fontSize)||r;return(0,u.createElement)(Tb,{onChange:e=>{const t=Bb(l,e).slug;i({style:Ro({...o,typography:{...null==o?void 0:o.typography,fontSize:t?void 0:e}}),fontSize:t})},value:s,withReset:!1,withSlider:!0,size:"__unstable-large",__nextHasNoMarginBottom:!0})}function Vb(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=yo("typography.fontSizes"),n=!(null==t||!t.length);return!(0,a.hasBlockSupport)(e,Ub)||!n}const Gb=(0,f.createHigherOrderComponent)((e=>t=>{var n,r;const o=yo("typography.fontSizes"),{name:i,attributes:{fontSize:l,style:s},wrapperProps:c}=t;if(!(0,a.hasBlockSupport)(i,Ub)||Uo(i,p_,"fontSize")||!l||null!=s&&null!==(n=s.typography)&&void 0!==n&&n.fontSize)return(0,u.createElement)(e,t);const p=xb(o,l,null==s||null===(r=s.typography)||void 0===r?void 0:r.fontSize).size,d={...t,wrapperProps:{...c,style:{fontSize:p,...null==c?void 0:c.style}}};return(0,u.createElement)(e,d)}),"withFontSizeInlineStyles"),Hb={fontSize:[["fontSize"],["style","typography","fontSize"]]};(0,s.addFilter)("blocks.registerBlockType","core/font/addAttribute",(function(e){return(0,a.hasBlockSupport)(e,Ub)?(e.attributes.fontSize||Object.assign(e.attributes,{fontSize:{type:"string"}}),e):e})),(0,s.addFilter)("blocks.getSaveContent.extraProps","core/font/addSaveProps",jb),(0,s.addFilter)("blocks.registerBlockType","core/font/addEditProps",(function(e){if(!(0,a.hasBlockSupport)(e,Ub))return e;const t=e.getEditWrapperProps;return e.getEditWrapperProps=n=>{let r={};return t&&(r=t(n)),jb(r,e,n)},e})),(0,s.addFilter)("editor.BlockListBlock","core/font-size/with-font-size-inline-styles",Gb),(0,s.addFilter)("blocks.switchToBlockType.transformedBlock","core/font-size/addTransforms",(function(e,t,n,r){const o=e.name;return Do({fontSize:(0,a.hasBlockSupport)(o,Ub)},Hb,e,t,n,r)})),(0,s.addFilter)("blocks.registerBlockType","core/font-size/addEditPropsForFluidCustomFontSizes",(function(e){if(!(0,a.hasBlockSupport)(e,Ub)||Uo(e,p_,"fontSize"))return e;const t=e.getEditWrapperProps;return e.getEditWrapperProps=e=>{var n,r,o;const i=t?t(e):{},l=null==i||null===(n=i.style)||void 0===n?void 0:n.fontSize,a=null===(r=(0,m.select)(xr).getSettings().__experimentalFeatures)||void 0===r||null===(o=r.typography)||void 0===o?void 0:o.fluid,s="object"==typeof a?a:{},c=l&&a?Fb({fontSize:l,minimumFontSizeLimit:null==s?void 0:s.minFontSize}):null;return null===c?i:{...i,style:{...null==i?void 0:i.style,fontSize:c}}},e}),11);var Wb=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M7 11.5h10V13H7z"}));var $b=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{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"}));var Kb=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{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 qb=[{name:(0,_.__)("None"),value:"none",icon:Wb},{name:(0,_.__)("Underline"),value:"underline",icon:$b},{name:(0,_.__)("Strikethrough"),value:"line-through",icon:Kb}];function Jb(e){let{value:t,onChange:n,className:r}=e;return(0,u.createElement)("fieldset",{className:d()("block-editor-text-decoration-control",r)},(0,u.createElement)(g.BaseControl.VisualLabel,{as:"legend"},(0,_.__)("Decoration")),(0,u.createElement)("div",{className:"block-editor-text-decoration-control__buttons"},qb.map((e=>(0,u.createElement)(g.Button,{key:e.value,icon:e.icon,label:e.name,isPressed:e.value===t,onClick:()=>{n(e.value===t?void 0:e.value)}})))))}const Yb="typography.__experimentalTextDecoration";function Qb(e){var t;const{attributes:{style:n},setAttributes:r}=e;return(0,u.createElement)(Jb,{value:null==n||null===(t=n.typography)||void 0===t?void 0:t.textDecoration,onChange:function(e){r({style:Ro({...n,typography:{...null==n?void 0:n.typography,textDecoration:e}})})},size:"__unstable-large"})}function Zb(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=!(0,a.hasBlockSupport)(e,Yb),n=yo("typography.textDecoration");return t||!n}var Xb=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{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"}));var e_=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{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"}));var t_=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{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 n_=[{name:(0,_.__)("None"),value:"none",icon:Wb},{name:(0,_.__)("Uppercase"),value:"uppercase",icon:Xb},{name:(0,_.__)("Lowercase"),value:"lowercase",icon:e_},{name:(0,_.__)("Capitalize"),value:"capitalize",icon:t_}];function r_(e){let{className:t,value:n,onChange:r}=e;return(0,u.createElement)("fieldset",{className:d()("block-editor-text-transform-control",t)},(0,u.createElement)(g.BaseControl.VisualLabel,{as:"legend"},(0,_.__)("Letter case")),(0,u.createElement)("div",{className:"block-editor-text-transform-control__buttons"},n_.map((e=>(0,u.createElement)(g.Button,{key:e.value,icon:e.icon,label:e.name,isPressed:e.value===n,onClick:()=>{r(e.value===n?void 0:e.value)}})))))}const o_="typography.__experimentalTextTransform";function i_(e){var t;const{attributes:{style:n},setAttributes:r}=e;return(0,u.createElement)(r_,{value:null==n||null===(t=n.typography)||void 0===t?void 0:t.textTransform,onChange:function(e){r({style:Ro({...n,typography:{...null==n?void 0:n.typography,textTransform:e}})})},size:"__unstable-large"})}function l_(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=!(0,a.hasBlockSupport)(e,o_),n=yo("typography.textTransform");return t||!n}function a_(e){let{value:t,onChange:n,__unstableInputWidth:r="60px",...o}=e;const i=(0,g.__experimentalUseCustomUnits)({availableUnits:yo("spacing.units")||["px","em","rem"],defaultValues:{px:2,em:.2,rem:.2}});return(0,u.createElement)(g.__experimentalUnitControl,c({},o,{label:(0,_.__)("Letter spacing"),value:t,__unstableInputWidth:r,units:i,onChange:n}))}const s_="typography.__experimentalLetterSpacing";function c_(e){var t;const{attributes:{style:n},setAttributes:r}=e;return(0,u.createElement)(a_,{value:null==n||null===(t=n.typography)||void 0===t?void 0:t.letterSpacing,onChange:function(e){r({style:Ro({...n,typography:{...null==n?void 0:n.typography,letterSpacing:e}})})},__unstableInputWidth:"100%",size:"__unstable-large"})}function u_(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=!(0,a.hasBlockSupport)(e,s_),n=yo("typography.letterSpacing");return t||!n}const p_="typography",d_=[mb,Ub,hb,vb,wb,Yb,o_,s_];function f_(e){const{clientId:t}=e,n=Ab(e),r=Vb(e),o=Eb(e),i=gb(e),l=Zb(e),s=l_(e),c=u_(e),p=!_b(e),d=!kb(e),f=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=[Eb(e),Vb(e),gb(e),Ab(e),Zb(e),l_(e),u_(e)];return t.filter(Boolean).length===t.length}(e),m=m_(e.name);if(f||!m)return null;const y=(0,a.getBlockSupport)(e.name,[p_,"__experimentalDefaultControls"]),h=e=>t=>{var n;return{...t,style:{...t.style,typography:{...null===(n=t.style)||void 0===n?void 0:n.typography,[e]:void 0}}}};return(0,u.createElement)(Wo,{group:"typography"},!n&&(0,u.createElement)(g.__experimentalToolsPanelItem,{hasValue:()=>function(e){return!!e.attributes.fontFamily}(e),label:(0,_.__)("Font family"),onDeselect:()=>function(e){let{setAttributes:t}=e;t({fontFamily:void 0})}(e),isShownByDefault:null==y?void 0:y.fontFamily,resetAllFilter:e=>({...e,fontFamily:void 0}),panelId:t},(0,u.createElement)(Ib,e)),!r&&(0,u.createElement)(g.__experimentalToolsPanelItem,{hasValue:()=>function(e){var t;const{fontSize:n,style:r}=e.attributes;return!!n||!(null==r||null===(t=r.typography)||void 0===t||!t.fontSize)}(e),label:(0,_.__)("Font size"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:r}=t;n({fontSize:void 0,style:Ro({...r,typography:{...null==r?void 0:r.typography,fontSize:void 0}})})}(e),isShownByDefault:null==y?void 0:y.fontSize,resetAllFilter:e=>{var t;return{...e,fontSize:void 0,style:{...e.style,typography:{...null===(t=e.style)||void 0===t?void 0:t.typography,fontSize:void 0}}}},panelId:t},(0,u.createElement)(zb,e)),!o&&(0,u.createElement)(g.__experimentalToolsPanelItem,{className:"single-column",hasValue:()=>function(e){var t;const{fontStyle:n,fontWeight:r}=(null===(t=e.attributes.style)||void 0===t?void 0:t.typography)||{};return!!n||!!r}(e),label:cb(p,d),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:r}=t;n({style:Ro({...r,typography:{...null==r?void 0:r.typography,fontStyle:void 0,fontWeight:void 0}})})}(e),isShownByDefault:null==y?void 0:y.fontAppearance,resetAllFilter:e=>{var t;return{...e,style:{...e.style,typography:{...null===(t=e.style)||void 0===t?void 0:t.typography,fontStyle:void 0,fontWeight:void 0}}}},panelId:t},(0,u.createElement)(bb,e)),!i&&(0,u.createElement)(g.__experimentalToolsPanelItem,{className:"single-column",hasValue:()=>function(e){var t,n;return!(null===(t=e.attributes.style)||void 0===t||null===(n=t.typography)||void 0===n||!n.lineHeight)}(e),label:(0,_.__)("Line height"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:r}=t;n({style:Ro({...r,typography:{...null==r?void 0:r.typography,lineHeight:void 0}})})}(e),isShownByDefault:null==y?void 0:y.lineHeight,resetAllFilter:h("lineHeight"),panelId:t},(0,u.createElement)(yb,e)),!c&&(0,u.createElement)(g.__experimentalToolsPanelItem,{className:"single-column",hasValue:()=>function(e){var t,n;return!(null===(t=e.attributes.style)||void 0===t||null===(n=t.typography)||void 0===n||!n.letterSpacing)}(e),label:(0,_.__)("Letter spacing"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:r}=t;n({style:Ro({...r,typography:{...null==r?void 0:r.typography,letterSpacing:void 0}})})}(e),isShownByDefault:null==y?void 0:y.letterSpacing,resetAllFilter:h("letterSpacing"),panelId:t},(0,u.createElement)(c_,e)),!l&&(0,u.createElement)(g.__experimentalToolsPanelItem,{className:"single-column",hasValue:()=>function(e){var t,n;return!(null===(t=e.attributes.style)||void 0===t||null===(n=t.typography)||void 0===n||!n.textDecoration)}(e),label:(0,_.__)("Decoration"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:r}=t;n({style:Ro({...r,typography:{...null==r?void 0:r.typography,textDecoration:void 0}})})}(e),isShownByDefault:null==y?void 0:y.textDecoration,resetAllFilter:h("textDecoration"),panelId:t},(0,u.createElement)(Qb,e)),!s&&(0,u.createElement)(g.__experimentalToolsPanelItem,{hasValue:()=>function(e){var t,n;return!(null===(t=e.attributes.style)||void 0===t||null===(n=t.typography)||void 0===n||!n.textTransform)}(e),label:(0,_.__)("Letter case"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:r}=t;n({style:Ro({...r,typography:{...null==r?void 0:r.typography,textTransform:void 0}})})}(e),isShownByDefault:null==y?void 0:y.textTransform,resetAllFilter:h("textTransform"),panelId:t},(0,u.createElement)(i_,e)))}const m_=e=>d_.some((t=>(0,a.hasBlockSupport)(e,t)));const y_=[...d_,yv,$v,yi,gi],g_=e=>y_.some((t=>(0,a.hasBlockSupport)(e,t)));function h_(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t={};return(0,nl.getCSSRules)(e).forEach((e=>{t[e.key]=e.value})),t}const v_={"__experimentalBorder.__experimentalSkipSerialization":["border"],"color.__experimentalSkipSerialization":[$v],[`${p_}.__experimentalSkipSerialization`]:[p_],[`${yi}.__experimentalSkipSerialization`]:[yi],[`${gi}.__experimentalSkipSerialization`]:[gi]},b_={...v_,[`${gi}`]:["spacing.blockGap"]},__={gradients:"gradient"};function k_(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!e)return e;let r=e;return n||(r=JSON.parse(JSON.stringify(e))),Array.isArray(t)||(t=[t]),t.forEach((e=>{if(Array.isArray(e)||(e=e.split(".")),e.length>1){const[t,...n]=e;k_(r[t],[n],!0)}else 1===e.length&&delete r[e[0]]})),r}function E_(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:b_;if(!g_(t))return e;let{style:o}=n;return Object.entries(r).forEach((e=>{let[n,r]=e;const i=(0,a.getBlockSupport)(t,n);!0===i&&(o=k_(o,r)),Array.isArray(i)&&i.forEach((e=>{const t=__[e]||e;o=k_(o,[[...r,t]])}))})),e.style={...h_(o),...e.style},e}const S_=(0,f.createHigherOrderComponent)((e=>t=>{const n=Mr();return(0,u.createElement)(u.Fragment,null,n&&(0,u.createElement)(u.Fragment,null,(0,u.createElement)(ob,t),(0,u.createElement)(f_,t),(0,u.createElement)(kv,t),(0,u.createElement)(_i,t)),(0,u.createElement)(e,t))}),"withToolbarControls"),w_=(0,f.createHigherOrderComponent)((e=>t=>{var n,r;const o=`wp-elements-${(0,f.useInstanceId)(e)}`,i=Uo(t.name,$v,"link"),l=(0,u.useMemo)((()=>{var e;const n=null===(e=t.attributes.style)||void 0===e?void 0:e.elements,r=[];if(n&&Object.keys(n).length>0){var l;const e={...n,link:{...n.link,color:i||null===(l=n.link)||void 0===l?void 0:l.color}};for(const[t,n]of Object.entries(e)){const e=(0,nl.compileCSS)(n,{selector:`.editor-styles-wrapper .${o} ${a.__EXPERIMENTAL_ELEMENTS[t]}`});e&&r.push(e)}}return r.length>0?r:void 0}),[null===(n=t.attributes.style)||void 0===n?void 0:n.elements]),s=(0,u.useContext)(Jh.__unstableElementContext);return(0,u.createElement)(u.Fragment,null,l&&s&&(0,u.createPortal)((0,u.createElement)("style",{dangerouslySetInnerHTML:{__html:l}}),s),(0,u.createElement)(e,c({},t,{className:null!==(r=t.attributes.style)&&void 0!==r&&r.elements?d()(t.className,o):t.className})))}));(0,s.addFilter)("blocks.registerBlockType","core/style/addAttribute",(function(e){return g_(e)?(e.attributes.style||Object.assign(e.attributes,{style:{type:"object"}}),e):e})),(0,s.addFilter)("blocks.getSaveContent.extraProps","core/style/addSaveProps",E_),(0,s.addFilter)("blocks.registerBlockType","core/style/addEditProps",(function(e){if(!g_(e))return e;const t=e.getEditWrapperProps;return e.getEditWrapperProps=n=>{let r={};return t&&(r=t(n)),E_(r,e,n,v_)},e})),(0,s.addFilter)("editor.BlockEdit","core/style/with-block-controls",S_),(0,s.addFilter)("editor.BlockListBlock","core/editor/with-elements-styles",w_);(0,s.addFilter)("blocks.registerBlockType","core/settings/addAttribute",(function(e){var t,n;return n=e,(0,a.hasBlockSupport)(n,"__experimentalSettings",!1)?(null!=e&&null!==(t=e.attributes)&&void 0!==t&&t.settings||(e.attributes={...e.attributes,settings:{type:"object"}}),e):e}));var C_=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M12 4 4 19h16L12 4zm0 3.2 5.5 10.3H12V7.2z"}));var I_=function(e){let t,{colorPalette:n,duotonePalette:r,disableCustomColors:o,disableCustomDuotone:i,value:l,onChange:a}=e;return t="unset"===l?(0,u.createElement)(g.ColorIndicator,{className:"block-editor-duotone-control__unset-indicator"}):l?(0,u.createElement)(g.DuotoneSwatch,{values:l}):(0,u.createElement)(Xi,{icon:C_}),(0,u.createElement)(g.Dropdown,{popoverProps:{className:"block-editor-duotone-control__popover",headerTitle:(0,_.__)("Duotone"),variant:"toolbar"},renderToggle:e=>{let{isOpen:n,onToggle:r}=e;return(0,u.createElement)(g.ToolbarButton,{showTooltip:!0,onClick:r,"aria-haspopup":"true","aria-expanded":n,onKeyDown:e=>{n||e.keyCode!==Xu.DOWN||(e.preventDefault(),r())},label:(0,_.__)("Apply duotone filter"),icon:t})},renderContent:()=>(0,u.createElement)(g.MenuGroup,{label:(0,_.__)("Duotone")},(0,u.createElement)("div",{className:"block-editor-duotone-control__description"},(0,_.__)("Create a two-tone color effect without losing your original image.")),(0,u.createElement)(g.DuotonePicker,{colorPalette:n,duotonePalette:r,disableCustomColors:o,disableCustomDuotone:i,value:l,onChange:a}))})};const A_=[];function x_(e){let{selector:t,id:n,colors:r}=e;return"unset"===r?(0,u.createElement)(qd,{selector:t}):(0,u.createElement)(u.Fragment,null,(0,u.createElement)(Jd,{id:n,colors:r}),(0,u.createElement)(Kd,{id:n,selector:t}))}function B_(e){let{presetSetting:t,defaultSetting:n}=e;const r=!yo(n),o=yo(`${t}.custom`)||A_,i=yo(`${t}.theme`)||A_,l=yo(`${t}.default`)||A_;return(0,u.useMemo)((()=>[...o,...i,...r?A_:l]),[r,o,i,l])}function P_(e){var t;let{attributes:n,setAttributes:r}=e;const o=null==n?void 0:n.style,i=null==o||null===(t=o.color)||void 0===t?void 0:t.duotone,l=B_({presetSetting:"color.duotone",defaultSetting:"color.defaultDuotone"}),a=B_({presetSetting:"color.palette",defaultSetting:"color.defaultPalette"}),s=!yo("color.custom"),c=!yo("color.customDuotone")||0===(null==a?void 0:a.length)&&s;return 0===(null==l?void 0:l.length)&&c?null:(0,u.createElement)(Ur,{group:"block",__experimentalShareWithChildBlocks:!0},(0,u.createElement)(I_,{duotonePalette:l,colorPalette:a,disableCustomDuotone:c,disableCustomColors:s,value:i,onChange:e=>{const t={...o,color:{...null==o?void 0:o.color,duotone:e}};r({style:t})}}))}hd([vd]);const T_=(0,f.createHigherOrderComponent)((e=>t=>{const n=(0,a.hasBlockSupport)(t.name,"color.__experimentalDuotone"),r=(0,m.useSelect)((e=>e(xr).__unstableGetContentLockingParent(t.clientId)),[t.clientId]);return(0,u.createElement)(u.Fragment,null,(0,u.createElement)(e,t),n&&!r&&(0,u.createElement)(P_,t))}),"withDuotoneControls");const O_=(0,f.createHigherOrderComponent)((e=>t=>{var n,r,o;const i=(0,a.getBlockSupport)(t.name,"color.__experimentalDuotone"),l=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||!l)return(0,u.createElement)(e,t);const s=`wp-duotone-${(0,f.useInstanceId)(e)}`,p=function(e,t){const n=e.split(","),r=t.split(","),o=[];return n.forEach((e=>{r.forEach((t=>{o.push(`${e.trim()} ${t.trim()}`)}))})),o.join(", ")}(`.editor-styles-wrapper .${s}`,i),m=d()(null==t?void 0:t.className,s),y=(0,u.useContext)(Jh.__unstableElementContext);return(0,u.createElement)(u.Fragment,null,y&&(0,u.createPortal)((0,u.createElement)(x_,{selector:p,id:s,colors:l}),y),(0,u.createElement)(e,c({},t,{className:m})))}),"withDuotoneStyles");(0,s.addFilter)("blocks.registerBlockType","core/editor/duotone/add-attributes",(function(e){return(0,a.hasBlockSupport)(e,"color.__experimentalDuotone")?(e.attributes.style||Object.assign(e.attributes,{style:{type:"object"}}),e):e})),(0,s.addFilter)("editor.BlockEdit","core/editor/duotone/with-editor-controls",T_),(0,s.addFilter)("editor.BlockListBlock","core/editor/duotone/with-styles",O_);const N_="__experimentalLayout";function M_(){var e,t;let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const r=(0,m.useSelect)((e=>{var t;const{getSettings:n}=e(xr);return null===(t=n().__experimentalFeatures)||void 0===t?void 0:t.useRootPaddingAwareAlignments}),[]),o=yo("layout")||{},{attributes:i={},name:l}=n,{layout:s}=i,{default:c}=(0,a.getBlockSupport)(l,N_)||{},u=null!=s&&s.inherit||null!=s&&s.contentSize||null!=s&&s.wideSize?{...s,type:"constrained"}:s||c||{},p=[];var d,f;null!=o&&null!==(e=o.definitions)&&void 0!==e&&null!==(t=e[(null==u?void 0:u.type)||"default"])&&void 0!==t&&t.className&&p.push(null==o||null===(d=o.definitions)||void 0===d||null===(f=d[(null==u?void 0:u.type)||"default"])||void 0===f?void 0:f.className);return(null!=u&&u.inherit||null!=u&&u.contentSize||"constrained"===(null==u?void 0:u.type))&&r&&p.push("has-global-padding"),null!=u&&u.orientation&&p.push(`is-${(0,y.kebabCase)(u.orientation)}`),null!=u&&u.justifyContent&&p.push(`is-content-justification-${(0,y.kebabCase)(u.justifyContent)}`),null!=u&&u.flexWrap&&"nowrap"===u.flexWrap&&p.push("is-nowrap"),p}function R_(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;const{attributes:r={},name:o}=t,{layout:i={},style:l={}}=r,a=null!=i&&i.inherit||null!=i&&i.contentSize||null!=i&&i.wideSize?{...i,type:"constrained"}:i||{},s=il((null==a?void 0:a.type)||"default"),c=yo("layout")||{},u=yo("spacing.blockGap"),p=null!==u,d=null==s||null===(e=s.getLayoutStyle)||void 0===e?void 0:e.call(s,{blockName:o,selector:n,layout:i,layoutDefinitions:null==c?void 0:c.definitions,style:l,hasBlockGapSupport:p});return d}function F_(e){let{setAttributes:t,attributes:n,name:r}=e;const{layout:o}=n,i=yo("layout"),l=(0,m.useSelect)((e=>{const{getSettings:t}=e(xr);return t().supportsLayout}),[]),s=(0,a.getBlockSupport)(r,N_,{}),{allowSwitching:c,allowEditing:p=!0,allowInheriting:d=!0,default:f}=s;if(!p)return null;const y=!(!d||!i||null!=o&&o.type&&"default"!==(null==o?void 0:o.type)&&"constrained"!==(null==o?void 0:o.type)&&(null==o||!o.inherit)),h=o||f||{},{inherit:v=!1,type:b="default",contentSize:k=null}=h;if(("default"===b||"constrained"===b)&&!l)return null;const E=il(b),S=il("constrained"),w=!h.type&&(k||v),C=!!v||!!k,I=e=>t({layout:e});return(0,u.createElement)(u.Fragment,null,(0,u.createElement)(Wo,null,(0,u.createElement)(g.PanelBody,{title:(0,_.__)("Layout")},y&&(0,u.createElement)(u.Fragment,null,(0,u.createElement)(g.ToggleControl,{className:"block-editor-hooks__toggle-control",label:(0,_.__)("Inner blocks use content width"),checked:"constrained"===(null==E?void 0:E.name)||C,onChange:()=>t({layout:{type:"constrained"===(null==E?void 0:E.name)||C?"default":"constrained"}}),help:"constrained"===(null==E?void 0:E.name)||C?(0,_.__)("Nested blocks use content width with options for full and wide widths."):(0,_.__)("Nested blocks will fill the width of this container. Toggle to constrain.")})),!v&&c&&(0,u.createElement)(L_,{type:b,onChange:e=>t({layout:{type:e}})}),E&&"default"!==E.name&&(0,u.createElement)(E.inspectorControls,{layout:h,onChange:I,layoutBlockSupport:s}),S&&w&&(0,u.createElement)(S.inspectorControls,{layout:h,onChange:I,layoutBlockSupport:s}))),!v&&E&&(0,u.createElement)(E.toolBarControls,{layout:h,onChange:I,layoutBlockSupport:s}))}function L_(e){let{type:t,onChange:n}=e;return(0,u.createElement)(g.ButtonGroup,null,ol.map((e=>{let{name:r,label:o}=e;return(0,u.createElement)(g.Button,{key:r,isPressed:t===r,onClick:()=>n(r)},o)})))}const D_=(0,f.createHigherOrderComponent)((e=>t=>{const{name:n}=t;return[(0,a.hasBlockSupport)(n,N_)&&(0,u.createElement)(F_,c({key:"layout"},t)),(0,u.createElement)(e,c({key:"edit"},t))]}),"withInspectorControls"),U_=(0,f.createHigherOrderComponent)((e=>t=>{const{name:n,attributes:r,block:o}=t,i=(0,a.hasBlockSupport)(n,N_),l=(0,m.useSelect)((e=>{const{getSettings:t}=e(xr);return!!t().disableLayoutStyles})),s=i&&!l,p=(0,f.useInstanceId)(e),y=yo("layout")||{},g=(0,u.useContext)(Jh.__unstableElementContext),{layout:h}=r,{default:v}=(0,a.getBlockSupport)(n,N_)||{},b=null!=h&&h.inherit||null!=h&&h.contentSize||null!=h&&h.wideSize?{...h,type:"constrained"}:h||v||{},_=i?M_(o):null,k=`.wp-container-${p}.wp-container-${p}`,E=null!==yo("spacing.blockGap");let S;if(s){var w;const e=il((null==b?void 0:b.type)||"default");S=null==e||null===(w=e.getLayoutStyle)||void 0===w?void 0:w.call(e,{blockName:n,selector:k,layout:b,layoutDefinitions:null==y?void 0:y.definitions,style:null==r?void 0:r.style,hasBlockGapSupport:E})}const C=d()({[`wp-container-${p}`]:s&&!!S},_);return(0,u.createElement)(u.Fragment,null,s&&g&&!!S&&(0,u.createPortal)((0,u.createElement)(ul,{blockName:n,selector:k,css:S,layout:b,style:null==r?void 0:r.style}),g),(0,u.createElement)(e,c({},t,{__unstableLayoutClassNames:C})))})),j_=(0,f.createHigherOrderComponent)((e=>t=>{const{attributes:n}=t,{style:{layout:r={}}={}}=n,{selfStretch:o,flexSize:i}=r,l=o||i,a=(0,m.useSelect)((e=>{const{getSettings:t}=e(xr);return!!t().disableLayoutStyles})),s=l&&!a,p=(0,u.useContext)(Jh.__unstableElementContext),y=(0,f.useInstanceId)(e),g=`.wp-container-content-${y}`;let h="";"fixed"===o&&i?h+=`${g} {\n\t\t\t\tflex-basis: ${i};\n\t\t\t\tbox-sizing: border-box;\n\t\t\t}`:"fill"===o&&(h+=`${g} {\n\t\t\t\tflex-grow: 1;\n\t\t\t}`);const v=d()(null==t?void 0:t.className,{[`wp-container-content-${y}`]:s&&!!h});return(0,u.createElement)(u.Fragment,null,s&&p&&!!h&&(0,u.createPortal)((0,u.createElement)("style",null,h),p),(0,u.createElement)(e,c({},t,{className:v})))}));function z_(e){let{clientId:t,stopEditingAsBlock:n}=e;const r=(0,m.useSelect)((e=>{const{isBlockSelected:n,hasSelectedInnerBlock:r}=e(xr);return n(t)||r(t,!0)}),[t]);return(0,u.useEffect)((()=>{r||n()}),[r]),null}(0,s.addFilter)("blocks.registerBlockType","core/layout/addAttribute",(function(e){var t,n;return"type"in(null!==(t=null===(n=e.attributes)||void 0===n?void 0:n.layout)&&void 0!==t?t:{})||(0,a.hasBlockSupport)(e,N_)&&(e.attributes={...e.attributes,layout:{type:"object"}}),e})),(0,s.addFilter)("editor.BlockListBlock","core/editor/layout/with-layout-styles",U_),(0,s.addFilter)("editor.BlockListBlock","core/editor/layout/with-child-layout-styles",j_),(0,s.addFilter)("editor.BlockEdit","core/editor/layout/with-inspector-controls",D_);const V_=(0,f.createHigherOrderComponent)((e=>t=>{const{getBlockListSettings:n,getSettings:r}=(0,m.useSelect)(xr),o=(0,u.useRef)(),{templateLock:i,isLockedByParent:l,isEditingAsBlocks:a}=(0,m.useSelect)((e=>{const{__unstableGetContentLockingParent:n,getTemplateLock:r,__unstableGetTemporarilyEditingAsBlocks:o}=e(xr);return{templateLock:r(t.clientId),isLockedByParent:!!n(t.clientId),isEditingAsBlocks:o()===t.clientId}}),[t.clientId]),{updateSettings:s,updateBlockListSettings:p,__unstableSetTemporarilyEditingAsBlocks:f}=(0,m.useDispatch)(xr),y=!l&&"contentOnly"===i,{__unstableMarkNextChangeAsNotPersistent:h,updateBlockAttributes:v}=(0,m.useDispatch)(xr),b=(0,u.useCallback)((()=>{h(),v(t.clientId,{templateLock:"contentOnly"}),p(t.clientId,{...n(t.clientId),templateLock:"contentOnly"}),s({focusMode:o.current}),f()}),[t.clientId,o,s,p,n,h,v,f]);return y||a?(0,u.createElement)(u.Fragment,null,a&&!y&&(0,u.createElement)(u.Fragment,null,(0,u.createElement)(z_,{clientId:t.clientId,stopEditingAsBlock:b}),(0,u.createElement)(Ur,{group:"other"},(0,u.createElement)(g.ToolbarButton,{onClick:()=>{b()}},(0,_.__)("Done")))),!a&&y&&t.isSelected&&(0,u.createElement)(zg,null,(e=>{let{onClose:i}=e;return(0,u.createElement)(g.MenuItem,{onClick:()=>{h(),v(t.clientId,{templateLock:void 0}),p(t.clientId,{...n(t.clientId),templateLock:!1}),o.current=r().focusMode,s({focusMode:!0}),f(t.clientId),i()}},(0,_.__)("Modify"))})),(0,u.createElement)(e,c({},t,{className:d()(t.className,a&&"is-content-locked-editing-as-blocks")}))):(0,u.createElement)(e,t)}),"withToolbarControls");(0,s.addFilter)("editor.BlockEdit","core/content-lock-ui/with-block-controls",V_);const G_="metadata";function H_(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(!e.name.startsWith("core/"))return!1;const n=(0,a.getBlockSupport)(e,"__experimentalMetadata");return!!(!0===n||null!=n&&n[t])}function W_(e){var t;const n=(null===(t=e.style)||void 0===t?void 0:t.border)||{};return{className:Cv(e)||void 0,style:h_({border:n})}}function $_(e){const{colors:t}=mv(),n=W_(e),{borderColor:r}=e;if(r){const e=bv({colors:t,namedColor:r});n.style.borderColor=e.color}return n}function K_(e){var t,n,r,o,i,l;const{backgroundColor:a,textColor:s,gradient:c,style:u}=e,p=fv("background-color",a),f=fv("color",s),m=Av(c),y=m||(null==u||null===(t=u.color)||void 0===t?void 0:t.gradient);return{className:d()(f,m,{[p]:!y&&!!p,"has-text-color":s||(null==u||null===(n=u.color)||void 0===n?void 0:n.text),"has-background":a||(null==u||null===(r=u.color)||void 0===r?void 0:r.background)||c||(null==u||null===(o=u.color)||void 0===o?void 0:o.gradient),"has-link-color":null==u||null===(i=u.elements)||void 0===i||null===(l=i.link)||void 0===l?void 0:l.color})||void 0,style:h_({color:(null==u?void 0:u.color)||{}})}}(0,s.addFilter)("blocks.registerBlockType","core/metadata/addMetaAttribute",(function(e){var t,n;return null!=e&&null!==(t=e.attributes)&&void 0!==t&&null!==(n=t.metadata)&&void 0!==n&&n.type||H_(e,"name")&&(e.attributes={...e.attributes,[G_]:{type:"object"}}),e})),(0,s.addFilter)("blocks.getSaveContent.extraProps","core/metadata/save-props",(function(e,t,n){return H_(t)&&(e.metadata=n.metadata),e})),(0,s.addFilter)("blocks.registerBlockType","core/metadata/addLabelCallback",(function(e){return e.__experimentalLabel||H_(e,"name",!1)&&(e.__experimentalLabel=(e,t)=>{let{context:n}=t;const{metadata:r}=e;if("list-view"===n&&null!=r&&r.name)return r.name}),e}));const q_={};function J_(e){const{backgroundColor:t,textColor:n,gradient:r}=e,o=yo("color.palette.custom"),i=yo("color.palette.theme"),l=yo("color.palette.default"),a=yo("color.gradients")||q_,s=(0,u.useMemo)((()=>[...o||[],...i||[],...l||[]]),[o,i,l]),c=(0,u.useMemo)((()=>[...(null==a?void 0:a.custom)||[],...(null==a?void 0:a.theme)||[],...(null==a?void 0:a.default)||[]]),[a]),p=K_(e);if(t){const e=pv(s,t);p.style.backgroundColor=e.color}if(r&&(p.style.background=xv(c,r)),n){const e=pv(s,n);p.style.color=e.color}return p}function Y_(e){const{style:t}=e;return{style:h_({spacing:(null==t?void 0:t.spacing)||{}})}}function Q_(e,t){var n;let r=(null==e||null===(n=e.style)||void 0===n?void 0:n.typography)||{};if(t&&(!0===t||0!==Object.keys(t).length)){var o,i,l,a;const n=Fb({fontSize:null==e||null===(o=e.style)||void 0===o||null===(i=o.typography)||void 0===i?void 0:i.fontSize,minimumFontSizeLimit:null==t?void 0:t.minFontSize})||(null==e||null===(l=e.style)||void 0===l||null===(a=l.typography)||void 0===a?void 0:a.fontSize);r={...r,fontSize:n}}const s=h_({typography:r}),c=null!=e&&e.fontFamily?`has-${(0,y.kebabCase)(e.fontFamily)}-font-family`:"";return{className:d()(c,Pb(null==e?void 0:e.fontSize)),style:s}}function Z_(e){const[t,n]=(0,u.useState)(e);return(0,u.useEffect)((()=>{e&&n(e)}),[e]),t}const X_=e=>{let[t,...n]=e;return t.toUpperCase()+n.join("")},ek=e=>(0,f.createHigherOrderComponent)((t=>n=>(0,u.createElement)(t,c({},n,{colors:e}))),"withCustomColorPalette"),tk=()=>(0,f.createHigherOrderComponent)((e=>t=>{const n=yo("color.palette.custom"),r=yo("color.palette.theme"),o=yo("color.palette.default"),i=(0,u.useMemo)((()=>[...n||[],...r||[],...o||[]]),[n,r,o]);return(0,u.createElement)(e,c({},t,{colors:i}))}),"withEditorColorPalette");function nk(e,t){const n=e.reduce(((e,t)=>({...e,..."string"==typeof t?{[t]:(0,y.kebabCase)(t)}:t})),{});return(0,f.compose)([t,e=>class extends u.Component{constructor(e){super(e),this.setters=this.createSetters(),this.colorUtils={getMostReadableColor:this.getMostReadableColor.bind(this)},this.state={}}getMostReadableColor(e){const{colors:t}=this.props;return function(e,t){const n=yd(t),r=e=>{let{color:t}=e;return n.contrast(t)},o=Math.max(...e.map(r));return e.find((e=>r(e)===o)).color}(t,e)}createSetters(){return Object.keys(n).reduce(((e,t)=>{const n=X_(t),r=`custom${n}`;return e[`set${n}`]=this.createSetColor(t,r),e}),{})}createSetColor(e,t){return n=>{const r=dv(this.props.colors,n);this.props.setAttributes({[e]:r&&r.slug?r.slug:void 0,[t]:r&&r.slug?void 0:n})}}static getDerivedStateFromProps(e,t){let{attributes:r,colors:o}=e;return Object.entries(n).reduce(((e,n)=>{let[i,l]=n;const a=pv(o,r[i],r[`custom${X_(i)}`]),s=t[i];return(null==s?void 0:s.color)===a.color&&s?e[i]=s:e[i]={...a,class:fv(l,a.slug)},e}),{})}render(){return(0,u.createElement)(e,c({},this.props,{colors:void 0},this.state,this.setters,{colorUtils:this.colorUtils}))}}])}function rk(e){return function(){const t=ek(e);for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(0,f.createHigherOrderComponent)(nk(r,t),"withCustomColors")}}function ok(){const e=tk();for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(0,f.createHigherOrderComponent)(nk(n,e),"withColors")}const ik=[],lk=e=>{let[t,...n]=e;return t.toUpperCase()+n.join("")};var ak=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];const r=t.reduce(((e,t)=>(e[t]=`custom${lk(t)}`,e)),{});return(0,f.createHigherOrderComponent)((0,f.compose)([(0,f.createHigherOrderComponent)((e=>t=>{const n=yo("typography.fontSizes")||ik;return(0,u.createElement)(e,c({},t,{fontSizes:n}))}),"withFontSizes"),e=>class extends u.Component{constructor(e){super(e),this.setters=this.createSetters(),this.state={}}createSetters(){return Object.entries(r).reduce(((e,t)=>{let[n,r]=t;return e[`set${lk(n)}`]=this.createSetFontSize(n,r),e}),{})}createSetFontSize(e,t){return n=>{var r;const o=null===(r=this.props.fontSizes)||void 0===r?void 0:r.find((e=>{let{size:t}=e;return t===Number(n)}));this.props.setAttributes({[e]:o&&o.slug?o.slug:void 0,[t]:o&&o.slug?void 0:n})}}static getDerivedStateFromProps(e,t){let{attributes:n,fontSizes:o}=e;const i=(e,r)=>!t[r]||(n[r]?n[r]!==t[r].slug:t[r].size!==n[e]);if(!Object.values(r).some(i))return null;const l=Object.entries(r).filter((e=>{let[t,n]=e;return i(n,t)})).reduce(((e,t)=>{let[r,i]=t;const l=n[r],a=xb(o,l,n[i]);return e[r]={...a,class:Pb(l)},e}),{});return{...t,...l}}render(){return(0,u.createElement)(e,c({},this.props,{fontSizes:void 0},this.state,this.setters))}}]),"withFontSizes")};var sk=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M4 19.8h8.9v-1.5H4v1.5zm8.9-15.6H4v1.5h8.9V4.2zm-8.9 7v1.5h16v-1.5H4z"}));var ck=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M16.4 4.2H7.6v1.5h8.9V4.2zM4 11.2v1.5h16v-1.5H4zm3.6 8.6h8.9v-1.5H7.6v1.5z"}));var uk=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M11.1 19.8H20v-1.5h-8.9v1.5zm0-15.6v1.5H20V4.2h-8.9zM4 12.8h16v-1.5H4v1.5z"}));const pk=[{icon:sk,title:(0,_.__)("Align text left"),align:"left"},{icon:ck,title:(0,_.__)("Align text center"),align:"center"},{icon:uk,title:(0,_.__)("Align text right"),align:"right"}],dk={position:"bottom right",variant:"toolbar"};var fk=function(e){let{value:t,onChange:n,alignmentControls:r=pk,label:o=(0,_.__)("Align text"),describedBy:i=(0,_.__)("Change text alignment"),isCollapsed:l=!0,isToolbar:a}=e;function s(e){return()=>n(t===e?void 0:e)}const p=r.find((e=>e.align===t)),d=a?g.ToolbarGroup:g.ToolbarDropdownMenu,f=a?{isCollapsed:l}:{toggleProps:{describedBy:i},popoverProps:dk};return(0,u.createElement)(d,c({icon:p?p.icon:(0,_.isRTL)()?uk:sk,label:o,controls:r.map((e=>{const{align:n}=e,r=t===n;return{...e,isActive:r,role:l?"menuitemradio":void 0,onClick:s(n)}}))},f))};const mk=e=>(0,u.createElement)(fk,c({},e,{isToolbar:!1})),yk=e=>(0,u.createElement)(fk,c({},e,{isToolbar:!0})),gk=()=>{};var hk={name:"blocks",className:"block-editor-autocompleters__block",triggerPrefix:"/",useItems(e){const{rootClientId:t,selectedBlockName:n}=(0,m.useSelect)((e=>{const{getSelectedBlockClientId:t,getBlockName:n,getBlockInsertionPoint:r}=e(xr),o=t();return{selectedBlockName:o?n(o):null,rootClientId:r().rootClientId}}),[]),[r,o,i]=yf(t,gk),l=(0,u.useMemo)((()=>(e.trim()?Kf(r,o,i,e):J(r,"frecency","desc")).filter((e=>e.name!==n)).slice(0,9)),[e,n,r,o,i]),a=(0,u.useMemo)((()=>l.map((e=>{const{title:t,icon:n,isDisabled:r}=e;return{key:`block-${e.id}`,value:e,label:(0,u.createElement)(u.Fragment,null,(0,u.createElement)(hp,{key:"icon",icon:n,showColors:!0}),t),isDisabled:r}}))),[l]);return[a]},allowContext(e,t){return!(/\S/.test(e)||/\S/.test(t))},getOptionCompletion(e){const{name:t,initialAttributes:n,innerBlocks:r}=e;return{action:"replace",value:(0,a.createBlock)(t,n,(0,a.createBlocksFromInnerBlocksTemplate)(r))}}},vk=window.wp.apiFetch,bk=n.n(vk);var _k=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M7 5.5h10a.5.5 0 01.5.5v12a.5.5 0 01-.5.5H7a.5.5 0 01-.5-.5V6a.5.5 0 01.5-.5zM17 4H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V6a2 2 0 00-2-2zm-1 3.75H8v1.5h8v-1.5zM8 11h8v1.5H8V11zm6 3.25H8v1.5h6v-1.5z"}));var kk=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"m7.3 9.7 1.4 1.4c.2-.2.3-.3.4-.5 0 0 0-.1.1-.1.3-.5.4-1.1.3-1.6L12 7 9 4 7.2 6.5c-.6-.1-1.1 0-1.6.3 0 0-.1 0-.1.1-.3.1-.4.2-.6.4l1.4 1.4L4 11v1h1l2.3-2.3zM4 20h9v-1.5H4V20zm0-5.5V16h16v-1.5H4z"}));var Ek={name:"links",className:"block-editor-autocompleters__link",triggerPrefix:"[[",options:async e=>{let t=await bk()({path:(0,sm.addQueryArgs)("/wp/v2/search",{per_page:10,search:e,type:"post",order_by:"menu_order"})});return t=t.filter((e=>""!==e.title)),t},getOptionKeywords(e){return[...e.title.split(/\s+/)]},getOptionLabel(e){return(0,u.createElement)(u.Fragment,null,(0,u.createElement)(Xi,{key:"icon",icon:"page"===e.subtype?_k:kk}),e.title)},getOptionCompletion(e){return(0,u.createElement)("a",{href:e.url},e.title)}};const Sk=[];function wk(e){let{completers:t=Sk}=e;const{name:n}=Nr();return(0,u.useMemo)((()=>{let e=[...t,Ek];return(n===(0,a.getDefaultBlockName)()||(0,a.getBlockSupport)(n,"__experimentalSlashInserter",!1))&&(e=[...e,hk]),(0,s.hasFilter)("editor.Autocomplete.completers")&&(e===t&&(e=e.map((e=>({...e})))),e=(0,s.applyFilters)("editor.Autocomplete.completers",e,n)),e}),[t,n])}var Ck=function(e){return(0,u.createElement)(g.Autocomplete,c({},e,{completers:wk(e)}))};var Ik=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M4.2 9h1.5V5.8H9V4.2H4.2V9zm14 9.2H15v1.5h4.8V15h-1.5v3.2zM15 4.2v1.5h3.2V9h1.5V4.2H15zM5.8 15H4.2v4.8H9v-1.5H5.8V15z"}));var Ak=function(e){let{isActive:t,label:n=(0,_.__)("Toggle full height"),onToggle:r,isDisabled:o}=e;return(0,u.createElement)(g.ToolbarButton,{isActive:t,icon:Ik,label:n,onClick:()=>r(!t),disabled:o})};const xk=()=>{};var Bk=function(e){const{label:t=(0,_.__)("Change matrix alignment"),onChange:n=xk,value:r="center",isDisabled:o}=e,i=(0,u.createElement)(g.__experimentalAlignmentMatrixControl.Icon,{value:r});return(0,u.createElement)(g.Dropdown,{popoverProps:{variant:"toolbar",placement:"bottom-start"},renderToggle:e=>{let{onToggle:n,isOpen:r}=e;return(0,u.createElement)(g.ToolbarButton,{onClick:n,"aria-haspopup":"true","aria-expanded":r,onKeyDown:e=>{r||e.keyCode!==Xu.DOWN||(e.preventDefault(),n())},label:t,icon:i,showTooltip:!0,disabled:o})},renderContent:()=>(0,u.createElement)(g.__experimentalAlignmentMatrixControl,{hasFocusBorder:!1,onChange:n,value:r})})};var Pk=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M10.8622 8.04053L14.2805 12.0286L10.8622 16.0167L9.72327 15.0405L12.3049 12.0286L9.72327 9.01672L10.8622 8.04053Z"}));var Tk=function(e){let{rootLabelText:t}=e;const{selectBlock:n,clearSelectedBlock:r}=(0,m.useDispatch)(xr),{clientId:o,parents:i,hasSelection:l}=(0,m.useSelect)((e=>{const{getSelectionStart:t,getSelectedBlockClientId:n,getBlockParents:r}=e(xr),o=n();return{parents:r(o),clientId:o,hasSelection:!!t().clientId}}),[]),a=t||(0,_.__)("Document");return(0,u.createElement)("ul",{className:"block-editor-block-breadcrumb",role:"list","aria-label":(0,_.__)("Block breadcrumb")},(0,u.createElement)("li",{className:l?void 0:"block-editor-block-breadcrumb__current","aria-current":l?void 0:"true"},l&&(0,u.createElement)(g.Button,{className:"block-editor-block-breadcrumb__button",variant:"tertiary",onClick:r},a),!l&&a,!!o&&(0,u.createElement)(Xi,{icon:Pk,className:"block-editor-block-breadcrumb__separator"})),i.map((e=>(0,u.createElement)("li",{key:e},(0,u.createElement)(g.Button,{className:"block-editor-block-breadcrumb__button",variant:"tertiary",onClick:()=>n(e)},(0,u.createElement)(uy,{clientId:e,maximumLength:35})),(0,u.createElement)(Xi,{icon:Pk,className:"block-editor-block-breadcrumb__separator"})))),!!o&&(0,u.createElement)("li",{className:"block-editor-block-breadcrumb__current","aria-current":"true"},(0,u.createElement)(uy,{clientId:o,maximumLength:35})))};const Ok=()=>(0,u.createElement)(g.SVG,{xmlns:"https://www.w3.org/2000/svg",viewBox:"0 0 20 20"},(0,u.createElement)(g.Path,{d:"M7.434 5l3.18 9.16H8.538l-.692-2.184H4.628l-.705 2.184H2L5.18 5h2.254zm-1.13 1.904h-.115l-1.148 3.593H7.44L6.304 6.904zM14.348 7.006c1.853 0 2.9.876 2.9 2.374v4.78h-1.79v-.914h-.114c-.362.64-1.123 1.022-2.031 1.022-1.346 0-2.292-.826-2.292-2.108 0-1.27.972-2.006 2.71-2.107l1.696-.102V9.38c0-.584-.42-.914-1.18-.914-.667 0-1.112.228-1.264.647h-1.701c.12-1.295 1.307-2.107 3.066-2.107zm1.079 4.1l-1.416.09c-.793.056-1.18.342-1.18.844 0 .52.45.837 1.091.837.857 0 1.505-.545 1.505-1.256v-.515z"})),Nk=e=>{let{style:t,className:n}=e;return(0,u.createElement)("div",{className:"block-library-colors-selector__icon-container"},(0,u.createElement)("div",{className:`${n} block-library-colors-selector__state-selection`,style:t},(0,u.createElement)(Ok,null)))},Mk=e=>{let{TextColor:t,BackgroundColor:n}=e;return e=>{let{onToggle:r,isOpen:o}=e;return(0,u.createElement)(g.ToolbarGroup,null,(0,u.createElement)(g.ToolbarButton,{className:"components-toolbar__control block-library-colors-selector__toggle",label:(0,_.__)("Open Colors Selector"),onClick:r,onKeyDown:e=>{o||e.keyCode!==Xu.DOWN||(e.preventDefault(),r())},icon:(0,u.createElement)(n,null,(0,u.createElement)(t,null,(0,u.createElement)(Nk,null)))}))}};var Rk=e=>{let{children:t,...n}=e;return $()("wp.blockEditor.BlockColorsStyleSelector",{alternative:"block supports API",since:"6.1",version:"6.3"}),(0,u.createElement)(g.Dropdown,{popoverProps:{placement:"bottom-start"},className:"block-library-colors-selector",contentClassName:"block-library-colors-selector__popover",renderToggle:Mk(n),renderContent:()=>t})};var Fk=(0,u.createElement)(V.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,u.createElement)(V.Path,{d:"M13.8 5.2H3v1.5h10.8V5.2zm-3.6 12v1.5H21v-1.5H10.2zm7.2-6H6.6v1.5h10.8v-1.5z"}));const Lk=Fu(g.__experimentalTreeGridRow);var Dk=(0,u.forwardRef)(((e,t)=>{let{isSelected:n,position:r,level:o,rowCount:i,children:l,className:a,path:s,...p}=e;const m=Uu({isSelected:n,adjustScrolling:!1,enableAnimation:!0,triggerAnimationOnChange:s}),y=(0,f.useMergeRefs)([t,m]);return(0,u.createElement)(Lk,c({ref:y,className:d()("block-editor-list-view-leaf",a),level:o,positionInSet:r,setSize:i},p),l)}));var Uk=(0,u.createElement)(V.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,u.createElement)(V.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M15 11h-.2V9c0-1.5-1.2-2.8-2.8-2.8S9.2 7.5 9.2 9v2H9c-.6 0-1 .4-1 1v4c0 .6.4 1 1 1h6c.6 0 1-.4 1-1v-4c0-.6-.4-1-1-1zm-1.8 0h-2.5V9c0-.7.6-1.2 1.2-1.2s1.2.6 1.2 1.2v2z"}));var jk=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"m13.1 16-3.4-4 3.4-4 1.1 1-2.6 3 2.6 3-1.1 1z"}));function zk(e){let{onClick:t}=e;return(0,u.createElement)("span",{className:"block-editor-list-view__expander",onClick:e=>t(e,{forceToggle:!0}),"aria-hidden":"true"},(0,u.createElement)(Xi,{icon:(0,_.isRTL)()?jk:Pk}))}var Vk=(0,u.forwardRef)((function(e,t){let{className:n,block:{clientId:r},onClick:o,onToggleExpanded:i,tabIndex:l,onFocus:a,onDragStart:s,onDragEnd:c,draggable:p}=e;const f=sy(r),m=cy({clientId:r,context:"list-view"}),{isLocked:y}=Pg(r);return(0,u.createElement)(u.Fragment,null,(0,u.createElement)(g.Button,{className:d()("block-editor-list-view-block-select-button",n),onClick:o,onKeyDown:function(e){e.keyCode!==Xu.ENTER&&e.keyCode!==Xu.SPACE||o(e)},ref:t,tabIndex:l,onFocus:a,onDragStart:e=>{e.dataTransfer.clearData(),null==s||s(e)},onDragEnd:c,draggable:p,href:`#block-${r}`,"aria-hidden":!0},(0,u.createElement)(zk,{onClick:i}),(0,u.createElement)(hp,{icon:null==f?void 0:f.icon,showColors:!0}),(0,u.createElement)(g.__experimentalHStack,{alignment:"center",className:"block-editor-list-view-block-select-button__label-wrapper",justify:"flex-start",spacing:1},(0,u.createElement)("span",{className:"block-editor-list-view-block-select-button__title"},(0,u.createElement)(g.__experimentalTruncate,{ellipsizeMode:"auto"},m)),(null==f?void 0:f.anchor)&&(0,u.createElement)("span",{className:"block-editor-list-view-block-select-button__anchor-wrapper"},(0,u.createElement)(g.__experimentalTruncate,{className:"block-editor-list-view-block-select-button__anchor",ellipsizeMode:"auto"},f.anchor)),y&&(0,u.createElement)("span",{className:"block-editor-list-view-block-select-button__lock"},(0,u.createElement)(Xi,{icon:Uk})))))}));const Gk=(0,u.forwardRef)(((e,t)=>{let{onClick:n,onToggleExpanded:r,block:o,isSelected:i,position:l,siblingBlockCount:a,level:s,isExpanded:p,selectedClientIds:f,...y}=e;const{clientId:g}=o,{blockMovingClientId:h,selectedBlockInBlockEditor:v}=(0,m.useSelect)((e=>{const{hasBlockMovingClientId:t,getSelectedBlockClientId:n}=e(xr);return{blockMovingClientId:t(),selectedBlockInBlockEditor:n()}}),[g]),b=h&&v===g,_=d()("block-editor-list-view-block-contents",{"is-dropping-before":b}),k=f.includes(g)?f:[g];return(0,u.createElement)(py,{clientIds:k},(e=>{let{draggable:d,onDragStart:f,onDragEnd:m}=e;return(0,u.createElement)(Vk,c({ref:t,className:_,block:o,onClick:n,onToggleExpanded:r,isSelected:i,position:l,siblingBlockCount:a,level:s,draggable:d,onDragStart:f,onDragEnd:m,isExpanded:p},y))}))}));var Hk=Gk;const Wk=(0,u.createContext)({}),$k=()=>(0,u.useContext)(Wk);var Kk=(0,u.memo)((function e(t){let{block:n,isDragged:r,isSelected:o,isBranchSelected:i,selectBlock:l,position:s,level:c,rowCount:p,siblingBlockCount:y,showBlockMovers:h,path:v,isExpanded:b,selectedClientIds:k,preventAnnouncement:E,isSyncedBranch:S}=t;const w=(0,u.useRef)(null),C=(0,u.useRef)(null),[I,A]=(0,u.useState)(!1),{clientId:x}=n,{isLocked:B,isContentLocked:P,canEdit:T}=Pg(x),O=(0,m.useSelect)((e=>!o&&(!!P&&e(xr).hasSelectedInnerBlock(x,!0))),[P,x,o]),N=!P&&T,M=O||o&&k[0]===x,R=O||o&&k[k.length-1]===x,{toggleBlockHighlight:F}=(0,m.useDispatch)(xr),L=sy(x),D=(0,m.useSelect)((e=>e(xr).getBlockName(x)),[x]),U=(0,a.hasBlockSupport)(D,"__experimentalToolbar",!0),j=`list-view-block-select-button__${(0,f.useInstanceId)(e)}`,z=((e,t,n)=>(0,_.sprintf)((0,_.__)("Block %1$d of %2$d, Level %3$d"),e,t,n))(s,y,c);let V=(0,_.__)("Link");L&&(V=B?(0,_.sprintf)((0,_.__)("%s link (locked)"),L.title):(0,_.sprintf)((0,_.__)("%s link"),L.title));const G=L?(0,_.sprintf)((0,_.__)("Options for %s block"),L.title):(0,_.__)("Options"),{isTreeGridMounted:H,expand:W,collapse:$}=$k(),K=h&&y>0,q=d()("block-editor-list-view-block__mover-cell",{"is-visible":I||o}),J=d()("block-editor-list-view-block__menu-cell",{"is-visible":I||M});(0,u.useEffect)((()=>{!H&&o&&w.current.focus()}),[]);const Y=(0,u.useCallback)((()=>{A(!0),F(x,!0)}),[x,A,F]),Q=(0,u.useCallback)((()=>{A(!1),F(x,!1)}),[x,A,F]),Z=(0,u.useCallback)((e=>{l(e,x),e.preventDefault()}),[x,l]),X=(0,u.useCallback)((e=>{l(void 0,e)}),[l]),ee=(0,u.useCallback)((e=>{e.preventDefault(),e.stopPropagation(),!0===b?$(x):!1===b&&W(x)}),[x,W,$,b]);let te;K?te=2:U||(te=3);const ne=d()({"is-selected":o||O,"is-first-selected":M,"is-last-selected":R,"is-branch-selected":i,"is-synced-branch":S,"is-dragging":r,"has-single-cell":!U,"is-synced":null==L?void 0:L.isSynced}),re=k.includes(x)?k:[x];return function(e){let{isSelected:t,selectedClientIds:n,rowItemRef:r}=e;const o=1===n.length;(0,u.useLayoutEffect)((()=>{if(!t||!o||!r.current)return;const e=(0,Ml.getScrollContainer)(r.current),{ownerDocument:n}=r.current;if(e===n.body||e===n.documentElement||!e)return;const i=r.current.getBoundingClientRect(),l=e.getBoundingClientRect();(i.top<l.top||i.bottom>l.bottom)&&r.current.scrollIntoView()}),[t,o,r])}({isSelected:o,rowItemRef:C,selectedClientIds:k}),(0,u.createElement)(Dk,{className:ne,onMouseEnter:Y,onMouseLeave:Q,onFocus:Y,onBlur:Q,level:c,position:s,rowCount:p,path:v,id:`list-view-block-${x}`,"data-block":x,isExpanded:N?b:void 0,"aria-selected":!!o||O,ref:C},(0,u.createElement)(g.__experimentalTreeGridCell,{className:"block-editor-list-view-block__contents-cell",colSpan:te,ref:w,"aria-label":V,"aria-selected":!!o||O,"aria-expanded":N?b:void 0,"aria-describedby":j},(e=>{let{ref:t,tabIndex:r,onFocus:i}=e;return(0,u.createElement)("div",{className:"block-editor-list-view-block__contents-container"},(0,u.createElement)(Hk,{block:n,onClick:Z,onToggleExpanded:ee,isSelected:o,position:s,siblingBlockCount:y,level:c,ref:t,tabIndex:r,onFocus:i,isExpanded:b,selectedClientIds:k,preventAnnouncement:E}),(0,u.createElement)("div",{className:"block-editor-list-view-block-select-button__description",id:j},z))})),K&&(0,u.createElement)(u.Fragment,null,(0,u.createElement)(g.__experimentalTreeGridCell,{className:q,withoutGridItem:!0},(0,u.createElement)(g.__experimentalTreeGridItem,null,(e=>{let{ref:t,tabIndex:n,onFocus:r}=e;return(0,u.createElement)(by,{orientation:"vertical",clientIds:[x],ref:t,tabIndex:n,onFocus:r})})),(0,u.createElement)(g.__experimentalTreeGridItem,null,(e=>{let{ref:t,tabIndex:n,onFocus:r}=e;return(0,u.createElement)(_y,{orientation:"vertical",clientIds:[x],ref:t,tabIndex:n,onFocus:r})})))),U&&(0,u.createElement)(g.__experimentalTreeGridCell,{className:J,"aria-selected":!!o||O},(e=>{let{ref:t,tabIndex:n,onFocus:r}=e;return(0,u.createElement)(Wg,{clientIds:re,icon:dm,label:G,toggleProps:{ref:t,className:"block-editor-list-view-block__menu",tabIndex:n,onFocus:r},disableOpenOnArrowDown:!0,__experimentalSelectBlock:X})})))}));function qk(e,t,n,r){var o;if(null==n?void 0:n.includes(e.clientId))return 0;return(null!==(o=t[e.clientId])&&void 0!==o?o:r)?1+e.innerBlocks.reduce(Jk(t,n,r),0):1}const Jk=(e,t,n)=>(r,o)=>{var i;if(null==t?void 0:t.includes(o.clientId))return r;return(null!==(i=e[o.clientId])&&void 0!==i?i:n)&&o.innerBlocks.length>0?r+qk(o,e,t,n):r+1},Yk=()=>{};var Qk=(0,u.memo)((function e(t){const{blocks:n,selectBlock:r=Yk,showBlockMovers:o,selectedClientIds:i,level:l=1,path:a="",isBranchSelected:s=!1,listPosition:c=0,fixedListWindow:p,isExpanded:d,parentId:f,shouldShowInnerBlocks:y=!0,isSyncedBranch:g=!1}=t,h=sy(f),v=g||!(null==h||!h.isSynced),b=(0,m.useSelect)((e=>{if(!f)return!0;const t="contentOnly"===e(xr).getTemplateLock(f),n=e(xr).canEditBlock(f);return!t&&n}),[f]),{expandedState:_,draggedClientIds:k}=$k();if(!b)return null;const E=n.filter(Boolean),S=E.length;let w=c;return(0,u.createElement)(u.Fragment,null,E.map(((t,n)=>{var c;const{clientId:f,innerBlocks:g}=t;n>0&&(w+=qk(E[n-1],_,k,d));const{itemInView:h}=p,b=h(w),C=n+1,I=a.length>0?`${a}_${C}`:`${C}`,A=!(null==g||!g.length),x=A&&y?null!==(c=_[f])&&void 0!==c?c:d:void 0,B=!(null==k||!k.includes(f)),P=((e,t)=>Array.isArray(t)&&t.length?-1!==t.indexOf(e):t===e)(f,i),T=s||P&&A,O=B||b||P;return(0,u.createElement)(m.AsyncModeProvider,{key:f,value:!P},O&&(0,u.createElement)(Kk,{block:t,selectBlock:r,isSelected:P,isBranchSelected:T,isDragged:B,level:l,position:C,rowCount:S,siblingBlockCount:S,showBlockMovers:o,path:I,isExpanded:x,listPosition:w,selectedClientIds:i,isSyncedBranch:v}),!O&&(0,u.createElement)("tr",null,(0,u.createElement)("td",{className:"block-editor-list-view-placeholder"})),A&&x&&!B&&(0,u.createElement)(e,{parentId:f,blocks:g,selectBlock:r,showBlockMovers:o,level:l+1,path:I,listPosition:w+1,fixedListWindow:p,isBranchSelected:T,selectedClientIds:i,isExpanded:d,isSyncedBranch:v}))})))}));function Zk(e){let{listViewRef:t,blockDropTarget:n}=e;const{rootClientId:r,clientId:o,dropPosition:i}=n||{},[l,a]=(0,u.useMemo)((()=>{if(!t.current)return[];return[r?t.current.querySelector(`[data-block="${r}"]`):void 0,o?t.current.querySelector(`[data-block="${o}"]`):void 0]}),[r,o]),s=a||l,c=(0,u.useCallback)((()=>{if(!l)return 0;const e=s.getBoundingClientRect();return l.querySelector(".block-editor-block-icon").getBoundingClientRect().right-e.left}),[l,s]),p=(0,u.useMemo)((()=>{if(!s)return{};const e=c();return{width:s.offsetWidth-e}}),[c,s]),d=(0,u.useMemo)((()=>{if(s&&("top"===i||"bottom"===i||"inside"===i))return{ownerDocument:s.ownerDocument,getBoundingClientRect(){const e=s.getBoundingClientRect(),t=c(),n=e.left+t,r=e.right;let o=0,l=0;"top"===i?(o=e.top,l=e.top):(o=e.bottom,l=e.bottom);const a=r-n,u=l-o;return new window.DOMRect(n,o,a,u)}}}),[s,i,c]);return s?(0,u.createElement)(g.Popover,{animate:!1,anchor:d,focusOnMount:!1,className:"block-editor-list-view-drop-indicator",variant:"unstyled"},(0,u.createElement)("div",{style:p,className:"block-editor-list-view-drop-indicator__line"})):null}function Xk(){const{clearSelectedBlock:e,multiSelect:t,selectBlock:n}=(0,m.useDispatch)(xr),{getBlockName:r,getBlockParents:o,getBlockSelectionStart:i,getBlockSelectionEnd:l,getSelectedBlockClientIds:s,hasMultiSelection:c,hasSelectedBlock:p}=(0,m.useSelect)(xr),{getBlockType:d}=(0,m.useSelect)(a.store),f=(0,u.useCallback)((async(l,a,u)=>{if(null==l||!l.shiftKey)return void n(a);l.preventDefault();const f="keydown"===l.type&&(l.keyCode===Xu.UP||l.keyCode===Xu.DOWN||l.keyCode===Xu.HOME||l.keyCode===Xu.END);if(!f&&!p()&&!c())return void n(a,null);const m=s(),y=[...o(a),a];f&&!m.some((e=>y.includes(e)))&&await e();let g=i(),h=a;f&&(p()||c()||(g=a),u&&(h=u));const v=o(g),b=o(h),{start:k,end:E}=function(e,t,n,r){const o=[...n,e],i=[...r,t],l=Math.min(o.length,i.length)-1;return{start:o[l],end:i[l]}}(g,h,v,b);await t(k,E,null);const S=s();if((l.keyCode===Xu.HOME||l.keyCode===Xu.END)&&S.length>1)return;const w=m.filter((e=>!S.includes(e)));let C;if(1===w.length){var I;const e=null===(I=d(r(w[0])))||void 0===I?void 0:I.title;e&&(C=(0,_.sprintf)((0,_.__)("%s deselected."),e))}else w.length>1&&(C=(0,_.sprintf)((0,_.__)("%s blocks deselected."),w.length));C&&(0,dn.speak)(C)}),[e,r,d,o,i,l,s,c,p,t,n]);return{updateBlockSelection:f}}const eE=["top","bottom"];function tE(){const{getBlockRootClientId:e,getBlockIndex:t,getBlockCount:n,getDraggedBlockClientIds:r,canInsertBlocks:o}=(0,m.useSelect)(xr),[i,l]=(0,u.useState)(),{rootClientId:a,blockIndex:s}=i||{},c=Nh(a,s),p=r(),d=(0,f.useThrottle)((0,u.useCallback)(((r,i)=>{const a={x:r.clientX,y:r.clientY},s=!(null==p||!p.length),c=function(e,t){let n,r,o,i;for(const l of e){if(l.isDraggedBlock)continue;const a=l.element.getBoundingClientRect(),[s,c]=Rh(t,a,eE),u=Fh(t,a);if(void 0===o||s<o||u){o=s;const t=e.indexOf(l),p=e[t-1];if("top"===c&&p&&p.rootClientId===l.rootClientId&&!p.isDraggedBlock?(r=p,n="bottom",i=p.element.getBoundingClientRect()):(r=l,n=c,i=a),u)break}}if(!r)return;const l="bottom"===n;if(l&&r.canInsertDraggedBlocksAsChild&&(r.innerBlockCount>0||function(e,t){const n=t.left+t.width/2;return e.x>n}(t,i)))return{rootClientId:r.clientId,blockIndex:0,dropPosition:"inside"};if(!r.canInsertDraggedBlocksAsSibling)return;const a=l?1:0;return{rootClientId:r.rootClientId,clientId:r.clientId,blockIndex:r.blockIndex+a,dropPosition:n}}(Array.from(i.querySelectorAll("[data-block]")).map((r=>{const i=r.dataset.block,l=e(i);return{clientId:i,rootClientId:l,blockIndex:t(i),element:r,isDraggedBlock:!!s&&p.includes(i),innerBlockCount:n(i),canInsertDraggedBlocksAsSibling:!s||o(p,l),canInsertDraggedBlocksAsChild:!s||o(p,i)}})),a);c&&l(c)}),[p]),200);return{ref:(0,f.__experimentalUseDropZone)({onDrop:c,onDragOver(e){d(e,e.currentTarget)},onDragEnd(){d.cancel(),l(null)}}),target:i}}const nE=(e,t)=>Array.isArray(t.clientIds)?{...e,...t.clientIds.reduce(((e,n)=>({...e,[n]:"expand"===t.type})),{})}:e;var rE=(0,u.forwardRef)((function(e,t){let{id:n,blocks:r,showBlockMovers:o=!1,isExpanded:i=!1}=e;const{clientIdsTree:l,draggedClientIds:a,selectedClientIds:s}=function(e){return(0,m.useSelect)((t=>{const{getDraggedBlockClientIds:n,getSelectedBlockClientIds:r,__unstableGetClientIdsTree:o}=t(xr);return{selectedClientIds:r(),draggedClientIds:n(),clientIdsTree:e||o()}}),[e])}(r),{visibleBlockCount:c,shouldShowInnerBlocks:p}=(0,m.useSelect)((e=>{const{getGlobalBlockCount:t,getClientIdsOfDescendants:n,__unstableGetEditorMode:r}=e(xr),o=(null==a?void 0:a.length)>0?n(a).length+1:0;return{visibleBlockCount:t()-o,shouldShowInnerBlocks:"zoom-out"!==r()}}),[a]),{updateBlockSelection:d}=Xk(),[y,h]=(0,u.useReducer)(nE,{}),{ref:v,target:b}=tE(),k=(0,u.useRef)(),E=(0,f.useMergeRefs)([k,v,t]),S=(0,u.useRef)(!1),{setSelectedTreeId:w}=function(e){let{firstSelectedBlockClientId:t,setExpandedState:n}=e;const[r,o]=(0,u.useState)(null),{selectedBlockParentClientIds:i}=(0,m.useSelect)((e=>{const{getBlockParents:n}=e(xr);return{selectedBlockParentClientIds:n(t,!1)}}),[t]),l=Array.isArray(i)&&i.length?i:null;return(0,u.useEffect)((()=>{r!==t&&l&&n({type:"expand",clientIds:i})}),[t]),{setSelectedTreeId:o}}({firstSelectedBlockClientId:s[0],setExpandedState:h}),C=(0,u.useCallback)(((e,t)=>{d(e,t),w(t)}),[w,d]);(0,u.useEffect)((()=>{S.current=!0}),[]);const[I]=(0,f.__experimentalUseFixedWindowList)(k,36,c,{useWindowing:!0,windowOverscan:40}),A=(0,u.useCallback)((e=>{e&&h({type:"expand",clientIds:[e]})}),[h]),x=(0,u.useCallback)((e=>{e&&h({type:"collapse",clientIds:[e]})}),[h]),B=(0,u.useCallback)((e=>{var t;A(null==e||null===(t=e.dataset)||void 0===t?void 0:t.block)}),[A]),P=(0,u.useCallback)((e=>{var t;x(null==e||null===(t=e.dataset)||void 0===t?void 0:t.block)}),[x]),T=(0,u.useCallback)(((e,t,n)=>{var r,o;e.shiftKey&&d(e,null==t||null===(r=t.dataset)||void 0===r?void 0:r.block,null==n||null===(o=n.dataset)||void 0===o?void 0:o.block)}),[d]),O=(0,u.useMemo)((()=>({isTreeGridMounted:S.current,draggedClientIds:a,expandedState:y,expand:A,collapse:x})),[S.current,a,y,A,x]);return(0,u.createElement)(m.AsyncModeProvider,{value:!0},(0,u.createElement)(Zk,{listViewRef:k,blockDropTarget:b}),(0,u.createElement)(g.__experimentalTreeGrid,{id:n,className:"block-editor-list-view-tree","aria-label":(0,_.__)("Block navigation structure"),ref:E,onCollapseRow:P,onExpandRow:B,onFocusRow:T,applicationAriaLabel:(0,_.__)("Block navigation structure")},(0,u.createElement)(Wk.Provider,{value:O},(0,u.createElement)(Qk,{blocks:l,selectBlock:C,showBlockMovers:o,fixedListWindow:I,selectedClientIds:s,isExpanded:i,shouldShowInnerBlocks:p}))))}));function oE(e){let{isEnabled:t,onToggle:n,isOpen:r,innerRef:o,...i}=e;return(0,u.createElement)(g.Button,c({},i,{ref:o,icon:Fk,"aria-expanded":r,"aria-haspopup":"true",onClick:t?n:void 0,label:(0,_.__)("List view"),className:"block-editor-block-navigation","aria-disabled":!t}))}var iE=(0,u.forwardRef)((function(e,t){let{isDisabled:n,...r}=e;$()("wp.blockEditor.BlockNavigationDropdown",{since:"6.1",alternative:"wp.components.Dropdown and wp.blockEditor.ListView"});const o=(0,m.useSelect)((e=>!!e(xr).getBlockCount()),[])&&!n;return(0,u.createElement)(g.Dropdown,{contentClassName:"block-editor-block-navigation__popover",popoverProps:{placement:"bottom-start"},renderToggle:e=>{let{isOpen:n,onToggle:i}=e;return(0,u.createElement)(oE,c({},r,{innerRef:t,isOpen:n,onToggle:i,isEnabled:o}))},renderContent:()=>(0,u.createElement)("div",{className:"block-editor-block-navigation__container"},(0,u.createElement)("p",{className:"block-editor-block-navigation__label"},(0,_.__)("List view")),(0,u.createElement)(rE,null))})}));function lE(e){var t;let{genericPreviewBlock:n,style:r,className:o,activeStyle:i}=e;const l=null===(t=(0,a.getBlockType)(n.name))||void 0===t?void 0:t.example,s=zy(o,i,r),c=(0,u.useMemo)((()=>({...n,title:r.label||r.name,description:r.description,initialAttributes:{...n.attributes,className:s+" block-editor-block-styles__block-preview-container"},example:l})),[n,s]);return(0,u.createElement)(rf,{item:c,isStylePreview:!0})}const aE=()=>{};function sE(e){let{clientId:t,onSwitch:n=aE,onHoverClassName:r=aE}=e;const{onSelect:o,stylesToRender:i,activeStyle:l,genericPreviewBlock:a,className:s}=Gy({clientId:t,onSwitch:n}),[c,p]=(0,u.useState)(null),m=(0,f.useViewportMatch)("medium","<");if(!i||0===i.length)return null;const y=(0,f.debounce)(p,250),h=e=>{var t;c!==e?(y(e),r(null!==(t=null==e?void 0:e.name)&&void 0!==t?t:null)):y.cancel()};return(0,u.createElement)("div",{className:"block-editor-block-styles"},(0,u.createElement)("div",{className:"block-editor-block-styles__variants"},i.map((e=>{const t=e.isDefault?(0,_.__)("Default"):e.label||e.name;return(0,u.createElement)(g.Button,{className:d()("block-editor-block-styles__item",{"is-active":l.name===e.name}),key:e.name,variant:"secondary",label:t,onMouseEnter:()=>h(e),onFocus:()=>h(e),onMouseLeave:()=>h(null),onBlur:()=>h(null),onClick:()=>(e=>{o(e),r(null),p(null),y.cancel()})(e),"aria-current":l.name===e.name},(0,u.createElement)(g.__experimentalTruncate,{numberOfLines:1,className:"block-editor-block-styles__item-text"},t))}))),c&&!m&&(0,u.createElement)(g.Popover,{placement:"left-start",offset:20},(0,u.createElement)("div",{className:"block-editor-block-styles__preview-panel",onMouseLeave:()=>h(null)},(0,u.createElement)(lE,{activeStyle:l,className:s,genericPreviewBlock:a,style:c}))))}var cE=sE;sE.Slot=()=>($()("BlockStyles.Slot",{version:"6.4",since:"6.2"}),null);var uE=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{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"}));var pE=function(e){let{icon:t=uE,label:n=(0,_.__)("Choose variation"),instructions:r=(0,_.__)("Select a variation to start with."),variations:o,onSelect:i,allowSkip:l}=e;const a=d()("block-editor-block-variation-picker",{"has-many-variations":o.length>4});return(0,u.createElement)(g.Placeholder,{icon:t,label:n,instructions:r,className:a},(0,u.createElement)("ul",{className:"block-editor-block-variation-picker__variations",role:"list","aria-label":(0,_.__)("Block variations")},o.map((e=>(0,u.createElement)("li",{key:e.name},(0,u.createElement)(g.Button,{variant:"secondary",icon:e.icon&&e.icon.src?e.icon.src:e.icon,iconSize:48,onClick:()=>i(e),className:"block-editor-block-variation-picker__variation",label:e.description||e.title}),(0,u.createElement)("span",{className:"block-editor-block-variation-picker__variation-label"},e.title))))),l&&(0,u.createElement)("div",{className:"block-editor-block-variation-picker__skip"},(0,u.createElement)(g.Button,{variant:"link",onClick:()=>i()},(0,_.__)("Skip"))))};var dE=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{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-2zm-7.8 16.5H5c-.3 0-.5-.2-.5-.5v-6.2h6.8v6.7zm0-8.3H4.5V5c0-.3.2-.5.5-.5h6.2v6.7zm8.3 7.8c0 .3-.2.5-.5.5h-6.2v-6.8h6.8V19zm0-7.8h-6.8V4.5H19c.3 0 .5.2.5.5v6.2z",fillRule:"evenodd",clipRule:"evenodd"}));const fE={carousel:"carousel",grid:"grid"},mE=e=>{let{onBlockPatternSelect:t}=e;return(0,u.createElement)("div",{className:"block-editor-block-pattern-setup__actions"},(0,u.createElement)(g.Button,{variant:"primary",onClick:t},(0,_.__)("Choose")))},yE=e=>{let{handlePrevious:t,handleNext:n,activeSlide:r,totalSlides:o}=e;return(0,u.createElement)("div",{className:"block-editor-block-pattern-setup__navigation"},(0,u.createElement)(g.Button,{icon:yp,label:(0,_.__)("Previous pattern"),onClick:t,disabled:0===r}),(0,u.createElement)(g.Button,{icon:mp,label:(0,_.__)("Next pattern"),onClick:n,disabled:r===o-1}))};var gE=e=>{let{viewMode:t,setViewMode:n,handlePrevious:r,handleNext:o,activeSlide:i,totalSlides:l,onBlockPatternSelect:a}=e;const s=t===fE.carousel,c=(0,u.createElement)("div",{className:"block-editor-block-pattern-setup__display-controls"},(0,u.createElement)(g.Button,{icon:vl,label:(0,_.__)("Carousel view"),onClick:()=>n(fE.carousel),isPressed:s}),(0,u.createElement)(g.Button,{icon:dE,label:(0,_.__)("Grid view"),onClick:()=>n(fE.grid),isPressed:t===fE.grid}));return(0,u.createElement)("div",{className:"block-editor-block-pattern-setup__toolbar"},s&&(0,u.createElement)(yE,{handlePrevious:r,handleNext:o,activeSlide:i,totalSlides:l}),c,s&&(0,u.createElement)(mE,{onBlockPatternSelect:a}))};var hE=function(e,t,n){return(0,m.useSelect)((r=>{const{getBlockRootClientId:o,getPatternsByBlockTypes:i,__experimentalGetAllowedPatterns:l}=r(xr),a=o(e);return n?l(a).filter(n):i(t,a)}),[e,t,n])};const vE=e=>{let{viewMode:t,activeSlide:n,patterns:r,onBlockPatternSelect:o,showTitles:i}=e;const l=(0,g.__unstableUseCompositeState)(),a="block-editor-block-pattern-setup__container";if(t===fE.carousel){const e=new Map([[n,"active-slide"],[n-1,"previous-slide"],[n+1,"next-slide"]]);return(0,u.createElement)("div",{className:"block-editor-block-pattern-setup__carousel"},(0,u.createElement)("div",{className:a},(0,u.createElement)("ul",{className:"carousel-container"},r.map(((t,n)=>(0,u.createElement)(_E,{className:e.get(n)||"",key:t.name,pattern:t}))))))}return(0,u.createElement)("div",{className:"block-editor-block-pattern-setup__grid"},(0,u.createElement)(g.__unstableComposite,c({},l,{role:"listbox",className:a,"aria-label":(0,_.__)("Patterns list")}),r.map((e=>(0,u.createElement)(bE,{key:e.name,pattern:e,onSelect:o,composite:l,showTitles:i})))))};function bE(e){let{pattern:t,onSelect:n,composite:r,showTitles:o}=e;const i="block-editor-block-pattern-setup-list",{blocks:l,description:a,viewportWidth:s=700}=t,p=(0,f.useInstanceId)(bE,`${i}__item-description`);return(0,u.createElement)("div",{className:`${i}__list-item`,"aria-label":t.title,"aria-describedby":t.description?p:void 0},(0,u.createElement)(g.__unstableCompositeItem,c({role:"option",as:"div"},r,{className:`${i}__item`,onClick:()=>n(l)}),(0,u.createElement)(tf,{blocks:l,viewportWidth:s}),o&&(0,u.createElement)("div",{className:`${i}__item-title`},t.title),!!a&&(0,u.createElement)(g.VisuallyHidden,{id:p},a)))}function _E(e){let{className:t,pattern:n,minHeight:r}=e;const{blocks:o,title:i,description:l}=n,a=(0,f.useInstanceId)(_E,"block-editor-block-pattern-setup-list__item-description");return(0,u.createElement)("li",{className:`pattern-slide ${t}`,"aria-label":i,"aria-describedby":l?a:void 0},(0,u.createElement)(tf,{blocks:o,minHeight:r}),!!l&&(0,u.createElement)(g.VisuallyHidden,{id:a},l))}var kE=e=>{let{clientId:t,blockName:n,filterPatternsFn:r,onBlockPatternSelect:o,initialViewMode:i=fE.carousel,showTitles:l=!1}=e;const[s,c]=(0,u.useState)(i),[p,d]=(0,u.useState)(0),{replaceBlock:f}=(0,m.useDispatch)(xr),y=hE(t,n,r);if(null==y||!y.length)return null;const g=o||(e=>{const n=e.map((e=>(0,a.cloneBlock)(e)));f(t,n)});return(0,u.createElement)(u.Fragment,null,(0,u.createElement)("div",{className:`block-editor-block-pattern-setup view-mode-${s}`},(0,u.createElement)(vE,{viewMode:s,activeSlide:p,patterns:y,onBlockPatternSelect:g,showTitles:l}),(0,u.createElement)(gE,{viewMode:s,setViewMode:c,activeSlide:p,totalSlides:y.length,handleNext:()=>{d((e=>e+1))},handlePrevious:()=>{d((e=>e-1))},onBlockPatternSelect:()=>{g(y[p].blocks)}})))};function EE(e){let{className:t,onSelectVariation:n,selectedValue:r,variations:o}=e;return(0,u.createElement)("fieldset",{className:t},(0,u.createElement)(g.VisuallyHidden,{as:"legend"},(0,_.__)("Transform to variation")),o.map((e=>(0,u.createElement)(g.Button,{key:e.name,icon:(0,u.createElement)(hp,{icon:e.icon,showColors:!0}),isPressed:r===e.name,label:r===e.name?e.title:(0,_.sprintf)((0,_.__)("Transform to %s"),e.title),onClick:()=>n(e.name),"aria-label":e.title,showTooltip:!0}))))}function SE(e){let{className:t,onSelectVariation:n,selectedValue:r,variations:o}=e;const i=o.map((e=>{let{name:t,title:n,description:r}=e;return{value:t,label:n,info:r}}));return(0,u.createElement)(g.DropdownMenu,{className:t,label:(0,_.__)("Transform to variation"),text:(0,_.__)("Transform to variation"),popoverProps:{position:"bottom center",className:`${t}__popover`},icon:fy,toggleProps:{iconPosition:"right"}},(()=>(0,u.createElement)("div",{className:`${t}__container`},(0,u.createElement)(g.MenuGroup,null,(0,u.createElement)(g.MenuItemsChoice,{choices:i,value:r,onSelect:n})))))}var wE=function(e){let{blockClientId:t}=e;const{updateBlockAttributes:n}=(0,m.useDispatch)(xr),{activeBlockVariation:r,variations:o}=(0,m.useSelect)((e=>{const{getActiveBlockVariation:n,getBlockVariations:r}=e(a.store),{getBlockName:o,getBlockAttributes:i}=e(xr),l=t&&o(t);return{activeBlockVariation:n(l,i(t)),variations:l&&r(l,"transform")}}),[t]),i=null==r?void 0:r.name,l=(0,u.useMemo)((()=>{const e=new Set;return!!o&&(o.forEach((t=>{var n;t.icon&&e.add((null===(n=t.icon)||void 0===n?void 0:n.src)||t.icon)})),e.size===o.length)}),[o]);if(null==o||!o.length)return null;const s=l?EE:SE;return(0,u.createElement)(s,{className:"block-editor-block-variation-transforms",onSelectVariation:e=>{n(t,{...o.find((t=>{let{name:n}=t;return n===e})).attributes})},selectedValue:i,variations:o})},CE=(0,f.createHigherOrderComponent)((e=>t=>{const n=yo("color.palette"),r=!yo("color.custom"),o=void 0===t.colors?n:t.colors,i=void 0===t.disableCustomColors?r:t.disableCustomColors,l=!(0,y.isEmpty)(o)||!i;return(0,u.createElement)(e,c({},t,{colors:o,disableCustomColors:i,hasColorsToChoose:l}))}),"withColorContext"),IE=CE(g.ColorPalette);function AE(e){let{onChange:t,value:n,...r}=e;return(0,u.createElement)(Dv,c({},r,{onColorChange:t,colorValue:n,gradients:[],disableCustomGradients:!0}))}var xE=window.wp.date;const BE=new Date(2022,0,25);function PE(e){let{format:t,defaultFormat:n,onChange:r}=e;return(0,u.createElement)("fieldset",{className:"block-editor-date-format-picker"},(0,u.createElement)(g.VisuallyHidden,{as:"legend"},(0,_.__)("Date format")),(0,u.createElement)(g.ToggleControl,{label:(0,u.createElement)(u.Fragment,null,(0,_.__)("Default format"),(0,u.createElement)("span",{className:"block-editor-date-format-picker__default-format-toggle-control__hint"},(0,xE.dateI18n)(n,BE))),checked:!t,onChange:e=>r(e?null:n)}),t&&(0,u.createElement)(TE,{format:t,onChange:r}))}function TE(e){var t;let{format:n,onChange:r}=e;const o=[...new Set(["Y-m-d",(0,_._x)("n/j/Y","short date format"),(0,_._x)("n/j/Y g:i A","short date format with time"),(0,_._x)("M j, Y","medium date format"),(0,_._x)("M j, Y g:i A","medium date format with time"),(0,_._x)("F j, Y","long date format"),(0,_._x)("M j","short date format without the year")])],i=o.map(((e,t)=>({key:`suggested-${t}`,name:(0,xE.dateI18n)(e,BE),format:e}))),l={key:"custom",name:(0,_.__)("Custom"),className:"block-editor-date-format-picker__custom-format-select-control__custom-option",__experimentalHint:(0,_.__)("Enter your own date format")},[a,s]=(0,u.useState)((()=>!!n&&!o.includes(n)));return(0,u.createElement)(g.__experimentalVStack,null,(0,u.createElement)(g.CustomSelectControl,{__nextUnconstrainedWidth:!0,label:(0,_.__)("Choose a format"),options:[...i,l],value:a?l:null!==(t=i.find((e=>e.format===n)))&&void 0!==t?t:l,onChange:e=>{let{selectedItem:t}=e;t===l?s(!0):(s(!1),r(t.format))}}),a&&(0,u.createElement)(g.TextControl,{__nextHasNoMarginBottom:!0,label:(0,_.__)("Custom format"),hideLabelFromVision:!0,help:(0,u.createInterpolateElement)((0,_.__)("Enter a date or time <Link>format string</Link>."),{Link:(0,u.createElement)(g.ExternalLink,{href:(0,_.__)("https://wordpress.org/support/article/formatting-date-and-time/")})}),value:n,onChange:e=>r(e)}))}const OE=["colors","disableCustomColors","gradients","disableCustomGradients"],NE=e=>{let{className:t,colors:n,gradients:r,disableCustomColors:o,disableCustomGradients:i,children:l,settings:a,title:s,showTitle:c=!0,__experimentalIsRenderedInSidebar:p,enableAlpha:h}=e;const v=(0,f.useInstanceId)(NE),{batch:b}=(0,m.useRegistry)();return(0,y.isEmpty)(n)&&(0,y.isEmpty)(r)&&o&&i&&null!=a&&a.every((e=>(0,y.isEmpty)(e.colors)&&(0,y.isEmpty)(e.gradients)&&(void 0===e.disableCustomColors||e.disableCustomColors)&&(void 0===e.disableCustomGradients||e.disableCustomGradients)))?null:(0,u.createElement)(g.__experimentalToolsPanel,{className:d()("block-editor-panel-color-gradient-settings",t),label:c?s:void 0,resetAll:()=>{b((()=>{a.forEach((e=>{let{colorValue:t,gradientValue:n,onColorChange:r,onGradientChange:o}=e;t?r():n&&o()}))}))},panelId:v,__experimentalFirstVisibleItemClass:"first",__experimentalLastVisibleItemClass:"last"},(0,u.createElement)(Vv,{settings:a,panelId:v,colors:n,gradients:r,disableCustomColors:o,disableCustomGradients:i,__experimentalIsRenderedInSidebar:p,enableAlpha:h}),!!l&&(0,u.createElement)(u.Fragment,null,(0,u.createElement)(g.__experimentalSpacer,{marginY:4})," ",l))},ME=e=>{const t=mv();return(0,u.createElement)(NE,c({},t,e))};var RE=e=>OE.every((t=>e.hasOwnProperty(t)))?(0,u.createElement)(NE,e):(0,u.createElement)(ME,e);const FE=(0,u.createContext)({}),LE=()=>(0,u.useContext)(FE);function DE(e){let{id:t,url:n,naturalWidth:r,naturalHeight:o,onFinishEditing:i,onSaveImage:l,children:a}=e;const c=function(e){let{url:t,naturalWidth:n,naturalHeight:r}=e;const[o,i]=(0,u.useState)(),[l,a]=(0,u.useState)(),[c,p]=(0,u.useState)({x:0,y:0}),[d,f]=(0,u.useState)(100),[m,y]=(0,u.useState)(0),g=n/r,[h,v]=(0,u.useState)(g),b=(0,u.useCallback)((()=>{const e=(m+90)%360;let n=g;if(m%180==90&&(n=1/g),0===e)return i(),y(e),v(g),void p({x:-c.y*n,y:c.x*n});const r=new window.Image;r.src=t,r.onload=function(t){const r=document.createElement("canvas");let o=0,l=0;e%180?(r.width=t.target.height,r.height=t.target.width):(r.width=t.target.width,r.height=t.target.height),90!==e&&180!==e||(o=r.width),270!==e&&180!==e||(l=r.height);const a=r.getContext("2d");a.translate(o,l),a.rotate(e*Math.PI/180),a.drawImage(t.target,0,0),r.toBlob((t=>{i(URL.createObjectURL(t)),y(e),v(r.width/r.height),p({x:-c.y*n,y:c.x*n})}))};const o=(0,s.applyFilters)("media.crossOrigin",void 0,t);"string"==typeof o&&(r.crossOrigin=o)}),[m,g]);return(0,u.useMemo)((()=>({editedUrl:o,setEditedUrl:i,crop:l,setCrop:a,position:c,setPosition:p,zoom:d,setZoom:f,rotation:m,setRotation:y,rotateClockwise:b,aspect:h,setAspect:v,defaultAspect:g})),[o,l,c,d,m,b,h,g])}({url:n,naturalWidth:r,naturalHeight:o}),p=function(e){let{crop:t,rotation:n,height:r,width:o,aspect:i,url:l,id:a,onSaveImage:s,onFinishEditing:c}=e;const{createErrorNotice:p}=(0,m.useDispatch)(bf.store),[d,f]=(0,u.useState)(!1),y=(0,u.useCallback)((()=>{f(!1),c()}),[f,c]),g=(0,u.useCallback)((()=>{f(!0);let e={};(t.width<99.9||t.height<99.9)&&(e=t),n>0&&(e.rotation=n),e.src=l,bk()({path:`/wp/v2/media/${a}/edit`,method:"POST",data:e}).then((e=>{s({id:e.id,url:e.source_url,height:r&&o?o/i:void 0})})).catch((e=>{p((0,_.sprintf)((0,_.__)("Could not edit image. %s"),(0,Ml.__unstableStripHTML)(e.message)),{id:"image-editing-error",type:"snackbar"})})).finally((()=>{f(!1),c()}))}),[f,t,n,r,o,i,l,s,p,f,c]);return(0,u.useMemo)((()=>({isInProgress:d,apply:g,cancel:y})),[d,g,y])}({id:t,url:n,onSaveImage:l,onFinishEditing:i,...c}),d=(0,u.useMemo)((()=>({...c,...p})),[c,p]);return(0,u.createElement)(FE.Provider,{value:d},a)} /*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */ var UE=function(e,t){return UE=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])},UE(e,t)};var jE=function(){return jE=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},jE.apply(this,arguments)};Object.create;Object.create;var zE=n(7970),VE=n.n(zE);function GE(e,t,n,r,o,i){void 0===i&&(i=0);var l=eS(e,t,i),a=l.width,s=l.height,c=Math.min(a,n),u=Math.min(s,r);return c>u*o?{width:u*o,height:u}:{width:c,height:c/o}}function HE(e,t,n,r,o){void 0===o&&(o=0);var i=eS(t.width,t.height,o),l=i.width,a=i.height;return{x:WE(e.x,l,n.width,r),y:WE(e.y,a,n.height,r)}}function WE(e,t,n,r){var o=t*r/2-n/2;return tS(e,-o,o)}function $E(e,t){return Math.sqrt(Math.pow(e.y-t.y,2)+Math.pow(e.x-t.x,2))}function KE(e,t){return 180*Math.atan2(t.y-e.y,t.x-e.x)/Math.PI}function qE(e,t,n,r,o,i,l){void 0===i&&(i=0),void 0===l&&(l=!0);var a=l?JE:YE,s=eS(t.width,t.height,i),c=eS(t.naturalWidth,t.naturalHeight,i),u={x:a(100,((s.width-n.width/o)/2-e.x/o)/s.width*100),y:a(100,((s.height-n.height/o)/2-e.y/o)/s.height*100),width:a(100,n.width/s.width*100/o),height:a(100,n.height/s.height*100/o)},p=Math.round(a(c.width,u.width*c.width/100)),d=Math.round(a(c.height,u.height*c.height/100)),f=c.width>=c.height*r?{width:Math.round(d*r),height:d}:{width:p,height:Math.round(p/r)};return{croppedAreaPercentages:u,croppedAreaPixels:jE(jE({},f),{x:Math.round(a(c.width-f.width,u.x*c.width/100)),y:Math.round(a(c.height-f.height,u.y*c.height/100))})}}function JE(e,t){return Math.min(e,Math.max(0,t))}function YE(e,t){return t}function QE(e,t,n,r,o,i){var l=eS(t.width,t.height,n),a=tS(r.width/l.width*(100/e.width),o,i);return{crop:{x:a*l.width/2-r.width/2-l.width*a*(e.x/100),y:a*l.height/2-r.height/2-l.height*a*(e.y/100)},zoom:a}}function ZE(e,t,n,r,o,i){void 0===n&&(n=0);var l=eS(t.naturalWidth,t.naturalHeight,n),a=tS(function(e,t,n){var r=function(e){return e.width>e.height?e.width/e.naturalWidth:e.height/e.naturalHeight}(t);return n.height>n.width?n.height/(e.height*r):n.width/(e.width*r)}(e,t,r),o,i),s=r.height>r.width?r.height/e.height:r.width/e.width;return{crop:{x:((l.width-e.width)/2-e.x)*s,y:((l.height-e.height)/2-e.y)*s},zoom:a}}function XE(e,t){return{x:(t.x+e.x)/2,y:(t.y+e.y)/2}}function eS(e,t,n){var r=n*Math.PI/180;return{width:Math.abs(Math.cos(r)*e)+Math.abs(Math.sin(r)*t),height:Math.abs(Math.sin(r)*e)+Math.abs(Math.cos(r)*t)}}function tS(e,t,n){return Math.min(Math.max(e,t),n)}function nS(){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 rS=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.imageRef=ta().createRef(),n.videoRef=ta().createRef(),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.gestureZoomStart=0,n.gestureRotationStart=0,n.isTouching=!1,n.lastPinchDistance=0,n.lastPinchRotation=0,n.rafDragTimeout=null,n.rafPinchTimeout=null,n.wheelTimer=null,n.currentDoc="undefined"!=typeof document?document:null,n.currentWindow="undefined"!=typeof window?window:null,n.resizeObserver=null,n.state={cropSize:null,hasWheelJustStarted:!1},n.initResizeObserver=function(){if(void 0!==window.ResizeObserver&&n.containerRef){var e=!0;n.resizeObserver=new window.ResizeObserver((function(t){e?e=!1:n.computeSizes()})),n.resizeObserver.observe(n.containerRef)}},n.preventZoomSafari=function(e){return e.preventDefault()},n.cleanEvents=function(){n.currentDoc&&(n.currentDoc.removeEventListener("mousemove",n.onMouseMove),n.currentDoc.removeEventListener("mouseup",n.onDragStopped),n.currentDoc.removeEventListener("touchmove",n.onTouchMove),n.currentDoc.removeEventListener("touchend",n.onDragStopped),n.currentDoc.removeEventListener("gesturemove",n.onGestureMove),n.currentDoc.removeEventListener("gestureend",n.onGestureEnd))},n.clearScrollEvent=function(){n.containerRef&&n.containerRef.removeEventListener("wheel",n.onWheel),n.wheelTimer&&clearTimeout(n.wheelTimer)},n.onMediaLoad=function(){var e=n.computeSizes();e&&(n.emitCropData(),n.setInitialCrop(e)),n.props.onMediaLoaded&&n.props.onMediaLoaded(n.mediaSize)},n.setInitialCrop=function(e){if(n.props.initialCroppedAreaPercentages){var t=QE(n.props.initialCroppedAreaPercentages,n.mediaSize,n.props.rotation,e,n.props.minZoom,n.props.maxZoom),r=t.crop,o=t.zoom;n.props.onCropChange(r),n.props.onZoomChange&&n.props.onZoomChange(o)}else if(n.props.initialCroppedAreaPixels){var i=ZE(n.props.initialCroppedAreaPixels,n.mediaSize,n.props.rotation,e,n.props.minZoom,n.props.maxZoom);r=i.crop,o=i.zoom;n.props.onCropChange(r),n.props.onZoomChange&&n.props.onZoomChange(o)}},n.computeSizes=function(){var e,t,r,o,i,l,a=n.imageRef.current||n.videoRef.current;if(a&&n.containerRef){n.containerRect=n.containerRef.getBoundingClientRect();var s=n.containerRect.width/n.containerRect.height,c=(null===(e=n.imageRef.current)||void 0===e?void 0:e.naturalWidth)||(null===(t=n.videoRef.current)||void 0===t?void 0:t.videoWidth)||0,u=(null===(r=n.imageRef.current)||void 0===r?void 0:r.naturalHeight)||(null===(o=n.videoRef.current)||void 0===o?void 0:o.videoHeight)||0,p=c/u,d=void 0;if(a.offsetWidth<c||a.offsetHeight<u)switch(n.props.objectFit){default:case"contain":d=s>p?{width:n.containerRect.height*p,height:n.containerRect.height}:{width:n.containerRect.width,height:n.containerRect.width/p};break;case"horizontal-cover":d={width:n.containerRect.width,height:n.containerRect.width/p};break;case"vertical-cover":d={width:n.containerRect.height*p,height:n.containerRect.height};break;case"auto-cover":d=c>u?{width:n.containerRect.width,height:n.containerRect.width/p}:{width:n.containerRect.height*p,height:n.containerRect.height}}else d={width:a.offsetWidth,height:a.offsetHeight};n.mediaSize=jE(jE({},d),{naturalWidth:c,naturalHeight:u}),n.props.setMediaSize&&n.props.setMediaSize(n.mediaSize);var f=n.props.cropSize?n.props.cropSize:GE(n.mediaSize.width,n.mediaSize.height,n.containerRect.width,n.containerRect.height,n.props.aspect,n.props.rotation);return(null===(i=n.state.cropSize)||void 0===i?void 0:i.height)===f.height&&(null===(l=n.state.cropSize)||void 0===l?void 0:l.width)===f.width||n.props.onCropSizeChange&&n.props.onCropSizeChange(f),n.setState({cropSize:f},n.recomputeCropPosition),n.props.setCropSize&&n.props.setCropSize(f),f}},n.onMouseDown=function(e){n.currentDoc&&(e.preventDefault(),n.currentDoc.addEventListener("mousemove",n.onMouseMove),n.currentDoc.addEventListener("mouseup",n.onDragStopped),n.onDragStart(t.getMousePoint(e)))},n.onMouseMove=function(e){return n.onDrag(t.getMousePoint(e))},n.onTouchStart=function(e){n.currentDoc&&(n.isTouching=!0,n.props.onTouchRequest&&!n.props.onTouchRequest(e)||(n.currentDoc.addEventListener("touchmove",n.onTouchMove,{passive:!1}),n.currentDoc.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.onGestureStart=function(e){n.currentDoc&&(e.preventDefault(),n.currentDoc.addEventListener("gesturechange",n.onGestureMove),n.currentDoc.addEventListener("gestureend",n.onGestureEnd),n.gestureZoomStart=n.props.zoom,n.gestureRotationStart=n.props.rotation)},n.onGestureMove=function(e){if(e.preventDefault(),!n.isTouching){var r=t.getMousePoint(e),o=n.gestureZoomStart-1+e.scale;if(n.setNewZoom(o,r,{shouldUpdatePosition:!0}),n.props.onRotationChange){var i=n.gestureRotationStart+e.rotation;n.props.onRotationChange(i)}}},n.onGestureEnd=function(e){n.cleanEvents()},n.onDragStart=function(e){var t,r,o=e.x,i=e.y;n.dragStartPosition={x:o,y:i},n.dragStartCrop=jE({},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.currentWindow&&(n.rafDragTimeout&&n.currentWindow.cancelAnimationFrame(n.rafDragTimeout),n.rafDragTimeout=n.currentWindow.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},l=n.props.restrictPosition?HE(i,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):i;n.props.onCropChange(l)}})))},n.onDragStopped=function(){var e,t;n.isTouching=!1,n.cleanEvents(),n.emitCropData(),null===(t=(e=n.props).onInteractionEnd)||void 0===t||t.call(e)},n.onWheel=function(e){if(n.currentWindow&&(!n.props.onWheelRequest||n.props.onWheelRequest(e))){e.preventDefault();var r=t.getMousePoint(e),o=VE()(e).pixelY,i=n.props.zoom-o*n.props.zoomSpeed/200;n.setNewZoom(i,r,{shouldUpdatePosition:!0}),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=n.currentWindow.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,l=o.zoom;return{x:(t+i.x)/l,y:(r+i.y)/l}},n.setNewZoom=function(e,t,r){var o=(void 0===r?{}:r).shouldUpdatePosition,i=void 0===o||o;if(n.state.cropSize&&n.props.onZoomChange){var l=tS(e,n.props.minZoom,n.props.maxZoom);if(i){var a=n.getPointOnContainer(t),s=n.getPointOnMedia(a),c={x:s.x*l-a.x,y:s.y*l-a.y},u=n.props.restrictPosition?HE(c,n.mediaSize,n.state.cropSize,l,n.props.rotation):c;n.props.onCropChange(u)}n.props.onZoomChange(l)}},n.getCropData=function(){return n.state.cropSize?qE(n.props.restrictPosition?HE(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?HE(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}UE(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t.prototype.componentDidMount=function(){this.currentDoc&&this.currentWindow&&(this.containerRef&&(this.containerRef.ownerDocument&&(this.currentDoc=this.containerRef.ownerDocument),this.currentDoc.defaultView&&(this.currentWindow=this.currentDoc.defaultView),this.initResizeObserver(),void 0===window.ResizeObserver&&this.currentWindow.addEventListener("resize",this.computeSizes),this.props.zoomWithScroll&&this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}),this.containerRef.addEventListener("gesturestart",this.onGestureStart)),this.props.disableAutomaticStylesInjection||(this.styleRef=this.currentDoc.createElement("style"),this.styleRef.setAttribute("type","text/css"),this.props.nonce&&this.styleRef.setAttribute("nonce",this.props.nonce),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",this.currentDoc.head.appendChild(this.styleRef)),this.imageRef.current&&this.imageRef.current.complete&&this.onMediaLoad(),this.props.setImageRef&&this.props.setImageRef(this.imageRef),this.props.setVideoRef&&this.props.setVideoRef(this.videoRef))},t.prototype.componentWillUnmount=function(){var e,t;this.currentDoc&&this.currentWindow&&(void 0===window.ResizeObserver&&this.currentWindow.removeEventListener("resize",this.computeSizes),null===(e=this.resizeObserver)||void 0===e||e.disconnect(),this.containerRef&&this.containerRef.removeEventListener("gesturestart",this.preventZoomSafari),this.styleRef&&(null===(t=this.styleRef.parentNode)||void 0===t||t.removeChild(this.styleRef)),this.cleanEvents(),this.props.zoomWithScroll&&this.clearScrollEvent())},t.prototype.componentDidUpdate=function(e){var t,n,r,o,i,l,a,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===(l=this.props.crop)||void 0===l?void 0:l.x)&&(null===(a=e.crop)||void 0===a?void 0:a.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.current)||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=$E(n,r),this.lastPinchRotation=KE(n,r),this.onDragStart(XE(n,r))},t.prototype.onPinchMove=function(e){var n=this;if(this.currentDoc&&this.currentWindow){var r=t.getTouchPoint(e.touches[0]),o=t.getTouchPoint(e.touches[1]),i=XE(r,o);this.onDrag(i),this.rafPinchTimeout&&this.currentWindow.cancelAnimationFrame(this.rafPinchTimeout),this.rafPinchTimeout=this.currentWindow.requestAnimationFrame((function(){var e=$E(r,o),t=n.props.zoom*(e/n.lastPinchDistance);n.setNewZoom(t,i,{shouldUpdatePosition:!1}),n.lastPinchDistance=e;var l=KE(r,o),a=n.props.rotation+(l-n.lastPinchRotation);n.props.onRotationChange&&n.props.onRotationChange(a),n.lastPinchRotation=l}))}},t.prototype.render=function(){var e=this,t=this.props,n=t.image,r=t.video,o=t.mediaProps,i=t.transform,l=t.crop,a=l.x,s=l.y,c=t.rotation,u=t.zoom,p=t.cropShape,d=t.showGrid,f=t.style,m=f.containerStyle,y=f.cropAreaStyle,g=f.mediaStyle,h=t.classes,v=h.containerClassName,b=h.cropAreaClassName,_=h.mediaClassName,k=t.objectFit;return ta().createElement("div",{onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,ref:function(t){return e.containerRef=t},"data-testid":"container",style:m,className:nS("reactEasyCrop_Container",v)},n?ta().createElement("img",jE({alt:"",className:nS("reactEasyCrop_Image","contain"===k&&"reactEasyCrop_Contain","horizontal-cover"===k&&"reactEasyCrop_Cover_Horizontal","vertical-cover"===k&&"reactEasyCrop_Cover_Vertical","auto-cover"===k&&(this.mediaSize.naturalWidth>this.mediaSize.naturalHeight?"reactEasyCrop_Cover_Horizontal":"reactEasyCrop_Cover_Vertical"),_)},o,{src:n,ref:this.imageRef,style:jE(jE({},g),{transform:i||"translate(".concat(a,"px, ").concat(s,"px) rotate(").concat(c,"deg) scale(").concat(u,")")}),onLoad:this.onMediaLoad})):r&&ta().createElement("video",jE({autoPlay:!0,loop:!0,muted:!0,className:nS("reactEasyCrop_Video","contain"===k&&"reactEasyCrop_Contain","horizontal-cover"===k&&"reactEasyCrop_Cover_Horizontal","vertical-cover"===k&&"reactEasyCrop_Cover_Vertical","auto-cover"===k&&(this.mediaSize.naturalWidth>this.mediaSize.naturalHeight?"reactEasyCrop_Cover_Horizontal":"reactEasyCrop_Cover_Vertical"),_)},o,{ref:this.videoRef,onLoadedMetadata:this.onMediaLoad,style:jE(jE({},g),{transform:i||"translate(".concat(a,"px, ").concat(s,"px) rotate(").concat(c,"deg) scale(").concat(u,")")}),controls:!1}),(Array.isArray(r)?r:[{src:r}]).map((function(e){return ta().createElement("source",jE({key:e.src},e))}))),this.state.cropSize&&ta().createElement("div",{style:jE(jE({},y),{width:this.state.cropSize.width,height:this.state.cropSize.height}),"data-testid":"cropper",className:nS("reactEasyCrop_CropArea","round"===p&&"reactEasyCrop_CropAreaRound",d&&"reactEasyCrop_CropAreaGrid",b)}))},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}(ta().Component);const oS={placement:"bottom-start",variant:"toolbar"};function iS(e){let{url:t,width:n,height:r,clientWidth:o,naturalHeight:i,naturalWidth:l,borderProps:a}=e;const{isInProgress:s,editedUrl:c,position:p,zoom:f,aspect:m,setPosition:y,setCrop:h,setZoom:v,rotation:b}=LE();let _=r||o*i/l;return b%180==90&&(_=o*l/i),(0,u.createElement)("div",{className:d()("wp-block-image__crop-area",null==a?void 0:a.className,{"is-applying":s}),style:{...null==a?void 0:a.style,width:n||o,height:_}},(0,u.createElement)(rS,{image:c||t,disabled:s,minZoom:1,maxZoom:3,crop:p,zoom:f/100,aspect:m,onCropChange:e=>{y(e)},onCropComplete:e=>{h(e)},onZoomChange:e=>{v(100*e)}}),s&&(0,u.createElement)(g.Spinner,null))}var lS=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{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"}));function aS(){const{isInProgress:e,zoom:t,setZoom:n}=LE();return(0,u.createElement)(g.Dropdown,{contentClassName:"wp-block-image__zoom",popoverProps:oS,renderToggle:t=>{let{isOpen:n,onToggle:r}=t;return(0,u.createElement)(g.ToolbarButton,{icon:lS,label:(0,_.__)("Zoom"),onClick:r,"aria-expanded":n,disabled:e})},renderContent:()=>(0,u.createElement)(g.RangeControl,{__nextHasNoMarginBottom:!0,label:(0,_.__)("Zoom"),min:100,max:300,value:Math.round(t),onChange:n})})}var sS=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{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 cS(e){let{aspectRatios:t,isDisabled:n,label:r,onClick:o,value:i}=e;return(0,u.createElement)(g.MenuGroup,{label:r},t.map((e=>{let{title:t,aspect:r}=e;return(0,u.createElement)(g.MenuItem,{key:r,disabled:n,onClick:()=>{o(r)},role:"menuitemradio",isSelected:r===i,icon:r===i?Dy:void 0},t)})))}function uS(e){let{toggleProps:t}=e;const{isInProgress:n,aspect:r,setAspect:o,defaultAspect:i}=LE();return(0,u.createElement)(g.DropdownMenu,{icon:sS,label:(0,_.__)("Aspect Ratio"),popoverProps:oS,toggleProps:t,className:"wp-block-image__aspect-ratio"},(e=>{let{onClose:t}=e;return(0,u.createElement)(u.Fragment,null,(0,u.createElement)(cS,{isDisabled:n,onClick:e=>{o(e),t()},value:r,aspectRatios:[{title:(0,_.__)("Original"),aspect:i},{title:(0,_.__)("Square"),aspect:1}]}),(0,u.createElement)(cS,{label:(0,_.__)("Landscape"),isDisabled:n,onClick:e=>{o(e),t()},value:r,aspectRatios:[{title:(0,_.__)("16:10"),aspect:1.6},{title:(0,_.__)("16:9"),aspect:16/9},{title:(0,_.__)("4:3"),aspect:4/3},{title:(0,_.__)("3:2"),aspect:1.5}]}),(0,u.createElement)(cS,{label:(0,_.__)("Portrait"),isDisabled:n,onClick:e=>{o(e),t()},value:r,aspectRatios:[{title:(0,_.__)("10:16"),aspect:.625},{title:(0,_.__)("9:16"),aspect:9/16},{title:(0,_.__)("3:4"),aspect:3/4},{title:(0,_.__)("2:3"),aspect:2/3}]}))}))}var pS=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{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 dS(){const{isInProgress:e,rotateClockwise:t}=LE();return(0,u.createElement)(g.ToolbarButton,{icon:pS,label:(0,_.__)("Rotate"),onClick:t,disabled:e})}function fS(){const{isInProgress:e,apply:t,cancel:n}=LE();return(0,u.createElement)(u.Fragment,null,(0,u.createElement)(g.ToolbarButton,{onClick:t,disabled:e},(0,_.__)("Apply")),(0,u.createElement)(g.ToolbarButton,{onClick:n},(0,_.__)("Cancel")))}function mS(e){let{id:t,url:n,width:r,height:o,clientWidth:i,naturalHeight:l,naturalWidth:a,onSaveImage:s,onFinishEditing:c,borderProps:p}=e;return(0,u.createElement)(DE,{id:t,url:n,naturalWidth:a,naturalHeight:l,onSaveImage:s,onFinishEditing:c},(0,u.createElement)(iS,{borderProps:p,url:n,width:r,height:o,clientWidth:i,naturalHeight:l,naturalWidth:a}),(0,u.createElement)(Ur,null,(0,u.createElement)(g.ToolbarGroup,null,(0,u.createElement)(aS,null),(0,u.createElement)(g.ToolbarItem,null,(e=>(0,u.createElement)(uS,{toggleProps:e}))),(0,u.createElement)(dS,null)),(0,u.createElement)(g.ToolbarGroup,null,(0,u.createElement)(fS,null))))}const yS=[25,50,75,100],gS=()=>{};function hS(e){let{imageSizeHelp:t,imageWidth:n,imageHeight:r,imageSizeOptions:o=[],isResizable:i=!0,slug:l,width:a,height:s,onChange:c,onChangeImage:p=gS}=e;const{currentHeight:d,currentWidth:f,updateDimension:m,updateDimensions:y}=function(e,t,n,r,o){var i,l;const[a,s]=(0,u.useState)(null!==(i=null!=t?t:r)&&void 0!==i?i:""),[c,p]=(0,u.useState)(null!==(l=null!=e?e:n)&&void 0!==l?l:"");return(0,u.useEffect)((()=>{void 0===t&&void 0!==r&&s(r),void 0===e&&void 0!==n&&p(n)}),[r,n]),(0,u.useEffect)((()=>{void 0!==t&&Number.parseInt(t)!==Number.parseInt(a)&&s(t),void 0!==e&&Number.parseInt(e)!==Number.parseInt(c)&&p(e)}),[t,e]),{currentHeight:c,currentWidth:a,updateDimension:(e,t)=>{"width"===e?s(t):p(t),o({[e]:""===t?void 0:parseInt(t,10)})},updateDimensions:(e,t)=>{p(null!=e?e:n),s(null!=t?t:r),o({height:e,width:t})}}}(s,a,r,n,c);return(0,u.createElement)(u.Fragment,null,o&&o.length>0&&(0,u.createElement)(g.SelectControl,{__nextHasNoMarginBottom:!0,label:(0,_.__)("Image size"),value:l,options:o,onChange:p,help:t}),i&&(0,u.createElement)("div",{className:"block-editor-image-size-control"},(0,u.createElement)("p",{className:"block-editor-image-size-control__row"},(0,_.__)("Image dimensions")),(0,u.createElement)("div",{className:"block-editor-image-size-control__row"},(0,u.createElement)(g.TextControl,{type:"number",className:"block-editor-image-size-control__width",label:(0,_.__)("Width"),value:f,min:1,onChange:e=>m("width",e)}),(0,u.createElement)(g.TextControl,{type:"number",className:"block-editor-image-size-control__height",label:(0,_.__)("Height"),value:d,min:1,onChange:e=>m("height",e)})),(0,u.createElement)("div",{className:"block-editor-image-size-control__row"},(0,u.createElement)(g.ButtonGroup,{"aria-label":(0,_.__)("Image size presets")},yS.map((e=>{const t=Math.round(n*(e/100)),o=Math.round(r*(e/100)),i=f===t&&d===o;return(0,u.createElement)(g.Button,{key:e,isSmall:!0,variant:i?"primary":void 0,isPressed:i,onClick:()=>y(o,t)},e,"%")}))),(0,u.createElement)(g.Button,{isSmall:!0,onClick:()=>y()},(0,_.__)("Reset")))))}var vS=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},(0,u.createElement)(V.Path,{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"}));const bS=()=>{};var _S=e=>{let{value:t,onChange:n=bS,settings:r}=e;if(!r||!r.length)return null;const o=e=>r=>{n({...t,[e.id]:r})},i=r.map((e=>(0,u.createElement)(g.ToggleControl,{className:"block-editor-link-control__setting",key:e.id,label:e.title,onChange:o(e),checked:!!t&&!!t[e.id]})));return(0,u.createElement)("fieldset",{className:"block-editor-link-control__settings"},(0,u.createElement)(g.VisuallyHidden,{as:"legend"},(0,_.__)("Currently selected link settings")),i)},kS=n(5425),ES=n.n(kS);function SS(e){return"function"==typeof e}class wS extends u.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,u.createRef)(),this.inputRef=(0,u.createRef)(),this.updateSuggestions=(0,f.debounce)(this.updateSuggestions.bind(this),200),this.suggestionNodes=[],this.suggestionsRequest=null,this.state={suggestions:[],showSuggestions:!1,isUpdatingSuggestions:!1,suggestionsValue:null,selectedSuggestion:null,suggestionsListboxId:"",suggestionOptionIdPrefix:""}}componentDidUpdate(e){const{showSuggestions:t,selectedSuggestion:n}=this.state,{value:r,__experimentalShowInitialSuggestions:o=!1}=this.props;t&&null!==n&&this.suggestionNodes[n]&&!this.scrollingIntoView&&(this.scrollingIntoView=!0,ES()(this.suggestionNodes[n],this.autocompleteRef.current,{onlyScrollIfNeeded:!0}),this.props.setTimeout((()=>{this.scrollingIntoView=!1}),100)),e.value===r||this.props.disableSuggestions||this.state.isUpdatingSuggestions||(null!=r&&r.length?this.updateSuggestions(r):o&&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),this.suggestionsRequest=null}bindSuggestionNode(e){return t=>{this.suggestionNodes[e]=t}}shouldShowInitialSuggestions(){const{__experimentalShowInitialSuggestions:e=!1,value:t}=this.props;return e&&!(t&&t.length)}updateSuggestions(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";const{__experimentalFetchLinkSuggestions:n,__experimentalHandleURLSuggestions:r}=this.props;if(!n)return;const o=!(null!==(e=t)&&void 0!==e&&e.length);var i,l;if(t=t.trim(),!o&&(t.length<2||!r&&(0,sm.isURL)(t)))return null===(i=this.suggestionsRequest)||void 0===i||null===(l=i.cancel)||void 0===l||l.call(i),this.suggestionsRequest=null,void this.setState({suggestions:[],showSuggestions:!1,suggestionsValue:t,selectedSuggestion:null,loading:!1});this.setState({isUpdatingSuggestions:!0,selectedSuggestion:null,loading:!0});const a=n(t,{isInitialSuggestions:o});a.then((e=>{this.suggestionsRequest===a&&(this.setState({suggestions:e,isUpdatingSuggestions:!1,suggestionsValue:t,loading:!1,showSuggestions:!!e.length}),e.length?this.props.debouncedSpeak((0,_.sprintf)((0,_._n)("%d result found, use up and down arrow keys to navigate.","%d results found, use up and down arrow keys to navigate.",e.length),e.length),"assertive"):this.props.debouncedSpeak((0,_.__)("No results."),"assertive"))})).catch((()=>{this.suggestionsRequest===a&&this.setState({isUpdatingSuggestions:!1,loading:!1})})),this.suggestionsRequest=a}onChange(e){this.props.onChange(e.target.value)}onFocus(){const{suggestions:e}=this.state,{disableSuggestions:t,value:n}=this.props;!n||t||this.state.isUpdatingSuggestions||e&&e.length||this.updateSuggestions(n)}onKeyDown(e){const{showSuggestions:t,selectedSuggestion:n,suggestions:r,loading:o}=this.state;if(!t||!r.length||o){switch(e.keyCode){case Xu.UP:0!==e.target.selectionStart&&(e.preventDefault(),e.target.setSelectionRange(0,0));break;case Xu.DOWN:this.props.value.length!==e.target.selectionStart&&(e.preventDefault(),e.target.setSelectionRange(this.props.value.length,this.props.value.length));break;case Xu.ENTER:e.preventDefault(),this.props.onSubmit&&this.props.onSubmit(null,e)}return}const i=this.state.suggestions[this.state.selectedSuggestion];switch(e.keyCode){case Xu.UP:{e.preventDefault();const t=n?n-1:r.length-1;this.setState({selectedSuggestion:t});break}case Xu.DOWN:{e.preventDefault();const t=null===n||n===r.length-1?0:n+1;this.setState({selectedSuggestion:t});break}case Xu.TAB:null!==this.state.selectedSuggestion&&(this.selectLink(i),this.props.speak((0,_.__)("Link selected.")));break;case Xu.ENTER:e.preventDefault(),null!==this.state.selectedSuggestion?(this.selectLink(i),this.props.onSubmit&&this.props.onSubmit(i,e)):this.props.onSubmit&&this.props.onSubmit(null,e)}}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(e,t){let{value:n,instanceId:r,disableSuggestions:o,__experimentalShowInitialSuggestions:i=!1}=e,{showSuggestions:l}=t,a=l;const s=n&&n.length;return i||s||(a=!1),!0===o&&(a=!1),{showSuggestions:a,suggestionsListboxId:`block-editor-url-input-suggestions-${r}`,suggestionOptionIdPrefix:`block-editor-url-input-suggestion-${r}`}}render(){return(0,u.createElement)(u.Fragment,null,this.renderControl(),this.renderSuggestions())}renderControl(){const{__nextHasNoMarginBottom:e=!1,label:t=null,className:n,isFullWidth:r,instanceId:o,placeholder:i=(0,_.__)("Paste URL or type to search"),__experimentalRenderControl:l,value:a=""}=this.props,{loading:s,showSuggestions:p,selectedSuggestion:f,suggestionsListboxId:m,suggestionOptionIdPrefix:y}=this.state,h=`url-input-control-${o}`,v={id:h,label:t,className:d()("block-editor-url-input",n,{"is-full-width":r})},b={id:h,value:a,required:!0,className:"block-editor-url-input__input",type:"text",onChange:this.onChange,onFocus:this.onFocus,placeholder:i,onKeyDown:this.onKeyDown,role:"combobox","aria-label":t?void 0:(0,_.__)("URL"),"aria-expanded":p,"aria-autocomplete":"list","aria-controls":m,"aria-activedescendant":null!==f?`${y}-${f}`:void 0,ref:this.inputRef};return l?l(v,b,s):(e||$()("Bottom margin styles for wp.blockEditor.URLInput",{since:"6.2",version:"6.5",hint:"Set the `__nextHasNoMarginBottom` prop to true to start opting into the new styles, which will become the default in a future version"}),(0,u.createElement)(g.BaseControl,c({__nextHasNoMarginBottom:e},v),(0,u.createElement)("input",b),s&&(0,u.createElement)(g.Spinner,null)))}renderSuggestions(){const{className:e,__experimentalRenderSuggestions:t}=this.props,{showSuggestions:n,suggestions:r,suggestionsValue:o,selectedSuggestion:i,suggestionsListboxId:l,suggestionOptionIdPrefix:a,loading:s}=this.state;if(!n||0===r.length)return null;const p={id:l,ref:this.autocompleteRef,role:"listbox"},f=(e,t)=>({role:"option",tabIndex:"-1",id:`${a}-${t}`,ref:this.bindSuggestionNode(t),"aria-selected":t===i});return SS(t)?t({suggestions:r,selectedSuggestion:i,suggestionsListProps:p,buildSuggestionItemProps:f,isLoading:s,handleSuggestionClick:this.handleOnClick,isInitialSuggestions:!(null!=o&&o.length),currentInputValue:o}):(0,u.createElement)(g.Popover,{placement:"bottom",focusOnMount:!1},(0,u.createElement)("div",c({},p,{className:d()("block-editor-url-input__suggestions",`${e}__suggestions`)}),r.map(((e,t)=>(0,u.createElement)(g.Button,c({},f(0,t),{key:e.id,className:d()("block-editor-url-input__suggestion",{"is-selected":t===i}),onClick:()=>this.handleOnClick(e)}),e.title)))))}}var CS=(0,f.compose)(f.withSafeTimeout,g.withSpokenMessages,f.withInstanceId,(0,m.withSelect)(((e,t)=>{if(SS(t.__experimentalFetchLinkSuggestions))return;const{getSettings:n}=e(xr);return{__experimentalFetchLinkSuggestions:n().__experimentalFetchLinkSuggestions}})))(wS);var IS=e=>{let t,{searchTerm:n,onClick:r,itemProps:o,isSelected:i,buttonText:l}=e;return n?(t=l?"function"==typeof l?l(n):l:(0,u.createInterpolateElement)((0,_.sprintf)((0,_.__)("Create: <mark>%s</mark>"),n),{mark:(0,u.createElement)("mark",null)}),(0,u.createElement)(g.Button,c({},o,{className:d()("block-editor-link-control__search-create block-editor-link-control__search-item",{"is-selected":i}),onClick:r}),(0,u.createElement)(Xi,{className:"block-editor-link-control__search-item-icon",icon:pp}),(0,u.createElement)("span",{className:"block-editor-link-control__search-item-header"},(0,u.createElement)("span",{className:"block-editor-link-control__search-item-title"},t)))):null};var AS=(0,u.createElement)(V.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,u.createElement)(V.Path,{d:"M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 14c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h12c.3 0 .5.2.5.5v12zM7 11h2V9H7v2zm0 4h2v-2H7v2zm3-4h7V9h-7v2zm0 4h7v-2h-7v2z"}));var xS=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M20.1 11.2l-6.7-6.7c-.1-.1-.3-.2-.5-.2H5c-.4-.1-.8.3-.8.7v7.8c0 .2.1.4.2.5l6.7 6.7c.2.2.5.4.7.5s.6.2.9.2c.3 0 .6-.1.9-.2.3-.1.5-.3.8-.5l5.6-5.6c.4-.4.7-1 .7-1.6.1-.6-.2-1.2-.6-1.6zM19 13.4L13.4 19c-.1.1-.2.1-.3.2-.2.1-.4.1-.6 0-.1 0-.2-.1-.3-.2l-6.5-6.5V5.8h6.8l6.5 6.5c.2.2.2.4.2.6 0 .1 0 .3-.2.5zM9 8c-.6 0-1 .4-1 1s.4 1 1 1 1-.4 1-1-.4-1-1-1z"}));var BS=(0,u.createElement)(V.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,u.createElement)(V.Path,{d:"M6 5.5h3a.5.5 0 01.5.5v3a.5.5 0 01-.5.5H6a.5.5 0 01-.5-.5V6a.5.5 0 01.5-.5zM4 6a2 2 0 012-2h3a2 2 0 012 2v3a2 2 0 01-2 2H6a2 2 0 01-2-2V6zm11-.5h3a.5.5 0 01.5.5v3a.5.5 0 01-.5.5h-3a.5.5 0 01-.5-.5V6a.5.5 0 01.5-.5zM13 6a2 2 0 012-2h3a2 2 0 012 2v3a2 2 0 01-2 2h-3a2 2 0 01-2-2V6zm5 8.5h-3a.5.5 0 00-.5.5v3a.5.5 0 00.5.5h3a.5.5 0 00.5-.5v-3a.5.5 0 00-.5-.5zM15 13a2 2 0 00-2 2v3a2 2 0 002 2h3a2 2 0 002-2v-3a2 2 0 00-2-2h-3zm-9 1.5h3a.5.5 0 01.5.5v3a.5.5 0 01-.5.5H6a.5.5 0 01-.5-.5v-3a.5.5 0 01.5-.5zM4 15a2 2 0 012-2h3a2 2 0 012 2v3a2 2 0 01-2 2H6a2 2 0 01-2-2v-3z",fillRule:"evenodd",clipRule:"evenodd"}));var PS=(0,u.createElement)(V.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,u.createElement)(V.Path,{d:"M19 6.2h-5.9l-.6-1.1c-.3-.7-1-1.1-1.8-1.1H5c-1.1 0-2 .9-2 2v11.8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V8.2c0-1.1-.9-2-2-2zm.5 11.6c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h5.8c.2 0 .4.1.4.3l1 2H19c.3 0 .5.2.5.5v9.5z"}));var TS=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M12 3.3c-4.8 0-8.8 3.9-8.8 8.8 0 4.8 3.9 8.8 8.8 8.8 4.8 0 8.8-3.9 8.8-8.8s-4-8.8-8.8-8.8zm6.5 5.5h-2.6C15.4 7.3 14.8 6 14 5c2 .6 3.6 2 4.5 3.8zm.7 3.2c0 .6-.1 1.2-.2 1.8h-2.9c.1-.6.1-1.2.1-1.8s-.1-1.2-.1-1.8H19c.2.6.2 1.2.2 1.8zM12 18.7c-1-.7-1.8-1.9-2.3-3.5h4.6c-.5 1.6-1.3 2.9-2.3 3.5zm-2.6-4.9c-.1-.6-.1-1.1-.1-1.8 0-.6.1-1.2.1-1.8h5.2c.1.6.1 1.1.1 1.8s-.1 1.2-.1 1.8H9.4zM4.8 12c0-.6.1-1.2.2-1.8h2.9c-.1.6-.1 1.2-.1 1.8 0 .6.1 1.2.1 1.8H5c-.2-.6-.2-1.2-.2-1.8zM12 5.3c1 .7 1.8 1.9 2.3 3.5H9.7c.5-1.6 1.3-2.9 2.3-3.5zM10 5c-.8 1-1.4 2.3-1.8 3.8H5.5C6.4 7 8 5.6 10 5zM5.5 15.3h2.6c.4 1.5 1 2.8 1.8 3.7-1.8-.6-3.5-2-4.4-3.7zM14 19c.8-1 1.4-2.2 1.8-3.7h2.6C17.6 17 16 18.4 14 19z"}));const OS={post:AS,page:_k,post_tag:xS,category:BS,attachment:PS};function NS(e){let{isURL:t,suggestion:n}=e,r=null;return t?r=TS:n.type in OS&&(r=OS[n.type]),r?(0,u.createElement)(Xi,{className:"block-editor-link-control__search-item-icon",icon:r}):null}var MS=e=>{let{itemProps:t,suggestion:n,isSelected:r=!1,onClick:o,isURL:i=!1,searchTerm:l="",shouldShowType:a=!1}=e;return(0,u.createElement)(g.Button,c({},t,{onClick:o,className:d()("block-editor-link-control__search-item",{"is-selected":r,"is-url":i,"is-entity":!i})}),(0,u.createElement)(NS,{suggestion:n,isURL:i}),(0,u.createElement)("span",{className:"block-editor-link-control__search-item-header"},(0,u.createElement)("span",{className:"block-editor-link-control__search-item-title"},(0,u.createElement)(g.TextHighlight,{text:n.title,highlight:l})),(0,u.createElement)("span",{"aria-hidden":!i,className:"block-editor-link-control__search-item-info"},!i&&((0,sm.filterURLForDisplay)((0,sm.safeDecodeURI)(n.url))||""),i&&(0,_.__)("Press ENTER to add this link"))),a&&n.type&&(0,u.createElement)("span",{className:"block-editor-link-control__search-item-type"},function(e){if(e.isFrontPage)return"front page";return"post_tag"===e.type?"tag":e.type}(n)))};const RS="__CREATE__",FS="mailto",LS="internal",DS=["URL",FS,"tel",LS],US=[{id:"opensInNewTab",title:(0,_.__)("Open in new tab")}];function jS(e){let{instanceId:t,withCreateSuggestion:n,currentInputValue:r,handleSuggestionClick:o,suggestionsListProps:i,buildSuggestionItemProps:l,suggestions:a,selectedSuggestion:s,isLoading:p,isInitialSuggestions:f,createSuggestionButtonText:m,suggestionsQuery:y}=e;const h=d()("block-editor-link-control__search-results",{"is-loading":p}),v=1===a.length&&DS.includes(a[0].type),b=n&&!v&&!f,k=!(null!=y&&y.type),E=`block-editor-link-control-search-results-label-${t}`,S=f?(0,_.__)("Recently updated"):(0,_.sprintf)((0,_.__)('Search results for "%s"'),r),w=(0,u.createElement)(f?u.Fragment:g.VisuallyHidden,{},(0,u.createElement)("span",{className:"block-editor-link-control__search-results-label",id:E},S));return(0,u.createElement)("div",{className:"block-editor-link-control__search-results-wrapper"},w,(0,u.createElement)("div",c({},i,{className:h,"aria-labelledby":E}),a.map(((e,t)=>b&&RS===e.type?(0,u.createElement)(IS,{searchTerm:r,buttonText:m,onClick:()=>o(e),key:e.type,itemProps:l(e,t),isSelected:t===s}):RS===e.type?null:(0,u.createElement)(MS,{key:`${e.id}-${e.type}`,itemProps:l(e,t),suggestion:e,index:t,onClick:()=>{o(e)},isSelected:t===s,isURL:DS.includes(e.type),searchTerm:r,shouldShowType:k,isFrontPage:null==e?void 0:e.isFrontPage})))))}function zS(e){const t=null==e?void 0:e.startsWith("#");return(0,sm.isURL)(e)||e&&e.includes("www.")||t}const VS=()=>Promise.resolve([]),GS=e=>{let t="URL";const n=(0,sm.getProtocol)(e)||"";return n.includes("mailto")&&(t=FS),n.includes("tel")&&(t="tel"),null!=e&&e.startsWith("#")&&(t=LS),Promise.resolve([{id:e,title:e,url:"URL"===t?(0,sm.prependHTTP)(e):e,type:t}])};function HS(e,t,n,r){const{fetchSearchSuggestions:o,pageOnFront:i}=(0,m.useSelect)((e=>{const{getSettings:t}=e(xr);return{pageOnFront:t().pageOnFront,fetchSearchSuggestions:t().__experimentalFetchLinkSuggestions}}),[]),l=t?GS:VS;return(0,u.useCallback)(((t,a)=>{let{isInitialSuggestions:s}=a;return zS(t)?l(t,{isInitialSuggestions:s}):(async(e,t,n,r,o,i,l)=>{const{isInitialSuggestions:a}=t;let s=!1,c=await Promise.all([n(e,t),r(e)]);c[0]=c[0].map((e=>Number(e.id)===l?(s=!0,e.isFrontPage=!0,e):e));const u=!e.includes(" ");return c=!s&&u&&i&&!a?c[0].concat(c[1]):c[0],a||zS(e)||!o?c:c.concat({title:e,url:e,type:RS})})(t,{...e,isInitialSuggestions:s},o,l,n,r,i)}),[l,o,n])}const WS=()=>Promise.resolve([]),$S=()=>{},KS=(0,u.forwardRef)(((e,t)=>{let{value:n,children:r,currentLink:o={},className:i=null,placeholder:l=null,withCreateSuggestion:a=!1,onCreateSuggestion:s=$S,onChange:c=$S,onSelect:p=$S,showSuggestions:m=!0,renderSuggestions:y=(e=>(0,u.createElement)(jS,e)),fetchSuggestions:g=null,allowDirectEntry:h=!0,showInitialSuggestions:v=!1,suggestionsQuery:b={},withURLSuggestion:k=!0,createSuggestionButtonText:E,useLabel:S=!1}=e;const w=HS(b,h,a,k),C=m?g||w:WS,I=(0,f.useInstanceId)(KS),[A,x]=(0,u.useState)(),B=async e=>{let t=e;if(RS!==e.type){if(h||t&&Object.keys(t).length>=1){const{id:e,url:n,...r}=null!=o?o:{};p({...r,...t},t)}}else try{var n;t=await s(e.title),null!==(n=t)&&void 0!==n&&n.url&&p(t)}catch(e){}},P=d()(i,{"has-no-label":!S});return(0,u.createElement)("div",{className:"block-editor-link-control__search-input-container"},(0,u.createElement)(CS,{__nextHasNoMarginBottom:!0,label:S?"URL":void 0,className:P,value:n,onChange:(e,t)=>{c(e),x(t)},placeholder:null!=l?l:(0,_.__)("Search or type url"),__experimentalRenderSuggestions:m?e=>y({...e,instanceId:I,withCreateSuggestion:a,createSuggestionButtonText:E,suggestionsQuery:b,handleSuggestionClick:t=>{e.handleSuggestionClick&&e.handleSuggestionClick(t),B(t)}}):null,__experimentalFetchLinkSuggestions:C,__experimentalHandleURLSuggestions:!0,__experimentalShowInitialSuggestions:v,onSubmit:(e,t)=>{var r;const o=e||A;o||null!=n&&null!==(r=n.trim())&&void 0!==r&&r.length?B(o||{url:n}):t.preventDefault()},ref:t}),r)}));var qS=KS;var JS=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M12 3.2c-4.8 0-8.8 3.9-8.8 8.8 0 4.8 3.9 8.8 8.8 8.8 4.8 0 8.8-3.9 8.8-8.8 0-4.8-4-8.8-8.8-8.8zm0 16c-4 0-7.2-3.3-7.2-7.2C4.8 8 8 4.8 12 4.8s7.2 3.3 7.2 7.2c0 4-3.2 7.2-7.2 7.2zM11 17h2v-6h-2v6zm0-8h2V7h-2v2z"}));var YS=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{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"}));const{Slot:QS,Fill:ZS}=(0,g.createSlotFill)("BlockEditorLinkControlViewer");function XS(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}`)}}var ew=function(e){const[t,n]=(0,u.useReducer)(XS,{richData:null,isFetching:!1}),{fetchRichUrlData:r}=(0,m.useSelect)((e=>{const{getSettings:t}=e(xr);return{fetchRichUrlData:t().__experimentalFetchRichUrlData}}),[]);return(0,u.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};function tw(e){var t;let{value:n,onEditClick:r,hasRichPreviews:o=!1,hasUnlinkControl:i=!1,onRemove:l}=e;const a=o?null==n?void 0:n.url:null,{richData:s,isFetching:c}=ew(a),p=s&&Object.keys(s).length,f=n&&(0,sm.filterURLForDisplay)((0,sm.safeDecodeURI)(n.url),16)||"",m=(null==s?void 0:s.title)||(null==n?void 0:n.title)||f,y=!(null!=n&&null!==(t=n.url)&&void 0!==t&&t.length);let h;return h=null!=s&&s.icon?(0,u.createElement)("img",{src:null==s?void 0:s.icon,alt:""}):y?(0,u.createElement)(Xi,{icon:JS,size:32}):(0,u.createElement)(Xi,{icon:TS}),(0,u.createElement)("div",{"aria-label":(0,_.__)("Currently selected"),className:d()("block-editor-link-control__search-item",{"is-current":!0,"is-rich":p,"is-fetching":!!c,"is-preview":!0,"is-error":y})},(0,u.createElement)("div",{className:"block-editor-link-control__search-item-top"},(0,u.createElement)("span",{className:"block-editor-link-control__search-item-header"},(0,u.createElement)("span",{className:d()("block-editor-link-control__search-item-icon",{"is-image":null==s?void 0:s.icon})},h),(0,u.createElement)("span",{className:"block-editor-link-control__search-item-details"},y?(0,u.createElement)("span",{className:"block-editor-link-control__search-item-error-notice"},(0,_.__)("Link is empty")):(0,u.createElement)(u.Fragment,null,(0,u.createElement)(g.ExternalLink,{className:"block-editor-link-control__search-item-title",href:n.url},(0,Ml.__unstableStripHTML)(m)),(null==n?void 0:n.url)&&(0,u.createElement)("span",{className:"block-editor-link-control__search-item-info"},f)))),(0,u.createElement)(g.Button,{icon:YS,label:(0,_.__)("Edit"),className:"block-editor-link-control__search-item-action",onClick:r,iconSize:24}),i&&(0,u.createElement)(g.Button,{icon:So,label:(0,_.__)("Unlink"),className:"block-editor-link-control__search-item-action block-editor-link-control__unlink",onClick:l,iconSize:24}),(0,u.createElement)(QS,{fillProps:n})),!!(p&&(null!=s&&s.image||null!=s&&s.description)||c)&&(0,u.createElement)("div",{className:"block-editor-link-control__search-item-bottom"},((null==s?void 0:s.image)||c)&&(0,u.createElement)("div",{"aria-hidden":!(null!=s&&s.image),className:d()("block-editor-link-control__search-item-image",{"is-placeholder":!(null!=s&&s.image)})},(null==s?void 0:s.image)&&(0,u.createElement)("img",{src:null==s?void 0:s.image,alt:""})),((null==s?void 0:s.description)||c)&&(0,u.createElement)("div",{"aria-hidden":!(null!=s&&s.description),className:d()("block-editor-link-control__search-item-description",{"is-placeholder":!(null!=s&&s.description)})},(null==s?void 0:s.description)&&(0,u.createElement)(g.__experimentalText,{truncate:!0,numberOfLines:"2"},s.description))))}const nw=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}}};function rw(e){const[t,n]=(0,u.useState)(e||"");return(0,u.useEffect)((()=>{e&&e!==t&&n(e)}),[e]),[t,n]}const ow=()=>{};function iw(e){var t,n,r;let{searchInputPlaceholder:o,value:i,settings:l=US,onChange:a=ow,onRemove:s,noDirectEntry:c=!1,showSuggestions:p=!0,showInitialSuggestions:f,forceIsEditingLink:m,createSuggestion:y,withCreateSuggestion:h,inputValue:v="",suggestionsQuery:b={},noURLSuggestion:k=!1,createSuggestionButtonText:E,hasRichPreviews:S=!1,hasTextControl:w=!1,renderControlBottom:C=null}=e;void 0===h&&y&&(h=!0);const I=(0,u.useRef)(!0),A=(0,u.useRef)(),x=(0,u.useRef)(),B=(0,u.useRef)(!1),[P,T]=rw((null==i?void 0:i.url)||""),[O,N]=rw((null==i?void 0:i.title)||""),[M,R]=(0,u.useState)(void 0!==m?m:!i||!i.url),{createPage:F,isCreatingPage:L,errorMessage:D}=function(e){const t=(0,u.useRef)(),[n,r]=(0,u.useState)(!1),[o,i]=(0,u.useState)(null);return(0,u.useEffect)((()=>()=>{t.current&&t.current.cancel()}),[]),{createPage:async function(n){r(!0),i(null);try{return t.current=nw(Promise.resolve(e(n))),await t.current.promise}catch(e){if(e&&e.isCanceled)return;throw i(e.message||(0,_.__)("An unknown error occurred during creation. Please try again.")),e}finally{r(!1)}},isCreatingPage:n,errorMessage:o}}(y);(0,u.useEffect)((()=>{void 0!==m&&m!==M&&R(m)}),[m]),(0,u.useEffect)((()=>{if(I.current)return void(I.current=!1);const e=null!=x&&x.current?1:0;(Ml.focus.focusable.find(A.current)[e]||A.current).focus(),B.current=!1}),[M,L]);const U=()=>{var e;B.current=!(null===(e=A.current)||void 0===e||!e.contains(A.current.ownerDocument.activeElement)),R(!1)},j=()=>{z===(null==i?void 0:i.url)&&O===(null==i?void 0:i.title)||a({...i,url:z,title:O}),U()},z=v||P,V=!(null!=z&&null!==(t=z.trim())&&void 0!==t&&t.length),G=s&&i&&!M&&!L,H=!(null==l||!l.length),W=(null==i||null===(n=i.url)||void 0===n||null===(r=n.trim())||void 0===r?void 0:r.length)>0&&w;return(0,u.createElement)("div",{tabIndex:-1,ref:A,className:"block-editor-link-control"},L&&(0,u.createElement)("div",{className:"block-editor-link-control__loading"},(0,u.createElement)(g.Spinner,null)," ",(0,_.__)("Creating"),"…"),(M||!i)&&!L&&(0,u.createElement)(u.Fragment,null,(0,u.createElement)("div",{className:d()({"block-editor-link-control__search-input-wrapper":!0,"has-text-control":W})},W&&(0,u.createElement)(g.TextControl,{__nextHasNoMarginBottom:!0,ref:x,className:"block-editor-link-control__field block-editor-link-control__text-content",label:"Text",value:O,onChange:N,onKeyDown:e=>{const{keyCode:t}=e;t!==Xu.ENTER||V||(e.preventDefault(),j())}}),(0,u.createElement)(qS,{currentLink:i,className:"block-editor-link-control__field block-editor-link-control__search-input",placeholder:o,value:z,withCreateSuggestion:h,onCreateSuggestion:F,onChange:T,onSelect:e=>{a({...e,title:O||(null==e?void 0:e.title)}),U()},showInitialSuggestions:f,allowDirectEntry:!c,showSuggestions:p,suggestionsQuery:b,withURLSuggestion:!k,createSuggestionButtonText:E,useLabel:W},(0,u.createElement)("div",{className:"block-editor-link-control__search-actions"},(0,u.createElement)(g.Button,{onClick:j,label:(0,_.__)("Submit"),icon:vS,className:"block-editor-link-control__search-submit",disabled:V})))),D&&(0,u.createElement)(g.Notice,{className:"block-editor-link-control__search-error",status:"error",isDismissible:!1},D)),i&&!M&&!L&&(0,u.createElement)(tw,{key:null==i?void 0:i.url,value:i,onEditClick:()=>R(!0),hasRichPreviews:S,hasUnlinkControl:G,onRemove:s}),H&&(0,u.createElement)("div",{className:"block-editor-link-control__tools"},(0,u.createElement)(_S,{value:i,settings:l,onChange:a})),C&&C())}iw.ViewerFill=ZS;var lw=iw;var aw=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{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"}));var sw=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{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"}));var cw=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M19 3H5c-.6 0-1 .4-1 1v7c0 .5.4 1 1 1h14c.5 0 1-.4 1-1V4c0-.6-.4-1-1-1zM5.5 10.5v-.4l1.8-1.3 1.3.8c.3.2.7.2.9-.1L11 8.1l2.4 2.4H5.5zm13 0h-2.9l-4-4c-.3-.3-.8-.3-1.1 0L8.9 8l-1.2-.8c-.3-.2-.6-.2-.9 0l-1.3 1V4.5h13v6zM4 20h9v-1.5H4V20zm0-4h16v-1.5H4V16z"}));const uw=()=>{};let pw=0;var dw=(0,f.compose)([(0,m.withDispatch)((e=>{const{createNotice:t,removeNotice:n}=e(bf.store);return{createNotice:t,removeNotice:n}})),(0,g.withFilters)("editor.MediaReplaceFlow")])((e=>{let{mediaURL:t,mediaId:n,mediaIds:r,allowedTypes:o,accept:i,onError:l,onSelect:a,onSelectURL:s,onToggleFeaturedImage:c,useFeaturedImage:p,onFilesUpload:d=uw,name:f=(0,_.__)("Replace"),createNotice:y,removeNotice:h,children:v,multiple:b=!1,addToGallery:k,handleUpload:E=!0}=e;const S=(0,m.useSelect)((e=>e(xr).getSettings().mediaUpload),[]),w=(0,u.useRef)(),C="block-editor/media-replace-flow/error-notice/"+ ++pw,I=e=>{const t=(0,Ml.__unstableStripHTML)(e);l?l(t):setTimeout((()=>{y("error",t,{speak:!0,id:C,isDismissible:!0})}),1e3)},A=(e,t)=>{p&&c&&c(),t(),a(e),(0,dn.speak)((0,_.__)("The media file has been replaced")),h(C)},x=e=>{e.keyCode===Xu.DOWN&&(e.preventDefault(),e.target.click())},B=b&&!(!o||0===o.length)&&o.every((e=>"image"===e||e.startsWith("image/")));return(0,u.createElement)(g.Dropdown,{popoverProps:{variant:"toolbar"},contentClassName:"block-editor-media-replace-flow__options",renderToggle:e=>{let{isOpen:t,onToggle:n}=e;return(0,u.createElement)(g.ToolbarButton,{ref:w,"aria-expanded":t,"aria-haspopup":"true",onClick:n,onKeyDown:x},f)},renderContent:e=>{let{onClose:l}=e;return(0,u.createElement)(u.Fragment,null,(0,u.createElement)(g.NavigableMenu,{className:"block-editor-media-replace-flow__media-upload-menu"},(0,u.createElement)(u.Fragment,null,(0,u.createElement)(Am,{gallery:B,addToGallery:k,multiple:b,value:b?r:n,onSelect:e=>A(e,l),allowedTypes:o,render:e=>{let{open:t}=e;return(0,u.createElement)(g.MenuItem,{icon:aw,onClick:t},(0,_.__)("Open Media Library"))}}),(0,u.createElement)(Im,null,(0,u.createElement)(g.FormFileUpload,{onChange:e=>{((e,t)=>{const n=e.target.files;if(!E)return t(),a(n);d(n),S({allowedTypes:o,filesList:n,onFileChange:e=>{let[n]=e;A(n,t)},onError:I})})(e,l)},accept:i,multiple:b,render:e=>{let{openFileDialog:t}=e;return(0,u.createElement)(g.MenuItem,{icon:sw,onClick:()=>{t()}},(0,_.__)("Upload"))}}))),c&&(0,u.createElement)(g.MenuItem,{icon:cw,onClick:c,isPressed:p},(0,_.__)("Use featured image")),v),s&&(0,u.createElement)("form",{className:"block-editor-media-flow__url-input"},(0,u.createElement)("span",{className:"block-editor-media-replace-flow__image-url-label"},(0,_.__)("Current media URL:")),(0,u.createElement)(g.Tooltip,{text:t,position:"bottom"},(0,u.createElement)("div",null,(0,u.createElement)(lw,{value:{url:t},settings:[],showSuggestions:!1,onChange:e=>{let{url:t}=e;s(t),w.current.focus()}})))))}})}));function fw(e){let{url:t,urlLabel:n,className:r}=e;const o=d()(r,"block-editor-url-popover__link-viewer-url");return t?(0,u.createElement)(g.ExternalLink,{className:o,href:t},n||(0,sm.filterURLForDisplay)((0,sm.safeDecodeURI)(t))):(0,u.createElement)("span",{className:o})}const{__experimentalPopoverLegacyPositionToPlacement:mw}=Ir(g.privateApis);function yw(e){let t,{additionalControls:n,children:r,renderSettings:o,placement:i,focusOnMount:l="firstElement",position:a,...s}=e;void 0!==a&&$()("`position` prop in wp.blockEditor.URLPopover",{since:"6.2",alternative:"`placement` prop"}),void 0!==i?t=i:void 0!==a&&(t=mw(a)),t=t||"bottom";const[p,d]=(0,u.useState)(!1),f=!!o&&p;return(0,u.createElement)(g.Popover,c({className:"block-editor-url-popover",focusOnMount:l,placement:t,shift:!0},s),(0,u.createElement)("div",{className:"block-editor-url-popover__input-container"},(0,u.createElement)("div",{className:"block-editor-url-popover__row"},r,!!o&&(0,u.createElement)(g.Button,{className:"block-editor-url-popover__settings-toggle",icon:fy,label:(0,_.__)("Link settings"),onClick:()=>{d(!p)},"aria-expanded":p})),f&&(0,u.createElement)("div",{className:"block-editor-url-popover__row block-editor-url-popover__settings"},o())),n&&!f&&(0,u.createElement)("div",{className:"block-editor-url-popover__additional-controls"},n))}yw.LinkEditor=function(e){let{autocompleteRef:t,className:n,onChangeInputValue:r,value:o,...i}=e;return(0,u.createElement)("form",c({className:d()("block-editor-url-popover__link-editor",n)},i),(0,u.createElement)(CS,{__nextHasNoMarginBottom:!0,value:o,onChange:r,autocompleteRef:t}),(0,u.createElement)(g.Button,{icon:vS,label:(0,_.__)("Apply"),type:"submit"}))},yw.LinkViewer=function(e){let{className:t,linkClassName:n,onEditLinkClick:r,url:o,urlLabel:i,...l}=e;return(0,u.createElement)("div",c({className:d()("block-editor-url-popover__link-viewer",t)},l),(0,u.createElement)(fw,{url:o,urlLabel:i,className:n}),r&&(0,u.createElement)(g.Button,{icon:YS,label:(0,_.__)("Edit"),onClick:r}))};var gw=yw;const hw=()=>{},vw=e=>{let{src:t,onChange:n,onSubmit:r,onClose:o}=e;return(0,u.createElement)(gw,{onClose:o},(0,u.createElement)("form",{className:"block-editor-media-placeholder__url-input-form",onSubmit:r},(0,u.createElement)("input",{className:"block-editor-media-placeholder__url-input-field",type:"text","aria-label":(0,_.__)("URL"),placeholder:(0,_.__)("Paste or type URL"),onChange:n,value:t}),(0,u.createElement)(g.Button,{className:"block-editor-media-placeholder__url-input-submit-button",icon:vS,label:(0,_.__)("Apply"),type:"submit"})))};var bw=(0,g.withFilters)("editor.MediaPlaceholder")((function(e){let{value:t={},allowedTypes:n,className:r,icon:o,labels:i={},mediaPreview:l,notices:a,isAppender:s,accept:c,addToGallery:p,multiple:f=!1,handleUpload:y=!0,disableDropZone:h,disableMediaButtons:v,onError:b,onSelect:k,onCancel:E,onSelectURL:S,onToggleFeaturedImage:w,onDoubleClick:C,onFilesPreUpload:I=hw,onHTMLDrop:A=hw,children:x,mediaLibraryButton:B,placeholder:P,style:T}=e;const O=(0,m.useSelect)((e=>{const{getSettings:t}=e(xr);return t().mediaUpload}),[]),[N,M]=(0,u.useState)(""),[R,F]=(0,u.useState)(!1);(0,u.useEffect)((()=>{var e;M(null!==(e=null==t?void 0:t.src)&&void 0!==e?e:"")}),[null==t?void 0:t.src]);const L=e=>{M(e.target.value)},D=()=>{F(!0)},U=()=>{F(!1)},j=e=>{e.preventDefault(),N&&S&&(S(N),U())},z=e=>{if(!y)return k(e);let r;if(I(e),f)if(p){let e=[];r=n=>{const r=(null!=t?t:[]).filter((t=>t.id?!e.some((e=>{let{id:n}=e;return Number(n)===Number(t.id)})):!e.some((e=>{let{urlSlug:n}=e;return t.url.includes(n)}))));k(r.concat(n)),e=n.map((e=>{const t=e.url.lastIndexOf("."),n=e.url.slice(0,t);return{id:e.id,urlSlug:n}}))}}else r=k;else r=e=>{let[t]=e;return k(t)};O({allowedTypes:n,filesList:e,onFileChange:r,onError:b})},V=e=>{z(e.target.files)},G=null!=P?P:e=>{let{instructions:t,title:c}=i;if(O||S||(t=(0,_.__)("To edit this block, you need permission to upload media.")),void 0===t||void 0===c){const e=null!=n?n:[],[r]=e,o=1===e.length,i=o&&"audio"===r,l=o&&"image"===r,a=o&&"video"===r;void 0===t&&O&&(t=(0,_.__)("Upload a media file or pick one from your media library."),i?t=(0,_.__)("Upload an audio file, pick one from your media library, or add one with a URL."):l?t=(0,_.__)("Upload an image file, pick one from your media library, or add one with a URL."):a&&(t=(0,_.__)("Upload a video file, pick one from your media library, or add one with a URL."))),void 0===c&&(c=(0,_.__)("Media"),i?c=(0,_.__)("Audio"):l?c=(0,_.__)("Image"):a&&(c=(0,_.__)("Video")))}const p=d()("block-editor-media-placeholder",r,{"is-appender":s});return(0,u.createElement)(g.Placeholder,{icon:o,label:c,instructions:t,className:p,notices:a,onDoubleClick:C,preview:l,style:T},e,x)},H=()=>h?null:(0,u.createElement)(g.DropZone,{onFilesDrop:z,onHTMLDrop:A}),W=()=>E&&(0,u.createElement)(g.Button,{className:"block-editor-media-placeholder__cancel-button",title:(0,_.__)("Cancel"),variant:"link",onClick:E},(0,_.__)("Cancel")),$=()=>S&&(0,u.createElement)("div",{className:"block-editor-media-placeholder__url-input-container"},(0,u.createElement)(g.Button,{className:"block-editor-media-placeholder__button",onClick:D,isPressed:R,variant:"tertiary"},(0,_.__)("Insert from URL")),R&&(0,u.createElement)(vw,{src:N,onChange:L,onSubmit:j,onClose:U})),K=()=>w&&(0,u.createElement)("div",{className:"block-editor-media-placeholder__url-input-container"},(0,u.createElement)(g.Button,{className:"block-editor-media-placeholder__button",onClick:w,variant:"tertiary"},(0,_.__)("Use featured image")));return v?(0,u.createElement)(Im,null,H()):(0,u.createElement)(Im,{fallback:G($())},(()=>{const e=null!=B?B:e=>{let{open:t}=e;return(0,u.createElement)(g.Button,{variant:"tertiary",onClick:()=>{t()}},(0,_.__)("Media Library"))},r=(0,u.createElement)(Am,{addToGallery:p,gallery:f&&!(!n||0===n.length)&&n.every((e=>"image"===e||e.startsWith("image/"))),multiple:f,onSelect:k,allowedTypes:n,mode:"browse",value:Array.isArray(t)?t.map((e=>{let{id:t}=e;return t})):t.id,render:e});if(O&&s)return(0,u.createElement)(u.Fragment,null,H(),(0,u.createElement)(g.FormFileUpload,{onChange:V,accept:c,multiple:f,render:e=>{let{openFileDialog:t}=e;const n=(0,u.createElement)(u.Fragment,null,(0,u.createElement)(g.Button,{variant:"primary",className:d()("block-editor-media-placeholder__button","block-editor-media-placeholder__upload-button"),onClick:t},(0,_.__)("Upload")),r,$(),K(),W());return G(n)}}));if(O){const e=(0,u.createElement)(u.Fragment,null,H(),(0,u.createElement)(g.FormFileUpload,{variant:"primary",className:d()("block-editor-media-placeholder__button","block-editor-media-placeholder__upload-button"),onChange:V,accept:c,multiple:f},(0,_.__)("Upload")),r,$(),K(),W());return G(e)}return G(r)})())}));var _w=e=>{let{colorSettings:t,...n}=e;const r=t.map((e=>{if(!e)return e;const{value:t,onChange:n,...r}=e;return{...r,colorValue:t,onColorChange:n}}));return(0,u.createElement)(RE,c({settings:r,gradients:[],disableCustomGradients:!0},n))};const kw={position:"bottom right",variant:"toolbar"};var Ew=()=>(0,u.createElement)(u.Fragment,null,["bold","italic","link","unknown"].map((e=>(0,u.createElement)(g.Slot,{name:`RichText.ToolbarControls.${e}`,key:e}))),(0,u.createElement)(g.Slot,{name:"RichText.ToolbarControls"},(e=>{if(!e.length)return null;const t=e.map((e=>{let[{props:t}]=e;return t})).some((e=>{let{isActive:t}=e;return t}));return(0,u.createElement)(g.ToolbarItem,null,(n=>(0,u.createElement)(g.DropdownMenu,{icon:fy,label:(0,_.__)("More"),toggleProps:{...n,className:d()(n.className,{"is-pressed":t}),describedBy:(0,_.__)("Displays more block tools")},controls:J(e.map((e=>{let[{props:t}]=e;return t})),"title"),popoverProps:kw})))})));function Sw(e){let{value:t,editableContentElement:n,activeFormats:r}=e;const o=r[r.length-1],i=null==o?void 0:o.type,l=(0,m.useSelect)((e=>e(H.store).getFormatType(i)),[i]),a=(0,H.useAnchor)({editableContentElement:n,value:t,settings:l});return(0,u.createElement)(ww,{popoverAnchor:a})}function ww(e){let{popoverAnchor:t}=e;return(0,u.createElement)(g.Popover,{placement:"top",focusOnMount:!1,anchor:t,className:"block-editor-rich-text__inline-format-toolbar",__unstableSlotName:"block-toolbar"},(0,u.createElement)(Cy,{className:"block-editor-rich-text__inline-format-toolbar-group","aria-label":(0,_.__)("Format tools")},(0,u.createElement)(g.ToolbarGroup,null,(0,u.createElement)(Ew,null))))}var Cw=e=>{let{inline:t,editableContentElement:n,value:r}=e;const o=(0,m.useSelect)((e=>e(xr).getSettings().hasInlineToolbar),[]);if(t)return(0,u.createElement)(ww,{popoverAnchor:n});if(o){const e=(0,H.getActiveFormats)(r);return(0,H.isCollapsed)(r)&&!e.length?null:(0,u.createElement)(Sw,{editableContentElement:n,value:r,activeFormats:e})}return(0,u.createElement)(Ur,{group:"inline"},(0,u.createElement)(Ew,null))};function Iw(){const{didAutomaticChange:e,getSettings:t}=(0,m.useSelect)(xr);return(0,f.useRefEffect)((n=>{function r(n){const{keyCode:r}=n;if(n.defaultPrevented)return;if(r!==Xu.DELETE&&r!==Xu.BACKSPACE&&r!==Xu.ESCAPE)return;const{__experimentalUndo:o}=t();o&&e()&&(n.preventDefault(),o())}return n.addEventListener("keydown",r),()=>{n.removeEventListener("keydown",r)}}),[])}var Aw=window.wp.shortcode;function xw(e,t){if(null!=t&&t.length){let n=e.formats.length;for(;n--;)e.formats[n]=[...t,...e.formats[n]||[]]}}function Bw(e){if(!0===e||"p"===e||"li"===e)return!0===e?"p":e}function Pw(e){let{allowedFormats:t,disableFormats:n}=e;return n?Pw.EMPTY_ARRAY:t}Pw.EMPTY_ARRAY=[];function Tw(e){let{value:t,pastedBlocks:n=[],onReplace:r,onSplit:o,onSplitMiddle:i,multilineTag:l}=e;if(!r||!o)return;const{start:a=0,end:s=0}=t,c={...t,start:a,end:s},u=[],[p,d]=(0,H.split)(c),f=n.length>0;let m=-1;const y=(0,H.isEmpty)(p)&&!(0,H.isEmpty)(d);f&&(0,H.isEmpty)(p)||(u.push(o((0,H.toHTMLString)({value:p,multilineTag:l}),!y)),m+=1),f?(u.push(...n),m+=n.length):i&&u.push(i()),(f||i)&&(0,H.isEmpty)(d)||u.push(o((0,H.toHTMLString)({value:d,multilineTag:l}),y));r(u,f?m:1,f?-1:0)}function Ow(e,t){return t?(0,H.replace)(e,/\n+/g,H.__UNSTABLE_LINE_SEPARATOR):(0,H.replace)(e,new RegExp(H.__UNSTABLE_LINE_SEPARATOR,"g"),"\n")}function Nw(e){const t=(0,u.useRef)(e);return t.current=e,(0,f.useRefEffect)((e=>{function n(e){const{isSelected:n,disableFormats:r,onChange:o,value:i,formatTypes:l,tagName:s,onReplace:c,onSplit:u,onSplitMiddle:p,__unstableEmbedURLOnPaste:d,multilineTag:f,preserveWhiteSpace:m,pastePlainText:y}=t.current;if(!n)return;const{clipboardData:g}=e;let h="",v="";try{h=g.getData("text/plain"),v=g.getData("text/html")}catch(e){try{v=g.getData("Text")}catch(e){return}}if(v=function(e){const t="\x3c!--StartFragment--\x3e",n=e.indexOf(t);if(!(n>-1))return e;e=e.substring(n+t.length);const r="\x3c!--EndFragment--\x3e",o=e.indexOf(r);o>-1&&(e=e.substring(0,o));return e}(v),v=function(e){const t="<meta charset='utf-8'>";if(e.startsWith(t))return e.slice(t.length);return e}(v),e.preventDefault(),window.console.log("Received HTML:\n\n",v),window.console.log("Received plain text:\n\n",h),r)return void o((0,H.insert)(i,h));const b=l.reduce(((e,t)=>{let{__unstablePasteRule:n}=t;return n&&e===i&&(e=n(i,{html:v,plainText:h})),e}),i);if(b!==i)return void o(b);const _=[...(0,Ml.getFilesFromDataTransfer)(g)];if("true"===g.getData("rich-text")){const e=g.getData("rich-text-multi-line-tag")||void 0;let t=(0,H.create)({html:v,multilineTag:e,multilineWrapperTags:"li"===e?["ul","ol"]:void 0,preserveWhiteSpace:m});return t=Ow(t,!!f),xw(t,i.activeFormats),void o((0,H.insert)(i,t))}if(y)return void o((0,H.insert)(i,(0,H.create)({text:h})));if(null!=_&&_.length&&window.console.log("Received items:\n\n",_),null!=_&&_.length&&!ig(_,v)){const e=(0,a.getBlockTransforms)("from"),t=_.reduce(((t,n)=>{const r=(0,a.findTransform)(e,(e=>"files"===e.type&&e.isMatch([n])));return r&&t.push(r.transform([n])),t}),[]).flat();if(!t.length)return;return void(c&&(0,H.isEmpty)(i)?c(t):Tw({value:i,pastedBlocks:t,onReplace:c,onSplit:u,onSplitMiddle:p,multilineTag:f}))}let k=c&&u?"AUTO":"INLINE";var E;"AUTO"===k&&(0,H.isEmpty)(i)&&(E=h,(0,Aw.regexp)(".*").test(E))&&(k="BLOCKS"),d&&(0,H.isEmpty)(i)&&(0,sm.isURL)(h.trim())&&(k="BLOCKS");const S=(0,a.pasteHandler)({HTML:v,plainText:h,mode:k,tagName:s,preserveWhiteSpace:m});if("string"==typeof S){let e=(0,H.create)({html:S});e=Ow(e,!!f),xw(e,i.activeFormats),o((0,H.insert)(i,e))}else S.length>0&&(c&&(0,H.isEmpty)(i)?c(S,S.length-1,-1):Tw({value:i,pastedBlocks:S,onReplace:c,onSplit:u,onSplitMiddle:p,multilineTag:f}))}return e.addEventListener("paste",n),()=>{e.removeEventListener("paste",n)}}),[])}const Mw=["`",'"',"'","“â€","‘’"];function Rw(e){const{__unstableMarkLastChangeAsPersistent:t,__unstableMarkAutomaticChange:n}=(0,m.useDispatch)(xr),r=(0,u.useRef)(e);return r.current=e,(0,f.useRefEffect)((e=>{function o(o){const{inputType:i,data:l}=o,{value:a,onChange:c}=r.current;if("insertText"!==i)return;if((0,H.isCollapsed)(a))return;const u=(0,s.applyFilters)("blockEditor.wrapSelectionSettings",Mw).find((e=>{let[t,n]=e;return t===l||n===l}));if(!u)return;const[p,d=p]=u,f=a.start,m=a.end+p.length;let y=(0,H.insert)(a,p,f,f);y=(0,H.insert)(y,d,m,m),t(),c(y),n();const g={};for(const e in o)g[e]=o[e];g.data=d;const{ownerDocument:h}=e,{defaultView:v}=h,b=new v.InputEvent("input",g);window.queueMicrotask((()=>{o.target.dispatchEvent(b)})),o.preventDefault()}return e.addEventListener("beforeinput",o),()=>{e.removeEventListener("beforeinput",o)}}),[])}function Fw(e){let t=e.length;for(;t--;){const n=mn(e[t].attributes);if(n)return e[t].attributes[n]=e[t].attributes[n].replace(fn,""),e[t].clientId;const r=Fw(e[t].innerBlocks);if(r)return r}}function Lw(e){const{__unstableMarkLastChangeAsPersistent:t,__unstableMarkAutomaticChange:n}=(0,m.useDispatch)(xr),r=(0,u.useRef)(e);return r.current=e,(0,f.useRefEffect)((e=>{function o(){const{getValue:e,onReplace:t,selectionChange:o}=r.current;if(!t)return;const i=e(),{start:l,text:s}=i;if(" "!==s.slice(l-1,l))return;const c=s.slice(0,l).trim(),u=(0,a.getBlockTransforms)("from").filter((e=>{let{type:t}=e;return"prefix"===t})),p=(0,a.findTransform)(u,(e=>{let{prefix:t}=e;return c===t}));if(!p)return;const d=(0,H.toHTMLString)({value:(0,H.insert)(i,fn,0,l)}),f=p.transform(d);o(Fw([f])),t([f]),n()}function i(e){const{inputType:i,type:l}=e,{getValue:a,onChange:s,__unstableAllowPrefixTransformations:c,formatTypes:u}=r.current;if("insertText"!==i&&"compositionend"!==l)return;c&&o&&o();const p=a(),d=u.reduce(((e,t)=>{let{__unstableInputRule:n}=t;return n&&(e=n(e)),e}),function(e){const t="tales of gutenberg",{start:n,text:r}=e;return n<t.length||r.slice(n-t.length,n).toLowerCase()!==t?e:(0,H.insert)(e," ðŸ¡ðŸ¢ðŸ¦€ðŸ¤ðŸ¦‹ðŸ˜ðŸ§ðŸ¹ðŸ¦ðŸ¦„ðŸ¦ðŸ¼ðŸ¿ðŸŽƒðŸ´ðŸðŸ†ðŸ¦•ðŸ¦”🌱ðŸ‡Ï€ðŸŒðŸ‰ðŸ’§ðŸ¥¨ðŸŒŒðŸ‚ðŸ 🥦🥚ðŸ¥ðŸŽŸðŸ¥¥ðŸ¥’🛵🥖ðŸ’ðŸ¯ðŸŽ¾ðŸŽ²ðŸºðŸšðŸ®âŒ›ï¸")}(p));d!==p&&(t(),s({...d,activeFormats:p.activeFormats}),n())}return e.addEventListener("input",i),e.addEventListener("compositionend",i),()=>{e.removeEventListener("input",i),e.removeEventListener("compositionend",i)}}),[])}function Dw(e){const{__unstableMarkAutomaticChange:t}=(0,m.useDispatch)(xr),n=(0,u.useRef)(e);return n.current=e,(0,f.useRefEffect)((e=>{function r(e){if(e.defaultPrevented)return;if(e.keyCode!==Xu.ENTER)return;const{removeEditorOnlyFormats:r,value:o,onReplace:i,onSplit:l,onSplitMiddle:s,multilineTag:c,onChange:u,disableLineBreaks:p,onSplitAtEnd:d}=n.current;e.preventDefault();const f={...o};f.formats=r(o);const m=i&&l;if(i){const e=(0,a.getBlockTransforms)("from").filter((e=>{let{type:t}=e;return"enter"===t})),n=(0,a.findTransform)(e,(e=>e.regExp.test(f.text)));n&&(i([n.transform({content:f.text})]),t())}if(c)e.shiftKey?p||u((0,H.insert)(f,"\n")):m&&(0,H.__unstableIsEmptyLine)(f)?Tw({value:f,onReplace:i,onSplit:l,onSplitMiddle:s,multilineTag:c}):u((0,H.__unstableInsertLineSeparator)(f));else{const{text:t,start:n,end:r}=f,o=d&&n===r&&r===t.length;e.shiftKey||!m&&!o?p||u((0,H.insert)(f,"\n")):!m&&o?d():m&&Tw({value:f,onReplace:i,onSplit:l,onSplitMiddle:s,multilineTag:c})}}return e.addEventListener("keydown",r),()=>{e.removeEventListener("keydown",r)}}),[])}function Uw(e){return e(H.store).getFormatTypes()}const jw=new Set(["a","audio","button","details","embed","iframe","input","label","select","textarea","video"]);function zw(e,t){return"object"!=typeof e?{[t]:e}:Object.fromEntries(Object.entries(e).map((e=>{let[n,r]=e;return[`${t}.${n}`,r]})))}function Vw(e,t){return e[t]?e[t]:Object.keys(e).filter((e=>e.startsWith(t+"."))).reduce(((n,r)=>(n[r.slice(t.length+1)]=e[r],n)),{})}function Gw(e){return(0,f.useRefEffect)((t=>{function n(t){for(const n of e.current)n(t)}return t.addEventListener("keydown",n),()=>{t.removeEventListener("keydown",n)}}),[])}function Hw(e){return(0,f.useRefEffect)((t=>{function n(t){for(const n of e.current)n(t)}return t.addEventListener("input",n),()=>{t.removeEventListener("input",n)}}),[])}function Ww(){const{__unstableMarkLastChangeAsPersistent:e}=(0,m.useDispatch)(xr);return(0,f.useRefEffect)((t=>{function n(t){"insertReplacementText"===t.inputType&&e()}return t.addEventListener("beforeinput",n),()=>{t.removeEventListener("beforeinput",n)}}),[])}function $w(){const{isMultiSelecting:e}=(0,m.useSelect)(xr);return(0,f.useRefEffect)((t=>{function n(){if(!e())return;const n=t.parentElement.closest('[contenteditable="true"]');n&&n.focus()}return t.addEventListener("focus",n),()=>{t.removeEventListener("focus",n)}}),[])}function Kw(e){let{formatTypes:t,onChange:n,onFocus:r,value:o,forwardedRef:i}=e;return t.map((e=>{const{name:t,edit:l}=e;if(!l)return null;const a=(0,H.getActiveFormat)(o,t);let s=void 0!==a;const c=(0,H.getActiveObject)(o),p=void 0!==c&&c.type===t;if("core/link"===t&&!(0,H.isCollapsed)(o)){var d,f;const e=o.formats,t=null===(d=e[o.start])||void 0===d?void 0:d.find((e=>{let{type:t}=e;return"core/link"===t})),n=null===(f=e[o.end-1])||void 0===f?void 0:f.find((e=>{let{type:t}=e;return"core/link"===t}));t&&n&&t===n||(s=!1)}return(0,u.createElement)(l,{key:t,isActive:s,activeAttributes:s&&a.attributes||{},isObjectActive:p,activeObjectAttributes:p&&c.attributes||{},value:o,onChange:n,onFocus:r,contentRef:i})}))}const qw=(0,u.createContext)(),Jw=(0,u.createContext)();const Yw=(0,u.forwardRef)((function e(t,n){let{children:r,tagName:o="div",value:i="",onChange:l,isSelected:s,multiline:p,inlineToolbar:y,wrapperClassName:h,autocompleters:v,onReplace:b,placeholder:_,allowedFormats:k,withoutInteractiveFormatting:E,onRemove:S,onMerge:w,onSplit:C,__unstableOnSplitAtEnd:I,__unstableOnSplitMiddle:A,identifier:x,preserveWhiteSpace:B,__unstablePastePlainText:P,__unstableEmbedURLOnPaste:T,__unstableDisableFormats:O,disableLineBreaks:N,unstableOnFocus:M,__unstableAllowPrefixTransformations:R,...F}=t;p&&$()("wp.blockEditor.RichText multiline prop",{since:"6.1",version:"6.3",alternative:"nested blocks (InnerBlocks)",link:"https://developer.wordpress.org/block-editor/how-to-guides/block-tutorial/nested-blocks-inner-blocks/"});const L=(0,f.useInstanceId)(e);x=x||L,F=function(e){const{__unstableMobileNoFocusOnMount:t,deleteEnter:n,placeholderTextColor:r,textAlign:o,selectionColor:i,tagsToEliminate:l,rootTagsToEliminate:a,disableEditingMenu:s,fontSize:c,fontFamily:u,fontWeight:p,fontStyle:d,minWidth:f,maxWidth:m,setRef:y,disableSuggestions:g,disableAutocorrection:h,...v}=e;return v}(F);const D=(0,u.useRef)(),{clientId:U}=Nr(),{selectionStart:j,selectionEnd:z,isSelected:V}=(0,m.useSelect)((e=>{const{getSelectionStart:t,getSelectionEnd:n}=e(xr),r=t(),o=n();let i;return void 0===s?i=r.clientId===U&&o.clientId===U&&r.attributeKey===x:s&&(i=r.clientId===U),{selectionStart:i?r.offset:void 0,selectionEnd:i?o.offset:void 0,isSelected:i}})),{getSelectionStart:G,getSelectionEnd:W,getBlockRootClientId:K}=(0,m.useSelect)(xr),{selectionChange:q}=(0,m.useDispatch)(xr),J=Bw(p),Y=Pw({allowedFormats:k,disableFormats:O}),Q=!Y||Y.length>0;let Z=i,X=l;Array.isArray(i)&&($()("wp.blockEditor.RichText value prop as children type",{since:"6.1",version:"6.3",alternative:"value prop as string",link:"https://developer.wordpress.org/block-editor/how-to-guides/block-tutorial/introducing-attributes-and-editable-fields/"}),Z=a.children.toHTML(i),X=e=>l(a.children.fromDOM((0,H.__unstableCreateElement)(document,e).childNodes)));const ee=(0,u.useCallback)(((e,t)=>{const n={},r=void 0===e&&void 0===t;if("number"==typeof e||r){if(void 0===t&&K(U)!==K(W().clientId))return;n.start={clientId:U,attributeKey:x,offset:e}}if("number"==typeof t||r){if(void 0===e&&K(U)!==K(G().clientId))return;n.end={clientId:U,attributeKey:x,offset:t}}q(n)}),[U,x]),{formatTypes:te,prepareHandlers:ne,valueHandlers:re,changeHandlers:oe,dependencies:ie}=function(e){let{clientId:t,identifier:n,withoutInteractiveFormatting:r,allowedFormats:o}=e;const i=(0,m.useSelect)(Uw,[]),l=(0,u.useMemo)((()=>i.filter((e=>{let{name:t,tagName:n}=e;return!(o&&!o.includes(t)||r&&jw.has(n))}))),[i,o,jw]),a=(0,m.useSelect)((e=>l.reduce(((r,o)=>o.__experimentalGetPropsForEditableTreePreparation?{...r,...zw(o.__experimentalGetPropsForEditableTreePreparation(e,{richTextIdentifier:n,blockClientId:t}),o.name)}:r),{})),[l,t,n]),s=(0,m.useDispatch)(),c=[],p=[],d=[],f=[];for(const e in a)f.push(a[e]);return l.forEach((e=>{if(e.__experimentalCreatePrepareEditableTree){const r=e.__experimentalCreatePrepareEditableTree(Vw(a,e.name),{richTextIdentifier:n,blockClientId:t});e.__experimentalCreateOnChangeEditableValue?p.push(r):c.push(r)}if(e.__experimentalCreateOnChangeEditableValue){let r={};e.__experimentalGetPropsForEditableTreeChangeHandler&&(r=e.__experimentalGetPropsForEditableTreeChangeHandler(s,{richTextIdentifier:n,blockClientId:t}));const o=Vw(a,e.name);d.push(e.__experimentalCreateOnChangeEditableValue({..."object"==typeof o?o:{},...r},{richTextIdentifier:n,blockClientId:t}))}})),{formatTypes:l,prepareHandlers:c,valueHandlers:p,changeHandlers:d,dependencies:f}}({clientId:U,identifier:x,withoutInteractiveFormatting:E,allowedFormats:Y});function le(e){return te.forEach((t=>{t.__experimentalCreatePrepareEditableTree&&(e=(0,H.removeFormat)(e,t.name,0,e.text.length))})),e.formats}const{value:ae,getValue:se,onChange:ce,ref:ue}=(0,H.__unstableUseRichText)({value:Z,onChange(e,t){let{__unstableFormats:n,__unstableText:r}=t;X(e),Object.values(oe).forEach((e=>{e(n,r)}))},selectionStart:j,selectionEnd:z,onSelectionChange:ee,placeholder:_,__unstableIsSelected:V,__unstableMultilineTag:J,__unstableDisableFormats:O,preserveWhiteSpace:B,__unstableDependencies:[...ie,o],__unstableAfterParse:function(e){return re.reduce(((t,n)=>n(t,e.text)),e.formats)},__unstableBeforeSerialize:le,__unstableAddInvisibleFormats:function(e){return ne.reduce(((t,n)=>n(t,e.text)),e.formats)}}),pe=function(e){return(0,g.__unstableUseAutocompleteProps)({...e,completers:wk(e)})}({onReplace:b,completers:v,record:ae,onChange:ce});!function(e){let{html:t,value:n}=e;const r=(0,u.useRef)(),o=n.activeFormats&&!!n.activeFormats.length,{__unstableMarkLastChangeAsPersistent:i}=(0,m.useDispatch)(xr);(0,u.useLayoutEffect)((()=>{if(r.current){if(r.current!==n.text){const e=window.setTimeout((()=>{i()}),1e3);return r.current=n.text,()=>{window.clearTimeout(e)}}i()}else r.current=n.text}),[t,o])}({html:Z,value:ae});const de=(0,u.useRef)(new Set),fe=(0,u.useRef)(new Set);function me(){var e;null===(e=D.current)||void 0===e||e.focus()}const ye=o;return(0,u.createElement)(u.Fragment,null,V&&(0,u.createElement)(qw.Provider,{value:de},(0,u.createElement)(Jw.Provider,{value:fe},(0,u.createElement)(g.Popover.__unstableSlotNameProvider,{value:"__unstable-block-tools-after"},r&&r({value:ae,onChange:ce,onFocus:me}),(0,u.createElement)(Kw,{value:ae,onChange:ce,onFocus:me,formatTypes:te,forwardedRef:D})))),V&&Q&&(0,u.createElement)(Cw,{inline:y,editableContentElement:D.current,value:ae}),(0,u.createElement)(ye,c({role:"textbox","aria-multiline":!N,"aria-label":_},F,pe,{ref:(0,f.useMergeRefs)([n,pe.ref,F.ref,ue,Rw({value:ae,onChange:ce}),Lw({getValue:se,onChange:ce,__unstableAllowPrefixTransformations:R,formatTypes:te,onReplace:b,selectionChange:q}),Ww(),(0,f.useRefEffect)((e=>{function t(e){(Xu.isKeyboardEvent.primary(e,"z")||Xu.isKeyboardEvent.primary(e,"y")||Xu.isKeyboardEvent.primaryShift(e,"z"))&&e.preventDefault()}return e.addEventListener("keydown",t),()=>{e.addEventListener("keydown",t)}}),[]),Gw(de),Hw(fe),Iw(),Nw({isSelected:V,disableFormats:O,onChange:ce,value:ae,formatTypes:te,tagName:o,onReplace:b,onSplit:C,onSplitMiddle:A,__unstableEmbedURLOnPaste:T,multilineTag:J,preserveWhiteSpace:B,pastePlainText:P}),Dw({removeEditorOnlyFormats:le,value:ae,onReplace:b,onSplit:C,onSplitMiddle:A,multilineTag:J,onChange:ce,disableLineBreaks:N,onSplitAtEnd:I}),$w(),D]),contentEditable:!0,suppressContentEditableWarning:!0,className:d()("block-editor-rich-text__editable",F.className,"rich-text"),onFocus:M,onKeyDown:function(e){const{keyCode:t}=e;if(!e.defaultPrevented&&(t===Xu.DELETE||t===Xu.BACKSPACE)){const{start:n,end:r,text:o}=ae,i=t===Xu.BACKSPACE,l=ae.activeFormats&&!!ae.activeFormats.length;if(!(0,H.isCollapsed)(ae)||l||i&&0!==n||!i&&r!==o.length)return;w&&w(!i),S&&(0,H.isEmpty)(ae)&&i&&S(!i),e.preventDefault()}}})))}));Yw.Content=e=>{let{value:t,tagName:n,multiline:r,...o}=e;Array.isArray(t)&&($()("wp.blockEditor.RichText value prop as children type",{since:"6.1",version:"6.3",alternative:"value prop as string",link:"https://developer.wordpress.org/block-editor/how-to-guides/block-tutorial/introducing-attributes-and-editable-fields/"}),t=a.children.toHTML(t));const i=Bw(r);!t&&i&&(t=`<${i}></${i}>`);const l=(0,u.createElement)(u.RawHTML,null,t);if(n){const{format:e,...t}=o;return(0,u.createElement)(n,t,l)}return l},Yw.isEmpty=e=>!e||0===e.length;var Qw=Yw;const Zw=(0,u.forwardRef)(((e,t)=>(0,u.createElement)(Qw,c({ref:t},e,{__unstableDisableFormats:!0,preserveWhiteSpace:!0}))));Zw.Content=e=>{let{value:t="",tagName:n="div",...r}=e;return(0,u.createElement)(n,r,t)};var Xw=Zw;var eC=(0,u.forwardRef)(((e,t)=>{let{__experimentalVersion:n,...r}=e;if(2===n)return(0,u.createElement)(Xw,c({ref:t},r));const{className:o,onChange:i,...l}=r;return(0,u.createElement)(Zl.Z,c({ref:t,className:d()("block-editor-plain-text",o),onChange:e=>i(e.target.value)},l))}));function tC(e){let{property:t,viewport:n,desc:r}=e;const o=(0,f.useInstanceId)(tC),i=r||(0,_.sprintf)((0,_._x)("Controls the %1$s property for %2$s viewports.","Text labelling a interface as controlling a given layout property (eg: margin) for a given screen size."),t,n.label);return(0,u.createElement)(u.Fragment,null,(0,u.createElement)("span",{"aria-describedby":`rbc-desc-${o}`},n.label),(0,u.createElement)(g.VisuallyHidden,{as:"span",id:`rbc-desc-${o}`},i))}var nC=function(e){const{title:t,property:n,toggleLabel:r,onIsResponsiveChange:o,renderDefaultControl:i,renderResponsiveControls:l,isResponsive:a=!1,defaultLabel:s={id:"all",label:(0,_.__)("All")},viewports:c=[{id:"small",label:(0,_.__)("Small screens")},{id:"medium",label:(0,_.__)("Medium screens")},{id:"large",label:(0,_.__)("Large screens")}]}=e;if(!t||!n||!i)return null;const p=r||(0,_.sprintf)((0,_.__)("Use the same %s on all screensizes."),n),f=(0,_.__)("Toggle between using the same value for all screen sizes or using a unique value per screen size."),m=i((0,u.createElement)(tC,{property:n,viewport:s}),s);return(0,u.createElement)("fieldset",{className:"block-editor-responsive-block-control"},(0,u.createElement)("legend",{className:"block-editor-responsive-block-control__title"},t),(0,u.createElement)("div",{className:"block-editor-responsive-block-control__inner"},(0,u.createElement)(g.ToggleControl,{className:"block-editor-responsive-block-control__toggle",label:p,checked:!a,onChange:o,help:f}),(0,u.createElement)("div",{className:d()("block-editor-responsive-block-control__group",{"is-responsive":a})},!a&&m,a&&(l?l(c):c.map((e=>(0,u.createElement)(u.Fragment,{key:e.id},i((0,u.createElement)(tC,{property:n,viewport:e}),e))))))))};function rC(e){let{character:t,type:n,onUse:r}=e;const o=(0,u.useContext)(qw),i=(0,u.useRef)();return i.current=r,(0,u.useEffect)((()=>{function e(e){Xu.isKeyboardEvent[n](e,t)&&(i.current(),e.preventDefault())}return o.current.add(e),()=>{o.current.delete(e)}}),[t,n]),null}function oC(e){let t,{name:n,shortcutType:r,shortcutCharacter:o,...i}=e,l="RichText.ToolbarControls";return n&&(l+=`.${n}`),r&&o&&(t=Xu.displayShortcut[r](o)),(0,u.createElement)(g.Fill,{name:l},(0,u.createElement)(g.ToolbarButton,c({},i,{shortcut:t})))}function iC(e){let{inputType:t,onInput:n}=e;const r=(0,u.useContext)(Jw),o=(0,u.useRef)();return o.current=n,(0,u.useEffect)((()=>{function e(e){e.inputType===t&&(o.current(),e.preventDefault())}return r.current.add(e),()=>{r.current.delete(e)}}),[t]),null}const lC=(0,u.createElement)(g.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,u.createElement)(g.Path,{d:"M9.4 20.5L5.2 3.8l14.6 9-2 .3c-.2 0-.4.1-.7.1-.9.2-1.6.3-2.2.5-.8.3-1.4.5-1.8.8-.4.3-.8.8-1.3 1.5-.4.5-.8 1.2-1.2 2l-.3.6-.9 1.9zM7.6 7.1l2.4 9.3c.2-.4.5-.8.7-1.1.6-.8 1.1-1.4 1.6-1.8.5-.4 1.3-.8 2.2-1.1l1.2-.3-8.1-5z"}));var aC=(0,u.forwardRef)((function(e,t){const n=(0,m.useSelect)((e=>e(xr).__unstableGetEditorMode()),[]),{__unstableSetEditorMode:r}=(0,m.useDispatch)(xr);return(0,u.createElement)(g.Dropdown,{renderToggle:r=>{let{isOpen:o,onToggle:i}=r;return(0,u.createElement)(g.Button,c({},e,{ref:t,icon:"navigation"===n?lC:YS,"aria-expanded":o,"aria-haspopup":"true",onClick:i,label:(0,_.__)("Tools")}))},popoverProps:{placement:"bottom-start"},renderContent:()=>(0,u.createElement)(u.Fragment,null,(0,u.createElement)(g.NavigableMenu,{role:"menu","aria-label":(0,_.__)("Tools")},(0,u.createElement)(g.MenuItemsChoice,{value:"navigation"===n?"navigation":"edit",onSelect:r,choices:[{value:"edit",label:(0,u.createElement)(u.Fragment,null,(0,u.createElement)(Xi,{icon:YS}),(0,_.__)("Edit"))},{value:"navigation",label:(0,u.createElement)(u.Fragment,null,lC,(0,_.__)("Select"))}]})),(0,u.createElement)("div",{className:"block-editor-tool-selector__help"},(0,_.__)("Tools provide different interactions for selecting, navigating, and editing blocks. Toggle between select and edit by pressing Escape and Enter.")))})}));function sC(e){let{units:t,...n}=e;const r=(0,g.__experimentalUseCustomUnits)({availableUnits:yo("spacing.units")||["%","px","em","rem","vw"],units:t});return(0,u.createElement)(g.__experimentalUnitControl,c({units:r},n))}var cC=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M20 11.2H6.8l3.7-3.7-1-1L3.9 12l5.6 5.5 1-1-3.7-3.7H20z"}));class uC extends u.Component{constructor(){super(...arguments),this.toggle=this.toggle.bind(this),this.submitLink=this.submitLink.bind(this),this.state={expanded:!1}}toggle(){this.setState({expanded:!this.state.expanded})}submitLink(e){e.preventDefault(),this.toggle()}render(){const{url:e,onChange:t}=this.props,{expanded:n}=this.state,r=e?(0,_.__)("Edit link"):(0,_.__)("Insert link");return(0,u.createElement)("div",{className:"block-editor-url-input__button"},(0,u.createElement)(g.Button,{icon:Eo,label:r,onClick:this.toggle,className:"components-toolbar__control",isPressed:!!e}),n&&(0,u.createElement)("form",{className:"block-editor-url-input__button-modal",onSubmit:this.submitLink},(0,u.createElement)("div",{className:"block-editor-url-input__button-modal-line"},(0,u.createElement)(g.Button,{className:"block-editor-url-input__back",icon:cC,label:(0,_.__)("Close"),onClick:this.toggle}),(0,u.createElement)(CS,{__nextHasNoMarginBottom:!0,value:e||"",onChange:t}),(0,u.createElement)(g.Button,{icon:vS,label:(0,_.__)("Submit"),type:"submit"}))))}}var pC=uC;var dC=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{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"}));const fC="none",mC="custom",yC="media",gC="attachment",hC=["noreferrer","noopener"],vC=(0,u.createElement)(g.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,u.createElement)(g.Path,{d:"M0,0h24v24H0V0z",fill:"none"}),(0,u.createElement)(g.Path,{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,u.createElement)(g.Path,{d:"m14.14 11.86l-3 3.87-2.14-2.59-3 3.86h12l-3.86-5.14z"})),bC=e=>{let{linkDestination:t,onChangeUrl:n,url:r,mediaType:o="image",mediaUrl:i,mediaLink:l,linkTarget:a,linkClass:s,rel:c}=e;const[p,d]=(0,u.useState)(!1),[f,m]=(0,u.useState)(null),y=(0,u.useCallback)((()=>{d(!0)})),[h,v]=(0,u.useState)(!1),[b,k]=(0,u.useState)(null),E=(0,u.useRef)(null),S=(0,u.useCallback)((()=>{t!==yC&&t!==gC||k(""),v(!0)})),w=(0,u.useCallback)((()=>{v(!1)})),C=(0,u.useCallback)((()=>{k(null),w(),d(!1)})),I=(0,u.useCallback)((()=>e=>{const t=E.current;t&&t.contains(e.target)||(d(!1),k(null),w())})),A=(0,u.useCallback)((()=>e=>{if(b){var t;const e=(null===(t=B().find((e=>e.url===b)))||void 0===t?void 0:t.linkDestination)||mC;n({href:b,linkDestination:e})}w(),k(null),e.preventDefault()})),x=(0,u.useCallback)((()=>{n({linkDestination:fC,href:""})})),B=()=>{const e=[{linkDestination:yC,title:(0,_.__)("Media File"),url:"image"===o?i:void 0,icon:vC}];return"image"===o&&l&&e.push({linkDestination:gC,title:(0,_.__)("Attachment Page"),url:"image"===o?l:void 0,icon:(0,u.createElement)(g.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,u.createElement)(g.Path,{d:"M0 0h24v24H0V0z",fill:"none"}),(0,u.createElement)(g.Path,{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},P=(0,u.createElement)(g.__experimentalVStack,{spacing:"3"},(0,u.createElement)(g.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,_.__)("Open in new tab"),onChange:e=>{const t=(e=>{const t=e?"_blank":void 0;let n;if(t){const e=(null!=c?c:"").split(" ");hC.forEach((t=>{e.includes(t)||e.push(t)})),n=e.join(" ")}else{const e=(null!=c?c:"").split(" ").filter((e=>!1===hC.includes(e)));n=e.length?e.join(" "):void 0}return{linkTarget:t,rel:n}})(e);n(t)},checked:"_blank"===a}),(0,u.createElement)(g.TextControl,{__nextHasNoMarginBottom:!0,label:(0,_.__)("Link rel"),value:null!=c?c:"",onChange:e=>{n({rel:e})}}),(0,u.createElement)(g.TextControl,{__nextHasNoMarginBottom:!0,label:(0,_.__)("Link CSS Class"),value:s||"",onChange:e=>{n({linkClass:e})}})),T=null!==b?b:r,O=(B().find((e=>e.linkDestination===t))||{}).title;return(0,u.createElement)(u.Fragment,null,(0,u.createElement)(g.ToolbarButton,{icon:Eo,className:"components-toolbar__control",label:r?(0,_.__)("Edit link"):(0,_.__)("Insert link"),"aria-expanded":p,onClick:y,ref:m}),p&&(0,u.createElement)(gw,{anchor:f,onFocusOutside:I(),onClose:C,renderSettings:()=>P,additionalControls:!T&&(0,u.createElement)(g.NavigableMenu,null,B().map((e=>(0,u.createElement)(g.MenuItem,{key:e.linkDestination,icon:e.icon,onClick:()=>{k(null),(e=>{const t=B();let r;r=e?(t.find((t=>t.url===e))||{linkDestination:mC}).linkDestination:fC,n({linkDestination:r,href:e})})(e.url),w()}},e.title))))},(!r||h)&&(0,u.createElement)(gw.LinkEditor,{className:"block-editor-format-toolbar__link-container-content",value:T,onChangeInputValue:k,onSubmit:A(),autocompleteRef:E}),r&&!h&&(0,u.createElement)(u.Fragment,null,(0,u.createElement)(gw.LinkViewer,{className:"block-editor-format-toolbar__link-container-content",url:r,onEditLinkClick:S,urlLabel:O}),(0,u.createElement)(g.Button,{icon:dC,label:(0,_.__)("Remove link"),onClick:x}))))};function _C(e){let{children:t,viewLabel:n,className:r,isEnabled:o=!0,deviceType:i,setDeviceType:l}=e;if((0,f.useViewportMatch)("small","<"))return null;const a={className:d()(r,"block-editor-post-preview__dropdown-content"),position:"bottom left"},s={variant:"tertiary",className:"block-editor-post-preview__button-toggle",disabled:!o,children:n},c={"aria-label":(0,_.__)("View options")};return(0,u.createElement)(g.DropdownMenu,{className:"block-editor-post-preview__dropdown",popoverProps:a,toggleProps:s,menuProps:c,icon:null},(()=>(0,u.createElement)(u.Fragment,null,(0,u.createElement)(g.MenuGroup,null,(0,u.createElement)(g.MenuItem,{className:"block-editor-post-preview__button-resize",onClick:()=>l("Desktop"),icon:"Desktop"===i&&Dy},(0,_.__)("Desktop")),(0,u.createElement)(g.MenuItem,{className:"block-editor-post-preview__button-resize",onClick:()=>l("Tablet"),icon:"Tablet"===i&&Dy},(0,_.__)("Tablet")),(0,u.createElement)(g.MenuItem,{className:"block-editor-post-preview__button-resize",onClick:()=>l("Mobile"),icon:"Mobile"===i&&Dy},(0,_.__)("Mobile"))),t)))}function kC(e){const[t,n]=(0,u.useState)(window.innerWidth);(0,u.useEffect)((()=>{if("Desktop"===e)return;const t=()=>n(window.innerWidth);return window.addEventListener("resize",t),()=>{window.removeEventListener("resize",t)}}),[e]);const r=e=>{let n;switch(e){case"Tablet":n=780;break;case"Mobile":n=360;break;default:return null}return n<t?n:t};return(e=>{const t="Mobile"===e?"768px":"1024px";switch(e){case"Tablet":case"Mobile":return{width:r(e),margin:(window.innerHeight<800?36:72)+"px auto",height:t,borderRadius:"2px 2px 2px 2px",border:"1px solid #ddd",overflowY:"auto"};default:return null}})(e)}var EC=(0,m.withSelect)((e=>({selectedBlockClientId:e(xr).getBlockSelectionStart()})))((e=>{let{selectedBlockClientId:t}=e;const n=Xr(t);return t?(0,u.createElement)(g.Button,{variant:"secondary",className:"block-editor-skip-to-selected-block",onClick:()=>{n.current.focus()}},(0,_.__)("Skip to the selected block")):null})),SC=window.wp.wordcount;var wC=(0,m.withSelect)((e=>{const{getMultiSelectedBlocks:t}=e(xr);return{blocks:t()}}))((function(e){let{blocks:t}=e;const n=(0,SC.count)((0,a.serialize)(t),"words");return(0,u.createElement)("div",{className:"block-editor-multi-selection-inspector__card"},(0,u.createElement)(hp,{icon:Ny,showColors:!0}),(0,u.createElement)("div",{className:"block-editor-multi-selection-inspector__card-content"},(0,u.createElement)("div",{className:"block-editor-multi-selection-inspector__card-title"},(0,_.sprintf)((0,_._n)("%d block","%d blocks",t.length),t.length)),(0,u.createElement)("div",{className:"block-editor-multi-selection-inspector__card-description"},(0,_.sprintf)((0,_._n)("%d word","%d words",n),n))))}));function CC(e){let{blockName:t}=e;const{preferredStyle:n,onUpdatePreferredStyleVariations:r,styles:o}=(0,m.useSelect)((e=>{var n,r;const o=e(xr).getSettings().__experimentalPreferredStyleVariations;return{preferredStyle:null==o||null===(n=o.value)||void 0===n?void 0:n[t],onUpdatePreferredStyleVariations:null!==(r=null==o?void 0:o.onChange)&&void 0!==r?r:null,styles:e(a.store).getBlockStyles(t)}}),[t]),i=(0,u.useMemo)((()=>[{label:(0,_.__)("Not set"),value:""},...o.map((e=>{let{label:t,name:n}=e;return{label:t,value:n}}))]),[o]),l=(0,u.useMemo)((()=>{var e;return null===(e=Vy(o))||void 0===e?void 0:e.name}),[o]),s=(0,u.useCallback)((e=>{r(t,e)}),[t,r]);return n&&n!==l?r&&(0,u.createElement)("div",{className:"default-style-picker__default-switcher"},(0,u.createElement)(g.SelectControl,{__nextHasNoMarginBottom:!0,options:i,value:n||"",label:(0,_.__)("Default Style"),onChange:s})):null}var IC=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{fillRule:"evenodd",d:"M10.289 4.836A1 1 0 0111.275 4h1.306a1 1 0 01.987.836l.244 1.466c.787.26 1.503.679 2.108 1.218l1.393-.522a1 1 0 011.216.437l.653 1.13a1 1 0 01-.23 1.273l-1.148.944a6.025 6.025 0 010 2.435l1.149.946a1 1 0 01.23 1.272l-.653 1.13a1 1 0 01-1.216.437l-1.394-.522c-.605.54-1.32.958-2.108 1.218l-.244 1.466a1 1 0 01-.987.836h-1.306a1 1 0 01-.986-.836l-.244-1.466a5.995 5.995 0 01-2.108-1.218l-1.394.522a1 1 0 01-1.217-.436l-.653-1.131a1 1 0 01.23-1.272l1.149-.946a6.026 6.026 0 010-2.435l-1.148-.944a1 1 0 01-.23-1.272l.653-1.131a1 1 0 011.217-.437l1.393.522a5.994 5.994 0 012.108-1.218l.244-1.466zM14.929 12a3 3 0 11-6 0 3 3 0 016 0z",clipRule:"evenodd"}));const AC=(0,u.createElement)(V.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,u.createElement)(V.Path,{d:"M12 4c-4.4 0-8 3.6-8 8v.1c0 4.1 3.2 7.5 7.2 7.9h.8c4.4 0 8-3.6 8-8s-3.6-8-8-8zm0 15V5c3.9 0 7 3.1 7 7s-3.1 7-7 7z"}));const xC={name:"settings",title:"Settings",value:"settings",icon:IC,className:"block-editor-block-inspector__tab-item"},BC={name:"styles",title:"Styles",value:"styles",icon:AC,className:"block-editor-block-inspector__tab-item"},PC={name:"list",title:"List View",value:"list-view",icon:Fk,className:"block-editor-block-inspector__tab-item"};var TC=()=>{const e=(0,g.__experimentalUseSlotFills)(Ho.slotName);return Boolean(e&&e.length)?(0,u.createElement)(g.PanelBody,{className:"block-editor-block-inspector__advanced",title:(0,_.__)("Advanced"),initialOpen:!1},(0,u.createElement)(Wo.Slot,{group:"advanced"})):null};var OC=()=>{const e=(0,g.__experimentalUseSlotFills)(No.position.Slot.__unstableName);return Boolean(e&&e.length)?(0,u.createElement)(g.PanelBody,{className:"block-editor-block-inspector__position",title:(0,_.__)("Position"),initialOpen:!1},(0,u.createElement)(Wo.Slot,{group:"position"})):null},NC=window.wp.preferences;const MC="isInspectorControlsTabsHintVisible";function RC(){const e=(0,m.useSelect)((e=>{var t;return null===(t=e(NC.store).get("core",MC))||void 0===t||t}),[]),t=(0,u.useRef)(),{set:n}=(0,m.useDispatch)(NC.store);return e?(0,u.createElement)("div",{ref:t,className:"block-editor-inspector-controls-tabs__hint"},(0,u.createElement)("div",{className:"block-editor-inspector-controls-tabs__hint-content"},(0,_.__)("Looking for other block settings? They've moved to the styles tab.")),(0,u.createElement)(g.Button,{className:"block-editor-inspector-controls-tabs__hint-dismiss",icon:dC,iconSize:"16",label:(0,_.__)("Dismiss hint"),onClick:()=>{const e=Ml.focus.tabbable.findPrevious(t.current);null==e||e.focus(),n("core",MC,!1)},showTooltip:!1})):null}var FC=e=>{let{showAdvancedControls:t=!1}=e;return(0,u.createElement)(u.Fragment,null,(0,u.createElement)(Wo.Slot,null),(0,u.createElement)(OC,null),t&&(0,u.createElement)("div",null,(0,u.createElement)(TC,null)),(0,u.createElement)(RC,null))};var LC=e=>{let{blockName:t,clientId:n,hasBlockStyles:r}=e;return(0,u.createElement)(u.Fragment,null,r&&(0,u.createElement)("div",null,(0,u.createElement)(g.PanelBody,{title:(0,_.__)("Styles")},(0,u.createElement)(cE,{clientId:n}),(0,a.hasBlockSupport)(t,"defaultStylePicker",!0)&&(0,u.createElement)(CC,{blockName:t}))),(0,u.createElement)(Wo.Slot,{group:"color",label:(0,_.__)("Color"),className:"color-block-support-panel__inner-wrapper"}),(0,u.createElement)(Wo.Slot,{group:"typography",label:(0,_.__)("Typography")}),(0,u.createElement)(Wo.Slot,{group:"dimensions",label:(0,_.__)("Dimensions")}),(0,u.createElement)(Wo.Slot,{group:"border",label:(0,_.__)("Border")}),(0,u.createElement)(Wo.Slot,{group:"styles"}))};const DC=["core/navigation"];var UC=e=>!DC.includes(e);function jC(e){let{blockName:t,clientId:n,hasBlockStyles:r,tabs:o}=e;const i=UC(t)?void 0:PC.name;return(0,u.createElement)(g.TabPanel,{className:"block-editor-block-inspector__tabs",tabs:o,initialTabName:i,key:n},(e=>e.name===xC.name?(0,u.createElement)(FC,{showAdvancedControls:!!t}):e.name===BC.name?(0,u.createElement)(LC,{blockName:t,clientId:n,hasBlockStyles:r}):e.name===PC.name?(0,u.createElement)(Wo.Slot,{group:"list"}):void 0))}const zC=[];function VC(e){const t=[],{border:n,color:r,default:o,dimensions:i,list:l,position:a,styles:s,typography:c}=No,u=UC(e),p=(0,g.__experimentalUseSlotFills)(l.Slot.__unstableName),d=!u&&!!p&&p.length,f=[...(0,g.__experimentalUseSlotFills)(n.Slot.__unstableName)||[],...(0,g.__experimentalUseSlotFills)(r.Slot.__unstableName)||[],...(0,g.__experimentalUseSlotFills)(i.Slot.__unstableName)||[],...(0,g.__experimentalUseSlotFills)(s.Slot.__unstableName)||[],...(0,g.__experimentalUseSlotFills)(c.Slot.__unstableName)||[]].length,y=(0,g.__experimentalUseSlotFills)(Ho.slotName)||[],h=[...(0,g.__experimentalUseSlotFills)(o.Slot.__unstableName)||[],...(0,g.__experimentalUseSlotFills)(a.Slot.__unstableName)||[],...d&&f>1?y:[]];d&&t.push(PC),h.length&&t.push(xC),f&&t.push(BC);const v=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return void 0!==t[e]?t[e]:void 0===t.default||t.default}(e,(0,m.useSelect)((e=>e(xr).getSettings().blockInspectorTabs),[]));return v?t:zC}function GC(e,t){const n=(0,u.useMemo)((()=>e.reduce(((e,t)=>("core/list-item"!==t.name&&Object.entries(t.attributes).some((e=>{let[,{__experimentalRole:t}]=e;return"content"===t}))&&(e[t.name]=!0),e)),{})),[e]),r=(0,u.useCallback)((e=>!!n[e]),[n]);return(0,u.useMemo)((()=>HC([t],r)),[t,r])}function HC(e,t){const n=[];for(const r of e)t(r.name)&&n.push(r),n.push(...HC(r.innerBlocks,t));return n}function WC(e){let{blockTypes:t,block:n,selectedBlock:r}=e;const{selectBlock:o}=(0,m.useDispatch)(xr),i=t.find((e=>{let{name:t}=e;return t===n.name})),l=r&&r.clientId===n.clientId;return(0,u.createElement)(g.Button,{isPressed:l,onClick:()=>o(n.clientId)},(0,u.createElement)(g.__experimentalHStack,{justify:"flex-start"},(0,u.createElement)(hp,{icon:i.icon}),(0,u.createElement)(g.FlexItem,null,i.title)))}function $C(e){let{topLevelLockedBlock:t}=e;const{blockTypes:n,block:r,selectedBlock:o}=(0,m.useSelect)((e=>({blockTypes:e(a.store).getBlockTypes(),block:e(xr).getBlock(t),selectedBlock:e(xr).getSelectedBlock()})),[t]),i=sy(t),l=GC(n,r);return(0,u.createElement)("div",{className:"block-editor-block-inspector"},(0,u.createElement)(vp,c({},i,{className:i.isSynced&&"is-synced"})),(0,u.createElement)(wE,{blockClientId:t}),(0,u.createElement)(g.__experimentalVStack,{spacing:1,padding:4,className:"block-editor-block-inspector__block-buttons-container"},(0,u.createElement)("h2",{className:"block-editor-block-card__title"},(0,_.__)("Content")),l.map((e=>(0,u.createElement)(WC,{selectedBlock:o,key:e.clientId,block:e,blockTypes:n})))))}const KC=e=>{let{animate:t,wrapper:n,children:r}=e;return t?n(r):r},qC=e=>{let{blockInspectorAnimationSettings:t,selectedBlockClientId:n,children:r}=e;const o=t&&"leftToRight"===t.enterDirection?-50:50;return(0,u.createElement)(g.__unstableMotion.div,{animate:{x:0,opacity:1,transition:{ease:"easeInOut",duration:.14}},initial:{x:o,opacity:0},key:n},r)},JC=e=>{let{clientId:t,blockName:n}=e;const r=VC(n),o=(null==r?void 0:r.length)>1,i=(0,m.useSelect)((e=>{const{getBlockStyles:t}=e(a.store),r=t(n);return r&&r.length>0}),[n]),l=sy(t);return(0,u.createElement)("div",{className:"block-editor-block-inspector"},(0,u.createElement)(vp,c({},l,{className:l.isSynced&&"is-synced"})),(0,u.createElement)(wE,{blockClientId:t}),o&&(0,u.createElement)(jC,{hasBlockStyles:i,clientId:t,blockName:n,tabs:r}),!o&&(0,u.createElement)(u.Fragment,null,i&&(0,u.createElement)("div",null,(0,u.createElement)(g.PanelBody,{title:(0,_.__)("Styles")},(0,u.createElement)(cE,{clientId:t}),(0,a.hasBlockSupport)(n,"defaultStylePicker",!0)&&(0,u.createElement)(CC,{blockName:n}))),(0,u.createElement)(Wo.Slot,null),(0,u.createElement)(Wo.Slot,{group:"color",label:(0,_.__)("Color"),className:"color-block-support-panel__inner-wrapper"}),(0,u.createElement)(Wo.Slot,{group:"typography",label:(0,_.__)("Typography")}),(0,u.createElement)(Wo.Slot,{group:"dimensions",label:(0,_.__)("Dimensions")}),(0,u.createElement)(Wo.Slot,{group:"border",label:(0,_.__)("Border")}),(0,u.createElement)(Wo.Slot,{group:"styles"}),(0,u.createElement)(OC,null),(0,u.createElement)("div",null,(0,u.createElement)(TC,null))),(0,u.createElement)(EC,{key:"back"}))};var YC=e=>{let{showNoBlockSelectedMessage:t=!0}=e;const{count:n,selectedBlockName:r,selectedBlockClientId:o,blockType:i,topLevelLockedBlock:l}=(0,m.useSelect)((e=>{const{getSelectedBlockClientId:t,getSelectedBlockCount:n,getBlockName:r,__unstableGetContentLockingParent:o,getTemplateLock:i}=e(xr),l=t(),s=l&&r(l),c=s&&(0,a.getBlockType)(s);return{count:n(),selectedBlockClientId:l,selectedBlockName:s,blockType:c,topLevelLockedBlock:o(l)||("contentOnly"===i(l)?l:void 0)}}),[]),s=VC(null==i?void 0:i.name),c=(null==s?void 0:s.length)>1,p=function(e,t){return(0,m.useSelect)((t=>{if(e){const n=t(xr).getSettings().blockInspectorAnimation,r=null==n?void 0:n.animationParent,{getSelectedBlockClientId:o,getBlockParentsByBlockName:i}=t(xr);return i(o(),r,!0)[0]||e.name===r?null==n?void 0:n[e.name]:null}return null}),[t,e])}(i,o);if(n>1)return(0,u.createElement)("div",{className:"block-editor-block-inspector"},(0,u.createElement)(wC,null),c?(0,u.createElement)(jC,{tabs:s}):(0,u.createElement)(u.Fragment,null,(0,u.createElement)(Wo.Slot,null),(0,u.createElement)(Wo.Slot,{group:"color",label:(0,_.__)("Color"),className:"color-block-support-panel__inner-wrapper"}),(0,u.createElement)(Wo.Slot,{group:"typography",label:(0,_.__)("Typography")}),(0,u.createElement)(Wo.Slot,{group:"dimensions",label:(0,_.__)("Dimensions")}),(0,u.createElement)(Wo.Slot,{group:"border",label:(0,_.__)("Border")}),(0,u.createElement)(Wo.Slot,{group:"styles"})));const d=r===(0,a.getUnregisteredTypeHandlerName)();return i&&o&&!d?l?(0,u.createElement)($C,{topLevelLockedBlock:l}):(0,u.createElement)(KC,{animate:p,wrapper:e=>(0,u.createElement)(qC,{blockInspectorAnimationSettings:p,selectedBlockClientId:o},e)},(0,u.createElement)(JC,{clientId:o,blockName:i.name})):t?(0,u.createElement)("span",{className:"block-editor-block-inspector__no-blocks"},(0,_.__)("No block selected.")):null};var QC=function(e){let{__unstableContentRef:t}=e;const[n,r]=(0,u.useState)(!1),o=(0,m.useSelect)((e=>e(xr).getBlockOrder()),[]);return(0,u.useEffect)((()=>{const e=setTimeout((()=>{r(!0)}),500);return()=>{clearTimeout(e)}}),[]),n?o.map(((e,n)=>n===o.length-1?null:(0,u.createElement)(Xm,{key:e,previousClientId:e,nextClientId:o[n+1],__unstableContentRef:t},(0,u.createElement)("div",{className:"block-editor-block-list__insertion-point-inserter is-with-inserter"},(0,u.createElement)(Wm,{position:"bottom center",clientId:o[n+1],__experimentalIsQuick:!0}))))):null};function ZC(e){const{__unstableGetEditorMode:t,getSettings:n,isTyping:r}=e(xr);return{isZoomOutMode:"zoom-out"===t(),hasFixedToolbar:n().hasFixedToolbar,isTyping:r()}}function XC(e){let{children:t,__unstableContentRef:n,...r}=e;const o=(0,f.useViewportMatch)("medium"),{hasFixedToolbar:i,isZoomOutMode:l,isTyping:a}=(0,m.useSelect)(ZC,[]),s=(0,Pp.__unstableUseShortcutEventMatch)(),{getSelectedBlockClientIds:p,getBlockRootClientId:d}=(0,m.useSelect)(xr),{duplicateBlocks:y,removeBlocks:h,insertAfterBlock:v,insertBeforeBlock:b,clearSelectedBlock:_,moveBlocksUp:k,moveBlocksDown:E}=(0,m.useDispatch)(xr);const S=qo(n),w=qo(n);return(0,u.createElement)("div",c({},r,{onKeyDown:function(e){if(!e.defaultPrevented)if(s("core/block-editor/move-up",e)){const t=p();if(t.length){e.preventDefault();const n=d(t[0]);k(t,n)}}else if(s("core/block-editor/move-down",e)){const t=p();if(t.length){e.preventDefault();const n=d(t[0]);E(t,n)}}else if(s("core/block-editor/duplicate",e)){const t=p();t.length&&(e.preventDefault(),y(t))}else if(s("core/block-editor/remove",e)){const t=p();t.length&&(e.preventDefault(),h(t))}else if(s("core/block-editor/insert-after",e)){const t=p();t.length&&(e.preventDefault(),v(t[t.length-1]))}else if(s("core/block-editor/insert-before",e)){const t=p();t.length&&(e.preventDefault(),b(t[0]))}else if(s("core/block-editor/unselect",e)){p().length&&(e.preventDefault(),_(),e.target.ownerDocument.defaultView.getSelection().removeAllRanges(),null==n||n.current.focus())}}}),(0,u.createElement)(ny.Provider,{value:(0,u.useRef)(!1)},!a&&(0,u.createElement)(oy,{__unstableContentRef:n}),!l&&(i||!o)&&(0,u.createElement)(nh,{isFixed:!0}),(0,u.createElement)(wh,{__unstableContentRef:n}),(0,u.createElement)(g.Popover.Slot,{name:"block-toolbar",ref:S}),t,(0,u.createElement)(g.Popover.Slot,{name:"__unstable-block-tools-after",ref:w}),l&&(0,u.createElement)(QC,{__unstableContentRef:n})))}const eI=()=>{};var tI=(0,u.forwardRef)((function(e,t){let{rootClientId:n,clientId:r,isAppender:o,showInserterHelpPanel:i,showMostUsedBlocks:l=!1,__experimentalInsertionIndex:a,__experimentalFilterValue:s,onSelect:c=eI,shouldFocusBlock:p=!1}=e;const{destinationRootClientId:d,prioritizePatterns:f}=(0,m.useSelect)((e=>{const{getBlockRootClientId:t,getSettings:o}=e(xr);return{destinationRootClientId:n||t(r)||void 0,prioritizePatterns:o().__experimentalPreferPatternsOnRoot}}),[r,n]);return(0,u.createElement)(jm,{onSelect:c,rootClientId:d,clientId:r,isAppender:o,showInserterHelpPanel:i,showMostUsedBlocks:l,__experimentalInsertionIndex:a,__experimentalFilterValue:s,shouldFocusBlock:p,prioritizePatterns:f,ref:t})}));function nI(){return null}nI.Register=function(){const{registerShortcut:e}=(0,m.useDispatch)(Pp.store);return(0,u.useEffect)((()=>{e({name:"core/block-editor/duplicate",category:"block",description:(0,_.__)("Duplicate the selected block(s)."),keyCombination:{modifier:"primaryShift",character:"d"}}),e({name:"core/block-editor/remove",category:"block",description:(0,_.__)("Remove the selected block(s)."),keyCombination:{modifier:"access",character:"z"}}),e({name:"core/block-editor/insert-before",category:"block",description:(0,_.__)("Insert a new block before the selected block(s)."),keyCombination:{modifier:"primaryAlt",character:"t"}}),e({name:"core/block-editor/insert-after",category:"block",description:(0,_.__)("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:(0,_.__)("Delete selection."),keyCombination:{character:"del"},aliases:[{character:"backspace"}]}),e({name:"core/block-editor/select-all",category:"selection",description:(0,_.__)("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:(0,_.__)("Clear selection."),keyCombination:{character:"escape"}}),e({name:"core/block-editor/focus-toolbar",category:"global",description:(0,_.__)("Navigate to the nearest toolbar."),keyCombination:{modifier:"alt",character:"F10"}}),e({name:"core/block-editor/move-up",category:"block",description:(0,_.__)("Move the selected block(s) up."),keyCombination:{modifier:"secondary",character:"t"}}),e({name:"core/block-editor/move-down",category:"block",description:(0,_.__)("Move the selected block(s) down."),keyCombination:{modifier:"secondary",character:"y"}})}),[e]),null};var rI=nI;function oI(){return $()("wp.blockEditor.MultiSelectScrollIntoView",{hint:"This behaviour is now built-in.",since:"5.8"}),null}const iI=new Set([Xu.UP,Xu.RIGHT,Xu.DOWN,Xu.LEFT,Xu.ENTER,Xu.BACKSPACE]);function lI(){const e=(0,m.useSelect)((e=>e(xr).isTyping()),[]),{stopTyping:t}=(0,m.useDispatch)(xr);return(0,f.useRefEffect)((n=>{if(!e)return;const{ownerDocument:r}=n;let o,i;function l(e){const{clientX:n,clientY:r}=e;o&&i&&(o!==n||i!==r)&&t(),o=n,i=r}return r.addEventListener("mousemove",l),()=>{r.removeEventListener("mousemove",l)}}),[e,t])}function aI(){const{isTyping:e,hasInlineToolbar:t}=(0,m.useSelect)((e=>{const{isTyping:t,getSettings:n}=e(xr);return{isTyping:t(),hasInlineToolbar:n().hasInlineToolbar}}),[]),{startTyping:n,stopTyping:r}=(0,m.useDispatch)(xr),o=lI(),i=(0,f.useRefEffect)((o=>{const{ownerDocument:i}=o,{defaultView:l}=i,a=l.getSelection();if(e){let c;function u(e){const{target:t}=e;c=l.setTimeout((()=>{(0,Ml.isTextField)(t)||r()}))}function p(e){const{keyCode:t}=e;t!==Xu.ESCAPE&&t!==Xu.TAB||r()}function d(){a.isCollapsed||r()}return o.addEventListener("focus",u),o.addEventListener("keydown",p),t||i.addEventListener("selectionchange",d),()=>{l.clearTimeout(c),o.removeEventListener("focus",u),o.removeEventListener("keydown",p),i.removeEventListener("selectionchange",d)}}function s(e){const{type:t,target:r}=e;(0,Ml.isTextField)(r)&&o.contains(r)&&("keydown"!==t||function(e){const{keyCode:t,shiftKey:n}=e;return!n&&iI.has(t)}(e))&&n()}return o.addEventListener("keypress",s),o.addEventListener("keydown",s),()=>{o.removeEventListener("keypress",s),o.removeEventListener("keydown",s)}}),[e,t,n,r]);return(0,f.useMergeRefs)([o,i])}var sI=function(e){let{children:t}=e;return(0,u.createElement)("div",{ref:aI()},t)};const cI=-1!==window.navigator.userAgent.indexOf("Trident"),uI=new Set([Xu.UP,Xu.DOWN,Xu.LEFT,Xu.RIGHT]);function pI(){const e=(0,m.useSelect)((e=>e(xr).hasSelectedBlock()),[]);return(0,f.useRefEffect)((t=>{if(!e)return;const{ownerDocument:n}=t,{defaultView:r}=n;let o,i,l;function a(){o||(o=r.requestAnimationFrame((()=>{d(),o=null})))}function s(e){i&&r.cancelAnimationFrame(i),i=r.requestAnimationFrame((()=>{c(e),i=null}))}function c(e){let{keyCode:o}=e;if(!f())return;const i=(0,Ml.computeCaretRect)(r);if(!i)return;if(!l)return void(l=i);if(uI.has(o))return void(l=i);const a=i.top-l.top;if(0===a)return;const s=(0,Ml.getScrollContainer)(t);if(!s)return;const c=s===n.body||s===n.documentElement,u=c?r.scrollY:s.scrollTop,p=c?0:s.getBoundingClientRect().top,d=c?l.top/r.innerHeight:(l.top-p)/(r.innerHeight-p);if(0===u&&d<.75&&function(){const e=t.querySelectorAll('[contenteditable="true"]');return e[e.length-1]===n.activeElement}())return void(l=i);const m=c?r.innerHeight:s.clientHeight;l.top+l.height>p+m||l.top<p?l=i:c?r.scrollBy(0,a):s.scrollTop+=a}function u(){n.addEventListener("selectionchange",p)}function p(){n.removeEventListener("selectionchange",p),d()}function d(){f()&&(l=(0,Ml.computeCaretRect)(r))}function f(){return t.contains(n.activeElement)&&n.activeElement.isContentEditable}return r.addEventListener("scroll",a,!0),r.addEventListener("resize",a,!0),t.addEventListener("keydown",s),t.addEventListener("keyup",c),t.addEventListener("mousedown",u),t.addEventListener("touchstart",u),()=>{r.removeEventListener("scroll",a,!0),r.removeEventListener("resize",a,!0),t.removeEventListener("keydown",s),t.removeEventListener("keyup",c),t.removeEventListener("mousedown",u),t.removeEventListener("touchstart",u),n.removeEventListener("selectionchange",p),r.cancelAnimationFrame(o),r.cancelAnimationFrame(i)}}),[e])}var dI=cI?e=>e.children:function(e){let{children:t}=e;return(0,u.createElement)("div",{ref:pI(),className:"block-editor__typewriter"},t)};const fI=(0,u.createContext)({});function mI(e){let{children:t,uniqueId:n,blockName:r=""}=e;const o=(0,u.useContext)(fI),{name:i}=Nr();r=r||i;const l=(0,u.useMemo)((()=>function(e,t,n){const r={...e,[t]:e[t]?new Set(e[t]):new Set};return r[t].add(n),r}(o,r,n)),[o,r,n]);return(0,u.createElement)(fI.Provider,{value:l},t)}function yI(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const r=(0,u.useContext)(fI),{name:o}=Nr();return n=n||o,Boolean(null===(t=r[n])||void 0===t?void 0:t.has(e))}var gI=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{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"}));function hI(e){let{title:t,help:n,actions:r=[],onClose:o}=e;return(0,u.createElement)(g.__experimentalVStack,{className:"block-editor-inspector-popover-header",spacing:4},(0,u.createElement)(g.__experimentalHStack,{alignment:"center"},(0,u.createElement)(g.__experimentalHeading,{className:"block-editor-inspector-popover-header__heading",level:2,size:13},t),(0,u.createElement)(g.__experimentalSpacer,null),r.map((e=>{let{label:t,icon:n,onClick:r}=e;return(0,u.createElement)(g.Button,{key:t,className:"block-editor-inspector-popover-header__action",label:t,icon:n,variant:!n&&"tertiary",onClick:r},!n&&t)})),o&&(0,u.createElement)(g.Button,{className:"block-editor-inspector-popover-header__action",label:(0,_.__)("Close"),icon:gI,onClick:o})),n&&(0,u.createElement)(g.__experimentalText,null,n))}var vI=(0,u.forwardRef)((function(e,t){let{onClose:n,onChange:r,...o}=e;return(0,u.createElement)("div",{ref:t,className:"block-editor-publish-date-time-picker"},(0,u.createElement)(hI,{title:(0,_.__)("Publish"),actions:[{label:(0,_.__)("Now"),onClick:()=>null==r?void 0:r(null)}],onClose:n}),(0,u.createElement)(g.DateTimePicker,c({startOfWeek:(0,xE.getSettings)().l10n.startOfWeek,__nextRemoveHelpButton:!0,__nextRemoveResetButton:!0,onChange:r},o)))}));const bI={button:"wp-element-button",caption:"wp-element-caption"},_I=e=>bI[e]?bI[e]:"";function kI(e,t){return Object.entries(t).every((t=>{let[n,r]=t;return"object"==typeof r&&"object"==typeof e[n]?kI(e[n],r):e[n]===r}))}const EI=(e,t)=>{if(!t||!e)return;const n=t.filter((t=>{let{attributes:n}=t;return!(!n||!Object.keys(n).length)&&kI(e,n)}));return 1===n.length?n[0]:void 0};function SI(e){const t=null==e?void 0:e.trim().match(/^(0?[-.]?\d*\.?\d+)(r?e[m|x]|v[h|w|min|max]+|p[x|t|c]|[c|m]m|%|in|ch|Q|lh)$/);return isNaN(e)||isNaN(parseFloat(e))?t?{value:parseFloat(t[1])||t[1],unit:t[2]}:{value:e,unit:void 0}:{value:parseFloat(e),unit:"px"}}function wI(e,t){const n=e.split(/[(),]/g).filter(Boolean),r=n.slice(1).map((e=>SI(BI(e,t)).value)).filter(Boolean);switch(n[0]){case"min":return Math.min(...r)+"px";case"max":return Math.max(...r)+"px";case"clamp":return 3!==r.length?null:r[1]<r[0]?r[0]+"px":r[1]>r[2]?r[2]+"px":r[1]+"px";case"calc":return r[0]+"px"}}function CI(e){for(;;){const t=e,n=/(max|min|calc|clamp)\(([^()]*)\)/g.exec(e)||[];if(n[0]){const t=wI(n[0]);e=e.replace(n[0],t)}if(e===t||parseFloat(e))break}return SI(e)}function II(e){for(let t=0;t<e.length;t++)if(["+","-","/","*"].includes(e[t]))return!0;return!1}function AI(e){let t=!1;const n=e.split(/(?!^-)[+*\/-](\s?-)?/g).filter(Boolean);for(const r of n){const n=SI(BI(r));if(!parseFloat(n.value)){t=!0;break}e=e.replace(r,n.value)}return t?null:(r=e,Function(`'use strict'; return (${r})`)()).toFixed(0)+"px";var r}function xI(e,t){const n=96,r=.01,o=Object.assign({},{fontSize:16,lineHeight:16,width:375,height:812,type:"font"},t),i={em:o.fontSize,rem:o.fontSize,vh:o.height*r,vw:o.width*r,vmin:(o.width<o.height?o.width:o.height)*r,vmax:(o.width>o.height?o.width:o.height)*r,"%":("font"===o.type?o.fontSize:o.width)*r,ch:8,ex:7.15625,lh:o.lineHeight},l={in:n,cm:37.79527559055118,mm:3.7795275590551185,pt:1.3333333333333333,pc:16,px:1,Q:.9448818897637794};return i[e.unit]?(i[e.unit]*e.value).toFixed(0)+"px":l[e.unit]?(l[e.unit]*e.value).toFixed(0)+"px":null}function BI(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(Number.isFinite(e))return e.toFixed(0)+"px";if(void 0===e)return null;let n=SI(e);return n.unit||(n=CI(e)),II(e)&&!n.unit?AI(e):xI(n,t)}const PI={};function TI(e){let t="";return e.hasOwnProperty("fontSize")&&(t=":"+e.width),e.hasOwnProperty("lineHeight")&&(t=":"+e.lineHeight),e.hasOwnProperty("width")&&(t=":"+e.width),e.hasOwnProperty("height")&&(t=":"+e.height),e.hasOwnProperty("type")&&(t=":"+e.type),t}var OI=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=e+TI(t);return PI[n]||(PI[n]=BI(e,t)),PI[n]};function NI(e,t){var n,r;const{size:o}=e;if(!o||"0"===o)return o;if(null==t||!t.fluid||"object"==typeof(null==t?void 0:t.fluid)&&0===Object.keys(t.fluid).length)return o;if(!1===(null==e?void 0:e.fluid))return o;const i="object"==typeof(null==t?void 0:t.fluid)?null==t?void 0:t.fluid:{},l=Fb({minimumFontSize:null==e||null===(n=e.fluid)||void 0===n?void 0:n.min,maximumFontSize:null==e||null===(r=e.fluid)||void 0===r?void 0:r.max,fontSize:o,minimumFontSizeLimit:null==i?void 0:i.minFontSize});return l||o}const MI="body",RI=[{path:["color","palette"],valueKey:"color",cssVarInfix:"color",classes:[{classSuffix:"color",propertyName:"color"},{classSuffix:"background-color",propertyName:"background-color"},{classSuffix:"border-color",propertyName:"border-color"}]},{path:["color","gradients"],valueKey:"gradient",cssVarInfix:"gradient",classes:[{classSuffix:"gradient-background",propertyName:"background"}]},{path:["color","duotone"],cssVarInfix:"duotone",valueFunc:e=>{let{slug:t}=e;return`url( '#wp-duotone-${t}' )`},classes:[]},{path:["shadow","presets"],valueKey:"shadow",cssVarInfix:"shadow",classes:[]},{path:["typography","fontSizes"],valueFunc:(e,t)=>{let{typography:n}=t;return NI(e,n)},valueKey:"size",cssVarInfix:"font-size",classes:[{classSuffix:"font-size",propertyName:"font-size"}]},{path:["typography","fontFamilies"],valueKey:"fontFamily",cssVarInfix:"font-family",classes:[{classSuffix:"font-family",propertyName:"font-family"}]},{path:["spacing","spacingSizes"],valueKey:"size",cssVarInfix:"spacing",valueFunc:e=>{let{size:t}=e;return t},classes:[]}],FI={"color.background":"color","color.text":"color","elements.link.color.text":"color","elements.link.:hover.color.text":"color","elements.link.typography.fontFamily":"font-family","elements.link.typography.fontSize":"font-size","elements.button.color.text":"color","elements.button.color.background":"color","elements.button.typography.fontFamily":"font-family","elements.button.typography.fontSize":"font-size","elements.heading.color":"color","elements.heading.color.background":"color","elements.heading.typography.fontFamily":"font-family","elements.heading.gradient":"gradient","elements.heading.color.gradient":"gradient","elements.h1.color":"color","elements.h1.color.background":"color","elements.h1.typography.fontFamily":"font-family","elements.h1.color.gradient":"gradient","elements.h2.color":"color","elements.h2.color.background":"color","elements.h2.typography.fontFamily":"font-family","elements.h2.color.gradient":"gradient","elements.h3.color":"color","elements.h3.color.background":"color","elements.h3.typography.fontFamily":"font-family","elements.h3.color.gradient":"gradient","elements.h4.color":"color","elements.h4.color.background":"color","elements.h4.typography.fontFamily":"font-family","elements.h4.color.gradient":"gradient","elements.h5.color":"color","elements.h5.color.background":"color","elements.h5.typography.fontFamily":"font-family","elements.h5.color.gradient":"gradient","elements.h6.color":"color","elements.h6.color.background":"color","elements.h6.typography.fontFamily":"font-family","elements.h6.color.gradient":"gradient","color.gradient":"gradient",shadow:"shadow","typography.fontSize":"font-size","typography.fontFamily":"font-family"};function LI(e,t,n,r,o){const i=[(0,y.get)(e,["blocks",t,...n]),(0,y.get)(e,n)];for(const l of i)if(l){const i=["custom","theme","default"];for(const a of i){const i=l[a];if(i){const l=i.find((e=>e[r]===o));if(l){if("slug"===r)return l;return LI(e,t,n,"slug",l.slug)[r]===l[r]?l:void 0}}}}}function DI(e,t,n,r){if(!r)return r;const o=FI[n],i=RI.find((e=>e.cssVarInfix===o));if(!i)return r;const{valueKey:l,path:a}=i,s=LI(e,t,a,l,r);return s?`var:preset|${o}|${s.slug}`:r}function UI(e,t,n){if(!n||"string"!=typeof n){var r,o;if(null===(r=n)||void 0===r||!r.ref||"string"!=typeof(null===(o=n)||void 0===o?void 0:o.ref))return n;{var i;const t=n.ref.split(".");if(!(n=(0,y.get)(e,t))||null!==(i=n)&&void 0!==i&&i.ref)return n}}const l="var:",a="var(--wp--";let s;if(n.startsWith(l))s=n.slice(l.length).split("|");else{if(!n.startsWith(a)||!n.endsWith(")"))return n;s=n.slice(a.length,-")".length).split("--")}const[c,...u]=s;return"preset"===c?function(e,t,n,r){let[o,i]=r;const l=RI.find((e=>e.cssVarInfix===o));if(!l)return n;const a=LI(e.settings,t,l.path,"slug",i);if(a){const{valueKey:n}=l;return UI(e,t,a[n])}return n}(e,t,n,u):"custom"===c?function(e,t,n,r){var o;const i=null!==(o=(0,y.get)(e.settings,["blocks",t,"custom",...r]))&&void 0!==o?o:(0,y.get)(e.settings,["custom",...r]);return i?UI(e,t,i):n}(e,t,n,u):n}const jI=(0,u.createContext)({user:{},base:{},merged:{},setUserConfig:()=>{}}),zI={settings:{},styles:{}},VI=()=>{const{user:e,setUserConfig:t}=(0,u.useContext)(jI);return[!!e&&!b()(e,zI),(0,u.useCallback)((()=>t((()=>zI))),[t])]};function GI(e,t){var n;let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"all";const{merged:o,base:i,user:l,setUserConfig:a}=(0,u.useContext)(jI),s=t?`settings.blocks.${t}.${e}`:`settings.${e}`,c=e=>{a((t=>{const n=JSON.parse(JSON.stringify(t));return(0,y.set)(n,s,e),n}))},p=t=>{const n=t?`settings.blocks.${t}.${e}`:`settings.${e}`;let a;switch(r){case"all":a=(0,y.get)(o,n);break;case"user":a=(0,y.get)(l,n);break;case"base":a=(0,y.get)(i,n);break;default:throw"Unsupported source"}return a},d=null!==(n=p(t))&&void 0!==n?n:p();return[d,c]}function HI(e,t){var n;let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"all";const{merged:o,base:i,user:l,setUserConfig:a}=(0,u.useContext)(jI),s=t?`styles.blocks.${t}.${e}`:`styles.${e}`,c=n=>{a((r=>{const i=JSON.parse(JSON.stringify(r));return(0,y.set)(i,s,DI(o.settings,t,e,n)),i}))};let p;switch(r){case"all":p=UI(o,t,"styles.css"===s?(0,y.get)(l,s):null!==(n=(0,y.get)(l,s))&&void 0!==n?n:(0,y.get)(i,s));break;case"user":p=UI(o,t,(0,y.get)(l,s));break;case"base":p=UI(i,t,(0,y.get)(i,s));break;default:throw"Unsupported source"}return[p,c]}const WI={__experimentalBorder:"border",color:"color",spacing:"spacing",typography:"typography"};function $I(e){var t;const n="var:";if(null!=e&&null!==(t=e.startsWith)&&void 0!==t&&t.call(e,n)){return`var(--wp--${e.slice(n.length).split("|").join("--")})`}return e}function KI(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return RI.reduce(((n,r)=>{let{path:o,cssVarInfix:i,classes:l}=r;if(!l)return n;const a=(0,y.get)(t,o,[]);return["default","theme","custom"].forEach((t=>{a[t]&&a[t].forEach((t=>{let{slug:r}=t;l.forEach((t=>{let{classSuffix:o,propertyName:l}=t;const a=`.has-${(0,y.kebabCase)(r)}-${o}`,s=e.split(",").map((e=>`${e}${a}`)).join(","),c=`var(--wp--preset--${i}--${(0,y.kebabCase)(r)})`;n+=`${s}{${l}: ${c} !important;}`}))}))})),n}),"")}function qI(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,r=[];return Object.keys(e).forEach((o=>{const i=t+(0,y.kebabCase)(o.replace("/","-")),l=e[o];if(l instanceof Object){const e=i+n;r=[...r,...qI(l,e,n)]}else r.push(`${i}: ${l}`)})),r}function JI(e,t){const n=e.split(","),r=[];return n.forEach((e=>{r.push(`${t.trim()}${e.trim()}`)})),r.join(", ")}function YI(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const o=MI===t,i=Object.entries(a.__EXPERIMENTAL_STYLE_PROPERTY).reduce(((t,r)=>{let[i,{value:l,properties:a,useEngine:s,rootOnly:c}]=r;if(c&&!o)return t;const u=l;if("elements"===u[0]||s)return t;const p=(0,y.get)(e,u);if("--wp--style--root--padding"===i&&("string"==typeof p||!n))return t;if(a&&"string"!=typeof p)Object.entries(a).forEach((e=>{const[n,r]=e;if(!(0,y.get)(p,[r],!1))return;const o=n.startsWith("--")?n:(0,y.kebabCase)(n);t.push(`${o}: ${$I((0,y.get)(p,[r]))}`)}));else if((0,y.get)(e,u,!1)){const n=i.startsWith("--")?i:(0,y.kebabCase)(i);t.push(`${n}: ${$I((0,y.get)(e,u))}`)}return t}),[]),l=(0,nl.getCSSRules)(e);return l.forEach((e=>{var t;if(o&&n&&e.key.startsWith("padding"))return;const l=e.key.startsWith("--")?e.key:(0,y.kebabCase)(e.key);let a=e.value;if("string"!=typeof a&&null!==(t=a)&&void 0!==t&&t.ref){var s;const e=a.ref.split(".");if(a=(0,y.get)(r,e),!a||null!==(s=a)&&void 0!==s&&s.ref)return}var c;"font-size"===l&&(a=NI({size:a},null==r||null===(c=r.settings)||void 0===c?void 0:c.typography));i.push(`${l}: ${a}`)})),i}function QI(e){var t,n,r,o,i;let{tree:l,style:a,selector:s,hasBlockGapSupport:c,hasFallbackGapSupport:u,fallbackGapValue:p}=e,d="",f=c?Ii(null==a||null===(t=a.spacing)||void 0===t?void 0:t.blockGap):"";if(u&&(s===MI?f=f||"0.5em":!c&&p&&(f=p)),f&&null!=l&&null!==(n=l.settings)&&void 0!==n&&null!==(r=n.layout)&&void 0!==r&&r.definitions&&(Object.values(l.settings.layout.definitions).forEach((e=>{let{className:t,name:n,spacingStyles:r}=e;(c||"flex"===n)&&null!=r&&r.length&&r.forEach((e=>{const n=[];if(e.rules&&Object.entries(e.rules).forEach((e=>{let[t,r]=e;n.push(`${t}: ${r||f}`)})),n.length){let r="";r=c?s===MI?`${s} .${t}${(null==e?void 0:e.selector)||""}`:`${s}.${t}${(null==e?void 0:e.selector)||""}`:s===MI?`:where(.${t}${(null==e?void 0:e.selector)||""})`:`:where(${s}.${t}${(null==e?void 0:e.selector)||""})`,d+=`${r} { ${n.join("; ")}; }`}}))})),s===MI&&c&&(d+=`${s} { --wp--style--block-gap: ${f}; }`)),s===MI&&null!=l&&null!==(o=l.settings)&&void 0!==o&&null!==(i=o.layout)&&void 0!==i&&i.definitions){const e=["block","flex","grid"];Object.values(l.settings.layout.definitions).forEach((t=>{let{className:n,displayMode:r,baseStyles:o}=t;r&&e.includes(r)&&(d+=`${s} .${n} { display:${r}; }`),null!=o&&o.length&&o.forEach((e=>{const t=[];if(e.rules&&Object.entries(e.rules).forEach((e=>{let[n,r]=e;t.push(`${n}: ${r}`)})),t.length){const r=`${s} .${n}${(null==e?void 0:e.selector)||""}`;d+=`${r} { ${t.join("; ")}; }`}}))}))}return d}const ZI=(e,t)=>{var n,r;const o=[];if(null==e||!e.styles)return o;const i=e=>Object.fromEntries(Object.entries(null!=e?e:{}).filter((e=>{let[t]=e;return["border","color","dimensions","spacing","typography","filter","outline","shadow"].includes(t)}))),l=i(e.styles);return l&&o.push({styles:l,selector:MI}),Object.entries(a.__EXPERIMENTAL_ELEMENTS).forEach((t=>{var n;let[r,i]=t;var l;null!==(n=e.styles)&&void 0!==n&&n.elements[r]&&o.push({styles:null===(l=e.styles)||void 0===l?void 0:l.elements[r],selector:i})})),Object.entries(null!==(n=null===(r=e.styles)||void 0===r?void 0:r.blocks)&&void 0!==n?n:{}).forEach((e=>{var n,r;let[l,s]=e;const c=i(s);if(null!=s&&s.variations){const e={};Object.keys(s.variations).forEach((t=>{e[t]=i(s.variations[t])})),c.variations=e}c&&null!=t&&null!==(n=t[l])&&void 0!==n&&n.selector&&o.push({duotoneSelector:t[l].duotoneSelector,fallbackGapValue:t[l].fallbackGapValue,hasLayoutSupport:t[l].hasLayoutSupport,selector:t[l].selector,styles:c,featureSelectors:t[l].featureSelectors,styleVariationSelectors:t[l].styleVariationSelectors}),Object.entries(null!==(r=null==s?void 0:s.elements)&&void 0!==r?r:{}).forEach((e=>{let[n,r]=e;r&&null!=t&&t[l]&&null!==a.__EXPERIMENTAL_ELEMENTS&&void 0!==a.__EXPERIMENTAL_ELEMENTS&&a.__EXPERIMENTAL_ELEMENTS[n]&&o.push({styles:r,selector:t[l].selector.split(",").map((e=>a.__EXPERIMENTAL_ELEMENTS[n].split(",").map((t=>e+" "+t)))).join(",")})}))})),o},XI=(e,t)=>{var n,r,o;const i=[];if(null==e||!e.settings)return i;const l=e=>{const t={};return RI.forEach((n=>{let{path:r}=n;const o=(0,y.get)(e,r,!1);!1!==o&&(0,y.set)(t,r,o)})),t},a=l(e.settings),s=null===(n=e.settings)||void 0===n?void 0:n.custom;return(0,y.isEmpty)(a)&&!s||i.push({presets:a,custom:s,selector:MI}),Object.entries(null!==(r=null===(o=e.settings)||void 0===o?void 0:o.blocks)&&void 0!==r?r:{}).forEach((e=>{let[n,r]=e;const o=l(r),a=r.custom;(0,y.isEmpty)(o)&&!a||i.push({presets:o,custom:a,selector:t[n].selector})})),i},eA=(e,t)=>{const n=XI(e,t);let r="";return n.forEach((t=>{let{presets:n,custom:o,selector:i}=t;const l=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return RI.reduce(((n,r)=>{let{path:o,valueKey:i,valueFunc:l,cssVarInfix:a}=r;const s=(0,y.get)(e,o,[]);return["default","theme","custom"].forEach((e=>{s[e]&&s[e].forEach((e=>{i&&!l?n.push(`--wp--preset--${a}--${(0,y.kebabCase)(e.slug)}: ${e[i]}`):l&&"function"==typeof l&&n.push(`--wp--preset--${a}--${(0,y.kebabCase)(e.slug)}: ${l(e,t)}`)}))})),n}),[])}(n,null==e?void 0:e.settings),a=qI(o,"--wp--custom--","--");a.length>0&&l.push(...a),l.length>0&&(r+=`${i}{${l.join(";")};}`)})),r};function tA(e,t){return XI(e,t).flatMap((e=>{let{presets:t}=e;return function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return RI.filter((e=>"duotone"===e.path.at(-1))).flatMap((t=>{const n=(0,y.get)(e,t.path,{});return["default","theme"].filter((e=>n[e])).flatMap((e=>n[e].map((e=>(0,u.createElement)(Yd,{preset:e,key:e.slug})))))}))}(t)}))}const nA=(e,t)=>{let n="";return e.split("&").forEach((e=>{n+=e.includes("{")?t+e:t+"{"+e+"}"})),n};function rA(){let{merged:e}=(0,u.useContext)(jI);const[t]=GI("spacing.blockGap"),n=null!==t,r=!n,o=(0,m.useSelect)((e=>{const{getSettings:t}=e(xr);return!!t().disableLayoutStyles})),i=(0,m.useSelect)((e=>e(a.store).getBlockStyles),[]);return(0,u.useMemo)((()=>{var t,l,s;if(null===(t=e)||void 0===t||!t.styles||null===(l=e)||void 0===l||!l.settings)return[];e=function(e){var t,n,r,o,i,l,a,s;return!(null===(t=e.styles)||void 0===t?void 0:t.blocks["core/separator"])||!(null===(n=e.styles)||void 0===n||null===(r=n.blocks["core/separator"].color)||void 0===r?void 0:r.background)||null!==(o=e.styles)&&void 0!==o&&null!==(i=o.blocks["core/separator"].color)&&void 0!==i&&i.text||null!==(l=e.styles)&&void 0!==l&&null!==(a=l.blocks["core/separator"].border)&&void 0!==a&&a.color?e:{...e,styles:{...e.styles,blocks:{...e.styles.blocks,"core/separator":{...e.styles.blocks["core/separator"],color:{...e.styles.blocks["core/separator"].color,text:null===(s=e.styles)||void 0===s?void 0:s.blocks["core/separator"].color.background}}}}}}(e);const c=((e,t)=>{const n={};return e.forEach((e=>{var r,o,i,l,a,s,c,u,p;const d=e.name,f=null!==(r=null==e||null===(o=e.supports)||void 0===o?void 0:o.__experimentalSelector)&&void 0!==r?r:".wp-block-"+d.replace("core/","").replace("/","-"),m=null!==(i=null==e||null===(l=e.supports)||void 0===l||null===(a=l.color)||void 0===a?void 0:a.__experimentalDuotone)&&void 0!==i?i:null,y=!(null==e||null===(s=e.supports)||void 0===s||!s.__experimentalLayout),g=null==e||null===(c=e.supports)||void 0===c||null===(u=c.spacing)||void 0===u||null===(p=u.blockGap)||void 0===p?void 0:p.__experimentalDefault,h=t(d),v={};null!=h&&h.length&&h.forEach((e=>{const t=`.is-style-${e.name}${f}`;v[e.name]=t}));const b={};Object.entries(WI).forEach((t=>{var n,r;let[o,i]=t;const l=null==e||null===(n=e.supports)||void 0===n||null===(r=n[o])||void 0===r?void 0:r.__experimentalSelector;l&&(b[i]=function(e,t){const n=e.split(","),r=t.split(","),o=[];return n.forEach((e=>{r.forEach((t=>{o.push(`${e.trim()} ${t.trim()}`)}))})),o.join(", ")}(f,l))})),n[d]={duotoneSelector:m,fallbackGapValue:g,featureSelectors:Object.keys(b).length?b:void 0,hasLayoutSupport:y,name:d,selector:f,styleVariationSelectors:Object.keys(v).length?v:void 0}})),n})((0,a.getBlockTypes)(),i),u=eA(e,c),p=function(e,t,n,r){var o,i;let l=arguments.length>4&&void 0!==arguments[4]&&arguments[4];const a=ZI(e,t),s=XI(e,t),c=null==e||null===(o=e.settings)||void 0===o?void 0:o.useRootPaddingAwareAlignments,{contentSize:u,wideSize:p}=(null==e||null===(i=e.settings)||void 0===i?void 0:i.layout)||{};let d="body {margin: 0;";if(u&&(d+=` --wp--style--global--content-size: ${u};`),p&&(d+=` --wp--style--global--wide-size: ${p};`),c&&(d+='padding-right: 0; padding-left: 0; padding-top: var(--wp--style--root--padding-top); padding-bottom: var(--wp--style--root--padding-bottom) }\n\t\t\t.has-global-padding { padding-right: var(--wp--style--root--padding-right); padding-left: var(--wp--style--root--padding-left); }\n\t\t\t.has-global-padding :where(.has-global-padding) { padding-right: 0; padding-left: 0; }\n\t\t\t.has-global-padding > .alignfull { margin-right: calc(var(--wp--style--root--padding-right) * -1); margin-left: calc(var(--wp--style--root--padding-left) * -1); }\n\t\t\t.has-global-padding :where(.has-global-padding) > .alignfull { margin-right: 0; margin-left: 0; }\n\t\t\t.has-global-padding > .alignfull:where(:not(.has-global-padding)) > :where([class*="wp-block-"]:not(.alignfull):not([class*="__"]),p,h1,h2,h3,h4,h5,h6,ul,ol) { padding-right: var(--wp--style--root--padding-right); padding-left: var(--wp--style--root--padding-left); }\n\t\t\t.has-global-padding :where(.has-global-padding) > .alignfull:where(:not(.has-global-padding)) > :where([class*="wp-block-"]:not(.alignfull):not([class*="__"]),p,h1,h2,h3,h4,h5,h6,ul,ol) { padding-right: 0; padding-left: 0;'),d+="}",a.forEach((t=>{let{selector:o,duotoneSelector:i,styles:a,fallbackGapValue:s,hasLayoutSupport:u,featureSelectors:p,styleVariationSelectors:f}=t;p&&Object.entries(p).forEach((e=>{let[t,n]=e;if(null!=a&&a[t]){const e=YI({[t]:a[t]});delete a[t],e.length&&(d+=`${n}{${e.join(";")} }`)}})),f&&Object.entries(f).forEach((t=>{var n;let[r,o]=t;if(null!=a&&null!==(n=a.variations)&&void 0!==n&&n[r]){var i;p&&Object.entries(p).forEach((e=>{var t,n;let[i,l]=e;if(null!=a&&null!==(t=a.variations)&&void 0!==t&&null!==(n=t[r])&&void 0!==n&&n[i]){const e=YI({[i]:a.variations[r][i]});delete a.variations[r][i],e.length&&(d+=`${JI(l,o)}{${e.join(";")} }`)}}));const t=YI(null==a||null===(i=a.variations)||void 0===i?void 0:i[r],o,c,e);t.length&&(d+=`${o}{${t.join(";")}}`)}}));const m={};if(null!=a&&a.filter&&(m.filter=a.filter,delete a.filter),i){const e=YI(m);e.length>0&&(d+=`${i}{${e.join(";")};}`)}l||MI!==o&&!u||(d+=QI({tree:e,style:a,selector:o,hasBlockGapSupport:n,hasFallbackGapSupport:r,fallbackGapValue:s}));const y=YI(a,o,c,e);null!=y&&y.length&&(d+=`${o}{${y.join(";")};}`);const g=Object.entries(a).filter((e=>{let[t]=e;return t.startsWith(":")}));null!=g&&g.length&&g.forEach((e=>{let[t,n]=e;const r=YI(n);if(null==r||!r.length)return;const i=`${o.split(",").map((e=>e+t)).join(",")}{${r.join(";")};}`;d+=i}))})),d+=".wp-site-blocks > .alignleft { float: left; margin-right: 2em; }",d+=".wp-site-blocks > .alignright { float: right; margin-left: 2em; }",d+=".wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }",n){var f,m;const t=Ii(null==e||null===(f=e.styles)||void 0===f||null===(m=f.spacing)||void 0===m?void 0:m.blockGap)||"0.5em";d+=".wp-site-blocks > * { margin-block-start: 0; margin-block-end: 0; }",d+=`.wp-site-blocks > * + * { margin-block-start: ${t}; }`}return s.forEach((e=>{let{selector:t,presets:n}=e;MI===t&&(t="");const r=KI(t,n);(0,y.isEmpty)(r)||(d+=r)})),d}(e,c,n,r,o),d=tA(e,c),f=[{css:u,isGlobalStyles:!0},{css:p,isGlobalStyles:!0},{css:null!==(s=e.styles.css)&&void 0!==s?s:"",isGlobalStyles:!0}];return(0,a.getBlockTypes)().forEach((t=>{var n;if(null!==(n=e.styles.blocks[t.name])&&void 0!==n&&n.css){var r;const n=c[t.name].selector;f.push({css:nA(null===(r=e.styles.blocks[t.name])||void 0===r?void 0:r.css,n),isGlobalStyles:!0})}})),[f,e.settings,d]}),[n,r,e,o])}const oA=["core/navigation-link/page","core/navigation-link"],iA=(0,u.forwardRef)(((e,t)=>{let{nestingLevel:n,blockCount:r,...o}=e;const[i,l]=(0,u.useState)(null),a=(0,f.useInstanceId)(iA),{hideInserter:s,clientId:p}=(0,m.useSelect)((e=>{const{getTemplateLock:t,__unstableGetEditorMode:n,getSelectedBlockClientId:r}=e(xr),o=r();return{clientId:r(),hideInserter:!!t(o)||"zoom-out"===n()}}),[]),d=cy({clientId:p,context:"list-view"}),y=cy({clientId:null==i?void 0:i.clientId,context:"list-view"});(0,u.useEffect)((()=>{null!=y&&y.length&&(0,dn.speak)((0,_.sprintf)((0,_.__)("%s block inserted"),y),"assertive")}),[y]);const g=(0,u.useCallback)((e=>(e.sort(((e,t)=>{let{id:n}=e,{id:r}=t,o=oA.indexOf(n),i=oA.indexOf(r);return o<0&&(o=oA.length),i<0&&(i=oA.length),o-i})),e)),[]);if(s)return null;const{PrivateInserter:h}=Ir(MA),v=`off-canvas-editor-appender__${a}`,b=(0,_.sprintf)((0,_.__)("Append to %1$s block at position %2$d, Level %3$d"),d,r+1,n);return(0,u.createElement)("div",{className:"offcanvas-editor-appender"},(0,u.createElement)(h,c({ref:t,rootClientId:p,position:"bottom right",isAppender:!0,selectBlockOnInsert:!1,shouldDirectInsert:!1,__experimentalIsQuick:!0},o,{toggleProps:{"aria-describedby":v},onSelectOrClose:e=>{null!=e&&e.clientId&&l(e)},orderInitialBlockItems:g})),(0,u.createElement)("div",{className:"offcanvas-editor-appender__description",id:v},b))})),lA=Fu(g.__experimentalTreeGridRow);function aA(e){let{isSelected:t,position:n,level:r,rowCount:o,children:i,className:l,path:a,...s}=e;const p=Uu({isSelected:t,adjustScrolling:!1,enableAnimation:!0,triggerAnimationOnChange:a});return(0,u.createElement)(lA,c({ref:p,className:d()("block-editor-list-view-leaf","offcanvas-editor-list-view-leaf",l),level:r,positionInSet:n,setSize:o},s),i)}function sA(e){let{onClick:t}=e;return(0,u.createElement)("span",{className:"block-editor-list-view__expander",onClick:e=>t(e,{forceToggle:!0}),"aria-hidden":"true"},(0,u.createElement)(Xi,{icon:(0,_.isRTL)()?jk:Pk}))}var cA=(0,u.forwardRef)((function(e,t){let{className:n,block:r,onClick:o,onToggleExpanded:i,tabIndex:l,onFocus:a,onDragStart:s,onDragEnd:c,draggable:p}=e;const{clientId:f}=r,m=sy(f),y=cy({clientId:f,context:"list-view"}),{isLocked:h}=Pg(f),v=m?(0,_.sprintf)((0,_.__)("Edit %s block"),m.title):(0,_.__)("Edit");return(0,u.createElement)(u.Fragment,null,(0,u.createElement)(g.Button,{className:d()("block-editor-list-view-block-select-button",n),onClick:o,onKeyDown:function(e){e.keyCode!==Xu.ENTER&&e.keyCode!==Xu.SPACE||o(e)},ref:t,tabIndex:l,onFocus:a,onDragStart:e=>{e.dataTransfer.clearData(),null==s||s(e)},onDragEnd:c,draggable:p,href:`#block-${f}`,"aria-hidden":!0,title:v},(0,u.createElement)(sA,{onClick:i}),(0,u.createElement)(hp,{icon:null==m?void 0:m.icon,showColors:!0,context:"list-view"}),(0,u.createElement)(g.__experimentalHStack,{alignment:"center",className:"block-editor-list-view-block-select-button__label-wrapper",justify:"flex-start",spacing:1},(0,u.createElement)("span",{className:"block-editor-list-view-block-select-button__title"},(0,u.createElement)(g.__experimentalTruncate,{ellipsizeMode:"auto"},y)),(null==m?void 0:m.anchor)&&(0,u.createElement)("span",{className:"block-editor-list-view-block-select-button__anchor-wrapper"},(0,u.createElement)(g.__experimentalTruncate,{className:"block-editor-list-view-block-select-button__anchor",ellipsizeMode:"auto"},m.anchor)),h&&(0,u.createElement)("span",{className:"block-editor-list-view-block-select-button__lock"},(0,u.createElement)(Xi,{icon:Uk})))))})),uA=window.wp.escapeHtml;function pA(e,t){switch(e){case"post":case"page":return{type:"post",subtype:e};case"category":return{type:"term",subtype:"category"};case"tag":return{type:"term",subtype:"post_tag"};case"post_format":return{type:"post-format"};default:return"taxonomy"===t?{type:"term",subtype:e}:"post-type"===t?{type:"post",subtype:e}:{}}}function dA(e){let{clientId:t}=e;const{getBlock:n,blockTransforms:r}=(0,m.useSelect)((e=>{const{getBlock:n,getBlockRootClientId:r,getBlockTransformItems:o}=e(xr);return{getBlock:n,blockTransforms:o(n(t),r(t))}}),[t]),{replaceBlock:o}=(0,m.useDispatch)(xr),i=["core/page-list","core/site-logo","core/social-links","core/search"],l=r.filter((e=>i.includes(e.name)));return null!=l&&l.length&&t?(0,u.createElement)("div",{className:"link-control-transform"},(0,u.createElement)("h3",{className:"link-control-transform__subheading"},(0,_.__)("Transform")),(0,u.createElement)("div",{className:"link-control-transform__items"},l.map((e=>(0,u.createElement)(g.Button,{key:`transform-${e.name}`,onClick:()=>o(t,(0,a.switchToBlockType)(n(t),e.name)),className:"link-control-transform__item"},(0,u.createElement)(hp,{icon:e.icon}),e.title))))):null}function fA(e){const{label:t,url:n,opensInNewTab:r,type:o,kind:i}=e.link,l={url:n,opensInNewTab:r,title:t&&(0,Ml.__unstableStripHTML)(t)};return(0,u.createElement)(g.Popover,{placement:"bottom",onClose:e.onClose,anchor:e.anchor,shift:!0},(0,u.createElement)(lw,{hasTextControl:!0,hasRichPreviews:!0,className:e.className,value:l,showInitialSuggestions:!0,withCreateSuggestion:e.hasCreateSuggestion,noDirectEntry:!!o,noURLSuggestion:!!o,suggestionsQuery:pA(o,i),onChange:e.onChange,onRemove:e.onRemove,renderControlBottom:n?null:()=>(0,u.createElement)(dA,{clientId:e.clientId})}))}const mA=["core/navigation-link","core/navigation-submenu"],yA=(0,u.forwardRef)(((e,t)=>{let{onClick:n,onToggleExpanded:r,block:o,isSelected:i,position:l,siblingBlockCount:a,level:s,isExpanded:p,selectedClientIds:f,...y}=e;const{clientId:g}=o,[h,v]=(0,u.useState)(),{blockMovingClientId:b,selectedBlockInBlockEditor:_,lastInsertedBlockClientId:k}=(0,m.useSelect)((e=>{const{hasBlockMovingClientId:t,getSelectedBlockClientId:n,getLastInsertedBlocksClientIds:r}=Ir(e(xr)),o=r();return{blockMovingClientId:t(),selectedBlockInBlockEditor:n(),lastInsertedBlockClientId:o&&o[0]}}),[g]),{insertedBlockAttributes:E,insertedBlockName:S,setInsertedBlockAttributes:w}=(e=>{const{insertedBlockAttributes:t,insertedBlockName:n}=(0,m.useSelect)((t=>{const{getBlockName:n,getBlockAttributes:r}=t(xr);return{insertedBlockAttributes:r(e),insertedBlockName:n(e)}}),[e]),{updateBlockAttributes:r}=(0,m.useDispatch)(xr),o=t=>{e&&r(e,t)};return e?{insertedBlockAttributes:t,insertedBlockName:n,setInsertedBlockAttributes:o}:{insertedBlockAttributes:void 0,insertedBlockName:void 0,setInsertedBlockAttributes:o}})(k),C=null==E?void 0:E.url;(0,u.useEffect)((()=>{g===k&&null!=mA&&mA.includes(S)&&!C&&v(!0)}),[k,g,S,C]);const I=b&&_===g,A=d()("block-editor-list-view-block-contents",{"is-dropping-before":I}),x=f.includes(g)?f:[g];return(0,u.createElement)(u.Fragment,null,h&&(0,u.createElement)(fA,{clientId:k,link:E,onClose:()=>v(!1),hasCreateSuggestion:!1,onChange:e=>{!function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{label:r="",kind:o="",type:i=""}=n,{title:l="",url:a="",opensInNewTab:s,id:c,kind:u=o,type:p=i}=e,d=l.replace(/http(s?):\/\//gi,""),f=a.replace(/http(s?):\/\//gi,""),m=l&&l!==r&&d!==f?(0,uA.escapeHTML)(l):r||(0,uA.escapeHTML)(f),y="post_tag"===p?"tag":p.replace("-","_"),g=["post","page","tag","category"].indexOf(y)>-1,h=!u&&!g||"custom"===u?"custom":u;t({...a&&{url:encodeURI((0,sm.safeDecodeURI)(a))},...m&&{label:m},...void 0!==s&&{opensInNewTab:s},...c&&Number.isInteger(c)&&{id:c},...h&&{kind:h},...y&&"URL"!==y&&{type:y}})}(e,w,E),v(!1)}}),(0,u.createElement)(py,{clientIds:x},(e=>{let{draggable:d,onDragStart:f,onDragEnd:m}=e;return(0,u.createElement)(cA,c({ref:t,className:A,block:o,onClick:n,onToggleExpanded:r,isSelected:i,position:l,siblingBlockCount:a,level:s,draggable:d,onDragStart:f,onDragEnd:m,isExpanded:p},y))})))}));var gA=yA;const hA=(0,u.createContext)({}),vA=()=>(0,u.useContext)(hA);var bA=(0,u.memo)((function e(t){let{block:{clientId:n},isDragged:r,isSelected:o,isBranchSelected:i,selectBlock:l,position:s,level:c,rowCount:p,siblingBlockCount:y,showBlockMovers:h,path:v,isExpanded:b,selectedClientIds:k,preventAnnouncement:E}=t;const S=(0,u.useRef)(null),[w,C]=(0,u.useState)(!1),{isLocked:I,isContentLocked:A}=Pg(n),x=(0,m.useSelect)((e=>!o&&(!!A&&e(xr).hasSelectedInnerBlock(n,!0))),[A,n,o]),B=x||o&&k[0]===n,P=x||o&&k[k.length-1]===n,{toggleBlockHighlight:T}=(0,m.useDispatch)(xr),O=sy(n),N=(0,m.useSelect)((e=>e(xr).getBlock(n)),[n]);(0,u.useEffect)((()=>{!D&&o&&S.current.focus()}),[]);const M=(0,u.useCallback)((()=>{C(!0),T(n,!0)}),[n,C,T]),R=(0,u.useCallback)((()=>{C(!1),T(n,!1)}),[n,C,T]),F=(0,u.useCallback)((e=>{l(e,n),e.preventDefault()}),[n,l]),L=(0,u.useCallback)((e=>{l(void 0,e)}),[l]),{isTreeGridMounted:D,expand:U,collapse:j,LeafMoreMenu:z}=vA(),V=(0,u.useCallback)((e=>{e.preventDefault(),e.stopPropagation(),!0===b?j(n):!1===b&&U(n)}),[n,U,j,b]),G=(0,f.useInstanceId)(e);if(!N)return null;const H=!!N&&(0,a.hasBlockSupport)(N.name,"__experimentalToolbar",!0),W=`list-view-block-select-button__${G}`,$=((e,t,n)=>(0,_.sprintf)((0,_.__)("Block %1$d of %2$d, Level %3$d"),e,t,n))(s,y,c);let K=(0,_.__)("Link");O&&(K=I?(0,_.sprintf)((0,_.__)("%s link (locked)"),O.title):(0,_.sprintf)((0,_.__)("%s link"),O.title));const q=O?(0,_.sprintf)((0,_.__)("Options for %s block"),O.title):(0,_.__)("Options"),J=h&&y>0,Y=d()("block-editor-list-view-block__mover-cell",{"is-visible":w||o}),Q=d()("block-editor-list-view-block__menu-cell",{"is-visible":w||B});let Z;J?Z=1:H||(Z=2);const X=d()({"is-selected":o||x,"is-first-selected":B,"is-last-selected":P,"is-branch-selected":i,"is-dragging":r,"has-single-cell":!H}),ee=k.includes(n)?k:[n],te=z||Wg;return(0,u.createElement)(aA,{className:X,onMouseEnter:M,onMouseLeave:R,onFocus:M,onBlur:R,level:c,position:s,rowCount:p,path:v,id:`list-view-block-${n}`,"data-block":n,isExpanded:A?void 0:b,"aria-selected":!!o||x},(0,u.createElement)(g.__experimentalTreeGridCell,{className:"block-editor-list-view-block__contents-cell",colSpan:Z,ref:S,"aria-label":K,"aria-selected":!!o||x,"aria-expanded":A?void 0:b,"aria-describedby":W},(e=>{let{ref:t,tabIndex:n,onFocus:r}=e;return(0,u.createElement)("div",{className:"block-editor-list-view-block__contents-container"},(0,u.createElement)(gA,{block:N,onClick:F,onToggleExpanded:V,isSelected:o,position:s,siblingBlockCount:y,level:c,ref:t,tabIndex:n,onFocus:r,isExpanded:b,selectedClientIds:k,preventAnnouncement:E}),(0,u.createElement)("div",{className:"block-editor-list-view-block-select-button__description",id:W},$))})),J&&(0,u.createElement)(u.Fragment,null,(0,u.createElement)(g.__experimentalTreeGridCell,{className:Y,withoutGridItem:!0},(0,u.createElement)(g.__experimentalTreeGridItem,null,(e=>{let{ref:t,tabIndex:r,onFocus:o}=e;return(0,u.createElement)(by,{orientation:"vertical",clientIds:[n],ref:t,tabIndex:r,onFocus:o})})),(0,u.createElement)(g.__experimentalTreeGridItem,null,(e=>{let{ref:t,tabIndex:r,onFocus:o}=e;return(0,u.createElement)(_y,{orientation:"vertical",clientIds:[n],ref:t,tabIndex:r,onFocus:o})})))),H&&(0,u.createElement)(u.Fragment,null,(0,u.createElement)(g.__experimentalTreeGridCell,{className:Q,"aria-selected":!!o||x},(e=>{let{ref:t,tabIndex:r,onFocus:o}=e;return(0,u.createElement)(u.Fragment,null,(0,u.createElement)(te,{clientIds:ee,block:N,clientId:n,icon:dm,label:q,toggleProps:{ref:t,className:"block-editor-list-view-block__menu",tabIndex:r,onFocus:o},disableOpenOnArrowDown:!0,__experimentalSelectBlock:L}))}))))}));function _A(e,t,n,r){var o;if(null==n?void 0:n.includes(e.clientId))return 0;return(null!==(o=t[e.clientId])&&void 0!==o?o:r)?1+e.innerBlocks.reduce(kA(t,n,r),0):1}const kA=(e,t,n)=>(r,o)=>{var i;if(null==t?void 0:t.includes(o.clientId))return r;return(null!==(i=e[o.clientId])&&void 0!==i?i:n)&&o.innerBlocks.length>0?r+_A(o,e,t,n):r+1},EA=()=>{};var SA=(0,u.memo)((function e(t){const{blocks:n,selectBlock:r=EA,showBlockMovers:o,selectedClientIds:i,level:l=1,path:a="",isBranchSelected:s=!1,listPosition:p=0,fixedListWindow:d,isExpanded:f,parentId:y,shouldShowInnerBlocks:h=!0,showAppender:v=!0}=t,b=(0,m.useSelect)((e=>!(!y||"contentOnly"!==e(xr).getTemplateLock(y))),[y]),{expandedState:_,draggedClientIds:k}=vA();if(b)return null;const E=v&&1===l,S=n.filter(Boolean),w=S.length,C=E?w+1:w;let I=p;return(0,u.createElement)(u.Fragment,null,S.map(((t,n)=>{var c;const{clientId:p,innerBlocks:y}=t;n>0&&(I+=_A(S[n-1],_,k,f));const{itemInView:g}=d,b=g(I),E=n+1,A=a.length>0?`${a}_${E}`:`${E}`,x=!(null==y||!y.length),B=x&&h?null!==(c=_[p])&&void 0!==c?c:f:void 0,P=!(null==k||!k.includes(p)),T=P||b,O=((e,t)=>Array.isArray(t)&&t.length?-1!==t.indexOf(e):t===e)(p,i),N=s||O&&x;return(0,u.createElement)(m.AsyncModeProvider,{key:p,value:!O},T&&(0,u.createElement)(bA,{block:t,selectBlock:r,isSelected:O,isBranchSelected:N,isDragged:P,level:l,position:E,rowCount:C,siblingBlockCount:w,showBlockMovers:o,path:A,isExpanded:B,listPosition:I,selectedClientIds:i}),!T&&(0,u.createElement)("tr",null,(0,u.createElement)("td",{className:"block-editor-list-view-placeholder"})),x&&B&&!P&&(0,u.createElement)(e,{parentId:p,blocks:y,selectBlock:r,showBlockMovers:o,level:l+1,path:A,listPosition:I+1,fixedListWindow:d,isBranchSelected:N,selectedClientIds:i,isExpanded:f,showAppender:v}))})),E&&(0,u.createElement)(g.__experimentalTreeGridRow,{level:l,setSize:C,positionInSet:C,isExpanded:!0},(0,u.createElement)(g.__experimentalTreeGridCell,null,(e=>(0,u.createElement)(iA,c({nestingLevel:l,blockCount:w},e))))))}));function wA(e){let{listViewRef:t,blockDropTarget:n}=e;const{rootClientId:r,clientId:o,dropPosition:i}=n||{},[l,a]=(0,u.useMemo)((()=>{if(!t.current)return[];return[r?t.current.querySelector(`[data-block="${r}"]`):void 0,o?t.current.querySelector(`[data-block="${o}"]`):void 0]}),[r,o]),s=a||l,c=(0,u.useCallback)((()=>{if(!l)return 0;const e=s.getBoundingClientRect();return l.querySelector(".block-editor-block-icon").getBoundingClientRect().right-e.left}),[l,s]),p=(0,u.useMemo)((()=>{if(!s)return{};const e=c();return{width:s.offsetWidth-e}}),[c,s]),d=(0,u.useMemo)((()=>{if(s&&("top"===i||"bottom"===i||"inside"===i))return{ownerDocument:s.ownerDocument,getBoundingClientRect(){const e=s.getBoundingClientRect(),t=c(),n=e.left+t,r=e.right;let o=0,l=0;"top"===i?(o=e.top,l=e.top):(o=e.bottom,l=e.bottom);const a=r-n,u=l-o;return new window.DOMRect(n,o,a,u)}}}),[s,i,c]);return s?(0,u.createElement)(g.Popover,{animate:!1,anchor:d,focusOnMount:!1,className:"block-editor-list-view-drop-indicator",variant:"unstyled"},(0,u.createElement)("div",{style:p,className:"block-editor-list-view-drop-indicator__line"})):null}function CA(){const{clearSelectedBlock:e,multiSelect:t,selectBlock:n}=(0,m.useDispatch)(xr),{getBlockName:r,getBlockParents:o,getBlockSelectionStart:i,getBlockSelectionEnd:l,getSelectedBlockClientIds:s,hasMultiSelection:c,hasSelectedBlock:p}=(0,m.useSelect)(xr),{getBlockType:d}=(0,m.useSelect)(a.store),f=(0,u.useCallback)((async(l,a,u)=>{if(null==l||!l.shiftKey)return void n(a);l.preventDefault();const f="keydown"===l.type&&(l.keyCode===Xu.UP||l.keyCode===Xu.DOWN||l.keyCode===Xu.HOME||l.keyCode===Xu.END);if(!f&&!p()&&!c())return void n(a,null);const m=s(),y=[...o(a),a];f&&!m.some((e=>y.includes(e)))&&await e();let g=i(),h=a;f&&(p()||c()||(g=a),u&&(h=u));const v=o(g),b=o(h),{start:k,end:E}=function(e,t,n,r){const o=[...n,e],i=[...r,t],l=Math.min(o.length,i.length)-1;return{start:o[l],end:i[l]}}(g,h,v,b);await t(k,E,null);const S=s();if((l.keyCode===Xu.HOME||l.keyCode===Xu.END)&&S.length>1)return;const w=m.filter((e=>!S.includes(e)));let C;if(1===w.length){var I;const e=null===(I=d(r(w[0])))||void 0===I?void 0:I.title;e&&(C=(0,_.sprintf)((0,_.__)("%s deselected."),e))}else w.length>1&&(C=(0,_.sprintf)((0,_.__)("%s blocks deselected."),w.length));C&&(0,dn.speak)(C)}),[e,r,d,o,i,l,s,c,p,t,n]);return{updateBlockSelection:f}}const IA=["top","bottom"];function AA(){const{getBlockRootClientId:e,getBlockIndex:t,getBlockCount:n,getDraggedBlockClientIds:r,canInsertBlocks:o}=(0,m.useSelect)(xr),[i,l]=(0,u.useState)(),{rootClientId:a,blockIndex:s}=i||{},c=Nh(a,s),p=r(),d=(0,f.useThrottle)((0,u.useCallback)(((r,i)=>{const a={x:r.clientX,y:r.clientY},s=!(null==p||!p.length),c=function(e,t){let n,r,o,i;for(const l of e){if(l.isDraggedBlock)continue;const a=l.element.getBoundingClientRect(),[s,c]=Rh(t,a,IA),u=Fh(t,a);if(void 0===o||s<o||u){o=s;const t=e.indexOf(l),p=e[t-1];if("top"===c&&p&&p.rootClientId===l.rootClientId&&!p.isDraggedBlock?(r=p,n="bottom",i=p.element.getBoundingClientRect()):(r=l,n=c,i=a),u)break}}if(!r)return;const l="bottom"===n;if(l&&r.canInsertDraggedBlocksAsChild&&(r.innerBlockCount>0||function(e,t){const n=t.left+t.width/2;return e.x>n}(t,i)))return{rootClientId:r.clientId,blockIndex:0,dropPosition:"inside"};if(!r.canInsertDraggedBlocksAsSibling)return;const a=l?1:0;return{rootClientId:r.rootClientId,clientId:r.clientId,blockIndex:r.blockIndex+a,dropPosition:n}}(Array.from(i.querySelectorAll("[data-block]")).map((r=>{const i=r.dataset.block,l=e(i);return{clientId:i,rootClientId:l,blockIndex:t(i),element:r,isDraggedBlock:!!s&&p.includes(i),innerBlockCount:n(i),canInsertDraggedBlocksAsSibling:!s||o(p,l),canInsertDraggedBlocksAsChild:!s||o(p,i)}})),a);c&&l(c)}),[p]),200);return{ref:(0,f.__experimentalUseDropZone)({onDrop:c,onDragOver(e){d(e,e.currentTarget)},onDragEnd(){d.cancel(),l(null)}}),target:i}}const xA=(e,t)=>Array.isArray(t.clientIds)?{...e,...t.clientIds.reduce(((e,n)=>({...e,[n]:"expand"===t.type})),{})}:e;var BA=(0,u.forwardRef)((function(e,t){let{id:n,parentClientId:r,blocks:o,showBlockMovers:i=!1,isExpanded:l=!1,showAppender:a=!0,LeafMoreMenu:s,description:c=(0,_.__)("Block navigation structure"),onSelect:p}=e;const{getBlock:d}=(0,m.useSelect)(xr),{clientIdsTree:y,draggedClientIds:h,selectedClientIds:v}=function(e){return(0,m.useSelect)((t=>{const{getDraggedBlockClientIds:n,getSelectedBlockClientIds:r,__unstableGetClientIdsTree:o}=t(xr);return{selectedClientIds:r(),draggedClientIds:n(),clientIdsTree:e||o()}}),[e])}(o),{visibleBlockCount:b,shouldShowInnerBlocks:k}=(0,m.useSelect)((e=>{const{getGlobalBlockCount:t,getClientIdsOfDescendants:n,__unstableGetEditorMode:r}=e(xr),o=(null==h?void 0:h.length)>0?n(h).length+1:0;return{visibleBlockCount:t()-o,shouldShowInnerBlocks:"zoom-out"!==r()}}),[h]),{updateBlockSelection:E}=CA(),[S,w]=(0,u.useReducer)(xA,{}),{ref:C,target:I}=AA(),A=(0,u.useRef)(),x=(0,f.useMergeRefs)([A,C,t]),B=(0,u.useRef)(!1),{setSelectedTreeId:P}=function(e){let{firstSelectedBlockClientId:t,setExpandedState:n}=e;const[r,o]=(0,u.useState)(null),{selectedBlockParentClientIds:i}=(0,m.useSelect)((e=>{const{getBlockParents:n}=e(xr);return{selectedBlockParentClientIds:n(t,!1)}}),[t]),l=Array.isArray(i)&&i.length?i:null;return(0,u.useEffect)((()=>{r!==t&&l&&n({type:"expand",clientIds:i})}),[t]),{setSelectedTreeId:o}}({firstSelectedBlockClientId:v[0],setExpandedState:w}),T=(0,u.useCallback)(((e,t)=>{E(e,t),P(t),p&&p(d(t))}),[P,E,p,d]);(0,u.useEffect)((()=>{B.current=!0}),[]);const[O]=(0,f.__experimentalUseFixedWindowList)(A,36,b,{useWindowing:!0,windowOverscan:40}),N=(0,u.useCallback)((e=>{e&&w({type:"expand",clientIds:[e]})}),[w]),M=(0,u.useCallback)((e=>{e&&w({type:"collapse",clientIds:[e]})}),[w]),R=(0,u.useCallback)((e=>{var t;N(null==e||null===(t=e.dataset)||void 0===t?void 0:t.block)}),[N]),F=(0,u.useCallback)((e=>{var t;M(null==e||null===(t=e.dataset)||void 0===t?void 0:t.block)}),[M]),L=(0,u.useCallback)(((e,t,n)=>{var r,o;e.shiftKey&&E(e,null==t||null===(r=t.dataset)||void 0===r?void 0:r.block,null==n||null===(o=n.dataset)||void 0===o?void 0:o.block)}),[E]),D=(0,u.useMemo)((()=>({isTreeGridMounted:B.current,draggedClientIds:h,expandedState:S,expand:N,collapse:M,LeafMoreMenu:s})),[B.current,h,S,N,M,s]);return(0,u.createElement)(m.AsyncModeProvider,{value:!0},(0,u.createElement)(wA,{listViewRef:A,blockDropTarget:I}),(0,u.createElement)("div",{className:"offcanvas-editor-list-view-tree-wrapper"},(0,u.createElement)(g.__experimentalTreeGrid,{id:n,className:"block-editor-list-view-tree","aria-label":(0,_.__)("Block navigation structure"),ref:x,onCollapseRow:F,onExpandRow:R,onFocusRow:L,"aria-description":c},(0,u.createElement)(hA.Provider,{value:D},(0,u.createElement)(SA,{parentId:r,blocks:y,selectBlock:T,showBlockMovers:i,fixedListWindow:O,selectedClientIds:v,isExpanded:l,shouldShowInnerBlocks:k,showAppender:a}),(0,u.createElement)(g.__experimentalTreeGridRow,{level:1,setSize:1,positionInSet:1,isExpanded:!0},!y.length&&(0,u.createElement)(g.__experimentalTreeGridCell,{withoutGridItem:!0},(0,u.createElement)("div",{className:"offcanvas-editor-list-view-is-empty"},(0,_.__)("Your menu is currently empty. Add your first menu item to get started."))))))))}));var PA=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M2 12c0 3.6 2.4 5.5 6 5.5h.5V19l3-2.5-3-2.5v2H8c-2.5 0-4.5-1.5-4.5-4s2-4.5 4.5-4.5h3.5V6H8c-3.6 0-6 2.4-6 6zm19.5-1h-8v1.5h8V11zm0 5h-8v1.5h8V16zm0-10h-8v1.5h8V6z"}));const TA={className:"block-editor-block-settings-menu__popover",position:"bottom right",variant:"toolbar"},OA=["core/navigation-link","core/navigation-submenu"];function NA(e){let{block:t,onClose:n}=e;const{expandedState:r,expand:o}=vA(),{insertBlock:i,replaceBlock:l,replaceInnerBlocks:s}=(0,m.useDispatch)(xr),c=t.clientId,p=!OA.includes(t.name);return(0,u.createElement)(g.MenuItem,{icon:PA,disabled:p,onClick:()=>{const e=(0,a.createBlock)("core/navigation-link");if("core/navigation-submenu"===t.name)i(e,t.innerBlocks.length,c,false);else{const n=(0,a.createBlock)("core/navigation-submenu",t.attributes,t.innerBlocks);l(c,n),s(n.clientId,[e],false)}r[t.clientId]||o(t.clientId),n()}},(0,_.__)("Add submenu link"))}const MA={};Cr(MA,{...l,ExperimentalBlockEditorProvider:Ep,LeafMoreMenu:function(e){const{clientId:t,block:n}=e,{removeBlocks:r}=(0,m.useDispatch)(xr),o=(0,_.sprintf)((0,_.__)("Remove %s"),uy({clientId:t,maximumLength:25}));return(0,u.createElement)(g.DropdownMenu,c({icon:dm,label:(0,_.__)("Options"),className:"block-editor-block-settings-menu",popoverProps:TA,noIcons:!0},e),(e=>{let{onClose:i}=e;return(0,u.createElement)(g.MenuGroup,null,(0,u.createElement)(NA,{block:n,onClose:i}),(0,u.createElement)(g.MenuItem,{onClick:()=>{r([t],!1),i()}},o))}))},OffCanvasEditor:BA,PrivateInserter:Hm})}(),(window.wp=window.wp||{}).blockEditor=r}();