| 1 |
"use strict";var wp;(wp||={}).blockEditor=(()=>{var Gge=Object.create;var j0=Object.defineProperty;var Wge=Object.getOwnPropertyDescriptor;var $ge=Object.getOwnPropertyNames;var Kge=Object.getPrototypeOf,Yge=Object.prototype.hasOwnProperty;var ie=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),wa=(e,t)=>{for(var o in t)j0(e,o,{get:t[o],enumerable:!0})},Vj=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of $ge(t))!Yge.call(e,n)&&n!==o&&j0(e,n,{get:()=>t[n],enumerable:!(r=Wge(t,n))||r.enumerable});return e};var l=(e,t,o)=>(o=e!=null?Gge(Kge(e)):{},Vj(t||!e||!e.__esModule?j0(o,"default",{value:e,enumerable:!0}):o,e)),qge=e=>Vj(j0({},"__esModule",{value:!0}),e);var K=ie((tVe,zj)=>{zj.exports=window.wp.blocks});var R=ie((oVe,jj)=>{jj.exports=window.wp.element});var F=ie((rVe,Uj)=>{Uj.exports=window.wp.data});var X=ie((nVe,Hj)=>{Hj.exports=window.wp.compose});var vt=ie((iVe,Gj)=>{Gj.exports=window.wp.hooks});var A=ie((uVe,t8)=>{t8.exports=window.wp.components});var EA=ie((dVe,o8)=>{o8.exports=window.wp.privateApis});var Le=ie((vVe,a8)=>{a8.exports=window.wp.deprecated});var w=ie((kVe,l8)=>{l8.exports=window.ReactJSXRuntime});var qn=ie((_Ve,u8)=>{u8.exports=window.wp.url});var N=ie((OVe,b8)=>{b8.exports=window.wp.i18n});var Kf=ie((AVe,v8)=>{"use strict";v8.exports=function e(t,o){if(t===o)return!0;if(t&&o&&typeof t=="object"&&typeof o=="object"){if(t.constructor!==o.constructor)return!1;var r,n,i;if(Array.isArray(t)){if(r=t.length,r!=o.length)return!1;for(n=r;n--!==0;)if(!e(t[n],o[n]))return!1;return!0}if(t instanceof Map&&o instanceof Map){if(t.size!==o.size)return!1;for(n of t.entries())if(!o.has(n[0]))return!1;for(n of t.entries())if(!e(n[1],o.get(n[0])))return!1;return!0}if(t instanceof Set&&o instanceof Set){if(t.size!==o.size)return!1;for(n of t.entries())if(!o.has(n[0]))return!1;return!0}if(ArrayBuffer.isView(t)&&ArrayBuffer.isView(o)){if(r=t.length,r!=o.length)return!1;for(n=r;n--!==0;)if(t[n]!==o[n])return!1;return!0}if(t.constructor===RegExp)return t.source===o.source&&t.flags===o.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===o.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===o.toString();if(i=Object.keys(t),r=i.length,r!==Object.keys(o).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(o,i[n]))return!1;for(n=r;n--!==0;){var s=i[n];if(!e(t[s],o[s]))return!1}return!0}return t!==t&&o!==o}});var Z=ie((HVe,R8)=>{R8.exports=window.wp.primitives});var yr=ie((l6e,O8)=>{O8.exports=window.wp.richText});var L8=ie((c6e,A8)=>{A8.exports=window.wp.blockSerializationDefaultParser});var sr=ie((F6e,g9)=>{g9.exports=window.wp.a11y});var Xn=ie((z6e,S9)=>{S9.exports=window.wp.notices});var Ch=ie((j6e,x9)=>{x9.exports=window.wp.preferences});var s7=ie((zje,CC)=>{var r7={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u1EA4:"A",\u1EAE:"A",\u1EB2:"A",\u1EB4:"A",\u1EB6:"A",\u00C6:"AE",\u1EA6:"A",\u1EB0:"A",\u0202:"A",\u1EA2:"A",\u1EA0:"A",\u1EA8:"A",\u1EAA:"A",\u1EAC:"A",\u00C7:"C",\u1E08:"C",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u1EBE:"E",\u1E16:"E",\u1EC0:"E",\u1E14:"E",\u1E1C:"E",\u0206:"E",\u1EBA:"E",\u1EBC:"E",\u1EB8:"E",\u1EC2:"E",\u1EC4:"E",\u1EC6:"E",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u1E2E:"I",\u020A:"I",\u1EC8:"I",\u1ECA:"I",\u00D0:"D",\u00D1:"N",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u1ED0:"O",\u1E4C:"O",\u1E52:"O",\u020E:"O",\u1ECE:"O",\u1ECC:"O",\u1ED4:"O",\u1ED6:"O",\u1ED8:"O",\u1EDC:"O",\u1EDE:"O",\u1EE0:"O",\u1EDA:"O",\u1EE2:"O",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u1EE6:"U",\u1EE4:"U",\u1EEC:"U",\u1EEE:"U",\u1EF0:"U",\u00DD:"Y",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u1EA5:"a",\u1EAF:"a",\u1EB3:"a",\u1EB5:"a",\u1EB7:"a",\u00E6:"ae",\u1EA7:"a",\u1EB1:"a",\u0203:"a",\u1EA3:"a",\u1EA1:"a",\u1EA9:"a",\u1EAB:"a",\u1EAD:"a",\u00E7:"c",\u1E09:"c",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u1EBF:"e",\u1E17:"e",\u1EC1:"e",\u1E15:"e",\u1E1D:"e",\u0207:"e",\u1EBB:"e",\u1EBD:"e",\u1EB9:"e",\u1EC3:"e",\u1EC5:"e",\u1EC7:"e",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u1E2F:"i",\u020B:"i",\u1EC9:"i",\u1ECB:"i",\u00F0:"d",\u00F1:"n",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u1ED1:"o",\u1E4D:"o",\u1E53:"o",\u020F:"o",\u1ECF:"o",\u1ECD:"o",\u1ED5:"o",\u1ED7:"o",\u1ED9:"o",\u1EDD:"o",\u1EDF:"o",\u1EE1:"o",\u1EDB:"o",\u1EE3:"o",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u1EE7:"u",\u1EE5:"u",\u1EED:"u",\u1EEF:"u",\u1EF1:"u",\u00FD:"y",\u00FF:"y",\u0100:"A",\u0101:"a",\u0102:"A",\u0103:"a",\u0104:"A",\u0105:"a",\u0106:"C",\u0107:"c",\u0108:"C",\u0109:"c",\u010A:"C",\u010B:"c",\u010C:"C",\u010D:"c",C\u0306:"C",c\u0306:"c",\u010E:"D",\u010F:"d",\u0110:"D",\u0111:"d",\u0112:"E",\u0113:"e",\u0114:"E",\u0115:"e",\u0116:"E",\u0117:"e",\u0118:"E",\u0119:"e",\u011A:"E",\u011B:"e",\u011C:"G",\u01F4:"G",\u011D:"g",\u01F5:"g",\u011E:"G",\u011F:"g",\u0120:"G",\u0121:"g",\u0122:"G",\u0123:"g",\u0124:"H",\u0125:"h",\u0126:"H",\u0127:"h",\u1E2A:"H",\u1E2B:"h",\u0128:"I",\u0129:"i",\u012A:"I",\u012B:"i",\u012C:"I",\u012D:"i",\u012E:"I",\u012F:"i",\u0130:"I",\u0131:"i",\u0132:"IJ",\u0133:"ij",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u1E30:"K",\u1E31:"k",K\u0306:"K",k\u0306:"k",\u0139:"L",\u013A:"l",\u013B:"L",\u013C:"l",\u013D:"L",\u013E:"l",\u013F:"L",\u0140:"l",\u0141:"l",\u0142:"l",\u1E3E:"M",\u1E3F:"m",M\u0306:"M",m\u0306:"m",\u0143:"N",\u0144:"n",\u0145:"N",\u0146:"n",\u0147:"N",\u0148:"n",\u0149:"n",N\u0306:"N",n\u0306:"n",\u014C:"O",\u014D:"o",\u014E:"O",\u014F:"o",\u0150:"O",\u0151:"o",\u0152:"OE",\u0153:"oe",P\u0306:"P",p\u0306:"p",\u0154:"R",\u0155:"r",\u0156:"R",\u0157:"r",\u0158:"R",\u0159:"r",R\u0306:"R",r\u0306:"r",\u0212:"R",\u0213:"r",\u015A:"S",\u015B:"s",\u015C:"S",\u015D:"s",\u015E:"S",\u0218:"S",\u0219:"s",\u015F:"s",\u0160:"S",\u0161:"s",\u0162:"T",\u0163:"t",\u021B:"t",\u021A:"T",\u0164:"T",\u0165:"t",\u0166:"T",\u0167:"t",T\u0306:"T",t\u0306:"t",\u0168:"U",\u0169:"u",\u016A:"U",\u016B:"u",\u016C:"U",\u016D:"u",\u016E:"U",\u016F:"u",\u0170:"U",\u0171:"u",\u0172:"U",\u0173:"u",\u0216:"U",\u0217:"u",V\u0306:"V",v\u0306:"v",\u0174:"W",\u0175:"w",\u1E82:"W",\u1E83:"w",X\u0306:"X",x\u0306:"x",\u0176:"Y",\u0177:"y",\u0178:"Y",Y\u0306:"Y",y\u0306:"y",\u0179:"Z",\u017A:"z",\u017B:"Z",\u017C:"z",\u017D:"Z",\u017E:"z",\u017F:"s",\u0192:"f",\u01A0:"O",\u01A1:"o",\u01AF:"U",\u01B0:"u",\u01CD:"A",\u01CE:"a",\u01CF:"I",\u01D0:"i",\u01D1:"O",\u01D2:"o",\u01D3:"U",\u01D4:"u",\u01D5:"U",\u01D6:"u",\u01D7:"U",\u01D8:"u",\u01D9:"U",\u01DA:"u",\u01DB:"U",\u01DC:"u",\u1EE8:"U",\u1EE9:"u",\u1E78:"U",\u1E79:"u",\u01FA:"A",\u01FB:"a",\u01FC:"AE",\u01FD:"ae",\u01FE:"O",\u01FF:"o",\u00DE:"TH",\u00FE:"th",\u1E54:"P",\u1E55:"p",\u1E64:"S",\u1E65:"s",X\u0301:"X",x\u0301:"x",\u0403:"\u0413",\u0453:"\u0433",\u040C:"\u041A",\u045C:"\u043A",A\u030B:"A",a\u030B:"a",E\u030B:"E",e\u030B:"e",I\u030B:"I",i\u030B:"i",\u01F8:"N",\u01F9:"n",\u1ED2:"O",\u1ED3:"o",\u1E50:"O",\u1E51:"o",\u1EEA:"U",\u1EEB:"u",\u1E80:"W",\u1E81:"w",\u1EF2:"Y",\u1EF3:"y",\u0200:"A",\u0201:"a",\u0204:"E",\u0205:"e",\u0208:"I",\u0209:"i",\u020C:"O",\u020D:"o",\u0210:"R",\u0211:"r",\u0214:"U",\u0215:"u",B\u030C:"B",b\u030C:"b",\u010C\u0323:"C",\u010D\u0323:"c",\u00CA\u030C:"E",\u00EA\u030C:"e",F\u030C:"F",f\u030C:"f",\u01E6:"G",\u01E7:"g",\u021E:"H",\u021F:"h",J\u030C:"J",\u01F0:"j",\u01E8:"K",\u01E9:"k",M\u030C:"M",m\u030C:"m",P\u030C:"P",p\u030C:"p",Q\u030C:"Q",q\u030C:"q",\u0158\u0329:"R",\u0159\u0329:"r",\u1E66:"S",\u1E67:"s",V\u030C:"V",v\u030C:"v",W\u030C:"W",w\u030C:"w",X\u030C:"X",x\u030C:"x",Y\u030C:"Y",y\u030C:"y",A\u0327:"A",a\u0327:"a",B\u0327:"B",b\u0327:"b",\u1E10:"D",\u1E11:"d",\u0228:"E",\u0229:"e",\u0190\u0327:"E",\u025B\u0327:"e",\u1E28:"H",\u1E29:"h",I\u0327:"I",i\u0327:"i",\u0197\u0327:"I",\u0268\u0327:"i",M\u0327:"M",m\u0327:"m",O\u0327:"O",o\u0327:"o",Q\u0327:"Q",q\u0327:"q",U\u0327:"U",u\u0327:"u",X\u0327:"X",x\u0327:"x",Z\u0327:"Z",z\u0327:"z",\u0439:"\u0438",\u0419:"\u0418",\u0451:"\u0435",\u0401:"\u0415"},n7=Object.keys(r7).join("|"),sSe=new RegExp(n7,"g"),aSe=new RegExp(n7,"");function lSe(e){return r7[e]}var i7=function(e){return e.replace(sSe,lSe)},cSe=function(e){return!!e.match(aSe)};CC.exports=i7;CC.exports.has=cSe;CC.exports.remove=i7});var my=ie((R8e,O7)=>{O7.exports=window.wp.styleEngine});var it=ie((R9e,tU)=>{tU.exports=window.wp.keycodes});var Fe=ie((Z9e,hU)=>{hU.exports=window.wp.dom});var bU=ie(A5=>{"use strict";Object.defineProperty(A5,"__esModule",{value:!0});A5.default=gU;function gU(){}gU.prototype={diff:function(t,o){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=r.callback;typeof r=="function"&&(n=r,r={}),this.options=r;var i=this;function s(g){return n?(setTimeout(function(){n(void 0,g)},0),!0):g}t=this.castInput(t),o=this.castInput(o),t=this.removeEmpty(this.tokenize(t)),o=this.removeEmpty(this.tokenize(o));var a=o.length,c=t.length,u=1,d=a+c,f=[{newPos:-1,components:[]}],m=this.extractCommon(f[0],o,t,0);if(f[0].newPos+1>=a&&m+1>=c)return s([{value:this.join(o),count:o.length}]);function h(){for(var g=-1*u;g<=u;g+=2){var b=void 0,k=f[g-1],v=f[g+1],y=(v?v.newPos:0)-g;k&&(f[g-1]=void 0);var _=k&&k.newPos+1<a,S=v&&0<=y&&y<c;if(!_&&!S){f[g]=void 0;continue}if(!_||S&&k.newPos<v.newPos?(b=JSe(v),i.pushComponent(b.components,void 0,!0)):(b=k,b.newPos++,i.pushComponent(b.components,!0,void 0)),y=i.extractCommon(b,o,t,g),b.newPos+1>=a&&y+1>=c)return s(QSe(i,b.components,o,t,i.useLongestToken));f[g]=b}u++}if(n)(function g(){setTimeout(function(){if(u>d)return n();h()||g()},0)})();else for(;u<=d;){var p=h();if(p)return p}},pushComponent:function(t,o,r){var n=t[t.length-1];n&&n.added===o&&n.removed===r?t[t.length-1]={count:n.count+1,added:o,removed:r}:t.push({count:1,added:o,removed:r})},extractCommon:function(t,o,r,n){for(var i=o.length,s=r.length,a=t.newPos,c=a-n,u=0;a+1<i&&c+1<s&&this.equals(o[a+1],r[c+1]);)a++,c++,u++;return u&&t.components.push({count:u}),t.newPos=a,c},equals:function(t,o){return this.options.comparator?this.options.comparator(t,o):t===o||this.options.ignoreCase&&t.toLowerCase()===o.toLowerCase()},removeEmpty:function(t){for(var o=[],r=0;r<t.length;r++)t[r]&&o.push(t[r]);return o},castInput:function(t){return t},tokenize:function(t){return t.split("")},join:function(t){return t.join("")}};function QSe(e,t,o,r,n){for(var i=0,s=t.length,a=0,c=0;i<s;i++){var u=t[i];if(u.removed){if(u.value=e.join(r.slice(c,c+u.count)),c+=u.count,i&&t[i-1].added){var f=t[i-1];t[i-1]=t[i],t[i]=f}}else{if(!u.added&&n){var d=o.slice(a,a+u.count);d=d.map(function(h,p){var g=r[c+p];return g.length>h.length?g:h}),u.value=e.join(d)}else u.value=e.join(o.slice(a,a+u.count));a+=u.count,u.added||(c+=u.count)}}var m=t[s-1];return s>1&&typeof m.value=="string"&&(m.added||m.removed)&&e.equals("",m.value)&&(t[s-2].value+=m.value,t.pop()),t}function JSe(e){return{newPos:e.newPos,components:e.components.slice(0)}}});var kU=ie(_y=>{"use strict";Object.defineProperty(_y,"__esModule",{value:!0});_y.diffChars=o0e;_y.characterDiff=void 0;var e0e=t0e(bU());function t0e(e){return e&&e.__esModule?e:{default:e}}var vU=new e0e.default;_y.characterDiff=vU;function o0e(e,t,o){return vU.diff(e,t,o)}});var Ge=ie((d7e,AU)=>{AU.exports=window.React});var NU=ie((f7e,LU)=>{"use strict";var s0e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";LU.exports=s0e});var FU=ie((m7e,VU)=>{"use strict";var a0e=NU();function MU(){}function DU(){}DU.resetWarningCache=MU;VU.exports=function(){function e(r,n,i,s,a,c){if(c!==a0e){var u=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 u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var o={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:DU,resetWarningCache:MU};return o.PropTypes=o,o}});var jU=ie((g7e,zU)=>{zU.exports=FU()();var p7e,h7e});var HU=ie((e1,UU)=>{(function(e,t){if(typeof define=="function"&&define.amd)define(["module","exports"],t);else if(typeof e1<"u")t(UU,e1);else{var o={exports:{}};t(o,o.exports),e.autosize=o.exports}})(e1,function(e,t){"use strict";var o=typeof Map=="function"?new Map:(function(){var c=[],u=[];return{has:function(f){return c.indexOf(f)>-1},get:function(f){return u[c.indexOf(f)]},set:function(f,m){c.indexOf(f)===-1&&(c.push(f),u.push(m))},delete:function(f){var m=c.indexOf(f);m>-1&&(c.splice(m,1),u.splice(m,1))}}})(),r=function(u){return new Event(u,{bubbles:!0})};try{new Event("test")}catch{r=function(d){var f=document.createEvent("Event");return f.initEvent(d,!0,!1),f}}function n(c){if(!c||!c.nodeName||c.nodeName!=="TEXTAREA"||o.has(c))return;var u=null,d=null,f=null;function m(){var y=window.getComputedStyle(c,null);y.resize==="vertical"?c.style.resize="none":y.resize==="both"&&(c.style.resize="horizontal"),y.boxSizing==="content-box"?u=-(parseFloat(y.paddingTop)+parseFloat(y.paddingBottom)):u=parseFloat(y.borderTopWidth)+parseFloat(y.borderBottomWidth),isNaN(u)&&(u=0),b()}function h(y){{var _=c.style.width;c.style.width="0px",c.offsetWidth,c.style.width=_}c.style.overflowY=y}function p(y){for(var _=[];y&&y.parentNode&&y.parentNode instanceof Element;)y.parentNode.scrollTop&&_.push({node:y.parentNode,scrollTop:y.parentNode.scrollTop}),y=y.parentNode;return _}function g(){if(c.scrollHeight!==0){var y=p(c),_=document.documentElement&&document.documentElement.scrollTop;c.style.height="",c.style.height=c.scrollHeight+u+"px",d=c.clientWidth,y.forEach(function(S){S.node.scrollTop=S.scrollTop}),_&&(document.documentElement.scrollTop=_)}}function b(){g();var y=Math.round(parseFloat(c.style.height)),_=window.getComputedStyle(c,null),S=_.boxSizing==="content-box"?Math.round(parseFloat(_.height)):c.offsetHeight;if(S<y?_.overflowY==="hidden"&&(h("scroll"),g(),S=_.boxSizing==="content-box"?Math.round(parseFloat(window.getComputedStyle(c,null).height)):c.offsetHeight):_.overflowY!=="hidden"&&(h("hidden"),g(),S=_.boxSizing==="content-box"?Math.round(parseFloat(window.getComputedStyle(c,null).height)):c.offsetHeight),f!==S){f=S;var C=r("autosize:resized");try{c.dispatchEvent(C)}catch{}}}var k=function(){c.clientWidth!==d&&b()},v=function(y){window.removeEventListener("resize",k,!1),c.removeEventListener("input",b,!1),c.removeEventListener("keyup",b,!1),c.removeEventListener("autosize:destroy",v,!1),c.removeEventListener("autosize:update",b,!1),Object.keys(y).forEach(function(_){c.style[_]=y[_]}),o.delete(c)}.bind(c,{height:c.style.height,resize:c.style.resize,overflowY:c.style.overflowY,overflowX:c.style.overflowX,wordWrap:c.style.wordWrap});c.addEventListener("autosize:destroy",v,!1),"onpropertychange"in c&&"oninput"in c&&c.addEventListener("keyup",b,!1),window.addEventListener("resize",k,!1),c.addEventListener("input",b,!1),c.addEventListener("autosize:update",b,!1),c.style.overflowX="hidden",c.style.wordWrap="break-word",o.set(c,{destroy:v,update:b}),m()}function i(c){var u=o.get(c);u&&u.destroy()}function s(c){var u=o.get(c);u&&u.update()}var a=null;typeof window>"u"||typeof window.getComputedStyle!="function"?(a=function(u){return u},a.destroy=function(c){return c},a.update=function(c){return c}):(a=function(u,d){return u&&Array.prototype.forEach.call(u.length?u:[u],function(f){return n(f,d)}),u},a.destroy=function(c){return c&&Array.prototype.forEach.call(c.length?c:[c],i),c},a.update=function(c){return c&&Array.prototype.forEach.call(c.length?c:[c],s),c}),t.default=a,e.exports=t.default})});var WU=ie((b7e,GU)=>{var l0e=function(e,t,o){return o=window.getComputedStyle,(o?o(e):e.currentStyle)[t.replace(/-(\w)/gi,function(r,n){return n.toUpperCase()})]};GU.exports=l0e});var KU=ie((v7e,$U)=>{var N5=WU();function c0e(e){var t=N5(e,"line-height"),o=parseFloat(t,10);if(t===o+""){var r=e.style.lineHeight;e.style.lineHeight=t+"em",t=N5(e,"line-height"),o=parseFloat(t,10),r?e.style.lineHeight=r:delete e.style.lineHeight}if(t.indexOf("pt")!==-1?(o*=4,o/=3):t.indexOf("mm")!==-1?(o*=96,o/=25.4):t.indexOf("cm")!==-1?(o*=96,o/=2.54):t.indexOf("in")!==-1?o*=96:t.indexOf("pc")!==-1&&(o*=16),o=Math.round(o),t==="normal"){var n=e.nodeName,i=document.createElement(n);i.innerHTML=" ",n.toUpperCase()==="TEXTAREA"&&i.setAttribute("rows","1");var s=N5(e,"font-size");i.style.fontSize=s,i.style.padding="0px",i.style.border="0px";var a=document.body;a.appendChild(i);var c=i.offsetHeight;o=c,a.removeChild(i)}return o}$U.exports=c0e});var qU=ie(Hl=>{"use strict";var u0e=Hl&&Hl.__extends||(function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,o){t.__proto__=o}||function(t,o){for(var r in o)o.hasOwnProperty(r)&&(t[r]=o[r])};return function(t,o){e(t,o);function r(){this.constructor=t}t.prototype=o===null?Object.create(o):(r.prototype=o.prototype,new r)}})(),M5=Hl&&Hl.__assign||Object.assign||function(e){for(var t,o=1,r=arguments.length;o<r;o++){t=arguments[o];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},d0e=Hl&&Hl.__rest||function(e,t){var o={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(o[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,r=Object.getOwnPropertySymbols(e);n<r.length;n++)t.indexOf(r[n])<0&&(o[r[n]]=e[r[n]]);return o};Hl.__esModule=!0;var o1=Ge(),Sy=jU(),t1=HU(),f0e=KU(),m0e=f0e,YU="autosize:resized",p0e=(function(e){u0e(t,e);function t(){var o=e!==null&&e.apply(this,arguments)||this;return o.state={lineHeight:null},o.textarea=null,o.onResize=function(r){o.props.onResize&&o.props.onResize(r)},o.updateLineHeight=function(){o.textarea&&o.setState({lineHeight:m0e(o.textarea)})},o.onChange=function(r){var n=o.props.onChange;o.currentValue=r.currentTarget.value,n&&n(r)},o}return t.prototype.componentDidMount=function(){var o=this,r=this.props,n=r.maxRows,i=r.async;typeof n=="number"&&this.updateLineHeight(),typeof n=="number"||i?setTimeout(function(){return o.textarea&&t1(o.textarea)}):this.textarea&&t1(this.textarea),this.textarea&&this.textarea.addEventListener(YU,this.onResize)},t.prototype.componentWillUnmount=function(){this.textarea&&(this.textarea.removeEventListener(YU,this.onResize),t1.destroy(this.textarea))},t.prototype.render=function(){var o=this,r=this,n=r.props,i=n.onResize,s=n.maxRows,a=n.onChange,c=n.style,u=n.innerRef,d=n.children,f=d0e(n,["onResize","maxRows","onChange","style","innerRef","children"]),m=r.state.lineHeight,h=s&&m?m*s:null;return o1.createElement("textarea",M5({},f,{onChange:this.onChange,style:h?M5({},c,{maxHeight:h}):c,ref:function(p){o.textarea=p,typeof o.props.innerRef=="function"?o.props.innerRef(p):o.props.innerRef&&(o.props.innerRef.current=p)}}),d)},t.prototype.componentDidUpdate=function(){this.textarea&&t1.update(this.textarea)},t.defaultProps={rows:1,async:!1},t.propTypes={rows:Sy.number,maxRows:Sy.number,onResize:Sy.func,innerRef:Sy.any,async:Sy.bool},t})(o1.Component);Hl.TextareaAutosize=o1.forwardRef(function(e,t){return o1.createElement(p0e,M5({},e,{innerRef:t}))})});var D5=ie((y7e,ZU)=>{"use strict";var h0e=qU();ZU.exports=h0e.TextareaAutosize});var xy=ie((x7e,eH)=>{eH.exports=window.wp.warning});var bD=ie((j7e,ZH)=>{ZH.exports=window.ReactDOM});var Us=ie((hUe,CG)=>{CG.exports=window.wp.keyboardShortcuts});var UG=ie((SHe,jG)=>{jG.exports=window.wp.htmlEntities});var I$=ie((pKe,T$)=>{T$.exports=window.wp.uploadMedia});var RB=ie(()=>{});var OB=ie(()=>{});var IV=ie(()=>{});var jK=ie((UYe,zK)=>{var h1e="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",g1e=(e,t=21)=>(o=t)=>{let r="",n=o|0;for(;n--;)r+=e[Math.random()*e.length|0];return r},b1e=(e=21)=>{let t="",o=e|0;for(;o--;)t+=h1e[Math.random()*64|0];return t};zK.exports={nanoid:b1e,customAlphabet:g1e}});var PV=ie(()=>{});var HK=ie((WYe,RV)=>{var Be=String,UK=function(){return{isColorSupported:!1,reset:Be,bold:Be,dim:Be,italic:Be,underline:Be,inverse:Be,hidden:Be,strikethrough:Be,black:Be,red:Be,green:Be,yellow:Be,blue:Be,magenta:Be,cyan:Be,white:Be,gray:Be,bgBlack:Be,bgRed:Be,bgGreen:Be,bgYellow:Be,bgBlue:Be,bgMagenta:Be,bgCyan:Be,bgWhite:Be,blackBright:Be,redBright:Be,greenBright:Be,yellowBright:Be,blueBright:Be,magentaBright:Be,cyanBright:Be,whiteBright:Be,bgBlackBright:Be,bgRedBright:Be,bgGreenBright:Be,bgYellowBright:Be,bgBlueBright:Be,bgMagentaBright:Be,bgCyanBright:Be,bgWhiteBright:Be}};RV.exports=UK();RV.exports.createColors=UK});var AB=ie(($Ye,$K)=>{"use strict";var GK=HK(),WK=PV(),r_=class e extends Error{constructor(t,o,r,n,i,s){super(t),this.name="CssSyntaxError",this.reason=t,i&&(this.file=i),n&&(this.source=n),s&&(this.plugin=s),typeof o<"u"&&typeof r<"u"&&(typeof o=="number"?(this.line=o,this.column=r):(this.line=o.line,this.column=o.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,e)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(t){if(!this.source)return"";let o=this.source;t==null&&(t=GK.isColorSupported),WK&&t&&(o=WK(o));let r=o.split(/\r?\n/),n=Math.max(this.line-3,0),i=Math.min(this.line+2,r.length),s=String(i).length,a,c;if(t){let{bold:u,gray:d,red:f}=GK.createColors(!0);a=m=>u(f(m)),c=m=>d(m)}else a=c=u=>u;return r.slice(n,i).map((u,d)=>{let f=n+1+d,m=" "+(" "+f).slice(-s)+" | ";if(f===this.line){let h=c(m.replace(/\d/g," "))+u.slice(0,this.column-1).replace(/[^\t]/g," ");return a(">")+c(m)+u+` |
| 2 |
`+h+a("^")}return" "+c(m)+u}).join(` |
| 3 |
`)}toString(){let t=this.showSourceCode();return t&&(t=` |
| 4 |
|
| 5 |
`+t+` |
| 6 |
`),this.name+": "+this.message+t}};$K.exports=r_;r_.default=r_});var KK=ie(()=>{});var XK=ie((qYe,ZK)=>{"use strict";var{SourceMapConsumer:YK,SourceMapGenerator:qK}=RB(),{existsSync:v1e,readFileSync:k1e}=KK(),{dirname:OV,join:y1e}=OB();function _1e(e){return Buffer?Buffer.from(e,"base64").toString():window.atob(e)}var n_=class{constructor(t,o){if(o.map===!1)return;this.loadAnnotation(t),this.inline=this.startWith(this.annotation,"data:");let r=o.map?o.map.prev:void 0,n=this.loadMap(o.from,r);!this.mapFile&&o.from&&(this.mapFile=o.from),this.mapFile&&(this.root=OV(this.mapFile)),n&&(this.text=n)}consumer(){return this.consumerCache||(this.consumerCache=new YK(this.text)),this.consumerCache}decodeInline(t){let o=/^data:application\/json;charset=utf-?8;base64,/,r=/^data:application\/json;base64,/,n=/^data:application\/json;charset=utf-?8,/,i=/^data:application\/json,/;if(n.test(t)||i.test(t))return decodeURIComponent(t.substr(RegExp.lastMatch.length));if(o.test(t)||r.test(t))return _1e(t.substr(RegExp.lastMatch.length));let s=t.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+s)}getAnnotationURL(t){return t.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(t){return typeof t!="object"?!1:typeof t.mappings=="string"||typeof t._mappings=="string"||Array.isArray(t.sections)}loadAnnotation(t){let o=t.match(/\/\*\s*# sourceMappingURL=/gm);if(!o)return;let r=t.lastIndexOf(o.pop()),n=t.indexOf("*/",r);r>-1&&n>-1&&(this.annotation=this.getAnnotationURL(t.substring(r,n)))}loadFile(t){if(this.root=OV(t),v1e(t))return this.mapFile=t,k1e(t,"utf-8").toString().trim()}loadMap(t,o){if(o===!1)return!1;if(o){if(typeof o=="string")return o;if(typeof o=="function"){let r=o(t);if(r){let n=this.loadFile(r);if(!n)throw new Error("Unable to load previous source map: "+r.toString());return n}}else{if(o instanceof YK)return qK.fromSourceMap(o).toString();if(o instanceof qK)return o.toString();if(this.isMap(o))return JSON.stringify(o);throw new Error("Unsupported previous source map format: "+o.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let r=this.annotation;return t&&(r=y1e(OV(t),r)),this.loadFile(r)}}}startWith(t,o){return t?t.substr(0,o.length)===o:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};ZK.exports=n_;n_.default=n_});var DV=ie((ZYe,tY)=>{"use strict";var{SourceMapConsumer:S1e,SourceMapGenerator:x1e}=RB(),{fileURLToPath:QK,pathToFileURL:LB}=IV(),{isAbsolute:NV,resolve:MV}=OB(),{nanoid:w1e}=jK(),AV=PV(),JK=AB(),C1e=XK(),LV=Symbol("fromOffsetCache"),B1e=!!(S1e&&x1e),eY=!!(MV&&NV),vg=class{constructor(t,o={}){if(t===null||typeof t>"u"||typeof t=="object"&&!t.toString)throw new Error(`PostCSS received ${t} instead of CSS string`);if(this.css=t.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,o.from&&(!eY||/^\w+:\/\//.test(o.from)||NV(o.from)?this.file=o.from:this.file=MV(o.from)),eY&&B1e){let r=new C1e(this.css,o);if(r.text){this.map=r;let n=r.consumer().file;!this.file&&n&&(this.file=this.mapResolve(n))}}this.file||(this.id="<input css "+w1e(6)+">"),this.map&&(this.map.file=this.from)}error(t,o,r,n={}){let i,s,a;if(o&&typeof o=="object"){let u=o,d=r;if(typeof u.offset=="number"){let f=this.fromOffset(u.offset);o=f.line,r=f.col}else o=u.line,r=u.column;if(typeof d.offset=="number"){let f=this.fromOffset(d.offset);s=f.line,a=f.col}else s=d.line,a=d.column}else if(!r){let u=this.fromOffset(o);o=u.line,r=u.col}let c=this.origin(o,r,s,a);return c?i=new JK(t,c.endLine===void 0?c.line:{column:c.column,line:c.line},c.endLine===void 0?c.column:{column:c.endColumn,line:c.endLine},c.source,c.file,n.plugin):i=new JK(t,s===void 0?o:{column:r,line:o},s===void 0?r:{column:a,line:s},this.css,this.file,n.plugin),i.input={column:r,endColumn:a,endLine:s,line:o,source:this.css},this.file&&(LB&&(i.input.url=LB(this.file).toString()),i.input.file=this.file),i}fromOffset(t){let o,r;if(this[LV])r=this[LV];else{let i=this.css.split(` |
| 7 |
`);r=new Array(i.length);let s=0;for(let a=0,c=i.length;a<c;a++)r[a]=s,s+=i[a].length+1;this[LV]=r}o=r[r.length-1];let n=0;if(t>=o)n=r.length-1;else{let i=r.length-2,s;for(;n<i;)if(s=n+(i-n>>1),t<r[s])i=s-1;else if(t>=r[s+1])n=s+1;else{n=s;break}}return{col:t-r[n]+1,line:n+1}}mapResolve(t){return/^\w+:\/\//.test(t)?t:MV(this.map.consumer().sourceRoot||this.map.root||".",t)}origin(t,o,r,n){if(!this.map)return!1;let i=this.map.consumer(),s=i.originalPositionFor({column:o,line:t});if(!s.source)return!1;let a;typeof r=="number"&&(a=i.originalPositionFor({column:n,line:r}));let c;NV(s.source)?c=LB(s.source):c=new URL(s.source,this.map.consumer().sourceRoot||LB(this.map.mapFile));let u={column:s.column,endColumn:a&&a.column,endLine:a&&a.line,line:s.line,url:c.toString()};if(c.protocol==="file:")if(QK)u.file=QK(c);else throw new Error("file: protocol is not available in this PostCSS build");let d=i.sourceContentFor(s.source);return d&&(u.source=d),u}toJSON(){let t={};for(let o of["hasBOM","css","file","id"])this[o]!=null&&(t[o]=this[o]);return this.map&&(t.map={...this.map},t.map.consumerCache&&(t.map.consumerCache=void 0)),t}get from(){return this.file||this.id}};tY.exports=vg;vg.default=vg;AV&&AV.registerInput&&AV.registerInput(vg)});var FV=ie((XYe,aY)=>{"use strict";var{SourceMapConsumer:rY,SourceMapGenerator:NB}=RB(),{dirname:MB,relative:nY,resolve:iY,sep:sY}=OB(),{pathToFileURL:oY}=IV(),E1e=DV(),T1e=!!(rY&&NB),I1e=!!(MB&&iY&&nY&&sY),VV=class{constructor(t,o,r,n){this.stringify=t,this.mapOpts=r.map||{},this.root=o,this.opts=r,this.css=n,this.originalCSS=n,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let t;this.isInline()?t="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?t=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?t=this.mapOpts.annotation(this.opts.to,this.root):t=this.outputFile()+".map";let o=` |
| 8 |
`;this.css.includes(`\r |
| 9 |
`)&&(o=`\r |
| 10 |
`),this.css+=o+"/*# sourceMappingURL="+t+" */"}applyPrevMaps(){for(let t of this.previous()){let o=this.toUrl(this.path(t.file)),r=t.root||MB(t.file),n;this.mapOpts.sourcesContent===!1?(n=new rY(t.text),n.sourcesContent&&(n.sourcesContent=null)):n=t.consumer(),this.map.applySourceMap(n,o,this.toUrl(this.path(r)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let t;for(let o=this.root.nodes.length-1;o>=0;o--)t=this.root.nodes[o],t.type==="comment"&&t.text.indexOf("# sourceMappingURL=")===0&&this.root.removeChild(o)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),I1e&&T1e&&this.isMap())return this.generateMap();{let t="";return this.stringify(this.root,o=>{t+=o}),[t]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let t=this.previous()[0].consumer();t.file=this.outputFile(),this.map=NB.fromSourceMap(t,{ignoreInvalidMapping:!0})}else this.map=new NB({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new NB({file:this.outputFile(),ignoreInvalidMapping:!0});let t=1,o=1,r="<no source>",n={generated:{column:0,line:0},original:{column:0,line:0},source:""},i,s;this.stringify(this.root,(a,c,u)=>{if(this.css+=a,c&&u!=="end"&&(n.generated.line=t,n.generated.column=o-1,c.source&&c.source.start?(n.source=this.sourcePath(c),n.original.line=c.source.start.line,n.original.column=c.source.start.column-1,this.map.addMapping(n)):(n.source=r,n.original.line=1,n.original.column=0,this.map.addMapping(n))),i=a.match(/\n/g),i?(t+=i.length,s=a.lastIndexOf(` |
| 11 |
`),o=a.length-s):o+=a.length,c&&u!=="start"){let d=c.parent||{raws:{}};(!(c.type==="decl"||c.type==="atrule"&&!c.nodes)||c!==d.last||d.raws.semicolon)&&(c.source&&c.source.end?(n.source=this.sourcePath(c),n.original.line=c.source.end.line,n.original.column=c.source.end.column-1,n.generated.line=t,n.generated.column=o-2,this.map.addMapping(n)):(n.source=r,n.original.line=1,n.original.column=0,n.generated.line=t,n.generated.column=o-1,this.map.addMapping(n)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(t=>t.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let t=this.mapOpts.annotation;return typeof t<"u"&&t!==!0?!1:this.previous().length?this.previous().some(o=>o.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(t=>t.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(t){if(this.mapOpts.absolute||t.charCodeAt(0)===60||/^\w+:\/\//.test(t))return t;let o=this.memoizedPaths.get(t);if(o)return o;let r=this.opts.to?MB(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=MB(iY(r,this.mapOpts.annotation)));let n=nY(r,t);return this.memoizedPaths.set(t,n),n}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(t=>{if(t.source&&t.source.input.map){let o=t.source.input.map;this.previousMaps.includes(o)||this.previousMaps.push(o)}});else{let t=new E1e(this.originalCSS,this.opts);t.map&&this.previousMaps.push(t.map)}return this.previousMaps}setSourcesContent(){let t={};if(this.root)this.root.walk(o=>{if(o.source){let r=o.source.input.from;if(r&&!t[r]){t[r]=!0;let n=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(n,o.source.input.css)}}});else if(this.css){let o=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(o,this.css)}}sourcePath(t){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(t.source.input.from):this.toUrl(this.path(t.source.input.from))}toBase64(t){return Buffer?Buffer.from(t).toString("base64"):window.btoa(unescape(encodeURIComponent(t)))}toFileUrl(t){let o=this.memoizedFileURLs.get(t);if(o)return o;if(oY){let r=oY(t).toString();return this.memoizedFileURLs.set(t,r),r}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(t){let o=this.memoizedURLs.get(t);if(o)return o;sY==="\\"&&(t=t.replace(/\\/g,"/"));let r=encodeURI(t).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(t,r),r}};aY.exports=VV});var zV=ie((QYe,cY)=>{"use strict";var lY={after:` |
| 12 |
`,beforeClose:` |
| 13 |
`,beforeComment:` |
| 14 |
`,beforeDecl:` |
| 15 |
`,beforeOpen:" ",beforeRule:` |
| 16 |
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function P1e(e){return e[0].toUpperCase()+e.slice(1)}var i_=class{constructor(t){this.builder=t}atrule(t,o){let r="@"+t.name,n=t.params?this.rawValue(t,"params"):"";if(typeof t.raws.afterName<"u"?r+=t.raws.afterName:n&&(r+=" "),t.nodes)this.block(t,r+n);else{let i=(t.raws.between||"")+(o?";":"");this.builder(r+n+i,t)}}beforeAfter(t,o){let r;t.type==="decl"?r=this.raw(t,null,"beforeDecl"):t.type==="comment"?r=this.raw(t,null,"beforeComment"):o==="before"?r=this.raw(t,null,"beforeRule"):r=this.raw(t,null,"beforeClose");let n=t.parent,i=0;for(;n&&n.type!=="root";)i+=1,n=n.parent;if(r.includes(` |
| 17 |
`)){let s=this.raw(t,null,"indent");if(s.length)for(let a=0;a<i;a++)r+=s}return r}block(t,o){let r=this.raw(t,"between","beforeOpen");this.builder(o+r+"{",t,"start");let n;t.nodes&&t.nodes.length?(this.body(t),n=this.raw(t,"after")):n=this.raw(t,"after","emptyBody"),n&&this.builder(n),this.builder("}",t,"end")}body(t){let o=t.nodes.length-1;for(;o>0&&t.nodes[o].type==="comment";)o-=1;let r=this.raw(t,"semicolon");for(let n=0;n<t.nodes.length;n++){let i=t.nodes[n],s=this.raw(i,"before");s&&this.builder(s),this.stringify(i,o!==n||r)}}comment(t){let o=this.raw(t,"left","commentLeft"),r=this.raw(t,"right","commentRight");this.builder("/*"+o+t.text+r+"*/",t)}decl(t,o){let r=this.raw(t,"between","colon"),n=t.prop+r+this.rawValue(t,"value");t.important&&(n+=t.raws.important||" !important"),o&&(n+=";"),this.builder(n,t)}document(t){this.body(t)}raw(t,o,r){let n;if(r||(r=o),o&&(n=t.raws[o],typeof n<"u"))return n;let i=t.parent;if(r==="before"&&(!i||i.type==="root"&&i.first===t||i&&i.type==="document"))return"";if(!i)return lY[r];let s=t.root();if(s.rawCache||(s.rawCache={}),typeof s.rawCache[r]<"u")return s.rawCache[r];if(r==="before"||r==="after")return this.beforeAfter(t,r);{let a="raw"+P1e(r);this[a]?n=this[a](s,t):s.walk(c=>{if(n=c.raws[o],typeof n<"u")return!1})}return typeof n>"u"&&(n=lY[r]),s.rawCache[r]=n,n}rawBeforeClose(t){let o;return t.walk(r=>{if(r.nodes&&r.nodes.length>0&&typeof r.raws.after<"u")return o=r.raws.after,o.includes(` |
| 18 |
`)&&(o=o.replace(/[^\n]+$/,"")),!1}),o&&(o=o.replace(/\S/g,"")),o}rawBeforeComment(t,o){let r;return t.walkComments(n=>{if(typeof n.raws.before<"u")return r=n.raws.before,r.includes(` |
| 19 |
`)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?r=this.raw(o,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(t,o){let r;return t.walkDecls(n=>{if(typeof n.raws.before<"u")return r=n.raws.before,r.includes(` |
| 20 |
`)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?r=this.raw(o,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(t){let o;return t.walk(r=>{if(r.type!=="decl"&&(o=r.raws.between,typeof o<"u"))return!1}),o}rawBeforeRule(t){let o;return t.walk(r=>{if(r.nodes&&(r.parent!==t||t.first!==r)&&typeof r.raws.before<"u")return o=r.raws.before,o.includes(` |
| 21 |
`)&&(o=o.replace(/[^\n]+$/,"")),!1}),o&&(o=o.replace(/\S/g,"")),o}rawColon(t){let o;return t.walkDecls(r=>{if(typeof r.raws.between<"u")return o=r.raws.between.replace(/[^\s:]/g,""),!1}),o}rawEmptyBody(t){let o;return t.walk(r=>{if(r.nodes&&r.nodes.length===0&&(o=r.raws.after,typeof o<"u"))return!1}),o}rawIndent(t){if(t.raws.indent)return t.raws.indent;let o;return t.walk(r=>{let n=r.parent;if(n&&n!==t&&n.parent&&n.parent===t&&typeof r.raws.before<"u"){let i=r.raws.before.split(` |
| 22 |
`);return o=i[i.length-1],o=o.replace(/\S/g,""),!1}}),o}rawSemicolon(t){let o;return t.walk(r=>{if(r.nodes&&r.nodes.length&&r.last.type==="decl"&&(o=r.raws.semicolon,typeof o<"u"))return!1}),o}rawValue(t,o){let r=t[o],n=t.raws[o];return n&&n.value===r?n.raw:r}root(t){this.body(t),t.raws.after&&this.builder(t.raws.after)}rule(t){this.block(t,this.rawValue(t,"selector")),t.raws.ownSemicolon&&this.builder(t.raws.ownSemicolon,t,"end")}stringify(t,o){if(!this[t.type])throw new Error("Unknown AST node type "+t.type+". Maybe you need to change PostCSS stringifier.");this[t.type](t,o)}};cY.exports=i_;i_.default=i_});var DB=ie((JYe,uY)=>{"use strict";var R1e=zV();function jV(e,t){new R1e(t).stringify(e)}uY.exports=jV;jV.default=jV});var UV=ie((eqe,fY)=>{"use strict";var dY={};fY.exports=function(t){dY[t]||(dY[t]=!0,typeof console<"u"&&console.warn&&console.warn(t))}});var VB=ie((tqe,HV)=>{"use strict";HV.exports.isClean=Symbol("isClean");HV.exports.my=Symbol("my")});var zB=ie((oqe,mY)=>{"use strict";var{isClean:FB,my:O1e}=VB(),A1e=AB(),L1e=zV(),N1e=DB();function GV(e,t){let o=new e.constructor;for(let r in e){if(!Object.prototype.hasOwnProperty.call(e,r)||r==="proxyCache")continue;let n=e[r],i=typeof n;r==="parent"&&i==="object"?t&&(o[r]=t):r==="source"?o[r]=n:Array.isArray(n)?o[r]=n.map(s=>GV(s,o)):(i==="object"&&n!==null&&(n=GV(n)),o[r]=n)}return o}var s_=class{constructor(t={}){this.raws={},this[FB]=!1,this[O1e]=!0;for(let o in t)if(o==="nodes"){this.nodes=[];for(let r of t[o])typeof r.clone=="function"?this.append(r.clone()):this.append(r)}else this[o]=t[o]}addToError(t){if(t.postcssNode=this,t.stack&&this.source&&/\n\s{4}at /.test(t.stack)){let o=this.source;t.stack=t.stack.replace(/\n\s{4}at /,`$&${o.input.from}:${o.start.line}:${o.start.column}$&`)}return t}after(t){return this.parent.insertAfter(this,t),this}assign(t={}){for(let o in t)this[o]=t[o];return this}before(t){return this.parent.insertBefore(this,t),this}cleanRaws(t){delete this.raws.before,delete this.raws.after,t||delete this.raws.between}clone(t={}){let o=GV(this);for(let r in t)o[r]=t[r];return o}cloneAfter(t={}){let o=this.clone(t);return this.parent.insertAfter(this,o),o}cloneBefore(t={}){let o=this.clone(t);return this.parent.insertBefore(this,o),o}error(t,o={}){if(this.source){let{end:r,start:n}=this.rangeBy(o);return this.source.input.error(t,{column:n.column,line:n.line},{column:r.column,line:r.line},o)}return new A1e(t)}getProxyProcessor(){return{get(t,o){return o==="proxyOf"?t:o==="root"?()=>t.root().toProxy():t[o]},set(t,o,r){return t[o]===r||(t[o]=r,(o==="prop"||o==="value"||o==="name"||o==="params"||o==="important"||o==="text")&&t.markDirty()),!0}}}markDirty(){if(this[FB]){this[FB]=!1;let t=this;for(;t=t.parent;)t[FB]=!1}}next(){if(!this.parent)return;let t=this.parent.index(this);return this.parent.nodes[t+1]}positionBy(t,o){let r=this.source.start;if(t.index)r=this.positionInside(t.index,o);else if(t.word){o=this.toString();let n=o.indexOf(t.word);n!==-1&&(r=this.positionInside(n,o))}return r}positionInside(t,o){let r=o||this.toString(),n=this.source.start.column,i=this.source.start.line;for(let s=0;s<t;s++)r[s]===` |
| 23 |
`?(n=1,i+=1):n+=1;return{column:n,line:i}}prev(){if(!this.parent)return;let t=this.parent.index(this);return this.parent.nodes[t-1]}rangeBy(t){let o={column:this.source.start.column,line:this.source.start.line},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:o.column+1,line:o.line};if(t.word){let n=this.toString(),i=n.indexOf(t.word);i!==-1&&(o=this.positionInside(i,n),r=this.positionInside(i+t.word.length,n))}else t.start?o={column:t.start.column,line:t.start.line}:t.index&&(o=this.positionInside(t.index)),t.end?r={column:t.end.column,line:t.end.line}:typeof t.endIndex=="number"?r=this.positionInside(t.endIndex):t.index&&(r=this.positionInside(t.index+1));return(r.line<o.line||r.line===o.line&&r.column<=o.column)&&(r={column:o.column+1,line:o.line}),{end:r,start:o}}raw(t,o){return new L1e().raw(this,t,o)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...t){if(this.parent){let o=this,r=!1;for(let n of t)n===this?r=!0:r?(this.parent.insertAfter(o,n),o=n):this.parent.insertBefore(o,n);r||this.remove()}return this}root(){let t=this;for(;t.parent&&t.parent.type!=="document";)t=t.parent;return t}toJSON(t,o){let r={},n=o==null;o=o||new Map;let i=0;for(let s in this){if(!Object.prototype.hasOwnProperty.call(this,s)||s==="parent"||s==="proxyCache")continue;let a=this[s];if(Array.isArray(a))r[s]=a.map(c=>typeof c=="object"&&c.toJSON?c.toJSON(null,o):c);else if(typeof a=="object"&&a.toJSON)r[s]=a.toJSON(null,o);else if(s==="source"){let c=o.get(a.input);c==null&&(c=i,o.set(a.input,i),i++),r[s]={end:a.end,inputId:c,start:a.start}}else r[s]=a}return n&&(r.inputs=[...o.keys()].map(s=>s.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(t=N1e){t.stringify&&(t=t.stringify);let o="";return t(this,r=>{o+=r}),o}warn(t,o,r){let n={node:this};for(let i in r)n[i]=r[i];return t.warn(o,n)}get proxyOf(){return this}};mY.exports=s_;s_.default=s_});var WV=ie((rqe,pY)=>{"use strict";var M1e=zB(),a_=class extends M1e{constructor(t){t&&typeof t.value<"u"&&typeof t.value!="string"&&(t={...t,value:String(t.value)}),super(t),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}};pY.exports=a_;a_.default=a_});var $V=ie((nqe,hY)=>{"use strict";var D1e=zB(),l_=class extends D1e{constructor(t){super(t),this.type="comment"}};hY.exports=l_;l_.default=l_});var Nm=ie((iqe,wY)=>{"use strict";var{isClean:gY,my:bY}=VB(),vY=WV(),kY=$V(),V1e=zB(),yY,KV,YV,_Y;function SY(e){return e.map(t=>(t.nodes&&(t.nodes=SY(t.nodes)),delete t.source,t))}function xY(e){if(e[gY]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)xY(t)}var $s=class e extends V1e{append(...t){for(let o of t){let r=this.normalize(o,this.last);for(let n of r)this.proxyOf.nodes.push(n)}return this.markDirty(),this}cleanRaws(t){if(super.cleanRaws(t),this.nodes)for(let o of this.nodes)o.cleanRaws(t)}each(t){if(!this.proxyOf.nodes)return;let o=this.getIterator(),r,n;for(;this.indexes[o]<this.proxyOf.nodes.length&&(r=this.indexes[o],n=t(this.proxyOf.nodes[r],r),n!==!1);)this.indexes[o]+=1;return delete this.indexes[o],n}every(t){return this.nodes.every(t)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let t=this.lastEach;return this.indexes[t]=0,t}getProxyProcessor(){return{get(t,o){return o==="proxyOf"?t:t[o]?o==="each"||typeof o=="string"&&o.startsWith("walk")?(...r)=>t[o](...r.map(n=>typeof n=="function"?(i,s)=>n(i.toProxy(),s):n)):o==="every"||o==="some"?r=>t[o]((n,...i)=>r(n.toProxy(),...i)):o==="root"?()=>t.root().toProxy():o==="nodes"?t.nodes.map(r=>r.toProxy()):o==="first"||o==="last"?t[o].toProxy():t[o]:t[o]},set(t,o,r){return t[o]===r||(t[o]=r,(o==="name"||o==="params"||o==="selector")&&t.markDirty()),!0}}}index(t){return typeof t=="number"?t:(t.proxyOf&&(t=t.proxyOf),this.proxyOf.nodes.indexOf(t))}insertAfter(t,o){let r=this.index(t),n=this.normalize(o,this.proxyOf.nodes[r]).reverse();r=this.index(t);for(let s of n)this.proxyOf.nodes.splice(r+1,0,s);let i;for(let s in this.indexes)i=this.indexes[s],r<i&&(this.indexes[s]=i+n.length);return this.markDirty(),this}insertBefore(t,o){let r=this.index(t),n=r===0?"prepend":!1,i=this.normalize(o,this.proxyOf.nodes[r],n).reverse();r=this.index(t);for(let a of i)this.proxyOf.nodes.splice(r,0,a);let s;for(let a in this.indexes)s=this.indexes[a],r<=s&&(this.indexes[a]=s+i.length);return this.markDirty(),this}normalize(t,o){if(typeof t=="string")t=SY(yY(t).nodes);else if(typeof t>"u")t=[];else if(Array.isArray(t)){t=t.slice(0);for(let n of t)n.parent&&n.parent.removeChild(n,"ignore")}else if(t.type==="root"&&this.type!=="document"){t=t.nodes.slice(0);for(let n of t)n.parent&&n.parent.removeChild(n,"ignore")}else if(t.type)t=[t];else if(t.prop){if(typeof t.value>"u")throw new Error("Value field is missed in node creation");typeof t.value!="string"&&(t.value=String(t.value)),t=[new vY(t)]}else if(t.selector)t=[new KV(t)];else if(t.name)t=[new YV(t)];else if(t.text)t=[new kY(t)];else throw new Error("Unknown node type in node creation");return t.map(n=>(n[bY]||e.rebuild(n),n=n.proxyOf,n.parent&&n.parent.removeChild(n),n[gY]&&xY(n),typeof n.raws.before>"u"&&o&&typeof o.raws.before<"u"&&(n.raws.before=o.raws.before.replace(/\S/g,"")),n.parent=this.proxyOf,n))}prepend(...t){t=t.reverse();for(let o of t){let r=this.normalize(o,this.first,"prepend").reverse();for(let n of r)this.proxyOf.nodes.unshift(n);for(let n in this.indexes)this.indexes[n]=this.indexes[n]+r.length}return this.markDirty(),this}push(t){return t.parent=this,this.proxyOf.nodes.push(t),this}removeAll(){for(let t of this.proxyOf.nodes)t.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(t){t=this.index(t),this.proxyOf.nodes[t].parent=void 0,this.proxyOf.nodes.splice(t,1);let o;for(let r in this.indexes)o=this.indexes[r],o>=t&&(this.indexes[r]=o-1);return this.markDirty(),this}replaceValues(t,o,r){return r||(r=o,o={}),this.walkDecls(n=>{o.props&&!o.props.includes(n.prop)||o.fast&&!n.value.includes(o.fast)||(n.value=n.value.replace(t,r))}),this.markDirty(),this}some(t){return this.nodes.some(t)}walk(t){return this.each((o,r)=>{let n;try{n=t(o,r)}catch(i){throw o.addToError(i)}return n!==!1&&o.walk&&(n=o.walk(t)),n})}walkAtRules(t,o){return o?t instanceof RegExp?this.walk((r,n)=>{if(r.type==="atrule"&&t.test(r.name))return o(r,n)}):this.walk((r,n)=>{if(r.type==="atrule"&&r.name===t)return o(r,n)}):(o=t,this.walk((r,n)=>{if(r.type==="atrule")return o(r,n)}))}walkComments(t){return this.walk((o,r)=>{if(o.type==="comment")return t(o,r)})}walkDecls(t,o){return o?t instanceof RegExp?this.walk((r,n)=>{if(r.type==="decl"&&t.test(r.prop))return o(r,n)}):this.walk((r,n)=>{if(r.type==="decl"&&r.prop===t)return o(r,n)}):(o=t,this.walk((r,n)=>{if(r.type==="decl")return o(r,n)}))}walkRules(t,o){return o?t instanceof RegExp?this.walk((r,n)=>{if(r.type==="rule"&&t.test(r.selector))return o(r,n)}):this.walk((r,n)=>{if(r.type==="rule"&&r.selector===t)return o(r,n)}):(o=t,this.walk((r,n)=>{if(r.type==="rule")return o(r,n)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};$s.registerParse=e=>{yY=e};$s.registerRule=e=>{KV=e};$s.registerAtRule=e=>{YV=e};$s.registerRoot=e=>{_Y=e};wY.exports=$s;$s.default=$s;$s.rebuild=e=>{e.type==="atrule"?Object.setPrototypeOf(e,YV.prototype):e.type==="rule"?Object.setPrototypeOf(e,KV.prototype):e.type==="decl"?Object.setPrototypeOf(e,vY.prototype):e.type==="comment"?Object.setPrototypeOf(e,kY.prototype):e.type==="root"&&Object.setPrototypeOf(e,_Y.prototype),e[bY]=!0,e.nodes&&e.nodes.forEach(t=>{$s.rebuild(t)})}});var EY=ie((sqe,BY)=>{"use strict";var jB=/[\t\n\f\r "#'()/;[\\\]{}]/g,UB=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,F1e=/.[\r\n"'(/\\]/,CY=/[\da-f]/i;BY.exports=function(t,o={}){let r=t.css.valueOf(),n=o.ignoreErrors,i,s,a,c,u,d,f,m,h,p,g=r.length,b=0,k=[],v=[];function y(){return b}function _(T){throw t.error("Unclosed "+T,b)}function S(){return v.length===0&&b>=g}function C(T){if(v.length)return v.pop();if(b>=g)return;let I=T?T.ignoreUnclosed:!1;switch(i=r.charCodeAt(b),i){case 10:case 32:case 9:case 13:case 12:{s=b;do s+=1,i=r.charCodeAt(s);while(i===32||i===10||i===9||i===13||i===12);p=["space",r.slice(b,s)],b=s-1;break}case 91:case 93:case 123:case 125:case 58:case 59:case 41:{let E=String.fromCharCode(i);p=[E,E,b];break}case 40:{if(m=k.length?k.pop()[1]:"",h=r.charCodeAt(b+1),m==="url"&&h!==39&&h!==34&&h!==32&&h!==10&&h!==9&&h!==12&&h!==13){s=b;do{if(d=!1,s=r.indexOf(")",s+1),s===-1)if(n||I){s=b;break}else _("bracket");for(f=s;r.charCodeAt(f-1)===92;)f-=1,d=!d}while(d);p=["brackets",r.slice(b,s+1),b,s],b=s}else s=r.indexOf(")",b+1),c=r.slice(b,s+1),s===-1||F1e.test(c)?p=["(","(",b]:(p=["brackets",c,b,s],b=s);break}case 39:case 34:{a=i===39?"'":'"',s=b;do{if(d=!1,s=r.indexOf(a,s+1),s===-1)if(n||I){s=b+1;break}else _("string");for(f=s;r.charCodeAt(f-1)===92;)f-=1,d=!d}while(d);p=["string",r.slice(b,s+1),b,s],b=s;break}case 64:{jB.lastIndex=b+1,jB.test(r),jB.lastIndex===0?s=r.length-1:s=jB.lastIndex-2,p=["at-word",r.slice(b,s+1),b,s],b=s;break}case 92:{for(s=b,u=!0;r.charCodeAt(s+1)===92;)s+=1,u=!u;if(i=r.charCodeAt(s+1),u&&i!==47&&i!==32&&i!==10&&i!==9&&i!==13&&i!==12&&(s+=1,CY.test(r.charAt(s)))){for(;CY.test(r.charAt(s+1));)s+=1;r.charCodeAt(s+1)===32&&(s+=1)}p=["word",r.slice(b,s+1),b,s],b=s;break}default:{i===47&&r.charCodeAt(b+1)===42?(s=r.indexOf("*/",b+2)+1,s===0&&(n||I?s=r.length:_("comment")),p=["comment",r.slice(b,s+1),b,s],b=s):(UB.lastIndex=b+1,UB.test(r),UB.lastIndex===0?s=r.length-1:s=UB.lastIndex-2,p=["word",r.slice(b,s+1),b,s],k.push(p),b=s);break}}return b++,p}function B(T){v.push(T)}return{back:B,endOfFile:S,nextToken:C,position:y}}});var PY=ie((aqe,IY)=>{"use strict";var TY=Nm(),kg=class extends TY{constructor(t){super(t),this.type="atrule"}append(...t){return this.proxyOf.nodes||(this.nodes=[]),super.append(...t)}prepend(...t){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...t)}};IY.exports=kg;kg.default=kg;TY.registerAtRule(kg)});var HB=ie((lqe,LY)=>{"use strict";var RY=Nm(),OY,AY,sd=class extends RY{constructor(t){super(t),this.type="root",this.nodes||(this.nodes=[])}normalize(t,o,r){let n=super.normalize(t);if(o){if(r==="prepend")this.nodes.length>1?o.raws.before=this.nodes[1].raws.before:delete o.raws.before;else if(this.first!==o)for(let i of n)i.raws.before=o.raws.before}return n}removeChild(t,o){let r=this.index(t);return!o&&r===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(t)}toResult(t={}){return new OY(new AY,this,t).stringify()}};sd.registerLazyResult=e=>{OY=e};sd.registerProcessor=e=>{AY=e};LY.exports=sd;sd.default=sd;RY.registerRoot(sd)});var MY=ie((cqe,NY)=>{"use strict";var c_={comma(e){return c_.split(e,[","],!0)},space(e){let t=[" ",` |
| 24 |
`," "];return c_.split(e,t)},split(e,t,o){let r=[],n="",i=!1,s=0,a=!1,c="",u=!1;for(let d of e)u?u=!1:d==="\\"?u=!0:a?d===c&&(a=!1):d==='"'||d==="'"?(a=!0,c=d):d==="("?s+=1:d===")"?s>0&&(s-=1):s===0&&t.includes(d)&&(i=!0),i?(n!==""&&r.push(n.trim()),n="",i=!1):n+=d;return(o||n!=="")&&r.push(n.trim()),r}};NY.exports=c_;c_.default=c_});var FY=ie((uqe,VY)=>{"use strict";var DY=Nm(),z1e=MY(),yg=class extends DY{constructor(t){super(t),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return z1e.comma(this.selector)}set selectors(t){let o=this.selector?this.selector.match(/,\s*/):null,r=o?o[0]:","+this.raw("between","beforeOpen");this.selector=t.join(r)}};VY.exports=yg;yg.default=yg;DY.registerRule(yg)});var HY=ie((dqe,UY)=>{"use strict";var j1e=WV(),U1e=EY(),H1e=$V(),G1e=PY(),W1e=HB(),zY=FY(),jY={empty:!0,space:!0};function $1e(e){for(let t=e.length-1;t>=0;t--){let o=e[t],r=o[3]||o[2];if(r)return r}}var qV=class{constructor(t){this.input=t,this.root=new W1e,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:t,start:{column:1,line:1,offset:0}}}atrule(t){let o=new G1e;o.name=t[1].slice(1),o.name===""&&this.unnamedAtrule(o,t),this.init(o,t[2]);let r,n,i,s=!1,a=!1,c=[],u=[];for(;!this.tokenizer.endOfFile();){if(t=this.tokenizer.nextToken(),r=t[0],r==="("||r==="["?u.push(r==="("?")":"]"):r==="{"&&u.length>0?u.push("}"):r===u[u.length-1]&&u.pop(),u.length===0)if(r===";"){o.source.end=this.getPosition(t[2]),o.source.end.offset++,this.semicolon=!0;break}else if(r==="{"){a=!0;break}else if(r==="}"){if(c.length>0){for(i=c.length-1,n=c[i];n&&n[0]==="space";)n=c[--i];n&&(o.source.end=this.getPosition(n[3]||n[2]),o.source.end.offset++)}this.end(t);break}else c.push(t);else c.push(t);if(this.tokenizer.endOfFile()){s=!0;break}}o.raws.between=this.spacesAndCommentsFromEnd(c),c.length?(o.raws.afterName=this.spacesAndCommentsFromStart(c),this.raw(o,"params",c),s&&(t=c[c.length-1],o.source.end=this.getPosition(t[3]||t[2]),o.source.end.offset++,this.spaces=o.raws.between,o.raws.between="")):(o.raws.afterName="",o.params=""),a&&(o.nodes=[],this.current=o)}checkMissedSemicolon(t){let o=this.colon(t);if(o===!1)return;let r=0,n;for(let i=o-1;i>=0&&(n=t[i],!(n[0]!=="space"&&(r+=1,r===2)));i--);throw this.input.error("Missed semicolon",n[0]==="word"?n[3]+1:n[2])}colon(t){let o=0,r,n,i;for(let[s,a]of t.entries()){if(r=a,n=r[0],n==="("&&(o+=1),n===")"&&(o-=1),o===0&&n===":")if(!i)this.doubleColon(r);else{if(i[0]==="word"&&i[1]==="progid")continue;return s}i=r}return!1}comment(t){let o=new H1e;this.init(o,t[2]),o.source.end=this.getPosition(t[3]||t[2]),o.source.end.offset++;let r=t[1].slice(2,-2);if(/^\s*$/.test(r))o.text="",o.raws.left=r,o.raws.right="";else{let n=r.match(/^(\s*)([^]*\S)(\s*)$/);o.text=n[2],o.raws.left=n[1],o.raws.right=n[3]}}createTokenizer(){this.tokenizer=U1e(this.input)}decl(t,o){let r=new j1e;this.init(r,t[0][2]);let n=t[t.length-1];for(n[0]===";"&&(this.semicolon=!0,t.pop()),r.source.end=this.getPosition(n[3]||n[2]||$1e(t)),r.source.end.offset++;t[0][0]!=="word";)t.length===1&&this.unknownWord(t),r.raws.before+=t.shift()[1];for(r.source.start=this.getPosition(t[0][2]),r.prop="";t.length;){let u=t[0][0];if(u===":"||u==="space"||u==="comment")break;r.prop+=t.shift()[1]}r.raws.between="";let i;for(;t.length;)if(i=t.shift(),i[0]===":"){r.raws.between+=i[1];break}else i[0]==="word"&&/\w/.test(i[1])&&this.unknownWord([i]),r.raws.between+=i[1];(r.prop[0]==="_"||r.prop[0]==="*")&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let s=[],a;for(;t.length&&(a=t[0][0],!(a!=="space"&&a!=="comment"));)s.push(t.shift());this.precheckMissedSemicolon(t);for(let u=t.length-1;u>=0;u--){if(i=t[u],i[1].toLowerCase()==="!important"){r.important=!0;let d=this.stringFrom(t,u);d=this.spacesFromEnd(t)+d,d!==" !important"&&(r.raws.important=d);break}else if(i[1].toLowerCase()==="important"){let d=t.slice(0),f="";for(let m=u;m>0;m--){let h=d[m][0];if(f.trim().indexOf("!")===0&&h!=="space")break;f=d.pop()[1]+f}f.trim().indexOf("!")===0&&(r.important=!0,r.raws.important=f,t=d)}if(i[0]!=="space"&&i[0]!=="comment")break}t.some(u=>u[0]!=="space"&&u[0]!=="comment")&&(r.raws.between+=s.map(u=>u[1]).join(""),s=[]),this.raw(r,"value",s.concat(t),o),r.value.includes(":")&&!o&&this.checkMissedSemicolon(t)}doubleColon(t){throw this.input.error("Double colon",{offset:t[2]},{offset:t[2]+t[1].length})}emptyRule(t){let o=new zY;this.init(o,t[2]),o.selector="",o.raws.between="",this.current=o}end(t){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(t[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(t)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(t){if(this.spaces+=t[1],this.current.nodes){let o=this.current.nodes[this.current.nodes.length-1];o&&o.type==="rule"&&!o.raws.ownSemicolon&&(o.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(t){let o=this.input.fromOffset(t);return{column:o.col,line:o.line,offset:t}}init(t,o){this.current.push(t),t.source={input:this.input,start:this.getPosition(o)},t.raws.before=this.spaces,this.spaces="",t.type!=="comment"&&(this.semicolon=!1)}other(t){let o=!1,r=null,n=!1,i=null,s=[],a=t[1].startsWith("--"),c=[],u=t;for(;u;){if(r=u[0],c.push(u),r==="("||r==="[")i||(i=u),s.push(r==="("?")":"]");else if(a&&n&&r==="{")i||(i=u),s.push("}");else if(s.length===0)if(r===";")if(n){this.decl(c,a);return}else break;else if(r==="{"){this.rule(c);return}else if(r==="}"){this.tokenizer.back(c.pop()),o=!0;break}else r===":"&&(n=!0);else r===s[s.length-1]&&(s.pop(),s.length===0&&(i=null));u=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(o=!0),s.length>0&&this.unclosedBracket(i),o&&n){if(!a)for(;c.length&&(u=c[c.length-1][0],!(u!=="space"&&u!=="comment"));)this.tokenizer.back(c.pop());this.decl(c,a)}else this.unknownWord(c)}parse(){let t;for(;!this.tokenizer.endOfFile();)switch(t=this.tokenizer.nextToken(),t[0]){case"space":this.spaces+=t[1];break;case";":this.freeSemicolon(t);break;case"}":this.end(t);break;case"comment":this.comment(t);break;case"at-word":this.atrule(t);break;case"{":this.emptyRule(t);break;default:this.other(t);break}this.endFile()}precheckMissedSemicolon(){}raw(t,o,r,n){let i,s,a=r.length,c="",u=!0,d,f;for(let m=0;m<a;m+=1)i=r[m],s=i[0],s==="space"&&m===a-1&&!n?u=!1:s==="comment"?(f=r[m-1]?r[m-1][0]:"empty",d=r[m+1]?r[m+1][0]:"empty",!jY[f]&&!jY[d]?c.slice(-1)===","?u=!1:c+=i[1]:u=!1):c+=i[1];if(!u){let m=r.reduce((h,p)=>h+p[1],"");t.raws[o]={raw:m,value:c}}t[o]=c}rule(t){t.pop();let o=new zY;this.init(o,t[0][2]),o.raws.between=this.spacesAndCommentsFromEnd(t),this.raw(o,"selector",t),this.current=o}spacesAndCommentsFromEnd(t){let o,r="";for(;t.length&&(o=t[t.length-1][0],!(o!=="space"&&o!=="comment"));)r=t.pop()[1]+r;return r}spacesAndCommentsFromStart(t){let o,r="";for(;t.length&&(o=t[0][0],!(o!=="space"&&o!=="comment"));)r+=t.shift()[1];return r}spacesFromEnd(t){let o,r="";for(;t.length&&(o=t[t.length-1][0],o==="space");)r=t.pop()[1]+r;return r}stringFrom(t,o){let r="";for(let n=o;n<t.length;n++)r+=t[n][1];return t.splice(o,t.length-o),r}unclosedBlock(){let t=this.current.source.start;throw this.input.error("Unclosed block",t.line,t.column)}unclosedBracket(t){throw this.input.error("Unclosed bracket",{offset:t[2]},{offset:t[2]+1})}unexpectedClose(t){throw this.input.error("Unexpected }",{offset:t[2]},{offset:t[2]+1})}unknownWord(t){throw this.input.error("Unknown word",{offset:t[0][2]},{offset:t[0][2]+t[0][1].length})}unnamedAtrule(t,o){throw this.input.error("At-rule without name",{offset:o[2]},{offset:o[2]+o[1].length})}};UY.exports=qV});var ZV=ie((fqe,GY)=>{"use strict";var K1e=Nm(),Y1e=HY(),q1e=DV();function GB(e,t){let o=new q1e(e,t),r=new Y1e(o);try{r.parse()}catch(n){throw n}return r.root}GY.exports=GB;GB.default=GB;K1e.registerParse(GB)});var $Y=ie((mqe,WY)=>{"use strict";var u_=class{constructor(t,o={}){if(this.type="warning",this.text=t,o.node&&o.node.source){let r=o.node.rangeBy(o);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(let r in o)this[r]=o[r]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};WY.exports=u_;u_.default=u_});var XV=ie((pqe,KY)=>{"use strict";var Z1e=$Y(),d_=class{constructor(t,o,r){this.processor=t,this.messages=[],this.root=o,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(t,o={}){o.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(o.plugin=this.lastPlugin.postcssPlugin);let r=new Z1e(t,o);return this.messages.push(r),r}warnings(){return this.messages.filter(t=>t.type==="warning")}get content(){return this.css}};KY.exports=d_;d_.default=d_});var qY=ie((gqe,YY)=>{"use strict";var X1e=FV(),Q1e=DB(),hqe=UV(),J1e=ZV(),eBe=XV(),f_=class{constructor(t,o,r){o=o.toString(),this.stringified=!1,this._processor=t,this._css=o,this._opts=r,this._map=void 0;let n,i=Q1e;this.result=new eBe(this._processor,n,this._opts),this.result.css=o;let s=this;Object.defineProperty(this.result,"root",{get(){return s.root}});let a=new X1e(i,n,this._opts,o);if(a.isMap()){let[c,u]=a.generate();c&&(this.result.css=c),u&&(this.result.map=u)}else a.clearAnnotation(),this.result.css=a.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}sync(){if(this.error)throw this.error;return this.result}then(t,o){return this.async().then(t,o)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let t,o=J1e;try{t=o(this._css,this._opts)}catch(r){this.error=r}if(this.error)throw this.error;return this._root=t,t}get[Symbol.toStringTag](){return"NoWorkResult"}};YY.exports=f_;f_.default=f_});var QV=ie((bqe,QY)=>{"use strict";var tBe=Nm(),ZY,XY,Mm=class extends tBe{constructor(t){super({type:"document",...t}),this.nodes||(this.nodes=[])}toResult(t={}){return new ZY(new XY,this,t).stringify()}};Mm.registerLazyResult=e=>{ZY=e};Mm.registerProcessor=e=>{XY=e};QY.exports=Mm;Mm.default=Mm});var rq=ie((kqe,oq)=>{"use strict";var{isClean:Fa,my:oBe}=VB(),rBe=FV(),nBe=DB(),iBe=Nm(),sBe=QV(),vqe=UV(),JY=XV(),aBe=ZV(),lBe=HB(),cBe={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},uBe={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},dBe={Once:!0,postcssPlugin:!0,prepare:!0},_g=0;function m_(e){return typeof e=="object"&&typeof e.then=="function"}function tq(e){let t=!1,o=cBe[e.type];return e.type==="decl"?t=e.prop.toLowerCase():e.type==="atrule"&&(t=e.name.toLowerCase()),t&&e.append?[o,o+"-"+t,_g,o+"Exit",o+"Exit-"+t]:t?[o,o+"-"+t,o+"Exit",o+"Exit-"+t]:e.append?[o,_g,o+"Exit"]:[o,o+"Exit"]}function eq(e){let t;return e.type==="document"?t=["Document",_g,"DocumentExit"]:e.type==="root"?t=["Root",_g,"RootExit"]:t=tq(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function JV(e){return e[Fa]=!1,e.nodes&&e.nodes.forEach(t=>JV(t)),e}var e3={},ad=class e{constructor(t,o,r){this.stringified=!1,this.processed=!1;let n;if(typeof o=="object"&&o!==null&&(o.type==="root"||o.type==="document"))n=JV(o);else if(o instanceof e||o instanceof JY)n=JV(o.root),o.map&&(typeof r.map>"u"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=o.map);else{let i=aBe;r.syntax&&(i=r.syntax.parse),r.parser&&(i=r.parser),i.parse&&(i=i.parse);try{n=i(o,r)}catch(s){this.processed=!0,this.error=s}n&&!n[oBe]&&iBe.rebuild(n)}this.result=new JY(t,n,r),this.helpers={...e3,postcss:e3,result:this.result},this.plugins=this.processor.plugins.map(i=>typeof i=="object"&&i.prepare?{...i,...i.prepare(this.result)}:i)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(t,o){let r=this.result.lastPlugin;try{o&&o.addToError(t),this.error=t,t.name==="CssSyntaxError"&&!t.plugin?(t.plugin=r.postcssPlugin,t.setMessage()):r.postcssVersion}catch(n){console&&console.error&&console.error(n)}return t}prepareVisitors(){this.listeners={};let t=(o,r,n)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([o,n])};for(let o of this.plugins)if(typeof o=="object")for(let r in o){if(!uBe[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${o.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!dBe[r])if(typeof o[r]=="object")for(let n in o[r])n==="*"?t(o,r,o[r][n]):t(o,r+"-"+n.toLowerCase(),o[r][n]);else typeof o[r]=="function"&&t(o,r,o[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let t=0;t<this.plugins.length;t++){let o=this.plugins[t],r=this.runOnRoot(o);if(m_(r))try{await r}catch(n){throw this.handleError(n)}}if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[Fa];){t[Fa]=!0;let o=[eq(t)];for(;o.length>0;){let r=this.visitTick(o);if(m_(r))try{await r}catch(n){let i=o[o.length-1].node;throw this.handleError(n,i)}}}if(this.listeners.OnceExit)for(let[o,r]of this.listeners.OnceExit){this.result.lastPlugin=o;try{if(t.type==="document"){let n=t.nodes.map(i=>r(i,this.helpers));await Promise.all(n)}else await r(t,this.helpers)}catch(n){throw this.handleError(n)}}}return this.processed=!0,this.stringify()}runOnRoot(t){this.result.lastPlugin=t;try{if(typeof t=="object"&&t.Once){if(this.result.root.type==="document"){let o=this.result.root.nodes.map(r=>t.Once(r,this.helpers));return m_(o[0])?Promise.all(o):o}return t.Once(this.result.root,this.helpers)}else if(typeof t=="function")return t(this.result.root,this.result)}catch(o){throw this.handleError(o)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let t=this.result.opts,o=nBe;t.syntax&&(o=t.syntax.stringify),t.stringifier&&(o=t.stringifier),o.stringify&&(o=o.stringify);let n=new rBe(o,this.result.root,this.result.opts).generate();return this.result.css=n[0],this.result.map=n[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let t of this.plugins){let o=this.runOnRoot(t);if(m_(o))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[Fa];)t[Fa]=!0,this.walkSync(t);if(this.listeners.OnceExit)if(t.type==="document")for(let o of t.nodes)this.visitSync(this.listeners.OnceExit,o);else this.visitSync(this.listeners.OnceExit,t)}return this.result}then(t,o){return this.async().then(t,o)}toString(){return this.css}visitSync(t,o){for(let[r,n]of t){this.result.lastPlugin=r;let i;try{i=n(o,this.helpers)}catch(s){throw this.handleError(s,o.proxyOf)}if(o.type!=="root"&&o.type!=="document"&&!o.parent)return!0;if(m_(i))throw this.getAsyncError()}}visitTick(t){let o=t[t.length-1],{node:r,visitors:n}=o;if(r.type!=="root"&&r.type!=="document"&&!r.parent){t.pop();return}if(n.length>0&&o.visitorIndex<n.length){let[s,a]=n[o.visitorIndex];o.visitorIndex+=1,o.visitorIndex===n.length&&(o.visitors=[],o.visitorIndex=0),this.result.lastPlugin=s;try{return a(r.toProxy(),this.helpers)}catch(c){throw this.handleError(c,r)}}if(o.iterator!==0){let s=o.iterator,a;for(;a=r.nodes[r.indexes[s]];)if(r.indexes[s]+=1,!a[Fa]){a[Fa]=!0,t.push(eq(a));return}o.iterator=0,delete r.indexes[s]}let i=o.events;for(;o.eventIndex<i.length;){let s=i[o.eventIndex];if(o.eventIndex+=1,s===_g){r.nodes&&r.nodes.length&&(r[Fa]=!0,o.iterator=r.getIterator());return}else if(this.listeners[s]){o.visitors=this.listeners[s];return}}t.pop()}walkSync(t){t[Fa]=!0;let o=tq(t);for(let r of o)if(r===_g)t.nodes&&t.each(n=>{n[Fa]||this.walkSync(n)});else{let n=this.listeners[r];if(n&&this.visitSync(n,t.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};ad.registerPostcss=e=>{e3=e};oq.exports=ad;ad.default=ad;lBe.registerLazyResult(ad);sBe.registerLazyResult(ad)});var iq=ie((yqe,nq)=>{"use strict";var fBe=qY(),mBe=rq(),pBe=QV(),hBe=HB(),Dm=class{constructor(t=[]){this.version="8.4.38",this.plugins=this.normalize(t)}normalize(t){let o=[];for(let r of t)if(r.postcss===!0?r=r():r.postcss&&(r=r.postcss),typeof r=="object"&&Array.isArray(r.plugins))o=o.concat(r.plugins);else if(typeof r=="object"&&r.postcssPlugin)o.push(r);else if(typeof r=="function")o.push(r);else if(!(typeof r=="object"&&(r.parse||r.stringify)))throw new Error(r+" is not a PostCSS plugin");return o}process(t,o={}){return!this.plugins.length&&!o.parser&&!o.stringifier&&!o.syntax?new fBe(this,t,o):new mBe(this,t,o)}use(t){return this.plugins=this.plugins.concat(this.normalize([t])),this}};nq.exports=Dm;Dm.default=Dm;hBe.registerProcessor(Dm);pBe.registerProcessor(Dm)});var lq=ie((_qe,aq)=>{aq.exports=function(t){let o=t.prefix,r=/\s+$/.test(o)?o:`${o} `,n=t.ignoreFiles?[].concat(t.ignoreFiles):[],i=t.includeFiles?[].concat(t.includeFiles):[];return function(s){n.length&&s.source.input.file&&sq(s.source.input.file,n)||i.length&&s.source.input.file&&!sq(s.source.input.file,i)||s.walkRules(a=>{let c=["keyframes","-webkit-keyframes","-moz-keyframes","-o-keyframes","-ms-keyframes"];a.parent&&c.includes(a.parent.name)||(a.selectors=a.selectors.map(u=>t.exclude&&gBe(u,t.exclude)?u:t.transform?t.transform(o,u,r+u,s.source.input.file,a):r+u))})}};function sq(e,t){return t.some(o=>o instanceof RegExp?o.test(e):e.includes(o))}function gBe(e,t){return t.some(o=>o instanceof RegExp?o.test(e):e===o)}});var uq=ie((Sqe,cq)=>{var t3=40,o3=41,WB=39,r3=34,n3=92,Sg=47,i3=44,s3=58,$B=42,bBe=117,vBe=85,kBe=43,yBe=/^[a-f0-9?-]+$/i;cq.exports=function(e){for(var t=[],o=e,r,n,i,s,a,c,u,d,f=0,m=o.charCodeAt(f),h=o.length,p=[{nodes:t}],g=0,b,k="",v="",y="";f<h;)if(m<=32){r=f;do r+=1,m=o.charCodeAt(r);while(m<=32);s=o.slice(f,r),i=t[t.length-1],m===o3&&g?y=s:i&&i.type==="div"?(i.after=s,i.sourceEndIndex+=s.length):m===i3||m===s3||m===Sg&&o.charCodeAt(r+1)!==$B&&(!b||b&&b.type==="function"&&b.value!=="calc")?v=s:t.push({type:"space",sourceIndex:f,sourceEndIndex:r,value:s}),f=r}else if(m===WB||m===r3){r=f,n=m===WB?"'":'"',s={type:"string",sourceIndex:f,quote:n};do if(a=!1,r=o.indexOf(n,r+1),~r)for(c=r;o.charCodeAt(c-1)===n3;)c-=1,a=!a;else o+=n,r=o.length-1,s.unclosed=!0;while(a);s.value=o.slice(f+1,r),s.sourceEndIndex=s.unclosed?r:r+1,t.push(s),f=r+1,m=o.charCodeAt(f)}else if(m===Sg&&o.charCodeAt(f+1)===$B)r=o.indexOf("*/",f),s={type:"comment",sourceIndex:f,sourceEndIndex:r+2},r===-1&&(s.unclosed=!0,r=o.length,s.sourceEndIndex=r),s.value=o.slice(f+2,r),t.push(s),f=r+2,m=o.charCodeAt(f);else if((m===Sg||m===$B)&&b&&b.type==="function"&&b.value==="calc")s=o[f],t.push({type:"word",sourceIndex:f-v.length,sourceEndIndex:f+s.length,value:s}),f+=1,m=o.charCodeAt(f);else if(m===Sg||m===i3||m===s3)s=o[f],t.push({type:"div",sourceIndex:f-v.length,sourceEndIndex:f+s.length,value:s,before:v,after:""}),v="",f+=1,m=o.charCodeAt(f);else if(t3===m){r=f;do r+=1,m=o.charCodeAt(r);while(m<=32);if(d=f,s={type:"function",sourceIndex:f-k.length,value:k,before:o.slice(d+1,r)},f=r,k==="url"&&m!==WB&&m!==r3){r-=1;do if(a=!1,r=o.indexOf(")",r+1),~r)for(c=r;o.charCodeAt(c-1)===n3;)c-=1,a=!a;else o+=")",r=o.length-1,s.unclosed=!0;while(a);u=r;do u-=1,m=o.charCodeAt(u);while(m<=32);d<u?(f!==u+1?s.nodes=[{type:"word",sourceIndex:f,sourceEndIndex:u+1,value:o.slice(f,u+1)}]:s.nodes=[],s.unclosed&&u+1!==r?(s.after="",s.nodes.push({type:"space",sourceIndex:u+1,sourceEndIndex:r,value:o.slice(u+1,r)})):(s.after=o.slice(u+1,r),s.sourceEndIndex=r)):(s.after="",s.nodes=[]),f=r+1,s.sourceEndIndex=s.unclosed?r:f,m=o.charCodeAt(f),t.push(s)}else g+=1,s.after="",s.sourceEndIndex=f+1,t.push(s),p.push(s),t=s.nodes=[],b=s;k=""}else if(o3===m&&g)f+=1,m=o.charCodeAt(f),b.after=y,b.sourceEndIndex+=y.length,y="",g-=1,p[p.length-1].sourceEndIndex=f,p.pop(),b=p[g],t=b.nodes;else{r=f;do m===n3&&(r+=1),r+=1,m=o.charCodeAt(r);while(r<h&&!(m<=32||m===WB||m===r3||m===i3||m===s3||m===Sg||m===t3||m===$B&&b&&b.type==="function"&&b.value==="calc"||m===Sg&&b.type==="function"&&b.value==="calc"||m===o3&&g));s=o.slice(f,r),t3===m?k=s:(bBe===s.charCodeAt(0)||vBe===s.charCodeAt(0))&&kBe===s.charCodeAt(1)&&yBe.test(s.slice(2))?t.push({type:"unicode-range",sourceIndex:f,sourceEndIndex:r,value:s}):t.push({type:"word",sourceIndex:f,sourceEndIndex:r,value:s}),f=r}for(f=p.length-1;f;f-=1)p[f].unclosed=!0,p[f].sourceEndIndex=o.length;return p[0].nodes}});var fq=ie((xqe,dq)=>{dq.exports=function e(t,o,r){var n,i,s,a;for(n=0,i=t.length;n<i;n+=1)s=t[n],r||(a=o(s,n,t)),a!==!1&&s.type==="function"&&Array.isArray(s.nodes)&&e(s.nodes,o,r),r&&o(s,n,t)}});var gq=ie((wqe,hq)=>{function mq(e,t){var o=e.type,r=e.value,n,i;return t&&(i=t(e))!==void 0?i:o==="word"||o==="space"?r:o==="string"?(n=e.quote||"",n+r+(e.unclosed?"":n)):o==="comment"?"/*"+r+(e.unclosed?"":"*/"):o==="div"?(e.before||"")+r+(e.after||""):Array.isArray(e.nodes)?(n=pq(e.nodes,t),o!=="function"?n:r+"("+(e.before||"")+n+(e.after||"")+(e.unclosed?"":")")):r}function pq(e,t){var o,r;if(Array.isArray(e)){for(o="",r=e.length-1;~r;r-=1)o=mq(e[r],t)+o;return o}return mq(e,t)}hq.exports=pq});var vq=ie((Cqe,bq)=>{var KB=45,YB=43,a3=46,_Be=101,SBe=69;function xBe(e){var t=e.charCodeAt(0),o;if(t===YB||t===KB){if(o=e.charCodeAt(1),o>=48&&o<=57)return!0;var r=e.charCodeAt(2);return o===a3&&r>=48&&r<=57}return t===a3?(o=e.charCodeAt(1),o>=48&&o<=57):t>=48&&t<=57}bq.exports=function(e){var t=0,o=e.length,r,n,i;if(o===0||!xBe(e))return!1;for(r=e.charCodeAt(t),(r===YB||r===KB)&&t++;t<o&&(r=e.charCodeAt(t),!(r<48||r>57));)t+=1;if(r=e.charCodeAt(t),n=e.charCodeAt(t+1),r===a3&&n>=48&&n<=57)for(t+=2;t<o&&(r=e.charCodeAt(t),!(r<48||r>57));)t+=1;if(r=e.charCodeAt(t),n=e.charCodeAt(t+1),i=e.charCodeAt(t+2),(r===_Be||r===SBe)&&(n>=48&&n<=57||(n===YB||n===KB)&&i>=48&&i<=57))for(t+=n===YB||n===KB?3:2;t<o&&(r=e.charCodeAt(t),!(r<48||r>57));)t+=1;return{number:e.slice(0,t),unit:e.slice(t)}}});var Sq=ie((Bqe,_q)=>{var wBe=uq(),kq=fq(),yq=gq();function ld(e){return this instanceof ld?(this.nodes=wBe(e),this):new ld(e)}ld.prototype.toString=function(){return Array.isArray(this.nodes)?yq(this.nodes):""};ld.prototype.walk=function(e,t){return kq(this.nodes,e,t),this};ld.unit=vq();ld.walk=kq;ld.stringify=yq;_q.exports=ld});var wq=ie((Eqe,l3)=>{var xq=Sq();l3.exports=e=>{let o=Object.assign({skipHostRelativeUrls:!0},e);return{postcssPlugin:"rebaseUrl",Declaration(r){let n=xq(r.value),i=!1;n.walk(s=>{if(s.type!=="function"||s.value!=="url")return;let a=s.nodes[0].value,c=new URL(a,e.rootUrl);return c.pathname===a&&o.skipHostRelativeUrls||(s.nodes[0].value=c.toString(),i=!0),!1}),i&&(r.value=xq.stringify(n))}}};l3.exports.postcss=!0});var Dq=ie((jqe,Mq)=>{Mq.exports=window.wp.priorityQueue});var B3=ie((NXe,DZ)=>{DZ.exports=window.wp.blob});var I_=ie((aet,$X)=>{$X.exports=window.wp.isShallowEqual});var XT=ie((knt,Dee)=>{Dee.exports=window.wp.tokenList});var x4=ie((Rnt,Zee)=>{"use strict";var s2e=function(t){return a2e(t)&&!l2e(t)};function a2e(e){return!!e&&typeof e=="object"}function l2e(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||d2e(e)}var c2e=typeof Symbol=="function"&&Symbol.for,u2e=c2e?Symbol.for("react.element"):60103;function d2e(e){return e.$$typeof===u2e}function f2e(e){return Array.isArray(e)?[]:{}}function J_(e,t){return t.clone!==!1&&t.isMergeableObject(e)?db(f2e(e),e,t):e}function m2e(e,t,o){return e.concat(t).map(function(r){return J_(r,o)})}function p2e(e,t){if(!t.customMerge)return db;var o=t.customMerge(e);return typeof o=="function"?o:db}function h2e(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}function Yee(e){return Object.keys(e).concat(h2e(e))}function qee(e,t){try{return t in e}catch{return!1}}function g2e(e,t){return qee(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))}function b2e(e,t,o){var r={};return o.isMergeableObject(e)&&Yee(e).forEach(function(n){r[n]=J_(e[n],o)}),Yee(t).forEach(function(n){g2e(e,n)||(qee(e,n)&&o.isMergeableObject(t[n])?r[n]=p2e(n,o)(e[n],t[n],o):r[n]=J_(t[n],o))}),r}function db(e,t,o){o=o||{},o.arrayMerge=o.arrayMerge||m2e,o.isMergeableObject=o.isMergeableObject||s2e,o.cloneUnlessOtherwiseSpecified=J_;var r=Array.isArray(t),n=Array.isArray(e),i=r===n;return i?r?o.arrayMerge(e,t,o):b2e(e,t,o):J_(t,o)}db.all=function(t,o){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(r,n){return db(r,n,o)},{})};var v2e=db;Zee.exports=v2e});var aoe=ie((uat,soe)=>{soe.exports=window.wp.commands});var Ja=ie((zut,Sne)=>{Sne.exports=window.wp.date});var tie=ie((Tdt,eie)=>{var qne=!1,_p,_F,SF,b2,v2,Zne,k2,xF,wF,CF,Xne,BF,EF,Qne,Jne;function Nn(){if(!qne){qne=!0;var e=navigator.userAgent,t=/(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\d+\.\d+))|(?:Opera(?:.+Version.|.)(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))|(?:Trident\/\d+\.\d+.*rv:(\d+\.\d+))/.exec(e),o=/(Mac OS X)|(Windows)|(Linux)/.exec(e);if(BF=/\b(iPhone|iP[ao]d)/.exec(e),EF=/\b(iP[ao]d)/.exec(e),CF=/Android/i.exec(e),Qne=/FBAN\/\w+;/i.exec(e),Jne=/Mobile/i.exec(e),Xne=!!/Win64/.exec(e),t){_p=t[1]?parseFloat(t[1]):t[5]?parseFloat(t[5]):NaN,_p&&document&&document.documentMode&&(_p=document.documentMode);var r=/(?:Trident\/(\d+.\d+))/.exec(e);Zne=r?parseFloat(r[1])+4:_p,_F=t[2]?parseFloat(t[2]):NaN,SF=t[3]?parseFloat(t[3]):NaN,b2=t[4]?parseFloat(t[4]):NaN,b2?(t=/(?:Chrome\/(\d+\.\d+))/.exec(e),v2=t&&t[1]?parseFloat(t[1]):NaN):v2=NaN}else _p=_F=SF=v2=b2=NaN;if(o){if(o[1]){var n=/(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(e);k2=n?parseFloat(n[1].replace("_",".")):!0}else k2=!1;xF=!!o[2],wF=!!o[3]}else k2=xF=wF=!1}}var TF={ie:function(){return Nn()||_p},ieCompatibilityMode:function(){return Nn()||Zne>_p},ie64:function(){return TF.ie()&&Xne},firefox:function(){return Nn()||_F},opera:function(){return Nn()||SF},webkit:function(){return Nn()||b2},safari:function(){return TF.webkit()},chrome:function(){return Nn()||v2},windows:function(){return Nn()||xF},osx:function(){return Nn()||k2},linux:function(){return Nn()||wF},iphone:function(){return Nn()||BF},mobile:function(){return Nn()||BF||EF||CF||Jne},nativeApp:function(){return Nn()||Qne},android:function(){return Nn()||CF},ipad:function(){return Nn()||EF}};eie.exports=TF});var rie=ie((Idt,oie)=>{"use strict";var y2=!!(typeof window<"u"&&window.document&&window.document.createElement),pRe={canUseDOM:y2,canUseWorkers:typeof Worker<"u",canUseEventListeners:y2&&!!(window.addEventListener||window.attachEvent),canUseViewport:y2&&!!window.screen,isInWorker:!y2};oie.exports=pRe});var aie=ie((Pdt,sie)=>{"use strict";var nie=rie(),iie;nie.canUseDOM&&(iie=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0);function hRe(e,t){if(!nie.canUseDOM||t&&!("addEventListener"in document))return!1;var o="on"+e,r=o in document;if(!r){var n=document.createElement("div");n.setAttribute(o,"return;"),r=typeof n[o]=="function"}return!r&&iie&&e==="wheel"&&(r=document.implementation.hasFeature("Events.wheel","3.0")),r}sie.exports=hRe});var mie=ie((Rdt,fie)=>{"use strict";var gRe=tie(),bRe=aie(),lie=10,cie=40,uie=800;function die(e){var t=0,o=0,r=0,n=0;return"detail"in e&&(o=e.detail),"wheelDelta"in e&&(o=-e.wheelDelta/120),"wheelDeltaY"in e&&(o=-e.wheelDeltaY/120),"wheelDeltaX"in e&&(t=-e.wheelDeltaX/120),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(t=o,o=0),r=t*lie,n=o*lie,"deltaY"in e&&(n=e.deltaY),"deltaX"in e&&(r=e.deltaX),(r||n)&&e.deltaMode&&(e.deltaMode==1?(r*=cie,n*=cie):(r*=uie,n*=uie)),r&&!t&&(t=r<1?-1:1),n&&!o&&(o=n<1?-1:1),{spinX:t,spinY:o,pixelX:r,pixelY:n}}die.getEventType=function(){return gRe.firefox()?"DOMMouseScroll":bRe("wheel")?"wheel":"mousewheel"};fie.exports=die});var hie=ie((Odt,pie)=>{pie.exports=mie()});var Wse=ie((wmt,Gse)=>{"use strict";Gse.exports=function e(t,o){if(t===o)return!0;if(t&&o&&typeof t=="object"&&typeof o=="object"){if(t.constructor!==o.constructor)return!1;var r,n,i;if(Array.isArray(t)){if(r=t.length,r!=o.length)return!1;for(n=r;n--!==0;)if(!e(t[n],o[n]))return!1;return!0}if(t.constructor===RegExp)return t.source===o.source&&t.flags===o.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===o.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===o.toString();if(i=Object.keys(t),r=i.length,r!==Object.keys(o).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(o,i[n]))return!1;for(n=r;n--!==0;){var s=i[n];if(!e(t[s],o[s]))return!1}return!0}return t!==t&&o!==o}});var XDe={};wa(XDe,{AlignmentControl:()=>wC,AlignmentToolbar:()=>o7,Autocomplete:()=>_7,BlockAlignmentControl:()=>jC,BlockAlignmentToolbar:()=>H7,BlockBindingsAttributeControl:()=>by,BlockBindingsSourceFieldsList:()=>gy,BlockBreadcrumb:()=>fU,BlockCanvas:()=>foe,BlockColorsStyleSelector:()=>goe,BlockContextProvider:()=>q0,BlockControls:()=>Wt,BlockEdit:()=>bC,BlockEditorKeyboardShortcuts:()=>mB,BlockEditorProvider:()=>X$,BlockFormatControls:()=>n4,BlockIcon:()=>Me,BlockInspector:()=>ede,BlockList:()=>Cg,BlockMover:()=>vT,BlockNavigationDropdown:()=>Bre,BlockPopover:()=>TX,BlockPreview:()=>Tn,BlockSelectionClearer:()=>jX,BlockSettingsMenu:()=>GT,BlockSettingsMenuControls:()=>FT,BlockStyles:()=>Pb,BlockTitle:()=>ky,BlockToolbar:()=>Kte,BlockTools:()=>cS,BlockVerticalAlignmentControl:()=>DC,BlockVerticalAlignmentToolbar:()=>Yre,ButtonBlockAppender:()=>kd,ButtonBlockerAppender:()=>vX,ColorPalette:()=>gne,ColorPaletteControl:()=>kne,ContrastChecker:()=>JI,CopyHandler:()=>rde,DefaultBlockAppender:()=>Hg,DimensionControl:()=>yp,FontSizePicker:()=>d5,HeadingLevelDropdown:()=>Nre,HeightControl:()=>Yne,InnerBlocks:()=>R_,Inserter:()=>Ji,InspectorAdvancedControls:()=>wd,InspectorControls:()=>fe,JustifyContentControl:()=>Mh,JustifyToolbar:()=>nse,LineHeightControl:()=>H2,LinkControl:()=>tf,MediaPlaceholder:()=>Bae,MediaReplaceFlow:()=>Xb,MediaUpload:()=>gd,MediaUploadCheck:()=>Xs,MultiSelectScrollIntoView:()=>ade,NavigableToolbar:()=>ab,ObserveTyping:()=>fQ,PanelColorSettings:()=>Tae,PlainText:()=>Ble,RecursionProvider:()=>Jz,RichText:()=>ov,RichTextShortcut:()=>uz,RichTextToolbarButton:()=>fz,SETTINGS_DEFAULTS:()=>bk,SkipToSelectedBlock:()=>vP,ToolSelector:()=>yde,Typewriter:()=>dde,URLInput:()=>Jd,URLInputButton:()=>Lle,URLPopover:()=>nf,Warning:()=>Ou,WritingFlow:()=>EB,__experimentalBlockAlignmentMatrixControl:()=>nU,__experimentalBlockFullHeightAligmentControl:()=>eU,__experimentalBlockPatternSetup:()=>Wre,__experimentalBlockPatternsList:()=>ja,__experimentalBlockVariationPicker:()=>Mre,__experimentalBlockVariationTransforms:()=>$I,__experimentalBorderRadiusControl:()=>XI,__experimentalColorGradientControl:()=>Kd,__experimentalColorGradientSettingsDropdown:()=>m2,__experimentalDateFormatPicker:()=>xne,__experimentalDuotoneControl:()=>t2,__experimentalFontAppearanceControl:()=>r2,__experimentalFontFamilyControl:()=>n2,__experimentalGetBorderClassesAndStyles:()=>lA,__experimentalGetColorClassesAndStyles:()=>cA,__experimentalGetDimensionsClassesAndStyles:()=>aA,__experimentalGetElementClassName:()=>YDe,__experimentalGetGapCSSValue:()=>Zr,__experimentalGetGradientClass:()=>Ph,__experimentalGetGradientObjectByGradientValue:()=>$9,__experimentalGetShadowClassesAndStyles:()=>wj,__experimentalGetSpacingClassesAndStyles:()=>Ej,__experimentalImageEditor:()=>Xie,__experimentalImageSizeControl:()=>tse,__experimentalImageURLInputUI:()=>jle,__experimentalInspectorPopoverHeader:()=>yR,__experimentalLetterSpacingControl:()=>s2,__experimentalLibrary:()=>ide,__experimentalLinkControl:()=>U2,__experimentalLinkControlSearchInput:()=>Ise,__experimentalLinkControlSearchItem:()=>gse,__experimentalLinkControlSearchResults:()=>Sse,__experimentalListView:()=>UI,__experimentalPanelColorGradientSettings:()=>h2,__experimentalPreviewOptions:()=>rce,__experimentalPublishDateTimePicker:()=>gde,__experimentalRecursionProvider:()=>fde,__experimentalResponsiveBlockControl:()=>Ple,__experimentalSpacingSizesControl:()=>fv,__experimentalTextDecorationControl:()=>l2,__experimentalTextTransformControl:()=>u2,__experimentalUnitControl:()=>Ole,__experimentalUseBlockOverlayActive:()=>pU,__experimentalUseBlockPreview:()=>Uq,__experimentalUseBorderProps:()=>xj,__experimentalUseColorProps:()=>Bj,__experimentalUseCustomSides:()=>oj,__experimentalUseGradient:()=>K_e,__experimentalUseHasRecursion:()=>mde,__experimentalUseMultipleOriginColorsAndGradients:()=>qd,__experimentalUseResizeCanvas:()=>nce,__experimentalWritingModeControl:()=>f2,__unstableBlockSettingsMenuFirstItem:()=>TT,__unstableBlockToolbarLastItem:()=>xT,__unstableEditorStyles:()=>Zl,__unstableIframe:()=>bg,__unstableInserterMenuExtension:()=>kE,__unstableRichTextInputEvent:()=>mz,__unstableUseBlockSelectionClearer:()=>Ym,__unstableUseClipboardHandler:()=>ode,__unstableUseMouseMoveTypingReset:()=>A_,__unstableUseTypewriter:()=>Zz,__unstableUseTypingObserver:()=>L_,createCustomColorsHOC:()=>G9,getColorClassName:()=>Ri,getColorObjectByAttributeValues:()=>Ca,getColorObjectByColorValue:()=>K0,getComputedFluidTypographyValue:()=>q9,getCustomValueFromPreset:()=>w7,getDimensionsClassesAndStyles:()=>aA,getFontSize:()=>Rh,getFontSizeClass:()=>Au,getFontSizeObjectByValue:()=>u5,getGradientSlugByValue:()=>K9,getGradientValueBySlug:()=>SC,getPxFromCssUnit:()=>xge,getSpacingPresetCssVar:()=>Ns,getTypographyClassesAndStyles:()=>Tj,isValueSpacingPreset:()=>MC,privateApis:()=>Dj,store:()=>x,storeConfig:()=>Eh,transformStyles:()=>xg,useBlockBindingsUtils:()=>zl,useBlockCommands:()=>CI,useBlockDisplayInformation:()=>Lt,useBlockEditContext:()=>Ae,useBlockEditingMode:()=>bo,useBlockProps:()=>Hy,useCachedTruthy:()=>Ij,useHasRecursion:()=>e6,useInnerBlocksProps:()=>Jm,useSetting:()=>z9,useSettings:()=>me,useStyleOverride:()=>li,withColorContext:()=>QI,withColors:()=>W9,withFontSizes:()=>e7});function Fj(e){var t,o,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var n=e.length;for(t=0;t<n;t++)e[t]&&(o=Fj(e[t]))&&(r&&(r+=" "),r+=o)}else for(o in e)e[o]&&(r&&(r+=" "),r+=o);return r}function Zge(){for(var e,t,o=0,r="",n=arguments.length;o<n;o++)(e=arguments[o])&&(t=Fj(e))&&(r&&(r+=" "),r+=t);return r}var D=Zge;var _de=l(K(),1),ys=l(R(),1),xR=l(F(),1),n6=l(X(),1),r0=l(vt(),1);var U0=l(R(),1),Is=Symbol("mayDisplayControls"),ih=Symbol("mayDisplayParentControls"),uu=Symbol("mayDisplayPatternEditingControls"),H0=Symbol("blockEditingMode"),sh=Symbol("blockBindings"),G0=Symbol("isPreviewMode"),mk=Symbol("isInListViewBlockSupportTree"),vA={name:"",isSelected:!1},kA=(0,U0.createContext)(vA);kA.displayName="BlockEditContext";var{Provider:W0}=kA;function Ae(){return(0,U0.useContext)(kA)}var Xge={grad:.9,turn:360,rad:360/(2*Math.PI)},Tl=function(e){return typeof e=="string"?e.length>0:typeof e=="number"},ir=function(e,t,o){return t===void 0&&(t=0),o===void 0&&(o=Math.pow(10,t)),Math.round(o*e)/o+0},Pi=function(e,t,o){return t===void 0&&(t=0),o===void 0&&(o=1),e>o?o:e>t?e:t},Qj=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},Wj=function(e){return{r:Pi(e.r,0,255),g:Pi(e.g,0,255),b:Pi(e.b,0,255),a:Pi(e.a)}},yA=function(e){return{r:ir(e.r),g:ir(e.g),b:ir(e.b),a:ir(e.a,3)}},Qge=/^#([0-9a-f]{3,8})$/i,$0=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},Jj=function(e){var t=e.r,o=e.g,r=e.b,n=e.a,i=Math.max(t,o,r),s=i-Math.min(t,o,r),a=s?i===t?(o-r)/s:i===o?2+(r-t)/s:4+(t-o)/s:0;return{h:60*(a<0?a+6:a),s:i?s/i*100:0,v:i/255*100,a:n}},e8=function(e){var t=e.h,o=e.s,r=e.v,n=e.a;t=t/360*6,o/=100,r/=100;var i=Math.floor(t),s=r*(1-o),a=r*(1-(t-i)*o),c=r*(1-(1-t+i)*o),u=i%6;return{r:255*[r,a,s,s,c,r][u],g:255*[c,r,r,a,s,s][u],b:255*[s,s,c,r,r,a][u],a:n}},$j=function(e){return{h:Qj(e.h),s:Pi(e.s,0,100),l:Pi(e.l,0,100),a:Pi(e.a)}},Kj=function(e){return{h:ir(e.h),s:ir(e.s),l:ir(e.l),a:ir(e.a,3)}},Yj=function(e){return e8((o=(t=e).s,{h:t.h,s:(o*=((r=t.l)<50?r:100-r)/100)>0?2*o/(r+o)*100:0,v:r+o,a:t.a}));var t,o,r},pk=function(e){return{h:(t=Jj(e)).h,s:(n=(200-(o=t.s))*(r=t.v)/100)>0&&n<200?o*r/100/(n<=100?n:200-n)*100:0,l:n/2,a:t.a};var t,o,r,n},Jge=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,ebe=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,tbe=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,obe=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,xA={string:[[function(e){var t=Qge.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:e.length===4?ir(parseInt(e[3]+e[3],16)/255,2):1}:e.length===6||e.length===8?{r:parseInt(e.substr(0,2),16),g:parseInt(e.substr(2,2),16),b:parseInt(e.substr(4,2),16),a:e.length===8?ir(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=tbe.exec(e)||obe.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:Wj({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:t[7]===void 0?1:Number(t[7])/(t[8]?100:1)}):null},"rgb"],[function(e){var t=Jge.exec(e)||ebe.exec(e);if(!t)return null;var o,r,n=$j({h:(o=t[1],r=t[2],r===void 0&&(r="deg"),Number(o)*(Xge[r]||1)),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)});return Yj(n)},"hsl"]],object:[[function(e){var t=e.r,o=e.g,r=e.b,n=e.a,i=n===void 0?1:n;return Tl(t)&&Tl(o)&&Tl(r)?Wj({r:Number(t),g:Number(o),b:Number(r),a:Number(i)}):null},"rgb"],[function(e){var t=e.h,o=e.s,r=e.l,n=e.a,i=n===void 0?1:n;if(!Tl(t)||!Tl(o)||!Tl(r))return null;var s=$j({h:Number(t),s:Number(o),l:Number(r),a:Number(i)});return Yj(s)},"hsl"],[function(e){var t=e.h,o=e.s,r=e.v,n=e.a,i=n===void 0?1:n;if(!Tl(t)||!Tl(o)||!Tl(r))return null;var s=(function(a){return{h:Qj(a.h),s:Pi(a.s,0,100),v:Pi(a.v,0,100),a:Pi(a.a)}})({h:Number(t),s:Number(o),v:Number(r),a:Number(i)});return e8(s)},"hsv"]]},qj=function(e,t){for(var o=0;o<t.length;o++){var r=t[o][0](e);if(r)return[r,t[o][1]]}return[null,void 0]},rbe=function(e){return typeof e=="string"?qj(e.trim(),xA.string):typeof e=="object"&&e!==null?qj(e,xA.object):[null,void 0]};var _A=function(e,t){var o=pk(e);return{h:o.h,s:Pi(o.s+100*t,0,100),l:o.l,a:o.a}},SA=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},Zj=function(e,t){var o=pk(e);return{h:o.h,s:o.s,l:Pi(o.l+100*t,0,100),a:o.a}},wA=(function(){function e(t){this.parsed=rbe(t)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return e.prototype.isValid=function(){return this.parsed!==null},e.prototype.brightness=function(){return ir(SA(this.rgba),2)},e.prototype.isDark=function(){return SA(this.rgba)<.5},e.prototype.isLight=function(){return SA(this.rgba)>=.5},e.prototype.toHex=function(){return t=yA(this.rgba),o=t.r,r=t.g,n=t.b,s=(i=t.a)<1?$0(ir(255*i)):"","#"+$0(o)+$0(r)+$0(n)+s;var t,o,r,n,i,s},e.prototype.toRgb=function(){return yA(this.rgba)},e.prototype.toRgbString=function(){return t=yA(this.rgba),o=t.r,r=t.g,n=t.b,(i=t.a)<1?"rgba("+o+", "+r+", "+n+", "+i+")":"rgb("+o+", "+r+", "+n+")";var t,o,r,n,i},e.prototype.toHsl=function(){return Kj(pk(this.rgba))},e.prototype.toHslString=function(){return t=Kj(pk(this.rgba)),o=t.h,r=t.s,n=t.l,(i=t.a)<1?"hsla("+o+", "+r+"%, "+n+"%, "+i+")":"hsl("+o+", "+r+"%, "+n+"%)";var t,o,r,n,i},e.prototype.toHsv=function(){return t=Jj(this.rgba),{h:ir(t.h),s:ir(t.s),v:ir(t.v),a:ir(t.a,3)};var t},e.prototype.invert=function(){return Ot({r:255-(t=this.rgba).r,g:255-t.g,b:255-t.b,a:t.a});var t},e.prototype.saturate=function(t){return t===void 0&&(t=.1),Ot(_A(this.rgba,t))},e.prototype.desaturate=function(t){return t===void 0&&(t=.1),Ot(_A(this.rgba,-t))},e.prototype.grayscale=function(){return Ot(_A(this.rgba,-1))},e.prototype.lighten=function(t){return t===void 0&&(t=.1),Ot(Zj(this.rgba,t))},e.prototype.darken=function(t){return t===void 0&&(t=.1),Ot(Zj(this.rgba,-t))},e.prototype.rotate=function(t){return t===void 0&&(t=15),this.hue(this.hue()+t)},e.prototype.alpha=function(t){return typeof t=="number"?Ot({r:(o=this.rgba).r,g:o.g,b:o.b,a:t}):ir(this.rgba.a,3);var o},e.prototype.hue=function(t){var o=pk(this.rgba);return typeof t=="number"?Ot({h:t,s:o.s,l:o.l,a:o.a}):ir(o.h)},e.prototype.isEqual=function(t){return this.toHex()===Ot(t).toHex()},e})(),Ot=function(e){return e instanceof wA?e:new wA(e)},Xj=[],du=function(e){e.forEach(function(t){Xj.indexOf(t)<0&&(t(wA,xA),Xj.push(t))})};function fu(e,t){var o={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 n in o)r[o[n]]=n;var i={};e.prototype.toName=function(s){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var a,c,u=r[this.toHex()];if(u)return u;if(s?.closest){var d=this.toRgb(),f=1/0,m="black";if(!i.length)for(var h in o)i[h]=new e(o[h]).toRgb();for(var p in o){var g=(a=d,c=i[p],Math.pow(a.r-c.r,2)+Math.pow(a.g-c.g,2)+Math.pow(a.b-c.b,2));g<f&&(f=g,m=p)}return m}},t.string.push([function(s){var a=s.toLowerCase(),c=a==="transparent"?"#0000":o[a];return c?new e(c).toRgb():null},"name"])}var CA=function(e){var t=e/255;return t<.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)},BA=function(e){return .2126*CA(e.r)+.7152*CA(e.g)+.0722*CA(e.b)};function ah(e){e.prototype.luminance=function(){return t=BA(this.rgba),(o=2)===void 0&&(o=0),r===void 0&&(r=Math.pow(10,o)),Math.round(r*t)/r+0;var t,o,r},e.prototype.contrast=function(t){t===void 0&&(t="#FFF");var o,r,n,i,s,a,c,u=t instanceof e?t:new e(t);return i=this.rgba,s=u.toRgb(),a=BA(i),c=BA(s),o=a>c?(a+.05)/(c+.05):(c+.05)/(a+.05),(r=2)===void 0&&(r=0),n===void 0&&(n=Math.pow(10,r)),Math.floor(n*o)/n+0},e.prototype.isReadable=function(t,o){return t===void 0&&(t="#FFF"),o===void 0&&(o={}),this.contrast(t)>=(a=(s=(r=o).size)===void 0?"normal":s,(i=(n=r.level)===void 0?"AA":n)==="AAA"&&a==="normal"?7:i==="AA"&&a==="large"?3:4.5);var r,n,i,s,a}}var i8=l(A(),1);var r8=l(EA(),1),{lock:n8,unlock:M}=(0,r8.__dangerousOptInToUnstableAPIsOnlyForCoreModules)("I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.","@wordpress/block-editor");du([fu,ah]);var{kebabCase:nbe}=M(i8.privateApis),Ca=(e,t,o)=>{if(t){let r=e?.find(n=>n.slug===t);if(r)return r}return{color:o}},K0=(e,t)=>e?.find(o=>o.color===t);function Ri(e,t){if(!(!e||!t))return`has-${nbe(t)}-${e}`}function s8(e,t){let o=Ot(t),r=({color:i})=>o.contrast(i),n=Math.max(...e.map(r));return e.find(i=>r(i)===n).color}var vC=l(R(),1),pm=l(X(),1),U9=l(A(),1);var V9=l(F(),1),F9=l(Le(),1);var gC=l(R(),1),hC=l(K(),1);var Il=l(K(),1),h8=l(A(),1),gk=l(F(),1),$f=l(R(),1);var lh=l(R(),1),c8=l(w(),1),Y0=(0,lh.createContext)({});Y0.displayName="BlockContext";function q0({value:e,children:t}){let o=(0,lh.useContext)(Y0),r=(0,lh.useMemo)(()=>({...o,...e}),[o,e]);return(0,c8.jsx)(Y0.Provider,{value:r,children:t})}var Or=Y0;var ch=l(qn(),1);function Hf(e){return e?.startsWith("#")&&(0,ch.isValidFragment)(e)}function Gf(e){return e?.startsWith("/")||e?.startsWith("./")||e?.startsWith("../")}function Wf(e){if(e.includes(" "))return!1;let o=(0,ch.getProtocol)(e),r=(0,ch.isValidProtocol)(o),n=ibe(e),i=e?.startsWith("www.");return r||i||Hf(e)||n||Gf(e)}function ibe(e,t=6){let o=e.split(/[?#]/)[0];return new RegExp(`(?<=\\S)\\.(?:[a-zA-Z_]{2,${t}})(?:\\/|$)`).test(o)}var sbe="__default",d8="core/pattern-overrides";function hk(e){return e?.[sbe]?.source===d8}function f8(e,t){if(hk(e)){let o={};for(let r of t){let n=e[r]?e[r]:{source:d8};o[r]=n}return o}return e}var m8=l(R(),1),br=(0,m8.createContext)({});br.displayName="PrivateBlockContext";var Z0=l(w(),1),abe={},lbe=e=>{let{name:t}=e,o=(0,Il.getBlockType)(t);if(!o)return null;let r=o.edit||o.save;return(0,Z0.jsx)(r,{...e})},p8=(0,h8.withFilters)("editor.BlockEdit")(lbe),cbe=e=>{let{name:t,clientId:o,attributes:r,setAttributes:n}=e,i=(0,gk.useRegistry)(),s=(0,Il.getBlockType)(t),a=(0,$f.useContext)(Or),c=(0,gk.useSelect)(k=>M(k(Il.store)).getAllBlockBindingsSources(),[]),{bindableAttributes:u}=(0,$f.useContext)(br),{blockBindings:d,context:f,hasPatternOverrides:m}=(0,$f.useMemo)(()=>{let k=s?.usesContext?Object.fromEntries(Object.entries(a).filter(([v])=>s.usesContext.includes(v))):abe;return r?.metadata?.bindings&&Object.values(r?.metadata?.bindings||{}).forEach(v=>{c[v?.source]?.usesContext?.forEach(y=>{k[y]=a[y]})}),{blockBindings:f8(r?.metadata?.bindings,u),context:k,hasPatternOverrides:hk(r?.metadata?.bindings)}},[s?.usesContext,a,r?.metadata?.bindings,u,c]),h=(0,gk.useSelect)(k=>{if(!d)return r;let v={},y=new Map;for(let[_,S]of Object.entries(d)){let{source:C,args:B}=S,T=c[C];!T||!u?.includes(_)||y.set(T,{...y.get(T),[_]:{args:B}})}if(y.size)for(let[_,S]of y){let C={};_.getValues?C=_.getValues({select:k,context:f,clientId:o,bindings:S}):Object.keys(S).forEach(B=>{C[B]=_.label});for(let[B,T]of Object.entries(C))B==="url"&&(!T||!Wf(T))?v[B]=null:v[B]=T}return{...r,...v}},[r,u,d,o,f,c]),p=(0,$f.useCallback)(k=>{if(!d){n(k);return}i.batch(()=>{let v={...k},y=new Map;for(let[S,C]of Object.entries(v)){if(!d[S]||!u?.includes(S))continue;let B=d[S],T=c[B?.source];T?.setValues&&(y.set(T,{...y.get(T),[S]:{args:B.args,newValue:C}}),delete v[S])}if(y.size)for(let[S,C]of y)S.setValues({select:i.select,dispatch:i.dispatch,context:f,clientId:o,bindings:C});let _=!!f["pattern/overrides"];!(m&&_)&&Object.keys(v).length&&(m&&delete v.href,n(v))})},[u,d,o,f,m,n,c,i]);if(!s)return null;if(s.apiVersion>1)return(0,Z0.jsx)(p8,{...e,attributes:h,context:f,setAttributes:p});let g=(0,Il.hasBlockSupport)(s,"className",!0)?(0,Il.getBlockDefaultClassName)(t):null,b=D(g,r?.className,e.className);return(0,Z0.jsx)(p8,{...e,attributes:h,className:b,context:f,setAttributes:p})},g8=cbe;var N9=l(K(),1),c5=l(A(),1),M9=l(F(),1),pC=l(N(),1);var mC=l(F(),1);var yk=l(Kf(),1),PA=l(X(),1),_k=l(F(),1),B8=l(Le(),1),ix=l(K(),1);var Ve=l(N(),1),k8={insertUsage:{}},bk={alignWide:!1,supportsLayout:!0,colors:[{name:(0,Ve.__)("Black"),slug:"black",color:"#000000"},{name:(0,Ve.__)("Cyan bluish gray"),slug:"cyan-bluish-gray",color:"#abb8c3"},{name:(0,Ve.__)("White"),slug:"white",color:"#ffffff"},{name:(0,Ve.__)("Pale pink"),slug:"pale-pink",color:"#f78da7"},{name:(0,Ve.__)("Vivid red"),slug:"vivid-red",color:"#cf2e2e"},{name:(0,Ve.__)("Luminous vivid orange"),slug:"luminous-vivid-orange",color:"#ff6900"},{name:(0,Ve.__)("Luminous vivid amber"),slug:"luminous-vivid-amber",color:"#fcb900"},{name:(0,Ve.__)("Light green cyan"),slug:"light-green-cyan",color:"#7bdcb5"},{name:(0,Ve.__)("Vivid green cyan"),slug:"vivid-green-cyan",color:"#00d084"},{name:(0,Ve.__)("Pale cyan blue"),slug:"pale-cyan-blue",color:"#8ed1fc"},{name:(0,Ve.__)("Vivid cyan blue"),slug:"vivid-cyan-blue",color:"#0693e3"},{name:(0,Ve.__)("Vivid purple"),slug:"vivid-purple",color:"#9b51e0"}],fontSizes:[{name:(0,Ve._x)("Small","font size name"),size:13,slug:"small"},{name:(0,Ve._x)("Normal","font size name"),size:16,slug:"normal"},{name:(0,Ve._x)("Medium","font size name"),size:20,slug:"medium"},{name:(0,Ve._x)("Large","font size name"),size:36,slug:"large"},{name:(0,Ve._x)("Huge","font size name"),size:42,slug:"huge"}],imageDefaultSize:"large",imageSizes:[{slug:"thumbnail",name:(0,Ve.__)("Thumbnail")},{slug:"medium",name:(0,Ve.__)("Medium")},{slug:"large",name:(0,Ve.__)("Large")},{slug:"full",name:(0,Ve.__)("Full Size")}],imageEditing:!0,maxWidth:580,allowedBlockTypes:!0,maxUploadFileSize:0,allowedMimeTypes:null,canLockBlocks:!0,canEditCSS:!1,enableOpenverseMediaCategory:!0,clearBlockSelection:!0,__experimentalCanUserUseUnfilteredHTML:!1,__experimentalBlockDirectory:!1,__mobileEnablePageTemplates:!1,__experimentalBlockPatterns:[],__experimentalBlockPatternCategories:[],isPreviewMode:!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,Ve.__)("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,Ve.__)("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,Ve.__)("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,Ve.__)("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,Ve.__)("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,Ve.__)("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,Ve.__)("Blush light purple"),gradient:"linear-gradient(135deg,rgb(255,206,236) 0%,rgb(152,150,240) 100%)",slug:"blush-light-purple"},{name:(0,Ve.__)("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,Ve.__)("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,Ve.__)("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,Ve.__)("Electric grass"),gradient:"linear-gradient(135deg,rgb(202,248,128) 0%,rgb(113,206,126) 100%)",slug:"electric-grass"},{name:(0,Ve.__)("Midnight"),gradient:"linear-gradient(135deg,rgb(2,3,129) 0%,rgb(40,116,252) 100%)",slug:"midnight"}],__unstableResolvedAssets:{styles:[],scripts:[]}};function X0(e,t,o){return[...e.slice(0,o),...Array.isArray(t)?t:[t],...e.slice(o)]}function Q0(e,t,o,r=1){let n=[...e];return n.splice(t,r),X0(n,e.slice(t,t+r),o)}var Oi=Symbol("globalStylesDataKey"),J0=Symbol("globalStylesLinks"),mu=Symbol("selectBlockPatternsKey"),ex=Symbol("reusableBlocksSelect"),pu=Symbol("sectionRootClientIdKey"),tx=Symbol("mediaEditKey"),ox=Symbol("getMediaSelect"),hu=Symbol("isIsolatedEditor"),Ai=Symbol("deviceTypeKey"),rx=Symbol("isNavigationOverlayContext"),y8=Symbol("isNavigationPostEditor"),vk=Symbol("mediaUploadOnSuccess"),_8=Symbol("openMediaEditorModal");var{isContentBlock:ube}=M(ix.privateApis),dbe=e=>e;function nx(e,t=""){let o=new Map,r=[];return o.set(t,r),e.forEach(n=>{let{clientId:i,innerBlocks:s}=n;r.push(i),nx(s,i).forEach((a,c)=>{o.set(c,a)})}),o}function TA(e,t=""){let o=[],r=[[t,e]];for(;r.length;){let[n,i]=r.shift();i.forEach(({innerBlocks:s,...a})=>{o.push([a.clientId,n]),s?.length&&r.push([a.clientId,s])})}return o}function E8(e,t=dbe){let o=[],r=[...e];for(;r.length;){let{innerBlocks:n,...i}=r.shift();r.push(...n),o.push([i.clientId,t(i)])}return o}function T8(e){let t={},o=[...e];for(;o.length;){let{innerBlocks:r,...n}=o.shift();o.push(...r),t[n.clientId]=!0}return t}function S8(e){return E8(e,t=>{let{attributes:o,...r}=t;return r})}function x8(e){return E8(e,t=>t.attributes)}function fbe(e,t){return(0,yk.default)(Object.keys(e),Object.keys(t))}function mbe(e,t){return e.type==="UPDATE_BLOCK_ATTRIBUTES"&&t!==void 0&&t.type==="UPDATE_BLOCK_ATTRIBUTES"&&(0,yk.default)(e.clientIds,t.clientIds)&&fbe(e.attributes,t.attributes)}function w8(e,t){let o=e.tree,r=[...t],n=[...t];for(;r.length;){let i=r.shift();r.push(...i.innerBlocks),n.push(...i.innerBlocks)}for(let i of n)o.set(i.clientId,{});for(let i of n)o.set(i.clientId,Object.assign(o.get(i.clientId),{...e.byClientId.get(i.clientId),attributes:e.attributes.get(i.clientId),innerBlocks:i.innerBlocks.map(s=>o.get(s.clientId))}))}function gu(e,t,o=!1){let r=e.tree,n=new Set([]),i=new Set;for(let s of t){let a=o?s:e.parents.get(s);do if(e.controlledInnerBlocks.has(a)){i.add(a);break}else n.add(a),a=e.parents.get(a);while(a!==void 0)}for(let s of n)r.set(s,{...r.get(s)});for(let s of n)r.get(s).innerBlocks=(e.order.get(s)||[]).map(a=>r.get(a));for(let s of i)r.set("controlled||"+s,{innerBlocks:(e.order.get(s)||[]).map(a=>r.get(a))})}var pbe=e=>(t={},o)=>{let r=e(t,o);if(r===t)return t;switch(r.tree=t.tree?t.tree:new Map,o.type){case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":{r.tree=new Map(r.tree),w8(r,o.blocks),gu(r,o.rootClientId?[o.rootClientId]:[""],!0);break}case"UPDATE_BLOCK":r.tree=new Map(r.tree),r.tree.set(o.clientId,{...r.tree.get(o.clientId),...r.byClientId.get(o.clientId),attributes:r.attributes.get(o.clientId)}),gu(r,[o.clientId],!1);break;case"UPDATE_BLOCK_ATTRIBUTES":{r.tree=new Map(r.tree),o.clientIds.forEach(i=>{r.tree.set(i,{...r.tree.get(i),attributes:r.attributes.get(i)})}),gu(r,o.clientIds,!1);break}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{let i=T8(o.blocks);r.tree=new Map(r.tree),o.replacedClientIds.forEach(a=>{r.tree.delete(a),i[a]||r.tree.delete("controlled||"+a)}),w8(r,o.blocks),gu(r,o.blocks.map(a=>a.clientId),!1);let s=[];for(let a of o.clientIds){let c=t.parents.get(a);c!==void 0&&(c===""||r.byClientId.get(c))&&s.push(c)}gu(r,s,!0);break}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":let n=[];for(let i of o.clientIds){let s=t.parents.get(i);s!==void 0&&(s===""||r.byClientId.get(s))&&n.push(s)}r.tree=new Map(r.tree),o.removedClientIds.forEach(i=>{r.tree.delete(i),r.tree.delete("controlled||"+i)}),gu(r,n,!0);break;case"MOVE_BLOCKS_TO_POSITION":{let i=[];o.fromRootClientId?i.push(o.fromRootClientId):i.push(""),o.toRootClientId&&i.push(o.toRootClientId),r.tree=new Map(r.tree),gu(r,i,!0);break}case"MOVE_BLOCKS_UP":case"MOVE_BLOCKS_DOWN":{let i=[o.rootClientId?o.rootClientId:""];r.tree=new Map(r.tree),gu(r,i,!0);break}}return r};function hbe(e){let t,o=!1;return(r,n)=>{let i=e(r,n),s=o;o=n.type==="MARK_NEXT_CHANGE_AS_NOT_PERSISTENT";let a=n.type==="MARK_LAST_CHANGE_AS_PERSISTENT"||s;if(r===i&&!a)return r.isPersistentChange!==void 0?r:{...i,isPersistentChange:!0};let c=a?!s:!mbe(n,t);return t=n,{...i,isPersistentChange:c}}}function gbe(e){let t=new Set(["RECEIVE_BLOCKS"]);return(o,r)=>{let n=e(o,r);return n!==o&&(n.isIgnoredChange=t.has(r.type)),n}}var bbe=e=>(t,o)=>{let r=n=>{let i=n;for(let s=0;s<i.length;s++)!t.order.get(i[s])||o.keepControlledInnerBlocks&&o.keepControlledInnerBlocks[i[s]]||(i===n&&(i=[...i]),i.push(...t.order.get(i[s])));return i};if(t)switch(o.type){case"REMOVE_BLOCKS":o={...o,type:"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN",removedClientIds:r(o.clientIds)};break;case"REPLACE_BLOCKS":o={...o,type:"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN",replacedClientIds:r(o.clientIds)};break}return e(t,o)},vbe=e=>(t,o)=>{if(o.type==="RESET_BLOCKS"){let r=e(void 0,{type:"INSERT_BLOCKS",rootClientId:"",blocks:o.blocks}),n=t?.controlledInnerBlocks??new Set;if(t?.order)for(let s of n){if(!r.byClientId.has(s))continue;r.controlledInnerBlocks.add(s);let a=t.order.get(s);if(!a?.length)continue;r.order.set(s,a);let c=(u,d)=>{let f=t.byClientId.get(u);if(!f)return;r.byClientId.set(u,f),r.attributes.set(u,t.attributes.get(u)),r.parents.set(u,d);let m=t.order.get(u)||[];r.order.set(u,m),m.forEach(h=>c(h,u))};a.forEach(u=>c(u,s))}for(let s of r.controlledInnerBlocks){let a=r.order.get(s);if(!a?.length)continue;let c=a.map(f=>t.tree.get(f)),u=r.tree.get(s);u&&(u.innerBlocks=c),r.tree.set("controlled||"+s,{innerBlocks:c});let d=f=>{let m=t.tree.get(f);if(!m)return;r.tree.set(f,m),(r.order.get(f)||[]).forEach(d)};a.forEach(d)}let i=t?.blockEditingModes??new Map;for(let[s,a]of i)r.tree.has(s)&&r.blockEditingModes.set(s,a);return r}return e(t,o)},kbe=e=>(t,o)=>{if(o.type!=="REPLACE_INNER_BLOCKS")return e(t,o);let r={};if(t.controlledInnerBlocks.size){let s=[...o.blocks];for(;s.length;){let{innerBlocks:a,...c}=s.shift();s.push(...a),t.controlledInnerBlocks.has(c.clientId)&&(r[c.clientId]=!0)}}let n=t;t.order.get(o.rootClientId)&&(n=e(n,{type:"REMOVE_BLOCKS",keepControlledInnerBlocks:r,clientIds:t.order.get(o.rootClientId)}));let i=n;if(o.blocks.length){i=e(i,{...o,type:"INSERT_BLOCKS",index:0});let s=new Map(i.order);Object.keys(r).forEach(a=>{t.order.get(a)&&s.set(a,t.order.get(a))}),i.order=s,i.tree=new Map(i.tree),Object.keys(r).forEach(a=>{let c=`controlled||${a}`;t.tree.has(c)&&i.tree.set(c,t.tree.get(c))})}return i},ybe=e=>(t,o)=>{if(o.type==="SET_HAS_CONTROLLED_INNER_BLOCKS"){if(t.order.get(o.clientId)?.length){let n=e(t,{type:"REPLACE_INNER_BLOCKS",rootClientId:o.clientId,blocks:[]});return e(n,o)}return e(t,o)}return e(t,o)},_be=(0,PA.pipe)(_k.combineReducers,pbe,bbe,kbe,vbe,hbe,gbe,ybe)({byClientId(e=new Map,t){switch(t.type){case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":{let o=new Map(e);return S8(t.blocks).forEach(([r,n])=>{o.set(r,n)}),o}case"UPDATE_BLOCK":{if(!e.has(t.clientId))return e;let{attributes:o,...r}=t.updates;if(Object.values(r).length===0)return e;let n=new Map(e);return n.set(t.clientId,{...e.get(t.clientId),...r}),n}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{if(!t.blocks)return e;let o=new Map(e);return t.replacedClientIds.forEach(r=>{o.delete(r)}),S8(t.blocks).forEach(([r,n])=>{o.set(r,n)}),o}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":{let o=new Map(e);return t.removedClientIds.forEach(r=>{o.delete(r)}),o}}return e},attributes(e=new Map,t){switch(t.type){case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":{let o=new Map(e);return x8(t.blocks).forEach(([r,n])=>{o.set(r,n)}),o}case"UPDATE_BLOCK":{if(!e.get(t.clientId)||!t.updates.attributes)return e;let o=new Map(e);return o.set(t.clientId,{...e.get(t.clientId),...t.updates.attributes}),o}case"UPDATE_BLOCK_ATTRIBUTES":{if(t.clientIds.every(n=>!e.get(n)))return e;let o=!1,r=new Map(e);for(let n of t.clientIds){let i=Object.entries(t.options?.uniqueByBlock?t.attributes[n]:t.attributes??{});if(i.length===0)continue;let s=!1,a=e.get(n),c={};i.forEach(([u,d])=>{a[u]!==d&&(s=!0,c[u]=d)}),o=o||s,s&&r.set(n,{...a,...c})}return o?r:e}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{if(!t.blocks)return e;let o=new Map(e);return t.replacedClientIds.forEach(r=>{o.delete(r)}),x8(t.blocks).forEach(([r,n])=>{o.set(r,n)}),o}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":{let o=new Map(e);return t.removedClientIds.forEach(r=>{o.delete(r)}),o}}return e},order(e=new Map,t){switch(t.type){case"RECEIVE_BLOCKS":{let o=nx(t.blocks),r=new Map(e);return o.forEach((n,i)=>{i!==""&&r.set(i,n)}),r.set("",(e.get("")??[]).concat(o[""])),r}case"INSERT_BLOCKS":{let{rootClientId:o=""}=t,r=e.get(o)||[],n=nx(t.blocks,o),{index:i=r.length}=t,s=new Map(e);return n.forEach((a,c)=>{s.set(c,a)}),s.set(o,X0(r,n.get(o),i)),s}case"MOVE_BLOCKS_TO_POSITION":{let{fromRootClientId:o="",toRootClientId:r="",clientIds:n}=t,{index:i=e.get(r).length}=t;if(o===r){let c=e.get(r).indexOf(n[0]);if(c===-1)return e;let u=new Map(e);return u.set(r,Q0(e.get(r),c,i,n.length)),u}let s=new Map(e);return s.set(o,e.get(o)?.filter(a=>!n.includes(a))??[]),s.set(r,X0(e.get(r),n,i)),s}case"MOVE_BLOCKS_UP":{let{clientIds:o,rootClientId:r=""}=t,n=o[0],i=e.get(r);if(!i.length||n===i[0])return e;let s=i.indexOf(n),a=new Map(e);return a.set(r,Q0(i,s,s-1,o.length)),a}case"MOVE_BLOCKS_DOWN":{let{clientIds:o,rootClientId:r=""}=t,n=o[0],i=o[o.length-1],s=e.get(r);if(!s.length||i===s[s.length-1])return e;let a=s.indexOf(n),c=new Map(e);return c.set(r,Q0(s,a,a+1,o.length)),c}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{let{clientIds:o}=t;if(!t.blocks)return e;let r=nx(t.blocks),n=new Map(e);return t.replacedClientIds.forEach(i=>{n.delete(i)}),r.forEach((i,s)=>{s!==""&&n.set(s,i)}),n.forEach((i,s)=>{let a=Object.values(i).reduce((c,u)=>u===o[0]?[...c,...r.get("")]:(o.indexOf(u)===-1&&c.push(u),c),[]);n.set(s,a)}),n}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":{let o=new Map(e);return t.removedClientIds.forEach(r=>{o.delete(r)}),o.forEach((r,n)=>{let i=r?.filter(s=>!t.removedClientIds.includes(s))??[];i.length!==r.length&&o.set(n,i)}),o}}return e},parents(e=new Map,t){switch(t.type){case"RECEIVE_BLOCKS":{let o=new Map(e);return TA(t.blocks).forEach(([r,n])=>{o.set(r,n)}),o}case"INSERT_BLOCKS":{let o=new Map(e);return TA(t.blocks,t.rootClientId||"").forEach(([r,n])=>{o.set(r,n)}),o}case"MOVE_BLOCKS_TO_POSITION":{let o=new Map(e);return t.clientIds.forEach(r=>{o.set(r,t.toRootClientId||"")}),o}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{let o=new Map(e);return t.replacedClientIds.forEach(r=>{o.delete(r)}),TA(t.blocks,e.get(t.clientIds[0])).forEach(([r,n])=>{o.set(r,n)}),o}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":{let o=new Map(e);return t.removedClientIds.forEach(r=>{o.delete(r)}),o}}return e},controlledInnerBlocks(e=new Set,{type:t,clientId:o,hasControlledInnerBlocks:r}){if(t==="SET_HAS_CONTROLLED_INNER_BLOCKS"){if(r)return e.has(o)?e:new Set(e).add(o);if(!e.has(o))return e;let n=new Set(e);return n.delete(o),n}return e},blockEditingModes(e=new Map,t){switch(t.type){case"SET_BLOCK_EDITING_MODE":return e.get(t.clientId)===t.mode?e:new Map(e).set(t.clientId,t.mode);case"UNSET_BLOCK_EDITING_MODE":{if(!e.has(t.clientId))return e;let o=new Map(e);return o.delete(t.clientId),o}}return e}});function Sbe(e=!1,t){switch(t.type){case"HIDE_BLOCK_INTERFACE":return!0;case"SHOW_BLOCK_INTERFACE":return!1}return e}function xbe(e=!1,t){switch(t.type){case"START_TYPING":return!0;case"STOP_TYPING":return!1}return e}function wbe(e=!1,t){switch(t.type){case"START_DRAGGING":return!0;case"STOP_DRAGGING":return!1}return e}function Cbe(e=[],t){switch(t.type){case"START_DRAGGING_BLOCKS":return t.clientIds;case"STOP_DRAGGING_BLOCKS":return[]}return e}function Bbe(e={},t){return t.type==="SET_BLOCK_VISIBILITY"?{...e,...t.updates}:e}function C8(e={},t){switch(t.type){case"CLEAR_SELECTED_BLOCK":return e.clientId?{}:e;case"SELECT_BLOCK":return t.clientId===e.clientId?e:{clientId:t.clientId};case"REPLACE_INNER_BLOCKS":case"INSERT_BLOCKS":return!t.updateSelection||!t.blocks.length?e:{clientId:t.blocks[0].clientId};case"REMOVE_BLOCKS":return!t.clientIds||!t.clientIds.length||t.clientIds.indexOf(e.clientId)===-1?e:{};case"REPLACE_BLOCKS":{if(t.clientIds.indexOf(e.clientId)===-1)return e;let o=t.blocks[t.indexToSelect]||t.blocks[t.blocks.length-1];return o?o.clientId===e.clientId?e:{clientId:o.clientId}:{}}}return e}function Ebe(e={},t){switch(t.type){case"SELECTION_CHANGE":return t.clientId?{selectionStart:{clientId:t.clientId,attributeKey:t.attributeKey,offset:t.startOffset},selectionEnd:{clientId:t.clientId,attributeKey:t.attributeKey,offset:t.endOffset}}:{selectionStart:t.start||e.selectionStart,selectionEnd:t.end||e.selectionEnd};case"RESET_SELECTION":let{selectionStart:n,selectionEnd:i}=t;return{selectionStart:n,selectionEnd:i};case"MULTI_SELECT":let{start:s,end:a}=t;return s===e.selectionStart?.clientId&&a===e.selectionEnd?.clientId?e:{selectionStart:{clientId:s},selectionEnd:{clientId:a}};case"RESET_BLOCKS":let c=e?.selectionStart?.clientId,u=e?.selectionEnd?.clientId;if(!c&&!u)return e;if(!t.blocks.some(d=>d.clientId===c))return{selectionStart:{},selectionEnd:{}};if(!t.blocks.some(d=>d.clientId===u))return{...e,selectionEnd:e.selectionStart}}let o=C8(e.selectionStart,t),r=C8(e.selectionEnd,t);return o===e.selectionStart&&r===e.selectionEnd?e:{selectionStart:o,selectionEnd:r}}function Tbe(e=!1,t){switch(t.type){case"START_MULTI_SELECT":return!0;case"STOP_MULTI_SELECT":return!1}return e}function Ibe(e=!0,t){return t.type==="TOGGLE_SELECTION"?t.isSelectionEnabled:e}function Pbe(e=null,t){switch(t.type){case"SHOW_VIEWPORT_MODAL":return t.clientIds;case"HIDE_VIEWPORT_MODAL":return null}return e}function Rbe(e=!1,t){switch(t.type){case"DISPLAY_BLOCK_REMOVAL_PROMPT":let{clientIds:o,selectPrevious:r,message:n}=t;return{clientIds:o,selectPrevious:r,message:n};case"CLEAR_BLOCK_REMOVAL_PROMPT":return!1}return e}function Obe(e=!1,t){return t.type==="SET_BLOCK_REMOVAL_RULES"?t.rules:e}function Abe(e=null,t){return t.type==="REPLACE_BLOCKS"&&t.initialPosition!==void 0||["MULTI_SELECT","SELECT_BLOCK","RESET_SELECTION","INSERT_BLOCKS","REPLACE_INNER_BLOCKS"].includes(t.type)?t.initialPosition:e}function Lbe(e={},t){if(t.type==="TOGGLE_BLOCK_MODE"){let{clientId:o}=t;return{...e,[o]:e[o]&&e[o]==="html"?"visual":"html"}}return e}function Nbe(e=null,t){switch(t.type){case"SHOW_INSERTION_POINT":{let{rootClientId:o,index:r,__unstableWithInserter:n,operation:i,nearestSide:s}=t,a={rootClientId:o,index:r,__unstableWithInserter:n,operation:i,nearestSide:s};return(0,yk.default)(e,a)?e:a}case"HIDE_INSERTION_POINT":return null}return e}function Mbe(e={isValid:!0},t){return t.type==="SET_TEMPLATE_VALIDITY"?{...e,isValid:t.isValid}:e}function Dbe(e=bk,t){if(t.type==="UPDATE_SETTINGS"){let o=t.reset?{...bk,...t.settings}:{...e,...t.settings};return Object.defineProperty(o,"__unstableIsPreviewMode",{get(){return(0,B8.default)("__unstableIsPreviewMode",{since:"6.8",alternative:"isPreviewMode"}),this.isPreviewMode}}),o}return e}function Vbe(e=k8,t){switch(t.type){case"INSERT_BLOCKS":case"REPLACE_BLOCKS":{let o=t.blocks.reduce((r,n)=>{let{attributes:i,name:s}=n,a=s,c=(0,_k.select)(ix.store).getActiveBlockVariation(s,i);return c?.name&&(a+="/"+c.name),s==="core/block"&&(a+="/"+i.ref),{...r,[a]:{time:t.time,count:r[a]?r[a].count+1:1}}},e.insertUsage);return{...e,insertUsage:o}}}return e}var Fbe=(e=new Map,t)=>{switch(t.type){case"REPLACE_BLOCKS":{let o=new Set,r=[...t.blocks];for(;r.length;){let i=r.shift();o.add(i.clientId),r.push(...i.innerBlocks)}let n=new Map(e);for(let i of t.clientIds)o.has(i)||n.delete(i);return n}case"REMOVE_BLOCKS":{let o=new Map(e);for(let r of t.clientIds)o.delete(r);return o}case"UPDATE_BLOCK_LIST_SETTINGS":{let r=(typeof t.clientId=="string"?[[t.clientId,t.settings]]:Object.entries(t.clientId)).filter(([i,s])=>s?!(0,yk.default)(e.get(i),s):e.has(i));if(!r.length)return e;let n=new Map(e);for(let[i,s]of r)s?n.set(i,s):n.delete(i);return n}}return e};function zbe(e=null,t){switch(t.type){case"UPDATE_BLOCK":if(!t.updates.attributes)break;return{[t.clientId]:t.updates.attributes};case"UPDATE_BLOCK_ATTRIBUTES":return t.clientIds.reduce((o,r)=>({...o,[r]:t.options?.uniqueByBlock?t.attributes[r]:t.attributes}),{})}return e}function jbe(e,t){switch(t.type){case"TOGGLE_BLOCK_HIGHLIGHT":let{clientId:o,isHighlighted:r}=t;return r?o:e===o?null:e;case"SELECT_BLOCK":if(t.clientId!==e)return null}return e}function Ube(e,t){switch(t.type){case"TOGGLE_BLOCK_SPOTLIGHT":let{clientId:o,hasBlockSpotlight:r}=t;return r?o:e===o?null:e;case"SELECT_BLOCK":return t.clientId!==e?null:e;case"SELECTION_CHANGE":return t.start?.clientId!==e||t.end?.clientId!==e?null:e;case"CLEAR_SELECTED_BLOCK":return null}return e}function Hbe(e=null,t){switch(t.type){case"SET_BLOCK_EXPANDED_IN_LIST_VIEW":return t.clientId;case"SELECT_BLOCK":if(t.clientId!==e)return null}return e}function Gbe(e={},t){switch(t.type){case"INSERT_BLOCKS":case"REPLACE_BLOCKS":if(!t.blocks.length)return e;let o=t.blocks.map(n=>n.clientId),r=t.meta?.source;return{clientIds:o,source:r};case"RESET_BLOCKS":return{}}return e}function Wbe(e,t){if(t.type==="EDIT_CONTENT_ONLY_SECTION")return t.clientId;if(!e)return e;switch(t.type){case"REMOVE_BLOCKS":case"REPLACE_BLOCKS":if(t.clientIds.includes(e))return;break;case"RESET_BLOCKS":if(!T8(t.blocks)[e])return;break}return e}function $be(e=new Map,t){switch(t.type){case"SET_STYLE_OVERRIDE":return new Map(e).set(t.id,t.style);case"DELETE_STYLE_OVERRIDE":{let o=new Map(e);return o.delete(t.id),o}}return e}function Kbe(e=[],t){return t.type==="REGISTER_INSERTER_MEDIA_CATEGORY"?[...e,t.category]:e}function Ybe(e=!1,t){return t.type==="LAST_FOCUS"?t.lastFocus:e}function qbe(e=100,t){switch(t.type){case"SET_ZOOM_LEVEL":return t.zoom;case"RESET_ZOOM_LEVEL":return 100}return e}function Zbe(e=null,t){switch(t.type){case"SET_INSERTION_POINT":return t.value;case"SELECT_BLOCK":return null}return e}function Xbe(e={allOpen:!1,panels:{}},t){switch(t.type){case"SET_OPEN_LIST_VIEW_PANEL":return{allOpen:!1,panels:t.clientId?{[t.clientId]:!0}:{}};case"SET_ALL_LIST_VIEW_PANELS_OPEN":return{allOpen:!0,panels:{}};case"TOGGLE_LIST_VIEW_PANEL":return{allOpen:!1,panels:{...e.panels,[t.clientId]:t.isOpen}};case"REPLACE_BLOCKS":case"REMOVE_BLOCKS":{if(!t.clientIds||t.clientIds.length===0)return e;let o={...e.panels},r=!1;return t.clientIds.forEach(n=>{n in o&&(delete o[n],r=!0)}),r?{...e,panels:o}:e}}return e}function Qbe(e=0,t){return t.type==="INCREMENT_LIST_VIEW_EXPAND_REVISION"?e+1:e}function Jbe(e=!1,t){switch(t.type){case"OPEN_LIST_VIEW_CONTENT_PANEL":return!0;case"CLOSE_LIST_VIEW_CONTENT_PANEL":return!1;case"CLEAR_SELECTED_BLOCK":return!1}return e}function eve(e=null,t){switch(t.type){case"REQUEST_INSPECTOR_TAB":return{tabName:t.tabName,options:t.options};case"CLEAR_REQUESTED_INSPECTOR_TAB":return null}return e}var tve=(0,_k.combineReducers)({blocks:_be,isDragging:wbe,isTyping:xbe,isBlockInterfaceHidden:Sbe,draggedBlocks:Cbe,selection:Ebe,isMultiSelecting:Tbe,isSelectionEnabled:Ibe,initialPosition:Abe,blocksMode:Lbe,blockListSettings:Fbe,insertionPoint:Zbe,insertionCue:Nbe,template:Mbe,settings:Dbe,preferences:Vbe,lastBlockAttributesChange:zbe,lastFocus:Ybe,expandedBlock:Hbe,highlightedBlock:jbe,lastBlockInserted:Gbe,editedContentOnlySection:Wbe,blockVisibility:Bbe,viewportModalClientIds:Pbe,styleOverrides:$be,removalPromptData:Rbe,blockRemovalRules:Obe,registeredInserterMediaCategories:Kbe,zoomLevel:qbe,hasBlockSpotlight:Ube,openedListViewPanels:Xbe,listViewExpandRevision:Qbe,listViewContentPanelOpen:Jbe,requestedInspectorTab:eve});function I8(e,t){if(t===""){let n=e.blocks.tree.get(t);return n?{clientId:"",...n}:void 0}if(!e.blocks.controlledInnerBlocks.has(t))return e.blocks.tree.get(t);let o=e.blocks.tree.get(`controlled||${t}`);return{...e.blocks.tree.get(t),innerBlocks:o?.innerBlocks}}function RA(e,t,o){let r=I8(e,t);if(r&&(o(r),!!r?.innerBlocks?.length))for(let n of r?.innerBlocks)RA(e,n.clientId,o)}function kk(e,t,o){if(!o.length)return;let r=e.blocks.parents.get(t);for(;r!==void 0;){if(o.includes(r))return r;r=e.blocks.parents.get(r)}}function ove(e){return e?.attributes?.metadata?.bindings&&Object.keys(e?.attributes?.metadata?.bindings).length}function IA(e,t=""){let o=e?.zoomLevel<100||e?.zoomLevel==="auto-scaled",r=new Map,n=e.settings?.[pu],i=e.blocks.order.get(n),s=Array.from(e.blocks.blockEditingModes).some(([,g])=>g==="disabled"),a=[],c=[];e.blocks.controlledInnerBlocks.forEach(g=>{let b=e.blocks.byClientId?.get(g);b?.name==="core/template-part"&&a.push(g),b?.name==="core/block"&&c.push(g)});let u=Array.from(e.blockListSettings).flatMap(([g,b])=>b?.templateLock==="contentOnly"?[g]:[]),d=e.settings?.[hu],f=e.settings?.disableContentOnlyForUnsyncedPatterns,m=d||f?[]:Array.from(e.blocks.attributes.keys()).filter(g=>e.blocks.attributes.get(g)?.metadata?.patternName),h=e.settings?.disableContentOnlyForTemplateParts,p=[...u,...m,...d||h?[]:a];return RA(e,t,g=>{let{clientId:b,name:k}=g,v=!!e.editedContentOnlySection,y=!1;if(v&&(y=b===e.editedContentOnlySection||!!kk(e,b,[e.editedContentOnlySection]),!y)){r.set(b,"disabled");return}if(!e.blocks.blockEditingModes.has(b)){if(s){let _,S=e.blocks.parents.get(b);for(;S!==void 0&&(e.blocks.blockEditingModes.has(S)&&(_=e.blocks.blockEditingModes.get(S)),!_);)S=e.blocks.parents.get(S);if(_==="disabled"){r.set(b,"disabled");return}}if(o){if(b===n){r.set(b,"contentOnly");return}if(!i?.length){r.set(b,"disabled");return}if(i.includes(b)){r.set(b,"contentOnly");return}r.set(b,"disabled");return}if(c.length){if(c.includes(b)){if(kk(e,b,c)){r.set(b,"disabled");return}return}let _=kk(e,b,c);if(_){if(kk(e,_,c)){r.set(b,"disabled");return}if(ove(g)){r.set(b,"contentOnly");return}r.set(b,"disabled");return}}if(v&&y){r.set(b,"default");return}p.length&&kk(e,b,p)&&(ube(k)?r.set(b,"contentOnly"):r.set(b,"disabled"))}}),r}function bu({prevState:e,nextState:t,addedBlocks:o,removedClientIds:r}){let n=e.derivedBlockEditingModes,i;return r?.forEach(s=>{RA(e,s,a=>{n.has(a.clientId)&&(i||(i=new Map(n)),i.delete(a.clientId))})}),o?.forEach(s=>{let a=IA(t,s.clientId);a.size&&(i?i=new Map([...i?.size?i:[],...a]):i=new Map([...n?.size?n:[],...a]))}),i}function rve(e){return(t,o)=>{let r=e(t,o);if(o.type!=="SET_EDITOR_MODE"&&r===t)return t;switch(o.type){case"REMOVE_BLOCKS":{let n=bu({prevState:t,nextState:r,removedClientIds:o.clientIds});if(n)return{...r,derivedBlockEditingModes:n??t.derivedBlockEditingModes};break}case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":{let n=bu({prevState:t,nextState:r,addedBlocks:o.blocks});if(n)return{...r,derivedBlockEditingModes:n??t.derivedBlockEditingModes};break}case"UPDATE_BLOCK_ATTRIBUTES":{if(r.settings?.disableContentOnlyForUnsyncedPatterns)break;let i=[],s=[];for(let c of o?.clientIds){let u=o.options?.uniqueByBlock?o.attributes[c]:o.attributes;if(!u)break;u.metadata?.patternName&&!t.blocks.attributes.get(c)?.metadata?.patternName?i.push(r.blocks.tree.get(c)):u.metadata&&!u.metadata?.patternName&&t.blocks.attributes.get(c)?.metadata?.patternName&&s.push(c)}if(!i?.length&&!s?.length)break;let a=bu({prevState:t,nextState:r,addedBlocks:i,removedClientIds:s});if(a)return{...r,derivedBlockEditingModes:a??t.derivedBlockEditingModes};break}case"UPDATE_BLOCK_LIST_SETTINGS":{let n=[],i=[],s=typeof o.clientId=="string"?{[o.clientId]:o.settings}:o.clientId;for(let c in s){let u=t.blockListSettings.get(c)?.templateLock!=="contentOnly"&&r.blockListSettings.get(c)?.templateLock==="contentOnly",d=t.blockListSettings.get(c)?.templateLock==="contentOnly"&&r.blockListSettings.get(c)?.templateLock!=="contentOnly";u?n.push(r.blocks.tree.get(c)):d&&i.push(c)}if(!n.length&&!i.length)break;let a=bu({prevState:t,nextState:r,addedBlocks:n,removedClientIds:i});if(a)return{...r,derivedBlockEditingModes:a??t.derivedBlockEditingModes};break}case"SET_BLOCK_EDITING_MODE":case"UNSET_BLOCK_EDITING_MODE":case"SET_HAS_CONTROLLED_INNER_BLOCKS":{let n=I8(r,o.clientId);if(!n)break;let i=bu({prevState:t,nextState:r,removedClientIds:[o.clientId],addedBlocks:[n]});if(i)return{...r,derivedBlockEditingModes:i??t.derivedBlockEditingModes};break}case"REPLACE_BLOCKS":{let n=bu({prevState:t,nextState:r,addedBlocks:o.blocks,removedClientIds:o.clientIds});if(n)return{...r,derivedBlockEditingModes:n??t.derivedBlockEditingModes};break}case"REPLACE_INNER_BLOCKS":{let n=t.blocks.order.get(o.rootClientId),i=bu({prevState:t,nextState:r,addedBlocks:o.blocks,removedClientIds:n});if(i)return{...r,derivedBlockEditingModes:i??t.derivedBlockEditingModes};break}case"MOVE_BLOCKS_TO_POSITION":{let n=o.clientIds.map(s=>r.blocks.byClientId.get(s)),i=bu({prevState:t,nextState:r,addedBlocks:n,removedClientIds:o.clientIds});if(i)return{...r,derivedBlockEditingModes:i??t.derivedBlockEditingModes};break}case"UPDATE_SETTINGS":{if(t?.settings?.[pu]!==r?.settings?.[pu]||!!t?.settings?.disableContentOnlyForUnsyncedPatterns!=!!r?.settings?.disableContentOnlyForUnsyncedPatterns||!!t?.settings?.[hu]!=!!r?.settings?.[hu]||!!t?.settings?.disableContentOnlyForTemplateParts!=!!r?.settings?.disableContentOnlyForTemplateParts)return{...r,derivedBlockEditingModes:IA(r)};break}case"RESET_BLOCKS":case"EDIT_CONTENT_ONLY_SECTION":case"SET_EDITOR_MODE":case"RESET_ZOOM_LEVEL":case"SET_ZOOM_LEVEL":return{...r,derivedBlockEditingModes:IA(r)}}return r.derivedBlockEditingModes=t?.derivedBlockEditingModes??new Map,r}}function nve(e){return(t,o)=>{let r=e(t,o);return t?(r.automaticChangeStatus=t.automaticChangeStatus,o.type==="MARK_AUTOMATIC_CHANGE"?{...r,automaticChangeStatus:"pending"}:o.type==="MARK_AUTOMATIC_CHANGE_FINAL"&&t.automaticChangeStatus==="pending"?{...r,automaticChangeStatus:"final"}:r.blocks===t.blocks&&r.selection===t.selection||r.automaticChangeStatus!=="final"&&r.selection!==t.selection?r:{...r,automaticChangeStatus:void 0}):r}}var P8=(0,PA.pipe)(rve,nve)(tve);var o5={};wa(o5,{__experimentalGetActiveBlockIdByBlockNames:()=>rye,__experimentalGetAllowedBlocks:()=>jke,__experimentalGetAllowedPatterns:()=>Wke,__experimentalGetBlockListSettingsForBlocks:()=>Zke,__experimentalGetDirectInsertBlock:()=>Uke,__experimentalGetGlobalBlocksByName:()=>Qve,__experimentalGetLastBlockAttributeChanges:()=>Jke,__experimentalGetParsedPattern:()=>Hke,__experimentalGetPatternTransformItems:()=>Yke,__experimentalGetPatternsByBlockTypes:()=>Kke,__experimentalGetReusableBlockTitle:()=>Xke,__unstableGetBlockWithoutInnerBlocks:()=>qve,__unstableGetClientIdWithClientIdsTree:()=>J8,__unstableGetClientIdsTree:()=>e9,__unstableGetContentLockingParent:()=>dye,__unstableGetSelectedBlocksWithPartialSelection:()=>yke,__unstableGetTemporarilyEditingAsBlocks:()=>fye,__unstableGetVisibleBlocks:()=>aye,__unstableHasActiveBlockOverlayActive:()=>h9,__unstableIsFullySelected:()=>gke,__unstableIsLastBlockChangeIgnored:()=>Qke,__unstableIsSelectionCollapsed:()=>bke,__unstableIsSelectionMergeable:()=>kke,__unstableIsWithinBlockOverlay:()=>lye,__unstableSelectionHasUnmergeableBlock:()=>vke,areInnerBlocksControlled:()=>uC,canEditBlock:()=>f9,canInsertBlockType:()=>dm,canInsertBlocks:()=>Lke,canLockBlockType:()=>Mke,canMoveBlock:()=>d9,canMoveBlocks:()=>Nke,canRemoveBlock:()=>QM,canRemoveBlocks:()=>u9,didAutomaticChange:()=>tye,getAdjacentBlockClientId:()=>YM,getAllowedBlocks:()=>WM,getBlock:()=>Nl,getBlockAttributes:()=>Vi,getBlockCount:()=>eke,getBlockEditingMode:()=>Fi,getBlockHierarchyRootClientId:()=>ske,getBlockIndex:()=>i9,getBlockInsertionPoint:()=>Pke,getBlockListSettings:()=>cC,getBlockMode:()=>Cke,getBlockName:()=>kt,getBlockNamesByClientId:()=>Jve,getBlockOrder:()=>Ar,getBlockParents:()=>Os,getBlockParentsByBlockName:()=>KM,getBlockRootClientId:()=>Fo,getBlockSelectionEnd:()=>oke,getBlockSelectionStart:()=>tke,getBlockTransformItems:()=>Fke,getBlocks:()=>Zve,getBlocksByClientId:()=>lC,getBlocksByName:()=>o9,getClientIdsOfDescendants:()=>t9,getClientIdsWithDescendants:()=>_h,getDirectInsertBlock:()=>p9,getDraggedBlockClientIds:()=>Eke,getFirstMultiSelectedBlockClientId:()=>qM,getGlobalBlockCount:()=>Xve,getHoveredBlockClientId:()=>sye,getInserterItems:()=>Vke,getLastMultiSelectedBlockClientId:()=>r9,getLowestCommonAncestorWithSelectedBlock:()=>ake,getMultiSelectedBlockClientIds:()=>Pu,getMultiSelectedBlocks:()=>dke,getMultiSelectedBlocksEndClientId:()=>hke,getMultiSelectedBlocksStartClientId:()=>pke,getNextBlockClientId:()=>cke,getPatternsByBlockTypes:()=>$ke,getPreviousBlockClientId:()=>lke,getSelectedBlock:()=>ike,getSelectedBlockClientId:()=>xh,getSelectedBlockClientIds:()=>wh,getSelectedBlockCount:()=>rke,getSelectedBlocksInitialCaretPosition:()=>uke,getSelectionEnd:()=>ry,getSelectionStart:()=>oy,getSettings:()=>Cu,getTemplate:()=>Ake,getTemplateLock:()=>Ba,hasBlockMovingClientId:()=>eye,hasDraggedInnerBlock:()=>l9,hasInserterItems:()=>zke,hasMultiSelection:()=>Ske,hasSelectedBlock:()=>nke,hasSelectedInnerBlock:()=>a9,isAncestorBeingDragged:()=>Tke,isAncestorMultiSelected:()=>mke,isBlockBeingDragged:()=>ZM,isBlockHighlighted:()=>oye,isBlockInsertionPointVisible:()=>Rke,isBlockMultiSelected:()=>n9,isBlockSelected:()=>s9,isBlockValid:()=>Yve,isBlockVisible:()=>iye,isBlockWithinSelection:()=>_ke,isCaretWithinFormattedText:()=>Ike,isDraggingBlocks:()=>c9,isFirstMultiSelectedBlock:()=>fke,isGroupable:()=>uye,isLastBlockChangePersistent:()=>qke,isMultiSelecting:()=>xke,isSelectionEnabled:()=>wke,isTyping:()=>Bke,isUngroupable:()=>cye,isValidTemplate:()=>Oke,wasBlockJustInserted:()=>nye});var Ne=l(K(),1),Z8=l(R(),1),X8=l(vt(),1);var sx=l(R(),1),Ie=(0,sx.forwardRef)(({icon:e,size:t=24,...o},r)=>(0,sx.cloneElement)(e,{width:t,height:t,...o,ref:r}));var ax=l(Z(),1),OA=l(w(),1),Yf=(0,OA.jsx)(ax.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,OA.jsx)(ax.Path,{d:"M7.5 5.5h9V4h-9v1.5Zm-3.5 7h16V11H4v1.5Zm3.5 7h9V18h-9v1.5Z"})});var lx=l(Z(),1),AA=l(w(),1),LA=(0,AA.jsx)(lx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,AA.jsx)(lx.Path,{d:"M4 12.8h16v-1.5H4v1.5zm0 7h12.4v-1.5H4v1.5zM4 4.3v1.5h16V4.3H4z"})});var cx=l(Z(),1),NA=l(w(),1),vu=(0,NA.jsx)(cx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,NA.jsx)(cx.Path,{d:"M13 5.5H4V4h9v1.5Zm7 7H4V11h16v1.5Zm-7 7H4V18h9v1.5Z"})});var ux=l(Z(),1),MA=l(w(),1),qf=(0,MA.jsx)(ux.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,MA.jsx)(ux.Path,{d:"M19 5.5H5V4h14v1.5ZM19 20H5v-1.5h14V20ZM5 9h14v6H5V9Z"})});var dx=l(Z(),1),DA=l(w(),1),ku=(0,DA.jsx)(dx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,DA.jsx)(dx.Path,{d:"M11.111 5.5H20V4h-8.889v1.5ZM4 12.5h16V11H4v1.5Zm7.111 7H20V18h-8.889v1.5Z"})});var fx=l(Z(),1),VA=l(w(),1),FA=(0,VA.jsx)(fx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,VA.jsx)(fx.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"})});var mx=l(Z(),1),zA=l(w(),1),Sk=(0,zA.jsx)(mx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,zA.jsx)(mx.Path,{d:"M20 11.2H6.8l3.7-3.7-1-1L3.9 12l5.6 5.5 1-1-3.7-3.7H20z"})});var px=l(Z(),1),jA=l(w(),1),xk=(0,jA.jsx)(px.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,jA.jsx)(px.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 hx=l(Z(),1),UA=l(w(),1),HA=(0,UA.jsx)(hx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,UA.jsx)(hx.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"})});var gx=l(Z(),1),GA=l(w(),1),WA=(0,GA.jsx)(gx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,GA.jsx)(gx.Path,{d:"M17.7 4.3c-1.2 0-2.8 0-3.8 1-.6.6-.9 1.5-.9 2.6V14c-.6-.6-1.5-1-2.5-1C8.6 13 7 14.6 7 16.5S8.6 20 10.5 20c1.5 0 2.8-1 3.3-2.3.5-.8.7-1.8.7-2.5V7.9c0-.7.2-1.2.5-1.6.6-.6 1.8-.6 2.8-.6h.3V4.3h-.4z"})});var bx=l(Z(),1),$A=l(w(),1),wk=(0,$A.jsx)(bx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$A.jsx)(bx.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 vx=l(Z(),1),KA=l(w(),1),YA=(0,KA.jsx)(vx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,KA.jsx)(vx.Path,{fillRule:"evenodd",clipRule:"evenodd",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"})});var kx=l(Z(),1),qA=l(w(),1),Li=(0,qA.jsx)(kx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,qA.jsx)(kx.Path,{d:"M16.5 7.5 10 13.9l-2.5-2.4-1 1 3.5 3.6 7.5-7.6z"})});var yx=l(Z(),1),ZA=l(w(),1),vr=(0,ZA.jsx)(yx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,ZA.jsx)(yx.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"})});var _x=l(Z(),1),XA=l(w(),1),Ck=(0,XA.jsx)(_x.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,XA.jsx)(_x.Path,{d:"m13.1 16-3.4-4 3.4-4 1.1 1-2.6 3 2.6 3-1.1 1z"})});var Sx=l(Z(),1),QA=l(w(),1),Yr=(0,QA.jsx)(Sx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,QA.jsx)(Sx.Path,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"})});var xx=l(Z(),1),JA=l(w(),1),yu=(0,JA.jsx)(xx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,JA.jsx)(xx.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 wx=l(Z(),1),eL=l(w(),1),Ko=(0,eL.jsx)(wx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,eL.jsx)(wx.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"})});var Cx=l(Z(),1),tL=l(w(),1),Zf=(0,tL.jsx)(Cx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,tL.jsx)(Cx.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"})});var Bx=l(Z(),1),oL=l(w(),1),Xf=(0,oL.jsx)(Bx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,oL.jsx)(Bx.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"})});var Ex=l(Z(),1),rL=l(w(),1),nL=(0,rL.jsx)(Ex.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,rL.jsx)(Ex.Path,{fillRule:"evenodd",clipRule:"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"})});var Tx=l(Z(),1),iL=l(w(),1),sL=(0,iL.jsx)(Tx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,iL.jsx)(Tx.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M5.625 5.5h9.75c.069 0 .125.056.125.125v9.75a.125.125 0 0 1-.125.125h-9.75a.125.125 0 0 1-.125-.125v-9.75c0-.069.056-.125.125-.125ZM4 5.625C4 4.728 4.728 4 5.625 4h9.75C16.273 4 17 4.728 17 5.625v9.75c0 .898-.727 1.625-1.625 1.625h-9.75A1.625 1.625 0 0 1 4 15.375v-9.75Zm14.5 11.656v-9H20v9C20 18.8 18.77 20 17.251 20H6.25v-1.5h11.001c.69 0 1.249-.528 1.249-1.219Z"})});var Ix=l(Z(),1),aL=l(w(),1),Qf=(0,aL.jsx)(Ix.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,aL.jsx)(Ix.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M5 4.5h11a.5.5 0 0 1 .5.5v11a.5.5 0 0 1-.5.5H5a.5.5 0 0 1-.5-.5V5a.5.5 0 0 1 .5-.5ZM3 5a2 2 0 0 1 2-2h11a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5Zm17 3v10.75c0 .69-.56 1.25-1.25 1.25H6v1.5h12.75a2.75 2.75 0 0 0 2.75-2.75V8H20Z"})});var Px=l(Z(),1),lL=l(w(),1),cL=(0,lL.jsx)(Px.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,lL.jsx)(Px.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M5.75 6A.25.25 0 0 1 6 5.75h3v-1.5H6A1.75 1.75 0 0 0 4.25 6v3h1.5V6ZM18 18.25h-3v1.5h3A1.75 1.75 0 0 0 19.75 18v-3h-1.5v3a.25.25 0 0 1-.25.25ZM18.25 9V6a.25.25 0 0 0-.25-.25h-3v-1.5h3c.966 0 1.75.784 1.75 1.75v3h-1.5Zm-12.5 9v-3h-1.5v3c0 .966.784 1.75 1.75 1.75h3v-1.5H6a.25.25 0 0 1-.25-.25Z"})});var Jf=l(Z(),1),uh=l(w(),1),uL=(0,uh.jsxs)(Jf.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,uh.jsx)(Jf.G,{opacity:".25",children:(0,uh.jsx)(Jf.Path,{d:"M5.75 6A.25.25 0 0 1 6 5.75h3v-1.5H6A1.75 1.75 0 0 0 4.25 6v3h1.5V6ZM18 18.25h-3v1.5h3A1.75 1.75 0 0 0 19.75 18v-3h-1.5v3a.25.25 0 0 1-.25.25ZM18.25 9V6a.25.25 0 0 0-.25-.25h-3v-1.5h3c.966 0 1.75.784 1.75 1.75v3h-1.5ZM5.75 18v-3h-1.5v3c0 .966.784 1.75 1.75 1.75h3v-1.5H6a.25.25 0 0 1-.25-.25Z"})}),(0,uh.jsx)(Jf.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M5.75 15v3c0 .138.112.25.25.25h3v1.5H6A1.75 1.75 0 0 1 4.25 18v-3h1.5Z"})]});var em=l(Z(),1),dh=l(w(),1),dL=(0,dh.jsxs)(em.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,dh.jsx)(em.G,{opacity:".25",children:(0,dh.jsx)(em.Path,{d:"M5.75 6A.25.25 0 0 1 6 5.75h3v-1.5H6A1.75 1.75 0 0 0 4.25 6v3h1.5V6ZM18 18.25h-3v1.5h3A1.75 1.75 0 0 0 19.75 18v-3h-1.5v3a.25.25 0 0 1-.25.25ZM18.25 9V6a.25.25 0 0 0-.25-.25h-3v-1.5h3c.966 0 1.75.784 1.75 1.75v3h-1.5ZM5.75 18v-3h-1.5v3c0 .966.784 1.75 1.75 1.75h3v-1.5H6a.25.25 0 0 1-.25-.25Z"})}),(0,dh.jsx)(em.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M15 18.25h3a.25.25 0 0 0 .25-.25v-3h1.5v3A1.75 1.75 0 0 1 18 19.75h-3v-1.5Z"})]});var tm=l(Z(),1),fh=l(w(),1),fL=(0,fh.jsxs)(tm.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,fh.jsx)(tm.G,{opacity:".25",children:(0,fh.jsx)(tm.Path,{d:"M5.75 6A.25.25 0 0 1 6 5.75h3v-1.5H6A1.75 1.75 0 0 0 4.25 6v3h1.5V6ZM18 18.25h-3v1.5h3A1.75 1.75 0 0 0 19.75 18v-3h-1.5v3a.25.25 0 0 1-.25.25ZM18.25 9V6a.25.25 0 0 0-.25-.25h-3v-1.5h3c.966 0 1.75.784 1.75 1.75v3h-1.5ZM5.75 18v-3h-1.5v3c0 .966.784 1.75 1.75 1.75h3v-1.5H6a.25.25 0 0 1-.25-.25Z"})}),(0,fh.jsx)(tm.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M6 5.75a.25.25 0 0 0-.25.25v3h-1.5V6c0-.966.784-1.75 1.75-1.75h3v1.5H6Z"})]});var om=l(Z(),1),mh=l(w(),1),mL=(0,mh.jsxs)(om.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,mh.jsx)(om.G,{opacity:".25",children:(0,mh.jsx)(om.Path,{d:"M5.75 6A.25.25 0 0 1 6 5.75h3v-1.5H6A1.75 1.75 0 0 0 4.25 6v3h1.5V6ZM18 18.25h-3v1.5h3A1.75 1.75 0 0 0 19.75 18v-3h-1.5v3a.25.25 0 0 1-.25.25ZM18.25 9V6a.25.25 0 0 0-.25-.25h-3v-1.5h3c.966 0 1.75.784 1.75 1.75v3h-1.5ZM5.75 18v-3h-1.5v3c0 .966.784 1.75 1.75 1.75h3v-1.5H6a.25.25 0 0 1-.25-.25Z"})}),(0,mh.jsx)(om.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M18.25 9V6a.25.25 0 0 0-.25-.25h-3v-1.5h3c.966 0 1.75.784 1.75 1.75v3h-1.5Z"})]});var Rx=l(Z(),1),pL=l(w(),1),hL=(0,pL.jsx)(Rx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,pL.jsx)(Rx.Path,{d:"M20.5 16h-.7V8c0-1.1-.9-2-2-2H6.2c-1.1 0-2 .9-2 2v8h-.7c-.8 0-1.5.7-1.5 1.5h20c0-.8-.7-1.5-1.5-1.5zM5.7 8c0-.3.2-.5.5-.5h11.6c.3 0 .5.2.5.5v7.6H5.7V8z"})});var Ox=l(Z(),1),gL=l(w(),1),Bk=(0,gL.jsx)(Ox.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,gL.jsx)(Ox.Path,{d:"M8 7h2V5H8v2zm0 6h2v-2H8v2zm0 6h2v-2H8v2zm6-14v2h2V5h-2zm0 8h2v-2h-2v2zm0 6h2v-2h-2v2z"})});var Ax=l(Z(),1),bL=l(w(),1),vL=(0,bL.jsx)(Ax.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,bL.jsx)(Ax.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M3 7c0-1.1.9-2 2-2h14a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V7Zm2-.5h14c.3 0 .5.2.5.5v1L12 13.5 4.5 7.9V7c0-.3.2-.5.5-.5Zm-.5 3.3V17c0 .3.2.5.5.5h14c.3 0 .5-.2.5-.5V9.8L12 15.4 4.5 9.8Z"})});var Lx=l(Z(),1),kL=l(w(),1),rm=(0,kL.jsx)(Lx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,kL.jsx)(Lx.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12.218 5.377a.25.25 0 0 0-.436 0l-7.29 12.96a.25.25 0 0 0 .218.373h14.58a.25.25 0 0 0 .218-.372l-7.29-12.96Zm-1.743-.735c.669-1.19 2.381-1.19 3.05 0l7.29 12.96a1.75 1.75 0 0 1-1.525 2.608H4.71a1.75 1.75 0 0 1-1.525-2.608l7.29-12.96ZM12.75 17.46h-1.5v-1.5h1.5v1.5Zm-1.5-3h1.5v-5h-1.5v5Z"})});var Nx=l(Z(),1),yL=l(w(),1),_L=(0,yL.jsx)(Nx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,yL.jsx)(Nx.Path,{d:"M19.5 4.5h-7V6h4.44l-5.97 5.97 1.06 1.06L18 7.06v4.44h1.5v-7Zm-13 1a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-3H17v3a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h3V5.5h-3Z"})});var Mx=l(Z(),1),SL=l(w(),1),xL=(0,SL.jsx)(Mx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,SL.jsx)(Mx.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12.848 8a1 1 0 0 1-.914-.594l-.723-1.63a.5.5 0 0 0-.447-.276H5a.5.5 0 0 0-.5.5v11.5a.5.5 0 0 0 .5.5h14a.5.5 0 0 0 .5-.5v-9A.5.5 0 0 0 19 8h-6.152Zm.612-1.5a.5.5 0 0 1-.462-.31l-.445-1.084A2 2 0 0 0 10.763 4H5a2 2 0 0 0-2 2v11.5a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-9a2 2 0 0 0-2-2h-5.54Z"})});var Dx=l(Z(),1),wL=l(w(),1),CL=(0,wL.jsx)(Dx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,wL.jsx)(Dx.Path,{d:"M12 4 4 19h16L12 4zm0 3.2 5.5 10.3H12V7.2z"})});var Vx=l(Z(),1),BL=l(w(),1),EL=(0,BL.jsx)(Vx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,BL.jsx)(Vx.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"})});var Fx=l(Z(),1),TL=l(w(),1),IL=(0,TL.jsx)(Fx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,TL.jsx)(Fx.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 zx=l(Z(),1),PL=l(w(),1),RL=(0,PL.jsx)(zx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,PL.jsx)(zx.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"})});var jx=l(Z(),1),OL=l(w(),1),AL=(0,OL.jsx)(jx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,OL.jsx)(jx.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 Ux=l(Z(),1),LL=l(w(),1),NL=(0,LL.jsx)(Ux.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,LL.jsx)(Ux.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 Hx=l(Z(),1),ML=l(w(),1),DL=(0,ML.jsx)(Hx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,ML.jsx)(Hx.Path,{d:"M12.75 19.45 15 17.5l1 1.1-4 3.4-4-3.4 1-1.1 2.25 1.95V14.5h1.5v4.95ZM19 12.75H5v-1.5h14v1.5ZM16 5.4l-1 1.1-2.25-1.95V9.5h-1.5V4.55L9 6.5 8 5.4 12 2l4 3.4Z"})});var Gx=l(Z(),1),VL=l(w(),1),Wx=(0,VL.jsx)(Gx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,VL.jsx)(Gx.Path,{d:"M6 4a2 2 0 0 0-2 2v3h1.5V6a.5.5 0 0 1 .5-.5h3V4H6Zm3 14.5H6a.5.5 0 0 1-.5-.5v-3H4v3a2 2 0 0 0 2 2h3v-1.5Zm6 1.5v-1.5h3a.5.5 0 0 0 .5-.5v-3H20v3a2 2 0 0 1-2 2h-3Zm3-16a2 2 0 0 1 2 2v3h-1.5V6a.5.5 0 0 0-.5-.5h-3V4h3Z"})});var $x=l(Z(),1),FL=l(w(),1),Ek=(0,FL.jsx)($x.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,FL.jsx)($x.Path,{d:"M12 4c-4.4 0-8 3.6-8 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8Zm6.5 8c0 .6 0 1.2-.2 1.8h-2.7c0-.6.2-1.1.2-1.8s0-1.2-.2-1.8h2.7c.2.6.2 1.1.2 1.8Zm-.9-3.2h-2.4c-.3-.9-.7-1.8-1.1-2.4-.1-.2-.2-.4-.3-.5 1.6.5 3 1.6 3.8 3ZM12.8 17c-.3.5-.6 1-.8 1.3-.2-.3-.5-.8-.8-1.3-.3-.5-.6-1.1-.8-1.7h3.3c-.2.6-.5 1.2-.8 1.7Zm-2.9-3.2c-.1-.6-.2-1.1-.2-1.8s0-1.2.2-1.8H14c.1.6.2 1.1.2 1.8s0 1.2-.2 1.8H9.9ZM11.2 7c.3-.5.6-1 .8-1.3.2.3.5.8.8 1.3.3.5.6 1.1.8 1.7h-3.3c.2-.6.5-1.2.8-1.7Zm-1-1.2c-.1.2-.2.3-.3.5-.4.7-.8 1.5-1.1 2.4H6.4c.8-1.4 2.2-2.5 3.8-3Zm-1.8 8H5.7c-.2-.6-.2-1.1-.2-1.8s0-1.2.2-1.8h2.7c0 .6-.2 1.1-.2 1.8s0 1.2.2 1.8Zm-2 1.4h2.4c.3.9.7 1.8 1.1 2.4.1.2.2.4.3.5-1.6-.5-3-1.6-3.8-3Zm7.4 3c.1-.2.2-.3.3-.5.4-.7.8-1.5 1.1-2.4h2.4c-.8 1.4-2.2 2.5-3.8 3Z"})});var Kx=l(Z(),1),zL=l(w(),1),Tk=(0,zL.jsx)(Kx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,zL.jsx)(Kx.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"m3 5c0-1.10457.89543-2 2-2h13.5c1.1046 0 2 .89543 2 2v13.5c0 1.1046-.8954 2-2 2h-13.5c-1.10457 0-2-.8954-2-2zm2-.5h6v6.5h-6.5v-6c0-.27614.22386-.5.5-.5zm-.5 8v6c0 .2761.22386.5.5.5h6v-6.5zm8 0v6.5h6c.2761 0 .5-.2239.5-.5v-6zm0-8v6.5h6.5v-6c0-.27614-.2239-.5-.5-.5z"})});var Yx=l(Z(),1),jL=l(w(),1),Ik=(0,jL.jsx)(Yx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,jL.jsx)(Yx.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 qx=l(Z(),1),UL=l(w(),1),HL=(0,UL.jsx)(qx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,UL.jsx)(qx.Path,{d:"M17.6 7c-.6.9-1.5 1.7-2.6 2v1h2v7h2V7h-1.4zM11 11H7V7H5v10h2v-4h4v4h2V7h-2v4z"})});var Zx=l(Z(),1),GL=l(w(),1),WL=(0,GL.jsx)(Zx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,GL.jsx)(Zx.Path,{d:"M9 11.1H5v-4H3v10h2v-4h4v4h2v-10H9v4zm8 4c.5-.4.6-.6 1.1-1.1.4-.4.8-.8 1.2-1.3.3-.4.6-.8.9-1.3.2-.4.3-.8.3-1.3 0-.4-.1-.9-.3-1.3-.2-.4-.4-.7-.8-1-.3-.3-.7-.5-1.2-.6-.5-.2-1-.2-1.5-.2-.4 0-.7 0-1.1.1-.3.1-.7.2-1 .3-.3.1-.6.3-.9.5-.3.2-.6.4-.8.7l1.2 1.2c.3-.3.6-.5 1-.7.4-.2.7-.3 1.2-.3s.9.1 1.3.4c.3.3.5.7.5 1.1 0 .4-.1.8-.4 1.1-.3.5-.6.9-1 1.2-.4.4-1 .9-1.6 1.4-.6.5-1.4 1.1-2.2 1.6v1.5h8v-2H17z"})});var Xx=l(Z(),1),$L=l(w(),1),KL=(0,$L.jsx)(Xx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$L.jsx)(Xx.Path,{d:"M9 11H5V7H3v10h2v-4h4v4h2V7H9v4zm11.3 1.7c-.4-.4-1-.7-1.6-.8v-.1c.6-.2 1.1-.5 1.5-.9.3-.4.5-.8.5-1.3 0-.4-.1-.8-.3-1.1-.2-.3-.5-.6-.8-.8-.4-.2-.8-.4-1.2-.5-.6-.1-1.1-.2-1.6-.2-.6 0-1.3.1-1.8.3s-1.1.5-1.6.9l1.2 1.4c.4-.2.7-.4 1.1-.6.3-.2.7-.3 1.1-.3.4 0 .8.1 1.1.3.3.2.4.5.4.8 0 .4-.2.7-.6.9-.7.3-1.5.5-2.2.4v1.6c.5 0 1 0 1.5.1.3.1.7.2 1 .3.2.1.4.2.5.4s.1.4.1.6c0 .3-.2.7-.5.8-.4.2-.9.3-1.4.3s-1-.1-1.4-.3c-.4-.2-.8-.4-1.2-.7L13 15.6c.5.4 1 .8 1.6 1 .7.3 1.5.4 2.3.4.6 0 1.1-.1 1.6-.2.4-.1.9-.2 1.3-.5.4-.2.7-.5.9-.9.2-.4.3-.8.3-1.2 0-.6-.3-1.1-.7-1.5z"})});var Qx=l(Z(),1),YL=l(w(),1),qL=(0,YL.jsx)(Qx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,YL.jsx)(Qx.Path,{d:"M20 13V7h-3l-4 6v2h5v2h2v-2h1v-2h-1zm-2 0h-2.8L18 9v4zm-9-2H5V7H3v10h2v-4h4v4h2V7H9v4z"})});var Jx=l(Z(),1),ZL=l(w(),1),XL=(0,ZL.jsx)(Jx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,ZL.jsx)(Jx.Path,{d:"M9 11H5V7H3v10h2v-4h4v4h2V7H9v4zm11.7 1.2c-.2-.3-.5-.7-.8-.9-.3-.3-.7-.5-1.1-.6-.5-.1-.9-.2-1.4-.2-.2 0-.5.1-.7.1-.2.1-.5.1-.7.2l.1-1.9h4.3V7H14l-.3 5 1 .6.5-.2.4-.1c.1-.1.3-.1.4-.1h.5c.5 0 1 .1 1.4.4.4.2.6.7.6 1.1 0 .4-.2.8-.6 1.1-.4.3-.9.4-1.4.4-.4 0-.9-.1-1.3-.3-.4-.2-.7-.4-1.1-.7 0 0-1.1 1.4-1 1.5.5.4 1 .8 1.6 1 .7.3 1.5.4 2.3.4.5 0 1-.1 1.5-.3s.9-.4 1.3-.7c.4-.3.7-.7.9-1.1s.3-.9.3-1.4-.1-1-.3-1.4z"})});var ew=l(Z(),1),QL=l(w(),1),JL=(0,QL.jsx)(ew.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,QL.jsx)(ew.Path,{d:"M20.7 12.4c-.2-.3-.4-.6-.7-.9s-.6-.5-1-.6c-.4-.2-.8-.2-1.2-.2-.5 0-.9.1-1.3.3s-.8.5-1.2.8c0-.5 0-.9.2-1.4l.6-.9c.2-.2.5-.4.8-.5.6-.2 1.3-.2 1.9 0 .3.1.6.3.8.5 0 0 1.3-1.3 1.3-1.4-.4-.3-.9-.6-1.4-.8-.6-.2-1.3-.3-2-.3-.6 0-1.1.1-1.7.4-.5.2-1 .5-1.4.9-.4.4-.8 1-1 1.6-.3.7-.4 1.5-.4 2.3s.1 1.5.3 2.1c.2.6.6 1.1 1 1.5.4.4.9.7 1.4.9 1 .3 2 .3 3 0 .4-.1.8-.3 1.2-.6.3-.3.6-.6.8-1 .2-.5.3-.9.3-1.4s-.1-.9-.3-1.3zm-2 2.1c-.1.2-.3.4-.4.5-.1.1-.3.2-.5.2-.2.1-.4.1-.6.1-.2.1-.5 0-.7-.1-.2 0-.3-.2-.5-.3-.1-.2-.3-.4-.4-.6-.2-.3-.3-.7-.3-1 .3-.3.6-.5 1-.7.3-.1.7-.2 1-.2.4 0 .8.1 1.1.3.3.3.4.7.4 1.1 0 .2 0 .5-.1.7zM9 11H5V7H3v10h2v-4h4v4h2V7H9v4z"})});var tw=l(Z(),1),eN=l(w(),1),tN=(0,eN.jsx)(tw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,eN.jsx)(tw.Path,{d:"M12 4L4 7.9V20h16V7.9L12 4zm6.5 14.5H14V13h-4v5.5H5.5V8.8L12 5.7l6.5 3.1v9.7z"})});var ow=l(Z(),1),oN=l(w(),1),Pk=(0,oN.jsx)(ow.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,oN.jsx)(ow.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-2zM5 4.5h14c.3 0 .5.2.5.5v8.4l-3-2.9c-.3-.3-.8-.3-1 0L11.9 14 9 12c-.3-.2-.6-.2-.8 0l-3.6 2.6V5c-.1-.3.1-.5.4-.5zm14 15H5c-.3 0-.5-.2-.5-.5v-2.4l4.1-3 3 1.9c.3.2.7.2.9-.1L16 12l3.5 3.4V19c0 .3-.2.5-.5.5z"})});var rw=l(Z(),1),rN=l(w(),1),nN=(0,rN.jsx)(rw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,rN.jsx)(rw.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M5.5 12a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0ZM12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm.75 4v1.5h-1.5V8h1.5Zm0 8v-5h-1.5v5h1.5Z"})});var nw=l(Z(),1),iN=l(w(),1),sN=(0,iN.jsx)(nw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,iN.jsx)(nw.Path,{d:"M15 4H9v11h6V4zM4 18.5V20h16v-1.5H4z"})});var iw=l(Z(),1),aN=l(w(),1),lN=(0,aN.jsx)(iw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,aN.jsx)(iw.Path,{d:"M20 11h-5V4H9v7H4v1.5h5V20h6v-7.5h5z"})});var sw=l(Z(),1),cN=l(w(),1),_u=(0,cN.jsx)(sw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,cN.jsx)(sw.Path,{d:"M12.5 15v5H11v-5H4V9h7V4h1.5v5h7v6h-7Z"})});var aw=l(Z(),1),uN=l(w(),1),Su=(0,uN.jsx)(aw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,uN.jsx)(aw.Path,{d:"M9 9v6h11V9H9zM4 20h1.5V4H4v16z"})});var lw=l(Z(),1),dN=l(w(),1),xu=(0,dN.jsx)(lw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,dN.jsx)(lw.Path,{d:"M4 15h11V9H4v6zM18.5 4v16H20V4h-1.5z"})});var cw=l(Z(),1),fN=l(w(),1),mN=(0,fN.jsx)(cw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,fN.jsx)(cw.Path,{d:"M7 4H17V8L7 8V4ZM7 16L17 16V20L7 20V16ZM20 11.25H4V12.75H20V11.25Z"})});var uw=l(Z(),1),pN=l(w(),1),ph=(0,pN.jsx)(uw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,pN.jsx)(uw.Path,{d:"M9 15h6V9H9v6zm-5 5h1.5V4H4v16zM18.5 4v16H20V4h-1.5z"})});var dw=l(Z(),1),hN=l(w(),1),gN=(0,hN.jsx)(dw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,hN.jsx)(dw.Path,{d:"M4 4L20 4L20 5.5L4 5.5L4 4ZM10 7L14 7L14 17L10 17L10 7ZM20 18.5L4 18.5L4 20L20 20L20 18.5Z"})});var fw=l(Z(),1),bN=l(w(),1),hh=(0,bN.jsx)(fw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,bN.jsx)(fw.Path,{d:"M4 4H5.5V20H4V4ZM7 10L17 10V14L7 14V10ZM20 4H18.5V20H20V4Z"})});var mw=l(Z(),1),vN=l(w(),1),kN=(0,vN.jsx)(mw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,vN.jsx)(mw.Path,{d:"M9 20h6V9H9v11zM4 4v1.5h16V4H4z"})});var pw=l(Z(),1),yN=l(w(),1),Pl=(0,yN.jsx)(pw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,yN.jsx)(pw.Path,{d:"m6.734 16.106 2.176-2.38-1.093-1.028-3.846 4.158 3.846 4.158 1.093-1.028-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"})});var hw=l(Z(),1),_N=l(w(),1),SN=(0,_N.jsx)(hw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,_N.jsx)(hw.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 gw=l(Z(),1),xN=l(w(),1),Ni=(0,xN.jsx)(gw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,xN.jsx)(gw.Path,{d:"M17.031 4.703 15.576 4l-1.56 3H14v.03l-2.324 4.47H9.5V13h1.396l-1.502 2.889h-.95a3.694 3.694 0 0 1 0-7.389H10V7H8.444a5.194 5.194 0 1 0 0 10.389h.17L7.5 19.53l1.416.719L15.049 8.5h.507a3.694 3.694 0 0 1 0 7.39H14v1.5h1.556a5.194 5.194 0 0 0 .273-10.383l1.202-2.304Z"})});var bw=l(Z(),1),wN=l(w(),1),_n=(0,wN.jsx)(bw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,wN.jsx)(bw.Path,{d:"M10 17.389H8.444A5.194 5.194 0 1 1 8.444 7H10v1.5H8.444a3.694 3.694 0 0 0 0 7.389H10v1.5ZM14 7h1.556a5.194 5.194 0 0 1 0 10.39H14v-1.5h1.556a3.694 3.694 0 0 0 0-7.39H14V7Zm-4.5 6h5v-1.5h-5V13Z"})});var vw=l(Z(),1),CN=l(w(),1),Rk=(0,CN.jsx)(vw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,CN.jsx)(vw.Path,{d:"M3 6h11v1.5H3V6Zm3.5 5.5h11V13h-11v-1.5ZM21 17H10v1.5h11V17Z"})});var kw=l(Z(),1),BN=l(w(),1),EN=(0,BN.jsx)(kw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,BN.jsx)(kw.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 yw=l(Z(),1),TN=l(w(),1),IN=(0,TN.jsx)(yw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,TN.jsx)(yw.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 _w=l(Z(),1),PN=l(w(),1),nm=(0,PN.jsx)(_w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,PN.jsx)(_w.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"})});var Ok=l(Z(),1),Ak=l(w(),1),gh=(0,Ak.jsxs)(Ok.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,Ak.jsx)(Ok.Path,{d:"m7 6.5 4 2.5-4 2.5z"}),(0,Ak.jsx)(Ok.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"m5 3c-1.10457 0-2 .89543-2 2v14c0 1.1046.89543 2 2 2h14c1.1046 0 2-.8954 2-2v-14c0-1.10457-.8954-2-2-2zm14 1.5h-14c-.27614 0-.5.22386-.5.5v10.7072l3.62953-2.6465c.25108-.1831.58905-.1924.84981-.0234l2.92666 1.8969 3.5712-3.4719c.2911-.2831.7545-.2831 1.0456 0l2.9772 2.8945v-9.3568c0-.27614-.2239-.5-.5-.5zm-14.5 14.5v-1.4364l4.09643-2.987 2.99567 1.9417c.2936.1903.6798.1523.9307-.0917l3.4772-3.3806 3.4772 3.3806.0228-.0234v2.5968c0 .2761-.2239.5-.5.5h-14c-.27614 0-.5-.2239-.5-.5z"})]});var Sw=l(Z(),1),RN=l(w(),1),Lk=(0,RN.jsx)(Sw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,RN.jsx)(Sw.Path,{d:"M15 4H9c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h6c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 14c0 .3-.2.5-.5.5H9c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h6c.3 0 .5.2.5.5v12zm-4.5-.5h2V16h-2v1.5z"})});var xw=l(Z(),1),ON=l(w(),1),Ps=(0,ON.jsx)(xw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,ON.jsx)(xw.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"})});var Nk=l(Z(),1),Mk=l(w(),1),im=(0,Mk.jsxs)(Nk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,Mk.jsx)(Nk.Path,{d:"M15.5 7.5h-7V9h7V7.5Zm-7 3.5h7v1.5h-7V11Zm7 3.5h-7V16h7v-1.5Z"}),(0,Mk.jsx)(Nk.Path,{d:"M17 4H7a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2ZM7 5.5h10a.5.5 0 0 1 .5.5v12a.5.5 0 0 1-.5.5H7a.5.5 0 0 1-.5-.5V6a.5.5 0 0 1 .5-.5Z"})]});var ww=l(Z(),1),AN=l(w(),1),LN=(0,AN.jsx)(ww.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,AN.jsx)(ww.Path,{d:"m9.99609 14v-.2251l.00391.0001v6.225h1.5v-14.5h2.5v14.5h1.5v-14.5h3v-1.5h-8.50391c-2.76142 0-5 2.23858-5 5 0 2.7614 2.23858 5 5 5z"})});var Cw=l(Z(),1),NN=l(w(),1),sm=(0,NN.jsx)(Cw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,NN.jsx)(Cw.Path,{d:"m19 7-3-3-8.5 8.5-1 4 4-1L19 7Zm-7 11.5H5V20h7v-1.5Z"})});var Bw=l(Z(),1),MN=l(w(),1),DN=(0,MN.jsx)(Bw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,MN.jsx)(Bw.Path,{d:"M10.97 10.159a3.382 3.382 0 0 0-2.857.955l1.724 1.723-2.836 2.913L7 17h1.25l2.913-2.837 1.723 1.723a3.38 3.38 0 0 0 .606-.825c.33-.63.446-1.343.35-2.032L17 10.695 13.305 7l-2.334 3.159Z"})});var Ew=l(Z(),1),VN=l(w(),1),Mi=(0,VN.jsx)(Ew.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,VN.jsx)(Ew.Path,{d:"M11 12.5V17.5H12.5V12.5H17.5V11H12.5V6H11V11H6V12.5H11Z"})});var Tw=l(Z(),1),FN=l(w(),1),zN=(0,FN.jsx)(Tw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,FN.jsx)(Tw.Path,{d:"M19 5.5H5V4h14v1.5ZM19 20H5v-1.5h14V20ZM7 9h10v6H7V9Z"})});var Iw=l(Z(),1),jN=l(w(),1),UN=(0,jN.jsx)(Iw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,jN.jsx)(Iw.Path,{d:"M5 5.5h8V4H5v1.5ZM5 20h8v-1.5H5V20ZM19 9H5v6h14V9Z"})});var Pw=l(Z(),1),HN=l(w(),1),GN=(0,HN.jsx)(Pw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,HN.jsx)(Pw.Path,{d:"M19 5.5h-8V4h8v1.5ZM19 20h-8v-1.5h8V20ZM5 9h14v6H5V9Z"})});var Rw=l(Z(),1),WN=l(w(),1),$N=(0,WN.jsx)(Rw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,WN.jsx)(Rw.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"})});var Ow=l(Z(),1),KN=l(w(),1),YN=(0,KN.jsx)(Ow.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,KN.jsx)(Ow.Path,{d:"M18 5.5H6a.5.5 0 0 0-.5.5v12a.5.5 0 0 0 .5.5h12a.5.5 0 0 0 .5-.5V6a.5.5 0 0 0-.5-.5ZM6 4h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2Zm1 5h1.5v1.5H7V9Zm1.5 4.5H7V15h1.5v-1.5ZM10 9h7v1.5h-7V9Zm7 4.5h-7V15h7v-1.5Z"})});var Aw=l(Z(),1),qN=l(w(),1),kr=(0,qN.jsx)(Aw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,qN.jsx)(Aw.Path,{d:"M7 11.5h10V13H7z"})});var Lw=l(Z(),1),ZN=l(w(),1),XN=(0,ZN.jsx)(Lw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,ZN.jsx)(Lw.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"})});var Nw=l(Z(),1),QN=l(w(),1),JN=(0,QN.jsx)(Nw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,QN.jsx)(Nw.Path,{d:"M4 6.5h5a2 2 0 0 1 2 2v7a2 2 0 0 1-2 2H4V16h5a.5.5 0 0 0 .5-.5v-7A.5.5 0 0 0 9 8H4V6.5Zm16 0h-5a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h5V16h-5a.5.5 0 0 1-.5-.5v-7A.5.5 0 0 1 15 8h5V6.5Z"})});var Mw=l(Z(),1),eM=l(w(),1),tM=(0,eM.jsx)(Mw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,eM.jsx)(Mw.Path,{d:"M13 5c-3.3 0-6 2.7-6 6 0 1.4.5 2.7 1.3 3.7l-3.8 3.8 1.1 1.1 3.8-3.8c1 .8 2.3 1.3 3.7 1.3 3.3 0 6-2.7 6-6S16.3 5 13 5zm0 10.5c-2.5 0-4.5-2-4.5-4.5s2-4.5 4.5-4.5 4.5 2 4.5 4.5-2 4.5-4.5 4.5z"})});var Dw=l(Z(),1),oM=l(w(),1),am=(0,oM.jsx)(Dw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,oM.jsx)(Dw.Path,{d:"M3.99961 13C4.67043 13.3354 4.6703 13.3357 4.67017 13.3359L4.67298 13.3305C4.67621 13.3242 4.68184 13.3135 4.68988 13.2985C4.70595 13.2686 4.7316 13.2218 4.76695 13.1608C4.8377 13.0385 4.94692 12.8592 5.09541 12.6419C5.39312 12.2062 5.84436 11.624 6.45435 11.0431C7.67308 9.88241 9.49719 8.75 11.9996 8.75C14.502 8.75 16.3261 9.88241 17.5449 11.0431C18.1549 11.624 18.6061 12.2062 18.9038 12.6419C19.0523 12.8592 19.1615 13.0385 19.2323 13.1608C19.2676 13.2218 19.2933 13.2686 19.3093 13.2985C19.3174 13.3135 19.323 13.3242 19.3262 13.3305L19.3291 13.3359C19.3289 13.3357 19.3288 13.3354 19.9996 13C20.6704 12.6646 20.6703 12.6643 20.6701 12.664L20.6697 12.6632L20.6688 12.6614L20.6662 12.6563L20.6583 12.6408C20.6517 12.6282 20.6427 12.6108 20.631 12.5892C20.6078 12.5459 20.5744 12.4852 20.5306 12.4096C20.4432 12.2584 20.3141 12.0471 20.1423 11.7956C19.7994 11.2938 19.2819 10.626 18.5794 9.9569C17.1731 8.61759 14.9972 7.25 11.9996 7.25C9.00203 7.25 6.82614 8.61759 5.41987 9.9569C4.71736 10.626 4.19984 11.2938 3.85694 11.7956C3.68511 12.0471 3.55605 12.2584 3.4686 12.4096C3.42484 12.4852 3.39142 12.5459 3.36818 12.5892C3.35656 12.6108 3.34748 12.6282 3.34092 12.6408L3.33297 12.6563L3.33041 12.6614L3.32948 12.6632L3.32911 12.664C3.32894 12.6643 3.32879 12.6646 3.99961 13ZM11.9996 16C13.9326 16 15.4996 14.433 15.4996 12.5C15.4996 10.567 13.9326 9 11.9996 9C10.0666 9 8.49961 10.567 8.49961 12.5C8.49961 14.433 10.0666 16 11.9996 16Z"})});var Dk=l(Z(),1),Vk=l(w(),1),rM=(0,Vk.jsxs)(Dk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,Vk.jsx)(Dk.Path,{d:"m19 7.5h-7.628c-.3089-.87389-1.1423-1.5-2.122-1.5-.97966 0-1.81309.62611-2.12197 1.5h-2.12803v1.5h2.12803c.30888.87389 1.14231 1.5 2.12197 1.5.9797 0 1.8131-.62611 2.122-1.5h7.628z"}),(0,Vk.jsx)(Dk.Path,{d:"m19 15h-2.128c-.3089-.8739-1.1423-1.5-2.122-1.5s-1.8131.6261-2.122 1.5h-7.628v1.5h7.628c.3089.8739 1.1423 1.5 2.122 1.5s1.8131-.6261 2.122-1.5h2.128z"})]});var Vw=l(Z(),1),nM=l(w(),1),iM=(0,nM.jsx)(Vw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,nM.jsx)(Vw.Path,{d:"M12 8c-2.2 0-4 1.8-4 4s1.8 4 4 4 4-1.8 4-4-1.8-4-4-4zm0 6.5c-1.4 0-2.5-1.1-2.5-2.5s1.1-2.5 2.5-2.5 2.5 1.1 2.5 2.5-1.1 2.5-2.5 2.5zM12.8 3h-1.5v3h1.5V3zm-1.6 18h1.5v-3h-1.5v3zm6.8-9.8v1.5h3v-1.5h-3zm-12 0H3v1.5h3v-1.5zm9.7 5.6 2.1 2.1 1.1-1.1-2.1-2.1-1.1 1.1zM8.3 7.2 6.2 5.1 5.1 6.2l2.1 2.1 1.1-1.1zM5.1 17.8l1.1 1.1 2.1-2.1-1.1-1.1-2.1 2.1zM18.9 6.2l-1.1-1.1-2.1 2.1 1.1 1.1 2.1-2.1z"})});var Fw=l(Z(),1),sM=l(w(),1),zw=(0,sM.jsx)(Fw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,sM.jsx)(Fw.Path,{d:"m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z"})});var Fk=l(Z(),1),zk=l(w(),1),aM=(0,zk.jsxs)(Fk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,zk.jsx)(Fk.Path,{d:"m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z",style:{opacity:.25}}),(0,zk.jsx)(Fk.Path,{d:"m16.5 19.5h-9v-1.5h9z"})]});var bh=l(Z(),1),vh=l(w(),1),lM=(0,vh.jsxs)(bh.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,vh.jsx)(bh.Path,{d:"m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z",style:{opacity:.25}}),(0,vh.jsx)(bh.Path,{d:"m4.5 7.5v9h1.5v-9z"}),(0,vh.jsx)(bh.Path,{d:"m18 7.5v9h1.5v-9z"})]});var jk=l(Z(),1),Uk=l(w(),1),cM=(0,Uk.jsxs)(jk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,Uk.jsx)(jk.Path,{d:"m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z",style:{opacity:.25}}),(0,Uk.jsx)(jk.Path,{d:"m4.5 16.5v-9h1.5v9z"})]});var Hk=l(Z(),1),Gk=l(w(),1),uM=(0,Gk.jsxs)(Hk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,Gk.jsx)(Hk.Path,{d:"m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z",style:{opacity:.25}}),(0,Gk.jsx)(Hk.Path,{d:"m18 16.5v-9h1.5v9z"})]});var Wk=l(Z(),1),$k=l(w(),1),dM=(0,$k.jsxs)(Wk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,$k.jsx)(Wk.Path,{d:"m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z",style:{opacity:.25}}),(0,$k.jsx)(Wk.Path,{d:"m16.5 6h-9v-1.5h9z"})]});var kh=l(Z(),1),yh=l(w(),1),fM=(0,yh.jsxs)(kh.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,yh.jsx)(kh.Path,{d:"m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z",style:{opacity:.25}}),(0,yh.jsx)(kh.Path,{d:"m7.5 6h9v-1.5h-9z"}),(0,yh.jsx)(kh.Path,{d:"m7.5 19.5h9v-1.5h-9z"})]});var jw=l(Z(),1),mM=l(w(),1),pM=(0,mM.jsx)(jw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,mM.jsx)(jw.Path,{d:"M17.5 4v5a2 2 0 0 1-2 2h-7a2 2 0 0 1-2-2V4H8v5a.5.5 0 0 0 .5.5h7A.5.5 0 0 0 16 9V4h1.5Zm0 16v-5a2 2 0 0 0-2-2h-7a2 2 0 0 0-2 2v5H8v-5a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 .5.5v5h1.5Z"})});var Uw=l(Z(),1),hM=l(w(),1),Kk=(0,hM.jsx)(Uw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,hM.jsx)(Uw.Path,{d:"M5 4h14v11H5V4Zm11 16H8v-1.5h8V20Z"})});var Hw=l(Z(),1),gM=l(w(),1),lm=(0,gM.jsx)(Hw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,gM.jsx)(Hw.Path,{d:"M16 5.5H8V4h8v1.5ZM16 20H8v-1.5h8V20ZM5 9h14v6H5V9Z"})});var Gw=l(Z(),1),bM=l(w(),1),vM=(0,bM.jsx)(Gw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,bM.jsx)(Gw.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M20 12a8 8 0 1 1-16 0 8 8 0 0 1 16 0Zm-1.5 0a6.5 6.5 0 0 1-6.5 6.5v-13a6.5 6.5 0 0 1 6.5 6.5Z"})});var Ww=l(Z(),1),kM=l(w(),1),Di=(0,kM.jsx)(Ww.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,kM.jsx)(Ww.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"})});var $w=l(Z(),1),yM=l(w(),1),_M=(0,yM.jsx)($w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,yM.jsx)($w.Path,{d:"M17 4H7c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 14c0 .3-.2.5-.5.5H7c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h10c.3 0 .5.2.5.5v12zm-7.5-.5h4V16h-4v1.5z"})});var Kw=l(Z(),1),SM=l(w(),1),xM=(0,SM.jsx)(Kw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,SM.jsx)(Kw.Path,{d:"M4.75 4a.75.75 0 0 0-.75.75v7.826c0 .2.08.39.22.53l6.72 6.716a2.313 2.313 0 0 0 3.276-.001l5.61-5.611-.531-.53.532.528a2.315 2.315 0 0 0 0-3.264L13.104 4.22a.75.75 0 0 0-.53-.22H4.75ZM19 12.576a.815.815 0 0 1-.236.574l-5.61 5.611a.814.814 0 0 1-1.153 0L5.5 12.264V5.5h6.763l6.5 6.502a.816.816 0 0 1 .237.574ZM8.75 9.75a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z"})});var Yw=l(Z(),1),wM=l(w(),1),CM=(0,wM.jsx)(Yw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,wM.jsx)(Yw.Path,{d:"M8.2 14.4h3.9L13 17h1.7L11 6.5H9.3L5.6 17h1.7l.9-2.6zm2-5.5 1.4 4H8.8l1.4-4zm7.4 7.5-1.3.8.8 1.4H5.5V20h14.3l-2.2-3.6z"})});var qw=l(Z(),1),BM=l(w(),1),EM=(0,BM.jsx)(qw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,BM.jsx)(qw.Path,{d:"M7 5.6v1.7l2.6.9v3.9L7 13v1.7L17.5 11V9.3L7 5.6zm4.2 6V8.8l4 1.4-4 1.4zm-5.7 5.6V5.5H4v14.3l3.6-2.2-.8-1.3-1.3.9z"})});var Zw=l(Z(),1),TM=l(w(),1),IM=(0,TM.jsx)(Zw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,TM.jsx)(Zw.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12 5.5A2.25 2.25 0 0 0 9.878 7h4.244A2.251 2.251 0 0 0 12 5.5ZM12 4a3.751 3.751 0 0 0-3.675 3H5v1.5h1.27l.818 8.997a2.75 2.75 0 0 0 2.739 2.501h4.347a2.75 2.75 0 0 0 2.738-2.5L17.73 8.5H19V7h-3.325A3.751 3.751 0 0 0 12 4Zm4.224 4.5H7.776l.806 8.861a1.25 1.25 0 0 0 1.245 1.137h4.347a1.25 1.25 0 0 0 1.245-1.137l.805-8.861Z"})});var Xw=l(Z(),1),PM=l(w(),1),RM=(0,PM.jsx)(Xw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,PM.jsx)(Xw.Path,{d:"M18 4h-7c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2h7c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 9c0 .3-.2.5-.5.5h-7c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h7c.3 0 .5.2.5.5v7zm-5 5c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5v-7c0-.3.2-.5.5-.5h1V9H6c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2h7c1.1 0 2-.9 2-2v-1h-1.5v1z"})});var Qw=l(Z(),1),OM=l(w(),1),Rl=(0,OM.jsx)(Qw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,OM.jsx)(Qw.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 Jw=l(Z(),1),AM=l(w(),1),Rs=(0,AM.jsx)(Jw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,AM.jsx)(Jw.Path,{d:"M20.7 12.7s0-.1-.1-.2c0-.2-.2-.4-.4-.6-.3-.5-.9-1.2-1.6-1.8-.7-.6-1.5-1.3-2.6-1.8l-.6 1.4c.9.4 1.6 1 2.1 1.5.6.6 1.1 1.2 1.4 1.6.1.2.3.4.3.5v.1l.7-.3.7-.3Zm-5.2-9.3-1.8 4c-.5-.1-1.1-.2-1.7-.2-3 0-5.2 1.4-6.6 2.7-.7.7-1.2 1.3-1.6 1.8-.2.3-.3.5-.4.6 0 0 0 .1-.1.2s0 0 .7.3l.7.3V13c0-.1.2-.3.3-.5.3-.4.7-1 1.4-1.6 1.2-1.2 3-2.3 5.5-2.3H13v.3c-.4 0-.8-.1-1.1-.1-1.9 0-3.5 1.6-3.5 3.5s.6 2.3 1.6 2.9l-2 4.4.9.4 7.6-16.2-.9-.4Zm-3 12.6c1.7-.2 3-1.7 3-3.5s-.2-1.4-.6-1.9L12.4 16Z"})});var eC=l(Z(),1),LM=l(w(),1),NM=(0,LM.jsx)(eC.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,LM.jsx)(eC.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 tC=l(Z(),1),MM=l(w(),1),DM=(0,MM.jsx)(tC.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,MM.jsx)(tC.Path,{d:"M17.8 2l-.9.3c-.1 0-3.6 1-5.2 2.1C10 5.5 9.3 6.5 8.9 7.1c-.6.9-1.7 4.7-1.7 6.3l-.9 2.3c-.2.4 0 .8.4 1 .1 0 .2.1.3.1.3 0 .6-.2.7-.5l.6-1.5c.3 0 .7-.1 1.2-.2.7-.1 1.4-.3 2.2-.5.8-.2 1.6-.5 2.4-.8.7-.3 1.4-.7 1.9-1.2s.8-1.2 1-1.9c.2-.7.3-1.6.4-2.4.1-.8.1-1.7.2-2.5 0-.8.1-1.5.2-2.1V2zm-1.9 5.6c-.1.8-.2 1.5-.3 2.1-.2.6-.4 1-.6 1.3-.3.3-.8.6-1.4.9-.7.3-1.4.5-2.2.8-.6.2-1.3.3-1.8.4L15 7.5c.3-.3.6-.7 1-1.1 0 .4 0 .8-.1 1.2zM6 20h8v-1.5H6V20z"})});var oC=l(Z(),1),VM=l(w(),1),FM=(0,VM.jsx)(oC.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,VM.jsx)(oC.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 Ll=l(yr(),1),Zn=l(Le(),1),Pe=l(F(),1);var K8=l(K(),1),Y8=l(L8(),1);var Jt="core/block-editor";var iC={};wa(iC,{getAllPatterns:()=>Sve,getBlockRemovalRules:()=>gve,getBlockSettings:()=>M8,getBlockStyles:()=>Tve,getBlockWithoutAttributes:()=>dve,getClosestAllowedInsertionPoint:()=>z8,getClosestAllowedInsertionPointForPattern:()=>Pve,getContentLockingParent:()=>zM,getEditedContentOnlySection:()=>jM,getEnabledBlockParents:()=>pve,getEnabledClientIdsTree:()=>mve,getExpandedBlock:()=>Eve,getInserterMediaCategories:()=>kve,getInsertionPoint:()=>Rve,getLastFocus:()=>Cve,getLastInsertedBlocksClientIds:()=>uve,getListViewExpandRevision:()=>Fve,getParentSectionBlock:()=>Bu,getPatternBySlug:()=>_ve,getRegisteredInserterMediaCategories:()=>vve,getRemovalPromptData:()=>hve,getRequestedInspectorTab:()=>jve,getReusableBlocks:()=>wve,getSectionRootClientId:()=>um,getStyleOverrides:()=>bve,getViewportModalClientIds:()=>zve,getZoomLevel:()=>Ive,hasAllowedPatterns:()=>yve,hasBlockSpotlight:()=>Nve,isBlockHiddenAnywhere:()=>Ove,isBlockHiddenAtViewport:()=>j8,isBlockHiddenEverywhere:()=>GM,isBlockInterfaceHidden:()=>cve,isBlockParentHiddenAtViewport:()=>Lve,isBlockParentHiddenEverywhere:()=>Ave,isBlockSubtreeDisabled:()=>fve,isContainerInsertableToInContentOnlyMode:()=>qk,isDragging:()=>Bve,isEditLockedBlock:()=>U8,isListViewContentPanelOpen:()=>Dve,isListViewPanelOpened:()=>Vve,isLockedBlock:()=>Mve,isMoveLockedBlock:()=>H8,isRemoveLockedBlock:()=>G8,isSectionBlock:()=>Eu,isWithinEditedContentOnlySection:()=>UM,isZoomOut:()=>HM});var qr=l(F(),1),Yk=l(K(),1);var rC=l(N(),1);var At={desktop:{label:(0,rC.__)("Desktop"),icon:hL,key:"desktop"},tablet:{label:(0,rC.__)("Tablet"),icon:_M,key:"tablet"},mobile:{label:(0,rC.__)("Mobile"),icon:Lk,key:"mobile"}},wu=Object.entries(At);var nC=l(K(),1),N8=l(vt(),1);function de(e,t,o){t=Array.isArray(t)?[...t]:[t],e=Array.isArray(e)?[...e]:{...e};let r=t.pop(),n=e;for(let i of t){let s=n[i];n=n[i]=Array.isArray(s)?[...s]:{...s}}return n[r]=o,e}var Ol=(e,t,o)=>{let r=Array.isArray(t)?t:t.split("."),n=e;return r.forEach(i=>{n=n?.[i]}),n??o};var ive=["color","border","dimensions","typography","spacing"],sve={"color.palette":e=>e.colors,"color.gradients":e=>e.gradients,"color.custom":e=>e.disableCustomColors===void 0?void 0:!e.disableCustomColors,"color.customGradient":e=>e.disableCustomGradients===void 0?void 0:!e.disableCustomGradients,"typography.fontSizes":e=>e.fontSizes,"typography.customFontSize":e=>e.disableCustomFontSizes===void 0?void 0:!e.disableCustomFontSizes,"typography.lineHeight":e=>e.enableCustomLineHeight,"spacing.units":e=>{if(e.enableCustomUnits!==void 0)return e.enableCustomUnits===!0?["px","em","rem","vh","vw","%"]:e.enableCustomUnits},"spacing.padding":e=>e.enableCustomSpacing},ave={"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"},lve=e=>ave[e]||e;function M8(e,t,...o){let r=kt(e,t),n=[];if(t){let i=t;do{let s=kt(e,i);(0,nC.hasBlockSupport)(s,"__experimentalSettings",!1)&&n.push(i)}while(i=e.blocks.parents.get(i))}return o.map(i=>{if(ive.includes(i)){console.warn("Top level useSetting paths are disabled. Please use a subpath to query the information needed.");return}let s=(0,N8.applyFilters)("blockEditor.useSetting.before",void 0,i,t,r);if(s!==void 0)return s;let a=lve(i);for(let d of n){let f=Vi(e,d);if(s=Ol(f.settings?.blocks?.[r],a)??Ol(f.settings,a),s!==void 0)break}let c=Cu(e);if(s===void 0&&r&&(s=Ol(c.__experimentalFeatures?.blocks?.[r],a)),s===void 0&&(s=Ol(c.__experimentalFeatures,a)),s!==void 0)return nC.__EXPERIMENTAL_PATHS_WITH_OVERRIDE[a]?s.custom??s.theme??s.default:s;let u=sve[a]?.(c);return u!==void 0?u:a==="typography.dropCap"?!0:void 0})}var{isContentBlock:D8}=M(Yk.privateApis);function cve(e){return e.isBlockInterfaceHidden}function uve(e){return e?.lastBlockInserted?.clientIds}function dve(e,t){return e.blocks.byClientId.get(t)}var fve=(e,t)=>{let o=r=>Fi(e,r)==="disabled"&&Ar(e,r).every(o);return Ar(e,t).every(o)};function qk(e,t,o){let r=D8(t),n=kt(e,o),i=D8(n);return um(e)===o||i&&r}function V8(e,t){let o=Ar(e,t),r=[];for(let n of o){let i=V8(e,n);Fi(e,n)!=="disabled"?r.push({clientId:n,innerBlocks:i}):r.push(...i)}return r}var mve=(0,qr.createRegistrySelector)(()=>(0,qr.createSelector)(V8,e=>[e.blocks.order,e.derivedBlockEditingModes,e.blocks.blockEditingModes])),pve=(0,qr.createSelector)((e,t,o=!1)=>Os(e,t,o).filter(r=>Fi(e,r)!=="disabled"),e=>[e.blocks.parents,e.blocks.blockEditingModes,e.settings.templateLock,e.blockListSettings]);function hve(e){return e.removalPromptData}function gve(e){return e.blockRemovalRules}var bve=(0,qr.createSelector)(e=>{let o=_h(e).reduce((r,n,i)=>(r[n]=i,r),{});return[...e.styleOverrides].sort((r,n)=>{let[,{clientId:i}]=r,[,{clientId:s}]=n,a=o[i]??-1,c=o[s]??-1;return a-c})},e=>[e.blocks.order,e.styleOverrides]);function vve(e){return e.registeredInserterMediaCategories}var kve=(0,qr.createSelector)(e=>{let{settings:{inserterMediaCategories:t,allowedMimeTypes:o,enableOpenverseMediaCategory:r},registeredInserterMediaCategories:n}=e;if(!t&&!n.length||!o)return;let i=t?.map(({name:a})=>a)||[];return[...t||[],...(n||[]).filter(({name:a})=>!i.includes(a))].filter(a=>!r&&a.name==="openverse"?!1:Object.values(o).some(c=>c.startsWith(`${a.mediaType}/`)))},e=>[e.settings.inserterMediaCategories,e.settings.allowedMimeTypes,e.settings.enableOpenverseMediaCategory,e.registeredInserterMediaCategories]),yve=(0,qr.createRegistrySelector)(e=>(0,qr.createSelector)((t,o=null)=>{let{getAllPatterns:r}=M(e(Jt)),n=r(),{allowedBlockTypes:i}=Cu(t);return n.some(s=>{let{inserter:a=!0}=s;if(!a)return!1;let c=cm(s);return Xk(c,i)&&c.every(({name:u})=>dm(t,u,o))})},(t,o)=>[...Qk(e)(t),...Tu(e)(t,o)])),_ve=(0,qr.createRegistrySelector)(e=>(0,qr.createSelector)((t,o)=>{if(o?.startsWith("core/block/")){let r=parseInt(o.slice(11),10),n=M(e(Jt)).getReusableBlocks().find(({id:i})=>i===r);return n?Zk(n,t.settings.__experimentalUserPatternCategories):null}return[...t.settings.__experimentalBlockPatterns??[],...t.settings[mu]?.(e)??[]].find(({name:r})=>r===o)},(t,o)=>o?.startsWith("core/block/")?[M(e(Jt)).getReusableBlocks(),t.settings.__experimentalReusableBlocks]:[t.settings.__experimentalBlockPatterns,t.settings[mu]?.(e)])),Sve=(0,qr.createRegistrySelector)(e=>(0,qr.createSelector)(t=>[...M(e(Jt)).getReusableBlocks().map(o=>Zk(o,t.settings.__experimentalUserPatternCategories)),...t.settings.__experimentalBlockPatterns??[],...t.settings[mu]?.(e)??[]].filter((o,r,n)=>r===n.findIndex(i=>o.name===i.name)),Qk(e))),xve=[],wve=(0,qr.createRegistrySelector)(e=>t=>{let o=t.settings[ex];return(o?o(e):t.settings.__experimentalReusableBlocks)??xve});function Cve(e){return e.lastFocus}function Bve(e){return e.isDragging}function Eve(e){return e.expandedBlock}var zM=(e,t)=>{let o=t,r;for(;!r&&(o=e.blocks.parents.get(o));)Ba(e,o)==="contentOnly"&&(r=o);return r};function F8(e,t){let o=kt(e,t);if(o==="core/block")return!0;let r=Vi(e,t),n=o==="core/template-part",i=e.settings?.[hu],s=e.settings?.disableContentOnlyForUnsyncedPatterns,a=e.settings?.disableContentOnlyForTemplateParts;if((!s&&r?.metadata?.patternName||n&&!a)&&!i)return!0;let c=Ba(e,t)==="contentOnly",u=Fo(e,t),d=Ba(e,u)==="contentOnly";return!!(c&&!d)}var Bu=(e,t)=>{if(UM(e,t))return;let o=t,r;for(;o=e.blocks.parents.get(o);)F8(e,o)&&(r=o);return r};function Eu(e,t){return UM(e,t)||Bu(e,t)?!1:F8(e,t)}function jM(e){return e.editedContentOnlySection}function UM(e,t){if(!e.editedContentOnlySection)return!1;if(e.editedContentOnlySection===t)return!0;let o=t;for(;o=e.blocks.parents.get(o);)if(e.editedContentOnlySection===o)return!0;return!1}var Tve=(0,qr.createSelector)((e,t)=>t.reduce((o,r)=>(o[r]=e.blocks.attributes.get(r)?.style,o),{}),(e,t)=>[...t.map(o=>e.blocks.attributes.get(o)?.style)]);function um(e){return e.settings?.[pu]}function HM(e){return e.zoomLevel==="auto-scaled"||e.zoomLevel<100}function Ive(e){return e.zoomLevel}function z8(e,t,o=""){let r=Array.isArray(t)?t:[t],n=s=>r.every(a=>dm(e,a,s));if(!o){if(n(o))return o;let s=um(e);return s&&n(s)?s:null}let i=o;for(;i!==null&&!n(i);)i=Fo(e,i);return i}function Pve(e,t,o){let{allowedBlockTypes:r}=Cu(e);if(!Xk(cm(t),r))return null;let i=cm(t).map(({blockName:s})=>s);return z8(e,i,o)}function Rve(e){return e.insertionPoint}var Ove=(e,t)=>{let o=kt(e,t);if(!(0,Yk.hasBlockSupport)(o,"visibility",!0))return!1;let n=e.blocks.attributes.get(t)?.metadata?.blockVisibility;return n===!1?!0:typeof n?.viewport=="object"&&n?.viewport!==null?Object.values(At).some(i=>n?.viewport?.[i.key]===!1):!1},GM=(e,t)=>{let o=kt(e,t);return(0,Yk.hasBlockSupport)(o,"visibility",!0)?e.blocks.attributes.get(t)?.metadata?.blockVisibility===!1:!1},Ave=(e,t)=>Os(e,t).some(r=>GM(e,r)),j8=(e,t,o)=>{if(GM(e,t))return!0;let n=e.blocks.attributes.get(t)?.metadata?.blockVisibility?.viewport;return typeof n=="object"&&n!==null&&typeof o=="string"?n?.[o.toLowerCase()]===!1:!1},Lve=(e,t,o)=>Os(e,t).some(n=>j8(e,n,o));function Nve(e){return!!e.hasBlockSpotlight||!!e.editedContentOnlySection}function U8(e,t){return!!Vi(e,t)?.lock?.edit}function H8(e,t){let o=Vi(e,t);if(o?.lock?.move!==void 0)return!!o?.lock?.move;let r=Fo(e,t);return Ba(e,r)==="all"}function G8(e,t){let o=Vi(e,t);if(o?.lock?.remove!==void 0)return!!o?.lock?.remove;let r=Fo(e,t),n=Ba(e,r);return n==="all"||n==="insert"}function Mve(e,t){return U8(e,t)||H8(e,t)||G8(e,t)}function Dve(e){return e.listViewContentPanelOpen}function Vve(e,t){return e.openedListViewPanels?.allOpen?!0:e.openedListViewPanels?.panels?.[t]===!0}function Fve(e){return e.listViewExpandRevision||0}function zve(e){return e.viewportModalClientIds}function jve(e){return e.requestedInspectorTab}var ey=l(N(),1),Gt={user:"user",theme:"theme",directory:"directory"},Jk={full:"fully",unsynced:"unsynced"},fm={name:"allPatterns",label:(0,ey._x)("All","patterns")},Al={name:"myPatterns",label:(0,ey.__)("My patterns")},Sh={name:"core/starter-content",label:(0,ey.__)("Starter content")};function sC(e,t,o){let r=e.name.startsWith("core/block"),n=e.source==="core"||e.source?.startsWith("pattern-directory");return!!(t===Gt.theme&&(r||n)||t===Gt.directory&&(r||!n)||t===Gt.user&&e.type!==Gt.user||o===Jk.full&&e.syncStatus!==""||o===Jk.unsynced&&e.syncStatus!=="unsynced"&&r)}var Iu=Symbol("isFiltered"),W8=new WeakMap,$8=new WeakMap;function Zk(e,t=[]){return{name:`core/block/${e.id}`,id:e.id,type:Gt.user,title:e.title?.raw,categories:e.wp_pattern_category?.map(o=>{let r=t.find(({id:n})=>n===o);return r?r.slug:o}),content:e.content?.raw,syncStatus:e.wp_pattern_sync_status}}function Uve(e){let t=(0,K8.parse)(e.content,{__unstableSkipMigrationLogs:!0});return t.length===1&&(t[0].attributes={...t[0].attributes,metadata:{...t[0].attributes.metadata||{},categories:e.categories,patternName:e.name,name:t[0].attributes.metadata?.name||e.title}}),{...e,blocks:t}}function aC(e){let t=W8.get(e);return t||(t=Uve(e),W8.set(e,t)),t}function cm(e){let t=$8.get(e);return t||(t=(0,Y8.parse)(e.content),t=t.filter(o=>o.blockName!==null),$8.set(e,t)),t}var mm=(e,t,o=null)=>typeof e=="boolean"?e:Array.isArray(e)?e.includes("core/post-content")&&t===null?!0:e.includes(t):o,Xk=(e,t)=>{if(typeof t=="boolean")return t;let o=[...e];for(;o.length>0;){let r=o.shift();if(!mm(t,r.name||r.blockName,!0))return!1;r.innerBlocks?.forEach(i=>{o.push(i)})}return!0},Qk=e=>t=>[t.settings.__experimentalBlockPatterns,t.settings.__experimentalUserPatternCategories,t.settings.__experimentalReusableBlocks,t.settings[mu]?.(e),t.blockPatterns,M(e(Jt)).getReusableBlocks()],Tu=()=>(e,t)=>[e.blockListSettings.get(t),e.blocks.byClientId.get(t),e.blocks.order.get(t||""),e.settings.allowedBlockTypes,e.settings.templateLock,Fi(e,t),um(e),Eu(e,t),Bu(e,t)];var Hve=(e,t,o)=>(r,n)=>{let i,s;if(typeof e=="function"?(i=e(r),s=e(n)):(i=r[e],s=n[e]),i>s)return o==="asc"?1:-1;if(s>i)return o==="asc"?-1:1;let a=t.findIndex(u=>u===r),c=t.findIndex(u=>u===n);return a>c?1:c>a?-1:0};function Ea(e,t,o="asc"){return e.concat().sort(Hve(t,e,o))}var{isContentBlock:$M}=M(Ne.privateApis),Gve=3600*1e3,Wve=24*3600*1e3,$ve=168*3600*1e3,_r=[],Kve=new Set,Q8={[Iu]:!0};function kt(e,t){let o=e.blocks.byClientId.get(t),r="core/social-link";if(Z8.Platform.OS!=="web"&&o?.name===r){let n=e.blocks.attributes.get(t),{service:i}=n??{};return i?`${r}-${i}`:r}return o?o.name:null}function Yve(e,t){let o=e.blocks.byClientId.get(t);return!!o&&o.isValid}function Vi(e,t){return e.blocks.byClientId.get(t)?e.blocks.attributes.get(t):null}function Nl(e,t){return e.blocks.byClientId.has(t)?e.blocks.tree.get(t):null}var qve=(0,Pe.createSelector)((e,t)=>{let o=e.blocks.byClientId.get(t);return o?{...o,attributes:Vi(e,t)}:null},(e,t)=>[e.blocks.byClientId.get(t),e.blocks.attributes.get(t)]);function Zve(e,t){let o=!t||!uC(e,t)?t||"":"controlled||"+t;return e.blocks.tree.get(o)?.innerBlocks||_r}var J8=(0,Pe.createSelector)((e,t)=>((0,Zn.default)("wp.data.select( 'core/block-editor' ).__unstableGetClientIdWithClientIdsTree",{since:"6.3",version:"6.5"}),{clientId:t,innerBlocks:e9(e,t)}),e=>[e.blocks.order]),e9=(0,Pe.createSelector)((e,t="")=>((0,Zn.default)("wp.data.select( 'core/block-editor' ).__unstableGetClientIdsTree",{since:"6.3",version:"6.5"}),Ar(e,t).map(o=>J8(e,o))),e=>[e.blocks.order]),t9=(0,Pe.createSelector)((e,t)=>{t=Array.isArray(t)?[...t]:[t];let o=[];for(let n of t){let i=e.blocks.order.get(n);i&&o.push(...i)}let r=0;for(;r<o.length;){let n=o[r],i=e.blocks.order.get(n);i&&o.splice(r+1,0,...i),r++}return o},e=>[e.blocks.order]),_h=e=>t9(e,""),Xve=(0,Pe.createSelector)((e,t)=>{let o=_h(e);if(!t)return o.length;let r=0;for(let n of o)e.blocks.byClientId.get(n).name===t&&r++;return r},e=>[e.blocks.order,e.blocks.byClientId]),o9=(0,Pe.createSelector)((e,t)=>{if(!t)return _r;let o=Array.isArray(t)?t:[t],n=_h(e).filter(i=>{let s=e.blocks.byClientId.get(i);return o.includes(s.name)});return n.length>0?n:_r},e=>[e.blocks.order,e.blocks.byClientId]);function Qve(e,t){return(0,Zn.default)("wp.data.select( 'core/block-editor' ).__experimentalGetGlobalBlocksByName",{since:"6.5",alternative:"wp.data.select( 'core/block-editor' ).getBlocksByName"}),o9(e,t)}var lC=(0,Pe.createSelector)((e,t)=>(Array.isArray(t)?t:[t]).map(o=>Nl(e,o)),(e,t)=>(Array.isArray(t)?t:[t]).map(o=>e.blocks.tree.get(o))),Jve=(0,Pe.createSelector)((e,t)=>lC(e,t).filter(Boolean).map(o=>o.name),(e,t)=>lC(e,t));function eke(e,t){return Ar(e,t).length}function oy(e){return e.selection.selectionStart}function ry(e){return e.selection.selectionEnd}function tke(e){return e.selection.selectionStart.clientId}function oke(e){return e.selection.selectionEnd.clientId}function rke(e){let t=Pu(e).length;return t||(e.selection.selectionStart.clientId?1:0)}function nke(e){let{selectionStart:t,selectionEnd:o}=e.selection;return!!t.clientId&&t.clientId===o.clientId}function xh(e){let{selectionStart:t,selectionEnd:o}=e.selection,{clientId:r}=t;return!r||r!==o.clientId?null:r}function ike(e){let t=xh(e);return t?Nl(e,t):null}function Fo(e,t){return e.blocks.parents.get(t)??null}var Os=(0,Pe.createSelector)((e,t,o=!1)=>{let r=[],n=t;for(;n=e.blocks.parents.get(n);)r.push(n);return r.length?o?r:r.reverse():_r},e=>[e.blocks.parents]),KM=(0,Pe.createSelector)((e,t,o,r=!1)=>{let n=Os(e,t,r),i=Array.isArray(o)?s=>o.includes(s):s=>o===s;return n.filter(s=>i(kt(e,s)))},e=>[e.blocks.parents]);function ske(e,t){let o=t,r;do r=o,o=e.blocks.parents.get(o);while(o);return r}function ake(e,t){let o=xh(e),r=[...Os(e,t),t],n=[...Os(e,o),o],i,s=Math.min(r.length,n.length);for(let a=0;a<s&&r[a]===n[a];a++)i=r[a];return i}function YM(e,t,o=1){if(t===void 0&&(t=xh(e)),t===void 0&&(o<0?t=qM(e):t=r9(e)),!t)return null;let r=Fo(e,t);if(r===null)return null;let{order:n}=e.blocks,i=n.get(r),a=i.indexOf(t)+1*o;return a<0||a===i.length?null:i[a]}function lke(e,t){return YM(e,t,-1)}function cke(e,t){return YM(e,t,1)}function uke(e){return e.initialPosition}var wh=(0,Pe.createSelector)(e=>{let{selectionStart:t,selectionEnd:o}=e.selection;if(!t.clientId||!o.clientId)return _r;if(t.clientId===o.clientId)return[t.clientId];let r=Fo(e,t.clientId);if(r===null)return _r;let n=Ar(e,r),i=n.indexOf(t.clientId),s=n.indexOf(o.clientId);return i>s?n.slice(s,i+1):n.slice(i,s+1)},e=>[e.blocks.order,e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId]);function Pu(e){let{selectionStart:t,selectionEnd:o}=e.selection;return t.clientId===o.clientId?_r:wh(e)}var dke=(0,Pe.createSelector)(e=>{let t=Pu(e);return t.length?t.map(o=>Nl(e,o)):_r},e=>[...wh.getDependants(e),e.blocks.byClientId,e.blocks.order,e.blocks.attributes]);function qM(e){return Pu(e)[0]||null}function r9(e){let t=Pu(e);return t[t.length-1]||null}function fke(e,t){return qM(e)===t}function n9(e,t){return Pu(e).indexOf(t)!==-1}var mke=(0,Pe.createSelector)((e,t)=>{let o=t,r=!1;for(;o&&!r;)o=Fo(e,o),r=n9(e,o);return r},e=>[e.blocks.order,e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId]);function pke(e){let{selectionStart:t,selectionEnd:o}=e.selection;return t.clientId===o.clientId?null:t.clientId||null}function hke(e){let{selectionStart:t,selectionEnd:o}=e.selection;return t.clientId===o.clientId?null:o.clientId||null}function gke(e){let t=oy(e),o=ry(e);return!t.attributeKey&&!o.attributeKey&&typeof t.offset>"u"&&typeof o.offset>"u"}function bke(e){let t=oy(e),o=ry(e);return!!t&&!!o&&t.clientId===o.clientId&&t.attributeKey===o.attributeKey&&t.offset===o.offset}function vke(e){return wh(e).some(t=>{let o=kt(e,t);return!(0,Ne.getBlockType)(o).merge})}function kke(e,t){let o=oy(e),r=ry(e);if(o.clientId===r.clientId||!o.attributeKey||!r.attributeKey||typeof o.offset>"u"||typeof r.offset>"u")return!1;let n=Fo(e,o.clientId),i=Fo(e,r.clientId);if(n!==i)return!1;let s=Ar(e,n),a=s.indexOf(o.clientId),c=s.indexOf(r.clientId),u,d;a>c?(u=r,d=o):(u=o,d=r);let f=t?d.clientId:u.clientId,m=t?u.clientId:d.clientId,h=kt(e,f);if(!(0,Ne.getBlockType)(h).merge)return!1;let g=Nl(e,m);if(g.name===h)return!0;let b=(0,Ne.switchToBlockType)(g,h);return b&&b.length}var yke=e=>{let t=oy(e),o=ry(e);if(t.clientId===o.clientId||!t.attributeKey||!o.attributeKey||typeof t.offset>"u"||typeof o.offset>"u")return _r;let r=Fo(e,t.clientId),n=Fo(e,o.clientId);if(r!==n)return _r;let i=Ar(e,r),s=i.indexOf(t.clientId),a=i.indexOf(o.clientId),[c,u]=s>a?[o,t]:[t,o],d=Nl(e,c.clientId),f=Nl(e,u.clientId),m=d.attributes[c.attributeKey],h=f.attributes[u.attributeKey],p=(0,Ll.create)({html:m}),g=(0,Ll.create)({html:h});return p=(0,Ll.remove)(p,0,c.offset),g=(0,Ll.remove)(g,u.offset,g.text.length),[{...d,attributes:{...d.attributes,[c.attributeKey]:(0,Ll.toHTMLString)({value:p})}},{...f,attributes:{...f.attributes,[u.attributeKey]:(0,Ll.toHTMLString)({value:g})}}]};function Ar(e,t){return e.blocks.order.get(t||"")||_r}function i9(e,t){let o=Fo(e,t);return Ar(e,o).indexOf(t)}function s9(e,t){let{selectionStart:o,selectionEnd:r}=e.selection;return o.clientId!==r.clientId?!1:o.clientId===t}function a9(e,t,o=!1){let r=wh(e);return r.length?o?r.some(n=>Os(e,n,!0).includes(t)):r.some(n=>Fo(e,n)===t):!1}function l9(e,t,o=!1){return Ar(e,t).some(r=>ZM(e,r)||o&&l9(e,r,o))}function _ke(e,t){if(!t)return!1;let o=Pu(e),r=o.indexOf(t);return r>-1&&r<o.length-1}function Ske(e){let{selectionStart:t,selectionEnd:o}=e.selection;return t.clientId!==o.clientId}function xke(e){return e.isMultiSelecting}function wke(e){return e.isSelectionEnabled}function Cke(e,t){return e.blocksMode[t]||"visual"}function Bke(e){return e.isTyping}function c9(e){return!!e.draggedBlocks.length}function Eke(e){return e.draggedBlocks}function ZM(e,t){return e.draggedBlocks.includes(t)}function Tke(e,t){return c9(e)?Os(e,t).some(r=>ZM(e,r)):!1}function Ike(){return(0,Zn.default)('wp.data.select( "core/block-editor" ).isCaretWithinFormattedText',{since:"6.1",version:"6.3"}),!1}var Pke=(0,Pe.createSelector)(e=>{let t,o,{insertionCue:r,selection:{selectionEnd:n}}=e;if(r!==null)return r;let{clientId:i}=n;return i?(t=Fo(e,i)||void 0,o=i9(e,n.clientId)+1):o=Ar(e).length,{rootClientId:t,index:o}},e=>[e.insertionCue,e.selection.selectionEnd.clientId,e.blocks.parents,e.blocks.order]);function Rke(e){return e.insertionCue!==null}function Oke(e){return e.template.isValid}function Ake(e){return e.settings.template}function Ba(e,t){if(!t)return e.settings.templateLock??!1;let o=cC(e,t)?.templateLock;return o==="contentOnly"&&e.editedContentOnlySection===t?!1:o??!1}var XM=(e,t,o=null)=>{let r,n;if(t&&typeof t=="object"?(r=t,n=t.name):(r=(0,Ne.getBlockType)(t),n=t),!r)return!1;let{allowedBlockTypes:i}=Cu(e);if(!mm(i,n,!0))return!1;let a=(Array.isArray(r.parent)?r.parent:[]).concat(Array.isArray(r.ancestor)?r.ancestor:[]);if(a.length>0){if(a.includes("core/post-content"))return!0;let c=o,u=!1;do{if(a.includes(kt(e,c))){u=!0;break}c=e.blocks.parents.get(c)}while(c);return u}return!0},ny=(e,t,o=null)=>{if(e.settings.isPreviewMode||!XM(e,t,o))return!1;let r;t&&typeof t=="object"?(r=t,t=r.name):r=(0,Ne.getBlockType)(t);let n=Ba(e,o);if(n&&n!=="contentOnly")return!1;let i=Fi(e,o??""),s=!!Eu(e,o),a=s?o:Bu(e,o),c=!!a;if(i==="disabled"&&(!c||t!==(0,Ne.getDefaultBlockName)()))return!1;let u=cC(e,o);if(o&&u===void 0)return!1;let d=$M(t);if(c&&!d||c&&kt(e,a)==="core/block")return!1;if(c&&(s||i==="contentOnly"||i==="disabled")&&!qk(e,t,o)){let _=(0,Ne.getDefaultBlockName)();if(t===_){if(!Ar(e,o).some(B=>kt(e,B)===_))return!1}else return!1}let f=kt(e,o),h=(0,Ne.getBlockType)(f)?.allowedBlocks,p=mm(h,t);if(p!==!1){let _=u?.allowedBlocks,S=mm(_,t);S!==null&&(p=S)}let g=r.parent,b=mm(g,f),k=!0,v=r.ancestor;v&&(k=[o,...Os(e,o)].some(S=>mm(v,kt(e,S))));let y=k&&(p===null&&b===null||p===!0||b===!0);return y&&(0,X8.applyFilters)("blockEditor.__unstableCanInsertBlockType",y,r,o,{getBlock:Nl.bind(null,e),getBlockParentsByBlockName:KM.bind(null,e)})},dm=(0,Pe.createRegistrySelector)(e=>(0,Pe.createSelector)(ny,(t,o,r)=>Tu(e)(t,r)));function Lke(e,t,o=null){return t.every(r=>dm(e,kt(e,r),o))}function QM(e,t){if(e.settings.isPreviewMode)return!1;let o=Vi(e,t);if(o===null)return!0;if(o.lock?.remove!==void 0)return!o.lock.remove;let r=Fo(e,t),n=Ba(e,r);if(n&&n!=="contentOnly")return!1;let i=!!Eu(e,r),s=i?r:Bu(e,r),a=!!s,c=$M(kt(e,t));if(a&&!c||a&&kt(e,s)==="core/block")return!1;let u=Fi(e,r),d=kt(e,t),f=(0,Ne.getDefaultBlockName)();return a&&(i||d===f||u==="contentOnly")&&!qk(e,kt(e,t),r)?d===f?Ar(e,r).filter(p=>kt(e,p)===f).length>1:!1:u!=="disabled"}function u9(e,t){return t.every(o=>QM(e,o))}function d9(e,t){if(e.settings.isPreviewMode)return!1;let o=Vi(e,t);if(o===null)return!0;if(o.lock?.move!==void 0)return!o.lock.move;let r=Fo(e,t);if(Ba(e,r)==="all")return!1;let i=!!Bu(e,t),s=$M(kt(e,t));if(i&&!s)return!1;let a=!!Eu(e,r),c=Fi(e,r);return i&&(a||c==="contentOnly")&&!qk(e,kt(e,t),r)?!1:Fi(e,r)!=="disabled"}function Nke(e,t){return t.every(o=>d9(e,o))}function f9(e,t){if(e.settings.isPreviewMode)return!1;let o=Vi(e,t);if(o===null)return!0;let{lock:r}=o;return!r?.edit}function Mke(e,t){return e.settings.isPreviewMode||!(0,Ne.hasBlockSupport)(t,"lock",!0)?!1:!!e.settings?.canLockBlocks}function JM(e,t){return e.preferences.insertUsage?.[t]??null}var ty=(e,t,o)=>(0,Ne.hasBlockSupport)(t,"inserter",!0)?ny(e,t.name,o):!1,Dke=(e,t)=>o=>{let r=`${t.id}/${o.name}`,{time:n,count:i=0}=JM(e,r)||{};return{...t,id:r,icon:o.icon||t.icon,title:o.title||t.title,description:o.description||t.description,category:o.category||t.category,example:o.hasOwnProperty("example")?o.example:t.example,initialAttributes:{...t.initialAttributes,...o.attributes},innerBlocks:o.innerBlocks,keywords:o.keywords||t.keywords,frecency:e5(n,i),isSearchOnly:o.isSearchOnly}},e5=(e,t)=>{if(!e)return t;let o=Date.now()-e;switch(!0){case o<Gve:return t*4;case o<Wve:return t*2;case o<$ve:return t/2;default:return t/4}},m9=(e,{buildScope:t="inserter"})=>o=>{let r=o.name,n=!1;(0,Ne.hasBlockSupport)(o.name,"multiple",!0)||(n=lC(e,_h(e)).some(({name:f})=>f===o.name));let{time:i,count:s=0}=JM(e,r)||{},a={id:r,name:o.name,title:o.title,icon:o.icon,isDisabled:n,frecency:e5(i,s)};if(t==="transform")return a;let c=(0,Ne.getBlockVariations)(o.name,"inserter"),u=(0,Ne.getBlockVariations)(o.name,"block"),d=[...c,...u.filter(f=>o.name==="core/heading"&&["h1","h2","h3","h4","h5","h6"].includes(f.name)).map(f=>({...f,isSearchOnly:!0}))];return{...a,initialAttributes:{},description:o.description,category:o.category,keywords:o.keywords,parent:o.parent,ancestor:o.ancestor,variations:d,example:o.example,utility:1}},Vke=(0,Pe.createRegistrySelector)(e=>(0,Pe.createSelector)((t,o=null,r=Q8)=>{let n=h=>{let p=h.wp_pattern_sync_status?Di:{src:Di,foreground:"var(--wp-block-synced-color)"},g=Zk(h),{time:b,count:k=0}=JM(t,g.name)||{},v=e5(b,k);return{id:g.name,name:"core/block",initialAttributes:{ref:h.id},title:g.title,icon:p,category:"reusable",keywords:["reusable"],isDisabled:!1,utility:1,frecency:v,content:g.content,get blocks(){return aC(g).blocks},syncStatus:g.syncStatus}},i=ny(t,"core/block",o)?M(e(Jt)).getReusableBlocks().map(n):[],s=m9(t,{buildScope:"inserter"}),a=(0,Ne.getBlockTypes)().filter(h=>(0,Ne.hasBlockSupport)(h,"inserter",!0)).map(s);if(r[Iu]!==!1)a=a.filter(h=>ty(t,h,o));else{let{getClosestAllowedInsertionPoint:h}=M(e(Jt));a=a.filter(p=>XM(t,p,o)&&h(p.name,o)!==null).map(p=>({...p,isAllowedInCurrentRoot:ty(t,p,o)}))}let c=a.reduce((h,p)=>{let{variations:g=[]}=p;if(g.some(({isDefault:b})=>b)||h.push(p),g.length){let b=Dke(t,p);h.push(...g.map(b))}return h},[]),u=(h,p)=>{let{core:g,noncore:b}=h;return(p.name.startsWith("core/")?g:b).push(p),h},{core:d,noncore:f}=c.reduce(u,{core:[],noncore:[]});return[...[...d,...f],...i]},(t,o)=>[(0,Ne.getBlockTypes)(),M(e(Jt)).getReusableBlocks(),t.blocks.order,t.preferences.insertUsage,...Tu(e)(t,o)])),Fke=(0,Pe.createRegistrySelector)(e=>(0,Pe.createSelector)((t,o,r=null)=>{let n=Array.isArray(o)?o:[o],i=m9(t,{buildScope:"transform"}),s=(0,Ne.getBlockTypes)().filter(u=>ty(t,u,r)).map(i),a=Object.fromEntries(Object.entries(s).map(([,u])=>[u.name,u])),c=(0,Ne.getPossibleBlockTransformations)(n).reduce((u,d)=>(a[d?.name]&&u.push(a[d.name]),u),[]);return Ea(c,u=>a[u.name].frecency,"desc")},(t,o,r)=>[(0,Ne.getBlockTypes)(),t.preferences.insertUsage,...Tu(e)(t,r)])),zke=(e,t=null)=>(0,Ne.getBlockTypes)().some(n=>ty(e,n,t))?!0:ny(e,"core/block",t),WM=(0,Pe.createRegistrySelector)(e=>(0,Pe.createSelector)((t,o=null)=>{if(!o)return;let r=(0,Ne.getBlockTypes)().filter(i=>ty(t,i,o));return ny(t,"core/block",o)&&r.push("core/block"),r},(t,o)=>[(0,Ne.getBlockTypes)(),...Tu(e)(t,o)])),jke=(0,Pe.createSelector)((e,t=null)=>((0,Zn.default)('wp.data.select( "core/block-editor" ).__experimentalGetAllowedBlocks',{alternative:'wp.data.select( "core/block-editor" ).getAllowedBlocks',since:"6.2",version:"6.4"}),WM(e,t)),(e,t)=>WM.getDependants(e,t));function p9(e,t=null){if(!t)return;let{defaultBlock:o,directInsert:r}=e.blockListSettings.get(t)??{};if(!(!o||!r))return o}function Uke(e,t=null){return(0,Zn.default)('wp.data.select( "core/block-editor" ).__experimentalGetDirectInsertBlock',{alternative:'wp.data.select( "core/block-editor" ).getDirectInsertBlock',since:"6.3",version:"6.4"}),p9(e,t)}var Hke=(0,Pe.createRegistrySelector)(e=>(t,o)=>{let r=M(e(Jt)).getPatternBySlug(o);return r?aC(r):null}),t5=e=>(t,o)=>[...Qk(e)(t),...Tu(e)(t,o)],q8=new WeakMap;function Gke(e){let t=q8.get(e);return t||(t={...e,get blocks(){return aC(e).blocks}},q8.set(e,t)),t}var Wke=(0,Pe.createRegistrySelector)(e=>(0,Pe.createSelector)((t,o=null,r=Q8)=>{let{getAllPatterns:n}=M(e(Jt)),i=n(),{allowedBlockTypes:s}=Cu(t);return i.filter(({inserter:d=!0})=>!!d).map(Gke).filter(d=>Xk(cm(d),s)).filter(d=>cm(d).every(({blockName:f})=>r[Iu]!==!1?dm(t,f,o):XM(t,f,o)))},t5(e))),$ke=(0,Pe.createRegistrySelector)(e=>(0,Pe.createSelector)((t,o,r=null)=>{if(!o)return _r;let n=e(Jt).__experimentalGetAllowedPatterns(r),i=Array.isArray(o)?o:[o],s=n.filter(a=>a?.blockTypes?.some?.(c=>i.includes(c)));return s.length===0?_r:s},(t,o,r)=>t5(e)(t,r))),Kke=(0,Pe.createRegistrySelector)(e=>((0,Zn.default)('wp.data.select( "core/block-editor" ).__experimentalGetPatternsByBlockTypes',{alternative:'wp.data.select( "core/block-editor" ).getPatternsByBlockTypes',since:"6.2",version:"6.4"}),e(Jt).getPatternsByBlockTypes)),Yke=(0,Pe.createRegistrySelector)(e=>(0,Pe.createSelector)((t,o,r=null)=>{if(!o||o.some(({clientId:i,innerBlocks:s})=>s.length||uC(t,i)))return _r;let n=Array.from(new Set(o.map(({name:i})=>i)));return e(Jt).getPatternsByBlockTypes(n,r)},(t,o,r)=>t5(e)(t,r)));function cC(e,t){return e.blockListSettings.get(t)}function Cu(e){return e.settings}function qke(e){return e.blocks.isPersistentChange}var Zke=(0,Pe.createSelector)((e,t=[])=>{let o={};for(let r of t){let n=cC(e,r);n&&(o[r]=n)}return o},e=>[e.blockListSettings]),Xke=(0,Pe.createRegistrySelector)(e=>(0,Pe.createSelector)((t,o)=>{(0,Zn.default)("wp.data.select( 'core/block-editor' ).__experimentalGetReusableBlockTitle",{since:"6.6",version:"6.8"});let r=M(e(Jt)).getReusableBlocks().find(n=>n.id===o);return r?r.title?.raw:null},()=>[M(e(Jt)).getReusableBlocks()]));function Qke(e){return e.blocks.isIgnoredChange}function Jke(e){return e.lastBlockAttributesChange}function eye(){return(0,Zn.default)('wp.data.select( "core/block-editor" ).hasBlockMovingClientId',{since:"6.7",hint:"Block moving mode feature has been removed"}),!1}function tye(e){return!!e.automaticChangeStatus}function oye(e,t){return e.highlightedBlock===t}function uC(e,t){return e.blocks.controlledInnerBlocks.has(t)}var rye=(0,Pe.createSelector)((e,t)=>{if(!t.length)return null;let o=xh(e);if(t.includes(kt(e,o)))return o;let r=Pu(e),n=KM(e,o||r[0],t);return n?n[n.length-1]:null},(e,t)=>[e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId,t]);function nye(e,t,o){let{lastBlockInserted:r}=e;return r.clientIds?.includes(t)&&r.source===o}function iye(e,t){return e.blockVisibility?.[t]??!0}function sye(){(0,Zn.default)("wp.data.select( 'core/block-editor' ).getHoveredBlockClientId",{since:"6.9",version:"7.1"})}var aye=(0,Pe.createSelector)(e=>{let t=new Set(Object.keys(e.blockVisibility).filter(o=>e.blockVisibility[o]));return t.size===0?Kve:t},e=>[e.blockVisibility]);function h9(e,t){if(Fi(e,t)!=="default")return!1;if(!f9(e,t))return!0;if(HM(e)){let n=um(e);if(n){if(Ar(e,n)?.includes(t))return!0}else if(t&&!Fo(e,t))return!0}return((0,Ne.hasBlockSupport)(kt(e,t),"__experimentalDisableBlockOverlay",!1)?!1:uC(e,t))&&!s9(e,t)&&!a9(e,t,!0)}function lye(e,t){let o=e.blocks.parents.get(t);for(;o;){if(h9(e,o))return!0;o=e.blocks.parents.get(o)}return!1}function Fi(e,t=""){return t===null&&(t=""),e.derivedBlockEditingModes?.has(t)?e.derivedBlockEditingModes.get(t):e.blocks.blockEditingModes.has(t)?e.blocks.blockEditingModes.get(t):"default"}var cye=(0,Pe.createRegistrySelector)(e=>(t,o="")=>{let r=o||xh(t);if(!r||Eu(t,r))return!1;let{getGroupingBlockName:n}=e(Ne.store),i=Nl(t,r),s=n();return i&&(i.name===s||(0,Ne.getBlockType)(i.name)?.transforms?.ungroup)&&!!i.innerBlocks.length&&QM(t,r)}),uye=(0,Pe.createRegistrySelector)(e=>(t,o=_r)=>{let{getGroupingBlockName:r}=e(Ne.store),n=r(),i=o?.length?o:wh(t),s=i?.length?Fo(t,i[0]):void 0;return dm(t,n,s)&&i.length&&u9(t,i)}),dye=(e,t)=>((0,Zn.default)("wp.data.select( 'core/block-editor' ).__unstableGetContentLockingParent",{since:"6.1",version:"6.7"}),zM(e,t));function fye(e){return(0,Zn.default)("wp.data.select( 'core/block-editor' ).__unstableGetTemporarilyEditingAsBlocks",{since:"6.1",version:"6.7"}),jM(e)}var dC={};wa(dC,{__experimentalUpdateSettings:()=>r5,clearBlockRemovalPrompt:()=>vye,clearRequestedInspectorTab:()=>Mye,closeListViewContentPanel:()=>Oye,deleteStyleOverride:()=>_ye,editContentOnlySection:()=>i5,ensureDefaultBlock:()=>_9,expandBlock:()=>Cye,hideBlockInterface:()=>hye,hideViewportModal:()=>Lye,openListViewContentPanel:()=>Rye,privateRemoveBlocks:()=>n5,requestInspectorTab:()=>Nye,resetZoomLevel:()=>Iye,setBlockRemovalRules:()=>kye,setInsertionPoint:()=>Bye,setLastFocus:()=>Sye,setStyleOverride:()=>yye,setZoomLevel:()=>Tye,showBlockInterface:()=>gye,showViewportModal:()=>Aye,startDragging:()=>xye,stopDragging:()=>wye,stopEditingContentOnlySection:()=>Eye,toggleBlockSpotlight:()=>Pye});var b9=l(R(),1),v9=l(Le(),1),k9=l(sr(),1),y9=l(N(),1),mye=e=>Array.isArray(e)?e:[e],pye=["inserterMediaCategories","blockInspectorAnimation","mediaSideload"];function r5(e,{stripExperimentalSettings:t=!1,reset:o=!1}={}){let r=e;Object.hasOwn(r,"__unstableIsPreviewMode")&&((0,v9.default)("__unstableIsPreviewMode argument in wp.data.dispatch('core/block-editor').updateSettings",{since:"6.8",alternative:"isPreviewMode"}),r={...r},r.isPreviewMode=r.__unstableIsPreviewMode,delete r.__unstableIsPreviewMode);let n=r;if(t&&b9.Platform.OS==="web"){n={};for(let i in r)pye.includes(i)||(n[i]=r[i])}return{type:"UPDATE_SETTINGS",settings:n,reset:o}}function hye(){return{type:"HIDE_BLOCK_INTERFACE"}}function gye(){return{type:"SHOW_BLOCK_INTERFACE"}}var n5=(e,t=!0,o=!1)=>({select:r,dispatch:n,registry:i})=>{if(!e||!e.length||(e=mye(e),!r.canRemoveBlocks(e)))return;let a=!o&&r.getBlockRemovalRules();if(a){let u=function(h){let p=[],g=[...h];for(;g.length;){let{innerBlocks:b,...k}=g.shift();g.push(...b),p.push(k)}return p};var c=u;let d=e.map(r.getBlock),f=u(d),m;for(let h of a)if(m=h.callback(f),m){n(bye(e,t,m));return}}t&&n.selectPreviousBlock(e[0],t),i.batch(()=>{n({type:"REMOVE_BLOCKS",clientIds:e}),n(_9())})},_9=()=>({select:e,dispatch:t})=>{if(e.getBlockCount()>0)return;let{__unstableHasCustomAppender:r}=e.getSettings();r||t.insertDefaultBlock()};function bye(e,t,o){return{type:"DISPLAY_BLOCK_REMOVAL_PROMPT",clientIds:e,selectPrevious:t,message:o}}function vye(){return{type:"CLEAR_BLOCK_REMOVAL_PROMPT"}}function kye(e=!1){return{type:"SET_BLOCK_REMOVAL_RULES",rules:e}}function yye(e,t){return{type:"SET_STYLE_OVERRIDE",id:e,style:t}}function _ye(e){return{type:"DELETE_STYLE_OVERRIDE",id:e}}function Sye(e=null){return{type:"LAST_FOCUS",lastFocus:e}}function xye(){return{type:"START_DRAGGING"}}function wye(){return{type:"STOP_DRAGGING"}}function Cye(e){return{type:"SET_BLOCK_EXPANDED_IN_LIST_VIEW",clientId:e}}function Bye(e){return{type:"SET_INSERTION_POINT",value:e}}function i5(e){return{type:"EDIT_CONTENT_ONLY_SECTION",clientId:e}}function Eye(){return{type:"EDIT_CONTENT_ONLY_SECTION"}}var Tye=(e=100)=>({select:t,dispatch:o})=>{if(e!==100){let r=t.getBlockSelectionStart(),n=t.getSectionRootClientId();if(r){let i;if(n){let s=t.getBlockOrder(n);s?.includes(r)?i=r:i=t.getBlockParents(r).find(a=>s.includes(a))}else i=t.getBlockHierarchyRootClientId(r);i?o.selectBlock(i):o.clearSelectedBlock(),(0,k9.speak)((0,y9.__)("You are currently in zoom-out mode."))}}o({type:"SET_ZOOM_LEVEL",zoom:e})};function Iye(){return{type:"RESET_ZOOM_LEVEL"}}function Pye(e,t){return{type:"TOGGLE_BLOCK_SPOTLIGHT",clientId:e,hasBlockSpotlight:t}}function Rye(){return{type:"OPEN_LIST_VIEW_CONTENT_PANEL"}}function Oye(){return{type:"CLOSE_LIST_VIEW_CONTENT_PANEL"}}function Aye(e){return{type:"SHOW_VIEWPORT_MODAL",clientIds:e}}function Lye(){return{type:"HIDE_VIEWPORT_MODAL"}}function Nye(e,t={}){return{type:"REQUEST_INSPECTOR_TAB",tabName:e,options:t}}function Mye(){return{type:"CLEAR_REQUESTED_INSPECTOR_TAB"}}var l5={};wa(l5,{__unstableDeleteSelection:()=>s_e,__unstableExpandSelection:()=>l_e,__unstableIncrementListViewExpandRevision:()=>U_e,__unstableMarkAutomaticChange:()=>B_e,__unstableMarkLastChangeAsPersistent:()=>w_e,__unstableMarkNextChangeAsNotPersistent:()=>C_e,__unstableSaveReusableBlock:()=>x_e,__unstableSetAllListViewPanelsOpen:()=>z_e,__unstableSetEditorMode:()=>E_e,__unstableSetOpenListViewPanel:()=>F_e,__unstableSetTemporarilyEditingAsBlocks:()=>N_e,__unstableSplitSelection:()=>a_e,__unstableToggleListViewPanel:()=>j_e,clearSelectedBlock:()=>qye,duplicateBlocks:()=>I_e,enterFormattedText:()=>b_e,exitFormattedText:()=>v_e,flashBlock:()=>O_e,hideInsertionPoint:()=>r_e,hoverBlock:()=>Hye,insertAfterBlock:()=>R_e,insertBeforeBlock:()=>P_e,insertBlock:()=>t_e,insertBlocks:()=>R9,insertDefaultBlock:()=>y_e,mergeBlocks:()=>c_e,moveBlockToPosition:()=>e_e,moveBlocksDown:()=>Qye,moveBlocksToPosition:()=>P9,moveBlocksUp:()=>Jye,multiSelect:()=>Yye,receiveBlocks:()=>Fye,registerInserterMediaCategory:()=>M_e,removeBlock:()=>u_e,removeBlocks:()=>O9,replaceBlock:()=>Xye,replaceBlocks:()=>T9,replaceInnerBlocks:()=>d_e,resetBlocks:()=>Dye,resetSelection:()=>Vye,selectBlock:()=>Uye,selectNextBlock:()=>Wye,selectPreviousBlock:()=>Gye,selectionChange:()=>k_e,setBlockEditingMode:()=>D_e,setBlockMovingClientId:()=>T_e,setBlockVisibility:()=>L_e,setHasControlledInnerBlocks:()=>A_e,setTemplateValidity:()=>n_e,showInsertionPoint:()=>o_e,startDraggingBlocks:()=>h_e,startMultiSelect:()=>$ye,startTyping:()=>m_e,stopDraggingBlocks:()=>g_e,stopMultiSelect:()=>Kye,stopTyping:()=>p_e,synchronizeTemplate:()=>i_e,toggleBlockHighlight:()=>a5,toggleBlockMode:()=>f_e,toggleSelection:()=>Zye,unsetBlockEditingMode:()=>V_e,updateBlock:()=>jye,updateBlockAttributes:()=>zye,updateBlockListSettings:()=>__e,updateSettings:()=>S_e,validateBlocksToTemplate:()=>E9});var ve=l(K(),1),fC=l(sr(),1),Ru=l(N(),1),C9=l(Xn(),1),yt=l(yr(),1),Dl=l(Le(),1),B9=l(Ch(),1);var w9=l(yr(),1),Ml="\x86";function iy(e){if(e)return Object.keys(e).find(t=>{let o=e[t];return(typeof o=="string"||o instanceof w9.RichTextData)&&o.toString().indexOf(Ml)!==-1})}function s5(e){for(let[t,o]of Object.entries(e.attributes))if(o.source==="rich-text"||o.source==="html")return t}var Bh=e=>Array.isArray(e)?e:[e],Dye=e=>({dispatch:t})=>{t({type:"RESET_BLOCKS",blocks:e}),t(E9(e))},E9=e=>({select:t,dispatch:o})=>{let r=t.getTemplate(),n=t.getTemplateLock(),i=!r||n!=="all"||(0,ve.doBlocksMatchTemplate)(e,r),s=t.isValidTemplate();if(i!==s)return o.setTemplateValidity(i),i};function Vye(e,t,o){return{type:"RESET_SELECTION",selectionStart:e,selectionEnd:t,initialPosition:o}}function Fye(e){return(0,Dl.default)('wp.data.dispatch( "core/block-editor" ).receiveBlocks',{since:"5.9",alternative:"resetBlocks or insertBlocks"}),{type:"RECEIVE_BLOCKS",blocks:e}}function zye(e,t,o={uniqueByBlock:!1}){return typeof o=="boolean"&&(o={uniqueByBlock:o}),{type:"UPDATE_BLOCK_ATTRIBUTES",clientIds:Bh(e),attributes:t,options:o}}function jye(e,t){return{type:"UPDATE_BLOCK",clientId:e,updates:t}}function Uye(e,t=0){return{type:"SELECT_BLOCK",initialPosition:t,clientId:e}}function Hye(){return(0,Dl.default)('wp.data.dispatch( "core/block-editor" ).hoverBlock',{since:"6.9",version:"7.1"}),{type:"DO_NOTHING"}}var Gye=(e,t=!1)=>({select:o,dispatch:r})=>{let n=o.getPreviousBlockClientId(e);if(n)r.selectBlock(n,-1);else if(t){let i=o.getBlockRootClientId(e);if(i)r.selectBlock(i,-1);else{let s=o.getNextBlockClientId(e);s&&r.selectBlock(s,0)}}},Wye=e=>({select:t,dispatch:o})=>{let r=t.getNextBlockClientId(e);r&&o.selectBlock(r)};function $ye(){return{type:"START_MULTI_SELECT"}}function Kye(){return{type:"STOP_MULTI_SELECT"}}var Yye=(e,t,o=0)=>({select:r,dispatch:n})=>{let i=r.getBlockRootClientId(e),s=r.getBlockRootClientId(t);if(i!==s)return;n({type:"MULTI_SELECT",start:e,end:t,initialPosition:o});let a=r.getSelectedBlockCount();(0,fC.speak)((0,Ru.sprintf)((0,Ru._n)("%s block selected.","%s blocks selected.",a),a),"assertive")};function qye(){return{type:"CLEAR_SELECTED_BLOCK"}}function Zye(e=!0){return{type:"TOGGLE_SELECTION",isSelectionEnabled:e}}var T9=(e,t,o,r=0,n)=>({select:i,dispatch:s,registry:a})=>{e=Bh(e),t=Bh(t);let c=i.getBlockRootClientId(e[0]);for(let u=0;u<t.length;u++){let d=t[u];if(!i.canInsertBlockType(d.name,c))return}a.batch(()=>{s({type:"REPLACE_BLOCKS",clientIds:e,blocks:t,time:Date.now(),indexToSelect:o,initialPosition:r,meta:n}),s.ensureDefaultBlock()})};function Xye(e,t){return T9(e,t)}var I9=e=>(t,o)=>({select:r,dispatch:n})=>{r.canMoveBlocks(t)&&n({type:e,clientIds:Bh(t),rootClientId:o})},Qye=I9("MOVE_BLOCKS_DOWN"),Jye=I9("MOVE_BLOCKS_UP"),P9=(e,t="",o="",r)=>({select:n,dispatch:i})=>{n.canMoveBlocks(e)&&(t!==o&&(!n.canRemoveBlocks(e)||!n.canInsertBlocks(e,o))||i({type:"MOVE_BLOCKS_TO_POSITION",fromRootClientId:t,toRootClientId:o,clientIds:e,index:r}))};function e_e(e,t="",o="",r){return P9([e],t,o,r)}function t_e(e,t,o,r,n,i){return R9([e],t,o,r,n,i)}var R9=(e,t,o,r=!0,n=0,i)=>({select:s,dispatch:a})=>{n!==null&&typeof n=="object"&&(i=n,n=0,(0,Dl.default)("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=Bh(e);let c=[];for(let u of e)s.canInsertBlockType(u.name,o)&&c.push(u);c.length&&a({type:"INSERT_BLOCKS",blocks:c,index:t,rootClientId:o,time:Date.now(),updateSelection:r,initialPosition:r?n:null,meta:i})};function o_e(e,t,o={}){let{__unstableWithInserter:r,operation:n,nearestSide:i}=o;return{type:"SHOW_INSERTION_POINT",rootClientId:e,index:t,__unstableWithInserter:r,operation:n,nearestSide:i}}var r_e=()=>({select:e,dispatch:t})=>{e.isBlockInsertionPointVisible()&&t({type:"HIDE_INSERTION_POINT"})};function n_e(e){return{type:"SET_TEMPLATE_VALIDITY",isValid:e}}var i_e=()=>({select:e,dispatch:t})=>{t({type:"SYNCHRONIZE_TEMPLATE"});let o=e.getBlocks(),r=e.getTemplate(),n=(0,ve.synchronizeBlocksWithTemplate)(o,r);t.resetBlocks(n)},s_e=e=>({registry:t,select:o,dispatch:r})=>{let n=o.getSelectionStart(),i=o.getSelectionEnd();if(n.clientId===i.clientId)return;if(!n.attributeKey||!i.attributeKey||typeof n.offset>"u"||typeof i.offset>"u")return!1;let s=o.getBlockRootClientId(n.clientId),a=o.getBlockRootClientId(i.clientId);if(s!==a)return;let c=o.getBlockOrder(s),u=c.indexOf(n.clientId),d=c.indexOf(i.clientId),f,m;u>d?(f=i,m=n):(f=n,m=i);let h=e?m:f,p=o.getBlock(h.clientId),g=(0,ve.getBlockType)(p.name);if(!g.merge)return;let b=f,k=m,v=o.getBlock(b.clientId),y=o.getBlock(k.clientId),_=v.attributes[b.attributeKey],S=y.attributes[k.attributeKey],C=(0,yt.create)({html:_}),B=(0,yt.create)({html:S});C=(0,yt.remove)(C,b.offset,C.text.length),B=(0,yt.insert)(B,Ml,0,k.offset);let T=(0,ve.cloneBlock)(v,{[b.attributeKey]:(0,yt.toHTMLString)({value:C})}),I=(0,ve.cloneBlock)(y,{[k.attributeKey]:(0,yt.toHTMLString)({value:B})}),E=e?T:I,L=v.name===y.name?[E]:(0,ve.switchToBlockType)(E,g.name);if(!L||!L.length)return;let P;if(e){let J=L.pop();P=g.merge(J.attributes,I.attributes)}else{let J=L.shift();P=g.merge(T.attributes,J.attributes)}let O=iy(P),V=P[O],j=(0,yt.create)({html:V}),H=j.text.indexOf(Ml),z=(0,yt.remove)(j,H,H+1),U=(0,yt.toHTMLString)({value:z});P[O]=U;let G=o.getSelectedBlockClientIds(),W=[...e?L:[],{...p,attributes:{...p.attributes,...P}},...e?[]:L];t.batch(()=>{r.selectionChange(p.clientId,O,H,H),r.replaceBlocks(G,W,0,o.getSelectedBlocksInitialCaretPosition())})},a_e=(e=[])=>({registry:t,select:o,dispatch:r})=>{let n=o.getSelectionStart(),i=o.getSelectionEnd(),s=o.getBlockRootClientId(n.clientId),a=o.getBlockRootClientId(i.clientId);if(s!==a)return;let c=o.getBlockOrder(s),u=c.indexOf(n.clientId),d=c.indexOf(i.clientId),f,m;u>d?(f=i,m=n):(f=n,m=i);let h=f,p=m,g=o.getBlock(h.clientId),b=o.getBlock(p.clientId),k=(0,ve.getBlockType)(g.name),v=(0,ve.getBlockType)(b.name),y=typeof h.attributeKey=="string"?h.attributeKey:s5(k),_=typeof p.attributeKey=="string"?p.attributeKey:s5(v),S=o.getBlockAttributes(h.clientId);if(S?.metadata?.bindings?.[y]){if(e.length){let{createWarningNotice:oe}=t.dispatch(C9.store);oe((0,Ru.__)("Blocks can't be inserted into other blocks with bindings"),{type:"snackbar"});return}r.insertAfterBlock(h.clientId);return}if(!y||!_||typeof n.offset>"u"||typeof i.offset>"u")return;if(h.clientId===p.clientId&&y===_&&h.offset===p.offset){if(e.length){if((0,ve.isUnmodifiedDefaultBlock)(g,"content")){r.replaceBlocks([h.clientId],e,e.length-1,-1);return}}else if(!o.getBlockOrder(h.clientId).length){let oe=function(){let Q=(0,ve.getDefaultBlockName)();return o.canInsertBlockType(Q,s)?(0,ve.createBlock)(Q):(0,ve.createBlock)(o.getBlockName(h.clientId))};var B=oe;let re=S[y].length;if(h.offset===0&&re){r.insertBlocks([oe()],o.getBlockIndex(h.clientId),s,!1);return}if(h.offset===re){r.insertBlocks([oe()],o.getBlockIndex(h.clientId)+1,s);return}}}let T=g.attributes[y],I=b.attributes[_],E=(0,yt.create)({html:T}),L=(0,yt.create)({html:I});E=(0,yt.remove)(E,h.offset,E.text.length),L=(0,yt.remove)(L,0,p.offset);let P={...g,innerBlocks:g.clientId===b.clientId?[]:g.innerBlocks,attributes:{...g.attributes,[y]:(0,yt.toHTMLString)({value:E})}},O={...b,clientId:g.clientId===b.clientId?(0,ve.createBlock)(b.name).clientId:b.clientId,attributes:{...b.attributes,[_]:(0,yt.toHTMLString)({value:L})}},V=(0,ve.getDefaultBlockName)();if(g.clientId===b.clientId&&V&&O.name!==V&&o.canInsertBlockType(V,s)){let oe=(0,ve.switchToBlockType)(O,V);oe?.length===1&&(O=oe[0])}if(!e.length){r.replaceBlocks(o.getSelectedBlockClientIds(),[P,O]);return}let j,H=[],z=[...e],U=z.shift(),G=(0,ve.getBlockType)(P.name),W=G.merge&&U.name===G.name?[U]:(0,ve.switchToBlockType)(U,G.name);if(W?.length){let oe=W.shift();P={...P,attributes:{...P.attributes,...G.merge(P.attributes,oe.attributes)}},H.push(P),j={clientId:P.clientId,attributeKey:y,offset:(0,yt.create)({html:P.attributes[y]}).text.length},z.unshift(...W)}else(0,ve.isUnmodifiedBlock)(P)||H.push(P),H.push(U);let J=z.pop(),le=(0,ve.getBlockType)(O.name);if(z.length&&H.push(...z),J){let oe=le.merge&&le.name===J.name?[J]:(0,ve.switchToBlockType)(J,le.name);if(oe?.length){let re=oe.pop();H.push({...O,attributes:{...O.attributes,...le.merge(re.attributes,O.attributes)}}),H.push(...oe),j={clientId:O.clientId,attributeKey:_,offset:(0,yt.create)({html:re.attributes[_]}).text.length}}else H.push(J),(0,ve.isUnmodifiedBlock)(O)||H.push(O)}else(0,ve.isUnmodifiedBlock)(O)||H.push(O);t.batch(()=>{r.replaceBlocks(o.getSelectedBlockClientIds(),H,H.length-1,0),j&&r.selectionChange(j.clientId,j.attributeKey,j.offset,j.offset)})},l_e=()=>({select:e,dispatch:t})=>{let o=e.getSelectionStart(),r=e.getSelectionEnd();t.selectionChange({start:{clientId:o.clientId},end:{clientId:r.clientId}})},c_e=(e,t)=>({registry:o,select:r,dispatch:n})=>{let i=e,s=t,a=r.getBlock(i),c=(0,ve.getBlockType)(a.name);if(!c||r.getBlockEditingMode(i)==="disabled"||r.getBlockEditingMode(s)==="disabled")return;let u=r.getBlock(s);if(!c.merge&&(0,ve.getBlockSupport)(a.name,"__experimentalOnMerge")){let S=(0,ve.switchToBlockType)(u,c.name);if(S?.length!==1){n.selectBlock(a.clientId);return}let[C]=S;if(C.innerBlocks.length<1){n.selectBlock(a.clientId);return}o.batch(()=>{n.insertBlocks(C.innerBlocks,void 0,i),n.removeBlock(s),n.selectBlock(C.innerBlocks[0].clientId);let B=r.getNextBlockClientId(i);if(B&&r.getBlockName(i)===r.getBlockName(B)){let T=r.getBlockAttributes(i),I=r.getBlockAttributes(B);Object.keys(T).every(E=>T[E]===I[E])&&(n.moveBlocksToPosition(r.getBlockOrder(B),B,i),n.removeBlock(B,!1))}});return}if((0,ve.isUnmodifiedDefaultBlock)(a)){n.removeBlock(i,r.isBlockSelected(i));return}if((0,ve.isUnmodifiedDefaultBlock)(u)){n.removeBlock(s,r.isBlockSelected(s));return}if(!c.merge){(0,ve.isUnmodifiedBlock)(u,"content")?n.removeBlock(s,r.isBlockSelected(s)):n.selectBlock(a.clientId);return}let d=(0,ve.getBlockType)(u.name),{clientId:f,attributeKey:m,offset:h}=r.getSelectionStart(),g=(f===i?c:d).attributes[m],b=(f===i||f===s)&&m!==void 0&&h!==void 0&&!!g;g||(typeof m=="number"?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 m}`):window.console.error("The RichText identifier prop does not match any attributes defined by the block."));let k=(0,ve.cloneBlock)(a),v=(0,ve.cloneBlock)(u);if(b){let S=f===i?k:v,C=S.attributes[m],B=(0,yt.insert)((0,yt.create)({html:C}),Ml,h,h);S.attributes[m]=(0,yt.toHTMLString)({value:B})}let y=a.name===u.name?[v]:(0,ve.switchToBlockType)(v,a.name);if(!y||!y.length)return;let _=c.merge(k.attributes,y[0].attributes);if(b){let S=iy(_),C=_[S],B=(0,yt.create)({html:C}),T=B.text.indexOf(Ml),I=(0,yt.remove)(B,T,T+1),E=(0,yt.toHTMLString)({value:I});_[S]=E,n.selectionChange(a.clientId,S,T,T)}n.replaceBlocks([a.clientId,u.clientId],[{...a,attributes:{...a.attributes,..._}},...y.slice(1)],0)},O9=(e,t=!0)=>n5(e,t);function u_e(e,t){return O9([e],t)}function d_e(e,t,o=!1,r=0){return{type:"REPLACE_INNER_BLOCKS",rootClientId:e,blocks:t,updateSelection:o,initialPosition:o?r:null,time:Date.now()}}function f_e(e){return{type:"TOGGLE_BLOCK_MODE",clientId:e}}function m_e(){return{type:"START_TYPING"}}function p_e(){return{type:"STOP_TYPING"}}function h_e(e=[]){return{type:"START_DRAGGING_BLOCKS",clientIds:e}}function g_e(){return{type:"STOP_DRAGGING_BLOCKS"}}function b_e(){return(0,Dl.default)('wp.data.dispatch( "core/block-editor" ).enterFormattedText',{since:"6.1",version:"6.3"}),{type:"DO_NOTHING"}}function v_e(){return(0,Dl.default)('wp.data.dispatch( "core/block-editor" ).exitFormattedText',{since:"6.1",version:"6.3"}),{type:"DO_NOTHING"}}function k_e(e,t,o,r){return typeof e=="string"?{type:"SELECTION_CHANGE",clientId:e,attributeKey:t,startOffset:o,endOffset:r}:{type:"SELECTION_CHANGE",...e}}var y_e=(e,t,o)=>({dispatch:r})=>{let n=(0,ve.getDefaultBlockName)();if(!n)return;let i=(0,ve.createBlock)(n,e);return r.insertBlock(i,o,t)};function __e(e,t){return{type:"UPDATE_BLOCK_LIST_SETTINGS",clientId:e,settings:t}}function S_e(e){return r5(e,{stripExperimentalSettings:!0})}function x_e(){return(0,Dl.default)('wp.data.dispatch( "core/block-editor" ).__unstableSaveReusableBlock',{since:"7.1"}),{type:"DO_NOTHING"}}function w_e(){return{type:"MARK_LAST_CHANGE_AS_PERSISTENT"}}function C_e(){return{type:"MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"}}var B_e=()=>({dispatch:e})=>{e({type:"MARK_AUTOMATIC_CHANGE"});let{requestIdleCallback:t=o=>setTimeout(o,100)}=window;t(()=>{e({type:"MARK_AUTOMATIC_CHANGE_FINAL"})})},E_e=e=>({registry:t})=>{t.dispatch(B9.store).set("core","editorTool",e),e==="navigation"?(0,fC.speak)((0,Ru.__)("You are currently in Write mode.")):e==="edit"&&(0,fC.speak)((0,Ru.__)("You are currently in Design mode."))};function T_e(){return(0,Dl.default)('wp.data.dispatch( "core/block-editor" ).setBlockMovingClientId',{since:"6.7",hint:"Block moving mode feature has been removed"}),{type:"DO_NOTHING"}}var I_e=(e,t=!0)=>({select:o,dispatch:r})=>{if(!e||!e.length)return;let n=o.getBlocksByClientId(e);if(n.some(d=>!d)||n.map(d=>d.name).some(d=>!(0,ve.hasBlockSupport)(d,"multiple",!0)))return;let s=o.getBlockRootClientId(e[0]),a=Bh(e),c=o.getBlockIndex(a[a.length-1]),u=n.map(d=>(0,ve.__experimentalCloneSanitizedBlock)(d));return r.insertBlocks(u,c+1,s,t),u.length>1&&t&&r.multiSelect(u[0].clientId,u[u.length-1].clientId),u.map(d=>d.clientId)},P_e=e=>({select:t,dispatch:o})=>{if(!e)return;let r=t.getBlockRootClientId(e),n=t.getBlockIndex(e),{defaultBlock:i}=r?t.getBlockListSettings(r)??{}:{};if(!i)return o.insertDefaultBlock({},r,n);let s={};if(i.attributesToCopy){let c=t.getBlockAttributes(e);i.attributesToCopy.forEach(u=>{c[u]&&(s[u]=c[u])})}let a=(0,ve.createBlock)(i.name,{...i.attributes,...s});return o.insertBlock(a,n,r)},R_e=e=>({select:t,dispatch:o})=>{if(!e)return;let r=t.getBlockRootClientId(e),n=t.getBlockIndex(e),{defaultBlock:i}=r?t.getBlockListSettings(r)??{}:{};if(!i)return o.insertDefaultBlock({},r,n+1);let s={};if(i.attributesToCopy){let c=t.getBlockAttributes(e);i.attributesToCopy.forEach(u=>{c[u]&&(s[u]=c[u])})}let a=(0,ve.createBlock)(i.name,{...i.attributes,...s});return o.insertBlock(a,n+1,r)};function a5(e,t){return{type:"TOGGLE_BLOCK_HIGHLIGHT",clientId:e,isHighlighted:t}}var O_e=(e,t=150)=>async({dispatch:o})=>{o(a5(e,!0)),await new Promise(r=>setTimeout(r,t)),o(a5(e,!1))};function A_e(e,t){return{type:"SET_HAS_CONTROLLED_INNER_BLOCKS",hasControlledInnerBlocks:t,clientId:e}}function L_e(e){return{type:"SET_BLOCK_VISIBILITY",updates:e}}function N_e(e){return(0,Dl.default)("wp.data.dispatch( 'core/block-editor' ).__unstableSetTemporarilyEditingAsBlocks",{since:"7.0"}),i5(e)}var M_e=e=>({select:t,dispatch:o})=>{if(!e||typeof e!="object"){console.error("Category should be an `InserterMediaCategory` object.");return}if(!e.name){console.error("Category should have a `name` that should be unique among all media categories.");return}if(!e.labels?.name){console.error("Category should have a `labels.name`.");return}if(!["image","audio","video"].includes(e.mediaType)){console.error("Category should have `mediaType` property that is one of `image|audio|video`.");return}if(!e.fetch||typeof e.fetch!="function"){console.error("Category should have a `fetch` function defined with the following signature `(InserterMediaRequest) => Promise<InserterMediaItem[]>`.");return}let r=t.getRegisteredInserterMediaCategories();if(r.some(({name:n})=>n===e.name)){console.error(`A category is already registered with the same name: "${e.name}".`);return}if(r.some(({labels:{name:n}={}})=>n===e.labels?.name)){console.error(`A category is already registered with the same labels.name: "${e.labels.name}".`);return}o({type:"REGISTER_INSERTER_MEDIA_CATEGORY",category:{...e,isExternalResource:!0}})};function D_e(e="",t){return{type:"SET_BLOCK_EDITING_MODE",clientId:e,mode:t}}function V_e(e=""){return{type:"UNSET_BLOCK_EDITING_MODE",clientId:e}}function F_e(e){return{type:"SET_OPEN_LIST_VIEW_PANEL",clientId:e}}function z_e(){return{type:"SET_ALL_LIST_VIEW_PANELS_OPEN"}}function j_e(e,t){return{type:"TOGGLE_LIST_VIEW_PANEL",clientId:e,isOpen:t}}function U_e(){return{type:"INCREMENT_LIST_VIEW_EXPAND_REVISION"}}var Eh={reducer:P8,selectors:o5,actions:l5},x=(0,mC.createReduxStore)(Jt,{...Eh,persist:["preferences"]}),A9=(0,mC.registerStore)(Jt,{...Eh,persist:["preferences"]});M(A9).registerPrivateActions(dC);M(A9).registerPrivateSelectors(iC);M(x).registerPrivateActions(dC);M(x).registerPrivateSelectors(iC);var Th=l(A(),1),L9=l(N(),1);var As=l(w(),1);function H_e({className:e,actions:t,children:o,secondaryActions:r}){return(0,As.jsx)("div",{style:{display:"contents",all:"initial"},children:(0,As.jsx)("div",{className:D(e,"block-editor-warning"),children:(0,As.jsxs)("div",{className:"block-editor-warning__contents",children:[(0,As.jsx)("p",{className:"block-editor-warning__message",children:o}),(t?.length>0||r)&&(0,As.jsxs)("div",{className:"block-editor-warning__actions",children:[t?.length>0&&t.map((n,i)=>(0,As.jsx)("span",{className:"block-editor-warning__action",children:n},i)),r&&(0,As.jsx)(Th.DropdownMenu,{className:"block-editor-warning__secondary",icon:Ps,label:(0,L9.__)("More options"),popoverProps:{placement:"bottom-end",className:"block-editor-warning__dropdown"},noIcons:!0,children:()=>(0,As.jsx)(Th.MenuGroup,{children:r.map((n,i)=>(0,As.jsx)(Th.MenuItem,{onClick:n.onClick,children:n.title},i))})})]})]})})})}var Ou=H_e;var Ih=l(w(),1);function D9({originalBlockClientId:e,name:t,onReplace:o}){let{selectBlock:r}=(0,M9.useDispatch)(x),n=(0,N9.getBlockType)(t);return(0,Ih.jsxs)(Ou,{actions:[(0,Ih.jsx)(c5.Button,{__next40pxDefaultSize:!0,variant:"secondary",onClick:()=>r(e),children:(0,pC.__)("Find original")},"find-original"),(0,Ih.jsx)(c5.Button,{__next40pxDefaultSize:!0,variant:"secondary",onClick:()=>o([]),children:(0,pC.__)("Remove")},"remove")],children:[(0,Ih.jsxs)("strong",{children:[n?.title,": "]}),(0,pC.__)("This block can only be used once.")]})}var sy=l(w(),1);function bC({mayDisplayControls:e,mayDisplayParentControls:t,mayDisplayPatternEditingControls:o,blockEditingMode:r,isPreviewMode:n,...i}){let{name:s,isSelected:a,clientId:c,attributes:u={},__unstableLayoutClassNames:d}=i,{layout:f=null,metadata:m={}}=u,{bindings:h}=m,p=(0,hC.hasBlockSupport)(s,"layout",!1)||(0,hC.hasBlockSupport)(s,"__experimentalLayout",!1),b=!!Ae()[mk]||(0,hC.hasBlockSupport)(s,"listView")||s==="core/navigation",{originalBlockClientId:k}=(0,gC.useContext)(br);return(0,sy.jsxs)(W0,{value:(0,gC.useMemo)(()=>({name:s,isSelected:a,clientId:c,layout:p?f:null,__unstableLayoutClassNames:d,[Is]:e,[ih]:t,[uu]:o&&r!=="disabled",[H0]:r,[sh]:h,[G0]:n,[mk]:b}),[s,a,c,p,f,d,e,t,o,r,h,n,b]),children:[(0,sy.jsx)(g8,{...i}),k&&(0,sy.jsx)(D9,{originalBlockClientId:k,name:s,onReplace:i.onReplace})]})}function me(...e){let{clientId:t=null}=Ae();return(0,V9.useSelect)(o=>M(o(x)).getBlockSettings(t,...e),[t,...e])}function z9(e){(0,F9.default)("wp.blockEditor.useSetting",{since:"6.5",alternative:"wp.blockEditor.useSettings",note:"The new useSettings function can retrieve multiple settings at once, with better performance."});let[t]=me(e);return t}var kC=l(w(),1),{kebabCase:G_e}=M(U9.privateApis),j9=([e,...t])=>e.toUpperCase()+t.join(""),W_e=e=>(0,pm.createHigherOrderComponent)(t=>function(r){return(0,kC.jsx)(t,{...r,colors:e})},"withCustomColorPalette"),$_e=()=>(0,pm.createHigherOrderComponent)(e=>function(o){let[r,n,i]=me("color.palette.custom","color.palette.theme","color.palette.default"),s=(0,vC.useMemo)(()=>[...r||[],...n||[],...i||[]],[r,n,i]);return(0,kC.jsx)(e,{...o,colors:s})},"withEditorColorPalette");function H9(e,t){let o=e.reduce((r,n)=>({...r,...typeof n=="string"?{[n]:G_e(n)}:n}),{});return(0,pm.compose)([t,r=>class extends vC.Component{constructor(i){super(i),this.setters=this.createSetters(),this.colorUtils={getMostReadableColor:this.getMostReadableColor.bind(this)},this.state={}}getMostReadableColor(i){let{colors:s}=this.props;return s8(s,i)}createSetters(){return Object.keys(o).reduce((i,s)=>{let a=j9(s),c=`custom${a}`;return i[`set${a}`]=this.createSetColor(s,c),i},{})}createSetColor(i,s){return a=>{let c=K0(this.props.colors,a);this.props.setAttributes({[i]:c&&c.slug?c.slug:void 0,[s]:c&&c.slug?void 0:a})}}static getDerivedStateFromProps({attributes:i,colors:s},a){return Object.entries(o).reduce((c,[u,d])=>{let f=Ca(s,i[u],i[`custom${j9(u)}`]),m=a[u];return m?.color===f.color&&m?c[u]=m:c[u]={...f,class:Ri(d,f.slug)},c},{})}render(){return(0,kC.jsx)(r,{...this.props,colors:void 0,...this.state,...this.setters,colorUtils:this.colorUtils})}}])}function G9(e){return(...t)=>{let o=W_e(e);return(0,pm.createHigherOrderComponent)(H9(t,o),"withCustomColors")}}function W9(...e){let t=$_e();return(0,pm.createHigherOrderComponent)(H9(e,t),"withColors")}var yC=l(R(),1),_C=l(F(),1);function Ph(e){if(e)return`has-${e}-gradient-background`}function SC(e,t){let o=e?.find(r=>r.slug===t);return o&&o.gradient}function $9(e,t){return e?.find(r=>r.gradient===t)}function K9(e,t){let o=$9(e,t);return o&&o.slug}function K_e({gradientAttribute:e="gradient",customGradientAttribute:t="customGradient"}={}){let{clientId:o}=Ae(),[r,n,i]=me("color.gradients.custom","color.gradients.theme","color.gradients.default"),s=(0,yC.useMemo)(()=>[...r||[],...n||[],...i||[]],[r,n,i]),{gradient:a,customGradient:c}=(0,_C.useSelect)(h=>{let{getBlockAttributes:p}=h(x),g=p(o)||{};return{customGradient:g[t],gradient:g[e]}},[o,e,t]),{updateBlockAttributes:u}=(0,_C.useDispatch)(x),d=(0,yC.useCallback)(h=>{let p=K9(s,h);if(p){u(o,{[e]:p,[t]:void 0});return}u(o,{[e]:void 0,[t]:h})},[s,o,u]),f=Ph(a),m;return a?m=SC(s,a):m=c,{gradientClass:f,gradientValue:m,setGradient:d}}var Y9=l(A(),1);var{kebabCase:Y_e}=M(Y9.privateApis),Rh=(e,t,o)=>{if(t){let r=e?.find(({slug:n})=>n===t);if(r)return r}return{size:o}};function u5(e,t){let o=e?.find(({size:r})=>r===t);return o||{size:t}}function Au(e){if(e)return`has-${Y_e(e)}-font-size`}var q_e="1600px",Z_e="320px",X_e=1,Q_e=.25,J_e=.75,eSe="14px";function q9({minimumFontSize:e,maximumFontSize:t,fontSize:o,minimumViewportWidth:r=Z_e,maximumViewportWidth:n=q_e,scaleFactor:i=X_e,minimumFontSizeLimit:s}){if(s=Lu(s)?s:eSe,o){let y=Lu(o);if(!y?.unit)return null;let _=Lu(s,{coerceTo:y.unit});if(_?.value&&!e&&!t&&y?.value<=_?.value)return null;if(t||(t=`${y.value}${y.unit}`),!e){let S=y.unit==="px"?y.value:y.value*16,C=Math.min(Math.max(1-.075*Math.log2(S),Q_e),J_e),B=ay(y.value*C,3);_?.value&&B<_?.value?e=`${_.value}${_.unit}`:e=`${B}${y.unit}`}}let a=Lu(e),c=a?.unit||"rem",u=Lu(t,{coerceTo:c});if(!a||!u)return null;let d=Lu(e,{coerceTo:"rem"}),f=Lu(n,{coerceTo:c}),m=Lu(r,{coerceTo:c});if(!f||!m||!d)return null;let h=f.value-m.value;if(!h)return null;let p=ay(m.value/100,3),g=ay(p,3)+c,b=100*((u.value-a.value)/h),k=ay((b||1)*i,3),v=`${d.value}${d.unit} + ((1vw - ${g}) * ${k})`;return`clamp(${e}, ${v}, ${t})`}function Lu(e,t={}){if(typeof e!="string"&&typeof e!="number")return null;isFinite(e)&&(e=`${e}px`);let{coerceTo:o,rootSizeValue:r,acceptableUnits:n}={coerceTo:"",rootSizeValue:16,acceptableUnits:["rem","px","em"],...t},i=n?.join("|"),s=new RegExp(`^(\\d*\\.?\\d+)(${i}){1,1}$`),a=e.match(s);if(!a||a.length<3)return null;let[,c,u]=a,d=parseFloat(c);return o==="px"&&(u==="em"||u==="rem")&&(d=d*r,u=o),u==="px"&&(o==="em"||o==="rem")&&(d=d/r,u=o),(o==="em"||o==="rem")&&(u==="em"||u==="rem")&&(u=o),{value:ay(d,3),unit:u}}function ay(e,t=3){let o=Math.pow(10,t);return Number.isFinite(e)?parseFloat(Math.round(e*o)/o):void 0}var Z9=l(A(),1);var X9=l(w(),1);function tSe(e){let[t,o]=me("typography.fontSizes","typography.customFontSize");return(0,X9.jsx)(Z9.FontSizePicker,{...e,fontSizes:t,disableCustomFontSizes:!o,__next40pxDefaultSize:!0})}var d5=tSe;var ly=l(X(),1),J9=l(R(),1);var f5=l(w(),1),oSe=[],Q9=([e,...t])=>e.toUpperCase()+t.join(""),e7=(...e)=>{let t=e.reduce((o,r)=>(o[r]=`custom${Q9(r)}`,o),{});return(0,ly.createHigherOrderComponent)((0,ly.compose)([(0,ly.createHigherOrderComponent)(o=>function(n){let[i]=me("typography.fontSizes");return(0,f5.jsx)(o,{...n,fontSizes:i||oSe})},"withFontSizes"),o=>class extends J9.Component{constructor(n){super(n),this.setters=this.createSetters(),this.state={}}createSetters(){return Object.entries(t).reduce((n,[i,s])=>{let a=Q9(i);return n[`set${a}`]=this.createSetFontSize(i,s),n},{})}createSetFontSize(n,i){return s=>{let a=this.props.fontSizes?.find(({size:c})=>c===Number(s));this.props.setAttributes({[n]:a&&a.slug?a.slug:void 0,[i]:a&&a.slug?void 0:s})}}static getDerivedStateFromProps({attributes:n,fontSizes:i},s){let a=(u,d)=>s[d]?n[d]?n[d]!==s[d].slug:s[d].size!==n[u]:!0;if(!Object.values(t).some(a))return null;let c=Object.entries(t).filter(([u,d])=>a(d,u)).reduce((u,[d,f])=>{let m=n[d],h=Rh(i,m,n[f]);return u[d]={...h,class:Au(m)},u},{});return{...s,...c}}render(){return(0,f5.jsx)(o,{...this.props,fontSizes:void 0,...this.state,...this.setters})}}]),"withFontSizes")};var Nu=l(N(),1),xC=l(A(),1);var t7=l(w(),1),rSe=[{icon:vu,title:(0,Nu.__)("Align text left"),align:"left"},{icon:Yf,title:(0,Nu.__)("Align text center"),align:"center"},{icon:ku,title:(0,Nu.__)("Align text right"),align:"right"}],nSe={placement:"bottom-start"};function iSe({value:e,onChange:t,alignmentControls:o=rSe,label:r=(0,Nu.__)("Align text"),description:n=(0,Nu.__)("Change text alignment"),isCollapsed:i=!0,isToolbar:s}){function a(m){return()=>t(e===m?void 0:m)}let c=o.find(m=>m.align===e);function u(){return c?c.icon:(0,Nu.isRTL)()?ku:vu}let d=s?xC.ToolbarGroup:xC.ToolbarDropdownMenu,f=s?{isCollapsed:i}:{toggleProps:{description:n},popoverProps:nSe};return(0,t7.jsx)(d,{icon:u(),label:r,controls:o.map(m=>{let{align:h}=m;return{...m,isActive:e===h,role:i?"menuitemradio":void 0,onClick:a(h)}}),...f})}var m5=iSe;var p5=l(w(),1),wC=e=>(0,p5.jsx)(m5,{...e,isToolbar:!1}),o7=e=>(0,p5.jsx)(m5,{...e,isToolbar:!0});var RC=l(vt(),1),OC=l(A(),1),b7=l(R(),1),AC=l(K(),1);var h7=l(F(),1),Du=l(K(),1),k5=l(R(),1);var d7=l(s7(),1);var h5=function(e,t){return h5=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,r){o.__proto__=r}||function(o,r){for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(o[n]=r[n])},h5(e,t)};function a7(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");h5(e,t);function o(){this.constructor=e}e.prototype=t===null?Object.create(t):(o.prototype=t.prototype,new o)}var Yo=function(){return Yo=Object.assign||function(t){for(var o,r=1,n=arguments.length;r<n;r++){o=arguments[r];for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(t[i]=o[i])}return t},Yo.apply(this,arguments)};function l7(e){return e.toLowerCase()}var uSe=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],dSe=/[^A-Z0-9]+/gi;function u7(e,t){t===void 0&&(t={});for(var o=t.splitRegexp,r=o===void 0?uSe:o,n=t.stripRegexp,i=n===void 0?dSe:n,s=t.transform,a=s===void 0?l7:s,c=t.delimiter,u=c===void 0?" ":c,d=c7(c7(e,r,"$1\0$2"),i,"\0"),f=0,m=d.length;d.charAt(f)==="\0";)f++;for(;d.charAt(m-1)==="\0";)m--;return d.slice(f,m).split("\0").map(a).join(u)}function c7(e,t,o){return t instanceof RegExp?e.replace(t,o):t.reduce(function(r,n){return r.replace(n,o)},e)}var fSe=e=>e.name||"",mSe=e=>e.title,pSe=e=>e.description||"",hSe=e=>e.keywords||[],gSe=e=>e.category,bSe=()=>null,vSe=[/([\p{Ll}\p{Lo}\p{N}])([\p{Lu}\p{Lt}])/gu,/([\p{Lu}\p{Lt}])([\p{Lu}\p{Lt}][\p{Ll}\p{Lo}])/gu],kSe=new RegExp("(\\p{C}|\\p{P}|\\p{S})+","giu"),g5=new Map,b5=new Map;function BC(e=""){if(g5.has(e))return g5.get(e);let t=u7(e,{splitRegexp:vSe,stripRegexp:kSe}).split(" ").filter(Boolean);return g5.set(e,t),t}function cy(e=""){if(b5.has(e))return b5.get(e);let t=(0,d7.default)(e);return t=t.replace(/^\//,""),t=t.toLowerCase(),b5.set(e,t),t}var uy=(e="")=>BC(cy(e)),ySe=(e,t)=>e.filter(o=>!uy(t).some(r=>r.includes(o))),EC=(e,t,o,r)=>uy(r).length===0?e:dy(e,r,{getCategory:s=>t.find(({slug:a})=>a===s.category)?.title,getCollection:s=>o[s.name.split("/")[0]]?.title}),dy=(e=[],t="",o={})=>{if(uy(t).length===0)return e;let n=e.map(i=>[i,_Se(i,t,o)]).filter(([,i])=>i>0);return n.sort(([,i],[,s])=>s-i),n.map(([i])=>i)};function _Se(e,t,o={}){let{getName:r=fSe,getTitle:n=mSe,getDescription:i=pSe,getKeywords:s=hSe,getCategory:a=gSe,getCollection:c=bSe}=o,u=r(e),d=n(e),f=i(e),m=s(e),h=a(e),p=c(e),g=cy(t),b=cy(d),k=0;if(g===b)k+=30;else if(b.startsWith(g))k+=20;else{let v=[u,d,f,...m,h,p].join(" "),y=BC(g);ySe(y,v).length===0&&(k+=10)}if(k!==0&&u.startsWith("core/")){let v=u!==e.id;k+=v?1:2}return k}var Ta=l(K(),1),Oh=l(F(),1),TC=l(R(),1),f7=l(Xn(),1),IC=l(N(),1);var SSe=(e,t,o)=>{let r=(0,TC.useMemo)(()=>({[Iu]:!!o}),[o]),[n]=(0,Oh.useSelect)(d=>[d(x).getInserterItems(e,r)],[e,r]),{getClosestAllowedInsertionPoint:i}=M((0,Oh.useSelect)(x)),{createErrorNotice:s}=(0,Oh.useDispatch)(f7.store),[a,c]=(0,Oh.useSelect)(d=>{let{getCategories:f,getCollections:m}=d(Ta.store);return[f(),m()]},[]),u=(0,TC.useCallback)(({name:d,initialAttributes:f,innerBlocks:m,syncStatus:h,content:p},g)=>{let b=i(d,e);if(b===null){let v=(0,Ta.getBlockType)(d)?.title??d;s((0,IC.sprintf)((0,IC.__)(`Block "%s" can't be inserted.`),v),{type:"snackbar",id:"inserter-notice"});return}let k=h==="unsynced"?(0,Ta.parse)(p,{__unstableSkipMigrationLogs:!0}):(0,Ta.createBlock)(d,f,(0,Ta.createBlocksFromInnerBlocksTemplate)(m));t(k,void 0,g,b)},[i,e,t,s]);return[n,a,c,u]},Mu=SSe;var m7=l(A(),1);var p7=l(R(),1),v5=l(w(),1);function xSe({icon:e,showColors:t=!1,className:o,context:r}){e?.src==="block-default"&&(e={src:wk});let n=(0,v5.jsx)(m7.Icon,{icon:e&&e.src?e.src:e,context:r}),i=t?{backgroundColor:e&&e.background,color:e&&e.foreground}:{};return(0,v5.jsx)("span",{style:i,className:D("block-editor-block-icon",o,{"has-colors":t}),children:n})}var Me=(0,p7.memo)(xSe);var PC=(e,t)=>(t&&e.sort(({id:o},{id:r})=>{let n=t.indexOf(o),i=t.indexOf(r);return n<0&&(n=t.length),i<0&&(i=t.length),n-i}),e);var Ah=l(w(),1),wSe=()=>{},CSe=9;function BSe(){return{name:"blocks",className:"block-editor-autocompleters__block",triggerPrefix:"/",useItems(e){let{rootClientId:t,selectedBlockId:o,prioritizedBlocks:r}=(0,h7.useSelect)(u=>{let{getSelectedBlockClientId:d,getBlock:f,getBlockListSettings:m,getBlockRootClientId:h}=u(x),{getActiveBlockVariation:p}=u(Du.store),g=d(),{name:b,attributes:k}=f(g),v=p(b,k),y=h(g);return{selectedBlockId:v?`${b}/${v.name}`:b,rootClientId:y,prioritizedBlocks:m(y)?.prioritizedInserterBlocks}},[]),[n,i,s]=Mu(t,wSe,!0),a=(0,k5.useMemo)(()=>(e.trim()?EC(n,i,s,e):PC(Ea(n,"frecency","desc"),r)).filter(d=>d.id!==o).slice(0,CSe),[e,o,n,i,s,r]);return[(0,k5.useMemo)(()=>a.map(u=>{let{title:d,icon:f,isDisabled:m}=u;return{key:`block-${u.id}`,value:u,label:(0,Ah.jsxs)(Ah.Fragment,{children:[(0,Ah.jsx)(Me,{icon:f,showColors:!0},"icon"),d]}),isDisabled:m}}),[a])]},allowContext(e,t){return!(/\S/.test(e)||/\S/.test(t))},getOptionCompletion(e){let{name:t,initialAttributes:o,innerBlocks:r,syncStatus:n,blocks:i}=e;return{action:"replace",value:n==="unsynced"?(i??[]).map(s=>(0,Du.cloneBlock)(s)):(0,Du.createBlock)(t,o,(0,Du.createBlocksFromInnerBlocksTemplate)(r))}}}}var g7=BSe();var v7=l(w(),1),ESe=[];function k7({completers:e=ESe}){let{name:t}=Ae();return(0,b7.useMemo)(()=>{let o=[...e];return(t===(0,AC.getDefaultBlockName)()||(0,AC.getBlockSupport)(t,"__experimentalSlashInserter",!1))&&(o=[...o,g7]),(0,RC.hasFilter)("editor.Autocomplete.completers")&&(o===e&&(o=o.map(r=>({...r}))),o=(0,RC.applyFilters)("editor.Autocomplete.completers",o,t)),o},[e,t])}function y7(e){return(0,OC.__unstableUseAutocompleteProps)({...e,completers:k7(e)})}function TSe(e){return(0,v7.jsx)(OC.Autocomplete,{...e,completers:k7(e)})}var _7=TSe;var w5=l(N(),1),ju=l(A(),1);var j7=l(F(),1);var FC=l(R(),1);var zi=l(N(),1);var Sn=l(A(),1);var Lh=l(N(),1);var Qn={default:{name:"default",slug:"flow",className:"is-layout-flow",baseStyles:[{selector:" > .alignleft",rules:{float:"left","margin-inline-start":"0","margin-inline-end":"2em"}},{selector:" > .alignright",rules:{float:"right","margin-inline-start":"2em","margin-inline-end":"0"}},{selector:" > .aligncenter",rules:{"margin-left":"auto !important","margin-right":"auto !important"}}],spacingStyles:[{selector:" > :first-child",rules:{"margin-block-start":"0"}},{selector:" > :last-child",rules:{"margin-block-end":"0"}},{selector:" > *",rules:{"margin-block-start":null,"margin-block-end":"0"}}]},constrained:{name:"constrained",slug:"constrained",className:"is-layout-constrained",baseStyles:[{selector:" > .alignleft",rules:{float:"left","margin-inline-start":"0","margin-inline-end":"2em"}},{selector:" > .alignright",rules:{float:"right","margin-inline-start":"2em","margin-inline-end":"0"}},{selector:" > .aligncenter",rules:{"margin-left":"auto !important","margin-right":"auto !important"}},{selector:" > :where(:not(.alignleft):not(.alignright):not(.alignfull))",rules:{"max-width":"var(--wp--style--global--content-size)","margin-left":"auto !important","margin-right":"auto !important"}},{selector:" > .alignwide",rules:{"max-width":"var(--wp--style--global--wide-size)"}}],spacingStyles:[{selector:" > :first-child",rules:{"margin-block-start":"0"}},{selector:" > :last-child",rules:{"margin-block-end":"0"}},{selector:" > *",rules:{"margin-block-start":null,"margin-block-end":"0"}}]},flex:{name:"flex",slug:"flex",className:"is-layout-flex",displayMode:"flex",baseStyles:[{selector:"",rules:{"flex-wrap":"wrap","align-items":"center"}},{selector:" > :is(*, div)",rules:{margin:"0"}}],spacingStyles:[{selector:"",rules:{gap:null}}]},grid:{name:"grid",slug:"grid",className:"is-layout-grid",displayMode:"grid",baseStyles:[{selector:" > :is(*, div)",rules:{margin:"0"}}],spacingStyles:[{selector:"",rules:{gap:null}}]}};function Jn(e,t=""){return e.split(",").map(o=>`${o}${t?` ${t}`:""}`).join(",")}function Vu(e,t=Qn,o,r){let n="";return t?.[o]?.spacingStyles?.length&&r&&t[o].spacingStyles.forEach(i=>{n+=`${Jn(e,i.selector.trim())} { `,n+=Object.entries(i.rules).map(([s,a])=>`${s}: ${a||r}`).join("; "),n+="; }"}),n}function LC(e){let{contentSize:t,wideSize:o,type:r="default"}=e,n={},i=/^(?!0)\d+(px|em|rem|vw|vh|%|svw|lvw|dvw|svh|lvh|dvh|vi|svi|lvi|dvi|vb|svb|lvb|dvb|vmin|svmin|lvmin|dvmin|vmax|svmax|lvmax|dvmax)?$/i;return i.test(t)&&r==="constrained"&&(n.none=(0,Lh.sprintf)((0,Lh.__)("Max %s wide"),t)),i.test(o)&&(n.wide=(0,Lh.sprintf)((0,Lh.__)("Max %s wide"),o)),n}var Ls=l(N(),1);var S7=8,Fu=["top","bottom","left","right"],x7={top:void 0,right:void 0,bottom:void 0,left:void 0},NC={custom:zw,axial:zw,horizontal:lM,vertical:fM,top:dM,right:uM,bottom:aM,left:cM},Ia={default:(0,Ls.__)("Spacing control"),top:(0,Ls.__)("Top"),bottom:(0,Ls.__)("Bottom"),left:(0,Ls.__)("Left"),right:(0,Ls.__)("Right"),mixed:(0,Ls.__)("Mixed"),vertical:(0,Ls.__)("Vertical"),horizontal:(0,Ls.__)("Horizontal"),axial:(0,Ls.__)("Horizontal & vertical"),custom:(0,Ls.__)("Custom")},Vl={axial:"axial",top:"top",right:"right",bottom:"bottom",left:"left",custom:"custom"};function MC(e){return e?.includes?e==="0"||e.includes("var:preset|spacing|"):!1}function w7(e,t){if(!MC(e))return e;let o=ISe(e);return t.find(n=>String(n.slug)===o)?.size}function Nh(e,t){if(!e||MC(e)||e==="0")return e;let o=t.find(r=>String(r.size)===String(e));return o?.slug?`var:preset|spacing|${o.slug}`:e}function Ns(e){if(!e)return;let t=e.match(/var:preset\|spacing\|(.+)/);return t?`var(--wp--preset--spacing--${t[1]})`:e}function ISe(e){if(!e)return;if(e==="0"||e==="default")return e;let t=e.match(/var:preset\|spacing\|(.+)/);return t?t[1]:void 0}function y5(e,t){if(!e||!e.length)return!1;let o=e.includes("horizontal")||e.includes("left")&&e.includes("right"),r=e.includes("vertical")||e.includes("top")&&e.includes("bottom");return t==="horizontal"?o:t==="vertical"?r:o||r}function PSe(e=[]){let t={top:0,right:0,bottom:0,left:0};return e.forEach(o=>t[o]+=1),(t.top+t.bottom)%2===0&&(t.left+t.right)%2===0}function C7(e={},t){let{top:o,right:r,bottom:n,left:i}=e,s=[o,r,n,i].filter(Boolean),a=o===n&&i===r&&(!!o||!!i),c=!s.length&&PSe(t),u=t?.includes("horizontal")&&t?.includes("vertical")&&t?.length===2;if(y5(t)&&(a||c))return Vl.axial;if(u&&s.length===1){let d;return Object.entries(e).some(([f,m])=>(d=f,m!==void 0)),d}return t?.length===1&&!s.length?t[0]:Vl.custom}function fy(e){if(!e)return null;let t=typeof e=="string";return{top:t?e:e?.top,left:t?e:e?.left}}function Zr(e,t="0"){let o=fy(e);if(!o)return null;let r=Ns(o?.top)||t,n=Ns(o?.left)||t;return r===n?r:`${r} ${n}`}var fo=l(w(),1),RSe={left:"flex-start",right:"flex-end",center:"center","space-between":"space-between"},B7={left:"flex-start",right:"flex-end",center:"center",stretch:"stretch"},OSe={top:"flex-start",center:"center",bottom:"flex-end",stretch:"stretch","space-between":"space-between"},E7={horizontal:"center",vertical:"top"},ASe=["wrap","nowrap"],I7={name:"flex",label:(0,zi.__)("Flex"),inspectorControls:function({layout:t={},onChange:o,layoutBlockSupport:r={}}){let{allowOrientation:n=!0,allowJustification:i=!0,allowWrap:s=!0}=r;return(0,fo.jsxs)(fo.Fragment,{children:[(0,fo.jsxs)(Sn.Flex,{children:[i&&(0,fo.jsx)(Sn.FlexItem,{children:(0,fo.jsx)(T7,{layout:t,onChange:o})}),n&&(0,fo.jsx)(Sn.FlexItem,{children:(0,fo.jsx)(DSe,{layout:t,onChange:o})})]}),s&&(0,fo.jsx)(MSe,{layout:t,onChange:o})]})},toolBarControls:function({layout:t={},onChange:o,layoutBlockSupport:r}){let{allowVerticalAlignment:n=!0,allowJustification:i=!0}=r;return!i&&!n?null:(0,fo.jsxs)(Wt,{group:"block",__experimentalShareWithChildBlocks:!0,children:[i&&(0,fo.jsx)(T7,{layout:t,onChange:o,isToolbar:!0}),n&&(0,fo.jsx)(LSe,{layout:t,onChange:o})]})},getLayoutStyle:function({selector:t,layout:o,style:r,blockName:n,hasBlockGapSupport:i,globalBlockGapValue:s,layoutDefinitions:a=Qn}){let{orientation:c="horizontal"}=o,u="0.5em";if(s){let k=fy(s);u=Ns(k?.left)||Ns(k?.top)||"0.5em"}let d=r?.spacing?.blockGap&&!$e(n,"spacing","blockGap")?Zr(r?.spacing?.blockGap,u):void 0,f=RSe[o.justifyContent],m=ASe.includes(o.flexWrap)?o.flexWrap:"wrap",h=OSe[o.verticalAlignment],p=B7[o.justifyContent]||B7.left,g="",b=[];return m&&m!=="wrap"&&b.push(`flex-wrap: ${m}`),c==="horizontal"?(h&&b.push(`align-items: ${h}`),f&&b.push(`justify-content: ${f}`)):(h&&b.push(`justify-content: ${h}`),b.push("flex-direction: column"),b.push(`align-items: ${p}`)),b.length&&(g=`${Jn(t)} { |
| 25 |
${b.join("; ")}; |
| 26 |
}`),i&&d&&(g+=Vu(t,a,"flex",d)),g},getOrientation(e){let{orientation:t="horizontal"}=e;return t},getAlignments(){return[]}};function LSe({layout:e,onChange:t}){let{orientation:o="horizontal"}=e,r=o==="horizontal"?E7.horizontal:E7.vertical,{verticalAlignment:n=r}=e;return(0,fo.jsx)(DC,{onChange:s=>{t({...e,verticalAlignment:s})},value:n,controls:o==="horizontal"?["top","center","bottom","stretch"]:["top","center","bottom","space-between"]})}var NSe={placement:"bottom-start"};function T7({layout:e,onChange:t,isToolbar:o=!1}){let{justifyContent:r="left",orientation:n="horizontal"}=e,i=c=>{t({...e,justifyContent:c})},s=["left","center","right"];if(n==="horizontal"?s.push("space-between"):s.push("stretch"),o)return(0,fo.jsx)(Mh,{allowedControls:s,value:r,onChange:i,popoverProps:NSe});let a=[{value:"left",icon:Su,label:(0,zi.__)("Justify items left")},{value:"center",icon:_u,label:(0,zi.__)("Justify items center")},{value:"right",icon:xu,label:(0,zi.__)("Justify items right")}];return n==="horizontal"?a.push({value:"space-between",icon:ph,label:(0,zi.__)("Space between items")}):a.push({value:"stretch",icon:hh,label:(0,zi.__)("Stretch items")}),(0,fo.jsx)(Sn.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,label:(0,zi.__)("Justification"),value:r,onChange:i,className:"block-editor-hooks__flex-layout-justification-controls",children:a.map(({value:c,icon:u,label:d})=>(0,fo.jsx)(Sn.__experimentalToggleGroupControlOptionIcon,{value:c,icon:u,label:d},c))})}function MSe({layout:e,onChange:t}){let{flexWrap:o="wrap"}=e;return(0,fo.jsx)(Sn.ToggleControl,{label:(0,zi.__)("Allow to wrap to multiple lines"),onChange:r=>{t({...e,flexWrap:r?"wrap":"nowrap"})},checked:o==="wrap"})}function DSe({layout:e,onChange:t}){let{orientation:o="horizontal",verticalAlignment:r,justifyContent:n}=e;return(0,fo.jsxs)(Sn.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,className:"block-editor-hooks__flex-layout-orientation-controls",label:(0,zi.__)("Orientation"),value:o,onChange:i=>{let s=r,a=n;return i==="horizontal"?(r==="space-between"&&(s="center"),n==="stretch"&&(a="left")):(r==="stretch"&&(s="top"),n==="space-between"&&(a="left")),t({...e,orientation:i,verticalAlignment:s,justifyContent:a})},children:[(0,fo.jsx)(Sn.__experimentalToggleGroupControlOptionIcon,{icon:xk,value:"horizontal",label:(0,zi.__)("Horizontal")}),(0,fo.jsx)(Sn.__experimentalToggleGroupControlOptionIcon,{icon:FA,value:"vertical",label:(0,zi.__)("Vertical")})]})}var P7=l(N(),1);var R7={name:"default",label:(0,P7.__)("Flow"),inspectorControls:function(){return null},toolBarControls:function(){return null},getLayoutStyle:function({selector:t,style:o,blockName:r,hasBlockGapSupport:n,layoutDefinitions:i=Qn}){let s=Zr(o?.spacing?.blockGap),a="";$e(r,"spacing","blockGap")||(s?.top?a=Zr(s?.top):typeof s=="string"&&(a=Zr(s)));let c="";return n&&a&&(c+=Vu(t,i,"default",a)),c},getOrientation(){return"vertical"},getAlignments(e,t){let o=LC(e);if(e.alignments!==void 0)return e.alignments.includes("none")||e.alignments.unshift("none"),e.alignments.map(n=>({name:n,info:o[n]}));let r=[{name:"left"},{name:"center"},{name:"right"}];if(!t){let{contentSize:n,wideSize:i}=e;n&&r.unshift({name:"full"}),i&&r.unshift({name:"wide",info:o.wide})}return r.unshift({name:"none",info:o.none}),r}};var xn=l(A(),1),Fl=l(N(),1);var A7=l(my(),1);var ar=l(w(),1),L7={name:"constrained",label:(0,Fl.__)("Constrained"),inspectorControls:function({layout:t,onChange:o,layoutBlockSupport:r={}}){let{wideSize:n,contentSize:i,justifyContent:s="center"}=t,{allowJustification:a=!0,allowCustomContentAndWideSize:c=!0}=r,u=h=>{o({...t,justifyContent:h})},d=[{value:"left",icon:Su,label:(0,Fl.__)("Justify items left")},{value:"center",icon:_u,label:(0,Fl.__)("Justify items center")},{value:"right",icon:xu,label:(0,Fl.__)("Justify items right")}],[f]=me("spacing.units"),m=(0,xn.__experimentalUseCustomUnits)({availableUnits:f||["%","px","em","rem","vw"]});return(0,ar.jsxs)(xn.__experimentalVStack,{spacing:4,className:"block-editor-hooks__layout-constrained",children:[c&&(0,ar.jsxs)(ar.Fragment,{children:[(0,ar.jsx)(xn.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,Fl.__)("Content width"),labelPosition:"top",value:i||n||"",onChange:h=>{h=0>parseFloat(h)?"0":h,o({...t,contentSize:h!==""?h:void 0})},units:m,prefix:(0,ar.jsx)(xn.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,ar.jsx)(Ie,{icon:qf})})}),(0,ar.jsx)(xn.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,Fl.__)("Wide width"),labelPosition:"top",value:n||i||"",onChange:h=>{h=0>parseFloat(h)?"0":h,o({...t,wideSize:h!==""?h:void 0})},units:m,prefix:(0,ar.jsx)(xn.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,ar.jsx)(Ie,{icon:lm})})}),(0,ar.jsx)("p",{className:"block-editor-hooks__layout-constrained-helptext",children:(0,Fl.__)("Customize the width for all elements that are assigned to the center or wide columns.")})]}),a&&(0,ar.jsx)(xn.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,label:(0,Fl.__)("Justification"),value:s,onChange:u,children:d.map(({value:h,icon:p,label:g})=>(0,ar.jsx)(xn.__experimentalToggleGroupControlOptionIcon,{value:h,icon:p,label:g},h))})]})},toolBarControls:function({layout:t={},onChange:o,layoutBlockSupport:r}){let{allowJustification:n=!0}=r;return n?(0,ar.jsx)(Wt,{group:"block",__experimentalShareWithChildBlocks:!0,children:(0,ar.jsx)(FSe,{layout:t,onChange:o})}):null},getLayoutStyle:function({selector:t,layout:o={},style:r,blockName:n,hasBlockGapSupport:i,layoutDefinitions:s=Qn}){let{contentSize:a,wideSize:c,justifyContent:u}=o,d=Zr(r?.spacing?.blockGap),f="";$e(n,"spacing","blockGap")||(d?.top?f=Zr(d?.top):typeof d=="string"&&(f=Zr(d)));let m=u==="left"?"0 !important":"auto !important",h=u==="right"?"0 !important":"auto !important",p=a||c?` |
| 27 |
${Jn(t,"> :where(:not(.alignleft):not(.alignright):not(.alignfull))")} { |
| 28 |
max-width: ${a??c}; |
| 29 |
margin-left: ${m}; |
| 30 |
margin-right: ${h}; |
| 31 |
} |
| 32 |
${Jn(t,"> .alignwide")} { |
| 33 |
max-width: ${c??a}; |
| 34 |
} |
| 35 |
${Jn(t,"> .alignfull")} { |
| 36 |
max-width: none; |
| 37 |
} |
| 38 |
`:"";return u==="left"?p+=`${Jn(t,"> :where(:not(.alignleft):not(.alignright):not(.alignfull))")} |
| 39 |
{ margin-left: ${m}; }`:u==="right"&&(p+=`${Jn(t,"> :where(:not(.alignleft):not(.alignright):not(.alignfull))")} |
| 40 |
{ margin-right: ${h}; }`),r?.spacing?.padding&&(0,A7.getCSSRules)(r).forEach(b=>{if(b.key==="paddingRight"){let k=b.value==="0"?"0px":b.value;p+=` |
| 41 |
${Jn(t,"> .alignfull")} { |
| 42 |
margin-right: calc(${k} * -1); |
| 43 |
} |
| 44 |
`}else if(b.key==="paddingLeft"){let k=b.value==="0"?"0px":b.value;p+=` |
| 45 |
${Jn(t,"> .alignfull")} { |
| 46 |
margin-left: calc(${k} * -1); |
| 47 |
} |
| 48 |
`}}),i&&f&&(p+=Vu(t,s,"constrained",f)),p},getOrientation(){return"vertical"},getAlignments(e){let t=LC(e);if(e.alignments!==void 0)return e.alignments.includes("none")||e.alignments.unshift("none"),e.alignments.map(i=>({name:i,info:t[i]}));let{contentSize:o,wideSize:r}=e,n=[{name:"left"},{name:"center"},{name:"right"}];return o&&n.unshift({name:"full"}),r&&n.unshift({name:"wide",info:t.wide}),n.unshift({name:"none",info:t.none}),n}},VSe={placement:"bottom-start"};function FSe({layout:e,onChange:t}){let{justifyContent:o="center"}=e;return(0,ar.jsx)(Mh,{allowedControls:["left","center","right"],value:o,onChange:i=>{t({...e,justifyContent:i})},popoverProps:VSe})}var Xr=l(N(),1),mt=l(A(),1),VC=l(R(),1);var Je=l(w(),1),zSe={px:600,"%":100,vw:100,vh:100,em:38,rem:38,svw:100,lvw:100,dvw:100,svh:100,lvh:100,dvh:100,vi:100,svi:100,lvi:100,dvi:100,vb:100,svb:100,lvb:100,dvb:100,vmin:100,svmin:100,lvmin:100,dvmin:100,vmax:100,svmax:100,lvmax:100,dvmax:100},jSe=[{value:"px",label:"px",default:0},{value:"rem",label:"rem",default:0},{value:"em",label:"em",default:0}],N7={name:"grid",label:(0,Xr.__)("Grid"),inspectorControls:function({layout:t={},onChange:o,layoutBlockSupport:r={}}){let{allowSizingOnChildren:n=!1}=r,i=!0,s=!t?.isManualPlacement||window.__experimentalEnableGridInteractivity;return(0,Je.jsxs)(Je.Fragment,{children:[window.__experimentalEnableGridInteractivity&&(0,Je.jsx)(GSe,{layout:t,onChange:o}),(0,Je.jsxs)(mt.__experimentalVStack,{spacing:4,children:[i&&(0,Je.jsx)(HSe,{layout:t,onChange:o,allowSizingOnChildren:n}),s&&(0,Je.jsx)(USe,{layout:t,onChange:o})]})]})},toolBarControls:function(){return null},getLayoutStyle:function({selector:t,layout:o,style:r,blockName:n,hasBlockGapSupport:i,globalBlockGapValue:s,layoutDefinitions:a=Qn}){let{minimumColumnWidth:c=null,columnCount:u=null,rowCount:d=null}=o,f="1.2rem";if(s){let g=fy(s);f=Ns(g?.left)||Ns(g?.top)||"1.2rem"}let m=r?.spacing?.blockGap&&!$e(n,"spacing","blockGap")?Zr(r?.spacing?.blockGap,f):void 0,h="",p=[];if(c&&u>0){let g=m||f;(g==="0"||g===0)&&(g="0px");let b=`max(min( ${c}, 100%), ( 100% - (${g}*${u-1}) ) / ${u})`;p.push(`grid-template-columns: repeat(auto-fill, minmax(${b}, 1fr))`,"container-type: inline-size"),d&&p.push(`grid-template-rows: repeat(${d}, minmax(1rem, auto))`)}else u?(p.push(`grid-template-columns: repeat(${u}, minmax(0, 1fr))`),d&&p.push(`grid-template-rows: repeat(${d}, minmax(1rem, auto))`)):p.push(`grid-template-columns: repeat(auto-fill, minmax(min(${c||"12rem"}, 100%), 1fr))`,"container-type: inline-size");return p.length&&(h=`${Jn(t)} { ${p.join("; ")}; }`),i&&m&&(h+=Vu(t,a,"grid",m)),h},getOrientation(){return"horizontal"},getAlignments(){return[]}};function USe({layout:e,onChange:t}){let{minimumColumnWidth:o,columnCount:r,isManualPlacement:n}=e,s=o||(n||r?null:"12rem"),[a,c="rem"]=(0,mt.__experimentalParseQuantityAndUnitFromRawValue)(s),u=f=>{t({...e,minimumColumnWidth:[f,c].join("")})},d=f=>{let m;["em","rem"].includes(f)&&c==="px"?m=(a/16).toFixed(2)+f:["em","rem"].includes(c)&&f==="px"&&(m=Math.round(a*16)+f),t({...e,minimumColumnWidth:m})};return(0,Je.jsxs)("fieldset",{className:"block-editor-hooks__grid-layout-minimum-width-control",children:[(0,Je.jsx)(mt.BaseControl.VisualLabel,{as:"legend",children:(0,Xr.__)("Min. column width")}),(0,Je.jsxs)(mt.Flex,{gap:4,children:[(0,Je.jsx)(mt.FlexItem,{isBlock:!0,children:(0,Je.jsx)(mt.__experimentalUnitControl,{size:"__unstable-large",onChange:f=>{t({...e,minimumColumnWidth:f===""?void 0:f})},onUnitChange:d,value:s,units:jSe,min:0,label:(0,Xr.__)("Minimum column width"),hideLabelFromVision:!0})}),(0,Je.jsx)(mt.FlexItem,{isBlock:!0,children:(0,Je.jsx)(mt.RangeControl,{__next40pxDefaultSize:!0,onChange:u,value:a||0,min:0,max:zSe[c]||600,withInputField:!1,label:(0,Xr.__)("Minimum column width"),hideLabelFromVision:!0})})]}),(0,Je.jsx)("p",{className:"components-base-control__help",children:(0,Xr.__)("Columns will wrap to fewer per row when they can no longer maintain the minimum width.")})]})}function HSe({layout:e,onChange:t,allowSizingOnChildren:o}){let{columnCount:n=void 0,rowCount:i,isManualPlacement:s}=e;return(0,Je.jsx)(Je.Fragment,{children:(0,Je.jsxs)("fieldset",{className:"block-editor-hooks__grid-layout-columns-and-rows-controls",children:[!s&&(0,Je.jsx)(mt.BaseControl.VisualLabel,{as:"legend",children:(0,Xr.__)("Max. columns")}),(0,Je.jsxs)(mt.Flex,{gap:4,children:[(0,Je.jsx)(mt.FlexItem,{isBlock:!0,children:(0,Je.jsx)(mt.__experimentalNumberControl,{size:"__unstable-large",onChange:a=>{let u=a===""||a==="0"?s?1:void 0:parseInt(a,10);t({...e,columnCount:u})},value:n,min:1,label:(0,Xr.__)("Columns"),hideLabelFromVision:!s})}),(0,Je.jsx)(mt.FlexItem,{isBlock:!0,children:o&&s?(0,Je.jsx)(mt.__experimentalNumberControl,{size:"__unstable-large",onChange:a=>{let c=a===""||a==="0"?1:parseInt(a,10);t({...e,rowCount:c})},value:i,min:1,label:(0,Xr.__)("Rows")}):(0,Je.jsx)(mt.RangeControl,{__next40pxDefaultSize:!0,value:n??1,onChange:a=>t({...e,columnCount:a===""||a==="0"?1:a}),min:1,max:16,withInputField:!1,label:(0,Xr.__)("Columns"),hideLabelFromVision:!0})})]})]})})}function GSe({layout:e,onChange:t}){let{columnCount:o,rowCount:r,minimumColumnWidth:n,isManualPlacement:i}=e,[s,a]=(0,VC.useState)(o||3),[c,u]=(0,VC.useState)(r),[d,f]=(0,VC.useState)(n||"12rem"),m=i?"manual":"auto",h=g=>{g==="manual"?f(n||"12rem"):(a(o||3),u(r)),t({...e,columnCount:s,rowCount:g==="manual"?c:void 0,isManualPlacement:g==="manual"?!0:void 0,minimumColumnWidth:g==="auto"?d:null})},p=m==="manual"?(0,Xr.__)("Grid items can be manually placed in any position on the grid."):(0,Xr.__)("Grid items are placed automatically depending on their order.");return(0,Je.jsxs)(mt.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,label:(0,Xr.__)("Grid item position"),value:m,onChange:h,isBlock:!0,help:p,children:[(0,Je.jsx)(mt.__experimentalToggleGroupControlOption,{value:"auto",label:(0,Xr.__)("Auto")},"auto"),(0,Je.jsx)(mt.__experimentalToggleGroupControlOption,{value:"manual",label:(0,Xr.__)("Manual")},"manual")]})}var M7=[R7,I7,L7,N7];function Ms(e="default"){return M7.find(t=>t.name===e)}function D7(){return M7}var _5=l(w(),1),S5={type:"default"},x5=(0,FC.createContext)(S5);x5.displayName="BlockLayoutContext";var V7=x5.Provider;function hm(){return(0,FC.useContext)(x5)}function F7({layout:e={},css:t,...o}){let r=Ms(e.type),[n]=me("spacing.blockGap"),i=n!==null;if(r){if(t)return(0,_5.jsx)("style",{children:t});let s=r.getLayoutStyle?.({hasBlockGapSupport:i,layout:e,...o});if(s)return(0,_5.jsx)("style",{children:s})}return null}var zC=[],z7=["none","left","center","right","wide","full"],WSe=["wide","full"];function py(e=z7){e.includes("none")||(e=["none",...e]);let t=e.length===1&&e[0]==="none",[o,r,n]=(0,j7.useSelect)(c=>{if(t)return[!1,!1,!1];let u=c(x).getSettings();return[u.alignWide??!1,u.supportsLayout,u.__unstableIsBlockBasedTheme]},[t]),i=hm();if(t)return zC;let s=Ms(i?.type);if(r){let u=s.getAlignments(i,n).filter(d=>e.includes(d.name));return u.length===1&&u[0].name==="none"?zC:u}if(s.name!=="default"&&s.name!=="constrained")return zC;let a=e.filter(c=>i.alignments?i.alignments.includes(c):!o&&WSe.includes(c)?!1:z7.includes(c)).map(c=>({name:c}));return a.length===1&&a[0].name==="none"?zC:a}var zu=l(N(),1);var hy={none:{icon:qf,title:(0,zu._x)("None","Alignment option")},left:{icon:UN,title:(0,zu.__)("Align left")},center:{icon:zN,title:(0,zu.__)("Align center")},right:{icon:GN,title:(0,zu.__)("Align right")},wide:{icon:lm,title:(0,zu.__)("Wide width")},full:{icon:Kk,title:(0,zu.__)("Full width")}},U7="none";var gm=l(w(),1);function $Se({value:e,onChange:t,controls:o,isToolbar:r,isCollapsed:n=!0}){let i=py(o);if(!!!i.length)return null;function a(h){t([e,"none"].includes(h)?void 0:h)}let c=hy[e],u=hy[U7],d=r?ju.ToolbarGroup:ju.ToolbarDropdownMenu,f={icon:c?c.icon:u.icon,label:(0,w5.__)("Align")},m=r?{isCollapsed:n,controls:i.map(({name:h})=>({...hy[h],isActive:e===h||!e&&h==="none",role:n?"menuitemradio":void 0,onClick:()=>a(h)}))}:{toggleProps:{description:(0,w5.__)("Change alignment")},children:({onClose:h})=>(0,gm.jsx)(gm.Fragment,{children:(0,gm.jsx)(ju.MenuGroup,{className:"block-editor-block-alignment-control__menu-group",children:i.map(({name:p,info:g})=>{let{icon:b,title:k}=hy[p],v=p===e||!e&&p==="none";return(0,gm.jsx)(ju.MenuItem,{icon:b,iconPosition:"left",className:D("components-dropdown-menu__menu-item",{"is-active":v}),isSelected:v,onClick:()=>{a(p),h()},role:"menuitemradio",info:g,children:k},p)})})})};return(0,gm.jsx)(d,{...f,...m})}var C5=$Se;var B5=l(w(),1),jC=e=>(0,B5.jsx)(C5,{...e,isToolbar:!1}),H7=e=>(0,B5.jsx)(C5,{...e,isToolbar:!0});var Y7=l(Kf(),1),WC=l(N(),1),$C=l(K(),1),Vs=l(A(),1),I5=l(F(),1),q7=l(R(),1),Z7=l(X(),1);var T5=l(Kf(),1),G7=l(K(),1),W7=l(A(),1),$7=l(F(),1),HC=l(R(),1),K7=l(X(),1);var UC=l(F(),1);function E5(e){return!e||Object.keys(e).length===0}function zl(e){let{clientId:t}=Ae(),o=e||t,{updateBlockAttributes:r}=(0,UC.useDispatch)(x),{getBlockAttributes:n}=(0,UC.useRegistry)().select(x);return{updateBlockBindings:a=>{let{metadata:{bindings:c,...u}={}}=n(o),d={...c};Object.entries(a).forEach(([m,h])=>{if(!h&&d[m]){delete d[m];return}d[m]=h});let f={...u,bindings:d};E5(f.bindings)&&delete f.bindings,r(o,{metadata:E5(f)?void 0:f})},removeAllBlockBindings:()=>{let{metadata:{bindings:a,...c}={}}=n(o);r(o,{metadata:E5(c)?void 0:c})}}}var Ds=l(w(),1),{Menu:Uu}=M(W7.privateApis);function KSe({args:e,attribute:t,field:o,source:r,sourceKey:n}){let i=(0,HC.useMemo)(()=>({source:n,args:o.args||{key:o.key}}),[o.args,o.key,n]),s=(0,HC.useContext)(Or),a=(0,$7.useSelect)(u=>r.getValues({select:u,context:s,bindings:{[t]:i}}),[t,s,i,r]),{updateBlockBindings:c}=zl();return(0,Ds.jsxs)(Uu.CheckboxItem,{onChange:()=>{let u=(0,T5.default)(e,o.args)??o.key===e?.key;c(u?{[t]:void 0}:{[t]:i})},name:t+"-binding",value:a[t],checked:(0,T5.default)(e,o.args)??o.key===e?.key,children:[(0,Ds.jsx)(Uu.ItemLabel,{children:o.label}),(0,Ds.jsx)(Uu.ItemHelpText,{children:a[t]})]})}function gy({args:e,attribute:t,sourceKey:o,fields:r}){let n=(0,K7.useViewportMatch)("medium","<");if(!r||r.length===0)return null;let i=(0,G7.getBlockBindingsSource)(o);return(0,Ds.jsxs)(Uu,{placement:n?"bottom-start":"left-start",children:[(0,Ds.jsx)(Uu.SubmenuTriggerItem,{children:(0,Ds.jsx)(Uu.ItemLabel,{children:i.label})}),(0,Ds.jsx)(Uu.Popover,{gutter:8,children:(0,Ds.jsx)(Uu.Group,{children:r.map(s=>(0,Ds.jsx)(KSe,{args:e,attribute:t,field:s,source:i,sourceKey:o},o+JSON.stringify(s.args)||s.key))})})]},o)}var ji=l(w(),1),{Menu:GC}=M(Vs.privateApis);function by({attribute:e,binding:t,blockName:o}){let{updateBlockBindings:r}=zl(),n=(0,Z7.useViewportMatch)("medium","<"),i=(0,q7.useContext)(Or),s=(0,I5.useSelect)(g=>{let{getAllBlockBindingsSources:b,getBlockBindingsSourceFieldsList:k,getBlockType:v}=M(g($C.store)),y=v(o).attributes?.[e];if(y?.enum)return{};let _=y?.type==="rich-text"?"string":y?.type,S={};return Object.entries(b()).forEach(([C,B])=>{let T=k(B,i);if(!T?.length)return;let I=T.filter(E=>E.type===_);I.length&&(S[C]=I)}),S},[e,o,i]),{canUpdateBlockBindings:a}=(0,I5.useSelect)(g=>({canUpdateBlockBindings:g(x).getSettings().canUpdateBlockBindings})),c=Object.keys(s).length>0,u=!a||!c,{source:d,args:f}=t||{},m=(0,$C.getBlockBindingsSource)(d),h,p=!0;return t===void 0?(c?h=(0,WC.__)("Not connected"):h=(0,WC.__)("No sources available"),p=!0):m?h=s?.[d]?.find(g=>(0,Y7.default)(g.args,f))?.label||m?.label||d:(p=!1,h=(0,WC.__)("Source not registered")),(0,ji.jsx)(Vs.__experimentalToolsPanelItem,{hasValue:()=>!!t,label:e,onDeselect:!!c&&(()=>{r({[e]:void 0})}),children:(0,ji.jsxs)(GC,{placement:n?"bottom-start":"left-start",children:[(0,ji.jsx)(GC.TriggerButton,{render:(0,ji.jsx)(Vs.__experimentalItem,{}),disabled:!c,children:(0,ji.jsxs)(Vs.__experimentalVStack,{className:"block-editor-bindings__item",spacing:0,children:[(0,ji.jsx)(Vs.__experimentalText,{truncate:!0,children:e}),(0,ji.jsx)(Vs.__experimentalText,{truncate:!0,variant:p?"muted":void 0,isDestructive:!p,children:h})]})}),!u&&(0,ji.jsx)(GC.Popover,{gutter:n?8:36,children:(0,ji.jsx)(GC,{placement:n?"bottom-start":"left-start",children:Object.entries(s).map(([g,b])=>(0,ji.jsx)(gy,{args:t?.args,attribute:e,sourceKey:g,fields:b},g))})})]})})}var X7=l(N(),1),Q7=l(A(),1);var J7=l(w(),1);function YSe({isActive:e,label:t=(0,X7.__)("Full height"),onToggle:o,isDisabled:r}){return(0,J7.jsx)(Q7.ToolbarButton,{isActive:e,icon:DL,label:t,onClick:()=>o(!e),disabled:r})}var eU=YSe;var oU=l(N(),1),rU=l(it(),1),bm=l(A(),1),vy=l(w(),1),qSe=()=>{};function ZSe(e){let{label:t=(0,oU.__)("Change matrix alignment"),onChange:o=qSe,value:r="center",isDisabled:n}=e,i=(0,vy.jsx)(bm.AlignmentMatrixControl.Icon,{value:r});return(0,vy.jsx)(bm.Dropdown,{popoverProps:{placement:"bottom-start"},renderToggle:({onToggle:s,isOpen:a})=>(0,vy.jsx)(bm.ToolbarButton,{onClick:s,"aria-haspopup":"true","aria-expanded":a,onKeyDown:u=>{!a&&u.keyCode===rU.DOWN&&(u.preventDefault(),s())},label:t,icon:i,showTooltip:!0,disabled:n}),renderContent:()=>(0,vy.jsx)(bm.AlignmentMatrixControl,{onChange:o,value:r})})}var nU=ZSe;var O5=l(A(),1),qC=l(F(),1),ZC=l(N(),1);var dU=l(R(),1);var iU=l(F(),1),KC=l(K(),1);function Sr({clientId:e,maximumLength:t,context:o}){let r=(0,iU.useSelect)(n=>{if(!e)return null;let{getBlockName:i,getBlockAttributes:s}=n(x),{getBlockType:a,getActiveBlockVariation:c}=n(KC.store),u=i(e),d=a(u);if(!d)return null;let f=s(e),m=(0,KC.__experimentalGetBlockLabel)(d,f,o);return m!==d.title?m:c(u,f)?.title||d.title},[e,o]);return r?t&&t>0&&r.length>t?r.slice(0,t-3)+"...":r:null}function ky({clientId:e,maximumLength:t,context:o}){return Sr({clientId:e,maximumLength:t,context:o})}var vm=l(R(),1),lU=l(X(),1);var YC=l(R(),1),P5=l(X(),1),sU=l(w(),1),yy=(0,YC.createContext)({refsMap:(0,P5.observableMap)()});yy.displayName="BlockRefsContext";function aU({children:e}){let t=(0,YC.useMemo)(()=>({refsMap:(0,P5.observableMap)()}),[]);return(0,sU.jsx)(yy.Provider,{value:t,children:e})}function cU(e){let{refsMap:t}=(0,vm.useContext)(yy);return(0,lU.useRefEffect)(o=>(t.set(e,o),()=>t.delete(e)),[e])}function R5(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function km(e,t){let{refsMap:o}=(0,vm.useContext)(yy);(0,vm.useLayoutEffect)(()=>{R5(t,o.get(e));let r=o.subscribe(e,()=>R5(t,o.get(e)));return()=>{r(),R5(t,null)}},[o,e,t])}function st(e){let[t,o]=(0,vm.useState)(null);return km(e,o),t}function uU(e){if(!e)return null;let t=Array.from(document.querySelectorAll('iframe[name="editor-canvas"]').values()).find(o=>(o.contentDocument||o.contentWindow.document)===e.ownerDocument)??e;return t?.closest('[role="region"]')??t}var ei=l(w(),1);function XSe({rootLabelText:e}){let{selectBlock:t,clearSelectedBlock:o}=(0,qC.useDispatch)(x),{clientId:r,parents:n,hasSelection:i}=(0,qC.useSelect)(c=>{let{getSelectionStart:u,getSelectedBlockClientId:d,getEnabledBlockParents:f}=M(c(x)),m=d();return{parents:f(m),clientId:m,hasSelection:!!u().clientId}},[]),s=e||(0,ZC._x)("Document","noun, breadcrumb"),a=(0,dU.useRef)();return km(r,a),(0,ei.jsxs)("ul",{className:"block-editor-block-breadcrumb",role:"list","aria-label":(0,ZC.__)("Block breadcrumb"),children:[(0,ei.jsxs)("li",{className:i?void 0:"block-editor-block-breadcrumb__current","aria-current":i?void 0:"true",children:[i&&(0,ei.jsx)(O5.Button,{size:"small",className:"block-editor-block-breadcrumb__button",onClick:()=>{let c=a.current?.closest(".editor-styles-wrapper");o(),uU(c)?.focus()},children:s}),!i&&(0,ei.jsx)("span",{children:s}),!!r&&(0,ei.jsx)(Ie,{icon:yu,className:"block-editor-block-breadcrumb__separator"})]}),n.map(c=>(0,ei.jsxs)("li",{children:[(0,ei.jsx)(O5.Button,{size:"small",className:"block-editor-block-breadcrumb__button",onClick:()=>t(c),children:(0,ei.jsx)(ky,{clientId:c,maximumLength:35,context:"breadcrumb"})}),(0,ei.jsx)(Ie,{icon:yu,className:"block-editor-block-breadcrumb__separator"})]},c)),!!r&&(0,ei.jsx)("li",{className:"block-editor-block-breadcrumb__current","aria-current":"true",children:(0,ei.jsx)(ky,{clientId:r,maximumLength:35,context:"breadcrumb"})})]})}var fU=XSe;var mU=l(F(),1);function pU(e){return(0,mU.useSelect)(t=>{let{__unstableHasActiveBlockOverlayActive:o}=t(x);return o(e)},[e])}var EI=l(X(),1),coe=l(R(),1),uoe=l(F(),1),doe=l(A(),1);var ts=l(F(),1),QE=l(X(),1),Sd=l(R(),1),bQ=l(K(),1);var Ju=l(R(),1),Ke=l(K(),1),VG=l(A(),1),j1=l(F(),1),U1=l(X(),1),FG=l(Fe(),1);var jl=l(N(),1),QC=l(A(),1),ym=l(R(),1),Vh=l(K(),1),JC=l(F(),1);var xU=l(kU(),1),XC=l(N(),1),wU=l(K(),1);var yU=l(A(),1),_U=l(R(),1),SU=l(Fe(),1),Pa=l(w(),1);function L5({title:e,rawContent:t,renderedContent:o,action:r,actionText:n,className:i}){return(0,Pa.jsxs)("div",{className:i,children:[(0,Pa.jsxs)("div",{className:"block-editor-block-compare__content",children:[(0,Pa.jsx)("h2",{className:"block-editor-block-compare__heading",children:e}),(0,Pa.jsx)("div",{className:"block-editor-block-compare__html",children:t}),(0,Pa.jsx)("div",{className:"block-editor-block-compare__preview edit-post-visual-editor",children:(0,Pa.jsx)(_U.RawHTML,{children:(0,SU.safeHTML)(o)})})]}),(0,Pa.jsx)("div",{className:"block-editor-block-compare__action",children:(0,Pa.jsx)(yU.Button,{__next40pxDefaultSize:!0,variant:"secondary",tabIndex:"0",onClick:r,children:n})})]})}var Dh=l(w(),1);function r0e({block:e,onKeep:t,onConvert:o,convertor:r,convertButtonText:n}){function i(u,d){return(0,xU.diffChars)(u,d).map((m,h)=>{let p=D({"block-editor-block-compare__added":m.added,"block-editor-block-compare__removed":m.removed});return(0,Dh.jsx)("span",{className:p,children:m.value},h)})}function s(u){return(Array.isArray(u)?u:[u]).map(m=>(0,wU.getSaveContent)(m.name,m.attributes,m.innerBlocks)).join("")}let a=s(r(e)),c=i(e.originalContent,a);return(0,Dh.jsxs)("div",{className:"block-editor-block-compare__wrapper",children:[(0,Dh.jsx)(L5,{title:(0,XC.__)("Current"),className:"block-editor-block-compare__current",action:t,actionText:(0,XC.__)("Convert to HTML"),rawContent:e.originalContent,renderedContent:e.originalContent}),(0,Dh.jsx)(L5,{title:(0,XC.__)("After Conversion"),className:"block-editor-block-compare__converted",action:o,actionText:n,rawContent:c,renderedContent:a})]})}var CU=r0e;var Ul=l(w(),1),BU=e=>(0,Vh.rawHandler)({HTML:e.originalContent});function EU({clientId:e}){let{block:t,canInsertHTMLBlock:o,canInsertClassicBlock:r}=(0,JC.useSelect)(d=>{let{canInsertBlockType:f,getBlock:m,getBlockRootClientId:h}=d(x),p=h(e);return{block:m(e),canInsertHTMLBlock:f("core/html",p),canInsertClassicBlock:f("core/freeform",p)}},[e]),{replaceBlock:n}=(0,JC.useDispatch)(x),[i,s]=(0,ym.useState)(!1),a=(0,ym.useCallback)(()=>s(!1),[]),c=(0,ym.useMemo)(()=>({toClassic(){let d=(0,Vh.createBlock)("core/freeform",{content:t.originalContent});return n(t.clientId,d)},toHTML(){let d=(0,Vh.createBlock)("core/html",{content:t.originalContent});return n(t.clientId,d)},toBlocks(){let d=BU(t);return n(t.clientId,d)},toRecoveredBlock(){let d=(0,Vh.createBlock)(t.name,t.attributes,t.innerBlocks);return n(t.clientId,d)}}),[t,n]),u=(0,ym.useMemo)(()=>[{title:(0,jl._x)("Resolve","imperative verb"),onClick:()=>s(!0)},o&&{title:(0,jl.__)("Convert to HTML"),onClick:c.toHTML},r&&{title:(0,jl.__)("Convert to Classic Block"),onClick:c.toClassic}].filter(Boolean),[o,r,c]);return(0,Ul.jsxs)(Ul.Fragment,{children:[(0,Ul.jsx)(Ou,{actions:[(0,Ul.jsx)(QC.Button,{__next40pxDefaultSize:!0,onClick:c.toRecoveredBlock,variant:"primary",children:(0,jl.__)("Attempt recovery")},"recover")],secondaryActions:u,children:(0,jl.__)("Block contains unexpected or invalid content.")}),i&&(0,Ul.jsx)(QC.Modal,{title:(0,jl.__)("Resolve Block"),onRequestClose:a,className:"block-editor-block-compare",children:(0,Ul.jsx)(CU,{block:t,onKeep:c.toHTML,onConvert:c.toBlocks,convertor:BU,convertButtonText:(0,jl.__)("Convert to Blocks")})})]})}var TU=l(N(),1);var IU=l(w(),1),n0e=(0,IU.jsx)(Ou,{className:"block-editor-block-list__block-crash-warning",children:(0,TU.__)("This block has encountered an error and cannot be previewed.")});function PU(){return n0e}var RU=l(R(),1),i0e=class extends RU.Component{constructor(){super(...arguments),this.state={hasError:!1}}componentDidCatch(){this.setState({hasError:!0})}render(){return this.state.hasError?this.props.fallback:this.props.children}},OU=i0e;var XU=l(D5(),1),Fh=l(R(),1),r1=l(F(),1),Ra=l(K(),1);var QU=l(w(),1);function g0e({clientId:e}){let[t,o]=(0,Fh.useState)(""),r=(0,r1.useSelect)(a=>a(x).getBlock(e),[e]),{updateBlock:n}=(0,r1.useDispatch)(x),i=(0,Fh.useMemo)(()=>r?(0,Ra.getBlockContent)(r):"",[r]),s=()=>{let a=(0,Ra.getBlockType)(r.name);if(!a)return;let c=(0,Ra.getBlockAttributes)(a,t,r.attributes),u=t||(0,Ra.getSaveContent)(a,c),[d]=t?(0,Ra.validateBlock)({...r,attributes:c,originalContent:u}):[!0];n(e,{attributes:c,originalContent:u,isValid:d}),t||o(u)};return(0,Fh.useEffect)(()=>{o(i)},[i]),(0,QU.jsx)(XU.default,{className:"block-editor-block-list__block-html-textarea",value:t,onBlur:s,onChange:a=>o(a.target.value)})}var JU=g0e;var NG=l(R(),1),F1=l(N(),1),MG=l(K(),1),eg=l(X(),1),DG=l(xy(),1);var F5=Cy(),_e=e=>wy(e,F5),z5=Cy();_e.write=e=>wy(e,z5);var n1=Cy();_e.onStart=e=>wy(e,n1);var j5=Cy();_e.onFrame=e=>wy(e,j5);var U5=Cy();_e.onFinish=e=>wy(e,U5);var zh=[];_e.setTimeout=(e,t)=>{let o=_e.now()+t,r=()=>{let i=zh.findIndex(s=>s.cancel==r);~i&&zh.splice(i,1),Gu-=~i?1:0},n={time:o,handler:e,cancel:r};return zh.splice(tH(o),0,n),Gu+=1,oH(),n};var tH=e=>~(~zh.findIndex(t=>t.time>e)||~zh.length);_e.cancel=e=>{n1.delete(e),j5.delete(e),U5.delete(e),F5.delete(e),z5.delete(e)};_e.sync=e=>{V5=!0,_e.batchedUpdates(e),V5=!1};_e.throttle=e=>{let t;function o(){try{e(...t)}finally{t=null}}function r(...n){t=n,_e.onStart(o)}return r.handler=e,r.cancel=()=>{n1.delete(o),t=null},r};var H5=typeof window<"u"?window.requestAnimationFrame:()=>{};_e.use=e=>H5=e;_e.now=typeof performance<"u"?()=>performance.now():Date.now;_e.batchedUpdates=e=>e();_e.catch=console.error;_e.frameLoop="always";_e.advance=()=>{_e.frameLoop!=="demand"?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):nH()};var Hu=-1,Gu=0,V5=!1;function wy(e,t){V5?(t.delete(e),e(0)):(t.add(e),oH())}function oH(){Hu<0&&(Hu=0,_e.frameLoop!=="demand"&&H5(rH))}function b0e(){Hu=-1}function rH(){~Hu&&(H5(rH),_e.batchedUpdates(nH))}function nH(){let e=Hu;Hu=_e.now();let t=tH(Hu);if(t&&(iH(zh.splice(0,t),o=>o.handler()),Gu-=t),!Gu){b0e();return}n1.flush(),F5.flush(e?Math.min(64,Hu-e):16.667),j5.flush(),z5.flush(),U5.flush()}function Cy(){let e=new Set,t=e;return{add(o){Gu+=t==e&&!e.has(o)?1:0,e.add(o)},delete(o){return Gu-=t==e&&e.has(o)?1:0,e.delete(o)},flush(o){t.size&&(e=new Set,Gu-=t.size,iH(t,r=>r(o)&&e.add(r)),Gu+=e.size,t=e)}}}function iH(e,t){e.forEach(o=>{try{t(o)}catch(r){_e.catch(r)}})}var Hi=l(Ge());function c1(){}var dH=(e,t,o)=>Object.defineProperty(e,t,{value:o,writable:!0,configurable:!0}),ae={arr:Array.isArray,obj:e=>!!e&&e.constructor.name==="Object",fun:e=>typeof e=="function",str:e=>typeof e=="string",num:e=>typeof e=="number",und:e=>e===void 0};function Oa(e,t){if(ae.arr(e)){if(!ae.arr(t)||e.length!==t.length)return!1;for(let o=0;o<e.length;o++)if(e[o]!==t[o])return!1;return!0}return e===t}var Bt=(e,t)=>e.forEach(t);function Gi(e,t,o){if(ae.arr(e)){for(let r=0;r<e.length;r++)t.call(o,e[r],`${r}`);return}for(let r in e)e.hasOwnProperty(r)&&t.call(o,e[r],r)}var wn=e=>ae.und(e)?[]:ae.arr(e)?e:[e];function Gh(e,t){if(e.size){let o=Array.from(e);e.clear(),Bt(o,t)}}var Wh=(e,...t)=>Gh(e,o=>o(...t)),q5=()=>typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),Z5,fH,Wu=null,mH=!1,X5=c1,v0e=e=>{e.to&&(fH=e.to),e.now&&(_e.now=e.now),e.colors!==void 0&&(Wu=e.colors),e.skipAnimation!=null&&(mH=e.skipAnimation),e.createStringInterpolator&&(Z5=e.createStringInterpolator),e.requestAnimationFrame&&_e.use(e.requestAnimationFrame),e.batchedUpdates&&(_e.batchedUpdates=e.batchedUpdates),e.willAdvance&&(X5=e.willAdvance),e.frameLoop&&(_e.frameLoop=e.frameLoop)},ti=Object.freeze({__proto__:null,get createStringInterpolator(){return Z5},get to(){return fH},get colors(){return Wu},get skipAnimation(){return mH},get willAdvance(){return X5},assign:v0e}),By=new Set,Ui=[],G5=[],a1=0,$h={get idle(){return!By.size&&!Ui.length},start(e){a1>e.priority?(By.add(e),_e.onStart(k0e)):(pH(e),_e(K5))},advance:K5,sort(e){if(a1)_e.onFrame(()=>$h.sort(e));else{let t=Ui.indexOf(e);~t&&(Ui.splice(t,1),hH(e))}},clear(){Ui=[],By.clear()}};function k0e(){By.forEach(pH),By.clear(),_e(K5)}function pH(e){Ui.includes(e)||hH(e)}function hH(e){Ui.splice(y0e(Ui,t=>t.priority>e.priority),0,e)}function K5(e){let t=G5;for(let o=0;o<Ui.length;o++){let r=Ui[o];a1=r.priority,r.idle||(X5(r),r.advance(e),r.idle||t.push(r))}return a1=0,G5=Ui,G5.length=0,Ui=t,Ui.length>0}function y0e(e,t){let o=e.findIndex(t);return o<0?e.length:o}var gH={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},Fs="[-+]?\\d*\\.?\\d+",l1=Fs+"%";function u1(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var _0e=new RegExp("rgb"+u1(Fs,Fs,Fs)),S0e=new RegExp("rgba"+u1(Fs,Fs,Fs,Fs)),x0e=new RegExp("hsl"+u1(Fs,l1,l1)),w0e=new RegExp("hsla"+u1(Fs,l1,l1,Fs)),C0e=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,B0e=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,E0e=/^#([0-9a-fA-F]{6})$/,T0e=/^#([0-9a-fA-F]{8})$/;function I0e(e){let t;return typeof e=="number"?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=E0e.exec(e))?parseInt(t[1]+"ff",16)>>>0:Wu&&Wu[e]!==void 0?Wu[e]:(t=_0e.exec(e))?(jh(t[1])<<24|jh(t[2])<<16|jh(t[3])<<8|255)>>>0:(t=S0e.exec(e))?(jh(t[1])<<24|jh(t[2])<<16|jh(t[3])<<8|lH(t[4]))>>>0:(t=C0e.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=T0e.exec(e))?parseInt(t[1],16)>>>0:(t=B0e.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=x0e.exec(e))?(sH(aH(t[1]),i1(t[2]),i1(t[3]))|255)>>>0:(t=w0e.exec(e))?(sH(aH(t[1]),i1(t[2]),i1(t[3]))|lH(t[4]))>>>0:null}function W5(e,t,o){return o<0&&(o+=1),o>1&&(o-=1),o<1/6?e+(t-e)*6*o:o<1/2?t:o<2/3?e+(t-e)*(2/3-o)*6:e}function sH(e,t,o){let r=o<.5?o*(1+t):o+t-o*t,n=2*o-r,i=W5(n,r,e+1/3),s=W5(n,r,e),a=W5(n,r,e-1/3);return Math.round(i*255)<<24|Math.round(s*255)<<16|Math.round(a*255)<<8}function jh(e){let t=parseInt(e,10);return t<0?0:t>255?255:t}function aH(e){return(parseFloat(e)%360+360)%360/360}function lH(e){let t=parseFloat(e);return t<0?0:t>1?255:Math.round(t*255)}function i1(e){let t=parseFloat(e);return t<0?0:t>100?1:t/100}function cH(e){let t=I0e(e);if(t===null)return e;t=t||0;let o=(t&4278190080)>>>24,r=(t&16711680)>>>16,n=(t&65280)>>>8,i=(t&255)/255;return`rgba(${o}, ${r}, ${n}, ${i})`}var $u=(e,t,o)=>{if(ae.fun(e))return e;if(ae.arr(e))return $u({range:e,output:t,extrapolate:o});if(ae.str(e.output[0]))return Z5(e);let r=e,n=r.output,i=r.range||[0,1],s=r.extrapolateLeft||r.extrapolate||"extend",a=r.extrapolateRight||r.extrapolate||"extend",c=r.easing||(u=>u);return u=>{let d=R0e(u,i);return P0e(u,i[d],i[d+1],n[d],n[d+1],c,s,a,r.map)}};function P0e(e,t,o,r,n,i,s,a,c){let u=c?c(e):e;if(u<t){if(s==="identity")return u;s==="clamp"&&(u=t)}if(u>o){if(a==="identity")return u;a==="clamp"&&(u=o)}return r===n?r:t===o?e<=t?r:n:(t===-1/0?u=-u:o===1/0?u=u-t:u=(u-t)/(o-t),u=i(u),r===-1/0?u=-u:n===1/0?u=u+r:u=u*(n-r)+r,u)}function R0e(e,t){for(var o=1;o<t.length-1&&!(t[o]>=e);++o);return o-1}function Y5(){return Y5=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&(e[r]=o[r])}return e},Y5.apply(this,arguments)}var Uh=Symbol.for("FluidValue.get"),_m=Symbol.for("FluidValue.observers"),Qr=e=>!!(e&&e[Uh]),xr=e=>e&&e[Uh]?e[Uh]():e,Q5=e=>e[_m]||null;function O0e(e,t){e.eventObserved?e.eventObserved(t):e(t)}function Sm(e,t){let o=e[_m];o&&o.forEach(r=>{O0e(r,t)})}var Hh=class{constructor(t){if(this[Uh]=void 0,this[_m]=void 0,!t&&!(t=this.get))throw Error("Unknown getter");A0e(this,t)}},A0e=(e,t)=>bH(e,Uh,t);function Ku(e,t){if(e[Uh]){let o=e[_m];o||bH(e,_m,o=new Set),o.has(t)||(o.add(t),e.observerAdded&&e.observerAdded(o.size,t))}return t}function Yu(e,t){let o=e[_m];if(o&&o.has(t)){let r=o.size-1;r?o.delete(t):e[_m]=null,e.observerRemoved&&e.observerRemoved(r,t)}}var bH=(e,t,o)=>Object.defineProperty(e,t,{value:o,writable:!0,configurable:!0}),s1=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,L0e=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,uH=new RegExp(`(${s1.source})(%|[a-z]+)`,"i"),N0e=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,d1=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,vH=e=>{let[t,o]=M0e(e);if(!t||q5())return e;let r=window.getComputedStyle(document.documentElement).getPropertyValue(t);if(r)return r.trim();if(o&&o.startsWith("--")){let n=window.getComputedStyle(document.documentElement).getPropertyValue(o);return n||e}else{if(o&&d1.test(o))return vH(o);if(o)return o}return e},M0e=e=>{let t=d1.exec(e);if(!t)return[,];let[,o,r]=t;return[o,r]},$5,D0e=(e,t,o,r,n)=>`rgba(${Math.round(t)}, ${Math.round(o)}, ${Math.round(r)}, ${n})`,f1=e=>{$5||($5=Wu?new RegExp(`(${Object.keys(Wu).join("|")})(?!\\w)`,"g"):/^\b$/);let t=e.output.map(i=>xr(i).replace(d1,vH).replace(L0e,cH).replace($5,cH)),o=t.map(i=>i.match(s1).map(Number)),n=o[0].map((i,s)=>o.map(a=>{if(!(s in a))throw Error('The arity of each "output" value must be equal');return a[s]})).map(i=>$u(Y5({},e,{output:i})));return i=>{var s;let a=!uH.test(t[0])&&((s=t.find(u=>uH.test(u)))==null?void 0:s.replace(s1,"")),c=0;return t[0].replace(s1,()=>`${n[c++](i)}${a||""}`).replace(N0e,D0e)}},kH="react-spring: ",yH=e=>{let t=e,o=!1;if(typeof t!="function")throw new TypeError(`${kH}once requires a function parameter`);return(...r)=>{o||(t(...r),o=!0)}},V0e=yH(console.warn);function _H(){V0e(`${kH}The "interpolate" function is deprecated in v9 (use "to" instead)`)}var B7e=yH(console.warn);function Kh(e){return ae.str(e)&&(e[0]=="#"||/\d/.test(e)||!q5()&&d1.test(e)||e in(Wu||{}))}var Ey=q5()?Hi.useEffect:Hi.useLayoutEffect,F0e=()=>{let e=(0,Hi.useRef)(!1);return Ey(()=>(e.current=!0,()=>{e.current=!1}),[]),e};function J5(){let e=(0,Hi.useState)()[1],t=F0e();return()=>{t.current&&e(Math.random())}}function SH(e,t){let[o]=(0,Hi.useState)(()=>({inputs:t,result:e()})),r=(0,Hi.useRef)(),n=r.current,i=n;return i?t&&i.inputs&&z0e(t,i.inputs)||(i={inputs:t,result:e()}):i=o,(0,Hi.useEffect)(()=>{r.current=i,n==o&&(o.inputs=o.result=void 0)},[i]),i.result}function z0e(e,t){if(e.length!==t.length)return!1;for(let o=0;o<e.length;o++)if(e[o]!==t[o])return!1;return!0}var eD=e=>(0,Hi.useEffect)(e,j0e),j0e=[];var Dy=l(Ge()),Vy=l(Ge());var BH=l(Ge()),Gl=l(Ge()),Ty=Symbol.for("Animated:node"),U0e=e=>!!e&&e[Ty]===e,zs=e=>e&&e[Ty],g1=(e,t)=>dH(e,Ty,t),Iy=e=>e&&e[Ty]&&e[Ty].getPayload(),m1=class{constructor(){this.payload=void 0,g1(this,this)}getPayload(){return this.payload||[]}},xm=class e extends m1{constructor(t){super(),this.done=!0,this.elapsedTime=void 0,this.lastPosition=void 0,this.lastVelocity=void 0,this.v0=void 0,this.durationProgress=0,this._value=t,ae.num(this._value)&&(this.lastPosition=this._value)}static create(t){return new e(t)}getPayload(){return[this]}getValue(){return this._value}setValue(t,o){return ae.num(t)&&(this.lastPosition=t,o&&(t=Math.round(t/o)*o,this.done&&(this.lastPosition=t))),this._value===t?!1:(this._value=t,!0)}reset(){let{done:t}=this;this.done=!1,ae.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,t&&(this.lastVelocity=null),this.v0=null)}},wm=class e extends xm{constructor(t){super(0),this._string=null,this._toString=void 0,this._toString=$u({output:[t,t]})}static create(t){return new e(t)}getValue(){let t=this._string;return t??(this._string=this._toString(this._value))}setValue(t){if(ae.str(t)){if(t==this._string)return!1;this._string=t,this._value=1}else if(super.setValue(t))this._string=null;else return!1;return!0}reset(t){t&&(this._toString=$u({output:[this.getValue(),t]})),this._value=0,super.reset()}},p1={dependencies:null},Cm=class extends m1{constructor(t){super(),this.source=t,this.setValue(t)}getValue(t){let o={};return Gi(this.source,(r,n)=>{U0e(r)?o[n]=r.getValue(t):Qr(r)?o[n]=xr(r):t||(o[n]=r)}),o}setValue(t){this.source=t,this.payload=this._makePayload(t)}reset(){this.payload&&Bt(this.payload,t=>t.reset())}_makePayload(t){if(t){let o=new Set;return Gi(t,this._addToPayload,o),Array.from(o)}}_addToPayload(t){p1.dependencies&&Qr(t)&&p1.dependencies.add(t);let o=Iy(t);o&&Bt(o,r=>this.add(r))}},tD=class e extends Cm{constructor(t){super(t)}static create(t){return new e(t)}getValue(){return this.source.map(t=>t.getValue())}setValue(t){let o=this.getPayload();return t.length==o.length?o.map((r,n)=>r.setValue(t[n])).some(Boolean):(super.setValue(t.map(H0e)),!0)}};function H0e(e){return(Kh(e)?wm:xm).create(e)}function b1(e){let t=zs(e);return t?t.constructor:ae.arr(e)?tD:Kh(e)?wm:xm}function h1(){return h1=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&(e[r]=o[r])}return e},h1.apply(this,arguments)}var xH=(e,t)=>{let o=!ae.fun(e)||e.prototype&&e.prototype.isReactComponent;return(0,Gl.forwardRef)((r,n)=>{let i=(0,Gl.useRef)(null),s=o&&(0,Gl.useCallback)(p=>{i.current=W0e(n,p)},[n]),[a,c]=G0e(r,t),u=J5(),d=()=>{let p=i.current;if(o&&!p)return;(p?t.applyAnimatedValues(p,a.getValue(!0)):!1)===!1&&u()},f=new oD(d,c),m=(0,Gl.useRef)();Ey(()=>(m.current=f,Bt(c,p=>Ku(p,f)),()=>{m.current&&(Bt(m.current.deps,p=>Yu(p,m.current)),_e.cancel(m.current.update))})),(0,Gl.useEffect)(d,[]),eD(()=>()=>{let p=m.current;Bt(p.deps,g=>Yu(g,p))});let h=t.getComponentProps(a.getValue());return BH.createElement(e,h1({},h,{ref:s}))})},oD=class{constructor(t,o){this.update=t,this.deps=o}eventObserved(t){t.type=="change"&&_e.write(this.update)}};function G0e(e,t){let o=new Set;return p1.dependencies=o,e.style&&(e=h1({},e,{style:t.createAnimatedStyle(e.style)})),e=new Cm(e),p1.dependencies=null,[e,o]}function W0e(e,t){return e&&(ae.fun(e)?e(t):e.current=t),t}var wH=Symbol.for("AnimatedComponent"),EH=(e,{applyAnimatedValues:t=()=>!1,createAnimatedStyle:o=n=>new Cm(n),getComponentProps:r=n=>n}={})=>{let n={applyAnimatedValues:t,createAnimatedStyle:o,getComponentProps:r},i=s=>{let a=CH(s)||"Anonymous";return ae.str(s)?s=i[s]||(i[s]=xH(s,n)):s=s[wH]||(s[wH]=xH(s,n)),s.displayName=`Animated(${a})`,s};return Gi(e,(s,a)=>{ae.arr(e)&&(a=CH(s)),i[a]=i(s)}),{animated:i}},CH=e=>ae.str(e)?e:e&&ae.str(e.displayName)?e.displayName:ae.fun(e)&&e.name||null;function Jr(){return Jr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&(e[r]=o[r])}return e},Jr.apply(this,arguments)}function Bm(e,...t){return ae.fun(e)?e(...t):e}var Ay=(e,t)=>e===!0||!!(t&&e&&(ae.fun(e)?e(t):wn(e).includes(t))),FH=(e,t)=>ae.obj(e)?t&&e[t]:e,zH=(e,t)=>e.default===!0?e[t]:e.default?e.default[t]:void 0,$0e=e=>e,jH=(e,t=$0e)=>{let o=K0e;e.default&&e.default!==!0&&(e=e.default,o=Object.keys(e));let r={};for(let n of o){let i=t(e[n],n);ae.und(i)||(r[n]=i)}return r},K0e=["config","onProps","onStart","onChange","onPause","onResume","onRest"],Y0e={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 q0e(e){let t={},o=0;if(Gi(e,(r,n)=>{Y0e[n]||(t[n]=r,o++)}),o)return t}function UH(e){let t=q0e(e);if(t){let o={to:t};return Gi(e,(r,n)=>n in t||(o[n]=r)),o}return Jr({},e)}function Ly(e){return e=xr(e),ae.arr(e)?e.map(Ly):Kh(e)?ti.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function iD(e){return ae.fun(e)||ae.arr(e)&&ae.obj(e[0])}var Z0e={default:{tension:170,friction:26},gentle:{tension:120,friction:14},wobbly:{tension:180,friction:12},stiff:{tension:210,friction:20},slow:{tension:280,friction:60},molasses:{tension:280,friction:120}},y1=1.70158,v1=y1*1.525,TH=y1+1,IH=2*Math.PI/3,PH=2*Math.PI/4.5,k1=e=>e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375,X0e={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=>e===0?0:Math.pow(2,10*e-10),easeOutExpo:e=>e===1?1:1-Math.pow(2,-10*e),easeInOutExpo:e=>e===0?0:e===1?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=>TH*e*e*e-y1*e*e,easeOutBack:e=>1+TH*Math.pow(e-1,3)+y1*Math.pow(e-1,2),easeInOutBack:e=>e<.5?Math.pow(2*e,2)*((v1+1)*2*e-v1)/2:(Math.pow(2*e-2,2)*((v1+1)*(e*2-2)+v1)+2)/2,easeInElastic:e=>e===0?0:e===1?1:-Math.pow(2,10*e-10)*Math.sin((e*10-10.75)*IH),easeOutElastic:e=>e===0?0:e===1?1:Math.pow(2,-10*e)*Math.sin((e*10-.75)*IH)+1,easeInOutElastic:e=>e===0?0:e===1?1:e<.5?-(Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*PH))/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*PH)/2+1,easeInBounce:e=>1-k1(1-e),easeOutBounce:k1,easeInOutBounce:e=>e<.5?(1-k1(1-2*e))/2:(1+k1(2*e-1))/2},sD=Jr({},Z0e.default,{mass:1,damping:1,easing:X0e.linear,clamp:!1}),aD=class{constructor(){this.tension=void 0,this.friction=void 0,this.frequency=void 0,this.damping=void 0,this.mass=void 0,this.velocity=0,this.restVelocity=void 0,this.precision=void 0,this.progress=void 0,this.duration=void 0,this.easing=void 0,this.clamp=void 0,this.bounce=void 0,this.decay=void 0,this.round=void 0,Object.assign(this,sD)}};function Q0e(e,t,o){o&&(o=Jr({},o),RH(o,t),t=Jr({},o,t)),RH(e,t),Object.assign(e,t);for(let s in sD)e[s]==null&&(e[s]=sD[s]);let{mass:r,frequency:n,damping:i}=e;return ae.und(n)||(n<.01&&(n=.01),i<0&&(i=0),e.tension=Math.pow(2*Math.PI/n,2)*r,e.friction=4*Math.PI*i*r/n),e}function RH(e,t){if(!ae.und(t.decay))e.duration=void 0;else{let o=!ae.und(t.tension)||!ae.und(t.friction);(o||!ae.und(t.frequency)||!ae.und(t.damping)||!ae.und(t.mass))&&(e.duration=void 0,e.decay=void 0),o&&(e.frequency=void 0)}}var OH=[],lD=class{constructor(){this.changed=!1,this.values=OH,this.toValues=null,this.fromValues=OH,this.to=void 0,this.from=void 0,this.config=new aD,this.immediate=!1}};function HH(e,{key:t,props:o,defaultProps:r,state:n,actions:i}){return new Promise((s,a)=>{var c;let u,d,f=Ay((c=o.cancel)!=null?c:r?.cancel,t);if(f)p();else{ae.und(o.pause)||(n.paused=Ay(o.pause,t));let g=r?.pause;g!==!0&&(g=n.paused||Ay(g,t)),u=Bm(o.delay||0,t),g?(n.resumeQueue.add(h),i.pause()):(i.resume(),h())}function m(){n.resumeQueue.add(h),n.timeouts.delete(d),d.cancel(),u=d.time-_e.now()}function h(){u>0&&!ti.skipAnimation?(n.delayed=!0,d=_e.setTimeout(p,u),n.pauseQueue.add(m),n.timeouts.add(d)):p()}function p(){n.delayed&&(n.delayed=!1),n.pauseQueue.delete(m),n.timeouts.delete(d),e<=(n.cancelId||0)&&(f=!0);try{i.start(Jr({},o,{callId:e,cancel:f}),s)}catch(g){a(g)}}})}var hD=(e,t)=>t.length==1?t[0]:t.some(o=>o.cancelled)?Yh(e.get()):t.every(o=>o.noop)?GH(e.get()):js(e.get(),t.every(o=>o.finished)),GH=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),js=(e,t,o=!1)=>({value:e,finished:t,cancelled:o}),Yh=e=>({value:e,cancelled:!0,finished:!1});function WH(e,t,o,r){let{callId:n,parentId:i,onRest:s}=t,{asyncTo:a,promise:c}=o;return!i&&e===a&&!t.reset?c:o.promise=(async()=>{o.asyncId=n,o.asyncTo=e;let u=jH(t,(b,k)=>k==="onRest"?void 0:b),d,f,m=new Promise((b,k)=>(d=b,f=k)),h=b=>{let k=n<=(o.cancelId||0)&&Yh(r)||n!==o.asyncId&&js(r,!1);if(k)throw b.result=k,f(b),b},p=(b,k)=>{let v=new _1,y=new S1;return(async()=>{if(ti.skipAnimation)throw Ny(o),y.result=js(r,!1),f(y),y;h(v);let _=ae.obj(b)?Jr({},b):Jr({},k,{to:b});_.parentId=n,Gi(u,(C,B)=>{ae.und(_[B])&&(_[B]=C)});let S=await r.start(_);return h(v),o.paused&&await new Promise(C=>{o.resumeQueue.add(C)}),S})()},g;if(ti.skipAnimation)return Ny(o),js(r,!1);try{let b;ae.arr(e)?b=(async k=>{for(let v of k)await p(v)})(e):b=Promise.resolve(e(p,r.stop.bind(r))),await Promise.all([b.then(d),m]),g=js(r.get(),!0,!1)}catch(b){if(b instanceof _1)g=b.result;else if(b instanceof S1)g=b.result;else throw b}finally{n==o.asyncId&&(o.asyncId=i,o.asyncTo=i?a:void 0,o.promise=i?c:void 0)}return ae.fun(s)&&_e.batchedUpdates(()=>{s(g,r,r.item)}),g})()}function Ny(e,t){Gh(e.timeouts,o=>o.cancel()),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}var _1=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."),this.result=void 0}},S1=class extends Error{constructor(){super("SkipAnimationSignal"),this.result=void 0}},cD=e=>e instanceof My,J0e=1,My=class extends Hh{constructor(...t){super(...t),this.id=J0e++,this.key=void 0,this._priority=0}get priority(){return this._priority}set priority(t){this._priority!=t&&(this._priority=t,this._onPriorityChange(t))}get(){let t=zs(this);return t&&t.getValue()}to(...t){return ti.to(this,t)}interpolate(...t){return _H(),ti.to(this,t)}toJSON(){return this.get()}observerAdded(t){t==1&&this._attach()}observerRemoved(t){t==0&&this._detach()}_attach(){}_detach(){}_onChange(t,o=!1){Sm(this,{type:"change",parent:this,value:t,idle:o})}_onPriorityChange(t){this.idle||$h.sort(this),Sm(this,{type:"priority",parent:this,priority:t})}},Em=Symbol.for("SpringPhase"),$H=1,uD=2,dD=4,rD=e=>(e[Em]&$H)>0,qu=e=>(e[Em]&uD)>0,Py=e=>(e[Em]&dD)>0,AH=(e,t)=>t?e[Em]|=uD|$H:e[Em]&=~uD,LH=(e,t)=>t?e[Em]|=dD:e[Em]&=~dD,fD=class extends My{constructor(t,o){if(super(),this.key=void 0,this.animation=new lD,this.queue=void 0,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,!ae.und(t)||!ae.und(o)){let r=ae.obj(t)?Jr({},t):Jr({},o,{from:t});ae.und(r.default)&&(r.default=!0),this.start(r)}}get idle(){return!(qu(this)||this._state.asyncTo)||Py(this)}get goal(){return xr(this.animation.to)}get velocity(){let t=zs(this);return t instanceof xm?t.lastVelocity||0:t.getPayload().map(o=>o.lastVelocity||0)}get hasAnimated(){return rD(this)}get isAnimating(){return qu(this)}get isPaused(){return Py(this)}get isDelayed(){return this._state.delayed}advance(t){let o=!0,r=!1,n=this.animation,{config:i,toValues:s}=n,a=Iy(n.to);!a&&Qr(n.to)&&(s=wn(xr(n.to))),n.values.forEach((d,f)=>{if(d.done)return;let m=d.constructor==wm?1:a?a[f].lastPosition:s[f],h=n.immediate,p=m;if(!h){if(p=d.lastPosition,i.tension<=0){d.done=!0;return}let g=d.elapsedTime+=t,b=n.fromValues[f],k=d.v0!=null?d.v0:d.v0=ae.arr(i.velocity)?i.velocity[f]:i.velocity,v,y=i.precision||(b==m?.005:Math.min(1,Math.abs(m-b)*.001));if(ae.und(i.duration))if(i.decay){let _=i.decay===!0?.998:i.decay,S=Math.exp(-(1-_)*g);p=b+k/(1-_)*(1-S),h=Math.abs(d.lastPosition-p)<=y,v=k*S}else{v=d.lastVelocity==null?k:d.lastVelocity;let _=i.restVelocity||y/10,S=i.clamp?0:i.bounce,C=!ae.und(S),B=b==m?d.v0>0:b<m,T,I=!1,E=1,L=Math.ceil(t/E);for(let P=0;P<L&&(T=Math.abs(v)>_,!(!T&&(h=Math.abs(m-p)<=y,h)));++P){C&&(I=p==m||p>m==B,I&&(v=-v*S,p=m));let O=-i.tension*1e-6*(p-m),V=-i.friction*.001*v,j=(O+V)/i.mass;v=v+j*E,p=p+v*E}}else{let _=1;i.duration>0&&(this._memoizedDuration!==i.duration&&(this._memoizedDuration=i.duration,d.durationProgress>0&&(d.elapsedTime=i.duration*d.durationProgress,g=d.elapsedTime+=t)),_=(i.progress||0)+g/this._memoizedDuration,_=_>1?1:_<0?0:_,d.durationProgress=_),p=b+i.easing(_)*(m-b),v=(p-d.lastPosition)/t,h=_==1}d.lastVelocity=v,Number.isNaN(p)&&(console.warn("Got NaN while animating:",this),h=!0)}a&&!a[f].done&&(h=!1),h?d.done=!0:o=!1,d.setValue(p,i.round)&&(r=!0)});let c=zs(this),u=c.getValue();if(o){let d=xr(n.to);(u!==d||r)&&!i.decay?(c.setValue(d),this._onChange(d)):r&&i.decay&&this._onChange(u),this._stop()}else r&&this._onChange(u)}set(t){return _e.batchedUpdates(()=>{this._stop(),this._focus(t),this._set(t)}),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(qu(this)){let{to:t,config:o}=this.animation;_e.batchedUpdates(()=>{this._onStart(),o.decay||this._set(t,!1),this._stop()})}return this}update(t){return(this.queue||(this.queue=[])).push(t),this}start(t,o){let r;return ae.und(t)?(r=this.queue||[],this.queue=[]):r=[ae.obj(t)?t:Jr({},o,{to:t})],Promise.all(r.map(n=>this._update(n))).then(n=>hD(this,n))}stop(t){let{to:o}=this.animation;return this._focus(this.get()),Ny(this._state,t&&this._lastCallId),_e.batchedUpdates(()=>this._stop(o,t)),this}reset(){this._update({reset:!0})}eventObserved(t){t.type=="change"?this._start():t.type=="priority"&&(this.priority=t.priority+1)}_prepareNode(t){let o=this.key||"",{to:r,from:n}=t;r=ae.obj(r)?r[o]:r,(r==null||iD(r))&&(r=void 0),n=ae.obj(n)?n[o]:n,n==null&&(n=void 0);let i={to:r,from:n};return rD(this)||(t.reverse&&([r,n]=[n,r]),n=xr(n),ae.und(n)?zs(this)||this._set(r):this._set(n)),i}_update(t,o){let r=Jr({},t),{key:n,defaultProps:i}=this;r.default&&Object.assign(i,jH(r,(c,u)=>/^on/.test(u)?FH(c,n):c)),MH(this,r,"onProps"),Oy(this,"onProps",r,this);let s=this._prepareNode(r);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?");let a=this._state;return HH(++this._lastCallId,{key:n,props:r,defaultProps:i,state:a,actions:{pause:()=>{Py(this)||(LH(this,!0),Wh(a.pauseQueue),Oy(this,"onPause",js(this,Ry(this,this.animation.to)),this))},resume:()=>{Py(this)&&(LH(this,!1),qu(this)&&this._resume(),Wh(a.resumeQueue),Oy(this,"onResume",js(this,Ry(this,this.animation.to)),this))},start:this._merge.bind(this,s)}}).then(c=>{if(r.loop&&c.finished&&!(o&&c.noop)){let u=KH(r);if(u)return this._update(u,!0)}return c})}_merge(t,o,r){if(o.cancel)return this.stop(!0),r(Yh(this));let n=!ae.und(t.to),i=!ae.und(t.from);if(n||i)if(o.callId>this._lastToId)this._lastToId=o.callId;else return r(Yh(this));let{key:s,defaultProps:a,animation:c}=this,{to:u,from:d}=c,{to:f=u,from:m=d}=t;i&&!n&&(!o.default||ae.und(f))&&(f=m),o.reverse&&([f,m]=[m,f]);let h=!Oa(m,d);h&&(c.from=m),m=xr(m);let p=!Oa(f,u);p&&this._focus(f);let g=iD(o.to),{config:b}=c,{decay:k,velocity:v}=b;(n||i)&&(b.velocity=0),o.config&&!g&&Q0e(b,Bm(o.config,s),o.config!==a.config?Bm(a.config,s):void 0);let y=zs(this);if(!y||ae.und(f))return r(js(this,!0));let _=ae.und(o.reset)?i&&!o.default:!ae.und(m)&&Ay(o.reset,s),S=_?m:this.get(),C=Ly(f),B=ae.num(C)||ae.arr(C)||Kh(C),T=!g&&(!B||Ay(a.immediate||o.immediate,s));if(p){let P=b1(f);if(P!==y.constructor)if(T)y=this._set(C);else throw Error(`Cannot animate between ${y.constructor.name} and ${P.name}, as the "to" prop suggests`)}let I=y.constructor,E=Qr(f),L=!1;if(!E){let P=_||!rD(this)&&h;(p||P)&&(L=Oa(Ly(S),C),E=!L),(!Oa(c.immediate,T)&&!T||!Oa(b.decay,k)||!Oa(b.velocity,v))&&(E=!0)}if(L&&qu(this)&&(c.changed&&!_?E=!0:E||this._stop(u)),!g&&((E||Qr(u))&&(c.values=y.getPayload(),c.toValues=Qr(f)?null:I==wm?[1]:wn(C)),c.immediate!=T&&(c.immediate=T,!T&&!_&&this._set(u)),E)){let{onRest:P}=c;Bt(exe,V=>MH(this,o,V));let O=js(this,Ry(this,u));Wh(this._pendingCalls,O),this._pendingCalls.add(r),c.changed&&_e.batchedUpdates(()=>{c.changed=!_,P?.(O,this),_?Bm(a.onRest,O):c.onStart==null||c.onStart(O,this)})}_&&this._set(S),g?r(WH(o.to,o,this._state,this)):E?this._start():qu(this)&&!p?this._pendingCalls.add(r):r(GH(S))}_focus(t){let o=this.animation;t!==o.to&&(Q5(this)&&this._detach(),o.to=t,Q5(this)&&this._attach())}_attach(){let t=0,{to:o}=this.animation;Qr(o)&&(Ku(o,this),cD(o)&&(t=o.priority+1)),this.priority=t}_detach(){let{to:t}=this.animation;Qr(t)&&Yu(t,this)}_set(t,o=!0){let r=xr(t);if(!ae.und(r)){let n=zs(this);if(!n||!Oa(r,n.getValue())){let i=b1(r);!n||n.constructor!=i?g1(this,i.create(r)):n.setValue(r),n&&_e.batchedUpdates(()=>{this._onChange(r,o)})}}return zs(this)}_onStart(){let t=this.animation;t.changed||(t.changed=!0,Oy(this,"onStart",js(this,Ry(this,t.to)),this))}_onChange(t,o){o||(this._onStart(),Bm(this.animation.onChange,t,this)),Bm(this.defaultProps.onChange,t,this),super._onChange(t,o)}_start(){let t=this.animation;zs(this).reset(xr(t.to)),t.immediate||(t.fromValues=t.values.map(o=>o.lastPosition)),qu(this)||(AH(this,!0),Py(this)||this._resume())}_resume(){ti.skipAnimation?this.finish():$h.start(this)}_stop(t,o){if(qu(this)){AH(this,!1);let r=this.animation;Bt(r.values,i=>{i.done=!0}),r.toValues&&(r.onChange=r.onPause=r.onResume=void 0),Sm(this,{type:"idle",parent:this});let n=o?Yh(this.get()):js(this.get(),Ry(this,t??r.to));Wh(this._pendingCalls,n),r.changed&&(r.changed=!1,Oy(this,"onRest",n,this))}}};function Ry(e,t){let o=Ly(t),r=Ly(e.get());return Oa(r,o)}function KH(e,t=e.loop,o=e.to){let r=Bm(t);if(r){let n=r!==!0&&UH(r),i=(n||e).reverse,s=!n||n.reset;return mD(Jr({},e,{loop:t,default:!1,pause:void 0,to:!i||iD(o)?o:void 0,from:s?e.from:void 0,reset:s},n))}}function mD(e){let{to:t,from:o}=e=UH(e),r=new Set;return ae.obj(t)&&NH(t,r),ae.obj(o)&&NH(o,r),e.keys=r.size?Array.from(r):null,e}function NH(e,t){Gi(e,(o,r)=>o!=null&&t.add(r))}var exe=["onStart","onRest","onChange","onPause","onResume"];function MH(e,t,o){e.animation[o]=t[o]!==zH(t,o)?FH(t[o],e.key):void 0}function Oy(e,t,...o){var r,n,i,s;(r=(n=e.animation)[t])==null||r.call(n,...o),(i=(s=e.defaultProps)[t])==null||i.call(s,...o)}var txe=["onStart","onChange","onRest"],oxe=1,x1=class{constructor(t,o){this.id=oxe++,this.springs={},this.queue=[],this.ref=void 0,this._flush=void 0,this._initialProps=void 0,this._lastAsyncId=0,this._active=new Set,this._changed=new Set,this._started=!1,this._item=void 0,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),o&&(this._flush=o),t&&this.start(Jr({default:!0},t))}get idle(){return!this._state.asyncTo&&Object.values(this.springs).every(t=>t.idle&&!t.isDelayed&&!t.isPaused)}get item(){return this._item}set item(t){this._item=t}get(){let t={};return this.each((o,r)=>t[r]=o.get()),t}set(t){for(let o in t){let r=t[o];ae.und(r)||this.springs[o].set(r)}}update(t){return t&&this.queue.push(mD(t)),this}start(t){let{queue:o}=this;return t?o=wn(t).map(mD):this.queue=[],this._flush?this._flush(this,o):(qH(this,o),rxe(this,o))}stop(t,o){if(t!==!!t&&(o=t),o){let r=this.springs;Bt(wn(o),n=>r[n].stop(!!t))}else Ny(this._state,this._lastAsyncId),this.each(r=>r.stop(!!t));return this}pause(t){if(ae.und(t))this.start({pause:!0});else{let o=this.springs;Bt(wn(t),r=>o[r].pause())}return this}resume(t){if(ae.und(t))this.start({pause:!1});else{let o=this.springs;Bt(wn(t),r=>o[r].resume())}return this}each(t){Gi(this.springs,t)}_onFrame(){let{onStart:t,onChange:o,onRest:r}=this._events,n=this._active.size>0,i=this._changed.size>0;(n&&!this._started||i&&!this._started)&&(this._started=!0,Gh(t,([c,u])=>{u.value=this.get(),c(u,this,this._item)}));let s=!n&&this._started,a=i||s&&r.size?this.get():null;i&&o.size&&Gh(o,([c,u])=>{u.value=a,c(u,this,this._item)}),s&&(this._started=!1,Gh(r,([c,u])=>{u.value=a,c(u,this,this._item)}))}eventObserved(t){if(t.type=="change")this._changed.add(t.parent),t.idle||this._active.add(t.parent);else if(t.type=="idle")this._active.delete(t.parent);else return;_e.onFrame(this._onFrame)}};function rxe(e,t){return Promise.all(t.map(o=>YH(e,o))).then(o=>hD(e,o))}async function YH(e,t,o){let{keys:r,to:n,from:i,loop:s,onRest:a,onResolve:c}=t,u=ae.obj(t.default)&&t.default;s&&(t.loop=!1),n===!1&&(t.to=null),i===!1&&(t.from=null);let d=ae.arr(n)||ae.fun(n)?n:void 0;d?(t.to=void 0,t.onRest=void 0,u&&(u.onRest=void 0)):Bt(txe,g=>{let b=t[g];if(ae.fun(b)){let k=e._events[g];t[g]=({finished:v,cancelled:y})=>{let _=k.get(b);_?(v||(_.finished=!1),y&&(_.cancelled=!0)):k.set(b,{value:null,finished:v||!1,cancelled:y||!1})},u&&(u[g]=t[g])}});let f=e._state;t.pause===!f.paused?(f.paused=t.pause,Wh(t.pause?f.pauseQueue:f.resumeQueue)):f.paused&&(t.pause=!0);let m=(r||Object.keys(e.springs)).map(g=>e.springs[g].start(t)),h=t.cancel===!0||zH(t,"cancel")===!0;(d||h&&f.asyncId)&&m.push(HH(++e._lastAsyncId,{props:t,state:f,actions:{pause:c1,resume:c1,start(g,b){h?(Ny(f,e._lastAsyncId),b(Yh(e))):(g.onRest=a,b(WH(d,g,f,e)))}}})),f.paused&&await new Promise(g=>{f.resumeQueue.add(g)});let p=hD(e,await Promise.all(m));if(s&&p.finished&&!(o&&p.noop)){let g=KH(t,s,n);if(g)return qH(e,[g]),YH(e,g,!0)}return c&&_e.batchedUpdates(()=>c(p,e,e.item)),p}function nxe(e,t){let o=new fD;return o.key=e,t&&Ku(o,t),o}function ixe(e,t,o){t.keys&&Bt(t.keys,r=>{(e[r]||(e[r]=o(r)))._prepareNode(t)})}function qH(e,t){Bt(t,o=>{ixe(e.springs,o,r=>nxe(r,e))})}function sxe(e,t){if(e==null)return{};var o={},r=Object.keys(e),n,i;for(i=0;i<r.length;i++)n=r[i],!(t.indexOf(n)>=0)&&(o[n]=e[n]);return o}var axe=["children"],gD=e=>{let{children:t}=e,o=sxe(e,axe),r=(0,Vy.useContext)(w1),n=o.pause||!!r.pause,i=o.immediate||!!r.immediate;o=SH(()=>({pause:n,immediate:i}),[n,i]);let{Provider:s}=w1;return Dy.createElement(s,{value:o},t)},w1=lxe(gD,{});gD.Provider=w1.Provider;gD.Consumer=w1.Consumer;function lxe(e,t){return Object.assign(e,Dy.createContext(t)),e.Provider._context=e,e.Consumer._context=e,e}var DH;(function(e){e.MOUNT="mount",e.ENTER="enter",e.UPDATE="update",e.LEAVE="leave"})(DH||(DH={}));var pD=class extends My{constructor(t,o){super(),this.key=void 0,this.idle=!0,this.calc=void 0,this._active=new Set,this.source=t,this.calc=$u(...o);let r=this._get(),n=b1(r);g1(this,n.create(r))}advance(t){let o=this._get(),r=this.get();Oa(o,r)||(zs(this).setValue(o),this._onChange(o,this.idle)),!this.idle&&VH(this._active)&&nD(this)}_get(){let t=ae.arr(this.source)?this.source.map(xr):wn(xr(this.source));return this.calc(...t)}_start(){this.idle&&!VH(this._active)&&(this.idle=!1,Bt(Iy(this),t=>{t.done=!1}),ti.skipAnimation?(_e.batchedUpdates(()=>this.advance()),nD(this)):$h.start(this))}_attach(){let t=1;Bt(wn(this.source),o=>{Qr(o)&&Ku(o,this),cD(o)&&(o.idle||this._active.add(o),t=Math.max(t,o.priority+1))}),this.priority=t,this._start()}_detach(){Bt(wn(this.source),t=>{Qr(t)&&Yu(t,this)}),this._active.clear(),nD(this)}eventObserved(t){t.type=="change"?t.idle?this.advance():(this._active.add(t.parent),this._start()):t.type=="idle"?this._active.delete(t.parent):t.type=="priority"&&(this.priority=wn(this.source).reduce((o,r)=>Math.max(o,(cD(r)?r.priority:0)+1),0))}};function cxe(e){return e.idle!==!1}function VH(e){return!e.size||Array.from(e).every(cxe)}function nD(e){e.idle||(e.idle=!0,Bt(Iy(e),t=>{t.done=!0}),Sm(e,{type:"idle",parent:e}))}ti.assign({createStringInterpolator:f1,to:(e,t)=>new pD(e,t)});var M7e=$h.advance;var QH=l(bD());function _D(e,t){if(e==null)return{};var o={},r=Object.keys(e),n,i;for(i=0;i<r.length;i++)n=r[i],!(t.indexOf(n)>=0)&&(o[n]=e[n]);return o}var uxe=["style","children","scrollTop","scrollLeft"],JH=/^--/;function dxe(e,t){return t==null||typeof t=="boolean"||t===""?"":typeof t=="number"&&t!==0&&!JH.test(e)&&!(Fy.hasOwnProperty(e)&&Fy[e])?t+"px":(""+t).trim()}var XH={};function fxe(e,t){if(!e.nodeType||!e.setAttribute)return!1;let o=e.nodeName==="filter"||e.parentNode&&e.parentNode.nodeName==="filter",r=t,{style:n,children:i,scrollTop:s,scrollLeft:a}=r,c=_D(r,uxe),u=Object.values(c),d=Object.keys(c).map(f=>o||e.hasAttribute(f)?f:XH[f]||(XH[f]=f.replace(/([A-Z])/g,m=>"-"+m.toLowerCase())));i!==void 0&&(e.textContent=i);for(let f in n)if(n.hasOwnProperty(f)){let m=dxe(f,n[f]);JH.test(f)?e.style.setProperty(f,m):e.style[f]=m}d.forEach((f,m)=>{e.setAttribute(f,u[m])}),s!==void 0&&(e.scrollTop=s),a!==void 0&&(e.scrollLeft=a)}var Fy={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},mxe=(e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1),pxe=["Webkit","Ms","Moz","O"];Fy=Object.keys(Fy).reduce((e,t)=>(pxe.forEach(o=>e[mxe(o,t)]=e[t]),e),Fy);var hxe=["x","y","z"],gxe=/^(matrix|translate|scale|rotate|skew)/,bxe=/^(translate)/,vxe=/^(rotate|skew)/,vD=(e,t)=>ae.num(e)&&e!==0?e+t:e,C1=(e,t)=>ae.arr(e)?e.every(o=>C1(o,t)):ae.num(e)?e===t:parseFloat(e)===t,kD=class extends Cm{constructor(t){let{x:o,y:r,z:n}=t,i=_D(t,hxe),s=[],a=[];(o||r||n)&&(s.push([o||0,r||0,n||0]),a.push(c=>[`translate3d(${c.map(u=>vD(u,"px")).join(",")})`,C1(c,0)])),Gi(i,(c,u)=>{if(u==="transform")s.push([c||""]),a.push(d=>[d,d===""]);else if(gxe.test(u)){if(delete i[u],ae.und(c))return;let d=bxe.test(u)?"px":vxe.test(u)?"deg":"";s.push(wn(c)),a.push(u==="rotate3d"?([f,m,h,p])=>[`rotate3d(${f},${m},${h},${vD(p,d)})`,C1(p,0)]:f=>[`${u}(${f.map(m=>vD(m,d)).join(",")})`,C1(f,u.startsWith("scale")?1:0)])}}),s.length&&(i.transform=new yD(s,a)),super(i)}},yD=class extends Hh{constructor(t,o){super(),this._value=null,this.inputs=t,this.transforms=o}get(){return this._value||(this._value=this._get())}_get(){let t="",o=!0;return Bt(this.inputs,(r,n)=>{let i=xr(r[0]),[s,a]=this.transforms[n](ae.arr(i)?i:r.map(xr));t+=" "+s,o=o&&a}),o?"none":t}observerAdded(t){t==1&&Bt(this.inputs,o=>Bt(o,r=>Qr(r)&&Ku(r,this)))}observerRemoved(t){t==0&&Bt(this.inputs,o=>Bt(o,r=>Qr(r)&&Yu(r,this)))}eventObserved(t){t.type=="change"&&(this._value=null),Sm(this,t)}},kxe=["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"],yxe=["scrollTop","scrollLeft"];ti.assign({batchedUpdates:QH.unstable_batchedUpdates,createStringInterpolator:f1,colors:gH});var _xe=EH(kxe,{applyAnimatedValues:fxe,createAnimatedStyle:e=>new kD(e),getComponentProps:e=>_D(e,yxe)}),eG=_xe.animated;var qh=l(R(),1),oG=l(Fe(),1),rG=l(F(),1);var Sxe=200;function tG(e){return{top:e.offsetTop,left:e.offsetLeft}}function xxe({triggerAnimationOnChange:e,clientId:t}){let o=(0,qh.useRef)(),{isTyping:r,getGlobalBlockCount:n,isBlockSelected:i,isFirstMultiSelectedBlock:s,isBlockMultiSelected:a,isAncestorMultiSelected:c,isDraggingBlocks:u}=(0,rG.useSelect)(x),{previous:d,prevRect:f}=(0,qh.useMemo)(()=>({previous:o.current&&tG(o.current),prevRect:o.current&&o.current.getBoundingClientRect()}),[e]);return(0,qh.useLayoutEffect)(()=>{if(!d||!o.current)return;let m=(0,oG.getScrollContainer)(o.current),h=i(t),p=h||s(t),g=u();function b(){if(!g&&p&&f){let I=o.current.getBoundingClientRect().top-f.top;I&&(m.scrollTop+=I)}}if(window.matchMedia("(prefers-reduced-motion: reduce)").matches||r()||n()>Sxe){b();return}let v=h||a(t)||c(t);if(v&&g)return;let y=v?"1":"",_=new x1({x:0,y:0,config:{mass:5,tension:2e3,friction:200},onChange({value:T}){if(!o.current)return;let{x:I,y:E}=T;I=Math.round(I),E=Math.round(E);let L=I===0&&E===0;o.current.style.transformOrigin="center center",o.current.style.transform=L?null:`translate3d(${I}px,${E}px,0)`,o.current.style.zIndex=y,b()}});o.current.style.transform=void 0;let S=tG(o.current),C=Math.round(d.left-S.left),B=Math.round(d.top-S.top);return _.start({x:0,y:0,from:{x:C,y:B}}),()=>{_.stop(),_.set({x:0,y:0})}},[d,f,t,r,n,i,s,a,c,u]),o}var B1=xxe;var T1=l(R(),1),Wl=l(Fe(),1),iG=l(F(),1);var E1=".block-editor-block-list__block",wxe=".block-list-appender",Cxe=".block-editor-button-block-appender";function nG(e,t){return e.closest(E1)===t.closest(E1)}function Aa(e,t){return t.closest([E1,wxe,Cxe].join(","))===e}function Wi(e){for(;e&&e.nodeType!==e.ELEMENT_NODE;)e=e.parentNode;if(!e)return;let o=e.closest(E1);if(o)return o.id.slice(6)}function SD(e,t){let o=Math.min(e.left,t.left),r=Math.max(e.right,t.right),n=Math.max(e.bottom,t.bottom),i=Math.min(e.top,t.top);return new window.DOMRectReadOnly(o,i,r-o,n-i)}function Bxe(e){let t=e.ownerDocument.defaultView;if(!t||e.hasAttribute("data-visually-hidden"))return!1;let o=e.getBoundingClientRect();if(o.width===0||o.height===0)return!1;if(e.checkVisibility)return e.checkVisibility?.({opacityProperty:!0,contentVisibilityAuto:!0,visibilityProperty:!0});let r=t.getComputedStyle(e);return!(r.display==="none"||r.visibility==="hidden"||r.opacity==="0")}function Exe(e){let t=window.getComputedStyle(e);return t.overflowX==="auto"||t.overflowX==="scroll"||t.overflowY==="auto"||t.overflowY==="scroll"}var Txe=["core/navigation"];function Zh(e){let t=e.ownerDocument.defaultView;if(!t)return new window.DOMRectReadOnly;let o=e.getBoundingClientRect(),r=e.getAttribute("data-type");if(r&&Txe.includes(r)){let s=[e],a;for(;a=s.pop();)if(!Exe(a)){for(let c of a.children)if(Bxe(c)){let u=c.getBoundingClientRect();o=SD(o,u),s.push(c)}}}let n=Math.max(o.left,0),i=Math.min(o.right,t.innerWidth);return o=new window.DOMRectReadOnly(n,o.top,i-n,o.height),o}function sG({clientId:e,initialPosition:t}){let o=(0,T1.useRef)(),{isBlockSelected:r,isMultiSelecting:n,isZoomOut:i}=M((0,iG.useSelect)(x));return(0,T1.useEffect)(()=>{if(!r(e)||n()||i()||t==null||!o.current)return;let{ownerDocument:s}=o.current;if(Aa(o.current,s.activeElement))return;let a=Wl.focus.tabbable.find(o.current).filter(d=>(0,Wl.isTextField)(d)),c=t===-1,u=a[c?a.length-1:0]||o.current;if(!Aa(o.current,u)){o.current.focus();return}if(!o.current.getAttribute("contenteditable")){let d=Wl.focus.tabbable.findNext(o.current);if(d&&Aa(o.current,d)&&(0,Wl.isFormElement)(d)){d.focus();return}}(0,Wl.placeCaretAtHorizontalEdge)(u,c)},[t,e]),o}var aG=l(X(),1);function I1(e){e.defaultPrevented||(e.preventDefault(),e.currentTarget.classList.toggle("is-hovered",e.type==="mouseover"))}function lG({isEnabled:e=!0}={}){return(0,aG.useRefEffect)(t=>{if(e)return t.addEventListener("mouseout",I1),t.addEventListener("mouseover",I1),()=>{t.removeEventListener("mouseout",I1),t.removeEventListener("mouseover",I1),t.classList.remove("is-hovered")}},[e])}var P1=l(F(),1),cG=l(X(),1);function uG(e){let{isBlockSelected:t}=(0,P1.useSelect)(x),{selectBlock:o,selectionChange:r}=(0,P1.useDispatch)(x);return(0,cG.useRefEffect)(n=>{function i(s){if(!n.parentElement.closest('[contenteditable="true"]')){if(t(e)){s.target.isContentEditable||r(e);return}Aa(n,s.target)&&o(e)}}return n.addEventListener("focusin",i),()=>{n.removeEventListener("focusin",i)}},[t,o])}var Xh=l(K(),1),fG=l(Fe(),1),Zu=l(it(),1),R1=l(F(),1),mG=l(X(),1);function dG(e){return!e||e==="transparent"||e==="rgba(0, 0, 0, 0)"}function pG({clientId:e,isSelected:t}){let{getBlockRootClientId:o,isZoomOut:r,hasMultiSelection:n,isSectionBlock:i,editedContentOnlySection:s,getBlock:a}=M((0,R1.useSelect)(x)),{insertAfterBlock:c,removeBlock:u,resetZoomLevel:d,startDraggingBlocks:f,stopDraggingBlocks:m,editContentOnlySection:h}=M((0,R1.useDispatch)(x));return(0,mG.useRefEffect)(p=>{if(!t)return;function g(v){let{keyCode:y,target:_}=v;y!==Zu.ENTER&&y!==Zu.BACKSPACE&&y!==Zu.DELETE||_!==p||(0,fG.isTextField)(_)||(v.preventDefault(),y===Zu.ENTER&&r()?d():y===Zu.ENTER?c(e):u(e))}function b(v){if(p!==v.target||p.isContentEditable||p.ownerDocument.activeElement!==p||n()){v.preventDefault();return}let y=JSON.stringify({type:"block",srcClientIds:[e],srcRootClientId:o(e)});v.dataTransfer.effectAllowed="move",v.dataTransfer.clearData(),v.dataTransfer.setData("wp-blocks",y);let{ownerDocument:_}=p,{defaultView:S}=_;S.getSelection().removeAllRanges();let B=_.createElement("div");B.style.width="1px",B.style.height="1px",B.style.position="fixed",B.style.visibility="hidden",_.body.appendChild(B),v.dataTransfer.setDragImage(B,0,0);let T=p.getBoundingClientRect(),I=p.id,E=p.cloneNode();E.style.display="none",p.id=null,p.after(E);let L=1;{let ee=p;for(;ee=ee.parentElement;){let{scale:Y}=S.getComputedStyle(ee);if(Y&&Y!=="none"){L=parseFloat(Y);break}}}let P=1/L,O={};for(let ee of["transform","transformOrigin","transition","zIndex","position","top","left","pointerEvents","opacity","backgroundColor"])O[ee]=p.style[ee];let V=S.scrollY,j=S.scrollX,H=v.clientX,z=v.clientY;p.style.position="relative",p.style.top="0px",p.style.left="0px";let U=v.clientX-T.left,G=v.clientY-T.top,W=T.height>200?200/T.height:1;if(p.style.zIndex="1000",p.style.transformOrigin=`${U*P}px ${G*P}px`,p.style.transition="transform 0.2s ease-out",p.style.transform=`scale(${W})`,p.style.opacity="0.9",dG(S.getComputedStyle(p).backgroundColor)){let ee="transparent",Y=p;for(;Y=Y.parentElement;){let{backgroundColor:te}=S.getComputedStyle(Y);if(!dG(te)){ee=te;break}}p.style.backgroundColor=ee}let J=!1,le=H,oe=z;function re(ee){ee.clientX===le&&ee.clientY===oe||(le=ee.clientX,oe=ee.clientY,Q())}function Q(){J||(J=!0,p.style.pointerEvents="none");let ee=oe-z,Y=le-H,te=S.scrollY,ne=S.scrollX,q=te-V,se=ne-j,pe=ee+q,xe=Y+se;p.style.top=`${pe*P}px`,p.style.left=`${xe*P}px`}function $(){_.removeEventListener("dragover",re),_.removeEventListener("dragend",$),_.removeEventListener("drop",$),_.removeEventListener("scroll",Q);for(let[ee,Y]of Object.entries(O))p.style[ee]=Y;E.remove(),p.id=I,B.remove(),m(),document.body.classList.remove("is-dragging-components-draggable"),_.documentElement.classList.remove("is-dragging")}_.addEventListener("dragover",re),_.addEventListener("dragend",$),_.addEventListener("drop",$),_.addEventListener("scroll",Q),f([e]),document.body.classList.add("is-dragging-components-draggable"),_.documentElement.classList.add("is-dragging")}p.addEventListener("keydown",g),p.addEventListener("dragstart",b);function k(v){let y=i(e),_=a(e),S=(0,Xh.isReusableBlock)(_),C=(0,Xh.isTemplatePart)(_);!y||s===e||S||C||(v.preventDefault(),h(e))}return p.addEventListener("dblclick",k),()=>{p.removeEventListener("keydown",g),p.removeEventListener("dragstart",b),p.removeEventListener("dblclick",k)}},[e,t,o,a,Xh.isReusableBlock,Xh.isTemplatePart,c,u,r,d,n,f,m,i,s,h])}var hG=l(X(),1),gG=l(R(),1);function bG(){let e=(0,gG.useContext)(O1);return(0,hG.useRefEffect)(t=>{if(e)return e.observe(t),()=>{e.unobserve(t)}},[e])}var A1=l(X(),1);function vG({isSelected:e}){let t=(0,A1.useReducedMotion)();return(0,A1.useRefEffect)(o=>{if(e){let{ownerDocument:r}=o,{defaultView:n}=r;if(!n.IntersectionObserver)return;let i=new n.IntersectionObserver(s=>{s[0].isIntersecting||o.scrollIntoView({behavior:t?"instant":"smooth"}),i.disconnect()});return i.observe(o),()=>{i.disconnect()}}},[e])}var kG=l(X(),1),yG=l(F(),1);function L1({clientId:e="",isEnabled:t=!0}={}){let{getEnabledClientIdsTree:o}=M((0,yG.useSelect)(x));return(0,kG.useRefEffect)(r=>{if(!t)return;let n=()=>{o(e).forEach(({clientId:s})=>{let a=r.querySelector(`[data-block="${s}"]`);a&&(a.classList.remove("has-editable-outline"),a.offsetWidth,a.classList.add("has-editable-outline"))})},i=s=>{(s.target===r||s.target.classList.contains("is-root-container"))&&(s.defaultPrevented||(s.preventDefault(),n()))};return r.addEventListener("click",i),()=>r.removeEventListener("click",i)},[t])}var _G=l(X(),1),zy=new Map;function Ixe(e,t){let o=zy.get(e);o||(o=new Set,zy.set(e,o),e.addEventListener("pointerdown",xG)),o.add(t)}function Pxe(e,t){let o=zy.get(e);o&&(o.delete(t),SG(t),o.size===0&&(zy.delete(e),e.removeEventListener("pointerdown",xG)))}function SG(e){let t=e.getAttribute("data-draggable");t&&(e.removeAttribute("data-draggable"),t==="true"&&!e.getAttribute("draggable")&&e.setAttribute("draggable","true"))}function xG(e){let{target:t}=e,{ownerDocument:o,isContentEditable:r,tagName:n}=t,i=["INPUT","TEXTAREA"].includes(n),s=zy.get(o);if(r||i)for(let a of s)a.getAttribute("draggable")==="true"&&a.contains(t)&&(a.removeAttribute("draggable"),a.setAttribute("data-draggable","true"));else for(let a of s)SG(a)}function wG(){return(0,_G.useRefEffect)(e=>(Ixe(e.ownerDocument,e),()=>{Pxe(e.ownerDocument,e)}),[])}var xo=l(N(),1),Cn=l(R(),1),en=l(A(),1),Qh=l(F(),1),TG=l(Us(),1),IG=l(Xn(),1);var jy=l(N(),1);function Rxe(e,t){if(!e)return!1;let o=e.attributes?.metadata?.blockVisibility;if(o===!0||typeof o!="object")return!1;let r=o.viewport;return!r||typeof r!="object"||!wu.some(([,{key:n}])=>n===t)?!1:r[t]===!1}function BG(e,t){if(!e?.length)return!1;let o=e.filter(r=>Rxe(r,t)).length;return o===0?!1:o===e.length?!0:null}function EG(e){if(!e?.length)return!1;let t=e.filter(o=>o&&o.attributes?.metadata?.blockVisibility===!1).length;return t===0?!1:t===e.length?!0:null}function Uy(e){if(!e&&e!==!1)return null;if(e===!1)return(0,jy.__)("Block is hidden");if(e?.viewport){let t=wu.filter(([o])=>e.viewport?.[o]===!1).map(([,o])=>o.label);if(t.length>0)return(0,jy.sprintf)((0,jy.__)("Block is hidden on %s"),t.join(", "))}return null}var mo=l(w(),1),Oxe={[At.mobile.key]:!1,[At.tablet.key]:!1,[At.desktop.key]:!1},Axe=[];function xD({clientIds:e,onClose:t}){let{createSuccessNotice:o}=(0,Qh.useDispatch)(IG.store),{updateBlockAttributes:r}=(0,Qh.useDispatch)(x),n=(0,Qh.useSelect)(v=>v(x).getBlocksByClientId(e)??Axe,[e]),i=(0,Qh.useSelect)(v=>v(TG.store).getShortcutRepresentation("core/editor/toggle-list-view"),[]),s=(0,Cn.useMemo)(()=>{if(n?.length===0)return{hideEverywhere:!1,viewportChecked:{}};let v={};return wu.forEach(([,{key:y}])=>{v[y]=BG(n,y)}),{hideEverywhere:EG(n),viewportChecked:v}},[n]),[a,c]=(0,Cn.useState)(s?.viewportChecked??{}),[u,d]=(0,Cn.useState)(s?.hideEverywhere??!1),f=(0,Cn.useCallback)((v,y)=>{c({...a,[v]:y})},[a]),m=(0,Cn.useMemo)(()=>{if(!u)return(0,xo.sprintf)((0,xo.__)("Block visibility settings updated. You can access them via the List View (%s)."),i);let v=n?.length>1?(0,xo.__)("Blocks hidden. You can access them via the List View (%s)."):(0,xo.__)("Block hidden. You can access it via the List View (%s).");return(0,xo.sprintf)(v,i)},[u,n?.length,i]),h=(0,Cn.useMemo)(()=>Object.values(a).some(v=>v===!0||v===null),[a]),p=(0,Cn.useMemo)(()=>u!==s.hideEverywhere?!0:wu.some(([,{key:v}])=>a[v]!==s.viewportChecked[v]),[u,a,s]),g=(0,Cn.useMemo)(()=>u===null?!0:Object.values(a).some(v=>v===null),[u,a]),b=(0,Cn.useCallback)(v=>{v.preventDefault();let y=u?!1:{viewport:wu.reduce((S,[,{key:C}])=>(a[C]&&(S[C]=!1),S),{})},_=Object.fromEntries(n.map(({clientId:S,attributes:C})=>[S,{metadata:De({...C?.metadata,blockVisibility:y})}]));r(e,_,{uniqueByBlock:!0}),o(m,{id:u?"block-visibility-hidden":"block-visibility-viewports-updated",type:"snackbar"}),t()},[n,e,o,u,m,t,r,a]),k=n?.length>1;return(0,mo.jsx)(en.Modal,{title:e?.length>1?(0,xo.__)("Hide blocks"):(0,xo.__)("Hide block"),onRequestClose:t,overlayClassName:"block-editor-block-visibility-modal",size:"small",children:(0,mo.jsxs)("form",{onSubmit:b,children:[(0,mo.jsxs)("fieldset",{children:[(0,mo.jsx)("legend",{children:k?(0,xo.__)("Select the viewport sizes for which you want to hide the blocks. Changes will apply to all selected blocks."):(0,xo.__)("Select the viewport size for which you want to hide the block.")}),(0,mo.jsx)("ul",{className:"block-editor-block-visibility-modal__options",children:(0,mo.jsxs)("li",{className:"block-editor-block-visibility-modal__options-item block-editor-block-visibility-modal__options-item--everywhere",children:[(0,mo.jsx)(en.CheckboxControl,{className:"block-editor-block-visibility-modal__options-checkbox--everywhere",label:(0,xo.__)("Omit from published content"),checked:u===!0,indeterminate:u===null,onChange:v=>{d(v),c(Oxe)}}),u!==!0&&(0,mo.jsx)("ul",{className:"block-editor-block-visibility-modal__sub-options",children:wu.map(([,{label:v,icon:y,key:_}])=>(0,mo.jsxs)("li",{className:"block-editor-block-visibility-modal__options-item",children:[(0,mo.jsx)(en.CheckboxControl,{label:(0,xo.sprintf)((0,xo.__)("Hide on %s"),v),checked:a[_]??!1,indeterminate:a[_]===null,onChange:S=>f(_,S)}),(0,mo.jsx)(en.Icon,{icon:y,className:D({"block-editor-block-visibility-modal__options-icon--checked":a[_]})})]},_))})]})}),k&&g&&(0,mo.jsx)("p",{className:"block-editor-block-visibility-modal__description",children:(0,xo.__)("Selected blocks have different visibility settings. The checkboxes show an indeterminate state when settings differ.")}),!k&&u===!0&&(0,mo.jsx)("p",{className:"block-editor-block-visibility-modal__description",children:(0,xo.sprintf)((0,xo.__)("Block will be hidden in the editor, and omitted from the published markup on the frontend. You can configure it again by selecting it in the List View (%s)."),i)}),!k&&!u&&h&&(0,mo.jsx)("p",{className:"block-editor-block-visibility-modal__description",children:(0,Cn.createInterpolateElement)((0,xo.sprintf)((0,xo.__)("Block will be hidden according to the selected viewports. It will be <strong>included in the published markup on the frontend</strong>. You can configure it again by selecting it in the List View (%s)."),i),{strong:(0,mo.jsx)("strong",{})})})]}),(0,mo.jsxs)(en.Flex,{className:"block-editor-block-visibility-modal__actions",justify:"flex-end",expanded:!1,children:[(0,mo.jsx)(en.FlexItem,{children:(0,mo.jsx)(en.Button,{variant:"tertiary",onClick:t,__next40pxDefaultSize:!0,children:(0,xo.__)("Cancel")})}),(0,mo.jsx)(en.FlexItem,{children:(0,mo.jsx)(en.Button,{variant:"primary",type:"submit",disabled:!p,accessibleWhenDisabled:!0,__next40pxDefaultSize:!0,children:(0,xo.__)("Apply")})})]})]})})}var wD=l(X(),1);function $i(e={}){let{blockVisibility:t=void 0,deviceType:o=At.desktop.key,view:r=window}=e,n=(0,wD.useViewportMatch)("mobile",">=",r),i=(0,wD.useViewportMatch)("medium",">=",r),s;return o===At.mobile.key?s=At.mobile.key:o===At.tablet.key?s=At.tablet.key:n?n&&!i?s=At.tablet.key:s=At.desktop.key:s=At.mobile.key,{isBlockCurrentlyHidden:t===!1||t?.viewport?.[s]===!1,currentViewport:s}}var CD=l(N(),1),N1=l(A(),1),M1=l(R(),1);var PG=l(K(),1),D1=l(F(),1);var BD=l(w(),1);function ED({clientIds:e}){let t=(0,M1.useRef)(!1),{canToggleBlockVisibility:o,areBlocksHiddenAnywhere:r}=(0,D1.useSelect)(s=>{let{getBlocksByClientId:a,getBlockName:c,isBlockHiddenAnywhere:u}=M(s(x));return{canToggleBlockVisibility:a(e).every(({clientId:f})=>(0,PG.hasBlockSupport)(c(f),"visibility",!0)),areBlocksHiddenAnywhere:e?.every(f=>u(f))}},[e]),n=(0,D1.useDispatch)(x);if((0,M1.useEffect)(()=>{r&&(t.current=!0)},[r]),!r&&!t.current)return null;let{showViewportModal:i}=M(n);return(0,BD.jsx)(N1.ToolbarGroup,{className:"block-editor-block-visibility-toolbar",children:(0,BD.jsx)(N1.ToolbarButton,{disabled:!o,icon:r?Rs:am,label:r?(0,CD.__)("Hidden"):(0,CD.__)("Visible"),onClick:()=>i(e),"aria-haspopup":"dialog"})})}var TD=l(N(),1),RG=l(A(),1),V1=l(F(),1),OG=l(Us(),1);var AG=l(w(),1);function ID({clientIds:e}){let{areBlocksHiddenAnywhere:t,shortcut:o}=(0,V1.useSelect)(n=>{let{isBlockHiddenAnywhere:i}=M(n(x));return{areBlocksHiddenAnywhere:e?.every(s=>i(s)),shortcut:n(OG.store).getShortcutRepresentation("core/block-editor/toggle-block-visibility")}},[e]),{showViewportModal:r}=M((0,V1.useDispatch)(x));return(0,AG.jsx)(RG.MenuItem,{onClick:()=>r(e),shortcut:o,children:t?(0,TD.__)("Show"):(0,TD.__)("Hide")})}var Qu=l(A(),1),PD=l(F(),1),Xu=l(N(),1);var Jh=l(w(),1),{Badge:Lxe}=M(Qu.privateApis),Nxe={currentBlockVisibility:void 0,hasParentHiddenEverywhere:!1,selectedDeviceType:At.desktop.key};function LG({clientId:e}){let{currentBlockVisibility:t,selectedDeviceType:o,hasParentHiddenEverywhere:r}=(0,PD.useSelect)(f=>{if(!e)return Nxe;let{getBlockAttributes:m,isBlockParentHiddenEverywhere:h,getSettings:p}=M(f(x));return{currentBlockVisibility:m(e)?.metadata?.blockVisibility,selectedDeviceType:p()?.[Ai]?.toLowerCase()||At.desktop.key,hasParentHiddenEverywhere:h(e)}},[e]),i=st(e)?.ownerDocument?.defaultView,s=i===null?void 0:i,{isBlockCurrentlyHidden:a,currentViewport:c}=$i({blockVisibility:t,deviceType:o,view:s}),u=(0,PD.useSelect)(f=>!e||!c?!1:M(f(x)).isBlockParentHiddenAtViewport(e,c),[e,c]);if(!(a||r||u))return null;let d;if(a)if(t===!1)d=(0,Xu.__)("Block is hidden");else{let f=At[c]?.label||c;d=(0,Xu.sprintf)((0,Xu.__)("Block is hidden on %s"),f)}if(r)d=(0,Xu.__)("Parent block is hidden");else if(u){let f=At[c]?.label||c;d=(0,Xu.sprintf)((0,Xu.__)("Parent block is hidden on %s"),f)}return(0,Jh.jsx)(Lxe,{className:"block-editor-block-visibility-info",children:(0,Jh.jsxs)(Qu.__experimentalHStack,{spacing:2,justify:"start",children:[(0,Jh.jsx)(Qu.Icon,{icon:Rs}),(0,Jh.jsx)(Qu.__experimentalText,{children:d})]})})}function Hy(e={},{__unstableIsHtml:t}={}){let{clientId:o,className:r,wrapperProps:n={},isAligned:i,index:s,mode:a,name:c,blockApiVersion:u,blockTitle:d,isSelected:f,isSubtreeDisabled:m,hasOverlay:h,initialPosition:p,blockEditingMode:g,isHighlighted:b,isMultiSelected:k,isPartiallySelected:v,isReusable:y,isDragging:_,hasChildSelected:S,isEditingDisabled:C,hasEditableOutline:B,isEditingContentOnlySection:T,defaultClassName:I,isSectionBlock:E,isWithinSectionBlock:L,canMove:P,blockVisibility:O,deviceType:V}=(0,NG.useContext)(br),j=(0,eg.useRefEffect)($=>{if($){let{ownerDocument:ee}=$,{defaultView:Y}=ee;j.current=Y}},[]),H=(0,F1.sprintf)((0,F1.__)("Block: %s"),d),z=a==="html"&&!t?"-visual":"",U=wG(),G=!L,W=(0,eg.useMergeRefs)([e.ref,j,sG({clientId:o,initialPosition:p}),cU(o),uG(o),pG({clientId:o,isSelected:f}),lG({isEnabled:G}),bG(),B1({triggerAnimationOnChange:s,clientId:o}),(0,eg.useDisabled)({isDisabled:!h}),L1({clientId:o,isEnabled:E}),vG({isSelected:f}),P?U:void 0]),J=Ae(),oe=!!J[sh]?{"--wp-admin-theme-color":"var(--wp-block-synced-color)","--wp-admin-theme-color--rgb":"var(--wp-block-synced-color--rgb)"}:{},{isBlockCurrentlyHidden:re}=$i({blockVisibility:O,deviceType:V,view:j.current});u<2&&o===J.clientId&&(0,DG.default)(`Block type "${c}" must support API version 2 or higher to work correctly with "useBlockProps" method.`);let Q=!1;return(n?.style?.marginTop?.charAt(0)==="-"||n?.style?.marginBottom?.charAt(0)==="-"||n?.style?.marginLeft?.charAt(0)==="-"||n?.style?.marginRight?.charAt(0)==="-")&&(Q=!0),{tabIndex:g==="disabled"?-1:0,draggable:P&&!S?!0:void 0,...n,...e,ref:W,id:`block-${o}${z}`,role:"document","aria-label":H,"data-block":o,"data-type":c,"data-title":d,inert:m?"true":void 0,className:D("block-editor-block-list__block",{"wp-block":!i,"has-block-overlay":h,"is-selected":f,"is-highlighted":b,"is-multi-selected":k,"is-partially-selected":v,"is-reusable":y,"is-dragging":_,"has-child-selected":S,"is-editing-disabled":C,"has-editable-outline":B,"has-negative-margin":Q,"is-editing-content-only-section":T,"is-block-hidden":re},r,e.className,n.className,I),style:{...n.style,...e.style,...oe}}}Hy.save=MG.__unstableGetBlockProps;var wo=l(w(),1);function Mxe(e,t){let o={...e,...t};return e?.hasOwnProperty("className")&&t?.hasOwnProperty("className")&&(o.className=D(e.className,t.className)),e?.hasOwnProperty("style")&&t?.hasOwnProperty("style")&&(o.style={...e.style,...t.style}),o}function z1({children:e,isHtml:t,...o}){return(0,wo.jsx)("div",{...Hy(o,{__unstableIsHtml:t}),children:e})}function RD({block:{__unstableBlockSource:e},mode:t,isLocked:o,canRemove:r,clientId:n,isSelected:i,isSelectionEnabled:s,className:a,__unstableLayoutClassNames:c,name:u,isValid:d,attributes:f,wrapperProps:m,setAttributes:h,onReplace:p,onRemove:g,onInsertBlocksAfter:b,onMerge:k,toggleSelection:v}){let{mayDisplayControls:y,mayDisplayParentControls:_,isSelectionWithinCurrentSection:S,themeSupportsLayout:C,...B}=(0,Ju.useContext)(br),T=hm()||{},I=(0,wo.jsx)(bC,{name:u,isSelected:i,attributes:f,setAttributes:h,insertBlocksAfter:o?void 0:b,onReplace:r?p:void 0,onRemove:r?g:void 0,mergeBlocks:r?k:void 0,clientId:n,isSelectionEnabled:s,toggleSelection:v,__unstableLayoutClassNames:c,__unstableParentLayout:Object.keys(T).length?T:void 0,mayDisplayControls:y,mayDisplayParentControls:_,mayDisplayPatternEditingControls:S,blockEditingMode:B.blockEditingMode,isPreviewMode:B.isPreviewMode}),E=(0,Ke.getBlockType)(u);E?.getEditWrapperProps&&(m=Mxe(m,E.getEditWrapperProps(f)));let L=m&&!!m["data-align"]&&!C,P=a?.includes("is-position-sticky");L&&(I=(0,wo.jsx)("div",{className:D("wp-block",P&&a),"data-align":m["data-align"],children:I}));let O;if(d)t==="html"?O=(0,wo.jsxs)(wo.Fragment,{children:[(0,wo.jsx)("div",{style:{display:"none"},children:I}),(0,wo.jsx)(z1,{isHtml:!0,children:(0,wo.jsx)(JU,{clientId:n})})]}):E?.apiVersion>1?O=I:O=(0,wo.jsx)(z1,{children:I});else{let z=e?(0,Ke.serializeRawBlock)(e):(0,Ke.getSaveContent)(E,f);O=(0,wo.jsxs)(z1,{className:"has-warning",children:[(0,wo.jsx)(EU,{clientId:n}),(0,wo.jsx)(Ju.RawHTML,{children:(0,FG.safeHTML)(z)})]})}let{"data-align":V,...j}=m??{},H={...j,className:D(j.className,V&&C&&`align${V}`,!(V&&P)&&a)};return(0,wo.jsx)(br.Provider,{value:{wrapperProps:H,isAligned:L,isSelectionWithinCurrentSection:S,...B},children:(0,wo.jsx)(OU,{fallback:(0,wo.jsx)(z1,{className:"has-warning",children:(0,wo.jsx)(PU,{})}),children:O})})}var Dxe=(0,j1.withDispatch)((e,t,o)=>{let{updateBlockAttributes:r,insertBlocks:n,mergeBlocks:i,replaceBlocks:s,toggleSelection:a,__unstableMarkLastChangeAsPersistent:c,moveBlocksToPosition:u,removeBlock:d,selectBlock:f}=e(x);return{setAttributes(m){let{getMultiSelectedBlockClientIds:h}=o.select(x),p=h(),{clientId:g,attributes:b}=t,k=p.length?p:[g],v=typeof m=="function"?m(b):m;r(k,v)},onInsertBlocks(m,h){let{rootClientId:p}=t;n(m,h,p)},onInsertBlocksAfter(m){let{clientId:h,rootClientId:p}=t,{getBlockIndex:g}=o.select(x),b=g(h);n(m,b+1,p)},onMerge(m){let{clientId:h,rootClientId:p}=t,{getPreviousBlockClientId:g,getNextBlockClientId:b,getBlock:k,getBlockAttributes:v,getBlockName:y,getBlockOrder:_,getBlockIndex:S,getBlockRootClientId:C,canInsertBlockType:B}=o.select(x);function T(){let E=k(h),L=(0,Ke.getDefaultBlockName)(),P=(0,Ke.getBlockType)(L);if(y(h)!==L){let O=(0,Ke.switchToBlockType)(E,L);O&&O.length&&s(h,O)}else if((0,Ke.isUnmodifiedDefaultBlock)(E)){let O=b(h);O&&o.batch(()=>{d(h),f(O)})}else if(P.merge){let O=P.merge({},E.attributes);s([h],[(0,Ke.createBlock)(L,O)])}}function I(E,L=!0){let P=y(E),V=(0,Ke.getBlockType)(P).category==="text",j=C(E),H=_(E),[z]=H;H.length===1&&(0,Ke.isUnmodifiedBlock)(k(z))?d(E):V?o.batch(()=>{if(B(y(z),j))u([z],E,j,S(E));else{let U=(0,Ke.switchToBlockType)(k(z),(0,Ke.getDefaultBlockName)());U&&U.length&&U.every(G=>B(G.name,j))?(n(U,S(E),j,L),d(z,!1)):T()}!_(E).length&&(0,Ke.isUnmodifiedBlock)(k(E))&&d(E,!1)}):T()}if(m){if(p){let L=b(p);if(L)if(y(p)===y(L)){let P=v(p),O=v(L);if(Object.keys(P).every(V=>P[V]===O[V])){o.batch(()=>{u(_(L),L,p),d(L,!1)});return}}else{i(p,L);return}}let E=b(h);if(!E)return;_(E).length?I(E,!1):i(h,E)}else{let E=g(h);if(E)i(E,h);else if(p){let L=g(p);if(L&&y(p)===y(L)){let P=v(p),O=v(L);if(Object.keys(P).every(V=>P[V]===O[V])){o.batch(()=>{u(_(p),p,L),d(p,!1)});return}}I(p)}else T()}},onReplace(m,h,p){m.length&&!(0,Ke.isUnmodifiedDefaultBlock)(m[m.length-1])&&c();let g=m?.length===1&&Array.isArray(m[0])?m[0]:m;s([t.clientId],g,h,p)},onRemove(){d(t.clientId)},toggleSelection(m){a(m)}}});RD=(0,U1.compose)(Dxe,(0,VG.withFilters)("editor.BlockListBlock"))(RD);function Vxe(e){let{clientId:t,rootClientId:o}=e,r=(0,j1.useSelect)(q=>{let{isBlockSelected:se,getBlockMode:pe,isSelectionEnabled:xe,getTemplateLock:Te,isSectionBlock:Xe,getParentSectionBlock:dt,getBlockWithoutAttributes:ft,getBlockAttributes:we,canRemoveBlock:ot,canMoveBlock:Ce,getSettings:Wo,getEditedContentOnlySection:Qt,getBlockEditingMode:lo,getBlockName:Qe,isFirstMultiSelectedBlock:jt,getMultiSelectedBlockClientIds:rt,hasSelectedInnerBlock:He,getBlocksByName:$o,getBlockIndex:Yn,isBlockMultiSelected:ze,isBlockSubtreeDisabled:co,isBlockHighlighted:nt,__unstableIsFullySelected:je,__unstableSelectionHasUnmergeableBlock:wt,isBlockBeingDragged:So,isDragging:gr,__unstableHasActiveBlockOverlayActive:be,getSelectedBlocksInitialCaretPosition:Rt}=M(q(x)),Vo=ft(t);if(!Vo)return;let{hasBlockSupport:bt,getActiveBlockVariation:ge}=q(Ke.store),Ut=we(t),{name:Ct,isValid:Sa}=Vo,Kr=(0,Ke.getBlockType)(Ct),he=Wo(),{supportsLayout:nr,isPreviewMode:xa,__experimentalBlockBindingsSupportedAttributes:kn}=he,rh=kn?.[Ct],nh=Ut?.metadata?.blockVisibility,F0=he?.[Ai]?.toLowerCase()||"desktop",z0=Kr?.apiVersion>1,fk=ze(t),ce=lo(t),uo={isPreviewMode:xa,blockWithoutAttributes:Vo,name:Ct,attributes:Ut,isValid:Sa,themeSupportsLayout:nr,index:Yn(t),isReusable:(0,Ke.isReusableBlock)(Kr),className:z0?Ut.className:void 0,defaultClassName:z0?(0,Ke.getBlockDefaultClassName)(Ct):void 0,blockTitle:Kr?.title,bindableAttributes:rh,blockVisibility:nh,deviceType:F0,isMultiSelected:fk,blockEditingMode:ce,isEditingDisabled:ce==="disabled"};if(xa)return uo;let ye=se(t),Ht=ot(t),yn=Ce(t),Rr=ge(Ct,Ut),cu=!0,hA=He(t,cu),gA=Xe(t)?t:dt(t),bA=(0,Ke.hasBlockSupport)(Ct,"multiple",!0)?[]:$o(Ct),Uge=bA.length&&bA[0]!==t;return{...uo,mode:pe(t),isSelectionEnabled:xe(),isLocked:!!Te(o),isSectionBlock:Xe(t),isWithinSectionBlock:!!gA,isSelectionWithinCurrentSection:se(gA)||He(gA,cu),blockType:Kr,canRemove:Ht,canMove:yn,isSelected:ye,isEditingContentOnlySection:Qt()===t,blockEditingMode:ce,mayDisplayControls:ye||jt(t)&&rt().every(Hge=>Qe(Hge)===Ct),mayDisplayParentControls:bt(Qe(t),"__experimentalExposeControlsToChildren",!1)&&He(t),blockApiVersion:Kr?.apiVersion||1,blockTitle:Rr?.title||Kr?.title,isSubtreeDisabled:ce==="disabled"&&co(t),hasOverlay:be(t)&&!gr(),initialPosition:ye?Rt():void 0,isHighlighted:nt(t),isMultiSelected:fk,isPartiallySelected:fk&&!je()&&!wt(),isDragging:So(t),hasChildSelected:hA,isEditingDisabled:ce==="disabled",hasEditableOutline:ce!=="disabled"&&lo(o)==="disabled",originalBlockClientId:Uge?bA[0]:!1,blockVisibility:nh,deviceType:F0}},[t,o]),n=(0,U1.useRefEffect)(q=>{if(q){let{ownerDocument:se}=q,{defaultView:pe}=se;n.current=pe}},[]),{isBlockCurrentlyHidden:i}=$i({blockVisibility:r?.blockVisibility,deviceType:r?.deviceType,view:n.current}),s=(0,Ju.useMemo)(()=>({...r?.blockWithoutAttributes,attributes:r?.attributes}),[r?.blockWithoutAttributes,r?.attributes]);if(!r)return null;let{isPreviewMode:a,mode:c="visual",isSelectionEnabled:u=!1,isLocked:d=!1,canRemove:f=!1,canMove:m=!1,name:h,attributes:p,isValid:g,isSelected:b=!1,themeSupportsLayout:k,isEditingContentOnlySection:v,blockEditingMode:y,mayDisplayControls:_,mayDisplayParentControls:S,index:C,blockApiVersion:B,blockType:T,blockTitle:I,isSubtreeDisabled:E,hasOverlay:L,initialPosition:P,isHighlighted:O,isMultiSelected:V,isPartiallySelected:j,isReusable:H,isDragging:z,hasChildSelected:U,isSectionBlock:G,isWithinSectionBlock:W,isSelectionWithinCurrentSection:J,isEditingDisabled:le,hasEditableOutline:oe,className:re,defaultClassName:Q,originalBlockClientId:$,bindableAttributes:ee,blockVisibility:Y,deviceType:te}=r,ne={isPreviewMode:a,clientId:t,className:re,index:C,mode:c,name:h,blockApiVersion:B,blockType:T,blockTitle:I,isSelected:b,isSubtreeDisabled:E,hasOverlay:L,initialPosition:P,blockEditingMode:y,isHighlighted:O,isMultiSelected:V,isPartiallySelected:j,isReusable:H,isDragging:z,hasChildSelected:U,isSectionBlock:G,isWithinSectionBlock:W,isSelectionWithinCurrentSection:J,isEditingDisabled:le,hasEditableOutline:oe,isEditingContentOnlySection:v,defaultClassName:Q,mayDisplayControls:_,mayDisplayParentControls:S,originalBlockClientId:$,themeSupportsLayout:k,canMove:m,isBlockCurrentlyHidden:i,bindableAttributes:ee,blockVisibility:Y,deviceType:te};return i&&!b&&!V&&!U?null:(0,wo.jsx)(br.Provider,{value:ne,children:(0,wo.jsx)(RD,{...e,mode:c,isSelectionEnabled:u,isLocked:d,canRemove:f,canMove:m,block:s,name:h,attributes:p,isValid:g,isSelected:b})})}var zG=(0,Ju.memo)(Vxe);var L3=l(F(),1),kX=l(K(),1);var O3=l(N(),1),pX=l(UG(),1),LE=l(F(),1),NE=l(it(),1);var fX=l(sr(),1),nc=l(N(),1),PE=l(A(),1),mX=l(R(),1),RE=l(F(),1),OE=l(X(),1),AE=l(K(),1);var et=l(R(),1),BE=l(A(),1);var FW=l(R(),1);var Tm=l(Ge(),1);function HG({controlled:e,default:t,name:o,state:r="value"}){let{current:n}=Tm.useRef(e!==void 0),[i,s]=Tm.useState(t),a=n?e:i,c=Tm.useCallback(u=>{n||s(u)},[]);return[a,c]}var AD=l(Ge(),1);var WG=l(Ge(),1),GG={};function Im(e,t){let o=WG.useRef(GG);return o.current===GG&&(o.current=e(t)),o}var OD=AD[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],Fxe=OD&&OD!==AD.useLayoutEffect?OD:e=>e();function Ki(e){let t=Im(zxe).current;return t.next=e,Fxe(t.effect),t.trampoline}function zxe(){let e={next:void 0,callback:jxe,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function jxe(){}var $G=l(Ge(),1),Uxe=()=>{},wr=typeof document<"u"?$G.useLayoutEffect:Uxe;function Hxe(e,t){return function(r,...n){let i=new URL(e);return i.searchParams.set("code",r.toString()),n.forEach(s=>i.searchParams.append("args[]",s)),`${t} error #${r}; visit ${i} for the full message.`}}var Gxe=Hxe("https://base-ui.com/production-error","Base UI"),tg=Gxe;var Pm=l(Ge(),1);function Gy(e,t,o,r){let n=Im(YG).current;return Wxe(n,e,t,o,r)&&qG(n,[e,t,o,r]),n.callback}function KG(e){let t=Im(YG).current;return $xe(t,e)&&qG(t,e),t.callback}function YG(){return{callback:null,cleanup:null,refs:[]}}function Wxe(e,t,o,r,n){return e.refs[0]!==t||e.refs[1]!==o||e.refs[2]!==r||e.refs[3]!==n}function $xe(e,t){return e.refs.length!==t.length||e.refs.some((o,r)=>o!==t[r])}function qG(e,t){if(e.refs=t,t.every(o=>o==null)){e.callback=null;return}e.callback=o=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),o!=null){let r=Array(t.length).fill(null);for(let n=0;n<t.length;n+=1){let i=t[n];if(i!=null)switch(typeof i){case"function":{let s=i(o);typeof s=="function"&&(r[n]=s);break}case"object":{i.current=o;break}default:}}e.cleanup=()=>{for(let n=0;n<t.length;n+=1){let i=t[n];if(i!=null)switch(typeof i){case"function":{let s=r[n];typeof s=="function"?s():i(null);break}case"object":{i.current=null;break}default:}}}}}}var QG=l(Ge(),1);var ZG=l(Ge(),1),Kxe=parseInt(ZG.version,10);function XG(e){return Kxe>=e}function LD(e){if(!QG.isValidElement(e))return null;let t=e,o=t.props;return(XG(19)?o?.ref:t.ref)??null}function Wy(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}var NHe=Object.freeze([]),ed=Object.freeze({});function JG(e,t){let o={};for(let r in e){let n=e[r];if(t?.hasOwnProperty(r)){let i=t[r](n);i!=null&&Object.assign(o,i);continue}n===!0?o[`data-${r.toLowerCase()}`]="":n&&(o[`data-${r.toLowerCase()}`]=n.toString())}return o}function eW(e,t){return typeof e=="function"?e(t):e}function tW(e,t){return typeof e=="function"?e(t):e}var ND={};function Co(e,t,o,r,n){if(!o&&!r&&!n&&!e)return H1(t);let i=H1(e);return t&&(i=$y(i,t)),o&&(i=$y(i,o)),r&&(i=$y(i,r)),n&&(i=$y(i,n)),i}function oW(e){if(e.length===0)return ND;if(e.length===1)return H1(e[0]);let t=H1(e[0]);for(let o=1;o<e.length;o+=1)t=$y(t,e[o]);return t}function H1(e){return MD(e)?{...nW(e,ND)}:Yxe(e)}function $y(e,t){return MD(t)?nW(t,e):qxe(e,t)}function Yxe(e){let t={...e};for(let o in t){let r=t[o];rW(o,r)&&(t[o]=iW(r))}return t}function qxe(e,t){if(!t)return e;for(let o in t){let r=t[o];switch(o){case"style":{e[o]=Wy(e.style,r);break}case"className":{e[o]=DD(e.className,r);break}default:rW(o,r)?e[o]=Zxe(e[o],r):e[o]=r}}return e}function rW(e,t){let o=e.charCodeAt(0),r=e.charCodeAt(1),n=e.charCodeAt(2);return o===111&&r===110&&n>=65&&n<=90&&(typeof t=="function"||typeof t>"u")}function MD(e){return typeof e=="function"}function nW(e,t){return MD(e)?e(t):e??ND}function Zxe(e,t){return t?e?(...o)=>{let r=o[0];if(sW(r)){let i=r;Ky(i);let s=t(...o);return i.baseUIHandlerPrevented||e?.(...o),s}let n=t(...o);return e?.(...o),n}:iW(t):e}function iW(e){return e&&((...t)=>{let o=t[0];return sW(o)&&Ky(o),e(...t)})}function Ky(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function DD(e,t){return t?e?t+" "+e:t:e}function sW(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}var VD=l(Ge(),1);function td(e,t,o={}){let r=t.render,n=Xxe(t,o);if(o.enabled===!1)return null;let i=o.state??ed;return ewe(e,r,n,i)}function Xxe(e,t={}){let{className:o,style:r,render:n}=e,{state:i=ed,ref:s,props:a,stateAttributesMapping:c,enabled:u=!0}=t,d=u?eW(o,i):void 0,f=u?tW(r,i):void 0,m=u?JG(i,c):ed,h=u&&a?Qxe(a):void 0,p=u?Wy(m,h)??{}:ed;return typeof document<"u"&&(u?Array.isArray(s)?p.ref=KG([p.ref,LD(n),...s]):p.ref=Gy(p.ref,LD(n),s):Gy(null,null)),u?(d!==void 0&&(p.className=DD(p.className,d)),f!==void 0&&(p.style=Wy(p.style,f)),p):ed}function Qxe(e){return Array.isArray(e)?oW(e):Co(void 0,e)}var Jxe=Symbol.for("react.lazy");function ewe(e,t,o,r){if(t){if(typeof t=="function")return t(o,r);let n=Co(o,t.props);n.ref=o.ref;let i=t;return i?.$$typeof===Jxe&&(i=Pm.Children.toArray(t)[0]),Pm.cloneElement(i,n)}if(e&&typeof e=="string")return twe(e,o);throw new Error(tg(8))}function twe(e,t){return e==="button"?(0,VD.createElement)("button",{type:"button",...t,key:t.key}):e==="img"?(0,VD.createElement)("img",{alt:"",...t,key:t.key}):Pm.createElement(e,t)}var og={};wa(og,{cancelOpen:()=>Iwe,chipRemovePress:()=>dwe,clearPress:()=>uwe,closePress:()=>lwe,closeWatcher:()=>Swe,decrementPress:()=>pwe,disabled:()=>Rwe,drag:()=>Bwe,escapeKey:()=>_we,focusOut:()=>ywe,imperativeAction:()=>Owe,incrementPress:()=>mwe,inputBlur:()=>bwe,inputChange:()=>hwe,inputClear:()=>gwe,inputPaste:()=>vwe,inputPress:()=>kwe,itemPress:()=>awe,keyboard:()=>wwe,linkPress:()=>cwe,listNavigation:()=>xwe,none:()=>owe,outsidePress:()=>swe,pointer:()=>Cwe,scrub:()=>Twe,siblingOpen:()=>Pwe,swipe:()=>Awe,trackPress:()=>fwe,triggerFocus:()=>iwe,triggerHover:()=>nwe,triggerPress:()=>rwe,wheel:()=>Ewe,windowResize:()=>Lwe});var owe="none",rwe="trigger-press",nwe="trigger-hover",iwe="trigger-focus",swe="outside-press",awe="item-press",lwe="close-press",cwe="link-press",uwe="clear-press",dwe="chip-remove-press",fwe="track-press",mwe="increment-press",pwe="decrement-press",hwe="input-change",gwe="input-clear",bwe="input-blur",vwe="input-paste",kwe="input-press",ywe="focus-out",_we="escape-key",Swe="close-watcher",xwe="list-navigation",wwe="keyboard",Cwe="pointer",Bwe="drag",Ewe="wheel",Twe="scrub",Iwe="cancel-open",Pwe="sibling-open",Rwe="disabled",Owe="imperative-action",Awe="swipe",Lwe="window-resize";function G1(e,t,o,r){let n=!1,i=!1,s=r??ed;return{reason:e,event:t??new Event("base-ui"),cancel(){n=!0},allowPropagation(){i=!0},get isCanceled(){return n},get isPropagationAllowed(){return i},trigger:o,...s}}var W1=l(Ge(),1);var Nwe=l(Ge(),1),aW={...Nwe};var lW=0;function Mwe(e,t="mui"){let[o,r]=W1.useState(e),n=e||o;return W1.useEffect(()=>{o==null&&(lW+=1,r(`${t}-${lW}`))},[o,t]),n}var cW=aW.useId;function uW(e,t){if(cW!==void 0){let o=cW();return e??(t?`${t}-${o}`:o)}return Mwe(e,t)}function dW(e){return uW(e,"base-ui")}var oi=l(Ge(),1);var pW=l(bD(),1);var fW=l(Ge(),1),Dwe=[];function $1(e){fW.useEffect(e,Dwe)}var K1=null,cGe=globalThis.requestAnimationFrame,FD=class{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=t=>{this.isScheduled=!1;let o=this.callbacks,r=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,r>0)for(let n=0;n<o.length;n+=1)o[n]?.(t)};request(t){let o=this.nextId;return this.nextId+=1,this.callbacks.push(t),this.callbacksCount+=1,!this.isScheduled&&(requestAnimationFrame(this.tick),this.isScheduled=!0),o}cancel(t){let o=t-this.startId;o<0||o>=this.callbacks.length||(this.callbacks[o]=null,this.callbacksCount-=1)}},Y1=new FD,eo=class e{static create(){return new e}static request(t){return Y1.request(t)}static cancel(t){return Y1.cancel(t)}currentId=K1;request(t){this.cancel(),this.currentId=Y1.request(()=>{this.currentId=K1,t()})}cancel=()=>{this.currentId!==K1&&(Y1.cancel(this.currentId),this.currentId=K1)};disposeEffect=()=>this.cancel};function q1(){let e=Im(eo.create).current;return $1(e.disposeEffect),e}function mW(e){return e==null?e:"current"in e?e.current:e}var Rm=(function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e})({}),Vwe={[Rm.startingStyle]:""},Fwe={[Rm.endingStyle]:""},Z1={transitionStatus(e){return e==="starting"?Vwe:e==="ending"?Fwe:null}};function X1(e,t=!1,o=!0){let r=q1();return Ki((n,i=null)=>{r.cancel();let s=mW(e);if(s==null)return;let a=s,c=()=>{pW.flushSync(n)};if(typeof a.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED){n();return}function u(){Promise.all(a.getAnimations().map(d=>d.finished)).then(()=>{i?.aborted||c()}).catch(()=>{if(o){i?.aborted||c();return}let d=a.getAnimations();!i?.aborted&&d.length>0&&d.some(f=>f.pending||f.playState!=="finished")&&u()})}if(t){let d=Rm.startingStyle;if(!a.hasAttribute(d)){r.request(u);return}let f=new MutationObserver(()=>{a.hasAttribute(d)||(f.disconnect(),u())});f.observe(a,{attributes:!0,attributeFilter:[d]}),i?.addEventListener("abort",()=>f.disconnect(),{once:!0});return}r.request(u)})}var zD=l(Ge(),1);function hW(e,t=!1,o=!1){let[r,n]=zD.useState(e&&t?"idle":void 0),[i,s]=zD.useState(e);return e&&!i&&(s(!0),n("starting")),!e&&i&&r!=="ending"&&!o&&n("ending"),!e&&!i&&r==="ending"&&n(void 0),wr(()=>{if(!e&&i&&r!=="ending"&&o){let a=eo.request(()=>{n("ending")});return()=>{eo.cancel(a)}}},[e,i,r,o]),wr(()=>{if(!e||t)return;let a=eo.request(()=>{n(void 0)});return()=>{eo.cancel(a)}},[t,e]),wr(()=>{if(!e||!t)return;e&&i&&r!=="idle"&&n("starting");let a=eo.request(()=>{n("idle")});return()=>{eo.cancel(a)}},[t,e,i,r]),{mounted:i,setMounted:s,transitionStatus:r}}function gW(e){let{open:t,defaultOpen:o,onOpenChange:r,disabled:n}=e,i=t!==void 0,[s,a]=HG({controlled:t,default:o,name:"Collapsible",state:"open"}),{mounted:c,setMounted:u,transitionStatus:d}=hW(s,!0,!0),[f,m]=oi.useState(s),[{height:h,width:p},g]=oi.useState({height:void 0,width:void 0}),b=dW(),[k,v]=oi.useState(),y=k??b,[_,S]=oi.useState(!1),[C,B]=oi.useState(!1),T=oi.useRef(null),I=oi.useRef(null),E=oi.useRef(null),L=oi.useRef(null),P=X1(L,!1),O=Ki(V=>{let j=!s,H=G1(og.triggerPress,V.nativeEvent);if(r(j,H),H.isCanceled)return;let z=L.current;I.current==="css-animation"&&z!=null&&z.style.removeProperty("animation-name"),!_&&!C&&(I.current!=null&&I.current!=="css-animation"&&!c&&j&&u(!0),I.current==="css-animation"&&(!f&&j&&m(!0),!c&&j&&u(!0))),a(j),I.current==="none"&&c&&!j&&u(!1)});return wr(()=>{i&&I.current==="none"&&!s&&u(!1)},[i,s,t,u]),oi.useMemo(()=>({abortControllerRef:T,animationTypeRef:I,disabled:n,handleTrigger:O,height:h,mounted:c,open:s,panelId:y,panelRef:L,runOnceAnimationsFinish:P,setDimensions:g,setHiddenUntilFound:S,setKeepMounted:B,setMounted:u,setOpen:a,setPanelIdState:v,setVisible:m,transitionDimensionRef:E,transitionStatus:d,visible:f,width:p}),[T,I,n,O,h,c,s,y,L,P,g,S,B,u,a,m,E,d,f,p])}var Q1=l(Ge(),1),jD=Q1.createContext(void 0);function J1(){let e=Q1.useContext(jD);if(e===void 0)throw new Error(tg(15));return e}var Om=(function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=Rm.startingStyle]="startingStyle",e[e.endingStyle=Rm.endingStyle]="endingStyle",e})({});var bW=(function(e){return e.panelOpen="data-panel-open",e})({});var zwe={[Om.open]:""},jwe={[Om.closed]:""},vW={open(e){return e?{[bW.panelOpen]:""}:null}},kW={open(e){return e?zwe:jwe}};var rg=l(Ge(),1);function Uwe(){return typeof window<"u"}function Hwe(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function yW(e){return Uwe()?e instanceof HTMLElement||e instanceof Hwe(e).HTMLElement:!1}var eB=l(Ge(),1),Gwe=eB.createContext(void 0);function _W(e=!1){let t=eB.useContext(Gwe);if(t===void 0&&!e)throw new Error(tg(16));return t}var SW=l(Ge(),1);function xW(e){let{focusableWhenDisabled:t,disabled:o,composite:r=!1,tabIndex:n=0,isNativeButton:i}=e,s=r&&t!==!1,a=r&&t===!1;return{props:SW.useMemo(()=>{let u={onKeyDown(d){o&&t&&d.key!=="Tab"&&d.preventDefault()}};return r||(u.tabIndex=n,!i&&o&&(u.tabIndex=t?n:-1)),(i&&(t||s)||!i&&o)&&(u["aria-disabled"]=o),i&&(!t||a)&&(u.disabled=o),u},[r,o,t,s,a,i,n])}}function HD(e={}){let{disabled:t=!1,focusableWhenDisabled:o,tabIndex:r=0,native:n=!0,composite:i}=e,s=rg.useRef(null),a=_W(!0),c=i??a!==void 0,{props:u}=xW({focusableWhenDisabled:o,disabled:t,composite:c,tabIndex:r,isNativeButton:n}),d=rg.useCallback(()=>{let h=s.current;UD(h)&&c&&t&&u.disabled===void 0&&h.disabled&&(h.disabled=!1)},[t,u.disabled,c]);wr(d,[d]);let f=rg.useCallback((h={})=>{let{onClick:p,onMouseDown:g,onKeyUp:b,onKeyDown:k,onPointerDown:v,...y}=h;return Co({type:n?"button":void 0,onClick(S){if(t){S.preventDefault();return}p?.(S)},onMouseDown(S){t||g?.(S)},onKeyDown(S){if(t||(Ky(S),k?.(S),S.baseUIHandlerPrevented))return;let C=S.target===S.currentTarget,B=S.currentTarget,T=UD(B),I=!n&&Wwe(B),E=C&&(n?T:!I),L=S.key==="Enter",P=S.key===" ",O=B.getAttribute("role"),V=O?.startsWith("menuitem")||O==="option"||O==="gridcell";if(C&&c&&P){if(S.defaultPrevented&&V)return;S.preventDefault(),I||n&&T?(B.click(),S.preventBaseUIHandler()):E&&(p?.(S),S.preventBaseUIHandler());return}E&&(!n&&(P||L)&&S.preventDefault(),!n&&L&&p?.(S))},onKeyUp(S){if(!t){if(Ky(S),b?.(S),S.target===S.currentTarget&&n&&c&&UD(S.currentTarget)&&S.key===" "){S.preventDefault();return}S.baseUIHandlerPrevented||S.target===S.currentTarget&&!n&&!c&&S.key===" "&&p?.(S)}},onPointerDown(S){if(t){S.preventDefault();return}v?.(S)}},n?void 0:{role:"button"},u,y)},[t,u,c,n]),m=Ki(h=>{s.current=h,d()});return{getButtonProps:f,buttonRef:m}}function UD(e){return yW(e)&&e.tagName==="BUTTON"}function Wwe(e){return!!(e?.tagName==="A"&&e?.href)}var La=l(Ge(),1);function wW(e,t,o,r){return e.addEventListener(t,o,r),()=>{e.removeEventListener(t,o,r)}}var CW=(function(e){return e.disabled="data-disabled",e.orientation="data-orientation",e})({});function BW(e){let{abortControllerRef:t,animationTypeRef:o,externalRef:r,height:n,hiddenUntilFound:i,keepMounted:s,id:a,mounted:c,onOpenChange:u,open:d,panelRef:f,runOnceAnimationsFinish:m,setDimensions:h,setMounted:p,setOpen:g,setVisible:b,transitionDimensionRef:k,visible:v,width:y}=e,_=La.useRef(!1),S=La.useRef(null),C=La.useRef(d),B=La.useRef(d),T=q1(),I=La.useMemo(()=>o.current==="css-animation"?!v:!d&&!c,[d,c,v,o]),E=Ki(P=>{if(!P)return;if(o.current==null||k.current==null){let j=getComputedStyle(P),H=j.animationName!=="none"&&j.animationName!=="",z=j.transitionDuration!=="0s"&&j.transitionDuration!=="";H&&z||(j.animationName==="none"&&j.transitionDuration!=="0s"?o.current="css-transition":j.animationName!=="none"&&j.transitionDuration==="0s"?o.current="css-animation":o.current="none"),P.getAttribute(CW.orientation)==="horizontal"||j.transitionProperty.indexOf("width")>-1?k.current="width":k.current="height"}if(o.current!=="css-transition")return;(n===void 0||y===void 0)&&(h({height:P.scrollHeight,width:P.scrollWidth}),B.current&&P.style.setProperty("transition-duration","0s"));let O=-1,V=-1;return O=eo.request(()=>{B.current=!1,V=eo.request(()=>{setTimeout(()=>{P.style.removeProperty("transition-duration")})})}),()=>{eo.cancel(O),eo.cancel(V)}}),L=Gy(r,f,E);return wr(()=>{if(o.current!=="css-transition")return;let P=f.current;if(!P)return;let O=-1;if(t.current!=null&&(t.current.abort(),t.current=null),d){let V={"justify-content":P.style.justifyContent,"align-items":P.style.alignItems,"align-content":P.style.alignContent,"justify-items":P.style.justifyItems};Object.keys(V).forEach(j=>{P.style.setProperty(j,"initial","important")}),!B.current&&!s&&P.setAttribute(Om.startingStyle,""),h({height:P.scrollHeight,width:P.scrollWidth}),O=eo.request(()=>{Object.entries(V).forEach(([j,H])=>{H===""?P.style.removeProperty(j):P.style.setProperty(j,H)})})}else{if(P.scrollHeight===0&&P.scrollWidth===0)return;h({height:P.scrollHeight,width:P.scrollWidth});let V=new AbortController;t.current=V;let j=V.signal,H=null,z=Om.endingStyle;return H=new MutationObserver(U=>{U.some(W=>W.type==="attributes"&&W.attributeName===z)&&(H?.disconnect(),H=null,m(()=>{h({height:0,width:0}),P.style.removeProperty("content-visibility"),p(!1),t.current===V&&(t.current=null)},j))}),H.observe(P,{attributes:!0,attributeFilter:[z]}),()=>{H?.disconnect(),T.cancel(),t.current===V&&(V.abort(),t.current=null)}}return()=>{eo.cancel(O)}},[t,o,T,i,s,c,d,f,m,h,p]),wr(()=>{if(o.current!=="css-animation")return;let P=f.current;P&&(S.current=P.style.animationName||S.current,P.style.setProperty("animation-name","none"),h({height:P.scrollHeight,width:P.scrollWidth}),!C.current&&!_.current&&P.style.removeProperty("animation-name"),d?(t.current!=null&&(t.current.abort(),t.current=null),p(!0),b(!0)):(t.current=new AbortController,m(()=>{p(!1),b(!1),t.current=null},t.current.signal)))},[t,o,d,f,m,h,p,b,v]),$1(()=>{let P=eo.request(()=>{C.current=!1});return()=>eo.cancel(P)}),wr(()=>{if(!i)return;let P=f.current;if(!P)return;let O=-1,V=-1;return d&&_.current&&(P.style.transitionDuration="0s",h({height:P.scrollHeight,width:P.scrollWidth}),O=eo.request(()=>{_.current=!1,V=eo.request(()=>{setTimeout(()=>{P.style.removeProperty("transition-duration")})})})),()=>{eo.cancel(O),eo.cancel(V)}},[i,d,f,h]),wr(()=>{let P=f.current;P&&i&&I&&(P.setAttribute("hidden","until-found"),o.current==="css-transition"&&P.setAttribute(Om.startingStyle,""))},[i,I,o,f]),La.useEffect(function(){let O=f.current;if(!O)return;function V(j){_.current=!0,g(!0),u(!0,G1(og.none,j))}return wW(O,"beforematch",V)},[u,f,g]),La.useMemo(()=>({props:{hidden:I,id:a,ref:L}}),[I,a,L])}var EW=l(Ge(),1);function TW(e){let{enabled:t=!0,open:o,ref:r,onComplete:n}=e,i=Ki(n),s=X1(r,o,!1);EW.useEffect(()=>{if(!t)return;let a=new AbortController;return s(i,a.signal),()=>{a.abort()}},[t,o,i,s])}var od={};wa(od,{Panel:()=>OW,Root:()=>PW,Trigger:()=>RW});var Yy=l(Ge(),1);var tB={...kW,...Z1};var IW=l(w(),1),PW=Yy.forwardRef(function(t,o){let{render:r,className:n,defaultOpen:i=!1,disabled:s=!1,onOpenChange:a,open:c,style:u,...d}=t,f=Ki(a),m=gW({open:c,defaultOpen:i,onOpenChange:f,disabled:s}),h=Yy.useMemo(()=>({open:m.open,disabled:m.disabled,transitionStatus:m.transitionStatus}),[m.open,m.disabled,m.transitionStatus]),p=Yy.useMemo(()=>({...m,onOpenChange:f,state:h}),[m,f,h]),g=td("div",t,{state:h,ref:o,props:d,stateAttributesMapping:tB});return(0,IW.jsx)(jD.Provider,{value:p,children:g})});var oB=l(Ge(),1);var $we={...vW,...Z1},RW=oB.forwardRef(function(t,o){let{panelId:r,open:n,handleTrigger:i,state:s,disabled:a}=J1(),{className:c,disabled:u=a,id:d,render:f,nativeButton:m=!0,style:h,...p}=t,{getButtonProps:g,buttonRef:b}=HD({disabled:u,focusableWhenDisabled:!0,native:m}),k=oB.useMemo(()=>({"aria-controls":n?r:void 0,"aria-expanded":n,onClick:i}),[r,n,i]);return td("button",t,{state:s,ref:[o,b],props:[k,p,g],stateAttributesMapping:$we})});var rB=l(Ge(),1);var GD=(function(e){return e.collapsiblePanelHeight="--collapsible-panel-height",e.collapsiblePanelWidth="--collapsible-panel-width",e})({});var OW=rB.forwardRef(function(t,o){let{className:r,hiddenUntilFound:n,keepMounted:i,render:s,id:a,style:c,...u}=t,{abortControllerRef:d,animationTypeRef:f,height:m,mounted:h,onOpenChange:p,open:g,panelId:b,panelRef:k,runOnceAnimationsFinish:v,setDimensions:y,setHiddenUntilFound:_,setKeepMounted:S,setMounted:C,setPanelIdState:B,setOpen:T,setVisible:I,state:E,transitionDimensionRef:L,visible:P,width:O,transitionStatus:V}=J1(),j=n??!1,H=i??!1;wr(()=>{if(a)return B(a),()=>{B(void 0)}},[a,B]),wr(()=>{_(j)},[_,j]),wr(()=>{S(H)},[S,H]);let{props:z}=BW({abortControllerRef:d,animationTypeRef:f,externalRef:o,height:m,hiddenUntilFound:j,id:b,keepMounted:H,mounted:h,onOpenChange:p,open:g,panelRef:k,runOnceAnimationsFinish:v,setDimensions:y,setMounted:C,setOpen:T,setVisible:I,transitionDimensionRef:L,visible:P,width:O});TW({open:g&&V==="idle",ref:k,onComplete(){g&&y({height:void 0,width:void 0})}});let U=rB.useMemo(()=>({...E,transitionStatus:V}),[E,V]),G=td("div",t,{state:U,ref:[o,k],props:[z,{style:{[GD.collapsiblePanelHeight]:m===void 0?"auto":`${m}px`,[GD.collapsiblePanelWidth]:O===void 0?"auto":`${O}px`}},u],stateAttributesMapping:tB});return H||j||h?G:null});function Lr(e){return td(e.defaultTagName??"div",e,e)}var NW=l(R(),1),WD="data-wp-hash";function $D(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&Ywe(document)),e.__wpStyleRuntime}function Kwe(e,t){if(!e.head)return!1;for(let o of e.head.querySelectorAll(`style[${WD}]`))if(o.getAttribute(WD)===t)return!0;return!1}function MW(e,t,o){if(!e.head)return;let r=$D(),n=r.injectedStyles.get(e);if(n||(n=new Set,r.injectedStyles.set(e,n)),n.has(t))return;if(Kwe(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute(WD,t),i.appendChild(e.createTextNode(o)),e.head.appendChild(i),n.add(t)}function Ywe(e){let t=$D();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[o,r]of t.styles)MW(e,o,r);return()=>{let o=t.documents.get(e);if(o!==void 0){if(o<=1){t.documents.delete(e);return}t.documents.set(e,o-1)}}}function DW(e,t){let o=$D();o.styles.set(e,t);for(let r of o.documents.keys())MW(r,e,t)}typeof process>"u",DW("0c8601dd83",'@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._83ed8a8da5dd50ea__text{margin:0}._14437cfb77831647__heading-2xl{--_gcd-heading-font-size:var(--wpds-typography-font-size-2xl,32px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-medium,499);--_gcd-p-font-size:var(--wpds-typography-font-size-2xl,32px);--_gcd-p-line-height:var(--wpds-typography-line-height-2xl,40px);font-size:var(--wpds-typography-font-size-2xl,32px);line-height:var(--wpds-typography-line-height-2xl,40px)}._14437cfb77831647__heading-2xl,._3c78b7fa9b4072dd__heading-xl{font-family:var(--wpds-typography-font-family-heading,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-typography-font-weight-medium,499)}._3c78b7fa9b4072dd__heading-xl{--_gcd-heading-font-size:var(--wpds-typography-font-size-xl,20px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-medium,499);--_gcd-p-font-size:var(--wpds-typography-font-size-xl,20px);--_gcd-p-line-height:var(--wpds-typography-line-height-md,24px);font-size:var(--wpds-typography-font-size-xl,20px);line-height:var(--wpds-typography-line-height-md,24px)}.aa58f227716bcde2__heading-lg{--_gcd-heading-font-size:var(--wpds-typography-font-size-lg,15px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-medium,499);--_gcd-p-font-size:var(--wpds-typography-font-size-lg,15px);--_gcd-p-line-height:var(--wpds-typography-line-height-sm,20px);font-size:var(--wpds-typography-font-size-lg,15px)}.aa58f227716bcde2__heading-lg,.fc4da56d8dfe52c4__heading-md{font-family:var(--wpds-typography-font-family-heading,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-typography-font-weight-medium,499);line-height:var(--wpds-typography-line-height-sm,20px)}.fc4da56d8dfe52c4__heading-md{--_gcd-heading-font-size:var(--wpds-typography-font-size-md,13px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-medium,499);--_gcd-p-font-size:var(--wpds-typography-font-size-md,13px);--_gcd-p-line-height:var(--wpds-typography-line-height-sm,20px);font-size:var(--wpds-typography-font-size-md,13px)}.a9b78c7c82e8dff7__heading-sm{--_gcd-heading-font-size:var(--wpds-typography-font-size-xs,11px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-medium,499);--_gcd-p-font-size:var(--wpds-typography-font-size-xs,11px);--_gcd-p-line-height:var(--wpds-typography-line-height-xs,16px);font-family:var(--wpds-typography-font-family-heading,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-xs,11px);font-weight:var(--wpds-typography-font-weight-medium,499);line-height:var(--wpds-typography-line-height-xs,16px);text-transform:uppercase}._305ff559e52180d5__body-xl{--_gcd-heading-font-size:var(--wpds-typography-font-size-xl,20px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-regular,400);--_gcd-p-font-size:var(--wpds-typography-font-size-xl,20px);--_gcd-p-line-height:var(--wpds-typography-line-height-xl,32px);font-size:var(--wpds-typography-font-size-xl,20px);line-height:var(--wpds-typography-line-height-xl,32px)}._305ff559e52180d5__body-xl,.ca1aa3fc2029e958__body-lg{font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-typography-font-weight-regular,400)}.ca1aa3fc2029e958__body-lg{--_gcd-heading-font-size:var(--wpds-typography-font-size-lg,15px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-regular,400);--_gcd-p-font-size:var(--wpds-typography-font-size-lg,15px);--_gcd-p-line-height:var(--wpds-typography-line-height-md,24px);font-size:var(--wpds-typography-font-size-lg,15px);line-height:var(--wpds-typography-line-height-md,24px)}._131101940be12424__body-md{--_gcd-heading-font-size:var(--wpds-typography-font-size-md,13px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-regular,400);--_gcd-p-font-size:var(--wpds-typography-font-size-md,13px);--_gcd-p-line-height:var(--wpds-typography-line-height-sm,20px);font-size:var(--wpds-typography-font-size-md,13px);line-height:var(--wpds-typography-line-height-sm,20px)}._0e8d87a42c1f75fa__body-sm,._131101940be12424__body-md{font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-typography-font-weight-regular,400)}._0e8d87a42c1f75fa__body-sm{--_gcd-heading-font-size:var(--wpds-typography-font-size-sm,12px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-regular,400);--_gcd-p-font-size:var(--wpds-typography-font-size-sm,12px);--_gcd-p-line-height:var(--wpds-typography-line-height-xs,16px);font-size:var(--wpds-typography-font-size-sm,12px);line-height:var(--wpds-typography-line-height-xs,16px)}}');var AW={text:"_83ed8a8da5dd50ea__text","heading-2xl":"_14437cfb77831647__heading-2xl","heading-xl":"_3c78b7fa9b4072dd__heading-xl","heading-lg":"aa58f227716bcde2__heading-lg","heading-md":"fc4da56d8dfe52c4__heading-md","heading-sm":"a9b78c7c82e8dff7__heading-sm","body-xl":"_305ff559e52180d5__body-xl","body-lg":"ca1aa3fc2029e958__body-lg","body-md":"_131101940be12424__body-md","body-sm":"_0e8d87a42c1f75fa__body-sm"};typeof process>"u",DW("1fb29d3a3c","._6defc79820e382c6__button{box-sizing:var(--_gcd-button-box-sizing,border-box);font-family:var(--_gcd-button-font-family,inherit);font-size:var(--_gcd-button-font-size,inherit);font-weight:var(--_gcd-button-font-weight,inherit)}.d2cff2e5dea83bd1__input{box-sizing:var(--_gcd-input-box-sizing,border-box);font-family:var(--_gcd-input-font-family,inherit);font-size:var(--_gcd-input-font-size,inherit);font-weight:var(--_gcd-input-font-weight,inherit);margin:var(--_gcd-input-margin,0);&:is(textarea,[type=text],[type=password],[type=color],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){background-color:var(--_gcd-input-background-color,#0000);border:var(--_gcd-input-border,none);border-radius:var(--_gcd-input-border-radius,0);box-shadow:var(--_gcd-input-box-shadow,0 0 0 #0000);color:var(--_gcd-input-color,var(--wpds-color-fg-interactive-neutral,#1e1e1e));&:focus{border-color:var(--_gcd-input-border-color-focus,var(--wp-admin-theme-color));box-shadow:var(--_gcd-input-box-shadow-focus,none);outline:var(--_gcd-input-outline-focus,none)}&:disabled{background:var(--_gcd-input-background-disabled,#0000);border-color:var(--_gcd-input-border-color-disabled,#0000);box-shadow:var(--_gcd-input-box-shadow-disabled,none);color:var(--_gcd-input-color-disabled,var(--wpds-color-fg-interactive-neutral-disabled,#8d8d8d))}&::placeholder{color:var(--_gcd-input-placeholder-color,var(--wpds-color-fg-interactive-neutral-disabled,#8d8d8d))}}&:is(textarea,[type=text],[type=password],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){line-height:var(--_gcd-input-line-height,inherit);min-height:var(--_gcd-input-min-height,auto);padding:var(--_gcd-input-padding,0)}}._547d86373d02e108__textarea{box-sizing:var(--_gcd-textarea-box-sizing,border-box);overflow:var(--_gcd-textarea-overflow,auto);resize:var(--_gcd-textarea-resize,block)}._8c15fd0ed9f28ba4__div{outline:var(--_gcd-div-outline,0 solid #0000)}p._43cec3e1eec1066d__p{font-size:var(--_gcd-p-font-size,13px);line-height:var(--_gcd-p-line-height,1.5);margin:var(--_gcd-p-margin,0)}:is(h1,h2,h3,h4,h5,h6).e97669c6d9a38497__heading{color:var(--_gcd-heading-color,var(--wpds-color-fg-content-neutral,#1e1e1e));font-size:var(--_gcd-heading-font-size,inherit);font-weight:var(--_gcd-heading-font-weight,var(--wpds-typography-font-weight-medium,499));margin:var(--_gcd-heading-margin,0)}._2c0831b0499dbd6e__a,._2c0831b0499dbd6e__a:is(:hover,:focus,:active){border-radius:var(--_gcd-a-border-radius,0);box-shadow:var(--_gcd-a-box-shadow,none);color:var(--_gcd-a-color,inherit);outline:var(--_gcd-a-outline,0 solid #0000);transition:var(--_gcd-a-transition,none)}");var LW={button:"_6defc79820e382c6__button",input:"d2cff2e5dea83bd1__input",textarea:"_547d86373d02e108__textarea",div:"_8c15fd0ed9f28ba4__div",p:"_43cec3e1eec1066d__p",heading:"e97669c6d9a38497__heading",a:"_2c0831b0499dbd6e__a"},qy=(0,NW.forwardRef)(function({variant:t="body-md",render:o,className:r,...n},i){return Lr({render:o,defaultTagName:"span",ref:i,props:Co(n,{className:D(AW.text,LW.heading,LW.p,AW[t],r)})})});var jW=l(w(),1),KD="data-wp-hash";function YD(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&Zwe(document)),e.__wpStyleRuntime}function qwe(e,t){if(!e.head)return!1;for(let o of e.head.querySelectorAll(`style[${KD}]`))if(o.getAttribute(KD)===t)return!0;return!1}function zW(e,t,o){if(!e.head)return;let r=YD(),n=r.injectedStyles.get(e);if(n||(n=new Set,r.injectedStyles.set(e,n)),n.has(t))return;if(qwe(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute(KD,t),i.appendChild(e.createTextNode(o)),e.head.appendChild(i),n.add(t)}function Zwe(e){let t=YD();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[o,r]of t.styles)zW(e,o,r);return()=>{let o=t.documents.get(e);if(o!==void 0){if(o<=1){t.documents.delete(e);return}t.documents.set(e,o-1)}}}function Xwe(e,t){let o=YD();o.styles.set(e,t);for(let r of o.documents.keys())zW(r,e,t)}typeof process>"u",Xwe("d6a685e1aa","@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._96e6251aad1a6136__badge{border-radius:var(--wpds-border-radius-lg,8px);padding-block:var(--wpds-dimension-padding-xs,4px);padding-inline:var(--wpds-dimension-padding-sm,8px)}._99f7158cb520f750__is-high-intent{background-color:var(--wpds-color-bg-surface-error,#f6e6e3);color:var(--wpds-color-fg-content-error,#470000)}.c20ebef2365bc8b7__is-medium-intent{background-color:var(--wpds-color-bg-surface-warning,#fde6be);color:var(--wpds-color-fg-content-warning,#2e1900)}._365e1626c6202e52__is-low-intent{background-color:var(--wpds-color-bg-surface-caution,#fee995);color:var(--wpds-color-fg-content-caution,#281d00)}._33f8198127ddf4ef__is-stable-intent{background-color:var(--wpds-color-bg-surface-success,#c6f7cd);color:var(--wpds-color-fg-content-success,#002900)}._04c1aca8fc449412__is-informational-intent{background-color:var(--wpds-color-bg-surface-info,#deebfa);color:var(--wpds-color-fg-content-info,#001b4f)}._90726e69d495ec19__is-draft-intent{background-color:var(--wpds-color-bg-surface-neutral-weak,#f4f4f4);color:var(--wpds-color-fg-content-neutral,#1e1e1e)}._898f4a544993bd39__is-none-intent{background-color:var(--wpds-color-bg-surface-neutral-strong,#fff);border:var(--wpds-border-width-xs,1px) solid var(--wpds-color-stroke-surface-neutral,#dbdbdb);color:var(--wpds-color-fg-content-neutral,#1e1e1e);padding-block:calc(var(--wpds-dimension-padding-xs, 4px) - var(--wpds-border-width-xs, 1px));padding-inline:calc(var(--wpds-dimension-padding-sm, 8px) - var(--wpds-border-width-xs, 1px))}}");var VW={badge:"_96e6251aad1a6136__badge","is-high-intent":"_99f7158cb520f750__is-high-intent","is-medium-intent":"c20ebef2365bc8b7__is-medium-intent","is-low-intent":"_365e1626c6202e52__is-low-intent","is-stable-intent":"_33f8198127ddf4ef__is-stable-intent","is-informational-intent":"_04c1aca8fc449412__is-informational-intent","is-draft-intent":"_90726e69d495ec19__is-draft-intent","is-none-intent":"_898f4a544993bd39__is-none-intent"},qD=(0,FW.forwardRef)(function({intent:t="none",className:o,...r},n){return(0,jW.jsx)(qy,{ref:n,className:D(VW.badge,VW[`is-${t}-intent`],o),...r,variant:"body-sm"})});var UW=l(R(),1),HW=l(Z(),1),GW=l(w(),1),ZD=(0,UW.forwardRef)(function({icon:t,size:o=24,...r},n){return(0,GW.jsx)(HW.SVG,{ref:n,fill:"currentColor",...t.props,...r,width:o,height:o})});var Na={};wa(Na,{Content:()=>sB,FullBleed:()=>e$,Header:()=>iB,Root:()=>nB,Title:()=>o$});var WW=l(R(),1),XD="data-wp-hash";function QD(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&Jwe(document)),e.__wpStyleRuntime}function Qwe(e,t){if(!e.head)return!1;for(let o of e.head.querySelectorAll(`style[${XD}]`))if(o.getAttribute(XD)===t)return!0;return!1}function $W(e,t,o){if(!e.head)return;let r=QD(),n=r.injectedStyles.get(e);if(n||(n=new Set,r.injectedStyles.set(e,n)),n.has(t))return;if(Qwe(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute(XD,t),i.appendChild(e.createTextNode(o)),e.head.appendChild(i),n.add(t)}function Jwe(e){let t=QD();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[o,r]of t.styles)$W(e,o,r);return()=>{let o=t.documents.get(e);if(o!==void 0){if(o<=1){t.documents.delete(e);return}t.documents.set(e,o-1)}}}function KW(e,t){let o=QD();o.styles.set(e,t);for(let r of o.documents.keys())$W(r,e,t)}typeof process>"u",KW("e3ae230cea","@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-utilities{._336cd3e4e743482f__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}");var eCe={"box-sizing":"_336cd3e4e743482f__box-sizing"};typeof process>"u",KW("14f5e9ddeb","@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._02872bf298eadc43__root{--wp-ui-card-padding:var(--wpds-dimension-padding-2xl,24px);--wp-ui-card-header-content-gap:var(--wpds-dimension-gap-xl,24px);--wp-ui-card-header-content-margin:calc(var(--wp-ui-card-header-content-gap) - var(--wp-ui-card-padding));background-color:var(--wpds-color-bg-surface-neutral-strong,#fff);border:1px solid var(--wpds-color-stroke-surface-neutral-weak,#e4e4e4);border-radius:var(--wpds-border-radius-lg,8px);color:var(--wpds-color-fg-content-neutral,#1e1e1e);display:flex;flex-direction:column;overflow:clip}._5dffdaf2a6e669ac__content,.bbccc92e6ba5662d__header{padding:var(--wp-ui-card-padding);&:not(:first-child):not(:last-child){padding-block-end:0}}.bbccc92e6ba5662d__header+._5dffdaf2a6e669ac__content{margin-block-start:var(--wp-ui-card-header-content-margin);padding-block-start:0}.c1fa192587e1b4a6__fullbleed{margin-inline:calc(var(--wp-ui-card-padding)*-1);width:calc(100% + var(--wp-ui-card-padding)*2)}}");var tCe={root:"_02872bf298eadc43__root",header:"bbccc92e6ba5662d__header",content:"_5dffdaf2a6e669ac__content",fullbleed:"c1fa192587e1b4a6__fullbleed"},nB=(0,WW.forwardRef)(function({render:t,...o},r){let n=D(tCe.root,eCe["box-sizing"]);return Lr({defaultTagName:"div",render:t,ref:r,props:Co({className:n},o)})});var YW=l(R(),1),JD="data-wp-hash";function eV(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&rCe(document)),e.__wpStyleRuntime}function oCe(e,t){if(!e.head)return!1;for(let o of e.head.querySelectorAll(`style[${JD}]`))if(o.getAttribute(JD)===t)return!0;return!1}function qW(e,t,o){if(!e.head)return;let r=eV(),n=r.injectedStyles.get(e);if(n||(n=new Set,r.injectedStyles.set(e,n)),n.has(t))return;if(oCe(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute(JD,t),i.appendChild(e.createTextNode(o)),e.head.appendChild(i),n.add(t)}function rCe(e){let t=eV();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[o,r]of t.styles)qW(e,o,r);return()=>{let o=t.documents.get(e);if(o!==void 0){if(o<=1){t.documents.delete(e);return}t.documents.set(e,o-1)}}}function nCe(e,t){let o=eV();o.styles.set(e,t);for(let r of o.documents.keys())qW(r,e,t)}typeof process>"u",nCe("14f5e9ddeb","@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._02872bf298eadc43__root{--wp-ui-card-padding:var(--wpds-dimension-padding-2xl,24px);--wp-ui-card-header-content-gap:var(--wpds-dimension-gap-xl,24px);--wp-ui-card-header-content-margin:calc(var(--wp-ui-card-header-content-gap) - var(--wp-ui-card-padding));background-color:var(--wpds-color-bg-surface-neutral-strong,#fff);border:1px solid var(--wpds-color-stroke-surface-neutral-weak,#e4e4e4);border-radius:var(--wpds-border-radius-lg,8px);color:var(--wpds-color-fg-content-neutral,#1e1e1e);display:flex;flex-direction:column;overflow:clip}._5dffdaf2a6e669ac__content,.bbccc92e6ba5662d__header{padding:var(--wp-ui-card-padding);&:not(:first-child):not(:last-child){padding-block-end:0}}.bbccc92e6ba5662d__header+._5dffdaf2a6e669ac__content{margin-block-start:var(--wp-ui-card-header-content-margin);padding-block-start:0}.c1fa192587e1b4a6__fullbleed{margin-inline:calc(var(--wp-ui-card-padding)*-1);width:calc(100% + var(--wp-ui-card-padding)*2)}}");var iCe={root:"_02872bf298eadc43__root",header:"bbccc92e6ba5662d__header",content:"_5dffdaf2a6e669ac__content",fullbleed:"c1fa192587e1b4a6__fullbleed"},iB=(0,YW.forwardRef)(function({render:t,...o},r){return Lr({defaultTagName:"div",render:t,ref:r,props:Co({className:iCe.header},o)})});var ZW=l(R(),1),tV="data-wp-hash";function oV(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&aCe(document)),e.__wpStyleRuntime}function sCe(e,t){if(!e.head)return!1;for(let o of e.head.querySelectorAll(`style[${tV}]`))if(o.getAttribute(tV)===t)return!0;return!1}function XW(e,t,o){if(!e.head)return;let r=oV(),n=r.injectedStyles.get(e);if(n||(n=new Set,r.injectedStyles.set(e,n)),n.has(t))return;if(sCe(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute(tV,t),i.appendChild(e.createTextNode(o)),e.head.appendChild(i),n.add(t)}function aCe(e){let t=oV();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[o,r]of t.styles)XW(e,o,r);return()=>{let o=t.documents.get(e);if(o!==void 0){if(o<=1){t.documents.delete(e);return}t.documents.set(e,o-1)}}}function lCe(e,t){let o=oV();o.styles.set(e,t);for(let r of o.documents.keys())XW(r,e,t)}typeof process>"u",lCe("14f5e9ddeb","@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._02872bf298eadc43__root{--wp-ui-card-padding:var(--wpds-dimension-padding-2xl,24px);--wp-ui-card-header-content-gap:var(--wpds-dimension-gap-xl,24px);--wp-ui-card-header-content-margin:calc(var(--wp-ui-card-header-content-gap) - var(--wp-ui-card-padding));background-color:var(--wpds-color-bg-surface-neutral-strong,#fff);border:1px solid var(--wpds-color-stroke-surface-neutral-weak,#e4e4e4);border-radius:var(--wpds-border-radius-lg,8px);color:var(--wpds-color-fg-content-neutral,#1e1e1e);display:flex;flex-direction:column;overflow:clip}._5dffdaf2a6e669ac__content,.bbccc92e6ba5662d__header{padding:var(--wp-ui-card-padding);&:not(:first-child):not(:last-child){padding-block-end:0}}.bbccc92e6ba5662d__header+._5dffdaf2a6e669ac__content{margin-block-start:var(--wp-ui-card-header-content-margin);padding-block-start:0}.c1fa192587e1b4a6__fullbleed{margin-inline:calc(var(--wp-ui-card-padding)*-1);width:calc(100% + var(--wp-ui-card-padding)*2)}}");var cCe={root:"_02872bf298eadc43__root",header:"bbccc92e6ba5662d__header",content:"_5dffdaf2a6e669ac__content",fullbleed:"c1fa192587e1b4a6__fullbleed"},sB=(0,ZW.forwardRef)(function({render:t,...o},r){return Lr({defaultTagName:"div",render:t,ref:r,props:Co({className:cCe.content},o)})});var QW=l(R(),1),rV="data-wp-hash";function nV(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&dCe(document)),e.__wpStyleRuntime}function uCe(e,t){if(!e.head)return!1;for(let o of e.head.querySelectorAll(`style[${rV}]`))if(o.getAttribute(rV)===t)return!0;return!1}function JW(e,t,o){if(!e.head)return;let r=nV(),n=r.injectedStyles.get(e);if(n||(n=new Set,r.injectedStyles.set(e,n)),n.has(t))return;if(uCe(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute(rV,t),i.appendChild(e.createTextNode(o)),e.head.appendChild(i),n.add(t)}function dCe(e){let t=nV();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[o,r]of t.styles)JW(e,o,r);return()=>{let o=t.documents.get(e);if(o!==void 0){if(o<=1){t.documents.delete(e);return}t.documents.set(e,o-1)}}}function fCe(e,t){let o=nV();o.styles.set(e,t);for(let r of o.documents.keys())JW(r,e,t)}typeof process>"u",fCe("14f5e9ddeb","@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._02872bf298eadc43__root{--wp-ui-card-padding:var(--wpds-dimension-padding-2xl,24px);--wp-ui-card-header-content-gap:var(--wpds-dimension-gap-xl,24px);--wp-ui-card-header-content-margin:calc(var(--wp-ui-card-header-content-gap) - var(--wp-ui-card-padding));background-color:var(--wpds-color-bg-surface-neutral-strong,#fff);border:1px solid var(--wpds-color-stroke-surface-neutral-weak,#e4e4e4);border-radius:var(--wpds-border-radius-lg,8px);color:var(--wpds-color-fg-content-neutral,#1e1e1e);display:flex;flex-direction:column;overflow:clip}._5dffdaf2a6e669ac__content,.bbccc92e6ba5662d__header{padding:var(--wp-ui-card-padding);&:not(:first-child):not(:last-child){padding-block-end:0}}.bbccc92e6ba5662d__header+._5dffdaf2a6e669ac__content{margin-block-start:var(--wp-ui-card-header-content-margin);padding-block-start:0}.c1fa192587e1b4a6__fullbleed{margin-inline:calc(var(--wp-ui-card-padding)*-1);width:calc(100% + var(--wp-ui-card-padding)*2)}}");var mCe={root:"_02872bf298eadc43__root",header:"bbccc92e6ba5662d__header",content:"_5dffdaf2a6e669ac__content",fullbleed:"c1fa192587e1b4a6__fullbleed"},e$=(0,QW.forwardRef)(function({render:t,...o},r){return Lr({defaultTagName:"div",render:t,ref:r,props:Co({className:mCe.fullbleed},o)})});var t$=l(R(),1);var iV=l(w(),1),pCe=(0,iV.jsx)("div",{}),o$=(0,t$.forwardRef)(function({render:t=pCe,children:o,...r},n){return(0,iV.jsx)(qy,{ref:n,variant:"heading-lg",render:t,...r,children:o})});var r$=l(R(),1),n$=l(w(),1),sV=(0,r$.forwardRef)(function(t,o){return(0,n$.jsx)(od.Panel,{ref:o,...t})});var i$=l(R(),1),s$=l(w(),1),aV=(0,i$.forwardRef)(function(t,o){return(0,s$.jsx)(od.Root,{ref:o,...t})});var a$=l(R(),1),l$=l(w(),1),lV=(0,a$.forwardRef)(function(t,o){return(0,l$.jsx)(od.Trigger,{ref:o,...t})});var Am={};wa(Am,{Content:()=>k$,Header:()=>p$,HeaderDescription:()=>g$,Root:()=>u$});var c$=l(R(),1);var uV=l(w(),1),u$=(0,c$.forwardRef)(function({render:t,...o},r){return(0,uV.jsx)(aV,{ref:r,render:(0,uV.jsx)(nB,{render:t}),...o})});var ig=l(R(),1);var d$=l(R(),1),aB=(0,d$.createContext)({setDescriptionId:()=>{}});var $l=l(w(),1),dV="data-wp-hash";function fV(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&gCe(document)),e.__wpStyleRuntime}function hCe(e,t){if(!e.head)return!1;for(let o of e.head.querySelectorAll(`style[${dV}]`))if(o.getAttribute(dV)===t)return!0;return!1}function m$(e,t,o){if(!e.head)return;let r=fV(),n=r.injectedStyles.get(e);if(n||(n=new Set,r.injectedStyles.set(e,n)),n.has(t))return;if(hCe(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute(dV,t),i.appendChild(e.createTextNode(o)),e.head.appendChild(i),n.add(t)}function gCe(e){let t=fV();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[o,r]of t.styles)m$(e,o,r);return()=>{let o=t.documents.get(e);if(o!==void 0){if(o<=1){t.documents.delete(e);return}t.documents.set(e,o-1)}}}function mV(e,t){let o=fV();o.styles.set(e,t);for(let r of o.documents.keys())m$(r,e,t)}typeof process>"u",mV("f1b9bb6252","@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._626190151275d6d3__heading-wrapper{--_gcd-heading-color:inherit;--_gcd-heading-font-size:inherit;--_gcd-heading-font-weight:inherit;--_gcd-heading-margin:0;font-family:inherit;line-height:inherit}.cab17c7a373cb60d__header-content{flex:1;min-width:0}.dd89d27c4f15912d__header-trigger-positioner{align-self:center;flex-shrink:0;max-height:0;overflow:visible}.bcfab5f2448bafef__header-trigger-wrapper{border-radius:var(--wpds-border-radius-sm,2px);display:flex;translate:0 -50%}._3106f8d2b0330faa__header-trigger{@media not (prefers-reduced-motion){transition:rotate .15s ease-out}}._5d2dfcb4085c6d0f__header[data-panel-open] ._3106f8d2b0330faa__header-trigger{rotate:180deg}._5d2dfcb4085c6d0f__header[data-disabled] ._3106f8d2b0330faa__header-trigger{color:var(--wpds-color-fg-interactive-neutral-disabled,#8d8d8d)}.e34cf37ccd0d81e0__content{height:var(--collapsible-panel-height);margin-block-start:var(--wp-ui-card-header-content-margin);overflow:hidden;&._165c4572592944b2__overflowVisible{overflow:visible}&[hidden]:not([hidden=until-found]){display:none}&[data-ending-style],&[data-starting-style]{height:0}@media not (prefers-reduced-motion){transition:all .15s ease-out}}}@layer wp-ui-compositions{._41bfdbf7b6c087c2__content-inner{padding-block-start:0}._5d2dfcb4085c6d0f__header{align-items:stretch;display:flex;flex-direction:row;gap:var(--wpds-dimension-gap-sm,8px);outline:none;&:not([data-disabled]){cursor:var(--wpds-cursor-control,pointer)}}}");var ng={"heading-wrapper":"_626190151275d6d3__heading-wrapper","header-content":"cab17c7a373cb60d__header-content","header-trigger-positioner":"dd89d27c4f15912d__header-trigger-positioner","header-trigger-wrapper":"bcfab5f2448bafef__header-trigger-wrapper","header-trigger":"_3106f8d2b0330faa__header-trigger",header:"_5d2dfcb4085c6d0f__header",content:"e34cf37ccd0d81e0__content",overflowVisible:"_165c4572592944b2__overflowVisible","content-inner":"_41bfdbf7b6c087c2__content-inner"};typeof process>"u",mV("1fb29d3a3c","._6defc79820e382c6__button{box-sizing:var(--_gcd-button-box-sizing,border-box);font-family:var(--_gcd-button-font-family,inherit);font-size:var(--_gcd-button-font-size,inherit);font-weight:var(--_gcd-button-font-weight,inherit)}.d2cff2e5dea83bd1__input{box-sizing:var(--_gcd-input-box-sizing,border-box);font-family:var(--_gcd-input-font-family,inherit);font-size:var(--_gcd-input-font-size,inherit);font-weight:var(--_gcd-input-font-weight,inherit);margin:var(--_gcd-input-margin,0);&:is(textarea,[type=text],[type=password],[type=color],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){background-color:var(--_gcd-input-background-color,#0000);border:var(--_gcd-input-border,none);border-radius:var(--_gcd-input-border-radius,0);box-shadow:var(--_gcd-input-box-shadow,0 0 0 #0000);color:var(--_gcd-input-color,var(--wpds-color-fg-interactive-neutral,#1e1e1e));&:focus{border-color:var(--_gcd-input-border-color-focus,var(--wp-admin-theme-color));box-shadow:var(--_gcd-input-box-shadow-focus,none);outline:var(--_gcd-input-outline-focus,none)}&:disabled{background:var(--_gcd-input-background-disabled,#0000);border-color:var(--_gcd-input-border-color-disabled,#0000);box-shadow:var(--_gcd-input-box-shadow-disabled,none);color:var(--_gcd-input-color-disabled,var(--wpds-color-fg-interactive-neutral-disabled,#8d8d8d))}&::placeholder{color:var(--_gcd-input-placeholder-color,var(--wpds-color-fg-interactive-neutral-disabled,#8d8d8d))}}&:is(textarea,[type=text],[type=password],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){line-height:var(--_gcd-input-line-height,inherit);min-height:var(--_gcd-input-min-height,auto);padding:var(--_gcd-input-padding,0)}}._547d86373d02e108__textarea{box-sizing:var(--_gcd-textarea-box-sizing,border-box);overflow:var(--_gcd-textarea-overflow,auto);resize:var(--_gcd-textarea-resize,block)}._8c15fd0ed9f28ba4__div{outline:var(--_gcd-div-outline,0 solid #0000)}p._43cec3e1eec1066d__p{font-size:var(--_gcd-p-font-size,13px);line-height:var(--_gcd-p-line-height,1.5);margin:var(--_gcd-p-margin,0)}:is(h1,h2,h3,h4,h5,h6).e97669c6d9a38497__heading{color:var(--_gcd-heading-color,var(--wpds-color-fg-content-neutral,#1e1e1e));font-size:var(--_gcd-heading-font-size,inherit);font-weight:var(--_gcd-heading-font-weight,var(--wpds-typography-font-weight-medium,499));margin:var(--_gcd-heading-margin,0)}._2c0831b0499dbd6e__a,._2c0831b0499dbd6e__a:is(:hover,:focus,:active){border-radius:var(--_gcd-a-border-radius,0);box-shadow:var(--_gcd-a-box-shadow,none);color:var(--_gcd-a-color,inherit);outline:var(--_gcd-a-outline,0 solid #0000);transition:var(--_gcd-a-transition,none)}");var f$={button:"_6defc79820e382c6__button",input:"d2cff2e5dea83bd1__input",textarea:"_547d86373d02e108__textarea",div:"_8c15fd0ed9f28ba4__div",p:"_43cec3e1eec1066d__p",heading:"e97669c6d9a38497__heading",a:"_2c0831b0499dbd6e__a"};typeof process>"u",mV("2a5ab8f3a7","@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-utilities{._08e8a2e44959f892__outset-ring--focus,._970d04df7376df67__outset-ring--focus-within-except-active,.c5cb3ee4bddaa8e4__outset-ring--focus-within-visible,.cd83dfc2126a0846__outset-ring--focus-within,.d0541bc9dd9dc7b6__outset-ring--focus-visible,.e25b2bdd7aa21721__outset-ring--focus-except-active,.ecadb9e080e2dfa5__outset-ring--focus-parent-visible{@media not (prefers-reduced-motion){--_gcd-a-transition:outline 0.1s ease-out;transition:outline .1s ease-out}outline:0 solid #0000;outline-offset:1px}._08e8a2e44959f892__outset-ring--focus:focus,._970d04df7376df67__outset-ring--focus-within-except-active:focus-within:not(:has(:active)),.c5cb3ee4bddaa8e4__outset-ring--focus-within-visible:focus-within:has(:focus-visible),.cd83dfc2126a0846__outset-ring--focus-within:focus-within,.d0541bc9dd9dc7b6__outset-ring--focus-visible:focus-visible,.e25b2bdd7aa21721__outset-ring--focus-except-active:focus:not(:active),:focus-visible .ecadb9e080e2dfa5__outset-ring--focus-parent-visible{--_gcd-a-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus-brand,var(--wp-admin-theme-color,#3858e9));--_gcd-div-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus-brand,var(--wp-admin-theme-color,#3858e9));outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus-brand,var(--wp-admin-theme-color,#3858e9))}}");var bCe={"outset-ring--focus":"_08e8a2e44959f892__outset-ring--focus","outset-ring--focus-except-active":"e25b2bdd7aa21721__outset-ring--focus-except-active","outset-ring--focus-visible":"d0541bc9dd9dc7b6__outset-ring--focus-visible","outset-ring--focus-within":"cd83dfc2126a0846__outset-ring--focus-within","outset-ring--focus-within-except-active":"_970d04df7376df67__outset-ring--focus-within-except-active","outset-ring--focus-within-visible":"c5cb3ee4bddaa8e4__outset-ring--focus-within-visible","outset-ring--focus-parent-visible":"ecadb9e080e2dfa5__outset-ring--focus-parent-visible"},p$=(0,ig.forwardRef)(function({children:t,className:o,render:r,...n},i){let[s,a]=(0,ig.useState)(),c=(0,ig.useMemo)(()=>({setDescriptionId:a}),[a]);return Lr({defaultTagName:"div",render:r,ref:i,props:Co(n,{className:D(f$.heading,ng["heading-wrapper"],o),children:(0,$l.jsx)(aB.Provider,{value:c,children:(0,$l.jsxs)(lV,{className:ng.header,render:(0,$l.jsx)(iB,{}),nativeButton:!1,"aria-describedby":s,children:[(0,$l.jsx)("div",{className:ng["header-content"],children:t}),(0,$l.jsx)("div",{className:D(ng["header-trigger-positioner"]),children:(0,$l.jsx)("div",{className:D(ng["header-trigger-wrapper"],f$.div,bCe["outset-ring--focus-parent-visible"]),children:(0,$l.jsx)(ZD,{icon:vr,className:ng["header-trigger"]})})})]})})})})});var rd=l(R(),1);var h$=l(w(),1),g$=(0,rd.forwardRef)(function({children:t,className:o,...r},n){let i=(0,rd.useId)(),{setDescriptionId:s}=(0,rd.useContext)(aB);return(0,rd.useEffect)(()=>(s(i),()=>s(void 0)),[i,s]),(0,h$.jsx)("div",{ref:n,id:i,"aria-hidden":"true",className:o,...r,children:t})});var b$=l(R(),1);var gV=l(w(),1),hV="data-wp-hash";function bV(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&kCe(document)),e.__wpStyleRuntime}function vCe(e,t){if(!e.head)return!1;for(let o of e.head.querySelectorAll(`style[${hV}]`))if(o.getAttribute(hV)===t)return!0;return!1}function v$(e,t,o){if(!e.head)return;let r=bV(),n=r.injectedStyles.get(e);if(n||(n=new Set,r.injectedStyles.set(e,n)),n.has(t))return;if(vCe(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute(hV,t),i.appendChild(e.createTextNode(o)),e.head.appendChild(i),n.add(t)}function kCe(e){let t=bV();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[o,r]of t.styles)v$(e,o,r);return()=>{let o=t.documents.get(e);if(o!==void 0){if(o<=1){t.documents.delete(e);return}t.documents.set(e,o-1)}}}function yCe(e,t){let o=bV();o.styles.set(e,t);for(let r of o.documents.keys())v$(r,e,t)}typeof process>"u",yCe("f1b9bb6252","@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._626190151275d6d3__heading-wrapper{--_gcd-heading-color:inherit;--_gcd-heading-font-size:inherit;--_gcd-heading-font-weight:inherit;--_gcd-heading-margin:0;font-family:inherit;line-height:inherit}.cab17c7a373cb60d__header-content{flex:1;min-width:0}.dd89d27c4f15912d__header-trigger-positioner{align-self:center;flex-shrink:0;max-height:0;overflow:visible}.bcfab5f2448bafef__header-trigger-wrapper{border-radius:var(--wpds-border-radius-sm,2px);display:flex;translate:0 -50%}._3106f8d2b0330faa__header-trigger{@media not (prefers-reduced-motion){transition:rotate .15s ease-out}}._5d2dfcb4085c6d0f__header[data-panel-open] ._3106f8d2b0330faa__header-trigger{rotate:180deg}._5d2dfcb4085c6d0f__header[data-disabled] ._3106f8d2b0330faa__header-trigger{color:var(--wpds-color-fg-interactive-neutral-disabled,#8d8d8d)}.e34cf37ccd0d81e0__content{height:var(--collapsible-panel-height);margin-block-start:var(--wp-ui-card-header-content-margin);overflow:hidden;&._165c4572592944b2__overflowVisible{overflow:visible}&[hidden]:not([hidden=until-found]){display:none}&[data-ending-style],&[data-starting-style]{height:0}@media not (prefers-reduced-motion){transition:all .15s ease-out}}}@layer wp-ui-compositions{._41bfdbf7b6c087c2__content-inner{padding-block-start:0}._5d2dfcb4085c6d0f__header{align-items:stretch;display:flex;flex-direction:row;gap:var(--wpds-dimension-gap-sm,8px);outline:none;&:not([data-disabled]){cursor:var(--wpds-cursor-control,pointer)}}}");var pV={"heading-wrapper":"_626190151275d6d3__heading-wrapper","header-content":"cab17c7a373cb60d__header-content","header-trigger-positioner":"dd89d27c4f15912d__header-trigger-positioner","header-trigger-wrapper":"bcfab5f2448bafef__header-trigger-wrapper","header-trigger":"_3106f8d2b0330faa__header-trigger",header:"_5d2dfcb4085c6d0f__header",content:"e34cf37ccd0d81e0__content",overflowVisible:"_165c4572592944b2__overflowVisible","content-inner":"_41bfdbf7b6c087c2__content-inner"},k$=(0,b$.forwardRef)(function({className:t,render:o,children:r,hiddenUntilFound:n=!0,...i},s){return(0,gV.jsx)(sV,{ref:s,className:a=>D(pV.content,a.open&&a.transitionStatus==="idle"&&pV.overflowVisible,t),hiddenUntilFound:n,...i,children:(0,gV.jsx)(sB,{className:pV["content-inner"],render:o,children:r})})});var y$=l(R(),1),vV="data-wp-hash";function kV(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&SCe(document)),e.__wpStyleRuntime}function _Ce(e,t){if(!e.head)return!1;for(let o of e.head.querySelectorAll(`style[${vV}]`))if(o.getAttribute(vV)===t)return!0;return!1}function _$(e,t,o){if(!e.head)return;let r=kV(),n=r.injectedStyles.get(e);if(n||(n=new Set,r.injectedStyles.set(e,n)),n.has(t))return;if(_Ce(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute(vV,t),i.appendChild(e.createTextNode(o)),e.head.appendChild(i),n.add(t)}function SCe(e){let t=kV();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[o,r]of t.styles)_$(e,o,r);return()=>{let o=t.documents.get(e);if(o!==void 0){if(o<=1){t.documents.delete(e);return}t.documents.set(e,o-1)}}}function xCe(e,t){let o=kV();o.styles.set(e,t);for(let r of o.documents.keys())_$(r,e,t)}typeof process>"u",xCe("b51ff41489","@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._19ce0419607e1896__stack{display:flex}}");var wCe={stack:"_19ce0419607e1896__stack"},CCe={xs:"var(--wpds-dimension-gap-xs, 4px)",sm:"var(--wpds-dimension-gap-sm, 8px)",md:"var(--wpds-dimension-gap-md, 12px)",lg:"var(--wpds-dimension-gap-lg, 16px)",xl:"var(--wpds-dimension-gap-xl, 24px)","2xl":"var(--wpds-dimension-gap-2xl, 32px)","3xl":"var(--wpds-dimension-gap-3xl, 40px)"},Re=(0,y$.forwardRef)(function({direction:t,gap:o,align:r,justify:n,wrap:i,render:s,...a},c){let u={gap:o&&CCe[o],alignItems:r,justifyContent:n,flexDirection:t,flexWrap:i};return Lr({render:s,ref:c,props:Co(a,{style:u,className:wCe.stack})})});var S$=l(R(),1),yV="data-wp-hash";function _V(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&ECe(document)),e.__wpStyleRuntime}function BCe(e,t){if(!e.head)return!1;for(let o of e.head.querySelectorAll(`style[${yV}]`))if(o.getAttribute(yV)===t)return!0;return!1}function x$(e,t,o){if(!e.head)return;let r=_V(),n=r.injectedStyles.get(e);if(n||(n=new Set,r.injectedStyles.set(e,n)),n.has(t))return;if(BCe(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute(yV,t),i.appendChild(e.createTextNode(o)),e.head.appendChild(i),n.add(t)}function ECe(e){let t=_V();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[o,r]of t.styles)x$(e,o,r);return()=>{let o=t.documents.get(e);if(o!==void 0){if(o<=1){t.documents.delete(e);return}t.documents.set(e,o-1)}}}function TCe(e,t){let o=_V();o.styles.set(e,t);for(let r of o.documents.keys())x$(r,e,t)}typeof process>"u",TCe("c46e8cb841","@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{.f37b9e2e191ebd66__visually-hidden{word-wrap:normal;border:0;clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;word-break:normal}}");var ICe={"visually-hidden":"f37b9e2e191ebd66__visually-hidden"},We=(0,S$.forwardRef)(function({render:t,...o},r){return Lr({render:t,ref:r,props:Co({className:ICe["visually-hidden"]},o,{"data-visually-hidden":""})})});var vd=l(N(),1),S_=l(X(),1),aX=l(F(),1);var sg=l(N(),1),ag=l(R(),1),C$=l(A(),1),Zy=l(w(),1),w$=[(0,ag.createInterpolateElement)((0,sg.__)("While writing, you can press <kbd>/</kbd> to quickly insert new blocks."),{kbd:(0,Zy.jsx)("kbd",{})}),(0,ag.createInterpolateElement)((0,sg.__)("Indent a list by pressing <kbd>space</kbd> at the beginning of a line."),{kbd:(0,Zy.jsx)("kbd",{})}),(0,ag.createInterpolateElement)((0,sg.__)("Outdent a list by pressing <kbd>backspace</kbd> at the beginning of a line."),{kbd:(0,Zy.jsx)("kbd",{})}),(0,sg.__)("Drag files into the editor to automatically insert media blocks."),(0,sg.__)("Change a block's type by pressing the block icon on the toolbar.")];function PCe(){let[e]=(0,ag.useState)(()=>Math.floor(Math.random()*w$.length));return(0,Zy.jsx)(C$.Tip,{children:w$[e]})}var B$=PCe;var Eg=l(K(),1),Hq=l(R(),1),Gq=l(N(),1);var Bn=l(A(),1),lB=l(F(),1),E$=l(Le(),1),nd=l(N(),1);var cB=l(K(),1);var Nr=l(w(),1),{Badge:RCe}=M(Bn.privateApis);function OCe({children:e,onClick:t}){return t?(0,Nr.jsx)(Bn.Button,{__next40pxDefaultSize:!0,className:"block-editor-block-card__parent-select-button",onClick:t,children:e}):e}function ACe({title:e,icon:t,description:o,blockType:r,className:n,name:i,allowParentNavigation:s,parentClientId:a,isChild:c,children:u,clientId:d}){r&&((0,E$.default)("`blockType` property in `BlockCard component`",{since:"5.7",alternative:"`title, icon and description` properties"}),{title:e,icon:t,description:o}=r);let{parentBlockClientId:f,parentBlockName:m}=(0,lB.useSelect)(g=>{if(a||c||!s)return{};let{getBlockParents:b,getBlockName:k}=g(x),y=b(d,!1).find(_=>{let S=k(_);return S==="core/navigation"||(0,cB.hasBlockSupport)(S,"listView")});return{parentBlockClientId:y,parentBlockName:y?k(y):null}},[d,s,c,a]),{selectBlock:h}=(0,lB.useDispatch)(x),p=a?"div":"h2";return(0,Nr.jsx)("div",{className:D("block-editor-block-card",{"is-parent":a,"is-child":c},n),children:(0,Nr.jsxs)(Bn.__experimentalVStack,{children:[(0,Nr.jsxs)(Bn.__experimentalHStack,{justify:"flex-start",spacing:0,children:[f&&(0,Nr.jsx)(Bn.Button,{onClick:()=>h(f),label:m?(0,nd.sprintf)((0,nd.__)('Go to "%s" block'),(0,cB.getBlockType)(m)?.title):(0,nd.__)("Go to parent block"),style:{minWidth:24,padding:0},icon:(0,nd.isRTL)()?Ko:Yr,size:"small"}),c&&(0,Nr.jsx)("span",{className:"block-editor-block-card__child-indicator-icon",children:(0,Nr.jsx)(Bn.Icon,{icon:(0,nd.isRTL)()?Sk:xk})}),(0,Nr.jsxs)(OCe,{onClick:a?()=>{h(a)}:void 0,children:[(0,Nr.jsx)(Me,{icon:t,showColors:!0}),(0,Nr.jsxs)(Bn.__experimentalVStack,{spacing:1,children:[(0,Nr.jsxs)(p,{className:"block-editor-block-card__title",children:[(0,Nr.jsx)("span",{className:"block-editor-block-card__name",children:i?.length?i:e}),!a&&!c&&!!i?.length&&(0,Nr.jsx)(RCe,{children:e})]}),u]})]})]}),!a&&!c&&o&&(0,Nr.jsx)(Bn.__experimentalText,{className:"block-editor-block-card__description",children:o})]})})}var Xy=ACe;var ZB=l(X(),1),d3=l(F(),1),Vm=l(R(),1),u3=l(Le(),1);var Y$=l(F(),1),id=l(R(),1),q$=l(A(),1),Hs=l(I$(),1);var P$=l(R(),1),lg=l(F(),1),R$=l(X(),1);var uB=l(w(),1);function LCe(e,t,o){if(!o)return t;let r=e.get(t);return r||(r=(0,lg.createRegistry)({},t),r.registerStore(Jt,Eh),e.set(t,r)),r}var NCe=(0,R$.createHigherOrderComponent)(e=>function({useSubRegistry:o=!0,...r}){let n=(0,lg.useRegistry)(),[i]=(0,P$.useState)(()=>new WeakMap),s=LCe(i,n,o);return s===n?(0,uB.jsx)(e,{registry:n,...r}):(0,uB.jsx)(lg.RegistryProvider,{value:s,children:(0,uB.jsx)(e,{registry:s,...r})})},"withRegistryProvider"),O$=NCe;var tn=l(R(),1),M$=l(F(),1),D$=l(K(),1);var A$=l(R(),1),MCe=()=>{},dB=(0,A$.createContext)({getSelection:()=>{},onChangeSelection:MCe});var L$=()=>{};function V$(e,t){let o=(0,D$.cloneBlock)(e);return t.externalToInternal.set(e.clientId,o.clientId),t.internalToExternal.set(o.clientId,e.clientId),e.innerBlocks?.length&&(o.innerBlocks=e.innerBlocks.map(r=>V$(r,t))),o}function F$(e,t){return e.map(o=>{let r=t.internalToExternal.get(o.clientId);return{...o,clientId:r??o.clientId,innerBlocks:F$(o.innerBlocks,t)}})}function N$(e,t){let{selectionStart:o,selectionEnd:r,initialPosition:n}=e,i=s=>{if(!s?.clientId)return s;let a=t.internalToExternal.get(s.clientId);return{...s,clientId:a??s.clientId}};return{selectionStart:i(o),selectionEnd:i(r),initialPosition:n}}function fB({clientId:e=null,value:t,onChange:o=L$,onInput:r=L$}){let n=(0,M$.useRegistry)(),{getSelection:i,onChangeSelection:s}=(0,tn.useContext)(dB),{resetBlocks:a,resetSelection:c,replaceInnerBlocks:u,setHasControlledInnerBlocks:d,__unstableMarkNextChangeAsNotPersistent:f}=n.dispatch(x),{getBlockName:m,getBlocks:h,getSelectionStart:p,getSelectionEnd:g}=n.select(x),b=(0,tn.useRef)({incoming:null,outgoing:[]}),k=(0,tn.useRef)(!1),v=(0,tn.useRef)({externalToInternal:new Map,internalToExternal:new Map}),y=(0,tn.useRef)(null),_=(0,tn.useRef)(!1),S=()=>{let E=i();if(!E?.selectionStart?.clientId||E===y.current)return;let L=E.selectionStart.clientId;if(e?v.current.externalToInternal.has(L):!!m(L)){y.current=E;let O=V=>!V?.clientId||!e?V:{...V,clientId:v.current.externalToInternal.get(V.clientId)??V.clientId};_.current=!0,c(O(E.selectionStart),O(E.selectionEnd),E.initialPosition),_.current=!1}},C=()=>{t&&(e?n.batch(()=>{v.current.externalToInternal.clear(),v.current.internalToExternal.clear();let E=t.map(L=>V$(L,v.current));d(e,!0),k.current&&(b.current.incoming=E),f(),u(e,E),y.current=null}):(k.current&&(b.current.incoming=t),f(),a(t)))},B=()=>{f(),e?(d(e,!1),f(),u(e,[])):a([])},T=(0,tn.useRef)(r),I=(0,tn.useRef)(o);(0,tn.useEffect)(()=>{T.current=r,I.current=o},[r,o]),(0,tn.useEffect)(()=>{let E=b.current.outgoing.includes(t),L=h(e)===t;E?b.current.outgoing[b.current.outgoing.length-1]===t&&(b.current.outgoing=[]):L||(b.current.outgoing=[],C(),S())},[t,e]),(0,tn.useEffect)(()=>{let{getSelectedBlocksInitialCaretPosition:E,isLastBlockChangePersistent:L,__unstableIsLastBlockChangeIgnored:P,areInnerBlocksControlled:O,getBlockParents:V}=n.select(x),j=h(e),H=L(),z=!1,U=p(),G=g();k.current=!0;let W=n.subscribe(()=>{if(e!==null&&m(e)===null)return;let J=L(),le=h(e),oe=le!==j;if(j=le,oe&&(b.current.incoming||P())){b.current.incoming=null,H=J;return}let Q=oe||z&&!oe&&J&&!H,$=p(),ee=g(),Y=$!==U||ee!==G;Y&&(U=$,G=ee),(Q||Y)&&n.batch(()=>{if(Q){H=J;let te=e?F$(j,v.current):j,ne={selectionStart:$,selectionEnd:ee,initialPosition:E()},q=e?N$(ne,v.current):ne;b.current.outgoing.push(te),(H?I.current:T.current)(te,{selection:q})}if(Y&&!Q&&$?.clientId&&!_.current&&(e?v.current.internalToExternal.has($.clientId):!V($.clientId).some(ne=>O(ne)))){let ne={selectionStart:$,selectionEnd:ee,initialPosition:E()};s(e?N$(ne,v.current):ne)}}),z=oe},x);return()=>{k.current=!1,W()}},[n,e]),(0,tn.useEffect)(()=>()=>{B()},[])}var z$=l(R(),1),j$=l(F(),1),U$=l(Us(),1),Bo=l(N(),1);function H$(){return null}function DCe(){let{registerShortcut:e}=(0,j$.useDispatch)(U$.store);return(0,z$.useEffect)(()=>{e({name:"core/block-editor/copy",category:"block",description:(0,Bo.__)("Copy the selected block(s)."),keyCombination:{modifier:"primary",character:"c"}}),e({name:"core/block-editor/cut",category:"block",description:(0,Bo.__)("Cut the selected block(s)."),keyCombination:{modifier:"primary",character:"x"}}),e({name:"core/block-editor/paste",category:"block",description:(0,Bo.__)("Paste the selected block(s)."),keyCombination:{modifier:"primary",character:"v"}}),e({name:"core/block-editor/duplicate",category:"block",description:(0,Bo.__)("Duplicate the selected block(s)."),keyCombination:{modifier:"primaryShift",character:"d"}}),e({name:"core/block-editor/remove",category:"block",description:(0,Bo.__)("Remove the selected block(s)."),keyCombination:{modifier:"access",character:"z"}}),e({name:"core/block-editor/paste-styles",category:"block",description:(0,Bo.__)("Paste the copied style to the selected block(s)."),keyCombination:{modifier:"primaryAlt",character:"v"}}),e({name:"core/block-editor/insert-before",category:"block",description:(0,Bo.__)("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,Bo.__)("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,Bo.__)("Delete selection."),keyCombination:{character:"del"},aliases:[{character:"backspace"}]}),e({name:"core/block-editor/stop-editing-as-blocks",category:"block",description:(0,Bo.__)("Finish editing a design."),keyCombination:{character:"escape"}}),e({name:"core/block-editor/select-all",category:"selection",description:(0,Bo.__)("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,Bo.__)("Clear selection."),keyCombination:{character:"escape"}}),e({name:"core/block-editor/multi-text-selection",category:"selection",description:(0,Bo.__)("Select text across multiple blocks."),keyCombination:{modifier:"shift",character:"arrow"}}),e({name:"core/block-editor/focus-toolbar",category:"global",description:(0,Bo.__)("Navigate to the nearest toolbar."),keyCombination:{modifier:"alt",character:"F10"}}),e({name:"core/block-editor/move-up",category:"block",description:(0,Bo.__)("Move the selected block(s) up."),keyCombination:{modifier:"secondary",character:"t"}}),e({name:"core/block-editor/move-down",category:"block",description:(0,Bo.__)("Move the selected block(s) down."),keyCombination:{modifier:"secondary",character:"y"}}),e({name:"core/block-editor/collapse-list-view",category:"list-view",description:(0,Bo.__)("Collapse all other items."),keyCombination:{modifier:"alt",character:"l"}}),e({name:"core/block-editor/group",category:"block",description:(0,Bo.__)("Create a group block from the selected multiple blocks."),keyCombination:{modifier:"primary",character:"g"}}),e({name:"core/block-editor/toggle-block-visibility",category:"block",description:(0,Bo.__)("Show or hide the selected block(s)."),keyCombination:{modifier:"primaryShift",character:"h"}}),e({name:"core/block-editor/rename",category:"block",description:(0,Bo.__)("Rename the selected block."),keyCombination:{modifier:"primaryAlt",character:"r"}})},[e]),null}H$.Register=DCe;var mB=H$;var G$=l(R(),1);function VCe(e={}){return(0,G$.useMemo)(()=>({mediaUpload:e.mediaUpload,mediaSideload:e.mediaSideload,mediaFinalize:e.mediaFinalize,maxUploadFileSize:e.maxUploadFileSize,allowedMimeTypes:e.allowedMimeTypes,allImageSizes:e.allImageSizes,bigImageSizeThreshold:e.bigImageSizeThreshold}),[e])}var W$=VCe;var Kl=l(w(),1),pB=()=>{},$$=!1,cg=null,ug=null,K$=["image/heic","image/heif"];function Z$(){if(cg!==null)return cg;if(!window.__clientSideMediaProcessing||typeof Hs.detectClientSideMediaSupport!="function")return cg=!1,!1;let e=(0,Hs.detectClientSideMediaSupport)();return!e||!e.supported?($$||(console.info(`Client-side media processing unavailable: ${e.reason}. Using server-side processing.`),$$=!0),cg=!1,!1):(cg=!0,!0)}function FCe(){return ug!==null?ug:Z$()||!window.__heicUploadSupport||typeof Hs.isHeicCanvasSupported!="function"||!(0,Hs.isHeicCanvasSupported)()?(ug=!1,!1):(ug=!0,!0)}function zCe(e,t,{allowedTypes:o,additionalData:r={},filesList:n,onError:i=pB,onFileChange:s,onSuccess:a,onBatchSuccess:c}){e.dispatch(Hs.store).addItems({files:Array.from(n),onChange:s,onSuccess:u=>{t?.[vk]?.(u),a?.(u)},onBatchSuccess:c,onError:u=>i(typeof u=="string"?u:u?.message??""),additionalData:r,allowedTypes:o})}function jCe(e,t,{allowedTypes:o,additionalData:r={},filesList:n,onError:i=pB,onFileChange:s,onSuccess:a,onBatchSuccess:c}){let u=Array.from(n),d=u.filter(g=>K$.includes(g.type)),f=u.filter(g=>!K$.includes(g.type)),m=d.length>0&&f.length>0&&t?.mediaUpload,h=m?2:1,p=m?()=>{h--,h<=0&&c?.()}:c;d.length>0&&e.dispatch(Hs.store).addItems({files:d,onChange:s,onSuccess:g=>{t?.[vk]?.(g),a?.(g)},onBatchSuccess:p,onError:g=>i(typeof g=="string"?g:g?.message??""),additionalData:r,allowedTypes:o}),f.length>0&&t?.mediaUpload&&t.mediaUpload({allowedTypes:o,additionalData:r,filesList:f,onError:i,onFileChange:s,onSuccess:a,onBatchSuccess:p})}function UCe(e){return fB(e),null}var dg=O$(e=>{let{settings:t,registry:o,stripExperimentalSettings:r=!1}=e,n=W$(t),i=Z$(),s=FCe(),a=i||s,c=!!t?.mediaUpload?.__isMediaUploadInterceptor,u=(0,id.useMemo)(()=>{if(a&&t?.mediaUpload&&!c){let k=(i?zCe:jCe).bind(null,o,t);return k.__isMediaUploadInterceptor=!0,{...t,mediaUpload:k}}return t},[t,o,a,i,c]),{__experimentalUpdateSettings:d}=M((0,Y$.useDispatch)(x));(0,id.useEffect)(()=>{d({...u,__internalIsInitialized:!0},{stripExperimentalSettings:r,reset:!0})},[u,r,d]);let f=(0,id.useRef)(e.selection);f.current=e.selection;let m=(0,id.useRef)(e.onChangeSelection??pB);m.current=e.onChangeSelection??pB;let h=(0,id.useMemo)(()=>({getSelection:()=>f.current,onChangeSelection:(...b)=>m.current(...b)}),[]),p=(0,Kl.jsxs)(q$.SlotFillProvider,{passthrough:!0,children:[!u?.isPreviewMode&&(0,Kl.jsx)(mB.Register,{}),(0,Kl.jsx)(aU,{children:e.children})]}),g=(0,Kl.jsxs)(dB.Provider,{value:h,children:[(0,Kl.jsx)(UCe,{clientId:e.clientId,value:e.value,onChange:e.onChange,onInput:e.onInput}),p]});return a&&!c?(0,Kl.jsx)(Hs.MediaUploadProvider,{settings:n,useSubRegistry:!1,children:g}):g}),HCe=e=>(0,Kl.jsx)(dg,{...e,stripExperimentalSettings:!0,children:e.children}),X$=HCe;var p_=l(X(),1),Aq=l(F(),1),qB=l(R(),1),Lq=l(A(),1);var Lm=l(R(),1),MK=l(N(),1),ql=l(X(),1),DK=l(A(),1),EV=l(F(),1);var IK=l(F(),1),PK=l(N(),1),t_=l(X(),1),RK=l(R(),1);var Q$=l(X(),1),J$=l(F(),1);function GCe(e){let{isMultiSelecting:t,getMultiSelectedBlockClientIds:o,hasMultiSelection:r,getSelectedBlockClientId:n,getSelectedBlocksInitialCaretPosition:i,__unstableIsFullySelected:s}=e(x);return{isMultiSelecting:t(),multiSelectedBlockClientIds:o(),hasMultiSelection:r(),selectedBlockClientId:n(),initialPosition:i(),isFullSelection:s()}}function eK(){let{initialPosition:e,isMultiSelecting:t,multiSelectedBlockClientIds:o,hasMultiSelection:r,selectedBlockClientId:n,isFullSelection:i}=(0,J$.useSelect)(GCe,[]);return(0,Q$.useRefEffect)(s=>{let{ownerDocument:a}=s,{defaultView:c}=a;if(e==null||!r||t)return;let{length:u}=o;u<2||i&&(s.contentEditable=!0,s.focus(),c.getSelection().removeAllRanges())},[r,t,o,n,e,i])}var fg=l(Fe(),1),SV=l(it(),1),hB=l(F(),1),gB=l(X(),1),Qy=l(R(),1);var xV=l(w(),1);function tK(){let e=(0,Qy.useRef)(),t=(0,Qy.useRef)(),o=(0,Qy.useRef)(),{hasMultiSelection:r,getSelectedBlockClientId:n,getBlockCount:i,getBlockOrder:s,getLastFocus:a,getSectionRootClientId:c,isZoomOut:u}=M((0,hB.useSelect)(x)),{setLastFocus:d}=M((0,hB.useDispatch)(x)),f=(0,Qy.useRef)();function m(k){let v=e.current.ownerDocument===k.target.ownerDocument?e.current:e.current.ownerDocument.defaultView.frameElement;if(f.current)f.current=null;else if(r())e.current.focus();else if(n())a()?.current?a().current.focus():e.current.querySelector(`[data-block="${n()}"]`).focus();else if(u()){let y=c(),_=s(y);_.length?e.current.querySelector(`[data-block="${_[0]}"]`).focus():y?e.current.querySelector(`[data-block="${y}"]`).focus():v.focus()}else{let y=k.target.compareDocumentPosition(v)&k.target.DOCUMENT_POSITION_FOLLOWING,_=fg.focus.tabbable.find(e.current);_.length&&(y?_[0]:_[_.length-1]).focus()}}let h=(0,xV.jsx)("div",{ref:t,tabIndex:"0",onFocus:m}),p=(0,xV.jsx)("div",{ref:o,tabIndex:"0",onFocus:m}),g=(0,gB.useRefEffect)(k=>{function v(B){if(B.defaultPrevented||B.keyCode!==SV.TAB||!o.current||!t.current)return;let{target:T,shiftKey:I}=B,E=I?"findPrevious":"findNext",L=fg.focus.tabbable[E](T),P=T.closest("[data-block]"),O=P&&L&&(nG(P,L)||Aa(P,L));if((0,fg.isFormElement)(L)&&O)return;let V=I?t:o;f.current=!0,V.current.focus({preventScroll:!0})}function y(B){d({...a(),current:B.target});let{ownerDocument:T}=k;!B.relatedTarget&&B.target.hasAttribute("data-block")&&T.activeElement===T.body&&i()===0&&k.focus()}function _(B){if(B.keyCode!==SV.TAB||B.target?.getAttribute("role")==="region"||e.current===B.target)return;let I=B.shiftKey?"findPrevious":"findNext",E=fg.focus.tabbable[I](B.target);(E===t.current||E===o.current)&&(B.preventDefault(),E.focus({preventScroll:!0}))}let{ownerDocument:S}=k,{defaultView:C}=S;return C.addEventListener("keydown",_),k.addEventListener("keydown",v),k.addEventListener("focusout",y),()=>{C.removeEventListener("keydown",_),k.removeEventListener("keydown",v),k.removeEventListener("focusout",y)}},[]),b=(0,gB.useMergeRefs)([e,g]);return[h,b,p]}var Eo=l(Fe(),1),Ma=l(it(),1),bB=l(F(),1),oK=l(X(),1);function WCe(e,t,o){let r=t===Ma.UP||t===Ma.DOWN,{tagName:n}=e,i=e.getAttribute("type");return r&&!o?n==="INPUT"?!["date","datetime-local","month","number","range","time","week"].includes(i):!0:n==="INPUT"?["button","checkbox","number","color","file","image","radio","reset","submit"].includes(i):n!=="TEXTAREA"}function wV(e,t,o,r){let n=Eo.focus.focusable.find(o);t&&n.reverse(),n=n.slice(n.indexOf(e)+1);let i;r&&(i=e.getBoundingClientRect());function s(a){if(a.contentEditable!=="true"&&Wi(a)&&Eo.focus.focusable.find(a).filter(c=>!(0,Eo.isFormElement)(c)).length!==0||!Eo.focus.tabbable.isTabbableIndex(a)||a.isContentEditable&&a.contentEditable!=="true")return!1;if(r){let c=a.getBoundingClientRect();if(c.left>=i.right||c.right<=i.left)return!1}return!0}return n.find(s)}function rK(){let{getMultiSelectedBlocksStartClientId:e,getMultiSelectedBlocksEndClientId:t,getSettings:o,hasMultiSelection:r,__unstableIsFullySelected:n}=(0,bB.useSelect)(x),{selectBlock:i}=(0,bB.useDispatch)(x);return(0,oK.useRefEffect)(s=>{let a;function c(){a=null}function u(f,m){let h=wV(f,m,s);return h&&Wi(h)}function d(f){if(f.defaultPrevented)return;let{keyCode:m,target:h,shiftKey:p,ctrlKey:g,altKey:b,metaKey:k}=f,v=m===Ma.UP,y=m===Ma.DOWN,_=m===Ma.LEFT,S=m===Ma.RIGHT,C=v||_,B=_||S,T=v||y,I=B||T,E=p||g||b||k,L=T?Eo.isVerticalEdge:Eo.isHorizontalEdge,{ownerDocument:P}=s,{defaultView:O}=P;if(!I||o().isPreviewMode)return;if(r()){if(p||!n())return;f.preventDefault(),C?i(e()):i(t(),-1);return}if(!WCe(h,m,E))return;T?a||(a=(0,Eo.computeCaretRect)(O)):a=null;let V=(0,Eo.isRTL)(h)?!C:C,{keepCaretInsideBlock:j}=o();if(p)u(h,C)&&L(h,C)&&(s.contentEditable=!0,s.focus());else if(T&&(0,Eo.isVerticalEdge)(h,C)&&(!b||(0,Eo.isHorizontalEdge)(h,V))&&!j){let H=wV(h,C,s,!0);H&&((0,Eo.placeCaretAtVerticalEdge)(H,b?!C:C,b?void 0:a),f.preventDefault())}else if(B&&O.getSelection().isCollapsed&&(0,Eo.isHorizontalEdge)(h,V)&&!j){let H=wV(h,V,s);(0,Eo.placeCaretAtHorizontalEdge)(H,C),f.preventDefault()}}return s.addEventListener("mousedown",c),s.addEventListener("keydown",d),()=>{s.removeEventListener("mousedown",c),s.removeEventListener("keydown",d)}},[])}var nK=l(X(),1),iK=l(F(),1),Da=l(it(),1);function sK(){let e=(0,iK.useSelect)(t=>t(x).getSettings().isPreviewMode,[]);return(0,nK.useRefEffect)(t=>{if(!e)return;function o(r){let{keyCode:n,shiftKey:i,target:s}=r,a=n===Da.TAB,c=n===Da.UP,u=n===Da.DOWN,d=n===Da.LEFT;if(!a&&!(c||u||d||n===Da.RIGHT))return;let h=a?i:c||d,p=Array.from(t.querySelectorAll("[data-block]"));if(!p.length)return;let g=s.closest("[data-block]"),b=g?p.indexOf(g):-1;if(b===-1||a&&(h&&b===0||!h&&b===p.length-1))return;let k;h?k=b<=0?p.length-1:b-1:k=b===-1||b>=p.length-1?0:b+1,r.preventDefault(),p[k].focus()}return t.addEventListener("keydown",o),()=>{t.removeEventListener("keydown",o)}},[e])}var aK=l(Fe(),1),vB=l(F(),1),lK=l(Us(),1),cK=l(X(),1);function uK(){let{getBlockOrder:e,getSelectedBlockClientIds:t,getBlockRootClientId:o}=(0,vB.useSelect)(x),{multiSelect:r,selectBlock:n}=(0,vB.useDispatch)(x),i=(0,lK.__unstableUseShortcutEventMatch)();return(0,cK.useRefEffect)(s=>{function a(c){if(!i("core/block-editor/select-all",c))return;let u=t();if(u.length<2&&!(0,aK.isEntirelySelected)(c.target))return;c.preventDefault();let{ownerDocument:d}=c.target,[f]=u,m=Wi(d.activeElement);if(m&&m!==f&&!Aa(d.getElementById("block-"+f),d.activeElement)){n(m);return}let h=o(f),p=e(h);if(u.length===p.length){h&&(s.ownerDocument.defaultView.getSelection().removeAllRanges(),n(h));return}r(p[0],p[p.length-1])}return s.addEventListener("keydown",a),()=>{s.removeEventListener("keydown",a)}},[])}var kB=l(F(),1),fK=l(X(),1);function dK(e,t){e.contentEditable=t,t&&e.focus()}function mK(){let{startMultiSelect:e,stopMultiSelect:t}=(0,kB.useDispatch)(x),{getSettings:o,isSelectionEnabled:r,hasSelectedBlock:n,isDraggingBlocks:i,isMultiSelecting:s}=(0,kB.useSelect)(x);return(0,fK.useRefEffect)(a=>{let{ownerDocument:c}=a,{defaultView:u}=c,d,f;function m(){t(),u.removeEventListener("mouseup",m),f=u.requestAnimationFrame(()=>{if(!n())return;dK(a,!1);let b=u.getSelection();if(b.rangeCount){let k=b.getRangeAt(0),{commonAncestorContainer:v}=k,y=k.cloneRange();d.contains(v)&&(d.focus(),b.removeAllRanges(),b.addRange(y))}})}let h;function p({target:b}){h=b}function g({buttons:b,target:k,relatedTarget:v}){k.contains(h)&&(k.contains(v)||i()||b===1&&(s()||a!==k&&(k.getAttribute("contenteditable")!=="true"&&!o().isPreviewMode||r()&&(d=k,e(),u.addEventListener("mouseup",m),dK(a,!0)))))}return a.addEventListener("mouseout",g),a.addEventListener("mousedown",p),()=>{a.removeEventListener("mouseout",g),u.removeEventListener("mouseup",m),u.cancelAnimationFrame(f)}},[e,t,r,n])}var SB=l(F(),1),hK=l(X(),1),_B=l(yr(),1),gK=l(Fe(),1);function $Ce(e){let{anchorNode:t,anchorOffset:o}=e;return t.nodeType===t.TEXT_NODE||o===0?t:t.childNodes[o-1]}function KCe(e){let{focusNode:t,focusOffset:o}=e;return t.nodeType===t.TEXT_NODE||o===t.childNodes.length?t:o===0&&(0,gK.isSelectionForward)(e)?t.previousSibling??t.parentElement:t.childNodes[o]}function YCe(e,t){let o=0;for(;e[o]===t[o];)o++;return o}function pK(e,t){e.contentEditable!==String(t)&&(e.contentEditable=t,t&&e.focus())}function yB(e){return(e.nodeType===e.ELEMENT_NODE?e:e.parentElement)?.closest("[data-wp-block-attribute-key]")}function bK(){let{multiSelect:e,selectBlock:t,selectionChange:o}=(0,SB.useDispatch)(x),{getBlockParents:r,getBlockSelectionStart:n,isMultiSelecting:i}=(0,SB.useSelect)(x);return(0,hK.useRefEffect)(s=>{let{ownerDocument:a}=s,{defaultView:c}=a;function u(d){let f=c.getSelection();if(!f.rangeCount)return;let m=$Ce(f),h=KCe(f);if(!s.contains(m)||!s.contains(h))return;let p=d.shiftKey&&d.type==="mouseup";if(f.isCollapsed&&!p){if(s.contentEditable==="true"&&!i()){pK(s,!1);let v=m.nodeType===m.ELEMENT_NODE?m:m.parentElement;v=v?.closest("[contenteditable]"),v?.focus()}return}let g=Wi(m),b=Wi(h);if(p){let v=n(),y=Wi(d.target),_=y!==b;(g===b&&f.isCollapsed||!b||_)&&(b=y),g!==v&&(g=v)}if(g===void 0&&b===void 0){pK(s,!1);return}if(d.type==="mouseup"&&!d.shiftKey&&!i()&&g===b){let v=Wi(d.target);if(v&&v!==g){f.removeAllRanges();return}}if(g===b)if(i())e(g,g);else{let v=!f.isCollapsed&&(yB(m)||yB(h));if(v&&a.activeElement!==v){let y=f.getRangeAt(0),_=(0,_B.create)({element:v,range:y,__unstableIsEditableTree:!0});o({start:{clientId:g,attributeKey:v.dataset.wpBlockAttributeKey,offset:_.start??0},end:{clientId:g,attributeKey:v.dataset.wpBlockAttributeKey,offset:_.end}})}else t(g)}else{let v=[...r(g),g],y=[...r(b),b],_=YCe(v,y);if(v[_]!==g||y[_]!==b){e(v[_],y[_]);return}let S=yB(m),C=yB(h);if(S&&C){let B=f.getRangeAt(0),T=(0,_B.create)({element:S,range:B,__unstableIsEditableTree:!0}),I=(0,_B.create)({element:C,range:B,__unstableIsEditableTree:!0}),E=T.start??T.end,L=I.start??I.end;o({start:{clientId:g,attributeKey:S.dataset.wpBlockAttributeKey,offset:E},end:{clientId:b,attributeKey:C.dataset.wpBlockAttributeKey,offset:L}})}else e(g,b)}}return a.addEventListener("selectionchange",u),c.addEventListener("mouseup",u),()=>{a.removeEventListener("selectionchange",u),c.removeEventListener("mouseup",u)}},[e,t,o,r])}var xB=l(F(),1),vK=l(X(),1);function kK(){let{selectBlock:e}=(0,xB.useDispatch)(x),{isSelectionEnabled:t,getBlockSelectionStart:o,hasMultiSelection:r}=(0,xB.useSelect)(x);return(0,vK.useRefEffect)(n=>{function i(s){if(!t()||s.button!==0)return;let a=o(),c=Wi(s.target);s.shiftKey?a&&a!==c&&(n.contentEditable=!0,n.focus()):r()&&e(c)}return n.addEventListener("mousedown",i),()=>{n.removeEventListener("mousedown",i)}},[e,t,o,r])}var wB=l(F(),1),yK=l(X(),1),Yl=l(it(),1),Gs=l(K(),1);function _K(){let{__unstableIsFullySelected:e,getSelectedBlockClientIds:t,getSelectedBlockClientId:o,__unstableIsSelectionMergeable:r,hasMultiSelection:n,getBlockName:i,canInsertBlockType:s,getBlockRootClientId:a,getSelectionStart:c,getSelectionEnd:u,getBlockAttributes:d}=(0,wB.useSelect)(x),{replaceBlocks:f,__unstableSplitSelection:m,removeBlocks:h,__unstableDeleteSelection:p,__unstableExpandSelection:g,__unstableMarkAutomaticChange:b}=(0,wB.useDispatch)(x);return(0,yK.useRefEffect)(k=>{function v(S){k.contentEditable==="true"&&S.preventDefault()}function y(S){if(!S.defaultPrevented){if(!n()){if(S.keyCode===Yl.ENTER){if(S.shiftKey||e())return;let C=o(),B=i(C),T=c(),I=u();if(T.attributeKey===I.attributeKey){let E=d(C)[T.attributeKey],L=(0,Gs.getBlockTransforms)("from").filter(({type:O})=>O==="enter"),P=(0,Gs.findTransform)(L,O=>O.regExp.test(E));if(P){f(C,P.transform({content:E})),b();return}}if(!(0,Gs.hasBlockSupport)(B,"splitting",!1)&&!S.__deprecatedOnSplit)return;(s((0,Gs.getDefaultBlockName)(),a(C))||s(B,a(C)))&&(m(),S.preventDefault())}return}S.keyCode===Yl.ENTER?(k.contentEditable=!1,S.preventDefault(),e()?f(t(),(0,Gs.createBlock)((0,Gs.getDefaultBlockName)())):m()):S.keyCode===Yl.BACKSPACE||S.keyCode===Yl.DELETE?(k.contentEditable=!1,S.preventDefault(),e()?h(t()):r()?p(S.keyCode===Yl.DELETE):g()):S.key.length===1&&!(S.metaKey||S.ctrlKey)&&(k.contentEditable=!1,r()?p(S.keyCode===Yl.DELETE):(S.preventDefault(),k.ownerDocument.defaultView.getSelection().removeAllRanges()))}}function _(S){n()&&(k.contentEditable=!1,r()?p():(S.preventDefault(),k.ownerDocument.defaultView.getSelection().removeAllRanges()))}return k.addEventListener("beforeinput",v),k.addEventListener("keydown",y),k.addEventListener("compositionstart",_),()=>{k.removeEventListener("beforeinput",v),k.removeEventListener("keydown",y),k.removeEventListener("compositionstart",_)}},[])}var Va=l(K(),1),BB=l(Fe(),1),hg=l(F(),1),TK=l(X(),1);var SK=l(R(),1),xK=l(K(),1),Jy=l(F(),1),Yi=l(N(),1),wK=l(Xn(),1);function mg(){let{getBlockName:e}=(0,Jy.useSelect)(x),{getBlockType:t}=(0,Jy.useSelect)(xK.store),{createSuccessNotice:o}=(0,Jy.useDispatch)(wK.store);return(0,SK.useCallback)((r,n)=>{let i="";if(r==="copyStyles")i=(0,Yi.__)("Styles copied to clipboard.");else if(n.length===1){let s=n[0],a=t(e(s))?.title;r==="copy"?i=(0,Yi.sprintf)((0,Yi.__)('Copied "%s" to clipboard.'),a):i=(0,Yi.sprintf)((0,Yi.__)('Moved "%s" to clipboard.'),a)}else r==="copy"?i=(0,Yi.sprintf)((0,Yi._n)("Copied %d block to clipboard.","Copied %d blocks to clipboard.",n.length),n.length):i=(0,Yi.sprintf)((0,Yi._n)("Moved %d block to clipboard.","Moved %d blocks to clipboard.",n.length),n.length);o(i,{type:"snackbar"})},[o,e,t])}var BK=l(Fe(),1),qi=l(K(),1);var CK=l(Fe(),1);function qCe(e){let t="<!--StartFragment-->",o=e.indexOf(t);if(o>-1)e=e.substring(o+t.length);else return e;let n=e.indexOf("<!--EndFragment-->");return n>-1&&(e=e.substring(0,n)),e}function ZCe(e){let t="<meta charset='utf-8'>";return e.startsWith(t)?e.slice(t.length):e}function pg({clipboardData:e}){let t="",o="";try{t=e.getData("text/plain"),o=e.getData("text/html")}catch{return}o=qCe(o),o=ZCe(o);let r=(0,CK.getFilesFromDataTransfer)(e);return r.length&&!XCe(r,o)?{files:r}:{html:o,plainText:t,files:[]}}function XCe(e,t){if(t&&e?.length===1&&e[0].type.indexOf("image/")===0){let o=/<\s*img\b/gi;if(t.match(o)?.length!==1)return!0;let r=/<\s*img\b[^>]*\bsrc="file:\/\//i;if(t.match(r))return!0}return!1}var CV=Symbol("requiresWrapperOnCopy");function CB(e,t,o){let r=t,[n]=t;if(n&&o.select(qi.store).getBlockType(n.name)[CV]){let{getBlockRootClientId:a,getBlockName:c,getBlockAttributes:u}=o.select(x),d=a(n.clientId),f=c(d);f&&(r=(0,qi.createBlock)(f,u(d),r))}let i=(0,qi.serialize)(r);e.clipboardData.setData("text/plain",QCe(i)),e.clipboardData.setData("text/html",i)}function EK(e,t){let{plainText:o,html:r,files:n}=pg(e),i=[];if(n.length){let s=(0,qi.getBlockTransforms)("from");i=n.reduce((a,c)=>{let u=(0,qi.findTransform)(s,d=>d.type==="files"&&d.isMatch([c]));return u&&a.push(u.transform([c])),a},[]).flat()}else i=(0,qi.pasteHandler)({HTML:r,plainText:o,mode:"BLOCKS",canUserUseUnfilteredHTML:t});return i}function QCe(e){return e=e.replace(/<br>/g,` |
| 49 |
`),(0,BK.__unstableStripHTML)(e).trim().replace(/\n\n+/g,` |
| 50 |
|
| 51 |
`)}function e_(){let e=(0,hg.useRegistry)(),{getBlocksByClientId:t,getSelectedBlockClientIds:o,hasMultiSelection:r,getSettings:n,getBlockName:i,__unstableIsFullySelected:s,__unstableIsSelectionCollapsed:a,__unstableIsSelectionMergeable:c,__unstableGetSelectedBlocksWithPartialSelection:u,canInsertBlockType:d,getBlockRootClientId:f}=(0,hg.useSelect)(x),{flashBlock:m,removeBlocks:h,replaceBlocks:p,__unstableDeleteSelection:g,__unstableExpandSelection:b,__unstableSplitSelection:k}=(0,hg.useDispatch)(x),v=mg();return(0,TK.useRefEffect)(y=>{function _(S){if(S.defaultPrevented)return;let C=o();if(C.length===0)return;if(!r()){let{target:L}=S,{ownerDocument:P}=L;if(S.type==="copy"||S.type==="cut"?(0,BB.documentHasUncollapsedSelection)(P):(0,BB.documentHasSelection)(P)&&!P.activeElement.isContentEditable)return}let{activeElement:B}=S.target.ownerDocument;if(!y.contains(B))return;let T=c(),I=a()||s(),E=!I&&!T;if(S.type==="copy"||S.type==="cut")if(S.preventDefault(),C.length===1&&m(C[0]),E)b();else{v(S.type,C);let L;if(I)L=t(C);else{let[P,O]=u(),V=t(C.slice(1,C.length-1));L=[P,...V,O]}CB(S,L,e)}if(S.type==="cut")I&&!E?h(C):(S.target.ownerDocument.activeElement.contentEditable=!1,g());else if(S.type==="paste"){let{__experimentalCanUserUseUnfilteredHTML:L,mediaUpload:P}=n();if(S.clipboardData.getData("rich-text")==="true")return;let{plainText:V,html:j,files:H}=pg(S),z=s(),U=[];if(H.length){if(!P){S.preventDefault();return}let le=(0,Va.getBlockTransforms)("from");U=H.reduce((oe,re)=>{let Q=(0,Va.findTransform)(le,$=>$.type==="files"&&$.isMatch([re]));return Q&&oe.push(Q.transform([re])),oe},[]).flat()}else U=(0,Va.pasteHandler)({HTML:j,plainText:V,mode:z?"BLOCKS":"AUTO",canUserUseUnfilteredHTML:L});if(typeof U=="string")return;if(z){p(C,U,U.length-1,-1),S.preventDefault();return}if(!r()&&!(0,Va.hasBlockSupport)(i(C[0]),"splitting",!1)&&!S.__deprecatedOnSplit)return;let[G]=C,W=f(G),J=[];for(let le of U)if(d(le.name,W))J.push(le);else{let oe=i(W),re=le.name!==oe?(0,Va.switchToBlockType)(le,oe):[le];if(!re)return;for(let Q of re)for(let $ of Q.innerBlocks)J.push($)}k(J),S.preventDefault()}}return y.ownerDocument.addEventListener("copy",_),y.ownerDocument.addEventListener("cut",_),y.ownerDocument.addEventListener("paste",_),()=>{y.ownerDocument.removeEventListener("copy",_),y.ownerDocument.removeEventListener("cut",_),y.ownerDocument.removeEventListener("paste",_)}},[])}var gg=l(w(),1);function BV(){let[e,t,o]=tK(),r=(0,IK.useSelect)(n=>n(x).hasMultiSelection(),[]);return[e,(0,t_.useMergeRefs)([t,e_(),_K(),mK(),bK(),kK(),eK(),uK(),rK(),sK(),(0,t_.useRefEffect)(n=>(n.tabIndex=0,n.dataset.hasMultiSelection=r,r?(n.setAttribute("aria-label",(0,PK.__)("Multiple selected blocks")),()=>{delete n.dataset.hasMultiSelection,n.removeAttribute("aria-label")}):()=>{delete n.dataset.hasMultiSelection}),[r])]),o]}function JCe({children:e,...t},o){let[r,n,i]=BV();return(0,gg.jsxs)(gg.Fragment,{children:[r,(0,gg.jsx)("div",{...t,ref:(0,t_.useMergeRefs)([n,o]),className:D(t.className,"block-editor-writing-flow"),children:e}),i]})}var EB=(0,RK.forwardRef)(JCe);var TB=null;function OK(){return TB||(TB=Array.from(document.styleSheets).reduce((e,t)=>{try{t.cssRules}catch{return e}let{ownerNode:o,cssRules:r}=t;if(o===null||!r||o.id.startsWith("wp-")||!o.id)return e;function n(i){return Array.from(i).find(({selectorText:s,conditionText:a,cssRules:c})=>a?n(c):s&&(s.includes(".editor-styles-wrapper")||s.includes(".wp-block")))}if(n(r)){let i=o.tagName==="STYLE";if(i){let s=o.id.replace("-inline-css","-css"),a=document.getElementById(s);a&&e.push(a.cloneNode(!0))}if(e.push(o.cloneNode(!0)),!i){let s=o.id.replace("-css","-inline-css"),a=document.getElementById(s);a&&e.push(a.cloneNode(!0))}}return e},[]),TB)}var En=l(R(),1),o_=l(X(),1);function AK({frameSize:e,containerWidth:t,maxContainerWidth:o,scaleContainerWidth:r}){return(Math.min(t,o)-e*2)/r}function e1e(e,t){let{scaleValue:o,scrollHeight:r}=e,{frameSize:n,scaleValue:i}=t;return r*(i/o)+n*2}function t1e(e,t){let{containerHeight:o,frameSize:r,scaleValue:n,scrollTop:i}=e,{containerHeight:s,frameSize:a,scaleValue:c,scrollHeight:u}=t,d=i;d=(d+o/2-r)/n-o/2,d=(d+s/2)*c+a-s/2,d=i<=r?0:d;let f=u-s;return Math.round(Math.min(Math.max(0,d),Math.max(0,f)))}function o1e(e,t){let{scaleValue:o,frameSize:r,scrollTop:n}=e,{scaleValue:i,frameSize:s,scrollTop:a}=t;return[{translate:"0 0",scale:o,paddingTop:`${r/o}px`,paddingBottom:`${r/o}px`},{translate:`0 ${n-a}px`,scale:i,paddingTop:`${s/i}px`,paddingBottom:`${s/i}px`}]}function LK({frameSize:e,iframeDocument:t,maxContainerWidth:o=750,scale:r}){let[n,{height:i}]=(0,o_.useResizeObserver)(),[s,{width:a,height:c}]=(0,o_.useResizeObserver)(),u=(0,En.useRef)(0),d=r!==1,f=(0,o_.useReducedMotion)(),m=r==="auto-scaled",h=(0,En.useRef)(!1),p=(0,En.useRef)(null);(0,En.useEffect)(()=>{d||(u.current=a)},[a,d]);let g=Math.max(u.current,a),b=m?AK({frameSize:e,containerWidth:a,maxContainerWidth:o,scaleContainerWidth:g}):r,k=(0,En.useRef)({scaleValue:b,frameSize:e,containerHeight:0,scrollTop:0,scrollHeight:0}),v=(0,En.useRef)({scaleValue:b,frameSize:e,containerHeight:0,scrollTop:0,scrollHeight:0}),y=(0,En.useCallback)(()=>{let{scrollTop:C}=k.current,{scrollTop:B}=v.current;return t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-scroll-top",`${C}px`),t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-scroll-top-next",`${B}px`),t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-overflow-behavior",k.current.scrollHeight===k.current.containerHeight?"auto":"scroll"),t.documentElement.classList.add("zoom-out-animation"),t.documentElement.animate(o1e(k.current,v.current),{easing:"cubic-bezier(0.46, 0.03, 0.52, 0.96)",duration:400})},[t]),_=(0,En.useCallback)(()=>{h.current=!1,p.current=null,t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-scale",v.current.scaleValue),t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-frame-size",`${v.current.frameSize}px`),t.documentElement.classList.remove("zoom-out-animation"),t.documentElement.scrollTop=v.current.scrollTop,t.documentElement.style.removeProperty("--wp-block-editor-iframe-zoom-out-scroll-top"),t.documentElement.style.removeProperty("--wp-block-editor-iframe-zoom-out-scroll-top-next"),t.documentElement.style.removeProperty("--wp-block-editor-iframe-zoom-out-overflow-behavior"),k.current=v.current},[t]),S=(0,En.useRef)(!1);return(0,En.useEffect)(()=>{let C=t&&S.current!==d;if(S.current=d,!!C&&(h.current=!0,!!d))return t.documentElement.classList.add("is-zoomed-out"),()=>{t.documentElement.classList.remove("is-zoomed-out")}},[t,d]),(0,En.useEffect)(()=>{if(t&&(m&&k.current.scaleValue!==1&&(k.current.scaleValue=AK({frameSize:k.current.frameSize,containerWidth:a,maxContainerWidth:o,scaleContainerWidth:a})),b<1&&(h.current||(t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-scale",b),t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-frame-size",`${e}px`)),t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-content-height",`${i}px`),t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-inner-height",`${c}px`),t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-container-width",`${a}px`),t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-scale-container-width",`${g}px`)),h.current))if(h.current=!1,p.current){p.current.reverse();let C=k.current,B=v.current;k.current=B,v.current=C}else k.current.scrollTop=t.documentElement.scrollTop,k.current.scrollHeight=t.documentElement.scrollHeight,k.current.containerHeight=c,v.current={scaleValue:b,frameSize:e,containerHeight:t.documentElement.clientHeight},v.current.scrollHeight=e1e(k.current,v.current),v.current.scrollTop=t1e(k.current,v.current),p.current=y(),f?_():p.current.onfinish=_},[y,_,f,m,b,e,t,i,a,c,o,g]),{isZoomedOut:d,scaleContainerWidth:g,contentResizeListener:n,containerResizeListener:s}}var Ws=l(w(),1);function VK(e,t,o){let r={};for(let s in e)r[s]=e[s];if(e instanceof o.contentDocument.defaultView.MouseEvent){let s=o.getBoundingClientRect();r.clientX+=s.left,r.clientY+=s.top}let n=new t(e.type,r);r.defaultPrevented&&n.preventDefault(),!o.dispatchEvent(n)&&e.preventDefault()}function r1e(e){return(0,ql.useRefEffect)(()=>{let{defaultView:t}=e;if(!t)return;let{frameElement:o}=t,r=e.documentElement,n=["dragover","mousemove"],i={};for(let s of n)i[s]=a=>{let u=Object.getPrototypeOf(a).constructor.name,d=window[u];VK(a,d,o)},r.addEventListener(s,i[s]);return()=>{for(let s of n)r.removeEventListener(s,i[s])}})}var NK=new WeakMap,n1e=globalThis.FinalizationRegistry?new globalThis.FinalizationRegistry(e=>URL.revokeObjectURL(e)):void 0;function i1e(e){let t=NK.get(e);if(t)return t;let o=`<!doctype html> |
| 52 |
<html> |
| 53 |
<head> |
| 54 |
<meta charset="utf-8"> |
| 55 |
<base href="${window.location.href}"> |
| 56 |
<style> |
| 57 |
html{ |
| 58 |
height: auto !important; |
| 59 |
min-height: 100%; |
| 60 |
} |
| 61 |
/* Lowest specificity to not override global styles */ |
| 62 |
:where(body) { |
| 63 |
margin: 0; |
| 64 |
/* Default background color in case zoom out mode background |
| 65 |
colors the html element */ |
| 66 |
background-color: white; |
| 67 |
} |
| 68 |
</style> |
| 69 |
${e.styles??""} |
| 70 |
${e.scripts??""} |
| 71 |
</head> |
| 72 |
<body> |
| 73 |
<script>document.currentScript.parentElement.remove()<\/script> |
| 74 |
</body> |
| 75 |
</html>`;return t=URL.createObjectURL(new Blob([o],{type:"text/html"})),NK.set(e,t),n1e?.register(e,t),t}function s1e({contentRef:e,children:t,tabIndex:o=0,scale:r=1,frameSize:n=0,readonly:i,forwardedRef:s,title:a=(0,MK.__)("Editor canvas"),...c}){let{resolvedAssets:u,isPreviewMode:d}=(0,EV.useSelect)(O=>{let V=O(x).getSettings();return{resolvedAssets:V.__unstableResolvedAssets,isPreviewMode:V.isPreviewMode}},[]),[f,m]=(0,Lm.useState)(),[h,p]=(0,Lm.useState)([]),[g,b,k]=BV(),v=(0,ql.useRefEffect)(O=>{let V;function j(G){G.preventDefault()}function H(G){G.target.tagName==="A"&&G.target.getAttribute("href")?.startsWith("#")&&(G.preventDefault(),V.defaultView.location.hash=G.target.getAttribute("href").slice(1))}let{ownerDocument:z}=O;p(Array.from(z.body.classList).filter(G=>G.startsWith("admin-color-")||G.startsWith("post-type-")||G==="wp-embed-responsive"));function U(){let{contentDocument:G}=O,{documentElement:W}=G;V=G,m(G),W.classList.add("block-editor-iframe__html"),G.dir=z.dir;for(let J of OK())G.getElementById(J.id)||(G.head.appendChild(J.cloneNode(!0)),d||console.warn(`${J.id} was added to the iframe incorrectly. Please use block.json or enqueue_block_assets to add styles to the iframe.`,J));V.addEventListener("dragover",j,!1),V.addEventListener("drop",j,!1),V.addEventListener("click",H)}return O.addEventListener("load",U),()=>{m(void 0),O.removeEventListener("load",U),V?.removeEventListener("dragover",j),V?.removeEventListener("drop",j),V?.removeEventListener("click",H)}},[]),{contentResizeListener:y,containerResizeListener:_,isZoomedOut:S,scaleContainerWidth:C}=LK({scale:r,frameSize:parseInt(n),iframeDocument:f}),B=(0,ql.useDisabled)({isDisabled:!i}),T=(0,ql.useMergeRefs)([r1e(f),e,b,B]),I=(0,ql.useRefEffect)(O=>O.ownerDocument.defaultView?(T(O),()=>T(null)):()=>{},[T]),E=i1e(u),L=o>=0&&!d,P=(0,Ws.jsxs)(Ws.Fragment,{children:[L&&g,(0,Ws.jsx)("iframe",{...c,style:{...c.style,height:c.style?.height,border:0},ref:(0,ql.useMergeRefs)([s,v]),tabIndex:o,src:E,title:a,onKeyDown:O=>{if(c.onKeyDown&&c.onKeyDown(O),O.currentTarget.ownerDocument!==O.target.ownerDocument){let{stopPropagation:V}=O.nativeEvent;O.nativeEvent.stopPropagation=()=>{},O.stopPropagation(),O.nativeEvent.stopPropagation=V,VK(O,window.KeyboardEvent,O.currentTarget)}},children:f&&(0,Lm.createPortal)((0,Ws.jsxs)("body",{ref:I,className:D("block-editor-iframe__body","editor-styles-wrapper",...h),children:[y,(0,Ws.jsx)(DK.__experimentalStyleProvider,{document:f,children:t})]}),f.documentElement)}),L&&k]});return(0,Ws.jsxs)("div",{className:"block-editor-iframe__container",children:[_,(0,Ws.jsx)("div",{className:D("block-editor-iframe__scale-container",S&&"is-zoomed-out"),style:{"--wp-block-editor-iframe-zoom-out-scale-container-width":S&&`${C}px`},children:P})]})}function a1e(e,t){return(0,EV.useSelect)(r=>r(x).getSettings().__internalIsInitialized,[])?(0,Ws.jsx)(s1e,{...e,forwardedRef:t}):null}var bg=(0,Lm.forwardRef)(a1e);var Rq=l(A(),1),wg=l(R(),1),Oq=l(F(),1);var PB={attribute:/\[\s*(?:(?<namespace>\*|[-\w\P{ASCII}]*)\|)?(?<name>[-\w\P{ASCII}]+)\s*(?:(?<operator>\W?=)\s*(?<value>.+?)\s*(\s(?<caseSensitive>[iIsS]))?\s*)?\]/gu,id:/#(?<name>[-\w\P{ASCII}]+)/gu,class:/\.(?<name>[-\w\P{ASCII}]+)/gu,comma:/\s*,\s*/g,combinator:/\s*[\s>+~]\s*/g,"pseudo-element":/::(?<name>[-\w\P{ASCII}]+)(?:\((?<argument>¶*)\))?/gu,"pseudo-class":/:(?<name>[-\w\P{ASCII}]+)(?:\((?<argument>¶*)\))?/gu,universal:/(?:(?<namespace>\*|[-\w\P{ASCII}]*)\|)?\*/gu,type:/(?:(?<namespace>\*|[-\w\P{ASCII}]*)\|)?(?<name>[-\w\P{ASCII}]+)/gu},l1e=new Set(["combinator","comma"]);var c1e=e=>{switch(e){case"pseudo-element":case"pseudo-class":return new RegExp(PB[e].source.replace("(?<argument>\xB6*)","(?<argument>.*)"),"gu");default:return PB[e]}};function u1e(e,t){let o=0,r="";for(;t<e.length;t++){let n=e[t];switch(n){case"(":++o;break;case")":--o;break}if(r+=n,o===0)return r}return r}function d1e(e,t=PB){if(!e)return[];let o=[e];for(let[n,i]of Object.entries(t))for(let s=0;s<o.length;s++){let a=o[s];if(typeof a!="string")continue;i.lastIndex=0;let c=i.exec(a);if(!c)continue;let u=c.index-1,d=[],f=c[0],m=a.slice(0,u+1);m&&d.push(m),d.push({...c.groups,type:n,content:f});let h=a.slice(u+f.length+1);h&&d.push(h),o.splice(s,1,...d)}let r=0;for(let n of o)switch(typeof n){case"string":throw new Error(`Unexpected sequence ${n} found at index ${r}`);case"object":r+=n.content.length,n.pos=[r-n.content.length,r],l1e.has(n.type)&&(n.content=n.content.trim()||" ");break}return o}var f1e=/(['"])([^\\\n]+?)\1/g,m1e=/\\./g;function TV(e,t=PB){if(e=e.trim(),e==="")return[];let o=[];e=e.replace(m1e,(i,s)=>(o.push({value:i,offset:s}),"\uE000".repeat(i.length))),e=e.replace(f1e,(i,s,a,c)=>(o.push({value:i,offset:c}),`${s}${"\uE001".repeat(a.length)}${s}`));{let i=0,s;for(;(s=e.indexOf("(",i))>-1;){let a=u1e(e,s);o.push({value:a,offset:s}),e=`${e.substring(0,s)}(${"\xB6".repeat(a.length-2)})${e.substring(s+a.length)}`,i=s+a.length}}let r=d1e(e,t),n=new Set;for(let i of o.reverse())for(let s of r){let{offset:a,value:c}=i;if(!(s.pos[0]<=a&&a+c.length<=s.pos[1]))continue;let{content:u}=s,d=a-s.pos[0];s.content=u.slice(0,d)+c+u.slice(d+c.length),s.content!==u&&n.add(s)}for(let i of n){let s=c1e(i.type);if(!s)throw new Error(`Unknown token type: ${i.type}`);s.lastIndex=0;let a=s.exec(i.content);if(!a)throw new Error(`Unable to parse content for ${i.type}: ${i.content}`);Object.assign(i,a.groups)}return r}function*IB(e,t){switch(e.type){case"list":for(let o of e.list)yield*IB(o,e);break;case"complex":yield*IB(e.left,e),yield*IB(e.right,e);break;case"compound":yield*e.list.map(o=>[o,e]);break;default:yield[e,t]}}function FK(e){let t;return Array.isArray(e)?t=e:t=[...IB(e)].map(([o])=>o),t.map(o=>o.content).join("")}var Bq=l(iq(),1),Eq=l(AB(),1),Tq=l(lq(),1),Iq=l(wq(),1),Cq=new Map,Pq=[{type:"type",content:"body"},{type:"type",content:"html"},{type:"pseudo-class",content:":root"},{type:"pseudo-class",content:":where(body)"},{type:"pseudo-class",content:":where(:root)"},{type:"pseudo-class",content:":where(html)"}];function CBe(e,t){let o=TV(t),r=o.findLastIndex(({content:s,type:a})=>Pq.some(c=>s===c.content&&a===c.type)),n=-1;for(let s=r+1;s<o.length;s++)if(o[s].type==="combinator"){n=s;break}let i=TV(e);return o.splice(n===-1?o.length:n,0,{type:"combinator",content:" "},...i),FK(o)}function BBe({css:e,ignoredSelectors:t=[],baseURL:o},r="",n){if(!r&&!o)return e;try{let i=[...t,...n?.ignoredSelectors??[],r];return new Bq.default([r&&(0,Tq.default)({prefix:r,transform(s,a,c){return i.some(d=>d instanceof RegExp?a.match(d):a.includes(d))?a:Pq.some(d=>a.startsWith(d.content))?CBe(s,a):c}}),o&&(0,Iq.default)({rootUrl:o})].filter(Boolean)).process(e,{}).css}catch(i){return i instanceof Eq.default?console.warn("wp.blockEditor.transformStyles Failed to transform CSS.",i.message+` |
| 76 |
`+i.showSourceCode(!1)):console.warn("wp.blockEditor.transformStyles Failed to transform CSS.",i),null}}var EBe=(e,t="",o)=>{let r=Cq.get(t);return r||(r=new WeakMap,Cq.set(t,r)),e.map(n=>{let i=r.get(n);return i||(i=BBe(n,t,o),r.set(n,i)),i})},xg=EBe;var cd=l(w(),1);du([fu,ah]);function TBe(e,t){return(0,wg.useCallback)(o=>{if(!o)return;let{ownerDocument:r}=o,{defaultView:n,body:i}=r,s=t?r.querySelector(t):i,a;if(s)a=n?.getComputedStyle(s,null).getPropertyValue("background-color");else{let u=r.createElement("div");u.classList.add("editor-styles-wrapper"),i.appendChild(u),a=n?.getComputedStyle(u,null).getPropertyValue("background-color"),i.removeChild(u)}let c=Ot(a);c.luminance()>.5||c.alpha()===0?i.classList.remove("is-dark-theme"):i.classList.add("is-dark-theme")},[e,t])}function IBe({styles:e,scope:t,transformOptions:o}){let r=(0,Oq.useSelect)(s=>M(s(x)).getStyleOverrides(),[]),[n,i]=(0,wg.useMemo)(()=>{let s=Object.values(e??[]);for(let[a,c]of r){let u=s.findIndex(({id:f})=>a===f),d={...c,id:a};u===-1?s.push(d):s[u]=d}return[xg(s.filter(a=>a?.css),t,o),s.filter(a=>a.__unstableType==="svgs").map(a=>a.assets).join("")]},[e,r,t,o]);return(0,cd.jsxs)(cd.Fragment,{children:[(0,cd.jsx)("style",{ref:TBe(n,t)}),n.map((s,a)=>(0,cd.jsx)("style",{children:s},a)),(0,cd.jsx)(Rq.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 0 0",width:"0",height:"0",role:"none",style:{visibility:"hidden",position:"absolute",left:"-9999px",overflow:"hidden"},dangerouslySetInnerHTML:{__html:i}})]})}var Zl=(0,wg.memo)(IBe);var Zi=l(w(),1),PBe=(0,qB.memo)(Cg),c3=2e3,RBe=[];function OBe({viewportWidth:e,containerWidth:t,minHeight:o,additionalStyles:r=RBe}){e||(e=t);let[n,{height:i}]=(0,p_.useResizeObserver)(),{styles:s}=(0,Aq.useSelect)(d=>({styles:d(x).getSettings().styles}),[]),a=(0,qB.useMemo)(()=>s&&[...s,{css:"body{height:auto;overflow:hidden;border:none;padding:0;}",__unstableType:"presets"},...r],[s,r]),c=t/e,u=i?t/(i*c):0;return(0,Zi.jsx)(Lq.Disabled,{className:"block-editor-block-preview__content",style:{transform:`scale(${c})`,aspectRatio:u,maxHeight:i>c3?c3*c:void 0,minHeight:o},children:(0,Zi.jsxs)(bg,{contentRef:(0,p_.useRefEffect)(d=>{let{ownerDocument:{documentElement:f}}=d;f.classList.add("block-editor-block-preview__content-iframe"),f.style.position="absolute",f.style.width="100%",d.style.boxSizing="border-box",d.style.position="absolute",d.style.width="100%"},[]),"aria-hidden":!0,tabIndex:-1,style:{position:"absolute",width:e,height:i,pointerEvents:"none",maxHeight:c3,minHeight:c!==0&&c<1&&o?o/c:o},children:[(0,Zi.jsx)(Zl,{styles:a}),n,(0,Zi.jsx)(PBe,{renderAppender:!1})]})})}function Nq(e){let[t,{width:o}]=(0,p_.useResizeObserver)();return(0,Zi.jsxs)(Zi.Fragment,{children:[(0,Zi.jsx)("div",{style:{position:"relative",width:"100%",height:0},children:t}),(0,Zi.jsx)("div",{className:"block-editor-block-preview__container",children:!!o&&(0,Zi.jsx)(OBe,{...e,containerWidth:o})})]})}var Bg=l(R(),1),Fq=l(Dq(),1),Vq=(0,Fq.createQueue)();function zq({children:e,placeholder:t}){let[o,r]=(0,Bg.useState)(!1);return(0,Bg.useEffect)(()=>{let n={};return Vq.add(n,()=>{(0,Bg.flushSync)(()=>{r(!0)})}),()=>{Vq.cancel(n)}},[]),o?e:t}var Fm=l(w(),1),ABe=[];function LBe({blocks:e,viewportWidth:t=1200,minHeight:o,additionalStyles:r=ABe,__experimentalMinHeight:n,__experimentalPadding:i}){n&&(o=n,(0,u3.default)("The __experimentalMinHeight prop",{since:"6.2",version:"6.4",alternative:"minHeight"})),i&&(r=[...r,{css:`body { padding: ${i}px; }`}],(0,u3.default)("The __experimentalPadding prop of BlockPreview",{since:"6.2",version:"6.4",alternative:"additionalStyles"}));let s=(0,d3.useSelect)(u=>u(x).getSettings(),[]),a=(0,Vm.useMemo)(()=>({...s,focusMode:!1,isPreviewMode:!0}),[s]),c=(0,Vm.useMemo)(()=>Array.isArray(e)?e:[e],[e]);return!e||e.length===0?null:(0,Fm.jsx)(dg,{value:c,settings:a,children:(0,Fm.jsx)(Nq,{viewportWidth:t,minHeight:o,additionalStyles:r})})}var jq=(0,Vm.memo)(LBe);jq.Async=zq;var Tn=jq;function Uq({blocks:e,props:t={},layout:o}){let r=(0,d3.useSelect)(u=>u(x).getSettings(),[]),n=(0,Vm.useMemo)(()=>({...r,styles:void 0,focusMode:!1,isPreviewMode:!0}),[r]),i=(0,ZB.useDisabled)(),s=(0,ZB.useMergeRefs)([t.ref,i]),a=(0,Vm.useMemo)(()=>Array.isArray(e)?e:[e],[e]),c=(0,Fm.jsxs)(dg,{value:a,settings:n,children:[(0,Fm.jsx)(Zl,{}),(0,Fm.jsx)(h_,{renderAppender:!1,layout:o})]});return{...t,ref:s,className:D(t.className,"block-editor-block-preview__live-content","components-disabled"),children:e?.length?c:null}}var ud=l(w(),1);function NBe({item:e}){let{name:t,title:o,icon:r,description:n,initialAttributes:i,example:s}=e,a=(0,Eg.isReusableBlock)(e),c=(0,Hq.useMemo)(()=>s?(0,Eg.getBlockFromExample)(t,{attributes:{...s.attributes,...i},innerBlocks:s.innerBlocks}):(0,Eg.createBlock)(t,i),[t,s,i]),u=144,d=280,f=s?.viewportWidth??500,m=d/f,h=m!==0&&m<1&&u?u/m:u;return(0,ud.jsxs)("div",{className:"block-editor-inserter__preview-container",children:[(0,ud.jsx)("div",{className:"block-editor-inserter__preview",children:a||s?(0,ud.jsx)("div",{className:"block-editor-inserter__preview-content",children:(0,ud.jsx)(Tn,{blocks:c,viewportWidth:f,minHeight:u,additionalStyles:[{css:` |
| 77 |
body { |
| 78 |
padding: 24px; |
| 79 |
min-height:${Math.round(h)}px; |
| 80 |
display:flex; |
| 81 |
align-items:center; |
| 82 |
} |
| 83 |
.is-root-container { width: 100%; } |
| 84 |
`}]})}):(0,ud.jsx)("div",{className:"block-editor-inserter__preview-content-missing",children:(0,Gq.__)("No preview available.")})}),!a&&(0,ud.jsx)(Xy,{title:o,icon:r,description:n})]})}var Wq=NBe;var Lg=l(N(),1),Jl=l(R(),1),v3=l(X(),1);var iZ=l(K(),1),sZ=l(X(),1);var Ag=l(R(),1),dd=l(K(),1),rZ=l(A(),1),g_=l(it(),1);var Jq=l(A(),1),eZ=l(R(),1);var Tg=l(R(),1),$q=l(N(),1),Kq=l(sr(),1),Yq=l(w(),1);function MBe(e,t){let[o,r]=(0,Tg.useState)(!1);return(0,Tg.useEffect)(()=>{o&&(0,Kq.speak)((0,$q.__)("Use left and right arrow keys to move through blocks"))},[o]),(0,Yq.jsx)("div",{ref:t,role:"listbox","aria-orientation":"horizontal",onFocus:()=>{r(!0)},onBlur:n=>{!n.currentTarget.contains(n.relatedTarget)&&r(!1)},...e})}var f3=(0,Tg.forwardRef)(MBe);var qq=l(R(),1),Zq=l(A(),1),Xq=l(w(),1);function DBe(e,t){return(0,Xq.jsx)(Zq.Composite.Group,{role:"presentation",ref:t,...e})}var m3=(0,qq.forwardRef)(DBe);var QB=l(A(),1),Qq=l(R(),1),XB=l(w(),1);function VBe({isFirst:e,as:t,children:o,...r},n){return(0,XB.jsx)(QB.Composite.Item,{ref:n,role:"option",accessibleWhenDisabled:!0,...r,render:i=>{let s={...i,tabIndex:e?0:i.tabIndex};return t?(0,XB.jsx)(t,{...s,children:o}):typeof o=="function"?o(s):(0,XB.jsx)(QB.Button,{__next40pxDefaultSize:!0,...s,children:o})}})}var p3=(0,Qq.forwardRef)(VBe);var h3=l(w(),1);function FBe({key:e,children:t}){return(0,h3.jsx)(eZ.Fragment,{children:t},e)}function zBe({children:e}){return(0,h3.jsx)(Jq.Composite,{focusShift:!0,focusWrap:"horizontal",render:FBe,children:e})}var Ig=zBe;var tZ=l(A(),1),eE=l(K(),1),tE=l(F(),1),oZ=l(R(),1);var Rg=l(N(),1),Pg=l(A(),1);var Ks=l(w(),1);function JB({count:e,icon:t,isPattern:o,fadeWhenDisabled:r}){let n=o&&(0,Rg.__)("Pattern");return(0,Ks.jsx)("div",{className:"block-editor-block-draggable-chip-wrapper",children:(0,Ks.jsx)("div",{className:"block-editor-block-draggable-chip","data-testid":"block-draggable-chip",children:(0,Ks.jsxs)(Pg.Flex,{justify:"center",className:"block-editor-block-draggable-chip__content",children:[(0,Ks.jsx)(Pg.FlexItem,{children:t?(0,Ks.jsx)(Me,{icon:t}):n||(0,Rg.sprintf)((0,Rg._n)("%d block","%d blocks",e),e)}),(0,Ks.jsx)(Pg.FlexItem,{children:(0,Ks.jsx)(Me,{icon:Bk})}),r&&(0,Ks.jsx)(Pg.FlexItem,{className:"block-editor-block-draggable-chip__disabled",children:(0,Ks.jsx)("span",{className:"block-editor-block-draggable-chip__disabled-icon"})})]})})})}var g3=l(w(),1),jBe=({isEnabled:e,blocks:t,icon:o,children:r,pattern:n})=>{let i=t.length===1?t[0].name:void 0,s=(0,tE.useSelect)(f=>i&&f(eE.store).getBlockType(i)?.icon,[i]),{startDragging:a,stopDragging:c}=M((0,tE.useDispatch)(x)),u=(0,oZ.useMemo)(()=>n?.type===Gt.user&&n?.syncStatus!=="unsynced"?[(0,eE.createBlock)("core/block",{ref:n.id})]:void 0,[n?.type,n?.syncStatus,n?.id]);if(!e)return r({draggable:!1,onDragStart:void 0,onDragEnd:void 0});let d=u??t;return(0,g3.jsx)(tZ.Draggable,{__experimentalTransferDataType:"wp-blocks",transferData:{type:"inserter",blocks:d},onDragStart:f=>{a();let m=new Set;for(let h of d){let p=`wp-block:${h.name}`;m.has(p)||(f.dataTransfer.items.add("",p),m.add(p))}},onDragEnd:()=>{c()},__experimentalDragComponent:(0,g3.jsx)(JB,{count:t.length,icon:o||!n&&s,isPattern:!!n}),children:({onDraggableStart:f,onDraggableEnd:m})=>r({draggable:!0,onDragStart:f,onDragEnd:m})})},Og=jBe;var Xl=l(w(),1);function UBe({className:e,isFirst:t,item:o,onSelect:r,onHover:n,isDraggable:i,...s}){let a=(0,Ag.useRef)(!1),c=o.icon?{backgroundColor:o.icon.background,color:o.icon.foreground}:{},u=(0,Ag.useMemo)(()=>[(0,dd.createBlock)(o.name,o.initialAttributes,(0,dd.createBlocksFromInnerBlocksTemplate)(o.innerBlocks))],[o.name,o.initialAttributes,o.innerBlocks]),d=(0,dd.isReusableBlock)(o)&&o.syncStatus!=="unsynced"||(0,dd.isTemplatePart)(o);return(0,Xl.jsx)(Og,{isEnabled:i&&!o.isDisabled,blocks:u,icon:o.icon,children:({draggable:f,onDragStart:m,onDragEnd:h})=>(0,Xl.jsx)("div",{className:D("block-editor-block-types-list__list-item",{"is-synced":d}),draggable:f,onDragStart:p=>{a.current=!0,m&&(n(null),m(p))},onDragEnd:p=>{a.current=!1,h&&h(p)},children:(0,Xl.jsxs)(p3,{isFirst:t,className:D("block-editor-block-types-list__item",e),disabled:o.isDisabled,onClick:p=>{p.preventDefault(),r(o,(0,g_.isAppleOS)()?p.metaKey:p.ctrlKey),n(null)},onKeyDown:p=>{let{keyCode:g}=p;g===g_.ENTER&&(p.preventDefault(),r(o,(0,g_.isAppleOS)()?p.metaKey:p.ctrlKey),n(null))},onMouseEnter:()=>{a.current||n(o)},onMouseLeave:()=>n(null),...s,children:[(0,Xl.jsx)("span",{className:"block-editor-block-types-list__item-icon",style:c,children:(0,Xl.jsx)(Me,{icon:o.icon,showColors:!0})}),(0,Xl.jsx)("span",{className:"block-editor-block-types-list__item-title",children:(0,Xl.jsx)(rZ.__experimentalTruncate,{numberOfLines:3,children:o.title})})]})})})}var nZ=(0,Ag.memo)(UBe);var b_=l(w(),1);function HBe(e,t){let o=[];for(let r=0,n=e.length;r<n;r+=t)o.push(e.slice(r,r+t));return o}function aZ({items:e=[],onSelect:t,onHover:o=()=>{},children:r,label:n,isDraggable:i=!0}){let s="block-editor-block-types-list",a=(0,sZ.useInstanceId)(aZ,s);return(0,b_.jsxs)(f3,{className:s,"aria-label":n,children:[HBe(e,3).map((c,u)=>(0,b_.jsx)(m3,{children:c.map((d,f)=>(0,b_.jsx)(nZ,{item:d,className:(0,iZ.getBlockMenuDefaultClassName)(d.id),onSelect:t,onHover:o,isDraggable:i&&!d.isDisabled,isFirst:u===0&&f===0,rowId:`${a}-${u}`},d.id))},u)),r]})}var zm=aZ;var lZ=l(A(),1),Ql=l(w(),1);function GBe({title:e,icon:t,children:o}){return(0,Ql.jsxs)(Ql.Fragment,{children:[(0,Ql.jsxs)("div",{className:"block-editor-inserter__panel-header",children:[(0,Ql.jsx)("h2",{className:"block-editor-inserter__panel-title",children:e}),(0,Ql.jsx)(lZ.Icon,{icon:t})]}),(0,Ql.jsx)("div",{className:"block-editor-inserter__panel-content",children:o})]})}var fd=GBe;var cZ=l(N(),1),b3=l(w(),1);function WBe(){return(0,b3.jsx)("div",{className:"block-editor-inserter__no-results",children:(0,b3.jsx)("p",{children:(0,cZ.__)("No results found.")})})}var Ys=WBe;var qo=l(w(),1),$Be=e=>e.name.split("/")[0],KBe=6,YBe=[];function uZ({items:e,collections:t,categories:o,onSelectItem:r,onHover:n,showMostUsedBlocks:i,className:s}){let a=(0,Jl.useMemo)(()=>Ea(e,"frecency","desc").slice(0,KBe),[e]),c=(0,Jl.useMemo)(()=>e.filter(p=>!p.category),[e]),u=(0,Jl.useMemo)(()=>{let p={...t};return Object.keys(t).forEach(g=>{p[g]=e.filter(b=>$Be(b)===g),p[g].length===0&&delete p[g]}),p},[e,t]);(0,Jl.useEffect)(()=>()=>n(null),[]);let d=(0,v3.useAsyncList)(o),f=o.length===d.length,m=(0,Jl.useMemo)(()=>Object.entries(t),[t]),h=(0,v3.useAsyncList)(f?m:YBe);return(0,qo.jsxs)("div",{className:s,children:[i&&e.length>3&&!!a.length&&(0,qo.jsx)(fd,{title:(0,Lg._x)("Most used","blocks"),children:(0,qo.jsx)(zm,{items:a,onSelect:r,onHover:n,label:(0,Lg._x)("Most used","blocks")})}),d.map(p=>{let g=e.filter(b=>b.category===p.slug);return!g||!g.length?null:(0,qo.jsx)(fd,{title:p.title,icon:p.icon,children:(0,qo.jsx)(zm,{items:g,onSelect:r,onHover:n,label:p.title})},p.slug)}),f&&c.length>0&&(0,qo.jsx)(fd,{className:"block-editor-inserter__uncategorized-blocks-panel",title:(0,Lg.__)("Uncategorized"),children:(0,qo.jsx)(zm,{items:c,onSelect:r,onHover:n,label:(0,Lg.__)("Uncategorized")})}),h.map(([p,g])=>{let b=u[p];return!b||!b.length?null:(0,qo.jsx)(fd,{title:g.title,icon:g.icon,children:(0,qo.jsx)(zm,{items:b,onSelect:r,onHover:n,label:g.title})},p)})]})}function qBe({rootClientId:e,onInsert:t,onHover:o,showMostUsedBlocks:r},n){let[i,s,a,c]=Mu(e,t);if(!i.length)return(0,qo.jsx)(Ys,{});let u=[],d=[];for(let f of i)f.category!=="reusable"&&(f.isSearchOnly||(f.isAllowedInCurrentRoot?u.push(f):d.push(f)));return(0,qo.jsx)(Ig,{children:(0,qo.jsxs)("div",{ref:n,children:[!!u.length&&(0,qo.jsx)(qo.Fragment,{children:(0,qo.jsx)(uZ,{items:u,categories:s,collections:a,onSelectItem:c,onHover:o,showMostUsedBlocks:r,className:"block-editor-inserter__insertable-blocks-at-selection"})}),(0,qo.jsx)(uZ,{items:d,categories:s,collections:a,onSelectItem:c,onHover:o,showMostUsedBlocks:r,className:"block-editor-inserter__all-blocks"})]})})}var dZ=(0,Jl.forwardRef)(qBe);var OZ=l(R(),1),AZ=l(X(),1),LZ=l(A(),1),NZ=l(N(),1);var BZ=l(A(),1),w3=l(R(),1),EZ=l(N(),1);var oE=l(A(),1),k3=l(N(),1),ec=l(w(),1);function ZBe({selectedCategory:e,patternCategories:t,onClickCategory:o}){let r="block-editor-block-patterns-explorer__sidebar";return(0,ec.jsx)("div",{className:`${r}__categories-list`,children:t.map(({name:n,label:i})=>(0,ec.jsx)(oE.Button,{__next40pxDefaultSize:!0,label:i,className:`${r}__categories-list__item`,isPressed:e===n,onClick:()=>{o(n)},children:i},n))})}function XBe({searchValue:e,setSearchValue:t}){return(0,ec.jsx)("div",{className:"block-editor-block-patterns-explorer__search",children:(0,ec.jsx)(oE.SearchControl,{onChange:t,value:e,label:(0,k3.__)("Search"),placeholder:(0,k3.__)("Search")})})}function QBe({selectedCategory:e,patternCategories:t,onClickCategory:o,searchValue:r,setSearchValue:n}){return(0,ec.jsxs)("div",{className:"block-editor-block-patterns-explorer__sidebar",children:[(0,ec.jsx)(XBe,{searchValue:r,setSearchValue:n}),!r&&(0,ec.jsx)(ZBe,{selectedCategory:e,patternCategories:t,onClickCategory:o})]})}var fZ=QBe;var tc=l(R(),1),Vg=l(N(),1),_Z=l(X(),1),SZ=l(A(),1),xZ=l(sr(),1);var mZ=l(K(),1),za=l(R(),1),jm=l(A(),1);var pZ=l(X(),1),hZ=l(N(),1);var In=l(A(),1),Xi=l(N(),1),Mr=l(w(),1);function rE({currentPage:e,numPages:t,changePage:o,totalItems:r}){return(0,Mr.jsxs)(In.__experimentalVStack,{className:"block-editor-patterns__grid-pagination-wrapper",children:[(0,Mr.jsx)(In.__experimentalText,{variant:"muted",children:(0,Xi.sprintf)((0,Xi._n)("%s item","%s items",r),r)}),t>1&&(0,Mr.jsxs)(In.__experimentalHStack,{expanded:!1,spacing:3,justify:"flex-start",className:"block-editor-patterns__grid-pagination",children:[(0,Mr.jsxs)(In.__experimentalHStack,{expanded:!1,spacing:1,className:"block-editor-patterns__grid-pagination-previous",children:[(0,Mr.jsx)(In.Button,{variant:"tertiary",onClick:()=>o(1),disabled:e===1,"aria-label":(0,Xi.__)("First page"),size:"compact",accessibleWhenDisabled:!0,className:"block-editor-patterns__grid-pagination-button",children:(0,Mr.jsx)("span",{children:"\xAB"})}),(0,Mr.jsx)(In.Button,{variant:"tertiary",onClick:()=>o(e-1),disabled:e===1,"aria-label":(0,Xi.__)("Previous page"),size:"compact",accessibleWhenDisabled:!0,className:"block-editor-patterns__grid-pagination-button",children:(0,Mr.jsx)("span",{children:"\u2039"})})]}),(0,Mr.jsx)(In.__experimentalText,{variant:"muted",children:(0,Xi.sprintf)((0,Xi._x)("%1$s of %2$s","paging"),e,t)}),(0,Mr.jsxs)(In.__experimentalHStack,{expanded:!1,spacing:1,className:"block-editor-patterns__grid-pagination-next",children:[(0,Mr.jsx)(In.Button,{variant:"tertiary",onClick:()=>o(e+1),disabled:e===t,"aria-label":(0,Xi.__)("Next page"),size:"compact",accessibleWhenDisabled:!0,className:"block-editor-patterns__grid-pagination-button",children:(0,Mr.jsx)("span",{children:"\u203A"})}),(0,Mr.jsx)(In.Button,{variant:"tertiary",onClick:()=>o(t),disabled:e===t,"aria-label":(0,Xi.__)("Last page"),size:"compact",accessibleWhenDisabled:!0,className:"block-editor-patterns__grid-pagination-button",children:(0,Mr.jsx)("span",{children:"\xBB"})})]})]})]})}var to=l(w(),1),JBe=({showTooltip:e,title:t,children:o})=>e?(0,to.jsx)(jm.Tooltip,{text:t,children:o}):(0,to.jsx)(to.Fragment,{children:o});function gZ({id:e,isDraggable:t,pattern:o,onClick:r,onHover:n,showTitlesAsTooltip:i,category:s,isSelected:a}){let[c,u]=(0,za.useState)(!1),{blocks:d,viewportWidth:f}=o,h=`block-editor-block-patterns-list__item-description-${(0,pZ.useInstanceId)(gZ)}`,p=o.type===Gt.user,g=(0,za.useMemo)(()=>!s||!t?d:(d??[]).map(b=>{let k=(0,mZ.cloneBlock)(b);return k.attributes.metadata?.categories?.includes(s)&&(k.attributes.metadata.categories=[s]),k}),[d,t,s]);return(0,to.jsx)(Og,{isEnabled:t,blocks:g,pattern:o,children:({draggable:b,onDragStart:k,onDragEnd:v})=>(0,to.jsx)("div",{className:"block-editor-block-patterns-list__list-item",draggable:b,onDragStart:y=>{u(!0),k&&(n?.(null),k(y))},onDragEnd:y=>{u(!1),v&&v(y)},children:(0,to.jsx)(JBe,{showTooltip:i&&!p,title:o.title,children:(0,to.jsxs)(jm.Composite.Item,{render:(0,to.jsx)("div",{role:"option","aria-label":o.title,"aria-describedby":o.description?h:void 0,className:D("block-editor-block-patterns-list__item",{"block-editor-block-patterns-list__list-item-synced":o.type===Gt.user&&!o.syncStatus,"is-selected":a})}),id:e,onClick:()=>{r(o,d),n?.(null)},onMouseEnter:()=>{c||n?.(o)},onMouseLeave:()=>n?.(null),children:[(0,to.jsx)(Tn.Async,{placeholder:(0,to.jsx)(eEe,{}),children:(0,to.jsx)(Tn,{blocks:d,viewportWidth:f})}),(!i||p)&&(0,to.jsxs)(jm.__experimentalHStack,{className:"block-editor-patterns__pattern-details",spacing:2,children:[p&&!o.syncStatus&&(0,to.jsx)("div",{className:"block-editor-patterns__pattern-icon-wrapper",children:(0,to.jsx)(Ie,{className:"block-editor-patterns__pattern-icon",icon:Di})}),(0,to.jsx)("div",{className:"block-editor-block-patterns-list__item-title",children:o.title})]}),!!o.description&&(0,to.jsx)(We,{id:h,children:o.description})]})})})})}function eEe(){return(0,to.jsx)("div",{className:"block-editor-block-patterns-list__item is-placeholder"})}function tEe({isDraggable:e,blockPatterns:t,onHover:o,onClickPattern:r,orientation:n,label:i=(0,hZ.__)("Block patterns"),category:s,showTitlesAsTooltip:a,pagingProps:c},u){let[d,f]=(0,za.useState)(void 0),[m,h]=(0,za.useState)(null);(0,za.useEffect)(()=>{let g=t[0]?.name;f(g)},[t]);let p=(g,b)=>{h(g.name),r(g,b)};return(0,to.jsxs)(jm.Composite,{orientation:n,activeId:d,setActiveId:f,role:"listbox",className:"block-editor-block-patterns-list","aria-label":i,ref:u,children:[t.map(g=>(0,to.jsx)(gZ,{id:g.name,pattern:g,onClick:p,onHover:o,isDraggable:e,showTitlesAsTooltip:a,category:s,isSelected:!!m&&m===g.name},g.name)),c&&(0,to.jsx)(rE,{...c})]})}var ja=(0,za.forwardRef)(tEe);var Um=l(F(),1),vZ=l(K(),1),nE=l(N(),1),kZ=l(sr(),1),y3=l(R(),1);function bZ({destinationRootClientId:e,destinationIndex:t,rootClientId:o,registry:r}){if(o===e)return t;let n=["",...r.select(x).getBlockParents(e),e],i=n.indexOf(o);return i!==-1?r.select(x).getBlockIndex(n[i+1])+1:r.select(x).getBlockOrder(o).length}function oEe({rootClientId:e="",insertionIndex:t,clientId:o,isAppender:r,onSelect:n,shouldFocusBlock:i=!0,selectBlockOnInsert:s=!0}){let a=(0,Um.useRegistry)(),{getSelectedBlock:c,getClosestAllowedInsertionPoint:u,isBlockInsertionPointVisible:d}=M((0,Um.useSelect)(x)),{destinationRootClientId:f,destinationIndex:m}=(0,Um.useSelect)(_=>{let{getSelectedBlockClientId:S,getBlockRootClientId:C,getBlockIndex:B,getBlockOrder:T,getInsertionPoint:I}=M(_(x)),E=S(),L=e,P,O=I();return t!==void 0?P=t:O&&O.hasOwnProperty("index")?(L=O?.rootClientId?O.rootClientId:e,P=O.index):o?P=B(o):!r&&E?(L=C(E),P=B(E)+1):P=T(L).length,{destinationRootClientId:L,destinationIndex:P}},[e,t,o,r]),{replaceBlocks:h,insertBlocks:p,showInsertionPoint:g,hideInsertionPoint:b,setLastFocus:k}=M((0,Um.useDispatch)(x)),v=(0,y3.useCallback)((_,S,C=!1,B)=>{(C||i||s)&&k(null);let T=c();!r&&T&&(0,vZ.isUnmodifiedDefaultBlock)(T,"content")?h(T.clientId,_,null,i||C?0:null,S):p(_,r||B===void 0?m:bZ({destinationRootClientId:f,destinationIndex:m,rootClientId:B,registry:a}),r||B===void 0?f:B,s,i||C?0:null,S);let I=Array.isArray(_)?_.length:1,E=(0,nE.sprintf)((0,nE._n)("%d block added.","%d blocks added.",I),I);(0,kZ.speak)(E),n&&n(_)},[r,c,h,p,f,m,n,i,s,k,a]),y=(0,y3.useCallback)(_=>{if(_&&!d()){let S=u(_.name,f);S!==null&&g(S,bZ({destinationRootClientId:f,destinationIndex:m,rootClientId:S,registry:a}))}else b()},[u,d,g,b,f,m,a]);return[f,v,y]}var md=oEe;var Ng=l(R(),1),iE=l(K(),1),Mg=l(F(),1),sE=l(N(),1),yZ=l(Xn(),1);var rEe=(e,t,o,r)=>{let n=(0,Ng.useMemo)(()=>({[Iu]:!!r}),[r]),i=(0,Mg.useSelect)(p=>{let{getSettings:g}=M(p(x));return g()[rx]??!1},[]),{patternCategories:s,patterns:a,userPatternCategories:c}=(0,Mg.useSelect)(p=>{let{getSettings:g,__experimentalGetAllowedPatterns:b}=M(p(x)),{__experimentalUserPatternCategories:k,__experimentalBlockPatternCategories:v}=g();return{patterns:b(t,n),userPatternCategories:k,patternCategories:v}},[t,n]),u=(0,Ng.useMemo)(()=>a.filter(p=>!(p.categories?.includes("navigation")&&!i)),[a,i]),{getClosestAllowedInsertionPointForPattern:d}=M((0,Mg.useSelect)(x)),f=(0,Ng.useMemo)(()=>{let p=[...s];return c?.forEach(g=>{p.find(b=>b.name===g.name)||p.push(g)}),p},[s,c]),{createSuccessNotice:m}=(0,Mg.useDispatch)(yZ.store),h=(0,Ng.useCallback)((p,g)=>{let b=r?t:d(p,t);if(b===null)return;let k=p.type===Gt.user&&p.syncStatus!=="unsynced"?[(0,iE.createBlock)("core/block",{ref:p.id})]:g;e((k??[]).map(v=>{let y=(0,iE.cloneBlock)(v);return y.attributes.metadata?.categories?.includes(o)&&(y.attributes.metadata.categories=[o]),y}),p.name,!1,b),m((0,sE.sprintf)((0,sE.__)('Block pattern "%s" inserted.'),p.title),{type:"snackbar",id:"inserter-notice"})},[m,e,o,t,d,r]);return[u,f,h]},pd=rEe;var Dg=l(R(),1),_3=l(X(),1),S3=l(Fe(),1),aE=20;function lE(e,t,o,r=""){let[n,i]=(0,Dg.useState)(1),s=(0,_3.usePrevious)(t),a=(0,_3.usePrevious)(r);(s!==t||a!==r)&&n!==1&&i(1);let c=e.length,u=n-1,d=(0,Dg.useMemo)(()=>e.slice(u*aE,u*aE+aE),[u,e]),f=Math.ceil(e.length/aE),m=h=>{(0,S3.getScrollContainer)(o?.current)?.scrollTo(0,0),i(h)};return(0,Dg.useEffect)(function(){(0,S3.getScrollContainer)(o?.current)?.scrollTo(0,0)},[t,o]),{totalItems:c,categoryPatterns:d,numPages:f,changePage:m,currentPage:n}}var qs=l(w(),1);function nEe({filterValue:e,filteredBlockPatternsLength:t}){return e?(0,qs.jsx)(SZ.__experimentalHeading,{level:2,lineHeight:"48px",className:"block-editor-block-patterns-explorer__search-results-count",children:(0,Vg.sprintf)((0,Vg._n)("%d pattern found","%d patterns found",t),t)}):null}function iEe({searchValue:e,selectedCategory:t,patternCategories:o,rootClientId:r,onModalClose:n}){let i=(0,tc.useRef)(),s=(0,_Z.useDebounce)(xZ.speak,500),[a,c]=md({rootClientId:r,shouldFocusBlock:!0}),[u,,d]=pd(c,a,t),f=(0,tc.useMemo)(()=>o.map(k=>k.name),[o]),m=(0,tc.useMemo)(()=>{let k=u.filter(v=>{if(t===fm.name||t===Al.name&&v.type===Gt.user||t===Sh.name&&v.blockTypes?.includes("core/post-content"))return!0;if(t==="uncategorized"){let y=v.categories?.some(_=>f.includes(_))??!1;return!v.categories?.length||!y}return v.categories?.includes(t)});return e?dy(k,e):k},[e,u,t,f]);(0,tc.useEffect)(()=>{if(!e)return;let k=m.length,v=(0,Vg.sprintf)((0,Vg._n)("%d result found.","%d results found.",k),k);s(v)},[e,s,m.length]);let h=lE(m,t,i),[p,g]=(0,tc.useState)(e);e!==p&&(g(e),h.changePage(1));let b=!!m?.length;return(0,qs.jsxs)("div",{className:"block-editor-block-patterns-explorer__list",ref:i,children:[(0,qs.jsx)(nEe,{filterValue:e,filteredBlockPatternsLength:m.length}),(0,qs.jsx)(Ig,{children:b&&(0,qs.jsxs)(qs.Fragment,{children:[(0,qs.jsx)(ja,{blockPatterns:h.categoryPatterns,onClickPattern:(k,v)=>{d(k,v),n()},isDraggable:!1}),(0,qs.jsx)(rE,{...h})]})})]})}var wZ=iEe;var x3=l(R(),1),Fg=l(N(),1),CZ=l(sr(),1);function sEe(e,t){return!e.categories||!e.categories.length?!1:e.categories.some(o=>t.some(r=>r.name===o))}function zg(e,t="all"){let[o,r]=pd(void 0,e),n=(0,x3.useMemo)(()=>t==="all"?o:o.filter(s=>!sC(s,t)),[t,o]);return(0,x3.useMemo)(()=>{let s=r.filter(a=>n.some(c=>c.categories?.includes(a.name))).sort((a,c)=>a.label.localeCompare(c.label));return n.some(a=>!sEe(a,r))&&!s.find(a=>a.name==="uncategorized")&&s.push({name:"uncategorized",label:(0,Fg._x)("Uncategorized")}),n.some(a=>a.blockTypes?.includes("core/post-content"))&&s.unshift(Sh),n.some(a=>a.type===Gt.user)&&s.unshift(Al),n.length>0&&s.unshift({name:fm.name,label:fm.label}),(0,CZ.speak)((0,Fg.sprintf)((0,Fg._n)("%d category button displayed.","%d category buttons displayed.",s.length),s.length)),s},[r,n])}var Hm=l(w(),1);function aEe({initialCategory:e,rootClientId:t,onModalClose:o}){let[r,n]=(0,w3.useState)(""),[i,s]=(0,w3.useState)(e?.name),a=zg(t);return(0,Hm.jsxs)("div",{className:"block-editor-block-patterns-explorer",children:[(0,Hm.jsx)(fZ,{selectedCategory:i,patternCategories:a,onClickCategory:s,searchValue:r,setSearchValue:n}),(0,Hm.jsx)(wZ,{searchValue:r,selectedCategory:i,patternCategories:a,rootClientId:t,onModalClose:o})]})}function lEe({onModalClose:e,...t}){return(0,Hm.jsx)(BZ.Modal,{title:(0,EZ.__)("Patterns"),onRequestClose:e,isFullScreen:!0,children:(0,Hm.jsx)(aEe,{onModalClose:e,...t})})}var TZ=lEe;var jg=l(N(),1),$t=l(A(),1);var lr=l(w(),1);function cEe({title:e}){return(0,lr.jsx)($t.__experimentalVStack,{spacing:0,children:(0,lr.jsx)($t.__experimentalView,{children:(0,lr.jsx)($t.__experimentalSpacer,{marginBottom:0,paddingX:4,paddingY:3,children:(0,lr.jsxs)($t.__experimentalHStack,{spacing:2,children:[(0,lr.jsx)($t.Navigator.BackButton,{style:{minWidth:24,padding:0},icon:(0,jg.isRTL)()?Ko:Yr,size:"small",label:(0,jg.__)("Back")}),(0,lr.jsx)($t.__experimentalSpacer,{children:(0,lr.jsx)($t.__experimentalHeading,{level:5,children:e})})]})})})})}function cE({categories:e,children:t}){return(0,lr.jsxs)($t.Navigator,{initialPath:"/",className:"block-editor-inserter__mobile-tab-navigation",children:[(0,lr.jsx)($t.Navigator.Screen,{path:"/",children:(0,lr.jsx)($t.__experimentalItemGroup,{children:e.map(o=>(0,lr.jsx)($t.Navigator.Button,{path:`/category/${o.name}`,as:$t.__experimentalItem,isAction:!0,children:(0,lr.jsxs)($t.__experimentalHStack,{children:[(0,lr.jsx)($t.FlexBlock,{children:o.label}),(0,lr.jsx)(Ie,{icon:(0,jg.isRTL)()?Yr:Ko})]})},o.name))})}),e.map(o=>(0,lr.jsxs)($t.Navigator.Screen,{path:`/category/${o.name}`,children:[(0,lr.jsx)(cEe,{title:(0,jg.__)("Back")}),t(o)]},o.name))]})}var Qi=l(R(),1),C3=l(N(),1),Zs=l(A(),1);var Rn=l(A(),1),Pn=l(N(),1);var uE=l(R(),1);var Cr=l(w(),1),IZ=e=>e!=="all"&&e!=="user",uEe=e=>e.name===Al.name,dEe=[{value:"all",label:(0,Pn._x)("All","patterns")},{value:Gt.directory,label:(0,Pn.__)("Pattern Directory")},{value:Gt.theme,label:(0,Pn.__)("Theme & Plugins")},{value:Gt.user,label:(0,Pn.__)("User")}];function PZ({setPatternSyncFilter:e,setPatternSourceFilter:t,patternSyncFilter:o,patternSourceFilter:r,scrollContainerRef:n,category:i}){let s=i.name===Al.name?Gt.user:r,a=IZ(s),c=uEe(i),u=(0,uE.useMemo)(()=>[{value:"all",label:(0,Pn._x)("All","patterns")},{value:Jk.full,label:(0,Pn._x)("Synced","patterns"),disabled:a},{value:Jk.unsynced,label:(0,Pn._x)("Not synced","patterns"),disabled:a}],[a]);function d(f){t(f),IZ(f)&&e("all")}return(0,Cr.jsx)(Cr.Fragment,{children:(0,Cr.jsx)(Rn.DropdownMenu,{popoverProps:{placement:"right-end"},label:(0,Pn.__)("Filter patterns"),toggleProps:{size:"compact"},icon:(0,Cr.jsx)(Ie,{icon:(0,Cr.jsx)(Rn.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,Cr.jsx)(Rn.Path,{d:"M10 17.5H14V16H10V17.5ZM6 6V7.5H18V6H6ZM8 12.5H16V11H8V12.5Z",fill:"currentColor"})})}),children:()=>(0,Cr.jsxs)(Cr.Fragment,{children:[!c&&(0,Cr.jsx)(Rn.MenuGroup,{label:(0,Pn.__)("Source"),children:(0,Cr.jsx)(Rn.MenuItemsChoice,{choices:dEe,onSelect:f=>{d(f),n.current?.scrollTo(0,0)},value:s})}),(0,Cr.jsx)(Rn.MenuGroup,{label:(0,Pn.__)("Type"),children:(0,Cr.jsx)(Rn.MenuItemsChoice,{choices:u,onSelect:f=>{e(f),n.current?.scrollTo(0,0)},value:o})}),(0,Cr.jsx)("div",{className:"block-editor-inserter__patterns-filter-help",children:(0,uE.createInterpolateElement)((0,Pn.__)("Patterns are available from the <Link>WordPress.org Pattern Directory</Link>, bundled in the active theme, or created by users on this site. Only patterns created on this site can be synced."),{Link:(0,Cr.jsx)(Rn.ExternalLink,{href:(0,Pn.__)("https://wordpress.org/patterns/")})})})]})})})}var on=l(w(),1),fEe=()=>{};function dE({rootClientId:e,onInsert:t,onHover:o=fEe,category:r,showTitlesAsTooltip:n}){let[i,,s]=pd(t,e,r?.name),[a,c]=(0,Qi.useState)("all"),[u,d]=(0,Qi.useState)("all"),f=zg(e,u),m=(0,Qi.useRef)(),h=(0,Qi.useMemo)(()=>i.filter(v=>sC(v,u,a)?!1:r.name===fm.name||r.name===Al.name&&v.type===Gt.user||r.name===Sh.name&&v.blockTypes?.includes("core/post-content")?!0:r.name==="uncategorized"?v.categories?!v.categories.some(y=>f.some(_=>_.name===y)):!0:v.categories?.includes(r.name)),[i,f,r.name,u,a]),p=lE(h,r,m),{changePage:g}=p;(0,Qi.useEffect)(()=>()=>o(null),[]);let b=(0,Qi.useCallback)(v=>{c(v),g(1)},[c,g]),k=(0,Qi.useCallback)(v=>{d(v),g(1)},[d,g]);return(0,on.jsxs)(on.Fragment,{children:[(0,on.jsxs)(Zs.__experimentalVStack,{spacing:2,className:"block-editor-inserter__patterns-category-panel-header",children:[(0,on.jsxs)(Zs.__experimentalHStack,{children:[(0,on.jsx)(Zs.FlexBlock,{children:(0,on.jsx)(Zs.__experimentalHeading,{className:"block-editor-inserter__patterns-category-panel-title",size:13,level:4,as:"div",children:r.label})}),(0,on.jsx)(PZ,{patternSyncFilter:a,patternSourceFilter:u,setPatternSyncFilter:b,setPatternSourceFilter:k,scrollContainerRef:m,category:r})]}),!h.length&&(0,on.jsx)(Zs.__experimentalText,{variant:"muted",className:"block-editor-inserter__patterns-category-no-results",children:(0,C3.__)("No results found")})]}),h.length>0&&(0,on.jsxs)(on.Fragment,{children:[(0,on.jsx)(Zs.__experimentalText,{size:"12",as:"p",className:"block-editor-inserter__help-text",children:(0,C3.__)("Drag and drop patterns into the canvas.")}),(0,on.jsx)(ja,{ref:m,blockPatterns:p.categoryPatterns,onClickPattern:s,onHover:o,label:r.label,orientation:"vertical",category:r.name,isDraggable:!0,showTitlesAsTooltip:n,patternFilter:u,pagingProps:p})]})]})}var mE=l(X(),1),pE=l(A(),1),RZ=l(R(),1);var Gm=l(w(),1),{Tabs:fE}=M(pE.privateApis);function mEe({categories:e,selectedCategory:t,onSelectCategory:o,children:r}){let s={type:"tween",duration:(0,mE.useReducedMotion)()?0:.25,ease:[.6,0,.4,1]},a=(0,mE.usePrevious)(t),c=t?t.name:null,[u,d]=(0,RZ.useState)(),f=e?.[0]?.name;return c===null&&!u&&f&&d(f),(0,Gm.jsxs)(fE,{selectOnMove:!1,selectedTabId:c,orientation:"vertical",onSelect:m=>{o(e.find(h=>h.name===m))},activeTabId:u,onActiveTabIdChange:d,children:[(0,Gm.jsx)(fE.TabList,{className:"block-editor-inserter__category-tablist",children:e.map(m=>(0,Gm.jsx)(fE.Tab,{tabId:m.name,"aria-current":m===t?"true":void 0,children:m.label},m.name))}),e.map(m=>(0,Gm.jsx)(fE.TabPanel,{tabId:m.name,focusable:!1,children:(0,Gm.jsx)(pE.__unstableMotion.div,{className:"block-editor-inserter__category-panel",initial:a?"open":"closed",animate:"open",variants:{open:{transform:"translateX( 0 )",transitionEnd:{zIndex:"1"}},closed:{transform:"translateX( -100% )",zIndex:"-1"}},transition:s,children:r})},m.name))]})}var hE=mEe;var ri=l(w(),1);function pEe({onSelectCategory:e,selectedCategory:t,onInsert:o,rootClientId:r,children:n}){let[i,s]=(0,OZ.useState)(!1),a=zg(r),c=(0,AZ.useViewportMatch)("medium","<");return a.length?(0,ri.jsxs)(ri.Fragment,{children:[!c&&(0,ri.jsxs)("div",{className:"block-editor-inserter__block-patterns-tabs-container",children:[(0,ri.jsx)(hE,{categories:a,selectedCategory:t,onSelectCategory:e,children:n}),(0,ri.jsx)(LZ.Button,{__next40pxDefaultSize:!0,className:"block-editor-inserter__patterns-explore-button",onClick:()=>s(!0),variant:"secondary",children:(0,NZ.__)("Explore all patterns")})]}),c&&(0,ri.jsx)(cE,{categories:a,children:u=>(0,ri.jsx)("div",{className:"block-editor-inserter__category-panel",children:(0,ri.jsx)(dE,{onInsert:o,rootClientId:r,category:u},u.name)})}),i&&(0,ri.jsx)(TZ,{initialCategory:t||a[0],patternCategories:a,onModalClose:()=>s(!1),rootClientId:r})]}):(0,ri.jsx)(Ys,{})}var MZ=pEe;var JZ=l(N(),1),eX=l(X(),1),tX=l(A(),1),vE=l(R(),1);var bE=l(A(),1),qZ=l(N(),1),ZZ=l(X(),1);var GZ=l(A(),1),WZ=l(N(),1);var Kt=l(A(),1),ni=l(N(),1),Ua=l(R(),1),E3=l(K(),1);var v_=l(F(),1),zZ=l(Xn(),1),jZ=l(B3(),1),UZ=l(qn(),1);var VZ=l(K(),1),FZ=l(w(),1),hEe={image:"img",video:"video",audio:"audio"};function gE(e,t){let o={id:e.id||void 0,caption:e.caption||void 0},r=e.url,n=e.alt||void 0;t==="image"?(o.url=r,o.alt=n):["video","audio"].includes(t)&&(o.src=r);let i=hEe[t],s=(0,FZ.jsx)(i,{src:e.previewUrl||r,alt:n,controls:t==="audio"?!0:void 0,inert:"true",onError:({currentTarget:a})=>{a.src===e.previewUrl&&(a.src=r)}});return[(0,VZ.createBlock)(`core/${t}`,o),s]}var pt=l(w(),1),gEe=["image"],bEe={placement:"bottom-end",className:"block-editor-inserter__media-list__item-preview-options__popover"};function vEe({category:e,media:t}){if(!e.getReportUrl)return null;let o=e.getReportUrl(t);return(0,pt.jsx)(Kt.DropdownMenu,{className:"block-editor-inserter__media-list__item-preview-options",label:(0,ni.__)("Options"),popoverProps:bEe,icon:Ps,children:()=>(0,pt.jsx)(Kt.MenuGroup,{children:(0,pt.jsx)(Kt.MenuItem,{onClick:()=>window.open(o,"_blank").focus(),icon:_L,children:(0,ni.sprintf)((0,ni.__)("Report %s"),e.mediaType)})})})}function kEe({onClose:e,onSubmit:t}){return(0,pt.jsxs)(Kt.Modal,{title:(0,ni.__)("Insert external image"),onRequestClose:e,className:"block-editor-inserter-media-tab-media-preview-inserter-external-image-modal",children:[(0,pt.jsxs)(Kt.__experimentalVStack,{spacing:3,children:[(0,pt.jsx)("p",{children:(0,ni.__)("This image cannot be uploaded to your Media Library, but it can still be inserted as an external image.")}),(0,pt.jsx)("p",{children:(0,ni.__)("External images can be removed by the external provider without warning and could even have legal compliance issues related to privacy legislation.")})]}),(0,pt.jsxs)(Kt.Flex,{className:"block-editor-block-lock-modal__actions",justify:"flex-end",expanded:!1,children:[(0,pt.jsx)(Kt.FlexItem,{children:(0,pt.jsx)(Kt.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:e,children:(0,ni.__)("Cancel")})}),(0,pt.jsx)(Kt.FlexItem,{children:(0,pt.jsx)(Kt.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:t,children:(0,ni.__)("Insert")})})]})]})}function HZ({media:e,onClick:t,category:o}){let[r,n]=(0,Ua.useState)(!1),[i,s]=(0,Ua.useState)(!1),[a,c]=(0,Ua.useState)(!1),[u,d]=(0,Ua.useMemo)(()=>gE(e,o.mediaType),[e,o.mediaType]),{createErrorNotice:f,createSuccessNotice:m}=(0,v_.useDispatch)(zZ.store),{getSettings:h,getBlock:p}=(0,v_.useSelect)(x),{updateBlockAttributes:g}=(0,v_.useDispatch)(x),b=(0,Ua.useCallback)(_=>{if(a)return;let S=h(),C=(0,E3.cloneBlock)(_),{id:B,url:T,caption:I}=C.attributes;if(!B&&!S.mediaUpload){n(!0);return}if(B){t(C);return}c(!0),window.fetch(T).then(E=>E.blob()).then(E=>{let L=(0,UZ.getFilename)(T)||"image.jpg",P=new File([E],L,{type:E.type});S.mediaUpload({filesList:[P],additionalData:{caption:I},onFileChange([O]){(0,jZ.isBlobURL)(O.url)||(p(C.clientId)?g(C.clientId,{...C.attributes,id:O.id,url:O.url}):(t({...C,attributes:{...C.attributes,id:O.id,url:O.url}}),m((0,ni.__)("Image uploaded and inserted."),{type:"snackbar",id:"inserter-notice"})),c(!1))},allowedTypes:gEe,onError(O){f(O,{type:"snackbar",id:"inserter-notice"}),c(!1)}})}).catch(()=>{n(!0),c(!1)})},[a,h,t,m,g,f,p]),k=typeof e.title=="string"?e.title:e.title?.rendered||(0,ni.__)("no title"),v=(0,Ua.useCallback)(()=>s(!0),[]),y=(0,Ua.useCallback)(()=>s(!1),[]);return(0,pt.jsxs)(pt.Fragment,{children:[(0,pt.jsx)(Og,{isEnabled:!0,blocks:[u],children:({draggable:_,onDragStart:S,onDragEnd:C})=>(0,pt.jsx)("div",{className:D("block-editor-inserter__media-list__list-item",{"is-hovered":i}),draggable:_,onDragStart:S,onDragEnd:C,children:(0,pt.jsxs)("div",{onMouseEnter:v,onMouseLeave:y,children:[(0,pt.jsx)(Kt.Tooltip,{text:k,children:(0,pt.jsx)(Kt.Composite.Item,{render:(0,pt.jsx)("div",{"aria-label":k,role:"option",className:"block-editor-inserter__media-list__item"}),onClick:()=>b(u),children:(0,pt.jsxs)("div",{className:"block-editor-inserter__media-list__item-preview",children:[d,a&&(0,pt.jsx)("div",{className:"block-editor-inserter__media-list__item-preview-spinner",children:(0,pt.jsx)(Kt.Spinner,{})})]})})}),!a&&(0,pt.jsx)(vEe,{category:o,media:e})]})})}),r&&(0,pt.jsx)(kEe,{onClose:()=>n(!1),onSubmit:()=>{t((0,E3.cloneBlock)(u)),m((0,ni.__)("Image inserted."),{type:"snackbar",id:"inserter-notice"}),n(!1)}})]})}var T3=l(w(),1);function yEe({mediaList:e,category:t,onClick:o,label:r=(0,WZ.__)("Media List")}){return(0,T3.jsx)(GZ.Composite,{role:"listbox",className:"block-editor-inserter__media-list","aria-label":r,children:e.map((n,i)=>(0,T3.jsx)(HZ,{media:n,category:t,onClick:o},n.id||n.sourceId||i))})}var $Z=yEe;var oc=l(R(),1),I3=l(F(),1);function KZ(e,t={}){let[o,r]=(0,oc.useState)(),[n,i]=(0,oc.useState)(!1),s=(0,oc.useRef)();return(0,oc.useEffect)(()=>{(async()=>{let a=JSON.stringify({category:e.name,...t});s.current=a,i(!0),r([]);let c=await e.fetch?.(t);a===s.current&&(r(c),i(!1))})()},[e.name,...Object.values(t)]),{mediaList:o,isLoading:n}}function YZ(e){let[t,o]=(0,oc.useState)([]),r=(0,I3.useSelect)(a=>M(a(x)).getInserterMediaCategories(),[]),{canInsertImage:n,canInsertVideo:i,canInsertAudio:s}=(0,I3.useSelect)(a=>{let{canInsertBlockType:c}=a(x);return{canInsertImage:c("core/image",e),canInsertVideo:c("core/video",e),canInsertAudio:c("core/audio",e)}},[e]);return(0,oc.useEffect)(()=>{(async()=>{let a=[];if(!r)return;let c=new Map(await Promise.all(r.map(async d=>{if(d.isExternalResource)return[d.name,!0];let f=[];try{f=await d.fetch({per_page:1})}catch{}return[d.name,!!f.length]}))),u={image:n,video:i,audio:s};r.forEach(d=>{u[d.mediaType]&&c.get(d.name)&&a.push(d)}),a.length&&o(a)})()},[n,i,s,r]),t}var hd=l(w(),1),_Ee=10;function k_({rootClientId:e,onInsert:t,category:o}){let[r,n,i]=(0,ZZ.useDebouncedInput)(),{mediaList:s,isLoading:a}=KZ(o,{per_page:i?20:_Ee,search:i}),c="block-editor-inserter__media-panel",u=o.labels.search_items||(0,qZ.__)("Search");return(0,hd.jsxs)("div",{className:c,children:[(0,hd.jsx)(bE.SearchControl,{className:`${c}-search`,onChange:n,value:r,label:u,placeholder:u}),a&&(0,hd.jsx)("div",{className:`${c}-spinner`,children:(0,hd.jsx)(bE.Spinner,{})}),!a&&!s?.length&&(0,hd.jsx)(Ys,{}),!a&&!!s?.length&&(0,hd.jsx)($Z,{rootClientId:e,onClick:t,mediaList:s,category:o})]})}var XZ=l(F(),1);function SEe({fallback:e=null,children:t}){return(0,XZ.useSelect)(r=>{let{getSettings:n}=r(x);return!!n().mediaUpload},[])?t:e}var Xs=SEe;var QZ=l(A(),1),xEe=()=>null,gd=(0,QZ.withFilters)("editor.MediaUpload")(xEe);var ii=l(w(),1),wEe=["image","video","audio"];function CEe({rootClientId:e,selectedCategory:t,onSelectCategory:o,onInsert:r,children:n}){let i=YZ(e),s=(0,eX.useViewportMatch)("medium","<"),a="block-editor-inserter__media-tabs",c=(0,vE.useCallback)(d=>{if(!d?.url)return;let f=window.__experimentalDataViewsMediaModal&&d.mime_type?d.mime_type.split("/")[0]:d.type,[m]=gE(d,f);r(m)},[r]),u=(0,vE.useMemo)(()=>i.map(d=>({...d,label:d.labels.name})),[i]);return u.length?(0,ii.jsxs)(ii.Fragment,{children:[!s&&(0,ii.jsxs)("div",{className:`${a}-container`,children:[(0,ii.jsx)(hE,{categories:u,selectedCategory:t,onSelectCategory:o,children:n}),(0,ii.jsx)(Xs,{children:(0,ii.jsx)(gd,{multiple:!1,onSelect:c,allowedTypes:wEe,render:({open:d})=>(0,ii.jsx)(tX.Button,{__next40pxDefaultSize:!0,onClick:f=>{f.target.focus(),d()},className:"block-editor-inserter__media-library-button",variant:"secondary","data-unstable-ignore-focus-outside-for-relatedtarget":".media-modal",children:(0,JZ.__)("Open Media Library")})})})]}),s&&(0,ii.jsx)(cE,{categories:u,children:d=>(0,ii.jsx)(k_,{onInsert:r,rootClientId:e,category:d})})]}):(0,ii.jsx)(Ys,{})}var P3=CEe;var y_=l(R(),1),bd=l(N(),1);var yE=l(X(),1),nX=l(sr(),1),iX=l(F(),1);var oX=l(A(),1),{Fill:rX,Slot:BEe}=(0,oX.createSlotFill)("__unstableInserterMenuExtension");rX.Slot=BEe;var kE=rX;var On=l(w(),1),EEe=9,TEe=[];function IEe({filterValue:e,onSelect:t,onHover:o,onHoverPattern:r,rootClientId:n,clientId:i,isAppender:s,__experimentalInsertionIndex:a,maxBlockPatterns:c,maxBlockTypes:u,showBlockDirectory:d=!1,isDraggable:f=!0,shouldFocusBlock:m=!0,prioritizePatterns:h,selectBlockOnInsert:p,isQuick:g}){let b=(0,yE.useDebounce)(nX.speak,500),{prioritizedBlocks:k}=(0,iX.useSelect)(z=>({prioritizedBlocks:z(x).getBlockListSettings(n)?.prioritizedInserterBlocks||TEe}),[n]),[v,y]=md({onSelect:t,rootClientId:n,clientId:i,isAppender:s,insertionIndex:a,shouldFocusBlock:m,selectBlockOnInsert:p}),[_,S,C,B]=Mu(v,y,g),[T,,I]=pd(y,v,void 0,g),E=(0,y_.useMemo)(()=>{if(c===0)return[];let z=dy(T,e);return c!==void 0?z.slice(0,c):z},[e,T,c]),L=u;h&&E.length>2&&(L=0);let P=(0,y_.useMemo)(()=>{if(L===0)return[];let z=_.filter(W=>W.name!=="core/block"),U=Ea(z,"frecency","desc");!e&&k.length&&(U=PC(U,k));let G=EC(U,S,C,e);return L!==void 0?G.slice(0,L):G},[e,_,S,C,L,k]);(0,y_.useEffect)(()=>{if(!e)return;let z=P.length+E.length,U=(0,bd.sprintf)((0,bd._n)("%d result found.","%d results found.",z),z);b(U)},[e,b,P,E]);let O=(0,yE.useAsyncList)(P,{step:EEe}),V=P.length>0||E.length>0,j=!!P.length&&(0,On.jsx)(fd,{title:(0,On.jsx)(We,{children:(0,bd.__)("Blocks")}),children:(0,On.jsx)(zm,{items:O,onSelect:B,onHover:o,label:(0,bd.__)("Blocks"),isDraggable:f})}),H=!!E.length&&(0,On.jsx)(fd,{title:(0,On.jsx)(We,{children:(0,bd.__)("Block patterns")}),children:(0,On.jsx)("div",{className:"block-editor-inserter__quick-inserter-patterns",children:(0,On.jsx)(ja,{blockPatterns:E,onClickPattern:I,onHover:r,isDraggable:f})})});return(0,On.jsxs)(Ig,{children:[!d&&!V&&(0,On.jsx)(Ys,{}),h?H:j,!!P.length&&!!E.length&&(0,On.jsx)("div",{className:"block-editor-inserter__quick-inserter-separator"}),h?j:H,d&&(0,On.jsx)(kE.Slot,{fillProps:{onSelect:B,onHover:o,filterValue:e,hasItems:V,rootClientId:v},children:z=>z.length?z:V?null:(0,On.jsx)(Ys,{})})]})}var _E=IEe;var xE=l(A(),1),sX=l(R(),1);var rc=l(w(),1),{Tabs:SE}=M(xE.privateApis);function PEe({defaultTabId:e,onClose:t,onSelect:o,selectedTab:r,tabs:n,closeButtonLabel:i},s){return(0,rc.jsx)("div",{className:"block-editor-tabbed-sidebar",children:(0,rc.jsxs)(SE,{selectOnMove:!1,defaultTabId:e,onSelect:o,selectedTabId:r,children:[(0,rc.jsxs)("div",{className:"block-editor-tabbed-sidebar__tablist-and-close-button",children:[(0,rc.jsx)(xE.Button,{className:"block-editor-tabbed-sidebar__close-button",icon:Xf,label:i,onClick:()=>t(),size:"compact"}),(0,rc.jsx)(SE.TabList,{className:"block-editor-tabbed-sidebar__tablist",ref:s,children:n.map(a=>(0,rc.jsx)(SE.Tab,{tabId:a.name,className:"block-editor-tabbed-sidebar__tab",children:a.title},a.name))})]}),n.map(a=>(0,rc.jsx)(SE.TabPanel,{tabId:a.name,focusable:!1,className:"block-editor-tabbed-sidebar__tabpanel",ref:a.panelRef,children:a.panel},a.name))]})})}var wE=(0,sX.forwardRef)(PEe);var CE=l(F(),1),Ug=l(R(),1);function __(e=!0){let{setZoomLevel:t,resetZoomLevel:o}=M((0,CE.useDispatch)(x)),{isZoomedOut:r,isZoomOut:n}=(0,CE.useSelect)(a=>{let{isZoomOut:c}=M(a(x));return{isZoomedOut:c(),isZoomOut:c}},[]),i=(0,Ug.useRef)(!1),s=(0,Ug.useRef)(e);(0,Ug.useEffect)(()=>{r!==s.current&&(i.current=!1)},[r]),(0,Ug.useEffect)(()=>(s.current=e,e!==n()&&(i.current=!0,e?t("auto-scaled"):o()),()=>{i.current&&n()&&o()}),[e,n,o,t])}var Ye=l(w(),1),lX=()=>{};function REe({rootClientId:e,clientId:t,isAppender:o,__experimentalInsertionIndex:r,onSelect:n,showInserterHelpPanel:i,showMostUsedBlocks:s,__experimentalFilterValue:a="",shouldFocusBlock:c=!0,onPatternCategorySelection:u,onClose:d,__experimentalInitialTab:f,__experimentalInitialCategory:m},h){let{isZoomOutMode:p,hasSectionRootClientId:g}=(0,aX.useSelect)(we=>{let{isZoomOut:ot,getSectionRootClientId:Ce}=M(we(x));return{isZoomOutMode:ot(),hasSectionRootClientId:!!Ce()}},[]),[b,k,v]=(0,S_.useDebouncedInput)(a),[y,_]=(0,et.useState)(null),[S,C]=(0,et.useState)(m),[B,T]=(0,et.useState)("all"),[I,E]=(0,et.useState)(null),L=(0,S_.useViewportMatch)("large"),O=(0,S_.useViewportMatch)("medium","<")?d:lX;function V(){return f||(p?"patterns":"blocks")}let[j,H]=(0,et.useState)(V());__(g&&(j==="patterns"||j==="media")&&L);let[U,G,W]=md({rootClientId:e,clientId:t,isAppender:o,insertionIndex:r,shouldFocusBlock:c}),J=(0,et.useRef)(),le=(0,et.useCallback)((we,ot,Ce,Wo)=>{G(we,ot,Ce,Wo),n(we),O(),window.requestAnimationFrame(()=>{!c&&!J.current?.contains(h.current.ownerDocument.activeElement)&&J.current?.querySelector("button").focus()})},[G,O,n,h,c]),oe=(0,et.useCallback)((we,ot,...Ce)=>{W(!1),G(we,{patternName:ot},...Ce),n(),O()},[G,O,n,W]),re=(0,et.useCallback)(we=>{W(we),_(we)},[W,_]),Q=(0,et.useCallback)((we,ot)=>{C(we),T(ot),u?.()},[C,u]),$=j==="patterns"&&!v&&!!S,ee=j==="media"&&!!I,[Y,te]=(0,et.useState)(!1),ne=(0,et.useRef)(null),q=(0,et.useRef)(null),se=(0,et.useRef)(null);(0,et.useEffect)(()=>{let we=Ce=>{te(Ce.currentTarget.scrollTop>0)},ot=[ne.current,q.current,se.current].filter(Boolean);return ot.forEach(Ce=>Ce.addEventListener("scroll",we)),()=>{ot.forEach(Ce=>Ce.removeEventListener("scroll",we))}},[]);let pe=(0,et.useMemo)(()=>j==="media"?null:(0,Ye.jsxs)(Ye.Fragment,{children:[(0,Ye.jsx)(BE.SearchControl,{className:D("block-editor-inserter__search",{"is-scrolled":Y}),onChange:we=>{y&&_(null),k(we)},value:b,label:(0,vd.__)("Search"),placeholder:(0,vd.__)("Search")}),!!v&&(0,Ye.jsx)(_E,{filterValue:v,onSelect:n,onHover:re,rootClientId:e,clientId:t,isAppender:o,__experimentalInsertionIndex:r,showBlockDirectory:!0,shouldFocusBlock:c,prioritizePatterns:j==="patterns"})]}),[j,y,_,k,b,v,n,re,c,t,e,r,o,Y]),xe=(0,et.useMemo)(()=>(0,Ye.jsxs)(Ye.Fragment,{children:[(0,Ye.jsx)("div",{className:"block-editor-inserter__block-list",children:(0,Ye.jsx)(dZ,{ref:J,rootClientId:U,onInsert:le,onHover:re,showMostUsedBlocks:s})}),i&&(0,Ye.jsxs)("div",{className:"block-editor-inserter__tips",children:[(0,Ye.jsx)(We,{render:(0,Ye.jsx)("h2",{}),children:(0,vd.__)("A tip for using the block editor")}),(0,Ye.jsx)(B$,{})]})]}),[U,le,re,s,i]),Te=(0,et.useMemo)(()=>(0,Ye.jsx)(MZ,{rootClientId:U,onInsert:oe,onSelectCategory:Q,selectedCategory:S,children:$&&(0,Ye.jsx)(dE,{rootClientId:U,onInsert:oe,category:S,patternFilter:B,showTitlesAsTooltip:!0})}),[U,oe,Q,B,S,$]),Xe=(0,et.useMemo)(()=>(0,Ye.jsx)(P3,{rootClientId:U,selectedCategory:I,onSelectCategory:E,onInsert:le,children:ee&&(0,Ye.jsx)(k_,{rootClientId:U,onInsert:le,category:I})}),[U,le,I,E,ee]),dt=we=>{we!=="patterns"&&C(null),H(we)},ft=(0,et.useRef)();return(0,et.useLayoutEffect)(()=>{ft.current&&window.requestAnimationFrame(()=>{ft.current.querySelector('[role="tab"][aria-selected="true"]')?.focus()})},[]),(0,Ye.jsxs)("div",{className:D("block-editor-inserter__menu",{"show-panel":$||ee,"is-zoom-out":p}),ref:h,children:[(0,Ye.jsx)("div",{className:"block-editor-inserter__main-area",children:(0,Ye.jsx)(wE,{ref:ft,onSelect:dt,onClose:d,selectedTab:j,closeButtonLabel:(0,vd.__)("Close Block Inserter"),tabs:[{name:"blocks",title:(0,vd.__)("Blocks"),panelRef:ne,panel:(0,Ye.jsxs)(Ye.Fragment,{children:[pe,j==="blocks"&&!v&&xe]})},{name:"patterns",title:(0,vd.__)("Patterns"),panelRef:q,panel:(0,Ye.jsxs)(Ye.Fragment,{children:[pe,j==="patterns"&&!v&&Te]})},{name:"media",title:(0,vd.__)("Media"),panelRef:se,panel:(0,Ye.jsxs)(Ye.Fragment,{children:[pe,Xe]})}]})}),i&&y&&(0,Ye.jsx)(BE.Popover,{className:"block-editor-inserter__preview-container__popover",placement:"right-start",offset:16,focusOnMount:!1,animate:!1,children:(0,Ye.jsx)(Wq,{item:y})})]})}var R3=(0,et.forwardRef)(REe);function OEe(e,t){return(0,Ye.jsx)(R3,{...e,onPatternCategorySelection:lX,ref:t})}var cX=(0,et.forwardRef)(OEe);var EE=l(R(),1),x_=l(N(),1),TE=l(A(),1),uX=l(F(),1);var Wm=l(w(),1),AEe=6,LEe=6,NEe=2;function IE({onSelect:e,rootClientId:t,clientId:o,isAppender:r,selectBlockOnInsert:n,hasSearch:i=!0}){let[s,a]=(0,EE.useState)(""),[c,u]=md({onSelect:e,rootClientId:t,clientId:o,isAppender:r,selectBlockOnInsert:n}),[d]=Mu(c,u,!0),{setInserterIsOpened:f,insertionIndex:m}=(0,uX.useSelect)(g=>{let{getSettings:b,getBlockIndex:k,getBlockCount:v}=g(x),y=b(),_=k(o),S=v();return{setInserterIsOpened:y.__experimentalSetIsInserterOpened,insertionIndex:_===-1?S:_}},[o]),h=i&&d.length>AEe;(0,EE.useEffect)(()=>{f&&f(!1)},[f]);let p=()=>{f({filterValue:s,onSelect:e,rootClientId:t,insertionIndex:m})};return(0,Wm.jsxs)("div",{className:D("block-editor-inserter__quick-inserter",{"has-search":h,"has-expand":f}),children:[h&&(0,Wm.jsx)(TE.SearchControl,{className:"block-editor-inserter__search",value:s,onChange:g=>{a(g)},label:(0,x_.__)("Search"),placeholder:(0,x_.__)("Search")}),(0,Wm.jsx)("div",{className:"block-editor-inserter__quick-inserter-results",children:(0,Wm.jsx)(_E,{filterValue:s,onSelect:e,rootClientId:t,clientId:o,isAppender:r,maxBlockPatterns:s?NEe:0,maxBlockTypes:LEe,isDraggable:!1,selectBlockOnInsert:n,isQuick:!0})}),f&&(0,Wm.jsx)(TE.Button,{__next40pxDefaultSize:!0,className:"block-editor-inserter__quick-inserter-expand",onClick:p,"aria-label":(0,x_.__)("Browse all. This will open the main inserter panel in the editor toolbar."),children:(0,x_.__)("Browse all")})]})}var MEe=50;function dX(e,t){if(!e||!e.attributes||!t?.__experimentalLabel)return null;let o=t.__experimentalLabel(e.attributes,{context:"appender"});return typeof o=="string"&&o.length<MEe&&o.length>0?o:null}var w_=l(w(),1),DEe=({onToggle:e,disabled:t,isOpen:o,blockTitle:r,hasSingleBlockType:n,appenderLabel:i,toggleProps:s={}})=>{let{as:a=PE.Button,label:c,onClick:u,...d}=s,f=c;!f&&i?f=i:!f&&n?f=(0,nc.sprintf)((0,nc._x)("Add %s","directly add the only allowed block"),r.toLowerCase()):f||(f=(0,nc._x)("Add block","Generic label for block inserter button"));function m(h){e&&e(h),u&&u(h)}return(0,w_.jsx)(a,{__next40pxDefaultSize:s.as?void 0:!0,icon:Mi,label:f,tooltipPosition:"bottom",onClick:m,className:"block-editor-inserter__toggle","aria-haspopup":n?!1:"true","aria-expanded":n?!1:o,disabled:t,...d})},VEe=class extends mX.Component{constructor(){super(...arguments),this.onToggle=this.onToggle.bind(this),this.renderToggle=this.renderToggle.bind(this),this.renderContent=this.renderContent.bind(this)}onToggle(e){let{onToggle:t}=this.props;t&&t(e)}renderToggle({onToggle:e,isOpen:t}){let{disabled:o,blockTitle:r,hasSingleBlockType:n,appenderLabel:i,toggleProps:s,hasItems:a,renderToggle:c=DEe}=this.props;return c({onToggle:e,isOpen:t,disabled:o||!a,blockTitle:r,hasSingleBlockType:n,appenderLabel:i,toggleProps:s})}renderContent({onClose:e}){let{rootClientId:t,clientId:o,isAppender:r,showInserterHelpPanel:n,__experimentalIsQuick:i,onSelectOrClose:s,selectBlockOnInsert:a}=this.props;return i?(0,w_.jsx)(IE,{onSelect:c=>{let u=Array.isArray(c)&&c?.length?c[0]:c;s&&typeof s=="function"&&s(u),e()},rootClientId:t,clientId:o,isAppender:r,selectBlockOnInsert:a}):(0,w_.jsx)(cX,{onSelect:()=>{e()},onClose:e,rootClientId:t,clientId:o,isAppender:r,showInserterHelpPanel:n})}render(){let{position:e,hasSingleBlockType:t,blockToInsert:o,insertOnlyAllowedBlock:r,__experimentalIsQuick:n,onSelectOrClose:i}=this.props;return t||o?this.renderToggle({onToggle:r}):(0,w_.jsx)(PE.Dropdown,{className:"block-editor-inserter",contentClassName:D("block-editor-inserter__popover",{"is-quick":n}),popoverProps:{position:e,shift:!0},onToggle:this.onToggle,expandOnMobile:!0,headerTitle:(0,nc.__)("Add a block"),renderToggle:this.renderToggle,renderContent:this.renderContent,onClose:i})}},Ji=(0,OE.compose)([(0,RE.withSelect)((e,{clientId:t,rootClientId:o,shouldDirectInsert:r=!0})=>{let{getBlockRootClientId:n,hasInserterItems:i,getAllowedBlocks:s,getDirectInsertBlock:a,getBlockListSettings:c}=e(x),{getBlockVariations:u,getBlockType:d}=e(AE.store);o=o||n(t)||void 0;let f=s(o),m=r&&a(o),{defaultBlock:h}=c(o)??{},p=f?.length===1&&u(f[0].name,"inserter")?.length===0,g=p?f[0]:null,b=m||null;!b&&p&&h?.name===g.name&&(b=h);let k=m?d(m.name):null,v=dX(m,k);return{hasItems:i(o),hasSingleBlockType:p,blockTitle:g?g.title:"",allowedBlockType:g,blockToInsert:b,appenderLabel:v,rootClientId:o}}),(0,RE.withDispatch)((e,t,{select:o})=>({insertOnlyAllowedBlock(){let{rootClientId:r,clientId:n,isAppender:i,hasSingleBlockType:s,allowedBlockType:a,blockToInsert:c,onSelectOrClose:u,selectBlockOnInsert:d}=t;if(!s&&!c)return;let f=c?.name??a.name;function m(v){if(!v?.length)return{};let{getBlock:y,getPreviousBlockClientId:_}=o(x),S;if(n){let C=y(n),B=y(_(n));C?.name===B?.name&&(S=B?.attributes)}else if(r){let C=y(r)?.innerBlocks?.at(-1);C?.name===f&&(S=C.attributes)}return S?Object.fromEntries(v.filter(C=>C in S).map(C=>[C,S[C]])):{}}function h(){let{getBlockIndex:v,getBlockSelectionEnd:y,getBlockOrder:_,getBlockRootClientId:S}=o(x);if(n)return v(n);let C=y();return!i&&C&&S(C)===r?v(C)+1:_(r).length}let{insertBlock:p}=e(x),g=m(c?.attributesToCopy),b=(0,AE.createBlock)(f,{...c?.attributes||{},...g});p(b,h(),r,d),u&&u(b);let k=(0,nc.sprintf)((0,nc.__)("%s block added"),a.title);(0,fX.speak)(k)}})),(0,OE.ifCondition)(({hasItems:e,isAppender:t,rootClientId:o,clientId:r})=>e||!t&&!o&&!r)])(VEe);var C_=l(w(),1),FEe="\uFEFF";function Hg({rootClientId:e}){let{showPrompt:t,isLocked:o,placeholder:r,isManualGrid:n}=(0,LE.useSelect)(u=>{let{getBlockCount:d,getSettings:f,getTemplateLock:m,getBlockAttributes:h}=u(x),p=!d(e),{bodyPlaceholder:g}=f();return{showPrompt:p,isLocked:!!m(e),placeholder:g,isManualGrid:h(e)?.layout?.isManualPlacement}},[e]),{insertDefaultBlock:i,startTyping:s}=(0,LE.useDispatch)(x);if(o||n)return null;let a=(0,pX.decodeEntities)(r)||(0,O3.__)("Type / to choose a block"),c=()=>{i(void 0,e),s()};return(0,C_.jsxs)("div",{"data-root-client-id":e||"",className:D("block-editor-default-block-appender",{"has-visible-prompt":t}),children:[(0,C_.jsx)("p",{tabIndex:"0",role:"button","aria-label":(0,O3.__)("Add default block"),className:"block-editor-default-block-appender__content",onKeyDown:u=>{(NE.ENTER===u.keyCode||NE.SPACE===u.keyCode)&&c()},onClick:()=>c(),onFocus:()=>{t&&c()},children:t?a:FEe}),(0,C_.jsx)(Ji,{rootClientId:e,position:"bottom right",isAppender:!0,__experimentalIsQuick:!0})]})}var hX=l(A(),1),A3=l(R(),1),B_=l(N(),1);var gX=l(Le(),1);var ME=l(w(),1);function bX({rootClientId:e,className:t,onFocus:o,tabIndex:r,onSelect:n},i){return(0,ME.jsx)(Ji,{position:"bottom center",rootClientId:e,__experimentalIsQuick:!0,onSelectOrClose:(...s)=>{n&&typeof n=="function"&&n(...s)},renderToggle:({onToggle:s,disabled:a,isOpen:c,blockTitle:u,hasSingleBlockType:d,appenderLabel:f})=>{let m=!d,h;return f?h=f:d?h=(0,B_.sprintf)((0,B_._x)("Add %s","directly add the only allowed block"),u.toLowerCase()):h=(0,B_._x)("Add block","Generic label for block inserter button"),(0,ME.jsx)(hX.Button,{__next40pxDefaultSize:!0,ref:i,onFocus:o,tabIndex:r,className:D(t,"block-editor-button-block-appender"),onClick:s,"aria-haspopup":m?"true":void 0,"aria-expanded":m?c:void 0,disabled:a,label:h,showTooltip:!0,children:(0,ME.jsx)(Ie,{icon:Mi})})},isAppender:!0})}var vX=(0,A3.forwardRef)((e,t)=>((0,gX.default)("wp.blockEditor.ButtonBlockerAppender",{alternative:"wp.blockEditor.ButtonBlockAppender",since:"5.9"}),bX(e,t))),kd=(0,A3.forwardRef)(bX);var Gg=l(w(),1);function zEe({rootClientId:e}){return(0,L3.useSelect)(o=>o(x).canInsertBlockType((0,kX.getDefaultBlockName)(),e))?(0,Gg.jsx)(Hg,{rootClientId:e}):(0,Gg.jsx)(kd,{rootClientId:e,className:"block-list-appender__toggle"})}function yX({rootClientId:e,CustomAppender:t,className:o,tagName:r="div"}){let n=(0,L3.useSelect)(i=>{let{getBlockInsertionPoint:s,isBlockInsertionPointVisible:a,getBlockCount:c}=i(x),u=s();return a()&&e===u?.rootClientId&&c(e)===0},[e]);return(0,Gg.jsx)(r,{tabIndex:-1,className:D("block-list-appender wp-block",o,{"is-drag-over":n}),contentEditable:!1,"data-block":!0,children:t?(0,Gg.jsx)(t,{}):(0,Gg.jsx)(zEe,{rootClientId:e})})}var NX=l(X(),1),T_=l(F(),1),MX=l(R(),1),DX=l(N(),1);var Wg=l(F(),1),_d=l(R(),1),FE=l(A(),1),AX=l(X(),1);var xX=l(F(),1),yd=l(R(),1),wX=l(A(),1),CX=l(N(),1);var SX=l(X(),1),N3=l(Fe(),1),_X=new WeakMap;function jEe(e){let t=(0,SX.useRefEffect)(o=>{function r(i){let{deltaX:s,deltaY:a,target:c}=i,u=e.current,d=_X.get(u);d||(d=(0,N3.getScrollContainer)(u),_X.set(u,d));let f=(0,N3.getScrollContainer)(c);o.contains(f)||d.scrollBy(s,a)}let n={passive:!0};return o.addEventListener("wheel",r,n),()=>{o.removeEventListener("wheel",r,n)}},[e]);return e?t:null}var $m=jEe;var M3=l(w(),1),UEe=Number.MAX_SAFE_INTEGER;function HEe({previousClientId:e,nextClientId:t,children:o,__unstablePopoverSlot:r,__unstableContentRef:n,operation:i="insert",nearestSide:s="right",...a}){let[c,u]=(0,yd.useReducer)(v=>(v+1)%UEe,0),{orientation:d,rootClientId:f,isVisible:m}=(0,xX.useSelect)(v=>{let{getBlockListSettings:y,getBlockRootClientId:_,isBlockVisible:S}=v(x),C=_(e??t);return{orientation:y(C)?.orientation||"vertical",rootClientId:C,isVisible:S(e)&&S(t)}},[e,t]),h=st(e),p=st(t),g=d==="vertical",b=(0,yd.useMemo)(()=>c<0||!h&&!p||!m?void 0:{contextElement:i==="group"?p||h:h||p,getBoundingClientRect(){let y=h?h.getBoundingClientRect():null,_=p?p.getBoundingClientRect():null,S=0,C=0,B=0,T=0;if(i==="group"){let I=_||y;C=I.top,B=0,T=I.bottom-I.top,S=s==="left"?I.left-2:I.right-2}else g?(C=y?y.bottom:_.top,B=y?y.width:_.width,T=_&&y?_.top-y.bottom:0,S=y?y.left:_.left):(C=y?y.top:_.top,T=y?y.height:_.height,(0,CX.isRTL)()?(S=_?_.right:y.left,B=y&&_?y.left-_.right:0):(S=y?y.right:_.left,B=y&&_?_.left-y.right:0),B=Math.max(B,0));return new window.DOMRect(S,C,B,T)}},[h,p,c,g,m,i,s]),k=$m(n);return(0,yd.useLayoutEffect)(()=>{if(!h)return;let v=new window.MutationObserver(u);return v.observe(h,{attributes:!0}),()=>{v.disconnect()}},[h]),(0,yd.useLayoutEffect)(()=>{if(!p)return;let v=new window.MutationObserver(u);return v.observe(p,{attributes:!0}),()=>{v.disconnect()}},[p]),(0,yd.useLayoutEffect)(()=>{if(h)return h.ownerDocument.defaultView.addEventListener("resize",u),()=>{h.ownerDocument.defaultView?.removeEventListener("resize",u)}},[h]),!h&&!p||!m?null:(0,M3.jsx)(wX.Popover,{ref:k,animate:!1,anchor:b,focusOnMount:!1,__unstableSlotName:r,inline:!r,...a,className:D("block-editor-block-popover","block-editor-block-popover__inbetween",a.className),resize:!1,flip:!1,placement:"overlay",variant:"unstyled",children:(0,M3.jsx)("div",{className:"block-editor-block-popover__inbetween-container",children:o})},t+"--"+f)}var DE=HEe;var IX=l(F(),1),PX=l(X(),1),RX=l(A(),1);var sc=l(R(),1);var BX=l(X(),1),EX=l(A(),1),ic=l(R(),1);var D3=l(w(),1),GEe=Number.MAX_SAFE_INTEGER;function WEe({clientId:e,bottomClientId:t,children:o,__unstablePopoverSlot:r,__unstableContentRef:n,shift:i=!0,...s},a){let c=st(e),u=st(t??e),d=(0,BX.useMergeRefs)([a,$m(n)]),[f,m]=(0,ic.useReducer)(p=>(p+1)%GEe,0);(0,ic.useLayoutEffect)(()=>{if(!c)return;let p=new window.MutationObserver(m);return p.observe(c,{attributes:!0}),()=>{p.disconnect()}},[c]);let h=(0,ic.useMemo)(()=>{if(!(f<0||!c||t&&!u))return{getBoundingClientRect(){return u?SD(Zh(c),Zh(u)):Zh(c)},contextElement:c}},[f,c,t,u]);return!c||t&&!u?null:(0,D3.jsx)(EX.Popover,{ref:d,animate:!1,focusOnMount:!1,anchor:h,__unstableSlotName:r,inline:!r,placement:"top-start",resize:!1,flip:!1,shift:i,...s,className:D("block-editor-block-popover",s.className),variant:"unstyled",children:o})}var Km=(0,ic.forwardRef)(WEe),$Ee=({clientId:e,bottomClientId:t,children:o,...r},n)=>(0,D3.jsx)(Km,{...r,bottomClientId:t,clientId:e,__unstableContentRef:void 0,__unstablePopoverSlot:void 0,ref:n,children:o}),TX=(0,ic.forwardRef)($Ee);var VE=l(w(),1);function KEe({clientId:e,bottomClientId:t,children:o,shift:r=!1,additionalStyles:n,...i},s){t??=e;let a=st(e);return(0,VE.jsx)(Km,{ref:s,clientId:e,bottomClientId:t,shift:r,...i,children:a&&e===t?(0,VE.jsx)(YEe,{selectedElement:a,additionalStyles:n,children:o}):o})}function YEe({selectedElement:e,additionalStyles:t={},children:o}){let[r,n]=(0,sc.useState)(e.offsetWidth),[i,s]=(0,sc.useState)(e.offsetHeight);(0,sc.useEffect)(()=>{let c=new window.ResizeObserver(()=>{n(e.offsetWidth),s(e.offsetHeight)});return c.observe(e,{box:"border-box"}),()=>c.disconnect()},[e]);let a=(0,sc.useMemo)(()=>({position:"absolute",width:r,height:i,...t}),[r,i,t]);return(0,VE.jsx)("div",{style:a,children:o})}var es=(0,sc.forwardRef)(KEe);var V3=l(w(),1),E_={hide:{opacity:0,scaleY:.75},show:{opacity:1,scaleY:1},exit:{opacity:0,scaleY:.9}};function qEe({__unstablePopoverSlot:e,__unstableContentRef:t}){let{clientId:o}=(0,IX.useSelect)(n=>{let{getBlockOrder:i,getBlockInsertionPoint:s}=n(x),a=s(),c=i(a.rootClientId);return c.length?{clientId:c[a.index]}:{}},[]),r=(0,PX.useReducedMotion)();return(0,V3.jsx)(es,{clientId:o,__unstablePopoverSlot:e,__unstableContentRef:t,className:"block-editor-block-popover__drop-zone",children:(0,V3.jsx)(RX.__unstableMotion.div,{"data-testid":"block-popover-drop-zone",initial:r?E_.show:E_.hide,animate:E_.show,exit:r?E_.show:E_.exit,className:"block-editor-block-popover__drop-zone-foreground"})})}var OX=qEe;var ac=l(w(),1),$g=(0,_d.createContext)();$g.displayName="InsertionPointOpenRefContext";function ZEe({__unstablePopoverSlot:e,__unstableContentRef:t,operation:o="insert",nearestSide:r="right"}){let{selectBlock:n,hideInsertionPoint:i}=(0,Wg.useDispatch)(x),s=(0,_d.useContext)($g),a=(0,_d.useRef)(),{orientation:c,previousClientId:u,nextClientId:d,rootClientId:f,isInserterShown:m,isDistractionFree:h,isZoomOutMode:p}=(0,Wg.useSelect)(I=>{let{getBlockOrder:E,getBlockListSettings:L,getBlockInsertionPoint:P,isBlockBeingDragged:O,getPreviousBlockClientId:V,getNextBlockClientId:j,getSettings:H,isZoomOut:z}=M(I(x)),U=P(),G=E(U.rootClientId);if(!G.length)return{};let W=G[U.index-1],J=G[U.index];for(;O(W);)W=V(W);for(;O(J);)J=j(J);let le=H();return{previousClientId:W,nextClientId:J,orientation:L(U.rootClientId)?.orientation||"vertical",rootClientId:U.rootClientId,isDistractionFree:le.isDistractionFree,isInserterShown:U?.__unstableWithInserter,isZoomOutMode:z()}},[]),{getBlockEditingMode:g}=(0,Wg.useSelect)(x),b=(0,AX.useReducedMotion)();function k(I){I.target===a.current&&d&&g(d)!=="disabled"&&n(d,-1)}function v(I){I.target===a.current&&!s.current&&i()}function y(I){I.target!==a.current&&(s.current=!0)}let _=(0,_d.useCallback)(I=>{!I&&s.current&&(s.current=!1)},[s]),S={start:{opacity:0,scale:0},rest:{opacity:1,scale:1,transition:{delay:m?.5:0,type:"tween"}},hover:{opacity:1,scale:1,transition:{delay:.5,type:"tween"}}},C={start:{scale:b?1:0},rest:{scale:1,transition:{delay:.4,type:"tween"}}};if(h||p&&o!=="insert")return null;let T=D("block-editor-block-list__insertion-point",c==="horizontal"||o==="group"?"is-horizontal":"is-vertical");return(0,ac.jsx)(DE,{previousClientId:u,nextClientId:d,__unstablePopoverSlot:e,__unstableContentRef:t,operation:o,nearestSide:r,children:(0,ac.jsxs)(FE.__unstableMotion.div,{layout:!b,initial:b?"rest":"start",animate:"rest",whileHover:"hover",whileTap:"pressed",exit:"start",ref:a,tabIndex:-1,onClick:k,onFocus:y,className:D(T,{"is-with-inserter":m}),onHoverEnd:v,children:[(0,ac.jsx)(FE.__unstableMotion.div,{variants:S,className:"block-editor-block-list__insertion-point-indicator","data-testid":"block-list-insertion-point-indicator"}),m&&(0,ac.jsx)(FE.__unstableMotion.div,{variants:C,className:D("block-editor-block-list__insertion-point-inserter"),children:(0,ac.jsx)(Ji,{ref:_,position:"bottom center",clientId:d,rootClientId:f,__experimentalIsQuick:!0,onToggle:I=>{s.current=I},onSelectOrClose:()=>{s.current=!1}})})]})})}function LX(e){let{insertionPoint:t,isVisible:o,isBlockListEmpty:r}=(0,Wg.useSelect)(n=>{let{getBlockInsertionPoint:i,isBlockInsertionPointVisible:s,getBlockCount:a}=n(x),c=i();return{insertionPoint:c,isVisible:s(),isBlockListEmpty:a(c?.rootClientId)===0}},[]);return!o||r?null:t.operation==="replace"?(0,ac.jsx)(OX,{...e},`${t.rootClientId}-${t.index}`):(0,ac.jsx)(ZEe,{operation:t.operation,nearestSide:t.nearestSide,...e})}function VX(){let e=(0,MX.useContext)($g),t=(0,T_.useSelect)(g=>{let b=g(x).getSettings();return b.isDistractionFree||b.isPreviewMode||M(g(x)).isZoomOut()},[]),{getBlockListSettings:o,getBlockIndex:r,isMultiSelecting:n,getSelectedBlockClientIds:i,getSettings:s,getTemplateLock:a,__unstableIsWithinBlockOverlay:c,getBlockEditingMode:u,getBlockName:d,getBlockAttributes:f,getParentSectionBlock:m}=M((0,T_.useSelect)(x)),{showInsertionPoint:h,hideInsertionPoint:p}=(0,T_.useDispatch)(x);return(0,NX.useRefEffect)(g=>{if(t)return;function b(k){if(e===void 0||e.current||k.target.nodeType===k.target.TEXT_NODE||n())return;if(!k.target.classList.contains("block-editor-block-list__layout")){p();return}let v;if(k.target.classList.contains("is-root-container")||(v=(k.target.getAttribute("data-block")?k.target:k.target.closest("[data-block]")).getAttribute("data-block")),a(v)||u(v)==="disabled"||d(v)==="core/block"||v&&f(v).layout?.isManualPlacement)return;let y=o(v),_=y?.orientation||"vertical",S=!!y?.__experimentalCaptureToolbars,C=k.clientY,B=k.clientX,I=Array.from(k.target.children).find(O=>{let V=O.getBoundingClientRect();return O.classList.contains("wp-block")&&_==="vertical"&&V.top>C||O.classList.contains("wp-block")&&_==="horizontal"&&((0,DX.isRTL)()?V.right<B:V.left>B)});if(!I){p();return}if(!I.id&&(I=I.firstElementChild,!I)){p();return}let E=I.id.slice(6);if(!E||c(E)||m(E)||i().includes(E)&&_==="vertical"&&!S&&!s().hasFixedToolbar)return;let L=I.getBoundingClientRect();if(_==="horizontal"&&(k.clientY>L.bottom||k.clientY<L.top)||_==="vertical"&&(k.clientX>L.right||k.clientX<L.left)){p();return}let P=r(E);if(P===0){p();return}h(v,P,{__unstableWithInserter:!0})}return g.addEventListener("mousemove",b),()=>{g.removeEventListener("mousemove",b)}},[e,o,r,n,h,p,i,t])}var zE=l(F(),1),FX=l(X(),1);var zX=l(w(),1);function Ym(){let{getSettings:e,hasSelectedBlock:t,hasMultiSelection:o}=(0,zE.useSelect)(x),{clearSelectedBlock:r}=(0,zE.useDispatch)(x),{clearBlockSelection:n}=e();return(0,FX.useRefEffect)(i=>{if(!n)return;function s(a){!t()&&!o()||a.target===i&&r()}return i.addEventListener("mousedown",s),()=>{i.removeEventListener("mousedown",s)}},[t,o,r,n])}function jX(e){return(0,zX.jsx)("div",{ref:Ym(),...e})}var lQ=l(X(),1),Yg=l(R(),1),cQ=l(F(),1),Qm=l(K(),1);var UX=l(w(),1);function HX({showSeparator:e,isFloating:t,onAddBlock:o,isToggle:r}){let{clientId:n}=Ae();return(0,UX.jsx)(kd,{className:D({"block-list-appender__toggle":r}),rootClientId:n,showSeparator:e,isFloating:t,onAddBlock:o})}var GX=l(w(),1);function WX(){let{clientId:e}=Ae();return(0,GX.jsx)(Hg,{rootClientId:e})}var UE=l(R(),1),YX=l(F(),1),jE=l(Le(),1),qX=l(I_(),1);var P_=new WeakMap;function XEe(){let e;return t=>((e===void 0||!(0,qX.isShallowEqual)(e,t))&&(e=t),e)}function KX(e){let[t]=(0,UE.useState)(XEe);return t(e)}function ZX(e,t,o,r,n,i,s,a,c,u,d,f){let m=(0,YX.useRegistry)(),h=KX(o),p=KX(r),g=c===void 0||t==="contentOnly"?t:c;(0,UE.useLayoutEffect)(()=>{let b={allowedBlocks:h,prioritizedInserterBlocks:p,templateLock:g};if(u!==void 0&&(b.__experimentalCaptureToolbars=u),d!==void 0)b.orientation=d;else{let k=Ms(f?.type);b.orientation=k.getOrientation(f)}s!==void 0&&((0,jE.default)("__experimentalDefaultBlock",{alternative:"defaultBlock",since:"6.3",version:"6.4"}),b.defaultBlock=s),n!==void 0&&(b.defaultBlock=n),a!==void 0&&((0,jE.default)("__experimentalDirectInsert",{alternative:"directInsert",since:"6.3",version:"6.4"}),b.directInsert=a),i!==void 0&&(b.directInsert=i),b.directInsert!==void 0&&typeof b.directInsert!="boolean"&&(0,jE.default)("Using `Function` as a `directInsert` argument",{alternative:"`boolean` values",since:"6.5"}),P_.get(m)||P_.set(m,{}),P_.get(m)[e]=b,window.queueMicrotask(()=>{let k=P_.get(m);if(Object.keys(k).length){let{updateBlockListSettings:v}=m.dispatch(x);v(k),P_.set(m,{})}})},[e,h,p,g,n,i,s,a,u,d,f,m])}var F3=l(Kf(),1),HE=l(R(),1),XX=l(F(),1),QX=l(K(),1);function JX(e,t,o,r){let n=(0,XX.useRegistry)(),i=(0,HE.useRef)(null);(0,HE.useLayoutEffect)(()=>{let s=!1,{getBlocks:a,getSelectedBlocksInitialCaretPosition:c,isBlockSelected:u}=n.select(x),{replaceInnerBlocks:d,__unstableMarkNextChangeAsNotPersistent:f}=n.dispatch(x);return window.queueMicrotask(()=>{if(s)return;let m=a(e),h=m.length===0||o==="all"||o==="contentOnly",p=!(0,F3.default)(t,i.current);if(!h||!p)return;i.current=t;let g=(0,QX.synchronizeBlocksWithTemplate)(m,t);(0,F3.default)(g,m)||(f(),d(e,g,m.length===0&&r&&g.length!==0&&u(e),c()))}),()=>{s=!0}},[t,o,e,n,r])}var eQ=l(K(),1),tQ=l(F(),1);function oQ(e){return(0,tQ.useSelect)(t=>{let o=t(x).getBlock(e);if(!o)return;let r=t(eQ.store).getBlockType(o.name);if(r&&Object.keys(r.providesContext).length!==0)return Object.fromEntries(Object.entries(r.providesContext).map(([n,i])=>[n,o.attributes[i]]))},[e])}var Xm=l(F(),1),$E=l(R(),1),KE=l(X(),1),sQ=l(N(),1),Kg=l(K(),1);var z3=l(R(),1),si=l(K(),1),qm=l(F(),1),rQ=l(Fe(),1);function j3(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{return t}return t}function QEe(e,t,o,r,n,i,s,a,c){return u=>{let{srcRootClientId:d,srcClientIds:f,type:m,blocks:h}=j3(u);if(m==="inserter"){s();let p=h.map(g=>(0,si.cloneBlock)(g));i(p,!0,null)}if(m==="block"){let p=o(f[0]);if(d===e&&p===t||f.includes(e)||r(f).some(v=>v===e))return;if(a==="group"){let v=f.map(y=>c(y));i(v,!0,null,f);return}let g=d===e,b=f.length,k=g&&p<t?t-b:t;n(f,d,k)}}}function JEe(e,t,o,r,n){return i=>{if(!t().mediaUpload)return;let s=(0,si.findTransform)((0,si.getBlockTransforms)("from"),a=>a.type==="files"&&r(a.blockName,e)&&a.isMatch(i));if(s){let a=s.transform(i,o);n(a)}}}function eTe(e){return t=>{let o=(0,si.pasteHandler)({HTML:t,mode:"BLOCKS"});o.length&&e(o)}}function GE(e,t,o={}){let{operation:r="insert",nearestSide:n="right"}=o,{canInsertBlockType:i,getBlockIndex:s,getClientIdsOfDescendants:a,getBlockOrder:c,getBlocksByClientId:u,getSettings:d,getBlock:f}=(0,qm.useSelect)(x),{getGroupingBlockName:m}=(0,qm.useSelect)(si.store),{insertBlocks:h,moveBlocksToPosition:p,updateBlockAttributes:g,clearSelectedBlock:b,replaceBlocks:k,removeBlocks:v}=(0,qm.useDispatch)(x),y=(0,qm.useRegistry)(),_=(0,z3.useCallback)((I,E=!0,L=0,P=[])=>{Array.isArray(I)||(I=[I]);let V=c(e)[t];if(r==="replace")k(V,I,void 0,L);else if(r==="group"){let j=f(V);n==="left"?I.push(j):I.unshift(j);let H=I.map(W=>(0,si.createBlock)(W.name,W.attributes,W.innerBlocks)),z=I.every(W=>W.name==="core/image"),U=i("core/gallery",e),G=(0,si.createBlock)(z&&U?"core/gallery":m(),{layout:{type:"flex",flexWrap:z&&U?null:"nowrap"}},H);k([V,...P],G,void 0,L)}else h(I,t,e,E,L)},[c,e,t,r,k,f,n,i,m,h]),S=(0,z3.useCallback)((I,E,L)=>{if(r==="replace"){let P=u(I),V=c(e)[t];y.batch(()=>{v(I,!1),k(V,P,void 0,0)})}else p(I,E,e,L)},[r,c,u,p,y,v,k,t,e]),C=QEe(e,t,s,a,S,_,b,r,f),B=JEe(e,d,g,i,_),T=eTe(_);return I=>{let E=(0,rQ.getFilesFromDataTransfer)(I.dataTransfer),L=I.dataTransfer.getData("text/html");L?T(L):E.length?B(E):C(I)}}function tTe(e,t,o){let r=o==="top"||o==="bottom",{x:n,y:i}=e,s=r?n:i,a=r?i:n,c=r?t.left:t.top,u=r?t.right:t.bottom,d=t[o],f;return s>=c&&s<=u?f=s:s<u?f=c:f=u,Math.sqrt((s-f)**2+(a-d)**2)}function Zm(e,t,o=["top","bottom","left","right"]){let r,n;return o.forEach(i=>{let s=tTe(e,t,i);(r===void 0||s<r)&&(r=s,n=i)}),[r,n]}function WE(e,t){return t.left<=e.x&&t.right>=e.x&&t.top<=e.y&&t.bottom>=e.y}function nQ(e,t){return t.top<=e.y&&t.bottom>=e.y}var U3=30,oTe=120,rTe=120;function nTe(e,t,o="vertical",r={}){let n=o==="horizontal"?["left","right"]:["top","bottom"],i=0,s="before",a=1/0,c=null,u="right",{dropZoneElement:d,parentBlockOrientation:f,rootBlockIndex:m=0}=r;if(d&&f!=="horizontal"){let k=d.getBoundingClientRect(),[v,y]=Zm(t,k,["top","bottom"]);if(k.height>oTe&&v<U3){if(y==="top")return[m,"before"];if(y==="bottom")return[m+1,"after"]}}let h=(0,sQ.isRTL)();if(d&&f==="horizontal"){let k=d.getBoundingClientRect(),[v,y]=Zm(t,k,["left","right"]);if(k.width>rTe&&v<U3){if(h&&y==="right"||!h&&y==="left")return[m,"before"];if(h&&y==="left"||!h&&y==="right")return[m+1,"after"]}}e.forEach(({isUnmodifiedDefaultBlock:k,getBoundingClientRect:v,blockIndex:y,blockOrientation:_})=>{let S=v();if(!S)return;let[C,B]=Zm(t,S,n),[T,I]=Zm(t,S,["left","right"]),E=WE(t,S);k&&E?C=0:o==="vertical"&&_!=="horizontal"&&(E&&T<U3||!E&&nQ(t,S))&&(c=y,u=I),C<a&&(s=B==="bottom"||!h&&B==="right"||h&&B==="left"?"after":"before",a=C,i=y)});let p=i+(s==="after"?1:-1),g=!!e[i]?.isUnmodifiedDefaultBlock,b=!!e[p]?.isUnmodifiedDefaultBlock;return c!==null?[c,"group",u]:!g&&!b?[s==="after"?i+1:i,"insert"]:[g?i:p,"replace"]}function YE(e,t,o,r){let n=!0;if(t){let a=t?.map(({name:c})=>c);n=o.every(c=>a?.includes(c))}let s=o.map(a=>e(a)).every(a=>{let[c]=a?.parent||[];return c?c===r:!0});return n&&s}function iQ(e,t){let{defaultView:o}=t;return!!(o&&e instanceof o.HTMLElement&&e.closest("[data-is-insertion-point]"))}function aQ({dropZoneElement:e,rootClientId:t="",parentClientId:o="",isDisabled:r=!1}={}){let n=(0,Xm.useRegistry)(),[i,s]=(0,$E.useState)({index:null,operation:"insert"}),{getBlockType:a,getBlockVariations:c,getGroupingBlockName:u}=(0,Xm.useSelect)(Kg.store),{canInsertBlockType:d,getBlockListSettings:f,getBlocks:m,getBlockIndex:h,getDraggedBlockClientIds:p,getBlockNamesByClientId:g,getAllowedBlocks:b,isDragging:k,isGroupable:v,isZoomOut:y,getSectionRootClientId:_,getBlockParents:S}=M((0,Xm.useSelect)(x)),{showInsertionPoint:C,hideInsertionPoint:B,startDragging:T,stopDragging:I}=M((0,Xm.useDispatch)(x)),E=GE(i.operation==="before"||i.operation==="after"?o:t,i.index,{operation:i.operation,nearestSide:i.nearestSide}),L=(0,KE.useThrottle)((0,$E.useCallback)((P,O)=>{k()||T();let V=p(),j=[t,...S(t,!0)];if(V.some(te=>j.includes(te)))return;let z=b(t),U=g([t])[0],G=g(V);if(!YE(a,z,G,U))return;let J=_();if(y()&&J!==t)return;let le=m(t).filter(te=>!((0,Kg.hasBlockSupport)(te.name,"visibility",!0)&&te.attributes?.metadata?.blockVisibility===!1));if(le.length===0){n.batch(()=>{s({index:0,operation:"insert"}),C(t,0,{operation:"insert"})});return}let oe=le.map(te=>{let ne=te.clientId;return{isUnmodifiedDefaultBlock:(0,Kg.isUnmodifiedDefaultBlock)(te),getBoundingClientRect:()=>{let q=O.getElementById(`block-${ne}`);return q?q.getBoundingClientRect():null},blockIndex:h(ne),blockOrientation:f(ne)?.orientation}}),re=nTe(oe,{x:P.clientX,y:P.clientY},f(t)?.orientation,{dropZoneElement:e,parentBlockClientId:o,parentBlockOrientation:o?f(o)?.orientation:void 0,rootBlockIndex:h(t)}),[Q,$,ee]=re,Y=oe[Q]?.isUnmodifiedDefaultBlock;if(!(y()&&!Y&&$!=="insert")){if($==="group"){let te=le[Q],ne=[te.name,...G].every(Te=>Te==="core/image"),q=d("core/gallery",t),se=v([te.clientId,p()]),pe=c(u(),"block"),xe=pe&&pe.find(({name:Te})=>Te==="group-row");if(ne&&!q&&(!se||!xe)||!ne&&(!se||!xe))return}n.batch(()=>{s({index:Q,operation:$,nearestSide:ee});let te=["before","after"].includes($)?o:t;C(te,Q,{operation:$,nearestSide:ee})})}},[k,b,t,g,p,a,_,y,m,f,e,o,h,n,T,C,d,v,c,u]),200);return(0,KE.__experimentalUseDropZone)({dropZoneElement:e,isDisabled:r,onDrop:E,onDragOver(P){L(P,P.currentTarget.ownerDocument)},onDragLeave(P){let{ownerDocument:O}=P.currentTarget;iQ(P.relatedTarget,O)||iQ(P.target,O)||(L.cancel(),B())},onDragEnd(){L.cancel(),I(),B()}})}var lc=l(w(),1),iTe={};function sTe({children:e,clientId:t}){let o=oQ(t);return(0,lc.jsx)(q0,{value:o,children:e})}var aTe=(0,Yg.memo)(h_);function uQ(e){let{clientId:t,allowedBlocks:o,prioritizedInserterBlocks:r,defaultBlock:n,directInsert:i,__experimentalDefaultBlock:s,__experimentalDirectInsert:a,template:c,templateLock:u,wrapperRef:d,templateInsertUpdatesSelection:f,__experimentalCaptureToolbars:m,__experimentalAppenderTagName:h,renderAppender:p,orientation:g,placeholder:b,layout:k,name:v,blockType:y,parentLock:_,defaultLayout:S}=e;ZX(t,_,o,r,n,i,s,a,u,m,g,k),JX(t,c,u,f);let C=(0,Qm.getBlockSupport)(v,"layout")||(0,Qm.getBlockSupport)(v,"__experimentalLayout")||iTe,{allowSizingOnChildren:B=!1}=C,T=k||C,I=(0,Yg.useMemo)(()=>({...S,...T,...B&&{allowSizingOnChildren:!0}}),[S,T,B]),E=(0,lc.jsx)(aTe,{rootClientId:t,renderAppender:p,__experimentalAppenderTagName:h,layout:I,wrapperRef:d,placeholder:b});return!y?.providesContext||Object.keys(y.providesContext).length===0?E:(0,lc.jsx)(sTe,{clientId:t,children:E})}function lTe(e){return fB(e),(0,lc.jsx)(uQ,{...e})}var qE=(0,Yg.forwardRef)((e,t)=>{let o=Jm({ref:t},e);return(0,lc.jsx)("div",{className:"block-editor-inner-blocks",children:(0,lc.jsx)("div",{...o})})});function Jm(e={},t={}){let{__unstableDisableLayoutClassNames:o,__unstableDisableDropZone:r,dropZoneElement:n}=t,{clientId:i,layout:s=null,__unstableLayoutClassNames:a=""}=Ae(),c=(0,cQ.useSelect)(_=>{let{getBlockName:S,isZoomOut:C,getTemplateLock:B,getBlockRootClientId:T,getBlockEditingMode:I,getBlockSettings:E,getSectionRootClientId:L}=M(_(x));if(!i){let G=L();return{isDropZoneDisabled:C()&&G!==""}}let{hasBlockSupport:P,getBlockType:O}=_(Qm.store),V=S(i),j=I(i),H=T(i),[z]=E(i,"layout"),U=j==="disabled";if(C()){let G=L();U=i!==G}return{__experimentalCaptureToolbars:P(V,"__experimentalExposeControlsToChildren",!1),name:V,blockType:O(V),parentLock:B(H),parentClientId:H,isDropZoneDisabled:U,defaultLayout:z}},[i]),{__experimentalCaptureToolbars:u,name:d,blockType:f,parentLock:m,parentClientId:h,isDropZoneDisabled:p,defaultLayout:g}=c,b=aQ({dropZoneElement:n,rootClientId:i,parentClientId:h}),k=(0,lQ.useMergeRefs)([e.ref,r||p||s?.isManualPlacement&&window.__experimentalEnableGridInteractivity?null:b]),v={__experimentalCaptureToolbars:u,layout:s,name:d,blockType:f,parentLock:m,defaultLayout:g,...t},y=v.value&&v.onChange?lTe:uQ;return{...e,ref:k,className:D(e.className,"block-editor-block-list__layout",o?"":a),children:i?(0,lc.jsx)(y,{...v,clientId:i}):(0,lc.jsx)(h_,{...t})}}Jm.save=Qm.__unstableGetInnerBlocksProps;qE.DefaultBlockAppender=WX;qE.ButtonBlockAppender=HX;qE.Content=()=>Jm.save().children;var R_=qE;var O_=l(X(),1),qg=l(F(),1),H3=l(Fe(),1),Dr=l(it(),1);var dQ=l(w(),1),cTe=new Set([Dr.UP,Dr.RIGHT,Dr.DOWN,Dr.LEFT,Dr.ENTER,Dr.BACKSPACE]);function uTe(e){let{keyCode:t,shiftKey:o}=e;return!o&&cTe.has(t)}function A_(){let e=(0,qg.useSelect)(o=>o(x).isTyping(),[]),{stopTyping:t}=(0,qg.useDispatch)(x);return(0,O_.useRefEffect)(o=>{if(!e)return;let{ownerDocument:r}=o,n,i;function s(a){let{clientX:c,clientY:u}=a;n&&i&&(n!==c||i!==u)&&t(),n=c,i=u}return r.addEventListener("mousemove",s),()=>{r.removeEventListener("mousemove",s)}},[e,t])}function L_(){let e=(0,qg.useSelect)(i=>i(x).isTyping(),[]),{startTyping:t,stopTyping:o}=(0,qg.useDispatch)(x),r=A_(),n=(0,O_.useRefEffect)(i=>{if(e){let d=function(p){let{target:g}=p;h=i.ownerDocument.defaultView.setTimeout(()=>{(0,H3.isTextField)(g)||o()})},f=function(p){let{keyCode:g}=p;(g===Dr.ESCAPE||g===Dr.TAB)&&o()},m=function(){i.ownerDocument.defaultView.getSelection().isCollapsed||o()};var s=d,a=f,c=m;let h;return i.addEventListener("focus",d),i.addEventListener("keydown",f),i.ownerDocument.addEventListener("selectionchange",m),()=>{i.ownerDocument.defaultView.clearTimeout(h),i.removeEventListener("focus",d),i.removeEventListener("keydown",f),i.ownerDocument.removeEventListener("selectionchange",m)}}function u(d){let{type:f,target:m}=d;!(0,H3.isTextField)(m)||!i.contains(m)||f==="keydown"&&!uTe(d)||t()}return i.addEventListener("keypress",u),i.addEventListener("keydown",u),()=>{i.removeEventListener("keypress",u),i.removeEventListener("keydown",u)}},[e,t,o]);return(0,O_.useMergeRefs)([r,n])}function dTe({children:e}){return(0,dQ.jsx)("div",{ref:L_(),children:e})}var fQ=dTe;var N_=l(A(),1),mQ=l(X(),1),pQ=l(F(),1),hQ=l(R(),1),gQ=l(N(),1);var ZE=l(w(),1);function G3({clientId:e,rootClientId:t="",position:o="top"}){let[r,n]=(0,hQ.useState)(!1),{sectionRootClientId:i,sectionClientIds:s,insertionPoint:a,blockInsertionPointVisible:c,blockInsertionPoint:u,blocksBeingDragged:d}=(0,pQ.useSelect)(S=>{let{getInsertionPoint:C,getBlockOrder:B,getSectionRootClientId:T,isBlockInsertionPointVisible:I,getBlockInsertionPoint:E,getDraggedBlockClientIds:L}=M(S(x)),P=T(),O=B(P);return{sectionRootClientId:P,sectionClientIds:O,insertionPoint:C(),blockInsertionPoint:E(),blockInsertionPointVisible:I(),blocksBeingDragged:L()}},[]),f=(0,mQ.useReducedMotion)();if(!e)return;let m=!1;if(!(t===i&&s&&s.includes(e)))return null;let p=a?.index===0&&e===s[a.index],g=a&&a.hasOwnProperty("index")&&e===s[a.index-1];o==="top"&&(m=p||c&&u.index===0&&e===s[u.index]),o==="bottom"&&(m=g||c&&e===s[u.index-1]);let b=d[0],k=d.includes(e),v=s.indexOf(b),_=(v>0?s[v-1]:null)===e;return(k||_)&&(m=!1),(0,ZE.jsx)(N_.__unstableAnimatePresence,{children:m&&(0,ZE.jsx)(N_.__unstableMotion.div,{initial:{height:0},animate:{height:"calc(1 * var(--wp-block-editor-iframe-zoom-out-frame-size) / var(--wp-block-editor-iframe-zoom-out-scale)"},exit:{height:0},transition:{type:"tween",duration:f?0:.2,ease:[.6,0,.4,1]},className:D("block-editor-block-list__zoom-out-separator",{"is-dragged-over":r}),"data-is-insertion-point":"true",onDragOver:()=>n(!0),onDragLeave:()=>n(!1),children:(0,ZE.jsx)(N_.__unstableMotion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0,transition:{delay:-.125}},transition:{ease:"linear",duration:.1,delay:.125},children:(0,gQ.__)("Drop pattern.")})})})}var rn=l(w(),1),O1=(0,Sd.createContext)();O1.displayName="IntersectionObserverContext";var XE=new WeakMap,fTe={trailing:!0};function mTe({className:e,...t}){let{isOutlineMode:o,isFocusMode:r,isPreviewMode:n,editedContentOnlySection:i}=(0,ts.useSelect)(f=>{let{getSettings:m,isTyping:h,hasBlockSpotlight:p,getEditedContentOnlySection:g}=M(f(x)),{outlineMode:b,focusMode:k,isPreviewMode:v}=m();return{isOutlineMode:b&&!h(),isFocusMode:k||p(),isPreviewMode:v,editedContentOnlySection:g()}},[]),s=(0,ts.useRegistry)(),{setBlockVisibility:a}=(0,ts.useDispatch)(x),c=(0,QE.useDebounce)((0,Sd.useCallback)(()=>{let f={};XE.get(s).forEach(([m,h])=>{f[m]=h}),a(f)},[s]),300,fTe),u=(0,Sd.useMemo)(()=>{let{IntersectionObserver:f}=window;if(f)return new f(m=>{XE.get(s)||XE.set(s,[]);for(let h of m){let p=h.target.getAttribute("data-block");XE.get(s).push([p,h.isIntersecting])}c()})},[]),d=Jm({ref:(0,QE.useMergeRefs)([Ym(),VX(),L_()]),className:D("is-root-container",e,{"is-outline-mode":o,"is-focus-mode":r,"is-preview-mode":n})},t);return(0,rn.jsxs)(O1.Provider,{value:u,children:[(0,rn.jsx)("div",{...d}),!!i&&(0,rn.jsx)(pTe,{clientId:i})]})}function pTe({clientId:e}){let{stopEditingContentOnlySection:t}=M((0,ts.useDispatch)(x)),o=(0,ts.useSelect)(r=>{let{isBlockSelected:n,hasSelectedInnerBlock:i,getBlockSelectionStart:s}=r(x);return!s()||n(e)||i(e,!0)},[e]);return(0,Sd.useEffect)(()=>{o||t()},[o,t]),null}function Cg(e){return(0,rn.jsx)(W0,{value:vA,children:(0,rn.jsx)(mTe,{...e})})}var hTe=[],gTe=new Set;function bTe({placeholder:e,rootClientId:t,renderAppender:o,__experimentalAppenderTagName:r,layout:n=S5}){let i=o!==!1,s=!!o,{order:a,isZoomOut:c,selectedBlocks:u,visibleBlocks:d,shouldRenderAppender:f}=(0,ts.useSelect)(m=>{let{getSettings:h,getBlockOrder:p,getSelectedBlockClientIds:g,__unstableGetVisibleBlocks:b,getTemplateLock:k,getBlockEditingMode:v,isSectionBlock:y,isContainerInsertableToInContentOnlyMode:_,getBlockName:S,isZoomOut:C,canInsertBlockType:B}=M(m(x)),T=p(t);if(h().isPreviewMode)return{order:T,selectedBlocks:hTe,visibleBlocks:gTe};let I=g(),E=I[0],L=!t&&!E&&(!T.length||!B((0,bQ.getDefaultBlockName)(),t)),P=!!(t&&E&&t===E),O=k(t);return{order:T,selectedBlocks:I,visibleBlocks:b(),isZoomOut:C(),shouldRenderAppender:(!y(t)||_(S(E),t))&&v(t)!=="disabled"&&(!O||O==="contentOnly")&&i&&!C()&&(s||P||L)}},[t,i,s]);return(0,rn.jsxs)(V7,{value:n,children:[a.map(m=>(0,rn.jsxs)(ts.AsyncModeProvider,{value:!d.has(m)&&!u.includes(m),children:[c&&(0,rn.jsx)(G3,{clientId:m,rootClientId:t,position:"top"}),(0,rn.jsx)(zG,{rootClientId:t,clientId:m}),c&&(0,rn.jsx)(G3,{clientId:m,rootClientId:t,position:"bottom"})]},m)),a.length<1&&e,f&&(0,rn.jsx)(yX,{tagName:r,rootClientId:t,CustomAppender:o})]})}function h_(e){return(0,rn.jsx)(ts.AsyncModeProvider,{value:!1,children:(0,rn.jsx)(bTe,{...e})})}var yb=l(F(),1),V4=l(Fe(),1),F4=l(A(),1),ioe=l(Us(),1),wI=l(R(),1),_b=l(K(),1),z4=l(sr(),1),Sb=l(N(),1);var WQ=l(X(),1),$Q=l(F(),1),KQ=l(Fe(),1),Ha=l(R(),1);var ai=l(N(),1),tp=l(K(),1),aT=l(A(),1),FQ=l(X(),1),zQ=l(F(),1),lT=l(R(),1);var D_=l(A(),1),SQ=l(xy(),1),xQ=l(Le(),1),rT=l(R(),1);var Vr=l(A(),1),vQ=(0,Vr.createSlotFill)("InspectorControls"),vTe=(0,Vr.createSlotFill)("InspectorAdvancedControls"),kTe=(0,Vr.createSlotFill)("InspectorControlsBindings"),yTe=(0,Vr.createSlotFill)("InspectorControlsBackground"),_Te=(0,Vr.createSlotFill)("InspectorControlsBorder"),STe=(0,Vr.createSlotFill)("InspectorControlsColor"),xTe=(0,Vr.createSlotFill)("InspectorControlsFilter"),wTe=(0,Vr.createSlotFill)("InspectorControlsDimensions"),CTe=(0,Vr.createSlotFill)("InspectorControlsPosition"),BTe=(0,Vr.createSlotFill)("InspectorControlsTypography"),ETe=(0,Vr.createSlotFill)("InspectorControlsListView"),TTe=(0,Vr.createSlotFill)("InspectorControlsStyles"),ITe=(0,Vr.createSlotFill)("InspectorControlsEffects"),PTe=(0,Vr.createSlotFill)("InspectorControlsContent"),RTe={default:vQ,advanced:vTe,background:yTe,bindings:kTe,border:_Te,color:STe,content:PTe,dimensions:wTe,effects:ITe,filter:xTe,list:ETe,position:CTe,settings:vQ,styles:TTe,typography:BTe},os=RTe,M_=(0,Vr.createSlotFill)(Symbol("PrivateInspectorControlsAllowedBlocks"));var Zg=l(A(),1),eT=l(R(),1),kQ=l(X(),1),tT=l(F(),1);var JE=l(w(),1),yQ=Symbol("ListViewContentPopover"),{Fill:_Q,Slot:OTe}=(0,Zg.createSlotFill)(yQ);function ATe(){return(0,kQ.useViewportMatch)("medium","<")?{}:{popoverProps:{placement:"left-start",offset:35,resize:!1}}}function oT({listViewRef:e}){let{popoverProps:t}=ATe(),o=(0,Zg.__experimentalUseSlotFills)(yQ),r=!!(o&&o.length),{selectedClientId:n,isOpen:i}=(0,tT.useSelect)(u=>{let{getSelectedBlockClientId:d}=u(x),f=M(u(x));return{selectedClientId:d(),isOpen:f.isListViewContentPanelOpen()}},[]),[s,a]=(0,eT.useState)(null);(0,eT.useLayoutEffect)(()=>{if(!n||!e?.current){a(null);return}let u=e.current.querySelector(`[data-block="${n}"]`);a(u)},[n,e]);let{closeListViewContentPanel:c}=M((0,tT.useDispatch)(x));return!i||!r||!s?null:(0,JE.jsx)(Zg.Popover,{...t??{},className:"block-editor-inspector-list-view-content-popover",anchor:s,onClose:c,children:(0,JE.jsx)("div",{style:{width:"280px"},children:(0,JE.jsx)(OTe,{})})})}var xd=l(w(),1),LTe=["content","list"],NTe=["default","settings","advanced"];function ep({children:e,group:t="default",__experimentalGroup:o,resetAllFilter:r}){o&&((0,xQ.default)("`__experimentalGroup` property in `InspectorControlsFill`",{since:"6.2",version:"6.4",alternative:"`group`"}),t=o);let n=Ae(),i=os[t]?.Fill;if(!i)return(0,SQ.default)(`Unknown InspectorControls group "${t}" provided.`),null;if(n[uu]){let s=n.name==="core/template-part",a=NTe.includes(t),c=LTe.includes(t);if(!(s&&a||c))return null}return!n[uu]&&!n[Is]?null:t==="content"&&n[mk]&&n[uu]?n[Is]?(0,xd.jsx)(D_.__experimentalStyleProvider,{document,children:(0,xd.jsx)(_Q,{children:e})}):null:(0,xd.jsx)(D_.__experimentalStyleProvider,{document,children:(0,xd.jsx)(i,{children:s=>(0,xd.jsx)(DTe,{fillProps:s,children:e,resetAllFilter:r})})})}function MTe({resetAllFilter:e,children:t}){let{registerResetAllFilter:o,deregisterResetAllFilter:r}=(0,rT.useContext)(D_.__experimentalToolsPanelContext);return(0,rT.useEffect)(()=>{if(e&&o&&r)return o(e),()=>{r(e)}},[e,o,r]),t}function DTe({children:e,resetAllFilter:t,fillProps:o}){let{forwardedContext:r=[]}=o,n=(0,xd.jsx)(MTe,{resetAllFilter:t,children:e});return r.reduce((i,[s,a])=>(0,xd.jsx)(s,{...a,children:i}),n)}var RQ=l(A(),1),OQ=l(R(),1),AQ=l(xy(),1),LQ=l(Le(),1);var CQ=l(A(),1),nT=l(F(),1),BQ=l(R(),1);var wQ=l(X(),1);function zo(){return(0,wQ.useViewportMatch)("medium","<")?{}:{popoverProps:{placement:"left-start",offset:259}}}function Xg(e,t){if(!e||!t)return t;let o=e.split(","),r=t.split(","),n=[];return o.forEach(i=>{r.forEach(s=>{n.push(`${i.trim()} ${s.trim()}`)})}),n.join(", ")}var EQ=l(w(),1);function TQ({children:e,group:t,label:o}){let{updateBlockAttributes:r}=(0,nT.useDispatch)(x),{getBlockAttributes:n,getMultiSelectedBlockClientIds:i,getSelectedBlockClientId:s,hasMultiSelection:a}=(0,nT.useSelect)(x),c=zo(),u=s(),d=(0,BQ.useCallback)((f=[])=>{let m={},h=a()?i():[u];h.forEach(p=>{let{style:g}=n(p),b={style:g};f.forEach(k=>{b={...b,...k(b)}}),b={...b,style:De(b.style)},m[p]=b}),r(h,m,!0)},[n,i,a,u,r]);return(0,EQ.jsx)(CQ.__experimentalToolsPanel,{className:`${t}-block-support-panel`,label:o,resetAll:d,panelId:u,hasInnerWrapper:!0,shouldRenderPlaceholderItems:!0,__experimentalFirstVisibleItemClass:"first",__experimentalLastVisibleItemClass:"last",dropdownMenuProps:c,children:e},u)}var W3=l(A(),1),iT=l(R(),1),IQ=l(w(),1);function PQ({Slot:e,fillProps:t,...o}){let r=(0,iT.useContext)(W3.__experimentalToolsPanelContext),n=(0,iT.useMemo)(()=>({...t??{},forwardedContext:[...t?.forwardedContext??[],[W3.__experimentalToolsPanelContext.Provider,{value:r}]]}),[r,t]);return(0,IQ.jsx)(e,{...o,fillProps:n,bubblesVirtually:!0})}var sT=l(w(),1);function VTe({__experimentalGroup:e,group:t="default",label:o,fillProps:r,...n},i){e&&((0,LQ.default)("`__experimentalGroup` property in `InspectorControlsSlot`",{since:"6.2",version:"6.4",alternative:"`group`"}),t=e);let s=os[t],a=(0,RQ.__experimentalUseSlotFills)(s?.name);if(!s)return(0,AQ.default)(`Unknown InspectorControls group "${t}" provided.`),null;if(!a?.length)return null;let{Slot:c}=s;return o?(0,sT.jsx)(TQ,{group:t,label:o,children:(0,sT.jsx)(PQ,{...n,fillProps:r,Slot:c})}):(0,sT.jsx)(c,{...n,ref:i,fillProps:r,bubblesVirtually:!0})}var $3=(0,OQ.forwardRef)(VTe);var K3=l(w(),1),NQ=ep;NQ.Slot=$3;var wd=e=>(0,K3.jsx)(ep,{...e,group:"advanced"});wd.Slot=function(t){return(0,K3.jsx)($3,{...t,group:"advanced"})};wd.slotName="InspectorAdvancedControls";var fe=NQ;var DQ=l(F(),1),Cd=l(K(),1),V_=l(N(),1);function MQ(e){let t=e?.style?.position?.type;return t==="sticky"?(0,V_.__)("Sticky"):t==="fixed"?(0,V_.__)("Fixed"):null}function Lt(e){return(0,DQ.useSelect)(t=>{if(!e)return null;let{getBlockName:o,getBlockAttributes:r,__experimentalGetParsedPattern:n}=t(x),{getBlockType:i,getActiveBlockVariation:s}=t(Cd.store),a=o(e),c=i(a);if(!c)return null;let u=r(e),d=u?.metadata?.patternName;if(d){let k=n(d),v=MQ(u);return{isSynced:!1,title:(0,V_.__)("Pattern"),icon:Di,description:k?.description||(0,V_.__)("A block pattern."),anchor:u?.anchor,positionLabel:v,positionType:u?.style?.position?.type,name:k?.title||u?.metadata?.name}}let f=s(a,u),m=(0,Cd.isReusableBlock)(c)||(0,Cd.isTemplatePart)(c),p=(m?(0,Cd.__experimentalGetBlockLabel)(c,u):void 0)||c.title,g=MQ(u),b={isSynced:m,title:p,icon:c.icon,description:c.description,anchor:u?.anchor,positionLabel:g,positionType:u?.style?.position?.type,name:u?.metadata?.name};return f?{isSynced:m,title:f.title||c.title,icon:f.icon||c.icon,description:f.description||c.description,anchor:u?.anchor,positionLabel:g,positionType:u?.style?.position?.type,name:u?.metadata?.name}:b},[e])}var F_=l(w(),1),z_="position",Y3={key:"default",value:"",name:(0,ai.__)("Default")},q3={key:"sticky",value:"sticky",name:(0,ai._x)("Sticky","Name for the value of the CSS position property"),hint:(0,ai.__)("The block will stick to the top of the window instead of scrolling.")},VQ={key:"fixed",value:"fixed",name:(0,ai._x)("Fixed","Name for the value of the CSS position property"),hint:(0,ai.__)("The block will not move when the page is scrolled.")},FTe=["top","right","bottom","left"],zTe=["sticky","fixed"];function jTe({selector:e,style:t}){let o="",{type:r}=t?.position||{};return zTe.includes(r)&&(o+=`${e} {`,o+=`position: ${r};`,FTe.forEach(n=>{t?.position?.[n]!==void 0&&(o+=`${n}: ${t.position[n]};`)}),(r==="sticky"||r==="fixed")&&(o+="z-index: 10"),o+="}"),o}function UTe(e){let t=(0,tp.getBlockSupport)(e,z_);return!!(t===!0||t?.sticky)}function HTe(e){let t=(0,tp.getBlockSupport)(e,z_);return!!(t===!0||t?.fixed)}function GTe(e){return!!(0,tp.getBlockSupport)(e,z_)}function jQ(e){let t=e?.style?.position?.type;return t==="sticky"||t==="fixed"}function UQ({name:e}={}){let[t,o]=me("position.fixed","position.sticky"),r=!t&&!o;return!GTe(e)||r}function WTe({style:e={},clientId:t,name:o,setAttributes:r}){let n=HTe(o),i=UTe(o),s=e?.position?.type,{firstParentClientId:a}=(0,zQ.useSelect)(h=>{let{getBlockParents:p}=h(x),g=p(t);return{firstParentClientId:g[g.length-1]}},[t]),c=Lt(a),u=i&&s===q3.value&&c?(0,ai.sprintf)((0,ai.__)("The block will stick to the scrollable area of the parent %s block."),c.title):null,d=(0,lT.useMemo)(()=>{let h=[Y3];return(i||s===q3.value)&&h.push(q3),(n||s===VQ.value)&&h.push(VQ),h},[n,i,s]),f=h=>{let g={...e,position:{...e?.position,type:h,top:h==="sticky"||h==="fixed"?"0px":void 0}};r({style:De(g)})},m=s&&d.find(h=>h.value===s)||Y3;return lT.Platform.select({web:d.length>1?(0,F_.jsx)(fe,{group:"position",children:(0,F_.jsx)(aT.BaseControl,{help:u,children:(0,F_.jsx)(aT.CustomSelectControl,{__next40pxDefaultSize:!0,label:(0,ai.__)("Position"),hideLabelFromVision:!0,describedBy:(0,ai.sprintf)((0,ai.__)("Currently selected position: %s"),m.name),options:d,value:m,onChange:({selectedItem:h})=>{f(h.value)},size:"__unstable-large"})})}):null,native:null})}var Z3={edit:function(t){return UQ(t)?null:(0,F_.jsx)(WTe,{...t})},useBlockProps:KTe,attributeKeys:["style"],hasSupport(e){return(0,tp.hasBlockSupport)(e,z_)}},$Te={};function KTe({name:e,style:t}){let o=(0,tp.hasBlockSupport)(e,z_),r=UQ({name:e}),n=o&&!r,i=(0,FQ.useInstanceId)($Te),s=`.wp-container-${i}.wp-container-${i}`,a;n&&(a=jTe({selector:s,style:t})||"");let c=D({[`wp-container-${i}`]:n&&!!a,[`is-position-${t?.position?.type}`]:n&&!!a&&!!t?.position?.type});return li({css:a}),{className:c}}var YQ={placement:"top-start"},HQ={...YQ,flip:!1,shift:!0},YTe={...YQ,flip:!0,shift:!1};function GQ(e,t,o,r,n){if(!e||!t)return HQ;let i=o?.scrollTop||0,s=Zh(t),a=e.getBoundingClientRect(),c=i+a.top,u=e.ownerDocument.documentElement.clientHeight,d=c+r,f=s.top>d,m=s.height>u-r;return!n&&(f||m)?HQ:YTe}function cT({contentElement:e,clientId:t}){let o=st(t),[r,n]=(0,Ha.useState)(0),{blockIndex:i,isSticky:s}=(0,$Q.useSelect)(m=>{let{getBlockIndex:h,getBlockAttributes:p}=m(x);return{blockIndex:h(t),isSticky:jQ(p(t))}},[t]),a=(0,Ha.useMemo)(()=>{if(e)return(0,KQ.getScrollContainer)(e)},[e]),[c,u]=(0,Ha.useState)(()=>GQ(e,o,a,r,s)),d=(0,WQ.useRefEffect)(m=>{n(m.offsetHeight)},[]),f=(0,Ha.useCallback)(()=>u(GQ(e,o,a,r,s)),[e,o,a,r]);return(0,Ha.useLayoutEffect)(f,[i,f]),(0,Ha.useLayoutEffect)(()=>{if(!e||!o)return;let m=e?.ownerDocument?.defaultView;m?.addEventHandler?.("resize",f);let h,p=o?.ownerDocument?.defaultView;return p.ResizeObserver&&(h=new p.ResizeObserver(f),h.observe(o)),()=>{m?.removeEventHandler?.("resize",f),h&&h.disconnect()}},[f,e,o]),{...c,ref:d}}var qQ=l(F(),1);function uT(e){return(0,qQ.useSelect)(o=>{let{getBlockRootClientId:r,getBlockParents:n,__experimentalGetBlockListSettingsForBlocks:i,isBlockInsertionPointVisible:s,getBlockInsertionPoint:a,getBlockOrder:c,hasMultiSelection:u,getLastMultiSelectedBlockClientId:d}=o(x),f=n(e),m=i(f),h=f.find(g=>m[g]?.__experimentalCaptureToolbars),p=!1;if(s()){let g=a();p=c(g.rootClientId)[g.index]===e}return{capturingClientId:h,isInsertionPointVisible:p,lastClientId:u()?d():null,rootClientId:r(e)}},[e])}var dT=l(w(),1);function ZQ({clientId:e,__unstableContentRef:t}){let{capturingClientId:o,isInsertionPointVisible:r,lastClientId:n,rootClientId:i}=uT(e),s=cT({contentElement:t?.current,clientId:e});return(0,dT.jsx)(es,{clientId:o||e,bottomClientId:n,className:D("block-editor-block-list__block-side-inserter-popover",{"is-insertion-point-visible":r}),__unstableContentRef:t,...s,children:(0,dT.jsx)("div",{className:"block-editor-block-list__empty-block-inserter",children:(0,dT.jsx)(Ji,{position:"bottom right",rootClientId:i,clientId:e,__experimentalIsQuick:!0})})})}var Yte=l(F(),1),kb=l(R(),1),qte=l(Us(),1);var Hte=l(N(),1),Gte=l(F(),1),L4=l(R(),1),Wte=l(X(),1),yc=l(K(),1),$te=l(A(),1);var op=l(A(),1),aJ=l(F(),1),lJ=l(N(),1);var tJ=l(K(),1),oJ=l(A(),1),j_=l(F(),1),U_=l(R(),1),rJ=l(X(),1);var QQ=l(Fe(),1),Ga=l(R(),1),fT=50,JQ=25,qTe=1e3,XQ=qTe*(JQ/1e3);function eJ(){let e=(0,Ga.useRef)(null),t=(0,Ga.useRef)(null),o=(0,Ga.useRef)(null),r=(0,Ga.useRef)(null);(0,Ga.useEffect)(()=>()=>{r.current&&(clearInterval(r.current),r.current=null)},[]);let n=(0,Ga.useCallback)(a=>{e.current=a.clientY,o.current=(0,QQ.getScrollContainer)(a.target),r.current=setInterval(()=>{if(o.current&&t.current){let c=o.current.scrollTop+t.current;o.current.scroll({top:c})}},JQ)},[]),i=(0,Ga.useCallback)(a=>{if(!o.current)return;let c=o.current.offsetHeight,u=e.current-o.current.offsetTop,d=a.clientY-o.current.offsetTop;if(a.clientY>u){let f=Math.max(c-u-fT,0),m=Math.max(d-u-fT,0),h=f===0||m===0?0:m/f;t.current=XQ*h}else if(a.clientY<u){let f=Math.max(u-fT,0),m=Math.max(u-d-fT,0),h=f===0||m===0?0:m/f;t.current=-XQ*h}else t.current=0},[]);return[n,i,()=>{e.current=null,o.current=null,r.current&&(clearInterval(r.current),r.current=null)}]}var X3=l(w(),1),ZTe=({appendToOwnerDocument:e,children:t,clientIds:o,cloneClassname:r,elementId:n,onDragStart:i,onDragEnd:s,fadeWhenDisabled:a=!1,dragComponent:c})=>{let{srcRootClientId:u,isDraggable:d,icon:f,visibleInserter:m,getBlockType:h}=(0,j_.useSelect)(E=>{let{canMoveBlocks:L,getBlockRootClientId:P,getBlockName:O,getBlockAttributes:V,isBlockInsertionPointVisible:j}=E(x),{getBlockType:H,getActiveBlockVariation:z}=E(tJ.store),U=P(o[0]),G=O(o[0]),W=z(G,V(o[0]));return{srcRootClientId:U,isDraggable:L(o),icon:W?.icon||H(G)?.icon,visibleInserter:j(),getBlockType:H}},[o]),p=(0,U_.useRef)(!1),[g,b,k]=eJ(),{getAllowedBlocks:v,getBlockNamesByClientId:y,getBlockRootClientId:_}=(0,j_.useSelect)(x),{startDraggingBlocks:S,stopDraggingBlocks:C}=(0,j_.useDispatch)(x);(0,U_.useEffect)(()=>()=>{p.current&&C()},[]);let T=st(o[0])?.closest("body");return(0,U_.useEffect)(()=>{if(!T||!a)return;let L=(0,rJ.throttle)(P=>{if(!P.target.closest("[data-block]"))return;let O=y(o),V=P.target.closest("[data-block]").getAttribute("data-block"),j=v(V),H=y([V])[0],z;if(j?.length===0){let U=_(V),G=y([U])[0],W=v(U);z=YE(h,W,O,G)}else z=YE(h,j,O,H);!z&&!m?window?.document?.body?.classList?.add("block-draggable-invalid-drag-token"):window?.document?.body?.classList?.remove("block-draggable-invalid-drag-token")},200);return T.addEventListener("dragover",L),()=>{T.removeEventListener("dragover",L)}},[o,T,a,v,y,_,h,m]),d?(0,X3.jsx)(oJ.Draggable,{appendToOwnerDocument:e,cloneClassname:r,__experimentalTransferDataType:"wp-blocks",transferData:{type:"block",srcClientIds:o,srcRootClientId:u},onDragStart:E=>{window.requestAnimationFrame(()=>{S(o),p.current=!0,g(E),i&&i()})},onDragOver:b,onDragEnd:()=>{C(),p.current=!1,k(),s&&s()},__experimentalDragComponent:c!==void 0?c:(0,X3.jsx)(JB,{count:o.length,icon:f,fadeWhenDisabled:!0}),elementId:n,children:({onDraggableStart:E,onDraggableEnd:L})=>t({draggable:!0,onDragStart:E,onDragEnd:L})}):t({draggable:!1})},mT=ZTe;var iJ=l(K(),1),sJ=l(A(),1);var pT=l(X(),1),hT=l(F(),1),Qg=l(R(),1),rs=l(N(),1),Q3=l(it(),1);var ke=l(N(),1),Bd=(e,t)=>e==="up"?t==="horizontal"?(0,ke.isRTL)()?"right":"left":"up":e==="down"?t==="horizontal"?(0,ke.isRTL)()?"left":"right":"down":null;function nJ(e,t,o,r,n,i,s){let a=o+1;if(e>1)return XTe(e,o,r,n,i,s);if(r&&n)return(0,ke.sprintf)((0,ke.__)("Block %s is the only block, and cannot be moved"),t);if(i>0&&!n){let c=Bd("down",s);if(c==="down")return(0,ke.sprintf)((0,ke.__)("Move %1$s block from position %2$d down to position %3$d"),t,a,a+1);if(c==="left")return(0,ke.sprintf)((0,ke.__)("Move %1$s block from position %2$d left to position %3$d"),t,a,a+1);if(c==="right")return(0,ke.sprintf)((0,ke.__)("Move %1$s block from position %2$d right to position %3$d"),t,a,a+1)}if(i>0&&n){let c=Bd("down",s);if(c==="down")return(0,ke.sprintf)((0,ke.__)("Block %1$s is at the end of the content and can\u2019t be moved down"),t);if(c==="left")return(0,ke.sprintf)((0,ke.__)("Block %1$s is at the end of the content and can\u2019t be moved left"),t);if(c==="right")return(0,ke.sprintf)((0,ke.__)("Block %1$s is at the end of the content and can\u2019t be moved right"),t)}if(i<0&&!r){let c=Bd("up",s);if(c==="up")return(0,ke.sprintf)((0,ke.__)("Move %1$s block from position %2$d up to position %3$d"),t,a,a-1);if(c==="left")return(0,ke.sprintf)((0,ke.__)("Move %1$s block from position %2$d left to position %3$d"),t,a,a-1);if(c==="right")return(0,ke.sprintf)((0,ke.__)("Move %1$s block from position %2$d right to position %3$d"),t,a,a-1)}if(i<0&&r){let c=Bd("up",s);if(c==="up")return(0,ke.sprintf)((0,ke.__)("Block %1$s is at the beginning of the content and can\u2019t be moved up"),t);if(c==="left")return(0,ke.sprintf)((0,ke.__)("Block %1$s is at the beginning of the content and can\u2019t be moved left"),t);if(c==="right")return(0,ke.sprintf)((0,ke.__)("Block %1$s is at the beginning of the content and can\u2019t be moved right"),t)}}function XTe(e,t,o,r,n,i){let s=t+1;if(o&&r)return(0,ke.__)("All blocks are selected, and cannot be moved");if(n>0&&!r){let a=Bd("down",i);if(a==="down")return(0,ke.sprintf)((0,ke.__)("Move %1$d blocks from position %2$d down by one place"),e,s);if(a==="left")return(0,ke.sprintf)((0,ke.__)("Move %1$d blocks from position %2$d left by one place"),e,s);if(a==="right")return(0,ke.sprintf)((0,ke.__)("Move %1$d blocks from position %2$d right by one place"),e,s)}if(n>0&&r){let a=Bd("down",i);if(a==="down")return(0,ke.__)("Blocks cannot be moved down as they are already at the bottom");if(a==="left")return(0,ke.__)("Blocks cannot be moved left as they are already are at the leftmost position");if(a==="right")return(0,ke.__)("Blocks cannot be moved right as they are already are at the rightmost position")}if(n<0&&!o){let a=Bd("up",i);if(a==="up")return(0,ke.sprintf)((0,ke.__)("Move %1$d blocks from position %2$d up by one place"),e,s);if(a==="left")return(0,ke.sprintf)((0,ke.__)("Move %1$d blocks from position %2$d left by one place"),e,s);if(a==="right")return(0,ke.sprintf)((0,ke.__)("Move %1$d blocks from position %2$d right by one place"),e,s)}if(n<0&&o){let a=Bd("up",i);if(a==="up")return(0,ke.__)("Blocks cannot be moved up as they are already at the top");if(a==="left")return(0,ke.__)("Blocks cannot be moved left as they are already are at the leftmost position");if(a==="right")return(0,ke.__)("Blocks cannot be moved right as they are already are at the rightmost position")}}var cc=l(w(),1),QTe=(e,t)=>e==="up"?t==="horizontal"?(0,rs.isRTL)()?Ko:Yr:Zf:e==="down"?t==="horizontal"?(0,rs.isRTL)()?Yr:Ko:vr:null,JTe=(e,t)=>e==="up"?t==="horizontal"?(0,rs.isRTL)()?(0,rs.__)("Move right"):(0,rs.__)("Move left"):(0,rs.__)("Move up"):e==="down"?t==="horizontal"?(0,rs.isRTL)()?(0,rs.__)("Move left"):(0,rs.__)("Move right"):(0,rs.__)("Move down"):null,J3=(0,Qg.forwardRef)(({clientIds:e,direction:t,orientation:o,...r},n)=>{let i=(0,pT.useInstanceId)(J3),s=(0,Qg.useMemo)(()=>Array.isArray(e)?e:[e],[e]),a=s.length,c=(0,pT.useViewportMatch)("small","<"),{blockType:u,isDisabled:d,rootClientId:f,isFirst:m,isLast:h,firstIndex:p,orientation:g="vertical"}=(0,hT.useSelect)(S=>{let{getBlockIndex:C,getBlockRootClientId:B,getBlockOrder:T,getBlock:I,getBlockListSettings:E}=S(x),L=s[0],P=B(L),O=C(L),V=C(s[s.length-1]),j=T(P),H=I(L),z=O===0,U=V===j.length-1,{orientation:G}=E(P)||{};return{blockType:H?(0,iJ.getBlockType)(H.name):null,isDisabled:t==="up"?z:U,rootClientId:P,firstIndex:O,isFirst:z,isLast:U,orientation:o||G}},[t,o,s]),{moveBlocksDown:b,moveBlocksUp:k}=(0,hT.useDispatch)(x),v=t==="up"?k:b,y=S=>{v(e,f),r.onClick&&r.onClick(S)},_=`block-editor-block-mover-button__description-${i}`;return(0,cc.jsxs)(cc.Fragment,{children:[(0,cc.jsx)(sJ.Button,{__next40pxDefaultSize:!0,ref:n,className:D("block-editor-block-mover-button",`is-${t}-button`),icon:QTe(t,g),label:JTe(t,g),tooltipPosition:!c&&t==="down"&&g==="vertical"?"bottom":"top","aria-describedby":_,...r,onClick:d?null:y,disabled:d,accessibleWhenDisabled:!0,shortcut:t==="up"?Q3.displayShortcut.secondary("t"):Q3.displayShortcut.secondary("y")}),(0,cc.jsx)(We,{id:_,children:nJ(a,u&&u.title,p,m,h,t==="up"?-1:1,g)})]})}),gT=(0,Qg.forwardRef)((e,t)=>(0,cc.jsx)(J3,{direction:"up",ref:t,...e})),bT=(0,Qg.forwardRef)((e,t)=>(0,cc.jsx)(J3,{direction:"down",ref:t,...e}));var Wa=l(w(),1);function eIe({clientIds:e,hideDragHandle:t}){let{canMove:o,rootClientId:r,isFirst:n,isLast:i,orientation:s,isManualGrid:a}=(0,aJ.useSelect)(c=>{let{getBlockIndex:u,getBlockListSettings:d,canMoveBlocks:f,getBlockOrder:m,getBlockRootClientId:h,getBlockAttributes:p}=c(x),g=Array.isArray(e)?e:[e],b=g[0],k=h(b),v=u(b),y=u(g[g.length-1]),_=m(k),{layout:S={}}=p(k)??{};return{canMove:f(e),rootClientId:k,isFirst:v===0,isLast:y===_.length-1,orientation:d(k)?.orientation,isManualGrid:S.type==="grid"&&S.isManualPlacement&&window.__experimentalEnableGridInteractivity}},[e]);return!o||n&&i&&!r||t&&a?null:(0,Wa.jsxs)(op.ToolbarGroup,{className:D("block-editor-block-mover",{"is-horizontal":s==="horizontal"}),children:[!t&&(0,Wa.jsx)(mT,{clientIds:e,fadeWhenDisabled:!0,children:c=>(0,Wa.jsx)(op.Button,{__next40pxDefaultSize:!0,icon:Bk,className:"block-editor-block-mover__drag-handle",label:(0,lJ.__)("Drag"),tabIndex:"-1",...c})}),!a&&(0,Wa.jsxs)("div",{className:"block-editor-block-mover__move-button-container",children:[(0,Wa.jsx)(op.ToolbarItem,{children:c=>(0,Wa.jsx)(gT,{clientIds:e,...c})}),(0,Wa.jsx)(op.ToolbarItem,{children:c=>(0,Wa.jsx)(bT,{clientIds:e,...c})})]})]})}var vT=eIe;var dJ=l(A(),1),yT=l(F(),1),_T=l(N(),1),fJ=l(R(),1);var H_=l(F(),1),Ed=l(R(),1);var{clearTimeout:cJ,setTimeout:tIe}=window,uJ=200;function oIe({ref:e,isFocused:t,highlightParent:o,debounceTimeout:r=uJ}){let{getSelectedBlockClientId:n,getBlockRootClientId:i}=(0,H_.useSelect)(x),{toggleBlockHighlight:s}=(0,H_.useDispatch)(x),a=(0,Ed.useRef)(),c=(0,H_.useSelect)(g=>g(x).getSettings().isDistractionFree,[]),u=g=>{if(g&&c)return;let b=n(),k=o?i(b):b;s(k,g)},d=()=>e?.current&&e.current.matches(":hover"),f=()=>{let g=d();return!t&&!g},m=()=>{let g=a.current;g&&cJ&&cJ(g)},h=g=>{g&&g.stopPropagation(),m(),u(!0)},p=g=>{g&&g.stopPropagation(),m(),a.current=tIe(()=>{f()&&u(!1)},r)};return(0,Ed.useEffect)(()=>()=>{u(!1),m()},[]),{debouncedShowGestures:h,debouncedHideGestures:p}}function Jg({ref:e,highlightParent:t=!1,debounceTimeout:o=uJ}){let[r,n]=(0,Ed.useState)(!1),{debouncedShowGestures:i,debouncedHideGestures:s}=oIe({ref:e,debounceTimeout:o,isFocused:r,highlightParent:t}),a=(0,Ed.useRef)(!1),c=()=>e?.current&&e.current.contains(e.current.ownerDocument.activeElement);return(0,Ed.useEffect)(()=>{let u=e.current,d=()=>{c()&&(n(!0),i())},f=()=>{c()||(n(!1),s())};return u&&!a.current&&(u.addEventListener("focus",d,!0),u.addEventListener("blur",f,!0),a.current=!0),()=>{u&&(u.removeEventListener("focus",d),u.removeEventListener("blur",f))}},[e,a,n,i,s]),{onMouseMove:i,onMouseLeave:s}}var kT=l(w(),1);function mJ(){let{selectBlock:e}=(0,yT.useDispatch)(x),{parentClientId:t}=(0,yT.useSelect)(i=>{let{getBlockParents:s,getSelectedBlockClientId:a,getParentSectionBlock:c}=M(i(x)),u=a(),d=c(u),f=s(u);return{parentClientId:d??f[f.length-1]}},[]),o=Lt(t),r=(0,fJ.useRef)(),n=Jg({ref:r,highlightParent:!0});return(0,kT.jsx)("div",{className:"block-editor-block-parent-selector",ref:r,...n,children:(0,kT.jsx)(dJ.ToolbarButton,{className:"block-editor-block-parent-selector__button",onClick:()=>e(t),label:(0,_T.sprintf)((0,_T.__)("Select parent block: %s"),o?.title),showTooltip:!0,icon:(0,kT.jsx)(Me,{icon:o?.icon})})},t)}var ST=l(A(),1);var eb=l(A(),1),rIe=(0,eb.createSlotFill)("BlockControls"),nIe=(0,eb.createSlotFill)("BlockControlsBlock"),iIe=(0,eb.createSlotFill)("BlockFormatControls"),sIe=(0,eb.createSlotFill)("BlockControlsOther"),aIe=(0,eb.createSlotFill)("BlockControlsParent"),lIe={default:rIe,block:nIe,inline:iIe,other:sIe,parent:aIe},G_=lIe;function pJ(e,t){let o=Ae();return o[Is]?G_[e]?.Fill:o[ih]&&t?G_.parent.Fill:null}var uc=l(w(),1);function e4({group:e="default",controls:t,children:o,__experimentalShareWithChildBlocks:r=!1}){let n=pJ(e,r);if(!n)return null;let i=(0,uc.jsxs)(uc.Fragment,{children:[e==="default"&&(0,uc.jsx)(ST.ToolbarGroup,{controls:t}),o]});return(0,uc.jsx)(ST.__experimentalStyleProvider,{document,children:(0,uc.jsx)(n,{children:s=>{let{forwardedContext:a=[]}=s;return a.reduce((c,[u,d])=>(0,uc.jsx)(u,{...d,children:c}),i)}})})}var W_=l(R(),1),dc=l(A(),1),gJ=l(xy(),1);var t4=l(w(),1),{ComponentsContext:hJ}=M(dc.privateApis);function o4({group:e="default",...t}){let o=(0,W_.useContext)(dc.__experimentalToolbarContext),r=(0,W_.useContext)(hJ),n=(0,W_.useMemo)(()=>({forwardedContext:[[dc.__experimentalToolbarContext.Provider,{value:o}],[hJ.Provider,{value:r}]]}),[o,r]),i=G_[e],s=(0,dc.__experimentalUseSlotFills)(i.name);if(!i)return(0,gJ.default)(`Unknown BlockControls group "${e}" provided.`),null;if(!s?.length)return null;let{Slot:a}=i,c=(0,t4.jsx)(a,{...t,bubblesVirtually:!0,fillProps:n});return e==="default"?c:(0,t4.jsx)(dc.ToolbarGroup,{children:c})}var r4=l(w(),1),bJ=e4;bJ.Slot=o4;var n4=e=>(0,r4.jsx)(e4,{group:"inline",...e});n4.Slot=function(t){return(0,r4.jsx)(o4,{group:"inline",...t})};var Wt=bJ;var vJ=l(A(),1),{Fill:kJ,Slot:cIe}=(0,vJ.createSlotFill)("__unstableBlockToolbarLastItem");kJ.Slot=cIe;var xT=kJ;var HT=l(A(),1);var ib=l(K(),1),nn=l(A(),1),Pd=l(F(),1);var jT=l(R(),1),is=l(N(),1),_ee=l(Us(),1),pc=l(X(),1);var ob=l(F(),1),Td=l(K(),1);var MJ=l(R(),1),K_=l(K(),1),$_=l(F(),1),DJ=l(Xn(),1),fc=l(N(),1);var ci=l(K(),1),yJ=l(R(),1),uIe="align";var _J="__experimentalBorder",wT="color",dIe="customClassName",SJ="typography.__experimentalFontFamily",xJ="typography.fontSize",fIe="typography.lineHeight",mIe="typography.__experimentalFontStyle",pIe="typography.__experimentalFontWeight",wJ="typography.textAlign",hIe="typography.textColumns",gIe="typography.__experimentalTextDecoration",bIe="typography.__experimentalWritingMode",vIe="typography.__experimentalTextTransform",kIe="typography.__experimentalLetterSpacing",yIe="layout",_Ie=[fIe,xJ,mIe,pIe,SJ,wJ,hIe,gIe,vIe,bIe,kIe],SIe=["shadow"],xIe="spacing",wIe=[...SIe,..._Ie,_J,wT,xIe],CJ=e=>(0,ci.hasBlockSupport)(e,uIe);function BJ(e,t="any"){if(yJ.Platform.OS!=="web")return!1;let o=(0,ci.getBlockSupport)(e,_J);return o===!0?!0:t==="any"?!!(o?.color||o?.radius||o?.width||o?.style):!!o?.[t]}var EJ=e=>{let t=(0,ci.getBlockSupport)(e,wT);return t!==null&&typeof t=="object"&&!!t.gradients},TJ=e=>{let t=(0,ci.getBlockSupport)(e,wT);return t&&t.background!==!1},IJ=e=>(0,ci.hasBlockSupport)(e,wJ);var PJ=e=>{let t=(0,ci.getBlockSupport)(e,wT);return t&&t.text!==!1};var RJ=e=>(0,ci.hasBlockSupport)(e,dIe,!0);var OJ=e=>(0,ci.hasBlockSupport)(e,SJ);var AJ=e=>(0,ci.hasBlockSupport)(e,xJ);var LJ=e=>(0,ci.hasBlockSupport)(e,yIe);var NJ=e=>wIe.some(t=>(0,ci.hasBlockSupport)(e,t));function CIe(e){try{let t=(0,K_.parse)(e,{__unstableSkipMigrationLogs:!0,__unstableSkipAutop:!0});return!(t.length===1&&t[0].name==="core/freeform")}catch{return!1}}var BIe={align:CJ,borderColor:e=>BJ(e,"color"),backgroundColor:TJ,textAlign:IJ,textColor:PJ,gradient:EJ,className:RJ,fontFamily:OJ,fontSize:AJ,layout:LJ,style:NJ};function EIe(e,t){return Object.entries(BIe).reduce((o,[r,n])=>(n(e.name)&&n(t.name)&&(o[r]=e.attributes[r]),o),{})}function i4(e,t,o){for(let r=0;r<Math.min(t.length,e.length);r+=1)o(e[r].clientId,EIe(t[r],e[r])),i4(e[r].innerBlocks,t[r].innerBlocks,o)}function tb(){let e=(0,$_.useRegistry)(),{updateBlockAttributes:t}=(0,$_.useDispatch)(x),{createSuccessNotice:o,createWarningNotice:r,createErrorNotice:n}=(0,$_.useDispatch)(DJ.store);return(0,MJ.useCallback)(async i=>{let s="";try{if(!window.navigator.clipboard){n((0,fc.__)("Unable to paste styles. This feature is only available on secure (https) sites in supporting browsers."),{type:"snackbar"});return}s=await window.navigator.clipboard.readText()}catch{n((0,fc.__)("Unable to paste styles. Please allow browser clipboard permissions before continuing."),{type:"snackbar"});return}if(!s||!CIe(s)){r((0,fc.__)("Unable to paste styles. Block styles couldn't be found within the copied content."),{type:"snackbar"});return}let a=(0,K_.parse)(s);if(a.length===1?e.batch(()=>{i4(i,i.map(()=>a[0]),t)}):e.batch(()=>{i4(i,a,t)}),i.length===1){let c=(0,K_.getBlockType)(i[0].name)?.title;o((0,fc.sprintf)((0,fc.__)("Pasted styles to %s."),c),{type:"snackbar"})}else o((0,fc.sprintf)((0,fc.__)("Pasted styles to %d blocks."),i.length),{type:"snackbar"})},[e.batch,t,o,r,n])}function VJ({clientIds:e,children:t,__experimentalUpdateSelection:o}){let{getDefaultBlockName:r,getGroupingBlockName:n}=(0,ob.useSelect)(Td.store),i=(0,ob.useSelect)(y=>{let{canInsertBlockType:_,getBlockRootClientId:S,getBlocksByClientId:C,getDirectInsertBlock:B,canRemoveBlocks:T}=y(x),I=C(e),E=S(e[0]),L=_(r(),E),P=E?B(E):null;return{canRemove:T(e),canInsertBlock:I.every(O=>(L||!!P)&&_(O.name,E)),canCopyStyles:I.every(O=>!!O&&((0,Td.hasBlockSupport)(O.name,"color")||(0,Td.hasBlockSupport)(O.name,"typography"))),canDuplicate:I.every(O=>!!O&&(0,Td.hasBlockSupport)(O.name,"multiple",!0)&&_(O.name,E))}},[e,r]),{getBlocksByClientId:s,getBlocks:a}=(0,ob.useSelect)(x),{canRemove:c,canInsertBlock:u,canCopyStyles:d,canDuplicate:f}=i,{removeBlocks:m,replaceBlocks:h,duplicateBlocks:p,insertAfterBlock:g,insertBeforeBlock:b,flashBlock:k}=(0,ob.useDispatch)(x),v=tb();return t({canCopyStyles:d,canDuplicate:f,canInsertBlock:u,canRemove:c,onDuplicate(){return p(e,o)},onRemove(){return m(e,o)},onInsertBefore(){b(e[0])},onInsertAfter(){g(e[e.length-1])},onGroup(){if(!e.length)return;let y=n(),_=(0,Td.switchToBlockType)(s(e),y);_&&h(e,_)},onUngroup(){if(!e.length)return;let y=a(e[0]);y.length&&h(e,y)},onCopy(){e.length===1&&k(e[0])},async onPasteStyles(){await v(s(e))}})}var FJ=l(A(),1),TIe=(0,FJ.createSlotFill)(Symbol("NoteIconSlotFill")),CT=TIe;var zJ=l(N(),1),jJ=l(A(),1),BT=l(K(),1),ET=l(F(),1);var UJ=l(w(),1);function IIe({clientId:e}){let t=(0,ET.useSelect)(r=>r(x).getBlock(e),[e]),{replaceBlocks:o}=(0,ET.useDispatch)(x);return!t||t.name!=="core/html"?null:(0,UJ.jsx)(jJ.MenuItem,{onClick:()=>o(e,(0,BT.rawHandler)({HTML:(0,BT.getBlockContent)(t)})),children:(0,zJ.__)("Convert to Blocks")})}var HJ=IIe;var GJ=l(A(),1),{Fill:WJ,Slot:PIe}=(0,GJ.createSlotFill)("__unstableBlockSettingsMenuFirstItem");WJ.Slot=PIe;var TT=WJ;var nb=l(A(),1),mee=l(K(),1),pee=l(F(),1);var a4=l(A(),1),l4=l(N(),1),YJ=l(K(),1),RT=l(F(),1),qJ=l(it(),1);var $J=l(K(),1),KJ=l(F(),1);function Y_(e){return(0,KJ.useSelect)(t=>{let{getBlocksByClientId:o,getSelectedBlockClientIds:r,isUngroupable:n,isGroupable:i}=t(x),{getGroupingBlockName:s,getBlockType:a}=t($J.store),c=e?.length?e:r(),u=o(c),[d]=u,f=c.length===1&&n(c[0]);return{clientIds:c,isGroupable:i(c),isUngroupable:f,blocksSelection:u,groupingBlockName:s(),onUngroup:f&&a(d.name)?.transforms?.ungroup}},[e])}var IT=l(F(),1),PT=l(K(),1),rp=l(A(),1);var q_=l(N(),1);var np=l(w(),1),RIe={group:{type:"constrained"},row:{type:"flex",flexWrap:"nowrap"},stack:{type:"flex",orientation:"vertical"},grid:{type:"grid"}};function OIe(){let{blocksSelection:e,clientIds:t,groupingBlockName:o,isGroupable:r}=Y_(),{replaceBlocks:n}=(0,IT.useDispatch)(x),{canRemove:i,variations:s}=(0,IT.useSelect)(p=>{let{canRemoveBlocks:g}=p(x),{getBlockVariations:b}=p(PT.store);return{canRemove:g(t),variations:b(o,"transform")}},[t,o]),a=p=>{let g=(0,PT.switchToBlockType)(e,o);typeof p!="string"&&(p="group"),g&&g.length>0&&(g[0].attributes.layout=RIe[p],n(t,g))},c=()=>a("row"),u=()=>a("stack"),d=()=>a("grid");if(!r||!i)return null;let f=!!s.find(({name:p})=>p==="group-row"),m=!!s.find(({name:p})=>p==="group-stack"),h=!!s.find(({name:p})=>p==="group-grid");return(0,np.jsxs)(rp.ToolbarGroup,{children:[(0,np.jsx)(rp.ToolbarButton,{icon:Ik,label:(0,q_._x)("Group","action: convert blocks to group"),onClick:a}),f&&(0,np.jsx)(rp.ToolbarButton,{icon:JN,label:(0,q_._x)("Row","action: convert blocks to row"),onClick:c}),m&&(0,np.jsx)(rp.ToolbarButton,{icon:pM,label:(0,q_._x)("Stack","action: convert blocks to stack"),onClick:u}),h&&(0,np.jsx)(rp.ToolbarButton,{icon:Tk,label:(0,q_._x)("Grid","action: convert blocks to grid"),onClick:d})]})}var s4=OIe;var ip=l(w(),1);function ZJ({clientIds:e,isGroupable:t,isUngroupable:o,onUngroup:r,blocksSelection:n,groupingBlockName:i,onClose:s=()=>{}}){let{getSelectedBlockClientIds:a}=(0,RT.useSelect)(x),{replaceBlocks:c}=(0,RT.useDispatch)(x),u=()=>{let m=(0,YJ.switchToBlockType)(n,i);m&&c(e,m)},d=()=>{let m=n[0].innerBlocks;m.length&&(r&&(m=r(n[0].attributes,n[0].innerBlocks)),c(e,m))};if(!t&&!o)return null;let f=a();return(0,ip.jsxs)(ip.Fragment,{children:[t&&(0,ip.jsx)(a4.MenuItem,{shortcut:f.length>1?qJ.displayShortcut.primary("g"):void 0,onClick:()=>{u(),s()},children:(0,l4._x)("Group","verb")}),o&&(0,ip.jsx)(a4.MenuItem,{onClick:()=>{d(),s()},children:(0,l4._x)("Ungroup","Ungrouping blocks from within a grouping block back into individual blocks within the Editor")})]})}var c4=l(N(),1),JJ=l(R(),1),eee=l(A(),1);var XJ=l(F(),1);function ui(e){return(0,XJ.useSelect)(t=>{let{canLockBlockType:o,getBlockName:r,isEditLockedBlock:n,isMoveLockedBlock:i,isRemoveLockedBlock:s,isLockedBlock:a}=M(t(x));return{isEditLocked:n(e),isMoveLocked:i(e),isRemoveLocked:s(e),canLock:o(r(e)),isLocked:a(e)}},[e])}var ns=l(N(),1),Z_=l(R(),1),To=l(A(),1);var OT=l(F(),1),QJ=l(K(),1);var Nt=l(w(),1),AIe=["core/navigation"];function LIe(e){return e.remove&&e.move?"all":e.remove&&!e.move?"insert":!1}function AT({clientId:e,onClose:t}){let[o,r]=(0,Z_.useState)({move:!1,remove:!1}),{isEditLocked:n,isMoveLocked:i,isRemoveLocked:s}=ui(e),{allowsEditLocking:a,templateLock:c,hasTemplateLock:u}=(0,OT.useSelect)(k=>{let{getBlockName:v,getBlockAttributes:y}=k(x),_=v(e),S=(0,QJ.getBlockType)(_);return{allowsEditLocking:AIe.includes(_),templateLock:y(e)?.templateLock,hasTemplateLock:!!S?.attributes?.templateLock}},[e]),[d,f]=(0,Z_.useState)(!!c),{updateBlockAttributes:m}=(0,OT.useDispatch)(x),h=Lt(e);(0,Z_.useEffect)(()=>{r({move:i,remove:s,...a?{edit:n}:{}})},[n,i,s,a]);let p=Object.values(o).every(Boolean),g=Object.values(o).some(Boolean)&&!p,b=o.move!==i||o.remove!==s||a&&o.edit!==n||u&&d!==!!c;return(0,Nt.jsx)(To.Modal,{title:(0,ns.sprintf)((0,ns.__)("Lock %s"),h.title),overlayClassName:"block-editor-block-lock-modal",onRequestClose:t,size:"small",children:(0,Nt.jsxs)("form",{onSubmit:k=>{k.preventDefault(),b&&(m([e],{lock:o,templateLock:d?LIe(o):void 0}),t())},children:[(0,Nt.jsxs)("fieldset",{className:"block-editor-block-lock-modal__options",children:[(0,Nt.jsx)("legend",{children:(0,ns.__)("Select the features you want to lock")}),(0,Nt.jsx)("ul",{role:"list",className:"block-editor-block-lock-modal__checklist",children:(0,Nt.jsxs)("li",{children:[(0,Nt.jsx)(To.CheckboxControl,{className:"block-editor-block-lock-modal__options-all",label:(0,ns.__)("Lock all"),checked:p,indeterminate:g,onChange:k=>r({move:k,remove:k,...a?{edit:k}:{}})}),(0,Nt.jsxs)("ul",{role:"list",className:"block-editor-block-lock-modal__checklist",children:[a&&(0,Nt.jsxs)("li",{className:"block-editor-block-lock-modal__checklist-item",children:[(0,Nt.jsx)(To.CheckboxControl,{label:(0,ns.__)("Lock editing"),checked:!!o.edit,onChange:k=>r(v=>({...v,edit:k}))}),(0,Nt.jsx)(To.Icon,{className:"block-editor-block-lock-modal__lock-icon",icon:o.edit?nm:Rl})]}),(0,Nt.jsxs)("li",{className:"block-editor-block-lock-modal__checklist-item",children:[(0,Nt.jsx)(To.CheckboxControl,{label:(0,ns.__)("Lock movement"),checked:o.move,onChange:k=>r(v=>({...v,move:k}))}),(0,Nt.jsx)(To.Icon,{className:"block-editor-block-lock-modal__lock-icon",icon:o.move?nm:Rl})]}),(0,Nt.jsxs)("li",{className:"block-editor-block-lock-modal__checklist-item",children:[(0,Nt.jsx)(To.CheckboxControl,{label:(0,ns.__)("Lock removal"),checked:o.remove,onChange:k=>r(v=>({...v,remove:k}))}),(0,Nt.jsx)(To.Icon,{className:"block-editor-block-lock-modal__lock-icon",icon:o.remove?nm:Rl})]})]})]})}),u&&(0,Nt.jsx)(To.ToggleControl,{className:"block-editor-block-lock-modal__template-lock",label:(0,ns.__)("Apply to all blocks inside"),checked:d,disabled:o.move&&!o.remove,onChange:()=>f(!d)})]}),(0,Nt.jsxs)(To.Flex,{className:"block-editor-block-lock-modal__actions",justify:"flex-end",expanded:!1,children:[(0,Nt.jsx)(To.FlexItem,{children:(0,Nt.jsx)(To.Button,{variant:"tertiary",onClick:t,__next40pxDefaultSize:!0,children:(0,ns.__)("Cancel")})}),(0,Nt.jsx)(To.FlexItem,{children:(0,Nt.jsx)(To.Button,{variant:"primary",type:"submit",disabled:!b,accessibleWhenDisabled:!0,__next40pxDefaultSize:!0,children:(0,ns.__)("Apply")})})]})]})})}var sp=l(w(),1);function u4({clientId:e}){let{canLock:t,isLocked:o}=ui(e),[r,n]=(0,JJ.useReducer)(s=>!s,!1);if(!t)return null;let i=o?(0,c4.__)("Unlock"):(0,c4.__)("Lock");return(0,sp.jsxs)(sp.Fragment,{children:[(0,sp.jsx)(eee.MenuItem,{icon:o?Rl:EN,onClick:n,"aria-expanded":r,"aria-haspopup":"dialog",children:i}),r&&(0,sp.jsx)(AT,{clientId:e,onClose:n})]})}var LT=l(N(),1),NT=l(A(),1),rb=l(R(),1);var Id=l(w(),1);function d4({clientId:e}){let{canLock:t,isLocked:o}=ui(e),[r,n]=(0,rb.useReducer)(a=>!a,!1),i=(0,rb.useRef)(!1);if((0,rb.useEffect)(()=>{o&&(i.current=!0)},[o]),!o&&!i.current)return null;let s=o?(0,LT.__)("Unlock"):(0,LT.__)("Lock");return!t&&o&&(s=(0,LT.__)("Locked")),(0,Id.jsxs)(Id.Fragment,{children:[(0,Id.jsx)(NT.ToolbarGroup,{className:"block-editor-block-lock-toolbar",children:(0,Id.jsx)(NT.ToolbarButton,{disabled:!t,icon:o?nm:Rl,label:s,onClick:n,"aria-expanded":r,"aria-haspopup":"dialog"})}),r&&(0,Id.jsx)(AT,{clientId:e,onClose:n})]})}var f4=l(N(),1),tee=l(A(),1),MT=l(K(),1),DT=l(F(),1);var oee=l(w(),1),NIe=()=>{};function ree({clientId:e,onToggle:t=NIe}){let{blockType:o,mode:r,enabled:n}=(0,DT.useSelect)(a=>{let{getBlock:c,getBlockMode:u,getSettings:d}=a(x),f=c(e);return{mode:u(e),blockType:f?(0,MT.getBlockType)(f.name):null,enabled:d().codeEditingEnabled&&!!f?.isValid}},[e]),{toggleBlockMode:i}=(0,DT.useDispatch)(x);if(!o||!(0,MT.hasBlockSupport)(o,"html",!0)||!n)return null;let s=r==="visual"?(0,f4.__)("Edit as HTML"):(0,f4.__)("Edit visually");return(0,oee.jsx)(tee.MenuItem,{onClick:()=>{i(e),t()},children:s})}var aee=l(A(),1),lee=l(N(),1),cee=l(R(),1),uee=l(F(),1),dee=l(Us(),1);var Js=l(A(),1),Qs=l(N(),1),iee=l(R(),1),see=l(sr(),1),VT=l(F(),1);function nee(e){return e?.trim()?.length===0}var mc=l(w(),1);function ap({clientId:e,onClose:t}){let[o,r]=(0,iee.useState)(),n=Lt(e),{metadata:i}=(0,VT.useSelect)(b=>{let{getBlockAttributes:k}=b(x);return{metadata:k(e)?.metadata}},[e]),{updateBlockAttributes:s}=(0,VT.useDispatch)(x),a=i?.name||"",c=n?.title,u=!!a&&!!i?.bindings&&Object.values(i.bindings).some(b=>b.source==="core/pattern-overrides"),d=o!==void 0&&o!==a,f=o===c,m=nee(o),h=d||f,p=b=>b.target.select(),g=()=>{let b=f||m?void 0:o,k=f||m?(0,Qs.sprintf)((0,Qs.__)('Block name reset to: "%s".'),o):(0,Qs.sprintf)((0,Qs.__)('Block name changed to: "%s".'),o);(0,see.speak)(k,"assertive"),s([e],{metadata:De({...i,name:b})}),t()};return(0,mc.jsx)(Js.Modal,{title:(0,Qs.__)("Rename"),onRequestClose:t,overlayClassName:"block-editor-block-rename-modal",focusOnMount:"firstContentElement",size:"small",children:(0,mc.jsx)("form",{onSubmit:b=>{b.preventDefault(),h&&g()},children:(0,mc.jsxs)(Js.__experimentalVStack,{spacing:"3",children:[(0,mc.jsx)(Js.TextControl,{__next40pxDefaultSize:!0,value:o??a,label:(0,Qs.__)("Name"),help:u?(0,Qs.__)("This block allows overrides. Changing the name can cause problems with content entered into instances of this pattern."):void 0,placeholder:c,onChange:r,onFocus:p}),(0,mc.jsxs)(Js.__experimentalHStack,{justify:"right",children:[(0,mc.jsx)(Js.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:t,children:(0,Qs.__)("Cancel")}),(0,mc.jsx)(Js.Button,{__next40pxDefaultSize:!0,accessibleWhenDisabled:!0,disabled:!h,variant:"primary",type:"submit",children:(0,Qs.__)("Save")})]})]})})})}var lp=l(w(),1);function m4({clientId:e}){let[t,o]=(0,cee.useState)(!1),r=(0,uee.useSelect)(n=>n(dee.store).getShortcutRepresentation("core/block-editor/rename"),[]);return(0,lp.jsxs)(lp.Fragment,{children:[(0,lp.jsx)(aee.MenuItem,{onClick:()=>{o(!0)},"aria-expanded":t,"aria-haspopup":"dialog",shortcut:r,children:(0,lee.__)("Rename")}),t&&(0,lp.jsx)(ap,{clientId:e,onClose:()=>o(!1)})]})}var fee=l(K(),1);function cp(e){return{canRename:!!e&&(0,fee.getBlockSupport)(e,"renaming",!0)}}var ea=l(w(),1),{Fill:MIe,Slot:DIe}=(0,nb.createSlotFill)("BlockSettingsMenuControls"),VIe=({fillProps:e,clientIds:t=null})=>{let{selectedBlocks:o,selectedClientIds:r,isContentOnly:n,canToggleSelectedBlocksVisibility:i,canEdit:s}=(0,pee.useSelect)(b=>{let{getBlocksByClientId:k,getBlockNamesByClientId:v,getSelectedBlockClientIds:y,getBlockEditingMode:_,canEditBlock:S}=b(x),C=t!==null?t:y();return{selectedBlocks:v(C),selectedClientIds:C,isContentOnly:_(C[0])==="contentOnly",canToggleSelectedBlocksVisibility:k(C).every(B=>(0,mee.hasBlockSupport)(B.name,"visibility",!0)),canEdit:S(C[0])}},[t]),{canLock:a}=ui(r[0]),{canRename:c}=cp(o[0]),u=r.length===1&&a&&!n,d=r.length===1&&c&&!n,f=i&&!n,m=Y_(r),{isGroupable:h,isUngroupable:p}=m,g=(h||p)&&!n;return(0,ea.jsx)(DIe,{fillProps:{...e,canEdit:s,selectedBlocks:o,selectedClientIds:r},children:b=>!b?.length>0&&!g&&!u?null:(0,ea.jsxs)(nb.MenuGroup,{children:[g&&(0,ea.jsx)(ZJ,{...m,onClose:e?.onClose}),s&&u&&(0,ea.jsx)(u4,{clientId:r[0]}),s&&d&&(0,ea.jsx)(m4,{clientId:r[0]}),s&&f&&(0,ea.jsx)(ID,{clientIds:r}),b,s&&e?.count===1&&!n&&(0,ea.jsx)(ree,{clientId:e?.firstBlockClientId,onToggle:e?.onClose})]})})};function hee({...e}){return(0,ea.jsx)(nb.__experimentalStyleProvider,{document,children:(0,ea.jsx)(MIe,{...e})})}hee.Slot=VIe;var FT=hee;var gee=l(R(),1),bee=l(A(),1),vee=l(X(),1),kee=l(F(),1),zT=l(N(),1);var p4=l(w(),1);function yee({parentClientId:e,parentBlockType:t}){let o=(0,vee.useViewportMatch)("medium","<"),{selectBlock:r}=(0,kee.useDispatch)(x),n=(0,gee.useRef)(),i=Jg({ref:n,highlightParent:!0});return o?(0,p4.jsx)(bee.MenuItem,{...i,ref:n,icon:(0,p4.jsx)(Me,{icon:t.icon}),onClick:()=>r(e),children:(0,zT.sprintf)((0,zT.__)("Select parent block (%s)"),t.title)}):null}var tt=l(w(),1),FIe={className:"block-editor-block-settings-menu__popover",placement:"bottom-start"};function h4({clientIds:e,onCopy:t,label:o,shortcut:r,eventType:n="copy",__experimentalUpdateSelection:i=!1}){let{getBlocksByClientId:s}=(0,Pd.useSelect)(x),{removeBlocks:a}=(0,Pd.useDispatch)(x),c=mg(),u=(0,pc.useCopyToClipboard)(()=>(0,ib.serialize)(s(e)),()=>{switch(n){case"copy":case"copyStyles":t(),c(n,e);break;case"cut":c(n,e),a(e,i);break;default:break}}),d=o||(0,is.__)("Copy");return(0,tt.jsx)(nn.MenuItem,{ref:u,shortcut:r,children:d})}function g4({block:e,clientIds:t,children:o,__experimentalSelectBlock:r,isContentOnlyListView:n,...i}){let s=t.length,a=t[0],{firstParentClientId:c,parentBlockType:u,previousBlockClientId:d,selectedBlockClientIds:f,isContentOnly:m,isZoomOut:h,canEdit:p,canMove:g,isFirst:b,isLast:k}=(0,Pd.useSelect)(P=>{let{getBlockName:O,getBlockRootClientId:V,getPreviousBlockClientId:j,getSelectedBlockClientIds:H,getBlockAttributes:z,getBlockEditingMode:U,isZoomOut:G,canEditBlock:W,canMoveBlocks:J,getBlockIndex:le,getBlockCount:oe}=M(P(x)),{getActiveBlockVariation:re}=P(ib.store),Q=V(a),$=Q&&O(Q);return{firstParentClientId:Q,parentBlockType:Q&&(re($,z(Q))||(0,ib.getBlockType)($)),previousBlockClientId:j(a),selectedBlockClientIds:H(),isContentOnly:U(a)==="contentOnly",isZoomOut:G(),canEdit:W(a),canMove:J(t),isFirst:le(a)===0,isLast:le(a)===oe(Q)-1}},[a,t]),{getBlockOrder:v,getSelectedBlockClientIds:y}=(0,Pd.useSelect)(x),{moveBlocksDown:_,moveBlocksUp:S}=(0,Pd.useDispatch)(x),C=(0,Pd.useSelect)(P=>{let{getShortcutRepresentation:O}=P(_ee.store);return{copy:O("core/block-editor/copy"),cut:O("core/block-editor/cut"),duplicate:O("core/block-editor/duplicate"),remove:O("core/block-editor/remove"),insertAfter:O("core/block-editor/insert-after"),insertBefore:O("core/block-editor/insert-before")}},[]),B=f.length>0;async function T(P){if(!r)return;let O=await P;O&&O[0]&&r(O[0],!1)}function I(){if(!r)return;let P=d||c;P||(P=v()[0]);let O=B&&y().length===0;r(P,O)}let L=!f?.includes(c)&&!!c;return(0,tt.jsx)(VJ,{clientIds:t,__experimentalUpdateSelection:!r,children:({canCopyStyles:P,canDuplicate:O,canInsertBlock:V,canRemove:j,onDuplicate:H,onInsertAfter:z,onInsertBefore:U,onRemove:G,onCopy:W,onPasteStyles:J})=>!j&&!O&&!V&&m?null:(0,tt.jsx)(nn.DropdownMenu,{icon:Ps,label:(0,is.__)("Options"),className:"block-editor-block-settings-menu",popoverProps:FIe,noIcons:!0,...i,children:({onClose:oe})=>(0,tt.jsxs)(tt.Fragment,{children:[(0,tt.jsxs)(nn.MenuGroup,{children:[(0,tt.jsx)(TT.Slot,{fillProps:{onClose:oe}}),L&&(0,tt.jsx)(yee,{parentClientId:c,parentBlockType:u}),g&&n&&(0,tt.jsxs)(tt.Fragment,{children:[(0,tt.jsx)(nn.MenuItem,{icon:Zf,disabled:b,accessibleWhenDisabled:!0,onClick:(0,pc.pipe)(oe,()=>{S(t,c)}),children:(0,is.__)("Move up")}),(0,tt.jsx)(nn.MenuItem,{icon:vr,disabled:k,accessibleWhenDisabled:!0,onClick:(0,pc.pipe)(oe,()=>{_(t,c)}),children:(0,is.__)("Move down")})]}),p&&s===1&&(0,tt.jsx)(HJ,{clientId:a}),!m&&(0,tt.jsx)(h4,{clientIds:t,onCopy:W,shortcut:C.copy}),j&&!m&&(0,tt.jsx)(h4,{clientIds:t,label:(0,is.__)("Cut"),eventType:"cut",shortcut:C.cut,__experimentalUpdateSelection:!r}),O&&(0,tt.jsx)(nn.MenuItem,{onClick:(0,pc.pipe)(oe,H,T),shortcut:C.duplicate,children:(0,is.__)("Duplicate")}),V&&!h&&(0,tt.jsxs)(tt.Fragment,{children:[(0,tt.jsx)(nn.MenuItem,{onClick:(0,pc.pipe)(oe,U),shortcut:C.insertBefore,children:(0,is.__)("Add before")}),(0,tt.jsx)(nn.MenuItem,{onClick:(0,pc.pipe)(oe,z),shortcut:C.insertAfter,children:(0,is.__)("Add after")})]}),p&&s===1&&(0,tt.jsx)(CT.Slot,{fillProps:{clientId:a,onClose:oe}})]}),P&&!m&&(0,tt.jsxs)(nn.MenuGroup,{children:[(0,tt.jsx)(h4,{clientIds:t,onCopy:W,label:(0,is.__)("Copy styles"),eventType:"copyStyles"}),p&&(0,tt.jsx)(nn.MenuItem,{onClick:J,children:(0,is.__)("Paste styles")})]}),!m&&(0,tt.jsx)(FT.Slot,{fillProps:{onClose:oe,count:s,firstBlockClientId:a},clientIds:t}),typeof o=="function"?o({onClose:oe}):jT.Children.map(re=>(0,jT.cloneElement)(re,{onClose:oe})),j&&(0,tt.jsx)(nn.MenuGroup,{children:(0,tt.jsx)(nn.MenuItem,{onClick:(0,pc.pipe)(oe,G,I),shortcut:C.remove,children:(0,is.__)("Delete")})})]})})})}var See=g4;var xee=l(A(),1),zIe=(0,xee.createSlotFill)(Symbol("NoteIconToolbarSlotFill")),UT=zIe;var sb=l(w(),1);function jIe({clientIds:e,...t}){return(0,sb.jsxs)(HT.ToolbarGroup,{children:[(0,sb.jsx)(UT.Slot,{}),(0,sb.jsx)(HT.ToolbarItem,{children:o=>(0,sb.jsx)(See,{clientIds:e,toggleProps:o,...t})})]})}var GT=jIe;var WT=l(A(),1),wee=l(N(),1),$T=l(F(),1);var b4=l(w(),1);function Cee({clientIds:e}){let t=e.length===1?e[0]:void 0,o=(0,$T.useSelect)(n=>!!t&&n(x).getBlockMode(t)==="html",[t]),{toggleBlockMode:r}=(0,$T.useDispatch)(x);return o?(0,b4.jsx)(WT.ToolbarGroup,{children:(0,b4.jsx)(WT.ToolbarButton,{onClick:()=>{r(t)},children:(0,wee.__)("Edit visually")})}):null}var KT=l(A(),1),sn=l(R(),1),Tee=l(F(),1),Iee=l(Le(),1),k4=l(Fe(),1),Pee=l(Us(),1),Ree=l(it(),1);var v4=l(w(),1);function UIe(e){let t="toolbarItem";return!e.some(o=>!(t in o.dataset))}function Bee(e){return Array.from(e.querySelectorAll("[data-toolbar-item]:not([disabled])"))}function Eee(e){return e.contains(e.ownerDocument.activeElement)}function HIe(e){let[t]=k4.focus.tabbable.find(e);t&&t.focus({preventScroll:!0})}function GIe(e){let[o,r]=(0,sn.useState)(!0),n=(0,sn.useCallback)(()=>{let i=k4.focus.tabbable.find(e.current),s=UIe(i);s||(0,Iee.default)("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"}),r(s)},[e]);return(0,sn.useLayoutEffect)(()=>{let i=new window.MutationObserver(n);return i.observe(e.current,{childList:!0,subtree:!0}),()=>i.disconnect()},[n,o,e]),o}function WIe({toolbarRef:e,focusOnMount:t,isAccessibleToolbar:o,defaultIndex:r,onIndexChange:n,shouldUseKeyboardFocusShortcut:i,focusEditorOnEscape:s}){let[a]=(0,sn.useState)(t),[c]=(0,sn.useState)(r),u=(0,sn.useCallback)(()=>{HIe(e.current)},[e]);(0,Pee.useShortcut)("core/block-editor/focus-toolbar",()=>{i&&u()}),(0,sn.useEffect)(()=>{a&&u()},[o,a,u]),(0,sn.useEffect)(()=>{let m=e.current,h=0;return!a&&!Eee(m)&&(h=window.requestAnimationFrame(()=>{let p=Bee(m),g=c||0;p[g]&&Eee(m)&&p[g].focus({preventScroll:!0})})),()=>{if(window.cancelAnimationFrame(h),!n||!m)return;let g=Bee(m).findIndex(b=>b.tabIndex===0);n(g)}},[c,a,n,e]);let{getLastFocus:f}=M((0,Tee.useSelect)(x));(0,sn.useEffect)(()=>{let m=e.current;if(s){let h=p=>{let g=f();p.keyCode===Ree.ESCAPE&&g?.current&&(p.preventDefault(),g.current.focus())};return m.addEventListener("keydown",h),()=>{m.removeEventListener("keydown",h)}}},[s,f,e])}function ab({children:e,focusOnMount:t,focusEditorOnEscape:o=!1,shouldUseKeyboardFocusShortcut:r=!0,__experimentalInitialIndex:n,__experimentalOnIndexChange:i,orientation:s="horizontal",...a}){let c=(0,sn.useRef)(),u=GIe(c);return WIe({toolbarRef:c,focusOnMount:t,defaultIndex:n,onIndexChange:i,isAccessibleToolbar:u,shouldUseKeyboardFocusShortcut:r,focusEditorOnEscape:o}),u?(0,v4.jsx)(KT.Toolbar,{label:a["aria-label"],ref:c,orientation:s,...a,children:e}):(0,v4.jsx)(KT.NavigableMenu,{orientation:s,role:"toolbar",ref:c,...a,children:e})}var Oee=l(F(),1),YT=l(K(),1);function qT(){return(0,Oee.useSelect)(t=>{let{getBlockEditingMode:o,getBlockName:r,getBlockSelectionStart:n}=t(x),i=n(),s=i&&(0,YT.getBlockType)(r(i));return s&&(0,YT.hasBlockSupport)(s,"__experimentalToolbar",!0)&&o(i)!=="disabled"},[])}var Rd=l(A(),1),Aee=l(N(),1),Lee=l(K(),1),Nee=l(R(),1),ZT=l(F(),1);var lb=l(w(),1),y4=[],$Ie=6,KIe={placement:"bottom-start"};function Mee({clientId:e}){let{categories:t,currentPatternName:o,patterns:r}=(0,ZT.useSelect)(a=>{let{getBlockAttributes:c,getBlockRootClientId:u,__experimentalGetAllowedPatterns:d}=a(x),f=c(e),m=f?.metadata?.categories||y4,h=u(e),p=m.length>0?d(h):y4;return{categories:m,currentPatternName:f?.metadata?.patternName,patterns:p}},[e]),{replaceBlocks:n}=(0,ZT.useDispatch)(x),i=(0,Nee.useMemo)(()=>t.length===0||!r||r.length===0?y4:r.filter(a=>{let c=a.source==="core"||a.source?.startsWith("pattern-directory")&&a.source!=="pattern-directory/theme";return a.blocks.length===1&&!c&&o!==a.name&&a.categories?.some(u=>t.includes(u))&&(a.syncStatus==="unsynced"||!a.id)}).slice(0,$Ie),[t,o,r]);if(i.length<2)return null;let s=a=>{let c=(a.blocks??[]).map(u=>(0,Lee.cloneBlock)(u));c[0].attributes.metadata={...c[0].attributes.metadata,categories:t},n(e,c)};return(0,lb.jsx)(Rd.Dropdown,{popoverProps:KIe,renderToggle:({onToggle:a,isOpen:c})=>(0,lb.jsx)(Rd.ToolbarGroup,{children:(0,lb.jsx)(Rd.ToolbarButton,{onClick:()=>a(!c),"aria-expanded":c,children:(0,Aee.__)("Change design")})}),renderContent:()=>(0,lb.jsx)(Rd.__experimentalDropdownContentWrapper,{className:"block-editor-block-toolbar-change-design-content-wrapper",paddingSize:"none",children:(0,lb.jsx)(ja,{blockPatterns:i,onClickPattern:s,showTitlesAsTooltip:!0})})})}var oa=l(A(),1),lte=l(N(),1),lI=l(F(),1);var JT=l(F(),1),Ad=l(K(),1),jee=l(R(),1);var _4=l(XT(),1),Vee=l(N(),1);function Fee(e,t){for(let o of new _4.default(t).values()){if(o.indexOf("is-style-")===-1)continue;let r=o.substring(9),n=e?.find(({name:i})=>i===r);if(n)return n}return QT(e)}function Od(e,t,o){let r=new _4.default(e);return t&&r.remove("is-style-"+t.name),r.add("is-style-"+o.name),r.value}function zee(e){return!e||e.length===0?[]:QT(e)?e:[{name:"default",label:(0,Vee._x)("Default","block style"),isDefault:!0},...e]}function QT(e){return e?.find(t=>t.isDefault)}function YIe(e,t){return(0,jee.useMemo)(()=>{let o=t?.example,r=t?.name;if(o&&r)return(0,Ad.getBlockFromExample)(r,{attributes:o.attributes,innerBlocks:o.innerBlocks});if(e)return(0,Ad.cloneBlock)(e)},[e,t?.example,t?.name])}function cb({clientId:e,onSwitch:t}){let o=m=>{let{getBlock:h}=m(x),p=h(e);if(!p)return{};let g=(0,Ad.getBlockType)(p.name),{getBlockStyles:b}=m(Ad.store);return{block:g?.example?null:p,blockType:g,styles:b(p.name),className:p.attributes.className||""}},{styles:r,block:n,blockType:i,className:s}=(0,JT.useSelect)(o,[e]),{updateBlockAttributes:a}=(0,JT.useDispatch)(x),c=zee(r),u=Fee(c,s),d=YIe(n,i);return{onSelect:m=>{let h=Od(s,u,m);a(e,{className:h}),t()},stylesToRender:c,activeStyle:u,genericPreviewBlock:d,className:s}}var rS=l(K(),1),tS=l(F(),1),aI=l(R(),1);function Uee(e,t,o){t=Array.isArray(t)?[...t]:[t],e=Array.isArray(e)?[...e]:{...e};let r=t.pop(),n=e;for(let i of t){let s=n[i];n=n[i]=Array.isArray(s)?[...s]:{...s}}return n[r]=o,e}var jo=(e,t,o)=>{let r=Array.isArray(t)?t:t.split("."),n=e;return r.forEach(i=>{n=n?.[i]}),n??o};var Gee=l(my(),1);var qIe="1600px",ZIe="320px",XIe=1,QIe=.25,JIe=.75,e2e="14px";function Hee({minimumFontSize:e,maximumFontSize:t,fontSize:o,minimumViewportWidth:r=ZIe,maximumViewportWidth:n=qIe,scaleFactor:i=XIe,minimumFontSizeLimit:s}){if(s=$a(s)?s:e2e,o){let y=$a(o);if(!y?.unit||!y?.value)return null;let _=$a(s,{coerceTo:y.unit});if(_?.value&&!e&&!t&&y?.value<=_?.value)return null;if(t||(t=`${y.value}${y.unit}`),!e){let S=y.unit==="px"?y.value:y.value*16,C=Math.min(Math.max(1-.075*Math.log2(S),QIe),JIe),B=X_(y.value*C,3);_?.value&&B<_?.value?e=`${_.value}${_.unit}`:e=`${B}${y.unit}`}}let a=$a(e),c=a?.unit||"rem",u=$a(t,{coerceTo:c});if(!a||!u)return null;let d=$a(e,{coerceTo:"rem"}),f=$a(n,{coerceTo:c}),m=$a(r,{coerceTo:c});if(!f||!m||!d)return null;let h=f.value-m.value;if(!h)return null;let p=X_(m.value/100,3),g=X_(p,3)+c,b=100*((u.value-a.value)/h),k=X_((b||1)*i,3),v=`${d.value}${d.unit} + ((1vw - ${g}) * ${k})`;return`clamp(${e}, ${v}, ${t})`}function $a(e,t={}){if(typeof e!="string"&&typeof e!="number")return null;isFinite(e)&&(e=`${e}px`);let{coerceTo:o,rootSizeValue:r,acceptableUnits:n}={coerceTo:"",rootSizeValue:16,acceptableUnits:["rem","px","em"],...t},i=n?.join("|"),s=new RegExp(`^(\\d*\\.?\\d+)(${i}){1,1}$`),a=e.toString().match(s);if(!a||a.length<3)return null;let[,c,u]=a,d=parseFloat(c);return o==="px"&&(u==="em"||u==="rem")&&(d=d*r,u=o),u==="px"&&(o==="em"||o==="rem")&&(d=d/r,u=o),(o==="em"||o==="rem")&&(u==="em"||u==="rem")&&(u=o),u?{value:X_(d,3),unit:u}:null}function X_(e,t=3){let o=Math.pow(10,t);return Math.round(e*o)/o}function S4(e){let t=e?.fluid;return t===!0||t&&typeof t=="object"&&Object.keys(t).length>0}function t2e(e){let t=e?.typography??{},o=e?.layout,r=$a(o?.wideSize)?o?.wideSize:null;return S4(t)&&r?{fluid:{maxViewportWidth:r,...typeof t.fluid=="object"?t.fluid:{}}}:{fluid:t?.fluid}}function hc(e,t){let{size:o}=e;if(!o||o==="0"||e?.fluid===!1||!S4(t?.typography)&&!S4(e))return o;let r=t2e(t)?.fluid??{},n=Hee({minimumFontSize:typeof e?.fluid=="boolean"?void 0:e?.fluid?.min,maximumFontSize:typeof e?.fluid=="boolean"?void 0:e?.fluid?.max,fontSize:o,minimumFontSizeLimit:typeof r=="object"?r?.minFontSize:void 0,maximumViewportWidth:typeof r=="object"?r?.maxViewportWidth:void 0,minimumViewportWidth:typeof r=="object"?r?.minViewportWidth:void 0});return n||o}var Ka="body",Q_=":root",eI=[{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"],valueKey:"colors",cssVarInfix:"duotone",valueFunc:({slug:e})=>`url( '#wp-duotone-${e}' )`,classes:[]},{path:["shadow","presets"],valueKey:"shadow",cssVarInfix:"shadow",classes:[]},{path:["typography","fontSizes"],valueFunc:(e,t)=>hc(e,t),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:({size:e})=>e,classes:[]},{path:["border","radiusSizes"],valueKey:"size",cssVarInfix:"border-radius",classes:[]},{path:["dimensions","dimensionSizes"],valueKey:"size",cssVarInfix:"dimension",classes:[]}];function ta(e,t){if(!e||!t)return t;let o=e.split(","),r=t.split(","),n=[];return o.forEach(i=>{r.forEach(s=>{n.push(`${i.trim()} ${s.trim()}`)})}),n.join(", ")}function Wee(e,t){if(!e||!t)return;let o={};return Object.entries(t).forEach(([r,n])=>{typeof n=="string"&&(o[r]=ta(e,n)),typeof n=="object"&&(o[r]={},Object.entries(n).forEach(([i,s])=>{o[r][i]=ta(e,s)}))}),o}function tI(e,t){return e.includes(",")?e.split(",").map(n=>n+t).join(","):e+t}function $ee(e,t){let o=`.is-style-${e}`;if(!t)return o;let r=/((?::\([^)]+\))?\s*)([^\s:]+)/,n=(s,a,c)=>a+c+o;return t.split(",").map(s=>s.replace(r,n)).join(",")}function o2e(e,t){if(!e||!t)return e;if(typeof e=="object"&&"ref"in e&&e?.ref){let o=(0,Gee.getCSSValueFromRawStyle)(jo(t,e.ref));return typeof o=="object"&&o!==null&&"ref"in o&&o?.ref?void 0:o===void 0?e:o}return e}function r2e(e,t){if(!e||!t||!Array.isArray(t))return e;let o=t.find(r=>r?.name===e);return o?.href?o?.href:e}function ub(e,t){if(!e||!t)return e;let o=o2e(e,t);return typeof o=="object"&&o!==null&&"url"in o&&o?.url&&(o.url=r2e(o.url,t?._links?.["wp:theme-file"])),o}function Kee(e,t,o=[],r="slug",n){let i=[t?jo(e,["blocks",t,...o]):void 0,jo(e,o)].filter(Boolean);for(let s of i)if(s){let a=["custom","theme","default"];for(let c of a){let u=s[c];if(u){let d=u.find(f=>f[r]===n);if(d)return r==="slug"||Kee(e,t,o,"slug",d.slug)[r]===d[r]?d:void 0}}}}function n2e(e,t,o,[r,n]=[]){let i=eI.find(a=>a.cssVarInfix===r);if(!i||!e.settings)return o;let s=Kee(e.settings,t,i.path,"slug",n);if(s){let{valueKey:a}=i,c=s[a];return Fr(e,t,c)}return o}function i2e(e,t,o,r=[]){let n=(t?jo(e?.settings??{},["blocks",t,"custom",...r]):void 0)??jo(e?.settings??{},["custom",...r]);return n?Fr(e,t,n):o}function Fr(e,t,o){if(!o||typeof o!="string")if(typeof o=="object"&&o!==null&&"ref"in o&&typeof o.ref=="string"){let u=jo(e,o.ref);if(!u||typeof u=="object"&&"ref"in u)return u;o=u}else return o;let r="var:",n="var(--wp--",i=")",s;if(o.startsWith(r))s=o.slice(r.length).split("|");else if(o.startsWith(n)&&o.endsWith(i))s=o.slice(n.length,-i.length).split("--");else return o;let[a,...c]=s;return a==="preset"?n2e(e,t,o,c):a==="custom"?i2e(e,t,o,c):o}var an=l(K(),1),eS=l(my(),1),ote=l(F(),1);function di(e,t="root",o={}){if(!t)return null;let{fallback:r=!1}=o,{name:n,selectors:i,supports:s}=e,a=i&&Object.keys(i).length>0,c=Array.isArray(t)?t.join("."):t,u=null;if(a&&i.root?u=i?.root:s?.__experimentalSelector?u=s.__experimentalSelector:u=".wp-block-"+n.replace("core/","").replace("/","-"),c==="root")return u;let d=Array.isArray(t)?t:t.split(".");if(d.length===1){let m=r?u:null;if(a)return jo(i,`${c}.root`,null)||jo(i,c,null)||m;let h=s?jo(s,`${c}.__experimentalSelector`,null):void 0;return h?ta(u,h):m}let f;return a&&(f=jo(i,c,null)),f||(r?di(e,d[0],o):null)}function fb(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/([0-9])([a-zA-Z])/g,"$1-$2").replace(/([a-zA-Z])([0-9])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase()}function w4(e){if(!e)return;let t=e.match(/var:preset\|spacing\|(.+)/);return t?`var(--wp--preset--spacing--${t[1]})`:e}function k2e(e){if(!e)return null;let t=typeof e=="string";return{top:t?e:e?.top,left:t?e:e?.left}}function C4(e,t="0"){let o=k2e(e);if(!o)return null;let r=w4(o?.top)||t,n=w4(o?.left)||t;return r===n?r:`${r} ${n}`}var Xee={backgroundSize:"cover",backgroundPosition:"50% 50%"};function Qee(e){if(!e||!e?.backgroundImage?.url)return;let t;return e?.backgroundSize||(t={backgroundSize:Xee.backgroundSize}),e?.backgroundSize==="contain"&&!e?.backgroundPosition&&(t={backgroundPosition:Xee.backgroundPosition}),t}var Jee={default:{name:"default",slug:"flow",className:"is-layout-flow",baseStyles:[{selector:" > .alignleft",rules:{float:"left","margin-inline-start":"0","margin-inline-end":"2em"}},{selector:" > .alignright",rules:{float:"right","margin-inline-start":"2em","margin-inline-end":"0"}},{selector:" > .aligncenter",rules:{"margin-left":"auto !important","margin-right":"auto !important"}}],spacingStyles:[{selector:" > :first-child",rules:{"margin-block-start":"0"}},{selector:" > :last-child",rules:{"margin-block-end":"0"}},{selector:" > *",rules:{"margin-block-start":null,"margin-block-end":"0"}}]},constrained:{name:"constrained",slug:"constrained",className:"is-layout-constrained",baseStyles:[{selector:" > .alignleft",rules:{float:"left","margin-inline-start":"0","margin-inline-end":"2em"}},{selector:" > .alignright",rules:{float:"right","margin-inline-start":"2em","margin-inline-end":"0"}},{selector:" > .aligncenter",rules:{"margin-left":"auto !important","margin-right":"auto !important"}},{selector:" > :where(:not(.alignleft):not(.alignright):not(.alignfull))",rules:{"max-width":"var(--wp--style--global--content-size)","margin-left":"auto !important","margin-right":"auto !important"}},{selector:" > .alignwide",rules:{"max-width":"var(--wp--style--global--wide-size)"}}],spacingStyles:[{selector:" > :first-child",rules:{"margin-block-start":"0"}},{selector:" > :last-child",rules:{"margin-block-end":"0"}},{selector:" > *",rules:{"margin-block-start":null,"margin-block-end":"0"}}]},flex:{name:"flex",slug:"flex",className:"is-layout-flex",displayMode:"flex",baseStyles:[{selector:"",rules:{"flex-wrap":"wrap","align-items":"center"}},{selector:" > :is(*, div)",rules:{margin:"0"}}],spacingStyles:[{selector:"",rules:{gap:null}}]},grid:{name:"grid",slug:"grid",className:"is-layout-grid",displayMode:"grid",baseStyles:[{selector:" > :is(*, div)",rules:{margin:"0"}}],spacingStyles:[{selector:"",rules:{gap:null}}]}};var y2e={button:"wp-element-button",caption:"wp-element-caption"},_2e={__experimentalBorder:"border",color:"color",dimensions:"dimensions",spacing:"spacing",typography:"typography"},rte={"core/button":[":hover",":focus",":focus-visible",":active"],"core/navigation-link":[":hover",":focus",":focus-visible",":active"]},S2e={link:[":link",":any-link",":visited",":hover",":focus",":focus-visible",":active"],button:[":link",":any-link",":visited",":hover",":focus",":focus-visible",":active"]},nte={mobile:"@media (width <= 480px)",tablet:"@media (480px < width <= 782px)"};function x2e(e="*",t={}){return eI.reduce((o,{path:r,cssVarInfix:n,classes:i})=>{if(!i)return o;let s=jo(t,r,[]);return["default","theme","custom"].forEach(a=>{s[a]&&s[a].forEach(({slug:c})=>{i.forEach(({classSuffix:u,propertyName:d})=>{let f=`.has-${fb(c)}-${u}`,m=e.split(",").map(p=>`${p}${f}`).join(","),h=`var(--wp--preset--${n}--${fb(c)})`;o+=`${m}{${d}: ${h} !important;}`})})}),o},"")}function ete(e,t){let o=e.split(","),r=[];return o.forEach(n=>{r.push(`${t.trim()}${n.trim()}`)}),r.join(", ")}var w2e=(e,t,o)=>{if(o!=="core/paragraph"||(t?.blocks?.["core/paragraph"]?.typography?.textIndent??t?.typography?.textIndent??"subsequent")!=="all")return e;let i=".wp-block-paragraph + .wp-block-paragraph",s=".wp-block-paragraph";if(i in e){let a=e[i],c={...e};return delete c[i],c[s]=a,c}return e},C2e=(e,t)=>{let o=".wp-block-button";if(!(o in e))return e;let r={...e};return r[o]=r[o].map(n=>{let i=n.match(/^width:\s*(.+)$/);if(!i)return n;let s=i[1],a=null;s.endsWith("%")&&(a=parseFloat(s));let c="var(--wp--preset--dimension--";if(a===null&&s.startsWith(c)&&s.endsWith(")")){let u=s.slice(c.length,-1),d={...t?.dimensions?.dimensionSizes??{},...t?.blocks?.["core/button"]?.dimensions?.dimensionSizes??{}};for(let f of Object.values(d))if(Array.isArray(f)){for(let m of f)if(m.slug===u&&typeof m.size=="string"&&m.size.endsWith("%")){a=parseFloat(m.size);break}if(a!==null)break}}return a===null||isNaN(a)?n:`width: calc(${a} * 1% - (var(--wp--style--block-gap, 0.5em) * (1 - ${a} / 100)))`}),r},B2e=(e,t)=>{let o={};return Object.entries(e).forEach(([r,n])=>{if(r==="root"||!t?.[r])return;let i=typeof n=="string";if(!i&&typeof n=="object"&&n!==null&&Object.entries(n).forEach(([s,a])=>{if(s==="root"||!t?.[r][s])return;let c={[r]:{[s]:t[r][s]}},u=rI(c);o[a]=[...o[a]||[],...u],delete t[r][s]}),i||typeof n=="object"&&n!==null&&"root"in n){let s=i?n:n.root,a={[r]:t[r]},c=rI(a);o[s]=[...o[s]||[],...c],delete t[r]}}),o};function rI(e={},t="",o,r={},n=!1){let i=Ka===t,s=Object.entries(an.__EXPERIMENTAL_STYLE_PROPERTY).reduce((c,[u,{value:d,properties:f,useEngine:m,rootOnly:h}])=>{if(h&&!i)return c;let p=d;if(p[0]==="elements"||m)return c;let g=jo(e,p);if(u==="--wp--style--root--padding"&&(typeof g=="string"||!o))return c;if(f&&typeof g!="string")Object.entries(f).forEach(b=>{let[k,v]=b;if(!jo(g,[v],!1))return;let y=k.startsWith("--")?k:fb(k);c.push(`${y}: ${(0,eS.getCSSValueFromRawStyle)(jo(g,[v]))}`)});else if(jo(e,p,!1)){let b=u.startsWith("--")?u:fb(u);c.push(`${b}: ${(0,eS.getCSSValueFromRawStyle)(jo(e,p))}`)}return c},[]);return e.background&&(e.background?.backgroundImage&&(e.background.backgroundImage=ub(e.background.backgroundImage,r)),!i&&e.background?.backgroundImage?.id&&(e={...e,background:{...e.background,...Qee(e.background)}})),(0,eS.getCSSRules)(e).forEach(c=>{if(i&&(o||n)&&c.key.startsWith("padding"))return;let u=c.key.startsWith("--")?c.key:fb(c.key),d=ub(c.value,r);u==="font-size"&&(d=hc({name:"",slug:"",size:d},r?.settings)),u==="aspect-ratio"&&s.push("min-height: unset"),s.push(`${u}: ${d}`)}),s}function ite({layoutDefinitions:e=Jee,style:t,selector:o,hasBlockGapSupport:r,hasFallbackGapSupport:n,fallbackGapValue:i}){let s="",a=r?C4(t?.spacing?.blockGap):"";if(n&&(o===Ka?a=a||"0.5em":!r&&i&&(a=i)),a&&e&&(Object.values(e).forEach(({className:c,name:u,spacingStyles:d})=>{!r&&u!=="flex"&&u!=="grid"||d?.length&&d.forEach(f=>{let m=[];if(f.rules&&Object.entries(f.rules).forEach(([h,p])=>{m.push(`${h}: ${p||a}`)}),m.length){let h="";r?h=o===Ka?`:root :where(.${c})${f?.selector||""}`:`:root :where(${o}-${c})${f?.selector||""}`:h=o===Ka?`:where(.${c}${f?.selector||""})`:`:where(${o}.${c}${f?.selector||""})`,s+=`${h} { ${m.join("; ")}; }`}})}),o===Ka&&r&&(s+=`${Q_} { --wp--style--block-gap: ${a}; }`)),o===Ka&&e){let c=["block","flex","grid"];Object.values(e).forEach(({className:u,displayMode:d,baseStyles:f})=>{d&&c.includes(d)&&(s+=`${o} .${u} { display:${d}; }`),f?.length&&f.forEach(m=>{let h=[];if(m.rules&&Object.entries(m.rules).forEach(([p,g])=>{h.push(`${p}: ${g}`)}),h.length){let p=`.${u}${m?.selector||""}`;s+=`${p} { ${h.join("; ")}; }`}})})}return s}var E2e=["border","color","dimensions","spacing","typography","filter","outline","shadow","background"];function T2e(e){return oI(e)}function oI(e,t){if(!e)return{};let o=Object.entries(e),r=t?rte[t]??[]:[],i=o.filter(([s])=>E2e.includes(s)||r.includes(s)||nte[s]).map(([s,a])=>[s,JSON.parse(JSON.stringify(a))]);return Object.fromEntries(i)}function tte(e){let{styles:t,selector:o,featureSelectors:r,name:n,elementName:i,mediaQuery:s}=e,a=n?rte[n]??[]:S2e[i??""]??[];return a.length?a.flatMap(c=>{let u=t?.[c];return!u||typeof u!="object"?[]:[{styles:JSON.parse(JSON.stringify(u)),selector:o,selectorSuffix:c,mediaQuery:s,featureSelectors:r&&typeof r!="string"?r:void 0,name:n,elementName:i}]}):[]}function I2e(e){let{styles:t,selector:o,featureSelectors:r,name:n,elementName:i,isStyleVariation:s}=e;return!n&&!i?[]:Object.entries(nte).flatMap(([a,c])=>{let u=t?.[a];return!u||typeof u!="object"?[]:[{styles:JSON.parse(JSON.stringify(u)),selector:o,mediaQuery:c,featureSelectors:r&&typeof r!="string"?r:void 0,name:n,elementName:i,isStyleVariation:s}]})}function P2e(e,t){if(!(!e||typeof e=="string"))return Object.fromEntries(Object.entries(e).map(([o,r])=>typeof r=="string"?[o,ete(r,t)]:[o,Object.fromEntries(Object.entries(r).map(([n,i])=>[n,ete(i,t)]))]))}var R2e=(e,t)=>{let o=[];if(!e?.styles)return o;let r=T2e(e.styles);return r&&o.push({styles:r,selector:Ka,skipSelectorWrapper:!0}),Object.entries(an.__EXPERIMENTAL_ELEMENTS).forEach(([n,i])=>{e.styles?.elements?.[n]&&o.push({styles:e.styles?.elements?.[n]??{},selector:i,elementName:n,skipSelectorWrapper:!y2e[n]})}),Object.entries(e.styles?.blocks??{}).forEach(([n,i])=>{let s=oI(i,n),a=i,c=[],u=[];a?.variations&&Object.entries(a.variations).forEach(([d,f])=>{let m=f,h=oI(m,n);m?.css&&(h.css=m.css);let p=typeof t!="string"?t[n]?.styleVariationSelectors?.[d]:void 0;if(p&&typeof t!="string"){let g=t[n];u.push({styles:h,selector:p,featureSelectors:P2e(g?.featureSelectors,p),fallbackGapValue:g?.fallbackGapValue,hasLayoutSupport:g?.hasLayoutSupport,isStyleVariation:!0,layoutSelector:p+g.selector,layoutHasBlockGapSupport:!0,name:n})}Object.entries(m?.elements??{}).forEach(([g,b])=>{b&&an.__EXPERIMENTAL_ELEMENTS[g]&&c.push({styles:b,selector:ta(p,an.__EXPERIMENTAL_ELEMENTS[g]),elementName:g,isStyleVariation:!0})}),Object.entries(m?.blocks??{}).forEach(([g,b])=>{let k=typeof t!="string"?ta(p,t[g]?.selector):void 0,v=typeof t!="string"?ta(p,t[g]?.duotoneSelector):void 0,y=typeof t!="string"?Wee(p,t[g]?.featureSelectors??{}):void 0,_=oI(b,g);b?.css&&(_.css=b.css),!(!k||typeof t=="string")&&(c.push({selector:k,name:g,isStyleVariation:!0,duotoneSelector:v,featureSelectors:y,fallbackGapValue:t[g]?.fallbackGapValue,hasLayoutSupport:t[g]?.hasLayoutSupport,styles:_}),Object.entries(b.elements??{}).forEach(([S,C])=>{C&&an.__EXPERIMENTAL_ELEMENTS[S]&&c.push({styles:C,selector:ta(k,an.__EXPERIMENTAL_ELEMENTS[S]),elementName:S,isStyleVariation:!0})}))})}),typeof t!="string"&&t?.[n]?.selector&&o.push({duotoneSelector:t[n].duotoneSelector,fallbackGapValue:t[n].fallbackGapValue,hasLayoutSupport:t[n].hasLayoutSupport,selector:t[n].selector,styles:s,featureSelectors:t[n].featureSelectors,name:n}),o.push(...u),Object.entries(a?.elements??{}).forEach(([d,f])=>{typeof t!="string"&&f&&t?.[n]&&an.__EXPERIMENTAL_ELEMENTS[d]&&o.push({styles:f,selector:t[n]?.selector.split(",").map(m=>an.__EXPERIMENTAL_ELEMENTS[d].split(",").map(p=>m+" "+p)).join(","),elementName:d})}),o.push(...c)}),o},O2e=(e,t)=>{let o=[];if(!e?.settings)return o;let r=s=>{let a={};return eI.forEach(({path:c})=>{let u=jo(s,c,!1);u!==!1&&(a=Uee(a,c,u))}),a},n=r(e.settings),i=e.settings?.custom;return(Object.keys(n).length>0||i)&&o.push({presets:n,custom:i,selector:Q_}),Object.entries(e.settings?.blocks??{}).forEach(([s,a])=>{let c=a.custom;if(typeof t=="string"||!t[s])return;let u=r(a);(Object.keys(u).length>0||c)&&o.push({presets:u,custom:c,selector:t[s]?.selector,featureSelectors:t[s]?.featureSelectors})}),o};function A2e(e,{tree:t,useRootPaddingAlign:o,disableLayoutStyles:r,hasBlockGapSupport:n,hasFallbackGapSupport:i,disableRootPadding:s}){let{selector:a,selectorSuffix:c,mediaQuery:u,duotoneSelector:d,styles:f,fallbackGapValue:m,hasLayoutSupport:h,featureSelectors:p,layoutSelector:g,layoutHasBlockGapSupport:b,skipSelectorWrapper:k,name:v}=e,y="",_=c?tI(a,c):a;if(p&&typeof p!="string"){let T=B2e(p,f);T=w2e(T,t.settings,v),T=C2e(T,t.settings),Object.entries(T).forEach(([I,E])=>{if(E.length){let L=c?tI(I,c):I,P=E.join(";");y+=`:root :where(${L}){${P};}`}})}if(d){let T={};f?.filter&&(T.filter=f.filter,delete f.filter);let I=rI(T);I.length&&(y+=`${d}{${I.join(";")};}`)}let S=g??_;!r&&(Ka===S||h)&&(y+=ite({style:f,selector:S,hasBlockGapSupport:b??n,hasFallbackGapSupport:i,fallbackGapValue:m}));let B=rI(f,_,o,t,s);if(B?.length){let T=k?_:`:root :where(${_})`;y+=`${T}{${B.join(";")};}`}return f?.css&&(y+=sI(f.css,`:root :where(${_})`)),u&&y?`${u}{${y}}`:y}var nI=(e,t,o,r,n=!1,i=!1,s={})=>{let a={blockGap:!0,blockStyles:!0,layoutStyles:!0,marginReset:!0,presets:!0,rootPadding:!0,variationStyles:!1,...s},c=R2e(e,t),u=O2e(e,t),d=e?.settings?.useRootPaddingAwareAlignments,{contentSize:f,wideSize:m}=e?.settings?.layout||{},h=a.marginReset||a.rootPadding||a.layoutStyles,p="";if(a.presets&&(f||m)&&(p+=`${Q_} {`,p=f?p+` --wp--style--global--content-size: ${f};`:p,p=m?p+` --wp--style--global--wide-size: ${m};`:p,p+="}"),h&&(p+=":where(body) {margin: 0;",a.rootPadding&&d&&(p+=`padding-right: 0; padding-left: 0; padding-top: var(--wp--style--root--padding-top); padding-bottom: var(--wp--style--root--padding-bottom) } |
| 85 |
.has-global-padding { padding-right: var(--wp--style--root--padding-right); padding-left: var(--wp--style--root--padding-left); } |
| 86 |
.has-global-padding > .alignfull { margin-right: calc(var(--wp--style--root--padding-right) * -1); margin-left: calc(var(--wp--style--root--padding-left) * -1); } |
| 87 |
.has-global-padding :where(:not(.alignfull.is-layout-flow) > .has-global-padding:not(.wp-block-block, .alignfull)) { padding-right: 0; padding-left: 0; } |
| 88 |
.has-global-padding :where(:not(.alignfull.is-layout-flow) > .has-global-padding:not(.wp-block-block, .alignfull)) > .alignfull { margin-left: 0; margin-right: 0; |
| 89 |
`),p+="}"),a.blockStyles&&c.forEach(g=>{if(g.isStyleVariation&&!a.variationStyles)return;let b=I2e(g);[g,...b,...tte(g),...b.flatMap(tte)].forEach(k=>{p+=A2e(k,{tree:e,useRootPaddingAlign:d,disableLayoutStyles:n,hasBlockGapSupport:o,hasFallbackGapSupport:r,disableRootPadding:i})})}),a.layoutStyles&&(p=p+".wp-site-blocks > .alignleft { float: left; margin-right: 2em; }",p=p+".wp-site-blocks > .alignright { float: right; margin-left: 2em; }",p=p+".wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }"),a.blockGap&&o){let g=C4(e?.styles?.spacing?.blockGap)||"0.5em";p=p+`:root :where(.wp-site-blocks) > * { margin-block-start: ${g}; margin-block-end: 0; }`,p=p+":root :where(.wp-site-blocks) > :first-child { margin-block-start: 0; }",p=p+":root :where(.wp-site-blocks) > :last-child { margin-block-end: 0; }"}return a.presets&&u.forEach(({selector:g,presets:b})=>{(Ka===g||Q_===g)&&(g="");let k=x2e(g,b);k.length>0&&(p+=k)}),p};var L2e=(e,t)=>{if(e?.selectors&&Object.keys(e.selectors).length>0)return e.selectors;let o={root:t};return Object.entries(_2e).forEach(([r,n])=>{let i=di(e,r);i&&(o[n]=i)}),o},iI=(e,t)=>{let{getBlockStyles:o}=(0,ote.select)(an.store),r={};return e.forEach(n=>{let i=n.name,s=di(n);if(!s)return;let a=di(n,"filter.duotone");if(!a){let h=di(n),p=(0,an.getBlockSupport)(n,"color.__experimentalDuotone",!1);typeof p=="string"&&h&&(a=ta(h,p))}let c=!!n?.supports?.layout||!!n?.supports?.__experimentalLayout,u=n?.supports?.spacing?.blockGap?.__experimentalDefault,d=o(i),f={};d?.forEach(h=>{let p=t?`-${t}`:"",g=`${h.name}${p}`,b=$ee(g,s);f[g]=b});let m=L2e(n,s);r[i]={duotoneSelector:a??void 0,fallbackGapValue:u,featureSelectors:Object.keys(m).length?m:void 0,hasLayoutSupport:c,name:i,selector:s,styleVariationSelectors:d?.length?f:void 0}}),r};function sI(e,t){let o="";return!e||e.trim()===""||e.split("&").forEach(n=>{if(!n||n.trim()==="")return;if(!n.includes("{"))o+=`:root :where(${t}){${n.trim()}}`;else{let s=n.replace("}","").split("{");if(s.length!==2)return;let[a,c]=s,u=a.match(/([>+~\s]*::[a-zA-Z-]+)/),d=u?u[1]:"",f=u?a.replace(d,"").trim():a.trim(),m;f===""?m=t:m=a.startsWith(" ")?ta(t,f):tI(t,f),o+=`:root :where(${m})${d}{${c.trim()}}`}}),o}var oS=l(w(),1),B4="is-style-";function ste(e){return e?e.split(/\s+/).reduce((t,o)=>{if(o.startsWith(B4)){let r=o.slice(B4.length);r!=="default"&&t.push(r)}return t},[]):[]}function E4(e,t=[]){let o=ste(e);if(!o)return null;for(let r of o)if(t.some(n=>n.name===r))return r;return null}function N2e({override:e}){gc(e)}function T4({config:e}){let{overrides:t}=(0,tS.useSelect)(n=>({overrides:M(n(x)).getStyleOverrides()}),[]),{getBlockName:o}=(0,tS.useSelect)(x),r=(0,aI.useMemo)(()=>{if(!t?.length)return;let n=[],i=[];for(let[,s]of t)if(s?.variation&&s?.clientId&&!i.includes(s.clientId)){let a=o(s.clientId),c=e?.styles?.blocks?.[a]?.variations?.[s.variation];if(c){let u={settings:e?.settings,styles:{blocks:{[a]:{variations:{[`${s.variation}-${s.clientId}`]:c}}}}},d=iI((0,rS.getBlockTypes)(),s.clientId),g=nI(u,d,!1,!0,!0,!0,{blockGap:!1,blockStyles:!0,layoutStyles:!1,marginReset:!1,presets:!1,rootPadding:!1,variationStyles:!0});n.push({id:`${s.variation}-${s.clientId}`,css:g,__unstableType:"variation",variation:s.variation,clientId:s.clientId}),i.push(s.clientId)}}return n},[e,t,o]);return!r||!r.length?null:(0,oS.jsx)(oS.Fragment,{children:r.map(n=>(0,oS.jsx)(N2e,{override:n},n.id))})}function I4(e,t,o){if(!e?.styles?.blocks?.[t]?.variations?.[o])return;let r=i=>{Object.keys(i).forEach(s=>{let a=i[s];if(typeof a=="object"&&a!==null)if(a.ref!==void 0)if(typeof a.ref!="string"||a.ref.trim()==="")delete i[s];else{let c=Ol(e,a.ref);c?i[s]=c:delete i[s]}else r(a),Object.keys(a).length===0&&delete i[s]})},n=JSON.parse(JSON.stringify(e.styles.blocks[t].variations[o]));return r(n),n}function M2e(e,t,o){let{globalSettings:r,globalStyles:n}=(0,tS.useSelect)(i=>{let s=i(x).getSettings();return{globalSettings:s.__experimentalFeatures,globalStyles:s[Oi]}},[]);return(0,aI.useMemo)(()=>{let i=I4({settings:r,styles:n},e,t);return{settings:r,styles:{blocks:{[e]:{variations:{[`${t}-${o}`]:i}}}}}},[r,n,t,o,e])}function D2e({name:e,className:t,clientId:o}){let{getBlockStyles:r}=(0,tS.useSelect)(rS.store),n=r(e),i=E4(t,n),s=`${B4}${i}-${o}`,{settings:a,styles:c}=M2e(e,i,o),u=(0,aI.useMemo)(()=>{if(!i)return;let d={settings:a,styles:c},f=iI((0,rS.getBlockTypes)(),o);return nI(d,f,!1,!0,!0,!0,{blockGap:!1,blockStyles:!0,layoutStyles:!1,marginReset:!1,presets:!1,rootPadding:!1,variationStyles:!0})},[i,a,c,o]);return gc({id:`variation-${o}`,css:u,__unstableType:"variation",variation:i,clientId:o}),i?{className:s}:{}}var ate={hasSupport:()=>!0,attributeKeys:["className"],isMatch:({className:e})=>ste(e).length>0,useBlockProps:D2e};var Ld=l(w(),1),V2e=(0,Ld.jsxs)(oa.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24","aria-hidden":"true",focusable:"false",children:[(0,Ld.jsx)(oa.Path,{d:"M17.2 10.9c-.5-1-1.2-2.1-2.1-3.2-.6-.9-1.3-1.7-2.1-2.6L12 4l-1 1.1c-.6.9-1.3 1.7-2 2.6-.8 1.2-1.5 2.3-2 3.2-.6 1.2-1 2.2-1 3 0 3.4 2.7 6.1 6.1 6.1s6.1-2.7 6.1-6.1c0-.8-.3-1.8-1-3z"}),(0,Ld.jsx)(oa.Path,{stroke:"currentColor",strokeWidth:"1.5",d:"M17.2 10.9c-.5-1-1.2-2.1-2.1-3.2-.6-.9-1.3-1.7-2.1-2.6L12 4l-1 1.1c-.6.9-1.3 1.7-2 2.6-.8 1.2-1.5 2.3-2 3.2-.6 1.2-1 2.2-1 3 0 3.4 2.7 6.1 6.1 6.1s6.1-2.7 6.1-6.1c0-.8-.3-1.8-1-3z"})]});function F2e({clientId:e}){let{stylesToRender:t,activeStyle:o,className:r}=cb({clientId:e}),{updateBlockAttributes:n}=(0,lI.useDispatch)(x),{globalSettings:i,globalStyles:s,blockName:a}=(0,lI.useSelect)(d=>{let f=d(x).getSettings();return{globalSettings:f.__experimentalFeatures,globalStyles:f[Oi],blockName:d(x).getBlockName(e)}},[e]),c=o?.name?I4({settings:i,styles:s},a,o.name)?.color?.background:void 0;return!t||t.length===0?null:(0,Ld.jsx)(oa.ToolbarGroup,{children:(0,Ld.jsx)(oa.ToolbarButton,{onClick:()=>{let f=(t.findIndex(p=>p.name===o.name)+1)%t.length,m=t[f],h=Od(r,o,m);n(e,{className:h})},label:(0,lte.__)("Shuffle styles"),children:(0,Ld.jsx)(oa.Icon,{icon:V2e,style:{fill:c||"transparent"}})})})}var cte=F2e;var dI=l(A(),1),P4=l(N(),1),ute=l(F(),1),fI=l(K(),1);var cI=l(F(),1);function uI(e){let{isSectionBlock:t,isWithinSection:o,isWithinEditedSection:r,isEditingContentOnlySection:n,editedContentOnlySection:i}=(0,cI.useSelect)(u=>{let{isSectionBlock:d,getParentSectionBlock:f,getEditedContentOnlySection:m,isWithinEditedContentOnlySection:h}=M(u(x)),p=m();return{isSectionBlock:d(e),isWithinSection:d(e)||!!f(e),isWithinEditedSection:h(e),isEditingContentOnlySection:p===e,editedContentOnlySection:p}},[e]),s=(0,cI.useDispatch)(x),{editContentOnlySection:a,stopEditingContentOnlySection:c}=M(s);return{isSectionBlock:t,isWithinSection:o,isWithinEditedSection:r,isEditingContentOnlySection:n,editedContentOnlySection:i,editContentOnlySection:a,stopEditingContentOnlySection:c}}var R4=l(w(),1);function dte({clientId:e}){let{isSectionBlock:t,isEditingContentOnlySection:o,editContentOnlySection:r,stopEditingContentOnlySection:n}=uI(e),i=(0,ute.useSelect)(c=>{if(!e)return null;let{getBlockName:u}=c(x),d=u(e);return d?{name:d}:null},[e]);if(!e||!t&&!o||(0,fI.isReusableBlock)(i)||(0,fI.isTemplatePart)(i))return null;let s=o;return(0,R4.jsx)(dI.ToolbarGroup,{children:(0,R4.jsx)(dI.ToolbarButton,{onClick:()=>{s?n():r(e)},children:s?(0,P4.__)("Exit pattern"):(0,P4.__)("Edit pattern")})})}var Vte=l(A(),1),Fte=l(N(),1),zte=l(F(),1);var lS=l(K(),1),jte=l(Ch(),1);var Ya=l(N(),1),qa=l(A(),1),Md=l(K(),1),yI=l(F(),1);var vte=l(N(),1),iS=l(A(),1),pI=l(K(),1),hI=l(R(),1);var fte=l(A(),1),mte=l(X(),1);var nS=l(w(),1);function Nd({blocks:e,placement:t="right-start",offset:o=16,anchor:r}){return(0,mte.useViewportMatch)("medium","<")?null:(0,nS.jsx)("div",{className:"block-editor-block-switcher__popover-preview-container",children:(0,nS.jsx)(fte.Popover,{className:"block-editor-block-switcher__popover-preview",placement:t,focusOnMount:!1,offset:o,anchor:r,children:(0,nS.jsx)("div",{className:"block-editor-block-switcher__preview",children:(0,nS.jsx)(Tn,{viewportWidth:601,blocks:e})})})})}var pte=l(A(),1),mb=l(K(),1),hte=l(F(),1),mI=l(R(),1);var bc=l(w(),1),z2e={};function gte({clientIds:e,blocks:t}){let{activeBlockVariation:o,blockVariationTransformations:r}=(0,hte.useSelect)(i=>{let{getBlockAttributes:s,canRemoveBlocks:a}=i(x),{getActiveBlockVariation:c,getBlockVariations:u}=i(mb.store),d=a(e);if(t.length!==1||!d)return z2e;let[f]=t;return{blockVariationTransformations:u(f.name,"transform"),activeBlockVariation:c(f.name,s(f.clientId))}},[e,t]);return(0,mI.useMemo)(()=>r?.filter(({name:i})=>i!==o?.name),[r,o])}var j2e=({transformations:e,onSelect:t,blocks:o})=>{let[r,n]=(0,mI.useState)();return(0,bc.jsxs)(bc.Fragment,{children:[r&&(0,bc.jsx)(Nd,{blocks:(0,mb.cloneBlock)(o[0],e.find(({name:i})=>i===r).attributes)}),e?.map(i=>(0,bc.jsx)(U2e,{item:i,onSelect:t,setHoveredTransformItemName:n},i.name))]})};function U2e({item:e,onSelect:t,setHoveredTransformItemName:o}){let{name:r,icon:n,title:i}=e;return(0,bc.jsxs)(pte.MenuItem,{className:(0,mb.getBlockMenuDefaultClassName)(r),onClick:s=>{s.preventDefault(),t(r)},onMouseLeave:()=>o(null),onMouseEnter:()=>o(r),onFocus:()=>o(r),onBlur:()=>o(null),children:[(0,bc.jsx)(Me,{icon:n,showColors:!0}),i]})}var bte=j2e;var An=l(w(),1);function H2e(e){let t={"core/paragraph":1,"core/heading":2,"core/list":3,"core/quote":4},o=(0,hI.useMemo)(()=>{let r=Object.keys(t),n=e.reduce((i,s)=>{let{name:a}=s;return r.includes(a)?i.priorityTextTransformations.push(s):i.restTransformations.push(s),i},{priorityTextTransformations:[],restTransformations:[]});if(n.priorityTextTransformations.length===1&&n.priorityTextTransformations[0].name==="core/quote"){let i=n.priorityTextTransformations.pop();n.restTransformations.push(i)}return n},[e]);return o.priorityTextTransformations.sort(({name:r},{name:n})=>t[r]<t[n]?-1:1),o}var G2e=({className:e,possibleBlockTransformations:t,possibleBlockVariationTransformations:o,onSelect:r,onSelectVariation:n,blocks:i})=>{let[s,a]=(0,hI.useState)(),{priorityTextTransformations:c,restTransformations:u}=H2e(t),d=c.length&&u.length,f=!!u.length&&(0,An.jsx)(W2e,{restTransformations:u,onSelect:r,setHoveredTransformItemName:a});return(0,An.jsxs)(An.Fragment,{children:[(0,An.jsxs)(iS.MenuGroup,{label:(0,vte.__)("Transform to"),className:e,children:[s&&(0,An.jsx)(Nd,{blocks:(0,pI.switchToBlockType)(i,s)}),!!o?.length&&(0,An.jsx)(bte,{transformations:o,blocks:i,onSelect:n}),c.map(m=>(0,An.jsx)(kte,{item:m,onSelect:r,setHoveredTransformItemName:a},m.name)),!d&&f]}),!!d&&(0,An.jsx)(iS.MenuGroup,{className:e,children:f})]})};function W2e({restTransformations:e,onSelect:t,setHoveredTransformItemName:o}){return e.map(r=>(0,An.jsx)(kte,{item:r,onSelect:t,setHoveredTransformItemName:o},r.name))}function kte({item:e,onSelect:t,setHoveredTransformItemName:o}){let{name:r,icon:n,title:i,isDisabled:s}=e;return(0,An.jsxs)(iS.MenuItem,{className:(0,pI.getBlockMenuDefaultClassName)(r),onClick:a=>{a.preventDefault(),t(r)},disabled:s,onMouseLeave:()=>o(null),onMouseEnter:()=>o(r),onFocus:()=>o(r),onBlur:()=>o(null),children:[(0,An.jsx)(Me,{icon:n,showColors:!0}),i]})}var yte=G2e;var xte=l(N(),1),wte=l(A(),1),bI=l(R(),1);var gI=l(A(),1);var pb=l(w(),1),_te=()=>{};function Ste({stylesToRender:e,activeStyle:t,onSelect:o=_te,onHoverStyle:r=_te}){return!e||e.length===0?null:(0,pb.jsx)(pb.Fragment,{children:e.map(n=>{let i=n.label||n.name;return(0,pb.jsx)(gI.MenuItem,{icon:t.name===n.name?Li:null,onClick:()=>o(n),onFocus:()=>r(n),onBlur:()=>r(null),onMouseEnter:()=>r(n),onMouseLeave:()=>r(null),children:(0,pb.jsx)(gI.__experimentalText,{as:"span",limit:18,ellipsizeMode:"tail",truncate:!0,children:i})},n.name)})})}var sS=l(w(),1);function vI({hoveredBlock:e,onSwitch:t}){let{clientId:o}=e,[r,n]=(0,bI.useState)(null),{onSelect:i,stylesToRender:s,activeStyle:a,genericPreviewBlock:c,className:u}=cb({clientId:o,onSwitch:t}),d=(0,bI.useMemo)(()=>{if(!r||!c)return null;let f=Od(u,a,r);return[{...c,attributes:{...c.attributes||{},className:f}}]},[r,c,u,a]);return!s||s.length===0?null:(0,sS.jsxs)(wte.MenuGroup,{label:(0,xte.__)("Styles"),className:"block-editor-block-switcher__styles__menugroup",children:[d&&(0,sS.jsx)(Nd,{blocks:d}),(0,sS.jsx)(Ste,{stylesToRender:s,activeStyle:a,onSelect:i,onHoverStyle:n})]})}var A4=l(N(),1),Pte=l(R(),1),kI=l(X(),1);var vc=l(A(),1);var Ete=l(R(),1),Tte=l(K(),1);var Cte=l(K(),1),O4=(e,t,o=new Set)=>{let{clientId:r,name:n,innerBlocks:i=[]}=e;if(!o.has(r)){if(n===t)return e;for(let s of i){let a=O4(s,t,o);if(a)return a}}},Bte=(e,t)=>{let o=(0,Cte.getBlockAttributesNamesByRole)(e,"content");return o?.length?o.reduce((r,n)=>(t[n]&&(r[n]=t[n]),r),{}):t};var $2e=(e,t)=>{let o=Bte(t.name,t.attributes);e.attributes={...e.attributes,...o}},K2e=(e,t)=>{let o=t.map(n=>(0,Tte.cloneBlock)(n)),r=new Set;for(let n of e){let i=!1;for(let s of o){let a=O4(s,n.name,r);if(a){i=!0,r.add(a.clientId),$2e(a,n);break}}if(!i)return}return o},Y2e=(e,t)=>(0,Ete.useMemo)(()=>e.reduce((o,r)=>{let n=K2e(t,r.blocks);return n&&o.push({...r,transformedBlocks:n}),o},[]),[e,t]),Ite=Y2e;var Br=l(w(),1);function q2e({blocks:e,patterns:t,onSelect:o}){let[r,n]=(0,Pte.useState)(!1),i=Ite(t,e);return i.length?(0,Br.jsxs)(vc.MenuGroup,{className:"block-editor-block-switcher__pattern__transforms__menugroup",children:[r&&(0,Br.jsx)(Z2e,{patterns:i,onSelect:o}),(0,Br.jsx)(vc.MenuItem,{onClick:s=>{s.preventDefault(),n(!r)},icon:Ko,children:(0,A4.__)("Patterns")})]}):null}function Z2e({patterns:e,onSelect:t}){let o=(0,kI.useViewportMatch)("medium","<");return(0,Br.jsx)("div",{className:"block-editor-block-switcher__popover-preview-container",children:(0,Br.jsx)(vc.Popover,{className:"block-editor-block-switcher__popover-preview",placement:o?"bottom":"right-start",offset:16,children:(0,Br.jsx)("div",{className:"block-editor-block-switcher__preview is-pattern-list-preview",children:(0,Br.jsx)(X2e,{patterns:e,onSelect:t})})})})}function X2e({patterns:e,onSelect:t}){return(0,Br.jsx)(vc.Composite,{role:"listbox",className:"block-editor-block-switcher__preview-patterns-container","aria-label":(0,A4.__)("Patterns list"),children:e.map(o=>(0,Br.jsx)(Rte,{pattern:o,onSelect:t},o.name))})}function Rte({pattern:e,onSelect:t}){let o="block-editor-block-switcher__preview-patterns-container",r=(0,kI.useInstanceId)(Rte,`${o}-list__item-description`);return(0,Br.jsxs)("div",{className:`${o}-list__list-item`,children:[(0,Br.jsxs)(vc.Composite.Item,{render:(0,Br.jsx)("div",{role:"option","aria-label":e.title,"aria-describedby":e.description?r:void 0,className:`${o}-list__item`}),onClick:()=>t(e.transformedBlocks),children:[(0,Br.jsx)(Tn,{blocks:e.transformedBlocks,viewportWidth:e.viewportWidth||500}),(0,Br.jsx)("div",{className:`${o}-list__item-title`,children:e.title})]}),!!e.description&&(0,Br.jsx)(We,{id:r,children:e.description})]})}var Ote=q2e;var fi=l(w(),1);function Q2e({onClose:e,clientIds:t}){let{replaceBlocks:o,multiSelect:r,updateBlockAttributes:n}=(0,yI.useDispatch)(x),{possibleBlockTransformations:i,patterns:s,blocks:a,isUsingBindings:c,canRemove:u,hasBlockStyles:d}=(0,yI.useSelect)(T=>{let{getBlockAttributes:I,getBlocksByClientId:E,getBlockRootClientId:L,getBlockTransformItems:P,__experimentalGetPatternTransformItems:O,canRemoveBlocks:V,getBlockName:j}=T(x),{getBlockStyles:H}=T(Md.store),z=L(t[0]),U=E(t),G=t.length===1,W=G&&j(t[0]),J=G&&!!H(W)?.length;return{blocks:U,possibleBlockTransformations:P(U,z),patterns:O(U,z),isUsingBindings:t.every(le=>!!I(le)?.metadata?.bindings),canRemove:V(t),hasBlockStyles:J}},[t]),f=gte({clientIds:t,blocks:a});function m(T){T.length>1&&r(T[0].clientId,T[T.length-1].clientId)}function h(T){let I=(0,Md.switchToBlockType)(a,T);o(t,I),m(I)}function p(T){n(a[0].clientId,{...f.find(({name:I})=>I===T).attributes})}function g(T){o(t,T),m(T)}let b=a.length===1,k=b&&((0,Md.isTemplatePart)(a[0])||(0,Md.isReusableBlock)(a[0])),v=!!i?.length&&u&&!k,y=!!f?.length,_=!!s?.length&&u,S=v||y;if(!(d||S||_))return(0,fi.jsx)("p",{className:"block-editor-block-switcher__no-transforms",children:(0,Ya.__)("No transforms.")});let B=b?(0,Ya._x)("This block is connected.","block toolbar button label and description"):(0,Ya._x)("These blocks are connected.","block toolbar button label and description");return(0,fi.jsxs)("div",{className:"block-editor-block-switcher__container",children:[_&&(0,fi.jsx)(Ote,{blocks:a,patterns:s,onSelect:T=>{g(T),e()}}),S&&(0,fi.jsx)(yte,{className:"block-editor-block-switcher__transforms__menugroup",possibleBlockTransformations:i,possibleBlockVariationTransformations:f,blocks:a,onSelect:T=>{h(T),e()},onSelectVariation:T=>{p(T),e()}}),d&&(0,fi.jsx)(vI,{hoveredBlock:a[0],onSwitch:e}),c&&(0,fi.jsx)(qa.MenuGroup,{children:(0,fi.jsx)(qa.__experimentalText,{className:"block-editor-block-switcher__binding-indicator",children:B})})]})}var J2e=({children:e,clientIds:t,label:o,text:r})=>{let i=t.length===1?(0,Ya.__)("Change block type or style"):(0,Ya.sprintf)((0,Ya._n)("Change type of %d block","Change type of %d blocks",t.length),t.length);return(0,fi.jsx)(qa.ToolbarGroup,{children:(0,fi.jsx)(qa.ToolbarItem,{children:s=>(0,fi.jsx)(qa.DropdownMenu,{className:"block-editor-block-switcher",label:o,popoverProps:{placement:"bottom-start",className:"block-editor-block-switcher__popover"},icon:e,text:r,toggleProps:{description:i,...s},menuProps:{orientation:"both"},children:({onClose:a})=>(0,fi.jsx)(Q2e,{onClose:a,clientIds:t})})})})},Ate=J2e;var Lte=l(N(),1),gb=l(A(),1);var hb=l(w(),1);function Nte({clientIds:e,children:t,label:o,text:r}){return(0,hb.jsx)(gb.ToolbarGroup,{children:(0,hb.jsx)(gb.ToolbarItem,{children:n=>(0,hb.jsx)(gb.DropdownMenu,{className:"block-editor-block-switcher",label:o,popoverProps:{placement:"bottom-start",className:"block-editor-block-switcher__popover"},icon:t,text:r,toggleProps:{description:(0,Lte.__)("Change block style"),...n},menuProps:{orientation:"both"},children:({onClose:i})=>(0,hb.jsx)("div",{className:"block-editor-block-switcher__container",children:(0,hb.jsx)(vI,{hoveredBlock:{clientId:e[0]},onSwitch:i})})})})})}var bb=l(A(),1),aS=l(N(),1),_I=l(R(),1),Mte=l(F(),1);var kc=l(w(),1);function ePe({clientIds:e,blockTitle:t}){let o=(0,Mte.useSelect)(i=>{let{getBlockAttributes:s}=i(x);return s(e?.[0])?.metadata?.name},[e]),r=e.length===1,n;return r&&o?n=(0,aS.sprintf)((0,aS.__)('This %1$s is editable using the "%2$s" override.'),t.toLowerCase(),o):n=(0,aS.__)("These blocks are editable using overrides."),(0,kc.jsx)(bb.__experimentalText,{children:n})}function Dte({icon:e,clientIds:t,blockTitle:o,label:r}){let[n,i]=(0,_I.useState)(!1),s=(0,_I.useRef)();return(0,kc.jsxs)(kc.Fragment,{children:[(0,kc.jsx)(bb.ToolbarButton,{ref:s,className:"block-editor-block-toolbar__pattern-overrides-indicator",icon:e,label:r,onClick:()=>i(!n),"aria-expanded":n}),n&&(0,kc.jsx)(bb.Popover,{anchor:s.current,onClose:()=>i(!1),placement:"bottom-start",offset:16,className:"block-editor-block-toolbar__pattern-overrides-popover",children:(0,kc.jsx)(ePe,{clientIds:t,blockTitle:o})})]})}var vb=l(w(),1);function tPe({select:e,clientIds:t}){let{getBlockName:o,getBlockAttributes:r,getBlockParentsByBlockName:n,canRemoveBlocks:i,getTemplateLock:s,getBlockEditingMode:a,canEditBlock:c}=M(e(x)),{getBlockStyles:u}=e(lS.store),d=t.some(I=>s(I)==="contentOnly"),f=t.length===1,m=f&&o(t[0]),h=f&&!!u(m)?.length,p=t.some(I=>!!r(I)?.metadata?.patternName),g=t.every(I=>hk(r(I)?.metadata?.bindings)),b=t.every(I=>n(I,"core/block",!0).length>0),k=i(t),v=t.every(I=>c(I)),y=a(t[0]),_=y==="default",S=y==="contentOnly",B=!p&&_&&(h||k)&&!d&&v,T=g&&b;return B?"switcher":S&&h&&!g&&v?"styles-only":T?"pattern-overrides":"default"}function oPe({select:e,clientIds:t}){let{getBlockName:o,getBlockAttributes:r}=M(e(x)),n=t.length===1,i=t[0],s=r(i);if(n&&s?.metadata?.patternName)return Di;let a=o(i),c=(0,lS.getBlockType)(a);if(n){let{getActiveBlockVariation:f}=e(lS.store);return f(a,s)?.icon||c?.icon}let u=t.map(f=>o(f));return new Set(u).size===1?c?.icon:Qf}function Ute({clientIds:e,isSynced:t}){let{icon:o,showIconLabels:r,variant:n}=(0,zte.useSelect)(f=>({icon:oPe({select:f,clientIds:e}),showIconLabels:f(jte.store).get("core","showIconLabels"),variant:tPe({select:f,clientIds:e})}),[e]),i=Sr({clientId:e?.[0],maximumLength:35}),s=e.length===1,a=s&&t&&!r,c=s?i:(0,Fte.__)("Multiple blocks selected"),u=a&&i?i:void 0,d=(0,vb.jsx)(Me,{className:"block-editor-block-toolbar__block-icon",icon:o});return n==="switcher"?(0,vb.jsx)(Ate,{clientIds:e,label:c,text:u,children:d}):n==="styles-only"?(0,vb.jsx)(Nte,{clientIds:e,label:c,text:u,children:d}):n==="pattern-overrides"?(0,vb.jsx)(Dte,{icon:d,clientIds:e,blockTitle:i,label:c}):(0,vb.jsx)(Vte.ToolbarButton,{disabled:!0,className:"block-editor-block-toolbar__block-icon-button",title:c,icon:d,text:u})}var at=l(w(),1);function N4({hideDragHandle:e,focusOnMount:t,__experimentalInitialIndex:o,__experimentalOnIndexChange:r,variant:n="unstyled"}){let{blockClientId:i,blockClientIds:s,isDefaultEditingMode:a,blockType:c,toolbarKey:u,shouldShowVisualToolbar:d,showParentSelector:f,isUsingBindings:m,isSectionContainer:h,hasContentOnlyLocking:p,showShuffleButton:g,showSlots:b,showGroupButtons:k,showLockButtons:v,showBlockVisibilityButton:y,showSwitchSectionStyleButton:_,areSelectedBlocksHiddenOnViewport:S,canEdit:C}=(0,Gte.useSelect)(H=>{let{canEditBlock:z}=H(x),{getBlockName:U,getBlockMode:G,getBlockParents:W,getSelectedBlockClientIds:J,isBlockValid:le,getBlockEditingMode:oe,getBlockAttributes:re,getSettings:Q,getTemplateLock:$,getParentSectionBlock:ee,isZoomOut:Y,isSectionBlock:te,isBlockHiddenAtViewport:ne}=M(H(x)),q=J(),se=q[0],pe=W(se),Te=ee(se)??pe[pe.length-1],Xe=U(Te),dt=(0,yc.getBlockType)(Xe),ft=oe(se),we=ft==="default",ot=U(se),Ce=q.every(ze=>le(ze)),Wo=q.every(ze=>G(ze)==="visual"),Qt=q.every(ze=>!!re(ze)?.metadata?.bindings),lo=q.some(ze=>$(ze)==="contentOnly"),Qe=Y(),jt=te(se),rt=z(se),He=rt&&(Qe||jt),$o=Q()?.[Ai]?.toLowerCase()||"desktop",Yn=q.length>0&&q.every(ze=>ne(ze,$o));return{blockClientId:se,blockClientIds:q,isDefaultEditingMode:we,blockType:se&&(0,yc.getBlockType)(ot),shouldShowVisualToolbar:Ce&&Wo,toolbarKey:`${se}${Te}`,showParentSelector:!Qe&&dt&&ft!=="contentOnly"&&oe(Te)!=="disabled"&&(0,yc.hasBlockSupport)(dt,"__experimentalParentSelector",!0)&&q.length===1,isUsingBindings:Qt,isSectionContainer:jt,hasContentOnlyLocking:lo,showShuffleButton:Qe,showSlots:!Qe,showGroupButtons:!Qe,showLockButtons:!Qe,showBlockVisibilityButton:!Qe,showSwitchSectionStyleButton:He,areSelectedBlocksHiddenOnViewport:Yn,canEdit:rt}},[]),B=(0,L4.useRef)(null),T=(0,L4.useRef)(),I=Jg({ref:T}),E=!(0,Wte.useViewportMatch)("medium","<");if(!qT())return null;let P=s.length>1,O=(0,yc.isReusableBlock)(c)||(0,yc.isTemplatePart)(c),V=D("block-editor-block-contextual-toolbar",{"has-parent":f}),j=D("block-editor-block-toolbar",{"is-synced":O,"is-connected":m});return(0,at.jsx)(ab,{focusEditorOnEscape:!0,className:V,"aria-label":(0,Hte.__)("Block tools"),variant:n==="toolbar"?void 0:n,focusOnMount:t,__experimentalInitialIndex:o,__experimentalOnIndexChange:r,children:(0,at.jsxs)("div",{ref:B,className:j,children:[f&&!P&&E&&(0,at.jsx)(mJ,{}),(d||P)&&(0,at.jsx)("div",{ref:T,...I,children:(0,at.jsxs)($te.ToolbarGroup,{className:"block-editor-block-toolbar__block-controls",children:[(0,at.jsx)(Ute,{clientIds:s,isSynced:O}),a&&y&&(0,at.jsx)(ED,{clientIds:s}),!P&&a&&v&&(0,at.jsx)(d4,{clientId:i}),(0,at.jsx)(vT,{clientIds:s,hideDragHandle:e})]})}),!S&&!p&&d&&P&&k&&(0,at.jsx)(s4,{}),!P&&C&&(0,at.jsx)(dte,{clientId:s[0]}),!S&&g&&(0,at.jsx)(Mee,{clientId:s[0]}),!S&&_&&(0,at.jsx)(cte,{clientId:s[0]}),!S&&d&&b&&(0,at.jsxs)(at.Fragment,{children:[!h&&(0,at.jsxs)(at.Fragment,{children:[(0,at.jsx)(Wt.Slot,{group:"parent",className:"block-editor-block-toolbar__slot"}),(0,at.jsx)(Wt.Slot,{group:"block",className:"block-editor-block-toolbar__slot"}),(0,at.jsx)(Wt.Slot,{className:"block-editor-block-toolbar__slot"}),(0,at.jsx)(Wt.Slot,{group:"inline",className:"block-editor-block-toolbar__slot"})]}),(0,at.jsx)(Wt.Slot,{group:"other",className:"block-editor-block-toolbar__slot"}),(0,at.jsx)(xT.Slot,{})]}),(0,at.jsx)(Cee,{clientIds:s}),(0,at.jsx)(GT,{clientIds:s})]})},u)}function Kte({hideDragHandle:e,variant:t}){return(0,at.jsx)(N4,{hideDragHandle:e,variant:t,focusOnMount:void 0,__experimentalInitialIndex:void 0,__experimentalOnIndexChange:void 0})}var M4=l(w(),1);function Zte({clientId:e,isTyping:t,__unstableContentRef:o}){let{capturingClientId:r,isInsertionPointVisible:n,lastClientId:i}=uT(e),s=(0,kb.useRef)();(0,kb.useEffect)(()=>{s.current=void 0},[e]);let{stopTyping:a}=(0,Yte.useDispatch)(x),c=(0,kb.useRef)(!1);(0,qte.useShortcut)("core/block-editor/focus-toolbar",()=>{c.current=!0,a(!0)}),(0,kb.useEffect)(()=>{c.current=!1});let u=r||e,d=cT({contentElement:o?.current,clientId:u});return!t&&(0,M4.jsx)(Km,{clientId:u,bottomClientId:i,className:D("block-editor-block-list__block-popover",{"is-insertion-point-visible":n}),resize:!1,...d,__unstableContentRef:o,children:(0,M4.jsx)(N4,{focusOnMount:c.current,__experimentalInitialIndex:s.current,__experimentalOnIndexChange:f=>{s.current=f},variant:"toolbar"})})}var SI=l(F(),1),xI=l(R(),1);var Xte=l(A(),1);var Qte=l(N(),1),Jte=l(w(),1);function rPe({onClick:e}){return(0,Jte.jsx)(Xte.Button,{variant:"primary",icon:Mi,size:"compact",className:D("block-editor-button-pattern-inserter__button","block-editor-block-tools__zoom-out-mode-inserter-button"),onClick:e,label:(0,Qte._x)("Add pattern","Generic label for pattern inserter button")})}var eoe=rPe;var D4=l(w(),1);function nPe(){let[e,t]=(0,xI.useState)(!1),{hasSelection:o,blockOrder:r,setInserterIsOpened:n,sectionRootClientId:i,selectedBlockClientId:s,blockInsertionPoint:a,insertionPointVisible:c}=(0,SI.useSelect)(p=>{let{getSettings:g,getBlockOrder:b,getSelectionStart:k,getSelectedBlockClientId:v,getSectionRootClientId:y,getBlockInsertionPoint:_,isBlockInsertionPointVisible:S}=M(p(x)),C=y();return{hasSelection:!!k().clientId,blockOrder:b(C),sectionRootClientId:C,setInserterIsOpened:g().__experimentalSetIsInserterOpened,selectedBlockClientId:v(),blockInsertionPoint:_(),insertionPointVisible:S()}},[]),{showInsertionPoint:u}=M((0,SI.useDispatch)(x));if((0,xI.useEffect)(()=>{let p=setTimeout(()=>{t(!0)},500);return()=>{clearTimeout(p)}},[]),!e||!o)return null;let d=s,m=r.findIndex(p=>s===p)+1,h=r[m];return c&&a?.index===m?null:(0,D4.jsx)(DE,{previousClientId:d,nextClientId:h,children:(0,D4.jsx)(eoe,{onClick:()=>{n({rootClientId:i,insertionIndex:m,tab:"patterns",category:"all"}),u(i,m,{operation:"insert"})}})})}var toe=nPe;var ooe=l(F(),1),roe=l(K(),1);function noe(){return(0,ooe.useSelect)(e=>{let{getSelectedBlockClientId:t,getFirstMultiSelectedBlockClientId:o,getBlock:r,getBlockMode:n,getSettings:i,isTyping:s,isBlockInterfaceHidden:a}=M(e(x)),c=t()||o(),u=r(c),d=!!c&&!!u,f=d&&(0,roe.isUnmodifiedDefaultBlock)(u,"content")&&n(c)!=="html",m=c&&!s()&&f,h=!a()&&!i().hasFixedToolbar&&!m&&d&&!f;return{showEmptyBlockSideInserter:m,showBlockToolbarPopover:h}},[])}var ss=l(w(),1);function iPe(e){let{getSelectedBlockClientId:t,getFirstMultiSelectedBlockClientId:o,getSettings:r,isTyping:n,isDragging:i,isZoomOut:s,getViewportModalClientIds:a}=M(e(x));return{clientId:t()||o(),hasFixedToolbar:r().hasFixedToolbar,isTyping:n(),isZoomOutMode:s(),isDragging:i(),viewportModalClientIds:a()}}function cS({children:e,__unstableContentRef:t,...o}){let{clientId:r,hasFixedToolbar:n,isTyping:i,isZoomOutMode:s,isDragging:a,viewportModalClientIds:c}=(0,yb.useSelect)(iPe,[]),u=(0,ioe.__unstableUseShortcutEventMatch)(),{getBlocksByClientId:d,getSelectedBlockClientIds:f,getBlockRootClientId:m,getBlockEditingMode:h,getBlockName:p,isGroupable:g,getEditedContentOnlySection:b,canEditBlock:k}=M((0,yb.useSelect)(x)),{getGroupingBlockName:v}=(0,yb.useSelect)(_b.store),{showEmptyBlockSideInserter:y,showBlockToolbarPopover:_}=noe(),S=tb(),[C,B]=(0,wI.useState)(null),{canRename:T}=cp(p(f()[0])),{duplicateBlocks:I,removeBlocks:E,replaceBlocks:L,insertAfterBlock:P,insertBeforeBlock:O,selectBlock:V,moveBlocksUp:j,moveBlocksDown:H,expandBlock:z,stopEditingContentOnlySection:U,showViewportModal:G,hideViewportModal:W}=M((0,yb.useDispatch)(x));function J(re){if(!re.defaultPrevented){if(u("core/block-editor/move-up",re)||u("core/block-editor/move-down",re)){let Q=f();if(Q.length){re.preventDefault();let $=m(Q[0]);(u("core/block-editor/move-up",re)?"up":"down")==="up"?j(Q,$):H(Q,$);let Y=Array.isArray(Q)?Q.length:1,te=(0,Sb.sprintf)((0,Sb._n)("%d block moved.","%d blocks moved.",Q.length),Y);(0,z4.speak)(te)}}else if(u("core/block-editor/duplicate",re)){let Q=f();Q.length&&(re.preventDefault(),I(Q))}else if(u("core/block-editor/remove",re)){let Q=f();Q.length&&(re.preventDefault(),E(Q))}else if(u("core/block-editor/paste-styles",re)){let Q=f();if(Q.length){re.preventDefault();let $=d(Q);S($)}}else if(u("core/block-editor/insert-after",re)){let Q=f();Q.length&&(re.preventDefault(),P(Q[Q.length-1]))}else if(u("core/block-editor/insert-before",re)){let Q=f();Q.length&&(re.preventDefault(),O(Q[0]))}else if(u("core/block-editor/unselect",re)){if(re.target.closest("[role=toolbar]"))return;let Q=f();Q.length>1&&(re.preventDefault(),V(Q[0]))}else if(u("core/block-editor/collapse-list-view",re)){if((0,V4.isTextField)(re.target)||(0,V4.isTextField)(re.target?.contentWindow?.document?.activeElement))return;re.preventDefault(),z(r)}else if(u("core/block-editor/group",re)){let Q=f();if(Q.length>1&&g(Q)){re.preventDefault();let $=d(Q),ee=v(),Y=(0,_b.switchToBlockType)($,ee);L(Q,Y),(0,z4.speak)((0,Sb.__)("Selected blocks are grouped."))}}else if(u("core/block-editor/rename",re)){let Q=f();if(Q.length===1){let $=h(Q[0])==="contentOnly";T&&!$&&k(Q[0])&&(re.preventDefault(),B(Q[0]))}}else if(u("core/block-editor/toggle-block-visibility",re)){let Q=f();if(Q.length){if(re.preventDefault(),!d(Q).every(Y=>(0,_b.hasBlockSupport)(Y.name,"visibility",!0))||Q.some(Y=>h(Y)!=="default"||!k(Y)))return;G(Q)}}u("core/block-editor/stop-editing-as-blocks",re)&&b()&&U()}}let le=$m(t),oe=$m(t);return(0,ss.jsxs)("div",{...o,onKeyDown:J,className:D(o.className,{"block-editor-block-tools--is-dragging":a}),children:[(0,ss.jsxs)($g.Provider,{value:(0,wI.useRef)(!1),children:[!i&&!s&&(0,ss.jsx)(LX,{__unstableContentRef:t}),y&&(0,ss.jsx)(ZQ,{__unstableContentRef:t,clientId:r}),_&&(0,ss.jsx)(Zte,{__unstableContentRef:t,clientId:r,isTyping:i}),!s&&!n&&(0,ss.jsx)(F4.Popover.Slot,{name:"block-toolbar",ref:le}),e,(0,ss.jsx)(F4.Popover.Slot,{name:"__unstable-block-tools-after",ref:oe}),s&&!a&&(0,ss.jsx)(toe,{__unstableContentRef:t})]}),C&&(0,ss.jsx)(ap,{clientId:C,onClose:()=>B(null)}),c&&(0,ss.jsx)(xD,{clientIds:c,onClose:W})]})}var as=l(N(),1),Za=l(K(),1),_c=l(F(),1),j4=l(aoe(),1);var sPe=()=>function(){let{replaceBlocks:t,multiSelect:o}=(0,_c.useDispatch)(x),{blocks:r,clientIds:n,canRemove:i,possibleBlockTransformations:s,invalidSelection:a}=(0,_c.useSelect)(h=>{let{getBlockRootClientId:p,getBlockTransformItems:g,getSelectedBlockClientIds:b,getBlocksByClientId:k,canRemoveBlocks:v}=h(x),y=b(),_=k(y);if(_.filter(C=>!C).length>0)return{invalidSelection:!0};let S=p(y[0]);return{blocks:_,clientIds:y,possibleBlockTransformations:g(_,S),canRemove:v(y),invalidSelection:!1}},[]);if(a)return{isLoading:!1,commands:[]};let c=r.length===1&&(0,Za.isTemplatePart)(r[0]);function u(h){h.length>1&&o(h[0].clientId,h[h.length-1].clientId)}function d(h){let p=(0,Za.switchToBlockType)(r,h);t(n,p),u(p)}let f=!!s.length&&i&&!c;return!n||n.length<1||!f?{isLoading:!1,commands:[]}:{isLoading:!1,commands:s.map(h=>{let{name:p,title:g,icon:b}=h,k=!b?.src||b?.src==="block-default"?{src:wk}:b;return{name:"core/block-editor/transform-to-"+p.replace("/","-"),label:(0,as.sprintf)((0,as.__)("Transform to %s"),g),icon:k?.src,category:"command",callback:({close:v})=>{d(p),v()}}})}},aPe=()=>function(){let{clientIds:t,isUngroupable:o,isGroupable:r}=(0,_c.useSelect)(O=>{let{getSelectedBlockClientIds:V,isUngroupable:j,isGroupable:H}=O(x);return{clientIds:V(),isUngroupable:j(),isGroupable:H()}},[]),{canInsertBlockType:n,getBlockRootClientId:i,getBlocksByClientId:s,canRemoveBlocks:a,isBlockHiddenAnywhere:c}=M((0,_c.useSelect)(x)),{getBlockEditingMode:u}=(0,_c.useSelect)(x),{getDefaultBlockName:d,getGroupingBlockName:f}=(0,_c.useSelect)(Za.store),m=s(t),h=(0,_c.useDispatch)(x),{removeBlocks:p,replaceBlocks:g,duplicateBlocks:b,insertAfterBlock:k,insertBeforeBlock:v}=h,y=()=>{if(!m.length)return;let O=f(),V=(0,Za.switchToBlockType)(m,O);V&&g(t,V)},_=()=>{if(!m.length)return;let O=m[0].innerBlocks;O.length&&g(t,O)};if(!t||t.length<1)return{isLoading:!1,commands:[]};let{showViewportModal:S}=M(h),C=i(t[0]),B=n(d(),C),T=m.every(O=>!!O&&(0,Za.hasBlockSupport)(O.name,"multiple",!0)&&n(O.name,C)),I=a(t),E=[];T&&E.push({name:"duplicate",label:(0,as.__)("Duplicate"),callback:()=>b(t,!0),icon:Qf}),B&&E.push({name:"add-before",label:(0,as.__)("Add before"),callback:()=>{let O=Array.isArray(t)?t[0]:O;v(O)},icon:Mi},{name:"add-after",label:(0,as.__)("Add after"),callback:()=>{let O=Array.isArray(t)?t[t.length-1]:O;k(O)},icon:Mi}),r&&E.push({name:"Group",label:(0,as.__)("Group"),callback:y,icon:Ik}),o&&E.push({name:"ungroup",label:(0,as.__)("Ungroup"),callback:_,icon:RM}),I&&E.push({name:"remove",label:(0,as.__)("Delete"),callback:()=>p(t,!0),icon:IM});let L=m.every(O=>!!O&&(0,Za.hasBlockSupport)(O.name,"visibility",!0)),P=t.every(O=>u(O)==="default");if(L&&P){let O=t.some(V=>c(V));E.push({name:"toggle-visibility",label:O?(0,as.__)("Show"):(0,as.__)("Hide"),callback:()=>S(t),icon:O?am:Rs})}return{isLoading:!1,commands:E.map(O=>({...O,name:"core/block-editor/action-"+O.name,category:"command",callback:({close:V})=>{O.callback(),V()}}))}},CI=()=>{(0,j4.useCommandLoader)({name:"core/block-editor/blockTransforms",hook:sPe()}),(0,j4.useCommandLoader)({name:"core/block-editor/blockQuickActions",hook:aPe(),context:"block-selection-edit"})};var ln=l(w(),1),BI=(0,doe.createSlotFill)(Symbol("BlockCanvasCover"));function loe({children:e}){return(0,ln.jsx)("div",{className:"block-canvas-cover",style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",pointerEvents:"none"},children:e})}var lPe={ignoredSelectors:[/\.editor-styles-wrapper/gi]};function U4({shouldIframe:e=!0,height:t="300px",children:o=(0,ln.jsx)(Cg,{}),styles:r,contentRef:n,iframeProps:i}){CI();let s=(0,EI.useViewportMatch)("medium","<"),a=A_(),c=Ym(),u=(0,coe.useRef)(),d=(0,EI.useMergeRefs)([n,c,u]),f=(0,uoe.useSelect)(h=>M(h(x)).getZoomLevel(),[]),m=f!==100&&!s?{scale:f,frameSize:"40px"}:{};return e?(0,ln.jsx)(cS,{__unstableContentRef:u,style:{height:t,display:"flex"},children:(0,ln.jsxs)(bg,{...i,...m,ref:a,contentRef:d,style:{...i?.style},name:"editor-canvas",children:[(0,ln.jsx)(BI.Slot,{fillProps:{containerRef:u},children:h=>h.map((p,g)=>(0,ln.jsx)(loe,{children:p},g))}),(0,ln.jsx)(Zl,{styles:r}),o]})}):(0,ln.jsxs)(cS,{__unstableContentRef:u,style:{height:t,display:"flex"},children:[(0,ln.jsx)(BI.Slot,{fillProps:{containerRef:u},children:h=>h.map((p,g)=>(0,ln.jsx)(loe,{children:p},g))}),(0,ln.jsx)(Zl,{styles:r,scope:":where(.editor-styles-wrapper)",transformOptions:lPe}),(0,ln.jsx)(EB,{ref:d,className:"editor-styles-wrapper",tabIndex:-1,style:{height:"100%",width:"100%",overflow:"auto"},children:o})]})}function cPe({children:e,height:t,styles:o}){return(0,ln.jsx)(U4,{height:t,styles:o,children:e})}var foe=cPe;var Xa=l(A(),1),moe=l(N(),1),poe=l(it(),1),hoe=l(Le(),1),ls=l(w(),1),uPe=()=>(0,ls.jsx)(Xa.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",children:(0,ls.jsx)(Xa.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"})}),dPe=({style:e,className:t})=>(0,ls.jsx)("div",{className:"block-library-colors-selector__icon-container",children:(0,ls.jsx)("div",{className:`${t} block-library-colors-selector__state-selection`,style:e,children:(0,ls.jsx)(uPe,{})})}),fPe=({TextColor:e,BackgroundColor:t})=>function({onToggle:r,isOpen:n}){let i=s=>{!n&&s.keyCode===poe.DOWN&&(s.preventDefault(),r())};return(0,ls.jsx)(Xa.ToolbarGroup,{children:(0,ls.jsx)(Xa.ToolbarButton,{className:"components-toolbar__control block-library-colors-selector__toggle",label:(0,moe.__)("Open Colors Selector"),onClick:r,onKeyDown:i,icon:(0,ls.jsx)(t,{children:(0,ls.jsx)(e,{children:(0,ls.jsx)(dPe,{})})})})})},mPe=({children:e,...t})=>((0,hoe.default)("wp.blockEditor.BlockColorsStyleSelector",{alternative:"block supports API",since:"6.1",version:"6.3"}),(0,ls.jsx)(Xa.Dropdown,{popoverProps:{placement:"bottom-start"},className:"block-library-colors-selector",contentClassName:"block-library-colors-selector__popover",renderToggle:fPe(t),renderContent:()=>e})),goe=mPe;var xre=l(Le(),1),HI=l(A(),1),Y4=l(N(),1),wre=l(F(),1),Cre=l(R(),1);var Ib=l(X(),1),yre=l(A(),1);var fS=l(F(),1),_re=l(Le(),1),Po=l(R(),1),K4=l(N(),1);var DI=l(A(),1),VI=l(R(),1),FI=l(F(),1);var voe=l(X(),1),koe=l(sr(),1),yoe=l(F(),1),OI=l(R(),1),xb=l(N(),1);var TI=l(R(),1),II=(0,TI.createContext)({});II.displayName="ListViewContext";var Dd=()=>(0,TI.useContext)(II);var PI=l(R(),1),boe=l(w(),1);function RI({children:e,...t}){let o=(0,PI.useRef)();return(0,PI.useEffect)(()=>{o.current&&(o.current.textContent=o.current.textContent)},[e]),(0,boe.jsx)("div",{hidden:!0,...t,ref:o,children:e})}var uS=l(w(),1),H4=(0,OI.forwardRef)(({nestingLevel:e,blockCount:t,clientId:o,...r},n)=>{let{insertedBlock:i,setInsertedBlock:s}=Dd(),a=(0,voe.useInstanceId)(H4),{directInsert:c,hideInserter:u}=(0,yoe.useSelect)(p=>{let{getBlockListSettings:g,getTemplateLock:b,isZoomOut:k}=M(p(x)),y=g(o)?.directInsert||!1,_=!!b(o)||k();return{directInsert:y,hideInserter:_}},[o]),d=Sr({clientId:o,context:"list-view"}),f=Sr({clientId:i?.clientId,context:"list-view"});if((0,OI.useEffect)(()=>{f?.length&&(0,koe.speak)((0,xb.sprintf)((0,xb.__)("%s block inserted"),f),"assertive")},[f]),u)return null;let m=`list-view-appender__${a}`,h=(0,xb.sprintf)((0,xb.__)("Append to %1$s block at position %2$d, Level %3$d"),d,t+1,e);return(0,uS.jsxs)("div",{className:"list-view-appender",children:[(0,uS.jsx)(Ji,{ref:n,rootClientId:o,position:"bottom right",isAppender:!0,selectBlockOnInsert:!1,shouldDirectInsert:c,__experimentalIsQuick:!0,...r,toggleProps:{"aria-describedby":m},onSelectOrClose:p=>{p?.clientId&&s(p)}}),(0,uS.jsx)(RI,{id:m,children:h})]})});var zd=l(K(),1),dp=l(A(),1),NI=l(X(),1);var Io=l(R(),1),Cb=l(F(),1),W4=l(N(),1),MI=l(it(),1),Woe=l(I_(),1),$oe=l(Us(),1),Koe=l(sr(),1);var _oe=l(A(),1),Soe=l(X(),1),xoe=l(R(),1);var woe=l(w(),1),pPe=eG(_oe.__experimentalTreeGridRow),hPe=(0,xoe.forwardRef)(({isDragged:e,isSelected:t,position:o,level:r,rowCount:n,children:i,className:s,path:a,...c},u)=>{let d=B1({clientId:c["data-block"],enableAnimation:!0,triggerAnimationOnChange:a}),f=(0,Soe.useMergeRefs)([u,d]);return(0,woe.jsx)(pPe,{ref:f,className:D("block-editor-list-view-leaf",s),level:r,positionInSet:o,setSize:n,isExpanded:void 0,...c,children:i})}),Coe=hPe;var Boe=l(Fe(),1),Eoe=l(R(),1);function Toe({isSelected:e,selectedClientIds:t,rowItemRef:o}){let r=t.length===1;(0,Eoe.useLayoutEffect)(()=>{if(!e||!r||!o.current)return;let n=(0,Boe.getScrollContainer)(o.current),{ownerDocument:i}=o.current;if(n===i.body||n===i.documentElement||!n)return;let a=o.current.getBoundingClientRect(),c=n.getBoundingClientRect();(a.top<c.top||a.bottom>c.bottom)&&o.current.scrollIntoView()},[e,r,o])}var Doe=l(R(),1);var Vd=l(A(),1),Loe=l(R(),1);var LI=l(it(),1),Noe=l(F(),1);var Ioe=l(N(),1),G4=l(w(),1);function AI({onClick:e}){return(0,G4.jsx)("span",{className:"block-editor-list-view__expander",onClick:t=>e(t,{forceToggle:!0}),"aria-hidden":"true","data-testid":"list-view-expander",children:(0,G4.jsx)(Ie,{icon:(0,Ioe.isRTL)()?Ck:yu})})}var Poe=l(R(),1),Roe=l(F(),1);var gPe=3,Ooe={"core/image":({clientId:e,attributes:t})=>{if(t.url)return{url:t.url,alt:t.alt||"",clientId:e}},"core/cover":({clientId:e,attributes:t})=>{if(t.backgroundType==="image"&&t.url)return{url:t.url,alt:t.alt||"",clientId:e}},"core/media-text":({clientId:e,attributes:t})=>{if(t.mediaType==="image"&&t.mediaUrl)return{url:t.mediaUrl,alt:t.mediaAlt||"",clientId:e}},"core/gallery":({innerBlocks:e})=>{let t=[],o=e?.length?Ooe[e[0].name]:void 0;if(!o)return t;for(let r of e){let n=o(r);if(n&&t.push(n),t.length>=gPe)return t}return t}};function bPe(e,t){let o=Ooe[e.name],r=o?o(e):void 0;return r?Array.isArray(r)?t?[]:r:[r]:[]}function Aoe({clientId:e,isExpanded:t}){let{block:o}=(0,Roe.useSelect)(n=>({block:n(x).getBlock(e)}),[e]);return(0,Poe.useMemo)(()=>bPe(o,t),[o,t])}var Zo=l(w(),1),{Badge:vPe}=M(Vd.privateApis);function kPe({className:e,block:{clientId:t},onClick:o,onContextMenu:r,onMouseDown:n,onToggleExpanded:i,tabIndex:s,onFocus:a,onDragStart:c,onDragEnd:u,draggable:d,isExpanded:f,ariaDescribedBy:m},h){let p=Lt(t),g=Sr({clientId:t,context:"list-view"}),{isLocked:b}=ui(t),{hasPatternName:k,blockVisibility:v}=(0,Noe.useSelect)(I=>{let{getBlockAttributes:E}=M(I(x)),L=E(t);return{hasPatternName:!!L?.metadata?.patternName,blockVisibility:L?.metadata?.blockVisibility}},[t]),y=b,_=p?.positionType==="sticky",S=Aoe({clientId:t,isExpanded:f}),C=Uy(v),B=I=>{I.dataTransfer.clearData(),c?.(I)};function T(I){(I.keyCode===LI.ENTER||I.keyCode===LI.SPACE)&&o(I)}return(0,Zo.jsxs)("a",{className:D("block-editor-list-view-block-select-button",e),onClick:o,onContextMenu:r,onKeyDown:T,onMouseDown:n,ref:h,tabIndex:s,onFocus:a,onDragStart:B,onDragEnd:u,draggable:d,href:`#block-${t}`,"aria-describedby":m,"aria-expanded":f,children:[(0,Zo.jsx)(AI,{onClick:i}),(0,Zo.jsx)(Me,{icon:k?Di:p?.icon,showColors:!0,context:"list-view"}),(0,Zo.jsxs)(Vd.__experimentalHStack,{alignment:"center",className:"block-editor-list-view-block-select-button__label-wrapper",justify:"flex-start",spacing:1,children:[(0,Zo.jsx)("span",{className:"block-editor-list-view-block-select-button__title",children:(0,Zo.jsx)(Vd.__experimentalTruncate,{ellipsizeMode:"auto",children:g})}),p?.anchor&&(0,Zo.jsx)("span",{className:"block-editor-list-view-block-select-button__anchor-wrapper",children:(0,Zo.jsx)(vPe,{className:"block-editor-list-view-block-select-button__anchor",children:p.anchor})}),_&&(0,Zo.jsx)("span",{className:"block-editor-list-view-block-select-button__sticky",children:(0,Zo.jsx)(Ie,{icon:DN})}),S.length?(0,Zo.jsx)("span",{className:"block-editor-list-view-block-select-button__images","aria-hidden":!0,children:S.map((I,E)=>(0,Zo.jsx)("span",{className:"block-editor-list-view-block-select-button__image",style:{backgroundImage:`url(${I.url})`,zIndex:S.length-E}},I.clientId))}):null,!!C&&(0,Zo.jsx)(Vd.Tooltip,{text:C,children:(0,Zo.jsx)("span",{className:"block-editor-list-view-block-select-button__block-visibility","aria-hidden":"true",children:(0,Zo.jsx)(Ie,{icon:Rs})})}),y&&(0,Zo.jsx)("span",{className:"block-editor-list-view-block-select-button__lock",children:(0,Zo.jsx)(Ie,{icon:IN})})]})]})}var Moe=(0,Loe.forwardRef)(kPe);var Fd=l(w(),1),yPe=(0,Doe.forwardRef)(({onClick:e,onToggleExpanded:t,block:o,isSelected:r,position:n,siblingBlockCount:i,level:s,isExpanded:a,selectedClientIds:c,...u},d)=>{let{clientId:f}=o,{AdditionalBlockContent:m,insertedBlock:h,setInsertedBlock:p}=Dd(),g=c.includes(f)?c:[f];return(0,Fd.jsxs)(Fd.Fragment,{children:[m&&(0,Fd.jsx)(m,{block:o,insertedBlock:h,setInsertedBlock:p}),(0,Fd.jsx)(mT,{appendToOwnerDocument:!0,clientIds:g,cloneClassname:"block-editor-list-view-draggable-chip",children:({draggable:b,onDragStart:k,onDragEnd:v})=>(0,Fd.jsx)(Moe,{ref:d,className:"block-editor-list-view-block-contents",block:o,onClick:e,onToggleExpanded:t,isSelected:r,position:n,siblingBlockCount:i,level:s,draggable:b,onDragStart:k,onDragEnd:v,isExpanded:a,...u})})]})}),Voe=yPe;var up=l(N(),1),Foe=l(Fe(),1),zoe=(e,t,o)=>(0,up.sprintf)((0,up.__)("Block %1$d of %2$d, Level %3$d."),e,t,o),joe=(e,t)=>[e?.positionLabel?`${(0,up.sprintf)((0,up.__)("Position: %s"),e.positionLabel)}.`:void 0,t?(0,up.__)("This block is locked."):void 0].filter(Boolean).join(" "),Uoe=(e,t)=>Array.isArray(t)&&t.length?t.indexOf(e)!==-1:t===e;function Hoe(e,t,o,r){let n=[...o,e],i=[...r,t],s=Math.min(n.length,i.length)-1,a=n[s],c=i[s];return{start:a,end:c}}function wb(e,t){if(!t)return;let o=`[role=row][data-block="${e}"]`;return new Promise(r=>{if(t.querySelector(o))return r(t.querySelector(o));let n=null,i=new window.MutationObserver(()=>{t.querySelector(o)&&(clearTimeout(n),i.disconnect(),r(t.querySelector(o)))});i.observe(t,{childList:!0,subtree:!0}),n=setTimeout(()=>{i.disconnect(),r(null)},3e3)}).then(r=>{r&&r.isConnected&&Foe.focus.focusable.find(r)?.[0]?.focus()})}function Goe({blockIndexes:e,blockDropTargetIndex:t,blockDropPosition:o,clientId:r,firstDraggedBlockIndex:n,isDragged:i}){let s,a,c;if(!i){a=!1;let u=e[r];c=u>n,t!=null&&n!==void 0?u!==void 0&&(u>=n&&u<t?s="up":u<n&&u>=t?s="down":s="normal",a=typeof t=="number"&&t-1===u&&o==="inside"):t===null&&n!==void 0?u!==void 0&&u>=n?s="up":s="normal":t!=null&&n===void 0?u!==void 0&&(u<t?s="normal":s="down"):t===null&&(s="normal")}return{displacement:s,isNesting:a,isAfterDraggedBlocks:c}}var cr=l(w(),1);function Yoe({block:{clientId:e},displacement:t,isAfterDraggedBlocks:o,isDragged:r,isNesting:n,isSelected:i,isBranchSelected:s,selectBlock:a,position:c,level:u,rowCount:d,siblingBlockCount:f,showBlockMovers:m,path:h,isExpanded:p,selectedClientIds:g,isSyncedBranch:b}){let k=(0,Io.useRef)(null),v=(0,Io.useRef)(null),y=(0,Io.useRef)(null),[_,S]=(0,Io.useState)(!1),[C,B]=(0,Io.useState)(),[T,I]=(0,Io.useState)(!1),{isLocked:E}=ui(e),L=i&&g[0]===e,P=i&&g[g.length-1]===e,{toggleBlockHighlight:O,duplicateBlocks:V,multiSelect:j,replaceBlocks:H,removeBlocks:z,insertAfterBlock:U,insertBeforeBlock:G,showViewportModal:W}=M((0,Cb.useDispatch)(x)),J=(0,NI.useDebounce)(O,50),{canInsertBlockType:le,getSelectedBlockClientIds:oe,getPreviousBlockClientId:re,getBlockRootClientId:Q,getBlockOrder:$,getBlockParents:ee,getBlockEditingMode:Y,getBlocksByClientId:te,canEditBlock:ne,canMoveBlock:q,canRemoveBlocks:se,isGroupable:pe}=(0,Cb.useSelect)(x),{getGroupingBlockName:xe}=(0,Cb.useSelect)(zd.store),Te=Lt(e),Xe=tb(),{block:dt,blockName:ft,allowRightClickOverrides:we}=(0,Cb.useSelect)(ce=>{let{getBlock:uo,getBlockName:ye,getSettings:Ht}=M(ce(x));return{block:uo(e),blockName:ye(e),allowRightClickOverrides:Ht().allowRightClickOverrides}},[e]),{canRename:ot}=cp(ft),Ce=(0,zd.hasBlockSupport)(ft,"__experimentalToolbar",!0),Qt=`list-view-block-select-button__description-${(0,NI.useInstanceId)(Yoe)}`,{expand:lo,collapse:Qe,collapseAll:jt,BlockSettingsMenu:rt,listViewInstanceId:He,expandedState:$o,setInsertedBlock:Yn,treeGridElementRef:ze,rootClientId:co}=Dd(),nt=(0,$oe.__unstableUseShortcutEventMatch)();function je(){let ce=oe(),uo=ce.includes(e),ye=uo?ce[0]:e,Ht=Q(ye);return{blocksToUpdate:uo?ce:[e],firstBlockClientId:ye,firstBlockRootClientId:Ht,selectedBlockClientIds:ce}}async function wt(ce){if(ce.defaultPrevented||ce.target.closest("[role=dialog]"))return;let uo=[MI.BACKSPACE,MI.DELETE].includes(ce.keyCode);if(nt("core/block-editor/unselect",ce)&&g.length>0)ce.stopPropagation(),ce.preventDefault(),a(ce,void 0);else if(uo||nt("core/block-editor/remove",ce)){let{blocksToUpdate:ye,firstBlockClientId:Ht,firstBlockRootClientId:yn,selectedBlockClientIds:Rr}=je();if(!se(ye))return;let cu=re(Ht)??yn;z(ye,!1);let hA=Rr.length>0&&oe().length===0;cu||(cu=$()[0]),Rt(cu,hA)}else if(nt("core/block-editor/paste-styles",ce)){ce.preventDefault();let{blocksToUpdate:ye}=je(),Ht=te(ye);Xe(Ht)}else if(nt("core/block-editor/duplicate",ce)){ce.preventDefault();let{blocksToUpdate:ye,firstBlockRootClientId:Ht}=je();if(te(ye).every(Rr=>!!Rr&&(0,zd.hasBlockSupport)(Rr.name,"multiple",!0)&&le(Rr.name,Ht))){let Rr=await V(ye,!1);Rr?.length&&Rt(Rr[0],!1)}}else if(nt("core/block-editor/insert-before",ce)){ce.preventDefault();let{blocksToUpdate:ye}=je();await G(ye[0]);let Ht=oe();Rt(Ht[0],!1)}else if(nt("core/block-editor/insert-after",ce)){ce.preventDefault();let{blocksToUpdate:ye}=je();await U(ye.at(-1));let Ht=oe();Rt(Ht[0],!1)}else if(nt("core/block-editor/select-all",ce)){ce.preventDefault();let{firstBlockRootClientId:ye,selectedBlockClientIds:Ht}=je(),yn=$(ye);if(!yn.length)return;if((0,Woe.isShallowEqual)(Ht,yn)&&ye&&ye!==co){Rt(ye,!0);return}j(yn[0],yn[yn.length-1],null)}else if(nt("core/block-editor/collapse-list-view",ce)){ce.preventDefault();let{firstBlockClientId:ye}=je(),Ht=ee(ye,!1);jt(),lo(Ht)}else if(nt("core/block-editor/group",ce)){let{blocksToUpdate:ye}=je();if(ye.length>1&&pe(ye)){ce.preventDefault();let Ht=te(ye),yn=xe(),Rr=(0,zd.switchToBlockType)(Ht,yn);H(ye,Rr),(0,Koe.speak)((0,W4.__)("Selected blocks are grouped."));let cu=oe();Rt(cu[0],!1)}}else if(nt("core/block-editor/toggle-block-visibility",ce)){ce.preventDefault();let{blocksToUpdate:ye}=je();if(!te(ye).every(Rr=>(0,zd.hasBlockSupport)(Rr.name,"visibility",!0))||ye.some(Rr=>Y(Rr)!=="default"))return;W(ye)}else if(nt("core/block-editor/rename",ce)){let{blocksToUpdate:ye}=je(),Ht=Y(ye[0])==="contentOnly";ye.length===1&&ot&&!Ht&&(ce.preventDefault(),I(!0))}}let So=(0,Io.useCallback)(()=>{S(!0),J(e,!0)},[e,S,J]),gr=(0,Io.useCallback)(()=>{S(!1),J(e,!1)},[e,S,J]),be=(0,Io.useCallback)(ce=>{a(ce,e),ce.preventDefault()},[e,a]),Rt=(0,Io.useCallback)((ce,uo)=>{uo&&a(void 0,ce,null,null),wb(ce,ze?.current)},[a,ze]),Vo=(0,Io.useCallback)(ce=>{ce.preventDefault(),ce.stopPropagation(),p===!0?Qe(e):p===!1&&lo(e)},[e,lo,Qe,p]),bt=(0,Io.useCallback)(ce=>{let{ownerDocument:uo}=y?.current||{};!uo||!uo.hasFocus()||Ce&&we&&(y.current?.click(),B(new window.DOMRect(ce.clientX,ce.clientY,0,0)),ce.preventDefault())},[we,y,Ce]),ge=(0,Io.useCallback)(ce=>{we&&ce.button===2&&ce.preventDefault()},[we]),Ut=(0,Io.useMemo)(()=>{let{ownerDocument:ce}=v?.current||{};if(!(!C||!ce))return{ownerDocument:ce,getBoundingClientRect(){return C}}},[C]),Ct=(0,Io.useCallback)(()=>{B(void 0)},[B]);if(Toe({isSelected:i,rowItemRef:v,selectedClientIds:g}),!dt)return null;let Sa=zoe(c,f,u),Kr=joe(Te,E),he=Uy(dt?.attributes?.metadata?.blockVisibility),nr=f>0,xa=m&&nr,kn=D("block-editor-list-view-block__mover-cell",{"is-visible":_||i}),rh=D("block-editor-list-view-block__menu-cell",{"is-visible":_||L}),nh;xa?nh=2:Ce||(nh=3);let F0=D({"is-selected":i,"is-first-selected":L,"is-last-selected":P,"is-branch-selected":s,"is-synced-branch":b,"is-dragging":r,"has-single-cell":!Ce,"is-synced":Te?.isSynced,"is-draggable":q,"is-displacement-normal":t==="normal","is-displacement-up":t==="up","is-displacement-down":t==="down","is-after-dragged-blocks":o,"is-nesting":n}),z0=g.includes(e)?g:[e],fk=i&&g.length===1;return(0,cr.jsxs)(Coe,{className:F0,isDragged:r,onKeyDown:wt,onMouseEnter:So,onMouseLeave:gr,onFocus:So,onBlur:gr,level:u,position:c,rowCount:d,path:h,id:`list-view-${He}-block-${e}`,"data-block":e,"data-expanded":ne?p:void 0,ref:v,children:[(0,cr.jsx)(dp.__experimentalTreeGridCell,{className:"block-editor-list-view-block__contents-cell",colSpan:nh,ref:k,"aria-selected":!!i,children:({ref:ce,tabIndex:uo,onFocus:ye})=>(0,cr.jsxs)("div",{className:"block-editor-list-view-block__contents-container",children:[(0,cr.jsx)(Voe,{block:dt,onClick:be,onContextMenu:bt,onMouseDown:ge,onToggleExpanded:Vo,isSelected:i,position:c,siblingBlockCount:f,level:u,ref:ce,tabIndex:fk?0:uo,onFocus:ye,isExpanded:ne?p:void 0,selectedClientIds:g,ariaDescribedBy:Qt}),(0,cr.jsx)(RI,{id:Qt,children:[Sa,Kr,he].filter(Boolean).join(" ")})]})}),xa&&(0,cr.jsx)(cr.Fragment,{children:(0,cr.jsxs)(dp.__experimentalTreeGridCell,{className:kn,withoutGridItem:!0,children:[(0,cr.jsx)(dp.__experimentalTreeGridItem,{children:({ref:ce,tabIndex:uo,onFocus:ye})=>(0,cr.jsx)(gT,{orientation:"vertical",clientIds:[e],ref:ce,tabIndex:uo,onFocus:ye})}),(0,cr.jsx)(dp.__experimentalTreeGridItem,{children:({ref:ce,tabIndex:uo,onFocus:ye})=>(0,cr.jsx)(bT,{orientation:"vertical",clientIds:[e],ref:ce,tabIndex:uo,onFocus:ye})})]})}),Ce&&rt&&(0,cr.jsx)(dp.__experimentalTreeGridCell,{className:rh,"aria-selected":!!i,ref:y,children:({ref:ce,tabIndex:uo,onFocus:ye})=>(0,cr.jsx)(rt,{clientIds:z0,block:dt,icon:Ps,label:(0,W4.__)("Options"),popoverProps:{anchor:Ut},toggleProps:{ref:ce,className:"block-editor-list-view-block__menu",tabIndex:uo,onClick:Ct,onFocus:ye,size:"small"},disableOpenOnArrowDown:!0,expand:lo,expandedState:$o,setInsertedBlock:Yn,__experimentalSelectBlock:Rt,isContentOnlyListView:!!co&&Y(co)==="contentOnly"})}),T&&(0,cr.jsx)(ap,{clientId:e,onClose:()=>I(!1)})]})}var qoe=(0,Io.memo)(Yoe);var mi=l(w(),1);function Zoe(e,t,o,r){return o?.includes(e.clientId)?0:t[e.clientId]??r?1+e.innerBlocks.reduce(_Pe(t,o,r),0):1}var _Pe=(e,t,o)=>(r,n)=>t?.includes(n.clientId)?r:(e[n.clientId]??o)&&n.innerBlocks.length>0?r+Zoe(n,e,t,o):r+1,SPe=()=>{};function Xoe(e){let{blocks:t,selectBlock:o=SPe,showBlockMovers:r,selectedClientIds:n,level:i=1,path:s="",isBranchSelected:a=!1,listPosition:c=0,fixedListWindow:u,isExpanded:d,parentId:f,shouldShowInnerBlocks:m=!0,isSyncedBranch:h=!1,showAppender:p=!0}=e,g=Lt(f),b=h||!!g?.isSynced,k=(0,FI.useSelect)(O=>f?O(x).canEditBlock(f):!0,[f]),{blockDropPosition:v,blockDropTargetIndex:y,firstDraggedBlockIndex:_,blockIndexes:S,expandedState:C,draggedClientIds:B}=Dd(),T=(0,VI.useRef)();if(!k)return null;let I=p&&i===1,E=t.filter(Boolean),L=E.length,P=I?L+1:L;return T.current=c,(0,mi.jsxs)(mi.Fragment,{children:[E.map((O,V)=>{let{clientId:j,innerBlocks:H}=O;V>0&&(T.current+=Zoe(E[V-1],C,B,d));let z=!!B?.includes(j),{displacement:U,isAfterDraggedBlocks:G,isNesting:W}=Goe({blockIndexes:S,blockDropTargetIndex:y,blockDropPosition:v,clientId:j,firstDraggedBlockIndex:_,isDragged:z}),{itemInView:J}=u,le=J(T.current),oe=V+1,re=s.length>0?`${s}_${oe}`:`${oe}`,Q=!!H?.length,$=Q&&m?C[j]??d:void 0,ee=Uoe(j,n),Y=a||ee&&Q,te=z||le||ee&&j===n[0]||V===0||V===L-1;return(0,mi.jsxs)(FI.AsyncModeProvider,{value:!ee,children:[te&&(0,mi.jsx)(qoe,{block:O,selectBlock:o,isSelected:ee,isBranchSelected:Y,isDragged:z,level:i,position:oe,rowCount:P,siblingBlockCount:L,showBlockMovers:r,path:re,isExpanded:z?!1:$,listPosition:T.current,selectedClientIds:n,isSyncedBranch:b,displacement:U,isAfterDraggedBlocks:G,isNesting:W}),!te&&(0,mi.jsx)("tr",{children:(0,mi.jsx)("td",{className:"block-editor-list-view-placeholder"})}),Q&&$&&!z&&(0,mi.jsx)(Xoe,{parentId:j,blocks:H,selectBlock:o,showBlockMovers:r,level:i+1,path:re,listPosition:T.current+1,fixedListWindow:u,isBranchSelected:Y,selectedClientIds:n,isExpanded:d,isSyncedBranch:b})]},j)}),I&&(0,mi.jsx)(DI.__experimentalTreeGridRow,{level:i,setSize:P,positionInSet:P,isExpanded:!0,children:(0,mi.jsx)(DI.__experimentalTreeGridCell,{children:O=>(0,mi.jsx)(H4,{clientId:f,nestingLevel:i,blockCount:L,...O})})})]})}var Qoe=(0,VI.memo)(Xoe);var Bb=l(A(),1),zI=l(Fe(),1),Sc=l(R(),1),$4=l(N(),1);var cs=l(w(),1);function Joe({draggedBlockClientId:e,listViewRef:t,blockDropTarget:o}){let r=Lt(e),n=Sr({clientId:e,context:"list-view"}),{rootClientId:i,clientId:s,dropPosition:a}=o||{},[c,u]=(0,Sc.useMemo)(()=>{if(!t.current)return[];let v=i?t.current.querySelector(`[data-block="${i}"]`):void 0,y=s?t.current.querySelector(`[data-block="${s}"]`):void 0;return[v,y]},[t,i,s]),d=u||c,f=(0,$4.isRTL)(),m=(0,Sc.useCallback)((v,y)=>{if(!d)return 0;let _=d.offsetWidth,S=(0,zI.getScrollContainer)(d,"horizontal"),C=d.ownerDocument,B=S===C.body||S===C.documentElement;if(S&&!B){let T=S.getBoundingClientRect(),I=(0,$4.isRTL)()?T.right-v.right:v.left-T.left,E=S.clientWidth;if(E<_+I&&(_=E-I),!f&&v.left+y<T.left)return _-=T.left-v.left,_;if(f&&v.right-y>T.right)return _-=v.right-T.right,_}return _-y},[f,d]),h=(0,Sc.useMemo)(()=>{if(!d)return{};let v=d.getBoundingClientRect();return{width:m(v,0)}},[m,d]),p=(0,Sc.useMemo)(()=>{if(!d)return{};let v=(0,zI.getScrollContainer)(d),y=d.ownerDocument,_=v===y.body||v===y.documentElement;if(v&&!_){let S=v.getBoundingClientRect(),C=d.getBoundingClientRect(),B=f?S.right-C.right:C.left-S.left;if(!f&&S.left>C.left)return{transform:`translateX( ${B}px )`};if(f&&S.right<C.right)return{transform:`translateX( ${B*-1}px )`}}return{}},[f,d]),g=(0,Sc.useMemo)(()=>{if(!c)return 1;let v=parseInt(c.getAttribute("aria-level"),10);return v?v+1:1},[c]),b=(0,Sc.useMemo)(()=>d?d.classList.contains("is-branch-selected"):!1,[d]),k=(0,Sc.useMemo)(()=>{if(!(!d||!(a==="top"||a==="bottom"||a==="inside")))return{contextElement:d,getBoundingClientRect(){let y=d.getBoundingClientRect(),_=y.left,S=0,C=(0,zI.getScrollContainer)(d,"horizontal"),B=d.ownerDocument,T=C===B.body||C===B.documentElement;if(C&&!T){let L=C.getBoundingClientRect(),P=f?C.offsetWidth-C.clientWidth:0;_<L.left+P&&(_=L.left+P)}a==="top"?S=y.top-y.height*2:S=y.top;let I=m(y,0),E=y.height;return new window.DOMRect(_,S,I,E)}}},[d,a,m,f]);return d?(0,cs.jsx)(Bb.Popover,{animate:!1,anchor:k,focusOnMount:!1,className:"block-editor-list-view-drop-indicator--preview",variant:"unstyled",flip:!1,resize:!0,children:(0,cs.jsx)("div",{style:h,className:D("block-editor-list-view-drop-indicator__line",{"block-editor-list-view-drop-indicator__line--darker":b}),children:(0,cs.jsxs)("div",{className:"block-editor-list-view-leaf","aria-level":g,children:[(0,cs.jsxs)("div",{className:D("block-editor-list-view-block-select-button","block-editor-list-view-block-contents"),style:p,children:[(0,cs.jsx)(AI,{onClick:()=>{}}),(0,cs.jsx)(Me,{icon:r?.icon,showColors:!0,context:"list-view"}),(0,cs.jsx)(Bb.__experimentalHStack,{alignment:"center",className:"block-editor-list-view-block-select-button__label-wrapper",justify:"flex-start",spacing:1,children:(0,cs.jsx)("span",{className:"block-editor-list-view-block-select-button__title",children:(0,cs.jsx)(Bb.__experimentalTruncate,{ellipsizeMode:"auto",children:n})})})]}),(0,cs.jsx)("div",{className:"block-editor-list-view-block__menu-cell"})]})})}):null}var ere=l(sr(),1),Eb=l(N(),1),dS=l(F(),1),tre=l(R(),1),pi=l(it(),1),ore=l(K(),1);function rre(){let{clearSelectedBlock:e,multiSelect:t,selectBlock:o}=(0,dS.useDispatch)(x),{getBlockName:r,getBlockParents:n,getBlockSelectionStart:i,getSelectedBlockClientIds:s,hasMultiSelection:a,hasSelectedBlock:c}=(0,dS.useSelect)(x),{getBlockType:u}=(0,dS.useSelect)(ore.store);return{updateBlockSelection:(0,tre.useCallback)(async(f,m,h,p)=>{if(!f?.shiftKey&&f?.keyCode!==pi.ESCAPE){o(m,p);return}f.preventDefault();let g=f.type==="keydown"&&f.keyCode===pi.ESCAPE,b=f.type==="keydown"&&(f.keyCode===pi.UP||f.keyCode===pi.DOWN||f.keyCode===pi.HOME||f.keyCode===pi.END);if(!b&&!c()&&!a()){o(m,null);return}let k=s(),v=[...n(m),m];if((g||b&&!k.some(C=>v.includes(C)))&&await e(),!g){let C=i(),B=m;b&&(!c()&&!a()&&(C=m),h&&(B=h));let T=n(C),I=n(B),{start:E,end:L}=Hoe(C,B,T,I);await t(E,L,null)}let y=s();if((f.keyCode===pi.HOME||f.keyCode===pi.END)&&y.length>1)return;let _=k.filter(C=>!y.includes(C)),S;if(_.length===1){let C=u(r(_[0]))?.title;C&&(S=(0,Eb.sprintf)((0,Eb.__)("%s deselected."),C))}else _.length>1&&(S=(0,Eb.sprintf)((0,Eb.__)("%s blocks deselected."),_.length));S&&(0,ere.speak)(S,"assertive")},[e,r,u,n,i,s,a,c,t,o])}}var nre=l(R(),1);function ire(e){return(0,nre.useMemo)(()=>{let o={},r=0,n=i=>{i.forEach(s=>{o[s.clientId]=r,r++,s.innerBlocks.length>0&&n(s.innerBlocks)})};return n(e),o},[e])}var sre=l(F(),1);function are({blocks:e,rootClientId:t}){return(0,sre.useSelect)(o=>{let{getDraggedBlockClientIds:r,getSelectedBlockClientIds:n,getEnabledClientIdsTree:i}=M(o(x));return{selectedClientIds:n(),draggedClientIds:r(),clientIdsTree:e??i(t)}},[e,t])}var lre=l(R(),1),cre=l(F(),1);function ure({collapseAll:e,expand:t}){let{expandedBlock:o,getBlockParents:r}=(0,cre.useSelect)(n=>{let{getBlockParents:i,getExpandedBlock:s}=M(n(x));return{expandedBlock:s(),getBlockParents:i}},[]);(0,lre.useEffect)(()=>{if(o){let n=r(o,!1);e(),t(n)}},[e,t,o,r])}var dre=l(F(),1),fp=l(R(),1),mp=l(X(),1),fre=l(N(),1);var xc=24;function xPe(e,t,o=1,r=!1){let n=r?t.right-o*xc:t.left+o*xc;return r?e.x>n:e.x<n}function wPe(e,t,o=1,r=!1){let n=r?t.right-o*xc:t.left+o*xc,i=r?n-e.x:e.x-n,s=Math.round(i/xc);return Math.abs(s)}function CPe(e,t){let o=[],r=e;for(;r;)o.push({...r}),r=t.find(n=>n.clientId===r.rootClientId);return o}function mre(e,t){let o=e[t+1];return o&&o.isDraggedBlock?mre(e,t+1):o}function BPe(e,t,o=1,r=!1){let n=r?t.right-o*xc:t.left+o*xc;return(r?e.x<n-xc:e.x>n+xc)&&e.y<t.bottom}var EPe=["top","bottom"];function TPe(e,t,o=!1){let r,n,i,s,a;for(let f=0;f<e.length;f++){let m=e[f];if(m.isDraggedBlock)continue;let h=m.element.getBoundingClientRect(),[p,g]=Zm(t,h,EPe),b=WE(t,h);if(i===void 0||p<i||b){i=p;let k=e.indexOf(m),v=e[k-1];if(g==="top"&&v&&v.rootClientId===m.rootClientId&&!v.isDraggedBlock?(n=v,r="bottom",s=v.element.getBoundingClientRect(),a=k-1):(n=m,r=g,s=h,a=k),b)break}}if(!n)return;let c=CPe(n,e),u=r==="bottom";if(u&&n.canInsertDraggedBlocksAsChild&&(n.innerBlockCount>0&&n.isExpanded||BPe(t,s,c.length,o))){let f=n.isExpanded?0:n.innerBlockCount||0;return{rootClientId:n.clientId,clientId:n.clientId,blockIndex:f,dropPosition:"inside"}}if(u&&n.rootClientId&&xPe(t,s,c.length,o)){let f=mre(e,a),m=n.nestingLevel,h=f?f.nestingLevel:1;if(m&&h){let p=wPe(t,s,c.length,o),g=Math.max(Math.min(p,m-h),0);if(c[g]){let b=n.blockIndex;if(c[g].nestingLevel===f?.nestingLevel)b=f?.blockIndex;else for(let k=a;k>=0;k--){let v=e[k];if(v.rootClientId===c[g].rootClientId){b=v.blockIndex+1;break}}return{rootClientId:c[g].rootClientId,clientId:n.clientId,blockIndex:b,dropPosition:r}}}}if(!n.canInsertDraggedBlocksAsSibling)return;let d=u?1:0;return{rootClientId:n.rootClientId,clientId:n.clientId,blockIndex:n.blockIndex+d,dropPosition:r}}var IPe={leading:!1,trailing:!0};function pre({dropZoneElement:e,expandedState:t,setExpandedState:o}){let{getBlockRootClientId:r,getBlockIndex:n,getBlockCount:i,getDraggedBlockClientIds:s,canInsertBlocks:a}=(0,dre.useSelect)(x),[c,u]=(0,fp.useState)(),{rootClientId:d,blockIndex:f}=c||{},m=GE(d,f),h=(0,fre.isRTL)(),p=(0,mp.usePrevious)(d),g=(0,fp.useCallback)((_,S)=>{let{rootClientId:C}=S||{};C&&S?.dropPosition==="inside"&&!_[C]&&o({type:"expand",clientIds:[C]})},[o]),b=(0,mp.useThrottle)(g,500,IPe);(0,fp.useEffect)(()=>{if(c?.dropPosition!=="inside"||p!==c?.rootClientId){b.cancel();return}b(t,c)},[t,p,c,b]);let k=s(),v=(0,mp.useThrottle)((0,fp.useCallback)((_,S)=>{let C={x:_.clientX,y:_.clientY},B=!!k?.length,I=Array.from(S.querySelectorAll("[data-block]")).map(L=>{let P=L.dataset.block,O=L.dataset.expanded==="true",V=L.classList.contains("is-dragging"),j=parseInt(L.getAttribute("aria-level"),10),H=r(P);return{clientId:P,isExpanded:O,rootClientId:H,blockIndex:n(P),element:L,nestingLevel:j||void 0,isDraggedBlock:B?V:!1,innerBlockCount:i(P),canInsertDraggedBlocksAsSibling:B?a(k,H):!0,canInsertDraggedBlocksAsChild:B?a(k,P):!0}}),E=TPe(I,C,h);E&&u(E)},[a,k,i,n,r,h]),50);return{ref:(0,mp.__experimentalUseDropZone)({dropZoneElement:e,onDrop(_){v.cancel(),c&&m(_),u(void 0)},onDragLeave(){v.cancel(),u(null)},onDragOver(_){v(_,_.currentTarget)},onDragEnd(){v.cancel(),u(void 0)}}),target:c}}var jI=l(R(),1),hre=l(F(),1);function gre({firstSelectedBlockClientId:e,setExpandedState:t}){let[o,r]=(0,jI.useState)(null),{selectedBlockParentClientIds:n}=(0,hre.useSelect)(i=>{let{getBlockParents:s}=i(x);return{selectedBlockParentClientIds:s(e,!1)}},[e]);return(0,jI.useEffect)(()=>{o!==e&&n?.length&&t({type:"expand",clientIds:n})},[e,n,o,t]),{setSelectedTreeId:r}}var Tb=l(F(),1),bre=l(X(),1);function vre({selectBlock:e}){let t=(0,Tb.useRegistry)(),{getBlockOrder:o,getBlockRootClientId:r,getBlocksByClientId:n,getPreviousBlockClientId:i,getSelectedBlockClientIds:s,getSettings:a,canInsertBlockType:c,canRemoveBlocks:u}=(0,Tb.useSelect)(x),{flashBlock:d,removeBlocks:f,replaceBlocks:m,insertBlocks:h}=(0,Tb.useDispatch)(x),p=mg();return(0,bre.useRefEffect)(g=>{function b(y,_){_&&e(void 0,y,null,null),wb(y,g)}function k(y){let _=s(),S=_.includes(y),C=S?_[0]:y,B=r(C);return{blocksToUpdate:S?_:[y],firstBlockClientId:C,firstBlockRootClientId:B,originallySelectedBlockClientIds:_}}function v(y){if(y.defaultPrevented||!g.contains(y.target.ownerDocument.activeElement))return;let S=y.target.ownerDocument.activeElement?.closest("[role=row]")?.dataset?.block;if(!S)return;let{blocksToUpdate:C,firstBlockClientId:B,firstBlockRootClientId:T,originallySelectedBlockClientIds:I}=k(S);if(C.length!==0){if(y.preventDefault(),y.type==="copy"||y.type==="cut"){C.length===1&&d(C[0]),p(y.type,C);let E=n(C);CB(y,E,t)}if(y.type==="cut"){if(!u(C))return;let E=i(B)??T;f(C,!1);let L=I.length>0&&s().length===0;E||(E=o()[0]),b(E,L)}else if(y.type==="paste"){let{__experimentalCanUserUseUnfilteredHTML:E}=a(),L=EK(y,E);if(C.length===1){let[P]=C;if(L.every(O=>c(O.name,P))){h(L,void 0,P),b(L[0]?.clientId,!1);return}}m(C,L,L.length-1,-1),b(L[0]?.clientId,!1)}}}return g.ownerDocument.addEventListener("copy",v),g.ownerDocument.addEventListener("cut",v),g.ownerDocument.addEventListener("paste",v),()=>{g.ownerDocument.removeEventListener("copy",v),g.ownerDocument.removeEventListener("cut",v),g.ownerDocument.removeEventListener("paste",v)}},[])}var wc=l(w(),1),PPe=(e,t)=>t.type==="clear"?{}:Array.isArray(t.clientIds)?{...e,...t.clientIds.reduce((o,r)=>({...o,[r]:t.type==="expand"}),{})}:e,kre=32;function Sre({id:e,blocks:t,dropZoneElement:o,showBlockMovers:r=!1,isExpanded:n=!1,showAppender:i=!1,blockSettingsMenu:s=g4,rootClientId:a,description:c,onSelect:u,additionalBlockContent:d},f){t&&(0,_re.default)("`blocks` property in `wp.blockEditor.__experimentalListView`",{since:"6.3",alternative:"`rootClientId` property"});let m=(0,Ib.useInstanceId)(Sre),{clientIdsTree:h,draggedClientIds:p,selectedClientIds:g}=are({blocks:t,rootClientId:a}),b=ire(h),{getBlock:k,getSelectedBlockClientIds:v}=(0,fS.useSelect)(x),{visibleBlockCount:y}=(0,fS.useSelect)(ne=>{let{getGlobalBlockCount:q,getClientIdsOfDescendants:se}=ne(x),pe=p?.length>0?se(p).length+1:0;return{visibleBlockCount:q()-pe}},[p]),{updateBlockSelection:_}=rre(),[S,C]=(0,Po.useReducer)(PPe,{}),[B,T]=(0,Po.useState)(null),{setSelectedTreeId:I}=gre({firstSelectedBlockClientId:g[0],setExpandedState:C}),E=(0,Po.useCallback)((ne,q,se)=>{_(ne,q,null,se),I(q),u&&u(k(q))},[I,_,u,k]),{ref:L,target:P}=pre({dropZoneElement:o,expandedState:S,setExpandedState:C}),O=(0,Po.useRef)(),V=vre({selectBlock:E}),j=(0,Po.useCallback)(ne=>{let[q]=v();q&&ne&&wb(q,ne)},[v]),H=(0,Ib.useMergeRefs)([V,j,O,L,f]),z=(0,Po.useCallback)(ne=>{if(!ne)return;let q=Array.isArray(ne)?ne:[ne];C({type:"expand",clientIds:q})},[C]),U=(0,Po.useCallback)(ne=>{ne&&C({type:"collapse",clientIds:[ne]})},[C]),G=(0,Po.useCallback)(()=>{C({type:"clear"})},[C]),W=(0,Po.useCallback)(ne=>{z(ne?.dataset?.block)},[z]),J=(0,Po.useCallback)(ne=>{U(ne?.dataset?.block)},[U]),le=(0,Po.useCallback)((ne,q,se)=>{ne.shiftKey&&_(ne,q?.dataset?.block,se?.dataset?.block)},[_]);ure({collapseAll:G,expand:z});let oe=p?.[0],{blockDropTargetIndex:re,blockDropPosition:Q,firstDraggedBlockIndex:$}=(0,Po.useMemo)(()=>{let ne,q;if(P?.clientId){let se=b[P.clientId];ne=se===void 0||P?.dropPosition==="top"?se:se+1}else P===null&&(ne=null);if(oe){let se=b[oe];q=se===void 0||P?.dropPosition==="top"?se:se+1}return{blockDropTargetIndex:ne,blockDropPosition:P?.dropPosition,firstDraggedBlockIndex:q}},[P,b,oe]),ee=(0,Po.useMemo)(()=>({blockDropPosition:Q,blockDropTargetIndex:re,blockIndexes:b,draggedClientIds:p,expandedState:S,expand:z,firstDraggedBlockIndex:$,collapse:U,collapseAll:G,BlockSettingsMenu:s,listViewInstanceId:m,AdditionalBlockContent:d,insertedBlock:B,setInsertedBlock:T,treeGridElementRef:O,rootClientId:a}),[Q,re,b,p,S,z,$,U,G,s,m,d,B,T,a]),[Y]=(0,Ib.__experimentalUseFixedWindowList)(O,kre,y,{expandedState:S,useWindowing:!0,windowOverscan:40});if(!h.length&&!i)return null;let te=c&&`block-editor-list-view-description-${m}`;return(0,wc.jsxs)(fS.AsyncModeProvider,{value:!0,children:[(0,wc.jsx)(Joe,{draggedBlockClientId:oe,listViewRef:O,blockDropTarget:P}),c&&(0,wc.jsx)(We,{id:te,children:c}),(0,wc.jsx)(yre.__experimentalTreeGrid,{id:e,className:D("block-editor-list-view-tree",{"is-dragging":p?.length>0&&re!==void 0}),"aria-label":(0,K4.__)("Block navigation structure"),ref:H,onCollapseRow:J,onExpandRow:W,onFocusRow:le,applicationAriaLabel:(0,K4.__)("Block navigation structure"),"aria-describedby":te,style:{"--wp-admin--list-view-dragged-items-height":p?.length?`${kre*(p.length-1)}px`:null},children:(0,wc.jsx)(II.Provider,{value:ee,children:(0,wc.jsx)(Qoe,{blocks:h,parentId:a,selectBlock:E,showBlockMovers:r,fixedListWindow:Y,selectedClientIds:g,isExpanded:n,showAppender:i})})})]})}var mS=(0,Po.forwardRef)(Sre),UI=(0,Po.forwardRef)((e,t)=>(0,wc.jsx)(mS,{ref:t,...e,showAppender:!1,rootClientId:null,onSelect:null,additionalBlockContent:null,blockSettingsMenu:void 0}));var jd=l(w(),1);function RPe({isEnabled:e,onToggle:t,isOpen:o,innerRef:r,...n}){return(0,jd.jsx)(HI.Button,{__next40pxDefaultSize:!0,...n,ref:r,icon:Rk,"aria-expanded":o,"aria-haspopup":"true",onClick:e?t:void 0,label:(0,Y4.__)("List view"),className:"block-editor-block-navigation","aria-disabled":!e})}function OPe({isDisabled:e,...t},o){(0,xre.default)("wp.blockEditor.BlockNavigationDropdown",{since:"6.1",alternative:"wp.components.Dropdown and wp.blockEditor.ListView"});let n=(0,wre.useSelect)(i=>!!i(x).getBlockCount(),[])&&!e;return(0,jd.jsx)(HI.Dropdown,{contentClassName:"block-editor-block-navigation__popover",popoverProps:{placement:"bottom-start"},renderToggle:({isOpen:i,onToggle:s})=>(0,jd.jsx)(RPe,{...t,innerRef:o,isOpen:i,onToggle:s,isEnabled:n}),renderContent:()=>(0,jd.jsxs)("div",{className:"block-editor-block-navigation__container",children:[(0,jd.jsx)("p",{className:"block-editor-block-navigation__label",children:(0,Y4.__)("List view")}),(0,jd.jsx)(UI,{})]})})}var Bre=(0,Cre.forwardRef)(OPe);var pS=l(R(),1),Tre=l(F(),1),Ire=l(X(),1),Ud=l(A(),1),q4=l(N(),1);var Cc=l(w(),1),Ere=()=>{};function APe({clientId:e,onSwitch:t=Ere,onHoverClassName:o=Ere}){let r=(0,Tre.useSelect)(S=>S(x).canEditBlock(e),[e]),{onSelect:n,stylesToRender:i,activeStyle:s,genericPreviewBlock:a,className:c}=cb({clientId:e,onSwitch:t}),[u,d]=(0,pS.useState)(null),[f,m]=(0,pS.useState)(null),h=zo(),p=(0,pS.useMemo)(()=>{if(!u||!a)return null;let S=Od(c,s,u);return[{...a,attributes:{...a.attributes||{},className:S}}]},[u,a,c,s]);if(!r||!i||i.length===0)return null;let g=(0,Ire.debounce)(d,250),b=S=>{n(S),o(null),d(null),g.cancel()},k=S=>{if(u===S){g.cancel();return}g(S),o(S?.name??null)},v=QT(i),y=()=>s?.name!==v?.name,_=()=>{b(v)};return(0,Cc.jsx)(Ud.__experimentalToolsPanel,{label:(0,q4.__)("Styles"),resetAll:_,panelId:e,hasInnerWrapper:!0,dropdownMenuProps:h,children:(0,Cc.jsx)(Ud.__experimentalToolsPanelItem,{hasValue:y,label:(0,q4.__)("Variation"),onDeselect:_,isShownByDefault:!0,panelId:e,children:(0,Cc.jsxs)("div",{ref:m,className:"block-editor-block-styles",children:[(0,Cc.jsx)("div",{className:"block-editor-block-styles__variants",children:i.map(S=>{let C=S.label||S.name;return(0,Cc.jsx)(Ud.Button,{__next40pxDefaultSize:!0,className:D("block-editor-block-styles__item",{"is-active":s.name===S.name}),variant:"secondary",label:C,onMouseEnter:()=>k(S),onFocus:()=>k(S),onMouseLeave:()=>k(null),onBlur:()=>k(null),onClick:()=>b(S),"aria-current":s.name===S.name,children:(0,Cc.jsx)(Ud.__experimentalTruncate,{numberOfLines:1,className:"block-editor-block-styles__item-text",children:C})},S.name)})}),p&&(0,Cc.jsx)(Nd,{blocks:p,placement:"left-start",offset:34,anchor:f})]})})})}var Pb=APe;var Lre=l(A(),1),Rb=l(N(),1);var Rre=l(A(),1),Ore=l(w(),1),Pre={0:LN,1:HL,2:WL,3:KL,4:qL,5:XL,6:JL};function Z4({level:e}){return Pre[e]?(0,Ore.jsx)(Rre.Icon,{icon:Pre[e]}):null}var GI=l(w(),1),Are=[1,2,3,4,5,6],LPe={className:"block-library-heading-level-dropdown"};function Nre({options:e=Are,value:t,onChange:o}){let r=e.filter(n=>n===0||Are.includes(n)).sort((n,i)=>n-i);return(0,GI.jsx)(Lre.ToolbarDropdownMenu,{popoverProps:LPe,icon:(0,GI.jsx)(Z4,{level:t}),label:(0,Rb.__)("Change level"),controls:r.map(n=>{let i=n===t;return{icon:(0,GI.jsx)(Z4,{level:n}),title:n===0?(0,Rb.__)("Paragraph"):(0,Rb.sprintf)((0,Rb.__)("Heading %d"),n),isActive:i,onClick(){o(n)},role:"menuitemradio"}})})}var hS=l(N(),1),gS=l(A(),1);var Bc=l(w(),1);function NPe({icon:e=SN,label:t=(0,hS.__)("Choose variation"),instructions:o=(0,hS.__)("Select a variation to start with:"),variations:r,onSelect:n,allowSkip:i}){let s=D("block-editor-block-variation-picker",{"has-many-variations":r.length>4});return(0,Bc.jsxs)(gS.Placeholder,{icon:e,label:t,instructions:o,className:s,children:[(0,Bc.jsx)("ul",{className:"block-editor-block-variation-picker__variations",role:"list","aria-label":(0,hS.__)("Block variations"),children:r.map(a=>(0,Bc.jsxs)("li",{children:[(0,Bc.jsx)(gS.Button,{__next40pxDefaultSize:!0,variant:"tertiary",icon:a.icon&&a.icon.src?a.icon.src:a.icon,iconSize:48,onClick:()=>n(a),className:"block-editor-block-variation-picker__variation",label:a.description||a.title}),(0,Bc.jsx)("span",{className:"block-editor-block-variation-picker__variation-label",children:a.title})]},a.name))}),i&&(0,Bc.jsx)("div",{className:"block-editor-block-variation-picker__skip",children:(0,Bc.jsx)(gS.Button,{__next40pxDefaultSize:!0,variant:"link",onClick:()=>n(),children:(0,hS.__)("Skip")})})]})}var Mre=NPe;var zre=l(F(),1),jre=l(K(),1),Q4=l(A(),1);var X4=l(R(),1),J4=l(X(),1),Ure=l(N(),1);var Ec=l(N(),1),Ob=l(A(),1);var Hd={carousel:"carousel",grid:"grid"};var hi=l(w(),1),MPe=({onBlockPatternSelect:e})=>(0,hi.jsx)("div",{className:"block-editor-block-pattern-setup__actions",children:(0,hi.jsx)(Ob.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:e,children:(0,Ec.__)("Choose")})}),DPe=({handlePrevious:e,handleNext:t,activeSlide:o,totalSlides:r})=>(0,hi.jsxs)("div",{className:"block-editor-block-pattern-setup__navigation",children:[(0,hi.jsx)(Ob.Button,{size:"compact",icon:(0,Ec.isRTL)()?Ko:Yr,label:(0,Ec.__)("Previous pattern"),onClick:e,disabled:o===0,accessibleWhenDisabled:!0}),(0,hi.jsx)(Ob.Button,{size:"compact",icon:(0,Ec.isRTL)()?Yr:Ko,label:(0,Ec.__)("Next pattern"),onClick:t,disabled:o===r-1,accessibleWhenDisabled:!0})]}),VPe=({viewMode:e,setViewMode:t,handlePrevious:o,handleNext:r,activeSlide:n,totalSlides:i,onBlockPatternSelect:s})=>{let a=e===Hd.carousel,c=(0,hi.jsxs)("div",{className:"block-editor-block-pattern-setup__display-controls",children:[(0,hi.jsx)(Ob.Button,{size:"compact",icon:Kk,label:(0,Ec.__)("Carousel view"),onClick:()=>t(Hd.carousel),isPressed:a}),(0,hi.jsx)(Ob.Button,{size:"compact",icon:Tk,label:(0,Ec.__)("Grid view"),onClick:()=>t(Hd.grid),isPressed:e===Hd.grid})]});return(0,hi.jsxs)("div",{className:"block-editor-block-pattern-setup__toolbar",children:[a&&(0,hi.jsx)(DPe,{handlePrevious:o,handleNext:r,activeSlide:n,totalSlides:i}),c,a&&(0,hi.jsx)(MPe,{onBlockPatternSelect:s})]})},Dre=VPe;var Vre=l(F(),1);function FPe(e,t,o){return(0,Vre.useSelect)(r=>{let{getBlockRootClientId:n,getPatternsByBlockTypes:i,__experimentalGetAllowedPatterns:s}=r(x),a=n(e);return o?s(a).filter(o):i(t,a)},[e,t,o])}var Fre=FPe;var Yt=l(w(),1),zPe=({viewMode:e,activeSlide:t,patterns:o,onBlockPatternSelect:r,showTitles:n})=>{let i="block-editor-block-pattern-setup__container";if(e===Hd.carousel){let s=new Map([[t,"active-slide"],[t-1,"previous-slide"],[t+1,"next-slide"]]);return(0,Yt.jsx)("div",{className:"block-editor-block-pattern-setup__carousel",children:(0,Yt.jsx)("div",{className:i,children:(0,Yt.jsx)("div",{className:"carousel-container",children:o.map((a,c)=>(0,Yt.jsx)(Gre,{active:c===t,className:s.get(c)||"",pattern:a},a.name))})})})}return(0,Yt.jsx)("div",{className:"block-editor-block-pattern-setup__grid",children:(0,Yt.jsx)(Q4.Composite,{role:"listbox",className:i,"aria-label":(0,Ure.__)("Patterns list"),children:o.map(s=>(0,Yt.jsx)(Hre,{pattern:s,onSelect:r,showTitles:n},s.name))})})};function Hre({pattern:e,onSelect:t,showTitles:o}){let r="block-editor-block-pattern-setup-list",{blocks:n,description:i,viewportWidth:s=700}=e,a=(0,J4.useInstanceId)(Hre,`${r}__item-description`);return(0,Yt.jsx)("div",{className:`${r}__list-item`,children:(0,Yt.jsxs)(Q4.Composite.Item,{render:(0,Yt.jsx)("div",{"aria-describedby":i?a:void 0,"aria-label":e.title,className:`${r}__item`}),id:`${r}__pattern__${e.name}`,role:"option",onClick:()=>t(n),children:[(0,Yt.jsx)(Tn,{blocks:n,viewportWidth:s}),o&&(0,Yt.jsx)("div",{className:`${r}__item-title`,children:e.title}),!!i&&(0,Yt.jsx)(We,{id:a,children:i})]})})}function Gre({active:e,className:t,pattern:o,minHeight:r}){let{blocks:n,title:i,description:s}=o,a=(0,J4.useInstanceId)(Gre,"block-editor-block-pattern-setup-list__item-description");return(0,Yt.jsxs)("div",{"aria-hidden":!e,role:"img",className:`pattern-slide ${t}`,"aria-label":i,"aria-describedby":s?a:void 0,children:[(0,Yt.jsx)(Tn,{blocks:n,minHeight:r}),!!s&&(0,Yt.jsx)(We,{id:a,children:s})]})}var jPe=({clientId:e,blockName:t,filterPatternsFn:o,onBlockPatternSelect:r,initialViewMode:n=Hd.carousel,showTitles:i=!1})=>{let[s,a]=(0,X4.useState)(n),[c,u]=(0,X4.useState)(0),{replaceBlock:d}=(0,zre.useDispatch)(x),f=Fre(e,t,o);if(!f?.length)return null;let h=r||(p=>{let g=p.map(b=>(0,jre.cloneBlock)(b));d(e,g)});return(0,Yt.jsx)(Yt.Fragment,{children:(0,Yt.jsxs)("div",{className:`block-editor-block-pattern-setup view-mode-${s}`,children:[(0,Yt.jsx)(zPe,{viewMode:s,activeSlide:c,patterns:f,onBlockPatternSelect:h,showTitles:i}),(0,Yt.jsx)(Dre,{viewMode:s,setViewMode:a,activeSlide:c,totalSlides:f.length,handleNext:()=>{u(p=>Math.min(p+1,f.length-1))},handlePrevious:()=>{u(p=>Math.max(p-1,0))},onBlockPatternSelect:()=>{h(f[c].blocks)}})]})})},Wre=jPe;var eF=l(K(),1),Tc=l(N(),1),Ic=l(A(),1);var WI=l(F(),1),$re=l(R(),1);var Ro=l(w(),1),{Menu:pp}=M(Ic.privateApis);function UPe({className:e,onSelectVariation:t,selectedValue:o,variations:r}){return(0,Ro.jsxs)("fieldset",{className:e,children:[(0,Ro.jsx)(We,{render:(0,Ro.jsx)("legend",{}),children:(0,Tc.__)("Transform to variation")}),r.map(n=>(0,Ro.jsx)(Ic.Button,{__next40pxDefaultSize:!0,size:"compact",icon:(0,Ro.jsx)(Me,{icon:n.icon,showColors:!0}),isPressed:o===n.name,label:o===n.name?n.title:(0,Tc.sprintf)((0,Tc.__)("Transform to %s"),n.title),onClick:()=>t(n.name),"aria-label":n.title,showTooltip:!0},n.name))]})}function HPe({className:e,onSelectVariation:t,selectedValue:o,variations:r}){return(0,Ro.jsx)("div",{className:e,children:(0,Ro.jsxs)(pp,{children:[(0,Ro.jsx)(pp.TriggerButton,{render:(0,Ro.jsx)(Ic.Button,{className:"block-editor-block-variation-transforms__button",__next40pxDefaultSize:!0,variant:"secondary",children:(0,Tc.__)("Transform to variation")})}),(0,Ro.jsx)(pp.Popover,{position:"bottom",children:(0,Ro.jsx)(pp.Group,{children:r.map(n=>(0,Ro.jsxs)(pp.RadioItem,{value:n.name,checked:o===n.name,onChange:()=>t(n.name),children:[(0,Ro.jsx)(pp.ItemLabel,{children:n.title}),n.description&&(0,Ro.jsx)(pp.ItemHelpText,{children:n.description})]},n.name))})})]})})}function GPe({className:e,onSelectVariation:t,selectedValue:o,variations:r}){return(0,Ro.jsx)("div",{className:e,children:(0,Ro.jsx)(Ic.__experimentalToggleGroupControl,{label:(0,Tc.__)("Transform to variation"),value:o,hideLabelFromVision:!0,onChange:t,__next40pxDefaultSize:!0,children:r.map(n=>(0,Ro.jsx)(Ic.__experimentalToggleGroupControlOptionIcon,{icon:(0,Ro.jsx)(Me,{icon:n.icon,showColors:!0}),value:n.name,label:o===n.name?n.title:(0,Tc.sprintf)((0,Tc.__)("Transform to %s"),n.title)},n.name))})})}function WPe({blockClientId:e}){let{updateBlockAttributes:t}=(0,WI.useDispatch)(x),{activeBlockVariation:o,variations:r,canEdit:n,isContentOnly:i,isSection:s}=(0,WI.useSelect)(p=>{let{getActiveBlockVariation:g,getBlockVariations:b}=p(eF.store),{getBlockName:k,getBlockAttributes:v,getBlockEditingMode:y,isSectionBlock:_}=M(p(x)),{canEditBlock:S}=p(x),C=e&&k(e),{hasContentRoleAttribute:B}=M(p(eF.store)),T=B(C);return{activeBlockVariation:g(C,v(e),"transform"),variations:C&&b(C,"transform"),canEdit:S(e),isContentOnly:y(e)==="contentOnly"&&!T,isSection:_(e)}},[e]),a=o?.name,c=(0,$re.useMemo)(()=>{let p=new Set;return r?(r.forEach(g=>{g.icon&&p.add(g.icon?.src||g.icon)}),p.size===r.length):!1},[r]),u=p=>{t(e,{...r.find(({name:g})=>g===p).attributes})};if(!r?.length||!n||i||s)return null;let d="block-editor-block-variation-transforms",m=r.length>6?UPe:GPe;return(0,Ro.jsx)(c?m:HPe,{className:d,onSelectVariation:u,selectedValue:a,variations:r})}var $I=WPe;var hp=l(N(),1),KI=l(A(),1);var Kre=l(w(),1),tF={top:{icon:kN,title:(0,hp._x)("Align top","Block vertical alignment setting")},center:{icon:lN,title:(0,hp._x)("Align middle","Block vertical alignment setting")},bottom:{icon:sN,title:(0,hp._x)("Align bottom","Block vertical alignment setting")},stretch:{icon:gN,title:(0,hp._x)("Stretch to fill","Block vertical alignment setting")},"space-between":{icon:mN,title:(0,hp._x)("Space between","Block vertical alignment setting")}},$Pe=["top","center","bottom"],KPe="top";function YPe({value:e,onChange:t,controls:o=$Pe,isCollapsed:r=!0,isToolbar:n}){function i(d){return()=>t(e===d?void 0:d)}let s=tF[e],a=tF[KPe],c=n?KI.ToolbarGroup:KI.ToolbarDropdownMenu,u=n?{isCollapsed:r}:{};return(0,Kre.jsx)(c,{icon:s?s.icon:a.icon,label:(0,hp._x)("Change vertical alignment","Block vertical alignment setting label"),controls:o.map(d=>({...tF[d],isActive:e===d,role:r?"menuitemradio":void 0,onClick:i(d)})),...u})}var oF=YPe;var rF=l(w(),1),DC=e=>(0,rF.jsx)(oF,{...e,isToolbar:!1}),Yre=e=>(0,rF.jsx)(oF,{...e,isToolbar:!0});var Ln=l(A(),1),bS=l(R(),1),ZI=l(N(),1);var qre=l(A(),1);var nF=l(N(),1),Zre=l(w(),1);function Xre({isLinked:e,...t}){let o=e?(0,nF.__)("Unlink radii"):(0,nF.__)("Link radii");return(0,Zre.jsx)(qre.Button,{...t,className:"components-border-radius-control__linked-button",size:"small",icon:e?_n:Ni,iconSize:24,label:o})}var Qre=l(A(),1);function qPe(e){return[...e].sort((o,r)=>e.filter(n=>n===r).length-e.filter(n=>n===o).length).shift()}function Jre(e={}){if(typeof e=="string")return e;let t=Object.values(e).map(a=>{let c=(0,Qre.__experimentalParseQuantityAndUnitFromRawValue)(a);return typeof a=="string"&&c[0]===void 0?[a,""]:c}),o=t.map(a=>a[0]??""),r=t.map(a=>a[1]),n=o.every(a=>a===o[0])?o[0]:"",i=qPe(r);return n===0||n?`${n}${i||""}`:void 0}function ene(e={}){if(typeof e=="string"||!e||typeof e!="object")return!1;let t=Object.values(e);if(t.length===0)return!1;let o=t[0];return!t.every(n=>n===o)}function tne(e){return e?typeof e=="string"?!0:!!Object.values(e).filter(o=>!!o||o===0).length:!1}var us=l(A(),1),ane=l(X(),1),Wd=l(N(),1);var gp=l(R(),1);var iF=24,one=8,YI={px:{max:300,steps:1},"%":{max:100,steps:1},vw:{max:100,steps:1},vh:{max:100,steps:1},em:{max:10,steps:.1},rem:{max:10,steps:.1},svw:{max:100,steps:1},lvw:{max:100,steps:1},dvw:{max:100,steps:1},svh:{max:100,steps:1},lvh:{max:100,steps:1},dvh:{max:100,steps:1},vi:{max:100,steps:1},svi:{max:100,steps:1},lvi:{max:100,steps:1},dvi:{max:100,steps:1},vb:{max:100,steps:1},svb:{max:100,steps:1},lvb:{max:100,steps:1},dvb:{max:100,steps:1},vmin:{max:100,steps:1},svmin:{max:100,steps:1},lvmin:{max:100,steps:1},dvmin:{max:100,steps:1},vmax:{max:100,steps:1},svmax:{max:100,steps:1},lvmax:{max:100,steps:1},dvmax:{max:100,steps:1}};var Gd=(e,t)=>e?.includes?e==="0"||e.includes(`var:preset|${t}|`):!1;function rne(e,t){if(!e)return;if(e==="0"||e==="default")return e;let o=e.match(new RegExp(`var:preset\\|${t}\\|(.+)`));return o?o[1]:void 0}function nne(e,t,o){if(e===void 0)return 0;let r=parseFloat(e,10)===0?"0":rne(e,o),n=t.findIndex(i=>String(i.slug)===r);return n!==-1?n:NaN}function sF(e,t,o){if(!Gd(e,o))return e;let r=parseFloat(e,10)===0?"0":rne(e,o);return t.find(i=>String(i.slug)===r)?.size}function ine(e,t,o){if(!e||Gd(e,o)||e==="0")return e;let r=t.find(n=>String(n.size)===String(e));return r?.slug?`var:preset|${o}|${r.slug}`:e}var Ab=l(A(),1),Pc=l(w(),1);function sne({allowNegativeOnDrag:e,ariaLabel:t,allPlaceholder:o,minValue:r,parsedQuantity:n,computedUnit:i,units:s,isMixed:a,step:c,max:u,showTooltip:d,value:f,minimumCustomValue:m,onCustomValueChange:h,onCustomValueSliderChange:p,onUnitChange:g,onMouseOut:b,onMouseOver:k,setMinValue:v}){let y=(0,Pc.jsx)(Ab.__experimentalUnitControl,{className:"preset-input-control__unit-control",disableUnits:a,hideLabelFromVision:!0,label:t,min:r,onChange:h,onUnitChange:g,onBlur:b,onFocus:k,onMouseOut:b,onMouseOver:k,size:"__unstable-large",units:s,value:[n,i].join(""),placeholder:o,onDragStart:()=>{e&&f?.charAt(0)==="-"&&v(0)},onDrag:()=>{e&&f?.charAt(0)==="-"&&v(0)},onDragEnd:()=>{e&&v(m)}});return(0,Pc.jsxs)(Pc.Fragment,{children:[d?(0,Pc.jsx)(Ab.Tooltip,{text:t,placement:"top",children:(0,Pc.jsx)("div",{className:"preset-input-control__tooltip-wrapper",children:y})}):y,(0,Pc.jsx)(Ab.RangeControl,{className:"preset-input-control__custom-value-range",hideLabelFromVision:!0,initialPosition:0,label:t,max:u,min:0,onBlur:b,onChange:p,onFocus:k,onMouseOut:b,onMouseOver:k,step:c,value:n,withInputField:!1,__next40pxDefaultSize:!0})]})}var $d=l(w(),1);function bp({allowNegativeOnDrag:e=!1,ariaLabel:t,className:o,customValueSettings:r=YI,disableCustomValues:n,icon:i,isMixed:s,value:a,minimumCustomValue:c,onChange:u,onMouseOut:d,onMouseOver:f,onUnitChange:m,presets:h=[],presetType:p,selectedUnit:g,showTooltip:b,units:k}){let v=(0,gp.useMemo)(()=>ine(a,h,p),[a,h,p]),y=o??"preset-input-control",_=h.slice(1,h.length-1).map((Y,te)=>({value:te+1,label:void 0})),S=_.length>0,C=h.length<=one,B=s?(0,Wd.__)("Mixed"):null,[T,I]=(0,gp.useState)(c),[E,L]=(0,gp.useState)(!n&&v!==void 0&&!Gd(v,p)),P=null,O=(0,ane.usePrevious)(v);(0,gp.useEffect)(()=>{v&&O!==v&&!Gd(v,p)&&E!==!0&&L(!0)},[v,O,p,E]);let V=!C&&!E&&v!==void 0&&(!Gd(v,p)||Gd(v,p)&&s),j=h;V?(j=[...h,{name:s?(0,Wd.__)("Mixed"):(0,Wd.sprintf)((0,Wd.__)("Custom (%s)"),v),slug:"custom",size:v}],P=j.length-1):s||(P=E?sF(v,h,p):nne(v,h,p));let H=j.map((Y,te)=>({key:te,name:Y.name})),z=Gd(v,p)?sF(v,h,p):v,[U,G]=(0,us.__experimentalParseQuantityAndUnitFromRawValue)(z),W=G||g||"px",J=k?.find(Y=>Y.value===W),le=J?.step??r[W]?.steps??.1,oe=J?.max??r[W]?.max??10,re=Y=>{if(Y===void 0||Y===""){u(void 0);return}isNaN(parseFloat(Y))||u(Y)},Q=Y=>{u([Y,W].join(""))},$=Y=>v===void 0?void 0:h[Y]?.name,ee=(Y,te)=>{let ne=parseInt(Y,10);if(te==="selectList"){if(ne===0&&h[0]?.slug==="0")return"0";if(ne===0)return}else if(ne===0)return"0";return`var:preset|${p}|${h[Y]?.slug}`};return(0,$d.jsxs)(us.__experimentalHStack,{className:`preset-input-control__wrapper ${y}__wrapper`,children:[i&&(0,$d.jsx)(us.Icon,{className:"preset-input-control__icon",icon:i,size:iF}),(!S||E)&&(0,$d.jsx)(sne,{allowNegativeOnDrag:e,ariaLabel:t,allPlaceholder:B,minValue:T,parsedQuantity:U,computedUnit:W,units:k,isMixed:s,step:le,max:oe,showTooltip:b,value:v,minimumCustomValue:c,onCustomValueChange:re,onCustomValueSliderChange:Q,onUnitChange:m,onMouseOut:d,onMouseOver:f,setMinValue:I}),S&&C&&!E&&(0,$d.jsx)(us.RangeControl,{"aria-valuenow":P,"aria-valuetext":h[P]?.name,className:"preset-input-control__preset-range",hideLabelFromVision:!0,initialPosition:0,label:t,max:h.length-1,marks:_,min:0,onBlur:d,onChange:Y=>u(ee(Y)),onFocus:f,onMouseDown:Y=>{Y?.nativeEvent?.offsetX<35&&v===void 0&&u("0")},onMouseOut:d,onMouseOver:f,renderTooltipContent:$,step:1,value:P,withInputField:!1,__next40pxDefaultSize:!0}),S&&!C&&!E&&(0,$d.jsx)(us.CustomSelectControl,{className:"preset-input-control__custom-select-control",hideLabelFromVision:!0,label:t,onBlur:d,onChange:Y=>{V&&Y.selectedItem.key===H.length-1?L(!0):u(ee(Y.selectedItem.key,"selectList"))},onFocus:f,onMouseOut:d,onMouseOver:f,options:H,size:"__unstable-large",value:H.find(Y=>Y.key===P)||""}),S&&!n&&(0,$d.jsx)(us.Button,{className:"preset-input-control__custom-toggle",icon:rM,iconSize:iF,isPressed:E,label:E?(0,Wd.__)("Use preset"):(0,Wd.__)("Set custom value"),onClick:()=>{L(!E)},size:"small"})]})}var Lb=l(N(),1);var lne=8,qI=[],aF={all:(0,Lb.__)("Border radius"),topLeft:(0,Lb.__)("Top left"),topRight:(0,Lb.__)("Top right"),bottomLeft:(0,Lb.__)("Bottom left"),bottomRight:(0,Lb.__)("Bottom right")},lF={all:cL,topLeft:fL,topRight:mL,bottomLeft:uL,bottomRight:dL},cF=0;var Rc=l(w(),1);function ZPe(e){let t=e?.default??qI,o=e?.custom??qI,r=e?.theme??qI;return(0,bS.useMemo)(()=>{let n=[{name:(0,ZI.__)("None"),slug:"0",size:0},...o,...r,...t];return n.length>lne?[{name:(0,ZI.__)("Default"),slug:"default",size:void 0},...n]:n},[o,r,t])}function cne(e,t){return t==="all"?Jre(e):typeof e=="string"?e:e?.[t]}function une(e,t){return t==="all"?e.flat:e[t]}function dne(e,t,o){return r=>{o(e==="all"?{topLeft:r,topRight:r,bottomLeft:r,bottomRight:r}:{...typeof t!="string"?t||{}:{topLeft:t,topRight:t,bottomLeft:t,bottomRight:t},[e]:r})}}function fne(e,t,o){return r=>{let n={...t};e==="all"?(n.flat=r,n.topLeft=r,n.topRight=r,n.bottomLeft=r,n.bottomRight=r):n[e]=r,o(n)}}function XI({onChange:e,values:t,presets:o}){let[r,n]=(0,bS.useState)(!tne(t)||!ene(t)),i=ZPe(o),[s,a]=(0,bS.useState)({flat:typeof t=="string"?(0,Ln.__experimentalParseQuantityAndUnitFromRawValue)(t)[1]:void 0,topLeft:(0,Ln.__experimentalParseQuantityAndUnitFromRawValue)(t?.topLeft)[1],topRight:(0,Ln.__experimentalParseQuantityAndUnitFromRawValue)(t?.topRight)[1],bottomLeft:(0,Ln.__experimentalParseQuantityAndUnitFromRawValue)(t?.bottomLeft)[1],bottomRight:(0,Ln.__experimentalParseQuantityAndUnitFromRawValue)(t?.bottomRight)[1]}),[c]=me("spacing.units"),u=(0,Ln.__experimentalUseCustomUnits)({availableUnits:c||["px","em","rem"]}),d=()=>n(!r);return(0,Rc.jsxs)("fieldset",{className:"components-border-radius-control",children:[(0,Rc.jsxs)(Ln.__experimentalHStack,{className:"components-border-radius-control__header",children:[(0,Rc.jsx)(Ln.BaseControl.VisualLabel,{as:"legend",children:(0,ZI.__)("Radius")}),(0,Rc.jsx)(Xre,{onClick:d,isLinked:r})]}),r?(0,Rc.jsx)(bp,{ariaLabel:aF.all,className:"components-border-radius-control",icon:lF.all,minimumCustomValue:cF,onChange:dne("all",t,e),onUnitChange:fne("all",s,a),presets:i,presetType:"border-radius",selectedUnit:une(s,"all"),showTooltip:!0,units:u,value:cne(t,"all")}):(0,Rc.jsx)(Ln.__experimentalVStack,{children:["topLeft","topRight","bottomLeft","bottomRight"].map(f=>(0,Rc.jsx)(bp,{ariaLabel:aF[f],className:"components-border-radius-control",icon:lF[f],minimumCustomValue:cF,onChange:dne(f,t,e),onUnitChange:fne(f,s,a),presets:i,presetType:"border-radius",selectedUnit:une(s,f),showTooltip:!0,units:u,value:cne(t,f)},f))})]})}var hne=l(A(),1);var mne=l(X(),1);var pne=l(w(),1),QI=(0,mne.createHigherOrderComponent)(e=>function(o){let[r,n,i,s,a]=me("color.palette.default","color.palette.theme","color.palette.custom","color.custom","color.defaultPalette"),c=a?[...n||[],...r||[],...i||[]]:[...n||[],...i||[]],{colors:u=c,disableCustomColors:d=!s}=o,f=u&&u.length>0||!d;return(0,pne.jsx)(e,{...o,colors:u,disableCustomColors:d,hasColorsToChoose:f})},"withColorContext");var gne=QI(hne.ColorPalette);var uF=l(N(),1),ra=l(A(),1);var Oo=l(w(),1),{Tabs:Nb}=M(ra.privateApis),XPe=["colors","disableCustomColors","gradients","disableCustomGradients"],Qa={color:"color",gradient:"gradient"};function bne({colors:e,gradients:t,disableCustomColors:o,disableCustomGradients:r,__experimentalIsRenderedInSidebar:n,className:i,label:s,onColorChange:a,onGradientChange:c,colorValue:u,gradientValue:d,clearable:f,showTitle:m=!0,enableAlpha:h,headingLevel:p}){let g=a&&(e&&e.length>0||!o),b=c&&(t&&t.length>0||!r);if(!g&&!b)return null;let k={[Qa.color]:(0,Oo.jsx)(ra.ColorPalette,{value:u,onChange:b?y=>{a(y),c()}:a,colors:e,disableCustomColors:o,__experimentalIsRenderedInSidebar:n,clearable:f,enableAlpha:h,headingLevel:p}),[Qa.gradient]:(0,Oo.jsx)(ra.GradientPicker,{value:d,onChange:g?y=>{c(y),a()}:c,gradients:t,disableCustomGradients:r,__experimentalIsRenderedInSidebar:n,clearable:f,headingLevel:p})},v=y=>(0,Oo.jsx)("div",{className:"block-editor-color-gradient-control__panel",children:k[y]});return(0,Oo.jsx)(ra.BaseControl,{className:D("block-editor-color-gradient-control",i),children:(0,Oo.jsx)("fieldset",{className:"block-editor-color-gradient-control__fieldset",children:(0,Oo.jsxs)(ra.__experimentalVStack,{spacing:1,children:[m&&(0,Oo.jsx)("legend",{children:(0,Oo.jsx)("div",{className:"block-editor-color-gradient-control__color-indicator",children:(0,Oo.jsx)(ra.BaseControl.VisualLabel,{children:s})})}),g&&b&&(0,Oo.jsx)("div",{children:(0,Oo.jsxs)(Nb,{defaultTabId:d?Qa.gradient:!!g&&Qa.color,children:[(0,Oo.jsxs)(Nb.TabList,{children:[(0,Oo.jsx)(Nb.Tab,{tabId:Qa.color,children:(0,uF.__)("Color")}),(0,Oo.jsx)(Nb.Tab,{tabId:Qa.gradient,children:(0,uF.__)("Gradient")})]}),(0,Oo.jsx)(Nb.TabPanel,{tabId:Qa.color,className:"block-editor-color-gradient-control__panel",focusable:!1,children:k.color}),(0,Oo.jsx)(Nb.TabPanel,{tabId:Qa.gradient,className:"block-editor-color-gradient-control__panel",focusable:!1,children:k.gradient})]})}),!b&&v(Qa.color),!g&&v(Qa.gradient)]})})})}function QPe(e){let[t,o,r,n]=me("color.palette","color.gradients","color.custom","color.customGradient");return(0,Oo.jsx)(bne,{colors:t,gradients:o,disableCustomColors:!r,disableCustomGradients:!n,...e})}function JPe(e){return XPe.every(t=>e.hasOwnProperty(t))?(0,Oo.jsx)(bne,{...e}):(0,Oo.jsx)(QPe,{...e})}var Kd=JPe;var vne=l(w(),1);function kne({onChange:e,value:t,...o}){return(0,vne.jsx)(Kd,{...o,onColorChange:e,colorValue:t,gradients:[],disableCustomGradients:!0})}var na=l(N(),1),yne=l(A(),1),_ne=l(sr(),1),dF=l(w(),1);du([fu,ah]);function eRe({backgroundColor:e,fallbackBackgroundColor:t,fallbackTextColor:o,fallbackLinkColor:r,fontSize:n,isLargeText:i,textColor:s,linkColor:a,enableAlphaChecker:c=!1}){let u=e||t;if(!u)return null;let d=s||o,f=a||r;if(!d&&!f)return null;let m=[{color:d,description:(0,na.__)("text color")},{color:f,description:(0,na.__)("link color")}],h=Ot(u),p=h.alpha()<1,g=h.brightness(),b={level:"AA",size:i||i!==!1&&n>=24?"large":"small"},k="",v="";for(let y of m){if(!y.color)continue;let _=Ot(y.color),S=_.isReadable(h,b),C=_.alpha()<1;if(!S){if(p||C)continue;k=g<_.brightness()?(0,na.sprintf)((0,na.__)("This color combination may be hard for people to read. Try using a darker background color and/or a brighter %s."),y.description):(0,na.sprintf)((0,na.__)("This color combination may be hard for people to read. Try using a brighter background color and/or a darker %s."),y.description),v=(0,na.__)("This color combination may be hard for people to read.");break}C&&c&&(k=(0,na.__)("Transparent text may be hard for people to read."),v=(0,na.__)("Transparent text may be hard for people to read."))}return k?((0,_ne.speak)(v),(0,dF.jsx)("div",{className:"block-editor-contrast-checker",children:(0,dF.jsx)(yne.Notice,{spokenMessage:null,status:"warning",isDismissible:!1,children:k})})):null}var JI=eRe;var Er=l(N(),1),vS=l(Ja(),1),e2=l(R(),1),sa=l(A(),1);var ia=l(w(),1),Yd=new Date;Yd.setDate(20);Yd.setMonth(Yd.getMonth()-3);Yd.getMonth()===4&&Yd.setMonth(3);function xne({format:e,defaultFormat:t,onChange:o}){return(0,ia.jsxs)(sa.__experimentalVStack,{as:"fieldset",spacing:4,className:"block-editor-date-format-picker",children:[(0,ia.jsx)(We,{render:(0,ia.jsx)("legend",{}),children:(0,Er.__)("Date format")}),(0,ia.jsx)(sa.ToggleControl,{label:(0,Er.__)("Default format"),help:`${(0,Er.__)("Example:")} ${(0,vS.dateI18n)(t,Yd)}`,checked:!e,onChange:r=>o(r?null:t)}),e&&(0,ia.jsx)(tRe,{format:e,onChange:o})]})}function tRe({format:e,onChange:t}){let r=[...[...new Set(["Y-m-d",(0,Er._x)("n/j/Y","short date format"),(0,Er._x)("n/j/Y g:i A","short date format with time"),(0,Er._x)("M j, Y","medium date format"),(0,Er._x)("M j, Y g:i A","medium date format with time"),(0,Er._x)("F j, Y","long date format"),(0,Er._x)("M j","short date format without the year")])].map((a,c)=>({key:`suggested-${c}`,name:(0,vS.dateI18n)(a,Yd),format:a})),{key:"human-diff",name:(0,vS.humanTimeDiff)(Yd),format:"human-diff"}],n={key:"custom",name:(0,Er.__)("Custom"),className:"block-editor-date-format-picker__custom-format-select-control__custom-option",hint:(0,Er.__)("Enter your own date format")},[i,s]=(0,e2.useState)(()=>!!e&&!r.some(a=>a.format===e));return(0,ia.jsxs)(sa.__experimentalVStack,{children:[(0,ia.jsx)(sa.CustomSelectControl,{__next40pxDefaultSize:!0,label:(0,Er.__)("Choose a format"),options:[...r,n],value:i?n:r.find(a=>a.format===e)??n,onChange:({selectedItem:a})=>{a===n?s(!0):(s(!1),t(a.format))}}),i&&(0,ia.jsx)(sa.TextControl,{__next40pxDefaultSize:!0,label:(0,Er.__)("Custom format"),hideLabelFromVision:!0,help:(0,e2.createInterpolateElement)((0,Er.__)("Enter a date or time <Link>format string</Link>."),{Link:(0,ia.jsx)(sa.ExternalLink,{href:(0,Er.__)("https://wordpress.org/documentation/article/customize-date-and-time-format/")})}),value:e,onChange:a=>t(a)})]})}var ds=l(A(),1),kS=l(N(),1),wne=l(it(),1);var Cne=l(X(),1),el=l(w(),1);function Bne({id:e,colorPalette:t,duotonePalette:o,disableCustomColors:r,disableCustomDuotone:n,value:i,onChange:s}){let a;i==="unset"?a=(0,el.jsx)(ds.ColorIndicator,{className:"block-editor-duotone-control__unset-indicator"}):i?a=(0,el.jsx)(ds.DuotoneSwatch,{values:i}):a=(0,el.jsx)(Ie,{icon:CL});let c=(0,kS.__)("Apply duotone filter"),d=`${(0,Cne.useInstanceId)(Bne,"duotone-control",e)}__description`;return(0,el.jsx)(ds.Dropdown,{popoverProps:{className:"block-editor-duotone-control__popover",headerTitle:(0,kS.__)("Duotone")},renderToggle:({isOpen:f,onToggle:m})=>(0,el.jsx)(ds.ToolbarButton,{showTooltip:!0,onClick:m,"aria-haspopup":"true","aria-expanded":f,onKeyDown:p=>{!f&&p.keyCode===wne.DOWN&&(p.preventDefault(),m())},label:c,icon:a}),renderContent:()=>(0,el.jsxs)(ds.MenuGroup,{label:(0,kS.__)("Duotone"),children:[(0,el.jsx)("p",{children:(0,kS.__)("Create a two-tone color effect without losing your original image.")}),(0,el.jsx)(ds.DuotonePicker,{"aria-label":c,"aria-describedby":d,colorPalette:t,duotonePalette:o,disableCustomColors:r,disableCustomDuotone:n,value:i,onChange:s})]})})}var t2=Bne;var Pne=l(A(),1),Rne=l(Le(),1),One=l(R(),1),gi=l(N(),1);var ur=l(N(),1);var o2=l(N(),1);function Ene(e){if(!e)return{};if(typeof e=="object")return e;let t;switch(e){case"normal":t=(0,o2._x)("Regular","font style");break;case"italic":t=(0,o2._x)("Italic","font style");break;case"oblique":t=(0,o2._x)("Oblique","font style");break;default:t=e;break}return{name:t,value:e}}var aa=l(N(),1);function fF(e){if(!e)return{};if(typeof e=="object")return e;let t;switch(e){case"normal":case"400":t=(0,aa._x)("Regular","font weight");break;case"bold":case"700":t=(0,aa._x)("Bold","font weight");break;case"100":t=(0,aa._x)("Thin","font weight");break;case"200":t=(0,aa._x)("Extra Light","font weight");break;case"300":t=(0,aa._x)("Light","font weight");break;case"500":t=(0,aa._x)("Medium","font weight");break;case"600":t=(0,aa._x)("Semi Bold","font weight");break;case"800":t=(0,aa._x)("Extra Bold","font weight");break;case"900":t=(0,aa._x)("Black","font weight");break;case"1000":t=(0,aa._x)("Extra Black","font weight");break;default:t=e;break}return{name:t,value:e}}var Tne=[{name:(0,ur._x)("Regular","font style"),value:"normal"},{name:(0,ur._x)("Italic","font style"),value:"italic"}],Ine=[{name:(0,ur._x)("Thin","font weight"),value:"100"},{name:(0,ur._x)("Extra Light","font weight"),value:"200"},{name:(0,ur._x)("Light","font weight"),value:"300"},{name:(0,ur._x)("Regular","font weight"),value:"400"},{name:(0,ur._x)("Medium","font weight"),value:"500"},{name:(0,ur._x)("Semi Bold","font weight"),value:"600"},{name:(0,ur._x)("Bold","font weight"),value:"700"},{name:(0,ur._x)("Extra Bold","font weight"),value:"800"},{name:(0,ur._x)("Black","font weight"),value:"900"},{name:(0,ur._x)("Extra Black","font weight"),value:"1000"}];function Mb(e){let t=[],o=[],r=[],n=!e||e?.length===0,i=!1;return e?.forEach(s=>{if(typeof s.fontWeight=="string"&&/\s/.test(s.fontWeight.trim())){i=!0;let[u,d]=s.fontWeight.split(" ");u=parseInt(u.slice(0,1)),d==="1000"?d=10:d=parseInt(d.slice(0,1));for(let f=u;f<=d;f++){let m=`${f.toString()}00`;o.some(h=>h.value===m)||o.push(fF(m))}}let a=fF(typeof s.fontWeight=="number"?s.fontWeight.toString():s.fontWeight),c=Ene(s.fontStyle);c&&Object.keys(c).length&&(t.some(u=>u.value===c.value)||t.push(c)),a&&Object.keys(a).length&&(o.some(u=>u.value===a.value)||i||o.push(a))}),o.some(s=>s.value>="600")||o.push({name:(0,ur._x)("Bold","font weight"),value:"700"}),t.some(s=>s.value==="italic")||t.push({name:(0,ur._x)("Italic","font style"),value:"italic"}),n&&(t=Tne,o=Ine),t=t.length===0?Tne:t,o=o.length===0?Ine:o,t.forEach(({name:s,value:a})=>{o.forEach(({name:c,value:u})=>{let d=a==="normal"?c:(0,ur.sprintf)((0,ur._x)("%1$s %2$s","font"),c,s);r.push({key:`${a}-${u}`,name:d,style:{fontStyle:a,fontWeight:u}})})}),{fontStyles:t,fontWeights:o,combinedStyleAndWeightOptions:r,isSystemFont:n,isVariableFont:i}}var Ane=l(w(),1),oRe=(e,t)=>e?t?(0,gi.__)("Appearance"):(0,gi.__)("Font style"):(0,gi.__)("Font weight");function r2(e){let{__next40pxDefaultSize:t=!1,onChange:o,hasFontStyles:r=!0,hasFontWeights:n=!0,fontFamilyFaces:i,value:{fontStyle:s,fontWeight:a},...c}=e,u=r||n,d=oRe(r,n),f={key:"default",name:(0,gi.__)("Default"),style:{fontStyle:void 0,fontWeight:void 0}},{fontStyles:m,fontWeights:h,combinedStyleAndWeightOptions:p}=Mb(i),g=()=>{let S=[f];return p&&S.push(...p),S},b=()=>{let S=[f];return m.forEach(({name:C,value:B})=>{S.push({key:B,name:C,style:{fontStyle:B,fontWeight:void 0}})}),S},k=()=>{let S=[f];return h.forEach(({name:C,value:B})=>{S.push({key:B,name:C,style:{fontStyle:void 0,fontWeight:B}})}),S},v=(0,One.useMemo)(()=>r&&n?g():r?b():k(),[e.options,m,h,p]),y=v.find(S=>S.style.fontStyle===s&&S.style.fontWeight===a)||v[0],_=()=>y?r?n?(0,gi.sprintf)((0,gi.__)("Currently selected font appearance: %s"),y.name):(0,gi.sprintf)((0,gi.__)("Currently selected font style: %s"),y.name):(0,gi.sprintf)((0,gi.__)("Currently selected font weight: %s"),y.name):(0,gi.__)("No selected font appearance");return!t&&(c.size===void 0||c.size==="default")&&(0,Rne.default)("36px default size for wp.blockEditor.__experimentalFontAppearanceControl",{since:"6.8",version:"7.1",hint:"Set the `__next40pxDefaultSize` prop to true to start opting into the new default size, which will become the default in a future version."}),u&&(0,Ane.jsx)(Pne.CustomSelectControl,{...c,className:"components-font-appearance-control",__next40pxDefaultSize:t,__shouldNotWarnDeprecated36pxSize:!0,label:d,describedBy:_(),options:v,value:y,onChange:({selectedItem:S})=>o(S.style)})}var Lne=l(A(),1),Nne=l(Le(),1),mF=l(N(),1);var Mne=l(w(),1);function n2({__next40pxDefaultSize:e=!1,value:t="",onChange:o,fontFamilies:r,className:n,...i}){let[s]=me("typography.fontFamilies");if(r||(r=s),!r||r.length===0)return null;let a=[{key:"",name:(0,mF.__)("Default")},...r.map(({fontFamily:u,name:d})=>({key:u,name:d||u,style:{fontFamily:u}}))];!e&&(i.size===void 0||i.size==="default")&&(0,Nne.default)("36px default size for wp.blockEditor.__experimentalFontFamilyControl",{since:"6.8",version:"7.1",hint:"Set the `__next40pxDefaultSize` prop to true to start opting into the new default size, which will become the default in a future version."});let c=a.find(u=>u.key===t)??"";return(0,Mne.jsx)(Lne.CustomSelectControl,{__next40pxDefaultSize:e,__shouldNotWarnDeprecated36pxSize:!0,label:(0,mF.__)("Font"),value:c,onChange:({selectedItem:u})=>o(u.key),options:a,className:D("block-editor-font-family-control",n),...i})}var i2=l(A(),1),Dne=l(Le(),1),Vne=l(N(),1);var Fne=l(w(),1);function s2({__next40pxDefaultSize:e=!1,value:t,onChange:o,__unstableInputWidth:r="60px",...n}){let[i]=me("spacing.units"),s=(0,i2.__experimentalUseCustomUnits)({availableUnits:i||["px","em","rem"],defaultValues:{px:2,em:.2,rem:.2}});return!e&&(n.size===void 0||n.size==="default")&&(0,Dne.default)("36px default size for wp.blockEditor.__experimentalLetterSpacingControl",{since:"6.8",version:"7.1",hint:"Set the `__next40pxDefaultSize` prop to true to start opting into the new default size, which will become the default in a future version."}),(0,Fne.jsx)(i2.__experimentalUnitControl,{__next40pxDefaultSize:e,__shouldNotWarnDeprecated36pxSize:!0,...n,label:(0,Vne.__)("Letter spacing"),value:t,__unstableInputWidth:r,units:s,onChange:o})}var yS=l(N(),1),a2=l(A(),1),pF=l(w(),1),rRe=[{label:(0,yS.__)("None"),value:"none",icon:kr},{label:(0,yS.__)("Underline"),value:"underline",icon:AL},{label:(0,yS.__)("Strikethrough"),value:"line-through",icon:RL}];function l2({value:e,onChange:t,className:o}){return(0,pF.jsx)(a2.__experimentalToggleGroupControl,{isDeselectable:!0,__next40pxDefaultSize:!0,label:(0,yS.__)("Decoration"),className:D("block-editor-text-decoration-control",o),value:e,onChange:r=>{t(r===e?void 0:r)},children:rRe.map(r=>(0,pF.jsx)(a2.__experimentalToggleGroupControlOptionIcon,{value:r.value,icon:r.icon,label:r.label},r.value))})}var Db=l(N(),1);var c2=l(A(),1),hF=l(w(),1),nRe=[{label:(0,Db.__)("None"),value:"none",icon:kr},{label:(0,Db.__)("Uppercase"),value:"uppercase",icon:NL},{label:(0,Db.__)("Lowercase"),value:"lowercase",icon:IL},{label:(0,Db.__)("Capitalize"),value:"capitalize",icon:EL}];function u2({className:e,value:t,onChange:o}){return(0,hF.jsx)(c2.__experimentalToggleGroupControl,{isDeselectable:!0,__next40pxDefaultSize:!0,label:(0,Db.__)("Letter case"),className:D("block-editor-text-transform-control",e),value:t,onChange:r=>{o(r===t?void 0:r)},children:nRe.map(r=>(0,hF.jsx)(c2.__experimentalToggleGroupControlOptionIcon,{value:r.value,icon:r.icon,label:r.label},r.value))})}var Vb=l(N(),1);var d2=l(A(),1),gF=l(w(),1),iRe=[{label:(0,Vb.__)("Horizontal"),value:"horizontal-tb",icon:CM},{label:(0,Vb.__)("Vertical"),value:(0,Vb.isRTL)()?"vertical-lr":"vertical-rl",icon:EM}];function f2({className:e,value:t,onChange:o}){return(0,gF.jsx)(d2.__experimentalToggleGroupControl,{isDeselectable:!0,__next40pxDefaultSize:!0,label:(0,Vb.__)("Orientation"),className:D("block-editor-writing-mode-control",e),value:t,onChange:r=>{o(r===t?void 0:r)},children:iRe.map(r=>(0,gF.jsx)(d2.__experimentalToggleGroupControlOptionIcon,{value:r.value,icon:r.icon,label:r.label},r.value))})}var cn=l(A(),1),zne=l(R(),1),jne=l(N(),1);var Xo=l(w(),1),sRe=({setting:e,children:t,panelId:o,...r})=>{let n=()=>{e.colorValue?e.onColorChange():e.gradientValue&&e.onGradientChange()};return(0,Xo.jsx)(cn.__experimentalToolsPanelItem,{hasValue:()=>!!e.colorValue||!!e.gradientValue,label:e.label,onDeselect:n,isShownByDefault:e.isShownByDefault!==void 0?e.isShownByDefault:!0,...r,className:"block-editor-tools-panel-color-gradient-settings__item",panelId:o,resetAllFilter:e.resetAllFilter,children:t})},aRe=({colorValue:e,label:t})=>(0,Xo.jsxs)(cn.__experimentalHStack,{justify:"flex-start",children:[(0,Xo.jsx)(cn.ColorIndicator,{className:"block-editor-panel-color-gradient-settings__color-indicator",colorValue:e}),(0,Xo.jsx)(cn.FlexItem,{className:"block-editor-panel-color-gradient-settings__color-name",title:t,children:t})]}),lRe=e=>function({onToggle:o,isOpen:r}){let{clearable:n,colorValue:i,gradientValue:s,onColorChange:a,onGradientChange:c,label:u}=e,d=(0,zne.useRef)(void 0),f={onClick:o,className:D("block-editor-panel-color-gradient-settings__dropdown",{"is-open":r}),"aria-expanded":r,ref:d},m=()=>{i?a():s&&c()},h=i??s;return(0,Xo.jsxs)(Xo.Fragment,{children:[(0,Xo.jsx)(cn.Button,{__next40pxDefaultSize:!0,...f,children:(0,Xo.jsx)(aRe,{colorValue:h,label:u})}),n&&h&&(0,Xo.jsx)(cn.Button,{__next40pxDefaultSize:!0,label:(0,jne.__)("Reset"),className:"block-editor-panel-color-gradient-settings__reset",size:"small",icon:kr,onClick:()=>{m(),r&&o(),d.current?.focus()}})]})};function m2({colors:e,disableCustomColors:t,disableCustomGradients:o,enableAlpha:r,gradients:n,settings:i,__experimentalIsRenderedInSidebar:s,...a}){let c;return s&&(c={placement:"left-start",offset:36,shift:!0}),(0,Xo.jsx)(Xo.Fragment,{children:i.map((u,d)=>{let f={clearable:!1,colorValue:u.colorValue,colors:e,disableCustomColors:t,disableCustomGradients:o,enableAlpha:r,gradientValue:u.gradientValue,gradients:n,label:u.label,onColorChange:u.onColorChange,onGradientChange:u.onGradientChange,showTitle:!1,__experimentalIsRenderedInSidebar:s,...u},m={clearable:u.clearable,label:u.label,colorValue:u.colorValue,gradientValue:u.gradientValue,onColorChange:u.onColorChange,onGradientChange:u.onGradientChange};return u&&(0,Xo.jsx)(sRe,{setting:u,...a,children:(0,Xo.jsx)(cn.Dropdown,{popoverProps:c,className:"block-editor-tools-panel-color-gradient-settings__dropdown",renderToggle:lRe(m),renderContent:()=>(0,Xo.jsx)(cn.__experimentalDropdownContentWrapper,{paddingSize:"none",children:(0,Xo.jsx)("div",{className:"block-editor-panel-color-gradient-settings__dropdown-content",children:(0,Xo.jsx)(Kd,{...f})})})})},d)})})}var p2=l(A(),1),Une=l(F(),1),Hne=l(X(),1);var bF=l(R(),1),vp=l(N(),1);function qd(){let[e,t,o,r,n,i,s,a,c,u]=me("color.custom","color.palette.custom","color.palette.theme","color.palette.default","color.defaultPalette","color.customGradient","color.gradients.custom","color.gradients.theme","color.gradients.default","color.defaultGradients"),d={disableCustomColors:!e,disableCustomGradients:!i};return d.colors=(0,bF.useMemo)(()=>{let f=[];return o&&o.length&&f.push({name:(0,vp._x)("Theme","Indicates this palette comes from the theme."),slug:"theme",colors:o}),n&&r&&r.length&&f.push({name:(0,vp._x)("Default","Indicates this palette comes from WordPress."),slug:"default",colors:r}),t&&t.length&&f.push({name:(0,vp._x)("Custom","Indicates this palette is created by the user."),slug:"custom",colors:t}),f},[t,o,r,n]),d.gradients=(0,bF.useMemo)(()=>{let f=[];return a&&a.length&&f.push({name:(0,vp._x)("Theme","Indicates this palette comes from the theme."),slug:"theme",gradients:a}),u&&c&&c.length&&f.push({name:(0,vp._x)("Default","Indicates this palette comes from WordPress."),slug:"default",gradients:c}),s&&s.length&&f.push({name:(0,vp._x)("Custom","Indicates this palette is created by the user."),slug:"custom",gradients:s}),f},[s,a,c,u]),d.hasColorsOrGradients=!!d.colors.length||!!d.gradients.length,d}var la=l(w(),1),cRe=["colors","disableCustomColors","gradients","disableCustomGradients"],vF=({className:e,colors:t,gradients:o,disableCustomColors:r,disableCustomGradients:n,children:i,settings:s,title:a,showTitle:c=!0,__experimentalIsRenderedInSidebar:u,enableAlpha:d})=>{let f=(0,Hne.useInstanceId)(vF),{batch:m}=(0,Une.useRegistry)();return(!t||t.length===0)&&(!o||o.length===0)&&r&&n&&s?.every(h=>(!h.colors||h.colors.length===0)&&(!h.gradients||h.gradients.length===0)&&(h.disableCustomColors===void 0||h.disableCustomColors)&&(h.disableCustomGradients===void 0||h.disableCustomGradients))?null:(0,la.jsxs)(p2.__experimentalToolsPanel,{className:D("block-editor-panel-color-gradient-settings",e),label:c?a:void 0,resetAll:()=>{m(()=>{s.forEach(({colorValue:h,gradientValue:p,onColorChange:g,onGradientChange:b})=>{h?g():p&&b()})})},panelId:f,__experimentalFirstVisibleItemClass:"first",__experimentalLastVisibleItemClass:"last",children:[(0,la.jsx)(m2,{settings:s,panelId:f,colors:t,gradients:o,disableCustomColors:r,disableCustomGradients:n,__experimentalIsRenderedInSidebar:u,enableAlpha:d}),!!i&&(0,la.jsxs)(la.Fragment,{children:[(0,la.jsx)(p2.__experimentalSpacer,{marginY:4})," ",i]})]})},uRe=e=>{let t=qd();return(0,la.jsx)(vF,{...t,...e})},dRe=e=>cRe.every(t=>e.hasOwnProperty(t))?(0,la.jsx)(vF,{...e}):(0,la.jsx)(uRe,{...e}),h2=dRe;var g2=l(R(),1),kp=l(A(),1),yF=l(N(),1);var _S=l(w(),1),kF=[],fRe={...YI,px:{max:1e3,steps:1},em:{max:50,steps:.1},rem:{max:50,steps:.1}};function mRe(e){let t=e?.default??kF,o=e?.custom??kF,r=e?.theme??kF;return(0,g2.useMemo)(()=>[{name:(0,yF.__)("None"),slug:"0",size:0},...o,...r,...t],[o,r,t])}function yp({label:e=(0,yF.__)("Dimension"),onChange:t,value:o,dimensionSizes:r}){let[n,i]=me("dimensions.dimensionSizes","spacing.units"),s=r??n,a=(0,kp.__experimentalUseCustomUnits)({availableUnits:i||["%","px","em","rem","vh","vw"]}),c=mRe(s),[u,d]=(0,g2.useState)(()=>{let[,m]=(0,kp.__experimentalParseQuantityAndUnitFromRawValue)(o);return m||a[0]?.value||"px"}),f=m=>{let[h,p]=(0,kp.__experimentalParseQuantityAndUnitFromRawValue)(o);["em","rem"].includes(m)&&p==="px"?t((h/16).toFixed(2)+m):["em","rem"].includes(p)&&m==="px"?t(Math.round(h*16)+m):["%","vw","svw","lvw","dvw","vh","svh","lvh","dvh","vi","svi","lvi","dvi","vb","svb","lvb","dvb","vmin","svmin","lvmin","dvmin","vmax","svmax","lvmax","dvmax"].includes(m)&&h>100&&t(100+m),d(m)};return(0,_S.jsxs)("fieldset",{className:"block-editor-dimension-control",children:[(0,_S.jsx)(kp.BaseControl.VisualLabel,{as:"legend",children:e}),(0,_S.jsx)(bp,{ariaLabel:e,className:"block-editor-dimension-control",customValueSettings:fRe,minimumCustomValue:0,onChange:t,onUnitChange:f,presets:c,presetType:"dimension",selectedUnit:u,showTooltip:!0,units:a,value:o})]})}var Wne=l(R(),1),dr=l(A(),1),$ne=l(N(),1),Kne=l(Le(),1);var tl=l(w(),1),Gne={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},svw:{max:100,step:1},lvw:{max:100,step:1},dvw:{max:100,step:1},svh:{max:100,step:1},lvh:{max:100,step:1},dvh:{max:100,step:1},vi:{max:100,step:1},svi:{max:100,step:1},lvi:{max:100,step:1},dvi:{max:100,step:1},vb:{max:100,step:1},svb:{max:100,step:1},lvb:{max:100,step:1},dvb:{max:100,step:1},vmin:{max:100,step:1},svmin:{max:100,step:1},lvmin:{max:100,step:1},dvmin:{max:100,step:1},vmax:{max:100,step:1},svmax:{max:100,step:1},lvmax:{max:100,step:1},dvmax:{max:100,step:1}};function Yne({label:e=(0,$ne.__)("Height"),onChange:t,value:o}){(0,Kne.default)("wp.blockEditor.HeightControl",{since:"7.0",version:"7.2",alternative:"wp.blockEditor.DimensionControl"});let r=parseFloat(o),[n]=me("spacing.units"),i=(0,dr.__experimentalUseCustomUnits)({availableUnits:n||["%","px","em","rem","vh","vw"]}),s=(0,Wne.useMemo)(()=>(0,dr.__experimentalParseQuantityAndUnitFromRawValue)(o),[o])[1]||i[0]?.value||"px",a=u=>{t([u,s].join(""))},c=u=>{let[d,f]=(0,dr.__experimentalParseQuantityAndUnitFromRawValue)(o);["em","rem"].includes(u)&&f==="px"?t((d/16).toFixed(2)+u):["em","rem"].includes(f)&&u==="px"?t(Math.round(d*16)+u):["%","vw","svw","lvw","dvw","vh","svh","lvh","dvh","vi","svi","lvi","dvi","vb","svb","lvb","dvb","vmin","svmin","lvmin","dvmin","vmax","svmax","lvmax","dvmax"].includes(u)&&d>100&&t(100+u)};return(0,tl.jsxs)("fieldset",{className:"block-editor-height-control",children:[(0,tl.jsx)(dr.BaseControl.VisualLabel,{as:"legend",children:e}),(0,tl.jsxs)(dr.Flex,{children:[(0,tl.jsx)(dr.FlexItem,{isBlock:!0,children:(0,tl.jsx)(dr.__experimentalUnitControl,{value:o,units:i,onChange:t,onUnitChange:c,min:0,size:"__unstable-large",label:e,hideLabelFromVision:!0})}),(0,tl.jsx)(dr.FlexItem,{isBlock:!0,children:(0,tl.jsx)(dr.__experimentalSpacer,{marginX:2,marginBottom:0,children:(0,tl.jsx)(dr.RangeControl,{__next40pxDefaultSize:!0,value:r,min:0,max:Gne[s]?.max??100,step:Gne[s]?.step??.1,withInputField:!1,onChange:a,label:e,hideLabelFromVision:!0})})})]})]})}var CS=l(A(),1);var fs=l(Ge()),yie=l(hie());function vRe(e,t,o,r,n,i){i===void 0&&(i=0);var s=Fb(e,t,i),a=s.width,c=s.height,u=Math.min(a,o),d=Math.min(c,r);return u>d*n?{width:d*n,height:d}:{width:u,height:u/n}}function kRe(e){return e.width>e.height?e.width/e.naturalWidth:e.height/e.naturalHeight}function SS(e,t,o,r,n){n===void 0&&(n=0);var i=Fb(t.width,t.height,n),s=i.width,a=i.height;return{x:gie(e.x,s,o.width,r),y:gie(e.y,a,o.height,r)}}function gie(e,t,o,r){var n=t*r/2-o/2;return S2(e,-n,n)}function bie(e,t){return Math.sqrt(Math.pow(e.y-t.y,2)+Math.pow(e.x-t.x,2))}function vie(e,t){return Math.atan2(t.y-e.y,t.x-e.x)*180/Math.PI}function yRe(e,t,o,r,n,i,s){i===void 0&&(i=0),s===void 0&&(s=!0);var a=s?_Re:SRe,c=Fb(t.width,t.height,i),u=Fb(t.naturalWidth,t.naturalHeight,i),d={x:a(100,((c.width-o.width/n)/2-e.x/n)/c.width*100),y:a(100,((c.height-o.height/n)/2-e.y/n)/c.height*100),width:a(100,o.width/c.width*100/n),height:a(100,o.height/c.height*100/n)},f=Math.round(a(u.width,d.width*u.width/100)),m=Math.round(a(u.height,d.height*u.height/100)),h=u.width>=u.height*r,p=h?{width:Math.round(m*r),height:m}:{width:f,height:Math.round(f/r)},g=Yo(Yo({},p),{x:Math.round(a(u.width-p.width,d.x*u.width/100)),y:Math.round(a(u.height-p.height,d.y*u.height/100))});return{croppedAreaPercentages:d,croppedAreaPixels:g}}function _Re(e,t){return Math.min(e,Math.max(0,t))}function SRe(e,t){return t}function xRe(e,t,o,r,n,i){var s=Fb(t.width,t.height,o),a=S2(r.width/s.width*(100/e.width),n,i),c={x:a*s.width/2-r.width/2-s.width*a*(e.x/100),y:a*s.height/2-r.height/2-s.height*a*(e.y/100)};return{crop:c,zoom:a}}function wRe(e,t,o){var r=kRe(t);return o.height>o.width?o.height/(e.height*r):o.width/(e.width*r)}function CRe(e,t,o,r,n,i){o===void 0&&(o=0);var s=Fb(t.naturalWidth,t.naturalHeight,o),a=S2(wRe(e,t,r),n,i),c=r.height>r.width?r.height/e.height:r.width/e.width,u={x:((s.width-e.width)/2-e.x)*c,y:((s.height-e.height)/2-e.y)*c};return{crop:u,zoom:a}}function kie(e,t){return{x:(t.x+e.x)/2,y:(t.y+e.y)/2}}function BRe(e){return e*Math.PI/180}function Fb(e,t,o){var r=BRe(o);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 S2(e,t,o){return Math.min(Math.max(e,t),o)}function _2(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.filter(function(o){return typeof o=="string"&&o.length>0}).join(" ").trim()}var ERe=`.reactEasyCrop_Container { |
| 90 |
position: absolute; |
| 91 |
top: 0; |
| 92 |
left: 0; |
| 93 |
right: 0; |
| 94 |
bottom: 0; |
| 95 |
overflow: hidden; |
| 96 |
user-select: none; |
| 97 |
touch-action: none; |
| 98 |
cursor: move; |
| 99 |
display: flex; |
| 100 |
justify-content: center; |
| 101 |
align-items: center; |
| 102 |
} |
| 103 |
|
| 104 |
.reactEasyCrop_Image, |
| 105 |
.reactEasyCrop_Video { |
| 106 |
will-change: transform; /* this improves performances and prevent painting issues on iOS Chrome */ |
| 107 |
} |
| 108 |
|
| 109 |
.reactEasyCrop_Contain { |
| 110 |
max-width: 100%; |
| 111 |
max-height: 100%; |
| 112 |
margin: auto; |
| 113 |
position: absolute; |
| 114 |
top: 0; |
| 115 |
bottom: 0; |
| 116 |
left: 0; |
| 117 |
right: 0; |
| 118 |
} |
| 119 |
.reactEasyCrop_Cover_Horizontal { |
| 120 |
width: 100%; |
| 121 |
height: auto; |
| 122 |
} |
| 123 |
.reactEasyCrop_Cover_Vertical { |
| 124 |
width: auto; |
| 125 |
height: 100%; |
| 126 |
} |
| 127 |
|
| 128 |
.reactEasyCrop_CropArea { |
| 129 |
position: absolute; |
| 130 |
left: 50%; |
| 131 |
top: 50%; |
| 132 |
transform: translate(-50%, -50%); |
| 133 |
border: 1px solid rgba(255, 255, 255, 0.5); |
| 134 |
box-sizing: border-box; |
| 135 |
box-shadow: 0 0 0 9999em; |
| 136 |
color: rgba(0, 0, 0, 0.5); |
| 137 |
overflow: hidden; |
| 138 |
} |
| 139 |
|
| 140 |
.reactEasyCrop_CropAreaRound { |
| 141 |
border-radius: 50%; |
| 142 |
} |
| 143 |
|
| 144 |
.reactEasyCrop_CropAreaGrid::before { |
| 145 |
content: ' '; |
| 146 |
box-sizing: border-box; |
| 147 |
position: absolute; |
| 148 |
border: 1px solid rgba(255, 255, 255, 0.5); |
| 149 |
top: 0; |
| 150 |
bottom: 0; |
| 151 |
left: 33.33%; |
| 152 |
right: 33.33%; |
| 153 |
border-top: 0; |
| 154 |
border-bottom: 0; |
| 155 |
} |
| 156 |
|
| 157 |
.reactEasyCrop_CropAreaGrid::after { |
| 158 |
content: ' '; |
| 159 |
box-sizing: border-box; |
| 160 |
position: absolute; |
| 161 |
border: 1px solid rgba(255, 255, 255, 0.5); |
| 162 |
top: 33.33%; |
| 163 |
bottom: 33.33%; |
| 164 |
left: 0; |
| 165 |
right: 0; |
| 166 |
border-left: 0; |
| 167 |
border-right: 0; |
| 168 |
} |
| 169 |
`,TRe=1,IRe=3,PRe=1,_ie=(function(e){a7(t,e);function t(){var o=e!==null&&e.apply(this,arguments)||this;return o.cropperRef=fs.createRef(),o.imageRef=fs.createRef(),o.videoRef=fs.createRef(),o.containerPosition={x:0,y:0},o.containerRef=null,o.styleRef=null,o.containerRect=null,o.mediaSize={width:0,height:0,naturalWidth:0,naturalHeight:0},o.dragStartPosition={x:0,y:0},o.dragStartCrop={x:0,y:0},o.gestureZoomStart=0,o.gestureRotationStart=0,o.isTouching=!1,o.lastPinchDistance=0,o.lastPinchRotation=0,o.rafDragTimeout=null,o.rafPinchTimeout=null,o.wheelTimer=null,o.currentDoc=typeof document<"u"?document:null,o.currentWindow=typeof window<"u"?window:null,o.resizeObserver=null,o.previousCropSize=null,o.isInitialized=!1,o.state={cropSize:null,hasWheelJustStarted:!1,mediaObjectFit:void 0},o.initResizeObserver=function(){if(!(typeof window.ResizeObserver>"u"||!o.containerRef)){var r=!0;o.resizeObserver=new window.ResizeObserver(function(n){if(r){r=!1;return}o.computeSizes()}),o.resizeObserver.observe(o.containerRef)}},o.preventZoomSafari=function(r){return r.preventDefault()},o.cleanEvents=function(){o.currentDoc&&(o.currentDoc.removeEventListener("mousemove",o.onMouseMove),o.currentDoc.removeEventListener("mouseup",o.onDragStopped),o.currentDoc.removeEventListener("touchmove",o.onTouchMove),o.currentDoc.removeEventListener("touchend",o.onDragStopped),o.currentDoc.removeEventListener("gesturechange",o.onGestureChange),o.currentDoc.removeEventListener("gestureend",o.onGestureEnd),o.currentDoc.removeEventListener("scroll",o.onScroll))},o.clearScrollEvent=function(){o.containerRef&&o.containerRef.removeEventListener("wheel",o.onWheel),o.wheelTimer&&clearTimeout(o.wheelTimer)},o.onMediaLoad=function(){var r=o.computeSizes();r&&(o.previousCropSize=r,o.emitCropData(),o.setInitialCrop(r),o.isInitialized=!0),o.props.onMediaLoaded&&o.props.onMediaLoaded(o.mediaSize)},o.setInitialCrop=function(r){if(o.props.initialCroppedAreaPercentages){var n=xRe(o.props.initialCroppedAreaPercentages,o.mediaSize,o.props.rotation,r,o.props.minZoom,o.props.maxZoom),i=n.crop,s=n.zoom;o.props.onCropChange(i),o.props.onZoomChange&&o.props.onZoomChange(s)}else if(o.props.initialCroppedAreaPixels){var a=CRe(o.props.initialCroppedAreaPixels,o.mediaSize,o.props.rotation,r,o.props.minZoom,o.props.maxZoom),i=a.crop,s=a.zoom;o.props.onCropChange(i),o.props.onZoomChange&&o.props.onZoomChange(s)}},o.computeSizes=function(){var r,n,i,s,a,c,u=o.imageRef.current||o.videoRef.current;if(u&&o.containerRef){o.containerRect=o.containerRef.getBoundingClientRect(),o.saveContainerPosition();var d=o.containerRect.width/o.containerRect.height,f=((r=o.imageRef.current)===null||r===void 0?void 0:r.naturalWidth)||((n=o.videoRef.current)===null||n===void 0?void 0:n.videoWidth)||0,m=((i=o.imageRef.current)===null||i===void 0?void 0:i.naturalHeight)||((s=o.videoRef.current)===null||s===void 0?void 0:s.videoHeight)||0,h=u.offsetWidth<f||u.offsetHeight<m,p=f/m,g=void 0;if(h)switch(o.state.mediaObjectFit){default:case"contain":g=d>p?{width:o.containerRect.height*p,height:o.containerRect.height}:{width:o.containerRect.width,height:o.containerRect.width/p};break;case"horizontal-cover":g={width:o.containerRect.width,height:o.containerRect.width/p};break;case"vertical-cover":g={width:o.containerRect.height*p,height:o.containerRect.height};break}else g={width:u.offsetWidth,height:u.offsetHeight};o.mediaSize=Yo(Yo({},g),{naturalWidth:f,naturalHeight:m}),o.props.setMediaSize&&o.props.setMediaSize(o.mediaSize);var b=o.props.cropSize?o.props.cropSize:vRe(o.mediaSize.width,o.mediaSize.height,o.containerRect.width,o.containerRect.height,o.props.aspect,o.props.rotation);return(((a=o.state.cropSize)===null||a===void 0?void 0:a.height)!==b.height||((c=o.state.cropSize)===null||c===void 0?void 0:c.width)!==b.width)&&o.props.onCropSizeChange&&o.props.onCropSizeChange(b),o.setState({cropSize:b},o.recomputeCropPosition),o.props.setCropSize&&o.props.setCropSize(b),b}},o.saveContainerPosition=function(){if(o.containerRef){var r=o.containerRef.getBoundingClientRect();o.containerPosition={x:r.left,y:r.top}}},o.onMouseDown=function(r){o.currentDoc&&(r.preventDefault(),o.currentDoc.addEventListener("mousemove",o.onMouseMove),o.currentDoc.addEventListener("mouseup",o.onDragStopped),o.saveContainerPosition(),o.onDragStart(t.getMousePoint(r)))},o.onMouseMove=function(r){return o.onDrag(t.getMousePoint(r))},o.onScroll=function(r){o.currentDoc&&(r.preventDefault(),o.saveContainerPosition())},o.onTouchStart=function(r){o.currentDoc&&(o.isTouching=!0,!(o.props.onTouchRequest&&!o.props.onTouchRequest(r))&&(o.currentDoc.addEventListener("touchmove",o.onTouchMove,{passive:!1}),o.currentDoc.addEventListener("touchend",o.onDragStopped),o.saveContainerPosition(),r.touches.length===2?o.onPinchStart(r):r.touches.length===1&&o.onDragStart(t.getTouchPoint(r.touches[0]))))},o.onTouchMove=function(r){r.preventDefault(),r.touches.length===2?o.onPinchMove(r):r.touches.length===1&&o.onDrag(t.getTouchPoint(r.touches[0]))},o.onGestureStart=function(r){o.currentDoc&&(r.preventDefault(),o.currentDoc.addEventListener("gesturechange",o.onGestureChange),o.currentDoc.addEventListener("gestureend",o.onGestureEnd),o.gestureZoomStart=o.props.zoom,o.gestureRotationStart=o.props.rotation)},o.onGestureChange=function(r){if(r.preventDefault(),!o.isTouching){var n=t.getMousePoint(r),i=o.gestureZoomStart-1+r.scale;if(o.setNewZoom(i,n,{shouldUpdatePosition:!0}),o.props.onRotationChange){var s=o.gestureRotationStart+r.rotation;o.props.onRotationChange(s)}}},o.onGestureEnd=function(r){o.cleanEvents()},o.onDragStart=function(r){var n,i,s=r.x,a=r.y;o.dragStartPosition={x:s,y:a},o.dragStartCrop=Yo({},o.props.crop),(i=(n=o.props).onInteractionStart)===null||i===void 0||i.call(n)},o.onDrag=function(r){var n=r.x,i=r.y;o.currentWindow&&(o.rafDragTimeout&&o.currentWindow.cancelAnimationFrame(o.rafDragTimeout),o.rafDragTimeout=o.currentWindow.requestAnimationFrame(function(){if(o.state.cropSize&&!(n===void 0||i===void 0)){var s=n-o.dragStartPosition.x,a=i-o.dragStartPosition.y,c={x:o.dragStartCrop.x+s,y:o.dragStartCrop.y+a},u=o.props.restrictPosition?SS(c,o.mediaSize,o.state.cropSize,o.props.zoom,o.props.rotation):c;o.props.onCropChange(u)}}))},o.onDragStopped=function(){var r,n;o.isTouching=!1,o.cleanEvents(),o.emitCropData(),(n=(r=o.props).onInteractionEnd)===null||n===void 0||n.call(r)},o.onWheel=function(r){if(o.currentWindow&&!(o.props.onWheelRequest&&!o.props.onWheelRequest(r))){r.preventDefault();var n=t.getMousePoint(r),i=(0,yie.default)(r).pixelY,s=o.props.zoom-i*o.props.zoomSpeed/200;o.setNewZoom(s,n,{shouldUpdatePosition:!0}),o.state.hasWheelJustStarted||o.setState({hasWheelJustStarted:!0},function(){var a,c;return(c=(a=o.props).onInteractionStart)===null||c===void 0?void 0:c.call(a)}),o.wheelTimer&&clearTimeout(o.wheelTimer),o.wheelTimer=o.currentWindow.setTimeout(function(){return o.setState({hasWheelJustStarted:!1},function(){var a,c;return(c=(a=o.props).onInteractionEnd)===null||c===void 0?void 0:c.call(a)})},250)}},o.getPointOnContainer=function(r,n){var i=r.x,s=r.y;if(!o.containerRect)throw new Error("The Cropper is not mounted");return{x:o.containerRect.width/2-(i-n.x),y:o.containerRect.height/2-(s-n.y)}},o.getPointOnMedia=function(r){var n=r.x,i=r.y,s=o.props,a=s.crop,c=s.zoom;return{x:(n+a.x)/c,y:(i+a.y)/c}},o.setNewZoom=function(r,n,i){var s=i===void 0?{}:i,a=s.shouldUpdatePosition,c=a===void 0?!0:a;if(!(!o.state.cropSize||!o.props.onZoomChange)){var u=S2(r,o.props.minZoom,o.props.maxZoom);if(c){var d=o.getPointOnContainer(n,o.containerPosition),f=o.getPointOnMedia(d),m={x:f.x*u-d.x,y:f.y*u-d.y},h=o.props.restrictPosition?SS(m,o.mediaSize,o.state.cropSize,u,o.props.rotation):m;o.props.onCropChange(h)}o.props.onZoomChange(u)}},o.getCropData=function(){if(!o.state.cropSize)return null;var r=o.props.restrictPosition?SS(o.props.crop,o.mediaSize,o.state.cropSize,o.props.zoom,o.props.rotation):o.props.crop;return yRe(r,o.mediaSize,o.state.cropSize,o.getAspect(),o.props.zoom,o.props.rotation,o.props.restrictPosition)},o.emitCropData=function(){var r=o.getCropData();if(r){var n=r.croppedAreaPercentages,i=r.croppedAreaPixels;o.props.onCropComplete&&o.props.onCropComplete(n,i),o.props.onCropAreaChange&&o.props.onCropAreaChange(n,i)}},o.emitCropAreaChange=function(){var r=o.getCropData();if(r){var n=r.croppedAreaPercentages,i=r.croppedAreaPixels;o.props.onCropAreaChange&&o.props.onCropAreaChange(n,i)}},o.recomputeCropPosition=function(){if(o.state.cropSize){var r=o.props.crop;if(o.isInitialized&&o.previousCropSize){var n=Math.abs(o.previousCropSize.width-o.state.cropSize.width)>1e-6||Math.abs(o.previousCropSize.height-o.state.cropSize.height)>1e-6;if(n){var i=o.state.cropSize.width/o.previousCropSize.width,s=o.state.cropSize.height/o.previousCropSize.height;r={x:o.props.crop.x*i,y:o.props.crop.y*s}}}var a=o.props.restrictPosition?SS(r,o.mediaSize,o.state.cropSize,o.props.zoom,o.props.rotation):r;o.previousCropSize=o.state.cropSize,o.props.onCropChange(a),o.emitCropData()}},o.onKeyDown=function(r){var n,i,s=o.props,a=s.crop,c=s.onCropChange,u=s.keyboardStep,d=s.zoom,f=s.rotation,m=u;if(o.state.cropSize){r.shiftKey&&(m*=.2);var h=Yo({},a);switch(r.key){case"ArrowUp":h.y-=m,r.preventDefault();break;case"ArrowDown":h.y+=m,r.preventDefault();break;case"ArrowLeft":h.x-=m,r.preventDefault();break;case"ArrowRight":h.x+=m,r.preventDefault();break;default:return}o.props.restrictPosition&&(h=SS(h,o.mediaSize,o.state.cropSize,d,f)),r.repeat||(i=(n=o.props).onInteractionStart)===null||i===void 0||i.call(n),c(h)}},o.onKeyUp=function(r){var n,i;switch(r.key){case"ArrowUp":case"ArrowDown":case"ArrowLeft":case"ArrowRight":r.preventDefault();break;default:return}o.emitCropData(),(i=(n=o.props).onInteractionEnd)===null||i===void 0||i.call(n)},o}return 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(),typeof window.ResizeObserver>"u"&&this.currentWindow.addEventListener("resize",this.computeSizes),this.props.zoomWithScroll&&this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}),this.containerRef.addEventListener("gesturestart",this.onGestureStart)),this.currentDoc.addEventListener("scroll",this.onScroll),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=ERe,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),this.props.setCropperRef&&this.props.setCropperRef(this.cropperRef))},t.prototype.componentWillUnmount=function(){var o,r;!this.currentDoc||!this.currentWindow||(typeof window.ResizeObserver>"u"&&this.currentWindow.removeEventListener("resize",this.computeSizes),(o=this.resizeObserver)===null||o===void 0||o.disconnect(),this.containerRef&&this.containerRef.removeEventListener("gesturestart",this.preventZoomSafari),this.styleRef&&((r=this.styleRef.parentNode)===null||r===void 0||r.removeChild(this.styleRef)),this.cleanEvents(),this.props.zoomWithScroll&&this.clearScrollEvent())},t.prototype.componentDidUpdate=function(o){var r,n,i,s,a,c,u,d,f;o.rotation!==this.props.rotation?(this.computeSizes(),this.recomputeCropPosition()):o.aspect!==this.props.aspect?this.computeSizes():o.objectFit!==this.props.objectFit?this.computeSizes():o.zoom!==this.props.zoom?this.recomputeCropPosition():((r=o.cropSize)===null||r===void 0?void 0:r.height)!==((n=this.props.cropSize)===null||n===void 0?void 0:n.height)||((i=o.cropSize)===null||i===void 0?void 0:i.width)!==((s=this.props.cropSize)===null||s===void 0?void 0:s.width)?this.computeSizes():(((a=o.crop)===null||a===void 0?void 0:a.x)!==((c=this.props.crop)===null||c===void 0?void 0:c.x)||((u=o.crop)===null||u===void 0?void 0:u.y)!==((d=this.props.crop)===null||d===void 0?void 0:d.y))&&this.emitCropAreaChange(),o.zoomWithScroll!==this.props.zoomWithScroll&&this.containerRef&&(this.props.zoomWithScroll?this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}):this.clearScrollEvent()),o.video!==this.props.video&&((f=this.videoRef.current)===null||f===void 0||f.load());var m=this.getObjectFit();m!==this.state.mediaObjectFit&&this.setState({mediaObjectFit:m},this.computeSizes)},t.prototype.getAspect=function(){var o=this.props,r=o.cropSize,n=o.aspect;return r?r.width/r.height:n},t.prototype.getObjectFit=function(){var o,r,n,i;if(this.props.objectFit==="cover"){var s=this.imageRef.current||this.videoRef.current;if(s&&this.containerRef){this.containerRect=this.containerRef.getBoundingClientRect();var a=this.containerRect.width/this.containerRect.height,c=((o=this.imageRef.current)===null||o===void 0?void 0:o.naturalWidth)||((r=this.videoRef.current)===null||r===void 0?void 0:r.videoWidth)||0,u=((n=this.imageRef.current)===null||n===void 0?void 0:n.naturalHeight)||((i=this.videoRef.current)===null||i===void 0?void 0:i.videoHeight)||0,d=c/u;return d<a?"horizontal-cover":"vertical-cover"}return"horizontal-cover"}return this.props.objectFit},t.prototype.onPinchStart=function(o){var r=t.getTouchPoint(o.touches[0]),n=t.getTouchPoint(o.touches[1]);this.lastPinchDistance=bie(r,n),this.lastPinchRotation=vie(r,n),this.onDragStart(kie(r,n))},t.prototype.onPinchMove=function(o){var r=this;if(!(!this.currentDoc||!this.currentWindow)){var n=t.getTouchPoint(o.touches[0]),i=t.getTouchPoint(o.touches[1]),s=kie(n,i);this.onDrag(s),this.rafPinchTimeout&&this.currentWindow.cancelAnimationFrame(this.rafPinchTimeout),this.rafPinchTimeout=this.currentWindow.requestAnimationFrame(function(){var a=bie(n,i),c=r.props.zoom*(a/r.lastPinchDistance);r.setNewZoom(c,s,{shouldUpdatePosition:!1}),r.lastPinchDistance=a;var u=vie(n,i),d=r.props.rotation+(u-r.lastPinchRotation);r.props.onRotationChange&&r.props.onRotationChange(d),r.lastPinchRotation=u})}},t.prototype.render=function(){var o=this,r,n=this.props,i=n.image,s=n.video,a=n.mediaProps,c=n.cropperProps,u=n.transform,d=n.crop,f=d.x,m=d.y,h=n.rotation,p=n.zoom,g=n.cropShape,b=n.showGrid,k=n.roundCropAreaPixels,v=n.style,y=v.containerStyle,_=v.cropAreaStyle,S=v.mediaStyle,C=n.classes,B=C.containerClassName,T=C.cropAreaClassName,I=C.mediaClassName,E=(r=this.state.mediaObjectFit)!==null&&r!==void 0?r:this.getObjectFit();return fs.createElement("div",{onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,ref:function(P){return o.containerRef=P},"data-testid":"container",style:y,className:_2("reactEasyCrop_Container",B)},i?fs.createElement("img",Yo({alt:"",className:_2("reactEasyCrop_Image",E==="contain"&&"reactEasyCrop_Contain",E==="horizontal-cover"&&"reactEasyCrop_Cover_Horizontal",E==="vertical-cover"&&"reactEasyCrop_Cover_Vertical",I)},a,{src:i,ref:this.imageRef,style:Yo(Yo({},S),{transform:u||"translate(".concat(f,"px, ").concat(m,"px) rotate(").concat(h,"deg) scale(").concat(p,")")}),onLoad:this.onMediaLoad})):s&&fs.createElement("video",Yo({autoPlay:!0,playsInline:!0,loop:!0,muted:!0,className:_2("reactEasyCrop_Video",E==="contain"&&"reactEasyCrop_Contain",E==="horizontal-cover"&&"reactEasyCrop_Cover_Horizontal",E==="vertical-cover"&&"reactEasyCrop_Cover_Vertical",I)},a,{ref:this.videoRef,onLoadedMetadata:this.onMediaLoad,style:Yo(Yo({},S),{transform:u||"translate(".concat(f,"px, ").concat(m,"px) rotate(").concat(h,"deg) scale(").concat(p,")")}),controls:!1}),(Array.isArray(s)?s:[{src:s}]).map(function(L){return fs.createElement("source",Yo({key:L.src},L))})),this.state.cropSize&&fs.createElement("div",Yo({ref:this.cropperRef,style:Yo(Yo({},_),{width:k?Math.round(this.state.cropSize.width):this.state.cropSize.width,height:k?Math.round(this.state.cropSize.height):this.state.cropSize.height}),tabIndex:0,onKeyDown:this.onKeyDown,onKeyUp:this.onKeyUp,"data-testid":"cropper",className:_2("reactEasyCrop_CropArea",g==="round"&&"reactEasyCrop_CropAreaRound",b&&"reactEasyCrop_CropAreaGrid",T)},c)))},t.defaultProps={zoom:1,rotation:0,aspect:4/3,maxZoom:IRe,minZoom:TRe,cropShape:"rect",objectFit:"contain",showGrid:!0,style:{},classes:{},mediaProps:{},cropperProps:{},zoomSpeed:1,restrictPosition:!0,zoomWithScroll:!0,keyboardStep:PRe},t.getMousePoint=function(o){return{x:Number(o.clientX),y:Number(o.clientY)}},t.getTouchPoint=function(o){return{x:Number(o.clientX),y:Number(o.clientY)}},t})(fs.Component);var Pie=l(R(),1);var jb=l(R(),1);var Sie=Object.prototype.hasOwnProperty;function xie(e,t,o){for(o of e.keys())if(Sp(o,t))return o}function Sp(e,t){var o,r,n;if(e===t)return!0;if(e&&t&&(o=e.constructor)===t.constructor){if(o===Date)return e.getTime()===t.getTime();if(o===RegExp)return e.toString()===t.toString();if(o===Array){if((r=e.length)===t.length)for(;r--&&Sp(e[r],t[r]););return r===-1}if(o===Set){if(e.size!==t.size)return!1;for(r of e)if(n=r,n&&typeof n=="object"&&(n=xie(t,n),!n)||!t.has(n))return!1;return!0}if(o===Map){if(e.size!==t.size)return!1;for(r of e)if(n=r[0],n&&typeof n=="object"&&(n=xie(t,n),!n)||!Sp(r[1],t.get(n)))return!1;return!0}if(o===ArrayBuffer)e=new Uint8Array(e),t=new Uint8Array(t);else if(o===DataView){if((r=e.byteLength)===t.byteLength)for(;r--&&e.getInt8(r)===t.getInt8(r););return r===-1}if(ArrayBuffer.isView(e)){if((r=e.byteLength)===t.byteLength)for(;r--&&e[r]===t[r];);return r===-1}if(!o||typeof e=="object"){r=0;for(o in e)if(Sie.call(e,o)&&++r&&!Sie.call(t,o)||!(o in t)||!Sp(e[o],t[o]))return!1;return Object.keys(t).length===r}}return e!==e&&t!==t}var ca=l(R(),1);var zb=1,wie=5;var x2=e=>e>=0?e%360:(360+e%360)%360,RRe=e=>new Promise((t,o)=>{let r=new Image;r.addEventListener("load",()=>t(r)),r.addEventListener("error",n=>o(n)),r.setAttribute("crossOrigin","anonymous"),r.src=e});function Cie(e){return e*Math.PI/180}function ORe(e,t,o){let r=Cie(o);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)}}async function Bie(e,t,o=0,r={horizontal:!1,vertical:!1}){try{let n=await RRe(e),i=document.createElement("canvas"),s=i.getContext("2d");if(!s)return null;let a=Cie(o),{width:c,height:u}=ORe(n.width,n.height,o);i.width=c,i.height=u,s.translate(c/2,u/2),s.rotate(a),s.scale(r.horizontal?-1:1,r.vertical?-1:1),s.translate(-n.width/2,-n.height/2),s.drawImage(n,0,0);let d=document.createElement("canvas"),f=d.getContext("2d");return f?(d.width=t.width,d.height=t.height,f.drawImage(i,t.x,t.y,t.width,t.height,0,0,t.width,t.height),new Promise(m=>{d.toBlob(h=>{h&&m(URL.createObjectURL(h))},"image/jpeg")})):null}catch{return null}}var xp={crop:{x:0,y:0,width:100,height:100},zoom:zb,rotation:0,aspectRatio:1,flip:{horizontal:!1,vertical:!1}},ARe={x:0,y:0},IF={crop:ARe,croppedArea:xp.crop,croppedAreaPixels:null,zoom:xp.zoom,rotation:xp.rotation,flip:xp.flip,aspectRatio:xp.aspectRatio,mediaSize:null};function Eie(){let[e,t]=(0,ca.useState)(IF),[o,r]=(0,ca.useState)(null),n=(0,ca.useCallback)(u=>{t(d=>{let m={...typeof u=="function"?u(d):u};return"rotation"in m&&m.rotation!==void 0&&(m.rotation=x2(m.rotation)),{...d,...m}})},[]),i=(0,ca.useCallback)((u=null)=>{if(!u){r(null),n(IF);return}if(typeof u=="object"){let d={...xp,...u};r(d),n(d)}},[n,r]),s=(0,ca.useCallback)(()=>{if(o){let u={crop:{x:0,y:0},croppedAreaPixels:null};o.crop&&(u.croppedArea=o.crop),o.zoom!==void 0&&(u.zoom=o.zoom),o.rotation!==void 0&&(u.rotation=o.rotation),o.aspectRatio!==void 0&&(u.aspectRatio=o.aspectRatio),o.flip!==void 0&&(u.flip=o.flip),n(u)}else n({...IF})},[o,n]),a=(0,ca.useMemo)(()=>{if(o){let d={crop:e.croppedAreaPixels||e.croppedArea,zoom:e.zoom,rotation:x2(e.rotation),aspectRatio:e.aspectRatio,flip:e.flip};return Sp(d,o)===!1}let u={crop:e.croppedArea,zoom:e.zoom,rotation:x2(e.rotation),aspectRatio:e.aspectRatio,flip:e.flip};return Sp(u,xp)===!1},[e,o]),c=(0,ca.useCallback)(async u=>e.croppedAreaPixels?Bie(u,e.croppedAreaPixels,e.rotation,e.flip):null,[e.croppedAreaPixels,e.rotation,e.flip]);return(0,ca.useMemo)(()=>({cropperState:e,setCropperState:n,resetState:o,setResetState:i,isDirty:a,reset:s,getCroppedImage:c}),[e,n,o,i,a,s,c])}var Tie=l(w(),1),Iie=(0,jb.createContext)({cropperState:{crop:{x:0,y:0},croppedArea:{x:0,y:0,width:100,height:100},croppedAreaPixels:null,zoom:zb,rotation:0,aspectRatio:1,flip:{horizontal:!1,vertical:!1},mediaSize:null},setCropperState:()=>{},resetState:null,setResetState:()=>{},isDirty:!1,reset:()=>{},getCroppedImage:()=>Promise.resolve(null)});function PF({children:e}){let t=Eie(),o=(0,jb.useMemo)(()=>({...t}),[t]);return(0,Tie.jsx)(Iie.Provider,{value:o,children:e})}var xS=()=>{let e=(0,jb.useContext)(Iie);if(!e)throw new Error("Missing ImageCropperContext");return e};var Rie=l(w(),1);function RF({src:e,onLoad:t,minZoom:o=zb,maxZoom:r=wie,...n}){let{cropperState:i,setCropperState:s}=xS(),{crop:a,zoom:c,rotation:u,aspectRatio:d,flip:f}=i,m=k=>s({crop:k}),h=k=>s({zoom:k}),p=k=>s({rotation:k}),g=k=>s({mediaSize:k}),b=(0,Pie.useCallback)((k,v)=>{s({croppedArea:k,croppedAreaPixels:v})},[s]);return(0,Rie.jsx)(_ie,{classes:{containerClassName:"image-cropper__container",cropAreaClassName:"image-cropper__crop-area",mediaClassName:"image-cropper__image"},minZoom:o,maxZoom:r,rotation:u,image:e,setMediaSize:g,crop:a,zoom:c,aspect:d,onCropChange:m,onZoomChange:h,onCropComplete:b,onMediaLoaded:k=>{t?.(k)},onRotationChange:p,transform:[`translate(${a.x}px, ${a.y}px)`,`rotateZ(${u}deg)`,`rotateY(${f.horizontal?180:0}deg)`,`rotateX(${f.vertical?180:0}deg)`,`scale(${c})`].join(" "),...n})}var Gb=l(A(),1),Hb=l(N(),1);var Oie=100,Aie=300,w2={placement:"bottom-start"};var Ub=l(R(),1);var C2=l(F(),1),wp=l(R(),1),Oc=l(N(),1),Lie=l(Xn(),1),Nie=l(Fe(),1);var LRe={crop:(0,Oc.__)("Image cropped."),rotate:(0,Oc.__)("Image rotated."),cropAndRotate:(0,Oc.__)("Image cropped and rotated.")};function Mie({crop:e,rotation:t,url:o,id:r,onSaveImage:n,onFinishEditing:i}){let{createErrorNotice:s,createSuccessNotice:a}=(0,C2.useDispatch)(Lie.store),[c,u]=(0,wp.useState)(!1),{editMediaEntity:d}=(0,C2.useSelect)(h=>({editMediaEntity:h(x).getSettings()?.[tx]}),[]),f=(0,wp.useCallback)(()=>{u(!1),i()},[i]),m=(0,wp.useCallback)(async()=>{if(!d){i(),s((0,Oc.__)("Sorry, you are not allowed to edit images on this site."),{id:"image-editing-error",type:"snackbar"});return}u(!0);let h=[];if(t>0&&h.push({type:"rotate",args:{angle:t}}),(e.width<99.9||e.height<99.9)&&h.push({type:"crop",args:{left:e.x,top:e.y,width:e.width,height:e.height}}),h.length===0){u(!1),i();return}let p=h.length===1?h[0].type:"cropAndRotate";try{let g=await d(r,{src:o,modifiers:h},{throwOnError:!0});g&&(n({id:g.id,url:g.source_url}),a(LRe[p],{type:"snackbar",actions:[{label:(0,Oc.__)("Undo"),onClick:()=>{n({id:r,url:o})}}]}))}catch(g){s((0,Oc.sprintf)((0,Oc.__)("Could not edit image. %s"),(0,Nie.__unstableStripHTML)(g.message)),{id:"image-editing-error",type:"snackbar"})}finally{u(!1),i()}},[e,t,r,o,n,s,a,i,d]);return(0,wp.useMemo)(()=>({isInProgress:c,apply:m,cancel:f}),[c,m,f])}var ua=l(R(),1),Die=l(vt(),1);function Vie({url:e,naturalWidth:t,naturalHeight:o}){let[r,n]=(0,ua.useState)(),{cropperState:i,setCropperState:s}=xS(),{zoom:a,aspectRatio:c,crop:u,croppedArea:d}=i,f=(0,ua.useCallback)(v=>{s({zoom:v})},[s]),m=(0,ua.useCallback)(v=>{s({aspectRatio:v})},[s]),h=t/o,p=o/t;(0,ua.useEffect)(()=>{m(h)},[]);let[g,b]=(0,ua.useState)(0),k=(0,ua.useCallback)(()=>{let v=(g+90)%360,y=h,S=a!==1||!(h===c||p===c);if(g%180===90&&(y=1/h),v===0){n(),b(v),s({aspectRatio:S?c:h,crop:{x:-(u.y*y),y:u.x*y}});return}function C(I){let E=document.createElement("canvas"),L=0,P=0;v%180?(E.width=I.target.height,E.height=I.target.width):(E.width=I.target.width,E.height=I.target.height),(v===90||v===180)&&(L=E.width),(v===270||v===180)&&(P=E.height);let O=E.getContext("2d");O.translate(L,P),O.rotate(v*Math.PI/180),O.drawImage(I.target,0,0),E.toBlob(V=>{n(URL.createObjectURL(V)),b(v);let j=S?c:E.width/E.height;s({aspectRatio:j,crop:{x:-(u.y*y),y:u.x*y}})})}let B=new window.Image;B.src=e,B.onload=C;let T=(0,Die.applyFilters)("media.crossOrigin",void 0,e);typeof T=="string"&&(B.crossOrigin=T)},[g,h,e,s,u,a,c,p,b]);return(0,ua.useMemo)(()=>({editedUrl:r,setEditedUrl:n,crop:d,zoom:a,setZoom:f,rotation:g,rotateClockwise:k,aspect:c,setAspect:m,defaultAspect:h}),[r,d,a,f,g,k,c,m,h])}var Fie=l(w(),1),OF=(0,Ub.createContext)({});OF.displayName="ImageEditingContext";var ol=()=>(0,Ub.useContext)(OF);function zie({id:e,url:t,naturalWidth:o,naturalHeight:r,onFinishEditing:n,onSaveImage:i,children:s}){let a=Vie({url:t,naturalWidth:o,naturalHeight:r}),c=Mie({id:e,url:t,onSaveImage:i,onFinishEditing:n,...a}),u=(0,Ub.useMemo)(()=>({...a,...c}),[a,c]);return(0,Fie.jsx)(OF.Provider,{value:u,children:s})}var ms=l(w(),1);function B2({aspectRatios:e,isDisabled:t,label:o,onClick:r,value:n}){return(0,ms.jsx)(Gb.MenuGroup,{label:o,children:e.map(({name:i,slug:s,ratio:a})=>(0,ms.jsx)(Gb.MenuItem,{disabled:t,onClick:()=>{r(a)},role:"menuitemradio",isSelected:a===n,icon:a===n?Li:void 0,children:i},s))})}function NRe(e){let[t,o,...r]=e.split("/").map(Number);return t<=0||o<=0||Number.isNaN(t)||Number.isNaN(o)||r.length?NaN:o?t/o:t}function AF({ratio:e,...t}){return{ratio:NRe(e),...t}}function jie({toggleProps:e}){let{isInProgress:t,aspect:o,setAspect:r,defaultAspect:n}=ol(),[i,s,a]=me("dimensions.aspectRatios.default","dimensions.aspectRatios.theme","dimensions.defaultAspectRatios");return(0,ms.jsx)(Gb.DropdownMenu,{icon:HA,label:(0,Hb.__)("Aspect Ratio"),popoverProps:w2,toggleProps:e,children:({onClose:c})=>(0,ms.jsxs)(ms.Fragment,{children:[(0,ms.jsx)(B2,{isDisabled:t,onClick:u=>{r(u),c()},value:o,aspectRatios:[{slug:"original",name:(0,Hb.__)("Original"),ratio:n},...a?i.map(AF).filter(({ratio:u})=>u===1):[]]}),s?.length>0&&(0,ms.jsx)(B2,{label:(0,Hb.__)("Theme"),isDisabled:t,onClick:u=>{r(u),c()},value:o,aspectRatios:s}),a&&(0,ms.jsx)(B2,{label:(0,Hb.__)("Landscape"),isDisabled:t,onClick:u=>{r(u),c()},value:o,aspectRatios:i.map(AF).filter(({ratio:u})=>u>1)}),a&&(0,ms.jsx)(B2,{label:(0,Hb.__)("Portrait"),isDisabled:t,onClick:u=>{r(u),c()},value:o,aspectRatios:i.map(AF).filter(({ratio:u})=>u<1)})]})})}var Uie=l(A(),1),Hie=l(X(),1);var Zd=l(w(),1);function Gie({url:e,width:t,height:o,naturalHeight:r,naturalWidth:n,borderProps:i}){let{isInProgress:s,editedUrl:a,rotation:c}=ol(),[u,{width:d}]=(0,Hie.useResizeObserver)(),f=o||d*r/n;c%180===90&&(f=d*n/r);let m=(0,Zd.jsxs)("div",{className:D("wp-block-image__crop-area",i?.className,{"is-applying":s}),style:{...i?.style,width:t||d,height:f},children:[(0,Zd.jsx)(RF,{src:a||e}),s&&(0,Zd.jsx)(Uie.Spinner,{})]});return(0,Zd.jsxs)(Zd.Fragment,{children:[u,m]})}var Xd=l(A(),1),LF=l(N(),1);var wS=l(w(),1);function Wie(){let{isInProgress:e,zoom:t,setZoom:o}=ol();return(0,wS.jsx)(Xd.Dropdown,{contentClassName:"wp-block-image__zoom",popoverProps:w2,renderToggle:({isOpen:r,onToggle:n})=>(0,wS.jsx)(Xd.ToolbarButton,{icon:tM,label:(0,LF.__)("Zoom"),onClick:n,"aria-expanded":r,disabled:e}),renderContent:()=>(0,wS.jsx)(Xd.__experimentalDropdownContentWrapper,{paddingSize:"medium",children:(0,wS.jsx)(Xd.RangeControl,{__next40pxDefaultSize:!0,label:(0,LF.__)("Zoom"),min:Oie,max:Aie,value:Math.round(t*100),onChange:r=>o(r/100)})})})}var $ie=l(A(),1),Kie=l(N(),1);var Yie=l(w(),1);function qie(){let{isInProgress:e,rotateClockwise:t}=ol();return(0,Yie.jsx)($ie.ToolbarButton,{icon:XN,label:(0,Kie.__)("Rotate"),onClick:t,disabled:e})}var NF=l(A(),1),MF=l(N(),1);var Cp=l(w(),1);function Zie(){let{isInProgress:e,apply:t,cancel:o}=ol();return(0,Cp.jsxs)(Cp.Fragment,{children:[(0,Cp.jsx)(NF.ToolbarButton,{onClick:t,disabled:e,children:(0,MF.__)("Apply")}),(0,Cp.jsx)(NF.ToolbarButton,{onClick:o,children:(0,MF.__)("Cancel")})]})}var bi=l(w(),1);function Xie({id:e,url:t,width:o,height:r,naturalHeight:n,naturalWidth:i,onSaveImage:s,onFinishEditing:a,borderProps:c}){return(0,bi.jsx)(PF,{children:(0,bi.jsxs)(zie,{id:e,url:t,naturalWidth:i,naturalHeight:n,onSaveImage:s,onFinishEditing:a,children:[(0,bi.jsx)(Gie,{borderProps:c,url:t,width:o,height:r,naturalHeight:n,naturalWidth:i}),(0,bi.jsxs)(Wt,{children:[(0,bi.jsxs)(CS.ToolbarGroup,{children:[(0,bi.jsx)(Wie,{}),(0,bi.jsx)(CS.ToolbarItem,{children:u=>(0,bi.jsx)(jie,{toggleProps:u})}),(0,bi.jsx)(qie,{})]}),(0,bi.jsx)(CS.ToolbarGroup,{children:(0,bi.jsx)(Zie,{})})]})]})})}var vi=l(A(),1),Qd=l(N(),1);var Wb=l(R(),1);function Qie(e,t,o,r,n){let[i,s]=(0,Wb.useState)(t??r??""),[a,c]=(0,Wb.useState)(e??o??"");return(0,Wb.useEffect)(()=>{t===void 0&&r!==void 0&&s(r),e===void 0&&o!==void 0&&c(o)},[r,o]),(0,Wb.useEffect)(()=>{t!==void 0&&Number.parseInt(t)!==Number.parseInt(i)&&s(t),e!==void 0&&Number.parseInt(e)!==Number.parseInt(a)&&c(e)},[t,e]),{currentHeight:a,currentWidth:i,updateDimension:(f,m)=>{let h=m===""?void 0:parseInt(m,10);f==="width"?s(h):c(h),n({[f]:h})},updateDimensions:(f,m)=>{c(f??o),s(m??r),n({height:f,width:m})}}}var ps=l(w(),1),Jie=[25,50,75,100],MRe=()=>{};function ese(e,t,o){let r=Math.round(t*(e/100)),n=Math.round(o*(e/100));return{scaledWidth:r,scaledHeight:n}}function tse({imageSizeHelp:e,imageWidth:t,imageHeight:o,imageSizeOptions:r=[],isResizable:n=!0,slug:i,width:s,height:a,onChange:c,onChangeImage:u=MRe}){let{currentHeight:d,currentWidth:f,updateDimension:m,updateDimensions:h}=Qie(a,s,o,t,c),p=b=>{if(b===void 0){h();return}let{scaledWidth:k,scaledHeight:v}=ese(b,t,o);h(v,k)},g=Jie.find(b=>{let{scaledWidth:k,scaledHeight:v}=ese(b,t,o);return f===k&&d===v});return(0,ps.jsxs)(vi.__experimentalVStack,{className:"block-editor-image-size-control",spacing:"4",children:[r&&r.length>0&&(0,ps.jsx)(vi.SelectControl,{label:(0,Qd.__)("Resolution"),value:i,options:r,onChange:u,help:e,size:"__unstable-large"}),n&&(0,ps.jsxs)(ps.Fragment,{children:[(0,ps.jsxs)(vi.__experimentalHStack,{align:"baseline",spacing:"4",children:[(0,ps.jsx)(vi.__experimentalNumberControl,{label:(0,Qd.__)("Width"),value:f,min:1,onChange:b=>m("width",b),size:"__unstable-large"}),(0,ps.jsx)(vi.__experimentalNumberControl,{label:(0,Qd.__)("Height"),value:d,min:1,onChange:b=>m("height",b),size:"__unstable-large"})]}),(0,ps.jsx)(vi.__experimentalToggleGroupControl,{label:(0,Qd.__)("Image size presets"),hideLabelFromVision:!0,onChange:p,value:g,isBlock:!0,__next40pxDefaultSize:!0,children:Jie.map(b=>(0,ps.jsx)(vi.__experimentalToggleGroupControlOption,{value:b,label:(0,Qd.sprintf)((0,Qd.__)("%d%%"),b)},b))})]})]})}var E2=l(A(),1);var Bp=l(N(),1),rse=l(w(),1),ose={left:Su,center:_u,right:xu,"space-between":ph,stretch:hh};function DRe({allowedControls:e=["left","center","right","space-between"],isCollapsed:t=!0,onChange:o,value:r,popoverProps:n,isToolbar:i}){let s=f=>{o(f===r?void 0:f)},a=r?ose[r]:ose.left,c=[{name:"left",icon:Su,title:(0,Bp.__)("Justify items left"),isActive:r==="left",onClick:()=>s("left")},{name:"center",icon:_u,title:(0,Bp.__)("Justify items center"),isActive:r==="center",onClick:()=>s("center")},{name:"right",icon:xu,title:(0,Bp.__)("Justify items right"),isActive:r==="right",onClick:()=>s("right")},{name:"space-between",icon:ph,title:(0,Bp.__)("Space between items"),isActive:r==="space-between",onClick:()=>s("space-between")},{name:"stretch",icon:hh,title:(0,Bp.__)("Stretch items"),isActive:r==="stretch",onClick:()=>s("stretch")}],u=i?E2.ToolbarGroup:E2.ToolbarDropdownMenu,d=i?{isCollapsed:t}:{};return(0,rse.jsx)(u,{icon:a,popoverProps:n,label:(0,Bp.__)("Change items justification"),controls:c.filter(f=>e.includes(f.name)),...d})}var DF=DRe;var VF=l(w(),1),Mh=e=>(0,VF.jsx)(DF,{...e,isToolbar:!1}),nse=e=>(0,VF.jsx)(DF,{...e,isToolbar:!0});var un=l(A(),1),da=l(N(),1),po=l(R(),1),Zse=l(X(),1),Xse=l(Fe(),1),Qse=l(it(),1),Jse=l(I_(),1),z2=l(F(),1),KF=l(Ch(),1);var eae=l(Le(),1),j2=l(qn(),1);var $b=l(A(),1);var T2=l(X(),1),I2=l(N(),1),ise=l(R(),1),Ac=l(w(),1);function sse({children:e,settingsOpen:t,setSettingsOpen:o}){let r=(0,T2.useReducedMotion)(),n=r?ise.Fragment:$b.__unstableAnimatePresence,i=r?"div":$b.__unstableMotion.div,a=`link-control-settings-drawer-${(0,T2.useInstanceId)(sse)}`;return(0,Ac.jsxs)(Ac.Fragment,{children:[(0,Ac.jsx)($b.Button,{__next40pxDefaultSize:!0,className:"block-editor-link-control__drawer-toggle","aria-expanded":t,onClick:()=>o(!t),icon:(0,I2.isRTL)()?Ck:yu,"aria-controls":a,children:(0,I2._x)("Advanced","Additional link settings")}),(0,Ac.jsx)(n,{children:t&&(0,Ac.jsx)(i,{className:"block-editor-link-control__drawer",hidden:!t,id:a,initial:"collapsed",animate:"open",exit:"collapsed",variants:{open:{opacity:1,height:"auto"},collapsed:{opacity:0,height:0}},transition:{duration:.1},children:(0,Ac.jsx)("div",{className:"block-editor-link-control__drawer-inner",children:e})})})]})}var ase=sse;var N2=l(R(),1),WF=l(N(),1),Bse=l(Le(),1);var BS=l(N(),1),vse=l(A(),1);var P2=l(N(),1),lse=l(A(),1),cse=l(R(),1);var FF=l(w(),1),VRe=({searchTerm:e,onClick:t,itemProps:o,buttonText:r})=>{if(!e)return null;let n;return r?n=typeof r=="function"?r(e):r:n=(0,cse.createInterpolateElement)((0,P2.sprintf)((0,P2.__)("Create: <mark>%s</mark>"),e),{mark:(0,FF.jsx)("mark",{})}),(0,FF.jsx)(lse.MenuItem,{...o,iconPosition:"left",icon:Mi,className:"block-editor-link-control__search-item",onClick:t,children:n})},use=VRe;var Lc=l(N(),1),O2=l(A(),1);var dse=l(Fe(),1),Yb=l(qn(),1),fse=l(X(),1),mse=l(Le(),1),Kb=l(w(),1),R2={post:{icon:YN,label:(0,Lc.__)("Post")},page:{icon:im,label:(0,Lc.__)("Page")},post_tag:{icon:xM,label:(0,Lc.__)("Tag")},category:{icon:YA,label:(0,Lc.__)("Category")},attachment:{icon:xL,label:(0,Lc.__)("Attachment")}};function FRe({isURL:e,suggestion:t}){let o=null;return e?o=Ek:t.type in R2&&(o=R2[t.type].icon,t.type==="page"&&(t.isFrontPage&&(o=tN),t.isBlogHome&&(o=DM))),o?(0,Kb.jsx)(Ie,{className:"block-editor-link-control__search-item-icon",icon:o}):null}function zRe(e){return e?.trim()?.length?e?.replace(/^\/?/,"/"):e}function jRe(e){return e?.trim()?.length?e?.replace(/\/$/,""):e}var URe=(e,...t)=>(...o)=>e(...o,...t),HRe=e=>t=>t==null||t!==t?e:t;function GRe(e){return e&&(0,fse.pipe)(Yb.safeDecodeURI,Yb.getPath,HRe(""),URe(Yb.filterURLForDisplay,24),jRe,zRe)(e)}var pse=({itemProps:e,suggestion:t,searchTerm:o,onClick:r,isURL:n=!1,shouldShowType:i=!1})=>{let s=n?(0,Lc.__)("Press ENTER to add this link"):GRe(t.url);return(0,Kb.jsx)(O2.MenuItem,{...e,info:s,iconPosition:"left",icon:(0,Kb.jsx)(FRe,{suggestion:t,isURL:n}),onClick:r,shortcut:i&&WRe(t),className:"block-editor-link-control__search-item",children:(0,Kb.jsx)(O2.TextHighlight,{text:(0,dse.__unstableStripHTML)(t.title),highlight:o})})};function WRe(e){return e.isFrontPage?(0,Lc.__)("Front page"):e.isBlogHome?(0,Lc.__)("Blog home"):e.type in R2?R2[e.type].label:e.type}var hse=pse,gse=e=>((0,mse.default)("wp.blockEditor.__experimentalLinkControlSearchItem",{since:"6.8"}),(0,Kb.jsx)(pse,{...e}));var bse=l(N(),1),Ep="__CREATE__",zF="tel",A2="link",jF="mailto",UF="internal",qb=[A2,jF,zF,UF],HF=[{id:"opensInNewTab",title:(0,bse.__)("Open in new tab")}];var kse=l(Le(),1),Tp=l(w(),1);function yse({withCreateSuggestion:e,currentInputValue:t,handleSuggestionClick:o,suggestionsListProps:r,buildSuggestionItemProps:n,suggestions:i,selectedSuggestion:s,isLoading:a,isInitialSuggestions:c,createSuggestionButtonText:u,suggestionsQuery:d}){let f=D("block-editor-link-control__search-results",{"is-loading":a}),m=i.length===1&&qb.includes(i[0].type),h=e&&!m&&!c,p=!d?.type,g=c?(0,BS.__)("Suggestions"):(0,BS.sprintf)((0,BS.__)('Search results for "%s"'),t);return(0,Tp.jsx)("div",{className:"block-editor-link-control__search-results-wrapper",children:(0,Tp.jsx)("div",{...r,className:f,"aria-label":g,children:(0,Tp.jsx)(vse.MenuGroup,{children:i.map((b,k)=>h&&Ep===b.type?(0,Tp.jsx)(use,{searchTerm:t,buttonText:u,onClick:()=>o(b),itemProps:n(b,k),isSelected:k===s},b.type):Ep===b.type?null:(0,Tp.jsx)(hse,{itemProps:n(b,k),suggestion:b,index:k,onClick:()=>{o(b)},isSelected:k===s,isURL:qb.includes(b.type),searchTerm:t,shouldShowType:p,isFrontPage:b?.isFrontPage,isBlogHome:b?.isBlogHome},`${b.id}-${b.type}`))})})})}var _se=yse,Sse=e=>((0,kse.default)("wp.blockEditor.__experimentalLinkControlSearchResults",{since:"6.8"}),(0,Tp.jsx)(yse,{...e}));var xse=l(R(),1),wse=l(F(),1);var L2=l(qn(),1);function ES(e){let t=e?.trim();if(!t)return{url:t,type:A2};let o=A2,r=(0,L2.getProtocol)(t)||"";return r.includes("mailto")?o=jF:r.includes("tel")?o=zF:t?.startsWith("#")&&(o=UF),Hf(t)||Gf(t)||t.startsWith("?")||r?{url:t,type:o}:{url:(0,L2.prependHTTPS)(t),type:o}}var $Re=()=>Promise.resolve([]),KRe=e=>{let{url:t,type:o}=ES(e);return Promise.resolve([{id:e,title:e,url:t,type:o}])},YRe=async(e,t,o,r,n,i)=>{let{isInitialSuggestions:s}=t,a=await o(e,t);return a.map(c=>Number(c.id)===n?(c.isFrontPage=!0,c):(Number(c.id)===i&&(c.isBlogHome=!0),c)),s||Wf(e)||!r?a:a.concat({title:e,url:e,type:Ep})};function Cse(e,t,o){let{fetchSearchSuggestions:r,pageOnFront:n,pageForPosts:i}=(0,wse.useSelect)(a=>{let{getSettings:c}=a(x);return{pageOnFront:c().pageOnFront,pageForPosts:c().pageForPosts,fetchSearchSuggestions:c().__experimentalFetchLinkSuggestions}},[]),s=t?KRe:$Re;return(0,xse.useCallback)((a,{isInitialSuggestions:c})=>Wf(a)?s(a,{isInitialSuggestions:c}):YRe(a,{...e,isInitialSuggestions:c},r,o,n,i),[s,r,n,i,e,o])}var Zb=l(w(),1),qRe=()=>Promise.resolve([]),GF=()=>{},Ese=(0,N2.forwardRef)(({value:e,children:t,currentLink:o={},className:r=null,placeholder:n=null,withCreateSuggestion:i=!1,onCreateSuggestion:s=GF,onChange:a=GF,onSelect:c=GF,showSuggestions:u=!0,renderSuggestions:d=C=>(0,Zb.jsx)(_se,{...C}),fetchSuggestions:f=null,allowDirectEntry:m=!0,showInitialSuggestions:h=!1,suggestionsQuery:p={},withURLSuggestion:g=!0,createSuggestionButtonText:b,hideLabelFromVision:k=!1,suffix:v,isEntity:y=!1,customValidity:_},S)=>{let C=Cse(p,m,i,g),B=u?f||C:qRe,[T,I]=(0,N2.useState)(),E=(j,H)=>{a(j),I(H)},L=j=>d({...j,withCreateSuggestion:i,createSuggestionButtonText:b,suggestionsQuery:p,handleSuggestionClick:H=>{j.handleSuggestionClick&&j.handleSuggestionClick(H),P(H)}}),P=async j=>{let H=j;if(Ep===j.type){try{H=await s(j.title),H?.url&&c(H)}catch{}return}if(m||H&&Object.keys(H).length>=1){let{id:z,url:U,kind:G,type:W,...J}=o??{};c({...J,...H},H)}},O=n??(0,WF.__)("Search or type URL"),V=k&&n!==""?O:(0,WF.__)("Link");return(0,Zb.jsxs)("div",{className:"block-editor-link-control__search-input-container",children:[(0,Zb.jsx)(Jd,{disableSuggestions:o?.url===e,label:V,hideLabelFromVision:k,className:r,value:e,onChange:E,placeholder:O,__experimentalRenderSuggestions:u?L:null,__experimentalFetchLinkSuggestions:B,__experimentalHandleURLSuggestions:!0,__experimentalShowInitialSuggestions:h,customValidity:_,required:!1,onSubmit:(j,H)=>{let z=j||T;!z&&!e?.trim()?.length?H.preventDefault():P(z||{url:e})},inputRef:S,suffix:v,disabled:y}),t]})}),Tse=Ese,Ise=e=>((0,Bse.default)("wp.blockEditor.__experimentalLinkControlSearchInput",{since:"6.8"}),(0,Zb.jsx)(Ese,{...e}));var ef=l(N(),1),Uo=l(A(),1),Lse=l(X(),1),V2=l(qn(),1);var Nse=l(Fe(),1),F2=l(F(),1),Mse=l(Xn(),1),Dse=l(Ch(),1);var Pse=l(A(),1),{Slot:Rse,Fill:Ose}=(0,Pse.createSlotFill)("BlockEditorLinkControlViewer");var Ase=l(F(),1),M2=l(R(),1);function ZRe(e,t){switch(t.type){case"RESOLVED":return{...e,isFetching:!1,richData:t.richData};case"ERROR":return{...e,isFetching:!1,richData:null};case"LOADING":return{...e,isFetching:!0};default:throw new Error(`Unexpected action type ${t.type}`)}}function XRe(e){let[t,o]=(0,M2.useReducer)(ZRe,{richData:null,isFetching:!1}),{fetchRichUrlData:r}=(0,Ase.useSelect)(n=>{let{getSettings:i}=n(x);return{fetchRichUrlData:i().__experimentalFetchRichUrlData}},[]);return(0,M2.useEffect)(()=>{if(e?.length&&r&&typeof AbortController<"u"){o({type:"LOADING"});let n=new window.AbortController,i=n.signal;return r(e,{signal:i}).then(s=>{o({type:"RESOLVED",richData:s})}).catch(()=>{i.aborted||o({type:"ERROR"})}),()=>{n.abort()}}},[e]),t}var D2=XRe;var Et=l(w(),1),{Badge:QRe}=M(Uo.privateApis);function Vse({value:e,onEditClick:t,hasRichPreviews:o=!1,hasUnlinkControl:r=!1,onRemove:n}){let i=(0,F2.useSelect)(b=>b(Dse.store).get("core","showIconLabels"),[]),s=o?e?.url:null,{richData:a,isFetching:c}=D2(s),u=a&&Object.keys(a).length,d=e&&(0,V2.filterURLForDisplay)((0,V2.safeDecodeURI)(e.url),24)||"",f=!e?.url?.length,m=!f&&(0,Nse.__unstableStripHTML)(e?.entityTitle||a?.title||e?.title||d),h;a?.icon?h=(0,Et.jsx)("img",{src:a?.icon,alt:""}):f?h=(0,Et.jsx)(Ie,{icon:nN,size:32}):h=(0,Et.jsx)(Ie,{icon:Ek});let{createNotice:p}=(0,F2.useDispatch)(Mse.store),g=(0,Lse.useCopyToClipboard)(e.url,()=>{p("info",(0,ef.__)("Link copied to clipboard."),{isDismissible:!0,type:"snackbar"})});return(0,Et.jsx)(Uo.Flex,{role:"group","aria-label":(0,ef.__)("Manage link"),className:D("block-editor-link-control__preview",{"is-current":!0,"is-rich":u,"is-fetching":!!c,"is-preview":!0,"is-error":f,"is-url-title":m===d}),children:(0,Et.jsxs)(Uo.Flex,{gap:0,align:"flex-start",children:[(0,Et.jsxs)(Uo.Flex,{className:"block-editor-link-control__link-information",role:"figure","aria-label":(0,ef.__)("Link information"),justify:"start",align:"flex-start",children:[e?.image?(0,Et.jsx)(Uo.Flex,{className:"block-editor-link-control__preview-image",justify:"center",children:(0,Et.jsx)("img",{src:e?.image,alt:""})}):(0,Et.jsx)(Uo.Flex,{className:D("block-editor-link-control__preview-icon",{"is-image":a?.icon}),justify:"center",children:h}),(0,Et.jsx)(Uo.Flex,{className:"block-editor-link-control__preview-details",direction:"column",gap:2,children:f?(0,Et.jsx)("span",{className:"block-editor-link-control__preview-error-notice",children:(0,ef.__)("Link is empty")}):(0,Et.jsxs)(Et.Fragment,{children:[(0,Et.jsx)(Uo.ExternalLink,{className:"block-editor-link-control__preview-title",href:e.url,children:(0,Et.jsx)(Uo.__experimentalTruncate,{numberOfLines:1,children:m})}),(0,Et.jsx)("span",{className:"block-editor-link-control__preview-info",children:(0,Et.jsx)(Uo.__experimentalTruncate,{numberOfLines:1,children:d})}),e?.badges?.length>0&&(0,Et.jsx)(Uo.__experimentalHStack,{className:"block-editor-link-control__preview-badges",alignment:"left",gap:1,children:e.badges.map((b,k)=>(0,Et.jsx)(QRe,{intent:b.intent,children:b.label},`${b.label}|${b.intent}|${k}`))})]})})]}),(0,Et.jsx)(Uo.Button,{icon:sm,label:(0,ef.__)("Edit link"),onClick:t,size:"compact",showTooltip:!i}),r&&(0,Et.jsx)(Uo.Button,{icon:Ni,label:(0,ef.__)("Remove link"),onClick:n,size:"compact",showTooltip:!i}),(0,Et.jsx)(Uo.Button,{icon:sL,label:(0,ef.__)("Copy link"),ref:g,accessibleWhenDisabled:!0,disabled:f,size:"compact",showTooltip:!i}),(0,Et.jsx)(Rse,{fillProps:e})]})})}var Fse=l(N(),1),zse=l(A(),1);var Ip=l(w(),1),JRe=()=>{},eOe=({value:e,onChange:t=JRe,settings:o})=>{if(!o||!o.length)return null;let r=i=>s=>{t({...e,[i.id]:s})},n=o.map(i=>{if("render"in i){if(typeof i.render=="function"){let s=i.render(i,e,t);return(0,Ip.jsx)("div",{className:"block-editor-link-control__setting",children:s},i.id)}return null}return(0,Ip.jsx)(zse.CheckboxControl,{className:"block-editor-link-control__setting",label:i.title,onChange:r(i),checked:e?!!e[i.id]:!1,help:i?.help},i.id)}).filter(Boolean);return(0,Ip.jsxs)("fieldset",{className:"block-editor-link-control__settings",children:[(0,Ip.jsx)(We,{render:(0,Ip.jsx)("legend",{}),children:(0,Fse.__)("Currently selected link settings")}),n]})},jse=eOe;var Use=l(N(),1),Pp=l(R(),1);function Hse(e){let t=(0,Pp.useRef)(),[o,r]=(0,Pp.useState)(!1),[n,i]=(0,Pp.useState)(null),s=async function(a){r(!0),i(null);try{return t.current=tOe(Promise.resolve(e(a))),await t.current.promise}catch(c){if(c&&c.isCanceled)return;throw i(c.message||(0,Use.__)("An unknown error occurred during creation. Please try again.")),c}finally{r(!1)}};return(0,Pp.useEffect)(()=>()=>{t.current&&t.current.cancel()},[]),{createPage:s,isCreatingPage:o,errorMessage:n}}var tOe=e=>{let t=!1;return{promise:new Promise((r,n)=>{e.then(i=>t?n({isCanceled:!0}):r(i),i=>n(t?{isCanceled:!0}:i))}),cancel(){t=!0}}};var $F=l(R(),1),$se=l(Wse(),1);function Kse(e){let[t,o]=(0,$F.useState)(e||{}),[r,n]=(0,$F.useState)(e);return(0,$se.default)(e,r)||(n(e),o(e)),[t,o,c=>{o({...t,url:c})},c=>{o({...t,title:c})},c=>u=>{let d=Object.keys(u).reduce((f,m)=>(c.includes(m)&&(f[m]=u[m]),f),{});o({...t,...d})}]}var Mt=l(w(),1),YF=()=>{},Yse="core/block-editor",qse="linkControlSettingsDrawer";function Rp({searchInputPlaceholder:e,value:t,settings:o=HF,onChange:r=YF,onInputChange:n,onRemove:i,onCancel:s,noDirectEntry:a=!1,showSuggestions:c=!0,showInitialSuggestions:u,forceIsEditingLink:d,createSuggestion:f,withCreateSuggestion:m,inputValue:h="",suggestionsQuery:p={},noURLSuggestion:g=!1,createSuggestionButtonText:b,hasRichPreviews:k=!1,hasTextControl:v=!1,renderControlBottom:y=null,handleEntities:_=!1}){m===void 0&&f&&(m=!0);let[S,C]=(0,po.useState)(!1),[B,T]=(0,po.useState)(void 0),{advancedSettingsPreference:I}=(0,z2.useSelect)(be=>({advancedSettingsPreference:be(KF.store).get(Yse,qse)??!1}),[]),{set:E}=(0,z2.useDispatch)(KF.store),L=be=>{E&&E(Yse,qse,be),C(be)},P=I||S,O=(0,po.useRef)(!0),V=(0,po.useRef)(),j=(0,po.useRef)(),H=(0,po.useRef)(),z=(0,po.useRef)(),U=o.map(({id:be})=>be),[G,W,J,le,oe]=Kse(t),re=be=>{J(be),n?.(be)},Q=_&&!!G?.id,$=(0,Zse.useInstanceId)(Rp,"link-control"),ee=Q?`${$}__help`:null,Y=t&&!(0,Jse.isShallowEqualObjects)(G,t),[te,ne]=(0,po.useState)(d!==void 0?d:!t||!t.url),{createPage:q,isCreatingPage:se,errorMessage:pe}=Hse(f);(0,po.useEffect)(()=>{d!==void 0&&ne(d)},[d]),(0,po.useEffect)(()=>{if(O.current)return;(Xse.focus.focusable.find(V.current)[0]||V.current).focus()},[te,se]),(0,po.useEffect)(()=>(O.current=!1,()=>{O.current=!0}),[]);let xe=(0,po.useRef)();(0,po.useEffect)(()=>{if(xe.current===void 0){xe.current=h;return}xe.current!==h&&(console.warn("LinkControl: The inputValue prop is uncontrolled and only sets the initial value. onInputChange is an observer for the input value. Changes to inputValue from the parent will not update the search input."),xe.current=h)},[h]),(0,po.useEffect)(()=>{if(B?.type==="invalid"){let be=H.current;be&&typeof be.reportValidity=="function"&&be.reportValidity()}},[B]);let Te=t?.url?.trim()?.length>0,Xe=()=>{ne(!1)},dt=be=>{let Rt={type:"invalid",message:(0,da.__)("Please enter a valid URL.")},Vo={type:"valid"},bt=be?.trim();if(!bt?.length||!Wf(bt))return Rt;if(Hf(bt)||Gf(bt))return Vo;let ge=(0,j2.prependHTTPS)(bt);return(0,j2.isURL)(ge)?Vo:Rt},ft=be=>{if(!(be&&be.id&&be.type&&!qb.includes(be.type))){let bt=be?.url||He,ge=dt(bt);if(ge.type==="invalid"){T(ge);return}let{url:Ut}=ES(bt);be={...be,url:Ut}}be?.kind==="taxonomy"&&be?.url&&(z.current=be.url);let Vo=Object.keys(be).reduce((bt,ge)=>(U.includes(ge)||(bt[ge]=be[ge]),bt),{});r({...G,...Vo,title:G?.title||be?.title}),T(void 0),Xe()},we=()=>{if($o)return!1;let be=He.trim(),Rt=G&&G.id&&G.type&&!qb.includes(G.type),Vo=t?.url===be;if(Rt&&Vo)return T(void 0),!0;let bt=dt(He);return bt.type==="invalid"?(T(bt),!1):(T(void 0),!0)},ot=()=>{Y&&r({...t,...G,url:ES(He).url}),Xe(),T(void 0)},Ce=()=>{we()&&ot()},Wo=be=>{let{keyCode:Rt}=be;Rt===Qse.ENTER&&!$o&&(be.preventDefault(),Ce())},Qt=()=>{W(t)},lo=be=>{be.preventDefault(),be.stopPropagation(),Qt(),T(void 0),Te?Xe():i?.(),s?.()},[Qe,jt]=(0,po.useState)(!1),rt=()=>{let{id:be,kind:Rt,type:Vo,...bt}=G;W({...bt,id:void 0,kind:void 0,type:void 0,url:void 0}),jt(!0)};(0,po.useEffect)(()=>{Qe&&(H.current?.focus(),jt(!1))},[Qe]);let He=G?.url!==void 0?G.url:h||"",$o=!He?.trim()?.length;(0,po.useEffect)(()=>{T(void 0)},[He]);let Yn=!B,ze=i&&t&&!te&&!se,co=te&&Te,nt=Te&&v,je=(te||!t)&&!se,wt=$o||!Yn||t&&!Y,So=!!o?.length&&te&&Te,gr=(0,po.useMemo)(()=>t?.kind==="taxonomy"&&!t?.url&&z.current?{...t,url:z.current}:t,[t]);return(0,Mt.jsxs)("div",{tabIndex:-1,ref:V,className:"block-editor-link-control",children:[se&&(0,Mt.jsxs)("div",{className:"block-editor-link-control__loading",children:[(0,Mt.jsx)(un.Spinner,{})," ",(0,da.__)("Creating"),"\u2026"]}),je&&(0,Mt.jsxs)(Mt.Fragment,{children:[(0,Mt.jsxs)("div",{className:D({"block-editor-link-control__search-input-wrapper":!0,"has-text-control":nt,"has-actions":co}),children:[nt&&(0,Mt.jsx)(un.TextControl,{ref:j,className:"block-editor-link-control__field block-editor-link-control__text-content",label:(0,da.__)("Text"),value:G?.title,onChange:le,onKeyDown:Wo,__next40pxDefaultSize:!0}),(0,Mt.jsx)(Tse,{ref:H,currentLink:t,className:"block-editor-link-control__field block-editor-link-control__search-input",placeholder:e,value:He,withCreateSuggestion:m,onCreateSuggestion:q,onChange:re,onSelect:ft,showInitialSuggestions:u,allowDirectEntry:!a,showSuggestions:c,suggestionsQuery:p,withURLSuggestion:!g,createSuggestionButtonText:b,hideLabelFromVision:!nt,isEntity:Q,customValidity:B,suffix:(0,Mt.jsx)(oOe,{isEntity:Q,showActions:co,isDisabled:wt,onUnlink:rt,onSubmit:Ce,helpTextId:ee})}),Q&&ee&&(0,Mt.jsx)("p",{id:ee,className:"block-editor-link-control__help",children:(0,da.sprintf)((0,da.__)("Synced with the selected %s."),G?.type||"item")})]}),pe&&(0,Mt.jsx)(un.Notice,{className:"block-editor-link-control__search-error",status:"error",isDismissible:!1,children:pe})]}),t&&!te&&!se&&(0,Mt.jsx)(Vse,{value:gr,onEditClick:()=>ne(!0),hasRichPreviews:k,hasUnlinkControl:ze,onRemove:()=>{i(),ne(!0)}},gr?.url),So&&(0,Mt.jsx)("div",{className:"block-editor-link-control__tools",children:!$o&&(0,Mt.jsx)(ase,{settingsOpen:P,setSettingsOpen:L,children:(0,Mt.jsx)(jse,{value:G,settings:o,onChange:oe(U)})})}),co&&(0,Mt.jsxs)(un.__experimentalHStack,{justify:"right",className:"block-editor-link-control__search-actions",children:[(0,Mt.jsx)(un.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:lo,children:(0,da.__)("Cancel")}),(0,Mt.jsx)(un.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:wt?YF:Ce,className:"block-editor-link-control__search-submit","aria-disabled":wt,children:(0,da.__)("Apply")})]}),!se&&y&&y()]})}function oOe({isEntity:e,showActions:t,isDisabled:o,onUnlink:r,onSubmit:n,helpTextId:i}){if(e)return(0,Mt.jsx)(un.Button,{icon:Ni,onClick:r,"aria-describedby":i,showTooltip:!0,label:(0,da.__)("Unsync and edit"),__next40pxDefaultSize:!0});if(!t)return(0,Mt.jsx)(un.__experimentalInputControlSuffixWrapper,{variant:"control",children:(0,Mt.jsx)(un.Button,{onClick:o?YF:n,label:(0,da.__)("Submit"),icon:Pl,className:"block-editor-link-control__search-submit","aria-disabled":o,size:"small"})})}Rp.ViewerFill=Ose;Rp.DEFAULT_LINK_SETTINGS=HF;var U2=e=>((0,eae.default)("wp.blockEditor.__experimentalLinkControl",{since:"6.8",alternative:"wp.blockEditor.LinkControl"}),(0,Mt.jsx)(Rp,{...e}));U2.ViewerFill=Rp.ViewerFill;U2.DEFAULT_LINK_SETTINGS=Rp.DEFAULT_LINK_SETTINGS;var tf=Rp;var oae=l(N(),1),rae=l(A(),1),nae=l(Le(),1);var TS=1.5,qF=.01,ZF=10,XF="";function tae(e){return e!==void 0&&e!==XF}var QF=l(w(),1),rOe=({__next40pxDefaultSize:e=!1,value:t,onChange:o,__unstableInputWidth:r="60px",...n})=>{let i=tae(t),s=(d,f)=>{if(i)return d;let m=qF*ZF;switch(`${d}`){case`${m}`:return TS+m;case"0":return f?d:TS-m;case"":return TS;default:return d}},a=(d,f)=>{let m=["insertText","insertFromPaste"].includes(f.payload.event.nativeEvent?.inputType),h=s(d.value,m);return{...d,value:h}},c=i?t:XF,u=(d,{event:f})=>{if(d===""){o();return}if(f.type==="click"){o(s(`${d}`,!1));return}o(`${d}`)};return!e&&(n.size===void 0||n.size==="default")&&(0,nae.default)("36px default size for wp.blockEditor.LineHeightControl",{since:"6.8",version:"7.1",hint:"Set the `__next40pxDefaultSize` prop to true to start opting into the new default size, which will become the default in a future version."}),(0,QF.jsx)("div",{className:"block-editor-line-height-control",children:(0,QF.jsx)(rae.__experimentalNumberControl,{...n,__shouldNotWarnDeprecated36pxSize:!0,__next40pxDefaultSize:e,__unstableInputWidth:r,__unstableStateReducer:a,onChange:u,label:(0,oae.__)("Line height"),placeholder:TS,step:qF,spinFactor:ZF,value:c,min:0,spinControls:"custom"})})},H2=rOe;var rl=l(N(),1),iae=l(sr(),1),dn=l(A(),1),W2=l(F(),1),sae=l(it(),1);var aae=l(X(),1),lae=l(Fe(),1),cae=l(Xn(),1),uae=l(R(),1);function G2(e,t,o){if(o)return o;if(!t||typeof t!="object"||Object.keys(t).length===0)return e&&e.length>0?e.map(n=>`${n}/*`).join(","):void 0;if(!e||e.length===0)return;let r=[];for(let[,n]of Object.entries(t))e.some(s=>s.includes("/")?n===s:n.startsWith(`${s}/`))&&r.push(n);return r.length>0?r.join(","):e.map(n=>`${n}/*`).join(",")}var fr=l(w(),1),nOe=()=>{},iOe=0,sOe=({mediaURL:e,mediaId:t,mediaIds:o,allowedTypes:r,accept:n,onError:i,onSelect:s,onSelectURL:a,onReset:c,onToggleFeaturedImage:u,useFeaturedImage:d,onFilesUpload:f=nOe,name:m=(0,rl.__)("Replace"),createNotice:h,removeNotice:p,children:g,multiple:b=!1,addToGallery:k,handleUpload:v=!0,variant:y,popoverProps:_,renderToggle:S,className:C})=>{let{mediaUpload:B,allowedMimeTypes:T}=(0,W2.useSelect)(U=>{let{getSettings:G}=U(x),W=G();return{mediaUpload:W.mediaUpload,allowedMimeTypes:W.allowedMimeTypes}},[]),I=`block-editor/media-replace-flow/error-notice/${++iOe}`,E=(0,uae.useMemo)(()=>G2(r,T,n),[r,T,n]),L=U=>{let G=(0,lae.__unstableStripHTML)(U);if(i){i(G);return}setTimeout(()=>{h("error",G,{speak:!0,id:I,isDismissible:!0})},1e3)},P=(U,G)=>{d&&u&&u(),G(),s(U),(0,iae.speak)((0,rl.__)("The media file has been replaced")),p(I)},O=(U,G)=>{let W=U.target.files;if(!v)return G(),s(W);f(W),B({allowedTypes:r,filesList:W,onFileChange:([J])=>{P(J,G)},onError:L})},V=U=>{U.keyCode===sae.DOWN&&(U.preventDefault(),U.target.click())},H=b&&(!r||r.length===0?!1:r.every(U=>U==="image"||U.startsWith("image/"))),z={..._,variant:y};return(0,fr.jsx)(dn.Dropdown,{popoverProps:z,className:C,contentClassName:D("block-editor-media-replace-flow__options",y&&`is-variant-${y}`),renderToggle:({isOpen:U,onToggle:G})=>S?S({"aria-expanded":U,"aria-haspopup":"true",onClick:G,onKeyDown:V,children:m}):(0,fr.jsx)(dn.ToolbarButton,{"aria-expanded":U,"aria-haspopup":"true",onClick:G,onKeyDown:V,children:m}),renderContent:({onClose:U})=>(0,fr.jsxs)(fr.Fragment,{children:[(0,fr.jsxs)(dn.NavigableMenu,{className:"block-editor-media-replace-flow__media-upload-menu",children:[(0,fr.jsxs)(Xs,{children:[(0,fr.jsx)(gd,{gallery:H,addToGallery:k,multiple:b,value:b?o:t,onSelect:G=>P(G,U),allowedTypes:r,render:({open:G})=>(0,fr.jsx)(dn.MenuItem,{icon:gh,onClick:G,children:(0,rl.__)("Open Media Library")})}),(0,fr.jsx)(dn.FormFileUpload,{onChange:G=>{O(G,U)},accept:E,multiple:!!b,render:({openFileDialog:G})=>(0,fr.jsx)(dn.MenuItem,{icon:NM,onClick:()=>{G()},children:(0,rl._x)("Upload","verb")})})]}),u&&(0,fr.jsx)(dn.MenuItem,{icon:$N,onClick:u,isPressed:d,children:(0,rl.__)("Use featured image")}),typeof g=="function"?g({onClose:U}):g,e&&c&&(0,fr.jsx)(dn.MenuItem,{onClick:()=>{c(),U()},children:(0,rl.__)("Reset")})]}),a&&(0,fr.jsxs)("form",{className:"block-editor-media-flow__url-input",children:[(0,fr.jsx)("span",{className:"block-editor-media-replace-flow__image-url-label",children:(0,rl.__)("Current media URL:")}),(0,fr.jsx)(tf,{value:{url:e},settings:[],showSuggestions:!1,onChange:({url:G})=>{a(G)},searchInputPlaceholder:(0,rl.__)("Paste or type URL")})]})]})})},Xb=(0,aae.compose)([(0,W2.withDispatch)(e=>{let{createNotice:t,removeNotice:o}=e(cae.store);return{createNotice:t,removeNotice:o}}),(0,dn.withFilters)("editor.MediaReplaceFlow")])(sOe);var Lo=l(A(),1),Ao=l(N(),1),sf=l(R(),1),wae=l(F(),1);var Cae=l(Le(),1);var ez=l(N(),1),K2=l(R(),1),Qb=l(A(),1);var xae=l(Le(),1);var mae=l(N(),1),pae=l(A(),1);var dae=l(A(),1),$2=l(qn(),1),JF=l(w(),1);function fae({url:e,urlLabel:t,className:o}){let r=D(o,"block-editor-url-popover__link-viewer-url");return e?(0,JF.jsx)(dae.ExternalLink,{className:r,href:e,children:t||(0,$2.filterURLForDisplay)((0,$2.safeDecodeURI)(e))}):(0,JF.jsx)("span",{className:r})}var IS=l(w(),1);function hae({className:e,linkClassName:t,onEditLinkClick:o,url:r,urlLabel:n,...i}){return(0,IS.jsxs)("div",{className:D("block-editor-url-popover__link-viewer",e),...i,children:[(0,IS.jsx)(fae,{url:r,urlLabel:n,className:t}),o&&(0,IS.jsx)(pae.Button,{icon:sm,label:(0,mae.__)("Edit"),onClick:o,size:"compact"})]})}var yae=l(N(),1),_ae=l(A(),1);var Nc=l(N(),1),PS=l(R(),1),fa=l(it(),1),Mn=l(A(),1),of=l(X(),1),gae=l(F(),1),bae=l(qn(),1);var nl=l(w(),1),vae=l(Ge(),1),{ValidatedInputControl:aOe}=M(Mn.privateApis);function kae(e){return typeof e=="function"}var lOe=class extends PS.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,PS.createRef)(),this.inputRef=e.inputRef||(0,PS.createRef)(),this.hasRenderedValidation={current:!1},this.updateSuggestions=(0,of.debounce)(this.updateSuggestions.bind(this),200),this.suggestionNodes=[],this.suggestionsRequest=null,this.state={suggestions:[],showSuggestions:!1,suggestionsValue:null,selectedSuggestion:null,suggestionsListboxId:"",suggestionOptionIdPrefix:""}}componentDidUpdate(e){let{showSuggestions:t,selectedSuggestion:o}=this.state,{value:r,__experimentalShowInitialSuggestions:n=!1}=this.props;t&&o!==null&&this.suggestionNodes[o]&&this.suggestionNodes[o].scrollIntoView({behavior:"instant",block:"nearest",inline:"nearest"}),e.value!==r&&!this.props.disableSuggestions&&(r?.length?this.updateSuggestions(r):n&&this.updateSuggestions())}componentDidMount(){this.shouldShowInitialSuggestions()&&this.updateSuggestions()}componentWillUnmount(){this.suggestionsRequest?.cancel?.(),this.suggestionsRequest=null}bindSuggestionNode(e){return t=>{this.suggestionNodes[e]=t}}shouldShowInitialSuggestions(){let{__experimentalShowInitialSuggestions:e=!1,value:t}=this.props;return e&&!(t&&t.length)}updateSuggestions(e=""){let{__experimentalFetchLinkSuggestions:t,__experimentalHandleURLSuggestions:o}=this.props;if(!t)return;let r=!e?.length;if(e=e.trim(),!r&&(e.length<2||!o&&(0,bae.isURL)(e))){this.suggestionsRequest?.cancel?.(),this.suggestionsRequest=null,this.setState({suggestions:[],showSuggestions:!1,suggestionsValue:e,selectedSuggestion:null,loading:!1});return}this.setState({selectedSuggestion:null,loading:!0});let n=t(e,{isInitialSuggestions:r});n.then(i=>{this.suggestionsRequest===n&&(this.setState({suggestions:i,suggestionsValue:e,loading:!1,showSuggestions:!!i.length}),i.length?this.props.debouncedSpeak((0,Nc.sprintf)((0,Nc._n)("%d result found, use up and down arrow keys to navigate.","%d results found, use up and down arrow keys to navigate.",i.length),i.length),"assertive"):this.props.debouncedSpeak((0,Nc.__)("No results."),"assertive"))}).catch(()=>{this.suggestionsRequest===n&&this.setState({loading:!1})}).finally(()=>{this.suggestionsRequest===n&&(this.suggestionsRequest=null)}),this.suggestionsRequest=n}onChange(e){this.props.onChange(e)}onFocus(){let{suggestions:e}=this.state,{disableSuggestions:t,value:o}=this.props;o&&!t&&!(e&&e.length)&&this.suggestionsRequest===null&&this.updateSuggestions(o)}onKeyDown(e){this.props.onKeyDown?.(e);let{showSuggestions:t,selectedSuggestion:o,suggestions:r,loading:n}=this.state;if(!t||!r.length||n){switch(e.keyCode){case fa.UP:{e.target.selectionStart!==0&&(e.preventDefault(),e.target.setSelectionRange(0,0));break}case fa.DOWN:{this.props.value.length!==e.target.selectionStart&&(e.preventDefault(),e.target.setSelectionRange(this.props.value.length,this.props.value.length));break}case fa.ENTER:{this.props.onSubmit&&(e.preventDefault(),this.props.onSubmit(null,e));break}}return}let i=this.state.suggestions[this.state.selectedSuggestion];switch(e.keyCode){case fa.UP:{e.preventDefault();let s=o?o-1:r.length-1;this.setState({selectedSuggestion:s});break}case fa.DOWN:{e.preventDefault();let s=o===null||o===r.length-1?0:o+1;this.setState({selectedSuggestion:s});break}case fa.TAB:{this.state.selectedSuggestion!==null&&(this.selectLink(i),this.props.speak((0,Nc.__)("Link selected.")));break}case fa.ENTER:{e.preventDefault(),this.state.selectedSuggestion!==null?(this.selectLink(i),this.props.onSubmit&&this.props.onSubmit(i,e)):this.props.onSubmit&&this.props.onSubmit(null,e);break}}}selectLink(e){this.props.onChange(e.url,e),this.setState({selectedSuggestion:null,showSuggestions:!1})}handleOnClick(e){this.selectLink(e),this.inputRef.current.focus()}static getDerivedStateFromProps({value:e,instanceId:t,disableSuggestions:o,__experimentalShowInitialSuggestions:r=!1},{showSuggestions:n}){let i=n,s=e&&e.length;return!r&&!s&&(i=!1),o===!0&&(i=!1),{showSuggestions:i,suggestionsListboxId:`block-editor-url-input-suggestions-${t}`,suggestionOptionIdPrefix:`block-editor-url-input-suggestion-${t}`}}render(){return(0,nl.jsxs)(nl.Fragment,{children:[this.renderControl(),this.renderSuggestions()]})}renderControl(){let{label:e=null,className:t,isFullWidth:o,instanceId:r,placeholder:n=(0,Nc.__)("Paste URL or type to search"),__experimentalRenderControl:i,value:s="",hideLabelFromVision:a=!1,help:c=null,disabled:u=!1,customValidity:d,markWhenOptional:f}=this.props,{loading:m,showSuggestions:h,selectedSuggestion:p,suggestionsListboxId:g,suggestionOptionIdPrefix:b}=this.state,k=`url-input-control-${r}`,v={id:k,label:e,className:D("block-editor-url-input",t,{"is-full-width":o}),hideLabelFromVision:a},y={id:k,value:s,required:this.props.required??!0,type:"text",name:k,autoComplete:"off",onChange:u?()=>{}:this.onChange,onFocus:u?()=>{}:this.onFocus,placeholder:n,onKeyDown:u?()=>{}:this.onKeyDown,role:"combobox","aria-label":e?void 0:(0,Nc.__)("URL"),"aria-expanded":h,"aria-autocomplete":"list","aria-owns":g,"aria-activedescendant":p!==null?`${b}-${p}`:void 0,ref:this.inputRef,disabled:u,suffix:this.props.suffix,help:c},_={customValidity:d,...f!==void 0&&{markWhenOptional:f}};if(i)return i(v,y,m);d!==void 0&&(this.hasRenderedValidation.current=!0);let S=this.hasRenderedValidation.current?aOe:Mn.__experimentalInputControl;return(0,nl.jsxs)(Mn.BaseControl,{...v,children:[(0,nl.jsx)(S,{...y,...this.hasRenderedValidation.current?_:{},__next40pxDefaultSize:!0}),m&&(0,nl.jsx)(Mn.Spinner,{})]})}renderSuggestions(){let{className:e,__experimentalRenderSuggestions:t}=this.props,{showSuggestions:o,suggestions:r,suggestionsValue:n,selectedSuggestion:i,suggestionsListboxId:s,suggestionOptionIdPrefix:a,loading:c}=this.state;if(!o||r.length===0)return null;let u={id:s,ref:this.autocompleteRef,role:"listbox"},d=(f,m)=>({role:"option",tabIndex:"-1",id:`${a}-${m}`,ref:this.bindSuggestionNode(m),"aria-selected":m===i?!0:void 0});return kae(t)?t({suggestions:r,selectedSuggestion:i,suggestionsListProps:u,buildSuggestionItemProps:d,isLoading:c,handleSuggestionClick:this.handleOnClick,isInitialSuggestions:!n?.length,currentInputValue:n}):(0,nl.jsx)(Mn.Popover,{placement:"bottom",focusOnMount:!1,children:(0,nl.jsx)("div",{...u,className:D("block-editor-url-input__suggestions",{[`${e}__suggestions`]:e}),children:r.map((f,m)=>(0,vae.createElement)(Mn.Button,{__next40pxDefaultSize:!0,...d(f,m),key:f.id,className:D("block-editor-url-input__suggestion",{"is-selected":m===i}),onClick:()=>this.handleOnClick(f)},f.title))})})}},Jd=(0,of.compose)(of.withSafeTimeout,Mn.withSpokenMessages,of.withInstanceId,(0,gae.withSelect)((e,t)=>{if(kae(t.__experimentalFetchLinkSuggestions))return;let{getSettings:o}=e(x);return{__experimentalFetchLinkSuggestions:o().__experimentalFetchLinkSuggestions}}))(lOe);var RS=l(w(),1);function Sae({autocompleteRef:e,className:t,onChangeInputValue:o,value:r,...n}){return(0,RS.jsxs)("form",{className:D("block-editor-url-popover__link-editor",t),...n,children:[(0,RS.jsx)(Jd,{value:r,onChange:o,autocompleteRef:e}),(0,RS.jsx)(_ae.Button,{icon:Pl,label:(0,yae.__)("Apply"),type:"submit",size:"compact"})]})}var rf=l(w(),1),{__experimentalPopoverLegacyPositionToPlacement:cOe}=M(Qb.privateApis),uOe="bottom",tz=(0,K2.forwardRef)(({additionalControls:e,children:t,renderSettings:o,placement:r,focusOnMount:n="firstElement",position:i,...s},a)=>{i!==void 0&&(0,xae.default)("`position` prop in wp.blockEditor.URLPopover",{since:"6.2",alternative:"`placement` prop"});let c;r!==void 0?c=r:i!==void 0&&(c=cOe(i)),c=c||uOe;let[u,d]=(0,K2.useState)(!1),f=!!o&&u,m=()=>{d(!u)};return(0,rf.jsxs)(Qb.Popover,{ref:a,role:"dialog","aria-modal":"true","aria-label":(0,ez.__)("Edit URL"),className:"block-editor-url-popover",focusOnMount:n,placement:c,shift:!0,variant:"toolbar",...s,children:[(0,rf.jsx)("div",{className:"block-editor-url-popover__input-container",children:(0,rf.jsxs)("div",{className:"block-editor-url-popover__row",children:[t,!!o&&(0,rf.jsx)(Qb.Button,{className:"block-editor-url-popover__settings-toggle",icon:vr,label:(0,ez.__)("Link settings"),onClick:m,"aria-expanded":u,size:"compact"})]})}),f&&(0,rf.jsx)("div",{className:"block-editor-url-popover__settings",children:o()}),e&&!f&&(0,rf.jsx)("div",{className:"block-editor-url-popover__additional-controls",children:e})]})});tz.LinkEditor=Sae;tz.LinkViewer=hae;var nf=tz;var qe=l(w(),1),dOe=()=>{},fOe=({src:e,onChange:t,onSubmit:o,onClose:r,popoverAnchor:n})=>(0,qe.jsx)(nf,{anchor:n,onClose:r,children:(0,qe.jsx)("form",{className:"block-editor-media-placeholder__url-input-form",onSubmit:o,children:(0,qe.jsx)(Lo.__experimentalInputControl,{__next40pxDefaultSize:!0,label:(0,Ao.__)("URL"),type:"text",hideLabelFromVision:!0,placeholder:(0,Ao.__)("Paste or type URL"),onChange:t,value:e,suffix:(0,qe.jsx)(Lo.__experimentalInputControlSuffixWrapper,{variant:"control",children:(0,qe.jsx)(Lo.Button,{size:"small",icon:Pl,label:(0,Ao.__)("Apply"),type:"submit"})})})})}),mOe=({src:e,onChangeSrc:t,onSelectURL:o})=>{let[r,n]=(0,sf.useState)(null),[i,s]=(0,sf.useState)(!1),a=()=>{s(!0)},c=()=>{s(!1),r?.focus()},u=d=>{d.preventDefault(),e&&o&&(o(e),c())};return(0,qe.jsxs)("div",{className:"block-editor-media-placeholder__url-input-container",children:[(0,qe.jsx)(Lo.Button,{__next40pxDefaultSize:!0,className:"block-editor-media-placeholder__button",onClick:a,isPressed:i,variant:"secondary","aria-haspopup":"dialog",ref:n,children:(0,Ao.__)("Insert from URL")}),i&&(0,qe.jsx)(fOe,{src:e,onChange:t,onSubmit:u,onClose:c,popoverAnchor:r})]})};function pOe({value:e={},allowedTypes:t,className:o,icon:r,labels:n={},mediaPreview:i,notices:s,isAppender:a,accept:c,addToGallery:u,multiple:d=!1,handleUpload:f=!0,disableDropZone:m,disableMediaButtons:h,onError:p,onSelect:g,onCancel:b,onSelectURL:k,onToggleFeaturedImage:v,onDoubleClick:y,onFilesPreUpload:_=dOe,onHTMLDrop:S,children:C,mediaLibraryButton:B,placeholder:T,style:I}){S&&(0,Cae.default)("wp.blockEditor.MediaPlaceholder onHTMLDrop prop",{since:"6.2",version:"6.4"});let{mediaUpload:E,allowedMimeTypes:L}=(0,wae.useSelect)($=>{let{getSettings:ee}=$(x),Y=ee();return{mediaUpload:Y.mediaUpload,allowedMimeTypes:Y.allowedMimeTypes}},[]),[P,O]=(0,sf.useState)("");(0,sf.useEffect)(()=>{O(e?.src??"")},[e?.src]);let V=(0,sf.useMemo)(()=>G2(t,L,c),[t,L,c]),j=()=>!t||t.length===0?!1:t.every($=>$==="image"||$.startsWith("image/")),H=$=>{if(!f||typeof f=="function"&&!f($))return g($);_($);let ee;if(d)if(u){let Y=[];ee=te=>{let ne=(e??[]).filter(q=>q.id?!Y.some(({id:se})=>Number(se)===Number(q.id)):!Y.some(({urlSlug:se})=>q.url.includes(se)));g(ne.concat(te)),Y=te.map(q=>{let se=q.url.lastIndexOf("."),pe=q.url.slice(0,se);return{id:q.id,urlSlug:pe}})}}else ee=g;else ee=([Y])=>g(Y);E({allowedTypes:t,filesList:$,onFileChange:ee,onError:p,multiple:d})};async function z($){let{blocks:ee}=j3($);if(!ee?.length)return;let Y=await Promise.all(ee.map(te=>{let ne=te.name.split("/")[1];return te.attributes.id?(te.attributes.type=ne,te.attributes):new Promise((q,se)=>{window.fetch(te.attributes.url).then(pe=>pe.blob()).then(pe=>E({filesList:[pe],additionalData:{title:te.attributes.title,alt_text:te.attributes.alt,caption:te.attributes.caption,type:ne},onFileChange:([xe])=>{xe.id&&q(xe)},allowedTypes:t,onError:se})).catch(()=>q(te.attributes.url))})})).catch(te=>p(te));Y?.length&&g(d?Y:Y[0])}let U=$=>{H($.target.files)},W=T??($=>{let{instructions:ee,title:Y}=n;if(!E&&!k&&(ee=(0,Ao.__)("To edit this block, you need permission to upload media.")),ee===void 0||Y===void 0){let ne=t??[],[q]=ne,se=ne.length===1,pe=se&&q==="audio",xe=se&&q==="image",Te=se&&q==="video";ee===void 0&&E&&(ee=(0,Ao.__)("Drag and drop an image or video, upload, or choose from your library."),pe?ee=(0,Ao.__)("Drag and drop an audio file, upload, or choose from your library."):xe?ee=(0,Ao.__)("Drag and drop an image, upload, or choose from your library."):Te&&(ee=(0,Ao.__)("Drag and drop a video, upload, or choose from your library."))),Y===void 0&&(Y=(0,Ao.__)("Media"),pe?Y=(0,Ao.__)("Audio"):xe?Y=(0,Ao.__)("Image"):Te&&(Y=(0,Ao.__)("Video")))}let te=D("block-editor-media-placeholder",o,{"is-appender":a});return(0,qe.jsxs)(Lo.Placeholder,{icon:r,label:Y,instructions:ee,className:te,notices:s,onDoubleClick:y,preview:i,style:I,children:[$,C]})}),J=()=>m?null:(0,qe.jsx)(Lo.DropZone,{onFilesDrop:H,onDrop:z,isEligible:$=>{let ee="wp-block:core/",Y=[];for(let te of $.types)te.startsWith(ee)&&Y.push(te.slice(ee.length));return Y.every(te=>t.includes(te))&&(d?!0:Y.length===1)}}),le=()=>b&&(0,qe.jsx)(Lo.Button,{__next40pxDefaultSize:!0,className:"block-editor-media-placeholder__cancel-button",title:(0,Ao.__)("Cancel"),variant:"link",onClick:b,children:(0,Ao.__)("Cancel")}),oe=()=>k&&(0,qe.jsx)(mOe,{src:P,onChangeSrc:O,onSelectURL:k}),re=()=>v&&(0,qe.jsx)("div",{className:"block-editor-media-placeholder__url-input-container",children:(0,qe.jsx)(Lo.Button,{__next40pxDefaultSize:!0,className:"block-editor-media-placeholder__button",onClick:v,variant:"secondary",children:(0,Ao.__)("Use featured image")})}),Q=()=>{let ee=B??(({open:te})=>(0,qe.jsx)(Lo.Button,{__next40pxDefaultSize:!0,variant:"secondary",onClick:()=>{te()},children:(0,Ao.__)("Media Library")})),Y=(0,qe.jsx)(gd,{addToGallery:u,gallery:d&&j(),multiple:d,onSelect:g,allowedTypes:t,mode:"browse",value:Array.isArray(e)?e.map(({id:te})=>te):e.id,render:ee});if(E&&a)return(0,qe.jsxs)(qe.Fragment,{children:[J(),(0,qe.jsx)(Lo.FormFileUpload,{onChange:U,accept:V,multiple:!!d,render:({openFileDialog:te})=>{let ne=(0,qe.jsxs)(qe.Fragment,{children:[(0,qe.jsx)(Lo.Button,{__next40pxDefaultSize:!0,variant:"primary",className:D("block-editor-media-placeholder__button","block-editor-media-placeholder__upload-button"),onClick:te,children:(0,Ao._x)("Upload","verb")}),Y,oe(),re(),le()]});return W(ne)}})]});if(E){let te=(0,qe.jsxs)(qe.Fragment,{children:[J(),(0,qe.jsx)(Lo.FormFileUpload,{render:({openFileDialog:ne})=>(0,qe.jsx)(Lo.Button,{__next40pxDefaultSize:!0,onClick:ne,variant:"primary",className:D("block-editor-media-placeholder__button","block-editor-media-placeholder__upload-button"),children:(0,Ao._x)("Upload","verb")}),onChange:U,accept:V,multiple:!!d}),Y,oe(),re(),le()]});return W(te)}return W(Y)};return h?(0,qe.jsx)(Xs,{children:J()}):(0,qe.jsx)(Xs,{fallback:W(oe()),children:Q()})}var Bae=(0,Lo.withFilters)("editor.MediaPlaceholder")(pOe);var Eae=l(w(),1),hOe=({colorSettings:e,...t})=>{let o=e.map(r=>{if(!r)return r;let{value:n,onChange:i,...s}=r;return{...s,colorValue:n,onColorChange:i}});return(0,Eae.jsx)(h2,{settings:o,gradients:[],disableCustomGradients:!0,...t})},Tae=hOe;var wle=l(D5(),1);var Cle=l(R(),1);var _le=l(R(),1);var hle=l(Kf(),1),mr=l(R(),1),lf=l(F(),1),lP=l(X(),1),gle=l(yr(),1),ble=l(A(),1),vle=l(K(),1),kle=l(Le(),1),lv=l(N(),1);var Iae=l(N(),1),Y2=l(A(),1);var oz=l(N(),1),Op=l(A(),1);var Mc=l(w(),1),gOe={placement:"bottom-start"},bOe=()=>(0,Mc.jsxs)(Mc.Fragment,{children:[["bold","italic","link","unknown"].map(e=>(0,Mc.jsx)(Op.Slot,{name:`RichText.ToolbarControls.${e}`},e)),(0,Mc.jsx)(Op.Slot,{name:"RichText.ToolbarControls",children:e=>{if(!e.length)return null;let o=e.map(([{props:r}])=>r).some(({isActive:r})=>r);return(0,Mc.jsx)(Op.ToolbarItem,{children:r=>(0,Mc.jsx)(Op.DropdownMenu,{icon:vr,label:(0,oz.__)("More"),toggleProps:{...r,className:D(r.className,{"is-pressed":o}),description:(0,oz.__)("Displays more block tools")},controls:Ea(e.map(([{props:n}])=>n),"title"),popoverProps:gOe})})}})]}),rz=bOe;var af=l(w(),1);function vOe({popoverAnchor:e}){return(0,af.jsx)(Y2.Popover,{placement:"top",focusOnMount:!1,anchor:e,className:"block-editor-rich-text__inline-format-toolbar",__unstableSlotName:"block-toolbar",children:(0,af.jsx)(ab,{className:"block-editor-rich-text__inline-format-toolbar-group","aria-label":(0,Iae.__)("Format tools"),children:(0,af.jsx)(Y2.ToolbarGroup,{children:(0,af.jsx)(rz,{})})})})}var kOe=({inline:e,editableContentElement:t})=>e?(0,af.jsx)(vOe,{popoverAnchor:t}):(0,af.jsx)(Wt,{group:"inline",children:(0,af.jsx)(rz,{})}),Pae=kOe;var q2=l(R(),1),Rae=l(F(),1);function Oae({html:e,value:t}){let o=(0,q2.useRef)(),r=!!t.activeFormats?.length,{__unstableMarkLastChangeAsPersistent:n}=(0,Rae.useDispatch)(x);(0,q2.useLayoutEffect)(()=>{if(!o.current){o.current=t.text;return}if(o.current!==t.text){let i=window.setTimeout(()=>{n()},1e3);return o.current=t.text,()=>{window.clearTimeout(i)}}n()},[e,r])}var tv=l(R(),1),Xae=l(X(),1);var OS=l(yr(),1),Aae=l(vt(),1);var yOe=["`",'"',"'","\u201C\u201D","\u2018\u2019"],Lae=e=>t=>{function o(r){let{inputType:n,data:i}=r,{value:s,onChange:a,registry:c}=e.current;if(n!=="insertText"||(0,OS.isCollapsed)(s))return;let u=(0,Aae.applyFilters)("blockEditor.wrapSelectionSettings",yOe).find(([S,C])=>S===i||C===i);if(!u)return;let[d,f=d]=u,m=s.start,h=s.end+d.length,p=(0,OS.insert)(s,d,m,m);p=(0,OS.insert)(p,f,h,h);let{__unstableMarkLastChangeAsPersistent:g,__unstableMarkAutomaticChange:b}=c.dispatch(x);g(),a(p),b();let k={};for(let S in r)k[S]=r[S];k.data=f;let{ownerDocument:v}=t,{defaultView:y}=v,_=new y.InputEvent("input",k);window.queueMicrotask(()=>{r.target.dispatchEvent(_)}),r.preventDefault()}return t.addEventListener("beforeinput",o),()=>{t.removeEventListener("beforeinput",o)}};var Z2=l(yr(),1),Jb=l(K(),1);var Nae=l(yr(),1);function Mae(e){let t="tales of gutenberg",o=" \u{1F421}\u{1F422}\u{1F980}\u{1F424}\u{1F98B}\u{1F418}\u{1F427}\u{1F439}\u{1F981}\u{1F984}\u{1F98D}\u{1F43C}\u{1F43F}\u{1F383}\u{1F434}\u{1F41D}\u{1F406}\u{1F995}\u{1F994}\u{1F331}\u{1F347}\u03C0\u{1F34C}\u{1F409}\u{1F4A7}\u{1F968}\u{1F30C}\u{1F342}\u{1F360}\u{1F966}\u{1F95A}\u{1F95D}\u{1F39F}\u{1F965}\u{1F952}\u{1F6F5}\u{1F956}\u{1F352}\u{1F36F}\u{1F3BE}\u{1F3B2}\u{1F43A}\u{1F41A}\u{1F42E}\u231B\uFE0F",{start:r,text:n}=e;return r<t.length||n.slice(r-t.length,r).toLowerCase()!==t?e:(0,Nae.insert)(e,o)}function Dae(e){let t=e.length;for(;t--;){let o=iy(e[t].attributes);if(o)return e[t].attributes[o]=e[t].attributes[o].toString().replace(Ml,""),[e[t].clientId,o,0,0];let r=Dae(e[t].innerBlocks);if(r)return r}return[]}var Vae=e=>t=>{function o(){let{getValue:n,onReplace:i,selectionChange:s,registry:a}=e.current;if(!i)return;let c=n(),{start:u,text:d}=c;if(d.slice(u-1,u)!==" ")return;let m=d.slice(0,u).trim(),h=(0,Jb.getBlockTransforms)("from").filter(({type:k})=>k==="prefix"),p=(0,Jb.findTransform)(h,({prefix:k})=>m===k);if(!p)return;let g=(0,Z2.toHTMLString)({value:(0,Z2.insert)(c,Ml,0,u)}),b=p.transform(g);return s(...Dae([b])),i([b]),a.dispatch(x).__unstableMarkAutomaticChange(),!0}function r(n){let{inputType:i,type:s}=n,{getValue:a,onChange:c,__unstableAllowPrefixTransformations:u,formatTypes:d,registry:f,onReplace:m}=e.current;if(i!=="insertText"&&s!=="compositionend"||u&&o())return;let h=a(),p=(0,Jb.getBlockTransforms)("from").filter(y=>y.type==="input"),g=(0,Jb.findTransform)(p,y=>y.regExp.test(h.text));if(g){m(g.transform()),f.dispatch(x).__unstableMarkAutomaticChange();return}let b=d.reduce((y,{__unstableInputRule:_})=>(_&&(y=_(y)),y),Mae(h)),{__unstableMarkLastChangeAsPersistent:k,__unstableMarkAutomaticChange:v}=f.dispatch(x);b!==h&&(k(),c({...b,activeFormats:h.activeFormats}),v())}return t.addEventListener("input",r),t.addEventListener("compositionend",r),()=>{t.removeEventListener("input",r),t.removeEventListener("compositionend",r)}};var Fae=e=>t=>{function o(r){if(r.inputType!=="insertReplacementText")return;let{registry:n}=e.current;n.dispatch(x).__unstableMarkLastChangeAsPersistent()}return t.addEventListener("beforeinput",o),()=>{t.removeEventListener("beforeinput",o)}};var X2=l(it(),1),zae=()=>e=>{function t(o){(X2.isKeyboardEvent.primary(o,"z")||X2.isKeyboardEvent.primary(o,"y")||X2.isKeyboardEvent.primaryShift(o,"z"))&&o.preventDefault()}return e.addEventListener("keydown",t),()=>{e.removeEventListener("keydown",t)}};var jae=e=>t=>{let{keyboardShortcuts:o}=e.current;function r(n){for(let i of o.current)i(n)}return t.addEventListener("keydown",r),()=>{t.removeEventListener("keydown",r)}};var Uae=e=>t=>{let{inputEvents:o}=e.current;function r(n){for(let i of o.current)i(n)}return t.addEventListener("input",r),()=>{t.removeEventListener("input",r)}};var Q2=l(it(),1);var Hae=e=>t=>{function o(r){let{keyCode:n}=r;if(r.defaultPrevented||n!==Q2.BACKSPACE&&n!==Q2.ESCAPE)return;let{registry:i}=e.current,{didAutomaticChange:s,getSettings:a}=i.select(x),{__experimentalUndo:c}=a();c&&s()&&(r.preventDefault(),c())}return t.addEventListener("keydown",o),()=>{t.removeEventListener("keydown",o)}};var Wae=l(K(),1),il=l(yr(),1),$ae=l(qn(),1);var _Oe=l(R(),1),SOe=l(K(),1),xOe=l(w(),1);function Gae(e,t){if(t?.length){let o=e.formats.length;for(;o--;)e.formats[o]=[...t,...e.formats[o]||[]]}}function J2(e){if(!(e!==!0&&e!=="p"&&e!=="li"))return e===!0?"p":e}function ev({allowedFormats:e,disableFormats:t}){return t?ev.EMPTY_ARRAY:e}ev.EMPTY_ARRAY=[];var Kae=e=>t=>{function o(n){let{disableFormats:i,onChange:s,value:a,formatTypes:c,tagName:u,onReplace:d,__unstableEmbedURLOnPaste:f,preserveWhiteSpace:m,pastePlainText:h,registry:p}=e.current;if(!t.contains(n.target)||n.defaultPrevented)return;let{plainText:g,html:b}=pg(n);if(n.preventDefault(),window.console.log(`Received HTML (RichText): |
| 170 |
|
| 171 |
`,b),window.console.log(`Received plain text (RichText): |
| 172 |
|
| 173 |
`,g),i){s((0,il.insert)(a,g));return}let k=n.clipboardData.getData("rich-text")==="true";function v(C){let B=c.reduce((T,{__unstablePasteRule:I})=>(I&&T===a&&(T=I(a,{html:b,plainText:g})),T),a);if(B!==a)s(B);else{let T=(0,il.create)({html:C});Gae(T,a.activeFormats),s((0,il.insert)(a,T))}}if(k){v(b);return}if(h){s((0,il.insert)(a,(0,il.create)({text:g})));return}let y="INLINE",_=g.trim();f&&(0,il.isEmpty)(a)&&(0,$ae.isURL)(_)&&/^https?:/.test(_)&&(y="BLOCKS");let S=(0,Wae.pasteHandler)({HTML:b,plainText:g,mode:y,tagName:u,preserveWhiteSpace:m});if(typeof S=="string"){v(S);return}!S.length||!d||!(0,il.isEmpty)(a)||(y==="BLOCKS"&&(v(b),p.dispatch(x).__unstableMarkLastChangeAsPersistent()),d(S,S.length-1,-1))}let{defaultView:r}=t.ownerDocument;return r.addEventListener("paste",o),()=>{r.removeEventListener("paste",o)}};var AS=l(it(),1),eP=l(yr(),1),Yae=e=>t=>{function o(r){let{keyCode:n}=r;if(r.defaultPrevented)return;let{value:i,onMerge:s,onRemove:a}=e.current;if(n===AS.DELETE||n===AS.BACKSPACE){let{start:c,end:u,text:d}=i,f=n===AS.BACKSPACE,m=i.activeFormats&&!!i.activeFormats.length;if(!(0,eP.isCollapsed)(i)||m||f&&c!==0||!f&&u!==d.length)return;s?s(!f):a&&(0,eP.isEmpty)(i)&&f&&a(!f),r.preventDefault()}}return t.addEventListener("keydown",o),()=>{t.removeEventListener("keydown",o)}};var nz=l(it(),1),LS=l(yr(),1),qae=e=>t=>{function o(i){if(i.keyCode!==nz.ENTER)return;let{onReplace:s,onSplit:a}=e.current;s&&a&&(i.__deprecatedOnSplit=!0)}function r(i){if(i.defaultPrevented||i.target!==t||i.keyCode!==nz.ENTER)return;let{value:s,onChange:a,disableLineBreaks:c,onSplitAtEnd:u,onSplitAtDoubleLineEnd:d,registry:f}=e.current;i.preventDefault();let{text:m,start:h,end:p}=s;i.shiftKey?c||a((0,LS.insert)(s,` |
| 174 |
`)):u&&h===p&&p===m.length?u():d&&h===p&&p===m.length&&m.slice(-2)===` |
| 175 |
|
| 176 |
`?f.batch(()=>{let g={...s};g.start=g.end-2,a((0,LS.remove)(g)),d()}):c||a((0,LS.insert)(s,` |
| 177 |
`))}let{defaultView:n}=t.ownerDocument;return n.addEventListener("keydown",r),t.addEventListener("keydown",o),()=>{n.removeEventListener("keydown",r),t.removeEventListener("keydown",o)}};var Zae=e=>t=>{function o(){let{registry:r}=e.current;if(!r.select(x).isMultiSelecting())return;let n=t.parentElement.closest('[contenteditable="true"]');n&&n.focus()}return t.addEventListener("focus",o),()=>{t.removeEventListener("focus",o)}};var wOe=[Lae,Vae,Fae,zae,jae,Uae,Hae,Kae,Yae,qae,Zae];function tP(e){let t=(0,tv.useRef)(e);(0,tv.useInsertionEffect)(()=>{t.current=e});let o=(0,tv.useMemo)(()=>wOe.map(r=>r(t)),[t]);return(0,Xae.useRefEffect)(r=>{if(!e.isSelected)return;let n=o.map(i=>i(r));return()=>{n.forEach(i=>i())}},[o,e.isSelected])}var oP=l(yr(),1),rP=l(R(),1);var Qae=l(w(),1),Jae=l(Ge(),1),COe={},iz=Symbol("usesContext");function BOe({onChange:e,onFocus:t,value:o,forwardedRef:r,settings:n,isVisible:i}){let{name:s,edit:a,[iz]:c}=n,u=(0,rP.useContext)(Or),d=(0,rP.useMemo)(()=>c?Object.fromEntries(Object.entries(u).filter(([g])=>c.includes(g))):COe,[c,u]);if(!a)return null;let f=(0,oP.getActiveFormat)(o,s),m=f!==void 0,h=(0,oP.getActiveObject)(o),p=h!==void 0&&h.type===s;return(0,Qae.jsx)(a,{isActive:m,isVisible:i,activeAttributes:m?f.attributes||{}:{},isObjectActive:p,activeObjectAttributes:p?h.attributes||{}:{},value:o,onChange:e,onFocus:t,contentRef:r,context:d},s)}function nP({formatTypes:e,...t}){return e.map(o=>(0,Jae.createElement)(BOe,{settings:o,...t,key:o.name}))}var ele=l(R(),1),tle=l(K(),1),ole=l(Le(),1);var sz=l(w(),1);function az(e,t){if(ov.isEmpty(e)){let o=J2(t);return o?`<${o}></${o}>`:""}return Array.isArray(e)?((0,ole.default)("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/"}),tle.children.toHTML(e)):typeof e=="string"?e:e.toHTMLString()}function NS({value:e,tagName:t,multiline:o,format:r,...n}){return e=(0,sz.jsx)(ele.RawHTML,{children:az(e,o)}),t?(0,sz.jsx)(t,{...n,children:e}):e}var ale=l(R(),1),cz=l(K(),1),lle=l(yr(),1),cle=l(Le(),1);var rle=l(R(),1),nle=l(Le(),1),iP=l(F(),1),ile=l(it(),1),rv=l(yr(),1);var lz=l(w(),1);function EOe({children:e,identifier:t,tagName:o="div",value:r="",onChange:n,multiline:i,...s},a){(0,nle.default)("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/"});let{clientId:c}=Ae(),{getSelectionStart:u,getSelectionEnd:d}=(0,iP.useSelect)(x),{selectionChange:f}=(0,iP.useDispatch)(x),m=J2(i);r=r||`<${m}></${m}>`;let p=`</${m}>${r}<${m}>`.split(`</${m}><${m}>`);p.shift(),p.pop();function g(b){n(`<${m}>${b.join(`</${m}><${m}>`)}</${m}>`)}return(0,lz.jsx)(o,{ref:a,children:p.map((b,k)=>(0,lz.jsx)(sP,{identifier:`${t}-${k}`,tagName:m,value:b,onChange:v=>{let y=p.slice();y[k]=v,g(y)},isSelected:void 0,onKeyDown:v=>{if(v.keyCode!==ile.ENTER)return;v.preventDefault();let{offset:y}=u(),{offset:_}=d();if(typeof y!="number"||typeof _!="number")return;let S=(0,rv.create)({html:b});S.start=y,S.end=_;let C=(0,rv.split)(S).map(T=>(0,rv.toHTMLString)({value:T})),B=p.slice();B.splice(k,1,...C),g(B),f(c,`${t}-${k+1}`,0,0)},onMerge:v=>{let y=p.slice(),_=0;if(v){if(!y[k+1])return;y.splice(k,2,y[k]+y[k+1]),_=y[k].length-1}else{if(!y[k-1])return;y.splice(k-1,2,y[k-1]+y[k]),_=y[k-1].length-1}g(y),f(c,`${t}-${k-(v?0:1)}`,_,_)},...s},k))})}var sle=(0,rle.forwardRef)(EOe);var ule=l(w(),1);function dle(e){return(0,ale.forwardRef)((t,o)=>{let r=t.value,n=t.onChange;Array.isArray(r)&&((0,cle.default)("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/"}),r=cz.children.toHTML(t.value),n=s=>t.onChange(cz.children.fromDOM((0,lle.__unstableCreateElement)(document,s).childNodes)));let i=t.multiline?sle:e;return(0,ule.jsx)(i,{...t,value:r,onChange:n,ref:o})})}var fle=l(it(),1),nv=l(R(),1);function uz({character:e,type:t,onUse:o}){let r=(0,nv.useContext)(iv),n=(0,nv.useRef)();return n.current=o,(0,nv.useEffect)(()=>{function i(s){fle.isKeyboardEvent[t](s,e)&&(n.current(),s.preventDefault())}return r.current.add(i),()=>{r.current.delete(i)}},[e,t]),null}var aP=l(A(),1),mle=l(it(),1),dz=l(w(),1);function fz({name:e,shortcutType:t,shortcutCharacter:o,...r}){let n,i="RichText.ToolbarControls";return e&&(i+=`.${e}`),t&&o&&(n=mle.displayShortcut[t](o)),(0,dz.jsx)(aP.Fill,{name:i,children:(0,dz.jsx)(aP.ToolbarButton,{...r,shortcut:n})})}var sv=l(R(),1);function mz({inputType:e,onInput:t}){let o=(0,sv.useContext)(av),r=(0,sv.useRef)();return r.current=t,(0,sv.useEffect)(()=>{function n(i){i.inputType===e&&(r.current(),i.preventDefault())}return o.current.add(n),()=>{o.current.delete(n)}},[e]),null}var ki=l(w(),1),{useRichText:TOe}=M(gle.privateApis),iv=(0,mr.createContext)();iv.displayName="keyboardShortcutContext";var av=(0,mr.createContext)();av.displayName="inputEventContext";var ple=Symbol("instanceId");function yle(e){let{__unstableMobileNoFocusOnMount:t,deleteEnter:o,placeholderTextColor:r,textAlign:n,selectionColor:i,tagsToEliminate:s,disableEditingMenu:a,fontSize:c,fontFamily:u,fontWeight:d,fontStyle:f,minWidth:m,maxWidth:h,disableSuggestions:p,disableAutocorrection:g,...b}=e;return b}function sP({children:e,tagName:t="div",value:o="",onChange:r,isSelected:n,multiline:i,inlineToolbar:s,wrapperClassName:a,autocompleters:c,onReplace:u,placeholder:d,allowedFormats:f,withoutInteractiveFormatting:m,onRemove:h,onMerge:p,onSplit:g,__unstableOnSplitAtEnd:b,__unstableOnSplitAtDoubleLineEnd:k,identifier:v,preserveWhiteSpace:y,__unstablePastePlainText:_,__unstableEmbedURLOnPaste:S,__unstableDisableFormats:C,disableLineBreaks:B,__unstableAllowPrefixTransformations:T,readOnly:I,...E},L){E=yle(E),g&&(0,kle.default)("wp.blockEditor.RichText onSplit prop",{since:"6.4",alternative:'block.json support key: "splitting"'});let P=(0,lP.useInstanceId)(sP),O=(0,mr.useRef)(),[V,j]=(0,mr.useState)(null),H=Ae(),{clientId:z,isSelected:U,name:G}=H,W=H[sh],J=(0,mr.useContext)(Or),le=(0,lf.useRegistry)(),oe=ze=>{if(!U)return{isSelected:!1};let{getSelectionStart:co,getSelectionEnd:nt}=ze(x),je=co(),wt=nt(),So;return n===void 0?So=je.clientId===z&&wt.clientId===z&&(v?je.attributeKey===v:je[ple]===P):n&&(So=je.clientId===z),{selectionStart:So?je.offset:void 0,selectionEnd:So?wt.offset:void 0,isSelected:So}},{selectionStart:re,selectionEnd:Q,isSelected:$}=(0,lf.useSelect)(oe,[z,v,P,n,U]),{disableBoundBlock:ee,bindingsPlaceholder:Y,bindingsLabel:te}=(0,lf.useSelect)(ze=>{if(!W?.[v])return{};let{__experimentalBlockBindingsSupportedAttributes:co}=ze(x).getSettings();if(!co?.[G])return{};let je=W[v],wt=(0,vle.getBlockBindingsSource)(je.source),So={};if(wt?.usesContext?.length)for(let Ct of wt.usesContext)So[Ct]=J[Ct];let gr=!wt?.canUserEditValue?.({select:ze,context:So,args:je.args});if(o.length>0)return{disableBoundBlock:gr,bindingsPlaceholder:null,bindingsLabel:null};let{getBlockAttributes:be}=ze(x),Rt=be(z),Vo=null;wt?.getFieldsList&&(Vo=wt.getFieldsList({select:ze,context:So})?.find(Sa=>(0,hle.default)(Sa.args,je?.args))?.label);let bt=Vo??wt?.label,ge=gr?bt:(0,lv.sprintf)((0,lv.__)("Add %s"),bt),Ut=gr?je?.args?.key||wt?.label:(0,lv.sprintf)((0,lv.__)("Empty %s; start writing to edit its value"),je?.args?.key||wt?.label);return{disableBoundBlock:gr,bindingsPlaceholder:Rt?.placeholder||ge,bindingsLabel:Ut}},[W,v,G,o,z,J]),ne=!!J?.["pattern/overrides"],q=W?.__default?.source==="core/pattern-overrides",pe=I||ee||ne&&!q,{getSelectionStart:xe,getSelectionEnd:Te,getBlockRootClientId:Xe}=(0,lf.useSelect)(x),{selectionChange:dt}=(0,lf.useDispatch)(x),ft=ev({allowedFormats:f,disableFormats:C}),we=!ft||ft.length>0,ot=(0,mr.useCallback)((ze,co)=>{let nt={},je=ze===void 0&&co===void 0,wt={clientId:z,[v?"attributeKey":ple]:v||P};if(typeof ze=="number"||je){if(co===void 0&&Xe(z)!==Xe(Te().clientId))return;nt.start={...wt,offset:ze}}if(typeof co=="number"||je){if(ze===void 0&&Xe(z)!==Xe(xe().clientId))return;nt.end={...wt,offset:co}}dt(nt)},[z,Xe,Te,xe,v,P,dt]),{value:Ce,getValue:Wo,onChange:Qt,ref:lo,formatTypes:Qe}=TOe({value:o,onChange:r,selectionStart:re,selectionEnd:Q,onSelectionChange:ot,placeholder:Y||d,__unstableIsSelected:$,__unstableDisableFormats:C,preserveWhiteSpace:y,__unstableDependencies:[t],allowedFormats:ft,withoutInteractiveFormatting:m,__unstableFormatTypeHandlerContext:(0,mr.useMemo)(()=>({richTextIdentifier:v,blockClientId:z}),[v,z])}),jt=y7({onReplace:u,completers:c,record:Ce,onChange:Qt});Oae({html:o,value:Ce});let rt=(0,mr.useRef)(new Set),He=(0,mr.useRef)(new Set);function $o(){O.current?.focus()}let Yn=t;return(0,ki.jsxs)(ki.Fragment,{children:[$&&(0,ki.jsx)(iv.Provider,{value:rt,children:(0,ki.jsx)(av.Provider,{value:He,children:(0,ki.jsxs)(ble.Popover.__unstableSlotNameProvider,{value:"__unstable-block-tools-after",children:[e&&e({value:Ce,onChange:Qt,onFocus:$o}),(0,ki.jsx)(nP,{value:Ce,onChange:Qt,onFocus:$o,formatTypes:Qe,forwardedRef:O})]})})}),$&&we&&(0,ki.jsx)(Pae,{inline:s,editableContentElement:V}),(0,ki.jsx)(Yn,{role:"textbox","aria-multiline":!B,"aria-readonly":pe,...E,draggable:void 0,"aria-label":te||E["aria-label"]||d,...jt,ref:(0,lP.useMergeRefs)([lo,L,jt.ref,E.ref,tP({registry:le,getValue:Wo,onChange:Qt,__unstableAllowPrefixTransformations:T,formatTypes:Qe,onReplace:u,selectionChange:dt,isSelected:$,disableFormats:C,value:Ce,tagName:t,onSplit:g,__unstableEmbedURLOnPaste:S,pastePlainText:_,onMerge:p,onRemove:h,disableLineBreaks:B,onSplitAtEnd:b,onSplitAtDoubleLineEnd:k,keyboardShortcuts:rt,inputEvents:He}),O,j]),contentEditable:!pe,suppressContentEditableWarning:!0,className:D("block-editor-rich-text__editable",E.className,"rich-text"),tabIndex:E.tabIndex===0&&!pe?null:E.tabIndex,"data-wp-block-attribute-key":v})]})}var MS=dle((0,mr.forwardRef)(sP));MS.Content=NS;MS.isEmpty=e=>!e||e.length===0;var pz=(0,mr.forwardRef)((e,t)=>{if(Ae()[G0]){let{children:n,tagName:i="div",value:s,onChange:a,isSelected:c,multiline:u,inlineToolbar:d,wrapperClassName:f,autocompleters:m,onReplace:h,placeholder:p,allowedFormats:g,withoutInteractiveFormatting:b,onRemove:k,onMerge:v,onSplit:y,__unstableOnSplitAtEnd:_,__unstableOnSplitAtDoubleLineEnd:S,identifier:C,preserveWhiteSpace:B,__unstablePastePlainText:T,__unstableEmbedURLOnPaste:I,__unstableDisableFormats:E,disableLineBreaks:L,__unstableAllowPrefixTransformations:P,readOnly:O,...V}=yle(e);return(0,ki.jsx)(i,{ref:t,...V,dangerouslySetInnerHTML:{__html:az(s,u)||"<br>"}})}return(0,ki.jsx)(MS,{ref:t,...e,readOnly:!1})});pz.Content=NS;pz.isEmpty=e=>!e||e.length===0;var ov=pz;var hz=l(w(),1),Sle=(0,_le.forwardRef)((e,t)=>(0,hz.jsx)(ov,{ref:t,...e,__unstableDisableFormats:!0}));Sle.Content=function({value:t="",tagName:o="div",...r}){return(0,hz.jsx)(o,{...r,children:t})};var xle=Sle;var gz=l(w(),1),IOe=(0,Cle.forwardRef)(({__experimentalVersion:e,...t},o)=>{if(e===2)return(0,gz.jsx)(xle,{ref:o,...t});let{className:r,onChange:n,...i}=t;return(0,gz.jsx)(wle.default,{ref:o,className:D("block-editor-plain-text",r),onChange:s=>n(s.target.value),...i})}),Ble=IOe;var sl=l(N(),1),Tle=l(R(),1),Ile=l(A(),1);var Ele=l(X(),1);var cP=l(N(),1),cf=l(w(),1);function uP({property:e,viewport:t,desc:o}){let r=(0,Ele.useInstanceId)(uP),n=o||(0,cP.sprintf)((0,cP._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."),e,t.label);return(0,cf.jsxs)(cf.Fragment,{children:[(0,cf.jsx)("span",{"aria-describedby":`rbc-desc-${r}`,children:t.label}),(0,cf.jsx)(We,{id:`rbc-desc-${r}`,render:(0,cf.jsx)("span",{}),children:n})]})}var al=l(w(),1);function POe(e){let{title:t,property:o,toggleLabel:r,onIsResponsiveChange:n,renderDefaultControl:i,renderResponsiveControls:s,isResponsive:a=!1,defaultLabel:c={id:"all",label:(0,sl._x)("All","screen sizes")},viewports:u=[{id:"small",label:(0,sl.__)("Small screens")},{id:"medium",label:(0,sl.__)("Medium screens")},{id:"large",label:(0,sl.__)("Large screens")}]}=e;if(!t||!o||!i)return null;let d=r||(0,sl.sprintf)((0,sl.__)("Use the same %s on all screen sizes."),o),f=(0,sl.__)("Choose whether to use the same value for all screen sizes or a unique value for each screen size."),m=i((0,al.jsx)(uP,{property:o,viewport:c}),c),h=()=>u.map(p=>(0,al.jsx)(Tle.Fragment,{children:i((0,al.jsx)(uP,{property:o,viewport:p}),p)},p.id));return(0,al.jsxs)("fieldset",{className:"block-editor-responsive-block-control",children:[(0,al.jsx)("legend",{className:"block-editor-responsive-block-control__title",children:t}),(0,al.jsxs)("div",{className:"block-editor-responsive-block-control__inner",children:[(0,al.jsx)(Ile.ToggleControl,{className:"block-editor-responsive-block-control__toggle",label:d,checked:!a,onChange:n,help:f}),(0,al.jsxs)("div",{className:D("block-editor-responsive-block-control__group",{"is-responsive":a}),children:[!a&&m,a&&(s?s(u):h())]})]})]})}var Ple=POe;var dP=l(A(),1);var Rle=l(w(),1);function Ole({units:e,...t}){let[o]=me("spacing.units"),r=(0,dP.__experimentalUseCustomUnits)({availableUnits:o||["%","px","em","rem","vw"],units:e});return(0,Rle.jsx)(dP.__experimentalUnitControl,{units:r,...t})}var DS=l(N(),1),Ale=l(R(),1),cv=l(A(),1);var ll=l(w(),1);function ROe({url:e,onChange:t}){let[o,r]=(0,Ale.useReducer)(i=>!i,!1),n=i=>{i.preventDefault(),r()};return(0,ll.jsxs)("div",{className:"block-editor-url-input__button",children:[(0,ll.jsx)(cv.Button,{size:"compact",icon:_n,label:e?(0,DS.__)("Edit link"):(0,DS.__)("Insert link"),onClick:r,className:"components-toolbar__control",isPressed:!!e}),o&&(0,ll.jsx)("form",{className:"block-editor-url-input__button-modal",onSubmit:n,children:(0,ll.jsxs)("div",{className:"block-editor-url-input__button-modal-line",children:[(0,ll.jsx)(cv.Button,{__next40pxDefaultSize:!0,className:"block-editor-url-input__back",icon:Sk,label:(0,DS.__)("Close"),onClick:r}),(0,ll.jsx)(Jd,{value:e||"",onChange:t,suffix:(0,ll.jsx)(cv.__experimentalInputControlSuffixWrapper,{variant:"control",children:(0,ll.jsx)(cv.Button,{size:"small",icon:Pl,label:(0,DS.__)("Submit"),type:"submit"})})})]})})]})}var Lle=ROe;var Dn=l(N(),1),hs=l(R(),1),Fle=l(Fe(),1),Qo=l(A(),1);var zle=l(qn(),1);var Tt=l(w(),1),bz="none",Nle="custom",Mle="media",Dle="attachment",Vle=["noopener"],jle=({linkDestination:e,onChangeUrl:t,url:o,mediaType:r="image",mediaUrl:n,mediaLink:i,linkTarget:s,linkClass:a,rel:c,showLightboxSetting:u,lightboxEnabled:d,onSetLightbox:f,resetLightbox:m})=>{let[h,p]=(0,hs.useState)(!1),[g,b]=(0,hs.useState)(null),k=()=>{p(!0)},[v,y]=(0,hs.useState)(!1),[_,S]=(0,hs.useState)(null),C=(0,hs.useRef)(null),B=(0,hs.useRef)();(0,hs.useEffect)(()=>{if(!B.current)return;(Fle.focus.focusable.find(B.current)[0]||B.current).focus()},[v,o,d]);let T=()=>{(e===Mle||e===Dle)&&S(""),y(!0)},I=()=>{y(!1)},E=()=>{S(null),I(),p(!1)},L=$=>{let ee=$?"_blank":void 0,Y;if(ee){let te=(c??"").split(" ");Vle.forEach(ne=>{te.includes(ne)||te.push(ne)}),Y=te.join(" ")}else{let te=(c??"").split(" ").filter(ne=>Vle.includes(ne)===!1);Y=te.length?te.join(" "):void 0}return{linkTarget:ee,rel:Y}},P=()=>$=>{let ee=C.current;ee&&ee.contains($.target)||(p(!1),S(null),I())},O=()=>$=>{if(_){let ee=j().find(Y=>Y.url===_)?.linkDestination||Nle;t({href:(0,zle.prependHTTPS)(_),linkDestination:ee,lightbox:{enabled:!1}})}I(),S(null),$.preventDefault()},V=()=>{t({linkDestination:bz,href:""})},j=()=>{let $=[{linkDestination:Mle,title:(0,Dn.__)("Link to image file"),url:r==="image"?n:void 0,icon:Pk}];return r==="image"&&i&&$.push({linkDestination:Dle,title:(0,Dn.__)("Link to attachment page"),url:r==="image"?i:void 0,icon:im}),$},H=$=>{let ee=j(),Y;$?Y=(ee.find(te=>te.url===$)||{linkDestination:Nle}).linkDestination:Y=bz,t({linkDestination:Y,href:$})},z=$=>{let ee=L($);t(ee)},U=$=>{t({rel:$})},G=$=>{t({linkClass:$})},W=(0,Tt.jsxs)(Qo.__experimentalVStack,{spacing:"3",children:[(0,Tt.jsx)(Qo.ToggleControl,{label:(0,Dn.__)("Open in new tab"),onChange:z,checked:s==="_blank"}),(0,Tt.jsx)(Qo.TextControl,{__next40pxDefaultSize:!0,label:(0,Dn.__)("Link relation"),value:c??"",onChange:U,help:(0,hs.createInterpolateElement)((0,Dn.__)("The <a>Link Relation</a> attribute defines the relationship between a linked resource and the current document."),{a:(0,Tt.jsx)(Qo.ExternalLink,{href:"https://developer.mozilla.org/docs/Web/HTML/Attributes/rel"})})}),(0,Tt.jsx)(Qo.TextControl,{__next40pxDefaultSize:!0,label:(0,Dn.__)("Link CSS class"),value:a||"",onChange:G})]}),J=_!==null?_:o,le=!d||d&&!u,oe=!J&&le,re=(j().find($=>$.linkDestination===e)||{}).title,Q=()=>{if(d&&u&&!o&&!v)return(0,Tt.jsxs)("div",{className:"block-editor-url-popover__expand-on-click",children:[(0,Tt.jsx)(Ie,{icon:Wx}),(0,Tt.jsxs)("div",{className:"text",children:[(0,Tt.jsx)("p",{children:(0,Dn.__)("Enlarge on click")}),(0,Tt.jsx)("p",{className:"description",children:(0,Dn.__)("Scales the image with a lightbox effect")})]}),(0,Tt.jsx)(Qo.Button,{icon:Ni,label:(0,Dn.__)("Disable enlarge on click"),onClick:()=>{f?.(!1)},size:"compact"})]});if(!o||v)return(0,Tt.jsx)(nf.LinkEditor,{className:"block-editor-format-toolbar__link-container-content",value:J,onChangeInputValue:S,onSubmit:O(),autocompleteRef:C});if(o&&!v)return(0,Tt.jsxs)(Tt.Fragment,{children:[(0,Tt.jsx)(nf.LinkViewer,{className:"block-editor-format-toolbar__link-container-content",url:o,onEditLinkClick:T,urlLabel:re}),(0,Tt.jsx)(Qo.Button,{icon:Ni,label:(0,Dn.__)("Remove link"),onClick:()=>{V(),m?.()},size:"compact"})]})};return(0,Tt.jsxs)(Tt.Fragment,{children:[(0,Tt.jsx)(Qo.ToolbarButton,{icon:_n,className:"components-toolbar__control",label:(0,Dn.__)("Link"),"aria-expanded":h,onClick:k,ref:b,isActive:!!o||d&&u}),h&&(0,Tt.jsx)(nf,{ref:B,anchor:g,onFocusOutside:P(),onClose:E,renderSettings:le?()=>W:null,additionalControls:oe&&(0,Tt.jsxs)(Qo.NavigableMenu,{children:[j().map($=>(0,Tt.jsx)(Qo.MenuItem,{icon:$.icon,iconPosition:"left",onClick:()=>{S(null),H($.url),I()},children:$.title},$.linkDestination)),u&&(0,Tt.jsx)(Qo.MenuItem,{className:"block-editor-url-popover__expand-on-click",icon:Wx,info:(0,Dn.__)("Scale the image with a lightbox effect."),iconPosition:"left",onClick:()=>{S(null),t({linkDestination:bz,href:""}),f?.(!0),I()},children:(0,Dn.__)("Enlarge on click")},"expand-on-click")]}),offset:13,children:Q()})]})};var dv=l(A(),1),tce=l(R(),1),pP=l(N(),1);var Ule=l(R(),1),kz=l(N(),1);var vz=[],OOe=new Intl.Collator("und",{numeric:!0}).compare;function fP(){let[e,t,o,r]=me("spacing.spacingSizes.custom","spacing.spacingSizes.theme","spacing.spacingSizes.default","spacing.defaultSpacingSizes"),n=e??vz,i=t??vz,s=o&&r!==!1?o:vz;return(0,Ule.useMemo)(()=>{let a=[{name:(0,kz.__)("None"),slug:"0",size:0},...n,...i,...s];return a.every(({slug:c})=>/^[0-9]/.test(c))&&a.sort((c,u)=>OOe(c.slug,u.slug)),a.length>S7?[{name:(0,kz.__)("Default"),slug:"default",size:void 0},...a]:a},[n,i,s])}var Hle=l(R(),1),Gle=l(F(),1),mP=l(N(),1),Wle=l(A(),1);var $le=l(w(),1),AOe={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},svw:{max:100,steps:1},lvw:{max:100,steps:1},dvw:{max:100,steps:1},svh:{max:100,steps:1},lvh:{max:100,steps:1},dvh:{max:100,steps:1},vi:{max:100,steps:1},svi:{max:100,steps:1},lvi:{max:100,steps:1},dvi:{max:100,steps:1},vb:{max:100,steps:1},svb:{max:100,steps:1},lvb:{max:100,steps:1},dvb:{max:100,steps:1},vmin:{max:100,steps:1},svmin:{max:100,steps:1},lvmin:{max:100,steps:1},dvmin:{max:100,steps:1},vmax:{max:100,steps:1},svmax:{max:100,steps:1},lvmax:{max:100,steps:1},dvmax:{max:100,steps:1}};function uv({icon:e,isMixed:t=!1,minimumCustomValue:o,onChange:r,onMouseOut:n,onMouseOver:i,showSideInLabel:s=!0,side:a,spacingSizes:c,type:u,value:d,...f}){let m=(0,Gle.useSelect)(_=>_(x).getSettings()?.disableCustomSpacingSizes),[h]=me("spacing.units"),p=(0,Wle.__experimentalUseCustomUnits)({availableUnits:h||["px","em","rem"]}),g=(0,Hle.useMemo)(()=>c?.map(_=>({name:_.name,slug:_.slug,size:_.size}))||[],[c]),b=(Fu.includes(a)||["vertical","horizontal"].includes(a))&&s?Ia[a]:"",k=s?u?.toLowerCase():u,v=(0,mP.sprintf)((0,mP._x)("%1$s %2$s","spacing"),b,k).trim(),y=p[0]?.value||"px";return(0,$le.jsx)(bp,{allowNegativeOnDrag:o<0,ariaLabel:v,className:"spacing-sizes-control",customValueSettings:AOe,disableCustomValues:m,icon:e,isMixed:t,minimumCustomValue:o,onChange:r,onMouseOut:n,onMouseOver:i,presets:g,presetType:"spacing",selectedUnit:y,units:p,value:d,...f})}var VS=l(w(),1),Kle=["vertical","horizontal"];function Yle({minimumCustomValue:e,onChange:t,onMouseOut:o,onMouseOver:r,sides:n,spacingSizes:i,type:s,values:a}){let c=d=>f=>{if(!t)return;let m={...Object.keys(a).reduce((h,p)=>(h[p]=Nh(a[p],i),h),{})};d==="vertical"&&(m.top=f,m.bottom=f),d==="horizontal"&&(m.left=f,m.right=f),t(m)},u=n?.length?Kle.filter(d=>y5(n,d)):Kle;return(0,VS.jsx)(VS.Fragment,{children:u.map(d=>{let f=d==="vertical"?a.top:a.left;return(0,VS.jsx)(uv,{icon:NC[d],label:Ia[d],minimumCustomValue:e,onChange:c(d),onMouseOut:o,onMouseOver:r,side:d,spacingSizes:i,type:s,value:f,withInputField:!1},`spacing-sizes-control-${d}`)})})}var FS=l(w(),1);function qle({minimumCustomValue:e,onChange:t,onMouseOut:o,onMouseOver:r,sides:n,spacingSizes:i,type:s,values:a}){let c=n?.length?Fu.filter(d=>n.includes(d)):Fu,u=d=>f=>{let m={...Object.keys(a).reduce((h,p)=>(h[p]=Nh(a[p],i),h),{})};m[d]=f,t(m)};return(0,FS.jsx)(FS.Fragment,{children:c.map(d=>(0,FS.jsx)(uv,{icon:NC[d],label:Ia[d],minimumCustomValue:e,onChange:u(d),onMouseOut:o,onMouseOver:r,side:d,spacingSizes:i,type:s,value:a[d],withInputField:!1},`spacing-sizes-control-${d}`))})}var Zle=l(w(),1);function Xle({minimumCustomValue:e,onChange:t,onMouseOut:o,onMouseOver:r,showSideInLabel:n,side:i,spacingSizes:s,type:a,values:c}){let u=d=>f=>{let m={...Object.keys(c).reduce((h,p)=>(h[p]=Nh(c[p],s),h),{})};m[d]=f,t(m)};return(0,Zle.jsx)(uv,{label:Ia[i],minimumCustomValue:e,onChange:u(i),onMouseOut:o,onMouseOver:r,showSideInLabel:n,side:i,spacingSizes:s,type:a,value:c[i],withInputField:!1})}var Qle=l(A(),1);var yz=l(N(),1),Jle=l(w(),1);function ece({isLinked:e,...t}){let o=e?(0,yz.__)("Unlink sides"):(0,yz.__)("Link sides");return(0,Jle.jsx)(Qle.Button,{...t,size:"small",icon:e?_n:Ni,iconSize:24,label:o})}var cl=l(w(),1);function fv({inputProps:e,label:t,minimumCustomValue:o=0,onChange:r,onMouseOut:n,onMouseOver:i,showSideInLabel:s=!0,sides:a=Fu,useSelect:c,values:u}){let d=fP(),f=u||x7,m=a?.length===1,h=a?.includes("horizontal")&&a?.includes("vertical")&&a?.length===2,[p,g]=(0,tce.useState)(C7(f,a)),b=()=>{g(p===Vl.axial?Vl.custom:Vl.axial)},v={...e,minimumCustomValue:o,onChange:C=>{let B={...u,...C};r(B)},onMouseOut:n,onMouseOver:i,sides:a,spacingSizes:d,type:t,useSelect:c,values:f},y=()=>p===Vl.axial?(0,cl.jsx)(Yle,{...v}):p===Vl.custom?(0,cl.jsx)(qle,{...v}):(0,cl.jsx)(Xle,{side:p,...v,showSideInLabel:s}),_=Fu.includes(p)&&s?Ia[p]:"",S=(0,pP.sprintf)((0,pP._x)("%1$s %2$s","spacing"),t,_).trim();return(0,cl.jsxs)("fieldset",{className:"spacing-sizes-control",children:[(0,cl.jsxs)(dv.__experimentalHStack,{className:"spacing-sizes-control__header",children:[(0,cl.jsx)(dv.BaseControl.VisualLabel,{as:"legend",className:"spacing-sizes-control__label",children:S}),!m&&!h&&(0,cl.jsx)(ece,{label:t,onClick:b,isLinked:p===Vl.axial})]}),(0,cl.jsx)(dv.__experimentalVStack,{spacing:.5,children:y()})]})}var oce=l(Le(),1);function rce(){return(0,oce.default)("wp.blockEditor.PreviewOptions",{version:"6.5"}),null}var hP=l(R(),1);function nce(e){let[t,o]=(0,hP.useState)(window.innerWidth);(0,hP.useEffect)(()=>{if(e==="Desktop")return;let i=()=>o(window.innerWidth);return window.addEventListener("resize",i),()=>{window.removeEventListener("resize",i)}},[e]);let r=i=>{let s;switch(i){case"Tablet":s=781;break;case"Mobile":s=479;break;default:return null}return s<t?s:t};return(i=>{let s=i==="Mobile"?"768px":"1024px",a="40px",c="auto";switch(i){case"Tablet":case"Mobile":return{width:r(i),marginTop:a,marginBottom:a,marginLeft:c,marginRight:c,height:s,overflowY:"auto"};default:return{marginLeft:c,marginRight:c}}})(e)}var Rv=l(N(),1),hf=l(K(),1),Xue=l(A(),1),Wz=l(F(),1),Que=l(R(),1);var mv=l(A(),1),gP=l(N(),1),ice=l(F(),1),bP=l(K(),1);var Ap=l(w(),1);function LOe({block:e,onNavigateToEntityRecord:t,isSyncedPattern:o,isTemplatePartBlock:r}){let n=e?.attributes||{};return(0,Ap.jsx)(mv.__experimentalVStack,{className:"block-editor-block-inspector-edit-contents",expanded:!0,children:(0,Ap.jsx)(mv.Button,{className:"block-editor-block-inspector-edit-contents__button",__next40pxDefaultSize:!0,variant:"secondary",onClick:()=>{if(o)t({postId:n.ref,postType:"wp_block"});else if(r){let{theme:s,slug:a}=n,c=s&&a?`${s}//${a}`:null;c&&t({postId:c,postType:"wp_template_part"})}},children:(0,gP.__)("Edit original")})})}function NOe({clientId:e,editedContentOnlySection:t,editContentOnlySection:o,stopEditingContentOnlySection:r}){return(0,Ap.jsx)(mv.__experimentalVStack,{className:"block-editor-block-inspector-edit-contents",expanded:!0,children:(0,Ap.jsx)(mv.Button,{className:"block-editor-block-inspector-edit-contents__button",__next40pxDefaultSize:!0,variant:"secondary",onClick:()=>{t?r():o(e)},children:t?(0,gP.__)("Exit pattern"):(0,gP.__)("Edit pattern")})})}function sce({clientId:e}){let{isWithinSection:t,isWithinEditedSection:o,editedContentOnlySection:r,editContentOnlySection:n,stopEditingContentOnlySection:i}=uI(e),{block:s,onNavigateToEntityRecord:a,canEdit:c}=(0,ice.useSelect)(m=>{let{getBlock:h,getSettings:p,canEditBlock:g}=m(x);return{block:h(e),onNavigateToEntityRecord:p().onNavigateToEntityRecord,canEdit:g(e)}},[e]);if(!c||!t&&!o)return null;let u=(0,bP.isReusableBlock)(s),d=(0,bP.isTemplatePart)(s);return(u||d)&&a?(0,Ap.jsx)(LOe,{block:s,onNavigateToEntityRecord:a,isSyncedPattern:u,isTemplatePartBlock:d}):(0,Ap.jsx)(NOe,{clientId:e,editedContentOnlySection:r,editContentOnlySection:n,stopEditingContentOnlySection:i})}var ace=l(F(),1),lce=l(N(),1),cce=l(A(),1),uce=l(R(),1);var dce=l(w(),1);function vP(){let e=(0,ace.useSelect)(r=>r(x).getBlockSelectionStart(),[]),t=(0,uce.useRef)();return km(e,t),e?(0,dce.jsx)(cce.Button,{__next40pxDefaultSize:!0,variant:"secondary",className:"block-editor-skip-to-selected-block",onClick:()=>{t.current?.focus()},children:(0,lce.__)("Skip to the selected block")}):null}var kP=l(N(),1),fce=l(F(),1);var mce=l(A(),1);var zS=l(w(),1);function _z(){let e=(0,fce.useSelect)(t=>t(x).getSelectedBlockCount(),[]);return(0,zS.jsxs)(mce.__experimentalHStack,{justify:"flex-start",spacing:2,className:"block-editor-multi-selection-inspector__card",children:[(0,zS.jsx)(Me,{icon:Qf,showColors:!0}),(0,zS.jsx)("div",{className:"block-editor-multi-selection-inspector__card-title",children:(0,kP.sprintf)((0,kP._n)("%d Block","%d Blocks",e),e)})]})}var Pv=l(A(),1),pa=l(R(),1),Gue=l(Ch(),1),Iv=l(F(),1);var jS=l(N(),1),yP={name:"settings",title:(0,jS.__)("Settings"),value:"settings",icon:nL},_P={name:"styles",title:(0,jS.__)("Styles"),value:"styles",icon:vM},SP={name:"content",title:(0,jS.__)("Content"),value:"content",icon:im},Dc={name:"list",title:(0,jS.__)("List View"),value:"list-view",icon:Rk};var BP=l(A(),1);var US=l(A(),1),pce=l(N(),1);var HS=l(w(),1),MOe=({initialOpen:e=!1})=>{let t=(0,US.__experimentalUseSlotFills)(wd.slotName),o=(0,US.__experimentalUseSlotFills)(M_.name),r=!!(t&&t.length),n=!!(o&&o.length);return!r&&!n?null:(0,HS.jsxs)(US.PanelBody,{className:"block-editor-block-inspector__advanced",title:(0,pce.__)("Advanced"),initialOpen:e,children:[(0,HS.jsx)(fe.Slot,{group:"advanced"}),(0,HS.jsx)(M_.Slot,{})]})},xP=MOe;var pv=l(A(),1),wP=l(F(),1),Sz=l(N(),1);var GS=l(w(),1),DOe=()=>{let{selectedClientIds:e,selectedBlocks:t,hasPositionAttribute:o}=(0,wP.useSelect)(s=>{let{getBlocksByClientId:a,getSelectedBlockClientIds:c}=s(x),u=c(),d=a(u);return{selectedClientIds:u,selectedBlocks:d,hasPositionAttribute:d?.some(({attributes:f})=>!!f?.style?.position?.type)}},[]),{updateBlockAttributes:r}=(0,wP.useDispatch)(x),n=zo();function i(){if(!e?.length||!t?.length)return;let s=Object.fromEntries(t?.map(({clientId:a,attributes:c})=>[a,{style:De({...c?.style,position:{...c?.style?.position,type:void 0,top:void 0,right:void 0,bottom:void 0,left:void 0}})}]));r(e,s,!0)}return(0,GS.jsx)(pv.__experimentalToolsPanel,{className:"block-editor-block-inspector__position",label:(0,Sz.__)("Position"),resetAll:i,dropdownMenuProps:n,children:(0,GS.jsx)(pv.__experimentalToolsPanelItem,{isShownByDefault:o,label:(0,Sz.__)("Position"),hasValue:()=>o,onDeselect:i,children:(0,GS.jsx)(fe.Slot,{group:"position"})})})},VOe=()=>{let e=(0,pv.__experimentalUseSlotFills)(os.position.name);return!(e&&e.length)?null:(0,GS.jsx)(DOe,{})},CP=VOe;var ul=l(w(),1),FOe=({showAdvancedControls:e=!1})=>{let t=(0,BP.__experimentalUseSlotFills)(os.default.name),o=(0,BP.__experimentalUseSlotFills)(os.position.name),r=(0,BP.__experimentalUseSlotFills)(os.bindings.name),n=!!t?.length||!!o?.length||!!r?.length;return(0,ul.jsxs)(ul.Fragment,{children:[(0,ul.jsx)(fe.Slot,{}),(0,ul.jsx)(CP,{}),(0,ul.jsx)(fe.Slot,{group:"bindings"}),e&&(0,ul.jsx)("div",{children:(0,ul.jsx)(xP,{initialOpen:!n})})]})},hce=FOe;var Ev=l(N(),1),mR=l(F(),1);var QS=l(K(),1),Az=l(A(),1),Bv=l(R(),1),Sue=l(vt(),1),xue=l(F(),1);var Oz={};wa(Oz,{AdvancedPanel:()=>ZP,BackgroundPanel:()=>oR,BorderPanel:()=>jP,ColorPanel:()=>WP,DimensionsPanel:()=>DP,FiltersPanel:()=>KP,ImageSettingsPanel:()=>due,StateControl:()=>yue,TypographyPanel:()=>OP,useHasBackgroundPanel:()=>tR,useHasBorderPanel:()=>zP,useHasBorderPanelControls:()=>$S,useHasColorPanel:()=>GP,useHasDimensionsPanel:()=>MP,useHasFiltersPanel:()=>lue,useHasImageSettingsPanel:()=>uue,useHasTypographyPanel:()=>RP,useSettingsForBlockElement:()=>TP});var EP=l(R(),1),gce=l(F(),1),xz=l(K(),1),Lp=l(N(),1);function TP(e,t,o){let{supportedStyles:r,supports:n}=(0,gce.useSelect)(i=>({supportedStyles:M(i(xz.store)).getSupportedStyles(t,o),supports:i(xz.store).getBlockType(t)?.supports}),[t,o]);return(0,EP.useMemo)(()=>{let i={...e};return r.includes("fontSize")||(i.typography={...i.typography,fontSizes:{},customFontSize:!1,defaultFontSizes:!1}),r.includes("fontFamily")||(i.typography={...i.typography,fontFamilies:{}}),i.color={...i.color,text:i.color?.text&&r.includes("color"),background:i.color?.background&&(r.includes("background")||r.includes("backgroundColor")),button:i.color?.button&&r.includes("buttonColor"),heading:i.color?.heading&&r.includes("headingColor"),link:i.color?.link&&r.includes("linkColor"),caption:i.color?.caption&&r.includes("captionColor")},!r.includes("background")&&!r.includes("backgroundGradient")&&(i.color.gradients=[],i.color.customGradient=!1),r.includes("filter")||(i.color.defaultDuotone=!1,i.color.customDuotone=!1),["lineHeight","fontStyle","fontWeight","letterSpacing","textAlign","textTransform","textDecoration","textIndent","writingMode"].forEach(s=>{r.includes(s)||(i.typography={...i.typography,[s]:!1})}),r.includes("textIndent")&&(i.typography={...i.typography,textIndent:i.typography?.textIndent??"subsequent"}),r.includes("columnCount")||(i.typography={...i.typography,textColumns:!1}),["contentSize","wideSize"].forEach(s=>{r.includes(s)||(i.layout={...i.layout,[s]:!1})}),["padding","margin","blockGap"].forEach(s=>{r.includes(s)||(i.spacing={...i.spacing,[s]:!1});let a=Array.isArray(n?.spacing?.[s])?n?.spacing?.[s]:n?.spacing?.[s]?.sides;a?.length&&i.spacing?.[s]&&(i.spacing={...i.spacing,[s]:{...i.spacing?.[s],sides:a}})}),["aspectRatio","height","minHeight","minWidth","width"].forEach(s=>{r.includes(s)||(i.dimensions={...i.dimensions,[s]:!1})}),["radius","color","style","width"].forEach(s=>{r.includes("border"+s.charAt(0).toUpperCase()+s.slice(1))||(i.border={...i.border,[s]:!1})}),[["backgroundImage","backgroundImage"],["backgroundSize","backgroundSize"],["backgroundGradient","gradient"]].forEach(([s,a])=>{r.includes(s)||(i.background={...i.background,[a]:!1})}),i.shadow=r.includes("shadow")?i.shadow:!1,i},[e,r,n])}function dl(e){let t=e?.color?.palette?.custom,o=e?.color?.palette?.theme,r=e?.color?.palette?.default,n=e?.color?.defaultPalette;return(0,EP.useMemo)(()=>{let i=[];return o&&o.length&&i.push({name:(0,Lp._x)("Theme","Indicates this palette comes from the theme."),colors:o}),n&&r&&r.length&&i.push({name:(0,Lp._x)("Default","Indicates this palette comes from WordPress."),colors:r}),t&&t.length&&i.push({name:(0,Lp._x)("Custom","Indicates this palette is created by the user."),colors:t}),i},[t,o,r,n])}function Np(e){let t=e?.color?.gradients?.custom,o=e?.color?.gradients?.theme,r=e?.color?.gradients?.default,n=e?.color?.defaultGradients;return(0,EP.useMemo)(()=>{let i=[];return o&&o.length&&i.push({name:(0,Lp._x)("Theme","Indicates this palette comes from the theme."),gradients:o}),n&&r&&r.length&&i.push({name:(0,Lp._x)("Default","Indicates this palette comes from WordPress."),gradients:r}),t&&t.length&&i.push({name:(0,Lp._x)("Custom","Indicates this palette is created by the user."),gradients:t}),i},[t,o,r,n])}var ho=l(A(),1),Go=l(N(),1),gv=l(R(),1);var hv=l(N(),1);var bce=l(R(),1),IP=l(A(),1),wz=l(w(),1),zOe=[{label:(0,hv.__)("Align text left"),value:"left",icon:vu},{label:(0,hv.__)("Align text center"),value:"center",icon:Yf},{label:(0,hv.__)("Align text right"),value:"right",icon:ku},{label:(0,hv.__)("Justify text"),value:"justify",icon:LA}],jOe=["left","center","right"];function PP({className:e,value:t,onChange:o,options:r=jOe}){let n=(0,bce.useMemo)(()=>zOe.filter(i=>r.includes(i.value)),[r]);return n.length?(0,wz.jsx)(IP.__experimentalToggleGroupControl,{isDeselectable:!0,__next40pxDefaultSize:!0,label:(0,hv.__)("Text alignment"),className:D("block-editor-text-alignment-control",e),value:t,onChange:i=>{o(i===t?void 0:i)},children:n.map(i=>(0,wz.jsx)(IP.__experimentalToggleGroupControlOptionIcon,{value:i.value,icon:i.icon,label:i.label},i.value))}):null}var Ho=l(A(),1),WS=l(N(),1);var gs=l(w(),1);function vce({__next40pxDefaultSize:e=!1,value:t,onChange:o,__unstableInputWidth:r="60px",withSlider:n=!1,hasBottomMargin:i=!1,help:s,...a}){let[c]=me("spacing.units"),u=(0,Ho.__experimentalUseCustomUnits)({availableUnits:c||["px","em","rem","ch","%","vw","vh"],defaultValues:{px:16,em:2,rem:2,ch:2}}),[d,f]=(0,Ho.__experimentalParseQuantityAndUnitFromRawValue)(t,u),m=!!f&&["em","rem","%","ch","vw","vh"].includes(f);return n?(0,gs.jsxs)(Ho.__experimentalView,{style:i?{marginBottom:12}:void 0,children:[(0,gs.jsx)(Ho.BaseControl.VisualLabel,{children:(0,WS.__)("Line indent")}),(0,gs.jsxs)(Ho.Flex,{children:[(0,gs.jsx)(Ho.FlexItem,{isBlock:!0,children:(0,gs.jsx)(Ho.__experimentalUnitControl,{__next40pxDefaultSize:e,__shouldNotWarnDeprecated36pxSize:!0,label:(0,WS.__)("Line indent"),labelPosition:"top",hideLabelFromVision:!0,value:t,onChange:o,size:a.size,units:u,__unstableInputWidth:r,min:0})}),n&&(0,gs.jsx)(Ho.FlexItem,{isBlock:!0,children:(0,gs.jsx)(Ho.__experimentalSpacer,{marginX:2,marginBottom:0,children:(0,gs.jsx)(Ho.RangeControl,{__next40pxDefaultSize:e,__shouldNotWarnDeprecated36pxSize:!0,label:(0,WS.__)("Line indent"),hideLabelFromVision:!0,value:d,withInputField:!1,onChange:h=>{o?.(h===void 0?void 0:h+(f??"px"))},min:0,max:m?10:100,step:m?.1:1,initialPosition:0})})})]}),s&&(0,gs.jsx)("p",{className:"components-base-control__help",children:s})]}):(0,gs.jsx)(Ho.__experimentalUnitControl,{__next40pxDefaultSize:e,__shouldNotWarnDeprecated36pxSize:!0,...a,label:(0,WS.__)("Line indent"),value:t,__unstableInputWidth:r,units:u,onChange:o,help:s})}function yce(e,t){let o=e?.typography?.fontFamilies,r=["default","theme","custom"].flatMap(i=>o?.[i]??[]),n=r.find(i=>i.fontFamily===t)?.fontFace??[];return{fontFamilies:r,fontFamilyFaces:n}}function kce(e,t){return t=typeof t=="number"?t.toString():t,!t||typeof t!="string"?"":!e||e.length===0?t:e?.reduce((r,{value:n})=>{let i=Math.abs(parseInt(n)-parseInt(t)),s=Math.abs(parseInt(r)-parseInt(t));return i<s?n:r},e[0]?.value)}function UOe(e,t){return typeof t!="string"||!t||!["normal","italic","oblique"].includes(t)?"":!e||e.length===0||e.find(r=>r.value===t)?t:t==="oblique"&&!e.find(r=>r.value==="oblique")?"italic":""}function _ce(e,t,o){let r=t,n=o,{fontStyles:i,fontWeights:s,combinedStyleAndWeightOptions:a}=Mb(e),c=i?.some(({value:d})=>d===t),u=s?.some(({value:d})=>d?.toString()===o?.toString());return c||(r=t?UOe(i,t):a?.find(d=>d.style.fontWeight===kce(s,o))?.style?.fontStyle),u||(n=o?kce(s,o):a?.find(d=>d.style.fontStyle===(r||t))?.style?.fontWeight),{nearestFontStyle:r,nearestFontWeight:n}}var lt=l(w(),1),HOe=1,GOe=6;function RP(e){let t=xce(e),o=wce(e),r=Cce(e),n=Bce(e),i=Tce(e),s=Ece(e),a=Ice(e),c=Oce(e),u=Pce(e),d=Rce(e),f=Sce(e);return t||o||r||n||i||s||f||a||c||u||d}function Sce(e){return e?.typography?.defaultFontSizes!==!1&&e?.typography?.fontSizes?.default?.length||e?.typography?.fontSizes?.theme?.length||e?.typography?.fontSizes?.custom?.length||e?.typography?.customFontSize}function xce(e){return["default","theme","custom"].some(t=>e?.typography?.fontFamilies?.[t]?.length)}function wce(e){return e?.typography?.lineHeight}function Cce(e){return e?.typography?.fontStyle||e?.typography?.fontWeight}function WOe(e){return e?.typography?.fontStyle?e?.typography?.fontWeight?(0,Go.__)("Appearance"):(0,Go.__)("Font style"):(0,Go.__)("Font weight")}function Bce(e){return e?.typography?.letterSpacing}function Ece(e){return e?.typography?.textTransform}function Tce(e){return e?.typography?.textAlign}function Ice(e){return e?.typography?.textDecoration}function Pce(e){return e?.typography?.writingMode}function Rce(e){return e?.typography?.textColumns}function Oce(e){return e?.typography?.textIndent}function $Oe(e){let t=e?.typography?.fontSizes,o=!!e?.typography?.defaultFontSizes;return[...t?.custom??[],...t?.theme??[],...o?t?.default??[]:[]]}function KOe({resetAllFilter:e,onChange:t,value:o,panelId:r,children:n}){let i=zo(),s=()=>{let a=e(o);t(a)};return(0,lt.jsx)(ho.__experimentalToolsPanel,{label:(0,Go.__)("Typography"),resetAll:s,panelId:r,dropdownMenuProps:i,children:n})}var YOe={fontFamily:!0,fontSize:!0,fontAppearance:!0,lineHeight:!0,letterSpacing:!0,textAlign:!0,textTransform:!0,textDecoration:!0,textIndent:!0,writingMode:!0,textColumns:!0};function OP({as:e=KOe,value:t,onChange:o,inheritedValue:r=t,settings:n,panelId:i,defaultControls:s=YOe,isGlobalStyles:a=!1}){let c=ge=>Fr({settings:n},"",ge),u=xce(n),d=c(r?.typography?.fontFamily),{fontFamilies:f,fontFamilyFaces:m}=(0,gv.useMemo)(()=>yce(n,d),[n,d]),h=ge=>{let Ut=f?.find(({fontFamily:kn})=>kn===ge)?.slug,Ct=de(t,["typography","fontFamily"],Ut?`var:preset|font-family|${Ut}`:ge||void 0),Sa=f?.find(({fontFamily:kn})=>kn===ge)?.fontFace??[],{fontStyles:Kr,fontWeights:he}=Mb(Sa),nr=Kr?.some(({value:kn})=>kn===P),xa=he?.some(({value:kn})=>kn?.toString()===O?.toString());if(!nr||!xa){let{nearestFontStyle:kn,nearestFontWeight:rh}=_ce(Sa,P,O);kn||rh?Ct={...Ct,typography:{...Ct?.typography,fontStyle:kn||void 0,fontWeight:rh||void 0}}:(P||O)&&(Ct={...Ct,typography:{...Ct?.typography,fontStyle:void 0,fontWeight:void 0}})}o(Ct)},p=()=>!!t?.typography?.fontFamily,g=()=>h(void 0),b=Sce(n),k=!n?.typography?.customFontSize,v=$Oe(n),y=c(r?.typography?.fontSize),_=(()=>{let ge=r?.typography?.fontSize;if(!ge||typeof ge!="string")return;if(ge.startsWith("var:preset|font-size|"))return ge.replace("var:preset|font-size|","");let Ut=ge.match(/^var\(--wp--preset--font-size--([^)]+)\)$/);if(Ut)return Ut[1]})(),S=(ge,Ut)=>{let Ct=Ut?.slug?`var:preset|font-size|${Ut?.slug}`:ge;o(de(t,["typography","fontSize"],Ct||void 0))},C=()=>!!t?.typography?.fontSize,B=()=>S(void 0),T=Cce(n),I=WOe(n),E=n?.typography?.fontStyle,L=n?.typography?.fontWeight,P=c(r?.typography?.fontStyle),O=c(r?.typography?.fontWeight),V=(0,gv.useCallback)(({fontStyle:ge,fontWeight:Ut})=>{(ge!==P||Ut!==O)&&o({...t,typography:{...t?.typography,fontStyle:ge||void 0,fontWeight:Ut||void 0}})},[P,O,o,t]),j=()=>!!t?.typography?.fontStyle||!!t?.typography?.fontWeight,H=(0,gv.useCallback)(()=>{V({})},[V]),z=wce(n),U=c(r?.typography?.lineHeight),G=ge=>{o(de(t,["typography","lineHeight"],ge||void 0))},W=()=>t?.typography?.lineHeight!==void 0,J=()=>G(void 0),le=Bce(n),oe=c(r?.typography?.letterSpacing),re=ge=>{o(de(t,["typography","letterSpacing"],ge||void 0))},Q=()=>!!t?.typography?.letterSpacing,$=()=>re(void 0),ee=Oce(n),Y=c(r?.typography?.textIndent),ne=(n?.typography?.textIndent??"subsequent")==="all",q=ge=>{o(de(t,["typography","textIndent"],ge||void 0))},se=ge=>{o({...t,settings:{typography:{textIndent:ge?"all":"subsequent"}}})},pe=()=>!!t?.typography?.textIndent,xe=()=>{o(de(t,["typography","textIndent"],void 0))},Te=ne?(0,Go.__)("Indents the first line of all paragraphs."):(0,Go.__)("Indents the first line of each paragraph after the first one."),Xe=Rce(n),dt=c(r?.typography?.textColumns),ft=ge=>{o(de(t,["typography","textColumns"],ge||void 0))},we=()=>!!t?.typography?.textColumns,ot=()=>ft(void 0),Ce=Ece(n),Wo=c(r?.typography?.textTransform),Qt=ge=>{o(de(t,["typography","textTransform"],ge||void 0))},lo=()=>!!t?.typography?.textTransform,Qe=()=>Qt(void 0),jt=Ice(n),rt=c(r?.typography?.textDecoration),He=ge=>{o(de(t,["typography","textDecoration"],ge||void 0))},$o=()=>!!t?.typography?.textDecoration,Yn=()=>He(void 0),ze=Pce(n),co=c(r?.typography?.writingMode),nt=ge=>{o(de(t,["typography","writingMode"],ge||void 0))},je=()=>!!t?.typography?.writingMode,wt=()=>nt(void 0),So=Tce(n),gr=c(r?.typography?.textAlign),be=ge=>{o(de(t,["typography","textAlign"],ge||void 0))},Rt=()=>!!t?.typography?.textAlign,Vo=()=>be(void 0),bt=(0,gv.useCallback)(ge=>({...ge,typography:{}}),[]);return(0,lt.jsxs)(e,{resetAllFilter:bt,value:t,onChange:o,panelId:i,children:[u&&(0,lt.jsx)(ho.__experimentalToolsPanelItem,{label:(0,Go.__)("Font"),hasValue:p,onDeselect:g,isShownByDefault:s.fontFamily,panelId:i,children:(0,lt.jsx)(n2,{fontFamilies:f,value:d,onChange:h,size:"__unstable-large"})}),b&&(0,lt.jsx)(ho.__experimentalToolsPanelItem,{label:(0,Go.__)("Size"),hasValue:C,onDeselect:B,isShownByDefault:s.fontSize,panelId:i,children:(0,lt.jsx)(ho.FontSizePicker,{value:_||y,valueMode:_?"slug":"literal",onChange:S,fontSizes:v,disableCustomFontSizes:k,withReset:!1,withSlider:!0,size:"__unstable-large"})}),T&&(0,lt.jsx)(ho.__experimentalToolsPanelItem,{label:I,hasValue:j,onDeselect:H,isShownByDefault:s.fontAppearance,panelId:i,children:(0,lt.jsx)(r2,{value:{fontStyle:P,fontWeight:O},onChange:V,hasFontStyles:E,hasFontWeights:L,fontFamilyFaces:m,size:"__unstable-large"})}),z&&(0,lt.jsx)(ho.__experimentalToolsPanelItem,{className:"single-column",label:(0,Go.__)("Line height"),hasValue:W,onDeselect:J,isShownByDefault:s.lineHeight,panelId:i,children:(0,lt.jsx)(H2,{__unstableInputWidth:"auto",value:U,onChange:G,size:"__unstable-large"})}),le&&(0,lt.jsx)(ho.__experimentalToolsPanelItem,{className:"single-column",label:(0,Go.__)("Letter spacing"),hasValue:Q,onDeselect:$,isShownByDefault:s.letterSpacing,panelId:i,children:(0,lt.jsx)(s2,{value:oe,onChange:re,size:"__unstable-large",__unstableInputWidth:"auto"})}),ee&&(0,lt.jsxs)(ho.__experimentalToolsPanelItem,{label:(0,Go.__)("Line indent"),hasValue:pe,onDeselect:xe,isShownByDefault:s.textIndent,panelId:i,children:[(0,lt.jsx)(vce,{value:Y,onChange:q,size:"__unstable-large",__unstableInputWidth:"auto",withSlider:!0,hasBottomMargin:a}),a&&(0,lt.jsx)(ho.ToggleControl,{label:(0,Go.__)("Indent all paragraphs"),checked:ne,onChange:se,help:Te})]}),Xe&&(0,lt.jsx)(ho.__experimentalToolsPanelItem,{className:"single-column",label:(0,Go.__)("Columns"),hasValue:we,onDeselect:ot,isShownByDefault:s.textColumns,panelId:i,children:(0,lt.jsx)(ho.__experimentalNumberControl,{label:(0,Go.__)("Columns"),max:GOe,min:HOe,onChange:ft,size:"__unstable-large",spinControls:"custom",value:dt,initialPosition:1})}),jt&&(0,lt.jsx)(ho.__experimentalToolsPanelItem,{className:"single-column",label:(0,Go.__)("Decoration"),hasValue:$o,onDeselect:Yn,isShownByDefault:s.textDecoration,panelId:i,children:(0,lt.jsx)(l2,{value:rt,onChange:He,size:"__unstable-large",__unstableInputWidth:"auto"})}),ze&&(0,lt.jsx)(ho.__experimentalToolsPanelItem,{className:"single-column",label:(0,Go.__)("Orientation"),hasValue:je,onDeselect:wt,isShownByDefault:s.writingMode,panelId:i,children:(0,lt.jsx)(f2,{value:co,onChange:nt,size:"__unstable-large"})}),Ce&&(0,lt.jsx)(ho.__experimentalToolsPanelItem,{label:(0,Go.__)("Letter case"),hasValue:lo,onDeselect:Qe,isShownByDefault:s.textTransform,panelId:i,children:(0,lt.jsx)(u2,{value:Wo,onChange:Qt,showNone:!0,isBlock:!0,size:"__unstable-large"})}),So&&(0,lt.jsxs)(ho.__experimentalToolsPanelItem,{label:(0,Go.__)("Text alignment"),hasValue:Rt,onDeselect:Vo,isShownByDefault:s.textAlign,panelId:i,children:[(0,lt.jsx)(PP,{value:gr,onChange:be,options:["left","center","right","justify"],size:"__unstable-large"}),gr==="justify"&&(0,lt.jsx)("div",{children:(0,lt.jsx)(ho.Notice,{status:"warning",isDismissible:!1,children:(0,Go.__)("Justified text can reduce readability. For better accessibility, use left-aligned text instead.")})})]})]})}var Dt=l(N(),1),Vt=l(A(),1);var vv=l(R(),1);var ct=l(A(),1),Jo=l(N(),1),Lce=l(R(),1),AP=l(F(),1);var Ace=l(F(),1);function Mp(e,t){let{getBlockOrder:o,getBlockAttributes:r}=(0,Ace.useSelect)(x);return(i,s)=>{let a=(s-1)*t+i-1,c=0;for(let u of o(e)){let{columnStart:d,rowStart:f}=r(u).style?.layout??{};(f-1)*t+d-1<a&&c++}return c}}var oo=l(w(),1);function qOe(e,t){let{orientation:o="horizontal"}=t;return e==="fill"?(0,Jo.__)("Stretch to fill available space."):e==="fixed"&&o==="horizontal"?(0,Jo.__)("Specify a fixed width."):e==="fixed"?(0,Jo.__)("Specify a fixed height."):(0,Jo.__)("Fit contents.")}function Nce({value:e={},onChange:t,parentLayout:o,isShownByDefault:r,panelId:n}){let{type:i,default:{type:s="default"}={}}=o??{},a=i||s;return a==="flex"?(0,oo.jsx)(ZOe,{childLayout:e,onChange:t,parentLayout:o,isShownByDefault:r,panelId:n}):a==="grid"?(0,oo.jsx)(QOe,{childLayout:e,onChange:t,parentLayout:o,isShownByDefault:r,panelId:n}):null}function ZOe({childLayout:e,onChange:t,parentLayout:o,isShownByDefault:r,panelId:n}){let{selfStretch:i,flexSize:s}=e,{orientation:a="horizontal"}=o??{},c=()=>!!i,u=a==="horizontal"?(0,Jo.__)("Width"):(0,Jo.__)("Height"),[d]=me("spacing.units"),f=(0,ct.__experimentalUseCustomUnits)({availableUnits:d||["%","px","em","rem","vh","vw"]}),m=()=>{t({selfStretch:void 0,flexSize:void 0})};return(0,Lce.useEffect)(()=>{i==="fixed"&&!s&&t({...e,selfStretch:"fit"})},[]),(0,oo.jsxs)(ct.__experimentalVStack,{as:ct.__experimentalToolsPanelItem,spacing:2,hasValue:c,label:u,onDeselect:m,isShownByDefault:r,panelId:n,children:[(0,oo.jsxs)(ct.__experimentalToggleGroupControl,{size:"__unstable-large",label:XOe(o),value:i||"fit",help:qOe(i,o),onChange:h=>{t({selfStretch:h,flexSize:h!=="fixed"?null:s})},isBlock:!0,children:[(0,oo.jsx)(ct.__experimentalToggleGroupControlOption,{value:"fit",label:(0,Jo._x)("Fit","Intrinsic block width in flex layout")},"fit"),(0,oo.jsx)(ct.__experimentalToggleGroupControlOption,{value:"fill",label:(0,Jo._x)("Grow","Block with expanding width in flex layout")},"fill"),(0,oo.jsx)(ct.__experimentalToggleGroupControlOption,{value:"fixed",label:(0,Jo._x)("Fixed","Block with fixed width in flex layout")},"fixed")]}),i==="fixed"&&(0,oo.jsx)(ct.__experimentalUnitControl,{size:"__unstable-large",units:f,onChange:h=>{t({selfStretch:i,flexSize:h})},value:s,min:0,label:u,hideLabelFromVision:!0})]})}function XOe(e){let{orientation:t="horizontal"}=e;return t==="horizontal"?(0,Jo.__)("Width"):(0,Jo.__)("Height")}function QOe({childLayout:e,onChange:t,parentLayout:o,isShownByDefault:r,panelId:n}){let{columnStart:i,rowStart:s,columnSpan:a,rowSpan:c}=e,{columnCount:u,rowCount:d}=o??{},f=(0,AP.useSelect)(S=>S(x).getBlockRootClientId(n)),{moveBlocksToPosition:m,__unstableMarkNextChangeAsNotPersistent:h}=(0,AP.useDispatch)(x),p=Mp(f,u||3),g=()=>!!i||!!s,b=()=>!!a||!!c,k=()=>{t({columnStart:void 0,rowStart:void 0})},v=()=>{t({columnSpan:void 0,rowSpan:void 0})},y=u?u-(i??1)+1:void 0,_=window.__experimentalEnableGridInteractivity&&d?d-(s??1)+1:void 0;return(0,oo.jsxs)(oo.Fragment,{children:[(0,oo.jsxs)(ct.Flex,{as:ct.__experimentalToolsPanelItem,hasValue:b,label:(0,Jo.__)("Grid span"),onDeselect:v,isShownByDefault:r,panelId:n,children:[(0,oo.jsx)(ct.FlexItem,{style:{width:"50%"},children:(0,oo.jsx)(ct.__experimentalInputControl,{size:"__unstable-large",label:(0,Jo.__)("Column span"),type:"number",onChange:S=>{let C=S===""?1:parseInt(S,10),B=y?Math.min(C,y):C;t({columnStart:i,rowStart:s,rowSpan:c,columnSpan:B})},value:a??1,min:1,max:y})}),(0,oo.jsx)(ct.FlexItem,{style:{width:"50%"},children:(0,oo.jsx)(ct.__experimentalInputControl,{size:"__unstable-large",label:(0,Jo.__)("Row span"),type:"number",onChange:S=>{let C=S===""?1:parseInt(S,10),B=_?Math.min(C,_):C;t({columnStart:i,rowStart:s,columnSpan:a,rowSpan:B})},value:c??1,min:1,max:_})})]}),window.__experimentalEnableGridInteractivity&&(0,oo.jsxs)(ct.Flex,{as:ct.__experimentalToolsPanelItem,hasValue:g,label:(0,Jo.__)("Grid placement"),onDeselect:k,isShownByDefault:!1,panelId:n,children:[(0,oo.jsx)(ct.FlexItem,{style:{width:"50%"},children:(0,oo.jsx)(ct.__experimentalInputControl,{size:"__unstable-large",label:(0,Jo.__)("Column"),type:"number",onChange:S=>{let C=S===""?1:parseInt(S,10);t({columnStart:C,rowStart:s,columnSpan:a,rowSpan:c}),h(),m([n],f,f,p(C,s))},value:i??1,min:1,max:u?u-(a??1)+1:void 0})}),(0,oo.jsx)(ct.FlexItem,{style:{width:"50%"},children:(0,oo.jsx)(ct.__experimentalInputControl,{size:"__unstable-large",label:(0,Jo.__)("Row"),type:"number",onChange:S=>{let C=S===""?1:parseInt(S,10);t({columnStart:i,rowStart:C,columnSpan:a,rowSpan:c}),h(),m([n],f,f,p(i,C))},value:s??1,min:1,max:d?d-(c??1)+1:void 0})})]})]})}var LP=l(A(),1),bv=l(N(),1);var Cz=l(w(),1);function NP({panelId:e,value:t,onChange:o=()=>{},options:r,defaultValue:n="auto",hasValue:i,isShownByDefault:s=!0}){let a=t??"auto",[c,u,d]=me("dimensions.aspectRatios.default","dimensions.aspectRatios.theme","dimensions.defaultAspectRatios"),f=u?.map(({name:p,ratio:g})=>({label:p,value:g})),m=c?.map(({name:p,ratio:g})=>({label:p,value:g})),h=[{label:(0,bv._x)("Original","Aspect ratio option for dimensions control"),value:"auto"},...d?m:[],...f||[],{label:(0,bv._x)("Custom","Aspect ratio option for dimensions control"),value:"custom",disabled:!0,hidden:!0}];return(0,Cz.jsx)(LP.__experimentalToolsPanelItem,{hasValue:i||(()=>a!==n),label:(0,bv.__)("Aspect ratio"),onDeselect:()=>o(void 0),isShownByDefault:s,panelId:e,children:(0,Cz.jsx)(LP.SelectControl,{label:(0,bv.__)("Aspect ratio"),value:a,options:r??h,onChange:o,size:"__unstable-large"})})}var Ue=l(w(),1),Bz=["horizontal","vertical"];function MP(e){return vv.Platform.OS==="web"&&(Vce(e)||Fce(e)||zce(e)||jce(e)||Uce(e)||Hce(e)||Gce(e)||Wce(e)||$ce(e)||Kce(e)||Yce(e))}function Vce(e){return e?.layout?.contentSize}function Fce(e){return e?.layout?.wideSize}function zce(e){return e?.spacing?.padding}function jce(e){return e?.spacing?.margin}function Uce(e){return e?.spacing?.blockGap}function Hce(e){return e?.dimensions?.height}function Gce(e){return e?.dimensions?.minHeight}function Wce(e){return e?.dimensions?.minWidth}function $ce(e){return e?.dimensions?.width}function Kce(e){return e?.dimensions?.aspectRatio}function Yce(e){let{type:t="default",default:{type:o="default"}={},allowSizingOnChildren:r=!1}=e?.parentLayout??{},n=(o==="flex"||t==="flex"||o==="grid"||t==="grid")&&r;return!!e?.layout&&n}function JOe(e){let{defaultSpacingSizes:t,spacingSizes:o}=e?.spacing||{};return t!==!1&&o?.default?.length>0||o?.theme?.length>0||o?.custom?.length>0}function Mce(e,t){if(!t||!e)return e;let o={};return t.forEach(r=>{r==="vertical"&&(o.top=e.top,o.bottom=e.bottom),r==="horizontal"&&(o.left=e.left,o.right=e.right),o[r]=e?.[r]}),o}function Dce(e){return e&&typeof e=="string"?{top:e,right:e,bottom:e,left:e}:e}function eAe(e,t){return e&&(typeof e=="string"?t?{top:e,right:e,bottom:e,left:e}:{top:e}:{...e,right:e?.left,bottom:e?.top})}function tAe({resetAllFilter:e,onChange:t,value:o,panelId:r,children:n}){let i=zo(),s=()=>{let a=e(o);t(a)};return(0,Ue.jsx)(Vt.__experimentalToolsPanel,{label:(0,Dt.__)("Dimensions"),resetAll:s,panelId:r,dropdownMenuProps:i,children:n})}var bs={contentSize:!0,wideSize:!0,padding:!0,margin:!0,blockGap:!0,height:!0,minHeight:!0,minWidth:!0,width:!0,aspectRatio:!0,childLayout:!0};function DP({as:e=tAe,value:t,onChange:o,inheritedValue:r=t,settings:n,panelId:i,defaultControls:s=bs,onVisualize:a=()=>{},includeLayoutControls:c=!1}){let{dimensions:u,spacing:d}=n,f=he=>he&&typeof he=="object"?Object.keys(he).reduce((nr,xa)=>(nr[xa]=Fr({settings:{dimensions:u,spacing:d}},"",he[xa]),nr),{}):Fr({settings:{dimensions:u,spacing:d}},"",he),m=JOe(n),h=(0,Vt.__experimentalUseCustomUnits)({availableUnits:n?.spacing?.units||["%","px","em","rem","vw"]}),p=-1/0,[g,b]=(0,vv.useState)(p),k=(0,vv.useCallback)(he=>({...he,layout:De({...he?.layout,contentSize:void 0,wideSize:void 0,selfStretch:void 0,flexSize:void 0,columnStart:void 0,rowStart:void 0,columnSpan:void 0,rowSpan:void 0}),spacing:{...he?.spacing,padding:void 0,margin:void 0,blockGap:void 0},dimensions:{...he?.dimensions,height:void 0,minHeight:void 0,minWidth:void 0,aspectRatio:void 0,width:void 0}}),[]),v=Vce(n)&&c,y=f(r?.layout?.contentSize),_=he=>{o(de(t,["layout","contentSize"],he||void 0))},S=()=>!!t?.layout?.contentSize,C=()=>_(void 0),B=Fce(n)&&c,T=f(r?.layout?.wideSize),I=he=>{o(de(t,["layout","wideSize"],he||void 0))},E=()=>!!t?.layout?.wideSize,L=()=>I(void 0),P=zce(n),O=f(r?.spacing?.padding),V=Dce(O),j=Array.isArray(n?.spacing?.padding)?n?.spacing?.padding:n?.spacing?.padding?.sides,H=j&&j.some(he=>Bz.includes(he)),z=he=>{let nr=Mce(he,j);o(de(t,["spacing","padding"],nr))},U=()=>!!t?.spacing?.padding&&Object.keys(t?.spacing?.padding).length,G=()=>z(void 0),W=()=>a("padding"),J=jce(n),le=f(r?.spacing?.margin),oe=Dce(le),re=Array.isArray(n?.spacing?.margin)?n?.spacing?.margin:n?.spacing?.margin?.sides,Q=re&&re.some(he=>Bz.includes(he)),$=he=>{let nr=Mce(he,re);o(de(t,["spacing","margin"],nr))},ee=()=>!!t?.spacing?.margin&&Object.keys(t?.spacing?.margin).length,Y=()=>$(void 0),te=()=>a("margin"),ne=Uce(n),q=Array.isArray(n?.spacing?.blockGap)?n?.spacing?.blockGap:n?.spacing?.blockGap?.sides,se=q&&q.some(he=>Bz.includes(he)),pe=f(r?.spacing?.blockGap),xe=eAe(pe,se),Te=he=>{o(de(t,["spacing","blockGap"],he))},Xe=he=>{he||Te(null),!se&&he?.hasOwnProperty("top")?Te(he.top):Te({top:he?.top,left:he?.left})},dt=()=>Te(void 0),ft=()=>!!t?.spacing?.blockGap,we=Gce(n),ot=f(r?.dimensions?.minHeight),Ce=he=>{let nr=de(t,["dimensions","minHeight"],he);o(de(nr,["dimensions","aspectRatio"],void 0))},Wo=()=>{Ce(void 0)},Qt=()=>!!t?.dimensions?.minHeight,lo=Hce(n),Qe=f(r?.dimensions?.height),jt=he=>{let nr=de(t,["dimensions","height"],he);o(de(nr,["dimensions","aspectRatio"],void 0))},rt=()=>{jt(void 0)},He=()=>!!t?.dimensions?.height,$o=Wce(n),Yn=f(r?.dimensions?.minWidth),ze=he=>{o(de(t,["dimensions","minWidth"],he))},co=()=>{ze(void 0)},nt=()=>!!t?.dimensions?.minWidth,je=$ce(n),wt=f(r?.dimensions?.width),So=he=>{o(de(t,["dimensions","width"],he))},gr=()=>{So(void 0)},be=()=>!!t?.dimensions?.width,Rt=Kce(n),Vo=f(r?.dimensions?.aspectRatio),bt=he=>{let nr=de(t,["dimensions","aspectRatio"],he);o(de(nr,["dimensions","minHeight"],void 0))},ge=()=>!!t?.dimensions?.aspectRatio,Ut=Yce(n),Ct=r?.layout,Sa=he=>{o({...t,layout:{...he}})},Kr=()=>a(!1);return(0,Ue.jsxs)(e,{resetAllFilter:k,value:t,onChange:o,panelId:i,children:[(v||B)&&(0,Ue.jsx)("span",{className:"span-columns",children:(0,Dt.__)("Set the width of the main content area.")}),v&&(0,Ue.jsx)(Vt.__experimentalToolsPanelItem,{label:(0,Dt.__)("Content width"),hasValue:S,onDeselect:C,isShownByDefault:s.contentSize??bs.contentSize,panelId:i,children:(0,Ue.jsx)(Vt.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,Dt.__)("Content width"),labelPosition:"top",value:y||"",onChange:he=>{_(he)},units:h,prefix:(0,Ue.jsx)(Vt.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,Ue.jsx)(Ie,{icon:qf})})})}),B&&(0,Ue.jsx)(Vt.__experimentalToolsPanelItem,{label:(0,Dt.__)("Wide width"),hasValue:E,onDeselect:L,isShownByDefault:s.wideSize??bs.wideSize,panelId:i,children:(0,Ue.jsx)(Vt.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,Dt.__)("Wide width"),labelPosition:"top",value:T||"",onChange:he=>{I(he)},units:h,prefix:(0,Ue.jsx)(Vt.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,Ue.jsx)(Ie,{icon:lm})})})}),P&&(0,Ue.jsxs)(Vt.__experimentalToolsPanelItem,{hasValue:U,label:(0,Dt.__)("Padding"),onDeselect:G,isShownByDefault:s.padding??bs.padding,className:D({"tools-panel-item-spacing":m}),panelId:i,children:[!m&&(0,Ue.jsx)(Vt.BoxControl,{__next40pxDefaultSize:!0,values:V,onChange:z,label:(0,Dt.__)("Padding"),sides:j,units:h,allowReset:!1,splitOnAxis:H,inputProps:{onMouseOver:W,onMouseOut:Kr}}),m&&(0,Ue.jsx)(fv,{values:V,onChange:z,label:(0,Dt.__)("Padding"),sides:j,units:h,allowReset:!1,onMouseOver:W,onMouseOut:Kr})]}),J&&(0,Ue.jsxs)(Vt.__experimentalToolsPanelItem,{hasValue:ee,label:(0,Dt.__)("Margin"),onDeselect:Y,isShownByDefault:s.margin??bs.margin,className:D({"tools-panel-item-spacing":m}),panelId:i,children:[!m&&(0,Ue.jsx)(Vt.BoxControl,{__next40pxDefaultSize:!0,values:oe,onChange:$,inputProps:{min:g,onDragStart:()=>{b(0)},onDragEnd:()=>{b(p)},onMouseOver:te,onMouseOut:Kr},label:(0,Dt.__)("Margin"),sides:re,units:h,allowReset:!1,splitOnAxis:Q}),m&&(0,Ue.jsx)(fv,{values:oe,onChange:$,minimumCustomValue:-1/0,label:(0,Dt.__)("Margin"),sides:re,units:h,allowReset:!1,onMouseOver:te,onMouseOut:Kr})]}),ne&&(0,Ue.jsxs)(Vt.__experimentalToolsPanelItem,{hasValue:ft,label:(0,Dt.__)("Block spacing"),onDeselect:dt,isShownByDefault:s.blockGap??bs.blockGap,className:D({"tools-panel-item-spacing":m,"single-column":!m&&!se}),panelId:i,children:[!m&&(se?(0,Ue.jsx)(Vt.BoxControl,{__next40pxDefaultSize:!0,label:(0,Dt.__)("Block spacing"),min:0,onChange:Xe,units:h,sides:q,values:xe,allowReset:!1,splitOnAxis:se}):(0,Ue.jsx)(Vt.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,Dt.__)("Block spacing"),min:0,onChange:Te,units:h,value:pe})),m&&(0,Ue.jsx)(fv,{label:(0,Dt.__)("Block spacing"),min:0,onChange:Xe,showSideInLabel:!1,sides:se?q:["top"],values:xe,allowReset:!1})]}),Ut&&(0,Ue.jsx)(Nce,{value:Ct,onChange:Sa,parentLayout:n?.parentLayout,panelId:i,isShownByDefault:s.childLayout??bs.childLayout}),we&&(0,Ue.jsx)(Vt.__experimentalToolsPanelItem,{hasValue:Qt,label:(0,Dt.__)("Minimum height"),onDeselect:Wo,isShownByDefault:s.minHeight??bs.minHeight,panelId:i,children:(0,Ue.jsx)(yp,{label:(0,Dt.__)("Minimum height"),value:ot,onChange:Ce,dimensionSizes:u?.dimensionSizes})}),$o&&(0,Ue.jsx)(Vt.__experimentalToolsPanelItem,{hasValue:nt,label:(0,Dt.__)("Minimum width"),onDeselect:co,isShownByDefault:s.minWidth??bs.minWidth,panelId:i,children:(0,Ue.jsx)(yp,{label:(0,Dt.__)("Minimum width"),value:Yn,onChange:ze,dimensionSizes:u?.dimensionSizes})}),lo&&(0,Ue.jsx)(Vt.__experimentalToolsPanelItem,{hasValue:He,label:(0,Dt.__)("Height"),onDeselect:rt,isShownByDefault:s.height??bs.height,panelId:i,children:(0,Ue.jsx)(yp,{label:(0,Dt.__)("Height"),value:Qe,onChange:jt,dimensionSizes:u?.dimensionSizes})}),je&&(0,Ue.jsx)(Vt.__experimentalToolsPanelItem,{hasValue:be,label:(0,Dt.__)("Width"),onDeselect:gr,isShownByDefault:s.width??bs.width,panelId:i,children:(0,Ue.jsx)(yp,{label:(0,Dt.__)("Width"),value:wt,onChange:So,dimensionSizes:u?.dimensionSizes})}),Rt&&(0,Ue.jsx)(NP,{hasValue:ge,value:Vo,onChange:bt,panelId:i,isShownByDefault:s.aspectRatio??bs.aspectRatio})]})}var fn=l(A(),1),yv=l(R(),1),kv=l(N(),1);var Dp=l(N(),1),No=l(A(),1),FP=l(R(),1);var Ft=l(w(),1),VP=[];function oAe({shadow:e,onShadowChange:t,settings:o}){let r=Ez(o);return(0,Ft.jsx)("div",{className:"block-editor-global-styles__shadow-popover-container",children:(0,Ft.jsxs)(No.__experimentalVStack,{spacing:4,children:[(0,Ft.jsx)(No.__experimentalHeading,{level:5,children:(0,Dp.__)("Drop shadow")}),(0,Ft.jsx)(rAe,{presets:r,activeShadow:e,onSelect:t}),(0,Ft.jsx)("div",{className:"block-editor-global-styles__clear-shadow",children:(0,Ft.jsx)(No.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>t(void 0),disabled:!e,accessibleWhenDisabled:!0,children:(0,Dp.__)("Clear")})})]})})}function rAe({presets:e,activeShadow:t,onSelect:o}){return e?(0,Ft.jsx)(No.Composite,{role:"listbox",className:"block-editor-global-styles__shadow__list","aria-label":(0,Dp.__)("Drop shadows"),children:e.map(({name:r,slug:n,shadow:i})=>(0,Ft.jsx)(nAe,{label:r,isActive:i===t,type:n==="unset"?"unset":"preset",onSelect:()=>o(i===t?void 0:i),shadow:i},n))}):null}function nAe({type:e,label:t,isActive:o,onSelect:r,shadow:n}){return(0,Ft.jsx)(No.Tooltip,{text:t,children:(0,Ft.jsx)(No.Composite.Item,{role:"option","aria-label":t,"aria-selected":o,className:D("block-editor-global-styles__shadow__item",{"is-active":o}),render:(0,Ft.jsx)("button",{className:D("block-editor-global-styles__shadow-indicator",{unset:e==="unset"}),onClick:r,style:{boxShadow:n},"aria-label":t,children:o&&(0,Ft.jsx)(Ie,{icon:Li})})})})}function qce({shadow:e,onShadowChange:t,settings:o}){return(0,Ft.jsx)(No.Dropdown,{popoverProps:{placement:"left-start",offset:36,shift:!0},className:"block-editor-global-styles__shadow-dropdown",renderToggle:iAe(e,t),renderContent:()=>(0,Ft.jsx)(No.__experimentalDropdownContentWrapper,{paddingSize:"medium",children:(0,Ft.jsx)(oAe,{shadow:e,onShadowChange:t,settings:o})})})}function iAe(e,t){return function({onToggle:r,isOpen:n}){let i=(0,FP.useRef)(void 0),s={onClick:r,className:D("block-editor-global-styles__shadow-dropdown-toggle",{"is-open":n}),"aria-expanded":n,ref:i},a={onClick:()=>{n&&r(),t(void 0),i.current?.focus()},className:D("block-editor-global-styles__shadow-editor__remove-button",{"is-open":n}),label:(0,Dp.__)("Remove")};return(0,Ft.jsxs)(Ft.Fragment,{children:[(0,Ft.jsx)(No.Button,{__next40pxDefaultSize:!0,...s,children:(0,Ft.jsxs)(No.__experimentalHStack,{justify:"flex-start",children:[(0,Ft.jsx)(Ie,{className:"block-editor-global-styles__toggle-icon",icon:iM,size:24}),(0,Ft.jsx)(No.FlexItem,{children:(0,Dp.__)("Drop shadow")})]})}),!!e&&(0,Ft.jsx)(No.Button,{__next40pxDefaultSize:!0,size:"small",icon:kr,...a})]})}}function Ez(e){return(0,FP.useMemo)(()=>{if(!e?.shadow)return VP;let t=e?.shadow?.defaultPresets,{default:o,theme:r,custom:n}=e?.shadow?.presets??{},i={name:(0,Dp.__)("Unset"),slug:"unset",shadow:"none"},s=[...t&&o||VP,...r||VP,...n||VP];return s.length&&s.unshift(i),s},[e])}var ma=l(w(),1);function zP(e){return Object.values($S(e)).some(Boolean)}function $S(e){return{hasBorderColor:Zce(e),hasBorderRadius:Xce(e),hasBorderStyle:Qce(e),hasBorderWidth:Jce(e),hasShadow:eue(e)}}function Zce(e){return e?.border?.color}function Xce(e){return e?.border?.radius}function Qce(e){return e?.border?.style}function Jce(e){return e?.border?.width}function eue(e){let t=Ez(e);return!!e?.shadow&&t.length>0}function sAe({resetAllFilter:e,onChange:t,value:o,panelId:r,children:n,label:i}){let s=zo();return(0,ma.jsx)(fn.__experimentalToolsPanel,{label:i,resetAll:()=>{let c=e(o);t(c)},panelId:r,dropdownMenuProps:s,children:n})}var aAe={radius:!0,color:!0,width:!0,shadow:!0};function jP({as:e=sAe,value:t,onChange:o,inheritedValue:r=t,settings:n,panelId:i,name:s,defaultControls:a=aAe}){let c=dl(n),u=(0,yv.useCallback)(z=>Fr({settings:n},"",z),[n]),d=z=>{let G=c.flatMap(({colors:W})=>W).find(({color:W})=>W===z);return G?"var:preset|color|"+G.slug:z},f=(0,yv.useMemo)(()=>{if((0,fn.__experimentalHasSplitBorders)(r?.border)){let z={...r?.border};return["top","right","bottom","left"].forEach(U=>{z[U]={...z[U],color:u(z[U]?.color)}}),z}return{...r?.border,color:r?.border?.color?u(r?.border?.color):void 0}},[r?.border,u]),m=z=>o({...t,border:z}),h=Zce(n),p=Qce(n),g=Jce(n),b=Xce(n),k=(0,yv.useMemo)(()=>typeof r?.border?.radius!="object"?u(r?.border?.radius):{topLeft:u(r?.border?.radius?.topLeft),topRight:u(r?.border?.radius?.topRight),bottomLeft:u(r?.border?.radius?.bottomLeft),bottomRight:u(r?.border?.radius?.bottomRight)},[r?.border?.radius,u]),v=z=>m({...f,radius:z}),y=()=>{let z=t?.border?.radius;return typeof z=="object"?Object.entries(z).some(Boolean):!!z},_=eue(n),S=u(r?.shadow),C=n?.shadow?.presets??{},B=C.custom??C.theme??C.default??[],T=z=>{let U=B?.find(({shadow:G})=>G===z)?.slug;o(de(t,["shadow"],U?`var:preset|shadow|${U}`:z||void 0))},I=()=>!!t?.shadow,E=()=>T(void 0),L=()=>{if(y())return m({radius:t?.border?.radius});m(void 0)},P=z=>{let U={...z};(0,fn.__experimentalHasSplitBorders)(U)?["top","right","bottom","left"].forEach(G=>{U[G]&&(U[G]={...U[G],color:d(U[G]?.color)})}):U&&(U.color=d(U.color)),m({radius:f?.radius,...U})},O=(0,yv.useCallback)(z=>({...z,border:void 0,shadow:void 0}),[]),V=a?.color||a?.width,j=h||p||g||b,H=_v({blockName:s,hasShadowControl:_,hasBorderControl:j});return(0,ma.jsxs)(e,{resetAllFilter:O,value:t,onChange:o,panelId:i,label:H,children:[(g||h)&&(0,ma.jsx)(fn.__experimentalToolsPanelItem,{hasValue:()=>(0,fn.__experimentalIsDefinedBorder)(t?.border),label:(0,kv.__)("Border"),onDeselect:()=>L(),isShownByDefault:V,panelId:i,children:(0,ma.jsx)(fn.BorderBoxControl,{colors:c,enableAlpha:!0,enableStyle:p,onChange:P,popoverOffset:40,popoverPlacement:"left-start",value:f,__experimentalIsRenderedInSidebar:!0,size:"__unstable-large",hideLabelFromVision:!_,label:(0,kv.__)("Border")})}),b&&(0,ma.jsx)(fn.__experimentalToolsPanelItem,{hasValue:y,label:(0,kv.__)("Radius"),onDeselect:()=>v(void 0),isShownByDefault:a.radius,panelId:i,children:(0,ma.jsx)(XI,{presets:n?.border?.radiusSizes,values:k,onChange:z=>{v(z||void 0)}})}),_&&(0,ma.jsxs)(fn.__experimentalToolsPanelItem,{label:(0,kv.__)("Shadow"),hasValue:I,onDeselect:E,isShownByDefault:a.shadow,panelId:i,children:[j?(0,ma.jsx)(fn.BaseControl.VisualLabel,{as:"legend",children:(0,kv.__)("Shadow")}):null,(0,ma.jsx)(qce,{shadow:S,onShadowChange:T,settings:n})]})]})}var no=l(A(),1),HP=l(R(),1),ro=l(N(),1);var ht=l(w(),1);function GP(e){let t=oue(e),o=sue(e),r=rue(e),n=uf(e),i=iue(e),s=nue(e);return t||o||r||n||i||s}function oue(e){let t=dl(e);return e?.color?.text&&(t?.length>0||e?.color?.custom)}function rue(e){let t=dl(e);return e?.color?.link&&(t?.length>0||e?.color?.custom)}function nue(e){let t=dl(e);return e?.color?.caption&&(t?.length>0||e?.color?.custom)}function uf(e){let t=dl(e),o=Np(e);return e?.color?.heading&&(t?.length>0||e?.color?.custom||o?.length>0||e?.color?.customGradient)}function iue(e){let t=dl(e),o=Np(e);return e?.color?.button&&(t?.length>0||e?.color?.custom||o?.length>0||e?.color?.customGradient)}function sue(e){let t=dl(e),o=Np(e);return e?.color?.background&&(t?.length>0||e?.color?.custom||o?.length>0||e?.color?.customGradient)}function Tz({resetAllFilter:e,onChange:t,value:o,panelId:r,children:n,label:i}){let s=zo(),a=()=>{let c=e(o);t(c)};return(0,ht.jsx)(no.__experimentalToolsPanel,{label:i||(0,ro.__)("Elements"),resetAll:a,panelId:r,hasInnerWrapper:!0,headingLevel:3,className:"color-block-support-panel",__experimentalFirstVisibleItemClass:"first",__experimentalLastVisibleItemClass:"last",dropdownMenuProps:s,children:(0,ht.jsx)("div",{className:"color-block-support-panel__inner-wrapper",children:n})})}var lAe={text:!0,background:!0,link:!0,heading:!0,button:!0,caption:!0},cAe={placement:"left-start",offset:36,shift:!0},{Tabs:UP}=M(no.privateApis),uAe=({indicators:e,label:t})=>(0,ht.jsxs)(no.__experimentalHStack,{justify:"flex-start",children:[(0,ht.jsx)(no.__experimentalZStack,{isLayered:!1,offset:-8,children:e.map((o,r)=>(0,ht.jsx)(no.Flex,{expanded:!1,children:(0,ht.jsx)(no.ColorIndicator,{colorValue:o})},r))}),(0,ht.jsx)(no.FlexItem,{className:"block-editor-panel-color-gradient-settings__color-name",children:t})]});function tue({isGradient:e,inheritedValue:t,userValue:o,setValue:r,colorGradientControlSettings:n}){return(0,ht.jsx)(Kd,{...n,showTitle:!1,enableAlpha:!0,__experimentalIsRenderedInSidebar:!0,colorValue:e?void 0:t,gradientValue:e?t:void 0,onColorChange:e?void 0:r,onGradientChange:e?r:void 0,clearable:t===o,headingLevel:3})}function Iz({label:e,hasValue:t,resetValue:o,isShownByDefault:r,indicators:n,tabs:i,colorGradientControlSettings:s,panelId:a,className:c="block-editor-tools-panel-color-gradient-settings__item"}){let u=i.find(h=>h.userValue!==void 0),{key:d,...f}=i[0]??{},m=(0,HP.useRef)(void 0);return(0,ht.jsx)(no.__experimentalToolsPanelItem,{className:c,hasValue:t,label:e,onDeselect:o,isShownByDefault:r,panelId:a,children:(0,ht.jsx)(no.Dropdown,{popoverProps:cAe,className:"block-editor-tools-panel-color-gradient-settings__dropdown",renderToggle:({onToggle:h,isOpen:p})=>{let g={onClick:h,className:D("block-editor-panel-color-gradient-settings__dropdown",{"is-open":p}),"aria-expanded":p,ref:m};return(0,ht.jsxs)(ht.Fragment,{children:[(0,ht.jsx)(no.Button,{...g,__next40pxDefaultSize:!0,children:(0,ht.jsx)(uAe,{indicators:n,label:e})}),t()&&(0,ht.jsx)(no.Button,{__next40pxDefaultSize:!0,label:(0,ro.__)("Reset"),className:"block-editor-panel-color-gradient-settings__reset",size:"small",icon:kr,onClick:()=>{o(),p&&h(),m.current?.focus()}})]})},renderContent:()=>(0,ht.jsx)(no.__experimentalDropdownContentWrapper,{paddingSize:"none",children:(0,ht.jsxs)("div",{className:"block-editor-panel-color-gradient-settings__dropdown-content",children:[i.length===1&&(0,ht.jsx)(tue,{...f,colorGradientControlSettings:s},d),i.length>1&&(0,ht.jsxs)(UP,{defaultTabId:u?.key,children:[(0,ht.jsx)(UP.TabList,{children:i.map(h=>(0,ht.jsx)(UP.Tab,{tabId:h.key,children:h.label},h.key))}),i.map(h=>{let{key:p,...g}=h;return(0,ht.jsx)(UP.TabPanel,{tabId:p,focusable:!1,children:(0,ht.jsx)(tue,{...g,colorGradientControlSettings:s},p)},p)})]})]})})})})}function WP({as:e=Tz,value:t,onChange:o,inheritedValue:r=t,settings:n,panelId:i,defaultControls:s=lAe,label:a,children:c}){let u=dl(n),d=Np(n),f=n?.color?.custom,m=n?.color?.customGradient,h=u.length>0||f,p=d.length>0||m,g=!!n?.background?.gradient,b=p&&!g,k=q=>Fr({settings:n},"",q),v=q=>{let pe=u.flatMap(({colors:xe})=>xe).find(({color:xe})=>xe===q);return pe?"var:preset|color|"+pe.slug:q},y=q=>{let pe=d.flatMap(({gradients:xe})=>xe).find(({gradient:xe})=>xe===q);return pe?"var:preset|gradient|"+pe.slug:q},_=sue(n),S=k(r?.color?.background),C=k(t?.color?.background),B=k(r?.color?.gradient),T=k(t?.color?.gradient),I=()=>!!C||!g&&!!T,E=q=>{let se=de(t,["color","background"],v(q));g||(se.color.gradient=void 0),o(se)},L=q=>{let se=de(t,["color","gradient"],y(q));se.color.background=void 0,o(se)},P=()=>{let q=de(t,["color","background"],void 0);g||(q.color.gradient=void 0),o(q)},O=rue(n),V=k(r?.elements?.link?.color?.text),j=k(t?.elements?.link?.color?.text),H=q=>{o(de(t,["elements","link","color","text"],v(q)))},z=k(r?.elements?.link?.[":hover"]?.color?.text),U=k(t?.elements?.link?.[":hover"]?.color?.text),G=q=>{o(de(t,["elements","link",":hover","color","text"],v(q)))},W=()=>!!j||!!U,J=()=>{let q=de(t,["elements","link",":hover","color","text"],void 0);q=de(q,["elements","link","color","text"],void 0),o(q)},le=oue(n),oe=k(r?.color?.text),re=k(t?.color?.text),Q=()=>!!re,$=q=>{let se=de(t,["color","text"],v(q));oe===V&&(se=de(se,["elements","link","color","text"],v(q))),o(se)},ee=()=>$(void 0),Y=[{name:"caption",label:(0,ro.__)("Captions"),showPanel:nue(n)},{name:"button",label:(0,ro.__)("Button"),showPanel:iue(n)},{name:"heading",label:(0,ro.__)("Heading"),showPanel:uf(n)},{name:"h1",label:(0,ro.__)("H1"),showPanel:uf(n)},{name:"h2",label:(0,ro.__)("H2"),showPanel:uf(n)},{name:"h3",label:(0,ro.__)("H3"),showPanel:uf(n)},{name:"h4",label:(0,ro.__)("H4"),showPanel:uf(n)},{name:"h5",label:(0,ro.__)("H5"),showPanel:uf(n)},{name:"h6",label:(0,ro.__)("H6"),showPanel:uf(n)}],te=(0,HP.useCallback)(q=>({...q,color:void 0,elements:{...q?.elements,link:{...q?.elements?.link,color:void 0,":hover":{color:void 0}},...Y.reduce((se,pe)=>({...se,[pe.name]:{...q?.elements?.[pe.name],color:void 0}}),{})}}),[Y]),ne=[le&&{key:"text",label:(0,ro.__)("Text"),hasValue:Q,resetValue:ee,isShownByDefault:s.text,indicators:[oe],tabs:[{key:"text",label:(0,ro.__)("Text"),inheritedValue:oe,setValue:$,userValue:re}]},_&&{key:"background",label:(0,ro.__)("Background"),hasValue:I,resetValue:P,isShownByDefault:s.background,indicators:[(b?B:void 0)??S],tabs:[h&&{key:"background",label:(0,ro.__)("Color"),inheritedValue:S,setValue:E,userValue:C},b&&{key:"gradient",label:(0,ro.__)("Gradient"),inheritedValue:B,setValue:L,userValue:T,isGradient:!0}].filter(Boolean)},O&&{key:"link",label:(0,ro.__)("Link"),hasValue:W,resetValue:J,isShownByDefault:s.link,indicators:[V,z],tabs:[{key:"link",label:(0,ro.__)("Default"),inheritedValue:V,setValue:H,userValue:j},{key:"hover",label:(0,ro.__)("Hover"),inheritedValue:z,setValue:G,userValue:U}]}].filter(Boolean);return Y.forEach(({name:q,label:se,showPanel:pe})=>{if(!pe)return;let xe=k(r?.elements?.[q]?.color?.background),Te=k(r?.elements?.[q]?.color?.gradient),Xe=k(r?.elements?.[q]?.color?.text),dt=k(t?.elements?.[q]?.color?.background),ft=k(t?.elements?.[q]?.color?.gradient),we=k(t?.elements?.[q]?.color?.text),ot=()=>!!(we||dt||ft),Ce=()=>{let rt=de(t,["elements",q,"color","background"],void 0);rt.elements[q].color.gradient=void 0,rt.elements[q].color.text=void 0,o(rt)},Wo=rt=>{o(de(t,["elements",q,"color","text"],v(rt)))},Qt=rt=>{let He=de(t,["elements",q,"color","background"],v(rt));He.elements[q].color.gradient=void 0,o(He)},lo=rt=>{let He=de(t,["elements",q,"color","gradient"],y(rt));He.elements[q].color.background=void 0,o(He)},Qe=!0,jt=q!=="caption";ne.push({key:q,label:se,hasValue:ot,resetValue:Ce,isShownByDefault:s[q],indicators:Qe&&jt?[Xe,Te??xe]:[Qe?Xe:Te??xe],tabs:[h&&Qe&&{key:"text",label:(0,ro.__)("Text"),inheritedValue:Xe,setValue:Wo,userValue:we},h&&jt&&{key:"background",label:(0,ro.__)("Background"),inheritedValue:xe,setValue:Qt,userValue:dt},p&&jt&&{key:"gradient",label:(0,ro.__)("Gradient"),inheritedValue:Te,setValue:lo,userValue:ft,isGradient:!0}].filter(Boolean)})}),(0,ht.jsxs)(e,{resetAllFilter:te,value:t,onChange:o,panelId:i,label:a,children:[ne.map(q=>{let{key:se,...pe}=q;return(0,ht.jsx)(Iz,{...pe,colorGradientControlSettings:{colors:u,disableCustomColors:!f,gradients:d,disableCustomGradients:!m},panelId:i},se)}),c]})}var _t=l(A(),1),Vc=l(N(),1),Sv=l(R(),1);var go=l(w(),1),$P=[];function aue(e,{presetSetting:t,defaultSetting:o}){let r=!e?.color?.[o],n=e?.color?.[t]?.custom||$P,i=e?.color?.[t]?.theme||$P,s=e?.color?.[t]?.default||$P;return(0,Sv.useMemo)(()=>[...n,...i,...r?$P:s],[r,n,i,s])}function lue(e){return cue(e)}function cue(e){return e.color.customDuotone||e.color.defaultDuotone||e.color.duotone.length>0}function dAe({resetAllFilter:e,onChange:t,value:o,panelId:r,children:n}){let i=zo(),s=()=>{let a=e(o);t(a)};return(0,go.jsx)(_t.__experimentalToolsPanel,{label:(0,Vc._x)("Filters","Name for applying graphical effects"),resetAll:s,panelId:r,dropdownMenuProps:i,children:n})}var fAe={duotone:!0},mAe={placement:"left-start",offset:36,shift:!0,className:"block-editor-duotone-control__popover",headerTitle:(0,Vc.__)("Duotone")},pAe=({indicator:e,label:t})=>(0,go.jsxs)(_t.__experimentalHStack,{justify:"flex-start",children:[(0,go.jsx)(_t.__experimentalZStack,{isLayered:!1,offset:-8,children:(0,go.jsx)(_t.Flex,{expanded:!1,children:e==="unset"||!e?(0,go.jsx)(_t.ColorIndicator,{className:"block-editor-duotone-control__unset-indicator"}):(0,go.jsx)(_t.DuotoneSwatch,{values:e})})}),(0,go.jsx)(_t.FlexItem,{title:t,children:t})]}),hAe=(e,t)=>function({onToggle:r,isOpen:n}){let i=(0,Sv.useRef)(void 0),s={onClick:r,className:D("block-editor-global-styles-filters-panel__dropdown-toggle",{"is-open":n}),"aria-expanded":n,ref:i},a={onClick:()=>{n&&r(),t(),i.current?.focus()},className:"block-editor-panel-duotone-settings__reset",label:(0,Vc.__)("Reset")};return(0,go.jsxs)(go.Fragment,{children:[(0,go.jsx)(_t.Button,{__next40pxDefaultSize:!0,...s,children:(0,go.jsx)(pAe,{indicator:e,label:(0,Vc.__)("Duotone")})}),e&&(0,go.jsx)(_t.Button,{size:"small",icon:kr,...a})]})};function KP({as:e=dAe,value:t,onChange:o,inheritedValue:r=t,settings:n,panelId:i,defaultControls:s=fAe}){let a=b=>Fr({settings:n},"",b),c=cue(n),u=aue(n,{presetSetting:"duotone",defaultSetting:"defaultDuotone"}),d=aue(n,{presetSetting:"palette",defaultSetting:"defaultPalette"}),f=a(r?.filter?.duotone),m=b=>{let k=u.find(({colors:y})=>y===b),v=k?`var:preset|duotone|${k.slug}`:b;o(de(t,["filter","duotone"],v))},h=()=>!!t?.filter?.duotone,p=()=>m(void 0),g=(0,Sv.useCallback)(b=>({...b,filter:{...b.filter,duotone:void 0}}),[]);return(0,go.jsx)(e,{resetAllFilter:g,value:t,onChange:o,panelId:i,children:c&&(0,go.jsx)(_t.__experimentalToolsPanelItem,{label:(0,Vc.__)("Duotone"),hasValue:h,onDeselect:p,isShownByDefault:s.duotone,panelId:i,children:(0,go.jsx)(_t.Dropdown,{popoverProps:mAe,className:"block-editor-global-styles-filters-panel__dropdown",renderToggle:hAe(f,p),renderContent:()=>(0,go.jsx)(_t.__experimentalDropdownContentWrapper,{paddingSize:"small",children:(0,go.jsxs)(_t.MenuGroup,{label:(0,Vc.__)("Duotone"),children:[(0,go.jsx)("p",{children:(0,Vc.__)("Create a two-tone color effect without losing your original image.")}),(0,go.jsx)(_t.DuotonePicker,{colorPalette:d,duotonePalette:u,disableCustomColors:!0,disableCustomDuotone:!0,value:f,onChange:m})]})})})})})}var xv=l(A(),1),KS=l(N(),1);var Vp=l(w(),1);function uue(e,t,o){return e==="core/image"&&o?.lightbox?.allowEditing||!!t?.lightbox}function due({onChange:e,value:t,inheritedValue:o,panelId:r}){let n=zo(),i=()=>{e(void 0)},s=c=>{e({enabled:c})},a=!1;return o?.lightbox?.enabled&&(a=o.lightbox.enabled),(0,Vp.jsx)(Vp.Fragment,{children:(0,Vp.jsx)(xv.__experimentalToolsPanel,{label:(0,KS._x)("Settings","Image settings"),resetAll:i,panelId:r,dropdownMenuProps:n,children:(0,Vp.jsx)(xv.__experimentalToolsPanelItem,{hasValue:()=>!!t?.lightbox,label:(0,KS.__)("Enlarge on click"),onDeselect:i,isShownByDefault:!0,panelId:r,children:(0,Vp.jsx)(xv.ToggleControl,{label:(0,KS.__)("Enlarge on click"),checked:a,onChange:s})})})})}var wv=l(A(),1),fue=l(R(),1),YP=l(N(),1);var YS=l(w(),1);function qP(e){return!(typeof e=="string"&&/<\/?\w/.test(e))}function ZP({value:e,onChange:t,inheritedValue:o=e,help:r}){let[n,i]=(0,fue.useState)(null),s=o?.css;function a(u){if(t({...e,css:u}),!qP(u)){i((0,YP.__)("The custom CSS is invalid. Do not use <> markup."));return}n&&i(null)}function c(u){let d=u?.target?.value;if(!d||!qP(d))return;let[f]=xg([{css:d}],".for-validation-only");i(f===null?(0,YP.__)("There is an error with your CSS structure."):null)}return(0,YS.jsxs)(wv.__experimentalVStack,{spacing:3,children:[n&&(0,YS.jsx)(wv.Notice,{status:"error",onRemove:()=>i(null),children:n}),(0,YS.jsx)(wv.TextareaControl,{label:(0,YP.__)("Additional CSS"),value:s,onChange:u=>a(u),onBlur:c,className:"block-editor-global-styles-advanced-panel__custom-css-input",spellCheck:!1,help:r})]})}var eR=l(A(),1),XS=l(R(),1),ZS=l(N(),1);var Oe=l(A(),1);var zt=l(N(),1),pue=l(Xn(),1),Pz=l(qn(),1),Fc=l(R(),1),qS=l(F(),1),hue=l(Fe(),1),gue=l(B3(),1);var Ee=l(w(),1),XP="image",gAe={placement:"left-start",offset:36,shift:!0,className:"block-editor-global-styles-background-panel__popover"},JP=()=>{},QP=e=>{window.requestAnimationFrame(()=>{let[t]=hue.focus.tabbable.find(e?.current);t&&t.focus()})};function bAe(e){return e==="cover"||e===void 0?(0,zt.__)("Image covers the space evenly."):e==="contain"?(0,zt.__)("Image is contained without distortion."):(0,zt.__)("Image has a fixed width.")}var vAe=e=>{if(!e||isNaN(e.x)&&isNaN(e.y))return;let t=isNaN(e.x)?.5:e.x,o=isNaN(e.y)?.5:e.y;return`${t*100}% ${o*100}%`},kAe=e=>{if(!e)return{x:void 0,y:void 0};let[t,o]=e.split(" ").map(r=>parseFloat(r)/100);return t=isNaN(t)?void 0:t,o=isNaN(o)?t:o,{x:t,y:o}};function bue({as:e="span",imgUrl:t,toggleProps:o={},filename:r,label:n,onToggleCallback:i=JP}){let{isOpen:s,...a}=o;(0,Fc.useEffect)(()=>{typeof s<"u"&&i(s)},[s,i]);let c=()=>(0,Ee.jsxs)(Oe.__experimentalHStack,{className:"block-editor-global-styles-background-panel__inspector-preview-inner",children:[(0,Ee.jsx)("span",{className:"block-editor-global-styles-background-panel__inspector-image-indicator",style:{backgroundImage:t?`url(${t})`:void 0}}),(0,Ee.jsxs)(Oe.FlexBlock,{children:[(0,Ee.jsx)(Oe.__experimentalTruncate,{numberOfLines:1,className:"block-editor-global-styles-background-panel__inspector-media-replace-title",children:n}),(0,Ee.jsx)(We,{render:(0,Ee.jsx)("span",{}),children:t?(0,zt.sprintf)((0,zt.__)("Background image: %s"),r||n):(0,zt.__)("No background image selected")})]})]});return e==="button"?(0,Ee.jsx)(Oe.Button,{__next40pxDefaultSize:!0,...a,children:c()}):c()}function yAe({label:e,filename:t,url:o,children:r,onToggle:n=JP,hasImageValue:i,onReset:s,containerRef:a}){if(!i)return;let c=e||(0,Pz.getFilename)(o)||(0,zt.__)("Image");return(0,Ee.jsx)(Oe.Dropdown,{popoverProps:gAe,renderToggle:({onToggle:u,isOpen:d})=>{let f={onClick:u,className:"block-editor-global-styles-background-panel__dropdown-toggle","aria-expanded":d,"aria-label":(0,zt.__)("Background size, position and repeat options."),isOpen:d};return(0,Ee.jsxs)(Ee.Fragment,{children:[(0,Ee.jsx)(bue,{imgUrl:o,filename:t,label:c,toggleProps:f,as:"button",onToggleCallback:n}),s&&(0,Ee.jsx)(Oe.Button,{__next40pxDefaultSize:!0,label:(0,zt.__)("Reset"),className:"block-editor-global-styles-background-panel__reset",size:"small",icon:kr,onClick:()=>{s(),d&&u(),QP(a)}})]})},renderContent:()=>(0,Ee.jsx)(Oe.__experimentalDropdownContentWrapper,{className:"block-editor-global-styles-background-panel__dropdown-content-wrapper",paddingSize:"medium",children:r})})}function _Ae(){return(0,Ee.jsx)(Oe.Placeholder,{className:"block-editor-global-styles-background-panel__loading",children:(0,Ee.jsx)(Oe.Spinner,{})})}function mue({onChange:e,style:t,inheritedValue:o,onRemoveImage:r=JP,onResetImage:n=JP,displayInPanel:i,defaultValues:s,containerRef:a}){let[c,u]=(0,Fc.useState)(!1),{getSettings:d}=(0,qS.useSelect)(x),{id:f,title:m,url:h}=t?.background?.backgroundImage||{...o?.background?.backgroundImage},{createErrorNotice:p}=(0,qS.useDispatch)(pue.store),g=B=>{p(B,{type:"snackbar"}),u(!1)},b=()=>e(de(t,["background","backgroundImage"],void 0)),k=B=>{if(!B||!B.url){b(),u(!1);return}if((0,gue.isBlobURL)(B.url)){u(!0);return}if(B.media_type&&B.media_type!==XP||!B.media_type&&B.type&&B.type!==XP){g((0,zt.__)("Only images can be used as a background image."));return}let T=t?.background?.backgroundSize||s?.backgroundSize,I=t?.background?.backgroundPosition;e(de(t,["background"],{...t?.background,backgroundImage:{url:B.url,id:B.id,source:"file",title:B.title||void 0},backgroundPosition:!I&&(T==="auto"||!T)?"50% 0":I,backgroundSize:T})),u(!1),QP(a)},v=B=>{d().mediaUpload({allowedTypes:[XP],filesList:B,onFileChange([T]){k(T)},onError:g,multiple:!1})},y=df(t),_=()=>e(de(t,["background"],{backgroundImage:"none"})),S=!y&&df(o),C=m||(0,Pz.getFilename)(h)||(0,zt.__)("Image");return(0,Ee.jsxs)("div",{className:"block-editor-global-styles-background-panel__image-tools-panel-item",children:[c&&(0,Ee.jsx)(_Ae,{}),(0,Ee.jsx)(Xb,{mediaId:f,mediaURL:h,allowedTypes:[XP],accept:"image/*",onSelect:k,popoverProps:{className:D({"block-editor-global-styles-background-panel__media-replace-popover":i})},name:(0,Ee.jsx)(bue,{imgUrl:h,filename:m,label:C}),renderToggle:B=>(0,Ee.jsx)(Oe.Button,{...B,__next40pxDefaultSize:!0}),onError:g,onReset:()=>{QP(a),n()},children:S&&(0,Ee.jsx)(Oe.MenuItem,{onClick:()=>{QP(a),_(),r()},children:(0,zt.__)("Remove")})}),(0,Ee.jsx)(Oe.DropZone,{onFilesDrop:v,label:(0,zt.__)("Drop to upload")})]})}function SAe({onChange:e,style:t,inheritedValue:o,defaultValues:r}){let n=t?.background?.backgroundSize||o?.background?.backgroundSize,i=t?.background?.backgroundRepeat||o?.background?.backgroundRepeat,s=t?.background?.backgroundImage?.url||o?.background?.backgroundImage?.url,a=t?.background?.backgroundImage?.id,c=t?.background?.backgroundPosition||o?.background?.backgroundPosition,u=t?.background?.backgroundAttachment||o?.background?.backgroundAttachment,d=!n&&a?r?.backgroundSize:n||"auto";d=["cover","contain","auto"].includes(d)?d:"auto";let f=!(i==="no-repeat"||d==="cover"&&i===void 0),m=k=>{let v=i,y=c;k==="contain"&&(v="no-repeat",y=void 0),k==="cover"&&(v=void 0,y=void 0),(d==="cover"||d==="contain")&&k==="auto"&&(v=void 0,t?.background?.backgroundImage?.id&&(y="50% 0")),!k&&d==="auto"&&(k="auto"),e(de(t,["background"],{...t?.background,backgroundPosition:y,backgroundRepeat:v,backgroundSize:k}))},h=k=>{e(de(t,["background","backgroundPosition"],vAe(k)))},p=()=>e(de(t,["background","backgroundRepeat"],f===!0?"no-repeat":"repeat")),g=()=>e(de(t,["background","backgroundAttachment"],u==="fixed"?"scroll":"fixed")),b=!c&&a&&n==="contain"?r?.backgroundPosition:c;return(0,Ee.jsxs)(Oe.__experimentalVStack,{spacing:3,className:"single-column",children:[(0,Ee.jsx)(Oe.FocalPointPicker,{label:(0,zt.__)("Focal point"),url:s,value:kAe(b),onChange:h}),(0,Ee.jsx)(Oe.ToggleControl,{label:(0,zt.__)("Fixed background"),checked:u==="fixed",onChange:g}),(0,Ee.jsxs)(Oe.__experimentalToggleGroupControl,{size:"__unstable-large",label:(0,zt.__)("Size"),value:d,onChange:m,isBlock:!0,help:bAe(n||r?.backgroundSize),children:[(0,Ee.jsx)(Oe.__experimentalToggleGroupControlOption,{value:"cover",label:(0,zt._x)("Cover","Size option for background image control")},"cover"),(0,Ee.jsx)(Oe.__experimentalToggleGroupControlOption,{value:"contain",label:(0,zt._x)("Contain","Size option for background image control")},"contain"),(0,Ee.jsx)(Oe.__experimentalToggleGroupControlOption,{value:"auto",label:(0,zt._x)("Tile","Size option for background image control")},"tile")]}),(0,Ee.jsxs)(Oe.__experimentalHStack,{justify:"flex-start",spacing:2,as:"span",children:[(0,Ee.jsx)(Oe.__experimentalUnitControl,{"aria-label":(0,zt.__)("Background image width"),onChange:m,value:n,size:"__unstable-large",__unstableInputWidth:"100px",min:0,placeholder:(0,zt.__)("Auto"),disabled:d!=="auto"||d===void 0}),(0,Ee.jsx)(Oe.ToggleControl,{label:(0,zt.__)("Repeat"),checked:f,onChange:p,disabled:d==="cover"})]})]})}function vue({value:e,onChange:t,inheritedValue:o=e,settings:r,defaultValues:n={}}){let{globalStyles:i,_links:s}=(0,qS.useSelect)(k=>{let{getSettings:v}=k(x),y=v();return{globalStyles:y[Oi],_links:y[J0]}},[]),a=(0,Fc.useMemo)(()=>{let k={background:{}};return o?.background?(Object.entries(o?.background).forEach(([v,y])=>{k.background[v]=ub(y,{styles:i,_links:s})}),k):o},[i,s,o]),c=()=>t(de(e,["background"],{})),{title:u,url:d}=e?.background?.backgroundImage||{...a?.background?.backgroundImage},f=df(e)||df(a),m=e?.background?.backgroundImage||o?.background?.backgroundImage,h=f&&m!=="none"&&(r?.background?.backgroundSize||r?.background?.backgroundPosition||r?.background?.backgroundRepeat),[p,g]=(0,Fc.useState)(!1),b=(0,Fc.useRef)();return(0,Ee.jsx)("div",{ref:b,className:D("block-editor-global-styles-background-panel__inspector-media-replace-container",{"is-open":p}),children:h?(0,Ee.jsx)(yAe,{label:u,filename:u,url:d,onToggle:g,hasImageValue:f,onReset:c,containerRef:b,children:(0,Ee.jsxs)(Oe.__experimentalVStack,{spacing:3,className:"single-column",children:[(0,Ee.jsx)(mue,{onChange:t,style:e,inheritedValue:a,displayInPanel:!0,onResetImage:()=>{g(!1),c()},onRemoveImage:()=>g(!1),defaultValues:n,containerRef:b}),(0,Ee.jsx)(SAe,{onChange:t,style:e,defaultValues:n,inheritedValue:a})]})}):(0,Ee.jsx)(mue,{onChange:t,style:e,inheritedValue:a,defaultValues:n,onResetImage:()=>{g(!1),c()},onRemoveImage:()=>g(!1),containerRef:b})})}var ff=l(w(),1),xAe={backgroundImage:!0,gradient:!0};function kue(e,t){return XS.Platform.OS==="web"&&e?.background?.[t]}function tR(e){let{backgroundImage:t,gradient:o}=e?.background||{};return XS.Platform.OS==="web"&&(t||o)}function df(e){return!!e?.background?.backgroundImage?.id||typeof e?.background?.backgroundImage=="string"||!!e?.background?.backgroundImage?.url}function Rz(e){return typeof e?.background?.gradient=="string"&&e?.background?.gradient!==""}function wAe({resetAllFilter:e,onChange:t,value:o,panelId:r,children:n,headerLabel:i}){let s=zo();return(0,ff.jsx)(eR.__experimentalToolsPanel,{label:i,resetAll:()=>{let c=e(o);t(c)},panelId:r,hasInnerWrapper:!0,className:"background-block-support-panel",__experimentalFirstVisibleItemClass:"first",__experimentalLastVisibleItemClass:"last",dropdownMenuProps:s,children:(0,ff.jsx)("div",{className:"background-block-support-panel__inner-wrapper",children:n})})}function oR({as:e=wAe,value:t,onChange:o,inheritedValue:r,settings:n,panelId:i,defaultControls:s=xAe,defaultValues:a={},headerLabel:c=(0,ZS.__)("Background")}){let u=Np(n),d=n?.color?.customGradient,f=u.length>0||d,m=kue(n,"gradient"),h=f&&m,p=kue(n,"backgroundImage"),g=(0,XS.useCallback)(B=>({...B,background:{},color:m?{...B?.color,gradient:void 0}:B?.color}),[m]);if(!h&&!p)return null;let b=B=>Fr({settings:n},"",B),k=B=>{let I=u.flatMap(({gradients:E})=>E).find(({gradient:E})=>E===B);return I?"var:preset|gradient|"+I.slug:B},v=()=>o(de(t,["background","backgroundImage"],void 0)),y=()=>{let B=de(t,["background","gradient"],void 0);B=de(B,["color","gradient"],void 0),o(B)},_=b(t?.background?.gradient??t?.color?.gradient),S=b(r?.background?.gradient??r?.color?.gradient),C=B=>{let T=de(t,["background","gradient"],k(B));T=de(T,["color","gradient"],void 0),o(T)};return(0,ff.jsxs)(e,{resetAllFilter:g,value:t,onChange:o,panelId:i,headerLabel:c,children:[p&&(0,ff.jsx)(eR.__experimentalToolsPanelItem,{className:"block-editor-background-panel__item",hasValue:()=>df(t),label:(0,ZS.__)("Image"),onDeselect:v,isShownByDefault:s.backgroundImage,panelId:i,children:(0,ff.jsx)(vue,{value:t,onChange:o,settings:n,inheritedValue:r,defaultControls:s,defaultValues:a})}),h&&(0,ff.jsx)(Iz,{className:"block-editor-background-panel__item",label:(0,ZS.__)("Gradient"),hasValue:()=>Rz(t),resetValue:y,isShownByDefault:s.gradient,indicators:[_],tabs:[{key:"gradient",label:(0,ZS.__)("Gradient"),inheritedValue:_??S,setValue:C,userValue:_,isGradient:!0}],colorGradientControlSettings:{gradients:u,disableCustomGradients:!d},panelId:i})]})}var Cv=l(N(),1);var fl=l(A(),1);var yi=l(w(),1),{Badge:CAe}=M(fl.privateApis);function yue({viewportStates:e=[],pseudoStates:t=[],viewportValue:o="default",pseudoStateValue:r="default",onChangeViewport:n,onChangePseudoState:i}){if(!e.length&&!t.length)return null;let s=[{label:(0,Cv.__)("Default"),value:"default"},...e.map(m=>({label:m.label,value:m.value}))],a=[{label:(0,Cv.__)("Default"),value:"default"},...t.map(m=>({label:m.label,value:m.value}))],c=e.length>0,u=t.length>0,d=(0,Cv.__)("States"),f=[];if(c&&o!=="default"){let m=s.find(h=>h.value===o);m&&f.push({key:`viewport-${m.value}`,label:m.label})}if(u&&r!=="default"){let m=a.find(h=>h.value===r);m&&f.push({key:`pseudo-${m.value}`,label:m.label})}return(0,yi.jsxs)(Re,{direction:"column",gap:"sm",align:"flex-end",className:"block-editor-global-styles-state-control",children:[(0,yi.jsx)(fl.DropdownMenu,{icon:vr,label:d,popoverProps:{placement:"right-start"},text:d,toggleProps:{size:"compact",variant:"tertiary",iconPosition:"right"},children:({onClose:m})=>(0,yi.jsxs)(yi.Fragment,{children:[c&&(0,yi.jsx)(fl.MenuGroup,{label:(0,Cv.__)("Viewport"),children:s.map(h=>(0,yi.jsx)(fl.MenuItem,{onClick:()=>{n?.(h.value),u||m()},icon:o===h.value?Li:null,children:h.label},`viewport-${h.value}`))}),u&&(0,yi.jsx)(fl.MenuGroup,{label:(0,Cv.__)("Pseudo state"),children:a.map(h=>(0,yi.jsx)(fl.MenuItem,{onClick:()=>{i?.(h.value),c||m()},icon:r===h.value?Li:null,children:h.label},`pseudo-${h.value}`))})]})}),(0,yi.jsx)(Re,{className:"block-editor-global-styles-state-control__badges",direction:"row",justify:"flex-start",gap:"xs",wrap:"wrap",children:f.map(m=>(0,yi.jsx)(CAe,{intent:"info",children:m.label},m.key))})]})}var nR=l(N(),1),Lz=l(w(),1),zp="__experimentalBorder",JS="shadow",_ue=(e,t,o)=>{let r;return e.some(n=>n.colors.some(i=>i[t]===o?(r=i,!0):!1)),r},Fp=({colors:e,namedColor:t,customColor:o})=>{if(t){let n=_ue(e,"slug",t);if(n)return n}if(!o)return{color:void 0};let r=_ue(e,"color",o);return r||{color:o}};function rR(e){let t=/var:preset\|color\|(.+)/.exec(e);return t&&t[1]?t[1]:null}function wue(e){if((0,Az.__experimentalHasSplitBorders)(e?.border))return{style:e,borderColor:void 0};let t=e?.border?.color,o=t?.startsWith("var:preset|color|")?t.substring(17):void 0,r={...e};return r.border={...r.border,color:o?void 0:t},{style:De(r),borderColor:o}}function Cue(e){return(0,Az.__experimentalHasSplitBorders)(e.style?.border)?e.style:{...e.style,border:{...e.style?.border,color:e.borderColor?"var:preset|color|"+e.borderColor:e.style?.border?.color}}}function BAe({label:e,children:t,resetAllFilter:o}){let r=(0,Bv.useCallback)(n=>{let i=Cue(n),s=o(i);return{...n,...wue(s)}},[o]);return(0,Lz.jsx)(fe,{group:"border",resetAllFilter:r,label:e,children:t})}function Bue({clientId:e,name:t,setAttributes:o,settings:r}){let n=zP(r),{style:i,borderColor:s}=(0,xue.useSelect)(d=>{if(!n)return{};let{style:f,borderColor:m}=d(x).getBlockAttributes(e)||{};return{style:f,borderColor:m}},[e,n]),a=(0,Bv.useMemo)(()=>Cue({style:i,borderColor:s}),[i,s]),c=d=>{o(wue(d))};if(!n)return null;let u={...(0,QS.getBlockSupport)(t,[zp,"__experimentalDefaultControls"]),...(0,QS.getBlockSupport)(t,[JS,"__experimentalDefaultControls"])};return(0,Lz.jsx)(jP,{as:BAe,panelId:e,settings:r,value:a,onChange:c,defaultControls:u})}function iR(e,t="any"){if(Bv.Platform.OS!=="web")return!1;let o=(0,QS.getBlockSupport)(e,zp);return o===!0?!0:t==="any"?!!(o?.color||o?.radius||o?.width||o?.style):!!o?.[t]}function _v({blockName:e,hasBorderControl:t,hasShadowControl:o}={}){let r=vs(e),n=$S(r);return!t&&!o&&e&&(t=n?.hasBorderColor||n?.hasBorderStyle||n?.hasBorderWidth||n?.hasBorderRadius,o=n?.hasShadow),t&&o?(0,nR.__)("Border & Shadow"):o?(0,nR.__)("Shadow"):(0,nR.__)("Border")}function EAe(e){return!iR(e,"color")||e.attributes.borderColor?e:{...e,attributes:{...e.attributes,borderColor:{type:"string"}}}}function Eue(e,t,o){if(!iR(t,"color")||$e(t,zp,"color"))return e;let r=Nz(o),n=D(e.className,r);return e.className=n||void 0,e}function Nz(e){let{borderColor:t,style:o}=e,r=Ri("border-color",t);return D({"has-border-color":t||o?.border?.color,[r]:!!r})}function TAe({name:e,borderColor:t,style:o}){let{colors:r}=qd();if(!iR(e,"color")||$e(e,zp,"color"))return{};let{color:n}=Fp({colors:r,namedColor:t}),{color:i}=Fp({colors:r,namedColor:rR(o?.border?.top?.color)}),{color:s}=Fp({colors:r,namedColor:rR(o?.border?.right?.color)}),{color:a}=Fp({colors:r,namedColor:rR(o?.border?.bottom?.color)}),{color:c}=Fp({colors:r,namedColor:rR(o?.border?.left?.color)});return Eue({style:De({borderTopColor:i||n,borderRightColor:s||n,borderBottomColor:a||n,borderLeftColor:c||n})||{}},e,{borderColor:t,style:o})}var Mz={useBlockProps:TAe,addSaveProps:Eue,attributeKeys:["borderColor","style"],hasSupport(e){return iR(e,"color")}};(0,Sue.addFilter)("blocks.registerBlockType","core/border/addAttributes",EAe);var zz=l(vt(),1),zc=l(K(),1),mf=l(R(),1),Due=l(F(),1);var Vz=l(K(),1),Tue=l(F(),1),Fz=l(R(),1);var sR=l(w(),1),jp="background",Dz={backgroundSize:"cover",backgroundPosition:"50% 50%"};function e0(e,t="any"){let o=(0,Vz.getBlockSupport)(e,jp);return o===!0?!0:t==="any"?!!o?.backgroundImage||!!o?.backgroundSize||!!o?.backgroundRepeat||!!o?.gradient:!!o?.[t]}function aR(e){if(!e||!e?.backgroundImage?.url)return;let t;return e?.backgroundSize||(t={backgroundSize:Dz.backgroundSize}),e?.backgroundSize==="contain"&&!e?.backgroundPosition&&(t={backgroundPosition:Dz.backgroundPosition}),t}function IAe({name:e,style:t}){if(!e0(e)||!t?.background?.backgroundImage)return;let o=aR(t?.background);if(o)return{style:{...o}}}function Iue(e){return df(e)||Rz(e)?"has-background":""}function PAe({children:e,backgroundGradientSupported:t=!1}){let o=(0,Fz.useCallback)(r=>{let n=r.className?.includes("has-background")?r.className.split(" ").filter(i=>i!=="has-background").join(" ")||void 0:r.className;return{...r,className:n,style:De({...r.style,background:void 0,color:t?{...r.style?.color,gradient:void 0}:r.style?.color})}},[t]);return(0,sR.jsx)(fe,{group:"background",resetAllFilter:o,children:e})}function Pue({clientId:e,name:t,setAttributes:o,settings:r}){let{style:n,className:i,inheritedValue:s}=(0,Tue.useSelect)(h=>{let{getBlockAttributes:p,getSettings:g}=h(x),b=g(),k=p(e);return{style:k?.style,className:k?.className,inheritedValue:b[Oi]?.blocks?.[t]}},[e,t]),a=e0(t,"gradient"),c=(0,Fz.useCallback)(({children:h})=>(0,sR.jsx)(PAe,{backgroundGradientSupported:a,children:h}),[a]);if(!tR(r)||!e0(t))return null;let u=h=>{let p=a&&!!n?.color?.gradient,g={style:De(a?{...h,color:{...h?.color,gradient:void 0}}:h)};p&&h?.background?.gradient?g.className=D(i,"has-background"):!h?.background?.gradient&&i?.includes("has-background")&&(g.className=i.split(" ").filter(b=>b!=="has-background").join(" ")||void 0),o(g)},d=a&&!n?.background?.gradient&&n?.color?.gradient?{...n,background:{...n?.background,gradient:n?.color?.gradient}}:n,f={...r,background:{...r.background,backgroundSize:r?.background?.backgroundSize&&e0(t,"backgroundSize")}},m=(0,Vz.getBlockSupport)(t,[jp,"__experimentalDefaultControls"]);return(0,sR.jsx)(oR,{inheritedValue:s,as:c,panelId:e,defaultValues:Dz,settings:f,onChange:u,defaultControls:m,value:d})}var Rue={useBlockProps:IAe,attributeKeys:["style"],hasSupport:e0};var t0=l(R(),1),Aue=l(F(),1),Lue=l(K(),1);var Nue=l(w(),1);function lR(e,t){return e.ownerDocument.defaultView.getComputedStyle(e).getPropertyValue(t)}function Oue(e,t){if(!e||!t)return{};let o=di(t,"color.text",{fallback:!0}),r=di(t,"color.background",{fallback:!0}),n=e.querySelector(o)||e,i=e.querySelector(r)||e,s=e.querySelector("a"),a=lR(n,"color"),c=s&&s.textContent?lR(s,"color"):void 0,u=i,d=lR(u,"background-color");for(;d==="rgba(0, 0, 0, 0)"&&u.parentNode&&u.parentNode.nodeType===u.parentNode.ELEMENT_NODE;)u=u.parentNode,d=lR(u,"background-color");return{textColor:a,backgroundColor:d,linkColor:c}}function RAe(e,t){return Object.keys(t).some(r=>e[r]!==t[r])?t:e}function Mue({clientId:e,name:t}){let o=st(e),[r,n]=(0,t0.useReducer)(RAe,{}),i=(0,Aue.useSelect)(s=>t?s(Lue.store).getBlockType(t):void 0,[t]);return(0,t0.useLayoutEffect)(()=>{!o||!i||window.requestAnimationFrame(()=>window.requestAnimationFrame(()=>n(Oue(o,i))))}),(0,t0.useLayoutEffect)(()=>{if(!o||!i)return;let s=new window.MutationObserver(()=>{n(Oue(o,i))});return s.observe(o,{attributes:!0,attributeFilter:["class","style"]}),()=>{s.disconnect()}},[o,i]),(0,Nue.jsx)(JI,{backgroundColor:r.backgroundColor,textColor:r.textColor,linkColor:r.linkColor,enableAlphaChecker:!0})}var cR=l(w(),1),pr="color",uR=e=>{let t=(0,zc.getBlockSupport)(e,pr);return t&&(t.link===!0||t.gradient===!0||t.background!==!1||t.text!==!1)},OAe=e=>{if(mf.Platform.OS!=="web")return!1;let t=(0,zc.getBlockSupport)(e,pr);return t!==null&&typeof t=="object"&&!!t.link},jz=e=>{let t=(0,zc.getBlockSupport)(e,pr);return t!==null&&typeof t=="object"&&!!t.gradients},AAe=e=>{let t=(0,zc.getBlockSupport)(e,pr);return t&&t.background!==!1},LAe=e=>{let t=(0,zc.getBlockSupport)(e,pr);return t&&t.text!==!1};function NAe(e){return uR(e)&&(e.attributes.backgroundColor||Object.assign(e.attributes,{backgroundColor:{type:"string"}}),e.attributes.textColor||Object.assign(e.attributes,{textColor:{type:"string"}}),jz(e)&&!e.attributes.gradient&&Object.assign(e.attributes,{gradient:{type:"string"}})),e}function Vue(e,t,o){if(!uR(t)||$e(t,pr))return e;let r=jz(t),{backgroundColor:n,textColor:i,gradient:s,style:a}=o,c=g=>!$e(t,pr,g),u=c("text")?Ri("color",i):void 0,d=c("gradients")?Ph(s):void 0,f=c("background")?Ri("background-color",n):void 0,m=c("background")||c("gradients"),h=n||a?.color?.background||r&&(s||a?.color?.gradient),p=D(e.className,u,d,{[f]:(!r||!a?.color?.gradient)&&!!f,"has-text-color":c("text")&&(i||a?.color?.text),"has-background":m&&h,"has-link-color":c("link")&&a?.elements?.link?.color});return e.className=p||void 0,e}function Fue(e){let t=e?.color?.text,o=t?.startsWith("var:preset|color|")?t.substring(17):void 0,r=e?.color?.background,n=r?.startsWith("var:preset|color|")?r.substring(17):void 0,i=e?.color?.gradient,s=i?.startsWith("var:preset|gradient|")?i.substring(20):void 0,a={...e};return a.color={...a.color,text:o?void 0:t,background:n?void 0:r,gradient:s?void 0:i},{style:De(a),textColor:o,backgroundColor:n,gradient:s}}function zue(e){return{...e.style,color:{...e.style?.color,text:e.textColor?"var:preset|color|"+e.textColor:e.style?.color?.text,background:e.backgroundColor?"var:preset|color|"+e.backgroundColor:e.style?.color?.background,gradient:e.gradient?"var:preset|gradient|"+e.gradient:e.style?.color?.gradient}}}function MAe({children:e,resetAllFilter:t}){let o=(0,mf.useCallback)(r=>{let n=zue(r),i=t(n);return{...r,...Fue(i)}},[t]);return(0,cR.jsx)(fe,{group:"color",resetAllFilter:o,children:e})}function dR({clientId:e,name:t,setAttributes:o,settings:r,asWrapper:n,label:i,defaultControls:s}){let a=GP(r),{style:c,textColor:u,backgroundColor:d,gradient:f}=(0,Due.useSelect)(b=>{if(!a)return{};let{style:k,textColor:v,backgroundColor:y,gradient:_}=b(x).getBlockAttributes(e)||{};return{style:k,textColor:v,backgroundColor:y,gradient:_}},[e,a]),m=(0,mf.useMemo)(()=>zue({style:c,textColor:u,backgroundColor:d,gradient:f}),[c,u,d,f]),h=b=>{o(Fue(b))};if(!a)return null;s=s||(0,zc.getBlockSupport)(t,[pr,"__experimentalDefaultControls"]);let p=mf.Platform.OS==="web"&&!m?.color?.gradient&&(r?.color?.text||r?.color?.link)&&(0,zc.getBlockSupport)(t,[pr,"enableContrastChecker"])!==!1;return(0,cR.jsx)(WP,{as:n||MAe,panelId:e,settings:r,value:m,onChange:h,defaultControls:s,label:i,enableContrastChecker:(0,zc.getBlockSupport)(t,[pr,"enableContrastChecker"])!==!1,children:p&&(0,cR.jsx)(Mue,{clientId:e,name:t})})}function DAe({name:e,backgroundColor:t,textColor:o,gradient:r,style:n}){let[i,s,a]=me("color.palette.custom","color.palette.theme","color.palette.default"),c=(0,mf.useMemo)(()=>[...i||[],...s||[],...a||[]],[i,s,a]);if(!uR(e)||$e(e,pr))return{};let u={};o&&!$e(e,pr,"text")&&(u.color=Ca(c,o)?.color),t&&!$e(e,pr,"background")&&(u.backgroundColor=Ca(c,t)?.color);let d=Vue({style:u},e,{textColor:o,backgroundColor:t,gradient:r,style:n}),f=t||n?.color?.background||r||n?.color?.gradient;return{...d,className:D(d.className,!f&&Iue(n))}}var Uz={useBlockProps:DAe,addSaveProps:Vue,attributeKeys:["backgroundColor","textColor","gradient","style"],hasSupport:uR},VAe={linkColor:[["style","elements","link","color","text"]],textColor:[["textColor"],["style","color","text"]],backgroundColor:[["backgroundColor"],["style","color","background"]],gradient:[["gradient"],["style","color","gradient"]]};function FAe(e,t,o,r){let n=e.name,i={linkColor:OAe(n),textColor:LAe(n),backgroundColor:AAe(n),gradient:jz(n)};return fR(i,VAe,e,t,o,r)}(0,zz.addFilter)("blocks.registerBlockType","core/color/addAttribute",NAe);(0,zz.addFilter)("blocks.switchToBlockType.transformedBlock","core/color/addTransforms",FAe);var Tr=l(w(),1);function zAe({blockName:e,clientId:t,contentClientIds:o}){let r=vs(e),{updateBlockAttributes:n}=(0,mR.useDispatch)(x),{hasButtons:i,hasHeading:s}=(0,mR.useSelect)(c=>{let u=c(x).getBlockNamesByClientId(o);return{hasButtons:u.includes("core/buttons"),hasHeading:u.includes("core/heading")}},[o]);return(0,Tr.jsx)(dR,{clientId:t,name:e,settings:r,setAttributes:c=>{n(t,c)},asWrapper:Tz,label:(0,Ev.__)("Color"),defaultControls:{text:!0,background:!0,button:i,heading:s}})}var jAe=({blockName:e,clientId:t,hasBlockStyles:o,isSectionBlock:r,contentClientIds:n})=>{let i=_v({blockName:e});return(0,Tr.jsxs)(Tr.Fragment,{children:[o&&(0,Tr.jsx)(Pb,{clientId:t}),r&&(0,Tr.jsx)(zAe,{blockName:e,clientId:t,contentClientIds:n}),!r&&(0,Tr.jsxs)(Tr.Fragment,{children:[(0,Tr.jsx)(fe.Slot,{group:"color",label:(0,Ev.__)("Color"),className:"color-block-support-panel__inner-wrapper"}),(0,Tr.jsx)(fe.Slot,{group:"background",label:(0,Ev.__)("Background image"),className:"background-block-support-panel__inner-wrapper"}),(0,Tr.jsx)(fe.Slot,{group:"filter"}),(0,Tr.jsx)(fe.Slot,{group:"typography",label:(0,Ev.__)("Typography")}),(0,Tr.jsx)(fe.Slot,{group:"dimensions",label:(0,Ev.__)("Dimensions")}),(0,Tr.jsx)(fe.Slot,{group:"border",label:i}),(0,Tr.jsx)(fe.Slot,{group:"styles"})]})]})},jue=jAe;var Uue=l(A(),1),Hue=l(N(),1);var pR=l(K(),1),hR=l(F(),1),_i=l(A(),1);var ks=l(w(),1);function gR({clientIds:e,onSelect:t,onSwitchToListView:o,hasListViewTab:r}){return e.length?(0,ks.jsx)(_i.__experimentalVStack,{spacing:1,children:e.map(n=>(0,ks.jsx)(UAe,{onSelect:t,onSwitchToListView:o,hasListViewTab:r,clientId:n},n))}):null}function UAe({clientId:e,onSelect:t,onSwitchToListView:o,hasListViewTab:r}){let n=Lt(e),{isSelected:i,childBlocks:s,hasListViewSupport:a,blockName:c}=(0,hR.useSelect)(g=>{let{isBlockSelected:b,hasSelectedInnerBlock:k,getBlockOrder:v,getBlockName:y}=g(x),_=y(e);return{isSelected:b(e)||k(e,!0),childBlocks:v(e),hasListViewSupport:_==="core/navigation"||(0,pR.hasBlockSupport)(_,"listView"),blockName:_}},[e]),u=(0,pR.getBlockType)(c),f=Sr({clientId:e,context:"list-view"})||u?.title||c,{selectBlock:m}=(0,hR.useDispatch)(x),p=s&&s.length>0&&r&&a;return(0,ks.jsx)(_i.Button,{__next40pxDefaultSize:!0,className:"block-editor-block-quick-navigation__item",isPressed:i,onClick:async()=>{await m(e),p&&o&&o(e),t&&t(e)},children:(0,ks.jsxs)(_i.Flex,{children:[(0,ks.jsx)(_i.FlexItem,{children:(0,ks.jsx)(Me,{icon:n?.icon})}),(0,ks.jsx)(_i.FlexBlock,{style:{textAlign:"left"},children:(0,ks.jsx)(_i.__experimentalTruncate,{children:f})}),p&&(0,ks.jsx)(_i.FlexItem,{children:(0,ks.jsx)(Ie,{icon:Ko,size:24})})]})})}var Tv=l(w(),1),HAe=({contentClientIds:e,onSwitchToListView:t,hasListViewTab:o})=>{if(!e||e.length===0)return null;let r=window?.__experimentalContentOnlyInspectorFields;return(0,Tv.jsx)(Tv.Fragment,{children:!r&&(0,Tv.jsx)(Uue.PanelBody,{title:(0,Hue.__)("Content"),children:(0,Tv.jsx)(gR,{clientIds:e,onSwitchToListView:t,hasListViewTab:o})})})},bR=HAe;var er=l(w(),1),{Tabs:pf}=M(Pv.privateApis);function Hz({blockName:e,clientId:t,hasBlockStyles:o,tabs:r,isSectionBlock:n,contentClientIds:i}){let s=(0,pa.useRef)(null),a=(0,Iv.useSelect)(_=>_(Gue.store).get("core","showIconLabels"),[]),{requestedTab:c}=(0,Iv.useSelect)(_=>({requestedTab:M(_(x)).getRequestedInspectorTab()})),[u,d]=(0,pa.useState)(()=>c?.tabName??r[0]?.name),f=(0,pa.useRef)(!1),m=(0,pa.useRef)(!1),{__unstableSetOpenListViewPanel:h,__unstableIncrementListViewExpandRevision:p,__unstableSetAllListViewPanelsOpen:g}=(0,Iv.useDispatch)(x),{clearRequestedInspectorTab:b}=M((0,Iv.useDispatch)(x));(0,pa.useEffect)(()=>{f.current=!1},[t]),(0,pa.useEffect)(()=>{c&&(d(c.tabName),c.tabName===Dc.name&&c.options?.openPanel&&(h(c.options.openPanel),p()),m.current=!0,f.current=!0,b())},[c,h,p,b]),(0,pa.useEffect)(()=>{u===Dc.name&&!f.current&&(g(),p())},[t,u,g,p]),(0,pa.useEffect)(()=>{if(!r?.length||f.current&&r.some(S=>S.name===u))return;let _=r[0]?.name;u!==_&&d(_)},[r,u]);let k=_=>{d(_),f.current=!0,_===Dc.name&&!m.current&&(g(),p()),m.current=!1},v=r.some(_=>_.name===Dc.name),y=_=>{v&&(h(_),p(),m.current=!0,k(Dc.name))};return(0,er.jsx)("div",{className:"block-editor-block-inspector__tabs",children:(0,er.jsxs)(pf,{selectedTabId:u,onSelect:k,children:[(0,er.jsx)(pf.TabList,{children:r.map(_=>a?(0,er.jsx)(pf.Tab,{tabId:_.name,children:_.title},_.name):(0,er.jsx)(Pv.Tooltip,{text:_.title,children:(0,er.jsx)(pf.Tab,{tabId:_.name,"aria-label":_.title,children:(0,er.jsx)(Pv.Icon,{icon:_.icon})})},_.name))}),(0,er.jsxs)(pf.TabPanel,{tabId:SP.name,focusable:!1,children:[(0,er.jsx)(bR,{contentClientIds:i,onSwitchToListView:y,hasListViewTab:v}),(0,er.jsx)(fe.Slot,{group:"content"})]}),(0,er.jsxs)(pf.TabPanel,{tabId:Dc.name,focusable:!1,children:[(0,er.jsx)(fe.Slot,{group:"list",ref:s}),(0,er.jsx)(oT,{listViewRef:s})]}),(0,er.jsx)(pf.TabPanel,{tabId:yP.name,focusable:!1,children:(0,er.jsx)(hce,{showAdvancedControls:!!e})}),(0,er.jsx)(pf.TabPanel,{tabId:_P.name,focusable:!1,children:(0,er.jsx)(jue,{blockName:e,clientId:t,hasBlockStyles:o,isSectionBlock:n,contentClientIds:i})})]},t)})}var Si=l(A(),1),Wue=l(F(),1);var GAe=[];function WAe(e,t={}){return t[e]!==void 0?t[e]:t.default!==void 0?t.default:!0}function $ue(e,t,o,r){let n=[],{bindings:i,border:s,color:a,content:c,default:u,dimensions:d,list:f,position:m,styles:h,typography:p,effects:g}=os,b=(0,Si.__experimentalUseSlotFills)(f.name),k=!!b&&b.length,v=(0,Si.__experimentalUseSlotFills)(c.name),y=!!v&&v.length,S=[...(0,Si.__experimentalUseSlotFills)(s.name)||[],...(0,Si.__experimentalUseSlotFills)(a.name)||[],...(0,Si.__experimentalUseSlotFills)(d.name)||[],...(0,Si.__experimentalUseSlotFills)(h.name)||[],...(0,Si.__experimentalUseSlotFills)(p.name)||[],...(0,Si.__experimentalUseSlotFills)(g.name)||[]].length,C=[...(0,Si.__experimentalUseSlotFills)(wd.slotName)||[],...(0,Si.__experimentalUseSlotFills)(i.name)||[]],B=[...(0,Si.__experimentalUseSlotFills)(u.name)||[],...(0,Si.__experimentalUseSlotFills)(m.name)||[],...k&&S>1?C:[]],T=window?.__experimentalContentOnlyInspectorFields,I=y||!T&&t?.length;I&&n.push(SP),k&&n.push(Dc),(B.length||C.length&&(I||k))&&n.push(yP),(r||S)&&n.push(_P);let E=(0,Wue.useSelect)(P=>P(x).getSettings().blockInspectorTabs,[]);return WAe(e,E)?n:GAe}var Kue=l(A(),1);var Gz=l(w(),1),{Fill:$Ae,Slot:KAe}=(0,Kue.createSlotFill)(Symbol("InspectorControlsLastItem")),Yue=e=>Ae()[Is]?(0,Gz.jsx)($Ae,{...e}):null;Yue.Slot=function(t){return(0,Gz.jsx)(KAe,{...t})};var vR=Yue;var que=l(F(),1);function Zue(e){return(0,que.useSelect)(t=>{if(e){let o=t(x).getSettings().blockInspectorAnimation,r=o?.animationParent,{getSelectedBlockClientId:n,getBlockParentsByBlockName:i}=t(x),s=n();return!i(s,r,!0)[0]&&e.name!==r?null:o?.[e.name]}return null},[e])}var Se=l(w(),1);function Jue({blockName:e,showAdvancedControls:t=!0,showPositionControls:o=!0,showBindingsControls:r=!0}){let n=_v({blockName:e});return(0,Se.jsxs)(Se.Fragment,{children:[(0,Se.jsx)(fe.Slot,{}),(0,Se.jsx)(fe.Slot,{group:"color",label:(0,Rv.__)("Color"),className:"color-block-support-panel__inner-wrapper"}),(0,Se.jsx)(fe.Slot,{group:"background",label:(0,Rv.__)("Background image"),className:"background-block-support-panel__inner-wrapper"}),(0,Se.jsx)(fe.Slot,{group:"typography",label:(0,Rv.__)("Typography")}),(0,Se.jsx)(fe.Slot,{group:"dimensions",label:(0,Rv.__)("Dimensions")}),(0,Se.jsx)(fe.Slot,{group:"border",label:n}),(0,Se.jsx)(fe.Slot,{group:"styles"}),o&&(0,Se.jsx)(CP,{}),r&&(0,Se.jsx)(fe.Slot,{group:"bindings"}),t&&(0,Se.jsx)("div",{children:(0,Se.jsx)(xP,{})})]})}function YAe(){let{selectedBlockCount:e,renderedBlockName:t,renderedBlockClientId:o,blockType:r,isSectionBlock:n,isSectionBlockInSelection:i,hasBlockStyles:s,editedContentOnlySection:a}=(0,Wz.useSelect)(g=>{let{getSelectedBlockClientId:b,getSelectedBlockClientIds:k,getSelectedBlockCount:v,getBlockName:y,getParentSectionBlock:_,isSectionBlock:S,getEditedContentOnlySection:C,isWithinEditedContentOnlySection:B}=M(g(x)),{getBlockStyles:T}=g(hf.store),I=b(),L=B(I)?I:_(I)||I,P=L&&y(L),O=P&&(0,hf.getBlockType)(P),j=k().some(U=>S(U)),H=P&&T(P),z=H&&H.length>0;return{selectedBlockCount:v(),renderedBlockClientId:L,renderedBlockName:P,blockType:O,isSectionBlockInSelection:j,isSectionBlock:S(L),hasBlockStyles:z,editedContentOnlySection:C()}},[]),c=(0,Wz.useSelect)(g=>{if(!n||!o)return[];let{getClientIdsOfDescendants:b,getBlockName:k,getBlockEditingMode:v}=M(g(x)),y=b(o),_=new Set;return y.forEach(S=>{let C=k(S);(C==="core/navigation"||(0,hf.hasBlockSupport)(C,"listView"))&&b(S).forEach(T=>_.add(T))}),y.filter(S=>!_.has(S)&&v(S)==="contentOnly")},[n,o]),u=$ue(r?.name,c,n,s),d=u?.length>1,f=Zue(r),m=e>1;if(m&&!i)return(0,Se.jsxs)("div",{className:"block-editor-block-inspector",children:[(0,Se.jsx)(_z,{}),d?(0,Se.jsx)(Hz,{tabs:u}):(0,Se.jsx)(Jue,{blockName:t,showAdvancedControls:!1,showPositionControls:!1,showBindingsControls:!1})]});if(m&&i)return(0,Se.jsx)("div",{className:"block-editor-block-inspector",children:(0,Se.jsx)(_z,{})});let h=t===(0,hf.getUnregisteredTypeHandlerName)();return!r||!o||h?(0,Se.jsx)("span",{className:"block-editor-block-inspector__no-blocks",children:(0,Rv.__)("No block selected.")}):(0,Se.jsx)(qAe,{animate:f,wrapper:g=>(0,Se.jsx)(ZAe,{blockInspectorAnimationSettings:f,renderedBlockClientId:o,children:g}),children:(0,Se.jsx)(XAe,{renderedBlockClientId:o,blockName:r.name,isSectionBlock:n,availableTabs:u,contentClientIds:c,hasBlockStyles:s,editedContentOnlySection:a})})}var qAe=({animate:e,wrapper:t,children:o})=>e?t(o):o,ZAe=({blockInspectorAnimationSettings:e,renderedBlockClientId:t,children:o})=>{let r=e&&e.enterDirection==="leftToRight"?-50:50;return(0,Se.jsx)(Xue.__unstableMotion.div,{animate:{x:0,opacity:1,transition:{ease:"easeInOut",duration:.14}},initial:{x:r,opacity:0},children:o},t)},XAe=({renderedBlockClientId:e,blockName:t,isSectionBlock:o,availableTabs:r,contentClientIds:n,hasBlockStyles:i,editedContentOnlySection:s})=>{let a=(0,Que.useRef)(null),c=r?.length>1,u=s&&s!==e,d=Lt(s),f=Lt(e),m=f.isSynced;return(0,Se.jsxs)("div",{className:"block-editor-block-inspector",children:[u&&(0,Se.jsx)(Xy,{...d,className:d?.isSynced&&"is-synced",parentClientId:s}),(0,Se.jsx)(Xy,{...f,allowParentNavigation:!0,className:m&&"is-synced",isChild:u,clientId:e}),(0,Se.jsx)(LG,{clientId:e}),(0,Se.jsx)(sce,{clientId:e}),(0,Se.jsx)($I,{blockClientId:e}),c&&(0,Se.jsx)(Se.Fragment,{children:(0,Se.jsx)(Hz,{hasBlockStyles:i,clientId:e,blockName:t,tabs:r,isSectionBlock:o,contentClientIds:n})}),!c&&(0,Se.jsxs)(Se.Fragment,{children:[i&&(0,Se.jsx)(Pb,{clientId:e}),(0,Se.jsx)(bR,{contentClientIds:n}),(0,Se.jsx)(fe.Slot,{group:"content"}),(0,Se.jsx)(fe.Slot,{group:"list",ref:a}),(0,Se.jsx)(oT,{listViewRef:a}),!o&&(0,Se.jsx)(Jue,{blockName:t})]}),(0,Se.jsx)(vR.Slot,{}),(0,Se.jsx)(vP,{},"back")]})},ede=YAe;var $z=l(Le(),1);var tde=l(w(),1),ode=()=>((0,$z.default)("__unstableUseClipboardHandler",{alternative:"BlockCanvas or WritingFlow",since:"6.4",version:"6.7"}),e_());function rde(e){return(0,$z.default)("CopyHandler",{alternative:"BlockCanvas or WritingFlow",since:"6.4",version:"6.7"}),(0,tde.jsx)("div",{...e,ref:e_()})}var nde=l(F(),1),Kz=l(R(),1);var Yz=l(w(),1),QAe=()=>{};function JAe({rootClientId:e,clientId:t,isAppender:o,showInserterHelpPanel:r,showMostUsedBlocks:n=!1,__experimentalInsertionIndex:i,__experimentalInitialTab:s,__experimentalInitialCategory:a,__experimentalFilterValue:c,onPatternCategorySelection:u,onSelect:d=QAe,shouldFocusBlock:f=!1,onClose:m},h){let{destinationRootClientId:p}=(0,nde.useSelect)(g=>{let{getBlockRootClientId:b}=g(x);return{destinationRootClientId:e||b(t)||void 0}},[t,e]);return(0,Yz.jsx)(R3,{onSelect:d,rootClientId:p,clientId:t,isAppender:o,showInserterHelpPanel:r,showMostUsedBlocks:n,__experimentalInsertionIndex:i,__experimentalFilterValue:c,onPatternCategorySelection:u,__experimentalInitialTab:s,__experimentalInitialCategory:a,shouldFocusBlock:f,ref:h,onClose:m})}var qz=(0,Kz.forwardRef)(JAe);function eLe(e,t){return(0,Yz.jsx)(qz,{...e,onPatternCategorySelection:void 0,ref:t})}var ide=(0,Kz.forwardRef)(eLe);var sde=l(Le(),1);function ade(){return(0,sde.default)("wp.blockEditor.MultiSelectScrollIntoView",{hint:"This behaviour is now built-in.",since:"5.8"}),null}var lde=l(X(),1),o0=l(Fe(),1),cde=l(F(),1),gf=l(it(),1);var ude=l(w(),1),tLe=window.navigator.userAgent.indexOf("Trident")!==-1,oLe=new Set([gf.UP,gf.DOWN,gf.LEFT,gf.RIGHT]),rLe=.75;function Zz(){let e=(0,cde.useSelect)(t=>t(x).hasSelectedBlock(),[]);return(0,lde.useRefEffect)(t=>{if(!e)return;let{ownerDocument:o}=t,{defaultView:r}=o,n,i,s;function a(){n||(n=r.requestAnimationFrame(()=>{m(),n=null}))}function c(g){i&&r.cancelAnimationFrame(i),i=r.requestAnimationFrame(()=>{u(g),i=null})}function u({keyCode:g}){if(!h())return;let b=(0,o0.computeCaretRect)(r);if(!b)return;if(!s){s=b;return}if(oLe.has(g)){s=b;return}let k=b.top-s.top;if(k===0)return;let v=(0,o0.getScrollContainer)(t);if(!v)return;let y=v===o.body||v===o.documentElement,_=y?r.scrollY:v.scrollTop,S=y?0:v.getBoundingClientRect().top,C=y?s.top/r.innerHeight:(s.top-S)/(r.innerHeight-S);if(_===0&&C<rLe&&p()){s=b;return}let B=y?r.innerHeight:v.clientHeight;if(s.top+s.height>S+B||s.top<S){s=b;return}y?r.scrollBy(0,k):v.scrollTop+=k}function d(){o.addEventListener("selectionchange",f)}function f(){o.removeEventListener("selectionchange",f),m()}function m(){h()&&(s=(0,o0.computeCaretRect)(r))}function h(){return t.contains(o.activeElement)&&o.activeElement.isContentEditable}function p(){let g=t.querySelectorAll('[contenteditable="true"]');return g[g.length-1]===o.activeElement}return r.addEventListener("scroll",a,!0),r.addEventListener("resize",a,!0),t.addEventListener("keydown",c),t.addEventListener("keyup",u),t.addEventListener("mousedown",d),t.addEventListener("touchstart",d),()=>{r.removeEventListener("scroll",a,!0),r.removeEventListener("resize",a,!0),t.removeEventListener("keydown",c),t.removeEventListener("keyup",u),t.removeEventListener("mousedown",d),t.removeEventListener("touchstart",d),o.removeEventListener("selectionchange",f),r.cancelAnimationFrame(n),r.cancelAnimationFrame(i)}},[e])}function nLe({children:e}){return(0,ude.jsx)("div",{ref:Zz(),className:"block-editor__typewriter",children:e})}var iLe=tLe?e=>e.children:nLe,dde=iLe;var Up=l(R(),1),Xz=l(Le(),1);var Qz=l(w(),1),kR=(0,Up.createContext)({});kR.displayName="RenderedRefsContext";function sLe(e,t,o){let r={...e,[t]:e[t]?new Set(e[t]):new Set};return r[t].add(o),r}function Jz({children:e,uniqueId:t,blockName:o=""}){let r=(0,Up.useContext)(kR),{name:n}=Ae();o=o||n;let i=(0,Up.useMemo)(()=>sLe(r,o,t),[r,o,t]);return(0,Qz.jsx)(kR.Provider,{value:i,children:e})}function e6(e,t=""){let o=(0,Up.useContext)(kR),{name:r}=Ae();return t=t||r,!!o[t]?.has(e)}var fde=e=>((0,Xz.default)("wp.blockEditor.__experimentalRecursionProvider",{since:"6.5",alternative:"wp.blockEditor.RecursionProvider"}),(0,Qz.jsx)(Jz,{...e})),mde=(...e)=>((0,Xz.default)("wp.blockEditor.__experimentalUseHasRecursion",{since:"6.5",alternative:"wp.blockEditor.useHasRecursion"}),e6(...e));var _R=l(A(),1),t6=l(N(),1),o6=l(R(),1),hde=l(Ja(),1);var xi=l(A(),1);var pde=l(N(),1),jc=l(w(),1);function yR({title:e,help:t,actions:o=[],onClose:r}){return(0,jc.jsxs)(xi.__experimentalVStack,{className:"block-editor-inspector-popover-header",spacing:4,children:[(0,jc.jsxs)(xi.__experimentalHStack,{alignment:"center",children:[(0,jc.jsx)(xi.__experimentalHeading,{className:"block-editor-inspector-popover-header__heading",level:2,size:13,children:e}),(0,jc.jsx)(xi.__experimentalSpacer,{}),o.map(({label:n,icon:i,onClick:s})=>(0,jc.jsx)(xi.Button,{size:"small",className:"block-editor-inspector-popover-header__action",label:n,icon:i,variant:!i&&"tertiary",onClick:s,children:!i&&n},n)),r&&(0,jc.jsx)(xi.Button,{size:"small",className:"block-editor-inspector-popover-header__action",label:(0,pde.__)("Close"),icon:Xf,onClick:r})]}),t&&(0,jc.jsx)(xi.__experimentalText,{children:t})]})}var Ov=l(w(),1);function aLe({onClose:e,onChange:t,showPopoverHeaderActions:o,isCompact:r,currentDate:n,title:i,...s},a){let c={startOfWeek:(0,hde.getSettings)().l10n.startOfWeek,onChange:t,currentDate:r?void 0:n,currentTime:r?n:void 0,...s},u=r?_R.TimePicker:_R.DateTimePicker;return(0,Ov.jsxs)("div",{ref:a,className:"block-editor-publish-date-time-picker",children:[(0,Ov.jsx)(yR,{title:i||(0,t6.__)("Publish"),actions:o?[{label:(0,t6.__)("Now"),onClick:()=>t?.(null)}]:void 0,onClose:e}),(0,Ov.jsx)(u,{...c})]})}var r6=(0,o6.forwardRef)(aLe);function lLe(e,t){return(0,Ov.jsx)(r6,{...e,showPopoverHeaderActions:!0,isCompact:!1,ref:t})}var gde=(0,o6.forwardRef)(lLe);var SR=l(F(),1),bde=l(R(),1);function bo(e){let t=Ae(),{clientId:o=""}=t,{setBlockEditingMode:r,unsetBlockEditingMode:n}=(0,SR.useDispatch)(x),i=(0,SR.useSelect)(s=>o?null:s(x).getBlockEditingMode(),[o]);return(0,bde.useEffect)(()=>(e&&r(o,e),()=>{e&&n(o)}),[o,e,r,n]),o?t[H0]:i}var vde=l(Le(),1),kde=l(R(),1);function cLe(){return(0,vde.default)("wp.blockEditor.ToolSelector",{since:"6.9",hint:"The ToolSelector component no longer renders anything."}),null}var yde=(0,kde.forwardRef)(cLe);var n0=l(w(),1),De=e=>{if(e===null||typeof e!="object"||Array.isArray(e))return e;let t=Object.entries(e).map(([o,r])=>[o,De(r)]).filter(([,o])=>o!==void 0);return t.length?Object.fromEntries(t):void 0};function fR(e,t,o,r,n,i){if(Object.values(e??{}).every(c=>!c)||i.length===1&&o.innerBlocks.length===r.length)return o;let s=r[0]?.attributes;if(i.length>1&&r.length>1)if(r[n])s=r[n]?.attributes;else return o;let a=o;return Object.entries(e).forEach(([c,u])=>{u&&t[c].forEach(d=>{let f=Ol(s,d);f&&(a={...a,attributes:de(a.attributes,d,f)})})}),a}function $e(e,t,o){let n=(0,_de.getBlockSupport)(e,t)?.__experimentalSkipSerialization;return Array.isArray(n)?n.includes(o):n}var Uc=new WeakMap;function li({id:e,css:t}){return gc({id:e,css:t})}function gc({id:e,css:t,assets:o,__unstableType:r,variation:n,clientId:i}={}){let{setStyleOverride:s,deleteStyleOverride:a}=M((0,xR.useDispatch)(x)),c=(0,xR.useRegistry)(),u=(0,ys.useId)();(0,ys.useEffect)(()=>{if(!t&&!o)return;let d=e||u,f={id:e,css:t,assets:o,__unstableType:r,variation:n,clientId:i};return Uc.get(c)||Uc.set(c,[]),Uc.get(c).push([d,f]),window.queueMicrotask(()=>{Uc.get(c)?.length&&c.batch(()=>{Uc.get(c).forEach(m=>{s(...m)}),Uc.set(c,[])})}),()=>{Uc.get(c)?.find(([h])=>h===d)?Uc.set(c,Uc.get(c).filter(([h])=>h!==d)):a(d)}},[e,t,i,o,r,u,s,a,c,n])}function vs(e,t){let[o,r,n,i,s,a,c,u,d,f,m,h,p,g,b,k,v,y,_,S,C,B,T,I,E,L,P,O,V,j,H,z,U,G,W,J,le,oe,re,Q,$,ee,Y,te,ne,q,se,pe,xe,Te,Xe,dt,ft,we,ot,Ce,Wo,Qt,lo,Qe,jt,rt,He]=me("background.backgroundImage","background.backgroundSize","background.gradient","typography.fontFamilies.custom","typography.fontFamilies.default","typography.fontFamilies.theme","typography.defaultFontSizes","typography.fontSizes.custom","typography.fontSizes.default","typography.fontSizes.theme","typography.customFontSize","typography.fontStyle","typography.fontWeight","typography.lineHeight","typography.textAlign","typography.textColumns","typography.textDecoration","typography.textIndent","typography.writingMode","typography.textTransform","typography.letterSpacing","spacing.padding","spacing.margin","spacing.blockGap","spacing.defaultSpacingSizes","spacing.customSpacingSize","spacing.spacingSizes.custom","spacing.spacingSizes.default","spacing.spacingSizes.theme","spacing.units","dimensions.aspectRatio","dimensions.height","dimensions.minHeight","dimensions.minWidth","dimensions.width","dimensions.dimensionSizes","layout","border.color","border.radius","border.style","border.width","border.radiusSizes","color.custom","color.palette.custom","color.customDuotone","color.palette.theme","color.palette.default","color.defaultPalette","color.defaultDuotone","color.duotone.custom","color.duotone.theme","color.duotone.default","color.gradients.custom","color.gradients.theme","color.gradients.default","color.defaultGradients","color.customGradient","color.background","color.link","color.text","color.heading","color.button","shadow"),$o=(0,ys.useMemo)(()=>({background:{backgroundImage:o,backgroundSize:r,gradient:n},color:{palette:{custom:te,theme:q,default:se},gradients:{custom:ft,theme:we,default:ot},duotone:{custom:Te,theme:Xe,default:dt},defaultGradients:Ce,defaultPalette:pe,defaultDuotone:xe,custom:Y,customGradient:Wo,customDuotone:ne,background:Qt,link:lo,heading:jt,button:rt,text:Qe},typography:{fontFamilies:{custom:i,default:s,theme:a},fontSizes:{custom:u,default:d,theme:f},customFontSize:m,defaultFontSizes:c,fontStyle:h,fontWeight:p,lineHeight:g,textAlign:b,textColumns:k,textDecoration:v,textIndent:y,textTransform:S,letterSpacing:C,writingMode:_},spacing:{spacingSizes:{custom:P,default:O,theme:V},customSpacingSize:L,defaultSpacingSizes:E,padding:B,margin:T,blockGap:I,units:j},border:{color:oe,radius:re,style:Q,width:$,radiusSizes:ee},dimensions:{aspectRatio:H,height:z,minHeight:U,minWidth:G,width:W,dimensionSizes:J},layout:le,parentLayout:t,shadow:He}),[o,r,n,i,s,a,c,u,d,f,m,h,p,g,b,k,v,y,S,C,_,B,T,I,E,L,P,O,V,j,H,z,U,G,W,J,le,t,oe,re,Q,$,ee,Y,te,ne,q,se,pe,xe,Te,Xe,dt,ft,we,ot,Ce,Wo,Qt,lo,Qe,jt,rt,He]);return TP($o,e)}function Sde(e){e=e.map(o=>({...o,Edit:(0,ys.memo)(o.edit)}));let t=(0,n6.createHigherOrderComponent)(o=>function(n){let i=Ae();return[...e.map((s,a)=>{let{Edit:c,hasSupport:u,attributeKeys:d=[],shareWithChildBlocks:f,supportsPatternEditing:m}=s;if(!(m&&i[uu]||i[Is]||i[ih]&&f)||!u(n.name))return null;let p={};for(let g of d)n.attributes[g]&&(p[g]=n.attributes[g]);return(0,n0.jsx)(c,{name:n.name,isSelected:n.isSelected,clientId:n.clientId,setAttributes:n.setAttributes,__unstableParentLayout:n.__unstableParentLayout,...p},a)}),(0,n0.jsx)(o,{...n},"edit")]},"withBlockEditHooks");(0,r0.addFilter)("editor.BlockEdit","core/editor/hooks",t)}function uLe({index:e,useBlockProps:t,setAllWrapperProps:o,...r}){let n=t(r),i=s=>o(a=>{let c=[...a];return c[e]=s,c});return(0,ys.useEffect)(()=>(i(n),()=>{i(void 0)})),null}var dLe=(0,ys.memo)(uLe);function xde(e){let t=(0,n6.createHigherOrderComponent)(o=>function(n){let[i,s]=(0,ys.useState)(Array(e.length).fill(void 0));return[...e.map((a,c)=>{let{hasSupport:u,attributeKeys:d=[],useBlockProps:f,isMatch:m}=a,h={};for(let p of d)n.attributes[p]&&(h[p]=n.attributes[p]);return!Object.keys(h).length||!u(n.name)||m&&!m(h)?null:(0,n0.jsx)(dLe,{index:c,useBlockProps:f,setAllWrapperProps:s,name:n.name,clientId:n.clientId,...h},c)}),(0,n0.jsx)(o,{...n,wrapperProps:i.filter(Boolean).reduce((a,c)=>({...a,...c,className:D(a.className,c.className),style:{...a.style,...c.style}}),n.wrapperProps||{})},"edit")]},"withBlockListBlockHooks");(0,r0.addFilter)("editor.BlockListBlock","core/editor/hooks",t)}function wde(e){function t(o,r,n){return e.reduce((i,s)=>{let{hasSupport:a,attributeKeys:c=[],addSaveProps:u}=s,d={};for(let f of c)n[f]&&(d[f]=n[f]);return!Object.keys(d).length||!a(r)?i:u(i,r,d)},o)}(0,r0.addFilter)("blocks.getSaveContent.extraProps","core/editor/hooks",t,0),(0,r0.addFilter)("blocks.getSaveContent.extraProps","core/editor/hooks",o=>(o.hasOwnProperty("className")&&!o.className&&delete o.className,o))}var Cde=l(K(),1),Bde=l(vt(),1);function fLe(e){let{apiVersion:t=1}=e;return t<2&&(0,Cde.hasBlockSupport)(e,"lightBlockWrapper",!1)&&(e.apiVersion=2),e}(0,Bde.addFilter)("blocks.registerBlockType","core/compat/migrateLightBlockWrapper",fLe);function Ede(e){e.hasAttribute("crossorigin")||e.setAttribute("crossorigin","anonymous")}if(window.crossOriginIsolated){let e=function(){document.body?t.observe(document.body,{childList:!0,attributes:!0,subtree:!0}):document.readyState==="loading"&&document.addEventListener("DOMContentLoaded",()=>{document.body&&t.observe(document.body,{childList:!0,attributes:!0,subtree:!0})})};mLe=e;let t=new window.MutationObserver(o=>{o.forEach(r=>{[r.addedNodes,r.target].forEach(n=>{(n instanceof window.NodeList?n:[n]).forEach(s=>{let a=s;a.querySelectorAll&&(a.querySelectorAll("source,script,video,link").forEach(c=>{Ede(c)}),["SOURCE","SCRIPT","VIDEO","LINK"].includes(a.nodeName)&&Ede(a))})})})});e()}var mLe;var Tde=l(vt(),1),_s=l(K(),1);var i6=l(w(),1),s6=["left","center","right","wide","full"],pLe=["wide","full"];function a6(e,t=!0,o=!0){let r;return Array.isArray(e)?r=s6.filter(n=>e.includes(n)):e===!0?r=[...s6]:r=[],!o||e===!0&&!t?r.filter(n=>!pLe.includes(n)):r}function hLe(e){return"type"in(e.attributes?.align??{})||(0,_s.hasBlockSupport)(e,"align")&&(e.attributes={...e.attributes,align:{type:"string",enum:[...s6,""]}}),e}function gLe({name:e,align:t,setAttributes:o}){let r=a6((0,_s.getBlockSupport)(e,"align"),(0,_s.hasBlockSupport)(e,"alignWide",!0)),n=py(r).map(({name:a})=>a),i=bo();return!n.length||i!=="default"?null:(0,i6.jsx)(Wt,{group:"block",__experimentalShareWithChildBlocks:!0,children:(0,i6.jsx)(jC,{value:t,onChange:a=>{a||(0,_s.getBlockType)(e)?.attributes?.align?.default&&(a=""),o({align:a})},controls:n})})}var wR={shareWithChildBlocks:!0,edit:gLe,useBlockProps:bLe,addSaveProps:vLe,attributeKeys:["align"],hasSupport(e){return(0,_s.hasBlockSupport)(e,"align",!1)}};function bLe({name:e,align:t}){let o=a6((0,_s.getBlockSupport)(e,"align"),(0,_s.hasBlockSupport)(e,"alignWide",!0));return py(o).some(n=>n.name===t)?{"data-align":t}:{}}function vLe(e,t,o){let{align:r}=o,n=(0,_s.getBlockSupport)(t,"align"),i=(0,_s.hasBlockSupport)(t,"alignWide",!0);return a6(n,i).includes(r)&&(e.className=D(`align${r}`,e.className)),e}(0,Tde.addFilter)("blocks.registerBlockType","core/editor/align/addAttribute",hLe);var Ide=l(vt(),1);function kLe(e){return"type"in(e.attributes?.lock??{})||(e.attributes={...e.attributes,lock:{type:"object"}}),e}(0,Ide.addFilter)("blocks.registerBlockType","core/lock/addAttribute",kLe);var f6=l(vt(),1),Dv=l(K(),1);var i0=l(A(),1),ER=l(N(),1),jde=l(R(),1),Ude=l(F(),1),TR=l(K(),1);var Vn=l(A(),1),Vde=l(R(),1),Mv=l(N(),1),Fde=l(F(),1);var u6=l(K(),1),Nde=l(F(),1),Nv=l(A(),1),ha=l(N(),1),CR=l(R(),1),Mde=l(X(),1),Dde=l(sr(),1);var l6=l(R(),1),Ode=l(X(),1),Ade=l(A(),1);var Pde=l(A(),1);var Av=l(w(),1);function yLe({blockTypes:e,value:t,onItemChange:o}){return(0,Av.jsx)("ul",{className:"block-editor-block-manager__checklist",children:e.map(r=>(0,Av.jsxs)("li",{className:"block-editor-block-manager__checklist-item",children:[(0,Av.jsx)(Pde.CheckboxControl,{label:r.title,checked:t.includes(r.name),onChange:(...n)=>o(r,...n)}),(0,Av.jsx)(Me,{icon:r.icon})]},r.name))})}var Rde=yLe;var Lv=l(w(),1);function Lde({title:e,blockTypes:t,selectedBlockTypes:o,onChange:r}){let n=(0,Ode.useInstanceId)(Lde),i=(0,l6.useCallback)((f,m)=>{r(m?[...o,f]:o.filter(({name:h})=>h!==f.name))},[o,r]),s=(0,l6.useCallback)(f=>{r(f?[...o,...t.filter(m=>!o.find(({name:h})=>h===m.name))]:o.filter(m=>!t.find(({name:h})=>h===m.name)))},[t,o,r]);if(!t.length)return null;let a=t.map(({name:f})=>f).filter(f=>(o??[]).some(m=>m.name===f)),c="block-editor-block-manager__category-title-"+n,u=a.length===t.length,d=!u&&a.length>0;return(0,Lv.jsxs)("div",{role:"group","aria-labelledby":c,className:"block-editor-block-manager__category",children:[(0,Lv.jsx)(Ade.CheckboxControl,{checked:u,onChange:s,className:"block-editor-block-manager__category-title",indeterminate:d,label:(0,Lv.jsx)("span",{id:c,children:e})}),(0,Lv.jsx)(Rde,{blockTypes:t,value:a,onItemChange:i})]})}var c6=Lde;var Hc=l(w(),1);function BR({blockTypes:e,selectedBlockTypes:t,onChange:o,showSelectAll:r=!0}){let n=(0,Mde.useDebounce)(Dde.speak,500),[i,s]=(0,CR.useState)(""),{categories:a,isMatchingSearchTerm:c}=(0,Nde.useSelect)(m=>({categories:m(u6.store).getCategories(),isMatchingSearchTerm:m(u6.store).isMatchingSearchTerm}),[]),u=e.filter(m=>!i||c(m,i)),d=t.length>0&&t.length!==e.length,f=e.length>0&&t.length===e.length;return(0,CR.useEffect)(()=>{if(!i)return;let m=u.length,h=(0,ha.sprintf)((0,ha._n)("%d result found.","%d results found.",m),m);n(h)},[u?.length,i,n]),(0,Hc.jsxs)(Nv.__experimentalVStack,{className:"block-editor-block-manager__content",spacing:4,children:[(0,Hc.jsx)(Nv.SearchControl,{label:(0,ha.__)("Search for a block"),placeholder:(0,ha.__)("Search for a block"),value:i,onChange:m=>s(m),className:"block-editor-block-manager__search"}),r&&(0,Hc.jsx)(Nv.CheckboxControl,{className:"block-editor-block-manager__select-all",label:(0,ha.__)("Select all"),checked:f,onChange:()=>{o(f?[]:e)},indeterminate:d}),(0,Hc.jsxs)("div",{tabIndex:"0",role:"region","aria-label":(0,ha.__)("Available block types"),className:"block-editor-block-manager__results",children:[u.length===0&&(0,Hc.jsx)("p",{className:"block-editor-block-manager__no-results",children:(0,ha.__)("No blocks found.")}),a.map(m=>(0,Hc.jsx)(c6,{title:m.title,blockTypes:u.filter(h=>h.category===m.slug),selectedBlockTypes:t,onChange:o},m.slug)),(0,Hc.jsx)(c6,{title:(0,ha.__)("Uncategorized"),blockTypes:u.filter(({category:m})=>!m),selectedBlockTypes:t,onChange:o})]})]})}var ga=l(w(),1);function zde({clientId:e,blockTypes:t,selectedBlockTypes:o,onClose:r}){let[n,i]=(0,Vde.useState)(o),{updateBlockAttributes:s}=(0,Fde.useDispatch)(x),a=()=>{let c=n.length===t.length,u=n.map(({name:d})=>d);s(e,{allowedBlocks:c?void 0:u}),r()};return(0,ga.jsx)(Vn.Modal,{title:(0,Mv._x)("Manage allowed blocks","modal title"),onRequestClose:r,overlayClassName:"block-editor-block-allowed-blocks-modal",focusOnMount:"firstContentElement",size:"medium",children:(0,ga.jsxs)(Vn.__experimentalVStack,{as:"form",onSubmit:c=>{c.preventDefault(),a()},spacing:"4",children:[(0,ga.jsx)(Vn.__experimentalText,{children:(0,Mv.__)("Select which blocks can be added inside this container.")}),(0,ga.jsx)(BR,{blockTypes:t,selectedBlockTypes:n,onChange:c=>{i(c)}}),(0,ga.jsxs)(Vn.Flex,{className:"block-editor-block-allowed-blocks-modal__actions",justify:"flex-end",expanded:!1,children:[(0,ga.jsx)(Vn.FlexItem,{children:(0,ga.jsx)(Vn.Button,{variant:"tertiary",onClick:r,__next40pxDefaultSize:!0,children:(0,Mv.__)("Cancel")})}),(0,ga.jsx)(Vn.FlexItem,{children:(0,ga.jsx)(Vn.Button,{variant:"primary",type:"submit",__next40pxDefaultSize:!0,children:(0,Mv.__)("Apply")})})]})]})})}var Hp=l(w(),1);function Hde({clientId:e}){let[t,o]=(0,jde.useState)(!1),{blockTypes:r,selectedBlockNames:n}=(0,Ude.useSelect)(a=>{let{getBlockAttributes:c}=a(x);return{blockTypes:a(TR.store).getBlockTypes(),selectedBlockNames:c(e)?.allowedBlocks}},[e]),i=r.filter(a=>(0,TR.hasBlockSupport)(a,"inserter",!0)&&(!a.parent||a.parent.includes("core/post-content")));if(!i)return null;let s=n===void 0?i:i.filter(a=>n.includes(a.name));return(0,Hp.jsxs)("div",{className:"block-editor-block-allowed-blocks-control",children:[(0,Hp.jsxs)(i0.BaseControl,{help:(0,ER.__)("Specify which blocks are allowed inside this container."),children:[(0,Hp.jsx)(i0.BaseControl.VisualLabel,{children:(0,ER.__)("Allowed Blocks")}),(0,Hp.jsx)(i0.Button,{__next40pxDefaultSize:!0,variant:"secondary",onClick:()=>{o(!0)},className:"block-editor-block-allowed-blocks-control__button",children:(0,ER.__)("Manage allowed blocks")})]}),t&&(0,Hp.jsx)(zde,{clientId:e,blockTypes:i,selectedBlockTypes:s,onClose:()=>o(!1)})]})}var d6=l(w(),1);function _Le({clientId:e}){return bo()==="contentOnly"?null:(0,d6.jsx)(M_.Fill,{children:(0,d6.jsx)(Hde,{clientId:e})})}var Gde={edit:_Le,attributeKeys:["allowedBlocks"],hasSupport(e){return(0,Dv.hasBlockSupport)(e,"allowedBlocks")}};function SLe(e){return e?.attributes?.allowedBlocks?.type||(0,Dv.hasBlockSupport)(e,"allowedBlocks")&&(e.attributes={...e.attributes,allowedBlocks:{type:"array"}}),e}(0,f6.addFilter)("blocks.registerBlockType","core/allowedBlocks/attribute",SLe);function xLe(e,t,o,r){if(!(0,Dv.hasBlockSupport)(e.name,"allowedBlocks")||t.length!==1&&r.length===1&&e.innerBlocks.length===t.length||r.length===1&&t.length>1||r.length>1&&t.length===1||r.length>1&&t.length>1&&r.length!==t.length||e.attributes.allowedBlocks)return e;let n=t[o]?.attributes?.allowedBlocks;if(!n)return e;let s=(0,Dv.getBlockType)(e.name)?.allowedBlocks||[];if(!s.length)return{...e,attributes:{...e.attributes,allowedBlocks:n}};let a=n.filter(c=>s.includes(c));return{...e,attributes:{...e.attributes,allowedBlocks:a}}}(0,f6.addFilter)("blocks.switchToBlockType.transformedBlock","core/allowedBlocks/addTransforms",xLe);var Wde=l(vt(),1),IR=l(A(),1),Vv=l(N(),1),PR=l(K(),1),$de=l(R(),1);var ml=l(w(),1),wLe=/[\s#]/g;function CLe(e){return"type"in(e.attributes?.anchor??{})||(0,PR.hasBlockSupport)(e,"anchor")&&(e.attributes={...e.attributes,anchor:{type:"string"}}),e}function BLe({anchor:e,setAttributes:t}){if(bo()!=="default")return null;let r=$de.Platform.OS==="web";return(0,ml.jsx)(fe,{group:"advanced",children:(0,ml.jsx)(IR.TextControl,{__next40pxDefaultSize:!0,className:"html-anchor-control",label:(0,Vv.__)("HTML anchor"),help:(0,ml.jsxs)(ml.Fragment,{children:[(0,Vv.__)("Enter a word or two\u2014without spaces\u2014to make a unique web address just for this block, called an \u201Canchor\u201D. Then, you\u2019ll be able to link directly to this section of your page."),r&&(0,ml.jsxs)(ml.Fragment,{children:[" ",(0,ml.jsx)(IR.ExternalLink,{href:(0,Vv.__)("https://wordpress.org/documentation/article/page-jumps/"),children:(0,Vv.__)("Learn more about anchors")})]})]}),value:e||"",placeholder:r?null:(0,Vv.__)("Add an anchor"),onChange:n=>{n=n.replace(wLe,"-"),t({anchor:n!==""?n:void 0})},autoCapitalize:"none",autoComplete:"off"})})}var m6={addSaveProps:ELe,edit:BLe,attributeKeys:["anchor"],hasSupport(e){return(0,PR.hasBlockSupport)(e,"anchor")}};function ELe(e,t,o){return(0,PR.hasBlockSupport)(t,"anchor")&&(e.id=o.anchor===""?null:o.anchor),e}(0,Wde.addFilter)("blocks.registerBlockType","core/anchor/attribute",CLe);var Kde=l(vt(),1),RR=l(K(),1);function TLe(e){return e?.attributes?.ariaLabel?.type||(0,RR.hasBlockSupport)(e,"ariaLabel")&&(e.attributes={...e.attributes,ariaLabel:{type:"string"}}),e}function ILe(e,t,o){return(0,RR.hasBlockSupport)(t,"ariaLabel")&&!$e(t,"ariaLabel","ariaLabel")&&(e["aria-label"]=o.ariaLabel===""?null:o.ariaLabel),e}var Yde={addSaveProps:ILe,attributeKeys:["ariaLabel"],hasSupport(e){return(0,RR.hasBlockSupport)(e,"ariaLabel")}};(0,Kde.addFilter)("blocks.registerBlockType","core/ariaLabel/attribute",TLe);var Qv=l(K(),1),Kpe=l(X(),1),RO=l(A(),1),OO=l(F(),1);var p6=l(N(),1);var qt="isAny",Zt="isNone",zr="isAll",jr="isNotAll",mn="between",pn="inThePast",Fn="over",io="is",so="isNot",bf="lessThan",vf="greaterThan",kf="lessThanOrEqual",yf="greaterThanOrEqual",_f="before",Sf="after",xf="beforeInc",wf="afterInc",pl="contains",hl="notContains",gl="startsWith",Cf="on",Bf="notOn";var Y0t={asc:(0,p6.__)("Sort ascending"),desc:(0,p6.__)("Sort descending")};var qde=l(EA(),1),{lock:Z0t,unlock:It}=(0,qde.__dangerousOptInToUnstableAPIsOnlyForCoreModules)("I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.","@wordpress/dataviews");var s0=l(R(),1),PLe=[];function zn({elements:e,getElements:t}){let o=Array.isArray(e)&&e.length>0?e:PLe,[r,n]=(0,s0.useState)(o),[i,s]=(0,s0.useState)(!1);return(0,s0.useEffect)(()=>{if(!t){n(o);return}let a=!1;return s(!0),t().then(c=>{if(!a){let u=Array.isArray(c)&&c.length>0?c:o;n(u)}}).catch(()=>{a||n(o)}).finally(()=>{a||s(!1)}),()=>{a=!0}},[t,o]),{elements:r,isLoading:i}}var RLe=Math.pow(10,8)*24*60*60*1e3,J0t=-RLe,OR=6048e5,Zde=864e5;var OLe=3600;var Xde=OLe*24,ext=Xde*7,ALe=Xde*365.2425,LLe=ALe/12,txt=LLe*3,h6=Symbol.for("constructDateFrom");function tr(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&h6 in e?e[h6](t):e instanceof Date?new e.constructor(t):new Date(t)}function gt(e,t){return tr(t||e,e)}function AR(e,t,o){let r=gt(e,o?.in);return isNaN(t)?tr(o?.in||e,NaN):(t&&r.setDate(r.getDate()+t),r)}function LR(e,t,o){let r=gt(e,o?.in);if(isNaN(t))return tr(o?.in||e,NaN);if(!t)return r;let n=r.getDate(),i=tr(o?.in||e,r.getTime());i.setMonth(r.getMonth()+t+1,0);let s=i.getDate();return n>=s?i:(r.setFullYear(i.getFullYear(),i.getMonth(),n),r)}var NLe={};function Ef(){return NLe}function Gc(e,t){let o=Ef(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??o.weekStartsOn??o.locale?.options?.weekStartsOn??0,n=gt(e,t?.in),i=n.getDay(),s=(i<r?7:0)+i-r;return n.setDate(n.getDate()-s),n.setHours(0,0,0,0),n}function Gp(e,t){return Gc(e,{...t,weekStartsOn:1})}function NR(e,t){let o=gt(e,t?.in),r=o.getFullYear(),n=tr(o,0);n.setFullYear(r+1,0,4),n.setHours(0,0,0,0);let i=Gp(n),s=tr(o,0);s.setFullYear(r,0,4),s.setHours(0,0,0,0);let a=Gp(s);return o.getTime()>=i.getTime()?r+1:o.getTime()>=a.getTime()?r:r-1}function g6(e){let t=gt(e),o=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return o.setUTCFullYear(t.getFullYear()),+e-+o}function Qde(e,...t){let o=tr.bind(null,e||t.find(r=>typeof r=="object"));return t.map(o)}function b6(e,t){let o=gt(e,t?.in);return o.setHours(0,0,0,0),o}function Jde(e,t,o){let[r,n]=Qde(o?.in,e,t),i=b6(r),s=b6(n),a=+i-g6(i),c=+s-g6(s);return Math.round((a-c)/Zde)}function efe(e,t){let o=NR(e,t),r=tr(t?.in||e,0);return r.setFullYear(o,0,4),r.setHours(0,0,0,0),Gp(r)}function tfe(e,t,o){return AR(e,t*7,o)}function ofe(e,t,o){return LR(e,t*12,o)}function rfe(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Wc(e){return!(!rfe(e)&&typeof e!="number"||isNaN(+gt(e)))}function nfe(e,t){let o=gt(e,t?.in);return o.setDate(1),o.setHours(0,0,0,0),o}function MR(e,t){let o=gt(e,t?.in);return o.setFullYear(o.getFullYear(),0,1),o.setHours(0,0,0,0),o}var MLe={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},ife=(e,t,o)=>{let r,n=MLe[e];return typeof n=="string"?r=n:t===1?r=n.one:r=n.other.replace("{{count}}",t.toString()),o?.addSuffix?o.comparison&&o.comparison>0?"in "+r:r+" ago":r};function DR(e){return(t={})=>{let o=t.width?String(t.width):e.defaultWidth;return e.formats[o]||e.formats[e.defaultWidth]}}var DLe={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},VLe={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},FLe={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},sfe={date:DR({formats:DLe,defaultWidth:"full"}),time:DR({formats:VLe,defaultWidth:"full"}),dateTime:DR({formats:FLe,defaultWidth:"full"})};var zLe={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},afe=(e,t,o,r)=>zLe[e];function Fv(e){return(t,o)=>{let r=o?.context?String(o.context):"standalone",n;if(r==="formatting"&&e.formattingValues){let s=e.defaultFormattingWidth||e.defaultWidth,a=o?.width?String(o.width):s;n=e.formattingValues[a]||e.formattingValues[s]}else{let s=e.defaultWidth,a=o?.width?String(o.width):e.defaultWidth;n=e.values[a]||e.values[s]}let i=e.argumentCallback?e.argumentCallback(t):t;return n[i]}}var jLe={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},ULe={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},HLe={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},GLe={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},WLe={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},$Le={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},KLe=(e,t)=>{let o=Number(e),r=o%100;if(r>20||r<10)switch(r%10){case 1:return o+"st";case 2:return o+"nd";case 3:return o+"rd"}return o+"th"},lfe={ordinalNumber:KLe,era:Fv({values:jLe,defaultWidth:"wide"}),quarter:Fv({values:ULe,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Fv({values:HLe,defaultWidth:"wide"}),day:Fv({values:GLe,defaultWidth:"wide"}),dayPeriod:Fv({values:WLe,defaultWidth:"wide",formattingValues:$Le,defaultFormattingWidth:"wide"})};function zv(e){return(t,o={})=>{let r=o.width,n=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],i=t.match(n);if(!i)return null;let s=i[0],a=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(a)?qLe(a,f=>f.test(s)):YLe(a,f=>f.test(s)),u;u=e.valueCallback?e.valueCallback(c):c,u=o.valueCallback?o.valueCallback(u):u;let d=t.slice(s.length);return{value:u,rest:d}}}function YLe(e,t){for(let o in e)if(Object.prototype.hasOwnProperty.call(e,o)&&t(e[o]))return o}function qLe(e,t){for(let o=0;o<e.length;o++)if(t(e[o]))return o}function cfe(e){return(t,o={})=>{let r=t.match(e.matchPattern);if(!r)return null;let n=r[0],i=t.match(e.parsePattern);if(!i)return null;let s=e.valueCallback?e.valueCallback(i[0]):i[0];s=o.valueCallback?o.valueCallback(s):s;let a=t.slice(n.length);return{value:s,rest:a}}}var ZLe=/^(\d+)(th|st|nd|rd)?/i,XLe=/\d+/i,QLe={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},JLe={any:[/^b/i,/^(a|c)/i]},eNe={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},tNe={any:[/1/i,/2/i,/3/i,/4/i]},oNe={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},rNe={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},nNe={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},iNe={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},sNe={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},aNe={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},ufe={ordinalNumber:cfe({matchPattern:ZLe,parsePattern:XLe,valueCallback:e=>parseInt(e,10)}),era:zv({matchPatterns:QLe,defaultMatchWidth:"wide",parsePatterns:JLe,defaultParseWidth:"any"}),quarter:zv({matchPatterns:eNe,defaultMatchWidth:"wide",parsePatterns:tNe,defaultParseWidth:"any",valueCallback:e=>e+1}),month:zv({matchPatterns:oNe,defaultMatchWidth:"wide",parsePatterns:rNe,defaultParseWidth:"any"}),day:zv({matchPatterns:nNe,defaultMatchWidth:"wide",parsePatterns:iNe,defaultParseWidth:"any"}),dayPeriod:zv({matchPatterns:sNe,defaultMatchWidth:"any",parsePatterns:aNe,defaultParseWidth:"any"})};var v6={code:"en-US",formatDistance:ife,formatLong:sfe,formatRelative:afe,localize:lfe,match:ufe,options:{weekStartsOn:0,firstWeekContainsDate:1}};function dfe(e,t){let o=gt(e,t?.in);return Jde(o,MR(o))+1}function ffe(e,t){let o=gt(e,t?.in),r=+Gp(o)-+efe(o);return Math.round(r/OR)+1}function VR(e,t){let o=gt(e,t?.in),r=o.getFullYear(),n=Ef(),i=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,s=tr(t?.in||e,0);s.setFullYear(r+1,0,i),s.setHours(0,0,0,0);let a=Gc(s,t),c=tr(t?.in||e,0);c.setFullYear(r,0,i),c.setHours(0,0,0,0);let u=Gc(c,t);return+o>=+a?r+1:+o>=+u?r:r-1}function mfe(e,t){let o=Ef(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,n=VR(e,t),i=tr(t?.in||e,0);return i.setFullYear(n,0,r),i.setHours(0,0,0,0),Gc(i,t)}function pfe(e,t){let o=gt(e,t?.in),r=+Gc(o,t)-+mfe(o,t);return Math.round(r/OR)+1}function Ze(e,t){let o=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return o+r}var $c={y(e,t){let o=e.getFullYear(),r=o>0?o:1-o;return Ze(t==="yy"?r%100:r,t.length)},M(e,t){let o=e.getMonth();return t==="M"?String(o+1):Ze(o+1,2)},d(e,t){return Ze(e.getDate(),t.length)},a(e,t){let o=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return o.toUpperCase();case"aaa":return o;case"aaaaa":return o[0];default:return o==="am"?"a.m.":"p.m."}},h(e,t){return Ze(e.getHours()%12||12,t.length)},H(e,t){return Ze(e.getHours(),t.length)},m(e,t){return Ze(e.getMinutes(),t.length)},s(e,t){return Ze(e.getSeconds(),t.length)},S(e,t){let o=t.length,r=e.getMilliseconds(),n=Math.trunc(r*Math.pow(10,o-3));return Ze(n,t.length)}};var jv={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},k6={G:function(e,t,o){let r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return o.era(r,{width:"abbreviated"});case"GGGGG":return o.era(r,{width:"narrow"});default:return o.era(r,{width:"wide"})}},y:function(e,t,o){if(t==="yo"){let r=e.getFullYear(),n=r>0?r:1-r;return o.ordinalNumber(n,{unit:"year"})}return $c.y(e,t)},Y:function(e,t,o,r){let n=VR(e,r),i=n>0?n:1-n;if(t==="YY"){let s=i%100;return Ze(s,2)}return t==="Yo"?o.ordinalNumber(i,{unit:"year"}):Ze(i,t.length)},R:function(e,t){let o=NR(e);return Ze(o,t.length)},u:function(e,t){let o=e.getFullYear();return Ze(o,t.length)},Q:function(e,t,o){let r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return Ze(r,2);case"Qo":return o.ordinalNumber(r,{unit:"quarter"});case"QQQ":return o.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return o.quarter(r,{width:"narrow",context:"formatting"});default:return o.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,o){let r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return Ze(r,2);case"qo":return o.ordinalNumber(r,{unit:"quarter"});case"qqq":return o.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return o.quarter(r,{width:"narrow",context:"standalone"});default:return o.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,o){let r=e.getMonth();switch(t){case"M":case"MM":return $c.M(e,t);case"Mo":return o.ordinalNumber(r+1,{unit:"month"});case"MMM":return o.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return o.month(r,{width:"narrow",context:"formatting"});default:return o.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,o){let r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return Ze(r+1,2);case"Lo":return o.ordinalNumber(r+1,{unit:"month"});case"LLL":return o.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return o.month(r,{width:"narrow",context:"standalone"});default:return o.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,o,r){let n=pfe(e,r);return t==="wo"?o.ordinalNumber(n,{unit:"week"}):Ze(n,t.length)},I:function(e,t,o){let r=ffe(e);return t==="Io"?o.ordinalNumber(r,{unit:"week"}):Ze(r,t.length)},d:function(e,t,o){return t==="do"?o.ordinalNumber(e.getDate(),{unit:"date"}):$c.d(e,t)},D:function(e,t,o){let r=dfe(e);return t==="Do"?o.ordinalNumber(r,{unit:"dayOfYear"}):Ze(r,t.length)},E:function(e,t,o){let r=e.getDay();switch(t){case"E":case"EE":case"EEE":return o.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return o.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return o.day(r,{width:"short",context:"formatting"});default:return o.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,o,r){let n=e.getDay(),i=(n-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return Ze(i,2);case"eo":return o.ordinalNumber(i,{unit:"day"});case"eee":return o.day(n,{width:"abbreviated",context:"formatting"});case"eeeee":return o.day(n,{width:"narrow",context:"formatting"});case"eeeeee":return o.day(n,{width:"short",context:"formatting"});default:return o.day(n,{width:"wide",context:"formatting"})}},c:function(e,t,o,r){let n=e.getDay(),i=(n-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return Ze(i,t.length);case"co":return o.ordinalNumber(i,{unit:"day"});case"ccc":return o.day(n,{width:"abbreviated",context:"standalone"});case"ccccc":return o.day(n,{width:"narrow",context:"standalone"});case"cccccc":return o.day(n,{width:"short",context:"standalone"});default:return o.day(n,{width:"wide",context:"standalone"})}},i:function(e,t,o){let r=e.getDay(),n=r===0?7:r;switch(t){case"i":return String(n);case"ii":return Ze(n,t.length);case"io":return o.ordinalNumber(n,{unit:"day"});case"iii":return o.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return o.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return o.day(r,{width:"short",context:"formatting"});default:return o.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,o){let n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return o.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"aaa":return o.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return o.dayPeriod(n,{width:"narrow",context:"formatting"});default:return o.dayPeriod(n,{width:"wide",context:"formatting"})}},b:function(e,t,o){let r=e.getHours(),n;switch(r===12?n=jv.noon:r===0?n=jv.midnight:n=r/12>=1?"pm":"am",t){case"b":case"bb":return o.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"bbb":return o.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return o.dayPeriod(n,{width:"narrow",context:"formatting"});default:return o.dayPeriod(n,{width:"wide",context:"formatting"})}},B:function(e,t,o){let r=e.getHours(),n;switch(r>=17?n=jv.evening:r>=12?n=jv.afternoon:r>=4?n=jv.morning:n=jv.night,t){case"B":case"BB":case"BBB":return o.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"BBBBB":return o.dayPeriod(n,{width:"narrow",context:"formatting"});default:return o.dayPeriod(n,{width:"wide",context:"formatting"})}},h:function(e,t,o){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),o.ordinalNumber(r,{unit:"hour"})}return $c.h(e,t)},H:function(e,t,o){return t==="Ho"?o.ordinalNumber(e.getHours(),{unit:"hour"}):$c.H(e,t)},K:function(e,t,o){let r=e.getHours()%12;return t==="Ko"?o.ordinalNumber(r,{unit:"hour"}):Ze(r,t.length)},k:function(e,t,o){let r=e.getHours();return r===0&&(r=24),t==="ko"?o.ordinalNumber(r,{unit:"hour"}):Ze(r,t.length)},m:function(e,t,o){return t==="mo"?o.ordinalNumber(e.getMinutes(),{unit:"minute"}):$c.m(e,t)},s:function(e,t,o){return t==="so"?o.ordinalNumber(e.getSeconds(),{unit:"second"}):$c.s(e,t)},S:function(e,t){return $c.S(e,t)},X:function(e,t,o){let r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return gfe(r);case"XXXX":case"XX":return Wp(r);default:return Wp(r,":")}},x:function(e,t,o){let r=e.getTimezoneOffset();switch(t){case"x":return gfe(r);case"xxxx":case"xx":return Wp(r);default:return Wp(r,":")}},O:function(e,t,o){let r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+hfe(r,":");default:return"GMT"+Wp(r,":")}},z:function(e,t,o){let r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+hfe(r,":");default:return"GMT"+Wp(r,":")}},t:function(e,t,o){let r=Math.trunc(+e/1e3);return Ze(r,t.length)},T:function(e,t,o){return Ze(+e,t.length)}};function hfe(e,t=""){let o=e>0?"-":"+",r=Math.abs(e),n=Math.trunc(r/60),i=r%60;return i===0?o+String(n):o+String(n)+t+Ze(i,2)}function gfe(e,t){return e%60===0?(e>0?"-":"+")+Ze(Math.abs(e)/60,2):Wp(e,t)}function Wp(e,t=""){let o=e>0?"-":"+",r=Math.abs(e),n=Ze(Math.trunc(r/60),2),i=Ze(r%60,2);return o+n+t+i}var bfe=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},vfe=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},lNe=(e,t)=>{let o=e.match(/(P+)(p+)?/)||[],r=o[1],n=o[2];if(!n)return bfe(e,t);let i;switch(r){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;default:i=t.dateTime({width:"full"});break}return i.replace("{{date}}",bfe(r,t)).replace("{{time}}",vfe(n,t))},kfe={p:vfe,P:lNe};var cNe=/^D+$/,uNe=/^Y+$/,dNe=["D","DD","YY","YYYY"];function yfe(e){return cNe.test(e)}function _fe(e){return uNe.test(e)}function Sfe(e,t,o){let r=fNe(e,t,o);if(console.warn(r),dNe.includes(e))throw new RangeError(r)}function fNe(e,t,o){let r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${o}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}var mNe=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,pNe=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,hNe=/^'([^]*?)'?$/,gNe=/''/g,bNe=/[a-zA-Z]/;function y6(e,t,o){let r=Ef(),n=o?.locale??r.locale??v6,i=o?.firstWeekContainsDate??o?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,s=o?.weekStartsOn??o?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,a=gt(e,o?.in);if(!Wc(a))throw new RangeError("Invalid time value");let c=t.match(pNe).map(d=>{let f=d[0];if(f==="p"||f==="P"){let m=kfe[f];return m(d,n.formatLong)}return d}).join("").match(mNe).map(d=>{if(d==="''")return{isToken:!1,value:"'"};let f=d[0];if(f==="'")return{isToken:!1,value:vNe(d)};if(k6[f])return{isToken:!0,value:d};if(f.match(bNe))throw new RangeError("Format string contains an unescaped latin alphabet character `"+f+"`");return{isToken:!1,value:d}});n.localize.preprocessor&&(c=n.localize.preprocessor(a,c));let u={firstWeekContainsDate:i,weekStartsOn:s,locale:n};return c.map(d=>{if(!d.isToken)return d.value;let f=d.value;(!o?.useAdditionalWeekYearTokens&&_fe(f)||!o?.useAdditionalDayOfYearTokens&&yfe(f))&&Sfe(f,t,String(e));let m=k6[f[0]];return m(a,f,n.localize,u)}).join("")}function vNe(e){let t=e.match(hNe);return t?t[1].replace(gNe,"'"):e}function $p(e,t,o){return AR(e,-t,o)}function FR(e,t,o){return LR(e,-t,o)}function xfe(e,t,o){return tfe(e,-t,o)}function zR(e,t,o){return ofe(e,-t,o)}var ue=l(N(),1),vo=l(R(),1),hn=l(Ja(),1);var _6=l(w(),1),Mo={Name:(0,_6.jsx)("span",{className:"dataviews-filters__summary-filter-text-name"}),Value:(0,_6.jsx)("span",{className:"dataviews-filters__summary-filter-text-value"})};function wfe(e,t){switch(t){case"days":return $p(new Date,e);case"weeks":return xfe(new Date,e);case"months":return FR(new Date,e);case"years":return zR(new Date,e);default:return new Date}}var Cfe={label:(0,ue.__)("Is none of"),filterText:(e,t)=>(0,vo.createInterpolateElement)((0,ue.sprintf)((0,ue.__)("<Name>%1$s is none of: </Name><Value>%2$s</Value>"),e.name,t.map(o=>o.label).join(", ")),Mo),filter:((e,t,o)=>{if(!o?.length)return!0;let r=t.getValue({item:e});return Array.isArray(r)?!o.some(n=>r.includes(n)):typeof r=="string"?!o.includes(r):!1}),selection:"multi"},Bfe=[{name:qt,label:(0,ue.__)("Includes"),filterText:(e,t)=>(0,vo.createInterpolateElement)((0,ue.sprintf)((0,ue.__)("<Name>%1$s includes: </Name><Value>%2$s</Value>"),e.name,t.map(o=>o.label).join(", ")),Mo),filter(e,t,o){if(!o?.length)return!0;let r=t.getValue({item:e});return Array.isArray(r)?o.some(n=>r.includes(n)):typeof r=="string"?o.includes(r):!1},selection:"multi"},{name:Zt,...Cfe},{name:zr,label:(0,ue.__)("Includes all"),filterText:(e,t)=>(0,vo.createInterpolateElement)((0,ue.sprintf)((0,ue.__)("<Name>%1$s includes all: </Name><Value>%2$s</Value>"),e.name,t.map(o=>o.label).join(", ")),Mo),filter(e,t,o){return o?.length?o.every(r=>t.getValue({item:e})?.includes(r)):!0},selection:"multi"},{name:jr,...Cfe},{name:mn,label:(0,ue.__)("Between (inc)"),filterText:(e,t)=>(0,vo.createInterpolateElement)((0,ue.sprintf)((0,ue.__)("<Name>%1$s between (inc): </Name><Value>%2$s and %3$s</Value>"),e.name,t[0].label[0],t[0].label[1]),Mo),filter(e,t,o){if(!Array.isArray(o)||o.length!==2||o[0]===void 0||o[1]===void 0)return!0;let r=t.getValue({item:e});return typeof r=="number"||r instanceof Date||typeof r=="string"?r>=o[0]&&r<=o[1]:!1},selection:"custom"},{name:pn,label:(0,ue.__)("In the past"),filterText:(e,t)=>(0,vo.createInterpolateElement)((0,ue.sprintf)((0,ue.__)("<Name>%1$s is in the past: </Name><Value>%2$s</Value>"),e.name,`${t[0].value.value} ${t[0].value.unit}`),Mo),filter(e,t,o){if(o?.value===void 0||o?.unit===void 0)return!0;let r=wfe(o.value,o.unit),n=(0,hn.getDate)(t.getValue({item:e}));return n>=r&&n<=new Date},selection:"custom"},{name:Fn,label:(0,ue.__)("Over"),filterText:(e,t)=>(0,vo.createInterpolateElement)((0,ue.sprintf)((0,ue.__)("<Name>%1$s is over: </Name><Value>%2$s</Value>"),e.name,`${t[0].value.value} ${t[0].value.unit}`),Mo),filter(e,t,o){if(o?.value===void 0||o?.unit===void 0)return!0;let r=wfe(o.value,o.unit);return(0,hn.getDate)(t.getValue({item:e}))<r},selection:"custom"},{name:io,label:(0,ue.__)("Is"),filterText:(e,t)=>(0,vo.createInterpolateElement)((0,ue.sprintf)((0,ue.__)("<Name>%1$s is: </Name><Value>%2$s</Value>"),e.name,t[0].label),Mo),filter(e,t,o){return o===t.getValue({item:e})||o===void 0},selection:"single"},{name:so,label:(0,ue.__)("Is not"),filterText:(e,t)=>(0,vo.createInterpolateElement)((0,ue.sprintf)((0,ue.__)("<Name>%1$s is not: </Name><Value>%2$s</Value>"),e.name,t[0].label),Mo),filter(e,t,o){return o!==t.getValue({item:e})},selection:"single"},{name:bf,label:(0,ue.__)("Less than"),filterText:(e,t)=>(0,vo.createInterpolateElement)((0,ue.sprintf)((0,ue.__)("<Name>%1$s is less than: </Name><Value>%2$s</Value>"),e.name,t[0].label),Mo),filter(e,t,o){return o===void 0?!0:t.getValue({item:e})<o},selection:"single"},{name:vf,label:(0,ue.__)("Greater than"),filterText:(e,t)=>(0,vo.createInterpolateElement)((0,ue.sprintf)((0,ue.__)("<Name>%1$s is greater than: </Name><Value>%2$s</Value>"),e.name,t[0].label),Mo),filter(e,t,o){return o===void 0?!0:t.getValue({item:e})>o},selection:"single"},{name:kf,label:(0,ue.__)("Less than or equal"),filterText:(e,t)=>(0,vo.createInterpolateElement)((0,ue.sprintf)((0,ue.__)("<Name>%1$s is less than or equal to: </Name><Value>%2$s</Value>"),e.name,t[0].label),Mo),filter(e,t,o){return o===void 0?!0:t.getValue({item:e})<=o},selection:"single"},{name:yf,label:(0,ue.__)("Greater than or equal"),filterText:(e,t)=>(0,vo.createInterpolateElement)((0,ue.sprintf)((0,ue.__)("<Name>%1$s is greater than or equal to: </Name><Value>%2$s</Value>"),e.name,t[0].label),Mo),filter(e,t,o){return o===void 0?!0:t.getValue({item:e})>=o},selection:"single"},{name:_f,label:(0,ue.__)("Before"),filterText:(e,t)=>(0,vo.createInterpolateElement)((0,ue.sprintf)((0,ue.__)("<Name>%1$s is before: </Name><Value>%2$s</Value>"),e.name,t[0].label),Mo),filter(e,t,o){if(o===void 0)return!0;let r=(0,hn.getDate)(o);return(0,hn.getDate)(t.getValue({item:e}))<r},selection:"single"},{name:Sf,label:(0,ue.__)("After"),filterText:(e,t)=>(0,vo.createInterpolateElement)((0,ue.sprintf)((0,ue.__)("<Name>%1$s is after: </Name><Value>%2$s</Value>"),e.name,t[0].label),Mo),filter(e,t,o){if(o===void 0)return!0;let r=(0,hn.getDate)(o);return(0,hn.getDate)(t.getValue({item:e}))>r},selection:"single"},{name:xf,label:(0,ue.__)("Before (inc)"),filterText:(e,t)=>(0,vo.createInterpolateElement)((0,ue.sprintf)((0,ue.__)("<Name>%1$s is on or before: </Name><Value>%2$s</Value>"),e.name,t[0].label),Mo),filter(e,t,o){if(o===void 0)return!0;let r=(0,hn.getDate)(o);return(0,hn.getDate)(t.getValue({item:e}))<=r},selection:"single"},{name:wf,label:(0,ue.__)("After (inc)"),filterText:(e,t)=>(0,vo.createInterpolateElement)((0,ue.sprintf)((0,ue.__)("<Name>%1$s is on or after: </Name><Value>%2$s</Value>"),e.name,t[0].label),Mo),filter(e,t,o){if(o===void 0)return!0;let r=(0,hn.getDate)(o);return(0,hn.getDate)(t.getValue({item:e}))>=r},selection:"single"},{name:pl,label:(0,ue.__)("Contains"),filterText:(e,t)=>(0,vo.createInterpolateElement)((0,ue.sprintf)((0,ue.__)("<Name>%1$s contains: </Name><Value>%2$s</Value>"),e.name,t[0].label),Mo),filter(e,t,o){if(o===void 0)return!0;let r=t.getValue({item:e});return typeof r=="string"&&o&&r.toLowerCase().includes(String(o).toLowerCase())},selection:"single"},{name:hl,label:(0,ue.__)("Doesn't contain"),filterText:(e,t)=>(0,vo.createInterpolateElement)((0,ue.sprintf)((0,ue.__)("<Name>%1$s doesn't contain: </Name><Value>%2$s</Value>"),e.name,t[0].label),Mo),filter(e,t,o){if(o===void 0)return!0;let r=t.getValue({item:e});return typeof r=="string"&&o&&!r.toLowerCase().includes(String(o).toLowerCase())},selection:"single"},{name:gl,label:(0,ue.__)("Starts with"),filterText:(e,t)=>(0,vo.createInterpolateElement)((0,ue.sprintf)((0,ue.__)("<Name>%1$s starts with: </Name><Value>%2$s</Value>"),e.name,t[0].label),Mo),filter(e,t,o){if(o===void 0)return!0;let r=t.getValue({item:e});return typeof r=="string"&&o&&r.toLowerCase().startsWith(String(o).toLowerCase())},selection:"single"},{name:Cf,label:(0,ue.__)("On"),filterText:(e,t)=>(0,vo.createInterpolateElement)((0,ue.sprintf)((0,ue.__)("<Name>%1$s is: </Name><Value>%2$s</Value>"),e.name,t[0].label),Mo),filter(e,t,o){if(o===void 0)return!0;let r=(0,hn.getDate)(o),n=(0,hn.getDate)(t.getValue({item:e}));return r.getTime()===n.getTime()},selection:"single"},{name:Bf,label:(0,ue.__)("Not on"),filterText:(e,t)=>(0,vo.createInterpolateElement)((0,ue.sprintf)((0,ue.__)("<Name>%1$s is not: </Name><Value>%2$s</Value>"),e.name,t[0].label),Mo),filter(e,t,o){if(o===void 0)return!0;let r=(0,hn.getDate)(o),n=(0,hn.getDate)(t.getValue({item:e}));return r.getTime()!==n.getTime()},selection:"single"}],Efe=e=>Bfe.find(t=>t.name===e),Tfe=()=>Bfe.map(e=>e.name);var Ife=l(A(),1),Pfe=l(R(),1);function St(e,t){let o;return e?.required&&t?.required?o=t?.required?.message?t.required:void 0:e?.pattern&&t?.pattern?o=t.pattern:e?.min&&t?.min?o=t.min:e?.max&&t?.max?o=t.max:e?.minLength&&t?.minLength?o=t.minLength:e?.maxLength&&t?.maxLength?o=t.maxLength:e?.elements&&t?.elements?o=t.elements:t?.custom&&(o=t.custom),o}var Rfe=l(w(),1),{ValidatedCheckboxControl:kNe}=It(Ife.privateApis);function Ofe({field:e,onChange:t,data:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){let{getValue:s,setValue:a,label:c,description:u,isValid:d}=e,f=e.isDisabled({item:o,field:e}),m=(0,Pfe.useCallback)(()=>{t(a({item:o,value:!s({item:o})}))},[o,s,t,a]);return(0,Rfe.jsx)(kNe,{required:!!e.isValid?.required,markWhenOptional:n,customValidity:St(d,i),hidden:r,label:c,help:u,checked:s({item:o}),onChange:m,disabled:f})}var jR=l(A(),1),Afe=l(R(),1);var S6=l(w(),1),{ValidatedComboboxControl:yNe}=It(jR.privateApis);function UR({data:e,field:t,onChange:o,hideLabelFromVision:r,validity:n}){let{label:i,description:s,placeholder:a,getValue:c,setValue:u,isValid:d}=t,f=c({item:e})??"",m=(0,Afe.useCallback)(g=>o(u({item:e,value:g??""})),[e,o,u]),{elements:h,isLoading:p}=zn({elements:t.elements,getElements:t.getElements});return p?(0,S6.jsx)(jR.Spinner,{}):(0,S6.jsx)(yNe,{required:!!t.isValid?.required,customValidity:St(d,n),label:i,value:f,help:s,placeholder:a,options:h,onChange:m,hideLabelFromVision:r,allowReset:!0,expandOnFocus:!0})}var WR=l(A(),1),Ss=l(R(),1),GR=l(N(),1),wi=l(Ja(),1);var Hv=l(A(),1),x6=l(R(),1),bl=l(N(),1);var Uv=l(w(),1),_Ne={[pn]:[{value:"days",label:(0,bl.__)("Days")},{value:"weeks",label:(0,bl.__)("Weeks")},{value:"months",label:(0,bl.__)("Months")},{value:"years",label:(0,bl.__)("Years")}],[Fn]:[{value:"days",label:(0,bl.__)("Days ago")},{value:"weeks",label:(0,bl.__)("Weeks ago")},{value:"months",label:(0,bl.__)("Months ago")},{value:"years",label:(0,bl.__)("Years ago")}]};function HR({className:e,data:t,field:o,onChange:r,hideLabelFromVision:n,operator:i}){let s=_Ne[i===pn?"inThePast":"over"],{id:a,label:c,description:u,getValue:d,setValue:f}=o,m=o.isDisabled({item:t,field:o}),h=d({item:t}),{value:p="",unit:g=s[0].value}=h&&typeof h=="object"?h:{},b=(0,x6.useCallback)(v=>r(f({item:t,value:{value:Number(v),unit:g}})),[r,f,t,g]),k=(0,x6.useCallback)(v=>r(f({item:t,value:{value:p,unit:v}})),[r,f,t,p]);return(0,Uv.jsx)(Hv.BaseControl,{id:a,className:D(e,"dataviews-controls__relative-date"),label:c,hideLabelFromVision:n,help:u,children:(0,Uv.jsxs)(Re,{direction:"row",gap:"sm",children:[(0,Uv.jsx)(Hv.__experimentalNumberControl,{__next40pxDefaultSize:!0,className:"dataviews-controls__relative-date-number",spinControls:"none",min:1,step:1,value:p,onChange:b,disabled:m}),(0,Uv.jsx)(Hv.SelectControl,{className:"dataviews-controls__relative-date-unit",__next40pxDefaultSize:!0,label:(0,bl.__)("Unit"),value:g,options:s,onChange:k,hideLabelFromVision:!0,disabled:m})]})})}var Lfe=l(R(),1);function a0(e,t){let o=typeof e.min?.constraint=="string"?e.min.constraint:void 0,r=typeof e.max?.constraint=="string"?e.max.constraint:void 0,n=(0,Lfe.useMemo)(()=>{let i=[];if(o){let s=t(o);s&&i.push({before:s})}if(r){let s=t(r);s&&i.push({after:s})}return i.length>0?i:void 0},[o,r,t]);return{minConstraint:o,maxConstraint:r,disabledMatchers:n}}var Nfe=l(Ja(),1);function l0(e){if(!e)return null;let t=(0,Nfe.getDate)(e);return t&&Wc(t)?t:null}var Tf=l(w(),1),{DateCalendar:SNe,ValidatedInputControl:xNe}=It(WR.privateApis),w6=e=>e?(0,wi.dateI18n)("Y-m-d\\TH:i",(0,wi.getDate)(e)):"";function wNe({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i,config:s}){let{compact:a}=s||{},{id:c,label:u,description:d,setValue:f,getValue:m,isValid:h}=t,p=t.isDisabled({item:e,field:t}),g=m({item:e}),b=typeof g=="string"?g:void 0,[k,v]=(0,Ss.useState)(()=>l0(b)||new Date),y=(0,Ss.useRef)(null),_=(0,Ss.useRef)(void 0),S=(0,Ss.useRef)(null),{minConstraint:C,maxConstraint:B,disabledMatchers:T}=a0(h,l0),I=(0,Ss.useCallback)(H=>o(f({item:e,value:H})),[e,o,f]);(0,Ss.useEffect)(()=>()=>{_.current&&clearTimeout(_.current)},[]);let E=(0,Ss.useCallback)(H=>{let z;if(H){let U=(0,wi.dateI18n)("Y-m-d",H),G;b?G=(0,wi.dateI18n)("H:i",(0,wi.getDate)(b)):G=(0,wi.dateI18n)("H:i",H),z=(0,wi.getDate)(`${U}T${G}`).toISOString(),I(z),_.current&&clearTimeout(_.current)}else I(void 0);S.current=y.current&&y.current.ownerDocument.activeElement,_.current=setTimeout(()=>{y.current&&(y.current.focus(),y.current.blur(),I(z),S.current&&S.current instanceof HTMLElement&&S.current.focus())},0)},[I,b]),L=(0,Ss.useCallback)(H=>{if(H){let z=(0,wi.getDate)(H);I(z.toISOString());let U=l0(z.toISOString());U&&v(U)}else I(void 0)},[I]),{format:P}=t,O=P.weekStartsOn??(0,wi.getSettings)().l10n.startOfWeek,{timezone:{string:V}}=(0,wi.getSettings)(),j=u;return h?.required&&!n&&!r?j=`${u} (${(0,GR.__)("Required")})`:!h?.required&&n&&!r&&(j=`${u} (${(0,GR.__)("Optional")})`),(0,Tf.jsx)(WR.BaseControl,{id:c,label:j,help:d,hideLabelFromVision:r,children:(0,Tf.jsxs)(Re,{direction:"column",gap:"lg",children:[(0,Tf.jsx)(xNe,{ref:y,__next40pxDefaultSize:!0,required:!!h?.required,customValidity:St(h,i),type:"datetime-local",label:(0,GR.__)("Date time"),hideLabelFromVision:!0,value:w6(b),onChange:L,disabled:p,min:C?w6(C):void 0,max:B?w6(B):void 0}),!a&&(0,Tf.jsx)(SNe,{style:{width:"100%"},selected:b&&l0(b)||void 0,onSelect:E,month:k,onMonthChange:v,timeZone:V||void 0,weekStartsOn:O,disabled:p||T})]})})}function Mfe({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,operator:i,validity:s,config:a}){return i===pn||i===Fn?(0,Tf.jsx)(HR,{className:"dataviews-controls__datetime",data:e,field:t,onChange:o,hideLabelFromVision:r,operator:i}):(0,Tf.jsx)(wNe,{data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:s,config:a})}var Hr=l(A(),1),ut=l(R(),1),or=l(N(),1),Ur=l(Ja(),1);var xt=l(w(),1),{DateCalendar:CNe,DateRangeCalendar:BNe}=It(Hr.privateApis),ENe=[{id:"today",label:(0,or.__)("Today"),getValue:()=>(0,Ur.getDate)(null)},{id:"yesterday",label:(0,or.__)("Yesterday"),getValue:()=>{let e=(0,Ur.getDate)(null);return $p(e,1)}},{id:"past-week",label:(0,or.__)("Past week"),getValue:()=>{let e=(0,Ur.getDate)(null);return $p(e,7)}},{id:"past-month",label:(0,or.__)("Past month"),getValue:()=>{let e=(0,Ur.getDate)(null);return FR(e,1)}}],TNe=[{id:"last-7-days",label:(0,or.__)("Last 7 days"),getValue:()=>{let e=(0,Ur.getDate)(null);return[$p(e,7),e]}},{id:"last-30-days",label:(0,or.__)("Last 30 days"),getValue:()=>{let e=(0,Ur.getDate)(null);return[$p(e,30),e]}},{id:"month-to-date",label:(0,or.__)("Month to date"),getValue:()=>{let e=(0,Ur.getDate)(null);return[nfe(e),e]}},{id:"last-year",label:(0,or.__)("Last year"),getValue:()=>{let e=(0,Ur.getDate)(null);return[zR(e,1),e]}},{id:"year-to-date",label:(0,or.__)("Year to date"),getValue:()=>{let e=(0,Ur.getDate)(null);return[MR(e),e]}}],If=e=>{if(!e)return null;let t=(0,Ur.getDate)(e);return t&&Wc(t)?t:null},C6=e=>e?typeof e=="string"?e:y6(e,"yyyy-MM-dd"):"";function Dfe({field:e,validity:t,inputRefs:o,isTouched:r,setIsTouched:n,children:i}){let{isValid:s}=e,[a,c]=(0,ut.useState)(void 0),u=(0,ut.useCallback)(()=>{let f=Array.isArray(o)?o:[o];for(let m of f){let h=m.current;if(h&&!h.validity.valid){c({type:"invalid",message:h.validationMessage});return}}c(void 0)},[o]);return(0,ut.useEffect)(()=>{let f=Array.isArray(o)?o:[o],m=t?St(s,t):void 0;for(let h of f){let p=h.current;p&&p.setCustomValidity(m?.type==="invalid"&&m.message?m.message:"")}},[o,s,t]),(0,ut.useEffect)(()=>{let f=Array.isArray(o)?o:[o],m=h=>{h.preventDefault(),n(!0)};for(let h of f)h.current?.addEventListener("invalid",m);return()=>{for(let h of f)h.current?.removeEventListener("invalid",m)}},[o,n]),(0,ut.useEffect)(()=>{if(!r)return;let f=t?St(s,t):void 0;f?c(f):u()},[r,s,t,u]),(0,xt.jsxs)("div",{onBlur:f=>{r||(!f.relatedTarget||!f.currentTarget.contains(f.relatedTarget))&&n(!0)},children:[i,(0,xt.jsx)("div",{"aria-live":"polite",children:a&&(0,xt.jsxs)("p",{className:D("components-validated-control__indicator",a.type==="invalid"?"is-invalid":void 0),children:[(0,xt.jsx)(Hr.Icon,{className:"components-validated-control__indicator-icon",icon:rm,size:16,fill:"currentColor"}),a.message]})})]})}function INe({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){let{id:s,label:a,description:c,setValue:u,getValue:d,isValid:f,format:m}=t,h=t.isDisabled({item:e,field:t}),[p,g]=(0,ut.useState)(null),b=m.weekStartsOn??(0,Ur.getSettings)().l10n.startOfWeek,k=d({item:e}),v=typeof k=="string"?k:void 0,[y,_]=(0,ut.useState)(()=>If(v)||new Date),[S,C]=(0,ut.useState)(!1),B=(0,ut.useRef)(null),{minConstraint:T,maxConstraint:I,disabledMatchers:E}=a0(f,If),L=(0,ut.useCallback)(z=>o(u({item:e,value:z})),[e,o,u]),P=(0,ut.useCallback)(z=>{let U=z?y6(z,"yyyy-MM-dd"):void 0;L(U),g(null),C(!0)},[L]),O=(0,ut.useCallback)(z=>{let U=z.getValue(),G=C6(U);_(U),L(G),g(z.id),C(!0)},[L]),V=(0,ut.useCallback)(z=>{if(L(z),z){let U=If(z);U&&_(U)}g(null),C(!0)},[L]),{timezone:{string:j}}=(0,Ur.getSettings)(),H=a;return f?.required&&!n?H=`${a} (${(0,or.__)("Required")})`:!f?.required&&n&&(H=`${a} (${(0,or.__)("Optional")})`),(0,xt.jsx)(Dfe,{field:t,validity:i,inputRefs:B,isTouched:S,setIsTouched:C,children:(0,xt.jsx)(Hr.BaseControl,{id:s,className:"dataviews-controls__date",label:H,help:c,hideLabelFromVision:r,children:(0,xt.jsxs)(Re,{direction:"column",gap:"lg",children:[(0,xt.jsxs)(Re,{direction:"row",gap:"sm",wrap:"wrap",justify:"flex-start",children:[ENe.map(z=>{let U=p===z.id;return(0,xt.jsx)(Hr.Button,{className:"dataviews-controls__date-preset",variant:"tertiary",isPressed:U,size:"small",disabled:h,accessibleWhenDisabled:!0,onClick:()=>O(z),children:z.label},z.id)}),(0,xt.jsx)(Hr.Button,{className:"dataviews-controls__date-preset",variant:"tertiary",isPressed:!p,size:"small",disabled:!!p||h,accessibleWhenDisabled:!0,children:(0,or.__)("Custom")})]}),(0,xt.jsx)(Hr.__experimentalInputControl,{__next40pxDefaultSize:!0,ref:B,type:"date",label:(0,or.__)("Date"),hideLabelFromVision:!0,value:v,onChange:V,required:!!t.isValid?.required,disabled:h,min:T,max:I}),(0,xt.jsx)(CNe,{style:{width:"100%"},selected:v&&If(v)||void 0,onSelect:P,month:y,onMonthChange:_,timeZone:j||void 0,weekStartsOn:b,disabled:h||E,disableNavigation:h})]})})})}function PNe({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){let{id:s,label:a,description:c,getValue:u,setValue:d,isValid:f,format:m}=t,h=t.isDisabled({item:e,field:t}),p,g=u({item:e});Array.isArray(g)&&g.length===2&&g.every(W=>typeof W=="string")&&(p=g);let b=m.weekStartsOn??(0,Ur.getSettings)().l10n.startOfWeek,{minConstraint:k,maxConstraint:v,disabledMatchers:y}=a0(f,If),_=(0,ut.useCallback)(W=>{o(d({item:e,value:W}))},[e,o,d]),[S,C]=(0,ut.useState)(null),B=(0,ut.useMemo)(()=>{if(!p)return{from:void 0,to:void 0};let[W,J]=p;return{from:If(W)||void 0,to:If(J)||void 0}},[p]),[T,I]=(0,ut.useState)(()=>B.from||new Date),[E,L]=(0,ut.useState)(!1),P=(0,ut.useRef)(null),O=(0,ut.useRef)(null),V=(0,ut.useCallback)((W,J)=>{W&&J?_([C6(W),C6(J)]):!W&&!J&&_(void 0)},[_]),j=(0,ut.useCallback)(W=>{V(W?.from,W?.to),C(null),L(!0)},[V]),H=(0,ut.useCallback)(W=>{let[J,le]=W.getValue();I(J),V(J,le),C(W.id),L(!0)},[V]),z=(0,ut.useCallback)((W,J)=>{let[le,oe]=p||[void 0,void 0];if(V(W==="from"?J:le,W==="to"?J:oe),J){let $=If(J);$&&I($)}C(null),L(!0)},[p,V]),{timezone:U}=(0,Ur.getSettings)(),G=a;return t.isValid?.required&&!n?G=`${a} (${(0,or.__)("Required")})`:!t.isValid?.required&&n&&(G=`${a} (${(0,or.__)("Optional")})`),(0,xt.jsx)(Dfe,{field:t,validity:i,inputRefs:[P,O],isTouched:E,setIsTouched:L,children:(0,xt.jsx)(Hr.BaseControl,{id:s,className:"dataviews-controls__date",label:G,help:c,hideLabelFromVision:r,children:(0,xt.jsxs)(Re,{direction:"column",gap:"lg",children:[(0,xt.jsxs)(Re,{direction:"row",gap:"sm",wrap:"wrap",justify:"flex-start",children:[TNe.map(W=>{let J=S===W.id;return(0,xt.jsx)(Hr.Button,{className:"dataviews-controls__date-preset",variant:"tertiary",isPressed:J,size:"small",disabled:h,accessibleWhenDisabled:!0,onClick:()=>H(W),children:W.label},W.id)}),(0,xt.jsx)(Hr.Button,{className:"dataviews-controls__date-preset",variant:"tertiary",isPressed:!S,size:"small",accessibleWhenDisabled:!0,disabled:!!S||h,children:(0,or.__)("Custom")})]}),(0,xt.jsxs)(Re,{direction:"row",gap:"sm",justify:"space-between",className:"dataviews-controls__date-range-inputs",children:[(0,xt.jsx)(Hr.__experimentalInputControl,{__next40pxDefaultSize:!0,ref:P,type:"date",label:(0,or.__)("From"),hideLabelFromVision:!0,value:p?.[0],onChange:W=>z("from",W),required:!!t.isValid?.required,disabled:h,min:k,max:v}),(0,xt.jsx)(Hr.__experimentalInputControl,{__next40pxDefaultSize:!0,ref:O,type:"date",label:(0,or.__)("To"),hideLabelFromVision:!0,value:p?.[1],onChange:W=>z("to",W),required:!!t.isValid?.required,disabled:h,min:k,max:v})]}),(0,xt.jsx)(BNe,{style:{width:"100%"},selected:B,onSelect:j,month:T,onMonthChange:I,timeZone:U.string||void 0,weekStartsOn:b,disabled:h||y})]})})})}function Vfe({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,operator:i,validity:s}){return i===pn||i===Fn?(0,xt.jsx)(HR,{className:"dataviews-controls__date",data:e,field:t,onChange:o,hideLabelFromVision:r,operator:i}):i===mn?(0,xt.jsx)(PNe,{data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:s}):(0,xt.jsx)(INe,{data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:s})}var $R=l(A(),1),Ffe=l(R(),1);var B6=l(w(),1),{ValidatedSelectControl:RNe}=It($R.privateApis);function KR({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){let{type:s,label:a,description:c,getValue:u,setValue:d,isValid:f}=t,m=t.isDisabled({item:e,field:t}),h=s==="array",p=u({item:e})??(h?[]:""),g=(0,Ffe.useCallback)(v=>o(d({item:e,value:v})),[e,o,d]),{elements:b,isLoading:k}=zn({elements:t.elements,getElements:t.getElements});return k?(0,B6.jsx)($R.Spinner,{}):(0,B6.jsx)(RNe,{required:!!t.isValid?.required,markWhenOptional:n,customValidity:St(f,i),label:a,value:p,help:c,options:b,onChange:g,__next40pxDefaultSize:!0,hideLabelFromVision:r,multiple:h,disabled:m})}var E6=l(w(),1),ONe=10;function zfe(e){let{field:t}=e,{elements:o}=zn({elements:t.elements,getElements:t.getElements});return o.length>=ONe?(0,E6.jsx)(UR,{...e}):(0,E6.jsx)(KR,{...e})}var qR=l(A(),1);var jfe=l(A(),1),Ufe=l(R(),1);var Hfe=l(w(),1),{ValidatedInputControl:ANe}=It(jfe.privateApis);function vl({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,type:i,prefix:s,suffix:a,validity:c}){let{label:u,placeholder:d,description:f,getValue:m,setValue:h,isValid:p}=t,g=m({item:e}),b=t.isDisabled({item:e,field:t}),k=(0,Ufe.useCallback)(v=>o(h({item:e,value:v})),[e,h,o]);return(0,Hfe.jsx)(ANe,{required:!!p.required,markWhenOptional:n,customValidity:St(p,c),label:u,placeholder:d,value:g??"",help:f,onChange:k,hideLabelFromVision:r,type:i,prefix:s,suffix:a,disabled:b,pattern:p.pattern?p.pattern.constraint:void 0,minLength:p.minLength?p.minLength.constraint:void 0,maxLength:p.maxLength?p.maxLength.constraint:void 0,__next40pxDefaultSize:!0})}var YR=l(w(),1);function Gfe({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){return(0,YR.jsx)(vl,{data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i,type:"email",prefix:(0,YR.jsx)(qR.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,YR.jsx)(qR.Icon,{icon:vL})})})}var XR=l(A(),1);var ZR=l(w(),1);function Wfe({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){return(0,ZR.jsx)(vl,{data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i,type:"tel",prefix:(0,ZR.jsx)(XR.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,ZR.jsx)(XR.Icon,{icon:Lk})})})}var JR=l(A(),1);var QR=l(w(),1);function $fe({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){return(0,QR.jsx)(vl,{data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i,type:"url",prefix:(0,QR.jsx)(JR.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,QR.jsx)(JR.Icon,{icon:_n})})})}var Kc=l(A(),1),c0=l(R(),1),eO=l(N(),1);var Pf=l(w(),1),{ValidatedNumberControl:LNe}=It(Kc.privateApis);function Kfe(e){if(e===""||e===void 0)return"";let t=Number(e);return Number.isFinite(t)?t:""}function NNe({value:e,onChange:t,hideLabelFromVision:o,step:r}){let[n="",i=""]=e,s=(0,c0.useCallback)(c=>t([Kfe(c),i]),[t,i]),a=(0,c0.useCallback)(c=>t([n,Kfe(c)]),[t,n]);return(0,Pf.jsx)(Kc.BaseControl,{help:(0,eO.__)("The max. value must be greater than the min. value."),children:(0,Pf.jsxs)(Kc.Flex,{direction:"row",gap:4,children:[(0,Pf.jsx)(Kc.__experimentalNumberControl,{label:(0,eO.__)("Min."),value:n,max:i?Number(i)-r:void 0,onChange:s,__next40pxDefaultSize:!0,hideLabelFromVision:o,step:r}),(0,Pf.jsx)(Kc.__experimentalNumberControl,{label:(0,eO.__)("Max."),value:i,min:n?Number(n)+r:void 0,onChange:a,__next40pxDefaultSize:!0,hideLabelFromVision:o,step:r})]})})}function tO({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,operator:i,validity:s}){let a=t.format?.decimals??0,c=Math.pow(10,Math.abs(a)*-1),{label:u,description:d,getValue:f,setValue:m,isValid:h}=t,p=f({item:e})??"",g=t.isDisabled({item:e,field:t}),b=(0,c0.useCallback)(v=>{o(m({item:e,value:["",void 0].includes(v)?void 0:Number(v)}))},[e,o,m]),k=(0,c0.useCallback)(v=>{o(m({item:e,value:v}))},[e,o,m]);if(i===mn){let v=["",""];return Array.isArray(p)&&p.length===2&&p.every(y=>typeof y=="number"||y==="")&&(v=p),(0,Pf.jsx)(NNe,{value:v,onChange:k,hideLabelFromVision:r,step:c})}return(0,Pf.jsx)(LNe,{required:!!h.required,markWhenOptional:n,customValidity:St(h,s),label:u,help:d,value:p,onChange:b,__next40pxDefaultSize:!0,hideLabelFromVision:r,step:c,min:h.min?h.min.constraint:void 0,max:h.max?h.max.constraint:void 0,disabled:g})}var Yfe=l(w(),1);function qfe(e){return(0,Yfe.jsx)(tO,{...e})}var Zfe=l(w(),1);function Xfe(e){return(0,Zfe.jsx)(tO,{...e})}var oO=l(A(),1),Qfe=l(R(),1);var T6=l(w(),1),{ValidatedRadioControl:MNe}=It(oO.privateApis);function Jfe({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){let{label:s,description:a,getValue:c,setValue:u,isValid:d}=t,f=t.isDisabled({item:e,field:t}),{elements:m,isLoading:h}=zn({elements:t.elements,getElements:t.getElements}),p=c({item:e}),g=(0,Qfe.useCallback)(b=>o(u({item:e,value:b})),[e,o,u]);return h?(0,T6.jsx)(oO.Spinner,{}):(0,T6.jsx)(MNe,{required:!!t.isValid?.required,markWhenOptional:n,customValidity:St(d,i),label:s,help:a,onChange:g,options:m,selected:p,hideLabelFromVision:r,disabled:f})}var I6=l(R(),1);var eme=l(w(),1);function tme({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,config:i,validity:s}){let{prefix:a,suffix:c}=i||{};return(0,eme.jsx)(vl,{data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:s,prefix:a?(0,I6.createElement)(a):void 0,suffix:c?(0,I6.createElement)(c):void 0})}var ome=l(A(),1),rme=l(R(),1);var nme=l(w(),1),{ValidatedToggleControl:DNe}=It(ome.privateApis);function ime({field:e,onChange:t,data:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){let{label:s,description:a,getValue:c,setValue:u,isValid:d}=e,f=e.isDisabled({item:o,field:e}),m=(0,rme.useCallback)(()=>{t(u({item:o,value:!c({item:o})}))},[t,u,o,c]);return(0,nme.jsx)(DNe,{required:!!d.required,markWhenOptional:n,customValidity:St(d,i),hidden:r,label:s,help:a,checked:c({item:o}),onChange:m,disabled:f})}var sme=l(A(),1),ame=l(R(),1);var lme=l(w(),1),{ValidatedTextareaControl:VNe}=It(sme.privateApis);function cme({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,config:i,validity:s}){let{rows:a=4}=i||{},c=t.isDisabled({item:e,field:t}),{label:u,placeholder:d,description:f,setValue:m,isValid:h}=t,p=t.getValue({item:e}),g=(0,ame.useCallback)(b=>o(m({item:e,value:b})),[e,o,m]);return(0,lme.jsx)(VNe,{required:!!h.required,markWhenOptional:n,customValidity:St(h,s),label:u,placeholder:d,value:p??"",help:f,onChange:g,rows:a,disabled:c,minLength:h.minLength?h.minLength.constraint:void 0,maxLength:h.maxLength?h.maxLength.constraint:void 0,__next40pxDefaultSize:!0,hideLabelFromVision:r})}var Gv=l(A(),1),ume=l(R(),1);var rO=l(w(),1),{ValidatedToggleGroupControl:FNe}=It(Gv.privateApis);function dme({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){let{getValue:s,setValue:a,isValid:c}=t,u=t.isDisabled({item:e,field:t}),d=s({item:e}),f=(0,ume.useCallback)(g=>o(a({item:e,value:g})),[e,o,a]),{elements:m,isLoading:h}=zn({elements:t.elements,getElements:t.getElements});if(h)return(0,rO.jsx)(Gv.Spinner,{});if(m.length===0)return null;let p=m.find(g=>g.value===d);return(0,rO.jsx)(FNe,{required:!!t.isValid?.required,markWhenOptional:n,customValidity:St(c,i),__next40pxDefaultSize:!0,isBlock:!0,label:t.label,help:p?.description||t.description,onChange:f,value:d,hideLabelFromVision:r,children:m.map(g=>(0,rO.jsx)(Gv.__experimentalToggleGroupControlOption,{label:g.label,value:g.value,disabled:u},g.value))})}var nO=l(A(),1),iO=l(R(),1);var u0=l(w(),1),{ValidatedFormTokenField:zNe}=It(nO.privateApis);function fme({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){let{label:s,placeholder:a,description:c,getValue:u,setValue:d,isValid:f}=t,m=u({item:e}),h=t.isDisabled({item:e,field:t}),{elements:p,isLoading:g}=zn({elements:t.elements,getElements:t.getElements}),b=(0,iO.useMemo)(()=>Array.isArray(m)?m.map(v=>p?.find(_=>_.value===v)||{value:v,label:v}):[],[m,p]),k=(0,iO.useCallback)(v=>{let y=v.map(_=>typeof _=="object"&&"value"in _?_.value:_);o(d({item:e,value:y}))},[o,d,e]);return g?(0,u0.jsx)(nO.Spinner,{}):(0,u0.jsx)(zNe,{required:!!f?.required,markWhenOptional:n,customValidity:St(f,i),label:r?void 0:s,value:b,onChange:k,placeholder:a,suggestions:p?.map(v=>v.value),disabled:h,__experimentalValidateInput:v=>t.isValid?.elements&&p?p.some(y=>y.value===v||y.label===v):!0,__experimentalExpandOnFocus:p&&p.length>0,help:c??(t.isValid?.elements?"":void 0),displayTransform:v=>typeof v=="object"&&"label"in v?v.label:typeof v=="string"&&p&&p.find(_=>_.value===v)?.label||v,__experimentalRenderItem:({item:v})=>{if(typeof v=="string"&&p){let y=p.find(_=>_.value===v);return(0,u0.jsx)("span",{children:y?.label||v})}return(0,u0.jsx)("span",{children:v})}})}var jn=l(A(),1),P6=l(R(),1),mme=l(N(),1);var Yc=l(w(),1),{ValidatedInputControl:jNe}=It(jn.privateApis),UNe=({color:e,onColorChange:t,disabled:o})=>{let r=e&&Ot(e).isValid()?e:"#ffffff";return(0,Yc.jsx)(jn.Dropdown,{className:"dataviews-controls__color-picker-dropdown",popoverProps:{resize:!1},renderToggle:({onToggle:n})=>(0,Yc.jsx)(jn.Button,{onClick:n,"aria-label":(0,mme.__)("Open color picker"),size:"small",disabled:o,accessibleWhenDisabled:!0,icon:()=>(0,Yc.jsx)(jn.ColorIndicator,{colorValue:r})}),renderContent:()=>(0,Yc.jsx)(jn.__experimentalDropdownContentWrapper,{paddingSize:"none",children:(0,Yc.jsx)(jn.ColorPicker,{color:r,onChange:t,enableAlpha:!0})})})};function pme({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){let{label:s,placeholder:a,description:c,setValue:u,isValid:d}=t,f=t.isDisabled({item:e,field:t}),m=t.getValue({item:e})||"",h=(0,P6.useCallback)(g=>{o(u({item:e,value:g}))},[e,o,u]),p=(0,P6.useCallback)(g=>{o(u({item:e,value:g||""}))},[e,o,u]);return(0,Yc.jsx)(jNe,{required:!!t.isValid?.required,markWhenOptional:n,customValidity:St(d,i),label:s,placeholder:a,value:m,help:c,onChange:p,hideLabelFromVision:r,type:"text",disabled:f,prefix:(0,Yc.jsx)(jn.__experimentalInputControlPrefixWrapper,{variant:"control",children:(0,Yc.jsx)(UNe,{color:m,onColorChange:h,disabled:f})})})}var aO=l(A(),1),lO=l(R(),1),R6=l(N(),1);var sO=l(w(),1);function hme({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){let[s,a]=(0,lO.useState)(!1),c=t.isDisabled({item:e,field:t}),u=(0,lO.useCallback)(()=>{a(d=>!d)},[]);return(0,sO.jsx)(vl,{data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i,type:s?"text":"password",suffix:(0,sO.jsx)(aO.__experimentalInputControlSuffixWrapper,{variant:"control",children:(0,sO.jsx)(aO.Button,{icon:s?Rs:am,onClick:u,size:"small",label:s?(0,R6.__)("Hide password"):(0,R6.__)("Show password"),disabled:c,accessibleWhenDisabled:!0})})})}function cO(e){return Array.isArray(e.elements)&&e.elements.length>0||typeof e.getElements=="function"}var bme=l(w(),1),gme={adaptiveSelect:zfe,array:fme,checkbox:Ofe,color:pme,combobox:UR,datetime:Mfe,date:Vfe,email:Gfe,telephone:Wfe,url:$fe,integer:qfe,number:Xfe,password:hme,radio:Jfe,select:KR,text:tme,toggle:ime,textarea:cme,toggleGroup:dme};function HNe(e){return e&&typeof e=="object"&&typeof e.control=="string"}function GNe(e){let{control:t,...o}=e,r=uO(t);return r===null?null:function(i){return(0,bme.jsx)(r,{...i,config:o})}}function vme(e,t){return typeof e.Edit=="function"?e.Edit:typeof e.Edit=="string"?uO(e.Edit):HNe(e.Edit)?GNe(e.Edit):cO(e)&&e.type!=="array"?uO("adaptiveSelect"):t===null?null:uO(t)}function uO(e){return Object.keys(gme).includes(e)?gme[e]:null}function WNe(e,t,o){if(e.filterBy===!1)return!1;let r=e.filterBy?.operators?.filter(n=>o.includes(n))??t;return r.length===0?!1:{isPrimary:!!e.filterBy?.isPrimary,operators:r}}var kme=WNe;var $Ne=e=>({item:t})=>{let o=e.split("."),r=t;for(let n of o)r.hasOwnProperty(n)?r=r[n]:r=void 0;return r},yme=$Ne;var KNe=e=>({value:t})=>{let o=e.split("."),r={},n=r;for(let i of o.slice(0,-1))n[i]={},n=n[i];return n[o.at(-1)]=t,r},_me=KNe;var xme=l(N(),1);function dO({item:e,field:t}){let{elements:o,isLoading:r}=zn({elements:t.elements,getElements:t.getElements}),n=t.getValue({item:e});return r||o.length===0?n:o?.find(i=>i.value===n)?.label||t.getValue({item:e})}var Sme=l(w(),1);function ko({item:e,field:t}){return t.hasElements?(0,Sme.jsx)(dO,{item:e,field:t}):t.getValueFormatted({item:e,field:t})}var kl=(e,t,o)=>o==="asc"?e.localeCompare(t):t.localeCompare(e);function yo(e,t){let o=t.getValue({item:e});return![void 0,"",null].includes(o)}function yl(e,t){if(typeof t.isValid.minLength?.constraint!="number")return!1;let o=t.getValue({item:e});return[void 0,"",null].includes(o)?!0:String(o).length>=t.isValid.minLength.constraint}function _l(e,t){if(typeof t.isValid.maxLength?.constraint!="number")return!1;let o=t.getValue({item:e});return[void 0,"",null].includes(o)?!0:String(o).length<=t.isValid.maxLength.constraint}function Sl(e,t){if(t.isValid.pattern?.constraint===void 0)return!0;try{let o=new RegExp(t.isValid.pattern.constraint),r=t.getValue({item:e});return[void 0,"",null].includes(r)?!0:o.test(String(r))}catch{return!1}}function Pt(e,t){let r=(t.elements??[]).map(i=>i.value);if(r.length===0)return!0;let n=t.getValue({item:e});return[].concat(n).every(i=>r.includes(i))}function YNe({item:e,field:t}){return t.getValue({item:e})}var gn=YNe;var qNe=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;function ZNe(e,t){let o=t.getValue({item:e});return![void 0,"",null].includes(o)&&!qNe.test(o)?(0,xme.__)("Value must be a valid email address."):null}var wme={type:"email",render:ko,Edit:"email",sort:kl,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[qt,Zt],validOperators:[io,so,pl,hl,gl,qt,Zt,zr,jr],format:{},getValueFormatted:gn,validate:{required:yo,pattern:Sl,minLength:yl,maxLength:_l,elements:Pt,custom:ZNe}};var Cme=l(N(),1);var Wv=(e,t,o)=>o==="asc"?e-t:t-e;function fO(e,t){if(typeof t.isValid.min?.constraint!="number")return!1;let o=t.getValue({item:e});return[void 0,"",null].includes(o)?!0:Number(o)>=t.isValid.min.constraint}function mO(e,t){if(typeof t.isValid.max?.constraint!="number")return!1;let o=t.getValue({item:e});return[void 0,"",null].includes(o)?!0:Number(o)<=t.isValid.max.constraint}var Bme={separatorThousand:","};function XNe({item:e,field:t}){let o=t.getValue({item:e});if(o==null)return"";if(o=Number(o),!Number.isFinite(o))return String(o);let r;t.type!=="integer"?r=Bme:r=t.format;let{separatorThousand:n}=r,i=Math.trunc(o);return n?String(i).replace(/\B(?=(\d{3})+(?!\d))/g,n):String(i)}function QNe(e,t){let o=t.getValue({item:e});return![void 0,"",null].includes(o)&&!Number.isInteger(o)?(0,Cme.__)("Value must be an integer."):null}var Eme={type:"integer",render:ko,Edit:"integer",sort:Wv,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[io,so,bf,vf,kf,yf,mn],validOperators:[io,so,bf,vf,kf,yf,mn,qt,Zt,zr,jr],format:Bme,getValueFormatted:XNe,validate:{required:yo,min:fO,max:mO,elements:Pt,custom:QNe}};var Tme=l(N(),1);var Ime={separatorThousand:",",separatorDecimal:".",decimals:2};function JNe({item:e,field:t}){let o=t.getValue({item:e});if(o==null)return"";if(o=Number(o),!Number.isFinite(o))return String(o);let r;t.type!=="number"?r=Ime:r=t.format;let{separatorThousand:n,separatorDecimal:i,decimals:s}=r,a=o.toFixed(s),[c,u]=a.split("."),d=n?c.replace(/\B(?=(\d{3})+(?!\d))/g,n):c;return s===0?d:d+i+u}function eMe(e){return e===""||e===void 0||e===null}function tMe(e,t){let o=t.getValue({item:e});return!eMe(o)&&!Number.isFinite(o)?(0,Tme.__)("Value must be a number."):null}var Pme={type:"number",render:ko,Edit:"number",sort:Wv,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[io,so,bf,vf,kf,yf,mn],validOperators:[io,so,bf,vf,kf,yf,mn,qt,Zt,zr,jr],format:Ime,getValueFormatted:JNe,validate:{required:yo,min:fO,max:mO,elements:Pt,custom:tMe}};var Rme={type:"text",render:ko,Edit:"text",sort:kl,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[qt,Zt],validOperators:[io,so,pl,hl,gl,qt,Zt,zr,jr],format:{},getValueFormatted:gn,validate:{required:yo,pattern:Sl,minLength:yl,maxLength:_l,elements:Pt}};var Kp=l(Ja(),1);var Ame=l(Ja(),1);function Ome(e){if(!e||!Wc(new Date(e)))return null;let t=(0,Ame.getDate)(e);return t&&Wc(t)?t:null}function Lme(e,t,o){let r=t.isValid[o]?.constraint;if(typeof r!="string")return!1;let n=t.getValue({item:e}),i=Array.isArray(n)?n[o==="min"?0:n.length-1]:n;if(i==null||i==="")return!0;let s=Ome(r),a=Ome(String(i));return!!s&&!!a&&(o==="min"?a.getTime()>=s.getTime():a.getTime()<=s.getTime())}function pO(e,t){return Lme(e,t,"min")}function hO(e,t){return Lme(e,t,"max")}var Nme={datetime:(0,Kp.getSettings)().formats.datetime,weekStartsOn:(0,Kp.getSettings)().l10n.startOfWeek};function oMe({item:e,field:t}){let o=t.getValue({item:e});if(["",void 0,null].includes(o))return"";let r;return t.type!=="datetime"?r=Nme:r=t.format,(0,Kp.dateI18n)(r.datetime,(0,Kp.getDate)(o))}var rMe=(e,t,o)=>{let r=new Date(e).getTime(),n=new Date(t).getTime();return o==="asc"?r-n:n-r},Mme={type:"datetime",render:ko,Edit:"datetime",sort:rMe,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Cf,Bf,_f,Sf,xf,wf,pn,Fn],validOperators:[Cf,Bf,_f,Sf,xf,wf,pn,Fn],format:Nme,getValueFormatted:oMe,validate:{required:yo,elements:Pt,min:pO,max:hO}};var Yp=l(Ja(),1);var Dme={date:(0,Yp.getSettings)().formats.date,weekStartsOn:(0,Yp.getSettings)().l10n.startOfWeek};function nMe({item:e,field:t}){let o=t.getValue({item:e});if(["",void 0,null].includes(o))return"";let r;return t.type!=="date"?r=Dme:r=t.format,(0,Yp.dateI18n)(r.date,(0,Yp.getDate)(o))}var iMe=(e,t,o)=>{let r=new Date(e).getTime(),n=new Date(t).getTime();return o==="asc"?r-n:n-r},Vme={type:"date",render:ko,Edit:"date",sort:iMe,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Cf,Bf,_f,Sf,xf,wf,pn,Fn,mn],validOperators:[Cf,Bf,_f,Sf,xf,wf,pn,Fn,mn],format:Dme,getValueFormatted:nMe,validate:{required:yo,elements:Pt,min:pO,max:hO}};var gO=l(N(),1);function Fme(e,t){return t.getValue({item:e})===!0}function sMe({item:e,field:t}){let o=t.getValue({item:e});return o===!0?(0,gO.__)("True"):o===!1?(0,gO.__)("False"):""}function aMe(e,t){let o=t.getValue({item:e});return![void 0,"",null].includes(o)&&![!0,!1].includes(o)?(0,gO.__)("Value must be true, false, or undefined"):null}var lMe=(e,t,o)=>{let r=!!e;return r===!!t?0:o==="asc"?r?1:-1:r?-1:1},zme={type:"boolean",render:ko,Edit:"checkbox",sort:lMe,validate:{required:Fme,elements:Pt,custom:aMe},enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[io,so],validOperators:[io,so],format:{},getValueFormatted:sMe};var jme={type:"media",render:()=>null,Edit:null,sort:()=>0,enableSorting:!1,enableGlobalSearch:!1,defaultOperators:[],validOperators:[],format:{},getValueFormatted:gn,validate:{}};var O6=l(N(),1);function Ume(e,t){let o=t.getValue({item:e});return Array.isArray(o)&&o.length>0&&o.every(r=>![void 0,"",null].includes(r))}function Hme({item:e,field:t}){let o=t.getValue({item:e});return(Array.isArray(o)?o:[]).join(", ")}function cMe({item:e,field:t}){return Hme({item:e,field:t})}function uMe(e,t){let o=t.getValue({item:e});return![void 0,"",null].includes(o)&&!Array.isArray(o)?(0,O6.__)("Value must be an array."):o.every(r=>typeof r=="string")?null:(0,O6.__)("Every value must be a string.")}var dMe=(e,t,o)=>{let r=Array.isArray(e)?e:[],n=Array.isArray(t)?t:[];if(r.length!==n.length)return o==="asc"?r.length-n.length:n.length-r.length;let i=r.join(","),s=n.join(",");return o==="asc"?i.localeCompare(s):s.localeCompare(i)},Gme={type:"array",render:cMe,Edit:"array",sort:dMe,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[qt,Zt],validOperators:[qt,Zt,zr,jr],format:{},getValueFormatted:Hme,validate:{required:Ume,elements:Pt,custom:uMe}};function fMe({item:e,field:t}){return t.getValue({item:e})?"\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022":""}var Wme={type:"password",render:ko,Edit:"password",sort:()=>0,enableSorting:!1,enableGlobalSearch:!1,defaultOperators:[],validOperators:[],format:{},getValueFormatted:fMe,validate:{required:yo,pattern:Sl,minLength:yl,maxLength:_l,elements:Pt}};var $me={type:"telephone",render:ko,Edit:"telephone",sort:kl,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[qt,Zt],validOperators:[io,so,pl,hl,gl,qt,Zt,zr,jr],format:{},getValueFormatted:gn,validate:{required:yo,pattern:Sl,minLength:yl,maxLength:_l,elements:Pt}};var Kme=l(N(),1);var $v=l(w(),1);function mMe({item:e,field:t}){if(t.hasElements)return(0,$v.jsx)(dO,{item:e,field:t});let o=gn({item:e,field:t});return!o||!Ot(o).isValid()?o:(0,$v.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[(0,$v.jsx)("div",{style:{width:"16px",height:"16px",borderRadius:"50%",backgroundColor:o,border:"1px solid #ddd",flexShrink:0}}),(0,$v.jsx)("span",{children:o})]})}function pMe(e,t){let o=t.getValue({item:e});return![void 0,"",null].includes(o)&&!Ot(o).isValid()?(0,Kme.__)("Value must be a valid color."):null}var hMe=(e,t,o)=>{let r=Ot(e),n=Ot(t);if(!r.isValid()&&!n.isValid())return 0;if(!r.isValid())return o==="asc"?1:-1;if(!n.isValid())return o==="asc"?-1:1;let i=r.toHsl(),s=n.toHsl();return i.h!==s.h?o==="asc"?i.h-s.h:s.h-i.h:i.s!==s.s?o==="asc"?i.s-s.s:s.s-i.s:o==="asc"?i.l-s.l:s.l-i.l},Yme={type:"color",render:mMe,Edit:"color",sort:hMe,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[qt,Zt],validOperators:[io,so,qt,Zt],format:{},getValueFormatted:gn,validate:{required:yo,elements:Pt,custom:pMe}};var qme={type:"url",render:ko,Edit:"url",sort:kl,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[qt,Zt],validOperators:[io,so,pl,hl,gl,qt,Zt,zr,jr],format:{},getValueFormatted:gn,validate:{required:yo,pattern:Sl,minLength:yl,maxLength:_l,elements:Pt}};var gMe=(e,t,o)=>typeof e=="number"&&typeof t=="number"?Wv(e,t,o):kl(e,t,o),Zme={render:ko,Edit:null,sort:gMe,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[io,so],validOperators:Tfe(),format:{},getValueFormatted:gn,validate:{required:yo,elements:Pt}};function bMe(e){return e==="integer"||e==="number"}function vMe(e){return e==="date"||e==="datetime"}function Xme(e,t,o){let r=t.validate[o];if(r&&(typeof e=="number"&&bMe(t.type)||typeof e=="string"&&vMe(t.type)))return{constraint:e,validate:r}}function Qme(e,t){let o=e.isValid,r;o?.required===!0&&t.validate.required!==void 0&&(r={constraint:!0,validate:t.validate.required});let n;(o?.elements===!0||o?.elements===void 0&&(e.elements||e.getElements))&&t.validate.elements!==void 0&&(n={constraint:!0,validate:t.validate.elements});let i=Xme(o?.min,t,"min"),s=Xme(o?.max,t,"max"),a=o?.minLength,c;typeof a=="number"&&t.validate.minLength!==void 0&&(c={constraint:a,validate:t.validate.minLength});let u=o?.maxLength,d;typeof u=="number"&&t.validate.maxLength!==void 0&&(d={constraint:u,validate:t.validate.maxLength});let f=o?.pattern,m;f!==void 0&&t.validate.pattern!==void 0&&(m={constraint:f,validate:t.validate.pattern});let h=o?.custom??t.validate.custom;return{required:r,elements:n,min:i,max:s,minLength:c,maxLength:d,pattern:m,custom:h}}function Jme(e){return e.validOperators.reduce((t,o)=>{let r=Efe(o);return r?.filter&&(t[o]=r.filter),t},{})}function kMe(e,t){return{...t.format,...e.format}}var epe=kMe;function yMe(e){let t=[wme,Eme,Pme,Rme,Mme,Vme,zme,jme,Gme,Wme,$me,Yme,qme].find(o=>o?.type===e);return t||Zme}function d0(e){return e.map(t=>{let o=yMe(t.type),r=t.getValue||yme(t.id),n=function(i,s,a){let c=r({item:i}),u=r({item:s});return t.sort?t.sort(c,u,a):o.sort(c,u,a)};return{id:t.id,label:t.label||t.id,header:t.header||t.label||t.id,description:t.description,placeholder:t.placeholder,getValue:r,setValue:t.setValue||_me(t.id),elements:t.elements,getElements:t.getElements,hasElements:cO(t),isVisible:t.isVisible,isDisabled:typeof t.isDisabled=="function"?t.isDisabled:()=>!!t.isDisabled,enableHiding:t.enableHiding??!0,readOnly:t.readOnly??!1,type:o.type,render:t.render??o.render,Edit:vme(t,o.Edit),sort:n,enableSorting:t.enableSorting??o.enableSorting,enableGlobalSearch:t.enableGlobalSearch??o.enableGlobalSearch,isValid:Qme(t,o),filterBy:kme(t,o.defaultOperators,o.validOperators),filter:Jme(o),format:epe(t,o),getValueFormatted:t.getValueFormatted??o.getValueFormatted}})}var D6=l(R(),1);var tpe=l(R(),1),ope=l(w(),1),A6=(0,tpe.createContext)({fields:[]});A6.displayName="DataFormContext";function rpe({fields:e,children:t}){return(0,ope.jsx)(A6.Provider,{value:{fields:e},children:t})}var xs=A6;var BO=l(R(),1);var vO=l(R(),1),m0=l(A(),1);var f0=l(N(),1),Gr={type:"regular",labelPosition:"top"},_Me=e=>typeof e=="string"?[{id:e,visibility:"when-collapsed"}]:e.map(t=>typeof t=="string"?{id:t,visibility:"when-collapsed"}:{id:t.id,visibility:t.visibility});function npe(e){let t=Gr;if(e?.type==="regular")t={type:"regular",labelPosition:e?.labelPosition??"top"};else if(e?.type==="panel"){let o=e.summary??[],r=Array.isArray(o)?o:[o],n=e?.openAs,i;typeof n=="object"&&n.type==="modal"?i={type:"modal",applyLabel:n.applyLabel?.trim()||(0,f0.__)("Apply"),cancelLabel:n.cancelLabel?.trim()||(0,f0.__)("Cancel")}:n==="modal"?i={type:"modal",applyLabel:(0,f0.__)("Apply"),cancelLabel:(0,f0.__)("Cancel")}:i={type:"dropdown"},t={type:"panel",labelPosition:e?.labelPosition??"side",openAs:i,summary:r,editVisibility:e?.editVisibility??"on-hover"}}else if(e?.type==="card")if(e.withHeader===!1)t={type:"card",withHeader:!1,isOpened:!0,summary:[],isCollapsible:!1};else{let o=e.summary??[];t={type:"card",withHeader:!0,isOpened:typeof e.isOpened=="boolean"?e.isOpened:!0,summary:_Me(o),isCollapsible:e.isCollapsible===void 0?!0:e.isCollapsible}}else e?.type==="row"?t={type:"row",alignment:e?.alignment??"center",styles:e?.styles??{}}:e?.type==="details"&&(t={type:"details",summary:e?.summary??""});return t}function ipe(e){let t=npe(e?.layout),o=(e.fields??[]).map(r=>{if(typeof r=="string")return{id:r,layout:t};let n=r.layout?npe(r.layout):t;return{id:r.id,layout:n,...!!r.label&&{label:r.label},...!!r.description&&{description:r.description},..."children"in r&&Array.isArray(r.children)&&{children:ipe({fields:r.children,layout:Gr}).fields}}});return{layout:t,fields:o}}var bO=ipe;var Xt=l(w(),1);function SMe({title:e}){return(0,Xt.jsx)(Re,{direction:"column",className:"dataforms-layouts-regular__header",gap:"lg",children:(0,Xt.jsx)(Re,{direction:"row",align:"center",children:(0,Xt.jsx)(m0.__experimentalHeading,{level:2,size:13,children:e})})})}function spe({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){let{fields:s}=(0,vO.useContext)(xs),a=t.layout,c=(0,vO.useMemo)(()=>({layout:Gr,fields:t.children?t.children:[]}),[t]);if(t.children)return(0,Xt.jsxs)(Xt.Fragment,{children:[!r&&t.label&&(0,Xt.jsx)(SMe,{title:t.label}),(0,Xt.jsx)(Un,{data:e,form:c,onChange:o,validity:i?.children})]});let u=a.labelPosition,d=s.find(f=>f.id===t.id);return!d||!d.Edit?null:u==="side"?(0,Xt.jsxs)(Re,{direction:"row",className:"dataforms-layouts-regular__field",gap:"sm",children:[(0,Xt.jsx)("div",{className:D("dataforms-layouts-regular__field-label",`dataforms-layouts-regular__field-label--label-position-${u}`),children:(0,Xt.jsx)(m0.BaseControl.VisualLabel,{children:d.label})}),(0,Xt.jsx)("div",{className:"dataforms-layouts-regular__field-control",children:d.readOnly===!0?(0,Xt.jsx)(d.render,{item:e,field:d}):(0,Xt.jsx)(d.Edit,{data:e,field:d,onChange:o,hideLabelFromVision:!0,markWhenOptional:n,validity:i},d.id)})]}):(0,Xt.jsx)("div",{className:"dataforms-layouts-regular__field",children:d.readOnly===!0?(0,Xt.jsx)(Xt.Fragment,{children:(0,Xt.jsxs)(Xt.Fragment,{children:[!r&&u!=="none"&&(0,Xt.jsx)(m0.BaseControl.VisualLabel,{children:d.label}),(0,Xt.jsx)(d.render,{item:e,field:d})]})}):(0,Xt.jsx)(d.Edit,{data:e,field:d,onChange:o,hideLabelFromVision:u==="none"?!0:r,markWhenOptional:n,validity:i})})}var N6=l(x4(),1),qp=l(A(),1),ba=l(R(),1),SO=l(X(),1);var Yv=l(A(),1),Kv=l(N(),1);var dpe=l(X(),1),fpe=l(R(),1);function xMe(e,t){return D("dataforms-layouts-panel__field-label",`dataforms-layouts-panel__field-label--label-position-${e}`,{"has-error":t})}var ape=xMe;var kO=l(A(),1);var p0=l(w(),1);function wMe(e,t,o){return e?(0,p0.jsx)(kO.Tooltip,{text:t,placement:"top",children:(0,p0.jsxs)("span",{className:"dataforms-layouts-panel__field-label-error-content",children:[(0,p0.jsx)(kO.Icon,{icon:rm,size:16}),o]})}):o}var lpe=wMe;function cpe(e){if(!e)return;let t=Object.keys(e).filter(o=>o!=="children");for(let o of t){let r=e[o];if(r!==void 0&&r.type==="invalid")return r.message?r.message:o==="required"?"A required field is empty":"Unidentified validation error"}if(e.children)for(let o of Object.values(e.children)){let r=cpe(o);if(r)return r}}var upe=cpe;var Ci=l(w(),1);function h0({data:e,field:t,fieldLabel:o,summaryFields:r,validity:n,touched:i,disabled:s,onClick:a,"aria-expanded":c}){let{labelPosition:u,editVisibility:d}=t.layout,f=upe(n),m=i&&!!f,h=ape(u,m),p=lpe(m,f,o),g=D("dataforms-layouts-panel__field-trigger",`dataforms-layouts-panel__field-trigger--label-${u}`,{"is-disabled":s,"dataforms-layouts-panel__field-trigger--edit-always":d==="always"}),b=(0,dpe.useInstanceId)(h0,"dataforms-layouts-panel__field-control"),k=m?(0,Kv.sprintf)((0,Kv._x)("Edit %s (has errors)","field"),o||""):(0,Kv.sprintf)((0,Kv._x)("Edit %s","field"),o||""),v=(0,fpe.useRef)(null);return(0,Ci.jsxs)("div",{ref:v,className:g,onClick:s?void 0:()=>{let S=v.current?.ownerDocument.defaultView?.getSelection();S&&S.toString().length>0||a()},onKeyDown:s?void 0:S=>{S.target===S.currentTarget&&(S.key==="Enter"||S.key===" ")&&(S.preventDefault(),a())},children:[u!=="none"&&(0,Ci.jsx)("span",{className:h,children:p}),u==="none"&&m&&(0,Ci.jsx)(Yv.Tooltip,{text:f,placement:"top",children:(0,Ci.jsx)("span",{className:"dataforms-layouts-panel__field-label-error-content",children:(0,Ci.jsx)(Yv.Icon,{icon:rm,size:16})})}),(0,Ci.jsx)("span",{id:`${b}`,className:"dataforms-layouts-panel__field-control",children:r.length>1?(0,Ci.jsx)("span",{style:{display:"flex",flexDirection:"column",alignItems:"flex-start",width:"100%",gap:"2px"},children:r.map(S=>(0,Ci.jsx)("span",{style:{width:"100%"},children:(0,Ci.jsx)(S.render,{item:e,field:S})},S.id))}):r.map(S=>(0,Ci.jsx)(S.render,{item:e,field:S},S.id))}),!s&&(0,Ci.jsx)(Yv.Button,{className:"dataforms-layouts-panel__field-trigger-icon",label:k,icon:sm,size:"small","aria-expanded":c,"aria-haspopup":"dialog","aria-describedby":`${b}`})]})}var mpe=l(x4(),1),L6=l(Kf(),1),xl=l(R(),1),bn=l(N(),1);function ppe(e){return e?Object.values(e).every(t=>Object.entries(t).every(([o,r])=>o==="children"&&r&&typeof r=="object"?ppe(r):r.type!=="invalid"&&r.type!=="validating")):!0}function CMe(e,t){let o=bO(e);if(o.fields.length===0)return[];let r=new Map;t.forEach(s=>{r.set(s.id,s)});function n(s){if("children"in s&&Array.isArray(s.children)){let u=s.children.map(n).filter(f=>f!==null);if(u.length===0)return null;let d=r.get(s.id);if(d){let[f]=d0([d]);return{id:s.id,children:u,field:f}}return{id:s.id,children:u}}let a=r.get(s.id);if(!a)return null;let[c]=d0([a]);return{id:s.id,children:[],field:c}}return o.fields.map(n).filter(s=>s!==null)}function qv(e,t,o){if(e||(e={}),o.length===0)return e;let r={...e},n=r;for(let s=0;s<o.length-1;s++){let a=o[s];n[a]||(n[a]={}),n[a]={...n[a]},n=n[a]}let i=o[o.length-1];return n[i]={...n[i]||{},...t},r}function hpe(e,t,o){if(!e||t.length===0)return e;let r={...e},n=r;for(let a=0;a<t.length-1;a++){let c=t[a];if(!n[c])return e;n[c]={...n[c]},n=n[c]}let i=t[t.length-1];if(!n[i])return e;let s={...n[i]};if(delete s[o],Object.keys(s).length===0?delete n[i]:n[i]=s,Object.keys(r).length!==0)return r}function BMe(e,t,o){let{elementsCounterRef:r,setFormValidity:n,path:i,item:s}=o,a=(r.current[t.id]||0)+1;r.current[t.id]=a,e.then(c=>{if(a===r.current[t.id]){if(!Array.isArray(c)){n(u=>qv(u,{elements:{type:"invalid",message:(0,bn.__)("Could not validate elements.")}},[...i,t.id]));return}t.field?.isValid.elements&&!t.field.isValid.elements.validate(s,{...t.field,elements:c})?n(u=>qv(u,{elements:{type:"invalid",message:(0,bn.__)("Value must be one of the elements.")}},[...i,t.id])):n(u=>hpe(u,[...i,t.id],"elements"))}}).catch(c=>{if(a!==r.current[t.id])return;let u;c instanceof Error?u=c.message:u=String(c)||(0,bn.__)("Unknown error when running elements validation asynchronously."),n(d=>qv(d,{elements:{type:"invalid",message:u}},[...i,t.id]))})}function EMe(e,t,o){let{customCounterRef:r,setFormValidity:n,path:i}=o,s=(r.current[t.id]||0)+1;r.current[t.id]=s,e.then(a=>{if(s===r.current[t.id]){if(a===null){n(c=>hpe(c,[...i,t.id],"custom"));return}if(typeof a=="string"){n(c=>qv(c,{custom:{type:"invalid",message:a}},[...i,t.id]));return}n(c=>qv(c,{custom:{type:"invalid",message:(0,bn.__)("Validation could not be processed.")}},[...i,t.id]))}}).catch(a=>{if(s!==r.current[t.id])return;let c;a instanceof Error?c=a.message:c=String(a)||(0,bn.__)("Unknown error when running custom validation asynchronously."),n(u=>qv(u,{custom:{type:"invalid",message:c}},[...i,t.id]))})}function gpe(e,t,o){if(t.field?.isValid.required&&!t.field.isValid.required.validate(e,t.field))return{required:{type:"invalid"}};if(t.field?.isValid.pattern&&!t.field.isValid.pattern.validate(e,t.field))return{pattern:{type:"invalid",message:(0,bn.__)("Value does not match the required pattern.")}};if(t.field?.isValid.min&&!t.field.isValid.min.validate(e,t.field))return{min:{type:"invalid",message:(0,bn.__)("Value is below the minimum.")}};if(t.field?.isValid.max&&!t.field.isValid.max.validate(e,t.field))return{max:{type:"invalid",message:(0,bn.__)("Value is above the maximum.")}};if(t.field?.isValid.minLength&&!t.field.isValid.minLength.validate(e,t.field))return{minLength:{type:"invalid",message:(0,bn.__)("Value is too short.")}};if(t.field?.isValid.maxLength&&!t.field.isValid.maxLength.validate(e,t.field))return{maxLength:{type:"invalid",message:(0,bn.__)("Value is too long.")}};if(t.field?.isValid.elements&&t.field.hasElements&&!t.field.getElements&&Array.isArray(t.field.elements)&&!t.field.isValid.elements.validate(e,t.field))return{elements:{type:"invalid",message:(0,bn.__)("Value must be one of the elements.")}};let r;if(t.field&&t.field.isValid.custom)try{let i=t.field.getValue({item:e});r=t.field.isValid.custom((0,mpe.default)(e,t.field.setValue({item:e,value:i})),t.field)}catch(i){let s;return i instanceof Error?s=i.message:s=String(i)||(0,bn.__)("Unknown error when running custom validation."),{custom:{type:"invalid",message:s}}}if(typeof r=="string")return{custom:{type:"invalid",message:r}};let n={};if(t.field&&t.field.isValid.elements&&t.field.hasElements&&typeof t.field.getElements=="function"&&(BMe(t.field.getElements(),t,o),n.elements={type:"validating",message:(0,bn.__)("Validating\u2026")}),r instanceof Promise&&(EMe(r,t,o),n.custom={type:"validating",message:(0,bn.__)("Validating\u2026")}),Object.keys(n).length>0)return n;if(t.children.length>0){let i={};t.children.forEach(a=>{i[a.id]=gpe(e,a,{...o,path:[...o.path,t.id,"children"]})});let s={};return Object.entries(i).forEach(([a,c])=>{c!==void 0&&(s[a]=c)}),Object.keys(s).length===0?void 0:{children:s}}}function bpe(e,t){let o=e?.field?.getValue({item:t});if(e.children.length===0)return o;let r=e.children.map(n=>bpe(n,t));return r?{value:o,children:r}:o}function TMe(e,t,o){let[r,n]=(0,xl.useState)(),i=(0,xl.useRef)({}),s=(0,xl.useRef)({}),a=(0,xl.useRef)({}),c=(0,xl.useCallback)(()=>{let u={customCounterRef:i,elementsCounterRef:s,setFormValidity:n,path:[],item:e},d=CMe(o,t);if(d.length===0){n(void 0);return}let f={},m=[];d.forEach(h=>{let p=bpe(h,e);if(a.current.hasOwnProperty(h.id)&&(0,L6.default)(a.current[h.id],p)){m.push(h.id);return}a.current[h.id]=p;let g=gpe(e,h,u);g!==void 0&&(f[h.id]=g)}),n(h=>{let p={...h,...f},g=[...m,...Object.keys(f)];return Object.keys(p).forEach(k=>{p&&!g.includes(k)&&delete p[k]}),Object.keys(p).length===0&&(p=void 0),(0,L6.default)(h,p)?h:p})},[e,t,o]);return(0,xl.useEffect)(()=>{c()},[c]),{validity:r,isValid:ppe(r)}}var vpe=TMe;var kpe=l(R(),1);function Rf(e,t){(0,kpe.useEffect)(()=>{t&&e.current&&e.current.querySelectorAll("input, textarea, select").forEach(r=>{r.reportValidity()})},[t,e])}var ype=l(R(),1);function IMe(e){return Array.isArray(e)?e.map(t=>typeof t=="string"?t:t.id):[]}var yO=(e,t)=>Array.isArray(e)&&e.length>0?IMe(e).map(r=>t.find(n=>n.id===r)).filter(r=>r!==void 0):[];var PMe=(e,t)=>{let o=t.find(r=>r.id===e.id);return o||t.find(r=>{if(e.children){let n=e.children.filter(i=>!i.children);return n.length===0?!1:r.id===n[0].id}return r.id===e.id})};function RMe(e){let{fields:t}=(0,ype.useContext)(xs),o=e.layout,r=yO(o.summary,t),n=PMe(e,t),i=e.children?e.label:n?.label;return r.length===0?{summaryFields:n?[n]:[],fieldDefinition:n,fieldLabel:i}:{summaryFields:r,fieldDefinition:n,fieldLabel:i}}var _O=RMe;var vn=l(w(),1);function OMe({data:e,field:t,onChange:o,fieldLabel:r,onClose:n,touched:i}){let{openAs:s}=t.layout,{applyLabel:a,cancelLabel:c}=s,{fields:u}=(0,ba.useContext)(xs),[d,f]=(0,ba.useState)({}),m=(0,ba.useMemo)(()=>(0,N6.default)(e,d,{arrayMerge:(S,C)=>C}),[e,d]),h=(0,ba.useMemo)(()=>({layout:Gr,fields:t.children?t.children:[{id:t.id,layout:Gr}]}),[t]),p=u.map(S=>({...S,Edit:S.Edit===null?void 0:S.Edit,isValid:{required:S.isValid.required?.constraint,elements:S.isValid.elements?.constraint,min:S.isValid.min?.constraint,max:S.isValid.max?.constraint,pattern:S.isValid.pattern?.constraint,minLength:S.isValid.minLength?.constraint,maxLength:S.isValid.maxLength?.constraint}})),{validity:g}=vpe(m,p,h),b=()=>{o(d),n()},k=S=>{f(C=>(0,N6.default)(C,S,{arrayMerge:(B,T)=>T}))},v=(0,SO.useFocusOnMount)("firstInputElement"),y=(0,ba.useRef)(null),_=(0,SO.useMergeRefs)([v,y]);return Rf(y,i),(0,vn.jsxs)(qp.Modal,{className:"dataforms-layouts-panel__modal",onRequestClose:n,isFullScreen:!1,title:r,size:"medium",children:[(0,vn.jsx)("div",{ref:_,children:(0,vn.jsx)(Un,{data:m,form:h,onChange:k,validity:g,children:(S,C,B,T)=>(0,vn.jsx)(S,{data:m,field:C,onChange:k,hideLabelFromVision:h.fields.length<2,markWhenOptional:T,validity:B},C.id)})}),(0,vn.jsxs)(Re,{direction:"row",className:"dataforms-layouts-panel__modal-footer",gap:"md",children:[(0,vn.jsx)(qp.__experimentalSpacer,{style:{flex:1}}),(0,vn.jsx)(qp.Button,{variant:"tertiary",onClick:n,__next40pxDefaultSize:!0,children:c}),(0,vn.jsx)(qp.Button,{variant:"primary",onClick:b,__next40pxDefaultSize:!0,children:a})]})]})}function AMe({data:e,field:t,onChange:o,validity:r}){let[n,i]=(0,ba.useState)(!1),[s,a]=(0,ba.useState)(!1),{fieldDefinition:c,fieldLabel:u,summaryFields:d}=_O(t);if(!c)return null;let f=()=>{a(!1),i(!0)};return(0,vn.jsxs)(vn.Fragment,{children:[(0,vn.jsx)(h0,{data:e,field:t,fieldLabel:u,summaryFields:d,validity:r,touched:n,disabled:c.readOnly===!0,onClick:()=>a(!0),"aria-expanded":s}),s&&(0,vn.jsx)(OMe,{data:e,field:t,onChange:o,fieldLabel:u??"",onClose:f,touched:n})]})}var _pe=AMe;var Of=l(A(),1),Spe=l(N(),1),qc=l(R(),1);var xpe=l(X(),1);var Wr=l(w(),1);function LMe({title:e,onClose:t}){return(0,Wr.jsx)(Re,{direction:"column",className:"dataforms-layouts-panel__dropdown-header",gap:"lg",children:(0,Wr.jsxs)(Re,{direction:"row",gap:"sm",align:"center",children:[e&&(0,Wr.jsx)(Of.__experimentalHeading,{level:2,size:13,children:e}),(0,Wr.jsx)(Of.__experimentalSpacer,{style:{flex:1}}),t&&(0,Wr.jsx)(Of.Button,{label:(0,Spe.__)("Close"),icon:Xf,onClick:t,size:"small"})]})})}function NMe({touched:e,children:t}){let o=(0,qc.useRef)(null);return Rf(o,e),(0,Wr.jsx)("div",{ref:o,children:t})}function MMe({data:e,field:t,onChange:o,validity:r}){let[n,i]=(0,qc.useState)(!1),[s,a]=(0,qc.useState)(null),c=(0,qc.useMemo)(()=>({anchor:s,placement:"left-start",offset:36,shift:!0}),[s]),[u,d]=(0,xpe.__experimentalUseDialog)({focusOnMount:"firstInputElement"}),f=(0,qc.useMemo)(()=>({layout:Gr,fields:t.children?t.children:[{id:t.id,layout:Gr}]}),[t]),m=(0,qc.useMemo)(()=>{if(r!==void 0)return t.children?r?.children:{[t.id]:r}},[r,t]),{fieldDefinition:h,fieldLabel:p,summaryFields:g}=_O(t);return h?(0,Wr.jsx)("div",{ref:a,className:"dataforms-layouts-panel__field-dropdown-anchor",children:(0,Wr.jsx)(Of.Dropdown,{contentClassName:"dataforms-layouts-panel__field-dropdown",popoverProps:c,focusOnMount:!1,onToggle:b=>{b||i(!0)},renderToggle:({isOpen:b,onToggle:k})=>(0,Wr.jsx)(h0,{data:e,field:t,fieldLabel:p,summaryFields:g,validity:r,touched:n,disabled:h.readOnly===!0,onClick:k,"aria-expanded":b}),renderContent:({onClose:b})=>(0,Wr.jsx)(NMe,{touched:n,children:(0,Wr.jsxs)("div",{ref:u,...d,children:[(0,Wr.jsx)(LMe,{title:p,onClose:b}),(0,Wr.jsx)(Un,{data:e,form:f,onChange:o,validity:m,children:(k,v,y,_)=>(0,Wr.jsx)(k,{data:e,field:v,onChange:o,hideLabelFromVision:(f?.fields??[]).length<2,markWhenOptional:_,validity:y},v.id)})]})})})}):null}var wpe=MMe;var M6=l(w(),1);function Cpe({data:e,field:t,onChange:o,validity:r}){return t.layout.openAs.type==="modal"?(0,M6.jsx)(_pe,{data:e,field:t,onChange:o,validity:r}):(0,M6.jsx)(wpe,{data:e,field:t,onChange:o,validity:r})}var Hn=l(R(),1);var xO=l(N(),1),Bpe=l(w(),1);function Epe(e){if(!e)return 0;let t=0,o=Object.keys(e).filter(r=>r!=="children");for(let r of o)e[r]?.type==="invalid"&&t++;if(e.children)for(let r of Object.values(e.children))t+=Epe(r);return t}function wO({validity:e}){let t=Epe(e);return t===0?null:(0,Bpe.jsx)(qD,{intent:"high",children:(0,xO.sprintf)((0,xO._n)("%d field needs attention","%d fields need attention",t),t)})}var _o=l(w(),1);function DMe(e,t,o){if(!t||Array.isArray(t)&&t.length===0)return!1;let n=(Array.isArray(t)?t:[t]).find(i=>typeof i=="string"?i===e.id:typeof i=="object"&&"id"in i?i.id===e.id:!1);return n?typeof n=="string"?!0:typeof n=="object"&&"visibility"in n?n.visibility==="always"||n.visibility==="when-collapsed"&&!o:!0:!1}function VMe({data:e,fields:t,label:o,layout:r,isOpen:n,touched:i,validity:s}){let c=yO(r.summary,t).filter(f=>DMe(f,r.summary,n)),u=i&&r.isCollapsible,d=c.length>0&&r.withHeader;return(0,_o.jsxs)(Re,{align:"center",justify:"space-between",className:"dataforms-layouts-card__field-header-content",children:[(0,_o.jsx)(Na.Title,{children:o}),(u||d)&&(0,_o.jsxs)(Am.HeaderDescription,{className:"dataforms-layouts-card__field-header-content-description",children:[u&&(0,_o.jsx)(wO,{validity:s}),d&&(0,_o.jsx)("div",{className:"dataforms-layouts-card__field-summary",children:c.map(f=>(0,_o.jsx)(f.render,{item:e,field:f},f.id))})]})]})}function FMe({data:e,field:t,form:o,onChange:r,hideLabelFromVision:n,markWhenOptional:i,validity:s,withHeader:a}){if(t.children)return(0,_o.jsxs)(_o.Fragment,{children:[t.description&&(0,_o.jsx)("div",{className:"dataforms-layouts-card__field-description",children:t.description}),(0,_o.jsx)(Un,{data:e,form:o,onChange:r,validity:s?.children})]});let c=Zp("regular")?.component;return c?(0,_o.jsx)(c,{data:e,field:t,onChange:r,hideLabelFromVision:n||a,markWhenOptional:i,validity:s}):null}function Tpe({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){let{fields:s}=(0,Hn.useContext)(xs),a=t.layout,c=(0,Hn.useRef)(null),u=(0,Hn.useMemo)(()=>({layout:Gr,fields:t.children??[]}),[t]),{isOpened:d,isCollapsible:f}=a,[m,h]=(0,Hn.useState)(d),[p,g]=(0,Hn.useState)(!1);(0,Hn.useEffect)(()=>{h(d)},[d]);let b=(0,Hn.useCallback)(C=>{C||g(!0),h(C)},[]),k=(0,Hn.useCallback)(()=>{g(!0)},[]);Rf(c,(f?m:!0)&&p);let v=t.label,y;if(t.children)y=!!v&&a.withHeader;else{let C=s.find(B=>B.id===t.id);if(!C||!C.Edit)return null;v=C.label,y=!!v&&a.withHeader}let _=(0,_o.jsx)(FMe,{data:e,field:t,form:u,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i,withHeader:y}),S=(0,_o.jsx)(VMe,{data:e,fields:s,label:v,layout:a,isOpen:f?!!m:!0,touched:p,validity:i});return y&&f?(0,_o.jsxs)(Am.Root,{className:"dataforms-layouts-card__field",open:m,onOpenChange:b,children:[(0,_o.jsx)(Am.Header,{children:S}),(0,_o.jsx)(Am.Content,{ref:c,onBlur:k,children:_})]}):(0,_o.jsxs)(Na.Root,{className:"dataforms-layouts-card__field",children:[y&&(0,_o.jsx)(Na.Header,{children:S}),(0,_o.jsx)(Na.Content,{ref:c,onBlur:k,children:_})]})}var Ipe=l(A(),1);var hr=l(w(),1);function zMe({title:e}){return(0,hr.jsx)(Re,{direction:"column",className:"dataforms-layouts-row__header",gap:"lg",children:(0,hr.jsx)(Re,{direction:"row",align:"center",children:(0,hr.jsx)(Ipe.__experimentalHeading,{level:2,size:13,children:e})})})}var jMe=({children:e})=>(0,hr.jsx)(hr.Fragment,{children:e});function Ppe({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){let s=t.layout;if(t.children){let c={layout:Gr,fields:t.children};return(0,hr.jsxs)("div",{className:"dataforms-layouts-row__field",children:[!r&&t.label&&(0,hr.jsx)(zMe,{title:t.label}),(0,hr.jsx)(Re,{direction:"row",align:s.alignment,gap:"lg",children:(0,hr.jsx)(Un,{data:e,form:c,onChange:o,validity:i?.children,as:jMe,children:(u,d,f)=>(0,hr.jsx)("div",{className:"dataforms-layouts-row__field-control",style:s.styles[d.id],children:(0,hr.jsx)(u,{data:e,field:d,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:f})},d.id)})})]})}let a=Zp("regular")?.component;return a?(0,hr.jsx)(hr.Fragment,{children:(0,hr.jsx)("div",{className:"dataforms-layouts-row__field-control",children:(0,hr.jsx)(a,{data:e,field:t,onChange:o,markWhenOptional:n,validity:i})})}):null}var Gn=l(R(),1),Rpe=l(N(),1);var Zc=l(w(),1);function Ope({data:e,field:t,onChange:o,validity:r}){let{fields:n}=(0,Gn.useContext)(xs),i=(0,Gn.useRef)(null),s=(0,Gn.useRef)(null),[a,c]=(0,Gn.useState)(!1),[u,d]=(0,Gn.useState)(!1),f=(0,Gn.useMemo)(()=>({layout:Gr,fields:t.children??[]}),[t]);(0,Gn.useEffect)(()=>{let b=i.current;if(!b)return;let k=()=>{let v=b.open;v||c(!0),d(v)};return b.addEventListener("toggle",k),()=>{b.removeEventListener("toggle",k)}},[]),Rf(s,u&&a);let m=(0,Gn.useCallback)(()=>{c(!0)},[]);if(!t.children)return null;let h=t.layout.summary??"",p=h?n.find(b=>b.id===h):void 0,g;return p&&p.render?g=(0,Zc.jsx)(p.render,{item:e,field:p}):g=t.label||(0,Rpe.__)("More details"),(0,Zc.jsxs)("details",{ref:i,className:"dataforms-layouts-details__details",children:[(0,Zc.jsx)("summary",{className:"dataforms-layouts-details__summary",children:(0,Zc.jsxs)(Re,{direction:"row",align:"center",gap:"md",className:"dataforms-layouts-details__summary-content",children:[g,a&&(0,Zc.jsx)(wO,{validity:r})]})}),(0,Zc.jsx)("div",{ref:s,className:"dataforms-layouts-details__content",onBlur:m,children:(0,Zc.jsx)(Un,{data:e,form:f,onChange:o,validity:r?.children})})]})}var Xp=l(w(),1),UMe=[{type:"regular",component:spe,wrapper:({children:e})=>(0,Xp.jsx)(Re,{direction:"column",className:"dataforms-layouts__wrapper",gap:"lg",children:e})},{type:"panel",component:Cpe,wrapper:({children:e})=>(0,Xp.jsx)(Re,{direction:"column",className:"dataforms-layouts__wrapper",gap:"md",children:e})},{type:"card",component:Tpe,wrapper:({children:e})=>(0,Xp.jsx)(Re,{direction:"column",className:"dataforms-layouts__wrapper",gap:"xl",children:e})},{type:"row",component:Ppe,wrapper:({children:e,layout:t})=>(0,Xp.jsx)(Re,{direction:"column",className:"dataforms-layouts__wrapper",gap:"lg",children:(0,Xp.jsx)("div",{className:"dataforms-layouts-row__field",children:(0,Xp.jsx)(Re,{direction:"row",gap:"lg",align:t.alignment,children:e})})})},{type:"details",component:Ope}];function Zp(e){return UMe.find(t=>t.type===e)}var CO=l(w(),1),HMe=({children:e})=>(0,CO.jsx)(Re,{direction:"column",className:"dataforms-layouts__wrapper",gap:"lg",children:e});function Un({data:e,form:t,onChange:o,validity:r,children:n,as:i}){let{fields:s}=(0,BO.useContext)(xs),a=(0,BO.useMemo)(()=>{let d=s.filter(m=>!!m.isValid?.required).length,f=s.length-d;return d>f},[s]);function c(d){return s.find(f=>f.id===d.id)}let u=i??Zp(t.layout.type)?.wrapper??HMe;return(0,CO.jsx)(u,{layout:t.layout,children:t.fields.map(d=>{let f=Zp(d.layout.type)?.component;if(!f)return null;let m=d.children?void 0:c(d);return m&&m.isVisible&&!m.isVisible(e)?null:n?n(f,d,r?.[d.id],a):(0,CO.jsx)(f,{data:e,field:d,onChange:o,markWhenOptional:a,validity:r?.[d.id]},d.id)})})}var V6=l(w(),1);function g0({data:e,form:t,fields:o,onChange:r,validity:n}){let i=(0,D6.useMemo)(()=>bO(t),[t]),s=(0,D6.useMemo)(()=>d0(o),[o]);return t.fields?(0,V6.jsx)(rpe,{fields:s,children:(0,V6.jsx)(Un,{data:e,form:i,onChange:r,validity:n})}):null}var Lf=l(R(),1),Ype=l(N(),1);var Xv=l(A(),1);var F6=l(N(),1);var Ape=l(X(),1);function Zv({isControl:e}={isControl:!1}){return(0,Ape.useViewportMatch)("medium","<")?{}:{popoverProps:{placement:"left-start",offset:e?35:259}}}var EO=l(w(),1);function Lpe({fields:e,visibleFields:t,onToggleField:o}){let{popoverProps:r}=Zv();return!e||e.length===0?null:(0,EO.jsx)(Xv.DropdownMenu,{icon:Ps,label:(0,F6.__)("Options"),popoverProps:r,toggleProps:{size:"small"},children:({onClose:n})=>(0,EO.jsx)(Xv.MenuGroup,{label:(0,F6.__)("Show / Hide"),children:e.map(i=>{let s=t.includes(i.id);return(0,EO.jsx)(Xv.MenuItem,{isSelected:s,onClick:()=>{o(i.id),n()},role:"menuitemcheckbox",icon:s?Li:null,children:i.label},i.id)})})})}var TO=l(A(),1),Npe=l(X(),1),Mpe=l(F(),1),Xc=l(R(),1),Dpe=l(yr(),1);var va=l(w(),1),{useRichText:GMe}=M(Dpe.privateApis);function Vpe({data:e,field:t,hideLabelFromVision:o,onChange:r,config:n={}}){let i=(0,Mpe.useRegistry)(),s=t.getValue({item:e}),a=t.config||{},{clientId:c}=n,[u,d]=(0,Xc.useState)({start:void 0,end:void 0}),[f,m]=(0,Xc.useState)(!1),h=(0,Xc.useRef)(),p=(0,Xc.useRef)(new Set),g=(0,Xc.useRef)(new Set),b=ev({allowedFormats:a?.allowedFormats,disableFormats:a?.disableFormats});function k(){h.current?.focus()}let{value:v,getValue:y,onChange:_,ref:S,formatTypes:C}=GMe({value:s,onChange(I){r(t.setValue({item:e,value:I}))},selectionStart:u.start,selectionEnd:u.end,onSelectionChange:(I,E)=>d({start:I,end:E}),__unstableIsSelected:f,preserveWhiteSpace:!!a?.preserveWhiteSpace,placeholder:a?.placeholder,__unstableDisableFormats:a?.disableFormats,allowedFormats:b,withoutInteractiveFormatting:a?.withoutInteractiveFormatting,__unstableFormatTypeHandlerContext:(0,Xc.useMemo)(()=>({richTextIdentifier:t.id,blockClientId:c}),[t.id,c])}),{baseControlProps:B,controlProps:T}=(0,TO.useBaseControlProps)({hideLabelFromVision:o??t.hideLabelFromVision,label:t.label});return(0,va.jsxs)(va.Fragment,{children:[f&&(0,va.jsx)(iv.Provider,{value:g,children:(0,va.jsx)(av.Provider,{value:p,children:(0,va.jsx)("div",{children:(0,va.jsx)(nP,{value:v,onChange:_,onFocus:k,formatTypes:C,forwardedRef:h,isVisible:!1})})})}),(0,va.jsx)(TO.BaseControl,{...B,children:(0,va.jsx)("div",{className:"block-editor-content-only-controls__rich-text",role:"textbox","aria-multiline":!a?.disableLineBreaks,ref:(0,Npe.useMergeRefs)([S,tP({registry:i,getValue:y,onChange:_,formatTypes:C,selectionChange:d,isSelected:f,disableFormats:a?.disableFormats,value:v,tagName:"div",disableLineBreaks:a?.disableLineBreaks,keyboardShortcuts:g,inputEvents:p}),h]),onFocus:()=>m(!0),onBlur:()=>m(!1),contentEditable:!0,...T})})]})}var Af=l(A(),1),Fpe=l(F(),1),zpe=l(Fe(),1),jpe=l(R(),1),Qp=l(N(),1);var ao=l(w(),1),WMe=e=>{window.requestAnimationFrame(()=>{let[t]=zpe.focus.tabbable.find(e?.current);t&&t.focus()})};function $Me({data:e,field:t,attachment:o,config:r}){let{allowedTypes:n=[],multiple:i=!1}=r||{};if(i)return"todo multiple";if(o?.media_type==="image"||o?.poster)return(0,ao.jsx)("div",{className:"block-editor-content-only-controls__media-thumbnail",children:(0,ao.jsx)("img",{alt:"",width:20,height:20,src:o.media_type==="image"?o.source_url:o.poster})});if(n.length===1){let a=t.getValue({item:e})?.url;if(n[0]==="image"&&a)return(0,ao.jsx)("div",{className:"block-editor-content-only-controls__media-thumbnail",children:(0,ao.jsx)("img",{alt:"",width:20,height:20,src:a})});let c;if(n[0]==="image"?c=Pk:n[0]==="video"?c=FM:n[0]==="audio"?c=WA:c=gh,c)return(0,ao.jsx)(Af.Icon,{icon:c,size:20})}return(0,ao.jsx)(Af.Icon,{icon:gh,size:20})}function Upe({data:e,field:t,onChange:o,config:r={}}){let{popoverProps:n}=Zv({isControl:!0}),i=t.getValue({item:e}),{allowedTypes:s=[],multiple:a=!1,useFeaturedImage:c=!1}=r,u=i?.id,d=i?.url,f=(0,Fpe.useSelect)(p=>{if(!u)return;let b=p(x).getSettings()[ox];if(b)return b(p,u)},[u]),m;if(s.length===1){let p=s[0];p==="image"?m=(0,Qp.__)("Image"):p==="video"?m=(0,Qp.__)("Video"):p==="application"?m=(0,Qp.__)("File"):m=(0,Qp.__)("Media")}else m=(0,Qp.__)("Media");let h=(0,jpe.useRef)();return(0,ao.jsx)(Xs,{children:(0,ao.jsxs)("div",{ref:h,className:"block-editor-content-only-controls",children:[(0,ao.jsx)(Xb,{className:"block-editor-content-only-controls__media-replace-flow",allowedTypes:s,mediaId:u,mediaURL:d,multiple:a,popoverProps:n,onReset:()=>{o(t.setValue({item:e,value:{}}))},...c&&{useFeaturedImage:!!i?.featuredImage,onToggleFeaturedImage:()=>{o(t.setValue({item:e,value:{featuredImage:!i?.featuredImage}}))}},onSelect:p=>{if(p.id&&p.url){let g={...p,mediaType:p.media_type};c&&(g.featuredImage=!1),o(t.setValue({item:e,value:g}))}},renderToggle:p=>(0,ao.jsx)(Af.Button,{__next40pxDefaultSize:!0,className:"block-editor-content-only-controls__media",...p,children:(0,ao.jsxs)(Af.__experimentalGrid,{rowGap:0,columnGap:8,templateColumns:"20px 1fr",className:"block-editor-content-only-controls__media-row",children:[d&&(0,ao.jsxs)(ao.Fragment,{children:[(0,ao.jsx)($Me,{attachment:f,field:t,data:e,config:r}),(0,ao.jsx)("span",{className:"block-editor-content-only-controls__media-title",children:f?.title?.raw&&f?.title?.raw!==""?f?.title?.raw:d})]}),!d&&(0,ao.jsxs)(ao.Fragment,{children:[(0,ao.jsx)("span",{className:"block-editor-content-only-controls__media-placeholder",style:{width:"20px",height:"20px"}}),(0,ao.jsx)("span",{className:"block-editor-content-only-controls__media-title",children:m})]})]})})}),d&&(0,ao.jsx)(Af.Button,{label:(0,Qp.__)("Reset"),className:"block-editor-content-only-controls__media-reset",size:"small",icon:kr,onClick:()=>{o(t.setValue({item:e,value:{}})),WMe(h)}})]})})}var Qc=l(A(),1),PO=l(R(),1),Hpe=l(N(),1);var Gpe=l(qn(),1);var Ir=l(w(),1),z6="noopener",Wpe="_blank",IO="nofollow";function KMe({rel:e="",url:t="",opensInNewTab:o,nofollow:r}){let n,i=e;if(o)n=Wpe,i=i?.includes(z6)?i:i+` ${z6}`;else{let s=new RegExp(`\\b${z6}\\s*`,"g");i=i?.replace(s,"").trim()}if(r)i=i?.includes(IO)?i:(i+` ${IO}`).trim();else{let s=new RegExp(`\\b${IO}\\s*`,"g");i=i?.replace(s,"").trim()}return{url:(0,Gpe.prependHTTP)(t),linkTarget:n,rel:i||void 0}}function $pe({data:e,field:t,onChange:o}){let[r,n]=(0,PO.useState)(!1),{popoverProps:i}=Zv({isControl:!0}),s=t.getValue({item:e}),a=s?.url,c=s?.rel||"",d=s?.linkTarget===Wpe,f=c===IO,m=(0,PO.useMemo)(()=>({url:a,opensInNewTab:d,nofollow:f}),[a,d,f]);return(0,Ir.jsxs)(Ir.Fragment,{children:[(0,Ir.jsx)(Qc.Button,{__next40pxDefaultSize:!0,className:"block-editor-content-only-controls__link",onClick:()=>{n(!0)},children:(0,Ir.jsxs)(Qc.__experimentalGrid,{rowGap:0,columnGap:8,templateColumns:"24px 1fr",className:"block-editor-content-only-controls__link-row",children:[a&&(0,Ir.jsxs)(Ir.Fragment,{children:[(0,Ir.jsx)(Qc.Icon,{icon:_n,size:24}),(0,Ir.jsx)("span",{className:"block-editor-content-only-controls__link-title",children:a})]}),!a&&(0,Ir.jsxs)(Ir.Fragment,{children:[(0,Ir.jsx)(Qc.Icon,{icon:_n,size:24,style:{opacity:.3}}),(0,Ir.jsx)("span",{className:"block-editor-content-only-controls__link-title",children:(0,Hpe.__)("Link")})]})]})}),r&&(0,Ir.jsx)(Qc.Popover,{onClose:()=>{n(!1)},...i??{},children:(0,Ir.jsx)(tf,{value:m,onChange:h=>{let p=KMe({rel:c,...h});o(t.setValue({item:e,value:p}))},onRemove:()=>{o(t.setValue({item:e,value:{}}))}})})]})}var Pr=l(w(),1),{fieldsKey:qpe,formKey:j6}=M(Qv.privateApis);function U6(e,t={}){return function(r){return(0,Pr.jsx)(e,{...r,config:t})}}function YMe({clientId:e,blockType:t,setAttributes:o,isMultiBlock:r=!1}){let n=Sr({clientId:e,context:"list-view"}),i=Lt(e),s=t?.[qpe],a=(0,Lf.useContext)(Or),c=(0,OO.useSelect)(k=>{let v=k(x).getBlockAttributes(e);if(!v?.metadata?.bindings)return v;let{getBlockBindingsSource:y}=M(k(Qv.store));return Object.entries(v.metadata.bindings).reduce((_,[S,C])=>{let B=y(C.source);if(!B)return _;let T=B.getValues({select:k,context:a,bindings:{[S]:C}});return{..._,...T}},v)},[a,e]),{selectBlock:u,toggleBlockHighlight:d}=(0,OO.useDispatch)(x),f=(0,Kpe.useDebounce)(d,50),m=(0,Lf.useMemo)(()=>r?{...t?.[j6],fields:[t?.[j6]?.fields?.[0]]}:t?.[j6],[t,r]),[h,p]=(0,Lf.useState)(m),g=(0,Lf.useMemo)(()=>s?.length?s.map(k=>{let v={...k};return typeof k.Edit=="string"&&k.Edit==="rich-text"?v.Edit=U6(Vpe,{clientId:e}):typeof k.Edit=="string"&&k.Edit==="link"?v.Edit=U6($pe):typeof k.Edit=="object"&&k.Edit.control==="media"&&(v.Edit=U6(Upe,{...k.Edit})),v}):[],[s,e]);if(!s?.length)return null;let b=k=>{p(v=>v.fields?.includes(k)?{...v,fields:v.fields.filter(y=>y!==k)}:{...v,fields:[...v.fields||[],k]})};return(0,Pr.jsxs)("div",{className:"block-editor-block-fields__container",onMouseEnter:r?()=>f(e,!0):void 0,onMouseLeave:()=>r?f(e,!1):void 0,onFocus:r?()=>{u(e,null)}:void 0,children:[(0,Pr.jsx)("div",{className:"block-editor-block-fields__header",children:(0,Pr.jsxs)(RO.__experimentalHStack,{spacing:1,children:[r&&(0,Pr.jsxs)(Pr.Fragment,{children:[(0,Pr.jsx)(Me,{className:"block-editor-block-fields__header-icon",icon:i?.icon}),(0,Pr.jsx)("h2",{className:"block-editor-block-fields__header-title",children:(0,Pr.jsx)(RO.__experimentalTruncate,{numberOfLines:1,children:n})}),(0,Pr.jsx)(Lpe,{fields:g,visibleFields:h.fields,onToggleField:b})]}),!r&&(0,Pr.jsx)("h2",{className:"block-editor-block-fields__header-title",children:(0,Ype.__)("Content")})]})}),(0,Pr.jsx)(g0,{data:c,fields:g,form:h,onChange:o})]})}function qMe(e){return!!(window?.__experimentalContentOnlyInspectorFields&&(0,Qv.getBlockType)(e)?.[qpe])}function ZMe(e){let{blockType:t,isSelectionWithinCurrentSection:o}=(0,Lf.useContext)(br);return(0,Pr.jsx)(ep,{group:"content",children:(0,Pr.jsx)(YMe,{...e,blockType:t,isMultiBlock:o})})}var Zpe={edit:ZMe,hasSupport:qMe,attributeKeys:[],supportsPatternEditing:!0};var W6=l(vt(),1),Xpe=l(A(),1),H6=l(N(),1),b0=l(K(),1);var G6=l(w(),1);function XMe(e){return(0,b0.hasBlockSupport)(e,"customClassName",!0)&&(e.attributes={...e.attributes,className:{type:"string"}}),e}function QMe({className:e,setAttributes:t}){return bo()!=="default"?null:(0,G6.jsx)(fe,{group:"advanced",children:(0,G6.jsx)(Xpe.TextControl,{__next40pxDefaultSize:!0,autoComplete:"off",label:(0,H6.__)("Additional CSS class(es)"),value:e||"",onChange:r=>{t({className:r!==""?r:void 0})},help:(0,H6.__)("Separate multiple classes with spaces.")})})}var $6={edit:QMe,addSaveProps:JMe,attributeKeys:["className"],hasSupport(e){return(0,b0.hasBlockSupport)(e,"customClassName",!0)}};function JMe(e,t,o){return(0,b0.hasBlockSupport)(t,"customClassName",!0)&&o.className&&(e.className=D(e.className,o.className)),e}function e5e(e,t,o,r){if(!(0,b0.hasBlockSupport)(e.name,"customClassName",!0)||r.length===1&&e.innerBlocks.length===t.length||r.length===1&&t.length>1||r.length>1&&t.length===1)return e;if(t[o]){let n=t[o]?.attributes.className;if(n&&e.attributes.className===void 0)return{...e,attributes:{...e.attributes,className:n}}}return e}(0,W6.addFilter)("blocks.registerBlockType","core/editor/custom-class-name/attribute",XMe);(0,W6.addFilter)("blocks.switchToBlockType.transformedBlock","core/customClassName/addTransforms",e5e);var Qpe=l(vt(),1),v0=l(K(),1);function t5e(e,t){return(0,v0.hasBlockSupport)(t,"className",!0)&&(typeof e.className=="string"?e.className=[...new Set([(0,v0.getBlockDefaultClassName)(t.name),...e.className.split(" ")])].join(" ").trim():e.className=(0,v0.getBlockDefaultClassName)(t.name)),e}(0,Qpe.addFilter)("blocks.getSaveContent.extraProps","core/generated-class-name/save-props",t5e);var Ihe=l(R(),1),Phe=l(vt(),1),tu=l(K(),1),Rhe=l(X(),1),ok=l(my(),1);var ej=l(K(),1),VO=l(R(),1),ghe=l(F(),1);var o5e=l(K(),1);var r5e=l(w(),1),Jpe="typography.lineHeight";var ehe=l(vt(),1),AO=l(K(),1),the=l(XT(),1),ohe=l(A(),1);var k0="typography.__experimentalFontFamily",{kebabCase:n5e}=M(ohe.privateApis);function i5e(e){return(0,AO.hasBlockSupport)(e,k0)&&(e.attributes.fontFamily||Object.assign(e.attributes,{fontFamily:{type:"string"}})),e}function rhe(e,t,o){if(!(0,AO.hasBlockSupport)(t,k0)||$e(t,ws,"fontFamily")||!o?.fontFamily)return e;let r=new the.default(e.className);r.add(`has-${n5e(o?.fontFamily)}-font-family`);let n=r.value;return e.className=n||void 0,e}function s5e({name:e,fontFamily:t}){return rhe({},e,{fontFamily:t})}var K6={useBlockProps:s5e,addSaveProps:rhe,attributeKeys:["fontFamily"],hasSupport(e){return(0,AO.hasBlockSupport)(e,k0)}};(0,ehe.addFilter)("blocks.registerBlockType","core/fontFamily/addAttribute",i5e);var Y6=l(vt(),1),Jv=l(K(),1),nhe=l(XT(),1);var a5e=l(w(),1),Jp="typography.fontSize";function l5e(e){return(0,Jv.hasBlockSupport)(e,Jp)&&(e.attributes.fontSize||Object.assign(e.attributes,{fontSize:{type:"string"}})),e}function ihe(e,t,o){if(!(0,Jv.hasBlockSupport)(t,Jp)||$e(t,ws,"fontSize"))return e;let r=new nhe.default(e.className);r.add(Au(o.fontSize));let n=r.value;return e.className=n||void 0,e}function c5e({name:e,fontSize:t,style:o}){let[r,n,i]=me("typography.fontSizes","typography.fluid","layout");if(!(0,Jv.hasBlockSupport)(e,Jp)||$e(e,ws,"fontSize")||!t&&!o?.typography?.fontSize)return;let s;if(o?.typography?.fontSize&&(s={style:{fontSize:hc({size:o.typography.fontSize},{typography:{fluid:n},layout:i})}}),t&&(s={style:{fontSize:Rh(r,t,o?.typography?.fontSize).size}}),!!s)return ihe(s,e,{fontSize:t})}var q6={useBlockProps:c5e,addSaveProps:ihe,attributeKeys:["fontSize","style"],hasSupport(e){return(0,Jv.hasBlockSupport)(e,Jp)}},u5e={fontSize:[["fontSize"],["style","typography","fontSize"]]};function d5e(e,t,o,r){let n=e.name,i={fontSize:(0,Jv.hasBlockSupport)(n,Jp)};return fR(i,u5e,e,t,o,r)}(0,Y6.addFilter)("blocks.registerBlockType","core/font/addAttribute",l5e);(0,Y6.addFilter)("blocks.switchToBlockType.transformedBlock","core/font-size/addTransforms",d5e);var LO=l(N(),1),ek=l(K(),1);var Z6=l(w(),1),tk="typography.textAlign",f5e=[{icon:vu,title:(0,LO.__)("Align text left"),align:"left"},{icon:Yf,title:(0,LO.__)("Align text center"),align:"center"},{icon:ku,title:(0,LO.__)("Align text right"),align:"right"}],she=["left","center","right"],m5e=[];function X6(e){return Array.isArray(e)?she.filter(t=>e.includes(t)):e===!0?she:m5e}function p5e({style:e,name:t,setAttributes:o}){let n=vs(t)?.typography?.textAlign,i=bo();if(!n||i!=="default")return null;let s=X6((0,ek.getBlockSupport)(t,tk));if(!s.length)return null;let a=f5e.filter(u=>s.includes(u.align)),c=u=>{let d={...e,typography:{...e?.typography,textAlign:u}};o({style:De(d)})};return(0,Z6.jsx)(Wt,{group:"block",children:(0,Z6.jsx)(wC,{value:e?.typography?.textAlign,onChange:c,alignmentControls:a})})}var NO={edit:p5e,useBlockProps:h5e,addSaveProps:g5e,attributeKeys:["style"],hasSupport(e){return(0,ek.hasBlockSupport)(e,tk,!1)}};function h5e({name:e,style:t}){if(!t?.typography?.textAlign||!X6((0,ek.getBlockSupport)(e,tk)).length||$e(e,ws,"textAlign"))return null;let r=t.typography.textAlign;return{className:D({[`has-text-align-${r}`]:r})}}function g5e(e,t,o){if(!o?.style?.typography?.textAlign)return e;let{textAlign:r}=o.style.typography,n=(0,ek.getBlockSupport)(t,tk);return X6(n).includes(r)&&!$e(t,ws,"textAlign")&&(e.className=D(`has-text-align-${r}`,e.className)),e}var J6=l(vt(),1),Nf=l(K(),1),eh=l(R(),1),mhe=l(F(),1),y0=l(N(),1),MO=l(A(),1),phe=l(X(),1);function b5e(e,t){let o=e.scrollHeight>e.clientHeight,r=0,n=2400,i=r,s=window.getComputedStyle(e),a=parseFloat(s.paddingLeft)||0,c=parseFloat(s.paddingRight)||0,u=document.createRange();u.selectNodeContents(e);let d=e,f=e.parentElement;if(f){let h=window.getComputedStyle(f);h?.display==="flex"&&(d=f,a+=parseFloat(h.paddingLeft)||0,c+=parseFloat(h.paddingRight)||0)}let m=d.clientHeight;for(;r<=n;){let h=Math.floor((r+n)/2);t(h);let g=u.getBoundingClientRect().width,b=e.scrollWidth<=d.clientWidth&&g<=d.clientWidth-a-c,k=o||e.scrollHeight<=d.clientHeight||e.scrollHeight<=m;d.clientHeight>m&&(m=d.clientHeight),b&&k?(i=h,r=h+1):n=h-1}return u.detach(),i}function ahe(e,t){if(!e)return;t(0);let o=b5e(e,t);return t(o),o}var lhe=l(R(),1),che=l(N(),1),uhe=l(A(),1),dhe=l(sr(),1),Q6=l(w(),1);function fhe(){let e=(0,che.__)("The text may be too small to read. Consider using a larger container or less text.");return(0,lhe.useEffect)(()=>{(0,dhe.speak)(e)},[e]),(0,Q6.jsx)("div",{className:"block-editor-fit-text-size-warning",children:(0,Q6.jsx)(uhe.Notice,{spokenMessage:null,status:"warning",isDismissible:!1,children:e})})}var Wn=l(w(),1),v5e={},k5e=12,Jc="typography.fitText";function y5e(e){return!(0,Nf.hasBlockSupport)(e,Jc)||e.attributes?.fitText?e:{...e,attributes:{...e.attributes,fitText:{type:"boolean"}}}}function _5e({fitText:e,name:t,clientId:o}){let[r,n]=(0,eh.useState)(null),i=(0,Nf.hasBlockSupport)(t,Jc),s=st(o),{blockAttributes:a,parentId:c,blockMode:u}=(0,mhe.useSelect)(f=>{if(!o||!i||!e)return v5e;let m=f(x).getBlockMode(o);return m==="html"?{blockMode:m}:{blockAttributes:f(x).getBlockAttributes(o),parentId:f(x).getBlockRootClientId(o),blockMode:m}},[o,i,e]),d=(0,eh.useCallback)(()=>{if(!s||!i||!e)return;let f=`fit-text-${o}`,m=s.ownerDocument.getElementById(f);m||(m=s.ownerDocument.createElement("style"),m.id=f,s.ownerDocument.head.appendChild(m));let h=`#block-${o}`,g=ahe(s,b=>{b===0?m.textContent="":m.textContent=`${h} { font-size: ${b}px !important; }`});n(g)},[s,o,i,e]);return(0,eh.useEffect)(()=>{if(!e||!s||!o||!i||u==="html")return;let f=s,m=f.style.visibility,h=null,p=null,g=null;h=window.requestAnimationFrame(()=>{f.style.visibility="hidden",p=window.requestAnimationFrame(()=>{d(),g=setTimeout(()=>{f.style.visibility=m},10)})});let b;return window.ResizeObserver&&f.parentElement&&(b=new window.ResizeObserver(d),b.observe(f.parentElement),b.observe(f)),()=>{h!==null&&window.cancelAnimationFrame(h),p!==null&&window.cancelAnimationFrame(p),g!==null&&clearTimeout(g),b&&b.disconnect();let k=`fit-text-${o}`,v=f.ownerDocument.getElementById(k);v&&v.remove()}},[e,o,c,d,s,i,u]),(0,eh.useEffect)(()=>{if(e&&s&&i&&u!=="html"){let f=window.requestAnimationFrame(()=>{s&&d()});return()=>window.cancelAnimationFrame(f)}},[a,e,d,s,i,u]),{fontSize:r}}function S5e({clientId:e,fitText:t=!1,setAttributes:o,name:r,fontSize:n,style:i}){return(0,Nf.hasBlockSupport)(r,Jc)?(0,Wn.jsx)(MO.__experimentalToolsPanelItem,{hasValue:()=>t,label:(0,y0.__)("Fit text"),onDeselect:()=>o({fitText:void 0}),resetAllFilter:()=>({fitText:void 0}),panelId:e,children:(0,Wn.jsx)(MO.ToggleControl,{label:(0,y0.__)("Fit text"),checked:t,onChange:()=>{let s=!t||void 0,a={fitText:s};s&&(n&&(a.fontSize=void 0),i?.typography?.fontSize&&(a.style={...i,typography:{...i?.typography,fontSize:void 0}})),o(a)},help:t?(0,y0.__)("Text will resize to fit its container."):(0,y0.__)("The text will resize to fit its container, resetting other font size settings.")})}):null}function x5e(e,t,o){if(!(0,Nf.hasBlockSupport)(t,Jc))return e;let{fitText:r}=o;if(!r)return e;let n=e.className?`${e.className} has-fit-text`:"has-fit-text";return{...e,className:n}}function w5e({name:e,fitText:t}){return t&&(0,Nf.hasBlockSupport)(e,Jc)?{className:"has-fit-text"}:{}}(0,J6.addFilter)("blocks.registerBlockType","core/fit-text/addAttribute",y5e);var C5e=e=>(0,Nf.hasBlockSupport)(e,Jc);function B5e({fitText:e,name:t,clientId:o,isSelected:r}){let{fontSize:n}=_5e({fitText:e,name:t,clientId:o});return r&&n&&n<k5e?(0,Wn.jsx)(fe,{group:"typography",children:(0,Wn.jsx)(fhe,{})}):null}var E5e=(0,phe.createHigherOrderComponent)(e=>function(o){let{name:r,attributes:n,clientId:i,isSelected:s,setAttributes:a}=o,{fitText:c}=n;return(0,Nf.hasBlockSupport)(r,Jc)?(0,Wn.jsxs)(Wn.Fragment,{children:[(0,Wn.jsx)(e,{...o}),(0,Wn.jsx)(fe,{group:"typography",children:(0,Wn.jsx)(S5e,{clientId:i,fitText:c,setAttributes:a,name:r,fontSize:n.fontSize,style:n.style})}),c&&(0,Wn.jsx)(B5e,{fitText:c,name:r,clientId:i,isSelected:s})]}):(0,Wn.jsx)(e,{...o})},"addFitTextControl");(0,J6.addFilter)("editor.BlockEdit","core/fit-text/add-fit-text-control",E5e);var DO={useBlockProps:w5e,addSaveProps:x5e,attributeKeys:["fitText","fontSize","style"],hasSupport:C5e,edit:()=>null};var tj=l(w(),1);function hhe(e,t){return Object.fromEntries(Object.entries(e).filter(([o])=>!t.includes(o)))}var T5e="typography.__experimentalLetterSpacing",I5e="typography.__experimentalTextTransform",P5e="typography.__experimentalTextDecoration",R5e="typography.textIndent",O5e="typography.textColumns",A5e="typography.__experimentalFontStyle",L5e="typography.__experimentalFontWeight",N5e="typography.__experimentalWritingMode",ws="typography",bhe=[Jpe,Jp,A5e,L5e,k0,tk,O5e,P5e,R5e,N5e,I5e,T5e,Jc];function vhe(e){let t={...hhe(e,["fontFamily"])},o=e?.typography?.fontSize,r=e?.typography?.fontFamily,n=typeof o=="string"&&o?.startsWith("var:preset|font-size|")?o.substring(21):void 0,i=r?.startsWith("var:preset|font-family|")?r.substring(23):void 0;return t.typography={...hhe(t.typography,["fontFamily"]),fontSize:n?void 0:o},{style:De(t),fontFamily:i,fontSize:n}}function khe(e){return{...e.style,typography:{...e.style?.typography,fontFamily:e.fontFamily?"var:preset|font-family|"+e.fontFamily:void 0,fontSize:e.fontSize?"var:preset|font-size|"+e.fontSize:e.style?.typography?.fontSize}}}function M5e({children:e,resetAllFilter:t}){let o=(0,VO.useCallback)(r=>{let n=khe(r),i=t(n);return{...r,...vhe(i)}},[t]);return(0,tj.jsx)(fe,{group:"typography",resetAllFilter:o,children:e})}function yhe({clientId:e,name:t,setAttributes:o,settings:r}){let n=RP(r),{style:i,fontFamily:s,fontSize:a,fitText:c}=(0,ghe.useSelect)(m=>{if(!n)return{};let{style:h,fontFamily:p,fontSize:g,fitText:b}=m(x).getBlockAttributes(e)||{};return{style:h,fontFamily:p,fontSize:g,fitText:b}},[e,n]),u=(0,VO.useMemo)(()=>khe({style:i,fontFamily:s,fontSize:a}),[i,a,s]),d=m=>{let h=vhe(m);(h.fontSize||h.style?.typography?.fontSize)&&c&&(h.fitText=void 0),o(h)};if(!n)return null;let f=(0,ej.getBlockSupport)(t,[ws,"__experimentalDefaultControls"]);return(0,tj.jsx)(OP,{as:M5e,panelId:e,settings:r,value:u,onChange:d,defaultControls:f})}var Df=l(R(),1),zO=l(F(),1),FO=l(K(),1),Che=l(Le(),1);var wl=l(R(),1),_he=l(I_(),1);var _0=l(w(),1);function She({clientId:e,value:t,computeStyle:o,forceShow:r}){let n=st(e),[i,s]=(0,wl.useReducer)(()=>o(n));(0,wl.useEffect)(()=>{n&&r&&s()},[n,r]),(0,wl.useEffect)(()=>{if(!n)return;let d=new window.MutationObserver(s);return d.observe(n,{attributes:!0,attributeFilter:["style","class"]}),()=>{d.disconnect()}},[n]);let a=(0,wl.useRef)(t),[c,u]=(0,wl.useState)(!1);return(0,wl.useEffect)(()=>{if((0,_he.isShallowEqual)(t,a.current)||r)return;u(!0),a.current=t;let d=setTimeout(()=>{u(!1)},400);return()=>{u(!1),clearTimeout(d)}},[t,r]),!c&&!r?null:(0,_0.jsx)(es,{clientId:e,__unstablePopoverSlot:"block-toolbar",children:(0,_0.jsx)("div",{className:"block-editor__spacing-visualizer",style:i})})}function Mf(e,t){return e.ownerDocument.defaultView.getComputedStyle(e).getPropertyValue(t)}function xhe({clientId:e,value:t,forceShow:o}){return(0,_0.jsx)(She,{clientId:e,value:t?.spacing?.margin,computeStyle:r=>{let n=Mf(r,"margin-top"),i=Mf(r,"margin-right"),s=Mf(r,"margin-bottom"),a=Mf(r,"margin-left");return{borderTopWidth:n,borderRightWidth:i,borderBottomWidth:s,borderLeftWidth:a,top:n?`-${n}`:0,right:i?`-${i}`:0,bottom:s?`-${s}`:0,left:a?`-${a}`:0}},forceShow:o})}function whe({clientId:e,value:t,forceShow:o}){return(0,_0.jsx)(She,{clientId:e,value:t?.spacing?.padding,computeStyle:r=>({borderTopWidth:Mf(r,"padding-top"),borderRightWidth:Mf(r,"padding-right"),borderBottomWidth:Mf(r,"padding-bottom"),borderLeftWidth:Mf(r,"padding-left")}),forceShow:o})}var eu=l(w(),1),Cl="dimensions",S0="spacing";function D5e(){let[e,t]=(0,Df.useState)(!1),{hideBlockInterface:o,showBlockInterface:r}=M((0,zO.useDispatch)(x));return(0,Df.useEffect)(()=>{e?o():r()},[e,r,o]),[e,t]}function V5e({children:e,resetAllFilter:t}){let o=(0,Df.useCallback)(r=>{let n=r.style,i=t(n);return{...r,style:i}},[t]);return(0,eu.jsx)(fe,{group:"dimensions",resetAllFilter:o,children:e})}function Bhe({clientId:e,name:t,setAttributes:o,settings:r}){let n=MP(r),i=(0,zO.useSelect)(m=>{if(n)return m(x).getBlockAttributes(e)?.style},[e,n]),[s,a]=D5e(),c=m=>{o({style:De(m)})};if(!n)return null;let u=(0,FO.getBlockSupport)(t,[Cl,"__experimentalDefaultControls"]),d=(0,FO.getBlockSupport)(t,[S0,"__experimentalDefaultControls"]),f={minHeight:!1,minWidth:!1,...u,...d};return(0,eu.jsxs)(eu.Fragment,{children:[(0,eu.jsx)(DP,{as:V5e,panelId:e,settings:r,value:i,onChange:c,defaultControls:f,onVisualize:a}),!!r?.spacing?.padding&&s==="padding"&&(0,eu.jsx)(whe,{forceShow:s==="padding",clientId:e,value:i}),!!r?.spacing?.margin&&s==="margin"&&(0,eu.jsx)(xhe,{forceShow:s==="margin",clientId:e,value:i})]})}function Ehe(e,t="any"){if(Df.Platform.OS!=="web")return!1;let o=(0,FO.getBlockSupport)(e,Cl);return o===!0?!0:t==="any"?!!(o?.aspectRatio||o?.height||o?.minHeight||o?.width||o?.minWidth):!!o?.[t]}var The={useBlockProps:F5e,attributeKeys:["height","minHeight","width","style"],hasSupport(e){return Ehe(e)}};function F5e({name:e,height:t,minHeight:o,style:r}){if(!Ehe(e,"aspectRatio")||$e(e,Cl,"aspectRatio"))return{};let n=D({"has-aspect-ratio":!!r?.dimensions?.aspectRatio}),i={};return r?.dimensions?.aspectRatio?(i.minHeight="unset",i.height="unset"):(o||r?.dimensions?.minHeight||t||r?.dimensions?.height)&&(i.aspectRatio="unset"),{className:n,style:i}}function oj(){(0,Che.default)("wp.blockEditor.__experimentalUseCustomSides",{since:"6.3",version:"6.4"})}var Bl=l(w(),1),z5e=[...bhe,zp,pr,Cl,jp,S0,JS],nj=e=>z5e.some(t=>(0,tu.hasBlockSupport)(e,t));function Bi(e={}){let t={};return(0,ok.getCSSRules)(e).forEach(o=>{t[o.key]=o.value}),t}function j5e(e){return!nj(e)&&!(0,tu.hasBlockSupport)(e,"customCSS",!0)||e.attributes.style||Object.assign(e.attributes,{style:{type:"object"}}),e}var Ohe={[`${zp}.__experimentalSkipSerialization`]:["border"],[`${pr}.__experimentalSkipSerialization`]:[pr],[`${ws}.__experimentalSkipSerialization`]:[ws],[`${Cl}.__experimentalSkipSerialization`]:[Cl],[`${S0}.__experimentalSkipSerialization`]:[S0],[`${JS}.__experimentalSkipSerialization`]:[JS]},U5e={...Ohe,[`${Cl}.aspectRatio`]:[`${Cl}.aspectRatio`],[`${jp}`]:[jp]},H5e={[`${Cl}.aspectRatio`]:!0,[`${jp}`]:!0},G5e={gradients:"gradient"};function rj(e,t,o=!1){if(!e)return e;let r=e;return o||(r=JSON.parse(JSON.stringify(e))),Array.isArray(t)||(t=[t]),t.forEach(n=>{if(Array.isArray(n)||(n=n.split(".")),n.length>1){let[i,...s]=n;rj(r[i],[s],!0)}else n.length===1&&delete r[n[0]]}),r}function Ahe(e,t,o,r=U5e){if(!nj(t))return e;let{style:n}=o;return Object.entries(r).forEach(([i,s])=>{let a=H5e[i]||(0,tu.getBlockSupport)(t,i);a===!0&&(n=rj(n,s)),Array.isArray(a)&&a.forEach(c=>{let u=G5e[c]||c;n=rj(n,[[...s,u]])})}),e.style={...Bi(n),...e.style},e}function W5e({clientId:e,name:t,setAttributes:o,__unstableParentLayout:r}){let n=vs(t,r),i=bo(),s={clientId:e,name:t,setAttributes:o,settings:{...n,typography:{...n.typography,textAlign:!1}}};return i!=="default"?null:(0,Bl.jsxs)(Bl.Fragment,{children:[(0,Bl.jsx)(dR,{...s}),(0,Bl.jsx)(Pue,{...s}),(0,Bl.jsx)(yhe,{...s}),(0,Bl.jsx)(Bue,{...s}),(0,Bl.jsx)(Bhe,{...s})]})}var jO={edit:W5e,hasSupport:nj,addSaveProps:Ahe,attributeKeys:["style"],useBlockProps:q5e},$5e=[{elementType:"button"},{elementType:"link",pseudo:[":hover"]},{elementType:"heading",elements:["h1","h2","h3","h4","h5","h6"]}],K5e={};function Y5e(e,t,o){if(!e)return;let r=[];return $5e.forEach(({elementType:n,pseudo:i,elements:s})=>{if($e(t,pr,n))return;let c=e?.[n];if(c){let u=Xg(o,tu.__EXPERIMENTAL_ELEMENTS[n]);r.push((0,ok.compileCSS)(c,{selector:u})),i&&i.forEach(d=>{c[d]&&r.push((0,ok.compileCSS)(c[d],{selector:Xg(o,`${tu.__EXPERIMENTAL_ELEMENTS[n]}${d}`)}))})}s&&s.forEach(u=>{e[u]&&r.push((0,ok.compileCSS)(e[u],{selector:Xg(o,tu.__EXPERIMENTAL_ELEMENTS[u])}))})}),r.length>0?r.join(""):void 0}function q5e({name:e,style:t}){let o=(0,Rhe.useInstanceId)(K5e,"wp-elements"),r=`.${o}`,n=t?.elements,i=(0,Ihe.useMemo)(()=>Y5e(n,e,r),[r,n,e]);return li({css:i}),Ahe({className:o},e,{style:t},Ohe)}(0,Phe.addFilter)("blocks.registerBlockType","core/style/addAttribute",j5e);var Lhe=l(vt(),1),Nhe=l(K(),1),Z5e=e=>(0,Nhe.hasBlockSupport)(e,"__experimentalSettings",!1);function X5e(e){return Z5e(e)&&(e?.attributes?.settings||(e.attributes={...e.attributes,settings:{type:"object"}})),e}(0,Lhe.addFilter)("blocks.registerBlockType","core/settings/addAttribute",X5e);var Vf=l(K(),1),Vhe=l(X(),1),Fhe=l(vt(),1),x0=l(R(),1);function Q5e(e=[]){let t={r:[],g:[],b:[],a:[]};return e.forEach(o=>{let r=Ot(o).toRgb();t.r.push(r.r/255),t.g.push(r.g/255),t.b.push(r.b/255),t.a.push(r.a)}),t}function Mhe(e){return`${e}{filter:none}`}function Dhe(e,t){return`${e}{filter:url(#${t})}`}function UO(e,t){let o=Q5e(t);return` |
| 178 |
<svg |
| 179 |
xmlns:xlink="http://www.w3.org/1999/xlink" |
| 180 |
viewBox="0 0 0 0" |
| 181 |
width="0" |
| 182 |
height="0" |
| 183 |
focusable="false" |
| 184 |
role="none" |
| 185 |
aria-hidden="true" |
| 186 |
style="visibility: hidden; position: absolute; left: -9999px; overflow: hidden;" |
| 187 |
> |
| 188 |
<defs> |
| 189 |
<filter id="${e}"> |
| 190 |
<!-- |
| 191 |
Use sRGB instead of linearRGB so transparency looks correct. |
| 192 |
Use perceptual brightness to convert to grayscale. |
| 193 |
--> |
| 194 |
<feColorMatrix color-interpolation-filters="sRGB" type="matrix" values=" .299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 "></feColorMatrix> |
| 195 |
<!-- Use sRGB instead of linearRGB to be consistent with how CSS gradients work. --> |
| 196 |
<feComponentTransfer color-interpolation-filters="sRGB"> |
| 197 |
<feFuncR type="table" tableValues="${o.r.join(" ")}"></feFuncR> |
| 198 |
<feFuncG type="table" tableValues="${o.g.join(" ")}"></feFuncG> |
| 199 |
<feFuncB type="table" tableValues="${o.b.join(" ")}"></feFuncB> |
| 200 |
<feFuncA type="table" tableValues="${o.a.join(" ")}"></feFuncA> |
| 201 |
</feComponentTransfer> |
| 202 |
<!-- Re-mask the image with the original transparency since the feColorMatrix above loses that information. --> |
| 203 |
<feComposite in2="SourceGraphic" operator="in"></feComposite> |
| 204 |
</filter> |
| 205 |
</defs> |
| 206 |
</svg>`}var ou=l(w(),1),ij=[],J5e=window?.navigator.userAgent&&window.navigator.userAgent.includes("Safari")&&!window.navigator.userAgent.includes("Chrome")&&!window.navigator.userAgent.includes("Chromium");du([fu]);function sj({presetSetting:e,defaultSetting:t}){let[o,r,n,i]=me(t,`${e}.custom`,`${e}.theme`,`${e}.default`);return(0,x0.useMemo)(()=>[...r||ij,...n||ij,...o&&i||ij],[o,r,n,i])}function zhe(e,t){if(!e)return;let o=t?.find(({slug:r})=>e===`var:preset|duotone|${r}`);return o?o.colors:void 0}function eDe(e,t){if(!e||!Array.isArray(e))return;let o=t?.find(r=>r?.colors?.every((n,i)=>n===e[i]));return o?`var:preset|duotone|${o.slug}`:void 0}function tDe({style:e,setAttributes:t,name:o}){let r=e?.color?.duotone,n=vs(o),i=bo(),s=sj({presetSetting:"color.duotone",defaultSetting:"color.defaultDuotone"}),a=sj({presetSetting:"color.palette",defaultSetting:"color.defaultPalette"}),[c,u]=me("color.custom","color.customDuotone"),d=!c,f=!u||a?.length===0&&d;if(s?.length===0&&f||i!=="default")return null;let m=r==="unset"||Array.isArray(r)?r:zhe(r,s);return(0,ou.jsxs)(ou.Fragment,{children:[(0,ou.jsx)(fe,{group:"filter",children:(0,ou.jsx)(KP,{value:{filter:{duotone:m}},onChange:h=>{let p={...e,color:{...h?.filter}};t({style:De(p)})},settings:n})}),(0,ou.jsx)(Wt,{group:"block",__experimentalShareWithChildBlocks:!0,children:(0,ou.jsx)(t2,{duotonePalette:s,colorPalette:a,disableCustomDuotone:f,disableCustomColors:d,value:m,onChange:h=>{let p=eDe(h,s),g={...e,color:{...e?.color,duotone:p??h}};t({style:De(g)})},settings:n})})]})}var aj={shareWithChildBlocks:!0,edit:tDe,useBlockProps:iDe,attributeKeys:["style"],hasSupport(e){return(0,Vf.hasBlockSupport)(e,"filter.duotone")}};function oDe(e){return(0,Vf.hasBlockSupport)(e,"filter.duotone")&&(e.attributes.style||Object.assign(e.attributes,{style:{type:"object"}})),e}function rDe({clientId:e,id:t,selector:o,attribute:r}){let n=sj({presetSetting:"color.duotone",defaultSetting:"color.defaultDuotone"}),i=Array.isArray(r),s=i?void 0:zhe(r,n),a=typeof r=="string"&&s,c=typeof r=="string"&&!a,u=null;a?u=s:(c||i)&&(u=r);let m=o.split(",").map(g=>`.${t}${g.trim()}`).join(", "),h=Array.isArray(u)||u==="unset";gc(h?{css:u!=="unset"?Dhe(m,t):Mhe(m),__unstableType:"presets"}:void 0),gc(h?{assets:u!=="unset"?UO(t,u):"",__unstableType:"svgs"}:void 0);let p=st(e);(0,x0.useEffect)(()=>{if(h&&p&&J5e){let g=p.style.display;p.style.setProperty("display","inline-block"),p.offsetHeight,p.style.setProperty("display",g)}},[h,p,u])}var nDe={};function iDe({clientId:e,name:t,style:o}){let r=(0,Vhe.useInstanceId)(nDe),n=(0,x0.useMemo)(()=>{let c=(0,Vf.getBlockType)(t);if(c){if(!(0,Vf.getBlockSupport)(c,"filter.duotone",!1))return null;let d=(0,Vf.getBlockSupport)(c,"color.__experimentalDuotone",!1);if(d){let f=di(c);return typeof d=="string"?Xg(f,d):f}return di(c,"filter.duotone",{fallback:!0})}},[t]),i=o?.color?.duotone,s=`wp-duotone-${r}`,a=n&&i;return rDe({clientId:e,id:s,selector:n,attribute:i}),{className:a?s:""}}(0,Fhe.addFilter)("blocks.registerBlockType","core/editor/duotone/add-attributes",oDe);var GO=l(R(),1),w0=l(F(),1),jhe=l(X(),1),C0=l(K(),1),B0=l(N(),1);var Uhe=l(Xn(),1);var HO=l(w(),1),sDe={},aDe={};function lDe({blockName:e,setAttributes:t,style:o}){if(bo()!=="default")return null;let n=(0,C0.getBlockType)(e);function i(a){let c=a?.css?.trim()?a.css:void 0;t({style:De({...a,css:c})})}let s=(0,B0.sprintf)((0,B0.__)("Add your own CSS to customize the appearance of the %s block. You do not need to include a CSS selector, just add the property and value, e.g. color: red;."),n?.title);return(0,HO.jsx)(fe,{group:"advanced",children:(0,HO.jsx)(ZP,{value:o,onChange:i,inheritedValue:o,help:s})})}var cDe="custom-css-edit-warning";function uDe({clientId:e,name:t,setAttributes:o}){let{style:r,canEditCSS:n}=(0,w0.useSelect)(i=>{let{getBlockAttributes:s,getSettings:a}=i(x);return{style:s(e)?.style||aDe,canEditCSS:a().canEditCSS}},[e]);return n?(0,HO.jsx)(lDe,{blockName:t,setAttributes:o,style:r}):null}function dDe({style:e}){let t=e?.css,o=typeof t=="string"&&t.trim().length>0&&qP(t),r=(0,w0.useSelect)(u=>u(x).getSettings().canEditCSS,[]),{createWarningNotice:n}=(0,w0.useDispatch)(Uhe.store),i=!!t?.trim();(0,GO.useEffect)(()=>{!r&&i&&n((0,B0.__)("This post contains blocks with custom CSS. You do not have permission to edit CSS. If you save this post, the custom CSS will be removed."),{id:cDe,isDismissible:!0})},[r,i,n]);let s=(0,jhe.useInstanceId)(sDe,"wp-custom-css"),a=`.${s}`,c=(0,GO.useMemo)(()=>{if(o)return sI(t,a)},[t,a,o]);return li({css:c}),o?{className:`has-custom-css ${s}`}:{}}function fDe(e,t,o){if(!(0,C0.hasBlockSupport)(t,"customCSS",!0)||!o?.style?.css?.trim())return e;let r=e.className?`${e.className} has-custom-css`:"has-custom-css";return{...e,className:r}}var WO={edit:uDe,useBlockProps:dDe,addSaveProps:fDe,attributeKeys:["style"],hasSupport(e){return(0,C0.hasBlockSupport)(e,"customCSS",!0)}};var $O=l(X(),1),cj=l(vt(),1),ru=l(K(),1),KO=l(F(),1),El=l(A(),1),rk=l(N(),1);var rr=l(w(),1),mDe="is-style-",uj="layout",{kebabCase:lj}=M(El.privateApis);function dj(e){return(0,ru.hasBlockSupport)(e,"layout")||(0,ru.hasBlockSupport)(e,"__experimentalLayout")}function YO(e={},t=""){let{layout:o}=e,{default:r}=(0,ru.getBlockSupport)(t,uj)||{},n=o?.inherit||o?.contentSize||o?.wideSize?{...o,type:"constrained"}:o||r||{},i=[];if(Qn[n?.type||"default"]?.className){let a=Qn[n?.type||"default"]?.className,c=t.split("/"),d=`wp-block-${c[0]==="core"?c.pop():c.join("-")}-${a}`;i.push(a,d)}return(0,KO.useSelect)(a=>!n?.inherit&&!n?.contentSize&&n?.type!=="constrained"?!1:a(x).getSettings().__experimentalFeatures?.useRootPaddingAwareAlignments,[n?.contentSize,n?.inherit,n?.type])&&i.push("has-global-padding"),n?.orientation&&i.push(`is-${lj(n.orientation)}`),n?.justifyContent&&i.push(`is-content-justification-${lj(n.justifyContent)}`),n?.flexWrap&&n.flexWrap==="nowrap"&&i.push("is-nowrap"),i}function fj(e={},t,o){let{layout:r={},style:n={}}=e,i=r?.inherit||r?.contentSize||r?.wideSize?{...r,type:"constrained"}:r||{},s=Ms(i?.type||"default"),[a]=me("spacing.blockGap"),c=a!==null;return s?.getLayoutStyle?.({blockName:t,selector:o,layout:r,style:n,hasBlockGapSupport:c})}function pDe({layout:e,setAttributes:t,name:o,clientId:r}){let n=vs(o),{layout:i}=n,{themeSupportsLayout:s}=(0,KO.useSelect)(P=>{let{getSettings:O}=P(x);return{themeSupportsLayout:O().supportsLayout}},[]);if(bo()!=="default")return null;let c=(0,ru.getBlockSupport)(o,uj,{}),u={...i,...c},{allowSwitching:d,allowEditing:f=!0,allowInheriting:m=!0,default:h}=u;if(!f)return null;let p={...c,...e},{type:g,default:{type:b="default"}={}}=p,k=g||b,v=!!(m&&(!k||k==="default"||k==="constrained"||p.inherit)),y=e||h||{},{inherit:_=!1,contentSize:S=null}=y;if((k==="default"||k==="constrained")&&!s)return null;let C=Ms(k),B=Ms("constrained"),T=!y.type&&(S||_),I=!!_||!!S,E=P=>t({layout:{type:P}}),L=P=>t({layout:P});return(0,rr.jsxs)(rr.Fragment,{children:[(0,rr.jsx)(fe,{children:(0,rr.jsxs)(El.PanelBody,{title:(0,rk.__)("Layout"),children:[v&&(0,rr.jsx)(rr.Fragment,{children:(0,rr.jsx)(El.ToggleControl,{label:(0,rk.__)("Inner blocks use content width"),checked:C?.name==="constrained"||I,onChange:()=>t({layout:{type:C?.name==="constrained"||I?"default":"constrained"}}),help:C?.name==="constrained"||I?(0,rk.__)("Nested blocks use content width with options for full and wide widths."):(0,rk.__)("Nested blocks will fill the width of this container.")})}),!_&&d&&(0,rr.jsx)(hDe,{type:k,onChange:E}),C&&C.name!=="default"&&(0,rr.jsx)(C.inspectorControls,{layout:y,onChange:L,layoutBlockSupport:u,name:o,clientId:r}),B&&T&&(0,rr.jsx)(B.inspectorControls,{layout:y,onChange:L,layoutBlockSupport:u,name:o,clientId:r})]})}),!_&&C&&(0,rr.jsx)(C.toolBarControls,{layout:y,onChange:L,layoutBlockSupport:c,name:o,clientId:r})]})}var Hhe={shareWithChildBlocks:!0,edit:pDe,attributeKeys:["layout"],hasSupport(e){return dj(e)}};function hDe({type:e,onChange:t}){return(0,rr.jsx)(El.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,isBlock:!0,label:(0,rk.__)("Layout type"),hideLabelFromVision:!0,isAdaptiveWidth:!0,value:e,onChange:t,children:D7().map(({name:o,label:r})=>(0,rr.jsx)(El.__experimentalToggleGroupControlOption,{value:o,label:r},o))})}function gDe(e){return"type"in(e.attributes?.layout??{})||dj(e)&&(e.attributes={...e.attributes,layout:{type:"object"}}),e}function bDe({block:e,props:t,blockGapSupport:o,globalBlockGapValue:r,layoutClasses:n}){let{name:i,attributes:s}=t,a=(0,$O.useInstanceId)(e),{layout:c}=s,{default:u}=(0,ru.getBlockSupport)(i,uj)||{},d=c?.inherit||c?.contentSize||c?.wideSize?{...c,type:"constrained"}:c||u||{},f=`wp-container-${lj(i)}-is-layout-`,m=`.${f}${a}`,h=o!==null,g=Ms(d?.type||"default")?.getLayoutStyle?.({blockName:i,selector:m,layout:d,style:s?.style,hasBlockGapSupport:h,globalBlockGapValue:r}),b=D({[`${f}${a}`]:!!g},n);return li({css:g}),(0,rr.jsx)(e,{...t,__unstableLayoutClassNames:b})}var vDe=(0,$O.createHigherOrderComponent)(e=>function(o){let{clientId:r,name:n,attributes:i}=o,s=dj(n),a=YO(i,n),c=(0,KO.useSelect)(u=>{if(!s)return;let{getSettings:d,getBlockSettings:f}=M(u(x)),m=d(),{disableLayoutStyles:h}=m;if(h)return;let[p]=f(r,"spacing.blockGap"),g=m[Oi],b,k=i?.className;if(k?.includes(mDe)){let{getBlockStyles:y}=u(ru.store),_=y(n),S=E4(k,_);b=S?g?.blocks?.[n]?.variations?.[S]?.spacing?.blockGap:void 0}let v=b??g?.blocks?.[n]?.spacing?.blockGap??g?.spacing?.blockGap;return{blockGapSupport:p,globalBlockGapValue:v}},[s,r,i?.className,n]);return c?(0,rr.jsx)(bDe,{block:e,props:o,layoutClasses:a,...c}):(0,rr.jsx)(e,{...o,__unstableLayoutClassNames:s?a:void 0})},"withLayoutStyles");(0,cj.addFilter)("blocks.registerBlockType","core/layout/addAttribute",gDe);(0,cj.addFilter)("editor.BlockListBlock","core/editor/layout/with-layout-styles",vDe);var Xhe=l(X(),1),bj=l(F(),1),Qhe=l(R(),1);var Cs=l(R(),1),Ff=l(F(),1),Whe=l(X(),1);function T0(e,t){return Array.from({length:t},(o,r)=>e+r)}var ka=class{constructor({columnStart:e,rowStart:t,columnEnd:o,rowEnd:r,columnSpan:n,rowSpan:i}={}){this.columnStart=e??1,this.rowStart=t??1,n!==void 0?this.columnEnd=this.columnStart+n-1:this.columnEnd=o??this.columnStart,i!==void 0?this.rowEnd=this.rowStart+i-1:this.rowEnd=r??this.rowStart}get columnSpan(){return this.columnEnd-this.columnStart+1}get rowSpan(){return this.rowEnd-this.rowStart+1}contains(e,t){return e>=this.columnStart&&e<=this.columnEnd&&t>=this.rowStart&&t<=this.rowEnd}containsRect(e){return this.contains(e.columnStart,e.rowStart)&&this.contains(e.columnEnd,e.rowEnd)}intersectsRect(e){return this.columnStart<=e.columnEnd&&this.columnEnd>=e.columnStart&&this.rowStart<=e.rowEnd&&this.rowEnd>=e.rowStart}};function Do(e,t){return e.ownerDocument.defaultView.getComputedStyle(e).getPropertyValue(t)}function E0(e,t){let o=[];for(let r of e.split(" ")){let n=o[o.length-1],i=n?n.end+t:0,s=i+parseFloat(r);o.push({start:i,end:s})}return o}function nu(e,t,o="start"){return e.reduce((r,n,i)=>Math.abs(n[o]-t)<Math.abs(e[r][o]-t)?i:r,0)}function kDe(e,t){let o=parseFloat(Do(e,"column-gap")),r=parseFloat(Do(e,"row-gap")),n=E0(Do(e,"grid-template-columns"),o),i=E0(Do(e,"grid-template-rows"),r),s=nu(n,t.left)+1,a=nu(i,t.top)+1,c=nu(n,t.right,"end")+1,u=nu(i,t.bottom,"end")+1;return new ka({columnStart:s,columnEnd:c,rowStart:a,rowEnd:u})}function Ghe(e){return kDe(e.parentElement,new window.DOMRect(e.offsetLeft,e.offsetTop,e.offsetWidth,e.offsetHeight))}function mj(e){let t=Do(e,"grid-template-columns"),o=Do(e,"grid-template-rows"),r=Do(e,"border-top-width"),n=Do(e,"border-right-width"),i=Do(e,"border-bottom-width"),s=Do(e,"border-left-width"),a=Do(e,"padding-top"),c=Do(e,"padding-right"),u=Do(e,"padding-bottom"),d=Do(e,"padding-left"),f=t.split(" ").length,m=o.split(" ").length,h=f*m;return{numColumns:f,numRows:m,numItems:h,currentColor:Do(e,"color"),style:{gridTemplateColumns:t,gridTemplateRows:o,gap:Do(e,"gap"),inset:` |
| 207 |
calc(${a} + ${r}) |
| 208 |
calc(${c} + ${n}) |
| 209 |
calc(${u} + ${i}) |
| 210 |
calc(${d} + ${s}) |
| 211 |
`}}}var Ei=l(w(),1);function I0({clientId:e,contentRef:t,parentLayout:o,childGridClientId:r}){let n=(0,Ff.useSelect)(a=>a(x).getSettings().isDistractionFree,[]),i=st(e);if(n||!i)return null;let s=o?.isManualPlacement&&window.__experimentalEnableGridInteractivity;return(0,Ei.jsx)(yDe,{gridClientId:e,gridElement:i,isManualGrid:s,ref:t,childGridClientId:r})}var yDe=(0,Cs.forwardRef)(({gridClientId:e,gridElement:t,isManualGrid:o,childGridClientId:r},n)=>{let[i,s]=(0,Cs.useState)(()=>mj(t)),[a,c]=(0,Cs.useState)(!1),u=st(r),d=(0,Cs.useMemo)(()=>u?Ghe(u):null,[u]);return(0,Cs.useEffect)(()=>{let f=()=>s(mj(t)),m=new window.ResizeObserver(f);m.observe(t,{box:"border-box"});let h=new window.ResizeObserver(f);h.observe(t);for(let p of t.children)h.observe(p);return()=>{m.disconnect(),h.disconnect()}},[t]),(0,Cs.useEffect)(()=>{function f(){c(!0)}function m(){c(!1)}return document.addEventListener("drag",f),document.addEventListener("dragend",m),()=>{document.removeEventListener("drag",f),document.removeEventListener("dragend",m)}},[]),(0,Ei.jsx)(es,{className:D("block-editor-grid-visualizer",{"is-dropping-allowed":a}),clientId:e,__unstablePopoverSlot:"__unstable-block-tools-after",children:(0,Ei.jsx)("div",{ref:n,className:"block-editor-grid-visualizer__grid",style:i.style,children:o?(0,Ei.jsx)(SDe,{gridClientId:e,gridInfo:i,childGridRect:d}):(0,Ei.jsx)(_De,{gridInfo:i,childGridRect:d})})})});function _De({gridInfo:e,childGridRect:t}){return T0(1,e.numRows).map(o=>T0(1,e.numColumns).map(r=>{let n=e.currentColor;return t?.contains(r,o)&&(n="transparent"),(0,Ei.jsx)($he,{color:n},`${o}-${r}`)}))}function SDe({gridClientId:e,gridInfo:t,childGridRect:o}){let[r,n]=(0,Cs.useState)(null),i=(0,Ff.useSelect)(a=>{let{getBlockOrder:c,getBlockStyles:u}=M(a(x)),d=c(e);return u(d)},[e]),s=(0,Cs.useMemo)(()=>{let a=[];for(let c of Object.values(i)){let{columnStart:u,rowStart:d,columnSpan:f=1,rowSpan:m=1}=c?.layout??{};!u||!d||a.push(new ka({columnStart:u,rowStart:d,columnSpan:f,rowSpan:m}))}return a},[i]);return T0(1,t.numRows).map(a=>T0(1,t.numColumns).map(c=>{let u=o?.contains(c,a),d=t.currentColor;u&&(d="transparent");let f=s.some(h=>h.contains(c,a)),m=r?.contains(c,a)??!1;return(0,Ei.jsx)($he,{color:d,className:m&&"is-highlighted",children:f&&!u?(0,Ei.jsx)(xDe,{column:c,row:a,gridClientId:e,gridInfo:t,setHighlightedRect:n}):(0,Ei.jsx)(wDe,{column:c,row:a,gridClientId:e,gridInfo:t,setHighlightedRect:n})},`${a}-${c}`)}))}function $he({color:e,children:t,className:o}){return(0,Ei.jsx)("div",{className:D("block-editor-grid-visualizer__cell",o),style:{boxShadow:`inset 0 0 0 1px color-mix(in srgb, ${e} 20%, #0000)`,color:e},children:t})}function Khe(e,t,o,r,n){let{getBlockAttributes:i,getBlockRootClientId:s,canInsertBlockType:a,getBlockName:c}=(0,Ff.useSelect)(x),{updateBlockAttributes:u,moveBlocksToPosition:d,__unstableMarkNextChangeAsNotPersistent:f}=(0,Ff.useDispatch)(x),m=Mp(o,r.numColumns);return CDe({validateDrag(h){let p=c(h);if(!a(p,o))return!1;let g=i(h),b=new ka({columnStart:e,rowStart:t,columnSpan:g.style?.layout?.columnSpan,rowSpan:g.style?.layout?.rowSpan});return new ka({columnSpan:r.numColumns,rowSpan:r.numRows}).containsRect(b)},onDragEnter(h){let p=i(h);n(new ka({columnStart:e,rowStart:t,columnSpan:p.style?.layout?.columnSpan,rowSpan:p.style?.layout?.rowSpan}))},onDragLeave(){n(h=>h?.columnStart===e&&h?.rowStart===t?null:h)},onDrop(h){n(null);let p=i(h);u(h,{style:{...p.style,layout:{...p.style?.layout,columnStart:e,rowStart:t}}}),f(),d([h],s(h),o,m(e,t))}})}function xDe({column:e,row:t,gridClientId:o,gridInfo:r,setHighlightedRect:n}){return(0,Ei.jsx)("div",{className:"block-editor-grid-visualizer__drop-zone",ref:Khe(e,t,o,r,n)})}function wDe({column:e,row:t,gridClientId:o,gridInfo:r,setHighlightedRect:n}){let{updateBlockAttributes:i,moveBlocksToPosition:s,__unstableMarkNextChangeAsNotPersistent:a}=(0,Ff.useDispatch)(x),c=Mp(o,r.numColumns);return(0,Ei.jsx)(kd,{rootClientId:o,className:"block-editor-grid-visualizer__appender",ref:Khe(e,t,o,r,n),style:{color:r.currentColor},onSelect:u=>{u&&(i(u.clientId,{style:{layout:{columnStart:e,rowStart:t}}}),a(),s([u.clientId],o,o,c(e,t)))}})}function CDe({validateDrag:e,onDragEnter:t,onDragLeave:o,onDrop:r}){let{getDraggedBlockClientIds:n}=(0,Ff.useSelect)(x);return(0,Whe.__experimentalUseDropZone)({onDragEnter(){let[i]=n();i&&e(i)&&t(i)},onDragLeave(){o()},onDrop(){let[i]=n();i&&e(i)&&r(i)}})}var Yhe=l(A(),1),P0=l(R(),1);var qO=l(w(),1);function pj({clientId:e,bounds:t,onChange:o,parentLayout:r}){let n=st(e),i=n?.parentElement,{isManualPlacement:s}=r;return!n||!i?null:(0,qO.jsx)(BDe,{clientId:e,bounds:t,blockElement:n,rootBlockElement:i,onChange:o,isManualGrid:s&&window.__experimentalEnableGridInteractivity})}function BDe({clientId:e,bounds:t,blockElement:o,rootBlockElement:r,onChange:n,isManualGrid:i}){let[s,a]=(0,P0.useState)(null),[c,u]=(0,P0.useState)({top:!1,bottom:!1,left:!1,right:!1});(0,P0.useEffect)(()=>{let h=new window.ResizeObserver(()=>{let p=o.getBoundingClientRect(),g=r.getBoundingClientRect(),b=p.top>g.top,k=p.bottom<g.bottom,v=p.left>g.left,y=p.right<g.right;u({top:(i||!k)&&b,bottom:k,left:(i||!y)&&v,right:y})});return h.observe(o),()=>h.disconnect()},[o,r,i]);let d={right:"left",left:"right"},f={top:"flex-end",bottom:"flex-start"},m={display:"flex",justifyContent:"center",alignItems:"center",...d[s]&&{justifyContent:d[s]},...f[s]&&{alignItems:f[s]}};return(0,qO.jsx)(es,{className:"block-editor-grid-item-resizer",clientId:e,__unstablePopoverSlot:"__unstable-block-tools-after",additionalStyles:m,children:(0,qO.jsx)(Yhe.ResizableBox,{className:"block-editor-grid-item-resizer__box",size:{width:"100%",height:"100%"},enable:{bottom:c.bottom,bottomLeft:!1,bottomRight:!1,left:c.left,right:c.right,top:c.top,topLeft:!1,topRight:!1},bounds:t,boundsByDirection:!0,onPointerDown:({target:h,pointerId:p})=>{h.setPointerCapture(p)},onResizeStart:(h,p)=>{a(p)},onResizeStop:(h,p,g)=>{let b=parseFloat(Do(r,"column-gap")),k=parseFloat(Do(r,"row-gap")),v=E0(Do(r,"grid-template-columns"),b),y=E0(Do(r,"grid-template-rows"),k),_=new window.DOMRect(o.offsetLeft+g.offsetLeft,o.offsetTop+g.offsetTop,g.offsetWidth,g.offsetHeight),S=nu(v,_.left)+1,C=nu(y,_.top)+1,B=nu(v,_.right,"end")+1,T=nu(y,_.bottom,"end")+1;n({columnSpan:B-S+1,rowSpan:T-C+1,columnStart:i?S:void 0,rowStart:i?C:void 0})}})})}var Bs=l(N(),1),ZO=l(A(),1);var qhe=l(F(),1),Zhe=l(X(),1);var $r=l(w(),1);function hj({layout:e,parentLayout:t,onChange:o,gridClientId:r,blockClientId:n}){let{moveBlocksToPosition:i,__unstableMarkNextChangeAsNotPersistent:s}=(0,qhe.useDispatch)(x),a=e?.columnStart??1,c=e?.rowStart??1,u=e?.columnSpan??1,d=e?.rowSpan??1,f=a+u-1,m=c+d-1,h=t?.columnCount,p=t?.rowCount,g=Mp(r,h);return(0,$r.jsx)(Wt,{group:"parent",children:(0,$r.jsxs)(ZO.ToolbarGroup,{className:"block-editor-grid-item-mover__move-button-container",children:[(0,$r.jsx)("div",{className:"block-editor-grid-item-mover__move-horizontal-button-container is-left",children:(0,$r.jsx)(R0,{icon:(0,Bs.isRTL)()?Ko:Yr,label:(0,Bs.__)("Move left"),description:(0,Bs.__)("Move left"),isDisabled:a<=1,onClick:()=>{o({columnStart:a-1}),s(),i([n],r,r,g(a-1,c))}})}),(0,$r.jsxs)("div",{className:"block-editor-grid-item-mover__move-vertical-button-container",children:[(0,$r.jsx)(R0,{className:"is-up-button",icon:Zf,label:(0,Bs.__)("Move up"),description:(0,Bs.__)("Move up"),isDisabled:c<=1,onClick:()=>{o({rowStart:c-1}),s(),i([n],r,r,g(a,c-1))}}),(0,$r.jsx)(R0,{className:"is-down-button",icon:vr,label:(0,Bs.__)("Move down"),description:(0,Bs.__)("Move down"),isDisabled:p&&m>=p,onClick:()=>{o({rowStart:c+1}),s(),i([n],r,r,g(a,c+1))}})]}),(0,$r.jsx)("div",{className:"block-editor-grid-item-mover__move-horizontal-button-container is-right",children:(0,$r.jsx)(R0,{icon:(0,Bs.isRTL)()?Yr:Ko,label:(0,Bs.__)("Move right"),description:(0,Bs.__)("Move right"),isDisabled:h&&f>=h,onClick:()=>{o({columnStart:a+1}),s(),i([n],r,r,g(a+1,c))}})})]})})}function R0({className:e,icon:t,label:o,isDisabled:r,onClick:n,description:i}){let a=`block-editor-grid-item-mover-button__description-${(0,Zhe.useInstanceId)(R0)}`;return(0,$r.jsxs)($r.Fragment,{children:[(0,$r.jsx)(ZO.ToolbarButton,{className:D("block-editor-grid-item-mover-button",e),icon:t,label:o,"aria-describedby":a,onClick:r?null:n,disabled:r,accessibleWhenDisabled:!0}),(0,$r.jsx)(We,{id:a,children:i})]})}var O0=l(F(),1),QO=l(R(),1),XO=l(X(),1);function gj({clientId:e}){let{gridLayout:t,blockOrder:o,selectedBlockLayout:r}=(0,O0.useSelect)(m=>{let{getBlockAttributes:h,getBlockOrder:p}=m(x),g=m(x).getSelectedBlock();return{gridLayout:h(e).layout??{},blockOrder:p(e),selectedBlockLayout:g?.attributes.style?.layout}},[e]),{getBlockAttributes:n,getBlockRootClientId:i}=(0,O0.useSelect)(x),{updateBlockAttributes:s,__unstableMarkNextChangeAsNotPersistent:a}=(0,O0.useDispatch)(x),c=(0,QO.useMemo)(()=>r?new ka(r):null,[r]),u=(0,XO.usePrevious)(c),d=(0,XO.usePrevious)(t.isManualPlacement),f=(0,XO.usePrevious)(o);(0,QO.useEffect)(()=>{let m={};if(t.isManualPlacement){let h=[];for(let g of o){let{columnStart:b,rowStart:k,columnSpan:v=1,rowSpan:y=1}=n(g).style?.layout??{};!b||!k||h.push(new ka({columnStart:b,rowStart:k,columnSpan:v,rowSpan:y}))}for(let g of o){let b=n(g),{columnStart:k,rowStart:v,columnSpan:y=1,rowSpan:_=1}=b.style?.layout??{};if(k&&v)continue;let[S,C]=EDe(h,t.columnCount,y,_,u?.columnEnd,u?.rowEnd);h.push(new ka({columnStart:S,rowStart:C,columnSpan:y,rowSpan:_})),m[g]={style:{...b.style,layout:{...b.style?.layout,columnStart:S,rowStart:C}}}}let p=Math.max(...h.map(g=>g.rowEnd));(!t.rowCount||t.rowCount<p)&&(m[e]={layout:{...t,rowCount:p}});for(let g of f??[])if(!o.includes(g)){let b=i(g);if(b===null||n(b)?.layout?.type==="grid")continue;let v=n(g),{columnStart:y,rowStart:_,columnSpan:S,rowSpan:C,...B}=v.style?.layout??{};if(y||_||S||C){let T=Object.keys(B).length===0;m[g]=de(v,["style","layout"],T?void 0:B)}}}else{if(d===!0)for(let h of o){let p=n(h),{columnStart:g,rowStart:b,...k}=p.style?.layout??{};if(g||b){let v=Object.keys(k).length===0;m[h]=de(p,["style","layout"],v?void 0:k)}}t.rowCount&&(m[e]={layout:{...t,rowCount:void 0}})}Object.keys(m).length&&(a(),s(Object.keys(m),m,!0))},[e,t,f,o,u,d,a,n,i,s])}function EDe(e,t,o,r,n=1,i=1){for(let s=i;;s++)for(let a=s===i?n:1;a<=t;a++){let c=new ka({columnStart:a,rowStart:s,columnSpan:o,rowSpan:r});if(!e.some(u=>u.intersectsRect(c)))return[a,s]}}var iu=l(w(),1),TDe={};function IDe({style:e}){let t=(0,bj.useSelect)(g=>!g(x).getSettings().disableLayoutStyles),o=e?.layout??{},{selfStretch:r,flexSize:n,columnStart:i,rowStart:s,columnSpan:a,rowSpan:c}=o,u=hm()||{},{columnCount:d,minimumColumnWidth:f}=u,m=(0,Xhe.useInstanceId)(TDe),h=`.wp-container-content-${m}`,p="";if(t&&(r==="fixed"&&n?p=`${h} { |
| 212 |
flex-basis: ${n}; |
| 213 |
box-sizing: border-box; |
| 214 |
}`:r==="fill"?p=`${h} { |
| 215 |
flex-grow: 1; |
| 216 |
}`:i&&a?p=`${h} { |
| 217 |
grid-column: ${i} / span ${a}; |
| 218 |
}`:i?p=`${h} { |
| 219 |
grid-column: ${i}; |
| 220 |
}`:a&&(p=`${h} { |
| 221 |
grid-column: span ${a}; |
| 222 |
}`),s&&c?p+=`${h} { |
| 223 |
grid-row: ${s} / span ${c}; |
| 224 |
}`:s?p+=`${h} { |
| 225 |
grid-row: ${s}; |
| 226 |
}`:c&&(p+=`${h} { |
| 227 |
grid-row: span ${c}; |
| 228 |
}`),(a||i)&&(f||!d))){let g=parseFloat(f);isNaN(g)&&(g=12);let b=f?.replace(g,"");["px","rem","em"].includes(b)||(b="rem");let k=2;a&&i?k=a+i-1:a?k=a:k=i;let v=b==="px"?24:1.5,y=k*g+(k-1)*v,_=g*2+v-1,S=a&&a>1?"1/-1":"auto";p+=`@container (max-width: ${Math.max(y,_)}${b}) { |
| 229 |
${h} { |
| 230 |
grid-column: ${S}; |
| 231 |
grid-row: auto; |
| 232 |
} |
| 233 |
}`}if(li({css:p}),!!p)return{className:`wp-container-content-${m}`}}function PDe({clientId:e,style:t,setAttributes:o}){let r=hm()||{},{type:n="default",allowSizingOnChildren:i=!1,isManualPlacement:s}=r;return n!=="grid"?null:(0,iu.jsx)(RDe,{clientId:e,style:t,setAttributes:o,allowSizingOnChildren:i,isManualPlacement:s,parentLayout:r})}function RDe({clientId:e,style:t,setAttributes:o,allowSizingOnChildren:r,isManualPlacement:n,parentLayout:i}){let{rootClientId:s,isVisible:a,parentBlockVisibility:c,blockBlockVisibility:u,deviceType:d,isChildBlockAGrid:f}=(0,bj.useSelect)(y=>{let{getBlockRootClientId:_,getBlockEditingMode:S,getTemplateLock:C,getBlockAttributes:B,getSettings:T}=y(x),I=_(e);if(C(I)||S(I)!=="default")return{rootClientId:I,isVisible:!1};let E=B(I),L=B(e),P=T();return{rootClientId:I,isVisible:!0,parentBlockVisibility:E?.metadata?.blockVisibility,blockBlockVisibility:L?.metadata?.blockVisibility,deviceType:P?.[Ai]?.toLowerCase()||At.desktop.key,isChildBlockAGrid:L?.layout?.type==="grid"}},[e]),{isBlockCurrentlyHidden:m}=$i({blockVisibility:c,deviceType:d}),{isBlockCurrentlyHidden:h}=$i({blockVisibility:u,deviceType:d}),[p,g]=(0,Qhe.useState)(),b=f?e:void 0;if(!a||m)return null;let k=r&&!h;function v(y){o({style:{...t,layout:{...t?.layout,...y}}})}return(0,iu.jsxs)(iu.Fragment,{children:[(0,iu.jsx)(I0,{clientId:s,contentRef:g,parentLayout:i,childGridClientId:b}),k&&(0,iu.jsx)(pj,{clientId:e,bounds:p,onChange:v,parentLayout:i}),n&&window.__experimentalEnableGridInteractivity&&(0,iu.jsx)(hj,{layout:t?.layout,parentLayout:i,onChange:v,gridClientId:s,blockClientId:e})]})}var vj={useBlockProps:IDe,edit:PDe,attributeKeys:["style"],hasSupport(){return!0}};var yj=l(vt(),1),kj=l(K(),1),Jhe="metadata";function ODe(e){return e?.attributes?.[Jhe]?.type||(e.attributes={...e.attributes,[Jhe]:{type:"object"}}),e}function ADe(e,t,o,r){if(r.length===1&&e.innerBlocks.length===t.length||r.length===1&&t.length>1||r.length>1&&t.length===1||r.length>1&&t.length>1&&r.length!==t.length)return e;let n=t[o]?.attributes?.metadata;if(!n)return e;let i={};return n.noteId&&!e.attributes?.metadata?.noteId&&(i.noteId=n.noteId),n.name&&!e.attributes?.metadata?.name&&(0,kj.hasBlockSupport)(e.name,"renaming",!0)&&(i.name=n.name),n.blockVisibility!==void 0&&!e.attributes?.metadata?.blockVisibility&&(0,kj.hasBlockSupport)(e.name,"visibility",!0)&&(i.blockVisibility=n.blockVisibility),Object.keys(i).length>0?{...e,attributes:{...e.attributes,metadata:{...e.attributes.metadata,...i}}}:e}(0,yj.addFilter)("blocks.registerBlockType","core/metadata/addMetaAttribute",ODe);(0,yj.addFilter)("blocks.switchToBlockType.transformedBlock","core/metadata/addTransforms",ADe);var _j=l(N(),1),JO=l(R(),1),eA=l(A(),1),tA=l(K(),1),nk=l(F(),1);var zf=l(w(),1),LDe={};function NDe({name:e,clientId:t,metadata:{ignoredHookedBlocks:o=[]}={}}){let r=(0,nk.useSelect)(h=>h(tA.store).getBlockTypes(),[]),n=(0,JO.useMemo)(()=>r?.filter(({name:h,blockHooks:p})=>p&&e in p||o.includes(h)),[r,e,o]),i=(0,nk.useSelect)(h=>{let{getBlocks:p,getBlockRootClientId:g,getGlobalBlockCount:b}=h(x),k=g(t),v=n.reduce((y,_)=>{if(b(_.name)===0)return y;let S=_?.blockHooks?.[e],C;switch(S){case"before":case"after":C=p(k);break;case"first_child":case"last_child":C=p(t);break;case void 0:C=[...p(k),...p(t)];break}let B=C?.find(T=>T.name===_.name);return B?{...y,[_.name]:B.clientId}:y},{});return Object.values(v).length>0?v:LDe},[n,e,t]),{getBlockIndex:s,getBlockCount:a,getBlockRootClientId:c}=(0,nk.useSelect)(x),{insertBlock:u,removeBlock:d}=(0,nk.useDispatch)(x);if(!n.length)return null;let f=n.reduce((h,p)=>{let[g]=p.name.split("/");return h[g]||(h[g]=[]),h[g].push(p),h},{}),m=(h,p)=>{let g=s(t),b=a(t),k=c(t);switch(p){case"before":case"after":u(h,p==="after"?g+1:g,k,!1);break;case"first_child":case"last_child":u(h,p==="first_child"?0:b,t,!1);break;case void 0:u(h,g+1,k,!1);break}};return(0,zf.jsx)(fe,{children:(0,zf.jsxs)(eA.PanelBody,{className:"block-editor-hooks__block-hooks",title:(0,_j.__)("Plugins"),initialOpen:!0,children:[(0,zf.jsx)("p",{className:"block-editor-hooks__block-hooks-helptext",children:(0,_j.__)("Manage the inclusion of blocks added automatically by plugins.")}),Object.keys(f).map(h=>(0,zf.jsxs)(JO.Fragment,{children:[(0,zf.jsx)("h3",{children:h}),f[h].map(p=>{let g=p.name in i;return(0,zf.jsx)(eA.ToggleControl,{checked:g,label:p.title,onChange:()=>{if(!g){let b=p.blockHooks[e];m((0,tA.createBlock)(p.name),b);return}d(i[p.name],!1)}},p.title)})]},h))]})})}var ege={edit:NDe,attributeKeys:["metadata"],hasSupport(){return!0}};var Sj=l(N(),1),tge=l(K(),1),ik=l(A(),1),oge=l(F(),1),rge=l(R(),1),nge=l(X(),1);var jf=l(w(),1),MDe=()=>(0,nge.useViewportMatch)("medium","<")?{}:{popoverProps:{placement:"left-start",offset:259}},DDe=({name:e,metadata:t})=>{let o=(0,rge.useContext)(Or),{removeAllBlockBindings:r}=zl(),n=MDe(),{bindableAttributes:i,hasCompatibleFields:s}=(0,oge.useSelect)(c=>{let{__experimentalBlockBindingsSupportedAttributes:u}=c(x).getSettings(),{getAllBlockBindingsSources:d,getBlockBindingsSourceFieldsList:f}=M(c(tge.store));return{bindableAttributes:u?.[e],hasCompatibleFields:Object.values(d()).some(m=>f(m,o)?.length>0)}},[e,o]);if(!i||i.length===0)return null;let{bindings:a}=t||{};return a===void 0&&!s?null:(0,jf.jsx)(fe,{group:"bindings",children:(0,jf.jsxs)(ik.__experimentalToolsPanel,{label:(0,Sj.__)("Attributes"),resetAll:()=>{r()},dropdownMenuProps:n,className:"block-editor-bindings__panel",children:[(0,jf.jsx)(ik.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,children:i.map(c=>(0,jf.jsx)(by,{attribute:c,blockName:e,binding:a?.[c]},c))}),(0,jf.jsx)(ik.__experimentalText,{as:"div",variant:"muted",children:(0,jf.jsx)("p",{children:(0,Sj.__)("Attributes connected to custom fields or other dynamic data.")})})]})})},ige={edit:DDe,attributeKeys:["metadata"],hasSupport(e){return!["core/post-date","core/navigation-link","core/navigation-submenu"].includes(e)}};var sge=l(N(),1),age=l(A(),1),nA=l(F(),1),A0=l(K(),1),lge=l(R(),1);var oA=l(F(),1);function rA(e){let{isOpened:t,expandRevision:o}=(0,oA.useSelect)(i=>{let{isListViewPanelOpened:s,getListViewExpandRevision:a}=M(i(x));return{isOpened:s(e),expandRevision:a()}},[e]),{__unstableToggleListViewPanel:r}=(0,oA.useDispatch)(x);return{isOpened:t,expandRevision:o,handleToggle:i=>{r(e,i)}}}var sk=l(w(),1),VDe="listView";function cge(e){return(0,A0.hasBlockSupport)(e,VDe)}function FDe({clientId:e,name:t}){let{isSelectionWithinCurrentSection:o}=(0,lge.useContext)(br),{isOpened:r,expandRevision:n,handleToggle:i}=rA(e),{openListViewContentPanel:s}=M((0,nA.useDispatch)(x)),a=cge(t),{hasChildren:c,isNestedListView:u}=(0,nA.useSelect)(h=>{let{getBlockCount:p,getBlockParents:g,getBlockName:b}=h(x),v=g(e,!1).find(y=>{let _=b(y);return _==="core/navigation"||(0,A0.hasBlockSupport)(_,"listView")});return{hasChildren:!!p(e),isNestedListView:v}},[e]),f=(0,A0.getBlockType)(t)?.title||t;return!a||u?null:(0,sk.jsx)(ep,{group:"list",children:(0,sk.jsxs)(age.PanelBody,{title:o?f:void 0,opened:r,onToggle:i,children:[!c&&(0,sk.jsx)("p",{className:"block-editor-block-inspector__no-blocks",children:(0,sge.__)("No items yet.")}),(0,sk.jsx)(mS,{rootClientId:e,isExpanded:!0,description:f,showAppender:!0,onSelect:s},`${e}-${n}`)]})})}var uge={edit:FDe,hasSupport:cge,attributeKeys:[],supportsPatternEditing:!0};var dge=l(vt(),1),fge=l(K(),1);function zDe(e){return e.__experimentalLabel||(0,fge.hasBlockSupport)(e,"renaming",!0)&&(e.__experimentalLabel=(o,{context:r})=>{let{metadata:n}=o;if((r==="list-view"||r==="breadcrumb")&&n?.name)return n.name}),e}(0,dge.addFilter)("blocks.registerBlockType","core/metadata/addLabelCallback",zDe);var mge=l(X(),1),pge=l(vt(),1),hge=l(F(),1);var Es=l(w(),1);function jDe(e){gj(e)}function UDe({clientId:e,layout:t}){let{isVisible:o,blockVisibility:r,deviceType:n,isAnyAncestorHidden:i}=(0,hge.useSelect)(a=>{let{isBlockSelected:c,hasSelectedInnerBlock:u,isDraggingBlocks:d,getTemplateLock:f,getBlockEditingMode:m,getBlockAttributes:h,getSettings:p}=a(x);if(!d()&&!c(e)||f(e)||m(e)!=="default"||u(e))return{isVisible:!1};let{isBlockParentHiddenAtViewport:g}=M(a(x)),b=h(e),v=p()?.[Ai]?.toLowerCase()||At.desktop.key;return{isVisible:!0,blockVisibility:b?.metadata?.blockVisibility,deviceType:v,isAnyAncestorHidden:g(e,v)}},[e]),{isBlockCurrentlyHidden:s}=$i({blockVisibility:r,deviceType:n});return(0,Es.jsxs)(Es.Fragment,{children:[(0,Es.jsx)(jDe,{clientId:e}),o&&!s&&!i&&(0,Es.jsx)(I0,{clientId:e,parentLayout:t})]})}var HDe=(0,mge.createHigherOrderComponent)(e=>function(o){return o.attributes.layout?.type!=="grid"?(0,Es.jsx)(e,{...o},"edit"):(0,Es.jsxs)(Es.Fragment,{children:[(0,Es.jsx)(UDe,{clientId:o.clientId,layout:o.attributes.layout}),(0,Es.jsx)(e,{...o},"edit")]})},"addGridVisualizerToBlockEdit");(0,pge.addFilter)("editor.BlockEdit","core/editor/grid-visualizer",HDe);var L0=l(K(),1),bge=l(A(),1),vge=l(F(),1);var sA=l(R(),1),kge=l(N(),1);function gge(e){let t=[],o=[];return Object.entries(e).forEach(([r,n])=>{if(!n.autoGenerateControl)return;let i=GDe(r,n);i&&(t.push(i),o.push(r))}),{fields:t,form:{fields:o}}}function GDe(e,t){let o=t.type,r={id:e,label:t.label||e,type:o==="string"?"text":o};return t.enum&&Array.isArray(t.enum)&&(r.elements=t.enum.map(n=>({value:n,label:String(n)}))),r}var iA=l(w(),1);function WDe(e){return e?Object.values(e).some(t=>t?.autoGenerateControl):!1}function $De({name:e,clientId:t,setAttributes:o}){let r=bo(),n=(0,sA.useContext)(Or),i=(0,vge.useSelect)(u=>{let d=u(x).getBlockAttributes(t);if(!d?.metadata?.bindings)return d;let{getBlockBindingsSource:f}=M(u(L0.store));return Object.entries(d.metadata.bindings).reduce((m,[h,p])=>{let g=f(p.source);if(!g)return m;let b=g.getValues({select:u,context:n,bindings:{[h]:p}});return{...m,...b}},d)},[n,t]),s=(0,L0.getBlockType)(e),{fields:a,form:c}=(0,sA.useMemo)(()=>s?.attributes?gge(s.attributes):{fields:[],form:{fields:[]}},[s?.attributes]);return r!=="default"||!a||a.length===0?null:(0,iA.jsx)(fe,{children:(0,iA.jsx)(bge.PanelBody,{title:(0,kge.__)("Settings"),children:(0,iA.jsx)(g0,{data:i,fields:a,form:c,onChange:o})})})}var yge={edit:$De,attributeKeys:[],hasSupport(e){let t=(0,L0.getBlockType)(e);return WDe(t?.attributes)}};function aA(e){let{style:t}=e,o=t?.dimensions||{},r=Bi({dimensions:o});return{className:o.aspectRatio?"has-aspect-ratio":void 0,style:r}}function lA(e){let t=e.style?.border||{};return{className:Nz(e)||void 0,style:Bi({border:t})}}function xj(e){let{colors:t}=qd(),o=lA(e),{borderColor:r}=e;if(r){let n=Fp({colors:t,namedColor:r});o.style.borderColor=n.color}return o}function wj(e){let t=e.style?.shadow||"";return{style:Bi({shadow:t})}}var Cj=l(R(),1);function cA(e){let{backgroundColor:t,textColor:o,gradient:r,style:n}=e,i=Ri("background-color",t),s=Ri("color",o),a=Ph(r),c=a||n?.color?.gradient,u=D(s,a,{[i]:!c&&!!i,"has-text-color":o||n?.color?.text,"has-background":t||n?.color?.background||r||n?.color?.gradient,"has-link-color":n?.elements?.link?.color}),d=n?.color||{},f=Bi({color:d});return{className:u||void 0,style:f}}function Bj(e){let{backgroundColor:t,textColor:o,gradient:r}=e,[n,i,s,a,c,u]=me("color.palette.custom","color.palette.theme","color.palette.default","color.gradients.custom","color.gradients.theme","color.gradients.default"),d=(0,Cj.useMemo)(()=>[...n||[],...i||[],...s||[]],[n,i,s]),f=(0,Cj.useMemo)(()=>[...a||[],...c||[],...u||[]],[a,c,u]),m=cA(e);if(t){let h=Ca(d,t);m.style.backgroundColor=h.color}if(r&&(m.style.background=SC(f,r)),o){let h=Ca(d,o);m.style.color=h.color}return m}function Ej(e){let{style:t}=e,o=t?.spacing||{};return{style:Bi({spacing:o})}}var _ge=l(A(),1);var{kebabCase:KDe}=M(_ge.privateApis);function Tj(e,t){let o=e?.style?.typography||{};o={...o,fontSize:hc({size:e?.style?.typography?.fontSize},t)};let r=Bi({typography:o}),n=e?.fontFamily?`has-${KDe(e.fontFamily)}-font-family`:"",i=e?.style?.typography?.textAlign?`has-text-align-${e?.style?.typography?.textAlign}`:"";return{className:D(n,i,Au(e?.fontSize)),style:r}}var uA=l(R(),1);function Ij(e){let[t,o]=(0,uA.useState)(e);return(0,uA.useEffect)(()=>{e&&o(e)},[e]),t}Sde([wR,NO,m6,$6,jO,WO,aj,DO,Z3,Hhe,ege,ige,vj,Gde,Zpe,uge,yge].filter(Boolean));xde([wR,NO,Rue,jO,Uz,The,aj,K6,q6,DO,Mz,WO,Z3,ate,vj]);wde([wR,NO,m6,Yde,$6,Mz,WO,DO,Uz,jO,K6,q6]);var Sge={button:"wp-element-button",caption:"wp-element-caption"},YDe=e=>Sge[e]?Sge[e]:"";var xge=()=>"";var ak=l(R(),1),N0=l(K(),1),Rj=l(yr(),1);var wge=l(w(),1);function Oj(e,t,o){if(e==null||e===!1)return;if(Array.isArray(e))return Pj(e,t,o);switch(typeof e){case"string":case"number":return}let{type:r,props:n}=e;switch(r){case ak.StrictMode:case ak.Fragment:return Pj(n.children,t,o);case ak.RawHTML:return;case R_.Content:return Cge(t,o);case NS:t.push(n.value);return}switch(typeof r){case"string":return typeof n.children<"u"?Pj(n.children,t,o):void 0;case"function":let i=r.prototype&&typeof r.prototype.render=="function"?new r(n).render():r(n);return Oj(i,t,o)}}function Pj(e,...t){e=Array.isArray(e)?e:[e];for(let o=0;o<e.length;o++)Oj(e[o],...t)}function Cge(e,t){for(let o=0;o<t.length;o++){let{name:r,attributes:n,innerBlocks:i}=t[o],s=(0,N0.getSaveElement)(r,n,(0,wge.jsx)(R_.Content,{}));Oj(s,e,i)}}function Bge(e=[]){N0.__unstableGetBlockProps.skipFilters=!0;let t=[];return Cge(t,e),N0.__unstableGetBlockProps.skipFilters=!1,t.map(o=>o instanceof Rj.RichTextData?o:Rj.RichTextData.fromHTMLString(o))}var Ege=l(A(),1);var Aj=l(w(),1);function Tge({clientId:e,resizableBoxProps:t,...o}){return(0,Aj.jsx)(es,{clientId:e,__unstablePopoverSlot:"block-toolbar",...o,children:(0,Aj.jsx)(Ege.ResizableBox,{...t})})}var D0=l(R(),1),dA=l(F(),1),ya=l(A(),1),M0=l(N(),1);var Ts=l(w(),1);function Ige({rules:e}){let[t,o]=(0,D0.useState)(!1),{clientIds:r,selectPrevious:n,message:i}=(0,dA.useSelect)(p=>M(p(x)).getRemovalPromptData()),{clearBlockRemovalPrompt:s,setBlockRemovalRules:a,privateRemoveBlocks:c}=M((0,dA.useDispatch)(x));if((0,D0.useEffect)(()=>(a(e),()=>{a()}),[e,a]),(0,D0.useEffect)(()=>{o(!1)},[r]),!i)return;let u=typeof i=="object"&&i!==null,d=u?i.description:i,f=u&&i.requireConfirmation,m=f&&!t,h=()=>{c(r,n,!0),s()};return(0,Ts.jsx)(ya.Modal,{title:(0,M0.__)("Confirm deletion"),onRequestClose:s,size:"medium",children:(0,Ts.jsxs)(ya.__experimentalVStack,{spacing:4,children:[(0,Ts.jsxs)("div",{children:[(0,Ts.jsx)("p",{children:d}),u&&(i.warning||i.subtext)&&(0,Ts.jsxs)("p",{children:[i.warning&&(0,Ts.jsx)("strong",{children:i.warning}),i.warning&&i.subtext&&" ",i.subtext]})]}),f&&(0,Ts.jsx)(ya.CheckboxControl,{label:(0,M0.__)("I understand the consequences"),checked:t,onChange:o}),(0,Ts.jsxs)(ya.__experimentalHStack,{justify:"right",children:[(0,Ts.jsx)(ya.Button,{variant:"tertiary",onClick:s,__next40pxDefaultSize:!0,children:(0,M0.__)("Cancel")}),(0,Ts.jsx)(ya.Button,{variant:"primary",onClick:h,disabled:m,accessibleWhenDisabled:!0,__next40pxDefaultSize:!0,children:(0,M0.__)("Delete")})]})]})})}var Lj=l(R(),1);var lk=l(A(),1),Rge=l(R(),1),$n=l(N(),1),fA=l(w(),1),Pge=[{value:"fill",label:(0,$n._x)("Fill","Scale option for dimensions control"),help:(0,$n.__)("Fill the space by stretching the content.")},{value:"contain",label:(0,$n._x)("Contain","Scale option for dimensions control"),help:(0,$n.__)("Fit the content to the space without clipping.")},{value:"cover",label:(0,$n._x)("Cover","Scale option for dimensions control"),help:(0,$n.__)("Fill the space by clipping what doesn't fit.")},{value:"none",label:(0,$n._x)("None","Scale option for dimensions control"),help:(0,$n.__)("Do not adjust the sizing of the content. Content that is too large will be clipped, and content that is too small will have additional padding.")},{value:"scale-down",label:(0,$n._x)("Scale down","Scale option for dimensions control"),help:(0,$n.__)("Scale down the content to fit the space if it is too big. Content that is too small will have additional padding.")}];function Oge({panelId:e,value:t,onChange:o,options:r=Pge,defaultValue:n=Pge[0].value,isShownByDefault:i=!0}){let s=t??"fill",a=(0,Rge.useMemo)(()=>r.reduce((c,u)=>(c[u.value]=u.help,c),{}),[r]);return(0,fA.jsx)(lk.__experimentalToolsPanelItem,{label:(0,$n._x)("Scale","Image scaling options"),isShownByDefault:i,hasValue:()=>s!==n,onDeselect:()=>o(n),panelId:e,children:(0,fA.jsx)(lk.__experimentalToggleGroupControl,{label:(0,$n._x)("Scale","Image scaling options"),isBlock:!0,help:a[s],value:s,onChange:o,size:"__unstable-large",children:r.map(c=>(0,fA.jsx)(lk.__experimentalToggleGroupControlOption,{...c},c.value))})})}var ck=l(A(),1),th=l(N(),1),su=l(w(),1);function Age({panelId:e,value:t={},onChange:o=()=>{},units:r,isShownByDefault:n=!0}){let i=t.width==="auto"?"":t.width??"",s=t.height==="auto"?"":t.height??"",a=c=>u=>{let d={...t};u?d[c]=u:delete d[c],o(d)};return(0,su.jsxs)(su.Fragment,{children:[(0,su.jsx)(ck.__experimentalToolsPanelItem,{style:{gridColumn:"span 1"},label:(0,th.__)("Width"),isShownByDefault:n,hasValue:()=>i!=="",onDeselect:a("width"),panelId:e,children:(0,su.jsx)(ck.__experimentalUnitControl,{label:(0,th.__)("Width"),placeholder:(0,th.__)("Auto"),labelPosition:"top",units:r,min:0,value:i,onChange:a("width"),size:"__unstable-large"})}),(0,su.jsx)(ck.__experimentalToolsPanelItem,{style:{gridColumn:"span 1"},label:(0,th.__)("Height"),isShownByDefault:n,hasValue:()=>s!=="",onDeselect:a("height"),panelId:e,children:(0,su.jsx)(ck.__experimentalUnitControl,{label:(0,th.__)("Height"),placeholder:(0,th.__)("Auto"),labelPosition:"top",units:r,min:0,value:s,onChange:a("height"),size:"__unstable-large"})})]})}var Uf=l(w(),1);function qDe({panelId:e,value:t={},onChange:o=()=>{},aspectRatioOptions:r,defaultAspectRatio:n="auto",scaleOptions:i,defaultScale:s="fill",unitsOptions:a,tools:c=["aspectRatio","widthHeight","scale"]}){let u=t.width===void 0||t.width==="auto"?null:t.width,d=t.height===void 0||t.height==="auto"?null:t.height,f=t.aspectRatio===void 0||t.aspectRatio==="auto"?null:t.aspectRatio,m=t.scale===void 0||t.scale==="fill"?null:t.scale,[h,p]=(0,Lj.useState)(m),[g,b]=(0,Lj.useState)(f),k=u&&d?"custom":g,v=f||u&&d;return(0,Uf.jsxs)(Uf.Fragment,{children:[c.includes("aspectRatio")&&(0,Uf.jsx)(NP,{panelId:e,options:r,defaultValue:n,value:k,onChange:y=>{let _={...t};y=y==="auto"?null:y,b(y),y?_.aspectRatio=y:delete _.aspectRatio,y?h?_.scale=h:(_.scale=s,p(s)):delete _.scale,y!=="custom"&&u&&d&&delete _.height,o(_)}}),c.includes("widthHeight")&&(0,Uf.jsx)(Age,{panelId:e,units:a,value:{width:u,height:d},onChange:({width:y,height:_})=>{let S={...t};y=y==="auto"?null:y,_=_==="auto"?null:_,y?S.width=y:delete S.width,_?S.height=_:delete S.height,y&&_?delete S.aspectRatio:g&&(S.aspectRatio=g),!g&&!!y!=!!_?delete S.scale:h?S.scale=h:(S.scale=s,p(s)),o(S)}}),c.includes("scale")&&v&&(0,Uf.jsx)(Oge,{panelId:e,options:i,defaultValue:s,value:h,onChange:y=>{let _={...t};y=y==="fill"?null:y,p(y),y?_.scale=y:delete _.scale,o(_)}})]})}var Lge=qDe;var mA=l(A(),1),au=l(N(),1),Nj=l(w(),1),Nge=[{label:(0,au._x)("Thumbnail","Image size option for resolution control"),value:"thumbnail"},{label:(0,au._x)("Medium","Image size option for resolution control"),value:"medium"},{label:(0,au._x)("Large","Image size option for resolution control"),value:"large"},{label:(0,au._x)("Full Size","Image size option for resolution control"),value:"full"}];function Mge({panelId:e,value:t,onChange:o,options:r=Nge,defaultValue:n=Nge[0].value,isShownByDefault:i=!0,resetAllFilter:s}){let a=t??n;return(0,Nj.jsx)(mA.__experimentalToolsPanelItem,{hasValue:()=>a!==n,label:(0,au.__)("Resolution"),onDeselect:()=>o(n),isShownByDefault:i,panelId:e,resetAllFilter:s,children:(0,Nj.jsx)(mA.SelectControl,{label:(0,au.__)("Resolution"),value:a,options:r,onChange:o,help:(0,au.__)("Select the size of the source image."),size:"__unstable-large"})})}var oh=l(N(),1),uk=l(A(),1),Vge=l(F(),1);var _a=l(N(),1),Dge={a:(0,_a.__)("The <a> element should be used for links that navigate to a different page or to a different section within the same page."),article:(0,_a.__)("The <article> element should represent a self-contained, syndicatable portion of the document."),aside:(0,_a.__)("The <aside> element should represent a portion of a document whose content is only indirectly related to the document's main content."),button:(0,_a.__)("The <button> element should be used for interactive controls that perform an action on the current page, such as opening a modal or toggling content visibility."),div:(0,_a.__)("The <div> element should only be used if the block is a design element with no semantic meaning."),footer:(0,_a.__)("The <footer> element should represent a footer for its nearest sectioning element (e.g.: <section>, <article>, <main> etc.)."),header:(0,_a.__)("The <header> element should represent introductory content, typically a group of introductory or navigational aids."),main:(0,_a.__)("The <main> element should be used for the primary content of your document only."),nav:(0,_a.__)("The <nav> element should be used to identify groups of links that are intended to be used for website or page content navigation."),section:(0,_a.__)("The <section> element should represent a standalone portion of the document that can't be better represented by another element.")};var V0=l(w(),1);function Fge({tagName:e,onChange:t,clientId:o,options:r=[{label:(0,oh.__)("Default (<div>)"),value:"div"},{label:"<header>",value:"header"},{label:"<main>",value:"main"},{label:"<section>",value:"section"},{label:"<article>",value:"article"},{label:"<aside>",value:"aside"},{label:"<footer>",value:"footer"}]}){let n=!!o&&r.some(a=>a.value==="main"),i=(0,Vge.useSelect)(a=>{if(!n)return!1;let{getClientIdsWithDescendants:c,getBlockAttributes:u}=a(x);return c().some(d=>d===o?!1:u(d)?.tagName==="main")},[o,n]),s=r.map(a=>a.value==="main"&&i&&e!=="main"?{...a,disabled:!0,label:(0,oh.sprintf)((0,oh.__)("%s (Already in use)"),a.label)}:a);return(0,V0.jsxs)(uk.__experimentalVStack,{spacing:2,className:"block-editor-html-element-control",children:[(0,V0.jsx)(uk.SelectControl,{__next40pxDefaultSize:!0,label:(0,oh.__)("HTML element"),options:s,value:e,onChange:t,help:Dge[e]}),e==="main"&&i&&(0,V0.jsx)(uk.Notice,{status:"warning",isDismissible:!1,children:(0,oh.__)("Multiple <main> elements detected. The duplicate may be in your content or template. This is not valid HTML and may cause accessibility issues. Please change this HTML element.")})]})}var lu=l(A(),1);var dk=l(R(),1),pA=l(N(),1);var Kn=l(A(),1);var zge=l(Fe(),1);var Ti=l(w(),1),{Badge:ZDe}=M(Kn.privateApis);function jge({title:e,url:t,image:o,badges:r}){return(0,Ti.jsxs)(Kn.__experimentalHStack,{justify:"space-between",alignment:"top",children:[(0,Ti.jsx)(Kn.FlexItem,{className:"link-preview-button__content",children:(0,Ti.jsxs)(Kn.__experimentalHStack,{alignment:"top",children:[o&&(0,Ti.jsx)(Kn.FlexItem,{className:"link-preview-button__image-container",children:(0,Ti.jsx)("img",{className:"link-preview-button__image",src:o,alt:""})}),(0,Ti.jsxs)(Kn.__experimentalVStack,{className:"link-preview-button__details",alignment:"topLeft",children:[(0,Ti.jsx)(Kn.__experimentalTruncate,{numberOfLines:1,className:"link-preview-button__title",children:(0,zge.__unstableStripHTML)(e)}),t&&(0,Ti.jsx)(Kn.__experimentalTruncate,{numberOfLines:1,className:"link-preview-button__hint",children:t}),r&&r.length>0&&(0,Ti.jsx)(Kn.__experimentalHStack,{className:"link-preview-button__badges",alignment:"left",children:r.map(n=>(0,Ti.jsx)(ZDe,{intent:n.intent,children:n.label},`${n.label}|${n.intent}`))})]})]})}),(0,Ti.jsx)(Ie,{icon:vr,className:"link-preview-button__icon"})]})}var Ii=l(w(),1);function Mj({preview:e,onSelect:t,suggestionsQuery:o,label:r,help:n}){let[i,s]=(0,dk.useState)(!1),a=(0,dk.useId)(),c=`link-picker-title-${a}`,u=`link-picker-description-${a}`,d=(0,dk.useRef)(null),{baseControlProps:f,controlProps:m}=(0,lu.useBaseControlProps)({help:n}),h=p=>{if(s(!1),p){let g={url:p.url,kind:p.kind,type:p.type,id:p.id,title:p.title};t(g)}};return(0,Ii.jsxs)(lu.BaseControl,{...f,children:[(0,Ii.jsx)(lu.BaseControl.VisualLabel,{children:r}),(0,Ii.jsxs)(lu.Button,{ref:d,onClick:()=>s(!i),"aria-haspopup":"dialog","aria-expanded":i,"aria-describedby":m["aria-describedby"],variant:"secondary",__next40pxDefaultSize:!0,className:"link-preview-button",children:[r&&(0,Ii.jsxs)(We,{children:[r,":"]}),(0,Ii.jsx)(jge,{title:e.title||(0,pA.__)("Add link"),url:e.url,image:e.image,badges:e.badges})]}),i&&(0,Ii.jsx)(lu.Popover,{anchor:d.current,onClose:()=>s(!1),placement:"left-start",offset:36,shift:!0,children:(0,Ii.jsxs)("div",{role:"dialog","aria-labelledby":c,"aria-describedby":u,children:[(0,Ii.jsxs)(We,{children:[(0,Ii.jsx)("h2",{id:c,children:(0,pA.__)("Select a link")}),(0,Ii.jsx)("p",{id:u,children:(0,pA.__)("Search for and add a link to the navigation item.")})]}),(0,Ii.jsx)(tf,{value:null,onChange:h,suggestionsQuery:o,showInitialSuggestions:!0,forceIsEditingLink:!0,settings:[]})]})})]})}var Dj={};n8(Dj,{...Oz,ExperimentalBlockCanvas:U4,BlockCanvasCover:BI,ExperimentalBlockEditorProvider:dg,getDuotoneFilter:UO,getRichTextValues:Bge,PrivateQuickInserter:IE,extractWords:BC,getNormalizedSearchTerms:uy,normalizeString:cy,PrivateListView:mS,ResizableBoxPopover:Tge,InspectorControlsLastItem:vR,useHasBlockToolbar:qT,cleanEmptyObject:De,usePrivateStyleOverride:gc,BlockQuickNavigation:gR,LayoutStyle:F7,BlockManager:BR,BlockRemovalWarningModal:Ige,useLayoutClasses:YO,useLayoutStyles:fj,DimensionsTool:Lge,ResolutionTool:Mge,TabbedSidebar:wE,TextAlignmentControl:PP,usesContextKey:iz,useFlashEditableBlocks:L1,HTMLElementControl:Fge,useZoomOut:__,globalStylesDataKey:Oi,globalStylesLinksDataKey:J0,selectBlockPatternsKey:mu,requiresWrapperOnCopy:CV,PrivateRichText:MS,PrivateInserterLibrary:qz,reusableBlocksSelectKey:ex,PrivateBlockPopover:Km,PrivatePublishDateTimePicker:r6,useSpacingSizes:fP,useBlockDisplayTitle:Sr,BlockStyleVariationOverridesWithConfig:T4,setBackgroundStyleDefaults:aR,sectionRootClientIdKey:pu,NoteIconSlotFill:CT,NoteIconToolbarSlotFill:UT,mediaEditKey:tx,getMediaSelectKey:ox,deviceTypeKey:Ai,isIsolatedEditorKey:hu,isNavigationOverlayContextKey:rx,isNavigationPostEditorKey:y8,mediaUploadOnSuccessKey:vk,openMediaEditorModalKey:_8,useBlockElement:st,useBlockElementRef:km,LinkPicker:Mj,useRemoteUrlData:D2,PrivateBlockContext:br,useListViewPanelState:rA,isHashLink:Hf,isRelativePath:Gf});return qge(XDe);})(); |
| 234 |
/*! Bundled license information: |
| 235 |
|
| 236 |
autosize/dist/autosize.js: |
| 237 |
(*! |
| 238 |
autosize 4.0.2 |
| 239 |
license: MIT |
| 240 |
http://www.jacklmoore.com/autosize |
| 241 |
*) |
| 242 |
|
| 243 |
normalize-wheel/src/isEventSupported.js: |
| 244 |
(** |
| 245 |
* Checks if an event is supported in the current execution environment. |
| 246 |
* |
| 247 |
* NOTE: This will not work correctly for non-generic events such as `change`, |
| 248 |
* `reset`, `load`, `error`, and `select`. |
| 249 |
* |
| 250 |
* Borrows from Modernizr. |
| 251 |
* |
| 252 |
* @param {string} eventNameSuffix Event name, e.g. "click". |
| 253 |
* @param {?boolean} capture Check if the capture phase is supported. |
| 254 |
* @return {boolean} True if the event is supported. |
| 255 |
* @internal |
| 256 |
* @license Modernizr 3.0.0pre (Custom Build) | MIT |
| 257 |
*) |
| 258 |
*/ |
| 259 |
//# sourceMappingURL=index.min.js.map |
| 260 |
|