golden hour
/home/doctorbruno/public_html/siddharastrology.com/wp-includes/js/dist/script-modules/lazy-editor
⬆️ Go Up
Upload
File/Folder
Size
Actions
index.js
100.58 KB
Del
OK
index.js.map
193.14 KB
Del
OK
index.min.asset.php
254 B
Del
OK
index.min.js
41.37 KB
Del
OK
index.min.js.map
201.52 KB
Del
OK
Edit: index.min.js
var De=Object.create;var Tt=Object.defineProperty;var Ke=Object.getOwnPropertyDescriptor;var He=Object.getOwnPropertyNames;var Je=Object.getPrototypeOf,Xe=Object.prototype.hasOwnProperty;var P=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var Ye=(t,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of He(e))!Xe.call(t,n)&&n!==o&&Tt(t,n,{get:()=>e[n],enumerable:!(r=Ke(e,n))||r.enumerable});return t};var S=(t,e,o)=>(o=t!=null?De(Je(t)):{},Ye(e||!t||!t.__esModule?Tt(o,"default",{value:t,enumerable:!0}):o,t));var gt=P((ar,Rt)=>{Rt.exports=window.wp.editor});var N=P((lr,Ct)=>{Ct.exports=window.wp.coreData});var G=P((cr,Lt)=>{Lt.exports=window.wp.data});var zt=P((ur,Mt)=>{Mt.exports=window.wp.components});var B=P((fr,Gt)=>{Gt.exports=window.wp.element});var mt=P((hr,Ut)=>{Ut.exports=window.wp.styleEngine});var Yt=P((xr,Xt)=>{Xt.exports=window.wp.i18n});var it=P(($r,Zt)=>{Zt.exports=window.wp.blocks});var we=P((Yr,ve)=>{ve.exports=window.wp.privateApis});var Vt=P((un,Re)=>{Re.exports=window.ReactJSXRuntime});var Ge=P((hn,ze)=>{ze.exports=window.wp.blockEditor});var Ce=S(gt(),1),It=S(N(),1),jt=S(G(),1),Le=S(zt(),1),Me=S(B(),1);var Nt=S(N(),1),Bt=S(G(),1);function ot({templateId:t}={}){let{globalStylesId:e,stylesId:o}=(0,Bt.useSelect)(r=>{let n=r(Nt.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 v=(t,e,o)=>{let r=Array.isArray(e)?e:e.split("."),n=t;return r.forEach(s=>{n=n?.[s]}),n??o};var Ze=["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","viewport.mobile","viewport.tablet"];function Wt(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 Ze.forEach(l=>{let c=v(t,`settings${r}.${l}`)??v(t,`settings.${l}`);c!==void 0&&(a=rt(a,l.split("."),c))}),a}var Kt=S(mt(),1);var Qe="1600px",qe="320px",to=1,eo=.25,oo=.75,ro="14px";function Dt({minimumFontSize:t,maximumFontSize:e,fontSize:o,minimumViewportWidth:r=qe,maximumViewportWidth:n=Qe,scaleFactor:s=to,minimumFontSizeLimit:i}){if(i=A(i)?i:ro,o){let b=A(o);if(!b?.unit||!b?.value)return null;let E=A(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,k=Math.min(Math.max(1-.075*Math.log2(_),eo),oo),L=D(b.value*k,3);E?.value&&L<E?.value?t=`${E.value}${E.unit}`:t=`${L}${b.unit}`}}let a=A(t),l=a?.unit||"rem",c=A(e,{coerceTo:l});if(!a||!c)return null;let d=A(t,{coerceTo:"rem"}),u=A(n,{coerceTo:l}),p=A(r,{coerceTo:l});if(!u||!p||!d)return null;let g=u.value-p.value;if(!g)return null;let h=D(p.value/100,3),f=D(h,3)+l,m=100*((c.value-a.value)/g),y=D((m||1)*s,3),w=`${d.value}${d.unit} + ((1vw - ${f}) * ${y})`;return`clamp(${t}, ${w}, ${e})`}function A(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:D(d,3),unit:c}:null}function D(t,e=3){let o=Math.pow(10,e);return Math.round(t*o)/o}function ht(t){let e=t?.fluid;return e===!0||e&&typeof e=="object"&&Object.keys(e).length>0}function no(t){let e=t?.typography??{},o=t?.layout,r=A(o?.wideSize)?o?.wideSize:null;return ht(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||!ht(e?.typography)&&!ht(t))return o;let r=no(e)?.fluid??{},n=Dt({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 T="body",H=":root";function K(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 J=[{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 V(t,e){if(!t||!e)return e;let o=K(t),r=K(e),n=[];return o.forEach(s=>{r.forEach(i=>{n.push(`${s.trim()} ${i.trim()}`)})}),n.join(", ")}function Ht(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 st(t,e){return t.includes(",")?K(t).map(n=>n+e).join(","):t+e}function yt(t,e){let o=`.is-style-${t}`;if(!e)return o;let r=/[^\s:]+/,n=i=>i+o;return K(e).map(i=>i.replace(r,n)).join(",")}function Jt(t,e){let o=`.is-style-${t}`,r=K(e).map(n=>{let s=n.trim(),i=`${o} `;return s.startsWith(i)?s.slice(i.length):s});return yt(t,r.join(","))}function so(t,e){if(!t||!e)return t;if(typeof t=="object"&&"ref"in t&&t?.ref){let o=(0,Kt.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 io(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 St(t,e){if(!t||!e)return t;let o=so(t,e);return typeof o=="object"&&o!==null&&"url"in o&&o?.url?{...o,url:io(o.url,e?._links?.["wp:theme-file"])}:o}var $=S(it(),1),Y=S(mt(),1),he=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)}var ao={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},O=function(t,e,o){return e===void 0&&(e=0),o===void 0&&(o=1),t>o?o:t>e?t:e},ie=function(t){return(t=isFinite(t)?t%360:0)>0?t:t+360},Qt=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)}},bt=function(t){return{r:x(t.r),g:x(t.g),b:x(t.b),a:x(t.a,3)}},lo=/^#([0-9a-f]{3,8})$/i,at=function(t){var e=t.toString(16);return e.length<2?"0"+e:e},ae=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}},le=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}},qt=function(t){return{h:ie(t.h),s:O(t.s,0,100),l:O(t.l,0,100),a:O(t.a)}},te=function(t){return{h:x(t.h),s:x(t.s),l:x(t.l),a:x(t.a,3)}},ee=function(t){return le((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},X=function(t){return{h:(e=ae(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},co=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,uo=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,fo=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,po=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,oe={string:[[function(t){var e=lo.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?x(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?x(parseInt(t.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(t){var e=fo.exec(t)||po.exec(t);return e?e[2]!==e[4]||e[4]!==e[6]?null:Qt({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=co.exec(t)||uo.exec(t);if(!e)return null;var o,r,n=qt({h:(o=e[1],r=e[2],r===void 0&&(r="deg"),Number(o)*(ao[r]||1)),s:Number(e[3]),l:Number(e[4]),a:e[5]===void 0?1:Number(e[5])/(e[6]?100:1)});return ee(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)?Qt({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=qt({h:Number(e),s:Number(o),l:Number(r),a:Number(s)});return ee(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:ie(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 le(i)},"hsv"]]},re=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]},go=function(t){return typeof t=="string"?re(t.trim(),oe.string):typeof t=="object"&&t!==null?re(t,oe.object):[null,void 0]};var vt=function(t,e){var o=X(t);return{h:o.h,s:O(o.s+100*e,0,100),l:o.l,a:o.a}},wt=function(t){return(299*t.r+587*t.g+114*t.b)/1e3/255},ne=function(t,e){var o=X(t);return{h:o.h,s:o.s,l:O(o.l+100*e,0,100),a:o.a}},se=(function(){function t(e){this.parsed=go(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(wt(this.rgba),2)},t.prototype.isDark=function(){return wt(this.rgba)<.5},t.prototype.isLight=function(){return wt(this.rgba)>=.5},t.prototype.toHex=function(){return e=bt(this.rgba),o=e.r,r=e.g,n=e.b,i=(s=e.a)<1?at(x(255*s)):"","#"+at(o)+at(r)+at(n)+i;var e,o,r,n,s,i},t.prototype.toRgb=function(){return bt(this.rgba)},t.prototype.toRgbString=function(){return e=bt(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 te(X(this.rgba))},t.prototype.toHslString=function(){return e=te(X(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=ae(this.rgba),{h:x(e.h),s:x(e.s),v:x(e.v),a:x(e.a,3)};var e},t.prototype.invert=function(){return I({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),I(vt(this.rgba,e))},t.prototype.desaturate=function(e){return e===void 0&&(e=.1),I(vt(this.rgba,-e))},t.prototype.grayscale=function(){return I(vt(this.rgba,-1))},t.prototype.lighten=function(e){return e===void 0&&(e=.1),I(ne(this.rgba,e))},t.prototype.darken=function(e){return e===void 0&&(e=.1),I(ne(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"?I({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=X(this.rgba);return typeof e=="number"?I({h:e,s:o.s,l:o.l,a:o.a}):x(o.h)},t.prototype.isEqual=function(e){return this.toHex()===I(e).toHex()},t})(),I=function(t){return t instanceof se?t:new se(t)};function mo(t=[]){let e={r:[],g:[],b:[],a:[]};return t.forEach(o=>{let r=I(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 ce(t,e){let o=mo(e);return` <svg xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 0 0" width="0" height="0" focusable="false" role="none" aria-hidden="true" style="visibility: hidden; position: absolute; left: -9999px; overflow: hidden;" > <defs> <filter id="${t}"> <!-- Use sRGB instead of linearRGB so transparency looks correct. Use perceptual brightness to convert to grayscale. --> <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> <!-- Use sRGB instead of linearRGB to be consistent with how CSS gradients work. --> <feComponentTransfer color-interpolation-filters="sRGB"> <feFuncR type="table" tableValues="${o.r.join(" ")}"></feFuncR> <feFuncG type="table" tableValues="${o.g.join(" ")}"></feFuncG> <feFuncB type="table" tableValues="${o.b.join(" ")}"></feFuncB> <feFuncA type="table" tableValues="${o.a.join(" ")}"></feFuncA> </feComponentTransfer> <!-- Re-mask the image with the original transparency since the feColorMatrix above loses that information. --> <feComposite in2="SourceGraphic" operator="in"></feComposite> </filter> </defs> </svg>`}function M(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 Et(t){if(!t)return;let e=t.match(/var:preset\|spacing\|(.+)/);return e?`var(--wp--preset--spacing--${e[1]})`:t}function ho(t){if(!t)return null;let e=typeof t=="string";return{top:e?t:t?.top,left:e?t:t?.left}}function lt(t,e="0"){let o=ho(t);if(!o)return null;let r=Et(o?.top)||e,n=Et(o?.left)||e;return r===n?r:`${r} ${n}`}var ue={backgroundSize:"cover",backgroundPosition:"50% 50%"};function yo(t){return typeof t=="object"&&t!==null&&"url"in t&&!!t.url}function fe(t){if(!t||!yo(t.backgroundImage))return;let e;return t?.backgroundSize||(e={backgroundSize:ue.backgroundSize}),t?.backgroundSize==="contain"&&!t?.backgroundPosition&&(e={backgroundPosition:ue.backgroundPosition}),e}var pe={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 de={mobile:"480px",tablet:"782px"},ge=/^(\d+|\d*\.\d+)(px|em|rem)$/,So=16;function bo(t){return"mobile"in t||"tablet"in t}function vo(t){return!t||typeof t!="object"?{}:bo(t)?t:t.settings?.viewport??{}}function wo(t){return typeof t=="string"&&ge.test(t.trim())}function Eo(t){if(typeof t=="number")return t;if(typeof t!="string")return;let e=t.trim().match(ge);if(!e)return;let o=Number.parseFloat(e[1]);return e[2]==="px"?o:o*So}function xo(t){let e=vo(t),o={},r={};Object.keys(de).forEach(a=>{let l=a,c=e[l],d=Eo(c);d!==void 0&&wo(c)&&(o[l]=c.trim(),r[l]=d)});let n=Object.keys(o);if(!n.length)return{...de};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 xt(t){let e=xo(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 $o={button:"wp-element-button",caption:"wp-element-caption"},_o={__experimentalBorder:"border",color:"color",dimensions:"dimensions",spacing:"spacing",typography:"typography"},ye={"core/button":[":hover",":focus",":focus-visible",":active"],"core/navigation-link":[":hover",":focus",":focus-visible",":active"]},ko={link:[":link",":any-link",":visited",":hover",":focus",":focus-visible",":active"],button:[":link",":any-link",":visited",":hover",":focus",":focus-visible",":active"]};function Oo(t="*",e={}){return J.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-${M(l)}-${c}`,p=t?`:where(${t})${u}`:u,g=`var(--wp--preset--${n}--${M(l)})`;o+=`${p}{${d}: ${g} !important;}`})})}),o},"")}function Po(t={}){return J.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=>ce(`wp-duotone-${n.slug}`,n.colors))).join("")})}function Se(t={},e,o){let r=[];return Object.keys(t).forEach(n=>{let s=e+M(n.replace("/","-")),i=t[n];if(i instanceof Object){let a=s+o;r=[...r,...Se(i,a,o)]}else r.push(`${s}: ${i}`)}),r}var Vo=(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},Io=(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},jo=(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=ut(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=ut(a);o[i]=[...o[i]||[],...l],delete e[r]}}),o};function ut(t={},e="",o,r={},n=!1){let s=T===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:M(y);l.push(`${b}: ${(0,Y.getCSSValueFromRawStyle)(v(f,[w]))}`)});else if(v(t,h,!1)){let m=c.startsWith("--")?c:M(c);l.push(`${m}: ${(0,Y.getCSSValueFromRawStyle)(v(t,h))}`)}return l},[]);return t.background&&(t.background?.backgroundImage&&(t.background.backgroundImage=St(t.background.backgroundImage,r)),!s&&t.background?.backgroundImage?.id&&(t={...t,background:{...t.background,...fe(t.background)}})),(0,Y.getCSSRules)(t).forEach(l=>{if(s&&(o||n)&&l.key.startsWith("padding"))return;let c=l.key.startsWith("--")?l.key:M(l.key),d=St(l.value,r);c==="font-size"&&(d=nt({name:"",slug:"",size:d},r?.settings)),c==="aspect-ratio"&&i.push("min-height: unset"),i.push(`${c}: ${d}`)}),i}function Fo({layoutDefinitions:t=pe,style:e,selector:o,hasBlockGapSupport:r,hasFallbackGapSupport:n,fallbackGapValue:s}){let i="",a=e?.spacing?.blockGap,l=r?lt(a):"";n&&(o===T?l=l||"0.5em":!r&&s&&(l=s));let c=r&&a&&typeof a!="string"?lt(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===T?`:root :where(.${d})${h?.selector||""}`:`:root :where(${o}-${d})${h?.selector||""}`:m=o===T?`:where(.${d}${h?.selector||""})`:`:where(${o}.${d}${h?.selector||""})`,i+=`${m} { ${f.join("; ")}; }`}})}),o===T&&r&&(i+=`${H} { --wp--style--block-gap: ${l}; }`)),o===T&&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 Ao=["border","color","dimensions","spacing","typography","filter","outline","shadow","background"];function To(t,e){return ct(t,void 0,e)}function ct(t,e,o){if(!t)return{};let r=Object.entries(t),n=e?ye[e]??[]:[],i=r.filter(([a])=>Ao.includes(a)||n.includes(a)||o[a]).map(([a,l])=>[a,JSON.parse(JSON.stringify(l))]);return Object.fromEntries(i)}function me(t){let{styles:e,selector:o,featureSelectors:r,name:n,elementName:s,mediaQuery:i,variationName:a}=t,l=n?ye[n]??[]:ko[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 Ro(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 $t(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 Co=(t,e)=>{let o=[];if(!t?.styles)return o;let r=xt(t),n=To(t.styles,r);return n&&o.push({styles:n,selector:T,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:!$o[s]})}),Object.entries(t.styles?.blocks??{}).forEach(([s,i])=>{let a=ct(i,s,r),l=i,c=[],d=[];l?.variations&&Object.entries(l.variations).forEach(([u,p])=>{let g=p,h=ct(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($t(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"?Ht(f,e[m]?.featureSelectors??{}):void 0,_=ct(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($t(y,r)).forEach(([k,L])=>{L&&$.__EXPERIMENTAL_ELEMENTS[k]&&c.push({styles:L,selector:V(w,$.__EXPERIMENTAL_ELEMENTS[k]),elementName:k,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($t(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},_t=(t,e)=>{let o=[];if(!t?.settings)return o;let r=i=>{let a={};return J.forEach(({path:l})=>{let c=v(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:H}),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 Lo(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 Mo(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=M(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 zo=(t,e)=>{let o=_t(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 J){let p=Mo(n,t.settings,u);if(p.length===0)continue;let g=Lo(a,u.path[0],l);c[g]||(c[g]=[]),c[g].push(...p)}let d=Se(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 Go(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?st(a,l):a;if(h&&typeof h!="string"){let F=jo(h,u);F=Vo(F,e.settings,w),F=Io(F,e.settings),Object.entries(F).forEach(([U,At])=>{if(At.length){let et=b?Jt(b,U):U;et=l?st(et,l):et;let Ue=At.join(";");E+=`:root :where(${et}){${Ue};}`}})}if(d){let F={};u?.filter&&(F.filter=u.filter,delete u.filter);let U=ut(F);U.length&&(E+=`${d}{${U.join(";")};}`)}let k=f??_;!r&&(T===k||g)&&(E+=Fo({style:u,selector:k,hasBlockGapSupport:m??n,hasFallbackGapSupport:s,fallbackGapValue:p}));let Ft=ut(u,_,o,e,i);if(Ft?.length){let F=y?_:`:root :where(${_})`;E+=`${F}{${Ft.join(";")};}`}return u?.css&&(E+=be(u.css,`:root :where(${_})`)),c&&E?`${c}{${E}}`:E}var No=(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=t,c=Co(l,e),d=_t(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+=`${H} {`,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) } .has-global-padding { padding-right: var(--wp--style--root--padding-right); padding-left: var(--wp--style--root--padding-left); } .has-global-padding > .alignfull { margin-right: calc(var(--wp--style--root--padding-right) * -1); margin-left: calc(var(--wp--style--root--padding-left) * -1); } .has-global-padding :where(:not(.alignfull.is-layout-flow) > .has-global-padding:not(.wp-block-block, .alignfull)) { padding-right: 0; padding-left: 0; } .has-global-padding :where(:not(.alignfull.is-layout-flow) > .has-global-padding:not(.wp-block-block, .alignfull)) > .alignfull { margin-left: 0; margin-right: 0; `),f+="}"),a.blockStyles){let m=xt(t);c.forEach(y=>{if(y.isStyleVariation&&!a.variationStyles)return;let w=Ro(y,m);[y,...w,...me(y),...w.flatMap(me)].forEach(b=>{f+=Go(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=lt(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})=>{(T===m||H===m)&&(m="");let w=Oo(m,y);w.length>0&&(f+=w)}),f};function Bo(t,e){return _t(t,e).flatMap(({presets:r})=>Po(r))}var Wo=(t,e)=>{if(t?.selectors&&Object.keys(t.selectors).length>0)return t.selectors;let o={root:e};return Object.entries(_o).forEach(([r,n])=>{let s=W(t,r);s&&(o[n]=s)}),o},Uo=(t,e)=>{let{getBlockStyles:o}=(0,he.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=yt(m,i);p[m]=y});let g=Wo(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 Do(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 be(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):st(e,u),o+=`:root :where(${p})${d}{${l.trim()}}`}}),o}function kt(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=Wt(t,"spacing.blockGap"),d=r??c!==null,u=n??!d;if(!t?.styles||!t?.settings)return[[],{}];let p=Do(t),g=Uo(l),h=zo(p,g),f=No(p,g,d,u,s,i,a),m=Bo(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,k;typeof _=="string"?k=_:typeof _=="object"&&(k=_?.root);let L=k??g[w.name].selector;y.push({css:be(b.css,L),isGlobalStyles:!0})}}),[y,p.settings]}var Oe=S(N(),1),Pe=S(it(),1),ft=S(B(),1),Ve=S(G(),1);var Ee=S(N(),1),xe=S(G(),1),$e=S(B(),1);function _e(t){let{userGlobalStyles:e}=(0,xe.useSelect)(o=>{if(t===void 0)return{userGlobalStyles:void 0};let{getEntityRecord:r,getEditedEntityRecord:n,canUser:s}=o(Ee.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,$e.useMemo)(()=>e?{user:e}:{user:void 0},[e])}var ke=S(we(),1),{unlock:j}=(0,ke.__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 Z({stylesId:t}){let{editorSettings:e,blockTypes:o}=(0,Ve.useSelect)(a=>({editorSettings:j(a(Oe.store)).getEditorSettings(),blockTypes:a(Pe.store).getBlockTypes()}),[]),{user:r}=_e(t),[n]=(0,ft.useMemo)(()=>kt(r,o),[r,o]),s=!!e,i=(0,ft.useMemo)(()=>s?[...e?.styles??[],...n]:[],[s,e?.styles,n]);return{isReady:s,editorSettings:(0,ft.useMemo)(()=>({...e??{},styles:i}),[e,i])}}function Ko(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 Ho(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 Jo(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 Ie(t,e,o){let r="";if(Array.isArray(e)?r=e.join(` `):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 je(t,e,o){let r=e;Array.isArray(r)&&(r=r.join(` `));let n=document.createElement("script");return n.id=t+"-"+o+"-js",n.textContent=r.trim(),n}function Fe(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 Xo(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 Yo(t,e,o,r,n,s){s&&Ko(s);let i=Fe(o),a=Fe(t),l=[];for(let u of i){let p=r.before?.[u];p&&Ie(u,p,"before"),l.push(Ho(u,o[u]));let g=r.after?.[u];g&&Ie(u,g,"after")}let c=[];for(let u of a){let p=e.before?.[u];p&&c.push(je(u,p,"before")),c.push(Jo(u,t[u]));let g=e.after?.[u];g&&c.push(je(u,g,"after"))}let d=Xo(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 Ae=Yo;var Pt=S(N(),1),pt=S(B(),1),dt=S(G(),1);var Ot;async function Te(){return Ot||(Ot=(async()=>{let e=await j((0,dt.resolveSelect)(Pt.store)).getEditorAssets();await Ae(e.scripts||{},e.inline_scripts||{before:{},after:{}},e.styles||{},e.inline_styles||{before:{},after:{}},e.html_templates||[],e.script_modules||{})})()),Ot}function Q(){let t=(0,dt.useSelect)(r=>j(r(Pt.store)).getEditorAssets(),[]),[e,o]=(0,pt.useState)(!1);return(0,pt.useEffect)(()=>{t&&!e&&Te().then(()=>{o(!0)}).catch(r=>{console.error("Failed to load editor assets:",r)})},[t,e]),{isReady:!!t&&e,assetsLoaded:e}}var C=S(Vt(),1),{Editor:Zo,BackButton:Qo,PreferencesModal:qo,ToolsMoreMenuGroup:tr,SiteExport:er}=j(Ce.privateApis);function or({postType:t,postId:e,settings:o,backButton:r,onActionPerformed:n,initialViewport:s}){let i=(0,jt.useSelect)(f=>{if(t||e)return null;let{getHomePage:m}=j(f(It.store));return m()},[t,e]),a=t||i?.postType,l=e||i?.postId,c=(0,jt.useSelect)(f=>{if(!(!a||!l))return a==="wp_template"?l:j(f(It.store)).getTemplateId(a,l)},[a,l]),d=ot({templateId:c}),{isReady:u,editorSettings:p}=Z({stylesId:d}),{isReady:g}=Q(),h=(0,Me.useMemo)(()=>({...p,...o,styles:[...p.styles??[],...o?.styles??[]]}),[p,o]);return!u||!g?(0,C.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",height:"100vh"},children:(0,C.jsx)(Le.Spinner,{})}):(0,C.jsxs)(Zo,{postType:a,postId:l,templateId:c,settings:h,styles:h.styles,onActionPerformed:n,initialViewport:s,children:[r&&(0,C.jsx)(Qo,{children:r}),(0,C.jsx)(qo,{}),(0,C.jsx)(tr,{children:(0,C.jsx)(er,{})})]})}var Ne=S(Yt(),1),tt=S(B(),1),q=S(Ge(),1),Be=S(gt(),1),We=S(it(),1);var z=S(Vt(),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:rr}=j(Be.privateApis);function nr({blocks:t,content:e,description:o}){let r=(0,tt.useId)(),n=rr("color.background"),s=(0,tt.useMemo)(()=>t??(0,We.parse)(e,{__unstableSkipMigrationLogs:!0}),[e,t]),i=!s?.length;return(0,z.jsxs)("div",{className:"lazy-editor-block-preview__container",style:{backgroundColor:n},"aria-describedby":o?r:void 0,children:[i&&(0,Ne.__)("Empty."),!i&&(0,z.jsx)(q.BlockPreview.Async,{children:(0,z.jsx)(q.BlockPreview,{blocks:s})}),!!o&&(0,z.jsx)("div",{hidden:!0,id:r,children:o})]})}function sr({blocks:t,content:e,description:o}){let r=ot(),{isReady:n,editorSettings:s}=Z({stylesId:r}),{isReady:i}=Q(),a=(0,tt.useMemo)(()=>({...s,isPreviewMode:!0}),[s]);return!n||!i?null:(0,z.jsx)(q.BlockEditorProvider,{settings:a,children:(0,z.jsx)(nr,{blocks:t,content:e,description:o})})}export{or as Editor,sr as Preview,Te as loadEditorAssets,Q as useEditorAssets,Z as useEditorSettings};
Save