| 1 |
"use strict";var wp;(wp||={}).blockEditor=(()=>{var Khe=Object.create;var D0=Object.defineProperty;var Yhe=Object.getOwnPropertyDescriptor;var qhe=Object.getOwnPropertyNames;var Zhe=Object.getPrototypeOf,Xhe=Object.prototype.hasOwnProperty;var se=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),ka=(e,t)=>{for(var o in t)D0(e,o,{get:t[o],enumerable:!0})},fj=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of qhe(t))!Xhe.call(e,n)&&n!==o&&D0(e,n,{get:()=>t[n],enumerable:!(r=Yhe(t,n))||r.enumerable});return e};var l=(e,t,o)=>(o=e!=null?Khe(Zhe(e)):{},fj(t||!e||!e.__esModule?D0(o,"default",{value:e,enumerable:!0}):o,e)),Qhe=e=>fj(D0({},"__esModule",{value:!0}),e);var $=se((CDe,pj)=>{pj.exports=window.wp.blocks});var O=se((BDe,hj)=>{hj.exports=window.wp.element});var z=se((EDe,gj)=>{gj.exports=window.wp.data});var X=se((TDe,bj)=>{bj.exports=window.wp.compose});var pt=se((IDe,kj)=>{kj.exports=window.wp.hooks});var A=se((LDe,Ij)=>{Ij.exports=window.wp.components});var vA=se((NDe,Pj)=>{Pj.exports=window.wp.privateApis});var Pe=se((UDe,Nj)=>{Nj.exports=window.wp.deprecated});var w=se((HDe,Mj)=>{Mj.exports=window.ReactJSXRuntime});var bn=se((WDe,Vj)=>{Vj.exports=window.wp.url});var N=se((o5e,Wj)=>{Wj.exports=window.wp.i18n});var Ff=se((r5e,$j)=>{"use strict";$j.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 q=se((m5e,n8)=>{n8.exports=window.wp.primitives});var br=se((LFe,i8)=>{i8.exports=window.wp.richText});var a8=se((NFe,s8)=>{s8.exports=window.wp.blockSerializationDefaultParser});var er=se((d6e,H8)=>{H8.exports=window.wp.a11y});var Li=se((f6e,q8)=>{q8.exports=window.wp.notices});var kh=se((m6e,Z8)=>{Z8.exports=window.wp.preferences});var A7=se((fze,SC)=>{var P7={\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"},R7=Object.keys(P7).join("|"),c_e=new RegExp(R7,"g"),u_e=new RegExp(R7,"");function d_e(e){return P7[e]}var O7=function(e){return e.replace(c_e,d_e)},f_e=function(e){return!!e.match(u_e)};SC.exports=O7;SC.exports.has=f_e;SC.exports.remove=O7});var W7=se((Lze,G7)=>{G7.exports=window.wp.apiFetch});var hD=se((Nze,$7)=>{$7.exports=window.wp.htmlEntities});var dy=se((aje,f9)=>{f9.exports=window.wp.styleEngine});var ct=se((s8e,N9)=>{N9.exports=window.wp.keycodes});var Fe=se((C8e,q9)=>{q9.exports=window.wp.dom});var X9=se(ID=>{"use strict";Object.defineProperty(ID,"__esModule",{value:!0});ID.default=Z9;function Z9(){}Z9.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=iSe(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(nSe(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 nSe(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 iSe(e){return{newPos:e.newPos,components:e.components.slice(0)}}});var J9=se(vy=>{"use strict";Object.defineProperty(vy,"__esModule",{value:!0});vy.diffChars=lSe;vy.characterDiff=void 0;var sSe=aSe(X9());function aSe(e){return e&&e.__esModule?e:{default:e}}var Q9=new sSe.default;vy.characterDiff=Q9;function lSe(e,t,o){return Q9.diff(e,t,o)}});var je=se((z8e,mU)=>{mU.exports=window.React});var hU=se((j8e,pU)=>{"use strict";var fSe="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";pU.exports=fSe});var vU=se((U8e,kU)=>{"use strict";var mSe=hU();function gU(){}function bU(){}bU.resetWarningCache=gU;kU.exports=function(){function e(r,n,i,s,a,c){if(c!==mSe){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:bU,resetWarningCache:gU};return o.PropTypes=o,o}});var _U=se((W8e,yU)=>{yU.exports=vU()();var H8e,G8e});var xU=se((XC,SU)=>{(function(e,t){if(typeof define=="function"&&define.amd)define(["module","exports"],t);else if(typeof XC<"u")t(SU,XC);else{var o={exports:{}};t(o,o.exports),e.autosize=o.exports}})(XC,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 CU=se(($8e,wU)=>{var pSe=function(e,t,o){return o=window.getComputedStyle,(o?o(e):e.currentStyle)[t.replace(/-(\w)/gi,function(r,n){return n.toUpperCase()})]};wU.exports=pSe});var EU=se((K8e,BU)=>{var RD=CU();function hSe(e){var t=RD(e,"line-height"),o=parseFloat(t,10);if(t===o+""){var r=e.style.lineHeight;e.style.lineHeight=t+"em",t=RD(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=RD(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}BU.exports=hSe});var IU=se(Vl=>{"use strict";var gSe=Vl&&Vl.__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)}})(),OD=Vl&&Vl.__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},bSe=Vl&&Vl.__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};Vl.__esModule=!0;var JC=je(),yy=_U(),QC=xU(),kSe=EU(),vSe=kSe,TU="autosize:resized",ySe=(function(e){gSe(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:vSe(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&&QC(o.textarea)}):this.textarea&&QC(this.textarea),this.textarea&&this.textarea.addEventListener(TU,this.onResize)},t.prototype.componentWillUnmount=function(){this.textarea&&(this.textarea.removeEventListener(TU,this.onResize),QC.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=bSe(n,["onResize","maxRows","onChange","style","innerRef","children"]),m=r.state.lineHeight,h=s&&m?m*s:null;return JC.createElement("textarea",OD({},f,{onChange:this.onChange,style:h?OD({},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&&QC.update(this.textarea)},t.defaultProps={rows:1,async:!1},t.propTypes={rows:yy.number,maxRows:yy.number,onResize:yy.func,innerRef:yy.any,async:yy.bool},t})(JC.Component);Vl.TextareaAutosize=JC.forwardRef(function(e,t){return JC.createElement(ySe,OD({},e,{innerRef:t}))})});var AD=se((q8e,PU)=>{"use strict";var _Se=IU();PU.exports=_Se.TextareaAutosize});var _y=se((Q8e,LU)=>{LU.exports=window.wp.warning});var m5=se((g7e,PH)=>{PH.exports=window.ReactDOM});var Ds=se((G7e,iG)=>{iG.exports=window.wp.keyboardShortcuts});var BG=se((nUe,CG)=>{CG.exports=window.wp.uploadMedia});var aB=se(()=>{});var lB=se(()=>{});var D5=se(()=>{});var DW=se((OHe,MW)=>{var Ixe="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",Pxe=(e,t=21)=>(o=t)=>{let r="",n=o|0;for(;n--;)r+=e[Math.random()*e.length|0];return r},Rxe=(e=21)=>{let t="",o=e|0;for(;o--;)t+=Ixe[Math.random()*64|0];return t};MW.exports={nanoid:Rxe,customAlphabet:Pxe}});var V5=se(()=>{});var FW=se((NHe,F5)=>{var Ce=String,VW=function(){return{isColorSupported:!1,reset:Ce,bold:Ce,dim:Ce,italic:Ce,underline:Ce,inverse:Ce,hidden:Ce,strikethrough:Ce,black:Ce,red:Ce,green:Ce,yellow:Ce,blue:Ce,magenta:Ce,cyan:Ce,white:Ce,gray:Ce,bgBlack:Ce,bgRed:Ce,bgGreen:Ce,bgYellow:Ce,bgBlue:Ce,bgMagenta:Ce,bgCyan:Ce,bgWhite:Ce,blackBright:Ce,redBright:Ce,greenBright:Ce,yellowBright:Ce,blueBright:Ce,magentaBright:Ce,cyanBright:Ce,whiteBright:Ce,bgBlackBright:Ce,bgRedBright:Ce,bgGreenBright:Ce,bgYellowBright:Ce,bgBlueBright:Ce,bgMagentaBright:Ce,bgCyanBright:Ce,bgWhiteBright:Ce}};F5.exports=VW();F5.exports.createColors=VW});var cB=se((MHe,UW)=>{"use strict";var zW=FW(),jW=V5(),qy=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=zW.isColorSupported),jW&&t&&(o=jW(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}=zW.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}};UW.exports=qy;qy.default=qy});var HW=se(()=>{});var KW=se((FHe,$W)=>{"use strict";var{SourceMapConsumer:GW,SourceMapGenerator:WW}=aB(),{existsSync:Oxe,readFileSync:Axe}=HW(),{dirname:z5,join:Lxe}=lB();function Nxe(e){return Buffer?Buffer.from(e,"base64").toString():window.atob(e)}var Zy=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=z5(this.mapFile)),n&&(this.text=n)}consumer(){return this.consumerCache||(this.consumerCache=new GW(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 Nxe(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=z5(t),Oxe(t))return this.mapFile=t,Axe(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 GW)return WW.fromSourceMap(o).toString();if(o instanceof WW)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=Lxe(z5(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)}};$W.exports=Zy;Zy.default=Zy});var W5=se((zHe,XW)=>{"use strict";var{SourceMapConsumer:Mxe,SourceMapGenerator:Dxe}=aB(),{fileURLToPath:YW,pathToFileURL:uB}=D5(),{isAbsolute:H5,resolve:G5}=lB(),{nanoid:Vxe}=DW(),j5=V5(),qW=cB(),Fxe=KW(),U5=Symbol("fromOffsetCache"),zxe=!!(Mxe&&Dxe),ZW=!!(G5&&H5),ng=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&&(!ZW||/^\w+:\/\//.test(o.from)||H5(o.from)?this.file=o.from:this.file=G5(o.from)),ZW&&zxe){let r=new Fxe(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 "+Vxe(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 qW(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 qW(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&&(uB&&(i.input.url=uB(this.file).toString()),i.input.file=this.file),i}fromOffset(t){let o,r;if(this[U5])r=this[U5];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[U5]=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:G5(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;H5(s.source)?c=uB(s.source):c=new URL(s.source,this.map.consumer().sourceRoot||uB(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(YW)u.file=YW(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}};XW.exports=ng;ng.default=ng;j5&&j5.registerInput&&j5.registerInput(ng)});var K5=se((jHe,r$)=>{"use strict";var{SourceMapConsumer:JW,SourceMapGenerator:dB}=aB(),{dirname:fB,relative:e$,resolve:t$,sep:o$}=lB(),{pathToFileURL:QW}=D5(),jxe=W5(),Uxe=!!(JW&&dB),Hxe=!!(fB&&t$&&e$&&o$),$5=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||fB(t.file),n;this.mapOpts.sourcesContent===!1?(n=new JW(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(),Hxe&&Uxe&&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=dB.fromSourceMap(t,{ignoreInvalidMapping:!0})}else this.map=new dB({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 dB({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?fB(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=fB(t$(r,this.mapOpts.annotation)));let n=e$(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 jxe(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(QW){let r=QW(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;o$==="\\"&&(t=t.replace(/\\/g,"/"));let r=encodeURI(t).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(t,r),r}};r$.exports=$5});var Y5=se((UHe,i$)=>{"use strict";var n$={after:` |
| 12 |
`,beforeClose:` |
| 13 |
`,beforeComment:` |
| 14 |
`,beforeDecl:` |
| 15 |
`,beforeOpen:" ",beforeRule:` |
| 16 |
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function Gxe(e){return e[0].toUpperCase()+e.slice(1)}var Xy=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 n$[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"+Gxe(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=n$[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)}};i$.exports=Xy;Xy.default=Xy});var mB=se((HHe,s$)=>{"use strict";var Wxe=Y5();function q5(e,t){new Wxe(t).stringify(e)}s$.exports=q5;q5.default=q5});var Z5=se((GHe,l$)=>{"use strict";var a$={};l$.exports=function(t){a$[t]||(a$[t]=!0,typeof console<"u"&&console.warn&&console.warn(t))}});var pB=se((WHe,X5)=>{"use strict";X5.exports.isClean=Symbol("isClean");X5.exports.my=Symbol("my")});var gB=se(($He,c$)=>{"use strict";var{isClean:hB,my:$xe}=pB(),Kxe=cB(),Yxe=Y5(),qxe=mB();function Q5(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=>Q5(s,o)):(i==="object"&&n!==null&&(n=Q5(n)),o[r]=n)}return o}var Qy=class{constructor(t={}){this.raws={},this[hB]=!1,this[$xe]=!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=Q5(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 Kxe(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[hB]){this[hB]=!1;let t=this;for(;t=t.parent;)t[hB]=!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 Yxe().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=qxe){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}};c$.exports=Qy;Qy.default=Qy});var J5=se((KHe,u$)=>{"use strict";var Zxe=gB(),Jy=class extends Zxe{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]==="$"}};u$.exports=Jy;Jy.default=Jy});var eV=se((YHe,d$)=>{"use strict";var Xxe=gB(),e_=class extends Xxe{constructor(t){super(t),this.type="comment"}};d$.exports=e_;e_.default=e_});var Sm=se((qHe,y$)=>{"use strict";var{isClean:f$,my:m$}=pB(),p$=J5(),h$=eV(),Qxe=gB(),g$,tV,oV,b$;function k$(e){return e.map(t=>(t.nodes&&(t.nodes=k$(t.nodes)),delete t.source,t))}function v$(e){if(e[f$]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)v$(t)}var zs=class e extends Qxe{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=k$(g$(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 p$(t)]}else if(t.selector)t=[new tV(t)];else if(t.name)t=[new oV(t)];else if(t.text)t=[new h$(t)];else throw new Error("Unknown node type in node creation");return t.map(n=>(n[m$]||e.rebuild(n),n=n.proxyOf,n.parent&&n.parent.removeChild(n),n[f$]&&v$(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]}};zs.registerParse=e=>{g$=e};zs.registerRule=e=>{tV=e};zs.registerAtRule=e=>{oV=e};zs.registerRoot=e=>{b$=e};y$.exports=zs;zs.default=zs;zs.rebuild=e=>{e.type==="atrule"?Object.setPrototypeOf(e,oV.prototype):e.type==="rule"?Object.setPrototypeOf(e,tV.prototype):e.type==="decl"?Object.setPrototypeOf(e,p$.prototype):e.type==="comment"?Object.setPrototypeOf(e,h$.prototype):e.type==="root"&&Object.setPrototypeOf(e,b$.prototype),e[m$]=!0,e.nodes&&e.nodes.forEach(t=>{zs.rebuild(t)})}});var x$=se((ZHe,S$)=>{"use strict";var bB=/[\t\n\f\r "#'()/;[\\\]{}]/g,kB=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Jxe=/.[\r\n"'(/\\]/,_$=/[\da-f]/i;S$.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 _(P){throw t.error("Unclosed "+P,b)}function S(){return v.length===0&&b>=g}function C(P){if(v.length)return v.pop();if(b>=g)return;let R=P?P.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||R){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||Jxe.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||R){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:{bB.lastIndex=b+1,bB.test(r),bB.lastIndex===0?s=r.length-1:s=bB.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,_$.test(r.charAt(s)))){for(;_$.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||R?s=r.length:_("comment")),p=["comment",r.slice(b,s+1),b,s],b=s):(kB.lastIndex=b+1,kB.test(r),kB.lastIndex===0?s=r.length-1:s=kB.lastIndex-2,p=["word",r.slice(b,s+1),b,s],k.push(p),b=s);break}}return b++,p}function B(P){v.push(P)}return{back:B,endOfFile:S,nextToken:C,position:y}}});var B$=se((XHe,C$)=>{"use strict";var w$=Sm(),ig=class extends w${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)}};C$.exports=ig;ig.default=ig;w$.registerAtRule(ig)});var vB=se((QHe,P$)=>{"use strict";var E$=Sm(),T$,I$,Zu=class extends E${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 T$(new I$,this,t).stringify()}};Zu.registerLazyResult=e=>{T$=e};Zu.registerProcessor=e=>{I$=e};P$.exports=Zu;Zu.default=Zu;E$.registerRoot(Zu)});var O$=se((JHe,R$)=>{"use strict";var t_={comma(e){return t_.split(e,[","],!0)},space(e){let t=[" ",` |
| 24 |
`," "];return t_.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}};R$.exports=t_;t_.default=t_});var N$=se((eGe,L$)=>{"use strict";var A$=Sm(),ewe=O$(),sg=class extends A${constructor(t){super(t),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return ewe.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)}};L$.exports=sg;sg.default=sg;A$.registerRule(sg)});var F$=se((tGe,V$)=>{"use strict";var twe=J5(),owe=x$(),rwe=eV(),nwe=B$(),iwe=vB(),M$=N$(),D$={empty:!0,space:!0};function swe(e){for(let t=e.length-1;t>=0;t--){let o=e[t],r=o[3]||o[2];if(r)return r}}var rV=class{constructor(t){this.input=t,this.root=new iwe,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 nwe;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 rwe;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=owe(this.input)}decl(t,o){let r=new twe;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]||swe(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 M$;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",!D$[f]&&!D$[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 M$;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})}};V$.exports=rV});var nV=se((oGe,z$)=>{"use strict";var awe=Sm(),lwe=F$(),cwe=W5();function yB(e,t){let o=new cwe(e,t),r=new lwe(o);try{r.parse()}catch(n){throw n}return r.root}z$.exports=yB;yB.default=yB;awe.registerParse(yB)});var U$=se((rGe,j$)=>{"use strict";var o_=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}};j$.exports=o_;o_.default=o_});var iV=se((nGe,H$)=>{"use strict";var uwe=U$(),r_=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 uwe(t,o);return this.messages.push(r),r}warnings(){return this.messages.filter(t=>t.type==="warning")}get content(){return this.css}};H$.exports=r_;r_.default=r_});var W$=se((sGe,G$)=>{"use strict";var dwe=K5(),fwe=mB(),iGe=Z5(),mwe=nV(),pwe=iV(),n_=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=fwe;this.result=new pwe(this._processor,n,this._opts),this.result.css=o;let s=this;Object.defineProperty(this.result,"root",{get(){return s.root}});let a=new dwe(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=mwe;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"}};G$.exports=n_;n_.default=n_});var sV=se((aGe,Y$)=>{"use strict";var hwe=Sm(),$$,K$,xm=class extends hwe{constructor(t){super({type:"document",...t}),this.nodes||(this.nodes=[])}toResult(t={}){return new $$(new K$,this,t).stringify()}};xm.registerLazyResult=e=>{$$=e};xm.registerProcessor=e=>{K$=e};Y$.exports=xm;xm.default=xm});var J$=se((cGe,Q$)=>{"use strict";var{isClean:Ra,my:gwe}=pB(),bwe=K5(),kwe=mB(),vwe=Sm(),ywe=sV(),lGe=Z5(),q$=iV(),_we=nV(),Swe=vB(),xwe={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},wwe={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},Cwe={Once:!0,postcssPlugin:!0,prepare:!0},ag=0;function i_(e){return typeof e=="object"&&typeof e.then=="function"}function X$(e){let t=!1,o=xwe[e.type];return e.type==="decl"?t=e.prop.toLowerCase():e.type==="atrule"&&(t=e.name.toLowerCase()),t&&e.append?[o,o+"-"+t,ag,o+"Exit",o+"Exit-"+t]:t?[o,o+"-"+t,o+"Exit",o+"Exit-"+t]:e.append?[o,ag,o+"Exit"]:[o,o+"Exit"]}function Z$(e){let t;return e.type==="document"?t=["Document",ag,"DocumentExit"]:e.type==="root"?t=["Root",ag,"RootExit"]:t=X$(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function aV(e){return e[Ra]=!1,e.nodes&&e.nodes.forEach(t=>aV(t)),e}var lV={},Xu=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=aV(o);else if(o instanceof e||o instanceof q$)n=aV(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=_we;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[gwe]&&vwe.rebuild(n)}this.result=new q$(t,n,r),this.helpers={...lV,postcss:lV,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(!wwe[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${o.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Cwe[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(i_(r))try{await r}catch(n){throw this.handleError(n)}}if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[Ra];){t[Ra]=!0;let o=[Z$(t)];for(;o.length>0;){let r=this.visitTick(o);if(i_(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 i_(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=kwe;t.syntax&&(o=t.syntax.stringify),t.stringifier&&(o=t.stringifier),o.stringify&&(o=o.stringify);let n=new bwe(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(i_(o))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[Ra];)t[Ra]=!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(i_(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[Ra]){a[Ra]=!0,t.push(Z$(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===ag){r.nodes&&r.nodes.length&&(r[Ra]=!0,o.iterator=r.getIterator());return}else if(this.listeners[s]){o.visitors=this.listeners[s];return}}t.pop()}walkSync(t){t[Ra]=!0;let o=X$(t);for(let r of o)if(r===ag)t.nodes&&t.each(n=>{n[Ra]||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"}};Xu.registerPostcss=e=>{lV=e};Q$.exports=Xu;Xu.default=Xu;Swe.registerLazyResult(Xu);ywe.registerLazyResult(Xu)});var tK=se((uGe,eK)=>{"use strict";var Bwe=W$(),Ewe=J$(),Twe=sV(),Iwe=vB(),wm=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 Bwe(this,t,o):new Ewe(this,t,o)}use(t){return this.plugins=this.plugins.concat(this.normalize([t])),this}};eK.exports=wm;wm.default=wm;Iwe.registerProcessor(wm);Twe.registerProcessor(wm)});var nK=se((dGe,rK)=>{rK.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&&oK(s.source.input.file,n)||i.length&&s.source.input.file&&!oK(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&&Pwe(u,t.exclude)?u:t.transform?t.transform(o,u,r+u,s.source.input.file,a):r+u))})}};function oK(e,t){return t.some(o=>o instanceof RegExp?o.test(e):e.includes(o))}function Pwe(e,t){return t.some(o=>o instanceof RegExp?o.test(e):e===o)}});var sK=se((fGe,iK)=>{var cV=40,uV=41,_B=39,dV=34,fV=92,lg=47,mV=44,pV=58,SB=42,Rwe=117,Owe=85,Awe=43,Lwe=/^[a-f0-9?-]+$/i;iK.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===uV&&g?y=s:i&&i.type==="div"?(i.after=s,i.sourceEndIndex+=s.length):m===mV||m===pV||m===lg&&o.charCodeAt(r+1)!==SB&&(!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===_B||m===dV){r=f,n=m===_B?"'":'"',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)===fV;)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===lg&&o.charCodeAt(f+1)===SB)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===lg||m===SB)&&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===lg||m===mV||m===pV)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(cV===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!==_B&&m!==dV){r-=1;do if(a=!1,r=o.indexOf(")",r+1),~r)for(c=r;o.charCodeAt(c-1)===fV;)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(uV===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===fV&&(r+=1),r+=1,m=o.charCodeAt(r);while(r<h&&!(m<=32||m===_B||m===dV||m===mV||m===pV||m===lg||m===cV||m===SB&&b&&b.type==="function"&&b.value==="calc"||m===lg&&b.type==="function"&&b.value==="calc"||m===uV&&g));s=o.slice(f,r),cV===m?k=s:(Rwe===s.charCodeAt(0)||Owe===s.charCodeAt(0))&&Awe===s.charCodeAt(1)&&Lwe.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 lK=se((mGe,aK)=>{aK.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 fK=se((pGe,dK)=>{function cK(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=uK(e.nodes,t),o!=="function"?n:r+"("+(e.before||"")+n+(e.after||"")+(e.unclosed?"":")")):r}function uK(e,t){var o,r;if(Array.isArray(e)){for(o="",r=e.length-1;~r;r-=1)o=cK(e[r],t)+o;return o}return cK(e,t)}dK.exports=uK});var pK=se((hGe,mK)=>{var xB=45,wB=43,hV=46,Nwe=101,Mwe=69;function Dwe(e){var t=e.charCodeAt(0),o;if(t===wB||t===xB){if(o=e.charCodeAt(1),o>=48&&o<=57)return!0;var r=e.charCodeAt(2);return o===hV&&r>=48&&r<=57}return t===hV?(o=e.charCodeAt(1),o>=48&&o<=57):t>=48&&t<=57}mK.exports=function(e){var t=0,o=e.length,r,n,i;if(o===0||!Dwe(e))return!1;for(r=e.charCodeAt(t),(r===wB||r===xB)&&t++;t<o&&(r=e.charCodeAt(t),!(r<48||r>57));)t+=1;if(r=e.charCodeAt(t),n=e.charCodeAt(t+1),r===hV&&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===Nwe||r===Mwe)&&(n>=48&&n<=57||(n===wB||n===xB)&&i>=48&&i<=57))for(t+=n===wB||n===xB?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 kK=se((gGe,bK)=>{var Vwe=sK(),hK=lK(),gK=fK();function Qu(e){return this instanceof Qu?(this.nodes=Vwe(e),this):new Qu(e)}Qu.prototype.toString=function(){return Array.isArray(this.nodes)?gK(this.nodes):""};Qu.prototype.walk=function(e,t){return hK(this.nodes,e,t),this};Qu.unit=pK();Qu.walk=hK;Qu.stringify=gK;bK.exports=Qu});var yK=se((bGe,gV)=>{var vK=kK();gV.exports=e=>{let o=Object.assign({skipHostRelativeUrls:!0},e);return{postcssPlugin:"rebaseUrl",Declaration(r){let n=vK(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=vK.stringify(n))}}};gV.exports.postcss=!0});var AK=se((RGe,OK)=>{OK.exports=window.wp.priorityQueue});var LV=se((w$e,AY)=>{AY.exports=window.wp.blob});var S_=se((YYe,Uq)=>{Uq.exports=window.wp.isShallowEqual});var BT=se((rJe,AQ)=>{AQ.exports=window.wp.tokenList});var R3=se((hJe,KQ)=>{"use strict";var yEe=function(t){return _Ee(t)&&!SEe(t)};function _Ee(e){return!!e&&typeof e=="object"}function SEe(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||CEe(e)}var xEe=typeof Symbol=="function"&&Symbol.for,wEe=xEe?Symbol.for("react.element"):60103;function CEe(e){return e.$$typeof===wEe}function BEe(e){return Array.isArray(e)?[]:{}}function $_(e,t){return t.clone!==!1&&t.isMergeableObject(e)?Xg(BEe(e),e,t):e}function EEe(e,t,o){return e.concat(t).map(function(r){return $_(r,o)})}function TEe(e,t){if(!t.customMerge)return Xg;var o=t.customMerge(e);return typeof o=="function"?o:Xg}function IEe(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}function WQ(e){return Object.keys(e).concat(IEe(e))}function $Q(e,t){try{return t in e}catch{return!1}}function PEe(e,t){return $Q(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))}function REe(e,t,o){var r={};return o.isMergeableObject(e)&&WQ(e).forEach(function(n){r[n]=$_(e[n],o)}),WQ(t).forEach(function(n){PEe(e,n)||($Q(e,n)&&o.isMergeableObject(t[n])?r[n]=TEe(n,o)(e[n],t[n],o):r[n]=$_(t[n],o))}),r}function Xg(e,t,o){o=o||{},o.arrayMerge=o.arrayMerge||EEe,o.isMergeableObject=o.isMergeableObject||yEe,o.cloneUnlessOtherwiseSpecified=$_;var r=Array.isArray(t),n=Array.isArray(e),i=r===n;return i?r?o.arrayMerge(e,t,o):REe(e,t,o):$_(t,o)}Xg.all=function(t,o){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(r,n){return Xg(r,n,o)},{})};var OEe=Xg;KQ.exports=OEe});var oee=se((qtt,tee)=>{tee.exports=window.wp.commands});var Cc=se((Sit,goe)=>{goe.exports=window.wp.date});var qoe=se((cst,Yoe)=>{var Hoe=!1,sp,I4,P4,GI,WI,Goe,$I,R4,O4,A4,Woe,L4,N4,$oe,Koe;function On(){if(!Hoe){Hoe=!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(L4=/\b(iPhone|iP[ao]d)/.exec(e),N4=/\b(iP[ao]d)/.exec(e),A4=/Android/i.exec(e),$oe=/FBAN\/\w+;/i.exec(e),Koe=/Mobile/i.exec(e),Woe=!!/Win64/.exec(e),t){sp=t[1]?parseFloat(t[1]):t[5]?parseFloat(t[5]):NaN,sp&&document&&document.documentMode&&(sp=document.documentMode);var r=/(?:Trident\/(\d+.\d+))/.exec(e);Goe=r?parseFloat(r[1])+4:sp,I4=t[2]?parseFloat(t[2]):NaN,P4=t[3]?parseFloat(t[3]):NaN,GI=t[4]?parseFloat(t[4]):NaN,GI?(t=/(?:Chrome\/(\d+\.\d+))/.exec(e),WI=t&&t[1]?parseFloat(t[1]):NaN):WI=NaN}else sp=I4=P4=WI=GI=NaN;if(o){if(o[1]){var n=/(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(e);$I=n?parseFloat(n[1].replace("_",".")):!0}else $I=!1;R4=!!o[2],O4=!!o[3]}else $I=R4=O4=!1}}var M4={ie:function(){return On()||sp},ieCompatibilityMode:function(){return On()||Goe>sp},ie64:function(){return M4.ie()&&Woe},firefox:function(){return On()||I4},opera:function(){return On()||P4},webkit:function(){return On()||GI},safari:function(){return M4.webkit()},chrome:function(){return On()||WI},windows:function(){return On()||R4},osx:function(){return On()||$I},linux:function(){return On()||O4},iphone:function(){return On()||L4},mobile:function(){return On()||L4||N4||A4||Koe},nativeApp:function(){return On()||$oe},android:function(){return On()||A4},ipad:function(){return On()||N4}};Yoe.exports=M4});var Xoe=se((ust,Zoe)=>{"use strict";var KI=!!(typeof window<"u"&&window.document&&window.document.createElement),_Ie={canUseDOM:KI,canUseWorkers:typeof Worker<"u",canUseEventListeners:KI&&!!(window.addEventListener||window.attachEvent),canUseViewport:KI&&!!window.screen,isInWorker:!KI};Zoe.exports=_Ie});var tre=se((dst,ere)=>{"use strict";var Qoe=Xoe(),Joe;Qoe.canUseDOM&&(Joe=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0);function SIe(e,t){if(!Qoe.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&&Joe&&e==="wheel"&&(r=document.implementation.hasFeature("Events.wheel","3.0")),r}ere.exports=SIe});var are=se((fst,sre)=>{"use strict";var xIe=qoe(),wIe=tre(),ore=10,rre=40,nre=800;function ire(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*ore,n=o*ore,"deltaY"in e&&(n=e.deltaY),"deltaX"in e&&(r=e.deltaX),(r||n)&&e.deltaMode&&(e.deltaMode==1?(r*=rre,n*=rre):(r*=nre,n*=nre)),r&&!t&&(t=r<1?-1:1),n&&!o&&(o=n<1?-1:1),{spinX:t,spinY:o,pixelX:r,pixelY:n}}ire.getEventType=function(){return xIe.firefox()?"DOMMouseScroll":wIe("wheel")?"wheel":"mousewheel"};sre.exports=ire});var cre=se((mst,lre)=>{lre.exports=are()});var Vne=se((nlt,Dne)=>{"use strict";Dne.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 _De={};ka(_De,{AlignmentControl:()=>_C,AlignmentToolbar:()=>I7,Autocomplete:()=>t9,BlockAlignmentControl:()=>VC,BlockAlignmentToolbar:()=>x9,BlockBindingsAttributeControl:()=>hy,BlockBindingsSourceFieldsList:()=>py,BlockBreadcrumb:()=>$9,BlockCanvas:()=>aee,BlockColorsStyleSelector:()=>dee,BlockContextProvider:()=>W0,BlockControls:()=>Dt,BlockEdit:()=>pC,BlockEditorKeyboardShortcuts:()=>$1,BlockEditorProvider:()=>$G,BlockFormatControls:()=>f3,BlockIcon:()=>Oe,BlockInspector:()=>Kle,BlockList:()=>dg,BlockMover:()=>KE,BlockNavigationDropdown:()=>yte,BlockPopover:()=>wq,BlockPreview:()=>Cn,BlockSelectionClearer:()=>Dq,BlockSettingsMenu:()=>vT,BlockSettingsMenuControls:()=>pT,BlockStyles:()=>kb,BlockTitle:()=>by,BlockToolbar:()=>UJ,BlockTools:()=>oS,BlockVerticalAlignmentControl:()=>LC,BlockVerticalAlignmentToolbar:()=>Ute,ButtonBlockAppender:()=>cd,ButtonBlockerAppender:()=>pq,ColorPalette:()=>uoe,ColorPaletteControl:()=>moe,ContrastChecker:()=>BI,CopyHandler:()=>Zle,DefaultBlockAppender:()=>Pg,DimensionControl:()=>Tb,FontSizePicker:()=>sD,HeadingLevelDropdown:()=>Ite,HeightControl:()=>Uoe,InnerBlocks:()=>w_,Inserter:()=>Ki,InspectorAdvancedControls:()=>pd,InspectorControls:()=>pe,JustifyContentControl:()=>Ih,JustifyToolbar:()=>Qre,LineHeightControl:()=>b2,LinkControl:()=>Wd,MediaPlaceholder:()=>vie,MediaReplaceFlow:()=>Ub,MediaUpload:()=>sd,MediaUploadCheck:()=>Ws,MultiSelectScrollIntoView:()=>ece,NavigableToolbar:()=>Kg,ObserveTyping:()=>lZ,PanelColorSettings:()=>_ie,PlainText:()=>vse,RecursionProvider:()=>a6,RichText:()=>Kb,RichTextShortcut:()=>kF,RichTextToolbarButton:()=>yF,SETTINGS_DEFAULTS:()=>gv,SkipToSelectedBlock:()=>$2,ToolSelector:()=>mce,Typewriter:()=>nce,URLInput:()=>Hd,URLInputButton:()=>Tse,URLPopover:()=>Yd,Warning:()=>Bu,WritingFlow:()=>rB,__experimentalBlockAlignmentMatrixControl:()=>V9,__experimentalBlockFullHeightAligmentControl:()=>L9,__experimentalBlockPatternSetup:()=>Fte,__experimentalBlockPatternsList:()=>Aa,__experimentalBlockVariationPicker:()=>Pte,__experimentalBlockVariationTransforms:()=>vI,__experimentalBorderRadiusControl:()=>wI,__experimentalColorGradientControl:()=>Dd,__experimentalColorGradientSettingsDropdown:()=>zI,__experimentalDateFormatPicker:()=>boe,__experimentalDuotoneControl:()=>TI,__experimentalFontAppearanceControl:()=>PI,__experimentalFontFamilyControl:()=>RI,__experimentalGetBorderClassesAndStyles:()=>eA,__experimentalGetColorClassesAndStyles:()=>tA,__experimentalGetDimensionsClassesAndStyles:()=>JO,__experimentalGetElementClassName:()=>kDe,__experimentalGetGapCSSValue:()=>vr,__experimentalGetGradientClass:()=>xh,__experimentalGetGradientObjectByGradientValue:()=>v7,__experimentalGetShadowClassesAndStyles:()=>Qz,__experimentalGetSpacingClassesAndStyles:()=>tj,__experimentalImageEditor:()=>Wre,__experimentalImageSizeControl:()=>qre,__experimentalImageURLInputUI:()=>Nse,__experimentalInspectorPopoverHeader:()=>qP,__experimentalLetterSpacingControl:()=>AI,__experimentalLibrary:()=>Qle,__experimentalLinkControl:()=>g2,__experimentalLinkControlSearchInput:()=>xne,__experimentalLinkControlSearchItem:()=>une,__experimentalLinkControlSearchResults:()=>gne,__experimentalListView:()=>hI,__experimentalPanelColorGradientSettings:()=>UI,__experimentalPreviewOptions:()=>Xse,__experimentalPublishDateTimePicker:()=>cce,__experimentalRecursionProvider:()=>ice,__experimentalResponsiveBlockControl:()=>wse,__experimentalSpacingSizesControl:()=>rk,__experimentalTextDecorationControl:()=>NI,__experimentalTextTransformControl:()=>DI,__experimentalUnitControl:()=>Bse,__experimentalUseBlockOverlayActive:()=>Y9,__experimentalUseBlockPreview:()=>VK,__experimentalUseBorderProps:()=>Xz,__experimentalUseColorProps:()=>ej,__experimentalUseCustomSides:()=>Pz,__experimentalUseGradient:()=>Zye,__experimentalUseHasRecursion:()=>sce,__experimentalUseMultipleOriginColorsAndGradients:()=>Fd,__experimentalUseResizeCanvas:()=>Qse,__experimentalWritingModeControl:()=>FI,__unstableBlockSettingsMenuFirstItem:()=>rT,__unstableBlockToolbarLastItem:()=>QE,__unstableEditorStyles:()=>Gl,__unstableIframe:()=>rg,__unstableInserterMenuExtension:()=>qB,__unstableRichTextInputEvent:()=>_F,__unstableUseBlockSelectionClearer:()=>Lm,__unstableUseClipboardHandler:()=>qle,__unstableUseMouseMoveTypingReset:()=>B_,__unstableUseTypewriter:()=>n6,__unstableUseTypingObserver:()=>E_,createCustomColorsHOC:()=>b7,getColorClassName:()=>Bi,getColorObjectByAttributeValues:()=>va,getColorObjectByColorValue:()=>H0,getComputedFluidTypographyValue:()=>S7,getCustomValueFromPreset:()=>n9,getDimensionsClassesAndStyles:()=>JO,getFontSize:()=>wh,getFontSizeClass:()=>Eu,getFontSizeObjectByValue:()=>iD,getGradientSlugByValue:()=>y7,getGradientValueBySlug:()=>vC,getPxFromCssUnit:()=>Ehe,getSpacingPresetCssVar:()=>uy,getTypographyClassesAndStyles:()=>oj,isValueSpacingPreset:()=>AC,privateApis:()=>dj,store:()=>x,storeConfig:()=>yh,transformStyles:()=>cg,useBlockBindingsUtils:()=>Nl,useBlockCommands:()=>XT,useBlockDisplayInformation:()=>It,useBlockEditContext:()=>Ie,useBlockEditingMode:()=>po,useBlockProps:()=>jy,useCachedTruthy:()=>rj,useHasRecursion:()=>l6,useInnerBlocksProps:()=>Fm,useSetting:()=>m7,useSettings:()=>he,useStyleOverride:()=>oi,withColorContext:()=>CI,withColors:()=>k7,withFontSizes:()=>E7});function mj(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=mj(e[t]))&&(r&&(r+=" "),r+=o)}else for(o in e)e[o]&&(r&&(r+=" "),r+=o);return r}function Jhe(){for(var e,t,o=0,r="",n=arguments.length;o<n;o++)(e=arguments[o])&&(t=mj(e))&&(r&&(r+=" "),r+=t);return r}var V=Jhe;var pce=l($(),1),ms=l(O(),1),QP=l(z(),1),f6=l(X(),1),ZS=l(pt(),1);var V0=l(O(),1),ws=Symbol("mayDisplayControls"),Qp=Symbol("mayDisplayParentControls"),nu=Symbol("mayDisplayPatternEditingControls"),F0=Symbol("blockEditingMode"),Jp=Symbol("blockBindings"),z0=Symbol("isPreviewMode"),fv=Symbol("isInListViewBlockSupportTree"),uA={name:"",isSelected:!1},dA=(0,V0.createContext)(uA);dA.displayName="BlockEditContext";var{Provider:j0}=dA;function Ie(){return(0,V0.useContext)(dA)}var ege={grad:.9,turn:360,rad:360/(2*Math.PI)},Sl=function(e){return typeof e=="string"?e.length>0:typeof e=="number"},Jo=function(e,t,o){return t===void 0&&(t=0),o===void 0&&(o=Math.pow(10,t)),Math.round(o*e)/o+0},Ci=function(e,t,o){return t===void 0&&(t=0),o===void 0&&(o=1),e>o?o:e>t?e:t},Bj=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},vj=function(e){return{r:Ci(e.r,0,255),g:Ci(e.g,0,255),b:Ci(e.b,0,255),a:Ci(e.a)}},fA=function(e){return{r:Jo(e.r),g:Jo(e.g),b:Jo(e.b),a:Jo(e.a,3)}},tge=/^#([0-9a-f]{3,8})$/i,U0=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},Ej=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}},Tj=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}},yj=function(e){return{h:Bj(e.h),s:Ci(e.s,0,100),l:Ci(e.l,0,100),a:Ci(e.a)}},_j=function(e){return{h:Jo(e.h),s:Jo(e.s),l:Jo(e.l),a:Jo(e.a,3)}},Sj=function(e){return Tj((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},mv=function(e){return{h:(t=Ej(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},oge=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,rge=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,nge=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,ige=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,hA={string:[[function(e){var t=tge.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?Jo(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?Jo(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=nge.exec(e)||ige.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:vj({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=oge.exec(e)||rge.exec(e);if(!t)return null;var o,r,n=yj({h:(o=t[1],r=t[2],r===void 0&&(r="deg"),Number(o)*(ege[r]||1)),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)});return Sj(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 Sl(t)&&Sl(o)&&Sl(r)?vj({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(!Sl(t)||!Sl(o)||!Sl(r))return null;var s=yj({h:Number(t),s:Number(o),l:Number(r),a:Number(i)});return Sj(s)},"hsl"],[function(e){var t=e.h,o=e.s,r=e.v,n=e.a,i=n===void 0?1:n;if(!Sl(t)||!Sl(o)||!Sl(r))return null;var s=(function(a){return{h:Bj(a.h),s:Ci(a.s,0,100),v:Ci(a.v,0,100),a:Ci(a.a)}})({h:Number(t),s:Number(o),v:Number(r),a:Number(i)});return Tj(s)},"hsv"]]},xj=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]},sge=function(e){return typeof e=="string"?xj(e.trim(),hA.string):typeof e=="object"&&e!==null?xj(e,hA.object):[null,void 0]};var mA=function(e,t){var o=mv(e);return{h:o.h,s:Ci(o.s+100*t,0,100),l:o.l,a:o.a}},pA=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},wj=function(e,t){var o=mv(e);return{h:o.h,s:o.s,l:Ci(o.l+100*t,0,100),a:o.a}},gA=(function(){function e(t){this.parsed=sge(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 Jo(pA(this.rgba),2)},e.prototype.isDark=function(){return pA(this.rgba)<.5},e.prototype.isLight=function(){return pA(this.rgba)>=.5},e.prototype.toHex=function(){return t=fA(this.rgba),o=t.r,r=t.g,n=t.b,s=(i=t.a)<1?U0(Jo(255*i)):"","#"+U0(o)+U0(r)+U0(n)+s;var t,o,r,n,i,s},e.prototype.toRgb=function(){return fA(this.rgba)},e.prototype.toRgbString=function(){return t=fA(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 _j(mv(this.rgba))},e.prototype.toHslString=function(){return t=_j(mv(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=Ej(this.rgba),{h:Jo(t.h),s:Jo(t.s),v:Jo(t.v),a:Jo(t.a,3)};var t},e.prototype.invert=function(){return Et({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),Et(mA(this.rgba,t))},e.prototype.desaturate=function(t){return t===void 0&&(t=.1),Et(mA(this.rgba,-t))},e.prototype.grayscale=function(){return Et(mA(this.rgba,-1))},e.prototype.lighten=function(t){return t===void 0&&(t=.1),Et(wj(this.rgba,t))},e.prototype.darken=function(t){return t===void 0&&(t=.1),Et(wj(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"?Et({r:(o=this.rgba).r,g:o.g,b:o.b,a:t}):Jo(this.rgba.a,3);var o},e.prototype.hue=function(t){var o=mv(this.rgba);return typeof t=="number"?Et({h:t,s:o.s,l:o.l,a:o.a}):Jo(o.h)},e.prototype.isEqual=function(t){return this.toHex()===Et(t).toHex()},e})(),Et=function(e){return e instanceof gA?e:new gA(e)},Cj=[],iu=function(e){e.forEach(function(t){Cj.indexOf(t)<0&&(t(gA,hA),Cj.push(t))})};function su(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 bA=function(e){var t=e/255;return t<.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)},kA=function(e){return .2126*bA(e.r)+.7152*bA(e.g)+.0722*bA(e.b)};function eh(e){e.prototype.luminance=function(){return t=kA(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=kA(i),c=kA(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 Aj=l(A(),1);var Rj=l(vA(),1),{lock:Oj,unlock:F}=(0,Rj.__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");iu([su,eh]);var{kebabCase:age}=F(Aj.privateApis),va=(e,t,o)=>{if(t){let r=e?.find(n=>n.slug===t);if(r)return r}return{color:o}},H0=(e,t)=>e?.find(o=>o.color===t);function Bi(e,t){if(!(!e||!t))return`has-${age(t)}-${e}`}function Lj(e,t){let o=Et(t),r=({color:i})=>o.contrast(i),n=Math.max(...e.map(r));return e.find(i=>r(i)===n).color}var hC=l(O(),1),im=l(X(),1),h7=l(A(),1);var d7=l(z(),1),f7=l(Pe(),1);var mC=l(O(),1),fC=l($(),1);var xl=l($(),1),Hj=l(A(),1),hv=l(z(),1),Vf=l(O(),1);var th=l(O(),1),Dj=l(w(),1),G0=(0,th.createContext)({});G0.displayName="BlockContext";function W0({value:e,children:t}){let o=(0,th.useContext)(G0),r=(0,th.useMemo)(()=>({...o,...e}),[o,e]);return(0,Dj.jsx)(G0.Provider,{value:r,children:t})}var Pr=G0;var oh=l(bn(),1);function Nf(e){return e?.startsWith("#")&&(0,oh.isValidFragment)(e)}function Mf(e){return e?.startsWith("/")||e?.startsWith("./")||e?.startsWith("../")}function Df(e){if(e.includes(" "))return!1;let o=(0,oh.getProtocol)(e),r=(0,oh.isValidProtocol)(o),n=lge(e),i=e?.startsWith("www.");return r||i||Nf(e)||n||Mf(e)}function lge(e,t=6){let o=e.split(/[?#]/)[0];return new RegExp(`(?<=\\S)\\.(?:[a-zA-Z_]{2,${t}})(?:\\/|$)`).test(o)}var cge="__default",Fj="core/pattern-overrides";function pv(e){return e?.[cge]?.source===Fj}function zj(e,t){if(pv(e)){let o={};for(let r of t){let n=e[r]?e[r]:{source:Fj};o[r]=n}return o}return e}var jj=l(O(),1),pr=(0,jj.createContext)({});pr.displayName="PrivateBlockContext";var $0=l(w(),1),uge={},dge=e=>{let{name:t}=e,o=(0,xl.getBlockType)(t);if(!o)return null;let r=o.edit||o.save;return(0,$0.jsx)(r,{...e})},Uj=(0,Hj.withFilters)("editor.BlockEdit")(dge),fge=e=>{let{name:t,clientId:o,attributes:r,setAttributes:n}=e,i=(0,hv.useRegistry)(),s=(0,xl.getBlockType)(t),a=(0,Vf.useContext)(Pr),c=(0,hv.useSelect)(k=>F(k(xl.store)).getAllBlockBindingsSources(),[]),{bindableAttributes:u}=(0,Vf.useContext)(pr),{blockBindings:d,context:f,hasPatternOverrides:m}=(0,Vf.useMemo)(()=>{let k=s?.usesContext?Object.fromEntries(Object.entries(a).filter(([v])=>s.usesContext.includes(v))):uge;return r?.metadata?.bindings&&Object.values(r?.metadata?.bindings||{}).forEach(v=>{c[v?.source]?.usesContext?.forEach(y=>{k[y]=a[y]})}),{blockBindings:zj(r?.metadata?.bindings,u),context:k,hasPatternOverrides:pv(r?.metadata?.bindings)}},[s?.usesContext,a,r?.metadata?.bindings,u,c]),h=(0,hv.useSelect)(k=>{if(!d)return r;let v={},y=new Map;for(let[_,S]of Object.entries(d)){let{source:C,args:B}=S,P=c[C];!P||!u?.includes(_)||y.set(P,{...y.get(P),[_]:{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,P]of Object.entries(C))B==="url"&&(!P||!Df(P))?v[B]=null:v[B]=P}return{...r,...v}},[r,u,d,o,f,c]),p=(0,Vf.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],P=c[B?.source];P?.setValues&&(y.set(P,{...y.get(P),[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,$0.jsx)(Uj,{...e,attributes:h,context:f,setAttributes:p});let g=(0,xl.hasBlockSupport)(s,"className",!0)?(0,xl.getBlockDefaultClassName)(t):null,b=V(g,r?.className,e.className);return(0,$0.jsx)(Uj,{...e,attributes:h,className:b,context:f,setAttributes:p})},Gj=fge;var l7=l($(),1),nD=l(A(),1),c7=l(z(),1),dC=l(N(),1);var uC=l(z(),1);var kv=l(Ff(),1),SA=l(X(),1),vv=l(z(),1),Jj=l(Pe(),1),ox=l($(),1);var Me=l(N(),1),Kj={insertUsage:{}},gv={alignWide:!1,supportsLayout:!0,colors:[{name:(0,Me.__)("Black"),slug:"black",color:"#000000"},{name:(0,Me.__)("Cyan bluish gray"),slug:"cyan-bluish-gray",color:"#abb8c3"},{name:(0,Me.__)("White"),slug:"white",color:"#ffffff"},{name:(0,Me.__)("Pale pink"),slug:"pale-pink",color:"#f78da7"},{name:(0,Me.__)("Vivid red"),slug:"vivid-red",color:"#cf2e2e"},{name:(0,Me.__)("Luminous vivid orange"),slug:"luminous-vivid-orange",color:"#ff6900"},{name:(0,Me.__)("Luminous vivid amber"),slug:"luminous-vivid-amber",color:"#fcb900"},{name:(0,Me.__)("Light green cyan"),slug:"light-green-cyan",color:"#7bdcb5"},{name:(0,Me.__)("Vivid green cyan"),slug:"vivid-green-cyan",color:"#00d084"},{name:(0,Me.__)("Pale cyan blue"),slug:"pale-cyan-blue",color:"#8ed1fc"},{name:(0,Me.__)("Vivid cyan blue"),slug:"vivid-cyan-blue",color:"#0693e3"},{name:(0,Me.__)("Vivid purple"),slug:"vivid-purple",color:"#9b51e0"}],fontSizes:[{name:(0,Me._x)("Small","font size name"),size:13,slug:"small"},{name:(0,Me._x)("Normal","font size name"),size:16,slug:"normal"},{name:(0,Me._x)("Medium","font size name"),size:20,slug:"medium"},{name:(0,Me._x)("Large","font size name"),size:36,slug:"large"},{name:(0,Me._x)("Huge","font size name"),size:42,slug:"huge"}],imageDefaultSize:"large",imageSizes:[{slug:"thumbnail",name:(0,Me.__)("Thumbnail")},{slug:"medium",name:(0,Me.__)("Medium")},{slug:"large",name:(0,Me.__)("Large")},{slug:"full",name:(0,Me.__)("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,Me.__)("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,Me.__)("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,Me.__)("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,Me.__)("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,Me.__)("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,Me.__)("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,Me.__)("Blush light purple"),gradient:"linear-gradient(135deg,rgb(255,206,236) 0%,rgb(152,150,240) 100%)",slug:"blush-light-purple"},{name:(0,Me.__)("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,Me.__)("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,Me.__)("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,Me.__)("Electric grass"),gradient:"linear-gradient(135deg,rgb(202,248,128) 0%,rgb(113,206,126) 100%)",slug:"electric-grass"},{name:(0,Me.__)("Midnight"),gradient:"linear-gradient(135deg,rgb(2,3,129) 0%,rgb(40,116,252) 100%)",slug:"midnight"}],__unstableResolvedAssets:{styles:[],scripts:[]}};function K0(e,t,o){return[...e.slice(0,o),...Array.isArray(t)?t:[t],...e.slice(o)]}function Y0(e,t,o,r=1){let n=[...e];return n.splice(t,r),K0(n,e.slice(t,t+r),o)}var Ei=Symbol("globalStylesDataKey"),q0=Symbol("globalStylesLinks"),au=Symbol("selectBlockPatternsKey"),Z0=Symbol("reusableBlocksSelect"),lu=Symbol("sectionRootClientIdKey"),X0=Symbol("mediaEditKey"),Q0=Symbol("getMediaSelect"),cu=Symbol("isIsolatedEditor"),Ti=Symbol("deviceTypeKey"),J0=Symbol("isNavigationOverlayContext"),Yj=Symbol("isNavigationPostEditor"),ex=Symbol("mediaUploadOnSuccess");var{isContentBlock:mge}=F(ox.privateApis),pge=e=>e;function tx(e,t=""){let o=new Map,r=[];return o.set(t,r),e.forEach(n=>{let{clientId:i,innerBlocks:s}=n;r.push(i),tx(s,i).forEach((a,c)=>{o.set(c,a)})}),o}function yA(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=pge){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 qj(e){return e8(e,t=>{let{attributes:o,...r}=t;return r})}function Zj(e){return e8(e,t=>t.attributes)}function hge(e,t){return(0,kv.default)(Object.keys(e),Object.keys(t))}function gge(e,t){return e.type==="UPDATE_BLOCK_ATTRIBUTES"&&t!==void 0&&t.type==="UPDATE_BLOCK_ATTRIBUTES"&&(0,kv.default)(e.clientIds,t.clientIds)&&hge(e.attributes,t.attributes)}function Xj(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 uu(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[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 bge=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),Xj(r,o.blocks),uu(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)}),uu(r,[o.clientId],!1);break;case"SYNC_DERIVED_BLOCK_ATTRIBUTES":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)})}),uu(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)}),Xj(r,o.blocks),uu(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)}uu(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)}),uu(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),uu(r,i,!0);break}case"MOVE_BLOCKS_UP":case"MOVE_BLOCKS_DOWN":{let i=[o.rootClientId?o.rootClientId:""];r.tree=new Map(r.tree),uu(r,i,!0);break}}return r};function kge(e){let t,o=!1,r;return(n,i)=>{let s=e(n,i),a;if(i.type==="SET_EXPLICIT_PERSISTENT"&&(r=i.isPersistentChange,a=n.isPersistentChange??!0),r!==void 0)return a=r,a===s.isPersistentChange?s:{...s,isPersistentChange:a};let c=i.type==="MARK_LAST_CHANGE_AS_PERSISTENT"||o;return n===s&&!c?(o=i.type==="MARK_NEXT_CHANGE_AS_NOT_PERSISTENT",a=n?.isPersistentChange??!0,n.isPersistentChange===a?n:{...s,isPersistentChange:a}):(s={...s,isPersistentChange:c?!o:!gge(i,t)},t=i,o=i.type==="MARK_NEXT_CHANGE_AS_NOT_PERSISTENT",s)}}function vge(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 yge=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)},_ge=e=>(t,o)=>{if(o.type==="RESET_BLOCKS"){let r=e(void 0,{type:"INSERT_BLOCKS",rootClientId:"",blocks:o.blocks}),n=t?.controlledInnerBlocks??{};if(t?.order)for(let s of Object.keys(n)){if(!n[s]||!r.byClientId.has(s))continue;r.controlledInnerBlocks[s]=!0;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 Object.keys(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)},Sge=e=>(t,o)=>{if(o.type!=="REPLACE_INNER_BLOCKS")return e(t,o);let r={};if(Object.keys(t.controlledInnerBlocks).length){let s=[...o.blocks];for(;s.length;){let{innerBlocks:a,...c}=s.shift();s.push(...a),t.controlledInnerBlocks[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},xge=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)},wge=(0,SA.pipe)(vv.combineReducers,bge,yge,Sge,_ge,kge,vge,xge)({byClientId(e=new Map,t){switch(t.type){case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":{let o=new Map(e);return qj(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)}),qj(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 Zj(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"SYNC_DERIVED_BLOCK_ATTRIBUTES":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)}),Zj(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=tx(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=tx(t.blocks,o),{index:i=r.length}=t,s=new Map(e);return n.forEach((a,c)=>{s.set(c,a)}),s.set(o,K0(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,Y0(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,K0(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,Y0(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,Y0(s,a,a+1,o.length)),c}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{let{clientIds:o}=t;if(!t.blocks)return e;let r=tx(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 yA(t.blocks).forEach(([r,n])=>{o.set(r,n)}),o}case"INSERT_BLOCKS":{let o=new Map(e);return yA(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)}),yA(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={},{type:t,clientId:o,hasControlledInnerBlocks:r}){return t==="SET_HAS_CONTROLLED_INNER_BLOCKS"?{...e,[o]:r}: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 Cge(e=!1,t){switch(t.type){case"HIDE_BLOCK_INTERFACE":return!0;case"SHOW_BLOCK_INTERFACE":return!1}return e}function Bge(e=!1,t){switch(t.type){case"START_TYPING":return!0;case"STOP_TYPING":return!1}return e}function Ege(e=!1,t){switch(t.type){case"START_DRAGGING":return!0;case"STOP_DRAGGING":return!1}return e}function Tge(e=[],t){switch(t.type){case"START_DRAGGING_BLOCKS":return t.clientIds;case"STOP_DRAGGING_BLOCKS":return[]}return e}function Ige(e={},t){return t.type==="SET_BLOCK_VISIBILITY"?{...e,...t.updates}:e}function Qj(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 Pge(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=Qj(e.selectionStart,t),r=Qj(e.selectionEnd,t);return o===e.selectionStart&&r===e.selectionEnd?e:{selectionStart:o,selectionEnd:r}}function Rge(e=!1,t){switch(t.type){case"START_MULTI_SELECT":return!0;case"STOP_MULTI_SELECT":return!1}return e}function Oge(e=!0,t){return t.type==="TOGGLE_SELECTION"?t.isSelectionEnabled:e}function Age(e=null,t){switch(t.type){case"SHOW_VIEWPORT_MODAL":return t.clientIds;case"HIDE_VIEWPORT_MODAL":return null}return e}function Lge(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 Nge(e=!1,t){return t.type==="SET_BLOCK_REMOVAL_RULES"?t.rules:e}function Mge(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 Dge(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 Vge(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,kv.default)(e,a)?e:a}case"HIDE_INSERTION_POINT":return null}return e}function Fge(e={isValid:!0},t){return t.type==="SET_TEMPLATE_VALIDITY"?{...e,isValid:t.isValid}:e}function zge(e=gv,t){if(t.type==="UPDATE_SETTINGS"){let o=t.reset?{...gv,...t.settings}:{...e,...t.settings};return Object.defineProperty(o,"__unstableIsPreviewMode",{get(){return(0,Jj.default)("__unstableIsPreviewMode",{since:"6.8",alternative:"isPreviewMode"}),this.isPreviewMode}}),o}return e}function jge(e=Kj,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,vv.select)(ox.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 Uge=(e={},t)=>{switch(t.type){case"REPLACE_BLOCKS":{let o=new Set,r=[...t.blocks];for(;r.length;){let n=r.shift();o.add(n.clientId),r.push(...n.innerBlocks)}return Object.fromEntries(Object.entries(e).filter(([n])=>!t.clientIds.includes(n)||o.has(n)))}case"REMOVE_BLOCKS":return Object.fromEntries(Object.entries(e).filter(([o])=>!t.clientIds.includes(o)));case"UPDATE_BLOCK_LIST_SETTINGS":{let o=typeof t.clientId=="string"?{[t.clientId]:t.settings}:t.clientId;for(let n in o)o[n]?(0,kv.default)(e[n],o[n])&&delete o[n]:e[n]||delete o[n];if(Object.keys(o).length===0)return e;let r={...e,...o};for(let n in o)o[n]||delete r[n];return r}}return e};function Hge(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 Gge(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 Wge(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 $ge(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 Kge(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 Yge(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 qge(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 Zge(e=[],t){return t.type==="REGISTER_INSERTER_MEDIA_CATEGORY"?[...e,t.category]:e}function Xge(e=!1,t){return t.type==="LAST_FOCUS"?t.lastFocus:e}function Qge(e=100,t){switch(t.type){case"SET_ZOOM_LEVEL":return t.zoom;case"RESET_ZOOM_LEVEL":return 100}return e}function Jge(e=null,t){switch(t.type){case"SET_INSERTION_POINT":return t.value;case"SELECT_BLOCK":return null}return e}function ebe(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 tbe(e=0,t){return t.type==="INCREMENT_LIST_VIEW_EXPAND_REVISION"?e+1:e}function obe(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 rbe(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 nbe=(0,vv.combineReducers)({blocks:wge,isDragging:Ege,isTyping:Bge,isBlockInterfaceHidden:Cge,draggedBlocks:Tge,selection:Pge,isMultiSelecting:Rge,isSelectionEnabled:Oge,initialPosition:Mge,blocksMode:Dge,blockListSettings:Uge,insertionPoint:Jge,insertionCue:Vge,template:Fge,settings:zge,preferences:jge,lastBlockAttributesChange:Hge,lastFocus:Xge,expandedBlock:$ge,highlightedBlock:Gge,lastBlockInserted:Kge,editedContentOnlySection:Yge,blockVisibility:Ige,viewportModalClientIds:Age,styleOverrides:qge,removalPromptData:Lge,blockRemovalRules:Nge,registeredInserterMediaCategories:Zge,zoomLevel:Qge,hasBlockSpotlight:Wge,openedListViewPanels:ebe,listViewExpandRevision:tbe,listViewContentPanelOpen:obe,requestedInspectorTab:rbe});function o8(e,t){if(t===""){let n=e.blocks.tree.get(t);return n?{clientId:"",...n}:void 0}if(!e.blocks.controlledInnerBlocks[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 xA(e,t,o){let r=o8(e,t);if(r&&(o(r),!!r?.innerBlocks?.length))for(let n of r?.innerBlocks)xA(e,n.clientId,o)}function bv(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 ibe(e){return e?.attributes?.metadata?.bindings&&Object.keys(e?.attributes?.metadata?.bindings).length}function _A(e,t=""){let o=e?.zoomLevel<100||e?.zoomLevel==="auto-scaled",r=new Map,n=e.settings?.[lu],i=e.blocks.order.get(n),s=Array.from(e.blocks.blockEditingModes).some(([,g])=>g==="disabled"),a=[],c=[];Object.keys(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=Object.keys(e.blockListSettings).filter(g=>e.blockListSettings[g]?.templateLock==="contentOnly"),d=e.settings?.[cu],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 xA(e,t,g=>{let{clientId:b,name:k}=g,v=!!e.editedContentOnlySection,y=!1;if(v&&(y=b===e.editedContentOnlySection||!!bv(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(bv(e,b,c)){r.set(b,"disabled");return}return}let _=bv(e,b,c);if(_){if(bv(e,_,c)){r.set(b,"disabled");return}if(ibe(g)){r.set(b,"contentOnly");return}r.set(b,"disabled");return}}if(v&&y){r.set(b,"default");return}p.length&&bv(e,b,p)&&(mge(k)?r.set(b,"contentOnly"):r.set(b,"disabled"))}}),r}function du({prevState:e,nextState:t,addedBlocks:o,removedClientIds:r}){let n=e.derivedBlockEditingModes,i;return r?.forEach(s=>{xA(e,s,a=>{n.has(a.clientId)&&(i||(i=new Map(n)),i.delete(a.clientId))})}),o?.forEach(s=>{let a=_A(t,s.clientId);a.size&&(i?i=new Map([...i?.size?i:[],...a]):i=new Map([...n?.size?n:[],...a]))}),i}function sbe(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=du({prevState:t,nextState:r,removedClientIds:o.clientIds});if(n)return{...r,derivedBlockEditingModes:n??t.derivedBlockEditingModes};break}case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":{let n=du({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=du({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[c]?.templateLock!=="contentOnly"&&r.blockListSettings[c]?.templateLock==="contentOnly",d=t.blockListSettings[c]?.templateLock==="contentOnly"&&r.blockListSettings[c]?.templateLock!=="contentOnly";u?n.push(r.blocks.tree.get(c)):d&&i.push(c)}if(!n.length&&!i.length)break;let a=du({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=o8(r,o.clientId);if(!n)break;let i=du({prevState:t,nextState:r,removedClientIds:[o.clientId],addedBlocks:[n]});if(i)return{...r,derivedBlockEditingModes:i??t.derivedBlockEditingModes};break}case"REPLACE_BLOCKS":{let n=du({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=du({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=du({prevState:t,nextState:r,addedBlocks:n,removedClientIds:o.clientIds});if(i)return{...r,derivedBlockEditingModes:i??t.derivedBlockEditingModes};break}case"UPDATE_SETTINGS":{if(t?.settings?.[lu]!==r?.settings?.[lu]||!!t?.settings?.disableContentOnlyForUnsyncedPatterns!=!!r?.settings?.disableContentOnlyForUnsyncedPatterns||!!t?.settings?.[cu]!=!!r?.settings?.[cu]||!!t?.settings?.disableContentOnlyForTemplateParts!=!!r?.settings?.disableContentOnlyForTemplateParts)return{...r,derivedBlockEditingModes:_A(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:_A(r)}}return r.derivedBlockEditingModes=t?.derivedBlockEditingModes??new Map,r}}function abe(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 r8=(0,SA.pipe)(sbe,abe)(nbe);var XM={};ka(XM,{__experimentalGetActiveBlockIdByBlockNames:()=>sve,__experimentalGetAllowedBlocks:()=>Gke,__experimentalGetAllowedPatterns:()=>Yke,__experimentalGetBlockListSettingsForBlocks:()=>Jke,__experimentalGetDirectInsertBlock:()=>Wke,__experimentalGetGlobalBlocksByName:()=>tke,__experimentalGetLastBlockAttributeChanges:()=>ove,__experimentalGetParsedPattern:()=>$ke,__experimentalGetPatternTransformItems:()=>Xke,__experimentalGetPatternsByBlockTypes:()=>Zke,__experimentalGetReusableBlockTitle:()=>eve,__unstableGetBlockWithoutInnerBlocks:()=>Qbe,__unstableGetClientIdWithClientIdsTree:()=>B8,__unstableGetClientIdsTree:()=>E8,__unstableGetContentLockingParent:()=>pve,__unstableGetSelectedBlocksWithPartialSelection:()=>xke,__unstableGetTemporarilyEditingAsBlocks:()=>hve,__unstableGetVisibleBlocks:()=>uve,__unstableHasActiveBlockOverlayActive:()=>U8,__unstableIsFullySelected:()=>vke,__unstableIsLastBlockChangeIgnored:()=>tve,__unstableIsSelectionCollapsed:()=>yke,__unstableIsSelectionMergeable:()=>Ske,__unstableIsWithinBlockOverlay:()=>dve,__unstableSelectionHasUnmergeableBlock:()=>_ke,areInnerBlocksControlled:()=>aC,canEditBlock:()=>F8,canInsertBlockType:()=>om,canInsertBlocks:()=>Dke,canLockBlockType:()=>Fke,canMoveBlock:()=>V8,canMoveBlocks:()=>Vke,canRemoveBlock:()=>$M,canRemoveBlocks:()=>D8,didAutomaticChange:()=>nve,getAdjacentBlockClientId:()=>UM,getAllowedBlocks:()=>FM,getBlock:()=>Pl,getBlockAttributes:()=>Oi,getBlockCount:()=>rke,getBlockEditingMode:()=>Ai,getBlockHierarchyRootClientId:()=>cke,getBlockIndex:()=>O8,getBlockInsertionPoint:()=>Ake,getBlockListSettings:()=>ZM,getBlockMode:()=>Tke,getBlockName:()=>ht,getBlockNamesByClientId:()=>oke,getBlockOrder:()=>Rr,getBlockParents:()=>Ts,getBlockParentsByBlockName:()=>jM,getBlockRootClientId:()=>Lo,getBlockSelectionEnd:()=>ike,getBlockSelectionStart:()=>nke,getBlockTransformItems:()=>Uke,getBlocks:()=>Jbe,getBlocksByClientId:()=>sC,getBlocksByName:()=>I8,getClientIdsOfDescendants:()=>T8,getClientIdsWithDescendants:()=>ph,getDirectInsertBlock:()=>j8,getDraggedBlockClientIds:()=>Pke,getFirstMultiSelectedBlockClientId:()=>HM,getGlobalBlockCount:()=>eke,getHoveredBlockClientId:()=>cve,getInserterItems:()=>jke,getLastMultiSelectedBlockClientId:()=>P8,getLowestCommonAncestorWithSelectedBlock:()=>uke,getMultiSelectedBlockClientIds:()=>wu,getMultiSelectedBlocks:()=>pke,getMultiSelectedBlocksEndClientId:()=>kke,getMultiSelectedBlocksStartClientId:()=>bke,getNextBlockClientId:()=>fke,getPatternsByBlockTypes:()=>qke,getPreviousBlockClientId:()=>dke,getSelectedBlock:()=>lke,getSelectedBlockClientId:()=>gh,getSelectedBlockClientIds:()=>bh,getSelectedBlockCount:()=>ske,getSelectedBlocksInitialCaretPosition:()=>mke,getSelectionEnd:()=>ty,getSelectionStart:()=>ey,getSettings:()=>vu,getTemplate:()=>Mke,getTemplateLock:()=>ya,hasBlockMovingClientId:()=>rve,hasDraggedInnerBlock:()=>N8,hasInserterItems:()=>Hke,hasMultiSelection:()=>Cke,hasSelectedBlock:()=>ake,hasSelectedInnerBlock:()=>L8,isAncestorBeingDragged:()=>Rke,isAncestorMultiSelected:()=>gke,isBlockBeingDragged:()=>GM,isBlockHighlighted:()=>ive,isBlockInsertionPointVisible:()=>Lke,isBlockMultiSelected:()=>R8,isBlockSelected:()=>A8,isBlockValid:()=>Xbe,isBlockVisible:()=>lve,isBlockWithinSelection:()=>wke,isCaretWithinFormattedText:()=>Oke,isDraggingBlocks:()=>M8,isFirstMultiSelectedBlock:()=>hke,isGroupable:()=>mve,isLastBlockChangePersistent:()=>Qke,isMultiSelecting:()=>Bke,isSelectionEnabled:()=>Eke,isTyping:()=>Ike,isUngroupable:()=>fve,isValidTemplate:()=>Nke,wasBlockJustInserted:()=>ave});var Re=l($(),1),x8=l(O(),1),w8=l(pt(),1);var rx=l(O(),1),we=(0,rx.forwardRef)(({icon:e,size:t=24,...o},r)=>(0,rx.cloneElement)(e,{width:t,height:t,...o,ref:r}));var nx=l(q(),1),wA=l(w(),1),zf=(0,wA.jsx)(nx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,wA.jsx)(nx.Path,{d:"M7.5 5.5h9V4h-9v1.5Zm-3.5 7h16V11H4v1.5Zm3.5 7h9V18h-9v1.5Z"})});var ix=l(q(),1),CA=l(w(),1),BA=(0,CA.jsx)(ix.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,CA.jsx)(ix.Path,{d:"M4 12.8h16v-1.5H4v1.5zm0 7h12.4v-1.5H4v1.5zM4 4.3v1.5h16V4.3H4z"})});var sx=l(q(),1),EA=l(w(),1),fu=(0,EA.jsx)(sx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,EA.jsx)(sx.Path,{d:"M13 5.5H4V4h9v1.5Zm7 7H4V11h16v1.5Zm-7 7H4V18h9v1.5Z"})});var ax=l(q(),1),TA=l(w(),1),jf=(0,TA.jsx)(ax.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,TA.jsx)(ax.Path,{d:"M19 5.5H5V4h14v1.5ZM19 20H5v-1.5h14V20ZM5 9h14v6H5V9Z"})});var lx=l(q(),1),IA=l(w(),1),mu=(0,IA.jsx)(lx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,IA.jsx)(lx.Path,{d:"M11.111 5.5H20V4h-8.889v1.5ZM4 12.5h16V11H4v1.5Zm7.111 7H20V18h-8.889v1.5Z"})});var cx=l(q(),1),PA=l(w(),1),RA=(0,PA.jsx)(cx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,PA.jsx)(cx.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 ux=l(q(),1),OA=l(w(),1),yv=(0,OA.jsx)(ux.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,OA.jsx)(ux.Path,{d:"M20 11.2H6.8l3.7-3.7-1-1L3.9 12l5.6 5.5 1-1-3.7-3.7H20z"})});var dx=l(q(),1),AA=l(w(),1),_v=(0,AA.jsx)(dx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,AA.jsx)(dx.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 fx=l(q(),1),LA=l(w(),1),NA=(0,LA.jsx)(fx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,LA.jsx)(fx.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 mx=l(q(),1),MA=l(w(),1),DA=(0,MA.jsx)(mx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,MA.jsx)(mx.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 px=l(q(),1),VA=l(w(),1),Sv=(0,VA.jsx)(px.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,VA.jsx)(px.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 hx=l(q(),1),FA=l(w(),1),zA=(0,FA.jsx)(hx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,FA.jsx)(hx.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 gx=l(q(),1),jA=l(w(),1),Cs=(0,jA.jsx)(gx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,jA.jsx)(gx.Path,{d:"M16.5 7.5 10 13.9l-2.5-2.4-1 1 3.5 3.6 7.5-7.6z"})});var bx=l(q(),1),UA=l(w(),1),hr=(0,UA.jsx)(bx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,UA.jsx)(bx.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"})});var kx=l(q(),1),HA=l(w(),1),xv=(0,HA.jsx)(kx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,HA.jsx)(kx.Path,{d:"m13.1 16-3.4-4 3.4-4 1.1 1-2.6 3 2.6 3-1.1 1z"})});var vx=l(q(),1),GA=l(w(),1),Gr=(0,GA.jsx)(vx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,GA.jsx)(vx.Path,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"})});var yx=l(q(),1),WA=l(w(),1),pu=(0,WA.jsx)(yx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,WA.jsx)(yx.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 _x=l(q(),1),$A=l(w(),1),Uo=(0,$A.jsx)(_x.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$A.jsx)(_x.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"})});var Sx=l(q(),1),KA=l(w(),1),Uf=(0,KA.jsx)(Sx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,KA.jsx)(Sx.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"})});var xx=l(q(),1),YA=l(w(),1),Hf=(0,YA.jsx)(xx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,YA.jsx)(xx.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 wx=l(q(),1),qA=l(w(),1),ZA=(0,qA.jsx)(wx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,qA.jsx)(wx.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 Cx=l(q(),1),XA=l(w(),1),QA=(0,XA.jsx)(Cx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,XA.jsx)(Cx.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 Bx=l(q(),1),JA=l(w(),1),Gf=(0,JA.jsx)(Bx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,JA.jsx)(Bx.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 Ex=l(q(),1),eL=l(w(),1),tL=(0,eL.jsx)(Ex.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,eL.jsx)(Ex.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 Wf=l(q(),1),rh=l(w(),1),oL=(0,rh.jsxs)(Wf.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,rh.jsx)(Wf.G,{opacity:".25",children:(0,rh.jsx)(Wf.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,rh.jsx)(Wf.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 $f=l(q(),1),nh=l(w(),1),rL=(0,nh.jsxs)($f.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,nh.jsx)($f.G,{opacity:".25",children:(0,nh.jsx)($f.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,nh.jsx)($f.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 Kf=l(q(),1),ih=l(w(),1),nL=(0,ih.jsxs)(Kf.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,ih.jsx)(Kf.G,{opacity:".25",children:(0,ih.jsx)(Kf.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,ih.jsx)(Kf.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 Yf=l(q(),1),sh=l(w(),1),iL=(0,sh.jsxs)(Yf.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,sh.jsx)(Yf.G,{opacity:".25",children:(0,sh.jsx)(Yf.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,sh.jsx)(Yf.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 Tx=l(q(),1),sL=l(w(),1),aL=(0,sL.jsx)(Tx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,sL.jsx)(Tx.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 Ix=l(q(),1),lL=l(w(),1),wv=(0,lL.jsx)(Ix.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,lL.jsx)(Ix.Path,{d:"M8 7h2V5H8v2zm0 6h2v-2H8v2zm0 6h2v-2H8v2zm6-14v2h2V5h-2zm0 8h2v-2h-2v2zm0 6h2v-2h-2v2z"})});var Px=l(q(),1),cL=l(w(),1),uL=(0,cL.jsx)(Px.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,cL.jsx)(Px.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 Rx=l(q(),1),dL=l(w(),1),qf=(0,dL.jsx)(Rx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,dL.jsx)(Rx.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 Ox=l(q(),1),fL=l(w(),1),mL=(0,fL.jsx)(Ox.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,fL.jsx)(Ox.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 Ax=l(q(),1),pL=l(w(),1),hL=(0,pL.jsx)(Ax.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,pL.jsx)(Ax.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 Lx=l(q(),1),gL=l(w(),1),bL=(0,gL.jsx)(Lx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,gL.jsx)(Lx.Path,{d:"M12 4 4 19h16L12 4zm0 3.2 5.5 10.3H12V7.2z"})});var Nx=l(q(),1),kL=l(w(),1),vL=(0,kL.jsx)(Nx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,kL.jsx)(Nx.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 Mx=l(q(),1),yL=l(w(),1),_L=(0,yL.jsx)(Mx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,yL.jsx)(Mx.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 Dx=l(q(),1),SL=l(w(),1),xL=(0,SL.jsx)(Dx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,SL.jsx)(Dx.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 Vx=l(q(),1),wL=l(w(),1),CL=(0,wL.jsx)(Vx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,wL.jsx)(Vx.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 Fx=l(q(),1),BL=l(w(),1),EL=(0,BL.jsx)(Fx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,BL.jsx)(Fx.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 zx=l(q(),1),TL=l(w(),1),IL=(0,TL.jsx)(zx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,TL.jsx)(zx.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 jx=l(q(),1),PL=l(w(),1),Ux=(0,PL.jsx)(jx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,PL.jsx)(jx.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 Hx=l(q(),1),RL=l(w(),1),Cv=(0,RL.jsx)(Hx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,RL.jsx)(Hx.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 Gx=l(q(),1),OL=l(w(),1),Bv=(0,OL.jsx)(Gx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,OL.jsx)(Gx.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 Wx=l(q(),1),AL=l(w(),1),Ev=(0,AL.jsx)(Wx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,AL.jsx)(Wx.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 $x=l(q(),1),LL=l(w(),1),NL=(0,LL.jsx)($x.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,LL.jsx)($x.Path,{d:"M17.6 7c-.6.9-1.5 1.7-2.6 2v1h2v7h2V7h-1.4zM11 11H7V7H5v10h2v-4h4v4h2V7h-2v4z"})});var Kx=l(q(),1),ML=l(w(),1),DL=(0,ML.jsx)(Kx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,ML.jsx)(Kx.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 Yx=l(q(),1),VL=l(w(),1),FL=(0,VL.jsx)(Yx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,VL.jsx)(Yx.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(q(),1),zL=l(w(),1),jL=(0,zL.jsx)(qx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,zL.jsx)(qx.Path,{d:"M20 13V7h-3l-4 6v2h5v2h2v-2h1v-2h-1zm-2 0h-2.8L18 9v4zm-9-2H5V7H3v10h2v-4h4v4h2V7H9v4z"})});var Zx=l(q(),1),UL=l(w(),1),HL=(0,UL.jsx)(Zx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,UL.jsx)(Zx.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 Xx=l(q(),1),GL=l(w(),1),WL=(0,GL.jsx)(Xx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,GL.jsx)(Xx.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 Qx=l(q(),1),$L=l(w(),1),KL=(0,$L.jsx)(Qx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$L.jsx)(Qx.Path,{d:"M12 4L4 7.9V20h16V7.9L12 4zm6.5 14.5H14V13h-4v5.5H5.5V8.8L12 5.7l6.5 3.1v9.7z"})});var Jx=l(q(),1),YL=l(w(),1),Tv=(0,YL.jsx)(Jx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,YL.jsx)(Jx.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 ew=l(q(),1),qL=l(w(),1),ZL=(0,qL.jsx)(ew.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,qL.jsx)(ew.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 tw=l(q(),1),XL=l(w(),1),QL=(0,XL.jsx)(tw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,XL.jsx)(tw.Path,{d:"M15 4H9v11h6V4zM4 18.5V20h16v-1.5H4z"})});var ow=l(q(),1),JL=l(w(),1),eN=(0,JL.jsx)(ow.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,JL.jsx)(ow.Path,{d:"M20 11h-5V4H9v7H4v1.5h5V20h6v-7.5h5z"})});var rw=l(q(),1),tN=l(w(),1),hu=(0,tN.jsx)(rw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,tN.jsx)(rw.Path,{d:"M12.5 15v5H11v-5H4V9h7V4h1.5v5h7v6h-7Z"})});var nw=l(q(),1),oN=l(w(),1),gu=(0,oN.jsx)(nw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,oN.jsx)(nw.Path,{d:"M9 9v6h11V9H9zM4 20h1.5V4H4v16z"})});var iw=l(q(),1),rN=l(w(),1),bu=(0,rN.jsx)(iw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,rN.jsx)(iw.Path,{d:"M4 15h11V9H4v6zM18.5 4v16H20V4h-1.5z"})});var sw=l(q(),1),nN=l(w(),1),iN=(0,nN.jsx)(sw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,nN.jsx)(sw.Path,{d:"M7 4H17V8L7 8V4ZM7 16L17 16V20L7 20V16ZM20 11.25H4V12.75H20V11.25Z"})});var aw=l(q(),1),sN=l(w(),1),ah=(0,sN.jsx)(aw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,sN.jsx)(aw.Path,{d:"M9 15h6V9H9v6zm-5 5h1.5V4H4v16zM18.5 4v16H20V4h-1.5z"})});var lw=l(q(),1),aN=l(w(),1),lN=(0,aN.jsx)(lw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,aN.jsx)(lw.Path,{d:"M4 4L20 4L20 5.5L4 5.5L4 4ZM10 7L14 7L14 17L10 17L10 7ZM20 18.5L4 18.5L4 20L20 20L20 18.5Z"})});var cw=l(q(),1),cN=l(w(),1),lh=(0,cN.jsx)(cw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,cN.jsx)(cw.Path,{d:"M4 4H5.5V20H4V4ZM7 10L17 10V14L7 14V10ZM20 4H18.5V20H20V4Z"})});var uw=l(q(),1),uN=l(w(),1),dN=(0,uN.jsx)(uw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,uN.jsx)(uw.Path,{d:"M9 20h6V9H9v11zM4 4v1.5h16V4H4z"})});var dw=l(q(),1),fN=l(w(),1),wl=(0,fN.jsx)(dw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,fN.jsx)(dw.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 fw=l(q(),1),mN=l(w(),1),pN=(0,mN.jsx)(fw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,mN.jsx)(fw.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 mw=l(q(),1),hN=l(w(),1),Ii=(0,hN.jsx)(mw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,hN.jsx)(mw.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 pw=l(q(),1),gN=l(w(),1),kn=(0,gN.jsx)(pw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,gN.jsx)(pw.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 hw=l(q(),1),bN=l(w(),1),Iv=(0,bN.jsx)(hw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,bN.jsx)(hw.Path,{d:"M3 6h11v1.5H3V6Zm3.5 5.5h11V13h-11v-1.5ZM21 17H10v1.5h11V17Z"})});var gw=l(q(),1),kN=l(w(),1),vN=(0,kN.jsx)(gw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,kN.jsx)(gw.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 bw=l(q(),1),yN=l(w(),1),_N=(0,yN.jsx)(bw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,yN.jsx)(bw.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 kw=l(q(),1),SN=l(w(),1),Zf=(0,SN.jsx)(kw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,SN.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-1zm-2.8 0H9.8V7c0-1.2 1-2.2 2.2-2.2s2.2 1 2.2 2.2v3z"})});var Pv=l(q(),1),Rv=l(w(),1),ch=(0,Rv.jsxs)(Pv.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,Rv.jsx)(Pv.Path,{d:"m7 6.5 4 2.5-4 2.5z"}),(0,Rv.jsx)(Pv.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 vw=l(q(),1),xN=l(w(),1),Ov=(0,xN.jsx)(vw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,xN.jsx)(vw.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 yw=l(q(),1),wN=l(w(),1),Bs=(0,wN.jsx)(yw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,wN.jsx)(yw.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"})});var Av=l(q(),1),Lv=l(w(),1),Cl=(0,Lv.jsxs)(Av.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,Lv.jsx)(Av.Path,{d:"M15.5 7.5h-7V9h7V7.5Zm-7 3.5h7v1.5h-7V11Zm7 3.5h-7V16h7v-1.5Z"}),(0,Lv.jsx)(Av.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 _w=l(q(),1),CN=l(w(),1),BN=(0,CN.jsx)(_w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,CN.jsx)(_w.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 Sw=l(q(),1),EN=l(w(),1),Xf=(0,EN.jsx)(Sw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,EN.jsx)(Sw.Path,{d:"m19 7-3-3-8.5 8.5-1 4 4-1L19 7Zm-7 11.5H5V20h7v-1.5Z"})});var xw=l(q(),1),TN=l(w(),1),IN=(0,TN.jsx)(xw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,TN.jsx)(xw.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 ww=l(q(),1),PN=l(w(),1),Pi=(0,PN.jsx)(ww.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,PN.jsx)(ww.Path,{d:"M11 12.5V17.5H12.5V12.5H17.5V11H12.5V6H11V11H6V12.5H11Z"})});var Cw=l(q(),1),RN=l(w(),1),ON=(0,RN.jsx)(Cw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,RN.jsx)(Cw.Path,{d:"M19 5.5H5V4h14v1.5ZM19 20H5v-1.5h14V20ZM7 9h10v6H7V9Z"})});var Bw=l(q(),1),AN=l(w(),1),LN=(0,AN.jsx)(Bw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,AN.jsx)(Bw.Path,{d:"M5 5.5h8V4H5v1.5ZM5 20h8v-1.5H5V20ZM19 9H5v6h14V9Z"})});var Ew=l(q(),1),NN=l(w(),1),MN=(0,NN.jsx)(Ew.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,NN.jsx)(Ew.Path,{d:"M19 5.5h-8V4h8v1.5ZM19 20h-8v-1.5h8V20ZM5 9h14v6H5V9Z"})});var Tw=l(q(),1),DN=l(w(),1),VN=(0,DN.jsx)(Tw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,DN.jsx)(Tw.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 Iw=l(q(),1),FN=l(w(),1),zN=(0,FN.jsx)(Iw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,FN.jsx)(Iw.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 Pw=l(q(),1),jN=l(w(),1),UN=(0,jN.jsx)(Pw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,jN.jsx)(Pw.Path,{d:"m7.3 9.7 1.4 1.4c.2-.2.3-.3.4-.5 0 0 0-.1.1-.1.3-.5.4-1.1.3-1.6L12 7 9 4 7.2 6.5c-.6-.1-1.1 0-1.6.3 0 0-.1 0-.1.1-.3.1-.4.2-.6.4l1.4 1.4L4 11v1h1l2.3-2.3zM4 20h9v-1.5H4V20zm0-5.5V16h16v-1.5H4z"})});var Rw=l(q(),1),HN=l(w(),1),gr=(0,HN.jsx)(Rw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,HN.jsx)(Rw.Path,{d:"M7 11.5h10V13H7z"})});var Ow=l(q(),1),GN=l(w(),1),WN=(0,GN.jsx)(Ow.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,GN.jsx)(Ow.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 Aw=l(q(),1),$N=l(w(),1),KN=(0,$N.jsx)(Aw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$N.jsx)(Aw.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 Lw=l(q(),1),YN=l(w(),1),qN=(0,YN.jsx)(Lw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,YN.jsx)(Lw.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 Nw=l(q(),1),ZN=l(w(),1),Qf=(0,ZN.jsx)(Nw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,ZN.jsx)(Nw.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 Nv=l(q(),1),Mv=l(w(),1),XN=(0,Mv.jsxs)(Nv.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,Mv.jsx)(Nv.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,Mv.jsx)(Nv.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 Mw=l(q(),1),QN=l(w(),1),JN=(0,QN.jsx)(Mw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,QN.jsx)(Mw.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 Dw=l(q(),1),eM=l(w(),1),Vw=(0,eM.jsx)(Dw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,eM.jsx)(Dw.Path,{d:"m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z"})});var Dv=l(q(),1),Vv=l(w(),1),tM=(0,Vv.jsxs)(Dv.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,Vv.jsx)(Dv.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,Vv.jsx)(Dv.Path,{d:"m16.5 19.5h-9v-1.5h9z"})]});var uh=l(q(),1),dh=l(w(),1),oM=(0,dh.jsxs)(uh.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,dh.jsx)(uh.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,dh.jsx)(uh.Path,{d:"m4.5 7.5v9h1.5v-9z"}),(0,dh.jsx)(uh.Path,{d:"m18 7.5v9h1.5v-9z"})]});var Fv=l(q(),1),zv=l(w(),1),rM=(0,zv.jsxs)(Fv.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,zv.jsx)(Fv.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,zv.jsx)(Fv.Path,{d:"m4.5 16.5v-9h1.5v9z"})]});var jv=l(q(),1),Uv=l(w(),1),nM=(0,Uv.jsxs)(jv.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,Uv.jsx)(jv.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,Uv.jsx)(jv.Path,{d:"m18 16.5v-9h1.5v9z"})]});var Hv=l(q(),1),Gv=l(w(),1),iM=(0,Gv.jsxs)(Hv.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,Gv.jsx)(Hv.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,Gv.jsx)(Hv.Path,{d:"m16.5 6h-9v-1.5h9z"})]});var fh=l(q(),1),mh=l(w(),1),sM=(0,mh.jsxs)(fh.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,mh.jsx)(fh.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,mh.jsx)(fh.Path,{d:"m7.5 6h9v-1.5h-9z"}),(0,mh.jsx)(fh.Path,{d:"m7.5 19.5h9v-1.5h-9z"})]});var Fw=l(q(),1),aM=l(w(),1),lM=(0,aM.jsx)(Fw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,aM.jsx)(Fw.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 zw=l(q(),1),cM=l(w(),1),Wv=(0,cM.jsx)(zw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,cM.jsx)(zw.Path,{d:"M5 4h14v11H5V4Zm11 16H8v-1.5h8V20Z"})});var jw=l(q(),1),uM=l(w(),1),Jf=(0,uM.jsx)(jw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,uM.jsx)(jw.Path,{d:"M16 5.5H8V4h8v1.5ZM16 20H8v-1.5h8V20ZM5 9h14v6H5V9Z"})});var Uw=l(q(),1),dM=l(w(),1),fM=(0,dM.jsx)(Uw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,dM.jsx)(Uw.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 Hw=l(q(),1),mM=l(w(),1),Ri=(0,mM.jsx)(Hw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,mM.jsx)(Hw.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 Gw=l(q(),1),pM=l(w(),1),hM=(0,pM.jsx)(Gw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,pM.jsx)(Gw.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 Ww=l(q(),1),gM=l(w(),1),bM=(0,gM.jsx)(Ww.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,gM.jsx)(Ww.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 $w=l(q(),1),kM=l(w(),1),vM=(0,kM.jsx)($w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,kM.jsx)($w.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 Kw=l(q(),1),yM=l(w(),1),_M=(0,yM.jsx)(Kw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,yM.jsx)(Kw.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 Yw=l(q(),1),SM=l(w(),1),xM=(0,SM.jsx)(Yw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,SM.jsx)(Yw.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 qw=l(q(),1),wM=l(w(),1),CM=(0,wM.jsx)(qw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,wM.jsx)(qw.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 Zw=l(q(),1),BM=l(w(),1),Bl=(0,BM.jsx)(Zw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,BM.jsx)(Zw.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 Xw=l(q(),1),EM=l(w(),1),Es=(0,EM.jsx)(Xw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,EM.jsx)(Xw.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 Qw=l(q(),1),TM=l(w(),1),IM=(0,TM.jsx)(Qw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,TM.jsx)(Qw.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 Jw=l(q(),1),PM=l(w(),1),RM=(0,PM.jsx)(Jw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,PM.jsx)(Jw.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 eC=l(q(),1),OM=l(w(),1),AM=(0,OM.jsx)(eC.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,OM.jsx)(eC.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 Il=l(br(),1),$n=l(Pe(),1),Ee=l(z(),1);var y8=l($(),1),_8=l(a8(),1);var Yt="core/block-editor";var rC={};ka(rC,{getAllPatterns:()=>Cbe,getBlockRemovalRules:()=>vbe,getBlockSettings:()=>c8,getBlockStyles:()=>Rbe,getBlockWithoutAttributes:()=>pbe,getClosestAllowedInsertionPoint:()=>m8,getClosestAllowedInsertionPointForPattern:()=>Abe,getContentLockingParent:()=>LM,getEditedContentOnlySection:()=>NM,getEnabledBlockParents:()=>bbe,getEnabledClientIdsTree:()=>gbe,getExpandedBlock:()=>Pbe,getInserterMediaCategories:()=>Sbe,getInsertionPoint:()=>Lbe,getLastFocus:()=>Tbe,getLastInsertedBlocksClientIds:()=>mbe,getListViewExpandRevision:()=>Ube,getParentSectionBlock:()=>yu,getPatternBySlug:()=>wbe,getRegisteredInserterMediaCategories:()=>_be,getRemovalPromptData:()=>kbe,getRequestedInspectorTab:()=>Gbe,getReusableBlocks:()=>Ebe,getSectionRootClientId:()=>tm,getStyleOverrides:()=>ybe,getViewportModalClientIds:()=>Hbe,getZoomLevel:()=>Obe,hasAllowedPatterns:()=>xbe,hasBlockSpotlight:()=>Vbe,isBlockHiddenAnywhere:()=>Nbe,isBlockHiddenAtViewport:()=>p8,isBlockHiddenEverywhere:()=>VM,isBlockInterfaceHidden:()=>fbe,isBlockParentHiddenAtViewport:()=>Dbe,isBlockParentHiddenEverywhere:()=>Mbe,isBlockSubtreeDisabled:()=>hbe,isContainerInsertableToInContentOnlyMode:()=>Kv,isDragging:()=>Ibe,isEditLockedBlock:()=>h8,isListViewContentPanelOpen:()=>zbe,isListViewPanelOpened:()=>jbe,isLockedBlock:()=>Fbe,isMoveLockedBlock:()=>g8,isRemoveLockedBlock:()=>b8,isSectionBlock:()=>_u,isWithinEditedContentOnlySection:()=>MM,isZoomOut:()=>DM});var Wr=l(z(),1),$v=l($(),1);var tC=l(N(),1);var Tt={desktop:{label:(0,tC.__)("Desktop"),icon:aL,key:"desktop"},tablet:{label:(0,tC.__)("Tablet"),icon:hM,key:"tablet"},mobile:{label:(0,tC.__)("Mobile"),icon:Ov,key:"mobile"}},ku=Object.entries(Tt);var oC=l($(),1),l8=l(pt(),1);function me(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 El=(e,t,o)=>{let r=Array.isArray(t)?t:t.split("."),n=e;return r.forEach(i=>{n=n?.[i]}),n??o};var lbe=["color","border","dimensions","typography","spacing"],cbe={"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},ube={"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"},dbe=e=>ube[e]||e;function c8(e,t,...o){let r=ht(e,t),n=[];if(t){let i=t;do{let s=ht(e,i);(0,oC.hasBlockSupport)(s,"__experimentalSettings",!1)&&n.push(i)}while(i=e.blocks.parents.get(i))}return o.map(i=>{if(lbe.includes(i)){console.warn("Top level useSetting paths are disabled. Please use a subpath to query the information needed.");return}let s=(0,l8.applyFilters)("blockEditor.useSetting.before",void 0,i,t,r);if(s!==void 0)return s;let a=dbe(i);for(let d of n){let f=Oi(e,d);if(s=El(f.settings?.blocks?.[r],a)??El(f.settings,a),s!==void 0)break}let c=vu(e);if(s===void 0&&r&&(s=El(c.__experimentalFeatures?.blocks?.[r],a)),s===void 0&&(s=El(c.__experimentalFeatures,a)),s!==void 0)return oC.__EXPERIMENTAL_PATHS_WITH_OVERRIDE[a]?s.custom??s.theme??s.default:s;let u=cbe[a]?.(c);return u!==void 0?u:a==="typography.dropCap"?!0:void 0})}var{isContentBlock:u8}=F($v.privateApis);function fbe(e){return e.isBlockInterfaceHidden}function mbe(e){return e?.lastBlockInserted?.clientIds}function pbe(e,t){return e.blocks.byClientId.get(t)}var hbe=(e,t)=>{let o=r=>Ai(e,r)==="disabled"&&Rr(e,r).every(o);return Rr(e,t).every(o)};function Kv(e,t,o){let r=u8(t),n=ht(e,o),i=u8(n);return tm(e)===o||i&&r}function d8(e,t){let o=Rr(e,t),r=[];for(let n of o){let i=d8(e,n);Ai(e,n)!=="disabled"?r.push({clientId:n,innerBlocks:i}):r.push(...i)}return r}var gbe=(0,Wr.createRegistrySelector)(()=>(0,Wr.createSelector)(d8,e=>[e.blocks.order,e.derivedBlockEditingModes,e.blocks.blockEditingModes])),bbe=(0,Wr.createSelector)((e,t,o=!1)=>Ts(e,t,o).filter(r=>Ai(e,r)!=="disabled"),e=>[e.blocks.parents,e.blocks.blockEditingModes,e.settings.templateLock,e.blockListSettings]);function kbe(e){return e.removalPromptData}function vbe(e){return e.blockRemovalRules}var ybe=(0,Wr.createSelector)(e=>{let o=ph(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 _be(e){return e.registeredInserterMediaCategories}var Sbe=(0,Wr.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]),xbe=(0,Wr.createRegistrySelector)(e=>(0,Wr.createSelector)((t,o=null)=>{let{getAllPatterns:r}=F(e(Yt)),n=r(),{allowedBlockTypes:i}=vu(t);return n.some(s=>{let{inserter:a=!0}=s;if(!a)return!1;let c=em(s);return qv(c,i)&&c.every(({name:u})=>om(t,u,o))})},(t,o)=>[...Zv(e)(t),...Su(e)(t,o)])),wbe=(0,Wr.createRegistrySelector)(e=>(0,Wr.createSelector)((t,o)=>{if(o?.startsWith("core/block/")){let r=parseInt(o.slice(11),10),n=F(e(Yt)).getReusableBlocks().find(({id:i})=>i===r);return n?Yv(n,t.settings.__experimentalUserPatternCategories):null}return[...t.settings.__experimentalBlockPatterns??[],...t.settings[au]?.(e)??[]].find(({name:r})=>r===o)},(t,o)=>o?.startsWith("core/block/")?[F(e(Yt)).getReusableBlocks(),t.settings.__experimentalReusableBlocks]:[t.settings.__experimentalBlockPatterns,t.settings[au]?.(e)])),Cbe=(0,Wr.createRegistrySelector)(e=>(0,Wr.createSelector)(t=>[...F(e(Yt)).getReusableBlocks().map(o=>Yv(o,t.settings.__experimentalUserPatternCategories)),...t.settings.__experimentalBlockPatterns??[],...t.settings[au]?.(e)??[]].filter((o,r,n)=>r===n.findIndex(i=>o.name===i.name)),Zv(e))),Bbe=[],Ebe=(0,Wr.createRegistrySelector)(e=>t=>{let o=t.settings[Z0];return(o?o(e):t.settings.__experimentalReusableBlocks)??Bbe});function Tbe(e){return e.lastFocus}function Ibe(e){return e.isDragging}function Pbe(e){return e.expandedBlock}var LM=(e,t)=>{let o=t,r;for(;!r&&(o=e.blocks.parents.get(o));)ya(e,o)==="contentOnly"&&(r=o);return r};function f8(e,t){let o=ht(e,t);if(o==="core/block")return!0;let r=Oi(e,t),n=o==="core/template-part",i=e.settings?.[cu],s=e.settings?.disableContentOnlyForUnsyncedPatterns,a=e.settings?.disableContentOnlyForTemplateParts;if((!s&&r?.metadata?.patternName||n&&!a)&&!i)return!0;let c=ya(e,t)==="contentOnly",u=Lo(e,t),d=ya(e,u)==="contentOnly";return!!(c&&!d)}var yu=(e,t)=>{if(MM(e,t))return;let o=t,r;for(;o=e.blocks.parents.get(o);)f8(e,o)&&(r=o);return r};function _u(e,t){return MM(e,t)||yu(e,t)?!1:f8(e,t)}function NM(e){return e.editedContentOnlySection}function MM(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 Rbe=(0,Wr.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 tm(e){return e.settings?.[lu]}function DM(e){return e.zoomLevel==="auto-scaled"||e.zoomLevel<100}function Obe(e){return e.zoomLevel}function m8(e,t,o=""){let r=Array.isArray(t)?t:[t],n=s=>r.every(a=>om(e,a,s));if(!o){if(n(o))return o;let s=tm(e);return s&&n(s)?s:null}let i=o;for(;i!==null&&!n(i);)i=Lo(e,i);return i}function Abe(e,t,o){let{allowedBlockTypes:r}=vu(e);if(!qv(em(t),r))return null;let i=em(t).map(({blockName:s})=>s);return m8(e,i,o)}function Lbe(e){return e.insertionPoint}var Nbe=(e,t)=>{let o=ht(e,t);if(!(0,$v.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(Tt).some(i=>n?.viewport?.[i.key]===!1):!1},VM=(e,t)=>{let o=ht(e,t);return(0,$v.hasBlockSupport)(o,"visibility",!0)?e.blocks.attributes.get(t)?.metadata?.blockVisibility===!1:!1},Mbe=(e,t)=>Ts(e,t).some(r=>VM(e,r)),p8=(e,t,o)=>{if(VM(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},Dbe=(e,t,o)=>Ts(e,t).some(n=>p8(e,n,o));function Vbe(e){return!!e.hasBlockSpotlight||!!e.editedContentOnlySection}function h8(e,t){return!!Oi(e,t)?.lock?.edit}function g8(e,t){let o=Oi(e,t);if(o?.lock?.move!==void 0)return!!o?.lock?.move;let r=Lo(e,t);return ya(e,r)==="all"}function b8(e,t){let o=Oi(e,t);if(o?.lock?.remove!==void 0)return!!o?.lock?.remove;let r=Lo(e,t),n=ya(e,r);return n==="all"||n==="insert"}function Fbe(e,t){return h8(e,t)||g8(e,t)||b8(e,t)}function zbe(e){return e.listViewContentPanelOpen}function jbe(e,t){return e.openedListViewPanels?.allOpen?!0:e.openedListViewPanels?.panels?.[t]===!0}function Ube(e){return e.listViewExpandRevision||0}function Hbe(e){return e.viewportModalClientIds}function Gbe(e){return e.requestedInspectorTab}var Qv=l(N(),1),Mt={user:"user",theme:"theme",directory:"directory"},Xv={full:"fully",unsynced:"unsynced"},rm={name:"allPatterns",label:(0,Qv._x)("All","patterns")},Tl={name:"myPatterns",label:(0,Qv.__)("My patterns")},hh={name:"core/starter-content",label:(0,Qv.__)("Starter content")};function nC(e,t,o){let r=e.name.startsWith("core/block"),n=e.source==="core"||e.source?.startsWith("pattern-directory");return!!(t===Mt.theme&&(r||n)||t===Mt.directory&&(r||!n)||t===Mt.user&&e.type!==Mt.user||o===Xv.full&&e.syncStatus!==""||o===Xv.unsynced&&e.syncStatus!=="unsynced"&&r)}var xu=Symbol("isFiltered"),k8=new WeakMap,v8=new WeakMap;function Yv(e,t=[]){return{name:`core/block/${e.id}`,id:e.id,type:Mt.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 Wbe(e){let t=(0,y8.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 iC(e){let t=k8.get(e);return t||(t=Wbe(e),k8.set(e,t)),t}function em(e){let t=v8.get(e);return t||(t=(0,_8.parse)(e.content),t=t.filter(o=>o.blockName!==null),v8.set(e,t)),t}var nm=(e,t,o=null)=>typeof e=="boolean"?e:Array.isArray(e)?e.includes("core/post-content")&&t===null?!0:e.includes(t):o,qv=(e,t)=>{if(typeof t=="boolean")return t;let o=[...e];for(;o.length>0;){let r=o.shift();if(!nm(t,r.name||r.blockName,!0))return!1;r.innerBlocks?.forEach(i=>{o.push(i)})}return!0},Zv=e=>t=>[t.settings.__experimentalBlockPatterns,t.settings.__experimentalUserPatternCategories,t.settings.__experimentalReusableBlocks,t.settings[au]?.(e),t.blockPatterns,F(e(Yt)).getReusableBlocks()],Su=()=>(e,t)=>[e.blockListSettings[t],e.blocks.byClientId.get(t),e.blocks.order.get(t||""),e.settings.allowedBlockTypes,e.settings.templateLock,Ai(e,t),tm(e),_u(e,t),yu(e,t)];var $be=(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 _a(e,t,o="asc"){return e.concat().sort($be(t,e,o))}var{isContentBlock:zM}=F(Re.privateApis),Kbe=3600*1e3,Ybe=24*3600*1e3,qbe=168*3600*1e3,kr=[],Zbe=new Set,C8={[xu]:!0};function ht(e,t){let o=e.blocks.byClientId.get(t),r="core/social-link";if(x8.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 Xbe(e,t){let o=e.blocks.byClientId.get(t);return!!o&&o.isValid}function Oi(e,t){return e.blocks.byClientId.get(t)?e.blocks.attributes.get(t):null}function Pl(e,t){return e.blocks.byClientId.has(t)?e.blocks.tree.get(t):null}var Qbe=(0,Ee.createSelector)((e,t)=>{let o=e.blocks.byClientId.get(t);return o?{...o,attributes:Oi(e,t)}:null},(e,t)=>[e.blocks.byClientId.get(t),e.blocks.attributes.get(t)]);function Jbe(e,t){let o=!t||!aC(e,t)?t||"":"controlled||"+t;return e.blocks.tree.get(o)?.innerBlocks||kr}var B8=(0,Ee.createSelector)((e,t)=>((0,$n.default)("wp.data.select( 'core/block-editor' ).__unstableGetClientIdWithClientIdsTree",{since:"6.3",version:"6.5"}),{clientId:t,innerBlocks:E8(e,t)}),e=>[e.blocks.order]),E8=(0,Ee.createSelector)((e,t="")=>((0,$n.default)("wp.data.select( 'core/block-editor' ).__unstableGetClientIdsTree",{since:"6.3",version:"6.5"}),Rr(e,t).map(o=>B8(e,o))),e=>[e.blocks.order]),T8=(0,Ee.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]),ph=e=>T8(e,""),eke=(0,Ee.createSelector)((e,t)=>{let o=ph(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]),I8=(0,Ee.createSelector)((e,t)=>{if(!t)return kr;let o=Array.isArray(t)?t:[t],n=ph(e).filter(i=>{let s=e.blocks.byClientId.get(i);return o.includes(s.name)});return n.length>0?n:kr},e=>[e.blocks.order,e.blocks.byClientId]);function tke(e,t){return(0,$n.default)("wp.data.select( 'core/block-editor' ).__experimentalGetGlobalBlocksByName",{since:"6.5",alternative:"wp.data.select( 'core/block-editor' ).getBlocksByName"}),I8(e,t)}var sC=(0,Ee.createSelector)((e,t)=>(Array.isArray(t)?t:[t]).map(o=>Pl(e,o)),(e,t)=>(Array.isArray(t)?t:[t]).map(o=>e.blocks.tree.get(o))),oke=(0,Ee.createSelector)((e,t)=>sC(e,t).filter(Boolean).map(o=>o.name),(e,t)=>sC(e,t));function rke(e,t){return Rr(e,t).length}function ey(e){return e.selection.selectionStart}function ty(e){return e.selection.selectionEnd}function nke(e){return e.selection.selectionStart.clientId}function ike(e){return e.selection.selectionEnd.clientId}function ske(e){let t=wu(e).length;return t||(e.selection.selectionStart.clientId?1:0)}function ake(e){let{selectionStart:t,selectionEnd:o}=e.selection;return!!t.clientId&&t.clientId===o.clientId}function gh(e){let{selectionStart:t,selectionEnd:o}=e.selection,{clientId:r}=t;return!r||r!==o.clientId?null:r}function lke(e){let t=gh(e);return t?Pl(e,t):null}function Lo(e,t){return e.blocks.parents.get(t)??null}var Ts=(0,Ee.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():kr},e=>[e.blocks.parents]),jM=(0,Ee.createSelector)((e,t,o,r=!1)=>{let n=Ts(e,t,r),i=Array.isArray(o)?s=>o.includes(s):s=>o===s;return n.filter(s=>i(ht(e,s)))},e=>[e.blocks.parents]);function cke(e,t){let o=t,r;do r=o,o=e.blocks.parents.get(o);while(o);return r}function uke(e,t){let o=gh(e),r=[...Ts(e,t),t],n=[...Ts(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 UM(e,t,o=1){if(t===void 0&&(t=gh(e)),t===void 0&&(o<0?t=HM(e):t=P8(e)),!t)return null;let r=Lo(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 dke(e,t){return UM(e,t,-1)}function fke(e,t){return UM(e,t,1)}function mke(e){return e.initialPosition}var bh=(0,Ee.createSelector)(e=>{let{selectionStart:t,selectionEnd:o}=e.selection;if(!t.clientId||!o.clientId)return kr;if(t.clientId===o.clientId)return[t.clientId];let r=Lo(e,t.clientId);if(r===null)return kr;let n=Rr(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 wu(e){let{selectionStart:t,selectionEnd:o}=e.selection;return t.clientId===o.clientId?kr:bh(e)}var pke=(0,Ee.createSelector)(e=>{let t=wu(e);return t.length?t.map(o=>Pl(e,o)):kr},e=>[...bh.getDependants(e),e.blocks.byClientId,e.blocks.order,e.blocks.attributes]);function HM(e){return wu(e)[0]||null}function P8(e){let t=wu(e);return t[t.length-1]||null}function hke(e,t){return HM(e)===t}function R8(e,t){return wu(e).indexOf(t)!==-1}var gke=(0,Ee.createSelector)((e,t)=>{let o=t,r=!1;for(;o&&!r;)o=Lo(e,o),r=R8(e,o);return r},e=>[e.blocks.order,e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId]);function bke(e){let{selectionStart:t,selectionEnd:o}=e.selection;return t.clientId===o.clientId?null:t.clientId||null}function kke(e){let{selectionStart:t,selectionEnd:o}=e.selection;return t.clientId===o.clientId?null:o.clientId||null}function vke(e){let t=ey(e),o=ty(e);return!t.attributeKey&&!o.attributeKey&&typeof t.offset>"u"&&typeof o.offset>"u"}function yke(e){let t=ey(e),o=ty(e);return!!t&&!!o&&t.clientId===o.clientId&&t.attributeKey===o.attributeKey&&t.offset===o.offset}function _ke(e){return bh(e).some(t=>{let o=ht(e,t);return!(0,Re.getBlockType)(o).merge})}function Ske(e,t){let o=ey(e),r=ty(e);if(o.clientId===r.clientId||!o.attributeKey||!r.attributeKey||typeof o.offset>"u"||typeof r.offset>"u")return!1;let n=Lo(e,o.clientId),i=Lo(e,r.clientId);if(n!==i)return!1;let s=Rr(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=ht(e,f);if(!(0,Re.getBlockType)(h).merge)return!1;let g=Pl(e,m);if(g.name===h)return!0;let b=(0,Re.switchToBlockType)(g,h);return b&&b.length}var xke=e=>{let t=ey(e),o=ty(e);if(t.clientId===o.clientId||!t.attributeKey||!o.attributeKey||typeof t.offset>"u"||typeof o.offset>"u")return kr;let r=Lo(e,t.clientId),n=Lo(e,o.clientId);if(r!==n)return kr;let i=Rr(e,r),s=i.indexOf(t.clientId),a=i.indexOf(o.clientId),[c,u]=s>a?[o,t]:[t,o],d=Pl(e,c.clientId),f=Pl(e,u.clientId),m=d.attributes[c.attributeKey],h=f.attributes[u.attributeKey],p=(0,Il.create)({html:m}),g=(0,Il.create)({html:h});return p=(0,Il.remove)(p,0,c.offset),g=(0,Il.remove)(g,u.offset,g.text.length),[{...d,attributes:{...d.attributes,[c.attributeKey]:(0,Il.toHTMLString)({value:p})}},{...f,attributes:{...f.attributes,[u.attributeKey]:(0,Il.toHTMLString)({value:g})}}]};function Rr(e,t){return e.blocks.order.get(t||"")||kr}function O8(e,t){let o=Lo(e,t);return Rr(e,o).indexOf(t)}function A8(e,t){let{selectionStart:o,selectionEnd:r}=e.selection;return o.clientId!==r.clientId?!1:o.clientId===t}function L8(e,t,o=!1){let r=bh(e);return r.length?o?r.some(n=>Ts(e,n,!0).includes(t)):r.some(n=>Lo(e,n)===t):!1}function N8(e,t,o=!1){return Rr(e,t).some(r=>GM(e,r)||o&&N8(e,r,o))}function wke(e,t){if(!t)return!1;let o=wu(e),r=o.indexOf(t);return r>-1&&r<o.length-1}function Cke(e){let{selectionStart:t,selectionEnd:o}=e.selection;return t.clientId!==o.clientId}function Bke(e){return e.isMultiSelecting}function Eke(e){return e.isSelectionEnabled}function Tke(e,t){return e.blocksMode[t]||"visual"}function Ike(e){return e.isTyping}function M8(e){return!!e.draggedBlocks.length}function Pke(e){return e.draggedBlocks}function GM(e,t){return e.draggedBlocks.includes(t)}function Rke(e,t){return M8(e)?Ts(e,t).some(r=>GM(e,r)):!1}function Oke(){return(0,$n.default)('wp.data.select( "core/block-editor" ).isCaretWithinFormattedText',{since:"6.1",version:"6.3"}),!1}var Ake=(0,Ee.createSelector)(e=>{let t,o,{insertionCue:r,selection:{selectionEnd:n}}=e;if(r!==null)return r;let{clientId:i}=n;return i?(t=Lo(e,i)||void 0,o=O8(e,n.clientId)+1):o=Rr(e).length,{rootClientId:t,index:o}},e=>[e.insertionCue,e.selection.selectionEnd.clientId,e.blocks.parents,e.blocks.order]);function Lke(e){return e.insertionCue!==null}function Nke(e){return e.template.isValid}function Mke(e){return e.settings.template}function ya(e,t){if(!t)return e.settings.templateLock??!1;let o=ZM(e,t)?.templateLock;return o==="contentOnly"&&e.editedContentOnlySection===t?!1:o??!1}var WM=(e,t,o=null)=>{let r,n;if(t&&typeof t=="object"?(r=t,n=t.name):(r=(0,Re.getBlockType)(t),n=t),!r)return!1;let{allowedBlockTypes:i}=vu(e);if(!nm(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(ht(e,c))){u=!0;break}c=e.blocks.parents.get(c)}while(c);return u}return!0},oy=(e,t,o=null)=>{if(e.settings.isPreviewMode||!WM(e,t,o))return!1;let r;t&&typeof t=="object"?(r=t,t=r.name):r=(0,Re.getBlockType)(t);let n=ya(e,o);if(n&&n!=="contentOnly")return!1;let i=Ai(e,o??""),s=!!_u(e,o),a=s?o:yu(e,o),c=!!a;if(i==="disabled"&&(!c||t!==(0,Re.getDefaultBlockName)()))return!1;let u=ZM(e,o);if(o&&u===void 0)return!1;let d=zM(t);if(c&&!d||c&&ht(e,a)==="core/block")return!1;if(c&&(s||i==="contentOnly")&&!Kv(e,t,o)){let _=(0,Re.getDefaultBlockName)();if(t===_){if(!Rr(e,o).some(B=>ht(e,B)===_))return!1}else return!1}let f=ht(e,o),h=(0,Re.getBlockType)(f)?.allowedBlocks,p=nm(h,t);if(p!==!1){let _=u?.allowedBlocks,S=nm(_,t);S!==null&&(p=S)}let g=r.parent,b=nm(g,f),k=!0,v=r.ancestor;v&&(k=[o,...Ts(e,o)].some(S=>nm(v,ht(e,S))));let y=k&&(p===null&&b===null||p===!0||b===!0);return y&&(0,w8.applyFilters)("blockEditor.__unstableCanInsertBlockType",y,r,o,{getBlock:Pl.bind(null,e),getBlockParentsByBlockName:jM.bind(null,e)})},om=(0,Ee.createRegistrySelector)(e=>(0,Ee.createSelector)(oy,(t,o,r)=>Su(e)(t,r)));function Dke(e,t,o=null){return t.every(r=>om(e,ht(e,r),o))}function $M(e,t){if(e.settings.isPreviewMode)return!1;let o=Oi(e,t);if(o===null)return!0;if(o.lock?.remove!==void 0)return!o.lock.remove;let r=Lo(e,t),n=ya(e,r);if(n&&n!=="contentOnly")return!1;let i=!!_u(e,r),s=i?r:yu(e,r),a=!!s,c=zM(ht(e,t));if(a&&!c||a&&ht(e,s)==="core/block")return!1;let u=Ai(e,r),d=ht(e,t),f=(0,Re.getDefaultBlockName)();if(a&&(i||d===f||u==="contentOnly")&&!Kv(e,ht(e,t),r))if(d===f){if(Rr(e,r).filter(p=>ht(e,p)===f).length>1)return!0}else return!1;return u!=="disabled"}function D8(e,t){return t.every(o=>$M(e,o))}function V8(e,t){if(e.settings.isPreviewMode)return!1;let o=Oi(e,t);if(o===null)return!0;if(o.lock?.move!==void 0)return!o.lock.move;let r=Lo(e,t);if(ya(e,r)==="all")return!1;let i=!!yu(e,t),s=zM(ht(e,t));if(i&&!s)return!1;let a=!!_u(e,r),c=Ai(e,r);return i&&(a||c==="contentOnly")&&!Kv(e,ht(e,t),r)?!1:Ai(e,r)!=="disabled"}function Vke(e,t){return t.every(o=>V8(e,o))}function F8(e,t){if(e.settings.isPreviewMode)return!1;let o=Oi(e,t);if(o===null)return!0;let{lock:r}=o;return!r?.edit}function Fke(e,t){return e.settings.isPreviewMode||!(0,Re.hasBlockSupport)(t,"lock",!0)?!1:!!e.settings?.canLockBlocks}function KM(e,t){return e.preferences.insertUsage?.[t]??null}var Jv=(e,t,o)=>(0,Re.hasBlockSupport)(t,"inserter",!0)?oy(e,t.name,o):!1,zke=(e,t)=>o=>{let r=`${t.id}/${o.name}`,{time:n,count:i=0}=KM(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:YM(n,i),isSearchOnly:o.isSearchOnly}},YM=(e,t)=>{if(!e)return t;let o=Date.now()-e;switch(!0){case o<Kbe:return t*4;case o<Ybe:return t*2;case o<qbe:return t/2;default:return t/4}},z8=(e,{buildScope:t="inserter"})=>o=>{let r=o.name,n=!1;(0,Re.hasBlockSupport)(o.name,"multiple",!0)||(n=sC(e,ph(e)).some(({name:f})=>f===o.name));let{time:i,count:s=0}=KM(e,r)||{},a={id:r,name:o.name,title:o.title,icon:o.icon,isDisabled:n,frecency:YM(i,s)};if(t==="transform")return a;let c=(0,Re.getBlockVariations)(o.name,"inserter"),u=(0,Re.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}},jke=(0,Ee.createRegistrySelector)(e=>(0,Ee.createSelector)((t,o=null,r=C8)=>{let n=h=>{let p=h.wp_pattern_sync_status?Ri:{src:Ri,foreground:"var(--wp-block-synced-color)"},g=Yv(h),{time:b,count:k=0}=KM(t,g.name)||{},v=YM(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 iC(g).blocks},syncStatus:g.syncStatus}},i=oy(t,"core/block",o)?F(e(Yt)).getReusableBlocks().map(n):[],s=z8(t,{buildScope:"inserter"}),a=(0,Re.getBlockTypes)().filter(h=>(0,Re.hasBlockSupport)(h,"inserter",!0)).map(s);if(r[xu]!==!1)a=a.filter(h=>Jv(t,h,o));else{let{getClosestAllowedInsertionPoint:h}=F(e(Yt));a=a.filter(p=>WM(t,p,o)&&h(p.name,o)!==null).map(p=>({...p,isAllowedInCurrentRoot:Jv(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=zke(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,Re.getBlockTypes)(),F(e(Yt)).getReusableBlocks(),t.blocks.order,t.preferences.insertUsage,...Su(e)(t,o)])),Uke=(0,Ee.createRegistrySelector)(e=>(0,Ee.createSelector)((t,o,r=null)=>{let n=Array.isArray(o)?o:[o],i=z8(t,{buildScope:"transform"}),s=(0,Re.getBlockTypes)().filter(u=>Jv(t,u,r)).map(i),a=Object.fromEntries(Object.entries(s).map(([,u])=>[u.name,u])),c=(0,Re.getPossibleBlockTransformations)(n).reduce((u,d)=>(a[d?.name]&&u.push(a[d.name]),u),[]);return _a(c,u=>a[u.name].frecency,"desc")},(t,o,r)=>[(0,Re.getBlockTypes)(),t.preferences.insertUsage,...Su(e)(t,r)])),Hke=(e,t=null)=>(0,Re.getBlockTypes)().some(n=>Jv(e,n,t))?!0:oy(e,"core/block",t),FM=(0,Ee.createRegistrySelector)(e=>(0,Ee.createSelector)((t,o=null)=>{if(!o)return;let r=(0,Re.getBlockTypes)().filter(i=>Jv(t,i,o));return oy(t,"core/block",o)&&r.push("core/block"),r},(t,o)=>[(0,Re.getBlockTypes)(),...Su(e)(t,o)])),Gke=(0,Ee.createSelector)((e,t=null)=>((0,$n.default)('wp.data.select( "core/block-editor" ).__experimentalGetAllowedBlocks',{alternative:'wp.data.select( "core/block-editor" ).getAllowedBlocks',since:"6.2",version:"6.4"}),FM(e,t)),(e,t)=>FM.getDependants(e,t));function j8(e,t=null){if(!t)return;let{defaultBlock:o,directInsert:r}=e.blockListSettings[t]??{};if(!(!o||!r))return o}function Wke(e,t=null){return(0,$n.default)('wp.data.select( "core/block-editor" ).__experimentalGetDirectInsertBlock',{alternative:'wp.data.select( "core/block-editor" ).getDirectInsertBlock',since:"6.3",version:"6.4"}),j8(e,t)}var $ke=(0,Ee.createRegistrySelector)(e=>(t,o)=>{let r=F(e(Yt)).getPatternBySlug(o);return r?iC(r):null}),qM=e=>(t,o)=>[...Zv(e)(t),...Su(e)(t,o)],S8=new WeakMap;function Kke(e){let t=S8.get(e);return t||(t={...e,get blocks(){return iC(e).blocks}},S8.set(e,t)),t}var Yke=(0,Ee.createRegistrySelector)(e=>(0,Ee.createSelector)((t,o=null,r=C8)=>{let{getAllPatterns:n}=F(e(Yt)),i=n(),{allowedBlockTypes:s}=vu(t);return i.filter(({inserter:d=!0})=>!!d).map(Kke).filter(d=>qv(em(d),s)).filter(d=>em(d).every(({blockName:f})=>r[xu]!==!1?om(t,f,o):WM(t,f,o)))},qM(e))),qke=(0,Ee.createRegistrySelector)(e=>(0,Ee.createSelector)((t,o,r=null)=>{if(!o)return kr;let n=e(Yt).__experimentalGetAllowedPatterns(r),i=Array.isArray(o)?o:[o],s=n.filter(a=>a?.blockTypes?.some?.(c=>i.includes(c)));return s.length===0?kr:s},(t,o,r)=>qM(e)(t,r))),Zke=(0,Ee.createRegistrySelector)(e=>((0,$n.default)('wp.data.select( "core/block-editor" ).__experimentalGetPatternsByBlockTypes',{alternative:'wp.data.select( "core/block-editor" ).getPatternsByBlockTypes',since:"6.2",version:"6.4"}),e(Yt).getPatternsByBlockTypes)),Xke=(0,Ee.createRegistrySelector)(e=>(0,Ee.createSelector)((t,o,r=null)=>{if(!o||o.some(({clientId:i,innerBlocks:s})=>s.length||aC(t,i)))return kr;let n=Array.from(new Set(o.map(({name:i})=>i)));return e(Yt).getPatternsByBlockTypes(n,r)},(t,o,r)=>qM(e)(t,r)));function ZM(e,t){return e.blockListSettings[t]}function vu(e){return e.settings}function Qke(e){return e.blocks.isPersistentChange}var Jke=(0,Ee.createSelector)((e,t=[])=>t.reduce((o,r)=>e.blockListSettings[r]?{...o,[r]:e.blockListSettings[r]}:o,{}),e=>[e.blockListSettings]),eve=(0,Ee.createRegistrySelector)(e=>(0,Ee.createSelector)((t,o)=>{(0,$n.default)("wp.data.select( 'core/block-editor' ).__experimentalGetReusableBlockTitle",{since:"6.6",version:"6.8"});let r=F(e(Yt)).getReusableBlocks().find(n=>n.id===o);return r?r.title?.raw:null},()=>[F(e(Yt)).getReusableBlocks()]));function tve(e){return e.blocks.isIgnoredChange}function ove(e){return e.lastBlockAttributesChange}function rve(){return(0,$n.default)('wp.data.select( "core/block-editor" ).hasBlockMovingClientId',{since:"6.7",hint:"Block moving mode feature has been removed"}),!1}function nve(e){return!!e.automaticChangeStatus}function ive(e,t){return e.highlightedBlock===t}function aC(e,t){return!!e.blocks.controlledInnerBlocks[t]}var sve=(0,Ee.createSelector)((e,t)=>{if(!t.length)return null;let o=gh(e);if(t.includes(ht(e,o)))return o;let r=wu(e),n=jM(e,o||r[0],t);return n?n[n.length-1]:null},(e,t)=>[e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId,t]);function ave(e,t,o){let{lastBlockInserted:r}=e;return r.clientIds?.includes(t)&&r.source===o}function lve(e,t){return e.blockVisibility?.[t]??!0}function cve(){(0,$n.default)("wp.data.select( 'core/block-editor' ).getHoveredBlockClientId",{since:"6.9",version:"7.1"})}var uve=(0,Ee.createSelector)(e=>{let t=new Set(Object.keys(e.blockVisibility).filter(o=>e.blockVisibility[o]));return t.size===0?Zbe:t},e=>[e.blockVisibility]);function U8(e,t){if(Ai(e,t)!=="default")return!1;if(!F8(e,t))return!0;if(DM(e)){let n=tm(e);if(n){if(Rr(e,n)?.includes(t))return!0}else if(t&&!Lo(e,t))return!0}return((0,Re.hasBlockSupport)(ht(e,t),"__experimentalDisableBlockOverlay",!1)?!1:aC(e,t))&&!A8(e,t)&&!L8(e,t,!0)}function dve(e,t){let o=e.blocks.parents.get(t);for(;o;){if(U8(e,o))return!0;o=e.blocks.parents.get(o)}return!1}function Ai(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 fve=(0,Ee.createRegistrySelector)(e=>(t,o="")=>{let r=o||gh(t);if(!r||_u(t,r))return!1;let{getGroupingBlockName:n}=e(Re.store),i=Pl(t,r),s=n();return i&&(i.name===s||(0,Re.getBlockType)(i.name)?.transforms?.ungroup)&&!!i.innerBlocks.length&&$M(t,r)}),mve=(0,Ee.createRegistrySelector)(e=>(t,o=kr)=>{let{getGroupingBlockName:r}=e(Re.store),n=r(),i=o?.length?o:bh(t),s=i?.length?Lo(t,i[0]):void 0;return om(t,n,s)&&i.length&&D8(t,i)}),pve=(e,t)=>((0,$n.default)("wp.data.select( 'core/block-editor' ).__unstableGetContentLockingParent",{since:"6.1",version:"6.7"}),LM(e,t));function hve(e){return(0,$n.default)("wp.data.select( 'core/block-editor' ).__unstableGetTemporarilyEditingAsBlocks",{since:"6.1",version:"6.7"}),NM(e)}var lC={};ka(lC,{__experimentalUpdateSettings:()=>QM,clearBlockRemovalPrompt:()=>_ve,clearRequestedInspectorTab:()=>Fve,closeListViewContentPanel:()=>Nve,deleteStyleOverride:()=>wve,editContentOnlySection:()=>eD,ensureDefaultBlock:()=>Y8,expandBlock:()=>Tve,hideBlockInterface:()=>kve,hideViewportModal:()=>Dve,openListViewContentPanel:()=>Lve,privateRemoveBlocks:()=>JM,requestInspectorTab:()=>Vve,resetZoomLevel:()=>Ove,setBlockRemovalRules:()=>Sve,setInsertionPoint:()=>Ive,setLastFocus:()=>Cve,setStyleOverride:()=>xve,setZoomLevel:()=>Rve,showBlockInterface:()=>vve,showViewportModal:()=>Mve,startDragging:()=>Bve,stopDragging:()=>Eve,stopEditingContentOnlySection:()=>Pve,toggleBlockSpotlight:()=>Ave});var G8=l(O(),1),W8=l(Pe(),1),$8=l(er(),1),K8=l(N(),1),gve=e=>Array.isArray(e)?e:[e],bve=["inserterMediaCategories","blockInspectorAnimation","mediaSideload"];function QM(e,{stripExperimentalSettings:t=!1,reset:o=!1}={}){let r=e;Object.hasOwn(r,"__unstableIsPreviewMode")&&((0,W8.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&&G8.Platform.OS==="web"){n={};for(let i in r)bve.includes(i)||(n[i]=r[i])}return{type:"UPDATE_SETTINGS",settings:n,reset:o}}function kve(){return{type:"HIDE_BLOCK_INTERFACE"}}function vve(){return{type:"SHOW_BLOCK_INTERFACE"}}var JM=(e,t=!0,o=!1)=>({select:r,dispatch:n,registry:i})=>{if(!e||!e.length||(e=gve(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(yve(e,t,m));return}}t&&n.selectPreviousBlock(e[0],t),i.batch(()=>{n({type:"REMOVE_BLOCKS",clientIds:e}),n(Y8())})},Y8=()=>({select:e,dispatch:t})=>{if(e.getBlockCount()>0)return;let{__unstableHasCustomAppender:r}=e.getSettings();r||t.insertDefaultBlock()};function yve(e,t,o){return{type:"DISPLAY_BLOCK_REMOVAL_PROMPT",clientIds:e,selectPrevious:t,message:o}}function _ve(){return{type:"CLEAR_BLOCK_REMOVAL_PROMPT"}}function Sve(e=!1){return{type:"SET_BLOCK_REMOVAL_RULES",rules:e}}function xve(e,t){return{type:"SET_STYLE_OVERRIDE",id:e,style:t}}function wve(e){return{type:"DELETE_STYLE_OVERRIDE",id:e}}function Cve(e=null){return{type:"LAST_FOCUS",lastFocus:e}}function Bve(){return{type:"START_DRAGGING"}}function Eve(){return{type:"STOP_DRAGGING"}}function Tve(e){return{type:"SET_BLOCK_EXPANDED_IN_LIST_VIEW",clientId:e}}function Ive(e){return{type:"SET_INSERTION_POINT",value:e}}function eD(e){return{type:"EDIT_CONTENT_ONLY_SECTION",clientId:e}}function Pve(){return{type:"EDIT_CONTENT_ONLY_SECTION"}}var Rve=(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,$8.speak)((0,K8.__)("You are currently in zoom-out mode."))}}o({type:"SET_ZOOM_LEVEL",zoom:e})};function Ove(){return{type:"RESET_ZOOM_LEVEL"}}function Ave(e,t){return{type:"TOGGLE_BLOCK_SPOTLIGHT",clientId:e,hasBlockSpotlight:t}}function Lve(){return{type:"OPEN_LIST_VIEW_CONTENT_PANEL"}}function Nve(){return{type:"CLOSE_LIST_VIEW_CONTENT_PANEL"}}function Mve(e){return{type:"SHOW_VIEWPORT_MODAL",clientIds:e}}function Dve(){return{type:"HIDE_VIEWPORT_MODAL"}}function Vve(e,t={}){return{type:"REQUEST_INSPECTOR_TAB",tabName:e,options:t}}function Fve(){return{type:"CLEAR_REQUESTED_INSPECTOR_TAB"}}var rD={};ka(rD,{__unstableDeleteSelection:()=>cye,__unstableExpandSelection:()=>dye,__unstableIncrementListViewExpandRevision:()=>Wye,__unstableMarkAutomaticChange:()=>Iye,__unstableMarkLastChangeAsPersistent:()=>Eye,__unstableMarkNextChangeAsNotPersistent:()=>Tye,__unstableSaveReusableBlock:()=>Bye,__unstableSetAllListViewPanelsOpen:()=>Hye,__unstableSetEditorMode:()=>Pye,__unstableSetOpenListViewPanel:()=>Uye,__unstableSetTemporarilyEditingAsBlocks:()=>Vye,__unstableSplitSelection:()=>uye,__unstableToggleListViewPanel:()=>Gye,clearSelectedBlock:()=>Qve,duplicateBlocks:()=>Oye,enterFormattedText:()=>yye,exitFormattedText:()=>_ye,flashBlock:()=>Nye,hideInsertionPoint:()=>sye,hoverBlock:()=>$ve,insertAfterBlock:()=>Lye,insertBeforeBlock:()=>Aye,insertBlock:()=>nye,insertBlocks:()=>n7,insertDefaultBlock:()=>xye,mergeBlocks:()=>fye,moveBlockToPosition:()=>rye,moveBlocksDown:()=>tye,moveBlocksToPosition:()=>r7,moveBlocksUp:()=>oye,multiSelect:()=>Xve,receiveBlocks:()=>Uve,registerInserterMediaCategory:()=>Fye,removeBlock:()=>mye,removeBlocks:()=>i7,replaceBlock:()=>eye,replaceBlocks:()=>t7,replaceInnerBlocks:()=>pye,resetBlocks:()=>zve,resetSelection:()=>jve,selectBlock:()=>Wve,selectNextBlock:()=>Yve,selectPreviousBlock:()=>Kve,selectionChange:()=>Sye,setBlockEditingMode:()=>zye,setBlockMovingClientId:()=>Rye,setBlockVisibility:()=>Dye,setHasControlledInnerBlocks:()=>Mye,setTemplateValidity:()=>aye,showInsertionPoint:()=>iye,startDraggingBlocks:()=>kye,startMultiSelect:()=>qve,startTyping:()=>gye,stopDraggingBlocks:()=>vye,stopMultiSelect:()=>Zve,stopTyping:()=>bye,synchronizeTemplate:()=>lye,toggleBlockHighlight:()=>oD,toggleBlockMode:()=>hye,toggleSelection:()=>Jve,unsetBlockEditingMode:()=>jye,updateBlock:()=>Gve,updateBlockAttributes:()=>Hve,updateBlockListSettings:()=>wye,updateSettings:()=>Cye,validateBlocksToTemplate:()=>e7});var ke=l($(),1),cC=l(er(),1),Cu=l(N(),1),Q8=l(Li(),1),gt=l(br(),1),Ol=l(Pe(),1),J8=l(kh(),1);var X8=l(br(),1),Rl="\x86";function ry(e){if(e)return Object.keys(e).find(t=>{let o=e[t];return(typeof o=="string"||o instanceof X8.RichTextData)&&o.toString().indexOf(Rl)!==-1})}function tD(e){for(let[t,o]of Object.entries(e.attributes))if(o.source==="rich-text"||o.source==="html")return t}var vh=e=>Array.isArray(e)?e:[e],zve=e=>({dispatch:t})=>{t({type:"RESET_BLOCKS",blocks:e}),t(e7(e))},e7=e=>({select:t,dispatch:o})=>{let r=t.getTemplate(),n=t.getTemplateLock(),i=!r||n!=="all"||(0,ke.doBlocksMatchTemplate)(e,r),s=t.isValidTemplate();if(i!==s)return o.setTemplateValidity(i),i};function jve(e,t,o){return{type:"RESET_SELECTION",selectionStart:e,selectionEnd:t,initialPosition:o}}function Uve(e){return(0,Ol.default)('wp.data.dispatch( "core/block-editor" ).receiveBlocks',{since:"5.9",alternative:"resetBlocks or insertBlocks"}),{type:"RECEIVE_BLOCKS",blocks:e}}function Hve(e,t,o={uniqueByBlock:!1}){return typeof o=="boolean"&&(o={uniqueByBlock:o}),{type:"UPDATE_BLOCK_ATTRIBUTES",clientIds:vh(e),attributes:t,options:o}}function Gve(e,t){return{type:"UPDATE_BLOCK",clientId:e,updates:t}}function Wve(e,t=0){return{type:"SELECT_BLOCK",initialPosition:t,clientId:e}}function $ve(){return(0,Ol.default)('wp.data.dispatch( "core/block-editor" ).hoverBlock',{since:"6.9",version:"7.1"}),{type:"DO_NOTHING"}}var Kve=(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)}}},Yve=e=>({select:t,dispatch:o})=>{let r=t.getNextBlockClientId(e);r&&o.selectBlock(r)};function qve(){return{type:"START_MULTI_SELECT"}}function Zve(){return{type:"STOP_MULTI_SELECT"}}var Xve=(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,cC.speak)((0,Cu.sprintf)((0,Cu._n)("%s block selected.","%s blocks selected.",a),a),"assertive")};function Qve(){return{type:"CLEAR_SELECTED_BLOCK"}}function Jve(e=!0){return{type:"TOGGLE_SELECTION",isSelectionEnabled:e}}var t7=(e,t,o,r=0,n)=>({select:i,dispatch:s,registry:a})=>{e=vh(e),t=vh(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 eye(e,t){return t7(e,t)}var o7=e=>(t,o)=>({select:r,dispatch:n})=>{r.canMoveBlocks(t)&&n({type:e,clientIds:vh(t),rootClientId:o})},tye=o7("MOVE_BLOCKS_DOWN"),oye=o7("MOVE_BLOCKS_UP"),r7=(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 rye(e,t="",o="",r){return r7([e],t,o,r)}function nye(e,t,o,r,n,i){return n7([e],t,o,r,n,i)}var n7=(e,t,o,r=!0,n=0,i)=>({select:s,dispatch:a})=>{n!==null&&typeof n=="object"&&(i=n,n=0,(0,Ol.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=vh(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 iye(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 sye=()=>({select:e,dispatch:t})=>{e.isBlockInsertionPointVisible()&&t({type:"HIDE_INSERTION_POINT"})};function aye(e){return{type:"SET_TEMPLATE_VALIDITY",isValid:e}}var lye=()=>({select:e,dispatch:t})=>{t({type:"SYNCHRONIZE_TEMPLATE"});let o=e.getBlocks(),r=e.getTemplate(),n=(0,ke.synchronizeBlocksWithTemplate)(o,r);t.resetBlocks(n)},cye=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,ke.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,gt.create)({html:_}),B=(0,gt.create)({html:S});C=(0,gt.remove)(C,b.offset,C.text.length),B=(0,gt.insert)(B,Rl,0,k.offset);let P=(0,ke.cloneBlock)(v,{[b.attributeKey]:(0,gt.toHTMLString)({value:C})}),R=(0,ke.cloneBlock)(y,{[k.attributeKey]:(0,gt.toHTMLString)({value:B})}),E=e?P:R,L=v.name===y.name?[E]:(0,ke.switchToBlockType)(E,g.name);if(!L||!L.length)return;let T;if(e){let ie=L.pop();T=g.merge(ie.attributes,R.attributes)}else{let ie=L.shift();T=g.merge(P.attributes,ie.attributes)}let I=ry(T),M=T[I],D=(0,gt.create)({html:M}),U=D.text.indexOf(Rl),j=(0,gt.remove)(D,U,U+1),H=(0,gt.toHTMLString)({value:j});T[I]=H;let G=o.getSelectedBlockClientIds(),Q=[...e?L:[],{...p,attributes:{...p.attributes,...T}},...e?[]:L];t.batch(()=>{r.selectionChange(p.clientId,I,U,U),r.replaceBlocks(G,Q,0,o.getSelectedBlocksInitialCaretPosition())})},uye=(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,ke.getBlockType)(g.name),v=(0,ke.getBlockType)(b.name),y=typeof h.attributeKey=="string"?h.attributeKey:tD(k),_=typeof p.attributeKey=="string"?p.attributeKey:tD(v),S=o.getBlockAttributes(h.clientId);if(S?.metadata?.bindings?.[y]){if(e.length){let{createWarningNotice:te}=t.dispatch(Q8.store);te((0,Cu.__)("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,ke.isUnmodifiedDefaultBlock)(g,"content")){r.replaceBlocks([h.clientId],e,e.length-1,-1);return}}else if(!o.getBlockOrder(h.clientId).length){let te=function(){let Z=(0,ke.getDefaultBlockName)();return o.canInsertBlockType(Z,s)?(0,ke.createBlock)(Z):(0,ke.createBlock)(o.getBlockName(h.clientId))};var B=te;let ne=S[y].length;if(h.offset===0&&ne){r.insertBlocks([te()],o.getBlockIndex(h.clientId),s,!1);return}if(h.offset===ne){r.insertBlocks([te()],o.getBlockIndex(h.clientId)+1,s);return}}}let P=g.attributes[y],R=b.attributes[_],E=(0,gt.create)({html:P}),L=(0,gt.create)({html:R});E=(0,gt.remove)(E,h.offset,E.text.length),L=(0,gt.remove)(L,0,p.offset);let T={...g,innerBlocks:g.clientId===b.clientId?[]:g.innerBlocks,attributes:{...g.attributes,[y]:(0,gt.toHTMLString)({value:E})}},I={...b,clientId:g.clientId===b.clientId?(0,ke.createBlock)(b.name).clientId:b.clientId,attributes:{...b.attributes,[_]:(0,gt.toHTMLString)({value:L})}},M=(0,ke.getDefaultBlockName)();if(g.clientId===b.clientId&&M&&I.name!==M&&o.canInsertBlockType(M,s)){let te=(0,ke.switchToBlockType)(I,M);te?.length===1&&(I=te[0])}if(!e.length){r.replaceBlocks(o.getSelectedBlockClientIds(),[T,I]);return}let D,U=[],j=[...e],H=j.shift(),G=(0,ke.getBlockType)(T.name),Q=G.merge&&H.name===G.name?[H]:(0,ke.switchToBlockType)(H,G.name);if(Q?.length){let te=Q.shift();T={...T,attributes:{...T.attributes,...G.merge(T.attributes,te.attributes)}},U.push(T),D={clientId:T.clientId,attributeKey:y,offset:(0,gt.create)({html:T.attributes[y]}).text.length},j.unshift(...Q)}else(0,ke.isUnmodifiedBlock)(T)||U.push(T),U.push(H);let ie=j.pop(),ce=(0,ke.getBlockType)(I.name);if(j.length&&U.push(...j),ie){let te=ce.merge&&ce.name===ie.name?[ie]:(0,ke.switchToBlockType)(ie,ce.name);if(te?.length){let ne=te.pop();U.push({...I,attributes:{...I.attributes,...ce.merge(ne.attributes,I.attributes)}}),U.push(...te),D={clientId:I.clientId,attributeKey:_,offset:(0,gt.create)({html:ne.attributes[_]}).text.length}}else U.push(ie),(0,ke.isUnmodifiedBlock)(I)||U.push(I)}else(0,ke.isUnmodifiedBlock)(I)||U.push(I);t.batch(()=>{r.replaceBlocks(o.getSelectedBlockClientIds(),U,U.length-1,0),D&&r.selectionChange(D.clientId,D.attributeKey,D.offset,D.offset)})},dye=()=>({select:e,dispatch:t})=>{let o=e.getSelectionStart(),r=e.getSelectionEnd();t.selectionChange({start:{clientId:o.clientId},end:{clientId:r.clientId}})},fye=(e,t)=>({registry:o,select:r,dispatch:n})=>{let i=e,s=t,a=r.getBlock(i),c=(0,ke.getBlockType)(a.name);if(!c||r.getBlockEditingMode(i)==="disabled"||r.getBlockEditingMode(s)==="disabled")return;let u=r.getBlock(s);if(!c.merge&&(0,ke.getBlockSupport)(a.name,"__experimentalOnMerge")){let S=(0,ke.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 P=r.getBlockAttributes(i),R=r.getBlockAttributes(B);Object.keys(P).every(E=>P[E]===R[E])&&(n.moveBlocksToPosition(r.getBlockOrder(B),B,i),n.removeBlock(B,!1))}});return}if((0,ke.isUnmodifiedDefaultBlock)(a)){n.removeBlock(i,r.isBlockSelected(i));return}if((0,ke.isUnmodifiedDefaultBlock)(u)){n.removeBlock(s,r.isBlockSelected(s));return}if(!c.merge){(0,ke.isUnmodifiedBlock)(u,"content")?n.removeBlock(s,r.isBlockSelected(s)):n.selectBlock(a.clientId);return}let d=(0,ke.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,ke.cloneBlock)(a),v=(0,ke.cloneBlock)(u);if(b){let S=f===i?k:v,C=S.attributes[m],B=(0,gt.insert)((0,gt.create)({html:C}),Rl,h,h);S.attributes[m]=(0,gt.toHTMLString)({value:B})}let y=a.name===u.name?[v]:(0,ke.switchToBlockType)(v,a.name);if(!y||!y.length)return;let _=c.merge(k.attributes,y[0].attributes);if(b){let S=ry(_),C=_[S],B=(0,gt.create)({html:C}),P=B.text.indexOf(Rl),R=(0,gt.remove)(B,P,P+1),E=(0,gt.toHTMLString)({value:R});_[S]=E,n.selectionChange(a.clientId,S,P,P)}n.replaceBlocks([a.clientId,u.clientId],[{...a,attributes:{...a.attributes,..._}},...y.slice(1)],0)},i7=(e,t=!0)=>JM(e,t);function mye(e,t){return i7([e],t)}function pye(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 hye(e){return{type:"TOGGLE_BLOCK_MODE",clientId:e}}function gye(){return{type:"START_TYPING"}}function bye(){return{type:"STOP_TYPING"}}function kye(e=[]){return{type:"START_DRAGGING_BLOCKS",clientIds:e}}function vye(){return{type:"STOP_DRAGGING_BLOCKS"}}function yye(){return(0,Ol.default)('wp.data.dispatch( "core/block-editor" ).enterFormattedText',{since:"6.1",version:"6.3"}),{type:"DO_NOTHING"}}function _ye(){return(0,Ol.default)('wp.data.dispatch( "core/block-editor" ).exitFormattedText',{since:"6.1",version:"6.3"}),{type:"DO_NOTHING"}}function Sye(e,t,o,r){return typeof e=="string"?{type:"SELECTION_CHANGE",clientId:e,attributeKey:t,startOffset:o,endOffset:r}:{type:"SELECTION_CHANGE",...e}}var xye=(e,t,o)=>({dispatch:r})=>{let n=(0,ke.getDefaultBlockName)();if(!n)return;let i=(0,ke.createBlock)(n,e);return r.insertBlock(i,o,t)};function wye(e,t){return{type:"UPDATE_BLOCK_LIST_SETTINGS",clientId:e,settings:t}}function Cye(e){return QM(e,{stripExperimentalSettings:!0})}function Bye(){return(0,Ol.default)('wp.data.dispatch( "core/block-editor" ).__unstableSaveReusableBlock',{since:"7.1"}),{type:"DO_NOTHING"}}function Eye(){return{type:"MARK_LAST_CHANGE_AS_PERSISTENT"}}function Tye(){return{type:"MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"}}var Iye=()=>({dispatch:e})=>{e({type:"MARK_AUTOMATIC_CHANGE"});let{requestIdleCallback:t=o=>setTimeout(o,100)}=window;t(()=>{e({type:"MARK_AUTOMATIC_CHANGE_FINAL"})})},Pye=e=>({registry:t})=>{t.dispatch(J8.store).set("core","editorTool",e),e==="navigation"?(0,cC.speak)((0,Cu.__)("You are currently in Write mode.")):e==="edit"&&(0,cC.speak)((0,Cu.__)("You are currently in Design mode."))};function Rye(){return(0,Ol.default)('wp.data.dispatch( "core/block-editor" ).setBlockMovingClientId',{since:"6.7",hint:"Block moving mode feature has been removed"}),{type:"DO_NOTHING"}}var Oye=(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,ke.hasBlockSupport)(d,"multiple",!0)))return;let s=o.getBlockRootClientId(e[0]),a=vh(e),c=o.getBlockIndex(a[a.length-1]),u=n.map(d=>(0,ke.__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)},Aye=e=>({select:t,dispatch:o})=>{if(!e)return;let r=t.getBlockRootClientId(e);if(t.getTemplateLock(r))return;let i=t.getBlockIndex(e),s=r?t.getDirectInsertBlock(r):null;if(!s)return o.insertDefaultBlock({},r,i);let a={};if(s.attributesToCopy){let u=t.getBlockAttributes(e);s.attributesToCopy.forEach(d=>{u[d]&&(a[d]=u[d])})}let c=(0,ke.createBlock)(s.name,{...s.attributes,...a});return o.insertBlock(c,i,r)},Lye=e=>({select:t,dispatch:o})=>{if(!e)return;let r=t.getBlockRootClientId(e);if(t.getTemplateLock(r))return;let i=t.getBlockIndex(e),s=r?t.getDirectInsertBlock(r):null;if(!s)return o.insertDefaultBlock({},r,i+1);let a={};if(s.attributesToCopy){let u=t.getBlockAttributes(e);s.attributesToCopy.forEach(d=>{u[d]&&(a[d]=u[d])})}let c=(0,ke.createBlock)(s.name,{...s.attributes,...a});return o.insertBlock(c,i+1,r)};function oD(e,t){return{type:"TOGGLE_BLOCK_HIGHLIGHT",clientId:e,isHighlighted:t}}var Nye=(e,t=150)=>async({dispatch:o})=>{o(oD(e,!0)),await new Promise(r=>setTimeout(r,t)),o(oD(e,!1))};function Mye(e,t){return{type:"SET_HAS_CONTROLLED_INNER_BLOCKS",hasControlledInnerBlocks:t,clientId:e}}function Dye(e){return{type:"SET_BLOCK_VISIBILITY",updates:e}}function Vye(e){return(0,Ol.default)("wp.data.dispatch( 'core/block-editor' ).__unstableSetTemporarilyEditingAsBlocks",{since:"7.0"}),eD(e)}var Fye=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 zye(e="",t){return{type:"SET_BLOCK_EDITING_MODE",clientId:e,mode:t}}function jye(e=""){return{type:"UNSET_BLOCK_EDITING_MODE",clientId:e}}function Uye(e){return{type:"SET_OPEN_LIST_VIEW_PANEL",clientId:e}}function Hye(){return{type:"SET_ALL_LIST_VIEW_PANELS_OPEN"}}function Gye(e,t){return{type:"TOGGLE_LIST_VIEW_PANEL",clientId:e,isOpen:t}}function Wye(){return{type:"INCREMENT_LIST_VIEW_EXPAND_REVISION"}}var yh={reducer:r8,selectors:XM,actions:rD},x=(0,uC.createReduxStore)(Yt,{...yh,persist:["preferences"]}),s7=(0,uC.registerStore)(Yt,{...yh,persist:["preferences"]});F(s7).registerPrivateActions(lC);F(s7).registerPrivateSelectors(rC);F(x).registerPrivateActions(lC);F(x).registerPrivateSelectors(rC);var _h=l(A(),1),a7=l(N(),1);var Is=l(w(),1);function $ye({className:e,actions:t,children:o,secondaryActions:r}){return(0,Is.jsx)("div",{style:{display:"contents",all:"initial"},children:(0,Is.jsx)("div",{className:V(e,"block-editor-warning"),children:(0,Is.jsxs)("div",{className:"block-editor-warning__contents",children:[(0,Is.jsx)("p",{className:"block-editor-warning__message",children:o}),(t?.length>0||r)&&(0,Is.jsxs)("div",{className:"block-editor-warning__actions",children:[t?.length>0&&t.map((n,i)=>(0,Is.jsx)("span",{className:"block-editor-warning__action",children:n},i)),r&&(0,Is.jsx)(_h.DropdownMenu,{className:"block-editor-warning__secondary",icon:Bs,label:(0,a7.__)("More options"),popoverProps:{placement:"bottom-end",className:"block-editor-warning__dropdown"},noIcons:!0,children:()=>(0,Is.jsx)(_h.MenuGroup,{children:r.map((n,i)=>(0,Is.jsx)(_h.MenuItem,{onClick:n.onClick,children:n.title},i))})})]})]})})})}var Bu=$ye;var Sh=l(w(),1);function u7({originalBlockClientId:e,name:t,onReplace:o}){let{selectBlock:r}=(0,c7.useDispatch)(x),n=(0,l7.getBlockType)(t);return(0,Sh.jsxs)(Bu,{actions:[(0,Sh.jsx)(nD.Button,{__next40pxDefaultSize:!0,variant:"secondary",onClick:()=>r(e),children:(0,dC.__)("Find original")},"find-original"),(0,Sh.jsx)(nD.Button,{__next40pxDefaultSize:!0,variant:"secondary",onClick:()=>o([]),children:(0,dC.__)("Remove")},"remove")],children:[(0,Sh.jsxs)("strong",{children:[n?.title,": "]}),(0,dC.__)("This block can only be used once.")]})}var ny=l(w(),1);function pC({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,fC.hasBlockSupport)(s,"layout",!1)||(0,fC.hasBlockSupport)(s,"__experimentalLayout",!1),b=!!Ie()[fv]||(0,fC.hasBlockSupport)(s,"listView")||s==="core/navigation",{originalBlockClientId:k}=(0,mC.useContext)(pr);return(0,ny.jsxs)(j0,{value:(0,mC.useMemo)(()=>({name:s,isSelected:a,clientId:c,layout:p?f:null,__unstableLayoutClassNames:d,[ws]:e,[Qp]:t,[nu]:o&&r!=="disabled",[F0]:r,[Jp]:h,[z0]:n,[fv]:b}),[s,a,c,p,f,d,e,t,o,r,h,n,b]),children:[(0,ny.jsx)(Gj,{...i}),k&&(0,ny.jsx)(u7,{originalBlockClientId:k,name:s,onReplace:i.onReplace})]})}function he(...e){let{clientId:t=null}=Ie();return(0,d7.useSelect)(o=>F(o(x)).getBlockSettings(t,...e),[t,...e])}function m7(e){(0,f7.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]=he(e);return t}var gC=l(w(),1),{kebabCase:Kye}=F(h7.privateApis),p7=([e,...t])=>e.toUpperCase()+t.join(""),Yye=e=>(0,im.createHigherOrderComponent)(t=>function(r){return(0,gC.jsx)(t,{...r,colors:e})},"withCustomColorPalette"),qye=()=>(0,im.createHigherOrderComponent)(e=>function(o){let[r,n,i]=he("color.palette.custom","color.palette.theme","color.palette.default"),s=(0,hC.useMemo)(()=>[...r||[],...n||[],...i||[]],[r,n,i]);return(0,gC.jsx)(e,{...o,colors:s})},"withEditorColorPalette");function g7(e,t){let o=e.reduce((r,n)=>({...r,...typeof n=="string"?{[n]:Kye(n)}:n}),{});return(0,im.compose)([t,r=>class extends hC.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 Lj(s,i)}createSetters(){return Object.keys(o).reduce((i,s)=>{let a=p7(s),c=`custom${a}`;return i[`set${a}`]=this.createSetColor(s,c),i},{})}createSetColor(i,s){return a=>{let c=H0(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=va(s,i[u],i[`custom${p7(u)}`]),m=a[u];return m?.color===f.color&&m?c[u]=m:c[u]={...f,class:Bi(d,f.slug)},c},{})}render(){return(0,gC.jsx)(r,{...this.props,colors:void 0,...this.state,...this.setters,colorUtils:this.colorUtils})}}])}function b7(e){return(...t)=>{let o=Yye(e);return(0,im.createHigherOrderComponent)(g7(t,o),"withCustomColors")}}function k7(...e){let t=qye();return(0,im.createHigherOrderComponent)(g7(e,t),"withColors")}var bC=l(O(),1),kC=l(z(),1);function xh(e){if(e)return`has-${e}-gradient-background`}function vC(e,t){let o=e?.find(r=>r.slug===t);return o&&o.gradient}function v7(e,t){return e?.find(r=>r.gradient===t)}function y7(e,t){let o=v7(e,t);return o&&o.slug}function Zye({gradientAttribute:e="gradient",customGradientAttribute:t="customGradient"}={}){let{clientId:o}=Ie(),[r,n,i]=he("color.gradients.custom","color.gradients.theme","color.gradients.default"),s=(0,bC.useMemo)(()=>[...r||[],...n||[],...i||[]],[r,n,i]),{gradient:a,customGradient:c}=(0,kC.useSelect)(h=>{let{getBlockAttributes:p}=h(x),g=p(o)||{};return{customGradient:g[t],gradient:g[e]}},[o,e,t]),{updateBlockAttributes:u}=(0,kC.useDispatch)(x),d=(0,bC.useCallback)(h=>{let p=y7(s,h);if(p){u(o,{[e]:p,[t]:void 0});return}u(o,{[e]:void 0,[t]:h})},[s,o,u]),f=xh(a),m;return a?m=vC(s,a):m=c,{gradientClass:f,gradientValue:m,setGradient:d}}var _7=l(A(),1);var{kebabCase:Xye}=F(_7.privateApis),wh=(e,t,o)=>{if(t){let r=e?.find(({slug:n})=>n===t);if(r)return r}return{size:o}};function iD(e,t){let o=e?.find(({size:r})=>r===t);return o||{size:t}}function Eu(e){if(e)return`has-${Xye(e)}-font-size`}var Qye="1600px",Jye="320px",e_e=1,t_e=.25,o_e=.75,r_e="14px";function S7({minimumFontSize:e,maximumFontSize:t,fontSize:o,minimumViewportWidth:r=Jye,maximumViewportWidth:n=Qye,scaleFactor:i=e_e,minimumFontSizeLimit:s}){if(s=Tu(s)?s:r_e,o){let y=Tu(o);if(!y?.unit)return null;let _=Tu(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),t_e),o_e),B=iy(y.value*C,3);_?.value&&B<_?.value?e=`${_.value}${_.unit}`:e=`${B}${y.unit}`}}let a=Tu(e),c=a?.unit||"rem",u=Tu(t,{coerceTo:c});if(!a||!u)return null;let d=Tu(e,{coerceTo:"rem"}),f=Tu(n,{coerceTo:c}),m=Tu(r,{coerceTo:c});if(!f||!m||!d)return null;let h=f.value-m.value;if(!h)return null;let p=iy(m.value/100,3),g=iy(p,3)+c,b=100*((u.value-a.value)/h),k=iy((b||1)*i,3),v=`${d.value}${d.unit} + ((1vw - ${g}) * ${k})`;return`clamp(${e}, ${v}, ${t})`}function Tu(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:iy(d,3),unit:u}}function iy(e,t=3){let o=Math.pow(10,t);return Number.isFinite(e)?parseFloat(Math.round(e*o)/o):void 0}var x7=l(A(),1);var w7=l(w(),1);function n_e(e){let[t,o]=he("typography.fontSizes","typography.customFontSize");return(0,w7.jsx)(x7.FontSizePicker,{...e,fontSizes:t,disableCustomFontSizes:!o,__next40pxDefaultSize:!0})}var sD=n_e;var sy=l(X(),1),B7=l(O(),1);var aD=l(w(),1),i_e=[],C7=([e,...t])=>e.toUpperCase()+t.join(""),E7=(...e)=>{let t=e.reduce((o,r)=>(o[r]=`custom${C7(r)}`,o),{});return(0,sy.createHigherOrderComponent)((0,sy.compose)([(0,sy.createHigherOrderComponent)(o=>function(n){let[i]=he("typography.fontSizes");return(0,aD.jsx)(o,{...n,fontSizes:i||i_e})},"withFontSizes"),o=>class extends B7.Component{constructor(n){super(n),this.setters=this.createSetters(),this.state={}}createSetters(){return Object.entries(t).reduce((n,[i,s])=>{let a=C7(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=wh(i,m,n[f]);return u[d]={...h,class:Eu(m)},u},{});return{...s,...c}}render(){return(0,aD.jsx)(o,{...this.props,fontSizes:void 0,...this.state,...this.setters})}}]),"withFontSizes")};var Iu=l(N(),1),yC=l(A(),1);var T7=l(w(),1),s_e=[{icon:fu,title:(0,Iu.__)("Align text left"),align:"left"},{icon:zf,title:(0,Iu.__)("Align text center"),align:"center"},{icon:mu,title:(0,Iu.__)("Align text right"),align:"right"}],a_e={placement:"bottom-start"};function l_e({value:e,onChange:t,alignmentControls:o=s_e,label:r=(0,Iu.__)("Align text"),description:n=(0,Iu.__)("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,Iu.isRTL)()?mu:fu}let d=s?yC.ToolbarGroup:yC.ToolbarDropdownMenu,f=s?{isCollapsed:i}:{toggleProps:{description:n},popoverProps:a_e};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 lD=l_e;var cD=l(w(),1),_C=e=>(0,cD.jsx)(lD,{...e,isToolbar:!1}),I7=e=>(0,cD.jsx)(lD,{...e,isToolbar:!0});var TC=l(pt(),1),IC=l(A(),1),X7=l(O(),1),PC=l($(),1);var U7=l(z(),1),Ru=l($(),1),pD=l(O(),1);var V7=l(A7(),1);var uD=function(e,t){return uD=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])},uD(e,t)};function L7(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");uD(e,t);function o(){this.constructor=e}e.prototype=t===null?Object.create(t):(o.prototype=t.prototype,new o)}var Ho=function(){return Ho=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},Ho.apply(this,arguments)};function N7(e){return e.toLowerCase()}var m_e=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],p_e=/[^A-Z0-9]+/gi;function D7(e,t){t===void 0&&(t={});for(var o=t.splitRegexp,r=o===void 0?m_e:o,n=t.stripRegexp,i=n===void 0?p_e:n,s=t.transform,a=s===void 0?N7:s,c=t.delimiter,u=c===void 0?" ":c,d=M7(M7(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 M7(e,t,o){return t instanceof RegExp?e.replace(t,o):t.reduce(function(r,n){return r.replace(n,o)},e)}var h_e=e=>e.name||"",g_e=e=>e.title,b_e=e=>e.description||"",k_e=e=>e.keywords||[],v_e=e=>e.category,y_e=()=>null,__e=[/([\p{Ll}\p{Lo}\p{N}])([\p{Lu}\p{Lt}])/gu,/([\p{Lu}\p{Lt}])([\p{Lu}\p{Lt}][\p{Ll}\p{Lo}])/gu],S_e=new RegExp("(\\p{C}|\\p{P}|\\p{S})+","giu"),dD=new Map,fD=new Map;function xC(e=""){if(dD.has(e))return dD.get(e);let t=D7(e,{splitRegexp:__e,stripRegexp:S_e}).split(" ").filter(Boolean);return dD.set(e,t),t}function ay(e=""){if(fD.has(e))return fD.get(e);let t=(0,V7.default)(e);return t=t.replace(/^\//,""),t=t.toLowerCase(),fD.set(e,t),t}var ly=(e="")=>xC(ay(e)),x_e=(e,t)=>e.filter(o=>!ly(t).some(r=>r.includes(o))),wC=(e,t,o,r)=>ly(r).length===0?e:cy(e,r,{getCategory:s=>t.find(({slug:a})=>a===s.category)?.title,getCollection:s=>o[s.name.split("/")[0]]?.title}),cy=(e=[],t="",o={})=>{if(ly(t).length===0)return e;let n=e.map(i=>[i,w_e(i,t,o)]).filter(([,i])=>i>0);return n.sort(([,i],[,s])=>s-i),n.map(([i])=>i)};function w_e(e,t,o={}){let{getName:r=h_e,getTitle:n=g_e,getDescription:i=b_e,getKeywords:s=k_e,getCategory:a=v_e,getCollection:c=y_e}=o,u=r(e),d=n(e),f=i(e),m=s(e),h=a(e),p=c(e),g=ay(t),b=ay(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=xC(g);x_e(y,v).length===0&&(k+=10)}if(k!==0&&u.startsWith("core/")){let v=u!==e.id;k+=v?1:2}return k}var Sa=l($(),1),Ch=l(z(),1),CC=l(O(),1),F7=l(Li(),1),BC=l(N(),1);var C_e=(e,t,o)=>{let r=(0,CC.useMemo)(()=>({[xu]:!!o}),[o]),[n]=(0,Ch.useSelect)(d=>[d(x).getInserterItems(e,r)],[e,r]),{getClosestAllowedInsertionPoint:i}=F((0,Ch.useSelect)(x)),{createErrorNotice:s}=(0,Ch.useDispatch)(F7.store),[a,c]=(0,Ch.useSelect)(d=>{let{getCategories:f,getCollections:m}=d(Sa.store);return[f(),m()]},[]),u=(0,CC.useCallback)(({name:d,initialAttributes:f,innerBlocks:m,syncStatus:h,content:p},g)=>{let b=i(d,e);if(b===null){let v=(0,Sa.getBlockType)(d)?.title??d;s((0,BC.sprintf)((0,BC.__)(`Block "%s" can't be inserted.`),v),{type:"snackbar",id:"inserter-notice"});return}let k=h==="unsynced"?(0,Sa.parse)(p,{__unstableSkipMigrationLogs:!0}):(0,Sa.createBlock)(d,f,(0,Sa.createBlocksFromInnerBlocksTemplate)(m));t(k,void 0,g,b)},[i,e,t,s]);return[n,a,c,u]},Pu=C_e;var z7=l(A(),1);var j7=l(O(),1),mD=l(w(),1);function B_e({icon:e,showColors:t=!1,className:o,context:r}){e?.src==="block-default"&&(e={src:Sv});let n=(0,mD.jsx)(z7.Icon,{icon:e&&e.src?e.src:e,context:r}),i=t?{backgroundColor:e&&e.background,color:e&&e.foreground}:{};return(0,mD.jsx)("span",{style:i,className:V("block-editor-block-icon",o,{"has-colors":t}),children:n})}var Oe=(0,j7.memo)(B_e);var EC=(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 Bh=l(w(),1),E_e=()=>{},T_e=9;function I_e(){return{name:"blocks",className:"block-editor-autocompleters__block",triggerPrefix:"/",useItems(e){let{rootClientId:t,selectedBlockId:o,prioritizedBlocks:r}=(0,U7.useSelect)(u=>{let{getSelectedBlockClientId:d,getBlock:f,getBlockListSettings:m,getBlockRootClientId:h}=u(x),{getActiveBlockVariation:p}=u(Ru.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]=Pu(t,E_e,!0),a=(0,pD.useMemo)(()=>(e.trim()?wC(n,i,s,e):EC(_a(n,"frecency","desc"),r)).filter(d=>d.id!==o).slice(0,T_e),[e,o,n,i,s,r]);return[(0,pD.useMemo)(()=>a.map(u=>{let{title:d,icon:f,isDisabled:m}=u;return{key:`block-${u.id}`,value:u,label:(0,Bh.jsxs)(Bh.Fragment,{children:[(0,Bh.jsx)(Oe,{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,Ru.cloneBlock)(s)):(0,Ru.createBlock)(t,o,(0,Ru.createBlocksFromInnerBlocksTemplate)(r))}}}}var H7=I_e();var K7=l(W7(),1),Y7=l(bn(),1);var q7=l(hD(),1),sm=l(w(),1),P_e=10;function R_e(){return{name:"links",className:"block-editor-autocompleters__link",triggerPrefix:"[[",options:async e=>{let t=await(0,K7.default)({path:(0,Y7.addQueryArgs)("/wp/v2/search",{per_page:P_e,search:e,type:"post",order_by:"menu_order"})});return t=t.filter(o=>o.title!==""),t},getOptionKeywords(e){return[...e.title.split(/\s+/)]},getOptionLabel(e){return(0,sm.jsxs)(sm.Fragment,{children:[(0,sm.jsx)(we,{icon:e.subtype==="page"?Cl:UN},"icon"),(0,q7.decodeEntities)(e.title)]})},getOptionCompletion(e){return(0,sm.jsx)("a",{href:e.url,children:e.title})}}}var Z7=R_e();var Q7=l(w(),1),O_e=[];function J7({completers:e=O_e}){let{name:t}=Ie();return(0,X7.useMemo)(()=>{let o=[...e,Z7];return(t===(0,PC.getDefaultBlockName)()||(0,PC.getBlockSupport)(t,"__experimentalSlashInserter",!1))&&(o=[...o,H7]),(0,TC.hasFilter)("editor.Autocomplete.completers")&&(o===e&&(o=o.map(r=>({...r}))),o=(0,TC.applyFilters)("editor.Autocomplete.completers",o,t)),o},[e,t])}function e9(e){return(0,IC.__unstableUseAutocompleteProps)({...e,completers:J7(e)})}function A_e(e){return(0,Q7.jsx)(IC.Autocomplete,{...e,completers:J7(e)})}var t9=A_e;var yD=l(N(),1),Nu=l(A(),1);var _9=l(z(),1);var MC=l(O(),1);var Ni=l(N(),1);var vn=l(A(),1);var Eh=l(N(),1);var Kn={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 Yn(e,t=""){return e.split(",").map(o=>`${o}${t?` ${t}`:""}`).join(",")}function Ou(e,t=Kn,o,r){let n="";return t?.[o]?.spacingStyles?.length&&r&&t[o].spacingStyles.forEach(i=>{n+=`${Yn(e,i.selector.trim())} { `,n+=Object.entries(i.rules).map(([s,a])=>`${s}: ${a||r}`).join("; "),n+="; }"}),n}function RC(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,Eh.sprintf)((0,Eh.__)("Max %s wide"),t)),i.test(o)&&(n.wide=(0,Eh.sprintf)((0,Eh.__)("Max %s wide"),o)),n}var Ps=l(N(),1);var o9=8,Au=["top","right","bottom","left"],r9={top:void 0,right:void 0,bottom:void 0,left:void 0},OC={custom:Vw,axial:Vw,horizontal:oM,vertical:sM,top:iM,right:nM,bottom:tM,left:rM},xa={default:(0,Ps.__)("Spacing control"),top:(0,Ps.__)("Top"),bottom:(0,Ps.__)("Bottom"),left:(0,Ps.__)("Left"),right:(0,Ps.__)("Right"),mixed:(0,Ps.__)("Mixed"),vertical:(0,Ps.__)("Vertical"),horizontal:(0,Ps.__)("Horizontal"),axial:(0,Ps.__)("Horizontal & vertical"),custom:(0,Ps.__)("Custom")},Al={axial:"axial",top:"top",right:"right",bottom:"bottom",left:"left",custom:"custom"};function AC(e){return e?.includes?e==="0"||e.includes("var:preset|spacing|"):!1}function n9(e,t){if(!AC(e))return e;let o=L_e(e);return t.find(n=>String(n.slug)===o)?.size}function Th(e,t){if(!e||AC(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 uy(e){if(!e)return;let t=e.match(/var:preset\|spacing\|(.+)/);return t?`var(--wp--preset--spacing--${t[1]})`:e}function L_e(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 gD(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 N_e(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 i9(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&&N_e(t),u=t?.includes("horizontal")&&t?.includes("vertical")&&t?.length===2;if(gD(t)&&(a||c))return Al.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]:Al.custom}function M_e(e){if(!e)return null;let t=typeof e=="string";return{top:t?e:e?.top,left:t?e:e?.left}}function vr(e,t="0"){let o=M_e(e);if(!o)return null;let r=uy(o?.top)||t,n=uy(o?.left)||t;return r===n?r:`${r} ${n}`}var lo=l(w(),1),D_e={left:"flex-start",right:"flex-end",center:"center","space-between":"space-between"},s9={left:"flex-start",right:"flex-end",center:"center",stretch:"stretch"},V_e={top:"flex-start",center:"center",bottom:"flex-end",stretch:"stretch","space-between":"space-between"},a9={horizontal:"center",vertical:"top"},F_e=["wrap","nowrap"],c9={name:"flex",label:(0,Ni.__)("Flex"),inspectorControls:function({layout:t={},onChange:o,layoutBlockSupport:r={}}){let{allowOrientation:n=!0,allowJustification:i=!0,allowWrap:s=!0}=r;return(0,lo.jsxs)(lo.Fragment,{children:[(0,lo.jsxs)(vn.Flex,{children:[i&&(0,lo.jsx)(vn.FlexItem,{children:(0,lo.jsx)(l9,{layout:t,onChange:o})}),n&&(0,lo.jsx)(vn.FlexItem,{children:(0,lo.jsx)(H_e,{layout:t,onChange:o})})]}),s&&(0,lo.jsx)(U_e,{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,lo.jsxs)(Dt,{group:"block",__experimentalShareWithChildBlocks:!0,children:[i&&(0,lo.jsx)(l9,{layout:t,onChange:o,isToolbar:!0}),n&&(0,lo.jsx)(z_e,{layout:t,onChange:o})]})},getLayoutStyle:function({selector:t,layout:o,style:r,blockName:n,hasBlockGapSupport:i,globalBlockGapValue:s,layoutDefinitions:a=Kn}){let{orientation:c="horizontal"}=o,u="0.5em";if(s){let v=vr(s,"0.5em").split(" ");u=v.length>1?v[1]:v[0]}let d=r?.spacing?.blockGap&&!Ge(n,"spacing","blockGap")?vr(r?.spacing?.blockGap,u):void 0,f=D_e[o.justifyContent],m=F_e.includes(o.flexWrap)?o.flexWrap:"wrap",h=V_e[o.verticalAlignment],p=s9[o.justifyContent]||s9.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=`${Yn(t)} { |
| 25 |
${b.join("; ")}; |
| 26 |
}`),i&&d&&(g+=Ou(t,a,"flex",d)),g},getOrientation(e){let{orientation:t="horizontal"}=e;return t},getAlignments(){return[]}};function z_e({layout:e,onChange:t}){let{orientation:o="horizontal"}=e,r=o==="horizontal"?a9.horizontal:a9.vertical,{verticalAlignment:n=r}=e;return(0,lo.jsx)(LC,{onChange:s=>{t({...e,verticalAlignment:s})},value:n,controls:o==="horizontal"?["top","center","bottom","stretch"]:["top","center","bottom","space-between"]})}var j_e={placement:"bottom-start"};function l9({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,lo.jsx)(Ih,{allowedControls:s,value:r,onChange:i,popoverProps:j_e});let a=[{value:"left",icon:gu,label:(0,Ni.__)("Justify items left")},{value:"center",icon:hu,label:(0,Ni.__)("Justify items center")},{value:"right",icon:bu,label:(0,Ni.__)("Justify items right")}];return n==="horizontal"?a.push({value:"space-between",icon:ah,label:(0,Ni.__)("Space between items")}):a.push({value:"stretch",icon:lh,label:(0,Ni.__)("Stretch items")}),(0,lo.jsx)(vn.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,label:(0,Ni.__)("Justification"),value:r,onChange:i,className:"block-editor-hooks__flex-layout-justification-controls",children:a.map(({value:c,icon:u,label:d})=>(0,lo.jsx)(vn.__experimentalToggleGroupControlOptionIcon,{value:c,icon:u,label:d},c))})}function U_e({layout:e,onChange:t}){let{flexWrap:o="wrap"}=e;return(0,lo.jsx)(vn.ToggleControl,{label:(0,Ni.__)("Allow to wrap to multiple lines"),onChange:r=>{t({...e,flexWrap:r?"wrap":"nowrap"})},checked:o==="wrap"})}function H_e({layout:e,onChange:t}){let{orientation:o="horizontal",verticalAlignment:r,justifyContent:n}=e;return(0,lo.jsxs)(vn.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,className:"block-editor-hooks__flex-layout-orientation-controls",label:(0,Ni.__)("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,lo.jsx)(vn.__experimentalToggleGroupControlOptionIcon,{icon:_v,value:"horizontal",label:(0,Ni.__)("Horizontal")}),(0,lo.jsx)(vn.__experimentalToggleGroupControlOptionIcon,{icon:RA,value:"vertical",label:(0,Ni.__)("Vertical")})]})}var u9=l(N(),1);var d9={name:"default",label:(0,u9.__)("Flow"),inspectorControls:function(){return null},toolBarControls:function(){return null},getLayoutStyle:function({selector:t,style:o,blockName:r,hasBlockGapSupport:n,layoutDefinitions:i=Kn}){let s=vr(o?.spacing?.blockGap),a="";Ge(r,"spacing","blockGap")||(s?.top?a=vr(s?.top):typeof s=="string"&&(a=vr(s)));let c="";return n&&a&&(c+=Ou(t,i,"default",a)),c},getOrientation(){return"vertical"},getAlignments(e,t){let o=RC(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 yn=l(A(),1),Ll=l(N(),1);var m9=l(dy(),1);var tr=l(w(),1),p9={name:"constrained",label:(0,Ll.__)("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:gu,label:(0,Ll.__)("Justify items left")},{value:"center",icon:hu,label:(0,Ll.__)("Justify items center")},{value:"right",icon:bu,label:(0,Ll.__)("Justify items right")}],[f]=he("spacing.units"),m=(0,yn.__experimentalUseCustomUnits)({availableUnits:f||["%","px","em","rem","vw"]});return(0,tr.jsxs)(yn.__experimentalVStack,{spacing:4,className:"block-editor-hooks__layout-constrained",children:[c&&(0,tr.jsxs)(tr.Fragment,{children:[(0,tr.jsx)(yn.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,Ll.__)("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,tr.jsx)(yn.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,tr.jsx)(we,{icon:jf})})}),(0,tr.jsx)(yn.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,Ll.__)("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,tr.jsx)(yn.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,tr.jsx)(we,{icon:Jf})})}),(0,tr.jsx)("p",{className:"block-editor-hooks__layout-constrained-helptext",children:(0,Ll.__)("Customize the width for all elements that are assigned to the center or wide columns.")})]}),a&&(0,tr.jsx)(yn.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,label:(0,Ll.__)("Justification"),value:s,onChange:u,children:d.map(({value:h,icon:p,label:g})=>(0,tr.jsx)(yn.__experimentalToggleGroupControlOptionIcon,{value:h,icon:p,label:g},h))})]})},toolBarControls:function({layout:t={},onChange:o,layoutBlockSupport:r}){let{allowJustification:n=!0}=r;return n?(0,tr.jsx)(Dt,{group:"block",__experimentalShareWithChildBlocks:!0,children:(0,tr.jsx)(W_e,{layout:t,onChange:o})}):null},getLayoutStyle:function({selector:t,layout:o={},style:r,blockName:n,hasBlockGapSupport:i,layoutDefinitions:s=Kn}){let{contentSize:a,wideSize:c,justifyContent:u}=o,d=vr(r?.spacing?.blockGap),f="";Ge(n,"spacing","blockGap")||(d?.top?f=vr(d?.top):typeof d=="string"&&(f=vr(d)));let m=u==="left"?"0 !important":"auto !important",h=u==="right"?"0 !important":"auto !important",p=a||c?` |
| 27 |
${Yn(t,"> :where(:not(.alignleft):not(.alignright):not(.alignfull))")} { |
| 28 |
max-width: ${a??c}; |
| 29 |
margin-left: ${m}; |
| 30 |
margin-right: ${h}; |
| 31 |
} |
| 32 |
${Yn(t,"> .alignwide")} { |
| 33 |
max-width: ${c??a}; |
| 34 |
} |
| 35 |
${Yn(t,"> .alignfull")} { |
| 36 |
max-width: none; |
| 37 |
} |
| 38 |
`:"";return u==="left"?p+=`${Yn(t,"> :where(:not(.alignleft):not(.alignright):not(.alignfull))")} |
| 39 |
{ margin-left: ${m}; }`:u==="right"&&(p+=`${Yn(t,"> :where(:not(.alignleft):not(.alignright):not(.alignfull))")} |
| 40 |
{ margin-right: ${h}; }`),r?.spacing?.padding&&(0,m9.getCSSRules)(r).forEach(b=>{if(b.key==="paddingRight"){let k=b.value==="0"?"0px":b.value;p+=` |
| 41 |
${Yn(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 |
${Yn(t,"> .alignfull")} { |
| 46 |
margin-left: calc(${k} * -1); |
| 47 |
} |
| 48 |
`}}),i&&f&&(p+=Ou(t,s,"constrained",f)),p},getOrientation(){return"vertical"},getAlignments(e){let t=RC(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}},G_e={placement:"bottom-start"};function W_e({layout:e,onChange:t}){let{justifyContent:o="center"}=e;return(0,tr.jsx)(Ih,{allowedControls:["left","center","right"],value:o,onChange:i=>{t({...e,justifyContent:i})},popoverProps:G_e})}var $r=l(N(),1),lt=l(A(),1),NC=l(O(),1);var Ze=l(w(),1),$_e={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},K_e=[{value:"px",label:"px",default:0},{value:"rem",label:"rem",default:0},{value:"em",label:"em",default:0}],h9={name:"grid",label:(0,$r.__)("Grid"),inspectorControls:function({layout:t={},onChange:o,layoutBlockSupport:r={}}){let{allowSizingOnChildren:n=!1}=r,i=!0,s=!t?.isManualPlacement||window.__experimentalEnableGridInteractivity;return(0,Ze.jsxs)(Ze.Fragment,{children:[window.__experimentalEnableGridInteractivity&&(0,Ze.jsx)(Z_e,{layout:t,onChange:o}),(0,Ze.jsxs)(lt.__experimentalVStack,{spacing:4,children:[i&&(0,Ze.jsx)(q_e,{layout:t,onChange:o,allowSizingOnChildren:n}),s&&(0,Ze.jsx)(Y_e,{layout:t,onChange:o})]})]})},toolBarControls:function(){return null},getLayoutStyle:function({selector:t,layout:o,style:r,blockName:n,hasBlockGapSupport:i,globalBlockGapValue:s,layoutDefinitions:a=Kn}){let{minimumColumnWidth:c=null,columnCount:u=null,rowCount:d=null}=o,f="1.2rem";if(s){let b=vr(s,"0.5em").split(" ");f=b.length>1?b[1]:b[0]}let m=r?.spacing?.blockGap&&!Ge(n,"spacing","blockGap")?vr(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=`${Yn(t)} { ${p.join("; ")}; }`),i&&m&&(h+=Ou(t,a,"grid",m)),h},getOrientation(){return"horizontal"},getAlignments(){return[]}};function Y_e({layout:e,onChange:t}){let{minimumColumnWidth:o,columnCount:r,isManualPlacement:n}=e,s=o||(n||r?null:"12rem"),[a,c="rem"]=(0,lt.__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,Ze.jsxs)("fieldset",{className:"block-editor-hooks__grid-layout-minimum-width-control",children:[(0,Ze.jsx)(lt.BaseControl.VisualLabel,{as:"legend",children:(0,$r.__)("Min. column width")}),(0,Ze.jsxs)(lt.Flex,{gap:4,children:[(0,Ze.jsx)(lt.FlexItem,{isBlock:!0,children:(0,Ze.jsx)(lt.__experimentalUnitControl,{size:"__unstable-large",onChange:f=>{t({...e,minimumColumnWidth:f===""?void 0:f})},onUnitChange:d,value:s,units:K_e,min:0,label:(0,$r.__)("Minimum column width"),hideLabelFromVision:!0})}),(0,Ze.jsx)(lt.FlexItem,{isBlock:!0,children:(0,Ze.jsx)(lt.RangeControl,{__next40pxDefaultSize:!0,onChange:u,value:a||0,min:0,max:$_e[c]||600,withInputField:!1,label:(0,$r.__)("Minimum column width"),hideLabelFromVision:!0})})]}),(0,Ze.jsx)("p",{className:"components-base-control__help",children:(0,$r.__)("Columns will wrap to fewer per row when they can no longer maintain the minimum width.")})]})}function q_e({layout:e,onChange:t,allowSizingOnChildren:o}){let{columnCount:n=void 0,rowCount:i,isManualPlacement:s}=e;return(0,Ze.jsx)(Ze.Fragment,{children:(0,Ze.jsxs)("fieldset",{className:"block-editor-hooks__grid-layout-columns-and-rows-controls",children:[!s&&(0,Ze.jsx)(lt.BaseControl.VisualLabel,{as:"legend",children:(0,$r.__)("Max. columns")}),(0,Ze.jsxs)(lt.Flex,{gap:4,children:[(0,Ze.jsx)(lt.FlexItem,{isBlock:!0,children:(0,Ze.jsx)(lt.__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,$r.__)("Columns"),hideLabelFromVision:!s})}),(0,Ze.jsx)(lt.FlexItem,{isBlock:!0,children:o&&s?(0,Ze.jsx)(lt.__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,$r.__)("Rows")}):(0,Ze.jsx)(lt.RangeControl,{__next40pxDefaultSize:!0,value:n??1,onChange:a=>t({...e,columnCount:a===""||a==="0"?1:a}),min:1,max:16,withInputField:!1,label:(0,$r.__)("Columns"),hideLabelFromVision:!0})})]})]})})}function Z_e({layout:e,onChange:t}){let{columnCount:o,rowCount:r,minimumColumnWidth:n,isManualPlacement:i}=e,[s,a]=(0,NC.useState)(o||3),[c,u]=(0,NC.useState)(r),[d,f]=(0,NC.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,$r.__)("Grid items can be manually placed in any position on the grid."):(0,$r.__)("Grid items are placed automatically depending on their order.");return(0,Ze.jsxs)(lt.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,label:(0,$r.__)("Grid item position"),value:m,onChange:h,isBlock:!0,help:p,children:[(0,Ze.jsx)(lt.__experimentalToggleGroupControlOption,{value:"auto",label:(0,$r.__)("Auto")},"auto"),(0,Ze.jsx)(lt.__experimentalToggleGroupControlOption,{value:"manual",label:(0,$r.__)("Manual")},"manual")]})}var g9=[d9,c9,p9,h9];function Rs(e="default"){return g9.find(t=>t.name===e)}function b9(){return g9}var bD=l(w(),1),kD={type:"default"},vD=(0,MC.createContext)(kD);vD.displayName="BlockLayoutContext";var k9=vD.Provider;function am(){return(0,MC.useContext)(vD)}function v9({layout:e={},css:t,...o}){let r=Rs(e.type),[n]=he("spacing.blockGap"),i=n!==null;if(r){if(t)return(0,bD.jsx)("style",{children:t});let s=r.getLayoutStyle?.({hasBlockGapSupport:i,layout:e,...o});if(s)return(0,bD.jsx)("style",{children:s})}return null}var DC=[],y9=["none","left","center","right","wide","full"],X_e=["wide","full"];function fy(e=y9){e.includes("none")||(e=["none",...e]);let t=e.length===1&&e[0]==="none",[o,r,n]=(0,_9.useSelect)(c=>{if(t)return[!1,!1,!1];let u=c(x).getSettings();return[u.alignWide??!1,u.supportsLayout,u.__unstableIsBlockBasedTheme]},[t]),i=am();if(t)return DC;let s=Rs(i?.type);if(r){let u=s.getAlignments(i,n).filter(d=>e.includes(d.name));return u.length===1&&u[0].name==="none"?DC:u}if(s.name!=="default"&&s.name!=="constrained")return DC;let a=e.filter(c=>i.alignments?i.alignments.includes(c):!o&&X_e.includes(c)?!1:y9.includes(c)).map(c=>({name:c}));return a.length===1&&a[0].name==="none"?DC:a}var Lu=l(N(),1);var my={none:{icon:jf,title:(0,Lu._x)("None","Alignment option")},left:{icon:LN,title:(0,Lu.__)("Align left")},center:{icon:ON,title:(0,Lu.__)("Align center")},right:{icon:MN,title:(0,Lu.__)("Align right")},wide:{icon:Jf,title:(0,Lu.__)("Wide width")},full:{icon:Wv,title:(0,Lu.__)("Full width")}},S9="none";var lm=l(w(),1);function Q_e({value:e,onChange:t,controls:o,isToolbar:r,isCollapsed:n=!0}){let i=fy(o);if(!!!i.length)return null;function a(h){t([e,"none"].includes(h)?void 0:h)}let c=my[e],u=my[S9],d=r?Nu.ToolbarGroup:Nu.ToolbarDropdownMenu,f={icon:c?c.icon:u.icon,label:(0,yD.__)("Align")},m=r?{isCollapsed:n,controls:i.map(({name:h})=>({...my[h],isActive:e===h||!e&&h==="none",role:n?"menuitemradio":void 0,onClick:()=>a(h)}))}:{toggleProps:{description:(0,yD.__)("Change alignment")},children:({onClose:h})=>(0,lm.jsx)(lm.Fragment,{children:(0,lm.jsx)(Nu.MenuGroup,{className:"block-editor-block-alignment-control__menu-group",children:i.map(({name:p,info:g})=>{let{icon:b,title:k}=my[p],v=p===e||!e&&p==="none";return(0,lm.jsx)(Nu.MenuItem,{icon:b,iconPosition:"left",className:V("components-dropdown-menu__menu-item",{"is-active":v}),isSelected:v,onClick:()=>{a(p),h()},role:"menuitemradio",info:g,children:k},p)})})})};return(0,lm.jsx)(d,{...f,...m})}var _D=Q_e;var SD=l(w(),1),VC=e=>(0,SD.jsx)(_D,{...e,isToolbar:!1}),x9=e=>(0,SD.jsx)(_D,{...e,isToolbar:!0});var T9=l(Ff(),1),UC=l(N(),1),HC=l($(),1),As=l(A(),1),CD=l(z(),1),I9=l(O(),1),P9=l(X(),1);var wD=l(Ff(),1),w9=l($(),1),C9=l(A(),1),B9=l(z(),1),zC=l(O(),1),E9=l(X(),1);var FC=l(z(),1);function xD(e){return!e||Object.keys(e).length===0}function Nl(e){let{clientId:t}=Ie(),o=e||t,{updateBlockAttributes:r}=(0,FC.useDispatch)(x),{getBlockAttributes:n}=(0,FC.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};xD(f.bindings)&&delete f.bindings,r(o,{metadata:xD(f)?void 0:f})},removeAllBlockBindings:()=>{let{metadata:{bindings:a,...c}={}}=n(o);r(o,{metadata:xD(c)?void 0:c})}}}var Os=l(w(),1),{Menu:Mu}=F(C9.privateApis);function J_e({args:e,attribute:t,field:o,source:r,sourceKey:n}){let i=(0,zC.useMemo)(()=>({source:n,args:o.args||{key:o.key}}),[o.args,o.key,n]),s=(0,zC.useContext)(Pr),a=(0,B9.useSelect)(u=>r.getValues({select:u,context:s,bindings:{[t]:i}}),[t,s,i,r]),{updateBlockBindings:c}=Nl();return(0,Os.jsxs)(Mu.CheckboxItem,{onChange:()=>{let u=(0,wD.default)(e,o.args)??o.key===e?.key;c(u?{[t]:void 0}:{[t]:i})},name:t+"-binding",value:a[t],checked:(0,wD.default)(e,o.args)??o.key===e?.key,children:[(0,Os.jsx)(Mu.ItemLabel,{children:o.label}),(0,Os.jsx)(Mu.ItemHelpText,{children:a[t]})]})}function py({args:e,attribute:t,sourceKey:o,fields:r}){let n=(0,E9.useViewportMatch)("medium","<");if(!r||r.length===0)return null;let i=(0,w9.getBlockBindingsSource)(o);return(0,Os.jsxs)(Mu,{placement:n?"bottom-start":"left-start",children:[(0,Os.jsx)(Mu.SubmenuTriggerItem,{children:(0,Os.jsx)(Mu.ItemLabel,{children:i.label})}),(0,Os.jsx)(Mu.Popover,{gutter:8,children:(0,Os.jsx)(Mu.Group,{children:r.map(s=>(0,Os.jsx)(J_e,{args:e,attribute:t,field:s,source:i,sourceKey:o},o+JSON.stringify(s.args)||s.key))})})]},o)}var Mi=l(w(),1),{Menu:jC}=F(As.privateApis);function hy({attribute:e,binding:t,blockName:o}){let{updateBlockBindings:r}=Nl(),n=(0,P9.useViewportMatch)("medium","<"),i=(0,I9.useContext)(Pr),s=(0,CD.useSelect)(g=>{let{getAllBlockBindingsSources:b,getBlockBindingsSourceFieldsList:k,getBlockType:v}=F(g(HC.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 P=k(B,i);if(!P?.length)return;let R=P.filter(E=>E.type===_);R.length&&(S[C]=R)}),S},[e,o,i]),{canUpdateBlockBindings:a}=(0,CD.useSelect)(g=>({canUpdateBlockBindings:g(x).getSettings().canUpdateBlockBindings})),c=Object.keys(s).length>0,u=!a||!c,{source:d,args:f}=t||{},m=(0,HC.getBlockBindingsSource)(d),h,p=!0;return t===void 0?(c?h=(0,UC.__)("Not connected"):h=(0,UC.__)("No sources available"),p=!0):m?h=s?.[d]?.find(g=>(0,T9.default)(g.args,f))?.label||m?.label||d:(p=!1,h=(0,UC.__)("Source not registered")),(0,Mi.jsx)(As.__experimentalToolsPanelItem,{hasValue:()=>!!t,label:e,onDeselect:!!c&&(()=>{r({[e]:void 0})}),children:(0,Mi.jsxs)(jC,{placement:n?"bottom-start":"left-start",children:[(0,Mi.jsx)(jC.TriggerButton,{render:(0,Mi.jsx)(As.__experimentalItem,{}),disabled:!c,children:(0,Mi.jsxs)(As.__experimentalVStack,{className:"block-editor-bindings__item",spacing:0,children:[(0,Mi.jsx)(As.__experimentalText,{truncate:!0,children:e}),(0,Mi.jsx)(As.__experimentalText,{truncate:!0,variant:p?"muted":void 0,isDestructive:!p,children:h})]})}),!u&&(0,Mi.jsx)(jC.Popover,{gutter:n?8:36,children:(0,Mi.jsx)(jC,{placement:n?"bottom-start":"left-start",children:Object.entries(s).map(([g,b])=>(0,Mi.jsx)(py,{args:t?.args,attribute:e,sourceKey:g,fields:b},g))})})]})})}var R9=l(N(),1),O9=l(A(),1);var A9=l(w(),1);function eSe({isActive:e,label:t=(0,R9.__)("Full height"),onToggle:o,isDisabled:r}){return(0,A9.jsx)(O9.ToolbarButton,{isActive:e,icon:IL,label:t,onClick:()=>o(!e),disabled:r})}var L9=eSe;var M9=l(N(),1),D9=l(ct(),1),cm=l(A(),1),gy=l(w(),1),tSe=()=>{};function oSe(e){let{label:t=(0,M9.__)("Change matrix alignment"),onChange:o=tSe,value:r="center",isDisabled:n}=e,i=(0,gy.jsx)(cm.AlignmentMatrixControl.Icon,{value:r});return(0,gy.jsx)(cm.Dropdown,{popoverProps:{placement:"bottom-start"},renderToggle:({onToggle:s,isOpen:a})=>(0,gy.jsx)(cm.ToolbarButton,{onClick:s,"aria-haspopup":"true","aria-expanded":a,onKeyDown:u=>{!a&&u.keyCode===D9.DOWN&&(u.preventDefault(),s())},label:t,icon:i,showTooltip:!0,disabled:n}),renderContent:()=>(0,gy.jsx)(cm.AlignmentMatrixControl,{onChange:o,value:r})})}var V9=oSe;var TD=l(A(),1),$C=l(z(),1),KC=l(N(),1);var W9=l(O(),1);var F9=l(z(),1),GC=l($(),1);function yr({clientId:e,maximumLength:t,context:o}){let r=(0,F9.useSelect)(n=>{if(!e)return null;let{getBlockName:i,getBlockAttributes:s}=n(x),{getBlockType:a,getActiveBlockVariation:c}=n(GC.store),u=i(e),d=a(u);if(!d)return null;let f=s(e),m=(0,GC.__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 by({clientId:e,maximumLength:t,context:o}){return yr({clientId:e,maximumLength:t,context:o})}var um=l(O(),1),U9=l(X(),1);var WC=l(O(),1),BD=l(X(),1),z9=l(w(),1),ky=(0,WC.createContext)({refsMap:(0,BD.observableMap)()});ky.displayName="BlockRefsContext";function j9({children:e}){let t=(0,WC.useMemo)(()=>({refsMap:(0,BD.observableMap)()}),[]);return(0,z9.jsx)(ky.Provider,{value:t,children:e})}function H9(e){let{refsMap:t}=(0,um.useContext)(ky);return(0,U9.useRefEffect)(o=>(t.set(e,o),()=>t.delete(e)),[e])}function ED(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function dm(e,t){let{refsMap:o}=(0,um.useContext)(ky);(0,um.useLayoutEffect)(()=>{ED(t,o.get(e));let r=o.subscribe(e,()=>ED(t,o.get(e)));return()=>{r(),ED(t,null)}},[o,e,t])}function tt(e){let[t,o]=(0,um.useState)(null);return dm(e,o),t}function G9(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 qn=l(w(),1);function rSe({rootLabelText:e}){let{selectBlock:t,clearSelectedBlock:o}=(0,$C.useDispatch)(x),{clientId:r,parents:n,hasSelection:i}=(0,$C.useSelect)(c=>{let{getSelectionStart:u,getSelectedBlockClientId:d,getEnabledBlockParents:f}=F(c(x)),m=d();return{parents:f(m),clientId:m,hasSelection:!!u().clientId}},[]),s=e||(0,KC._x)("Document","noun, breadcrumb"),a=(0,W9.useRef)();return dm(r,a),(0,qn.jsxs)("ul",{className:"block-editor-block-breadcrumb",role:"list","aria-label":(0,KC.__)("Block breadcrumb"),children:[(0,qn.jsxs)("li",{className:i?void 0:"block-editor-block-breadcrumb__current","aria-current":i?void 0:"true",children:[i&&(0,qn.jsx)(TD.Button,{size:"small",className:"block-editor-block-breadcrumb__button",onClick:()=>{let c=a.current?.closest(".editor-styles-wrapper");o(),G9(c)?.focus()},children:s}),!i&&(0,qn.jsx)("span",{children:s}),!!r&&(0,qn.jsx)(we,{icon:pu,className:"block-editor-block-breadcrumb__separator"})]}),n.map(c=>(0,qn.jsxs)("li",{children:[(0,qn.jsx)(TD.Button,{size:"small",className:"block-editor-block-breadcrumb__button",onClick:()=>t(c),children:(0,qn.jsx)(by,{clientId:c,maximumLength:35,context:"breadcrumb"})}),(0,qn.jsx)(we,{icon:pu,className:"block-editor-block-breadcrumb__separator"})]},c)),!!r&&(0,qn.jsx)("li",{className:"block-editor-block-breadcrumb__current","aria-current":"true",children:(0,qn.jsx)(by,{clientId:r,maximumLength:35,context:"breadcrumb"})})]})}var $9=rSe;var K9=l(z(),1);function Y9(e){return(0,K9.useSelect)(t=>{let{__unstableHasActiveBlockOverlayActive:o}=t(x);return o(e)},[e])}var JT=l(X(),1),nee=l(O(),1),iee=l(z(),1),see=l(A(),1);var qi=l(z(),1),BE=l(X(),1),fd=l(O(),1),mZ=l($(),1);var Ku=l(O(),1),We=l($(),1),kG=l(A(),1),F1=l(z(),1),z1=l(X(),1),vG=l(Fe(),1);var Ml=l(N(),1),qC=l(A(),1),fm=l(O(),1),Rh=l($(),1),ZC=l(z(),1);var rU=l(J9(),1),YC=l(N(),1),nU=l($(),1);var eU=l(A(),1),tU=l(O(),1),oU=l(Fe(),1),wa=l(w(),1);function PD({title:e,rawContent:t,renderedContent:o,action:r,actionText:n,className:i}){return(0,wa.jsxs)("div",{className:i,children:[(0,wa.jsxs)("div",{className:"block-editor-block-compare__content",children:[(0,wa.jsx)("h2",{className:"block-editor-block-compare__heading",children:e}),(0,wa.jsx)("div",{className:"block-editor-block-compare__html",children:t}),(0,wa.jsx)("div",{className:"block-editor-block-compare__preview edit-post-visual-editor",children:(0,wa.jsx)(tU.RawHTML,{children:(0,oU.safeHTML)(o)})})]}),(0,wa.jsx)("div",{className:"block-editor-block-compare__action",children:(0,wa.jsx)(eU.Button,{__next40pxDefaultSize:!0,variant:"secondary",tabIndex:"0",onClick:r,children:n})})]})}var Ph=l(w(),1);function cSe({block:e,onKeep:t,onConvert:o,convertor:r,convertButtonText:n}){function i(u,d){return(0,rU.diffChars)(u,d).map((m,h)=>{let p=V({"block-editor-block-compare__added":m.added,"block-editor-block-compare__removed":m.removed});return(0,Ph.jsx)("span",{className:p,children:m.value},h)})}function s(u){return(Array.isArray(u)?u:[u]).map(m=>(0,nU.getSaveContent)(m.name,m.attributes,m.innerBlocks)).join("")}let a=s(r(e)),c=i(e.originalContent,a);return(0,Ph.jsxs)("div",{className:"block-editor-block-compare__wrapper",children:[(0,Ph.jsx)(PD,{title:(0,YC.__)("Current"),className:"block-editor-block-compare__current",action:t,actionText:(0,YC.__)("Convert to HTML"),rawContent:e.originalContent,renderedContent:e.originalContent}),(0,Ph.jsx)(PD,{title:(0,YC.__)("After Conversion"),className:"block-editor-block-compare__converted",action:o,actionText:n,rawContent:c,renderedContent:a})]})}var iU=cSe;var Dl=l(w(),1),sU=e=>(0,Rh.rawHandler)({HTML:e.originalContent});function aU({clientId:e}){let{block:t,canInsertHTMLBlock:o,canInsertClassicBlock:r}=(0,ZC.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,ZC.useDispatch)(x),[i,s]=(0,fm.useState)(!1),a=(0,fm.useCallback)(()=>s(!1),[]),c=(0,fm.useMemo)(()=>({toClassic(){let d=(0,Rh.createBlock)("core/freeform",{content:t.originalContent});return n(t.clientId,d)},toHTML(){let d=(0,Rh.createBlock)("core/html",{content:t.originalContent});return n(t.clientId,d)},toBlocks(){let d=sU(t);return n(t.clientId,d)},toRecoveredBlock(){let d=(0,Rh.createBlock)(t.name,t.attributes,t.innerBlocks);return n(t.clientId,d)}}),[t,n]),u=(0,fm.useMemo)(()=>[{title:(0,Ml._x)("Resolve","imperative verb"),onClick:()=>s(!0)},o&&{title:(0,Ml.__)("Convert to HTML"),onClick:c.toHTML},r&&{title:(0,Ml.__)("Convert to Classic Block"),onClick:c.toClassic}].filter(Boolean),[o,r,c]);return(0,Dl.jsxs)(Dl.Fragment,{children:[(0,Dl.jsx)(Bu,{actions:[(0,Dl.jsx)(qC.Button,{__next40pxDefaultSize:!0,onClick:c.toRecoveredBlock,variant:"primary",children:(0,Ml.__)("Attempt recovery")},"recover")],secondaryActions:u,children:(0,Ml.__)("Block contains unexpected or invalid content.")}),i&&(0,Dl.jsx)(qC.Modal,{title:(0,Ml.__)("Resolve Block"),onRequestClose:a,className:"block-editor-block-compare",children:(0,Dl.jsx)(iU,{block:t,onKeep:c.toHTML,onConvert:c.toBlocks,convertor:sU,convertButtonText:(0,Ml.__)("Convert to Blocks")})})]})}var lU=l(N(),1);var cU=l(w(),1),uSe=(0,cU.jsx)(Bu,{className:"block-editor-block-list__block-crash-warning",children:(0,lU.__)("This block has encountered an error and cannot be previewed.")}),uU=()=>uSe;var dU=l(O(),1),dSe=class extends dU.Component{constructor(){super(...arguments),this.state={hasError:!1}}componentDidCatch(){this.setState({hasError:!0})}render(){return this.state.hasError?this.props.fallback:this.props.children}},fU=dSe;var RU=l(AD(),1),e1=l(O(),1),t1=l(z(),1),Ca=l($(),1);var OU=l(w(),1);function SSe({clientId:e}){let[t,o]=(0,e1.useState)(""),r=(0,t1.useSelect)(s=>s(x).getBlock(e),[e]),{updateBlock:n}=(0,t1.useDispatch)(x),i=()=>{let s=(0,Ca.getBlockType)(r.name);if(!s)return;let a=(0,Ca.getBlockAttributes)(s,t,r.attributes),c=t||(0,Ca.getSaveContent)(s,a),[u]=t?(0,Ca.validateBlock)({...r,attributes:a,originalContent:c}):[!0];n(e,{attributes:a,originalContent:c,isValid:u}),t||o(c)};return(0,e1.useEffect)(()=>{o((0,Ca.getBlockContent)(r))},[r]),(0,OU.jsx)(RU.default,{className:"block-editor-block-list__block-html-textarea",value:t,onBlur:i,onChange:s=>o(s.target.value)})}var AU=SSe;var hG=l(O(),1),D1=l(N(),1),gG=l($(),1),$h=l(X(),1),bG=l(_y(),1);var ND=xy(),_e=e=>Sy(e,ND),MD=xy();_e.write=e=>Sy(e,MD);var o1=xy();_e.onStart=e=>Sy(e,o1);var DD=xy();_e.onFrame=e=>Sy(e,DD);var VD=xy();_e.onFinish=e=>Sy(e,VD);var Oh=[];_e.setTimeout=(e,t)=>{let o=_e.now()+t,r=()=>{let i=Oh.findIndex(s=>s.cancel==r);~i&&Oh.splice(i,1),Vu-=~i?1:0},n={time:o,handler:e,cancel:r};return Oh.splice(NU(o),0,n),Vu+=1,MU(),n};var NU=e=>~(~Oh.findIndex(t=>t.time>e)||~Oh.length);_e.cancel=e=>{o1.delete(e),DD.delete(e),VD.delete(e),ND.delete(e),MD.delete(e)};_e.sync=e=>{LD=!0,_e.batchedUpdates(e),LD=!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=()=>{o1.delete(o),t=null},r};var FD=typeof window<"u"?window.requestAnimationFrame:()=>{};_e.use=e=>FD=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"):VU()};var Du=-1,Vu=0,LD=!1;function Sy(e,t){LD?(t.delete(e),e(0)):(t.add(e),MU())}function MU(){Du<0&&(Du=0,_e.frameLoop!=="demand"&&FD(DU))}function xSe(){Du=-1}function DU(){~Du&&(FD(DU),_e.batchedUpdates(VU))}function VU(){let e=Du;Du=_e.now();let t=NU(Du);if(t&&(FU(Oh.splice(0,t),o=>o.handler()),Vu-=t),!Vu){xSe();return}o1.flush(),ND.flush(e?Math.min(64,Du-e):16.667),DD.flush(),MD.flush(),VD.flush()}function xy(){let e=new Set,t=e;return{add(o){Vu+=t==e&&!e.has(o)?1:0,e.add(o)},delete(o){return Vu-=t==e&&e.has(o)?1:0,e.delete(o)},flush(o){t.size&&(e=new Set,Vu-=t.size,FU(t,r=>r(o)&&e.add(r)),Vu+=e.size,t=e)}}}function FU(e,t){e.forEach(o=>{try{t(o)}catch(r){_e.catch(r)}})}var Vi=l(je());function a1(){}var WU=(e,t,o)=>Object.defineProperty(e,t,{value:o,writable:!0,configurable:!0}),le={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 Ba(e,t){if(le.arr(e)){if(!le.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 _t=(e,t)=>e.forEach(t);function Fi(e,t,o){if(le.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 _n=e=>le.und(e)?[]:le.arr(e)?e:[e];function Mh(e,t){if(e.size){let o=Array.from(e);e.clear(),_t(o,t)}}var Dh=(e,...t)=>Mh(e,o=>o(...t)),WD=()=>typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),$D,$U,Fu=null,KU=!1,KD=a1,wSe=e=>{e.to&&($U=e.to),e.now&&(_e.now=e.now),e.colors!==void 0&&(Fu=e.colors),e.skipAnimation!=null&&(KU=e.skipAnimation),e.createStringInterpolator&&($D=e.createStringInterpolator),e.requestAnimationFrame&&_e.use(e.requestAnimationFrame),e.batchedUpdates&&(_e.batchedUpdates=e.batchedUpdates),e.willAdvance&&(KD=e.willAdvance),e.frameLoop&&(_e.frameLoop=e.frameLoop)},Zn=Object.freeze({__proto__:null,get createStringInterpolator(){return $D},get to(){return $U},get colors(){return Fu},get skipAnimation(){return KU},get willAdvance(){return KD},assign:wSe}),wy=new Set,Di=[],zD=[],i1=0,Vh={get idle(){return!wy.size&&!Di.length},start(e){i1>e.priority?(wy.add(e),_e.onStart(CSe)):(YU(e),_e(HD))},advance:HD,sort(e){if(i1)_e.onFrame(()=>Vh.sort(e));else{let t=Di.indexOf(e);~t&&(Di.splice(t,1),qU(e))}},clear(){Di=[],wy.clear()}};function CSe(){wy.forEach(YU),wy.clear(),_e(HD)}function YU(e){Di.includes(e)||qU(e)}function qU(e){Di.splice(BSe(Di,t=>t.priority>e.priority),0,e)}function HD(e){let t=zD;for(let o=0;o<Di.length;o++){let r=Di[o];i1=r.priority,r.idle||(KD(r),r.advance(e),r.idle||t.push(r))}return i1=0,zD=Di,zD.length=0,Di=t,Di.length>0}function BSe(e,t){let o=e.findIndex(t);return o<0?e.length:o}var ZU={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},Ls="[-+]?\\d*\\.?\\d+",s1=Ls+"%";function l1(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var ESe=new RegExp("rgb"+l1(Ls,Ls,Ls)),TSe=new RegExp("rgba"+l1(Ls,Ls,Ls,Ls)),ISe=new RegExp("hsl"+l1(Ls,s1,s1)),PSe=new RegExp("hsla"+l1(Ls,s1,s1,Ls)),RSe=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,OSe=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,ASe=/^#([0-9a-fA-F]{6})$/,LSe=/^#([0-9a-fA-F]{8})$/;function NSe(e){let t;return typeof e=="number"?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=ASe.exec(e))?parseInt(t[1]+"ff",16)>>>0:Fu&&Fu[e]!==void 0?Fu[e]:(t=ESe.exec(e))?(Ah(t[1])<<24|Ah(t[2])<<16|Ah(t[3])<<8|255)>>>0:(t=TSe.exec(e))?(Ah(t[1])<<24|Ah(t[2])<<16|Ah(t[3])<<8|UU(t[4]))>>>0:(t=RSe.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=LSe.exec(e))?parseInt(t[1],16)>>>0:(t=OSe.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=ISe.exec(e))?(zU(jU(t[1]),r1(t[2]),r1(t[3]))|255)>>>0:(t=PSe.exec(e))?(zU(jU(t[1]),r1(t[2]),r1(t[3]))|UU(t[4]))>>>0:null}function jD(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 zU(e,t,o){let r=o<.5?o*(1+t):o+t-o*t,n=2*o-r,i=jD(n,r,e+1/3),s=jD(n,r,e),a=jD(n,r,e-1/3);return Math.round(i*255)<<24|Math.round(s*255)<<16|Math.round(a*255)<<8}function Ah(e){let t=parseInt(e,10);return t<0?0:t>255?255:t}function jU(e){return(parseFloat(e)%360+360)%360/360}function UU(e){let t=parseFloat(e);return t<0?0:t>1?255:Math.round(t*255)}function r1(e){let t=parseFloat(e);return t<0?0:t>100?1:t/100}function HU(e){let t=NSe(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 zu=(e,t,o)=>{if(le.fun(e))return e;if(le.arr(e))return zu({range:e,output:t,extrapolate:o});if(le.str(e.output[0]))return $D(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=DSe(u,i);return MSe(u,i[d],i[d+1],n[d],n[d+1],c,s,a,r.map)}};function MSe(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 DSe(e,t){for(var o=1;o<t.length-1&&!(t[o]>=e);++o);return o-1}function GD(){return GD=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},GD.apply(this,arguments)}var Lh=Symbol.for("FluidValue.get"),mm=Symbol.for("FluidValue.observers"),Kr=e=>!!(e&&e[Lh]),_r=e=>e&&e[Lh]?e[Lh]():e,YD=e=>e[mm]||null;function VSe(e,t){e.eventObserved?e.eventObserved(t):e(t)}function pm(e,t){let o=e[mm];o&&o.forEach(r=>{VSe(r,t)})}var Nh=class{constructor(t){if(this[Lh]=void 0,this[mm]=void 0,!t&&!(t=this.get))throw Error("Unknown getter");FSe(this,t)}},FSe=(e,t)=>XU(e,Lh,t);function ju(e,t){if(e[Lh]){let o=e[mm];o||XU(e,mm,o=new Set),o.has(t)||(o.add(t),e.observerAdded&&e.observerAdded(o.size,t))}return t}function Uu(e,t){let o=e[mm];if(o&&o.has(t)){let r=o.size-1;r?o.delete(t):e[mm]=null,e.observerRemoved&&e.observerRemoved(r,t)}}var XU=(e,t,o)=>Object.defineProperty(e,t,{value:o,writable:!0,configurable:!0}),n1=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,zSe=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,GU=new RegExp(`(${n1.source})(%|[a-z]+)`,"i"),jSe=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,c1=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,QU=e=>{let[t,o]=USe(e);if(!t||WD())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&&c1.test(o))return QU(o);if(o)return o}return e},USe=e=>{let t=c1.exec(e);if(!t)return[,];let[,o,r]=t;return[o,r]},UD,HSe=(e,t,o,r,n)=>`rgba(${Math.round(t)}, ${Math.round(o)}, ${Math.round(r)}, ${n})`,u1=e=>{UD||(UD=Fu?new RegExp(`(${Object.keys(Fu).join("|")})(?!\\w)`,"g"):/^\b$/);let t=e.output.map(i=>_r(i).replace(c1,QU).replace(zSe,HU).replace(UD,HU)),o=t.map(i=>i.match(n1).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=>zu(GD({},e,{output:i})));return i=>{var s;let a=!GU.test(t[0])&&((s=t.find(u=>GU.test(u)))==null?void 0:s.replace(n1,"")),c=0;return t[0].replace(n1,()=>`${n[c++](i)}${a||""}`).replace(jSe,HSe)}},JU="react-spring: ",eH=e=>{let t=e,o=!1;if(typeof t!="function")throw new TypeError(`${JU}once requires a function parameter`);return(...r)=>{o||(t(...r),o=!0)}},GSe=eH(console.warn);function tH(){GSe(`${JU}The "interpolate" function is deprecated in v9 (use "to" instead)`)}var t7e=eH(console.warn);function Fh(e){return le.str(e)&&(e[0]=="#"||/\d/.test(e)||!WD()&&c1.test(e)||e in(Fu||{}))}var Cy=WD()?Vi.useEffect:Vi.useLayoutEffect,WSe=()=>{let e=(0,Vi.useRef)(!1);return Cy(()=>(e.current=!0,()=>{e.current=!1}),[]),e};function qD(){let e=(0,Vi.useState)()[1],t=WSe();return()=>{t.current&&e(Math.random())}}function oH(e,t){let[o]=(0,Vi.useState)(()=>({inputs:t,result:e()})),r=(0,Vi.useRef)(),n=r.current,i=n;return i?t&&i.inputs&&$Se(t,i.inputs)||(i={inputs:t,result:e()}):i=o,(0,Vi.useEffect)(()=>{r.current=i,n==o&&(o.inputs=o.result=void 0)},[i]),i.result}function $Se(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 ZD=e=>(0,Vi.useEffect)(e,KSe),KSe=[];var Ny=l(je()),My=l(je());var sH=l(je()),Fl=l(je()),By=Symbol.for("Animated:node"),YSe=e=>!!e&&e[By]===e,Ns=e=>e&&e[By],p1=(e,t)=>WU(e,By,t),Ey=e=>e&&e[By]&&e[By].getPayload(),d1=class{constructor(){this.payload=void 0,p1(this,this)}getPayload(){return this.payload||[]}},hm=class e extends d1{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,le.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 le.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,le.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,t&&(this.lastVelocity=null),this.v0=null)}},gm=class e extends hm{constructor(t){super(0),this._string=null,this._toString=void 0,this._toString=zu({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(le.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=zu({output:[this.getValue(),t]})),this._value=0,super.reset()}},f1={dependencies:null},bm=class extends d1{constructor(t){super(),this.source=t,this.setValue(t)}getValue(t){let o={};return Fi(this.source,(r,n)=>{YSe(r)?o[n]=r.getValue(t):Kr(r)?o[n]=_r(r):t||(o[n]=r)}),o}setValue(t){this.source=t,this.payload=this._makePayload(t)}reset(){this.payload&&_t(this.payload,t=>t.reset())}_makePayload(t){if(t){let o=new Set;return Fi(t,this._addToPayload,o),Array.from(o)}}_addToPayload(t){f1.dependencies&&Kr(t)&&f1.dependencies.add(t);let o=Ey(t);o&&_t(o,r=>this.add(r))}},XD=class e extends bm{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(qSe)),!0)}};function qSe(e){return(Fh(e)?gm:hm).create(e)}function h1(e){let t=Ns(e);return t?t.constructor:le.arr(e)?XD:Fh(e)?gm:hm}function m1(){return m1=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},m1.apply(this,arguments)}var rH=(e,t)=>{let o=!le.fun(e)||e.prototype&&e.prototype.isReactComponent;return(0,Fl.forwardRef)((r,n)=>{let i=(0,Fl.useRef)(null),s=o&&(0,Fl.useCallback)(p=>{i.current=XSe(n,p)},[n]),[a,c]=ZSe(r,t),u=qD(),d=()=>{let p=i.current;if(o&&!p)return;(p?t.applyAnimatedValues(p,a.getValue(!0)):!1)===!1&&u()},f=new QD(d,c),m=(0,Fl.useRef)();Cy(()=>(m.current=f,_t(c,p=>ju(p,f)),()=>{m.current&&(_t(m.current.deps,p=>Uu(p,m.current)),_e.cancel(m.current.update))})),(0,Fl.useEffect)(d,[]),ZD(()=>()=>{let p=m.current;_t(p.deps,g=>Uu(g,p))});let h=t.getComponentProps(a.getValue());return sH.createElement(e,m1({},h,{ref:s}))})},QD=class{constructor(t,o){this.update=t,this.deps=o}eventObserved(t){t.type=="change"&&_e.write(this.update)}};function ZSe(e,t){let o=new Set;return f1.dependencies=o,e.style&&(e=m1({},e,{style:t.createAnimatedStyle(e.style)})),e=new bm(e),f1.dependencies=null,[e,o]}function XSe(e,t){return e&&(le.fun(e)?e(t):e.current=t),t}var nH=Symbol.for("AnimatedComponent"),aH=(e,{applyAnimatedValues:t=()=>!1,createAnimatedStyle:o=n=>new bm(n),getComponentProps:r=n=>n}={})=>{let n={applyAnimatedValues:t,createAnimatedStyle:o,getComponentProps:r},i=s=>{let a=iH(s)||"Anonymous";return le.str(s)?s=i[s]||(i[s]=rH(s,n)):s=s[nH]||(s[nH]=rH(s,n)),s.displayName=`Animated(${a})`,s};return Fi(e,(s,a)=>{le.arr(e)&&(a=iH(s)),i[a]=i(s)}),{animated:i}},iH=e=>le.str(e)?e:e&&le.str(e.displayName)?e.displayName:le.fun(e)&&e.name||null;function Yr(){return Yr=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},Yr.apply(this,arguments)}function km(e,...t){return le.fun(e)?e(...t):e}var Ry=(e,t)=>e===!0||!!(t&&e&&(le.fun(e)?e(t):_n(e).includes(t))),vH=(e,t)=>le.obj(e)?t&&e[t]:e,yH=(e,t)=>e.default===!0?e[t]:e.default?e.default[t]:void 0,QSe=e=>e,_H=(e,t=QSe)=>{let o=JSe;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);le.und(i)||(r[n]=i)}return r},JSe=["config","onProps","onStart","onChange","onPause","onResume","onRest"],e0e={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 t0e(e){let t={},o=0;if(Fi(e,(r,n)=>{e0e[n]||(t[n]=r,o++)}),o)return t}function SH(e){let t=t0e(e);if(t){let o={to:t};return Fi(e,(r,n)=>n in t||(o[n]=r)),o}return Yr({},e)}function Oy(e){return e=_r(e),le.arr(e)?e.map(Oy):Fh(e)?Zn.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function t5(e){return le.fun(e)||le.arr(e)&&le.obj(e[0])}var o0e={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}},k1=1.70158,g1=k1*1.525,lH=k1+1,cH=2*Math.PI/3,uH=2*Math.PI/4.5,b1=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,r0e={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=>lH*e*e*e-k1*e*e,easeOutBack:e=>1+lH*Math.pow(e-1,3)+k1*Math.pow(e-1,2),easeInOutBack:e=>e<.5?Math.pow(2*e,2)*((g1+1)*2*e-g1)/2:(Math.pow(2*e-2,2)*((g1+1)*(e*2-2)+g1)+2)/2,easeInElastic:e=>e===0?0:e===1?1:-Math.pow(2,10*e-10)*Math.sin((e*10-10.75)*cH),easeOutElastic:e=>e===0?0:e===1?1:Math.pow(2,-10*e)*Math.sin((e*10-.75)*cH)+1,easeInOutElastic:e=>e===0?0:e===1?1:e<.5?-(Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*uH))/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*uH)/2+1,easeInBounce:e=>1-b1(1-e),easeOutBounce:b1,easeInOutBounce:e=>e<.5?(1-b1(1-2*e))/2:(1+b1(2*e-1))/2},o5=Yr({},o0e.default,{mass:1,damping:1,easing:r0e.linear,clamp:!1}),r5=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,o5)}};function n0e(e,t,o){o&&(o=Yr({},o),dH(o,t),t=Yr({},o,t)),dH(e,t),Object.assign(e,t);for(let s in o5)e[s]==null&&(e[s]=o5[s]);let{mass:r,frequency:n,damping:i}=e;return le.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 dH(e,t){if(!le.und(t.decay))e.duration=void 0;else{let o=!le.und(t.tension)||!le.und(t.friction);(o||!le.und(t.frequency)||!le.und(t.damping)||!le.und(t.mass))&&(e.duration=void 0,e.decay=void 0),o&&(e.frequency=void 0)}}var fH=[],n5=class{constructor(){this.changed=!1,this.values=fH,this.toValues=null,this.fromValues=fH,this.to=void 0,this.from=void 0,this.config=new r5,this.immediate=!1}};function xH(e,{key:t,props:o,defaultProps:r,state:n,actions:i}){return new Promise((s,a)=>{var c;let u,d,f=Ry((c=o.cancel)!=null?c:r?.cancel,t);if(f)p();else{le.und(o.pause)||(n.paused=Ry(o.pause,t));let g=r?.pause;g!==!0&&(g=n.paused||Ry(g,t)),u=km(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&&!Zn.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(Yr({},o,{callId:e,cancel:f}),s)}catch(g){a(g)}}})}var d5=(e,t)=>t.length==1?t[0]:t.some(o=>o.cancelled)?zh(e.get()):t.every(o=>o.noop)?wH(e.get()):Ms(e.get(),t.every(o=>o.finished)),wH=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),Ms=(e,t,o=!1)=>({value:e,finished:t,cancelled:o}),zh=e=>({value:e,cancelled:!0,finished:!1});function CH(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=_H(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)&&zh(r)||n!==o.asyncId&&Ms(r,!1);if(k)throw b.result=k,f(b),b},p=(b,k)=>{let v=new v1,y=new y1;return(async()=>{if(Zn.skipAnimation)throw Ay(o),y.result=Ms(r,!1),f(y),y;h(v);let _=le.obj(b)?Yr({},b):Yr({},k,{to:b});_.parentId=n,Fi(u,(C,B)=>{le.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(Zn.skipAnimation)return Ay(o),Ms(r,!1);try{let b;le.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=Ms(r.get(),!0,!1)}catch(b){if(b instanceof v1)g=b.result;else if(b instanceof y1)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 le.fun(s)&&_e.batchedUpdates(()=>{s(g,r,r.item)}),g})()}function Ay(e,t){Mh(e.timeouts,o=>o.cancel()),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}var v1=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}},y1=class extends Error{constructor(){super("SkipAnimationSignal"),this.result=void 0}},i5=e=>e instanceof Ly,i0e=1,Ly=class extends Nh{constructor(...t){super(...t),this.id=i0e++,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=Ns(this);return t&&t.getValue()}to(...t){return Zn.to(this,t)}interpolate(...t){return tH(),Zn.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){pm(this,{type:"change",parent:this,value:t,idle:o})}_onPriorityChange(t){this.idle||Vh.sort(this),pm(this,{type:"priority",parent:this,priority:t})}},vm=Symbol.for("SpringPhase"),BH=1,s5=2,a5=4,JD=e=>(e[vm]&BH)>0,Hu=e=>(e[vm]&s5)>0,Ty=e=>(e[vm]&a5)>0,mH=(e,t)=>t?e[vm]|=s5|BH:e[vm]&=~s5,pH=(e,t)=>t?e[vm]|=a5:e[vm]&=~a5,l5=class extends Ly{constructor(t,o){if(super(),this.key=void 0,this.animation=new n5,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,!le.und(t)||!le.und(o)){let r=le.obj(t)?Yr({},t):Yr({},o,{from:t});le.und(r.default)&&(r.default=!0),this.start(r)}}get idle(){return!(Hu(this)||this._state.asyncTo)||Ty(this)}get goal(){return _r(this.animation.to)}get velocity(){let t=Ns(this);return t instanceof hm?t.lastVelocity||0:t.getPayload().map(o=>o.lastVelocity||0)}get hasAnimated(){return JD(this)}get isAnimating(){return Hu(this)}get isPaused(){return Ty(this)}get isDelayed(){return this._state.delayed}advance(t){let o=!0,r=!1,n=this.animation,{config:i,toValues:s}=n,a=Ey(n.to);!a&&Kr(n.to)&&(s=_n(_r(n.to))),n.values.forEach((d,f)=>{if(d.done)return;let m=d.constructor==gm?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=le.arr(i.velocity)?i.velocity[f]:i.velocity,v,y=i.precision||(b==m?.005:Math.min(1,Math.abs(m-b)*.001));if(le.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=!le.und(S),B=b==m?d.v0>0:b<m,P,R=!1,E=1,L=Math.ceil(t/E);for(let T=0;T<L&&(P=Math.abs(v)>_,!(!P&&(h=Math.abs(m-p)<=y,h)));++T){C&&(R=p==m||p>m==B,R&&(v=-v*S,p=m));let I=-i.tension*1e-6*(p-m),M=-i.friction*.001*v,D=(I+M)/i.mass;v=v+D*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=Ns(this),u=c.getValue();if(o){let d=_r(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(Hu(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 le.und(t)?(r=this.queue||[],this.queue=[]):r=[le.obj(t)?t:Yr({},o,{to:t})],Promise.all(r.map(n=>this._update(n))).then(n=>d5(this,n))}stop(t){let{to:o}=this.animation;return this._focus(this.get()),Ay(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=le.obj(r)?r[o]:r,(r==null||t5(r))&&(r=void 0),n=le.obj(n)?n[o]:n,n==null&&(n=void 0);let i={to:r,from:n};return JD(this)||(t.reverse&&([r,n]=[n,r]),n=_r(n),le.und(n)?Ns(this)||this._set(r):this._set(n)),i}_update(t,o){let r=Yr({},t),{key:n,defaultProps:i}=this;r.default&&Object.assign(i,_H(r,(c,u)=>/^on/.test(u)?vH(c,n):c)),gH(this,r,"onProps"),Py(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 xH(++this._lastCallId,{key:n,props:r,defaultProps:i,state:a,actions:{pause:()=>{Ty(this)||(pH(this,!0),Dh(a.pauseQueue),Py(this,"onPause",Ms(this,Iy(this,this.animation.to)),this))},resume:()=>{Ty(this)&&(pH(this,!1),Hu(this)&&this._resume(),Dh(a.resumeQueue),Py(this,"onResume",Ms(this,Iy(this,this.animation.to)),this))},start:this._merge.bind(this,s)}}).then(c=>{if(r.loop&&c.finished&&!(o&&c.noop)){let u=EH(r);if(u)return this._update(u,!0)}return c})}_merge(t,o,r){if(o.cancel)return this.stop(!0),r(zh(this));let n=!le.und(t.to),i=!le.und(t.from);if(n||i)if(o.callId>this._lastToId)this._lastToId=o.callId;else return r(zh(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||le.und(f))&&(f=m),o.reverse&&([f,m]=[m,f]);let h=!Ba(m,d);h&&(c.from=m),m=_r(m);let p=!Ba(f,u);p&&this._focus(f);let g=t5(o.to),{config:b}=c,{decay:k,velocity:v}=b;(n||i)&&(b.velocity=0),o.config&&!g&&n0e(b,km(o.config,s),o.config!==a.config?km(a.config,s):void 0);let y=Ns(this);if(!y||le.und(f))return r(Ms(this,!0));let _=le.und(o.reset)?i&&!o.default:!le.und(m)&&Ry(o.reset,s),S=_?m:this.get(),C=Oy(f),B=le.num(C)||le.arr(C)||Fh(C),P=!g&&(!B||Ry(a.immediate||o.immediate,s));if(p){let T=h1(f);if(T!==y.constructor)if(P)y=this._set(C);else throw Error(`Cannot animate between ${y.constructor.name} and ${T.name}, as the "to" prop suggests`)}let R=y.constructor,E=Kr(f),L=!1;if(!E){let T=_||!JD(this)&&h;(p||T)&&(L=Ba(Oy(S),C),E=!L),(!Ba(c.immediate,P)&&!P||!Ba(b.decay,k)||!Ba(b.velocity,v))&&(E=!0)}if(L&&Hu(this)&&(c.changed&&!_?E=!0:E||this._stop(u)),!g&&((E||Kr(u))&&(c.values=y.getPayload(),c.toValues=Kr(f)?null:R==gm?[1]:_n(C)),c.immediate!=P&&(c.immediate=P,!P&&!_&&this._set(u)),E)){let{onRest:T}=c;_t(s0e,M=>gH(this,o,M));let I=Ms(this,Iy(this,u));Dh(this._pendingCalls,I),this._pendingCalls.add(r),c.changed&&_e.batchedUpdates(()=>{c.changed=!_,T?.(I,this),_?km(a.onRest,I):c.onStart==null||c.onStart(I,this)})}_&&this._set(S),g?r(CH(o.to,o,this._state,this)):E?this._start():Hu(this)&&!p?this._pendingCalls.add(r):r(wH(S))}_focus(t){let o=this.animation;t!==o.to&&(YD(this)&&this._detach(),o.to=t,YD(this)&&this._attach())}_attach(){let t=0,{to:o}=this.animation;Kr(o)&&(ju(o,this),i5(o)&&(t=o.priority+1)),this.priority=t}_detach(){let{to:t}=this.animation;Kr(t)&&Uu(t,this)}_set(t,o=!0){let r=_r(t);if(!le.und(r)){let n=Ns(this);if(!n||!Ba(r,n.getValue())){let i=h1(r);!n||n.constructor!=i?p1(this,i.create(r)):n.setValue(r),n&&_e.batchedUpdates(()=>{this._onChange(r,o)})}}return Ns(this)}_onStart(){let t=this.animation;t.changed||(t.changed=!0,Py(this,"onStart",Ms(this,Iy(this,t.to)),this))}_onChange(t,o){o||(this._onStart(),km(this.animation.onChange,t,this)),km(this.defaultProps.onChange,t,this),super._onChange(t,o)}_start(){let t=this.animation;Ns(this).reset(_r(t.to)),t.immediate||(t.fromValues=t.values.map(o=>o.lastPosition)),Hu(this)||(mH(this,!0),Ty(this)||this._resume())}_resume(){Zn.skipAnimation?this.finish():Vh.start(this)}_stop(t,o){if(Hu(this)){mH(this,!1);let r=this.animation;_t(r.values,i=>{i.done=!0}),r.toValues&&(r.onChange=r.onPause=r.onResume=void 0),pm(this,{type:"idle",parent:this});let n=o?zh(this.get()):Ms(this.get(),Iy(this,t??r.to));Dh(this._pendingCalls,n),r.changed&&(r.changed=!1,Py(this,"onRest",n,this))}}};function Iy(e,t){let o=Oy(t),r=Oy(e.get());return Ba(r,o)}function EH(e,t=e.loop,o=e.to){let r=km(t);if(r){let n=r!==!0&&SH(r),i=(n||e).reverse,s=!n||n.reset;return c5(Yr({},e,{loop:t,default:!1,pause:void 0,to:!i||t5(o)?o:void 0,from:s?e.from:void 0,reset:s},n))}}function c5(e){let{to:t,from:o}=e=SH(e),r=new Set;return le.obj(t)&&hH(t,r),le.obj(o)&&hH(o,r),e.keys=r.size?Array.from(r):null,e}function hH(e,t){Fi(e,(o,r)=>o!=null&&t.add(r))}var s0e=["onStart","onRest","onChange","onPause","onResume"];function gH(e,t,o){e.animation[o]=t[o]!==yH(t,o)?vH(t[o],e.key):void 0}function Py(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 a0e=["onStart","onChange","onRest"],l0e=1,_1=class{constructor(t,o){this.id=l0e++,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(Yr({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];le.und(r)||this.springs[o].set(r)}}update(t){return t&&this.queue.push(c5(t)),this}start(t){let{queue:o}=this;return t?o=_n(t).map(c5):this.queue=[],this._flush?this._flush(this,o):(IH(this,o),c0e(this,o))}stop(t,o){if(t!==!!t&&(o=t),o){let r=this.springs;_t(_n(o),n=>r[n].stop(!!t))}else Ay(this._state,this._lastAsyncId),this.each(r=>r.stop(!!t));return this}pause(t){if(le.und(t))this.start({pause:!0});else{let o=this.springs;_t(_n(t),r=>o[r].pause())}return this}resume(t){if(le.und(t))this.start({pause:!1});else{let o=this.springs;_t(_n(t),r=>o[r].resume())}return this}each(t){Fi(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,Mh(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&&Mh(o,([c,u])=>{u.value=a,c(u,this,this._item)}),s&&(this._started=!1,Mh(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 c0e(e,t){return Promise.all(t.map(o=>TH(e,o))).then(o=>d5(e,o))}async function TH(e,t,o){let{keys:r,to:n,from:i,loop:s,onRest:a,onResolve:c}=t,u=le.obj(t.default)&&t.default;s&&(t.loop=!1),n===!1&&(t.to=null),i===!1&&(t.from=null);let d=le.arr(n)||le.fun(n)?n:void 0;d?(t.to=void 0,t.onRest=void 0,u&&(u.onRest=void 0)):_t(a0e,g=>{let b=t[g];if(le.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,Dh(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||yH(t,"cancel")===!0;(d||h&&f.asyncId)&&m.push(xH(++e._lastAsyncId,{props:t,state:f,actions:{pause:a1,resume:a1,start(g,b){h?(Ay(f,e._lastAsyncId),b(zh(e))):(g.onRest=a,b(CH(d,g,f,e)))}}})),f.paused&&await new Promise(g=>{f.resumeQueue.add(g)});let p=d5(e,await Promise.all(m));if(s&&p.finished&&!(o&&p.noop)){let g=EH(t,s,n);if(g)return IH(e,[g]),TH(e,g,!0)}return c&&_e.batchedUpdates(()=>c(p,e,e.item)),p}function u0e(e,t){let o=new l5;return o.key=e,t&&ju(o,t),o}function d0e(e,t,o){t.keys&&_t(t.keys,r=>{(e[r]||(e[r]=o(r)))._prepareNode(t)})}function IH(e,t){_t(t,o=>{d0e(e.springs,o,r=>u0e(r,e))})}function f0e(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 m0e=["children"],f5=e=>{let{children:t}=e,o=f0e(e,m0e),r=(0,My.useContext)(S1),n=o.pause||!!r.pause,i=o.immediate||!!r.immediate;o=oH(()=>({pause:n,immediate:i}),[n,i]);let{Provider:s}=S1;return Ny.createElement(s,{value:o},t)},S1=p0e(f5,{});f5.Provider=S1.Provider;f5.Consumer=S1.Consumer;function p0e(e,t){return Object.assign(e,Ny.createContext(t)),e.Provider._context=e,e.Consumer._context=e,e}var bH;(function(e){e.MOUNT="mount",e.ENTER="enter",e.UPDATE="update",e.LEAVE="leave"})(bH||(bH={}));var u5=class extends Ly{constructor(t,o){super(),this.key=void 0,this.idle=!0,this.calc=void 0,this._active=new Set,this.source=t,this.calc=zu(...o);let r=this._get(),n=h1(r);p1(this,n.create(r))}advance(t){let o=this._get(),r=this.get();Ba(o,r)||(Ns(this).setValue(o),this._onChange(o,this.idle)),!this.idle&&kH(this._active)&&e5(this)}_get(){let t=le.arr(this.source)?this.source.map(_r):_n(_r(this.source));return this.calc(...t)}_start(){this.idle&&!kH(this._active)&&(this.idle=!1,_t(Ey(this),t=>{t.done=!1}),Zn.skipAnimation?(_e.batchedUpdates(()=>this.advance()),e5(this)):Vh.start(this))}_attach(){let t=1;_t(_n(this.source),o=>{Kr(o)&&ju(o,this),i5(o)&&(o.idle||this._active.add(o),t=Math.max(t,o.priority+1))}),this.priority=t,this._start()}_detach(){_t(_n(this.source),t=>{Kr(t)&&Uu(t,this)}),this._active.clear(),e5(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=_n(this.source).reduce((o,r)=>Math.max(o,(i5(r)?r.priority:0)+1),0))}};function h0e(e){return e.idle!==!1}function kH(e){return!e.size||Array.from(e).every(h0e)}function e5(e){e.idle||(e.idle=!0,_t(Ey(e),t=>{t.done=!0}),pm(e,{type:"idle",parent:e}))}Zn.assign({createStringInterpolator:u1,to:(e,t)=>new u5(e,t)});var d7e=Vh.advance;var OH=l(m5());function b5(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 g0e=["style","children","scrollTop","scrollLeft"],AH=/^--/;function b0e(e,t){return t==null||typeof t=="boolean"||t===""?"":typeof t=="number"&&t!==0&&!AH.test(e)&&!(Dy.hasOwnProperty(e)&&Dy[e])?t+"px":(""+t).trim()}var RH={};function k0e(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=b5(r,g0e),u=Object.values(c),d=Object.keys(c).map(f=>o||e.hasAttribute(f)?f:RH[f]||(RH[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=b0e(f,n[f]);AH.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 Dy={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},v0e=(e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1),y0e=["Webkit","Ms","Moz","O"];Dy=Object.keys(Dy).reduce((e,t)=>(y0e.forEach(o=>e[v0e(o,t)]=e[t]),e),Dy);var _0e=["x","y","z"],S0e=/^(matrix|translate|scale|rotate|skew)/,x0e=/^(translate)/,w0e=/^(rotate|skew)/,p5=(e,t)=>le.num(e)&&e!==0?e+t:e,x1=(e,t)=>le.arr(e)?e.every(o=>x1(o,t)):le.num(e)?e===t:parseFloat(e)===t,h5=class extends bm{constructor(t){let{x:o,y:r,z:n}=t,i=b5(t,_0e),s=[],a=[];(o||r||n)&&(s.push([o||0,r||0,n||0]),a.push(c=>[`translate3d(${c.map(u=>p5(u,"px")).join(",")})`,x1(c,0)])),Fi(i,(c,u)=>{if(u==="transform")s.push([c||""]),a.push(d=>[d,d===""]);else if(S0e.test(u)){if(delete i[u],le.und(c))return;let d=x0e.test(u)?"px":w0e.test(u)?"deg":"";s.push(_n(c)),a.push(u==="rotate3d"?([f,m,h,p])=>[`rotate3d(${f},${m},${h},${p5(p,d)})`,x1(p,0)]:f=>[`${u}(${f.map(m=>p5(m,d)).join(",")})`,x1(f,u.startsWith("scale")?1:0)])}}),s.length&&(i.transform=new g5(s,a)),super(i)}},g5=class extends Nh{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 _t(this.inputs,(r,n)=>{let i=_r(r[0]),[s,a]=this.transforms[n](le.arr(i)?i:r.map(_r));t+=" "+s,o=o&&a}),o?"none":t}observerAdded(t){t==1&&_t(this.inputs,o=>_t(o,r=>Kr(r)&&ju(r,this)))}observerRemoved(t){t==0&&_t(this.inputs,o=>_t(o,r=>Kr(r)&&Uu(r,this)))}eventObserved(t){t.type=="change"&&(this._value=null),pm(this,t)}},C0e=["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"],B0e=["scrollTop","scrollLeft"];Zn.assign({batchedUpdates:OH.unstable_batchedUpdates,createStringInterpolator:u1,colors:ZU});var E0e=aH(C0e,{applyAnimatedValues:k0e,createAnimatedStyle:e=>new h5(e),getComponentProps:e=>b5(e,B0e)}),LH=E0e.animated;var jh=l(O(),1),MH=l(Fe(),1),DH=l(z(),1);var T0e=200;function NH(e){return{top:e.offsetTop,left:e.offsetLeft}}function I0e({triggerAnimationOnChange:e,clientId:t}){let o=(0,jh.useRef)(),{isTyping:r,getGlobalBlockCount:n,isBlockSelected:i,isFirstMultiSelectedBlock:s,isBlockMultiSelected:a,isAncestorMultiSelected:c,isDraggingBlocks:u}=(0,DH.useSelect)(x),{previous:d,prevRect:f}=(0,jh.useMemo)(()=>({previous:o.current&&NH(o.current),prevRect:o.current&&o.current.getBoundingClientRect()}),[e]);return(0,jh.useLayoutEffect)(()=>{if(!d||!o.current)return;let m=(0,MH.getScrollContainer)(o.current),h=i(t),p=h||s(t),g=u();function b(){if(!g&&p&&f){let R=o.current.getBoundingClientRect().top-f.top;R&&(m.scrollTop+=R)}}if(window.matchMedia("(prefers-reduced-motion: reduce)").matches||r()||n()>T0e){b();return}let v=h||a(t)||c(t);if(v&&g)return;let y=v?"1":"",_=new _1({x:0,y:0,config:{mass:5,tension:2e3,friction:200},onChange({value:P}){if(!o.current)return;let{x:R,y:E}=P;R=Math.round(R),E=Math.round(E);let L=R===0&&E===0;o.current.style.transformOrigin="center center",o.current.style.transform=L?null:`translate3d(${R}px,${E}px,0)`,o.current.style.zIndex=y,b()}});o.current.style.transform=void 0;let S=NH(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 w1=I0e;var B1=l(O(),1),zl=l(Fe(),1),FH=l(z(),1);var C1=".block-editor-block-list__block",P0e=".block-list-appender",R0e=".block-editor-button-block-appender";function VH(e,t){return e.closest(C1)===t.closest(C1)}function Ea(e,t){return t.closest([C1,P0e,R0e].join(","))===e}function zi(e){for(;e&&e.nodeType!==e.ELEMENT_NODE;)e=e.parentNode;if(!e)return;let o=e.closest(C1);if(o)return o.id.slice(6)}function k5(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 O0e(e){let t=e.ownerDocument.defaultView;if(!t||e.classList.contains("components-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 A0e(e){let t=window.getComputedStyle(e);return t.overflowX==="auto"||t.overflowX==="scroll"||t.overflowY==="auto"||t.overflowY==="scroll"}var L0e=["core/navigation"];function Uh(e){let t=e.ownerDocument.defaultView;if(!t)return new window.DOMRectReadOnly;let o=e.getBoundingClientRect(),r=e.getAttribute("data-type");if(r&&L0e.includes(r)){let s=[e],a;for(;a=s.pop();)if(!A0e(a)){for(let c of a.children)if(O0e(c)){let u=c.getBoundingClientRect();o=k5(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 zH({clientId:e,initialPosition:t}){let o=(0,B1.useRef)(),{isBlockSelected:r,isMultiSelecting:n,isZoomOut:i}=F((0,FH.useSelect)(x));return(0,B1.useEffect)(()=>{if(!r(e)||n()||i()||t==null||!o.current)return;let{ownerDocument:s}=o.current;if(Ea(o.current,s.activeElement))return;let a=zl.focus.tabbable.find(o.current).filter(d=>(0,zl.isTextField)(d)),c=t===-1,u=a[c?a.length-1:0]||o.current;if(!Ea(o.current,u)){o.current.focus();return}if(!o.current.getAttribute("contenteditable")){let d=zl.focus.tabbable.findNext(o.current);if(d&&Ea(o.current,d)&&(0,zl.isFormElement)(d)){d.focus();return}}(0,zl.placeCaretAtHorizontalEdge)(u,c)},[t,e]),o}var jH=l(X(),1);function E1(e){e.defaultPrevented||(e.preventDefault(),e.currentTarget.classList.toggle("is-hovered",e.type==="mouseover"))}function UH({isEnabled:e=!0}={}){return(0,jH.useRefEffect)(t=>{if(e)return t.addEventListener("mouseout",E1),t.addEventListener("mouseover",E1),()=>{t.removeEventListener("mouseout",E1),t.removeEventListener("mouseover",E1),t.classList.remove("is-hovered")}},[e])}var T1=l(z(),1),HH=l(X(),1);function GH(e){let{isBlockSelected:t}=(0,T1.useSelect)(x),{selectBlock:o,selectionChange:r}=(0,T1.useDispatch)(x);return(0,HH.useRefEffect)(n=>{function i(s){if(!n.parentElement.closest('[contenteditable="true"]')){if(t(e)){s.target.isContentEditable||r(e);return}Ea(n,s.target)&&o(e)}}return n.addEventListener("focusin",i),()=>{n.removeEventListener("focusin",i)}},[t,o])}var Hh=l($(),1),$H=l(Fe(),1),Gu=l(ct(),1),I1=l(z(),1),KH=l(X(),1);function WH(e){return!e||e==="transparent"||e==="rgba(0, 0, 0, 0)"}function YH({clientId:e,isSelected:t}){let{getBlockRootClientId:o,isZoomOut:r,hasMultiSelection:n,isSectionBlock:i,editedContentOnlySection:s,getBlock:a}=F((0,I1.useSelect)(x)),{insertAfterBlock:c,removeBlock:u,resetZoomLevel:d,startDraggingBlocks:f,stopDraggingBlocks:m,editContentOnlySection:h}=F((0,I1.useDispatch)(x));return(0,KH.useRefEffect)(p=>{if(!t)return;function g(v){let{keyCode:y,target:_}=v;y!==Gu.ENTER&&y!==Gu.BACKSPACE&&y!==Gu.DELETE||_!==p||(0,$H.isTextField)(_)||(v.preventDefault(),y===Gu.ENTER&&r()?d():y===Gu.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 P=p.getBoundingClientRect(),R=p.id,E=p.cloneNode();E.style.display="none",p.id=null,p.after(E);let L=1;{let J=p;for(;J=J.parentElement;){let{scale:K}=S.getComputedStyle(J);if(K&&K!=="none"){L=parseFloat(K);break}}}let T=1/L,I={};for(let J of["transform","transformOrigin","transition","zIndex","position","top","left","pointerEvents","opacity","backgroundColor"])I[J]=p.style[J];let M=S.scrollY,D=S.scrollX,U=v.clientX,j=v.clientY;p.style.position="relative",p.style.top="0px",p.style.left="0px";let H=v.clientX-P.left,G=v.clientY-P.top,Q=P.height>200?200/P.height:1;if(p.style.zIndex="1000",p.style.transformOrigin=`${H*T}px ${G*T}px`,p.style.transition="transform 0.2s ease-out",p.style.transform=`scale(${Q})`,p.style.opacity="0.9",WH(S.getComputedStyle(p).backgroundColor)){let J="transparent",K=p;for(;K=K.parentElement;){let{backgroundColor:ee}=S.getComputedStyle(K);if(!WH(ee)){J=ee;break}}p.style.backgroundColor=J}let ie=!1,ce=U,te=j;function ne(J){J.clientX===ce&&J.clientY===te||(ce=J.clientX,te=J.clientY,Z())}function Z(){ie||(ie=!0,p.style.pointerEvents="none");let J=te-j,K=ce-U,ee=S.scrollY,re=S.scrollX,W=ee-M,ae=re-D,ge=J+W,fe=K+ae;p.style.top=`${ge*T}px`,p.style.left=`${fe*T}px`}function Y(){_.removeEventListener("dragover",ne),_.removeEventListener("dragend",Y),_.removeEventListener("drop",Y),_.removeEventListener("scroll",Z);for(let[J,K]of Object.entries(I))p.style[J]=K;E.remove(),p.id=R,B.remove(),m(),document.body.classList.remove("is-dragging-components-draggable"),_.documentElement.classList.remove("is-dragging")}_.addEventListener("dragover",ne),_.addEventListener("dragend",Y),_.addEventListener("drop",Y),_.addEventListener("scroll",Z),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,Hh.isReusableBlock)(_),C=(0,Hh.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,Hh.isReusableBlock,Hh.isTemplatePart,c,u,r,d,n,f,m,i,s,h])}var qH=l(X(),1),ZH=l(O(),1);function XH(){let e=(0,ZH.useContext)(P1);return(0,qH.useRefEffect)(t=>{if(e)return e.observe(t),()=>{e.unobserve(t)}},[e])}var R1=l(X(),1);function QH({isSelected:e}){let t=(0,R1.useReducedMotion)();return(0,R1.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 JH=l(X(),1),eG=l(z(),1);function O1({clientId:e="",isEnabled:t=!0}={}){let{getEnabledClientIdsTree:o}=F((0,eG.useSelect)(x));return(0,JH.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 tG=l(X(),1),Vy=new Map;function N0e(e,t){let o=Vy.get(e);o||(o=new Set,Vy.set(e,o),e.addEventListener("pointerdown",rG)),o.add(t)}function M0e(e,t){let o=Vy.get(e);o&&(o.delete(t),oG(t),o.size===0&&(Vy.delete(e),e.removeEventListener("pointerdown",rG)))}function oG(e){let t=e.getAttribute("data-draggable");t&&(e.removeAttribute("data-draggable"),t==="true"&&!e.getAttribute("draggable")&&e.setAttribute("draggable","true"))}function rG(e){let{target:t}=e,{ownerDocument:o,isContentEditable:r,tagName:n}=t,i=["INPUT","TEXTAREA"].includes(n),s=Vy.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)oG(a)}function nG(){return(0,tG.useRefEffect)(e=>(N0e(e.ownerDocument,e),()=>{M0e(e.ownerDocument,e)}),[])}var vo=l(N(),1),Sn=l(O(),1),qr=l(A(),1),Gh=l(z(),1),lG=l(Ds(),1),cG=l(Li(),1);var Fy=l(N(),1);function D0e(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"||!ku.some(([,{key:n}])=>n===t)?!1:r[t]===!1}function sG(e,t){if(!e?.length)return!1;let o=e.filter(r=>D0e(r,t)).length;return o===0?!1:o===e.length?!0:null}function aG(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 zy(e){if(!e&&e!==!1)return null;if(e===!1)return(0,Fy.__)("Block is hidden");if(e?.viewport){let t=ku.filter(([o])=>e.viewport?.[o]===!1).map(([,o])=>o.label);if(t.length>0)return(0,Fy.sprintf)((0,Fy.__)("Block is hidden on %s"),t.join(", "))}return null}var co=l(w(),1);if(typeof document<"u"&&!document.head.querySelector("style[data-wp-hash='e252bf6889']")){let e=document.createElement("style");e.setAttribute("data-wp-hash","e252bf6889"),e.appendChild(document.createTextNode(".block-editor-block-visibility-modal{z-index:1000001}.block-editor-block-visibility-modal__options{border:0;list-style:none;margin:24px 0;padding:0}.block-editor-block-visibility-modal__options-item{align-items:center;display:flex;gap:24px;justify-content:space-between;margin:0 0 16px}.block-editor-block-visibility-modal__options-item:last-child{margin:0}.block-editor-block-visibility-modal__options-item--everywhere{align-items:start;flex-direction:column}.block-editor-block-visibility-modal__options-checkbox--everywhere{font-weight:600}.block-editor-block-visibility-modal__options-icon--checked{fill:#ddd}.block-editor-block-visibility-modal__sub-options{padding-inline-start:12px;width:100%}.block-editor-block-visibility-modal__description{color:#757575;font-size:12px}.block-editor-block-visibility-info{align-items:center;display:flex;justify-content:start;margin:0 16px 16px;padding-bottom:4px;padding-top:4px}")),document.head.appendChild(e)}var V0e={[Tt.mobile.key]:!1,[Tt.tablet.key]:!1,[Tt.desktop.key]:!1},F0e=[];function v5({clientIds:e,onClose:t}){let{createSuccessNotice:o}=(0,Gh.useDispatch)(cG.store),{updateBlockAttributes:r}=(0,Gh.useDispatch)(x),n=(0,Gh.useSelect)(v=>v(x).getBlocksByClientId(e)??F0e,[e]),i=(0,Gh.useSelect)(v=>v(lG.store).getShortcutRepresentation("core/editor/toggle-list-view"),[]),s=(0,Sn.useMemo)(()=>{if(n?.length===0)return{hideEverywhere:!1,viewportChecked:{}};let v={};return ku.forEach(([,{key:y}])=>{v[y]=sG(n,y)}),{hideEverywhere:aG(n),viewportChecked:v}},[n]),[a,c]=(0,Sn.useState)(s?.viewportChecked??{}),[u,d]=(0,Sn.useState)(s?.hideEverywhere??!1),f=(0,Sn.useCallback)((v,y)=>{c({...a,[v]:y})},[a]),m=(0,Sn.useMemo)(()=>{if(!u)return(0,vo.sprintf)((0,vo.__)("Block visibility settings updated. You can access them via the List View (%s)."),i);let v=n?.length>1?(0,vo.__)("Blocks hidden. You can access them via the List View (%s)."):(0,vo.__)("Block hidden. You can access it via the List View (%s).");return(0,vo.sprintf)(v,i)},[u,n?.length,i]),h=(0,Sn.useMemo)(()=>Object.values(a).some(v=>v===!0||v===null),[a]),p=(0,Sn.useMemo)(()=>u!==s.hideEverywhere?!0:ku.some(([,{key:v}])=>a[v]!==s.viewportChecked[v]),[u,a,s]),g=(0,Sn.useMemo)(()=>u===null?!0:Object.values(a).some(v=>v===null),[u,a]),b=(0,Sn.useCallback)(v=>{v.preventDefault();let y=u?!1:{viewport:ku.reduce((S,[,{key:C}])=>(a[C]&&(S[C]=!1),S),{})},_=Object.fromEntries(n.map(({clientId:S,attributes:C})=>[S,{metadata:Ae({...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,co.jsx)(qr.Modal,{title:e?.length>1?(0,vo.__)("Hide blocks"):(0,vo.__)("Hide block"),onRequestClose:t,overlayClassName:"block-editor-block-visibility-modal",size:"small",children:(0,co.jsxs)("form",{onSubmit:b,children:[(0,co.jsxs)("fieldset",{children:[(0,co.jsx)("legend",{children:k?(0,vo.__)("Select the viewport sizes for which you want to hide the blocks. Changes will apply to all selected blocks."):(0,vo.__)("Select the viewport size for which you want to hide the block.")}),(0,co.jsx)("ul",{className:"block-editor-block-visibility-modal__options",children:(0,co.jsxs)("li",{className:"block-editor-block-visibility-modal__options-item block-editor-block-visibility-modal__options-item--everywhere",children:[(0,co.jsx)(qr.CheckboxControl,{className:"block-editor-block-visibility-modal__options-checkbox--everywhere",label:(0,vo.__)("Omit from published content"),checked:u===!0,indeterminate:u===null,onChange:v=>{d(v),c(V0e)}}),u!==!0&&(0,co.jsx)("ul",{className:"block-editor-block-visibility-modal__sub-options",children:ku.map(([,{label:v,icon:y,key:_}])=>(0,co.jsxs)("li",{className:"block-editor-block-visibility-modal__options-item",children:[(0,co.jsx)(qr.CheckboxControl,{label:(0,vo.sprintf)((0,vo.__)("Hide on %s"),v),checked:a[_]??!1,indeterminate:a[_]===null,onChange:S=>f(_,S)}),(0,co.jsx)(qr.Icon,{icon:y,className:V({"block-editor-block-visibility-modal__options-icon--checked":a[_]})})]},_))})]})}),k&&g&&(0,co.jsx)("p",{className:"block-editor-block-visibility-modal__description",children:(0,vo.__)("Selected blocks have different visibility settings. The checkboxes show an indeterminate state when settings differ.")}),!k&&u===!0&&(0,co.jsx)("p",{className:"block-editor-block-visibility-modal__description",children:(0,vo.sprintf)((0,vo.__)("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,co.jsx)("p",{className:"block-editor-block-visibility-modal__description",children:(0,Sn.createInterpolateElement)((0,vo.sprintf)((0,vo.__)("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,co.jsx)("strong",{})})})]}),(0,co.jsxs)(qr.Flex,{className:"block-editor-block-visibility-modal__actions",justify:"flex-end",expanded:!1,children:[(0,co.jsx)(qr.FlexItem,{children:(0,co.jsx)(qr.Button,{variant:"tertiary",onClick:t,__next40pxDefaultSize:!0,children:(0,vo.__)("Cancel")})}),(0,co.jsx)(qr.FlexItem,{children:(0,co.jsx)(qr.Button,{variant:"primary",type:"submit",disabled:!p,accessibleWhenDisabled:!0,__next40pxDefaultSize:!0,children:(0,vo.__)("Apply")})})]})]})})}var y5=l(X(),1);function ji(e={}){let{blockVisibility:t=void 0,deviceType:o=Tt.desktop.key,view:r=window}=e,n=(0,y5.useViewportMatch)("mobile",">=",r),i=(0,y5.useViewportMatch)("medium",">=",r),s;return o===Tt.mobile.key?s=Tt.mobile.key:o===Tt.tablet.key?s=Tt.tablet.key:n?n&&!i?s=Tt.tablet.key:s=Tt.desktop.key:s=Tt.mobile.key,{isBlockCurrentlyHidden:t===!1||t?.viewport?.[s]===!1,currentViewport:s}}var _5=l(N(),1),A1=l(A(),1),L1=l(O(),1);var uG=l($(),1),N1=l(z(),1);var S5=l(w(),1);function x5({clientIds:e}){let t=(0,L1.useRef)(!1),{canToggleBlockVisibility:o,areBlocksHiddenAnywhere:r}=(0,N1.useSelect)(s=>{let{getBlocksByClientId:a,getBlockName:c,isBlockHiddenAnywhere:u}=F(s(x));return{canToggleBlockVisibility:a(e).every(({clientId:f})=>(0,uG.hasBlockSupport)(c(f),"visibility",!0)),areBlocksHiddenAnywhere:e?.every(f=>u(f))}},[e]),n=(0,N1.useDispatch)(x);if((0,L1.useEffect)(()=>{r&&(t.current=!0)},[r]),!r&&!t.current)return null;let{showViewportModal:i}=F(n);return(0,S5.jsx)(A1.ToolbarGroup,{className:"block-editor-block-visibility-toolbar",children:(0,S5.jsx)(A1.ToolbarButton,{disabled:!o,icon:r?Es:Qf,label:r?(0,_5.__)("Hidden"):(0,_5.__)("Visible"),onClick:()=>i(e),"aria-haspopup":"dialog"})})}var w5=l(N(),1),dG=l(A(),1),M1=l(z(),1),fG=l(Ds(),1);var mG=l(w(),1);function C5({clientIds:e}){let{areBlocksHiddenAnywhere:t,shortcut:o}=(0,M1.useSelect)(n=>{let{isBlockHiddenAnywhere:i}=F(n(x));return{areBlocksHiddenAnywhere:e?.every(s=>i(s)),shortcut:n(fG.store).getShortcutRepresentation("core/block-editor/toggle-block-visibility")}},[e]),{showViewportModal:r}=F((0,M1.useDispatch)(x));return(0,mG.jsx)(dG.MenuItem,{onClick:()=>r(e),shortcut:o,children:t?(0,w5.__)("Show"):(0,w5.__)("Hide")})}var $u=l(A(),1),B5=l(z(),1),Wu=l(N(),1);var Wh=l(w(),1),{Badge:z0e}=F($u.privateApis),j0e={currentBlockVisibility:void 0,hasParentHiddenEverywhere:!1,selectedDeviceType:Tt.desktop.value};function pG({clientId:e}){let{currentBlockVisibility:t,selectedDeviceType:o,hasParentHiddenEverywhere:r}=(0,B5.useSelect)(f=>{if(!e)return j0e;let{getBlockAttributes:m,isBlockParentHiddenEverywhere:h,getSettings:p}=F(f(x));return{currentBlockVisibility:m(e)?.metadata?.blockVisibility,selectedDeviceType:p()?.[Ti]?.toLowerCase()||Tt.desktop.value,hasParentHiddenEverywhere:h(e)}},[e]),i=tt(e)?.ownerDocument?.defaultView,s=i===null?void 0:i,{isBlockCurrentlyHidden:a,currentViewport:c}=ji({blockVisibility:t,deviceType:o,view:s}),u=(0,B5.useSelect)(f=>!e||!c?!1:F(f(x)).isBlockParentHiddenAtViewport(e,c),[e,c]);if(!(a||r||u))return null;let d;if(a)if(t===!1)d=(0,Wu.__)("Block is hidden");else{let f=Tt[c]?.label||c;d=(0,Wu.sprintf)((0,Wu.__)("Block is hidden on %s"),f)}if(r)d=(0,Wu.__)("Parent block is hidden");else if(u){let f=Tt[c]?.label||c;d=(0,Wu.sprintf)((0,Wu.__)("Parent block is hidden on %s"),f)}return(0,Wh.jsx)(z0e,{className:"block-editor-block-visibility-info",children:(0,Wh.jsxs)($u.__experimentalHStack,{spacing:2,justify:"start",children:[(0,Wh.jsx)($u.Icon,{icon:Es}),(0,Wh.jsx)($u.__experimentalText,{children:d})]})})}function jy(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:P,defaultClassName:R,isSectionBlock:E,isWithinSectionBlock:L,canMove:T,blockVisibility:I,deviceType:M}=(0,hG.useContext)(pr),D=(0,$h.useRefEffect)(Y=>{if(Y){let{ownerDocument:J}=Y,{defaultView:K}=J;D.current=K}},[]),U=(0,D1.sprintf)((0,D1.__)("Block: %s"),d),j=a==="html"&&!t?"-visual":"",H=nG(),G=!L,Q=(0,$h.useMergeRefs)([e.ref,D,zH({clientId:o,initialPosition:p}),H9(o),GH(o),YH({clientId:o,isSelected:f}),UH({isEnabled:G}),XH(),w1({triggerAnimationOnChange:s,clientId:o}),(0,$h.useDisabled)({isDisabled:!h}),O1({clientId:o,isEnabled:E}),QH({isSelected:f}),T?H:void 0]),ie=Ie(),te=!!ie[Jp]?{"--wp-admin-theme-color":"var(--wp-block-synced-color)","--wp-admin-theme-color--rgb":"var(--wp-block-synced-color--rgb)"}:{},{isBlockCurrentlyHidden:ne}=ji({blockVisibility:I,deviceType:M,view:D.current});u<2&&o===ie.clientId&&(0,bG.default)(`Block type "${c}" must support API version 2 or higher to work correctly with "useBlockProps" method.`);let Z=!1;return(n?.style?.marginTop?.charAt(0)==="-"||n?.style?.marginBottom?.charAt(0)==="-"||n?.style?.marginLeft?.charAt(0)==="-"||n?.style?.marginRight?.charAt(0)==="-")&&(Z=!0),{tabIndex:g==="disabled"?-1:0,draggable:T&&!S?!0:void 0,...n,...e,ref:Q,id:`block-${o}${j}`,role:"document","aria-label":U,"data-block":o,"data-type":c,"data-title":d,inert:m?"true":void 0,className:V("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":Z,"is-editing-content-only-section":P,"is-block-hidden":ne},r,e.className,n.className,R),style:{...n.style,...e.style,...te}}}jy.save=gG.__unstableGetBlockProps;var yo=l(w(),1);function U0e(e,t){let o={...e,...t};return e?.hasOwnProperty("className")&&t?.hasOwnProperty("className")&&(o.className=V(e.className,t.className)),e?.hasOwnProperty("style")&&t?.hasOwnProperty("style")&&(o.style={...e.style,...t.style}),o}function V1({children:e,isHtml:t,...o}){return(0,yo.jsx)("div",{...jy(o,{__unstableIsHtml:t}),children:e})}function E5({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,Ku.useContext)(pr),P=am()||{},R=(0,yo.jsx)(pC,{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(P).length?P:void 0,mayDisplayControls:y,mayDisplayParentControls:_,mayDisplayPatternEditingControls:S,blockEditingMode:B.blockEditingMode,isPreviewMode:B.isPreviewMode}),E=(0,We.getBlockType)(u);E?.getEditWrapperProps&&(m=U0e(m,E.getEditWrapperProps(f)));let L=m&&!!m["data-align"]&&!C,T=a?.includes("is-position-sticky");L&&(R=(0,yo.jsx)("div",{className:V("wp-block",T&&a),"data-align":m["data-align"],children:R}));let I;if(d)t==="html"?I=(0,yo.jsxs)(yo.Fragment,{children:[(0,yo.jsx)("div",{style:{display:"none"},children:R}),(0,yo.jsx)(V1,{isHtml:!0,children:(0,yo.jsx)(AU,{clientId:n})})]}):E?.apiVersion>1?I=R:I=(0,yo.jsx)(V1,{children:R});else{let j=e?(0,We.serializeRawBlock)(e):(0,We.getSaveContent)(E,f);I=(0,yo.jsxs)(V1,{className:"has-warning",children:[(0,yo.jsx)(aU,{clientId:n}),(0,yo.jsx)(Ku.RawHTML,{children:(0,vG.safeHTML)(j)})]})}let{"data-align":M,...D}=m??{},U={...D,className:V(D.className,M&&C&&`align${M}`,!(M&&T)&&a)};return(0,yo.jsx)(pr.Provider,{value:{wrapperProps:U,isAligned:L,isSelectionWithinCurrentSection:S,...B},children:(0,yo.jsx)(fU,{fallback:(0,yo.jsx)(V1,{className:"has-warning",children:(0,yo.jsx)(uU,{})}),children:I})})}var H0e=(0,F1.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 P(){let E=k(h),L=(0,We.getDefaultBlockName)(),T=(0,We.getBlockType)(L);if(y(h)!==L){let I=(0,We.switchToBlockType)(E,L);I&&I.length&&s(h,I)}else if((0,We.isUnmodifiedDefaultBlock)(E)){let I=b(h);I&&o.batch(()=>{d(h),f(I)})}else if(T.merge){let I=T.merge({},E.attributes);s([h],[(0,We.createBlock)(L,I)])}}function R(E,L=!0){let T=y(E),M=(0,We.getBlockType)(T).category==="text",D=C(E),U=_(E),[j]=U;U.length===1&&(0,We.isUnmodifiedBlock)(k(j))?d(E):M?o.batch(()=>{if(B(y(j),D))u([j],E,D,S(E));else{let H=(0,We.switchToBlockType)(k(j),(0,We.getDefaultBlockName)());H&&H.length&&H.every(G=>B(G.name,D))?(n(H,S(E),D,L),d(j,!1)):P()}!_(E).length&&(0,We.isUnmodifiedBlock)(k(E))&&d(E,!1)}):P()}if(m){if(p){let L=b(p);if(L)if(y(p)===y(L)){let T=v(p),I=v(L);if(Object.keys(T).every(M=>T[M]===I[M])){o.batch(()=>{u(_(L),L,p),d(L,!1)});return}}else{i(p,L);return}}let E=b(h);if(!E)return;_(E).length?R(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 T=v(p),I=v(L);if(Object.keys(T).every(M=>T[M]===I[M])){o.batch(()=>{u(_(p),p,L),d(p,!1)});return}}R(p)}else P()}},onReplace(m,h,p){m.length&&!(0,We.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)}}});E5=(0,z1.compose)(H0e,(0,kG.withFilters)("editor.BlockListBlock"))(E5);function G0e(e){let{clientId:t,rootClientId:o}=e,r=(0,F1.useSelect)(W=>{let{isBlockSelected:ae,getBlockMode:ge,isSelectionEnabled:fe,getTemplateLock:xe,isSectionBlock:De,getParentSectionBlock:st,getBlockWithoutAttributes:Lt,getBlockAttributes:no,canRemoveBlock:jo,canMoveBlock:at,getSettings:dr,getEditedContentOnlySection:$t,getBlockEditingMode:io,getBlockName:Ue,isFirstMultiSelectedBlock:Kt,getMultiSelectedBlockClientIds:Je,hasSelectedInnerBlock:He,getBlocksByName:fr,getBlockIndex:pn,isBlockMultiSelected:ze,isBlockSubtreeDisabled:so,isBlockHighlighted:et,__unstableIsFullySelected:Ve,__unstableSelectionHasUnmergeableBlock:yt,isBlockBeingDragged:Oo,isDragging:mr,__unstableHasActiveBlockOverlayActive:be,getSelectedBlocksInitialCaretPosition:Bt}=F(W(x)),Ao=Lt(t);if(!Ao)return;let{hasBlockSupport:qe,getActiveBlockVariation:oe}=W(We.store),Ne=no(t),{name:mt,isValid:ou}=Ao,ba=(0,We.getBlockType)(mt),qp=dr(),{supportsLayout:uv,isPreviewMode:Lf,__experimentalBlockBindingsSupportedAttributes:hn}=qp,Zp=hn?.[mt],Xp=Ne?.metadata?.blockVisibility,N0=qp?.[Ti]?.toLowerCase()||"desktop",M0=ba?.apiVersion>1,dv=ze(t),ue=io(t),ao={isPreviewMode:Lf,blockWithoutAttributes:Ao,name:mt,attributes:Ne,isValid:ou,themeSupportsLayout:uv,index:pn(t),isReusable:(0,We.isReusableBlock)(ba),className:M0?Ne.className:void 0,defaultClassName:M0?(0,We.getBlockDefaultClassName)(mt):void 0,blockTitle:ba?.title,bindableAttributes:Zp,blockVisibility:Xp,deviceType:N0,isMultiSelected:dv,blockEditingMode:ue,isEditingDisabled:ue==="disabled"};if(Lf)return ao;let ye=ae(t),Nt=jo(t),gn=at(t),Ir=oe(mt,Ne),ru=!0,aA=He(t,ru),lA=De(t)?t:st(t),cA=(0,We.hasBlockSupport)(mt,"multiple",!0)?[]:fr(mt),Whe=cA.length&&cA[0]!==t;return{...ao,mode:ge(t),isSelectionEnabled:fe(),isLocked:!!xe(o),isSectionBlock:De(t),isWithinSectionBlock:!!lA,isSelectionWithinCurrentSection:ae(lA)||He(lA,ru),blockType:ba,canRemove:Nt,canMove:gn,isSelected:ye,isEditingContentOnlySection:$t()===t,blockEditingMode:ue,mayDisplayControls:ye||Kt(t)&&Je().every($he=>Ue($he)===mt),mayDisplayParentControls:qe(Ue(t),"__experimentalExposeControlsToChildren",!1)&&He(t),blockApiVersion:ba?.apiVersion||1,blockTitle:Ir?.title||ba?.title,isSubtreeDisabled:ue==="disabled"&&so(t),hasOverlay:be(t)&&!mr(),initialPosition:ye?Bt():void 0,isHighlighted:et(t),isMultiSelected:dv,isPartiallySelected:dv&&!Ve()&&!yt(),isDragging:Oo(t),hasChildSelected:aA,isEditingDisabled:ue==="disabled",hasEditableOutline:ue!=="disabled"&&io(o)==="disabled",originalBlockClientId:Whe?cA[0]:!1,blockVisibility:Xp,deviceType:N0}},[t,o]),n=(0,z1.useRefEffect)(W=>{if(W){let{ownerDocument:ae}=W,{defaultView:ge}=ae;n.current=ge}},[]),{isBlockCurrentlyHidden:i}=ji({blockVisibility:r?.blockVisibility,deviceType:r?.deviceType,view:n.current}),s=(0,Ku.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:P,blockTitle:R,isSubtreeDisabled:E,hasOverlay:L,initialPosition:T,isHighlighted:I,isMultiSelected:M,isPartiallySelected:D,isReusable:U,isDragging:j,hasChildSelected:H,isSectionBlock:G,isWithinSectionBlock:Q,isSelectionWithinCurrentSection:ie,isEditingDisabled:ce,hasEditableOutline:te,className:ne,defaultClassName:Z,originalBlockClientId:Y,bindableAttributes:J,blockVisibility:K,deviceType:ee}=r,re={isPreviewMode:a,clientId:t,className:ne,index:C,mode:c,name:h,blockApiVersion:B,blockType:P,blockTitle:R,isSelected:b,isSubtreeDisabled:E,hasOverlay:L,initialPosition:T,blockEditingMode:y,isHighlighted:I,isMultiSelected:M,isPartiallySelected:D,isReusable:U,isDragging:j,hasChildSelected:H,isSectionBlock:G,isWithinSectionBlock:Q,isSelectionWithinCurrentSection:ie,isEditingDisabled:ce,hasEditableOutline:te,isEditingContentOnlySection:v,defaultClassName:Z,mayDisplayControls:_,mayDisplayParentControls:S,originalBlockClientId:Y,themeSupportsLayout:k,canMove:m,isBlockCurrentlyHidden:i,bindableAttributes:J,blockVisibility:K,deviceType:ee};return i&&!b&&!M&&!H?null:(0,yo.jsx)(pr.Provider,{value:re,children:(0,yo.jsx)(E5,{...e,mode:c,isSelectionEnabled:u,isLocked:d,canRemove:f,canMove:m,block:s,name:h,attributes:p,isValid:g,isSelected:b})})}var yG=(0,Ku.memo)(G0e);var HV=l(z(),1),hq=l($(),1);var jV=l(N(),1),uq=l(hD(),1),lE=l(z(),1),cE=l(ct(),1);var lq=l(er(),1),Jl=l(N(),1),iE=l(A(),1),cq=l(O(),1),sE=l(z(),1),aE=l(X(),1),b_=l($(),1);var zt=l(O(),1),Ig=l(A(),1),ld=l(N(),1),p_=l(X(),1),rq=l(z(),1);var Kh=l(N(),1),Yh=l(O(),1),SG=l(A(),1),Uy=l(w(),1),_G=[(0,Yh.createInterpolateElement)((0,Kh.__)("While writing, you can press <kbd>/</kbd> to quickly insert new blocks."),{kbd:(0,Uy.jsx)("kbd",{})}),(0,Yh.createInterpolateElement)((0,Kh.__)("Indent a list by pressing <kbd>space</kbd> at the beginning of a line."),{kbd:(0,Uy.jsx)("kbd",{})}),(0,Yh.createInterpolateElement)((0,Kh.__)("Outdent a list by pressing <kbd>backspace</kbd> at the beginning of a line."),{kbd:(0,Uy.jsx)("kbd",{})}),(0,Kh.__)("Drag files into the editor to automatically insert media blocks."),(0,Kh.__)("Change a block's type by pressing the block icon on the toolbar.")];function W0e(){let[e]=(0,Yh.useState)(Math.floor(Math.random()*_G.length));return(0,Uy.jsx)(SG.Tip,{children:_G[e]})}var xG=W0e;var mg=l($(),1),FK=l(O(),1),zK=l(N(),1);var xn=l(A(),1),j1=l(z(),1),wG=l(Pe(),1),Yu=l(N(),1);var U1=l($(),1);var Or=l(w(),1),{Badge:$0e}=F(xn.privateApis);function K0e({children:e,onClick:t}){return t?(0,Or.jsx)(xn.Button,{__next40pxDefaultSize:!0,className:"block-editor-block-card__parent-select-button",onClick:t,children:e}):e}function Y0e({title:e,icon:t,description:o,blockType:r,className:n,name:i,allowParentNavigation:s,parentClientId:a,isChild:c,children:u,clientId:d}){r&&((0,wG.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,j1.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,U1.hasBlockSupport)(S,"listView")});return{parentBlockClientId:y,parentBlockName:y?k(y):null}},[d,s,c,a]),{selectBlock:h}=(0,j1.useDispatch)(x),p=a?"div":"h2";return(0,Or.jsx)("div",{className:V("block-editor-block-card",{"is-parent":a,"is-child":c},n),children:(0,Or.jsxs)(xn.__experimentalVStack,{children:[(0,Or.jsxs)(xn.__experimentalHStack,{justify:"flex-start",spacing:0,children:[f&&(0,Or.jsx)(xn.Button,{onClick:()=>h(f),label:m?(0,Yu.sprintf)((0,Yu.__)('Go to "%s" block'),(0,U1.getBlockType)(m)?.title):(0,Yu.__)("Go to parent block"),style:{minWidth:24,padding:0},icon:(0,Yu.isRTL)()?Uo:Gr,size:"small"}),c&&(0,Or.jsx)("span",{className:"block-editor-block-card__child-indicator-icon",children:(0,Or.jsx)(xn.Icon,{icon:(0,Yu.isRTL)()?yv:_v})}),(0,Or.jsxs)(K0e,{onClick:a?()=>{h(a)}:void 0,children:[(0,Or.jsx)(Oe,{icon:t,showColors:!0}),(0,Or.jsxs)(xn.__experimentalVStack,{spacing:1,children:[(0,Or.jsxs)(p,{className:"block-editor-block-card__title",children:[(0,Or.jsx)("span",{className:"block-editor-block-card__name",children:i?.length?i:e}),!a&&!c&&!!i?.length&&(0,Or.jsx)($0e,{children:e})]}),u]})]})]}),!a&&!c&&o&&(0,Or.jsx)(xn.__experimentalText,{className:"block-editor-block-card__description",children:o})]})})}var Hy=Y0e;var BB=l(X(),1),vV=l(z(),1),Cm=l(O(),1),kV=l(Pe(),1);var GG=l(z(),1),qu=l(O(),1),WG=l(A(),1),ym=l(BG(),1);var EG=l(O(),1),qh=l(z(),1),TG=l(X(),1);var H1=l(w(),1);function q0e(e,t,o){if(!o)return t;let r=e.get(t);return r||(r=(0,qh.createRegistry)({},t),r.registerStore(Yt,yh),e.set(t,r)),r}var Z0e=(0,TG.createHigherOrderComponent)(e=>function({useSubRegistry:o=!0,...r}){let n=(0,qh.useRegistry)(),[i]=(0,EG.useState)(()=>new WeakMap),s=q0e(i,n,o);return s===n?(0,H1.jsx)(e,{registry:n,...r}):(0,H1.jsx)(qh.RegistryProvider,{value:s,children:(0,H1.jsx)(e,{registry:s,...r})})},"withRegistryProvider"),IG=Z0e;var Zr=l(O(),1),AG=l(z(),1),LG=l($(),1);var PG=l(O(),1),X0e=()=>{},G1=(0,PG.createContext)({getSelection:()=>{},onChangeSelection:X0e});var RG=()=>{};function NG(e,t){let o=(0,LG.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=>NG(r,t))),o}function MG(e,t){return e.map(o=>{let r=t.internalToExternal.get(o.clientId);return{...o,clientId:r??o.clientId,innerBlocks:MG(o.innerBlocks,t)}})}function OG(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 W1({clientId:e=null,value:t,onChange:o=RG,onInput:r=RG}){let n=(0,AG.useRegistry)(),{getSelection:i,onChangeSelection:s}=(0,Zr.useContext)(G1),{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,Zr.useRef)({incoming:null,outgoing:[]}),k=(0,Zr.useRef)(!1),v=(0,Zr.useRef)({externalToInternal:new Map,internalToExternal:new Map}),y=(0,Zr.useRef)(null),_=(0,Zr.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 I=M=>!M?.clientId||!e?M:{...M,clientId:v.current.externalToInternal.get(M.clientId)??M.clientId};_.current=!0,c(I(E.selectionStart),I(E.selectionEnd),E.initialPosition),_.current=!1}},C=()=>{t&&(e?n.batch(()=>{v.current.externalToInternal.clear(),v.current.internalToExternal.clear();let E=t.map(L=>NG(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([])},P=(0,Zr.useRef)(r),R=(0,Zr.useRef)(o);(0,Zr.useEffect)(()=>{P.current=r,R.current=o},[r,o]),(0,Zr.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,Zr.useEffect)(()=>{let{getSelectedBlocksInitialCaretPosition:E,isLastBlockChangePersistent:L,__unstableIsLastBlockChangeIgnored:T,areInnerBlocksControlled:I,getBlockParents:M}=n.select(x),D=h(e),U=L(),j=!1,H=p(),G=g();k.current=!0;let Q=n.subscribe(()=>{if(e!==null&&m(e)===null)return;let ie=L(),ce=h(e),te=ce!==D;if(D=ce,te&&(b.current.incoming||T())){b.current.incoming=null,U=ie;return}let Z=te||j&&!te&&ie&&!U,Y=p(),J=g(),K=Y!==H||J!==G;K&&(H=Y,G=J),(Z||K)&&n.batch(()=>{if(Z){U=ie;let ee=e?MG(D,v.current):D,re={selectionStart:Y,selectionEnd:J,initialPosition:E()},W=e?OG(re,v.current):re;b.current.outgoing.push(ee),(U?R.current:P.current)(ee,{selection:W})}if(K&&!Z&&Y?.clientId&&!_.current&&(e?v.current.internalToExternal.has(Y.clientId):!M(Y.clientId).some(re=>I(re)))){let re={selectionStart:Y,selectionEnd:J,initialPosition:E()};s(e?OG(re,v.current):re)}}),j=te},x);return()=>{k.current=!1,Q()}},[n,e]),(0,Zr.useEffect)(()=>()=>{B()},[])}var DG=l(O(),1),VG=l(z(),1),FG=l(Ds(),1),_o=l(N(),1);function zG(){return null}function Q0e(){let{registerShortcut:e}=(0,VG.useDispatch)(FG.store);return(0,DG.useEffect)(()=>{e({name:"core/block-editor/copy",category:"block",description:(0,_o.__)("Copy the selected block(s)."),keyCombination:{modifier:"primary",character:"c"}}),e({name:"core/block-editor/cut",category:"block",description:(0,_o.__)("Cut the selected block(s)."),keyCombination:{modifier:"primary",character:"x"}}),e({name:"core/block-editor/paste",category:"block",description:(0,_o.__)("Paste the selected block(s)."),keyCombination:{modifier:"primary",character:"v"}}),e({name:"core/block-editor/duplicate",category:"block",description:(0,_o.__)("Duplicate the selected block(s)."),keyCombination:{modifier:"primaryShift",character:"d"}}),e({name:"core/block-editor/remove",category:"block",description:(0,_o.__)("Remove the selected block(s)."),keyCombination:{modifier:"access",character:"z"}}),e({name:"core/block-editor/paste-styles",category:"block",description:(0,_o.__)("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,_o.__)("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,_o.__)("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,_o.__)("Delete selection."),keyCombination:{character:"del"},aliases:[{character:"backspace"}]}),e({name:"core/block-editor/stop-editing-as-blocks",category:"block",description:(0,_o.__)("Finish editing a design."),keyCombination:{character:"escape"}}),e({name:"core/block-editor/select-all",category:"selection",description:(0,_o.__)("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,_o.__)("Clear selection."),keyCombination:{character:"escape"}}),e({name:"core/block-editor/multi-text-selection",category:"selection",description:(0,_o.__)("Select text across multiple blocks."),keyCombination:{modifier:"shift",character:"arrow"}}),e({name:"core/block-editor/focus-toolbar",category:"global",description:(0,_o.__)("Navigate to the nearest toolbar."),keyCombination:{modifier:"alt",character:"F10"}}),e({name:"core/block-editor/move-up",category:"block",description:(0,_o.__)("Move the selected block(s) up."),keyCombination:{modifier:"secondary",character:"t"}}),e({name:"core/block-editor/move-down",category:"block",description:(0,_o.__)("Move the selected block(s) down."),keyCombination:{modifier:"secondary",character:"y"}}),e({name:"core/block-editor/collapse-list-view",category:"list-view",description:(0,_o.__)("Collapse all other items."),keyCombination:{modifier:"alt",character:"l"}}),e({name:"core/block-editor/group",category:"block",description:(0,_o.__)("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,_o.__)("Show or hide the selected block(s)."),keyCombination:{modifier:"primaryShift",character:"h"}}),e({name:"core/block-editor/rename",category:"block",description:(0,_o.__)("Rename the selected block."),keyCombination:{modifier:"primaryAlt",character:"r"}})},[e]),null}zG.Register=Q0e;var $1=zG;var jG=l(O(),1);function J0e(e={}){return(0,jG.useMemo)(()=>({mediaUpload:e.mediaUpload,mediaSideload:e.mediaSideload,mediaFinalize:e.mediaFinalize,maxUploadFileSize:e.maxUploadFileSize,allowedMimeTypes:e.allowedMimeTypes,allImageSizes:e.allImageSizes,bigImageSizeThreshold:e.bigImageSizeThreshold}),[e])}var UG=J0e;var jl=l(w(),1),T5=()=>{},HG=!1,Zh=null;function exe(){if(Zh!==null)return Zh;if(!window.__clientSideMediaProcessing||typeof ym.detectClientSideMediaSupport!="function")return Zh=!1,!1;let e=(0,ym.detectClientSideMediaSupport)();return!e||!e.supported?(HG||(console.info(`Client-side media processing unavailable: ${e.reason}. Using server-side processing.`),HG=!0),Zh=!1,!1):(Zh=!0,!0)}function txe(e,t,{allowedTypes:o,additionalData:r={},filesList:n,onError:i=T5,onFileChange:s,onSuccess:a,onBatchSuccess:c}){e.dispatch(ym.store).addItems({files:Array.from(n),onChange:s,onSuccess:u=>{t?.[ex]?.(u),a?.(u)},onBatchSuccess:c,onError:u=>i(typeof u=="string"?u:u?.message??""),additionalData:r,allowedTypes:o})}function oxe(e){return W1(e),null}var Xh=IG(e=>{let{settings:t,registry:o,stripExperimentalSettings:r=!1}=e,n=UG(t),i=exe(),s=!!t?.mediaUpload?.__isMediaUploadInterceptor,a=(0,qu.useMemo)(()=>{if(i&&t?.mediaUpload&&!s){let p=txe.bind(null,o,t);return p.__isMediaUploadInterceptor=!0,{...t,mediaUpload:p}}return t},[t,o,i,s]),{__experimentalUpdateSettings:c}=F((0,GG.useDispatch)(x));(0,qu.useEffect)(()=>{c({...a,__internalIsInitialized:!0},{stripExperimentalSettings:r,reset:!0})},[a,r,c]);let u=(0,qu.useRef)(e.selection);u.current=e.selection;let d=(0,qu.useRef)(e.onChangeSelection??T5);d.current=e.onChangeSelection??T5;let f=(0,qu.useMemo)(()=>({getSelection:()=>u.current,onChangeSelection:(...p)=>d.current(...p)}),[]),m=(0,jl.jsxs)(WG.SlotFillProvider,{passthrough:!0,children:[!a?.isPreviewMode&&(0,jl.jsx)($1.Register,{}),(0,jl.jsx)(j9,{children:e.children})]}),h=(0,jl.jsxs)(G1.Provider,{value:f,children:[(0,jl.jsx)(oxe,{clientId:e.clientId,value:e.value,onChange:e.onChange,onInput:e.onInput}),m]});return i&&!s?(0,jl.jsx)(ym.MediaUploadProvider,{settings:n,useSubRegistry:!1,children:h}):h}),rxe=e=>(0,jl.jsx)(Xh,{...e,stripExperimentalSettings:!0,children:e.children}),$G=rxe;var s_=l(X(),1),IK=l(z(),1),CB=l(O(),1),PK=l(A(),1);var _m=l(O(),1),OW=l(N(),1),Hl=l(X(),1),AW=l(A(),1),N5=l(z(),1);var CW=l(z(),1),BW=l(N(),1),Ky=l(X(),1),EW=l(O(),1);var KG=l(X(),1),YG=l(z(),1);function nxe(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 qG(){let{initialPosition:e,isMultiSelecting:t,multiSelectedBlockClientIds:o,hasMultiSelection:r,selectedBlockClientId:n,isFullSelection:i}=(0,YG.useSelect)(nxe,[]);return(0,KG.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 Qh=l(Fe(),1),I5=l(ct(),1),K1=l(z(),1),Y1=l(X(),1),Gy=l(O(),1);var P5=l(w(),1);function ZG(){let e=(0,Gy.useRef)(),t=(0,Gy.useRef)(),o=(0,Gy.useRef)(),{hasMultiSelection:r,getSelectedBlockClientId:n,getBlockCount:i,getBlockOrder:s,getLastFocus:a,getSectionRootClientId:c,isZoomOut:u}=F((0,K1.useSelect)(x)),{setLastFocus:d}=F((0,K1.useDispatch)(x)),f=(0,Gy.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,_=Qh.focus.tabbable.find(e.current);_.length&&(y?_[0]:_[_.length-1]).focus()}}let h=(0,P5.jsx)("div",{ref:t,tabIndex:"0",onFocus:m}),p=(0,P5.jsx)("div",{ref:o,tabIndex:"0",onFocus:m}),g=(0,Y1.useRefEffect)(k=>{function v(B){if(B.defaultPrevented||B.keyCode!==I5.TAB||!o.current||!t.current)return;let{target:P,shiftKey:R}=B,E=R?"findPrevious":"findNext",L=Qh.focus.tabbable[E](P),T=P.closest("[data-block]"),I=T&&L&&(VH(T,L)||Ea(T,L));if((0,Qh.isFormElement)(L)&&I)return;let M=R?t:o;f.current=!0,M.current.focus({preventScroll:!0})}function y(B){d({...a(),current:B.target});let{ownerDocument:P}=k;!B.relatedTarget&&B.target.hasAttribute("data-block")&&P.activeElement===P.body&&i()===0&&k.focus()}function _(B){if(B.keyCode!==I5.TAB||B.target?.getAttribute("role")==="region"||e.current===B.target)return;let R=B.shiftKey?"findPrevious":"findNext",E=Qh.focus.tabbable[R](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,Y1.useMergeRefs)([e,g]);return[h,b,p]}var So=l(Fe(),1),Ta=l(ct(),1),q1=l(z(),1),XG=l(X(),1);function ixe(e,t,o){let r=t===Ta.UP||t===Ta.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 R5(e,t,o,r){let n=So.focus.focusable.find(o);t&&n.reverse(),n=n.slice(n.indexOf(e)+1);let i;r&&(i=e.getBoundingClientRect());function s(a){if(zi(a)&&So.focus.focusable.find(a).filter(c=>!(0,So.isFormElement)(c)).length!==0||!So.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 QG(){let{getMultiSelectedBlocksStartClientId:e,getMultiSelectedBlocksEndClientId:t,getSettings:o,hasMultiSelection:r,__unstableIsFullySelected:n}=(0,q1.useSelect)(x),{selectBlock:i}=(0,q1.useDispatch)(x);return(0,XG.useRefEffect)(s=>{let a;function c(){a=null}function u(f,m){let h=R5(f,m,s);return h&&zi(h)}function d(f){if(f.defaultPrevented)return;let{keyCode:m,target:h,shiftKey:p,ctrlKey:g,altKey:b,metaKey:k}=f,v=m===Ta.UP,y=m===Ta.DOWN,_=m===Ta.LEFT,S=m===Ta.RIGHT,C=v||_,B=_||S,P=v||y,R=B||P,E=p||g||b||k,L=P?So.isVerticalEdge:So.isHorizontalEdge,{ownerDocument:T}=s,{defaultView:I}=T;if(!R||o().isPreviewMode)return;if(r()){if(p||!n())return;f.preventDefault(),C?i(e()):i(t(),-1);return}if(!ixe(h,m,E))return;P?a||(a=(0,So.computeCaretRect)(I)):a=null;let M=(0,So.isRTL)(h)?!C:C,{keepCaretInsideBlock:D}=o();if(p)u(h,C)&&L(h,C)&&(s.contentEditable=!0,s.focus());else if(P&&(0,So.isVerticalEdge)(h,C)&&(!b||(0,So.isHorizontalEdge)(h,M))&&!D){let U=R5(h,C,s,!0);U&&((0,So.placeCaretAtVerticalEdge)(U,b?!C:C,b?void 0:a),f.preventDefault())}else if(B&&I.getSelection().isCollapsed&&(0,So.isHorizontalEdge)(h,M)&&!D){let U=R5(h,M,s);(0,So.placeCaretAtHorizontalEdge)(U,C),f.preventDefault()}}return s.addEventListener("mousedown",c),s.addEventListener("keydown",d),()=>{s.removeEventListener("mousedown",c),s.removeEventListener("keydown",d)}},[])}var JG=l(X(),1),eW=l(z(),1),Ia=l(ct(),1);function tW(){let e=(0,eW.useSelect)(t=>t(x).getSettings().isPreviewMode,[]);return(0,JG.useRefEffect)(t=>{if(!e)return;function o(r){let{keyCode:n,shiftKey:i,target:s}=r,a=n===Ia.TAB,c=n===Ia.UP,u=n===Ia.DOWN,d=n===Ia.LEFT;if(!a&&!(c||u||d||n===Ia.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 oW=l(Fe(),1),Z1=l(z(),1),rW=l(Ds(),1),nW=l(X(),1);function iW(){let{getBlockOrder:e,getSelectedBlockClientIds:t,getBlockRootClientId:o}=(0,Z1.useSelect)(x),{multiSelect:r,selectBlock:n}=(0,Z1.useDispatch)(x),i=(0,rW.__unstableUseShortcutEventMatch)();return(0,nW.useRefEffect)(s=>{function a(c){if(!i("core/block-editor/select-all",c))return;let u=t();if(u.length<2&&!(0,oW.isEntirelySelected)(c.target))return;c.preventDefault();let{ownerDocument:d}=c.target,[f]=u,m=zi(d.activeElement);if(m&&m!==f&&!Ea(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 X1=l(z(),1),aW=l(X(),1);function sW(e,t){e.contentEditable=t,t&&e.focus()}function lW(){let{startMultiSelect:e,stopMultiSelect:t}=(0,X1.useDispatch)(x),{getSettings:o,isSelectionEnabled:r,hasSelectedBlock:n,isDraggingBlocks:i,isMultiSelecting:s}=(0,X1.useSelect)(x);return(0,aW.useRefEffect)(a=>{let{ownerDocument:c}=a,{defaultView:u}=c,d,f;function m(){t(),u.removeEventListener("mouseup",m),f=u.requestAnimationFrame(()=>{if(!n())return;sW(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),sW(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 Q1=l(z(),1),dW=l(X(),1),O5=l(br(),1),fW=l(Fe(),1);function sxe(e){let{anchorNode:t,anchorOffset:o}=e;return t.nodeType===t.TEXT_NODE||o===0?t:t.childNodes[o-1]}function axe(e){let{focusNode:t,focusOffset:o}=e;return t.nodeType===t.TEXT_NODE||o===t.childNodes.length?t:o===0&&(0,fW.isSelectionForward)(e)?t.previousSibling??t.parentElement:t.childNodes[o]}function lxe(e,t){let o=0;for(;e[o]===t[o];)o++;return o}function cW(e,t){e.contentEditable!==String(t)&&(e.contentEditable=t,t&&e.focus())}function uW(e){return(e.nodeType===e.ELEMENT_NODE?e:e.parentElement)?.closest("[data-wp-block-attribute-key]")}function mW(){let{multiSelect:e,selectBlock:t,selectionChange:o}=(0,Q1.useDispatch)(x),{getBlockParents:r,getBlockSelectionStart:n,isMultiSelecting:i}=(0,Q1.useSelect)(x);return(0,dW.useRefEffect)(s=>{let{ownerDocument:a}=s,{defaultView:c}=a;function u(d){let f=c.getSelection();if(!f.rangeCount)return;let m=sxe(f),h=axe(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()){cW(s,!1);let v=m.nodeType===m.ELEMENT_NODE?m:m.parentElement;v=v?.closest("[contenteditable]"),v?.focus()}return}let g=zi(m),b=zi(h);if(p){let v=n(),y=zi(d.target),_=y!==b;(g===b&&f.isCollapsed||!b||_)&&(b=y),g!==v&&(g=v)}if(g===void 0&&b===void 0){cW(s,!1);return}if(d.type==="mouseup"&&!d.shiftKey&&!i()&&g===b){let v=zi(d.target);if(v&&v!==g){f.removeAllRanges();return}}if(g===b)i()?e(g,g):t(g);else{let v=[...r(g),g],y=[...r(b),b],_=lxe(v,y);if(v[_]!==g||y[_]!==b){e(v[_],y[_]);return}let S=uW(m),C=uW(h);if(S&&C){let B=f.getRangeAt(0),P=(0,O5.create)({element:S,range:B,__unstableIsEditableTree:!0}),R=(0,O5.create)({element:C,range:B,__unstableIsEditableTree:!0}),E=P.start??P.end,L=R.start??R.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 J1=l(z(),1),pW=l(X(),1);function hW(){let{selectBlock:e}=(0,J1.useDispatch)(x),{isSelectionEnabled:t,getBlockSelectionStart:o,hasMultiSelection:r}=(0,J1.useSelect)(x);return(0,pW.useRefEffect)(n=>{function i(s){if(!t()||s.button!==0)return;let a=o(),c=zi(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 eB=l(z(),1),gW=l(X(),1),Ul=l(ct(),1),Vs=l($(),1);function bW(){let{__unstableIsFullySelected:e,getSelectedBlockClientIds:t,getSelectedBlockClientId:o,__unstableIsSelectionMergeable:r,hasMultiSelection:n,getBlockName:i,canInsertBlockType:s,getBlockRootClientId:a,getSelectionStart:c,getSelectionEnd:u,getBlockAttributes:d}=(0,eB.useSelect)(x),{replaceBlocks:f,__unstableSplitSelection:m,removeBlocks:h,__unstableDeleteSelection:p,__unstableExpandSelection:g,__unstableMarkAutomaticChange:b}=(0,eB.useDispatch)(x);return(0,gW.useRefEffect)(k=>{function v(S){k.contentEditable==="true"&&S.preventDefault()}function y(S){if(!S.defaultPrevented){if(!n()){if(S.keyCode===Ul.ENTER){if(S.shiftKey||e())return;let C=o(),B=i(C),P=c(),R=u();if(P.attributeKey===R.attributeKey){let E=d(C)[P.attributeKey],L=(0,Vs.getBlockTransforms)("from").filter(({type:I})=>I==="enter"),T=(0,Vs.findTransform)(L,I=>I.regExp.test(E));if(T){f(C,T.transform({content:E})),b();return}}if(!(0,Vs.hasBlockSupport)(B,"splitting",!1)&&!S.__deprecatedOnSplit)return;(s((0,Vs.getDefaultBlockName)(),a(C))||s(B,a(C)))&&(m(),S.preventDefault())}return}S.keyCode===Ul.ENTER?(k.contentEditable=!1,S.preventDefault(),e()?f(t(),(0,Vs.createBlock)((0,Vs.getDefaultBlockName)())):m()):S.keyCode===Ul.BACKSPACE||S.keyCode===Ul.DELETE?(k.contentEditable=!1,S.preventDefault(),e()?h(t()):r()?p(S.keyCode===Ul.DELETE):g()):S.key.length===1&&!(S.metaKey||S.ctrlKey)&&(k.contentEditable=!1,r()?p(S.keyCode===Ul.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 Pa=l($(),1),oB=l(Fe(),1),tg=l(z(),1),wW=l(X(),1);var kW=l(O(),1),vW=l($(),1),Wy=l(z(),1),Ui=l(N(),1),yW=l(Li(),1);function Jh(){let{getBlockName:e}=(0,Wy.useSelect)(x),{getBlockType:t}=(0,Wy.useSelect)(vW.store),{createSuccessNotice:o}=(0,Wy.useDispatch)(yW.store);return(0,kW.useCallback)((r,n)=>{let i="";if(r==="copyStyles")i=(0,Ui.__)("Styles copied to clipboard.");else if(n.length===1){let s=n[0],a=t(e(s))?.title;r==="copy"?i=(0,Ui.sprintf)((0,Ui.__)('Copied "%s" to clipboard.'),a):i=(0,Ui.sprintf)((0,Ui.__)('Moved "%s" to clipboard.'),a)}else r==="copy"?i=(0,Ui.sprintf)((0,Ui._n)("Copied %d block to clipboard.","Copied %d blocks to clipboard.",n.length),n.length):i=(0,Ui.sprintf)((0,Ui._n)("Moved %d block to clipboard.","Moved %d blocks to clipboard.",n.length),n.length);o(i,{type:"snackbar"})},[o,e,t])}var SW=l(Fe(),1),Hi=l($(),1);var _W=l(Fe(),1);function cxe(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 uxe(e){let t="<meta charset='utf-8'>";return e.startsWith(t)?e.slice(t.length):e}function eg({clipboardData:e}){let t="",o="";try{t=e.getData("text/plain"),o=e.getData("text/html")}catch{return}o=cxe(o),o=uxe(o);let r=(0,_W.getFilesFromDataTransfer)(e);return r.length&&!dxe(r,o)?{files:r}:{html:o,plainText:t,files:[]}}function dxe(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 A5=Symbol("requiresWrapperOnCopy");function tB(e,t,o){let r=t,[n]=t;if(n&&o.select(Hi.store).getBlockType(n.name)[A5]){let{getBlockRootClientId:a,getBlockName:c,getBlockAttributes:u}=o.select(x),d=a(n.clientId),f=c(d);f&&(r=(0,Hi.createBlock)(f,u(d),r))}let i=(0,Hi.serialize)(r);e.clipboardData.setData("text/plain",fxe(i)),e.clipboardData.setData("text/html",i)}function xW(e,t){let{plainText:o,html:r,files:n}=eg(e),i=[];if(n.length){let s=(0,Hi.getBlockTransforms)("from");i=n.reduce((a,c)=>{let u=(0,Hi.findTransform)(s,d=>d.type==="files"&&d.isMatch([c]));return u&&a.push(u.transform([c])),a},[]).flat()}else i=(0,Hi.pasteHandler)({HTML:r,plainText:o,mode:"BLOCKS",canUserUseUnfilteredHTML:t});return i}function fxe(e){return e=e.replace(/<br>/g,` |
| 49 |
`),(0,SW.__unstableStripHTML)(e).trim().replace(/\n\n+/g,` |
| 50 |
|
| 51 |
`)}function $y(){let e=(0,tg.useRegistry)(),{getBlocksByClientId:t,getSelectedBlockClientIds:o,hasMultiSelection:r,getSettings:n,getBlockName:i,__unstableIsFullySelected:s,__unstableIsSelectionCollapsed:a,__unstableIsSelectionMergeable:c,__unstableGetSelectedBlocksWithPartialSelection:u,canInsertBlockType:d,getBlockRootClientId:f}=(0,tg.useSelect)(x),{flashBlock:m,removeBlocks:h,replaceBlocks:p,__unstableDeleteSelection:g,__unstableExpandSelection:b,__unstableSplitSelection:k}=(0,tg.useDispatch)(x),v=Jh();return(0,wW.useRefEffect)(y=>{function _(S){if(S.defaultPrevented)return;let C=o();if(C.length===0)return;if(!r()){let{target:L}=S,{ownerDocument:T}=L;if(S.type==="copy"||S.type==="cut"?(0,oB.documentHasUncollapsedSelection)(T):(0,oB.documentHasSelection)(T)&&!T.activeElement.isContentEditable)return}let{activeElement:B}=S.target.ownerDocument;if(!y.contains(B))return;let P=c(),R=a()||s(),E=!R&&!P;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(R)L=t(C);else{let[T,I]=u(),M=t(C.slice(1,C.length-1));L=[T,...M,I]}tB(S,L,e)}if(S.type==="cut")R&&!E?h(C):(S.target.ownerDocument.activeElement.contentEditable=!1,g());else if(S.type==="paste"){let{__experimentalCanUserUseUnfilteredHTML:L,mediaUpload:T}=n();if(S.clipboardData.getData("rich-text")==="true")return;let{plainText:M,html:D,files:U}=eg(S),j=s(),H=[];if(U.length){if(!T){S.preventDefault();return}let ce=(0,Pa.getBlockTransforms)("from");H=U.reduce((te,ne)=>{let Z=(0,Pa.findTransform)(ce,Y=>Y.type==="files"&&Y.isMatch([ne]));return Z&&te.push(Z.transform([ne])),te},[]).flat()}else H=(0,Pa.pasteHandler)({HTML:D,plainText:M,mode:j?"BLOCKS":"AUTO",canUserUseUnfilteredHTML:L});if(typeof H=="string")return;if(j){p(C,H,H.length-1,-1),S.preventDefault();return}if(!r()&&!(0,Pa.hasBlockSupport)(i(C[0]),"splitting",!1)&&!S.__deprecatedOnSplit)return;let[G]=C,Q=f(G),ie=[];for(let ce of H)if(d(ce.name,Q))ie.push(ce);else{let te=i(Q),ne=ce.name!==te?(0,Pa.switchToBlockType)(ce,te):[ce];if(!ne)return;for(let Z of ne)for(let Y of Z.innerBlocks)ie.push(Y)}k(ie),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 og=l(w(),1);function L5(){let[e,t,o]=ZG(),r=(0,CW.useSelect)(n=>n(x).hasMultiSelection(),[]);return[e,(0,Ky.useMergeRefs)([t,$y(),bW(),lW(),mW(),hW(),qG(),iW(),QG(),tW(),(0,Ky.useRefEffect)(n=>(n.tabIndex=0,n.dataset.hasMultiSelection=r,r?(n.setAttribute("aria-label",(0,BW.__)("Multiple selected blocks")),()=>{delete n.dataset.hasMultiSelection,n.removeAttribute("aria-label")}):()=>{delete n.dataset.hasMultiSelection}),[r])]),o]}function mxe({children:e,...t},o){let[r,n,i]=L5();return(0,og.jsxs)(og.Fragment,{children:[r,(0,og.jsx)("div",{...t,ref:(0,Ky.useMergeRefs)([n,o]),className:V(t.className,"block-editor-writing-flow"),children:e}),i]})}var rB=(0,EW.forwardRef)(mxe);var nB=null;function TW(){return nB||(nB=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},[]),nB)}var wn=l(O(),1),Yy=l(X(),1);function IW({frameSize:e,containerWidth:t,maxContainerWidth:o,scaleContainerWidth:r}){return(Math.min(t,o)-e*2)/r}function pxe(e,t){let{scaleValue:o,scrollHeight:r}=e,{frameSize:n,scaleValue:i}=t;return r*(i/o)+n*2}function hxe(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 gxe(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 PW({frameSize:e,iframeDocument:t,maxContainerWidth:o=750,scale:r}){let[n,{height:i}]=(0,Yy.useResizeObserver)(),[s,{width:a,height:c}]=(0,Yy.useResizeObserver)(),u=(0,wn.useRef)(0),d=r!==1,f=(0,Yy.useReducedMotion)(),m=r==="auto-scaled",h=(0,wn.useRef)(!1),p=(0,wn.useRef)(null);(0,wn.useEffect)(()=>{d||(u.current=a)},[a,d]);let g=Math.max(u.current,a),b=m?IW({frameSize:e,containerWidth:a,maxContainerWidth:o,scaleContainerWidth:g}):r,k=(0,wn.useRef)({scaleValue:b,frameSize:e,containerHeight:0,scrollTop:0,scrollHeight:0}),v=(0,wn.useRef)({scaleValue:b,frameSize:e,containerHeight:0,scrollTop:0,scrollHeight:0}),y=(0,wn.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(gxe(k.current,v.current),{easing:"cubic-bezier(0.46, 0.03, 0.52, 0.96)",duration:400})},[t]),_=(0,wn.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,wn.useRef)(!1);return(0,wn.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,wn.useEffect)(()=>{if(t&&(m&&k.current.scaleValue!==1&&(k.current.scaleValue=IW({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=pxe(k.current,v.current),v.current.scrollTop=hxe(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 Fs=l(w(),1);function LW(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 bxe(e){return(0,Hl.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];LW(a,d,o)},r.addEventListener(s,i[s]);return()=>{for(let s of n)r.removeEventListener(s,i[s])}})}var RW=new WeakMap,kxe=globalThis.FinalizationRegistry?new globalThis.FinalizationRegistry(e=>URL.revokeObjectURL(e)):void 0;function vxe(e){let t=RW.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"})),RW.set(e,t),kxe?.register(e,t),t}function yxe({contentRef:e,children:t,tabIndex:o=0,scale:r=1,frameSize:n=0,readonly:i,forwardedRef:s,title:a=(0,OW.__)("Editor canvas"),...c}){let{resolvedAssets:u,isPreviewMode:d}=(0,N5.useSelect)(I=>{let M=I(x).getSettings();return{resolvedAssets:M.__unstableResolvedAssets,isPreviewMode:M.isPreviewMode}},[]),[f,m]=(0,_m.useState)(),[h,p]=(0,_m.useState)([]),[g,b,k]=L5(),v=(0,Hl.useRefEffect)(I=>{let M;function D(G){G.preventDefault()}function U(G){G.target.tagName==="A"&&G.target.getAttribute("href")?.startsWith("#")&&(G.preventDefault(),M.defaultView.location.hash=G.target.getAttribute("href").slice(1))}let{ownerDocument:j}=I;p(Array.from(j.body.classList).filter(G=>G.startsWith("admin-color-")||G.startsWith("post-type-")||G==="wp-embed-responsive"));function H(){let{contentDocument:G}=I,{documentElement:Q}=G;M=G,m(G),Q.classList.add("block-editor-iframe__html"),G.dir=j.dir;for(let ie of TW())G.getElementById(ie.id)||(G.head.appendChild(ie.cloneNode(!0)),d||console.warn(`${ie.id} was added to the iframe incorrectly. Please use block.json or enqueue_block_assets to add styles to the iframe.`,ie));M.addEventListener("dragover",D,!1),M.addEventListener("drop",D,!1),M.addEventListener("click",U)}return I.addEventListener("load",H),()=>{m(void 0),I.removeEventListener("load",H),M?.removeEventListener("dragover",D),M?.removeEventListener("drop",D),M?.removeEventListener("click",U)}},[]),{contentResizeListener:y,containerResizeListener:_,isZoomedOut:S,scaleContainerWidth:C}=PW({scale:r,frameSize:parseInt(n),iframeDocument:f}),B=(0,Hl.useDisabled)({isDisabled:!i}),P=(0,Hl.useMergeRefs)([bxe(f),e,b,B]),R=(0,Hl.useRefEffect)(I=>I.ownerDocument.defaultView?(P(I),()=>P(null)):()=>{},[P]),E=vxe(u),L=o>=0&&!d,T=(0,Fs.jsxs)(Fs.Fragment,{children:[L&&g,(0,Fs.jsx)("iframe",{...c,style:{...c.style,height:c.style?.height,border:0},ref:(0,Hl.useMergeRefs)([s,v]),tabIndex:o,src:E,title:a,onKeyDown:I=>{if(c.onKeyDown&&c.onKeyDown(I),I.currentTarget.ownerDocument!==I.target.ownerDocument){let{stopPropagation:M}=I.nativeEvent;I.nativeEvent.stopPropagation=()=>{},I.stopPropagation(),I.nativeEvent.stopPropagation=M,LW(I,window.KeyboardEvent,I.currentTarget)}},children:f&&(0,_m.createPortal)((0,Fs.jsxs)("body",{ref:R,className:V("block-editor-iframe__body","editor-styles-wrapper",...h),children:[y,(0,Fs.jsx)(AW.__experimentalStyleProvider,{document:f,children:t})]}),f.documentElement)}),L&&k]});return(0,Fs.jsxs)("div",{className:"block-editor-iframe__container",children:[_,(0,Fs.jsx)("div",{className:V("block-editor-iframe__scale-container",S&&"is-zoomed-out"),style:{"--wp-block-editor-iframe-zoom-out-scale-container-width":S&&`${C}px`},children:T})]})}function _xe(e,t){return(0,N5.useSelect)(r=>r(x).getSettings().__internalIsInitialized,[])?(0,Fs.jsx)(yxe,{...e,forwardedRef:t}):null}var rg=(0,_m.forwardRef)(_xe);var EK=l(A(),1),ug=l(O(),1),TK=l(z(),1);var sB={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},Sxe=new Set(["combinator","comma"]);var xxe=e=>{switch(e){case"pseudo-element":case"pseudo-class":return new RegExp(sB[e].source.replace("(?<argument>\xB6*)","(?<argument>.*)"),"gu");default:return sB[e]}};function wxe(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 Cxe(e,t=sB){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],Sxe.has(n.type)&&(n.content=n.content.trim()||" ");break}return o}var Bxe=/(['"])([^\\\n]+?)\1/g,Exe=/\\./g;function M5(e,t=sB){if(e=e.trim(),e==="")return[];let o=[];e=e.replace(Exe,(i,s)=>(o.push({value:i,offset:s}),"\uE000".repeat(i.length))),e=e.replace(Bxe,(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=wxe(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=Cxe(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=xxe(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 NW(e){let t;return Array.isArray(e)?t=e:t=[...iB(e)].map(([o])=>o),t.map(o=>o.content).join("")}var SK=l(tK(),1),xK=l(cB(),1),wK=l(nK(),1),CK=l(yK(),1),_K=new Map,BK=[{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 Fwe(e,t){let o=M5(t),r=o.findLastIndex(({content:s,type:a})=>BK.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=M5(e);return o.splice(n===-1?o.length:n,0,{type:"combinator",content:" "},...i),NW(o)}function zwe({css:e,ignoredSelectors:t=[],baseURL:o},r="",n){if(!r&&!o)return e;try{let i=[...t,...n?.ignoredSelectors??[],r];return new SK.default([r&&(0,wK.default)({prefix:r,transform(s,a,c){return i.some(d=>d instanceof RegExp?a.match(d):a.includes(d))?a:BK.some(d=>a.startsWith(d.content))?Fwe(s,a):c}}),o&&(0,CK.default)({rootUrl:o})].filter(Boolean)).process(e,{}).css}catch(i){return i instanceof xK.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 jwe=(e,t="",o)=>{let r=_K.get(t);return r||(r=new WeakMap,_K.set(t,r)),e.map(n=>{let i=r.get(n);return i||(i=zwe(n,t,o),r.set(n,i)),i})},cg=jwe;var Ju=l(w(),1);iu([su,eh]);function Uwe(e,t){return(0,ug.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=Et(a);c.luminance()>.5||c.alpha()===0?i.classList.remove("is-dark-theme"):i.classList.add("is-dark-theme")},[e,t])}function Hwe({styles:e,scope:t,transformOptions:o}){let r=(0,TK.useSelect)(s=>F(s(x)).getStyleOverrides(),[]),[n,i]=(0,ug.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[cg(s.filter(a=>a?.css),t,o),s.filter(a=>a.__unstableType==="svgs").map(a=>a.assets).join("")]},[e,r,t,o]);return(0,Ju.jsxs)(Ju.Fragment,{children:[(0,Ju.jsx)("style",{ref:Uwe(n,t)}),n.map((s,a)=>(0,Ju.jsx)("style",{children:s},a)),(0,Ju.jsx)(EK.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 Gl=(0,ug.memo)(Hwe);var Gi=l(w(),1),Gwe=(0,CB.memo)(dg),bV=2e3,Wwe=[];function $we({viewportWidth:e,containerWidth:t,minHeight:o,additionalStyles:r=Wwe}){e||(e=t);let[n,{height:i}]=(0,s_.useResizeObserver)(),{styles:s}=(0,IK.useSelect)(d=>({styles:d(x).getSettings().styles}),[]),a=(0,CB.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,Gi.jsx)(PK.Disabled,{className:"block-editor-block-preview__content",style:{transform:`scale(${c})`,aspectRatio:u,maxHeight:i>bV?bV*c:void 0,minHeight:o},children:(0,Gi.jsxs)(rg,{contentRef:(0,s_.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:bV,minHeight:c!==0&&c<1&&o?o/c:o},children:[(0,Gi.jsx)(Gl,{styles:a}),n,(0,Gi.jsx)(Gwe,{renderAppender:!1})]})})}function RK(e){let[t,{width:o}]=(0,s_.useResizeObserver)();return(0,Gi.jsxs)(Gi.Fragment,{children:[(0,Gi.jsx)("div",{style:{position:"relative",width:"100%",height:0},children:t}),(0,Gi.jsx)("div",{className:"block-editor-block-preview__container",children:!!o&&(0,Gi.jsx)($we,{...e,containerWidth:o})})]})}var fg=l(O(),1),NK=l(AK(),1),LK=(0,NK.createQueue)();function MK({children:e,placeholder:t}){let[o,r]=(0,fg.useState)(!1);return(0,fg.useEffect)(()=>{let n={};return LK.add(n,()=>{(0,fg.flushSync)(()=>{r(!0)})}),()=>{LK.cancel(n)}},[]),o?e:t}var Bm=l(w(),1),Kwe=[];function Ywe({blocks:e,viewportWidth:t=1200,minHeight:o,additionalStyles:r=Kwe,__experimentalMinHeight:n,__experimentalPadding:i}){n&&(o=n,(0,kV.default)("The __experimentalMinHeight prop",{since:"6.2",version:"6.4",alternative:"minHeight"})),i&&(r=[...r,{css:`body { padding: ${i}px; }`}],(0,kV.default)("The __experimentalPadding prop of BlockPreview",{since:"6.2",version:"6.4",alternative:"additionalStyles"}));let s=(0,vV.useSelect)(u=>u(x).getSettings(),[]),a=(0,Cm.useMemo)(()=>({...s,focusMode:!1,isPreviewMode:!0}),[s]),c=(0,Cm.useMemo)(()=>Array.isArray(e)?e:[e],[e]);return!e||e.length===0?null:(0,Bm.jsx)(Xh,{value:c,settings:a,children:(0,Bm.jsx)(RK,{viewportWidth:t,minHeight:o,additionalStyles:r})})}var DK=(0,Cm.memo)(Ywe);DK.Async=MK;var Cn=DK;function VK({blocks:e,props:t={},layout:o}){let r=(0,vV.useSelect)(u=>u(x).getSettings(),[]),n=(0,Cm.useMemo)(()=>({...r,styles:void 0,focusMode:!1,isPreviewMode:!0}),[r]),i=(0,BB.useDisabled)(),s=(0,BB.useMergeRefs)([t.ref,i]),a=(0,Cm.useMemo)(()=>Array.isArray(e)?e:[e],[e]),c=(0,Bm.jsxs)(Xh,{value:a,settings:n,children:[(0,Bm.jsx)(Gl,{}),(0,Bm.jsx)(a_,{renderAppender:!1,layout:o})]});return{...t,ref:s,className:V(t.className,"block-editor-block-preview__live-content","components-disabled"),children:e?.length?c:null}}var ed=l(w(),1);function qwe({item:e}){let{name:t,title:o,icon:r,description:n,initialAttributes:i,example:s}=e,a=(0,mg.isReusableBlock)(e),c=(0,FK.useMemo)(()=>s?(0,mg.getBlockFromExample)(t,{attributes:{...s.attributes,...i},innerBlocks:s.innerBlocks}):(0,mg.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,ed.jsxs)("div",{className:"block-editor-inserter__preview-container",children:[(0,ed.jsx)("div",{className:"block-editor-inserter__preview",children:a||s?(0,ed.jsx)("div",{className:"block-editor-inserter__preview-content",children:(0,ed.jsx)(Cn,{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,ed.jsx)("div",{className:"block-editor-inserter__preview-content-missing",children:(0,zK.__)("No preview available.")})}),!a&&(0,ed.jsx)(Hy,{title:o,icon:r,description:n})]})}var jK=qwe;var yg=l(N(),1),Kl=l(O(),1),BV=l(X(),1);var tY=l($(),1),oY=l(X(),1);var vg=l(O(),1),td=l($(),1),JK=l(A(),1),l_=l(ct(),1);var qK=l(A(),1),ZK=l(O(),1);var pg=l(O(),1),UK=l(N(),1),HK=l(er(),1),GK=l(w(),1);function Zwe(e,t){let[o,r]=(0,pg.useState)(!1);return(0,pg.useEffect)(()=>{o&&(0,HK.speak)((0,UK.__)("Use left and right arrow keys to move through blocks"))},[o]),(0,GK.jsx)("div",{ref:t,role:"listbox","aria-orientation":"horizontal",onFocus:()=>{r(!0)},onBlur:n=>{!n.currentTarget.contains(n.relatedTarget)&&r(!1)},...e})}var yV=(0,pg.forwardRef)(Zwe);var WK=l(O(),1),$K=l(A(),1),KK=l(w(),1);function Xwe(e,t){return(0,KK.jsx)($K.Composite.Group,{role:"presentation",ref:t,...e})}var _V=(0,WK.forwardRef)(Xwe);var TB=l(A(),1),YK=l(O(),1),EB=l(w(),1);function Qwe({isFirst:e,as:t,children:o,...r},n){return(0,EB.jsx)(TB.Composite.Item,{ref:n,role:"option",accessibleWhenDisabled:!0,...r,render:i=>{let s={...i,tabIndex:e?0:i.tabIndex};return t?(0,EB.jsx)(t,{...s,children:o}):typeof o=="function"?o(s):(0,EB.jsx)(TB.Button,{__next40pxDefaultSize:!0,...s,children:o})}})}var SV=(0,YK.forwardRef)(Qwe);var xV=l(w(),1);function Jwe({key:e,children:t}){return(0,xV.jsx)(ZK.Fragment,{children:t},e)}function eCe({children:e}){return(0,xV.jsx)(qK.Composite,{focusShift:!0,focusWrap:"horizontal",render:Jwe,children:e})}var hg=eCe;var XK=l(A(),1),PB=l($(),1),RB=l(z(),1),QK=l(O(),1);var bg=l(N(),1),gg=l(A(),1);var js=l(w(),1);function IB({count:e,icon:t,isPattern:o,fadeWhenDisabled:r}){let n=o&&(0,bg.__)("Pattern");return(0,js.jsx)("div",{className:"block-editor-block-draggable-chip-wrapper",children:(0,js.jsx)("div",{className:"block-editor-block-draggable-chip","data-testid":"block-draggable-chip",children:(0,js.jsxs)(gg.Flex,{justify:"center",className:"block-editor-block-draggable-chip__content",children:[(0,js.jsx)(gg.FlexItem,{children:t?(0,js.jsx)(Oe,{icon:t}):n||(0,bg.sprintf)((0,bg._n)("%d block","%d blocks",e),e)}),(0,js.jsx)(gg.FlexItem,{children:(0,js.jsx)(Oe,{icon:wv})}),r&&(0,js.jsx)(gg.FlexItem,{className:"block-editor-block-draggable-chip__disabled",children:(0,js.jsx)("span",{className:"block-editor-block-draggable-chip__disabled-icon"})})]})})})}var wV=l(w(),1),tCe=({isEnabled:e,blocks:t,icon:o,children:r,pattern:n})=>{let i=t.length===1?t[0].name:void 0,s=(0,RB.useSelect)(f=>i&&f(PB.store).getBlockType(i)?.icon,[i]),{startDragging:a,stopDragging:c}=F((0,RB.useDispatch)(x)),u=(0,QK.useMemo)(()=>n?.type===Mt.user&&n?.syncStatus!=="unsynced"?[(0,PB.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,wV.jsx)(XK.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,wV.jsx)(IB,{count:t.length,icon:o||!n&&s,isPattern:!!n}),children:({onDraggableStart:f,onDraggableEnd:m})=>r({draggable:!0,onDragStart:f,onDragEnd:m})})},kg=tCe;var Wl=l(w(),1);function oCe({className:e,isFirst:t,item:o,onSelect:r,onHover:n,isDraggable:i,...s}){let a=(0,vg.useRef)(!1),c=o.icon?{backgroundColor:o.icon.background,color:o.icon.foreground}:{},u=(0,vg.useMemo)(()=>[(0,td.createBlock)(o.name,o.initialAttributes,(0,td.createBlocksFromInnerBlocksTemplate)(o.innerBlocks))],[o.name,o.initialAttributes,o.innerBlocks]),d=(0,td.isReusableBlock)(o)&&o.syncStatus!=="unsynced"||(0,td.isTemplatePart)(o);return(0,Wl.jsx)(kg,{isEnabled:i&&!o.isDisabled,blocks:u,icon:o.icon,children:({draggable:f,onDragStart:m,onDragEnd:h})=>(0,Wl.jsx)("div",{className:V("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,Wl.jsxs)(SV,{isFirst:t,className:V("block-editor-block-types-list__item",e),disabled:o.isDisabled,onClick:p=>{p.preventDefault(),r(o,(0,l_.isAppleOS)()?p.metaKey:p.ctrlKey),n(null)},onKeyDown:p=>{let{keyCode:g}=p;g===l_.ENTER&&(p.preventDefault(),r(o,(0,l_.isAppleOS)()?p.metaKey:p.ctrlKey),n(null))},onMouseEnter:()=>{a.current||n(o)},onMouseLeave:()=>n(null),...s,children:[(0,Wl.jsx)("span",{className:"block-editor-block-types-list__item-icon",style:c,children:(0,Wl.jsx)(Oe,{icon:o.icon,showColors:!0})}),(0,Wl.jsx)("span",{className:"block-editor-block-types-list__item-title",children:(0,Wl.jsx)(JK.__experimentalTruncate,{numberOfLines:3,children:o.title})})]})})})}var eY=(0,vg.memo)(oCe);var c_=l(w(),1);function rCe(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 rY({items:e=[],onSelect:t,onHover:o=()=>{},children:r,label:n,isDraggable:i=!0}){let s="block-editor-block-types-list",a=(0,oY.useInstanceId)(rY,s);return(0,c_.jsxs)(yV,{className:s,"aria-label":n,children:[rCe(e,3).map((c,u)=>(0,c_.jsx)(_V,{children:c.map((d,f)=>(0,c_.jsx)(eY,{item:d,className:(0,tY.getBlockMenuDefaultClassName)(d.id),onSelect:t,onHover:o,isDraggable:i&&!d.isDisabled,isFirst:u===0&&f===0,rowId:`${a}-${u}`},d.id))},u)),r]})}var Em=rY;var nY=l(A(),1),$l=l(w(),1);function nCe({title:e,icon:t,children:o}){return(0,$l.jsxs)($l.Fragment,{children:[(0,$l.jsxs)("div",{className:"block-editor-inserter__panel-header",children:[(0,$l.jsx)("h2",{className:"block-editor-inserter__panel-title",children:e}),(0,$l.jsx)(nY.Icon,{icon:t})]}),(0,$l.jsx)("div",{className:"block-editor-inserter__panel-content",children:o})]})}var od=nCe;var iY=l(N(),1),CV=l(w(),1);function iCe(){return(0,CV.jsx)("div",{className:"block-editor-inserter__no-results",children:(0,CV.jsx)("p",{children:(0,iY.__)("No results found.")})})}var Us=iCe;var Go=l(w(),1),sCe=e=>e.name.split("/")[0],aCe=6,lCe=[];function sY({items:e,collections:t,categories:o,onSelectItem:r,onHover:n,showMostUsedBlocks:i,className:s}){let a=(0,Kl.useMemo)(()=>_a(e,"frecency","desc").slice(0,aCe),[e]),c=(0,Kl.useMemo)(()=>e.filter(p=>!p.category),[e]),u=(0,Kl.useMemo)(()=>{let p={...t};return Object.keys(t).forEach(g=>{p[g]=e.filter(b=>sCe(b)===g),p[g].length===0&&delete p[g]}),p},[e,t]);(0,Kl.useEffect)(()=>()=>n(null),[]);let d=(0,BV.useAsyncList)(o),f=o.length===d.length,m=(0,Kl.useMemo)(()=>Object.entries(t),[t]),h=(0,BV.useAsyncList)(f?m:lCe);return(0,Go.jsxs)("div",{className:s,children:[i&&e.length>3&&!!a.length&&(0,Go.jsx)(od,{title:(0,yg._x)("Most used","blocks"),children:(0,Go.jsx)(Em,{items:a,onSelect:r,onHover:n,label:(0,yg._x)("Most used","blocks")})}),d.map(p=>{let g=e.filter(b=>b.category===p.slug);return!g||!g.length?null:(0,Go.jsx)(od,{title:p.title,icon:p.icon,children:(0,Go.jsx)(Em,{items:g,onSelect:r,onHover:n,label:p.title})},p.slug)}),f&&c.length>0&&(0,Go.jsx)(od,{className:"block-editor-inserter__uncategorized-blocks-panel",title:(0,yg.__)("Uncategorized"),children:(0,Go.jsx)(Em,{items:c,onSelect:r,onHover:n,label:(0,yg.__)("Uncategorized")})}),h.map(([p,g])=>{let b=u[p];return!b||!b.length?null:(0,Go.jsx)(od,{title:g.title,icon:g.icon,children:(0,Go.jsx)(Em,{items:b,onSelect:r,onHover:n,label:g.title})},p)})]})}function cCe({rootClientId:e,onInsert:t,onHover:o,showMostUsedBlocks:r},n){let[i,s,a,c]=Pu(e,t);if(!i.length)return(0,Go.jsx)(Us,{});let u=[],d=[];for(let f of i)f.category!=="reusable"&&(f.isSearchOnly||(f.isAllowedInCurrentRoot?u.push(f):d.push(f)));return(0,Go.jsx)(hg,{children:(0,Go.jsxs)("div",{ref:n,children:[!!u.length&&(0,Go.jsx)(Go.Fragment,{children:(0,Go.jsx)(sY,{items:u,categories:s,collections:a,onSelectItem:c,onHover:o,showMostUsedBlocks:r,className:"block-editor-inserter__insertable-blocks-at-selection"})}),(0,Go.jsx)(sY,{items:d,categories:s,collections:a,onSelectItem:c,onHover:o,showMostUsedBlocks:r,className:"block-editor-inserter__all-blocks"})]})})}var aY=(0,Kl.forwardRef)(cCe);var TY=l(O(),1),IY=l(X(),1),PY=l(A(),1),RY=l(N(),1);var SY=l(A(),1),OV=l(O(),1),xY=l(N(),1);var OB=l(A(),1),EV=l(N(),1),Yl=l(w(),1);function uCe({selectedCategory:e,patternCategories:t,onClickCategory:o}){let r="block-editor-block-patterns-explorer__sidebar";return(0,Yl.jsx)("div",{className:`${r}__categories-list`,children:t.map(({name:n,label:i})=>(0,Yl.jsx)(OB.Button,{__next40pxDefaultSize:!0,label:i,className:`${r}__categories-list__item`,isPressed:e===n,onClick:()=>{o(n)},children:i},n))})}function dCe({searchValue:e,setSearchValue:t}){return(0,Yl.jsx)("div",{className:"block-editor-block-patterns-explorer__search",children:(0,Yl.jsx)(OB.SearchControl,{onChange:t,value:e,label:(0,EV.__)("Search"),placeholder:(0,EV.__)("Search")})})}function fCe({selectedCategory:e,patternCategories:t,onClickCategory:o,searchValue:r,setSearchValue:n}){return(0,Yl.jsxs)("div",{className:"block-editor-block-patterns-explorer__sidebar",children:[(0,Yl.jsx)(dCe,{searchValue:r,setSearchValue:n}),!r&&(0,Yl.jsx)(uCe,{selectedCategory:e,patternCategories:t,onClickCategory:o})]})}var lY=fCe;var Zl=l(O(),1),wg=l(N(),1),bY=l(X(),1),kY=l(A(),1),vY=l(er(),1);var cY=l($(),1),Oa=l(O(),1),ql=l(A(),1),uY=l(X(),1),dY=l(N(),1);var Bn=l(A(),1),Wi=l(N(),1),Ar=l(w(),1);function AB({currentPage:e,numPages:t,changePage:o,totalItems:r}){return(0,Ar.jsxs)(Bn.__experimentalVStack,{className:"block-editor-patterns__grid-pagination-wrapper",children:[(0,Ar.jsx)(Bn.__experimentalText,{variant:"muted",children:(0,Wi.sprintf)((0,Wi._n)("%s item","%s items",r),r)}),t>1&&(0,Ar.jsxs)(Bn.__experimentalHStack,{expanded:!1,spacing:3,justify:"flex-start",className:"block-editor-patterns__grid-pagination",children:[(0,Ar.jsxs)(Bn.__experimentalHStack,{expanded:!1,spacing:1,className:"block-editor-patterns__grid-pagination-previous",children:[(0,Ar.jsx)(Bn.Button,{variant:"tertiary",onClick:()=>o(1),disabled:e===1,"aria-label":(0,Wi.__)("First page"),size:"compact",accessibleWhenDisabled:!0,className:"block-editor-patterns__grid-pagination-button",children:(0,Ar.jsx)("span",{children:"\xAB"})}),(0,Ar.jsx)(Bn.Button,{variant:"tertiary",onClick:()=>o(e-1),disabled:e===1,"aria-label":(0,Wi.__)("Previous page"),size:"compact",accessibleWhenDisabled:!0,className:"block-editor-patterns__grid-pagination-button",children:(0,Ar.jsx)("span",{children:"\u2039"})})]}),(0,Ar.jsx)(Bn.__experimentalText,{variant:"muted",children:(0,Wi.sprintf)((0,Wi._x)("%1$s of %2$s","paging"),e,t)}),(0,Ar.jsxs)(Bn.__experimentalHStack,{expanded:!1,spacing:1,className:"block-editor-patterns__grid-pagination-next",children:[(0,Ar.jsx)(Bn.Button,{variant:"tertiary",onClick:()=>o(e+1),disabled:e===t,"aria-label":(0,Wi.__)("Next page"),size:"compact",accessibleWhenDisabled:!0,className:"block-editor-patterns__grid-pagination-button",children:(0,Ar.jsx)("span",{children:"\u203A"})}),(0,Ar.jsx)(Bn.Button,{variant:"tertiary",onClick:()=>o(t),disabled:e===t,"aria-label":(0,Wi.__)("Last page"),size:"compact",accessibleWhenDisabled:!0,className:"block-editor-patterns__grid-pagination-button",children:(0,Ar.jsx)("span",{children:"\xBB"})})]})]})]})}var qt=l(w(),1),mCe=({showTooltip:e,title:t,children:o})=>e?(0,qt.jsx)(ql.Tooltip,{text:t,children:o}):(0,qt.jsx)(qt.Fragment,{children:o});function fY({id:e,isDraggable:t,pattern:o,onClick:r,onHover:n,showTitlesAsTooltip:i,category:s,isSelected:a}){let[c,u]=(0,Oa.useState)(!1),{blocks:d,viewportWidth:f}=o,h=`block-editor-block-patterns-list__item-description-${(0,uY.useInstanceId)(fY)}`,p=o.type===Mt.user,g=(0,Oa.useMemo)(()=>!s||!t?d:(d??[]).map(b=>{let k=(0,cY.cloneBlock)(b);return k.attributes.metadata?.categories?.includes(s)&&(k.attributes.metadata.categories=[s]),k}),[d,t,s]);return(0,qt.jsx)(kg,{isEnabled:t,blocks:g,pattern:o,children:({draggable:b,onDragStart:k,onDragEnd:v})=>(0,qt.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,qt.jsx)(mCe,{showTooltip:i&&!p,title:o.title,children:(0,qt.jsxs)(ql.Composite.Item,{render:(0,qt.jsx)("div",{role:"option","aria-label":o.title,"aria-describedby":o.description?h:void 0,className:V("block-editor-block-patterns-list__item",{"block-editor-block-patterns-list__list-item-synced":o.type===Mt.user&&!o.syncStatus,"is-selected":a})}),id:e,onClick:()=>{r(o,d),n?.(null)},onMouseEnter:()=>{c||n?.(o)},onMouseLeave:()=>n?.(null),children:[(0,qt.jsx)(Cn.Async,{placeholder:(0,qt.jsx)(pCe,{}),children:(0,qt.jsx)(Cn,{blocks:d,viewportWidth:f})}),(!i||p)&&(0,qt.jsxs)(ql.__experimentalHStack,{className:"block-editor-patterns__pattern-details",spacing:2,children:[p&&!o.syncStatus&&(0,qt.jsx)("div",{className:"block-editor-patterns__pattern-icon-wrapper",children:(0,qt.jsx)(we,{className:"block-editor-patterns__pattern-icon",icon:Ri})}),(0,qt.jsx)("div",{className:"block-editor-block-patterns-list__item-title",children:o.title})]}),!!o.description&&(0,qt.jsx)(ql.VisuallyHidden,{id:h,children:o.description})]})})})})}function pCe(){return(0,qt.jsx)("div",{className:"block-editor-block-patterns-list__item is-placeholder"})}function hCe({isDraggable:e,blockPatterns:t,onHover:o,onClickPattern:r,orientation:n,label:i=(0,dY.__)("Block patterns"),category:s,showTitlesAsTooltip:a,pagingProps:c},u){let[d,f]=(0,Oa.useState)(void 0),[m,h]=(0,Oa.useState)(null);(0,Oa.useEffect)(()=>{let g=t[0]?.name;f(g)},[t]);let p=(g,b)=>{h(g.name),r(g,b)};return(0,qt.jsxs)(ql.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,qt.jsx)(fY,{id:g.name,pattern:g,onClick:p,onHover:o,isDraggable:e,showTitlesAsTooltip:a,category:s,isSelected:!!m&&m===g.name},g.name)),c&&(0,qt.jsx)(AB,{...c})]})}var Aa=(0,Oa.forwardRef)(hCe);var Tm=l(z(),1),pY=l($(),1),LB=l(N(),1),hY=l(er(),1),TV=l(O(),1);function mY({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 gCe({rootClientId:e="",insertionIndex:t,clientId:o,isAppender:r,onSelect:n,shouldFocusBlock:i=!0,selectBlockOnInsert:s=!0}){let a=(0,Tm.useRegistry)(),{getSelectedBlock:c,getClosestAllowedInsertionPoint:u,isBlockInsertionPointVisible:d}=F((0,Tm.useSelect)(x)),{destinationRootClientId:f,destinationIndex:m}=(0,Tm.useSelect)(_=>{let{getSelectedBlockClientId:S,getBlockRootClientId:C,getBlockIndex:B,getBlockOrder:P,getInsertionPoint:R}=F(_(x)),E=S(),L=e,T,I=R();return t!==void 0?T=t:I&&I.hasOwnProperty("index")?(L=I?.rootClientId?I.rootClientId:e,T=I.index):o?T=B(o):!r&&E?(L=C(E),T=B(E)+1):T=P(L).length,{destinationRootClientId:L,destinationIndex:T}},[e,t,o,r]),{replaceBlocks:h,insertBlocks:p,showInsertionPoint:g,hideInsertionPoint:b,setLastFocus:k}=F((0,Tm.useDispatch)(x)),v=(0,TV.useCallback)((_,S,C=!1,B)=>{(C||i||s)&&k(null);let P=c();!r&&P&&(0,pY.isUnmodifiedDefaultBlock)(P,"content")?h(P.clientId,_,null,i||C?0:null,S):p(_,r||B===void 0?m:mY({destinationRootClientId:f,destinationIndex:m,rootClientId:B,registry:a}),r||B===void 0?f:B,s,i||C?0:null,S);let R=Array.isArray(_)?_.length:1,E=(0,LB.sprintf)((0,LB._n)("%d block added.","%d blocks added.",R),R);(0,hY.speak)(E),n&&n(_)},[r,c,h,p,f,m,n,i,s,k,a]),y=(0,TV.useCallback)(_=>{if(_&&!d()){let S=u(_.name,f);S!==null&&g(S,mY({destinationRootClientId:f,destinationIndex:m,rootClientId:S,registry:a}))}else b()},[u,d,g,b,f,m,a]);return[f,v,y]}var rd=gCe;var _g=l(O(),1),NB=l($(),1),Sg=l(z(),1),MB=l(N(),1),gY=l(Li(),1);var bCe=(e,t,o,r)=>{let n=(0,_g.useMemo)(()=>({[xu]:!!r}),[r]),i=(0,Sg.useSelect)(p=>{let{getSettings:g}=F(p(x));return g()[J0]??!1},[]),{patternCategories:s,patterns:a,userPatternCategories:c}=(0,Sg.useSelect)(p=>{let{getSettings:g,__experimentalGetAllowedPatterns:b}=F(p(x)),{__experimentalUserPatternCategories:k,__experimentalBlockPatternCategories:v}=g();return{patterns:b(t,n),userPatternCategories:k,patternCategories:v}},[t,n]),u=(0,_g.useMemo)(()=>a.filter(p=>!(p.categories?.includes("navigation")&&!i)),[a,i]),{getClosestAllowedInsertionPointForPattern:d}=F((0,Sg.useSelect)(x)),f=(0,_g.useMemo)(()=>{let p=[...s];return c?.forEach(g=>{p.find(b=>b.name===g.name)||p.push(g)}),p},[s,c]),{createSuccessNotice:m}=(0,Sg.useDispatch)(gY.store),h=(0,_g.useCallback)((p,g)=>{let b=r?t:d(p,t);if(b===null)return;let k=p.type===Mt.user&&p.syncStatus!=="unsynced"?[(0,NB.createBlock)("core/block",{ref:p.id})]:g;e((k??[]).map(v=>{let y=(0,NB.cloneBlock)(v);return y.attributes.metadata?.categories?.includes(o)&&(y.attributes.metadata.categories=[o]),y}),p.name,!1,b),m((0,MB.sprintf)((0,MB.__)('Block pattern "%s" inserted.'),p.title),{type:"snackbar",id:"inserter-notice"})},[m,e,o,t,d,r]);return[u,f,h]},nd=bCe;var xg=l(O(),1),IV=l(X(),1),PV=l(Fe(),1),DB=20;function VB(e,t,o,r=""){let[n,i]=(0,xg.useState)(1),s=(0,IV.usePrevious)(t),a=(0,IV.usePrevious)(r);(s!==t||a!==r)&&n!==1&&i(1);let c=e.length,u=n-1,d=(0,xg.useMemo)(()=>e.slice(u*DB,u*DB+DB),[u,e]),f=Math.ceil(e.length/DB),m=h=>{(0,PV.getScrollContainer)(o?.current)?.scrollTo(0,0),i(h)};return(0,xg.useEffect)(function(){(0,PV.getScrollContainer)(o?.current)?.scrollTo(0,0)},[t,o]),{totalItems:c,categoryPatterns:d,numPages:f,changePage:m,currentPage:n}}var Hs=l(w(),1);function kCe({filterValue:e,filteredBlockPatternsLength:t}){return e?(0,Hs.jsx)(kY.__experimentalHeading,{level:2,lineHeight:"48px",className:"block-editor-block-patterns-explorer__search-results-count",children:(0,wg.sprintf)((0,wg._n)("%d pattern found","%d patterns found",t),t)}):null}function vCe({searchValue:e,selectedCategory:t,patternCategories:o,rootClientId:r,onModalClose:n}){let i=(0,Zl.useRef)(),s=(0,bY.useDebounce)(vY.speak,500),[a,c]=rd({rootClientId:r,shouldFocusBlock:!0}),[u,,d]=nd(c,a,t),f=(0,Zl.useMemo)(()=>o.map(k=>k.name),[o]),m=(0,Zl.useMemo)(()=>{let k=u.filter(v=>{if(t===rm.name||t===Tl.name&&v.type===Mt.user||t===hh.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?cy(k,e):k},[e,u,t,f]);(0,Zl.useEffect)(()=>{if(!e)return;let k=m.length,v=(0,wg.sprintf)((0,wg._n)("%d result found.","%d results found.",k),k);s(v)},[e,s,m.length]);let h=VB(m,t,i),[p,g]=(0,Zl.useState)(e);e!==p&&(g(e),h.changePage(1));let b=!!m?.length;return(0,Hs.jsxs)("div",{className:"block-editor-block-patterns-explorer__list",ref:i,children:[(0,Hs.jsx)(kCe,{filterValue:e,filteredBlockPatternsLength:m.length}),(0,Hs.jsx)(hg,{children:b&&(0,Hs.jsxs)(Hs.Fragment,{children:[(0,Hs.jsx)(Aa,{blockPatterns:h.categoryPatterns,onClickPattern:(k,v)=>{d(k,v),n()},isDraggable:!1}),(0,Hs.jsx)(AB,{...h})]})})]})}var yY=vCe;var RV=l(O(),1),Cg=l(N(),1),_Y=l(er(),1);function yCe(e,t){return!e.categories||!e.categories.length?!1:e.categories.some(o=>t.some(r=>r.name===o))}function Bg(e,t="all"){let[o,r]=nd(void 0,e),n=(0,RV.useMemo)(()=>t==="all"?o:o.filter(s=>!nC(s,t)),[t,o]);return(0,RV.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=>!yCe(a,r))&&!s.find(a=>a.name==="uncategorized")&&s.push({name:"uncategorized",label:(0,Cg._x)("Uncategorized")}),n.some(a=>a.blockTypes?.includes("core/post-content"))&&s.unshift(hh),n.some(a=>a.type===Mt.user)&&s.unshift(Tl),n.length>0&&s.unshift({name:rm.name,label:rm.label}),(0,_Y.speak)((0,Cg.sprintf)((0,Cg._n)("%d category button displayed.","%d category buttons displayed.",s.length),s.length)),s},[r,n])}var Im=l(w(),1);function _Ce({initialCategory:e,rootClientId:t,onModalClose:o}){let[r,n]=(0,OV.useState)(""),[i,s]=(0,OV.useState)(e?.name),a=Bg(t);return(0,Im.jsxs)("div",{className:"block-editor-block-patterns-explorer",children:[(0,Im.jsx)(lY,{selectedCategory:i,patternCategories:a,onClickCategory:s,searchValue:r,setSearchValue:n}),(0,Im.jsx)(yY,{searchValue:r,selectedCategory:i,patternCategories:a,rootClientId:t,onModalClose:o})]})}function SCe({onModalClose:e,...t}){return(0,Im.jsx)(SY.Modal,{title:(0,xY.__)("Patterns"),onRequestClose:e,isFullScreen:!0,children:(0,Im.jsx)(_Ce,{onModalClose:e,...t})})}var wY=SCe;var Eg=l(N(),1),Vt=l(A(),1);var or=l(w(),1);function xCe({title:e}){return(0,or.jsx)(Vt.__experimentalVStack,{spacing:0,children:(0,or.jsx)(Vt.__experimentalView,{children:(0,or.jsx)(Vt.__experimentalSpacer,{marginBottom:0,paddingX:4,paddingY:3,children:(0,or.jsxs)(Vt.__experimentalHStack,{spacing:2,children:[(0,or.jsx)(Vt.Navigator.BackButton,{style:{minWidth:24,padding:0},icon:(0,Eg.isRTL)()?Uo:Gr,size:"small",label:(0,Eg.__)("Back")}),(0,or.jsx)(Vt.__experimentalSpacer,{children:(0,or.jsx)(Vt.__experimentalHeading,{level:5,children:e})})]})})})})}function FB({categories:e,children:t}){return(0,or.jsxs)(Vt.Navigator,{initialPath:"/",className:"block-editor-inserter__mobile-tab-navigation",children:[(0,or.jsx)(Vt.Navigator.Screen,{path:"/",children:(0,or.jsx)(Vt.__experimentalItemGroup,{children:e.map(o=>(0,or.jsx)(Vt.Navigator.Button,{path:`/category/${o.name}`,as:Vt.__experimentalItem,isAction:!0,children:(0,or.jsxs)(Vt.__experimentalHStack,{children:[(0,or.jsx)(Vt.FlexBlock,{children:o.label}),(0,or.jsx)(we,{icon:(0,Eg.isRTL)()?Gr:Uo})]})},o.name))})}),e.map(o=>(0,or.jsxs)(Vt.Navigator.Screen,{path:`/category/${o.name}`,children:[(0,or.jsx)(xCe,{title:(0,Eg.__)("Back")}),t(o)]},o.name))]})}var $i=l(O(),1),AV=l(N(),1),Gs=l(A(),1);var Tn=l(A(),1),En=l(N(),1);var zB=l(O(),1);var Sr=l(w(),1),CY=e=>e!=="all"&&e!=="user",wCe=e=>e.name===Tl.name,CCe=[{value:"all",label:(0,En._x)("All","patterns")},{value:Mt.directory,label:(0,En.__)("Pattern Directory")},{value:Mt.theme,label:(0,En.__)("Theme & Plugins")},{value:Mt.user,label:(0,En.__)("User")}];function BY({setPatternSyncFilter:e,setPatternSourceFilter:t,patternSyncFilter:o,patternSourceFilter:r,scrollContainerRef:n,category:i}){let s=i.name===Tl.name?Mt.user:r,a=CY(s),c=wCe(i),u=(0,zB.useMemo)(()=>[{value:"all",label:(0,En._x)("All","patterns")},{value:Xv.full,label:(0,En._x)("Synced","patterns"),disabled:a},{value:Xv.unsynced,label:(0,En._x)("Not synced","patterns"),disabled:a}],[a]);function d(f){t(f),CY(f)&&e("all")}return(0,Sr.jsx)(Sr.Fragment,{children:(0,Sr.jsx)(Tn.DropdownMenu,{popoverProps:{placement:"right-end"},label:(0,En.__)("Filter patterns"),toggleProps:{size:"compact"},icon:(0,Sr.jsx)(we,{icon:(0,Sr.jsx)(Tn.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,Sr.jsx)(Tn.Path,{d:"M10 17.5H14V16H10V17.5ZM6 6V7.5H18V6H6ZM8 12.5H16V11H8V12.5Z",fill:"currentColor"})})}),children:()=>(0,Sr.jsxs)(Sr.Fragment,{children:[!c&&(0,Sr.jsx)(Tn.MenuGroup,{label:(0,En.__)("Source"),children:(0,Sr.jsx)(Tn.MenuItemsChoice,{choices:CCe,onSelect:f=>{d(f),n.current?.scrollTo(0,0)},value:s})}),(0,Sr.jsx)(Tn.MenuGroup,{label:(0,En.__)("Type"),children:(0,Sr.jsx)(Tn.MenuItemsChoice,{choices:u,onSelect:f=>{e(f),n.current?.scrollTo(0,0)},value:o})}),(0,Sr.jsx)("div",{className:"block-editor-inserter__patterns-filter-help",children:(0,zB.createInterpolateElement)((0,En.__)("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,Sr.jsx)(Tn.ExternalLink,{href:(0,En.__)("https://wordpress.org/patterns/")})})})]})})})}var Xr=l(w(),1),BCe=()=>{};function jB({rootClientId:e,onInsert:t,onHover:o=BCe,category:r,showTitlesAsTooltip:n}){let[i,,s]=nd(t,e,r?.name),[a,c]=(0,$i.useState)("all"),[u,d]=(0,$i.useState)("all"),f=Bg(e,u),m=(0,$i.useRef)(),h=(0,$i.useMemo)(()=>i.filter(v=>nC(v,u,a)?!1:r.name===rm.name||r.name===Tl.name&&v.type===Mt.user||r.name===hh.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=VB(h,r,m),{changePage:g}=p;(0,$i.useEffect)(()=>()=>o(null),[]);let b=(0,$i.useCallback)(v=>{c(v),g(1)},[c,g]),k=(0,$i.useCallback)(v=>{d(v),g(1)},[d,g]);return(0,Xr.jsxs)(Xr.Fragment,{children:[(0,Xr.jsxs)(Gs.__experimentalVStack,{spacing:2,className:"block-editor-inserter__patterns-category-panel-header",children:[(0,Xr.jsxs)(Gs.__experimentalHStack,{children:[(0,Xr.jsx)(Gs.FlexBlock,{children:(0,Xr.jsx)(Gs.__experimentalHeading,{className:"block-editor-inserter__patterns-category-panel-title",size:13,level:4,as:"div",children:r.label})}),(0,Xr.jsx)(BY,{patternSyncFilter:a,patternSourceFilter:u,setPatternSyncFilter:b,setPatternSourceFilter:k,scrollContainerRef:m,category:r})]}),!h.length&&(0,Xr.jsx)(Gs.__experimentalText,{variant:"muted",className:"block-editor-inserter__patterns-category-no-results",children:(0,AV.__)("No results found")})]}),h.length>0&&(0,Xr.jsxs)(Xr.Fragment,{children:[(0,Xr.jsx)(Gs.__experimentalText,{size:"12",as:"p",className:"block-editor-inserter__help-text",children:(0,AV.__)("Drag and drop patterns into the canvas.")}),(0,Xr.jsx)(Aa,{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 HB=l(X(),1),GB=l(A(),1),EY=l(O(),1);var Pm=l(w(),1),{Tabs:UB}=F(GB.privateApis);function ECe({categories:e,selectedCategory:t,onSelectCategory:o,children:r}){let s={type:"tween",duration:(0,HB.useReducedMotion)()?0:.25,ease:[.6,0,.4,1]},a=(0,HB.usePrevious)(t),c=t?t.name:null,[u,d]=(0,EY.useState)(),f=e?.[0]?.name;return c===null&&!u&&f&&d(f),(0,Pm.jsxs)(UB,{selectOnMove:!1,selectedTabId:c,orientation:"vertical",onSelect:m=>{o(e.find(h=>h.name===m))},activeTabId:u,onActiveTabIdChange:d,children:[(0,Pm.jsx)(UB.TabList,{className:"block-editor-inserter__category-tablist",children:e.map(m=>(0,Pm.jsx)(UB.Tab,{tabId:m.name,"aria-current":m===t?"true":void 0,children:m.label},m.name))}),e.map(m=>(0,Pm.jsx)(UB.TabPanel,{tabId:m.name,focusable:!1,children:(0,Pm.jsx)(GB.__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 WB=ECe;var Xn=l(w(),1);function TCe({onSelectCategory:e,selectedCategory:t,onInsert:o,rootClientId:r,children:n}){let[i,s]=(0,TY.useState)(!1),a=Bg(r),c=(0,IY.useViewportMatch)("medium","<");return a.length?(0,Xn.jsxs)(Xn.Fragment,{children:[!c&&(0,Xn.jsxs)("div",{className:"block-editor-inserter__block-patterns-tabs-container",children:[(0,Xn.jsx)(WB,{categories:a,selectedCategory:t,onSelectCategory:e,children:n}),(0,Xn.jsx)(PY.Button,{__next40pxDefaultSize:!0,className:"block-editor-inserter__patterns-explore-button",onClick:()=>s(!0),variant:"secondary",children:(0,RY.__)("Explore all patterns")})]}),c&&(0,Xn.jsx)(FB,{categories:a,children:u=>(0,Xn.jsx)("div",{className:"block-editor-inserter__category-panel",children:(0,Xn.jsx)(jB,{onInsert:o,rootClientId:r,category:u},u.name)})}),i&&(0,Xn.jsx)(wY,{initialCategory:t||a[0],patternCategories:a,onModalClose:()=>s(!1),rootClientId:r})]}):(0,Xn.jsx)(Us,{})}var OY=TCe;var qY=l(N(),1),ZY=l(X(),1),XY=l(A(),1),YB=l(O(),1);var KB=l(A(),1),WY=l(N(),1),$Y=l(X(),1);var zY=l(A(),1),jY=l(N(),1);var Ft=l(A(),1),Qn=l(N(),1),La=l(O(),1),NV=l($(),1);var u_=l(z(),1),MY=l(Li(),1),DY=l(LV(),1),VY=l(bn(),1);var LY=l($(),1),NY=l(w(),1),ICe={image:"img",video:"video",audio:"audio"};function $B(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=ICe[t],s=(0,NY.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,LY.createBlock)(`core/${t}`,o),s]}var ut=l(w(),1),PCe=["image"],RCe={placement:"bottom-end",className:"block-editor-inserter__media-list__item-preview-options__popover"};function OCe({category:e,media:t}){if(!e.getReportUrl)return null;let o=e.getReportUrl(t);return(0,ut.jsx)(Ft.DropdownMenu,{className:"block-editor-inserter__media-list__item-preview-options",label:(0,Qn.__)("Options"),popoverProps:RCe,icon:Bs,children:()=>(0,ut.jsx)(Ft.MenuGroup,{children:(0,ut.jsx)(Ft.MenuItem,{onClick:()=>window.open(o,"_blank").focus(),icon:mL,children:(0,Qn.sprintf)((0,Qn.__)("Report %s"),e.mediaType)})})})}function ACe({onClose:e,onSubmit:t}){return(0,ut.jsxs)(Ft.Modal,{title:(0,Qn.__)("Insert external image"),onRequestClose:e,className:"block-editor-inserter-media-tab-media-preview-inserter-external-image-modal",children:[(0,ut.jsxs)(Ft.__experimentalVStack,{spacing:3,children:[(0,ut.jsx)("p",{children:(0,Qn.__)("This image cannot be uploaded to your Media Library, but it can still be inserted as an external image.")}),(0,ut.jsx)("p",{children:(0,Qn.__)("External images can be removed by the external provider without warning and could even have legal compliance issues related to privacy legislation.")})]}),(0,ut.jsxs)(Ft.Flex,{className:"block-editor-block-lock-modal__actions",justify:"flex-end",expanded:!1,children:[(0,ut.jsx)(Ft.FlexItem,{children:(0,ut.jsx)(Ft.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:e,children:(0,Qn.__)("Cancel")})}),(0,ut.jsx)(Ft.FlexItem,{children:(0,ut.jsx)(Ft.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:t,children:(0,Qn.__)("Insert")})})]})]})}function FY({media:e,onClick:t,category:o}){let[r,n]=(0,La.useState)(!1),[i,s]=(0,La.useState)(!1),[a,c]=(0,La.useState)(!1),[u,d]=(0,La.useMemo)(()=>$B(e,o.mediaType),[e,o.mediaType]),{createErrorNotice:f,createSuccessNotice:m}=(0,u_.useDispatch)(MY.store),{getSettings:h,getBlock:p}=(0,u_.useSelect)(x),{updateBlockAttributes:g}=(0,u_.useDispatch)(x),b=(0,La.useCallback)(_=>{if(a)return;let S=h(),C=(0,NV.cloneBlock)(_),{id:B,url:P,caption:R}=C.attributes;if(!B&&!S.mediaUpload){n(!0);return}if(B){t(C);return}c(!0),window.fetch(P).then(E=>E.blob()).then(E=>{let L=(0,VY.getFilename)(P)||"image.jpg",T=new File([E],L,{type:E.type});S.mediaUpload({filesList:[T],additionalData:{caption:R},onFileChange([I]){(0,DY.isBlobURL)(I.url)||(p(C.clientId)?g(C.clientId,{...C.attributes,id:I.id,url:I.url}):(t({...C,attributes:{...C.attributes,id:I.id,url:I.url}}),m((0,Qn.__)("Image uploaded and inserted."),{type:"snackbar",id:"inserter-notice"})),c(!1))},allowedTypes:PCe,onError(I){f(I,{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,Qn.__)("no title"),v=(0,La.useCallback)(()=>s(!0),[]),y=(0,La.useCallback)(()=>s(!1),[]);return(0,ut.jsxs)(ut.Fragment,{children:[(0,ut.jsx)(kg,{isEnabled:!0,blocks:[u],children:({draggable:_,onDragStart:S,onDragEnd:C})=>(0,ut.jsx)("div",{className:V("block-editor-inserter__media-list__list-item",{"is-hovered":i}),draggable:_,onDragStart:S,onDragEnd:C,children:(0,ut.jsxs)("div",{onMouseEnter:v,onMouseLeave:y,children:[(0,ut.jsx)(Ft.Tooltip,{text:k,children:(0,ut.jsx)(Ft.Composite.Item,{render:(0,ut.jsx)("div",{"aria-label":k,role:"option",className:"block-editor-inserter__media-list__item"}),onClick:()=>b(u),children:(0,ut.jsxs)("div",{className:"block-editor-inserter__media-list__item-preview",children:[d,a&&(0,ut.jsx)("div",{className:"block-editor-inserter__media-list__item-preview-spinner",children:(0,ut.jsx)(Ft.Spinner,{})})]})})}),!a&&(0,ut.jsx)(OCe,{category:o,media:e})]})})}),r&&(0,ut.jsx)(ACe,{onClose:()=>n(!1),onSubmit:()=>{t((0,NV.cloneBlock)(u)),m((0,Qn.__)("Image inserted."),{type:"snackbar",id:"inserter-notice"}),n(!1)}})]})}var MV=l(w(),1);function LCe({mediaList:e,category:t,onClick:o,label:r=(0,jY.__)("Media List")}){return(0,MV.jsx)(zY.Composite,{role:"listbox",className:"block-editor-inserter__media-list","aria-label":r,children:e.map((n,i)=>(0,MV.jsx)(FY,{media:n,category:t,onClick:o},n.id||n.sourceId||i))})}var UY=LCe;var Xl=l(O(),1),DV=l(z(),1);function HY(e,t={}){let[o,r]=(0,Xl.useState)(),[n,i]=(0,Xl.useState)(!1),s=(0,Xl.useRef)();return(0,Xl.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 GY(e){let[t,o]=(0,Xl.useState)([]),r=(0,DV.useSelect)(a=>F(a(x)).getInserterMediaCategories(),[]),{canInsertImage:n,canInsertVideo:i,canInsertAudio:s}=(0,DV.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,Xl.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 id=l(w(),1),NCe=10;function d_({rootClientId:e,onInsert:t,category:o}){let[r,n,i]=(0,$Y.useDebouncedInput)(),{mediaList:s,isLoading:a}=HY(o,{per_page:i?20:NCe,search:i}),c="block-editor-inserter__media-panel",u=o.labels.search_items||(0,WY.__)("Search");return(0,id.jsxs)("div",{className:c,children:[(0,id.jsx)(KB.SearchControl,{className:`${c}-search`,onChange:n,value:r,label:u,placeholder:u}),a&&(0,id.jsx)("div",{className:`${c}-spinner`,children:(0,id.jsx)(KB.Spinner,{})}),!a&&!s?.length&&(0,id.jsx)(Us,{}),!a&&!!s?.length&&(0,id.jsx)(UY,{rootClientId:e,onClick:t,mediaList:s,category:o})]})}var KY=l(z(),1);function MCe({fallback:e=null,children:t}){return(0,KY.useSelect)(r=>{let{getSettings:n}=r(x);return!!n().mediaUpload},[])?t:e}var Ws=MCe;var YY=l(A(),1),DCe=()=>null,sd=(0,YY.withFilters)("editor.MediaUpload")(DCe);var Jn=l(w(),1),VCe=["image","video","audio"];function FCe({rootClientId:e,selectedCategory:t,onSelectCategory:o,onInsert:r,children:n}){let i=GY(e),s=(0,ZY.useViewportMatch)("medium","<"),a="block-editor-inserter__media-tabs",c=(0,YB.useCallback)(d=>{if(!d?.url)return;let f=window.__experimentalDataViewsMediaModal&&d.mime_type?d.mime_type.split("/")[0]:d.type,[m]=$B(d,f);r(m)},[r]),u=(0,YB.useMemo)(()=>i.map(d=>({...d,label:d.labels.name})),[i]);return u.length?(0,Jn.jsxs)(Jn.Fragment,{children:[!s&&(0,Jn.jsxs)("div",{className:`${a}-container`,children:[(0,Jn.jsx)(WB,{categories:u,selectedCategory:t,onSelectCategory:o,children:n}),(0,Jn.jsx)(Ws,{children:(0,Jn.jsx)(sd,{multiple:!1,onSelect:c,allowedTypes:VCe,render:({open:d})=>(0,Jn.jsx)(XY.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,qY.__)("Open Media Library")})})})]}),s&&(0,Jn.jsx)(FB,{categories:u,children:d=>(0,Jn.jsx)(d_,{onInsert:r,rootClientId:e,category:d})})]}):(0,Jn.jsx)(Us,{})}var VV=FCe;var f_=l(O(),1),ad=l(N(),1),FV=l(A(),1),ZB=l(X(),1),eq=l(er(),1),tq=l(z(),1);var QY=l(A(),1),{Fill:JY,Slot:zCe}=(0,QY.createSlotFill)("__unstableInserterMenuExtension");JY.Slot=zCe;var qB=JY;var In=l(w(),1),jCe=9,UCe=[];function HCe({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,ZB.useDebounce)(eq.speak,500),{prioritizedBlocks:k}=(0,tq.useSelect)(j=>({prioritizedBlocks:j(x).getBlockListSettings(n)?.prioritizedInserterBlocks||UCe}),[n]),[v,y]=rd({onSelect:t,rootClientId:n,clientId:i,isAppender:s,insertionIndex:a,shouldFocusBlock:m,selectBlockOnInsert:p}),[_,S,C,B]=Pu(v,y,g),[P,,R]=nd(y,v,void 0,g),E=(0,f_.useMemo)(()=>{if(c===0)return[];let j=cy(P,e);return c!==void 0?j.slice(0,c):j},[e,P,c]),L=u;h&&E.length>2&&(L=0);let T=(0,f_.useMemo)(()=>{if(L===0)return[];let j=_.filter(Q=>Q.name!=="core/block"),H=_a(j,"frecency","desc");!e&&k.length&&(H=EC(H,k));let G=wC(H,S,C,e);return L!==void 0?G.slice(0,L):G},[e,_,S,C,L,k]);(0,f_.useEffect)(()=>{if(!e)return;let j=T.length+E.length,H=(0,ad.sprintf)((0,ad._n)("%d result found.","%d results found.",j),j);b(H)},[e,b,T,E]);let I=(0,ZB.useAsyncList)(T,{step:jCe}),M=T.length>0||E.length>0,D=!!T.length&&(0,In.jsx)(od,{title:(0,In.jsx)(FV.VisuallyHidden,{children:(0,ad.__)("Blocks")}),children:(0,In.jsx)(Em,{items:I,onSelect:B,onHover:o,label:(0,ad.__)("Blocks"),isDraggable:f})}),U=!!E.length&&(0,In.jsx)(od,{title:(0,In.jsx)(FV.VisuallyHidden,{children:(0,ad.__)("Block patterns")}),children:(0,In.jsx)("div",{className:"block-editor-inserter__quick-inserter-patterns",children:(0,In.jsx)(Aa,{blockPatterns:E,onClickPattern:R,onHover:r,isDraggable:f})})});return(0,In.jsxs)(hg,{children:[!d&&!M&&(0,In.jsx)(Us,{}),h?U:D,!!T.length&&!!E.length&&(0,In.jsx)("div",{className:"block-editor-inserter__quick-inserter-separator"}),h?D:U,d&&(0,In.jsx)(qB.Slot,{fillProps:{onSelect:B,onHover:o,filterValue:e,hasItems:M,rootClientId:v},children:j=>j.length?j:M?null:(0,In.jsx)(Us,{})})]})}var XB=HCe;var JB=l(A(),1),oq=l(O(),1);var Ql=l(w(),1),{Tabs:QB}=F(JB.privateApis);function GCe({defaultTabId:e,onClose:t,onSelect:o,selectedTab:r,tabs:n,closeButtonLabel:i},s){return(0,Ql.jsx)("div",{className:"block-editor-tabbed-sidebar",children:(0,Ql.jsxs)(QB,{selectOnMove:!1,defaultTabId:e,onSelect:o,selectedTabId:r,children:[(0,Ql.jsxs)("div",{className:"block-editor-tabbed-sidebar__tablist-and-close-button",children:[(0,Ql.jsx)(JB.Button,{className:"block-editor-tabbed-sidebar__close-button",icon:Hf,label:i,onClick:()=>t(),size:"compact"}),(0,Ql.jsx)(QB.TabList,{className:"block-editor-tabbed-sidebar__tablist",ref:s,children:n.map(a=>(0,Ql.jsx)(QB.Tab,{tabId:a.name,className:"block-editor-tabbed-sidebar__tab",children:a.title},a.name))})]}),n.map(a=>(0,Ql.jsx)(QB.TabPanel,{tabId:a.name,focusable:!1,className:"block-editor-tabbed-sidebar__tabpanel",ref:a.panelRef,children:a.panel},a.name))]})})}var eE=(0,oq.forwardRef)(GCe);var tE=l(z(),1),Tg=l(O(),1);function m_(e=!0){let{setZoomLevel:t,resetZoomLevel:o}=F((0,tE.useDispatch)(x)),{isZoomedOut:r,isZoomOut:n}=(0,tE.useSelect)(a=>{let{isZoomOut:c}=F(a(x));return{isZoomedOut:c(),isZoomOut:c}},[]),i=(0,Tg.useRef)(!1),s=(0,Tg.useRef)(e);(0,Tg.useEffect)(()=>{r!==s.current&&(i.current=!1)},[r]),(0,Tg.useEffect)(()=>(s.current=e,e!==n()&&(i.current=!0,e?t("auto-scaled"):o()),()=>{i.current&&n()&&o()}),[e,n,o,t])}var Xe=l(w(),1),nq=()=>{};function WCe({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,rq.useSelect)(fe=>{let{isZoomOut:xe,getSectionRootClientId:De}=F(fe(x));return{isZoomOutMode:xe(),hasSectionRootClientId:!!De()}},[]),[b,k,v]=(0,p_.useDebouncedInput)(a),[y,_]=(0,zt.useState)(null),[S,C]=(0,zt.useState)(m),[B,P]=(0,zt.useState)("all"),[R,E]=(0,zt.useState)(null),L=(0,p_.useViewportMatch)("large"),I=(0,p_.useViewportMatch)("medium","<")?d:nq;function M(){return f||(p?"patterns":"blocks")}let[D,U]=(0,zt.useState)(M());m_(g&&(D==="patterns"||D==="media")&&L);let[H,G,Q]=rd({rootClientId:e,clientId:t,isAppender:o,insertionIndex:r,shouldFocusBlock:c}),ie=(0,zt.useRef)(),ce=(0,zt.useCallback)((fe,xe,De,st)=>{G(fe,xe,De,st),n(fe),I(),window.requestAnimationFrame(()=>{!c&&!ie.current?.contains(h.current.ownerDocument.activeElement)&&ie.current?.querySelector("button").focus()})},[G,I,n,h,c]),te=(0,zt.useCallback)((fe,xe,...De)=>{Q(!1),G(fe,{patternName:xe},...De),n(),I()},[G,I,n,Q]),ne=(0,zt.useCallback)(fe=>{Q(fe),_(fe)},[Q,_]),Z=(0,zt.useCallback)((fe,xe)=>{C(fe),P(xe),u?.()},[C,u]),Y=D==="patterns"&&!v&&!!S,J=D==="media"&&!!R,K=(0,zt.useMemo)(()=>D==="media"?null:(0,Xe.jsxs)(Xe.Fragment,{children:[(0,Xe.jsx)(Ig.SearchControl,{className:"block-editor-inserter__search",onChange:fe=>{y&&_(null),k(fe)},value:b,label:(0,ld.__)("Search"),placeholder:(0,ld.__)("Search")}),!!v&&(0,Xe.jsx)(XB,{filterValue:v,onSelect:n,onHover:ne,rootClientId:e,clientId:t,isAppender:o,__experimentalInsertionIndex:r,showBlockDirectory:!0,shouldFocusBlock:c,prioritizePatterns:D==="patterns"})]}),[D,y,_,k,b,v,n,ne,c,t,e,r,o]),ee=(0,zt.useMemo)(()=>(0,Xe.jsxs)(Xe.Fragment,{children:[(0,Xe.jsx)("div",{className:"block-editor-inserter__block-list",children:(0,Xe.jsx)(aY,{ref:ie,rootClientId:H,onInsert:ce,onHover:ne,showMostUsedBlocks:s})}),i&&(0,Xe.jsxs)("div",{className:"block-editor-inserter__tips",children:[(0,Xe.jsx)(Ig.VisuallyHidden,{as:"h2",children:(0,ld.__)("A tip for using the block editor")}),(0,Xe.jsx)(xG,{})]})]}),[H,ce,ne,s,i]),re=(0,zt.useMemo)(()=>(0,Xe.jsx)(OY,{rootClientId:H,onInsert:te,onSelectCategory:Z,selectedCategory:S,children:Y&&(0,Xe.jsx)(jB,{rootClientId:H,onInsert:te,category:S,patternFilter:B,showTitlesAsTooltip:!0})}),[H,te,Z,B,S,Y]),W=(0,zt.useMemo)(()=>(0,Xe.jsx)(VV,{rootClientId:H,selectedCategory:R,onSelectCategory:E,onInsert:ce,children:J&&(0,Xe.jsx)(d_,{rootClientId:H,onInsert:ce,category:R})}),[H,ce,R,E,J]),ae=fe=>{fe!=="patterns"&&C(null),U(fe)},ge=(0,zt.useRef)();return(0,zt.useLayoutEffect)(()=>{ge.current&&window.requestAnimationFrame(()=>{ge.current.querySelector('[role="tab"][aria-selected="true"]')?.focus()})},[]),(0,Xe.jsxs)("div",{className:V("block-editor-inserter__menu",{"show-panel":Y||J,"is-zoom-out":p}),ref:h,children:[(0,Xe.jsx)("div",{className:"block-editor-inserter__main-area",children:(0,Xe.jsx)(eE,{ref:ge,onSelect:ae,onClose:d,selectedTab:D,closeButtonLabel:(0,ld.__)("Close Block Inserter"),tabs:[{name:"blocks",title:(0,ld.__)("Blocks"),panel:(0,Xe.jsxs)(Xe.Fragment,{children:[K,D==="blocks"&&!v&&ee]})},{name:"patterns",title:(0,ld.__)("Patterns"),panel:(0,Xe.jsxs)(Xe.Fragment,{children:[K,D==="patterns"&&!v&&re]})},{name:"media",title:(0,ld.__)("Media"),panel:(0,Xe.jsxs)(Xe.Fragment,{children:[K,W]})}]})}),i&&y&&(0,Xe.jsx)(Ig.Popover,{className:"block-editor-inserter__preview-container__popover",placement:"right-start",offset:16,focusOnMount:!1,animate:!1,children:(0,Xe.jsx)(jK,{item:y})})]})}var zV=(0,zt.forwardRef)(WCe);function $Ce(e,t){return(0,Xe.jsx)(zV,{...e,onPatternCategorySelection:nq,ref:t})}var iq=(0,zt.forwardRef)($Ce);var oE=l(O(),1),h_=l(N(),1),rE=l(A(),1),sq=l(z(),1);var Rm=l(w(),1),KCe=6,YCe=6,qCe=2;function nE({onSelect:e,rootClientId:t,clientId:o,isAppender:r,selectBlockOnInsert:n,hasSearch:i=!0}){let[s,a]=(0,oE.useState)(""),[c,u]=rd({onSelect:e,rootClientId:t,clientId:o,isAppender:r,selectBlockOnInsert:n}),[d]=Pu(c,u,!0),{setInserterIsOpened:f,insertionIndex:m}=(0,sq.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>KCe;(0,oE.useEffect)(()=>{f&&f(!1)},[f]);let p=()=>{f({filterValue:s,onSelect:e,rootClientId:t,insertionIndex:m})};return(0,Rm.jsxs)("div",{className:V("block-editor-inserter__quick-inserter",{"has-search":h,"has-expand":f}),children:[h&&(0,Rm.jsx)(rE.SearchControl,{className:"block-editor-inserter__search",value:s,onChange:g=>{a(g)},label:(0,h_.__)("Search"),placeholder:(0,h_.__)("Search")}),(0,Rm.jsx)("div",{className:"block-editor-inserter__quick-inserter-results",children:(0,Rm.jsx)(XB,{filterValue:s,onSelect:e,rootClientId:t,clientId:o,isAppender:r,maxBlockPatterns:s?qCe:0,maxBlockTypes:YCe,isDraggable:!1,selectBlockOnInsert:n,isQuick:!0})}),f&&(0,Rm.jsx)(rE.Button,{__next40pxDefaultSize:!0,className:"block-editor-inserter__quick-inserter-expand",onClick:p,"aria-label":(0,h_.__)("Browse all. This will open the main inserter panel in the editor toolbar."),children:(0,h_.__)("Browse all")})]})}var ZCe=50;function aq(e,t){if(!e||!e.attributes||!t?.__experimentalLabel)return null;let o=t.__experimentalLabel(e.attributes,{context:"appender"});return typeof o=="string"&&o.length<ZCe&&o.length>0?o:null}var g_=l(w(),1),XCe=({onToggle:e,disabled:t,isOpen:o,blockTitle:r,hasSingleBlockType:n,appenderLabel:i,toggleProps:s={}})=>{let{as:a=iE.Button,label:c,onClick:u,...d}=s,f=c;!f&&i?f=i:!f&&n?f=(0,Jl.sprintf)((0,Jl._x)("Add %s","directly add the only allowed block"),r.toLowerCase()):f||(f=(0,Jl._x)("Add block","Generic label for block inserter button"));function m(h){e&&e(h),u&&u(h)}return(0,g_.jsx)(a,{__next40pxDefaultSize:s.as?void 0:!0,icon:Pi,label:f,tooltipPosition:"bottom",onClick:m,className:"block-editor-inserter__toggle","aria-haspopup":n?!1:"true","aria-expanded":n?!1:o,disabled:t,...d})},QCe=class extends cq.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=XCe}=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,g_.jsx)(nE,{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,g_.jsx)(iq,{onSelect:()=>{e()},onClose:e,rootClientId:t,clientId:o,isAppender:r,showInserterHelpPanel:n})}render(){let{position:e,hasSingleBlockType:t,directInsertBlock:o,insertOnlyAllowedBlock:r,__experimentalIsQuick:n,onSelectOrClose:i}=this.props;return t||o?this.renderToggle({onToggle:r}):(0,g_.jsx)(iE.Dropdown,{className:"block-editor-inserter",contentClassName:V("block-editor-inserter__popover",{"is-quick":n}),popoverProps:{position:e,shift:!0},onToggle:this.onToggle,expandOnMobile:!0,headerTitle:(0,Jl.__)("Add a block"),renderToggle:this.renderToggle,renderContent:this.renderContent,onClose:i})}},Ki=(0,aE.compose)([(0,sE.withSelect)((e,{clientId:t,rootClientId:o,shouldDirectInsert:r=!0})=>{let{getBlockRootClientId:n,hasInserterItems:i,getAllowedBlocks:s,getDirectInsertBlock:a}=e(x),{getBlockVariations:c,getBlockType:u}=e(b_.store);o=o||n(t)||void 0;let d=s(o),f=r&&a(o),m=d?.length===1&&c(d[0].name,"inserter")?.length===0,h=!1;m&&(h=d[0]);let p=f?u(f.name):null,g=aq(f,p);return{hasItems:i(o),hasSingleBlockType:m,blockTitle:h?h.title:"",allowedBlockType:h,directInsertBlock:f,appenderLabel:g,rootClientId:o}}),(0,sE.withDispatch)((e,t,{select:o})=>({insertOnlyAllowedBlock(){let{rootClientId:r,clientId:n,isAppender:i,hasSingleBlockType:s,allowedBlockType:a,directInsertBlock:c,onSelectOrClose:u,selectBlockOnInsert:d}=t;if(!s&&!c)return;function f(b){let{getBlock:k,getPreviousBlockClientId:v}=o(x);if(!b||!n&&!r)return{};let y={},_={};if(n){let S=k(n),C=k(v(n));S?.name===C?.name&&(_=C?.attributes||{})}else{let S=k(r);if(S?.innerBlocks?.length){let C=S.innerBlocks[S.innerBlocks.length-1];c&&c?.name===C.name&&(_=C.attributes)}}return b.forEach(S=>{_.hasOwnProperty(S)&&(y[S]=_[S])}),y}function m(){let{getBlockIndex:b,getBlockSelectionEnd:k,getBlockOrder:v,getBlockRootClientId:y}=o(x);if(n)return b(n);let _=k();return!i&&_&&y(_)===r?b(_)+1:v(r).length}let{insertBlock:h}=e(x),p;if(c){let b=f(c.attributesToCopy);p=(0,b_.createBlock)(c.name,{...c.attributes||{},...b})}else p=(0,b_.createBlock)(a.name);h(p,m(),r,d),u&&u(p);let g=(0,Jl.sprintf)((0,Jl.__)("%s block added"),a.title);(0,lq.speak)(g)}})),(0,aE.ifCondition)(({hasItems:e,isAppender:t,rootClientId:o,clientId:r})=>e||!t&&!o&&!r)])(QCe);var k_=l(w(),1),JCe="\uFEFF";function Pg({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,uq.decodeEntities)(r)||(0,jV.__)("Type / to choose a block"),c=()=>{i(void 0,e),s()};return(0,k_.jsxs)("div",{"data-root-client-id":e||"",className:V("block-editor-default-block-appender",{"has-visible-prompt":t}),children:[(0,k_.jsx)("p",{tabIndex:"0",role:"button","aria-label":(0,jV.__)("Add default block"),className:"block-editor-default-block-appender__content",onKeyDown:u=>{(cE.ENTER===u.keyCode||cE.SPACE===u.keyCode)&&c()},onClick:()=>c(),onFocus:()=>{t&&c()},children:t?a:JCe}),(0,k_.jsx)(Ki,{rootClientId:e,position:"bottom right",isAppender:!0,__experimentalIsQuick:!0})]})}var dq=l(A(),1),UV=l(O(),1),v_=l(N(),1);var fq=l(Pe(),1);var uE=l(w(),1);function mq({rootClientId:e,className:t,onFocus:o,tabIndex:r,onSelect:n},i){return(0,uE.jsx)(Ki,{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,v_.sprintf)((0,v_._x)("Add %s","directly add the only allowed block"),u.toLowerCase()):h=(0,v_._x)("Add block","Generic label for block inserter button"),(0,uE.jsx)(dq.Button,{__next40pxDefaultSize:!0,ref:i,onFocus:o,tabIndex:r,className:V(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,uE.jsx)(we,{icon:Pi})})},isAppender:!0})}var pq=(0,UV.forwardRef)((e,t)=>((0,fq.default)("wp.blockEditor.ButtonBlockerAppender",{alternative:"wp.blockEditor.ButtonBlockAppender",since:"5.9"}),mq(e,t))),cd=(0,UV.forwardRef)(mq);var Rg=l(w(),1);function e1e({rootClientId:e}){return(0,HV.useSelect)(o=>o(x).canInsertBlockType((0,hq.getDefaultBlockName)(),e))?(0,Rg.jsx)(Pg,{rootClientId:e}):(0,Rg.jsx)(cd,{rootClientId:e,className:"block-list-appender__toggle"})}function gq({rootClientId:e,CustomAppender:t,className:o,tagName:r="div"}){let n=(0,HV.useSelect)(i=>{let{getBlockInsertionPoint:s,isBlockInsertionPointVisible:a,getBlockCount:c}=i(x),u=s();return a()&&e===u?.rootClientId&&c(e)===0},[e]);return(0,Rg.jsx)(r,{tabIndex:-1,className:V("block-list-appender wp-block",o,{"is-drag-over":n}),contentEditable:!1,"data-block":!0,children:t?(0,Rg.jsx)(t,{}):(0,Rg.jsx)(e1e,{rootClientId:e})})}var Rq=l(X(),1),__=l(z(),1),Oq=l(O(),1),Aq=l(N(),1);var Og=l(z(),1),dd=l(O(),1),mE=l(A(),1),Iq=l(X(),1);var vq=l(z(),1),ud=l(O(),1),yq=l(A(),1),_q=l(N(),1);var kq=l(X(),1),GV=l(Fe(),1),bq=new WeakMap;function t1e(e){let t=(0,kq.useRefEffect)(o=>{function r(i){let{deltaX:s,deltaY:a,target:c}=i,u=e.current,d=bq.get(u);d||(d=(0,GV.getScrollContainer)(u),bq.set(u,d));let f=(0,GV.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 Om=t1e;var WV=l(w(),1),o1e=Number.MAX_SAFE_INTEGER;function r1e({previousClientId:e,nextClientId:t,children:o,__unstablePopoverSlot:r,__unstableContentRef:n,operation:i="insert",nearestSide:s="right",...a}){let[c,u]=(0,ud.useReducer)(v=>(v+1)%o1e,0),{orientation:d,rootClientId:f,isVisible:m}=(0,vq.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=tt(e),p=tt(t),g=d==="vertical",b=(0,ud.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,P=0;if(i==="group"){let R=_||y;C=R.top,B=0,P=R.bottom-R.top,S=s==="left"?R.left-2:R.right-2}else g?(C=y?y.bottom:_.top,B=y?y.width:_.width,P=_&&y?_.top-y.bottom:0,S=y?y.left:_.left):(C=y?y.top:_.top,P=y?y.height:_.height,(0,_q.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,P)}},[h,p,c,g,m,i,s]),k=Om(n);return(0,ud.useLayoutEffect)(()=>{if(!h)return;let v=new window.MutationObserver(u);return v.observe(h,{attributes:!0}),()=>{v.disconnect()}},[h]),(0,ud.useLayoutEffect)(()=>{if(!p)return;let v=new window.MutationObserver(u);return v.observe(p,{attributes:!0}),()=>{v.disconnect()}},[p]),(0,ud.useLayoutEffect)(()=>{if(h)return h.ownerDocument.defaultView.addEventListener("resize",u),()=>{h.ownerDocument.defaultView?.removeEventListener("resize",u)}},[h]),!h&&!p||!m?null:(0,WV.jsx)(yq.Popover,{ref:k,animate:!1,anchor:b,focusOnMount:!1,__unstableSlotName:r,inline:!r,...a,className:V("block-editor-block-popover","block-editor-block-popover__inbetween",a.className),resize:!1,flip:!1,placement:"overlay",variant:"unstyled",children:(0,WV.jsx)("div",{className:"block-editor-block-popover__inbetween-container",children:o})},t+"--"+f)}var dE=r1e;var Cq=l(z(),1),Bq=l(X(),1),Eq=l(A(),1);var tc=l(O(),1);var Sq=l(X(),1),xq=l(A(),1),ec=l(O(),1);var $V=l(w(),1),n1e=Number.MAX_SAFE_INTEGER;function i1e({clientId:e,bottomClientId:t,children:o,__unstablePopoverSlot:r,__unstableContentRef:n,shift:i=!0,...s},a){let c=tt(e),u=tt(t??e),d=(0,Sq.useMergeRefs)([a,Om(n)]),[f,m]=(0,ec.useReducer)(p=>(p+1)%n1e,0);(0,ec.useLayoutEffect)(()=>{if(!c)return;let p=new window.MutationObserver(m);return p.observe(c,{attributes:!0}),()=>{p.disconnect()}},[c]);let h=(0,ec.useMemo)(()=>{if(!(f<0||!c||t&&!u))return{getBoundingClientRect(){return u?k5(Uh(c),Uh(u)):Uh(c)},contextElement:c}},[f,c,t,u]);return!c||t&&!u?null:(0,$V.jsx)(xq.Popover,{ref:d,animate:!1,focusOnMount:!1,anchor:h,__unstableSlotName:r,inline:!r,placement:"top-start",resize:!1,flip:!1,shift:i,...s,className:V("block-editor-block-popover",s.className),variant:"unstyled",children:o})}var Am=(0,ec.forwardRef)(i1e),s1e=({clientId:e,bottomClientId:t,children:o,...r},n)=>(0,$V.jsx)(Am,{...r,bottomClientId:t,clientId:e,__unstableContentRef:void 0,__unstablePopoverSlot:void 0,ref:n,children:o}),wq=(0,ec.forwardRef)(s1e);var fE=l(w(),1);function a1e({clientId:e,bottomClientId:t,children:o,shift:r=!1,additionalStyles:n,...i},s){t??=e;let a=tt(e);return(0,fE.jsx)(Am,{ref:s,clientId:e,bottomClientId:t,shift:r,...i,children:a&&e===t?(0,fE.jsx)(l1e,{selectedElement:a,additionalStyles:n,children:o}):o})}function l1e({selectedElement:e,additionalStyles:t={},children:o}){let[r,n]=(0,tc.useState)(e.offsetWidth),[i,s]=(0,tc.useState)(e.offsetHeight);(0,tc.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,tc.useMemo)(()=>({position:"absolute",width:r,height:i,...t}),[r,i,t]);return(0,fE.jsx)("div",{style:a,children:o})}var Yi=(0,tc.forwardRef)(a1e);var KV=l(w(),1),y_={hide:{opacity:0,scaleY:.75},show:{opacity:1,scaleY:1},exit:{opacity:0,scaleY:.9}};function c1e({__unstablePopoverSlot:e,__unstableContentRef:t}){let{clientId:o}=(0,Cq.useSelect)(n=>{let{getBlockOrder:i,getBlockInsertionPoint:s}=n(x),a=s(),c=i(a.rootClientId);return c.length?{clientId:c[a.index]}:{}},[]),r=(0,Bq.useReducedMotion)();return(0,KV.jsx)(Yi,{clientId:o,__unstablePopoverSlot:e,__unstableContentRef:t,className:"block-editor-block-popover__drop-zone",children:(0,KV.jsx)(Eq.__unstableMotion.div,{"data-testid":"block-popover-drop-zone",initial:r?y_.show:y_.hide,animate:y_.show,exit:r?y_.show:y_.exit,className:"block-editor-block-popover__drop-zone-foreground"})})}var Tq=c1e;var oc=l(w(),1),Ag=(0,dd.createContext)();Ag.displayName="InsertionPointOpenRefContext";function u1e({__unstablePopoverSlot:e,__unstableContentRef:t,operation:o="insert",nearestSide:r="right"}){let{selectBlock:n,hideInsertionPoint:i}=(0,Og.useDispatch)(x),s=(0,dd.useContext)(Ag),a=(0,dd.useRef)(),{orientation:c,previousClientId:u,nextClientId:d,rootClientId:f,isInserterShown:m,isDistractionFree:h,isZoomOutMode:p}=(0,Og.useSelect)(R=>{let{getBlockOrder:E,getBlockListSettings:L,getBlockInsertionPoint:T,isBlockBeingDragged:I,getPreviousBlockClientId:M,getNextBlockClientId:D,getSettings:U,isZoomOut:j}=F(R(x)),H=T(),G=E(H.rootClientId);if(!G.length)return{};let Q=G[H.index-1],ie=G[H.index];for(;I(Q);)Q=M(Q);for(;I(ie);)ie=D(ie);let ce=U();return{previousClientId:Q,nextClientId:ie,orientation:L(H.rootClientId)?.orientation||"vertical",rootClientId:H.rootClientId,isDistractionFree:ce.isDistractionFree,isInserterShown:H?.__unstableWithInserter,isZoomOutMode:j()}},[]),{getBlockEditingMode:g}=(0,Og.useSelect)(x),b=(0,Iq.useReducedMotion)();function k(R){R.target===a.current&&d&&g(d)!=="disabled"&&n(d,-1)}function v(R){R.target===a.current&&!s.current&&i()}function y(R){R.target!==a.current&&(s.current=!0)}let _=(0,dd.useCallback)(R=>{!R&&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 P=V("block-editor-block-list__insertion-point",c==="horizontal"||o==="group"?"is-horizontal":"is-vertical");return(0,oc.jsx)(dE,{previousClientId:u,nextClientId:d,__unstablePopoverSlot:e,__unstableContentRef:t,operation:o,nearestSide:r,children:(0,oc.jsxs)(mE.__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:V(P,{"is-with-inserter":m}),onHoverEnd:v,children:[(0,oc.jsx)(mE.__unstableMotion.div,{variants:S,className:"block-editor-block-list__insertion-point-indicator","data-testid":"block-list-insertion-point-indicator"}),m&&(0,oc.jsx)(mE.__unstableMotion.div,{variants:C,className:V("block-editor-block-list__insertion-point-inserter"),children:(0,oc.jsx)(Ki,{ref:_,position:"bottom center",clientId:d,rootClientId:f,__experimentalIsQuick:!0,onToggle:R=>{s.current=R},onSelectOrClose:()=>{s.current=!1}})})]})})}function Pq(e){let{insertionPoint:t,isVisible:o,isBlockListEmpty:r}=(0,Og.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,oc.jsx)(Tq,{...e},`${t.rootClientId}-${t.index}`):(0,oc.jsx)(u1e,{operation:t.operation,nearestSide:t.nearestSide,...e})}function Lq(){let e=(0,Oq.useContext)(Ag),t=(0,__.useSelect)(g=>{let b=g(x).getSettings();return b.isDistractionFree||b.isPreviewMode||F(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}=F((0,__.useSelect)(x)),{showInsertionPoint:h,hideInsertionPoint:p}=(0,__.useDispatch)(x);return(0,Rq.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,R=Array.from(k.target.children).find(I=>{let M=I.getBoundingClientRect();return I.classList.contains("wp-block")&&_==="vertical"&&M.top>C||I.classList.contains("wp-block")&&_==="horizontal"&&((0,Aq.isRTL)()?M.right<B:M.left>B)});if(!R){p();return}if(!R.id&&(R=R.firstElementChild,!R)){p();return}let E=R.id.slice(6);if(!E||c(E)||m(E)||i().includes(E)&&_==="vertical"&&!S&&!s().hasFixedToolbar)return;let L=R.getBoundingClientRect();if(_==="horizontal"&&(k.clientY>L.bottom||k.clientY<L.top)||_==="vertical"&&(k.clientX>L.right||k.clientX<L.left)){p();return}let T=r(E);if(T===0){p();return}h(v,T,{__unstableWithInserter:!0})}return g.addEventListener("mousemove",b),()=>{g.removeEventListener("mousemove",b)}},[e,o,r,n,h,p,i,t])}var pE=l(z(),1),Nq=l(X(),1);var Mq=l(w(),1);function Lm(){let{getSettings:e,hasSelectedBlock:t,hasMultiSelection:o}=(0,pE.useSelect)(x),{clearSelectedBlock:r}=(0,pE.useDispatch)(x),{clearBlockSelection:n}=e();return(0,Nq.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 Dq(e){return(0,Mq.jsx)("div",{ref:Lm(),...e})}var nZ=l(X(),1),Ng=l(O(),1),iZ=l(z(),1),Vm=l($(),1);var Vq=l(w(),1);function Fq({showSeparator:e,isFloating:t,onAddBlock:o,isToggle:r}){let{clientId:n}=Ie();return(0,Vq.jsx)(cd,{className:V({"block-list-appender__toggle":r}),rootClientId:n,showSeparator:e,isFloating:t,onAddBlock:o})}var zq=l(w(),1);function jq(){let{clientId:e}=Ie();return(0,zq.jsx)(Pg,{rootClientId:e})}var gE=l(O(),1),Gq=l(z(),1),hE=l(Pe(),1),Wq=l(S_(),1);var x_=new WeakMap;function d1e(){let e;return t=>((e===void 0||!(0,Wq.isShallowEqual)(e,t))&&(e=t),e)}function Hq(e){let[t]=(0,gE.useState)(d1e);return t(e)}function $q(e,t,o,r,n,i,s,a,c,u,d,f){let m=(0,Gq.useRegistry)(),h=Hq(o),p=Hq(r),g=c===void 0||t==="contentOnly"?t:c;(0,gE.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=Rs(f?.type);b.orientation=k.getOrientation(f)}s!==void 0&&((0,hE.default)("__experimentalDefaultBlock",{alternative:"defaultBlock",since:"6.3",version:"6.4"}),b.defaultBlock=s),n!==void 0&&(b.defaultBlock=n),a!==void 0&&((0,hE.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,hE.default)("Using `Function` as a `directInsert` argument",{alternative:"`boolean` values",since:"6.5"}),x_.get(m)||x_.set(m,{}),x_.get(m)[e]=b,window.queueMicrotask(()=>{let k=x_.get(m);if(Object.keys(k).length){let{updateBlockListSettings:v}=m.dispatch(x);v(k),x_.set(m,{})}})},[e,h,p,g,n,i,s,a,u,d,f,m])}var YV=l(Ff(),1),bE=l(O(),1),Kq=l(z(),1),Yq=l($(),1);function qq(e,t,o,r){let n=(0,Kq.useRegistry)(),i=(0,bE.useRef)(null);(0,bE.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,YV.default)(t,i.current);if(!h||!p)return;i.current=t;let g=(0,Yq.synchronizeBlocksWithTemplate)(m,t);(0,YV.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 Zq=l($(),1),Xq=l(z(),1);function Qq(e){return(0,Xq.useSelect)(t=>{let o=t(x).getBlock(e);if(!o)return;let r=t(Zq.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 Dm=l(z(),1),yE=l(O(),1),_E=l(X(),1),oZ=l(N(),1),Lg=l($(),1);var qV=l(O(),1),ei=l($(),1),Nm=l(z(),1),Jq=l(Fe(),1);function ZV(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 f1e(e,t,o,r,n,i,s,a,c){return u=>{let{srcRootClientId:d,srcClientIds:f,type:m,blocks:h}=ZV(u);if(m==="inserter"){s();let p=h.map(g=>(0,ei.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 m1e(e,t,o,r,n){return i=>{if(!t().mediaUpload)return;let s=(0,ei.findTransform)((0,ei.getBlockTransforms)("from"),a=>a.type==="files"&&r(a.blockName,e)&&a.isMatch(i));if(s){let a=s.transform(i,o);n(a)}}}function p1e(e){return t=>{let o=(0,ei.pasteHandler)({HTML:t,mode:"BLOCKS"});o.length&&e(o)}}function kE(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,Nm.useSelect)(x),{getGroupingBlockName:m}=(0,Nm.useSelect)(ei.store),{insertBlocks:h,moveBlocksToPosition:p,updateBlockAttributes:g,clearSelectedBlock:b,replaceBlocks:k,removeBlocks:v}=(0,Nm.useDispatch)(x),y=(0,Nm.useRegistry)(),_=(0,qV.useCallback)((R,E=!0,L=0,T=[])=>{Array.isArray(R)||(R=[R]);let M=c(e)[t];if(r==="replace")k(M,R,void 0,L);else if(r==="group"){let D=f(M);n==="left"?R.push(D):R.unshift(D);let U=R.map(Q=>(0,ei.createBlock)(Q.name,Q.attributes,Q.innerBlocks)),j=R.every(Q=>Q.name==="core/image"),H=i("core/gallery",e),G=(0,ei.createBlock)(j&&H?"core/gallery":m(),{layout:{type:"flex",flexWrap:j&&H?null:"nowrap"}},U);k([M,...T],G,void 0,L)}else h(R,t,e,E,L)},[c,e,t,r,k,f,n,i,m,h]),S=(0,qV.useCallback)((R,E,L)=>{if(r==="replace"){let T=u(R),M=c(e)[t];y.batch(()=>{v(R,!1),k(M,T,void 0,0)})}else p(R,E,e,L)},[r,c,u,p,y,v,k,t,e]),C=f1e(e,t,s,a,S,_,b,r,f),B=m1e(e,d,g,i,_),P=p1e(_);return R=>{let E=(0,Jq.getFilesFromDataTransfer)(R.dataTransfer),L=R.dataTransfer.getData("text/html");L?P(L):E.length?B(E):C(R)}}function h1e(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 Mm(e,t,o=["top","bottom","left","right"]){let r,n;return o.forEach(i=>{let s=h1e(e,t,i);(r===void 0||s<r)&&(r=s,n=i)}),[r,n]}function vE(e,t){return t.left<=e.x&&t.right>=e.x&&t.top<=e.y&&t.bottom>=e.y}function eZ(e,t){return t.top<=e.y&&t.bottom>=e.y}var XV=30,g1e=120,b1e=120;function k1e(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]=Mm(t,k,["top","bottom"]);if(k.height>g1e&&v<XV){if(y==="top")return[m,"before"];if(y==="bottom")return[m+1,"after"]}}let h=(0,oZ.isRTL)();if(d&&f==="horizontal"){let k=d.getBoundingClientRect(),[v,y]=Mm(t,k,["left","right"]);if(k.width>b1e&&v<XV){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]=Mm(t,S,n),[P,R]=Mm(t,S,["left","right"]),E=vE(t,S);k&&E?C=0:o==="vertical"&&_!=="horizontal"&&(E&&P<XV||!E&&eZ(t,S))&&(c=y,u=R),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 SE(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 tZ(e,t){let{defaultView:o}=t;return!!(o&&e instanceof o.HTMLElement&&e.closest("[data-is-insertion-point]"))}function rZ({dropZoneElement:e,rootClientId:t="",parentClientId:o="",isDisabled:r=!1}={}){let n=(0,Dm.useRegistry)(),[i,s]=(0,yE.useState)({index:null,operation:"insert"}),{getBlockType:a,getBlockVariations:c,getGroupingBlockName:u}=(0,Dm.useSelect)(Lg.store),{canInsertBlockType:d,getBlockListSettings:f,getBlocks:m,getBlockIndex:h,getDraggedBlockClientIds:p,getBlockNamesByClientId:g,getAllowedBlocks:b,isDragging:k,isGroupable:v,isZoomOut:y,getSectionRootClientId:_,getBlockParents:S}=F((0,Dm.useSelect)(x)),{showInsertionPoint:C,hideInsertionPoint:B,startDragging:P,stopDragging:R}=F((0,Dm.useDispatch)(x)),E=kE(i.operation==="before"||i.operation==="after"?o:t,i.index,{operation:i.operation,nearestSide:i.nearestSide}),L=(0,_E.useThrottle)((0,yE.useCallback)((T,I)=>{k()||P();let M=p(),D=[t,...S(t,!0)];if(M.some(ee=>D.includes(ee)))return;let j=b(t),H=g([t])[0],G=g(M);if(!SE(a,j,G,H))return;let ie=_();if(y()&&ie!==t)return;let ce=m(t).filter(ee=>!((0,Lg.hasBlockSupport)(ee.name,"visibility",!0)&&ee.attributes?.metadata?.blockVisibility===!1));if(ce.length===0){n.batch(()=>{s({index:0,operation:"insert"}),C(t,0,{operation:"insert"})});return}let te=ce.map(ee=>{let re=ee.clientId;return{isUnmodifiedDefaultBlock:(0,Lg.isUnmodifiedDefaultBlock)(ee),getBoundingClientRect:()=>{let W=I.getElementById(`block-${re}`);return W?W.getBoundingClientRect():null},blockIndex:h(re),blockOrientation:f(re)?.orientation}}),ne=k1e(te,{x:T.clientX,y:T.clientY},f(t)?.orientation,{dropZoneElement:e,parentBlockClientId:o,parentBlockOrientation:o?f(o)?.orientation:void 0,rootBlockIndex:h(t)}),[Z,Y,J]=ne,K=te[Z]?.isUnmodifiedDefaultBlock;if(!(y()&&!K&&Y!=="insert")){if(Y==="group"){let ee=ce[Z],re=[ee.name,...G].every(xe=>xe==="core/image"),W=d("core/gallery",t),ae=v([ee.clientId,p()]),ge=c(u(),"block"),fe=ge&&ge.find(({name:xe})=>xe==="group-row");if(re&&!W&&(!ae||!fe)||!re&&(!ae||!fe))return}n.batch(()=>{s({index:Z,operation:Y,nearestSide:J});let ee=["before","after"].includes(Y)?o:t;C(ee,Z,{operation:Y,nearestSide:J})})}},[k,b,t,g,p,a,_,y,m,f,e,o,h,n,P,C,d,v,c,u]),200);return(0,_E.__experimentalUseDropZone)({dropZoneElement:e,isDisabled:r,onDrop:E,onDragOver(T){L(T,T.currentTarget.ownerDocument)},onDragLeave(T){let{ownerDocument:I}=T.currentTarget;tZ(T.relatedTarget,I)||tZ(T.target,I)||(L.cancel(),B())},onDragEnd(){L.cancel(),R(),B()}})}var rc=l(w(),1),v1e={};function y1e({children:e,clientId:t}){let o=Qq(t);return(0,rc.jsx)(W0,{value:o,children:e})}var _1e=(0,Ng.memo)(a_);function sZ(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;$q(t,_,o,r,n,i,s,a,u,m,g,k),qq(t,c,u,f);let C=(0,Vm.getBlockSupport)(v,"layout")||(0,Vm.getBlockSupport)(v,"__experimentalLayout")||v1e,{allowSizingOnChildren:B=!1}=C,P=k||C,R=(0,Ng.useMemo)(()=>({...S,...P,...B&&{allowSizingOnChildren:!0}}),[S,P,B]),E=(0,rc.jsx)(_1e,{rootClientId:t,renderAppender:p,__experimentalAppenderTagName:h,layout:R,wrapperRef:d,placeholder:b});return!y?.providesContext||Object.keys(y.providesContext).length===0?E:(0,rc.jsx)(y1e,{clientId:t,children:E})}function S1e(e){return W1(e),(0,rc.jsx)(sZ,{...e})}var xE=(0,Ng.forwardRef)((e,t)=>{let o=Fm({ref:t},e);return(0,rc.jsx)("div",{className:"block-editor-inner-blocks",children:(0,rc.jsx)("div",{...o})})});function Fm(e={},t={}){let{__unstableDisableLayoutClassNames:o,__unstableDisableDropZone:r,dropZoneElement:n}=t,{clientId:i,layout:s=null,__unstableLayoutClassNames:a=""}=Ie(),c=(0,iZ.useSelect)(_=>{let{getBlockName:S,isZoomOut:C,getTemplateLock:B,getBlockRootClientId:P,getBlockEditingMode:R,getBlockSettings:E,getSectionRootClientId:L}=F(_(x));if(!i){let G=L();return{isDropZoneDisabled:C()&&G!==""}}let{hasBlockSupport:T,getBlockType:I}=_(Vm.store),M=S(i),D=R(i),U=P(i),[j]=E(i,"layout"),H=D==="disabled";if(C()){let G=L();H=i!==G}return{__experimentalCaptureToolbars:T(M,"__experimentalExposeControlsToChildren",!1),name:M,blockType:I(M),parentLock:B(U),parentClientId:U,isDropZoneDisabled:H,defaultLayout:j}},[i]),{__experimentalCaptureToolbars:u,name:d,blockType:f,parentLock:m,parentClientId:h,isDropZoneDisabled:p,defaultLayout:g}=c,b=rZ({dropZoneElement:n,rootClientId:i,parentClientId:h}),k=(0,nZ.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?S1e:sZ;return{...e,ref:k,className:V(e.className,"block-editor-block-list__layout",o?"":a),children:i?(0,rc.jsx)(y,{...v,clientId:i}):(0,rc.jsx)(a_,{...t})}}Fm.save=Vm.__unstableGetInnerBlocksProps;xE.DefaultBlockAppender=jq;xE.ButtonBlockAppender=Fq;xE.Content=()=>Fm.save().children;var w_=xE;var C_=l(X(),1),Mg=l(z(),1),QV=l(Fe(),1),Lr=l(ct(),1);var aZ=l(w(),1),x1e=new Set([Lr.UP,Lr.RIGHT,Lr.DOWN,Lr.LEFT,Lr.ENTER,Lr.BACKSPACE]);function w1e(e){let{keyCode:t,shiftKey:o}=e;return!o&&x1e.has(t)}function B_(){let e=(0,Mg.useSelect)(o=>o(x).isTyping(),[]),{stopTyping:t}=(0,Mg.useDispatch)(x);return(0,C_.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 E_(){let e=(0,Mg.useSelect)(i=>i(x).isTyping(),[]),{startTyping:t,stopTyping:o}=(0,Mg.useDispatch)(x),r=B_(),n=(0,C_.useRefEffect)(i=>{if(e){let d=function(p){let{target:g}=p;h=i.ownerDocument.defaultView.setTimeout(()=>{(0,QV.isTextField)(g)||o()})},f=function(p){let{keyCode:g}=p;(g===Lr.ESCAPE||g===Lr.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,QV.isTextField)(m)||!i.contains(m)||f==="keydown"&&!w1e(d)||t()}return i.addEventListener("keypress",u),i.addEventListener("keydown",u),()=>{i.removeEventListener("keypress",u),i.removeEventListener("keydown",u)}},[e,t,o]);return(0,C_.useMergeRefs)([r,n])}function C1e({children:e}){return(0,aZ.jsx)("div",{ref:E_(),children:e})}var lZ=C1e;var T_=l(A(),1),cZ=l(X(),1),uZ=l(z(),1),dZ=l(O(),1),fZ=l(N(),1);var wE=l(w(),1);function JV({clientId:e,rootClientId:t="",position:o="top"}){let[r,n]=(0,dZ.useState)(!1),{sectionRootClientId:i,sectionClientIds:s,insertionPoint:a,blockInsertionPointVisible:c,blockInsertionPoint:u,blocksBeingDragged:d}=(0,uZ.useSelect)(S=>{let{getInsertionPoint:C,getBlockOrder:B,getSectionRootClientId:P,isBlockInsertionPointVisible:R,getBlockInsertionPoint:E,getDraggedBlockClientIds:L}=F(S(x)),T=P(),I=B(T);return{sectionRootClientId:T,sectionClientIds:I,insertionPoint:C(),blockInsertionPoint:E(),blockInsertionPointVisible:R(),blocksBeingDragged:L()}},[]),f=(0,cZ.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,wE.jsx)(T_.__unstableAnimatePresence,{children:m&&(0,wE.jsx)(T_.__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:V("block-editor-block-list__zoom-out-separator",{"is-dragged-over":r}),"data-is-insertion-point":"true",onDragOver:()=>n(!0),onDragLeave:()=>n(!1),children:(0,wE.jsx)(T_.__unstableMotion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0,transition:{delay:-.125}},transition:{ease:"linear",duration:.1,delay:.125},children:(0,fZ.__)("Drop pattern.")})})})}var Qr=l(w(),1),P1=(0,fd.createContext)();P1.displayName="IntersectionObserverContext";var CE=new WeakMap,B1e={trailing:!0};function E1e({className:e,...t}){let{isOutlineMode:o,isFocusMode:r,isPreviewMode:n,editedContentOnlySection:i}=(0,qi.useSelect)(f=>{let{getSettings:m,isTyping:h,hasBlockSpotlight:p,getEditedContentOnlySection:g}=F(f(x)),{outlineMode:b,focusMode:k,isPreviewMode:v}=m();return{isOutlineMode:b&&!h(),isFocusMode:k||p(),isPreviewMode:v,editedContentOnlySection:g()}},[]),s=(0,qi.useRegistry)(),{setBlockVisibility:a}=(0,qi.useDispatch)(x),c=(0,BE.useDebounce)((0,fd.useCallback)(()=>{let f={};CE.get(s).forEach(([m,h])=>{f[m]=h}),a(f)},[s]),300,B1e),u=(0,fd.useMemo)(()=>{let{IntersectionObserver:f}=window;if(f)return new f(m=>{CE.get(s)||CE.set(s,[]);for(let h of m){let p=h.target.getAttribute("data-block");CE.get(s).push([p,h.isIntersecting])}c()})},[]),d=Fm({ref:(0,BE.useMergeRefs)([Lm(),Lq(),E_()]),className:V("is-root-container",e,{"is-outline-mode":o,"is-focus-mode":r,"is-preview-mode":n})},t);return(0,Qr.jsxs)(P1.Provider,{value:u,children:[(0,Qr.jsx)("div",{...d}),!!i&&(0,Qr.jsx)(T1e,{clientId:i})]})}function T1e({clientId:e}){let{stopEditingContentOnlySection:t}=F((0,qi.useDispatch)(x)),o=(0,qi.useSelect)(r=>{let{isBlockSelected:n,hasSelectedInnerBlock:i,getBlockSelectionStart:s}=r(x);return!s()||n(e)||i(e,!0)},[e]);return(0,fd.useEffect)(()=>{o||t()},[o,t]),null}function dg(e){return(0,Qr.jsx)(j0,{value:uA,children:(0,Qr.jsx)(E1e,{...e})})}var I1e=[],P1e=new Set;function R1e({placeholder:e,rootClientId:t,renderAppender:o,__experimentalAppenderTagName:r,layout:n=kD}){let i=o!==!1,s=!!o,{order:a,isZoomOut:c,selectedBlocks:u,visibleBlocks:d,shouldRenderAppender:f}=(0,qi.useSelect)(m=>{let{getSettings:h,getBlockOrder:p,getSelectedBlockClientIds:g,__unstableGetVisibleBlocks:b,getTemplateLock:k,getBlockEditingMode:v,isSectionBlock:y,isContainerInsertableToInContentOnlyMode:_,getBlockName:S,isZoomOut:C,canInsertBlockType:B}=F(m(x)),P=p(t);if(h().isPreviewMode)return{order:P,selectedBlocks:I1e,visibleBlocks:P1e};let R=g(),E=R[0],L=!t&&!E&&(!P.length||!B((0,mZ.getDefaultBlockName)(),t)),T=!!(t&&E&&t===E),I=k(t);return{order:P,selectedBlocks:R,visibleBlocks:b(),isZoomOut:C(),shouldRenderAppender:(!y(t)||_(S(E),t))&&v(t)!=="disabled"&&(!I||I==="contentOnly")&&i&&!C()&&(s||T||L)}},[t,i,s]);return(0,Qr.jsxs)(k9,{value:n,children:[a.map(m=>(0,Qr.jsxs)(qi.AsyncModeProvider,{value:!d.has(m)&&!u.includes(m),children:[c&&(0,Qr.jsx)(JV,{clientId:m,rootClientId:t,position:"top"}),(0,Qr.jsx)(yG,{rootClientId:t,clientId:m}),c&&(0,Qr.jsx)(JV,{clientId:m,rootClientId:t,position:"bottom"})]},m)),a.length<1&&e,f&&(0,Qr.jsx)(gq,{tagName:r,rootClientId:t,CustomAppender:o})]})}function a_(e){return(0,Qr.jsx)(qi.AsyncModeProvider,{value:!1,children:(0,Qr.jsx)(R1e,{...e})})}var lb=l(z(),1),K3=l(Fe(),1),Y3=l(A(),1),eee=l(Ds(),1),ZT=l(O(),1),cb=l($(),1),q3=l(er(),1),ub=l(N(),1);var jZ=l(X(),1),UZ=l(z(),1),HZ=l(Fe(),1),Na=l(O(),1);var ti=l(N(),1),jm=l($(),1),NE=l(A(),1),NZ=l(X(),1),MZ=l(z(),1),ME=l(O(),1);var P_=l(A(),1),kZ=l(_y(),1),vZ=l(Pe(),1),RE=l(O(),1);var Nr=l(A(),1),pZ=(0,Nr.createSlotFill)("InspectorControls"),O1e=(0,Nr.createSlotFill)("InspectorAdvancedControls"),A1e=(0,Nr.createSlotFill)("InspectorControlsBindings"),L1e=(0,Nr.createSlotFill)("InspectorControlsBackground"),N1e=(0,Nr.createSlotFill)("InspectorControlsBorder"),M1e=(0,Nr.createSlotFill)("InspectorControlsColor"),D1e=(0,Nr.createSlotFill)("InspectorControlsFilter"),V1e=(0,Nr.createSlotFill)("InspectorControlsDimensions"),F1e=(0,Nr.createSlotFill)("InspectorControlsPosition"),z1e=(0,Nr.createSlotFill)("InspectorControlsTypography"),j1e=(0,Nr.createSlotFill)("InspectorControlsListView"),U1e=(0,Nr.createSlotFill)("InspectorControlsStyles"),H1e=(0,Nr.createSlotFill)("InspectorControlsEffects"),G1e=(0,Nr.createSlotFill)("InspectorControlsContent"),W1e={default:pZ,advanced:O1e,background:L1e,bindings:A1e,border:N1e,color:M1e,content:G1e,dimensions:V1e,effects:H1e,filter:D1e,list:j1e,position:F1e,settings:pZ,styles:U1e,typography:z1e},Zi=W1e,I_=(0,Nr.createSlotFill)(Symbol("PrivateInspectorControlsAllowedBlocks"));var Dg=l(A(),1),TE=l(O(),1),hZ=l(X(),1),IE=l(z(),1);var EE=l(w(),1),gZ=Symbol("ListViewContentPopover"),{Fill:bZ,Slot:$1e}=(0,Dg.createSlotFill)(gZ);function K1e(){return(0,hZ.useViewportMatch)("medium","<")?{}:{popoverProps:{placement:"left-start",offset:35,resize:!1}}}function PE({listViewRef:e}){let{popoverProps:t}=K1e(),o=(0,Dg.__experimentalUseSlotFills)(gZ),r=!!(o&&o.length),{selectedClientId:n,isOpen:i}=(0,IE.useSelect)(u=>{let{getSelectedBlockClientId:d}=u(x),f=F(u(x));return{selectedClientId:d(),isOpen:f.isListViewContentPanelOpen()}},[]),[s,a]=(0,TE.useState)(null);(0,TE.useLayoutEffect)(()=>{if(!n||!e?.current){a(null);return}let u=e.current.querySelector(`[data-block="${n}"]`);a(u)},[n,e]);let{closeListViewContentPanel:c}=F((0,IE.useDispatch)(x));return!i||!r||!s?null:(0,EE.jsx)(Dg.Popover,{...t??{},className:"block-editor-inspector-list-view-content-popover",anchor:s,onClose:c,children:(0,EE.jsx)("div",{style:{width:"280px"},children:(0,EE.jsx)($1e,{})})})}var md=l(w(),1),Y1e=["content","list"],q1e=["default","settings","advanced"];function zm({children:e,group:t="default",__experimentalGroup:o,resetAllFilter:r}){o&&((0,vZ.default)("`__experimentalGroup` property in `InspectorControlsFill`",{since:"6.2",version:"6.4",alternative:"`group`"}),t=o);let n=Ie(),i=Zi[t]?.Fill;if(!i)return(0,kZ.default)(`Unknown InspectorControls group "${t}" provided.`),null;if(n[nu]){let s=n.name==="core/template-part",a=q1e.includes(t),c=Y1e.includes(t);if(!(s&&a||c))return null}return!n[nu]&&!n[ws]?null:t==="content"&&n[fv]&&n[nu]?n[ws]?(0,md.jsx)(P_.__experimentalStyleProvider,{document,children:(0,md.jsx)(bZ,{children:e})}):null:(0,md.jsx)(P_.__experimentalStyleProvider,{document,children:(0,md.jsx)(i,{children:s=>(0,md.jsx)(X1e,{fillProps:s,children:e,resetAllFilter:r})})})}function Z1e({resetAllFilter:e,children:t}){let{registerResetAllFilter:o,deregisterResetAllFilter:r}=(0,RE.useContext)(P_.__experimentalToolsPanelContext);return(0,RE.useEffect)(()=>{if(e&&o&&r)return o(e),()=>{r(e)}},[e,o,r]),t}function X1e({children:e,resetAllFilter:t,fillProps:o}){let{forwardedContext:r=[]}=o,n=(0,md.jsx)(Z1e,{resetAllFilter:t,children:e});return r.reduce((i,[s,a])=>(0,md.jsx)(s,{...a,children:i}),n)}var EZ=l(A(),1),TZ=l(O(),1),IZ=l(_y(),1),PZ=l(Pe(),1);var _Z=l(A(),1),OE=l(z(),1),SZ=l(O(),1);var yZ=l(X(),1);function No(){return(0,yZ.useViewportMatch)("medium","<")?{}:{popoverProps:{placement:"left-start",offset:259}}}function Vg(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 xZ=l(w(),1);function wZ({children:e,group:t,label:o}){let{updateBlockAttributes:r}=(0,OE.useDispatch)(x),{getBlockAttributes:n,getMultiSelectedBlockClientIds:i,getSelectedBlockClientId:s,hasMultiSelection:a}=(0,OE.useSelect)(x),c=No(),u=s(),d=(0,SZ.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:Ae(b.style)},m[p]=b}),r(h,m,!0)},[n,i,a,u,r]);return(0,xZ.jsx)(_Z.__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 e3=l(A(),1),AE=l(O(),1),CZ=l(w(),1);function BZ({Slot:e,fillProps:t,...o}){let r=(0,AE.useContext)(e3.__experimentalToolsPanelContext),n=(0,AE.useMemo)(()=>({...t??{},forwardedContext:[...t?.forwardedContext??[],[e3.__experimentalToolsPanelContext.Provider,{value:r}]]}),[r,t]);return(0,CZ.jsx)(e,{...o,fillProps:n,bubblesVirtually:!0})}var LE=l(w(),1);function Q1e({__experimentalGroup:e,group:t="default",label:o,fillProps:r,...n},i){e&&((0,PZ.default)("`__experimentalGroup` property in `InspectorControlsSlot`",{since:"6.2",version:"6.4",alternative:"`group`"}),t=e);let s=Zi[t],a=(0,EZ.__experimentalUseSlotFills)(s?.name);if(!s)return(0,IZ.default)(`Unknown InspectorControls group "${t}" provided.`),null;if(!a?.length)return null;let{Slot:c}=s;return o?(0,LE.jsx)(wZ,{group:t,label:o,children:(0,LE.jsx)(BZ,{...n,fillProps:r,Slot:c})}):(0,LE.jsx)(c,{...n,ref:i,fillProps:r,bubblesVirtually:!0})}var t3=(0,TZ.forwardRef)(Q1e);var o3=l(w(),1),RZ=zm;RZ.Slot=t3;var pd=e=>(0,o3.jsx)(zm,{...e,group:"advanced"});pd.Slot=function(t){return(0,o3.jsx)(t3,{...t,group:"advanced"})};pd.slotName="InspectorAdvancedControls";var pe=RZ;var AZ=l(z(),1),hd=l($(),1),R_=l(N(),1);function OZ(e){let t=e?.style?.position?.type;return t==="sticky"?(0,R_.__)("Sticky"):t==="fixed"?(0,R_.__)("Fixed"):null}function It(e){return(0,AZ.useSelect)(t=>{if(!e)return null;let{getBlockName:o,getBlockAttributes:r,__experimentalGetParsedPattern:n}=t(x),{getBlockType:i,getActiveBlockVariation:s}=t(hd.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=OZ(u);return{isSynced:!1,title:(0,R_.__)("Pattern"),icon:Ri,description:k?.description||(0,R_.__)("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,hd.isReusableBlock)(c)||(0,hd.isTemplatePart)(c),p=(m?(0,hd.__experimentalGetBlockLabel)(c,u):void 0)||c.title,g=OZ(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 O_=l(w(),1),A_="position",r3={key:"default",value:"",name:(0,ti.__)("Default")},n3={key:"sticky",value:"sticky",name:(0,ti._x)("Sticky","Name for the value of the CSS position property"),hint:(0,ti.__)("The block will stick to the top of the window instead of scrolling.")},LZ={key:"fixed",value:"fixed",name:(0,ti._x)("Fixed","Name for the value of the CSS position property"),hint:(0,ti.__)("The block will not move when the page is scrolled.")},J1e=["top","right","bottom","left"],eBe=["sticky","fixed"];function tBe({selector:e,style:t}){let o="",{type:r}=t?.position||{};return eBe.includes(r)&&(o+=`${e} {`,o+=`position: ${r};`,J1e.forEach(n=>{t?.position?.[n]!==void 0&&(o+=`${n}: ${t.position[n]};`)}),(r==="sticky"||r==="fixed")&&(o+="z-index: 10"),o+="}"),o}function oBe(e){let t=(0,jm.getBlockSupport)(e,A_);return!!(t===!0||t?.sticky)}function rBe(e){let t=(0,jm.getBlockSupport)(e,A_);return!!(t===!0||t?.fixed)}function nBe(e){return!!(0,jm.getBlockSupport)(e,A_)}function DZ(e){let t=e?.style?.position?.type;return t==="sticky"||t==="fixed"}function VZ({name:e}={}){let[t,o]=he("position.fixed","position.sticky"),r=!t&&!o;return!nBe(e)||r}function iBe({style:e={},clientId:t,name:o,setAttributes:r}){let n=rBe(o),i=oBe(o),s=e?.position?.type,{firstParentClientId:a}=(0,MZ.useSelect)(h=>{let{getBlockParents:p}=h(x),g=p(t);return{firstParentClientId:g[g.length-1]}},[t]),c=It(a),u=i&&s===n3.value&&c?(0,ti.sprintf)((0,ti.__)("The block will stick to the scrollable area of the parent %s block."),c.title):null,d=(0,ME.useMemo)(()=>{let h=[r3];return(i||s===n3.value)&&h.push(n3),(n||s===LZ.value)&&h.push(LZ),h},[n,i,s]),f=h=>{let g={...e,position:{...e?.position,type:h,top:h==="sticky"||h==="fixed"?"0px":void 0}};r({style:Ae(g)})},m=s&&d.find(h=>h.value===s)||r3;return ME.Platform.select({web:d.length>1?(0,O_.jsx)(pe,{group:"position",children:(0,O_.jsx)(NE.BaseControl,{help:u,children:(0,O_.jsx)(NE.CustomSelectControl,{__next40pxDefaultSize:!0,label:(0,ti.__)("Position"),hideLabelFromVision:!0,describedBy:(0,ti.sprintf)((0,ti.__)("Currently selected position: %s"),m.name),options:d,value:m,onChange:({selectedItem:h})=>{f(h.value)},size:"__unstable-large"})})}):null,native:null})}var i3={edit:function(t){return VZ(t)?null:(0,O_.jsx)(iBe,{...t})},useBlockProps:aBe,attributeKeys:["style"],hasSupport(e){return(0,jm.hasBlockSupport)(e,A_)}},sBe={};function aBe({name:e,style:t}){let o=(0,jm.hasBlockSupport)(e,A_),r=VZ({name:e}),n=o&&!r,i=(0,NZ.useInstanceId)(sBe),s=`.wp-container-${i}.wp-container-${i}`,a;n&&(a=tBe({selector:s,style:t})||"");let c=V({[`wp-container-${i}`]:n&&!!a,[`is-position-${t?.position?.type}`]:n&&!!a&&!!t?.position?.type});return oi({css:a}),{className:c}}var GZ={placement:"top-start"},FZ={...GZ,flip:!1,shift:!0},lBe={...GZ,flip:!0,shift:!1};function zZ(e,t,o,r,n){if(!e||!t)return FZ;let i=o?.scrollTop||0,s=Uh(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)?FZ:lBe}function DE({contentElement:e,clientId:t}){let o=tt(t),[r,n]=(0,Na.useState)(0),{blockIndex:i,isSticky:s}=(0,UZ.useSelect)(m=>{let{getBlockIndex:h,getBlockAttributes:p}=m(x);return{blockIndex:h(t),isSticky:DZ(p(t))}},[t]),a=(0,Na.useMemo)(()=>{if(e)return(0,HZ.getScrollContainer)(e)},[e]),[c,u]=(0,Na.useState)(()=>zZ(e,o,a,r,s)),d=(0,jZ.useRefEffect)(m=>{n(m.offsetHeight)},[]),f=(0,Na.useCallback)(()=>u(zZ(e,o,a,r,s)),[e,o,a,r]);return(0,Na.useLayoutEffect)(f,[i,f]),(0,Na.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 WZ=l(z(),1);function VE(e){return(0,WZ.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 FE=l(w(),1);function $Z({clientId:e,__unstableContentRef:t}){let{capturingClientId:o,isInsertionPointVisible:r,lastClientId:n,rootClientId:i}=VE(e),s=DE({contentElement:t?.current,clientId:e});return(0,FE.jsx)(Yi,{clientId:o||e,bottomClientId:n,className:V("block-editor-block-list__block-side-inserter-popover",{"is-insertion-point-visible":r}),__unstableContentRef:t,...s,children:(0,FE.jsx)("div",{className:"block-editor-block-list__empty-block-inserter",children:(0,FE.jsx)(Ki,{position:"bottom right",rootClientId:i,clientId:e,__experimentalIsQuick:!0})})})}var HJ=l(z(),1),ab=l(O(),1),GJ=l(Ds(),1);var VJ=l(N(),1),FJ=l(z(),1),H3=l(O(),1),zJ=l(X(),1),pc=l($(),1),jJ=l(A(),1);var Um=l(A(),1),rX=l(z(),1),nX=l(N(),1);var XZ=l($(),1),QZ=l(A(),1),L_=l(z(),1),N_=l(O(),1),JZ=l(X(),1);var YZ=l(Fe(),1),Ma=l(O(),1),zE=50,qZ=25,cBe=1e3,KZ=cBe*(qZ/1e3);function ZZ(){let e=(0,Ma.useRef)(null),t=(0,Ma.useRef)(null),o=(0,Ma.useRef)(null),r=(0,Ma.useRef)(null);(0,Ma.useEffect)(()=>()=>{r.current&&(clearInterval(r.current),r.current=null)},[]);let n=(0,Ma.useCallback)(a=>{e.current=a.clientY,o.current=(0,YZ.getScrollContainer)(a.target),r.current=setInterval(()=>{if(o.current&&t.current){let c=o.current.scrollTop+t.current;o.current.scroll({top:c})}},qZ)},[]),i=(0,Ma.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-zE,0),m=Math.max(d-u-zE,0),h=f===0||m===0?0:m/f;t.current=KZ*h}else if(a.clientY<u){let f=Math.max(u-zE,0),m=Math.max(u-d-zE,0),h=f===0||m===0?0:m/f;t.current=-KZ*h}else t.current=0},[]);return[n,i,()=>{e.current=null,o.current=null,r.current&&(clearInterval(r.current),r.current=null)}]}var s3=l(w(),1),uBe=({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,L_.useSelect)(E=>{let{canMoveBlocks:L,getBlockRootClientId:T,getBlockName:I,getBlockAttributes:M,isBlockInsertionPointVisible:D}=E(x),{getBlockType:U,getActiveBlockVariation:j}=E(XZ.store),H=T(o[0]),G=I(o[0]),Q=j(G,M(o[0]));return{srcRootClientId:H,isDraggable:L(o),icon:Q?.icon||U(G)?.icon,visibleInserter:D(),getBlockType:U}},[o]),p=(0,N_.useRef)(!1),[g,b,k]=ZZ(),{getAllowedBlocks:v,getBlockNamesByClientId:y,getBlockRootClientId:_}=(0,L_.useSelect)(x),{startDraggingBlocks:S,stopDraggingBlocks:C}=(0,L_.useDispatch)(x);(0,N_.useEffect)(()=>()=>{p.current&&C()},[]);let P=tt(o[0])?.closest("body");return(0,N_.useEffect)(()=>{if(!P||!a)return;let L=(0,JZ.throttle)(T=>{if(!T.target.closest("[data-block]"))return;let I=y(o),M=T.target.closest("[data-block]").getAttribute("data-block"),D=v(M),U=y([M])[0],j;if(D?.length===0){let H=_(M),G=y([H])[0],Q=v(H);j=SE(h,Q,I,G)}else j=SE(h,D,I,U);!j&&!m?window?.document?.body?.classList?.add("block-draggable-invalid-drag-token"):window?.document?.body?.classList?.remove("block-draggable-invalid-drag-token")},200);return P.addEventListener("dragover",L),()=>{P.removeEventListener("dragover",L)}},[o,P,a,v,y,_,h,m]),d?(0,s3.jsx)(QZ.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,s3.jsx)(IB,{count:o.length,icon:f,fadeWhenDisabled:!0}),elementId:n,children:({onDraggableStart:E,onDraggableEnd:L})=>t({draggable:!0,onDragStart:E,onDragEnd:L})}):t({draggable:!1})},jE=uBe;var tX=l($(),1),UE=l(A(),1),oX=l(X(),1),HE=l(z(),1),GE=l(O(),1),Xi=l(N(),1);var ve=l(N(),1),gd=(e,t)=>e==="up"?t==="horizontal"?(0,ve.isRTL)()?"right":"left":"up":e==="down"?t==="horizontal"?(0,ve.isRTL)()?"left":"right":"down":null;function eX(e,t,o,r,n,i,s){let a=o+1;if(e>1)return dBe(e,o,r,n,i,s);if(r&&n)return(0,ve.sprintf)((0,ve.__)("Block %s is the only block, and cannot be moved"),t);if(i>0&&!n){let c=gd("down",s);if(c==="down")return(0,ve.sprintf)((0,ve.__)("Move %1$s block from position %2$d down to position %3$d"),t,a,a+1);if(c==="left")return(0,ve.sprintf)((0,ve.__)("Move %1$s block from position %2$d left to position %3$d"),t,a,a+1);if(c==="right")return(0,ve.sprintf)((0,ve.__)("Move %1$s block from position %2$d right to position %3$d"),t,a,a+1)}if(i>0&&n){let c=gd("down",s);if(c==="down")return(0,ve.sprintf)((0,ve.__)("Block %1$s is at the end of the content and can\u2019t be moved down"),t);if(c==="left")return(0,ve.sprintf)((0,ve.__)("Block %1$s is at the end of the content and can\u2019t be moved left"),t);if(c==="right")return(0,ve.sprintf)((0,ve.__)("Block %1$s is at the end of the content and can\u2019t be moved right"),t)}if(i<0&&!r){let c=gd("up",s);if(c==="up")return(0,ve.sprintf)((0,ve.__)("Move %1$s block from position %2$d up to position %3$d"),t,a,a-1);if(c==="left")return(0,ve.sprintf)((0,ve.__)("Move %1$s block from position %2$d left to position %3$d"),t,a,a-1);if(c==="right")return(0,ve.sprintf)((0,ve.__)("Move %1$s block from position %2$d right to position %3$d"),t,a,a-1)}if(i<0&&r){let c=gd("up",s);if(c==="up")return(0,ve.sprintf)((0,ve.__)("Block %1$s is at the beginning of the content and can\u2019t be moved up"),t);if(c==="left")return(0,ve.sprintf)((0,ve.__)("Block %1$s is at the beginning of the content and can\u2019t be moved left"),t);if(c==="right")return(0,ve.sprintf)((0,ve.__)("Block %1$s is at the beginning of the content and can\u2019t be moved right"),t)}}function dBe(e,t,o,r,n,i){let s=t+1;if(o&&r)return(0,ve.__)("All blocks are selected, and cannot be moved");if(n>0&&!r){let a=gd("down",i);if(a==="down")return(0,ve.sprintf)((0,ve.__)("Move %1$d blocks from position %2$d down by one place"),e,s);if(a==="left")return(0,ve.sprintf)((0,ve.__)("Move %1$d blocks from position %2$d left by one place"),e,s);if(a==="right")return(0,ve.sprintf)((0,ve.__)("Move %1$d blocks from position %2$d right by one place"),e,s)}if(n>0&&r){let a=gd("down",i);if(a==="down")return(0,ve.__)("Blocks cannot be moved down as they are already at the bottom");if(a==="left")return(0,ve.__)("Blocks cannot be moved left as they are already are at the leftmost position");if(a==="right")return(0,ve.__)("Blocks cannot be moved right as they are already are at the rightmost position")}if(n<0&&!o){let a=gd("up",i);if(a==="up")return(0,ve.sprintf)((0,ve.__)("Move %1$d blocks from position %2$d up by one place"),e,s);if(a==="left")return(0,ve.sprintf)((0,ve.__)("Move %1$d blocks from position %2$d left by one place"),e,s);if(a==="right")return(0,ve.sprintf)((0,ve.__)("Move %1$d blocks from position %2$d right by one place"),e,s)}if(n<0&&o){let a=gd("up",i);if(a==="up")return(0,ve.__)("Blocks cannot be moved up as they are already at the top");if(a==="left")return(0,ve.__)("Blocks cannot be moved left as they are already are at the leftmost position");if(a==="right")return(0,ve.__)("Blocks cannot be moved right as they are already are at the rightmost position")}}var nc=l(w(),1),fBe=(e,t)=>e==="up"?t==="horizontal"?(0,Xi.isRTL)()?Uo:Gr:Uf:e==="down"?t==="horizontal"?(0,Xi.isRTL)()?Gr:Uo:hr:null,mBe=(e,t)=>e==="up"?t==="horizontal"?(0,Xi.isRTL)()?(0,Xi.__)("Move right"):(0,Xi.__)("Move left"):(0,Xi.__)("Move up"):e==="down"?t==="horizontal"?(0,Xi.isRTL)()?(0,Xi.__)("Move left"):(0,Xi.__)("Move right"):(0,Xi.__)("Move down"):null,a3=(0,GE.forwardRef)(({clientIds:e,direction:t,orientation:o,...r},n)=>{let i=(0,oX.useInstanceId)(a3),s=Array.isArray(e)?e:[e],a=s.length,{disabled:c}=r,{blockType:u,isDisabled:d,rootClientId:f,isFirst:m,isLast:h,firstIndex:p,orientation:g="vertical"}=(0,HE.useSelect)(S=>{let{getBlockIndex:C,getBlockRootClientId:B,getBlockOrder:P,getBlock:R,getBlockListSettings:E}=S(x),L=s[0],T=B(L),I=C(L),M=C(s[s.length-1]),D=P(T),U=R(L),j=I===0,H=M===D.length-1,{orientation:G}=E(T)||{};return{blockType:U?(0,tX.getBlockType)(U.name):null,isDisabled:c||(t==="up"?j:H),rootClientId:T,firstIndex:I,isFirst:j,isLast:H,orientation:o||G}},[e,t]),{moveBlocksDown:b,moveBlocksUp:k}=(0,HE.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,nc.jsxs)(nc.Fragment,{children:[(0,nc.jsx)(UE.Button,{__next40pxDefaultSize:!0,ref:n,className:V("block-editor-block-mover-button",`is-${t}-button`),icon:fBe(t,g),label:mBe(t,g),"aria-describedby":_,...r,onClick:d?null:y,disabled:d,accessibleWhenDisabled:!0}),(0,nc.jsx)(UE.VisuallyHidden,{id:_,children:eX(a,u&&u.title,p,m,h,t==="up"?-1:1,g)})]})}),WE=(0,GE.forwardRef)((e,t)=>(0,nc.jsx)(a3,{direction:"up",ref:t,...e})),$E=(0,GE.forwardRef)((e,t)=>(0,nc.jsx)(a3,{direction:"down",ref:t,...e}));var Da=l(w(),1);function pBe({clientIds:e,hideDragHandle:t,isBlockMoverUpButtonDisabled:o,isBlockMoverDownButtonDisabled:r}){let{canMove:n,rootClientId:i,isFirst:s,isLast:a,orientation:c,isManualGrid:u}=(0,rX.useSelect)(d=>{let{getBlockIndex:f,getBlockListSettings:m,canMoveBlocks:h,getBlockOrder:p,getBlockRootClientId:g,getBlockAttributes:b}=d(x),k=Array.isArray(e)?e:[e],v=k[0],y=g(v),_=f(v),S=f(k[k.length-1]),C=p(y),{layout:B={}}=b(y)??{};return{canMove:h(e),rootClientId:y,isFirst:_===0,isLast:S===C.length-1,orientation:m(y)?.orientation,isManualGrid:B.type==="grid"&&B.isManualPlacement&&window.__experimentalEnableGridInteractivity}},[e]);return!n||s&&a&&!i||t&&u?null:(0,Da.jsxs)(Um.ToolbarGroup,{className:V("block-editor-block-mover",{"is-horizontal":c==="horizontal"}),children:[!t&&(0,Da.jsx)(jE,{clientIds:e,fadeWhenDisabled:!0,children:d=>(0,Da.jsx)(Um.Button,{__next40pxDefaultSize:!0,icon:wv,className:"block-editor-block-mover__drag-handle",label:(0,nX.__)("Drag"),tabIndex:"-1",...d})}),!u&&(0,Da.jsxs)("div",{className:"block-editor-block-mover__move-button-container",children:[(0,Da.jsx)(Um.ToolbarItem,{children:d=>(0,Da.jsx)(WE,{disabled:o,clientIds:e,...d})}),(0,Da.jsx)(Um.ToolbarItem,{children:d=>(0,Da.jsx)($E,{disabled:r,clientIds:e,...d})})]})]})}var KE=pBe;var aX=l(A(),1),qE=l(z(),1),ZE=l(N(),1),lX=l(O(),1);var M_=l(z(),1),bd=l(O(),1);var{clearTimeout:iX,setTimeout:hBe}=window,sX=200;function gBe({ref:e,isFocused:t,highlightParent:o,debounceTimeout:r=sX}){let{getSelectedBlockClientId:n,getBlockRootClientId:i}=(0,M_.useSelect)(x),{toggleBlockHighlight:s}=(0,M_.useDispatch)(x),a=(0,bd.useRef)(),c=(0,M_.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&&iX&&iX(g)},h=g=>{g&&g.stopPropagation(),m(),u(!0)},p=g=>{g&&g.stopPropagation(),m(),a.current=hBe(()=>{f()&&u(!1)},r)};return(0,bd.useEffect)(()=>()=>{u(!1),m()},[]),{debouncedShowGestures:h,debouncedHideGestures:p}}function Fg({ref:e,highlightParent:t=!1,debounceTimeout:o=sX}){let[r,n]=(0,bd.useState)(!1),{debouncedShowGestures:i,debouncedHideGestures:s}=gBe({ref:e,debounceTimeout:o,isFocused:r,highlightParent:t}),a=(0,bd.useRef)(!1),c=()=>e?.current&&e.current.contains(e.current.ownerDocument.activeElement);return(0,bd.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 YE=l(w(),1);function cX(){let{selectBlock:e}=(0,qE.useDispatch)(x),{parentClientId:t}=(0,qE.useSelect)(i=>{let{getBlockParents:s,getSelectedBlockClientId:a,getParentSectionBlock:c}=F(i(x)),u=a(),d=c(u),f=s(u);return{parentClientId:d??f[f.length-1]}},[]),o=It(t),r=(0,lX.useRef)(),n=Fg({ref:r,highlightParent:!0});return(0,YE.jsx)("div",{className:"block-editor-block-parent-selector",ref:r,...n,children:(0,YE.jsx)(aX.ToolbarButton,{className:"block-editor-block-parent-selector__button",onClick:()=>e(t),label:(0,ZE.sprintf)((0,ZE.__)("Select parent block: %s"),o?.title),showTooltip:!0,icon:(0,YE.jsx)(Oe,{icon:o?.icon})})},t)}var XE=l(A(),1);var zg=l(A(),1),bBe=(0,zg.createSlotFill)("BlockControls"),kBe=(0,zg.createSlotFill)("BlockControlsBlock"),vBe=(0,zg.createSlotFill)("BlockFormatControls"),yBe=(0,zg.createSlotFill)("BlockControlsOther"),_Be=(0,zg.createSlotFill)("BlockControlsParent"),SBe={default:bBe,block:kBe,inline:vBe,other:yBe,parent:_Be},D_=SBe;function uX(e,t){let o=Ie();return o[ws]?D_[e]?.Fill:o[Qp]&&t?D_.parent.Fill:null}var ic=l(w(),1);function l3({group:e="default",controls:t,children:o,__experimentalShareWithChildBlocks:r=!1}){let n=uX(e,r);if(!n)return null;let i=(0,ic.jsxs)(ic.Fragment,{children:[e==="default"&&(0,ic.jsx)(XE.ToolbarGroup,{controls:t}),o]});return(0,ic.jsx)(XE.__experimentalStyleProvider,{document,children:(0,ic.jsx)(n,{children:s=>{let{forwardedContext:a=[]}=s;return a.reduce((c,[u,d])=>(0,ic.jsx)(u,{...d,children:c}),i)}})})}var V_=l(O(),1),sc=l(A(),1),fX=l(_y(),1);var c3=l(w(),1),{ComponentsContext:dX}=F(sc.privateApis);function u3({group:e="default",...t}){let o=(0,V_.useContext)(sc.__experimentalToolbarContext),r=(0,V_.useContext)(dX),n=(0,V_.useMemo)(()=>({forwardedContext:[[sc.__experimentalToolbarContext.Provider,{value:o}],[dX.Provider,{value:r}]]}),[o,r]),i=D_[e],s=(0,sc.__experimentalUseSlotFills)(i.name);if(!i)return(0,fX.default)(`Unknown BlockControls group "${e}" provided.`),null;if(!s?.length)return null;let{Slot:a}=i,c=(0,c3.jsx)(a,{...t,bubblesVirtually:!0,fillProps:n});return e==="default"?c:(0,c3.jsx)(sc.ToolbarGroup,{children:c})}var d3=l(w(),1),mX=l3;mX.Slot=u3;var f3=e=>(0,d3.jsx)(l3,{group:"inline",...e});f3.Slot=function(t){return(0,d3.jsx)(u3,{group:"inline",...t})};var Dt=mX;var pX=l(A(),1),{Fill:hX,Slot:xBe}=(0,pX.createSlotFill)("__unstableBlockToolbarLastItem");hX.Slot=xBe;var QE=hX;var kT=l(A(),1);var Wg=l($(),1),Jr=l(A(),1),yd=l(z(),1);var gT=l(O(),1),Ji=l(N(),1),bQ=l(Ds(),1),cc=l(X(),1);var Ug=l(z(),1),kd=l($(),1);var OX=l(O(),1),z_=l($(),1),F_=l(z(),1),AX=l(Li(),1),ac=l(N(),1);var ri=l($(),1),gX=l(O(),1),wBe="align";var bX="__experimentalBorder",JE="color",CBe="customClassName",kX="typography.__experimentalFontFamily",vX="typography.fontSize",BBe="typography.lineHeight",EBe="typography.__experimentalFontStyle",TBe="typography.__experimentalFontWeight",yX="typography.textAlign",IBe="typography.textColumns",PBe="typography.__experimentalTextDecoration",RBe="typography.__experimentalWritingMode",OBe="typography.__experimentalTextTransform",ABe="typography.__experimentalLetterSpacing",LBe="layout",NBe=[BBe,vX,EBe,TBe,kX,yX,IBe,PBe,OBe,RBe,ABe],MBe=["shadow"],DBe="spacing",VBe=[...MBe,...NBe,bX,JE,DBe],_X=e=>(0,ri.hasBlockSupport)(e,wBe);function SX(e,t="any"){if(gX.Platform.OS!=="web")return!1;let o=(0,ri.getBlockSupport)(e,bX);return o===!0?!0:t==="any"?!!(o?.color||o?.radius||o?.width||o?.style):!!o?.[t]}var xX=e=>{let t=(0,ri.getBlockSupport)(e,JE);return t!==null&&typeof t=="object"&&!!t.gradients},wX=e=>{let t=(0,ri.getBlockSupport)(e,JE);return t&&t.background!==!1},CX=e=>(0,ri.hasBlockSupport)(e,yX);var BX=e=>{let t=(0,ri.getBlockSupport)(e,JE);return t&&t.text!==!1};var EX=e=>(0,ri.hasBlockSupport)(e,CBe,!0);var TX=e=>(0,ri.hasBlockSupport)(e,kX);var IX=e=>(0,ri.hasBlockSupport)(e,vX);var PX=e=>(0,ri.hasBlockSupport)(e,LBe);var RX=e=>VBe.some(t=>(0,ri.hasBlockSupport)(e,t));function FBe(e){try{let t=(0,z_.parse)(e,{__unstableSkipMigrationLogs:!0,__unstableSkipAutop:!0});return!(t.length===1&&t[0].name==="core/freeform")}catch{return!1}}var zBe={align:_X,borderColor:e=>SX(e,"color"),backgroundColor:wX,textAlign:CX,textColor:BX,gradient:xX,className:EX,fontFamily:TX,fontSize:IX,layout:PX,style:RX};function jBe(e,t){return Object.entries(zBe).reduce((o,[r,n])=>(n(e.name)&&n(t.name)&&(o[r]=e.attributes[r]),o),{})}function m3(e,t,o){for(let r=0;r<Math.min(t.length,e.length);r+=1)o(e[r].clientId,jBe(t[r],e[r])),m3(e[r].innerBlocks,t[r].innerBlocks,o)}function jg(){let e=(0,F_.useRegistry)(),{updateBlockAttributes:t}=(0,F_.useDispatch)(x),{createSuccessNotice:o,createWarningNotice:r,createErrorNotice:n}=(0,F_.useDispatch)(AX.store);return(0,OX.useCallback)(async i=>{let s="";try{if(!window.navigator.clipboard){n((0,ac.__)("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,ac.__)("Unable to paste styles. Please allow browser clipboard permissions before continuing."),{type:"snackbar"});return}if(!s||!FBe(s)){r((0,ac.__)("Unable to paste styles. Block styles couldn't be found within the copied content."),{type:"snackbar"});return}let a=(0,z_.parse)(s);if(a.length===1?e.batch(()=>{m3(i,i.map(()=>a[0]),t)}):e.batch(()=>{m3(i,a,t)}),i.length===1){let c=(0,z_.getBlockType)(i[0].name)?.title;o((0,ac.sprintf)((0,ac.__)("Pasted styles to %s."),c),{type:"snackbar"})}else o((0,ac.sprintf)((0,ac.__)("Pasted styles to %d blocks."),i.length),{type:"snackbar"})},[e.batch,t,o,r,n])}function LX({clientIds:e,children:t,__experimentalUpdateSelection:o}){let{getDefaultBlockName:r,getGroupingBlockName:n}=(0,Ug.useSelect)(kd.store),i=(0,Ug.useSelect)(y=>{let{canInsertBlockType:_,getBlockRootClientId:S,getBlocksByClientId:C,getDirectInsertBlock:B,canRemoveBlocks:P}=y(x),R=C(e),E=S(e[0]),L=_(r(),E),T=E?B(E):null;return{canRemove:P(e),canInsertBlock:R.every(I=>(L||!!T)&&_(I.name,E)),canCopyStyles:R.every(I=>!!I&&((0,kd.hasBlockSupport)(I.name,"color")||(0,kd.hasBlockSupport)(I.name,"typography"))),canDuplicate:R.every(I=>!!I&&(0,kd.hasBlockSupport)(I.name,"multiple",!0)&&_(I.name,E))}},[e,r]),{getBlocksByClientId:s,getBlocks:a}=(0,Ug.useSelect)(x),{canRemove:c,canInsertBlock:u,canCopyStyles:d,canDuplicate:f}=i,{removeBlocks:m,replaceBlocks:h,duplicateBlocks:p,insertAfterBlock:g,insertBeforeBlock:b,flashBlock:k}=(0,Ug.useDispatch)(x),v=jg();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,kd.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 NX=l(A(),1),UBe=(0,NX.createSlotFill)(Symbol("CommentIconSlotFill")),eT=UBe;var MX=l(N(),1),DX=l(A(),1),tT=l($(),1),oT=l(z(),1);var VX=l(w(),1);function HBe({clientId:e}){let t=(0,oT.useSelect)(r=>r(x).getBlock(e),[e]),{replaceBlocks:o}=(0,oT.useDispatch)(x);return!t||t.name!=="core/html"?null:(0,VX.jsx)(DX.MenuItem,{onClick:()=>o(e,(0,tT.rawHandler)({HTML:(0,tT.getBlockContent)(t)})),children:(0,MX.__)("Convert to Blocks")})}var FX=HBe;var zX=l(A(),1),{Fill:jX,Slot:GBe}=(0,zX.createSlotFill)("__unstableBlockSettingsMenuFirstItem");jX.Slot=GBe;var rT=jX;var Gg=l(A(),1),cQ=l($(),1),uQ=l(z(),1);var h3=l(A(),1),g3=l(N(),1),GX=l($(),1),sT=l(z(),1),WX=l(ct(),1);var UX=l($(),1),HX=l(z(),1);function j_(e){return(0,HX.useSelect)(t=>{let{getBlocksByClientId:o,getSelectedBlockClientIds:r,isUngroupable:n,isGroupable:i}=t(x),{getGroupingBlockName:s,getBlockType:a}=t(UX.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 nT=l(z(),1),iT=l($(),1),Hm=l(A(),1);var U_=l(N(),1);var Gm=l(w(),1),WBe={group:{type:"constrained"},row:{type:"flex",flexWrap:"nowrap"},stack:{type:"flex",orientation:"vertical"},grid:{type:"grid"}};function $Be(){let{blocksSelection:e,clientIds:t,groupingBlockName:o,isGroupable:r}=j_(),{replaceBlocks:n}=(0,nT.useDispatch)(x),{canRemove:i,variations:s}=(0,nT.useSelect)(p=>{let{canRemoveBlocks:g}=p(x),{getBlockVariations:b}=p(iT.store);return{canRemove:g(t),variations:b(o,"transform")}},[t,o]),a=p=>{let g=(0,iT.switchToBlockType)(e,o);typeof p!="string"&&(p="group"),g&&g.length>0&&(g[0].attributes.layout=WBe[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,Gm.jsxs)(Hm.ToolbarGroup,{children:[(0,Gm.jsx)(Hm.ToolbarButton,{icon:Ev,label:(0,U_._x)("Group","action: convert blocks to group"),onClick:a}),f&&(0,Gm.jsx)(Hm.ToolbarButton,{icon:KN,label:(0,U_._x)("Row","action: convert blocks to row"),onClick:c}),m&&(0,Gm.jsx)(Hm.ToolbarButton,{icon:lM,label:(0,U_._x)("Stack","action: convert blocks to stack"),onClick:u}),h&&(0,Gm.jsx)(Hm.ToolbarButton,{icon:Bv,label:(0,U_._x)("Grid","action: convert blocks to grid"),onClick:d})]})}var p3=$Be;var Wm=l(w(),1);function $X({clientIds:e,isGroupable:t,isUngroupable:o,onUngroup:r,blocksSelection:n,groupingBlockName:i,onClose:s=()=>{}}){let{getSelectedBlockClientIds:a}=(0,sT.useSelect)(x),{replaceBlocks:c}=(0,sT.useDispatch)(x),u=()=>{let m=(0,GX.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,Wm.jsxs)(Wm.Fragment,{children:[t&&(0,Wm.jsx)(h3.MenuItem,{shortcut:f.length>1?WX.displayShortcut.primary("g"):void 0,onClick:()=>{u(),s()},children:(0,g3._x)("Group","verb")}),o&&(0,Wm.jsx)(h3.MenuItem,{onClick:()=>{d(),s()},children:(0,g3._x)("Ungroup","Ungrouping blocks from within a grouping block back into individual blocks within the Editor")})]})}var b3=l(N(),1),qX=l(O(),1),ZX=l(A(),1);var KX=l(z(),1);function ni(e){return(0,KX.useSelect)(t=>{let{canLockBlockType:o,getBlockName:r,isEditLockedBlock:n,isMoveLockedBlock:i,isRemoveLockedBlock:s,isLockedBlock:a}=F(t(x));return{isEditLocked:n(e),isMoveLocked:i(e),isRemoveLocked:s(e),canLock:o(r(e)),isLocked:a(e)}},[e])}var Qi=l(N(),1),H_=l(O(),1),xo=l(A(),1);var aT=l(z(),1),YX=l($(),1);var Pt=l(w(),1),KBe=["core/navigation"];function YBe(e){return e.remove&&e.move?"all":e.remove&&!e.move?"insert":!1}function lT({clientId:e,onClose:t}){let[o,r]=(0,H_.useState)({move:!1,remove:!1}),{isEditLocked:n,isMoveLocked:i,isRemoveLocked:s}=ni(e),{allowsEditLocking:a,templateLock:c,hasTemplateLock:u}=(0,aT.useSelect)(k=>{let{getBlockName:v,getBlockAttributes:y}=k(x),_=v(e),S=(0,YX.getBlockType)(_);return{allowsEditLocking:KBe.includes(_),templateLock:y(e)?.templateLock,hasTemplateLock:!!S?.attributes?.templateLock}},[e]),[d,f]=(0,H_.useState)(!!c),{updateBlockAttributes:m}=(0,aT.useDispatch)(x),h=It(e);(0,H_.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,Pt.jsx)(xo.Modal,{title:(0,Qi.sprintf)((0,Qi.__)("Lock %s"),h.title),overlayClassName:"block-editor-block-lock-modal",onRequestClose:t,size:"small",children:(0,Pt.jsxs)("form",{onSubmit:k=>{k.preventDefault(),b&&(m([e],{lock:o,templateLock:d?YBe(o):void 0}),t())},children:[(0,Pt.jsxs)("fieldset",{className:"block-editor-block-lock-modal__options",children:[(0,Pt.jsx)("legend",{children:(0,Qi.__)("Select the features you want to lock")}),(0,Pt.jsx)("ul",{role:"list",className:"block-editor-block-lock-modal__checklist",children:(0,Pt.jsxs)("li",{children:[(0,Pt.jsx)(xo.CheckboxControl,{className:"block-editor-block-lock-modal__options-all",label:(0,Qi.__)("Lock all"),checked:p,indeterminate:g,onChange:k=>r({move:k,remove:k,...a?{edit:k}:{}})}),(0,Pt.jsxs)("ul",{role:"list",className:"block-editor-block-lock-modal__checklist",children:[a&&(0,Pt.jsxs)("li",{className:"block-editor-block-lock-modal__checklist-item",children:[(0,Pt.jsx)(xo.CheckboxControl,{label:(0,Qi.__)("Lock editing"),checked:!!o.edit,onChange:k=>r(v=>({...v,edit:k}))}),(0,Pt.jsx)(xo.Icon,{className:"block-editor-block-lock-modal__lock-icon",icon:o.edit?Zf:Bl})]}),(0,Pt.jsxs)("li",{className:"block-editor-block-lock-modal__checklist-item",children:[(0,Pt.jsx)(xo.CheckboxControl,{label:(0,Qi.__)("Lock movement"),checked:o.move,onChange:k=>r(v=>({...v,move:k}))}),(0,Pt.jsx)(xo.Icon,{className:"block-editor-block-lock-modal__lock-icon",icon:o.move?Zf:Bl})]}),(0,Pt.jsxs)("li",{className:"block-editor-block-lock-modal__checklist-item",children:[(0,Pt.jsx)(xo.CheckboxControl,{label:(0,Qi.__)("Lock removal"),checked:o.remove,onChange:k=>r(v=>({...v,remove:k}))}),(0,Pt.jsx)(xo.Icon,{className:"block-editor-block-lock-modal__lock-icon",icon:o.remove?Zf:Bl})]})]})]})}),u&&(0,Pt.jsx)(xo.ToggleControl,{className:"block-editor-block-lock-modal__template-lock",label:(0,Qi.__)("Apply to all blocks inside"),checked:d,disabled:o.move&&!o.remove,onChange:()=>f(!d)})]}),(0,Pt.jsxs)(xo.Flex,{className:"block-editor-block-lock-modal__actions",justify:"flex-end",expanded:!1,children:[(0,Pt.jsx)(xo.FlexItem,{children:(0,Pt.jsx)(xo.Button,{variant:"tertiary",onClick:t,__next40pxDefaultSize:!0,children:(0,Qi.__)("Cancel")})}),(0,Pt.jsx)(xo.FlexItem,{children:(0,Pt.jsx)(xo.Button,{variant:"primary",type:"submit",disabled:!b,accessibleWhenDisabled:!0,__next40pxDefaultSize:!0,children:(0,Qi.__)("Apply")})})]})]})})}var $m=l(w(),1);function k3({clientId:e}){let{canLock:t,isLocked:o}=ni(e),[r,n]=(0,qX.useReducer)(s=>!s,!1);if(!t)return null;let i=o?(0,b3.__)("Unlock"):(0,b3.__)("Lock");return(0,$m.jsxs)($m.Fragment,{children:[(0,$m.jsx)(ZX.MenuItem,{icon:o?Bl:vN,onClick:n,"aria-expanded":r,"aria-haspopup":"dialog",children:i}),r&&(0,$m.jsx)(lT,{clientId:e,onClose:n})]})}var cT=l(N(),1),uT=l(A(),1),Hg=l(O(),1);var vd=l(w(),1);function v3({clientId:e}){let{canLock:t,isLocked:o}=ni(e),[r,n]=(0,Hg.useReducer)(a=>!a,!1),i=(0,Hg.useRef)(!1);if((0,Hg.useEffect)(()=>{o&&(i.current=!0)},[o]),!o&&!i.current)return null;let s=o?(0,cT.__)("Unlock"):(0,cT.__)("Lock");return!t&&o&&(s=(0,cT.__)("Locked")),(0,vd.jsxs)(vd.Fragment,{children:[(0,vd.jsx)(uT.ToolbarGroup,{className:"block-editor-block-lock-toolbar",children:(0,vd.jsx)(uT.ToolbarButton,{disabled:!t,icon:o?Zf:Bl,label:s,onClick:n,"aria-expanded":r,"aria-haspopup":"dialog"})}),r&&(0,vd.jsx)(lT,{clientId:e,onClose:n})]})}var y3=l(N(),1),XX=l(A(),1),dT=l($(),1),fT=l(z(),1);var QX=l(w(),1),qBe=()=>{};function JX({clientId:e,onToggle:t=qBe}){let{blockType:o,mode:r,enabled:n}=(0,fT.useSelect)(a=>{let{getBlock:c,getBlockMode:u,getSettings:d}=a(x),f=c(e);return{mode:u(e),blockType:f?(0,dT.getBlockType)(f.name):null,enabled:d().codeEditingEnabled&&!!f?.isValid}},[e]),{toggleBlockMode:i}=(0,fT.useDispatch)(x);if(!o||!(0,dT.hasBlockSupport)(o,"html",!0)||!n)return null;let s=r==="visual"?(0,y3.__)("Edit as HTML"):(0,y3.__)("Edit visually");return(0,QX.jsx)(XX.MenuItem,{onClick:()=>{i(e),t()},children:s})}var rQ=l(A(),1),nQ=l(N(),1),iQ=l(O(),1),sQ=l(z(),1),aQ=l(Ds(),1);var Ks=l(A(),1),$s=l(N(),1),tQ=l(O(),1),oQ=l(er(),1),mT=l(z(),1);function eQ(e){return e?.trim()?.length===0}var lc=l(w(),1);function Km({clientId:e,onClose:t}){let[o,r]=(0,tQ.useState)(),n=It(e),{metadata:i}=(0,mT.useSelect)(b=>{let{getBlockAttributes:k}=b(x);return{metadata:k(e)?.metadata}},[e]),{updateBlockAttributes:s}=(0,mT.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=eQ(o),h=d||f,p=b=>b.target.select(),g=()=>{let b=f||m?void 0:o,k=f||m?(0,$s.sprintf)((0,$s.__)('Block name reset to: "%s".'),o):(0,$s.sprintf)((0,$s.__)('Block name changed to: "%s".'),o);(0,oQ.speak)(k,"assertive"),s([e],{metadata:Ae({...i,name:b})}),t()};return(0,lc.jsx)(Ks.Modal,{title:(0,$s.__)("Rename"),onRequestClose:t,overlayClassName:"block-editor-block-rename-modal",focusOnMount:"firstContentElement",size:"small",children:(0,lc.jsx)("form",{onSubmit:b=>{b.preventDefault(),h&&g()},children:(0,lc.jsxs)(Ks.__experimentalVStack,{spacing:"3",children:[(0,lc.jsx)(Ks.TextControl,{__next40pxDefaultSize:!0,value:o??a,label:(0,$s.__)("Name"),help:u?(0,$s.__)("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,lc.jsxs)(Ks.__experimentalHStack,{justify:"right",children:[(0,lc.jsx)(Ks.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:t,children:(0,$s.__)("Cancel")}),(0,lc.jsx)(Ks.Button,{__next40pxDefaultSize:!0,accessibleWhenDisabled:!0,disabled:!h,variant:"primary",type:"submit",children:(0,$s.__)("Save")})]})]})})})}var Ym=l(w(),1);function _3({clientId:e}){let[t,o]=(0,iQ.useState)(!1),r=(0,sQ.useSelect)(n=>n(aQ.store).getShortcutRepresentation("core/block-editor/rename"),[]);return(0,Ym.jsxs)(Ym.Fragment,{children:[(0,Ym.jsx)(rQ.MenuItem,{onClick:()=>{o(!0)},"aria-expanded":t,"aria-haspopup":"dialog",shortcut:r,children:(0,nQ.__)("Rename")}),t&&(0,Ym.jsx)(Km,{clientId:e,onClose:()=>o(!1)})]})}var lQ=l($(),1);function qm(e){return{canRename:!!e&&(0,lQ.getBlockSupport)(e,"renaming",!0)}}var Ys=l(w(),1),{Fill:ZBe,Slot:XBe}=(0,Gg.createSlotFill)("BlockSettingsMenuControls"),QBe=({fillProps:e,clientIds:t=null})=>{let{selectedBlocks:o,selectedClientIds:r,isContentOnly:n,canToggleSelectedBlocksVisibility:i,canEdit:s}=(0,uQ.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,cQ.hasBlockSupport)(B.name,"visibility",!0)),canEdit:S(C[0])}},[t]),{canLock:a}=ni(r[0]),{canRename:c}=qm(o[0]),u=r.length===1&&a&&!n,d=r.length===1&&c&&!n,f=i&&!n,m=j_(r),{isGroupable:h,isUngroupable:p}=m,g=(h||p)&&!n;return(0,Ys.jsx)(XBe,{fillProps:{...e,canEdit:s,selectedBlocks:o,selectedClientIds:r},children:b=>!b?.length>0&&!g&&!u?null:(0,Ys.jsxs)(Gg.MenuGroup,{children:[g&&(0,Ys.jsx)($X,{...m,onClose:e?.onClose}),s&&u&&(0,Ys.jsx)(k3,{clientId:r[0]}),s&&d&&(0,Ys.jsx)(_3,{clientId:r[0]}),s&&f&&(0,Ys.jsx)(C5,{clientIds:r}),b,s&&e?.count===1&&!n&&(0,Ys.jsx)(JX,{clientId:e?.firstBlockClientId,onToggle:e?.onClose})]})})};function dQ({...e}){return(0,Ys.jsx)(Gg.__experimentalStyleProvider,{document,children:(0,Ys.jsx)(ZBe,{...e})})}dQ.Slot=QBe;var pT=dQ;var fQ=l(O(),1),mQ=l(A(),1),pQ=l(X(),1),hQ=l(z(),1),hT=l(N(),1);var S3=l(w(),1);function gQ({parentClientId:e,parentBlockType:t}){let o=(0,pQ.useViewportMatch)("medium","<"),{selectBlock:r}=(0,hQ.useDispatch)(x),n=(0,fQ.useRef)(),i=Fg({ref:n,highlightParent:!0});return o?(0,S3.jsx)(mQ.MenuItem,{...i,ref:n,icon:(0,S3.jsx)(Oe,{icon:t.icon}),onClick:()=>r(e),children:(0,hT.sprintf)((0,hT.__)("Select parent block (%s)"),t.title)}):null}var Qe=l(w(),1),JBe={className:"block-editor-block-settings-menu__popover",placement:"bottom-start"};function x3({clientIds:e,onCopy:t,label:o,shortcut:r,eventType:n="copy",__experimentalUpdateSelection:i=!1}){let{getBlocksByClientId:s}=(0,yd.useSelect)(x),{removeBlocks:a}=(0,yd.useDispatch)(x),c=Jh(),u=(0,cc.useCopyToClipboard)(()=>(0,Wg.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,Ji.__)("Copy");return(0,Qe.jsx)(Jr.MenuItem,{ref:u,shortcut:r,children:d})}function w3({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,yd.useSelect)(T=>{let{getBlockName:I,getBlockRootClientId:M,getPreviousBlockClientId:D,getSelectedBlockClientIds:U,getBlockAttributes:j,getBlockEditingMode:H,isZoomOut:G,canEditBlock:Q,canMoveBlocks:ie,getBlockIndex:ce,getBlockCount:te}=F(T(x)),{getActiveBlockVariation:ne}=T(Wg.store),Z=M(a),Y=Z&&I(Z);return{firstParentClientId:Z,parentBlockType:Z&&(ne(Y,j(Z))||(0,Wg.getBlockType)(Y)),previousBlockClientId:D(a),selectedBlockClientIds:U(),isContentOnly:H(a)==="contentOnly",isZoomOut:G(),canEdit:Q(a),canMove:ie(t),isFirst:ce(a)===0,isLast:ce(a)===te(Z)-1}},[a,t]),{getBlockOrder:v,getSelectedBlockClientIds:y}=(0,yd.useSelect)(x),{moveBlocksDown:_,moveBlocksUp:S}=(0,yd.useDispatch)(x),C=(0,yd.useSelect)(T=>{let{getShortcutRepresentation:I}=T(bQ.store);return{copy:I("core/block-editor/copy"),cut:I("core/block-editor/cut"),duplicate:I("core/block-editor/duplicate"),remove:I("core/block-editor/remove"),insertAfter:I("core/block-editor/insert-after"),insertBefore:I("core/block-editor/insert-before")}},[]),B=f.length>0;async function P(T){if(!r)return;let I=await T;I&&I[0]&&r(I[0],!1)}function R(){if(!r)return;let T=d||c;T||(T=v()[0]);let I=B&&y().length===0;r(T,I)}let L=!f?.includes(c)&&!!c;return(0,Qe.jsx)(LX,{clientIds:t,__experimentalUpdateSelection:!r,children:({canCopyStyles:T,canDuplicate:I,canInsertBlock:M,canRemove:D,onDuplicate:U,onInsertAfter:j,onInsertBefore:H,onRemove:G,onCopy:Q,onPasteStyles:ie})=>!D&&!I&&!M&&m?null:(0,Qe.jsx)(Jr.DropdownMenu,{icon:Bs,label:(0,Ji.__)("Options"),className:"block-editor-block-settings-menu",popoverProps:JBe,noIcons:!0,...i,children:({onClose:te})=>(0,Qe.jsxs)(Qe.Fragment,{children:[(0,Qe.jsxs)(Jr.MenuGroup,{children:[(0,Qe.jsx)(rT.Slot,{fillProps:{onClose:te}}),L&&(0,Qe.jsx)(gQ,{parentClientId:c,parentBlockType:u}),g&&n&&(0,Qe.jsxs)(Qe.Fragment,{children:[(0,Qe.jsx)(Jr.MenuItem,{icon:Uf,disabled:b,accessibleWhenDisabled:!0,onClick:(0,cc.pipe)(te,()=>{S(t,c)}),children:(0,Ji.__)("Move up")}),(0,Qe.jsx)(Jr.MenuItem,{icon:hr,disabled:k,accessibleWhenDisabled:!0,onClick:(0,cc.pipe)(te,()=>{_(t,c)}),children:(0,Ji.__)("Move down")})]}),p&&s===1&&(0,Qe.jsx)(FX,{clientId:a}),!m&&(0,Qe.jsx)(x3,{clientIds:t,onCopy:Q,shortcut:C.copy}),D&&!m&&(0,Qe.jsx)(x3,{clientIds:t,label:(0,Ji.__)("Cut"),eventType:"cut",shortcut:C.cut,__experimentalUpdateSelection:!r}),I&&(0,Qe.jsx)(Jr.MenuItem,{onClick:(0,cc.pipe)(te,U,P),shortcut:C.duplicate,children:(0,Ji.__)("Duplicate")}),M&&!h&&(0,Qe.jsxs)(Qe.Fragment,{children:[(0,Qe.jsx)(Jr.MenuItem,{onClick:(0,cc.pipe)(te,H),shortcut:C.insertBefore,children:(0,Ji.__)("Add before")}),(0,Qe.jsx)(Jr.MenuItem,{onClick:(0,cc.pipe)(te,j),shortcut:C.insertAfter,children:(0,Ji.__)("Add after")})]}),p&&s===1&&(0,Qe.jsx)(eT.Slot,{fillProps:{clientId:a,onClose:te}})]}),T&&!m&&(0,Qe.jsxs)(Jr.MenuGroup,{children:[(0,Qe.jsx)(x3,{clientIds:t,onCopy:Q,label:(0,Ji.__)("Copy styles"),eventType:"copyStyles"}),p&&(0,Qe.jsx)(Jr.MenuItem,{onClick:ie,children:(0,Ji.__)("Paste styles")})]}),!m&&(0,Qe.jsx)(pT.Slot,{fillProps:{onClose:te,count:s,firstBlockClientId:a},clientIds:t}),typeof o=="function"?o({onClose:te}):gT.Children.map(ne=>(0,gT.cloneElement)(ne,{onClose:te})),D&&(0,Qe.jsx)(Jr.MenuGroup,{children:(0,Qe.jsx)(Jr.MenuItem,{onClick:(0,cc.pipe)(te,G,R),shortcut:C.remove,children:(0,Ji.__)("Delete")})})]})})})}var kQ=w3;var vQ=l(A(),1),eEe=(0,vQ.createSlotFill)(Symbol("CommentIconToolbarSlotFill")),bT=eEe;var $g=l(w(),1);function tEe({clientIds:e,...t}){return(0,$g.jsxs)(kT.ToolbarGroup,{children:[(0,$g.jsx)(bT.Slot,{}),(0,$g.jsx)(kT.ToolbarItem,{children:o=>(0,$g.jsx)(kQ,{clientIds:e,toggleProps:o,...t})})]})}var vT=tEe;var yT=l(A(),1),yQ=l(N(),1),_T=l(z(),1);var C3=l(w(),1);function _Q({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,C3.jsx)(yT.ToolbarGroup,{children:(0,C3.jsx)(yT.ToolbarButton,{onClick:()=>{r(t)},children:(0,yQ.__)("Edit visually")})}):null}var ST=l(A(),1),en=l(O(),1),wQ=l(z(),1),CQ=l(Pe(),1),E3=l(Fe(),1),BQ=l(Ds(),1),EQ=l(ct(),1);var B3=l(w(),1);function oEe(e){let t="toolbarItem";return!e.some(o=>!(t in o.dataset))}function SQ(e){return Array.from(e.querySelectorAll("[data-toolbar-item]:not([disabled])"))}function xQ(e){return e.contains(e.ownerDocument.activeElement)}function rEe(e){let[t]=E3.focus.tabbable.find(e);t&&t.focus({preventScroll:!0})}function nEe(e){let[o,r]=(0,en.useState)(!0),n=(0,en.useCallback)(()=>{let i=E3.focus.tabbable.find(e.current),s=oEe(i);s||(0,CQ.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,en.useLayoutEffect)(()=>{let i=new window.MutationObserver(n);return i.observe(e.current,{childList:!0,subtree:!0}),()=>i.disconnect()},[n,o,e]),o}function iEe({toolbarRef:e,focusOnMount:t,isAccessibleToolbar:o,defaultIndex:r,onIndexChange:n,shouldUseKeyboardFocusShortcut:i,focusEditorOnEscape:s}){let[a]=(0,en.useState)(t),[c]=(0,en.useState)(r),u=(0,en.useCallback)(()=>{rEe(e.current)},[e]);(0,BQ.useShortcut)("core/block-editor/focus-toolbar",()=>{i&&u()}),(0,en.useEffect)(()=>{a&&u()},[o,a,u]),(0,en.useEffect)(()=>{let m=e.current,h=0;return!a&&!xQ(m)&&(h=window.requestAnimationFrame(()=>{let p=SQ(m),g=c||0;p[g]&&xQ(m)&&p[g].focus({preventScroll:!0})})),()=>{if(window.cancelAnimationFrame(h),!n||!m)return;let g=SQ(m).findIndex(b=>b.tabIndex===0);n(g)}},[c,a,n,e]);let{getLastFocus:f}=F((0,wQ.useSelect)(x));(0,en.useEffect)(()=>{let m=e.current;if(s){let h=p=>{let g=f();p.keyCode===EQ.ESCAPE&&g?.current&&(p.preventDefault(),g.current.focus())};return m.addEventListener("keydown",h),()=>{m.removeEventListener("keydown",h)}}},[s,f,e])}function Kg({children:e,focusOnMount:t,focusEditorOnEscape:o=!1,shouldUseKeyboardFocusShortcut:r=!0,__experimentalInitialIndex:n,__experimentalOnIndexChange:i,orientation:s="horizontal",...a}){let c=(0,en.useRef)(),u=nEe(c);return iEe({toolbarRef:c,focusOnMount:t,defaultIndex:n,onIndexChange:i,isAccessibleToolbar:u,shouldUseKeyboardFocusShortcut:r,focusEditorOnEscape:o}),u?(0,B3.jsx)(ST.Toolbar,{label:a["aria-label"],ref:c,orientation:s,...a,children:e}):(0,B3.jsx)(ST.NavigableMenu,{orientation:s,role:"toolbar",ref:c,...a,children:e})}var TQ=l(z(),1),xT=l($(),1);function wT(){return(0,TQ.useSelect)(t=>{let{getBlockEditingMode:o,getBlockName:r,getBlockSelectionStart:n}=t(x),i=n(),s=i&&(0,xT.getBlockType)(r(i));return s&&(0,xT.hasBlockSupport)(s,"__experimentalToolbar",!0)&&o(i)!=="disabled"},[])}var _d=l(A(),1),IQ=l(N(),1),PQ=l($(),1),RQ=l(O(),1),CT=l(z(),1);var Yg=l(w(),1),T3=[],sEe=6,aEe={placement:"bottom-start"};function OQ({clientId:e}){let{categories:t,currentPatternName:o,patterns:r}=(0,CT.useSelect)(a=>{let{getBlockAttributes:c,getBlockRootClientId:u,__experimentalGetAllowedPatterns:d}=a(x),f=c(e),m=f?.metadata?.categories||T3,h=u(e),p=m.length>0?d(h):T3;return{categories:m,currentPatternName:f?.metadata?.patternName,patterns:p}},[e]),{replaceBlocks:n}=(0,CT.useDispatch)(x),i=(0,RQ.useMemo)(()=>t.length===0||!r||r.length===0?T3: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,sEe),[t,o,r]);if(i.length<2)return null;let s=a=>{let c=(a.blocks??[]).map(u=>(0,PQ.cloneBlock)(u));c[0].attributes.metadata={...c[0].attributes.metadata,categories:t},n(e,c)};return(0,Yg.jsx)(_d.Dropdown,{popoverProps:aEe,renderToggle:({onToggle:a,isOpen:c})=>(0,Yg.jsx)(_d.ToolbarGroup,{children:(0,Yg.jsx)(_d.ToolbarButton,{onClick:()=>a(!c),"aria-expanded":c,children:(0,IQ.__)("Change design")})}),renderContent:()=>(0,Yg.jsx)(_d.__experimentalDropdownContentWrapper,{className:"block-editor-block-toolbar-change-design-content-wrapper",paddingSize:"none",children:(0,Yg.jsx)(Aa,{blockPatterns:i,onClickPattern:s,showTitlesAsTooltip:!0})})})}var Zs=l(A(),1),rJ=l(N(),1),LT=l(z(),1);var TT=l(z(),1),xd=l($(),1),DQ=l(O(),1);var I3=l(BT(),1),LQ=l(N(),1);function NQ(e,t){for(let o of new I3.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 ET(e)}function Sd(e,t,o){let r=new I3.default(e);return t&&r.remove("is-style-"+t.name),r.add("is-style-"+o.name),r.value}function MQ(e){return!e||e.length===0?[]:ET(e)?e:[{name:"default",label:(0,LQ._x)("Default","block style"),isDefault:!0},...e]}function ET(e){return e?.find(t=>t.isDefault)}function lEe(e,t){return(0,DQ.useMemo)(()=>{let o=t?.example,r=t?.name;if(o&&r)return(0,xd.getBlockFromExample)(r,{attributes:o.attributes,innerBlocks:o.innerBlocks});if(e)return(0,xd.cloneBlock)(e)},[e,t?.example,t?.name])}function qg({clientId:e,onSwitch:t}){let o=m=>{let{getBlock:h}=m(x),p=h(e);if(!p)return{};let g=(0,xd.getBlockType)(p.name),{getBlockStyles:b}=m(xd.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,TT.useSelect)(o,[e]),{updateBlockAttributes:a}=(0,TT.useDispatch)(x),c=MQ(r),u=NQ(c,s),d=lEe(n,i);return{onSelect:m=>{let h=Sd(s,u,m);a(e,{className:h}),t()},stylesToRender:c,activeStyle:u,genericPreviewBlock:d,className:s}}var eb=l($(),1),q_=l(z(),1),AT=l(O(),1);function VQ(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 Mo=(e,t,o)=>{let r=Array.isArray(t)?t:t.split("."),n=e;return r.forEach(i=>{n=n?.[i]}),n??o};var zQ=l(dy(),1);var cEe="1600px",uEe="320px",dEe=1,fEe=.25,mEe=.75,pEe="14px";function FQ({minimumFontSize:e,maximumFontSize:t,fontSize:o,minimumViewportWidth:r=uEe,maximumViewportWidth:n=cEe,scaleFactor:i=dEe,minimumFontSizeLimit:s}){if(s=Va(s)?s:pEe,o){let y=Va(o);if(!y?.unit||!y?.value)return null;let _=Va(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),fEe),mEe),B=G_(y.value*C,3);_?.value&&B<_?.value?e=`${_.value}${_.unit}`:e=`${B}${y.unit}`}}let a=Va(e),c=a?.unit||"rem",u=Va(t,{coerceTo:c});if(!a||!u)return null;let d=Va(e,{coerceTo:"rem"}),f=Va(n,{coerceTo:c}),m=Va(r,{coerceTo:c});if(!f||!m||!d)return null;let h=f.value-m.value;if(!h)return null;let p=G_(m.value/100,3),g=G_(p,3)+c,b=100*((u.value-a.value)/h),k=G_((b||1)*i,3),v=`${d.value}${d.unit} + ((1vw - ${g}) * ${k})`;return`clamp(${e}, ${v}, ${t})`}function Va(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:G_(d,3),unit:u}:null}function G_(e,t=3){let o=Math.pow(10,t);return Math.round(e*o)/o}function P3(e){let t=e?.fluid;return t===!0||t&&typeof t=="object"&&Object.keys(t).length>0}function hEe(e){let t=e?.typography??{},o=e?.layout,r=Va(o?.wideSize)?o?.wideSize:null;return P3(t)&&r?{fluid:{maxViewportWidth:r,...typeof t.fluid=="object"?t.fluid:{}}}:{fluid:t?.fluid}}function uc(e,t){let{size:o}=e;if(!o||o==="0"||e?.fluid===!1||!P3(t?.typography)&&!P3(e))return o;let r=hEe(t)?.fluid??{},n=FQ({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 Fa="body",W_=":root",IT=[{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)=>uc(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 qs(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 jQ(e,t){if(!e||!t)return;let o={};return Object.entries(t).forEach(([r,n])=>{typeof n=="string"&&(o[r]=qs(e,n)),typeof n=="object"&&(o[r]={},Object.entries(n).forEach(([i,s])=>{o[r][i]=qs(e,s)}))}),o}function UQ(e,t){return e.includes(",")?e.split(",").map(n=>n+t).join(","):e+t}function HQ(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 gEe(e,t){if(!e||!t)return e;if(typeof e=="object"&&"ref"in e&&e?.ref){let o=(0,zQ.getCSSValueFromRawStyle)(Mo(t,e.ref));return typeof o=="object"&&o!==null&&"ref"in o&&o?.ref?void 0:o===void 0?e:o}return e}function bEe(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 Zg(e,t){if(!e||!t)return e;let o=gEe(e,t);return typeof o=="object"&&o!==null&&"url"in o&&o?.url&&(o.url=bEe(o.url,t?._links?.["wp:theme-file"])),o}function GQ(e,t,o=[],r="slug",n){let i=[t?Mo(e,["blocks",t,...o]):void 0,Mo(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"||GQ(e,t,o,"slug",d.slug)[r]===d[r]?d:void 0}}}}function kEe(e,t,o,[r,n]=[]){let i=IT.find(a=>a.cssVarInfix===r);if(!i||!e.settings)return o;let s=GQ(e.settings,t,i.path,"slug",n);if(s){let{valueKey:a}=i,c=s[a];return Mr(e,t,c)}return o}function vEe(e,t,o,r=[]){let n=(t?Mo(e?.settings??{},["blocks",t,"custom",...r]):void 0)??Mo(e?.settings??{},["custom",...r]);return n?Mr(e,t,n):o}function Mr(e,t,o){if(!o||typeof o!="string")if(typeof o=="object"&&o!==null&&"ref"in o&&typeof o.ref=="string"){let u=Mo(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"?kEe(e,t,o,c):a==="custom"?vEe(e,t,o,c):o}var tn=l($(),1),K_=l(dy(),1),eJ=l(z(),1);function ii(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 Mo(i,`${c}.root`,null)||Mo(i,c,null)||m;let h=s?Mo(s,`${c}.__experimentalSelector`,null):void 0;return h?qs(u,h):m}let f;return a&&(f=Mo(i,c,null)),f||(r?ii(e,d[0],o):null)}function Qg(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 O3(e){if(!e)return;let t=e.match(/var:preset\|spacing\|(.+)/);return t?`var(--wp--preset--spacing--${t[1]})`:e}function AEe(e){if(!e)return null;let t=typeof e=="string";return{top:t?e:e?.top,left:t?e:e?.left}}function A3(e,t="0"){let o=AEe(e);if(!o)return null;let r=O3(o?.top)||t,n=O3(o?.left)||t;return r===n?r:`${r} ${n}`}var YQ={backgroundSize:"cover",backgroundPosition:"50% 50%"};function qQ(e){if(!e||!e?.backgroundImage?.url)return;let t;return e?.backgroundSize||(t={backgroundSize:YQ.backgroundSize}),e?.backgroundSize==="contain"&&!e?.backgroundPosition&&(t={backgroundPosition:YQ.backgroundPosition}),t}var ZQ={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 LEe={button:"wp-element-button",caption:"wp-element-caption"},NEe={__experimentalBorder:"border",color:"color",dimensions:"dimensions",spacing:"spacing",typography:"typography"};function MEe(e="*",t={}){return IT.reduce((o,{path:r,cssVarInfix:n,classes:i})=>{if(!i)return o;let s=Mo(t,r,[]);return["default","theme","custom"].forEach(a=>{s[a]&&s[a].forEach(({slug:c})=>{i.forEach(({classSuffix:u,propertyName:d})=>{let f=`.has-${Qg(c)}-${u}`,m=e.split(",").map(p=>`${p}${f}`).join(","),h=`var(--wp--preset--${n}--${Qg(c)})`;o+=`${m}{${d}: ${h} !important;}`})})}),o},"")}function DEe(e,t){let o=e.split(","),r=[];return o.forEach(n=>{r.push(`${t.trim()}${n.trim()}`)}),r.join(", ")}var XQ=(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},QQ=(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},JQ=(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=Jg(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=Jg(a);o[s]=[...o[s]||[],...c],delete t[r]}}),o};function Jg(e={},t="",o,r={},n=!1){let i=Fa===t,s=Object.entries(tn.__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=Mo(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(!Mo(g,[v],!1))return;let y=k.startsWith("--")?k:Qg(k);c.push(`${y}: ${(0,K_.getCSSValueFromRawStyle)(Mo(g,[v]))}`)});else if(Mo(e,p,!1)){let b=u.startsWith("--")?u:Qg(u);c.push(`${b}: ${(0,K_.getCSSValueFromRawStyle)(Mo(e,p))}`)}return c},[]);return e.background&&(e.background?.backgroundImage&&(e.background.backgroundImage=Zg(e.background.backgroundImage,r)),!i&&e.background?.backgroundImage?.id&&(e={...e,background:{...e.background,...qQ(e.background)}})),(0,K_.getCSSRules)(e).forEach(c=>{if(i&&(o||n)&&c.key.startsWith("padding"))return;let u=c.key.startsWith("--")?c.key:Qg(c.key),d=Zg(c.value,r);u==="font-size"&&(d=uc({name:"",slug:"",size:d},r?.settings)),u==="aspect-ratio"&&s.push("min-height: unset"),s.push(`${u}: ${d}`)}),s}function L3({layoutDefinitions:e=ZQ,style:t,selector:o,hasBlockGapSupport:r,hasFallbackGapSupport:n,fallbackGapValue:i}){let s="",a=r?A3(t?.spacing?.blockGap):"";if(n&&(o===Fa?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===Fa?`:root :where(.${c})${f?.selector||""}`:`:root :where(${o}-${c})${f?.selector||""}`:h=o===Fa?`:where(.${c}${f?.selector||""})`:`:where(${o}.${c}${f?.selector||""})`,s+=`${h} { ${m.join("; ")}; }`}})}),o===Fa&&r&&(s+=`${W_} { --wp--style--block-gap: ${a}; }`)),o===Fa&&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 VEe=["border","color","dimensions","spacing","typography","filter","outline","shadow","background"];function PT(e){if(!e)return{};let r=Object.entries(e).filter(([n])=>VEe.includes(n)).map(([n,i])=>[n,JSON.parse(JSON.stringify(i))]);return Object.fromEntries(r)}var FEe=(e,t)=>{let o=[];if(!e?.styles)return o;let r=PT(e.styles);return r&&o.push({styles:r,selector:Fa,skipSelectorWrapper:!0}),Object.entries(tn.__EXPERIMENTAL_ELEMENTS).forEach(([n,i])=>{e.styles?.elements?.[n]&&o.push({styles:e.styles?.elements?.[n]??{},selector:i,skipSelectorWrapper:!LEe[n]})}),Object.entries(e.styles?.blocks??{}).forEach(([n,i])=>{let s=PT(i),a=i,c=[];if(a?.variations){let u={};Object.entries(a.variations).forEach(([d,f])=>{let m=f;u[d]=PT(m),m?.css&&(u[d].css=m.css);let h=typeof t!="string"?t[n]?.styleVariationSelectors?.[d]:void 0;Object.entries(m?.elements??{}).forEach(([p,g])=>{g&&tn.__EXPERIMENTAL_ELEMENTS[p]&&c.push({styles:g,selector:qs(h,tn.__EXPERIMENTAL_ELEMENTS[p])})}),Object.entries(m?.blocks??{}).forEach(([p,g])=>{let b=typeof t!="string"?qs(h,t[p]?.selector):void 0,k=typeof t!="string"?qs(h,t[p]?.duotoneSelector):void 0,v=typeof t!="string"?jQ(h,t[p]?.featureSelectors??{}):void 0,y=PT(g);g?.css&&(y.css=g.css),!(!b||typeof t=="string")&&(c.push({selector:b,duotoneSelector:k,featureSelectors:v,fallbackGapValue:t[p]?.fallbackGapValue,hasLayoutSupport:t[p]?.hasLayoutSupport,styles:y}),Object.entries(g.elements??{}).forEach(([_,S])=>{S&&tn.__EXPERIMENTAL_ELEMENTS[_]&&c.push({styles:S,selector:qs(b,tn.__EXPERIMENTAL_ELEMENTS[_])})}))})}),s.variations=u}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,styleVariationSelectors:t[n].styleVariationSelectors,name:n}),Object.entries(a?.elements??{}).forEach(([u,d])=>{typeof t!="string"&&d&&t?.[n]&&tn.__EXPERIMENTAL_ELEMENTS[u]&&o.push({styles:d,selector:t[n]?.selector.split(",").map(f=>tn.__EXPERIMENTAL_ELEMENTS[u].split(",").map(h=>f+" "+h)).join(",")})}),o.push(...c)}),o},zEe=(e,t)=>{let o=[];if(!e?.settings)return o;let r=s=>{let a={};return IT.forEach(({path:c})=>{let u=Mo(s,c,!1);u!==!1&&(a=VQ(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:W_}),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};var RT=(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=FEe(e,t),u=zEe(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+=`${W_} {`,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(({selector:g,duotoneSelector:b,styles:k,fallbackGapValue:v,hasLayoutSupport:y,featureSelectors:_,styleVariationSelectors:S,skipSelectorWrapper:C,name:B})=>{if(_){let E=JQ(_,k);E=XQ(E,e.settings,B),E=QQ(E,e.settings),Object.entries(E).forEach(([L,T])=>{if(T.length){let I=T.join(";");p+=`:root :where(${L}){${I};}`}})}if(b){let E={};k?.filter&&(E.filter=k.filter,delete k.filter);let L=Jg(E);L.length&&(p+=`${b}{${L.join(";")};}`)}!n&&(Fa===g||y)&&(p+=L3({style:k,selector:g,hasBlockGapSupport:o,hasFallbackGapSupport:r,fallbackGapValue:v}));let P=Jg(k,g,d,e,i);if(P?.length){let E=C?g:`:root :where(${g})`;p+=`${E}{${P.join(";")};}`}k?.css&&(p+=Y_(k.css,`:root :where(${g})`)),a.variationStyles&&S&&Object.entries(S).forEach(([E,L])=>{let T=k?.variations?.[E];if(T){if(_){let M=JQ(_,T);M=XQ(M,e.settings,B),M=QQ(M,e.settings),Object.entries(M).forEach(([D,U])=>{if(U.length){let j=DEe(D,L),H=U.join(";");p+=`:root :where(${j}){${H};}`}})}let I=Jg(T,L,d,e);if(I.length&&(p+=`:root :where(${L}){${I.join(";")};}`),T?.css&&(p+=Y_(T.css,`:root :where(${L})`)),y&&T?.spacing?.blockGap){let M=L+g;p+=L3({style:T,selector:M,hasBlockGapSupport:!0,hasFallbackGapSupport:r,fallbackGapValue:v})}}});let R=Object.entries(k).filter(([E])=>E.startsWith(":"));R?.length&&R.forEach(([E,L])=>{let T=Jg(L);if(!T?.length)return;let M=`:root :where(${g.split(",").map(D=>D+E).join(",")}){${T.join(";")};}`;p+=M})}),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=A3(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})=>{(Fa===g||W_===g)&&(g="");let k=MEe(g,b);k.length>0&&(p+=k)}),p};var jEe=(e,t)=>{if(e?.selectors&&Object.keys(e.selectors).length>0)return e.selectors;let o={root:t};return Object.entries(NEe).forEach(([r,n])=>{let i=ii(e,r);i&&(o[n]=i)}),o},OT=(e,t)=>{let{getBlockStyles:o}=(0,eJ.select)(tn.store),r={};return e.forEach(n=>{let i=n.name,s=ii(n);if(!s)return;let a=ii(n,"filter.duotone");if(!a){let h=ii(n),p=(0,tn.getBlockSupport)(n,"color.__experimentalDuotone",!1);a=p&&h&&qs(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=HQ(g,s);f[g]=b});let m=jEe(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 Y_(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(" ")?qs(t,f):UQ(t,f),o+=`:root :where(${m})${d}{${c.trim()}}`}}),o}var Z_=l(w(),1),N3="is-style-";function tJ(e){return e?e.split(/\s+/).reduce((t,o)=>{if(o.startsWith(N3)){let r=o.slice(N3.length);r!=="default"&&t.push(r)}return t},[]):[]}function M3(e,t=[]){let o=tJ(e);if(!o)return null;for(let r of o)if(t.some(n=>n.name===r))return r;return null}function UEe({override:e}){dc(e)}function D3({config:e}){let{getBlockStyles:t,overrides:o}=(0,q_.useSelect)(i=>({getBlockStyles:i(eb.store).getBlockStyles,overrides:F(i(x)).getStyleOverrides()}),[]),{getBlockName:r}=(0,q_.useSelect)(x),n=(0,AT.useMemo)(()=>{if(!o?.length)return;let i=[],s=[];for(let[,a]of o)if(a?.variation&&a?.clientId&&!s.includes(a.clientId)){let c=r(a.clientId),u=e?.styles?.blocks?.[c]?.variations?.[a.variation];if(u){let d={settings:e?.settings,styles:{blocks:{[c]:{variations:{[`${a.variation}-${a.clientId}`]:u}}}}},f=OT((0,eb.getBlockTypes)(),a.clientId),b=RT(d,f,!1,!0,!0,!0,{blockGap:!1,blockStyles:!0,layoutStyles:!1,marginReset:!1,presets:!1,rootPadding:!1,variationStyles:!0});i.push({id:`${a.variation}-${a.clientId}`,css:b,__unstableType:"variation",variation:a.variation,clientId:a.clientId}),s.push(a.clientId)}}return i},[e,o,t,r]);return!n||!n.length?null:(0,Z_.jsx)(Z_.Fragment,{children:n.map(i=>(0,Z_.jsx)(UEe,{override:i},i.id))})}function V3(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=El(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 HEe(e,t,o){let{globalSettings:r,globalStyles:n}=(0,q_.useSelect)(i=>{let s=i(x).getSettings();return{globalSettings:s.__experimentalFeatures,globalStyles:s[Ei]}},[]);return(0,AT.useMemo)(()=>{let i=V3({settings:r,styles:n},e,t);return{settings:r,styles:{blocks:{[e]:{variations:{[`${t}-${o}`]:i}}}}}},[r,n,t,o,e])}function GEe({name:e,className:t,clientId:o}){let{getBlockStyles:r}=(0,q_.useSelect)(eb.store),n=r(e),i=M3(t,n),s=`${N3}${i}-${o}`,{settings:a,styles:c}=HEe(e,i,o),u=(0,AT.useMemo)(()=>{if(!i)return;let d={settings:a,styles:c},f=OT((0,eb.getBlockTypes)(),o);return RT(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 dc({id:`variation-${o}`,css:u,__unstableType:"variation",variation:i,clientId:o}),i?{className:s}:{}}var oJ={hasSupport:()=>!0,attributeKeys:["className"],isMatch:({className:e})=>tJ(e).length>0,useBlockProps:GEe};var wd=l(w(),1),WEe=(0,wd.jsxs)(Zs.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24","aria-hidden":"true",focusable:"false",children:[(0,wd.jsx)(Zs.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,wd.jsx)(Zs.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 $Ee({clientId:e}){let{stylesToRender:t,activeStyle:o,className:r}=qg({clientId:e}),{updateBlockAttributes:n}=(0,LT.useDispatch)(x),{globalSettings:i,globalStyles:s,blockName:a}=(0,LT.useSelect)(d=>{let f=d(x).getSettings();return{globalSettings:f.__experimentalFeatures,globalStyles:f[Ei],blockName:d(x).getBlockName(e)}},[e]),c=o?.name?V3({settings:i,styles:s},a,o.name)?.color?.background:void 0;return!t||t.length===0?null:(0,wd.jsx)(Zs.ToolbarGroup,{children:(0,wd.jsx)(Zs.ToolbarButton,{onClick:()=>{let f=(t.findIndex(p=>p.name===o.name)+1)%t.length,m=t[f],h=Sd(r,o,m);n(e,{className:h})},label:(0,rJ.__)("Shuffle styles"),children:(0,wd.jsx)(Zs.Icon,{icon:WEe,style:{fill:c||"transparent"}})})})}var nJ=$Ee;var DT=l(A(),1),F3=l(N(),1),iJ=l(z(),1),VT=l($(),1);var NT=l(z(),1);function MT(e){let{isSectionBlock:t,isWithinSection:o,isWithinEditedSection:r,isEditingContentOnlySection:n,editedContentOnlySection:i}=(0,NT.useSelect)(u=>{let{isSectionBlock:d,getParentSectionBlock:f,getEditedContentOnlySection:m,isWithinEditedContentOnlySection:h}=F(u(x)),p=m();return{isSectionBlock:d(e),isWithinSection:d(e)||!!f(e),isWithinEditedSection:h(e),isEditingContentOnlySection:p===e,editedContentOnlySection:p}},[e]),s=(0,NT.useDispatch)(x),{editContentOnlySection:a,stopEditingContentOnlySection:c}=F(s);return{isSectionBlock:t,isWithinSection:o,isWithinEditedSection:r,isEditingContentOnlySection:n,editedContentOnlySection:i,editContentOnlySection:a,stopEditingContentOnlySection:c}}var z3=l(w(),1);function sJ({clientId:e}){let{isSectionBlock:t,isEditingContentOnlySection:o,editContentOnlySection:r,stopEditingContentOnlySection:n}=MT(e),i=(0,iJ.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,VT.isReusableBlock)(i)||(0,VT.isTemplatePart)(i))return null;let s=o;return(0,z3.jsx)(DT.ToolbarGroup,{children:(0,z3.jsx)(DT.ToolbarButton,{onClick:()=>{s?n():r(e)},children:s?(0,F3.__)("Exit pattern"):(0,F3.__)("Edit pattern")})})}var AJ=l(A(),1),LJ=l(N(),1),NJ=l(z(),1);var tS=l($(),1),MJ=l(kh(),1);var za=l(N(),1),ja=l(A(),1),Bd=l($(),1),$T=l(z(),1);var mJ=l(N(),1),Q_=l(A(),1),zT=l($(),1),jT=l(O(),1);var aJ=l(A(),1),lJ=l(X(),1);var X_=l(w(),1);function Cd({blocks:e,placement:t="right-start",offset:o=16,anchor:r}){return(0,lJ.useViewportMatch)("medium","<")?null:(0,X_.jsx)("div",{className:"block-editor-block-switcher__popover-preview-container",children:(0,X_.jsx)(aJ.Popover,{className:"block-editor-block-switcher__popover-preview",placement:t,focusOnMount:!1,offset:o,anchor:r,children:(0,X_.jsx)("div",{className:"block-editor-block-switcher__preview",children:(0,X_.jsx)(Cn,{viewportWidth:601,blocks:e})})})})}var cJ=l(A(),1),tb=l($(),1),uJ=l(z(),1),FT=l(O(),1);var fc=l(w(),1),KEe={};function dJ({clientIds:e,blocks:t}){let{activeBlockVariation:o,blockVariationTransformations:r}=(0,uJ.useSelect)(i=>{let{getBlockAttributes:s,canRemoveBlocks:a}=i(x),{getActiveBlockVariation:c,getBlockVariations:u}=i(tb.store),d=a(e);if(t.length!==1||!d)return KEe;let[f]=t;return{blockVariationTransformations:u(f.name,"transform"),activeBlockVariation:c(f.name,s(f.clientId))}},[e,t]);return(0,FT.useMemo)(()=>r?.filter(({name:i})=>i!==o?.name),[r,o])}var YEe=({transformations:e,onSelect:t,blocks:o})=>{let[r,n]=(0,FT.useState)();return(0,fc.jsxs)(fc.Fragment,{children:[r&&(0,fc.jsx)(Cd,{blocks:(0,tb.cloneBlock)(o[0],e.find(({name:i})=>i===r).attributes)}),e?.map(i=>(0,fc.jsx)(qEe,{item:i,onSelect:t,setHoveredTransformItemName:n},i.name))]})};function qEe({item:e,onSelect:t,setHoveredTransformItemName:o}){let{name:r,icon:n,title:i}=e;return(0,fc.jsxs)(cJ.MenuItem,{className:(0,tb.getBlockMenuDefaultClassName)(r),onClick:s=>{s.preventDefault(),t(r)},onMouseLeave:()=>o(null),onMouseEnter:()=>o(r),onFocus:()=>o(r),onBlur:()=>o(null),children:[(0,fc.jsx)(Oe,{icon:n,showColors:!0}),i]})}var fJ=YEe;var Pn=l(w(),1);function ZEe(e){let t={"core/paragraph":1,"core/heading":2,"core/list":3,"core/quote":4},o=(0,jT.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 XEe=({className:e,possibleBlockTransformations:t,possibleBlockVariationTransformations:o,onSelect:r,onSelectVariation:n,blocks:i})=>{let[s,a]=(0,jT.useState)(),{priorityTextTransformations:c,restTransformations:u}=ZEe(t),d=c.length&&u.length,f=!!u.length&&(0,Pn.jsx)(QEe,{restTransformations:u,onSelect:r,setHoveredTransformItemName:a});return(0,Pn.jsxs)(Pn.Fragment,{children:[(0,Pn.jsxs)(Q_.MenuGroup,{label:(0,mJ.__)("Transform to"),className:e,children:[s&&(0,Pn.jsx)(Cd,{blocks:(0,zT.switchToBlockType)(i,s)}),!!o?.length&&(0,Pn.jsx)(fJ,{transformations:o,blocks:i,onSelect:n}),c.map(m=>(0,Pn.jsx)(pJ,{item:m,onSelect:r,setHoveredTransformItemName:a},m.name)),!d&&f]}),!!d&&(0,Pn.jsx)(Q_.MenuGroup,{className:e,children:f})]})};function QEe({restTransformations:e,onSelect:t,setHoveredTransformItemName:o}){return e.map(r=>(0,Pn.jsx)(pJ,{item:r,onSelect:t,setHoveredTransformItemName:o},r.name))}function pJ({item:e,onSelect:t,setHoveredTransformItemName:o}){let{name:r,icon:n,title:i,isDisabled:s}=e;return(0,Pn.jsxs)(Q_.MenuItem,{className:(0,zT.getBlockMenuDefaultClassName)(r),onClick:a=>{a.preventDefault(),t(r)},disabled:s,onMouseLeave:()=>o(null),onMouseEnter:()=>o(r),onFocus:()=>o(r),onBlur:()=>o(null),children:[(0,Pn.jsx)(Oe,{icon:n,showColors:!0}),i]})}var hJ=XEe;var kJ=l(N(),1),vJ=l(A(),1),HT=l(O(),1);var UT=l(A(),1);var ob=l(w(),1),gJ=()=>{};function bJ({stylesToRender:e,activeStyle:t,onSelect:o=gJ,onHoverStyle:r=gJ}){return!e||e.length===0?null:(0,ob.jsx)(ob.Fragment,{children:e.map(n=>{let i=n.label||n.name;return(0,ob.jsx)(UT.MenuItem,{icon:t.name===n.name?Cs:null,onClick:()=>o(n),onFocus:()=>r(n),onBlur:()=>r(null),onMouseEnter:()=>r(n),onMouseLeave:()=>r(null),children:(0,ob.jsx)(UT.__experimentalText,{as:"span",limit:18,ellipsizeMode:"tail",truncate:!0,children:i})},n.name)})})}var J_=l(w(),1);function GT({hoveredBlock:e,onSwitch:t}){let{clientId:o}=e,[r,n]=(0,HT.useState)(null),{onSelect:i,stylesToRender:s,activeStyle:a,genericPreviewBlock:c,className:u}=qg({clientId:o,onSwitch:t}),d=(0,HT.useMemo)(()=>{if(!r||!c)return null;let f=Sd(u,a,r);return[{...c,attributes:{...c.attributes||{},className:f}}]},[r,c,u,a]);return!s||s.length===0?null:(0,J_.jsxs)(vJ.MenuGroup,{label:(0,kJ.__)("Styles"),className:"block-editor-block-switcher__styles__menugroup",children:[d&&(0,J_.jsx)(Cd,{blocks:d}),(0,J_.jsx)(bJ,{stylesToRender:s,activeStyle:a,onSelect:i,onHoverStyle:n})]})}var U3=l(N(),1),CJ=l(O(),1),WT=l(X(),1);var Xs=l(A(),1);var SJ=l(O(),1),xJ=l($(),1);var yJ=l($(),1),j3=(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=j3(s,t,o);if(a)return a}}},_J=(e,t)=>{let o=(0,yJ.getBlockAttributesNamesByRole)(e,"content");return o?.length?o.reduce((r,n)=>(t[n]&&(r[n]=t[n]),r),{}):t};var JEe=(e,t)=>{let o=_J(t.name,t.attributes);e.attributes={...e.attributes,...o}},eTe=(e,t)=>{let o=t.map(n=>(0,xJ.cloneBlock)(n)),r=new Set;for(let n of e){let i=!1;for(let s of o){let a=j3(s,n.name,r);if(a){i=!0,r.add(a.clientId),JEe(a,n);break}}if(!i)return}return o},tTe=(e,t)=>(0,SJ.useMemo)(()=>e.reduce((o,r)=>{let n=eTe(t,r.blocks);return n&&o.push({...r,transformedBlocks:n}),o},[]),[e,t]),wJ=tTe;var xr=l(w(),1);function oTe({blocks:e,patterns:t,onSelect:o}){let[r,n]=(0,CJ.useState)(!1),i=wJ(t,e);return i.length?(0,xr.jsxs)(Xs.MenuGroup,{className:"block-editor-block-switcher__pattern__transforms__menugroup",children:[r&&(0,xr.jsx)(rTe,{patterns:i,onSelect:o}),(0,xr.jsx)(Xs.MenuItem,{onClick:s=>{s.preventDefault(),n(!r)},icon:Uo,children:(0,U3.__)("Patterns")})]}):null}function rTe({patterns:e,onSelect:t}){let o=(0,WT.useViewportMatch)("medium","<");return(0,xr.jsx)("div",{className:"block-editor-block-switcher__popover-preview-container",children:(0,xr.jsx)(Xs.Popover,{className:"block-editor-block-switcher__popover-preview",placement:o?"bottom":"right-start",offset:16,children:(0,xr.jsx)("div",{className:"block-editor-block-switcher__preview is-pattern-list-preview",children:(0,xr.jsx)(nTe,{patterns:e,onSelect:t})})})})}function nTe({patterns:e,onSelect:t}){return(0,xr.jsx)(Xs.Composite,{role:"listbox",className:"block-editor-block-switcher__preview-patterns-container","aria-label":(0,U3.__)("Patterns list"),children:e.map(o=>(0,xr.jsx)(BJ,{pattern:o,onSelect:t},o.name))})}function BJ({pattern:e,onSelect:t}){let o="block-editor-block-switcher__preview-patterns-container",r=(0,WT.useInstanceId)(BJ,`${o}-list__item-description`);return(0,xr.jsxs)("div",{className:`${o}-list__list-item`,children:[(0,xr.jsxs)(Xs.Composite.Item,{render:(0,xr.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,xr.jsx)(Cn,{blocks:e.transformedBlocks,viewportWidth:e.viewportWidth||500}),(0,xr.jsx)("div",{className:`${o}-list__item-title`,children:e.title})]}),!!e.description&&(0,xr.jsx)(Xs.VisuallyHidden,{id:r,children:e.description})]})}var EJ=oTe;var si=l(w(),1);function iTe({onClose:e,clientIds:t}){let{replaceBlocks:o,multiSelect:r,updateBlockAttributes:n}=(0,$T.useDispatch)(x),{possibleBlockTransformations:i,patterns:s,blocks:a,isUsingBindings:c,canRemove:u,hasBlockStyles:d}=(0,$T.useSelect)(P=>{let{getBlockAttributes:R,getBlocksByClientId:E,getBlockRootClientId:L,getBlockTransformItems:T,__experimentalGetPatternTransformItems:I,canRemoveBlocks:M,getBlockName:D}=P(x),{getBlockStyles:U}=P(Bd.store),j=L(t[0]),H=E(t),G=t.length===1,Q=G&&D(t[0]),ie=G&&!!U(Q)?.length;return{blocks:H,possibleBlockTransformations:T(H,j),patterns:I(H,j),isUsingBindings:t.every(ce=>!!R(ce)?.metadata?.bindings),canRemove:M(t),hasBlockStyles:ie}},[t]),f=dJ({clientIds:t,blocks:a});function m(P){P.length>1&&r(P[0].clientId,P[P.length-1].clientId)}function h(P){let R=(0,Bd.switchToBlockType)(a,P);o(t,R),m(R)}function p(P){n(a[0].clientId,{...f.find(({name:R})=>R===P).attributes})}function g(P){o(t,P),m(P)}let b=a.length===1,k=b&&((0,Bd.isTemplatePart)(a[0])||(0,Bd.isReusableBlock)(a[0])),v=!!i?.length&&u&&!k,y=!!f?.length,_=!!s?.length&&u,S=v||y;if(!(d||S||_))return(0,si.jsx)("p",{className:"block-editor-block-switcher__no-transforms",children:(0,za.__)("No transforms.")});let B=b?(0,za._x)("This block is connected.","block toolbar button label and description"):(0,za._x)("These blocks are connected.","block toolbar button label and description");return(0,si.jsxs)("div",{className:"block-editor-block-switcher__container",children:[_&&(0,si.jsx)(EJ,{blocks:a,patterns:s,onSelect:P=>{g(P),e()}}),S&&(0,si.jsx)(hJ,{className:"block-editor-block-switcher__transforms__menugroup",possibleBlockTransformations:i,possibleBlockVariationTransformations:f,blocks:a,onSelect:P=>{h(P),e()},onSelectVariation:P=>{p(P),e()}}),d&&(0,si.jsx)(GT,{hoveredBlock:a[0],onSwitch:e}),c&&(0,si.jsx)(ja.MenuGroup,{children:(0,si.jsx)(ja.__experimentalText,{className:"block-editor-block-switcher__binding-indicator",children:B})})]})}var sTe=({children:e,clientIds:t,label:o,text:r})=>{let i=t.length===1?(0,za.__)("Change block type or style"):(0,za.sprintf)((0,za._n)("Change type of %d block","Change type of %d blocks",t.length),t.length);return(0,si.jsx)(ja.ToolbarGroup,{children:(0,si.jsx)(ja.ToolbarItem,{children:s=>(0,si.jsx)(ja.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,si.jsx)(iTe,{onClose:a,clientIds:t})})})})},TJ=sTe;var IJ=l(N(),1),nb=l(A(),1);var rb=l(w(),1);function PJ({clientIds:e,children:t,label:o,text:r}){return(0,rb.jsx)(nb.ToolbarGroup,{children:(0,rb.jsx)(nb.ToolbarItem,{children:n=>(0,rb.jsx)(nb.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,IJ.__)("Change block style"),...n},menuProps:{orientation:"both"},children:({onClose:i})=>(0,rb.jsx)("div",{className:"block-editor-block-switcher__container",children:(0,rb.jsx)(GT,{hoveredBlock:{clientId:e[0]},onSwitch:i})})})})})}var ib=l(A(),1),eS=l(N(),1),KT=l(O(),1),RJ=l(z(),1);var mc=l(w(),1);function aTe({clientIds:e,blockTitle:t}){let o=(0,RJ.useSelect)(i=>{let{getBlockAttributes:s}=i(x);return s(e?.[0])?.metadata?.name},[e]),r=e.length===1,n;return r&&o?n=(0,eS.sprintf)((0,eS.__)('This %1$s is editable using the "%2$s" override.'),t.toLowerCase(),o):n=(0,eS.__)("These blocks are editable using overrides."),(0,mc.jsx)(ib.__experimentalText,{children:n})}function OJ({icon:e,clientIds:t,blockTitle:o,label:r}){let[n,i]=(0,KT.useState)(!1),s=(0,KT.useRef)();return(0,mc.jsxs)(mc.Fragment,{children:[(0,mc.jsx)(ib.ToolbarButton,{ref:s,className:"block-editor-block-toolbar__pattern-overrides-indicator",icon:e,label:r,onClick:()=>i(!n),"aria-expanded":n}),n&&(0,mc.jsx)(ib.Popover,{anchor:s.current,onClose:()=>i(!1),placement:"bottom-start",offset:16,className:"block-editor-block-toolbar__pattern-overrides-popover",children:(0,mc.jsx)(aTe,{clientIds:t,blockTitle:o})})]})}var sb=l(w(),1);function lTe({select:e,clientIds:t}){let{getBlockName:o,getBlockAttributes:r,getBlockParentsByBlockName:n,canRemoveBlocks:i,getTemplateLock:s,getBlockEditingMode:a,canEditBlock:c}=F(e(x)),{getBlockStyles:u}=e(tS.store),d=t.some(R=>s(R)==="contentOnly"),f=t.length===1,m=f&&o(t[0]),h=f&&!!u(m)?.length,p=t.some(R=>!!r(R)?.metadata?.patternName),g=t.every(R=>pv(r(R)?.metadata?.bindings)),b=t.every(R=>n(R,"core/block",!0).length>0),k=i(t),v=t.every(R=>c(R)),y=a(t[0]),_=y==="default",S=y==="contentOnly",B=!p&&_&&(h||k)&&!d&&v,P=g&&b;return B?"switcher":S&&h&&!g&&v?"styles-only":P?"pattern-overrides":"default"}function cTe({select:e,clientIds:t}){let{getBlockName:o,getBlockAttributes:r}=F(e(x)),n=t.length===1,i=t[0],s=r(i);if(n&&s?.metadata?.patternName)return Ri;let a=o(i),c=(0,tS.getBlockType)(a);if(n){let{getActiveBlockVariation:f}=e(tS.store);return f(a,s)?.icon||c?.icon}let u=t.map(f=>o(f));return new Set(u).size===1?c?.icon:Gf}function DJ({clientIds:e,isSynced:t}){let{icon:o,showIconLabels:r,variant:n}=(0,NJ.useSelect)(f=>({icon:cTe({select:f,clientIds:e}),showIconLabels:f(MJ.store).get("core","showIconLabels"),variant:lTe({select:f,clientIds:e})}),[e]),i=yr({clientId:e?.[0],maximumLength:35}),s=e.length===1,a=s&&t&&!r,c=s?i:(0,LJ.__)("Multiple blocks selected"),u=a&&i?i:void 0,d=(0,sb.jsx)(Oe,{className:"block-editor-block-toolbar__block-icon",icon:o});return n==="switcher"?(0,sb.jsx)(TJ,{clientIds:e,label:c,text:u,children:d}):n==="styles-only"?(0,sb.jsx)(PJ,{clientIds:e,label:c,text:u,children:d}):n==="pattern-overrides"?(0,sb.jsx)(OJ,{icon:d,clientIds:e,blockTitle:i,label:c}):(0,sb.jsx)(AJ.ToolbarButton,{disabled:!0,className:"block-editor-block-toolbar__block-icon-button",title:c,icon:d,text:u})}var ot=l(w(),1);function G3({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,FJ.useSelect)(U=>{let{canEditBlock:j}=U(x),{getBlockName:H,getBlockMode:G,getBlockParents:Q,getSelectedBlockClientIds:ie,isBlockValid:ce,getBlockEditingMode:te,getBlockAttributes:ne,getSettings:Z,getTemplateLock:Y,getParentSectionBlock:J,isZoomOut:K,isSectionBlock:ee,isBlockHiddenAtViewport:re}=F(U(x)),W=ie(),ae=W[0],ge=Q(ae),xe=J(ae)??ge[ge.length-1],De=H(xe),st=(0,pc.getBlockType)(De),Lt=te(ae),no=Lt==="default",jo=H(ae),at=W.every(ze=>ce(ze)),dr=W.every(ze=>G(ze)==="visual"),$t=W.every(ze=>!!ne(ze)?.metadata?.bindings),io=W.some(ze=>Y(ze)==="contentOnly"),Ue=K(),Kt=ee(ae),Je=j(ae),He=Je&&(Ue||Kt),fr=Z()?.[Ti]?.toLowerCase()||"desktop",pn=W.length>0&&W.every(ze=>re(ze,fr));return{blockClientId:ae,blockClientIds:W,isDefaultEditingMode:no,blockType:ae&&(0,pc.getBlockType)(jo),shouldShowVisualToolbar:at&&dr,toolbarKey:`${ae}${xe}`,showParentSelector:!Ue&&st&&Lt!=="contentOnly"&&te(xe)!=="disabled"&&(0,pc.hasBlockSupport)(st,"__experimentalParentSelector",!0)&&W.length===1,isUsingBindings:$t,isSectionContainer:Kt,hasContentOnlyLocking:io,showShuffleButton:Ue,showSlots:!Ue,showGroupButtons:!Ue,showLockButtons:!Ue,showBlockVisibilityButton:!Ue,showSwitchSectionStyleButton:He,areSelectedBlocksHiddenOnViewport:pn,canEdit:Je}},[]),B=(0,H3.useRef)(null),P=(0,H3.useRef)(),R=Fg({ref:P}),E=!(0,zJ.useViewportMatch)("medium","<");if(!wT())return null;let T=s.length>1,I=(0,pc.isReusableBlock)(c)||(0,pc.isTemplatePart)(c),M=V("block-editor-block-contextual-toolbar",{"has-parent":f}),D=V("block-editor-block-toolbar",{"is-synced":I,"is-connected":m});return(0,ot.jsx)(Kg,{focusEditorOnEscape:!0,className:M,"aria-label":(0,VJ.__)("Block tools"),variant:n==="toolbar"?void 0:n,focusOnMount:t,__experimentalInitialIndex:o,__experimentalOnIndexChange:r,children:(0,ot.jsxs)("div",{ref:B,className:D,children:[f&&!T&&E&&(0,ot.jsx)(cX,{}),(d||T)&&(0,ot.jsx)("div",{ref:P,...R,children:(0,ot.jsxs)(jJ.ToolbarGroup,{className:"block-editor-block-toolbar__block-controls",children:[(0,ot.jsx)(DJ,{clientIds:s,isSynced:I}),a&&y&&(0,ot.jsx)(x5,{clientIds:s}),!T&&a&&v&&(0,ot.jsx)(v3,{clientId:i}),(0,ot.jsx)(KE,{clientIds:s,hideDragHandle:e})]})}),!S&&!p&&d&&T&&k&&(0,ot.jsx)(p3,{}),!T&&C&&(0,ot.jsx)(sJ,{clientId:s[0]}),!S&&g&&(0,ot.jsx)(OQ,{clientId:s[0]}),!S&&_&&(0,ot.jsx)(nJ,{clientId:s[0]}),!S&&d&&b&&(0,ot.jsxs)(ot.Fragment,{children:[!h&&(0,ot.jsxs)(ot.Fragment,{children:[(0,ot.jsx)(Dt.Slot,{group:"parent",className:"block-editor-block-toolbar__slot"}),(0,ot.jsx)(Dt.Slot,{group:"block",className:"block-editor-block-toolbar__slot"}),(0,ot.jsx)(Dt.Slot,{className:"block-editor-block-toolbar__slot"}),(0,ot.jsx)(Dt.Slot,{group:"inline",className:"block-editor-block-toolbar__slot"})]}),(0,ot.jsx)(Dt.Slot,{group:"other",className:"block-editor-block-toolbar__slot"}),(0,ot.jsx)(QE.Slot,{})]}),(0,ot.jsx)(_Q,{clientIds:s}),(0,ot.jsx)(vT,{clientIds:s})]})},u)}function UJ({hideDragHandle:e,variant:t}){return(0,ot.jsx)(G3,{hideDragHandle:e,variant:t,focusOnMount:void 0,__experimentalInitialIndex:void 0,__experimentalOnIndexChange:void 0})}var W3=l(w(),1);function WJ({clientId:e,isTyping:t,__unstableContentRef:o}){let{capturingClientId:r,isInsertionPointVisible:n,lastClientId:i}=VE(e),s=(0,ab.useRef)();(0,ab.useEffect)(()=>{s.current=void 0},[e]);let{stopTyping:a}=(0,HJ.useDispatch)(x),c=(0,ab.useRef)(!1);(0,GJ.useShortcut)("core/block-editor/focus-toolbar",()=>{c.current=!0,a(!0)}),(0,ab.useEffect)(()=>{c.current=!1});let u=r||e,d=DE({contentElement:o?.current,clientId:u});return!t&&(0,W3.jsx)(Am,{clientId:u,bottomClientId:i,className:V("block-editor-block-list__block-popover",{"is-insertion-point-visible":n}),resize:!1,...d,__unstableContentRef:o,children:(0,W3.jsx)(G3,{focusOnMount:c.current,__experimentalInitialIndex:s.current,__experimentalOnIndexChange:f=>{s.current=f},variant:"toolbar"})})}var YT=l(z(),1),qT=l(O(),1);var $J=l(A(),1);var KJ=l(N(),1),YJ=l(w(),1);function uTe({onClick:e}){return(0,YJ.jsx)($J.Button,{variant:"primary",icon:Pi,size:"compact",className:V("block-editor-button-pattern-inserter__button","block-editor-block-tools__zoom-out-mode-inserter-button"),onClick:e,label:(0,KJ._x)("Add pattern","Generic label for pattern inserter button")})}var qJ=uTe;var $3=l(w(),1);function dTe(){let[e,t]=(0,qT.useState)(!1),{hasSelection:o,blockOrder:r,setInserterIsOpened:n,sectionRootClientId:i,selectedBlockClientId:s,blockInsertionPoint:a,insertionPointVisible:c}=(0,YT.useSelect)(p=>{let{getSettings:g,getBlockOrder:b,getSelectionStart:k,getSelectedBlockClientId:v,getSectionRootClientId:y,getBlockInsertionPoint:_,isBlockInsertionPointVisible:S}=F(p(x)),C=y();return{hasSelection:!!k().clientId,blockOrder:b(C),sectionRootClientId:C,setInserterIsOpened:g().__experimentalSetIsInserterOpened,selectedBlockClientId:v(),blockInsertionPoint:_(),insertionPointVisible:S()}},[]),{showInsertionPoint:u}=F((0,YT.useDispatch)(x));if((0,qT.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,$3.jsx)(dE,{previousClientId:d,nextClientId:h,children:(0,$3.jsx)(qJ,{onClick:()=>{n({rootClientId:i,insertionIndex:m,tab:"patterns",category:"all"}),u(i,m,{operation:"insert"})}})})}var ZJ=dTe;var XJ=l(z(),1),QJ=l($(),1);function JJ(){return(0,XJ.useSelect)(e=>{let{getSelectedBlockClientId:t,getFirstMultiSelectedBlockClientId:o,getBlock:r,getBlockMode:n,getSettings:i,isTyping:s,isBlockInterfaceHidden:a}=F(e(x)),c=t()||o(),u=r(c),d=!!c&&!!u,f=d&&(0,QJ.isUnmodifiedDefaultBlock)(u,"content")&&n(c)!=="html",m=c&&!s()&&f,h=!a()&&!i().hasFixedToolbar&&!m&&d&&!f;return{showEmptyBlockSideInserter:m,showBlockToolbarPopover:h}},[])}var es=l(w(),1);function fTe(e){let{getSelectedBlockClientId:t,getFirstMultiSelectedBlockClientId:o,getSettings:r,isTyping:n,isDragging:i,isZoomOut:s,getViewportModalClientIds:a}=F(e(x));return{clientId:t()||o(),hasFixedToolbar:r().hasFixedToolbar,isTyping:n(),isZoomOutMode:s(),isDragging:i(),viewportModalClientIds:a()}}function oS({children:e,__unstableContentRef:t,...o}){let{clientId:r,hasFixedToolbar:n,isTyping:i,isZoomOutMode:s,isDragging:a,viewportModalClientIds:c}=(0,lb.useSelect)(fTe,[]),u=(0,eee.__unstableUseShortcutEventMatch)(),{getBlocksByClientId:d,getSelectedBlockClientIds:f,getBlockRootClientId:m,getBlockEditingMode:h,getBlockName:p,isGroupable:g,getEditedContentOnlySection:b,canEditBlock:k}=F((0,lb.useSelect)(x)),{getGroupingBlockName:v}=(0,lb.useSelect)(cb.store),{showEmptyBlockSideInserter:y,showBlockToolbarPopover:_}=JJ(),S=jg(),[C,B]=(0,ZT.useState)(null),{canRename:P}=qm(p(f()[0])),{duplicateBlocks:R,removeBlocks:E,replaceBlocks:L,insertAfterBlock:T,insertBeforeBlock:I,selectBlock:M,moveBlocksUp:D,moveBlocksDown:U,expandBlock:j,stopEditingContentOnlySection:H,showViewportModal:G,hideViewportModal:Q}=F((0,lb.useDispatch)(x));function ie(ne){if(!ne.defaultPrevented){if(u("core/block-editor/move-up",ne)||u("core/block-editor/move-down",ne)){let Z=f();if(Z.length){ne.preventDefault();let Y=m(Z[0]);(u("core/block-editor/move-up",ne)?"up":"down")==="up"?D(Z,Y):U(Z,Y);let K=Array.isArray(Z)?Z.length:1,ee=(0,ub.sprintf)((0,ub._n)("%d block moved.","%d blocks moved.",Z.length),K);(0,q3.speak)(ee)}}else if(u("core/block-editor/duplicate",ne)){let Z=f();Z.length&&(ne.preventDefault(),R(Z))}else if(u("core/block-editor/remove",ne)){let Z=f();Z.length&&(ne.preventDefault(),E(Z))}else if(u("core/block-editor/paste-styles",ne)){let Z=f();if(Z.length){ne.preventDefault();let Y=d(Z);S(Y)}}else if(u("core/block-editor/insert-after",ne)){let Z=f();Z.length&&(ne.preventDefault(),T(Z[Z.length-1]))}else if(u("core/block-editor/insert-before",ne)){let Z=f();Z.length&&(ne.preventDefault(),I(Z[0]))}else if(u("core/block-editor/unselect",ne)){if(ne.target.closest("[role=toolbar]"))return;let Z=f();Z.length>1&&(ne.preventDefault(),M(Z[0]))}else if(u("core/block-editor/collapse-list-view",ne)){if((0,K3.isTextField)(ne.target)||(0,K3.isTextField)(ne.target?.contentWindow?.document?.activeElement))return;ne.preventDefault(),j(r)}else if(u("core/block-editor/group",ne)){let Z=f();if(Z.length>1&&g(Z)){ne.preventDefault();let Y=d(Z),J=v(),K=(0,cb.switchToBlockType)(Y,J);L(Z,K),(0,q3.speak)((0,ub.__)("Selected blocks are grouped."))}}else if(u("core/block-editor/rename",ne)){let Z=f();if(Z.length===1){let Y=h(Z[0])==="contentOnly";P&&!Y&&k(Z[0])&&(ne.preventDefault(),B(Z[0]))}}else if(u("core/block-editor/toggle-block-visibility",ne)){let Z=f();if(Z.length){if(ne.preventDefault(),!d(Z).every(K=>(0,cb.hasBlockSupport)(K.name,"visibility",!0))||Z.some(K=>h(K)!=="default"||!k(K)))return;G(Z)}}u("core/block-editor/stop-editing-as-blocks",ne)&&b()&&H()}}let ce=Om(t),te=Om(t);return(0,es.jsxs)("div",{...o,onKeyDown:ie,className:V(o.className,{"block-editor-block-tools--is-dragging":a}),children:[(0,es.jsxs)(Ag.Provider,{value:(0,ZT.useRef)(!1),children:[!i&&!s&&(0,es.jsx)(Pq,{__unstableContentRef:t}),y&&(0,es.jsx)($Z,{__unstableContentRef:t,clientId:r}),_&&(0,es.jsx)(WJ,{__unstableContentRef:t,clientId:r,isTyping:i}),!s&&!n&&(0,es.jsx)(Y3.Popover.Slot,{name:"block-toolbar",ref:ce}),e,(0,es.jsx)(Y3.Popover.Slot,{name:"__unstable-block-tools-after",ref:te}),s&&!a&&(0,es.jsx)(ZJ,{__unstableContentRef:t})]}),C&&(0,es.jsx)(Km,{clientId:C,onClose:()=>B(null)}),c&&(0,es.jsx)(v5,{clientIds:c,onClose:Q})]})}var ts=l(N(),1),Ua=l($(),1),hc=l(z(),1),Z3=l(oee(),1);var mTe=()=>function(){let{replaceBlocks:t,multiSelect:o}=(0,hc.useDispatch)(x),{blocks:r,clientIds:n,canRemove:i,possibleBlockTransformations:s,invalidSelection:a}=(0,hc.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,Ua.isTemplatePart)(r[0]);function u(h){h.length>1&&o(h[0].clientId,h[h.length-1].clientId)}function d(h){let p=(0,Ua.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:Sv}:b;return{name:"core/block-editor/transform-to-"+p.replace("/","-"),label:(0,ts.sprintf)((0,ts.__)("Transform to %s"),g),icon:k?.src,category:"command",callback:({close:v})=>{d(p),v()}}})}},pTe=()=>function(){let{clientIds:t,isUngroupable:o,isGroupable:r}=(0,hc.useSelect)(I=>{let{getSelectedBlockClientIds:M,isUngroupable:D,isGroupable:U}=I(x);return{clientIds:M(),isUngroupable:D(),isGroupable:U()}},[]),{canInsertBlockType:n,getBlockRootClientId:i,getBlocksByClientId:s,canRemoveBlocks:a,isBlockHiddenAnywhere:c}=F((0,hc.useSelect)(x)),{getBlockEditingMode:u}=(0,hc.useSelect)(x),{getDefaultBlockName:d,getGroupingBlockName:f}=(0,hc.useSelect)(Ua.store),m=s(t),h=(0,hc.useDispatch)(x),{removeBlocks:p,replaceBlocks:g,duplicateBlocks:b,insertAfterBlock:k,insertBeforeBlock:v}=h,y=()=>{if(!m.length)return;let I=f(),M=(0,Ua.switchToBlockType)(m,I);M&&g(t,M)},_=()=>{if(!m.length)return;let I=m[0].innerBlocks;I.length&&g(t,I)};if(!t||t.length<1)return{isLoading:!1,commands:[]};let{showViewportModal:S}=F(h),C=i(t[0]),B=n(d(),C),P=m.every(I=>!!I&&(0,Ua.hasBlockSupport)(I.name,"multiple",!0)&&n(I.name,C)),R=a(t),E=[];P&&E.push({name:"duplicate",label:(0,ts.__)("Duplicate"),callback:()=>b(t,!0),icon:Gf}),B&&E.push({name:"add-before",label:(0,ts.__)("Add before"),callback:()=>{let I=Array.isArray(t)?t[0]:I;v(I)},icon:Pi},{name:"add-after",label:(0,ts.__)("Add after"),callback:()=>{let I=Array.isArray(t)?t[t.length-1]:I;k(I)},icon:Pi}),r&&E.push({name:"Group",label:(0,ts.__)("Group"),callback:y,icon:Ev}),o&&E.push({name:"ungroup",label:(0,ts.__)("Ungroup"),callback:_,icon:CM}),R&&E.push({name:"remove",label:(0,ts.__)("Delete"),callback:()=>p(t,!0),icon:xM});let L=m.every(I=>!!I&&(0,Ua.hasBlockSupport)(I.name,"visibility",!0)),T=t.every(I=>u(I)==="default");if(L&&T){let I=t.some(M=>c(M));E.push({name:"toggle-visibility",label:I?(0,ts.__)("Show"):(0,ts.__)("Hide"),callback:()=>S(t),icon:I?Qf:Es})}return{isLoading:!1,commands:E.map(I=>({...I,name:"core/block-editor/action-"+I.name,category:"command",callback:({close:M})=>{I.callback(),M()}}))}},XT=()=>{(0,Z3.useCommandLoader)({name:"core/block-editor/blockTransforms",hook:mTe()}),(0,Z3.useCommandLoader)({name:"core/block-editor/blockQuickActions",hook:pTe(),context:"block-selection-edit"})};var on=l(w(),1),QT=(0,see.createSlotFill)(Symbol("BlockCanvasCover"));function ree({children:e}){return(0,on.jsx)("div",{className:"block-canvas-cover",style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",pointerEvents:"none"},children:e})}var hTe={ignoredSelectors:[/\.editor-styles-wrapper/gi]};function X3({shouldIframe:e=!0,height:t="300px",children:o=(0,on.jsx)(dg,{}),styles:r,contentRef:n,iframeProps:i}){XT();let s=(0,JT.useViewportMatch)("medium","<"),a=B_(),c=Lm(),u=(0,nee.useRef)(),d=(0,JT.useMergeRefs)([n,c,u]),f=(0,iee.useSelect)(h=>F(h(x)).getZoomLevel(),[]),m=f!==100&&!s?{scale:f,frameSize:"40px"}:{};return e?(0,on.jsx)(oS,{__unstableContentRef:u,style:{height:t,display:"flex"},children:(0,on.jsxs)(rg,{...i,...m,ref:a,contentRef:d,style:{...i?.style},name:"editor-canvas",children:[(0,on.jsx)(QT.Slot,{fillProps:{containerRef:u},children:h=>h.map((p,g)=>(0,on.jsx)(ree,{children:p},g))}),(0,on.jsx)(Gl,{styles:r}),o]})}):(0,on.jsxs)(oS,{__unstableContentRef:u,style:{height:t,display:"flex"},children:[(0,on.jsx)(QT.Slot,{fillProps:{containerRef:u},children:h=>h.map((p,g)=>(0,on.jsx)(ree,{children:p},g))}),(0,on.jsx)(Gl,{styles:r,scope:":where(.editor-styles-wrapper)",transformOptions:hTe}),(0,on.jsx)(rB,{ref:d,className:"editor-styles-wrapper",tabIndex:-1,style:{height:"100%",width:"100%",overflow:"auto"},children:o})]})}function gTe({children:e,height:t,styles:o}){return(0,on.jsx)(X3,{height:t,styles:o,children:e})}var aee=gTe;var Ha=l(A(),1),lee=l(N(),1),cee=l(ct(),1),uee=l(Pe(),1),os=l(w(),1),bTe=()=>(0,os.jsx)(Ha.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",children:(0,os.jsx)(Ha.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"})}),kTe=({style:e,className:t})=>(0,os.jsx)("div",{className:"block-library-colors-selector__icon-container",children:(0,os.jsx)("div",{className:`${t} block-library-colors-selector__state-selection`,style:e,children:(0,os.jsx)(bTe,{})})}),vTe=({TextColor:e,BackgroundColor:t})=>function({onToggle:r,isOpen:n}){let i=s=>{!n&&s.keyCode===cee.DOWN&&(s.preventDefault(),r())};return(0,os.jsx)(Ha.ToolbarGroup,{children:(0,os.jsx)(Ha.ToolbarButton,{className:"components-toolbar__control block-library-colors-selector__toggle",label:(0,lee.__)("Open Colors Selector"),onClick:r,onKeyDown:i,icon:(0,os.jsx)(t,{children:(0,os.jsx)(e,{children:(0,os.jsx)(kTe,{})})})})})},yTe=({children:e,...t})=>((0,uee.default)("wp.blockEditor.BlockColorsStyleSelector",{alternative:"block supports API",since:"6.1",version:"6.3"}),(0,os.jsx)(Ha.Dropdown,{popoverProps:{placement:"bottom-start"},className:"block-library-colors-selector",contentClassName:"block-library-colors-selector__popover",renderToggle:vTe(t),renderContent:()=>e})),dee=yTe;var bte=l(Pe(),1),gI=l(A(),1),r4=l(N(),1),kte=l(z(),1),vte=l(O(),1);var bb=l(X(),1),pI=l(A(),1),iS=l(z(),1),hte=l(Pe(),1),Co=l(O(),1),o4=l(N(),1);var cI=l(A(),1),uI=l(O(),1),dI=l(z(),1);var mee=l(X(),1),pee=l(er(),1),hee=l(z(),1),nI=l(O(),1),db=l(N(),1);var eI=l(O(),1),tI=(0,eI.createContext)({});tI.displayName="ListViewContext";var Ed=()=>(0,eI.useContext)(tI);var oI=l(O(),1),fee=l(w(),1);function rI({children:e,...t}){let o=(0,oI.useRef)();return(0,oI.useEffect)(()=>{o.current&&(o.current.textContent=o.current.textContent)},[e]),(0,fee.jsx)("div",{hidden:!0,...t,ref:o,children:e})}var rS=l(w(),1),Q3=(0,nI.forwardRef)(({nestingLevel:e,blockCount:t,clientId:o,...r},n)=>{let{insertedBlock:i,setInsertedBlock:s}=Ed(),a=(0,mee.useInstanceId)(Q3),{directInsert:c,hideInserter:u}=(0,hee.useSelect)(p=>{let{getBlockListSettings:g,getTemplateLock:b,isZoomOut:k}=F(p(x)),y=g(o)?.directInsert||!1,_=!!b(o)||k();return{directInsert:y,hideInserter:_}},[o]),d=yr({clientId:o,context:"list-view"}),f=yr({clientId:i?.clientId,context:"list-view"});if((0,nI.useEffect)(()=>{f?.length&&(0,pee.speak)((0,db.sprintf)((0,db.__)("%s block inserted"),f),"assertive")},[f]),u)return null;let m=`list-view-appender__${a}`,h=(0,db.sprintf)((0,db.__)("Append to %1$s block at position %2$d, Level %3$d"),d,t+1,e);return(0,rS.jsxs)("div",{className:"list-view-appender",children:[(0,rS.jsx)(Ki,{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,rS.jsx)(rI,{id:m,children:h})]})});var Pd=l($(),1),Xm=l(A(),1),aI=l(X(),1);var wo=l(O(),1),mb=l(z(),1),e4=l(N(),1),lI=l(ct(),1),zee=l(S_(),1),jee=l(Ds(),1),Uee=l(er(),1);var gee=l(A(),1),bee=l(X(),1),kee=l(O(),1);var vee=l(w(),1),_Te=LH(gee.__experimentalTreeGridRow),STe=(0,kee.forwardRef)(({isDragged:e,isSelected:t,position:o,level:r,rowCount:n,children:i,className:s,path:a,...c},u)=>{let d=w1({clientId:c["data-block"],enableAnimation:!0,triggerAnimationOnChange:a}),f=(0,bee.useMergeRefs)([u,d]);return(0,vee.jsx)(_Te,{ref:f,className:V("block-editor-list-view-leaf",s),level:r,positionInSet:o,setSize:n,isExpanded:void 0,...c,children:i})}),yee=STe;var _ee=l(Fe(),1),See=l(O(),1);function xee({isSelected:e,selectedClientIds:t,rowItemRef:o}){let r=t.length===1;(0,See.useLayoutEffect)(()=>{if(!e||!r||!o.current)return;let n=(0,_ee.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 Oee=l(O(),1);var Td=l(A(),1),Iee=l(O(),1);var sI=l(ct(),1),Pee=l(z(),1);var wee=l(N(),1),J3=l(w(),1);function iI({onClick:e}){return(0,J3.jsx)("span",{className:"block-editor-list-view__expander",onClick:t=>e(t,{forceToggle:!0}),"aria-hidden":"true","data-testid":"list-view-expander",children:(0,J3.jsx)(we,{icon:(0,wee.isRTL)()?xv:pu})})}var Cee=l(O(),1),Bee=l(z(),1);var xTe=3,Eee={"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?Eee[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>=xTe)return t}return t}};function wTe(e,t){let o=Eee[e.name],r=o?o(e):void 0;return r?Array.isArray(r)?t?[]:r:[r]:[]}function Tee({clientId:e,isExpanded:t}){let{block:o}=(0,Bee.useSelect)(n=>({block:n(x).getBlock(e)}),[e]);return(0,Cee.useMemo)(()=>wTe(o,t),[o,t])}var Wo=l(w(),1),{Badge:CTe}=F(Td.privateApis);function BTe({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=It(t),g=yr({clientId:t,context:"list-view"}),{isLocked:b}=ni(t),{hasPatternName:k,blockVisibility:v}=(0,Pee.useSelect)(R=>{let{getBlockAttributes:E}=F(R(x)),L=E(t);return{hasPatternName:!!L?.metadata?.patternName,blockVisibility:L?.metadata?.blockVisibility}},[t]),y=b,_=p?.positionType==="sticky",S=Tee({clientId:t,isExpanded:f}),C=zy(v),B=R=>{R.dataTransfer.clearData(),c?.(R)};function P(R){(R.keyCode===sI.ENTER||R.keyCode===sI.SPACE)&&o(R)}return(0,Wo.jsxs)("a",{className:V("block-editor-list-view-block-select-button",e),onClick:o,onContextMenu:r,onKeyDown:P,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,Wo.jsx)(iI,{onClick:i}),(0,Wo.jsx)(Oe,{icon:k?Ri:p?.icon,showColors:!0,context:"list-view"}),(0,Wo.jsxs)(Td.__experimentalHStack,{alignment:"center",className:"block-editor-list-view-block-select-button__label-wrapper",justify:"flex-start",spacing:1,children:[(0,Wo.jsx)("span",{className:"block-editor-list-view-block-select-button__title",children:(0,Wo.jsx)(Td.__experimentalTruncate,{ellipsizeMode:"auto",children:g})}),p?.anchor&&(0,Wo.jsx)("span",{className:"block-editor-list-view-block-select-button__anchor-wrapper",children:(0,Wo.jsx)(CTe,{className:"block-editor-list-view-block-select-button__anchor",children:p.anchor})}),_&&(0,Wo.jsx)("span",{className:"block-editor-list-view-block-select-button__sticky",children:(0,Wo.jsx)(we,{icon:IN})}),S.length?(0,Wo.jsx)("span",{className:"block-editor-list-view-block-select-button__images","aria-hidden":!0,children:S.map((R,E)=>(0,Wo.jsx)("span",{className:"block-editor-list-view-block-select-button__image",style:{backgroundImage:`url(${R.url})`,zIndex:S.length-E}},R.clientId))}):null,!!C&&(0,Wo.jsx)(Td.Tooltip,{text:C,children:(0,Wo.jsx)("span",{className:"block-editor-list-view-block-select-button__block-visibility","aria-hidden":"true",children:(0,Wo.jsx)(we,{icon:Es})})}),y&&(0,Wo.jsx)("span",{className:"block-editor-list-view-block-select-button__lock",children:(0,Wo.jsx)(we,{icon:_N})})]})]})}var Ree=(0,Iee.forwardRef)(BTe);var Id=l(w(),1),ETe=(0,Oee.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}=Ed(),g=c.includes(f)?c:[f];return(0,Id.jsxs)(Id.Fragment,{children:[m&&(0,Id.jsx)(m,{block:o,insertedBlock:h,setInsertedBlock:p}),(0,Id.jsx)(jE,{appendToOwnerDocument:!0,clientIds:g,cloneClassname:"block-editor-list-view-draggable-chip",children:({draggable:b,onDragStart:k,onDragEnd:v})=>(0,Id.jsx)(Ree,{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})})]})}),Aee=ETe;var Zm=l(N(),1),Lee=l(Fe(),1),Nee=(e,t,o)=>(0,Zm.sprintf)((0,Zm.__)("Block %1$d of %2$d, Level %3$d."),e,t,o),Mee=(e,t)=>[e?.positionLabel?`${(0,Zm.sprintf)((0,Zm.__)("Position: %s"),e.positionLabel)}.`:void 0,t?(0,Zm.__)("This block is locked."):void 0].filter(Boolean).join(" "),Dee=(e,t)=>Array.isArray(t)&&t.length?t.indexOf(e)!==-1:t===e;function Vee(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 fb(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&&Lee.focus.focusable.find(r)?.[0]?.focus()})}function Fee({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 rr=l(w(),1);function Hee({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,wo.useRef)(null),v=(0,wo.useRef)(null),y=(0,wo.useRef)(null),[_,S]=(0,wo.useState)(!1),[C,B]=(0,wo.useState)(),[P,R]=(0,wo.useState)(!1),{isLocked:E}=ni(e),L=i&&g[0]===e,T=i&&g[g.length-1]===e,{toggleBlockHighlight:I,duplicateBlocks:M,multiSelect:D,replaceBlocks:U,removeBlocks:j,insertAfterBlock:H,insertBeforeBlock:G,showViewportModal:Q}=F((0,mb.useDispatch)(x)),ie=(0,aI.useDebounce)(I,50),{canInsertBlockType:ce,getSelectedBlockClientIds:te,getPreviousBlockClientId:ne,getBlockRootClientId:Z,getBlockOrder:Y,getBlockParents:J,getBlockEditingMode:K,getBlocksByClientId:ee,canEditBlock:re,canMoveBlock:W,canRemoveBlocks:ae,isGroupable:ge}=(0,mb.useSelect)(x),{getGroupingBlockName:fe}=(0,mb.useSelect)(Pd.store),xe=It(e),De=jg(),{block:st,blockName:Lt,allowRightClickOverrides:no}=(0,mb.useSelect)(ue=>{let{getBlock:ao,getBlockName:ye,getSettings:Nt}=F(ue(x));return{block:ao(e),blockName:ye(e),allowRightClickOverrides:Nt().allowRightClickOverrides}},[e]),{canRename:jo}=qm(Lt),at=(0,Pd.hasBlockSupport)(Lt,"__experimentalToolbar",!0),$t=`list-view-block-select-button__description-${(0,aI.useInstanceId)(Hee)}`,{expand:io,collapse:Ue,collapseAll:Kt,BlockSettingsMenu:Je,listViewInstanceId:He,expandedState:fr,setInsertedBlock:pn,treeGridElementRef:ze,rootClientId:so}=Ed(),et=(0,jee.__unstableUseShortcutEventMatch)();function Ve(){let ue=te(),ao=ue.includes(e),ye=ao?ue[0]:e,Nt=Z(ye);return{blocksToUpdate:ao?ue:[e],firstBlockClientId:ye,firstBlockRootClientId:Nt,selectedBlockClientIds:ue}}async function yt(ue){if(ue.defaultPrevented||ue.target.closest("[role=dialog]"))return;let ao=[lI.BACKSPACE,lI.DELETE].includes(ue.keyCode);if(et("core/block-editor/unselect",ue)&&g.length>0)ue.stopPropagation(),ue.preventDefault(),a(ue,void 0);else if(ao||et("core/block-editor/remove",ue)){let{blocksToUpdate:ye,firstBlockClientId:Nt,firstBlockRootClientId:gn,selectedBlockClientIds:Ir}=Ve();if(!ae(ye))return;let ru=ne(Nt)??gn;j(ye,!1);let aA=Ir.length>0&&te().length===0;ru||(ru=Y()[0]),Bt(ru,aA)}else if(et("core/block-editor/paste-styles",ue)){ue.preventDefault();let{blocksToUpdate:ye}=Ve(),Nt=ee(ye);De(Nt)}else if(et("core/block-editor/duplicate",ue)){ue.preventDefault();let{blocksToUpdate:ye,firstBlockRootClientId:Nt}=Ve();if(ee(ye).every(Ir=>!!Ir&&(0,Pd.hasBlockSupport)(Ir.name,"multiple",!0)&&ce(Ir.name,Nt))){let Ir=await M(ye,!1);Ir?.length&&Bt(Ir[0],!1)}}else if(et("core/block-editor/insert-before",ue)){ue.preventDefault();let{blocksToUpdate:ye}=Ve();await G(ye[0]);let Nt=te();Bt(Nt[0],!1)}else if(et("core/block-editor/insert-after",ue)){ue.preventDefault();let{blocksToUpdate:ye}=Ve();await H(ye.at(-1));let Nt=te();Bt(Nt[0],!1)}else if(et("core/block-editor/select-all",ue)){ue.preventDefault();let{firstBlockRootClientId:ye,selectedBlockClientIds:Nt}=Ve(),gn=Y(ye);if(!gn.length)return;if((0,zee.isShallowEqual)(Nt,gn)&&ye&&ye!==so){Bt(ye,!0);return}D(gn[0],gn[gn.length-1],null)}else if(et("core/block-editor/collapse-list-view",ue)){ue.preventDefault();let{firstBlockClientId:ye}=Ve(),Nt=J(ye,!1);Kt(),io(Nt)}else if(et("core/block-editor/group",ue)){let{blocksToUpdate:ye}=Ve();if(ye.length>1&&ge(ye)){ue.preventDefault();let Nt=ee(ye),gn=fe(),Ir=(0,Pd.switchToBlockType)(Nt,gn);U(ye,Ir),(0,Uee.speak)((0,e4.__)("Selected blocks are grouped."));let ru=te();Bt(ru[0],!1)}}else if(et("core/block-editor/toggle-block-visibility",ue)){ue.preventDefault();let{blocksToUpdate:ye}=Ve();if(!ee(ye).every(Ir=>(0,Pd.hasBlockSupport)(Ir.name,"visibility",!0))||ye.some(Ir=>K(Ir)!=="default"))return;Q(ye)}else if(et("core/block-editor/rename",ue)){let{blocksToUpdate:ye}=Ve(),Nt=K(ye[0])==="contentOnly";ye.length===1&&jo&&!Nt&&(ue.preventDefault(),R(!0))}}let Oo=(0,wo.useCallback)(()=>{S(!0),ie(e,!0)},[e,S,ie]),mr=(0,wo.useCallback)(()=>{S(!1),ie(e,!1)},[e,S,ie]),be=(0,wo.useCallback)(ue=>{a(ue,e),ue.preventDefault()},[e,a]),Bt=(0,wo.useCallback)((ue,ao)=>{ao&&a(void 0,ue,null,null),fb(ue,ze?.current)},[a,ze]),Ao=(0,wo.useCallback)(ue=>{ue.preventDefault(),ue.stopPropagation(),p===!0?Ue(e):p===!1&&io(e)},[e,io,Ue,p]),qe=(0,wo.useCallback)(ue=>{let{ownerDocument:ao}=y?.current||{};!ao||!ao.hasFocus()||at&&no&&(y.current?.click(),B(new window.DOMRect(ue.clientX,ue.clientY,0,0)),ue.preventDefault())},[no,y,at]),oe=(0,wo.useCallback)(ue=>{no&&ue.button===2&&ue.preventDefault()},[no]),Ne=(0,wo.useMemo)(()=>{let{ownerDocument:ue}=v?.current||{};if(!(!C||!ue))return{ownerDocument:ue,getBoundingClientRect(){return C}}},[C]),mt=(0,wo.useCallback)(()=>{B(void 0)},[B]);if(xee({isSelected:i,rowItemRef:v,selectedClientIds:g}),!st)return null;let ou=Nee(c,f,u),ba=Mee(xe,E),qp=zy(st?.attributes?.metadata?.blockVisibility),uv=f>0,Lf=m&&uv,hn=V("block-editor-list-view-block__mover-cell",{"is-visible":_||i}),Zp=V("block-editor-list-view-block__menu-cell",{"is-visible":_||L}),Xp;Lf?Xp=2:at||(Xp=3);let N0=V({"is-selected":i,"is-first-selected":L,"is-last-selected":T,"is-branch-selected":s,"is-synced-branch":b,"is-dragging":r,"has-single-cell":!at,"is-synced":xe?.isSynced,"is-draggable":W,"is-displacement-normal":t==="normal","is-displacement-up":t==="up","is-displacement-down":t==="down","is-after-dragged-blocks":o,"is-nesting":n}),M0=g.includes(e)?g:[e],dv=i&&g.length===1;return(0,rr.jsxs)(yee,{className:N0,isDragged:r,onKeyDown:yt,onMouseEnter:Oo,onMouseLeave:mr,onFocus:Oo,onBlur:mr,level:u,position:c,rowCount:d,path:h,id:`list-view-${He}-block-${e}`,"data-block":e,"data-expanded":re?p:void 0,ref:v,children:[(0,rr.jsx)(Xm.__experimentalTreeGridCell,{className:"block-editor-list-view-block__contents-cell",colSpan:Xp,ref:k,"aria-selected":!!i,children:({ref:ue,tabIndex:ao,onFocus:ye})=>(0,rr.jsxs)("div",{className:"block-editor-list-view-block__contents-container",children:[(0,rr.jsx)(Aee,{block:st,onClick:be,onContextMenu:qe,onMouseDown:oe,onToggleExpanded:Ao,isSelected:i,position:c,siblingBlockCount:f,level:u,ref:ue,tabIndex:dv?0:ao,onFocus:ye,isExpanded:re?p:void 0,selectedClientIds:g,ariaDescribedBy:$t}),(0,rr.jsx)(rI,{id:$t,children:[ou,ba,qp].filter(Boolean).join(" ")})]})}),Lf&&(0,rr.jsx)(rr.Fragment,{children:(0,rr.jsxs)(Xm.__experimentalTreeGridCell,{className:hn,withoutGridItem:!0,children:[(0,rr.jsx)(Xm.__experimentalTreeGridItem,{children:({ref:ue,tabIndex:ao,onFocus:ye})=>(0,rr.jsx)(WE,{orientation:"vertical",clientIds:[e],ref:ue,tabIndex:ao,onFocus:ye})}),(0,rr.jsx)(Xm.__experimentalTreeGridItem,{children:({ref:ue,tabIndex:ao,onFocus:ye})=>(0,rr.jsx)($E,{orientation:"vertical",clientIds:[e],ref:ue,tabIndex:ao,onFocus:ye})})]})}),at&&Je&&(0,rr.jsx)(Xm.__experimentalTreeGridCell,{className:Zp,"aria-selected":!!i,ref:y,children:({ref:ue,tabIndex:ao,onFocus:ye})=>(0,rr.jsx)(Je,{clientIds:M0,block:st,icon:Bs,label:(0,e4.__)("Options"),popoverProps:{anchor:Ne},toggleProps:{ref:ue,className:"block-editor-list-view-block__menu",tabIndex:ao,onClick:mt,onFocus:ye,size:"small"},disableOpenOnArrowDown:!0,expand:io,expandedState:fr,setInsertedBlock:pn,__experimentalSelectBlock:Bt,isContentOnlyListView:!!so&&K(so)==="contentOnly"})}),P&&(0,rr.jsx)(Km,{clientId:e,onClose:()=>R(!1)})]})}var Gee=(0,wo.memo)(Hee);var ai=l(w(),1);function Wee(e,t,o,r){return o?.includes(e.clientId)?0:t[e.clientId]??r?1+e.innerBlocks.reduce(TTe(t,o,r),0):1}var TTe=(e,t,o)=>(r,n)=>t?.includes(n.clientId)?r:(e[n.clientId]??o)&&n.innerBlocks.length>0?r+Wee(n,e,t,o):r+1,ITe=()=>{};function $ee(e){let{blocks:t,selectBlock:o=ITe,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=It(f),b=h||!!g?.isSynced,k=(0,dI.useSelect)(I=>f?I(x).canEditBlock(f):!0,[f]),{blockDropPosition:v,blockDropTargetIndex:y,firstDraggedBlockIndex:_,blockIndexes:S,expandedState:C,draggedClientIds:B}=Ed(),P=(0,uI.useRef)();if(!k)return null;let R=p&&i===1,E=t.filter(Boolean),L=E.length,T=R?L+1:L;return P.current=c,(0,ai.jsxs)(ai.Fragment,{children:[E.map((I,M)=>{let{clientId:D,innerBlocks:U}=I;M>0&&(P.current+=Wee(E[M-1],C,B,d));let j=!!B?.includes(D),{displacement:H,isAfterDraggedBlocks:G,isNesting:Q}=Fee({blockIndexes:S,blockDropTargetIndex:y,blockDropPosition:v,clientId:D,firstDraggedBlockIndex:_,isDragged:j}),{itemInView:ie}=u,ce=ie(P.current),te=M+1,ne=s.length>0?`${s}_${te}`:`${te}`,Z=!!U?.length,Y=Z&&m?C[D]??d:void 0,J=Dee(D,n),K=a||J&&Z,ee=j||ce||J&&D===n[0]||M===0||M===L-1;return(0,ai.jsxs)(dI.AsyncModeProvider,{value:!J,children:[ee&&(0,ai.jsx)(Gee,{block:I,selectBlock:o,isSelected:J,isBranchSelected:K,isDragged:j,level:i,position:te,rowCount:T,siblingBlockCount:L,showBlockMovers:r,path:ne,isExpanded:j?!1:Y,listPosition:P.current,selectedClientIds:n,isSyncedBranch:b,displacement:H,isAfterDraggedBlocks:G,isNesting:Q}),!ee&&(0,ai.jsx)("tr",{children:(0,ai.jsx)("td",{className:"block-editor-list-view-placeholder"})}),Z&&Y&&!j&&(0,ai.jsx)($ee,{parentId:D,blocks:U,selectBlock:o,showBlockMovers:r,level:i+1,path:ne,listPosition:P.current+1,fixedListWindow:u,isBranchSelected:K,selectedClientIds:n,isExpanded:d,isSyncedBranch:b})]},D)}),R&&(0,ai.jsx)(cI.__experimentalTreeGridRow,{level:i,setSize:T,positionInSet:T,isExpanded:!0,children:(0,ai.jsx)(cI.__experimentalTreeGridCell,{children:I=>(0,ai.jsx)(Q3,{clientId:f,nestingLevel:i,blockCount:L,...I})})})]})}var Kee=(0,uI.memo)($ee);var pb=l(A(),1),fI=l(Fe(),1),gc=l(O(),1),t4=l(N(),1);var rs=l(w(),1);function Yee({draggedBlockClientId:e,listViewRef:t,blockDropTarget:o}){let r=It(e),n=yr({clientId:e,context:"list-view"}),{rootClientId:i,clientId:s,dropPosition:a}=o||{},[c,u]=(0,gc.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,t4.isRTL)(),m=(0,gc.useCallback)((v,y)=>{if(!d)return 0;let _=d.offsetWidth,S=(0,fI.getScrollContainer)(d,"horizontal"),C=d.ownerDocument,B=S===C.body||S===C.documentElement;if(S&&!B){let P=S.getBoundingClientRect(),R=(0,t4.isRTL)()?P.right-v.right:v.left-P.left,E=S.clientWidth;if(E<_+R&&(_=E-R),!f&&v.left+y<P.left)return _-=P.left-v.left,_;if(f&&v.right-y>P.right)return _-=v.right-P.right,_}return _-y},[f,d]),h=(0,gc.useMemo)(()=>{if(!d)return{};let v=d.getBoundingClientRect();return{width:m(v,0)}},[m,d]),p=(0,gc.useMemo)(()=>{if(!d)return{};let v=(0,fI.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,gc.useMemo)(()=>{if(!c)return 1;let v=parseInt(c.getAttribute("aria-level"),10);return v?v+1:1},[c]),b=(0,gc.useMemo)(()=>d?d.classList.contains("is-branch-selected"):!1,[d]),k=(0,gc.useMemo)(()=>{if(!(!d||!(a==="top"||a==="bottom"||a==="inside")))return{contextElement:d,getBoundingClientRect(){let y=d.getBoundingClientRect(),_=y.left,S=0,C=(0,fI.getScrollContainer)(d,"horizontal"),B=d.ownerDocument,P=C===B.body||C===B.documentElement;if(C&&!P){let L=C.getBoundingClientRect(),T=f?C.offsetWidth-C.clientWidth:0;_<L.left+T&&(_=L.left+T)}a==="top"?S=y.top-y.height*2:S=y.top;let R=m(y,0),E=y.height;return new window.DOMRect(_,S,R,E)}}},[d,a,m,f]);return d?(0,rs.jsx)(pb.Popover,{animate:!1,anchor:k,focusOnMount:!1,className:"block-editor-list-view-drop-indicator--preview",variant:"unstyled",flip:!1,resize:!0,children:(0,rs.jsx)("div",{style:h,className:V("block-editor-list-view-drop-indicator__line",{"block-editor-list-view-drop-indicator__line--darker":b}),children:(0,rs.jsxs)("div",{className:"block-editor-list-view-leaf","aria-level":g,children:[(0,rs.jsxs)("div",{className:V("block-editor-list-view-block-select-button","block-editor-list-view-block-contents"),style:p,children:[(0,rs.jsx)(iI,{onClick:()=>{}}),(0,rs.jsx)(Oe,{icon:r?.icon,showColors:!0,context:"list-view"}),(0,rs.jsx)(pb.__experimentalHStack,{alignment:"center",className:"block-editor-list-view-block-select-button__label-wrapper",justify:"flex-start",spacing:1,children:(0,rs.jsx)("span",{className:"block-editor-list-view-block-select-button__title",children:(0,rs.jsx)(pb.__experimentalTruncate,{ellipsizeMode:"auto",children:n})})})]}),(0,rs.jsx)("div",{className:"block-editor-list-view-block__menu-cell"})]})})}):null}var qee=l(er(),1),hb=l(N(),1),nS=l(z(),1),Zee=l(O(),1),li=l(ct(),1),Xee=l($(),1);function Qee(){let{clearSelectedBlock:e,multiSelect:t,selectBlock:o}=(0,nS.useDispatch)(x),{getBlockName:r,getBlockParents:n,getBlockSelectionStart:i,getSelectedBlockClientIds:s,hasMultiSelection:a,hasSelectedBlock:c}=(0,nS.useSelect)(x),{getBlockType:u}=(0,nS.useSelect)(Xee.store);return{updateBlockSelection:(0,Zee.useCallback)(async(f,m,h,p)=>{if(!f?.shiftKey&&f?.keyCode!==li.ESCAPE){o(m,p);return}f.preventDefault();let g=f.type==="keydown"&&f.keyCode===li.ESCAPE,b=f.type==="keydown"&&(f.keyCode===li.UP||f.keyCode===li.DOWN||f.keyCode===li.HOME||f.keyCode===li.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 P=n(C),R=n(B),{start:E,end:L}=Vee(C,B,P,R);await t(E,L,null)}let y=s();if((f.keyCode===li.HOME||f.keyCode===li.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,hb.sprintf)((0,hb.__)("%s deselected."),C))}else _.length>1&&(S=(0,hb.sprintf)((0,hb.__)("%s blocks deselected."),_.length));S&&(0,qee.speak)(S,"assertive")},[e,r,u,n,i,s,a,c,t,o])}}var Jee=l(O(),1);function ete(e){return(0,Jee.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 tte=l(z(),1);function ote({blocks:e,rootClientId:t}){return(0,tte.useSelect)(o=>{let{getDraggedBlockClientIds:r,getSelectedBlockClientIds:n,getEnabledClientIdsTree:i}=F(o(x));return{selectedClientIds:n(),draggedClientIds:r(),clientIdsTree:e??i(t)}},[e,t])}var rte=l(O(),1),nte=l(z(),1);function ite({collapseAll:e,expand:t}){let{expandedBlock:o,getBlockParents:r}=(0,nte.useSelect)(n=>{let{getBlockParents:i,getExpandedBlock:s}=F(n(x));return{expandedBlock:s(),getBlockParents:i}},[]);(0,rte.useEffect)(()=>{if(o){let n=r(o,!1);e(),t(n)}},[e,t,o,r])}var ste=l(z(),1),Qm=l(O(),1),Jm=l(X(),1),ate=l(N(),1);var bc=24;function PTe(e,t,o=1,r=!1){let n=r?t.right-o*bc:t.left+o*bc;return r?e.x>n:e.x<n}function RTe(e,t,o=1,r=!1){let n=r?t.right-o*bc:t.left+o*bc,i=r?n-e.x:e.x-n,s=Math.round(i/bc);return Math.abs(s)}function OTe(e,t){let o=[],r=e;for(;r;)o.push({...r}),r=t.find(n=>n.clientId===r.rootClientId);return o}function lte(e,t){let o=e[t+1];return o&&o.isDraggedBlock?lte(e,t+1):o}function ATe(e,t,o=1,r=!1){let n=r?t.right-o*bc:t.left+o*bc;return(r?e.x<n-bc:e.x>n+bc)&&e.y<t.bottom}var LTe=["top","bottom"];function NTe(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]=Mm(t,h,LTe),b=vE(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=OTe(n,e),u=r==="bottom";if(u&&n.canInsertDraggedBlocksAsChild&&(n.innerBlockCount>0&&n.isExpanded||ATe(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&&PTe(t,s,c.length,o)){let f=lte(e,a),m=n.nestingLevel,h=f?f.nestingLevel:1;if(m&&h){let p=RTe(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 MTe={leading:!1,trailing:!0};function cte({dropZoneElement:e,expandedState:t,setExpandedState:o}){let{getBlockRootClientId:r,getBlockIndex:n,getBlockCount:i,getDraggedBlockClientIds:s,canInsertBlocks:a}=(0,ste.useSelect)(x),[c,u]=(0,Qm.useState)(),{rootClientId:d,blockIndex:f}=c||{},m=kE(d,f),h=(0,ate.isRTL)(),p=(0,Jm.usePrevious)(d),g=(0,Qm.useCallback)((_,S)=>{let{rootClientId:C}=S||{};C&&S?.dropPosition==="inside"&&!_[C]&&o({type:"expand",clientIds:[C]})},[o]),b=(0,Jm.useThrottle)(g,500,MTe);(0,Qm.useEffect)(()=>{if(c?.dropPosition!=="inside"||p!==c?.rootClientId){b.cancel();return}b(t,c)},[t,p,c,b]);let k=s(),v=(0,Jm.useThrottle)((0,Qm.useCallback)((_,S)=>{let C={x:_.clientX,y:_.clientY},B=!!k?.length,R=Array.from(S.querySelectorAll("[data-block]")).map(L=>{let T=L.dataset.block,I=L.dataset.expanded==="true",M=L.classList.contains("is-dragging"),D=parseInt(L.getAttribute("aria-level"),10),U=r(T);return{clientId:T,isExpanded:I,rootClientId:U,blockIndex:n(T),element:L,nestingLevel:D||void 0,isDraggedBlock:B?M:!1,innerBlockCount:i(T),canInsertDraggedBlocksAsSibling:B?a(k,U):!0,canInsertDraggedBlocksAsChild:B?a(k,T):!0}}),E=NTe(R,C,h);E&&u(E)},[a,k,i,n,r,h]),50);return{ref:(0,Jm.__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 mI=l(O(),1),ute=l(z(),1);function dte({firstSelectedBlockClientId:e,setExpandedState:t}){let[o,r]=(0,mI.useState)(null),{selectedBlockParentClientIds:n}=(0,ute.useSelect)(i=>{let{getBlockParents:s}=i(x);return{selectedBlockParentClientIds:s(e,!1)}},[e]);return(0,mI.useEffect)(()=>{o!==e&&n?.length&&t({type:"expand",clientIds:n})},[e,n,o,t]),{setSelectedTreeId:r}}var gb=l(z(),1),fte=l(X(),1);function mte({selectBlock:e}){let t=(0,gb.useRegistry)(),{getBlockOrder:o,getBlockRootClientId:r,getBlocksByClientId:n,getPreviousBlockClientId:i,getSelectedBlockClientIds:s,getSettings:a,canInsertBlockType:c,canRemoveBlocks:u}=(0,gb.useSelect)(x),{flashBlock:d,removeBlocks:f,replaceBlocks:m,insertBlocks:h}=(0,gb.useDispatch)(x),p=Jh();return(0,fte.useRefEffect)(g=>{function b(y,_){_&&e(void 0,y,null,null),fb(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:P,originallySelectedBlockClientIds:R}=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);tB(y,E,t)}if(y.type==="cut"){if(!u(C))return;let E=i(B)??P;f(C,!1);let L=R.length>0&&s().length===0;E||(E=o()[0]),b(E,L)}else if(y.type==="paste"){let{__experimentalCanUserUseUnfilteredHTML:E}=a(),L=xW(y,E);if(C.length===1){let[T]=C;if(L.every(I=>c(I.name,T))){h(L,void 0,T),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 kc=l(w(),1),DTe=(e,t)=>t.type==="clear"?{}:Array.isArray(t.clientIds)?{...e,...t.clientIds.reduce((o,r)=>({...o,[r]:t.type==="expand"}),{})}:e,pte=32;function gte({id:e,blocks:t,dropZoneElement:o,showBlockMovers:r=!1,isExpanded:n=!1,showAppender:i=!1,blockSettingsMenu:s=w3,rootClientId:a,description:c,onSelect:u,additionalBlockContent:d},f){t&&(0,hte.default)("`blocks` property in `wp.blockEditor.__experimentalListView`",{since:"6.3",alternative:"`rootClientId` property"});let m=(0,bb.useInstanceId)(gte),{clientIdsTree:h,draggedClientIds:p,selectedClientIds:g}=ote({blocks:t,rootClientId:a}),b=ete(h),{getBlock:k,getSelectedBlockClientIds:v}=(0,iS.useSelect)(x),{visibleBlockCount:y}=(0,iS.useSelect)(re=>{let{getGlobalBlockCount:W,getClientIdsOfDescendants:ae}=re(x),ge=p?.length>0?ae(p).length+1:0;return{visibleBlockCount:W()-ge}},[p]),{updateBlockSelection:_}=Qee(),[S,C]=(0,Co.useReducer)(DTe,{}),[B,P]=(0,Co.useState)(null),{setSelectedTreeId:R}=dte({firstSelectedBlockClientId:g[0],setExpandedState:C}),E=(0,Co.useCallback)((re,W,ae)=>{_(re,W,null,ae),R(W),u&&u(k(W))},[R,_,u,k]),{ref:L,target:T}=cte({dropZoneElement:o,expandedState:S,setExpandedState:C}),I=(0,Co.useRef)(),M=mte({selectBlock:E}),D=(0,Co.useCallback)(re=>{let[W]=v();W&&re&&fb(W,re)},[v]),U=(0,bb.useMergeRefs)([M,D,I,L,f]),j=(0,Co.useCallback)(re=>{if(!re)return;let W=Array.isArray(re)?re:[re];C({type:"expand",clientIds:W})},[C]),H=(0,Co.useCallback)(re=>{re&&C({type:"collapse",clientIds:[re]})},[C]),G=(0,Co.useCallback)(()=>{C({type:"clear"})},[C]),Q=(0,Co.useCallback)(re=>{j(re?.dataset?.block)},[j]),ie=(0,Co.useCallback)(re=>{H(re?.dataset?.block)},[H]),ce=(0,Co.useCallback)((re,W,ae)=>{re.shiftKey&&_(re,W?.dataset?.block,ae?.dataset?.block)},[_]);ite({collapseAll:G,expand:j});let te=p?.[0],{blockDropTargetIndex:ne,blockDropPosition:Z,firstDraggedBlockIndex:Y}=(0,Co.useMemo)(()=>{let re,W;if(T?.clientId){let ae=b[T.clientId];re=ae===void 0||T?.dropPosition==="top"?ae:ae+1}else T===null&&(re=null);if(te){let ae=b[te];W=ae===void 0||T?.dropPosition==="top"?ae:ae+1}return{blockDropTargetIndex:re,blockDropPosition:T?.dropPosition,firstDraggedBlockIndex:W}},[T,b,te]),J=(0,Co.useMemo)(()=>({blockDropPosition:Z,blockDropTargetIndex:ne,blockIndexes:b,draggedClientIds:p,expandedState:S,expand:j,firstDraggedBlockIndex:Y,collapse:H,collapseAll:G,BlockSettingsMenu:s,listViewInstanceId:m,AdditionalBlockContent:d,insertedBlock:B,setInsertedBlock:P,treeGridElementRef:I,rootClientId:a}),[Z,ne,b,p,S,j,Y,H,G,s,m,d,B,P,a]),[K]=(0,bb.__experimentalUseFixedWindowList)(I,pte,y,{expandedState:S,useWindowing:!0,windowOverscan:40});if(!h.length&&!i)return null;let ee=c&&`block-editor-list-view-description-${m}`;return(0,kc.jsxs)(iS.AsyncModeProvider,{value:!0,children:[(0,kc.jsx)(Yee,{draggedBlockClientId:te,listViewRef:I,blockDropTarget:T}),c&&(0,kc.jsx)(pI.VisuallyHidden,{id:ee,children:c}),(0,kc.jsx)(pI.__experimentalTreeGrid,{id:e,className:V("block-editor-list-view-tree",{"is-dragging":p?.length>0&&ne!==void 0}),"aria-label":(0,o4.__)("Block navigation structure"),ref:U,onCollapseRow:ie,onExpandRow:Q,onFocusRow:ce,applicationAriaLabel:(0,o4.__)("Block navigation structure"),"aria-describedby":ee,style:{"--wp-admin--list-view-dragged-items-height":p?.length?`${pte*(p.length-1)}px`:null},children:(0,kc.jsx)(tI.Provider,{value:J,children:(0,kc.jsx)(Kee,{blocks:h,parentId:a,selectBlock:E,showBlockMovers:r,fixedListWindow:K,selectedClientIds:g,isExpanded:n,showAppender:i})})})]})}var sS=(0,Co.forwardRef)(gte),hI=(0,Co.forwardRef)((e,t)=>(0,kc.jsx)(sS,{ref:t,...e,showAppender:!1,rootClientId:null,onSelect:null,additionalBlockContent:null,blockSettingsMenu:void 0}));var Rd=l(w(),1);function VTe({isEnabled:e,onToggle:t,isOpen:o,innerRef:r,...n}){return(0,Rd.jsx)(gI.Button,{__next40pxDefaultSize:!0,...n,ref:r,icon:Iv,"aria-expanded":o,"aria-haspopup":"true",onClick:e?t:void 0,label:(0,r4.__)("List view"),className:"block-editor-block-navigation","aria-disabled":!e})}function FTe({isDisabled:e,...t},o){(0,bte.default)("wp.blockEditor.BlockNavigationDropdown",{since:"6.1",alternative:"wp.components.Dropdown and wp.blockEditor.ListView"});let n=(0,kte.useSelect)(i=>!!i(x).getBlockCount(),[])&&!e;return(0,Rd.jsx)(gI.Dropdown,{contentClassName:"block-editor-block-navigation__popover",popoverProps:{placement:"bottom-start"},renderToggle:({isOpen:i,onToggle:s})=>(0,Rd.jsx)(VTe,{...t,innerRef:o,isOpen:i,onToggle:s,isEnabled:n}),renderContent:()=>(0,Rd.jsxs)("div",{className:"block-editor-block-navigation__container",children:[(0,Rd.jsx)("p",{className:"block-editor-block-navigation__label",children:(0,r4.__)("List view")}),(0,Rd.jsx)(hI,{})]})})}var yte=(0,vte.forwardRef)(FTe);var aS=l(O(),1),Ste=l(z(),1),xte=l(X(),1),Od=l(A(),1),n4=l(N(),1);var vc=l(w(),1),_te=()=>{};function zTe({clientId:e,onSwitch:t=_te,onHoverClassName:o=_te}){let r=(0,Ste.useSelect)(S=>S(x).canEditBlock(e),[e]),{onSelect:n,stylesToRender:i,activeStyle:s,genericPreviewBlock:a,className:c}=qg({clientId:e,onSwitch:t}),[u,d]=(0,aS.useState)(null),[f,m]=(0,aS.useState)(null),h=No(),p=(0,aS.useMemo)(()=>{if(!u||!a)return null;let S=Sd(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,xte.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=ET(i),y=()=>s?.name!==v?.name,_=()=>{b(v)};return(0,vc.jsx)(Od.__experimentalToolsPanel,{label:(0,n4.__)("Styles"),resetAll:_,panelId:e,hasInnerWrapper:!0,dropdownMenuProps:h,children:(0,vc.jsx)(Od.__experimentalToolsPanelItem,{hasValue:y,label:(0,n4.__)("Variation"),onDeselect:_,isShownByDefault:!0,panelId:e,children:(0,vc.jsxs)("div",{ref:m,className:"block-editor-block-styles",children:[(0,vc.jsx)("div",{className:"block-editor-block-styles__variants",children:i.map(S=>{let C=S.label||S.name;return(0,vc.jsx)(Od.Button,{__next40pxDefaultSize:!0,className:V("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,vc.jsx)(Od.__experimentalTruncate,{numberOfLines:1,className:"block-editor-block-styles__item-text",children:C})},S.name)})}),p&&(0,vc.jsx)(Cd,{blocks:p,placement:"left-start",offset:34,anchor:f})]})})})}var kb=zTe;var Tte=l(A(),1),vb=l(N(),1);var Cte=l(A(),1),Bte=l(w(),1),wte={0:BN,1:NL,2:DL,3:FL,4:jL,5:HL,6:WL};function i4({level:e}){return wte[e]?(0,Bte.jsx)(Cte.Icon,{icon:wte[e]}):null}var bI=l(w(),1),Ete=[1,2,3,4,5,6],jTe={className:"block-library-heading-level-dropdown"};function Ite({options:e=Ete,value:t,onChange:o}){let r=e.filter(n=>n===0||Ete.includes(n)).sort((n,i)=>n-i);return(0,bI.jsx)(Tte.ToolbarDropdownMenu,{popoverProps:jTe,icon:(0,bI.jsx)(i4,{level:t}),label:(0,vb.__)("Change level"),controls:r.map(n=>{let i=n===t;return{icon:(0,bI.jsx)(i4,{level:n}),title:n===0?(0,vb.__)("Paragraph"):(0,vb.sprintf)((0,vb.__)("Heading %d"),n),isActive:i,onClick(){o(n)},role:"menuitemradio"}})})}var lS=l(N(),1),cS=l(A(),1);var yc=l(w(),1);function UTe({icon:e=pN,label:t=(0,lS.__)("Choose variation"),instructions:o=(0,lS.__)("Select a variation to start with:"),variations:r,onSelect:n,allowSkip:i}){let s=V("block-editor-block-variation-picker",{"has-many-variations":r.length>4});return(0,yc.jsxs)(cS.Placeholder,{icon:e,label:t,instructions:o,className:s,children:[(0,yc.jsx)("ul",{className:"block-editor-block-variation-picker__variations",role:"list","aria-label":(0,lS.__)("Block variations"),children:r.map(a=>(0,yc.jsxs)("li",{children:[(0,yc.jsx)(cS.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,yc.jsx)("span",{className:"block-editor-block-variation-picker__variation-label",children:a.title})]},a.name))}),i&&(0,yc.jsx)("div",{className:"block-editor-block-variation-picker__skip",children:(0,yc.jsx)(cS.Button,{__next40pxDefaultSize:!0,variant:"link",onClick:()=>n(),children:(0,lS.__)("Skip")})})]})}var Pte=UTe;var Lte=l(z(),1),Nte=l($(),1),_b=l(A(),1),s4=l(O(),1),a4=l(X(),1),Mte=l(N(),1);var _c=l(N(),1),yb=l(A(),1);var Ad={carousel:"carousel",grid:"grid"};var ci=l(w(),1),HTe=({onBlockPatternSelect:e})=>(0,ci.jsx)("div",{className:"block-editor-block-pattern-setup__actions",children:(0,ci.jsx)(yb.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:e,children:(0,_c.__)("Choose")})}),GTe=({handlePrevious:e,handleNext:t,activeSlide:o,totalSlides:r})=>(0,ci.jsxs)("div",{className:"block-editor-block-pattern-setup__navigation",children:[(0,ci.jsx)(yb.Button,{size:"compact",icon:(0,_c.isRTL)()?Uo:Gr,label:(0,_c.__)("Previous pattern"),onClick:e,disabled:o===0,accessibleWhenDisabled:!0}),(0,ci.jsx)(yb.Button,{size:"compact",icon:(0,_c.isRTL)()?Gr:Uo,label:(0,_c.__)("Next pattern"),onClick:t,disabled:o===r-1,accessibleWhenDisabled:!0})]}),WTe=({viewMode:e,setViewMode:t,handlePrevious:o,handleNext:r,activeSlide:n,totalSlides:i,onBlockPatternSelect:s})=>{let a=e===Ad.carousel,c=(0,ci.jsxs)("div",{className:"block-editor-block-pattern-setup__display-controls",children:[(0,ci.jsx)(yb.Button,{size:"compact",icon:Wv,label:(0,_c.__)("Carousel view"),onClick:()=>t(Ad.carousel),isPressed:a}),(0,ci.jsx)(yb.Button,{size:"compact",icon:Bv,label:(0,_c.__)("Grid view"),onClick:()=>t(Ad.grid),isPressed:e===Ad.grid})]});return(0,ci.jsxs)("div",{className:"block-editor-block-pattern-setup__toolbar",children:[a&&(0,ci.jsx)(GTe,{handlePrevious:o,handleNext:r,activeSlide:n,totalSlides:i}),c,a&&(0,ci.jsx)(HTe,{onBlockPatternSelect:s})]})},Rte=WTe;var Ote=l(z(),1);function $Te(e,t,o){return(0,Ote.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 Ate=$Te;var jt=l(w(),1),KTe=({viewMode:e,activeSlide:t,patterns:o,onBlockPatternSelect:r,showTitles:n})=>{let i="block-editor-block-pattern-setup__container";if(e===Ad.carousel){let s=new Map([[t,"active-slide"],[t-1,"previous-slide"],[t+1,"next-slide"]]);return(0,jt.jsx)("div",{className:"block-editor-block-pattern-setup__carousel",children:(0,jt.jsx)("div",{className:i,children:(0,jt.jsx)("div",{className:"carousel-container",children:o.map((a,c)=>(0,jt.jsx)(Vte,{active:c===t,className:s.get(c)||"",pattern:a},a.name))})})})}return(0,jt.jsx)("div",{className:"block-editor-block-pattern-setup__grid",children:(0,jt.jsx)(_b.Composite,{role:"listbox",className:i,"aria-label":(0,Mte.__)("Patterns list"),children:o.map(s=>(0,jt.jsx)(Dte,{pattern:s,onSelect:r,showTitles:n},s.name))})})};function Dte({pattern:e,onSelect:t,showTitles:o}){let r="block-editor-block-pattern-setup-list",{blocks:n,description:i,viewportWidth:s=700}=e,a=(0,a4.useInstanceId)(Dte,`${r}__item-description`);return(0,jt.jsx)("div",{className:`${r}__list-item`,children:(0,jt.jsxs)(_b.Composite.Item,{render:(0,jt.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,jt.jsx)(Cn,{blocks:n,viewportWidth:s}),o&&(0,jt.jsx)("div",{className:`${r}__item-title`,children:e.title}),!!i&&(0,jt.jsx)(_b.VisuallyHidden,{id:a,children:i})]})})}function Vte({active:e,className:t,pattern:o,minHeight:r}){let{blocks:n,title:i,description:s}=o,a=(0,a4.useInstanceId)(Vte,"block-editor-block-pattern-setup-list__item-description");return(0,jt.jsxs)("div",{"aria-hidden":!e,role:"img",className:`pattern-slide ${t}`,"aria-label":i,"aria-describedby":s?a:void 0,children:[(0,jt.jsx)(Cn,{blocks:n,minHeight:r}),!!s&&(0,jt.jsx)(_b.VisuallyHidden,{id:a,children:s})]})}var YTe=({clientId:e,blockName:t,filterPatternsFn:o,onBlockPatternSelect:r,initialViewMode:n=Ad.carousel,showTitles:i=!1})=>{let[s,a]=(0,s4.useState)(n),[c,u]=(0,s4.useState)(0),{replaceBlock:d}=(0,Lte.useDispatch)(x),f=Ate(e,t,o);if(!f?.length)return null;let h=r||(p=>{let g=p.map(b=>(0,Nte.cloneBlock)(b));d(e,g)});return(0,jt.jsx)(jt.Fragment,{children:(0,jt.jsxs)("div",{className:`block-editor-block-pattern-setup view-mode-${s}`,children:[(0,jt.jsx)(KTe,{viewMode:s,activeSlide:c,patterns:f,onBlockPatternSelect:h,showTitles:i}),(0,jt.jsx)(Rte,{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)}})]})})},Fte=YTe;var l4=l($(),1),Sc=l(N(),1),Qs=l(A(),1),kI=l(z(),1),zte=l(O(),1);var Do=l(w(),1),{Menu:ep}=F(Qs.privateApis);function qTe({className:e,onSelectVariation:t,selectedValue:o,variations:r}){return(0,Do.jsxs)("fieldset",{className:e,children:[(0,Do.jsx)(Qs.VisuallyHidden,{as:"legend",children:(0,Sc.__)("Transform to variation")}),r.map(n=>(0,Do.jsx)(Qs.Button,{__next40pxDefaultSize:!0,size:"compact",icon:(0,Do.jsx)(Oe,{icon:n.icon,showColors:!0}),isPressed:o===n.name,label:o===n.name?n.title:(0,Sc.sprintf)((0,Sc.__)("Transform to %s"),n.title),onClick:()=>t(n.name),"aria-label":n.title,showTooltip:!0},n.name))]})}function ZTe({className:e,onSelectVariation:t,selectedValue:o,variations:r}){return(0,Do.jsx)("div",{className:e,children:(0,Do.jsxs)(ep,{children:[(0,Do.jsx)(ep.TriggerButton,{render:(0,Do.jsx)(Qs.Button,{className:"block-editor-block-variation-transforms__button",__next40pxDefaultSize:!0,variant:"secondary",children:(0,Sc.__)("Transform to variation")})}),(0,Do.jsx)(ep.Popover,{position:"bottom",children:(0,Do.jsx)(ep.Group,{children:r.map(n=>(0,Do.jsxs)(ep.RadioItem,{value:n.name,checked:o===n.name,onChange:()=>t(n.name),children:[(0,Do.jsx)(ep.ItemLabel,{children:n.title}),n.description&&(0,Do.jsx)(ep.ItemHelpText,{children:n.description})]},n.name))})})]})})}function XTe({className:e,onSelectVariation:t,selectedValue:o,variations:r}){return(0,Do.jsx)("div",{className:e,children:(0,Do.jsx)(Qs.__experimentalToggleGroupControl,{label:(0,Sc.__)("Transform to variation"),value:o,hideLabelFromVision:!0,onChange:t,__next40pxDefaultSize:!0,children:r.map(n=>(0,Do.jsx)(Qs.__experimentalToggleGroupControlOptionIcon,{icon:(0,Do.jsx)(Oe,{icon:n.icon,showColors:!0}),value:n.name,label:o===n.name?n.title:(0,Sc.sprintf)((0,Sc.__)("Transform to %s"),n.title)},n.name))})})}function QTe({blockClientId:e}){let{updateBlockAttributes:t}=(0,kI.useDispatch)(x),{activeBlockVariation:o,variations:r,canEdit:n,isContentOnly:i,isSection:s}=(0,kI.useSelect)(p=>{let{getActiveBlockVariation:g,getBlockVariations:b}=p(l4.store),{getBlockName:k,getBlockAttributes:v,getBlockEditingMode:y,isSectionBlock:_}=F(p(x)),{canEditBlock:S}=p(x),C=e&&k(e),{hasContentRoleAttribute:B}=F(p(l4.store)),P=B(C);return{activeBlockVariation:g(C,v(e),"transform"),variations:C&&b(C,"transform"),canEdit:S(e),isContentOnly:y(e)==="contentOnly"&&!P,isSection:_(e)}},[e]),a=o?.name,c=(0,zte.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?qTe:XTe;return(0,Do.jsx)(c?m:ZTe,{className:d,onSelectVariation:u,selectedValue:a,variations:r})}var vI=QTe;var tp=l(N(),1),yI=l(A(),1);var jte=l(w(),1),c4={top:{icon:dN,title:(0,tp._x)("Align top","Block vertical alignment setting")},center:{icon:eN,title:(0,tp._x)("Align middle","Block vertical alignment setting")},bottom:{icon:QL,title:(0,tp._x)("Align bottom","Block vertical alignment setting")},stretch:{icon:lN,title:(0,tp._x)("Stretch to fill","Block vertical alignment setting")},"space-between":{icon:iN,title:(0,tp._x)("Space between","Block vertical alignment setting")}},JTe=["top","center","bottom"],eIe="top";function tIe({value:e,onChange:t,controls:o=JTe,isCollapsed:r=!0,isToolbar:n}){function i(d){return()=>t(e===d?void 0:d)}let s=c4[e],a=c4[eIe],c=n?yI.ToolbarGroup:yI.ToolbarDropdownMenu,u=n?{isCollapsed:r}:{};return(0,jte.jsx)(c,{icon:s?s.icon:a.icon,label:(0,tp._x)("Change vertical alignment","Block vertical alignment setting label"),controls:o.map(d=>({...c4[d],isActive:e===d,role:r?"menuitemradio":void 0,onClick:i(d)})),...u})}var u4=tIe;var d4=l(w(),1),LC=e=>(0,d4.jsx)(u4,{...e,isToolbar:!1}),Ute=e=>(0,d4.jsx)(u4,{...e,isToolbar:!0});var Rn=l(A(),1),uS=l(O(),1),xI=l(N(),1);var Hte=l(A(),1);var f4=l(N(),1),Gte=l(w(),1);function Wte({isLinked:e,...t}){let o=e?(0,f4.__)("Unlink radii"):(0,f4.__)("Link radii");return(0,Gte.jsx)(Hte.Button,{...t,className:"components-border-radius-control__linked-button",size:"small",icon:e?kn:Ii,iconSize:24,label:o})}var $te=l(A(),1);function oIe(e){return[...e].sort((o,r)=>e.filter(n=>n===r).length-e.filter(n=>n===o).length).shift()}function Kte(e={}){if(typeof e=="string")return e;let t=Object.values(e).map(a=>{let c=(0,$te.__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=oIe(r);return n===0||n?`${n}${i||""}`:void 0}function Yte(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 qte(e){return e?typeof e=="string"?!0:!!Object.values(e).filter(o=>!!o||o===0).length:!1}var ns=l(A(),1),toe=l(X(),1),Nd=l(N(),1);var op=l(O(),1);var m4=24,Zte=8,_I={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 Ld=(e,t)=>e?.includes?e==="0"||e.includes(`var:preset|${t}|`):!1;function Xte(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 Qte(e,t,o){if(e===void 0)return 0;let r=parseFloat(e,10)===0?"0":Xte(e,o),n=t.findIndex(i=>String(i.slug)===r);return n!==-1?n:NaN}function p4(e,t,o){if(!Ld(e,o))return e;let r=parseFloat(e,10)===0?"0":Xte(e,o);return t.find(i=>String(i.slug)===r)?.size}function Jte(e,t,o){if(!e||Ld(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 Sb=l(A(),1),xc=l(w(),1);function eoe({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,xc.jsx)(Sb.__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,xc.jsxs)(xc.Fragment,{children:[d?(0,xc.jsx)(Sb.Tooltip,{text:t,placement:"top",children:(0,xc.jsx)("div",{className:"preset-input-control__tooltip-wrapper",children:y})}):y,(0,xc.jsx)(Sb.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 Md=l(w(),1);function rp({allowNegativeOnDrag:e=!1,ariaLabel:t,className:o,customValueSettings:r=_I,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,op.useMemo)(()=>Jte(a,h,p),[a,h,p]),y=o??"preset-input-control",_=h.slice(1,h.length-1).map((K,ee)=>({value:ee+1,label:void 0})),S=_.length>0,C=h.length<=Zte,B=s?(0,Nd.__)("Mixed"):null,[P,R]=(0,op.useState)(c),[E,L]=(0,op.useState)(!n&&v!==void 0&&!Ld(v,p)),T=null,I=(0,toe.usePrevious)(v);(0,op.useEffect)(()=>{v&&I!==v&&!Ld(v,p)&&E!==!0&&L(!0)},[v,I,p,E]);let M=!C&&!E&&v!==void 0&&(!Ld(v,p)||Ld(v,p)&&s),D=h;M?(D=[...h,{name:s?(0,Nd.__)("Mixed"):(0,Nd.sprintf)((0,Nd.__)("Custom (%s)"),v),slug:"custom",size:v}],T=D.length-1):s||(T=E?p4(v,h,p):Qte(v,h,p));let U=D.map((K,ee)=>({key:ee,name:K.name})),j=Ld(v,p)?p4(v,h,p):v,[H,G]=(0,ns.__experimentalParseQuantityAndUnitFromRawValue)(j),Q=G||g||"px",ie=k?.find(K=>K.value===Q),ce=ie?.step??r[Q]?.steps??.1,te=ie?.max??r[Q]?.max??10,ne=K=>{let re=!isNaN(parseFloat(K))?K:void 0;re!==void 0&&u(re)},Z=K=>{u([K,Q].join(""))},Y=K=>v===void 0?void 0:h[K]?.name,J=(K,ee)=>{let re=parseInt(K,10);if(ee==="selectList"){if(re===0&&h[0]?.slug==="0")return"0";if(re===0)return}else if(re===0)return"0";return`var:preset|${p}|${h[K]?.slug}`};return(0,Md.jsxs)(ns.__experimentalHStack,{className:`preset-input-control__wrapper ${y}__wrapper`,children:[i&&(0,Md.jsx)(ns.Icon,{className:"preset-input-control__icon",icon:i,size:m4}),(!S||E)&&(0,Md.jsx)(eoe,{allowNegativeOnDrag:e,ariaLabel:t,allPlaceholder:B,minValue:P,parsedQuantity:H,computedUnit:Q,units:k,isMixed:s,step:ce,max:te,showTooltip:b,value:v,minimumCustomValue:c,onCustomValueChange:ne,onCustomValueSliderChange:Z,onUnitChange:m,onMouseOut:d,onMouseOver:f,setMinValue:R}),S&&C&&!E&&(0,Md.jsx)(ns.RangeControl,{"aria-valuenow":T,"aria-valuetext":h[T]?.name,className:"preset-input-control__preset-range",hideLabelFromVision:!0,initialPosition:0,label:t,max:h.length-1,marks:_,min:0,onBlur:d,onChange:K=>u(J(K)),onFocus:f,onMouseDown:K=>{K?.nativeEvent?.offsetX<35&&v===void 0&&u("0")},onMouseOut:d,onMouseOver:f,renderTooltipContent:Y,step:1,value:T,withInputField:!1,__next40pxDefaultSize:!0}),S&&!C&&!E&&(0,Md.jsx)(ns.CustomSelectControl,{className:"preset-input-control__custom-select-control",hideLabelFromVision:!0,label:t,onBlur:d,onChange:K=>{M&&K.selectedItem.key===U.length-1?L(!0):u(J(K.selectedItem.key,"selectList"))},onFocus:f,onMouseOut:d,onMouseOver:f,options:U,size:"__unstable-large",value:U.find(K=>K.key===T)||""}),S&&!n&&(0,Md.jsx)(ns.Button,{className:"preset-input-control__custom-toggle",icon:XN,iconSize:m4,isPressed:E,label:E?(0,Nd.__)("Use preset"):(0,Nd.__)("Set custom value"),onClick:()=>{L(!E)},size:"small"})]})}var xb=l(N(),1);var ooe=8,SI=[],h4={all:(0,xb.__)("Border radius"),topLeft:(0,xb.__)("Top left"),topRight:(0,xb.__)("Top right"),bottomLeft:(0,xb.__)("Bottom left"),bottomRight:(0,xb.__)("Bottom right")},g4={all:tL,topLeft:nL,topRight:iL,bottomLeft:oL,bottomRight:rL},b4=0;var wc=l(w(),1);function rIe(e){let t=e?.default??SI,o=e?.custom??SI,r=e?.theme??SI;return(0,uS.useMemo)(()=>{let n=[{name:(0,xI.__)("None"),slug:"0",size:0},...o,...r,...t];return n.length>ooe?[{name:(0,xI.__)("Default"),slug:"default",size:void 0},...n]:n},[o,r,t])}function roe(e,t){return t==="all"?Kte(e):typeof e=="string"?e:e?.[t]}function noe(e,t){return t==="all"?e.flat:e[t]}function ioe(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 soe(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 wI({onChange:e,values:t,presets:o}){let[r,n]=(0,uS.useState)(!qte(t)||!Yte(t)),i=rIe(o),[s,a]=(0,uS.useState)({flat:typeof t=="string"?(0,Rn.__experimentalParseQuantityAndUnitFromRawValue)(t)[1]:void 0,topLeft:(0,Rn.__experimentalParseQuantityAndUnitFromRawValue)(t?.topLeft)[1],topRight:(0,Rn.__experimentalParseQuantityAndUnitFromRawValue)(t?.topRight)[1],bottomLeft:(0,Rn.__experimentalParseQuantityAndUnitFromRawValue)(t?.bottomLeft)[1],bottomRight:(0,Rn.__experimentalParseQuantityAndUnitFromRawValue)(t?.bottomRight)[1]}),[c]=he("spacing.units"),u=(0,Rn.__experimentalUseCustomUnits)({availableUnits:c||["px","em","rem"]}),d=()=>n(!r);return(0,wc.jsxs)("fieldset",{className:"components-border-radius-control",children:[(0,wc.jsxs)(Rn.__experimentalHStack,{className:"components-border-radius-control__header",children:[(0,wc.jsx)(Rn.BaseControl.VisualLabel,{as:"legend",children:(0,xI.__)("Radius")}),(0,wc.jsx)(Wte,{onClick:d,isLinked:r})]}),r?(0,wc.jsx)(rp,{ariaLabel:h4.all,className:"components-border-radius-control",icon:g4.all,minimumCustomValue:b4,onChange:ioe("all",t,e),onUnitChange:soe("all",s,a),presets:i,presetType:"border-radius",selectedUnit:noe(s,"all"),showTooltip:!0,units:u,value:roe(t,"all")}):(0,wc.jsx)(Rn.__experimentalVStack,{children:["topLeft","topRight","bottomLeft","bottomRight"].map(f=>(0,wc.jsx)(rp,{ariaLabel:h4[f],className:"components-border-radius-control",icon:g4[f],minimumCustomValue:b4,onChange:ioe(f,t,e),onUnitChange:soe(f,s,a),presets:i,presetType:"border-radius",selectedUnit:noe(s,f),showTooltip:!0,units:u,value:roe(t,f)},f))})]})}var coe=l(A(),1);var aoe=l(X(),1);var loe=l(w(),1),CI=(0,aoe.createHigherOrderComponent)(e=>function(o){let[r,n,i,s,a]=he("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,loe.jsx)(e,{...o,colors:u,disableCustomColors:d,hasColorsToChoose:f})},"withColorContext");var uoe=CI(coe.ColorPalette);var k4=l(N(),1),Js=l(A(),1);var Bo=l(w(),1),{Tabs:wb}=F(Js.privateApis),nIe=["colors","disableCustomColors","gradients","disableCustomGradients"],Ga={color:"color",gradient:"gradient"};function doe({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={[Ga.color]:(0,Bo.jsx)(Js.ColorPalette,{value:u,onChange:b?y=>{a(y),c()}:a,colors:e,disableCustomColors:o,__experimentalIsRenderedInSidebar:n,clearable:f,enableAlpha:h,headingLevel:p}),[Ga.gradient]:(0,Bo.jsx)(Js.GradientPicker,{value:d,onChange:g?y=>{c(y),a()}:c,gradients:t,disableCustomGradients:r,__experimentalIsRenderedInSidebar:n,clearable:f,headingLevel:p})},v=y=>(0,Bo.jsx)("div",{className:"block-editor-color-gradient-control__panel",children:k[y]});return(0,Bo.jsx)(Js.BaseControl,{className:V("block-editor-color-gradient-control",i),children:(0,Bo.jsx)("fieldset",{className:"block-editor-color-gradient-control__fieldset",children:(0,Bo.jsxs)(Js.__experimentalVStack,{spacing:1,children:[m&&(0,Bo.jsx)("legend",{children:(0,Bo.jsx)("div",{className:"block-editor-color-gradient-control__color-indicator",children:(0,Bo.jsx)(Js.BaseControl.VisualLabel,{children:s})})}),g&&b&&(0,Bo.jsx)("div",{children:(0,Bo.jsxs)(wb,{defaultTabId:d?Ga.gradient:!!g&&Ga.color,children:[(0,Bo.jsxs)(wb.TabList,{children:[(0,Bo.jsx)(wb.Tab,{tabId:Ga.color,children:(0,k4.__)("Color")}),(0,Bo.jsx)(wb.Tab,{tabId:Ga.gradient,children:(0,k4.__)("Gradient")})]}),(0,Bo.jsx)(wb.TabPanel,{tabId:Ga.color,className:"block-editor-color-gradient-control__panel",focusable:!1,children:k.color}),(0,Bo.jsx)(wb.TabPanel,{tabId:Ga.gradient,className:"block-editor-color-gradient-control__panel",focusable:!1,children:k.gradient})]})}),!b&&v(Ga.color),!g&&v(Ga.gradient)]})})})}function iIe(e){let[t,o,r,n]=he("color.palette","color.gradients","color.custom","color.customGradient");return(0,Bo.jsx)(doe,{colors:t,gradients:o,disableCustomColors:!r,disableCustomGradients:!n,...e})}function sIe(e){return nIe.every(t=>e.hasOwnProperty(t))?(0,Bo.jsx)(doe,{...e}):(0,Bo.jsx)(iIe,{...e})}var Dd=sIe;var foe=l(w(),1);function moe({onChange:e,value:t,...o}){return(0,foe.jsx)(Dd,{...o,onColorChange:e,colorValue:t,gradients:[],disableCustomGradients:!0})}var ea=l(N(),1),poe=l(A(),1),hoe=l(er(),1),v4=l(w(),1);iu([su,eh]);function aIe({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,ea.__)("text color")},{color:f,description:(0,ea.__)("link color")}],h=Et(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 _=Et(y.color),S=_.isReadable(h,b),C=_.alpha()<1;if(!S){if(p||C)continue;k=g<_.brightness()?(0,ea.sprintf)((0,ea.__)("This color combination may be hard for people to read. Try using a darker background color and/or a brighter %s."),y.description):(0,ea.sprintf)((0,ea.__)("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,ea.__)("This color combination may be hard for people to read.");break}C&&c&&(k=(0,ea.__)("Transparent text may be hard for people to read."),v=(0,ea.__)("Transparent text may be hard for people to read."))}return k?((0,hoe.speak)(v),(0,v4.jsx)("div",{className:"block-editor-contrast-checker",children:(0,v4.jsx)(poe.Notice,{spokenMessage:null,status:"warning",isDismissible:!1,children:k})})):null}var BI=aIe;var wr=l(N(),1),dS=l(Cc(),1),EI=l(O(),1),ui=l(A(),1),Wa=l(w(),1),Vd=new Date;Vd.setDate(20);Vd.setMonth(Vd.getMonth()-3);Vd.getMonth()===4&&Vd.setMonth(3);function boe({format:e,defaultFormat:t,onChange:o}){return(0,Wa.jsxs)(ui.__experimentalVStack,{as:"fieldset",spacing:4,className:"block-editor-date-format-picker",children:[(0,Wa.jsx)(ui.VisuallyHidden,{as:"legend",children:(0,wr.__)("Date format")}),(0,Wa.jsx)(ui.ToggleControl,{label:(0,wr.__)("Default format"),help:`${(0,wr.__)("Example:")} ${(0,dS.dateI18n)(t,Vd)}`,checked:!e,onChange:r=>o(r?null:t)}),e&&(0,Wa.jsx)(lIe,{format:e,onChange:o})]})}function lIe({format:e,onChange:t}){let r=[...[...new Set(["Y-m-d",(0,wr._x)("n/j/Y","short date format"),(0,wr._x)("n/j/Y g:i A","short date format with time"),(0,wr._x)("M j, Y","medium date format"),(0,wr._x)("M j, Y g:i A","medium date format with time"),(0,wr._x)("F j, Y","long date format"),(0,wr._x)("M j","short date format without the year")])].map((a,c)=>({key:`suggested-${c}`,name:(0,dS.dateI18n)(a,Vd),format:a})),{key:"human-diff",name:(0,dS.humanTimeDiff)(Vd),format:"human-diff"}],n={key:"custom",name:(0,wr.__)("Custom"),className:"block-editor-date-format-picker__custom-format-select-control__custom-option",hint:(0,wr.__)("Enter your own date format")},[i,s]=(0,EI.useState)(()=>!!e&&!r.some(a=>a.format===e));return(0,Wa.jsxs)(ui.__experimentalVStack,{children:[(0,Wa.jsx)(ui.CustomSelectControl,{__next40pxDefaultSize:!0,label:(0,wr.__)("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,Wa.jsx)(ui.TextControl,{__next40pxDefaultSize:!0,label:(0,wr.__)("Custom format"),hideLabelFromVision:!0,help:(0,EI.createInterpolateElement)((0,wr.__)("Enter a date or time <Link>format string</Link>."),{Link:(0,Wa.jsx)(ui.ExternalLink,{href:(0,wr.__)("https://wordpress.org/documentation/article/customize-date-and-time-format/")})}),value:e,onChange:a=>t(a)})]})}var is=l(A(),1),fS=l(N(),1),koe=l(ct(),1);var voe=l(X(),1),$a=l(w(),1);function yoe({id:e,colorPalette:t,duotonePalette:o,disableCustomColors:r,disableCustomDuotone:n,value:i,onChange:s}){let a;i==="unset"?a=(0,$a.jsx)(is.ColorIndicator,{className:"block-editor-duotone-control__unset-indicator"}):i?a=(0,$a.jsx)(is.DuotoneSwatch,{values:i}):a=(0,$a.jsx)(we,{icon:bL});let c=(0,fS.__)("Apply duotone filter"),d=`${(0,voe.useInstanceId)(yoe,"duotone-control",e)}__description`;return(0,$a.jsx)(is.Dropdown,{popoverProps:{className:"block-editor-duotone-control__popover",headerTitle:(0,fS.__)("Duotone")},renderToggle:({isOpen:f,onToggle:m})=>(0,$a.jsx)(is.ToolbarButton,{showTooltip:!0,onClick:m,"aria-haspopup":"true","aria-expanded":f,onKeyDown:p=>{!f&&p.keyCode===koe.DOWN&&(p.preventDefault(),m())},label:c,icon:a}),renderContent:()=>(0,$a.jsxs)(is.MenuGroup,{label:(0,fS.__)("Duotone"),children:[(0,$a.jsx)("p",{children:(0,fS.__)("Create a two-tone color effect without losing your original image.")}),(0,$a.jsx)(is.DuotonePicker,{"aria-label":c,"aria-describedby":d,colorPalette:t,duotonePalette:o,disableCustomColors:r,disableCustomDuotone:n,value:i,onChange:s})]})})}var TI=yoe;var woe=l(A(),1),Coe=l(Pe(),1),Boe=l(O(),1),di=l(N(),1);var nr=l(N(),1);var II=l(N(),1);function _oe(e){if(!e)return{};if(typeof e=="object")return e;let t;switch(e){case"normal":t=(0,II._x)("Regular","font style");break;case"italic":t=(0,II._x)("Italic","font style");break;case"oblique":t=(0,II._x)("Oblique","font style");break;default:t=e;break}return{name:t,value:e}}var ta=l(N(),1);function y4(e){if(!e)return{};if(typeof e=="object")return e;let t;switch(e){case"normal":case"400":t=(0,ta._x)("Regular","font weight");break;case"bold":case"700":t=(0,ta._x)("Bold","font weight");break;case"100":t=(0,ta._x)("Thin","font weight");break;case"200":t=(0,ta._x)("Extra Light","font weight");break;case"300":t=(0,ta._x)("Light","font weight");break;case"500":t=(0,ta._x)("Medium","font weight");break;case"600":t=(0,ta._x)("Semi Bold","font weight");break;case"800":t=(0,ta._x)("Extra Bold","font weight");break;case"900":t=(0,ta._x)("Black","font weight");break;case"1000":t=(0,ta._x)("Extra Black","font weight");break;default:t=e;break}return{name:t,value:e}}var Soe=[{name:(0,nr._x)("Regular","font style"),value:"normal"},{name:(0,nr._x)("Italic","font style"),value:"italic"}],xoe=[{name:(0,nr._x)("Thin","font weight"),value:"100"},{name:(0,nr._x)("Extra Light","font weight"),value:"200"},{name:(0,nr._x)("Light","font weight"),value:"300"},{name:(0,nr._x)("Regular","font weight"),value:"400"},{name:(0,nr._x)("Medium","font weight"),value:"500"},{name:(0,nr._x)("Semi Bold","font weight"),value:"600"},{name:(0,nr._x)("Bold","font weight"),value:"700"},{name:(0,nr._x)("Extra Bold","font weight"),value:"800"},{name:(0,nr._x)("Black","font weight"),value:"900"},{name:(0,nr._x)("Extra Black","font weight"),value:"1000"}];function Cb(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(y4(m))}}let a=y4(typeof s.fontWeight=="number"?s.fontWeight.toString():s.fontWeight),c=_oe(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,nr._x)("Bold","font weight"),value:"700"}),t.some(s=>s.value==="italic")||t.push({name:(0,nr._x)("Italic","font style"),value:"italic"}),n&&(t=Soe,o=xoe),t=t.length===0?Soe:t,o=o.length===0?xoe:o,t.forEach(({name:s,value:a})=>{o.forEach(({name:c,value:u})=>{let d=a==="normal"?c:(0,nr.sprintf)((0,nr._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 Eoe=l(w(),1),cIe=(e,t)=>e?t?(0,di.__)("Appearance"):(0,di.__)("Font style"):(0,di.__)("Font weight");function PI(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=cIe(r,n),f={key:"default",name:(0,di.__)("Default"),style:{fontStyle:void 0,fontWeight:void 0}},{fontStyles:m,fontWeights:h,combinedStyleAndWeightOptions:p}=Cb(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,Boe.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,di.sprintf)((0,di.__)("Currently selected font appearance: %s"),y.name):(0,di.sprintf)((0,di.__)("Currently selected font style: %s"),y.name):(0,di.sprintf)((0,di.__)("Currently selected font weight: %s"),y.name):(0,di.__)("No selected font appearance");return!t&&(c.size===void 0||c.size==="default")&&(0,Coe.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,Eoe.jsx)(woe.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 Toe=l(A(),1),Ioe=l(Pe(),1),_4=l(N(),1);var Poe=l(w(),1);function RI({__next40pxDefaultSize:e=!1,value:t="",onChange:o,fontFamilies:r,className:n,...i}){let[s]=he("typography.fontFamilies");if(r||(r=s),!r||r.length===0)return null;let a=[{key:"",name:(0,_4.__)("Default")},...r.map(({fontFamily:u,name:d})=>({key:u,name:d||u,style:{fontFamily:u}}))];!e&&(i.size===void 0||i.size==="default")&&(0,Ioe.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,Poe.jsx)(Toe.CustomSelectControl,{__next40pxDefaultSize:e,__shouldNotWarnDeprecated36pxSize:!0,label:(0,_4.__)("Font"),value:c,onChange:({selectedItem:u})=>o(u.key),options:a,className:V("block-editor-font-family-control",n),...i})}var OI=l(A(),1),Roe=l(Pe(),1),Ooe=l(N(),1);var Aoe=l(w(),1);function AI({__next40pxDefaultSize:e=!1,value:t,onChange:o,__unstableInputWidth:r="60px",...n}){let[i]=he("spacing.units"),s=(0,OI.__experimentalUseCustomUnits)({availableUnits:i||["px","em","rem"],defaultValues:{px:2,em:.2,rem:.2}});return!e&&(n.size===void 0||n.size==="default")&&(0,Roe.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,Aoe.jsx)(OI.__experimentalUnitControl,{__next40pxDefaultSize:e,__shouldNotWarnDeprecated36pxSize:!0,...n,label:(0,Ooe.__)("Letter spacing"),value:t,__unstableInputWidth:r,units:s,onChange:o})}var mS=l(N(),1),LI=l(A(),1),S4=l(w(),1),uIe=[{label:(0,mS.__)("None"),value:"none",icon:gr},{label:(0,mS.__)("Underline"),value:"underline",icon:CL},{label:(0,mS.__)("Strikethrough"),value:"line-through",icon:xL}];function NI({value:e,onChange:t,className:o}){return(0,S4.jsx)(LI.__experimentalToggleGroupControl,{isDeselectable:!0,__next40pxDefaultSize:!0,label:(0,mS.__)("Decoration"),className:V("block-editor-text-decoration-control",o),value:e,onChange:r=>{t(r===e?void 0:r)},children:uIe.map(r=>(0,S4.jsx)(LI.__experimentalToggleGroupControlOptionIcon,{value:r.value,icon:r.icon,label:r.label},r.value))})}var Bb=l(N(),1);var MI=l(A(),1),x4=l(w(),1),dIe=[{label:(0,Bb.__)("None"),value:"none",icon:gr},{label:(0,Bb.__)("Uppercase"),value:"uppercase",icon:EL},{label:(0,Bb.__)("Lowercase"),value:"lowercase",icon:_L},{label:(0,Bb.__)("Capitalize"),value:"capitalize",icon:vL}];function DI({className:e,value:t,onChange:o}){return(0,x4.jsx)(MI.__experimentalToggleGroupControl,{isDeselectable:!0,__next40pxDefaultSize:!0,label:(0,Bb.__)("Letter case"),className:V("block-editor-text-transform-control",e),value:t,onChange:r=>{o(r===t?void 0:r)},children:dIe.map(r=>(0,x4.jsx)(MI.__experimentalToggleGroupControlOptionIcon,{value:r.value,icon:r.icon,label:r.label},r.value))})}var Eb=l(N(),1);var VI=l(A(),1),w4=l(w(),1),fIe=[{label:(0,Eb.__)("Horizontal"),value:"horizontal-tb",icon:vM},{label:(0,Eb.__)("Vertical"),value:(0,Eb.isRTL)()?"vertical-lr":"vertical-rl",icon:_M}];function FI({className:e,value:t,onChange:o}){return(0,w4.jsx)(VI.__experimentalToggleGroupControl,{isDeselectable:!0,__next40pxDefaultSize:!0,label:(0,Eb.__)("Orientation"),className:V("block-editor-writing-mode-control",e),value:t,onChange:r=>{o(r===t?void 0:r)},children:fIe.map(r=>(0,w4.jsx)(VI.__experimentalToggleGroupControlOptionIcon,{value:r.value,icon:r.icon,label:r.label},r.value))})}var rn=l(A(),1),Loe=l(O(),1),Noe=l(N(),1);var $o=l(w(),1),mIe=({setting:e,children:t,panelId:o,...r})=>{let n=()=>{e.colorValue?e.onColorChange():e.gradientValue&&e.onGradientChange()};return(0,$o.jsx)(rn.__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})},pIe=({colorValue:e,label:t})=>(0,$o.jsxs)(rn.__experimentalHStack,{justify:"flex-start",children:[(0,$o.jsx)(rn.ColorIndicator,{className:"block-editor-panel-color-gradient-settings__color-indicator",colorValue:e}),(0,$o.jsx)(rn.FlexItem,{className:"block-editor-panel-color-gradient-settings__color-name",title:t,children:t})]}),hIe=e=>function({onToggle:o,isOpen:r}){let{clearable:n,colorValue:i,gradientValue:s,onColorChange:a,onGradientChange:c,label:u}=e,d=(0,Loe.useRef)(void 0),f={onClick:o,className:V("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,$o.jsxs)($o.Fragment,{children:[(0,$o.jsx)(rn.Button,{__next40pxDefaultSize:!0,...f,children:(0,$o.jsx)(pIe,{colorValue:h,label:u})}),n&&h&&(0,$o.jsx)(rn.Button,{__next40pxDefaultSize:!0,label:(0,Noe.__)("Reset"),className:"block-editor-panel-color-gradient-settings__reset",size:"small",icon:gr,onClick:()=>{m(),r&&o(),d.current?.focus()}})]})};function zI({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,$o.jsx)($o.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,$o.jsx)(mIe,{setting:u,...a,children:(0,$o.jsx)(rn.Dropdown,{popoverProps:c,className:"block-editor-tools-panel-color-gradient-settings__dropdown",renderToggle:hIe(m),renderContent:()=>(0,$o.jsx)(rn.__experimentalDropdownContentWrapper,{paddingSize:"none",children:(0,$o.jsx)("div",{className:"block-editor-panel-color-gradient-settings__dropdown-content",children:(0,$o.jsx)(Dd,{...f})})})})},d)})})}var jI=l(A(),1),Moe=l(z(),1),Doe=l(X(),1);var C4=l(O(),1),np=l(N(),1);function Fd(){let[e,t,o,r,n,i,s,a,c,u]=he("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,C4.useMemo)(()=>{let f=[];return o&&o.length&&f.push({name:(0,np._x)("Theme","Indicates this palette comes from the theme."),slug:"theme",colors:o}),n&&r&&r.length&&f.push({name:(0,np._x)("Default","Indicates this palette comes from WordPress."),slug:"default",colors:r}),t&&t.length&&f.push({name:(0,np._x)("Custom","Indicates this palette is created by the user."),slug:"custom",colors:t}),f},[t,o,r,n]),d.gradients=(0,C4.useMemo)(()=>{let f=[];return a&&a.length&&f.push({name:(0,np._x)("Theme","Indicates this palette comes from the theme."),slug:"theme",gradients:a}),u&&c&&c.length&&f.push({name:(0,np._x)("Default","Indicates this palette comes from WordPress."),slug:"default",gradients:c}),s&&s.length&&f.push({name:(0,np._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 oa=l(w(),1),gIe=["colors","disableCustomColors","gradients","disableCustomGradients"],B4=({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,Doe.useInstanceId)(B4),{batch:m}=(0,Moe.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,oa.jsxs)(jI.__experimentalToolsPanel,{className:V("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,oa.jsx)(zI,{settings:s,panelId:f,colors:t,gradients:o,disableCustomColors:r,disableCustomGradients:n,__experimentalIsRenderedInSidebar:u,enableAlpha:d}),!!i&&(0,oa.jsxs)(oa.Fragment,{children:[(0,oa.jsx)(jI.__experimentalSpacer,{marginY:4})," ",i]})]})},bIe=e=>{let t=Fd();return(0,oa.jsx)(B4,{...t,...e})},kIe=e=>gIe.every(t=>e.hasOwnProperty(t))?(0,oa.jsx)(B4,{...e}):(0,oa.jsx)(bIe,{...e}),UI=kIe;var HI=l(O(),1),ip=l(A(),1),T4=l(N(),1);var pS=l(w(),1),E4=[],vIe={..._I,px:{max:1e3,steps:1},em:{max:50,steps:.1},rem:{max:50,steps:.1}};function yIe(e){let t=e?.default??E4,o=e?.custom??E4,r=e?.theme??E4;return(0,HI.useMemo)(()=>[{name:(0,T4.__)("None"),slug:"0",size:0},...o,...r,...t],[o,r,t])}function Tb({label:e=(0,T4.__)("Dimension"),onChange:t,value:o,dimensionSizes:r}){let[n,i]=he("dimensions.dimensionSizes","spacing.units"),s=r??n,a=(0,ip.__experimentalUseCustomUnits)({availableUnits:i||["%","px","em","rem","vh","vw"]}),c=yIe(s),[u,d]=(0,HI.useState)(()=>{let[,m]=(0,ip.__experimentalParseQuantityAndUnitFromRawValue)(o);return m||a[0]?.value||"px"}),f=m=>{let[h,p]=(0,ip.__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,pS.jsxs)("fieldset",{className:"block-editor-dimension-control",children:[(0,pS.jsx)(ip.BaseControl.VisualLabel,{as:"legend",children:e}),(0,pS.jsx)(rp,{ariaLabel:e,className:"block-editor-dimension-control",customValueSettings:vIe,minimumCustomValue:0,onChange:t,onUnitChange:f,presets:c,presetType:"dimension",selectedUnit:u,showTooltip:!0,units:a,value:o})]})}var Foe=l(O(),1),ir=l(A(),1),zoe=l(N(),1),joe=l(Pe(),1);var Ka=l(w(),1),Voe={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 Uoe({label:e=(0,zoe.__)("Height"),onChange:t,value:o}){(0,joe.default)("wp.blockEditor.HeightControl",{since:"7.0",version:"7.2",alternative:"wp.blockEditor.DimensionControl"});let r=parseFloat(o),[n]=he("spacing.units"),i=(0,ir.__experimentalUseCustomUnits)({availableUnits:n||["%","px","em","rem","vh","vw"]}),s=(0,Foe.useMemo)(()=>(0,ir.__experimentalParseQuantityAndUnitFromRawValue)(o),[o])[1]||i[0]?.value||"px",a=u=>{t([u,s].join(""))},c=u=>{let[d,f]=(0,ir.__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,Ka.jsxs)("fieldset",{className:"block-editor-height-control",children:[(0,Ka.jsx)(ir.BaseControl.VisualLabel,{as:"legend",children:e}),(0,Ka.jsxs)(ir.Flex,{children:[(0,Ka.jsx)(ir.FlexItem,{isBlock:!0,children:(0,Ka.jsx)(ir.__experimentalUnitControl,{value:o,units:i,onChange:t,onUnitChange:c,min:0,size:"__unstable-large",label:e,hideLabelFromVision:!0})}),(0,Ka.jsx)(ir.FlexItem,{isBlock:!0,children:(0,Ka.jsx)(ir.__experimentalSpacer,{marginX:2,marginBottom:0,children:(0,Ka.jsx)(ir.RangeControl,{__next40pxDefaultSize:!0,value:r,min:0,max:Voe[s]?.max??100,step:Voe[s]?.step??.1,withInputField:!1,onChange:a,label:e,hideLabelFromVision:!0})})})]})]})}var kS=l(A(),1);var ss=l(je()),pre=l(cre());function CIe(e,t,o,r,n,i){i===void 0&&(i=0);var s=Ib(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 BIe(e){return e.width>e.height?e.width/e.naturalWidth:e.height/e.naturalHeight}function hS(e,t,o,r,n){n===void 0&&(n=0);var i=Ib(t.width,t.height,n),s=i.width,a=i.height;return{x:ure(e.x,s,o.width,r),y:ure(e.y,a,o.height,r)}}function ure(e,t,o,r){var n=t*r/2-o/2;return qI(e,-n,n)}function dre(e,t){return Math.sqrt(Math.pow(e.y-t.y,2)+Math.pow(e.x-t.x,2))}function fre(e,t){return Math.atan2(t.y-e.y,t.x-e.x)*180/Math.PI}function EIe(e,t,o,r,n,i,s){i===void 0&&(i=0),s===void 0&&(s=!0);var a=s?TIe:IIe,c=Ib(t.width,t.height,i),u=Ib(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=Ho(Ho({},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 TIe(e,t){return Math.min(e,Math.max(0,t))}function IIe(e,t){return t}function PIe(e,t,o,r,n,i){var s=Ib(t.width,t.height,o),a=qI(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 RIe(e,t,o){var r=BIe(t);return o.height>o.width?o.height/(e.height*r):o.width/(e.width*r)}function OIe(e,t,o,r,n,i){o===void 0&&(o=0);var s=Ib(t.naturalWidth,t.naturalHeight,o),a=qI(RIe(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 mre(e,t){return{x:(t.x+e.x)/2,y:(t.y+e.y)/2}}function AIe(e){return e*Math.PI/180}function Ib(e,t,o){var r=AIe(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 qI(e,t,o){return Math.min(Math.max(e,t),o)}function YI(){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 LIe=`.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 |
`,NIe=1,MIe=3,DIe=1,hre=(function(e){L7(t,e);function t(){var o=e!==null&&e.apply(this,arguments)||this;return o.cropperRef=ss.createRef(),o.imageRef=ss.createRef(),o.videoRef=ss.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=PIe(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=OIe(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=Ho(Ho({},g),{naturalWidth:f,naturalHeight:m}),o.props.setMediaSize&&o.props.setMediaSize(o.mediaSize);var b=o.props.cropSize?o.props.cropSize:CIe(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=Ho({},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?hS(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,pre.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=qI(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?hS(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?hS(o.props.crop,o.mediaSize,o.state.cropSize,o.props.zoom,o.props.rotation):o.props.crop;return EIe(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?hS(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=Ho({},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=hS(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=LIe,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=dre(r,n),this.lastPinchRotation=fre(r,n),this.onDragStart(mre(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=mre(n,i);this.onDrag(s),this.rafPinchTimeout&&this.currentWindow.cancelAnimationFrame(this.rafPinchTimeout),this.rafPinchTimeout=this.currentWindow.requestAnimationFrame(function(){var a=dre(n,i),c=r.props.zoom*(a/r.lastPinchDistance);r.setNewZoom(c,s,{shouldUpdatePosition:!1}),r.lastPinchDistance=a;var u=fre(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,P=C.cropAreaClassName,R=C.mediaClassName,E=(r=this.state.mediaObjectFit)!==null&&r!==void 0?r:this.getObjectFit();return ss.createElement("div",{onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,ref:function(T){return o.containerRef=T},"data-testid":"container",style:y,className:YI("reactEasyCrop_Container",B)},i?ss.createElement("img",Ho({alt:"",className:YI("reactEasyCrop_Image",E==="contain"&&"reactEasyCrop_Contain",E==="horizontal-cover"&&"reactEasyCrop_Cover_Horizontal",E==="vertical-cover"&&"reactEasyCrop_Cover_Vertical",R)},a,{src:i,ref:this.imageRef,style:Ho(Ho({},S),{transform:u||"translate(".concat(f,"px, ").concat(m,"px) rotate(").concat(h,"deg) scale(").concat(p,")")}),onLoad:this.onMediaLoad})):s&&ss.createElement("video",Ho({autoPlay:!0,playsInline:!0,loop:!0,muted:!0,className:YI("reactEasyCrop_Video",E==="contain"&&"reactEasyCrop_Contain",E==="horizontal-cover"&&"reactEasyCrop_Cover_Horizontal",E==="vertical-cover"&&"reactEasyCrop_Cover_Vertical",R)},a,{ref:this.videoRef,onLoadedMetadata:this.onMediaLoad,style:Ho(Ho({},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 ss.createElement("source",Ho({key:L.src},L))})),this.state.cropSize&&ss.createElement("div",Ho({ref:this.cropperRef,style:Ho(Ho({},_),{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:YI("reactEasyCrop_CropArea",g==="round"&&"reactEasyCrop_CropAreaRound",b&&"reactEasyCrop_CropAreaGrid",P)},c)))},t.defaultProps={zoom:1,rotation:0,aspect:4/3,maxZoom:MIe,minZoom:NIe,cropShape:"rect",objectFit:"contain",showGrid:!0,style:{},classes:{},mediaProps:{},cropperProps:{},zoomSpeed:1,restrictPosition:!0,zoomWithScroll:!0,keyboardStep:DIe},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})(ss.Component);var wre=l(O(),1);var Rb=l(O(),1);var gre=Object.prototype.hasOwnProperty;function bre(e,t,o){for(o of e.keys())if(ap(o,t))return o}function ap(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--&&ap(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=bre(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=bre(t,n),!n)||!ap(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(gre.call(e,o)&&++r&&!gre.call(t,o)||!(o in t)||!ap(e[o],t[o]))return!1;return Object.keys(t).length===r}}return e!==e&&t!==t}var ra=l(O(),1);var Pb=1,kre=5;var ZI=e=>e>=0?e%360:(360+e%360)%360,VIe=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 vre(e){return e*Math.PI/180}function FIe(e,t,o){let r=vre(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 yre(e,t,o=0,r={horizontal:!1,vertical:!1}){try{let n=await VIe(e),i=document.createElement("canvas"),s=i.getContext("2d");if(!s)return null;let a=vre(o),{width:c,height:u}=FIe(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 lp={crop:{x:0,y:0,width:100,height:100},zoom:Pb,rotation:0,aspectRatio:1,flip:{horizontal:!1,vertical:!1}},zIe={x:0,y:0},D4={crop:zIe,croppedArea:lp.crop,croppedAreaPixels:null,zoom:lp.zoom,rotation:lp.rotation,flip:lp.flip,aspectRatio:lp.aspectRatio,mediaSize:null};function _re(){let[e,t]=(0,ra.useState)(D4),[o,r]=(0,ra.useState)(null),n=(0,ra.useCallback)(u=>{t(d=>{let m={...typeof u=="function"?u(d):u};return"rotation"in m&&m.rotation!==void 0&&(m.rotation=ZI(m.rotation)),{...d,...m}})},[]),i=(0,ra.useCallback)((u=null)=>{if(!u){r(null),n(D4);return}if(typeof u=="object"){let d={...lp,...u};r(d),n(d)}},[n,r]),s=(0,ra.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({...D4})},[o,n]),a=(0,ra.useMemo)(()=>{if(o){let d={crop:e.croppedAreaPixels||e.croppedArea,zoom:e.zoom,rotation:ZI(e.rotation),aspectRatio:e.aspectRatio,flip:e.flip};return ap(d,o)===!1}let u={crop:e.croppedArea,zoom:e.zoom,rotation:ZI(e.rotation),aspectRatio:e.aspectRatio,flip:e.flip};return ap(u,lp)===!1},[e,o]),c=(0,ra.useCallback)(async u=>e.croppedAreaPixels?yre(u,e.croppedAreaPixels,e.rotation,e.flip):null,[e.croppedAreaPixels,e.rotation,e.flip]);return(0,ra.useMemo)(()=>({cropperState:e,setCropperState:n,resetState:o,setResetState:i,isDirty:a,reset:s,getCroppedImage:c}),[e,n,o,i,a,s,c])}var Sre=l(w(),1),xre=(0,Rb.createContext)({cropperState:{crop:{x:0,y:0},croppedArea:{x:0,y:0,width:100,height:100},croppedAreaPixels:null,zoom:Pb,rotation:0,aspectRatio:1,flip:{horizontal:!1,vertical:!1},mediaSize:null},setCropperState:()=>{},resetState:null,setResetState:()=>{},isDirty:!1,reset:()=>{},getCroppedImage:()=>Promise.resolve(null)});function V4({children:e}){let t=_re(),o=(0,Rb.useMemo)(()=>({...t}),[t]);return(0,Sre.jsx)(xre.Provider,{value:o,children:e})}var gS=()=>{let e=(0,Rb.useContext)(xre);if(!e)throw new Error("Missing ImageCropperContext");return e};var Cre=l(w(),1);function F4({src:e,onLoad:t,minZoom:o=Pb,maxZoom:r=kre,...n}){let{cropperState:i,setCropperState:s}=gS(),{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,wre.useCallback)((k,v)=>{s({croppedArea:k,croppedAreaPixels:v})},[s]);return(0,Cre.jsx)(hre,{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 Lb=l(A(),1),Ab=l(N(),1);var Bre=100,Ere=300,XI={placement:"bottom-start"};var Ob=l(O(),1);var QI=l(z(),1),cp=l(O(),1),Bc=l(N(),1),Tre=l(Li(),1),Ire=l(Fe(),1);var jIe={crop:(0,Bc.__)("Image cropped."),rotate:(0,Bc.__)("Image rotated."),cropAndRotate:(0,Bc.__)("Image cropped and rotated.")};function Pre({crop:e,rotation:t,url:o,id:r,onSaveImage:n,onFinishEditing:i}){let{createErrorNotice:s,createSuccessNotice:a}=(0,QI.useDispatch)(Tre.store),[c,u]=(0,cp.useState)(!1),{editMediaEntity:d}=(0,QI.useSelect)(h=>({editMediaEntity:h(x).getSettings()?.[X0]}),[]),f=(0,cp.useCallback)(()=>{u(!1),i()},[i]),m=(0,cp.useCallback)(async()=>{if(!d){i(),s((0,Bc.__)("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(jIe[p],{type:"snackbar",actions:[{label:(0,Bc.__)("Undo"),onClick:()=>{n({id:r,url:o})}}]}))}catch(g){s((0,Bc.sprintf)((0,Bc.__)("Could not edit image. %s"),(0,Ire.__unstableStripHTML)(g.message)),{id:"image-editing-error",type:"snackbar"})}finally{u(!1),i()}},[e,t,r,o,n,s,a,i,d]);return(0,cp.useMemo)(()=>({isInProgress:c,apply:m,cancel:f}),[c,m,f])}var na=l(O(),1),Rre=l(pt(),1);function Ore({url:e,naturalWidth:t,naturalHeight:o}){let[r,n]=(0,na.useState)(),{cropperState:i,setCropperState:s}=gS(),{zoom:a,aspectRatio:c,crop:u,croppedArea:d}=i,f=(0,na.useCallback)(v=>{s({zoom:v})},[s]),m=(0,na.useCallback)(v=>{s({aspectRatio:v})},[s]),h=t/o,p=o/t;(0,na.useEffect)(()=>{m(h)},[]);let[g,b]=(0,na.useState)(0),k=(0,na.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(R){let E=document.createElement("canvas"),L=0,T=0;v%180?(E.width=R.target.height,E.height=R.target.width):(E.width=R.target.width,E.height=R.target.height),(v===90||v===180)&&(L=E.width),(v===270||v===180)&&(T=E.height);let I=E.getContext("2d");I.translate(L,T),I.rotate(v*Math.PI/180),I.drawImage(R.target,0,0),E.toBlob(M=>{n(URL.createObjectURL(M)),b(v);let D=S?c:E.width/E.height;s({aspectRatio:D,crop:{x:-(u.y*y),y:u.x*y}})})}let B=new window.Image;B.src=e,B.onload=C;let P=(0,Rre.applyFilters)("media.crossOrigin",void 0,e);typeof P=="string"&&(B.crossOrigin=P)},[g,h,e,s,u,a,c,p,b]);return(0,na.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 Are=l(w(),1),z4=(0,Ob.createContext)({});z4.displayName="ImageEditingContext";var Ya=()=>(0,Ob.useContext)(z4);function Lre({id:e,url:t,naturalWidth:o,naturalHeight:r,onFinishEditing:n,onSaveImage:i,children:s}){let a=Ore({url:t,naturalWidth:o,naturalHeight:r}),c=Pre({id:e,url:t,onSaveImage:i,onFinishEditing:n,...a}),u=(0,Ob.useMemo)(()=>({...a,...c}),[a,c]);return(0,Are.jsx)(z4.Provider,{value:u,children:s})}var as=l(w(),1);function JI({aspectRatios:e,isDisabled:t,label:o,onClick:r,value:n}){return(0,as.jsx)(Lb.MenuGroup,{label:o,children:e.map(({name:i,slug:s,ratio:a})=>(0,as.jsx)(Lb.MenuItem,{disabled:t,onClick:()=>{r(a)},role:"menuitemradio",isSelected:a===n,icon:a===n?Cs:void 0,children:i},s))})}function UIe(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 j4({ratio:e,...t}){return{ratio:UIe(e),...t}}function Nre({toggleProps:e}){let{isInProgress:t,aspect:o,setAspect:r,defaultAspect:n}=Ya(),[i,s,a]=he("dimensions.aspectRatios.default","dimensions.aspectRatios.theme","dimensions.defaultAspectRatios");return(0,as.jsx)(Lb.DropdownMenu,{icon:NA,label:(0,Ab.__)("Aspect Ratio"),popoverProps:XI,toggleProps:e,children:({onClose:c})=>(0,as.jsxs)(as.Fragment,{children:[(0,as.jsx)(JI,{isDisabled:t,onClick:u=>{r(u),c()},value:o,aspectRatios:[{slug:"original",name:(0,Ab.__)("Original"),ratio:n},...a?i.map(j4).filter(({ratio:u})=>u===1):[]]}),s?.length>0&&(0,as.jsx)(JI,{label:(0,Ab.__)("Theme"),isDisabled:t,onClick:u=>{r(u),c()},value:o,aspectRatios:s}),a&&(0,as.jsx)(JI,{label:(0,Ab.__)("Landscape"),isDisabled:t,onClick:u=>{r(u),c()},value:o,aspectRatios:i.map(j4).filter(({ratio:u})=>u>1)}),a&&(0,as.jsx)(JI,{label:(0,Ab.__)("Portrait"),isDisabled:t,onClick:u=>{r(u),c()},value:o,aspectRatios:i.map(j4).filter(({ratio:u})=>u<1)})]})})}var Mre=l(A(),1),Dre=l(X(),1);var zd=l(w(),1);function Vre({url:e,width:t,height:o,naturalHeight:r,naturalWidth:n,borderProps:i}){let{isInProgress:s,editedUrl:a,rotation:c}=Ya(),[u,{width:d}]=(0,Dre.useResizeObserver)(),f=o||d*r/n;c%180===90&&(f=d*n/r);let m=(0,zd.jsxs)("div",{className:V("wp-block-image__crop-area",i?.className,{"is-applying":s}),style:{...i?.style,width:t||d,height:f},children:[(0,zd.jsx)(F4,{src:a||e}),s&&(0,zd.jsx)(Mre.Spinner,{})]});return(0,zd.jsxs)(zd.Fragment,{children:[u,m]})}var jd=l(A(),1),U4=l(N(),1);var bS=l(w(),1);function Fre(){let{isInProgress:e,zoom:t,setZoom:o}=Ya();return(0,bS.jsx)(jd.Dropdown,{contentClassName:"wp-block-image__zoom",popoverProps:XI,renderToggle:({isOpen:r,onToggle:n})=>(0,bS.jsx)(jd.ToolbarButton,{icon:qN,label:(0,U4.__)("Zoom"),onClick:n,"aria-expanded":r,disabled:e}),renderContent:()=>(0,bS.jsx)(jd.__experimentalDropdownContentWrapper,{paddingSize:"medium",children:(0,bS.jsx)(jd.RangeControl,{__next40pxDefaultSize:!0,label:(0,U4.__)("Zoom"),min:Bre,max:Ere,value:Math.round(t*100),onChange:r=>o(r/100)})})})}var zre=l(A(),1),jre=l(N(),1);var Ure=l(w(),1);function Hre(){let{isInProgress:e,rotateClockwise:t}=Ya();return(0,Ure.jsx)(zre.ToolbarButton,{icon:WN,label:(0,jre.__)("Rotate"),onClick:t,disabled:e})}var H4=l(A(),1),G4=l(N(),1);var up=l(w(),1);function Gre(){let{isInProgress:e,apply:t,cancel:o}=Ya();return(0,up.jsxs)(up.Fragment,{children:[(0,up.jsx)(H4.ToolbarButton,{onClick:t,disabled:e,children:(0,G4.__)("Apply")}),(0,up.jsx)(H4.ToolbarButton,{onClick:o,children:(0,G4.__)("Cancel")})]})}var fi=l(w(),1);function Wre({id:e,url:t,width:o,height:r,naturalHeight:n,naturalWidth:i,onSaveImage:s,onFinishEditing:a,borderProps:c}){return(0,fi.jsx)(V4,{children:(0,fi.jsxs)(Lre,{id:e,url:t,naturalWidth:i,naturalHeight:n,onSaveImage:s,onFinishEditing:a,children:[(0,fi.jsx)(Vre,{borderProps:c,url:t,width:o,height:r,naturalHeight:n,naturalWidth:i}),(0,fi.jsxs)(Dt,{children:[(0,fi.jsxs)(kS.ToolbarGroup,{children:[(0,fi.jsx)(Fre,{}),(0,fi.jsx)(kS.ToolbarItem,{children:u=>(0,fi.jsx)(Nre,{toggleProps:u})}),(0,fi.jsx)(Hre,{})]}),(0,fi.jsx)(kS.ToolbarGroup,{children:(0,fi.jsx)(Gre,{})})]})]})})}var mi=l(A(),1),Ud=l(N(),1);var Nb=l(O(),1);function $re(e,t,o,r,n){let[i,s]=(0,Nb.useState)(t??r??""),[a,c]=(0,Nb.useState)(e??o??"");return(0,Nb.useEffect)(()=>{t===void 0&&r!==void 0&&s(r),e===void 0&&o!==void 0&&c(o)},[r,o]),(0,Nb.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 ls=l(w(),1),Kre=[25,50,75,100],HIe=()=>{};function Yre(e,t,o){let r=Math.round(t*(e/100)),n=Math.round(o*(e/100));return{scaledWidth:r,scaledHeight:n}}function qre({imageSizeHelp:e,imageWidth:t,imageHeight:o,imageSizeOptions:r=[],isResizable:n=!0,slug:i,width:s,height:a,onChange:c,onChangeImage:u=HIe}){let{currentHeight:d,currentWidth:f,updateDimension:m,updateDimensions:h}=$re(a,s,o,t,c),p=b=>{if(b===void 0){h();return}let{scaledWidth:k,scaledHeight:v}=Yre(b,t,o);h(v,k)},g=Kre.find(b=>{let{scaledWidth:k,scaledHeight:v}=Yre(b,t,o);return f===k&&d===v});return(0,ls.jsxs)(mi.__experimentalVStack,{className:"block-editor-image-size-control",spacing:"4",children:[r&&r.length>0&&(0,ls.jsx)(mi.SelectControl,{label:(0,Ud.__)("Resolution"),value:i,options:r,onChange:u,help:e,size:"__unstable-large"}),n&&(0,ls.jsxs)(ls.Fragment,{children:[(0,ls.jsxs)(mi.__experimentalHStack,{align:"baseline",spacing:"4",children:[(0,ls.jsx)(mi.__experimentalNumberControl,{label:(0,Ud.__)("Width"),value:f,min:1,onChange:b=>m("width",b),size:"__unstable-large"}),(0,ls.jsx)(mi.__experimentalNumberControl,{label:(0,Ud.__)("Height"),value:d,min:1,onChange:b=>m("height",b),size:"__unstable-large"})]}),(0,ls.jsx)(mi.__experimentalToggleGroupControl,{label:(0,Ud.__)("Image size presets"),hideLabelFromVision:!0,onChange:p,value:g,isBlock:!0,__next40pxDefaultSize:!0,children:Kre.map(b=>(0,ls.jsx)(mi.__experimentalToggleGroupControlOption,{value:b,label:(0,Ud.sprintf)((0,Ud.__)("%d%%"),b)},b))})]})]})}var e2=l(A(),1);var dp=l(N(),1),Xre=l(w(),1),Zre={left:gu,center:hu,right:bu,"space-between":ah,stretch:lh};function GIe({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?Zre[r]:Zre.left,c=[{name:"left",icon:gu,title:(0,dp.__)("Justify items left"),isActive:r==="left",onClick:()=>s("left")},{name:"center",icon:hu,title:(0,dp.__)("Justify items center"),isActive:r==="center",onClick:()=>s("center")},{name:"right",icon:bu,title:(0,dp.__)("Justify items right"),isActive:r==="right",onClick:()=>s("right")},{name:"space-between",icon:ah,title:(0,dp.__)("Space between items"),isActive:r==="space-between",onClick:()=>s("space-between")},{name:"stretch",icon:lh,title:(0,dp.__)("Stretch items"),isActive:r==="stretch",onClick:()=>s("stretch")}],u=i?e2.ToolbarGroup:e2.ToolbarDropdownMenu,d=i?{isCollapsed:t}:{};return(0,Xre.jsx)(u,{icon:a,popoverProps:n,label:(0,dp.__)("Change items justification"),controls:c.filter(f=>e.includes(f.name)),...d})}var W4=GIe;var $4=l(w(),1),Ih=e=>(0,$4.jsx)(W4,{...e,isToolbar:!1}),Qre=e=>(0,$4.jsx)(W4,{...e,isToolbar:!0});var nn=l(A(),1),ia=l(N(),1),uo=l(O(),1),Hne=l(X(),1),Gne=l(Fe(),1),Wne=l(ct(),1),$ne=l(S_(),1),p2=l(z(),1),tF=l(kh(),1);var Kne=l(Pe(),1),h2=l(bn(),1);var Mb=l(A(),1);var t2=l(X(),1),o2=l(N(),1),Jre=l(O(),1),Ec=l(w(),1);function ene({children:e,settingsOpen:t,setSettingsOpen:o}){let r=(0,t2.useReducedMotion)(),n=r?Jre.Fragment:Mb.__unstableAnimatePresence,i=r?"div":Mb.__unstableMotion.div,a=`link-control-settings-drawer-${(0,t2.useInstanceId)(ene)}`;return(0,Ec.jsxs)(Ec.Fragment,{children:[(0,Ec.jsx)(Mb.Button,{__next40pxDefaultSize:!0,className:"block-editor-link-control__drawer-toggle","aria-expanded":t,onClick:()=>o(!t),icon:(0,o2.isRTL)()?xv:pu,"aria-controls":a,children:(0,o2._x)("Advanced","Additional link settings")}),(0,Ec.jsx)(n,{children:t&&(0,Ec.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,Ec.jsx)("div",{className:"block-editor-link-control__drawer-inner",children:e})})})]})}var tne=ene;var l2=l(O(),1),J4=l(N(),1),yne=l(Pe(),1);var vS=l(N(),1),fne=l(A(),1);var r2=l(N(),1),one=l(A(),1),rne=l(O(),1);var K4=l(w(),1),WIe=({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,rne.createInterpolateElement)((0,r2.sprintf)((0,r2.__)("Create: <mark>%s</mark>"),e),{mark:(0,K4.jsx)("mark",{})}),(0,K4.jsx)(one.MenuItem,{...o,iconPosition:"left",icon:Pi,className:"block-editor-link-control__search-item",onClick:t,children:n})},nne=WIe;var Tc=l(N(),1),i2=l(A(),1);var ine=l(Fe(),1),Vb=l(bn(),1),sne=l(X(),1),ane=l(Pe(),1),Db=l(w(),1),n2={post:{icon:zN,label:(0,Tc.__)("Post")},page:{icon:Cl,label:(0,Tc.__)("Page")},post_tag:{icon:bM,label:(0,Tc.__)("Tag")},category:{icon:zA,label:(0,Tc.__)("Category")},attachment:{icon:hL,label:(0,Tc.__)("Attachment")}};function $Ie({isURL:e,suggestion:t}){let o=null;return e?o=Cv:t.type in n2&&(o=n2[t.type].icon,t.type==="page"&&(t.isFrontPage&&(o=KL),t.isBlogHome&&(o=RM))),o?(0,Db.jsx)(we,{className:"block-editor-link-control__search-item-icon",icon:o}):null}function KIe(e){return e?.trim()?.length?e?.replace(/^\/?/,"/"):e}function YIe(e){return e?.trim()?.length?e?.replace(/\/$/,""):e}var qIe=(e,...t)=>(...o)=>e(...o,...t),ZIe=e=>t=>t==null||t!==t?e:t;function XIe(e){return e&&(0,sne.pipe)(Vb.safeDecodeURI,Vb.getPath,ZIe(""),qIe(Vb.filterURLForDisplay,24),YIe,KIe)(e)}var lne=({itemProps:e,suggestion:t,searchTerm:o,onClick:r,isURL:n=!1,shouldShowType:i=!1})=>{let s=n?(0,Tc.__)("Press ENTER to add this link"):XIe(t.url);return(0,Db.jsx)(i2.MenuItem,{...e,info:s,iconPosition:"left",icon:(0,Db.jsx)($Ie,{suggestion:t,isURL:n}),onClick:r,shortcut:i&&QIe(t),className:"block-editor-link-control__search-item",children:(0,Db.jsx)(i2.TextHighlight,{text:(0,ine.__unstableStripHTML)(t.title),highlight:o})})};function QIe(e){return e.isFrontPage?(0,Tc.__)("Front page"):e.isBlogHome?(0,Tc.__)("Blog home"):e.type in n2?n2[e.type].label:e.type}var cne=lne,une=e=>((0,ane.default)("wp.blockEditor.__experimentalLinkControlSearchItem",{since:"6.8"}),(0,Db.jsx)(lne,{...e}));var dne=l(N(),1),fp="__CREATE__",Y4="tel",s2="link",q4="mailto",Z4="internal",Fb=[s2,q4,Y4,Z4],X4=[{id:"opensInNewTab",title:(0,dne.__)("Open in new tab")}];var mne=l(Pe(),1),mp=l(w(),1);function pne({withCreateSuggestion:e,currentInputValue:t,handleSuggestionClick:o,suggestionsListProps:r,buildSuggestionItemProps:n,suggestions:i,selectedSuggestion:s,isLoading:a,isInitialSuggestions:c,createSuggestionButtonText:u,suggestionsQuery:d}){let f=V("block-editor-link-control__search-results",{"is-loading":a}),m=i.length===1&&Fb.includes(i[0].type),h=e&&!m&&!c,p=!d?.type,g=c?(0,vS.__)("Suggestions"):(0,vS.sprintf)((0,vS.__)('Search results for "%s"'),t);return(0,mp.jsx)("div",{className:"block-editor-link-control__search-results-wrapper",children:(0,mp.jsx)("div",{...r,className:f,"aria-label":g,children:(0,mp.jsx)(fne.MenuGroup,{children:i.map((b,k)=>h&&fp===b.type?(0,mp.jsx)(nne,{searchTerm:t,buttonText:u,onClick:()=>o(b),itemProps:n(b,k),isSelected:k===s},b.type):fp===b.type?null:(0,mp.jsx)(cne,{itemProps:n(b,k),suggestion:b,index:k,onClick:()=>{o(b)},isSelected:k===s,isURL:Fb.includes(b.type),searchTerm:t,shouldShowType:p,isFrontPage:b?.isFrontPage,isBlogHome:b?.isBlogHome},`${b.id}-${b.type}`))})})})}var hne=pne,gne=e=>((0,mne.default)("wp.blockEditor.__experimentalLinkControlSearchResults",{since:"6.8"}),(0,mp.jsx)(pne,{...e}));var bne=l(O(),1),kne=l(z(),1);var a2=l(bn(),1);function yS(e){let t=e?.trim();if(!t)return{url:t,type:s2};let o=s2,r=(0,a2.getProtocol)(t)||"";return r.includes("mailto")?o=q4:r.includes("tel")?o=Y4:t?.startsWith("#")&&(o=Z4),Nf(t)||Mf(t)||t.startsWith("?")||r?{url:t,type:o}:{url:(0,a2.prependHTTPS)(t),type:o}}var JIe=()=>Promise.resolve([]),e2e=e=>{let{url:t,type:o}=yS(e);return Promise.resolve([{id:e,title:e,url:t,type:o}])},t2e=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||Df(e)||!r?a:a.concat({title:e,url:e,type:fp})};function vne(e,t,o){let{fetchSearchSuggestions:r,pageOnFront:n,pageForPosts:i}=(0,kne.useSelect)(a=>{let{getSettings:c}=a(x);return{pageOnFront:c().pageOnFront,pageForPosts:c().pageForPosts,fetchSearchSuggestions:c().__experimentalFetchLinkSuggestions}},[]),s=t?e2e:JIe;return(0,bne.useCallback)((a,{isInitialSuggestions:c})=>Df(a)?s(a,{isInitialSuggestions:c}):t2e(a,{...e,isInitialSuggestions:c},r,o,n,i),[s,r,n,i,e,o])}var zb=l(w(),1),o2e=()=>Promise.resolve([]),Q4=()=>{},_ne=(0,l2.forwardRef)(({value:e,children:t,currentLink:o={},className:r=null,placeholder:n=null,withCreateSuggestion:i=!1,onCreateSuggestion:s=Q4,onChange:a=Q4,onSelect:c=Q4,showSuggestions:u=!0,renderSuggestions:d=C=>(0,zb.jsx)(hne,{...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=vne(p,m,i,g),B=u?f||C:o2e,[P,R]=(0,l2.useState)(),E=(D,U)=>{a(D),R(U)},L=D=>d({...D,withCreateSuggestion:i,createSuggestionButtonText:b,suggestionsQuery:p,handleSuggestionClick:U=>{D.handleSuggestionClick&&D.handleSuggestionClick(U),T(U)}}),T=async D=>{let U=D;if(fp===D.type){try{U=await s(D.title),U?.url&&c(U)}catch{}return}if(m||U&&Object.keys(U).length>=1){let{id:j,url:H,kind:G,type:Q,...ie}=o??{};c({...ie,...U},U)}},I=n??(0,J4.__)("Search or type URL"),M=k&&n!==""?I:(0,J4.__)("Link");return(0,zb.jsxs)("div",{className:"block-editor-link-control__search-input-container",children:[(0,zb.jsx)(Hd,{disableSuggestions:o?.url===e,label:M,hideLabelFromVision:k,className:r,value:e,onChange:E,placeholder:I,__experimentalRenderSuggestions:u?L:null,__experimentalFetchLinkSuggestions:B,__experimentalHandleURLSuggestions:!0,__experimentalShowInitialSuggestions:h,customValidity:_,required:!1,onSubmit:(D,U)=>{let j=D||P;!j&&!e?.trim()?.length?U.preventDefault():T(j||{url:e})},inputRef:S,suffix:v,disabled:y}),t]})}),Sne=_ne,xne=e=>((0,yne.default)("wp.blockEditor.__experimentalLinkControlSearchInput",{since:"6.8"}),(0,zb.jsx)(_ne,{...e}));var Gd=l(N(),1),Vo=l(A(),1),Tne=l(X(),1),d2=l(bn(),1);var Ine=l(Fe(),1),f2=l(z(),1),Pne=l(Li(),1),Rne=l(kh(),1);var wne=l(A(),1),{Slot:Cne,Fill:Bne}=(0,wne.createSlotFill)("BlockEditorLinkControlViewer");var Ene=l(z(),1),c2=l(O(),1);function r2e(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 n2e(e){let[t,o]=(0,c2.useReducer)(r2e,{richData:null,isFetching:!1}),{fetchRichUrlData:r}=(0,Ene.useSelect)(n=>{let{getSettings:i}=n(x);return{fetchRichUrlData:i().__experimentalFetchRichUrlData}},[]);return(0,c2.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 u2=n2e;var St=l(w(),1),{Badge:i2e}=F(Vo.privateApis);function One({value:e,onEditClick:t,hasRichPreviews:o=!1,hasUnlinkControl:r=!1,onRemove:n}){let i=(0,f2.useSelect)(b=>b(Rne.store).get("core","showIconLabels"),[]),s=o?e?.url:null,{richData:a,isFetching:c}=u2(s),u=a&&Object.keys(a).length,d=e&&(0,d2.filterURLForDisplay)((0,d2.safeDecodeURI)(e.url),24)||"",f=!e?.url?.length,m=!f&&(0,Ine.__unstableStripHTML)(a?.title||e?.title||d),h;a?.icon?h=(0,St.jsx)("img",{src:a?.icon,alt:""}):f?h=(0,St.jsx)(we,{icon:ZL,size:32}):h=(0,St.jsx)(we,{icon:Cv});let{createNotice:p}=(0,f2.useDispatch)(Pne.store),g=(0,Tne.useCopyToClipboard)(e.url,()=>{p("info",(0,Gd.__)("Link copied to clipboard."),{isDismissible:!0,type:"snackbar"})});return(0,St.jsx)(Vo.Flex,{role:"group","aria-label":(0,Gd.__)("Manage link"),className:V("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,St.jsxs)(Vo.Flex,{gap:0,align:"flex-start",children:[(0,St.jsxs)(Vo.Flex,{className:"block-editor-link-control__link-information",role:"figure","aria-label":(0,Gd.__)("Link information"),justify:"start",align:"flex-start",children:[e?.image?(0,St.jsx)(Vo.Flex,{className:"block-editor-link-control__preview-image",justify:"center",children:(0,St.jsx)("img",{src:e?.image,alt:""})}):(0,St.jsx)(Vo.Flex,{className:V("block-editor-link-control__preview-icon",{"is-image":a?.icon}),justify:"center",children:h}),(0,St.jsx)(Vo.Flex,{className:"block-editor-link-control__preview-details",direction:"column",gap:2,children:f?(0,St.jsx)("span",{className:"block-editor-link-control__preview-error-notice",children:(0,Gd.__)("Link is empty")}):(0,St.jsxs)(St.Fragment,{children:[(0,St.jsx)(Vo.ExternalLink,{className:"block-editor-link-control__preview-title",href:e.url,children:(0,St.jsx)(Vo.__experimentalTruncate,{numberOfLines:1,children:m})}),(0,St.jsx)("span",{className:"block-editor-link-control__preview-info",children:(0,St.jsx)(Vo.__experimentalTruncate,{numberOfLines:1,children:d})}),e?.badges?.length>0&&(0,St.jsx)(Vo.__experimentalHStack,{className:"block-editor-link-control__preview-badges",alignment:"left",gap:1,children:e.badges.map((b,k)=>(0,St.jsx)(i2e,{intent:b.intent,children:b.label},`${b.label}|${b.intent}|${k}`))})]})})]}),(0,St.jsx)(Vo.Button,{icon:Xf,label:(0,Gd.__)("Edit link"),onClick:t,size:"compact",showTooltip:!i}),r&&(0,St.jsx)(Vo.Button,{icon:Ii,label:(0,Gd.__)("Remove link"),onClick:n,size:"compact",showTooltip:!i}),(0,St.jsx)(Vo.Button,{icon:QA,label:(0,Gd.__)("Copy link"),ref:g,accessibleWhenDisabled:!0,disabled:f,size:"compact",showTooltip:!i}),(0,St.jsx)(Cne,{fillProps:e})]})})}var Ane=l(N(),1),m2=l(A(),1),jb=l(w(),1),s2e=()=>{},a2e=({value:e,onChange:t=s2e,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,jb.jsx)("div",{className:"block-editor-link-control__setting",children:s},i.id)}return null}return(0,jb.jsx)(m2.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,jb.jsxs)("fieldset",{className:"block-editor-link-control__settings",children:[(0,jb.jsx)(m2.VisuallyHidden,{as:"legend",children:(0,Ane.__)("Currently selected link settings")}),n]})},Lne=a2e;var Nne=l(N(),1),pp=l(O(),1);function Mne(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=l2e(Promise.resolve(e(a))),await t.current.promise}catch(c){if(c&&c.isCanceled)return;throw i(c.message||(0,Nne.__)("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 l2e=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 eF=l(O(),1),Fne=l(Vne(),1);function zne(e){let[t,o]=(0,eF.useState)(e||{}),[r,n]=(0,eF.useState)(e);return(0,Fne.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 Rt=l(w(),1),oF=()=>{},jne="core/block-editor",Une="linkControlSettingsDrawer";function hp({searchInputPlaceholder:e,value:t,settings:o=X4,onChange:r=oF,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,uo.useState)(!1),[B,P]=(0,uo.useState)(void 0),{advancedSettingsPreference:R}=(0,p2.useSelect)(be=>({advancedSettingsPreference:be(tF.store).get(jne,Une)??!1}),[]),{set:E}=(0,p2.useDispatch)(tF.store),L=be=>{E&&E(jne,Une,be),C(be)},T=R||S,I=(0,uo.useRef)(!0),M=(0,uo.useRef)(),D=(0,uo.useRef)(),U=(0,uo.useRef)(),j=(0,uo.useRef)(),H=o.map(({id:be})=>be),[G,Q,ie,ce,te]=zne(t),ne=be=>{ie(be),n?.(be)},Z=_&&!!G?.id,Y=(0,Hne.useInstanceId)(hp,"link-control"),J=Z?`${Y}__help`:null,K=t&&!(0,$ne.isShallowEqualObjects)(G,t),[ee,re]=(0,uo.useState)(d!==void 0?d:!t||!t.url),{createPage:W,isCreatingPage:ae,errorMessage:ge}=Mne(f);(0,uo.useEffect)(()=>{d!==void 0&&re(d)},[d]),(0,uo.useEffect)(()=>{if(I.current)return;(Gne.focus.focusable.find(M.current)[0]||M.current).focus()},[ee,ae]),(0,uo.useEffect)(()=>(I.current=!1,()=>{I.current=!0}),[]);let fe=(0,uo.useRef)();(0,uo.useEffect)(()=>{if(fe.current===void 0){fe.current=h;return}fe.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."),fe.current=h)},[h]),(0,uo.useEffect)(()=>{if(B?.type==="invalid"){let be=U.current;be&&typeof be.reportValidity=="function"&&be.reportValidity()}},[B]);let xe=t?.url?.trim()?.length>0,De=()=>{re(!1)},st=be=>{let Bt={type:"invalid",message:(0,ia.__)("Please enter a valid URL.")},Ao={type:"valid"},qe=be?.trim();if(!qe?.length||!Df(qe))return Bt;if(Nf(qe)||Mf(qe))return Ao;let oe=(0,h2.prependHTTPS)(qe);return(0,h2.isURL)(oe)?Ao:Bt},Lt=be=>{if(!(be&&be.id&&be.type&&!Fb.includes(be.type))){let qe=be?.url||He,oe=st(qe);if(oe.type==="invalid"){P(oe);return}let{url:Ne}=yS(qe);be={...be,url:Ne}}be?.kind==="taxonomy"&&be?.url&&(j.current=be.url);let Ao=Object.keys(be).reduce((qe,oe)=>(H.includes(oe)||(qe[oe]=be[oe]),qe),{});r({...G,...Ao,title:G?.title||be?.title}),P(void 0),De()},no=()=>{if(fr)return!1;let be=He.trim(),Bt=G&&G.id&&G.type&&!Fb.includes(G.type),Ao=t?.url===be;if(Bt&&Ao)return P(void 0),!0;let qe=st(He);return qe.type==="invalid"?(P(qe),!1):(P(void 0),!0)},jo=()=>{K&&r({...t,...G,url:yS(He).url}),De(),P(void 0)},at=()=>{no()&&jo()},dr=be=>{let{keyCode:Bt}=be;Bt===Wne.ENTER&&!fr&&(be.preventDefault(),at())},$t=()=>{Q(t)},io=be=>{be.preventDefault(),be.stopPropagation(),$t(),P(void 0),xe?De():i?.(),s?.()},[Ue,Kt]=(0,uo.useState)(!1),Je=()=>{let{id:be,kind:Bt,type:Ao,...qe}=G;Q({...qe,id:void 0,kind:void 0,type:void 0,url:void 0}),Kt(!0)};(0,uo.useEffect)(()=>{Ue&&(U.current?.focus(),Kt(!1))},[Ue]);let He=G?.url!==void 0?G.url:h||"",fr=!He?.trim()?.length;(0,uo.useEffect)(()=>{P(void 0)},[He]);let pn=!B,ze=i&&t&&!ee&&!ae,so=ee&&xe,et=xe&&v,Ve=(ee||!t)&&!ae,yt=fr||!pn||t&&!K,Oo=!!o?.length&&ee&&xe,mr=(0,uo.useMemo)(()=>t?.kind==="taxonomy"&&!t?.url&&j.current?{...t,url:j.current}:t,[t]);return(0,Rt.jsxs)("div",{tabIndex:-1,ref:M,className:"block-editor-link-control",children:[ae&&(0,Rt.jsxs)("div",{className:"block-editor-link-control__loading",children:[(0,Rt.jsx)(nn.Spinner,{})," ",(0,ia.__)("Creating"),"\u2026"]}),Ve&&(0,Rt.jsxs)(Rt.Fragment,{children:[(0,Rt.jsxs)("div",{className:V({"block-editor-link-control__search-input-wrapper":!0,"has-text-control":et,"has-actions":so}),children:[et&&(0,Rt.jsx)(nn.TextControl,{ref:D,className:"block-editor-link-control__field block-editor-link-control__text-content",label:(0,ia.__)("Text"),value:G?.title,onChange:ce,onKeyDown:dr,__next40pxDefaultSize:!0}),(0,Rt.jsx)(Sne,{ref:U,currentLink:t,className:"block-editor-link-control__field block-editor-link-control__search-input",placeholder:e,value:He,withCreateSuggestion:m,onCreateSuggestion:W,onChange:ne,onSelect:Lt,showInitialSuggestions:u,allowDirectEntry:!a,showSuggestions:c,suggestionsQuery:p,withURLSuggestion:!g,createSuggestionButtonText:b,hideLabelFromVision:!et,isEntity:Z,customValidity:B,suffix:(0,Rt.jsx)(c2e,{isEntity:Z,showActions:so,isDisabled:yt,onUnlink:Je,onSubmit:at,helpTextId:J})}),Z&&J&&(0,Rt.jsx)("p",{id:J,className:"block-editor-link-control__help",children:(0,ia.sprintf)((0,ia.__)("Synced with the selected %s."),G?.type||"item")})]}),ge&&(0,Rt.jsx)(nn.Notice,{className:"block-editor-link-control__search-error",status:"error",isDismissible:!1,children:ge})]}),t&&!ee&&!ae&&(0,Rt.jsx)(One,{value:mr,onEditClick:()=>re(!0),hasRichPreviews:k,hasUnlinkControl:ze,onRemove:()=>{i(),re(!0)}},mr?.url),Oo&&(0,Rt.jsx)("div",{className:"block-editor-link-control__tools",children:!fr&&(0,Rt.jsx)(tne,{settingsOpen:T,setSettingsOpen:L,children:(0,Rt.jsx)(Lne,{value:G,settings:o,onChange:te(H)})})}),so&&(0,Rt.jsxs)(nn.__experimentalHStack,{justify:"right",className:"block-editor-link-control__search-actions",children:[(0,Rt.jsx)(nn.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:io,children:(0,ia.__)("Cancel")}),(0,Rt.jsx)(nn.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:yt?oF:at,className:"block-editor-link-control__search-submit","aria-disabled":yt,children:(0,ia.__)("Apply")})]}),!ae&&y&&y()]})}function c2e({isEntity:e,showActions:t,isDisabled:o,onUnlink:r,onSubmit:n,helpTextId:i}){if(e)return(0,Rt.jsx)(nn.Button,{icon:Ii,onClick:r,"aria-describedby":i,showTooltip:!0,label:(0,ia.__)("Unsync and edit"),__next40pxDefaultSize:!0});if(!t)return(0,Rt.jsx)(nn.__experimentalInputControlSuffixWrapper,{variant:"control",children:(0,Rt.jsx)(nn.Button,{onClick:o?oF:n,label:(0,ia.__)("Submit"),icon:wl,className:"block-editor-link-control__search-submit","aria-disabled":o,size:"small"})})}hp.ViewerFill=Bne;hp.DEFAULT_LINK_SETTINGS=X4;var g2=e=>((0,Kne.default)("wp.blockEditor.__experimentalLinkControl",{since:"6.8",alternative:"wp.blockEditor.LinkControl"}),(0,Rt.jsx)(hp,{...e}));g2.ViewerFill=hp.ViewerFill;g2.DEFAULT_LINK_SETTINGS=hp.DEFAULT_LINK_SETTINGS;var Wd=hp;var qne=l(N(),1),Zne=l(A(),1),Xne=l(Pe(),1);var _S=1.5,rF=.01,nF=10,iF="";function Yne(e){return e!==void 0&&e!==iF}var sF=l(w(),1),u2e=({__next40pxDefaultSize:e=!1,value:t,onChange:o,__unstableInputWidth:r="60px",...n})=>{let i=Yne(t),s=(d,f)=>{if(i)return d;let m=rF*nF;switch(`${d}`){case`${m}`:return _S+m;case"0":return f?d:_S-m;case"":return _S;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:iF,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,Xne.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,sF.jsx)("div",{className:"block-editor-line-height-control",children:(0,sF.jsx)(Zne.__experimentalNumberControl,{...n,__shouldNotWarnDeprecated36pxSize:!0,__next40pxDefaultSize:e,__unstableInputWidth:r,__unstableStateReducer:a,onChange:u,label:(0,qne.__)("Line height"),placeholder:_S,step:rF,spinFactor:nF,value:c,min:0,spinControls:"custom"})})},b2=u2e;var qa=l(N(),1),Qne=l(er(),1),sn=l(A(),1),v2=l(z(),1),Jne=l(ct(),1);var eie=l(X(),1),tie=l(Fe(),1),oie=l(Li(),1),rie=l(O(),1);function k2(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 sr=l(w(),1),d2e=()=>{},f2e=0,m2e=({mediaURL:e,mediaId:t,mediaIds:o,allowedTypes:r,accept:n,onError:i,onSelect:s,onSelectURL:a,onReset:c,onToggleFeaturedImage:u,useFeaturedImage:d,onFilesUpload:f=d2e,name:m=(0,qa.__)("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:P}=(0,v2.useSelect)(H=>{let{getSettings:G}=H(x),Q=G();return{mediaUpload:Q.mediaUpload,allowedMimeTypes:Q.allowedMimeTypes}},[]),R=`block-editor/media-replace-flow/error-notice/${++f2e}`,E=(0,rie.useMemo)(()=>k2(r,P,n),[r,P,n]),L=H=>{let G=(0,tie.__unstableStripHTML)(H);if(i){i(G);return}setTimeout(()=>{h("error",G,{speak:!0,id:R,isDismissible:!0})},1e3)},T=(H,G)=>{d&&u&&u(),G(),s(H),(0,Qne.speak)((0,qa.__)("The media file has been replaced")),p(R)},I=(H,G)=>{let Q=H.target.files;if(!v)return G(),s(Q);f(Q),B({allowedTypes:r,filesList:Q,onFileChange:([ie])=>{T(ie,G)},onError:L})},M=H=>{H.keyCode===Jne.DOWN&&(H.preventDefault(),H.target.click())},U=b&&(!r||r.length===0?!1:r.every(H=>H==="image"||H.startsWith("image/"))),j={..._,variant:y};return(0,sr.jsx)(sn.Dropdown,{popoverProps:j,className:C,contentClassName:V("block-editor-media-replace-flow__options",y&&`is-variant-${y}`),renderToggle:({isOpen:H,onToggle:G})=>S?S({"aria-expanded":H,"aria-haspopup":"true",onClick:G,onKeyDown:M,children:m}):(0,sr.jsx)(sn.ToolbarButton,{"aria-expanded":H,"aria-haspopup":"true",onClick:G,onKeyDown:M,children:m}),renderContent:({onClose:H})=>(0,sr.jsxs)(sr.Fragment,{children:[(0,sr.jsxs)(sn.NavigableMenu,{className:"block-editor-media-replace-flow__media-upload-menu",children:[(0,sr.jsxs)(Ws,{children:[(0,sr.jsx)(sd,{gallery:U,addToGallery:k,multiple:b,value:b?o:t,onSelect:G=>T(G,H),allowedTypes:r,render:({open:G})=>(0,sr.jsx)(sn.MenuItem,{icon:ch,onClick:G,children:(0,qa.__)("Open Media Library")})}),(0,sr.jsx)(sn.FormFileUpload,{onChange:G=>{I(G,H)},accept:E,multiple:!!b,render:({openFileDialog:G})=>(0,sr.jsx)(sn.MenuItem,{icon:IM,onClick:()=>{G()},children:(0,qa._x)("Upload","verb")})})]}),u&&(0,sr.jsx)(sn.MenuItem,{icon:VN,onClick:u,isPressed:d,children:(0,qa.__)("Use featured image")}),typeof g=="function"?g({onClose:H}):g,e&&c&&(0,sr.jsx)(sn.MenuItem,{onClick:()=>{c(),H()},children:(0,qa.__)("Reset")})]}),a&&(0,sr.jsxs)("form",{className:"block-editor-media-flow__url-input",children:[(0,sr.jsx)("span",{className:"block-editor-media-replace-flow__image-url-label",children:(0,qa.__)("Current media URL:")}),(0,sr.jsx)(Wd,{value:{url:e},settings:[],showSuggestions:!1,onChange:({url:G})=>{a(G)},searchInputPlaceholder:(0,qa.__)("Paste or type URL")})]})]})})},Ub=(0,eie.compose)([(0,v2.withDispatch)(e=>{let{createNotice:t,removeNotice:o}=e(oie.store);return{createNotice:t,removeNotice:o}}),(0,sn.withFilters)("editor.MediaReplaceFlow")])(m2e);var To=l(A(),1),Eo=l(N(),1),qd=l(O(),1),bie=l(z(),1);var kie=l(Pe(),1);var lF=l(N(),1),_2=l(O(),1),Hb=l(A(),1);var gie=l(Pe(),1);var sie=l(N(),1),aie=l(A(),1);var nie=l(A(),1),y2=l(bn(),1),aF=l(w(),1);function iie({url:e,urlLabel:t,className:o}){let r=V(o,"block-editor-url-popover__link-viewer-url");return e?(0,aF.jsx)(nie.ExternalLink,{className:r,href:e,children:t||(0,y2.filterURLForDisplay)((0,y2.safeDecodeURI)(e))}):(0,aF.jsx)("span",{className:r})}var SS=l(w(),1);function lie({className:e,linkClassName:t,onEditLinkClick:o,url:r,urlLabel:n,...i}){return(0,SS.jsxs)("div",{className:V("block-editor-url-popover__link-viewer",e),...i,children:[(0,SS.jsx)(iie,{url:r,urlLabel:n,className:t}),o&&(0,SS.jsx)(aie.Button,{icon:Xf,label:(0,sie.__)("Edit"),onClick:o,size:"compact"})]})}var mie=l(N(),1),pie=l(A(),1);var Ic=l(N(),1),xS=l(O(),1),sa=l(ct(),1),An=l(A(),1),$d=l(X(),1),cie=l(z(),1),uie=l(bn(),1);var Za=l(w(),1),die=l(je(),1),{ValidatedInputControl:p2e}=F(An.privateApis);function fie(e){return typeof e=="function"}var h2e=class extends xS.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,xS.createRef)(),this.inputRef=e.inputRef||(0,xS.createRef)(),this.hasRenderedValidation={current:!1},this.updateSuggestions=(0,$d.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,uie.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,Ic.sprintf)((0,Ic._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,Ic.__)("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 sa.UP:{e.target.selectionStart!==0&&(e.preventDefault(),e.target.setSelectionRange(0,0));break}case sa.DOWN:{this.props.value.length!==e.target.selectionStart&&(e.preventDefault(),e.target.setSelectionRange(this.props.value.length,this.props.value.length));break}case sa.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 sa.UP:{e.preventDefault();let s=o?o-1:r.length-1;this.setState({selectedSuggestion:s});break}case sa.DOWN:{e.preventDefault();let s=o===null||o===r.length-1?0:o+1;this.setState({selectedSuggestion:s});break}case sa.TAB:{this.state.selectedSuggestion!==null&&(this.selectLink(i),this.props.speak((0,Ic.__)("Link selected.")));break}case sa.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,Za.jsxs)(Za.Fragment,{children:[this.renderControl(),this.renderSuggestions()]})}renderControl(){let{label:e=null,className:t,isFullWidth:o,instanceId:r,placeholder:n=(0,Ic.__)("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:V("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,Ic.__)("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?p2e:An.__experimentalInputControl;return(0,Za.jsxs)(An.BaseControl,{...v,children:[(0,Za.jsx)(S,{...y,...this.hasRenderedValidation.current?_:{},__next40pxDefaultSize:!0}),m&&(0,Za.jsx)(An.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 fie(t)?t({suggestions:r,selectedSuggestion:i,suggestionsListProps:u,buildSuggestionItemProps:d,isLoading:c,handleSuggestionClick:this.handleOnClick,isInitialSuggestions:!n?.length,currentInputValue:n}):(0,Za.jsx)(An.Popover,{placement:"bottom",focusOnMount:!1,children:(0,Za.jsx)("div",{...u,className:V("block-editor-url-input__suggestions",{[`${e}__suggestions`]:e}),children:r.map((f,m)=>(0,die.createElement)(An.Button,{__next40pxDefaultSize:!0,...d(f,m),key:f.id,className:V("block-editor-url-input__suggestion",{"is-selected":m===i}),onClick:()=>this.handleOnClick(f)},f.title))})})}},Hd=(0,$d.compose)($d.withSafeTimeout,An.withSpokenMessages,$d.withInstanceId,(0,cie.withSelect)((e,t)=>{if(fie(t.__experimentalFetchLinkSuggestions))return;let{getSettings:o}=e(x);return{__experimentalFetchLinkSuggestions:o().__experimentalFetchLinkSuggestions}}))(h2e);var wS=l(w(),1);function hie({autocompleteRef:e,className:t,onChangeInputValue:o,value:r,...n}){return(0,wS.jsxs)("form",{className:V("block-editor-url-popover__link-editor",t),...n,children:[(0,wS.jsx)(Hd,{value:r,onChange:o,autocompleteRef:e}),(0,wS.jsx)(pie.Button,{icon:wl,label:(0,mie.__)("Apply"),type:"submit",size:"compact"})]})}var Kd=l(w(),1),{__experimentalPopoverLegacyPositionToPlacement:g2e}=F(Hb.privateApis),b2e="bottom",cF=(0,_2.forwardRef)(({additionalControls:e,children:t,renderSettings:o,placement:r,focusOnMount:n="firstElement",position:i,...s},a)=>{i!==void 0&&(0,gie.default)("`position` prop in wp.blockEditor.URLPopover",{since:"6.2",alternative:"`placement` prop"});let c;r!==void 0?c=r:i!==void 0&&(c=g2e(i)),c=c||b2e;let[u,d]=(0,_2.useState)(!1),f=!!o&&u,m=()=>{d(!u)};return(0,Kd.jsxs)(Hb.Popover,{ref:a,role:"dialog","aria-modal":"true","aria-label":(0,lF.__)("Edit URL"),className:"block-editor-url-popover",focusOnMount:n,placement:c,shift:!0,variant:"toolbar",...s,children:[(0,Kd.jsx)("div",{className:"block-editor-url-popover__input-container",children:(0,Kd.jsxs)("div",{className:"block-editor-url-popover__row",children:[t,!!o&&(0,Kd.jsx)(Hb.Button,{className:"block-editor-url-popover__settings-toggle",icon:hr,label:(0,lF.__)("Link settings"),onClick:m,"aria-expanded":u,size:"compact"})]})}),f&&(0,Kd.jsx)("div",{className:"block-editor-url-popover__settings",children:o()}),e&&!f&&(0,Kd.jsx)("div",{className:"block-editor-url-popover__additional-controls",children:e})]})});cF.LinkEditor=hie;cF.LinkViewer=lie;var Yd=cF;var $e=l(w(),1),k2e=()=>{},v2e=({src:e,onChange:t,onSubmit:o,onClose:r,popoverAnchor:n})=>(0,$e.jsx)(Yd,{anchor:n,onClose:r,children:(0,$e.jsx)("form",{className:"block-editor-media-placeholder__url-input-form",onSubmit:o,children:(0,$e.jsx)(To.__experimentalInputControl,{__next40pxDefaultSize:!0,label:(0,Eo.__)("URL"),type:"text",hideLabelFromVision:!0,placeholder:(0,Eo.__)("Paste or type URL"),onChange:t,value:e,suffix:(0,$e.jsx)(To.__experimentalInputControlSuffixWrapper,{variant:"control",children:(0,$e.jsx)(To.Button,{size:"small",icon:wl,label:(0,Eo.__)("Apply"),type:"submit"})})})})}),y2e=({src:e,onChangeSrc:t,onSelectURL:o})=>{let[r,n]=(0,qd.useState)(null),[i,s]=(0,qd.useState)(!1),a=()=>{s(!0)},c=()=>{s(!1),r?.focus()},u=d=>{d.preventDefault(),e&&o&&(o(e),c())};return(0,$e.jsxs)("div",{className:"block-editor-media-placeholder__url-input-container",children:[(0,$e.jsx)(To.Button,{__next40pxDefaultSize:!0,className:"block-editor-media-placeholder__button",onClick:a,isPressed:i,variant:"secondary","aria-haspopup":"dialog",ref:n,children:(0,Eo.__)("Insert from URL")}),i&&(0,$e.jsx)(v2e,{src:e,onChange:t,onSubmit:u,onClose:c,popoverAnchor:r})]})};function _2e({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:_=k2e,onHTMLDrop:S,children:C,mediaLibraryButton:B,placeholder:P,style:R}){S&&(0,kie.default)("wp.blockEditor.MediaPlaceholder onHTMLDrop prop",{since:"6.2",version:"6.4"});let{mediaUpload:E,allowedMimeTypes:L}=(0,bie.useSelect)(Y=>{let{getSettings:J}=Y(x),K=J();return{mediaUpload:K.mediaUpload,allowedMimeTypes:K.allowedMimeTypes}},[]),[T,I]=(0,qd.useState)("");(0,qd.useEffect)(()=>{I(e?.src??"")},[e?.src]);let M=(0,qd.useMemo)(()=>k2(t,L,c),[t,L,c]),D=()=>!t||t.length===0?!1:t.every(Y=>Y==="image"||Y.startsWith("image/")),U=Y=>{if(!f||typeof f=="function"&&!f(Y))return g(Y);_(Y);let J;if(d)if(u){let K=[];J=ee=>{let re=(e??[]).filter(W=>W.id?!K.some(({id:ae})=>Number(ae)===Number(W.id)):!K.some(({urlSlug:ae})=>W.url.includes(ae)));g(re.concat(ee)),K=ee.map(W=>{let ae=W.url.lastIndexOf("."),ge=W.url.slice(0,ae);return{id:W.id,urlSlug:ge}})}}else J=g;else J=([K])=>g(K);E({allowedTypes:t,filesList:Y,onFileChange:J,onError:p,multiple:d})};async function j(Y){let{blocks:J}=ZV(Y);if(!J?.length)return;let K=await Promise.all(J.map(ee=>{let re=ee.name.split("/")[1];return ee.attributes.id?(ee.attributes.type=re,ee.attributes):new Promise((W,ae)=>{window.fetch(ee.attributes.url).then(ge=>ge.blob()).then(ge=>E({filesList:[ge],additionalData:{title:ee.attributes.title,alt_text:ee.attributes.alt,caption:ee.attributes.caption,type:re},onFileChange:([fe])=>{fe.id&&W(fe)},allowedTypes:t,onError:ae})).catch(()=>W(ee.attributes.url))})})).catch(ee=>p(ee));K?.length&&g(d?K:K[0])}let H=Y=>{U(Y.target.files)},Q=P??(Y=>{let{instructions:J,title:K}=n;if(!E&&!k&&(J=(0,Eo.__)("To edit this block, you need permission to upload media.")),J===void 0||K===void 0){let re=t??[],[W]=re,ae=re.length===1,ge=ae&&W==="audio",fe=ae&&W==="image",xe=ae&&W==="video";J===void 0&&E&&(J=(0,Eo.__)("Drag and drop an image or video, upload, or choose from your library."),ge?J=(0,Eo.__)("Drag and drop an audio file, upload, or choose from your library."):fe?J=(0,Eo.__)("Drag and drop an image, upload, or choose from your library."):xe&&(J=(0,Eo.__)("Drag and drop a video, upload, or choose from your library."))),K===void 0&&(K=(0,Eo.__)("Media"),ge?K=(0,Eo.__)("Audio"):fe?K=(0,Eo.__)("Image"):xe&&(K=(0,Eo.__)("Video")))}let ee=V("block-editor-media-placeholder",o,{"is-appender":a});return(0,$e.jsxs)(To.Placeholder,{icon:r,label:K,instructions:J,className:ee,notices:s,onDoubleClick:y,preview:i,style:R,children:[Y,C]})}),ie=()=>m?null:(0,$e.jsx)(To.DropZone,{onFilesDrop:U,onDrop:j,isEligible:Y=>{let J="wp-block:core/",K=[];for(let ee of Y.types)ee.startsWith(J)&&K.push(ee.slice(J.length));return K.every(ee=>t.includes(ee))&&(d?!0:K.length===1)}}),ce=()=>b&&(0,$e.jsx)(To.Button,{__next40pxDefaultSize:!0,className:"block-editor-media-placeholder__cancel-button",title:(0,Eo.__)("Cancel"),variant:"link",onClick:b,children:(0,Eo.__)("Cancel")}),te=()=>k&&(0,$e.jsx)(y2e,{src:T,onChangeSrc:I,onSelectURL:k}),ne=()=>v&&(0,$e.jsx)("div",{className:"block-editor-media-placeholder__url-input-container",children:(0,$e.jsx)(To.Button,{__next40pxDefaultSize:!0,className:"block-editor-media-placeholder__button",onClick:v,variant:"secondary",children:(0,Eo.__)("Use featured image")})}),Z=()=>{let J=B??(({open:ee})=>(0,$e.jsx)(To.Button,{__next40pxDefaultSize:!0,variant:"secondary",onClick:()=>{ee()},children:(0,Eo.__)("Media Library")})),K=(0,$e.jsx)(sd,{addToGallery:u,gallery:d&&D(),multiple:d,onSelect:g,allowedTypes:t,mode:"browse",value:Array.isArray(e)?e.map(({id:ee})=>ee):e.id,render:J});if(E&&a)return(0,$e.jsxs)($e.Fragment,{children:[ie(),(0,$e.jsx)(To.FormFileUpload,{onChange:H,accept:M,multiple:!!d,render:({openFileDialog:ee})=>{let re=(0,$e.jsxs)($e.Fragment,{children:[(0,$e.jsx)(To.Button,{__next40pxDefaultSize:!0,variant:"primary",className:V("block-editor-media-placeholder__button","block-editor-media-placeholder__upload-button"),onClick:ee,children:(0,Eo._x)("Upload","verb")}),K,te(),ne(),ce()]});return Q(re)}})]});if(E){let ee=(0,$e.jsxs)($e.Fragment,{children:[ie(),(0,$e.jsx)(To.FormFileUpload,{render:({openFileDialog:re})=>(0,$e.jsx)(To.Button,{__next40pxDefaultSize:!0,onClick:re,variant:"primary",className:V("block-editor-media-placeholder__button","block-editor-media-placeholder__upload-button"),children:(0,Eo._x)("Upload","verb")}),onChange:H,accept:M,multiple:!!d}),K,te(),ne(),ce()]});return Q(ee)}return Q(K)};return h?(0,$e.jsx)(Ws,{children:ie()}):(0,$e.jsx)(Ws,{fallback:Q(te()),children:Z()})}var vie=(0,To.withFilters)("editor.MediaPlaceholder")(_2e);var yie=l(w(),1),S2e=({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,yie.jsx)(UI,{settings:o,gradients:[],disableCustomGradients:!0,...t})},_ie=S2e;var bse=l(AD(),1);var kse=l(O(),1);var pse=l(O(),1);var lse=l(Ff(),1),ar=l(O(),1),Xd=l(z(),1),M2=l(X(),1),cse=l(br(),1),use=l(A(),1),dse=l($(),1),fse=l(Pe(),1),Jb=l(N(),1);var Sie=l(N(),1),S2=l(A(),1);var uF=l(N(),1),gp=l(A(),1);var Pc=l(w(),1),x2e={placement:"bottom-start"},w2e=()=>(0,Pc.jsxs)(Pc.Fragment,{children:[["bold","italic","link","unknown"].map(e=>(0,Pc.jsx)(gp.Slot,{name:`RichText.ToolbarControls.${e}`},e)),(0,Pc.jsx)(gp.Slot,{name:"RichText.ToolbarControls",children:e=>{if(!e.length)return null;let o=e.map(([{props:r}])=>r).some(({isActive:r})=>r);return(0,Pc.jsx)(gp.ToolbarItem,{children:r=>(0,Pc.jsx)(gp.DropdownMenu,{icon:hr,label:(0,uF.__)("More"),toggleProps:{...r,className:V(r.className,{"is-pressed":o}),description:(0,uF.__)("Displays more block tools")},controls:_a(e.map(([{props:n}])=>n),"title"),popoverProps:x2e})})}})]}),dF=w2e;var Zd=l(w(),1);function C2e({popoverAnchor:e}){return(0,Zd.jsx)(S2.Popover,{placement:"top",focusOnMount:!1,anchor:e,className:"block-editor-rich-text__inline-format-toolbar",__unstableSlotName:"block-toolbar",children:(0,Zd.jsx)(Kg,{className:"block-editor-rich-text__inline-format-toolbar-group","aria-label":(0,Sie.__)("Format tools"),children:(0,Zd.jsx)(S2.ToolbarGroup,{children:(0,Zd.jsx)(dF,{})})})})}var B2e=({inline:e,editableContentElement:t})=>e?(0,Zd.jsx)(C2e,{popoverAnchor:t}):(0,Zd.jsx)(Dt,{group:"inline",children:(0,Zd.jsx)(dF,{})}),xie=B2e;var x2=l(O(),1),wie=l(z(),1);function Cie({html:e,value:t}){let o=(0,x2.useRef)(),r=!!t.activeFormats?.length,{__unstableMarkLastChangeAsPersistent:n}=(0,wie.useDispatch)(x);(0,x2.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 $b=l(O(),1),Gie=l(X(),1);var CS=l(br(),1),Bie=l(pt(),1);var E2e=["`",'"',"'","\u201C\u201D","\u2018\u2019"],Eie=e=>t=>{function o(r){let{inputType:n,data:i}=r,{value:s,onChange:a,registry:c}=e.current;if(n!=="insertText"||(0,CS.isCollapsed)(s))return;let u=(0,Bie.applyFilters)("blockEditor.wrapSelectionSettings",E2e).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,CS.insert)(s,d,m,m);p=(0,CS.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 w2=l(br(),1),Gb=l($(),1);var Tie=l(br(),1);function Iie(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,Tie.insert)(e,o)}function Pie(e){let t=e.length;for(;t--;){let o=ry(e[t].attributes);if(o)return e[t].attributes[o]=e[t].attributes[o].toString().replace(Rl,""),[e[t].clientId,o,0,0];let r=Pie(e[t].innerBlocks);if(r)return r}return[]}var Rie=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,Gb.getBlockTransforms)("from").filter(({type:k})=>k==="prefix"),p=(0,Gb.findTransform)(h,({prefix:k})=>m===k);if(!p)return;let g=(0,w2.toHTMLString)({value:(0,w2.insert)(c,Rl,0,u)}),b=p.transform(g);return s(...Pie([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,Gb.getBlockTransforms)("from").filter(y=>y.type==="input"),g=(0,Gb.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),Iie(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 Oie=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 C2=l(ct(),1),Aie=()=>e=>{function t(o){(C2.isKeyboardEvent.primary(o,"z")||C2.isKeyboardEvent.primary(o,"y")||C2.isKeyboardEvent.primaryShift(o,"z"))&&o.preventDefault()}return e.addEventListener("keydown",t),()=>{e.removeEventListener("keydown",t)}};var Lie=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 Nie=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 B2=l(ct(),1);var Mie=e=>t=>{function o(r){let{keyCode:n}=r;if(r.defaultPrevented||n!==B2.BACKSPACE&&n!==B2.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 Vie=l($(),1),Xa=l(br(),1),Fie=l(bn(),1);var T2e=l(O(),1),I2e=l($(),1),P2e=l(w(),1);function Die(e,t){if(t?.length){let o=e.formats.length;for(;o--;)e.formats[o]=[...t,...e.formats[o]||[]]}}function E2(e){if(!(e!==!0&&e!=="p"&&e!=="li"))return e===!0?"p":e}function Wb({allowedFormats:e,disableFormats:t}){return t?Wb.EMPTY_ARRAY:e}Wb.EMPTY_ARRAY=[];var zie=e=>t=>{function o(n){let{disableFormats:i,onChange:s,value:a,formatTypes:c,tagName:u,onReplace:d,__unstableEmbedURLOnPaste:f,preserveWhiteSpace:m,pastePlainText:h}=e.current;if(!t.contains(n.target)||n.defaultPrevented)return;let{plainText:p,html:g}=eg(n);if(n.preventDefault(),window.console.log(`Received HTML (RichText): |
| 170 |
|
| 171 |
`,g),window.console.log(`Received plain text (RichText): |
| 172 |
|
| 173 |
`,p),i){s((0,Xa.insert)(a,p));return}let b=n.clipboardData.getData("rich-text")==="true";function k(S){let C=c.reduce((B,{__unstablePasteRule:P})=>(P&&B===a&&(B=P(a,{html:g,plainText:p})),B),a);if(C!==a)s(C);else{let B=(0,Xa.create)({html:S});Die(B,a.activeFormats),s((0,Xa.insert)(a,B))}}if(b){k(g);return}if(h){s((0,Xa.insert)(a,(0,Xa.create)({text:p})));return}let v="INLINE",y=p.trim();f&&(0,Xa.isEmpty)(a)&&(0,Fie.isURL)(y)&&/^https?:/.test(y)&&(v="BLOCKS");let _=(0,Vie.pasteHandler)({HTML:g,plainText:p,mode:v,tagName:u,preserveWhiteSpace:m});typeof _=="string"?k(_):_.length>0&&d&&(0,Xa.isEmpty)(a)&&d(_,_.length-1,-1)}let{defaultView:r}=t.ownerDocument;return r.addEventListener("paste",o),()=>{r.removeEventListener("paste",o)}};var BS=l(ct(),1),T2=l(br(),1),jie=e=>t=>{function o(r){let{keyCode:n}=r;if(r.defaultPrevented)return;let{value:i,onMerge:s,onRemove:a}=e.current;if(n===BS.DELETE||n===BS.BACKSPACE){let{start:c,end:u,text:d}=i,f=n===BS.BACKSPACE,m=i.activeFormats&&!!i.activeFormats.length;if(!(0,T2.isCollapsed)(i)||m||f&&c!==0||!f&&u!==d.length)return;s?s(!f):a&&(0,T2.isEmpty)(i)&&f&&a(!f),r.preventDefault()}}return t.addEventListener("keydown",o),()=>{t.removeEventListener("keydown",o)}};var fF=l(ct(),1),ES=l(br(),1),Uie=e=>t=>{function o(i){if(i.keyCode!==fF.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!==fF.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,ES.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,ES.remove)(g)),d()}):c||a((0,ES.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 Hie=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 R2e=[Eie,Rie,Oie,Aie,Lie,Nie,Mie,zie,jie,Uie,Hie];function I2(e){let t=(0,$b.useRef)(e);(0,$b.useInsertionEffect)(()=>{t.current=e});let o=(0,$b.useMemo)(()=>R2e.map(r=>r(t)),[t]);return(0,Gie.useRefEffect)(r=>{if(!e.isSelected)return;let n=o.map(i=>i(r));return()=>{n.forEach(i=>i())}},[o,e.isSelected])}var P2=l(br(),1),R2=l(O(),1);var Wie=l(w(),1),$ie=l(je(),1),O2e={},mF=Symbol("usesContext");function A2e({onChange:e,onFocus:t,value:o,forwardedRef:r,settings:n,isVisible:i}){let{name:s,edit:a,[mF]:c}=n,u=(0,R2.useContext)(Pr),d=(0,R2.useMemo)(()=>c?Object.fromEntries(Object.entries(u).filter(([g])=>c.includes(g))):O2e,[c,u]);if(!a)return null;let f=(0,P2.getActiveFormat)(o,s),m=f!==void 0,h=(0,P2.getActiveObject)(o),p=h!==void 0&&h.type===s;return(0,Wie.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 O2({formatTypes:e,...t}){return e.map(o=>(0,$ie.createElement)(A2e,{settings:o,...t,key:o.name}))}var Kie=l(O(),1),Yie=l($(),1),qie=l(Pe(),1);var pF=l(w(),1);function hF(e,t){if(Kb.isEmpty(e)){let o=E2(t);return o?`<${o}></${o}>`:""}return Array.isArray(e)?((0,qie.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/"}),Yie.children.toHTML(e)):typeof e=="string"?e:e.toHTMLString()}function TS({value:e,tagName:t,multiline:o,format:r,...n}){return e=(0,pF.jsx)(Kie.RawHTML,{children:hF(e,o)}),t?(0,pF.jsx)(t,{...n,children:e}):e}var ese=l(O(),1),bF=l($(),1),tse=l(br(),1),ose=l(Pe(),1);var Zie=l(O(),1),Xie=l(Pe(),1),A2=l(z(),1),Qie=l(ct(),1),Yb=l(br(),1);var gF=l(w(),1);function L2e({children:e,identifier:t,tagName:o="div",value:r="",onChange:n,multiline:i,...s},a){(0,Xie.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}=Ie(),{getSelectionStart:u,getSelectionEnd:d}=(0,A2.useSelect)(x),{selectionChange:f}=(0,A2.useDispatch)(x),m=E2(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,gF.jsx)(o,{ref:a,children:p.map((b,k)=>(0,gF.jsx)(L2,{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!==Qie.ENTER)return;v.preventDefault();let{offset:y}=u(),{offset:_}=d();if(typeof y!="number"||typeof _!="number")return;let S=(0,Yb.create)({html:b});S.start=y,S.end=_;let C=(0,Yb.split)(S).map(P=>(0,Yb.toHTMLString)({value:P})),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 Jie=(0,Zie.forwardRef)(L2e);var rse=l(w(),1);function nse(e){return(0,ese.forwardRef)((t,o)=>{let r=t.value,n=t.onChange;Array.isArray(r)&&((0,ose.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=bF.children.toHTML(t.value),n=s=>t.onChange(bF.children.fromDOM((0,tse.__unstableCreateElement)(document,s).childNodes)));let i=t.multiline?Jie:e;return(0,rse.jsx)(i,{...t,value:r,onChange:n,ref:o})})}var ise=l(ct(),1),qb=l(O(),1);function kF({character:e,type:t,onUse:o}){let r=(0,qb.useContext)(Zb),n=(0,qb.useRef)();return n.current=o,(0,qb.useEffect)(()=>{function i(s){ise.isKeyboardEvent[t](s,e)&&(n.current(),s.preventDefault())}return r.current.add(i),()=>{r.current.delete(i)}},[e,t]),null}var N2=l(A(),1),sse=l(ct(),1),vF=l(w(),1);function yF({name:e,shortcutType:t,shortcutCharacter:o,...r}){let n,i="RichText.ToolbarControls";return e&&(i+=`.${e}`),t&&o&&(n=sse.displayShortcut[t](o)),(0,vF.jsx)(N2.Fill,{name:i,children:(0,vF.jsx)(N2.ToolbarButton,{...r,shortcut:n})})}var Xb=l(O(),1);function _F({inputType:e,onInput:t}){let o=(0,Xb.useContext)(Qb),r=(0,Xb.useRef)();return r.current=t,(0,Xb.useEffect)(()=>{function n(i){i.inputType===e&&(r.current(),i.preventDefault())}return o.current.add(n),()=>{o.current.delete(n)}},[e]),null}var pi=l(w(),1),{useRichText:N2e}=F(cse.privateApis),Zb=(0,ar.createContext)();Zb.displayName="keyboardShortcutContext";var Qb=(0,ar.createContext)();Qb.displayName="inputEventContext";var ase=Symbol("instanceId");function mse(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 L2({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:P,readOnly:R,...E},L){E=mse(E),g&&(0,fse.default)("wp.blockEditor.RichText onSplit prop",{since:"6.4",alternative:'block.json support key: "splitting"'});let T=(0,M2.useInstanceId)(L2),I=(0,ar.useRef)(),[M,D]=(0,ar.useState)(null),U=Ie(),{clientId:j,isSelected:H,name:G}=U,Q=U[Jp],ie=(0,ar.useContext)(Pr),ce=(0,Xd.useRegistry)(),te=ze=>{if(!H)return{isSelected:!1};let{getSelectionStart:so,getSelectionEnd:et}=ze(x),Ve=so(),yt=et(),Oo;return n===void 0?Oo=Ve.clientId===j&&yt.clientId===j&&(v?Ve.attributeKey===v:Ve[ase]===T):n&&(Oo=Ve.clientId===j),{selectionStart:Oo?Ve.offset:void 0,selectionEnd:Oo?yt.offset:void 0,isSelected:Oo}},{selectionStart:ne,selectionEnd:Z,isSelected:Y}=(0,Xd.useSelect)(te,[j,v,T,n,H]),{disableBoundBlock:J,bindingsPlaceholder:K,bindingsLabel:ee}=(0,Xd.useSelect)(ze=>{if(!Q?.[v])return{};let{__experimentalBlockBindingsSupportedAttributes:so}=ze(x).getSettings();if(!so?.[G])return{};let Ve=Q[v],yt=(0,dse.getBlockBindingsSource)(Ve.source),Oo={};if(yt?.usesContext?.length)for(let mt of yt.usesContext)Oo[mt]=ie[mt];let mr=!yt?.canUserEditValue?.({select:ze,context:Oo,args:Ve.args});if(o.length>0)return{disableBoundBlock:mr,bindingsPlaceholder:null,bindingsLabel:null};let{getBlockAttributes:be}=ze(x),Bt=be(j),Ao=null;yt?.getFieldsList&&(Ao=yt.getFieldsList({select:ze,context:Oo})?.find(ou=>(0,lse.default)(ou.args,Ve?.args))?.label);let qe=Ao??yt?.label,oe=mr?qe:(0,Jb.sprintf)((0,Jb.__)("Add %s"),qe),Ne=mr?Ve?.args?.key||yt?.label:(0,Jb.sprintf)((0,Jb.__)("Empty %s; start writing to edit its value"),Ve?.args?.key||yt?.label);return{disableBoundBlock:mr,bindingsPlaceholder:Bt?.placeholder||oe,bindingsLabel:Ne}},[Q,v,G,o,j,ie]),re=!!ie?.["pattern/overrides"],W=Q?.__default?.source==="core/pattern-overrides",ge=R||J||re&&!W,{getSelectionStart:fe,getSelectionEnd:xe,getBlockRootClientId:De}=(0,Xd.useSelect)(x),{selectionChange:st}=(0,Xd.useDispatch)(x),Lt=Wb({allowedFormats:f,disableFormats:C}),no=!Lt||Lt.length>0,jo=(0,ar.useCallback)((ze,so)=>{let et={},Ve=ze===void 0&&so===void 0,yt={clientId:j,[v?"attributeKey":ase]:v||T};if(typeof ze=="number"||Ve){if(so===void 0&&De(j)!==De(xe().clientId))return;et.start={...yt,offset:ze}}if(typeof so=="number"||Ve){if(ze===void 0&&De(j)!==De(fe().clientId))return;et.end={...yt,offset:so}}st(et)},[j,De,xe,fe,v,T,st]),{value:at,getValue:dr,onChange:$t,ref:io,formatTypes:Ue}=N2e({value:o,onChange:r,selectionStart:ne,selectionEnd:Z,onSelectionChange:jo,placeholder:K||d,__unstableIsSelected:Y,__unstableDisableFormats:C,preserveWhiteSpace:y,__unstableDependencies:[t],allowedFormats:Lt,withoutInteractiveFormatting:m,__unstableFormatTypeHandlerContext:(0,ar.useMemo)(()=>({richTextIdentifier:v,blockClientId:j}),[v,j])}),Kt=e9({onReplace:u,completers:c,record:at,onChange:$t});Cie({html:o,value:at});let Je=(0,ar.useRef)(new Set),He=(0,ar.useRef)(new Set);function fr(){I.current?.focus()}let pn=t;return(0,pi.jsxs)(pi.Fragment,{children:[Y&&(0,pi.jsx)(Zb.Provider,{value:Je,children:(0,pi.jsx)(Qb.Provider,{value:He,children:(0,pi.jsxs)(use.Popover.__unstableSlotNameProvider,{value:"__unstable-block-tools-after",children:[e&&e({value:at,onChange:$t,onFocus:fr}),(0,pi.jsx)(O2,{value:at,onChange:$t,onFocus:fr,formatTypes:Ue,forwardedRef:I})]})})}),Y&&no&&(0,pi.jsx)(xie,{inline:s,editableContentElement:M}),(0,pi.jsx)(pn,{role:"textbox","aria-multiline":!B,"aria-readonly":ge,...E,draggable:void 0,"aria-label":ee||E["aria-label"]||d,...Kt,ref:(0,M2.useMergeRefs)([io,L,Kt.ref,E.ref,I2({registry:ce,getValue:dr,onChange:$t,__unstableAllowPrefixTransformations:P,formatTypes:Ue,onReplace:u,selectionChange:st,isSelected:Y,disableFormats:C,value:at,tagName:t,onSplit:g,__unstableEmbedURLOnPaste:S,pastePlainText:_,onMerge:p,onRemove:h,disableLineBreaks:B,onSplitAtEnd:b,onSplitAtDoubleLineEnd:k,keyboardShortcuts:Je,inputEvents:He}),I,D]),contentEditable:!ge,suppressContentEditableWarning:!0,className:V("block-editor-rich-text__editable",E.className,"rich-text"),tabIndex:E.tabIndex===0&&!ge?null:E.tabIndex,"data-wp-block-attribute-key":v})]})}var IS=nse((0,ar.forwardRef)(L2));IS.Content=TS;IS.isEmpty=e=>!e||e.length===0;var SF=(0,ar.forwardRef)((e,t)=>{if(Ie()[z0]){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:P,__unstableEmbedURLOnPaste:R,__unstableDisableFormats:E,disableLineBreaks:L,__unstableAllowPrefixTransformations:T,readOnly:I,...M}=mse(e);return(0,pi.jsx)(i,{ref:t,...M,dangerouslySetInnerHTML:{__html:hF(s,u)||"<br>"}})}return(0,pi.jsx)(IS,{ref:t,...e,readOnly:!1})});SF.Content=TS;SF.isEmpty=e=>!e||e.length===0;var Kb=SF;var xF=l(w(),1),hse=(0,pse.forwardRef)((e,t)=>(0,xF.jsx)(Kb,{ref:t,...e,__unstableDisableFormats:!0}));hse.Content=function({value:t="",tagName:o="div",...r}){return(0,xF.jsx)(o,{...r,children:t})};var gse=hse;var wF=l(w(),1),M2e=(0,kse.forwardRef)(({__experimentalVersion:e,...t},o)=>{if(e===2)return(0,wF.jsx)(gse,{ref:o,...t});let{className:r,onChange:n,...i}=t;return(0,wF.jsx)(bse.default,{ref:o,className:V("block-editor-plain-text",r),onChange:s=>n(s.target.value),...i})}),vse=M2e;var Qa=l(N(),1),Sse=l(O(),1),xse=l(A(),1);var yse=l(X(),1),_se=l(A(),1),D2=l(N(),1),bp=l(w(),1);function V2({property:e,viewport:t,desc:o}){let r=(0,yse.useInstanceId)(V2),n=o||(0,D2.sprintf)((0,D2._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,bp.jsxs)(bp.Fragment,{children:[(0,bp.jsx)("span",{"aria-describedby":`rbc-desc-${r}`,children:t.label}),(0,bp.jsx)(_se.VisuallyHidden,{as:"span",id:`rbc-desc-${r}`,children:n})]})}var Ja=l(w(),1);function D2e(e){let{title:t,property:o,toggleLabel:r,onIsResponsiveChange:n,renderDefaultControl:i,renderResponsiveControls:s,isResponsive:a=!1,defaultLabel:c={id:"all",label:(0,Qa._x)("All","screen sizes")},viewports:u=[{id:"small",label:(0,Qa.__)("Small screens")},{id:"medium",label:(0,Qa.__)("Medium screens")},{id:"large",label:(0,Qa.__)("Large screens")}]}=e;if(!t||!o||!i)return null;let d=r||(0,Qa.sprintf)((0,Qa.__)("Use the same %s on all screen sizes."),o),f=(0,Qa.__)("Choose whether to use the same value for all screen sizes or a unique value for each screen size."),m=i((0,Ja.jsx)(V2,{property:o,viewport:c}),c),h=()=>u.map(p=>(0,Ja.jsx)(Sse.Fragment,{children:i((0,Ja.jsx)(V2,{property:o,viewport:p}),p)},p.id));return(0,Ja.jsxs)("fieldset",{className:"block-editor-responsive-block-control",children:[(0,Ja.jsx)("legend",{className:"block-editor-responsive-block-control__title",children:t}),(0,Ja.jsxs)("div",{className:"block-editor-responsive-block-control__inner",children:[(0,Ja.jsx)(xse.ToggleControl,{className:"block-editor-responsive-block-control__toggle",label:d,checked:!a,onChange:n,help:f}),(0,Ja.jsxs)("div",{className:V("block-editor-responsive-block-control__group",{"is-responsive":a}),children:[!a&&m,a&&(s?s(u):h())]})]})]})}var wse=D2e;var F2=l(A(),1);var Cse=l(w(),1);function Bse({units:e,...t}){let[o]=he("spacing.units"),r=(0,F2.__experimentalUseCustomUnits)({availableUnits:o||["%","px","em","rem","vw"],units:e});return(0,Cse.jsx)(F2.__experimentalUnitControl,{units:r,...t})}var PS=l(N(),1),Ese=l(O(),1),ek=l(A(),1);var el=l(w(),1);function V2e({url:e,onChange:t}){let[o,r]=(0,Ese.useReducer)(i=>!i,!1),n=i=>{i.preventDefault(),r()};return(0,el.jsxs)("div",{className:"block-editor-url-input__button",children:[(0,el.jsx)(ek.Button,{size:"compact",icon:kn,label:e?(0,PS.__)("Edit link"):(0,PS.__)("Insert link"),onClick:r,className:"components-toolbar__control",isPressed:!!e}),o&&(0,el.jsx)("form",{className:"block-editor-url-input__button-modal",onSubmit:n,children:(0,el.jsxs)("div",{className:"block-editor-url-input__button-modal-line",children:[(0,el.jsx)(ek.Button,{__next40pxDefaultSize:!0,className:"block-editor-url-input__back",icon:yv,label:(0,PS.__)("Close"),onClick:r}),(0,el.jsx)(Hd,{value:e||"",onChange:t,suffix:(0,el.jsx)(ek.__experimentalInputControlSuffixWrapper,{variant:"control",children:(0,el.jsx)(ek.Button,{size:"small",icon:wl,label:(0,PS.__)("Submit"),type:"submit"})})})]})})]})}var Tse=V2e;var Ln=l(N(),1),cs=l(O(),1),Ase=l(Fe(),1),Ko=l(A(),1);var Lse=l(bn(),1);var xt=l(w(),1),CF="none",Ise="custom",Pse="media",Rse="attachment",Ose=["noreferrer","noopener"],Nse=({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,cs.useState)(!1),[g,b]=(0,cs.useState)(null),k=()=>{p(!0)},[v,y]=(0,cs.useState)(!1),[_,S]=(0,cs.useState)(null),C=(0,cs.useRef)(null),B=(0,cs.useRef)();(0,cs.useEffect)(()=>{if(!B.current)return;(Ase.focus.focusable.find(B.current)[0]||B.current).focus()},[v,o,d]);let P=()=>{(e===Pse||e===Rse)&&S(""),y(!0)},R=()=>{y(!1)},E=()=>{S(null),R(),p(!1)},L=Y=>{let J=Y?"_blank":void 0,K;if(J){let ee=(c??"").split(" ");Ose.forEach(re=>{ee.includes(re)||ee.push(re)}),K=ee.join(" ")}else{let ee=(c??"").split(" ").filter(re=>Ose.includes(re)===!1);K=ee.length?ee.join(" "):void 0}return{linkTarget:J,rel:K}},T=()=>Y=>{let J=C.current;J&&J.contains(Y.target)||(p(!1),S(null),R())},I=()=>Y=>{if(_){let J=D().find(K=>K.url===_)?.linkDestination||Ise;t({href:(0,Lse.prependHTTPS)(_),linkDestination:J,lightbox:{enabled:!1}})}R(),S(null),Y.preventDefault()},M=()=>{t({linkDestination:CF,href:""})},D=()=>{let Y=[{linkDestination:Pse,title:(0,Ln.__)("Link to image file"),url:r==="image"?n:void 0,icon:Tv}];return r==="image"&&i&&Y.push({linkDestination:Rse,title:(0,Ln.__)("Link to attachment page"),url:r==="image"?i:void 0,icon:Cl}),Y},U=Y=>{let J=D(),K;Y?K=(J.find(ee=>ee.url===Y)||{linkDestination:Ise}).linkDestination:K=CF,t({linkDestination:K,href:Y})},j=Y=>{let J=L(Y);t(J)},H=Y=>{t({rel:Y})},G=Y=>{t({linkClass:Y})},Q=(0,xt.jsxs)(Ko.__experimentalVStack,{spacing:"3",children:[(0,xt.jsx)(Ko.ToggleControl,{label:(0,Ln.__)("Open in new tab"),onChange:j,checked:s==="_blank"}),(0,xt.jsx)(Ko.TextControl,{__next40pxDefaultSize:!0,label:(0,Ln.__)("Link relation"),value:c??"",onChange:H,help:(0,cs.createInterpolateElement)((0,Ln.__)("The <a>Link Relation</a> attribute defines the relationship between a linked resource and the current document."),{a:(0,xt.jsx)(Ko.ExternalLink,{href:"https://developer.mozilla.org/docs/Web/HTML/Attributes/rel"})})}),(0,xt.jsx)(Ko.TextControl,{__next40pxDefaultSize:!0,label:(0,Ln.__)("Link CSS class"),value:a||"",onChange:G})]}),ie=_!==null?_:o,ce=!d||d&&!u,te=!ie&&ce,ne=(D().find(Y=>Y.linkDestination===e)||{}).title,Z=()=>{if(d&&u&&!o&&!v)return(0,xt.jsxs)("div",{className:"block-editor-url-popover__expand-on-click",children:[(0,xt.jsx)(we,{icon:Ux}),(0,xt.jsxs)("div",{className:"text",children:[(0,xt.jsx)("p",{children:(0,Ln.__)("Enlarge on click")}),(0,xt.jsx)("p",{className:"description",children:(0,Ln.__)("Scales the image with a lightbox effect")})]}),(0,xt.jsx)(Ko.Button,{icon:Ii,label:(0,Ln.__)("Disable enlarge on click"),onClick:()=>{f?.(!1)},size:"compact"})]});if(!o||v)return(0,xt.jsx)(Yd.LinkEditor,{className:"block-editor-format-toolbar__link-container-content",value:ie,onChangeInputValue:S,onSubmit:I(),autocompleteRef:C});if(o&&!v)return(0,xt.jsxs)(xt.Fragment,{children:[(0,xt.jsx)(Yd.LinkViewer,{className:"block-editor-format-toolbar__link-container-content",url:o,onEditLinkClick:P,urlLabel:ne}),(0,xt.jsx)(Ko.Button,{icon:Ii,label:(0,Ln.__)("Remove link"),onClick:()=>{M(),m?.()},size:"compact"})]})};return(0,xt.jsxs)(xt.Fragment,{children:[(0,xt.jsx)(Ko.ToolbarButton,{icon:kn,className:"components-toolbar__control",label:(0,Ln.__)("Link"),"aria-expanded":h,onClick:k,ref:b,isActive:!!o||d&&u}),h&&(0,xt.jsx)(Yd,{ref:B,anchor:g,onFocusOutside:T(),onClose:E,renderSettings:ce?()=>Q:null,additionalControls:te&&(0,xt.jsxs)(Ko.NavigableMenu,{children:[D().map(Y=>(0,xt.jsx)(Ko.MenuItem,{icon:Y.icon,iconPosition:"left",onClick:()=>{S(null),U(Y.url),R()},children:Y.title},Y.linkDestination)),u&&(0,xt.jsx)(Ko.MenuItem,{className:"block-editor-url-popover__expand-on-click",icon:Ux,info:(0,Ln.__)("Scale the image with a lightbox effect."),iconPosition:"left",onClick:()=>{S(null),t({linkDestination:CF,href:""}),f?.(!0),R()},children:(0,Ln.__)("Enlarge on click")},"expand-on-click")]}),offset:13,children:Z()})]})};var ok=l(A(),1),qse=l(O(),1),U2=l(N(),1);var Mse=l(O(),1),EF=l(N(),1);var BF=[],F2e=new Intl.Collator("und",{numeric:!0}).compare;function z2(){let[e,t,o,r]=he("spacing.spacingSizes.custom","spacing.spacingSizes.theme","spacing.spacingSizes.default","spacing.defaultSpacingSizes"),n=e??BF,i=t??BF,s=o&&r!==!1?o:BF;return(0,Mse.useMemo)(()=>{let a=[{name:(0,EF.__)("None"),slug:"0",size:0},...n,...i,...s];return a.every(({slug:c})=>/^[0-9]/.test(c))&&a.sort((c,u)=>F2e(c.slug,u.slug)),a.length>o9?[{name:(0,EF.__)("Default"),slug:"default",size:void 0},...a]:a},[n,i,s])}var Dse=l(O(),1),Vse=l(z(),1),j2=l(N(),1),Fse=l(A(),1);var zse=l(w(),1),z2e={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 tk({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,Vse.useSelect)(_=>_(x).getSettings()?.disableCustomSpacingSizes),[h]=he("spacing.units"),p=(0,Fse.__experimentalUseCustomUnits)({availableUnits:h||["px","em","rem"]}),g=(0,Dse.useMemo)(()=>c?.map(_=>({name:_.name,slug:_.slug,size:_.size}))||[],[c]),b=(Au.includes(a)||["vertical","horizontal"].includes(a))&&s?xa[a]:"",k=s?u?.toLowerCase():u,v=(0,j2.sprintf)((0,j2._x)("%1$s %2$s","spacing"),b,k).trim(),y=p[0]?.value||"px";return(0,zse.jsx)(rp,{allowNegativeOnDrag:o<0,ariaLabel:v,className:"spacing-sizes-control",customValueSettings:z2e,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 RS=l(w(),1),jse=["vertical","horizontal"];function Use({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]=Th(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?jse.filter(d=>gD(n,d)):jse;return(0,RS.jsx)(RS.Fragment,{children:u.map(d=>{let f=d==="vertical"?a.top:a.left;return(0,RS.jsx)(tk,{icon:OC[d],label:xa[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 OS=l(w(),1);function Hse({minimumCustomValue:e,onChange:t,onMouseOut:o,onMouseOver:r,sides:n,spacingSizes:i,type:s,values:a}){let c=n?.length?Au.filter(d=>n.includes(d)):Au,u=d=>f=>{let m={...Object.keys(a).reduce((h,p)=>(h[p]=Th(a[p],i),h),{})};m[d]=f,t(m)};return(0,OS.jsx)(OS.Fragment,{children:c.map(d=>(0,OS.jsx)(tk,{icon:OC[d],label:xa[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 Gse=l(w(),1);function Wse({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]=Th(c[p],s),h),{})};m[d]=f,t(m)};return(0,Gse.jsx)(tk,{label:xa[i],minimumCustomValue:e,onChange:u(i),onMouseOut:o,onMouseOver:r,showSideInLabel:n,side:i,spacingSizes:s,type:a,value:c[i],withInputField:!1})}var $se=l(A(),1);var TF=l(N(),1),Kse=l(w(),1);function Yse({isLinked:e,...t}){let o=e?(0,TF.__)("Unlink sides"):(0,TF.__)("Link sides");return(0,Kse.jsx)($se.Button,{...t,size:"small",icon:e?kn:Ii,iconSize:24,label:o})}var tl=l(w(),1);function rk({inputProps:e,label:t,minimumCustomValue:o=0,onChange:r,onMouseOut:n,onMouseOver:i,showSideInLabel:s=!0,sides:a=Au,useSelect:c,values:u}){let d=z2(),f=u||r9,m=a?.length===1,h=a?.includes("horizontal")&&a?.includes("vertical")&&a?.length===2,[p,g]=(0,qse.useState)(i9(f,a)),b=()=>{g(p===Al.axial?Al.custom:Al.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===Al.axial?(0,tl.jsx)(Use,{...v}):p===Al.custom?(0,tl.jsx)(Hse,{...v}):(0,tl.jsx)(Wse,{side:p,...v,showSideInLabel:s}),_=Au.includes(p)&&s?xa[p]:"",S=(0,U2.sprintf)((0,U2._x)("%1$s %2$s","spacing"),t,_).trim();return(0,tl.jsxs)("fieldset",{className:"spacing-sizes-control",children:[(0,tl.jsxs)(ok.__experimentalHStack,{className:"spacing-sizes-control__header",children:[(0,tl.jsx)(ok.BaseControl.VisualLabel,{as:"legend",className:"spacing-sizes-control__label",children:S}),!m&&!h&&(0,tl.jsx)(Yse,{label:t,onClick:b,isLinked:p===Al.axial})]}),(0,tl.jsx)(ok.__experimentalVStack,{spacing:.5,children:y()})]})}var Zse=l(Pe(),1);function Xse(){return(0,Zse.default)("wp.blockEditor.PreviewOptions",{version:"6.5"}),null}var H2=l(O(),1);function Qse(e){let[t,o]=(0,H2.useState)(window.innerWidth);(0,H2.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 Sk=l(N(),1),rf=l($(),1),Gle=l(A(),1),JF=l(z(),1),Wle=l(O(),1);var nk=l(A(),1),G2=l(N(),1),Jse=l(z(),1),W2=l($(),1);var kp=l(w(),1);function j2e({block:e,onNavigateToEntityRecord:t,isSyncedPattern:o,isTemplatePartBlock:r}){let n=e?.attributes||{};return(0,kp.jsx)(nk.__experimentalVStack,{className:"block-editor-block-inspector-edit-contents",expanded:!0,children:(0,kp.jsx)(nk.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,G2.__)("Edit original")})})}function U2e({clientId:e,editedContentOnlySection:t,editContentOnlySection:o,stopEditingContentOnlySection:r}){return(0,kp.jsx)(nk.__experimentalVStack,{className:"block-editor-block-inspector-edit-contents",expanded:!0,children:(0,kp.jsx)(nk.Button,{className:"block-editor-block-inspector-edit-contents__button",__next40pxDefaultSize:!0,variant:"secondary",onClick:()=>{t?r():o(e)},children:t?(0,G2.__)("Exit pattern"):(0,G2.__)("Edit pattern")})})}function eae({clientId:e}){let{isWithinSection:t,isWithinEditedSection:o,editedContentOnlySection:r,editContentOnlySection:n,stopEditingContentOnlySection:i}=MT(e),{block:s,onNavigateToEntityRecord:a,canEdit:c}=(0,Jse.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,W2.isReusableBlock)(s),d=(0,W2.isTemplatePart)(s);return(u||d)&&a?(0,kp.jsx)(j2e,{block:s,onNavigateToEntityRecord:a,isSyncedPattern:u,isTemplatePartBlock:d}):(0,kp.jsx)(U2e,{clientId:e,editedContentOnlySection:r,editContentOnlySection:n,stopEditingContentOnlySection:i})}var tae=l(z(),1),oae=l(N(),1),rae=l(A(),1),nae=l(O(),1);var iae=l(w(),1);function $2(){let e=(0,tae.useSelect)(r=>r(x).getBlockSelectionStart(),[]),t=(0,nae.useRef)();return dm(e,t),e?(0,iae.jsx)(rae.Button,{__next40pxDefaultSize:!0,variant:"secondary",className:"block-editor-skip-to-selected-block",onClick:()=>{t.current?.focus()},children:(0,oae.__)("Skip to the selected block")}):null}var K2=l(N(),1),sae=l(z(),1);var aae=l(A(),1);var AS=l(w(),1);function IF(){let e=(0,sae.useSelect)(t=>t(x).getSelectedBlockCount(),[]);return(0,AS.jsxs)(aae.__experimentalHStack,{justify:"flex-start",spacing:2,className:"block-editor-multi-selection-inspector__card",children:[(0,AS.jsx)(Oe,{icon:Gf,showColors:!0}),(0,AS.jsx)("div",{className:"block-editor-multi-selection-inspector__card-title",children:(0,K2.sprintf)((0,K2._n)("%d Block","%d Blocks",e),e)})]})}var _k=l(A(),1),ca=l(O(),1),Dle=l(kh(),1),yk=l(z(),1);var LS=l(N(),1),Y2={name:"settings",title:(0,LS.__)("Settings"),value:"settings",icon:ZA},q2={name:"styles",title:(0,LS.__)("Styles"),value:"styles",icon:fM},Z2={name:"content",title:(0,LS.__)("Content"),value:"content",icon:Cl},Rc={name:"list",title:(0,LS.__)("List View"),value:"list-view",icon:Iv};var eP=l(A(),1);var NS=l(A(),1),lae=l(N(),1);var MS=l(w(),1),H2e=({initialOpen:e=!1})=>{let t=(0,NS.__experimentalUseSlotFills)(pd.slotName),o=(0,NS.__experimentalUseSlotFills)(I_.name),r=!!(t&&t.length),n=!!(o&&o.length);return!r&&!n?null:(0,MS.jsxs)(NS.PanelBody,{className:"block-editor-block-inspector__advanced",title:(0,lae.__)("Advanced"),initialOpen:e,children:[(0,MS.jsx)(pe.Slot,{group:"advanced"}),(0,MS.jsx)(I_.Slot,{})]})},X2=H2e;var ik=l(A(),1),Q2=l(z(),1),PF=l(N(),1);var DS=l(w(),1),G2e=()=>{let{selectedClientIds:e,selectedBlocks:t,hasPositionAttribute:o}=(0,Q2.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,Q2.useDispatch)(x),n=No();function i(){if(!e?.length||!t?.length)return;let s=Object.fromEntries(t?.map(({clientId:a,attributes:c})=>[a,{style:Ae({...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,DS.jsx)(ik.__experimentalToolsPanel,{className:"block-editor-block-inspector__position",label:(0,PF.__)("Position"),resetAll:i,dropdownMenuProps:n,children:(0,DS.jsx)(ik.__experimentalToolsPanelItem,{isShownByDefault:o,label:(0,PF.__)("Position"),hasValue:()=>o,onDeselect:i,children:(0,DS.jsx)(pe.Slot,{group:"position"})})})},W2e=()=>{let e=(0,ik.__experimentalUseSlotFills)(Zi.position.name);return!(e&&e.length)?null:(0,DS.jsx)(G2e,{})},J2=W2e;var ol=l(w(),1),$2e=({showAdvancedControls:e=!1})=>{let t=(0,eP.__experimentalUseSlotFills)(Zi.default.name),o=(0,eP.__experimentalUseSlotFills)(Zi.position.name),r=(0,eP.__experimentalUseSlotFills)(Zi.bindings.name),n=!!t?.length||!!o?.length||!!r?.length;return(0,ol.jsxs)(ol.Fragment,{children:[(0,ol.jsx)(pe.Slot,{}),(0,ol.jsx)(J2,{}),(0,ol.jsx)(pe.Slot,{group:"bindings"}),e&&(0,ol.jsx)("div",{children:(0,ol.jsx)(X2,{initialOpen:!n})})]})},cae=$2e;var kk=l(N(),1),UP=l(z(),1);var WS=l($(),1),jF=l(A(),1),bk=l(O(),1),hle=l(pt(),1),gle=l(z(),1);var zF={};ka(zF,{AdvancedPanel:()=>wP,BackgroundPanel:()=>PP,BorderPanel:()=>hP,ColorPanel:()=>vP,DimensionsPanel:()=>dP,FiltersPanel:()=>_P,ImageSettingsPanel:()=>nle,StateControl:()=>mle,TypographyPanel:()=>sP,useHasBackgroundPanel:()=>IP,useHasBorderPanel:()=>pP,useHasBorderPanelControls:()=>FS,useHasColorPanel:()=>kP,useHasDimensionsPanel:()=>uP,useHasFiltersPanel:()=>tle,useHasImageSettingsPanel:()=>rle,useHasTypographyPanel:()=>iP,useSettingsForBlockElement:()=>oP});var tP=l(O(),1),uae=l(z(),1),RF=l($(),1),vp=l(N(),1);function oP(e,t,o){let{supportedStyles:r,supports:n}=(0,uae.useSelect)(i=>({supportedStyles:F(i(RF.store)).getSupportedStyles(t,o),supports:i(RF.store).getBlockType(t)?.supports}),[t,o]);return(0,tP.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","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 rl(e){let t=e?.color?.palette?.custom,o=e?.color?.palette?.theme,r=e?.color?.palette?.default,n=e?.color?.defaultPalette;return(0,tP.useMemo)(()=>{let i=[];return o&&o.length&&i.push({name:(0,vp._x)("Theme","Indicates this palette comes from the theme."),colors:o}),n&&r&&r.length&&i.push({name:(0,vp._x)("Default","Indicates this palette comes from WordPress."),colors:r}),t&&t.length&&i.push({name:(0,vp._x)("Custom","Indicates this palette is created by the user."),colors:t}),i},[t,o,r,n])}function yp(e){let t=e?.color?.gradients?.custom,o=e?.color?.gradients?.theme,r=e?.color?.gradients?.default,n=e?.color?.defaultGradients;return(0,tP.useMemo)(()=>{let i=[];return o&&o.length&&i.push({name:(0,vp._x)("Theme","Indicates this palette comes from the theme."),gradients:o}),n&&r&&r.length&&i.push({name:(0,vp._x)("Default","Indicates this palette comes from WordPress."),gradients:r}),t&&t.length&&i.push({name:(0,vp._x)("Custom","Indicates this palette is created by the user."),gradients:t}),i},[t,o,r,n])}var fo=l(A(),1),zo=l(N(),1),ak=l(O(),1);var sk=l(N(),1);var dae=l(O(),1),rP=l(A(),1),OF=l(w(),1),K2e=[{label:(0,sk.__)("Align text left"),value:"left",icon:fu},{label:(0,sk.__)("Align text center"),value:"center",icon:zf},{label:(0,sk.__)("Align text right"),value:"right",icon:mu},{label:(0,sk.__)("Justify text"),value:"justify",icon:BA}],Y2e=["left","center","right"];function nP({className:e,value:t,onChange:o,options:r=Y2e}){let n=(0,dae.useMemo)(()=>K2e.filter(i=>r.includes(i.value)),[r]);return n.length?(0,OF.jsx)(rP.__experimentalToggleGroupControl,{isDeselectable:!0,__next40pxDefaultSize:!0,label:(0,sk.__)("Text alignment"),className:V("block-editor-text-alignment-control",e),value:t,onChange:i=>{o(i===t?void 0:i)},children:n.map(i=>(0,OF.jsx)(rP.__experimentalToggleGroupControlOptionIcon,{value:i.value,icon:i.icon,label:i.label},i.value))}):null}var Fo=l(A(),1),VS=l(N(),1);var us=l(w(),1);function fae({__next40pxDefaultSize:e=!1,value:t,onChange:o,__unstableInputWidth:r="60px",withSlider:n=!1,hasBottomMargin:i=!1,help:s,...a}){let[c]=he("spacing.units"),u=(0,Fo.__experimentalUseCustomUnits)({availableUnits:c||["px","em","rem","ch","%","vw","vh"],defaultValues:{px:16,em:2,rem:2,ch:2}}),[d,f]=(0,Fo.__experimentalParseQuantityAndUnitFromRawValue)(t,u),m=!!f&&["em","rem","%","ch","vw","vh"].includes(f);return n?(0,us.jsxs)(Fo.__experimentalView,{style:i?{marginBottom:12}:void 0,children:[(0,us.jsx)(Fo.BaseControl.VisualLabel,{children:(0,VS.__)("Line indent")}),(0,us.jsxs)(Fo.Flex,{children:[(0,us.jsx)(Fo.FlexItem,{isBlock:!0,children:(0,us.jsx)(Fo.__experimentalUnitControl,{__next40pxDefaultSize:e,__shouldNotWarnDeprecated36pxSize:!0,label:(0,VS.__)("Line indent"),labelPosition:"top",hideLabelFromVision:!0,value:t,onChange:o,size:a.size,units:u,__unstableInputWidth:r,min:0})}),n&&(0,us.jsx)(Fo.FlexItem,{isBlock:!0,children:(0,us.jsx)(Fo.__experimentalSpacer,{marginX:2,marginBottom:0,children:(0,us.jsx)(Fo.RangeControl,{__next40pxDefaultSize:e,__shouldNotWarnDeprecated36pxSize:!0,label:(0,VS.__)("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,us.jsx)("p",{className:"components-base-control__help",children:s})]}):(0,us.jsx)(Fo.__experimentalUnitControl,{__next40pxDefaultSize:e,__shouldNotWarnDeprecated36pxSize:!0,...a,label:(0,VS.__)("Line indent"),value:t,__unstableInputWidth:r,units:u,onChange:o,help:s})}function pae(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 mae(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 q2e(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 hae(e,t,o){let r=t,n=o,{fontStyles:i,fontWeights:s,combinedStyleAndWeightOptions:a}=Cb(e),c=i?.some(({value:d})=>d===t),u=s?.some(({value:d})=>d?.toString()===o?.toString());return c||(r=t?q2e(i,t):a?.find(d=>d.style.fontWeight===mae(s,o))?.style?.fontStyle),u||(n=o?mae(s,o):a?.find(d=>d.style.fontStyle===(r||t))?.style?.fontWeight),{nearestFontStyle:r,nearestFontWeight:n}}var rt=l(w(),1),Z2e=1,X2e=6;function iP(e){let t=bae(e),o=kae(e),r=vae(e),n=yae(e),i=Sae(e),s=_ae(e),a=xae(e),c=Bae(e),u=wae(e),d=Cae(e),f=gae(e);return t||o||r||n||i||s||f||a||c||u||d}function gae(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 bae(e){return["default","theme","custom"].some(t=>e?.typography?.fontFamilies?.[t]?.length)}function kae(e){return e?.typography?.lineHeight}function vae(e){return e?.typography?.fontStyle||e?.typography?.fontWeight}function Q2e(e){return e?.typography?.fontStyle?e?.typography?.fontWeight?(0,zo.__)("Appearance"):(0,zo.__)("Font style"):(0,zo.__)("Font weight")}function yae(e){return e?.typography?.letterSpacing}function _ae(e){return e?.typography?.textTransform}function Sae(e){return e?.typography?.textAlign}function xae(e){return e?.typography?.textDecoration}function wae(e){return e?.typography?.writingMode}function Cae(e){return e?.typography?.textColumns}function Bae(e){return e?.typography?.textIndent}function J2e(e){let t=e?.typography?.fontSizes,o=!!e?.typography?.defaultFontSizes;return[...t?.custom??[],...t?.theme??[],...o?t?.default??[]:[]]}function ePe({resetAllFilter:e,onChange:t,value:o,panelId:r,children:n}){let i=No(),s=()=>{let a=e(o);t(a)};return(0,rt.jsx)(fo.__experimentalToolsPanel,{label:(0,zo.__)("Typography"),resetAll:s,panelId:r,dropdownMenuProps:i,children:n})}var tPe={fontFamily:!0,fontSize:!0,fontAppearance:!0,lineHeight:!0,letterSpacing:!0,textAlign:!0,textTransform:!0,textDecoration:!0,textIndent:!0,writingMode:!0,textColumns:!0};function sP({as:e=ePe,value:t,onChange:o,inheritedValue:r=t,settings:n,panelId:i,defaultControls:s=tPe,isGlobalStyles:a=!1}){let c=oe=>Mr({settings:n},"",oe),u=bae(n),d=c(r?.typography?.fontFamily),{fontFamilies:f,fontFamilyFaces:m}=(0,ak.useMemo)(()=>pae(n,d),[n,d]),h=oe=>{let Ne=f?.find(({fontFamily:hn})=>hn===oe)?.slug,mt=me(t,["typography","fontFamily"],Ne?`var:preset|font-family|${Ne}`:oe||void 0),ou=f?.find(({fontFamily:hn})=>hn===oe)?.fontFace??[],{fontStyles:ba,fontWeights:qp}=Cb(ou),uv=ba?.some(({value:hn})=>hn===T),Lf=qp?.some(({value:hn})=>hn?.toString()===I?.toString());if(!uv||!Lf){let{nearestFontStyle:hn,nearestFontWeight:Zp}=hae(ou,T,I);hn||Zp?mt={...mt,typography:{...mt?.typography,fontStyle:hn||void 0,fontWeight:Zp||void 0}}:(T||I)&&(mt={...mt,typography:{...mt?.typography,fontStyle:void 0,fontWeight:void 0}})}o(mt)},p=()=>!!t?.typography?.fontFamily,g=()=>h(void 0),b=gae(n),k=!n?.typography?.customFontSize,v=J2e(n),y=c(r?.typography?.fontSize),_=(()=>{let oe=r?.typography?.fontSize;if(!oe||typeof oe!="string")return;if(oe.startsWith("var:preset|font-size|"))return oe.replace("var:preset|font-size|","");let Ne=oe.match(/^var\(--wp--preset--font-size--([^)]+)\)$/);if(Ne)return Ne[1]})(),S=(oe,Ne)=>{let mt=Ne?.slug?`var:preset|font-size|${Ne?.slug}`:oe;o(me(t,["typography","fontSize"],mt||void 0))},C=()=>!!t?.typography?.fontSize,B=()=>S(void 0),P=vae(n),R=Q2e(n),E=n?.typography?.fontStyle,L=n?.typography?.fontWeight,T=c(r?.typography?.fontStyle),I=c(r?.typography?.fontWeight),M=(0,ak.useCallback)(({fontStyle:oe,fontWeight:Ne})=>{(oe!==T||Ne!==I)&&o({...t,typography:{...t?.typography,fontStyle:oe||void 0,fontWeight:Ne||void 0}})},[T,I,o,t]),D=()=>!!t?.typography?.fontStyle||!!t?.typography?.fontWeight,U=(0,ak.useCallback)(()=>{M({})},[M]),j=kae(n),H=c(r?.typography?.lineHeight),G=oe=>{o(me(t,["typography","lineHeight"],oe||void 0))},Q=()=>t?.typography?.lineHeight!==void 0,ie=()=>G(void 0),ce=yae(n),te=c(r?.typography?.letterSpacing),ne=oe=>{o(me(t,["typography","letterSpacing"],oe||void 0))},Z=()=>!!t?.typography?.letterSpacing,Y=()=>ne(void 0),J=Bae(n),K=c(r?.typography?.textIndent),re=(n?.typography?.textIndent??"subsequent")==="all",W=oe=>{o(me(t,["typography","textIndent"],oe||void 0))},ae=oe=>{o({...t,settings:{typography:{textIndent:oe?"all":"subsequent"}}})},ge=()=>!!t?.typography?.textIndent,fe=()=>{o(me(t,["typography","textIndent"],void 0))},xe=re?(0,zo.__)("Indents the first line of all paragraphs."):(0,zo.__)("Indents the first line of each paragraph after the first one."),De=Cae(n),st=c(r?.typography?.textColumns),Lt=oe=>{o(me(t,["typography","textColumns"],oe||void 0))},no=()=>!!t?.typography?.textColumns,jo=()=>Lt(void 0),at=_ae(n),dr=c(r?.typography?.textTransform),$t=oe=>{o(me(t,["typography","textTransform"],oe||void 0))},io=()=>!!t?.typography?.textTransform,Ue=()=>$t(void 0),Kt=xae(n),Je=c(r?.typography?.textDecoration),He=oe=>{o(me(t,["typography","textDecoration"],oe||void 0))},fr=()=>!!t?.typography?.textDecoration,pn=()=>He(void 0),ze=wae(n),so=c(r?.typography?.writingMode),et=oe=>{o(me(t,["typography","writingMode"],oe||void 0))},Ve=()=>!!t?.typography?.writingMode,yt=()=>et(void 0),Oo=Sae(n),mr=c(r?.typography?.textAlign),be=oe=>{o(me(t,["typography","textAlign"],oe||void 0))},Bt=()=>!!t?.typography?.textAlign,Ao=()=>be(void 0),qe=(0,ak.useCallback)(oe=>({...oe,typography:{}}),[]);return(0,rt.jsxs)(e,{resetAllFilter:qe,value:t,onChange:o,panelId:i,children:[u&&(0,rt.jsx)(fo.__experimentalToolsPanelItem,{label:(0,zo.__)("Font"),hasValue:p,onDeselect:g,isShownByDefault:s.fontFamily,panelId:i,children:(0,rt.jsx)(RI,{fontFamilies:f,value:d,onChange:h,size:"__unstable-large"})}),b&&(0,rt.jsx)(fo.__experimentalToolsPanelItem,{label:(0,zo.__)("Size"),hasValue:C,onDeselect:B,isShownByDefault:s.fontSize,panelId:i,children:(0,rt.jsx)(fo.FontSizePicker,{value:_||y,valueMode:_?"slug":"literal",onChange:S,fontSizes:v,disableCustomFontSizes:k,withReset:!1,withSlider:!0,size:"__unstable-large"})}),P&&(0,rt.jsx)(fo.__experimentalToolsPanelItem,{label:R,hasValue:D,onDeselect:U,isShownByDefault:s.fontAppearance,panelId:i,children:(0,rt.jsx)(PI,{value:{fontStyle:T,fontWeight:I},onChange:M,hasFontStyles:E,hasFontWeights:L,fontFamilyFaces:m,size:"__unstable-large"})}),j&&(0,rt.jsx)(fo.__experimentalToolsPanelItem,{className:"single-column",label:(0,zo.__)("Line height"),hasValue:Q,onDeselect:ie,isShownByDefault:s.lineHeight,panelId:i,children:(0,rt.jsx)(b2,{__unstableInputWidth:"auto",value:H,onChange:G,size:"__unstable-large"})}),ce&&(0,rt.jsx)(fo.__experimentalToolsPanelItem,{className:"single-column",label:(0,zo.__)("Letter spacing"),hasValue:Z,onDeselect:Y,isShownByDefault:s.letterSpacing,panelId:i,children:(0,rt.jsx)(AI,{value:te,onChange:ne,size:"__unstable-large",__unstableInputWidth:"auto"})}),J&&(0,rt.jsxs)(fo.__experimentalToolsPanelItem,{label:(0,zo.__)("Line indent"),hasValue:ge,onDeselect:fe,isShownByDefault:s.textIndent,panelId:i,children:[(0,rt.jsx)(fae,{value:K,onChange:W,size:"__unstable-large",__unstableInputWidth:"auto",withSlider:!0,hasBottomMargin:a}),a&&(0,rt.jsx)(fo.ToggleControl,{label:(0,zo.__)("Indent all paragraphs"),checked:re,onChange:ae,help:xe})]}),De&&(0,rt.jsx)(fo.__experimentalToolsPanelItem,{className:"single-column",label:(0,zo.__)("Columns"),hasValue:no,onDeselect:jo,isShownByDefault:s.textColumns,panelId:i,children:(0,rt.jsx)(fo.__experimentalNumberControl,{label:(0,zo.__)("Columns"),max:X2e,min:Z2e,onChange:Lt,size:"__unstable-large",spinControls:"custom",value:st,initialPosition:1})}),Kt&&(0,rt.jsx)(fo.__experimentalToolsPanelItem,{className:"single-column",label:(0,zo.__)("Decoration"),hasValue:fr,onDeselect:pn,isShownByDefault:s.textDecoration,panelId:i,children:(0,rt.jsx)(NI,{value:Je,onChange:He,size:"__unstable-large",__unstableInputWidth:"auto"})}),ze&&(0,rt.jsx)(fo.__experimentalToolsPanelItem,{className:"single-column",label:(0,zo.__)("Orientation"),hasValue:Ve,onDeselect:yt,isShownByDefault:s.writingMode,panelId:i,children:(0,rt.jsx)(FI,{value:so,onChange:et,size:"__unstable-large"})}),at&&(0,rt.jsx)(fo.__experimentalToolsPanelItem,{label:(0,zo.__)("Letter case"),hasValue:io,onDeselect:Ue,isShownByDefault:s.textTransform,panelId:i,children:(0,rt.jsx)(DI,{value:dr,onChange:$t,showNone:!0,isBlock:!0,size:"__unstable-large"})}),Oo&&(0,rt.jsxs)(fo.__experimentalToolsPanelItem,{label:(0,zo.__)("Text alignment"),hasValue:Bt,onDeselect:Ao,isShownByDefault:s.textAlign,panelId:i,children:[(0,rt.jsx)(nP,{value:mr,onChange:be,options:["left","center","right","justify"],size:"__unstable-large"}),mr==="justify"&&(0,rt.jsx)("div",{children:(0,rt.jsx)(fo.Notice,{status:"warning",isDismissible:!1,children:(0,zo.__)("Justified text can reduce readability. For better accessibility, use left-aligned text instead.")})})]})]})}var Xt=l(N(),1),Ut=l(A(),1);var ck=l(O(),1);var nt=l(A(),1),Yo=l(N(),1),Tae=l(O(),1),aP=l(z(),1);var Eae=l(z(),1);function _p(e,t){let{getBlockOrder:o,getBlockAttributes:r}=(0,Eae.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 Zt=l(w(),1);function oPe(e,t){let{orientation:o="horizontal"}=t;return e==="fill"?(0,Yo.__)("Stretch to fill available space."):e==="fixed"&&o==="horizontal"?(0,Yo.__)("Specify a fixed width."):e==="fixed"?(0,Yo.__)("Specify a fixed height."):(0,Yo.__)("Fit contents.")}function Iae({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,Zt.jsx)(rPe,{childLayout:e,onChange:t,parentLayout:o,isShownByDefault:r,panelId:n}):a==="grid"?(0,Zt.jsx)(iPe,{childLayout:e,onChange:t,parentLayout:o,isShownByDefault:r,panelId:n}):null}function rPe({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,Yo.__)("Width"):(0,Yo.__)("Height"),[d]=he("spacing.units"),f=(0,nt.__experimentalUseCustomUnits)({availableUnits:d||["%","px","em","rem","vh","vw"]}),m=()=>{t({selfStretch:void 0,flexSize:void 0})};return(0,Tae.useEffect)(()=>{i==="fixed"&&!s&&t({...e,selfStretch:"fit"})},[]),(0,Zt.jsxs)(nt.__experimentalVStack,{as:nt.__experimentalToolsPanelItem,spacing:2,hasValue:c,label:u,onDeselect:m,isShownByDefault:r,panelId:n,children:[(0,Zt.jsxs)(nt.__experimentalToggleGroupControl,{size:"__unstable-large",label:nPe(o),value:i||"fit",help:oPe(i,o),onChange:h=>{t({selfStretch:h,flexSize:h!=="fixed"?null:s})},isBlock:!0,children:[(0,Zt.jsx)(nt.__experimentalToggleGroupControlOption,{value:"fit",label:(0,Yo._x)("Fit","Intrinsic block width in flex layout")},"fit"),(0,Zt.jsx)(nt.__experimentalToggleGroupControlOption,{value:"fill",label:(0,Yo._x)("Grow","Block with expanding width in flex layout")},"fill"),(0,Zt.jsx)(nt.__experimentalToggleGroupControlOption,{value:"fixed",label:(0,Yo._x)("Fixed","Block with fixed width in flex layout")},"fixed")]}),i==="fixed"&&(0,Zt.jsx)(nt.__experimentalUnitControl,{size:"__unstable-large",units:f,onChange:h=>{t({selfStretch:i,flexSize:h})},value:s,min:0,label:u,hideLabelFromVision:!0})]})}function nPe(e){let{orientation:t="horizontal"}=e;return t==="horizontal"?(0,Yo.__)("Width"):(0,Yo.__)("Height")}function iPe({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=_p(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,Zt.jsxs)(Zt.Fragment,{children:[(0,Zt.jsxs)(nt.Flex,{as:nt.__experimentalToolsPanelItem,hasValue:b,label:(0,Yo.__)("Grid span"),onDeselect:v,isShownByDefault:r,panelId:n,children:[(0,Zt.jsx)(nt.FlexItem,{style:{width:"50%"},children:(0,Zt.jsx)(nt.__experimentalInputControl,{size:"__unstable-large",label:(0,Yo.__)("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,Zt.jsx)(nt.FlexItem,{style:{width:"50%"},children:(0,Zt.jsx)(nt.__experimentalInputControl,{size:"__unstable-large",label:(0,Yo.__)("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,Zt.jsxs)(nt.Flex,{as:nt.__experimentalToolsPanelItem,hasValue:g,label:(0,Yo.__)("Grid placement"),onDeselect:k,isShownByDefault:!1,panelId:n,children:[(0,Zt.jsx)(nt.FlexItem,{style:{width:"50%"},children:(0,Zt.jsx)(nt.__experimentalInputControl,{size:"__unstable-large",label:(0,Yo.__)("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,Zt.jsx)(nt.FlexItem,{style:{width:"50%"},children:(0,Zt.jsx)(nt.__experimentalInputControl,{size:"__unstable-large",label:(0,Yo.__)("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),lk=l(N(),1);var AF=l(w(),1);function cP({panelId:e,value:t,onChange:o=()=>{},options:r,defaultValue:n="auto",hasValue:i,isShownByDefault:s=!0}){let a=t??"auto",[c,u,d]=he("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,lk._x)("Original","Aspect ratio option for dimensions control"),value:"auto"},...d?m:[],...f||[],{label:(0,lk._x)("Custom","Aspect ratio option for dimensions control"),value:"custom",disabled:!0,hidden:!0}];return(0,AF.jsx)(lP.__experimentalToolsPanelItem,{hasValue:i||(()=>a!==n),label:(0,lk.__)("Aspect ratio"),onDeselect:()=>o(void 0),isShownByDefault:s,panelId:e,children:(0,AF.jsx)(lP.SelectControl,{label:(0,lk.__)("Aspect ratio"),value:a,options:r??h,onChange:o,size:"__unstable-large"})})}var Ke=l(w(),1),LF=["horizontal","vertical"];function uP(e){let t=Oae(e),o=Aae(e),r=Lae(e),n=Nae(e),i=Mae(e),s=Dae(e),a=Vae(e),c=Fae(e),u=zae(e),d=jae(e);return ck.Platform.OS==="web"&&(t||o||r||n||i||s||a||c||u||d)}function Oae(e){return e?.layout?.contentSize}function Aae(e){return e?.layout?.wideSize}function Lae(e){return e?.spacing?.padding}function Nae(e){return e?.spacing?.margin}function Mae(e){return e?.spacing?.blockGap}function Dae(e){return e?.dimensions?.height}function Vae(e){return e?.dimensions?.minHeight}function Fae(e){return e?.dimensions?.width}function zae(e){return e?.dimensions?.aspectRatio}function jae(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 sPe(e){let{defaultSpacingSizes:t,spacingSizes:o}=e?.spacing||{};return t!==!1&&o?.default?.length>0||o?.theme?.length>0||o?.custom?.length>0}function Pae(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 Rae(e){return e&&typeof e=="string"?{top:e,right:e,bottom:e,left:e}:e}function aPe(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 lPe({resetAllFilter:e,onChange:t,value:o,panelId:r,children:n}){let i=No(),s=()=>{let a=e(o);t(a)};return(0,Ke.jsx)(Ut.__experimentalToolsPanel,{label:(0,Xt.__)("Dimensions"),resetAll:s,panelId:r,dropdownMenuProps:i,children:n})}var aa={contentSize:!0,wideSize:!0,padding:!0,margin:!0,blockGap:!0,height:!0,minHeight:!0,width:!0,aspectRatio:!0,childLayout:!0};function dP({as:e=lPe,value:t,onChange:o,inheritedValue:r=t,settings:n,panelId:i,defaultControls:s=aa,onVisualize:a=()=>{},includeLayoutControls:c=!1}){let{dimensions:u,spacing:d}=n,f=oe=>oe&&typeof oe=="object"?Object.keys(oe).reduce((Ne,mt)=>(Ne[mt]=Mr({settings:{dimensions:u,spacing:d}},"",oe[mt]),Ne),{}):Mr({settings:{dimensions:u,spacing:d}},"",oe),m=sPe(n),h=(0,Ut.__experimentalUseCustomUnits)({availableUnits:n?.spacing?.units||["%","px","em","rem","vw"]}),p=-1/0,[g,b]=(0,ck.useState)(p),k=Oae(n)&&c,v=f(r?.layout?.contentSize),y=oe=>{o(me(t,["layout","contentSize"],oe||void 0))},_=()=>!!t?.layout?.contentSize,S=()=>y(void 0),C=Aae(n)&&c,B=f(r?.layout?.wideSize),P=oe=>{o(me(t,["layout","wideSize"],oe||void 0))},R=()=>!!t?.layout?.wideSize,E=()=>P(void 0),L=Lae(n),T=f(r?.spacing?.padding),I=Rae(T),M=Array.isArray(n?.spacing?.padding)?n?.spacing?.padding:n?.spacing?.padding?.sides,D=M&&M.some(oe=>LF.includes(oe)),U=oe=>{let Ne=Pae(oe,M);o(me(t,["spacing","padding"],Ne))},j=()=>!!t?.spacing?.padding&&Object.keys(t?.spacing?.padding).length,H=()=>U(void 0),G=()=>a("padding"),Q=Nae(n),ie=f(r?.spacing?.margin),ce=Rae(ie),te=Array.isArray(n?.spacing?.margin)?n?.spacing?.margin:n?.spacing?.margin?.sides,ne=te&&te.some(oe=>LF.includes(oe)),Z=oe=>{let Ne=Pae(oe,te);o(me(t,["spacing","margin"],Ne))},Y=()=>!!t?.spacing?.margin&&Object.keys(t?.spacing?.margin).length,J=()=>Z(void 0),K=()=>a("margin"),ee=Mae(n),re=Array.isArray(n?.spacing?.blockGap)?n?.spacing?.blockGap:n?.spacing?.blockGap?.sides,W=re&&re.some(oe=>LF.includes(oe)),ae=f(r?.spacing?.blockGap),ge=aPe(ae,W),fe=oe=>{o(me(t,["spacing","blockGap"],oe))},xe=oe=>{oe||fe(null),!W&&oe?.hasOwnProperty("top")?fe(oe.top):fe({top:oe?.top,left:oe?.left})},De=()=>fe(void 0),st=()=>!!t?.spacing?.blockGap,Lt=Vae(n),no=f(r?.dimensions?.minHeight),jo=oe=>{let Ne=me(t,["dimensions","minHeight"],oe);o(me(Ne,["dimensions","aspectRatio"],void 0))},at=()=>{jo(void 0)},dr=()=>!!t?.dimensions?.minHeight,$t=Dae(n),io=f(r?.dimensions?.height),Ue=oe=>{let Ne=me(t,["dimensions","height"],oe);o(me(Ne,["dimensions","aspectRatio"],void 0))},Kt=()=>{Ue(void 0)},Je=()=>!!t?.dimensions?.height,He=Fae(n),fr=f(r?.dimensions?.width),pn=oe=>{o(me(t,["dimensions","width"],oe))},ze=()=>{pn(void 0)},so=()=>!!t?.dimensions?.width,et=zae(n),Ve=f(r?.dimensions?.aspectRatio),yt=oe=>{let Ne=me(t,["dimensions","aspectRatio"],oe);o(me(Ne,["dimensions","minHeight"],void 0))},Oo=()=>!!t?.dimensions?.aspectRatio,mr=jae(n),be=r?.layout,Bt=oe=>{o({...t,layout:{...oe}})},Ao=(0,ck.useCallback)(oe=>({...oe,layout:Ae({...oe?.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:{...oe?.spacing,padding:void 0,margin:void 0,blockGap:void 0},dimensions:{...oe?.dimensions,height:void 0,minHeight:void 0,aspectRatio:void 0,width:void 0}}),[]),qe=()=>a(!1);return(0,Ke.jsxs)(e,{resetAllFilter:Ao,value:t,onChange:o,panelId:i,children:[(k||C)&&(0,Ke.jsx)("span",{className:"span-columns",children:(0,Xt.__)("Set the width of the main content area.")}),k&&(0,Ke.jsx)(Ut.__experimentalToolsPanelItem,{label:(0,Xt.__)("Content width"),hasValue:_,onDeselect:S,isShownByDefault:s.contentSize??aa.contentSize,panelId:i,children:(0,Ke.jsx)(Ut.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,Xt.__)("Content width"),labelPosition:"top",value:v||"",onChange:oe=>{y(oe)},units:h,prefix:(0,Ke.jsx)(Ut.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,Ke.jsx)(we,{icon:jf})})})}),C&&(0,Ke.jsx)(Ut.__experimentalToolsPanelItem,{label:(0,Xt.__)("Wide width"),hasValue:R,onDeselect:E,isShownByDefault:s.wideSize??aa.wideSize,panelId:i,children:(0,Ke.jsx)(Ut.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,Xt.__)("Wide width"),labelPosition:"top",value:B||"",onChange:oe=>{P(oe)},units:h,prefix:(0,Ke.jsx)(Ut.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,Ke.jsx)(we,{icon:Jf})})})}),L&&(0,Ke.jsxs)(Ut.__experimentalToolsPanelItem,{hasValue:j,label:(0,Xt.__)("Padding"),onDeselect:H,isShownByDefault:s.padding??aa.padding,className:V({"tools-panel-item-spacing":m}),panelId:i,children:[!m&&(0,Ke.jsx)(Ut.BoxControl,{__next40pxDefaultSize:!0,values:I,onChange:U,label:(0,Xt.__)("Padding"),sides:M,units:h,allowReset:!1,splitOnAxis:D,inputProps:{onMouseOver:G,onMouseOut:qe}}),m&&(0,Ke.jsx)(rk,{values:I,onChange:U,label:(0,Xt.__)("Padding"),sides:M,units:h,allowReset:!1,onMouseOver:G,onMouseOut:qe})]}),Q&&(0,Ke.jsxs)(Ut.__experimentalToolsPanelItem,{hasValue:Y,label:(0,Xt.__)("Margin"),onDeselect:J,isShownByDefault:s.margin??aa.margin,className:V({"tools-panel-item-spacing":m}),panelId:i,children:[!m&&(0,Ke.jsx)(Ut.BoxControl,{__next40pxDefaultSize:!0,values:ce,onChange:Z,inputProps:{min:g,onDragStart:()=>{b(0)},onDragEnd:()=>{b(p)},onMouseOver:K,onMouseOut:qe},label:(0,Xt.__)("Margin"),sides:te,units:h,allowReset:!1,splitOnAxis:ne}),m&&(0,Ke.jsx)(rk,{values:ce,onChange:Z,minimumCustomValue:-1/0,label:(0,Xt.__)("Margin"),sides:te,units:h,allowReset:!1,onMouseOver:K,onMouseOut:qe})]}),ee&&(0,Ke.jsxs)(Ut.__experimentalToolsPanelItem,{hasValue:st,label:(0,Xt.__)("Block spacing"),onDeselect:De,isShownByDefault:s.blockGap??aa.blockGap,className:V({"tools-panel-item-spacing":m,"single-column":!m&&!W}),panelId:i,children:[!m&&(W?(0,Ke.jsx)(Ut.BoxControl,{__next40pxDefaultSize:!0,label:(0,Xt.__)("Block spacing"),min:0,onChange:xe,units:h,sides:re,values:ge,allowReset:!1,splitOnAxis:W}):(0,Ke.jsx)(Ut.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,Xt.__)("Block spacing"),min:0,onChange:fe,units:h,value:ae})),m&&(0,Ke.jsx)(rk,{label:(0,Xt.__)("Block spacing"),min:0,onChange:xe,showSideInLabel:!1,sides:W?re:["top"],values:ge,allowReset:!1})]}),mr&&(0,Ke.jsx)(Iae,{value:be,onChange:Bt,parentLayout:n?.parentLayout,panelId:i,isShownByDefault:s.childLayout??aa.childLayout}),Lt&&(0,Ke.jsx)(Ut.__experimentalToolsPanelItem,{hasValue:dr,label:(0,Xt.__)("Minimum height"),onDeselect:at,isShownByDefault:s.minHeight??aa.minHeight,panelId:i,children:(0,Ke.jsx)(Tb,{label:(0,Xt.__)("Minimum height"),value:no,onChange:jo,dimensionSizes:u?.dimensionSizes})}),$t&&(0,Ke.jsx)(Ut.__experimentalToolsPanelItem,{hasValue:Je,label:(0,Xt.__)("Height"),onDeselect:Kt,isShownByDefault:s.height??aa.height,panelId:i,children:(0,Ke.jsx)(Tb,{label:(0,Xt.__)("Height"),value:io,onChange:Ue,dimensionSizes:u?.dimensionSizes})}),He&&(0,Ke.jsx)(Ut.__experimentalToolsPanelItem,{hasValue:so,label:(0,Xt.__)("Width"),onDeselect:ze,isShownByDefault:s.width??aa.width,panelId:i,children:(0,Ke.jsx)(Tb,{label:(0,Xt.__)("Width"),value:fr,onChange:pn,dimensionSizes:u?.dimensionSizes})}),et&&(0,Ke.jsx)(cP,{hasValue:Oo,value:Ve,onChange:yt,panelId:i,isShownByDefault:s.aspectRatio??aa.aspectRatio})]})}var an=l(A(),1),dk=l(O(),1),uk=l(N(),1);var Sp=l(N(),1),Io=l(A(),1),mP=l(O(),1);var Ot=l(w(),1),fP=[];function cPe({shadow:e,onShadowChange:t,settings:o}){let r=NF(o);return(0,Ot.jsx)("div",{className:"block-editor-global-styles__shadow-popover-container",children:(0,Ot.jsxs)(Io.__experimentalVStack,{spacing:4,children:[(0,Ot.jsx)(Io.__experimentalHeading,{level:5,children:(0,Sp.__)("Drop shadow")}),(0,Ot.jsx)(uPe,{presets:r,activeShadow:e,onSelect:t}),(0,Ot.jsx)("div",{className:"block-editor-global-styles__clear-shadow",children:(0,Ot.jsx)(Io.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>t(void 0),disabled:!e,accessibleWhenDisabled:!0,children:(0,Sp.__)("Clear")})})]})})}function uPe({presets:e,activeShadow:t,onSelect:o}){return e?(0,Ot.jsx)(Io.Composite,{role:"listbox",className:"block-editor-global-styles__shadow__list","aria-label":(0,Sp.__)("Drop shadows"),children:e.map(({name:r,slug:n,shadow:i})=>(0,Ot.jsx)(dPe,{label:r,isActive:i===t,type:n==="unset"?"unset":"preset",onSelect:()=>o(i===t?void 0:i),shadow:i},n))}):null}function dPe({type:e,label:t,isActive:o,onSelect:r,shadow:n}){return(0,Ot.jsx)(Io.Tooltip,{text:t,children:(0,Ot.jsx)(Io.Composite.Item,{role:"option","aria-label":t,"aria-selected":o,className:V("block-editor-global-styles__shadow__item",{"is-active":o}),render:(0,Ot.jsx)("button",{className:V("block-editor-global-styles__shadow-indicator",{unset:e==="unset"}),onClick:r,style:{boxShadow:n},"aria-label":t,children:o&&(0,Ot.jsx)(we,{icon:Cs})})})})}function Uae({shadow:e,onShadowChange:t,settings:o}){return(0,Ot.jsx)(Io.Dropdown,{popoverProps:{placement:"left-start",offset:36,shift:!0},className:"block-editor-global-styles__shadow-dropdown",renderToggle:fPe(e,t),renderContent:()=>(0,Ot.jsx)(Io.__experimentalDropdownContentWrapper,{paddingSize:"medium",children:(0,Ot.jsx)(cPe,{shadow:e,onShadowChange:t,settings:o})})})}function fPe(e,t){return function({onToggle:r,isOpen:n}){let i=(0,mP.useRef)(void 0),s={onClick:r,className:V("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:V("block-editor-global-styles__shadow-editor__remove-button",{"is-open":n}),label:(0,Sp.__)("Remove")};return(0,Ot.jsxs)(Ot.Fragment,{children:[(0,Ot.jsx)(Io.Button,{__next40pxDefaultSize:!0,...s,children:(0,Ot.jsxs)(Io.__experimentalHStack,{justify:"flex-start",children:[(0,Ot.jsx)(we,{className:"block-editor-global-styles__toggle-icon",icon:JN,size:24}),(0,Ot.jsx)(Io.FlexItem,{children:(0,Sp.__)("Drop shadow")})]})}),!!e&&(0,Ot.jsx)(Io.Button,{__next40pxDefaultSize:!0,size:"small",icon:gr,...a})]})}}function NF(e){return(0,mP.useMemo)(()=>{if(!e?.shadow)return fP;let t=e?.shadow?.defaultPresets,{default:o,theme:r,custom:n}=e?.shadow?.presets??{},i={name:(0,Sp.__)("Unset"),slug:"unset",shadow:"none"},s=[...t&&o||fP,...r||fP,...n||fP];return s.length&&s.unshift(i),s},[e])}var la=l(w(),1);function pP(e){return Object.values(FS(e)).some(Boolean)}function FS(e){return{hasBorderColor:Hae(e),hasBorderRadius:Gae(e),hasBorderStyle:Wae(e),hasBorderWidth:$ae(e),hasShadow:Kae(e)}}function Hae(e){return e?.border?.color}function Gae(e){return e?.border?.radius}function Wae(e){return e?.border?.style}function $ae(e){return e?.border?.width}function Kae(e){let t=NF(e);return!!e?.shadow&&t.length>0}function mPe({resetAllFilter:e,onChange:t,value:o,panelId:r,children:n,label:i}){let s=No();return(0,la.jsx)(an.__experimentalToolsPanel,{label:i,resetAll:()=>{let c=e(o);t(c)},panelId:r,dropdownMenuProps:s,children:n})}var pPe={radius:!0,color:!0,width:!0,shadow:!0};function hP({as:e=mPe,value:t,onChange:o,inheritedValue:r=t,settings:n,panelId:i,name:s,defaultControls:a=pPe}){let c=rl(n),u=(0,dk.useCallback)(j=>Mr({settings:n},"",j),[n]),d=j=>{let G=c.flatMap(({colors:Q})=>Q).find(({color:Q})=>Q===j);return G?"var:preset|color|"+G.slug:j},f=(0,dk.useMemo)(()=>{if((0,an.__experimentalHasSplitBorders)(r?.border)){let j={...r?.border};return["top","right","bottom","left"].forEach(H=>{j[H]={...j[H],color:u(j[H]?.color)}}),j}return{...r?.border,color:r?.border?.color?u(r?.border?.color):void 0}},[r?.border,u]),m=j=>o({...t,border:j}),h=Hae(n),p=Wae(n),g=$ae(n),b=Gae(n),k=(0,dk.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=j=>m({...f,radius:j}),y=()=>{let j=t?.border?.radius;return typeof j=="object"?Object.entries(j).some(Boolean):!!j},_=Kae(n),S=u(r?.shadow),C=n?.shadow?.presets??{},B=C.custom??C.theme??C.default??[],P=j=>{let H=B?.find(({shadow:G})=>G===j)?.slug;o(me(t,["shadow"],H?`var:preset|shadow|${H}`:j||void 0))},R=()=>!!t?.shadow,E=()=>P(void 0),L=()=>{if(y())return m({radius:t?.border?.radius});m(void 0)},T=j=>{let H={...j};(0,an.__experimentalHasSplitBorders)(H)?["top","right","bottom","left"].forEach(G=>{H[G]&&(H[G]={...H[G],color:d(H[G]?.color)})}):H&&(H.color=d(H.color)),m({radius:f?.radius,...H})},I=(0,dk.useCallback)(j=>({...j,border:void 0,shadow:void 0}),[]),M=a?.color||a?.width,D=h||p||g||b,U=fk({blockName:s,hasShadowControl:_,hasBorderControl:D});return(0,la.jsxs)(e,{resetAllFilter:I,value:t,onChange:o,panelId:i,label:U,children:[(g||h)&&(0,la.jsx)(an.__experimentalToolsPanelItem,{hasValue:()=>(0,an.__experimentalIsDefinedBorder)(t?.border),label:(0,uk.__)("Border"),onDeselect:()=>L(),isShownByDefault:M,panelId:i,children:(0,la.jsx)(an.BorderBoxControl,{colors:c,enableAlpha:!0,enableStyle:p,onChange:T,popoverOffset:40,popoverPlacement:"left-start",value:f,__experimentalIsRenderedInSidebar:!0,size:"__unstable-large",hideLabelFromVision:!_,label:(0,uk.__)("Border")})}),b&&(0,la.jsx)(an.__experimentalToolsPanelItem,{hasValue:y,label:(0,uk.__)("Radius"),onDeselect:()=>v(void 0),isShownByDefault:a.radius,panelId:i,children:(0,la.jsx)(wI,{presets:n?.border?.radiusSizes,values:k,onChange:j=>{v(j||void 0)}})}),_&&(0,la.jsxs)(an.__experimentalToolsPanelItem,{label:(0,uk.__)("Shadow"),hasValue:R,onDeselect:E,isShownByDefault:a.shadow,panelId:i,children:[D?(0,la.jsx)(an.BaseControl.VisualLabel,{as:"legend",children:(0,uk.__)("Shadow")}):null,(0,la.jsx)(Uae,{shadow:S,onShadowChange:P,settings:n})]})]})}var Jt=l(A(),1),bP=l(O(),1),Qt=l(N(),1);var dt=l(w(),1);function kP(e){let t=qae(e),o=Jae(e),r=Zae(e),n=Qd(e),i=Qae(e),s=Xae(e);return t||o||r||n||i||s}function qae(e){let t=rl(e);return e?.color?.text&&(t?.length>0||e?.color?.custom)}function Zae(e){let t=rl(e);return e?.color?.link&&(t?.length>0||e?.color?.custom)}function Xae(e){let t=rl(e);return e?.color?.caption&&(t?.length>0||e?.color?.custom)}function Qd(e){let t=rl(e),o=yp(e);return e?.color?.heading&&(t?.length>0||e?.color?.custom||o?.length>0||e?.color?.customGradient)}function Qae(e){let t=rl(e),o=yp(e);return e?.color?.button&&(t?.length>0||e?.color?.custom||o?.length>0||e?.color?.customGradient)}function Jae(e){let t=rl(e),o=yp(e);return e?.color?.background&&(t?.length>0||e?.color?.custom||o?.length>0||e?.color?.customGradient)}function MF({resetAllFilter:e,onChange:t,value:o,panelId:r,children:n,label:i}){let s=No(),a=()=>{let c=e(o);t(c)};return(0,dt.jsx)(Jt.__experimentalToolsPanel,{label:i||(0,Qt.__)("Elements"),resetAll:a,panelId:r,hasInnerWrapper:!0,headingLevel:3,className:"color-block-support-panel",__experimentalFirstVisibleItemClass:"first",__experimentalLastVisibleItemClass:"last",dropdownMenuProps:s,children:(0,dt.jsx)("div",{className:"color-block-support-panel__inner-wrapper",children:n})})}var hPe={text:!0,background:!0,link:!0,heading:!0,button:!0,caption:!0},gPe={placement:"left-start",offset:36,shift:!0},{Tabs:gP}=F(Jt.privateApis),bPe=({indicators:e,label:t})=>(0,dt.jsxs)(Jt.__experimentalHStack,{justify:"flex-start",children:[(0,dt.jsx)(Jt.__experimentalZStack,{isLayered:!1,offset:-8,children:e.map((o,r)=>(0,dt.jsx)(Jt.Flex,{expanded:!1,children:(0,dt.jsx)(Jt.ColorIndicator,{colorValue:o})},r))}),(0,dt.jsx)(Jt.FlexItem,{className:"block-editor-panel-color-gradient-settings__color-name",children:t})]});function Yae({isGradient:e,inheritedValue:t,userValue:o,setValue:r,colorGradientControlSettings:n}){return(0,dt.jsx)(Dd,{...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 DF({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,bP.useRef)(void 0);return(0,dt.jsx)(Jt.__experimentalToolsPanelItem,{className:c,hasValue:t,label:e,onDeselect:o,isShownByDefault:r,panelId:a,children:(0,dt.jsx)(Jt.Dropdown,{popoverProps:gPe,className:"block-editor-tools-panel-color-gradient-settings__dropdown",renderToggle:({onToggle:h,isOpen:p})=>{let g={onClick:h,className:V("block-editor-panel-color-gradient-settings__dropdown",{"is-open":p}),"aria-expanded":p,ref:m};return(0,dt.jsxs)(dt.Fragment,{children:[(0,dt.jsx)(Jt.Button,{...g,__next40pxDefaultSize:!0,children:(0,dt.jsx)(bPe,{indicators:n,label:e})}),t()&&(0,dt.jsx)(Jt.Button,{__next40pxDefaultSize:!0,label:(0,Qt.__)("Reset"),className:"block-editor-panel-color-gradient-settings__reset",size:"small",icon:gr,onClick:()=>{o(),p&&h(),m.current?.focus()}})]})},renderContent:()=>(0,dt.jsx)(Jt.__experimentalDropdownContentWrapper,{paddingSize:"none",children:(0,dt.jsxs)("div",{className:"block-editor-panel-color-gradient-settings__dropdown-content",children:[i.length===1&&(0,dt.jsx)(Yae,{...f,colorGradientControlSettings:s},d),i.length>1&&(0,dt.jsxs)(gP,{defaultTabId:u?.key,children:[(0,dt.jsx)(gP.TabList,{children:i.map(h=>(0,dt.jsx)(gP.Tab,{tabId:h.key,children:h.label},h.key))}),i.map(h=>{let{key:p,...g}=h;return(0,dt.jsx)(gP.TabPanel,{tabId:p,focusable:!1,children:(0,dt.jsx)(Yae,{...g,colorGradientControlSettings:s},p)},p)})]})]})})})})}function vP({as:e=MF,value:t,onChange:o,inheritedValue:r=t,settings:n,panelId:i,defaultControls:s=hPe,label:a,children:c}){let u=rl(n),d=yp(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=W=>Mr({settings:n},"",W),v=W=>{let ge=u.flatMap(({colors:fe})=>fe).find(({color:fe})=>fe===W);return ge?"var:preset|color|"+ge.slug:W},y=W=>{let ge=d.flatMap(({gradients:fe})=>fe).find(({gradient:fe})=>fe===W);return ge?"var:preset|gradient|"+ge.slug:W},_=Jae(n),S=k(r?.color?.background),C=k(t?.color?.background),B=k(r?.color?.gradient),P=k(t?.color?.gradient),R=()=>!!C||!g&&!!P,E=W=>{let ae=me(t,["color","background"],v(W));g||(ae.color.gradient=void 0),o(ae)},L=W=>{let ae=me(t,["color","gradient"],y(W));ae.color.background=void 0,o(ae)},T=()=>{let W=me(t,["color","background"],void 0);g||(W.color.gradient=void 0),o(W)},I=Zae(n),M=k(r?.elements?.link?.color?.text),D=k(t?.elements?.link?.color?.text),U=W=>{o(me(t,["elements","link","color","text"],v(W)))},j=k(r?.elements?.link?.[":hover"]?.color?.text),H=k(t?.elements?.link?.[":hover"]?.color?.text),G=W=>{o(me(t,["elements","link",":hover","color","text"],v(W)))},Q=()=>!!D||!!H,ie=()=>{let W=me(t,["elements","link",":hover","color","text"],void 0);W=me(W,["elements","link","color","text"],void 0),o(W)},ce=qae(n),te=k(r?.color?.text),ne=k(t?.color?.text),Z=()=>!!ne,Y=W=>{let ae=me(t,["color","text"],v(W));te===M&&(ae=me(ae,["elements","link","color","text"],v(W))),o(ae)},J=()=>Y(void 0),K=[{name:"caption",label:(0,Qt.__)("Captions"),showPanel:Xae(n)},{name:"button",label:(0,Qt.__)("Button"),showPanel:Qae(n)},{name:"heading",label:(0,Qt.__)("Heading"),showPanel:Qd(n)},{name:"h1",label:(0,Qt.__)("H1"),showPanel:Qd(n)},{name:"h2",label:(0,Qt.__)("H2"),showPanel:Qd(n)},{name:"h3",label:(0,Qt.__)("H3"),showPanel:Qd(n)},{name:"h4",label:(0,Qt.__)("H4"),showPanel:Qd(n)},{name:"h5",label:(0,Qt.__)("H5"),showPanel:Qd(n)},{name:"h6",label:(0,Qt.__)("H6"),showPanel:Qd(n)}],ee=(0,bP.useCallback)(W=>({...W,color:void 0,elements:{...W?.elements,link:{...W?.elements?.link,color:void 0,":hover":{color:void 0}},...K.reduce((ae,ge)=>({...ae,[ge.name]:{...W?.elements?.[ge.name],color:void 0}}),{})}}),[K]),re=[ce&&{key:"text",label:(0,Qt.__)("Text"),hasValue:Z,resetValue:J,isShownByDefault:s.text,indicators:[te],tabs:[{key:"text",label:(0,Qt.__)("Text"),inheritedValue:te,setValue:Y,userValue:ne}]},_&&{key:"background",label:(0,Qt.__)("Background"),hasValue:R,resetValue:T,isShownByDefault:s.background,indicators:[(b?B:void 0)??S],tabs:[h&&{key:"background",label:(0,Qt.__)("Color"),inheritedValue:S,setValue:E,userValue:C},b&&{key:"gradient",label:(0,Qt.__)("Gradient"),inheritedValue:B,setValue:L,userValue:P,isGradient:!0}].filter(Boolean)},I&&{key:"link",label:(0,Qt.__)("Link"),hasValue:Q,resetValue:ie,isShownByDefault:s.link,indicators:[M,j],tabs:[{key:"link",label:(0,Qt.__)("Default"),inheritedValue:M,setValue:U,userValue:D},{key:"hover",label:(0,Qt.__)("Hover"),inheritedValue:j,setValue:G,userValue:H}]}].filter(Boolean);return K.forEach(({name:W,label:ae,showPanel:ge})=>{if(!ge)return;let fe=k(r?.elements?.[W]?.color?.background),xe=k(r?.elements?.[W]?.color?.gradient),De=k(r?.elements?.[W]?.color?.text),st=k(t?.elements?.[W]?.color?.background),Lt=k(t?.elements?.[W]?.color?.gradient),no=k(t?.elements?.[W]?.color?.text),jo=()=>!!(no||st||Lt),at=()=>{let Je=me(t,["elements",W,"color","background"],void 0);Je.elements[W].color.gradient=void 0,Je.elements[W].color.text=void 0,o(Je)},dr=Je=>{o(me(t,["elements",W,"color","text"],v(Je)))},$t=Je=>{let He=me(t,["elements",W,"color","background"],v(Je));He.elements[W].color.gradient=void 0,o(He)},io=Je=>{let He=me(t,["elements",W,"color","gradient"],y(Je));He.elements[W].color.background=void 0,o(He)},Ue=!0,Kt=W!=="caption";re.push({key:W,label:ae,hasValue:jo,resetValue:at,isShownByDefault:s[W],indicators:Ue&&Kt?[De,xe??fe]:[Ue?De:xe??fe],tabs:[h&&Ue&&{key:"text",label:(0,Qt.__)("Text"),inheritedValue:De,setValue:dr,userValue:no},h&&Kt&&{key:"background",label:(0,Qt.__)("Background"),inheritedValue:fe,setValue:$t,userValue:st},p&&Kt&&{key:"gradient",label:(0,Qt.__)("Gradient"),inheritedValue:xe,setValue:io,userValue:Lt,isGradient:!0}].filter(Boolean)})}),(0,dt.jsxs)(e,{resetAllFilter:ee,value:t,onChange:o,panelId:i,label:a,children:[re.map(W=>{let{key:ae,...ge}=W;return(0,dt.jsx)(DF,{...ge,colorGradientControlSettings:{colors:u,disableCustomColors:!f,gradients:d,disableCustomGradients:!m},panelId:i},ae)}),c]})}var bt=l(A(),1),Oc=l(N(),1),mk=l(O(),1);var mo=l(w(),1),yP=[];function ele(e,{presetSetting:t,defaultSetting:o}){let r=!e?.color?.[o],n=e?.color?.[t]?.custom||yP,i=e?.color?.[t]?.theme||yP,s=e?.color?.[t]?.default||yP;return(0,mk.useMemo)(()=>[...n,...i,...r?yP:s],[r,n,i,s])}function tle(e){return ole(e)}function ole(e){return e.color.customDuotone||e.color.defaultDuotone||e.color.duotone.length>0}function kPe({resetAllFilter:e,onChange:t,value:o,panelId:r,children:n}){let i=No(),s=()=>{let a=e(o);t(a)};return(0,mo.jsx)(bt.__experimentalToolsPanel,{label:(0,Oc._x)("Filters","Name for applying graphical effects"),resetAll:s,panelId:r,dropdownMenuProps:i,children:n})}var vPe={duotone:!0},yPe={placement:"left-start",offset:36,shift:!0,className:"block-editor-duotone-control__popover",headerTitle:(0,Oc.__)("Duotone")},_Pe=({indicator:e,label:t})=>(0,mo.jsxs)(bt.__experimentalHStack,{justify:"flex-start",children:[(0,mo.jsx)(bt.__experimentalZStack,{isLayered:!1,offset:-8,children:(0,mo.jsx)(bt.Flex,{expanded:!1,children:e==="unset"||!e?(0,mo.jsx)(bt.ColorIndicator,{className:"block-editor-duotone-control__unset-indicator"}):(0,mo.jsx)(bt.DuotoneSwatch,{values:e})})}),(0,mo.jsx)(bt.FlexItem,{title:t,children:t})]}),SPe=(e,t)=>function({onToggle:r,isOpen:n}){let i=(0,mk.useRef)(void 0),s={onClick:r,className:V("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,Oc.__)("Reset")};return(0,mo.jsxs)(mo.Fragment,{children:[(0,mo.jsx)(bt.Button,{__next40pxDefaultSize:!0,...s,children:(0,mo.jsx)(_Pe,{indicator:e,label:(0,Oc.__)("Duotone")})}),e&&(0,mo.jsx)(bt.Button,{size:"small",icon:gr,...a})]})};function _P({as:e=kPe,value:t,onChange:o,inheritedValue:r=t,settings:n,panelId:i,defaultControls:s=vPe}){let a=b=>Mr({settings:n},"",b),c=ole(n),u=ele(n,{presetSetting:"duotone",defaultSetting:"defaultDuotone"}),d=ele(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(me(t,["filter","duotone"],v))},h=()=>!!t?.filter?.duotone,p=()=>m(void 0),g=(0,mk.useCallback)(b=>({...b,filter:{...b.filter,duotone:void 0}}),[]);return(0,mo.jsx)(e,{resetAllFilter:g,value:t,onChange:o,panelId:i,children:c&&(0,mo.jsx)(bt.__experimentalToolsPanelItem,{label:(0,Oc.__)("Duotone"),hasValue:h,onDeselect:p,isShownByDefault:s.duotone,panelId:i,children:(0,mo.jsx)(bt.Dropdown,{popoverProps:yPe,className:"block-editor-global-styles-filters-panel__dropdown",renderToggle:SPe(f,p),renderContent:()=>(0,mo.jsx)(bt.__experimentalDropdownContentWrapper,{paddingSize:"small",children:(0,mo.jsxs)(bt.MenuGroup,{label:(0,Oc.__)("Duotone"),children:[(0,mo.jsx)("p",{children:(0,Oc.__)("Create a two-tone color effect without losing your original image.")}),(0,mo.jsx)(bt.DuotonePicker,{colorPalette:d,duotonePalette:u,disableCustomColors:!0,disableCustomDuotone:!0,value:f,onChange:m})]})})})})})}var pk=l(A(),1),zS=l(N(),1);var xp=l(w(),1);function rle(e,t,o){return e==="core/image"&&o?.lightbox?.allowEditing||!!t?.lightbox}function nle({onChange:e,value:t,inheritedValue:o,panelId:r}){let n=No(),i=()=>{e(void 0)},s=c=>{e({enabled:c})},a=!1;return o?.lightbox?.enabled&&(a=o.lightbox.enabled),(0,xp.jsx)(xp.Fragment,{children:(0,xp.jsx)(pk.__experimentalToolsPanel,{label:(0,zS._x)("Settings","Image settings"),resetAll:i,panelId:r,dropdownMenuProps:n,children:(0,xp.jsx)(pk.__experimentalToolsPanelItem,{hasValue:()=>!!t?.lightbox,label:(0,zS.__)("Enlarge on click"),onDeselect:i,isShownByDefault:!0,panelId:r,children:(0,xp.jsx)(pk.ToggleControl,{label:(0,zS.__)("Enlarge on click"),checked:a,onChange:s})})})})}var hk=l(A(),1),ile=l(O(),1),SP=l(N(),1);var jS=l(w(),1);function xP(e){return!(typeof e=="string"&&/<\/?\w/.test(e))}function wP({value:e,onChange:t,inheritedValue:o=e,help:r}){let[n,i]=(0,ile.useState)(null),s=o?.css;function a(u){if(t({...e,css:u}),!xP(u)){i((0,SP.__)("The custom CSS is invalid. Do not use <> markup."));return}n&&i(null)}function c(u){let d=u?.target?.value;if(!d||!xP(d))return;let[f]=cg([{css:d}],".for-validation-only");i(f===null?(0,SP.__)("There is an error with your CSS structure."):null)}return(0,jS.jsxs)(hk.__experimentalVStack,{spacing:3,children:[n&&(0,jS.jsx)(hk.Notice,{status:"error",onRemove:()=>i(null),children:n}),(0,jS.jsx)(hk.TextareaControl,{label:(0,SP.__)("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 TP=l(A(),1),GS=l(O(),1),HS=l(N(),1);var Be=l(A(),1);var At=l(N(),1),ale=l(Li(),1),VF=l(bn(),1),Ac=l(O(),1),US=l(z(),1),lle=l(Fe(),1),cle=l(LV(),1);var Te=l(w(),1),CP="image",xPe={placement:"left-start",offset:36,shift:!0,className:"block-editor-global-styles-background-panel__popover"},EP=()=>{},BP=e=>{window.requestAnimationFrame(()=>{let[t]=lle.focus.tabbable.find(e?.current);t&&t.focus()})};function wPe(e){return e==="cover"||e===void 0?(0,At.__)("Image covers the space evenly."):e==="contain"?(0,At.__)("Image is contained without distortion."):(0,At.__)("Image has a fixed width.")}var CPe=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}%`},BPe=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 ule({as:e="span",imgUrl:t,toggleProps:o={},filename:r,label:n,onToggleCallback:i=EP}){let{isOpen:s,...a}=o;(0,Ac.useEffect)(()=>{typeof s<"u"&&i(s)},[s,i]);let c=()=>(0,Te.jsxs)(Be.__experimentalHStack,{className:"block-editor-global-styles-background-panel__inspector-preview-inner",children:[(0,Te.jsx)("span",{className:"block-editor-global-styles-background-panel__inspector-image-indicator",style:{backgroundImage:t?`url(${t})`:void 0}}),(0,Te.jsxs)(Be.FlexBlock,{children:[(0,Te.jsx)(Be.__experimentalTruncate,{numberOfLines:1,className:"block-editor-global-styles-background-panel__inspector-media-replace-title",children:n}),(0,Te.jsx)(Be.VisuallyHidden,{as:"span",children:t?(0,At.sprintf)((0,At.__)("Background image: %s"),r||n):(0,At.__)("No background image selected")})]})]});return e==="button"?(0,Te.jsx)(Be.Button,{__next40pxDefaultSize:!0,...a,children:c()}):c()}function EPe({label:e,filename:t,url:o,children:r,onToggle:n=EP,hasImageValue:i,onReset:s,containerRef:a}){if(!i)return;let c=e||(0,VF.getFilename)(o)||(0,At.__)("Image");return(0,Te.jsx)(Be.Dropdown,{popoverProps:xPe,renderToggle:({onToggle:u,isOpen:d})=>{let f={onClick:u,className:"block-editor-global-styles-background-panel__dropdown-toggle","aria-expanded":d,"aria-label":(0,At.__)("Background size, position and repeat options."),isOpen:d};return(0,Te.jsxs)(Te.Fragment,{children:[(0,Te.jsx)(ule,{imgUrl:o,filename:t,label:c,toggleProps:f,as:"button",onToggleCallback:n}),s&&(0,Te.jsx)(Be.Button,{__next40pxDefaultSize:!0,label:(0,At.__)("Reset"),className:"block-editor-global-styles-background-panel__reset",size:"small",icon:gr,onClick:()=>{s(),d&&u(),BP(a)}})]})},renderContent:()=>(0,Te.jsx)(Be.__experimentalDropdownContentWrapper,{className:"block-editor-global-styles-background-panel__dropdown-content-wrapper",paddingSize:"medium",children:r})})}function TPe(){return(0,Te.jsx)(Be.Placeholder,{className:"block-editor-global-styles-background-panel__loading",children:(0,Te.jsx)(Be.Spinner,{})})}function sle({onChange:e,style:t,inheritedValue:o,onRemoveImage:r=EP,onResetImage:n=EP,displayInPanel:i,defaultValues:s,containerRef:a}){let[c,u]=(0,Ac.useState)(!1),{getSettings:d}=(0,US.useSelect)(x),{id:f,title:m,url:h}=t?.background?.backgroundImage||{...o?.background?.backgroundImage},{createErrorNotice:p}=(0,US.useDispatch)(ale.store),g=B=>{p(B,{type:"snackbar"}),u(!1)},b=()=>e(me(t,["background","backgroundImage"],void 0)),k=B=>{if(!B||!B.url){b(),u(!1);return}if((0,cle.isBlobURL)(B.url)){u(!0);return}if(B.media_type&&B.media_type!==CP||!B.media_type&&B.type&&B.type!==CP){g((0,At.__)("Only images can be used as a background image."));return}let P=t?.background?.backgroundSize||s?.backgroundSize,R=t?.background?.backgroundPosition;e(me(t,["background"],{...t?.background,backgroundImage:{url:B.url,id:B.id,source:"file",title:B.title||void 0},backgroundPosition:!R&&(P==="auto"||!P)?"50% 0":R,backgroundSize:P})),u(!1),BP(a)},v=B=>{d().mediaUpload({allowedTypes:[CP],filesList:B,onFileChange([P]){k(P)},onError:g,multiple:!1})},y=Jd(t),_=()=>e(me(t,["background"],{backgroundImage:"none"})),S=!y&&Jd(o),C=m||(0,VF.getFilename)(h)||(0,At.__)("Image");return(0,Te.jsxs)("div",{className:"block-editor-global-styles-background-panel__image-tools-panel-item",children:[c&&(0,Te.jsx)(TPe,{}),(0,Te.jsx)(Ub,{mediaId:f,mediaURL:h,allowedTypes:[CP],accept:"image/*",onSelect:k,popoverProps:{className:V({"block-editor-global-styles-background-panel__media-replace-popover":i})},name:(0,Te.jsx)(ule,{imgUrl:h,filename:m,label:C}),renderToggle:B=>(0,Te.jsx)(Be.Button,{...B,__next40pxDefaultSize:!0}),onError:g,onReset:()=>{BP(a),n()},children:S&&(0,Te.jsx)(Be.MenuItem,{onClick:()=>{BP(a),_(),r()},children:(0,At.__)("Remove")})}),(0,Te.jsx)(Be.DropZone,{onFilesDrop:v,label:(0,At.__)("Drop to upload")})]})}function IPe({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(me(t,["background"],{...t?.background,backgroundPosition:y,backgroundRepeat:v,backgroundSize:k}))},h=k=>{e(me(t,["background","backgroundPosition"],CPe(k)))},p=()=>e(me(t,["background","backgroundRepeat"],f===!0?"no-repeat":"repeat")),g=()=>e(me(t,["background","backgroundAttachment"],u==="fixed"?"scroll":"fixed")),b=!c&&a&&n==="contain"?r?.backgroundPosition:c;return(0,Te.jsxs)(Be.__experimentalVStack,{spacing:3,className:"single-column",children:[(0,Te.jsx)(Be.FocalPointPicker,{label:(0,At.__)("Focal point"),url:s,value:BPe(b),onChange:h}),(0,Te.jsx)(Be.ToggleControl,{label:(0,At.__)("Fixed background"),checked:u==="fixed",onChange:g}),(0,Te.jsxs)(Be.__experimentalToggleGroupControl,{size:"__unstable-large",label:(0,At.__)("Size"),value:d,onChange:m,isBlock:!0,help:wPe(n||r?.backgroundSize),children:[(0,Te.jsx)(Be.__experimentalToggleGroupControlOption,{value:"cover",label:(0,At._x)("Cover","Size option for background image control")},"cover"),(0,Te.jsx)(Be.__experimentalToggleGroupControlOption,{value:"contain",label:(0,At._x)("Contain","Size option for background image control")},"contain"),(0,Te.jsx)(Be.__experimentalToggleGroupControlOption,{value:"auto",label:(0,At._x)("Tile","Size option for background image control")},"tile")]}),(0,Te.jsxs)(Be.__experimentalHStack,{justify:"flex-start",spacing:2,as:"span",children:[(0,Te.jsx)(Be.__experimentalUnitControl,{"aria-label":(0,At.__)("Background image width"),onChange:m,value:n,size:"__unstable-large",__unstableInputWidth:"100px",min:0,placeholder:(0,At.__)("Auto"),disabled:d!=="auto"||d===void 0}),(0,Te.jsx)(Be.ToggleControl,{label:(0,At.__)("Repeat"),checked:f,onChange:p,disabled:d==="cover"})]})]})}function dle({value:e,onChange:t,inheritedValue:o=e,settings:r,defaultValues:n={}}){let{globalStyles:i,_links:s}=(0,US.useSelect)(k=>{let{getSettings:v}=k(x),y=v();return{globalStyles:y[Ei],_links:y[q0]}},[]),a=(0,Ac.useMemo)(()=>{let k={background:{}};return o?.background?(Object.entries(o?.background).forEach(([v,y])=>{k.background[v]=Zg(y,{styles:i,_links:s})}),k):o},[i,s,o]),c=()=>t(me(e,["background"],{})),{title:u,url:d}=e?.background?.backgroundImage||{...a?.background?.backgroundImage},f=Jd(e)||Jd(a),m=e?.background?.backgroundImage||o?.background?.backgroundImage,h=f&&m!=="none"&&(r?.background?.backgroundSize||r?.background?.backgroundPosition||r?.background?.backgroundRepeat),[p,g]=(0,Ac.useState)(!1),b=(0,Ac.useRef)();return(0,Te.jsx)("div",{ref:b,className:V("block-editor-global-styles-background-panel__inspector-media-replace-container",{"is-open":p}),children:h?(0,Te.jsx)(EPe,{label:u,filename:u,url:d,onToggle:g,hasImageValue:f,onReset:c,containerRef:b,children:(0,Te.jsxs)(Be.__experimentalVStack,{spacing:3,className:"single-column",children:[(0,Te.jsx)(sle,{onChange:t,style:e,inheritedValue:a,displayInPanel:!0,onResetImage:()=>{g(!1),c()},onRemoveImage:()=>g(!1),defaultValues:n,containerRef:b}),(0,Te.jsx)(IPe,{onChange:t,style:e,defaultValues:n,inheritedValue:a})]})}):(0,Te.jsx)(sle,{onChange:t,style:e,inheritedValue:a,defaultValues:n,onResetImage:()=>{g(!1),c()},onRemoveImage:()=>g(!1),containerRef:b})})}var ef=l(w(),1),PPe={backgroundImage:!0,gradient:!0};function fle(e,t){return GS.Platform.OS==="web"&&e?.background?.[t]}function IP(e){let{backgroundImage:t,gradient:o}=e?.background||{};return GS.Platform.OS==="web"&&(t||o)}function Jd(e){return!!e?.background?.backgroundImage?.id||typeof e?.background?.backgroundImage=="string"||!!e?.background?.backgroundImage?.url}function FF(e){return typeof e?.background?.gradient=="string"&&e?.background?.gradient!==""}function RPe({resetAllFilter:e,onChange:t,value:o,panelId:r,children:n,headerLabel:i}){let s=No();return(0,ef.jsx)(TP.__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,ef.jsx)("div",{className:"background-block-support-panel__inner-wrapper",children:n})})}function PP({as:e=RPe,value:t,onChange:o,inheritedValue:r,settings:n,panelId:i,defaultControls:s=PPe,defaultValues:a={},headerLabel:c=(0,HS.__)("Background")}){let u=yp(n),d=n?.color?.customGradient,f=u.length>0||d,m=fle(n,"gradient"),h=f&&m,p=fle(n,"backgroundImage"),g=(0,GS.useCallback)(B=>({...B,background:{},color:m?{...B?.color,gradient:void 0}:B?.color}),[m]);if(!h&&!p)return null;let b=B=>Mr({settings:n},"",B),k=B=>{let R=u.flatMap(({gradients:E})=>E).find(({gradient:E})=>E===B);return R?"var:preset|gradient|"+R.slug:B},v=()=>o(me(t,["background","backgroundImage"],void 0)),y=()=>{let B=me(t,["background","gradient"],void 0);B=me(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 P=me(t,["background","gradient"],k(B));P=me(P,["color","gradient"],void 0),o(P)};return(0,ef.jsxs)(e,{resetAllFilter:g,value:t,onChange:o,panelId:i,headerLabel:c,children:[p&&(0,ef.jsx)(TP.__experimentalToolsPanelItem,{className:"block-editor-background-panel__item",hasValue:()=>Jd(t),label:(0,HS.__)("Image"),onDeselect:v,isShownByDefault:s.backgroundImage,panelId:i,children:(0,ef.jsx)(dle,{value:t,onChange:o,settings:n,inheritedValue:r,defaultControls:s,defaultValues:a})}),h&&(0,ef.jsx)(DF,{className:"block-editor-background-panel__item",label:(0,HS.__)("Gradient"),hasValue:()=>FF(t),resetValue:y,isShownByDefault:s.gradient,indicators:[_],tabs:[{key:"gradient",label:(0,HS.__)("Gradient"),inheritedValue:_??S,setValue:C,userValue:_,isGradient:!0}],colorGradientControlSettings:{gradients:u,disableCustomGradients:!d},panelId:i})]})}var wp=l(N(),1);var gk=l(A(),1),RP=l(w(),1);function mle({states:e=[],value:t="default",onChange:o}){if(!e||e.length===0)return null;let r=[{label:(0,wp.__)("Default"),value:"default"},...e.map(i=>({label:i.label,value:i.value}))],n=()=>r.find(s=>s.value===t)?.label||(0,wp.__)("Default");return(0,RP.jsx)(gk.DropdownMenu,{icon:hr,label:(0,wp.sprintf)((0,wp.__)("State: %s"),n()),text:n(),toggleProps:{size:"compact",variant:"tertiary",iconPosition:"right"},children:({onClose:i})=>(0,RP.jsx)(gk.MenuGroup,{label:(0,wp.__)("State"),children:r.map(s=>(0,RP.jsx)(gk.MenuItem,{onClick:()=>{o(s.value),i()},icon:t===s.value?Cs:null,children:s.label},s.value))})})}var AP=l(N(),1),UF=l(w(),1),Bp="__experimentalBorder",$S="shadow",ple=(e,t,o)=>{let r;return e.some(n=>n.colors.some(i=>i[t]===o?(r=i,!0):!1)),r},Cp=({colors:e,namedColor:t,customColor:o})=>{if(t){let n=ple(e,"slug",t);if(n)return n}if(!o)return{color:void 0};let r=ple(e,"color",o);return r||{color:o}};function OP(e){let t=/var:preset\|color\|(.+)/.exec(e);return t&&t[1]?t[1]:null}function ble(e){if((0,jF.__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:Ae(r),borderColor:o}}function kle(e){return(0,jF.__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 OPe({label:e,children:t,resetAllFilter:o}){let r=(0,bk.useCallback)(n=>{let i=kle(n),s=o(i);return{...n,...ble(s)}},[o]);return(0,UF.jsx)(pe,{group:"border",resetAllFilter:r,label:e,children:t})}function vle({clientId:e,name:t,setAttributes:o,settings:r}){let n=pP(r),{style:i,borderColor:s}=(0,gle.useSelect)(d=>{if(!n)return{};let{style:f,borderColor:m}=d(x).getBlockAttributes(e)||{};return{style:f,borderColor:m}},[e,n]),a=(0,bk.useMemo)(()=>kle({style:i,borderColor:s}),[i,s]),c=d=>{o(ble(d))};if(!n)return null;let u={...(0,WS.getBlockSupport)(t,[Bp,"__experimentalDefaultControls"]),...(0,WS.getBlockSupport)(t,[$S,"__experimentalDefaultControls"])};return(0,UF.jsx)(hP,{as:OPe,panelId:e,settings:r,value:a,onChange:c,defaultControls:u})}function LP(e,t="any"){if(bk.Platform.OS!=="web")return!1;let o=(0,WS.getBlockSupport)(e,Bp);return o===!0?!0:t==="any"?!!(o?.color||o?.radius||o?.width||o?.style):!!o?.[t]}function fk({blockName:e,hasBorderControl:t,hasShadowControl:o}={}){let r=ds(e),n=FS(r);return!t&&!o&&e&&(t=n?.hasBorderColor||n?.hasBorderStyle||n?.hasBorderWidth||n?.hasBorderRadius,o=n?.hasShadow),t&&o?(0,AP.__)("Border & Shadow"):o?(0,AP.__)("Shadow"):(0,AP.__)("Border")}function APe(e){return!LP(e,"color")||e.attributes.borderColor?e:{...e,attributes:{...e.attributes,borderColor:{type:"string"}}}}function yle(e,t,o){if(!LP(t,"color")||Ge(t,Bp,"color"))return e;let r=HF(o),n=V(e.className,r);return e.className=n||void 0,e}function HF(e){let{borderColor:t,style:o}=e,r=Bi("border-color",t);return V({"has-border-color":t||o?.border?.color,[r]:!!r})}function LPe({name:e,borderColor:t,style:o}){let{colors:r}=Fd();if(!LP(e,"color")||Ge(e,Bp,"color"))return{};let{color:n}=Cp({colors:r,namedColor:t}),{color:i}=Cp({colors:r,namedColor:OP(o?.border?.top?.color)}),{color:s}=Cp({colors:r,namedColor:OP(o?.border?.right?.color)}),{color:a}=Cp({colors:r,namedColor:OP(o?.border?.bottom?.color)}),{color:c}=Cp({colors:r,namedColor:OP(o?.border?.left?.color)});return yle({style:Ae({borderTopColor:i||n,borderRightColor:s||n,borderBottomColor:a||n,borderLeftColor:c||n})||{}},e,{borderColor:t,style:o})}var GF={useBlockProps:LPe,addSaveProps:yle,attributeKeys:["borderColor","style"],hasSupport(e){return LP(e,"color")}};(0,hle.addFilter)("blocks.registerBlockType","core/border/addAttributes",APe);var YF=l(pt(),1),Lc=l($(),1),tf=l(O(),1),Ple=l(z(),1);var $F=l($(),1),_le=l(z(),1),KF=l(O(),1);var NP=l(w(),1),Ep="background",WF={backgroundSize:"cover",backgroundPosition:"50% 50%"};function KS(e,t="any"){let o=(0,$F.getBlockSupport)(e,Ep);return o===!0?!0:t==="any"?!!o?.backgroundImage||!!o?.backgroundSize||!!o?.backgroundRepeat||!!o?.gradient:!!o?.[t]}function MP(e){if(!e||!e?.backgroundImage?.url)return;let t;return e?.backgroundSize||(t={backgroundSize:WF.backgroundSize}),e?.backgroundSize==="contain"&&!e?.backgroundPosition&&(t={backgroundPosition:WF.backgroundPosition}),t}function NPe({name:e,style:t}){if(!KS(e)||!t?.background?.backgroundImage)return;let o=MP(t?.background);if(o)return{style:{...o}}}function Sle(e){return Jd(e)||FF(e)?"has-background":""}function MPe({children:e,backgroundGradientSupported:t=!1}){let o=(0,KF.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:Ae({...r.style,background:void 0,color:t?{...r.style?.color,gradient:void 0}:r.style?.color})}},[t]);return(0,NP.jsx)(pe,{group:"background",resetAllFilter:o,children:e})}function xle({clientId:e,name:t,setAttributes:o,settings:r}){let{style:n,className:i,inheritedValue:s}=(0,_le.useSelect)(h=>{let{getBlockAttributes:p,getSettings:g}=h(x),b=g(),k=p(e);return{style:k?.style,className:k?.className,inheritedValue:b[Ei]?.blocks?.[t]}},[e,t]),a=KS(t,"gradient"),c=(0,KF.useCallback)(({children:h})=>(0,NP.jsx)(MPe,{backgroundGradientSupported:a,children:h}),[a]);if(!IP(r)||!KS(t))return null;let u=h=>{let p=a&&!!n?.color?.gradient,g={style:Ae(a?{...h,color:{...h?.color,gradient:void 0}}:h)};p&&h?.background?.gradient?g.className=V(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&&KS(t,"backgroundSize")}},m=(0,$F.getBlockSupport)(t,[Ep,"__experimentalDefaultControls"]);return(0,NP.jsx)(PP,{inheritedValue:s,as:c,panelId:e,defaultValues:WF,settings:f,onChange:u,defaultControls:m,value:d})}var wle={useBlockProps:NPe,attributeKeys:["style"],hasSupport:KS};var YS=l(O(),1),Ble=l(z(),1),Ele=l($(),1);var Tle=l(w(),1);function DP(e,t){return e.ownerDocument.defaultView.getComputedStyle(e).getPropertyValue(t)}function Cle(e,t){if(!e||!t)return{};let o=ii(t,"color.text",{fallback:!0}),r=ii(t,"color.background",{fallback:!0}),n=e.querySelector(o)||e,i=e.querySelector(r)||e,s=e.querySelector("a"),a=DP(n,"color"),c=s&&s.textContent?DP(s,"color"):void 0,u=i,d=DP(u,"background-color");for(;d==="rgba(0, 0, 0, 0)"&&u.parentNode&&u.parentNode.nodeType===u.parentNode.ELEMENT_NODE;)u=u.parentNode,d=DP(u,"background-color");return{textColor:a,backgroundColor:d,linkColor:c}}function DPe(e,t){return Object.keys(t).some(r=>e[r]!==t[r])?t:e}function Ile({clientId:e,name:t}){let o=tt(e),[r,n]=(0,YS.useReducer)(DPe,{}),i=(0,Ble.useSelect)(s=>t?s(Ele.store).getBlockType(t):void 0,[t]);return(0,YS.useLayoutEffect)(()=>{!o||!i||window.requestAnimationFrame(()=>window.requestAnimationFrame(()=>n(Cle(o,i))))}),(0,YS.useLayoutEffect)(()=>{if(!o||!i)return;let s=new window.MutationObserver(()=>{n(Cle(o,i))});return s.observe(o,{attributes:!0,attributeFilter:["class","style"]}),()=>{s.disconnect()}},[o,i]),(0,Tle.jsx)(BI,{backgroundColor:r.backgroundColor,textColor:r.textColor,linkColor:r.linkColor,enableAlphaChecker:!0})}var VP=l(w(),1),lr="color",FP=e=>{let t=(0,Lc.getBlockSupport)(e,lr);return t&&(t.link===!0||t.gradient===!0||t.background!==!1||t.text!==!1)},VPe=e=>{if(tf.Platform.OS!=="web")return!1;let t=(0,Lc.getBlockSupport)(e,lr);return t!==null&&typeof t=="object"&&!!t.link},qF=e=>{let t=(0,Lc.getBlockSupport)(e,lr);return t!==null&&typeof t=="object"&&!!t.gradients},FPe=e=>{let t=(0,Lc.getBlockSupport)(e,lr);return t&&t.background!==!1},zPe=e=>{let t=(0,Lc.getBlockSupport)(e,lr);return t&&t.text!==!1};function jPe(e){return FP(e)&&(e.attributes.backgroundColor||Object.assign(e.attributes,{backgroundColor:{type:"string"}}),e.attributes.textColor||Object.assign(e.attributes,{textColor:{type:"string"}}),qF(e)&&!e.attributes.gradient&&Object.assign(e.attributes,{gradient:{type:"string"}})),e}function Rle(e,t,o){if(!FP(t)||Ge(t,lr))return e;let r=qF(t),{backgroundColor:n,textColor:i,gradient:s,style:a}=o,c=g=>!Ge(t,lr,g),u=c("text")?Bi("color",i):void 0,d=c("gradients")?xh(s):void 0,f=c("background")?Bi("background-color",n):void 0,m=c("background")||c("gradients"),h=n||a?.color?.background||r&&(s||a?.color?.gradient),p=V(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 Ole(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:Ae(a),textColor:o,backgroundColor:n,gradient:s}}function Ale(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 UPe({children:e,resetAllFilter:t}){let o=(0,tf.useCallback)(r=>{let n=Ale(r),i=t(n);return{...r,...Ole(i)}},[t]);return(0,VP.jsx)(pe,{group:"color",resetAllFilter:o,children:e})}function zP({clientId:e,name:t,setAttributes:o,settings:r,asWrapper:n,label:i,defaultControls:s}){let a=kP(r),{style:c,textColor:u,backgroundColor:d,gradient:f}=(0,Ple.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,tf.useMemo)(()=>Ale({style:c,textColor:u,backgroundColor:d,gradient:f}),[c,u,d,f]),h=b=>{o(Ole(b))};if(!a)return null;s=s||(0,Lc.getBlockSupport)(t,[lr,"__experimentalDefaultControls"]);let p=tf.Platform.OS==="web"&&!m?.color?.gradient&&(r?.color?.text||r?.color?.link)&&(0,Lc.getBlockSupport)(t,[lr,"enableContrastChecker"])!==!1;return(0,VP.jsx)(vP,{as:n||UPe,panelId:e,settings:r,value:m,onChange:h,defaultControls:s,label:i,enableContrastChecker:(0,Lc.getBlockSupport)(t,[lr,"enableContrastChecker"])!==!1,children:p&&(0,VP.jsx)(Ile,{clientId:e,name:t})})}function HPe({name:e,backgroundColor:t,textColor:o,gradient:r,style:n}){let[i,s,a]=he("color.palette.custom","color.palette.theme","color.palette.default"),c=(0,tf.useMemo)(()=>[...i||[],...s||[],...a||[]],[i,s,a]);if(!FP(e)||Ge(e,lr))return{};let u={};o&&!Ge(e,lr,"text")&&(u.color=va(c,o)?.color),t&&!Ge(e,lr,"background")&&(u.backgroundColor=va(c,t)?.color);let d=Rle({style:u},e,{textColor:o,backgroundColor:t,gradient:r,style:n}),f=t||n?.color?.background||r||n?.color?.gradient;return{...d,className:V(d.className,!f&&Sle(n))}}var ZF={useBlockProps:HPe,addSaveProps:Rle,attributeKeys:["backgroundColor","textColor","gradient","style"],hasSupport:FP},GPe={linkColor:[["style","elements","link","color","text"]],textColor:[["textColor"],["style","color","text"]],backgroundColor:[["backgroundColor"],["style","color","background"]],gradient:[["gradient"],["style","color","gradient"]]};function WPe(e,t,o,r){let n=e.name,i={linkColor:VPe(n),textColor:zPe(n),backgroundColor:FPe(n),gradient:qF(n)};return jP(i,GPe,e,t,o,r)}(0,YF.addFilter)("blocks.registerBlockType","core/color/addAttribute",jPe);(0,YF.addFilter)("blocks.switchToBlockType.transformedBlock","core/color/addTransforms",WPe);var Cr=l(w(),1);function $Pe({blockName:e,clientId:t,contentClientIds:o}){let r=ds(e),{updateBlockAttributes:n}=(0,UP.useDispatch)(x),{hasButtons:i,hasHeading:s}=(0,UP.useSelect)(c=>{let u=c(x).getBlockNamesByClientId(o);return{hasButtons:u.includes("core/buttons"),hasHeading:u.includes("core/heading")}},[o]);return(0,Cr.jsx)(zP,{clientId:t,name:e,settings:r,setAttributes:c=>{n(t,c)},asWrapper:MF,label:(0,kk.__)("Color"),defaultControls:{text:!0,background:!0,button:i,heading:s}})}var KPe=({blockName:e,clientId:t,hasBlockStyles:o,isSectionBlock:r,contentClientIds:n})=>{let i=fk({blockName:e});return(0,Cr.jsxs)(Cr.Fragment,{children:[o&&(0,Cr.jsx)(kb,{clientId:t}),r&&(0,Cr.jsx)($Pe,{blockName:e,clientId:t,contentClientIds:n}),!r&&(0,Cr.jsxs)(Cr.Fragment,{children:[(0,Cr.jsx)(pe.Slot,{group:"color",label:(0,kk.__)("Color"),className:"color-block-support-panel__inner-wrapper"}),(0,Cr.jsx)(pe.Slot,{group:"background",label:(0,kk.__)("Background image"),className:"background-block-support-panel__inner-wrapper"}),(0,Cr.jsx)(pe.Slot,{group:"filter"}),(0,Cr.jsx)(pe.Slot,{group:"typography",label:(0,kk.__)("Typography")}),(0,Cr.jsx)(pe.Slot,{group:"dimensions",label:(0,kk.__)("Dimensions")}),(0,Cr.jsx)(pe.Slot,{group:"border",label:i}),(0,Cr.jsx)(pe.Slot,{group:"styles"})]})]})},Lle=KPe;var Nle=l(A(),1),Mle=l(N(),1);var HP=l($(),1),GP=l(z(),1),hi=l(A(),1);var fs=l(w(),1);function WP({clientIds:e,onSelect:t,onSwitchToListView:o,hasListViewTab:r}){return e.length?(0,fs.jsx)(hi.__experimentalVStack,{spacing:1,children:e.map(n=>(0,fs.jsx)(YPe,{onSelect:t,onSwitchToListView:o,hasListViewTab:r,clientId:n},n))}):null}function YPe({clientId:e,onSelect:t,onSwitchToListView:o,hasListViewTab:r}){let n=It(e),{isSelected:i,childBlocks:s,hasListViewSupport:a,blockName:c}=(0,GP.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,HP.hasBlockSupport)(_,"listView"),blockName:_}},[e]),u=(0,HP.getBlockType)(c),f=yr({clientId:e,context:"list-view"})||u?.title||c,{selectBlock:m}=(0,GP.useDispatch)(x),p=s&&s.length>0&&r&&a;return(0,fs.jsx)(hi.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,fs.jsxs)(hi.Flex,{children:[(0,fs.jsx)(hi.FlexItem,{children:(0,fs.jsx)(Oe,{icon:n?.icon})}),(0,fs.jsx)(hi.FlexBlock,{style:{textAlign:"left"},children:(0,fs.jsx)(hi.__experimentalTruncate,{children:f})}),p&&(0,fs.jsx)(hi.FlexItem,{children:(0,fs.jsx)(we,{icon:Uo,size:24})})]})})}var vk=l(w(),1),qPe=({contentClientIds:e,onSwitchToListView:t,hasListViewTab:o})=>{if(!e||e.length===0)return null;let r=window?.__experimentalContentOnlyInspectorFields;return(0,vk.jsx)(vk.Fragment,{children:!r&&(0,vk.jsx)(Nle.PanelBody,{title:(0,Mle.__)("Content"),children:(0,vk.jsx)(WP,{clientIds:e,onSwitchToListView:t,hasListViewTab:o})})})},$P=qPe;var qo=l(w(),1),{Tabs:of}=F(_k.privateApis);function XF({blockName:e,clientId:t,hasBlockStyles:o,tabs:r,isSectionBlock:n,contentClientIds:i}){let s=(0,ca.useRef)(null),a=(0,yk.useSelect)(_=>_(Dle.store).get("core","showIconLabels"),[]),{requestedTab:c}=(0,yk.useSelect)(_=>({requestedTab:F(_(x)).getRequestedInspectorTab()})),[u,d]=(0,ca.useState)(()=>c?.tabName??r[0]?.name),f=(0,ca.useRef)(!1),m=(0,ca.useRef)(!1),{__unstableSetOpenListViewPanel:h,__unstableIncrementListViewExpandRevision:p,__unstableSetAllListViewPanelsOpen:g}=(0,yk.useDispatch)(x),{clearRequestedInspectorTab:b}=F((0,yk.useDispatch)(x));(0,ca.useEffect)(()=>{f.current=!1},[t]),(0,ca.useEffect)(()=>{c&&(d(c.tabName),c.tabName===Rc.name&&c.options?.openPanel&&(h(c.options.openPanel),p()),m.current=!0,f.current=!0,b())},[c,h,p,b]),(0,ca.useEffect)(()=>{u===Rc.name&&!f.current&&(g(),p())},[t,u,g,p]),(0,ca.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,_===Rc.name&&!m.current&&(g(),p()),m.current=!1},v=r.some(_=>_.name===Rc.name),y=_=>{v&&(h(_),p(),m.current=!0,k(Rc.name))};return(0,qo.jsx)("div",{className:"block-editor-block-inspector__tabs",children:(0,qo.jsxs)(of,{selectedTabId:u,onSelect:k,children:[(0,qo.jsx)(of.TabList,{children:r.map(_=>a?(0,qo.jsx)(of.Tab,{tabId:_.name,children:_.title},_.name):(0,qo.jsx)(_k.Tooltip,{text:_.title,children:(0,qo.jsx)(of.Tab,{tabId:_.name,"aria-label":_.title,children:(0,qo.jsx)(_k.Icon,{icon:_.icon})})},_.name))}),(0,qo.jsxs)(of.TabPanel,{tabId:Z2.name,focusable:!1,children:[(0,qo.jsx)($P,{contentClientIds:i,onSwitchToListView:y,hasListViewTab:v}),(0,qo.jsx)(pe.Slot,{group:"content"})]}),(0,qo.jsxs)(of.TabPanel,{tabId:Rc.name,focusable:!1,children:[(0,qo.jsx)(pe.Slot,{group:"list",ref:s}),(0,qo.jsx)(PE,{listViewRef:s})]}),(0,qo.jsx)(of.TabPanel,{tabId:Y2.name,focusable:!1,children:(0,qo.jsx)(cae,{showAdvancedControls:!!e})}),(0,qo.jsx)(of.TabPanel,{tabId:q2.name,focusable:!1,children:(0,qo.jsx)(Lle,{blockName:e,clientId:t,hasBlockStyles:o,isSectionBlock:n,contentClientIds:i})})]},t)})}var gi=l(A(),1),Vle=l(z(),1);var ZPe=[];function XPe(e,t={}){return t[e]!==void 0?t[e]:t.default!==void 0?t.default:!0}function Fle(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}=Zi,b=(0,gi.__experimentalUseSlotFills)(f.name),k=!!b&&b.length,v=(0,gi.__experimentalUseSlotFills)(c.name),y=!!v&&v.length,S=[...(0,gi.__experimentalUseSlotFills)(s.name)||[],...(0,gi.__experimentalUseSlotFills)(a.name)||[],...(0,gi.__experimentalUseSlotFills)(d.name)||[],...(0,gi.__experimentalUseSlotFills)(h.name)||[],...(0,gi.__experimentalUseSlotFills)(p.name)||[],...(0,gi.__experimentalUseSlotFills)(g.name)||[]].length,C=[...(0,gi.__experimentalUseSlotFills)(pd.slotName)||[],...(0,gi.__experimentalUseSlotFills)(i.name)||[]],B=[...(0,gi.__experimentalUseSlotFills)(u.name)||[],...(0,gi.__experimentalUseSlotFills)(m.name)||[],...k&&S>1?C:[]],P=window?.__experimentalContentOnlyInspectorFields,R=y||!P&&t?.length;R&&n.push(Z2),k&&n.push(Rc),(B.length||C.length&&(R||k))&&n.push(Y2),(r||S)&&n.push(q2);let E=(0,Vle.useSelect)(T=>T(x).getSettings().blockInspectorTabs,[]);return XPe(e,E)?n:ZPe}var zle=l(A(),1);var QF=l(w(),1),{Fill:QPe,Slot:JPe}=(0,zle.createSlotFill)(Symbol("InspectorControlsLastItem")),jle=e=>Ie()[ws]?(0,QF.jsx)(QPe,{...e}):null;jle.Slot=function(t){return(0,QF.jsx)(JPe,{...t})};var KP=jle;var Ule=l(z(),1);function Hle(e){return(0,Ule.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 $le({blockName:e,showAdvancedControls:t=!0,showPositionControls:o=!0,showBindingsControls:r=!0}){let n=fk({blockName:e});return(0,Se.jsxs)(Se.Fragment,{children:[(0,Se.jsx)(pe.Slot,{}),(0,Se.jsx)(pe.Slot,{group:"color",label:(0,Sk.__)("Color"),className:"color-block-support-panel__inner-wrapper"}),(0,Se.jsx)(pe.Slot,{group:"background",label:(0,Sk.__)("Background image"),className:"background-block-support-panel__inner-wrapper"}),(0,Se.jsx)(pe.Slot,{group:"typography",label:(0,Sk.__)("Typography")}),(0,Se.jsx)(pe.Slot,{group:"dimensions",label:(0,Sk.__)("Dimensions")}),(0,Se.jsx)(pe.Slot,{group:"border",label:n}),(0,Se.jsx)(pe.Slot,{group:"styles"}),o&&(0,Se.jsx)(J2,{}),r&&(0,Se.jsx)(pe.Slot,{group:"bindings"}),t&&(0,Se.jsx)("div",{children:(0,Se.jsx)(X2,{})})]})}function eRe(){let{selectedBlockCount:e,renderedBlockName:t,renderedBlockClientId:o,blockType:r,isSectionBlock:n,isSectionBlockInSelection:i,hasBlockStyles:s,editedContentOnlySection:a}=(0,JF.useSelect)(g=>{let{getSelectedBlockClientId:b,getSelectedBlockClientIds:k,getSelectedBlockCount:v,getBlockName:y,getParentSectionBlock:_,isSectionBlock:S,getEditedContentOnlySection:C,isWithinEditedContentOnlySection:B}=F(g(x)),{getBlockStyles:P}=g(rf.store),R=b(),L=B(R)?R:_(R)||R,T=L&&y(L),I=T&&(0,rf.getBlockType)(T),D=k().some(H=>S(H)),U=T&&P(T),j=U&&U.length>0;return{selectedBlockCount:v(),renderedBlockClientId:L,renderedBlockName:T,blockType:I,isSectionBlockInSelection:D,isSectionBlock:S(L),hasBlockStyles:j,editedContentOnlySection:C()}},[]),c=(0,JF.useSelect)(g=>{if(!n||!o)return[];let{getClientIdsOfDescendants:b,getBlockName:k,getBlockEditingMode:v}=F(g(x)),y=b(o),_=new Set;return y.forEach(S=>{let C=k(S);(C==="core/navigation"||(0,rf.hasBlockSupport)(C,"listView"))&&b(S).forEach(P=>_.add(P))}),y.filter(S=>!_.has(S)&&v(S)==="contentOnly")},[n,o]),u=Fle(r?.name,c,n,s),d=u?.length>1,f=Hle(r),m=e>1;if(m&&!i)return(0,Se.jsxs)("div",{className:"block-editor-block-inspector",children:[(0,Se.jsx)(IF,{}),d?(0,Se.jsx)(XF,{tabs:u}):(0,Se.jsx)($le,{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)(IF,{})});let h=t===(0,rf.getUnregisteredTypeHandlerName)();return!r||!o||h?(0,Se.jsx)("span",{className:"block-editor-block-inspector__no-blocks",children:(0,Sk.__)("No block selected.")}):(0,Se.jsx)(tRe,{animate:f,wrapper:g=>(0,Se.jsx)(oRe,{blockInspectorAnimationSettings:f,renderedBlockClientId:o,children:g}),children:(0,Se.jsx)(rRe,{renderedBlockClientId:o,blockName:r.name,isSectionBlock:n,availableTabs:u,contentClientIds:c,hasBlockStyles:s,editedContentOnlySection:a})})}var tRe=({animate:e,wrapper:t,children:o})=>e?t(o):o,oRe=({blockInspectorAnimationSettings:e,renderedBlockClientId:t,children:o})=>{let r=e&&e.enterDirection==="leftToRight"?-50:50;return(0,Se.jsx)(Gle.__unstableMotion.div,{animate:{x:0,opacity:1,transition:{ease:"easeInOut",duration:.14}},initial:{x:r,opacity:0},children:o},t)},rRe=({renderedBlockClientId:e,blockName:t,isSectionBlock:o,availableTabs:r,contentClientIds:n,hasBlockStyles:i,editedContentOnlySection:s})=>{let a=(0,Wle.useRef)(null),c=r?.length>1,u=s&&s!==e,d=It(s),f=It(e),m=f.isSynced;return(0,Se.jsxs)("div",{className:"block-editor-block-inspector",children:[u&&(0,Se.jsx)(Hy,{...d,className:d?.isSynced&&"is-synced",parentClientId:s}),(0,Se.jsx)(Hy,{...f,allowParentNavigation:!0,className:m&&"is-synced",isChild:u,clientId:e}),(0,Se.jsx)(pG,{clientId:e}),(0,Se.jsx)(eae,{clientId:e}),(0,Se.jsx)(vI,{blockClientId:e}),c&&(0,Se.jsx)(Se.Fragment,{children:(0,Se.jsx)(XF,{hasBlockStyles:i,clientId:e,blockName:t,tabs:r,isSectionBlock:o,contentClientIds:n})}),!c&&(0,Se.jsxs)(Se.Fragment,{children:[i&&(0,Se.jsx)(kb,{clientId:e}),(0,Se.jsx)($P,{contentClientIds:n}),(0,Se.jsx)(pe.Slot,{group:"content"}),(0,Se.jsx)(pe.Slot,{group:"list",ref:a}),(0,Se.jsx)(PE,{listViewRef:a}),!o&&(0,Se.jsx)($le,{blockName:t})]}),(0,Se.jsx)(KP.Slot,{}),(0,Se.jsx)($2,{},"back")]})},Kle=eRe;var e6=l(Pe(),1);var Yle=l(w(),1),qle=()=>((0,e6.default)("__unstableUseClipboardHandler",{alternative:"BlockCanvas or WritingFlow",since:"6.4",version:"6.7"}),$y());function Zle(e){return(0,e6.default)("CopyHandler",{alternative:"BlockCanvas or WritingFlow",since:"6.4",version:"6.7"}),(0,Yle.jsx)("div",{...e,ref:$y()})}var Xle=l(z(),1),t6=l(O(),1);var o6=l(w(),1),nRe=()=>{};function iRe({rootClientId:e,clientId:t,isAppender:o,showInserterHelpPanel:r,showMostUsedBlocks:n=!1,__experimentalInsertionIndex:i,__experimentalInitialTab:s,__experimentalInitialCategory:a,__experimentalFilterValue:c,onPatternCategorySelection:u,onSelect:d=nRe,shouldFocusBlock:f=!1,onClose:m},h){let{destinationRootClientId:p}=(0,Xle.useSelect)(g=>{let{getBlockRootClientId:b}=g(x);return{destinationRootClientId:e||b(t)||void 0}},[t,e]);return(0,o6.jsx)(zV,{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 r6=(0,t6.forwardRef)(iRe);function sRe(e,t){return(0,o6.jsx)(r6,{...e,onPatternCategorySelection:void 0,ref:t})}var Qle=(0,t6.forwardRef)(sRe);var Jle=l(Pe(),1);function ece(){return(0,Jle.default)("wp.blockEditor.MultiSelectScrollIntoView",{hint:"This behaviour is now built-in.",since:"5.8"}),null}var tce=l(X(),1),qS=l(Fe(),1),oce=l(z(),1),nf=l(ct(),1);var rce=l(w(),1),aRe=window.navigator.userAgent.indexOf("Trident")!==-1,lRe=new Set([nf.UP,nf.DOWN,nf.LEFT,nf.RIGHT]),cRe=.75;function n6(){let e=(0,oce.useSelect)(t=>t(x).hasSelectedBlock(),[]);return(0,tce.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,qS.computeCaretRect)(r);if(!b)return;if(!s){s=b;return}if(lRe.has(g)){s=b;return}let k=b.top-s.top;if(k===0)return;let v=(0,qS.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<cRe&&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,qS.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 uRe({children:e}){return(0,rce.jsx)("div",{ref:n6(),className:"block-editor__typewriter",children:e})}var dRe=aRe?e=>e.children:uRe,nce=dRe;var Tp=l(O(),1),i6=l(Pe(),1);var s6=l(w(),1),YP=(0,Tp.createContext)({});YP.displayName="RenderedRefsContext";function fRe(e,t,o){let r={...e,[t]:e[t]?new Set(e[t]):new Set};return r[t].add(o),r}function a6({children:e,uniqueId:t,blockName:o=""}){let r=(0,Tp.useContext)(YP),{name:n}=Ie();o=o||n;let i=(0,Tp.useMemo)(()=>fRe(r,o,t),[r,o,t]);return(0,s6.jsx)(YP.Provider,{value:i,children:e})}function l6(e,t=""){let o=(0,Tp.useContext)(YP),{name:r}=Ie();return t=t||r,!!o[t]?.has(e)}var ice=e=>((0,i6.default)("wp.blockEditor.__experimentalRecursionProvider",{since:"6.5",alternative:"wp.blockEditor.RecursionProvider"}),(0,s6.jsx)(a6,{...e})),sce=(...e)=>((0,i6.default)("wp.blockEditor.__experimentalUseHasRecursion",{since:"6.5",alternative:"wp.blockEditor.useHasRecursion"}),l6(...e));var ZP=l(A(),1),c6=l(N(),1),u6=l(O(),1),lce=l(Cc(),1);var bi=l(A(),1);var ace=l(N(),1),Nc=l(w(),1);function qP({title:e,help:t,actions:o=[],onClose:r}){return(0,Nc.jsxs)(bi.__experimentalVStack,{className:"block-editor-inspector-popover-header",spacing:4,children:[(0,Nc.jsxs)(bi.__experimentalHStack,{alignment:"center",children:[(0,Nc.jsx)(bi.__experimentalHeading,{className:"block-editor-inspector-popover-header__heading",level:2,size:13,children:e}),(0,Nc.jsx)(bi.__experimentalSpacer,{}),o.map(({label:n,icon:i,onClick:s})=>(0,Nc.jsx)(bi.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,Nc.jsx)(bi.Button,{size:"small",className:"block-editor-inspector-popover-header__action",label:(0,ace.__)("Close"),icon:Hf,onClick:r})]}),t&&(0,Nc.jsx)(bi.__experimentalText,{children:t})]})}var xk=l(w(),1);function mRe({onClose:e,onChange:t,showPopoverHeaderActions:o,isCompact:r,currentDate:n,title:i,...s},a){let c={startOfWeek:(0,lce.getSettings)().l10n.startOfWeek,onChange:t,currentDate:r?void 0:n,currentTime:r?n:void 0,...s},u=r?ZP.TimePicker:ZP.DateTimePicker;return(0,xk.jsxs)("div",{ref:a,className:"block-editor-publish-date-time-picker",children:[(0,xk.jsx)(qP,{title:i||(0,c6.__)("Publish"),actions:o?[{label:(0,c6.__)("Now"),onClick:()=>t?.(null)}]:void 0,onClose:e}),(0,xk.jsx)(u,{...c})]})}var d6=(0,u6.forwardRef)(mRe);function pRe(e,t){return(0,xk.jsx)(d6,{...e,showPopoverHeaderActions:!0,isCompact:!1,ref:t})}var cce=(0,u6.forwardRef)(pRe);var XP=l(z(),1),uce=l(O(),1);function po(e){let t=Ie(),{clientId:o=""}=t,{setBlockEditingMode:r,unsetBlockEditingMode:n}=(0,XP.useDispatch)(x),i=(0,XP.useSelect)(s=>o?null:s(x).getBlockEditingMode(),[o]);return(0,uce.useEffect)(()=>(e&&r(o,e),()=>{e&&n(o)}),[o,e,r,n]),o?t[F0]:i}var dce=l(Pe(),1),fce=l(O(),1);function hRe(){return(0,dce.default)("wp.blockEditor.ToolSelector",{since:"6.9",hint:"The ToolSelector component no longer renders anything."}),null}var mce=(0,fce.forwardRef)(hRe);var XS=l(w(),1),Ae=e=>{if(e===null||typeof e!="object"||Array.isArray(e))return e;let t=Object.entries(e).map(([o,r])=>[o,Ae(r)]).filter(([,o])=>o!==void 0);return t.length?Object.fromEntries(t):void 0};function jP(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=El(s,d);f&&(a={...a,attributes:me(a.attributes,d,f)})})}),a}function Ge(e,t,o){let n=(0,pce.getBlockSupport)(e,t)?.__experimentalSkipSerialization;return Array.isArray(n)?n.includes(o):n}var Mc=new WeakMap;function oi({id:e,css:t}){return dc({id:e,css:t})}function dc({id:e,css:t,assets:o,__unstableType:r,variation:n,clientId:i}={}){let{setStyleOverride:s,deleteStyleOverride:a}=F((0,QP.useDispatch)(x)),c=(0,QP.useRegistry)(),u=(0,ms.useId)();(0,ms.useEffect)(()=>{if(!t&&!o)return;let d=e||u,f={id:e,css:t,assets:o,__unstableType:r,variation:n,clientId:i};return Mc.get(c)||Mc.set(c,[]),Mc.get(c).push([d,f]),window.queueMicrotask(()=>{Mc.get(c)?.length&&c.batch(()=>{Mc.get(c).forEach(m=>{s(...m)}),Mc.set(c,[])})}),()=>{Mc.get(c)?.find(([h])=>h===d)?Mc.set(c,Mc.get(c).filter(([h])=>h!==d)):a(d)}},[e,t,i,o,r,u,s,a,c,n])}function ds(e,t){let[o,r,n,i,s,a,c,u,d,f,m,h,p,g,b,k,v,y,_,S,C,B,P,R,E,L,T,I,M,D,U,j,H,G,Q,ie,ce,te,ne,Z,Y,J,K,ee,re,W,ae,ge,fe,xe,De,st,Lt,no,jo,at,dr,$t,io,Ue,Kt,Je]=he("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.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"),He=(0,ms.useMemo)(()=>({background:{backgroundImage:o,backgroundSize:r,gradient:n},color:{palette:{custom:K,theme:re,default:W},gradients:{custom:st,theme:Lt,default:no},duotone:{custom:fe,theme:xe,default:De},defaultGradients:jo,defaultPalette:ae,defaultDuotone:ge,custom:J,customGradient:at,customDuotone:ee,background:dr,link:$t,heading:Ue,button:Kt,text:io},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:T,default:I,theme:M},customSpacingSize:L,defaultSpacingSizes:E,padding:B,margin:P,blockGap:R,units:D},border:{color:ce,radius:te,style:ne,width:Z,radiusSizes:Y},dimensions:{aspectRatio:U,height:j,minHeight:H,width:G,dimensionSizes:Q},layout:ie,parentLayout:t,shadow:Je}),[o,r,n,i,s,a,c,u,d,f,m,h,p,g,b,k,v,y,S,C,_,B,P,R,E,L,T,I,M,D,U,j,H,G,Q,ie,t,ce,te,ne,Z,Y,J,K,ee,re,W,ae,ge,fe,xe,De,st,Lt,no,jo,at,dr,$t,io,Ue,Kt,Je]);return oP(He,e)}function hce(e){e=e.map(o=>({...o,Edit:(0,ms.memo)(o.edit)}));let t=(0,f6.createHigherOrderComponent)(o=>function(n){let i=Ie();return[...e.map((s,a)=>{let{Edit:c,hasSupport:u,attributeKeys:d=[],shareWithChildBlocks:f,supportsPatternEditing:m}=s;if(!(m&&i[nu]||i[ws]||i[Qp]&&f)||!u(n.name))return null;let p={};for(let g of d)n.attributes[g]&&(p[g]=n.attributes[g]);return(0,XS.jsx)(c,{name:n.name,isSelected:n.isSelected,clientId:n.clientId,setAttributes:n.setAttributes,__unstableParentLayout:n.__unstableParentLayout,...p},a)}),(0,XS.jsx)(o,{...n},"edit")]},"withBlockEditHooks");(0,ZS.addFilter)("editor.BlockEdit","core/editor/hooks",t)}function gRe({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,ms.useEffect)(()=>(i(n),()=>{i(void 0)})),null}var bRe=(0,ms.memo)(gRe);function gce(e){let t=(0,f6.createHigherOrderComponent)(o=>function(n){let[i,s]=(0,ms.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,XS.jsx)(bRe,{index:c,useBlockProps:f,setAllWrapperProps:s,name:n.name,clientId:n.clientId,...h},c)}),(0,XS.jsx)(o,{...n,wrapperProps:i.filter(Boolean).reduce((a,c)=>({...a,...c,className:V(a.className,c.className),style:{...a.style,...c.style}}),n.wrapperProps||{})},"edit")]},"withBlockListBlockHooks");(0,ZS.addFilter)("editor.BlockListBlock","core/editor/hooks",t)}function bce(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,ZS.addFilter)("blocks.getSaveContent.extraProps","core/editor/hooks",t,0),(0,ZS.addFilter)("blocks.getSaveContent.extraProps","core/editor/hooks",o=>(o.hasOwnProperty("className")&&!o.className&&delete o.className,o))}var kce=l($(),1),vce=l(pt(),1);function kRe(e){let{apiVersion:t=1}=e;return t<2&&(0,kce.hasBlockSupport)(e,"lightBlockWrapper",!1)&&(e.apiVersion=2),e}(0,vce.addFilter)("blocks.registerBlockType","core/compat/migrateLightBlockWrapper",kRe);function yce(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})})};vRe=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=>{yce(c)}),["SOURCE","SCRIPT","VIDEO","LINK"].includes(a.nodeName)&&yce(a))})})})});e()}var vRe;var _ce=l(pt(),1),ps=l($(),1);var m6=l(w(),1),p6=["left","center","right","wide","full"],yRe=["wide","full"];function h6(e,t=!0,o=!0){let r;return Array.isArray(e)?r=p6.filter(n=>e.includes(n)):e===!0?r=[...p6]:r=[],!o||e===!0&&!t?r.filter(n=>!yRe.includes(n)):r}function _Re(e){return"type"in(e.attributes?.align??{})||(0,ps.hasBlockSupport)(e,"align")&&(e.attributes={...e.attributes,align:{type:"string",enum:[...p6,""]}}),e}function SRe({name:e,align:t,setAttributes:o}){let r=h6((0,ps.getBlockSupport)(e,"align"),(0,ps.hasBlockSupport)(e,"alignWide",!0)),n=fy(r).map(({name:a})=>a),i=po();return!n.length||i!=="default"?null:(0,m6.jsx)(Dt,{group:"block",__experimentalShareWithChildBlocks:!0,children:(0,m6.jsx)(VC,{value:t,onChange:a=>{a||(0,ps.getBlockType)(e)?.attributes?.align?.default&&(a=""),o({align:a})},controls:n})})}var JP={shareWithChildBlocks:!0,edit:SRe,useBlockProps:xRe,addSaveProps:wRe,attributeKeys:["align"],hasSupport(e){return(0,ps.hasBlockSupport)(e,"align",!1)}};function xRe({name:e,align:t}){let o=h6((0,ps.getBlockSupport)(e,"align"),(0,ps.hasBlockSupport)(e,"alignWide",!0));return fy(o).some(n=>n.name===t)?{"data-align":t}:{}}function wRe(e,t,o){let{align:r}=o,n=(0,ps.getBlockSupport)(t,"align"),i=(0,ps.hasBlockSupport)(t,"alignWide",!0);return h6(n,i).includes(r)&&(e.className=V(`align${r}`,e.className)),e}(0,_ce.addFilter)("blocks.registerBlockType","core/editor/align/addAttribute",_Re);var Sce=l(pt(),1);function CRe(e){return"type"in(e.attributes?.lock??{})||(e.attributes={...e.attributes,lock:{type:"object"}}),e}(0,Sce.addFilter)("blocks.registerBlockType","core/lock/addAttribute",CRe);var y6=l(pt(),1),Tk=l($(),1);var QS=l(A(),1),oR=l(N(),1),Lce=l(O(),1),Nce=l(z(),1),rR=l($(),1);var Nn=l(A(),1),Rce=l(O(),1),Ek=l(N(),1),Oce=l(z(),1);var k6=l($(),1),Tce=l(z(),1),Bk=l(A(),1),ua=l(N(),1),eR=l(O(),1),Ice=l(X(),1),Pce=l(er(),1);var g6=l(O(),1),Cce=l(X(),1),Bce=l(A(),1);var xce=l(A(),1);var wk=l(w(),1);function BRe({blockTypes:e,value:t,onItemChange:o}){return(0,wk.jsx)("ul",{className:"block-editor-block-manager__checklist",children:e.map(r=>(0,wk.jsxs)("li",{className:"block-editor-block-manager__checklist-item",children:[(0,wk.jsx)(xce.CheckboxControl,{label:r.title,checked:t.includes(r.name),onChange:(...n)=>o(r,...n)}),(0,wk.jsx)(Oe,{icon:r.icon})]},r.name))})}var wce=BRe;var Ck=l(w(),1);function Ece({title:e,blockTypes:t,selectedBlockTypes:o,onChange:r}){let n=(0,Cce.useInstanceId)(Ece),i=(0,g6.useCallback)((f,m)=>{r(m?[...o,f]:o.filter(({name:h})=>h!==f.name))},[o,r]),s=(0,g6.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,Ck.jsxs)("div",{role:"group","aria-labelledby":c,className:"block-editor-block-manager__category",children:[(0,Ck.jsx)(Bce.CheckboxControl,{checked:u,onChange:s,className:"block-editor-block-manager__category-title",indeterminate:d,label:(0,Ck.jsx)("span",{id:c,children:e})}),(0,Ck.jsx)(wce,{blockTypes:t,value:a,onItemChange:i})]})}var b6=Ece;var Dc=l(w(),1);function tR({blockTypes:e,selectedBlockTypes:t,onChange:o,showSelectAll:r=!0}){let n=(0,Ice.useDebounce)(Pce.speak,500),[i,s]=(0,eR.useState)(""),{categories:a,isMatchingSearchTerm:c}=(0,Tce.useSelect)(m=>({categories:m(k6.store).getCategories(),isMatchingSearchTerm:m(k6.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,eR.useEffect)(()=>{if(!i)return;let m=u.length,h=(0,ua.sprintf)((0,ua._n)("%d result found.","%d results found.",m),m);n(h)},[u?.length,i,n]),(0,Dc.jsxs)(Bk.__experimentalVStack,{className:"block-editor-block-manager__content",spacing:4,children:[(0,Dc.jsx)(Bk.SearchControl,{label:(0,ua.__)("Search for a block"),placeholder:(0,ua.__)("Search for a block"),value:i,onChange:m=>s(m),className:"block-editor-block-manager__search"}),r&&(0,Dc.jsx)(Bk.CheckboxControl,{className:"block-editor-block-manager__select-all",label:(0,ua.__)("Select all"),checked:f,onChange:()=>{o(f?[]:e)},indeterminate:d}),(0,Dc.jsxs)("div",{tabIndex:"0",role:"region","aria-label":(0,ua.__)("Available block types"),className:"block-editor-block-manager__results",children:[u.length===0&&(0,Dc.jsx)("p",{className:"block-editor-block-manager__no-results",children:(0,ua.__)("No blocks found.")}),a.map(m=>(0,Dc.jsx)(b6,{title:m.title,blockTypes:u.filter(h=>h.category===m.slug),selectedBlockTypes:t,onChange:o},m.slug)),(0,Dc.jsx)(b6,{title:(0,ua.__)("Uncategorized"),blockTypes:u.filter(({category:m})=>!m),selectedBlockTypes:t,onChange:o})]})]})}var da=l(w(),1);function Ace({clientId:e,blockTypes:t,selectedBlockTypes:o,onClose:r}){let[n,i]=(0,Rce.useState)(o),{updateBlockAttributes:s}=(0,Oce.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,da.jsx)(Nn.Modal,{title:(0,Ek._x)("Manage allowed blocks","modal title"),onRequestClose:r,overlayClassName:"block-editor-block-allowed-blocks-modal",focusOnMount:"firstContentElement",size:"medium",children:(0,da.jsxs)(Nn.__experimentalVStack,{as:"form",onSubmit:c=>{c.preventDefault(),a()},spacing:"4",children:[(0,da.jsx)(Nn.__experimentalText,{children:(0,Ek.__)("Select which blocks can be added inside this container.")}),(0,da.jsx)(tR,{blockTypes:t,selectedBlockTypes:n,onChange:c=>{i(c)}}),(0,da.jsxs)(Nn.Flex,{className:"block-editor-block-allowed-blocks-modal__actions",justify:"flex-end",expanded:!1,children:[(0,da.jsx)(Nn.FlexItem,{children:(0,da.jsx)(Nn.Button,{variant:"tertiary",onClick:r,__next40pxDefaultSize:!0,children:(0,Ek.__)("Cancel")})}),(0,da.jsx)(Nn.FlexItem,{children:(0,da.jsx)(Nn.Button,{variant:"primary",type:"submit",__next40pxDefaultSize:!0,children:(0,Ek.__)("Apply")})})]})]})})}var Ip=l(w(),1);function Mce({clientId:e}){let[t,o]=(0,Lce.useState)(!1),{blockTypes:r,selectedBlockNames:n}=(0,Nce.useSelect)(a=>{let{getBlockAttributes:c}=a(x);return{blockTypes:a(rR.store).getBlockTypes(),selectedBlockNames:c(e)?.allowedBlocks}},[e]),i=r.filter(a=>(0,rR.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,Ip.jsxs)("div",{className:"block-editor-block-allowed-blocks-control",children:[(0,Ip.jsxs)(QS.BaseControl,{help:(0,oR.__)("Specify which blocks are allowed inside this container."),children:[(0,Ip.jsx)(QS.BaseControl.VisualLabel,{children:(0,oR.__)("Allowed Blocks")}),(0,Ip.jsx)(QS.Button,{__next40pxDefaultSize:!0,variant:"secondary",onClick:()=>{o(!0)},className:"block-editor-block-allowed-blocks-control__button",children:(0,oR.__)("Manage allowed blocks")})]}),t&&(0,Ip.jsx)(Ace,{clientId:e,blockTypes:i,selectedBlockTypes:s,onClose:()=>o(!1)})]})}var v6=l(w(),1);function ERe({clientId:e}){return po()==="contentOnly"?null:(0,v6.jsx)(I_.Fill,{children:(0,v6.jsx)(Mce,{clientId:e})})}var Dce={edit:ERe,attributeKeys:["allowedBlocks"],hasSupport(e){return(0,Tk.hasBlockSupport)(e,"allowedBlocks")}};function TRe(e){return e?.attributes?.allowedBlocks?.type||(0,Tk.hasBlockSupport)(e,"allowedBlocks")&&(e.attributes={...e.attributes,allowedBlocks:{type:"array"}}),e}(0,y6.addFilter)("blocks.registerBlockType","core/allowedBlocks/attribute",TRe);function IRe(e,t,o,r){if(!(0,Tk.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,Tk.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,y6.addFilter)("blocks.switchToBlockType.transformedBlock","core/allowedBlocks/addTransforms",IRe);var Vce=l(pt(),1),nR=l(A(),1),Ik=l(N(),1),iR=l($(),1),Fce=l(O(),1);var nl=l(w(),1),PRe=/[\s#]/g;function RRe(e){return"type"in(e.attributes?.anchor??{})||(0,iR.hasBlockSupport)(e,"anchor")&&(e.attributes={...e.attributes,anchor:{type:"string"}}),e}function ORe({anchor:e,setAttributes:t}){if(po()!=="default")return null;let r=Fce.Platform.OS==="web";return(0,nl.jsx)(pe,{group:"advanced",children:(0,nl.jsx)(nR.TextControl,{__next40pxDefaultSize:!0,className:"html-anchor-control",label:(0,Ik.__)("HTML anchor"),help:(0,nl.jsxs)(nl.Fragment,{children:[(0,Ik.__)("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,nl.jsxs)(nl.Fragment,{children:[" ",(0,nl.jsx)(nR.ExternalLink,{href:(0,Ik.__)("https://wordpress.org/documentation/article/page-jumps/"),children:(0,Ik.__)("Learn more about anchors")})]})]}),value:e||"",placeholder:r?null:(0,Ik.__)("Add an anchor"),onChange:n=>{n=n.replace(PRe,"-"),t({anchor:n!==""?n:void 0})},autoCapitalize:"none",autoComplete:"off"})})}var _6={addSaveProps:ARe,edit:ORe,attributeKeys:["anchor"],hasSupport(e){return(0,iR.hasBlockSupport)(e,"anchor")}};function ARe(e,t,o){return(0,iR.hasBlockSupport)(t,"anchor")&&(e.id=o.anchor===""?null:o.anchor),e}(0,Vce.addFilter)("blocks.registerBlockType","core/anchor/attribute",RRe);var zce=l(pt(),1),sR=l($(),1);function LRe(e){return e?.attributes?.ariaLabel?.type||(0,sR.hasBlockSupport)(e,"ariaLabel")&&(e.attributes={...e.attributes,ariaLabel:{type:"string"}}),e}function NRe(e,t,o){return(0,sR.hasBlockSupport)(t,"ariaLabel")&&!Ge(t,"ariaLabel","ariaLabel")&&(e["aria-label"]=o.ariaLabel===""?null:o.ariaLabel),e}var jce={addSaveProps:NRe,attributeKeys:["ariaLabel"],hasSupport(e){return(0,sR.hasBlockSupport)(e,"ariaLabel")}};(0,zce.addFilter)("blocks.registerBlockType","core/ariaLabel/attribute",LRe);var qk=l($(),1),Zme=l(X(),1),wO=l(A(),1),CO=l(z(),1);var Pp=l(je(),1);function Uce({controlled:e,default:t,name:o,state:r="value"}){let{current:n}=Pp.useRef(e!==void 0),[i,s]=Pp.useState(t),a=n?e:i,c=Pp.useCallback(u=>{n||s(u)},[]);return[a,c]}var x6=l(je(),1);var Gce=l(je(),1),Hce={};function Rp(e,t){let o=Gce.useRef(Hce);return o.current===Hce&&(o.current=e(t)),o}var S6=x6[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],MRe=S6&&S6!==x6.useLayoutEffect?S6:e=>e();function hs(e){let t=Rp(DRe).current;return t.next=e,MRe(t.effect),t.trampoline}function DRe(){let e={next:void 0,callback:VRe,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function VRe(){}var Wce=l(je(),1),FRe=()=>{},Br=typeof document<"u"?Wce.useLayoutEffect:FRe;function zRe(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 jRe=zRe("https://base-ui.com/production-error","Base UI"),Pk=jRe;var Op=l(je(),1);function JS(e,t,o,r){let n=Rp(Kce).current;return URe(n,e,t,o,r)&&Yce(n,[e,t,o,r]),n.callback}function $ce(e){let t=Rp(Kce).current;return HRe(t,e)&&Yce(t,e),t.callback}function Kce(){return{callback:null,cleanup:null,refs:[]}}function URe(e,t,o,r,n){return e.refs[0]!==t||e.refs[1]!==o||e.refs[2]!==r||e.refs[3]!==n}function HRe(e,t){return e.refs.length!==t.length||e.refs.some((o,r)=>o!==t[r])}function Yce(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 Xce=l(je(),1);var qce=l(je(),1),GRe=parseInt(qce.version,10);function Zce(e){return GRe>=e}function w6(e){if(!Xce.isValidElement(e))return null;let t=e,o=t.props;return(Zce(19)?o?.ref:t.ref)??null}function e0(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function Qce(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 Jce(e,t){return typeof e=="function"?e(t):e}function eue(e,t){return typeof e=="function"?e(t):e}var o0={};function cr(e,t,o,r,n){let i={...C6(e,o0)};return t&&(i=t0(i,t)),o&&(i=t0(i,o)),r&&(i=t0(i,r)),n&&(i=t0(i,n)),i}function tue(e){if(e.length===0)return o0;if(e.length===1)return C6(e[0],o0);let t={...C6(e[0],o0)};for(let o=1;o<e.length;o+=1)t=t0(t,e[o]);return t}function t0(e,t){return oue(t)?t(e):WRe(e,t)}function WRe(e,t){if(!t)return e;for(let o in t){let r=t[o];switch(o){case"style":{e[o]=e0(e.style,r);break}case"className":{e[o]=B6(e.className,r);break}default:$Re(o,r)?e[o]=KRe(e[o],r):e[o]=r}}return e}function $Re(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 oue(e){return typeof e=="function"}function C6(e,t){return oue(e)?e(t):e??o0}function KRe(e,t){return t?e?o=>{if(YRe(o)){let n=o;aR(n);let i=t(n);return n.baseUIHandlerPrevented||e?.(n),i}let r=t(o);return e?.(o),r}:t:e}function aR(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function B6(e,t){return t?e?t+" "+e:t:e}function YRe(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}var qRe=Object.freeze([]),il=Object.freeze({});var ZRe="data-base-ui-swipe-ignore",XRe="data-swipe-ignore",jkt=`[${ZRe}]`,Ukt=`[${XRe}]`;var E6=l(je(),1);function sf(e,t,o={}){let r=t.render,n=QRe(t,o);if(o.enabled===!1)return null;let i=o.state??il;return eOe(e,r,n,i)}function QRe(e,t={}){let{className:o,style:r,render:n}=e,{state:i=il,ref:s,props:a,stateAttributesMapping:c,enabled:u=!0}=t,d=u?Jce(o,i):void 0,f=u?eue(r,i):void 0,m=u?Qce(i,c):il,h=u?e0(m,Array.isArray(a)?tue(a):a)??il:il;return typeof document<"u"&&(u?Array.isArray(s)?h.ref=$ce([h.ref,w6(n),...s]):h.ref=JS(h.ref,w6(n),s):JS(null,null)),u?(d!==void 0&&(h.className=B6(h.className,d)),f!==void 0&&(h.style=e0(h.style,f)),h):il}var JRe=Symbol.for("react.lazy");function eOe(e,t,o,r){if(t){if(typeof t=="function")return t(o,r);let n=cr(o,t.props);n.ref=o.ref;let i=t;return i?.$$typeof===JRe&&(i=Op.Children.toArray(t)[0]),Op.cloneElement(i,n)}if(e&&typeof e=="string")return tOe(e,o);throw new Error(Pk(8))}function tOe(e,t){return e==="button"?(0,E6.createElement)("button",{type:"button",...t,key:t.key}):e==="img"?(0,E6.createElement)("img",{alt:"",...t,key:t.key}):Op.createElement(e,t)}var Rk={};ka(Rk,{cancelOpen:()=>IOe,chipRemovePress:()=>dOe,clearPress:()=>uOe,closePress:()=>lOe,closeWatcher:()=>SOe,decrementPress:()=>pOe,disabled:()=>ROe,drag:()=>BOe,escapeKey:()=>_Oe,focusOut:()=>yOe,imperativeAction:()=>OOe,incrementPress:()=>mOe,inputBlur:()=>bOe,inputChange:()=>hOe,inputClear:()=>gOe,inputPaste:()=>kOe,inputPress:()=>vOe,itemPress:()=>aOe,keyboard:()=>wOe,linkPress:()=>cOe,listNavigation:()=>xOe,none:()=>oOe,outsidePress:()=>sOe,pointer:()=>COe,scrub:()=>TOe,siblingOpen:()=>POe,swipe:()=>AOe,trackPress:()=>fOe,triggerFocus:()=>iOe,triggerHover:()=>nOe,triggerPress:()=>rOe,wheel:()=>EOe,windowResize:()=>LOe});var oOe="none",rOe="trigger-press",nOe="trigger-hover",iOe="trigger-focus",sOe="outside-press",aOe="item-press",lOe="close-press",cOe="link-press",uOe="clear-press",dOe="chip-remove-press",fOe="track-press",mOe="increment-press",pOe="decrement-press",hOe="input-change",gOe="input-clear",bOe="input-blur",kOe="input-paste",vOe="input-press",yOe="focus-out",_Oe="escape-key",SOe="close-watcher",xOe="list-navigation",wOe="keyboard",COe="pointer",BOe="drag",EOe="wheel",TOe="scrub",IOe="cancel-open",POe="sibling-open",ROe="disabled",OOe="imperative-action",AOe="swipe",LOe="window-resize";function lR(e,t,o,r){let n=!1,i=!1,s=r??il;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 cR=l(je(),1);var NOe=l(je(),1),rue={...NOe};var nue=0;function MOe(e,t="mui"){let[o,r]=cR.useState(e),n=e||o;return cR.useEffect(()=>{o==null&&(nue+=1,r(`${t}-${nue}`))},[o,t]),n}var iue=rue.useId;function sue(e,t){if(iue!==void 0){let o=iue();return e??(t?`${t}-${o}`:o)}return MOe(e,t)}function aue(e){return sue(e,"base-ui")}var ki=l(je(),1);var uue=l(m5(),1);var lue=l(je(),1),DOe=[];function uR(e){lue.useEffect(e,DOe)}var dR=null,fvt=globalThis.requestAnimationFrame,T6=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)}},fR=new T6,eo=class e{static create(){return new e}static request(t){return fR.request(t)}static cancel(t){return fR.cancel(t)}currentId=dR;request(t){this.cancel(),this.currentId=fR.request(()=>{this.currentId=dR,t()})}cancel=()=>{this.currentId!==dR&&(fR.cancel(this.currentId),this.currentId=dR)};disposeEffect=()=>this.cancel};function mR(){let e=Rp(eo.create).current;return uR(e.disposeEffect),e}function cue(e){return e==null?e:"current"in e?e.current:e}var Ap=(function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e})({}),VOe={[Ap.startingStyle]:""},FOe={[Ap.endingStyle]:""},pR={transitionStatus(e){return e==="starting"?VOe:e==="ending"?FOe:null}};function hR(e,t=!1,o=!0){let r=mR();return hs((n,i=null)=>{r.cancel();function s(){uue.flushSync(n)}let a=cue(e);if(a==null)return;let c=a;if(typeof c.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED)n();else{let u=function(){let f=Ap.startingStyle;if(!c.hasAttribute(f)){r.request(d);return}let m=new MutationObserver(()=>{c.hasAttribute(f)||(m.disconnect(),d())});m.observe(c,{attributes:!0,attributeFilter:[f]}),i?.addEventListener("abort",()=>m.disconnect(),{once:!0})},d=function(){Promise.all(c.getAnimations().map(f=>f.finished)).then(()=>{i?.aborted||s()}).catch(()=>{let f=c.getAnimations();if(o){if(i?.aborted)return;s()}else f.length>0&&f.some(m=>m.pending||m.playState!=="finished")&&d()})};if(t){u();return}r.request(d)}})}var r0=l(je(),1);function due(e,t=!1,o=!1){let[r,n]=r0.useState(e&&t?"idle":void 0),[i,s]=r0.useState(e);return e&&!i&&(s(!0),n("starting")),!e&&i&&r!=="ending"&&!o&&n("ending"),!e&&!i&&r==="ending"&&n(void 0),Br(()=>{if(!e&&i&&r!=="ending"&&o){let a=eo.request(()=>{n("ending")});return()=>{eo.cancel(a)}}},[e,i,r,o]),Br(()=>{if(!e||t)return;let a=eo.request(()=>{n(void 0)});return()=>{eo.cancel(a)}},[t,e]),Br(()=>{if(!e||!t)return;e&&i&&r!=="idle"&&n("starting");let a=eo.request(()=>{n("idle")});return()=>{eo.cancel(a)}},[t,e,i,n,r]),r0.useMemo(()=>({mounted:i,setMounted:s,transitionStatus:r}),[i,r])}function fue(e){let{open:t,defaultOpen:o,onOpenChange:r,disabled:n}=e,i=t!==void 0,[s,a]=Uce({controlled:t,default:o,name:"Collapsible",state:"open"}),{mounted:c,setMounted:u,transitionStatus:d}=due(s,!0,!0),[f,m]=ki.useState(s),[{height:h,width:p},g]=ki.useState({height:void 0,width:void 0}),b=aue(),[k,v]=ki.useState(),y=k??b,[_,S]=ki.useState(!1),[C,B]=ki.useState(!1),P=ki.useRef(null),R=ki.useRef(null),E=ki.useRef(null),L=ki.useRef(null),T=hR(L,!1),I=hs(M=>{let D=!s,U=lR(Rk.triggerPress,M.nativeEvent);if(r(D,U),U.isCanceled)return;let j=L.current;R.current==="css-animation"&&j!=null&&j.style.removeProperty("animation-name"),!_&&!C&&(R.current!=null&&R.current!=="css-animation"&&!c&&D&&u(!0),R.current==="css-animation"&&(!f&&D&&m(!0),!c&&D&&u(!0))),a(D),R.current==="none"&&c&&!D&&u(!1)});return Br(()=>{i&&R.current==="none"&&!C&&!s&&u(!1)},[i,C,s,t,u]),ki.useMemo(()=>({abortControllerRef:P,animationTypeRef:R,disabled:n,handleTrigger:I,height:h,mounted:c,open:s,panelId:y,panelRef:L,runOnceAnimationsFinish:T,setDimensions:g,setHiddenUntilFound:S,setKeepMounted:B,setMounted:u,setOpen:a,setPanelIdState:v,setVisible:m,transitionDimensionRef:E,transitionStatus:d,visible:f,width:p}),[P,R,n,I,h,c,s,y,L,T,g,S,B,u,a,m,E,d,f,p])}var gR=l(je(),1),I6=gR.createContext(void 0);function bR(){let e=gR.useContext(I6);if(e===void 0)throw new Error(Pk(15));return e}var Lp=(function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=Ap.startingStyle]="startingStyle",e[e.endingStyle=Ap.endingStyle]="endingStyle",e})({});var mue=(function(e){return e.panelOpen="data-panel-open",e})({});var zOe={[Lp.open]:""},jOe={[Lp.closed]:""},pue={open(e){return e?{[mue.panelOpen]:""}:null}},hue={open(e){return e?zOe:jOe}};var Ok=l(je(),1);function UOe(){return typeof window<"u"}function HOe(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function gue(e){return UOe()?e instanceof HTMLElement||e instanceof HOe(e).HTMLElement:!1}var kR=l(je(),1),GOe=kR.createContext(void 0);function bue(e=!1){let t=kR.useContext(GOe);if(t===void 0&&!e)throw new Error(Pk(16));return t}var kue=l(je(),1);function vue(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:kue.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 R6(e={}){let{disabled:t=!1,focusableWhenDisabled:o,tabIndex:r=0,native:n=!0,composite:i}=e,s=Ok.useRef(null),a=bue(!0),c=i??a!==void 0,{props:u}=vue({focusableWhenDisabled:o,disabled:t,composite:c,tabIndex:r,isNativeButton:n}),d=Ok.useCallback(()=>{let h=s.current;P6(h)&&c&&t&&u.disabled===void 0&&h.disabled&&(h.disabled=!1)},[t,u.disabled,c]);Br(d,[d]);let f=Ok.useCallback((h={})=>{let{onClick:p,onMouseDown:g,onKeyUp:b,onKeyDown:k,onPointerDown:v,...y}=h;return cr({type:n?"button":void 0,onClick(S){if(t){S.preventDefault();return}p?.(S)},onMouseDown(S){t||g?.(S)},onKeyDown(S){if(t||(aR(S),k?.(S),S.baseUIHandlerPrevented))return;let C=S.target===S.currentTarget,B=S.currentTarget,P=P6(B),R=!n&&WOe(B),E=C&&(n?P:!R),L=S.key==="Enter",T=S.key===" ",I=B.getAttribute("role"),M=I?.startsWith("menuitem")||I==="option"||I==="gridcell";if(C&&c&&T){if(S.defaultPrevented&&M)return;S.preventDefault(),R||n&&P?(B.click(),S.preventBaseUIHandler()):E&&(p?.(S),S.preventBaseUIHandler());return}E&&(!n&&(T||L)&&S.preventDefault(),!n&&L&&p?.(S))},onKeyUp(S){if(!t){if(aR(S),b?.(S),S.target===S.currentTarget&&n&&c&&P6(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=hs(h=>{s.current=h,d()});return{getButtonProps:f,buttonRef:m}}function P6(e){return gue(e)&&e.tagName==="BUTTON"}function WOe(e){return!!(e?.tagName==="A"&&e?.href)}var sl=l(je(),1);var yue=(function(e){return e.disabled="data-disabled",e.orientation="data-orientation",e})({});function _ue(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,_=sl.useRef(!1),S=sl.useRef(null),C=sl.useRef(d),B=sl.useRef(d),P=mR(),R=sl.useMemo(()=>o.current==="css-animation"?!v:!d&&!c,[d,c,v,o]),E=hs(T=>{if(!T)return;if(o.current==null||k.current==null){let D=getComputedStyle(T),U=D.animationName!=="none"&&D.animationName!=="",j=D.transitionDuration!=="0s"&&D.transitionDuration!=="";U&&j||(D.animationName==="none"&&D.transitionDuration!=="0s"?o.current="css-transition":D.animationName!=="none"&&D.transitionDuration==="0s"?o.current="css-animation":o.current="none"),T.getAttribute(yue.orientation)==="horizontal"||D.transitionProperty.indexOf("width")>-1?k.current="width":k.current="height"}if(o.current!=="css-transition")return;(n===void 0||y===void 0)&&(h({height:T.scrollHeight,width:T.scrollWidth}),B.current&&T.style.setProperty("transition-duration","0s"));let I=-1,M=-1;return I=eo.request(()=>{B.current=!1,M=eo.request(()=>{setTimeout(()=>{T.style.removeProperty("transition-duration")})})}),()=>{eo.cancel(I),eo.cancel(M)}}),L=JS(r,f,E);return Br(()=>{if(o.current!=="css-transition")return;let T=f.current;if(!T)return;let I=-1;if(t.current!=null&&(t.current.abort(),t.current=null),d){let M={"justify-content":T.style.justifyContent,"align-items":T.style.alignItems,"align-content":T.style.alignContent,"justify-items":T.style.justifyItems};Object.keys(M).forEach(D=>{T.style.setProperty(D,"initial","important")}),!B.current&&!s&&T.setAttribute(Lp.startingStyle,""),h({height:T.scrollHeight,width:T.scrollWidth}),I=eo.request(()=>{Object.entries(M).forEach(([D,U])=>{U===""?T.style.removeProperty(D):T.style.setProperty(D,U)})})}else{if(T.scrollHeight===0&&T.scrollWidth===0)return;h({height:T.scrollHeight,width:T.scrollWidth});let M=new AbortController;t.current=M;let D=M.signal,U=null,j=Lp.endingStyle;return U=new MutationObserver(H=>{H.some(Q=>Q.type==="attributes"&&Q.attributeName===j)&&(U?.disconnect(),U=null,m(()=>{h({height:0,width:0}),T.style.removeProperty("content-visibility"),p(!1),t.current===M&&(t.current=null)},D))}),U.observe(T,{attributes:!0,attributeFilter:[j]}),()=>{U?.disconnect(),P.cancel(),t.current===M&&(M.abort(),t.current=null)}}return()=>{eo.cancel(I)}},[t,o,P,i,s,c,d,f,m,h,p]),Br(()=>{if(o.current!=="css-animation")return;let T=f.current;T&&(S.current=T.style.animationName||S.current,T.style.setProperty("animation-name","none"),h({height:T.scrollHeight,width:T.scrollWidth}),!C.current&&!_.current&&T.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]),uR(()=>{let T=eo.request(()=>{C.current=!1});return()=>eo.cancel(T)}),Br(()=>{if(!i)return;let T=f.current;if(!T)return;let I=-1,M=-1;return d&&_.current&&(T.style.transitionDuration="0s",h({height:T.scrollHeight,width:T.scrollWidth}),I=eo.request(()=>{_.current=!1,M=eo.request(()=>{setTimeout(()=>{T.style.removeProperty("transition-duration")})})})),()=>{eo.cancel(I),eo.cancel(M)}},[i,d,f,h]),Br(()=>{let T=f.current;T&&i&&R&&(T.setAttribute("hidden","until-found"),o.current==="css-transition"&&T.setAttribute(Lp.startingStyle,""))},[i,R,o,f]),sl.useEffect(function(){let I=f.current;if(!I)return;function M(D){_.current=!0,g(!0),u(!0,lR(Rk.none,D))}return I.addEventListener("beforematch",M),()=>{I.removeEventListener("beforematch",M)}},[u,f,g]),sl.useMemo(()=>({props:{hidden:R,id:a,ref:L}}),[R,a,L])}var Sue=l(je(),1);function xue(e){let{enabled:t=!0,open:o,ref:r,onComplete:n}=e,i=hs(n),s=hR(r,o,!1);Sue.useEffect(()=>{if(!t)return;let a=new AbortController;return s(i,a.signal),()=>{a.abort()}},[t,o,i,s])}var af={};ka(af,{Panel:()=>Eue,Root:()=>Cue,Trigger:()=>Bue});var n0=l(je(),1);var vR={...hue,...pR};var wue=l(w(),1),Cue=n0.forwardRef(function(t,o){let{render:r,className:n,defaultOpen:i=!1,disabled:s=!1,onOpenChange:a,open:c,...u}=t,d=hs(a),f=fue({open:c,defaultOpen:i,onOpenChange:d,disabled:s}),m=n0.useMemo(()=>({open:f.open,disabled:f.disabled,transitionStatus:f.transitionStatus}),[f.open,f.disabled,f.transitionStatus]),h=n0.useMemo(()=>({...f,onOpenChange:d,state:m}),[f,d,m]),p=sf("div",t,{state:m,ref:o,props:u,stateAttributesMapping:vR});return(0,wue.jsx)(I6.Provider,{value:h,children:p})});var yR=l(je(),1);var $Oe={...pue,...pR},Bue=yR.forwardRef(function(t,o){let{panelId:r,open:n,handleTrigger:i,state:s,disabled:a}=bR(),{className:c,disabled:u=a,id:d,render:f,nativeButton:m=!0,...h}=t,{getButtonProps:p,buttonRef:g}=R6({disabled:u,focusableWhenDisabled:!0,native:m}),b=yR.useMemo(()=>({"aria-controls":n?r:void 0,"aria-expanded":n,onClick:i}),[r,n,i]);return sf("button",t,{state:s,ref:[o,g],props:[b,h,p],stateAttributesMapping:$Oe})});var _R=l(je(),1);var O6=(function(e){return e.collapsiblePanelHeight="--collapsible-panel-height",e.collapsiblePanelWidth="--collapsible-panel-width",e})({});var Eue=_R.forwardRef(function(t,o){let{className:r,hiddenUntilFound:n,keepMounted:i,render:s,id:a,...c}=t,{abortControllerRef:u,animationTypeRef:d,height:f,mounted:m,onOpenChange:h,open:p,panelId:g,panelRef:b,runOnceAnimationsFinish:k,setDimensions:v,setHiddenUntilFound:y,setKeepMounted:_,setMounted:S,setPanelIdState:C,setOpen:B,setVisible:P,state:R,transitionDimensionRef:E,visible:L,width:T,transitionStatus:I}=bR(),M=n??!1,D=i??!1;Br(()=>{if(a)return C(a),()=>{C(void 0)}},[a,C]),Br(()=>{y(M)},[y,M]),Br(()=>{_(D)},[_,D]);let{props:U}=_ue({abortControllerRef:u,animationTypeRef:d,externalRef:o,height:f,hiddenUntilFound:M,id:g,keepMounted:D,mounted:m,onOpenChange:h,open:p,panelRef:b,runOnceAnimationsFinish:k,setDimensions:v,setMounted:S,setOpen:B,setVisible:P,transitionDimensionRef:E,visible:L,width:T});xue({open:p&&I==="idle",ref:b,onComplete(){p&&v({height:void 0,width:void 0})}});let j=_R.useMemo(()=>({...R,transitionStatus:I}),[R,I]),H=sf("div",t,{state:j,ref:[o,b],props:[U,{style:{[O6.collapsiblePanelHeight]:f===void 0?"auto":`${f}px`,[O6.collapsiblePanelWidth]:T===void 0?"auto":`${T}px`}},c],stateAttributesMapping:vR});return D||M||!D&&m?H:null});function Mn(e){return sf(e.defaultTagName??"div",e,e)}var Iue=l(O(),1);if(typeof document<"u"&&!document.head.querySelector("style[data-wp-hash='a407d6dd3d']")){let e=document.createElement("style");e.setAttribute("data-wp-hash","a407d6dd3d"),e.appendChild(document.createTextNode('@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);font-family:var(--wpds-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-font-size-sm,12px);font-weight:var(--wpds-font-weight-regular,400);line-height:var(--wpds-font-line-height-xs,16px);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,#fde6bd);color:var(--wpds-color-fg-content-warning,#2e1900)}._365e1626c6202e52__is-low-intent{background-color:var(--wpds-color-bg-surface-caution,#fee994);color:var(--wpds-color-fg-content-caution,#281d00)}._33f8198127ddf4ef__is-stable-intent{background-color:var(--wpds-color-bg-surface-success,#c5f7cc);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,#f0f0f0);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,#d8d8d8);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))}}')),document.head.appendChild(e)}var Tue={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"},A6=(0,Iue.forwardRef)(function({children:t,intent:o="none",render:r,className:n,...i},s){return Mn({render:r,defaultTagName:"span",ref:s,props:cr(i,{className:V(Tue.badge,Tue[`is-${o}-intent`],n),children:t})})});var Pue=l(O(),1),Rue=l(q(),1),Oue=l(w(),1),L6=(0,Pue.forwardRef)(function({icon:t,size:o=24,...r},n){return(0,Oue.jsx)(Rue.SVG,{ref:n,fill:"currentColor",...t.props,...r,width:o,height:o})});var al={};ka(al,{Content:()=>wR,FullBleed:()=>Due,Header:()=>xR,Root:()=>SR,Title:()=>zue});var Aue=l(O(),1);if(typeof document<"u"&&!document.head.querySelector("style[data-wp-hash='e3ae230cea']")){let e=document.createElement("style");e.setAttribute("data-wp-hash","e3ae230cea"),e.appendChild(document.createTextNode("@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}}}")),document.head.appendChild(e)}var KOe={"box-sizing":"_336cd3e4e743482f__box-sizing"};if(typeof document<"u"&&!document.head.querySelector("style[data-wp-hash='d641b7e3ed']")){let e=document.createElement("style");e.setAttribute("data-wp-hash","d641b7e3ed"),e.appendChild(document.createTextNode("@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,#e0e0e0);border-radius:var(--wpds-border-radius-lg,8px);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)}._3c83b3f0225d6364__title{color:var(--wpds-color-fg-content-neutral,#1e1e1e);margin:0}}")),document.head.appendChild(e)}var YOe={root:"_02872bf298eadc43__root",header:"bbccc92e6ba5662d__header",content:"_5dffdaf2a6e669ac__content",fullbleed:"c1fa192587e1b4a6__fullbleed",title:"_3c83b3f0225d6364__title"},SR=(0,Aue.forwardRef)(function({render:t,...o},r){let n=V(YOe.root,KOe["box-sizing"]);return Mn({defaultTagName:"div",render:t,ref:r,props:cr({className:n},o)})});var Lue=l(O(),1);if(typeof document<"u"&&!document.head.querySelector("style[data-wp-hash='d641b7e3ed']")){let e=document.createElement("style");e.setAttribute("data-wp-hash","d641b7e3ed"),e.appendChild(document.createTextNode("@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,#e0e0e0);border-radius:var(--wpds-border-radius-lg,8px);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)}._3c83b3f0225d6364__title{color:var(--wpds-color-fg-content-neutral,#1e1e1e);margin:0}}")),document.head.appendChild(e)}var qOe={root:"_02872bf298eadc43__root",header:"bbccc92e6ba5662d__header",content:"_5dffdaf2a6e669ac__content",fullbleed:"c1fa192587e1b4a6__fullbleed",title:"_3c83b3f0225d6364__title"},xR=(0,Lue.forwardRef)(function({render:t,...o},r){return Mn({defaultTagName:"div",render:t,ref:r,props:cr({className:qOe.header},o)})});var Nue=l(O(),1);if(typeof document<"u"&&!document.head.querySelector("style[data-wp-hash='d641b7e3ed']")){let e=document.createElement("style");e.setAttribute("data-wp-hash","d641b7e3ed"),e.appendChild(document.createTextNode("@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,#e0e0e0);border-radius:var(--wpds-border-radius-lg,8px);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)}._3c83b3f0225d6364__title{color:var(--wpds-color-fg-content-neutral,#1e1e1e);margin:0}}")),document.head.appendChild(e)}var ZOe={root:"_02872bf298eadc43__root",header:"bbccc92e6ba5662d__header",content:"_5dffdaf2a6e669ac__content",fullbleed:"c1fa192587e1b4a6__fullbleed",title:"_3c83b3f0225d6364__title"},wR=(0,Nue.forwardRef)(function({render:t,...o},r){return Mn({defaultTagName:"div",render:t,ref:r,props:cr({className:ZOe.content},o)})});var Mue=l(O(),1);if(typeof document<"u"&&!document.head.querySelector("style[data-wp-hash='d641b7e3ed']")){let e=document.createElement("style");e.setAttribute("data-wp-hash","d641b7e3ed"),e.appendChild(document.createTextNode("@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,#e0e0e0);border-radius:var(--wpds-border-radius-lg,8px);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)}._3c83b3f0225d6364__title{color:var(--wpds-color-fg-content-neutral,#1e1e1e);margin:0}}")),document.head.appendChild(e)}var XOe={root:"_02872bf298eadc43__root",header:"bbccc92e6ba5662d__header",content:"_5dffdaf2a6e669ac__content",fullbleed:"c1fa192587e1b4a6__fullbleed",title:"_3c83b3f0225d6364__title"},Due=(0,Mue.forwardRef)(function({render:t,...o},r){return Mn({defaultTagName:"div",render:t,ref:r,props:cr({className:XOe.fullbleed},o)})});var Fue=l(O(),1);var Vue=l(O(),1);if(typeof document<"u"&&!document.head.querySelector("style[data-wp-hash='8bc43893d6']")){let e=document.createElement("style");e.setAttribute("data-wp-hash","8bc43893d6"),e.appendChild(document.createTextNode('@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._14437cfb77831647__heading-2xl{font-size:var(--wpds-font-size-2xl,32px);line-height:var(--wpds-font-line-height-2xl,40px)}._14437cfb77831647__heading-2xl,._3c78b7fa9b4072dd__heading-xl{font-family:var(--wpds-font-family-heading,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-font-weight-medium,499)}._3c78b7fa9b4072dd__heading-xl{font-size:var(--wpds-font-size-xl,20px);line-height:var(--wpds-font-line-height-md,24px)}.aa58f227716bcde2__heading-lg{font-size:var(--wpds-font-size-lg,15px)}.aa58f227716bcde2__heading-lg,.fc4da56d8dfe52c4__heading-md{font-family:var(--wpds-font-family-heading,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-font-weight-medium,499);line-height:var(--wpds-font-line-height-sm,20px)}.fc4da56d8dfe52c4__heading-md{font-size:var(--wpds-font-size-md,13px)}.a9b78c7c82e8dff7__heading-sm{font-family:var(--wpds-font-family-heading,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-font-size-xs,11px);font-weight:var(--wpds-font-weight-medium,499);line-height:var(--wpds-font-line-height-xs,16px);text-transform:uppercase}._305ff559e52180d5__body-xl{font-size:var(--wpds-font-size-xl,20px);line-height:var(--wpds-font-line-height-xl,32px)}._305ff559e52180d5__body-xl,.ca1aa3fc2029e958__body-lg{font-family:var(--wpds-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-font-weight-regular,400)}.ca1aa3fc2029e958__body-lg{font-size:var(--wpds-font-size-lg,15px);line-height:var(--wpds-font-line-height-md,24px)}._131101940be12424__body-md{font-size:var(--wpds-font-size-md,13px);line-height:var(--wpds-font-line-height-sm,20px)}._0e8d87a42c1f75fa__body-sm,._131101940be12424__body-md{font-family:var(--wpds-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-font-weight-regular,400)}._0e8d87a42c1f75fa__body-sm{font-size:var(--wpds-font-size-sm,12px);line-height:var(--wpds-font-line-height-xs,16px)}}')),document.head.appendChild(e)}var QOe={"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"},N6=(0,Vue.forwardRef)(function({variant:t="body-md",render:o,className:r,...n},i){return Mn({render:o,defaultTagName:"span",ref:i,props:cr(n,{className:V(QOe[t],r)})})});var M6=l(w(),1);if(typeof document<"u"&&!document.head.querySelector("style[data-wp-hash='d641b7e3ed']")){let e=document.createElement("style");e.setAttribute("data-wp-hash","d641b7e3ed"),e.appendChild(document.createTextNode("@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,#e0e0e0);border-radius:var(--wpds-border-radius-lg,8px);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)}._3c83b3f0225d6364__title{color:var(--wpds-color-fg-content-neutral,#1e1e1e);margin:0}}")),document.head.appendChild(e)}var JOe={root:"_02872bf298eadc43__root",header:"bbccc92e6ba5662d__header",content:"_5dffdaf2a6e669ac__content",fullbleed:"c1fa192587e1b4a6__fullbleed",title:"_3c83b3f0225d6364__title"},zue=(0,Fue.forwardRef)(function({className:t,render:o,children:r,...n},i){return(0,M6.jsx)(N6,{variant:"heading-lg",render:o??(0,M6.jsx)("div",{ref:i,...n}),className:V(JOe.title,t),children:r})});var jue=l(O(),1),Uue=l(w(),1),D6=(0,jue.forwardRef)(function(t,o){return(0,Uue.jsx)(af.Panel,{ref:o,...t})});var Hue=l(O(),1),Gue=l(w(),1),V6=(0,Hue.forwardRef)(function(t,o){return(0,Gue.jsx)(af.Root,{ref:o,...t})});var Wue=l(O(),1),$ue=l(w(),1),F6=(0,Wue.forwardRef)(function(t,o){return(0,$ue.jsx)(af.Trigger,{ref:o,...t})});var Np={};ka(Np,{Content:()=>tde,Header:()=>Zue,HeaderDescription:()=>Que,Root:()=>Yue});var Kue=l(O(),1);var j6=l(w(),1),Yue=(0,Kue.forwardRef)(function({render:t,...o},r){return(0,j6.jsx)(V6,{ref:r,render:(0,j6.jsx)(SR,{render:t}),...o})});var Ak=l(O(),1);var que=l(O(),1),CR=(0,que.createContext)({setDescriptionId:()=>{}});var Vc=l(w(),1);if(typeof document<"u"&&!document.head.querySelector("style[data-wp-hash='23250ec980']")){let e=document.createElement("style");e.setAttribute("data-wp-hash","23250ec980"),e.appendChild(document.createTextNode("@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{.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,#8a8a8a)}.e34cf37ccd0d81e0__content{height:var(--collapsible-panel-height);margin-block-start:var(--wp-ui-card-header-content-margin);overflow:hidden;&[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)}}}")),document.head.appendChild(e)}var i0={"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","content-inner":"_41bfdbf7b6c087c2__content-inner"};if(typeof document<"u"&&!document.head.querySelector("style[data-wp-hash='4acd2b57a1']")){let e=document.createElement("style");e.setAttribute("data-wp-hash","4acd2b57a1"),e.appendChild(document.createTextNode("@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){transition:outline .1s ease-out}outline-color:#0000;outline-offset:1px;outline-style:solid;outline-width:0}._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{outline-color:var(--wpds-color-stroke-focus-brand,var(--wp-admin-theme-color,#3858e9));outline-width:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px))}}")),document.head.appendChild(e)}var eAe={"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"},Zue=(0,Ak.forwardRef)(function({children:t,className:o,render:r,...n},i){let[s,a]=(0,Ak.useState)(),c=(0,Ak.useMemo)(()=>({setDescriptionId:a}),[a]);return(0,Vc.jsx)(CR.Provider,{value:c,children:(0,Vc.jsxs)(F6,{className:V(i0.header,o),render:(0,Vc.jsx)(xR,{ref:i,render:r,...n}),nativeButton:!1,"aria-describedby":s,children:[(0,Vc.jsx)("div",{className:i0["header-content"],children:t}),(0,Vc.jsx)("div",{className:V(i0["header-trigger-positioner"]),children:(0,Vc.jsx)("div",{className:V(i0["header-trigger-wrapper"],eAe["outset-ring--focus-parent-visible"]),children:(0,Vc.jsx)(L6,{icon:hr,className:i0["header-trigger"]})})})]})})});var lf=l(O(),1);var Xue=l(w(),1),Que=(0,lf.forwardRef)(function({children:t,className:o,...r},n){let i=(0,lf.useId)(),{setDescriptionId:s}=(0,lf.useContext)(CR);return(0,lf.useEffect)(()=>(s(i),()=>s(void 0)),[i,s]),(0,Xue.jsx)("div",{ref:n,id:i,"aria-hidden":"true",className:o,...r,children:t})});var ede=l(O(),1);var U6=l(w(),1);if(typeof document<"u"&&!document.head.querySelector("style[data-wp-hash='23250ec980']")){let e=document.createElement("style");e.setAttribute("data-wp-hash","23250ec980"),e.appendChild(document.createTextNode("@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{.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,#8a8a8a)}.e34cf37ccd0d81e0__content{height:var(--collapsible-panel-height);margin-block-start:var(--wp-ui-card-header-content-margin);overflow:hidden;&[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)}}}")),document.head.appendChild(e)}var Jue={"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","content-inner":"_41bfdbf7b6c087c2__content-inner"},tde=(0,ede.forwardRef)(function({className:t,render:o,children:r,hiddenUntilFound:n=!0,...i},s){return(0,U6.jsx)(D6,{ref:s,className:V(Jue.content,t),hiddenUntilFound:n,...i,children:(0,U6.jsx)(wR,{className:Jue["content-inner"],render:o,children:r})})});var ode=l(O(),1);if(typeof document<"u"&&!document.head.querySelector("style[data-wp-hash='b51ff41489']")){let e=document.createElement("style");e.setAttribute("data-wp-hash","b51ff41489"),e.appendChild(document.createTextNode("@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._19ce0419607e1896__stack{display:flex}}")),document.head.appendChild(e)}var tAe={stack:"_19ce0419607e1896__stack"},oAe={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)"},Le=(0,ode.forwardRef)(function({direction:t,gap:o,align:r,justify:n,wrap:i,render:s,...a},c){let u={gap:o&&oAe[o],alignItems:r,justifyContent:n,flexDirection:t,flexWrap:i};return Mn({render:s,ref:c,props:cr(a,{style:u,className:tAe.stack})})});var H6=l(N(),1);var Ht="isAny",Gt="isNone",Dr="isAll",Vr="isNotAll",ln="between",cn="inThePast",Dn="over",to="is",oo="isNot",cf="lessThan",uf="greaterThan",df="lessThanOrEqual",ff="greaterThanOrEqual",mf="before",pf="after",hf="beforeInc",gf="afterInc",ll="contains",cl="notContains",ul="startsWith",bf="on",kf="notOn";var nSt={asc:(0,H6.__)("Sort ascending"),desc:(0,H6.__)("Sort descending")};var rde=l(vA(),1),{lock:sSt,unlock:wt}=(0,rde.__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(O(),1),rAe=[];function Vn({elements:e,getElements:t}){let o=Array.isArray(e)&&e.length>0?e:rAe,[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 nAe=Math.pow(10,8)*24*60*60*1e3,cSt=-nAe,BR=6048e5,nde=864e5;var iAe=3600;var ide=iAe*24,uSt=ide*7,sAe=ide*365.2425,aAe=sAe/12,dSt=aAe*3,G6=Symbol.for("constructDateFrom");function Zo(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&G6 in e?e[G6](t):e instanceof Date?new e.constructor(t):new Date(t)}function ft(e,t){return Zo(t||e,e)}function ER(e,t,o){let r=ft(e,o?.in);return isNaN(t)?Zo(o?.in||e,NaN):(t&&r.setDate(r.getDate()+t),r)}function TR(e,t,o){let r=ft(e,o?.in);if(isNaN(t))return Zo(o?.in||e,NaN);if(!t)return r;let n=r.getDate(),i=Zo(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 lAe={};function vf(){return lAe}function Fc(e,t){let o=vf(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??o.weekStartsOn??o.locale?.options?.weekStartsOn??0,n=ft(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 Mp(e,t){return Fc(e,{...t,weekStartsOn:1})}function IR(e,t){let o=ft(e,t?.in),r=o.getFullYear(),n=Zo(o,0);n.setFullYear(r+1,0,4),n.setHours(0,0,0,0);let i=Mp(n),s=Zo(o,0);s.setFullYear(r,0,4),s.setHours(0,0,0,0);let a=Mp(s);return o.getTime()>=i.getTime()?r+1:o.getTime()>=a.getTime()?r:r-1}function W6(e){let t=ft(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 sde(e,...t){let o=Zo.bind(null,e||t.find(r=>typeof r=="object"));return t.map(o)}function $6(e,t){let o=ft(e,t?.in);return o.setHours(0,0,0,0),o}function ade(e,t,o){let[r,n]=sde(o?.in,e,t),i=$6(r),s=$6(n),a=+i-W6(i),c=+s-W6(s);return Math.round((a-c)/nde)}function lde(e,t){let o=IR(e,t),r=Zo(t?.in||e,0);return r.setFullYear(o,0,4),r.setHours(0,0,0,0),Mp(r)}function cde(e,t,o){return ER(e,t*7,o)}function ude(e,t,o){return TR(e,t*12,o)}function dde(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Lk(e){return!(!dde(e)&&typeof e!="number"||isNaN(+ft(e)))}function fde(e,t){let o=ft(e,t?.in);return o.setDate(1),o.setHours(0,0,0,0),o}function PR(e,t){let o=ft(e,t?.in);return o.setFullYear(o.getFullYear(),0,1),o.setHours(0,0,0,0),o}var cAe={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"}},mde=(e,t,o)=>{let r,n=cAe[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 RR(e){return(t={})=>{let o=t.width?String(t.width):e.defaultWidth;return e.formats[o]||e.formats[e.defaultWidth]}}var uAe={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},dAe={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},fAe={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},pde={date:RR({formats:uAe,defaultWidth:"full"}),time:RR({formats:dAe,defaultWidth:"full"}),dateTime:RR({formats:fAe,defaultWidth:"full"})};var mAe={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},hde=(e,t,o,r)=>mAe[e];function Nk(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 pAe={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},hAe={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},gAe={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"]},bAe={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"]},kAe={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"}},vAe={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"}},yAe=(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"},gde={ordinalNumber:yAe,era:Nk({values:pAe,defaultWidth:"wide"}),quarter:Nk({values:hAe,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Nk({values:gAe,defaultWidth:"wide"}),day:Nk({values:bAe,defaultWidth:"wide"}),dayPeriod:Nk({values:kAe,defaultWidth:"wide",formattingValues:vAe,defaultFormattingWidth:"wide"})};function Mk(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)?SAe(a,f=>f.test(s)):_Ae(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 _Ae(e,t){for(let o in e)if(Object.prototype.hasOwnProperty.call(e,o)&&t(e[o]))return o}function SAe(e,t){for(let o=0;o<e.length;o++)if(t(e[o]))return o}function bde(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 xAe=/^(\d+)(th|st|nd|rd)?/i,wAe=/\d+/i,CAe={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},BAe={any:[/^b/i,/^(a|c)/i]},EAe={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},TAe={any:[/1/i,/2/i,/3/i,/4/i]},IAe={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},PAe={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]},RAe={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},OAe={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]},AAe={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},LAe={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}},kde={ordinalNumber:bde({matchPattern:xAe,parsePattern:wAe,valueCallback:e=>parseInt(e,10)}),era:Mk({matchPatterns:CAe,defaultMatchWidth:"wide",parsePatterns:BAe,defaultParseWidth:"any"}),quarter:Mk({matchPatterns:EAe,defaultMatchWidth:"wide",parsePatterns:TAe,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Mk({matchPatterns:IAe,defaultMatchWidth:"wide",parsePatterns:PAe,defaultParseWidth:"any"}),day:Mk({matchPatterns:RAe,defaultMatchWidth:"wide",parsePatterns:OAe,defaultParseWidth:"any"}),dayPeriod:Mk({matchPatterns:AAe,defaultMatchWidth:"any",parsePatterns:LAe,defaultParseWidth:"any"})};var K6={code:"en-US",formatDistance:mde,formatLong:pde,formatRelative:hde,localize:gde,match:kde,options:{weekStartsOn:0,firstWeekContainsDate:1}};function vde(e,t){let o=ft(e,t?.in);return ade(o,PR(o))+1}function yde(e,t){let o=ft(e,t?.in),r=+Mp(o)-+lde(o);return Math.round(r/BR)+1}function OR(e,t){let o=ft(e,t?.in),r=o.getFullYear(),n=vf(),i=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,s=Zo(t?.in||e,0);s.setFullYear(r+1,0,i),s.setHours(0,0,0,0);let a=Fc(s,t),c=Zo(t?.in||e,0);c.setFullYear(r,0,i),c.setHours(0,0,0,0);let u=Fc(c,t);return+o>=+a?r+1:+o>=+u?r:r-1}function _de(e,t){let o=vf(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,n=OR(e,t),i=Zo(t?.in||e,0);return i.setFullYear(n,0,r),i.setHours(0,0,0,0),Fc(i,t)}function Sde(e,t){let o=ft(e,t?.in),r=+Fc(o,t)-+_de(o,t);return Math.round(r/BR)+1}function Ye(e,t){let o=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return o+r}var zc={y(e,t){let o=e.getFullYear(),r=o>0?o:1-o;return Ye(t==="yy"?r%100:r,t.length)},M(e,t){let o=e.getMonth();return t==="M"?String(o+1):Ye(o+1,2)},d(e,t){return Ye(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 Ye(e.getHours()%12||12,t.length)},H(e,t){return Ye(e.getHours(),t.length)},m(e,t){return Ye(e.getMinutes(),t.length)},s(e,t){return Ye(e.getSeconds(),t.length)},S(e,t){let o=t.length,r=e.getMilliseconds(),n=Math.trunc(r*Math.pow(10,o-3));return Ye(n,t.length)}};var Dk={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Y6={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 zc.y(e,t)},Y:function(e,t,o,r){let n=OR(e,r),i=n>0?n:1-n;if(t==="YY"){let s=i%100;return Ye(s,2)}return t==="Yo"?o.ordinalNumber(i,{unit:"year"}):Ye(i,t.length)},R:function(e,t){let o=IR(e);return Ye(o,t.length)},u:function(e,t){let o=e.getFullYear();return Ye(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 Ye(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 Ye(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 zc.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 Ye(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=Sde(e,r);return t==="wo"?o.ordinalNumber(n,{unit:"week"}):Ye(n,t.length)},I:function(e,t,o){let r=yde(e);return t==="Io"?o.ordinalNumber(r,{unit:"week"}):Ye(r,t.length)},d:function(e,t,o){return t==="do"?o.ordinalNumber(e.getDate(),{unit:"date"}):zc.d(e,t)},D:function(e,t,o){let r=vde(e);return t==="Do"?o.ordinalNumber(r,{unit:"dayOfYear"}):Ye(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 Ye(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 Ye(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 Ye(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=Dk.noon:r===0?n=Dk.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=Dk.evening:r>=12?n=Dk.afternoon:r>=4?n=Dk.morning:n=Dk.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 zc.h(e,t)},H:function(e,t,o){return t==="Ho"?o.ordinalNumber(e.getHours(),{unit:"hour"}):zc.H(e,t)},K:function(e,t,o){let r=e.getHours()%12;return t==="Ko"?o.ordinalNumber(r,{unit:"hour"}):Ye(r,t.length)},k:function(e,t,o){let r=e.getHours();return r===0&&(r=24),t==="ko"?o.ordinalNumber(r,{unit:"hour"}):Ye(r,t.length)},m:function(e,t,o){return t==="mo"?o.ordinalNumber(e.getMinutes(),{unit:"minute"}):zc.m(e,t)},s:function(e,t,o){return t==="so"?o.ordinalNumber(e.getSeconds(),{unit:"second"}):zc.s(e,t)},S:function(e,t){return zc.S(e,t)},X:function(e,t,o){let r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return wde(r);case"XXXX":case"XX":return Dp(r);default:return Dp(r,":")}},x:function(e,t,o){let r=e.getTimezoneOffset();switch(t){case"x":return wde(r);case"xxxx":case"xx":return Dp(r);default:return Dp(r,":")}},O:function(e,t,o){let r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+xde(r,":");default:return"GMT"+Dp(r,":")}},z:function(e,t,o){let r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+xde(r,":");default:return"GMT"+Dp(r,":")}},t:function(e,t,o){let r=Math.trunc(+e/1e3);return Ye(r,t.length)},T:function(e,t,o){return Ye(+e,t.length)}};function xde(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+Ye(i,2)}function wde(e,t){return e%60===0?(e>0?"-":"+")+Ye(Math.abs(e)/60,2):Dp(e,t)}function Dp(e,t=""){let o=e>0?"-":"+",r=Math.abs(e),n=Ye(Math.trunc(r/60),2),i=Ye(r%60,2);return o+n+t+i}var Cde=(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"})}},Bde=(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"})}},NAe=(e,t)=>{let o=e.match(/(P+)(p+)?/)||[],r=o[1],n=o[2];if(!n)return Cde(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}}",Cde(r,t)).replace("{{time}}",Bde(n,t))},Ede={p:Bde,P:NAe};var MAe=/^D+$/,DAe=/^Y+$/,VAe=["D","DD","YY","YYYY"];function Tde(e){return MAe.test(e)}function Ide(e){return DAe.test(e)}function Pde(e,t,o){let r=FAe(e,t,o);if(console.warn(r),VAe.includes(e))throw new RangeError(r)}function FAe(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 zAe=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,jAe=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,UAe=/^'([^]*?)'?$/,HAe=/''/g,GAe=/[a-zA-Z]/;function q6(e,t,o){let r=vf(),n=o?.locale??r.locale??K6,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=ft(e,o?.in);if(!Lk(a))throw new RangeError("Invalid time value");let c=t.match(jAe).map(d=>{let f=d[0];if(f==="p"||f==="P"){let m=Ede[f];return m(d,n.formatLong)}return d}).join("").match(zAe).map(d=>{if(d==="''")return{isToken:!1,value:"'"};let f=d[0];if(f==="'")return{isToken:!1,value:WAe(d)};if(Y6[f])return{isToken:!0,value:d};if(f.match(GAe))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&&Ide(f)||!o?.useAdditionalDayOfYearTokens&&Tde(f))&&Pde(f,t,String(e));let m=Y6[f[0]];return m(a,f,n.localize,u)}).join("")}function WAe(e){let t=e.match(UAe);return t?t[1].replace(HAe,"'"):e}function Vp(e,t,o){return ER(e,-t,o)}function AR(e,t,o){return TR(e,-t,o)}function Rde(e,t,o){return cde(e,-t,o)}function LR(e,t,o){return ude(e,-t,o)}var de=l(N(),1),ho=l(O(),1),un=l(Cc(),1);var Z6=l(w(),1),Po={Name:(0,Z6.jsx)("span",{className:"dataviews-filters__summary-filter-text-name"}),Value:(0,Z6.jsx)("span",{className:"dataviews-filters__summary-filter-text-value"})};function Ode(e,t){switch(t){case"days":return Vp(new Date,e);case"weeks":return Rde(new Date,e);case"months":return AR(new Date,e);case"years":return LR(new Date,e);default:return new Date}}var Ade={label:(0,de.__)("Is none of"),filterText:(e,t)=>(0,ho.createInterpolateElement)((0,de.sprintf)((0,de.__)("<Name>%1$s is none of: </Name><Value>%2$s</Value>"),e.name,t.map(o=>o.label).join(", ")),Po),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"},Lde=[{name:Ht,label:(0,de.__)("Includes"),filterText:(e,t)=>(0,ho.createInterpolateElement)((0,de.sprintf)((0,de.__)("<Name>%1$s includes: </Name><Value>%2$s</Value>"),e.name,t.map(o=>o.label).join(", ")),Po),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:Gt,...Ade},{name:Dr,label:(0,de.__)("Includes all"),filterText:(e,t)=>(0,ho.createInterpolateElement)((0,de.sprintf)((0,de.__)("<Name>%1$s includes all: </Name><Value>%2$s</Value>"),e.name,t.map(o=>o.label).join(", ")),Po),filter(e,t,o){return o?.length?o.every(r=>t.getValue({item:e})?.includes(r)):!0},selection:"multi"},{name:Vr,...Ade},{name:ln,label:(0,de.__)("Between (inc)"),filterText:(e,t)=>(0,ho.createInterpolateElement)((0,de.sprintf)((0,de.__)("<Name>%1$s between (inc): </Name><Value>%2$s and %3$s</Value>"),e.name,t[0].label[0],t[0].label[1]),Po),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:cn,label:(0,de.__)("In the past"),filterText:(e,t)=>(0,ho.createInterpolateElement)((0,de.sprintf)((0,de.__)("<Name>%1$s is in the past: </Name><Value>%2$s</Value>"),e.name,`${t[0].value.value} ${t[0].value.unit}`),Po),filter(e,t,o){if(o?.value===void 0||o?.unit===void 0)return!0;let r=Ode(o.value,o.unit),n=(0,un.getDate)(t.getValue({item:e}));return n>=r&&n<=new Date},selection:"custom"},{name:Dn,label:(0,de.__)("Over"),filterText:(e,t)=>(0,ho.createInterpolateElement)((0,de.sprintf)((0,de.__)("<Name>%1$s is over: </Name><Value>%2$s</Value>"),e.name,`${t[0].value.value} ${t[0].value.unit}`),Po),filter(e,t,o){if(o?.value===void 0||o?.unit===void 0)return!0;let r=Ode(o.value,o.unit);return(0,un.getDate)(t.getValue({item:e}))<r},selection:"custom"},{name:to,label:(0,de.__)("Is"),filterText:(e,t)=>(0,ho.createInterpolateElement)((0,de.sprintf)((0,de.__)("<Name>%1$s is: </Name><Value>%2$s</Value>"),e.name,t[0].label),Po),filter(e,t,o){return o===t.getValue({item:e})||o===void 0},selection:"single"},{name:oo,label:(0,de.__)("Is not"),filterText:(e,t)=>(0,ho.createInterpolateElement)((0,de.sprintf)((0,de.__)("<Name>%1$s is not: </Name><Value>%2$s</Value>"),e.name,t[0].label),Po),filter(e,t,o){return o!==t.getValue({item:e})},selection:"single"},{name:cf,label:(0,de.__)("Less than"),filterText:(e,t)=>(0,ho.createInterpolateElement)((0,de.sprintf)((0,de.__)("<Name>%1$s is less than: </Name><Value>%2$s</Value>"),e.name,t[0].label),Po),filter(e,t,o){return o===void 0?!0:t.getValue({item:e})<o},selection:"single"},{name:uf,label:(0,de.__)("Greater than"),filterText:(e,t)=>(0,ho.createInterpolateElement)((0,de.sprintf)((0,de.__)("<Name>%1$s is greater than: </Name><Value>%2$s</Value>"),e.name,t[0].label),Po),filter(e,t,o){return o===void 0?!0:t.getValue({item:e})>o},selection:"single"},{name:df,label:(0,de.__)("Less than or equal"),filterText:(e,t)=>(0,ho.createInterpolateElement)((0,de.sprintf)((0,de.__)("<Name>%1$s is less than or equal to: </Name><Value>%2$s</Value>"),e.name,t[0].label),Po),filter(e,t,o){return o===void 0?!0:t.getValue({item:e})<=o},selection:"single"},{name:ff,label:(0,de.__)("Greater than or equal"),filterText:(e,t)=>(0,ho.createInterpolateElement)((0,de.sprintf)((0,de.__)("<Name>%1$s is greater than or equal to: </Name><Value>%2$s</Value>"),e.name,t[0].label),Po),filter(e,t,o){return o===void 0?!0:t.getValue({item:e})>=o},selection:"single"},{name:mf,label:(0,de.__)("Before"),filterText:(e,t)=>(0,ho.createInterpolateElement)((0,de.sprintf)((0,de.__)("<Name>%1$s is before: </Name><Value>%2$s</Value>"),e.name,t[0].label),Po),filter(e,t,o){if(o===void 0)return!0;let r=(0,un.getDate)(o);return(0,un.getDate)(t.getValue({item:e}))<r},selection:"single"},{name:pf,label:(0,de.__)("After"),filterText:(e,t)=>(0,ho.createInterpolateElement)((0,de.sprintf)((0,de.__)("<Name>%1$s is after: </Name><Value>%2$s</Value>"),e.name,t[0].label),Po),filter(e,t,o){if(o===void 0)return!0;let r=(0,un.getDate)(o);return(0,un.getDate)(t.getValue({item:e}))>r},selection:"single"},{name:hf,label:(0,de.__)("Before (inc)"),filterText:(e,t)=>(0,ho.createInterpolateElement)((0,de.sprintf)((0,de.__)("<Name>%1$s is on or before: </Name><Value>%2$s</Value>"),e.name,t[0].label),Po),filter(e,t,o){if(o===void 0)return!0;let r=(0,un.getDate)(o);return(0,un.getDate)(t.getValue({item:e}))<=r},selection:"single"},{name:gf,label:(0,de.__)("After (inc)"),filterText:(e,t)=>(0,ho.createInterpolateElement)((0,de.sprintf)((0,de.__)("<Name>%1$s is on or after: </Name><Value>%2$s</Value>"),e.name,t[0].label),Po),filter(e,t,o){if(o===void 0)return!0;let r=(0,un.getDate)(o);return(0,un.getDate)(t.getValue({item:e}))>=r},selection:"single"},{name:ll,label:(0,de.__)("Contains"),filterText:(e,t)=>(0,ho.createInterpolateElement)((0,de.sprintf)((0,de.__)("<Name>%1$s contains: </Name><Value>%2$s</Value>"),e.name,t[0].label),Po),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:cl,label:(0,de.__)("Doesn't contain"),filterText:(e,t)=>(0,ho.createInterpolateElement)((0,de.sprintf)((0,de.__)("<Name>%1$s doesn't contain: </Name><Value>%2$s</Value>"),e.name,t[0].label),Po),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:ul,label:(0,de.__)("Starts with"),filterText:(e,t)=>(0,ho.createInterpolateElement)((0,de.sprintf)((0,de.__)("<Name>%1$s starts with: </Name><Value>%2$s</Value>"),e.name,t[0].label),Po),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:bf,label:(0,de.__)("On"),filterText:(e,t)=>(0,ho.createInterpolateElement)((0,de.sprintf)((0,de.__)("<Name>%1$s is: </Name><Value>%2$s</Value>"),e.name,t[0].label),Po),filter(e,t,o){if(o===void 0)return!0;let r=(0,un.getDate)(o),n=(0,un.getDate)(t.getValue({item:e}));return r.getTime()===n.getTime()},selection:"single"},{name:kf,label:(0,de.__)("Not on"),filterText:(e,t)=>(0,ho.createInterpolateElement)((0,de.sprintf)((0,de.__)("<Name>%1$s is not: </Name><Value>%2$s</Value>"),e.name,t[0].label),Po),filter(e,t,o){if(o===void 0)return!0;let r=(0,un.getDate)(o),n=(0,un.getDate)(t.getValue({item:e}));return r.getTime()!==n.getTime()},selection:"single"}],Nde=e=>Lde.find(t=>t.name===e),Mde=()=>Lde.map(e=>e.name);var Dde=l(A(),1),Vde=l(O(),1);function kt(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 Fde=l(w(),1),{ValidatedCheckboxControl:$Ae}=wt(Dde.privateApis);function zde({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=(0,Vde.useCallback)(()=>{t(a({item:o,value:!s({item:o})}))},[o,s,t,a]);return(0,Fde.jsx)($Ae,{required:!!e.isValid?.required,markWhenOptional:n,customValidity:kt(d,i),hidden:r,label:c,help:u,checked:s({item:o}),onChange:f})}var NR=l(A(),1),jde=l(O(),1);var X6=l(w(),1),{ValidatedComboboxControl:KAe}=wt(NR.privateApis);function MR({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,jde.useCallback)(g=>o(u({item:e,value:g??""})),[e,o,u]),{elements:h,isLoading:p}=Vn({elements:t.elements,getElements:t.getElements});return p?(0,X6.jsx)(NR.Spinner,{}):(0,X6.jsx)(KAe,{required:!!t.isValid?.required,customValidity:kt(d,n),label:i,value:f,help:s,placeholder:a,options:h,onChange:m,hideLabelFromVision:r,allowReset:!0,expandOnFocus:!0})}var zR=l(A(),1),gs=l(O(),1),FR=l(N(),1),vi=l(Cc(),1);var Fk=l(A(),1),Q6=l(O(),1),dl=l(N(),1);var Vk=l(w(),1),YAe={[cn]:[{value:"days",label:(0,dl.__)("Days")},{value:"weeks",label:(0,dl.__)("Weeks")},{value:"months",label:(0,dl.__)("Months")},{value:"years",label:(0,dl.__)("Years")}],[Dn]:[{value:"days",label:(0,dl.__)("Days ago")},{value:"weeks",label:(0,dl.__)("Weeks ago")},{value:"months",label:(0,dl.__)("Months ago")},{value:"years",label:(0,dl.__)("Years ago")}]};function DR({className:e,data:t,field:o,onChange:r,hideLabelFromVision:n,operator:i}){let s=YAe[i===cn?"inThePast":"over"],{id:a,label:c,description:u,getValue:d,setValue:f}=o,m=d({item:t}),{value:h="",unit:p=s[0].value}=m&&typeof m=="object"?m:{},g=(0,Q6.useCallback)(k=>r(f({item:t,value:{value:Number(k),unit:p}})),[r,f,t,p]),b=(0,Q6.useCallback)(k=>r(f({item:t,value:{value:h,unit:k}})),[r,f,t,h]);return(0,Vk.jsx)(Fk.BaseControl,{id:a,className:V(e,"dataviews-controls__relative-date"),label:c,hideLabelFromVision:n,help:u,children:(0,Vk.jsxs)(Le,{direction:"row",gap:"sm",children:[(0,Vk.jsx)(Fk.__experimentalNumberControl,{__next40pxDefaultSize:!0,className:"dataviews-controls__relative-date-number",spinControls:"none",min:1,step:1,value:h,onChange:g}),(0,Vk.jsx)(Fk.SelectControl,{className:"dataviews-controls__relative-date-unit",__next40pxDefaultSize:!0,label:(0,dl.__)("Unit"),value:p,options:s,onChange:b,hideLabelFromVision:!0})]})})}var Ude=l(Cc(),1);function VR(e){if(!e)return null;let t=(0,Ude.getDate)(e);return t&&Lk(t)?t:null}var yf=l(w(),1),{DateCalendar:qAe,ValidatedInputControl:ZAe}=wt(zR.privateApis),XAe=e=>e?(0,vi.dateI18n)("Y-m-d\\TH:i",(0,vi.getDate)(e)):"";function QAe({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=m({item:e}),g=typeof p=="string"?p:void 0,[b,k]=(0,gs.useState)(()=>VR(g)||new Date),v=(0,gs.useRef)(null),y=(0,gs.useRef)(void 0),_=(0,gs.useRef)(null),S=(0,gs.useCallback)(T=>o(f({item:e,value:T})),[e,o,f]);(0,gs.useEffect)(()=>()=>{y.current&&clearTimeout(y.current)},[]);let C=(0,gs.useCallback)(T=>{let I;if(T){let M=(0,vi.dateI18n)("Y-m-d",T),D;g?D=(0,vi.dateI18n)("H:i",(0,vi.getDate)(g)):D=(0,vi.dateI18n)("H:i",T),I=(0,vi.getDate)(`${M}T${D}`).toISOString(),S(I),y.current&&clearTimeout(y.current)}else S(void 0);_.current=v.current&&v.current.ownerDocument.activeElement,y.current=setTimeout(()=>{v.current&&(v.current.focus(),v.current.blur(),S(I),_.current&&_.current instanceof HTMLElement&&_.current.focus())},0)},[S,g]),B=(0,gs.useCallback)(T=>{if(T){let I=(0,vi.getDate)(T);S(I.toISOString());let M=VR(I.toISOString());M&&k(M)}else S(void 0)},[S]),{format:P}=t,R=P.weekStartsOn??(0,vi.getSettings)().l10n.startOfWeek,{timezone:{string:E}}=(0,vi.getSettings)(),L=u;return h?.required&&!n&&!r?L=`${u} (${(0,FR.__)("Required")})`:!h?.required&&n&&!r&&(L=`${u} (${(0,FR.__)("Optional")})`),(0,yf.jsx)(zR.BaseControl,{id:c,label:L,help:d,hideLabelFromVision:r,children:(0,yf.jsxs)(Le,{direction:"column",gap:"lg",children:[(0,yf.jsx)(ZAe,{ref:v,__next40pxDefaultSize:!0,required:!!h?.required,customValidity:kt(h,i),type:"datetime-local",label:(0,FR.__)("Date time"),hideLabelFromVision:!0,value:XAe(g),onChange:B}),!a&&(0,yf.jsx)(qAe,{style:{width:"100%"},selected:g&&VR(g)||void 0,onSelect:C,month:b,onMonthChange:k,timeZone:E||void 0,weekStartsOn:R})]})})}function Hde({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,operator:i,validity:s,config:a}){return i===cn||i===Dn?(0,yf.jsx)(DR,{className:"dataviews-controls__datetime",data:e,field:t,onChange:o,hideLabelFromVision:r,operator:i}):(0,yf.jsx)(QAe,{data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:s,config:a})}var zr=l(A(),1),it=l(O(),1),Xo=l(N(),1),Fr=l(Cc(),1);var vt=l(w(),1),{DateCalendar:JAe,DateRangeCalendar:eLe}=wt(zr.privateApis),tLe=[{id:"today",label:(0,Xo.__)("Today"),getValue:()=>(0,Fr.getDate)(null)},{id:"yesterday",label:(0,Xo.__)("Yesterday"),getValue:()=>{let e=(0,Fr.getDate)(null);return Vp(e,1)}},{id:"past-week",label:(0,Xo.__)("Past week"),getValue:()=>{let e=(0,Fr.getDate)(null);return Vp(e,7)}},{id:"past-month",label:(0,Xo.__)("Past month"),getValue:()=>{let e=(0,Fr.getDate)(null);return AR(e,1)}}],oLe=[{id:"last-7-days",label:(0,Xo.__)("Last 7 days"),getValue:()=>{let e=(0,Fr.getDate)(null);return[Vp(e,7),e]}},{id:"last-30-days",label:(0,Xo.__)("Last 30 days"),getValue:()=>{let e=(0,Fr.getDate)(null);return[Vp(e,30),e]}},{id:"month-to-date",label:(0,Xo.__)("Month to date"),getValue:()=>{let e=(0,Fr.getDate)(null);return[fde(e),e]}},{id:"last-year",label:(0,Xo.__)("Last year"),getValue:()=>{let e=(0,Fr.getDate)(null);return[LR(e,1),e]}},{id:"year-to-date",label:(0,Xo.__)("Year to date"),getValue:()=>{let e=(0,Fr.getDate)(null);return[PR(e),e]}}],zk=e=>{if(!e)return null;let t=(0,Fr.getDate)(e);return t&&Lk(t)?t:null},J6=e=>e?typeof e=="string"?e:q6(e,"yyyy-MM-dd"):"";function Gde({field:e,validity:t,inputRefs:o,isTouched:r,setIsTouched:n,children:i}){let{isValid:s}=e,[a,c]=(0,it.useState)(void 0),u=(0,it.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,it.useEffect)(()=>{let f=Array.isArray(o)?o:[o],m=t?kt(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,it.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,it.useEffect)(()=>{if(!r)return;let f=t?kt(s,t):void 0;f?c(f):u()},[r,s,t,u]),(0,vt.jsxs)("div",{onBlur:f=>{r||(!f.relatedTarget||!f.currentTarget.contains(f.relatedTarget))&&n(!0)},children:[i,(0,vt.jsx)("div",{"aria-live":"polite",children:a&&(0,vt.jsxs)("p",{className:V("components-validated-control__indicator",a.type==="invalid"?"is-invalid":void 0),children:[(0,vt.jsx)(zr.Icon,{className:"components-validated-control__indicator-icon",icon:qf,size:16,fill:"currentColor"}),a.message]})})]})}function rLe({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,p]=(0,it.useState)(null),g=m.weekStartsOn??(0,Fr.getSettings)().l10n.startOfWeek,b=d({item:e}),k=typeof b=="string"?b:void 0,[v,y]=(0,it.useState)(()=>zk(k)||new Date),[_,S]=(0,it.useState)(!1),C=(0,it.useRef)(null),B=(0,it.useCallback)(I=>o(u({item:e,value:I})),[e,o,u]),P=(0,it.useCallback)(I=>{let M=I?q6(I,"yyyy-MM-dd"):void 0;B(M),p(null),S(!0)},[B]),R=(0,it.useCallback)(I=>{let M=I.getValue(),D=J6(M);y(M),B(D),p(I.id),S(!0)},[B]),E=(0,it.useCallback)(I=>{if(B(I),I){let M=zk(I);M&&y(M)}p(null),S(!0)},[B]),{timezone:{string:L}}=(0,Fr.getSettings)(),T=a;return f?.required&&!n?T=`${a} (${(0,Xo.__)("Required")})`:!f?.required&&n&&(T=`${a} (${(0,Xo.__)("Optional")})`),(0,vt.jsx)(Gde,{field:t,validity:i,inputRefs:C,isTouched:_,setIsTouched:S,children:(0,vt.jsx)(zr.BaseControl,{id:s,className:"dataviews-controls__date",label:T,help:c,hideLabelFromVision:r,children:(0,vt.jsxs)(Le,{direction:"column",gap:"lg",children:[(0,vt.jsxs)(Le,{direction:"row",gap:"sm",wrap:"wrap",justify:"flex-start",children:[tLe.map(I=>{let M=h===I.id;return(0,vt.jsx)(zr.Button,{className:"dataviews-controls__date-preset",variant:"tertiary",isPressed:M,size:"small",onClick:()=>R(I),children:I.label},I.id)}),(0,vt.jsx)(zr.Button,{className:"dataviews-controls__date-preset",variant:"tertiary",isPressed:!h,size:"small",disabled:!!h,accessibleWhenDisabled:!1,children:(0,Xo.__)("Custom")})]}),(0,vt.jsx)(zr.__experimentalInputControl,{__next40pxDefaultSize:!0,ref:C,type:"date",label:(0,Xo.__)("Date"),hideLabelFromVision:!0,value:k,onChange:E,required:!!t.isValid?.required}),(0,vt.jsx)(JAe,{style:{width:"100%"},selected:k&&zk(k)||void 0,onSelect:P,month:v,onMonthChange:y,timeZone:L||void 0,weekStartsOn:g})]})})})}function nLe({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){let{id:s,label:a,description:c,getValue:u,setValue:d,format:f}=t,m,h=u({item:e});Array.isArray(h)&&h.length===2&&h.every(D=>typeof D=="string")&&(m=h);let p=f.weekStartsOn??(0,Fr.getSettings)().l10n.startOfWeek,g=(0,it.useCallback)(D=>{o(d({item:e,value:D}))},[e,o,d]),[b,k]=(0,it.useState)(null),v=(0,it.useMemo)(()=>{if(!m)return{from:void 0,to:void 0};let[D,U]=m;return{from:zk(D)||void 0,to:zk(U)||void 0}},[m]),[y,_]=(0,it.useState)(()=>v.from||new Date),[S,C]=(0,it.useState)(!1),B=(0,it.useRef)(null),P=(0,it.useRef)(null),R=(0,it.useCallback)((D,U)=>{D&&U?g([J6(D),J6(U)]):!D&&!U&&g(void 0)},[g]),E=(0,it.useCallback)(D=>{R(D?.from,D?.to),k(null),C(!0)},[R]),L=(0,it.useCallback)(D=>{let[U,j]=D.getValue();_(U),R(U,j),k(D.id),C(!0)},[R]),T=(0,it.useCallback)((D,U)=>{let[j,H]=m||[void 0,void 0];if(R(D==="from"?U:j,D==="to"?U:H),U){let ie=zk(U);ie&&_(ie)}k(null),C(!0)},[m,R]),{timezone:I}=(0,Fr.getSettings)(),M=a;return t.isValid?.required&&!n?M=`${a} (${(0,Xo.__)("Required")})`:!t.isValid?.required&&n&&(M=`${a} (${(0,Xo.__)("Optional")})`),(0,vt.jsx)(Gde,{field:t,validity:i,inputRefs:[B,P],isTouched:S,setIsTouched:C,children:(0,vt.jsx)(zr.BaseControl,{id:s,className:"dataviews-controls__date",label:M,help:c,hideLabelFromVision:r,children:(0,vt.jsxs)(Le,{direction:"column",gap:"lg",children:[(0,vt.jsxs)(Le,{direction:"row",gap:"sm",wrap:"wrap",justify:"flex-start",children:[oLe.map(D=>{let U=b===D.id;return(0,vt.jsx)(zr.Button,{className:"dataviews-controls__date-preset",variant:"tertiary",isPressed:U,size:"small",onClick:()=>L(D),children:D.label},D.id)}),(0,vt.jsx)(zr.Button,{className:"dataviews-controls__date-preset",variant:"tertiary",isPressed:!b,size:"small",accessibleWhenDisabled:!1,disabled:!!b,children:(0,Xo.__)("Custom")})]}),(0,vt.jsxs)(Le,{direction:"row",gap:"sm",justify:"space-between",className:"dataviews-controls__date-range-inputs",children:[(0,vt.jsx)(zr.__experimentalInputControl,{__next40pxDefaultSize:!0,ref:B,type:"date",label:(0,Xo.__)("From"),hideLabelFromVision:!0,value:m?.[0],onChange:D=>T("from",D),required:!!t.isValid?.required}),(0,vt.jsx)(zr.__experimentalInputControl,{__next40pxDefaultSize:!0,ref:P,type:"date",label:(0,Xo.__)("To"),hideLabelFromVision:!0,value:m?.[1],onChange:D=>T("to",D),required:!!t.isValid?.required})]}),(0,vt.jsx)(eLe,{style:{width:"100%"},selected:v,onSelect:E,month:y,onMonthChange:_,timeZone:I.string||void 0,weekStartsOn:p})]})})})}function Wde({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,operator:i,validity:s}){return i===cn||i===Dn?(0,vt.jsx)(DR,{className:"dataviews-controls__date",data:e,field:t,onChange:o,hideLabelFromVision:r,operator:i}):i===ln?(0,vt.jsx)(nLe,{data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:s}):(0,vt.jsx)(rLe,{data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:s})}var jR=l(A(),1),$de=l(O(),1);var ez=l(w(),1),{ValidatedSelectControl:iLe}=wt(jR.privateApis);function UR({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=s==="array",h=u({item:e})??(m?[]:""),p=(0,$de.useCallback)(k=>o(d({item:e,value:k})),[e,o,d]),{elements:g,isLoading:b}=Vn({elements:t.elements,getElements:t.getElements});return b?(0,ez.jsx)(jR.Spinner,{}):(0,ez.jsx)(iLe,{required:!!t.isValid?.required,markWhenOptional:n,customValidity:kt(f,i),label:a,value:h,help:c,options:g,onChange:p,__next40pxDefaultSize:!0,hideLabelFromVision:r,multiple:m})}var tz=l(w(),1),sLe=10;function Kde(e){let{field:t}=e,{elements:o}=Vn({elements:t.elements,getElements:t.getElements});return o.length>=sLe?(0,tz.jsx)(MR,{...e}):(0,tz.jsx)(UR,{...e})}var GR=l(A(),1);var Yde=l(A(),1),qde=l(O(),1);var Zde=l(w(),1),{ValidatedInputControl:aLe}=wt(Yde.privateApis);function fl({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=(0,qde.useCallback)(k=>o(h({item:e,value:k})),[e,h,o]);return(0,Zde.jsx)(aLe,{required:!!p.required,markWhenOptional:n,customValidity:kt(p,c),label:u,placeholder:d,value:g??"",help:f,onChange:b,hideLabelFromVision:r,type:i,prefix:s,suffix:a,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 HR=l(w(),1);function Xde({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){return(0,HR.jsx)(fl,{data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i,type:"email",prefix:(0,HR.jsx)(GR.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,HR.jsx)(GR.Icon,{icon:uL})})})}var $R=l(A(),1);var WR=l(w(),1);function Qde({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){return(0,WR.jsx)(fl,{data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i,type:"tel",prefix:(0,WR.jsx)($R.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,WR.jsx)($R.Icon,{icon:Ov})})})}var YR=l(A(),1);var KR=l(w(),1);function Jde({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){return(0,KR.jsx)(fl,{data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i,type:"url",prefix:(0,KR.jsx)(YR.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,KR.jsx)(YR.Icon,{icon:kn})})})}var jc=l(A(),1),a0=l(O(),1),qR=l(N(),1);var _f=l(w(),1),{ValidatedNumberControl:lLe}=wt(jc.privateApis);function efe(e){if(e===""||e===void 0)return"";let t=Number(e);return Number.isFinite(t)?t:""}function cLe({value:e,onChange:t,hideLabelFromVision:o,step:r}){let[n="",i=""]=e,s=(0,a0.useCallback)(c=>t([efe(c),i]),[t,i]),a=(0,a0.useCallback)(c=>t([n,efe(c)]),[t,n]);return(0,_f.jsx)(jc.BaseControl,{help:(0,qR.__)("The max. value must be greater than the min. value."),children:(0,_f.jsxs)(jc.Flex,{direction:"row",gap:4,children:[(0,_f.jsx)(jc.__experimentalNumberControl,{label:(0,qR.__)("Min."),value:n,max:i?Number(i)-r:void 0,onChange:s,__next40pxDefaultSize:!0,hideLabelFromVision:o,step:r}),(0,_f.jsx)(jc.__experimentalNumberControl,{label:(0,qR.__)("Max."),value:i,min:n?Number(n)+r:void 0,onChange:a,__next40pxDefaultSize:!0,hideLabelFromVision:o,step:r})]})})}function ZR({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=(0,a0.useCallback)(k=>{o(m({item:e,value:["",void 0].includes(k)?void 0:Number(k)}))},[e,o,m]),b=(0,a0.useCallback)(k=>{o(m({item:e,value:k}))},[e,o,m]);if(i===ln){let k=["",""];return Array.isArray(p)&&p.length===2&&p.every(v=>typeof v=="number"||v==="")&&(k=p),(0,_f.jsx)(cLe,{value:k,onChange:b,hideLabelFromVision:r,step:c})}return(0,_f.jsx)(lLe,{required:!!h.required,markWhenOptional:n,customValidity:kt(h,s),label:u,help:d,value:p,onChange:g,__next40pxDefaultSize:!0,hideLabelFromVision:r,step:c,min:h.min?h.min.constraint:void 0,max:h.max?h.max.constraint:void 0})}var tfe=l(w(),1);function ofe(e){return(0,tfe.jsx)(ZR,{...e})}var rfe=l(w(),1);function nfe(e){return(0,rfe.jsx)(ZR,{...e})}var XR=l(A(),1),ife=l(O(),1);var oz=l(w(),1),{ValidatedRadioControl:uLe}=wt(XR.privateApis);function sfe({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){let{label:s,description:a,getValue:c,setValue:u,isValid:d}=t,{elements:f,isLoading:m}=Vn({elements:t.elements,getElements:t.getElements}),h=c({item:e}),p=(0,ife.useCallback)(g=>o(u({item:e,value:g})),[e,o,u]);return m?(0,oz.jsx)(XR.Spinner,{}):(0,oz.jsx)(uLe,{required:!!t.isValid?.required,markWhenOptional:n,customValidity:kt(d,i),label:s,help:a,onChange:p,options:f,selected:h,hideLabelFromVision:r})}var rz=l(O(),1);var afe=l(w(),1);function lfe({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,config:i,validity:s}){let{prefix:a,suffix:c}=i||{};return(0,afe.jsx)(fl,{data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:s,prefix:a?(0,rz.createElement)(a):void 0,suffix:c?(0,rz.createElement)(c):void 0})}var cfe=l(A(),1),ufe=l(O(),1);var dfe=l(w(),1),{ValidatedToggleControl:dLe}=wt(cfe.privateApis);function ffe({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=(0,ufe.useCallback)(()=>{t(u({item:o,value:!c({item:o})}))},[t,u,o,c]);return(0,dfe.jsx)(dLe,{required:!!d.required,markWhenOptional:n,customValidity:kt(d,i),hidden:r,label:s,help:a,checked:c({item:o}),onChange:f})}var mfe=l(A(),1),pfe=l(O(),1);var hfe=l(w(),1),{ValidatedTextareaControl:fLe}=wt(mfe.privateApis);function gfe({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,config:i,validity:s}){let{rows:a=4}=i||{},{label:c,placeholder:u,description:d,setValue:f,isValid:m}=t,h=t.getValue({item:e}),p=(0,pfe.useCallback)(g=>o(f({item:e,value:g})),[e,o,f]);return(0,hfe.jsx)(fLe,{required:!!m.required,markWhenOptional:n,customValidity:kt(m,s),label:c,placeholder:u,value:h??"",help:d,onChange:p,rows:a,minLength:m.minLength?m.minLength.constraint:void 0,maxLength:m.maxLength?m.maxLength.constraint:void 0,__next40pxDefaultSize:!0,hideLabelFromVision:r})}var jk=l(A(),1),bfe=l(O(),1);var QR=l(w(),1),{ValidatedToggleGroupControl:mLe}=wt(jk.privateApis);function kfe({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){let{getValue:s,setValue:a,isValid:c}=t,u=s({item:e}),d=(0,bfe.useCallback)(p=>o(a({item:e,value:p})),[e,o,a]),{elements:f,isLoading:m}=Vn({elements:t.elements,getElements:t.getElements});if(m)return(0,QR.jsx)(jk.Spinner,{});if(f.length===0)return null;let h=f.find(p=>p.value===u);return(0,QR.jsx)(mLe,{required:!!t.isValid?.required,markWhenOptional:n,customValidity:kt(c,i),__next40pxDefaultSize:!0,isBlock:!0,label:t.label,help:h?.description||t.description,onChange:d,value:u,hideLabelFromVision:r,children:f.map(p=>(0,QR.jsx)(jk.__experimentalToggleGroupControlOption,{label:p.label,value:p.value},p.value))})}var JR=l(A(),1),eO=l(O(),1);var l0=l(w(),1),{ValidatedFormTokenField:pLe}=wt(JR.privateApis);function vfe({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){let{label:s,placeholder:a,getValue:c,setValue:u,isValid:d}=t,f=c({item:e}),{elements:m,isLoading:h}=Vn({elements:t.elements,getElements:t.getElements}),p=(0,eO.useMemo)(()=>Array.isArray(f)?f.map(b=>m?.find(v=>v.value===b)||{value:b,label:b}):[],[f,m]),g=(0,eO.useCallback)(b=>{let k=b.map(v=>typeof v=="object"&&"value"in v?v.value:v);o(u({item:e,value:k}))},[o,u,e]);return h?(0,l0.jsx)(JR.Spinner,{}):(0,l0.jsx)(pLe,{required:!!d?.required,markWhenOptional:n,customValidity:kt(d,i),label:r?void 0:s,value:p,onChange:g,placeholder:a,suggestions:m?.map(b=>b.value),__experimentalValidateInput:b=>t.isValid?.elements&&m?m.some(k=>k.value===b||k.label===b):!0,__experimentalExpandOnFocus:m&&m.length>0,__experimentalShowHowTo:!t.isValid?.elements,displayTransform:b=>typeof b=="object"&&"label"in b?b.label:typeof b=="string"&&m&&m.find(v=>v.value===b)?.label||b,__experimentalRenderItem:({item:b})=>{if(typeof b=="string"&&m){let k=m.find(v=>v.value===b);return(0,l0.jsx)("span",{children:k?.label||b})}return(0,l0.jsx)("span",{children:b})}})}var Fn=l(A(),1),nz=l(O(),1),yfe=l(N(),1);var Uc=l(w(),1),{ValidatedInputControl:hLe}=wt(Fn.privateApis),gLe=({color:e,onColorChange:t})=>{let o=e&&Et(e).isValid()?e:"#ffffff";return(0,Uc.jsx)(Fn.Dropdown,{className:"dataviews-controls__color-picker-dropdown",popoverProps:{resize:!1},renderToggle:({onToggle:r})=>(0,Uc.jsx)(Fn.Button,{onClick:r,"aria-label":(0,yfe.__)("Open color picker"),size:"small",icon:()=>(0,Uc.jsx)(Fn.ColorIndicator,{colorValue:o})}),renderContent:()=>(0,Uc.jsx)(Fn.__experimentalDropdownContentWrapper,{paddingSize:"none",children:(0,Uc.jsx)(Fn.ColorPicker,{color:o,onChange:t,enableAlpha:!0})})})};function _fe({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.getValue({item:e})||"",m=(0,nz.useCallback)(p=>{o(u({item:e,value:p}))},[e,o,u]),h=(0,nz.useCallback)(p=>{o(u({item:e,value:p||""}))},[e,o,u]);return(0,Uc.jsx)(hLe,{required:!!t.isValid?.required,markWhenOptional:n,customValidity:kt(d,i),label:s,placeholder:a,value:f,help:c,onChange:h,hideLabelFromVision:r,type:"text",prefix:(0,Uc.jsx)(Fn.__experimentalInputControlPrefixWrapper,{variant:"control",children:(0,Uc.jsx)(gLe,{color:f,onColorChange:m})})})}var oO=l(A(),1),rO=l(O(),1),iz=l(N(),1);var tO=l(w(),1);function Sfe({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){let[s,a]=(0,rO.useState)(!1),c=(0,rO.useCallback)(()=>{a(u=>!u)},[]);return(0,tO.jsx)(fl,{data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i,type:s?"text":"password",suffix:(0,tO.jsx)(oO.__experimentalInputControlSuffixWrapper,{variant:"control",children:(0,tO.jsx)(oO.Button,{icon:s?Es:Qf,onClick:c,size:"small",label:s?(0,iz.__)("Hide password"):(0,iz.__)("Show password")})})})}function nO(e){return Array.isArray(e.elements)&&e.elements.length>0||typeof e.getElements=="function"}var wfe=l(w(),1),xfe={adaptiveSelect:Kde,array:vfe,checkbox:zde,color:_fe,combobox:MR,datetime:Hde,date:Wde,email:Xde,telephone:Qde,url:Jde,integer:ofe,number:nfe,password:Sfe,radio:sfe,select:UR,text:lfe,toggle:ffe,textarea:gfe,toggleGroup:kfe};function bLe(e){return e&&typeof e=="object"&&typeof e.control=="string"}function kLe(e){let{control:t,...o}=e,r=iO(t);return r===null?null:function(i){return(0,wfe.jsx)(r,{...i,config:o})}}function Cfe(e,t){return typeof e.Edit=="function"?e.Edit:typeof e.Edit=="string"?iO(e.Edit):bLe(e.Edit)?kLe(e.Edit):nO(e)&&e.type!=="array"?iO("adaptiveSelect"):t===null?null:iO(t)}function iO(e){return Object.keys(xfe).includes(e)?xfe[e]:null}function vLe(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 Bfe=vLe;var yLe=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},Efe=yLe;var _Le=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},Tfe=_Le;var Pfe=l(N(),1);function sO({item:e,field:t}){let{elements:o,isLoading:r}=Vn({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 Ife=l(w(),1);function go({item:e,field:t}){return t.hasElements?(0,Ife.jsx)(sO,{item:e,field:t}):t.getValueFormatted({item:e,field:t})}var ml=(e,t,o)=>o==="asc"?e.localeCompare(t):t.localeCompare(e);function bo(e,t){let o=t.getValue({item:e});return![void 0,"",null].includes(o)}function pl(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 hl(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 gl(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 Ct(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 SLe({item:e,field:t}){return t.getValue({item:e})}var dn=SLe;var xLe=/^[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 wLe(e,t){let o=t.getValue({item:e});return![void 0,"",null].includes(o)&&!xLe.test(o)?(0,Pfe.__)("Value must be a valid email address."):null}var Rfe={type:"email",render:go,Edit:"email",sort:ml,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Ht,Gt],validOperators:[to,oo,ll,cl,ul,Ht,Gt,Dr,Vr],format:{},getValueFormatted:dn,validate:{required:bo,pattern:gl,minLength:pl,maxLength:hl,elements:Ct,custom:wLe}};var Ofe=l(N(),1);var Uk=(e,t,o)=>o==="asc"?e-t:t-e;function aO(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 lO(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 Afe={separatorThousand:","};function CLe({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=Afe: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 BLe(e,t){let o=t.getValue({item:e});return![void 0,"",null].includes(o)&&!Number.isInteger(o)?(0,Ofe.__)("Value must be an integer."):null}var Lfe={type:"integer",render:go,Edit:"integer",sort:Uk,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[to,oo,cf,uf,df,ff,ln],validOperators:[to,oo,cf,uf,df,ff,ln,Ht,Gt,Dr,Vr],format:Afe,getValueFormatted:CLe,validate:{required:bo,min:aO,max:lO,elements:Ct,custom:BLe}};var Nfe=l(N(),1);var Mfe={separatorThousand:",",separatorDecimal:".",decimals:2};function ELe({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=Mfe: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 TLe(e){return e===""||e===void 0||e===null}function ILe(e,t){let o=t.getValue({item:e});return!TLe(o)&&!Number.isFinite(o)?(0,Nfe.__)("Value must be a number."):null}var Dfe={type:"number",render:go,Edit:"number",sort:Uk,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[to,oo,cf,uf,df,ff,ln],validOperators:[to,oo,cf,uf,df,ff,ln,Ht,Gt,Dr,Vr],format:Mfe,getValueFormatted:ELe,validate:{required:bo,min:aO,max:lO,elements:Ct,custom:ILe}};var Vfe={type:"text",render:go,Edit:"text",sort:ml,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Ht,Gt],validOperators:[to,oo,ll,cl,ul,Ht,Gt,Dr,Vr],format:{},getValueFormatted:dn,validate:{required:bo,pattern:gl,minLength:pl,maxLength:hl,elements:Ct}};var Fp=l(Cc(),1);var Ffe={datetime:(0,Fp.getSettings)().formats.datetime,weekStartsOn:(0,Fp.getSettings)().l10n.startOfWeek};function PLe({item:e,field:t}){let o=t.getValue({item:e});if(["",void 0,null].includes(o))return"";let r;return t.type!=="datetime"?r=Ffe:r=t.format,(0,Fp.dateI18n)(r.datetime,(0,Fp.getDate)(o))}var RLe=(e,t,o)=>{let r=new Date(e).getTime(),n=new Date(t).getTime();return o==="asc"?r-n:n-r},zfe={type:"datetime",render:go,Edit:"datetime",sort:RLe,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[bf,kf,mf,pf,hf,gf,cn,Dn],validOperators:[bf,kf,mf,pf,hf,gf,cn,Dn],format:Ffe,getValueFormatted:PLe,validate:{required:bo,elements:Ct}};var zp=l(Cc(),1);var jfe={date:(0,zp.getSettings)().formats.date,weekStartsOn:(0,zp.getSettings)().l10n.startOfWeek};function OLe({item:e,field:t}){let o=t.getValue({item:e});if(["",void 0,null].includes(o))return"";let r;return t.type!=="date"?r=jfe:r=t.format,(0,zp.dateI18n)(r.date,(0,zp.getDate)(o))}var ALe=(e,t,o)=>{let r=new Date(e).getTime(),n=new Date(t).getTime();return o==="asc"?r-n:n-r},Ufe={type:"date",render:go,Edit:"date",sort:ALe,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[bf,kf,mf,pf,hf,gf,cn,Dn,ln],validOperators:[bf,kf,mf,pf,hf,gf,cn,Dn,ln],format:jfe,getValueFormatted:OLe,validate:{required:bo,elements:Ct}};var cO=l(N(),1);function Hfe(e,t){return t.getValue({item:e})===!0}function LLe({item:e,field:t}){let o=t.getValue({item:e});return o===!0?(0,cO.__)("True"):o===!1?(0,cO.__)("False"):""}function NLe(e,t){let o=t.getValue({item:e});return![void 0,"",null].includes(o)&&![!0,!1].includes(o)?(0,cO.__)("Value must be true, false, or undefined"):null}var MLe=(e,t,o)=>{let r=!!e;return r===!!t?0:o==="asc"?r?1:-1:r?-1:1},Gfe={type:"boolean",render:go,Edit:"checkbox",sort:MLe,validate:{required:Hfe,elements:Ct,custom:NLe},enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[to,oo],validOperators:[to,oo],format:{},getValueFormatted:LLe};var Wfe={type:"media",render:()=>null,Edit:null,sort:()=>0,enableSorting:!1,enableGlobalSearch:!1,defaultOperators:[],validOperators:[],format:{},getValueFormatted:dn,validate:{}};var sz=l(N(),1);function $fe(e,t){let o=t.getValue({item:e});return Array.isArray(o)&&o.length>0&&o.every(r=>![void 0,"",null].includes(r))}function Kfe({item:e,field:t}){let o=t.getValue({item:e});return(Array.isArray(o)?o:[]).join(", ")}function DLe({item:e,field:t}){return Kfe({item:e,field:t})}function VLe(e,t){let o=t.getValue({item:e});return![void 0,"",null].includes(o)&&!Array.isArray(o)?(0,sz.__)("Value must be an array."):o.every(r=>typeof r=="string")?null:(0,sz.__)("Every value must be a string.")}var FLe=(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)},Yfe={type:"array",render:DLe,Edit:"array",sort:FLe,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Ht,Gt],validOperators:[Ht,Gt,Dr,Vr],format:{},getValueFormatted:Kfe,validate:{required:$fe,elements:Ct,custom:VLe}};function zLe({item:e,field:t}){return t.getValue({item:e})?"\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022":""}var qfe={type:"password",render:go,Edit:"password",sort:()=>0,enableSorting:!1,enableGlobalSearch:!1,defaultOperators:[],validOperators:[],format:{},getValueFormatted:zLe,validate:{required:bo,pattern:gl,minLength:pl,maxLength:hl,elements:Ct}};var Zfe={type:"telephone",render:go,Edit:"telephone",sort:ml,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Ht,Gt],validOperators:[to,oo,ll,cl,ul,Ht,Gt,Dr,Vr],format:{},getValueFormatted:dn,validate:{required:bo,pattern:gl,minLength:pl,maxLength:hl,elements:Ct}};var Xfe=l(N(),1);var Hk=l(w(),1);function jLe({item:e,field:t}){if(t.hasElements)return(0,Hk.jsx)(sO,{item:e,field:t});let o=dn({item:e,field:t});return!o||!Et(o).isValid()?o:(0,Hk.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[(0,Hk.jsx)("div",{style:{width:"16px",height:"16px",borderRadius:"50%",backgroundColor:o,border:"1px solid #ddd",flexShrink:0}}),(0,Hk.jsx)("span",{children:o})]})}function ULe(e,t){let o=t.getValue({item:e});return![void 0,"",null].includes(o)&&!Et(o).isValid()?(0,Xfe.__)("Value must be a valid color."):null}var HLe=(e,t,o)=>{let r=Et(e),n=Et(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},Qfe={type:"color",render:jLe,Edit:"color",sort:HLe,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Ht,Gt],validOperators:[to,oo,Ht,Gt],format:{},getValueFormatted:dn,validate:{required:bo,elements:Ct,custom:ULe}};var Jfe={type:"url",render:go,Edit:"url",sort:ml,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Ht,Gt],validOperators:[to,oo,ll,cl,ul,Ht,Gt,Dr,Vr],format:{},getValueFormatted:dn,validate:{required:bo,pattern:gl,minLength:pl,maxLength:hl,elements:Ct}};var GLe=(e,t,o)=>typeof e=="number"&&typeof t=="number"?Uk(e,t,o):ml(e,t,o),eme={render:go,Edit:null,sort:GLe,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[to,oo],validOperators:Mde(),format:{},getValueFormatted:dn,validate:{required:bo,elements:Ct}};function tme(e,t){let o;e.isValid?.required===!0&&t.validate.required!==void 0&&(o={constraint:!0,validate:t.validate.required});let r;(e.isValid?.elements===!0||e.isValid?.elements===void 0&&(e.elements||e.getElements))&&t.validate.elements!==void 0&&(r={constraint:!0,validate:t.validate.elements});let n;typeof e.isValid?.min=="number"&&t.validate.min!==void 0&&(n={constraint:e.isValid.min,validate:t.validate.min});let i;typeof e.isValid?.max=="number"&&t.validate.max!==void 0&&(i={constraint:e.isValid.max,validate:t.validate.max});let s;typeof e.isValid?.minLength=="number"&&t.validate.minLength!==void 0&&(s={constraint:e.isValid.minLength,validate:t.validate.minLength});let a;typeof e.isValid?.maxLength=="number"&&t.validate.maxLength!==void 0&&(a={constraint:e.isValid.maxLength,validate:t.validate.maxLength});let c;e.isValid?.pattern!==void 0&&t.validate.pattern!==void 0&&(c={constraint:e.isValid?.pattern,validate:t.validate.pattern});let u=e.isValid?.custom??t.validate.custom;return{required:o,elements:r,min:n,max:i,minLength:s,maxLength:a,pattern:c,custom:u}}function ome(e){return e.validOperators.reduce((t,o)=>{let r=Nde(o);return r?.filter&&(t[o]=r.filter),t},{})}function WLe(e,t){return{...t.format,...e.format}}var rme=WLe;function $Le(e){let t=[Rfe,Lfe,Dfe,Vfe,zfe,Ufe,Gfe,Wfe,Yfe,qfe,Zfe,Qfe,Jfe].find(o=>o?.type===e);return t||eme}function c0(e){return e.map(t=>{let o=$Le(t.type),r=t.getValue||Efe(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||Tfe(t.id),elements:t.elements,getElements:t.getElements,hasElements:nO(t),isVisible:t.isVisible,enableHiding:t.enableHiding??!0,readOnly:t.readOnly??!1,type:o.type,render:t.render??o.render,Edit:Cfe(t,o.Edit),sort:n,enableSorting:t.enableSorting??o.enableSorting,enableGlobalSearch:t.enableGlobalSearch??o.enableGlobalSearch,isValid:tme(t,o),filterBy:Bfe(t,o.defaultOperators,o.validOperators),filter:ome(o),format:rme(t,o),getValueFormatted:t.getValueFormatted??o.getValueFormatted}})}var dz=l(O(),1);var nme=l(O(),1),ime=l(w(),1),az=(0,nme.createContext)({fields:[]});az.displayName="DataFormContext";function sme({fields:e,children:t}){return(0,ime.jsx)(az.Provider,{value:{fields:e},children:t})}var bs=az;var vO=l(O(),1);var dO=l(O(),1),d0=l(A(),1);var u0=l(N(),1),jr={type:"regular",labelPosition:"top"},KLe=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 ame(e){let t=jr;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,u0.__)("Apply"),cancelLabel:n.cancelLabel?.trim()||(0,u0.__)("Cancel")}:n==="modal"?i={type:"modal",applyLabel:(0,u0.__)("Apply"),cancelLabel:(0,u0.__)("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:KLe(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 lme(e){let t=ame(e?.layout),o=(e.fields??[]).map(r=>{if(typeof r=="string")return{id:r,layout:t};let n=r.layout?ame(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:lme({fields:r.children,layout:jr}).fields}}});return{layout:t,fields:o}}var uO=lme;var Wt=l(w(),1);function YLe({title:e}){return(0,Wt.jsx)(Le,{direction:"column",className:"dataforms-layouts-regular__header",gap:"lg",children:(0,Wt.jsx)(Le,{direction:"row",align:"center",children:(0,Wt.jsx)(d0.__experimentalHeading,{level:2,size:13,children:e})})})}function cme({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){let{fields:s}=(0,dO.useContext)(bs),a=t.layout,c=(0,dO.useMemo)(()=>({layout:jr,fields:t.children?t.children:[]}),[t]);if(t.children)return(0,Wt.jsxs)(Wt.Fragment,{children:[!r&&t.label&&(0,Wt.jsx)(YLe,{title:t.label}),(0,Wt.jsx)(zn,{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,Wt.jsxs)(Le,{direction:"row",className:"dataforms-layouts-regular__field",gap:"sm",children:[(0,Wt.jsx)("div",{className:V("dataforms-layouts-regular__field-label",`dataforms-layouts-regular__field-label--label-position-${u}`),children:(0,Wt.jsx)(d0.BaseControl.VisualLabel,{children:d.label})}),(0,Wt.jsx)("div",{className:"dataforms-layouts-regular__field-control",children:d.readOnly===!0?(0,Wt.jsx)(d.render,{item:e,field:d}):(0,Wt.jsx)(d.Edit,{data:e,field:d,onChange:o,hideLabelFromVision:!0,markWhenOptional:n,validity:i},d.id)})]}):(0,Wt.jsx)("div",{className:"dataforms-layouts-regular__field",children:d.readOnly===!0?(0,Wt.jsx)(Wt.Fragment,{children:(0,Wt.jsxs)(Wt.Fragment,{children:[!r&&u!=="none"&&(0,Wt.jsx)(d0.BaseControl.VisualLabel,{children:d.label}),(0,Wt.jsx)(d.render,{item:e,field:d})]})}):(0,Wt.jsx)(d.Edit,{data:e,field:d,onChange:o,hideLabelFromVision:u==="none"?!0:r,markWhenOptional:n,validity:i})})}var cz=l(R3(),1),jp=l(A(),1),fa=l(O(),1),hO=l(X(),1);var Wk=l(A(),1),Gk=l(N(),1);var pme=l(X(),1),hme=l(O(),1);function qLe(e,t){return V("dataforms-layouts-panel__field-label",`dataforms-layouts-panel__field-label--label-position-${e}`,{"has-error":t})}var ume=qLe;var fO=l(A(),1);var f0=l(w(),1);function ZLe(e,t,o){return e?(0,f0.jsx)(fO.Tooltip,{text:t,placement:"top",children:(0,f0.jsxs)("span",{className:"dataforms-layouts-panel__field-label-error-content",children:[(0,f0.jsx)(fO.Icon,{icon:qf,size:16}),o]})}):o}var dme=ZLe;function fme(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=fme(o);if(r)return r}}var mme=fme;var yi=l(w(),1);function m0({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=mme(n),m=i&&!!f,h=ume(u,m),p=dme(m,f,o),g=V("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,pme.useInstanceId)(m0,"dataforms-layouts-panel__field-control"),k=m?(0,Gk.sprintf)((0,Gk._x)("Edit %s (has errors)","field"),o||""):(0,Gk.sprintf)((0,Gk._x)("Edit %s","field"),o||""),v=(0,hme.useRef)(null);return(0,yi.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,yi.jsx)("span",{className:h,children:p}),u==="none"&&m&&(0,yi.jsx)(Wk.Tooltip,{text:f,placement:"top",children:(0,yi.jsx)("span",{className:"dataforms-layouts-panel__field-label-error-content",children:(0,yi.jsx)(Wk.Icon,{icon:qf,size:16})})}),(0,yi.jsx)("span",{id:`${b}`,className:"dataforms-layouts-panel__field-control",children:r.length>1?(0,yi.jsx)("span",{style:{display:"flex",flexDirection:"column",alignItems:"flex-start",width:"100%",gap:"2px"},children:r.map(S=>(0,yi.jsx)("span",{style:{width:"100%"},children:(0,yi.jsx)(S.render,{item:e,field:S})},S.id))}):r.map(S=>(0,yi.jsx)(S.render,{item:e,field:S},S.id))}),!s&&(0,yi.jsx)(Wk.Button,{className:"dataforms-layouts-panel__field-trigger-icon",label:k,showTooltip:!1,icon:Xf,size:"small","aria-expanded":c,"aria-haspopup":"dialog","aria-describedby":`${b}`})]})}var gme=l(R3(),1),lz=l(Ff(),1),bl=l(O(),1),fn=l(N(),1);function bme(e){return e?Object.values(e).every(t=>Object.entries(t).every(([o,r])=>o==="children"&&r&&typeof r=="object"?bme(r):r.type!=="invalid"&&r.type!=="validating")):!0}function XLe(e,t){let o=uO(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]=c0([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]=c0([a]);return{id:s.id,children:[],field:c}}return o.fields.map(n).filter(s=>s!==null)}function $k(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 kme(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 QLe(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=>$k(u,{elements:{type:"invalid",message:(0,fn.__)("Could not validate elements.")}},[...i,t.id]));return}t.field?.isValid.elements&&!t.field.isValid.elements.validate(s,{...t.field,elements:c})?n(u=>$k(u,{elements:{type:"invalid",message:(0,fn.__)("Value must be one of the elements.")}},[...i,t.id])):n(u=>kme(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,fn.__)("Unknown error when running elements validation asynchronously."),n(d=>$k(d,{elements:{type:"invalid",message:u}},[...i,t.id]))})}function JLe(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=>kme(c,[...i,t.id],"custom"));return}if(typeof a=="string"){n(c=>$k(c,{custom:{type:"invalid",message:a}},[...i,t.id]));return}n(c=>$k(c,{custom:{type:"invalid",message:(0,fn.__)("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,fn.__)("Unknown error when running custom validation asynchronously."),n(u=>$k(u,{custom:{type:"invalid",message:c}},[...i,t.id]))})}function vme(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,fn.__)("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,fn.__)("Value is below the minimum.")}};if(t.field?.isValid.max&&!t.field.isValid.max.validate(e,t.field))return{max:{type:"invalid",message:(0,fn.__)("Value is above the maximum.")}};if(t.field?.isValid.minLength&&!t.field.isValid.minLength.validate(e,t.field))return{minLength:{type:"invalid",message:(0,fn.__)("Value is too short.")}};if(t.field?.isValid.maxLength&&!t.field.isValid.maxLength.validate(e,t.field))return{maxLength:{type:"invalid",message:(0,fn.__)("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,fn.__)("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,gme.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,fn.__)("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"&&(QLe(t.field.getElements(),t,o),n.elements={type:"validating",message:(0,fn.__)("Validating\u2026")}),r instanceof Promise&&(JLe(r,t,o),n.custom={type:"validating",message:(0,fn.__)("Validating\u2026")}),Object.keys(n).length>0)return n;if(t.children.length>0){let i={};t.children.forEach(a=>{i[a.id]=vme(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 yme(e,t){let o=e?.field?.getValue({item:t});if(e.children.length===0)return o;let r=e.children.map(n=>yme(n,t));return r?{value:o,children:r}:o}function eNe(e,t,o){let[r,n]=(0,bl.useState)(),i=(0,bl.useRef)({}),s=(0,bl.useRef)({}),a=(0,bl.useRef)({}),c=(0,bl.useCallback)(()=>{let u={customCounterRef:i,elementsCounterRef:s,setFormValidity:n,path:[],item:e},d=XLe(o,t);if(d.length===0){n(void 0);return}let f={},m=[];d.forEach(h=>{let p=yme(h,e);if(a.current.hasOwnProperty(h.id)&&(0,lz.default)(a.current[h.id],p)){m.push(h.id);return}a.current[h.id]=p;let g=vme(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,lz.default)(h,p)?h:p})},[e,t,o]);return(0,bl.useEffect)(()=>{c()},[c]),{validity:r,isValid:bme(r)}}var _me=eNe;var Sme=l(O(),1);function Sf(e,t){(0,Sme.useEffect)(()=>{t&&e.current&&e.current.querySelectorAll("input, textarea, select").forEach(r=>{r.reportValidity()})},[t,e])}var xme=l(O(),1);function tNe(e){return Array.isArray(e)?e.map(t=>typeof t=="string"?t:t.id):[]}var mO=(e,t)=>Array.isArray(e)&&e.length>0?tNe(e).map(r=>t.find(n=>n.id===r)).filter(r=>r!==void 0):[];var oNe=(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 rNe(e){let{fields:t}=(0,xme.useContext)(bs),o=e.layout,r=mO(o.summary,t),n=oNe(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 pO=rNe;var mn=l(w(),1);function nNe({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,fa.useContext)(bs),[d,f]=(0,fa.useState)({}),m=(0,fa.useMemo)(()=>(0,cz.default)(e,d,{arrayMerge:(S,C)=>C}),[e,d]),h=(0,fa.useMemo)(()=>({layout:jr,fields:t.children?t.children:[{id:t.id,layout:jr}]}),[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}=_me(m,p,h),b=()=>{o(d),n()},k=S=>{f(C=>(0,cz.default)(C,S,{arrayMerge:(B,P)=>P}))},v=(0,hO.useFocusOnMount)("firstInputElement"),y=(0,fa.useRef)(null),_=(0,hO.useMergeRefs)([v,y]);return Sf(y,i),(0,mn.jsxs)(jp.Modal,{className:"dataforms-layouts-panel__modal",onRequestClose:n,isFullScreen:!1,title:r,size:"medium",children:[(0,mn.jsx)("div",{ref:_,children:(0,mn.jsx)(zn,{data:m,form:h,onChange:k,validity:g,children:(S,C,B,P)=>(0,mn.jsx)(S,{data:m,field:C,onChange:k,hideLabelFromVision:h.fields.length<2,markWhenOptional:P,validity:B},C.id)})}),(0,mn.jsxs)(Le,{direction:"row",className:"dataforms-layouts-panel__modal-footer",gap:"md",children:[(0,mn.jsx)(jp.__experimentalSpacer,{style:{flex:1}}),(0,mn.jsx)(jp.Button,{variant:"tertiary",onClick:n,__next40pxDefaultSize:!0,children:c}),(0,mn.jsx)(jp.Button,{variant:"primary",onClick:b,__next40pxDefaultSize:!0,children:a})]})]})}function iNe({data:e,field:t,onChange:o,validity:r}){let[n,i]=(0,fa.useState)(!1),[s,a]=(0,fa.useState)(!1),{fieldDefinition:c,fieldLabel:u,summaryFields:d}=pO(t);if(!c)return null;let f=()=>{a(!1),i(!0)};return(0,mn.jsxs)(mn.Fragment,{children:[(0,mn.jsx)(m0,{data:e,field:t,fieldLabel:u,summaryFields:d,validity:r,touched:n,disabled:c.readOnly===!0,onClick:()=>a(!0),"aria-expanded":s}),s&&(0,mn.jsx)(nNe,{data:e,field:t,onChange:o,fieldLabel:u??"",onClose:f,touched:n})]})}var wme=iNe;var xf=l(A(),1),Cme=l(N(),1),Hc=l(O(),1);var Bme=l(X(),1);var Ur=l(w(),1);function sNe({title:e,onClose:t}){return(0,Ur.jsx)(Le,{direction:"column",className:"dataforms-layouts-panel__dropdown-header",gap:"lg",children:(0,Ur.jsxs)(Le,{direction:"row",gap:"sm",align:"center",children:[e&&(0,Ur.jsx)(xf.__experimentalHeading,{level:2,size:13,children:e}),(0,Ur.jsx)(xf.__experimentalSpacer,{style:{flex:1}}),t&&(0,Ur.jsx)(xf.Button,{label:(0,Cme.__)("Close"),icon:Hf,onClick:t,size:"small"})]})})}function aNe({touched:e,children:t}){let o=(0,Hc.useRef)(null);return Sf(o,e),(0,Ur.jsx)("div",{ref:o,children:t})}function lNe({data:e,field:t,onChange:o,validity:r}){let[n,i]=(0,Hc.useState)(!1),[s,a]=(0,Hc.useState)(null),c=(0,Hc.useMemo)(()=>({anchor:s,placement:"left-start",offset:36,shift:!0}),[s]),[u,d]=(0,Bme.__experimentalUseDialog)({focusOnMount:"firstInputElement"}),f=(0,Hc.useMemo)(()=>({layout:jr,fields:t.children?t.children:[{id:t.id,layout:jr}]}),[t]),m=(0,Hc.useMemo)(()=>{if(r!==void 0)return t.children?r?.children:{[t.id]:r}},[r,t]),{fieldDefinition:h,fieldLabel:p,summaryFields:g}=pO(t);return h?(0,Ur.jsx)("div",{ref:a,className:"dataforms-layouts-panel__field-dropdown-anchor",children:(0,Ur.jsx)(xf.Dropdown,{contentClassName:"dataforms-layouts-panel__field-dropdown",popoverProps:c,focusOnMount:!1,onToggle:b=>{b||i(!0)},renderToggle:({isOpen:b,onToggle:k})=>(0,Ur.jsx)(m0,{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,Ur.jsx)(aNe,{touched:n,children:(0,Ur.jsxs)("div",{ref:u,...d,children:[(0,Ur.jsx)(sNe,{title:p,onClose:b}),(0,Ur.jsx)(zn,{data:e,form:f,onChange:o,validity:m,children:(k,v,y,_)=>(0,Ur.jsx)(k,{data:e,field:v,onChange:o,hideLabelFromVision:(f?.fields??[]).length<2,markWhenOptional:_,validity:y},v.id)})]})})})}):null}var Eme=lNe;var uz=l(w(),1);function Tme({data:e,field:t,onChange:o,validity:r}){return t.layout.openAs.type==="modal"?(0,uz.jsx)(wme,{data:e,field:t,onChange:o,validity:r}):(0,uz.jsx)(Eme,{data:e,field:t,onChange:o,validity:r})}var jn=l(O(),1);var gO=l(N(),1),Ime=l(w(),1);function Pme(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+=Pme(r);return t}function bO({validity:e}){let t=Pme(e);return t===0?null:(0,Ime.jsx)(A6,{intent:"high",children:(0,gO.sprintf)((0,gO._n)("%d field needs attention","%d fields need attention",t),t)})}var ko=l(w(),1);function cNe(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 uNe({data:e,fields:t,label:o,layout:r,isOpen:n,touched:i,validity:s}){let c=mO(r.summary,t).filter(f=>cNe(f,r.summary,n)),u=i&&r.isCollapsible,d=c.length>0&&r.withHeader;return(0,ko.jsxs)(Le,{align:"center",justify:"space-between",className:"dataforms-layouts-card__field-header-content",children:[(0,ko.jsx)(al.Title,{children:o}),(u||d)&&(0,ko.jsxs)(Np.HeaderDescription,{className:"dataforms-layouts-card__field-header-content-description",children:[u&&(0,ko.jsx)(bO,{validity:s}),d&&(0,ko.jsx)("div",{className:"dataforms-layouts-card__field-summary",children:c.map(f=>(0,ko.jsx)(f.render,{item:e,field:f},f.id))})]})]})}function dNe({data:e,field:t,form:o,onChange:r,hideLabelFromVision:n,markWhenOptional:i,validity:s,withHeader:a}){if(t.children)return(0,ko.jsxs)(ko.Fragment,{children:[t.description&&(0,ko.jsx)("div",{className:"dataforms-layouts-card__field-description",children:t.description}),(0,ko.jsx)(zn,{data:e,form:o,onChange:r,validity:s?.children})]});let c=Up("regular")?.component;return c?(0,ko.jsx)(c,{data:e,field:t,onChange:r,hideLabelFromVision:n||a,markWhenOptional:i,validity:s}):null}function Rme({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){let{fields:s}=(0,jn.useContext)(bs),a=t.layout,c=(0,jn.useRef)(null),u=(0,jn.useMemo)(()=>({layout:jr,fields:t.children??[]}),[t]),{isOpened:d,isCollapsible:f}=a,[m,h]=(0,jn.useState)(d),[p,g]=(0,jn.useState)(!1);(0,jn.useEffect)(()=>{h(d)},[d]);let b=(0,jn.useCallback)(C=>{C||g(!0),h(C)},[]),k=(0,jn.useCallback)(()=>{g(!0)},[]);Sf(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,ko.jsx)(dNe,{data:e,field:t,form:u,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i,withHeader:y}),S=(0,ko.jsx)(uNe,{data:e,fields:s,label:v,layout:a,isOpen:f?!!m:!0,touched:p,validity:i});return y&&f?(0,ko.jsxs)(Np.Root,{className:"dataforms-layouts-card__field",open:m,onOpenChange:b,children:[(0,ko.jsx)(Np.Header,{children:S}),(0,ko.jsx)(Np.Content,{ref:c,onBlur:k,children:_})]}):(0,ko.jsxs)(al.Root,{className:"dataforms-layouts-card__field",children:[y&&(0,ko.jsx)(al.Header,{children:S}),(0,ko.jsx)(al.Content,{ref:c,onBlur:k,children:_})]})}var Ome=l(A(),1);var ur=l(w(),1);function fNe({title:e}){return(0,ur.jsx)(Le,{direction:"column",className:"dataforms-layouts-row__header",gap:"lg",children:(0,ur.jsx)(Le,{direction:"row",align:"center",children:(0,ur.jsx)(Ome.__experimentalHeading,{level:2,size:13,children:e})})})}var mNe=({children:e})=>(0,ur.jsx)(ur.Fragment,{children:e});function Ame({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){let s=t.layout;if(t.children){let c={layout:jr,fields:t.children};return(0,ur.jsxs)("div",{className:"dataforms-layouts-row__field",children:[!r&&t.label&&(0,ur.jsx)(fNe,{title:t.label}),(0,ur.jsx)(Le,{direction:"row",align:s.alignment,gap:"lg",children:(0,ur.jsx)(zn,{data:e,form:c,onChange:o,validity:i?.children,as:mNe,children:(u,d,f)=>(0,ur.jsx)("div",{className:"dataforms-layouts-row__field-control",style:s.styles[d.id],children:(0,ur.jsx)(u,{data:e,field:d,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:f})},d.id)})})]})}let a=Up("regular")?.component;return a?(0,ur.jsx)(ur.Fragment,{children:(0,ur.jsx)("div",{className:"dataforms-layouts-row__field-control",children:(0,ur.jsx)(a,{data:e,field:t,onChange:o,markWhenOptional:n,validity:i})})}):null}var Un=l(O(),1),Lme=l(N(),1);var Gc=l(w(),1);function Nme({data:e,field:t,onChange:o,validity:r}){let{fields:n}=(0,Un.useContext)(bs),i=(0,Un.useRef)(null),s=(0,Un.useRef)(null),[a,c]=(0,Un.useState)(!1),[u,d]=(0,Un.useState)(!1),f=(0,Un.useMemo)(()=>({layout:jr,fields:t.children??[]}),[t]);(0,Un.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)}},[]),Sf(s,u&&a);let m=(0,Un.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,Gc.jsx)(p.render,{item:e,field:p}):g=t.label||(0,Lme.__)("More details"),(0,Gc.jsxs)("details",{ref:i,className:"dataforms-layouts-details__details",children:[(0,Gc.jsx)("summary",{className:"dataforms-layouts-details__summary",children:(0,Gc.jsxs)(Le,{direction:"row",align:"center",gap:"md",className:"dataforms-layouts-details__summary-content",children:[g,a&&(0,Gc.jsx)(bO,{validity:r})]})}),(0,Gc.jsx)("div",{ref:s,className:"dataforms-layouts-details__content",onBlur:m,children:(0,Gc.jsx)(zn,{data:e,form:f,onChange:o,validity:r?.children})})]})}var Hp=l(w(),1),pNe=[{type:"regular",component:cme,wrapper:({children:e})=>(0,Hp.jsx)(Le,{direction:"column",className:"dataforms-layouts__wrapper",gap:"lg",children:e})},{type:"panel",component:Tme,wrapper:({children:e})=>(0,Hp.jsx)(Le,{direction:"column",className:"dataforms-layouts__wrapper",gap:"md",children:e})},{type:"card",component:Rme,wrapper:({children:e})=>(0,Hp.jsx)(Le,{direction:"column",className:"dataforms-layouts__wrapper",gap:"xl",children:e})},{type:"row",component:Ame,wrapper:({children:e,layout:t})=>(0,Hp.jsx)(Le,{direction:"column",className:"dataforms-layouts__wrapper",gap:"lg",children:(0,Hp.jsx)("div",{className:"dataforms-layouts-row__field",children:(0,Hp.jsx)(Le,{direction:"row",gap:"lg",align:t.alignment,children:e})})})},{type:"details",component:Nme}];function Up(e){return pNe.find(t=>t.type===e)}var kO=l(w(),1),hNe=({children:e})=>(0,kO.jsx)(Le,{direction:"column",className:"dataforms-layouts__wrapper",gap:"lg",children:e});function zn({data:e,form:t,onChange:o,validity:r,children:n,as:i}){let{fields:s}=(0,vO.useContext)(bs),a=(0,vO.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??Up(t.layout.type)?.wrapper??hNe;return(0,kO.jsx)(u,{layout:t.layout,children:t.fields.map(d=>{let f=Up(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,kO.jsx)(f,{data:e,field:d,onChange:o,markWhenOptional:a,validity:r?.[d.id]},d.id)})})}var fz=l(w(),1);function p0({data:e,form:t,fields:o,onChange:r,validity:n}){let i=(0,dz.useMemo)(()=>uO(t),[t]),s=(0,dz.useMemo)(()=>c0(o),[o]);return t.fields?(0,fz.jsx)(sme,{fields:s,children:(0,fz.jsx)(zn,{data:e,form:i,onChange:r,validity:n})}):null}var Cf=l(O(),1),Xme=l(N(),1);var Yk=l(A(),1);var mz=l(N(),1);var Mme=l(X(),1);function Kk({isControl:e}={isControl:!1}){return(0,Mme.useViewportMatch)("medium","<")?{}:{popoverProps:{placement:"left-start",offset:e?35:259}}}var yO=l(w(),1);function Dme({fields:e,visibleFields:t,onToggleField:o}){let{popoverProps:r}=Kk();return!e||e.length===0?null:(0,yO.jsx)(Yk.DropdownMenu,{icon:Bs,label:(0,mz.__)("Options"),popoverProps:r,toggleProps:{size:"small"},children:({onClose:n})=>(0,yO.jsx)(Yk.MenuGroup,{label:(0,mz.__)("Show / Hide"),children:e.map(i=>{let s=t.includes(i.id);return(0,yO.jsx)(Yk.MenuItem,{isSelected:s,onClick:()=>{o(i.id),n()},role:"menuitemcheckbox",icon:s?Cs:null,children:i.label},i.id)})})})}var _O=l(A(),1),Vme=l(X(),1),Fme=l(z(),1),Wc=l(O(),1),zme=l(br(),1);var ma=l(w(),1),{useRichText:gNe}=F(zme.privateApis);function jme({data:e,field:t,hideLabelFromVision:o,onChange:r,config:n={}}){let i=(0,Fme.useRegistry)(),s=t.getValue({item:e}),a=t.config||{},{clientId:c}=n,[u,d]=(0,Wc.useState)({start:void 0,end:void 0}),[f,m]=(0,Wc.useState)(!1),h=(0,Wc.useRef)(),p=(0,Wc.useRef)(new Set),g=(0,Wc.useRef)(new Set),b=Wb({allowedFormats:a?.allowedFormats,disableFormats:a?.disableFormats});function k(){h.current?.focus()}let{value:v,getValue:y,onChange:_,ref:S,formatTypes:C}=gNe({value:s,onChange(R){r(t.setValue({item:e,value:R}))},selectionStart:u.start,selectionEnd:u.end,onSelectionChange:(R,E)=>d({start:R,end:E}),__unstableIsSelected:f,preserveWhiteSpace:!!a?.preserveWhiteSpace,placeholder:a?.placeholder,__unstableDisableFormats:a?.disableFormats,allowedFormats:b,withoutInteractiveFormatting:a?.withoutInteractiveFormatting,__unstableFormatTypeHandlerContext:(0,Wc.useMemo)(()=>({richTextIdentifier:t.id,blockClientId:c}),[t.id,c])}),{baseControlProps:B,controlProps:P}=(0,_O.useBaseControlProps)({hideLabelFromVision:o??t.hideLabelFromVision,label:t.label});return(0,ma.jsxs)(ma.Fragment,{children:[f&&(0,ma.jsx)(Zb.Provider,{value:g,children:(0,ma.jsx)(Qb.Provider,{value:p,children:(0,ma.jsx)("div",{children:(0,ma.jsx)(O2,{value:v,onChange:_,onFocus:k,formatTypes:C,forwardedRef:h,isVisible:!1})})})}),(0,ma.jsx)(_O.BaseControl,{...B,children:(0,ma.jsx)("div",{className:"block-editor-content-only-controls__rich-text",role:"textbox","aria-multiline":!a?.disableLineBreaks,ref:(0,Vme.useMergeRefs)([S,I2({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,...P})})]})}var wf=l(A(),1),Ume=l(z(),1),Hme=l(Fe(),1),Gme=l(O(),1),Gp=l(N(),1);var ro=l(w(),1),bNe=e=>{window.requestAnimationFrame(()=>{let[t]=Hme.focus.tabbable.find(e?.current);t&&t.focus()})};function kNe({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,ro.jsx)("div",{className:"block-editor-content-only-controls__media-thumbnail",children:(0,ro.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,ro.jsx)("div",{className:"block-editor-content-only-controls__media-thumbnail",children:(0,ro.jsx)("img",{alt:"",width:20,height:20,src:a})});let c;if(n[0]==="image"?c=Tv:n[0]==="video"?c=AM:n[0]==="audio"?c=DA:c=ch,c)return(0,ro.jsx)(wf.Icon,{icon:c,size:20})}return(0,ro.jsx)(wf.Icon,{icon:ch,size:20})}function Wme({data:e,field:t,onChange:o,config:r={}}){let{popoverProps:n}=Kk({isControl:!0}),i=t.getValue({item:e}),{allowedTypes:s=[],multiple:a=!1,useFeaturedImage:c=!1}=r,u=i?.id,d=i?.url,f=(0,Ume.useSelect)(p=>{if(!u)return;let b=p(x).getSettings()[Q0];if(b)return b(p,u)},[u]),m;if(s.length===1){let p=s[0];p==="image"?m=(0,Gp.__)("Image"):p==="video"?m=(0,Gp.__)("Video"):p==="application"?m=(0,Gp.__)("File"):m=(0,Gp.__)("Media")}else m=(0,Gp.__)("Media");let h=(0,Gme.useRef)();return(0,ro.jsx)(Ws,{children:(0,ro.jsxs)("div",{ref:h,className:"block-editor-content-only-controls",children:[(0,ro.jsx)(Ub,{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,ro.jsx)(wf.Button,{__next40pxDefaultSize:!0,className:"block-editor-content-only-controls__media",...p,children:(0,ro.jsxs)(wf.__experimentalGrid,{rowGap:0,columnGap:8,templateColumns:"20px 1fr",className:"block-editor-content-only-controls__media-row",children:[d&&(0,ro.jsxs)(ro.Fragment,{children:[(0,ro.jsx)(kNe,{attachment:f,field:t,data:e,config:r}),(0,ro.jsx)("span",{className:"block-editor-content-only-controls__media-title",children:f?.title?.raw&&f?.title?.raw!==""?f?.title?.raw:d})]}),!d&&(0,ro.jsxs)(ro.Fragment,{children:[(0,ro.jsx)("span",{className:"block-editor-content-only-controls__media-placeholder",style:{width:"20px",height:"20px"}}),(0,ro.jsx)("span",{className:"block-editor-content-only-controls__media-title",children:m})]})]})})}),d&&(0,ro.jsx)(wf.Button,{label:(0,Gp.__)("Reset"),className:"block-editor-content-only-controls__media-reset",size:"small",icon:gr,onClick:()=>{o(t.setValue({item:e,value:{}})),bNe(h)}})]})})}var $c=l(A(),1),xO=l(O(),1),$me=l(N(),1);var Kme=l(bn(),1);var Er=l(w(),1),pz="noreferrer noopener",Yme="_blank",SO="nofollow";function vNe({rel:e="",url:t="",opensInNewTab:o,nofollow:r}){let n,i=e;if(o)n=Yme,i=i?.includes(pz)?i:i+` ${pz}`;else{let s=new RegExp(`\\b${pz}\\s*`,"g");i=i?.replace(s,"").trim()}if(r)i=i?.includes(SO)?i:(i+` ${SO}`).trim();else{let s=new RegExp(`\\b${SO}\\s*`,"g");i=i?.replace(s,"").trim()}return{url:(0,Kme.prependHTTP)(t),linkTarget:n,rel:i||void 0}}function qme({data:e,field:t,onChange:o}){let[r,n]=(0,xO.useState)(!1),{popoverProps:i}=Kk({isControl:!0}),s=t.getValue({item:e}),a=s?.url,c=s?.rel||"",d=s?.linkTarget===Yme,f=c===SO,m=(0,xO.useMemo)(()=>({url:a,opensInNewTab:d,nofollow:f}),[a,d,f]);return(0,Er.jsxs)(Er.Fragment,{children:[(0,Er.jsx)($c.Button,{__next40pxDefaultSize:!0,className:"block-editor-content-only-controls__link",onClick:()=>{n(!0)},children:(0,Er.jsxs)($c.__experimentalGrid,{rowGap:0,columnGap:8,templateColumns:"24px 1fr",className:"block-editor-content-only-controls__link-row",children:[a&&(0,Er.jsxs)(Er.Fragment,{children:[(0,Er.jsx)($c.Icon,{icon:kn,size:24}),(0,Er.jsx)("span",{className:"block-editor-content-only-controls__link-title",children:a})]}),!a&&(0,Er.jsxs)(Er.Fragment,{children:[(0,Er.jsx)($c.Icon,{icon:kn,size:24,style:{opacity:.3}}),(0,Er.jsx)("span",{className:"block-editor-content-only-controls__link-title",children:(0,$me.__)("Link")})]})]})}),r&&(0,Er.jsx)($c.Popover,{onClose:()=>{n(!1)},...i??{},children:(0,Er.jsx)(Wd,{value:m,onChange:h=>{let p=vNe({rel:c,...h});o(t.setValue({item:e,value:p}))},onRemove:()=>{o(t.setValue({item:e,value:{}}))}})})]})}var Tr=l(w(),1),{fieldsKey:Qme,formKey:hz}=F(qk.privateApis);function gz(e,t={}){return function(r){return(0,Tr.jsx)(e,{...r,config:t})}}function yNe({clientId:e,blockType:t,setAttributes:o,isMultiBlock:r=!1}){let n=yr({clientId:e,context:"list-view"}),i=It(e),s=t?.[Qme],a=(0,Cf.useContext)(Pr),c=(0,CO.useSelect)(k=>{let v=k(x).getBlockAttributes(e);if(!v?.metadata?.bindings)return v;let{getBlockBindingsSource:y}=F(k(qk.store));return Object.entries(v.metadata.bindings).reduce((_,[S,C])=>{let B=y(C.source);if(!B)return _;let P=B.getValues({select:k,context:a,bindings:{[S]:C}});return{..._,...P}},v)},[a,e]),{selectBlock:u,toggleBlockHighlight:d}=(0,CO.useDispatch)(x),f=(0,Zme.useDebounce)(d,50),m=(0,Cf.useMemo)(()=>r?{...t?.[hz],fields:[t?.[hz]?.fields?.[0]]}:t?.[hz],[t,r]),[h,p]=(0,Cf.useState)(m),g=(0,Cf.useMemo)(()=>s?.length?s.map(k=>{let v={...k};return typeof k.Edit=="string"&&k.Edit==="rich-text"?v.Edit=gz(jme,{clientId:e}):typeof k.Edit=="string"&&k.Edit==="link"?v.Edit=gz(qme):typeof k.Edit=="object"&&k.Edit.control==="media"&&(v.Edit=gz(Wme,{...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,Tr.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,Tr.jsx)("div",{className:"block-editor-block-fields__header",children:(0,Tr.jsxs)(wO.__experimentalHStack,{spacing:1,children:[r&&(0,Tr.jsxs)(Tr.Fragment,{children:[(0,Tr.jsx)(Oe,{className:"block-editor-block-fields__header-icon",icon:i?.icon}),(0,Tr.jsx)("h2",{className:"block-editor-block-fields__header-title",children:(0,Tr.jsx)(wO.__experimentalTruncate,{numberOfLines:1,children:n})}),(0,Tr.jsx)(Dme,{fields:g,visibleFields:h.fields,onToggleField:b})]}),!r&&(0,Tr.jsx)("h2",{className:"block-editor-block-fields__header-title",children:(0,Xme.__)("Content")})]})}),(0,Tr.jsx)(p0,{data:c,fields:g,form:h,onChange:o})]})}function _Ne(e){return!!(window?.__experimentalContentOnlyInspectorFields&&(0,qk.getBlockType)(e)?.[Qme])}function SNe(e){let{blockType:t,isSelectionWithinCurrentSection:o}=(0,Cf.useContext)(pr);return(0,Tr.jsx)(zm,{group:"content",children:(0,Tr.jsx)(yNe,{...e,blockType:t,isMultiBlock:o})})}var Jme={edit:SNe,hasSupport:_Ne,attributeKeys:[],supportsPatternEditing:!0};var vz=l(pt(),1),epe=l(A(),1),bz=l(N(),1),h0=l($(),1);var kz=l(w(),1);function xNe(e){return(0,h0.hasBlockSupport)(e,"customClassName",!0)&&(e.attributes={...e.attributes,className:{type:"string"}}),e}function wNe({className:e,setAttributes:t}){return po()!=="default"?null:(0,kz.jsx)(pe,{group:"advanced",children:(0,kz.jsx)(epe.TextControl,{__next40pxDefaultSize:!0,autoComplete:"off",label:(0,bz.__)("Additional CSS class(es)"),value:e||"",onChange:r=>{t({className:r!==""?r:void 0})},help:(0,bz.__)("Separate multiple classes with spaces.")})})}var yz={edit:wNe,addSaveProps:CNe,attributeKeys:["className"],hasSupport(e){return(0,h0.hasBlockSupport)(e,"customClassName",!0)}};function CNe(e,t,o){return(0,h0.hasBlockSupport)(t,"customClassName",!0)&&o.className&&(e.className=V(e.className,o.className)),e}function BNe(e,t,o,r){if(!(0,h0.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,vz.addFilter)("blocks.registerBlockType","core/editor/custom-class-name/attribute",xNe);(0,vz.addFilter)("blocks.switchToBlockType.transformedBlock","core/customClassName/addTransforms",BNe);var tpe=l(pt(),1),g0=l($(),1);function ENe(e,t){return(0,g0.hasBlockSupport)(t,"className",!0)&&(typeof e.className=="string"?e.className=[...new Set([(0,g0.getBlockDefaultClassName)(t.name),...e.className.split(" ")])].join(" ").trim():e.className=(0,g0.getBlockDefaultClassName)(t.name)),e}(0,tpe.addFilter)("blocks.getSaveContent.extraProps","core/generated-class-name/save-props",ENe);var Ope=l(O(),1),Ape=l(pt(),1),qc=l($(),1),Lpe=l(X(),1),Jk=l(dy(),1);var Tz=l($(),1),RO=l(O(),1),vpe=l(z(),1);var TNe=l($(),1);var INe=l(w(),1),ope="typography.lineHeight";var rpe=l(pt(),1),BO=l($(),1),npe=l(BT(),1),ipe=l(A(),1);var b0="typography.__experimentalFontFamily",{kebabCase:PNe}=F(ipe.privateApis);function RNe(e){return(0,BO.hasBlockSupport)(e,b0)&&(e.attributes.fontFamily||Object.assign(e.attributes,{fontFamily:{type:"string"}})),e}function spe(e,t,o){if(!(0,BO.hasBlockSupport)(t,b0)||Ge(t,ks,"fontFamily")||!o?.fontFamily)return e;let r=new npe.default(e.className);r.add(`has-${PNe(o?.fontFamily)}-font-family`);let n=r.value;return e.className=n||void 0,e}function ONe({name:e,fontFamily:t}){return spe({},e,{fontFamily:t})}var _z={useBlockProps:ONe,addSaveProps:spe,attributeKeys:["fontFamily"],hasSupport(e){return(0,BO.hasBlockSupport)(e,b0)}};(0,rpe.addFilter)("blocks.registerBlockType","core/fontFamily/addAttribute",RNe);var Sz=l(pt(),1),Zk=l($(),1),ape=l(BT(),1);var ANe=l(w(),1),Wp="typography.fontSize";function LNe(e){return(0,Zk.hasBlockSupport)(e,Wp)&&(e.attributes.fontSize||Object.assign(e.attributes,{fontSize:{type:"string"}})),e}function lpe(e,t,o){if(!(0,Zk.hasBlockSupport)(t,Wp)||Ge(t,ks,"fontSize"))return e;let r=new ape.default(e.className);r.add(Eu(o.fontSize));let n=r.value;return e.className=n||void 0,e}function NNe({name:e,fontSize:t,style:o}){let[r,n,i]=he("typography.fontSizes","typography.fluid","layout");if(!(0,Zk.hasBlockSupport)(e,Wp)||Ge(e,ks,"fontSize")||!t&&!o?.typography?.fontSize)return;let s;if(o?.typography?.fontSize&&(s={style:{fontSize:uc({size:o.typography.fontSize},{typography:{fluid:n},layout:i})}}),t&&(s={style:{fontSize:wh(r,t,o?.typography?.fontSize).size}}),!!s)return lpe(s,e,{fontSize:t})}var xz={useBlockProps:NNe,addSaveProps:lpe,attributeKeys:["fontSize","style"],hasSupport(e){return(0,Zk.hasBlockSupport)(e,Wp)}},MNe={fontSize:[["fontSize"],["style","typography","fontSize"]]};function DNe(e,t,o,r){let n=e.name,i={fontSize:(0,Zk.hasBlockSupport)(n,Wp)};return jP(i,MNe,e,t,o,r)}(0,Sz.addFilter)("blocks.registerBlockType","core/font/addAttribute",LNe);(0,Sz.addFilter)("blocks.switchToBlockType.transformedBlock","core/font-size/addTransforms",DNe);var EO=l(N(),1),Xk=l($(),1);var wz=l(w(),1),Qk="typography.textAlign",VNe=[{icon:fu,title:(0,EO.__)("Align text left"),align:"left"},{icon:zf,title:(0,EO.__)("Align text center"),align:"center"},{icon:mu,title:(0,EO.__)("Align text right"),align:"right"}],cpe=["left","center","right"],FNe=[];function Cz(e){return Array.isArray(e)?cpe.filter(t=>e.includes(t)):e===!0?cpe:FNe}function zNe({style:e,name:t,setAttributes:o}){let n=ds(t)?.typography?.textAlign,i=po();if(!n||i!=="default")return null;let s=Cz((0,Xk.getBlockSupport)(t,Qk));if(!s.length)return null;let a=VNe.filter(u=>s.includes(u.align)),c=u=>{let d={...e,typography:{...e?.typography,textAlign:u}};o({style:Ae(d)})};return(0,wz.jsx)(Dt,{group:"block",children:(0,wz.jsx)(_C,{value:e?.typography?.textAlign,onChange:c,alignmentControls:a})})}var TO={edit:zNe,useBlockProps:jNe,addSaveProps:UNe,attributeKeys:["style"],hasSupport(e){return(0,Xk.hasBlockSupport)(e,Qk,!1)}};function jNe({name:e,style:t}){if(!t?.typography?.textAlign||!Cz((0,Xk.getBlockSupport)(e,Qk)).length||Ge(e,ks,"textAlign"))return null;let r=t.typography.textAlign;return{className:V({[`has-text-align-${r}`]:r})}}function UNe(e,t,o){if(!o?.style?.typography?.textAlign)return e;let{textAlign:r}=o.style.typography,n=(0,Xk.getBlockSupport)(t,Qk);return Cz(n).includes(r)&&!Ge(t,ks,"textAlign")&&(e.className=V(`has-text-align-${r}`,e.className)),e}var Ez=l(pt(),1),Bf=l($(),1),$p=l(O(),1),gpe=l(z(),1),k0=l(N(),1),IO=l(A(),1),bpe=l(X(),1);function HNe(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 upe(e,t){if(!e)return;t(0);let o=HNe(e,t);return t(o),o}var dpe=l(O(),1),fpe=l(N(),1),mpe=l(A(),1),ppe=l(er(),1),Bz=l(w(),1);function hpe(){let e=(0,fpe.__)("The text may be too small to read. Consider using a larger container or less text.");return(0,dpe.useEffect)(()=>{(0,ppe.speak)(e)},[e]),(0,Bz.jsx)("div",{className:"block-editor-fit-text-size-warning",children:(0,Bz.jsx)(mpe.Notice,{spokenMessage:null,status:"warning",isDismissible:!1,children:e})})}var Hn=l(w(),1),GNe={},WNe=12,Kc="typography.fitText";function $Ne(e){return!(0,Bf.hasBlockSupport)(e,Kc)||e.attributes?.fitText?e:{...e,attributes:{...e.attributes,fitText:{type:"boolean"}}}}function KNe({fitText:e,name:t,clientId:o}){let[r,n]=(0,$p.useState)(null),i=(0,Bf.hasBlockSupport)(t,Kc),s=tt(o),{blockAttributes:a,parentId:c,blockMode:u}=(0,gpe.useSelect)(f=>{if(!o||!i||!e)return GNe;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,$p.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=upe(s,b=>{b===0?m.textContent="":m.textContent=`${h} { font-size: ${b}px !important; }`});n(g)},[s,o,i,e]);return(0,$p.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,$p.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 YNe({clientId:e,fitText:t=!1,setAttributes:o,name:r,fontSize:n,style:i}){return(0,Bf.hasBlockSupport)(r,Kc)?(0,Hn.jsx)(IO.__experimentalToolsPanelItem,{hasValue:()=>t,label:(0,k0.__)("Fit text"),onDeselect:()=>o({fitText:void 0}),resetAllFilter:()=>({fitText:void 0}),panelId:e,children:(0,Hn.jsx)(IO.ToggleControl,{label:(0,k0.__)("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,k0.__)("Text will resize to fit its container."):(0,k0.__)("The text will resize to fit its container, resetting other font size settings.")})}):null}function qNe(e,t,o){if(!(0,Bf.hasBlockSupport)(t,Kc))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 ZNe({name:e,fitText:t}){return t&&(0,Bf.hasBlockSupport)(e,Kc)?{className:"has-fit-text"}:{}}(0,Ez.addFilter)("blocks.registerBlockType","core/fit-text/addAttribute",$Ne);var XNe=e=>(0,Bf.hasBlockSupport)(e,Kc);function QNe({fitText:e,name:t,clientId:o,isSelected:r}){let{fontSize:n}=KNe({fitText:e,name:t,clientId:o});return r&&n&&n<WNe?(0,Hn.jsx)(pe,{group:"typography",children:(0,Hn.jsx)(hpe,{})}):null}var JNe=(0,bpe.createHigherOrderComponent)(e=>function(o){let{name:r,attributes:n,clientId:i,isSelected:s,setAttributes:a}=o,{fitText:c}=n;return(0,Bf.hasBlockSupport)(r,Kc)?(0,Hn.jsxs)(Hn.Fragment,{children:[(0,Hn.jsx)(e,{...o}),(0,Hn.jsx)(pe,{group:"typography",children:(0,Hn.jsx)(YNe,{clientId:i,fitText:c,setAttributes:a,name:r,fontSize:n.fontSize,style:n.style})}),c&&(0,Hn.jsx)(QNe,{fitText:c,name:r,clientId:i,isSelected:s})]}):(0,Hn.jsx)(e,{...o})},"addFitTextControl");(0,Ez.addFilter)("editor.BlockEdit","core/fit-text/add-fit-text-control",JNe);var PO={useBlockProps:ZNe,addSaveProps:qNe,attributeKeys:["fitText","fontSize","style"],hasSupport:XNe,edit:()=>null};var Iz=l(w(),1);function kpe(e,t){return Object.fromEntries(Object.entries(e).filter(([o])=>!t.includes(o)))}var eMe="typography.__experimentalLetterSpacing",tMe="typography.__experimentalTextTransform",oMe="typography.__experimentalTextDecoration",rMe="typography.textIndent",nMe="typography.textColumns",iMe="typography.__experimentalFontStyle",sMe="typography.__experimentalFontWeight",aMe="typography.__experimentalWritingMode",ks="typography",ype=[ope,Wp,iMe,sMe,b0,Qk,nMe,oMe,rMe,aMe,tMe,eMe,Kc];function _pe(e){let t={...kpe(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={...kpe(t.typography,["fontFamily"]),fontSize:n?void 0:o},{style:Ae(t),fontFamily:i,fontSize:n}}function Spe(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 lMe({children:e,resetAllFilter:t}){let o=(0,RO.useCallback)(r=>{let n=Spe(r),i=t(n);return{...r,..._pe(i)}},[t]);return(0,Iz.jsx)(pe,{group:"typography",resetAllFilter:o,children:e})}function xpe({clientId:e,name:t,setAttributes:o,settings:r}){let n=iP(r),{style:i,fontFamily:s,fontSize:a,fitText:c}=(0,vpe.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,RO.useMemo)(()=>Spe({style:i,fontFamily:s,fontSize:a}),[i,a,s]),d=m=>{let h=_pe(m);(h.fontSize||h.style?.typography?.fontSize)&&c&&(h.fitText=void 0),o(h)};if(!n)return null;let f=(0,Tz.getBlockSupport)(t,[ks,"__experimentalDefaultControls"]);return(0,Iz.jsx)(sP,{as:lMe,panelId:e,settings:r,value:u,onChange:d,defaultControls:f})}var Tf=l(O(),1),AO=l(z(),1),OO=l($(),1),Tpe=l(Pe(),1);var kl=l(O(),1),wpe=l(S_(),1);var v0=l(w(),1);function Cpe({clientId:e,value:t,computeStyle:o,forceShow:r}){let n=tt(e),[i,s]=(0,kl.useReducer)(()=>o(n));(0,kl.useEffect)(()=>{n&&r&&s()},[n,r]),(0,kl.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,kl.useRef)(t),[c,u]=(0,kl.useState)(!1);return(0,kl.useEffect)(()=>{if((0,wpe.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,v0.jsx)(Yi,{clientId:e,__unstablePopoverSlot:"block-toolbar",children:(0,v0.jsx)("div",{className:"block-editor__spacing-visualizer",style:i})})}function Ef(e,t){return e.ownerDocument.defaultView.getComputedStyle(e).getPropertyValue(t)}function Bpe({clientId:e,value:t,forceShow:o}){return(0,v0.jsx)(Cpe,{clientId:e,value:t?.spacing?.margin,computeStyle:r=>{let n=Ef(r,"margin-top"),i=Ef(r,"margin-right"),s=Ef(r,"margin-bottom"),a=Ef(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 Epe({clientId:e,value:t,forceShow:o}){return(0,v0.jsx)(Cpe,{clientId:e,value:t?.spacing?.padding,computeStyle:r=>({borderTopWidth:Ef(r,"padding-top"),borderRightWidth:Ef(r,"padding-right"),borderBottomWidth:Ef(r,"padding-bottom"),borderLeftWidth:Ef(r,"padding-left")}),forceShow:o})}var Yc=l(w(),1),vl="dimensions",y0="spacing";function cMe(){let[e,t]=(0,Tf.useState)(!1),{hideBlockInterface:o,showBlockInterface:r}=F((0,AO.useDispatch)(x));return(0,Tf.useEffect)(()=>{e?o():r()},[e,r,o]),[e,t]}function uMe({children:e,resetAllFilter:t}){let o=(0,Tf.useCallback)(r=>{let n=r.style,i=t(n);return{...r,style:i}},[t]);return(0,Yc.jsx)(pe,{group:"dimensions",resetAllFilter:o,children:e})}function Ipe({clientId:e,name:t,setAttributes:o,settings:r}){let n=uP(r),i=(0,AO.useSelect)(m=>{if(n)return m(x).getBlockAttributes(e)?.style},[e,n]),[s,a]=cMe(),c=m=>{o({style:Ae(m)})};if(!n)return null;let u=(0,OO.getBlockSupport)(t,[vl,"__experimentalDefaultControls"]),d=(0,OO.getBlockSupport)(t,[y0,"__experimentalDefaultControls"]),f={...u,...d};return(0,Yc.jsxs)(Yc.Fragment,{children:[(0,Yc.jsx)(dP,{as:uMe,panelId:e,settings:r,value:i,onChange:c,defaultControls:f,onVisualize:a}),!!r?.spacing?.padding&&s==="padding"&&(0,Yc.jsx)(Epe,{forceShow:s==="padding",clientId:e,value:i}),!!r?.spacing?.margin&&s==="margin"&&(0,Yc.jsx)(Bpe,{forceShow:s==="margin",clientId:e,value:i})]})}function Ppe(e,t="any"){if(Tf.Platform.OS!=="web")return!1;let o=(0,OO.getBlockSupport)(e,vl);return o===!0?!0:t==="any"?!!(o?.aspectRatio||o?.height||o?.minHeight||o?.width):!!o?.[t]}var Rpe={useBlockProps:dMe,attributeKeys:["height","minHeight","width","style"],hasSupport(e){return Ppe(e)}};function dMe({name:e,height:t,minHeight:o,style:r}){if(!Ppe(e,"aspectRatio")||Ge(e,vl,"aspectRatio"))return{};let n=V({"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 Pz(){(0,Tpe.default)("wp.blockEditor.__experimentalUseCustomSides",{since:"6.3",version:"6.4"})}var yl=l(w(),1),fMe=[...ype,Bp,lr,vl,Ep,y0,$S],Oz=e=>fMe.some(t=>(0,qc.hasBlockSupport)(e,t));function _i(e={}){let t={};return(0,Jk.getCSSRules)(e).forEach(o=>{t[o.key]=o.value}),t}function mMe(e){return!Oz(e)&&!(0,qc.hasBlockSupport)(e,"customCSS",!0)||e.attributes.style||Object.assign(e.attributes,{style:{type:"object"}}),e}var Npe={[`${Bp}.__experimentalSkipSerialization`]:["border"],[`${lr}.__experimentalSkipSerialization`]:[lr],[`${ks}.__experimentalSkipSerialization`]:[ks],[`${vl}.__experimentalSkipSerialization`]:[vl],[`${y0}.__experimentalSkipSerialization`]:[y0],[`${$S}.__experimentalSkipSerialization`]:[$S]},pMe={...Npe,[`${vl}.aspectRatio`]:[`${vl}.aspectRatio`],[`${Ep}`]:[Ep]},hMe={[`${vl}.aspectRatio`]:!0,[`${Ep}`]:!0},gMe={gradients:"gradient"};function Rz(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;Rz(r[i],[s],!0)}else n.length===1&&delete r[n[0]]}),r}function Mpe(e,t,o,r=pMe){if(!Oz(t))return e;let{style:n}=o;return Object.entries(r).forEach(([i,s])=>{let a=hMe[i]||(0,qc.getBlockSupport)(t,i);a===!0&&(n=Rz(n,s)),Array.isArray(a)&&a.forEach(c=>{let u=gMe[c]||c;n=Rz(n,[[...s,u]])})}),e.style={..._i(n),...e.style},e}function bMe({clientId:e,name:t,setAttributes:o,__unstableParentLayout:r}){let n=ds(t,r),i=po(),s={clientId:e,name:t,setAttributes:o,settings:{...n,typography:{...n.typography,textAlign:!1}}};return i!=="default"?null:(0,yl.jsxs)(yl.Fragment,{children:[(0,yl.jsx)(zP,{...s}),(0,yl.jsx)(xle,{...s}),(0,yl.jsx)(xpe,{...s}),(0,yl.jsx)(vle,{...s}),(0,yl.jsx)(Ipe,{...s})]})}var LO={edit:bMe,hasSupport:Oz,addSaveProps:Mpe,attributeKeys:["style"],useBlockProps:yMe},kMe=[{elementType:"button"},{elementType:"link",pseudo:[":hover"]},{elementType:"heading",elements:["h1","h2","h3","h4","h5","h6"]}],vMe={};function yMe({name:e,style:t}){let o=(0,Lpe.useInstanceId)(vMe,"wp-elements"),r=`.${o}`,n=t?.elements,i=(0,Ope.useMemo)(()=>{if(!n)return;let s=[];return kMe.forEach(({elementType:a,pseudo:c,elements:u})=>{if(Ge(e,lr,a))return;let f=n?.[a];if(f){let m=Vg(r,qc.__EXPERIMENTAL_ELEMENTS[a]);s.push((0,Jk.compileCSS)(f,{selector:m})),c&&c.forEach(h=>{f[h]&&s.push((0,Jk.compileCSS)(f[h],{selector:Vg(r,`${qc.__EXPERIMENTAL_ELEMENTS[a]}${h}`)}))})}u&&u.forEach(m=>{n[m]&&s.push((0,Jk.compileCSS)(n[m],{selector:Vg(r,qc.__EXPERIMENTAL_ELEMENTS[m])}))})}),s.length>0?s.join(""):void 0},[r,n,e]);return oi({css:i}),Mpe({className:o},e,{style:t},Npe)}(0,Ape.addFilter)("blocks.registerBlockType","core/style/addAttribute",mMe);var Dpe=l(pt(),1),Vpe=l($(),1),_Me=e=>(0,Vpe.hasBlockSupport)(e,"__experimentalSettings",!1);function SMe(e){return _Me(e)&&(e?.attributes?.settings||(e.attributes={...e.attributes,settings:{type:"object"}})),e}(0,Dpe.addFilter)("blocks.registerBlockType","core/settings/addAttribute",SMe);var If=l($(),1),jpe=l(X(),1),Upe=l(pt(),1),_0=l(O(),1);function xMe(e=[]){let t={r:[],g:[],b:[],a:[]};return e.forEach(o=>{let r=Et(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 Fpe(e){return`${e}{filter:none}`}function zpe(e,t){return`${e}{filter:url(#${t})}`}function NO(e,t){let o=xMe(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 Zc=l(w(),1),Az=[],wMe=window?.navigator.userAgent&&window.navigator.userAgent.includes("Safari")&&!window.navigator.userAgent.includes("Chrome")&&!window.navigator.userAgent.includes("Chromium");iu([su]);function Lz({presetSetting:e,defaultSetting:t}){let[o,r,n,i]=he(t,`${e}.custom`,`${e}.theme`,`${e}.default`);return(0,_0.useMemo)(()=>[...r||Az,...n||Az,...o&&i||Az],[o,r,n,i])}function Hpe(e,t){if(!e)return;let o=t?.find(({slug:r})=>e===`var:preset|duotone|${r}`);return o?o.colors:void 0}function CMe(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 BMe({style:e,setAttributes:t,name:o}){let r=e?.color?.duotone,n=ds(o),i=po(),s=Lz({presetSetting:"color.duotone",defaultSetting:"color.defaultDuotone"}),a=Lz({presetSetting:"color.palette",defaultSetting:"color.defaultPalette"}),[c,u]=he("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:Hpe(r,s);return(0,Zc.jsxs)(Zc.Fragment,{children:[(0,Zc.jsx)(pe,{group:"filter",children:(0,Zc.jsx)(_P,{value:{filter:{duotone:m}},onChange:h=>{let p={...e,color:{...h?.filter}};t({style:Ae(p)})},settings:n})}),(0,Zc.jsx)(Dt,{group:"block",__experimentalShareWithChildBlocks:!0,children:(0,Zc.jsx)(TI,{duotonePalette:s,colorPalette:a,disableCustomDuotone:f,disableCustomColors:d,value:m,onChange:h=>{let p=CMe(h,s),g={...e,color:{...e?.color,duotone:p??h}};t({style:Ae(g)})},settings:n})})]})}var Nz={shareWithChildBlocks:!0,edit:BMe,useBlockProps:PMe,attributeKeys:["style"],hasSupport(e){return(0,If.hasBlockSupport)(e,"filter.duotone")}};function EMe(e){return(0,If.hasBlockSupport)(e,"filter.duotone")&&(e.attributes.style||Object.assign(e.attributes,{style:{type:"object"}})),e}function TMe({clientId:e,id:t,selector:o,attribute:r}){let n=Lz({presetSetting:"color.duotone",defaultSetting:"color.defaultDuotone"}),i=Array.isArray(r),s=i?void 0:Hpe(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";dc(h?{css:u!=="unset"?zpe(m,t):Fpe(m),__unstableType:"presets"}:void 0),dc(h?{assets:u!=="unset"?NO(t,u):"",__unstableType:"svgs"}:void 0);let p=tt(e);(0,_0.useEffect)(()=>{if(h&&p&&wMe){let g=p.style.display;p.style.setProperty("display","inline-block"),p.offsetHeight,p.style.setProperty("display",g)}},[h,p,u])}var IMe={};function PMe({clientId:e,name:t,style:o}){let r=(0,jpe.useInstanceId)(IMe),n=(0,_0.useMemo)(()=>{let c=(0,If.getBlockType)(t);if(c){if(!(0,If.getBlockSupport)(c,"filter.duotone",!1))return null;let d=(0,If.getBlockSupport)(c,"color.__experimentalDuotone",!1);if(d){let f=ii(c);return typeof d=="string"?Vg(f,d):f}return ii(c,"filter.duotone",{fallback:!0})}},[t]),i=o?.color?.duotone,s=`wp-duotone-${r}`,a=n&&i;return TMe({clientId:e,id:s,selector:n,attribute:i}),{className:a?s:""}}(0,Upe.addFilter)("blocks.registerBlockType","core/editor/duotone/add-attributes",EMe);var Gpe=l(O(),1),Wpe=l(z(),1),$pe=l(X(),1),S0=l($(),1),DO=l(N(),1);var MO=l(w(),1),RMe={},OMe={};function AMe({blockName:e,setAttributes:t,style:o}){if(po()!=="default")return null;let n=(0,S0.getBlockType)(e);function i(a){let c=a?.css?.trim()?a.css:void 0;t({style:Ae({...a,css:c})})}let s=(0,DO.sprintf)((0,DO.__)("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,MO.jsx)(pe,{group:"advanced",children:(0,MO.jsx)(wP,{value:o,onChange:i,inheritedValue:o,help:s})})}function LMe({clientId:e,name:t,setAttributes:o}){let{style:r,canEditCSS:n}=(0,Wpe.useSelect)(i=>{let{getBlockAttributes:s,getSettings:a}=i(x);return{style:s(e)?.style||OMe,canEditCSS:a().canEditCSS}},[e]);return n?(0,MO.jsx)(AMe,{blockName:t,setAttributes:o,style:r}):null}function NMe({style:e}){let t=e?.css,o=typeof t=="string"&&t.trim().length>0&&xP(t),r=(0,$pe.useInstanceId)(RMe,"wp-custom-css"),n=`.${r}`,i=(0,Gpe.useMemo)(()=>{if(o)return Y_(t,n)},[t,n,o]);return oi({css:i}),o?{className:`has-custom-css ${r}`}:{}}function MMe(e,t,o){if(!(0,S0.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 VO={edit:LMe,useBlockProps:NMe,addSaveProps:MMe,attributeKeys:["style"],hasSupport(e){return(0,S0.hasBlockSupport)(e,"customCSS",!0)}};var FO=l(X(),1),Dz=l(pt(),1),Xc=l($(),1),zO=l(z(),1),_l=l(A(),1),ev=l(N(),1);var Qo=l(w(),1),DMe="is-style-",Vz="layout",{kebabCase:Mz}=F(_l.privateApis);function Fz(e){return(0,Xc.hasBlockSupport)(e,"layout")||(0,Xc.hasBlockSupport)(e,"__experimentalLayout")}function jO(e={},t=""){let{layout:o}=e,{default:r}=(0,Xc.getBlockSupport)(t,Vz)||{},n=o?.inherit||o?.contentSize||o?.wideSize?{...o,type:"constrained"}:o||r||{},i=[];if(Kn[n?.type||"default"]?.className){let a=Kn[n?.type||"default"]?.className,c=t.split("/"),d=`wp-block-${c[0]==="core"?c.pop():c.join("-")}-${a}`;i.push(a,d)}return(0,zO.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-${Mz(n.orientation)}`),n?.justifyContent&&i.push(`is-content-justification-${Mz(n.justifyContent)}`),n?.flexWrap&&n.flexWrap==="nowrap"&&i.push("is-nowrap"),i}function zz(e={},t,o){let{layout:r={},style:n={}}=e,i=r?.inherit||r?.contentSize||r?.wideSize?{...r,type:"constrained"}:r||{},s=Rs(i?.type||"default"),[a]=he("spacing.blockGap"),c=a!==null;return s?.getLayoutStyle?.({blockName:t,selector:o,layout:r,style:n,hasBlockGapSupport:c})}function VMe({layout:e,setAttributes:t,name:o,clientId:r}){let n=ds(o),{layout:i}=n,{themeSupportsLayout:s}=(0,zO.useSelect)(T=>{let{getSettings:I}=T(x);return{themeSupportsLayout:I().supportsLayout}},[]);if(po()!=="default")return null;let c=(0,Xc.getBlockSupport)(o,Vz,{}),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=Rs(k),B=Rs("constrained"),P=!y.type&&(S||_),R=!!_||!!S,E=T=>t({layout:{type:T}}),L=T=>t({layout:T});return(0,Qo.jsxs)(Qo.Fragment,{children:[(0,Qo.jsx)(pe,{children:(0,Qo.jsxs)(_l.PanelBody,{title:(0,ev.__)("Layout"),children:[v&&(0,Qo.jsx)(Qo.Fragment,{children:(0,Qo.jsx)(_l.ToggleControl,{label:(0,ev.__)("Inner blocks use content width"),checked:C?.name==="constrained"||R,onChange:()=>t({layout:{type:C?.name==="constrained"||R?"default":"constrained"}}),help:C?.name==="constrained"||R?(0,ev.__)("Nested blocks use content width with options for full and wide widths."):(0,ev.__)("Nested blocks will fill the width of this container.")})}),!_&&d&&(0,Qo.jsx)(FMe,{type:k,onChange:E}),C&&C.name!=="default"&&(0,Qo.jsx)(C.inspectorControls,{layout:y,onChange:L,layoutBlockSupport:u,name:o,clientId:r}),B&&P&&(0,Qo.jsx)(B.inspectorControls,{layout:y,onChange:L,layoutBlockSupport:u,name:o,clientId:r})]})}),!_&&C&&(0,Qo.jsx)(C.toolBarControls,{layout:y,onChange:L,layoutBlockSupport:c,name:o,clientId:r})]})}var Kpe={shareWithChildBlocks:!0,edit:VMe,attributeKeys:["layout"],hasSupport(e){return Fz(e)}};function FMe({type:e,onChange:t}){return(0,Qo.jsx)(_l.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,isBlock:!0,label:(0,ev.__)("Layout type"),hideLabelFromVision:!0,isAdaptiveWidth:!0,value:e,onChange:t,children:b9().map(({name:o,label:r})=>(0,Qo.jsx)(_l.__experimentalToggleGroupControlOption,{value:o,label:r},o))})}function zMe(e){return"type"in(e.attributes?.layout??{})||Fz(e)&&(e.attributes={...e.attributes,layout:{type:"object"}}),e}function jMe({block:e,props:t,blockGapSupport:o,globalBlockGapValue:r,layoutClasses:n}){let{name:i,attributes:s}=t,a=(0,FO.useInstanceId)(e),{layout:c}=s,{default:u}=(0,Xc.getBlockSupport)(i,Vz)||{},d=c?.inherit||c?.contentSize||c?.wideSize?{...c,type:"constrained"}:c||u||{},f=`wp-container-${Mz(i)}-is-layout-`,m=`.${f}${a}`,h=o!==null,g=Rs(d?.type||"default")?.getLayoutStyle?.({blockName:i,selector:m,layout:d,style:s?.style,hasBlockGapSupport:h,globalBlockGapValue:r}),b=V({[`${f}${a}`]:!!g},n);return oi({css:g}),(0,Qo.jsx)(e,{...t,__unstableLayoutClassNames:b})}var UMe=(0,FO.createHigherOrderComponent)(e=>function(o){let{clientId:r,name:n,attributes:i}=o,s=Fz(n),a=jO(i,n),c=(0,zO.useSelect)(u=>{if(!s)return;let{getSettings:d,getBlockSettings:f}=F(u(x)),m=d(),{disableLayoutStyles:h}=m;if(h)return;let[p]=f(r,"spacing.blockGap"),g=m[Ei],b,k=i?.className;if(k?.includes(DMe)){let{getBlockStyles:y}=u(Xc.store),_=y(n),S=M3(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,Qo.jsx)(jMe,{block:e,props:o,layoutClasses:a,...c}):(0,Qo.jsx)(e,{...o,__unstableLayoutClassNames:s?a:void 0})},"withLayoutStyles");(0,Dz.addFilter)("blocks.registerBlockType","core/layout/addAttribute",zMe);(0,Dz.addFilter)("editor.BlockListBlock","core/editor/layout/with-layout-styles",UMe);var the=l(X(),1),Wz=l(z(),1),ohe=l(O(),1);var vs=l(O(),1),Pf=l(z(),1),qpe=l(X(),1);function w0(e,t){return Array.from({length:t},(o,r)=>e+r)}var pa=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 Ro(e,t){return e.ownerDocument.defaultView.getComputedStyle(e).getPropertyValue(t)}function x0(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 Qc(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 HMe(e,t){let o=parseFloat(Ro(e,"column-gap")),r=parseFloat(Ro(e,"row-gap")),n=x0(Ro(e,"grid-template-columns"),o),i=x0(Ro(e,"grid-template-rows"),r),s=Qc(n,t.left)+1,a=Qc(i,t.top)+1,c=Qc(n,t.right,"end")+1,u=Qc(i,t.bottom,"end")+1;return new pa({columnStart:s,columnEnd:c,rowStart:a,rowEnd:u})}function Ype(e){return HMe(e.parentElement,new window.DOMRect(e.offsetLeft,e.offsetTop,e.offsetWidth,e.offsetHeight))}function jz(e){let t=Ro(e,"grid-template-columns"),o=Ro(e,"grid-template-rows"),r=Ro(e,"border-top-width"),n=Ro(e,"border-right-width"),i=Ro(e,"border-bottom-width"),s=Ro(e,"border-left-width"),a=Ro(e,"padding-top"),c=Ro(e,"padding-right"),u=Ro(e,"padding-bottom"),d=Ro(e,"padding-left"),f=t.split(" ").length,m=o.split(" ").length,h=f*m;return{numColumns:f,numRows:m,numItems:h,currentColor:Ro(e,"color"),style:{gridTemplateColumns:t,gridTemplateRows:o,gap:Ro(e,"gap"),inset:` |
| 207 |
calc(${a} + ${r}) |
| 208 |
calc(${c} + ${n}) |
| 209 |
calc(${u} + ${i}) |
| 210 |
calc(${d} + ${s}) |
| 211 |
`}}}var Si=l(w(),1);function C0({clientId:e,contentRef:t,parentLayout:o,childGridClientId:r}){let n=(0,Pf.useSelect)(a=>a(x).getSettings().isDistractionFree,[]),i=tt(e);if(n||!i)return null;let s=o?.isManualPlacement&&window.__experimentalEnableGridInteractivity;return(0,Si.jsx)(GMe,{gridClientId:e,gridElement:i,isManualGrid:s,ref:t,childGridClientId:r})}var GMe=(0,vs.forwardRef)(({gridClientId:e,gridElement:t,isManualGrid:o,childGridClientId:r},n)=>{let[i,s]=(0,vs.useState)(()=>jz(t)),[a,c]=(0,vs.useState)(!1),u=tt(r),d=(0,vs.useMemo)(()=>u?Ype(u):null,[u]);return(0,vs.useEffect)(()=>{let f=()=>s(jz(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,vs.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,Si.jsx)(Yi,{className:V("block-editor-grid-visualizer",{"is-dropping-allowed":a}),clientId:e,__unstablePopoverSlot:"__unstable-block-tools-after",children:(0,Si.jsx)("div",{ref:n,className:"block-editor-grid-visualizer__grid",style:i.style,children:o?(0,Si.jsx)($Me,{gridClientId:e,gridInfo:i,childGridRect:d}):(0,Si.jsx)(WMe,{gridInfo:i,childGridRect:d})})})});function WMe({gridInfo:e,childGridRect:t}){return w0(1,e.numRows).map(o=>w0(1,e.numColumns).map(r=>{let n=e.currentColor;return t?.contains(r,o)&&(n="transparent"),(0,Si.jsx)(Zpe,{color:n},`${o}-${r}`)}))}function $Me({gridClientId:e,gridInfo:t,childGridRect:o}){let[r,n]=(0,vs.useState)(null),i=(0,Pf.useSelect)(a=>{let{getBlockOrder:c,getBlockStyles:u}=F(a(x)),d=c(e);return u(d)},[e]),s=(0,vs.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 pa({columnStart:u,rowStart:d,columnSpan:f,rowSpan:m}))}return a},[i]);return w0(1,t.numRows).map(a=>w0(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,Si.jsx)(Zpe,{color:d,className:m&&"is-highlighted",children:f&&!u?(0,Si.jsx)(KMe,{column:c,row:a,gridClientId:e,gridInfo:t,setHighlightedRect:n}):(0,Si.jsx)(YMe,{column:c,row:a,gridClientId:e,gridInfo:t,setHighlightedRect:n})},`${a}-${c}`)}))}function Zpe({color:e,children:t,className:o}){return(0,Si.jsx)("div",{className:V("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 Xpe(e,t,o,r,n){let{getBlockAttributes:i,getBlockRootClientId:s,canInsertBlockType:a,getBlockName:c}=(0,Pf.useSelect)(x),{updateBlockAttributes:u,moveBlocksToPosition:d,__unstableMarkNextChangeAsNotPersistent:f}=(0,Pf.useDispatch)(x),m=_p(o,r.numColumns);return qMe({validateDrag(h){let p=c(h);if(!a(p,o))return!1;let g=i(h),b=new pa({columnStart:e,rowStart:t,columnSpan:g.style?.layout?.columnSpan,rowSpan:g.style?.layout?.rowSpan});return new pa({columnSpan:r.numColumns,rowSpan:r.numRows}).containsRect(b)},onDragEnter(h){let p=i(h);n(new pa({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 KMe({column:e,row:t,gridClientId:o,gridInfo:r,setHighlightedRect:n}){return(0,Si.jsx)("div",{className:"block-editor-grid-visualizer__drop-zone",ref:Xpe(e,t,o,r,n)})}function YMe({column:e,row:t,gridClientId:o,gridInfo:r,setHighlightedRect:n}){let{updateBlockAttributes:i,moveBlocksToPosition:s,__unstableMarkNextChangeAsNotPersistent:a}=(0,Pf.useDispatch)(x),c=_p(o,r.numColumns);return(0,Si.jsx)(cd,{rootClientId:o,className:"block-editor-grid-visualizer__appender",ref:Xpe(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 qMe({validateDrag:e,onDragEnter:t,onDragLeave:o,onDrop:r}){let{getDraggedBlockClientIds:n}=(0,Pf.useSelect)(x);return(0,qpe.__experimentalUseDropZone)({onDragEnter(){let[i]=n();i&&e(i)&&t(i)},onDragLeave(){o()},onDrop(){let[i]=n();i&&e(i)&&r(i)}})}var Qpe=l(A(),1),B0=l(O(),1);var UO=l(w(),1);function Uz({clientId:e,bounds:t,onChange:o,parentLayout:r}){let n=tt(e),i=n?.parentElement,{isManualPlacement:s}=r;return!n||!i?null:(0,UO.jsx)(ZMe,{clientId:e,bounds:t,blockElement:n,rootBlockElement:i,onChange:o,isManualGrid:s&&window.__experimentalEnableGridInteractivity})}function ZMe({clientId:e,bounds:t,blockElement:o,rootBlockElement:r,onChange:n,isManualGrid:i}){let[s,a]=(0,B0.useState)(null),[c,u]=(0,B0.useState)({top:!1,bottom:!1,left:!1,right:!1});(0,B0.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,UO.jsx)(Yi,{className:"block-editor-grid-item-resizer",clientId:e,__unstablePopoverSlot:"__unstable-block-tools-after",additionalStyles:m,children:(0,UO.jsx)(Qpe.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(Ro(r,"column-gap")),k=parseFloat(Ro(r,"row-gap")),v=x0(Ro(r,"grid-template-columns"),b),y=x0(Ro(r,"grid-template-rows"),k),_=new window.DOMRect(o.offsetLeft+g.offsetLeft,o.offsetTop+g.offsetTop,g.offsetWidth,g.offsetHeight),S=Qc(v,_.left)+1,C=Qc(y,_.top)+1,B=Qc(v,_.right,"end")+1,P=Qc(y,_.bottom,"end")+1;n({columnSpan:B-S+1,rowSpan:P-C+1,columnStart:i?S:void 0,rowStart:i?C:void 0})}})})}var ys=l(N(),1),tv=l(A(),1);var Jpe=l(z(),1),ehe=l(X(),1);var Hr=l(w(),1);function Hz({layout:e,parentLayout:t,onChange:o,gridClientId:r,blockClientId:n}){let{moveBlocksToPosition:i,__unstableMarkNextChangeAsNotPersistent:s}=(0,Jpe.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=_p(r,h);return(0,Hr.jsx)(Dt,{group:"parent",children:(0,Hr.jsxs)(tv.ToolbarGroup,{className:"block-editor-grid-item-mover__move-button-container",children:[(0,Hr.jsx)("div",{className:"block-editor-grid-item-mover__move-horizontal-button-container is-left",children:(0,Hr.jsx)(E0,{icon:(0,ys.isRTL)()?Uo:Gr,label:(0,ys.__)("Move left"),description:(0,ys.__)("Move left"),isDisabled:a<=1,onClick:()=>{o({columnStart:a-1}),s(),i([n],r,r,g(a-1,c))}})}),(0,Hr.jsxs)("div",{className:"block-editor-grid-item-mover__move-vertical-button-container",children:[(0,Hr.jsx)(E0,{className:"is-up-button",icon:Uf,label:(0,ys.__)("Move up"),description:(0,ys.__)("Move up"),isDisabled:c<=1,onClick:()=>{o({rowStart:c-1}),s(),i([n],r,r,g(a,c-1))}}),(0,Hr.jsx)(E0,{className:"is-down-button",icon:hr,label:(0,ys.__)("Move down"),description:(0,ys.__)("Move down"),isDisabled:p&&m>=p,onClick:()=>{o({rowStart:c+1}),s(),i([n],r,r,g(a,c+1))}})]}),(0,Hr.jsx)("div",{className:"block-editor-grid-item-mover__move-horizontal-button-container is-right",children:(0,Hr.jsx)(E0,{icon:(0,ys.isRTL)()?Gr:Uo,label:(0,ys.__)("Move right"),description:(0,ys.__)("Move right"),isDisabled:h&&f>=h,onClick:()=>{o({columnStart:a+1}),s(),i([n],r,r,g(a+1,c))}})})]})})}function E0({className:e,icon:t,label:o,isDisabled:r,onClick:n,description:i}){let a=`block-editor-grid-item-mover-button__description-${(0,ehe.useInstanceId)(E0)}`;return(0,Hr.jsxs)(Hr.Fragment,{children:[(0,Hr.jsx)(tv.ToolbarButton,{className:V("block-editor-grid-item-mover-button",e),icon:t,label:o,"aria-describedby":a,onClick:r?null:n,disabled:r,accessibleWhenDisabled:!0}),(0,Hr.jsx)(tv.VisuallyHidden,{id:a,children:i})]})}var T0=l(z(),1),GO=l(O(),1),HO=l(X(),1);function Gz({clientId:e}){let{gridLayout:t,blockOrder:o,selectedBlockLayout:r}=(0,T0.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,T0.useSelect)(x),{updateBlockAttributes:s,__unstableMarkNextChangeAsNotPersistent:a}=(0,T0.useDispatch)(x),c=(0,GO.useMemo)(()=>r?new pa(r):null,[r]),u=(0,HO.usePrevious)(c),d=(0,HO.usePrevious)(t.isManualPlacement),f=(0,HO.usePrevious)(o);(0,GO.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 pa({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]=XMe(h,t.columnCount,y,_,u?.columnEnd,u?.rowEnd);h.push(new pa({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 P=Object.keys(B).length===0;m[g]=me(v,["style","layout"],P?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]=me(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 XMe(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 pa({columnStart:a,rowStart:s,columnSpan:o,rowSpan:r});if(!e.some(u=>u.intersectsRect(c)))return[a,s]}}var Jc=l(w(),1),QMe={};function JMe({style:e}){let t=(0,Wz.useSelect)(g=>!g(x).getSettings().disableLayoutStyles),o=e?.layout??{},{selfStretch:r,flexSize:n,columnStart:i,rowStart:s,columnSpan:a,rowSpan:c}=o,u=am()||{},{columnCount:d,minimumColumnWidth:f}=u,m=(0,the.useInstanceId)(QMe),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(oi({css:p}),!!p)return{className:`wp-container-content-${m}`}}function eDe({clientId:e,style:t,setAttributes:o}){let r=am()||{},{type:n="default",allowSizingOnChildren:i=!1,isManualPlacement:s}=r;return n!=="grid"?null:(0,Jc.jsx)(tDe,{clientId:e,style:t,setAttributes:o,allowSizingOnChildren:i,isManualPlacement:s,parentLayout:r})}function tDe({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,Wz.useSelect)(y=>{let{getBlockRootClientId:_,getBlockEditingMode:S,getTemplateLock:C,getBlockAttributes:B,getSettings:P}=y(x),R=_(e);if(C(R)||S(R)!=="default")return{rootClientId:R,isVisible:!1};let E=B(R),L=B(e),T=P();return{rootClientId:R,isVisible:!0,parentBlockVisibility:E?.metadata?.blockVisibility,blockBlockVisibility:L?.metadata?.blockVisibility,deviceType:T?.[Ti]?.toLowerCase()||Tt.desktop.value,isChildBlockAGrid:L?.layout?.type==="grid"}},[e]),{isBlockCurrentlyHidden:m}=ji({blockVisibility:c,deviceType:d}),{isBlockCurrentlyHidden:h}=ji({blockVisibility:u,deviceType:d}),[p,g]=(0,ohe.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,Jc.jsxs)(Jc.Fragment,{children:[(0,Jc.jsx)(C0,{clientId:s,contentRef:g,parentLayout:i,childGridClientId:b}),k&&(0,Jc.jsx)(Uz,{clientId:e,bounds:p,onChange:v,parentLayout:i}),n&&window.__experimentalEnableGridInteractivity&&(0,Jc.jsx)(Hz,{layout:t?.layout,parentLayout:i,onChange:v,gridClientId:s,blockClientId:e})]})}var $z={useBlockProps:JMe,edit:eDe,attributeKeys:["style"],hasSupport(){return!0}};var Yz=l(pt(),1),Kz=l($(),1),rhe="metadata";function oDe(e){return e?.attributes?.[rhe]?.type||(e.attributes={...e.attributes,[rhe]:{type:"object"}}),e}function rDe(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,Kz.hasBlockSupport)(e.name,"renaming",!0)&&(i.name=n.name),n.blockVisibility!==void 0&&!e.attributes?.metadata?.blockVisibility&&(0,Kz.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,Yz.addFilter)("blocks.registerBlockType","core/metadata/addMetaAttribute",oDe);(0,Yz.addFilter)("blocks.switchToBlockType.transformedBlock","core/metadata/addTransforms",rDe);var qz=l(N(),1),WO=l(O(),1),$O=l(A(),1),KO=l($(),1),ov=l(z(),1);var Rf=l(w(),1),nDe={};function iDe({name:e,clientId:t,metadata:{ignoredHookedBlocks:o=[]}={}}){let r=(0,ov.useSelect)(h=>h(KO.store).getBlockTypes(),[]),n=(0,WO.useMemo)(()=>r?.filter(({name:h,blockHooks:p})=>p&&e in p||o.includes(h)),[r,e,o]),i=(0,ov.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(P=>P.name===_.name);return B?{...y,[_.name]:B.clientId}:y},{});return Object.values(v).length>0?v:nDe},[n,e,t]),{getBlockIndex:s,getBlockCount:a,getBlockRootClientId:c}=(0,ov.useSelect)(x),{insertBlock:u,removeBlock:d}=(0,ov.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,Rf.jsx)(pe,{children:(0,Rf.jsxs)($O.PanelBody,{className:"block-editor-hooks__block-hooks",title:(0,qz.__)("Plugins"),initialOpen:!0,children:[(0,Rf.jsx)("p",{className:"block-editor-hooks__block-hooks-helptext",children:(0,qz.__)("Manage the inclusion of blocks added automatically by plugins.")}),Object.keys(f).map(h=>(0,Rf.jsxs)(WO.Fragment,{children:[(0,Rf.jsx)("h3",{children:h}),f[h].map(p=>{let g=p.name in i;return(0,Rf.jsx)($O.ToggleControl,{checked:g,label:p.title,onChange:()=>{if(!g){let b=p.blockHooks[e];m((0,KO.createBlock)(p.name),b);return}d(i[p.name],!1)}},p.title)})]},h))]})})}var nhe={edit:iDe,attributeKeys:["metadata"],hasSupport(){return!0}};var Zz=l(N(),1),ihe=l($(),1),rv=l(A(),1),she=l(z(),1),ahe=l(O(),1),lhe=l(X(),1);var Of=l(w(),1),sDe=()=>(0,lhe.useViewportMatch)("medium","<")?{}:{popoverProps:{placement:"left-start",offset:259}},aDe=({name:e,metadata:t})=>{let o=(0,ahe.useContext)(Pr),{removeAllBlockBindings:r}=Nl(),n=sDe(),{bindableAttributes:i,hasCompatibleFields:s}=(0,she.useSelect)(c=>{let{__experimentalBlockBindingsSupportedAttributes:u}=c(x).getSettings(),{getAllBlockBindingsSources:d,getBlockBindingsSourceFieldsList:f}=F(c(ihe.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,Of.jsx)(pe,{group:"bindings",children:(0,Of.jsxs)(rv.__experimentalToolsPanel,{label:(0,Zz.__)("Attributes"),resetAll:()=>{r()},dropdownMenuProps:n,className:"block-editor-bindings__panel",children:[(0,Of.jsx)(rv.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,children:i.map(c=>(0,Of.jsx)(hy,{attribute:c,blockName:e,binding:a?.[c]},c))}),(0,Of.jsx)(rv.__experimentalText,{as:"div",variant:"muted",children:(0,Of.jsx)("p",{children:(0,Zz.__)("Attributes connected to custom fields or other dynamic data.")})})]})})},che={edit:aDe,attributeKeys:["metadata"],hasSupport(e){return!["core/post-date","core/navigation-link","core/navigation-submenu"].includes(e)}};var uhe=l(N(),1),dhe=l(A(),1),ZO=l(z(),1),I0=l($(),1),fhe=l(O(),1);var YO=l(z(),1);function qO(e){let{isOpened:t,expandRevision:o}=(0,YO.useSelect)(i=>{let{isListViewPanelOpened:s,getListViewExpandRevision:a}=F(i(x));return{isOpened:s(e),expandRevision:a()}},[e]),{__unstableToggleListViewPanel:r}=(0,YO.useDispatch)(x);return{isOpened:t,expandRevision:o,handleToggle:i=>{r(e,i)}}}var nv=l(w(),1),lDe="listView";function mhe(e){return(0,I0.hasBlockSupport)(e,lDe)}function cDe({clientId:e,name:t}){let{isSelectionWithinCurrentSection:o}=(0,fhe.useContext)(pr),{isOpened:r,expandRevision:n,handleToggle:i}=qO(e),{openListViewContentPanel:s}=F((0,ZO.useDispatch)(x)),a=mhe(t),{hasChildren:c,isNestedListView:u}=(0,ZO.useSelect)(h=>{let{getBlockCount:p,getBlockParents:g,getBlockName:b}=h(x),v=g(e,!1).find(y=>{let _=b(y);return _==="core/navigation"||(0,I0.hasBlockSupport)(_,"listView")});return{hasChildren:!!p(e),isNestedListView:v}},[e]),f=(0,I0.getBlockType)(t)?.title||t;return!a||u?null:(0,nv.jsx)(zm,{group:"list",children:(0,nv.jsxs)(dhe.PanelBody,{title:o?f:void 0,opened:r,onToggle:i,children:[!c&&(0,nv.jsx)("p",{className:"block-editor-block-inspector__no-blocks",children:(0,uhe.__)("No items yet.")}),(0,nv.jsx)(sS,{rootClientId:e,isExpanded:!0,description:f,showAppender:!0,onSelect:s},`${e}-${n}`)]})})}var phe={edit:cDe,hasSupport:mhe,attributeKeys:[],supportsPatternEditing:!0};var hhe=l(pt(),1),ghe=l($(),1);function uDe(e){return e.__experimentalLabel||(0,ghe.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,hhe.addFilter)("blocks.registerBlockType","core/metadata/addLabelCallback",uDe);var bhe=l(X(),1),khe=l(pt(),1),vhe=l(z(),1);var _s=l(w(),1);function dDe(e){Gz(e)}function fDe({clientId:e,layout:t}){let{isVisible:o,blockVisibility:r,deviceType:n,isAnyAncestorHidden:i}=(0,vhe.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}=F(a(x)),b=h(e),v=p()?.[Ti]?.toLowerCase()||Tt.desktop.value;return{isVisible:!0,blockVisibility:b?.metadata?.blockVisibility,deviceType:v,isAnyAncestorHidden:g(e,v)}},[e]),{isBlockCurrentlyHidden:s}=ji({blockVisibility:r,deviceType:n});return(0,_s.jsxs)(_s.Fragment,{children:[(0,_s.jsx)(dDe,{clientId:e}),o&&!s&&!i&&(0,_s.jsx)(C0,{clientId:e,parentLayout:t})]})}var mDe=(0,bhe.createHigherOrderComponent)(e=>function(o){return o.attributes.layout?.type!=="grid"?(0,_s.jsx)(e,{...o},"edit"):(0,_s.jsxs)(_s.Fragment,{children:[(0,_s.jsx)(fDe,{clientId:o.clientId,layout:o.attributes.layout}),(0,_s.jsx)(e,{...o},"edit")]})},"addGridVisualizerToBlockEdit");(0,khe.addFilter)("editor.BlockEdit","core/editor/grid-visualizer",mDe);var P0=l($(),1),_he=l(A(),1),She=l(z(),1);var QO=l(O(),1),xhe=l(N(),1);function yhe(e){let t=[],o=[];return Object.entries(e).forEach(([r,n])=>{if(!n.autoGenerateControl)return;let i=pDe(r,n);i&&(t.push(i),o.push(r))}),{fields:t,form:{fields:o}}}function pDe(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 XO=l(w(),1);function hDe(e){return e?Object.values(e).some(t=>t?.autoGenerateControl):!1}function gDe({name:e,clientId:t,setAttributes:o}){let r=po(),n=(0,QO.useContext)(Pr),i=(0,She.useSelect)(u=>{let d=u(x).getBlockAttributes(t);if(!d?.metadata?.bindings)return d;let{getBlockBindingsSource:f}=F(u(P0.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,P0.getBlockType)(e),{fields:a,form:c}=(0,QO.useMemo)(()=>s?.attributes?yhe(s.attributes):{fields:[],form:{fields:[]}},[s?.attributes]);return r!=="default"||!a||a.length===0?null:(0,XO.jsx)(pe,{children:(0,XO.jsx)(_he.PanelBody,{title:(0,xhe.__)("Settings"),children:(0,XO.jsx)(p0,{data:i,fields:a,form:c,onChange:o})})})}var whe={edit:gDe,attributeKeys:[],hasSupport(e){let t=(0,P0.getBlockType)(e);return hDe(t?.attributes)}};function JO(e){let{style:t}=e,o=t?.dimensions||{},r=_i({dimensions:o});return{className:o.aspectRatio?"has-aspect-ratio":void 0,style:r}}function eA(e){let t=e.style?.border||{};return{className:HF(e)||void 0,style:_i({border:t})}}function Xz(e){let{colors:t}=Fd(),o=eA(e),{borderColor:r}=e;if(r){let n=Cp({colors:t,namedColor:r});o.style.borderColor=n.color}return o}function Qz(e){let t=e.style?.shadow||"";return{style:_i({shadow:t})}}var Jz=l(O(),1);function tA(e){let{backgroundColor:t,textColor:o,gradient:r,style:n}=e,i=Bi("background-color",t),s=Bi("color",o),a=xh(r),c=a||n?.color?.gradient,u=V(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=_i({color:d});return{className:u||void 0,style:f}}function ej(e){let{backgroundColor:t,textColor:o,gradient:r}=e,[n,i,s,a,c,u]=he("color.palette.custom","color.palette.theme","color.palette.default","color.gradients.custom","color.gradients.theme","color.gradients.default"),d=(0,Jz.useMemo)(()=>[...n||[],...i||[],...s||[]],[n,i,s]),f=(0,Jz.useMemo)(()=>[...a||[],...c||[],...u||[]],[a,c,u]),m=tA(e);if(t){let h=va(d,t);m.style.backgroundColor=h.color}if(r&&(m.style.background=vC(f,r)),o){let h=va(d,o);m.style.color=h.color}return m}function tj(e){let{style:t}=e,o=t?.spacing||{};return{style:_i({spacing:o})}}var Che=l(A(),1);var{kebabCase:bDe}=F(Che.privateApis);function oj(e,t){let o=e?.style?.typography||{};o={...o,fontSize:uc({size:e?.style?.typography?.fontSize},t)};let r=_i({typography:o}),n=e?.fontFamily?`has-${bDe(e.fontFamily)}-font-family`:"",i=e?.style?.typography?.textAlign?`has-text-align-${e?.style?.typography?.textAlign}`:"";return{className:V(n,i,Eu(e?.fontSize)),style:r}}var oA=l(O(),1);function rj(e){let[t,o]=(0,oA.useState)(e);return(0,oA.useEffect)(()=>{e&&o(e)},[e]),t}hce([JP,TO,_6,yz,LO,VO,Nz,PO,i3,Kpe,nhe,che,$z,Dce,Jme,phe,whe].filter(Boolean));gce([JP,TO,wle,LO,ZF,Rpe,Nz,_z,xz,PO,GF,VO,i3,oJ,$z]);bce([JP,TO,_6,jce,yz,GF,VO,PO,ZF,LO,_z,xz]);var Bhe={button:"wp-element-button",caption:"wp-element-caption"},kDe=e=>Bhe[e]?Bhe[e]:"";var Ehe=()=>"";var iv=l(O(),1),R0=l($(),1),ij=l(br(),1);var The=l(w(),1);function sj(e,t,o){if(e==null||e===!1)return;if(Array.isArray(e))return nj(e,t,o);switch(typeof e){case"string":case"number":return}let{type:r,props:n}=e;switch(r){case iv.StrictMode:case iv.Fragment:return nj(n.children,t,o);case iv.RawHTML:return;case w_.Content:return Ihe(t,o);case TS:t.push(n.value);return}switch(typeof r){case"string":return typeof n.children<"u"?nj(n.children,t,o):void 0;case"function":let i=r.prototype&&typeof r.prototype.render=="function"?new r(n).render():r(n);return sj(i,t,o)}}function nj(e,...t){e=Array.isArray(e)?e:[e];for(let o=0;o<e.length;o++)sj(e[o],...t)}function Ihe(e,t){for(let o=0;o<t.length;o++){let{name:r,attributes:n,innerBlocks:i}=t[o],s=(0,R0.getSaveElement)(r,n,(0,The.jsx)(w_.Content,{}));sj(s,e,i)}}function Phe(e=[]){R0.__unstableGetBlockProps.skipFilters=!0;let t=[];return Ihe(t,e),R0.__unstableGetBlockProps.skipFilters=!1,t.map(o=>o instanceof ij.RichTextData?o:ij.RichTextData.fromHTMLString(o))}var Rhe=l(A(),1);var aj=l(w(),1);function Ohe({clientId:e,resizableBoxProps:t,...o}){return(0,aj.jsx)(Yi,{clientId:e,__unstablePopoverSlot:"block-toolbar",...o,children:(0,aj.jsx)(Rhe.ResizableBox,{...t})})}var A0=l(O(),1),rA=l(z(),1),ha=l(A(),1),O0=l(N(),1);var Ss=l(w(),1);function Ahe({rules:e}){let[t,o]=(0,A0.useState)(!1),{clientIds:r,selectPrevious:n,message:i}=(0,rA.useSelect)(p=>F(p(x)).getRemovalPromptData()),{clearBlockRemovalPrompt:s,setBlockRemovalRules:a,privateRemoveBlocks:c}=F((0,rA.useDispatch)(x));if((0,A0.useEffect)(()=>(a(e),()=>{a()}),[e,a]),(0,A0.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,Ss.jsx)(ha.Modal,{title:(0,O0.__)("Confirm deletion"),onRequestClose:s,size:"medium",children:(0,Ss.jsxs)(ha.__experimentalVStack,{spacing:4,children:[(0,Ss.jsxs)("div",{children:[(0,Ss.jsx)("p",{children:d}),u&&(i.warning||i.subtext)&&(0,Ss.jsxs)("p",{children:[i.warning&&(0,Ss.jsx)("strong",{children:i.warning}),i.warning&&i.subtext&&" ",i.subtext]})]}),f&&(0,Ss.jsx)(ha.CheckboxControl,{label:(0,O0.__)("I understand the consequences"),checked:t,onChange:o}),(0,Ss.jsxs)(ha.__experimentalHStack,{justify:"right",children:[(0,Ss.jsx)(ha.Button,{variant:"tertiary",onClick:s,__next40pxDefaultSize:!0,children:(0,O0.__)("Cancel")}),(0,Ss.jsx)(ha.Button,{variant:"primary",onClick:h,disabled:m,accessibleWhenDisabled:!0,__next40pxDefaultSize:!0,children:(0,O0.__)("Delete")})]})]})})}var lj=l(O(),1);var sv=l(A(),1),Nhe=l(O(),1),Gn=l(N(),1),nA=l(w(),1),Lhe=[{value:"fill",label:(0,Gn._x)("Fill","Scale option for dimensions control"),help:(0,Gn.__)("Fill the space by stretching the content.")},{value:"contain",label:(0,Gn._x)("Contain","Scale option for dimensions control"),help:(0,Gn.__)("Fit the content to the space without clipping.")},{value:"cover",label:(0,Gn._x)("Cover","Scale option for dimensions control"),help:(0,Gn.__)("Fill the space by clipping what doesn't fit.")},{value:"none",label:(0,Gn._x)("None","Scale option for dimensions control"),help:(0,Gn.__)("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,Gn._x)("Scale down","Scale option for dimensions control"),help:(0,Gn.__)("Scale down the content to fit the space if it is too big. Content that is too small will have additional padding.")}];function Mhe({panelId:e,value:t,onChange:o,options:r=Lhe,defaultValue:n=Lhe[0].value,isShownByDefault:i=!0}){let s=t??"fill",a=(0,Nhe.useMemo)(()=>r.reduce((c,u)=>(c[u.value]=u.help,c),{}),[r]);return(0,nA.jsx)(sv.__experimentalToolsPanelItem,{label:(0,Gn.__)("Scale"),isShownByDefault:i,hasValue:()=>s!==n,onDeselect:()=>o(n),panelId:e,children:(0,nA.jsx)(sv.__experimentalToggleGroupControl,{label:(0,Gn.__)("Scale"),isBlock:!0,help:a[s],value:s,onChange:o,size:"__unstable-large",children:r.map(c=>(0,nA.jsx)(sv.__experimentalToggleGroupControlOption,{...c},c.value))})})}var av=l(A(),1),Kp=l(N(),1),eu=l(w(),1);function Dhe({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,eu.jsxs)(eu.Fragment,{children:[(0,eu.jsx)(av.__experimentalToolsPanelItem,{style:{gridColumn:"span 1"},label:(0,Kp.__)("Width"),isShownByDefault:n,hasValue:()=>i!=="",onDeselect:a("width"),panelId:e,children:(0,eu.jsx)(av.__experimentalUnitControl,{label:(0,Kp.__)("Width"),placeholder:(0,Kp.__)("Auto"),labelPosition:"top",units:r,min:0,value:i,onChange:a("width"),size:"__unstable-large"})}),(0,eu.jsx)(av.__experimentalToolsPanelItem,{style:{gridColumn:"span 1"},label:(0,Kp.__)("Height"),isShownByDefault:n,hasValue:()=>s!=="",onDeselect:a("height"),panelId:e,children:(0,eu.jsx)(av.__experimentalUnitControl,{label:(0,Kp.__)("Height"),placeholder:(0,Kp.__)("Auto"),labelPosition:"top",units:r,min:0,value:s,onChange:a("height"),size:"__unstable-large"})})]})}var Af=l(w(),1);function vDe({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,Af.jsxs)(Af.Fragment,{children:[c.includes("aspectRatio")&&(0,Af.jsx)(cP,{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,Af.jsx)(Dhe,{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,Af.jsx)(Mhe,{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 Vhe=vDe;var iA=l(A(),1),tu=l(N(),1),cj=l(w(),1),Fhe=[{label:(0,tu._x)("Thumbnail","Image size option for resolution control"),value:"thumbnail"},{label:(0,tu._x)("Medium","Image size option for resolution control"),value:"medium"},{label:(0,tu._x)("Large","Image size option for resolution control"),value:"large"},{label:(0,tu._x)("Full Size","Image size option for resolution control"),value:"full"}];function zhe({panelId:e,value:t,onChange:o,options:r=Fhe,defaultValue:n=Fhe[0].value,isShownByDefault:i=!0,resetAllFilter:s}){let a=t??n;return(0,cj.jsx)(iA.__experimentalToolsPanelItem,{hasValue:()=>a!==n,label:(0,tu.__)("Resolution"),onDeselect:()=>o(n),isShownByDefault:i,panelId:e,resetAllFilter:s,children:(0,cj.jsx)(iA.SelectControl,{label:(0,tu.__)("Resolution"),value:a,options:r,onChange:o,help:(0,tu.__)("Select the size of the source image."),size:"__unstable-large"})})}var Yp=l(N(),1),lv=l(A(),1),Uhe=l(z(),1);var ga=l(N(),1),jhe={a:(0,ga.__)("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,ga.__)("The <article> element should represent a self-contained, syndicatable portion of the document."),aside:(0,ga.__)("The <aside> element should represent a portion of a document whose content is only indirectly related to the document's main content."),button:(0,ga.__)("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,ga.__)("The <div> element should only be used if the block is a design element with no semantic meaning."),footer:(0,ga.__)("The <footer> element should represent a footer for its nearest sectioning element (e.g.: <section>, <article>, <main> etc.)."),header:(0,ga.__)("The <header> element should represent introductory content, typically a group of introductory or navigational aids."),main:(0,ga.__)("The <main> element should be used for the primary content of your document only."),nav:(0,ga.__)("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,ga.__)("The <section> element should represent a standalone portion of the document that can't be better represented by another element.")};var L0=l(w(),1);function Hhe({tagName:e,onChange:t,clientId:o,options:r=[{label:(0,Yp.__)("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,Uhe.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,Yp.sprintf)((0,Yp.__)("%s (Already in use)"),a.label)}:a);return(0,L0.jsxs)(lv.__experimentalVStack,{spacing:2,className:"block-editor-html-element-control",children:[(0,L0.jsx)(lv.SelectControl,{__next40pxDefaultSize:!0,label:(0,Yp.__)("HTML element"),options:s,value:e,onChange:t,help:jhe[e]}),e==="main"&&i&&(0,L0.jsx)(lv.Notice,{status:"warning",isDismissible:!1,children:(0,Yp.__)("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 xs=l(A(),1),cv=l(O(),1),sA=l(N(),1);var Wn=l(A(),1);var xi=l(w(),1),{Badge:yDe}=F(Wn.privateApis);function Ghe({title:e,url:t,image:o,badges:r}){return(0,xi.jsxs)(Wn.__experimentalHStack,{justify:"space-between",alignment:"top",children:[(0,xi.jsx)(Wn.FlexItem,{className:"link-preview-button__content",children:(0,xi.jsxs)(Wn.__experimentalHStack,{alignment:"top",children:[o&&(0,xi.jsx)(Wn.FlexItem,{className:"link-preview-button__image-container",children:(0,xi.jsx)("img",{className:"link-preview-button__image",src:o,alt:""})}),(0,xi.jsxs)(Wn.__experimentalVStack,{className:"link-preview-button__details",alignment:"topLeft",children:[(0,xi.jsx)(Wn.__experimentalTruncate,{numberOfLines:1,className:"link-preview-button__title",children:e}),t&&(0,xi.jsx)(Wn.__experimentalTruncate,{numberOfLines:1,className:"link-preview-button__hint",children:t}),r&&r.length>0&&(0,xi.jsx)(Wn.__experimentalHStack,{className:"link-preview-button__badges",alignment:"left",children:r.map(n=>(0,xi.jsx)(yDe,{intent:n.intent,children:n.label},`${n.label}|${n.intent}`))})]})]})}),(0,xi.jsx)(we,{icon:hr,className:"link-preview-button__icon"})]})}var wi=l(w(),1);function uj({preview:e,onSelect:t,suggestionsQuery:o,label:r,help:n}){let[i,s]=(0,cv.useState)(!1),a=(0,cv.useId)(),c=`link-picker-title-${a}`,u=`link-picker-description-${a}`,d=(0,cv.useRef)(null),{baseControlProps:f,controlProps:m}=(0,xs.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,wi.jsxs)(xs.BaseControl,{...f,children:[(0,wi.jsx)(xs.BaseControl.VisualLabel,{children:r}),(0,wi.jsxs)(xs.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,wi.jsxs)(xs.VisuallyHidden,{children:[r,":"]}),(0,wi.jsx)(Ghe,{title:e.title||(0,sA.__)("Add link"),url:e.url,image:e.image,badges:e.badges})]}),i&&(0,wi.jsx)(xs.Popover,{anchor:d.current,onClose:()=>s(!1),placement:"left-start",offset:36,shift:!0,children:(0,wi.jsxs)("div",{role:"dialog","aria-labelledby":c,"aria-describedby":u,children:[(0,wi.jsxs)(xs.VisuallyHidden,{children:[(0,wi.jsx)("h2",{id:c,children:(0,sA.__)("Select a link")}),(0,wi.jsx)("p",{id:u,children:(0,sA.__)("Search for and add a link to the navigation item.")})]}),(0,wi.jsx)(Wd,{value:null,onChange:h,suggestionsQuery:o,showInitialSuggestions:!0,forceIsEditingLink:!0,settings:[]})]})})]})}var dj={};Oj(dj,{...zF,ExperimentalBlockCanvas:X3,BlockCanvasCover:QT,ExperimentalBlockEditorProvider:Xh,getDuotoneFilter:NO,getRichTextValues:Phe,PrivateQuickInserter:nE,extractWords:xC,getNormalizedSearchTerms:ly,normalizeString:ay,PrivateListView:sS,ResizableBoxPopover:Ohe,InspectorControlsLastItem:KP,useHasBlockToolbar:wT,cleanEmptyObject:Ae,usePrivateStyleOverride:dc,BlockQuickNavigation:WP,LayoutStyle:v9,BlockManager:tR,BlockRemovalWarningModal:Ahe,useLayoutClasses:jO,useLayoutStyles:zz,DimensionsTool:Vhe,ResolutionTool:zhe,TabbedSidebar:eE,TextAlignmentControl:nP,usesContextKey:mF,useFlashEditableBlocks:O1,HTMLElementControl:Hhe,useZoomOut:m_,globalStylesDataKey:Ei,globalStylesLinksDataKey:q0,selectBlockPatternsKey:au,requiresWrapperOnCopy:A5,PrivateRichText:IS,PrivateInserterLibrary:r6,reusableBlocksSelectKey:Z0,PrivateBlockPopover:Am,PrivatePublishDateTimePicker:d6,useSpacingSizes:z2,useBlockDisplayTitle:yr,__unstableBlockStyleVariationOverridesWithConfig:D3,setBackgroundStyleDefaults:MP,sectionRootClientIdKey:lu,CommentIconSlotFill:eT,CommentIconToolbarSlotFill:bT,mediaEditKey:X0,getMediaSelectKey:Q0,deviceTypeKey:Ti,isIsolatedEditorKey:cu,isNavigationOverlayContextKey:J0,isNavigationPostEditorKey:Yj,mediaUploadOnSuccessKey:ex,useBlockElement:tt,useBlockElementRef:dm,LinkPicker:uj,useRemoteUrlData:u2,PrivateBlockContext:pr,useListViewPanelState:qO,isHashLink:Nf,isRelativePath:Mf});return Qhe(_De);})(); |
| 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 |
|