PluginProbe
Gutenberg / trunk
Gutenberg vtrunk
24.1.0 24.0.0 23.9.1 23.9.0 23.8.0 23.7.2 23.7.1 23.7.0 23.6.1 23.6.2 23.6.0 23.5.3 23.5.2 23.5.1 23.5.0 23.4.0 23.3.2 23.3.1 23.3.0 23.2.0 23.2.1 23.2.2 23.1.1 23.1.0 23.0.1 All 404 releases
← All changes | build/modules/lazy-editor/index.min.js +5 -5 23.3.1 → trunk View file →
@@ -1,5 +1,5 @@
1 -var Ge=Object.create;var At=Object.defineProperty;var Be=Object.getOwnPropertyDescriptor;var We=Object.getOwnPropertyNames;var Ue=Object.getPrototypeOf,De=Object.prototype.hasOwnProperty;var P=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var Ke=(t,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of We(e))!De.call(t,n)&&n!==o&&At(t,n,{get:()=>e[n],enumerable:!(r=Be(e,n))||r.enumerable});return t};var h=(t,e,o)=>(o=t!=null?Ge(Ue(t)):{},Ke(e||!t||!t.__esModule?At(o,"default",{value:t,enumerable:!0}):o,t));var ft=P((Ho,Vt)=>{Vt.exports=window.wp.editor});var M=P((Jo,Rt)=>{Rt.exports=window.wp.coreData});var z=P((Xo,Ct)=>{Ct.exports=window.wp.data});var Lt=P((Yo,Tt)=>{Tt.exports=window.wp.components});var N=P((Zo,zt)=>{zt.exports=window.wp.element});var pt=P((or,Bt)=>{Bt.exports=window.wp.styleEngine});var Jt=P((cr,Ht)=>{Ht.exports=window.wp.i18n});var ht=P((ur,Xt)=>{Xt.exports=window.wp.blocks});var Ee=P((Lr,we)=>{we.exports=window.wp.privateApis});var kt=P((Hr,je)=>{je.exports=window.ReactJSXRuntime});var Te=P((Qr,Ce)=>{Ce.exports=window.wp.blockEditor});var Ae=h(ft(),1),Pt=h(M(),1),It=h(z(),1),Ve=h(Lt(),1),Re=h(N(),1);var Mt=h(M(),1),Nt=h(z(),1);function ot({templateId:t}={}){let{globalStylesId:e,stylesId:o}=(0,Nt.useSelect)(r=>{let n=r(Mt.store),s=t?n.getEntityRecord("postType","wp_template",t):null;return{globalStylesId:n.__experimentalGetCurrentGlobalStylesId(),stylesId:s?.styles_id}},[t]);return o||e}function rt(t,e,o){e=Array.isArray(e)?[...e]:[e],t=Array.isArray(t)?[...t]:{...t};let r=e.pop(),n=t;for(let s of e){let i=n[s];n=n[s]=Array.isArray(i)?[...i]:{...i}}return n[r]=o,t}var b=(t,e,o)=>{let r=Array.isArray(e)?e:e.split("."),n=t;return r.forEach(s=>{n=n?.[s]}),n??o};var He=["appearanceTools","useRootPaddingAwareAlignments","background.backgroundImage","background.backgroundRepeat","background.backgroundSize","background.backgroundPosition","background.gradient","border.color","border.radius","border.radiusSizes","border.style","border.width","shadow.presets","shadow.defaultPresets","color.background","color.button","color.caption","color.custom","color.customDuotone","color.customGradient","color.defaultDuotone","color.defaultGradients","color.defaultPalette","color.duotone","color.gradients","color.heading","color.link","color.palette","color.text","custom","dimensions.aspectRatio","dimensions.height","dimensions.minHeight","dimensions.minWidth","dimensions.width","dimensions.dimensionSizes","layout.contentSize","layout.definitions","layout.wideSize","lightbox.enabled","lightbox.allowEditing","position.fixed","position.sticky","spacing.customSpacingSize","spacing.defaultSpacingSizes","spacing.spacingSizes","spacing.spacingScale","spacing.blockGap","spacing.margin","spacing.padding","spacing.units","typography.fluid","typography.customFontSize","typography.defaultFontSizes","typography.dropCap","typography.fontFamilies","typography.fontSizes","typography.fontStyle","typography.fontWeight","typography.letterSpacing","typography.lineHeight","typography.textAlign","typography.textColumns","typography.textDecoration","typography.textIndent","typography.textTransform","typography.writingMode"];function Gt(t,e,o){let r=o?".blocks."+o:"",n=e?"."+e:"",s=`settings${r}${n}`,i=`settings${n}`;if(e)return b(t,s)??b(t,i);let a={};return He.forEach(l=>{let c=b(t,`settings${r}.${l}`)??b(t,`settings.${l}`);c!==void 0&&(a=rt(a,l.split("."),c))}),a}var Ut=h(pt(),1);var Je="1600px",Xe="320px",Ye=1,Ze=.25,qe=.75,Qe="14px";function Wt({minimumFontSize:t,maximumFontSize:e,fontSize:o,minimumViewportWidth:r=Xe,maximumViewportWidth:n=Je,scaleFactor:s=Ye,minimumFontSizeLimit:i}){if(i=V(i)?i:Qe,o){let v=V(o);if(!v?.unit||!v?.value)return null;let w=V(i,{coerceTo:v.unit});if(w?.value&&!t&&!e&&v?.value<=w?.value)return null;if(e||(e=`${v.value}${v.unit}`),!t){let x=v.unit==="px"?v.value:v.value*16,k=Math.min(Math.max(1-.075*Math.log2(x),Ze),qe),B=U(v.value*k,3);w?.value&&B<w?.value?t=`${w.value}${w.unit}`:t=`${B}${v.unit}`}}let a=V(t),l=a?.unit||"rem",c=V(e,{coerceTo:l});if(!a||!c)return null;let f=V(t,{coerceTo:"rem"}),u=V(n,{coerceTo:l}),p=V(r,{coerceTo:l});if(!u||!p||!f)return null;let g=u.value-p.value;if(!g)return null;let d=U(p.value/100,3),m=U(d,3)+l,y=100*((c.value-a.value)/g),S=U((y||1)*s,3),_=`${f.value}${f.unit} + ((1vw - ${m}) * ${S})`;return`clamp(${t}, ${_}, ${e})`}function V(t,e={}){if(typeof t!="string"&&typeof t!="number")return null;isFinite(t)&&(t=`${t}px`);let{coerceTo:o,rootSizeValue:r,acceptableUnits:n}={coerceTo:"",rootSizeValue:16,acceptableUnits:["rem","px","em"],...e},s=n?.join("|"),i=new RegExp(`^(\\d*\\.?\\d+)(${s}){1,1}$`),a=t.toString().match(i);if(!a||a.length<3)return null;let[,l,c]=a,f=parseFloat(l);return o==="px"&&(c==="em"||c==="rem")&&(f=f*r,c=o),c==="px"&&(o==="em"||o==="rem")&&(f=f/r,c=o),(o==="em"||o==="rem")&&(c==="em"||c==="rem")&&(c=o),c?{value:U(f,3),unit:c}:null}function U(t,e=3){let o=Math.pow(10,e);return Math.round(t*o)/o}function dt(t){let e=t?.fluid;return e===!0||e&&typeof e=="object"&&Object.keys(e).length>0}function to(t){let e=t?.typography??{},o=t?.layout,r=V(o?.wideSize)?o?.wideSize:null;return dt(e)&&r?{fluid:{maxViewportWidth:r,...typeof e.fluid=="object"?e.fluid:{}}}:{fluid:e?.fluid}}function nt(t,e){let{size:o}=t;if(!o||o==="0"||t?.fluid===!1||!dt(e?.typography)&&!dt(t))return o;let r=to(e)?.fluid??{},n=Wt({minimumFontSize:typeof t?.fluid=="boolean"?void 0:t?.fluid?.min,maximumFontSize:typeof t?.fluid=="boolean"?void 0:t?.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 R="body",K=":root";function D(t){if(!t.includes(","))return[t];let e=[],o="",r=0;for(let n of t){if(n==="(")r++;else if(n===")"&&r>0)r--;else if(n===","&&r===0){e.push(o),o="";continue}o+=n}return e.push(o),e}var H=[{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:t})=>`url( '#wp-duotone-${t}' )`,classes:[]},{path:["shadow","presets"],valueKey:"shadow",cssVarInfix:"shadow",classes:[]},{path:["typography","fontSizes"],valueFunc:(t,e)=>nt(t,e),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:t})=>t,classes:[]},{path:["border","radiusSizes"],valueKey:"size",cssVarInfix:"border-radius",classes:[]},{path:["dimensions","dimensionSizes"],valueKey:"size",cssVarInfix:"dimension",classes:[]}];function I(t,e){if(!t||!e)return e;let o=D(t),r=D(e),n=[];return o.forEach(s=>{r.forEach(i=>{n.push(`${s.trim()} ${i.trim()}`)})}),n.join(", ")}function Dt(t,e){if(!t||!e)return;let o={};return Object.entries(e).forEach(([r,n])=>{typeof n=="string"&&(o[r]=I(t,n)),typeof n=="object"&&(o[r]={},Object.entries(n).forEach(([s,i])=>{o[r][s]=I(t,i)}))}),o}function st(t,e){return t.includes(",")?D(t).map(n=>n+e).join(","):t+e}function gt(t,e){let o=`.is-style-${t}`;if(!e)return o;let r=/((?::\([^)]+\))?\s*)([^\s:]+)/,n=(i,a,l)=>a+l+o;return D(e).map(i=>i.replace(r,n)).join(",")}function Kt(t,e){let o=`.is-style-${t}`,r=D(e).map(n=>{let s=n.trim(),i=`${o} `;return s.startsWith(i)?s.slice(i.length):s});return gt(t,r.join(","))}function eo(t,e){if(!t||!e)return t;if(typeof t=="object"&&"ref"in t&&t?.ref){let o=(0,Ut.getCSSValueFromRawStyle)(b(e,t.ref));return typeof o=="object"&&o!==null&&"ref"in o&&o?.ref?void 0:o===void 0?t:o}return t}function oo(t,e){if(!t||!e||!Array.isArray(e))return t;let o=e.find(r=>r?.name===t);return o?.href?o?.href:t}function mt(t,e){if(!t||!e)return t;let o=eo(t,e);return typeof o=="object"&&o!==null&&"url"in o&&o?.url&&(o.url=oo(o.url,e?._links?.["wp:theme-file"])),o}var $=h(ht(),1),X=h(pt(),1),pe=h(z(),1);function G(t,e="root",o={}){if(!e)return null;let{fallback:r=!1}=o,{name:n,selectors:s,supports:i}=t,a=s&&Object.keys(s).length>0,l=Array.isArray(e)?e.join("."):e,c=null;if(a&&s.root?c=s?.root:i?.__experimentalSelector?c=i.__experimentalSelector:c=".wp-block-"+n.replace("core/","").replace("/","-"),l==="root")return c;let f=Array.isArray(e)?e:e.split(".");if(f.length===1){let p=r?c:null;if(a)return b(s,`${l}.root`,null)||b(s,l,null)||p;let g=i?b(i,`${l}.__experimentalSelector`,null):void 0;return g?I(c,g):p}let u;return a&&(u=b(s,l,null)),u||(r?G(t,f[0],o):null)}var ro={grad:.9,turn:360,rad:360/(2*Math.PI)},C=function(t){return typeof t=="string"?t.length>0:typeof t=="number"},E=function(t,e,o){return e===void 0&&(e=0),o===void 0&&(o=Math.pow(10,e)),Math.round(o*t)/o+0},O=function(t,e,o){return e===void 0&&(e=0),o===void 0&&(o=1),t>o?o:t>e?t:e},ne=function(t){return(t=isFinite(t)?t%360:0)>0?t:t+360},Yt=function(t){return{r:O(t.r,0,255),g:O(t.g,0,255),b:O(t.b,0,255),a:O(t.a)}},yt=function(t){return{r:E(t.r),g:E(t.g),b:E(t.b),a:E(t.a,3)}},no=/^#([0-9a-f]{3,8})$/i,it=function(t){var e=t.toString(16);return e.length<2?"0"+e:e},se=function(t){var e=t.r,o=t.g,r=t.b,n=t.a,s=Math.max(e,o,r),i=s-Math.min(e,o,r),a=i?s===e?(o-r)/i:s===o?2+(r-e)/i:4+(e-o)/i:0;return{h:60*(a<0?a+6:a),s:s?i/s*100:0,v:s/255*100,a:n}},ie=function(t){var e=t.h,o=t.s,r=t.v,n=t.a;e=e/360*6,o/=100,r/=100;var s=Math.floor(e),i=r*(1-o),a=r*(1-(e-s)*o),l=r*(1-(1-e+s)*o),c=s%6;return{r:255*[r,a,i,i,l,r][c],g:255*[l,r,r,a,i,i][c],b:255*[i,i,l,r,r,a][c],a:n}},Zt=function(t){return{h:ne(t.h),s:O(t.s,0,100),l:O(t.l,0,100),a:O(t.a)}},qt=function(t){return{h:E(t.h),s:E(t.s),l:E(t.l),a:E(t.a,3)}},Qt=function(t){return ie((o=(e=t).s,{h:e.h,s:(o*=((r=e.l)<50?r:100-r)/100)>0?2*o/(r+o)*100:0,v:r+o,a:e.a}));var e,o,r},J=function(t){return{h:(e=se(t)).h,s:(n=(200-(o=e.s))*(r=e.v)/100)>0&&n<200?o*r/100/(n<=100?n:200-n)*100:0,l:n/2,a:e.a};var e,o,r,n},so=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,io=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,ao=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,lo=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,te={string:[[function(t){var e=no.exec(t);return e?(t=e[1]).length<=4?{r:parseInt(t[0]+t[0],16),g:parseInt(t[1]+t[1],16),b:parseInt(t[2]+t[2],16),a:t.length===4?E(parseInt(t[3]+t[3],16)/255,2):1}:t.length===6||t.length===8?{r:parseInt(t.substr(0,2),16),g:parseInt(t.substr(2,2),16),b:parseInt(t.substr(4,2),16),a:t.length===8?E(parseInt(t.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(t){var e=ao.exec(t)||lo.exec(t);return e?e[2]!==e[4]||e[4]!==e[6]?null:Yt({r:Number(e[1])/(e[2]?100/255:1),g:Number(e[3])/(e[4]?100/255:1),b:Number(e[5])/(e[6]?100/255:1),a:e[7]===void 0?1:Number(e[7])/(e[8]?100:1)}):null},"rgb"],[function(t){var e=so.exec(t)||io.exec(t);if(!e)return null;var o,r,n=Zt({h:(o=e[1],r=e[2],r===void 0&&(r="deg"),Number(o)*(ro[r]||1)),s:Number(e[3]),l:Number(e[4]),a:e[5]===void 0?1:Number(e[5])/(e[6]?100:1)});return Qt(n)},"hsl"]],object:[[function(t){var e=t.r,o=t.g,r=t.b,n=t.a,s=n===void 0?1:n;return C(e)&&C(o)&&C(r)?Yt({r:Number(e),g:Number(o),b:Number(r),a:Number(s)}):null},"rgb"],[function(t){var e=t.h,o=t.s,r=t.l,n=t.a,s=n===void 0?1:n;if(!C(e)||!C(o)||!C(r))return null;var i=Zt({h:Number(e),s:Number(o),l:Number(r),a:Number(s)});return Qt(i)},"hsl"],[function(t){var e=t.h,o=t.s,r=t.v,n=t.a,s=n===void 0?1:n;if(!C(e)||!C(o)||!C(r))return null;var i=(function(a){return{h:ne(a.h),s:O(a.s,0,100),v:O(a.v,0,100),a:O(a.a)}})({h:Number(e),s:Number(o),v:Number(r),a:Number(s)});return ie(i)},"hsv"]]},ee=function(t,e){for(var o=0;o<e.length;o++){var r=e[o][0](t);if(r)return[r,e[o][1]]}return[null,void 0]},co=function(t){return typeof t=="string"?ee(t.trim(),te.string):typeof t=="object"&&t!==null?ee(t,te.object):[null,void 0]};var St=function(t,e){var o=J(t);return{h:o.h,s:O(o.s+100*e,0,100),l:o.l,a:o.a}},bt=function(t){return(299*t.r+587*t.g+114*t.b)/1e3/255},oe=function(t,e){var o=J(t);return{h:o.h,s:o.s,l:O(o.l+100*e,0,100),a:o.a}},re=(function(){function t(e){this.parsed=co(e)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return t.prototype.isValid=function(){return this.parsed!==null},t.prototype.brightness=function(){return E(bt(this.rgba),2)},t.prototype.isDark=function(){return bt(this.rgba)<.5},t.prototype.isLight=function(){return bt(this.rgba)>=.5},t.prototype.toHex=function(){return e=yt(this.rgba),o=e.r,r=e.g,n=e.b,i=(s=e.a)<1?it(E(255*s)):"","#"+it(o)+it(r)+it(n)+i;var e,o,r,n,s,i},t.prototype.toRgb=function(){return yt(this.rgba)},t.prototype.toRgbString=function(){return e=yt(this.rgba),o=e.r,r=e.g,n=e.b,(s=e.a)<1?"rgba("+o+", "+r+", "+n+", "+s+")":"rgb("+o+", "+r+", "+n+")";var e,o,r,n,s},t.prototype.toHsl=function(){return qt(J(this.rgba))},t.prototype.toHslString=function(){return e=qt(J(this.rgba)),o=e.h,r=e.s,n=e.l,(s=e.a)<1?"hsla("+o+", "+r+"%, "+n+"%, "+s+")":"hsl("+o+", "+r+"%, "+n+"%)";var e,o,r,n,s},t.prototype.toHsv=function(){return e=se(this.rgba),{h:E(e.h),s:E(e.s),v:E(e.v),a:E(e.a,3)};var e},t.prototype.invert=function(){return F({r:255-(e=this.rgba).r,g:255-e.g,b:255-e.b,a:e.a});var e},t.prototype.saturate=function(e){return e===void 0&&(e=.1),F(St(this.rgba,e))},t.prototype.desaturate=function(e){return e===void 0&&(e=.1),F(St(this.rgba,-e))},t.prototype.grayscale=function(){return F(St(this.rgba,-1))},t.prototype.lighten=function(e){return e===void 0&&(e=.1),F(oe(this.rgba,e))},t.prototype.darken=function(e){return e===void 0&&(e=.1),F(oe(this.rgba,-e))},t.prototype.rotate=function(e){return e===void 0&&(e=15),this.hue(this.hue()+e)},t.prototype.alpha=function(e){return typeof e=="number"?F({r:(o=this.rgba).r,g:o.g,b:o.b,a:e}):E(this.rgba.a,3);var o},t.prototype.hue=function(e){var o=J(this.rgba);return typeof e=="number"?F({h:e,s:o.s,l:o.l,a:o.a}):E(o.h)},t.prototype.isEqual=function(e){return this.toHex()===F(e).toHex()},t})(),F=function(t){return t instanceof re?t:new re(t)};function uo(t=[]){let e={r:[],g:[],b:[],a:[]};return t.forEach(o=>{let r=F(o).toRgb();e.r.push(r.r/255),e.g.push(r.g/255),e.b.push(r.b/255),e.a.push(r.a)}),e}function ae(t,e){let o=uo(e);return`
1 +var eo=Object.create;var Nt=Object.defineProperty;var oo=Object.getOwnPropertyDescriptor;var ro=Object.getOwnPropertyNames;var no=Object.getPrototypeOf,so=Object.prototype.hasOwnProperty;var P=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var io=(t,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of ro(e))!so.call(t,n)&&n!==o&&Nt(t,n,{get:()=>e[n],enumerable:!(r=oo(e,n))||r.enumerable});return t};var S=(t,e,o)=>(o=t!=null?eo(no(t)):{},io(e||!t||!t.__esModule?Nt(o,"default",{value:t,enumerable:!0}):o,t));var bt=P((hr,Bt)=>{Bt.exports=window.wp.editor});var B=P((yr,Ut)=>{Ut.exports=window.wp.coreData});var G=P((Sr,Wt)=>{Wt.exports=window.wp.data});var Kt=P((br,Dt)=>{Dt.exports=window.wp.components});var U=P((vr,Ht)=>{Ht.exports=window.wp.element});var vt=P((_r,Qt)=>{Qt.exports=window.wp.styleEngine});var ie=P((Fr,se)=>{se.exports=window.wp.i18n});var ct=P((Ir,ae)=>{ae.exports=window.wp.blocks});var je=P((ln,Ae)=>{Ae.exports=window.wp.privateApis});var Ct=P((wn,De)=>{De.exports=window.ReactJSXRuntime});var Xe=P((On,Je)=>{Je.exports=window.wp.blockEditor});var Ke=S(bt(),1),Lt=S(B(),1),zt=S(G(),1),He=S(Kt(),1),Ye=S(U(),1);var Yt=S(B(),1),Jt=S(G(),1);function st({templateId:t}={}){let{globalStylesId:e,stylesId:o}=(0,Jt.useSelect)(r=>{let n=r(Yt.store),s=t?n.getEntityRecord("postType","wp_template",t):null;return{globalStylesId:n.__experimentalGetCurrentGlobalStylesId(),stylesId:s?.styles_id}},[t]);return o||e}function it(t,e,o){e=Array.isArray(e)?[...e]:[e],t=Array.isArray(t)?[...t]:{...t};let r=e.pop(),n=t;for(let s of e){let i=n[s];n=n[s]=Array.isArray(i)?[...i]:{...i}}return n[r]=o,t}var v=(t,e,o)=>{let r=Array.isArray(e)?e:e.split("."),n=t;return r.forEach(s=>{n=n?.[s]}),n??o};var ao=["appearanceTools","useRootPaddingAwareAlignments","background.backgroundImage","background.backgroundRepeat","background.backgroundSize","background.backgroundPosition","background.gradient","border.color","border.radius","border.radiusSizes","border.style","border.width","shadow.presets","shadow.defaultPresets","color.background","color.button","color.caption","color.custom","color.customDuotone","color.customGradient","color.defaultDuotone","color.defaultGradients","color.defaultPalette","color.duotone","color.gradients","color.heading","color.link","color.palette","color.text","custom","dimensions.aspectRatio","dimensions.height","dimensions.minHeight","dimensions.minWidth","dimensions.width","dimensions.dimensionSizes","layout.contentSize","layout.definitions","layout.wideSize","lightbox.enabled","lightbox.allowEditing","position.fixed","position.sticky","spacing.customSpacingSize","spacing.defaultSpacingSizes","spacing.spacingSizes","spacing.spacingScale","spacing.blockGap","spacing.margin","spacing.padding","spacing.units","typography.fluid","typography.customFontSize","typography.defaultFontSizes","typography.dropCap","typography.fontFamilies","typography.fontSizes","typography.fontStyle","typography.fontWeight","typography.letterSpacing","typography.lineHeight","typography.textAlign","typography.textColumns","typography.textDecoration","typography.textIndent","typography.textShadow","typography.defaultTextShadowPresets","typography.textShadowPresets","typography.textTransform","typography.writingMode","viewport.mobile","viewport.tablet"];function Xt(t,e,o){let r=o?".blocks."+o:"",n=e?"."+e:"",s=`settings${r}${n}`,i=`settings${n}`;if(e)return v(t,s)??v(t,i);let a={};return ao.forEach(l=>{let c=v(t,`settings${r}.${l}`)??v(t,`settings.${l}`);c!==void 0&&(a=it(a,l.split("."),c))}),a}var qt=S(vt(),1);var lo="1600px",co="320px",uo=1,fo=.25,po=.75,go="14px";function Zt({minimumFontSize:t,maximumFontSize:e,fontSize:o,minimumViewportWidth:r=co,maximumViewportWidth:n=lo,scaleFactor:s=uo,minimumFontSizeLimit:i}){if(i=F(i)?i:go,o){let b=F(o);if(!b?.unit||!b?.value)return null;let E=F(i,{coerceTo:b.unit});if(E?.value&&!t&&!e&&b?.value<=E?.value)return null;if(e||(e=`${b.value}${b.unit}`),!t){let _=b.unit==="px"?b.value:b.value*16,O=Math.min(Math.max(1-.075*Math.log2(_),fo),po),L=H(b.value*O,3);E?.value&&L<E?.value?t=`${E.value}${E.unit}`:t=`${L}${b.unit}`}}let a=F(t),l=a?.unit||"rem",c=F(e,{coerceTo:l});if(!a||!c)return null;let d=F(t,{coerceTo:"rem"}),u=F(n,{coerceTo:l}),p=F(r,{coerceTo:l});if(!u||!p||!d)return null;let g=u.value-p.value;if(!g)return null;let h=H(p.value/100,3),f=H(h,3)+l,m=100*((c.value-a.value)/g),y=H((m||1)*s,3),w=`${d.value}${d.unit} + ((1vw - ${f}) * ${y})`;return`clamp(${t}, ${w}, ${e})`}function F(t,e={}){if(typeof t!="string"&&typeof t!="number")return null;isFinite(t)&&(t=`${t}px`);let{coerceTo:o,rootSizeValue:r,acceptableUnits:n}={coerceTo:"",rootSizeValue:16,acceptableUnits:["rem","px","em"],...e},s=n?.join("|"),i=new RegExp(`^(\\d*\\.?\\d+)(${s}){1,1}$`),a=t.toString().match(i);if(!a||a.length<3)return null;let[,l,c]=a,d=parseFloat(l);return o==="px"&&(c==="em"||c==="rem")&&(d=d*r,c=o),c==="px"&&(o==="em"||o==="rem")&&(d=d/r,c=o),(o==="em"||o==="rem")&&(c==="em"||c==="rem")&&(c=o),c?{value:H(d,3),unit:c}:null}function H(t,e=3){let o=Math.pow(10,e);return Math.round(t*o)/o}function wt(t){let e=t?.fluid;return e===!0||e&&typeof e=="object"&&Object.keys(e).length>0}function mo(t){let e=t?.typography??{},o=t?.layout,r=F(o?.wideSize)?o?.wideSize:null;return wt(e)&&r?{fluid:{maxViewportWidth:r,...typeof e.fluid=="object"?e.fluid:{}}}:{fluid:e?.fluid}}function at(t,e){let{size:o}=t;if(!o||o==="0"||t?.fluid===!1||!wt(e?.typography)&&!wt(t))return o;let r=mo(e)?.fluid??{},n=Zt({minimumFontSize:typeof t?.fluid=="boolean"?void 0:t?.fluid?.min,maximumFontSize:typeof t?.fluid=="boolean"?void 0:t?.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 I="body",J=":root";function Y(t){if(!t.includes(","))return[t];let e=[],o="",r=0;for(let n of t){if(n==="(")r++;else if(n===")"&&r>0)r--;else if(n===","&&r===0){e.push(o),o="";continue}o+=n}return e.push(o),e}var X=[{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:t})=>`url( '#wp-duotone-${t}' )`,classes:[]},{path:["shadow","presets"],valueKey:"shadow",cssVarInfix:"shadow",classes:[]},{path:["typography","fontSizes"],valueFunc:(t,e)=>at(t,e),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:["typography","textShadowPresets"],valueKey:"textShadow",cssVarInfix:"text-shadow",classes:[{classSuffix:"text-shadow",propertyName:"text-shadow"}]},{path:["spacing","spacingSizes"],valueKey:"size",cssVarInfix:"spacing",valueFunc:({size:t})=>t,classes:[]},{path:["border","radiusSizes"],valueKey:"size",cssVarInfix:"border-radius",classes:[]},{path:["dimensions","dimensionSizes"],valueKey:"size",cssVarInfix:"dimension",classes:[]}];function V(t,e){if(!t||!e)return e;let o=Y(t),r=Y(e),n=[];return o.forEach(s=>{r.forEach(i=>{n.push(`${s.trim()} ${i.trim()}`)})}),n.join(", ")}function te(t,e){if(!t||!e)return;let o={};return Object.entries(e).forEach(([r,n])=>{typeof n=="string"&&(o[r]=V(t,n)),typeof n=="object"&&(o[r]={},Object.entries(n).forEach(([s,i])=>{o[r][s]=V(t,i)}))}),o}function lt(t,e){return t.includes(",")?Y(t).map(n=>n+e).join(","):t+e}function Et(t,e){let o=`.is-style-${t}`;if(!e)return o;let r=/[^\s:]+/,n=i=>i+o;return Y(e).map(i=>i.replace(r,n)).join(",")}function ee(t,e){let o=`.is-style-${t}`,r=Y(e).map(n=>{let s=n.trim(),i=`${o} `;return s.startsWith(i)?s.slice(i.length):s});return Et(t,r.join(","))}function ho(t,e){if(!t||!e)return t;if(typeof t=="object"&&"ref"in t&&t?.ref){let o=(0,qt.getCSSValueFromRawStyle)(v(e,t.ref));return typeof o=="object"&&o!==null&&"ref"in o&&o?.ref?void 0:o===void 0?t:o}return t}function yo(t,e){if(!t||!e||!Array.isArray(e))return t;let o=e.find(r=>r?.name===t);return o?.href?o?.href:t}function xt(t,e){if(!t||!e)return t;let o=ho(t,e);return typeof o=="object"&&o!==null&&"url"in o&&o?.url?{...o,url:yo(o.url,e?._links?.["wp:theme-file"])}:o}var So={"@mobile":"mobile","@tablet":"tablet","-current":"@current"};function oe(t){return!!t&&typeof t=="object"&&!Array.isArray(t)}function re(t){if(!oe(t))return t;let e=t;return Object.entries(So).forEach(([o,r])=>{Object.hasOwn(t,r)&&(e===t&&(e={...t}),Object.hasOwn(t,o)||(e[o]=t[r]),delete e[r])}),Object.entries(e).forEach(([o,r])=>{if(!oe(r))return;let n=re(r);n!==r&&(e===t&&(e={...t}),e[o]=n)}),e}function ne(t){if(!t?.styles)return t;let e=re(t.styles);return e===t.styles?t:{...t,styles:e}}var $=S(ct(),1),q=S(vt(),1),ke=S(G(),1);function W(t,e="root",o={}){if(!e)return null;let{fallback:r=!1}=o,{name:n,selectors:s,supports:i}=t,a=s&&Object.keys(s).length>0,l=Array.isArray(e)?e.join("."):e,c=null;if(a&&s.root?c=s?.root:i?.__experimentalSelector?c=i.__experimentalSelector:c=".wp-block-"+n.replace("core/","").replace("/","-"),l==="root")return c;let d=Array.isArray(e)?e:e.split(".");if(d.length===1){let p=r?c:null;if(a)return v(s,`${l}.root`,null)||v(s,l,null)||p;let g=i?v(i,`${l}.__experimentalSelector`,null):void 0;return g?V(c,g):p}let u;return a&&(u=v(s,l,null)),u||(r?W(t,d[0],o):null)}for(me={grad:.9,turn:360,rad:360/(2*Math.PI)},R=function(t){return typeof t=="string"?t.length>0:typeof t=="number"},x=function(t,e,o){return e===void 0&&(e=0),o===void 0&&(o=Math.pow(10,e)),Math.round(o*t)/o+0},k=function(t,e,o){return e===void 0&&(e=0),o===void 0&&(o=1),t>o?o:t>e?t:e},Pt=function(t){return(t=isFinite(t)?t%360:0)<0?t+360:t},pt=function(t,e){return e===void 0&&(e=0),x(t,e)%360},kt=function(t){return{r:k(t.r,0,255),g:k(t.g,0,255),b:k(t.b,0,255),a:k(t.a)}},ft=function(t){return{r:x(t.r),g:x(t.g),b:x(t.b),a:x(t.a,3)}},he=/^#([0-9a-f]{3,8})$/i,N=function(t,e){var o=t.charCodeAt(e);return(15&o)+9*(o>>6)},Z=function(t,e){return N(t,e)<<4|N(t,e+1)},Ot=[],Q=0;Q<256;Q++)Ot.push((Q<16?"0":"")+Q.toString(16));var me,R,x,k,Pt,pt,kt,ft,he,N,Z,Ot,Q,ut=function(t){return Ot[k(t,0,255)]},ye=function(t){var e=t.r,o=t.g,r=t.b,n=t.a,s=Math.max(e,o,r),i=s-Math.min(e,o,r),a=i?s===e?(o-r)/i:s===o?2+(r-e)/i:4+(e-o)/i:0;return{h:60*(a<0?a+6:a),s:s?i/s*100:0,v:s/255*100,a:n}},Se=function(t){var e=t.h,o=t.s,r=t.v,n=t.a;e=e/360*6,o/=100,r/=100;var s=Math.floor(e),i=r*(1-o),a=r*(1-(e-s)*o),l=r*(1-(1-e+s)*o),c=s%6;return{r:255*[r,a,i,i,l,r][c],g:255*[l,r,r,a,i,i][c],b:255*[i,i,l,r,r,a][c],a:n}},le=function(t){return{h:Pt(t.h),s:k(t.s,0,100),l:k(t.l,0,100),a:k(t.a)}},ce=function(t){return{h:pt(t.h),s:x(t.s),l:x(t.l),a:x(t.a,3)}},ue=function(t){return Se((o=(e=t).s,{h:e.h,s:(o*=((r=e.l)<50?r:100-r)/100)>0?2*o/(r+o)*100:0,v:r+o,a:e.a}));var e,o,r},D=function(t){return{h:(e=ye(t)).h,s:(n=(200-(o=e.s))*(r=e.v)/100)>0&&n<200?o*r/100/(n<=100?n:200-n)*100:0,l:n/2,a:e.a};var e,o,r,n},bo=/^hsla?\(\s*([+-]?(?:\d*\.\d+|\d+))(deg|rad|grad|turn)?\s*,\s*([+-]?(?:\d*\.\d+|\d+))%\s*,\s*([+-]?(?:\d*\.\d+|\d+))%\s*(?:,\s*([+-]?(?:\d*\.\d+|\d+))(%)?\s*)?\)$/i,vo=/^hsla?\(\s*([+-]?(?:\d*\.\d+|\d+))(deg|rad|grad|turn)?\s+([+-]?(?:\d*\.\d+|\d+))%\s+([+-]?(?:\d*\.\d+|\d+))%\s*(?:\/\s*([+-]?(?:\d*\.\d+|\d+))(%)?\s*)?\)$/i,wo=/^rgba?\(\s*([+-]?(?:\d*\.\d+|\d+))(%)?\s*,\s*([+-]?(?:\d*\.\d+|\d+))(%)?\s*,\s*([+-]?(?:\d*\.\d+|\d+))(%)?\s*(?:,\s*([+-]?(?:\d*\.\d+|\d+))(%)?\s*)?\)$/i,Eo=/^rgba?\(\s*([+-]?(?:\d*\.\d+|\d+))(%)?\s+([+-]?(?:\d*\.\d+|\d+))(%)?\s+([+-]?(?:\d*\.\d+|\d+))(%)?\s*(?:\/\s*([+-]?(?:\d*\.\d+|\d+))(%)?\s*)?\)$/i,fe={string:[[function(t){if(!he.test(t))return null;var e=t.length;return e<=5?{r:17*N(t,1),g:17*N(t,2),b:17*N(t,3),a:e===5?x(17*N(t,4)/255,2):1}:e===7||e===9?{r:Z(t,1),g:Z(t,3),b:Z(t,5),a:e===9?x(Z(t,7)/255,2):1}:null},"hex"],[function(t){var e=wo.exec(t)||Eo.exec(t);return e?e[2]!==e[4]||e[4]!==e[6]?null:kt({r:Number(e[1])/(e[2]?100/255:1),g:Number(e[3])/(e[4]?100/255:1),b:Number(e[5])/(e[6]?100/255:1),a:e[7]===void 0?1:Number(e[7])/(e[8]?100:1)}):null},"rgb"],[function(t){var e=bo.exec(t)||vo.exec(t);if(!e)return null;var o,r,n=le({h:(o=e[1],r=e[2],r===void 0&&(r="deg"),Number(o)*(me[r]||1)),s:Number(e[3]),l:Number(e[4]),a:e[5]===void 0?1:Number(e[5])/(e[6]?100:1)});return ue(n)},"hsl"]],object:[[function(t){var e=t.r,o=t.g,r=t.b,n=t.a,s=n===void 0?1:n;return R(e)&&R(o)&&R(r)?kt({r:Number(e),g:Number(o),b:Number(r),a:Number(s)}):null},"rgb"],[function(t){var e=t.h,o=t.s,r=t.l,n=t.a,s=n===void 0?1:n;if(!R(e)||!R(o)||!R(r))return null;var i=le({h:Number(e),s:Number(o),l:Number(r),a:Number(s)});return ue(i)},"hsl"],[function(t){var e=t.h,o=t.s,r=t.v,n=t.a,s=n===void 0?1:n;if(!R(e)||!R(o)||!R(r))return null;var i=(function(a){return{h:Pt(a.h),s:k(a.s,0,100),v:k(a.v,0,100),a:k(a.a)}})({h:Number(e),s:Number(o),v:Number(r),a:Number(s)});return Se(i)},"hsv"]]},pe=function(t,e){for(var o=0;o<e.length;o++){var r=e[o][0](t);if(r)return[r,e[o][1]]}return[null,void 0]},xo=function(t){return typeof t=="string"?pe(t.trim(),fe.string):typeof t=="object"&&t!==null?pe(t,fe.object):[null,void 0]};var $t=function(t,e){var o=D(t);return{h:o.h,s:k(o.s+100*e,0,100),l:o.l,a:o.a}},_t=function(t){return(299*t.r+587*t.g+114*t.b)/1e3/255},de=function(t,e){var o=D(t);return{h:o.h,s:o.s,l:k(o.l+100*e,0,100),a:o.a}},ge=(function(){function t(e){this.parsed=xo(e)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return t.prototype.isValid=function(){return this.parsed!==null},t.prototype.brightness=function(){return x(_t(this.rgba),2)},t.prototype.isDark=function(){return _t(this.rgba)<.5},t.prototype.isLight=function(){return _t(this.rgba)>=.5},t.prototype.toHex=function(){return e=ft(this.rgba),o=e.r,r=e.g,n=e.b,i=(s=e.a)<1?ut(x(255*s)):"","#"+ut(o)+ut(r)+ut(n)+i;var e,o,r,n,s,i},t.prototype.toRgb=function(){return ft(this.rgba)},t.prototype.toRgbString=function(){return e=ft(this.rgba),o=e.r,r=e.g,n=e.b,(s=e.a)<1?"rgba("+o+", "+r+", "+n+", "+s+")":"rgb("+o+", "+r+", "+n+")";var e,o,r,n,s},t.prototype.toHsl=function(){return ce(D(this.rgba))},t.prototype.toHslString=function(){return e=ce(D(this.rgba)),o=e.h,r=e.s,n=e.l,(s=e.a)<1?"hsla("+o+", "+r+"%, "+n+"%, "+s+")":"hsl("+o+", "+r+"%, "+n+"%)";var e,o,r,n,s},t.prototype.toHsv=function(){return e=ye(this.rgba),{h:pt(e.h),s:x(e.s),v:x(e.v),a:x(e.a,3)};var e},t.prototype.invert=function(){return A({r:255-(e=this.rgba).r,g:255-e.g,b:255-e.b,a:e.a});var e},t.prototype.saturate=function(e){return e===void 0&&(e=.1),A($t(this.rgba,e))},t.prototype.desaturate=function(e){return e===void 0&&(e=.1),A($t(this.rgba,-e))},t.prototype.grayscale=function(){return A($t(this.rgba,-1))},t.prototype.lighten=function(e){return e===void 0&&(e=.1),A(de(this.rgba,e))},t.prototype.darken=function(e){return e===void 0&&(e=.1),A(de(this.rgba,-e))},t.prototype.rotate=function(e){return e===void 0&&(e=15),this.hue(D(this.rgba).h+e)},t.prototype.alpha=function(e){return typeof e=="number"?A({r:(o=this.rgba).r,g:o.g,b:o.b,a:e}):x(this.rgba.a,3);var o},t.prototype.hue=function(e){var o=D(this.rgba);return typeof e=="number"?A({h:e,s:o.s,l:o.l,a:o.a}):pt(o.h)},t.prototype.isEqual=function(e){return this.toHex()===A(e).toHex()},t})(),A=function(t){return t instanceof ge?t:new ge(t)};function $o(t=[]){let e={r:[],g:[],b:[],a:[]};return t.forEach(o=>{let r=A(o).toRgb();e.r.push(r.r/255),e.g.push(r.g/255),e.b.push(r.b/255),e.a.push(r.a)}),e}function be(t,e){let o=$o(e);return`
2 2 <svg
3 3 xmlns:xlink="http://www.w3.org/1999/xlink"
4 4 viewBox="0 0 0 0"
5 5 width="0"
@@ -26,13 +26,13 @@
26 26 <!-- Re-mask the image with the original transparency since the feColorMatrix above loses that information. -->
27 27 <feComposite in2="SourceGraphic" operator="in"></feComposite>
28 28 </filter>
29 29 </defs>
30 -</svg>`}function T(t){return t.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 vt(t){if(!t)return;let e=t.match(/var:preset\|spacing\|(.+)/);return e?`var(--wp--preset--spacing--${e[1]})`:t}function fo(t){if(!t)return null;let e=typeof t=="string";return{top:e?t:t?.top,left:e?t:t?.left}}function wt(t,e="0"){let o=fo(t);if(!o)return null;let r=vt(o?.top)||e,n=vt(o?.left)||e;return r===n?r:`${r} ${n}`}var le={backgroundSize:"cover",backgroundPosition:"50% 50%"};function ce(t){if(!t||!t?.backgroundImage?.url)return;let e;return t?.backgroundSize||(e={backgroundSize:le.backgroundSize}),t?.backgroundSize==="contain"&&!t?.backgroundPosition&&(e={backgroundPosition:le.backgroundPosition}),e}var ue={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 po={button:"wp-element-button",caption:"wp-element-caption"},go={__experimentalBorder:"border",color:"color",dimensions:"dimensions",spacing:"spacing",typography:"typography"},de={"core/button":[":hover",":focus",":focus-visible",":active"],"core/navigation-link":[":hover",":focus",":focus-visible",":active"]},mo={link:[":link",":any-link",":visited",":hover",":focus",":focus-visible",":active"],button:[":link",":any-link",":visited",":hover",":focus",":focus-visible",":active"]},ge={mobile:"@media (width <= 480px)",tablet:"@media (480px < width <= 782px)"};function ho(t="*",e={}){return H.reduce((o,{path:r,cssVarInfix:n,classes:s})=>{if(!s)return o;let i=b(e,r,[]);return["default","theme","custom"].forEach(a=>{i[a]&&i[a].forEach(({slug:l})=>{s.forEach(({classSuffix:c,propertyName:f})=>{let u=`.has-${T(l)}-${c}`,p=t.split(",").map(d=>`${d}${u}`).join(","),g=`var(--wp--preset--${n}--${T(l)})`;o+=`${p}{${f}: ${g} !important;}`})})}),o},"")}function yo(t={}){return H.filter(e=>e.path.at(-1)==="duotone").flatMap(e=>{let o=b(t,e.path,{});return["default","theme"].filter(r=>o[r]).flatMap(r=>o[r].map(n=>ae(`wp-duotone-${n.slug}`,n.colors))).join("")})}function me(t={},e,o){let r=[];return Object.keys(t).forEach(n=>{let s=e+T(n.replace("/","-")),i=t[n];if(i instanceof Object){let a=s+o;r=[...r,...me(i,a,o)]}else r.push(`${s}: ${i}`)}),r}var So=(t,e,o)=>{if(o!=="core/paragraph"||(e?.blocks?.["core/paragraph"]?.typography?.textIndent??e?.typography?.textIndent??"subsequent")!=="all")return t;let s=".wp-block-paragraph + .wp-block-paragraph",i=".wp-block-paragraph";if(s in t){let a=t[s],l={...t};return delete l[s],l[i]=a,l}return t},bo=(t,e)=>{let o=".wp-block-button";if(!(o in t))return t;let r={...t};return r[o]=r[o].map(n=>{let s=n.match(/^width:\s*(.+)$/);if(!s)return n;let i=s[1],a=null;i.endsWith("%")&&(a=parseFloat(i));let l="var(--wp--preset--dimension--";if(a===null&&i.startsWith(l)&&i.endsWith(")")){let c=i.slice(l.length,-1),f={...e?.dimensions?.dimensionSizes??{},...e?.blocks?.["core/button"]?.dimensions?.dimensionSizes??{}};for(let u of Object.values(f))if(Array.isArray(u)){for(let p of u)if(p.slug===c&&typeof p.size=="string"&&p.size.endsWith("%")){a=parseFloat(p.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},vo=(t,e)=>{let o={};return Object.entries(t).forEach(([r,n])=>{if(r==="root"||!e?.[r])return;let s=typeof n=="string";if(!s&&typeof n=="object"&&n!==null&&Object.entries(n).forEach(([i,a])=>{if(i==="root"||!e?.[r][i])return;let l={[r]:{[i]:e[r][i]}},c=lt(l);o[a]=[...o[a]||[],...c],delete e[r][i]}),s||typeof n=="object"&&n!==null&&"root"in n){let i=s?n:n.root,a={[r]:e[r]},l=lt(a);o[i]=[...o[i]||[],...l],delete e[r]}}),o};function lt(t={},e="",o,r={},n=!1){let s=R===e,i=Object.entries($.__EXPERIMENTAL_STYLE_PROPERTY).reduce((l,[c,{value:f,properties:u,useEngine:p,rootOnly:g}])=>{if(g&&!s)return l;let d=f;if(d[0]==="elements"||p)return l;let m=b(t,d);if(c==="--wp--style--root--padding"&&(typeof m=="string"||!o))return l;if(u&&typeof m!="string")Object.entries(u).forEach(y=>{let[S,_]=y;if(!b(m,[_],!1))return;let v=S.startsWith("--")?S:T(S);l.push(`${v}: ${(0,X.getCSSValueFromRawStyle)(b(m,[_]))}`)});else if(b(t,d,!1)){let y=c.startsWith("--")?c:T(c);l.push(`${y}: ${(0,X.getCSSValueFromRawStyle)(b(t,d))}`)}return l},[]);return t.background&&(t.background?.backgroundImage&&(t.background.backgroundImage=mt(t.background.backgroundImage,r)),!s&&t.background?.backgroundImage?.id&&(t={...t,background:{...t.background,...ce(t.background)}})),(0,X.getCSSRules)(t).forEach(l=>{if(s&&(o||n)&&l.key.startsWith("padding"))return;let c=l.key.startsWith("--")?l.key:T(l.key),f=mt(l.value,r);c==="font-size"&&(f=nt({name:"",slug:"",size:f},r?.settings)),c==="aspect-ratio"&&i.push("min-height: unset"),i.push(`${c}: ${f}`)}),i}function wo({layoutDefinitions:t=ue,style:e,selector:o,hasBlockGapSupport:r,hasFallbackGapSupport:n,fallbackGapValue:s}){let i="",a=r?wt(e?.spacing?.blockGap):"";if(n&&(o===R?a=a||"0.5em":!r&&s&&(a=s)),a&&t&&(Object.values(t).forEach(({className:l,name:c,spacingStyles:f})=>{!r&&c!=="flex"&&c!=="grid"||f?.length&&f.forEach(u=>{let p=[];if(u.rules&&Object.entries(u.rules).forEach(([g,d])=>{p.push(`${g}: ${d||a}`)}),p.length){let g="";r?g=o===R?`:root :where(.${l})${u?.selector||""}`:`:root :where(${o}-${l})${u?.selector||""}`:g=o===R?`:where(.${l}${u?.selector||""})`:`:where(${o}.${l}${u?.selector||""})`,i+=`${g} { ${p.join("; ")}; }`}})}),o===R&&r&&(i+=`${K} { --wp--style--block-gap: ${a}; }`)),o===R&&t){let l=["block","flex","grid"];Object.values(t).forEach(({className:c,displayMode:f,baseStyles:u})=>{f&&l.includes(f)&&(i+=`${o} .${c} { display:${f}; }`),u?.length&&u.forEach(p=>{let g=[];if(p.rules&&Object.entries(p.rules).forEach(([d,m])=>{g.push(`${d}: ${m}`)}),g.length){let d=`.${c}${p?.selector||""}`;i+=`${d} { ${g.join("; ")}; }`}})})}return i}var Eo=["border","color","dimensions","spacing","typography","filter","outline","shadow","background"];function xo(t){return at(t)}function at(t,e){if(!t)return{};let o=Object.entries(t),r=e?de[e]??[]:[],s=o.filter(([i])=>Eo.includes(i)||r.includes(i)||ge[i]).map(([i,a])=>[i,JSON.parse(JSON.stringify(a))]);return Object.fromEntries(s)}function fe(t){let{styles:e,selector:o,featureSelectors:r,name:n,elementName:s,mediaQuery:i,variationName:a}=t,l=n?de[n]??[]:mo[s??""]??[];return l.length?l.flatMap(c=>{let f=e?.[c];return!f||typeof f!="object"?[]:[{styles:JSON.parse(JSON.stringify(f)),selector:o,selectorSuffix:c,mediaQuery:i,featureSelectors:r&&typeof r!="string"?r:void 0,name:n,elementName:s,variationName:a}]}):[]}function $o(t){let{styles:e,selector:o,featureSelectors:r,name:n,elementName:s,isStyleVariation:i,variationName:a}=t;return!n&&!s?[]:Object.entries(ge).flatMap(([l,c])=>{let f=e?.[l];return!f||typeof f!="object"?[]:[{styles:JSON.parse(JSON.stringify(f)),selector:o,mediaQuery:c,featureSelectors:r&&typeof r!="string"?r:void 0,name:n,elementName:s,isStyleVariation:i,variationName:a}]})}var _o=(t,e)=>{let o=[];if(!t?.styles)return o;let r=xo(t.styles);return r&&o.push({styles:r,selector:R,skipSelectorWrapper:!0}),Object.entries($.__EXPERIMENTAL_ELEMENTS).forEach(([n,s])=>{t.styles?.elements?.[n]&&o.push({styles:t.styles?.elements?.[n]??{},selector:s,elementName:n,skipSelectorWrapper:!po[n]})}),Object.entries(t.styles?.blocks??{}).forEach(([n,s])=>{let i=at(s,n),a=s,l=[],c=[];a?.variations&&Object.entries(a.variations).forEach(([f,u])=>{let p=u,g=at(p,n);p?.css&&(g.css=p.css);let d=typeof e!="string"?e[n]?.styleVariationSelectors?.[f]:void 0;if(d&&typeof e!="string"){let m=e[n];c.push({styles:g,selector:d,featureSelectors:m?.featureSelectors,fallbackGapValue:m?.fallbackGapValue,hasLayoutSupport:m?.hasLayoutSupport,isStyleVariation:!0,variationName:f,layoutSelector:d+m.selector,layoutHasBlockGapSupport:!0,name:n})}Object.entries(p?.elements??{}).forEach(([m,y])=>{y&&$.__EXPERIMENTAL_ELEMENTS[m]&&l.push({styles:y,selector:I(d,$.__EXPERIMENTAL_ELEMENTS[m]),elementName:m,isStyleVariation:!0})}),Object.entries(p?.blocks??{}).forEach(([m,y])=>{let S=typeof e!="string"?I(d,e[m]?.selector):void 0,_=typeof e!="string"?I(d,e[m]?.duotoneSelector):void 0,v=typeof e!="string"?Dt(d,e[m]?.featureSelectors??{}):void 0,w=at(y,m);y?.css&&(w.css=y.css),!(!S||typeof e=="string")&&(l.push({selector:S,name:m,isStyleVariation:!0,duotoneSelector:_,featureSelectors:v,fallbackGapValue:e[m]?.fallbackGapValue,hasLayoutSupport:e[m]?.hasLayoutSupport,styles:w}),Object.entries(y.elements??{}).forEach(([x,k])=>{k&&$.__EXPERIMENTAL_ELEMENTS[x]&&l.push({styles:k,selector:I(S,$.__EXPERIMENTAL_ELEMENTS[x]),elementName:x,isStyleVariation:!0})}))})}),typeof e!="string"&&e?.[n]?.selector&&o.push({duotoneSelector:e[n].duotoneSelector,fallbackGapValue:e[n].fallbackGapValue,hasLayoutSupport:e[n].hasLayoutSupport,selector:e[n].selector,styles:i,featureSelectors:e[n].featureSelectors,name:n}),o.push(...c),Object.entries(a?.elements??{}).forEach(([f,u])=>{typeof e!="string"&&u&&e?.[n]&&$.__EXPERIMENTAL_ELEMENTS[f]&&o.push({styles:u,selector:e[n]?.selector.split(",").map(p=>$.__EXPERIMENTAL_ELEMENTS[f].split(",").map(d=>p+" "+d)).join(","),elementName:f})}),o.push(...l)}),o},Et=(t,e)=>{let o=[];if(!t?.settings)return o;let r=i=>{let a={};return H.forEach(({path:l})=>{let c=b(i,l,!1);c!==!1&&(a=rt(a,l,c))}),a},n=r(t.settings),s=t.settings?.custom;return(Object.keys(n).length>0||s)&&o.push({presets:n,custom:s,selector:K}),Object.entries(t.settings?.blocks??{}).forEach(([i,a])=>{let l=a.custom;if(typeof e=="string"||!e[i])return;let c=r(a);(Object.keys(c).length>0||l)&&o.push({presets:c,custom:l,selector:e[i]?.selector,featureSelectors:e[i]?.featureSelectors})}),o};function Oo(t,e,o){if(!t||typeof t=="string")return o;let r=t[e];return typeof r=="string"?r:typeof r=="object"&&r.root?r.root:o}function ko(t,e,{path:o,valueKey:r,valueFunc:n,cssVarInfix:s}){let i=b(t,o,[]),a=[];for(let l of["default","theme","custom"])if(i[l])for(let c of i[l]){let f=T(c.slug);r&&!n?a.push(`--wp--preset--${s}--${f}: ${c[r]}`):n&&typeof n=="function"&&a.push(`--wp--preset--${s}--${f}: ${n(c,e)}`)}return a}var Po=(t,e)=>{let o=Et(t,e),r="";for(let{presets:n,custom:s,selector:i,featureSelectors:a}of o){let l=i,c={[l]:[]};if(t?.settings)for(let u of H){let p=ko(n,t.settings,u);if(p.length===0)continue;let g=Oo(a,u.path[0],l);c[g]||(c[g]=[]),c[g].push(...p)}let f=me(s,"--wp--custom--","--");f.length>0&&c[l].push(...f);for(let[u,p]of Object.entries(c))p.length>0&&(r+=`${u}{${p.join(";")};}`)}return r};function Io(t,{tree:e,useRootPaddingAlign:o,disableLayoutStyles:r,hasBlockGapSupport:n,hasFallbackGapSupport:s,disableRootPadding:i}){let{selector:a,selectorSuffix:l,mediaQuery:c,duotoneSelector:f,styles:u,fallbackGapValue:p,hasLayoutSupport:g,featureSelectors:d,layoutSelector:m,layoutHasBlockGapSupport:y,skipSelectorWrapper:S,name:_,variationName:v}=t,w="",x=l?st(a,l):a;if(d&&typeof d!="string"){let A=vo(d,u);A=So(A,e.settings,_),A=bo(A,e.settings),Object.entries(A).forEach(([W,jt])=>{if(jt.length){let et=v?Kt(v,W):W;et=l?st(et,l):et;let Ne=jt.join(";");w+=`:root :where(${et}){${Ne};}`}})}if(f){let A={};u?.filter&&(A.filter=u.filter,delete u.filter);let W=lt(A);W.length&&(w+=`${f}{${W.join(";")};}`)}let k=m??x;!r&&(R===k||g)&&(w+=wo({style:u,selector:k,hasBlockGapSupport:y??n,hasFallbackGapSupport:s,fallbackGapValue:p}));let Ft=lt(u,x,o,e,i);if(Ft?.length){let A=S?x:`:root :where(${x})`;w+=`${A}{${Ft.join(";")};}`}return u?.css&&(w+=he(u.css,`:root :where(${x})`)),c&&w?`${c}{${w}}`:w}var Fo=(t,e,o,r,n=!1,s=!1,i={})=>{let a={blockGap:!0,blockStyles:!0,layoutStyles:!0,marginReset:!0,presets:!0,rootPadding:!0,variationStyles:!1,...i},l=_o(t,e),c=Et(t,e),f=t?.settings?.useRootPaddingAwareAlignments,{contentSize:u,wideSize:p}=t?.settings?.layout||{},g=a.marginReset||a.rootPadding||a.layoutStyles,d="";if(a.presets&&(u||p)&&(d+=`${K} {`,d=u?d+` --wp--style--global--content-size: ${u};`:d,d=p?d+` --wp--style--global--wide-size: ${p};`:d,d+="}"),g&&(d+=":where(body) {margin: 0;",a.rootPadding&&f&&(d+=`padding-right: 0; padding-left: 0; padding-top: var(--wp--style--root--padding-top); padding-bottom: var(--wp--style--root--padding-bottom) }
30 +</svg>`}function z(t){return t.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 Vt(t){if(!t)return;let e=t.match(/var:preset\|spacing\|(.+)/);return e?`var(--wp--preset--spacing--${e[1]})`:t}function _o(t){if(!t)return null;let e=typeof t=="string";return{top:e?t:t?.top,left:e?t:t?.left}}function dt(t,e="0"){let o=_o(t);if(!o)return null;let r=Vt(o?.top)||e,n=Vt(o?.left)||e;return r===n?r:`${r} ${n}`}var ve={backgroundSize:"cover",backgroundPosition:"50% 50%"};function ko(t){return typeof t=="object"&&t!==null&&"url"in t&&!!t.url}function we(t){if(!t||!ko(t.backgroundImage))return;let e;return t?.backgroundSize||(e={backgroundSize:ve.backgroundSize}),t?.backgroundSize==="contain"&&!t?.backgroundPosition&&(e={backgroundPosition:ve.backgroundPosition}),e}var Ee={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 xe={mobile:"480px",tablet:"782px"},$e=/^(\d+|\d*\.\d+)(px|em|rem)$/,Oo=16;function Po(t){return"mobile"in t||"tablet"in t}function Vo(t){return!t||typeof t!="object"?{}:Po(t)?t:t.settings?.viewport??{}}function Ao(t){return typeof t=="string"&&$e.test(t.trim())}function jo(t){if(typeof t=="number")return t;if(typeof t!="string")return;let e=t.trim().match($e);if(!e)return;let o=Number.parseFloat(e[1]);return e[2]==="px"?o:o*Oo}function To(t){let e=Vo(t),o={},r={};Object.keys(xe).forEach(a=>{let l=a,c=e[l],d=jo(c);d!==void 0&&Ao(c)&&(o[l]=c.trim(),r[l]=d)});let n=Object.keys(o);if(!n.length)return{...xe};if(n.length===1)return o;let s=o.mobile,i=o.tablet;return r.mobile>=r.tablet?{mobile:s}:{mobile:s,tablet:i}}function At(t){let e=To(t),o={};return e.mobile&&(o["@mobile"]=`@media (width <= ${e.mobile})`),e.tablet&&(o["@tablet"]=e.mobile?`@media (${e.mobile} < width <= ${e.tablet})`:`@media (width <= ${e.tablet})`),o}var Fo={button:"wp-element-button",caption:"wp-element-caption"},Io={__experimentalBorder:"border",color:"color",dimensions:"dimensions",spacing:"spacing",typography:"typography"},Oe={"core/button":[":hover",":focus",":focus-visible",":active"],"core/navigation-link":[":hover",":focus",":focus-visible",":active"]},Ro={link:[":link",":any-link",":visited",":hover",":focus",":focus-visible",":active"],button:[":link",":any-link",":visited",":hover",":focus",":focus-visible",":active"]};function Co(t="*",e={}){return X.reduce((o,{path:r,cssVarInfix:n,classes:s})=>{if(!s)return o;let i=v(e,r,[]);return["default","theme","custom"].forEach(a=>{i[a]&&i[a].forEach(({slug:l})=>{s.forEach(({classSuffix:c,propertyName:d})=>{let u=`.has-${z(l)}-${c}`,p=t?`:where(${t})${u}`:u,g=`var(--wp--preset--${n}--${z(l)})`;o+=`${p}{${d}: ${g} !important;}`})})}),o},"")}function Lo(t={}){return X.filter(e=>e.path.at(-1)==="duotone").flatMap(e=>{let o=v(t,e.path,{});return["default","theme","custom"].filter(r=>o[r]).flatMap(r=>o[r].map(n=>be(`wp-duotone-${n.slug}`,n.colors))).join("")})}function Pe(t={},e,o){let r=[];return Object.keys(t).forEach(n=>{let s=e+z(n.replace("/","-")),i=t[n];if(i instanceof Object){let a=s+o;r=[...r,...Pe(i,a,o)]}else r.push(`${s}: ${i}`)}),r}var zo=(t,e,o)=>{if(o!=="core/paragraph"||(e?.blocks?.["core/paragraph"]?.typography?.textIndent??e?.typography?.textIndent??"subsequent")!=="all")return t;let s=".wp-block-paragraph + .wp-block-paragraph",i=".wp-block-paragraph";if(s in t){let a=t[s],l={...t};return delete l[s],l[i]=a,l}return t},Mo=(t,e)=>{let o=".wp-block-button";if(!(o in t))return t;let r={...t};return r[o]=r[o].map(n=>{let s=n.match(/^width:\s*(.+)$/);if(!s)return n;let i=s[1],a=null;i.endsWith("%")&&(a=parseFloat(i));let l="var(--wp--preset--dimension--";if(a===null&&i.startsWith(l)&&i.endsWith(")")){let c=i.slice(l.length,-1),d={...e?.dimensions?.dimensionSizes??{},...e?.blocks?.["core/button"]?.dimensions?.dimensionSizes??{}};for(let u of Object.values(d))if(Array.isArray(u)){for(let p of u)if(p.slug===c&&typeof p.size=="string"&&p.size.endsWith("%")){a=parseFloat(p.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},Go=(t,e)=>{let o={};return Object.entries(t).forEach(([r,n])=>{if(r==="root"||!e?.[r])return;let s=typeof n=="string";if(!s&&typeof n=="object"&&n!==null&&Object.entries(n).forEach(([i,a])=>{if(i==="root"||!e?.[r][i])return;let l={[r]:{[i]:e[r][i]}},c=mt(l);o[a]=[...o[a]||[],...c],delete e[r][i]}),s||typeof n=="object"&&n!==null&&"root"in n){let i=s?n:n.root,a={[r]:e[r]},l=mt(a);o[i]=[...o[i]||[],...l],delete e[r]}}),o};function mt(t={},e="",o,r={},n=!1){let s=I===e,i=Object.entries($.__EXPERIMENTAL_STYLE_PROPERTY).reduce((l,[c,{value:d,properties:u,useEngine:p,rootOnly:g}])=>{if(g&&!s)return l;let h=d;if(h[0]==="elements"||p)return l;let f=v(t,h);if(c==="--wp--style--root--padding"&&(typeof f=="string"||!o))return l;if(u&&typeof f!="string")Object.entries(u).forEach(m=>{let[y,w]=m;if(!v(f,[w],!1))return;let b=y.startsWith("--")?y:z(y);l.push(`${b}: ${(0,q.getCSSValueFromRawStyle)(v(f,[w]))}`)});else if(v(t,h,!1)){let m=c.startsWith("--")?c:z(c);l.push(`${m}: ${(0,q.getCSSValueFromRawStyle)(v(t,h))}`)}return l},[]);return t.background&&(t.background?.backgroundImage&&(t.background.backgroundImage=xt(t.background.backgroundImage,r)),!s&&t.background?.backgroundImage?.id&&(t={...t,background:{...t.background,...we(t.background)}})),(0,q.getCSSRules)(t).forEach(l=>{if(s&&(o||n)&&l.key.startsWith("padding"))return;let c=l.key.startsWith("--")?l.key:z(l.key),d=xt(l.value,r);c==="font-size"&&(d=at({name:"",slug:"",size:d},r?.settings)),c==="aspect-ratio"&&i.push("min-height: unset"),i.push(`${c}: ${d}`)}),i}function No({layoutDefinitions:t=Ee,style:e,selector:o,hasBlockGapSupport:r,hasFallbackGapSupport:n,fallbackGapValue:s}){let i="",a=e?.spacing?.blockGap,l=r?dt(a):"";n&&(o===I?l=l||"0.5em":!r&&s&&(l=s));let c=r&&a&&typeof a!="string"?dt(a.top):l;if(l&&t&&(Object.values(t).forEach(({className:d,name:u,spacingStyles:p})=>{if(!r&&u!=="flex"&&u!=="grid")return;let g=["default","constrained"].includes(u)?c:l;p?.length&&p.forEach(h=>{let f=[];if(h.rules&&Object.entries(h.rules).forEach(([m,y])=>{f.push(`${m}: ${y||g}`)}),f.length){let m="";r?m=o===I?`:root :where(.${d})${h?.selector||""}`:`:root :where(${o}-${d})${h?.selector||""}`:m=o===I?`:where(.${d}${h?.selector||""})`:`:where(${o}.${d}${h?.selector||""})`,i+=`${m} { ${f.join("; ")}; }`}})}),o===I&&r&&(i+=`${J} { --wp--style--block-gap: ${l}; }`)),o===I&&t){let d=["block","flex","grid"];Object.values(t).forEach(({className:u,displayMode:p,baseStyles:g})=>{p&&d.includes(p)&&(i+=`${o} .${u} { display:${p}; }`),g?.length&&g.forEach(h=>{let f=[];if(h.rules&&Object.entries(h.rules).forEach(([m,y])=>{f.push(`${m}: ${y}`)}),f.length){let m=`.${u}${h?.selector||""}`;i+=`${m} { ${f.join("; ")}; }`}})})}return i}var Bo=["border","color","dimensions","spacing","typography","filter","outline","shadow","background"];function Uo(t,e){return gt(t,void 0,e)}function gt(t,e,o){if(!t)return{};let r=Object.entries(t),n=e?Oe[e]??[]:[],i=r.filter(([a])=>Bo.includes(a)||n.includes(a)||o[a]).map(([a,l])=>[a,JSON.parse(JSON.stringify(l))]);return Object.fromEntries(i)}function _e(t){let{styles:e,selector:o,featureSelectors:r,name:n,elementName:s,mediaQuery:i,variationName:a}=t,l=n?Oe[n]??[]:Ro[s??""]??[];return l.length?l.flatMap(c=>{let d=e?.[c];return!d||typeof d!="object"?[]:[{styles:JSON.parse(JSON.stringify(d)),selector:o,selectorSuffix:c,mediaQuery:i,featureSelectors:r&&typeof r!="string"?r:void 0,name:n,elementName:s,variationName:a}]}):[]}function Wo(t,e){let{styles:o,selector:r,fallbackGapValue:n,featureSelectors:s,hasLayoutSupport:i,layoutHasBlockGapSupport:a,layoutSelector:l,name:c,elementName:d,isStyleVariation:u,variationName:p}=t;return!c&&!d?[]:Object.entries(e).flatMap(([g,h])=>{let f=o?.[g];return!f||typeof f!="object"?[]:[{styles:JSON.parse(JSON.stringify(f)),selector:r,mediaQuery:h,featureSelectors:s&&typeof s!="string"?s:void 0,fallbackGapValue:n,hasLayoutSupport:i,name:c,elementName:d,isStyleVariation:u,variationName:p,layoutSelector:l,layoutHasBlockGapSupport:a}]})}function jt(t,e){let o={...t?.elements??{}};return Object.keys(e).forEach(r=>{Object.entries(t?.[r]?.elements??{}).forEach(([n,s])=>{o[n]={...o[n]??{},[r]:s}})}),o}var Do=(t,e)=>{let o=[];if(!t?.styles)return o;let r=At(t),n=Uo(t.styles,r);return n&&o.push({styles:n,selector:I,skipSelectorWrapper:!0}),Object.entries($.__EXPERIMENTAL_ELEMENTS).forEach(([s,i])=>{t.styles?.elements?.[s]&&o.push({styles:t.styles?.elements?.[s]??{},selector:i,elementName:s,skipSelectorWrapper:!Fo[s]})}),Object.entries(t.styles?.blocks??{}).forEach(([s,i])=>{let a=gt(i,s,r),l=i,c=[],d=[];l?.variations&&Object.entries(l.variations).forEach(([u,p])=>{let g=p,h=gt(g,s,r);g?.css&&(h.css=g.css);let f=typeof e!="string"?e[s]?.styleVariationSelectors?.[u]:void 0;if(f&&typeof e!="string"){let m=e[s];d.push({styles:h,selector:f,featureSelectors:m?.featureSelectors,fallbackGapValue:m?.fallbackGapValue,hasLayoutSupport:m?.hasLayoutSupport,isStyleVariation:!0,variationName:u,layoutSelector:f+m.selector,layoutHasBlockGapSupport:!0,name:s})}Object.entries(jt(g,r)).forEach(([m,y])=>{y&&$.__EXPERIMENTAL_ELEMENTS[m]&&c.push({styles:y,selector:V(f,$.__EXPERIMENTAL_ELEMENTS[m]),elementName:m,isStyleVariation:!0})}),Object.entries(g?.blocks??{}).forEach(([m,y])=>{let w=typeof e!="string"?V(f,e[m]?.selector):void 0,b=typeof e!="string"?V(f,e[m]?.duotoneSelector):void 0,E=typeof e!="string"?te(f,e[m]?.featureSelectors??{}):void 0,_=gt(y,m,r);y?.css&&(_.css=y.css),!(!w||typeof e=="string")&&(c.push({selector:w,name:m,isStyleVariation:!0,duotoneSelector:b,featureSelectors:E,fallbackGapValue:e[m]?.fallbackGapValue,hasLayoutSupport:e[m]?.hasLayoutSupport,styles:_}),Object.entries(jt(y,r)).forEach(([O,L])=>{L&&$.__EXPERIMENTAL_ELEMENTS[O]&&c.push({styles:L,selector:V(w,$.__EXPERIMENTAL_ELEMENTS[O]),elementName:O,isStyleVariation:!0})}))})}),typeof e!="string"&&e?.[s]?.selector&&o.push({duotoneSelector:e[s].duotoneSelector,fallbackGapValue:e[s].fallbackGapValue,hasLayoutSupport:e[s].hasLayoutSupport,selector:e[s].selector,styles:a,featureSelectors:e[s].featureSelectors,name:s}),o.push(...d),Object.entries(jt(l,r)).forEach(([u,p])=>{typeof e!="string"&&p&&e?.[s]&&$.__EXPERIMENTAL_ELEMENTS[u]&&o.push({styles:p,selector:e[s]?.selector.split(",").map(g=>$.__EXPERIMENTAL_ELEMENTS[u].split(",").map(f=>g+" "+f)).join(","),elementName:u})}),o.push(...c)}),o},Tt=(t,e)=>{let o=[];if(!t?.settings)return o;let r=i=>{let a={};return X.forEach(({path:l})=>{let c=v(i,l,!1);c!==!1&&(a=it(a,l,c))}),a},n=r(t.settings),s=t.settings?.custom;return(Object.keys(n).length>0||s)&&o.push({presets:n,custom:s,selector:J}),Object.entries(t.settings?.blocks??{}).forEach(([i,a])=>{let l=a.custom;if(typeof e=="string"||!e[i])return;let c=r(a);(Object.keys(c).length>0||l)&&o.push({presets:c,custom:l,selector:e[i]?.selector,featureSelectors:e[i]?.featureSelectors})}),o};function Ko(t,e,o){if(!t||typeof t=="string")return o;let r=t[e];return typeof r=="string"?r:typeof r=="object"&&r.root?r.root:o}function Ho(t,e,{path:o,valueKey:r,valueFunc:n,cssVarInfix:s}){let i=v(t,o,[]),a=[];for(let l of["default","theme","custom"])if(i[l])for(let c of i[l]){let d=z(c.slug);r&&!n?a.push(`--wp--preset--${s}--${d}: ${c[r]}`):n&&typeof n=="function"&&a.push(`--wp--preset--${s}--${d}: ${n(c,e)}`)}return a}var Yo=(t,e)=>{let o=Tt(t,e),r="";for(let{presets:n,custom:s,selector:i,featureSelectors:a}of o){let l=i,c={[l]:[]};if(t?.settings)for(let u of X){let p=Ho(n,t.settings,u);if(p.length===0)continue;let g=Ko(a,u.path[0],l);c[g]||(c[g]=[]),c[g].push(...p)}let d=Pe(s,"--wp--custom--","--");d.length>0&&c[l].push(...d);for(let[u,p]of Object.entries(c))p.length>0&&(r+=`${u}{${p.join(";")};}`)}return r};function Jo(t,{tree:e,useRootPaddingAlign:o,disableLayoutStyles:r,hasBlockGapSupport:n,hasFallbackGapSupport:s,disableRootPadding:i}){let{selector:a,selectorSuffix:l,mediaQuery:c,duotoneSelector:d,styles:u,fallbackGapValue:p,hasLayoutSupport:g,featureSelectors:h,layoutSelector:f,layoutHasBlockGapSupport:m,skipSelectorWrapper:y,name:w,variationName:b}=t,E="",_=l?lt(a,l):a;if(h&&typeof h!="string"){let T=Go(h,u);T=zo(T,e.settings,w),T=Mo(T,e.settings),Object.entries(T).forEach(([K,Gt])=>{if(Gt.length){let nt=b?ee(b,K):K;nt=l?lt(nt,l):nt;let to=Gt.join(";");E+=`:root :where(${nt}){${to};}`}})}if(d){let T={};u?.filter&&(T.filter=u.filter,delete u.filter);let K=mt(T);K.length&&(E+=`${d}{${K.join(";")};}`)}let O=f??_;!r&&(I===O||g)&&(E+=No({style:u,selector:O,hasBlockGapSupport:m??n,hasFallbackGapSupport:s,fallbackGapValue:p}));let Mt=mt(u,_,o,e,i);if(Mt?.length){let T=y?_:`:root :where(${_})`;E+=`${T}{${Mt.join(";")};}`}return u?.css&&(E+=Ve(u.css,`:root :where(${_})`)),c&&E?`${c}{${E}}`:E}var Xo=(t,e,o,r,n=!1,s=!1,i={})=>{let a={blockGap:!0,blockStyles:!0,layoutStyles:!0,marginReset:!0,presets:!0,rootPadding:!0,variationStyles:!1,...i},l=ne(t),c=Do(l,e),d=Tt(l,e),u=l?.settings?.useRootPaddingAwareAlignments,{contentSize:p,wideSize:g}=l?.settings?.layout||{},h=a.marginReset||a.rootPadding||a.layoutStyles,f="";if(a.presets&&(p||g)&&(f+=`${J} {`,f=p?f+` --wp--style--global--content-size: ${p};`:f,f=g?f+` --wp--style--global--wide-size: ${g};`:f,f+="}"),h&&(f+=":where(body) {margin: 0;",a.rootPadding&&u&&(f+=`padding-right: 0; padding-left: 0; padding-top: var(--wp--style--root--padding-top); padding-bottom: var(--wp--style--root--padding-bottom) }
31 31 .has-global-padding { padding-right: var(--wp--style--root--padding-right); padding-left: var(--wp--style--root--padding-left); }
32 32 .has-global-padding > .alignfull { margin-right: calc(var(--wp--style--root--padding-right) * -1); margin-left: calc(var(--wp--style--root--padding-left) * -1); }
33 33 .has-global-padding :where(:not(.alignfull.is-layout-flow) > .has-global-padding:not(.wp-block-block, .alignfull)) { padding-right: 0; padding-left: 0; }
34 34 .has-global-padding :where(:not(.alignfull.is-layout-flow) > .has-global-padding:not(.wp-block-block, .alignfull)) > .alignfull { margin-left: 0; margin-right: 0;
35 - `),d+="}"),a.blockStyles&&l.forEach(m=>{if(m.isStyleVariation&&!a.variationStyles)return;let y=$o(m);[m,...y,...fe(m),...y.flatMap(fe)].forEach(S=>{d+=Io(S,{tree:t,useRootPaddingAlign:f,disableLayoutStyles:n,hasBlockGapSupport:o,hasFallbackGapSupport:r,disableRootPadding:s})})}),a.layoutStyles&&(d=d+".wp-site-blocks > .alignleft { float: left; margin-right: 2em; }",d=d+".wp-site-blocks > .alignright { float: right; margin-left: 2em; }",d=d+".wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }"),a.blockGap&&o){let m=wt(t?.styles?.spacing?.blockGap)||"0.5em";d=d+`:root :where(.wp-site-blocks) > * { margin-block-start: ${m}; margin-block-end: 0; }`,d=d+":root :where(.wp-site-blocks) > :first-child { margin-block-start: 0; }",d=d+":root :where(.wp-site-blocks) > :last-child { margin-block-end: 0; }"}return a.presets&&c.forEach(({selector:m,presets:y})=>{(R===m||K===m)&&(m="");let S=ho(m,y);S.length>0&&(d+=S)}),d};function jo(t,e){return Et(t,e).flatMap(({presets:r})=>yo(r))}var Ao=(t,e)=>{if(t?.selectors&&Object.keys(t.selectors).length>0)return t.selectors;let o={root:e};return Object.entries(go).forEach(([r,n])=>{let s=G(t,r);s&&(o[n]=s)}),o},Vo=(t,e)=>{let{getBlockStyles:o}=(0,pe.select)($.store),r={};return t.forEach(n=>{let s=n.name,i=G(n);if(!i)return;let a=G(n,"filter.duotone");if(!a){let g=G(n),d=(0,$.getBlockSupport)(n,"color.__experimentalDuotone",!1);typeof d=="string"&&g&&(a=I(g,d))}let l=!!n?.supports?.layout||!!n?.supports?.__experimentalLayout,c=n?.supports?.spacing?.blockGap?.__experimentalDefault,f=o(s),u={};f?.forEach(g=>{let d=e?`-${e}`:"",m=`${g.name}${d}`,y=gt(m,i);u[m]=y});let p=Ao(n,i);r[s]={duotoneSelector:a??void 0,fallbackGapValue:c,featureSelectors:Object.keys(p).length?p:void 0,hasLayoutSupport:l,name:s,selector:i,styleVariationSelectors:f?.length?u:void 0}}),r};function Ro(t){let e=t.styles?.blocks,o=e?.["core/separator"];return o&&o.color?.background&&!o.color?.text&&!o.border?.color?{...t,styles:{...t.styles,blocks:{...e,"core/separator":{...o,color:{...o.color,text:o.color?.background}}}}}:t}function he(t,e){let o="";return!t||t.trim()===""||t.split("&").forEach(n=>{if(!n||n.trim()==="")return;if(!n.includes("{"))o+=`:root :where(${e}){${n.trim()}}`;else{let i=n.replace("}","").split("{");if(i.length!==2)return;let[a,l]=i,c=a.match(/([>+~\s]*::[a-zA-Z-]+)/),f=c?c[1]:"",u=c?a.replace(f,"").trim():a.trim(),p;u===""?p=e:p=a.startsWith(" ")?I(e,u):st(e,u),o+=`:root :where(${p})${f}{${l.trim()}}`}}),o}function xt(t={},e=[],o={}){let{hasBlockGapSupport:r,hasFallbackGapSupport:n,disableLayoutStyles:s=!1,disableRootPadding:i=!1,styleOptions:a={}}=o,l=e.length>0?e:(0,$.getBlockTypes)(),c=Gt(t,"spacing.blockGap"),f=r??c!==null,u=n??!f;if(!t?.styles||!t?.settings)return[[],{}];let p=Ro(t),g=Vo(l),d=Po(p,g),m=Fo(p,g,f,u,s,i,a),y=jo(p,g),S=[{css:d,isGlobalStyles:!0},{css:m,isGlobalStyles:!0},{css:p?.styles?.css??"",isGlobalStyles:!0},{assets:y,__unstableType:"svgs",isGlobalStyles:!0}];return l.forEach(_=>{let v=p?.styles?.blocks?.[_.name];if(v?.css){let{featureSelectors:w}=g[_.name],x=typeof w=="object"?w?.css:void 0,k;typeof x=="string"?k=x:typeof x=="object"&&(k=x?.root);let B=k??g[_.name].selector;S.push({css:he(v.css,B),isGlobalStyles:!0})}}),[S,p.settings]}var $e=h(M(),1),$t=h(N(),1),_e=h(z(),1);var ye=h(M(),1),Se=h(z(),1),be=h(N(),1);function ve(t){let{userGlobalStyles:e}=(0,Se.useSelect)(o=>{let{getEntityRecord:r,getEditedEntityRecord:n,canUser:s}=o(ye.store),i=s("update",{kind:"root",name:"globalStyles",id:t}),a;return typeof i=="boolean"&&(i?a=n("root","globalStyles",t):a=r("root","globalStyles",t,{context:"view"})),{userGlobalStyles:a}},[t]);return(0,be.useMemo)(()=>e?{user:e}:{user:void 0},[e])}var xe=h(Ee(),1),{unlock:j}=(0,xe.__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/lazy-editor");function Y({stylesId:t}){let{editorSettings:e}=(0,_e.useSelect)(i=>({editorSettings:j(i($e.store)).getEditorSettings()}),[]),{user:o}=ve(t),[r]=xt(o),n=!!e,s=(0,$t.useMemo)(()=>n?[...e?.styles??[],...r]:[],[n,e?.styles,r]);return{isReady:n,editorSettings:(0,$t.useMemo)(()=>({...e??{},styles:s}),[e,s])}}function Co(t){if(!t||Object.keys(t).length===0)return;let e=document.querySelector("script#wp-importmap[type=importmap]");if(e)try{let o=JSON.parse(e.text);o.imports||(o.imports={}),o.imports={...o.imports,...t},e.text=JSON.stringify(o,null,2)}catch(o){console.error("Failed to parse or update import map:",o)}else{let o=document.createElement("script");o.type="importmap",o.id="wp-importmap",o.text=JSON.stringify({imports:t},null,2),document.head.appendChild(o)}}function To(t,e){return new Promise(o=>{if(!e.src){o();return}if(document.getElementById(t+"-css")){o();return}let n=document.createElement("link");n.rel="stylesheet",n.href=e.src+(e.version?"?ver="+e.version:""),n.id=t+"-css",n.media=e.media||"all",n.onload=()=>o(),n.onerror=()=>{console.error(`Failed to load stylesheet: ${t}`),o()},document.head.appendChild(n)})}function Lo(t,e){if(!e.src){let r=document.createElement("script");return r.id=t+"-js",r.textContent="// Processed: "+t,r}let o=document.createElement("script");return o.src=e.src+(e.version?"?ver="+e.version:""),o.id=t+"-js",o.async=!1,o}function Oe(t,e,o){let r="";if(Array.isArray(e)?r=e.join(`
36 -`):typeof e=="string"&&(r=e),r&&r.trim()){let n=t+"-"+o+"-inline-css";if(!document.getElementById(n)){let s=document.createElement("style");s.id=n,s.textContent=r.trim(),document.head.appendChild(s)}}}function ke(t,e,o){let r=e;Array.isArray(r)&&(r=r.join(`
37 -`));let n=document.createElement("script");return n.id=t+"-"+o+"-js",n.textContent=r.trim(),n}function Pe(t){let e=new Set,o=new Set,r=[];function n(s){if(!e.has(s)){if(o.has(s)){console.warn(`Circular dependency detected for handle: ${s}`);return}o.add(s),t[s]&&(t[s].deps||[]).forEach(a=>{t[a]&&n(a)}),o.delete(s),e.add(s),t[s]&&r.push(s)}}return Object.keys(t).forEach(s=>{n(s)}),r}async function zo(t,e){let o=[];for(let r of t){if(r.src){let n=Promise.withResolvers();r.onload=()=>n.resolve(),r.onerror=()=>{console.error(`Failed to load script: ${r.id}`),n.resolve()},o.push(n.promise)}else await Promise.all(o),o=[];e.appendChild(r)}await Promise.all(o),o=[]}async function Mo(t,e,o,r,n,s){s&&Co(s);let i=Pe(o),a=Pe(t),l=[];for(let u of i){let p=r.before?.[u];p&&Oe(u,p,"before"),l.push(To(u,o[u]));let g=r.after?.[u];g&&Oe(u,g,"after")}let c=[];for(let u of a){let p=e.before?.[u];p&&c.push(ke(u,p,"before")),c.push(Lo(u,t[u]));let g=e.after?.[u];g&&c.push(ke(u,g,"after"))}let f=zo(c,document.body);await Promise.all([Promise.all(l),f]),n&&n.length>0&&n.forEach(u=>{let p=u.match(/<script([^>]*)>(.*?)<\/script>/is);if(p){let g=p[1],d=p[2],m=document.createElement("script"),y=g.match(/id=["']([^"']+)["']/);y&&(m.id=y[1]);let S=g.match(/type=["']([^"']+)["']/);S&&(m.type=S[1]),m.textContent=d,document.body.appendChild(m)}})}var Ie=Mo;var Ot=h(M(),1),ct=h(N(),1),ut=h(z(),1);var _t;async function Fe(){return _t||(_t=(async()=>{let e=await j((0,ut.resolveSelect)(Ot.store)).getEditorAssets();await Ie(e.scripts||{},e.inline_scripts||{before:{},after:{}},e.styles||{},e.inline_styles||{before:{},after:{}},e.html_templates||[],e.script_modules||{})})()),_t}function Z(){let t=(0,ut.useSelect)(r=>j(r(Ot.store)).getEditorAssets(),[]),[e,o]=(0,ct.useState)(!1);return(0,ct.useEffect)(()=>{t&&!e&&Fe().then(()=>{o(!0)}).catch(r=>{console.error("Failed to load editor assets:",r)})},[t,e]),{isReady:!!t&&e,assetsLoaded:e}}var q=h(kt(),1),{Editor:No,BackButton:Go}=j(Ae.privateApis);function Bo({postType:t,postId:e,settings:o,backButton:r}){let n=(0,It.useSelect)(g=>{if(t||e)return null;let{getHomePage:d}=j(g(Pt.store));return d()},[t,e]),s=t||n?.postType,i=e||n?.postId,a=(0,It.useSelect)(g=>{if(!(!s||!i))return s==="wp_template"?i:j(g(Pt.store)).getTemplateId(s,i)},[s,i]),l=ot({templateId:a}),{isReady:c,editorSettings:f}=Y({stylesId:l}),{isReady:u}=Z(),p=(0,Re.useMemo)(()=>({...f,...o}),[f,o]);return!c||!u?(0,q.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",height:"100vh"},children:(0,q.jsx)(Ve.Spinner,{})}):(0,q.jsx)(No,{postType:s,postId:i,templateId:a,settings:p,styles:p.styles,children:r&&(0,q.jsx)(Go,{children:r})})}var Le=h(Jt(),1),tt=h(N(),1),Q=h(Te(),1),ze=h(ft(),1),Me=h(ht(),1);var L=h(kt(),1);if(typeof document<"u"&&!document.head.querySelector("style[data-wp-hash='95327475c1']")){let t=document.createElement("style");t.setAttribute("data-wp-hash","95327475c1"),t.appendChild(document.createTextNode(".lazy-editor-block-preview__container{align-items:center;border-radius:4px;display:flex;flex-direction:column;height:100%;justify-content:center}.dataviews-view-grid .lazy-editor-block-preview__container .block-editor-block-preview__container{height:100%}.dataviews-view-table .lazy-editor-block-preview__container{text-wrap:balance;text-wrap:pretty;flex-grow:0;width:96px}")),document.head.appendChild(t)}var{useStyle:Wo}=j(ze.privateApis);function Uo({blocks:t,content:e,description:o}){let r=(0,tt.useId)(),n=Wo("color.background"),s=(0,tt.useMemo)(()=>t??(0,Me.parse)(e,{__unstableSkipMigrationLogs:!0}),[e,t]),i=!s?.length;return(0,L.jsxs)("div",{className:"lazy-editor-block-preview__container",style:{backgroundColor:n},"aria-describedby":o?r:void 0,children:[i&&(0,Le.__)("Empty."),!i&&(0,L.jsx)(Q.BlockPreview.Async,{children:(0,L.jsx)(Q.BlockPreview,{blocks:s})}),!!o&&(0,L.jsx)("div",{hidden:!0,id:r,children:o})]})}function Do({blocks:t,content:e,description:o}){let r=ot(),{isReady:n,editorSettings:s}=Y({stylesId:r}),{isReady:i}=Z(),a=(0,tt.useMemo)(()=>({...s,isPreviewMode:!0}),[s]);return!n||!i?null:(0,L.jsx)(Q.BlockEditorProvider,{settings:a,children:(0,L.jsx)(Uo,{blocks:t,content:e,description:o})})}export{Bo as Editor,Do as Preview,Fe as loadEditorAssets,Z as useEditorAssets,Y as useEditorSettings};
35 + `),f+="}"),a.blockStyles){let m=At(t);c.forEach(y=>{if(y.isStyleVariation&&!a.variationStyles)return;let w=Wo(y,m);[y,...w,..._e(y),...w.flatMap(_e)].forEach(b=>{f+=Jo(b,{tree:l,useRootPaddingAlign:u,disableLayoutStyles:n,hasBlockGapSupport:o,hasFallbackGapSupport:r,disableRootPadding:s})})})}if(a.layoutStyles&&(f=f+".wp-site-blocks > .alignleft { float: left; margin-right: 2em; }",f=f+".wp-site-blocks > .alignright { float: right; margin-left: 2em; }",f=f+".wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }"),a.blockGap&&o){let m=dt(l?.styles?.spacing?.blockGap)||"0.5em";f=f+`:root :where(.wp-site-blocks) > * { margin-block-start: ${m}; margin-block-end: 0; }`,f=f+":root :where(.wp-site-blocks) > :first-child { margin-block-start: 0; }",f=f+":root :where(.wp-site-blocks) > :last-child { margin-block-end: 0; }"}return a.presets&&d.forEach(({selector:m,presets:y})=>{(I===m||J===m)&&(m="");let w=Co(m,y);w.length>0&&(f+=w)}),f};function Qo(t,e){return Tt(t,e).flatMap(({presets:r})=>Lo(r))}var Zo=(t,e)=>{if(t?.selectors&&Object.keys(t.selectors).length>0)return t.selectors;let o={root:e};return Object.entries(Io).forEach(([r,n])=>{let s=W(t,r);s&&(o[n]=s)}),o},qo=(t,e)=>{let{getBlockStyles:o}=(0,ke.select)($.store),r={};return t.forEach(n=>{let s=n.name,i=W(n);if(!i)return;let a=W(n,"filter.duotone");if(!a){let h=W(n),f=(0,$.getBlockSupport)(n,"color.__experimentalDuotone",!1);typeof f=="string"&&h&&(a=V(h,f))}let l=!!n?.supports?.layout||!!n?.supports?.__experimentalLayout,c=n?.supports?.spacing?.blockGap,d=typeof c=="object"&&!Array.isArray(c)?c.__experimentalDefault:void 0,u=o(s),p={};u?.forEach(h=>{let f=e?`-${e}`:"",m=`${h.name}${f}`,y=Et(m,i);p[m]=y});let g=Zo(n,i);r[s]={duotoneSelector:a??void 0,fallbackGapValue:d,featureSelectors:Object.keys(g).length?g:void 0,hasLayoutSupport:l,name:s,selector:i,styleVariationSelectors:u?.length?p:void 0}}),r};function tr(t){let e=t.styles?.blocks,o=e?.["core/separator"];return o&&o.color?.background&&!o.color?.text&&!o.border?.color?{...t,styles:{...t.styles,blocks:{...e,"core/separator":{...o,color:{...o.color,text:o.color?.background}}}}}:t}function Ve(t,e){let o="";return!t||t.trim()===""||t.split("&").forEach(n=>{if(!n||n.trim()==="")return;if(!n.includes("{"))o+=`:root :where(${e}){${n.trim()}}`;else{let i=n.replace("}","").split("{");if(i.length!==2)return;let[a,l]=i,c=a.match(/([>+~\s]*::[a-zA-Z-]+)/),d=c?c[1]:"",u=c?a.replace(d,"").trim():a.trim(),p;u===""?p=e:p=a.startsWith(" ")?V(e,u):lt(e,u),o+=`:root :where(${p})${d}{${l.trim()}}`}}),o}function Ft(t={},e=[],o={}){let{hasBlockGapSupport:r,hasFallbackGapSupport:n,disableLayoutStyles:s=!1,disableRootPadding:i=!1,styleOptions:a={}}=o,l=e.length>0?e:(0,$.getBlockTypes)(),c=Xt(t,"spacing.blockGap"),d=r??c!=null,u=n??!d;if(!t?.styles||!t?.settings)return[[],{}];let p=tr(t),g=qo(l),h=Yo(p,g),f=Xo(p,g,d,u,s,i,a),m=Qo(p,g),y=[{css:h,isGlobalStyles:!0},{css:f,isGlobalStyles:!0},{css:p?.styles?.css??"",isGlobalStyles:!0},{assets:m,__unstableType:"svgs",isGlobalStyles:!0}];return l.forEach(w=>{let b=p?.styles?.blocks?.[w.name];if(b?.css){let{featureSelectors:E}=g[w.name],_=typeof E=="object"?E?.css:void 0,O;typeof _=="string"?O=_:typeof _=="object"&&(O=_?.root);let L=O??g[w.name].selector;y.push({css:Ve(b.css,L),isGlobalStyles:!0})}}),[y,p.settings]}var Le=S(B(),1),ze=S(ct(),1),ht=S(U(),1),Me=S(G(),1);var Te=S(B(),1),Fe=S(G(),1),Ie=S(U(),1);function Re(t){let{userGlobalStyles:e}=(0,Fe.useSelect)(o=>{if(t===void 0)return{userGlobalStyles:void 0};let{getEntityRecord:r,getEditedEntityRecord:n,canUser:s}=o(Te.store),i=s("update",{kind:"root",name:"globalStyles",id:t}),a;return typeof i=="boolean"&&(i?a=n("root","globalStyles",t):a=r("root","globalStyles",t,{context:"view"})),{userGlobalStyles:a}},[t]);return(0,Ie.useMemo)(()=>e?{user:e}:{user:void 0},[e])}var Ce=S(je(),1),{unlock:j}=(0,Ce.__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/lazy-editor");function tt({stylesId:t}){let{editorSettings:e,blockTypes:o}=(0,Me.useSelect)(a=>({editorSettings:j(a(Le.store)).getEditorSettings(),blockTypes:a(ze.store).getBlockTypes()}),[]),{user:r}=Re(t),[n]=(0,ht.useMemo)(()=>Ft(r,o),[r,o]),s=!!e,i=(0,ht.useMemo)(()=>s?[...e?.styles??[],...n]:[],[s,e?.styles,n]);return{isReady:s,editorSettings:(0,ht.useMemo)(()=>({...e??{},styles:i}),[e,i])}}function er(t){if(!t||Object.keys(t).length===0)return;let e=document.querySelector("script#wp-importmap[type=importmap]");if(e)try{let o=JSON.parse(e.text);o.imports||(o.imports={}),o.imports={...o.imports,...t},e.text=JSON.stringify(o,null,2)}catch(o){console.error("Failed to parse or update import map:",o)}else{let o=document.createElement("script");o.type="importmap",o.id="wp-importmap",o.text=JSON.stringify({imports:t},null,2),document.head.appendChild(o)}}function or(t,e){return new Promise(o=>{if(!e.src){o();return}if(document.getElementById(t+"-css")){o();return}let n=document.createElement("link");n.rel="stylesheet",n.href=e.src+(e.version?"?ver="+e.version:""),n.id=t+"-css",n.media=e.media||"all",n.onload=()=>o(),n.onerror=()=>{console.error(`Failed to load stylesheet: ${t}`),o()},document.head.appendChild(n)})}function rr(t,e){if(!e.src){let r=document.createElement("script");return r.id=t+"-js",r.textContent="// Processed: "+t,r}let o=document.createElement("script");return o.src=e.src+(e.version?"?ver="+e.version:""),o.id=t+"-js",o.async=!1,o}function Ge(t,e,o){let r="";if(Array.isArray(e)?r=e.join(`
36 +`):typeof e=="string"&&(r=e),r&&r.trim()){let n=t+"-"+o+"-inline-css";if(!document.getElementById(n)){let s=document.createElement("style");s.id=n,s.textContent=r.trim(),document.head.appendChild(s)}}}function Ne(t,e,o){let r=e;Array.isArray(r)&&(r=r.join(`
37 +`));let n=document.createElement("script");return n.id=t+"-"+o+"-js",n.textContent=r.trim(),n}function Be(t){let e=new Set,o=new Set,r=[];function n(s){if(!e.has(s)){if(o.has(s)){console.warn(`Circular dependency detected for handle: ${s}`);return}o.add(s),t[s]&&(t[s].deps||[]).forEach(a=>{t[a]&&n(a)}),o.delete(s),e.add(s),t[s]&&r.push(s)}}return Object.keys(t).forEach(s=>{n(s)}),r}async function nr(t,e){let o=[];for(let r of t){if(r.src){let n=Promise.withResolvers();r.onload=()=>n.resolve(),r.onerror=()=>{console.error(`Failed to load script: ${r.id}`),n.resolve()},o.push(n.promise)}else await Promise.all(o),o=[];e.appendChild(r)}await Promise.all(o),o=[]}async function sr(t,e,o,r,n,s){s&&er(s);let i=Be(o),a=Be(t),l=[];for(let u of i){let p=r.before?.[u];p&&Ge(u,p,"before"),l.push(or(u,o[u]));let g=r.after?.[u];g&&Ge(u,g,"after")}let c=[];for(let u of a){let p=e.before?.[u];p&&c.push(Ne(u,p,"before")),c.push(rr(u,t[u]));let g=e.after?.[u];g&&c.push(Ne(u,g,"after"))}let d=nr(c,document.body);await Promise.all([Promise.all(l),d]),n&&n.length>0&&n.forEach(u=>{let p=u.match(/<script([^>]*)>(.*?)<\/script>/is);if(p){let g=p[1],h=p[2],f=document.createElement("script"),m=g.match(/id=["']([^"']+)["']/);m&&(f.id=m[1]);let y=g.match(/type=["']([^"']+)["']/);y&&(f.type=y[1]),f.textContent=h,document.body.appendChild(f)}})}var Ue=sr;var Rt=S(B(),1),yt=S(U(),1),St=S(G(),1);var It;async function We(){return It||(It=(async()=>{let e=await j((0,St.resolveSelect)(Rt.store)).getEditorAssets();await Ue(e.scripts||{},e.inline_scripts||{before:{},after:{}},e.styles||{},e.inline_styles||{before:{},after:{}},e.html_templates||[],e.script_modules||{})})()),It}function et(){let t=(0,St.useSelect)(r=>j(r(Rt.store)).getEditorAssets(),[]),[e,o]=(0,yt.useState)(!1);return(0,yt.useEffect)(()=>{t&&!e&&We().then(()=>{o(!0)}).catch(r=>{console.error("Failed to load editor assets:",r)})},[t,e]),{isReady:!!t&&e,assetsLoaded:e}}var C=S(Ct(),1),{Editor:ir,BackButton:ar,PreferencesModal:lr,ToolsMoreMenuGroup:cr,SiteExport:ur}=j(Ke.privateApis);function fr({postType:t,postId:e,settings:o,backButton:r,onActionPerformed:n,initialViewport:s,renderingMode:i}){let a=(0,zt.useSelect)(m=>{if(t||e)return null;let{getHomePage:y}=j(m(Lt.store));return y()},[t,e]),l=t||a?.postType,c=e||a?.postId,d=(0,zt.useSelect)(m=>{if(!(!l||!c))return l==="wp_template"?c:j(m(Lt.store)).getTemplateId(l,c)},[l,c]),u=st({templateId:d}),{isReady:p,editorSettings:g}=tt({stylesId:u}),{isReady:h}=et(),f=(0,Ye.useMemo)(()=>({...g,...o,styles:[...g.styles??[],...o?.styles??[]]}),[g,o]);return!p||!h?(0,C.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",height:"100vh"},children:(0,C.jsx)(He.Spinner,{})}):(0,C.jsxs)(ir,{postType:l,postId:c,templateId:d,settings:f,styles:f.styles,onActionPerformed:n,initialViewport:s,renderingMode:i,children:[r&&(0,C.jsx)(ar,{children:r}),(0,C.jsx)(lr,{}),(0,C.jsx)(cr,{children:(0,C.jsx)(ur,{})})]})}var Qe=S(ie(),1),rt=S(U(),1),ot=S(Xe(),1),Ze=S(bt(),1),qe=S(ct(),1);var M=S(Ct(),1);if(typeof document<"u"&&(typeof process>"u"||!0)&&!document.head.querySelector("style[data-wp-hash='95327475c1']")){let t=document.createElement("style");t.setAttribute("data-wp-hash","95327475c1"),t.appendChild(document.createTextNode(".lazy-editor-block-preview__container{align-items:center;border-radius:4px;display:flex;flex-direction:column;height:100%;justify-content:center}.dataviews-view-grid .lazy-editor-block-preview__container .block-editor-block-preview__container{height:100%}.dataviews-view-table .lazy-editor-block-preview__container{text-wrap:balance;text-wrap:pretty;flex-grow:0;width:96px}")),document.head.appendChild(t)}var{useStyle:pr}=j(Ze.privateApis);function dr({blocks:t,content:e,description:o}){let r=(0,rt.useId)(),n=pr("color.background"),s=(0,rt.useMemo)(()=>t??(0,qe.parse)(e,{__unstableSkipMigrationLogs:!0}),[e,t]),i=!s?.length;return(0,M.jsxs)("div",{className:"lazy-editor-block-preview__container",style:{backgroundColor:n},"aria-describedby":o?r:void 0,children:[i&&(0,Qe.__)("Empty."),!i&&(0,M.jsx)(ot.BlockPreview.Async,{children:(0,M.jsx)(ot.BlockPreview,{blocks:s})}),!!o&&(0,M.jsx)("div",{hidden:!0,id:r,children:o})]})}function gr({blocks:t,content:e,description:o}){let r=st(),{isReady:n,editorSettings:s}=tt({stylesId:r}),{isReady:i}=et(),a=(0,rt.useMemo)(()=>({...s,isPreviewMode:!0}),[s]);return!n||!i?null:(0,M.jsx)(ot.BlockEditorProvider,{settings:a,children:(0,M.jsx)(dr,{blocks:t,content:e,description:o})})}export{fr as Editor,gr as Preview,We as loadEditorAssets,et as useEditorAssets,tt as useEditorSettings};
38 38 //# sourceMappingURL=index.min.js.map