From 18312ac734719aa77f54178439d6c31ca853b8d4 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 29 May 2026 12:45:03 +0000 Subject: [PATCH 1/3] fix(preview): dark swatches respect the dark-overrides-enabled toggle When dark overrides are OFF the live preview still injected explicit --sf-color-*-dark vars (from stored values or default hex-hint fallbacks), so Dark mode showed wrong colors the framework wouldn't use. Read dark_overrides_enabled in inlineStyle: - ON (default): inject stored/hint dark values as before. - OFF: inject the same CSS relative-color formula the framework uses: brand/status: oklch(from var(--sf-color-X-light) clamp(0.65, calc(0.95 - l * 0.5), 0.88) calc(c * 0.9) h) base: oklch(from var(--sf-color-base-light) clamp(0.16, calc(1.18 - l), 0.24) calc(c * 0.5) h) https://claude.ai/code/session_019MD9F8rrpYzCeDTmSTLA1K --- .../src/components/LivePreview.svelte | 24 +++++++++++++++---- integrations/bricks/assets/admin-app/app.js | 18 +++++++------- 2 files changed, 29 insertions(+), 13 deletions(-) diff --git a/integrations/bricks/admin-app/src/components/LivePreview.svelte b/integrations/bricks/admin-app/src/components/LivePreview.svelte index 113cbab3..538032f4 100644 --- a/integrations/bricks/admin-app/src/components/LivePreview.svelte +++ b/integrations/bricks/admin-app/src/components/LivePreview.svelte @@ -43,17 +43,33 @@ const radius = tokens.radius ?? {}; const shadows = tokens.shadows ?? {}; + // When dark overrides are disabled the framework auto-derives dark colors + // via CSS relative color syntax. Mirror that exactly so the preview matches + // what the front-end actually renders. When enabled, use stored values. + const darkEnabled = colors.dark_overrides_enabled !== '0'; + for (const name of brand) { const v = colors[`brand_${name}`] ?? defaultColors.brand_hex_hints?.[name]; if (v) pairs.push(`--sf-color-${name}-light:${v}`); - const vd = colors[`brand_dark_${name}`] ?? defaultColors.brand_dark_hex_hints?.[name]; - if (vd) pairs.push(`--sf-color-${name}-dark:${vd}`); + if (darkEnabled) { + const vd = colors[`brand_dark_${name}`] ?? defaultColors.brand_dark_hex_hints?.[name]; + if (vd) pairs.push(`--sf-color-${name}-dark:${vd}`); + } else { + const formula = name === 'base' + ? `oklch(from var(--sf-color-base-light) clamp(0.16, calc(1.18 - l), 0.24) calc(c * 0.5) h)` + : `oklch(from var(--sf-color-${name}-light) clamp(0.65, calc(0.95 - l * 0.5), 0.88) calc(c * 0.9) h)`; + pairs.push(`--sf-color-${name}-dark:${formula}`); + } } for (const name of statuses) { const v = colors[`status_${name}`] ?? defaultColors.status_hex_hints?.[name]; if (v) pairs.push(`--sf-color-${name}-light:${v}`); - const vd = colors[`status_dark_${name}`] ?? defaultColors.status_dark_hex_hints?.[name]; - if (vd) pairs.push(`--sf-color-${name}-dark:${vd}`); + if (darkEnabled) { + const vd = colors[`status_dark_${name}`] ?? defaultColors.status_dark_hex_hints?.[name]; + if (vd) pairs.push(`--sf-color-${name}-dark:${vd}`); + } else { + pairs.push(`--sf-color-${name}-dark:oklch(from var(--sf-color-${name}-light) clamp(0.65, calc(0.95 - l * 0.5), 0.88) calc(c * 0.9) h)`); + } } if (typography.font_body) pairs.push(`--sf-font-body:${typography.font_body}`); if (typography.font_heading) pairs.push(`--sf-font-heading:${typography.font_heading}`); diff --git a/integrations/bricks/assets/admin-app/app.js b/integrations/bricks/assets/admin-app/app.js index 76ace323..3aa10afe 100644 --- a/integrations/bricks/assets/admin-app/app.js +++ b/integrations/bricks/assets/admin-app/app.js @@ -1,13 +1,13 @@ -var Sn=Object.defineProperty;var ar=e=>{throw TypeError(e)};var En=(e,t,s)=>t in e?Sn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s;var Ve=(e,t,s)=>En(e,typeof t!="symbol"?t+"":t,s),ya=(e,t,s)=>t.has(e)||ar("Cannot "+s);var g=(e,t,s)=>(ya(e,t,"read from private field"),s?s.call(e):t.get(e)),Z=(e,t,s)=>t.has(e)?ar("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,s),X=(e,t,s,a)=>(ya(e,t,"write to private field"),a?a.call(e,s):t.set(e,s),s),ie=(e,t,s)=>(ya(e,t,"access private method"),s);var Ba=Array.isArray,jn=Array.prototype.indexOf,Xt=Array.prototype.includes,ua=Array.from,Tn=Object.defineProperty,fs=Object.getOwnPropertyDescriptor,Cn=Object.getOwnPropertyDescriptors,$n=Object.prototype,zn=Array.prototype,jr=Object.getPrototypeOf,rr=Object.isExtensible;const Tr=()=>{};function An(e){for(var t=0;t{e=a,t=r});return{promise:s,resolve:e,reject:t}}function ot(e,t){if(Array.isArray(e))return e;if(t===void 0||!(Symbol.iterator in e))return Array.from(e);const s=[];for(const a of e)if(s.push(a),s.length===t)break;return s}const Oe=2,bs=4,va=8,$r=1<<24,ct=16,vt=32,Vt=64,Ca=128,tt=512,Ae=1024,Me=2048,bt=4096,Le=8192,st=16384,is=32768,$a=1<<25,ss=65536,ea=1<<17,Fn=1<<18,Ss=1<<19,Rn=1<<20,mt=1<<25,as=65536,ta=1<<21,us=1<<22,Lt=1<<23,Zt=Symbol("$state"),Mn=Symbol("legacy props"),On=Symbol(""),Gs=Symbol("attributes"),za=Symbol("class"),Aa=Symbol("style"),Ts=Symbol("text"),Ws=Symbol("form reset"),pa=new class extends Error{constructor(){super(...arguments);Ve(this,"name","StaleReactionError");Ve(this,"message","The reaction that called `getAbortSignal()` was re-run or destroyed")}},Dn=!!globalThis.document?.contentType&&globalThis.document.contentType.includes("xml");function Pn(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function Ln(e,t,s){throw new Error("https://svelte.dev/e/each_key_duplicate")}function Vn(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function In(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function qn(e){throw new Error("https://svelte.dev/e/effect_orphan")}function Nn(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function Bn(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function Kn(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Hn(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Un(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function Gn(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}const Wn=1,Yn=2,zr=4,Xn=8,Zn=16,Jn=1,Qn=4,ei=8,ti=16,si=1,ai=2,ze=Symbol("uninitialized"),Ar="http://www.w3.org/1999/xhtml";function ri(){console.warn("https://svelte.dev/e/derived_inert")}function ni(){console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function ii(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}function Fr(e){return e===this.v}function li(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function Rr(e){return!li(e,this.v)}let Ye=null;function ys(e){Ye=e}function xe(e,t=!1,s){Ye={p:Ye,i:!1,c:null,e:null,s:e,x:null,r:se,l:null}}function ke(e){var t=Ye,s=t.e;if(s!==null){t.e=null;for(var a of s)an(a)}return t.i=!0,Ye=t.p,{}}function Mr(){return!0}let qt=[];function Or(){var e=qt;qt=[],An(e)}function Jt(e){if(qt.length===0&&!zs){var t=qt;queueMicrotask(()=>{t===qt&&Or()})}qt.push(e)}function oi(){for(;qt.length>0;)Or()}function Dr(e){var t=se;if(t===null)return ee.f|=Lt,e;if((t.f&is)===0&&(t.f&bs)===0)throw e;Pt(e,t)}function Pt(e,t){for(;t!==null;){if((t.f&Ca)!==0){if((t.f&is)===0)throw e;try{t.b.error(e);return}catch(s){e=s}}t=t.parent}throw e}const ci=-7169;function Ee(e,t){e.f=e.f&ci|t}function Ka(e){(e.f&tt)!==0||e.deps===null?Ee(e,Ae):Ee(e,bt)}function Pr(e){if(e!==null)for(const t of e)(t.f&Oe)===0||(t.f&as)===0||(t.f^=as,Pr(t.deps))}function Lr(e,t,s){(e.f&Me)!==0?t.add(e):(e.f&bt)!==0&&s.add(e),Pr(e.deps),Ee(e,Ae)}let Bs=!1;function di(e){var t=Bs;try{return Bs=!1,[e(),Bs]}finally{Bs=t}}let wa=null,ls=null,J=null,Fa=null,dt=null,Ra=null,zs=!1,xa=!1,ds=null,Ys=null;var nr=0;let fi=1;var vs,Mt,Kt,ps,hs,Ht,_s,jt,Os,Ue,Ds,Ot,ht,_t,gs,Ut,de,Ma,Cs,Oa,Vr,Ir,Xs,ui,Da,cs;const ca=class ca{constructor(){Z(this,de);Ve(this,"id",fi++);Z(this,vs,!1);Ve(this,"linked",!0);Z(this,Mt,null);Z(this,Kt,null);Ve(this,"async_deriveds",new Map);Ve(this,"current",new Map);Ve(this,"previous",new Map);Ve(this,"unblocked",new Set);Z(this,ps,new Set);Z(this,hs,new Set);Z(this,Ht,new Set);Z(this,_s,0);Z(this,jt,new Map);Z(this,Os,null);Z(this,Ue,[]);Z(this,Ds,[]);Z(this,Ot,new Set);Z(this,ht,new Set);Z(this,_t,new Map);Z(this,gs,new Set);Ve(this,"is_fork",!1);Z(this,Ut,!1)}skip_effect(t){g(this,_t).has(t)||g(this,_t).set(t,{d:[],m:[]}),g(this,gs).delete(t)}unskip_effect(t,s=a=>this.schedule(a)){var a=g(this,_t).get(t);if(a){g(this,_t).delete(t);for(var r of a.d)Ee(r,Me),s(r);for(r of a.m)Ee(r,bt),s(r)}g(this,gs).add(t)}capture(t,s,a=!1){t.v!==ze&&!this.previous.has(t)&&this.previous.set(t,t.v),(t.f&Lt)===0&&(this.current.set(t,[s,a]),dt?.set(t,s)),this.is_fork||(t.v=s)}activate(){J=this}deactivate(){J=null,dt=null}flush(){try{xa=!0,J=this,ie(this,de,Cs).call(this)}finally{nr=0,Ra=null,ds=null,Ys=null,xa=!1,J=null,dt=null,Qt.clear()}}discard(){for(const t of g(this,hs))t(this);g(this,hs).clear(),g(this,Ht).clear(),ie(this,de,cs).call(this)}register_created_effect(t){g(this,Ds).push(t)}increment(t,s){if(X(this,_s,g(this,_s)+1),t){let a=g(this,jt).get(s)??0;g(this,jt).set(s,a+1)}}decrement(t,s){if(X(this,_s,g(this,_s)-1),t){let a=g(this,jt).get(s)??0;a===1?g(this,jt).delete(s):g(this,jt).set(s,a-1)}g(this,Ut)||(X(this,Ut,!0),Jt(()=>{X(this,Ut,!1),this.linked&&this.flush()}))}transfer_effects(t,s){for(const a of t)g(this,Ot).add(a);for(const a of s)g(this,ht).add(a);t.clear(),s.clear()}oncommit(t){g(this,ps).add(t)}ondiscard(t){g(this,hs).add(t)}on_fork_commit(t){g(this,Ht).add(t)}run_fork_commit_callbacks(){for(const t of g(this,Ht))t(this);g(this,Ht).clear()}settled(){return(g(this,Os)??X(this,Os,Cr())).promise}static ensure(){var t;if(J===null){const s=J=new ca;ie(t=s,de,Da).call(t),!xa&&!zs&&Jt(()=>{g(s,vs)||s.flush()})}return J}apply(){{dt=null;return}}schedule(t){if(Ra=t,t.b?.is_pending&&(t.f&(bs|va|$r))!==0&&(t.f&is)===0){t.b.defer_effect(t);return}for(var s=t;s.parent!==null;){s=s.parent;var a=s.f;if(ds!==null&&s===se&&(ee===null||(ee.f&Oe)===0))return;if((a&(Vt|vt))!==0){if((a&Ae)===0)return;s.f^=Ae}}g(this,Ue).push(s)}};vs=new WeakMap,Mt=new WeakMap,Kt=new WeakMap,ps=new WeakMap,hs=new WeakMap,Ht=new WeakMap,_s=new WeakMap,jt=new WeakMap,Os=new WeakMap,Ue=new WeakMap,Ds=new WeakMap,Ot=new WeakMap,ht=new WeakMap,_t=new WeakMap,gs=new WeakMap,Ut=new WeakMap,de=new WeakSet,Ma=function(){if(this.is_fork)return!0;for(const a of g(this,jt).keys()){for(var t=a,s=!1;t.parent!==null;){if(g(this,_t).has(t)){s=!0;break}t=t.parent}if(!s)return!0}return!1},Cs=function(){var c,d,_;if(X(this,vs,!0),nr++>1e3&&(ie(this,de,cs).call(this),pi()),!ie(this,de,Ma).call(this)){for(const v of g(this,Ot))g(this,ht).delete(v),Ee(v,Me),this.schedule(v);for(const v of g(this,ht))Ee(v,bt),this.schedule(v)}const t=g(this,Ue);X(this,Ue,[]),this.apply();var s=ds=[],a=[],r=Ys=[];for(const v of t)try{ie(this,de,Oa).call(this,v,s,a)}catch(u){throw Br(v),u}if(J=null,r.length>0){var n=ca.ensure();for(const v of r)n.schedule(v)}if(ds=null,Ys=null,ie(this,de,Ma).call(this)){ie(this,de,Xs).call(this,a),ie(this,de,Xs).call(this,s);for(const[v,u]of g(this,_t))Nr(v,u);r.length>0&&ie(c=J,de,Cs).call(c);return}const l=ie(this,de,Vr).call(this);if(l){ie(d=l,de,Ir).call(d,this);return}g(this,Ot).clear(),g(this,ht).clear();for(const v of g(this,ps))v(this);g(this,ps).clear(),Fa=this,ir(a),ir(s),Fa=null,g(this,Os)?.resolve();var o=J;if(this.linked&&g(this,_s)===0&&ie(this,de,cs).call(this),g(this,Ue).length>0){o===null&&(o=this,ie(this,de,Da).call(this));const v=o;g(v,Ue).push(...g(this,Ue).filter(u=>!g(v,Ue).includes(u)))}o!==null&&ie(_=o,de,Cs).call(_)},Oa=function(t,s,a){t.f^=Ae;for(var r=t.first;r!==null;){var n=r.f,l=(n&(vt|Vt))!==0,o=l&&(n&Ae)!==0,c=o||(n&Le)!==0||g(this,_t).has(r);if(!c&&r.fn!==null){l?r.f^=Ae:(n&bs)!==0?s.push(r):Ns(r)&&((n&ct)!==0&&g(this,ht).add(r),xs(r));var d=r.first;if(d!==null){r=d;continue}}for(;r!==null;){var _=r.next;if(_!==null){r=_;break}r=r.parent}}},Vr=function(){for(var t=g(this,Mt);t!==null;){if(!t.is_fork){for(const[s,[,a]]of this.current)if(t.current.has(s)&&!a)return t}t=g(t,Mt)}return null},Ir=function(t){var a;for(const[r,n]of t.current)!this.previous.has(r)&&t.previous.has(r)&&this.previous.set(r,t.previous.get(r)),this.current.set(r,n);for(const[r,n]of t.async_deriveds){const l=this.async_deriveds.get(r);l&&n.promise.then(l.resolve)}const s=r=>{var n=r.reactions;if(n!==null)for(const c of n){var l=c.f;if((l&Oe)!==0)s(c);else{var o=c;l&(us|ct)&&!this.async_deriveds.has(o)&&(g(this,ht).delete(o),Ee(o,Me),this.schedule(o))}}};for(const r of this.current.keys())s(r);this.oncommit(()=>t.discard()),ie(a=t,de,cs).call(a),J=this,ie(this,de,Cs).call(this)},Xs=function(t){for(var s=0;s!this.current.has(u));if(r.length===0)t&&v.discard();else if(s.length>0){if(t)for(const u of g(this,gs))v.unskip_effect(u,m=>{var b;(m.f&(ct|us))!==0?v.schedule(m):ie(b=v,de,Xs).call(b,[m])});v.activate();var n=new Set,l=new Map;for(var o of s)qr(o,r,n,l);l=new Map;var c=[...v.current.keys()].filter(u=>this.current.has(u)?this.current.get(u)[0]!==u.v:!0);if(c.length>0)for(const u of g(this,Ds))(u.f&(st|Le|ea))===0&&Ha(u,c,l)&&((u.f&(us|ct))!==0?(Ee(u,Me),v.schedule(u)):g(v,Ot).add(u));if(g(v,Ue).length>0&&!g(v,Ut)){v.apply();for(var d of g(v,Ue))ie(_=v,de,Oa).call(_,d,[],[]);X(v,Ue,[])}v.deactivate()}}}},Da=function(){ls===null?wa=ls=this:(X(ls,Kt,this),X(this,Mt,ls)),ls=this},cs=function(){var t=g(this,Mt),s=g(this,Kt);t===null?wa=s:X(t,Kt,s),s===null?ls=t:X(s,Mt,t),this.linked=!1};let rs=ca;function vi(e){var t=zs;zs=!0;try{for(var s;;){if(oi(),J===null)return s;J.flush()}}finally{zs=t}}function pi(){try{Nn()}catch(e){Pt(e,Ra)}}let Et=null;function ir(e){var t=e.length;if(t!==0){for(var s=0;s0)){Qt.clear();for(const r of Et){if((r.f&(st|Le))!==0)continue;const n=[r];let l=r.parent;for(;l!==null;)Et.has(l)&&(Et.delete(l),n.push(l)),l=l.parent;for(let o=n.length-1;o>=0;o--){const c=n[o];(c.f&(st|Le))===0&&xs(c)}}Et.clear()}}Et=null}}function qr(e,t,s,a){if(!s.has(e)&&(s.add(e),e.reactions!==null))for(const r of e.reactions){const n=r.f;(n&Oe)!==0?qr(r,t,s,a):(n&(us|ct))!==0&&(n&Me)===0&&Ha(r,t,a)&&(Ee(r,Me),Ua(r))}}function Ha(e,t,s){const a=s.get(e);if(a!==void 0)return a;if(e.deps!==null)for(const r of e.deps){if(Xt.call(t,r))return!0;if((r.f&Oe)!==0&&Ha(r,t,s))return s.set(r,!0),!0}return s.set(e,!1),!1}function Ua(e){J.schedule(e)}function Nr(e,t){if(!((e.f&vt)!==0&&(e.f&Ae)!==0)){(e.f&Me)!==0?t.d.push(e):(e.f&bt)!==0&&t.m.push(e),Ee(e,Ae);for(var s=e.first;s!==null;)Nr(s,t),s=s.next}}function Br(e){Ee(e,Ae);for(var t=e.first;t!==null;)Br(t),t=t.next}function hi(e){let t=0,s=ns(0),a;return()=>{Ya()&&(i(s),Xa(()=>(t===0&&(a=_a(()=>e(()=>As(s)))),t+=1,()=>{Jt(()=>{t-=1,t===0&&(a?.(),a=void 0,As(s))})})))}}var _i=ss|Ss;function gi(e,t,s,a){new mi(e,t,s,a)}var Ze,Na,Je,Gt,Ie,Qe,Pe,Ge,Tt,Wt,Dt,ms,Ps,Ls,Ct,da,Te,bi,yi,wi,Pa,Zs,Js,La,Va;class mi{constructor(t,s,a,r){Z(this,Te);Ve(this,"parent");Ve(this,"is_pending",!1);Ve(this,"transform_error");Z(this,Ze);Z(this,Na,null);Z(this,Je);Z(this,Gt);Z(this,Ie);Z(this,Qe,null);Z(this,Pe,null);Z(this,Ge,null);Z(this,Tt,null);Z(this,Wt,0);Z(this,Dt,0);Z(this,ms,!1);Z(this,Ps,new Set);Z(this,Ls,new Set);Z(this,Ct,null);Z(this,da,hi(()=>(X(this,Ct,ns(g(this,Wt))),()=>{X(this,Ct,null)})));X(this,Ze,t),X(this,Je,s),X(this,Gt,n=>{var l=se;l.b=this,l.f|=Ca,a(n)}),this.parent=se.b,this.transform_error=r??this.parent?.transform_error??(n=>n),X(this,Ie,ha(()=>{ie(this,Te,Pa).call(this)},_i))}defer_effect(t){Lr(t,g(this,Ps),g(this,Ls))}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!g(this,Je).pending}update_pending_count(t,s){ie(this,Te,La).call(this,t,s),X(this,Wt,g(this,Wt)+t),!(!g(this,Ct)||g(this,ms))&&(X(this,ms,!0),Jt(()=>{X(this,ms,!1),g(this,Ct)&&ws(g(this,Ct),g(this,Wt))}))}get_effect_pending(){return g(this,da).call(this),i(g(this,Ct))}error(t){if(!g(this,Je).onerror&&!g(this,Je).failed)throw t;J?.is_fork?(g(this,Qe)&&J.skip_effect(g(this,Qe)),g(this,Pe)&&J.skip_effect(g(this,Pe)),g(this,Ge)&&J.skip_effect(g(this,Ge)),J.on_fork_commit(()=>{ie(this,Te,Va).call(this,t)})):ie(this,Te,Va).call(this,t)}}Ze=new WeakMap,Na=new WeakMap,Je=new WeakMap,Gt=new WeakMap,Ie=new WeakMap,Qe=new WeakMap,Pe=new WeakMap,Ge=new WeakMap,Tt=new WeakMap,Wt=new WeakMap,Dt=new WeakMap,ms=new WeakMap,Ps=new WeakMap,Ls=new WeakMap,Ct=new WeakMap,da=new WeakMap,Te=new WeakSet,bi=function(){try{X(this,Qe,et(()=>g(this,Gt).call(this,g(this,Ze))))}catch(t){this.error(t)}},yi=function(t){const s=g(this,Je).failed;s&&X(this,Ge,et(()=>{s(g(this,Ze),()=>t,()=>()=>{})}))},wi=function(){const t=g(this,Je).pending;t&&(this.is_pending=!0,X(this,Pe,et(()=>t(g(this,Ze)))),Jt(()=>{var s=X(this,Tt,document.createDocumentFragment()),a=$t();s.append(a),X(this,Qe,ie(this,Te,Js).call(this,()=>et(()=>g(this,Gt).call(this,a)))),g(this,Dt)===0&&(g(this,Ze).before(s),X(this,Tt,null),es(g(this,Pe),()=>{X(this,Pe,null)}),ie(this,Te,Zs).call(this,J))}))},Pa=function(){try{if(this.is_pending=this.has_pending_snippet(),X(this,Dt,0),X(this,Wt,0),X(this,Qe,et(()=>{g(this,Gt).call(this,g(this,Ze))})),g(this,Dt)>0){var t=X(this,Tt,document.createDocumentFragment());Qa(g(this,Qe),t);const s=g(this,Je).pending;X(this,Pe,et(()=>s(g(this,Ze))))}else ie(this,Te,Zs).call(this,J)}catch(s){this.error(s)}},Zs=function(t){this.is_pending=!1,t.transfer_effects(g(this,Ps),g(this,Ls))},Js=function(t){var s=se,a=ee,r=Ye;wt(g(this,Ie)),nt(g(this,Ie)),ys(g(this,Ie).ctx);try{return rs.ensure(),t()}catch(n){return Dr(n),null}finally{wt(s),nt(a),ys(r)}},La=function(t,s){var a;if(!this.has_pending_snippet()){this.parent&&ie(a=this.parent,Te,La).call(a,t,s);return}X(this,Dt,g(this,Dt)+t),g(this,Dt)===0&&(ie(this,Te,Zs).call(this,s),g(this,Pe)&&es(g(this,Pe),()=>{X(this,Pe,null)}),g(this,Tt)&&(g(this,Ze).before(g(this,Tt)),X(this,Tt,null)))},Va=function(t){g(this,Qe)&&(Be(g(this,Qe)),X(this,Qe,null)),g(this,Pe)&&(Be(g(this,Pe)),X(this,Pe,null)),g(this,Ge)&&(Be(g(this,Ge)),X(this,Ge,null));var s=g(this,Je).onerror;let a=g(this,Je).failed;var r=!1,n=!1;const l=()=>{if(r){ii();return}r=!0,n&&Gn(),g(this,Ge)!==null&&es(g(this,Ge),()=>{X(this,Ge,null)}),ie(this,Te,Js).call(this,()=>{ie(this,Te,Pa).call(this)})},o=c=>{try{n=!0,s?.(c,l),n=!1}catch(d){Pt(d,g(this,Ie)&&g(this,Ie).parent)}a&&X(this,Ge,ie(this,Te,Js).call(this,()=>{try{return et(()=>{var d=se;d.b=this,d.f|=Ca,a(g(this,Ze),()=>c,()=>l)})}catch(d){return Pt(d,g(this,Ie).parent),null}}))};Jt(()=>{var c;try{c=this.transform_error(t)}catch(d){Pt(d,g(this,Ie)&&g(this,Ie).parent);return}c!==null&&typeof c=="object"&&typeof c.then=="function"?c.then(o,d=>Pt(d,g(this,Ie)&&g(this,Ie).parent)):o(c)})};function xi(e,t,s,a){const r=Rs;var n=e.filter(u=>!u.settled);if(s.length===0&&n.length===0){a(t.map(r));return}var l=se,o=ki(),c=n.length===1?n[0].promise:n.length>1?Promise.all(n.map(u=>u.promise)):null;function d(u){if((l.f&st)===0){o();try{a(u)}catch(m){Pt(m,l)}sa()}}var _=Kr();if(s.length===0){c.then(()=>d(t.map(r))).finally(_);return}function v(){Promise.all(s.map(u=>Si(u))).then(u=>d([...t.map(r),...u])).catch(u=>Pt(u,l)).finally(_)}c?c.then(()=>{o(),v(),sa()}):v()}function ki(){var e=se,t=ee,s=Ye,a=J;return function(n=!0){wt(e),nt(t),ys(s),n&&(e.f&st)===0&&(a?.activate(),a?.apply())}}function sa(e=!0){wt(null),nt(null),ys(null),e&&J?.deactivate()}function Kr(){var e=se,t=e.b,s=J,a=t.is_rendered();return t.update_pending_count(1,s),s.increment(a,e),()=>{t.update_pending_count(-1,s),s.decrement(a,e)}}function Rs(e){var t=Oe|Me;return se!==null&&(se.f|=Ss),{ctx:Ye,deps:null,effects:null,equals:Fr,f:t,fn:e,reactions:null,rv:0,v:ze,wv:0,parent:se,ac:null}}const Ks=Symbol("obsolete");function Si(e,t,s){let a=se;a===null&&Pn();var r=void 0,n=ns(ze),l=!ee,o=new Set;return Pi(()=>{var c=se,d=Cr();r=d.promise;try{Promise.resolve(e()).then(d.resolve,m=>{m!==pa&&d.reject(m)}).finally(sa)}catch(m){d.reject(m),sa()}var _=J;if(l){if((c.f&is)!==0)var v=Kr();if(a.b.is_rendered())_.async_deriveds.get(c)?.reject(Ks);else for(const m of o.values())m.reject(Ks);o.add(d),_.async_deriveds.set(c,d)}const u=(m,b=void 0)=>{v?.(),o.delete(d),b!==Ks&&(_.activate(),b?(n.f|=Lt,ws(n,b)):((n.f&Lt)!==0&&(n.f^=Lt),ws(n,m)),_.deactivate())};d.promise.then(u,m=>u(null,m||"unknown"))}),tn(()=>{for(const c of o)c.reject(Ks)}),new Promise(c=>{function d(_){function v(){_===r?c(n):d(r)}_.then(v,v)}d(r)})}function j(e){const t=Rs(e);return dn(t),t}function Hr(e){const t=Rs(e);return t.equals=Rr,t}function Ei(e){var t=e.effects;if(t!==null){e.effects=null;for(var s=0;s0&&!Wr&&Ci()}return t}function Ci(){Wr=!1;for(const e of aa){(e.f&Ae)!==0&&Ee(e,bt);let t;try{t=Ns(e)}catch{t=!0}t&&xs(e)}aa.clear()}function As(e){K(e,e.v+1)}function Yr(e,t,s){var a=e.reactions;if(a!==null)for(var r=a.length,n=0;n{if(ts===n)return o();var c=ee,d=ts;nt(null),fr(n);var _=o();return nt(c),fr(d),_};return a&&s.set("length",te(e.length)),new Proxy(e,{defineProperty(o,c,d){(!("value"in d)||d.configurable===!1||d.enumerable===!1||d.writable===!1)&&Kn();var _=s.get(c);return _===void 0?l(()=>{var v=te(d.value);return s.set(c,v),v}):K(_,d.value,!0),!0},deleteProperty(o,c){var d=s.get(c);if(d===void 0){if(c in o){const _=l(()=>te(ze));s.set(c,_),As(r)}}else K(d,ze),As(r);return!0},get(o,c,d){if(c===Zt)return e;var _=s.get(c),v=c in o;if(_===void 0&&(!v||fs(o,c)?.writable)&&(_=l(()=>{var m=Ne(v?o[c]:ze),b=te(m);return b}),s.set(c,_)),_!==void 0){var u=i(_);return u===ze?void 0:u}return Reflect.get(o,c,d)},getOwnPropertyDescriptor(o,c){var d=Reflect.getOwnPropertyDescriptor(o,c);if(d&&"value"in d){var _=s.get(c);_&&(d.value=i(_))}else if(d===void 0){var v=s.get(c),u=v?.v;if(v!==void 0&&u!==ze)return{enumerable:!0,configurable:!0,value:u,writable:!0}}return d},has(o,c){if(c===Zt)return!0;var d=s.get(c),_=d!==void 0&&d.v!==ze||Reflect.has(o,c);if(d!==void 0||se!==null&&(!_||fs(o,c)?.writable)){d===void 0&&(d=l(()=>{var u=_?Ne(o[c]):ze,m=te(u);return m}),s.set(c,d));var v=i(d);if(v===ze)return!1}return _},set(o,c,d,_){var v=s.get(c),u=c in o;if(a&&c==="length")for(var m=d;mte(ze)),s.set(m+"",b))}if(v===void 0)(!u||fs(o,c)?.writable)&&(v=l(()=>te(void 0)),K(v,Ne(d)),s.set(c,v));else{u=v.v!==ze;var w=l(()=>Ne(d));K(v,w)}var h=Reflect.getOwnPropertyDescriptor(o,c);if(h?.set&&h.set.call(_,d),!u){if(a&&typeof c=="string"){var y=s.get("length"),S=Number(c);Number.isInteger(S)&&S>=y.v&&K(y,S+1)}As(r)}return!0},ownKeys(o){i(r);var c=Reflect.ownKeys(o).filter(v=>{var u=s.get(v);return u===void 0||u.v!==ze});for(var[d,_]of s)_.v!==ze&&!(d in o)&&c.push(d);return c},setPrototypeOf(){Hn()}})}function lr(e){try{if(e!==null&&typeof e=="object"&&Zt in e)return e[Zt]}catch{}return e}function $i(e,t){return Object.is(lr(e),lr(t))}var or,Xr,Zr,Jr;function zi(){if(or===void 0){or=window,Xr=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,s=Text.prototype;Zr=fs(t,"firstChild").get,Jr=fs(t,"nextSibling").get,rr(e)&&(e[za]=void 0,e[Gs]=null,e[Aa]=void 0,e.__e=void 0),rr(s)&&(s[Ts]=void 0)}}function $t(e=""){return document.createTextNode(e)}function ra(e){return Zr.call(e)}function qs(e){return Jr.call(e)}function f(e,t){return ra(e)}function yt(e,t=!1){{var s=ra(e);return s instanceof Comment&&s.data===""?qs(s):s}}function p(e,t=1,s=!1){let a=e;for(;t--;)a=qs(a);return a}function Ai(e){e.textContent=""}function Qr(){return!1}function Fi(e,t,s){return document.createElementNS(Ar,e,void 0)}let cr=!1;function Ri(){cr||(cr=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(const t of e.target.elements)t[Ws]?.()})},{capture:!0}))}function Wa(e){var t=ee,s=se;nt(null),wt(null);try{return e()}finally{nt(t),wt(s)}}function en(e,t,s,a=s){e.addEventListener(t,()=>Wa(s));const r=e[Ws];r?e[Ws]=()=>{r(),a(!0)}:e[Ws]=()=>a(!0),Ri()}function Mi(e){se===null&&(ee===null&&qn(),In()),At&&Vn()}function Oi(e,t){var s=t.last;s===null?t.last=t.first=e:(s.next=e,e.prev=s,t.last=e)}function Ft(e,t){var s=se;s!==null&&(s.f&Le)!==0&&(e|=Le);var a={ctx:Ye,deps:null,nodes:null,f:e|Me|tt,first:null,fn:t,last:null,next:null,parent:s,b:s&&s.b,prev:null,teardown:null,wv:0,ac:null};J?.register_created_effect(a);var r=a;if((e&bs)!==0)ds!==null?ds.push(a):rs.ensure().schedule(a);else if(t!==null){try{xs(a)}catch(l){throw Be(a),l}r.deps===null&&r.teardown===null&&r.nodes===null&&r.first===r.last&&(r.f&Ss)===0&&(r=r.first,(e&ct)!==0&&(e&ss)!==0&&r!==null&&(r.f|=ss))}if(r!==null&&(r.parent=s,s!==null&&Oi(r,s),ee!==null&&(ee.f&Oe)!==0&&(e&Vt)===0)){var n=ee;(n.effects??(n.effects=[])).push(r)}return a}function Ya(){return ee!==null&&!ft}function tn(e){const t=Ft(va,null);return Ee(t,Ae),t.teardown=e,t}function sn(e){Mi();var t=se.f,s=!ee&&(t&vt)!==0&&(t&is)===0;if(s){var a=Ye;(a.e??(a.e=[])).push(e)}else return an(e)}function an(e){return Ft(bs|Rn,e)}function Di(e){rs.ensure();const t=Ft(Vt|Ss,e);return(s={})=>new Promise(a=>{s.outro?es(t,()=>{Be(t),a(void 0)}):(Be(t),a(void 0))})}function rn(e){return Ft(bs,e)}function Pi(e){return Ft(us|Ss,e)}function Xa(e,t=0){return Ft(va|t,e)}function q(e,t=[],s=[],a=[]){xi(a,t,s,r=>{Ft(va,()=>e(...r.map(i)))})}function ha(e,t=0){var s=Ft(ct|t,e);return s}function et(e){return Ft(vt|Ss,e)}function nn(e){var t=e.teardown;if(t!==null){const s=At,a=ee;dr(!0),nt(null);try{t.call(null)}finally{dr(s),nt(a)}}}function Za(e,t=!1){var s=e.first;for(e.first=e.last=null;s!==null;){const r=s.ac;r!==null&&Wa(()=>{r.abort(pa)});var a=s.next;(s.f&Vt)!==0?s.parent=null:Be(s,t),s=a}}function Li(e){for(var t=e.first;t!==null;){var s=t.next;(t.f&vt)===0&&Be(t),t=s}}function Be(e,t=!0){var s=!1;(t||(e.f&Fn)!==0)&&e.nodes!==null&&e.nodes.end!==null&&(Vi(e.nodes.start,e.nodes.end),s=!0),Ee(e,$a),Za(e,t&&!s),Ms(e,0);var a=e.nodes&&e.nodes.t;if(a!==null)for(const n of a)n.stop();nn(e),e.f^=$a,e.f|=st;var r=e.parent;r!==null&&r.first!==null&&ln(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function Vi(e,t){for(;e!==null;){var s=e===t?null:qs(e);e.remove(),e=s}}function ln(e){var t=e.parent,s=e.prev,a=e.next;s!==null&&(s.next=a),a!==null&&(a.prev=s),t!==null&&(t.first===e&&(t.first=a),t.last===e&&(t.last=s))}function es(e,t,s=!0){var a=[];on(e,a,!0);var r=()=>{s&&Be(e),t&&t()},n=a.length;if(n>0){var l=()=>--n||r();for(var o of a)o.out(l)}else r()}function on(e,t,s){if((e.f&Le)===0){e.f^=Le;var a=e.nodes&&e.nodes.t;if(a!==null)for(const o of a)(o.is_global||s)&&t.push(o);for(var r=e.first;r!==null;){var n=r.next;if((r.f&Vt)===0){var l=(r.f&ss)!==0||(r.f&vt)!==0&&(e.f&ct)!==0;on(r,t,l?s:!1)}r=n}}}function Ja(e){cn(e,!0)}function cn(e,t){if((e.f&Le)!==0){e.f^=Le,(e.f&Ae)===0&&(Ee(e,Me),rs.ensure().schedule(e));for(var s=e.first;s!==null;){var a=s.next,r=(s.f&ss)!==0||(s.f&vt)!==0;cn(s,r?t:!1),s=a}var n=e.nodes&&e.nodes.t;if(n!==null)for(const l of n)(l.is_global||t)&&l.in()}}function Qa(e,t){if(e.nodes)for(var s=e.nodes.start,a=e.nodes.end;s!==null;){var r=s===a?null:qs(s);t.append(s),s=r}}let Qs=!1,At=!1;function dr(e){At=e}let ee=null,ft=!1;function nt(e){ee=e}let se=null;function wt(e){se=e}let at=null;function dn(e){ee!==null&&(at===null?at=[e]:at.push(e))}let qe=null,He=0,Xe=null;function Ii(e){Xe=e}let fn=1,Nt=0,ts=Nt;function fr(e){ts=e}function un(){return++fn}function Ns(e){var t=e.f;if((t&Me)!==0)return!0;if(t&Oe&&(e.f&=~as),(t&bt)!==0){for(var s=e.deps,a=s.length,r=0;re.wv)return!0}(t&tt)!==0&&dt===null&&Ee(e,Ae)}return!1}function vn(e,t,s=!0){var a=e.reactions;if(a!==null&&!(at!==null&&Xt.call(at,e)))for(var r=0;r{e.ac.abort(pa)}),e.ac=null);try{e.f|=ta;var _=e.fn,v=_();e.f|=is;var u=e.deps,m=J?.is_fork;if(qe!==null){var b;if(m||Ms(e,He),u!==null&&He>0)for(u.length=He+qe.length,b=0;b{throw h});throw u}}finally{e[Bt]=t,delete e.currentTarget,nt(_),wt(v)}}}const Hi=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:e=>e});function Ui(e){return Hi?.createHTML(e)??e}function Gi(e){var t=Fi("template");return t.innerHTML=Ui(e.replaceAll("","")),t.content}function na(e,t){var s=se;s.nodes===null&&(s.nodes={start:e,end:t,a:null,t:null})}function F(e,t){var s=(t&si)!==0,a=(t&ai)!==0,r,n=!e.startsWith("");return()=>{r===void 0&&(r=Gi(n?e:""+e),s||(r=ra(r)));var l=a||Xr?document.importNode(r,!0):r.cloneNode(!0);if(s){var o=ra(l),c=l.lastChild;na(o,c)}else na(l,l);return l}}function Wi(e=""){{var t=$t(e+"");return na(t,t),t}}function pr(){var e=document.createDocumentFragment(),t=document.createComment(""),s=$t();return e.append(t,s),na(t,s),e}function z(e,t){e!==null&&e.before(t)}function A(e,t){var s=t==null?"":typeof t=="object"?`${t}`:t;s!==(e[Ts]??(e[Ts]=e.nodeValue))&&(e[Ts]=s,e.nodeValue=`${s}`)}function Yi(e,t){return Xi(e,t)}const Hs=new Map;function Xi(e,{target:t,anchor:s,props:a={},events:r,context:n,intro:l=!0,transformError:o}){zi();var c=void 0,d=Di(()=>{var _=s??t.appendChild($t());gi(_,{pending:()=>{}},m=>{xe({});var b=Ye;n&&(b.c=n),r&&(a.$$events=r),c=e(m,a)||{},ke()},o);var v=new Set,u=m=>{for(var b=0;b{for(var m of v)for(const h of[t,document]){var b=Hs.get(h),w=b.get(m);--w==0?(h.removeEventListener(m,vr),b.delete(m),b.size===0&&Hs.delete(h)):b.set(m,w)}Ia.delete(u),_!==s&&_.parentNode?.removeChild(_)}});return Zi.set(c,d),c}let Zi=new WeakMap;var lt,gt,We,Yt,Vs,Is,fa;class mn{constructor(t,s=!0){Ve(this,"anchor");Z(this,lt,new Map);Z(this,gt,new Map);Z(this,We,new Map);Z(this,Yt,new Set);Z(this,Vs,!0);Z(this,Is,t=>{if(g(this,lt).has(t)){var s=g(this,lt).get(t),a=g(this,gt).get(s);if(a)Ja(a),g(this,Yt).delete(s);else{var r=g(this,We).get(s);r&&(g(this,gt).set(s,r.effect),g(this,We).delete(s),r.fragment.lastChild.remove(),this.anchor.before(r.fragment),a=r.effect)}for(const[n,l]of g(this,lt)){if(g(this,lt).delete(n),n===t)break;const o=g(this,We).get(l);o&&(Be(o.effect),g(this,We).delete(l))}for(const[n,l]of g(this,gt)){if(n===s||g(this,Yt).has(n))continue;const o=()=>{if(Array.from(g(this,lt).values()).includes(n)){var d=document.createDocumentFragment();Qa(l,d),d.append($t()),g(this,We).set(n,{effect:l,fragment:d})}else Be(l);g(this,Yt).delete(n),g(this,gt).delete(n)};g(this,Vs)||!a?(g(this,Yt).add(n),es(l,o,!1)):o()}}});Z(this,fa,t=>{g(this,lt).delete(t);const s=Array.from(g(this,lt).values());for(const[a,r]of g(this,We))s.includes(a)||(Be(r.effect),g(this,We).delete(a))});this.anchor=t,X(this,Vs,s)}ensure(t,s){var a=J,r=Qr();if(s&&!g(this,gt).has(t)&&!g(this,We).has(t))if(r){var n=document.createDocumentFragment(),l=$t();n.append(l),g(this,We).set(t,{effect:et(()=>s(l)),fragment:n})}else g(this,gt).set(t,et(()=>s(this.anchor)));if(g(this,lt).set(a,t),r){for(const[o,c]of g(this,gt))o===t?a.unskip_effect(c):a.skip_effect(c);for(const[o,c]of g(this,We))o===t?a.unskip_effect(c.effect):a.skip_effect(c.effect);a.oncommit(g(this,Is)),a.ondiscard(g(this,fa))}else g(this,Is).call(this,a)}}lt=new WeakMap,gt=new WeakMap,We=new WeakMap,Yt=new WeakMap,Vs=new WeakMap,Is=new WeakMap,fa=new WeakMap;function fe(e,t,s=!1){var a=new mn(e),r=s?ss:0;function n(l,o){a.ensure(l,o)}ha(()=>{var l=!1;t((o,c=0)=>{l=!0,n(c,o)}),l||n(-1,null)},r)}function Es(e,t){return t}function Ji(e,t,s){for(var a=[],r=t.length,n,l=t.length,o=0;o{if(n){if(n.pending.delete(v),n.done.add(v),n.pending.size===0){var u=e.outrogroups;qa(e,ua(n.done)),u.delete(n),u.size===0&&(e.outrogroups=null)}}else l-=1},!1)}if(l===0){var c=a.length===0&&s!==null;if(c){var d=s,_=d.parentNode;Ai(_),_.append(d),e.items.clear()}qa(e,t,!c)}else n={pending:new Set(t),done:new Set},(e.outrogroups??(e.outrogroups=new Set)).add(n)}function qa(e,t,s=!0){var a;if(e.pending.size>0){a=new Set;for(const l of e.pending.values())for(const o of l)a.add(e.items.get(o).e)}for(var r=0;r{var C=s();return Ba(C)?C:C==null?[]:ua(C)}),u,m=new Map,b=!0;function w(C){(S.effect.f&st)===0&&(S.pending.delete(C),S.fallback=_,Qi(S,u,l,t,a),_!==null&&(u.length===0?(_.f&mt)===0?Ja(_):(_.f^=mt,$s(_,null,l)):es(_,()=>{_=null})))}function h(C){S.pending.delete(C)}var y=ha(()=>{u=i(v);for(var C=u.length,R=new Set,B=J,E=Qr(),$=0;$n(l)):(_=et(()=>n(hr??(hr=$t()))),_.f|=mt)),C>R.size&&Ln(),!b)if(m.set(B,R),E){for(const[D,x]of o)R.has(D)||B.skip_effect(x.e);B.oncommit(w),B.ondiscard(h)}else w(B);i(v)}),S={effect:y,items:o,pending:m,outrogroups:null,fallback:_};b=!1}function js(e){for(;e!==null&&(e.f&vt)===0;)e=e.next;return e}function Qi(e,t,s,a,r){var n=(a&Xn)!==0,l=t.length,o=e.items,c=js(e.effect.first),d,_=null,v,u=[],m=[],b,w,h,y;if(n)for(y=0;y0){var L=(a&zr)!==0&&l===0?s:null;if(n){for(y=0;y{if(v!==void 0)for(h of v)h.nodes?.a?.apply()})}function el(e,t,s,a,r,n,l,o){var c=(l&Wn)!==0?(l&Zn)===0?Ti(s,!1,!1):ns(s):null,d=(l&Yn)!==0?ns(r):null;return{v:c,i:d,e:et(()=>(n(t,c??s,d??r,o),()=>{e.delete(a)}))}}function $s(e,t,s){if(e.nodes)for(var a=e.nodes.start,r=e.nodes.end,n=t&&(t.f&mt)===0?t.nodes.start:s;a!==null;){var l=qs(a);if(n.before(a),a===r)return;a=l}}function Rt(e,t,s){t===null?e.effect.first=s:t.next=s,s===null?e.effect.last=t:s.prev=t}function bn(e,t,...s){var a=new mn(e);ha(()=>{const r=t()??null;a.ensure(r,r&&(n=>r(n,...s)))},ss)}const _r=[...` -\r\f \v\uFEFF`];function tl(e,t,s){var a=e==null?"":""+e;if(s){for(var r of Object.keys(s))if(s[r])a=a?a+" "+r:r;else if(a.length)for(var n=r.length,l=0;(l=a.indexOf(r,l))>=0;){var o=l+n;(l===0||_r.includes(a[l-1]))&&(o===a.length||_r.includes(a[o]))?a=(l===0?"":a.substring(0,l))+a.substring(o+1):l=o}}return a===""?null:a}function gr(e,t=!1){var s=t?" !important;":";",a="";for(var r of Object.keys(e)){var n=e[r];n!=null&&n!==""&&(a+=" "+r+": "+n+s)}return a}function ka(e){return e[0]!=="-"||e[1]!=="-"?e.toLowerCase():e}function sl(e,t){if(t){var s="",a,r;if(Array.isArray(t)?(a=t[0],r=t[1]):a=t,e){e=String(e).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var n=!1,l=0,o=!1,c=[];a&&c.push(...Object.keys(a).map(ka)),r&&c.push(...Object.keys(r).map(ka));var d=0,_=-1;const w=e.length;for(var v=0;v{er(e,e.__value)});t.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),tn(()=>{t.disconnect()})}function ia(e,t,s=t){var a=new WeakSet,r=!0;en(e,"change",n=>{var l=n?"[selected]":":checked",o;if(e.multiple)o=[].map.call(e.querySelectorAll(l),Fs);else{var c=e.querySelector(l)??e.querySelector("option:not([disabled])");o=c&&Fs(c)}s(o),e.__value=o,J!==null&&a.add(J)}),rn(()=>{var n=t();if(e===document.activeElement){var l=J;if(a.has(l))return}if(er(e,n,r),r&&n===void 0){var o=e.querySelector(":checked");o!==null&&(n=Fs(o),s(n))}e.__value=n,r=!1}),yn(e)}function Fs(e){return"__value"in e?e.__value:e.value}const al=Symbol("is custom element"),rl=Symbol("is html"),nl=Dn?"progress":"PROGRESS";function la(e,t){var s=wn(e);s.value===(s.value=t??void 0)||e.value===t&&(t!==0||e.nodeName!==nl)||(e.value=t??"")}function Q(e,t,s,a){var r=wn(e);r[t]!==(r[t]=s)&&(t==="loading"&&(e[On]=s),s==null?e.removeAttribute(t):typeof s!="string"&&il(e).includes(t)?e[t]=s:e.setAttribute(t,s))}function wn(e){return e[Gs]??(e[Gs]={[al]:e.nodeName.includes("-"),[rl]:e.namespaceURI===Ar})}var mr=new Map;function il(e){var t=e.getAttribute("is")||e.nodeName,s=mr.get(t);if(s)return s;mr.set(t,s=[]);for(var a,r=e,n=Element.prototype;n!==r;){a=Cn(r);for(var l in a)a[l].set&&l!=="innerHTML"&&l!=="textContent"&&l!=="innerText"&&s.push(l);r=jr(r)}return s}function zt(e,t,s=t){var a=new WeakSet;en(e,"input",async r=>{var n=r?e.defaultValue:e.value;if(n=Ea(e)?ja(n):n,s(n),J!==null&&a.add(J),await Ni(),n!==(n=t())){var l=e.selectionStart,o=e.selectionEnd,c=e.value.length;if(e.value=n??"",o!==null){var d=e.value.length;l===o&&o===c&&d>c?(e.selectionStart=d,e.selectionEnd=d):(e.selectionStart=l,e.selectionEnd=Math.min(o,d))}}}),_a(t)==null&&e.value&&(s(Ea(e)?ja(e.value):e.value),J!==null&&a.add(J)),Xa(()=>{var r=t();if(e===document.activeElement){var n=J;if(a.has(n))return}Ea(e)&&r===ja(e.value)||e.type==="date"&&!r&&!e.value||r!==e.value&&(e.value=r??"")})}function Ea(e){var t=e.type;return t==="number"||t==="range"}function ja(e){return e===""?null:+e}function Ta(e,t){return e===t||e?.[Zt]===t}function ll(e={},t,s,a){var r=Ye.r,n=se;return rn(()=>{var l,o;return Xa(()=>{l=o,o=[],_a(()=>{Ta(s(...o),e)||(t(e,...o),l&&Ta(s(...l),e)&&t(null,...l))})}),()=>{let c=n;for(;c!==r&&c.parent!==null&&c.parent.f&$a;)c=c.parent;const d=()=>{o&&Ta(s(...o),e)&&t(null,...o)},_=c.teardown;c.teardown=()=>{d(),_?.()}}}),e}function _e(e,t,s,a){var r=!0,n=(s&ei)!==0,l=(s&ti)!==0,o=a,c=!0,d=void 0,_=()=>l&&r?(d??(d=Rs(a)),i(d)):(c&&(c=!1,o=l?_a(a):a),o);let v;if(n){var u=Zt in e||Mn in e;v=fs(e,t)?.set??(u&&t in e?R=>e[t]=R:void 0)}var m,b=!1;n?[m,b]=di(()=>e[t]):m=e[t],m===void 0&&a!==void 0&&(m=_(),v&&(Bn(),v(m)));var w;if(w=()=>{var R=e[t];return R===void 0?_():(c=!0,R)},(s&Qn)===0)return w;if(v){var h=e.$$legacy;return(function(R,B){return arguments.length>0?((!B||h||b)&&v(B?w():R),R):w()})}var y=!1,S=((s&Jn)!==0?Rs:Hr)(()=>(y=!1,w()));n&&i(S);var C=se;return(function(R,B){if(arguments.length>0){const E=B?i(S):n?Ne(R):R;return K(S,E),y=!0,o!==void 0&&(o=E),R}return At&&y||(C.f&st)!==0?S.v:i(S)})}const ol="5";var Er;typeof window<"u"&&((Er=window.__svelte??(window.__svelte={})).v??(Er.v=new Set)).add(ol);const It=typeof window<"u"&&window.slashedBricksApp?window.slashedBricksApp:{defaults:{},settings:{},tabs:{},rest:{url:"",nonce:""}},re={defaults:It.defaults||{},tabs:It.tabs||{},rest:It.rest||{url:"",nonce:""},inventory:It.inventory||{variables:[],sf_classes:[],is_classes:[]},pluginSettings:It.pluginSettings||{},versions:It.versions||{plugin:"",framework:""}},H=Ne(structuredClone(It.settings||{})),W=Ne({activeTab:cl(re.tabs)||"colors",dirty:!1,saving:!1,lastSavedAt:null,error:""});function cl(e){for(const t in e)return t;return null}function tr(){W.dirty=!0,W.error=""}function br(e){H[e]&&delete H[e]}function dl(e,t){const s=H[e];if(!s)return"";const a=s[t];return a==null?"":String(a)}function ks(e,t,s){H[e]||(H[e]={}),s===""||s===null||s===void 0||typeof s=="string"&&s.trim()===""?delete H[e][t]:H[e][t]=String(s),tr()}var fl=F(''),ul=F('');function vl(e,t){xe(t,!0);var s=ul();ne(s,21,()=>Object.entries(re.tabs),([a,r])=>a,(a,r)=>{var n=j(()=>ot(i(r),2));let l=()=>i(n)[0],o=()=>i(n)[1];var c=fl();let d;var _=f(c);q(()=>{d=rt(c,1,"tab-nav__btn svelte-yyiz68",null,d,{active:W.activeTab===l()}),A(_,o())}),he("click",c,()=>W.activeTab=l()),z(a,c)}),z(e,s),ke()}De(["click"]);var pl=F(' '),hl=F(' ',1),_l=F(''),gl=F('
');function Us(e,t){xe(t,!0);let s=_e(t,"hexHint",3,""),a=_e(t,"rawHint",3,""),r=_e(t,"cssVar",3,"");const n=/^#([0-9a-fA-F]{3,4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/,l=(()=>{const D=(H.colors?.[t.storeKey]??"").trim(),x=D===""||n.test(D);return{mode:x?"hex":"raw",hex:x?D:"",raw:x?"":D}})();let o=te(Ne(l.mode)),c=te(Ne(l.hex)),d=te(Ne(l.raw));function _(){H.colors||(H.colors={});const D=i(d).trim(),x=i(c).trim(),k=i(o)==="raw"?D:x;k===""?delete H.colors[t.storeKey]:H.colors[t.storeKey]=k,tr()}function v(){i(o)==="hex"?(K(o,"raw"),K(c,"")):(K(o,"hex"),K(d,"")),_()}const u=j(()=>(i(o)==="raw"?i(d):i(c))||s()||"transparent");var m=gl(),b=f(m),w=f(b),h=f(w),y=p(w,2);{var S=D=>{var x=pl(),k=f(x);q(()=>A(k,r())),z(D,x)};fe(y,D=>{r()&&D(S)})}var C=p(b,2),R=f(C);let B;var E=p(R,2);{var $=D=>{var x=hl(),k=yt(x),P=p(k,2);q(()=>{Q(k,"id",t.storeKey),Q(P,"placeholder",s())}),he("input",k,_),zt(k,()=>i(c),M=>K(c,M)),he("input",P,_),zt(P,()=>i(c),M=>K(c,M)),z(D,x)},O=D=>{var x=_l();q(()=>{Q(x,"id",t.storeKey),Q(x,"placeholder",a())}),he("input",x,_),zt(x,()=>i(d),k=>K(d,k)),z(D,x)};fe(E,D=>{i(o)==="hex"?D($):D(O,-1)})}var L=p(E,2),T=f(L);q(()=>{Q(w,"for",t.storeKey),A(h,t.label),B=ve(R,"",B,{background:i(u)}),A(T,i(o)==="hex"?"Advanced (oklch / raw)":"Use HEX picker")}),he("click",L,v),z(e,m),ke()}De(["input","click"]);var ml=F('
'),bl=F('
');function ga(e,t){xe(t,!0);let s=te(!1);const a=`adv-body-${Math.random().toString(36).slice(2,9)}`;var r=bl(),n=f(r),l=p(f(n));let o;var c=f(l),d=p(n,2);{var _=v=>{var u=ml(),m=f(u);bn(m,()=>t.children),q(()=>Q(u,"id",a)),z(v,u)};fe(d,v=>{i(s)&&v(_)})}q(()=>{Q(n,"aria-expanded",i(s)),Q(n,"aria-controls",a),o=rt(l,1,"advanced-section__arrow",null,o,{open:i(s)}),A(c,i(s)?"▲":"▼")}),he("click",n,()=>K(s,!i(s))),z(e,r),ke()}De(["click"]);var yl=F('

Brand Colors — Dark Mode

Status Colors — Dark Mode

',1),wl=F(`

Status Colors — Light Mode

The framework auto-derives dark mode from light source colors using CSS relative color syntax +var Sn=Object.defineProperty;var rr=e=>{throw TypeError(e)};var En=(e,t,s)=>t in e?Sn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s;var Ve=(e,t,s)=>En(e,typeof t!="symbol"?t+"":t,s),wa=(e,t,s)=>t.has(e)||rr("Cannot "+s);var g=(e,t,s)=>(wa(e,t,"read from private field"),s?s.call(e):t.get(e)),Z=(e,t,s)=>t.has(e)?rr("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,s),X=(e,t,s,a)=>(wa(e,t,"write to private field"),a?a.call(e,s):t.set(e,s),s),le=(e,t,s)=>(wa(e,t,"access private method"),s);var Ka=Array.isArray,jn=Array.prototype.indexOf,Xt=Array.prototype.includes,va=Array.from,Tn=Object.defineProperty,us=Object.getOwnPropertyDescriptor,$n=Object.getOwnPropertyDescriptors,Cn=Object.prototype,zn=Array.prototype,Tr=Object.getPrototypeOf,nr=Object.isExtensible;const $r=()=>{};function An(e){for(var t=0;t{e=a,t=r});return{promise:s,resolve:e,reject:t}}function ot(e,t){if(Array.isArray(e))return e;if(t===void 0||!(Symbol.iterator in e))return Array.from(e);const s=[];for(const a of e)if(s.push(a),s.length===t)break;return s}const Oe=2,ys=4,pa=8,zr=1<<24,ct=16,vt=32,Vt=64,Ca=128,tt=512,Fe=1024,Me=2048,bt=4096,Le=8192,st=16384,is=32768,za=1<<25,ss=65536,ta=1<<17,Fn=1<<18,Es=1<<19,Rn=1<<20,mt=1<<25,as=65536,sa=1<<21,vs=1<<22,Lt=1<<23,Zt=Symbol("$state"),Mn=Symbol("legacy props"),On=Symbol(""),Ws=Symbol("attributes"),Aa=Symbol("class"),Fa=Symbol("style"),$s=Symbol("text"),Ys=Symbol("form reset"),ha=new class extends Error{constructor(){super(...arguments);Ve(this,"name","StaleReactionError");Ve(this,"message","The reaction that called `getAbortSignal()` was re-run or destroyed")}},Dn=!!globalThis.document?.contentType&&globalThis.document.contentType.includes("xml");function Pn(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function Ln(e,t,s){throw new Error("https://svelte.dev/e/each_key_duplicate")}function Vn(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function In(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function qn(e){throw new Error("https://svelte.dev/e/effect_orphan")}function Nn(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function Bn(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function Kn(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Hn(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Un(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function Gn(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}const Wn=1,Yn=2,Ar=4,Xn=8,Zn=16,Jn=1,Qn=4,ei=8,ti=16,si=1,ai=2,Ae=Symbol("uninitialized"),Fr="http://www.w3.org/1999/xhtml";function ri(){console.warn("https://svelte.dev/e/derived_inert")}function ni(){console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function ii(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}function Rr(e){return e===this.v}function li(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function Mr(e){return!li(e,this.v)}let Ye=null;function ws(e){Ye=e}function ke(e,t=!1,s){Ye={p:Ye,i:!1,c:null,e:null,s:e,x:null,r:se,l:null}}function Se(e){var t=Ye,s=t.e;if(s!==null){t.e=null;for(var a of s)rn(a)}return t.i=!0,Ye=t.p,{}}function Or(){return!0}let qt=[];function Dr(){var e=qt;qt=[],An(e)}function Jt(e){if(qt.length===0&&!As){var t=qt;queueMicrotask(()=>{t===qt&&Dr()})}qt.push(e)}function oi(){for(;qt.length>0;)Dr()}function Pr(e){var t=se;if(t===null)return ee.f|=Lt,e;if((t.f&is)===0&&(t.f&ys)===0)throw e;Pt(e,t)}function Pt(e,t){for(;t!==null;){if((t.f&Ca)!==0){if((t.f&is)===0)throw e;try{t.b.error(e);return}catch(s){e=s}}t=t.parent}throw e}const ci=-7169;function je(e,t){e.f=e.f&ci|t}function Ha(e){(e.f&tt)!==0||e.deps===null?je(e,Fe):je(e,bt)}function Lr(e){if(e!==null)for(const t of e)(t.f&Oe)===0||(t.f&as)===0||(t.f^=as,Lr(t.deps))}function Vr(e,t,s){(e.f&Me)!==0?t.add(e):(e.f&bt)!==0&&s.add(e),Lr(e.deps),je(e,Fe)}let Ks=!1;function di(e){var t=Ks;try{return Ks=!1,[e(),Ks]}finally{Ks=t}}let xa=null,os=null,J=null,Ra=null,dt=null,Ma=null,As=!1,ka=!1,fs=null,Xs=null;var ir=0;let fi=1;var ps,Mt,Kt,hs,_s,Ht,gs,jt,Ds,Ue,Ps,Ot,ht,_t,ms,Ut,de,Oa,Cs,Da,Ir,qr,Zs,ui,Pa,ds;const da=class da{constructor(){Z(this,de);Ve(this,"id",fi++);Z(this,ps,!1);Ve(this,"linked",!0);Z(this,Mt,null);Z(this,Kt,null);Ve(this,"async_deriveds",new Map);Ve(this,"current",new Map);Ve(this,"previous",new Map);Ve(this,"unblocked",new Set);Z(this,hs,new Set);Z(this,_s,new Set);Z(this,Ht,new Set);Z(this,gs,0);Z(this,jt,new Map);Z(this,Ds,null);Z(this,Ue,[]);Z(this,Ps,[]);Z(this,Ot,new Set);Z(this,ht,new Set);Z(this,_t,new Map);Z(this,ms,new Set);Ve(this,"is_fork",!1);Z(this,Ut,!1)}skip_effect(t){g(this,_t).has(t)||g(this,_t).set(t,{d:[],m:[]}),g(this,ms).delete(t)}unskip_effect(t,s=a=>this.schedule(a)){var a=g(this,_t).get(t);if(a){g(this,_t).delete(t);for(var r of a.d)je(r,Me),s(r);for(r of a.m)je(r,bt),s(r)}g(this,ms).add(t)}capture(t,s,a=!1){t.v!==Ae&&!this.previous.has(t)&&this.previous.set(t,t.v),(t.f&Lt)===0&&(this.current.set(t,[s,a]),dt?.set(t,s)),this.is_fork||(t.v=s)}activate(){J=this}deactivate(){J=null,dt=null}flush(){try{ka=!0,J=this,le(this,de,Cs).call(this)}finally{ir=0,Ma=null,fs=null,Xs=null,ka=!1,J=null,dt=null,Qt.clear()}}discard(){for(const t of g(this,_s))t(this);g(this,_s).clear(),g(this,Ht).clear(),le(this,de,ds).call(this)}register_created_effect(t){g(this,Ps).push(t)}increment(t,s){if(X(this,gs,g(this,gs)+1),t){let a=g(this,jt).get(s)??0;g(this,jt).set(s,a+1)}}decrement(t,s){if(X(this,gs,g(this,gs)-1),t){let a=g(this,jt).get(s)??0;a===1?g(this,jt).delete(s):g(this,jt).set(s,a-1)}g(this,Ut)||(X(this,Ut,!0),Jt(()=>{X(this,Ut,!1),this.linked&&this.flush()}))}transfer_effects(t,s){for(const a of t)g(this,Ot).add(a);for(const a of s)g(this,ht).add(a);t.clear(),s.clear()}oncommit(t){g(this,hs).add(t)}ondiscard(t){g(this,_s).add(t)}on_fork_commit(t){g(this,Ht).add(t)}run_fork_commit_callbacks(){for(const t of g(this,Ht))t(this);g(this,Ht).clear()}settled(){return(g(this,Ds)??X(this,Ds,Cr())).promise}static ensure(){var t;if(J===null){const s=J=new da;le(t=s,de,Pa).call(t),!ka&&!As&&Jt(()=>{g(s,ps)||s.flush()})}return J}apply(){{dt=null;return}}schedule(t){if(Ma=t,t.b?.is_pending&&(t.f&(ys|pa|zr))!==0&&(t.f&is)===0){t.b.defer_effect(t);return}for(var s=t;s.parent!==null;){s=s.parent;var a=s.f;if(fs!==null&&s===se&&(ee===null||(ee.f&Oe)===0))return;if((a&(Vt|vt))!==0){if((a&Fe)===0)return;s.f^=Fe}}g(this,Ue).push(s)}};ps=new WeakMap,Mt=new WeakMap,Kt=new WeakMap,hs=new WeakMap,_s=new WeakMap,Ht=new WeakMap,gs=new WeakMap,jt=new WeakMap,Ds=new WeakMap,Ue=new WeakMap,Ps=new WeakMap,Ot=new WeakMap,ht=new WeakMap,_t=new WeakMap,ms=new WeakMap,Ut=new WeakMap,de=new WeakSet,Oa=function(){if(this.is_fork)return!0;for(const a of g(this,jt).keys()){for(var t=a,s=!1;t.parent!==null;){if(g(this,_t).has(t)){s=!0;break}t=t.parent}if(!s)return!0}return!1},Cs=function(){var c,d,_;if(X(this,ps,!0),ir++>1e3&&(le(this,de,ds).call(this),pi()),!le(this,de,Oa).call(this)){for(const v of g(this,Ot))g(this,ht).delete(v),je(v,Me),this.schedule(v);for(const v of g(this,ht))je(v,bt),this.schedule(v)}const t=g(this,Ue);X(this,Ue,[]),this.apply();var s=fs=[],a=[],r=Xs=[];for(const v of t)try{le(this,de,Da).call(this,v,s,a)}catch(u){throw Kr(v),u}if(J=null,r.length>0){var n=da.ensure();for(const v of r)n.schedule(v)}if(fs=null,Xs=null,le(this,de,Oa).call(this)){le(this,de,Zs).call(this,a),le(this,de,Zs).call(this,s);for(const[v,u]of g(this,_t))Br(v,u);r.length>0&&le(c=J,de,Cs).call(c);return}const l=le(this,de,Ir).call(this);if(l){le(d=l,de,qr).call(d,this);return}g(this,Ot).clear(),g(this,ht).clear();for(const v of g(this,hs))v(this);g(this,hs).clear(),Ra=this,lr(a),lr(s),Ra=null,g(this,Ds)?.resolve();var o=J;if(this.linked&&g(this,gs)===0&&le(this,de,ds).call(this),g(this,Ue).length>0){o===null&&(o=this,le(this,de,Pa).call(this));const v=o;g(v,Ue).push(...g(this,Ue).filter(u=>!g(v,Ue).includes(u)))}o!==null&&le(_=o,de,Cs).call(_)},Da=function(t,s,a){t.f^=Fe;for(var r=t.first;r!==null;){var n=r.f,l=(n&(vt|Vt))!==0,o=l&&(n&Fe)!==0,c=o||(n&Le)!==0||g(this,_t).has(r);if(!c&&r.fn!==null){l?r.f^=Fe:(n&ys)!==0?s.push(r):Bs(r)&&((n&ct)!==0&&g(this,ht).add(r),ks(r));var d=r.first;if(d!==null){r=d;continue}}for(;r!==null;){var _=r.next;if(_!==null){r=_;break}r=r.parent}}},Ir=function(){for(var t=g(this,Mt);t!==null;){if(!t.is_fork){for(const[s,[,a]]of this.current)if(t.current.has(s)&&!a)return t}t=g(t,Mt)}return null},qr=function(t){var a;for(const[r,n]of t.current)!this.previous.has(r)&&t.previous.has(r)&&this.previous.set(r,t.previous.get(r)),this.current.set(r,n);for(const[r,n]of t.async_deriveds){const l=this.async_deriveds.get(r);l&&n.promise.then(l.resolve)}const s=r=>{var n=r.reactions;if(n!==null)for(const c of n){var l=c.f;if((l&Oe)!==0)s(c);else{var o=c;l&(vs|ct)&&!this.async_deriveds.has(o)&&(g(this,ht).delete(o),je(o,Me),this.schedule(o))}}};for(const r of this.current.keys())s(r);this.oncommit(()=>t.discard()),le(a=t,de,ds).call(a),J=this,le(this,de,Cs).call(this)},Zs=function(t){for(var s=0;s!this.current.has(u));if(r.length===0)t&&v.discard();else if(s.length>0){if(t)for(const u of g(this,ms))v.unskip_effect(u,m=>{var b;(m.f&(ct|vs))!==0?v.schedule(m):le(b=v,de,Zs).call(b,[m])});v.activate();var n=new Set,l=new Map;for(var o of s)Nr(o,r,n,l);l=new Map;var c=[...v.current.keys()].filter(u=>this.current.has(u)?this.current.get(u)[0]!==u.v:!0);if(c.length>0)for(const u of g(this,Ps))(u.f&(st|Le|ta))===0&&Ua(u,c,l)&&((u.f&(vs|ct))!==0?(je(u,Me),v.schedule(u)):g(v,Ot).add(u));if(g(v,Ue).length>0&&!g(v,Ut)){v.apply();for(var d of g(v,Ue))le(_=v,de,Da).call(_,d,[],[]);X(v,Ue,[])}v.deactivate()}}}},Pa=function(){os===null?xa=os=this:(X(os,Kt,this),X(this,Mt,os)),os=this},ds=function(){var t=g(this,Mt),s=g(this,Kt);t===null?xa=s:X(t,Kt,s),s===null?os=t:X(s,Mt,t),this.linked=!1};let rs=da;function vi(e){var t=As;As=!0;try{for(var s;;){if(oi(),J===null)return s;J.flush()}}finally{As=t}}function pi(){try{Nn()}catch(e){Pt(e,Ma)}}let Et=null;function lr(e){var t=e.length;if(t!==0){for(var s=0;s0)){Qt.clear();for(const r of Et){if((r.f&(st|Le))!==0)continue;const n=[r];let l=r.parent;for(;l!==null;)Et.has(l)&&(Et.delete(l),n.push(l)),l=l.parent;for(let o=n.length-1;o>=0;o--){const c=n[o];(c.f&(st|Le))===0&&ks(c)}}Et.clear()}}Et=null}}function Nr(e,t,s,a){if(!s.has(e)&&(s.add(e),e.reactions!==null))for(const r of e.reactions){const n=r.f;(n&Oe)!==0?Nr(r,t,s,a):(n&(vs|ct))!==0&&(n&Me)===0&&Ua(r,t,a)&&(je(r,Me),Ga(r))}}function Ua(e,t,s){const a=s.get(e);if(a!==void 0)return a;if(e.deps!==null)for(const r of e.deps){if(Xt.call(t,r))return!0;if((r.f&Oe)!==0&&Ua(r,t,s))return s.set(r,!0),!0}return s.set(e,!1),!1}function Ga(e){J.schedule(e)}function Br(e,t){if(!((e.f&vt)!==0&&(e.f&Fe)!==0)){(e.f&Me)!==0?t.d.push(e):(e.f&bt)!==0&&t.m.push(e),je(e,Fe);for(var s=e.first;s!==null;)Br(s,t),s=s.next}}function Kr(e){je(e,Fe);for(var t=e.first;t!==null;)Kr(t),t=t.next}function hi(e){let t=0,s=ns(0),a;return()=>{Xa()&&(i(s),Za(()=>(t===0&&(a=ga(()=>e(()=>Fs(s)))),t+=1,()=>{Jt(()=>{t-=1,t===0&&(a?.(),a=void 0,Fs(s))})})))}}var _i=ss|Es;function gi(e,t,s,a){new mi(e,t,s,a)}var Ze,Ba,Je,Gt,Ie,Qe,Pe,Ge,Tt,Wt,Dt,bs,Ls,Vs,$t,fa,$e,bi,yi,wi,La,Js,Qs,Va,Ia;class mi{constructor(t,s,a,r){Z(this,$e);Ve(this,"parent");Ve(this,"is_pending",!1);Ve(this,"transform_error");Z(this,Ze);Z(this,Ba,null);Z(this,Je);Z(this,Gt);Z(this,Ie);Z(this,Qe,null);Z(this,Pe,null);Z(this,Ge,null);Z(this,Tt,null);Z(this,Wt,0);Z(this,Dt,0);Z(this,bs,!1);Z(this,Ls,new Set);Z(this,Vs,new Set);Z(this,$t,null);Z(this,fa,hi(()=>(X(this,$t,ns(g(this,Wt))),()=>{X(this,$t,null)})));X(this,Ze,t),X(this,Je,s),X(this,Gt,n=>{var l=se;l.b=this,l.f|=Ca,a(n)}),this.parent=se.b,this.transform_error=r??this.parent?.transform_error??(n=>n),X(this,Ie,_a(()=>{le(this,$e,La).call(this)},_i))}defer_effect(t){Vr(t,g(this,Ls),g(this,Vs))}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!g(this,Je).pending}update_pending_count(t,s){le(this,$e,Va).call(this,t,s),X(this,Wt,g(this,Wt)+t),!(!g(this,$t)||g(this,bs))&&(X(this,bs,!0),Jt(()=>{X(this,bs,!1),g(this,$t)&&xs(g(this,$t),g(this,Wt))}))}get_effect_pending(){return g(this,fa).call(this),i(g(this,$t))}error(t){if(!g(this,Je).onerror&&!g(this,Je).failed)throw t;J?.is_fork?(g(this,Qe)&&J.skip_effect(g(this,Qe)),g(this,Pe)&&J.skip_effect(g(this,Pe)),g(this,Ge)&&J.skip_effect(g(this,Ge)),J.on_fork_commit(()=>{le(this,$e,Ia).call(this,t)})):le(this,$e,Ia).call(this,t)}}Ze=new WeakMap,Ba=new WeakMap,Je=new WeakMap,Gt=new WeakMap,Ie=new WeakMap,Qe=new WeakMap,Pe=new WeakMap,Ge=new WeakMap,Tt=new WeakMap,Wt=new WeakMap,Dt=new WeakMap,bs=new WeakMap,Ls=new WeakMap,Vs=new WeakMap,$t=new WeakMap,fa=new WeakMap,$e=new WeakSet,bi=function(){try{X(this,Qe,et(()=>g(this,Gt).call(this,g(this,Ze))))}catch(t){this.error(t)}},yi=function(t){const s=g(this,Je).failed;s&&X(this,Ge,et(()=>{s(g(this,Ze),()=>t,()=>()=>{})}))},wi=function(){const t=g(this,Je).pending;t&&(this.is_pending=!0,X(this,Pe,et(()=>t(g(this,Ze)))),Jt(()=>{var s=X(this,Tt,document.createDocumentFragment()),a=Ct();s.append(a),X(this,Qe,le(this,$e,Qs).call(this,()=>et(()=>g(this,Gt).call(this,a)))),g(this,Dt)===0&&(g(this,Ze).before(s),X(this,Tt,null),es(g(this,Pe),()=>{X(this,Pe,null)}),le(this,$e,Js).call(this,J))}))},La=function(){try{if(this.is_pending=this.has_pending_snippet(),X(this,Dt,0),X(this,Wt,0),X(this,Qe,et(()=>{g(this,Gt).call(this,g(this,Ze))})),g(this,Dt)>0){var t=X(this,Tt,document.createDocumentFragment());er(g(this,Qe),t);const s=g(this,Je).pending;X(this,Pe,et(()=>s(g(this,Ze))))}else le(this,$e,Js).call(this,J)}catch(s){this.error(s)}},Js=function(t){this.is_pending=!1,t.transfer_effects(g(this,Ls),g(this,Vs))},Qs=function(t){var s=se,a=ee,r=Ye;wt(g(this,Ie)),nt(g(this,Ie)),ws(g(this,Ie).ctx);try{return rs.ensure(),t()}catch(n){return Pr(n),null}finally{wt(s),nt(a),ws(r)}},Va=function(t,s){var a;if(!this.has_pending_snippet()){this.parent&&le(a=this.parent,$e,Va).call(a,t,s);return}X(this,Dt,g(this,Dt)+t),g(this,Dt)===0&&(le(this,$e,Js).call(this,s),g(this,Pe)&&es(g(this,Pe),()=>{X(this,Pe,null)}),g(this,Tt)&&(g(this,Ze).before(g(this,Tt)),X(this,Tt,null)))},Ia=function(t){g(this,Qe)&&(Be(g(this,Qe)),X(this,Qe,null)),g(this,Pe)&&(Be(g(this,Pe)),X(this,Pe,null)),g(this,Ge)&&(Be(g(this,Ge)),X(this,Ge,null));var s=g(this,Je).onerror;let a=g(this,Je).failed;var r=!1,n=!1;const l=()=>{if(r){ii();return}r=!0,n&&Gn(),g(this,Ge)!==null&&es(g(this,Ge),()=>{X(this,Ge,null)}),le(this,$e,Qs).call(this,()=>{le(this,$e,La).call(this)})},o=c=>{try{n=!0,s?.(c,l),n=!1}catch(d){Pt(d,g(this,Ie)&&g(this,Ie).parent)}a&&X(this,Ge,le(this,$e,Qs).call(this,()=>{try{return et(()=>{var d=se;d.b=this,d.f|=Ca,a(g(this,Ze),()=>c,()=>l)})}catch(d){return Pt(d,g(this,Ie).parent),null}}))};Jt(()=>{var c;try{c=this.transform_error(t)}catch(d){Pt(d,g(this,Ie)&&g(this,Ie).parent);return}c!==null&&typeof c=="object"&&typeof c.then=="function"?c.then(o,d=>Pt(d,g(this,Ie)&&g(this,Ie).parent)):o(c)})};function xi(e,t,s,a){const r=Ms;var n=e.filter(u=>!u.settled);if(s.length===0&&n.length===0){a(t.map(r));return}var l=se,o=ki(),c=n.length===1?n[0].promise:n.length>1?Promise.all(n.map(u=>u.promise)):null;function d(u){if((l.f&st)===0){o();try{a(u)}catch(m){Pt(m,l)}aa()}}var _=Hr();if(s.length===0){c.then(()=>d(t.map(r))).finally(_);return}function v(){Promise.all(s.map(u=>Si(u))).then(u=>d([...t.map(r),...u])).catch(u=>Pt(u,l)).finally(_)}c?c.then(()=>{o(),v(),aa()}):v()}function ki(){var e=se,t=ee,s=Ye,a=J;return function(n=!0){wt(e),nt(t),ws(s),n&&(e.f&st)===0&&(a?.activate(),a?.apply())}}function aa(e=!0){wt(null),nt(null),ws(null),e&&J?.deactivate()}function Hr(){var e=se,t=e.b,s=J,a=t.is_rendered();return t.update_pending_count(1,s),s.increment(a,e),()=>{t.update_pending_count(-1,s),s.decrement(a,e)}}function Ms(e){var t=Oe|Me;return se!==null&&(se.f|=Es),{ctx:Ye,deps:null,effects:null,equals:Rr,f:t,fn:e,reactions:null,rv:0,v:Ae,wv:0,parent:se,ac:null}}const Hs=Symbol("obsolete");function Si(e,t,s){let a=se;a===null&&Pn();var r=void 0,n=ns(Ae),l=!ee,o=new Set;return Pi(()=>{var c=se,d=Cr();r=d.promise;try{Promise.resolve(e()).then(d.resolve,m=>{m!==ha&&d.reject(m)}).finally(aa)}catch(m){d.reject(m),aa()}var _=J;if(l){if((c.f&is)!==0)var v=Hr();if(a.b.is_rendered())_.async_deriveds.get(c)?.reject(Hs);else for(const m of o.values())m.reject(Hs);o.add(d),_.async_deriveds.set(c,d)}const u=(m,b=void 0)=>{v?.(),o.delete(d),b!==Hs&&(_.activate(),b?(n.f|=Lt,xs(n,b)):((n.f&Lt)!==0&&(n.f^=Lt),xs(n,m)),_.deactivate())};d.promise.then(u,m=>u(null,m||"unknown"))}),sn(()=>{for(const c of o)c.reject(Hs)}),new Promise(c=>{function d(_){function v(){_===r?c(n):d(r)}_.then(v,v)}d(r)})}function j(e){const t=Ms(e);return fn(t),t}function Ur(e){const t=Ms(e);return t.equals=Mr,t}function Ei(e){var t=e.effects;if(t!==null){e.effects=null;for(var s=0;s0&&!Yr&&$i()}return t}function $i(){Yr=!1;for(const e of ra){(e.f&Fe)!==0&&je(e,bt);let t;try{t=Bs(e)}catch{t=!0}t&&ks(e)}ra.clear()}function Fs(e){K(e,e.v+1)}function Xr(e,t,s){var a=e.reactions;if(a!==null)for(var r=a.length,n=0;n{if(ts===n)return o();var c=ee,d=ts;nt(null),ur(n);var _=o();return nt(c),ur(d),_};return a&&s.set("length",te(e.length)),new Proxy(e,{defineProperty(o,c,d){(!("value"in d)||d.configurable===!1||d.enumerable===!1||d.writable===!1)&&Kn();var _=s.get(c);return _===void 0?l(()=>{var v=te(d.value);return s.set(c,v),v}):K(_,d.value,!0),!0},deleteProperty(o,c){var d=s.get(c);if(d===void 0){if(c in o){const _=l(()=>te(Ae));s.set(c,_),Fs(r)}}else K(d,Ae),Fs(r);return!0},get(o,c,d){if(c===Zt)return e;var _=s.get(c),v=c in o;if(_===void 0&&(!v||us(o,c)?.writable)&&(_=l(()=>{var m=Ne(v?o[c]:Ae),b=te(m);return b}),s.set(c,_)),_!==void 0){var u=i(_);return u===Ae?void 0:u}return Reflect.get(o,c,d)},getOwnPropertyDescriptor(o,c){var d=Reflect.getOwnPropertyDescriptor(o,c);if(d&&"value"in d){var _=s.get(c);_&&(d.value=i(_))}else if(d===void 0){var v=s.get(c),u=v?.v;if(v!==void 0&&u!==Ae)return{enumerable:!0,configurable:!0,value:u,writable:!0}}return d},has(o,c){if(c===Zt)return!0;var d=s.get(c),_=d!==void 0&&d.v!==Ae||Reflect.has(o,c);if(d!==void 0||se!==null&&(!_||us(o,c)?.writable)){d===void 0&&(d=l(()=>{var u=_?Ne(o[c]):Ae,m=te(u);return m}),s.set(c,d));var v=i(d);if(v===Ae)return!1}return _},set(o,c,d,_){var v=s.get(c),u=c in o;if(a&&c==="length")for(var m=d;mte(Ae)),s.set(m+"",b))}if(v===void 0)(!u||us(o,c)?.writable)&&(v=l(()=>te(void 0)),K(v,Ne(d)),s.set(c,v));else{u=v.v!==Ae;var w=l(()=>Ne(d));K(v,w)}var h=Reflect.getOwnPropertyDescriptor(o,c);if(h?.set&&h.set.call(_,d),!u){if(a&&typeof c=="string"){var y=s.get("length"),S=Number(c);Number.isInteger(S)&&S>=y.v&&K(y,S+1)}Fs(r)}return!0},ownKeys(o){i(r);var c=Reflect.ownKeys(o).filter(v=>{var u=s.get(v);return u===void 0||u.v!==Ae});for(var[d,_]of s)_.v!==Ae&&!(d in o)&&c.push(d);return c},setPrototypeOf(){Hn()}})}function or(e){try{if(e!==null&&typeof e=="object"&&Zt in e)return e[Zt]}catch{}return e}function Ci(e,t){return Object.is(or(e),or(t))}var cr,Zr,Jr,Qr;function zi(){if(cr===void 0){cr=window,Zr=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,s=Text.prototype;Jr=us(t,"firstChild").get,Qr=us(t,"nextSibling").get,nr(e)&&(e[Aa]=void 0,e[Ws]=null,e[Fa]=void 0,e.__e=void 0),nr(s)&&(s[$s]=void 0)}}function Ct(e=""){return document.createTextNode(e)}function na(e){return Jr.call(e)}function Ns(e){return Qr.call(e)}function f(e,t){return na(e)}function yt(e,t=!1){{var s=na(e);return s instanceof Comment&&s.data===""?Ns(s):s}}function p(e,t=1,s=!1){let a=e;for(;t--;)a=Ns(a);return a}function Ai(e){e.textContent=""}function en(){return!1}function Fi(e,t,s){return document.createElementNS(Fr,e,void 0)}let dr=!1;function Ri(){dr||(dr=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(const t of e.target.elements)t[Ys]?.()})},{capture:!0}))}function Ya(e){var t=ee,s=se;nt(null),wt(null);try{return e()}finally{nt(t),wt(s)}}function tn(e,t,s,a=s){e.addEventListener(t,()=>Ya(s));const r=e[Ys];r?e[Ys]=()=>{r(),a(!0)}:e[Ys]=()=>a(!0),Ri()}function Mi(e){se===null&&(ee===null&&qn(),In()),At&&Vn()}function Oi(e,t){var s=t.last;s===null?t.last=t.first=e:(s.next=e,e.prev=s,t.last=e)}function Ft(e,t){var s=se;s!==null&&(s.f&Le)!==0&&(e|=Le);var a={ctx:Ye,deps:null,nodes:null,f:e|Me|tt,first:null,fn:t,last:null,next:null,parent:s,b:s&&s.b,prev:null,teardown:null,wv:0,ac:null};J?.register_created_effect(a);var r=a;if((e&ys)!==0)fs!==null?fs.push(a):rs.ensure().schedule(a);else if(t!==null){try{ks(a)}catch(l){throw Be(a),l}r.deps===null&&r.teardown===null&&r.nodes===null&&r.first===r.last&&(r.f&Es)===0&&(r=r.first,(e&ct)!==0&&(e&ss)!==0&&r!==null&&(r.f|=ss))}if(r!==null&&(r.parent=s,s!==null&&Oi(r,s),ee!==null&&(ee.f&Oe)!==0&&(e&Vt)===0)){var n=ee;(n.effects??(n.effects=[])).push(r)}return a}function Xa(){return ee!==null&&!ft}function sn(e){const t=Ft(pa,null);return je(t,Fe),t.teardown=e,t}function an(e){Mi();var t=se.f,s=!ee&&(t&vt)!==0&&(t&is)===0;if(s){var a=Ye;(a.e??(a.e=[])).push(e)}else return rn(e)}function rn(e){return Ft(ys|Rn,e)}function Di(e){rs.ensure();const t=Ft(Vt|Es,e);return(s={})=>new Promise(a=>{s.outro?es(t,()=>{Be(t),a(void 0)}):(Be(t),a(void 0))})}function nn(e){return Ft(ys,e)}function Pi(e){return Ft(vs|Es,e)}function Za(e,t=0){return Ft(pa|t,e)}function q(e,t=[],s=[],a=[]){xi(a,t,s,r=>{Ft(pa,()=>e(...r.map(i)))})}function _a(e,t=0){var s=Ft(ct|t,e);return s}function et(e){return Ft(vt|Es,e)}function ln(e){var t=e.teardown;if(t!==null){const s=At,a=ee;fr(!0),nt(null);try{t.call(null)}finally{fr(s),nt(a)}}}function Ja(e,t=!1){var s=e.first;for(e.first=e.last=null;s!==null;){const r=s.ac;r!==null&&Ya(()=>{r.abort(ha)});var a=s.next;(s.f&Vt)!==0?s.parent=null:Be(s,t),s=a}}function Li(e){for(var t=e.first;t!==null;){var s=t.next;(t.f&vt)===0&&Be(t),t=s}}function Be(e,t=!0){var s=!1;(t||(e.f&Fn)!==0)&&e.nodes!==null&&e.nodes.end!==null&&(Vi(e.nodes.start,e.nodes.end),s=!0),je(e,za),Ja(e,t&&!s),Os(e,0);var a=e.nodes&&e.nodes.t;if(a!==null)for(const n of a)n.stop();ln(e),e.f^=za,e.f|=st;var r=e.parent;r!==null&&r.first!==null&&on(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function Vi(e,t){for(;e!==null;){var s=e===t?null:Ns(e);e.remove(),e=s}}function on(e){var t=e.parent,s=e.prev,a=e.next;s!==null&&(s.next=a),a!==null&&(a.prev=s),t!==null&&(t.first===e&&(t.first=a),t.last===e&&(t.last=s))}function es(e,t,s=!0){var a=[];cn(e,a,!0);var r=()=>{s&&Be(e),t&&t()},n=a.length;if(n>0){var l=()=>--n||r();for(var o of a)o.out(l)}else r()}function cn(e,t,s){if((e.f&Le)===0){e.f^=Le;var a=e.nodes&&e.nodes.t;if(a!==null)for(const o of a)(o.is_global||s)&&t.push(o);for(var r=e.first;r!==null;){var n=r.next;if((r.f&Vt)===0){var l=(r.f&ss)!==0||(r.f&vt)!==0&&(e.f&ct)!==0;cn(r,t,l?s:!1)}r=n}}}function Qa(e){dn(e,!0)}function dn(e,t){if((e.f&Le)!==0){e.f^=Le,(e.f&Fe)===0&&(je(e,Me),rs.ensure().schedule(e));for(var s=e.first;s!==null;){var a=s.next,r=(s.f&ss)!==0||(s.f&vt)!==0;dn(s,r?t:!1),s=a}var n=e.nodes&&e.nodes.t;if(n!==null)for(const l of n)(l.is_global||t)&&l.in()}}function er(e,t){if(e.nodes)for(var s=e.nodes.start,a=e.nodes.end;s!==null;){var r=s===a?null:Ns(s);t.append(s),s=r}}let ea=!1,At=!1;function fr(e){At=e}let ee=null,ft=!1;function nt(e){ee=e}let se=null;function wt(e){se=e}let at=null;function fn(e){ee!==null&&(at===null?at=[e]:at.push(e))}let qe=null,He=0,Xe=null;function Ii(e){Xe=e}let un=1,Nt=0,ts=Nt;function ur(e){ts=e}function vn(){return++un}function Bs(e){var t=e.f;if((t&Me)!==0)return!0;if(t&Oe&&(e.f&=~as),(t&bt)!==0){for(var s=e.deps,a=s.length,r=0;re.wv)return!0}(t&tt)!==0&&dt===null&&je(e,Fe)}return!1}function pn(e,t,s=!0){var a=e.reactions;if(a!==null&&!(at!==null&&Xt.call(at,e)))for(var r=0;r{e.ac.abort(ha)}),e.ac=null);try{e.f|=sa;var _=e.fn,v=_();e.f|=is;var u=e.deps,m=J?.is_fork;if(qe!==null){var b;if(m||Os(e,He),u!==null&&He>0)for(u.length=He+qe.length,b=0;b{throw h});throw u}}finally{e[Bt]=t,delete e.currentTarget,nt(_),wt(v)}}}const Hi=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:e=>e});function Ui(e){return Hi?.createHTML(e)??e}function Gi(e){var t=Fi("template");return t.innerHTML=Ui(e.replaceAll("","")),t.content}function ia(e,t){var s=se;s.nodes===null&&(s.nodes={start:e,end:t,a:null,t:null})}function F(e,t){var s=(t&si)!==0,a=(t&ai)!==0,r,n=!e.startsWith("");return()=>{r===void 0&&(r=Gi(n?e:""+e),s||(r=na(r)));var l=a||Zr?document.importNode(r,!0):r.cloneNode(!0);if(s){var o=na(l),c=l.lastChild;ia(o,c)}else ia(l,l);return l}}function Wi(e=""){{var t=Ct(e+"");return ia(t,t),t}}function hr(){var e=document.createDocumentFragment(),t=document.createComment(""),s=Ct();return e.append(t,s),ia(t,s),e}function z(e,t){e!==null&&e.before(t)}function A(e,t){var s=t==null?"":typeof t=="object"?`${t}`:t;s!==(e[$s]??(e[$s]=e.nodeValue))&&(e[$s]=s,e.nodeValue=`${s}`)}function Yi(e,t){return Xi(e,t)}const Us=new Map;function Xi(e,{target:t,anchor:s,props:a={},events:r,context:n,intro:l=!0,transformError:o}){zi();var c=void 0,d=Di(()=>{var _=s??t.appendChild(Ct());gi(_,{pending:()=>{}},m=>{ke({});var b=Ye;n&&(b.c=n),r&&(a.$$events=r),c=e(m,a)||{},Se()},o);var v=new Set,u=m=>{for(var b=0;b{for(var m of v)for(const h of[t,document]){var b=Us.get(h),w=b.get(m);--w==0?(h.removeEventListener(m,pr),b.delete(m),b.size===0&&Us.delete(h)):b.set(m,w)}qa.delete(u),_!==s&&_.parentNode?.removeChild(_)}});return Zi.set(c,d),c}let Zi=new WeakMap;var lt,gt,We,Yt,Is,qs,ua;class bn{constructor(t,s=!0){Ve(this,"anchor");Z(this,lt,new Map);Z(this,gt,new Map);Z(this,We,new Map);Z(this,Yt,new Set);Z(this,Is,!0);Z(this,qs,t=>{if(g(this,lt).has(t)){var s=g(this,lt).get(t),a=g(this,gt).get(s);if(a)Qa(a),g(this,Yt).delete(s);else{var r=g(this,We).get(s);r&&(g(this,gt).set(s,r.effect),g(this,We).delete(s),r.fragment.lastChild.remove(),this.anchor.before(r.fragment),a=r.effect)}for(const[n,l]of g(this,lt)){if(g(this,lt).delete(n),n===t)break;const o=g(this,We).get(l);o&&(Be(o.effect),g(this,We).delete(l))}for(const[n,l]of g(this,gt)){if(n===s||g(this,Yt).has(n))continue;const o=()=>{if(Array.from(g(this,lt).values()).includes(n)){var d=document.createDocumentFragment();er(l,d),d.append(Ct()),g(this,We).set(n,{effect:l,fragment:d})}else Be(l);g(this,Yt).delete(n),g(this,gt).delete(n)};g(this,Is)||!a?(g(this,Yt).add(n),es(l,o,!1)):o()}}});Z(this,ua,t=>{g(this,lt).delete(t);const s=Array.from(g(this,lt).values());for(const[a,r]of g(this,We))s.includes(a)||(Be(r.effect),g(this,We).delete(a))});this.anchor=t,X(this,Is,s)}ensure(t,s){var a=J,r=en();if(s&&!g(this,gt).has(t)&&!g(this,We).has(t))if(r){var n=document.createDocumentFragment(),l=Ct();n.append(l),g(this,We).set(t,{effect:et(()=>s(l)),fragment:n})}else g(this,gt).set(t,et(()=>s(this.anchor)));if(g(this,lt).set(a,t),r){for(const[o,c]of g(this,gt))o===t?a.unskip_effect(c):a.skip_effect(c);for(const[o,c]of g(this,We))o===t?a.unskip_effect(c.effect):a.skip_effect(c.effect);a.oncommit(g(this,qs)),a.ondiscard(g(this,ua))}else g(this,qs).call(this,a)}}lt=new WeakMap,gt=new WeakMap,We=new WeakMap,Yt=new WeakMap,Is=new WeakMap,qs=new WeakMap,ua=new WeakMap;function fe(e,t,s=!1){var a=new bn(e),r=s?ss:0;function n(l,o){a.ensure(l,o)}_a(()=>{var l=!1;t((o,c=0)=>{l=!0,n(c,o)}),l||n(-1,null)},r)}function js(e,t){return t}function Ji(e,t,s){for(var a=[],r=t.length,n,l=t.length,o=0;o{if(n){if(n.pending.delete(v),n.done.add(v),n.pending.size===0){var u=e.outrogroups;Na(e,va(n.done)),u.delete(n),u.size===0&&(e.outrogroups=null)}}else l-=1},!1)}if(l===0){var c=a.length===0&&s!==null;if(c){var d=s,_=d.parentNode;Ai(_),_.append(d),e.items.clear()}Na(e,t,!c)}else n={pending:new Set(t),done:new Set},(e.outrogroups??(e.outrogroups=new Set)).add(n)}function Na(e,t,s=!0){var a;if(e.pending.size>0){a=new Set;for(const l of e.pending.values())for(const o of l)a.add(e.items.get(o).e)}for(var r=0;r{var $=s();return Ka($)?$:$==null?[]:va($)}),u,m=new Map,b=!0;function w($){(S.effect.f&st)===0&&(S.pending.delete($),S.fallback=_,Qi(S,u,l,t,a),_!==null&&(u.length===0?(_.f&mt)===0?Qa(_):(_.f^=mt,zs(_,null,l)):es(_,()=>{_=null})))}function h($){S.pending.delete($)}var y=_a(()=>{u=i(v);for(var $=u.length,R=new Set,B=J,E=en(),C=0;C<$;C+=1){var O=u[C],L=a(O,C),T=b?null:o.get(L);T?(T.v&&xs(T.v,O),T.i&&xs(T.i,C),E&&B.unskip_effect(T.e)):(T=el(o,b?l:_r??(_r=Ct()),O,L,C,r,t,s),b||(T.e.f|=mt),o.set(L,T)),R.add(L)}if($===0&&n&&!_&&(b?_=et(()=>n(l)):(_=et(()=>n(_r??(_r=Ct()))),_.f|=mt)),$>R.size&&Ln(),!b)if(m.set(B,R),E){for(const[D,x]of o)R.has(D)||B.skip_effect(x.e);B.oncommit(w),B.ondiscard(h)}else w(B);i(v)}),S={effect:y,items:o,pending:m,outrogroups:null,fallback:_};b=!1}function Ts(e){for(;e!==null&&(e.f&vt)===0;)e=e.next;return e}function Qi(e,t,s,a,r){var n=(a&Xn)!==0,l=t.length,o=e.items,c=Ts(e.effect.first),d,_=null,v,u=[],m=[],b,w,h,y;if(n)for(y=0;y0){var L=(a&Ar)!==0&&l===0?s:null;if(n){for(y=0;y{if(v!==void 0)for(h of v)h.nodes?.a?.apply()})}function el(e,t,s,a,r,n,l,o){var c=(l&Wn)!==0?(l&Zn)===0?Ti(s,!1,!1):ns(s):null,d=(l&Yn)!==0?ns(r):null;return{v:c,i:d,e:et(()=>(n(t,c??s,d??r,o),()=>{e.delete(a)}))}}function zs(e,t,s){if(e.nodes)for(var a=e.nodes.start,r=e.nodes.end,n=t&&(t.f&mt)===0?t.nodes.start:s;a!==null;){var l=Ns(a);if(n.before(a),a===r)return;a=l}}function Rt(e,t,s){t===null?e.effect.first=s:t.next=s,s===null?e.effect.last=t:s.prev=t}function yn(e,t,...s){var a=new bn(e);_a(()=>{const r=t()??null;a.ensure(r,r&&(n=>r(n,...s)))},ss)}const gr=[...` +\r\f \v\uFEFF`];function tl(e,t,s){var a=e==null?"":""+e;if(s){for(var r of Object.keys(s))if(s[r])a=a?a+" "+r:r;else if(a.length)for(var n=r.length,l=0;(l=a.indexOf(r,l))>=0;){var o=l+n;(l===0||gr.includes(a[l-1]))&&(o===a.length||gr.includes(a[o]))?a=(l===0?"":a.substring(0,l))+a.substring(o+1):l=o}}return a===""?null:a}function mr(e,t=!1){var s=t?" !important;":";",a="";for(var r of Object.keys(e)){var n=e[r];n!=null&&n!==""&&(a+=" "+r+": "+n+s)}return a}function Sa(e){return e[0]!=="-"||e[1]!=="-"?e.toLowerCase():e}function sl(e,t){if(t){var s="",a,r;if(Array.isArray(t)?(a=t[0],r=t[1]):a=t,e){e=String(e).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var n=!1,l=0,o=!1,c=[];a&&c.push(...Object.keys(a).map(Sa)),r&&c.push(...Object.keys(r).map(Sa));var d=0,_=-1;const w=e.length;for(var v=0;v{tr(e,e.__value)});t.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),sn(()=>{t.disconnect()})}function la(e,t,s=t){var a=new WeakSet,r=!0;tn(e,"change",n=>{var l=n?"[selected]":":checked",o;if(e.multiple)o=[].map.call(e.querySelectorAll(l),Rs);else{var c=e.querySelector(l)??e.querySelector("option:not([disabled])");o=c&&Rs(c)}s(o),e.__value=o,J!==null&&a.add(J)}),nn(()=>{var n=t();if(e===document.activeElement){var l=J;if(a.has(l))return}if(tr(e,n,r),r&&n===void 0){var o=e.querySelector(":checked");o!==null&&(n=Rs(o),s(n))}e.__value=n,r=!1}),wn(e)}function Rs(e){return"__value"in e?e.__value:e.value}const al=Symbol("is custom element"),rl=Symbol("is html"),nl=Dn?"progress":"PROGRESS";function oa(e,t){var s=xn(e);s.value===(s.value=t??void 0)||e.value===t&&(t!==0||e.nodeName!==nl)||(e.value=t??"")}function Q(e,t,s,a){var r=xn(e);r[t]!==(r[t]=s)&&(t==="loading"&&(e[On]=s),s==null?e.removeAttribute(t):typeof s!="string"&&il(e).includes(t)?e[t]=s:e.setAttribute(t,s))}function xn(e){return e[Ws]??(e[Ws]={[al]:e.nodeName.includes("-"),[rl]:e.namespaceURI===Fr})}var br=new Map;function il(e){var t=e.getAttribute("is")||e.nodeName,s=br.get(t);if(s)return s;br.set(t,s=[]);for(var a,r=e,n=Element.prototype;n!==r;){a=$n(r);for(var l in a)a[l].set&&l!=="innerHTML"&&l!=="textContent"&&l!=="innerText"&&s.push(l);r=Tr(r)}return s}function zt(e,t,s=t){var a=new WeakSet;tn(e,"input",async r=>{var n=r?e.defaultValue:e.value;if(n=ja(e)?Ta(n):n,s(n),J!==null&&a.add(J),await Ni(),n!==(n=t())){var l=e.selectionStart,o=e.selectionEnd,c=e.value.length;if(e.value=n??"",o!==null){var d=e.value.length;l===o&&o===c&&d>c?(e.selectionStart=d,e.selectionEnd=d):(e.selectionStart=l,e.selectionEnd=Math.min(o,d))}}}),ga(t)==null&&e.value&&(s(ja(e)?Ta(e.value):e.value),J!==null&&a.add(J)),Za(()=>{var r=t();if(e===document.activeElement){var n=J;if(a.has(n))return}ja(e)&&r===Ta(e.value)||e.type==="date"&&!r&&!e.value||r!==e.value&&(e.value=r??"")})}function ja(e){var t=e.type;return t==="number"||t==="range"}function Ta(e){return e===""?null:+e}function $a(e,t){return e===t||e?.[Zt]===t}function ll(e={},t,s,a){var r=Ye.r,n=se;return nn(()=>{var l,o;return Za(()=>{l=o,o=[],ga(()=>{$a(s(...o),e)||(t(e,...o),l&&$a(s(...l),e)&&t(null,...l))})}),()=>{let c=n;for(;c!==r&&c.parent!==null&&c.parent.f&za;)c=c.parent;const d=()=>{o&&$a(s(...o),e)&&t(null,...o)},_=c.teardown;c.teardown=()=>{d(),_?.()}}}),e}function _e(e,t,s,a){var r=!0,n=(s&ei)!==0,l=(s&ti)!==0,o=a,c=!0,d=void 0,_=()=>l&&r?(d??(d=Ms(a)),i(d)):(c&&(c=!1,o=l?ga(a):a),o);let v;if(n){var u=Zt in e||Mn in e;v=us(e,t)?.set??(u&&t in e?R=>e[t]=R:void 0)}var m,b=!1;n?[m,b]=di(()=>e[t]):m=e[t],m===void 0&&a!==void 0&&(m=_(),v&&(Bn(),v(m)));var w;if(w=()=>{var R=e[t];return R===void 0?_():(c=!0,R)},(s&Qn)===0)return w;if(v){var h=e.$$legacy;return(function(R,B){return arguments.length>0?((!B||h||b)&&v(B?w():R),R):w()})}var y=!1,S=((s&Jn)!==0?Ms:Ur)(()=>(y=!1,w()));n&&i(S);var $=se;return(function(R,B){if(arguments.length>0){const E=B?i(S):n?Ne(R):R;return K(S,E),y=!0,o!==void 0&&(o=E),R}return At&&y||($.f&st)!==0?S.v:i(S)})}const ol="5";var jr;typeof window<"u"&&((jr=window.__svelte??(window.__svelte={})).v??(jr.v=new Set)).add(ol);const It=typeof window<"u"&&window.slashedBricksApp?window.slashedBricksApp:{defaults:{},settings:{},tabs:{},rest:{url:"",nonce:""}},ne={defaults:It.defaults||{},tabs:It.tabs||{},rest:It.rest||{url:"",nonce:""},inventory:It.inventory||{variables:[],sf_classes:[],is_classes:[]},pluginSettings:It.pluginSettings||{},versions:It.versions||{plugin:"",framework:""}},H=Ne(structuredClone(It.settings||{})),W=Ne({activeTab:cl(ne.tabs)||"colors",dirty:!1,saving:!1,lastSavedAt:null,error:""});function cl(e){for(const t in e)return t;return null}function sr(){W.dirty=!0,W.error=""}function yr(e){H[e]&&delete H[e]}function dl(e,t){const s=H[e];if(!s)return"";const a=s[t];return a==null?"":String(a)}function Ss(e,t,s){H[e]||(H[e]={}),s===""||s===null||s===void 0||typeof s=="string"&&s.trim()===""?delete H[e][t]:H[e][t]=String(s),sr()}var fl=F(''),ul=F('

');function vl(e,t){ke(t,!0);var s=ul();ie(s,21,()=>Object.entries(ne.tabs),([a,r])=>a,(a,r)=>{var n=j(()=>ot(i(r),2));let l=()=>i(n)[0],o=()=>i(n)[1];var c=fl();let d;var _=f(c);q(()=>{d=rt(c,1,"tab-nav__btn svelte-yyiz68",null,d,{active:W.activeTab===l()}),A(_,o())}),he("click",c,()=>W.activeTab=l()),z(a,c)}),z(e,s),Se()}De(["click"]);var pl=F(' '),hl=F(' ',1),_l=F(''),gl=F('
');function Gs(e,t){ke(t,!0);let s=_e(t,"hexHint",3,""),a=_e(t,"rawHint",3,""),r=_e(t,"cssVar",3,"");const n=/^#([0-9a-fA-F]{3,4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/,l=(()=>{const D=(H.colors?.[t.storeKey]??"").trim(),x=D===""||n.test(D);return{mode:x?"hex":"raw",hex:x?D:"",raw:x?"":D}})();let o=te(Ne(l.mode)),c=te(Ne(l.hex)),d=te(Ne(l.raw));function _(){H.colors||(H.colors={});const D=i(d).trim(),x=i(c).trim(),k=i(o)==="raw"?D:x;k===""?delete H.colors[t.storeKey]:H.colors[t.storeKey]=k,sr()}function v(){i(o)==="hex"?(K(o,"raw"),K(c,"")):(K(o,"hex"),K(d,"")),_()}const u=j(()=>(i(o)==="raw"?i(d):i(c))||s()||"transparent");var m=gl(),b=f(m),w=f(b),h=f(w),y=p(w,2);{var S=D=>{var x=pl(),k=f(x);q(()=>A(k,r())),z(D,x)};fe(y,D=>{r()&&D(S)})}var $=p(b,2),R=f($);let B;var E=p(R,2);{var C=D=>{var x=hl(),k=yt(x),P=p(k,2);q(()=>{Q(k,"id",t.storeKey),Q(P,"placeholder",s())}),he("input",k,_),zt(k,()=>i(c),M=>K(c,M)),he("input",P,_),zt(P,()=>i(c),M=>K(c,M)),z(D,x)},O=D=>{var x=_l();q(()=>{Q(x,"id",t.storeKey),Q(x,"placeholder",a())}),he("input",x,_),zt(x,()=>i(d),k=>K(d,k)),z(D,x)};fe(E,D=>{i(o)==="hex"?D(C):D(O,-1)})}var L=p(E,2),T=f(L);q(()=>{Q(w,"for",t.storeKey),A(h,t.label),B=ve(R,"",B,{background:i(u)}),A(T,i(o)==="hex"?"Advanced (oklch / raw)":"Use HEX picker")}),he("click",L,v),z(e,m),Se()}De(["input","click"]);var ml=F('
'),bl=F('
');function ma(e,t){ke(t,!0);let s=te(!1);const a=`adv-body-${Math.random().toString(36).slice(2,9)}`;var r=bl(),n=f(r),l=p(f(n));let o;var c=f(l),d=p(n,2);{var _=v=>{var u=ml(),m=f(u);yn(m,()=>t.children),q(()=>Q(u,"id",a)),z(v,u)};fe(d,v=>{i(s)&&v(_)})}q(()=>{Q(n,"aria-expanded",i(s)),Q(n,"aria-controls",a),o=rt(l,1,"advanced-section__arrow",null,o,{open:i(s)}),A(c,i(s)?"▲":"▼")}),he("click",n,()=>K(s,!i(s))),z(e,r),Se()}De(["click"]);var yl=F('

Brand Colors — Dark Mode

Status Colors — Dark Mode

',1),wl=F(`

Status Colors — Light Mode

The framework auto-derives dark mode from light source colors using CSS relative color syntax (oklch(from light clamp(0.65, 0.95−l·0.5, 0.88) c·0.9 h)). Turn this on only when you need precise per-color dark overrides; auto-derivation is usually good enough.

`,1),xl=F(`

Brand Colors — Light Mode

Pick a color via the HEX input, or switch to Advanced to paste any CSS color value (oklch, rgb, hsl, var(...), etc). Whatever you save is fed - straight into the framework as the source of the brand scale.

`);function kl(e,t){xe(t,!0);const s=re.defaults?.colors??{},a=_=>_.charAt(0).toUpperCase()+_.slice(1),r=Object.entries(s.brand??{}),n=j(()=>dl("colors","dark_overrides_enabled")!=="0");function l(){ks("colors","dark_overrides_enabled",i(n)?"0":"1")}var o=xl(),c=p(f(o),4);ne(c,21,()=>r,([_,v])=>_,(_,v)=>{var u=j(()=>ot(i(v),2));let m=()=>i(u)[0],b=()=>i(u)[1];{let w=j(()=>`brand_${m()}`),h=j(()=>a(m())),y=j(()=>s.brand_hex_hints?.[m()]??""),S=j(()=>`--sf-color-${m()}-light`);Us(_,{get storeKey(){return i(w)},get label(){return i(h)},get hexHint(){return i(y)},get rawHint(){return b()},get cssVar(){return i(S)}})}});var d=p(c,2);ga(d,{children:(_,v)=>{var u=wl(),m=p(yt(u),2);ne(m,21,()=>Object.entries(s.status??{}),([E,$])=>E,(E,$)=>{var O=j(()=>ot(i($),2));let L=()=>i(O)[0],T=()=>i(O)[1];{let D=j(()=>`status_${L()}`),x=j(()=>a(L())),k=j(()=>s.status_hex_hints?.[L()]??""),P=j(()=>`--sf-color-${L()}-light`);Us(E,{get storeKey(){return i(D)},get label(){return i(x)},get hexHint(){return i(k)},get rawHint(){return T()},get cssVar(){return i(P)}})}});var b=p(m,2),w=f(b),h=f(w);let y;var S=p(h,2),C=f(S),R=p(b,2);{var B=E=>{var $=yl(),O=p(yt($),2);ne(O,21,()=>Object.entries(s.brand_dark??s.brand??{}),([T])=>T,(T,D)=>{var x=j(()=>ot(i(D),1));let k=()=>i(x)[0];{let P=j(()=>`brand_dark_${k()}`),M=j(()=>a(k())),V=j(()=>s.brand_dark_hex_hints?.[k()]??""),U=j(()=>s.brand_dark?.[k()]??""),I=j(()=>`--sf-color-${k()}-dark`);Us(T,{get storeKey(){return i(P)},get label(){return i(M)},get hexHint(){return i(V)},get rawHint(){return i(U)},get cssVar(){return i(I)}})}});var L=p(O,4);ne(L,21,()=>Object.entries(s.status_dark??s.status??{}),([T])=>T,(T,D)=>{var x=j(()=>ot(i(D),1));let k=()=>i(x)[0];{let P=j(()=>`status_dark_${k()}`),M=j(()=>a(k())),V=j(()=>s.status_dark_hex_hints?.[k()]??""),U=j(()=>s.status_dark?.[k()]??""),I=j(()=>`--sf-color-${k()}-dark`);Us(T,{get storeKey(){return i(P)},get label(){return i(M)},get hexHint(){return i(V)},get rawHint(){return i(U)},get cssVar(){return i(I)}})}}),z(E,$)};fe(R,E=>{i(n)&&E(B)})}q(()=>{y=rt(h,1,"dark-toggle-btn svelte-1vle0rm",null,y,{on:i(n)}),Q(h,"aria-pressed",i(n)),A(C,i(n)?"Active — custom values override auto-derivation":"Off — dark mode auto-derived from light source colors")}),he("click",h,l),z(_,u)},$$slots:{default:!0}}),z(e,o),ke()}De(["click"]);var Sl=F(''),El=F(' '),jl=F(' '),Tl=F('

'),Cl=F('
');function ma(e,t){let s=_e(t,"cssVar",3,""),a=_e(t,"fieldId",3,""),r=_e(t,"description",3,"");var n=Cl(),l=f(n),o=f(l);{var c=h=>{var y=Sl(),S=f(y);q(()=>{Q(y,"for",a()),A(S,t.label)}),z(h,y)},d=h=>{var y=El(),S=f(y);q(()=>A(S,t.label)),z(h,y)};fe(o,h=>{a()?h(c):h(d,-1)})}var _=p(o,2);{var v=h=>{var y=jl(),S=f(y);q(()=>A(S,s())),z(h,y)};fe(_,h=>{s()&&h(v)})}var u=p(l,2),m=f(u);bn(m,()=>t.children??Tr);var b=p(m,2);{var w=h=>{var y=Tl(),S=f(y);q(()=>A(S,r())),z(h,y)};fe(b,h=>{r()&&h(w)})}z(e,n)}var $l=F('');function oa(e,t){xe(t,!0);let s=_e(t,"default",3,""),a=_e(t,"cssVar",3,""),r=_e(t,"description",3,""),n=_e(t,"mono",3,!1),l=_e(t,"width",3,"320px");const o=j(()=>H[t.section]?.[t.fieldKey]===void 0||H[t.section]?.[t.fieldKey]===null?"":String(H[t.section][t.fieldKey]));function c(d){ks(t.section,t.fieldKey,d.currentTarget.value)}ma(e,{get label(){return t.label},get cssVar(){return a()},get fieldId(){return t.fieldKey},get description(){return r()},children:(d,_)=>{var v=$l();let u,m;q(b=>{Q(v,"id",t.fieldKey),u=rt(v,1,"text svelte-j8yw6l",null,u,{mono:n()}),la(v,i(o)),Q(v,"placeholder",b),m=ve(v,"",m,{width:l()})},[()=>String(s())]),he("input",v,c),z(d,v)},$$slots:{default:!0}}),ke()}De(["input"]);var zl=F(' '),Al=F(' ',1);function ut(e,t){xe(t,!0);let s=_e(t,"min",3,void 0),a=_e(t,"max",3,void 0),r=_e(t,"step",3,void 0),n=_e(t,"default",3,""),l=_e(t,"cssVar",3,""),o=_e(t,"unit",3,""),c=_e(t,"description",3,""),d=_e(t,"width",3,"120px");const _=j(()=>H[t.section]?.[t.fieldKey]===void 0||H[t.section]?.[t.fieldKey]===null?"":String(H[t.section][t.fieldKey]));function v(u){ks(t.section,t.fieldKey,u.currentTarget.value)}ma(e,{get label(){return t.label},get cssVar(){return l()},get fieldId(){return t.fieldKey},get description(){return c()},children:(u,m)=>{var b=Al(),w=yt(b);let h;var y=p(w,2);{var S=C=>{var R=zl(),B=f(R);q(()=>A(B,o())),z(C,R)};fe(y,C=>{o()&&C(S)})}q(C=>{Q(w,"id",t.fieldKey),Q(w,"min",s()),Q(w,"max",a()),Q(w,"step",r()),la(w,i(_)),Q(w,"placeholder",C),h=ve(w,"",h,{width:d()})},[()=>String(n())]),he("input",w,v),z(u,b)},$$slots:{default:!0}}),ke()}De(["input"]);var Fl=F('
'),Rl=F('
'),Ml=F('

Display Scale

'),Ol=F('

Live Scale Preview

Text Scale

');function Dl(e,t){xe(t,!0);const s=16,a=360,r=1520;let n=te(r);const o=(re.defaults?.typography??{}).font_sizes??{};function c(T){const D=H.typography??{},x=o[T]??{},k=D[`size_${T}_min`],P=D[`size_${T}_max`],M=k!==void 0&&k!==""?parseFloat(k):x.min??.75,V=P!==void 0&&P!==""?parseFloat(P):x.max??1;return{min:M,max:V}}const d=j(()=>{const T=Math.max(0,Math.min(1,(i(n)-a)/(r-a))),D={};for(const x of Object.keys(o)){const{min:k,max:P}=c(x),M=k+(P-k)*T,V=M*s;D[x]={sizePx:V,sizeRem:M.toFixed(3)}}return D}),_=["2xs","xs","s","m","l","xl","2xl","3xl","4xl"],v=["display-s","display-m","display-l"],u=j(()=>_.filter(T=>o[T])),m=j(()=>v.filter(T=>o[T]));var b=Ol(),w=f(b),h=p(f(w),2),y=f(h);y.textContent="360px";var S=p(y,2);Q(S,"min",a),Q(S,"max",r);var C=p(S,2);C.textContent="1520px";var R=p(C,2),B=f(R),E=p(w,2),$=p(f(E),2);ne($,16,()=>i(u),T=>T,(T,D)=>{const x=j(()=>i(d)[D]);var k=pr(),P=yt(k);{var M=V=>{var U=Fl(),I=f(U),Y=f(I),G=p(I,2);let ae;var ue=f(G),ce=p(G,2),pe=f(ce);q((ge,N)=>{A(Y,D),ae=ve(G,"",ae,ge),A(ue,D),A(pe,`${i(x).sizeRem??""}rem / ${N??""}px`)},[()=>({"font-size":`${i(x).sizePx.toFixed(1)??""}px`}),()=>i(x).sizePx.toFixed(1)]),z(V,U)};fe(P,V=>{i(x)&&V(M)})}z(T,k)});var O=p(E,2);{var L=T=>{var D=Ml(),x=p(f(D),2);ne(x,16,()=>i(m),k=>k,(k,P)=>{const M=j(()=>i(d)[P]);var V=pr(),U=yt(V);{var I=Y=>{var G=Rl(),ae=f(G),ue=f(ae),ce=p(ae,2);let pe;var ge=f(ce),N=p(ce,2),le=f(N);q((me,ye)=>{A(ue,P),pe=ve(ce,"",pe,me),A(ge,P),A(le,`${i(M).sizeRem??""}rem / ${ye??""}px`)},[()=>({"font-size":`${i(M).sizePx.toFixed(1)??""}px`}),()=>i(M).sizePx.toFixed(1)]),z(Y,G)};fe(U,Y=>{i(M)&&Y(I)})}z(k,V)}),z(T,D)};fe(O,T=>{i(m).length>0&&T(L)})}q(()=>A(B,`${i(n)??""}px`)),zt(S,()=>i(n),T=>K(n,T)),z(e,b),ke()}var Pl=F(""),Ll=F(""),Vl=F('
'),Il=F('
Scale Generator Computes all step min/max values from a modular scale. Click Apply to write them to the fields below.
');function ql(e,t){xe(t,!0);const s=[{label:"Minor Second (1.067)",value:1.067},{label:"Major Second (1.125)",value:1.125},{label:"Minor Third (1.200)",value:1.2},{label:"Major Third (1.250)",value:1.25},{label:"Perfect Fourth (1.333)",value:1.333},{label:"Aug. Fourth (1.414)",value:1.414},{label:"Perfect Fifth (1.500)",value:1.5},{label:"Golden Ratio (1.618)",value:1.618},{label:"Major Sixth (1.667)",value:1.667},{label:"Octave (2.000)",value:2}],a=[{name:"2xs",idx:-4},{name:"xs",idx:-3},{name:"s",idx:-2},{name:"m",idx:0},{name:"l",idx:1},{name:"xl",idx:2},{name:"2xl",idx:3},{name:"3xl",idx:4},{name:"4xl",idx:5},{name:"display-s",idx:5},{name:"display-m",idx:6},{name:"display-l",idx:7}];let r=te(1),n=te(1.25),l=te(1.25),o=te(1.333),c=te(.85);const d=j(()=>a.map(({name:k,idx:P})=>{const V=k.startsWith("display")?i(c):1,U=+(i(r)*V*Math.pow(i(l),P)).toFixed(4),I=+(i(n)*V*Math.pow(i(o),P)).toFixed(4);return{name:k,min:U,max:I}}));function _(){H.typography||(H.typography={});for(const{name:k,min:P,max:M}of i(d))H.typography[`size_${k}_min`]=String(P),H.typography[`size_${k}_max`]=String(M);tr()}var v=Il(),u=p(f(v),2),m=f(u),b=p(f(m),2),w=f(b),h=p(m,2),y=p(f(h),2),S=f(y),C=p(h,2),R=p(f(C),2);ne(R,21,()=>s,k=>k.value,(k,P)=>{var M=Pl(),V=f(M),U={};q(()=>{A(V,i(P).label),U!==(U=i(P).value)&&(M.value=(M.__value=i(P).value)??"")}),z(k,M)});var B=p(C,2),E=p(f(B),2);ne(E,21,()=>s,k=>k.value,(k,P)=>{var M=Ll(),V=f(M),U={};q(()=>{A(V,i(P).label),U!==(U=i(P).value)&&(M.value=(M.__value=i(P).value)??"")}),z(k,M)});var $=p(B,2),O=p(f($),2),L=f(O),T=p(u,2);ne(T,21,()=>i(d),({name:k,min:P,max:M})=>k,(k,P)=>{let M=()=>i(P).name,V=()=>i(P).min,U=()=>i(P).max;var I=Vl();let Y;var G=f(I),ae=f(G),ue=p(G,2),ce=f(ue);q((pe,ge,N)=>{Y=rt(I,1,"scale-gen__step svelte-1y8fkhh",null,Y,pe),A(ae,M()),A(ce,`${ge??""} / ${N??""}`)},[()=>({display:M().startsWith("display")}),()=>V().toFixed(3),()=>U().toFixed(3)]),z(k,I)});var D=p(T,2),x=f(D);zt(w,()=>i(r),k=>K(r,k)),zt(S,()=>i(n),k=>K(n,k)),ia(R,()=>i(l),k=>K(l,k)),ia(E,()=>i(o),k=>K(o,k)),zt(L,()=>i(c),k=>K(c,k)),he("click",x,_),z(e,v),ke()}De(["click"]);var Nl=F('
'),Bl=F('

Additional Font Families

Scale Multipliers

',1),Kl=F('

Font Families

Font Size Scale

Min and max values in rem for fluid type scaling via clamp().

');function Hl(e,t){xe(t,!0);const s="typography",a=re.defaults?.[s]??{},r=a.font_families??{},n=a.font_sizes??{},l=h=>h.charAt(0).toUpperCase()+h.slice(1),o=["body","heading"],c=Object.fromEntries(Object.entries(r).filter(([h])=>o.includes(h))),d=Object.fromEntries(Object.entries(r).filter(([h])=>!o.includes(h)));var _=Kl(),v=p(f(_),2);ne(v,21,()=>Object.entries(c),([h,y])=>h,(h,y)=>{var S=j(()=>ot(i(y),2));let C=()=>i(S)[0],R=()=>i(S)[1];{let B=j(()=>`font_${C()}`),E=j(()=>l(C())),$=j(()=>`--sf-font-${C()}`);oa(h,{section:s,get fieldKey(){return i(B)},get label(){return i(E)},get default(){return R()},get cssVar(){return i($)},width:"420px"})}});var u=p(v,6);ql(u,{});var m=p(u,2);ne(m,21,()=>Object.entries(n),([h,y])=>h,(h,y)=>{var S=j(()=>ot(i(y),2));let C=()=>i(S)[0],R=()=>i(S)[1];var B=Nl(),E=f(B),$=f(E),O=f($),L=p($,2),T=f(L),D=p(E,2),x=f(D);{let P=j(()=>`size_${C()}_min`);ut(x,{section:s,get fieldKey(){return i(P)},label:"Min",min:0,step:.01,get default(){return R().min},width:"80px"})}var k=p(x,2);{let P=j(()=>`size_${C()}_max`);ut(k,{section:s,get fieldKey(){return i(P)},label:"Max",min:0,step:.01,get default(){return R().max},width:"80px"})}q(()=>{A(O,C()),A(T,`--sf-text-${C()??""}`)}),z(h,B)});var b=p(m,2);Dl(b,{});var w=p(b,2);ga(w,{children:(h,y)=>{var S=Bl(),C=p(yt(S),2);ne(C,21,()=>Object.entries(d),([$,O])=>$,($,O)=>{var L=j(()=>ot(i(O),2));let T=()=>i(L)[0],D=()=>i(L)[1];{let x=j(()=>`font_${T()}`),k=j(()=>l(T())),P=j(()=>`--sf-font-${T()}`);oa($,{section:s,get fieldKey(){return i(x)},get label(){return i(k)},get default(){return D()},get cssVar(){return i(P)},width:"420px"})}});var R=p(C,4),B=f(R);{let $=j(()=>a.scale_multipliers?.text_scale??1);ut(B,{section:s,fieldKey:"text_scale",label:"Text Scale",min:0,step:.05,get default(){return i($)},cssVar:"--sf-text-scale"})}var E=p(B,2);{let $=j(()=>a.scale_multipliers?.text_display_scale??1);ut(E,{section:s,fieldKey:"text_display_scale",label:"Display Scale",min:0,step:.05,get default(){return i($)},cssVar:"--sf-text-display-scale"})}z(h,S)},$$slots:{default:!0}}),z(e,_),ke()}var Ul=F('
'),Gl=F('

Live Scale Preview

Card heading
');function Wl(e,t){xe(t,!0);const s=360,a=1440;let r=te(a);const n=re.defaults?.spacing??{},l=n.space_sizes??{};function o(I){const Y=H.spacing??{},G=l[I]??{},ae=Y[`space_${I}_min`],ue=Y[`space_${I}_max`],ce=ae!==void 0&&ae!==""?parseFloat(ae):G.min??1,pe=ue!==void 0&&ue!==""?parseFloat(ue):G.max??1;return{min:ce,max:pe}}const c=j(()=>{const I=parseFloat(H.spacing?.space_scale??n.space_scale??1)||1,Y=Math.max(0,Math.min(1,(i(r)-s)/(a-s))),G=["2xs","xs","s","m","l","xl","2xl","3xl","4xl"],ae=o("4xl").max*I;return G.map(ue=>{const{min:ce,max:pe}=o(ue),ge=(ce+(pe-ce)*Y)*I,N=ge/ae*100;return{name:ue,sizeRem:ge.toFixed(3),barPct:Math.min(N,100)}})}),d=j(()=>{const I=parseFloat(H.spacing?.space_scale??n.space_scale??1)||1,Y=Math.max(0,Math.min(1,(i(r)-s)/(a-s))),G=ae=>{const{min:ue,max:ce}=o(ae);return((ue+(ce-ue)*Y)*I).toFixed(3)};return{xs:G("xs"),s:G("s"),m:G("m"),l:G("l")}});var _=Gl(),v=f(_),u=p(f(v),2),m=f(u);m.textContent="360px";var b=p(m,2);Q(b,"min",s),Q(b,"max",a);var w=p(b,2);w.textContent="1440px";var h=p(w,2),y=f(h),S=p(v,2);ne(S,21,()=>i(c),I=>I.name,(I,Y)=>{var G=Ul(),ae=f(G),ue=f(ae),ce=p(ae,2),pe=f(ce);let ge;var N=p(ce,2),le=f(N);q(()=>{A(ue,`--sf-space-${i(Y).name??""}`),ge=ve(pe,"",ge,{width:`${i(Y).barPct??""}%`}),A(le,`${i(Y).sizeRem??""}rem`)}),z(I,G)});var C=p(S,2),R=f(C),B=f(R),E=p(R,2);let $;var O=f(E);let L;var T=p(f(O),2),D=p(f(T),2),x=f(D),k=p(O,2),P=f(k),M=p(k,2);let V;var U=p(f(M),2);ve(U,"",{},{width:"3rem"}),q(()=>{A(y,`${i(r)??""}px`),A(B,`Container context at ${i(r)??""}px`),$=ve(E,"",$,{padding:`${i(d).m??""}rem`,gap:`${i(d).s??""}rem`}),L=ve(O,"",L,{gap:`${i(d).s??""}rem`}),A(x,`padding: ${i(d).m??""}rem`),A(P,`Body section · gap between rows: ${i(d).s??""}rem`),V=ve(M,"",V,{gap:`${i(d).xs??""}rem`,"padding-top":`${i(d).xs??""}rem`})}),zt(b,()=>i(r),I=>K(r,I)),z(e,_),ke()}var Yl=F('
'),Xl=F('

Space Aliases

',1),Zl=F(`

Spacing

Space Scale Steps

Min and max values in rem for fluid spacing via clamp(). - Leave both fields blank to use the framework defaults.

`);function Jl(e,t){xe(t,!0);const s="spacing",a=re.defaults?.[s]??{},r=a.space_sizes??{},n=[{key:"gutter",label:"Gutter",cssVar:"--sf-space-gutter"},{key:"gap",label:"Gap",cssVar:"--sf-gap"},{key:"content_gap",label:"Content Gap",cssVar:"--sf-content-gap"},{key:"component_pad",label:"Component Pad",cssVar:"--sf-component-pad"},{key:"section_pad",label:"Section Pad",cssVar:"--sf-section-pad"}];var l=Zl(),o=p(f(l),2),c=f(o);{let u=j(()=>a.space_scale??1);ut(c,{section:s,fieldKey:"space_scale",label:"Space Scale",min:0,step:.05,get default(){return i(u)},cssVar:"--sf-space-scale"})}var d=p(o,6);ne(d,21,()=>Object.entries(r),([u,m])=>u,(u,m)=>{var b=j(()=>ot(i(m),2));let w=()=>i(b)[0],h=()=>i(b)[1];var y=Yl(),S=f(y),C=f(S),R=f(C),B=p(C,2),E=f(B),$=p(S,2),O=f($);{let T=j(()=>`space_${w()}_min`);ut(O,{section:s,get fieldKey(){return i(T)},label:"Min",min:0,step:.01,get default(){return h().min},width:"80px"})}var L=p(O,2);{let T=j(()=>`space_${w()}_max`);ut(L,{section:s,get fieldKey(){return i(T)},label:"Max",min:0,step:.01,get default(){return h().max},width:"80px"})}q(()=>{A(R,w()),A(E,`--sf-space-${w()??""}`)}),z(u,y)});var _=p(d,2);Wl(_,{});var v=p(_,2);ga(v,{children:(u,m)=>{var b=Xl(),w=p(yt(b),2);ne(w,21,()=>n,h=>h.key,(h,y)=>{{let S=j(()=>a[i(y).key]??"");oa(h,{section:s,get fieldKey(){return i(y).key},get label(){return i(y).label},get default(){return i(S)},get cssVar(){return i(y).cssVar},mono:!0})}}),z(u,b)},$$slots:{default:!0}}),z(e,l),ke()}var Ql=F(' '),eo=F(' ',1);function os(e,t){xe(t,!0);let s=_e(t,"cssVar",3,""),a=_e(t,"unit",3,""),r=_e(t,"description",3,"");const n=j(()=>H[t.section]?.[t.fieldKey]===void 0||H[t.section]?.[t.fieldKey]===null?"":String(H[t.section][t.fieldKey])),l=j(()=>i(n)===""||Number.isNaN(Number(i(n)))?Number(t.default):Number(i(n)));function o(d){ks(t.section,t.fieldKey,d.currentTarget.value)}function c(d){ks(t.section,t.fieldKey,d.currentTarget.value)}ma(e,{get label(){return t.label},get cssVar(){return s()},get fieldId(){return t.fieldKey},get description(){return r()},children:(d,_)=>{var v=eo(),u=yt(v),m=p(u,2),b=p(m,2);{var w=h=>{var y=Ql(),S=f(y);q(()=>A(S,a())),z(h,y)};fe(b,h=>{a()&&h(w)})}q(h=>{Q(u,"min",t.min),Q(u,"max",t.max),Q(u,"step",t.step),la(u,i(l)),Q(m,"id",t.fieldKey),Q(m,"min",t.min),Q(m,"max",t.max),Q(m,"step",t.step),la(m,i(n)),Q(m,"placeholder",h)},[()=>String(t.default)]),he("input",u,o),he("input",m,c),z(d,v)},$$slots:{default:!0}}),ke()}De(["input"]);var to=F(""),so=F('');function ao(e,t){xe(t,!0);let s=_e(t,"options",19,()=>[]),a=_e(t,"default",3,""),r=_e(t,"cssVar",3,""),n=_e(t,"description",3,"");const l=j(()=>s().map(d=>typeof d=="string"?{value:d,label:d}:d)),o=j(()=>H[t.section]?.[t.fieldKey]===void 0||H[t.section]?.[t.fieldKey]===null?"":String(H[t.section][t.fieldKey]));function c(d){ks(t.section,t.fieldKey,d.currentTarget.value)}ma(e,{get label(){return t.label},get cssVar(){return r()},get fieldId(){return t.fieldKey},get description(){return n()},children:(d,_)=>{var v=so(),u=f(v),m=f(u);u.value=u.__value="";var b=p(u);ne(b,17,()=>i(l),h=>h.value,(h,y)=>{var S=to(),C=f(S),R={};q(()=>{A(C,i(y).label),R!==(R=i(y).value)&&(S.value=(S.__value=i(y).value)??"")}),z(h,S)});var w;yn(v),q(()=>{Q(v,"id",t.fieldKey),A(m,`Default (${a()??""})`),w!==(w=i(o))&&(v.value=(v.__value=i(o))??"",er(v,i(o)))}),he("change",v,c),z(d,v)},$$slots:{default:!0}}),ke()}De(["change"]);var ro=F('
'),no=F('
'),io=F('
'),lo=F('

Shadow

Motion — Durations

Base duration values in milliseconds.

Z-Index

Z-index layer values for stacking context management.

Contrast

',1),oo=F('

Radius

Shadows

Motion

Accessibility

');function co(e,t){xe(t,!0);const s=re.defaults?.radius??{},a=re.defaults?.shadows??{},r=re.defaults?.motion??{},n=re.defaults?.zindex??{},l=re.defaults?.contrast??{},o=r.durations??{},c=N=>N.charAt(0).toUpperCase()+N.slice(1),d=[0,2,4,8,12,16,24,9999],_=["none","xs","s","m","l","xl","2xl","full"],v=j(()=>parseFloat(H.radius?.radius_scale??re.defaults?.radius?.radius_scale??1)),u=j(()=>d.map(N=>N*i(v))),m=j(()=>parseFloat(H.shadows?.shadow_strength??a.shadow_strength??.08)),b=j(()=>parseFloat(H.motion?.motion_scale??r.motion_scale??1)||1),w=["instant","fast","normal","slow","slower"],h=j(()=>w.map(N=>{const le=H.motion?.[`duration_${N}`],me=parseFloat(le!==void 0&&le!==""?le:o[N]??0);return{name:N,ms:Math.round(me*i(b))}})),y=(N,le)=>parseFloat(N!==void 0&&N!==""?N:le),S=j(()=>y(H.contrast?.focus_ring_width,l.focus_ring_width??2)),C=j(()=>y(H.contrast?.focus_ring_offset,l.focus_ring_offset??2)),R=j(()=>H.contrast?.focus_ring_style??l.focus_ring_style??"solid"),B=j(()=>[{label:"xs",shadow:`0 1px 2px 0 rgba(0,0,0,${(i(m)*.5).toFixed(4)})`},{label:"s",shadow:`0 1px 2px 0 rgba(0,0,0,${(i(m)*.5).toFixed(4)}), 0 2px 6px 0 rgba(0,0,0,${i(m).toFixed(4)})`},{label:"m",shadow:`0 1px 3px 0 rgba(0,0,0,${(i(m)*.5).toFixed(4)}), 0 4px 12px 0 rgba(0,0,0,${(i(m)*2).toFixed(4)})`},{label:"l",shadow:`0 2px 4px 0 rgba(0,0,0,${(i(m)*.5).toFixed(4)}), 0 8px 24px 0 rgba(0,0,0,${(i(m)*3).toFixed(4)})`},{label:"xl",shadow:`0 2px 8px 0 rgba(0,0,0,${(i(m)*.5).toFixed(4)}), 0 12px 36px 0 rgba(0,0,0,${(i(m)*3.5).toFixed(4)})`},{label:"glow",shadow:`0 0 15px 2px rgba(74,48,208,${Math.min(i(m)*2,.7).toFixed(4)})`}]);var E=oo(),$=p(f(E),2),O=f($);{let N=j(()=>s.radius_scale??1);ut(O,{section:"radius",fieldKey:"radius_scale",label:"Radius Scale",min:0,step:.1,get default(){return i(N)},cssVar:"--sf-radius-scale"})}var L=p($,2);ne(L,23,()=>i(u),(N,le)=>_[le],(N,le,me)=>{var ye=ro(),Ce=f(ye);let $e;var Fe=p(Ce,2),oe=f(Fe);q(()=>{$e=ve(Ce,"",$e,{"border-radius":d[i(me)]===9999?"9999px":`${i(le)}px`}),A(oe,_[i(me)])}),z(N,ye)});var T=p(L,4),D=f(T);{let N=j(()=>a.shadow_strength??.08);os(D,{section:"shadows",fieldKey:"shadow_strength",label:"Shadow Strength",description:"Base opacity for shadow layers (0–1).",min:0,max:1,step:.01,get default(){return i(N)},cssVar:"--sf-shadow-strength"})}var x=p(T,2);ne(x,21,()=>i(B),N=>N.label,(N,le)=>{var me=no(),ye=f(me);let Ce;var $e=f(ye);q(()=>{Ce=ve(ye,"",Ce,{"box-shadow":i(le).shadow}),A($e,i(le).label)}),z(N,me)});var k=p(x,4),P=f(k);{let N=j(()=>r.motion_scale??1);ut(P,{section:"motion",fieldKey:"motion_scale",label:"Motion Scale",min:0,step:.1,get default(){return i(N)},cssVar:"--sf-motion-scale"})}var M=p(k,2);ne(M,21,()=>i(h),N=>N.name,(N,le)=>{var me=io(),ye=f(me),Ce=f(ye),$e=p(ye,2),Fe=f($e);let oe;var Se=p($e,2),be=f(Se);q(()=>{A(Ce,i(le).name),oe=ve(Fe,"",oe,{"animation-duration":`${i(le).ms??""}ms`}),A(be,`${i(le).ms??""}ms`)}),z(N,me)});var V=p(M,4),U=f(V);{let N=j(()=>l.focus_ring_width??2);os(U,{section:"contrast",fieldKey:"focus_ring_width",label:"Focus Ring Width",min:0,max:8,step:.5,get default(){return i(N)},cssVar:"--sf-focus-ring-width",unit:"px"})}var I=p(U,2);{let N=j(()=>l.focus_ring_offset??2);os(I,{section:"contrast",fieldKey:"focus_ring_offset",label:"Focus Ring Offset",min:0,max:8,step:.5,get default(){return i(N)},cssVar:"--sf-focus-ring-offset",unit:"px"})}var Y=p(I,2);{let N=j(()=>l.focus_ring_style??"solid");ao(Y,{section:"contrast",fieldKey:"focus_ring_style",label:"Focus Ring Style",options:["solid","dashed","dotted","double","none"],get default(){return i(N)},cssVar:"--sf-focus-ring-style"})}var G=p(V,2),ae=f(G);let ue;var ce=p(ae,2),pe=f(ce),ge=p(G,2);ga(ge,{children:(N,le)=>{var me=lo(),ye=p(yt(me),2),Ce=f(ye);{let we=j(()=>a.glow_color??"");oa(Ce,{section:"shadows",fieldKey:"glow_color",label:"Glow Color",get default(){return i(we)},cssVar:"--sf-shadow-glow-color",mono:!0})}var $e=p(ye,6);ne($e,21,()=>Object.entries(o),([we,it])=>we,(we,it)=>{var xt=j(()=>ot(i(it),2));let pt=()=>i(xt)[0],Re=()=>i(xt)[1];{let kt=j(()=>`duration_${pt()}`),St=j(()=>c(pt())),kn=j(()=>`--sf-duration-${pt()}`);ut(we,{section:"motion",get fieldKey(){return i(kt)},get label(){return i(St)},min:0,step:10,get default(){return Re()},get cssVar(){return i(kn)},unit:"ms"})}});var Fe=p($e,6);ne(Fe,21,()=>Object.entries(n),([we,it])=>we,(we,it)=>{var xt=j(()=>ot(i(it),2));let pt=()=>i(xt)[0],Re=()=>i(xt)[1];{let kt=j(()=>c(pt())),St=j(()=>`--sf-z-${pt()}`);ut(we,{section:"zindex",get fieldKey(){return pt()},get label(){return i(kt)},step:1,get default(){return Re()},get cssVar(){return i(St)}})}});var oe=p(Fe,4),Se=f(oe);{let we=j(()=>l.contrast_bias??0);os(Se,{section:"contrast",fieldKey:"contrast_bias",label:"Contrast Bias",description:"Shifts derived shades up (positive) or down (negative).",min:-.2,max:.2,step:.01,get default(){return i(we)},cssVar:"--sf-contrast-bias"})}var be=p(Se,2);{let we=j(()=>l.contrast_threshold??.6);os(be,{section:"contrast",fieldKey:"contrast_threshold",label:"Contrast Threshold",description:"Lightness threshold for text-on-color (white vs. black).",min:0,max:1,step:.01,get default(){return i(we)},cssVar:"--sf-contrast-threshold"})}var Ke=p(be,2);{let we=j(()=>l.opacity_disabled??.45);os(Ke,{section:"contrast",fieldKey:"opacity_disabled",label:"Disabled Opacity",min:0,max:1,step:.01,get default(){return i(we)},cssVar:"--sf-opacity-disabled"})}z(N,me)},$$slots:{default:!0}}),q(()=>{ue=ve(ae,"",ue,{"--fp-width":`${i(S)??""}px`,"--fp-offset":`${i(C)??""}px`,"--fp-style":i(R)}),A(pe,`${i(S)??""}px ${i(R)??""} · ${i(C)??""}px offset`)}),z(e,E),ke()}var fo=F('
  • '),uo=F('
      '),vo=F('
      '),po=F(`

      All --sf-* custom properties declared in the active SLASHED bundle, - grouped by category.

      `);function ho(e,t){xe(t,!0);const s=re.inventory?.variables??[],a={color:"Colors",text:"Typography",font:"Typography",leading:"Typography",tracking:"Typography",body:"Typography",heading:"Typography",h1:"Typography",h2:"Typography",h3:"Typography",h4:"Typography",h5:"Typography",h6:"Typography",prose:"Typography",code:"Typography",optical:"Typography",line:"Typography",space:"Spacing",gap:"Spacing",gutter:"Spacing",component:"Spacing",section:"Spacing",flow:"Spacing",safe:"Spacing",header:"Spacing",sticky:"Spacing",size:"Sizing",aspect:"Sizing",ratio:"Sizing",touch:"Sizing",container:"Layout",stack:"Layout",cluster:"Layout",sidebar:"Layout",switcher:"Layout",grid:"Layout",cover:"Layout",frame:"Layout",reel:"Layout",imposter:"Layout",bento:"Layout",box:"Layout",center:"Layout",content:"Layout",breakout:"Layout",divider:"Layout",field:"Layout",border:"Borders",stroke:"Borders",radius:"Radius",shadow:"Shadows",blur:"Effects",opacity:"Effects",gradient:"Effects",mask:"Effects",perspective:"Effects",drop:"Effects",contrast:"Effects",duration:"Motion",ease:"Motion",transition:"Motion",motion:"Motion",animation:"Motion",icon:"Icons",z:"Z-Index",is:"States",current:"States",focus:"Focus",caret:"Focus",scroll:"Scroll",scrollbar:"Scroll",print:"Print",truncate:"Misc"},r=["Colors","Typography","Spacing","Sizing","Layout","Borders","Radius","Shadows","Effects","Motion","Icons","Z-Index","States","Focus","Scroll","Print","Misc"];function n(b){let w=b;w.startsWith("--sf-")&&(w=w.slice(5));const h=w.indexOf("-"),y=h===-1?w:w.slice(0,h);return a[y]||"Misc"}function l(b){const w={};for(const y of b){const S=n(y);w[S]||(w[S]=[]),w[S].push(y)}const h=[];for(const y of r)w[y]?.length&&(w[y].sort(),h.push({category:y,items:w[y]}));for(const y of Object.keys(w))!r.includes(y)&&w[y]?.length&&(w[y].sort(),h.push({category:y,items:w[y]}));return h}const o=l(s);let c=Ne({});function d(b){c[b]=!c[b]}var _=po(),v=f(_),u=f(v),m=p(v,4);ne(m,17,()=>o,({category:b,items:w})=>b,(b,w)=>{let h=()=>i(w).category,y=()=>i(w).items;var S=vo(),C=f(S),R=f(C),B=f(R),E=p(R,2),$=f(E),O=p(E,2),L=f(O),T=p(C,2);{var D=x=>{var k=uo();ne(k,20,y,P=>P,(P,M)=>{var V=fo(),U=f(V),I=f(U);q(()=>A(I,M)),z(P,V)}),z(x,k)};fe(T,x=>{c[h()]&&x(D)})}q(()=>{Q(C,"aria-expanded",c[h()]?"true":"false"),A(B,c[h()]?"▼":"▶"),A($,h()),A(L,`(${y().length??""})`)}),he("click",C,()=>d(h())),z(b,S)}),q(()=>A(u,`CSS Variables (${s.length??""})`)),z(e,_),ke()}De(["click"]);var _o=F('
    • '),go=F('
        '),mo=F('
      • '),bo=F('
          '),yo=F('

          All utility and state classes declared in the active SLASHED bundle.

          ');function wo(e,t){xe(t,!0);const s=re.inventory?.sf_classes??[],a=re.inventory?.is_classes??[];let r=te(!1),n=te(!1);var l=yo(),o=f(l),c=f(o),d=p(o,4),_=f(d),v=f(_),u=f(v),m=p(v,4),b=f(m),w=p(_,2);{var h=L=>{var T=go();ne(T,20,()=>s,D=>D,(D,x)=>{var k=_o(),P=f(k),M=f(P);q(()=>A(M,`.${x??""}`)),z(D,k)}),z(L,T)};fe(w,L=>{i(r)&&L(h)})}var y=p(d,2),S=f(y),C=f(S),R=f(C),B=p(C,4),E=f(B),$=p(S,2);{var O=L=>{var T=bo();ne(T,20,()=>a,D=>D,(D,x)=>{var k=mo(),P=f(k),M=f(P);q(()=>A(M,`.${x??""}`)),z(D,k)}),z(L,T)};fe($,L=>{i(n)&&L(O)})}q(()=>{A(c,`Registered Classes (${s.length+a.length})`),Q(_,"aria-expanded",i(r)?"true":"false"),A(u,i(r)?"▼":"▶"),A(b,`(${s.length??""})`),Q(S,"aria-expanded",i(n)?"true":"false"),A(R,i(n)?"▼":"▶"),A(E,`(${a.length??""})`)}),he("click",_,()=>K(r,!i(r))),he("click",S,()=>K(n,!i(n))),z(e,l),ke()}De(["click"]);async function ba(e,t){const{url:s,nonce:a}=re.rest;if(!s)return console.info("[slashed-admin] (dev) would POST",e,t),{ok:!0,dev:!0};const r=await fetch(s+e,{method:"POST",credentials:"same-origin",headers:{"Content-Type":"application/json","X-WP-Nonce":a},body:JSON.stringify(t)});if(!r.ok){const n=await r.text();throw new Error(n||`HTTP ${r.status}`)}return r.json()}function yr(e,t){return ba("/tokens",{section:e,values:t})}function wr(e){return ba("/tokens/reset",{section:e})}function xo(e){return ba("/settings",e)}async function ko(){const{url:e,nonce:t}=re.rest;if(!e)return console.info("[slashed-admin] (dev) would GET /tokens/export"),{schema_version:"1",tokens:{},plugin_settings:{},dev:!0};const s=await fetch(e+"/tokens/export",{credentials:"same-origin",headers:{"X-WP-Nonce":t}});if(!s.ok)throw new Error(await s.text()||`HTTP ${s.status}`);return s.json()}function So(e){return ba("/tokens/import",e)}var Eo=F('Saved'),jo=F(' '),To=F(`

          Bundle Info

          The SLASHED CSS bundle is loaded automatically by the plugin. The inventory + straight into the framework as the source of the brand scale.

          `);function kl(e,t){ke(t,!0);const s=ne.defaults?.colors??{},a=_=>_.charAt(0).toUpperCase()+_.slice(1),r=Object.entries(s.brand??{}),n=j(()=>dl("colors","dark_overrides_enabled")!=="0");function l(){Ss("colors","dark_overrides_enabled",i(n)?"0":"1")}var o=xl(),c=p(f(o),4);ie(c,21,()=>r,([_,v])=>_,(_,v)=>{var u=j(()=>ot(i(v),2));let m=()=>i(u)[0],b=()=>i(u)[1];{let w=j(()=>`brand_${m()}`),h=j(()=>a(m())),y=j(()=>s.brand_hex_hints?.[m()]??""),S=j(()=>`--sf-color-${m()}-light`);Gs(_,{get storeKey(){return i(w)},get label(){return i(h)},get hexHint(){return i(y)},get rawHint(){return b()},get cssVar(){return i(S)}})}});var d=p(c,2);ma(d,{children:(_,v)=>{var u=wl(),m=p(yt(u),2);ie(m,21,()=>Object.entries(s.status??{}),([E,C])=>E,(E,C)=>{var O=j(()=>ot(i(C),2));let L=()=>i(O)[0],T=()=>i(O)[1];{let D=j(()=>`status_${L()}`),x=j(()=>a(L())),k=j(()=>s.status_hex_hints?.[L()]??""),P=j(()=>`--sf-color-${L()}-light`);Gs(E,{get storeKey(){return i(D)},get label(){return i(x)},get hexHint(){return i(k)},get rawHint(){return T()},get cssVar(){return i(P)}})}});var b=p(m,2),w=f(b),h=f(w);let y;var S=p(h,2),$=f(S),R=p(b,2);{var B=E=>{var C=yl(),O=p(yt(C),2);ie(O,21,()=>Object.entries(s.brand_dark??s.brand??{}),([T])=>T,(T,D)=>{var x=j(()=>ot(i(D),1));let k=()=>i(x)[0];{let P=j(()=>`brand_dark_${k()}`),M=j(()=>a(k())),V=j(()=>s.brand_dark_hex_hints?.[k()]??""),U=j(()=>s.brand_dark?.[k()]??""),I=j(()=>`--sf-color-${k()}-dark`);Gs(T,{get storeKey(){return i(P)},get label(){return i(M)},get hexHint(){return i(V)},get rawHint(){return i(U)},get cssVar(){return i(I)}})}});var L=p(O,4);ie(L,21,()=>Object.entries(s.status_dark??s.status??{}),([T])=>T,(T,D)=>{var x=j(()=>ot(i(D),1));let k=()=>i(x)[0];{let P=j(()=>`status_dark_${k()}`),M=j(()=>a(k())),V=j(()=>s.status_dark_hex_hints?.[k()]??""),U=j(()=>s.status_dark?.[k()]??""),I=j(()=>`--sf-color-${k()}-dark`);Gs(T,{get storeKey(){return i(P)},get label(){return i(M)},get hexHint(){return i(V)},get rawHint(){return i(U)},get cssVar(){return i(I)}})}}),z(E,C)};fe(R,E=>{i(n)&&E(B)})}q(()=>{y=rt(h,1,"dark-toggle-btn svelte-1vle0rm",null,y,{on:i(n)}),Q(h,"aria-pressed",i(n)),A($,i(n)?"Active — custom values override auto-derivation":"Off — dark mode auto-derived from light source colors")}),he("click",h,l),z(_,u)},$$slots:{default:!0}}),z(e,o),Se()}De(["click"]);var Sl=F(''),El=F(' '),jl=F(' '),Tl=F('

          '),$l=F('
          ');function ba(e,t){let s=_e(t,"cssVar",3,""),a=_e(t,"fieldId",3,""),r=_e(t,"description",3,"");var n=$l(),l=f(n),o=f(l);{var c=h=>{var y=Sl(),S=f(y);q(()=>{Q(y,"for",a()),A(S,t.label)}),z(h,y)},d=h=>{var y=El(),S=f(y);q(()=>A(S,t.label)),z(h,y)};fe(o,h=>{a()?h(c):h(d,-1)})}var _=p(o,2);{var v=h=>{var y=jl(),S=f(y);q(()=>A(S,s())),z(h,y)};fe(_,h=>{s()&&h(v)})}var u=p(l,2),m=f(u);yn(m,()=>t.children??$r);var b=p(m,2);{var w=h=>{var y=Tl(),S=f(y);q(()=>A(S,r())),z(h,y)};fe(b,h=>{r()&&h(w)})}z(e,n)}var Cl=F('');function ca(e,t){ke(t,!0);let s=_e(t,"default",3,""),a=_e(t,"cssVar",3,""),r=_e(t,"description",3,""),n=_e(t,"mono",3,!1),l=_e(t,"width",3,"320px");const o=j(()=>H[t.section]?.[t.fieldKey]===void 0||H[t.section]?.[t.fieldKey]===null?"":String(H[t.section][t.fieldKey]));function c(d){Ss(t.section,t.fieldKey,d.currentTarget.value)}ba(e,{get label(){return t.label},get cssVar(){return a()},get fieldId(){return t.fieldKey},get description(){return r()},children:(d,_)=>{var v=Cl();let u,m;q(b=>{Q(v,"id",t.fieldKey),u=rt(v,1,"text svelte-j8yw6l",null,u,{mono:n()}),oa(v,i(o)),Q(v,"placeholder",b),m=ve(v,"",m,{width:l()})},[()=>String(s())]),he("input",v,c),z(d,v)},$$slots:{default:!0}}),Se()}De(["input"]);var zl=F(' '),Al=F(' ',1);function ut(e,t){ke(t,!0);let s=_e(t,"min",3,void 0),a=_e(t,"max",3,void 0),r=_e(t,"step",3,void 0),n=_e(t,"default",3,""),l=_e(t,"cssVar",3,""),o=_e(t,"unit",3,""),c=_e(t,"description",3,""),d=_e(t,"width",3,"120px");const _=j(()=>H[t.section]?.[t.fieldKey]===void 0||H[t.section]?.[t.fieldKey]===null?"":String(H[t.section][t.fieldKey]));function v(u){Ss(t.section,t.fieldKey,u.currentTarget.value)}ba(e,{get label(){return t.label},get cssVar(){return l()},get fieldId(){return t.fieldKey},get description(){return c()},children:(u,m)=>{var b=Al(),w=yt(b);let h;var y=p(w,2);{var S=$=>{var R=zl(),B=f(R);q(()=>A(B,o())),z($,R)};fe(y,$=>{o()&&$(S)})}q($=>{Q(w,"id",t.fieldKey),Q(w,"min",s()),Q(w,"max",a()),Q(w,"step",r()),oa(w,i(_)),Q(w,"placeholder",$),h=ve(w,"",h,{width:d()})},[()=>String(n())]),he("input",w,v),z(u,b)},$$slots:{default:!0}}),Se()}De(["input"]);var Fl=F('
          '),Rl=F('
          '),Ml=F('

          Display Scale

          '),Ol=F('

          Live Scale Preview

          Text Scale

          ');function Dl(e,t){ke(t,!0);const s=16,a=360,r=1520;let n=te(r);const o=(ne.defaults?.typography??{}).font_sizes??{};function c(T){const D=H.typography??{},x=o[T]??{},k=D[`size_${T}_min`],P=D[`size_${T}_max`],M=k!==void 0&&k!==""?parseFloat(k):x.min??.75,V=P!==void 0&&P!==""?parseFloat(P):x.max??1;return{min:M,max:V}}const d=j(()=>{const T=Math.max(0,Math.min(1,(i(n)-a)/(r-a))),D={};for(const x of Object.keys(o)){const{min:k,max:P}=c(x),M=k+(P-k)*T,V=M*s;D[x]={sizePx:V,sizeRem:M.toFixed(3)}}return D}),_=["2xs","xs","s","m","l","xl","2xl","3xl","4xl"],v=["display-s","display-m","display-l"],u=j(()=>_.filter(T=>o[T])),m=j(()=>v.filter(T=>o[T]));var b=Ol(),w=f(b),h=p(f(w),2),y=f(h);y.textContent="360px";var S=p(y,2);Q(S,"min",a),Q(S,"max",r);var $=p(S,2);$.textContent="1520px";var R=p($,2),B=f(R),E=p(w,2),C=p(f(E),2);ie(C,16,()=>i(u),T=>T,(T,D)=>{const x=j(()=>i(d)[D]);var k=hr(),P=yt(k);{var M=V=>{var U=Fl(),I=f(U),Y=f(I),G=p(I,2);let ae;var ue=f(G),ce=p(G,2),pe=f(ce);q((ge,N)=>{A(Y,D),ae=ve(G,"",ae,ge),A(ue,D),A(pe,`${i(x).sizeRem??""}rem / ${N??""}px`)},[()=>({"font-size":`${i(x).sizePx.toFixed(1)??""}px`}),()=>i(x).sizePx.toFixed(1)]),z(V,U)};fe(P,V=>{i(x)&&V(M)})}z(T,k)});var O=p(E,2);{var L=T=>{var D=Ml(),x=p(f(D),2);ie(x,16,()=>i(m),k=>k,(k,P)=>{const M=j(()=>i(d)[P]);var V=hr(),U=yt(V);{var I=Y=>{var G=Rl(),ae=f(G),ue=f(ae),ce=p(ae,2);let pe;var ge=f(ce),N=p(ce,2),oe=f(N);q((me,ye)=>{A(ue,P),pe=ve(ce,"",pe,me),A(ge,P),A(oe,`${i(M).sizeRem??""}rem / ${ye??""}px`)},[()=>({"font-size":`${i(M).sizePx.toFixed(1)??""}px`}),()=>i(M).sizePx.toFixed(1)]),z(Y,G)};fe(U,Y=>{i(M)&&Y(I)})}z(k,V)}),z(T,D)};fe(O,T=>{i(m).length>0&&T(L)})}q(()=>A(B,`${i(n)??""}px`)),zt(S,()=>i(n),T=>K(n,T)),z(e,b),Se()}var Pl=F(""),Ll=F(""),Vl=F('
          '),Il=F('
          Scale Generator Computes all step min/max values from a modular scale. Click Apply to write them to the fields below.
          ');function ql(e,t){ke(t,!0);const s=[{label:"Minor Second (1.067)",value:1.067},{label:"Major Second (1.125)",value:1.125},{label:"Minor Third (1.200)",value:1.2},{label:"Major Third (1.250)",value:1.25},{label:"Perfect Fourth (1.333)",value:1.333},{label:"Aug. Fourth (1.414)",value:1.414},{label:"Perfect Fifth (1.500)",value:1.5},{label:"Golden Ratio (1.618)",value:1.618},{label:"Major Sixth (1.667)",value:1.667},{label:"Octave (2.000)",value:2}],a=[{name:"2xs",idx:-4},{name:"xs",idx:-3},{name:"s",idx:-2},{name:"m",idx:0},{name:"l",idx:1},{name:"xl",idx:2},{name:"2xl",idx:3},{name:"3xl",idx:4},{name:"4xl",idx:5},{name:"display-s",idx:5},{name:"display-m",idx:6},{name:"display-l",idx:7}];let r=te(1),n=te(1.25),l=te(1.25),o=te(1.333),c=te(.85);const d=j(()=>a.map(({name:k,idx:P})=>{const V=k.startsWith("display")?i(c):1,U=+(i(r)*V*Math.pow(i(l),P)).toFixed(4),I=+(i(n)*V*Math.pow(i(o),P)).toFixed(4);return{name:k,min:U,max:I}}));function _(){H.typography||(H.typography={});for(const{name:k,min:P,max:M}of i(d))H.typography[`size_${k}_min`]=String(P),H.typography[`size_${k}_max`]=String(M);sr()}var v=Il(),u=p(f(v),2),m=f(u),b=p(f(m),2),w=f(b),h=p(m,2),y=p(f(h),2),S=f(y),$=p(h,2),R=p(f($),2);ie(R,21,()=>s,k=>k.value,(k,P)=>{var M=Pl(),V=f(M),U={};q(()=>{A(V,i(P).label),U!==(U=i(P).value)&&(M.value=(M.__value=i(P).value)??"")}),z(k,M)});var B=p($,2),E=p(f(B),2);ie(E,21,()=>s,k=>k.value,(k,P)=>{var M=Ll(),V=f(M),U={};q(()=>{A(V,i(P).label),U!==(U=i(P).value)&&(M.value=(M.__value=i(P).value)??"")}),z(k,M)});var C=p(B,2),O=p(f(C),2),L=f(O),T=p(u,2);ie(T,21,()=>i(d),({name:k,min:P,max:M})=>k,(k,P)=>{let M=()=>i(P).name,V=()=>i(P).min,U=()=>i(P).max;var I=Vl();let Y;var G=f(I),ae=f(G),ue=p(G,2),ce=f(ue);q((pe,ge,N)=>{Y=rt(I,1,"scale-gen__step svelte-1y8fkhh",null,Y,pe),A(ae,M()),A(ce,`${ge??""} / ${N??""}`)},[()=>({display:M().startsWith("display")}),()=>V().toFixed(3),()=>U().toFixed(3)]),z(k,I)});var D=p(T,2),x=f(D);zt(w,()=>i(r),k=>K(r,k)),zt(S,()=>i(n),k=>K(n,k)),la(R,()=>i(l),k=>K(l,k)),la(E,()=>i(o),k=>K(o,k)),zt(L,()=>i(c),k=>K(c,k)),he("click",x,_),z(e,v),Se()}De(["click"]);var Nl=F('
          '),Bl=F('

          Additional Font Families

          Scale Multipliers

          ',1),Kl=F('

          Font Families

          Font Size Scale

          Min and max values in rem for fluid type scaling via clamp().

          ');function Hl(e,t){ke(t,!0);const s="typography",a=ne.defaults?.[s]??{},r=a.font_families??{},n=a.font_sizes??{},l=h=>h.charAt(0).toUpperCase()+h.slice(1),o=["body","heading"],c=Object.fromEntries(Object.entries(r).filter(([h])=>o.includes(h))),d=Object.fromEntries(Object.entries(r).filter(([h])=>!o.includes(h)));var _=Kl(),v=p(f(_),2);ie(v,21,()=>Object.entries(c),([h,y])=>h,(h,y)=>{var S=j(()=>ot(i(y),2));let $=()=>i(S)[0],R=()=>i(S)[1];{let B=j(()=>`font_${$()}`),E=j(()=>l($())),C=j(()=>`--sf-font-${$()}`);ca(h,{section:s,get fieldKey(){return i(B)},get label(){return i(E)},get default(){return R()},get cssVar(){return i(C)},width:"420px"})}});var u=p(v,6);ql(u,{});var m=p(u,2);ie(m,21,()=>Object.entries(n),([h,y])=>h,(h,y)=>{var S=j(()=>ot(i(y),2));let $=()=>i(S)[0],R=()=>i(S)[1];var B=Nl(),E=f(B),C=f(E),O=f(C),L=p(C,2),T=f(L),D=p(E,2),x=f(D);{let P=j(()=>`size_${$()}_min`);ut(x,{section:s,get fieldKey(){return i(P)},label:"Min",min:0,step:.01,get default(){return R().min},width:"80px"})}var k=p(x,2);{let P=j(()=>`size_${$()}_max`);ut(k,{section:s,get fieldKey(){return i(P)},label:"Max",min:0,step:.01,get default(){return R().max},width:"80px"})}q(()=>{A(O,$()),A(T,`--sf-text-${$()??""}`)}),z(h,B)});var b=p(m,2);Dl(b,{});var w=p(b,2);ma(w,{children:(h,y)=>{var S=Bl(),$=p(yt(S),2);ie($,21,()=>Object.entries(d),([C,O])=>C,(C,O)=>{var L=j(()=>ot(i(O),2));let T=()=>i(L)[0],D=()=>i(L)[1];{let x=j(()=>`font_${T()}`),k=j(()=>l(T())),P=j(()=>`--sf-font-${T()}`);ca(C,{section:s,get fieldKey(){return i(x)},get label(){return i(k)},get default(){return D()},get cssVar(){return i(P)},width:"420px"})}});var R=p($,4),B=f(R);{let C=j(()=>a.scale_multipliers?.text_scale??1);ut(B,{section:s,fieldKey:"text_scale",label:"Text Scale",min:0,step:.05,get default(){return i(C)},cssVar:"--sf-text-scale"})}var E=p(B,2);{let C=j(()=>a.scale_multipliers?.text_display_scale??1);ut(E,{section:s,fieldKey:"text_display_scale",label:"Display Scale",min:0,step:.05,get default(){return i(C)},cssVar:"--sf-text-display-scale"})}z(h,S)},$$slots:{default:!0}}),z(e,_),Se()}var Ul=F('
          '),Gl=F('

          Live Scale Preview

          Card heading
          ');function Wl(e,t){ke(t,!0);const s=360,a=1440;let r=te(a);const n=ne.defaults?.spacing??{},l=n.space_sizes??{};function o(I){const Y=H.spacing??{},G=l[I]??{},ae=Y[`space_${I}_min`],ue=Y[`space_${I}_max`],ce=ae!==void 0&&ae!==""?parseFloat(ae):G.min??1,pe=ue!==void 0&&ue!==""?parseFloat(ue):G.max??1;return{min:ce,max:pe}}const c=j(()=>{const I=parseFloat(H.spacing?.space_scale??n.space_scale??1)||1,Y=Math.max(0,Math.min(1,(i(r)-s)/(a-s))),G=["2xs","xs","s","m","l","xl","2xl","3xl","4xl"],ae=o("4xl").max*I;return G.map(ue=>{const{min:ce,max:pe}=o(ue),ge=(ce+(pe-ce)*Y)*I,N=ge/ae*100;return{name:ue,sizeRem:ge.toFixed(3),barPct:Math.min(N,100)}})}),d=j(()=>{const I=parseFloat(H.spacing?.space_scale??n.space_scale??1)||1,Y=Math.max(0,Math.min(1,(i(r)-s)/(a-s))),G=ae=>{const{min:ue,max:ce}=o(ae);return((ue+(ce-ue)*Y)*I).toFixed(3)};return{xs:G("xs"),s:G("s"),m:G("m"),l:G("l")}});var _=Gl(),v=f(_),u=p(f(v),2),m=f(u);m.textContent="360px";var b=p(m,2);Q(b,"min",s),Q(b,"max",a);var w=p(b,2);w.textContent="1440px";var h=p(w,2),y=f(h),S=p(v,2);ie(S,21,()=>i(c),I=>I.name,(I,Y)=>{var G=Ul(),ae=f(G),ue=f(ae),ce=p(ae,2),pe=f(ce);let ge;var N=p(ce,2),oe=f(N);q(()=>{A(ue,`--sf-space-${i(Y).name??""}`),ge=ve(pe,"",ge,{width:`${i(Y).barPct??""}%`}),A(oe,`${i(Y).sizeRem??""}rem`)}),z(I,G)});var $=p(S,2),R=f($),B=f(R),E=p(R,2);let C;var O=f(E);let L;var T=p(f(O),2),D=p(f(T),2),x=f(D),k=p(O,2),P=f(k),M=p(k,2);let V;var U=p(f(M),2);ve(U,"",{},{width:"3rem"}),q(()=>{A(y,`${i(r)??""}px`),A(B,`Container context at ${i(r)??""}px`),C=ve(E,"",C,{padding:`${i(d).m??""}rem`,gap:`${i(d).s??""}rem`}),L=ve(O,"",L,{gap:`${i(d).s??""}rem`}),A(x,`padding: ${i(d).m??""}rem`),A(P,`Body section · gap between rows: ${i(d).s??""}rem`),V=ve(M,"",V,{gap:`${i(d).xs??""}rem`,"padding-top":`${i(d).xs??""}rem`})}),zt(b,()=>i(r),I=>K(r,I)),z(e,_),Se()}var Yl=F('
          '),Xl=F('

          Space Aliases

          ',1),Zl=F(`

          Spacing

          Space Scale Steps

          Min and max values in rem for fluid spacing via clamp(). + Leave both fields blank to use the framework defaults.

          `);function Jl(e,t){ke(t,!0);const s="spacing",a=ne.defaults?.[s]??{},r=a.space_sizes??{},n=[{key:"gutter",label:"Gutter",cssVar:"--sf-space-gutter"},{key:"gap",label:"Gap",cssVar:"--sf-gap"},{key:"content_gap",label:"Content Gap",cssVar:"--sf-content-gap"},{key:"component_pad",label:"Component Pad",cssVar:"--sf-component-pad"},{key:"section_pad",label:"Section Pad",cssVar:"--sf-section-pad"}];var l=Zl(),o=p(f(l),2),c=f(o);{let u=j(()=>a.space_scale??1);ut(c,{section:s,fieldKey:"space_scale",label:"Space Scale",min:0,step:.05,get default(){return i(u)},cssVar:"--sf-space-scale"})}var d=p(o,6);ie(d,21,()=>Object.entries(r),([u,m])=>u,(u,m)=>{var b=j(()=>ot(i(m),2));let w=()=>i(b)[0],h=()=>i(b)[1];var y=Yl(),S=f(y),$=f(S),R=f($),B=p($,2),E=f(B),C=p(S,2),O=f(C);{let T=j(()=>`space_${w()}_min`);ut(O,{section:s,get fieldKey(){return i(T)},label:"Min",min:0,step:.01,get default(){return h().min},width:"80px"})}var L=p(O,2);{let T=j(()=>`space_${w()}_max`);ut(L,{section:s,get fieldKey(){return i(T)},label:"Max",min:0,step:.01,get default(){return h().max},width:"80px"})}q(()=>{A(R,w()),A(E,`--sf-space-${w()??""}`)}),z(u,y)});var _=p(d,2);Wl(_,{});var v=p(_,2);ma(v,{children:(u,m)=>{var b=Xl(),w=p(yt(b),2);ie(w,21,()=>n,h=>h.key,(h,y)=>{{let S=j(()=>a[i(y).key]??"");ca(h,{section:s,get fieldKey(){return i(y).key},get label(){return i(y).label},get default(){return i(S)},get cssVar(){return i(y).cssVar},mono:!0})}}),z(u,b)},$$slots:{default:!0}}),z(e,l),Se()}var Ql=F(' '),eo=F(' ',1);function cs(e,t){ke(t,!0);let s=_e(t,"cssVar",3,""),a=_e(t,"unit",3,""),r=_e(t,"description",3,"");const n=j(()=>H[t.section]?.[t.fieldKey]===void 0||H[t.section]?.[t.fieldKey]===null?"":String(H[t.section][t.fieldKey])),l=j(()=>i(n)===""||Number.isNaN(Number(i(n)))?Number(t.default):Number(i(n)));function o(d){Ss(t.section,t.fieldKey,d.currentTarget.value)}function c(d){Ss(t.section,t.fieldKey,d.currentTarget.value)}ba(e,{get label(){return t.label},get cssVar(){return s()},get fieldId(){return t.fieldKey},get description(){return r()},children:(d,_)=>{var v=eo(),u=yt(v),m=p(u,2),b=p(m,2);{var w=h=>{var y=Ql(),S=f(y);q(()=>A(S,a())),z(h,y)};fe(b,h=>{a()&&h(w)})}q(h=>{Q(u,"min",t.min),Q(u,"max",t.max),Q(u,"step",t.step),oa(u,i(l)),Q(m,"id",t.fieldKey),Q(m,"min",t.min),Q(m,"max",t.max),Q(m,"step",t.step),oa(m,i(n)),Q(m,"placeholder",h)},[()=>String(t.default)]),he("input",u,o),he("input",m,c),z(d,v)},$$slots:{default:!0}}),Se()}De(["input"]);var to=F(""),so=F('');function ao(e,t){ke(t,!0);let s=_e(t,"options",19,()=>[]),a=_e(t,"default",3,""),r=_e(t,"cssVar",3,""),n=_e(t,"description",3,"");const l=j(()=>s().map(d=>typeof d=="string"?{value:d,label:d}:d)),o=j(()=>H[t.section]?.[t.fieldKey]===void 0||H[t.section]?.[t.fieldKey]===null?"":String(H[t.section][t.fieldKey]));function c(d){Ss(t.section,t.fieldKey,d.currentTarget.value)}ba(e,{get label(){return t.label},get cssVar(){return r()},get fieldId(){return t.fieldKey},get description(){return n()},children:(d,_)=>{var v=so(),u=f(v),m=f(u);u.value=u.__value="";var b=p(u);ie(b,17,()=>i(l),h=>h.value,(h,y)=>{var S=to(),$=f(S),R={};q(()=>{A($,i(y).label),R!==(R=i(y).value)&&(S.value=(S.__value=i(y).value)??"")}),z(h,S)});var w;wn(v),q(()=>{Q(v,"id",t.fieldKey),A(m,`Default (${a()??""})`),w!==(w=i(o))&&(v.value=(v.__value=i(o))??"",tr(v,i(o)))}),he("change",v,c),z(d,v)},$$slots:{default:!0}}),Se()}De(["change"]);var ro=F('
          '),no=F('
          '),io=F('
          '),lo=F('

          Shadow

          Motion — Durations

          Base duration values in milliseconds.

          Z-Index

          Z-index layer values for stacking context management.

          Contrast

          ',1),oo=F('

          Radius

          Shadows

          Motion

          Accessibility

          ');function co(e,t){ke(t,!0);const s=ne.defaults?.radius??{},a=ne.defaults?.shadows??{},r=ne.defaults?.motion??{},n=ne.defaults?.zindex??{},l=ne.defaults?.contrast??{},o=r.durations??{},c=N=>N.charAt(0).toUpperCase()+N.slice(1),d=[0,2,4,8,12,16,24,9999],_=["none","xs","s","m","l","xl","2xl","full"],v=j(()=>parseFloat(H.radius?.radius_scale??ne.defaults?.radius?.radius_scale??1)),u=j(()=>d.map(N=>N*i(v))),m=j(()=>parseFloat(H.shadows?.shadow_strength??a.shadow_strength??.08)),b=j(()=>parseFloat(H.motion?.motion_scale??r.motion_scale??1)||1),w=["instant","fast","normal","slow","slower"],h=j(()=>w.map(N=>{const oe=H.motion?.[`duration_${N}`],me=parseFloat(oe!==void 0&&oe!==""?oe:o[N]??0);return{name:N,ms:Math.round(me*i(b))}})),y=(N,oe)=>parseFloat(N!==void 0&&N!==""?N:oe),S=j(()=>y(H.contrast?.focus_ring_width,l.focus_ring_width??2)),$=j(()=>y(H.contrast?.focus_ring_offset,l.focus_ring_offset??2)),R=j(()=>H.contrast?.focus_ring_style??l.focus_ring_style??"solid"),B=j(()=>[{label:"xs",shadow:`0 1px 2px 0 rgba(0,0,0,${(i(m)*.5).toFixed(4)})`},{label:"s",shadow:`0 1px 2px 0 rgba(0,0,0,${(i(m)*.5).toFixed(4)}), 0 2px 6px 0 rgba(0,0,0,${i(m).toFixed(4)})`},{label:"m",shadow:`0 1px 3px 0 rgba(0,0,0,${(i(m)*.5).toFixed(4)}), 0 4px 12px 0 rgba(0,0,0,${(i(m)*2).toFixed(4)})`},{label:"l",shadow:`0 2px 4px 0 rgba(0,0,0,${(i(m)*.5).toFixed(4)}), 0 8px 24px 0 rgba(0,0,0,${(i(m)*3).toFixed(4)})`},{label:"xl",shadow:`0 2px 8px 0 rgba(0,0,0,${(i(m)*.5).toFixed(4)}), 0 12px 36px 0 rgba(0,0,0,${(i(m)*3.5).toFixed(4)})`},{label:"glow",shadow:`0 0 15px 2px rgba(74,48,208,${Math.min(i(m)*2,.7).toFixed(4)})`}]);var E=oo(),C=p(f(E),2),O=f(C);{let N=j(()=>s.radius_scale??1);ut(O,{section:"radius",fieldKey:"radius_scale",label:"Radius Scale",min:0,step:.1,get default(){return i(N)},cssVar:"--sf-radius-scale"})}var L=p(C,2);ie(L,23,()=>i(u),(N,oe)=>_[oe],(N,oe,me)=>{var ye=ro(),Ce=f(ye);let ze;var Re=p(Ce,2),re=f(Re);q(()=>{ze=ve(Ce,"",ze,{"border-radius":d[i(me)]===9999?"9999px":`${i(oe)}px`}),A(re,_[i(me)])}),z(N,ye)});var T=p(L,4),D=f(T);{let N=j(()=>a.shadow_strength??.08);cs(D,{section:"shadows",fieldKey:"shadow_strength",label:"Shadow Strength",description:"Base opacity for shadow layers (0–1).",min:0,max:1,step:.01,get default(){return i(N)},cssVar:"--sf-shadow-strength"})}var x=p(T,2);ie(x,21,()=>i(B),N=>N.label,(N,oe)=>{var me=no(),ye=f(me);let Ce;var ze=f(ye);q(()=>{Ce=ve(ye,"",Ce,{"box-shadow":i(oe).shadow}),A(ze,i(oe).label)}),z(N,me)});var k=p(x,4),P=f(k);{let N=j(()=>r.motion_scale??1);ut(P,{section:"motion",fieldKey:"motion_scale",label:"Motion Scale",min:0,step:.1,get default(){return i(N)},cssVar:"--sf-motion-scale"})}var M=p(k,2);ie(M,21,()=>i(h),N=>N.name,(N,oe)=>{var me=io(),ye=f(me),Ce=f(ye),ze=p(ye,2),Re=f(ze);let re;var we=p(ze,2),be=f(we);q(()=>{A(Ce,i(oe).name),re=ve(Re,"",re,{"animation-duration":`${i(oe).ms??""}ms`}),A(be,`${i(oe).ms??""}ms`)}),z(N,me)});var V=p(M,4),U=f(V);{let N=j(()=>l.focus_ring_width??2);cs(U,{section:"contrast",fieldKey:"focus_ring_width",label:"Focus Ring Width",min:0,max:8,step:.5,get default(){return i(N)},cssVar:"--sf-focus-ring-width",unit:"px"})}var I=p(U,2);{let N=j(()=>l.focus_ring_offset??2);cs(I,{section:"contrast",fieldKey:"focus_ring_offset",label:"Focus Ring Offset",min:0,max:8,step:.5,get default(){return i(N)},cssVar:"--sf-focus-ring-offset",unit:"px"})}var Y=p(I,2);{let N=j(()=>l.focus_ring_style??"solid");ao(Y,{section:"contrast",fieldKey:"focus_ring_style",label:"Focus Ring Style",options:["solid","dashed","dotted","double","none"],get default(){return i(N)},cssVar:"--sf-focus-ring-style"})}var G=p(V,2),ae=f(G);let ue;var ce=p(ae,2),pe=f(ce),ge=p(G,2);ma(ge,{children:(N,oe)=>{var me=lo(),ye=p(yt(me),2),Ce=f(ye);{let xe=j(()=>a.glow_color??"");ca(Ce,{section:"shadows",fieldKey:"glow_color",label:"Glow Color",get default(){return i(xe)},cssVar:"--sf-shadow-glow-color",mono:!0})}var ze=p(ye,6);ie(ze,21,()=>Object.entries(o),([xe,pt])=>xe,(xe,pt)=>{var xt=j(()=>ot(i(pt),2));let it=()=>i(xt)[0],ls=()=>i(xt)[1];{let Ee=j(()=>`duration_${it()}`),kt=j(()=>c(it())),St=j(()=>`--sf-duration-${it()}`);ut(xe,{section:"motion",get fieldKey(){return i(Ee)},get label(){return i(kt)},min:0,step:10,get default(){return ls()},get cssVar(){return i(St)},unit:"ms"})}});var Re=p(ze,6);ie(Re,21,()=>Object.entries(n),([xe,pt])=>xe,(xe,pt)=>{var xt=j(()=>ot(i(pt),2));let it=()=>i(xt)[0],ls=()=>i(xt)[1];{let Ee=j(()=>c(it())),kt=j(()=>`--sf-z-${it()}`);ut(xe,{section:"zindex",get fieldKey(){return it()},get label(){return i(Ee)},step:1,get default(){return ls()},get cssVar(){return i(kt)}})}});var re=p(Re,4),we=f(re);{let xe=j(()=>l.contrast_bias??0);cs(we,{section:"contrast",fieldKey:"contrast_bias",label:"Contrast Bias",description:"Shifts derived shades up (positive) or down (negative).",min:-.2,max:.2,step:.01,get default(){return i(xe)},cssVar:"--sf-contrast-bias"})}var be=p(we,2);{let xe=j(()=>l.contrast_threshold??.6);cs(be,{section:"contrast",fieldKey:"contrast_threshold",label:"Contrast Threshold",description:"Lightness threshold for text-on-color (white vs. black).",min:0,max:1,step:.01,get default(){return i(xe)},cssVar:"--sf-contrast-threshold"})}var Ke=p(be,2);{let xe=j(()=>l.opacity_disabled??.45);cs(Ke,{section:"contrast",fieldKey:"opacity_disabled",label:"Disabled Opacity",min:0,max:1,step:.01,get default(){return i(xe)},cssVar:"--sf-opacity-disabled"})}z(N,me)},$$slots:{default:!0}}),q(()=>{ue=ve(ae,"",ue,{"--fp-width":`${i(S)??""}px`,"--fp-offset":`${i($)??""}px`,"--fp-style":i(R)}),A(pe,`${i(S)??""}px ${i(R)??""} · ${i($)??""}px offset`)}),z(e,E),Se()}var fo=F('
        • '),uo=F('
            '),vo=F('
            '),po=F(`

            All --sf-* custom properties declared in the active SLASHED bundle, + grouped by category.

            `);function ho(e,t){ke(t,!0);const s=ne.inventory?.variables??[],a={color:"Colors",text:"Typography",font:"Typography",leading:"Typography",tracking:"Typography",body:"Typography",heading:"Typography",h1:"Typography",h2:"Typography",h3:"Typography",h4:"Typography",h5:"Typography",h6:"Typography",prose:"Typography",code:"Typography",optical:"Typography",line:"Typography",space:"Spacing",gap:"Spacing",gutter:"Spacing",component:"Spacing",section:"Spacing",flow:"Spacing",safe:"Spacing",header:"Spacing",sticky:"Spacing",size:"Sizing",aspect:"Sizing",ratio:"Sizing",touch:"Sizing",container:"Layout",stack:"Layout",cluster:"Layout",sidebar:"Layout",switcher:"Layout",grid:"Layout",cover:"Layout",frame:"Layout",reel:"Layout",imposter:"Layout",bento:"Layout",box:"Layout",center:"Layout",content:"Layout",breakout:"Layout",divider:"Layout",field:"Layout",border:"Borders",stroke:"Borders",radius:"Radius",shadow:"Shadows",blur:"Effects",opacity:"Effects",gradient:"Effects",mask:"Effects",perspective:"Effects",drop:"Effects",contrast:"Effects",duration:"Motion",ease:"Motion",transition:"Motion",motion:"Motion",animation:"Motion",icon:"Icons",z:"Z-Index",is:"States",current:"States",focus:"Focus",caret:"Focus",scroll:"Scroll",scrollbar:"Scroll",print:"Print",truncate:"Misc"},r=["Colors","Typography","Spacing","Sizing","Layout","Borders","Radius","Shadows","Effects","Motion","Icons","Z-Index","States","Focus","Scroll","Print","Misc"];function n(b){let w=b;w.startsWith("--sf-")&&(w=w.slice(5));const h=w.indexOf("-"),y=h===-1?w:w.slice(0,h);return a[y]||"Misc"}function l(b){const w={};for(const y of b){const S=n(y);w[S]||(w[S]=[]),w[S].push(y)}const h=[];for(const y of r)w[y]?.length&&(w[y].sort(),h.push({category:y,items:w[y]}));for(const y of Object.keys(w))!r.includes(y)&&w[y]?.length&&(w[y].sort(),h.push({category:y,items:w[y]}));return h}const o=l(s);let c=Ne({});function d(b){c[b]=!c[b]}var _=po(),v=f(_),u=f(v),m=p(v,4);ie(m,17,()=>o,({category:b,items:w})=>b,(b,w)=>{let h=()=>i(w).category,y=()=>i(w).items;var S=vo(),$=f(S),R=f($),B=f(R),E=p(R,2),C=f(E),O=p(E,2),L=f(O),T=p($,2);{var D=x=>{var k=uo();ie(k,20,y,P=>P,(P,M)=>{var V=fo(),U=f(V),I=f(U);q(()=>A(I,M)),z(P,V)}),z(x,k)};fe(T,x=>{c[h()]&&x(D)})}q(()=>{Q($,"aria-expanded",c[h()]?"true":"false"),A(B,c[h()]?"▼":"▶"),A(C,h()),A(L,`(${y().length??""})`)}),he("click",$,()=>d(h())),z(b,S)}),q(()=>A(u,`CSS Variables (${s.length??""})`)),z(e,_),Se()}De(["click"]);var _o=F('
          • '),go=F('
              '),mo=F('
            • '),bo=F('
                '),yo=F('

                All utility and state classes declared in the active SLASHED bundle.

                ');function wo(e,t){ke(t,!0);const s=ne.inventory?.sf_classes??[],a=ne.inventory?.is_classes??[];let r=te(!1),n=te(!1);var l=yo(),o=f(l),c=f(o),d=p(o,4),_=f(d),v=f(_),u=f(v),m=p(v,4),b=f(m),w=p(_,2);{var h=L=>{var T=go();ie(T,20,()=>s,D=>D,(D,x)=>{var k=_o(),P=f(k),M=f(P);q(()=>A(M,`.${x??""}`)),z(D,k)}),z(L,T)};fe(w,L=>{i(r)&&L(h)})}var y=p(d,2),S=f(y),$=f(S),R=f($),B=p($,4),E=f(B),C=p(S,2);{var O=L=>{var T=bo();ie(T,20,()=>a,D=>D,(D,x)=>{var k=mo(),P=f(k),M=f(P);q(()=>A(M,`.${x??""}`)),z(D,k)}),z(L,T)};fe(C,L=>{i(n)&&L(O)})}q(()=>{A(c,`Registered Classes (${s.length+a.length})`),Q(_,"aria-expanded",i(r)?"true":"false"),A(u,i(r)?"▼":"▶"),A(b,`(${s.length??""})`),Q(S,"aria-expanded",i(n)?"true":"false"),A(R,i(n)?"▼":"▶"),A(E,`(${a.length??""})`)}),he("click",_,()=>K(r,!i(r))),he("click",S,()=>K(n,!i(n))),z(e,l),Se()}De(["click"]);async function ya(e,t){const{url:s,nonce:a}=ne.rest;if(!s)return console.info("[slashed-admin] (dev) would POST",e,t),{ok:!0,dev:!0};const r=await fetch(s+e,{method:"POST",credentials:"same-origin",headers:{"Content-Type":"application/json","X-WP-Nonce":a},body:JSON.stringify(t)});if(!r.ok){const n=await r.text();throw new Error(n||`HTTP ${r.status}`)}return r.json()}function wr(e,t){return ya("/tokens",{section:e,values:t})}function xr(e){return ya("/tokens/reset",{section:e})}function xo(e){return ya("/settings",e)}async function ko(){const{url:e,nonce:t}=ne.rest;if(!e)return console.info("[slashed-admin] (dev) would GET /tokens/export"),{schema_version:"1",tokens:{},plugin_settings:{},dev:!0};const s=await fetch(e+"/tokens/export",{credentials:"same-origin",headers:{"X-WP-Nonce":t}});if(!s.ok)throw new Error(await s.text()||`HTTP ${s.status}`);return s.json()}function So(e){return ya("/tokens/import",e)}var Eo=F('Saved'),jo=F(' '),To=F(`

                Bundle Info

                The SLASHED CSS bundle is loaded automatically by the plugin. The inventory is parsed from whichever bundle is active (essential / optimal / full) and - drives the variable pickers, class autocomplete, and color palette in Bricks.

                Variables registered
                Classes registered

                Plugin Settings

                Choose which SLASHED CSS bundle to load on the frontend and in the Bricks editor canvas.

                Override the HTML root font-size. Use this if Bricks forces a font-size you don't want.

                `);function Co(e,t){xe(t,!0);let s=te(Ne(re.pluginSettings?.css_bundle??"optimal")),a=te(Ne(re.pluginSettings?.html_font_size??"")),r=te(!1),n=te(!1),l=te(""),o=null;async function c(){K(r,!0),K(n,!1),K(l,"");try{await xo({css_bundle:i(s),html_font_size:i(a)}),K(n,!0),o&&clearTimeout(o),o=setTimeout(()=>{K(n,!1),o=null},3e3)}catch(V){K(l,V.message||"Save failed",!0)}finally{K(r,!1)}}var d=To(),_=p(f(d),4),v=p(f(_),2),u=f(v),m=p(v,4),b=f(m),w=p(_,4),h=p(f(w),2),y=f(h);y.value=y.__value="essential";var S=p(y);S.value=S.__value="optimal";var C=p(S);C.value=C.__value="full";var R=p(w,2),B=p(f(R),2),E=f(B);E.value=E.__value="";var $=p(E);$.value=$.__value="100";var O=p($);O.value=O.__value="62.5";var L=p(R,2),T=f(L),D=f(T),x=p(T,2);{var k=V=>{var U=Eo();z(V,U)};fe(x,V=>{i(n)&&V(k)})}var P=p(x,2);{var M=V=>{var U=jo(),I=f(U);q(()=>A(I,i(l))),z(V,U)};fe(P,V=>{i(l)&&V(M)})}q(()=>{A(u,re.inventory?.variables?.length??0),A(b,(re.inventory?.sf_classes?.length??0)+(re.inventory?.is_classes?.length??0)),T.disabled=i(r),A(D,i(r)?"Saving...":"Save Settings")}),ia(h,()=>i(s),V=>K(s,V)),ia(B,()=>i(a),V=>K(a,V)),he("click",T,c),z(e,d),ke()}De(["click"]);const xr=22.5,$o=95;function xn(e,t){if(e<=0||t<=0)return null;const s=$o-xr,a=(t-e)/s,r=parseFloat(a.toFixed(6)),n=parseFloat(e.toFixed(4)),l=parseFloat(t.toFixed(4));return`clamp(${n}rem, calc(${r} * (100vw - ${xr}rem) + ${n}rem), ${l}rem)`}function kr(e){const t=parseFloat(e);if(isNaN(t))return"0";let s=t.toFixed(6).replace(/0+$/,"").replace(/\.$/,"");return s===""?"0":s}function je(e){return e!=null&&e!==""}function zo(e){const t=[],s=["primary","secondary","tertiary","action","neutral","base"];for(const n of s){const l=`brand_${n}`;je(e[l])&&t.push(`--sf-color-${n}-light: ${e[l]};`)}const a=["success","warning","error","info","danger"];for(const n of a){const l=`status_${n}`;je(e[l])&&t.push(`--sf-color-${n}-light: ${e[l]};`)}if(e.dark_overrides_enabled!=="0"){for(const n of s){const l=`brand_dark_${n}`;je(e[l])&&t.push(`--sf-color-${n}-dark: ${e[l]};`)}for(const n of a){const l=`status_dark_${n}`;je(e[l])&&t.push(`--sf-color-${n}-dark: ${e[l]};`)}}return t}function Ao(e){const t=[],s=["body","heading","mono","display","humanist","geometric","slab"];for(const r of s){const n=`font_${r}`;je(e[n])&&t.push(`--sf-font-${r}: ${e[n]};`)}je(e.text_scale)&&t.push(`--sf-text-scale: ${e.text_scale};`),je(e.text_display_scale)&&t.push(`--sf-text-display-scale: ${e.text_display_scale};`);const a=["2xs","xs","s","m","l","xl","2xl","3xl","4xl","display-s","display-m","display-l"];for(const r of a){const n=`size_${r}_min`,l=`size_${r}_max`,o=e[n],c=e[l];if(je(o)&&je(c)){const d=xn(parseFloat(o),parseFloat(c));d&&t.push(`--sf-text-${r}: ${d};`)}}return t}function Fo(e){const t=[];je(e.space_scale)&&t.push(`--sf-space-scale: ${e.space_scale};`);const s=["2xs","xs","s","m","l","xl","2xl","3xl","4xl"];for(const r of s){const n=e[`space_${r}_min`],l=e[`space_${r}_max`];if(je(n)&&je(l)){const o=xn(parseFloat(n),parseFloat(l));o&&t.push(`--sf-space-${r}: calc(${o} * var(--sf-space-scale));`)}}const a={gutter:"--sf-space-gutter",gap:"--sf-gap",content_gap:"--sf-content-gap",component_pad:"--sf-component-pad",section_pad:"--sf-section-pad"};for(const[r,n]of Object.entries(a))je(e[r])&&t.push(`${n}: ${e[r]};`);return t}function Ro(e){const t=[];return je(e.radius_scale)&&t.push(`--sf-radius-scale: ${e.radius_scale};`),t}function Mo(e){const t=[];return je(e.shadow_strength)&&t.push(`--sf-shadow-strength: calc(${e.shadow_strength} + var(--sf-is-dark) * 0.17);`),je(e.glow_color)&&t.push(`--sf-shadow-glow-color: ${e.glow_color};`),t}function Oo(e){const t=[];je(e.motion_scale)&&t.push(`--sf-motion-scale: ${e.motion_scale};`);const s=["instant","fast","normal","slow","slower"];for(const a of s){const r=`duration_${a}`;je(e[r])&&t.push(`--sf-duration-${a}: calc(${e[r]}ms * var(--sf-motion-scale));`)}return t}function Do(e){const t=[],s=["below","base","raised","low","mid","high","top","max"];for(const a of s)je(e[a])&&t.push(`--sf-z-${a}: ${parseInt(e[a],10)};`);return t}function Po(e){const t=[],s={contrast_bias:"--sf-contrast-bias",contrast_threshold:"--sf-contrast-threshold",opacity_disabled:"--sf-opacity-disabled"};for(const[r,n]of Object.entries(s))je(e[r])&&t.push(`${n}: ${kr(e[r])};`);const a={focus_ring_width:"--sf-focus-ring-width",focus_ring_offset:"--sf-focus-ring-offset"};for(const[r,n]of Object.entries(a))je(e[r])&&t.push(`${n}: ${kr(e[r])}px;`);return je(e.focus_ring_style)&&["solid","dashed","dotted","double","none"].includes(e.focus_ring_style)&&t.push(`--sf-focus-ring-style: ${e.focus_ring_style};`),t}function sr(e){const t=[];if(e.colors&&typeof e.colors=="object"&&t.push(...zo(e.colors)),e.typography&&typeof e.typography=="object"&&t.push(...Ao(e.typography)),e.spacing&&typeof e.spacing=="object"&&t.push(...Fo(e.spacing)),e.radius&&typeof e.radius=="object"&&t.push(...Ro(e.radius)),e.shadows&&typeof e.shadows=="object"&&t.push(...Mo(e.shadows)),e.motion&&typeof e.motion=="object"&&t.push(...Oo(e.motion)),e.zindex&&typeof e.zindex=="object"&&t.push(...Do(e.zindex)),e.contrast&&typeof e.contrast=="object"&&t.push(...Po(e.contrast)),t.length===0)return"";let s=`@layer slashed.overrides { + drives the variable pickers, class autocomplete, and color palette in Bricks.

                Variables registered
                Classes registered

                Plugin Settings

                Choose which SLASHED CSS bundle to load on the frontend and in the Bricks editor canvas.

                Override the HTML root font-size. Use this if Bricks forces a font-size you don't want.

                `);function $o(e,t){ke(t,!0);let s=te(Ne(ne.pluginSettings?.css_bundle??"optimal")),a=te(Ne(ne.pluginSettings?.html_font_size??"")),r=te(!1),n=te(!1),l=te(""),o=null;async function c(){K(r,!0),K(n,!1),K(l,"");try{await xo({css_bundle:i(s),html_font_size:i(a)}),K(n,!0),o&&clearTimeout(o),o=setTimeout(()=>{K(n,!1),o=null},3e3)}catch(V){K(l,V.message||"Save failed",!0)}finally{K(r,!1)}}var d=To(),_=p(f(d),4),v=p(f(_),2),u=f(v),m=p(v,4),b=f(m),w=p(_,4),h=p(f(w),2),y=f(h);y.value=y.__value="essential";var S=p(y);S.value=S.__value="optimal";var $=p(S);$.value=$.__value="full";var R=p(w,2),B=p(f(R),2),E=f(B);E.value=E.__value="";var C=p(E);C.value=C.__value="100";var O=p(C);O.value=O.__value="62.5";var L=p(R,2),T=f(L),D=f(T),x=p(T,2);{var k=V=>{var U=Eo();z(V,U)};fe(x,V=>{i(n)&&V(k)})}var P=p(x,2);{var M=V=>{var U=jo(),I=f(U);q(()=>A(I,i(l))),z(V,U)};fe(P,V=>{i(l)&&V(M)})}q(()=>{A(u,ne.inventory?.variables?.length??0),A(b,(ne.inventory?.sf_classes?.length??0)+(ne.inventory?.is_classes?.length??0)),T.disabled=i(r),A(D,i(r)?"Saving...":"Save Settings")}),la(h,()=>i(s),V=>K(s,V)),la(B,()=>i(a),V=>K(a,V)),he("click",T,c),z(e,d),Se()}De(["click"]);const kr=22.5,Co=95;function kn(e,t){if(e<=0||t<=0)return null;const s=Co-kr,a=(t-e)/s,r=parseFloat(a.toFixed(6)),n=parseFloat(e.toFixed(4)),l=parseFloat(t.toFixed(4));return`clamp(${n}rem, calc(${r} * (100vw - ${kr}rem) + ${n}rem), ${l}rem)`}function Sr(e){const t=parseFloat(e);if(isNaN(t))return"0";let s=t.toFixed(6).replace(/0+$/,"").replace(/\.$/,"");return s===""?"0":s}function Te(e){return e!=null&&e!==""}function zo(e){const t=[],s=["primary","secondary","tertiary","action","neutral","base"];for(const n of s){const l=`brand_${n}`;Te(e[l])&&t.push(`--sf-color-${n}-light: ${e[l]};`)}const a=["success","warning","error","info","danger"];for(const n of a){const l=`status_${n}`;Te(e[l])&&t.push(`--sf-color-${n}-light: ${e[l]};`)}if(e.dark_overrides_enabled!=="0"){for(const n of s){const l=`brand_dark_${n}`;Te(e[l])&&t.push(`--sf-color-${n}-dark: ${e[l]};`)}for(const n of a){const l=`status_dark_${n}`;Te(e[l])&&t.push(`--sf-color-${n}-dark: ${e[l]};`)}}return t}function Ao(e){const t=[],s=["body","heading","mono","display","humanist","geometric","slab"];for(const r of s){const n=`font_${r}`;Te(e[n])&&t.push(`--sf-font-${r}: ${e[n]};`)}Te(e.text_scale)&&t.push(`--sf-text-scale: ${e.text_scale};`),Te(e.text_display_scale)&&t.push(`--sf-text-display-scale: ${e.text_display_scale};`);const a=["2xs","xs","s","m","l","xl","2xl","3xl","4xl","display-s","display-m","display-l"];for(const r of a){const n=`size_${r}_min`,l=`size_${r}_max`,o=e[n],c=e[l];if(Te(o)&&Te(c)){const d=kn(parseFloat(o),parseFloat(c));d&&t.push(`--sf-text-${r}: ${d};`)}}return t}function Fo(e){const t=[];Te(e.space_scale)&&t.push(`--sf-space-scale: ${e.space_scale};`);const s=["2xs","xs","s","m","l","xl","2xl","3xl","4xl"];for(const r of s){const n=e[`space_${r}_min`],l=e[`space_${r}_max`];if(Te(n)&&Te(l)){const o=kn(parseFloat(n),parseFloat(l));o&&t.push(`--sf-space-${r}: calc(${o} * var(--sf-space-scale));`)}}const a={gutter:"--sf-space-gutter",gap:"--sf-gap",content_gap:"--sf-content-gap",component_pad:"--sf-component-pad",section_pad:"--sf-section-pad"};for(const[r,n]of Object.entries(a))Te(e[r])&&t.push(`${n}: ${e[r]};`);return t}function Ro(e){const t=[];return Te(e.radius_scale)&&t.push(`--sf-radius-scale: ${e.radius_scale};`),t}function Mo(e){const t=[];return Te(e.shadow_strength)&&t.push(`--sf-shadow-strength: calc(${e.shadow_strength} + var(--sf-is-dark) * 0.17);`),Te(e.glow_color)&&t.push(`--sf-shadow-glow-color: ${e.glow_color};`),t}function Oo(e){const t=[];Te(e.motion_scale)&&t.push(`--sf-motion-scale: ${e.motion_scale};`);const s=["instant","fast","normal","slow","slower"];for(const a of s){const r=`duration_${a}`;Te(e[r])&&t.push(`--sf-duration-${a}: calc(${e[r]}ms * var(--sf-motion-scale));`)}return t}function Do(e){const t=[],s=["below","base","raised","low","mid","high","top","max"];for(const a of s)Te(e[a])&&t.push(`--sf-z-${a}: ${parseInt(e[a],10)};`);return t}function Po(e){const t=[],s={contrast_bias:"--sf-contrast-bias",contrast_threshold:"--sf-contrast-threshold",opacity_disabled:"--sf-opacity-disabled"};for(const[r,n]of Object.entries(s))Te(e[r])&&t.push(`${n}: ${Sr(e[r])};`);const a={focus_ring_width:"--sf-focus-ring-width",focus_ring_offset:"--sf-focus-ring-offset"};for(const[r,n]of Object.entries(a))Te(e[r])&&t.push(`${n}: ${Sr(e[r])}px;`);return Te(e.focus_ring_style)&&["solid","dashed","dotted","double","none"].includes(e.focus_ring_style)&&t.push(`--sf-focus-ring-style: ${e.focus_ring_style};`),t}function ar(e){const t=[];if(e.colors&&typeof e.colors=="object"&&t.push(...zo(e.colors)),e.typography&&typeof e.typography=="object"&&t.push(...Ao(e.typography)),e.spacing&&typeof e.spacing=="object"&&t.push(...Fo(e.spacing)),e.radius&&typeof e.radius=="object"&&t.push(...Ro(e.radius)),e.shadows&&typeof e.shadows=="object"&&t.push(...Mo(e.shadows)),e.motion&&typeof e.motion=="object"&&t.push(...Oo(e.motion)),e.zindex&&typeof e.zindex=="object"&&t.push(...Do(e.zindex)),e.contrast&&typeof e.contrast=="object"&&t.push(...Po(e.contrast)),t.length===0)return"";let s=`@layer slashed.overrides { :root { `;for(const a of t)s+=` ${a} `;return s+=` } @@ -29,7 +29,7 @@ var Sn=Object.defineProperty;var ar=e=>{throw TypeError(e)};var En=(e,t,s)=>t in import the token file via this tab, then import the Bricks template via Bricks → Templates. The plugin re-registers all SLASHED classes, variables, and color palettes automatically.
              • Verify in the Bricks builder canvas that colors, spacing, and fonts match. If something looks off, check the browser console for unresolved var() calls — - this means the CSS bundle isn't loading or the token file wasn't imported yet.
              • `);function Bo(e,t){xe(t,!0);let s=te(!1),a=te("");const r=j(()=>sr(H)),n=j(()=>i(r).length>0);function l(){if(!i(r))return;const M=new Blob([i(r)],{type:"text/css"}),V=URL.createObjectURL(M),U=document.createElement("a");U.href=V,U.download=`slashed-custom-${new Date().toISOString().slice(0,10)}.css`,U.click(),URL.revokeObjectURL(V)}async function o(){K(s,!0),K(a,"");try{const M=await ko(),V=JSON.stringify(M,null,2),U=new Blob([V],{type:"application/json"}),I=URL.createObjectURL(U),Y=document.createElement("a");Y.href=I,Y.download=`slashed-tokens-${new Date().toISOString().slice(0,10)}.json`,Y.click(),URL.revokeObjectURL(I)}catch(M){K(a,M.message||"Export failed",!0)}finally{K(s,!1)}}let c=te(null),d=te(!1),_=te(""),v=te(""),u=te(0);async function m(){const M=i(c)?.files?.[0];if(M){K(_,""),K(v,""),K(d,!0);try{const V=await M.text(),U=JSON.parse(V),I=await So(U),Y=I.settings_imported?" Plugin settings restored.":"";K(_,`Imported ${I.imported} section(s) successfully.${Y}`),K(u,3);const G=setInterval(()=>{K(u,i(u)-1),i(u)<=0&&(clearInterval(G),window.location.reload())},1e3)}catch(V){K(v,V.message||"Import failed",!0)}finally{K(d,!1),i(c)&&(i(c).value="")}}}var b=No(),w=p(f(b),4),h=p(f(w),4),y=f(h),S=f(y),C=p(y,2),R=p(C,2);{var B=M=>{var V=Vo(),U=f(V);q(()=>A(U,i(a))),z(M,V)};fe(R,M=>{i(a)&&M(B)})}var E=p(w,2),$=p(f(E),4),O=f($);ll(O,M=>K(c,M),()=>i(c));var L=p(O,2),T=f(L),D=p($,2);{var x=M=>{var V=Io(),U=f(V),I=p(U);{var Y=G=>{var ae=Wi();q(()=>A(ae,`Reloading in ${i(u)??""}…`)),z(G,ae)};fe(I,G=>{i(u)>0&&G(Y)})}q(()=>A(U,`${i(_)??""} `)),z(M,V)};fe(D,M=>{i(_)&&M(x)})}var k=p(D,2);{var P=M=>{var V=qo(),U=f(V);q(()=>A(U,i(v))),z(M,V)};fe(k,M=>{i(v)&&M(P)})}q(()=>{y.disabled=i(s),A(S,i(s)?"Exporting…":"Download token file (.json)"),C.disabled=!i(n),Q(C,"title",i(n)?"Download overrides as a standalone CSS file":"No overrides set yet"),L.disabled=i(d),A(T,i(d)?"Importing…":"Import token file")}),he("click",y,o),he("click",C,l),he("click",L,m),z(e,b),ke()}De(["click"]);var Ko=F('

                Parameters:

                 
                '),Ho=F(`

                Filter Hooks Reference

                These WordPress filter hooks let you customize the SLASHED Bricks integration + this means the CSS bundle isn't loading or the token file wasn't imported yet.

                `);function Bo(e,t){ke(t,!0);let s=te(!1),a=te("");const r=j(()=>ar(H)),n=j(()=>i(r).length>0);function l(){if(!i(r))return;const M=new Blob([i(r)],{type:"text/css"}),V=URL.createObjectURL(M),U=document.createElement("a");U.href=V,U.download=`slashed-custom-${new Date().toISOString().slice(0,10)}.css`,U.click(),URL.revokeObjectURL(V)}async function o(){K(s,!0),K(a,"");try{const M=await ko(),V=JSON.stringify(M,null,2),U=new Blob([V],{type:"application/json"}),I=URL.createObjectURL(U),Y=document.createElement("a");Y.href=I,Y.download=`slashed-tokens-${new Date().toISOString().slice(0,10)}.json`,Y.click(),URL.revokeObjectURL(I)}catch(M){K(a,M.message||"Export failed",!0)}finally{K(s,!1)}}let c=te(null),d=te(!1),_=te(""),v=te(""),u=te(0);async function m(){const M=i(c)?.files?.[0];if(M){K(_,""),K(v,""),K(d,!0);try{const V=await M.text(),U=JSON.parse(V),I=await So(U),Y=I.settings_imported?" Plugin settings restored.":"";K(_,`Imported ${I.imported} section(s) successfully.${Y}`),K(u,3);const G=setInterval(()=>{K(u,i(u)-1),i(u)<=0&&(clearInterval(G),window.location.reload())},1e3)}catch(V){K(v,V.message||"Import failed",!0)}finally{K(d,!1),i(c)&&(i(c).value="")}}}var b=No(),w=p(f(b),4),h=p(f(w),4),y=f(h),S=f(y),$=p(y,2),R=p($,2);{var B=M=>{var V=Vo(),U=f(V);q(()=>A(U,i(a))),z(M,V)};fe(R,M=>{i(a)&&M(B)})}var E=p(w,2),C=p(f(E),4),O=f(C);ll(O,M=>K(c,M),()=>i(c));var L=p(O,2),T=f(L),D=p(C,2);{var x=M=>{var V=Io(),U=f(V),I=p(U);{var Y=G=>{var ae=Wi();q(()=>A(ae,`Reloading in ${i(u)??""}…`)),z(G,ae)};fe(I,G=>{i(u)>0&&G(Y)})}q(()=>A(U,`${i(_)??""} `)),z(M,V)};fe(D,M=>{i(_)&&M(x)})}var k=p(D,2);{var P=M=>{var V=qo(),U=f(V);q(()=>A(U,i(v))),z(M,V)};fe(k,M=>{i(v)&&M(P)})}q(()=>{y.disabled=i(s),A(S,i(s)?"Exporting…":"Download token file (.json)"),$.disabled=!i(n),Q($,"title",i(n)?"Download overrides as a standalone CSS file":"No overrides set yet"),L.disabled=i(d),A(T,i(d)?"Importing…":"Import token file")}),he("click",y,o),he("click",$,l),he("click",L,m),z(e,b),Se()}De(["click"]);var Ko=F('

                Parameters:

                 
                '),Ho=F(`

                Filter Hooks Reference

                These WordPress filter hooks let you customize the SLASHED Bricks integration from your theme or a mu-plugin. Each hook fires during plugin initialization.

                `);function Uo(e){const t=[{name:"slashed_bricks/css_bundle_url",description:"Override which CSS bundle URL to load.",params:"$url (string) - The current CSS bundle URL.",example:`add_filter( 'slashed_bricks/css_bundle_url', function( $url ) { // Load from a CDN instead. return 'https://cdn.example.com/slashed/slashed.optimal.css'; @@ -59,7 +59,7 @@ add_filter( 'slashed_bricks/inventory_local_path', function() { 'SLASHED Primary', 'SLASHED Secondary', ] ) ); -} );`}];var s=Ho(),a=p(f(s),4);ne(a,17,()=>t,r=>r.name,(r,n)=>{var l=Ko(),o=f(l),c=f(o),d=f(c),_=p(o,2),v=f(_),u=p(_,2),m=p(f(u),2),b=f(m),w=p(u,2),h=f(w),y=f(h);q(()=>{A(d,i(n).name),A(v,i(n).description),A(b,i(n).params),A(y,i(n).example)}),z(r,l)}),z(e,s)}const Go=[{category:"Colors",description:"Brand, status, semantic, and derived color tokens. Source colors use oklch(); the framework derives light-dark pairs, palettes, and alpha scales automatically.",tokens:[{name:"--sf-color-{brand}-light",description:"Source color for the brand (oklch registered value). Set this to rebrand."},{name:"--sf-color-{brand}-dark",description:"Optional dark-mode override. If set, replaces the auto-derived dark variant for full per-mode control."},{name:"--sf-color-{brand}",description:"Resolved light-dark adaptive color for use in rules."},{name:"--sf-color-{brand}-{50-950}",description:"Palette scale: 50 (lightest) to 950 (darkest) mixed with base/text."},{name:"--sf-color-{brand}-a{5-95}",description:"Alpha scale: 5% to 95% opacity of the brand color."},{name:"--sf-color-{brand}-hover/active/muted/subtle/ghost/lighter/darker/xlight/xdark/superlight/superdark",description:"Semantic aliases for common UI states, mapped to palette steps."},{name:"--sf-color-bg",description:"Page background color, derived from base."},{name:"--sf-color-text",description:"Main body text color, contrast-aware."},{name:"--sf-color-heading",description:"Heading text color, slightly stronger than body text."},{name:"--sf-color-link",description:"Link color, derived from action brand."},{name:"--sf-color-border",description:"Default border color."},{name:"--sf-color-surface",description:"Card/panel surface color (equals base)."},{name:"--sf-color-overlay",description:"Semi-transparent overlay for modals."},{name:"--sf-color-dim",description:"50% black overlay for dimming backgrounds."},{name:"--sf-color-success/warning/error/info/danger",description:"Status feedback colors with -light source, -muted, -strong, -subtle variants."}]},{category:"Typography",description:"Font families, sizes (fluid clamp-based scale), weights, line-heights, letter-spacing, and heading configuration.",tokens:[{name:"--sf-font-body",description:"Body font stack (system-ui default)."},{name:"--sf-font-heading",description:"Heading font stack (defaults to body)."},{name:"--sf-font-mono",description:"Monospace font stack."},{name:"--sf-font-display",description:"Display/hero font (defaults to heading)."},{name:"--sf-font-geometric/humanist/slab",description:"Curated fallback stacks for common typographic personalities."},{name:"--sf-text-{2xs..4xl}",description:"Fluid type scale using clamp(). Sizes: 2xs, xs, s, m, l, xl, 2xl, 3xl, 4xl."},{name:"--sf-text-display-{s,m,l}",description:"Extra-large display/hero sizes."},{name:"--sf-text-scale",description:"Global multiplier for the type scale (default 1)."},{name:"--sf-font-weight-{thin..black}",description:"Named weight tokens: thin(100), extralight(200), light(300), normal(400), medium(500), semibold(600), bold(700), extrabold(800), black(900)."},{name:"--sf-leading-{tight,snug,normal,relaxed}",description:"Line-height presets: 1.1, 1.3, 1.5, 1.625."},{name:"--sf-tracking-{tight,normal,wide,wider,widest}",description:"Letter-spacing presets from -0.025em to 0.1em."},{name:"--sf-h{1-6}-size/font-weight/line-height/letter-spacing",description:"Per-heading-level configuration tokens."},{name:"--sf-body-*",description:"Body text configuration: font-size, font-weight, line-height, color, text-wrap."}]},{category:"Spacing",description:"Fluid spacing scale (clamp-based), gutters, section padding, and component padding.",tokens:[{name:"--sf-space-{2xs..4xl}",description:"Fluid spacing scale. Sizes: none, px, 2xs, xs, s, m, l, xl, 2xl, 3xl, 4xl."},{name:"--sf-space-scale",description:"Global multiplier for all space tokens (default 1)."},{name:"--sf-space-gutter",description:"Page-edge gutter (defaults to space-l)."},{name:"--sf-gap",description:"Default gap for layouts (defaults to space-m)."},{name:"--sf-content-gap",description:"Gap between content elements (defaults to space-s)."},{name:"--sf-section-pad--{s,m,l,xl}",description:"Vertical padding for page sections."},{name:"--sf-component-pad",description:"Internal padding for components (defaults to space-m)."},{name:"--sf-header-height",description:"Expected fixed header height for sticky offset calculations."},{name:"--sf-safe-{top,right,bottom,left}",description:"Safe area insets for notched devices."}]},{category:"Sizing",description:"Component sizes, touch targets, and aspect ratios.",tokens:[{name:"--sf-size-{xs..xl}",description:"Named size tokens: xs(1.5rem), s(2rem), m(2.5rem), l(2.75rem), xl(3.5rem)."},{name:"--sf-touch-target",description:"Minimum interactive element size (defaults to size-l, 2.75rem)."},{name:"--sf-ratio-{square,photo,video,cinema,golden,portrait}",description:"Predefined aspect ratios for frames and containers."},{name:"--sf-icon-{xs..xl}",description:"Icon sizing in em units (0.875em to 3em)."}]},{category:"Layout",description:"Container widths, layout primitive tokens (stack, cluster, grid, sidebar, switcher, bento, cover, frame, reel, imposter).",tokens:[{name:"--sf-container-{narrow,default,prose,wide,full}",description:"Max-width presets for .sf-container."},{name:"--sf-stack-gap",description:"Vertical gap between .sf-stack children."},{name:"--sf-cluster-gap/align/justify",description:"Inline cluster layout tokens."},{name:"--sf-sidebar-width/gap/min-width",description:"Sidebar layout tokens."},{name:"--sf-switcher-threshold/gap",description:"Column-to-stack breakpoint and gap."},{name:"--sf-grid-min/gap",description:"Auto-fill grid minimum item width and gap."},{name:"--sf-bento-cols/gap/row",description:"Dense bento grid configuration."},{name:"--sf-cover-min-height/padding",description:"Full-height cover layout."},{name:"--sf-frame-ratio",description:"Aspect ratio for .sf-frame (defaults to 16/9)."},{name:"--sf-reel-gap/height/item-width",description:"Horizontal scroll strip configuration."},{name:"--sf-imposter-margin",description:"Safety margin for absolute-centered overlays."},{name:"--sf-breakout-width/content-width",description:"Breakout grid track widths."},{name:"--sf-divider-color/style/width",description:"Divider appearance tokens."}]},{category:"Borders",description:"Border widths and styles.",tokens:[{name:"--sf-border-width-{hairline,1,2,3,4}",description:"Border width scale: 0.5px, 1px, 2px, 3px, 4px."},{name:"--sf-border-style/dotted/soft/strong",description:"Border style presets (solid, dotted, dashed, solid)."},{name:"--sf-stroke-{thin,regular,bold,heavy}",description:"Stroke widths for SVG/icon use: 1px, 1.5px, 2px, 3px."}]},{category:"Radius",description:"Border radius scale and special shapes.",tokens:[{name:"--sf-radius-{none,xs,s,m,l,xl,2xl,3xl,4xl,full}",description:"Radius scale from 0 to 9999px (pill)."},{name:"--sf-radius-scale",description:"Global multiplier for all radius tokens (default 1)."},{name:"--sf-radius-pill",description:"Fully rounded (9999px)."},{name:"--sf-radius-outer",description:"Outer radius = inner + padding (for nested rounding)."}]},{category:"Shadows",description:"Box shadows, drop shadows, text shadows, and shadow configuration.",tokens:[{name:"--sf-shadow-{xs,s,m,l,xl,2xl}",description:"Elevation shadow scale, progressively more dramatic."},{name:"--sf-shadow-inner",description:"Inset shadow for recessed elements."},{name:"--sf-shadow-glow",description:"Colored glow effect (uses --sf-shadow-glow-color)."},{name:"--sf-shadow-none",description:"Explicit no-shadow value."},{name:"--sf-shadow-color",description:"Base shadow color (derived from neutral)."},{name:"--sf-shadow-strength",description:"Shadow opacity multiplier (adapts to dark mode)."},{name:"--sf-drop-shadow-{s,m,l}",description:"CSS filter drop-shadow equivalents."},{name:"--sf-text-shadow-{s,m,l,none}",description:"Text shadow presets."}]},{category:"Effects",description:"Blurs, opacities, gradients, masks, and perspective.",tokens:[{name:"--sf-blur-{xs,s,m,l,xl}",description:"Blur radius scale: 4px to 48px."},{name:"--sf-opacity-{0,10,25,50,75,100,disabled}",description:"Named opacity presets."},{name:"--sf-gradient-{brand,primary,secondary,tertiary,surface}",description:"Predefined gradients using brand colors."},{name:"--sf-gradient-fade--{t,b,l,r}",description:"Directional fade-to-background gradients."},{name:"--sf-mask-scrim-start/end",description:"Scroll mask fade depth."},{name:"--sf-perspective-{near,normal,far}",description:"3D perspective presets: 500px, 1000px, 2000px."},{name:"--sf-contrast-bias/threshold",description:"Color contrast tuning for auto text-on-color logic."}]},{category:"Motion",description:"Durations, easing curves, transitions, and animations.",tokens:[{name:"--sf-duration-{none,instant,fast,normal,slow,slower}",description:"Duration scale: 0ms to 600ms (respects --sf-motion-scale)."},{name:"--sf-motion-scale",description:"Global animation speed multiplier (set 0 to disable)."},{name:"--sf-ease-{linear,in,out,in-out,bounce,elastic,overshoot,spring}",description:"Easing function presets."},{name:"--sf-transition-{all,colors,opacity,shadow,transform,fast,slow,enter,exit}",description:"Pre-composed transition shorthands."},{name:"--sf-animation-{fade-in,fade-out,scale-up,scale-down,slide-in-*,float,ping,blink,color-pulse}",description:"Named keyframe animation shorthands."},{name:"--sf-animation-delay-{1-5}",description:"Stagger delays for sequential animations."}]},{category:"Z-Index",description:"Z-index scale for predictable layering.",tokens:[{name:"--sf-z-{below,base,raised,low,mid,high,top,max}",description:"Z-index scale: -1, 0, 1, 10, 100, 500, 900, 9999."}]},{category:"Focus",description:"Focus ring appearance for keyboard navigation.",tokens:[{name:"--sf-focus-ring-width/offset/color/style/shadow",description:"Focus indicator configuration."},{name:"--sf-caret-color",description:"Text input caret color (defaults to action)."}]},{category:"Scroll",description:"Scroll timeline and scrollbar styling.",tokens:[{name:"--sf-scroll-timeline-range-start/end",description:"Scroll-driven animation range."},{name:"--sf-scrollbar-thumb/track",description:"Custom scrollbar colors."}]},{category:"Print",description:"Print stylesheet configuration.",tokens:[{name:"--sf-print-base-size/page-margin/page-size",description:"Print layout tokens: 11pt base, 2cm margins, A4 size."}]}],Wo=[{category:"Layout Primitives",description:"Breakpoint-free, container-query-driven layout components. Each is a single class with per-instance token overrides via inline style.",classes:[{name:".sf-section",description:"Vertical page rhythm with size variants (--s/--m/--l/--xl/--collapse)."},{name:".sf-section-group",description:"Collapses gap between adjacent sections."},{name:".sf-container",description:"Centered max-width wrapper with gutters. Variants: --narrow, --wide, --full, --prose."},{name:".sf-box",description:"Isolated unit with padding and optional border."},{name:".sf-center",description:"Intrinsic centering with max-width. Variant: --intrinsic."},{name:".sf-stack",description:"Vertical flow with consistent gap. Size variants: --2xs to --3xl. Alignment: --center, --end, --stretch."},{name:".sf-cluster",description:"Wrapping inline group. Size variants: --2xs to --xl. Alignment: --center, --end, --between. Wrap: --no-wrap."},{name:".sf-sidebar",description:"Content + side panel that wraps. Variants: --right, --narrow, --wide."},{name:".sf-switcher",description:"N columns above threshold, stacked below. Variants: --no-wrap, --vertical."},{name:".sf-grid",description:"Auto-fill responsive grid. Size variants: --xs to --xl. Variants: --fit, --dense."},{name:".sf-grid-{1,2,3,4,6}",description:"Fixed-column grids, container-responsive."},{name:".sf-grid-{1-2,2-1,1-3,3-1}",description:"Ratio two-column grids."},{name:".sf-bento",description:"Dense free-form grid. Variants: --2, --4, --compact, --tall."},{name:".sf-alternate",description:"Zigzag two-column layout, reverses every other row."},{name:".sf-pancake",description:"Sticky-footer grid: header / main(1fr) / footer."},{name:".sf-content-grid",description:"Breakout layout grid. Children use .sf-breakout or .sf-full-bleed."},{name:".sf-cover",description:"Full-height region with centered content. Variants: --min, --max, --padding-s, --padding-l."},{name:".sf-frame",description:"Aspect-ratio media box. Variants: --square, --portrait, --video, --cinema, --3-2, --4-3, --golden."},{name:".sf-reel",description:"Horizontal scroll strip with optional mask fade."},{name:".sf-imposter",description:"Absolutely-centered overlay. Variants: --fixed, --contain."},{name:".sf-subgrid / .sf-subgrid-rows",description:"Inherit parent grid tracks."},{name:".sf-divider",description:"Token-driven separator. Variant: --vertical."},{name:".sf-icon",description:"Em-based inline icon sizing. Sizes: --xs to --xl. Variant: --boxed."},{name:".sf-prose",description:"Readable long-form text with automatic vertical rhythm."},{name:".sf-not-prose",description:"Reset zone inside .sf-prose for embedded components."}]},{category:"Macros",description:"Recipe classes that answer 'what does this element do/look like?' - composable with layout primitives.",classes:[{name:".sf-flow",description:"Lobotomized owl: consistent gap between consecutive children."},{name:".sf-truncate",description:"Single-line ellipsis overflow."},{name:".sf-line-clamp-{2,3,N}",description:"Multi-line text clamping with ellipsis. -N reads --sf-line-clamp."},{name:".sf-equal-height",description:"Forces flex children to share the tallest child's height."},{name:".sf-aspect",description:"Generic aspect-ratio container (reads --sf-aspect token)."},{name:".sf-scroll-shadow",description:"Top + bottom mask gradient for scrolling containers."},{name:".sf-scroll-snap",description:"Vertical scroll-snap container."},{name:".sf-overflow-fade",description:"End-edge horizontal fade for overflowing inline content."},{name:".sf-no-tap-highlight",description:"Suppresses WebKit/Android tap highlight."},{name:".sf-text-gradient",description:"Gradient text effect using background-clip."},{name:".sf-clickable-parent",description:"Makes an entire card clickable via the first link inside."},{name:".sf-link-external",description:"Adds external link indicator marker."}]},{category:"Surfaces",description:"Color surface utility classes that set background and text color for a brand context.",classes:[{name:".sf-surface--{primary,secondary,tertiary,action,neutral,inverse}",description:"Brand-colored surface with auto-contrast text."},{name:".sf-surface--{success,warning,error,info,danger}",description:"Status-colored surfaces."}]},{category:"Animations",description:"CSS animation utility classes that apply predefined keyframe animations.",classes:[{name:".sf-fade-in / .sf-fade-out",description:"Opacity entrance/exit animations."},{name:".sf-scale-up / .sf-scale-down",description:"Scale entrance/exit animations."},{name:".sf-slide-in-{up,down,left,right}",description:"Directional slide-in entrance animations."},{name:".sf-color-pulse",description:"Continuous color pulse animation."},{name:".sf-entrance--fade / --fade-up / --fade-down / --fade-left / --fade-right / --scale-up",description:"Scroll-triggered entrance animations (scroll-timeline driven)."}]},{category:"State Classes (.is-*)",description:"Runtime state classes toggled by JS or mirrored from ARIA. They live in the slashed.states layer. Always pair with matching ARIA attributes.",classes:[{name:".is-hidden / .is-invisible / .is-visible",description:"Visibility control: removed from layout / hidden but keeps box / visible."},{name:".is-disabled / .is-readonly",description:"Non-interactive states with dimming."},{name:".is-loading / .is-pending / .is-busy",description:"Loading states: spinner replacement / optimistic UI / cursor hint."},{name:".is-skeleton",description:"Placeholder shimmer animation."},{name:".is-active / .is-selected / .is-current / .is-pressed",description:"Selection/activation states."},{name:".is-highlighted",description:"Transient emphasis (e.g. search result highlight)."},{name:".is-open / .is-collapsed / .is-expanded",description:"Disclosure states for modals, drawers, accordions."},{name:".is-valid / .is-invalid",description:"Form field validation results (maps to aria-invalid)."},{name:".is-success / .is-error / .is-warning / .is-info / .is-danger",description:"General feedback states and destructive-action context."},{name:".is-sticky / .is-pinned / .is-fixed / .is-fullscreen",description:"Positioning states."},{name:".is-clipped / .is-scrollable / .is-truncated / .is-resizable",description:"Overflow handling states."},{name:".is-dragging / .is-drop-target / .is-draggable",description:"Drag and drop states."},{name:".is-overlay / .is-focused / .is-clickable / .is-unselectable",description:"Positioning, focus, cursor, and selection states."},{name:".is-empty",description:"Hide element when empty (:empty pseudo-class)."}]}],Yo=[{name:"--sf-is-dark",description:"Numeric flag (0 or 1) indicating dark mode is active. Registered property."},{name:"--sf-lumlocker",description:"Internal luminance lock value for color derivation."},{name:"--sf-color-scheme",description:"CSS color-scheme declaration (light dark)."},{name:"--sf-current-font-weight",description:"Current context font weight (used by strong elements)."},{name:"--sf-link-external-marker",description:"External link arrow character."},{name:"--sf-field-block",description:"Vertical spacing between form fields."},{name:"--sf-field-required-marker",description:"Required field indicator string."}];var Xo=F('
              • '),Zo=F('
                  '),Jo=F('
                • '),Qo=F('
                  Misc Tokens that do not fit a single category.
                    '),ec=F('

                    CSS Custom Properties (--sf-*)

                    '),tc=F('
                  • '),sc=F('
                      '),ac=F('

                      Utility & State Classes

                      '),rc=F('

                      '),nc=F('

                      API Cheatsheet

                      ');function ic(e,t){xe(t,!0);let s=te(""),a=te("all");const r=re.inventory?.variables?.length??0,n=re.inventory?.sf_classes?.length??0,l=re.inventory?.is_classes?.length??0;let o=j(()=>v(Go,"tokens")),c=j(()=>v(Wo,"classes")),d=j(()=>Yo.filter(I=>_(I.name,I.description)));function _(I,Y){if(!i(s).trim())return!0;const G=i(s).trim().toLowerCase();return I.toLowerCase().includes(G)||Y.toLowerCase().includes(G)}function v(I,Y){return i(s).trim()?I.map(G=>({...G,[Y]:G[Y].filter(ae=>_(ae.name,ae.description))})).filter(G=>G[Y].length>0):I}let u=j(()=>i(a)==="all"||i(a)==="variables"),m=j(()=>i(a)==="all"||i(a)==="classes"),b=j(()=>i(s).trim()!==""&&(!i(u)||i(o).length===0&&i(d).length===0)&&(!i(m)||i(c).length===0));var w=nc(),h=f(w),y=p(f(h),2),S=f(y),C=p(h,2),R=f(C),B=p(R,2),E=f(B);let $;var O=p(E,2);let L;var T=p(O,2);let D;var x=p(C,2);{var k=I=>{var Y=ec(),G=p(f(Y),2);ne(G,17,()=>i(o),Es,(ce,pe)=>{var ge=Zo(),N=f(ge),le=f(N),me=f(le),ye=p(le,2),Ce=f(ye),$e=p(N,2);ne($e,21,()=>i(pe).tokens,Es,(Fe,oe)=>{var Se=Xo(),be=f(Se),Ke=f(be),we=p(be,2),it=f(we);q(()=>{A(Ke,i(oe).name),A(it,i(oe).description)}),z(Fe,Se)}),q(Fe=>{ge.open=Fe,A(me,i(pe).category),A(Ce,i(pe).description)},[()=>!i(s).trim()]),z(ce,ge)});var ae=p(G,2);{var ue=ce=>{var pe=Qo(),ge=p(f(pe),2);ne(ge,21,()=>i(d),Es,(N,le)=>{var me=Jo(),ye=f(me),Ce=f(ye),$e=p(ye,2),Fe=f($e);q(()=>{A(Ce,i(le).name),A(Fe,i(le).description)}),z(N,me)}),q(N=>pe.open=N,[()=>!i(s).trim()]),z(ce,pe)};fe(ae,ce=>{i(d).length>0&&ce(ue)})}z(I,Y)};fe(x,I=>{i(u)&&I(k)})}var P=p(x,2);{var M=I=>{var Y=ac(),G=p(f(Y),2);ne(G,17,()=>i(c),Es,(ae,ue)=>{var ce=sc(),pe=f(ce),ge=f(pe),N=f(ge),le=p(ge,2),me=f(le),ye=p(pe,2);ne(ye,21,()=>i(ue).classes,Es,(Ce,$e)=>{var Fe=tc(),oe=f(Fe),Se=f(oe),be=p(oe,2),Ke=f(be);q(()=>{A(Se,i($e).name),A(Ke,i($e).description)}),z(Ce,Fe)}),q(Ce=>{ce.open=Ce,A(N,i(ue).category),A(me,i(ue).description)},[()=>!i(s).trim()]),z(ae,ce)}),z(I,Y)};fe(P,I=>{i(m)&&I(M)})}var V=p(P,2);{var U=I=>{var Y=rc(),G=f(Y);q(()=>A(G,`No results for "${i(s)??""}"`)),z(I,Y)};fe(V,I=>{i(b)&&I(U)})}q(()=>{A(S,`${r??""} variables | ${n??""} layout/utility classes | ${l??""} state classes`),Q(E,"aria-pressed",i(a)==="all"),$=rt(E,1,"svelte-osej3t",null,$,{active:i(a)==="all"}),Q(O,"aria-pressed",i(a)==="variables"),L=rt(O,1,"svelte-osej3t",null,L,{active:i(a)==="variables"}),Q(T,"aria-pressed",i(a)==="classes"),D=rt(T,1,"svelte-osej3t",null,D,{active:i(a)==="classes"})}),zt(R,()=>i(s),I=>K(s,I)),he("click",E,()=>K(a,"all")),he("click",O,()=>K(a,"variables")),he("click",T,()=>K(a,"classes")),z(e,w),ke()}De(["click"]);var lc=F('
                      '),oc=F('
                      '),cc=F(`

                      Live preview

                      The quick brown fox jumps over the lazy dog

                      Body and heading fonts update as you adjust typography settings. Colors below +} );`}];var s=Ho(),a=p(f(s),4);ie(a,17,()=>t,r=>r.name,(r,n)=>{var l=Ko(),o=f(l),c=f(o),d=f(c),_=p(o,2),v=f(_),u=p(_,2),m=p(f(u),2),b=f(m),w=p(u,2),h=f(w),y=f(h);q(()=>{A(d,i(n).name),A(v,i(n).description),A(b,i(n).params),A(y,i(n).example)}),z(r,l)}),z(e,s)}const Go=[{category:"Colors",description:"Brand, status, semantic, and derived color tokens. Source colors use oklch(); the framework derives light-dark pairs, palettes, and alpha scales automatically.",tokens:[{name:"--sf-color-{brand}-light",description:"Source color for the brand (oklch registered value). Set this to rebrand."},{name:"--sf-color-{brand}-dark",description:"Optional dark-mode override. If set, replaces the auto-derived dark variant for full per-mode control."},{name:"--sf-color-{brand}",description:"Resolved light-dark adaptive color for use in rules."},{name:"--sf-color-{brand}-{50-950}",description:"Palette scale: 50 (lightest) to 950 (darkest) mixed with base/text."},{name:"--sf-color-{brand}-a{5-95}",description:"Alpha scale: 5% to 95% opacity of the brand color."},{name:"--sf-color-{brand}-hover/active/muted/subtle/ghost/lighter/darker/xlight/xdark/superlight/superdark",description:"Semantic aliases for common UI states, mapped to palette steps."},{name:"--sf-color-bg",description:"Page background color, derived from base."},{name:"--sf-color-text",description:"Main body text color, contrast-aware."},{name:"--sf-color-heading",description:"Heading text color, slightly stronger than body text."},{name:"--sf-color-link",description:"Link color, derived from action brand."},{name:"--sf-color-border",description:"Default border color."},{name:"--sf-color-surface",description:"Card/panel surface color (equals base)."},{name:"--sf-color-overlay",description:"Semi-transparent overlay for modals."},{name:"--sf-color-dim",description:"50% black overlay for dimming backgrounds."},{name:"--sf-color-success/warning/error/info/danger",description:"Status feedback colors with -light source, -muted, -strong, -subtle variants."}]},{category:"Typography",description:"Font families, sizes (fluid clamp-based scale), weights, line-heights, letter-spacing, and heading configuration.",tokens:[{name:"--sf-font-body",description:"Body font stack (system-ui default)."},{name:"--sf-font-heading",description:"Heading font stack (defaults to body)."},{name:"--sf-font-mono",description:"Monospace font stack."},{name:"--sf-font-display",description:"Display/hero font (defaults to heading)."},{name:"--sf-font-geometric/humanist/slab",description:"Curated fallback stacks for common typographic personalities."},{name:"--sf-text-{2xs..4xl}",description:"Fluid type scale using clamp(). Sizes: 2xs, xs, s, m, l, xl, 2xl, 3xl, 4xl."},{name:"--sf-text-display-{s,m,l}",description:"Extra-large display/hero sizes."},{name:"--sf-text-scale",description:"Global multiplier for the type scale (default 1)."},{name:"--sf-font-weight-{thin..black}",description:"Named weight tokens: thin(100), extralight(200), light(300), normal(400), medium(500), semibold(600), bold(700), extrabold(800), black(900)."},{name:"--sf-leading-{tight,snug,normal,relaxed}",description:"Line-height presets: 1.1, 1.3, 1.5, 1.625."},{name:"--sf-tracking-{tight,normal,wide,wider,widest}",description:"Letter-spacing presets from -0.025em to 0.1em."},{name:"--sf-h{1-6}-size/font-weight/line-height/letter-spacing",description:"Per-heading-level configuration tokens."},{name:"--sf-body-*",description:"Body text configuration: font-size, font-weight, line-height, color, text-wrap."}]},{category:"Spacing",description:"Fluid spacing scale (clamp-based), gutters, section padding, and component padding.",tokens:[{name:"--sf-space-{2xs..4xl}",description:"Fluid spacing scale. Sizes: none, px, 2xs, xs, s, m, l, xl, 2xl, 3xl, 4xl."},{name:"--sf-space-scale",description:"Global multiplier for all space tokens (default 1)."},{name:"--sf-space-gutter",description:"Page-edge gutter (defaults to space-l)."},{name:"--sf-gap",description:"Default gap for layouts (defaults to space-m)."},{name:"--sf-content-gap",description:"Gap between content elements (defaults to space-s)."},{name:"--sf-section-pad--{s,m,l,xl}",description:"Vertical padding for page sections."},{name:"--sf-component-pad",description:"Internal padding for components (defaults to space-m)."},{name:"--sf-header-height",description:"Expected fixed header height for sticky offset calculations."},{name:"--sf-safe-{top,right,bottom,left}",description:"Safe area insets for notched devices."}]},{category:"Sizing",description:"Component sizes, touch targets, and aspect ratios.",tokens:[{name:"--sf-size-{xs..xl}",description:"Named size tokens: xs(1.5rem), s(2rem), m(2.5rem), l(2.75rem), xl(3.5rem)."},{name:"--sf-touch-target",description:"Minimum interactive element size (defaults to size-l, 2.75rem)."},{name:"--sf-ratio-{square,photo,video,cinema,golden,portrait}",description:"Predefined aspect ratios for frames and containers."},{name:"--sf-icon-{xs..xl}",description:"Icon sizing in em units (0.875em to 3em)."}]},{category:"Layout",description:"Container widths, layout primitive tokens (stack, cluster, grid, sidebar, switcher, bento, cover, frame, reel, imposter).",tokens:[{name:"--sf-container-{narrow,default,prose,wide,full}",description:"Max-width presets for .sf-container."},{name:"--sf-stack-gap",description:"Vertical gap between .sf-stack children."},{name:"--sf-cluster-gap/align/justify",description:"Inline cluster layout tokens."},{name:"--sf-sidebar-width/gap/min-width",description:"Sidebar layout tokens."},{name:"--sf-switcher-threshold/gap",description:"Column-to-stack breakpoint and gap."},{name:"--sf-grid-min/gap",description:"Auto-fill grid minimum item width and gap."},{name:"--sf-bento-cols/gap/row",description:"Dense bento grid configuration."},{name:"--sf-cover-min-height/padding",description:"Full-height cover layout."},{name:"--sf-frame-ratio",description:"Aspect ratio for .sf-frame (defaults to 16/9)."},{name:"--sf-reel-gap/height/item-width",description:"Horizontal scroll strip configuration."},{name:"--sf-imposter-margin",description:"Safety margin for absolute-centered overlays."},{name:"--sf-breakout-width/content-width",description:"Breakout grid track widths."},{name:"--sf-divider-color/style/width",description:"Divider appearance tokens."}]},{category:"Borders",description:"Border widths and styles.",tokens:[{name:"--sf-border-width-{hairline,1,2,3,4}",description:"Border width scale: 0.5px, 1px, 2px, 3px, 4px."},{name:"--sf-border-style/dotted/soft/strong",description:"Border style presets (solid, dotted, dashed, solid)."},{name:"--sf-stroke-{thin,regular,bold,heavy}",description:"Stroke widths for SVG/icon use: 1px, 1.5px, 2px, 3px."}]},{category:"Radius",description:"Border radius scale and special shapes.",tokens:[{name:"--sf-radius-{none,xs,s,m,l,xl,2xl,3xl,4xl,full}",description:"Radius scale from 0 to 9999px (pill)."},{name:"--sf-radius-scale",description:"Global multiplier for all radius tokens (default 1)."},{name:"--sf-radius-pill",description:"Fully rounded (9999px)."},{name:"--sf-radius-outer",description:"Outer radius = inner + padding (for nested rounding)."}]},{category:"Shadows",description:"Box shadows, drop shadows, text shadows, and shadow configuration.",tokens:[{name:"--sf-shadow-{xs,s,m,l,xl,2xl}",description:"Elevation shadow scale, progressively more dramatic."},{name:"--sf-shadow-inner",description:"Inset shadow for recessed elements."},{name:"--sf-shadow-glow",description:"Colored glow effect (uses --sf-shadow-glow-color)."},{name:"--sf-shadow-none",description:"Explicit no-shadow value."},{name:"--sf-shadow-color",description:"Base shadow color (derived from neutral)."},{name:"--sf-shadow-strength",description:"Shadow opacity multiplier (adapts to dark mode)."},{name:"--sf-drop-shadow-{s,m,l}",description:"CSS filter drop-shadow equivalents."},{name:"--sf-text-shadow-{s,m,l,none}",description:"Text shadow presets."}]},{category:"Effects",description:"Blurs, opacities, gradients, masks, and perspective.",tokens:[{name:"--sf-blur-{xs,s,m,l,xl}",description:"Blur radius scale: 4px to 48px."},{name:"--sf-opacity-{0,10,25,50,75,100,disabled}",description:"Named opacity presets."},{name:"--sf-gradient-{brand,primary,secondary,tertiary,surface}",description:"Predefined gradients using brand colors."},{name:"--sf-gradient-fade--{t,b,l,r}",description:"Directional fade-to-background gradients."},{name:"--sf-mask-scrim-start/end",description:"Scroll mask fade depth."},{name:"--sf-perspective-{near,normal,far}",description:"3D perspective presets: 500px, 1000px, 2000px."},{name:"--sf-contrast-bias/threshold",description:"Color contrast tuning for auto text-on-color logic."}]},{category:"Motion",description:"Durations, easing curves, transitions, and animations.",tokens:[{name:"--sf-duration-{none,instant,fast,normal,slow,slower}",description:"Duration scale: 0ms to 600ms (respects --sf-motion-scale)."},{name:"--sf-motion-scale",description:"Global animation speed multiplier (set 0 to disable)."},{name:"--sf-ease-{linear,in,out,in-out,bounce,elastic,overshoot,spring}",description:"Easing function presets."},{name:"--sf-transition-{all,colors,opacity,shadow,transform,fast,slow,enter,exit}",description:"Pre-composed transition shorthands."},{name:"--sf-animation-{fade-in,fade-out,scale-up,scale-down,slide-in-*,float,ping,blink,color-pulse}",description:"Named keyframe animation shorthands."},{name:"--sf-animation-delay-{1-5}",description:"Stagger delays for sequential animations."}]},{category:"Z-Index",description:"Z-index scale for predictable layering.",tokens:[{name:"--sf-z-{below,base,raised,low,mid,high,top,max}",description:"Z-index scale: -1, 0, 1, 10, 100, 500, 900, 9999."}]},{category:"Focus",description:"Focus ring appearance for keyboard navigation.",tokens:[{name:"--sf-focus-ring-width/offset/color/style/shadow",description:"Focus indicator configuration."},{name:"--sf-caret-color",description:"Text input caret color (defaults to action)."}]},{category:"Scroll",description:"Scroll timeline and scrollbar styling.",tokens:[{name:"--sf-scroll-timeline-range-start/end",description:"Scroll-driven animation range."},{name:"--sf-scrollbar-thumb/track",description:"Custom scrollbar colors."}]},{category:"Print",description:"Print stylesheet configuration.",tokens:[{name:"--sf-print-base-size/page-margin/page-size",description:"Print layout tokens: 11pt base, 2cm margins, A4 size."}]}],Wo=[{category:"Layout Primitives",description:"Breakpoint-free, container-query-driven layout components. Each is a single class with per-instance token overrides via inline style.",classes:[{name:".sf-section",description:"Vertical page rhythm with size variants (--s/--m/--l/--xl/--collapse)."},{name:".sf-section-group",description:"Collapses gap between adjacent sections."},{name:".sf-container",description:"Centered max-width wrapper with gutters. Variants: --narrow, --wide, --full, --prose."},{name:".sf-box",description:"Isolated unit with padding and optional border."},{name:".sf-center",description:"Intrinsic centering with max-width. Variant: --intrinsic."},{name:".sf-stack",description:"Vertical flow with consistent gap. Size variants: --2xs to --3xl. Alignment: --center, --end, --stretch."},{name:".sf-cluster",description:"Wrapping inline group. Size variants: --2xs to --xl. Alignment: --center, --end, --between. Wrap: --no-wrap."},{name:".sf-sidebar",description:"Content + side panel that wraps. Variants: --right, --narrow, --wide."},{name:".sf-switcher",description:"N columns above threshold, stacked below. Variants: --no-wrap, --vertical."},{name:".sf-grid",description:"Auto-fill responsive grid. Size variants: --xs to --xl. Variants: --fit, --dense."},{name:".sf-grid-{1,2,3,4,6}",description:"Fixed-column grids, container-responsive."},{name:".sf-grid-{1-2,2-1,1-3,3-1}",description:"Ratio two-column grids."},{name:".sf-bento",description:"Dense free-form grid. Variants: --2, --4, --compact, --tall."},{name:".sf-alternate",description:"Zigzag two-column layout, reverses every other row."},{name:".sf-pancake",description:"Sticky-footer grid: header / main(1fr) / footer."},{name:".sf-content-grid",description:"Breakout layout grid. Children use .sf-breakout or .sf-full-bleed."},{name:".sf-cover",description:"Full-height region with centered content. Variants: --min, --max, --padding-s, --padding-l."},{name:".sf-frame",description:"Aspect-ratio media box. Variants: --square, --portrait, --video, --cinema, --3-2, --4-3, --golden."},{name:".sf-reel",description:"Horizontal scroll strip with optional mask fade."},{name:".sf-imposter",description:"Absolutely-centered overlay. Variants: --fixed, --contain."},{name:".sf-subgrid / .sf-subgrid-rows",description:"Inherit parent grid tracks."},{name:".sf-divider",description:"Token-driven separator. Variant: --vertical."},{name:".sf-icon",description:"Em-based inline icon sizing. Sizes: --xs to --xl. Variant: --boxed."},{name:".sf-prose",description:"Readable long-form text with automatic vertical rhythm."},{name:".sf-not-prose",description:"Reset zone inside .sf-prose for embedded components."}]},{category:"Macros",description:"Recipe classes that answer 'what does this element do/look like?' - composable with layout primitives.",classes:[{name:".sf-flow",description:"Lobotomized owl: consistent gap between consecutive children."},{name:".sf-truncate",description:"Single-line ellipsis overflow."},{name:".sf-line-clamp-{2,3,N}",description:"Multi-line text clamping with ellipsis. -N reads --sf-line-clamp."},{name:".sf-equal-height",description:"Forces flex children to share the tallest child's height."},{name:".sf-aspect",description:"Generic aspect-ratio container (reads --sf-aspect token)."},{name:".sf-scroll-shadow",description:"Top + bottom mask gradient for scrolling containers."},{name:".sf-scroll-snap",description:"Vertical scroll-snap container."},{name:".sf-overflow-fade",description:"End-edge horizontal fade for overflowing inline content."},{name:".sf-no-tap-highlight",description:"Suppresses WebKit/Android tap highlight."},{name:".sf-text-gradient",description:"Gradient text effect using background-clip."},{name:".sf-clickable-parent",description:"Makes an entire card clickable via the first link inside."},{name:".sf-link-external",description:"Adds external link indicator marker."}]},{category:"Surfaces",description:"Color surface utility classes that set background and text color for a brand context.",classes:[{name:".sf-surface--{primary,secondary,tertiary,action,neutral,inverse}",description:"Brand-colored surface with auto-contrast text."},{name:".sf-surface--{success,warning,error,info,danger}",description:"Status-colored surfaces."}]},{category:"Animations",description:"CSS animation utility classes that apply predefined keyframe animations.",classes:[{name:".sf-fade-in / .sf-fade-out",description:"Opacity entrance/exit animations."},{name:".sf-scale-up / .sf-scale-down",description:"Scale entrance/exit animations."},{name:".sf-slide-in-{up,down,left,right}",description:"Directional slide-in entrance animations."},{name:".sf-color-pulse",description:"Continuous color pulse animation."},{name:".sf-entrance--fade / --fade-up / --fade-down / --fade-left / --fade-right / --scale-up",description:"Scroll-triggered entrance animations (scroll-timeline driven)."}]},{category:"State Classes (.is-*)",description:"Runtime state classes toggled by JS or mirrored from ARIA. They live in the slashed.states layer. Always pair with matching ARIA attributes.",classes:[{name:".is-hidden / .is-invisible / .is-visible",description:"Visibility control: removed from layout / hidden but keeps box / visible."},{name:".is-disabled / .is-readonly",description:"Non-interactive states with dimming."},{name:".is-loading / .is-pending / .is-busy",description:"Loading states: spinner replacement / optimistic UI / cursor hint."},{name:".is-skeleton",description:"Placeholder shimmer animation."},{name:".is-active / .is-selected / .is-current / .is-pressed",description:"Selection/activation states."},{name:".is-highlighted",description:"Transient emphasis (e.g. search result highlight)."},{name:".is-open / .is-collapsed / .is-expanded",description:"Disclosure states for modals, drawers, accordions."},{name:".is-valid / .is-invalid",description:"Form field validation results (maps to aria-invalid)."},{name:".is-success / .is-error / .is-warning / .is-info / .is-danger",description:"General feedback states and destructive-action context."},{name:".is-sticky / .is-pinned / .is-fixed / .is-fullscreen",description:"Positioning states."},{name:".is-clipped / .is-scrollable / .is-truncated / .is-resizable",description:"Overflow handling states."},{name:".is-dragging / .is-drop-target / .is-draggable",description:"Drag and drop states."},{name:".is-overlay / .is-focused / .is-clickable / .is-unselectable",description:"Positioning, focus, cursor, and selection states."},{name:".is-empty",description:"Hide element when empty (:empty pseudo-class)."}]}],Yo=[{name:"--sf-is-dark",description:"Numeric flag (0 or 1) indicating dark mode is active. Registered property."},{name:"--sf-lumlocker",description:"Internal luminance lock value for color derivation."},{name:"--sf-color-scheme",description:"CSS color-scheme declaration (light dark)."},{name:"--sf-current-font-weight",description:"Current context font weight (used by strong elements)."},{name:"--sf-link-external-marker",description:"External link arrow character."},{name:"--sf-field-block",description:"Vertical spacing between form fields."},{name:"--sf-field-required-marker",description:"Required field indicator string."}];var Xo=F('

                    • '),Zo=F('
                        '),Jo=F('
                      • '),Qo=F('
                        Misc Tokens that do not fit a single category.
                          '),ec=F('

                          CSS Custom Properties (--sf-*)

                          '),tc=F('
                        • '),sc=F('
                            '),ac=F('

                            Utility & State Classes

                            '),rc=F('

                            '),nc=F('

                            API Cheatsheet

                            ');function ic(e,t){ke(t,!0);let s=te(""),a=te("all");const r=ne.inventory?.variables?.length??0,n=ne.inventory?.sf_classes?.length??0,l=ne.inventory?.is_classes?.length??0;let o=j(()=>v(Go,"tokens")),c=j(()=>v(Wo,"classes")),d=j(()=>Yo.filter(I=>_(I.name,I.description)));function _(I,Y){if(!i(s).trim())return!0;const G=i(s).trim().toLowerCase();return I.toLowerCase().includes(G)||Y.toLowerCase().includes(G)}function v(I,Y){return i(s).trim()?I.map(G=>({...G,[Y]:G[Y].filter(ae=>_(ae.name,ae.description))})).filter(G=>G[Y].length>0):I}let u=j(()=>i(a)==="all"||i(a)==="variables"),m=j(()=>i(a)==="all"||i(a)==="classes"),b=j(()=>i(s).trim()!==""&&(!i(u)||i(o).length===0&&i(d).length===0)&&(!i(m)||i(c).length===0));var w=nc(),h=f(w),y=p(f(h),2),S=f(y),$=p(h,2),R=f($),B=p(R,2),E=f(B);let C;var O=p(E,2);let L;var T=p(O,2);let D;var x=p($,2);{var k=I=>{var Y=ec(),G=p(f(Y),2);ie(G,17,()=>i(o),js,(ce,pe)=>{var ge=Zo(),N=f(ge),oe=f(N),me=f(oe),ye=p(oe,2),Ce=f(ye),ze=p(N,2);ie(ze,21,()=>i(pe).tokens,js,(Re,re)=>{var we=Xo(),be=f(we),Ke=f(be),xe=p(be,2),pt=f(xe);q(()=>{A(Ke,i(re).name),A(pt,i(re).description)}),z(Re,we)}),q(Re=>{ge.open=Re,A(me,i(pe).category),A(Ce,i(pe).description)},[()=>!i(s).trim()]),z(ce,ge)});var ae=p(G,2);{var ue=ce=>{var pe=Qo(),ge=p(f(pe),2);ie(ge,21,()=>i(d),js,(N,oe)=>{var me=Jo(),ye=f(me),Ce=f(ye),ze=p(ye,2),Re=f(ze);q(()=>{A(Ce,i(oe).name),A(Re,i(oe).description)}),z(N,me)}),q(N=>pe.open=N,[()=>!i(s).trim()]),z(ce,pe)};fe(ae,ce=>{i(d).length>0&&ce(ue)})}z(I,Y)};fe(x,I=>{i(u)&&I(k)})}var P=p(x,2);{var M=I=>{var Y=ac(),G=p(f(Y),2);ie(G,17,()=>i(c),js,(ae,ue)=>{var ce=sc(),pe=f(ce),ge=f(pe),N=f(ge),oe=p(ge,2),me=f(oe),ye=p(pe,2);ie(ye,21,()=>i(ue).classes,js,(Ce,ze)=>{var Re=tc(),re=f(Re),we=f(re),be=p(re,2),Ke=f(be);q(()=>{A(we,i(ze).name),A(Ke,i(ze).description)}),z(Ce,Re)}),q(Ce=>{ce.open=Ce,A(N,i(ue).category),A(me,i(ue).description)},[()=>!i(s).trim()]),z(ae,ce)}),z(I,Y)};fe(P,I=>{i(m)&&I(M)})}var V=p(P,2);{var U=I=>{var Y=rc(),G=f(Y);q(()=>A(G,`No results for "${i(s)??""}"`)),z(I,Y)};fe(V,I=>{i(b)&&I(U)})}q(()=>{A(S,`${r??""} variables | ${n??""} layout/utility classes | ${l??""} state classes`),Q(E,"aria-pressed",i(a)==="all"),C=rt(E,1,"svelte-osej3t",null,C,{active:i(a)==="all"}),Q(O,"aria-pressed",i(a)==="variables"),L=rt(O,1,"svelte-osej3t",null,L,{active:i(a)==="variables"}),Q(T,"aria-pressed",i(a)==="classes"),D=rt(T,1,"svelte-osej3t",null,D,{active:i(a)==="classes"})}),zt(R,()=>i(s),I=>K(s,I)),he("click",E,()=>K(a,"all")),he("click",O,()=>K(a,"variables")),he("click",T,()=>K(a,"classes")),z(e,w),Se()}De(["click"]);var lc=F('
                            '),oc=F('
                            '),cc=F(`

                            Live preview

                            The quick brown fox jumps over the lazy dog

                            Body and heading fonts update as you adjust typography settings. Colors below reflect brand and status tokens for the selected mode.

                            Primary Action Outline Ghost

                            Card Component

                            Design token preview

                            Active

                            This card shows radius, shadow, spacing, colors, and typography - working together. All values update live as you adjust tokens.

                            Generated CSS:
                            `);function dc(e,t){xe(t,!0);const s=["primary","secondary","tertiary","action","neutral","base"],a=["success","warning","error","info","danger"],r=re.defaults?.colors??{};let n=te(!1);const l=j(()=>{const oe=[],Se=H.colors??{},be=H.typography??{},Ke=H.radius??{},we=H.shadows??{};for(const Re of s){const kt=Se[`brand_${Re}`]??r.brand_hex_hints?.[Re];kt&&oe.push(`--sf-color-${Re}-light:${kt}`);const St=Se[`brand_dark_${Re}`]??r.brand_dark_hex_hints?.[Re];St&&oe.push(`--sf-color-${Re}-dark:${St}`)}for(const Re of a){const kt=Se[`status_${Re}`]??r.status_hex_hints?.[Re];kt&&oe.push(`--sf-color-${Re}-light:${kt}`);const St=Se[`status_dark_${Re}`]??r.status_dark_hex_hints?.[Re];St&&oe.push(`--sf-color-${Re}-dark:${St}`)}be.font_body&&oe.push(`--sf-font-body:${be.font_body}`),be.font_heading&&oe.push(`--sf-font-heading:${be.font_heading}`);const it=parseFloat(Ke.radius_scale??re.defaults?.radius?.radius_scale??1)||1;oe.push(`--preview-radius-s:${Math.round(4*it)}px`),oe.push(`--preview-radius-m:${Math.round(8*it)}px`),oe.push(`--preview-radius-l:${Math.round(16*it)}px`);const xt=we.shadow_strength,pt=parseFloat(xt!==void 0&&xt!==""?xt:re.defaults?.shadows?.shadow_strength??.08);return oe.push(`--preview-shadow:0 2px 8px 0 rgba(0,0,0,${(pt*2).toFixed(3)}),0 1px 3px 0 rgba(0,0,0,${pt.toFixed(3)})`),oe.join(";")}),o=j(()=>i(n)?"dark":"light"),c=j(()=>sr(H));var d=cc();let _;var v=f(d),u=p(f(v),2),m=f(u);let b;var w=p(m,2);let h;var y=p(v,6),S=f(y);ne(S,16,()=>s,oe=>oe,(oe,Se)=>{var be=lc();let Ke;var we=f(be);q(()=>{Q(be,"title",Se),Ke=ve(be,"",Ke,{background:`var(--sf-color-${Se}-${i(o)}, #ddd)`}),A(we,Se)}),z(oe,be)});var C=p(S,2);ne(C,16,()=>a,oe=>oe,(oe,Se)=>{var be=oc();let Ke;var we=f(be);q(()=>{Q(be,"title",Se),Ke=ve(be,"",Ke,{background:`var(--sf-color-${Se}-${i(o)}, #ddd)`}),A(we,Se)}),z(oe,be)});var R=p(y,2),B=f(R);let E;var $=p(B,2);let O;var L=p($,2);let T;var D=p(R,2);ve(D,"",{},{"box-shadow":"var(--preview-shadow)"});var x=f(D);let k;var P=p(x,2),M=f(P),V=f(M);let U;var I=p(V,2),Y=f(I);ve(Y,"",{},{"font-family":"var(--sf-font-heading, system-ui, sans-serif)"});var G=p(I,2);let ae;var ue=p(M,2);ve(ue,"",{},{"font-family":"var(--sf-font-body, system-ui, sans-serif)"});var ce=p(ue,2),pe=f(ce);let ge;var N=p(pe,2);let le;var me=p(N,2);let ye;var Ce=p(D,2),$e=p(f(Ce)),Fe=f($e);q(()=>{_=rt(d,1,"slashed-preview svelte-g79qke",null,_,{"is-dark":i(n)}),ve(d,i(l)),b=rt(m,1,"slashed-preview__mode-btn svelte-g79qke",null,b,{active:!i(n)}),h=rt(w,1,"slashed-preview__mode-btn svelte-g79qke",null,h,{active:i(n)}),E=ve(B,"",E,{background:`var(--sf-color-primary-${i(o)}, #4338ca)`}),O=ve($,"",O,{background:`var(--sf-color-action-${i(o)}, #0891b2)`}),T=ve(L,"",T,{"border-color":`var(--sf-color-primary-${i(o)}, #4338ca)`,color:`var(--sf-color-primary-${i(o)}, #4338ca)`}),k=ve(x,"",k,{background:`var(--sf-color-primary-${i(o)}, #4338ca)`}),U=ve(V,"",U,{background:`var(--sf-color-secondary-${i(o)}, #7c3aed)`}),ae=ve(G,"",ae,{background:`var(--sf-color-success-${i(o)}, #16a34a)`}),ge=ve(pe,"",ge,{background:`var(--sf-color-info-${i(o)}, #0284c7)`}),le=ve(N,"",le,{background:`var(--sf-color-warning-${i(o)}, #ca8a04)`}),ye=ve(me,"",ye,{background:`var(--sf-color-action-${i(o)}, #0891b2)`}),A(Fe,i(c)||"/* (defaults — no overrides set) */")}),he("click",m,()=>K(n,!1)),he("click",w,()=>K(n,!0)),z(e,d),ke()}De(["click"]);var fc=F(' '),uc=F('Saving…'),vc=F('Saved'),pc=F('Unsaved changes'),hc=F('All changes saved'),_c=F('
                            ');function gc(e,t){xe(t,!0);const s=["contrast","radius","shadows","motion","zindex"];async function a(){if(!W.saving){W.saving=!0,W.error="";try{if(W.activeTab==="misc"){const E=await Promise.allSettled(s.map(O=>yr(O,H[O]??{}))),$=[];if(E.forEach((O,L)=>{O.status==="fulfilled"?O.value?.values&&(H[s[L]]=O.value.values):$.push(s[L])}),$.length>0)throw new Error(`Failed to save: ${$.join(", ")}`)}else{const E=W.activeTab,$=H[E]??{},O=await yr(E,$);O&&O.values&&(H[E]=O.values)}W.dirty=!1,W.lastSavedAt=Date.now()}catch(E){W.error=E&&E.message||String(E)}finally{W.saving=!1}}}async function r(){if(!W.saving&&confirm(`Reset the ${re.tabs[W.activeTab]??W.activeTab} tab to defaults?`)){W.saving=!0,W.error="";try{if(W.activeTab==="misc"){const E=await Promise.allSettled(s.map(O=>wr(O))),$=[];if(E.forEach((O,L)=>{O.status==="fulfilled"?br(s[L]):$.push(s[L])}),$.length>0)throw new Error(`Failed to reset: ${$.join(", ")}`)}else await wr(W.activeTab),br(W.activeTab);W.dirty=!1,W.lastSavedAt=Date.now()}catch(E){W.error=E&&E.message||String(E)}finally{W.saving=!1}}}let n=te(!1);sn(()=>{if(W.lastSavedAt){K(n,!0);const E=setTimeout(()=>K(n,!1),2e3);return()=>clearTimeout(E)}});const l=j(()=>Lo(H));function o(){const E=sr(H);if(!E)return;const $=new Blob([E],{type:"text/css"}),O=URL.createObjectURL($),L=document.createElement("a");L.href=O,L.download="slashed-custom.css",document.body.appendChild(L),L.click(),document.body.removeChild(L),URL.revokeObjectURL(O)}var c=_c();let d;var _=f(c),v=f(_);{var u=E=>{var $=fc(),O=f($);q(()=>A(O,W.error)),z(E,$)},m=E=>{var $=uc();z(E,$)},b=E=>{var $=vc();z(E,$)},w=E=>{var $=pc();z(E,$)},h=E=>{var $=hc();z(E,$)};fe(v,E=>{W.error?E(u):W.saving?E(m,1):i(n)?E(b,2):W.dirty?E(w,3):E(h,-1)})}var y=p(_,2),S=f(y),C=p(S,2),R=p(C,2),B=f(R);q(()=>{d=rt(c,1,"bar svelte-1oj49qa",null,d,{dirty:W.dirty}),S.disabled=W.saving,C.disabled=!i(l),R.disabled=W.saving||!W.dirty,A(B,W.saving?"Saving…":"Save changes")}),he("click",S,r),he("click",C,o),he("click",R,a),z(e,c),ke()}De(["click"]);var mc=F(' '),bc=F(' '),yc=F('

                            SLASHED Design Tokens

                            Adjust framework tokens, inspect generated variables, and manage the bundled CSS in one place.

                            ');function wc(e,t){xe(t,!0);const s=["cheatsheet","hooks","variables","classes","bundle","export"];let a=j(()=>s.includes(W.activeTab));sn(()=>{function x(k){W.dirty&&(k.preventDefault(),k.returnValue="")}return window.addEventListener("beforeunload",x),()=>window.removeEventListener("beforeunload",x)});var r=yc(),n=f(r),l=f(n),o=p(f(l),2),c=f(o);{var d=x=>{var k=mc(),P=f(k);q(()=>A(P,`Framework ${re.versions.framework??""}`)),z(x,k)};fe(c,x=>{re.versions.framework&&x(d)})}var _=p(c,2);{var v=x=>{var k=bc(),P=f(k);q(()=>A(P,`Plugin v${re.versions.plugin??""}`)),z(x,k)};fe(_,x=>{re.versions.plugin&&x(v)})}var u=p(n,2);vl(u,{});var m=p(u,2),b=f(m);{var w=x=>{kl(x,{})},h=x=>{Hl(x,{})},y=x=>{Jl(x,{})},S=x=>{co(x,{})},C=x=>{ho(x,{})},R=x=>{wo(x,{})},B=x=>{Co(x,{})},E=x=>{Bo(x,{})},$=x=>{Uo(x)},O=x=>{ic(x,{})};fe(b,x=>{W.activeTab==="colors"?x(w):W.activeTab==="typography"?x(h,1):W.activeTab==="spacing"?x(y,2):W.activeTab==="misc"?x(S,3):W.activeTab==="variables"?x(C,4):W.activeTab==="classes"?x(R,5):W.activeTab==="bundle"?x(B,6):W.activeTab==="export"?x(E,7):W.activeTab==="hooks"?x($,8):W.activeTab==="cheatsheet"&&x(O,9)})}var L=p(m,2);dc(L,{});var T=p(L,2);{var D=x=>{gc(x,{})};fe(T,x=>{i(a)||x(D)})}z(e,r),ke()}const Sr=document.getElementById("slashed-admin-app");Sr&&Yi(wc,{target:Sr}); + working together. All values update live as you adjust tokens.

                            Generated CSS:
                            `);function dc(e,t){ke(t,!0);const s=["primary","secondary","tertiary","action","neutral","base"],a=["success","warning","error","info","danger"],r=ne.defaults?.colors??{};let n=te(!1);const l=j(()=>{const re=[],we=H.colors??{},be=H.typography??{},Ke=H.radius??{},xe=H.shadows??{},pt=we.dark_overrides_enabled!=="0";for(const Ee of s){const kt=we[`brand_${Ee}`]??r.brand_hex_hints?.[Ee];if(kt&&re.push(`--sf-color-${Ee}-light:${kt}`),pt){const St=we[`brand_dark_${Ee}`]??r.brand_dark_hex_hints?.[Ee];St&&re.push(`--sf-color-${Ee}-dark:${St}`)}else{const St=Ee==="base"?"oklch(from var(--sf-color-base-light) clamp(0.16, calc(1.18 - l), 0.24) calc(c * 0.5) h)":`oklch(from var(--sf-color-${Ee}-light) clamp(0.65, calc(0.95 - l * 0.5), 0.88) calc(c * 0.9) h)`;re.push(`--sf-color-${Ee}-dark:${St}`)}}for(const Ee of a){const kt=we[`status_${Ee}`]??r.status_hex_hints?.[Ee];if(kt&&re.push(`--sf-color-${Ee}-light:${kt}`),pt){const St=we[`status_dark_${Ee}`]??r.status_dark_hex_hints?.[Ee];St&&re.push(`--sf-color-${Ee}-dark:${St}`)}else re.push(`--sf-color-${Ee}-dark:oklch(from var(--sf-color-${Ee}-light) clamp(0.65, calc(0.95 - l * 0.5), 0.88) calc(c * 0.9) h)`)}be.font_body&&re.push(`--sf-font-body:${be.font_body}`),be.font_heading&&re.push(`--sf-font-heading:${be.font_heading}`);const xt=parseFloat(Ke.radius_scale??ne.defaults?.radius?.radius_scale??1)||1;re.push(`--preview-radius-s:${Math.round(4*xt)}px`),re.push(`--preview-radius-m:${Math.round(8*xt)}px`),re.push(`--preview-radius-l:${Math.round(16*xt)}px`);const it=xe.shadow_strength,ls=parseFloat(it!==void 0&&it!==""?it:ne.defaults?.shadows?.shadow_strength??.08);return re.push(`--preview-shadow:0 2px 8px 0 rgba(0,0,0,${(ls*2).toFixed(3)}),0 1px 3px 0 rgba(0,0,0,${ls.toFixed(3)})`),re.join(";")}),o=j(()=>i(n)?"dark":"light"),c=j(()=>ar(H));var d=cc();let _;var v=f(d),u=p(f(v),2),m=f(u);let b;var w=p(m,2);let h;var y=p(v,6),S=f(y);ie(S,16,()=>s,re=>re,(re,we)=>{var be=lc();let Ke;var xe=f(be);q(()=>{Q(be,"title",we),Ke=ve(be,"",Ke,{background:`var(--sf-color-${we}-${i(o)}, #ddd)`}),A(xe,we)}),z(re,be)});var $=p(S,2);ie($,16,()=>a,re=>re,(re,we)=>{var be=oc();let Ke;var xe=f(be);q(()=>{Q(be,"title",we),Ke=ve(be,"",Ke,{background:`var(--sf-color-${we}-${i(o)}, #ddd)`}),A(xe,we)}),z(re,be)});var R=p(y,2),B=f(R);let E;var C=p(B,2);let O;var L=p(C,2);let T;var D=p(R,2);ve(D,"",{},{"box-shadow":"var(--preview-shadow)"});var x=f(D);let k;var P=p(x,2),M=f(P),V=f(M);let U;var I=p(V,2),Y=f(I);ve(Y,"",{},{"font-family":"var(--sf-font-heading, system-ui, sans-serif)"});var G=p(I,2);let ae;var ue=p(M,2);ve(ue,"",{},{"font-family":"var(--sf-font-body, system-ui, sans-serif)"});var ce=p(ue,2),pe=f(ce);let ge;var N=p(pe,2);let oe;var me=p(N,2);let ye;var Ce=p(D,2),ze=p(f(Ce)),Re=f(ze);q(()=>{_=rt(d,1,"slashed-preview svelte-g79qke",null,_,{"is-dark":i(n)}),ve(d,i(l)),b=rt(m,1,"slashed-preview__mode-btn svelte-g79qke",null,b,{active:!i(n)}),h=rt(w,1,"slashed-preview__mode-btn svelte-g79qke",null,h,{active:i(n)}),E=ve(B,"",E,{background:`var(--sf-color-primary-${i(o)}, #4338ca)`}),O=ve(C,"",O,{background:`var(--sf-color-action-${i(o)}, #0891b2)`}),T=ve(L,"",T,{"border-color":`var(--sf-color-primary-${i(o)}, #4338ca)`,color:`var(--sf-color-primary-${i(o)}, #4338ca)`}),k=ve(x,"",k,{background:`var(--sf-color-primary-${i(o)}, #4338ca)`}),U=ve(V,"",U,{background:`var(--sf-color-secondary-${i(o)}, #7c3aed)`}),ae=ve(G,"",ae,{background:`var(--sf-color-success-${i(o)}, #16a34a)`}),ge=ve(pe,"",ge,{background:`var(--sf-color-info-${i(o)}, #0284c7)`}),oe=ve(N,"",oe,{background:`var(--sf-color-warning-${i(o)}, #ca8a04)`}),ye=ve(me,"",ye,{background:`var(--sf-color-action-${i(o)}, #0891b2)`}),A(Re,i(c)||"/* (defaults — no overrides set) */")}),he("click",m,()=>K(n,!1)),he("click",w,()=>K(n,!0)),z(e,d),Se()}De(["click"]);var fc=F(' '),uc=F('Saving…'),vc=F('Saved'),pc=F('Unsaved changes'),hc=F('All changes saved'),_c=F('
                            ');function gc(e,t){ke(t,!0);const s=["contrast","radius","shadows","motion","zindex"];async function a(){if(!W.saving){W.saving=!0,W.error="";try{if(W.activeTab==="misc"){const E=await Promise.allSettled(s.map(O=>wr(O,H[O]??{}))),C=[];if(E.forEach((O,L)=>{O.status==="fulfilled"?O.value?.values&&(H[s[L]]=O.value.values):C.push(s[L])}),C.length>0)throw new Error(`Failed to save: ${C.join(", ")}`)}else{const E=W.activeTab,C=H[E]??{},O=await wr(E,C);O&&O.values&&(H[E]=O.values)}W.dirty=!1,W.lastSavedAt=Date.now()}catch(E){W.error=E&&E.message||String(E)}finally{W.saving=!1}}}async function r(){if(!W.saving&&confirm(`Reset the ${ne.tabs[W.activeTab]??W.activeTab} tab to defaults?`)){W.saving=!0,W.error="";try{if(W.activeTab==="misc"){const E=await Promise.allSettled(s.map(O=>xr(O))),C=[];if(E.forEach((O,L)=>{O.status==="fulfilled"?yr(s[L]):C.push(s[L])}),C.length>0)throw new Error(`Failed to reset: ${C.join(", ")}`)}else await xr(W.activeTab),yr(W.activeTab);W.dirty=!1,W.lastSavedAt=Date.now()}catch(E){W.error=E&&E.message||String(E)}finally{W.saving=!1}}}let n=te(!1);an(()=>{if(W.lastSavedAt){K(n,!0);const E=setTimeout(()=>K(n,!1),2e3);return()=>clearTimeout(E)}});const l=j(()=>Lo(H));function o(){const E=ar(H);if(!E)return;const C=new Blob([E],{type:"text/css"}),O=URL.createObjectURL(C),L=document.createElement("a");L.href=O,L.download="slashed-custom.css",document.body.appendChild(L),L.click(),document.body.removeChild(L),URL.revokeObjectURL(O)}var c=_c();let d;var _=f(c),v=f(_);{var u=E=>{var C=fc(),O=f(C);q(()=>A(O,W.error)),z(E,C)},m=E=>{var C=uc();z(E,C)},b=E=>{var C=vc();z(E,C)},w=E=>{var C=pc();z(E,C)},h=E=>{var C=hc();z(E,C)};fe(v,E=>{W.error?E(u):W.saving?E(m,1):i(n)?E(b,2):W.dirty?E(w,3):E(h,-1)})}var y=p(_,2),S=f(y),$=p(S,2),R=p($,2),B=f(R);q(()=>{d=rt(c,1,"bar svelte-1oj49qa",null,d,{dirty:W.dirty}),S.disabled=W.saving,$.disabled=!i(l),R.disabled=W.saving||!W.dirty,A(B,W.saving?"Saving…":"Save changes")}),he("click",S,r),he("click",$,o),he("click",R,a),z(e,c),Se()}De(["click"]);var mc=F(' '),bc=F(' '),yc=F('

                            SLASHED Design Tokens

                            Adjust framework tokens, inspect generated variables, and manage the bundled CSS in one place.

                            ');function wc(e,t){ke(t,!0);const s=["cheatsheet","hooks","variables","classes","bundle","export"];let a=j(()=>s.includes(W.activeTab));an(()=>{function x(k){W.dirty&&(k.preventDefault(),k.returnValue="")}return window.addEventListener("beforeunload",x),()=>window.removeEventListener("beforeunload",x)});var r=yc(),n=f(r),l=f(n),o=p(f(l),2),c=f(o);{var d=x=>{var k=mc(),P=f(k);q(()=>A(P,`Framework ${ne.versions.framework??""}`)),z(x,k)};fe(c,x=>{ne.versions.framework&&x(d)})}var _=p(c,2);{var v=x=>{var k=bc(),P=f(k);q(()=>A(P,`Plugin v${ne.versions.plugin??""}`)),z(x,k)};fe(_,x=>{ne.versions.plugin&&x(v)})}var u=p(n,2);vl(u,{});var m=p(u,2),b=f(m);{var w=x=>{kl(x,{})},h=x=>{Hl(x,{})},y=x=>{Jl(x,{})},S=x=>{co(x,{})},$=x=>{ho(x,{})},R=x=>{wo(x,{})},B=x=>{$o(x,{})},E=x=>{Bo(x,{})},C=x=>{Uo(x)},O=x=>{ic(x,{})};fe(b,x=>{W.activeTab==="colors"?x(w):W.activeTab==="typography"?x(h,1):W.activeTab==="spacing"?x(y,2):W.activeTab==="misc"?x(S,3):W.activeTab==="variables"?x($,4):W.activeTab==="classes"?x(R,5):W.activeTab==="bundle"?x(B,6):W.activeTab==="export"?x(E,7):W.activeTab==="hooks"?x(C,8):W.activeTab==="cheatsheet"&&x(O,9)})}var L=p(m,2);dc(L,{});var T=p(L,2);{var D=x=>{gc(x,{})};fe(T,x=>{i(a)||x(D)})}z(e,r),Se()}const Er=document.getElementById("slashed-admin-app");Er&&Yi(wc,{target:Er}); //# sourceMappingURL=app.js.map From b466a2fd5087e90087d0ac68750393621576394c Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 29 May 2026 13:38:27 +0000 Subject: [PATCH 2/3] fix(preview): partial dark overrides fall back to auto-derivation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When the dark-override toggle is ON but only some colors have an explicit dark value, the preview was falling back to the default brand_dark_hex_hints — hardcoded palette swatches that don't reflect the user's customised light colors. The framework itself falls back to auto-derivation (CSS relative color syntax) for any --sf-color-*-dark that isn't explicitly set. The preview now does the same: a stored dark value is used when present; otherwise the autoDark() formula is applied regardless of toggle state. This makes partially-overridden palettes render accurately in both Dark and Light preview modes. https://claude.ai/code/session_019MD9F8rrpYzCeDTmSTLA1K --- .../src/components/LivePreview.svelte | 28 +++++++++---------- integrations/bricks/assets/admin-app/app.js | 24 ++++++++-------- 2 files changed, 25 insertions(+), 27 deletions(-) diff --git a/integrations/bricks/admin-app/src/components/LivePreview.svelte b/integrations/bricks/admin-app/src/components/LivePreview.svelte index 538032f4..d3407c7b 100644 --- a/integrations/bricks/admin-app/src/components/LivePreview.svelte +++ b/integrations/bricks/admin-app/src/components/LivePreview.svelte @@ -48,28 +48,26 @@ // what the front-end actually renders. When enabled, use stored values. const darkEnabled = colors.dark_overrides_enabled !== '0'; + // Auto-derivation formula matching core/tokens.css. Used when: + // a) toggle is OFF (all colors auto-derived), or + // b) toggle is ON but no explicit dark value stored for that color. + // This mirrors the framework's own fallback so the preview is accurate + // even when only some dark overrides are set. + const autoDark = (name) => name === 'base' + ? `oklch(from var(--sf-color-base-light) clamp(0.16, calc(1.18 - l), 0.24) calc(c * 0.5) h)` + : `oklch(from var(--sf-color-${name}-light) clamp(0.65, calc(0.95 - l * 0.5), 0.88) calc(c * 0.9) h)`; + for (const name of brand) { const v = colors[`brand_${name}`] ?? defaultColors.brand_hex_hints?.[name]; if (v) pairs.push(`--sf-color-${name}-light:${v}`); - if (darkEnabled) { - const vd = colors[`brand_dark_${name}`] ?? defaultColors.brand_dark_hex_hints?.[name]; - if (vd) pairs.push(`--sf-color-${name}-dark:${vd}`); - } else { - const formula = name === 'base' - ? `oklch(from var(--sf-color-base-light) clamp(0.16, calc(1.18 - l), 0.24) calc(c * 0.5) h)` - : `oklch(from var(--sf-color-${name}-light) clamp(0.65, calc(0.95 - l * 0.5), 0.88) calc(c * 0.9) h)`; - pairs.push(`--sf-color-${name}-dark:${formula}`); - } + const storedDark = darkEnabled ? colors[`brand_dark_${name}`] : ''; + pairs.push(`--sf-color-${name}-dark:${storedDark || autoDark(name)}`); } for (const name of statuses) { const v = colors[`status_${name}`] ?? defaultColors.status_hex_hints?.[name]; if (v) pairs.push(`--sf-color-${name}-light:${v}`); - if (darkEnabled) { - const vd = colors[`status_dark_${name}`] ?? defaultColors.status_dark_hex_hints?.[name]; - if (vd) pairs.push(`--sf-color-${name}-dark:${vd}`); - } else { - pairs.push(`--sf-color-${name}-dark:oklch(from var(--sf-color-${name}-light) clamp(0.65, calc(0.95 - l * 0.5), 0.88) calc(c * 0.9) h)`); - } + const storedDark = darkEnabled ? colors[`status_dark_${name}`] : ''; + pairs.push(`--sf-color-${name}-dark:${storedDark || autoDark(name)}`); } if (typography.font_body) pairs.push(`--sf-font-body:${typography.font_body}`); if (typography.font_heading) pairs.push(`--sf-font-heading:${typography.font_heading}`); diff --git a/integrations/bricks/assets/admin-app/app.js b/integrations/bricks/assets/admin-app/app.js index 3aa10afe..d72f600e 100644 --- a/integrations/bricks/assets/admin-app/app.js +++ b/integrations/bricks/assets/admin-app/app.js @@ -1,17 +1,17 @@ -var Sn=Object.defineProperty;var rr=e=>{throw TypeError(e)};var En=(e,t,s)=>t in e?Sn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s;var Ve=(e,t,s)=>En(e,typeof t!="symbol"?t+"":t,s),wa=(e,t,s)=>t.has(e)||rr("Cannot "+s);var g=(e,t,s)=>(wa(e,t,"read from private field"),s?s.call(e):t.get(e)),Z=(e,t,s)=>t.has(e)?rr("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,s),X=(e,t,s,a)=>(wa(e,t,"write to private field"),a?a.call(e,s):t.set(e,s),s),le=(e,t,s)=>(wa(e,t,"access private method"),s);var Ka=Array.isArray,jn=Array.prototype.indexOf,Xt=Array.prototype.includes,va=Array.from,Tn=Object.defineProperty,us=Object.getOwnPropertyDescriptor,$n=Object.getOwnPropertyDescriptors,Cn=Object.prototype,zn=Array.prototype,Tr=Object.getPrototypeOf,nr=Object.isExtensible;const $r=()=>{};function An(e){for(var t=0;t{e=a,t=r});return{promise:s,resolve:e,reject:t}}function ot(e,t){if(Array.isArray(e))return e;if(t===void 0||!(Symbol.iterator in e))return Array.from(e);const s=[];for(const a of e)if(s.push(a),s.length===t)break;return s}const Oe=2,ys=4,pa=8,zr=1<<24,ct=16,vt=32,Vt=64,Ca=128,tt=512,Fe=1024,Me=2048,bt=4096,Le=8192,st=16384,is=32768,za=1<<25,ss=65536,ta=1<<17,Fn=1<<18,Es=1<<19,Rn=1<<20,mt=1<<25,as=65536,sa=1<<21,vs=1<<22,Lt=1<<23,Zt=Symbol("$state"),Mn=Symbol("legacy props"),On=Symbol(""),Ws=Symbol("attributes"),Aa=Symbol("class"),Fa=Symbol("style"),$s=Symbol("text"),Ys=Symbol("form reset"),ha=new class extends Error{constructor(){super(...arguments);Ve(this,"name","StaleReactionError");Ve(this,"message","The reaction that called `getAbortSignal()` was re-run or destroyed")}},Dn=!!globalThis.document?.contentType&&globalThis.document.contentType.includes("xml");function Pn(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function Ln(e,t,s){throw new Error("https://svelte.dev/e/each_key_duplicate")}function Vn(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function In(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function qn(e){throw new Error("https://svelte.dev/e/effect_orphan")}function Nn(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function Bn(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function Kn(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Hn(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Un(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function Gn(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}const Wn=1,Yn=2,Ar=4,Xn=8,Zn=16,Jn=1,Qn=4,ei=8,ti=16,si=1,ai=2,Ae=Symbol("uninitialized"),Fr="http://www.w3.org/1999/xhtml";function ri(){console.warn("https://svelte.dev/e/derived_inert")}function ni(){console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function ii(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}function Rr(e){return e===this.v}function li(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function Mr(e){return!li(e,this.v)}let Ye=null;function ws(e){Ye=e}function ke(e,t=!1,s){Ye={p:Ye,i:!1,c:null,e:null,s:e,x:null,r:se,l:null}}function Se(e){var t=Ye,s=t.e;if(s!==null){t.e=null;for(var a of s)rn(a)}return t.i=!0,Ye=t.p,{}}function Or(){return!0}let qt=[];function Dr(){var e=qt;qt=[],An(e)}function Jt(e){if(qt.length===0&&!As){var t=qt;queueMicrotask(()=>{t===qt&&Dr()})}qt.push(e)}function oi(){for(;qt.length>0;)Dr()}function Pr(e){var t=se;if(t===null)return ee.f|=Lt,e;if((t.f&is)===0&&(t.f&ys)===0)throw e;Pt(e,t)}function Pt(e,t){for(;t!==null;){if((t.f&Ca)!==0){if((t.f&is)===0)throw e;try{t.b.error(e);return}catch(s){e=s}}t=t.parent}throw e}const ci=-7169;function je(e,t){e.f=e.f&ci|t}function Ha(e){(e.f&tt)!==0||e.deps===null?je(e,Fe):je(e,bt)}function Lr(e){if(e!==null)for(const t of e)(t.f&Oe)===0||(t.f&as)===0||(t.f^=as,Lr(t.deps))}function Vr(e,t,s){(e.f&Me)!==0?t.add(e):(e.f&bt)!==0&&s.add(e),Lr(e.deps),je(e,Fe)}let Ks=!1;function di(e){var t=Ks;try{return Ks=!1,[e(),Ks]}finally{Ks=t}}let xa=null,os=null,J=null,Ra=null,dt=null,Ma=null,As=!1,ka=!1,fs=null,Xs=null;var ir=0;let fi=1;var ps,Mt,Kt,hs,_s,Ht,gs,jt,Ds,Ue,Ps,Ot,ht,_t,ms,Ut,de,Oa,Cs,Da,Ir,qr,Zs,ui,Pa,ds;const da=class da{constructor(){Z(this,de);Ve(this,"id",fi++);Z(this,ps,!1);Ve(this,"linked",!0);Z(this,Mt,null);Z(this,Kt,null);Ve(this,"async_deriveds",new Map);Ve(this,"current",new Map);Ve(this,"previous",new Map);Ve(this,"unblocked",new Set);Z(this,hs,new Set);Z(this,_s,new Set);Z(this,Ht,new Set);Z(this,gs,0);Z(this,jt,new Map);Z(this,Ds,null);Z(this,Ue,[]);Z(this,Ps,[]);Z(this,Ot,new Set);Z(this,ht,new Set);Z(this,_t,new Map);Z(this,ms,new Set);Ve(this,"is_fork",!1);Z(this,Ut,!1)}skip_effect(t){g(this,_t).has(t)||g(this,_t).set(t,{d:[],m:[]}),g(this,ms).delete(t)}unskip_effect(t,s=a=>this.schedule(a)){var a=g(this,_t).get(t);if(a){g(this,_t).delete(t);for(var r of a.d)je(r,Me),s(r);for(r of a.m)je(r,bt),s(r)}g(this,ms).add(t)}capture(t,s,a=!1){t.v!==Ae&&!this.previous.has(t)&&this.previous.set(t,t.v),(t.f&Lt)===0&&(this.current.set(t,[s,a]),dt?.set(t,s)),this.is_fork||(t.v=s)}activate(){J=this}deactivate(){J=null,dt=null}flush(){try{ka=!0,J=this,le(this,de,Cs).call(this)}finally{ir=0,Ma=null,fs=null,Xs=null,ka=!1,J=null,dt=null,Qt.clear()}}discard(){for(const t of g(this,_s))t(this);g(this,_s).clear(),g(this,Ht).clear(),le(this,de,ds).call(this)}register_created_effect(t){g(this,Ps).push(t)}increment(t,s){if(X(this,gs,g(this,gs)+1),t){let a=g(this,jt).get(s)??0;g(this,jt).set(s,a+1)}}decrement(t,s){if(X(this,gs,g(this,gs)-1),t){let a=g(this,jt).get(s)??0;a===1?g(this,jt).delete(s):g(this,jt).set(s,a-1)}g(this,Ut)||(X(this,Ut,!0),Jt(()=>{X(this,Ut,!1),this.linked&&this.flush()}))}transfer_effects(t,s){for(const a of t)g(this,Ot).add(a);for(const a of s)g(this,ht).add(a);t.clear(),s.clear()}oncommit(t){g(this,hs).add(t)}ondiscard(t){g(this,_s).add(t)}on_fork_commit(t){g(this,Ht).add(t)}run_fork_commit_callbacks(){for(const t of g(this,Ht))t(this);g(this,Ht).clear()}settled(){return(g(this,Ds)??X(this,Ds,Cr())).promise}static ensure(){var t;if(J===null){const s=J=new da;le(t=s,de,Pa).call(t),!ka&&!As&&Jt(()=>{g(s,ps)||s.flush()})}return J}apply(){{dt=null;return}}schedule(t){if(Ma=t,t.b?.is_pending&&(t.f&(ys|pa|zr))!==0&&(t.f&is)===0){t.b.defer_effect(t);return}for(var s=t;s.parent!==null;){s=s.parent;var a=s.f;if(fs!==null&&s===se&&(ee===null||(ee.f&Oe)===0))return;if((a&(Vt|vt))!==0){if((a&Fe)===0)return;s.f^=Fe}}g(this,Ue).push(s)}};ps=new WeakMap,Mt=new WeakMap,Kt=new WeakMap,hs=new WeakMap,_s=new WeakMap,Ht=new WeakMap,gs=new WeakMap,jt=new WeakMap,Ds=new WeakMap,Ue=new WeakMap,Ps=new WeakMap,Ot=new WeakMap,ht=new WeakMap,_t=new WeakMap,ms=new WeakMap,Ut=new WeakMap,de=new WeakSet,Oa=function(){if(this.is_fork)return!0;for(const a of g(this,jt).keys()){for(var t=a,s=!1;t.parent!==null;){if(g(this,_t).has(t)){s=!0;break}t=t.parent}if(!s)return!0}return!1},Cs=function(){var c,d,_;if(X(this,ps,!0),ir++>1e3&&(le(this,de,ds).call(this),pi()),!le(this,de,Oa).call(this)){for(const v of g(this,Ot))g(this,ht).delete(v),je(v,Me),this.schedule(v);for(const v of g(this,ht))je(v,bt),this.schedule(v)}const t=g(this,Ue);X(this,Ue,[]),this.apply();var s=fs=[],a=[],r=Xs=[];for(const v of t)try{le(this,de,Da).call(this,v,s,a)}catch(u){throw Kr(v),u}if(J=null,r.length>0){var n=da.ensure();for(const v of r)n.schedule(v)}if(fs=null,Xs=null,le(this,de,Oa).call(this)){le(this,de,Zs).call(this,a),le(this,de,Zs).call(this,s);for(const[v,u]of g(this,_t))Br(v,u);r.length>0&&le(c=J,de,Cs).call(c);return}const l=le(this,de,Ir).call(this);if(l){le(d=l,de,qr).call(d,this);return}g(this,Ot).clear(),g(this,ht).clear();for(const v of g(this,hs))v(this);g(this,hs).clear(),Ra=this,lr(a),lr(s),Ra=null,g(this,Ds)?.resolve();var o=J;if(this.linked&&g(this,gs)===0&&le(this,de,ds).call(this),g(this,Ue).length>0){o===null&&(o=this,le(this,de,Pa).call(this));const v=o;g(v,Ue).push(...g(this,Ue).filter(u=>!g(v,Ue).includes(u)))}o!==null&&le(_=o,de,Cs).call(_)},Da=function(t,s,a){t.f^=Fe;for(var r=t.first;r!==null;){var n=r.f,l=(n&(vt|Vt))!==0,o=l&&(n&Fe)!==0,c=o||(n&Le)!==0||g(this,_t).has(r);if(!c&&r.fn!==null){l?r.f^=Fe:(n&ys)!==0?s.push(r):Bs(r)&&((n&ct)!==0&&g(this,ht).add(r),ks(r));var d=r.first;if(d!==null){r=d;continue}}for(;r!==null;){var _=r.next;if(_!==null){r=_;break}r=r.parent}}},Ir=function(){for(var t=g(this,Mt);t!==null;){if(!t.is_fork){for(const[s,[,a]]of this.current)if(t.current.has(s)&&!a)return t}t=g(t,Mt)}return null},qr=function(t){var a;for(const[r,n]of t.current)!this.previous.has(r)&&t.previous.has(r)&&this.previous.set(r,t.previous.get(r)),this.current.set(r,n);for(const[r,n]of t.async_deriveds){const l=this.async_deriveds.get(r);l&&n.promise.then(l.resolve)}const s=r=>{var n=r.reactions;if(n!==null)for(const c of n){var l=c.f;if((l&Oe)!==0)s(c);else{var o=c;l&(vs|ct)&&!this.async_deriveds.has(o)&&(g(this,ht).delete(o),je(o,Me),this.schedule(o))}}};for(const r of this.current.keys())s(r);this.oncommit(()=>t.discard()),le(a=t,de,ds).call(a),J=this,le(this,de,Cs).call(this)},Zs=function(t){for(var s=0;s!this.current.has(u));if(r.length===0)t&&v.discard();else if(s.length>0){if(t)for(const u of g(this,ms))v.unskip_effect(u,m=>{var b;(m.f&(ct|vs))!==0?v.schedule(m):le(b=v,de,Zs).call(b,[m])});v.activate();var n=new Set,l=new Map;for(var o of s)Nr(o,r,n,l);l=new Map;var c=[...v.current.keys()].filter(u=>this.current.has(u)?this.current.get(u)[0]!==u.v:!0);if(c.length>0)for(const u of g(this,Ps))(u.f&(st|Le|ta))===0&&Ua(u,c,l)&&((u.f&(vs|ct))!==0?(je(u,Me),v.schedule(u)):g(v,Ot).add(u));if(g(v,Ue).length>0&&!g(v,Ut)){v.apply();for(var d of g(v,Ue))le(_=v,de,Da).call(_,d,[],[]);X(v,Ue,[])}v.deactivate()}}}},Pa=function(){os===null?xa=os=this:(X(os,Kt,this),X(this,Mt,os)),os=this},ds=function(){var t=g(this,Mt),s=g(this,Kt);t===null?xa=s:X(t,Kt,s),s===null?os=t:X(s,Mt,t),this.linked=!1};let rs=da;function vi(e){var t=As;As=!0;try{for(var s;;){if(oi(),J===null)return s;J.flush()}}finally{As=t}}function pi(){try{Nn()}catch(e){Pt(e,Ma)}}let Et=null;function lr(e){var t=e.length;if(t!==0){for(var s=0;s0)){Qt.clear();for(const r of Et){if((r.f&(st|Le))!==0)continue;const n=[r];let l=r.parent;for(;l!==null;)Et.has(l)&&(Et.delete(l),n.push(l)),l=l.parent;for(let o=n.length-1;o>=0;o--){const c=n[o];(c.f&(st|Le))===0&&ks(c)}}Et.clear()}}Et=null}}function Nr(e,t,s,a){if(!s.has(e)&&(s.add(e),e.reactions!==null))for(const r of e.reactions){const n=r.f;(n&Oe)!==0?Nr(r,t,s,a):(n&(vs|ct))!==0&&(n&Me)===0&&Ua(r,t,a)&&(je(r,Me),Ga(r))}}function Ua(e,t,s){const a=s.get(e);if(a!==void 0)return a;if(e.deps!==null)for(const r of e.deps){if(Xt.call(t,r))return!0;if((r.f&Oe)!==0&&Ua(r,t,s))return s.set(r,!0),!0}return s.set(e,!1),!1}function Ga(e){J.schedule(e)}function Br(e,t){if(!((e.f&vt)!==0&&(e.f&Fe)!==0)){(e.f&Me)!==0?t.d.push(e):(e.f&bt)!==0&&t.m.push(e),je(e,Fe);for(var s=e.first;s!==null;)Br(s,t),s=s.next}}function Kr(e){je(e,Fe);for(var t=e.first;t!==null;)Kr(t),t=t.next}function hi(e){let t=0,s=ns(0),a;return()=>{Xa()&&(i(s),Za(()=>(t===0&&(a=ga(()=>e(()=>Fs(s)))),t+=1,()=>{Jt(()=>{t-=1,t===0&&(a?.(),a=void 0,Fs(s))})})))}}var _i=ss|Es;function gi(e,t,s,a){new mi(e,t,s,a)}var Ze,Ba,Je,Gt,Ie,Qe,Pe,Ge,Tt,Wt,Dt,bs,Ls,Vs,$t,fa,$e,bi,yi,wi,La,Js,Qs,Va,Ia;class mi{constructor(t,s,a,r){Z(this,$e);Ve(this,"parent");Ve(this,"is_pending",!1);Ve(this,"transform_error");Z(this,Ze);Z(this,Ba,null);Z(this,Je);Z(this,Gt);Z(this,Ie);Z(this,Qe,null);Z(this,Pe,null);Z(this,Ge,null);Z(this,Tt,null);Z(this,Wt,0);Z(this,Dt,0);Z(this,bs,!1);Z(this,Ls,new Set);Z(this,Vs,new Set);Z(this,$t,null);Z(this,fa,hi(()=>(X(this,$t,ns(g(this,Wt))),()=>{X(this,$t,null)})));X(this,Ze,t),X(this,Je,s),X(this,Gt,n=>{var l=se;l.b=this,l.f|=Ca,a(n)}),this.parent=se.b,this.transform_error=r??this.parent?.transform_error??(n=>n),X(this,Ie,_a(()=>{le(this,$e,La).call(this)},_i))}defer_effect(t){Vr(t,g(this,Ls),g(this,Vs))}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!g(this,Je).pending}update_pending_count(t,s){le(this,$e,Va).call(this,t,s),X(this,Wt,g(this,Wt)+t),!(!g(this,$t)||g(this,bs))&&(X(this,bs,!0),Jt(()=>{X(this,bs,!1),g(this,$t)&&xs(g(this,$t),g(this,Wt))}))}get_effect_pending(){return g(this,fa).call(this),i(g(this,$t))}error(t){if(!g(this,Je).onerror&&!g(this,Je).failed)throw t;J?.is_fork?(g(this,Qe)&&J.skip_effect(g(this,Qe)),g(this,Pe)&&J.skip_effect(g(this,Pe)),g(this,Ge)&&J.skip_effect(g(this,Ge)),J.on_fork_commit(()=>{le(this,$e,Ia).call(this,t)})):le(this,$e,Ia).call(this,t)}}Ze=new WeakMap,Ba=new WeakMap,Je=new WeakMap,Gt=new WeakMap,Ie=new WeakMap,Qe=new WeakMap,Pe=new WeakMap,Ge=new WeakMap,Tt=new WeakMap,Wt=new WeakMap,Dt=new WeakMap,bs=new WeakMap,Ls=new WeakMap,Vs=new WeakMap,$t=new WeakMap,fa=new WeakMap,$e=new WeakSet,bi=function(){try{X(this,Qe,et(()=>g(this,Gt).call(this,g(this,Ze))))}catch(t){this.error(t)}},yi=function(t){const s=g(this,Je).failed;s&&X(this,Ge,et(()=>{s(g(this,Ze),()=>t,()=>()=>{})}))},wi=function(){const t=g(this,Je).pending;t&&(this.is_pending=!0,X(this,Pe,et(()=>t(g(this,Ze)))),Jt(()=>{var s=X(this,Tt,document.createDocumentFragment()),a=Ct();s.append(a),X(this,Qe,le(this,$e,Qs).call(this,()=>et(()=>g(this,Gt).call(this,a)))),g(this,Dt)===0&&(g(this,Ze).before(s),X(this,Tt,null),es(g(this,Pe),()=>{X(this,Pe,null)}),le(this,$e,Js).call(this,J))}))},La=function(){try{if(this.is_pending=this.has_pending_snippet(),X(this,Dt,0),X(this,Wt,0),X(this,Qe,et(()=>{g(this,Gt).call(this,g(this,Ze))})),g(this,Dt)>0){var t=X(this,Tt,document.createDocumentFragment());er(g(this,Qe),t);const s=g(this,Je).pending;X(this,Pe,et(()=>s(g(this,Ze))))}else le(this,$e,Js).call(this,J)}catch(s){this.error(s)}},Js=function(t){this.is_pending=!1,t.transfer_effects(g(this,Ls),g(this,Vs))},Qs=function(t){var s=se,a=ee,r=Ye;wt(g(this,Ie)),nt(g(this,Ie)),ws(g(this,Ie).ctx);try{return rs.ensure(),t()}catch(n){return Pr(n),null}finally{wt(s),nt(a),ws(r)}},Va=function(t,s){var a;if(!this.has_pending_snippet()){this.parent&&le(a=this.parent,$e,Va).call(a,t,s);return}X(this,Dt,g(this,Dt)+t),g(this,Dt)===0&&(le(this,$e,Js).call(this,s),g(this,Pe)&&es(g(this,Pe),()=>{X(this,Pe,null)}),g(this,Tt)&&(g(this,Ze).before(g(this,Tt)),X(this,Tt,null)))},Ia=function(t){g(this,Qe)&&(Be(g(this,Qe)),X(this,Qe,null)),g(this,Pe)&&(Be(g(this,Pe)),X(this,Pe,null)),g(this,Ge)&&(Be(g(this,Ge)),X(this,Ge,null));var s=g(this,Je).onerror;let a=g(this,Je).failed;var r=!1,n=!1;const l=()=>{if(r){ii();return}r=!0,n&&Gn(),g(this,Ge)!==null&&es(g(this,Ge),()=>{X(this,Ge,null)}),le(this,$e,Qs).call(this,()=>{le(this,$e,La).call(this)})},o=c=>{try{n=!0,s?.(c,l),n=!1}catch(d){Pt(d,g(this,Ie)&&g(this,Ie).parent)}a&&X(this,Ge,le(this,$e,Qs).call(this,()=>{try{return et(()=>{var d=se;d.b=this,d.f|=Ca,a(g(this,Ze),()=>c,()=>l)})}catch(d){return Pt(d,g(this,Ie).parent),null}}))};Jt(()=>{var c;try{c=this.transform_error(t)}catch(d){Pt(d,g(this,Ie)&&g(this,Ie).parent);return}c!==null&&typeof c=="object"&&typeof c.then=="function"?c.then(o,d=>Pt(d,g(this,Ie)&&g(this,Ie).parent)):o(c)})};function xi(e,t,s,a){const r=Ms;var n=e.filter(u=>!u.settled);if(s.length===0&&n.length===0){a(t.map(r));return}var l=se,o=ki(),c=n.length===1?n[0].promise:n.length>1?Promise.all(n.map(u=>u.promise)):null;function d(u){if((l.f&st)===0){o();try{a(u)}catch(m){Pt(m,l)}aa()}}var _=Hr();if(s.length===0){c.then(()=>d(t.map(r))).finally(_);return}function v(){Promise.all(s.map(u=>Si(u))).then(u=>d([...t.map(r),...u])).catch(u=>Pt(u,l)).finally(_)}c?c.then(()=>{o(),v(),aa()}):v()}function ki(){var e=se,t=ee,s=Ye,a=J;return function(n=!0){wt(e),nt(t),ws(s),n&&(e.f&st)===0&&(a?.activate(),a?.apply())}}function aa(e=!0){wt(null),nt(null),ws(null),e&&J?.deactivate()}function Hr(){var e=se,t=e.b,s=J,a=t.is_rendered();return t.update_pending_count(1,s),s.increment(a,e),()=>{t.update_pending_count(-1,s),s.decrement(a,e)}}function Ms(e){var t=Oe|Me;return se!==null&&(se.f|=Es),{ctx:Ye,deps:null,effects:null,equals:Rr,f:t,fn:e,reactions:null,rv:0,v:Ae,wv:0,parent:se,ac:null}}const Hs=Symbol("obsolete");function Si(e,t,s){let a=se;a===null&&Pn();var r=void 0,n=ns(Ae),l=!ee,o=new Set;return Pi(()=>{var c=se,d=Cr();r=d.promise;try{Promise.resolve(e()).then(d.resolve,m=>{m!==ha&&d.reject(m)}).finally(aa)}catch(m){d.reject(m),aa()}var _=J;if(l){if((c.f&is)!==0)var v=Hr();if(a.b.is_rendered())_.async_deriveds.get(c)?.reject(Hs);else for(const m of o.values())m.reject(Hs);o.add(d),_.async_deriveds.set(c,d)}const u=(m,b=void 0)=>{v?.(),o.delete(d),b!==Hs&&(_.activate(),b?(n.f|=Lt,xs(n,b)):((n.f&Lt)!==0&&(n.f^=Lt),xs(n,m)),_.deactivate())};d.promise.then(u,m=>u(null,m||"unknown"))}),sn(()=>{for(const c of o)c.reject(Hs)}),new Promise(c=>{function d(_){function v(){_===r?c(n):d(r)}_.then(v,v)}d(r)})}function j(e){const t=Ms(e);return fn(t),t}function Ur(e){const t=Ms(e);return t.equals=Mr,t}function Ei(e){var t=e.effects;if(t!==null){e.effects=null;for(var s=0;s0&&!Yr&&$i()}return t}function $i(){Yr=!1;for(const e of ra){(e.f&Fe)!==0&&je(e,bt);let t;try{t=Bs(e)}catch{t=!0}t&&ks(e)}ra.clear()}function Fs(e){K(e,e.v+1)}function Xr(e,t,s){var a=e.reactions;if(a!==null)for(var r=a.length,n=0;n{if(ts===n)return o();var c=ee,d=ts;nt(null),ur(n);var _=o();return nt(c),ur(d),_};return a&&s.set("length",te(e.length)),new Proxy(e,{defineProperty(o,c,d){(!("value"in d)||d.configurable===!1||d.enumerable===!1||d.writable===!1)&&Kn();var _=s.get(c);return _===void 0?l(()=>{var v=te(d.value);return s.set(c,v),v}):K(_,d.value,!0),!0},deleteProperty(o,c){var d=s.get(c);if(d===void 0){if(c in o){const _=l(()=>te(Ae));s.set(c,_),Fs(r)}}else K(d,Ae),Fs(r);return!0},get(o,c,d){if(c===Zt)return e;var _=s.get(c),v=c in o;if(_===void 0&&(!v||us(o,c)?.writable)&&(_=l(()=>{var m=Ne(v?o[c]:Ae),b=te(m);return b}),s.set(c,_)),_!==void 0){var u=i(_);return u===Ae?void 0:u}return Reflect.get(o,c,d)},getOwnPropertyDescriptor(o,c){var d=Reflect.getOwnPropertyDescriptor(o,c);if(d&&"value"in d){var _=s.get(c);_&&(d.value=i(_))}else if(d===void 0){var v=s.get(c),u=v?.v;if(v!==void 0&&u!==Ae)return{enumerable:!0,configurable:!0,value:u,writable:!0}}return d},has(o,c){if(c===Zt)return!0;var d=s.get(c),_=d!==void 0&&d.v!==Ae||Reflect.has(o,c);if(d!==void 0||se!==null&&(!_||us(o,c)?.writable)){d===void 0&&(d=l(()=>{var u=_?Ne(o[c]):Ae,m=te(u);return m}),s.set(c,d));var v=i(d);if(v===Ae)return!1}return _},set(o,c,d,_){var v=s.get(c),u=c in o;if(a&&c==="length")for(var m=d;mte(Ae)),s.set(m+"",b))}if(v===void 0)(!u||us(o,c)?.writable)&&(v=l(()=>te(void 0)),K(v,Ne(d)),s.set(c,v));else{u=v.v!==Ae;var w=l(()=>Ne(d));K(v,w)}var h=Reflect.getOwnPropertyDescriptor(o,c);if(h?.set&&h.set.call(_,d),!u){if(a&&typeof c=="string"){var y=s.get("length"),S=Number(c);Number.isInteger(S)&&S>=y.v&&K(y,S+1)}Fs(r)}return!0},ownKeys(o){i(r);var c=Reflect.ownKeys(o).filter(v=>{var u=s.get(v);return u===void 0||u.v!==Ae});for(var[d,_]of s)_.v!==Ae&&!(d in o)&&c.push(d);return c},setPrototypeOf(){Hn()}})}function or(e){try{if(e!==null&&typeof e=="object"&&Zt in e)return e[Zt]}catch{}return e}function Ci(e,t){return Object.is(or(e),or(t))}var cr,Zr,Jr,Qr;function zi(){if(cr===void 0){cr=window,Zr=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,s=Text.prototype;Jr=us(t,"firstChild").get,Qr=us(t,"nextSibling").get,nr(e)&&(e[Aa]=void 0,e[Ws]=null,e[Fa]=void 0,e.__e=void 0),nr(s)&&(s[$s]=void 0)}}function Ct(e=""){return document.createTextNode(e)}function na(e){return Jr.call(e)}function Ns(e){return Qr.call(e)}function f(e,t){return na(e)}function yt(e,t=!1){{var s=na(e);return s instanceof Comment&&s.data===""?Ns(s):s}}function p(e,t=1,s=!1){let a=e;for(;t--;)a=Ns(a);return a}function Ai(e){e.textContent=""}function en(){return!1}function Fi(e,t,s){return document.createElementNS(Fr,e,void 0)}let dr=!1;function Ri(){dr||(dr=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(const t of e.target.elements)t[Ys]?.()})},{capture:!0}))}function Ya(e){var t=ee,s=se;nt(null),wt(null);try{return e()}finally{nt(t),wt(s)}}function tn(e,t,s,a=s){e.addEventListener(t,()=>Ya(s));const r=e[Ys];r?e[Ys]=()=>{r(),a(!0)}:e[Ys]=()=>a(!0),Ri()}function Mi(e){se===null&&(ee===null&&qn(),In()),At&&Vn()}function Oi(e,t){var s=t.last;s===null?t.last=t.first=e:(s.next=e,e.prev=s,t.last=e)}function Ft(e,t){var s=se;s!==null&&(s.f&Le)!==0&&(e|=Le);var a={ctx:Ye,deps:null,nodes:null,f:e|Me|tt,first:null,fn:t,last:null,next:null,parent:s,b:s&&s.b,prev:null,teardown:null,wv:0,ac:null};J?.register_created_effect(a);var r=a;if((e&ys)!==0)fs!==null?fs.push(a):rs.ensure().schedule(a);else if(t!==null){try{ks(a)}catch(l){throw Be(a),l}r.deps===null&&r.teardown===null&&r.nodes===null&&r.first===r.last&&(r.f&Es)===0&&(r=r.first,(e&ct)!==0&&(e&ss)!==0&&r!==null&&(r.f|=ss))}if(r!==null&&(r.parent=s,s!==null&&Oi(r,s),ee!==null&&(ee.f&Oe)!==0&&(e&Vt)===0)){var n=ee;(n.effects??(n.effects=[])).push(r)}return a}function Xa(){return ee!==null&&!ft}function sn(e){const t=Ft(pa,null);return je(t,Fe),t.teardown=e,t}function an(e){Mi();var t=se.f,s=!ee&&(t&vt)!==0&&(t&is)===0;if(s){var a=Ye;(a.e??(a.e=[])).push(e)}else return rn(e)}function rn(e){return Ft(ys|Rn,e)}function Di(e){rs.ensure();const t=Ft(Vt|Es,e);return(s={})=>new Promise(a=>{s.outro?es(t,()=>{Be(t),a(void 0)}):(Be(t),a(void 0))})}function nn(e){return Ft(ys,e)}function Pi(e){return Ft(vs|Es,e)}function Za(e,t=0){return Ft(pa|t,e)}function q(e,t=[],s=[],a=[]){xi(a,t,s,r=>{Ft(pa,()=>e(...r.map(i)))})}function _a(e,t=0){var s=Ft(ct|t,e);return s}function et(e){return Ft(vt|Es,e)}function ln(e){var t=e.teardown;if(t!==null){const s=At,a=ee;fr(!0),nt(null);try{t.call(null)}finally{fr(s),nt(a)}}}function Ja(e,t=!1){var s=e.first;for(e.first=e.last=null;s!==null;){const r=s.ac;r!==null&&Ya(()=>{r.abort(ha)});var a=s.next;(s.f&Vt)!==0?s.parent=null:Be(s,t),s=a}}function Li(e){for(var t=e.first;t!==null;){var s=t.next;(t.f&vt)===0&&Be(t),t=s}}function Be(e,t=!0){var s=!1;(t||(e.f&Fn)!==0)&&e.nodes!==null&&e.nodes.end!==null&&(Vi(e.nodes.start,e.nodes.end),s=!0),je(e,za),Ja(e,t&&!s),Os(e,0);var a=e.nodes&&e.nodes.t;if(a!==null)for(const n of a)n.stop();ln(e),e.f^=za,e.f|=st;var r=e.parent;r!==null&&r.first!==null&&on(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function Vi(e,t){for(;e!==null;){var s=e===t?null:Ns(e);e.remove(),e=s}}function on(e){var t=e.parent,s=e.prev,a=e.next;s!==null&&(s.next=a),a!==null&&(a.prev=s),t!==null&&(t.first===e&&(t.first=a),t.last===e&&(t.last=s))}function es(e,t,s=!0){var a=[];cn(e,a,!0);var r=()=>{s&&Be(e),t&&t()},n=a.length;if(n>0){var l=()=>--n||r();for(var o of a)o.out(l)}else r()}function cn(e,t,s){if((e.f&Le)===0){e.f^=Le;var a=e.nodes&&e.nodes.t;if(a!==null)for(const o of a)(o.is_global||s)&&t.push(o);for(var r=e.first;r!==null;){var n=r.next;if((r.f&Vt)===0){var l=(r.f&ss)!==0||(r.f&vt)!==0&&(e.f&ct)!==0;cn(r,t,l?s:!1)}r=n}}}function Qa(e){dn(e,!0)}function dn(e,t){if((e.f&Le)!==0){e.f^=Le,(e.f&Fe)===0&&(je(e,Me),rs.ensure().schedule(e));for(var s=e.first;s!==null;){var a=s.next,r=(s.f&ss)!==0||(s.f&vt)!==0;dn(s,r?t:!1),s=a}var n=e.nodes&&e.nodes.t;if(n!==null)for(const l of n)(l.is_global||t)&&l.in()}}function er(e,t){if(e.nodes)for(var s=e.nodes.start,a=e.nodes.end;s!==null;){var r=s===a?null:Ns(s);t.append(s),s=r}}let ea=!1,At=!1;function fr(e){At=e}let ee=null,ft=!1;function nt(e){ee=e}let se=null;function wt(e){se=e}let at=null;function fn(e){ee!==null&&(at===null?at=[e]:at.push(e))}let qe=null,He=0,Xe=null;function Ii(e){Xe=e}let un=1,Nt=0,ts=Nt;function ur(e){ts=e}function vn(){return++un}function Bs(e){var t=e.f;if((t&Me)!==0)return!0;if(t&Oe&&(e.f&=~as),(t&bt)!==0){for(var s=e.deps,a=s.length,r=0;re.wv)return!0}(t&tt)!==0&&dt===null&&je(e,Fe)}return!1}function pn(e,t,s=!0){var a=e.reactions;if(a!==null&&!(at!==null&&Xt.call(at,e)))for(var r=0;r{e.ac.abort(ha)}),e.ac=null);try{e.f|=sa;var _=e.fn,v=_();e.f|=is;var u=e.deps,m=J?.is_fork;if(qe!==null){var b;if(m||Os(e,He),u!==null&&He>0)for(u.length=He+qe.length,b=0;b{throw h});throw u}}finally{e[Bt]=t,delete e.currentTarget,nt(_),wt(v)}}}const Hi=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:e=>e});function Ui(e){return Hi?.createHTML(e)??e}function Gi(e){var t=Fi("template");return t.innerHTML=Ui(e.replaceAll("","")),t.content}function ia(e,t){var s=se;s.nodes===null&&(s.nodes={start:e,end:t,a:null,t:null})}function F(e,t){var s=(t&si)!==0,a=(t&ai)!==0,r,n=!e.startsWith("");return()=>{r===void 0&&(r=Gi(n?e:""+e),s||(r=na(r)));var l=a||Zr?document.importNode(r,!0):r.cloneNode(!0);if(s){var o=na(l),c=l.lastChild;ia(o,c)}else ia(l,l);return l}}function Wi(e=""){{var t=Ct(e+"");return ia(t,t),t}}function hr(){var e=document.createDocumentFragment(),t=document.createComment(""),s=Ct();return e.append(t,s),ia(t,s),e}function z(e,t){e!==null&&e.before(t)}function A(e,t){var s=t==null?"":typeof t=="object"?`${t}`:t;s!==(e[$s]??(e[$s]=e.nodeValue))&&(e[$s]=s,e.nodeValue=`${s}`)}function Yi(e,t){return Xi(e,t)}const Us=new Map;function Xi(e,{target:t,anchor:s,props:a={},events:r,context:n,intro:l=!0,transformError:o}){zi();var c=void 0,d=Di(()=>{var _=s??t.appendChild(Ct());gi(_,{pending:()=>{}},m=>{ke({});var b=Ye;n&&(b.c=n),r&&(a.$$events=r),c=e(m,a)||{},Se()},o);var v=new Set,u=m=>{for(var b=0;b{for(var m of v)for(const h of[t,document]){var b=Us.get(h),w=b.get(m);--w==0?(h.removeEventListener(m,pr),b.delete(m),b.size===0&&Us.delete(h)):b.set(m,w)}qa.delete(u),_!==s&&_.parentNode?.removeChild(_)}});return Zi.set(c,d),c}let Zi=new WeakMap;var lt,gt,We,Yt,Is,qs,ua;class bn{constructor(t,s=!0){Ve(this,"anchor");Z(this,lt,new Map);Z(this,gt,new Map);Z(this,We,new Map);Z(this,Yt,new Set);Z(this,Is,!0);Z(this,qs,t=>{if(g(this,lt).has(t)){var s=g(this,lt).get(t),a=g(this,gt).get(s);if(a)Qa(a),g(this,Yt).delete(s);else{var r=g(this,We).get(s);r&&(g(this,gt).set(s,r.effect),g(this,We).delete(s),r.fragment.lastChild.remove(),this.anchor.before(r.fragment),a=r.effect)}for(const[n,l]of g(this,lt)){if(g(this,lt).delete(n),n===t)break;const o=g(this,We).get(l);o&&(Be(o.effect),g(this,We).delete(l))}for(const[n,l]of g(this,gt)){if(n===s||g(this,Yt).has(n))continue;const o=()=>{if(Array.from(g(this,lt).values()).includes(n)){var d=document.createDocumentFragment();er(l,d),d.append(Ct()),g(this,We).set(n,{effect:l,fragment:d})}else Be(l);g(this,Yt).delete(n),g(this,gt).delete(n)};g(this,Is)||!a?(g(this,Yt).add(n),es(l,o,!1)):o()}}});Z(this,ua,t=>{g(this,lt).delete(t);const s=Array.from(g(this,lt).values());for(const[a,r]of g(this,We))s.includes(a)||(Be(r.effect),g(this,We).delete(a))});this.anchor=t,X(this,Is,s)}ensure(t,s){var a=J,r=en();if(s&&!g(this,gt).has(t)&&!g(this,We).has(t))if(r){var n=document.createDocumentFragment(),l=Ct();n.append(l),g(this,We).set(t,{effect:et(()=>s(l)),fragment:n})}else g(this,gt).set(t,et(()=>s(this.anchor)));if(g(this,lt).set(a,t),r){for(const[o,c]of g(this,gt))o===t?a.unskip_effect(c):a.skip_effect(c);for(const[o,c]of g(this,We))o===t?a.unskip_effect(c.effect):a.skip_effect(c.effect);a.oncommit(g(this,qs)),a.ondiscard(g(this,ua))}else g(this,qs).call(this,a)}}lt=new WeakMap,gt=new WeakMap,We=new WeakMap,Yt=new WeakMap,Is=new WeakMap,qs=new WeakMap,ua=new WeakMap;function fe(e,t,s=!1){var a=new bn(e),r=s?ss:0;function n(l,o){a.ensure(l,o)}_a(()=>{var l=!1;t((o,c=0)=>{l=!0,n(c,o)}),l||n(-1,null)},r)}function js(e,t){return t}function Ji(e,t,s){for(var a=[],r=t.length,n,l=t.length,o=0;o{if(n){if(n.pending.delete(v),n.done.add(v),n.pending.size===0){var u=e.outrogroups;Na(e,va(n.done)),u.delete(n),u.size===0&&(e.outrogroups=null)}}else l-=1},!1)}if(l===0){var c=a.length===0&&s!==null;if(c){var d=s,_=d.parentNode;Ai(_),_.append(d),e.items.clear()}Na(e,t,!c)}else n={pending:new Set(t),done:new Set},(e.outrogroups??(e.outrogroups=new Set)).add(n)}function Na(e,t,s=!0){var a;if(e.pending.size>0){a=new Set;for(const l of e.pending.values())for(const o of l)a.add(e.items.get(o).e)}for(var r=0;r{var $=s();return Ka($)?$:$==null?[]:va($)}),u,m=new Map,b=!0;function w($){(S.effect.f&st)===0&&(S.pending.delete($),S.fallback=_,Qi(S,u,l,t,a),_!==null&&(u.length===0?(_.f&mt)===0?Qa(_):(_.f^=mt,zs(_,null,l)):es(_,()=>{_=null})))}function h($){S.pending.delete($)}var y=_a(()=>{u=i(v);for(var $=u.length,R=new Set,B=J,E=en(),C=0;C<$;C+=1){var O=u[C],L=a(O,C),T=b?null:o.get(L);T?(T.v&&xs(T.v,O),T.i&&xs(T.i,C),E&&B.unskip_effect(T.e)):(T=el(o,b?l:_r??(_r=Ct()),O,L,C,r,t,s),b||(T.e.f|=mt),o.set(L,T)),R.add(L)}if($===0&&n&&!_&&(b?_=et(()=>n(l)):(_=et(()=>n(_r??(_r=Ct()))),_.f|=mt)),$>R.size&&Ln(),!b)if(m.set(B,R),E){for(const[D,x]of o)R.has(D)||B.skip_effect(x.e);B.oncommit(w),B.ondiscard(h)}else w(B);i(v)}),S={effect:y,items:o,pending:m,outrogroups:null,fallback:_};b=!1}function Ts(e){for(;e!==null&&(e.f&vt)===0;)e=e.next;return e}function Qi(e,t,s,a,r){var n=(a&Xn)!==0,l=t.length,o=e.items,c=Ts(e.effect.first),d,_=null,v,u=[],m=[],b,w,h,y;if(n)for(y=0;y0){var L=(a&Ar)!==0&&l===0?s:null;if(n){for(y=0;y{if(v!==void 0)for(h of v)h.nodes?.a?.apply()})}function el(e,t,s,a,r,n,l,o){var c=(l&Wn)!==0?(l&Zn)===0?Ti(s,!1,!1):ns(s):null,d=(l&Yn)!==0?ns(r):null;return{v:c,i:d,e:et(()=>(n(t,c??s,d??r,o),()=>{e.delete(a)}))}}function zs(e,t,s){if(e.nodes)for(var a=e.nodes.start,r=e.nodes.end,n=t&&(t.f&mt)===0?t.nodes.start:s;a!==null;){var l=Ns(a);if(n.before(a),a===r)return;a=l}}function Rt(e,t,s){t===null?e.effect.first=s:t.next=s,s===null?e.effect.last=t:s.prev=t}function yn(e,t,...s){var a=new bn(e);_a(()=>{const r=t()??null;a.ensure(r,r&&(n=>r(n,...s)))},ss)}const gr=[...` -\r\f \v\uFEFF`];function tl(e,t,s){var a=e==null?"":""+e;if(s){for(var r of Object.keys(s))if(s[r])a=a?a+" "+r:r;else if(a.length)for(var n=r.length,l=0;(l=a.indexOf(r,l))>=0;){var o=l+n;(l===0||gr.includes(a[l-1]))&&(o===a.length||gr.includes(a[o]))?a=(l===0?"":a.substring(0,l))+a.substring(o+1):l=o}}return a===""?null:a}function mr(e,t=!1){var s=t?" !important;":";",a="";for(var r of Object.keys(e)){var n=e[r];n!=null&&n!==""&&(a+=" "+r+": "+n+s)}return a}function Sa(e){return e[0]!=="-"||e[1]!=="-"?e.toLowerCase():e}function sl(e,t){if(t){var s="",a,r;if(Array.isArray(t)?(a=t[0],r=t[1]):a=t,e){e=String(e).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var n=!1,l=0,o=!1,c=[];a&&c.push(...Object.keys(a).map(Sa)),r&&c.push(...Object.keys(r).map(Sa));var d=0,_=-1;const w=e.length;for(var v=0;v{tr(e,e.__value)});t.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),sn(()=>{t.disconnect()})}function la(e,t,s=t){var a=new WeakSet,r=!0;tn(e,"change",n=>{var l=n?"[selected]":":checked",o;if(e.multiple)o=[].map.call(e.querySelectorAll(l),Rs);else{var c=e.querySelector(l)??e.querySelector("option:not([disabled])");o=c&&Rs(c)}s(o),e.__value=o,J!==null&&a.add(J)}),nn(()=>{var n=t();if(e===document.activeElement){var l=J;if(a.has(l))return}if(tr(e,n,r),r&&n===void 0){var o=e.querySelector(":checked");o!==null&&(n=Rs(o),s(n))}e.__value=n,r=!1}),wn(e)}function Rs(e){return"__value"in e?e.__value:e.value}const al=Symbol("is custom element"),rl=Symbol("is html"),nl=Dn?"progress":"PROGRESS";function oa(e,t){var s=xn(e);s.value===(s.value=t??void 0)||e.value===t&&(t!==0||e.nodeName!==nl)||(e.value=t??"")}function Q(e,t,s,a){var r=xn(e);r[t]!==(r[t]=s)&&(t==="loading"&&(e[On]=s),s==null?e.removeAttribute(t):typeof s!="string"&&il(e).includes(t)?e[t]=s:e.setAttribute(t,s))}function xn(e){return e[Ws]??(e[Ws]={[al]:e.nodeName.includes("-"),[rl]:e.namespaceURI===Fr})}var br=new Map;function il(e){var t=e.getAttribute("is")||e.nodeName,s=br.get(t);if(s)return s;br.set(t,s=[]);for(var a,r=e,n=Element.prototype;n!==r;){a=$n(r);for(var l in a)a[l].set&&l!=="innerHTML"&&l!=="textContent"&&l!=="innerText"&&s.push(l);r=Tr(r)}return s}function zt(e,t,s=t){var a=new WeakSet;tn(e,"input",async r=>{var n=r?e.defaultValue:e.value;if(n=ja(e)?Ta(n):n,s(n),J!==null&&a.add(J),await Ni(),n!==(n=t())){var l=e.selectionStart,o=e.selectionEnd,c=e.value.length;if(e.value=n??"",o!==null){var d=e.value.length;l===o&&o===c&&d>c?(e.selectionStart=d,e.selectionEnd=d):(e.selectionStart=l,e.selectionEnd=Math.min(o,d))}}}),ga(t)==null&&e.value&&(s(ja(e)?Ta(e.value):e.value),J!==null&&a.add(J)),Za(()=>{var r=t();if(e===document.activeElement){var n=J;if(a.has(n))return}ja(e)&&r===Ta(e.value)||e.type==="date"&&!r&&!e.value||r!==e.value&&(e.value=r??"")})}function ja(e){var t=e.type;return t==="number"||t==="range"}function Ta(e){return e===""?null:+e}function $a(e,t){return e===t||e?.[Zt]===t}function ll(e={},t,s,a){var r=Ye.r,n=se;return nn(()=>{var l,o;return Za(()=>{l=o,o=[],ga(()=>{$a(s(...o),e)||(t(e,...o),l&&$a(s(...l),e)&&t(null,...l))})}),()=>{let c=n;for(;c!==r&&c.parent!==null&&c.parent.f&za;)c=c.parent;const d=()=>{o&&$a(s(...o),e)&&t(null,...o)},_=c.teardown;c.teardown=()=>{d(),_?.()}}}),e}function _e(e,t,s,a){var r=!0,n=(s&ei)!==0,l=(s&ti)!==0,o=a,c=!0,d=void 0,_=()=>l&&r?(d??(d=Ms(a)),i(d)):(c&&(c=!1,o=l?ga(a):a),o);let v;if(n){var u=Zt in e||Mn in e;v=us(e,t)?.set??(u&&t in e?R=>e[t]=R:void 0)}var m,b=!1;n?[m,b]=di(()=>e[t]):m=e[t],m===void 0&&a!==void 0&&(m=_(),v&&(Bn(),v(m)));var w;if(w=()=>{var R=e[t];return R===void 0?_():(c=!0,R)},(s&Qn)===0)return w;if(v){var h=e.$$legacy;return(function(R,B){return arguments.length>0?((!B||h||b)&&v(B?w():R),R):w()})}var y=!1,S=((s&Jn)!==0?Ms:Ur)(()=>(y=!1,w()));n&&i(S);var $=se;return(function(R,B){if(arguments.length>0){const E=B?i(S):n?Ne(R):R;return K(S,E),y=!0,o!==void 0&&(o=E),R}return At&&y||($.f&st)!==0?S.v:i(S)})}const ol="5";var jr;typeof window<"u"&&((jr=window.__svelte??(window.__svelte={})).v??(jr.v=new Set)).add(ol);const It=typeof window<"u"&&window.slashedBricksApp?window.slashedBricksApp:{defaults:{},settings:{},tabs:{},rest:{url:"",nonce:""}},ne={defaults:It.defaults||{},tabs:It.tabs||{},rest:It.rest||{url:"",nonce:""},inventory:It.inventory||{variables:[],sf_classes:[],is_classes:[]},pluginSettings:It.pluginSettings||{},versions:It.versions||{plugin:"",framework:""}},H=Ne(structuredClone(It.settings||{})),W=Ne({activeTab:cl(ne.tabs)||"colors",dirty:!1,saving:!1,lastSavedAt:null,error:""});function cl(e){for(const t in e)return t;return null}function sr(){W.dirty=!0,W.error=""}function yr(e){H[e]&&delete H[e]}function dl(e,t){const s=H[e];if(!s)return"";const a=s[t];return a==null?"":String(a)}function Ss(e,t,s){H[e]||(H[e]={}),s===""||s===null||s===void 0||typeof s=="string"&&s.trim()===""?delete H[e][t]:H[e][t]=String(s),sr()}var fl=F(''),ul=F('');function vl(e,t){ke(t,!0);var s=ul();ie(s,21,()=>Object.entries(ne.tabs),([a,r])=>a,(a,r)=>{var n=j(()=>ot(i(r),2));let l=()=>i(n)[0],o=()=>i(n)[1];var c=fl();let d;var _=f(c);q(()=>{d=rt(c,1,"tab-nav__btn svelte-yyiz68",null,d,{active:W.activeTab===l()}),A(_,o())}),he("click",c,()=>W.activeTab=l()),z(a,c)}),z(e,s),Se()}De(["click"]);var pl=F(' '),hl=F(' ',1),_l=F(''),gl=F('
                            ');function Gs(e,t){ke(t,!0);let s=_e(t,"hexHint",3,""),a=_e(t,"rawHint",3,""),r=_e(t,"cssVar",3,"");const n=/^#([0-9a-fA-F]{3,4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/,l=(()=>{const D=(H.colors?.[t.storeKey]??"").trim(),x=D===""||n.test(D);return{mode:x?"hex":"raw",hex:x?D:"",raw:x?"":D}})();let o=te(Ne(l.mode)),c=te(Ne(l.hex)),d=te(Ne(l.raw));function _(){H.colors||(H.colors={});const D=i(d).trim(),x=i(c).trim(),k=i(o)==="raw"?D:x;k===""?delete H.colors[t.storeKey]:H.colors[t.storeKey]=k,sr()}function v(){i(o)==="hex"?(K(o,"raw"),K(c,"")):(K(o,"hex"),K(d,"")),_()}const u=j(()=>(i(o)==="raw"?i(d):i(c))||s()||"transparent");var m=gl(),b=f(m),w=f(b),h=f(w),y=p(w,2);{var S=D=>{var x=pl(),k=f(x);q(()=>A(k,r())),z(D,x)};fe(y,D=>{r()&&D(S)})}var $=p(b,2),R=f($);let B;var E=p(R,2);{var C=D=>{var x=hl(),k=yt(x),P=p(k,2);q(()=>{Q(k,"id",t.storeKey),Q(P,"placeholder",s())}),he("input",k,_),zt(k,()=>i(c),M=>K(c,M)),he("input",P,_),zt(P,()=>i(c),M=>K(c,M)),z(D,x)},O=D=>{var x=_l();q(()=>{Q(x,"id",t.storeKey),Q(x,"placeholder",a())}),he("input",x,_),zt(x,()=>i(d),k=>K(d,k)),z(D,x)};fe(E,D=>{i(o)==="hex"?D(C):D(O,-1)})}var L=p(E,2),T=f(L);q(()=>{Q(w,"for",t.storeKey),A(h,t.label),B=ve(R,"",B,{background:i(u)}),A(T,i(o)==="hex"?"Advanced (oklch / raw)":"Use HEX picker")}),he("click",L,v),z(e,m),Se()}De(["input","click"]);var ml=F('
                            '),bl=F('
                            ');function ma(e,t){ke(t,!0);let s=te(!1);const a=`adv-body-${Math.random().toString(36).slice(2,9)}`;var r=bl(),n=f(r),l=p(f(n));let o;var c=f(l),d=p(n,2);{var _=v=>{var u=ml(),m=f(u);yn(m,()=>t.children),q(()=>Q(u,"id",a)),z(v,u)};fe(d,v=>{i(s)&&v(_)})}q(()=>{Q(n,"aria-expanded",i(s)),Q(n,"aria-controls",a),o=rt(l,1,"advanced-section__arrow",null,o,{open:i(s)}),A(c,i(s)?"▲":"▼")}),he("click",n,()=>K(s,!i(s))),z(e,r),Se()}De(["click"]);var yl=F('

                            Brand Colors — Dark Mode

                            Status Colors — Dark Mode

                            ',1),wl=F(`

                            Status Colors — Light Mode

                            The framework auto-derives dark mode from light source colors using CSS relative color syntax +var En=Object.defineProperty;var nr=e=>{throw TypeError(e)};var jn=(e,t,s)=>t in e?En(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s;var Ve=(e,t,s)=>jn(e,typeof t!="symbol"?t+"":t,s),xa=(e,t,s)=>t.has(e)||nr("Cannot "+s);var g=(e,t,s)=>(xa(e,t,"read from private field"),s?s.call(e):t.get(e)),Z=(e,t,s)=>t.has(e)?nr("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,s),X=(e,t,s,a)=>(xa(e,t,"write to private field"),a?a.call(e,s):t.set(e,s),s),ie=(e,t,s)=>(xa(e,t,"access private method"),s);var Ha=Array.isArray,Tn=Array.prototype.indexOf,Xt=Array.prototype.includes,va=Array.from,$n=Object.defineProperty,us=Object.getOwnPropertyDescriptor,Cn=Object.getOwnPropertyDescriptors,zn=Object.prototype,An=Array.prototype,$r=Object.getPrototypeOf,ir=Object.isExtensible;const Cr=()=>{};function Fn(e){for(var t=0;t{e=a,t=r});return{promise:s,resolve:e,reject:t}}function ot(e,t){if(Array.isArray(e))return e;if(t===void 0||!(Symbol.iterator in e))return Array.from(e);const s=[];for(const a of e)if(s.push(a),s.length===t)break;return s}const Oe=2,ys=4,pa=8,Ar=1<<24,ct=16,vt=32,Pt=64,za=128,tt=512,Fe=1024,Me=2048,bt=4096,Le=8192,st=16384,is=32768,Aa=1<<25,ss=65536,ta=1<<17,Rn=1<<18,Es=1<<19,Mn=1<<20,mt=1<<25,as=65536,sa=1<<21,vs=1<<22,Dt=1<<23,Zt=Symbol("$state"),On=Symbol("legacy props"),Dn=Symbol(""),Ws=Symbol("attributes"),Fa=Symbol("class"),Ra=Symbol("style"),$s=Symbol("text"),Ys=Symbol("form reset"),ha=new class extends Error{constructor(){super(...arguments);Ve(this,"name","StaleReactionError");Ve(this,"message","The reaction that called `getAbortSignal()` was re-run or destroyed")}},Pn=!!globalThis.document?.contentType&&globalThis.document.contentType.includes("xml");function Ln(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function Vn(e,t,s){throw new Error("https://svelte.dev/e/each_key_duplicate")}function In(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function qn(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function Nn(e){throw new Error("https://svelte.dev/e/effect_orphan")}function Bn(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function Kn(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function Hn(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Un(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Gn(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function Wn(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}const Yn=1,Xn=2,Fr=4,Zn=8,Jn=16,Qn=1,ei=4,ti=8,si=16,ai=1,ri=2,Ae=Symbol("uninitialized"),Rr="http://www.w3.org/1999/xhtml";function ni(){console.warn("https://svelte.dev/e/derived_inert")}function ii(){console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function li(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}function Mr(e){return e===this.v}function oi(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function Or(e){return!oi(e,this.v)}let Ye=null;function ws(e){Ye=e}function ke(e,t=!1,s){Ye={p:Ye,i:!1,c:null,e:null,s:e,x:null,r:se,l:null}}function Se(e){var t=Ye,s=t.e;if(s!==null){t.e=null;for(var a of s)nn(a)}return t.i=!0,Ye=t.p,{}}function Dr(){return!0}let qt=[];function Pr(){var e=qt;qt=[],Fn(e)}function Jt(e){if(qt.length===0&&!As){var t=qt;queueMicrotask(()=>{t===qt&&Pr()})}qt.push(e)}function ci(){for(;qt.length>0;)Pr()}function Lr(e){var t=se;if(t===null)return ee.f|=Dt,e;if((t.f&is)===0&&(t.f&ys)===0)throw e;Ot(e,t)}function Ot(e,t){for(;t!==null;){if((t.f&za)!==0){if((t.f&is)===0)throw e;try{t.b.error(e);return}catch(s){e=s}}t=t.parent}throw e}const di=-7169;function Ee(e,t){e.f=e.f&di|t}function Ua(e){(e.f&tt)!==0||e.deps===null?Ee(e,Fe):Ee(e,bt)}function Vr(e){if(e!==null)for(const t of e)(t.f&Oe)===0||(t.f&as)===0||(t.f^=as,Vr(t.deps))}function Ir(e,t,s){(e.f&Me)!==0?t.add(e):(e.f&bt)!==0&&s.add(e),Vr(e.deps),Ee(e,Fe)}let Ks=!1;function fi(e){var t=Ks;try{return Ks=!1,[e(),Ks]}finally{Ks=t}}let ka=null,os=null,J=null,Ma=null,dt=null,Oa=null,As=!1,Sa=!1,fs=null,Xs=null;var lr=0;let ui=1;var ps,Ft,Kt,hs,_s,Ht,gs,kt,Ds,Ue,Ps,Rt,ht,_t,ms,Ut,de,Da,Cs,Pa,qr,Nr,Zs,vi,La,ds;const da=class da{constructor(){Z(this,de);Ve(this,"id",ui++);Z(this,ps,!1);Ve(this,"linked",!0);Z(this,Ft,null);Z(this,Kt,null);Ve(this,"async_deriveds",new Map);Ve(this,"current",new Map);Ve(this,"previous",new Map);Ve(this,"unblocked",new Set);Z(this,hs,new Set);Z(this,_s,new Set);Z(this,Ht,new Set);Z(this,gs,0);Z(this,kt,new Map);Z(this,Ds,null);Z(this,Ue,[]);Z(this,Ps,[]);Z(this,Rt,new Set);Z(this,ht,new Set);Z(this,_t,new Map);Z(this,ms,new Set);Ve(this,"is_fork",!1);Z(this,Ut,!1)}skip_effect(t){g(this,_t).has(t)||g(this,_t).set(t,{d:[],m:[]}),g(this,ms).delete(t)}unskip_effect(t,s=a=>this.schedule(a)){var a=g(this,_t).get(t);if(a){g(this,_t).delete(t);for(var r of a.d)Ee(r,Me),s(r);for(r of a.m)Ee(r,bt),s(r)}g(this,ms).add(t)}capture(t,s,a=!1){t.v!==Ae&&!this.previous.has(t)&&this.previous.set(t,t.v),(t.f&Dt)===0&&(this.current.set(t,[s,a]),dt?.set(t,s)),this.is_fork||(t.v=s)}activate(){J=this}deactivate(){J=null,dt=null}flush(){try{Sa=!0,J=this,ie(this,de,Cs).call(this)}finally{lr=0,Oa=null,fs=null,Xs=null,Sa=!1,J=null,dt=null,Qt.clear()}}discard(){for(const t of g(this,_s))t(this);g(this,_s).clear(),g(this,Ht).clear(),ie(this,de,ds).call(this)}register_created_effect(t){g(this,Ps).push(t)}increment(t,s){if(X(this,gs,g(this,gs)+1),t){let a=g(this,kt).get(s)??0;g(this,kt).set(s,a+1)}}decrement(t,s){if(X(this,gs,g(this,gs)-1),t){let a=g(this,kt).get(s)??0;a===1?g(this,kt).delete(s):g(this,kt).set(s,a-1)}g(this,Ut)||(X(this,Ut,!0),Jt(()=>{X(this,Ut,!1),this.linked&&this.flush()}))}transfer_effects(t,s){for(const a of t)g(this,Rt).add(a);for(const a of s)g(this,ht).add(a);t.clear(),s.clear()}oncommit(t){g(this,hs).add(t)}ondiscard(t){g(this,_s).add(t)}on_fork_commit(t){g(this,Ht).add(t)}run_fork_commit_callbacks(){for(const t of g(this,Ht))t(this);g(this,Ht).clear()}settled(){return(g(this,Ds)??X(this,Ds,zr())).promise}static ensure(){var t;if(J===null){const s=J=new da;ie(t=s,de,La).call(t),!Sa&&!As&&Jt(()=>{g(s,ps)||s.flush()})}return J}apply(){{dt=null;return}}schedule(t){if(Oa=t,t.b?.is_pending&&(t.f&(ys|pa|Ar))!==0&&(t.f&is)===0){t.b.defer_effect(t);return}for(var s=t;s.parent!==null;){s=s.parent;var a=s.f;if(fs!==null&&s===se&&(ee===null||(ee.f&Oe)===0))return;if((a&(Pt|vt))!==0){if((a&Fe)===0)return;s.f^=Fe}}g(this,Ue).push(s)}};ps=new WeakMap,Ft=new WeakMap,Kt=new WeakMap,hs=new WeakMap,_s=new WeakMap,Ht=new WeakMap,gs=new WeakMap,kt=new WeakMap,Ds=new WeakMap,Ue=new WeakMap,Ps=new WeakMap,Rt=new WeakMap,ht=new WeakMap,_t=new WeakMap,ms=new WeakMap,Ut=new WeakMap,de=new WeakSet,Da=function(){if(this.is_fork)return!0;for(const a of g(this,kt).keys()){for(var t=a,s=!1;t.parent!==null;){if(g(this,_t).has(t)){s=!0;break}t=t.parent}if(!s)return!0}return!1},Cs=function(){var c,d,_;if(X(this,ps,!0),lr++>1e3&&(ie(this,de,ds).call(this),hi()),!ie(this,de,Da).call(this)){for(const v of g(this,Rt))g(this,ht).delete(v),Ee(v,Me),this.schedule(v);for(const v of g(this,ht))Ee(v,bt),this.schedule(v)}const t=g(this,Ue);X(this,Ue,[]),this.apply();var s=fs=[],a=[],r=Xs=[];for(const v of t)try{ie(this,de,Pa).call(this,v,s,a)}catch(u){throw Hr(v),u}if(J=null,r.length>0){var n=da.ensure();for(const v of r)n.schedule(v)}if(fs=null,Xs=null,ie(this,de,Da).call(this)){ie(this,de,Zs).call(this,a),ie(this,de,Zs).call(this,s);for(const[v,u]of g(this,_t))Kr(v,u);r.length>0&&ie(c=J,de,Cs).call(c);return}const l=ie(this,de,qr).call(this);if(l){ie(d=l,de,Nr).call(d,this);return}g(this,Rt).clear(),g(this,ht).clear();for(const v of g(this,hs))v(this);g(this,hs).clear(),Ma=this,or(a),or(s),Ma=null,g(this,Ds)?.resolve();var o=J;if(this.linked&&g(this,gs)===0&&ie(this,de,ds).call(this),g(this,Ue).length>0){o===null&&(o=this,ie(this,de,La).call(this));const v=o;g(v,Ue).push(...g(this,Ue).filter(u=>!g(v,Ue).includes(u)))}o!==null&&ie(_=o,de,Cs).call(_)},Pa=function(t,s,a){t.f^=Fe;for(var r=t.first;r!==null;){var n=r.f,l=(n&(vt|Pt))!==0,o=l&&(n&Fe)!==0,c=o||(n&Le)!==0||g(this,_t).has(r);if(!c&&r.fn!==null){l?r.f^=Fe:(n&ys)!==0?s.push(r):Bs(r)&&((n&ct)!==0&&g(this,ht).add(r),ks(r));var d=r.first;if(d!==null){r=d;continue}}for(;r!==null;){var _=r.next;if(_!==null){r=_;break}r=r.parent}}},qr=function(){for(var t=g(this,Ft);t!==null;){if(!t.is_fork){for(const[s,[,a]]of this.current)if(t.current.has(s)&&!a)return t}t=g(t,Ft)}return null},Nr=function(t){var a;for(const[r,n]of t.current)!this.previous.has(r)&&t.previous.has(r)&&this.previous.set(r,t.previous.get(r)),this.current.set(r,n);for(const[r,n]of t.async_deriveds){const l=this.async_deriveds.get(r);l&&n.promise.then(l.resolve)}const s=r=>{var n=r.reactions;if(n!==null)for(const c of n){var l=c.f;if((l&Oe)!==0)s(c);else{var o=c;l&(vs|ct)&&!this.async_deriveds.has(o)&&(g(this,ht).delete(o),Ee(o,Me),this.schedule(o))}}};for(const r of this.current.keys())s(r);this.oncommit(()=>t.discard()),ie(a=t,de,ds).call(a),J=this,ie(this,de,Cs).call(this)},Zs=function(t){for(var s=0;s!this.current.has(u));if(r.length===0)t&&v.discard();else if(s.length>0){if(t)for(const u of g(this,ms))v.unskip_effect(u,m=>{var b;(m.f&(ct|vs))!==0?v.schedule(m):ie(b=v,de,Zs).call(b,[m])});v.activate();var n=new Set,l=new Map;for(var o of s)Br(o,r,n,l);l=new Map;var c=[...v.current.keys()].filter(u=>this.current.has(u)?this.current.get(u)[0]!==u.v:!0);if(c.length>0)for(const u of g(this,Ps))(u.f&(st|Le|ta))===0&&Ga(u,c,l)&&((u.f&(vs|ct))!==0?(Ee(u,Me),v.schedule(u)):g(v,Rt).add(u));if(g(v,Ue).length>0&&!g(v,Ut)){v.apply();for(var d of g(v,Ue))ie(_=v,de,Pa).call(_,d,[],[]);X(v,Ue,[])}v.deactivate()}}}},La=function(){os===null?ka=os=this:(X(os,Kt,this),X(this,Ft,os)),os=this},ds=function(){var t=g(this,Ft),s=g(this,Kt);t===null?ka=s:X(t,Kt,s),s===null?os=t:X(s,Ft,t),this.linked=!1};let rs=da;function pi(e){var t=As;As=!0;try{for(var s;;){if(ci(),J===null)return s;J.flush()}}finally{As=t}}function hi(){try{Bn()}catch(e){Ot(e,Oa)}}let xt=null;function or(e){var t=e.length;if(t!==0){for(var s=0;s0)){Qt.clear();for(const r of xt){if((r.f&(st|Le))!==0)continue;const n=[r];let l=r.parent;for(;l!==null;)xt.has(l)&&(xt.delete(l),n.push(l)),l=l.parent;for(let o=n.length-1;o>=0;o--){const c=n[o];(c.f&(st|Le))===0&&ks(c)}}xt.clear()}}xt=null}}function Br(e,t,s,a){if(!s.has(e)&&(s.add(e),e.reactions!==null))for(const r of e.reactions){const n=r.f;(n&Oe)!==0?Br(r,t,s,a):(n&(vs|ct))!==0&&(n&Me)===0&&Ga(r,t,a)&&(Ee(r,Me),Wa(r))}}function Ga(e,t,s){const a=s.get(e);if(a!==void 0)return a;if(e.deps!==null)for(const r of e.deps){if(Xt.call(t,r))return!0;if((r.f&Oe)!==0&&Ga(r,t,s))return s.set(r,!0),!0}return s.set(e,!1),!1}function Wa(e){J.schedule(e)}function Kr(e,t){if(!((e.f&vt)!==0&&(e.f&Fe)!==0)){(e.f&Me)!==0?t.d.push(e):(e.f&bt)!==0&&t.m.push(e),Ee(e,Fe);for(var s=e.first;s!==null;)Kr(s,t),s=s.next}}function Hr(e){Ee(e,Fe);for(var t=e.first;t!==null;)Hr(t),t=t.next}function _i(e){let t=0,s=ns(0),a;return()=>{Za()&&(i(s),Ja(()=>(t===0&&(a=ga(()=>e(()=>Fs(s)))),t+=1,()=>{Jt(()=>{t-=1,t===0&&(a?.(),a=void 0,Fs(s))})})))}}var gi=ss|Es;function mi(e,t,s,a){new bi(e,t,s,a)}var Ze,Ka,Je,Gt,Ie,Qe,Pe,Ge,St,Wt,Mt,bs,Ls,Vs,Et,fa,Te,yi,wi,xi,Va,Js,Qs,Ia,qa;class bi{constructor(t,s,a,r){Z(this,Te);Ve(this,"parent");Ve(this,"is_pending",!1);Ve(this,"transform_error");Z(this,Ze);Z(this,Ka,null);Z(this,Je);Z(this,Gt);Z(this,Ie);Z(this,Qe,null);Z(this,Pe,null);Z(this,Ge,null);Z(this,St,null);Z(this,Wt,0);Z(this,Mt,0);Z(this,bs,!1);Z(this,Ls,new Set);Z(this,Vs,new Set);Z(this,Et,null);Z(this,fa,_i(()=>(X(this,Et,ns(g(this,Wt))),()=>{X(this,Et,null)})));X(this,Ze,t),X(this,Je,s),X(this,Gt,n=>{var l=se;l.b=this,l.f|=za,a(n)}),this.parent=se.b,this.transform_error=r??this.parent?.transform_error??(n=>n),X(this,Ie,_a(()=>{ie(this,Te,Va).call(this)},gi))}defer_effect(t){Ir(t,g(this,Ls),g(this,Vs))}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!g(this,Je).pending}update_pending_count(t,s){ie(this,Te,Ia).call(this,t,s),X(this,Wt,g(this,Wt)+t),!(!g(this,Et)||g(this,bs))&&(X(this,bs,!0),Jt(()=>{X(this,bs,!1),g(this,Et)&&xs(g(this,Et),g(this,Wt))}))}get_effect_pending(){return g(this,fa).call(this),i(g(this,Et))}error(t){if(!g(this,Je).onerror&&!g(this,Je).failed)throw t;J?.is_fork?(g(this,Qe)&&J.skip_effect(g(this,Qe)),g(this,Pe)&&J.skip_effect(g(this,Pe)),g(this,Ge)&&J.skip_effect(g(this,Ge)),J.on_fork_commit(()=>{ie(this,Te,qa).call(this,t)})):ie(this,Te,qa).call(this,t)}}Ze=new WeakMap,Ka=new WeakMap,Je=new WeakMap,Gt=new WeakMap,Ie=new WeakMap,Qe=new WeakMap,Pe=new WeakMap,Ge=new WeakMap,St=new WeakMap,Wt=new WeakMap,Mt=new WeakMap,bs=new WeakMap,Ls=new WeakMap,Vs=new WeakMap,Et=new WeakMap,fa=new WeakMap,Te=new WeakSet,yi=function(){try{X(this,Qe,et(()=>g(this,Gt).call(this,g(this,Ze))))}catch(t){this.error(t)}},wi=function(t){const s=g(this,Je).failed;s&&X(this,Ge,et(()=>{s(g(this,Ze),()=>t,()=>()=>{})}))},xi=function(){const t=g(this,Je).pending;t&&(this.is_pending=!0,X(this,Pe,et(()=>t(g(this,Ze)))),Jt(()=>{var s=X(this,St,document.createDocumentFragment()),a=jt();s.append(a),X(this,Qe,ie(this,Te,Qs).call(this,()=>et(()=>g(this,Gt).call(this,a)))),g(this,Mt)===0&&(g(this,Ze).before(s),X(this,St,null),es(g(this,Pe),()=>{X(this,Pe,null)}),ie(this,Te,Js).call(this,J))}))},Va=function(){try{if(this.is_pending=this.has_pending_snippet(),X(this,Mt,0),X(this,Wt,0),X(this,Qe,et(()=>{g(this,Gt).call(this,g(this,Ze))})),g(this,Mt)>0){var t=X(this,St,document.createDocumentFragment());tr(g(this,Qe),t);const s=g(this,Je).pending;X(this,Pe,et(()=>s(g(this,Ze))))}else ie(this,Te,Js).call(this,J)}catch(s){this.error(s)}},Js=function(t){this.is_pending=!1,t.transfer_effects(g(this,Ls),g(this,Vs))},Qs=function(t){var s=se,a=ee,r=Ye;wt(g(this,Ie)),nt(g(this,Ie)),ws(g(this,Ie).ctx);try{return rs.ensure(),t()}catch(n){return Lr(n),null}finally{wt(s),nt(a),ws(r)}},Ia=function(t,s){var a;if(!this.has_pending_snippet()){this.parent&&ie(a=this.parent,Te,Ia).call(a,t,s);return}X(this,Mt,g(this,Mt)+t),g(this,Mt)===0&&(ie(this,Te,Js).call(this,s),g(this,Pe)&&es(g(this,Pe),()=>{X(this,Pe,null)}),g(this,St)&&(g(this,Ze).before(g(this,St)),X(this,St,null)))},qa=function(t){g(this,Qe)&&(Be(g(this,Qe)),X(this,Qe,null)),g(this,Pe)&&(Be(g(this,Pe)),X(this,Pe,null)),g(this,Ge)&&(Be(g(this,Ge)),X(this,Ge,null));var s=g(this,Je).onerror;let a=g(this,Je).failed;var r=!1,n=!1;const l=()=>{if(r){li();return}r=!0,n&&Wn(),g(this,Ge)!==null&&es(g(this,Ge),()=>{X(this,Ge,null)}),ie(this,Te,Qs).call(this,()=>{ie(this,Te,Va).call(this)})},o=c=>{try{n=!0,s?.(c,l),n=!1}catch(d){Ot(d,g(this,Ie)&&g(this,Ie).parent)}a&&X(this,Ge,ie(this,Te,Qs).call(this,()=>{try{return et(()=>{var d=se;d.b=this,d.f|=za,a(g(this,Ze),()=>c,()=>l)})}catch(d){return Ot(d,g(this,Ie).parent),null}}))};Jt(()=>{var c;try{c=this.transform_error(t)}catch(d){Ot(d,g(this,Ie)&&g(this,Ie).parent);return}c!==null&&typeof c=="object"&&typeof c.then=="function"?c.then(o,d=>Ot(d,g(this,Ie)&&g(this,Ie).parent)):o(c)})};function ki(e,t,s,a){const r=Ms;var n=e.filter(u=>!u.settled);if(s.length===0&&n.length===0){a(t.map(r));return}var l=se,o=Si(),c=n.length===1?n[0].promise:n.length>1?Promise.all(n.map(u=>u.promise)):null;function d(u){if((l.f&st)===0){o();try{a(u)}catch(m){Ot(m,l)}aa()}}var _=Ur();if(s.length===0){c.then(()=>d(t.map(r))).finally(_);return}function v(){Promise.all(s.map(u=>Ei(u))).then(u=>d([...t.map(r),...u])).catch(u=>Ot(u,l)).finally(_)}c?c.then(()=>{o(),v(),aa()}):v()}function Si(){var e=se,t=ee,s=Ye,a=J;return function(n=!0){wt(e),nt(t),ws(s),n&&(e.f&st)===0&&(a?.activate(),a?.apply())}}function aa(e=!0){wt(null),nt(null),ws(null),e&&J?.deactivate()}function Ur(){var e=se,t=e.b,s=J,a=t.is_rendered();return t.update_pending_count(1,s),s.increment(a,e),()=>{t.update_pending_count(-1,s),s.decrement(a,e)}}function Ms(e){var t=Oe|Me;return se!==null&&(se.f|=Es),{ctx:Ye,deps:null,effects:null,equals:Mr,f:t,fn:e,reactions:null,rv:0,v:Ae,wv:0,parent:se,ac:null}}const Hs=Symbol("obsolete");function Ei(e,t,s){let a=se;a===null&&Ln();var r=void 0,n=ns(Ae),l=!ee,o=new Set;return Li(()=>{var c=se,d=zr();r=d.promise;try{Promise.resolve(e()).then(d.resolve,m=>{m!==ha&&d.reject(m)}).finally(aa)}catch(m){d.reject(m),aa()}var _=J;if(l){if((c.f&is)!==0)var v=Ur();if(a.b.is_rendered())_.async_deriveds.get(c)?.reject(Hs);else for(const m of o.values())m.reject(Hs);o.add(d),_.async_deriveds.set(c,d)}const u=(m,b=void 0)=>{v?.(),o.delete(d),b!==Hs&&(_.activate(),b?(n.f|=Dt,xs(n,b)):((n.f&Dt)!==0&&(n.f^=Dt),xs(n,m)),_.deactivate())};d.promise.then(u,m=>u(null,m||"unknown"))}),an(()=>{for(const c of o)c.reject(Hs)}),new Promise(c=>{function d(_){function v(){_===r?c(n):d(r)}_.then(v,v)}d(r)})}function j(e){const t=Ms(e);return un(t),t}function Gr(e){const t=Ms(e);return t.equals=Or,t}function ji(e){var t=e.effects;if(t!==null){e.effects=null;for(var s=0;s0&&!Xr&&Ci()}return t}function Ci(){Xr=!1;for(const e of ra){(e.f&Fe)!==0&&Ee(e,bt);let t;try{t=Bs(e)}catch{t=!0}t&&ks(e)}ra.clear()}function Fs(e){K(e,e.v+1)}function Zr(e,t,s){var a=e.reactions;if(a!==null)for(var r=a.length,n=0;n{if(ts===n)return o();var c=ee,d=ts;nt(null),vr(n);var _=o();return nt(c),vr(d),_};return a&&s.set("length",te(e.length)),new Proxy(e,{defineProperty(o,c,d){(!("value"in d)||d.configurable===!1||d.enumerable===!1||d.writable===!1)&&Hn();var _=s.get(c);return _===void 0?l(()=>{var v=te(d.value);return s.set(c,v),v}):K(_,d.value,!0),!0},deleteProperty(o,c){var d=s.get(c);if(d===void 0){if(c in o){const _=l(()=>te(Ae));s.set(c,_),Fs(r)}}else K(d,Ae),Fs(r);return!0},get(o,c,d){if(c===Zt)return e;var _=s.get(c),v=c in o;if(_===void 0&&(!v||us(o,c)?.writable)&&(_=l(()=>{var m=Ne(v?o[c]:Ae),b=te(m);return b}),s.set(c,_)),_!==void 0){var u=i(_);return u===Ae?void 0:u}return Reflect.get(o,c,d)},getOwnPropertyDescriptor(o,c){var d=Reflect.getOwnPropertyDescriptor(o,c);if(d&&"value"in d){var _=s.get(c);_&&(d.value=i(_))}else if(d===void 0){var v=s.get(c),u=v?.v;if(v!==void 0&&u!==Ae)return{enumerable:!0,configurable:!0,value:u,writable:!0}}return d},has(o,c){if(c===Zt)return!0;var d=s.get(c),_=d!==void 0&&d.v!==Ae||Reflect.has(o,c);if(d!==void 0||se!==null&&(!_||us(o,c)?.writable)){d===void 0&&(d=l(()=>{var u=_?Ne(o[c]):Ae,m=te(u);return m}),s.set(c,d));var v=i(d);if(v===Ae)return!1}return _},set(o,c,d,_){var v=s.get(c),u=c in o;if(a&&c==="length")for(var m=d;mte(Ae)),s.set(m+"",b))}if(v===void 0)(!u||us(o,c)?.writable)&&(v=l(()=>te(void 0)),K(v,Ne(d)),s.set(c,v));else{u=v.v!==Ae;var w=l(()=>Ne(d));K(v,w)}var h=Reflect.getOwnPropertyDescriptor(o,c);if(h?.set&&h.set.call(_,d),!u){if(a&&typeof c=="string"){var y=s.get("length"),S=Number(c);Number.isInteger(S)&&S>=y.v&&K(y,S+1)}Fs(r)}return!0},ownKeys(o){i(r);var c=Reflect.ownKeys(o).filter(v=>{var u=s.get(v);return u===void 0||u.v!==Ae});for(var[d,_]of s)_.v!==Ae&&!(d in o)&&c.push(d);return c},setPrototypeOf(){Un()}})}function cr(e){try{if(e!==null&&typeof e=="object"&&Zt in e)return e[Zt]}catch{}return e}function zi(e,t){return Object.is(cr(e),cr(t))}var dr,Jr,Qr,en;function Ai(){if(dr===void 0){dr=window,Jr=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,s=Text.prototype;Qr=us(t,"firstChild").get,en=us(t,"nextSibling").get,ir(e)&&(e[Fa]=void 0,e[Ws]=null,e[Ra]=void 0,e.__e=void 0),ir(s)&&(s[$s]=void 0)}}function jt(e=""){return document.createTextNode(e)}function na(e){return Qr.call(e)}function Ns(e){return en.call(e)}function f(e,t){return na(e)}function yt(e,t=!1){{var s=na(e);return s instanceof Comment&&s.data===""?Ns(s):s}}function p(e,t=1,s=!1){let a=e;for(;t--;)a=Ns(a);return a}function Fi(e){e.textContent=""}function tn(){return!1}function Ri(e,t,s){return document.createElementNS(Rr,e,void 0)}let fr=!1;function Mi(){fr||(fr=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(const t of e.target.elements)t[Ys]?.()})},{capture:!0}))}function Xa(e){var t=ee,s=se;nt(null),wt(null);try{return e()}finally{nt(t),wt(s)}}function sn(e,t,s,a=s){e.addEventListener(t,()=>Xa(s));const r=e[Ys];r?e[Ys]=()=>{r(),a(!0)}:e[Ys]=()=>a(!0),Mi()}function Oi(e){se===null&&(ee===null&&Nn(),qn()),$t&&In()}function Di(e,t){var s=t.last;s===null?t.last=t.first=e:(s.next=e,e.prev=s,t.last=e)}function Ct(e,t){var s=se;s!==null&&(s.f&Le)!==0&&(e|=Le);var a={ctx:Ye,deps:null,nodes:null,f:e|Me|tt,first:null,fn:t,last:null,next:null,parent:s,b:s&&s.b,prev:null,teardown:null,wv:0,ac:null};J?.register_created_effect(a);var r=a;if((e&ys)!==0)fs!==null?fs.push(a):rs.ensure().schedule(a);else if(t!==null){try{ks(a)}catch(l){throw Be(a),l}r.deps===null&&r.teardown===null&&r.nodes===null&&r.first===r.last&&(r.f&Es)===0&&(r=r.first,(e&ct)!==0&&(e&ss)!==0&&r!==null&&(r.f|=ss))}if(r!==null&&(r.parent=s,s!==null&&Di(r,s),ee!==null&&(ee.f&Oe)!==0&&(e&Pt)===0)){var n=ee;(n.effects??(n.effects=[])).push(r)}return a}function Za(){return ee!==null&&!ft}function an(e){const t=Ct(pa,null);return Ee(t,Fe),t.teardown=e,t}function rn(e){Oi();var t=se.f,s=!ee&&(t&vt)!==0&&(t&is)===0;if(s){var a=Ye;(a.e??(a.e=[])).push(e)}else return nn(e)}function nn(e){return Ct(ys|Mn,e)}function Pi(e){rs.ensure();const t=Ct(Pt|Es,e);return(s={})=>new Promise(a=>{s.outro?es(t,()=>{Be(t),a(void 0)}):(Be(t),a(void 0))})}function ln(e){return Ct(ys,e)}function Li(e){return Ct(vs|Es,e)}function Ja(e,t=0){return Ct(pa|t,e)}function q(e,t=[],s=[],a=[]){ki(a,t,s,r=>{Ct(pa,()=>e(...r.map(i)))})}function _a(e,t=0){var s=Ct(ct|t,e);return s}function et(e){return Ct(vt|Es,e)}function on(e){var t=e.teardown;if(t!==null){const s=$t,a=ee;ur(!0),nt(null);try{t.call(null)}finally{ur(s),nt(a)}}}function Qa(e,t=!1){var s=e.first;for(e.first=e.last=null;s!==null;){const r=s.ac;r!==null&&Xa(()=>{r.abort(ha)});var a=s.next;(s.f&Pt)!==0?s.parent=null:Be(s,t),s=a}}function Vi(e){for(var t=e.first;t!==null;){var s=t.next;(t.f&vt)===0&&Be(t),t=s}}function Be(e,t=!0){var s=!1;(t||(e.f&Rn)!==0)&&e.nodes!==null&&e.nodes.end!==null&&(Ii(e.nodes.start,e.nodes.end),s=!0),Ee(e,Aa),Qa(e,t&&!s),Os(e,0);var a=e.nodes&&e.nodes.t;if(a!==null)for(const n of a)n.stop();on(e),e.f^=Aa,e.f|=st;var r=e.parent;r!==null&&r.first!==null&&cn(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function Ii(e,t){for(;e!==null;){var s=e===t?null:Ns(e);e.remove(),e=s}}function cn(e){var t=e.parent,s=e.prev,a=e.next;s!==null&&(s.next=a),a!==null&&(a.prev=s),t!==null&&(t.first===e&&(t.first=a),t.last===e&&(t.last=s))}function es(e,t,s=!0){var a=[];dn(e,a,!0);var r=()=>{s&&Be(e),t&&t()},n=a.length;if(n>0){var l=()=>--n||r();for(var o of a)o.out(l)}else r()}function dn(e,t,s){if((e.f&Le)===0){e.f^=Le;var a=e.nodes&&e.nodes.t;if(a!==null)for(const o of a)(o.is_global||s)&&t.push(o);for(var r=e.first;r!==null;){var n=r.next;if((r.f&Pt)===0){var l=(r.f&ss)!==0||(r.f&vt)!==0&&(e.f&ct)!==0;dn(r,t,l?s:!1)}r=n}}}function er(e){fn(e,!0)}function fn(e,t){if((e.f&Le)!==0){e.f^=Le,(e.f&Fe)===0&&(Ee(e,Me),rs.ensure().schedule(e));for(var s=e.first;s!==null;){var a=s.next,r=(s.f&ss)!==0||(s.f&vt)!==0;fn(s,r?t:!1),s=a}var n=e.nodes&&e.nodes.t;if(n!==null)for(const l of n)(l.is_global||t)&&l.in()}}function tr(e,t){if(e.nodes)for(var s=e.nodes.start,a=e.nodes.end;s!==null;){var r=s===a?null:Ns(s);t.append(s),s=r}}let ea=!1,$t=!1;function ur(e){$t=e}let ee=null,ft=!1;function nt(e){ee=e}let se=null;function wt(e){se=e}let at=null;function un(e){ee!==null&&(at===null?at=[e]:at.push(e))}let qe=null,He=0,Xe=null;function qi(e){Xe=e}let vn=1,Nt=0,ts=Nt;function vr(e){ts=e}function pn(){return++vn}function Bs(e){var t=e.f;if((t&Me)!==0)return!0;if(t&Oe&&(e.f&=~as),(t&bt)!==0){for(var s=e.deps,a=s.length,r=0;re.wv)return!0}(t&tt)!==0&&dt===null&&Ee(e,Fe)}return!1}function hn(e,t,s=!0){var a=e.reactions;if(a!==null&&!(at!==null&&Xt.call(at,e)))for(var r=0;r{e.ac.abort(ha)}),e.ac=null);try{e.f|=sa;var _=e.fn,v=_();e.f|=is;var u=e.deps,m=J?.is_fork;if(qe!==null){var b;if(m||Os(e,He),u!==null&&He>0)for(u.length=He+qe.length,b=0;b{throw h});throw u}}finally{e[Bt]=t,delete e.currentTarget,nt(_),wt(v)}}}const Ui=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:e=>e});function Gi(e){return Ui?.createHTML(e)??e}function Wi(e){var t=Ri("template");return t.innerHTML=Gi(e.replaceAll("","")),t.content}function ia(e,t){var s=se;s.nodes===null&&(s.nodes={start:e,end:t,a:null,t:null})}function F(e,t){var s=(t&ai)!==0,a=(t&ri)!==0,r,n=!e.startsWith("");return()=>{r===void 0&&(r=Wi(n?e:""+e),s||(r=na(r)));var l=a||Jr?document.importNode(r,!0):r.cloneNode(!0);if(s){var o=na(l),c=l.lastChild;ia(o,c)}else ia(l,l);return l}}function Yi(e=""){{var t=jt(e+"");return ia(t,t),t}}function _r(){var e=document.createDocumentFragment(),t=document.createComment(""),s=jt();return e.append(t,s),ia(t,s),e}function z(e,t){e!==null&&e.before(t)}function A(e,t){var s=t==null?"":typeof t=="object"?`${t}`:t;s!==(e[$s]??(e[$s]=e.nodeValue))&&(e[$s]=s,e.nodeValue=`${s}`)}function Xi(e,t){return Zi(e,t)}const Us=new Map;function Zi(e,{target:t,anchor:s,props:a={},events:r,context:n,intro:l=!0,transformError:o}){Ai();var c=void 0,d=Pi(()=>{var _=s??t.appendChild(jt());mi(_,{pending:()=>{}},m=>{ke({});var b=Ye;n&&(b.c=n),r&&(a.$$events=r),c=e(m,a)||{},Se()},o);var v=new Set,u=m=>{for(var b=0;b{for(var m of v)for(const h of[t,document]){var b=Us.get(h),w=b.get(m);--w==0?(h.removeEventListener(m,hr),b.delete(m),b.size===0&&Us.delete(h)):b.set(m,w)}Na.delete(u),_!==s&&_.parentNode?.removeChild(_)}});return Ji.set(c,d),c}let Ji=new WeakMap;var lt,gt,We,Yt,Is,qs,ua;class yn{constructor(t,s=!0){Ve(this,"anchor");Z(this,lt,new Map);Z(this,gt,new Map);Z(this,We,new Map);Z(this,Yt,new Set);Z(this,Is,!0);Z(this,qs,t=>{if(g(this,lt).has(t)){var s=g(this,lt).get(t),a=g(this,gt).get(s);if(a)er(a),g(this,Yt).delete(s);else{var r=g(this,We).get(s);r&&(g(this,gt).set(s,r.effect),g(this,We).delete(s),r.fragment.lastChild.remove(),this.anchor.before(r.fragment),a=r.effect)}for(const[n,l]of g(this,lt)){if(g(this,lt).delete(n),n===t)break;const o=g(this,We).get(l);o&&(Be(o.effect),g(this,We).delete(l))}for(const[n,l]of g(this,gt)){if(n===s||g(this,Yt).has(n))continue;const o=()=>{if(Array.from(g(this,lt).values()).includes(n)){var d=document.createDocumentFragment();tr(l,d),d.append(jt()),g(this,We).set(n,{effect:l,fragment:d})}else Be(l);g(this,Yt).delete(n),g(this,gt).delete(n)};g(this,Is)||!a?(g(this,Yt).add(n),es(l,o,!1)):o()}}});Z(this,ua,t=>{g(this,lt).delete(t);const s=Array.from(g(this,lt).values());for(const[a,r]of g(this,We))s.includes(a)||(Be(r.effect),g(this,We).delete(a))});this.anchor=t,X(this,Is,s)}ensure(t,s){var a=J,r=tn();if(s&&!g(this,gt).has(t)&&!g(this,We).has(t))if(r){var n=document.createDocumentFragment(),l=jt();n.append(l),g(this,We).set(t,{effect:et(()=>s(l)),fragment:n})}else g(this,gt).set(t,et(()=>s(this.anchor)));if(g(this,lt).set(a,t),r){for(const[o,c]of g(this,gt))o===t?a.unskip_effect(c):a.skip_effect(c);for(const[o,c]of g(this,We))o===t?a.unskip_effect(c.effect):a.skip_effect(c.effect);a.oncommit(g(this,qs)),a.ondiscard(g(this,ua))}else g(this,qs).call(this,a)}}lt=new WeakMap,gt=new WeakMap,We=new WeakMap,Yt=new WeakMap,Is=new WeakMap,qs=new WeakMap,ua=new WeakMap;function fe(e,t,s=!1){var a=new yn(e),r=s?ss:0;function n(l,o){a.ensure(l,o)}_a(()=>{var l=!1;t((o,c=0)=>{l=!0,n(c,o)}),l||n(-1,null)},r)}function js(e,t){return t}function Qi(e,t,s){for(var a=[],r=t.length,n,l=t.length,o=0;o{if(n){if(n.pending.delete(v),n.done.add(v),n.pending.size===0){var u=e.outrogroups;Ba(e,va(n.done)),u.delete(n),u.size===0&&(e.outrogroups=null)}}else l-=1},!1)}if(l===0){var c=a.length===0&&s!==null;if(c){var d=s,_=d.parentNode;Fi(_),_.append(d),e.items.clear()}Ba(e,t,!c)}else n={pending:new Set(t),done:new Set},(e.outrogroups??(e.outrogroups=new Set)).add(n)}function Ba(e,t,s=!0){var a;if(e.pending.size>0){a=new Set;for(const l of e.pending.values())for(const o of l)a.add(e.items.get(o).e)}for(var r=0;r{var $=s();return Ha($)?$:$==null?[]:va($)}),u,m=new Map,b=!0;function w($){(S.effect.f&st)===0&&(S.pending.delete($),S.fallback=_,el(S,u,l,t,a),_!==null&&(u.length===0?(_.f&mt)===0?er(_):(_.f^=mt,zs(_,null,l)):es(_,()=>{_=null})))}function h($){S.pending.delete($)}var y=_a(()=>{u=i(v);for(var $=u.length,R=new Set,B=J,E=tn(),C=0;C<$;C+=1){var O=u[C],L=a(O,C),T=b?null:o.get(L);T?(T.v&&xs(T.v,O),T.i&&xs(T.i,C),E&&B.unskip_effect(T.e)):(T=tl(o,b?l:gr??(gr=jt()),O,L,C,r,t,s),b||(T.e.f|=mt),o.set(L,T)),R.add(L)}if($===0&&n&&!_&&(b?_=et(()=>n(l)):(_=et(()=>n(gr??(gr=jt()))),_.f|=mt)),$>R.size&&Vn(),!b)if(m.set(B,R),E){for(const[D,x]of o)R.has(D)||B.skip_effect(x.e);B.oncommit(w),B.ondiscard(h)}else w(B);i(v)}),S={effect:y,items:o,pending:m,outrogroups:null,fallback:_};b=!1}function Ts(e){for(;e!==null&&(e.f&vt)===0;)e=e.next;return e}function el(e,t,s,a,r){var n=(a&Zn)!==0,l=t.length,o=e.items,c=Ts(e.effect.first),d,_=null,v,u=[],m=[],b,w,h,y;if(n)for(y=0;y0){var L=(a&Fr)!==0&&l===0?s:null;if(n){for(y=0;y{if(v!==void 0)for(h of v)h.nodes?.a?.apply()})}function tl(e,t,s,a,r,n,l,o){var c=(l&Yn)!==0?(l&Jn)===0?$i(s,!1,!1):ns(s):null,d=(l&Xn)!==0?ns(r):null;return{v:c,i:d,e:et(()=>(n(t,c??s,d??r,o),()=>{e.delete(a)}))}}function zs(e,t,s){if(e.nodes)for(var a=e.nodes.start,r=e.nodes.end,n=t&&(t.f&mt)===0?t.nodes.start:s;a!==null;){var l=Ns(a);if(n.before(a),a===r)return;a=l}}function At(e,t,s){t===null?e.effect.first=s:t.next=s,s===null?e.effect.last=t:s.prev=t}function wn(e,t,...s){var a=new yn(e);_a(()=>{const r=t()??null;a.ensure(r,r&&(n=>r(n,...s)))},ss)}const mr=[...` +\r\f \v\uFEFF`];function sl(e,t,s){var a=e==null?"":""+e;if(s){for(var r of Object.keys(s))if(s[r])a=a?a+" "+r:r;else if(a.length)for(var n=r.length,l=0;(l=a.indexOf(r,l))>=0;){var o=l+n;(l===0||mr.includes(a[l-1]))&&(o===a.length||mr.includes(a[o]))?a=(l===0?"":a.substring(0,l))+a.substring(o+1):l=o}}return a===""?null:a}function br(e,t=!1){var s=t?" !important;":";",a="";for(var r of Object.keys(e)){var n=e[r];n!=null&&n!==""&&(a+=" "+r+": "+n+s)}return a}function Ea(e){return e[0]!=="-"||e[1]!=="-"?e.toLowerCase():e}function al(e,t){if(t){var s="",a,r;if(Array.isArray(t)?(a=t[0],r=t[1]):a=t,e){e=String(e).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var n=!1,l=0,o=!1,c=[];a&&c.push(...Object.keys(a).map(Ea)),r&&c.push(...Object.keys(r).map(Ea));var d=0,_=-1;const w=e.length;for(var v=0;v{sr(e,e.__value)});t.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),an(()=>{t.disconnect()})}function la(e,t,s=t){var a=new WeakSet,r=!0;sn(e,"change",n=>{var l=n?"[selected]":":checked",o;if(e.multiple)o=[].map.call(e.querySelectorAll(l),Rs);else{var c=e.querySelector(l)??e.querySelector("option:not([disabled])");o=c&&Rs(c)}s(o),e.__value=o,J!==null&&a.add(J)}),ln(()=>{var n=t();if(e===document.activeElement){var l=J;if(a.has(l))return}if(sr(e,n,r),r&&n===void 0){var o=e.querySelector(":checked");o!==null&&(n=Rs(o),s(n))}e.__value=n,r=!1}),xn(e)}function Rs(e){return"__value"in e?e.__value:e.value}const rl=Symbol("is custom element"),nl=Symbol("is html"),il=Pn?"progress":"PROGRESS";function oa(e,t){var s=kn(e);s.value===(s.value=t??void 0)||e.value===t&&(t!==0||e.nodeName!==il)||(e.value=t??"")}function Q(e,t,s,a){var r=kn(e);r[t]!==(r[t]=s)&&(t==="loading"&&(e[Dn]=s),s==null?e.removeAttribute(t):typeof s!="string"&&ll(e).includes(t)?e[t]=s:e.setAttribute(t,s))}function kn(e){return e[Ws]??(e[Ws]={[rl]:e.nodeName.includes("-"),[nl]:e.namespaceURI===Rr})}var yr=new Map;function ll(e){var t=e.getAttribute("is")||e.nodeName,s=yr.get(t);if(s)return s;yr.set(t,s=[]);for(var a,r=e,n=Element.prototype;n!==r;){a=Cn(r);for(var l in a)a[l].set&&l!=="innerHTML"&&l!=="textContent"&&l!=="innerText"&&s.push(l);r=$r(r)}return s}function Tt(e,t,s=t){var a=new WeakSet;sn(e,"input",async r=>{var n=r?e.defaultValue:e.value;if(n=Ta(e)?$a(n):n,s(n),J!==null&&a.add(J),await Bi(),n!==(n=t())){var l=e.selectionStart,o=e.selectionEnd,c=e.value.length;if(e.value=n??"",o!==null){var d=e.value.length;l===o&&o===c&&d>c?(e.selectionStart=d,e.selectionEnd=d):(e.selectionStart=l,e.selectionEnd=Math.min(o,d))}}}),ga(t)==null&&e.value&&(s(Ta(e)?$a(e.value):e.value),J!==null&&a.add(J)),Ja(()=>{var r=t();if(e===document.activeElement){var n=J;if(a.has(n))return}Ta(e)&&r===$a(e.value)||e.type==="date"&&!r&&!e.value||r!==e.value&&(e.value=r??"")})}function Ta(e){var t=e.type;return t==="number"||t==="range"}function $a(e){return e===""?null:+e}function Ca(e,t){return e===t||e?.[Zt]===t}function ol(e={},t,s,a){var r=Ye.r,n=se;return ln(()=>{var l,o;return Ja(()=>{l=o,o=[],ga(()=>{Ca(s(...o),e)||(t(e,...o),l&&Ca(s(...l),e)&&t(null,...l))})}),()=>{let c=n;for(;c!==r&&c.parent!==null&&c.parent.f&Aa;)c=c.parent;const d=()=>{o&&Ca(s(...o),e)&&t(null,...o)},_=c.teardown;c.teardown=()=>{d(),_?.()}}}),e}function _e(e,t,s,a){var r=!0,n=(s&ti)!==0,l=(s&si)!==0,o=a,c=!0,d=void 0,_=()=>l&&r?(d??(d=Ms(a)),i(d)):(c&&(c=!1,o=l?ga(a):a),o);let v;if(n){var u=Zt in e||On in e;v=us(e,t)?.set??(u&&t in e?R=>e[t]=R:void 0)}var m,b=!1;n?[m,b]=fi(()=>e[t]):m=e[t],m===void 0&&a!==void 0&&(m=_(),v&&(Kn(),v(m)));var w;if(w=()=>{var R=e[t];return R===void 0?_():(c=!0,R)},(s&ei)===0)return w;if(v){var h=e.$$legacy;return(function(R,B){return arguments.length>0?((!B||h||b)&&v(B?w():R),R):w()})}var y=!1,S=((s&Qn)!==0?Ms:Gr)(()=>(y=!1,w()));n&&i(S);var $=se;return(function(R,B){if(arguments.length>0){const E=B?i(S):n?Ne(R):R;return K(S,E),y=!0,o!==void 0&&(o=E),R}return $t&&y||($.f&st)!==0?S.v:i(S)})}const cl="5";var Tr;typeof window<"u"&&((Tr=window.__svelte??(window.__svelte={})).v??(Tr.v=new Set)).add(cl);const It=typeof window<"u"&&window.slashedBricksApp?window.slashedBricksApp:{defaults:{},settings:{},tabs:{},rest:{url:"",nonce:""}},re={defaults:It.defaults||{},tabs:It.tabs||{},rest:It.rest||{url:"",nonce:""},inventory:It.inventory||{variables:[],sf_classes:[],is_classes:[]},pluginSettings:It.pluginSettings||{},versions:It.versions||{plugin:"",framework:""}},H=Ne(structuredClone(It.settings||{})),W=Ne({activeTab:dl(re.tabs)||"colors",dirty:!1,saving:!1,lastSavedAt:null,error:""});function dl(e){for(const t in e)return t;return null}function ar(){W.dirty=!0,W.error=""}function wr(e){H[e]&&delete H[e]}function fl(e,t){const s=H[e];if(!s)return"";const a=s[t];return a==null?"":String(a)}function Ss(e,t,s){H[e]||(H[e]={}),s===""||s===null||s===void 0||typeof s=="string"&&s.trim()===""?delete H[e][t]:H[e][t]=String(s),ar()}var ul=F(''),vl=F('

                            ');function pl(e,t){ke(t,!0);var s=vl();ne(s,21,()=>Object.entries(re.tabs),([a,r])=>a,(a,r)=>{var n=j(()=>ot(i(r),2));let l=()=>i(n)[0],o=()=>i(n)[1];var c=ul();let d;var _=f(c);q(()=>{d=rt(c,1,"tab-nav__btn svelte-yyiz68",null,d,{active:W.activeTab===l()}),A(_,o())}),he("click",c,()=>W.activeTab=l()),z(a,c)}),z(e,s),Se()}De(["click"]);var hl=F(' '),_l=F(' ',1),gl=F(''),ml=F('
                            ');function Gs(e,t){ke(t,!0);let s=_e(t,"hexHint",3,""),a=_e(t,"rawHint",3,""),r=_e(t,"cssVar",3,"");const n=/^#([0-9a-fA-F]{3,4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/,l=(()=>{const D=(H.colors?.[t.storeKey]??"").trim(),x=D===""||n.test(D);return{mode:x?"hex":"raw",hex:x?D:"",raw:x?"":D}})();let o=te(Ne(l.mode)),c=te(Ne(l.hex)),d=te(Ne(l.raw));function _(){H.colors||(H.colors={});const D=i(d).trim(),x=i(c).trim(),k=i(o)==="raw"?D:x;k===""?delete H.colors[t.storeKey]:H.colors[t.storeKey]=k,ar()}function v(){i(o)==="hex"?(K(o,"raw"),K(c,"")):(K(o,"hex"),K(d,"")),_()}const u=j(()=>(i(o)==="raw"?i(d):i(c))||s()||"transparent");var m=ml(),b=f(m),w=f(b),h=f(w),y=p(w,2);{var S=D=>{var x=hl(),k=f(x);q(()=>A(k,r())),z(D,x)};fe(y,D=>{r()&&D(S)})}var $=p(b,2),R=f($);let B;var E=p(R,2);{var C=D=>{var x=_l(),k=yt(x),P=p(k,2);q(()=>{Q(k,"id",t.storeKey),Q(P,"placeholder",s())}),he("input",k,_),Tt(k,()=>i(c),M=>K(c,M)),he("input",P,_),Tt(P,()=>i(c),M=>K(c,M)),z(D,x)},O=D=>{var x=gl();q(()=>{Q(x,"id",t.storeKey),Q(x,"placeholder",a())}),he("input",x,_),Tt(x,()=>i(d),k=>K(d,k)),z(D,x)};fe(E,D=>{i(o)==="hex"?D(C):D(O,-1)})}var L=p(E,2),T=f(L);q(()=>{Q(w,"for",t.storeKey),A(h,t.label),B=ve(R,"",B,{background:i(u)}),A(T,i(o)==="hex"?"Advanced (oklch / raw)":"Use HEX picker")}),he("click",L,v),z(e,m),Se()}De(["input","click"]);var bl=F('
                            '),yl=F('
                            ');function ma(e,t){ke(t,!0);let s=te(!1);const a=`adv-body-${Math.random().toString(36).slice(2,9)}`;var r=yl(),n=f(r),l=p(f(n));let o;var c=f(l),d=p(n,2);{var _=v=>{var u=bl(),m=f(u);wn(m,()=>t.children),q(()=>Q(u,"id",a)),z(v,u)};fe(d,v=>{i(s)&&v(_)})}q(()=>{Q(n,"aria-expanded",i(s)),Q(n,"aria-controls",a),o=rt(l,1,"advanced-section__arrow",null,o,{open:i(s)}),A(c,i(s)?"▲":"▼")}),he("click",n,()=>K(s,!i(s))),z(e,r),Se()}De(["click"]);var wl=F('

                            Brand Colors — Dark Mode

                            Status Colors — Dark Mode

                            ',1),xl=F(`

                            Status Colors — Light Mode

                            The framework auto-derives dark mode from light source colors using CSS relative color syntax (oklch(from light clamp(0.65, 0.95−l·0.5, 0.88) c·0.9 h)). Turn this on only - when you need precise per-color dark overrides; auto-derivation is usually good enough.

                            `,1),xl=F(`

                            Brand Colors — Light Mode

                            Pick a color via the HEX input, or switch to Advanced to paste any + when you need precise per-color dark overrides; auto-derivation is usually good enough.

                            `,1),kl=F(`

                            Brand Colors — Light Mode

                            Pick a color via the HEX input, or switch to Advanced to paste any CSS color value (oklch, rgb, hsl, var(...), etc). Whatever you save is fed - straight into the framework as the source of the brand scale.

                            `);function kl(e,t){ke(t,!0);const s=ne.defaults?.colors??{},a=_=>_.charAt(0).toUpperCase()+_.slice(1),r=Object.entries(s.brand??{}),n=j(()=>dl("colors","dark_overrides_enabled")!=="0");function l(){Ss("colors","dark_overrides_enabled",i(n)?"0":"1")}var o=xl(),c=p(f(o),4);ie(c,21,()=>r,([_,v])=>_,(_,v)=>{var u=j(()=>ot(i(v),2));let m=()=>i(u)[0],b=()=>i(u)[1];{let w=j(()=>`brand_${m()}`),h=j(()=>a(m())),y=j(()=>s.brand_hex_hints?.[m()]??""),S=j(()=>`--sf-color-${m()}-light`);Gs(_,{get storeKey(){return i(w)},get label(){return i(h)},get hexHint(){return i(y)},get rawHint(){return b()},get cssVar(){return i(S)}})}});var d=p(c,2);ma(d,{children:(_,v)=>{var u=wl(),m=p(yt(u),2);ie(m,21,()=>Object.entries(s.status??{}),([E,C])=>E,(E,C)=>{var O=j(()=>ot(i(C),2));let L=()=>i(O)[0],T=()=>i(O)[1];{let D=j(()=>`status_${L()}`),x=j(()=>a(L())),k=j(()=>s.status_hex_hints?.[L()]??""),P=j(()=>`--sf-color-${L()}-light`);Gs(E,{get storeKey(){return i(D)},get label(){return i(x)},get hexHint(){return i(k)},get rawHint(){return T()},get cssVar(){return i(P)}})}});var b=p(m,2),w=f(b),h=f(w);let y;var S=p(h,2),$=f(S),R=p(b,2);{var B=E=>{var C=yl(),O=p(yt(C),2);ie(O,21,()=>Object.entries(s.brand_dark??s.brand??{}),([T])=>T,(T,D)=>{var x=j(()=>ot(i(D),1));let k=()=>i(x)[0];{let P=j(()=>`brand_dark_${k()}`),M=j(()=>a(k())),V=j(()=>s.brand_dark_hex_hints?.[k()]??""),U=j(()=>s.brand_dark?.[k()]??""),I=j(()=>`--sf-color-${k()}-dark`);Gs(T,{get storeKey(){return i(P)},get label(){return i(M)},get hexHint(){return i(V)},get rawHint(){return i(U)},get cssVar(){return i(I)}})}});var L=p(O,4);ie(L,21,()=>Object.entries(s.status_dark??s.status??{}),([T])=>T,(T,D)=>{var x=j(()=>ot(i(D),1));let k=()=>i(x)[0];{let P=j(()=>`status_dark_${k()}`),M=j(()=>a(k())),V=j(()=>s.status_dark_hex_hints?.[k()]??""),U=j(()=>s.status_dark?.[k()]??""),I=j(()=>`--sf-color-${k()}-dark`);Gs(T,{get storeKey(){return i(P)},get label(){return i(M)},get hexHint(){return i(V)},get rawHint(){return i(U)},get cssVar(){return i(I)}})}}),z(E,C)};fe(R,E=>{i(n)&&E(B)})}q(()=>{y=rt(h,1,"dark-toggle-btn svelte-1vle0rm",null,y,{on:i(n)}),Q(h,"aria-pressed",i(n)),A($,i(n)?"Active — custom values override auto-derivation":"Off — dark mode auto-derived from light source colors")}),he("click",h,l),z(_,u)},$$slots:{default:!0}}),z(e,o),Se()}De(["click"]);var Sl=F(''),El=F(' '),jl=F(' '),Tl=F('

                            '),$l=F('
                            ');function ba(e,t){let s=_e(t,"cssVar",3,""),a=_e(t,"fieldId",3,""),r=_e(t,"description",3,"");var n=$l(),l=f(n),o=f(l);{var c=h=>{var y=Sl(),S=f(y);q(()=>{Q(y,"for",a()),A(S,t.label)}),z(h,y)},d=h=>{var y=El(),S=f(y);q(()=>A(S,t.label)),z(h,y)};fe(o,h=>{a()?h(c):h(d,-1)})}var _=p(o,2);{var v=h=>{var y=jl(),S=f(y);q(()=>A(S,s())),z(h,y)};fe(_,h=>{s()&&h(v)})}var u=p(l,2),m=f(u);yn(m,()=>t.children??$r);var b=p(m,2);{var w=h=>{var y=Tl(),S=f(y);q(()=>A(S,r())),z(h,y)};fe(b,h=>{r()&&h(w)})}z(e,n)}var Cl=F('');function ca(e,t){ke(t,!0);let s=_e(t,"default",3,""),a=_e(t,"cssVar",3,""),r=_e(t,"description",3,""),n=_e(t,"mono",3,!1),l=_e(t,"width",3,"320px");const o=j(()=>H[t.section]?.[t.fieldKey]===void 0||H[t.section]?.[t.fieldKey]===null?"":String(H[t.section][t.fieldKey]));function c(d){Ss(t.section,t.fieldKey,d.currentTarget.value)}ba(e,{get label(){return t.label},get cssVar(){return a()},get fieldId(){return t.fieldKey},get description(){return r()},children:(d,_)=>{var v=Cl();let u,m;q(b=>{Q(v,"id",t.fieldKey),u=rt(v,1,"text svelte-j8yw6l",null,u,{mono:n()}),oa(v,i(o)),Q(v,"placeholder",b),m=ve(v,"",m,{width:l()})},[()=>String(s())]),he("input",v,c),z(d,v)},$$slots:{default:!0}}),Se()}De(["input"]);var zl=F(' '),Al=F(' ',1);function ut(e,t){ke(t,!0);let s=_e(t,"min",3,void 0),a=_e(t,"max",3,void 0),r=_e(t,"step",3,void 0),n=_e(t,"default",3,""),l=_e(t,"cssVar",3,""),o=_e(t,"unit",3,""),c=_e(t,"description",3,""),d=_e(t,"width",3,"120px");const _=j(()=>H[t.section]?.[t.fieldKey]===void 0||H[t.section]?.[t.fieldKey]===null?"":String(H[t.section][t.fieldKey]));function v(u){Ss(t.section,t.fieldKey,u.currentTarget.value)}ba(e,{get label(){return t.label},get cssVar(){return l()},get fieldId(){return t.fieldKey},get description(){return c()},children:(u,m)=>{var b=Al(),w=yt(b);let h;var y=p(w,2);{var S=$=>{var R=zl(),B=f(R);q(()=>A(B,o())),z($,R)};fe(y,$=>{o()&&$(S)})}q($=>{Q(w,"id",t.fieldKey),Q(w,"min",s()),Q(w,"max",a()),Q(w,"step",r()),oa(w,i(_)),Q(w,"placeholder",$),h=ve(w,"",h,{width:d()})},[()=>String(n())]),he("input",w,v),z(u,b)},$$slots:{default:!0}}),Se()}De(["input"]);var Fl=F('
                            '),Rl=F('
                            '),Ml=F('

                            Display Scale

                            '),Ol=F('

                            Live Scale Preview

                            Text Scale

                            ');function Dl(e,t){ke(t,!0);const s=16,a=360,r=1520;let n=te(r);const o=(ne.defaults?.typography??{}).font_sizes??{};function c(T){const D=H.typography??{},x=o[T]??{},k=D[`size_${T}_min`],P=D[`size_${T}_max`],M=k!==void 0&&k!==""?parseFloat(k):x.min??.75,V=P!==void 0&&P!==""?parseFloat(P):x.max??1;return{min:M,max:V}}const d=j(()=>{const T=Math.max(0,Math.min(1,(i(n)-a)/(r-a))),D={};for(const x of Object.keys(o)){const{min:k,max:P}=c(x),M=k+(P-k)*T,V=M*s;D[x]={sizePx:V,sizeRem:M.toFixed(3)}}return D}),_=["2xs","xs","s","m","l","xl","2xl","3xl","4xl"],v=["display-s","display-m","display-l"],u=j(()=>_.filter(T=>o[T])),m=j(()=>v.filter(T=>o[T]));var b=Ol(),w=f(b),h=p(f(w),2),y=f(h);y.textContent="360px";var S=p(y,2);Q(S,"min",a),Q(S,"max",r);var $=p(S,2);$.textContent="1520px";var R=p($,2),B=f(R),E=p(w,2),C=p(f(E),2);ie(C,16,()=>i(u),T=>T,(T,D)=>{const x=j(()=>i(d)[D]);var k=hr(),P=yt(k);{var M=V=>{var U=Fl(),I=f(U),Y=f(I),G=p(I,2);let ae;var ue=f(G),ce=p(G,2),pe=f(ce);q((ge,N)=>{A(Y,D),ae=ve(G,"",ae,ge),A(ue,D),A(pe,`${i(x).sizeRem??""}rem / ${N??""}px`)},[()=>({"font-size":`${i(x).sizePx.toFixed(1)??""}px`}),()=>i(x).sizePx.toFixed(1)]),z(V,U)};fe(P,V=>{i(x)&&V(M)})}z(T,k)});var O=p(E,2);{var L=T=>{var D=Ml(),x=p(f(D),2);ie(x,16,()=>i(m),k=>k,(k,P)=>{const M=j(()=>i(d)[P]);var V=hr(),U=yt(V);{var I=Y=>{var G=Rl(),ae=f(G),ue=f(ae),ce=p(ae,2);let pe;var ge=f(ce),N=p(ce,2),oe=f(N);q((me,ye)=>{A(ue,P),pe=ve(ce,"",pe,me),A(ge,P),A(oe,`${i(M).sizeRem??""}rem / ${ye??""}px`)},[()=>({"font-size":`${i(M).sizePx.toFixed(1)??""}px`}),()=>i(M).sizePx.toFixed(1)]),z(Y,G)};fe(U,Y=>{i(M)&&Y(I)})}z(k,V)}),z(T,D)};fe(O,T=>{i(m).length>0&&T(L)})}q(()=>A(B,`${i(n)??""}px`)),zt(S,()=>i(n),T=>K(n,T)),z(e,b),Se()}var Pl=F(""),Ll=F(""),Vl=F('
                            '),Il=F('
                            Scale Generator Computes all step min/max values from a modular scale. Click Apply to write them to the fields below.
                            ');function ql(e,t){ke(t,!0);const s=[{label:"Minor Second (1.067)",value:1.067},{label:"Major Second (1.125)",value:1.125},{label:"Minor Third (1.200)",value:1.2},{label:"Major Third (1.250)",value:1.25},{label:"Perfect Fourth (1.333)",value:1.333},{label:"Aug. Fourth (1.414)",value:1.414},{label:"Perfect Fifth (1.500)",value:1.5},{label:"Golden Ratio (1.618)",value:1.618},{label:"Major Sixth (1.667)",value:1.667},{label:"Octave (2.000)",value:2}],a=[{name:"2xs",idx:-4},{name:"xs",idx:-3},{name:"s",idx:-2},{name:"m",idx:0},{name:"l",idx:1},{name:"xl",idx:2},{name:"2xl",idx:3},{name:"3xl",idx:4},{name:"4xl",idx:5},{name:"display-s",idx:5},{name:"display-m",idx:6},{name:"display-l",idx:7}];let r=te(1),n=te(1.25),l=te(1.25),o=te(1.333),c=te(.85);const d=j(()=>a.map(({name:k,idx:P})=>{const V=k.startsWith("display")?i(c):1,U=+(i(r)*V*Math.pow(i(l),P)).toFixed(4),I=+(i(n)*V*Math.pow(i(o),P)).toFixed(4);return{name:k,min:U,max:I}}));function _(){H.typography||(H.typography={});for(const{name:k,min:P,max:M}of i(d))H.typography[`size_${k}_min`]=String(P),H.typography[`size_${k}_max`]=String(M);sr()}var v=Il(),u=p(f(v),2),m=f(u),b=p(f(m),2),w=f(b),h=p(m,2),y=p(f(h),2),S=f(y),$=p(h,2),R=p(f($),2);ie(R,21,()=>s,k=>k.value,(k,P)=>{var M=Pl(),V=f(M),U={};q(()=>{A(V,i(P).label),U!==(U=i(P).value)&&(M.value=(M.__value=i(P).value)??"")}),z(k,M)});var B=p($,2),E=p(f(B),2);ie(E,21,()=>s,k=>k.value,(k,P)=>{var M=Ll(),V=f(M),U={};q(()=>{A(V,i(P).label),U!==(U=i(P).value)&&(M.value=(M.__value=i(P).value)??"")}),z(k,M)});var C=p(B,2),O=p(f(C),2),L=f(O),T=p(u,2);ie(T,21,()=>i(d),({name:k,min:P,max:M})=>k,(k,P)=>{let M=()=>i(P).name,V=()=>i(P).min,U=()=>i(P).max;var I=Vl();let Y;var G=f(I),ae=f(G),ue=p(G,2),ce=f(ue);q((pe,ge,N)=>{Y=rt(I,1,"scale-gen__step svelte-1y8fkhh",null,Y,pe),A(ae,M()),A(ce,`${ge??""} / ${N??""}`)},[()=>({display:M().startsWith("display")}),()=>V().toFixed(3),()=>U().toFixed(3)]),z(k,I)});var D=p(T,2),x=f(D);zt(w,()=>i(r),k=>K(r,k)),zt(S,()=>i(n),k=>K(n,k)),la(R,()=>i(l),k=>K(l,k)),la(E,()=>i(o),k=>K(o,k)),zt(L,()=>i(c),k=>K(c,k)),he("click",x,_),z(e,v),Se()}De(["click"]);var Nl=F('
                            '),Bl=F('

                            Additional Font Families

                            Scale Multipliers

                            ',1),Kl=F('

                            Font Families

                            Font Size Scale

                            Min and max values in rem for fluid type scaling via clamp().

                            ');function Hl(e,t){ke(t,!0);const s="typography",a=ne.defaults?.[s]??{},r=a.font_families??{},n=a.font_sizes??{},l=h=>h.charAt(0).toUpperCase()+h.slice(1),o=["body","heading"],c=Object.fromEntries(Object.entries(r).filter(([h])=>o.includes(h))),d=Object.fromEntries(Object.entries(r).filter(([h])=>!o.includes(h)));var _=Kl(),v=p(f(_),2);ie(v,21,()=>Object.entries(c),([h,y])=>h,(h,y)=>{var S=j(()=>ot(i(y),2));let $=()=>i(S)[0],R=()=>i(S)[1];{let B=j(()=>`font_${$()}`),E=j(()=>l($())),C=j(()=>`--sf-font-${$()}`);ca(h,{section:s,get fieldKey(){return i(B)},get label(){return i(E)},get default(){return R()},get cssVar(){return i(C)},width:"420px"})}});var u=p(v,6);ql(u,{});var m=p(u,2);ie(m,21,()=>Object.entries(n),([h,y])=>h,(h,y)=>{var S=j(()=>ot(i(y),2));let $=()=>i(S)[0],R=()=>i(S)[1];var B=Nl(),E=f(B),C=f(E),O=f(C),L=p(C,2),T=f(L),D=p(E,2),x=f(D);{let P=j(()=>`size_${$()}_min`);ut(x,{section:s,get fieldKey(){return i(P)},label:"Min",min:0,step:.01,get default(){return R().min},width:"80px"})}var k=p(x,2);{let P=j(()=>`size_${$()}_max`);ut(k,{section:s,get fieldKey(){return i(P)},label:"Max",min:0,step:.01,get default(){return R().max},width:"80px"})}q(()=>{A(O,$()),A(T,`--sf-text-${$()??""}`)}),z(h,B)});var b=p(m,2);Dl(b,{});var w=p(b,2);ma(w,{children:(h,y)=>{var S=Bl(),$=p(yt(S),2);ie($,21,()=>Object.entries(d),([C,O])=>C,(C,O)=>{var L=j(()=>ot(i(O),2));let T=()=>i(L)[0],D=()=>i(L)[1];{let x=j(()=>`font_${T()}`),k=j(()=>l(T())),P=j(()=>`--sf-font-${T()}`);ca(C,{section:s,get fieldKey(){return i(x)},get label(){return i(k)},get default(){return D()},get cssVar(){return i(P)},width:"420px"})}});var R=p($,4),B=f(R);{let C=j(()=>a.scale_multipliers?.text_scale??1);ut(B,{section:s,fieldKey:"text_scale",label:"Text Scale",min:0,step:.05,get default(){return i(C)},cssVar:"--sf-text-scale"})}var E=p(B,2);{let C=j(()=>a.scale_multipliers?.text_display_scale??1);ut(E,{section:s,fieldKey:"text_display_scale",label:"Display Scale",min:0,step:.05,get default(){return i(C)},cssVar:"--sf-text-display-scale"})}z(h,S)},$$slots:{default:!0}}),z(e,_),Se()}var Ul=F('
                            '),Gl=F('

                            Live Scale Preview

                            Card heading
                            ');function Wl(e,t){ke(t,!0);const s=360,a=1440;let r=te(a);const n=ne.defaults?.spacing??{},l=n.space_sizes??{};function o(I){const Y=H.spacing??{},G=l[I]??{},ae=Y[`space_${I}_min`],ue=Y[`space_${I}_max`],ce=ae!==void 0&&ae!==""?parseFloat(ae):G.min??1,pe=ue!==void 0&&ue!==""?parseFloat(ue):G.max??1;return{min:ce,max:pe}}const c=j(()=>{const I=parseFloat(H.spacing?.space_scale??n.space_scale??1)||1,Y=Math.max(0,Math.min(1,(i(r)-s)/(a-s))),G=["2xs","xs","s","m","l","xl","2xl","3xl","4xl"],ae=o("4xl").max*I;return G.map(ue=>{const{min:ce,max:pe}=o(ue),ge=(ce+(pe-ce)*Y)*I,N=ge/ae*100;return{name:ue,sizeRem:ge.toFixed(3),barPct:Math.min(N,100)}})}),d=j(()=>{const I=parseFloat(H.spacing?.space_scale??n.space_scale??1)||1,Y=Math.max(0,Math.min(1,(i(r)-s)/(a-s))),G=ae=>{const{min:ue,max:ce}=o(ae);return((ue+(ce-ue)*Y)*I).toFixed(3)};return{xs:G("xs"),s:G("s"),m:G("m"),l:G("l")}});var _=Gl(),v=f(_),u=p(f(v),2),m=f(u);m.textContent="360px";var b=p(m,2);Q(b,"min",s),Q(b,"max",a);var w=p(b,2);w.textContent="1440px";var h=p(w,2),y=f(h),S=p(v,2);ie(S,21,()=>i(c),I=>I.name,(I,Y)=>{var G=Ul(),ae=f(G),ue=f(ae),ce=p(ae,2),pe=f(ce);let ge;var N=p(ce,2),oe=f(N);q(()=>{A(ue,`--sf-space-${i(Y).name??""}`),ge=ve(pe,"",ge,{width:`${i(Y).barPct??""}%`}),A(oe,`${i(Y).sizeRem??""}rem`)}),z(I,G)});var $=p(S,2),R=f($),B=f(R),E=p(R,2);let C;var O=f(E);let L;var T=p(f(O),2),D=p(f(T),2),x=f(D),k=p(O,2),P=f(k),M=p(k,2);let V;var U=p(f(M),2);ve(U,"",{},{width:"3rem"}),q(()=>{A(y,`${i(r)??""}px`),A(B,`Container context at ${i(r)??""}px`),C=ve(E,"",C,{padding:`${i(d).m??""}rem`,gap:`${i(d).s??""}rem`}),L=ve(O,"",L,{gap:`${i(d).s??""}rem`}),A(x,`padding: ${i(d).m??""}rem`),A(P,`Body section · gap between rows: ${i(d).s??""}rem`),V=ve(M,"",V,{gap:`${i(d).xs??""}rem`,"padding-top":`${i(d).xs??""}rem`})}),zt(b,()=>i(r),I=>K(r,I)),z(e,_),Se()}var Yl=F('
                            '),Xl=F('

                            Space Aliases

                            ',1),Zl=F(`

                            Spacing

                            Space Scale Steps

                            Min and max values in rem for fluid spacing via clamp(). - Leave both fields blank to use the framework defaults.

                            `);function Jl(e,t){ke(t,!0);const s="spacing",a=ne.defaults?.[s]??{},r=a.space_sizes??{},n=[{key:"gutter",label:"Gutter",cssVar:"--sf-space-gutter"},{key:"gap",label:"Gap",cssVar:"--sf-gap"},{key:"content_gap",label:"Content Gap",cssVar:"--sf-content-gap"},{key:"component_pad",label:"Component Pad",cssVar:"--sf-component-pad"},{key:"section_pad",label:"Section Pad",cssVar:"--sf-section-pad"}];var l=Zl(),o=p(f(l),2),c=f(o);{let u=j(()=>a.space_scale??1);ut(c,{section:s,fieldKey:"space_scale",label:"Space Scale",min:0,step:.05,get default(){return i(u)},cssVar:"--sf-space-scale"})}var d=p(o,6);ie(d,21,()=>Object.entries(r),([u,m])=>u,(u,m)=>{var b=j(()=>ot(i(m),2));let w=()=>i(b)[0],h=()=>i(b)[1];var y=Yl(),S=f(y),$=f(S),R=f($),B=p($,2),E=f(B),C=p(S,2),O=f(C);{let T=j(()=>`space_${w()}_min`);ut(O,{section:s,get fieldKey(){return i(T)},label:"Min",min:0,step:.01,get default(){return h().min},width:"80px"})}var L=p(O,2);{let T=j(()=>`space_${w()}_max`);ut(L,{section:s,get fieldKey(){return i(T)},label:"Max",min:0,step:.01,get default(){return h().max},width:"80px"})}q(()=>{A(R,w()),A(E,`--sf-space-${w()??""}`)}),z(u,y)});var _=p(d,2);Wl(_,{});var v=p(_,2);ma(v,{children:(u,m)=>{var b=Xl(),w=p(yt(b),2);ie(w,21,()=>n,h=>h.key,(h,y)=>{{let S=j(()=>a[i(y).key]??"");ca(h,{section:s,get fieldKey(){return i(y).key},get label(){return i(y).label},get default(){return i(S)},get cssVar(){return i(y).cssVar},mono:!0})}}),z(u,b)},$$slots:{default:!0}}),z(e,l),Se()}var Ql=F(' '),eo=F(' ',1);function cs(e,t){ke(t,!0);let s=_e(t,"cssVar",3,""),a=_e(t,"unit",3,""),r=_e(t,"description",3,"");const n=j(()=>H[t.section]?.[t.fieldKey]===void 0||H[t.section]?.[t.fieldKey]===null?"":String(H[t.section][t.fieldKey])),l=j(()=>i(n)===""||Number.isNaN(Number(i(n)))?Number(t.default):Number(i(n)));function o(d){Ss(t.section,t.fieldKey,d.currentTarget.value)}function c(d){Ss(t.section,t.fieldKey,d.currentTarget.value)}ba(e,{get label(){return t.label},get cssVar(){return s()},get fieldId(){return t.fieldKey},get description(){return r()},children:(d,_)=>{var v=eo(),u=yt(v),m=p(u,2),b=p(m,2);{var w=h=>{var y=Ql(),S=f(y);q(()=>A(S,a())),z(h,y)};fe(b,h=>{a()&&h(w)})}q(h=>{Q(u,"min",t.min),Q(u,"max",t.max),Q(u,"step",t.step),oa(u,i(l)),Q(m,"id",t.fieldKey),Q(m,"min",t.min),Q(m,"max",t.max),Q(m,"step",t.step),oa(m,i(n)),Q(m,"placeholder",h)},[()=>String(t.default)]),he("input",u,o),he("input",m,c),z(d,v)},$$slots:{default:!0}}),Se()}De(["input"]);var to=F(""),so=F('');function ao(e,t){ke(t,!0);let s=_e(t,"options",19,()=>[]),a=_e(t,"default",3,""),r=_e(t,"cssVar",3,""),n=_e(t,"description",3,"");const l=j(()=>s().map(d=>typeof d=="string"?{value:d,label:d}:d)),o=j(()=>H[t.section]?.[t.fieldKey]===void 0||H[t.section]?.[t.fieldKey]===null?"":String(H[t.section][t.fieldKey]));function c(d){Ss(t.section,t.fieldKey,d.currentTarget.value)}ba(e,{get label(){return t.label},get cssVar(){return r()},get fieldId(){return t.fieldKey},get description(){return n()},children:(d,_)=>{var v=so(),u=f(v),m=f(u);u.value=u.__value="";var b=p(u);ie(b,17,()=>i(l),h=>h.value,(h,y)=>{var S=to(),$=f(S),R={};q(()=>{A($,i(y).label),R!==(R=i(y).value)&&(S.value=(S.__value=i(y).value)??"")}),z(h,S)});var w;wn(v),q(()=>{Q(v,"id",t.fieldKey),A(m,`Default (${a()??""})`),w!==(w=i(o))&&(v.value=(v.__value=i(o))??"",tr(v,i(o)))}),he("change",v,c),z(d,v)},$$slots:{default:!0}}),Se()}De(["change"]);var ro=F('
                            '),no=F('
                            '),io=F('
                            '),lo=F('

                            Shadow

                            Motion — Durations

                            Base duration values in milliseconds.

                            Z-Index

                            Z-index layer values for stacking context management.

                            Contrast

                            ',1),oo=F('

                            Radius

                            Shadows

                            Motion

                            Accessibility

                            ');function co(e,t){ke(t,!0);const s=ne.defaults?.radius??{},a=ne.defaults?.shadows??{},r=ne.defaults?.motion??{},n=ne.defaults?.zindex??{},l=ne.defaults?.contrast??{},o=r.durations??{},c=N=>N.charAt(0).toUpperCase()+N.slice(1),d=[0,2,4,8,12,16,24,9999],_=["none","xs","s","m","l","xl","2xl","full"],v=j(()=>parseFloat(H.radius?.radius_scale??ne.defaults?.radius?.radius_scale??1)),u=j(()=>d.map(N=>N*i(v))),m=j(()=>parseFloat(H.shadows?.shadow_strength??a.shadow_strength??.08)),b=j(()=>parseFloat(H.motion?.motion_scale??r.motion_scale??1)||1),w=["instant","fast","normal","slow","slower"],h=j(()=>w.map(N=>{const oe=H.motion?.[`duration_${N}`],me=parseFloat(oe!==void 0&&oe!==""?oe:o[N]??0);return{name:N,ms:Math.round(me*i(b))}})),y=(N,oe)=>parseFloat(N!==void 0&&N!==""?N:oe),S=j(()=>y(H.contrast?.focus_ring_width,l.focus_ring_width??2)),$=j(()=>y(H.contrast?.focus_ring_offset,l.focus_ring_offset??2)),R=j(()=>H.contrast?.focus_ring_style??l.focus_ring_style??"solid"),B=j(()=>[{label:"xs",shadow:`0 1px 2px 0 rgba(0,0,0,${(i(m)*.5).toFixed(4)})`},{label:"s",shadow:`0 1px 2px 0 rgba(0,0,0,${(i(m)*.5).toFixed(4)}), 0 2px 6px 0 rgba(0,0,0,${i(m).toFixed(4)})`},{label:"m",shadow:`0 1px 3px 0 rgba(0,0,0,${(i(m)*.5).toFixed(4)}), 0 4px 12px 0 rgba(0,0,0,${(i(m)*2).toFixed(4)})`},{label:"l",shadow:`0 2px 4px 0 rgba(0,0,0,${(i(m)*.5).toFixed(4)}), 0 8px 24px 0 rgba(0,0,0,${(i(m)*3).toFixed(4)})`},{label:"xl",shadow:`0 2px 8px 0 rgba(0,0,0,${(i(m)*.5).toFixed(4)}), 0 12px 36px 0 rgba(0,0,0,${(i(m)*3.5).toFixed(4)})`},{label:"glow",shadow:`0 0 15px 2px rgba(74,48,208,${Math.min(i(m)*2,.7).toFixed(4)})`}]);var E=oo(),C=p(f(E),2),O=f(C);{let N=j(()=>s.radius_scale??1);ut(O,{section:"radius",fieldKey:"radius_scale",label:"Radius Scale",min:0,step:.1,get default(){return i(N)},cssVar:"--sf-radius-scale"})}var L=p(C,2);ie(L,23,()=>i(u),(N,oe)=>_[oe],(N,oe,me)=>{var ye=ro(),Ce=f(ye);let ze;var Re=p(Ce,2),re=f(Re);q(()=>{ze=ve(Ce,"",ze,{"border-radius":d[i(me)]===9999?"9999px":`${i(oe)}px`}),A(re,_[i(me)])}),z(N,ye)});var T=p(L,4),D=f(T);{let N=j(()=>a.shadow_strength??.08);cs(D,{section:"shadows",fieldKey:"shadow_strength",label:"Shadow Strength",description:"Base opacity for shadow layers (0–1).",min:0,max:1,step:.01,get default(){return i(N)},cssVar:"--sf-shadow-strength"})}var x=p(T,2);ie(x,21,()=>i(B),N=>N.label,(N,oe)=>{var me=no(),ye=f(me);let Ce;var ze=f(ye);q(()=>{Ce=ve(ye,"",Ce,{"box-shadow":i(oe).shadow}),A(ze,i(oe).label)}),z(N,me)});var k=p(x,4),P=f(k);{let N=j(()=>r.motion_scale??1);ut(P,{section:"motion",fieldKey:"motion_scale",label:"Motion Scale",min:0,step:.1,get default(){return i(N)},cssVar:"--sf-motion-scale"})}var M=p(k,2);ie(M,21,()=>i(h),N=>N.name,(N,oe)=>{var me=io(),ye=f(me),Ce=f(ye),ze=p(ye,2),Re=f(ze);let re;var we=p(ze,2),be=f(we);q(()=>{A(Ce,i(oe).name),re=ve(Re,"",re,{"animation-duration":`${i(oe).ms??""}ms`}),A(be,`${i(oe).ms??""}ms`)}),z(N,me)});var V=p(M,4),U=f(V);{let N=j(()=>l.focus_ring_width??2);cs(U,{section:"contrast",fieldKey:"focus_ring_width",label:"Focus Ring Width",min:0,max:8,step:.5,get default(){return i(N)},cssVar:"--sf-focus-ring-width",unit:"px"})}var I=p(U,2);{let N=j(()=>l.focus_ring_offset??2);cs(I,{section:"contrast",fieldKey:"focus_ring_offset",label:"Focus Ring Offset",min:0,max:8,step:.5,get default(){return i(N)},cssVar:"--sf-focus-ring-offset",unit:"px"})}var Y=p(I,2);{let N=j(()=>l.focus_ring_style??"solid");ao(Y,{section:"contrast",fieldKey:"focus_ring_style",label:"Focus Ring Style",options:["solid","dashed","dotted","double","none"],get default(){return i(N)},cssVar:"--sf-focus-ring-style"})}var G=p(V,2),ae=f(G);let ue;var ce=p(ae,2),pe=f(ce),ge=p(G,2);ma(ge,{children:(N,oe)=>{var me=lo(),ye=p(yt(me),2),Ce=f(ye);{let xe=j(()=>a.glow_color??"");ca(Ce,{section:"shadows",fieldKey:"glow_color",label:"Glow Color",get default(){return i(xe)},cssVar:"--sf-shadow-glow-color",mono:!0})}var ze=p(ye,6);ie(ze,21,()=>Object.entries(o),([xe,pt])=>xe,(xe,pt)=>{var xt=j(()=>ot(i(pt),2));let it=()=>i(xt)[0],ls=()=>i(xt)[1];{let Ee=j(()=>`duration_${it()}`),kt=j(()=>c(it())),St=j(()=>`--sf-duration-${it()}`);ut(xe,{section:"motion",get fieldKey(){return i(Ee)},get label(){return i(kt)},min:0,step:10,get default(){return ls()},get cssVar(){return i(St)},unit:"ms"})}});var Re=p(ze,6);ie(Re,21,()=>Object.entries(n),([xe,pt])=>xe,(xe,pt)=>{var xt=j(()=>ot(i(pt),2));let it=()=>i(xt)[0],ls=()=>i(xt)[1];{let Ee=j(()=>c(it())),kt=j(()=>`--sf-z-${it()}`);ut(xe,{section:"zindex",get fieldKey(){return it()},get label(){return i(Ee)},step:1,get default(){return ls()},get cssVar(){return i(kt)}})}});var re=p(Re,4),we=f(re);{let xe=j(()=>l.contrast_bias??0);cs(we,{section:"contrast",fieldKey:"contrast_bias",label:"Contrast Bias",description:"Shifts derived shades up (positive) or down (negative).",min:-.2,max:.2,step:.01,get default(){return i(xe)},cssVar:"--sf-contrast-bias"})}var be=p(we,2);{let xe=j(()=>l.contrast_threshold??.6);cs(be,{section:"contrast",fieldKey:"contrast_threshold",label:"Contrast Threshold",description:"Lightness threshold for text-on-color (white vs. black).",min:0,max:1,step:.01,get default(){return i(xe)},cssVar:"--sf-contrast-threshold"})}var Ke=p(be,2);{let xe=j(()=>l.opacity_disabled??.45);cs(Ke,{section:"contrast",fieldKey:"opacity_disabled",label:"Disabled Opacity",min:0,max:1,step:.01,get default(){return i(xe)},cssVar:"--sf-opacity-disabled"})}z(N,me)},$$slots:{default:!0}}),q(()=>{ue=ve(ae,"",ue,{"--fp-width":`${i(S)??""}px`,"--fp-offset":`${i($)??""}px`,"--fp-style":i(R)}),A(pe,`${i(S)??""}px ${i(R)??""} · ${i($)??""}px offset`)}),z(e,E),Se()}var fo=F('
                          • '),uo=F('
                              '),vo=F('
                              '),po=F(`

                              All --sf-* custom properties declared in the active SLASHED bundle, - grouped by category.

                              `);function ho(e,t){ke(t,!0);const s=ne.inventory?.variables??[],a={color:"Colors",text:"Typography",font:"Typography",leading:"Typography",tracking:"Typography",body:"Typography",heading:"Typography",h1:"Typography",h2:"Typography",h3:"Typography",h4:"Typography",h5:"Typography",h6:"Typography",prose:"Typography",code:"Typography",optical:"Typography",line:"Typography",space:"Spacing",gap:"Spacing",gutter:"Spacing",component:"Spacing",section:"Spacing",flow:"Spacing",safe:"Spacing",header:"Spacing",sticky:"Spacing",size:"Sizing",aspect:"Sizing",ratio:"Sizing",touch:"Sizing",container:"Layout",stack:"Layout",cluster:"Layout",sidebar:"Layout",switcher:"Layout",grid:"Layout",cover:"Layout",frame:"Layout",reel:"Layout",imposter:"Layout",bento:"Layout",box:"Layout",center:"Layout",content:"Layout",breakout:"Layout",divider:"Layout",field:"Layout",border:"Borders",stroke:"Borders",radius:"Radius",shadow:"Shadows",blur:"Effects",opacity:"Effects",gradient:"Effects",mask:"Effects",perspective:"Effects",drop:"Effects",contrast:"Effects",duration:"Motion",ease:"Motion",transition:"Motion",motion:"Motion",animation:"Motion",icon:"Icons",z:"Z-Index",is:"States",current:"States",focus:"Focus",caret:"Focus",scroll:"Scroll",scrollbar:"Scroll",print:"Print",truncate:"Misc"},r=["Colors","Typography","Spacing","Sizing","Layout","Borders","Radius","Shadows","Effects","Motion","Icons","Z-Index","States","Focus","Scroll","Print","Misc"];function n(b){let w=b;w.startsWith("--sf-")&&(w=w.slice(5));const h=w.indexOf("-"),y=h===-1?w:w.slice(0,h);return a[y]||"Misc"}function l(b){const w={};for(const y of b){const S=n(y);w[S]||(w[S]=[]),w[S].push(y)}const h=[];for(const y of r)w[y]?.length&&(w[y].sort(),h.push({category:y,items:w[y]}));for(const y of Object.keys(w))!r.includes(y)&&w[y]?.length&&(w[y].sort(),h.push({category:y,items:w[y]}));return h}const o=l(s);let c=Ne({});function d(b){c[b]=!c[b]}var _=po(),v=f(_),u=f(v),m=p(v,4);ie(m,17,()=>o,({category:b,items:w})=>b,(b,w)=>{let h=()=>i(w).category,y=()=>i(w).items;var S=vo(),$=f(S),R=f($),B=f(R),E=p(R,2),C=f(E),O=p(E,2),L=f(O),T=p($,2);{var D=x=>{var k=uo();ie(k,20,y,P=>P,(P,M)=>{var V=fo(),U=f(V),I=f(U);q(()=>A(I,M)),z(P,V)}),z(x,k)};fe(T,x=>{c[h()]&&x(D)})}q(()=>{Q($,"aria-expanded",c[h()]?"true":"false"),A(B,c[h()]?"▼":"▶"),A(C,h()),A(L,`(${y().length??""})`)}),he("click",$,()=>d(h())),z(b,S)}),q(()=>A(u,`CSS Variables (${s.length??""})`)),z(e,_),Se()}De(["click"]);var _o=F('
                            • '),go=F('
                                '),mo=F('
                              • '),bo=F('
                                  '),yo=F('

                                  All utility and state classes declared in the active SLASHED bundle.

                                  ');function wo(e,t){ke(t,!0);const s=ne.inventory?.sf_classes??[],a=ne.inventory?.is_classes??[];let r=te(!1),n=te(!1);var l=yo(),o=f(l),c=f(o),d=p(o,4),_=f(d),v=f(_),u=f(v),m=p(v,4),b=f(m),w=p(_,2);{var h=L=>{var T=go();ie(T,20,()=>s,D=>D,(D,x)=>{var k=_o(),P=f(k),M=f(P);q(()=>A(M,`.${x??""}`)),z(D,k)}),z(L,T)};fe(w,L=>{i(r)&&L(h)})}var y=p(d,2),S=f(y),$=f(S),R=f($),B=p($,4),E=f(B),C=p(S,2);{var O=L=>{var T=bo();ie(T,20,()=>a,D=>D,(D,x)=>{var k=mo(),P=f(k),M=f(P);q(()=>A(M,`.${x??""}`)),z(D,k)}),z(L,T)};fe(C,L=>{i(n)&&L(O)})}q(()=>{A(c,`Registered Classes (${s.length+a.length})`),Q(_,"aria-expanded",i(r)?"true":"false"),A(u,i(r)?"▼":"▶"),A(b,`(${s.length??""})`),Q(S,"aria-expanded",i(n)?"true":"false"),A(R,i(n)?"▼":"▶"),A(E,`(${a.length??""})`)}),he("click",_,()=>K(r,!i(r))),he("click",S,()=>K(n,!i(n))),z(e,l),Se()}De(["click"]);async function ya(e,t){const{url:s,nonce:a}=ne.rest;if(!s)return console.info("[slashed-admin] (dev) would POST",e,t),{ok:!0,dev:!0};const r=await fetch(s+e,{method:"POST",credentials:"same-origin",headers:{"Content-Type":"application/json","X-WP-Nonce":a},body:JSON.stringify(t)});if(!r.ok){const n=await r.text();throw new Error(n||`HTTP ${r.status}`)}return r.json()}function wr(e,t){return ya("/tokens",{section:e,values:t})}function xr(e){return ya("/tokens/reset",{section:e})}function xo(e){return ya("/settings",e)}async function ko(){const{url:e,nonce:t}=ne.rest;if(!e)return console.info("[slashed-admin] (dev) would GET /tokens/export"),{schema_version:"1",tokens:{},plugin_settings:{},dev:!0};const s=await fetch(e+"/tokens/export",{credentials:"same-origin",headers:{"X-WP-Nonce":t}});if(!s.ok)throw new Error(await s.text()||`HTTP ${s.status}`);return s.json()}function So(e){return ya("/tokens/import",e)}var Eo=F('Saved'),jo=F(' '),To=F(`

                                  Bundle Info

                                  The SLASHED CSS bundle is loaded automatically by the plugin. The inventory + straight into the framework as the source of the brand scale.

                                  `);function Sl(e,t){ke(t,!0);const s=re.defaults?.colors??{},a=_=>_.charAt(0).toUpperCase()+_.slice(1),r=Object.entries(s.brand??{}),n=j(()=>fl("colors","dark_overrides_enabled")!=="0");function l(){Ss("colors","dark_overrides_enabled",i(n)?"0":"1")}var o=kl(),c=p(f(o),4);ne(c,21,()=>r,([_,v])=>_,(_,v)=>{var u=j(()=>ot(i(v),2));let m=()=>i(u)[0],b=()=>i(u)[1];{let w=j(()=>`brand_${m()}`),h=j(()=>a(m())),y=j(()=>s.brand_hex_hints?.[m()]??""),S=j(()=>`--sf-color-${m()}-light`);Gs(_,{get storeKey(){return i(w)},get label(){return i(h)},get hexHint(){return i(y)},get rawHint(){return b()},get cssVar(){return i(S)}})}});var d=p(c,2);ma(d,{children:(_,v)=>{var u=xl(),m=p(yt(u),2);ne(m,21,()=>Object.entries(s.status??{}),([E,C])=>E,(E,C)=>{var O=j(()=>ot(i(C),2));let L=()=>i(O)[0],T=()=>i(O)[1];{let D=j(()=>`status_${L()}`),x=j(()=>a(L())),k=j(()=>s.status_hex_hints?.[L()]??""),P=j(()=>`--sf-color-${L()}-light`);Gs(E,{get storeKey(){return i(D)},get label(){return i(x)},get hexHint(){return i(k)},get rawHint(){return T()},get cssVar(){return i(P)}})}});var b=p(m,2),w=f(b),h=f(w);let y;var S=p(h,2),$=f(S),R=p(b,2);{var B=E=>{var C=wl(),O=p(yt(C),2);ne(O,21,()=>Object.entries(s.brand_dark??s.brand??{}),([T])=>T,(T,D)=>{var x=j(()=>ot(i(D),1));let k=()=>i(x)[0];{let P=j(()=>`brand_dark_${k()}`),M=j(()=>a(k())),V=j(()=>s.brand_dark_hex_hints?.[k()]??""),U=j(()=>s.brand_dark?.[k()]??""),I=j(()=>`--sf-color-${k()}-dark`);Gs(T,{get storeKey(){return i(P)},get label(){return i(M)},get hexHint(){return i(V)},get rawHint(){return i(U)},get cssVar(){return i(I)}})}});var L=p(O,4);ne(L,21,()=>Object.entries(s.status_dark??s.status??{}),([T])=>T,(T,D)=>{var x=j(()=>ot(i(D),1));let k=()=>i(x)[0];{let P=j(()=>`status_dark_${k()}`),M=j(()=>a(k())),V=j(()=>s.status_dark_hex_hints?.[k()]??""),U=j(()=>s.status_dark?.[k()]??""),I=j(()=>`--sf-color-${k()}-dark`);Gs(T,{get storeKey(){return i(P)},get label(){return i(M)},get hexHint(){return i(V)},get rawHint(){return i(U)},get cssVar(){return i(I)}})}}),z(E,C)};fe(R,E=>{i(n)&&E(B)})}q(()=>{y=rt(h,1,"dark-toggle-btn svelte-1vle0rm",null,y,{on:i(n)}),Q(h,"aria-pressed",i(n)),A($,i(n)?"Active — custom values override auto-derivation":"Off — dark mode auto-derived from light source colors")}),he("click",h,l),z(_,u)},$$slots:{default:!0}}),z(e,o),Se()}De(["click"]);var El=F(''),jl=F(' '),Tl=F(' '),$l=F('

                                  '),Cl=F('
                                  ');function ba(e,t){let s=_e(t,"cssVar",3,""),a=_e(t,"fieldId",3,""),r=_e(t,"description",3,"");var n=Cl(),l=f(n),o=f(l);{var c=h=>{var y=El(),S=f(y);q(()=>{Q(y,"for",a()),A(S,t.label)}),z(h,y)},d=h=>{var y=jl(),S=f(y);q(()=>A(S,t.label)),z(h,y)};fe(o,h=>{a()?h(c):h(d,-1)})}var _=p(o,2);{var v=h=>{var y=Tl(),S=f(y);q(()=>A(S,s())),z(h,y)};fe(_,h=>{s()&&h(v)})}var u=p(l,2),m=f(u);wn(m,()=>t.children??Cr);var b=p(m,2);{var w=h=>{var y=$l(),S=f(y);q(()=>A(S,r())),z(h,y)};fe(b,h=>{r()&&h(w)})}z(e,n)}var zl=F('');function ca(e,t){ke(t,!0);let s=_e(t,"default",3,""),a=_e(t,"cssVar",3,""),r=_e(t,"description",3,""),n=_e(t,"mono",3,!1),l=_e(t,"width",3,"320px");const o=j(()=>H[t.section]?.[t.fieldKey]===void 0||H[t.section]?.[t.fieldKey]===null?"":String(H[t.section][t.fieldKey]));function c(d){Ss(t.section,t.fieldKey,d.currentTarget.value)}ba(e,{get label(){return t.label},get cssVar(){return a()},get fieldId(){return t.fieldKey},get description(){return r()},children:(d,_)=>{var v=zl();let u,m;q(b=>{Q(v,"id",t.fieldKey),u=rt(v,1,"text svelte-j8yw6l",null,u,{mono:n()}),oa(v,i(o)),Q(v,"placeholder",b),m=ve(v,"",m,{width:l()})},[()=>String(s())]),he("input",v,c),z(d,v)},$$slots:{default:!0}}),Se()}De(["input"]);var Al=F(' '),Fl=F(' ',1);function ut(e,t){ke(t,!0);let s=_e(t,"min",3,void 0),a=_e(t,"max",3,void 0),r=_e(t,"step",3,void 0),n=_e(t,"default",3,""),l=_e(t,"cssVar",3,""),o=_e(t,"unit",3,""),c=_e(t,"description",3,""),d=_e(t,"width",3,"120px");const _=j(()=>H[t.section]?.[t.fieldKey]===void 0||H[t.section]?.[t.fieldKey]===null?"":String(H[t.section][t.fieldKey]));function v(u){Ss(t.section,t.fieldKey,u.currentTarget.value)}ba(e,{get label(){return t.label},get cssVar(){return l()},get fieldId(){return t.fieldKey},get description(){return c()},children:(u,m)=>{var b=Fl(),w=yt(b);let h;var y=p(w,2);{var S=$=>{var R=Al(),B=f(R);q(()=>A(B,o())),z($,R)};fe(y,$=>{o()&&$(S)})}q($=>{Q(w,"id",t.fieldKey),Q(w,"min",s()),Q(w,"max",a()),Q(w,"step",r()),oa(w,i(_)),Q(w,"placeholder",$),h=ve(w,"",h,{width:d()})},[()=>String(n())]),he("input",w,v),z(u,b)},$$slots:{default:!0}}),Se()}De(["input"]);var Rl=F('
                                  '),Ml=F('
                                  '),Ol=F('

                                  Display Scale

                                  '),Dl=F('

                                  Live Scale Preview

                                  Text Scale

                                  ');function Pl(e,t){ke(t,!0);const s=16,a=360,r=1520;let n=te(r);const o=(re.defaults?.typography??{}).font_sizes??{};function c(T){const D=H.typography??{},x=o[T]??{},k=D[`size_${T}_min`],P=D[`size_${T}_max`],M=k!==void 0&&k!==""?parseFloat(k):x.min??.75,V=P!==void 0&&P!==""?parseFloat(P):x.max??1;return{min:M,max:V}}const d=j(()=>{const T=Math.max(0,Math.min(1,(i(n)-a)/(r-a))),D={};for(const x of Object.keys(o)){const{min:k,max:P}=c(x),M=k+(P-k)*T,V=M*s;D[x]={sizePx:V,sizeRem:M.toFixed(3)}}return D}),_=["2xs","xs","s","m","l","xl","2xl","3xl","4xl"],v=["display-s","display-m","display-l"],u=j(()=>_.filter(T=>o[T])),m=j(()=>v.filter(T=>o[T]));var b=Dl(),w=f(b),h=p(f(w),2),y=f(h);y.textContent="360px";var S=p(y,2);Q(S,"min",a),Q(S,"max",r);var $=p(S,2);$.textContent="1520px";var R=p($,2),B=f(R),E=p(w,2),C=p(f(E),2);ne(C,16,()=>i(u),T=>T,(T,D)=>{const x=j(()=>i(d)[D]);var k=_r(),P=yt(k);{var M=V=>{var U=Rl(),I=f(U),Y=f(I),G=p(I,2);let ae;var ue=f(G),ce=p(G,2),pe=f(ce);q((ge,N)=>{A(Y,D),ae=ve(G,"",ae,ge),A(ue,D),A(pe,`${i(x).sizeRem??""}rem / ${N??""}px`)},[()=>({"font-size":`${i(x).sizePx.toFixed(1)??""}px`}),()=>i(x).sizePx.toFixed(1)]),z(V,U)};fe(P,V=>{i(x)&&V(M)})}z(T,k)});var O=p(E,2);{var L=T=>{var D=Ol(),x=p(f(D),2);ne(x,16,()=>i(m),k=>k,(k,P)=>{const M=j(()=>i(d)[P]);var V=_r(),U=yt(V);{var I=Y=>{var G=Ml(),ae=f(G),ue=f(ae),ce=p(ae,2);let pe;var ge=f(ce),N=p(ce,2),le=f(N);q((me,ye)=>{A(ue,P),pe=ve(ce,"",pe,me),A(ge,P),A(le,`${i(M).sizeRem??""}rem / ${ye??""}px`)},[()=>({"font-size":`${i(M).sizePx.toFixed(1)??""}px`}),()=>i(M).sizePx.toFixed(1)]),z(Y,G)};fe(U,Y=>{i(M)&&Y(I)})}z(k,V)}),z(T,D)};fe(O,T=>{i(m).length>0&&T(L)})}q(()=>A(B,`${i(n)??""}px`)),Tt(S,()=>i(n),T=>K(n,T)),z(e,b),Se()}var Ll=F(""),Vl=F(""),Il=F('
                                  '),ql=F('
                                  Scale Generator Computes all step min/max values from a modular scale. Click Apply to write them to the fields below.
                                  ');function Nl(e,t){ke(t,!0);const s=[{label:"Minor Second (1.067)",value:1.067},{label:"Major Second (1.125)",value:1.125},{label:"Minor Third (1.200)",value:1.2},{label:"Major Third (1.250)",value:1.25},{label:"Perfect Fourth (1.333)",value:1.333},{label:"Aug. Fourth (1.414)",value:1.414},{label:"Perfect Fifth (1.500)",value:1.5},{label:"Golden Ratio (1.618)",value:1.618},{label:"Major Sixth (1.667)",value:1.667},{label:"Octave (2.000)",value:2}],a=[{name:"2xs",idx:-4},{name:"xs",idx:-3},{name:"s",idx:-2},{name:"m",idx:0},{name:"l",idx:1},{name:"xl",idx:2},{name:"2xl",idx:3},{name:"3xl",idx:4},{name:"4xl",idx:5},{name:"display-s",idx:5},{name:"display-m",idx:6},{name:"display-l",idx:7}];let r=te(1),n=te(1.25),l=te(1.25),o=te(1.333),c=te(.85);const d=j(()=>a.map(({name:k,idx:P})=>{const V=k.startsWith("display")?i(c):1,U=+(i(r)*V*Math.pow(i(l),P)).toFixed(4),I=+(i(n)*V*Math.pow(i(o),P)).toFixed(4);return{name:k,min:U,max:I}}));function _(){H.typography||(H.typography={});for(const{name:k,min:P,max:M}of i(d))H.typography[`size_${k}_min`]=String(P),H.typography[`size_${k}_max`]=String(M);ar()}var v=ql(),u=p(f(v),2),m=f(u),b=p(f(m),2),w=f(b),h=p(m,2),y=p(f(h),2),S=f(y),$=p(h,2),R=p(f($),2);ne(R,21,()=>s,k=>k.value,(k,P)=>{var M=Ll(),V=f(M),U={};q(()=>{A(V,i(P).label),U!==(U=i(P).value)&&(M.value=(M.__value=i(P).value)??"")}),z(k,M)});var B=p($,2),E=p(f(B),2);ne(E,21,()=>s,k=>k.value,(k,P)=>{var M=Vl(),V=f(M),U={};q(()=>{A(V,i(P).label),U!==(U=i(P).value)&&(M.value=(M.__value=i(P).value)??"")}),z(k,M)});var C=p(B,2),O=p(f(C),2),L=f(O),T=p(u,2);ne(T,21,()=>i(d),({name:k,min:P,max:M})=>k,(k,P)=>{let M=()=>i(P).name,V=()=>i(P).min,U=()=>i(P).max;var I=Il();let Y;var G=f(I),ae=f(G),ue=p(G,2),ce=f(ue);q((pe,ge,N)=>{Y=rt(I,1,"scale-gen__step svelte-1y8fkhh",null,Y,pe),A(ae,M()),A(ce,`${ge??""} / ${N??""}`)},[()=>({display:M().startsWith("display")}),()=>V().toFixed(3),()=>U().toFixed(3)]),z(k,I)});var D=p(T,2),x=f(D);Tt(w,()=>i(r),k=>K(r,k)),Tt(S,()=>i(n),k=>K(n,k)),la(R,()=>i(l),k=>K(l,k)),la(E,()=>i(o),k=>K(o,k)),Tt(L,()=>i(c),k=>K(c,k)),he("click",x,_),z(e,v),Se()}De(["click"]);var Bl=F('
                                  '),Kl=F('

                                  Additional Font Families

                                  Scale Multipliers

                                  ',1),Hl=F('

                                  Font Families

                                  Font Size Scale

                                  Min and max values in rem for fluid type scaling via clamp().

                                  ');function Ul(e,t){ke(t,!0);const s="typography",a=re.defaults?.[s]??{},r=a.font_families??{},n=a.font_sizes??{},l=h=>h.charAt(0).toUpperCase()+h.slice(1),o=["body","heading"],c=Object.fromEntries(Object.entries(r).filter(([h])=>o.includes(h))),d=Object.fromEntries(Object.entries(r).filter(([h])=>!o.includes(h)));var _=Hl(),v=p(f(_),2);ne(v,21,()=>Object.entries(c),([h,y])=>h,(h,y)=>{var S=j(()=>ot(i(y),2));let $=()=>i(S)[0],R=()=>i(S)[1];{let B=j(()=>`font_${$()}`),E=j(()=>l($())),C=j(()=>`--sf-font-${$()}`);ca(h,{section:s,get fieldKey(){return i(B)},get label(){return i(E)},get default(){return R()},get cssVar(){return i(C)},width:"420px"})}});var u=p(v,6);Nl(u,{});var m=p(u,2);ne(m,21,()=>Object.entries(n),([h,y])=>h,(h,y)=>{var S=j(()=>ot(i(y),2));let $=()=>i(S)[0],R=()=>i(S)[1];var B=Bl(),E=f(B),C=f(E),O=f(C),L=p(C,2),T=f(L),D=p(E,2),x=f(D);{let P=j(()=>`size_${$()}_min`);ut(x,{section:s,get fieldKey(){return i(P)},label:"Min",min:0,step:.01,get default(){return R().min},width:"80px"})}var k=p(x,2);{let P=j(()=>`size_${$()}_max`);ut(k,{section:s,get fieldKey(){return i(P)},label:"Max",min:0,step:.01,get default(){return R().max},width:"80px"})}q(()=>{A(O,$()),A(T,`--sf-text-${$()??""}`)}),z(h,B)});var b=p(m,2);Pl(b,{});var w=p(b,2);ma(w,{children:(h,y)=>{var S=Kl(),$=p(yt(S),2);ne($,21,()=>Object.entries(d),([C,O])=>C,(C,O)=>{var L=j(()=>ot(i(O),2));let T=()=>i(L)[0],D=()=>i(L)[1];{let x=j(()=>`font_${T()}`),k=j(()=>l(T())),P=j(()=>`--sf-font-${T()}`);ca(C,{section:s,get fieldKey(){return i(x)},get label(){return i(k)},get default(){return D()},get cssVar(){return i(P)},width:"420px"})}});var R=p($,4),B=f(R);{let C=j(()=>a.scale_multipliers?.text_scale??1);ut(B,{section:s,fieldKey:"text_scale",label:"Text Scale",min:0,step:.05,get default(){return i(C)},cssVar:"--sf-text-scale"})}var E=p(B,2);{let C=j(()=>a.scale_multipliers?.text_display_scale??1);ut(E,{section:s,fieldKey:"text_display_scale",label:"Display Scale",min:0,step:.05,get default(){return i(C)},cssVar:"--sf-text-display-scale"})}z(h,S)},$$slots:{default:!0}}),z(e,_),Se()}var Gl=F('
                                  '),Wl=F('

                                  Live Scale Preview

                                  Card heading
                                  ');function Yl(e,t){ke(t,!0);const s=360,a=1440;let r=te(a);const n=re.defaults?.spacing??{},l=n.space_sizes??{};function o(I){const Y=H.spacing??{},G=l[I]??{},ae=Y[`space_${I}_min`],ue=Y[`space_${I}_max`],ce=ae!==void 0&&ae!==""?parseFloat(ae):G.min??1,pe=ue!==void 0&&ue!==""?parseFloat(ue):G.max??1;return{min:ce,max:pe}}const c=j(()=>{const I=parseFloat(H.spacing?.space_scale??n.space_scale??1)||1,Y=Math.max(0,Math.min(1,(i(r)-s)/(a-s))),G=["2xs","xs","s","m","l","xl","2xl","3xl","4xl"],ae=o("4xl").max*I;return G.map(ue=>{const{min:ce,max:pe}=o(ue),ge=(ce+(pe-ce)*Y)*I,N=ge/ae*100;return{name:ue,sizeRem:ge.toFixed(3),barPct:Math.min(N,100)}})}),d=j(()=>{const I=parseFloat(H.spacing?.space_scale??n.space_scale??1)||1,Y=Math.max(0,Math.min(1,(i(r)-s)/(a-s))),G=ae=>{const{min:ue,max:ce}=o(ae);return((ue+(ce-ue)*Y)*I).toFixed(3)};return{xs:G("xs"),s:G("s"),m:G("m"),l:G("l")}});var _=Wl(),v=f(_),u=p(f(v),2),m=f(u);m.textContent="360px";var b=p(m,2);Q(b,"min",s),Q(b,"max",a);var w=p(b,2);w.textContent="1440px";var h=p(w,2),y=f(h),S=p(v,2);ne(S,21,()=>i(c),I=>I.name,(I,Y)=>{var G=Gl(),ae=f(G),ue=f(ae),ce=p(ae,2),pe=f(ce);let ge;var N=p(ce,2),le=f(N);q(()=>{A(ue,`--sf-space-${i(Y).name??""}`),ge=ve(pe,"",ge,{width:`${i(Y).barPct??""}%`}),A(le,`${i(Y).sizeRem??""}rem`)}),z(I,G)});var $=p(S,2),R=f($),B=f(R),E=p(R,2);let C;var O=f(E);let L;var T=p(f(O),2),D=p(f(T),2),x=f(D),k=p(O,2),P=f(k),M=p(k,2);let V;var U=p(f(M),2);ve(U,"",{},{width:"3rem"}),q(()=>{A(y,`${i(r)??""}px`),A(B,`Container context at ${i(r)??""}px`),C=ve(E,"",C,{padding:`${i(d).m??""}rem`,gap:`${i(d).s??""}rem`}),L=ve(O,"",L,{gap:`${i(d).s??""}rem`}),A(x,`padding: ${i(d).m??""}rem`),A(P,`Body section · gap between rows: ${i(d).s??""}rem`),V=ve(M,"",V,{gap:`${i(d).xs??""}rem`,"padding-top":`${i(d).xs??""}rem`})}),Tt(b,()=>i(r),I=>K(r,I)),z(e,_),Se()}var Xl=F('
                                  '),Zl=F('

                                  Space Aliases

                                  ',1),Jl=F(`

                                  Spacing

                                  Space Scale Steps

                                  Min and max values in rem for fluid spacing via clamp(). + Leave both fields blank to use the framework defaults.

                                  `);function Ql(e,t){ke(t,!0);const s="spacing",a=re.defaults?.[s]??{},r=a.space_sizes??{},n=[{key:"gutter",label:"Gutter",cssVar:"--sf-space-gutter"},{key:"gap",label:"Gap",cssVar:"--sf-gap"},{key:"content_gap",label:"Content Gap",cssVar:"--sf-content-gap"},{key:"component_pad",label:"Component Pad",cssVar:"--sf-component-pad"},{key:"section_pad",label:"Section Pad",cssVar:"--sf-section-pad"}];var l=Jl(),o=p(f(l),2),c=f(o);{let u=j(()=>a.space_scale??1);ut(c,{section:s,fieldKey:"space_scale",label:"Space Scale",min:0,step:.05,get default(){return i(u)},cssVar:"--sf-space-scale"})}var d=p(o,6);ne(d,21,()=>Object.entries(r),([u,m])=>u,(u,m)=>{var b=j(()=>ot(i(m),2));let w=()=>i(b)[0],h=()=>i(b)[1];var y=Xl(),S=f(y),$=f(S),R=f($),B=p($,2),E=f(B),C=p(S,2),O=f(C);{let T=j(()=>`space_${w()}_min`);ut(O,{section:s,get fieldKey(){return i(T)},label:"Min",min:0,step:.01,get default(){return h().min},width:"80px"})}var L=p(O,2);{let T=j(()=>`space_${w()}_max`);ut(L,{section:s,get fieldKey(){return i(T)},label:"Max",min:0,step:.01,get default(){return h().max},width:"80px"})}q(()=>{A(R,w()),A(E,`--sf-space-${w()??""}`)}),z(u,y)});var _=p(d,2);Yl(_,{});var v=p(_,2);ma(v,{children:(u,m)=>{var b=Zl(),w=p(yt(b),2);ne(w,21,()=>n,h=>h.key,(h,y)=>{{let S=j(()=>a[i(y).key]??"");ca(h,{section:s,get fieldKey(){return i(y).key},get label(){return i(y).label},get default(){return i(S)},get cssVar(){return i(y).cssVar},mono:!0})}}),z(u,b)},$$slots:{default:!0}}),z(e,l),Se()}var eo=F(' '),to=F(' ',1);function cs(e,t){ke(t,!0);let s=_e(t,"cssVar",3,""),a=_e(t,"unit",3,""),r=_e(t,"description",3,"");const n=j(()=>H[t.section]?.[t.fieldKey]===void 0||H[t.section]?.[t.fieldKey]===null?"":String(H[t.section][t.fieldKey])),l=j(()=>i(n)===""||Number.isNaN(Number(i(n)))?Number(t.default):Number(i(n)));function o(d){Ss(t.section,t.fieldKey,d.currentTarget.value)}function c(d){Ss(t.section,t.fieldKey,d.currentTarget.value)}ba(e,{get label(){return t.label},get cssVar(){return s()},get fieldId(){return t.fieldKey},get description(){return r()},children:(d,_)=>{var v=to(),u=yt(v),m=p(u,2),b=p(m,2);{var w=h=>{var y=eo(),S=f(y);q(()=>A(S,a())),z(h,y)};fe(b,h=>{a()&&h(w)})}q(h=>{Q(u,"min",t.min),Q(u,"max",t.max),Q(u,"step",t.step),oa(u,i(l)),Q(m,"id",t.fieldKey),Q(m,"min",t.min),Q(m,"max",t.max),Q(m,"step",t.step),oa(m,i(n)),Q(m,"placeholder",h)},[()=>String(t.default)]),he("input",u,o),he("input",m,c),z(d,v)},$$slots:{default:!0}}),Se()}De(["input"]);var so=F(""),ao=F('');function ro(e,t){ke(t,!0);let s=_e(t,"options",19,()=>[]),a=_e(t,"default",3,""),r=_e(t,"cssVar",3,""),n=_e(t,"description",3,"");const l=j(()=>s().map(d=>typeof d=="string"?{value:d,label:d}:d)),o=j(()=>H[t.section]?.[t.fieldKey]===void 0||H[t.section]?.[t.fieldKey]===null?"":String(H[t.section][t.fieldKey]));function c(d){Ss(t.section,t.fieldKey,d.currentTarget.value)}ba(e,{get label(){return t.label},get cssVar(){return r()},get fieldId(){return t.fieldKey},get description(){return n()},children:(d,_)=>{var v=ao(),u=f(v),m=f(u);u.value=u.__value="";var b=p(u);ne(b,17,()=>i(l),h=>h.value,(h,y)=>{var S=so(),$=f(S),R={};q(()=>{A($,i(y).label),R!==(R=i(y).value)&&(S.value=(S.__value=i(y).value)??"")}),z(h,S)});var w;xn(v),q(()=>{Q(v,"id",t.fieldKey),A(m,`Default (${a()??""})`),w!==(w=i(o))&&(v.value=(v.__value=i(o))??"",sr(v,i(o)))}),he("change",v,c),z(d,v)},$$slots:{default:!0}}),Se()}De(["change"]);var no=F('
                                  '),io=F('
                                  '),lo=F('
                                  '),oo=F('

                                  Shadow

                                  Motion — Durations

                                  Base duration values in milliseconds.

                                  Z-Index

                                  Z-index layer values for stacking context management.

                                  Contrast

                                  ',1),co=F('

                                  Radius

                                  Shadows

                                  Motion

                                  Accessibility

                                  ');function fo(e,t){ke(t,!0);const s=re.defaults?.radius??{},a=re.defaults?.shadows??{},r=re.defaults?.motion??{},n=re.defaults?.zindex??{},l=re.defaults?.contrast??{},o=r.durations??{},c=N=>N.charAt(0).toUpperCase()+N.slice(1),d=[0,2,4,8,12,16,24,9999],_=["none","xs","s","m","l","xl","2xl","full"],v=j(()=>parseFloat(H.radius?.radius_scale??re.defaults?.radius?.radius_scale??1)),u=j(()=>d.map(N=>N*i(v))),m=j(()=>parseFloat(H.shadows?.shadow_strength??a.shadow_strength??.08)),b=j(()=>parseFloat(H.motion?.motion_scale??r.motion_scale??1)||1),w=["instant","fast","normal","slow","slower"],h=j(()=>w.map(N=>{const le=H.motion?.[`duration_${N}`],me=parseFloat(le!==void 0&&le!==""?le:o[N]??0);return{name:N,ms:Math.round(me*i(b))}})),y=(N,le)=>parseFloat(N!==void 0&&N!==""?N:le),S=j(()=>y(H.contrast?.focus_ring_width,l.focus_ring_width??2)),$=j(()=>y(H.contrast?.focus_ring_offset,l.focus_ring_offset??2)),R=j(()=>H.contrast?.focus_ring_style??l.focus_ring_style??"solid"),B=j(()=>[{label:"xs",shadow:`0 1px 2px 0 rgba(0,0,0,${(i(m)*.5).toFixed(4)})`},{label:"s",shadow:`0 1px 2px 0 rgba(0,0,0,${(i(m)*.5).toFixed(4)}), 0 2px 6px 0 rgba(0,0,0,${i(m).toFixed(4)})`},{label:"m",shadow:`0 1px 3px 0 rgba(0,0,0,${(i(m)*.5).toFixed(4)}), 0 4px 12px 0 rgba(0,0,0,${(i(m)*2).toFixed(4)})`},{label:"l",shadow:`0 2px 4px 0 rgba(0,0,0,${(i(m)*.5).toFixed(4)}), 0 8px 24px 0 rgba(0,0,0,${(i(m)*3).toFixed(4)})`},{label:"xl",shadow:`0 2px 8px 0 rgba(0,0,0,${(i(m)*.5).toFixed(4)}), 0 12px 36px 0 rgba(0,0,0,${(i(m)*3.5).toFixed(4)})`},{label:"glow",shadow:`0 0 15px 2px rgba(74,48,208,${Math.min(i(m)*2,.7).toFixed(4)})`}]);var E=co(),C=p(f(E),2),O=f(C);{let N=j(()=>s.radius_scale??1);ut(O,{section:"radius",fieldKey:"radius_scale",label:"Radius Scale",min:0,step:.1,get default(){return i(N)},cssVar:"--sf-radius-scale"})}var L=p(C,2);ne(L,23,()=>i(u),(N,le)=>_[le],(N,le,me)=>{var ye=no(),Ce=f(ye);let ze;var Re=p(Ce,2),oe=f(Re);q(()=>{ze=ve(Ce,"",ze,{"border-radius":d[i(me)]===9999?"9999px":`${i(le)}px`}),A(oe,_[i(me)])}),z(N,ye)});var T=p(L,4),D=f(T);{let N=j(()=>a.shadow_strength??.08);cs(D,{section:"shadows",fieldKey:"shadow_strength",label:"Shadow Strength",description:"Base opacity for shadow layers (0–1).",min:0,max:1,step:.01,get default(){return i(N)},cssVar:"--sf-shadow-strength"})}var x=p(T,2);ne(x,21,()=>i(B),N=>N.label,(N,le)=>{var me=io(),ye=f(me);let Ce;var ze=f(ye);q(()=>{Ce=ve(ye,"",Ce,{"box-shadow":i(le).shadow}),A(ze,i(le).label)}),z(N,me)});var k=p(x,4),P=f(k);{let N=j(()=>r.motion_scale??1);ut(P,{section:"motion",fieldKey:"motion_scale",label:"Motion Scale",min:0,step:.1,get default(){return i(N)},cssVar:"--sf-motion-scale"})}var M=p(k,2);ne(M,21,()=>i(h),N=>N.name,(N,le)=>{var me=lo(),ye=f(me),Ce=f(ye),ze=p(ye,2),Re=f(ze);let oe;var we=p(ze,2),be=f(we);q(()=>{A(Ce,i(le).name),oe=ve(Re,"",oe,{"animation-duration":`${i(le).ms??""}ms`}),A(be,`${i(le).ms??""}ms`)}),z(N,me)});var V=p(M,4),U=f(V);{let N=j(()=>l.focus_ring_width??2);cs(U,{section:"contrast",fieldKey:"focus_ring_width",label:"Focus Ring Width",min:0,max:8,step:.5,get default(){return i(N)},cssVar:"--sf-focus-ring-width",unit:"px"})}var I=p(U,2);{let N=j(()=>l.focus_ring_offset??2);cs(I,{section:"contrast",fieldKey:"focus_ring_offset",label:"Focus Ring Offset",min:0,max:8,step:.5,get default(){return i(N)},cssVar:"--sf-focus-ring-offset",unit:"px"})}var Y=p(I,2);{let N=j(()=>l.focus_ring_style??"solid");ro(Y,{section:"contrast",fieldKey:"focus_ring_style",label:"Focus Ring Style",options:["solid","dashed","dotted","double","none"],get default(){return i(N)},cssVar:"--sf-focus-ring-style"})}var G=p(V,2),ae=f(G);let ue;var ce=p(ae,2),pe=f(ce),ge=p(G,2);ma(ge,{children:(N,le)=>{var me=oo(),ye=p(yt(me),2),Ce=f(ye);{let xe=j(()=>a.glow_color??"");ca(Ce,{section:"shadows",fieldKey:"glow_color",label:"Glow Color",get default(){return i(xe)},cssVar:"--sf-shadow-glow-color",mono:!0})}var ze=p(ye,6);ne(ze,21,()=>Object.entries(o),([xe,pt])=>xe,(xe,pt)=>{var zt=j(()=>ot(i(pt),2));let it=()=>i(zt)[0],Lt=()=>i(zt)[1];{let ls=j(()=>`duration_${it()}`),$e=j(()=>c(it())),Vt=j(()=>`--sf-duration-${it()}`);ut(xe,{section:"motion",get fieldKey(){return i(ls)},get label(){return i($e)},min:0,step:10,get default(){return Lt()},get cssVar(){return i(Vt)},unit:"ms"})}});var Re=p(ze,6);ne(Re,21,()=>Object.entries(n),([xe,pt])=>xe,(xe,pt)=>{var zt=j(()=>ot(i(pt),2));let it=()=>i(zt)[0],Lt=()=>i(zt)[1];{let ls=j(()=>c(it())),$e=j(()=>`--sf-z-${it()}`);ut(xe,{section:"zindex",get fieldKey(){return it()},get label(){return i(ls)},step:1,get default(){return Lt()},get cssVar(){return i($e)}})}});var oe=p(Re,4),we=f(oe);{let xe=j(()=>l.contrast_bias??0);cs(we,{section:"contrast",fieldKey:"contrast_bias",label:"Contrast Bias",description:"Shifts derived shades up (positive) or down (negative).",min:-.2,max:.2,step:.01,get default(){return i(xe)},cssVar:"--sf-contrast-bias"})}var be=p(we,2);{let xe=j(()=>l.contrast_threshold??.6);cs(be,{section:"contrast",fieldKey:"contrast_threshold",label:"Contrast Threshold",description:"Lightness threshold for text-on-color (white vs. black).",min:0,max:1,step:.01,get default(){return i(xe)},cssVar:"--sf-contrast-threshold"})}var Ke=p(be,2);{let xe=j(()=>l.opacity_disabled??.45);cs(Ke,{section:"contrast",fieldKey:"opacity_disabled",label:"Disabled Opacity",min:0,max:1,step:.01,get default(){return i(xe)},cssVar:"--sf-opacity-disabled"})}z(N,me)},$$slots:{default:!0}}),q(()=>{ue=ve(ae,"",ue,{"--fp-width":`${i(S)??""}px`,"--fp-offset":`${i($)??""}px`,"--fp-style":i(R)}),A(pe,`${i(S)??""}px ${i(R)??""} · ${i($)??""}px offset`)}),z(e,E),Se()}var uo=F('
                                • '),vo=F('
                                    '),po=F('
                                    '),ho=F(`

                                    All --sf-* custom properties declared in the active SLASHED bundle, + grouped by category.

                                    `);function _o(e,t){ke(t,!0);const s=re.inventory?.variables??[],a={color:"Colors",text:"Typography",font:"Typography",leading:"Typography",tracking:"Typography",body:"Typography",heading:"Typography",h1:"Typography",h2:"Typography",h3:"Typography",h4:"Typography",h5:"Typography",h6:"Typography",prose:"Typography",code:"Typography",optical:"Typography",line:"Typography",space:"Spacing",gap:"Spacing",gutter:"Spacing",component:"Spacing",section:"Spacing",flow:"Spacing",safe:"Spacing",header:"Spacing",sticky:"Spacing",size:"Sizing",aspect:"Sizing",ratio:"Sizing",touch:"Sizing",container:"Layout",stack:"Layout",cluster:"Layout",sidebar:"Layout",switcher:"Layout",grid:"Layout",cover:"Layout",frame:"Layout",reel:"Layout",imposter:"Layout",bento:"Layout",box:"Layout",center:"Layout",content:"Layout",breakout:"Layout",divider:"Layout",field:"Layout",border:"Borders",stroke:"Borders",radius:"Radius",shadow:"Shadows",blur:"Effects",opacity:"Effects",gradient:"Effects",mask:"Effects",perspective:"Effects",drop:"Effects",contrast:"Effects",duration:"Motion",ease:"Motion",transition:"Motion",motion:"Motion",animation:"Motion",icon:"Icons",z:"Z-Index",is:"States",current:"States",focus:"Focus",caret:"Focus",scroll:"Scroll",scrollbar:"Scroll",print:"Print",truncate:"Misc"},r=["Colors","Typography","Spacing","Sizing","Layout","Borders","Radius","Shadows","Effects","Motion","Icons","Z-Index","States","Focus","Scroll","Print","Misc"];function n(b){let w=b;w.startsWith("--sf-")&&(w=w.slice(5));const h=w.indexOf("-"),y=h===-1?w:w.slice(0,h);return a[y]||"Misc"}function l(b){const w={};for(const y of b){const S=n(y);w[S]||(w[S]=[]),w[S].push(y)}const h=[];for(const y of r)w[y]?.length&&(w[y].sort(),h.push({category:y,items:w[y]}));for(const y of Object.keys(w))!r.includes(y)&&w[y]?.length&&(w[y].sort(),h.push({category:y,items:w[y]}));return h}const o=l(s);let c=Ne({});function d(b){c[b]=!c[b]}var _=ho(),v=f(_),u=f(v),m=p(v,4);ne(m,17,()=>o,({category:b,items:w})=>b,(b,w)=>{let h=()=>i(w).category,y=()=>i(w).items;var S=po(),$=f(S),R=f($),B=f(R),E=p(R,2),C=f(E),O=p(E,2),L=f(O),T=p($,2);{var D=x=>{var k=vo();ne(k,20,y,P=>P,(P,M)=>{var V=uo(),U=f(V),I=f(U);q(()=>A(I,M)),z(P,V)}),z(x,k)};fe(T,x=>{c[h()]&&x(D)})}q(()=>{Q($,"aria-expanded",c[h()]?"true":"false"),A(B,c[h()]?"▼":"▶"),A(C,h()),A(L,`(${y().length??""})`)}),he("click",$,()=>d(h())),z(b,S)}),q(()=>A(u,`CSS Variables (${s.length??""})`)),z(e,_),Se()}De(["click"]);var go=F('
                                  • '),mo=F('
                                      '),bo=F('
                                    • '),yo=F('
                                        '),wo=F('

                                        All utility and state classes declared in the active SLASHED bundle.

                                        ');function xo(e,t){ke(t,!0);const s=re.inventory?.sf_classes??[],a=re.inventory?.is_classes??[];let r=te(!1),n=te(!1);var l=wo(),o=f(l),c=f(o),d=p(o,4),_=f(d),v=f(_),u=f(v),m=p(v,4),b=f(m),w=p(_,2);{var h=L=>{var T=mo();ne(T,20,()=>s,D=>D,(D,x)=>{var k=go(),P=f(k),M=f(P);q(()=>A(M,`.${x??""}`)),z(D,k)}),z(L,T)};fe(w,L=>{i(r)&&L(h)})}var y=p(d,2),S=f(y),$=f(S),R=f($),B=p($,4),E=f(B),C=p(S,2);{var O=L=>{var T=yo();ne(T,20,()=>a,D=>D,(D,x)=>{var k=bo(),P=f(k),M=f(P);q(()=>A(M,`.${x??""}`)),z(D,k)}),z(L,T)};fe(C,L=>{i(n)&&L(O)})}q(()=>{A(c,`Registered Classes (${s.length+a.length})`),Q(_,"aria-expanded",i(r)?"true":"false"),A(u,i(r)?"▼":"▶"),A(b,`(${s.length??""})`),Q(S,"aria-expanded",i(n)?"true":"false"),A(R,i(n)?"▼":"▶"),A(E,`(${a.length??""})`)}),he("click",_,()=>K(r,!i(r))),he("click",S,()=>K(n,!i(n))),z(e,l),Se()}De(["click"]);async function ya(e,t){const{url:s,nonce:a}=re.rest;if(!s)return console.info("[slashed-admin] (dev) would POST",e,t),{ok:!0,dev:!0};const r=await fetch(s+e,{method:"POST",credentials:"same-origin",headers:{"Content-Type":"application/json","X-WP-Nonce":a},body:JSON.stringify(t)});if(!r.ok){const n=await r.text();throw new Error(n||`HTTP ${r.status}`)}return r.json()}function xr(e,t){return ya("/tokens",{section:e,values:t})}function kr(e){return ya("/tokens/reset",{section:e})}function ko(e){return ya("/settings",e)}async function So(){const{url:e,nonce:t}=re.rest;if(!e)return console.info("[slashed-admin] (dev) would GET /tokens/export"),{schema_version:"1",tokens:{},plugin_settings:{},dev:!0};const s=await fetch(e+"/tokens/export",{credentials:"same-origin",headers:{"X-WP-Nonce":t}});if(!s.ok)throw new Error(await s.text()||`HTTP ${s.status}`);return s.json()}function Eo(e){return ya("/tokens/import",e)}var jo=F('Saved'),To=F(' '),$o=F(`

                                        Bundle Info

                                        The SLASHED CSS bundle is loaded automatically by the plugin. The inventory is parsed from whichever bundle is active (essential / optimal / full) and - drives the variable pickers, class autocomplete, and color palette in Bricks.

                                        Variables registered
                                        Classes registered

                                        Plugin Settings

                                        Choose which SLASHED CSS bundle to load on the frontend and in the Bricks editor canvas.

                                        Override the HTML root font-size. Use this if Bricks forces a font-size you don't want.

                                        `);function $o(e,t){ke(t,!0);let s=te(Ne(ne.pluginSettings?.css_bundle??"optimal")),a=te(Ne(ne.pluginSettings?.html_font_size??"")),r=te(!1),n=te(!1),l=te(""),o=null;async function c(){K(r,!0),K(n,!1),K(l,"");try{await xo({css_bundle:i(s),html_font_size:i(a)}),K(n,!0),o&&clearTimeout(o),o=setTimeout(()=>{K(n,!1),o=null},3e3)}catch(V){K(l,V.message||"Save failed",!0)}finally{K(r,!1)}}var d=To(),_=p(f(d),4),v=p(f(_),2),u=f(v),m=p(v,4),b=f(m),w=p(_,4),h=p(f(w),2),y=f(h);y.value=y.__value="essential";var S=p(y);S.value=S.__value="optimal";var $=p(S);$.value=$.__value="full";var R=p(w,2),B=p(f(R),2),E=f(B);E.value=E.__value="";var C=p(E);C.value=C.__value="100";var O=p(C);O.value=O.__value="62.5";var L=p(R,2),T=f(L),D=f(T),x=p(T,2);{var k=V=>{var U=Eo();z(V,U)};fe(x,V=>{i(n)&&V(k)})}var P=p(x,2);{var M=V=>{var U=jo(),I=f(U);q(()=>A(I,i(l))),z(V,U)};fe(P,V=>{i(l)&&V(M)})}q(()=>{A(u,ne.inventory?.variables?.length??0),A(b,(ne.inventory?.sf_classes?.length??0)+(ne.inventory?.is_classes?.length??0)),T.disabled=i(r),A(D,i(r)?"Saving...":"Save Settings")}),la(h,()=>i(s),V=>K(s,V)),la(B,()=>i(a),V=>K(a,V)),he("click",T,c),z(e,d),Se()}De(["click"]);const kr=22.5,Co=95;function kn(e,t){if(e<=0||t<=0)return null;const s=Co-kr,a=(t-e)/s,r=parseFloat(a.toFixed(6)),n=parseFloat(e.toFixed(4)),l=parseFloat(t.toFixed(4));return`clamp(${n}rem, calc(${r} * (100vw - ${kr}rem) + ${n}rem), ${l}rem)`}function Sr(e){const t=parseFloat(e);if(isNaN(t))return"0";let s=t.toFixed(6).replace(/0+$/,"").replace(/\.$/,"");return s===""?"0":s}function Te(e){return e!=null&&e!==""}function zo(e){const t=[],s=["primary","secondary","tertiary","action","neutral","base"];for(const n of s){const l=`brand_${n}`;Te(e[l])&&t.push(`--sf-color-${n}-light: ${e[l]};`)}const a=["success","warning","error","info","danger"];for(const n of a){const l=`status_${n}`;Te(e[l])&&t.push(`--sf-color-${n}-light: ${e[l]};`)}if(e.dark_overrides_enabled!=="0"){for(const n of s){const l=`brand_dark_${n}`;Te(e[l])&&t.push(`--sf-color-${n}-dark: ${e[l]};`)}for(const n of a){const l=`status_dark_${n}`;Te(e[l])&&t.push(`--sf-color-${n}-dark: ${e[l]};`)}}return t}function Ao(e){const t=[],s=["body","heading","mono","display","humanist","geometric","slab"];for(const r of s){const n=`font_${r}`;Te(e[n])&&t.push(`--sf-font-${r}: ${e[n]};`)}Te(e.text_scale)&&t.push(`--sf-text-scale: ${e.text_scale};`),Te(e.text_display_scale)&&t.push(`--sf-text-display-scale: ${e.text_display_scale};`);const a=["2xs","xs","s","m","l","xl","2xl","3xl","4xl","display-s","display-m","display-l"];for(const r of a){const n=`size_${r}_min`,l=`size_${r}_max`,o=e[n],c=e[l];if(Te(o)&&Te(c)){const d=kn(parseFloat(o),parseFloat(c));d&&t.push(`--sf-text-${r}: ${d};`)}}return t}function Fo(e){const t=[];Te(e.space_scale)&&t.push(`--sf-space-scale: ${e.space_scale};`);const s=["2xs","xs","s","m","l","xl","2xl","3xl","4xl"];for(const r of s){const n=e[`space_${r}_min`],l=e[`space_${r}_max`];if(Te(n)&&Te(l)){const o=kn(parseFloat(n),parseFloat(l));o&&t.push(`--sf-space-${r}: calc(${o} * var(--sf-space-scale));`)}}const a={gutter:"--sf-space-gutter",gap:"--sf-gap",content_gap:"--sf-content-gap",component_pad:"--sf-component-pad",section_pad:"--sf-section-pad"};for(const[r,n]of Object.entries(a))Te(e[r])&&t.push(`${n}: ${e[r]};`);return t}function Ro(e){const t=[];return Te(e.radius_scale)&&t.push(`--sf-radius-scale: ${e.radius_scale};`),t}function Mo(e){const t=[];return Te(e.shadow_strength)&&t.push(`--sf-shadow-strength: calc(${e.shadow_strength} + var(--sf-is-dark) * 0.17);`),Te(e.glow_color)&&t.push(`--sf-shadow-glow-color: ${e.glow_color};`),t}function Oo(e){const t=[];Te(e.motion_scale)&&t.push(`--sf-motion-scale: ${e.motion_scale};`);const s=["instant","fast","normal","slow","slower"];for(const a of s){const r=`duration_${a}`;Te(e[r])&&t.push(`--sf-duration-${a}: calc(${e[r]}ms * var(--sf-motion-scale));`)}return t}function Do(e){const t=[],s=["below","base","raised","low","mid","high","top","max"];for(const a of s)Te(e[a])&&t.push(`--sf-z-${a}: ${parseInt(e[a],10)};`);return t}function Po(e){const t=[],s={contrast_bias:"--sf-contrast-bias",contrast_threshold:"--sf-contrast-threshold",opacity_disabled:"--sf-opacity-disabled"};for(const[r,n]of Object.entries(s))Te(e[r])&&t.push(`${n}: ${Sr(e[r])};`);const a={focus_ring_width:"--sf-focus-ring-width",focus_ring_offset:"--sf-focus-ring-offset"};for(const[r,n]of Object.entries(a))Te(e[r])&&t.push(`${n}: ${Sr(e[r])}px;`);return Te(e.focus_ring_style)&&["solid","dashed","dotted","double","none"].includes(e.focus_ring_style)&&t.push(`--sf-focus-ring-style: ${e.focus_ring_style};`),t}function ar(e){const t=[];if(e.colors&&typeof e.colors=="object"&&t.push(...zo(e.colors)),e.typography&&typeof e.typography=="object"&&t.push(...Ao(e.typography)),e.spacing&&typeof e.spacing=="object"&&t.push(...Fo(e.spacing)),e.radius&&typeof e.radius=="object"&&t.push(...Ro(e.radius)),e.shadows&&typeof e.shadows=="object"&&t.push(...Mo(e.shadows)),e.motion&&typeof e.motion=="object"&&t.push(...Oo(e.motion)),e.zindex&&typeof e.zindex=="object"&&t.push(...Do(e.zindex)),e.contrast&&typeof e.contrast=="object"&&t.push(...Po(e.contrast)),t.length===0)return"";let s=`@layer slashed.overrides { + drives the variable pickers, class autocomplete, and color palette in Bricks.

                                        Variables registered
                                        Classes registered

                                        Plugin Settings

                                        Choose which SLASHED CSS bundle to load on the frontend and in the Bricks editor canvas.

                                        Override the HTML root font-size. Use this if Bricks forces a font-size you don't want.

                                        `);function Co(e,t){ke(t,!0);let s=te(Ne(re.pluginSettings?.css_bundle??"optimal")),a=te(Ne(re.pluginSettings?.html_font_size??"")),r=te(!1),n=te(!1),l=te(""),o=null;async function c(){K(r,!0),K(n,!1),K(l,"");try{await ko({css_bundle:i(s),html_font_size:i(a)}),K(n,!0),o&&clearTimeout(o),o=setTimeout(()=>{K(n,!1),o=null},3e3)}catch(V){K(l,V.message||"Save failed",!0)}finally{K(r,!1)}}var d=$o(),_=p(f(d),4),v=p(f(_),2),u=f(v),m=p(v,4),b=f(m),w=p(_,4),h=p(f(w),2),y=f(h);y.value=y.__value="essential";var S=p(y);S.value=S.__value="optimal";var $=p(S);$.value=$.__value="full";var R=p(w,2),B=p(f(R),2),E=f(B);E.value=E.__value="";var C=p(E);C.value=C.__value="100";var O=p(C);O.value=O.__value="62.5";var L=p(R,2),T=f(L),D=f(T),x=p(T,2);{var k=V=>{var U=jo();z(V,U)};fe(x,V=>{i(n)&&V(k)})}var P=p(x,2);{var M=V=>{var U=To(),I=f(U);q(()=>A(I,i(l))),z(V,U)};fe(P,V=>{i(l)&&V(M)})}q(()=>{A(u,re.inventory?.variables?.length??0),A(b,(re.inventory?.sf_classes?.length??0)+(re.inventory?.is_classes?.length??0)),T.disabled=i(r),A(D,i(r)?"Saving...":"Save Settings")}),la(h,()=>i(s),V=>K(s,V)),la(B,()=>i(a),V=>K(a,V)),he("click",T,c),z(e,d),Se()}De(["click"]);const Sr=22.5,zo=95;function Sn(e,t){if(e<=0||t<=0)return null;const s=zo-Sr,a=(t-e)/s,r=parseFloat(a.toFixed(6)),n=parseFloat(e.toFixed(4)),l=parseFloat(t.toFixed(4));return`clamp(${n}rem, calc(${r} * (100vw - ${Sr}rem) + ${n}rem), ${l}rem)`}function Er(e){const t=parseFloat(e);if(isNaN(t))return"0";let s=t.toFixed(6).replace(/0+$/,"").replace(/\.$/,"");return s===""?"0":s}function je(e){return e!=null&&e!==""}function Ao(e){const t=[],s=["primary","secondary","tertiary","action","neutral","base"];for(const n of s){const l=`brand_${n}`;je(e[l])&&t.push(`--sf-color-${n}-light: ${e[l]};`)}const a=["success","warning","error","info","danger"];for(const n of a){const l=`status_${n}`;je(e[l])&&t.push(`--sf-color-${n}-light: ${e[l]};`)}if(e.dark_overrides_enabled!=="0"){for(const n of s){const l=`brand_dark_${n}`;je(e[l])&&t.push(`--sf-color-${n}-dark: ${e[l]};`)}for(const n of a){const l=`status_dark_${n}`;je(e[l])&&t.push(`--sf-color-${n}-dark: ${e[l]};`)}}return t}function Fo(e){const t=[],s=["body","heading","mono","display","humanist","geometric","slab"];for(const r of s){const n=`font_${r}`;je(e[n])&&t.push(`--sf-font-${r}: ${e[n]};`)}je(e.text_scale)&&t.push(`--sf-text-scale: ${e.text_scale};`),je(e.text_display_scale)&&t.push(`--sf-text-display-scale: ${e.text_display_scale};`);const a=["2xs","xs","s","m","l","xl","2xl","3xl","4xl","display-s","display-m","display-l"];for(const r of a){const n=`size_${r}_min`,l=`size_${r}_max`,o=e[n],c=e[l];if(je(o)&&je(c)){const d=Sn(parseFloat(o),parseFloat(c));d&&t.push(`--sf-text-${r}: ${d};`)}}return t}function Ro(e){const t=[];je(e.space_scale)&&t.push(`--sf-space-scale: ${e.space_scale};`);const s=["2xs","xs","s","m","l","xl","2xl","3xl","4xl"];for(const r of s){const n=e[`space_${r}_min`],l=e[`space_${r}_max`];if(je(n)&&je(l)){const o=Sn(parseFloat(n),parseFloat(l));o&&t.push(`--sf-space-${r}: calc(${o} * var(--sf-space-scale));`)}}const a={gutter:"--sf-space-gutter",gap:"--sf-gap",content_gap:"--sf-content-gap",component_pad:"--sf-component-pad",section_pad:"--sf-section-pad"};for(const[r,n]of Object.entries(a))je(e[r])&&t.push(`${n}: ${e[r]};`);return t}function Mo(e){const t=[];return je(e.radius_scale)&&t.push(`--sf-radius-scale: ${e.radius_scale};`),t}function Oo(e){const t=[];return je(e.shadow_strength)&&t.push(`--sf-shadow-strength: calc(${e.shadow_strength} + var(--sf-is-dark) * 0.17);`),je(e.glow_color)&&t.push(`--sf-shadow-glow-color: ${e.glow_color};`),t}function Do(e){const t=[];je(e.motion_scale)&&t.push(`--sf-motion-scale: ${e.motion_scale};`);const s=["instant","fast","normal","slow","slower"];for(const a of s){const r=`duration_${a}`;je(e[r])&&t.push(`--sf-duration-${a}: calc(${e[r]}ms * var(--sf-motion-scale));`)}return t}function Po(e){const t=[],s=["below","base","raised","low","mid","high","top","max"];for(const a of s)je(e[a])&&t.push(`--sf-z-${a}: ${parseInt(e[a],10)};`);return t}function Lo(e){const t=[],s={contrast_bias:"--sf-contrast-bias",contrast_threshold:"--sf-contrast-threshold",opacity_disabled:"--sf-opacity-disabled"};for(const[r,n]of Object.entries(s))je(e[r])&&t.push(`${n}: ${Er(e[r])};`);const a={focus_ring_width:"--sf-focus-ring-width",focus_ring_offset:"--sf-focus-ring-offset"};for(const[r,n]of Object.entries(a))je(e[r])&&t.push(`${n}: ${Er(e[r])}px;`);return je(e.focus_ring_style)&&["solid","dashed","dotted","double","none"].includes(e.focus_ring_style)&&t.push(`--sf-focus-ring-style: ${e.focus_ring_style};`),t}function rr(e){const t=[];if(e.colors&&typeof e.colors=="object"&&t.push(...Ao(e.colors)),e.typography&&typeof e.typography=="object"&&t.push(...Fo(e.typography)),e.spacing&&typeof e.spacing=="object"&&t.push(...Ro(e.spacing)),e.radius&&typeof e.radius=="object"&&t.push(...Mo(e.radius)),e.shadows&&typeof e.shadows=="object"&&t.push(...Oo(e.shadows)),e.motion&&typeof e.motion=="object"&&t.push(...Do(e.motion)),e.zindex&&typeof e.zindex=="object"&&t.push(...Po(e.zindex)),e.contrast&&typeof e.contrast=="object"&&t.push(...Lo(e.contrast)),t.length===0)return"";let s=`@layer slashed.overrides { :root { `;for(const a of t)s+=` ${a} `;return s+=` } -}`,s}function Lo(e){if(!e||typeof e!="object")return!1;for(const t of Object.values(e))if(!(!t||typeof t!="object")){for(const s of Object.values(t))if(typeof s=="object"&&s!==null){for(const a of Object.values(s))if(a!==""&&a!==null&&a!==void 0)return!0}else if(s!==""&&s!==null&&s!==void 0)return!0}return!1}var Vo=F(' '),Io=F('

                                        '),qo=F('

                                        '),No=F(`

                                        Export / Import Tokens

                                        Export your current SLASHED token overrides (colors, typography, spacing, etc.) to a .json file and import them on any other WordPress site running this plugin. +}`,s}function Vo(e){if(!e||typeof e!="object")return!1;for(const t of Object.values(e))if(!(!t||typeof t!="object")){for(const s of Object.values(t))if(typeof s=="object"&&s!==null){for(const a of Object.values(s))if(a!==""&&a!==null&&a!==void 0)return!0}else if(s!==""&&s!==null&&s!==void 0)return!0}return!1}var Io=F(' '),qo=F('

                                        '),No=F('

                                        '),Bo=F(`

                                        Export / Import Tokens

                                        Export your current SLASHED token overrides (colors, typography, spacing, etc.) to a .json file and import them on any other WordPress site running this plugin. This makes Bricks templates fully portable — the template JSON carries structure and class references; this file carries the brand tokens that drive the visual result.

                                        Export

                                        Downloads a .json file containing all your active token overrides and plugin settings. Share this file alongside your Bricks template export so the visual result is identical on every site.

                                        Import

                                        Upload a .json file previously exported from this plugin. Each section is validated @@ -29,8 +29,8 @@ var Sn=Object.defineProperty;var rr=e=>{throw TypeError(e)};var En=(e,t,s)=>t in import the token file via this tab, then import the Bricks template via Bricks → Templates. The plugin re-registers all SLASHED classes, variables, and color palettes automatically.

                                      • Verify in the Bricks builder canvas that colors, spacing, and fonts match. If something looks off, check the browser console for unresolved var() calls — - this means the CSS bundle isn't loading or the token file wasn't imported yet.
                                      • `);function Bo(e,t){ke(t,!0);let s=te(!1),a=te("");const r=j(()=>ar(H)),n=j(()=>i(r).length>0);function l(){if(!i(r))return;const M=new Blob([i(r)],{type:"text/css"}),V=URL.createObjectURL(M),U=document.createElement("a");U.href=V,U.download=`slashed-custom-${new Date().toISOString().slice(0,10)}.css`,U.click(),URL.revokeObjectURL(V)}async function o(){K(s,!0),K(a,"");try{const M=await ko(),V=JSON.stringify(M,null,2),U=new Blob([V],{type:"application/json"}),I=URL.createObjectURL(U),Y=document.createElement("a");Y.href=I,Y.download=`slashed-tokens-${new Date().toISOString().slice(0,10)}.json`,Y.click(),URL.revokeObjectURL(I)}catch(M){K(a,M.message||"Export failed",!0)}finally{K(s,!1)}}let c=te(null),d=te(!1),_=te(""),v=te(""),u=te(0);async function m(){const M=i(c)?.files?.[0];if(M){K(_,""),K(v,""),K(d,!0);try{const V=await M.text(),U=JSON.parse(V),I=await So(U),Y=I.settings_imported?" Plugin settings restored.":"";K(_,`Imported ${I.imported} section(s) successfully.${Y}`),K(u,3);const G=setInterval(()=>{K(u,i(u)-1),i(u)<=0&&(clearInterval(G),window.location.reload())},1e3)}catch(V){K(v,V.message||"Import failed",!0)}finally{K(d,!1),i(c)&&(i(c).value="")}}}var b=No(),w=p(f(b),4),h=p(f(w),4),y=f(h),S=f(y),$=p(y,2),R=p($,2);{var B=M=>{var V=Vo(),U=f(V);q(()=>A(U,i(a))),z(M,V)};fe(R,M=>{i(a)&&M(B)})}var E=p(w,2),C=p(f(E),4),O=f(C);ll(O,M=>K(c,M),()=>i(c));var L=p(O,2),T=f(L),D=p(C,2);{var x=M=>{var V=Io(),U=f(V),I=p(U);{var Y=G=>{var ae=Wi();q(()=>A(ae,`Reloading in ${i(u)??""}…`)),z(G,ae)};fe(I,G=>{i(u)>0&&G(Y)})}q(()=>A(U,`${i(_)??""} `)),z(M,V)};fe(D,M=>{i(_)&&M(x)})}var k=p(D,2);{var P=M=>{var V=qo(),U=f(V);q(()=>A(U,i(v))),z(M,V)};fe(k,M=>{i(v)&&M(P)})}q(()=>{y.disabled=i(s),A(S,i(s)?"Exporting…":"Download token file (.json)"),$.disabled=!i(n),Q($,"title",i(n)?"Download overrides as a standalone CSS file":"No overrides set yet"),L.disabled=i(d),A(T,i(d)?"Importing…":"Import token file")}),he("click",y,o),he("click",$,l),he("click",L,m),z(e,b),Se()}De(["click"]);var Ko=F('

                                        Parameters:

                                         
                                        '),Ho=F(`

                                        Filter Hooks Reference

                                        These WordPress filter hooks let you customize the SLASHED Bricks integration - from your theme or a mu-plugin. Each hook fires during plugin initialization.

                                        `);function Uo(e){const t=[{name:"slashed_bricks/css_bundle_url",description:"Override which CSS bundle URL to load.",params:"$url (string) - The current CSS bundle URL.",example:`add_filter( 'slashed_bricks/css_bundle_url', function( $url ) { + this means the CSS bundle isn't loading or the token file wasn't imported yet.
                                        `);function Ko(e,t){ke(t,!0);let s=te(!1),a=te("");const r=j(()=>rr(H)),n=j(()=>i(r).length>0);function l(){if(!i(r))return;const M=new Blob([i(r)],{type:"text/css"}),V=URL.createObjectURL(M),U=document.createElement("a");U.href=V,U.download=`slashed-custom-${new Date().toISOString().slice(0,10)}.css`,U.click(),URL.revokeObjectURL(V)}async function o(){K(s,!0),K(a,"");try{const M=await So(),V=JSON.stringify(M,null,2),U=new Blob([V],{type:"application/json"}),I=URL.createObjectURL(U),Y=document.createElement("a");Y.href=I,Y.download=`slashed-tokens-${new Date().toISOString().slice(0,10)}.json`,Y.click(),URL.revokeObjectURL(I)}catch(M){K(a,M.message||"Export failed",!0)}finally{K(s,!1)}}let c=te(null),d=te(!1),_=te(""),v=te(""),u=te(0);async function m(){const M=i(c)?.files?.[0];if(M){K(_,""),K(v,""),K(d,!0);try{const V=await M.text(),U=JSON.parse(V),I=await Eo(U),Y=I.settings_imported?" Plugin settings restored.":"";K(_,`Imported ${I.imported} section(s) successfully.${Y}`),K(u,3);const G=setInterval(()=>{K(u,i(u)-1),i(u)<=0&&(clearInterval(G),window.location.reload())},1e3)}catch(V){K(v,V.message||"Import failed",!0)}finally{K(d,!1),i(c)&&(i(c).value="")}}}var b=Bo(),w=p(f(b),4),h=p(f(w),4),y=f(h),S=f(y),$=p(y,2),R=p($,2);{var B=M=>{var V=Io(),U=f(V);q(()=>A(U,i(a))),z(M,V)};fe(R,M=>{i(a)&&M(B)})}var E=p(w,2),C=p(f(E),4),O=f(C);ol(O,M=>K(c,M),()=>i(c));var L=p(O,2),T=f(L),D=p(C,2);{var x=M=>{var V=qo(),U=f(V),I=p(U);{var Y=G=>{var ae=Yi();q(()=>A(ae,`Reloading in ${i(u)??""}…`)),z(G,ae)};fe(I,G=>{i(u)>0&&G(Y)})}q(()=>A(U,`${i(_)??""} `)),z(M,V)};fe(D,M=>{i(_)&&M(x)})}var k=p(D,2);{var P=M=>{var V=No(),U=f(V);q(()=>A(U,i(v))),z(M,V)};fe(k,M=>{i(v)&&M(P)})}q(()=>{y.disabled=i(s),A(S,i(s)?"Exporting…":"Download token file (.json)"),$.disabled=!i(n),Q($,"title",i(n)?"Download overrides as a standalone CSS file":"No overrides set yet"),L.disabled=i(d),A(T,i(d)?"Importing…":"Import token file")}),he("click",y,o),he("click",$,l),he("click",L,m),z(e,b),Se()}De(["click"]);var Ho=F('

                                        Parameters:

                                         
                                        '),Uo=F(`

                                        Filter Hooks Reference

                                        These WordPress filter hooks let you customize the SLASHED Bricks integration + from your theme or a mu-plugin. Each hook fires during plugin initialization.

                                        `);function Go(e){const t=[{name:"slashed_bricks/css_bundle_url",description:"Override which CSS bundle URL to load.",params:"$url (string) - The current CSS bundle URL.",example:`add_filter( 'slashed_bricks/css_bundle_url', function( $url ) { // Load from a CDN instead. return 'https://cdn.example.com/slashed/slashed.optimal.css'; } );`},{name:"slashed_bricks/registered_classes",description:"Filter the array of classes before registration with Bricks.",params:"$classes (array) - Array of class definitions with name and category.",example:`add_filter( 'slashed_bricks/registered_classes', function( $classes ) { @@ -59,7 +59,7 @@ add_filter( 'slashed_bricks/inventory_local_path', function() { 'SLASHED Primary', 'SLASHED Secondary', ] ) ); -} );`}];var s=Ho(),a=p(f(s),4);ie(a,17,()=>t,r=>r.name,(r,n)=>{var l=Ko(),o=f(l),c=f(o),d=f(c),_=p(o,2),v=f(_),u=p(_,2),m=p(f(u),2),b=f(m),w=p(u,2),h=f(w),y=f(h);q(()=>{A(d,i(n).name),A(v,i(n).description),A(b,i(n).params),A(y,i(n).example)}),z(r,l)}),z(e,s)}const Go=[{category:"Colors",description:"Brand, status, semantic, and derived color tokens. Source colors use oklch(); the framework derives light-dark pairs, palettes, and alpha scales automatically.",tokens:[{name:"--sf-color-{brand}-light",description:"Source color for the brand (oklch registered value). Set this to rebrand."},{name:"--sf-color-{brand}-dark",description:"Optional dark-mode override. If set, replaces the auto-derived dark variant for full per-mode control."},{name:"--sf-color-{brand}",description:"Resolved light-dark adaptive color for use in rules."},{name:"--sf-color-{brand}-{50-950}",description:"Palette scale: 50 (lightest) to 950 (darkest) mixed with base/text."},{name:"--sf-color-{brand}-a{5-95}",description:"Alpha scale: 5% to 95% opacity of the brand color."},{name:"--sf-color-{brand}-hover/active/muted/subtle/ghost/lighter/darker/xlight/xdark/superlight/superdark",description:"Semantic aliases for common UI states, mapped to palette steps."},{name:"--sf-color-bg",description:"Page background color, derived from base."},{name:"--sf-color-text",description:"Main body text color, contrast-aware."},{name:"--sf-color-heading",description:"Heading text color, slightly stronger than body text."},{name:"--sf-color-link",description:"Link color, derived from action brand."},{name:"--sf-color-border",description:"Default border color."},{name:"--sf-color-surface",description:"Card/panel surface color (equals base)."},{name:"--sf-color-overlay",description:"Semi-transparent overlay for modals."},{name:"--sf-color-dim",description:"50% black overlay for dimming backgrounds."},{name:"--sf-color-success/warning/error/info/danger",description:"Status feedback colors with -light source, -muted, -strong, -subtle variants."}]},{category:"Typography",description:"Font families, sizes (fluid clamp-based scale), weights, line-heights, letter-spacing, and heading configuration.",tokens:[{name:"--sf-font-body",description:"Body font stack (system-ui default)."},{name:"--sf-font-heading",description:"Heading font stack (defaults to body)."},{name:"--sf-font-mono",description:"Monospace font stack."},{name:"--sf-font-display",description:"Display/hero font (defaults to heading)."},{name:"--sf-font-geometric/humanist/slab",description:"Curated fallback stacks for common typographic personalities."},{name:"--sf-text-{2xs..4xl}",description:"Fluid type scale using clamp(). Sizes: 2xs, xs, s, m, l, xl, 2xl, 3xl, 4xl."},{name:"--sf-text-display-{s,m,l}",description:"Extra-large display/hero sizes."},{name:"--sf-text-scale",description:"Global multiplier for the type scale (default 1)."},{name:"--sf-font-weight-{thin..black}",description:"Named weight tokens: thin(100), extralight(200), light(300), normal(400), medium(500), semibold(600), bold(700), extrabold(800), black(900)."},{name:"--sf-leading-{tight,snug,normal,relaxed}",description:"Line-height presets: 1.1, 1.3, 1.5, 1.625."},{name:"--sf-tracking-{tight,normal,wide,wider,widest}",description:"Letter-spacing presets from -0.025em to 0.1em."},{name:"--sf-h{1-6}-size/font-weight/line-height/letter-spacing",description:"Per-heading-level configuration tokens."},{name:"--sf-body-*",description:"Body text configuration: font-size, font-weight, line-height, color, text-wrap."}]},{category:"Spacing",description:"Fluid spacing scale (clamp-based), gutters, section padding, and component padding.",tokens:[{name:"--sf-space-{2xs..4xl}",description:"Fluid spacing scale. Sizes: none, px, 2xs, xs, s, m, l, xl, 2xl, 3xl, 4xl."},{name:"--sf-space-scale",description:"Global multiplier for all space tokens (default 1)."},{name:"--sf-space-gutter",description:"Page-edge gutter (defaults to space-l)."},{name:"--sf-gap",description:"Default gap for layouts (defaults to space-m)."},{name:"--sf-content-gap",description:"Gap between content elements (defaults to space-s)."},{name:"--sf-section-pad--{s,m,l,xl}",description:"Vertical padding for page sections."},{name:"--sf-component-pad",description:"Internal padding for components (defaults to space-m)."},{name:"--sf-header-height",description:"Expected fixed header height for sticky offset calculations."},{name:"--sf-safe-{top,right,bottom,left}",description:"Safe area insets for notched devices."}]},{category:"Sizing",description:"Component sizes, touch targets, and aspect ratios.",tokens:[{name:"--sf-size-{xs..xl}",description:"Named size tokens: xs(1.5rem), s(2rem), m(2.5rem), l(2.75rem), xl(3.5rem)."},{name:"--sf-touch-target",description:"Minimum interactive element size (defaults to size-l, 2.75rem)."},{name:"--sf-ratio-{square,photo,video,cinema,golden,portrait}",description:"Predefined aspect ratios for frames and containers."},{name:"--sf-icon-{xs..xl}",description:"Icon sizing in em units (0.875em to 3em)."}]},{category:"Layout",description:"Container widths, layout primitive tokens (stack, cluster, grid, sidebar, switcher, bento, cover, frame, reel, imposter).",tokens:[{name:"--sf-container-{narrow,default,prose,wide,full}",description:"Max-width presets for .sf-container."},{name:"--sf-stack-gap",description:"Vertical gap between .sf-stack children."},{name:"--sf-cluster-gap/align/justify",description:"Inline cluster layout tokens."},{name:"--sf-sidebar-width/gap/min-width",description:"Sidebar layout tokens."},{name:"--sf-switcher-threshold/gap",description:"Column-to-stack breakpoint and gap."},{name:"--sf-grid-min/gap",description:"Auto-fill grid minimum item width and gap."},{name:"--sf-bento-cols/gap/row",description:"Dense bento grid configuration."},{name:"--sf-cover-min-height/padding",description:"Full-height cover layout."},{name:"--sf-frame-ratio",description:"Aspect ratio for .sf-frame (defaults to 16/9)."},{name:"--sf-reel-gap/height/item-width",description:"Horizontal scroll strip configuration."},{name:"--sf-imposter-margin",description:"Safety margin for absolute-centered overlays."},{name:"--sf-breakout-width/content-width",description:"Breakout grid track widths."},{name:"--sf-divider-color/style/width",description:"Divider appearance tokens."}]},{category:"Borders",description:"Border widths and styles.",tokens:[{name:"--sf-border-width-{hairline,1,2,3,4}",description:"Border width scale: 0.5px, 1px, 2px, 3px, 4px."},{name:"--sf-border-style/dotted/soft/strong",description:"Border style presets (solid, dotted, dashed, solid)."},{name:"--sf-stroke-{thin,regular,bold,heavy}",description:"Stroke widths for SVG/icon use: 1px, 1.5px, 2px, 3px."}]},{category:"Radius",description:"Border radius scale and special shapes.",tokens:[{name:"--sf-radius-{none,xs,s,m,l,xl,2xl,3xl,4xl,full}",description:"Radius scale from 0 to 9999px (pill)."},{name:"--sf-radius-scale",description:"Global multiplier for all radius tokens (default 1)."},{name:"--sf-radius-pill",description:"Fully rounded (9999px)."},{name:"--sf-radius-outer",description:"Outer radius = inner + padding (for nested rounding)."}]},{category:"Shadows",description:"Box shadows, drop shadows, text shadows, and shadow configuration.",tokens:[{name:"--sf-shadow-{xs,s,m,l,xl,2xl}",description:"Elevation shadow scale, progressively more dramatic."},{name:"--sf-shadow-inner",description:"Inset shadow for recessed elements."},{name:"--sf-shadow-glow",description:"Colored glow effect (uses --sf-shadow-glow-color)."},{name:"--sf-shadow-none",description:"Explicit no-shadow value."},{name:"--sf-shadow-color",description:"Base shadow color (derived from neutral)."},{name:"--sf-shadow-strength",description:"Shadow opacity multiplier (adapts to dark mode)."},{name:"--sf-drop-shadow-{s,m,l}",description:"CSS filter drop-shadow equivalents."},{name:"--sf-text-shadow-{s,m,l,none}",description:"Text shadow presets."}]},{category:"Effects",description:"Blurs, opacities, gradients, masks, and perspective.",tokens:[{name:"--sf-blur-{xs,s,m,l,xl}",description:"Blur radius scale: 4px to 48px."},{name:"--sf-opacity-{0,10,25,50,75,100,disabled}",description:"Named opacity presets."},{name:"--sf-gradient-{brand,primary,secondary,tertiary,surface}",description:"Predefined gradients using brand colors."},{name:"--sf-gradient-fade--{t,b,l,r}",description:"Directional fade-to-background gradients."},{name:"--sf-mask-scrim-start/end",description:"Scroll mask fade depth."},{name:"--sf-perspective-{near,normal,far}",description:"3D perspective presets: 500px, 1000px, 2000px."},{name:"--sf-contrast-bias/threshold",description:"Color contrast tuning for auto text-on-color logic."}]},{category:"Motion",description:"Durations, easing curves, transitions, and animations.",tokens:[{name:"--sf-duration-{none,instant,fast,normal,slow,slower}",description:"Duration scale: 0ms to 600ms (respects --sf-motion-scale)."},{name:"--sf-motion-scale",description:"Global animation speed multiplier (set 0 to disable)."},{name:"--sf-ease-{linear,in,out,in-out,bounce,elastic,overshoot,spring}",description:"Easing function presets."},{name:"--sf-transition-{all,colors,opacity,shadow,transform,fast,slow,enter,exit}",description:"Pre-composed transition shorthands."},{name:"--sf-animation-{fade-in,fade-out,scale-up,scale-down,slide-in-*,float,ping,blink,color-pulse}",description:"Named keyframe animation shorthands."},{name:"--sf-animation-delay-{1-5}",description:"Stagger delays for sequential animations."}]},{category:"Z-Index",description:"Z-index scale for predictable layering.",tokens:[{name:"--sf-z-{below,base,raised,low,mid,high,top,max}",description:"Z-index scale: -1, 0, 1, 10, 100, 500, 900, 9999."}]},{category:"Focus",description:"Focus ring appearance for keyboard navigation.",tokens:[{name:"--sf-focus-ring-width/offset/color/style/shadow",description:"Focus indicator configuration."},{name:"--sf-caret-color",description:"Text input caret color (defaults to action)."}]},{category:"Scroll",description:"Scroll timeline and scrollbar styling.",tokens:[{name:"--sf-scroll-timeline-range-start/end",description:"Scroll-driven animation range."},{name:"--sf-scrollbar-thumb/track",description:"Custom scrollbar colors."}]},{category:"Print",description:"Print stylesheet configuration.",tokens:[{name:"--sf-print-base-size/page-margin/page-size",description:"Print layout tokens: 11pt base, 2cm margins, A4 size."}]}],Wo=[{category:"Layout Primitives",description:"Breakpoint-free, container-query-driven layout components. Each is a single class with per-instance token overrides via inline style.",classes:[{name:".sf-section",description:"Vertical page rhythm with size variants (--s/--m/--l/--xl/--collapse)."},{name:".sf-section-group",description:"Collapses gap between adjacent sections."},{name:".sf-container",description:"Centered max-width wrapper with gutters. Variants: --narrow, --wide, --full, --prose."},{name:".sf-box",description:"Isolated unit with padding and optional border."},{name:".sf-center",description:"Intrinsic centering with max-width. Variant: --intrinsic."},{name:".sf-stack",description:"Vertical flow with consistent gap. Size variants: --2xs to --3xl. Alignment: --center, --end, --stretch."},{name:".sf-cluster",description:"Wrapping inline group. Size variants: --2xs to --xl. Alignment: --center, --end, --between. Wrap: --no-wrap."},{name:".sf-sidebar",description:"Content + side panel that wraps. Variants: --right, --narrow, --wide."},{name:".sf-switcher",description:"N columns above threshold, stacked below. Variants: --no-wrap, --vertical."},{name:".sf-grid",description:"Auto-fill responsive grid. Size variants: --xs to --xl. Variants: --fit, --dense."},{name:".sf-grid-{1,2,3,4,6}",description:"Fixed-column grids, container-responsive."},{name:".sf-grid-{1-2,2-1,1-3,3-1}",description:"Ratio two-column grids."},{name:".sf-bento",description:"Dense free-form grid. Variants: --2, --4, --compact, --tall."},{name:".sf-alternate",description:"Zigzag two-column layout, reverses every other row."},{name:".sf-pancake",description:"Sticky-footer grid: header / main(1fr) / footer."},{name:".sf-content-grid",description:"Breakout layout grid. Children use .sf-breakout or .sf-full-bleed."},{name:".sf-cover",description:"Full-height region with centered content. Variants: --min, --max, --padding-s, --padding-l."},{name:".sf-frame",description:"Aspect-ratio media box. Variants: --square, --portrait, --video, --cinema, --3-2, --4-3, --golden."},{name:".sf-reel",description:"Horizontal scroll strip with optional mask fade."},{name:".sf-imposter",description:"Absolutely-centered overlay. Variants: --fixed, --contain."},{name:".sf-subgrid / .sf-subgrid-rows",description:"Inherit parent grid tracks."},{name:".sf-divider",description:"Token-driven separator. Variant: --vertical."},{name:".sf-icon",description:"Em-based inline icon sizing. Sizes: --xs to --xl. Variant: --boxed."},{name:".sf-prose",description:"Readable long-form text with automatic vertical rhythm."},{name:".sf-not-prose",description:"Reset zone inside .sf-prose for embedded components."}]},{category:"Macros",description:"Recipe classes that answer 'what does this element do/look like?' - composable with layout primitives.",classes:[{name:".sf-flow",description:"Lobotomized owl: consistent gap between consecutive children."},{name:".sf-truncate",description:"Single-line ellipsis overflow."},{name:".sf-line-clamp-{2,3,N}",description:"Multi-line text clamping with ellipsis. -N reads --sf-line-clamp."},{name:".sf-equal-height",description:"Forces flex children to share the tallest child's height."},{name:".sf-aspect",description:"Generic aspect-ratio container (reads --sf-aspect token)."},{name:".sf-scroll-shadow",description:"Top + bottom mask gradient for scrolling containers."},{name:".sf-scroll-snap",description:"Vertical scroll-snap container."},{name:".sf-overflow-fade",description:"End-edge horizontal fade for overflowing inline content."},{name:".sf-no-tap-highlight",description:"Suppresses WebKit/Android tap highlight."},{name:".sf-text-gradient",description:"Gradient text effect using background-clip."},{name:".sf-clickable-parent",description:"Makes an entire card clickable via the first link inside."},{name:".sf-link-external",description:"Adds external link indicator marker."}]},{category:"Surfaces",description:"Color surface utility classes that set background and text color for a brand context.",classes:[{name:".sf-surface--{primary,secondary,tertiary,action,neutral,inverse}",description:"Brand-colored surface with auto-contrast text."},{name:".sf-surface--{success,warning,error,info,danger}",description:"Status-colored surfaces."}]},{category:"Animations",description:"CSS animation utility classes that apply predefined keyframe animations.",classes:[{name:".sf-fade-in / .sf-fade-out",description:"Opacity entrance/exit animations."},{name:".sf-scale-up / .sf-scale-down",description:"Scale entrance/exit animations."},{name:".sf-slide-in-{up,down,left,right}",description:"Directional slide-in entrance animations."},{name:".sf-color-pulse",description:"Continuous color pulse animation."},{name:".sf-entrance--fade / --fade-up / --fade-down / --fade-left / --fade-right / --scale-up",description:"Scroll-triggered entrance animations (scroll-timeline driven)."}]},{category:"State Classes (.is-*)",description:"Runtime state classes toggled by JS or mirrored from ARIA. They live in the slashed.states layer. Always pair with matching ARIA attributes.",classes:[{name:".is-hidden / .is-invisible / .is-visible",description:"Visibility control: removed from layout / hidden but keeps box / visible."},{name:".is-disabled / .is-readonly",description:"Non-interactive states with dimming."},{name:".is-loading / .is-pending / .is-busy",description:"Loading states: spinner replacement / optimistic UI / cursor hint."},{name:".is-skeleton",description:"Placeholder shimmer animation."},{name:".is-active / .is-selected / .is-current / .is-pressed",description:"Selection/activation states."},{name:".is-highlighted",description:"Transient emphasis (e.g. search result highlight)."},{name:".is-open / .is-collapsed / .is-expanded",description:"Disclosure states for modals, drawers, accordions."},{name:".is-valid / .is-invalid",description:"Form field validation results (maps to aria-invalid)."},{name:".is-success / .is-error / .is-warning / .is-info / .is-danger",description:"General feedback states and destructive-action context."},{name:".is-sticky / .is-pinned / .is-fixed / .is-fullscreen",description:"Positioning states."},{name:".is-clipped / .is-scrollable / .is-truncated / .is-resizable",description:"Overflow handling states."},{name:".is-dragging / .is-drop-target / .is-draggable",description:"Drag and drop states."},{name:".is-overlay / .is-focused / .is-clickable / .is-unselectable",description:"Positioning, focus, cursor, and selection states."},{name:".is-empty",description:"Hide element when empty (:empty pseudo-class)."}]}],Yo=[{name:"--sf-is-dark",description:"Numeric flag (0 or 1) indicating dark mode is active. Registered property."},{name:"--sf-lumlocker",description:"Internal luminance lock value for color derivation."},{name:"--sf-color-scheme",description:"CSS color-scheme declaration (light dark)."},{name:"--sf-current-font-weight",description:"Current context font weight (used by strong elements)."},{name:"--sf-link-external-marker",description:"External link arrow character."},{name:"--sf-field-block",description:"Vertical spacing between form fields."},{name:"--sf-field-required-marker",description:"Required field indicator string."}];var Xo=F('
                                      • '),Zo=F('
                                          '),Jo=F('
                                        • '),Qo=F('
                                          Misc Tokens that do not fit a single category.
                                            '),ec=F('

                                            CSS Custom Properties (--sf-*)

                                            '),tc=F('
                                          • '),sc=F('
                                              '),ac=F('

                                              Utility & State Classes

                                              '),rc=F('

                                              '),nc=F('

                                              API Cheatsheet

                                              ');function ic(e,t){ke(t,!0);let s=te(""),a=te("all");const r=ne.inventory?.variables?.length??0,n=ne.inventory?.sf_classes?.length??0,l=ne.inventory?.is_classes?.length??0;let o=j(()=>v(Go,"tokens")),c=j(()=>v(Wo,"classes")),d=j(()=>Yo.filter(I=>_(I.name,I.description)));function _(I,Y){if(!i(s).trim())return!0;const G=i(s).trim().toLowerCase();return I.toLowerCase().includes(G)||Y.toLowerCase().includes(G)}function v(I,Y){return i(s).trim()?I.map(G=>({...G,[Y]:G[Y].filter(ae=>_(ae.name,ae.description))})).filter(G=>G[Y].length>0):I}let u=j(()=>i(a)==="all"||i(a)==="variables"),m=j(()=>i(a)==="all"||i(a)==="classes"),b=j(()=>i(s).trim()!==""&&(!i(u)||i(o).length===0&&i(d).length===0)&&(!i(m)||i(c).length===0));var w=nc(),h=f(w),y=p(f(h),2),S=f(y),$=p(h,2),R=f($),B=p(R,2),E=f(B);let C;var O=p(E,2);let L;var T=p(O,2);let D;var x=p($,2);{var k=I=>{var Y=ec(),G=p(f(Y),2);ie(G,17,()=>i(o),js,(ce,pe)=>{var ge=Zo(),N=f(ge),oe=f(N),me=f(oe),ye=p(oe,2),Ce=f(ye),ze=p(N,2);ie(ze,21,()=>i(pe).tokens,js,(Re,re)=>{var we=Xo(),be=f(we),Ke=f(be),xe=p(be,2),pt=f(xe);q(()=>{A(Ke,i(re).name),A(pt,i(re).description)}),z(Re,we)}),q(Re=>{ge.open=Re,A(me,i(pe).category),A(Ce,i(pe).description)},[()=>!i(s).trim()]),z(ce,ge)});var ae=p(G,2);{var ue=ce=>{var pe=Qo(),ge=p(f(pe),2);ie(ge,21,()=>i(d),js,(N,oe)=>{var me=Jo(),ye=f(me),Ce=f(ye),ze=p(ye,2),Re=f(ze);q(()=>{A(Ce,i(oe).name),A(Re,i(oe).description)}),z(N,me)}),q(N=>pe.open=N,[()=>!i(s).trim()]),z(ce,pe)};fe(ae,ce=>{i(d).length>0&&ce(ue)})}z(I,Y)};fe(x,I=>{i(u)&&I(k)})}var P=p(x,2);{var M=I=>{var Y=ac(),G=p(f(Y),2);ie(G,17,()=>i(c),js,(ae,ue)=>{var ce=sc(),pe=f(ce),ge=f(pe),N=f(ge),oe=p(ge,2),me=f(oe),ye=p(pe,2);ie(ye,21,()=>i(ue).classes,js,(Ce,ze)=>{var Re=tc(),re=f(Re),we=f(re),be=p(re,2),Ke=f(be);q(()=>{A(we,i(ze).name),A(Ke,i(ze).description)}),z(Ce,Re)}),q(Ce=>{ce.open=Ce,A(N,i(ue).category),A(me,i(ue).description)},[()=>!i(s).trim()]),z(ae,ce)}),z(I,Y)};fe(P,I=>{i(m)&&I(M)})}var V=p(P,2);{var U=I=>{var Y=rc(),G=f(Y);q(()=>A(G,`No results for "${i(s)??""}"`)),z(I,Y)};fe(V,I=>{i(b)&&I(U)})}q(()=>{A(S,`${r??""} variables | ${n??""} layout/utility classes | ${l??""} state classes`),Q(E,"aria-pressed",i(a)==="all"),C=rt(E,1,"svelte-osej3t",null,C,{active:i(a)==="all"}),Q(O,"aria-pressed",i(a)==="variables"),L=rt(O,1,"svelte-osej3t",null,L,{active:i(a)==="variables"}),Q(T,"aria-pressed",i(a)==="classes"),D=rt(T,1,"svelte-osej3t",null,D,{active:i(a)==="classes"})}),zt(R,()=>i(s),I=>K(s,I)),he("click",E,()=>K(a,"all")),he("click",O,()=>K(a,"variables")),he("click",T,()=>K(a,"classes")),z(e,w),Se()}De(["click"]);var lc=F('
                                              '),oc=F('
                                              '),cc=F(`

                                              Live preview

                                              The quick brown fox jumps over the lazy dog

                                              Body and heading fonts update as you adjust typography settings. Colors below +} );`}];var s=Uo(),a=p(f(s),4);ne(a,17,()=>t,r=>r.name,(r,n)=>{var l=Ho(),o=f(l),c=f(o),d=f(c),_=p(o,2),v=f(_),u=p(_,2),m=p(f(u),2),b=f(m),w=p(u,2),h=f(w),y=f(h);q(()=>{A(d,i(n).name),A(v,i(n).description),A(b,i(n).params),A(y,i(n).example)}),z(r,l)}),z(e,s)}const Wo=[{category:"Colors",description:"Brand, status, semantic, and derived color tokens. Source colors use oklch(); the framework derives light-dark pairs, palettes, and alpha scales automatically.",tokens:[{name:"--sf-color-{brand}-light",description:"Source color for the brand (oklch registered value). Set this to rebrand."},{name:"--sf-color-{brand}-dark",description:"Optional dark-mode override. If set, replaces the auto-derived dark variant for full per-mode control."},{name:"--sf-color-{brand}",description:"Resolved light-dark adaptive color for use in rules."},{name:"--sf-color-{brand}-{50-950}",description:"Palette scale: 50 (lightest) to 950 (darkest) mixed with base/text."},{name:"--sf-color-{brand}-a{5-95}",description:"Alpha scale: 5% to 95% opacity of the brand color."},{name:"--sf-color-{brand}-hover/active/muted/subtle/ghost/lighter/darker/xlight/xdark/superlight/superdark",description:"Semantic aliases for common UI states, mapped to palette steps."},{name:"--sf-color-bg",description:"Page background color, derived from base."},{name:"--sf-color-text",description:"Main body text color, contrast-aware."},{name:"--sf-color-heading",description:"Heading text color, slightly stronger than body text."},{name:"--sf-color-link",description:"Link color, derived from action brand."},{name:"--sf-color-border",description:"Default border color."},{name:"--sf-color-surface",description:"Card/panel surface color (equals base)."},{name:"--sf-color-overlay",description:"Semi-transparent overlay for modals."},{name:"--sf-color-dim",description:"50% black overlay for dimming backgrounds."},{name:"--sf-color-success/warning/error/info/danger",description:"Status feedback colors with -light source, -muted, -strong, -subtle variants."}]},{category:"Typography",description:"Font families, sizes (fluid clamp-based scale), weights, line-heights, letter-spacing, and heading configuration.",tokens:[{name:"--sf-font-body",description:"Body font stack (system-ui default)."},{name:"--sf-font-heading",description:"Heading font stack (defaults to body)."},{name:"--sf-font-mono",description:"Monospace font stack."},{name:"--sf-font-display",description:"Display/hero font (defaults to heading)."},{name:"--sf-font-geometric/humanist/slab",description:"Curated fallback stacks for common typographic personalities."},{name:"--sf-text-{2xs..4xl}",description:"Fluid type scale using clamp(). Sizes: 2xs, xs, s, m, l, xl, 2xl, 3xl, 4xl."},{name:"--sf-text-display-{s,m,l}",description:"Extra-large display/hero sizes."},{name:"--sf-text-scale",description:"Global multiplier for the type scale (default 1)."},{name:"--sf-font-weight-{thin..black}",description:"Named weight tokens: thin(100), extralight(200), light(300), normal(400), medium(500), semibold(600), bold(700), extrabold(800), black(900)."},{name:"--sf-leading-{tight,snug,normal,relaxed}",description:"Line-height presets: 1.1, 1.3, 1.5, 1.625."},{name:"--sf-tracking-{tight,normal,wide,wider,widest}",description:"Letter-spacing presets from -0.025em to 0.1em."},{name:"--sf-h{1-6}-size/font-weight/line-height/letter-spacing",description:"Per-heading-level configuration tokens."},{name:"--sf-body-*",description:"Body text configuration: font-size, font-weight, line-height, color, text-wrap."}]},{category:"Spacing",description:"Fluid spacing scale (clamp-based), gutters, section padding, and component padding.",tokens:[{name:"--sf-space-{2xs..4xl}",description:"Fluid spacing scale. Sizes: none, px, 2xs, xs, s, m, l, xl, 2xl, 3xl, 4xl."},{name:"--sf-space-scale",description:"Global multiplier for all space tokens (default 1)."},{name:"--sf-space-gutter",description:"Page-edge gutter (defaults to space-l)."},{name:"--sf-gap",description:"Default gap for layouts (defaults to space-m)."},{name:"--sf-content-gap",description:"Gap between content elements (defaults to space-s)."},{name:"--sf-section-pad--{s,m,l,xl}",description:"Vertical padding for page sections."},{name:"--sf-component-pad",description:"Internal padding for components (defaults to space-m)."},{name:"--sf-header-height",description:"Expected fixed header height for sticky offset calculations."},{name:"--sf-safe-{top,right,bottom,left}",description:"Safe area insets for notched devices."}]},{category:"Sizing",description:"Component sizes, touch targets, and aspect ratios.",tokens:[{name:"--sf-size-{xs..xl}",description:"Named size tokens: xs(1.5rem), s(2rem), m(2.5rem), l(2.75rem), xl(3.5rem)."},{name:"--sf-touch-target",description:"Minimum interactive element size (defaults to size-l, 2.75rem)."},{name:"--sf-ratio-{square,photo,video,cinema,golden,portrait}",description:"Predefined aspect ratios for frames and containers."},{name:"--sf-icon-{xs..xl}",description:"Icon sizing in em units (0.875em to 3em)."}]},{category:"Layout",description:"Container widths, layout primitive tokens (stack, cluster, grid, sidebar, switcher, bento, cover, frame, reel, imposter).",tokens:[{name:"--sf-container-{narrow,default,prose,wide,full}",description:"Max-width presets for .sf-container."},{name:"--sf-stack-gap",description:"Vertical gap between .sf-stack children."},{name:"--sf-cluster-gap/align/justify",description:"Inline cluster layout tokens."},{name:"--sf-sidebar-width/gap/min-width",description:"Sidebar layout tokens."},{name:"--sf-switcher-threshold/gap",description:"Column-to-stack breakpoint and gap."},{name:"--sf-grid-min/gap",description:"Auto-fill grid minimum item width and gap."},{name:"--sf-bento-cols/gap/row",description:"Dense bento grid configuration."},{name:"--sf-cover-min-height/padding",description:"Full-height cover layout."},{name:"--sf-frame-ratio",description:"Aspect ratio for .sf-frame (defaults to 16/9)."},{name:"--sf-reel-gap/height/item-width",description:"Horizontal scroll strip configuration."},{name:"--sf-imposter-margin",description:"Safety margin for absolute-centered overlays."},{name:"--sf-breakout-width/content-width",description:"Breakout grid track widths."},{name:"--sf-divider-color/style/width",description:"Divider appearance tokens."}]},{category:"Borders",description:"Border widths and styles.",tokens:[{name:"--sf-border-width-{hairline,1,2,3,4}",description:"Border width scale: 0.5px, 1px, 2px, 3px, 4px."},{name:"--sf-border-style/dotted/soft/strong",description:"Border style presets (solid, dotted, dashed, solid)."},{name:"--sf-stroke-{thin,regular,bold,heavy}",description:"Stroke widths for SVG/icon use: 1px, 1.5px, 2px, 3px."}]},{category:"Radius",description:"Border radius scale and special shapes.",tokens:[{name:"--sf-radius-{none,xs,s,m,l,xl,2xl,3xl,4xl,full}",description:"Radius scale from 0 to 9999px (pill)."},{name:"--sf-radius-scale",description:"Global multiplier for all radius tokens (default 1)."},{name:"--sf-radius-pill",description:"Fully rounded (9999px)."},{name:"--sf-radius-outer",description:"Outer radius = inner + padding (for nested rounding)."}]},{category:"Shadows",description:"Box shadows, drop shadows, text shadows, and shadow configuration.",tokens:[{name:"--sf-shadow-{xs,s,m,l,xl,2xl}",description:"Elevation shadow scale, progressively more dramatic."},{name:"--sf-shadow-inner",description:"Inset shadow for recessed elements."},{name:"--sf-shadow-glow",description:"Colored glow effect (uses --sf-shadow-glow-color)."},{name:"--sf-shadow-none",description:"Explicit no-shadow value."},{name:"--sf-shadow-color",description:"Base shadow color (derived from neutral)."},{name:"--sf-shadow-strength",description:"Shadow opacity multiplier (adapts to dark mode)."},{name:"--sf-drop-shadow-{s,m,l}",description:"CSS filter drop-shadow equivalents."},{name:"--sf-text-shadow-{s,m,l,none}",description:"Text shadow presets."}]},{category:"Effects",description:"Blurs, opacities, gradients, masks, and perspective.",tokens:[{name:"--sf-blur-{xs,s,m,l,xl}",description:"Blur radius scale: 4px to 48px."},{name:"--sf-opacity-{0,10,25,50,75,100,disabled}",description:"Named opacity presets."},{name:"--sf-gradient-{brand,primary,secondary,tertiary,surface}",description:"Predefined gradients using brand colors."},{name:"--sf-gradient-fade--{t,b,l,r}",description:"Directional fade-to-background gradients."},{name:"--sf-mask-scrim-start/end",description:"Scroll mask fade depth."},{name:"--sf-perspective-{near,normal,far}",description:"3D perspective presets: 500px, 1000px, 2000px."},{name:"--sf-contrast-bias/threshold",description:"Color contrast tuning for auto text-on-color logic."}]},{category:"Motion",description:"Durations, easing curves, transitions, and animations.",tokens:[{name:"--sf-duration-{none,instant,fast,normal,slow,slower}",description:"Duration scale: 0ms to 600ms (respects --sf-motion-scale)."},{name:"--sf-motion-scale",description:"Global animation speed multiplier (set 0 to disable)."},{name:"--sf-ease-{linear,in,out,in-out,bounce,elastic,overshoot,spring}",description:"Easing function presets."},{name:"--sf-transition-{all,colors,opacity,shadow,transform,fast,slow,enter,exit}",description:"Pre-composed transition shorthands."},{name:"--sf-animation-{fade-in,fade-out,scale-up,scale-down,slide-in-*,float,ping,blink,color-pulse}",description:"Named keyframe animation shorthands."},{name:"--sf-animation-delay-{1-5}",description:"Stagger delays for sequential animations."}]},{category:"Z-Index",description:"Z-index scale for predictable layering.",tokens:[{name:"--sf-z-{below,base,raised,low,mid,high,top,max}",description:"Z-index scale: -1, 0, 1, 10, 100, 500, 900, 9999."}]},{category:"Focus",description:"Focus ring appearance for keyboard navigation.",tokens:[{name:"--sf-focus-ring-width/offset/color/style/shadow",description:"Focus indicator configuration."},{name:"--sf-caret-color",description:"Text input caret color (defaults to action)."}]},{category:"Scroll",description:"Scroll timeline and scrollbar styling.",tokens:[{name:"--sf-scroll-timeline-range-start/end",description:"Scroll-driven animation range."},{name:"--sf-scrollbar-thumb/track",description:"Custom scrollbar colors."}]},{category:"Print",description:"Print stylesheet configuration.",tokens:[{name:"--sf-print-base-size/page-margin/page-size",description:"Print layout tokens: 11pt base, 2cm margins, A4 size."}]}],Yo=[{category:"Layout Primitives",description:"Breakpoint-free, container-query-driven layout components. Each is a single class with per-instance token overrides via inline style.",classes:[{name:".sf-section",description:"Vertical page rhythm with size variants (--s/--m/--l/--xl/--collapse)."},{name:".sf-section-group",description:"Collapses gap between adjacent sections."},{name:".sf-container",description:"Centered max-width wrapper with gutters. Variants: --narrow, --wide, --full, --prose."},{name:".sf-box",description:"Isolated unit with padding and optional border."},{name:".sf-center",description:"Intrinsic centering with max-width. Variant: --intrinsic."},{name:".sf-stack",description:"Vertical flow with consistent gap. Size variants: --2xs to --3xl. Alignment: --center, --end, --stretch."},{name:".sf-cluster",description:"Wrapping inline group. Size variants: --2xs to --xl. Alignment: --center, --end, --between. Wrap: --no-wrap."},{name:".sf-sidebar",description:"Content + side panel that wraps. Variants: --right, --narrow, --wide."},{name:".sf-switcher",description:"N columns above threshold, stacked below. Variants: --no-wrap, --vertical."},{name:".sf-grid",description:"Auto-fill responsive grid. Size variants: --xs to --xl. Variants: --fit, --dense."},{name:".sf-grid-{1,2,3,4,6}",description:"Fixed-column grids, container-responsive."},{name:".sf-grid-{1-2,2-1,1-3,3-1}",description:"Ratio two-column grids."},{name:".sf-bento",description:"Dense free-form grid. Variants: --2, --4, --compact, --tall."},{name:".sf-alternate",description:"Zigzag two-column layout, reverses every other row."},{name:".sf-pancake",description:"Sticky-footer grid: header / main(1fr) / footer."},{name:".sf-content-grid",description:"Breakout layout grid. Children use .sf-breakout or .sf-full-bleed."},{name:".sf-cover",description:"Full-height region with centered content. Variants: --min, --max, --padding-s, --padding-l."},{name:".sf-frame",description:"Aspect-ratio media box. Variants: --square, --portrait, --video, --cinema, --3-2, --4-3, --golden."},{name:".sf-reel",description:"Horizontal scroll strip with optional mask fade."},{name:".sf-imposter",description:"Absolutely-centered overlay. Variants: --fixed, --contain."},{name:".sf-subgrid / .sf-subgrid-rows",description:"Inherit parent grid tracks."},{name:".sf-divider",description:"Token-driven separator. Variant: --vertical."},{name:".sf-icon",description:"Em-based inline icon sizing. Sizes: --xs to --xl. Variant: --boxed."},{name:".sf-prose",description:"Readable long-form text with automatic vertical rhythm."},{name:".sf-not-prose",description:"Reset zone inside .sf-prose for embedded components."}]},{category:"Macros",description:"Recipe classes that answer 'what does this element do/look like?' - composable with layout primitives.",classes:[{name:".sf-flow",description:"Lobotomized owl: consistent gap between consecutive children."},{name:".sf-truncate",description:"Single-line ellipsis overflow."},{name:".sf-line-clamp-{2,3,N}",description:"Multi-line text clamping with ellipsis. -N reads --sf-line-clamp."},{name:".sf-equal-height",description:"Forces flex children to share the tallest child's height."},{name:".sf-aspect",description:"Generic aspect-ratio container (reads --sf-aspect token)."},{name:".sf-scroll-shadow",description:"Top + bottom mask gradient for scrolling containers."},{name:".sf-scroll-snap",description:"Vertical scroll-snap container."},{name:".sf-overflow-fade",description:"End-edge horizontal fade for overflowing inline content."},{name:".sf-no-tap-highlight",description:"Suppresses WebKit/Android tap highlight."},{name:".sf-text-gradient",description:"Gradient text effect using background-clip."},{name:".sf-clickable-parent",description:"Makes an entire card clickable via the first link inside."},{name:".sf-link-external",description:"Adds external link indicator marker."}]},{category:"Surfaces",description:"Color surface utility classes that set background and text color for a brand context.",classes:[{name:".sf-surface--{primary,secondary,tertiary,action,neutral,inverse}",description:"Brand-colored surface with auto-contrast text."},{name:".sf-surface--{success,warning,error,info,danger}",description:"Status-colored surfaces."}]},{category:"Animations",description:"CSS animation utility classes that apply predefined keyframe animations.",classes:[{name:".sf-fade-in / .sf-fade-out",description:"Opacity entrance/exit animations."},{name:".sf-scale-up / .sf-scale-down",description:"Scale entrance/exit animations."},{name:".sf-slide-in-{up,down,left,right}",description:"Directional slide-in entrance animations."},{name:".sf-color-pulse",description:"Continuous color pulse animation."},{name:".sf-entrance--fade / --fade-up / --fade-down / --fade-left / --fade-right / --scale-up",description:"Scroll-triggered entrance animations (scroll-timeline driven)."}]},{category:"State Classes (.is-*)",description:"Runtime state classes toggled by JS or mirrored from ARIA. They live in the slashed.states layer. Always pair with matching ARIA attributes.",classes:[{name:".is-hidden / .is-invisible / .is-visible",description:"Visibility control: removed from layout / hidden but keeps box / visible."},{name:".is-disabled / .is-readonly",description:"Non-interactive states with dimming."},{name:".is-loading / .is-pending / .is-busy",description:"Loading states: spinner replacement / optimistic UI / cursor hint."},{name:".is-skeleton",description:"Placeholder shimmer animation."},{name:".is-active / .is-selected / .is-current / .is-pressed",description:"Selection/activation states."},{name:".is-highlighted",description:"Transient emphasis (e.g. search result highlight)."},{name:".is-open / .is-collapsed / .is-expanded",description:"Disclosure states for modals, drawers, accordions."},{name:".is-valid / .is-invalid",description:"Form field validation results (maps to aria-invalid)."},{name:".is-success / .is-error / .is-warning / .is-info / .is-danger",description:"General feedback states and destructive-action context."},{name:".is-sticky / .is-pinned / .is-fixed / .is-fullscreen",description:"Positioning states."},{name:".is-clipped / .is-scrollable / .is-truncated / .is-resizable",description:"Overflow handling states."},{name:".is-dragging / .is-drop-target / .is-draggable",description:"Drag and drop states."},{name:".is-overlay / .is-focused / .is-clickable / .is-unselectable",description:"Positioning, focus, cursor, and selection states."},{name:".is-empty",description:"Hide element when empty (:empty pseudo-class)."}]}],Xo=[{name:"--sf-is-dark",description:"Numeric flag (0 or 1) indicating dark mode is active. Registered property."},{name:"--sf-lumlocker",description:"Internal luminance lock value for color derivation."},{name:"--sf-color-scheme",description:"CSS color-scheme declaration (light dark)."},{name:"--sf-current-font-weight",description:"Current context font weight (used by strong elements)."},{name:"--sf-link-external-marker",description:"External link arrow character."},{name:"--sf-field-block",description:"Vertical spacing between form fields."},{name:"--sf-field-required-marker",description:"Required field indicator string."}];var Zo=F('

                                            • '),Jo=F('
                                                '),Qo=F('
                                              • '),ec=F('
                                                Misc Tokens that do not fit a single category.
                                                  '),tc=F('

                                                  CSS Custom Properties (--sf-*)

                                                  '),sc=F('
                                                • '),ac=F('
                                                    '),rc=F('

                                                    Utility & State Classes

                                                    '),nc=F('

                                                    '),ic=F('

                                                    API Cheatsheet

                                                    ');function lc(e,t){ke(t,!0);let s=te(""),a=te("all");const r=re.inventory?.variables?.length??0,n=re.inventory?.sf_classes?.length??0,l=re.inventory?.is_classes?.length??0;let o=j(()=>v(Wo,"tokens")),c=j(()=>v(Yo,"classes")),d=j(()=>Xo.filter(I=>_(I.name,I.description)));function _(I,Y){if(!i(s).trim())return!0;const G=i(s).trim().toLowerCase();return I.toLowerCase().includes(G)||Y.toLowerCase().includes(G)}function v(I,Y){return i(s).trim()?I.map(G=>({...G,[Y]:G[Y].filter(ae=>_(ae.name,ae.description))})).filter(G=>G[Y].length>0):I}let u=j(()=>i(a)==="all"||i(a)==="variables"),m=j(()=>i(a)==="all"||i(a)==="classes"),b=j(()=>i(s).trim()!==""&&(!i(u)||i(o).length===0&&i(d).length===0)&&(!i(m)||i(c).length===0));var w=ic(),h=f(w),y=p(f(h),2),S=f(y),$=p(h,2),R=f($),B=p(R,2),E=f(B);let C;var O=p(E,2);let L;var T=p(O,2);let D;var x=p($,2);{var k=I=>{var Y=tc(),G=p(f(Y),2);ne(G,17,()=>i(o),js,(ce,pe)=>{var ge=Jo(),N=f(ge),le=f(N),me=f(le),ye=p(le,2),Ce=f(ye),ze=p(N,2);ne(ze,21,()=>i(pe).tokens,js,(Re,oe)=>{var we=Zo(),be=f(we),Ke=f(be),xe=p(be,2),pt=f(xe);q(()=>{A(Ke,i(oe).name),A(pt,i(oe).description)}),z(Re,we)}),q(Re=>{ge.open=Re,A(me,i(pe).category),A(Ce,i(pe).description)},[()=>!i(s).trim()]),z(ce,ge)});var ae=p(G,2);{var ue=ce=>{var pe=ec(),ge=p(f(pe),2);ne(ge,21,()=>i(d),js,(N,le)=>{var me=Qo(),ye=f(me),Ce=f(ye),ze=p(ye,2),Re=f(ze);q(()=>{A(Ce,i(le).name),A(Re,i(le).description)}),z(N,me)}),q(N=>pe.open=N,[()=>!i(s).trim()]),z(ce,pe)};fe(ae,ce=>{i(d).length>0&&ce(ue)})}z(I,Y)};fe(x,I=>{i(u)&&I(k)})}var P=p(x,2);{var M=I=>{var Y=rc(),G=p(f(Y),2);ne(G,17,()=>i(c),js,(ae,ue)=>{var ce=ac(),pe=f(ce),ge=f(pe),N=f(ge),le=p(ge,2),me=f(le),ye=p(pe,2);ne(ye,21,()=>i(ue).classes,js,(Ce,ze)=>{var Re=sc(),oe=f(Re),we=f(oe),be=p(oe,2),Ke=f(be);q(()=>{A(we,i(ze).name),A(Ke,i(ze).description)}),z(Ce,Re)}),q(Ce=>{ce.open=Ce,A(N,i(ue).category),A(me,i(ue).description)},[()=>!i(s).trim()]),z(ae,ce)}),z(I,Y)};fe(P,I=>{i(m)&&I(M)})}var V=p(P,2);{var U=I=>{var Y=nc(),G=f(Y);q(()=>A(G,`No results for "${i(s)??""}"`)),z(I,Y)};fe(V,I=>{i(b)&&I(U)})}q(()=>{A(S,`${r??""} variables | ${n??""} layout/utility classes | ${l??""} state classes`),Q(E,"aria-pressed",i(a)==="all"),C=rt(E,1,"svelte-osej3t",null,C,{active:i(a)==="all"}),Q(O,"aria-pressed",i(a)==="variables"),L=rt(O,1,"svelte-osej3t",null,L,{active:i(a)==="variables"}),Q(T,"aria-pressed",i(a)==="classes"),D=rt(T,1,"svelte-osej3t",null,D,{active:i(a)==="classes"})}),Tt(R,()=>i(s),I=>K(s,I)),he("click",E,()=>K(a,"all")),he("click",O,()=>K(a,"variables")),he("click",T,()=>K(a,"classes")),z(e,w),Se()}De(["click"]);var oc=F('
                                                    '),cc=F('
                                                    '),dc=F(`

                                                    Live preview

                                                    The quick brown fox jumps over the lazy dog

                                                    Body and heading fonts update as you adjust typography settings. Colors below reflect brand and status tokens for the selected mode.

                                                    Primary Action Outline Ghost

                                                    Card Component

                                                    Design token preview

                                                    Active

                                                    This card shows radius, shadow, spacing, colors, and typography - working together. All values update live as you adjust tokens.

                                                    Generated CSS:
                                                    `);function dc(e,t){ke(t,!0);const s=["primary","secondary","tertiary","action","neutral","base"],a=["success","warning","error","info","danger"],r=ne.defaults?.colors??{};let n=te(!1);const l=j(()=>{const re=[],we=H.colors??{},be=H.typography??{},Ke=H.radius??{},xe=H.shadows??{},pt=we.dark_overrides_enabled!=="0";for(const Ee of s){const kt=we[`brand_${Ee}`]??r.brand_hex_hints?.[Ee];if(kt&&re.push(`--sf-color-${Ee}-light:${kt}`),pt){const St=we[`brand_dark_${Ee}`]??r.brand_dark_hex_hints?.[Ee];St&&re.push(`--sf-color-${Ee}-dark:${St}`)}else{const St=Ee==="base"?"oklch(from var(--sf-color-base-light) clamp(0.16, calc(1.18 - l), 0.24) calc(c * 0.5) h)":`oklch(from var(--sf-color-${Ee}-light) clamp(0.65, calc(0.95 - l * 0.5), 0.88) calc(c * 0.9) h)`;re.push(`--sf-color-${Ee}-dark:${St}`)}}for(const Ee of a){const kt=we[`status_${Ee}`]??r.status_hex_hints?.[Ee];if(kt&&re.push(`--sf-color-${Ee}-light:${kt}`),pt){const St=we[`status_dark_${Ee}`]??r.status_dark_hex_hints?.[Ee];St&&re.push(`--sf-color-${Ee}-dark:${St}`)}else re.push(`--sf-color-${Ee}-dark:oklch(from var(--sf-color-${Ee}-light) clamp(0.65, calc(0.95 - l * 0.5), 0.88) calc(c * 0.9) h)`)}be.font_body&&re.push(`--sf-font-body:${be.font_body}`),be.font_heading&&re.push(`--sf-font-heading:${be.font_heading}`);const xt=parseFloat(Ke.radius_scale??ne.defaults?.radius?.radius_scale??1)||1;re.push(`--preview-radius-s:${Math.round(4*xt)}px`),re.push(`--preview-radius-m:${Math.round(8*xt)}px`),re.push(`--preview-radius-l:${Math.round(16*xt)}px`);const it=xe.shadow_strength,ls=parseFloat(it!==void 0&&it!==""?it:ne.defaults?.shadows?.shadow_strength??.08);return re.push(`--preview-shadow:0 2px 8px 0 rgba(0,0,0,${(ls*2).toFixed(3)}),0 1px 3px 0 rgba(0,0,0,${ls.toFixed(3)})`),re.join(";")}),o=j(()=>i(n)?"dark":"light"),c=j(()=>ar(H));var d=cc();let _;var v=f(d),u=p(f(v),2),m=f(u);let b;var w=p(m,2);let h;var y=p(v,6),S=f(y);ie(S,16,()=>s,re=>re,(re,we)=>{var be=lc();let Ke;var xe=f(be);q(()=>{Q(be,"title",we),Ke=ve(be,"",Ke,{background:`var(--sf-color-${we}-${i(o)}, #ddd)`}),A(xe,we)}),z(re,be)});var $=p(S,2);ie($,16,()=>a,re=>re,(re,we)=>{var be=oc();let Ke;var xe=f(be);q(()=>{Q(be,"title",we),Ke=ve(be,"",Ke,{background:`var(--sf-color-${we}-${i(o)}, #ddd)`}),A(xe,we)}),z(re,be)});var R=p(y,2),B=f(R);let E;var C=p(B,2);let O;var L=p(C,2);let T;var D=p(R,2);ve(D,"",{},{"box-shadow":"var(--preview-shadow)"});var x=f(D);let k;var P=p(x,2),M=f(P),V=f(M);let U;var I=p(V,2),Y=f(I);ve(Y,"",{},{"font-family":"var(--sf-font-heading, system-ui, sans-serif)"});var G=p(I,2);let ae;var ue=p(M,2);ve(ue,"",{},{"font-family":"var(--sf-font-body, system-ui, sans-serif)"});var ce=p(ue,2),pe=f(ce);let ge;var N=p(pe,2);let oe;var me=p(N,2);let ye;var Ce=p(D,2),ze=p(f(Ce)),Re=f(ze);q(()=>{_=rt(d,1,"slashed-preview svelte-g79qke",null,_,{"is-dark":i(n)}),ve(d,i(l)),b=rt(m,1,"slashed-preview__mode-btn svelte-g79qke",null,b,{active:!i(n)}),h=rt(w,1,"slashed-preview__mode-btn svelte-g79qke",null,h,{active:i(n)}),E=ve(B,"",E,{background:`var(--sf-color-primary-${i(o)}, #4338ca)`}),O=ve(C,"",O,{background:`var(--sf-color-action-${i(o)}, #0891b2)`}),T=ve(L,"",T,{"border-color":`var(--sf-color-primary-${i(o)}, #4338ca)`,color:`var(--sf-color-primary-${i(o)}, #4338ca)`}),k=ve(x,"",k,{background:`var(--sf-color-primary-${i(o)}, #4338ca)`}),U=ve(V,"",U,{background:`var(--sf-color-secondary-${i(o)}, #7c3aed)`}),ae=ve(G,"",ae,{background:`var(--sf-color-success-${i(o)}, #16a34a)`}),ge=ve(pe,"",ge,{background:`var(--sf-color-info-${i(o)}, #0284c7)`}),oe=ve(N,"",oe,{background:`var(--sf-color-warning-${i(o)}, #ca8a04)`}),ye=ve(me,"",ye,{background:`var(--sf-color-action-${i(o)}, #0891b2)`}),A(Re,i(c)||"/* (defaults — no overrides set) */")}),he("click",m,()=>K(n,!1)),he("click",w,()=>K(n,!0)),z(e,d),Se()}De(["click"]);var fc=F(' '),uc=F('Saving…'),vc=F('Saved'),pc=F('Unsaved changes'),hc=F('All changes saved'),_c=F('
                                                    ');function gc(e,t){ke(t,!0);const s=["contrast","radius","shadows","motion","zindex"];async function a(){if(!W.saving){W.saving=!0,W.error="";try{if(W.activeTab==="misc"){const E=await Promise.allSettled(s.map(O=>wr(O,H[O]??{}))),C=[];if(E.forEach((O,L)=>{O.status==="fulfilled"?O.value?.values&&(H[s[L]]=O.value.values):C.push(s[L])}),C.length>0)throw new Error(`Failed to save: ${C.join(", ")}`)}else{const E=W.activeTab,C=H[E]??{},O=await wr(E,C);O&&O.values&&(H[E]=O.values)}W.dirty=!1,W.lastSavedAt=Date.now()}catch(E){W.error=E&&E.message||String(E)}finally{W.saving=!1}}}async function r(){if(!W.saving&&confirm(`Reset the ${ne.tabs[W.activeTab]??W.activeTab} tab to defaults?`)){W.saving=!0,W.error="";try{if(W.activeTab==="misc"){const E=await Promise.allSettled(s.map(O=>xr(O))),C=[];if(E.forEach((O,L)=>{O.status==="fulfilled"?yr(s[L]):C.push(s[L])}),C.length>0)throw new Error(`Failed to reset: ${C.join(", ")}`)}else await xr(W.activeTab),yr(W.activeTab);W.dirty=!1,W.lastSavedAt=Date.now()}catch(E){W.error=E&&E.message||String(E)}finally{W.saving=!1}}}let n=te(!1);an(()=>{if(W.lastSavedAt){K(n,!0);const E=setTimeout(()=>K(n,!1),2e3);return()=>clearTimeout(E)}});const l=j(()=>Lo(H));function o(){const E=ar(H);if(!E)return;const C=new Blob([E],{type:"text/css"}),O=URL.createObjectURL(C),L=document.createElement("a");L.href=O,L.download="slashed-custom.css",document.body.appendChild(L),L.click(),document.body.removeChild(L),URL.revokeObjectURL(O)}var c=_c();let d;var _=f(c),v=f(_);{var u=E=>{var C=fc(),O=f(C);q(()=>A(O,W.error)),z(E,C)},m=E=>{var C=uc();z(E,C)},b=E=>{var C=vc();z(E,C)},w=E=>{var C=pc();z(E,C)},h=E=>{var C=hc();z(E,C)};fe(v,E=>{W.error?E(u):W.saving?E(m,1):i(n)?E(b,2):W.dirty?E(w,3):E(h,-1)})}var y=p(_,2),S=f(y),$=p(S,2),R=p($,2),B=f(R);q(()=>{d=rt(c,1,"bar svelte-1oj49qa",null,d,{dirty:W.dirty}),S.disabled=W.saving,$.disabled=!i(l),R.disabled=W.saving||!W.dirty,A(B,W.saving?"Saving…":"Save changes")}),he("click",S,r),he("click",$,o),he("click",R,a),z(e,c),Se()}De(["click"]);var mc=F(' '),bc=F(' '),yc=F('

                                                    SLASHED Design Tokens

                                                    Adjust framework tokens, inspect generated variables, and manage the bundled CSS in one place.

                                                    ');function wc(e,t){ke(t,!0);const s=["cheatsheet","hooks","variables","classes","bundle","export"];let a=j(()=>s.includes(W.activeTab));an(()=>{function x(k){W.dirty&&(k.preventDefault(),k.returnValue="")}return window.addEventListener("beforeunload",x),()=>window.removeEventListener("beforeunload",x)});var r=yc(),n=f(r),l=f(n),o=p(f(l),2),c=f(o);{var d=x=>{var k=mc(),P=f(k);q(()=>A(P,`Framework ${ne.versions.framework??""}`)),z(x,k)};fe(c,x=>{ne.versions.framework&&x(d)})}var _=p(c,2);{var v=x=>{var k=bc(),P=f(k);q(()=>A(P,`Plugin v${ne.versions.plugin??""}`)),z(x,k)};fe(_,x=>{ne.versions.plugin&&x(v)})}var u=p(n,2);vl(u,{});var m=p(u,2),b=f(m);{var w=x=>{kl(x,{})},h=x=>{Hl(x,{})},y=x=>{Jl(x,{})},S=x=>{co(x,{})},$=x=>{ho(x,{})},R=x=>{wo(x,{})},B=x=>{$o(x,{})},E=x=>{Bo(x,{})},C=x=>{Uo(x)},O=x=>{ic(x,{})};fe(b,x=>{W.activeTab==="colors"?x(w):W.activeTab==="typography"?x(h,1):W.activeTab==="spacing"?x(y,2):W.activeTab==="misc"?x(S,3):W.activeTab==="variables"?x($,4):W.activeTab==="classes"?x(R,5):W.activeTab==="bundle"?x(B,6):W.activeTab==="export"?x(E,7):W.activeTab==="hooks"?x(C,8):W.activeTab==="cheatsheet"&&x(O,9)})}var L=p(m,2);dc(L,{});var T=p(L,2);{var D=x=>{gc(x,{})};fe(T,x=>{i(a)||x(D)})}z(e,r),Se()}const Er=document.getElementById("slashed-admin-app");Er&&Yi(wc,{target:Er}); + working together. All values update live as you adjust tokens.

                                                    Generated CSS:
                                                    `);function fc(e,t){ke(t,!0);const s=["primary","secondary","tertiary","action","neutral","base"],a=["success","warning","error","info","danger"],r=re.defaults?.colors??{};let n=te(!1);const l=j(()=>{const oe=[],we=H.colors??{},be=H.typography??{},Ke=H.radius??{},xe=H.shadows??{},pt=we.dark_overrides_enabled!=="0",zt=$e=>$e==="base"?"oklch(from var(--sf-color-base-light) clamp(0.16, calc(1.18 - l), 0.24) calc(c * 0.5) h)":`oklch(from var(--sf-color-${$e}-light) clamp(0.65, calc(0.95 - l * 0.5), 0.88) calc(c * 0.9) h)`;for(const $e of s){const Vt=we[`brand_${$e}`]??r.brand_hex_hints?.[$e];Vt&&oe.push(`--sf-color-${$e}-light:${Vt}`);const wa=pt?we[`brand_dark_${$e}`]:"";oe.push(`--sf-color-${$e}-dark:${wa||zt($e)}`)}for(const $e of a){const Vt=we[`status_${$e}`]??r.status_hex_hints?.[$e];Vt&&oe.push(`--sf-color-${$e}-light:${Vt}`);const wa=pt?we[`status_dark_${$e}`]:"";oe.push(`--sf-color-${$e}-dark:${wa||zt($e)}`)}be.font_body&&oe.push(`--sf-font-body:${be.font_body}`),be.font_heading&&oe.push(`--sf-font-heading:${be.font_heading}`);const it=parseFloat(Ke.radius_scale??re.defaults?.radius?.radius_scale??1)||1;oe.push(`--preview-radius-s:${Math.round(4*it)}px`),oe.push(`--preview-radius-m:${Math.round(8*it)}px`),oe.push(`--preview-radius-l:${Math.round(16*it)}px`);const Lt=xe.shadow_strength,ls=parseFloat(Lt!==void 0&&Lt!==""?Lt:re.defaults?.shadows?.shadow_strength??.08);return oe.push(`--preview-shadow:0 2px 8px 0 rgba(0,0,0,${(ls*2).toFixed(3)}),0 1px 3px 0 rgba(0,0,0,${ls.toFixed(3)})`),oe.join(";")}),o=j(()=>i(n)?"dark":"light"),c=j(()=>rr(H));var d=dc();let _;var v=f(d),u=p(f(v),2),m=f(u);let b;var w=p(m,2);let h;var y=p(v,6),S=f(y);ne(S,16,()=>s,oe=>oe,(oe,we)=>{var be=oc();let Ke;var xe=f(be);q(()=>{Q(be,"title",we),Ke=ve(be,"",Ke,{background:`var(--sf-color-${we}-${i(o)}, #ddd)`}),A(xe,we)}),z(oe,be)});var $=p(S,2);ne($,16,()=>a,oe=>oe,(oe,we)=>{var be=cc();let Ke;var xe=f(be);q(()=>{Q(be,"title",we),Ke=ve(be,"",Ke,{background:`var(--sf-color-${we}-${i(o)}, #ddd)`}),A(xe,we)}),z(oe,be)});var R=p(y,2),B=f(R);let E;var C=p(B,2);let O;var L=p(C,2);let T;var D=p(R,2);ve(D,"",{},{"box-shadow":"var(--preview-shadow)"});var x=f(D);let k;var P=p(x,2),M=f(P),V=f(M);let U;var I=p(V,2),Y=f(I);ve(Y,"",{},{"font-family":"var(--sf-font-heading, system-ui, sans-serif)"});var G=p(I,2);let ae;var ue=p(M,2);ve(ue,"",{},{"font-family":"var(--sf-font-body, system-ui, sans-serif)"});var ce=p(ue,2),pe=f(ce);let ge;var N=p(pe,2);let le;var me=p(N,2);let ye;var Ce=p(D,2),ze=p(f(Ce)),Re=f(ze);q(()=>{_=rt(d,1,"slashed-preview svelte-g79qke",null,_,{"is-dark":i(n)}),ve(d,i(l)),b=rt(m,1,"slashed-preview__mode-btn svelte-g79qke",null,b,{active:!i(n)}),h=rt(w,1,"slashed-preview__mode-btn svelte-g79qke",null,h,{active:i(n)}),E=ve(B,"",E,{background:`var(--sf-color-primary-${i(o)}, #4338ca)`}),O=ve(C,"",O,{background:`var(--sf-color-action-${i(o)}, #0891b2)`}),T=ve(L,"",T,{"border-color":`var(--sf-color-primary-${i(o)}, #4338ca)`,color:`var(--sf-color-primary-${i(o)}, #4338ca)`}),k=ve(x,"",k,{background:`var(--sf-color-primary-${i(o)}, #4338ca)`}),U=ve(V,"",U,{background:`var(--sf-color-secondary-${i(o)}, #7c3aed)`}),ae=ve(G,"",ae,{background:`var(--sf-color-success-${i(o)}, #16a34a)`}),ge=ve(pe,"",ge,{background:`var(--sf-color-info-${i(o)}, #0284c7)`}),le=ve(N,"",le,{background:`var(--sf-color-warning-${i(o)}, #ca8a04)`}),ye=ve(me,"",ye,{background:`var(--sf-color-action-${i(o)}, #0891b2)`}),A(Re,i(c)||"/* (defaults — no overrides set) */")}),he("click",m,()=>K(n,!1)),he("click",w,()=>K(n,!0)),z(e,d),Se()}De(["click"]);var uc=F(' '),vc=F('Saving…'),pc=F('Saved'),hc=F('Unsaved changes'),_c=F('All changes saved'),gc=F('
                                                    ');function mc(e,t){ke(t,!0);const s=["contrast","radius","shadows","motion","zindex"];async function a(){if(!W.saving){W.saving=!0,W.error="";try{if(W.activeTab==="misc"){const E=await Promise.allSettled(s.map(O=>xr(O,H[O]??{}))),C=[];if(E.forEach((O,L)=>{O.status==="fulfilled"?O.value?.values&&(H[s[L]]=O.value.values):C.push(s[L])}),C.length>0)throw new Error(`Failed to save: ${C.join(", ")}`)}else{const E=W.activeTab,C=H[E]??{},O=await xr(E,C);O&&O.values&&(H[E]=O.values)}W.dirty=!1,W.lastSavedAt=Date.now()}catch(E){W.error=E&&E.message||String(E)}finally{W.saving=!1}}}async function r(){if(!W.saving&&confirm(`Reset the ${re.tabs[W.activeTab]??W.activeTab} tab to defaults?`)){W.saving=!0,W.error="";try{if(W.activeTab==="misc"){const E=await Promise.allSettled(s.map(O=>kr(O))),C=[];if(E.forEach((O,L)=>{O.status==="fulfilled"?wr(s[L]):C.push(s[L])}),C.length>0)throw new Error(`Failed to reset: ${C.join(", ")}`)}else await kr(W.activeTab),wr(W.activeTab);W.dirty=!1,W.lastSavedAt=Date.now()}catch(E){W.error=E&&E.message||String(E)}finally{W.saving=!1}}}let n=te(!1);rn(()=>{if(W.lastSavedAt){K(n,!0);const E=setTimeout(()=>K(n,!1),2e3);return()=>clearTimeout(E)}});const l=j(()=>Vo(H));function o(){const E=rr(H);if(!E)return;const C=new Blob([E],{type:"text/css"}),O=URL.createObjectURL(C),L=document.createElement("a");L.href=O,L.download="slashed-custom.css",document.body.appendChild(L),L.click(),document.body.removeChild(L),URL.revokeObjectURL(O)}var c=gc();let d;var _=f(c),v=f(_);{var u=E=>{var C=uc(),O=f(C);q(()=>A(O,W.error)),z(E,C)},m=E=>{var C=vc();z(E,C)},b=E=>{var C=pc();z(E,C)},w=E=>{var C=hc();z(E,C)},h=E=>{var C=_c();z(E,C)};fe(v,E=>{W.error?E(u):W.saving?E(m,1):i(n)?E(b,2):W.dirty?E(w,3):E(h,-1)})}var y=p(_,2),S=f(y),$=p(S,2),R=p($,2),B=f(R);q(()=>{d=rt(c,1,"bar svelte-1oj49qa",null,d,{dirty:W.dirty}),S.disabled=W.saving,$.disabled=!i(l),R.disabled=W.saving||!W.dirty,A(B,W.saving?"Saving…":"Save changes")}),he("click",S,r),he("click",$,o),he("click",R,a),z(e,c),Se()}De(["click"]);var bc=F(' '),yc=F(' '),wc=F('

                                                    SLASHED Design Tokens

                                                    Adjust framework tokens, inspect generated variables, and manage the bundled CSS in one place.

                                                    ');function xc(e,t){ke(t,!0);const s=["cheatsheet","hooks","variables","classes","bundle","export"];let a=j(()=>s.includes(W.activeTab));rn(()=>{function x(k){W.dirty&&(k.preventDefault(),k.returnValue="")}return window.addEventListener("beforeunload",x),()=>window.removeEventListener("beforeunload",x)});var r=wc(),n=f(r),l=f(n),o=p(f(l),2),c=f(o);{var d=x=>{var k=bc(),P=f(k);q(()=>A(P,`Framework ${re.versions.framework??""}`)),z(x,k)};fe(c,x=>{re.versions.framework&&x(d)})}var _=p(c,2);{var v=x=>{var k=yc(),P=f(k);q(()=>A(P,`Plugin v${re.versions.plugin??""}`)),z(x,k)};fe(_,x=>{re.versions.plugin&&x(v)})}var u=p(n,2);pl(u,{});var m=p(u,2),b=f(m);{var w=x=>{Sl(x,{})},h=x=>{Ul(x,{})},y=x=>{Ql(x,{})},S=x=>{fo(x,{})},$=x=>{_o(x,{})},R=x=>{xo(x,{})},B=x=>{Co(x,{})},E=x=>{Ko(x,{})},C=x=>{Go(x)},O=x=>{lc(x,{})};fe(b,x=>{W.activeTab==="colors"?x(w):W.activeTab==="typography"?x(h,1):W.activeTab==="spacing"?x(y,2):W.activeTab==="misc"?x(S,3):W.activeTab==="variables"?x($,4):W.activeTab==="classes"?x(R,5):W.activeTab==="bundle"?x(B,6):W.activeTab==="export"?x(E,7):W.activeTab==="hooks"?x(C,8):W.activeTab==="cheatsheet"&&x(O,9)})}var L=p(m,2);fc(L,{});var T=p(L,2);{var D=x=>{mc(x,{})};fe(T,x=>{i(a)||x(D)})}z(e,r),Se()}const jr=document.getElementById("slashed-admin-app");jr&&Xi(xc,{target:jr}); //# sourceMappingURL=app.js.map From d5ce9e33ee29aaa9da2696af4247aa5bfc8315b5 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 29 May 2026 15:54:06 +0000 Subject: [PATCH 3/3] refactor(preview): hoist dark-formula helpers to module level Move autoDarkStandard/autoDarkBase/autoDark out of the $derived.by() closure so they are defined once at module load rather than recreated on every reactive re-render. Behaviour is unchanged. https://claude.ai/code/session_019MD9F8rrpYzCeDTmSTLA1K --- .../src/components/LivePreview.svelte | 20 +++++++++------- integrations/bricks/assets/admin-app/app.js | 24 +++++++++---------- 2 files changed, 23 insertions(+), 21 deletions(-) diff --git a/integrations/bricks/admin-app/src/components/LivePreview.svelte b/integrations/bricks/admin-app/src/components/LivePreview.svelte index d3407c7b..e35f99e9 100644 --- a/integrations/bricks/admin-app/src/components/LivePreview.svelte +++ b/integrations/bricks/admin-app/src/components/LivePreview.svelte @@ -28,6 +28,17 @@ const statuses = ['success', 'warning', 'error', 'info', 'danger']; const defaultColors = meta.defaults?.colors ?? {}; + // Auto-derivation formulas matching core/tokens.css verbatim. + // Module-level so they're defined once, not recreated per render. + const autoDarkStandard = (light) => + `oklch(from var(${light}) clamp(0.65, calc(0.95 - l * 0.5), 0.88) calc(c * 0.9) h)`; + const autoDarkBase = (light) => + `oklch(from var(${light}) clamp(0.16, calc(1.18 - l), 0.24) calc(c * 0.5) h)`; + const autoDark = (name) => { + const light = `--sf-color-${name}-light`; + return name === 'base' ? autoDarkBase(light) : autoDarkStandard(light); + }; + /** Light / dark mode toggle for the preview panel. */ let darkMode = $state(false); @@ -48,15 +59,6 @@ // what the front-end actually renders. When enabled, use stored values. const darkEnabled = colors.dark_overrides_enabled !== '0'; - // Auto-derivation formula matching core/tokens.css. Used when: - // a) toggle is OFF (all colors auto-derived), or - // b) toggle is ON but no explicit dark value stored for that color. - // This mirrors the framework's own fallback so the preview is accurate - // even when only some dark overrides are set. - const autoDark = (name) => name === 'base' - ? `oklch(from var(--sf-color-base-light) clamp(0.16, calc(1.18 - l), 0.24) calc(c * 0.5) h)` - : `oklch(from var(--sf-color-${name}-light) clamp(0.65, calc(0.95 - l * 0.5), 0.88) calc(c * 0.9) h)`; - for (const name of brand) { const v = colors[`brand_${name}`] ?? defaultColors.brand_hex_hints?.[name]; if (v) pairs.push(`--sf-color-${name}-light:${v}`); diff --git a/integrations/bricks/assets/admin-app/app.js b/integrations/bricks/assets/admin-app/app.js index d72f600e..4394cda9 100644 --- a/integrations/bricks/assets/admin-app/app.js +++ b/integrations/bricks/assets/admin-app/app.js @@ -1,17 +1,17 @@ -var En=Object.defineProperty;var nr=e=>{throw TypeError(e)};var jn=(e,t,s)=>t in e?En(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s;var Ve=(e,t,s)=>jn(e,typeof t!="symbol"?t+"":t,s),xa=(e,t,s)=>t.has(e)||nr("Cannot "+s);var g=(e,t,s)=>(xa(e,t,"read from private field"),s?s.call(e):t.get(e)),Z=(e,t,s)=>t.has(e)?nr("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,s),X=(e,t,s,a)=>(xa(e,t,"write to private field"),a?a.call(e,s):t.set(e,s),s),ie=(e,t,s)=>(xa(e,t,"access private method"),s);var Ha=Array.isArray,Tn=Array.prototype.indexOf,Xt=Array.prototype.includes,va=Array.from,$n=Object.defineProperty,us=Object.getOwnPropertyDescriptor,Cn=Object.getOwnPropertyDescriptors,zn=Object.prototype,An=Array.prototype,$r=Object.getPrototypeOf,ir=Object.isExtensible;const Cr=()=>{};function Fn(e){for(var t=0;t{e=a,t=r});return{promise:s,resolve:e,reject:t}}function ot(e,t){if(Array.isArray(e))return e;if(t===void 0||!(Symbol.iterator in e))return Array.from(e);const s=[];for(const a of e)if(s.push(a),s.length===t)break;return s}const Oe=2,ys=4,pa=8,Ar=1<<24,ct=16,vt=32,Pt=64,za=128,tt=512,Fe=1024,Me=2048,bt=4096,Le=8192,st=16384,is=32768,Aa=1<<25,ss=65536,ta=1<<17,Rn=1<<18,Es=1<<19,Mn=1<<20,mt=1<<25,as=65536,sa=1<<21,vs=1<<22,Dt=1<<23,Zt=Symbol("$state"),On=Symbol("legacy props"),Dn=Symbol(""),Ws=Symbol("attributes"),Fa=Symbol("class"),Ra=Symbol("style"),$s=Symbol("text"),Ys=Symbol("form reset"),ha=new class extends Error{constructor(){super(...arguments);Ve(this,"name","StaleReactionError");Ve(this,"message","The reaction that called `getAbortSignal()` was re-run or destroyed")}},Pn=!!globalThis.document?.contentType&&globalThis.document.contentType.includes("xml");function Ln(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function Vn(e,t,s){throw new Error("https://svelte.dev/e/each_key_duplicate")}function In(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function qn(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function Nn(e){throw new Error("https://svelte.dev/e/effect_orphan")}function Bn(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function Kn(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function Hn(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Un(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Gn(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function Wn(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}const Yn=1,Xn=2,Fr=4,Zn=8,Jn=16,Qn=1,ei=4,ti=8,si=16,ai=1,ri=2,Ae=Symbol("uninitialized"),Rr="http://www.w3.org/1999/xhtml";function ni(){console.warn("https://svelte.dev/e/derived_inert")}function ii(){console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function li(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}function Mr(e){return e===this.v}function oi(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function Or(e){return!oi(e,this.v)}let Ye=null;function ws(e){Ye=e}function ke(e,t=!1,s){Ye={p:Ye,i:!1,c:null,e:null,s:e,x:null,r:se,l:null}}function Se(e){var t=Ye,s=t.e;if(s!==null){t.e=null;for(var a of s)nn(a)}return t.i=!0,Ye=t.p,{}}function Dr(){return!0}let qt=[];function Pr(){var e=qt;qt=[],Fn(e)}function Jt(e){if(qt.length===0&&!As){var t=qt;queueMicrotask(()=>{t===qt&&Pr()})}qt.push(e)}function ci(){for(;qt.length>0;)Pr()}function Lr(e){var t=se;if(t===null)return ee.f|=Dt,e;if((t.f&is)===0&&(t.f&ys)===0)throw e;Ot(e,t)}function Ot(e,t){for(;t!==null;){if((t.f&za)!==0){if((t.f&is)===0)throw e;try{t.b.error(e);return}catch(s){e=s}}t=t.parent}throw e}const di=-7169;function Ee(e,t){e.f=e.f&di|t}function Ua(e){(e.f&tt)!==0||e.deps===null?Ee(e,Fe):Ee(e,bt)}function Vr(e){if(e!==null)for(const t of e)(t.f&Oe)===0||(t.f&as)===0||(t.f^=as,Vr(t.deps))}function Ir(e,t,s){(e.f&Me)!==0?t.add(e):(e.f&bt)!==0&&s.add(e),Vr(e.deps),Ee(e,Fe)}let Ks=!1;function fi(e){var t=Ks;try{return Ks=!1,[e(),Ks]}finally{Ks=t}}let ka=null,os=null,J=null,Ma=null,dt=null,Oa=null,As=!1,Sa=!1,fs=null,Xs=null;var lr=0;let ui=1;var ps,Ft,Kt,hs,_s,Ht,gs,kt,Ds,Ue,Ps,Rt,ht,_t,ms,Ut,de,Da,Cs,Pa,qr,Nr,Zs,vi,La,ds;const da=class da{constructor(){Z(this,de);Ve(this,"id",ui++);Z(this,ps,!1);Ve(this,"linked",!0);Z(this,Ft,null);Z(this,Kt,null);Ve(this,"async_deriveds",new Map);Ve(this,"current",new Map);Ve(this,"previous",new Map);Ve(this,"unblocked",new Set);Z(this,hs,new Set);Z(this,_s,new Set);Z(this,Ht,new Set);Z(this,gs,0);Z(this,kt,new Map);Z(this,Ds,null);Z(this,Ue,[]);Z(this,Ps,[]);Z(this,Rt,new Set);Z(this,ht,new Set);Z(this,_t,new Map);Z(this,ms,new Set);Ve(this,"is_fork",!1);Z(this,Ut,!1)}skip_effect(t){g(this,_t).has(t)||g(this,_t).set(t,{d:[],m:[]}),g(this,ms).delete(t)}unskip_effect(t,s=a=>this.schedule(a)){var a=g(this,_t).get(t);if(a){g(this,_t).delete(t);for(var r of a.d)Ee(r,Me),s(r);for(r of a.m)Ee(r,bt),s(r)}g(this,ms).add(t)}capture(t,s,a=!1){t.v!==Ae&&!this.previous.has(t)&&this.previous.set(t,t.v),(t.f&Dt)===0&&(this.current.set(t,[s,a]),dt?.set(t,s)),this.is_fork||(t.v=s)}activate(){J=this}deactivate(){J=null,dt=null}flush(){try{Sa=!0,J=this,ie(this,de,Cs).call(this)}finally{lr=0,Oa=null,fs=null,Xs=null,Sa=!1,J=null,dt=null,Qt.clear()}}discard(){for(const t of g(this,_s))t(this);g(this,_s).clear(),g(this,Ht).clear(),ie(this,de,ds).call(this)}register_created_effect(t){g(this,Ps).push(t)}increment(t,s){if(X(this,gs,g(this,gs)+1),t){let a=g(this,kt).get(s)??0;g(this,kt).set(s,a+1)}}decrement(t,s){if(X(this,gs,g(this,gs)-1),t){let a=g(this,kt).get(s)??0;a===1?g(this,kt).delete(s):g(this,kt).set(s,a-1)}g(this,Ut)||(X(this,Ut,!0),Jt(()=>{X(this,Ut,!1),this.linked&&this.flush()}))}transfer_effects(t,s){for(const a of t)g(this,Rt).add(a);for(const a of s)g(this,ht).add(a);t.clear(),s.clear()}oncommit(t){g(this,hs).add(t)}ondiscard(t){g(this,_s).add(t)}on_fork_commit(t){g(this,Ht).add(t)}run_fork_commit_callbacks(){for(const t of g(this,Ht))t(this);g(this,Ht).clear()}settled(){return(g(this,Ds)??X(this,Ds,zr())).promise}static ensure(){var t;if(J===null){const s=J=new da;ie(t=s,de,La).call(t),!Sa&&!As&&Jt(()=>{g(s,ps)||s.flush()})}return J}apply(){{dt=null;return}}schedule(t){if(Oa=t,t.b?.is_pending&&(t.f&(ys|pa|Ar))!==0&&(t.f&is)===0){t.b.defer_effect(t);return}for(var s=t;s.parent!==null;){s=s.parent;var a=s.f;if(fs!==null&&s===se&&(ee===null||(ee.f&Oe)===0))return;if((a&(Pt|vt))!==0){if((a&Fe)===0)return;s.f^=Fe}}g(this,Ue).push(s)}};ps=new WeakMap,Ft=new WeakMap,Kt=new WeakMap,hs=new WeakMap,_s=new WeakMap,Ht=new WeakMap,gs=new WeakMap,kt=new WeakMap,Ds=new WeakMap,Ue=new WeakMap,Ps=new WeakMap,Rt=new WeakMap,ht=new WeakMap,_t=new WeakMap,ms=new WeakMap,Ut=new WeakMap,de=new WeakSet,Da=function(){if(this.is_fork)return!0;for(const a of g(this,kt).keys()){for(var t=a,s=!1;t.parent!==null;){if(g(this,_t).has(t)){s=!0;break}t=t.parent}if(!s)return!0}return!1},Cs=function(){var c,d,_;if(X(this,ps,!0),lr++>1e3&&(ie(this,de,ds).call(this),hi()),!ie(this,de,Da).call(this)){for(const v of g(this,Rt))g(this,ht).delete(v),Ee(v,Me),this.schedule(v);for(const v of g(this,ht))Ee(v,bt),this.schedule(v)}const t=g(this,Ue);X(this,Ue,[]),this.apply();var s=fs=[],a=[],r=Xs=[];for(const v of t)try{ie(this,de,Pa).call(this,v,s,a)}catch(u){throw Hr(v),u}if(J=null,r.length>0){var n=da.ensure();for(const v of r)n.schedule(v)}if(fs=null,Xs=null,ie(this,de,Da).call(this)){ie(this,de,Zs).call(this,a),ie(this,de,Zs).call(this,s);for(const[v,u]of g(this,_t))Kr(v,u);r.length>0&&ie(c=J,de,Cs).call(c);return}const l=ie(this,de,qr).call(this);if(l){ie(d=l,de,Nr).call(d,this);return}g(this,Rt).clear(),g(this,ht).clear();for(const v of g(this,hs))v(this);g(this,hs).clear(),Ma=this,or(a),or(s),Ma=null,g(this,Ds)?.resolve();var o=J;if(this.linked&&g(this,gs)===0&&ie(this,de,ds).call(this),g(this,Ue).length>0){o===null&&(o=this,ie(this,de,La).call(this));const v=o;g(v,Ue).push(...g(this,Ue).filter(u=>!g(v,Ue).includes(u)))}o!==null&&ie(_=o,de,Cs).call(_)},Pa=function(t,s,a){t.f^=Fe;for(var r=t.first;r!==null;){var n=r.f,l=(n&(vt|Pt))!==0,o=l&&(n&Fe)!==0,c=o||(n&Le)!==0||g(this,_t).has(r);if(!c&&r.fn!==null){l?r.f^=Fe:(n&ys)!==0?s.push(r):Bs(r)&&((n&ct)!==0&&g(this,ht).add(r),ks(r));var d=r.first;if(d!==null){r=d;continue}}for(;r!==null;){var _=r.next;if(_!==null){r=_;break}r=r.parent}}},qr=function(){for(var t=g(this,Ft);t!==null;){if(!t.is_fork){for(const[s,[,a]]of this.current)if(t.current.has(s)&&!a)return t}t=g(t,Ft)}return null},Nr=function(t){var a;for(const[r,n]of t.current)!this.previous.has(r)&&t.previous.has(r)&&this.previous.set(r,t.previous.get(r)),this.current.set(r,n);for(const[r,n]of t.async_deriveds){const l=this.async_deriveds.get(r);l&&n.promise.then(l.resolve)}const s=r=>{var n=r.reactions;if(n!==null)for(const c of n){var l=c.f;if((l&Oe)!==0)s(c);else{var o=c;l&(vs|ct)&&!this.async_deriveds.has(o)&&(g(this,ht).delete(o),Ee(o,Me),this.schedule(o))}}};for(const r of this.current.keys())s(r);this.oncommit(()=>t.discard()),ie(a=t,de,ds).call(a),J=this,ie(this,de,Cs).call(this)},Zs=function(t){for(var s=0;s!this.current.has(u));if(r.length===0)t&&v.discard();else if(s.length>0){if(t)for(const u of g(this,ms))v.unskip_effect(u,m=>{var b;(m.f&(ct|vs))!==0?v.schedule(m):ie(b=v,de,Zs).call(b,[m])});v.activate();var n=new Set,l=new Map;for(var o of s)Br(o,r,n,l);l=new Map;var c=[...v.current.keys()].filter(u=>this.current.has(u)?this.current.get(u)[0]!==u.v:!0);if(c.length>0)for(const u of g(this,Ps))(u.f&(st|Le|ta))===0&&Ga(u,c,l)&&((u.f&(vs|ct))!==0?(Ee(u,Me),v.schedule(u)):g(v,Rt).add(u));if(g(v,Ue).length>0&&!g(v,Ut)){v.apply();for(var d of g(v,Ue))ie(_=v,de,Pa).call(_,d,[],[]);X(v,Ue,[])}v.deactivate()}}}},La=function(){os===null?ka=os=this:(X(os,Kt,this),X(this,Ft,os)),os=this},ds=function(){var t=g(this,Ft),s=g(this,Kt);t===null?ka=s:X(t,Kt,s),s===null?os=t:X(s,Ft,t),this.linked=!1};let rs=da;function pi(e){var t=As;As=!0;try{for(var s;;){if(ci(),J===null)return s;J.flush()}}finally{As=t}}function hi(){try{Bn()}catch(e){Ot(e,Oa)}}let xt=null;function or(e){var t=e.length;if(t!==0){for(var s=0;s0)){Qt.clear();for(const r of xt){if((r.f&(st|Le))!==0)continue;const n=[r];let l=r.parent;for(;l!==null;)xt.has(l)&&(xt.delete(l),n.push(l)),l=l.parent;for(let o=n.length-1;o>=0;o--){const c=n[o];(c.f&(st|Le))===0&&ks(c)}}xt.clear()}}xt=null}}function Br(e,t,s,a){if(!s.has(e)&&(s.add(e),e.reactions!==null))for(const r of e.reactions){const n=r.f;(n&Oe)!==0?Br(r,t,s,a):(n&(vs|ct))!==0&&(n&Me)===0&&Ga(r,t,a)&&(Ee(r,Me),Wa(r))}}function Ga(e,t,s){const a=s.get(e);if(a!==void 0)return a;if(e.deps!==null)for(const r of e.deps){if(Xt.call(t,r))return!0;if((r.f&Oe)!==0&&Ga(r,t,s))return s.set(r,!0),!0}return s.set(e,!1),!1}function Wa(e){J.schedule(e)}function Kr(e,t){if(!((e.f&vt)!==0&&(e.f&Fe)!==0)){(e.f&Me)!==0?t.d.push(e):(e.f&bt)!==0&&t.m.push(e),Ee(e,Fe);for(var s=e.first;s!==null;)Kr(s,t),s=s.next}}function Hr(e){Ee(e,Fe);for(var t=e.first;t!==null;)Hr(t),t=t.next}function _i(e){let t=0,s=ns(0),a;return()=>{Za()&&(i(s),Ja(()=>(t===0&&(a=ga(()=>e(()=>Fs(s)))),t+=1,()=>{Jt(()=>{t-=1,t===0&&(a?.(),a=void 0,Fs(s))})})))}}var gi=ss|Es;function mi(e,t,s,a){new bi(e,t,s,a)}var Ze,Ka,Je,Gt,Ie,Qe,Pe,Ge,St,Wt,Mt,bs,Ls,Vs,Et,fa,Te,yi,wi,xi,Va,Js,Qs,Ia,qa;class bi{constructor(t,s,a,r){Z(this,Te);Ve(this,"parent");Ve(this,"is_pending",!1);Ve(this,"transform_error");Z(this,Ze);Z(this,Ka,null);Z(this,Je);Z(this,Gt);Z(this,Ie);Z(this,Qe,null);Z(this,Pe,null);Z(this,Ge,null);Z(this,St,null);Z(this,Wt,0);Z(this,Mt,0);Z(this,bs,!1);Z(this,Ls,new Set);Z(this,Vs,new Set);Z(this,Et,null);Z(this,fa,_i(()=>(X(this,Et,ns(g(this,Wt))),()=>{X(this,Et,null)})));X(this,Ze,t),X(this,Je,s),X(this,Gt,n=>{var l=se;l.b=this,l.f|=za,a(n)}),this.parent=se.b,this.transform_error=r??this.parent?.transform_error??(n=>n),X(this,Ie,_a(()=>{ie(this,Te,Va).call(this)},gi))}defer_effect(t){Ir(t,g(this,Ls),g(this,Vs))}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!g(this,Je).pending}update_pending_count(t,s){ie(this,Te,Ia).call(this,t,s),X(this,Wt,g(this,Wt)+t),!(!g(this,Et)||g(this,bs))&&(X(this,bs,!0),Jt(()=>{X(this,bs,!1),g(this,Et)&&xs(g(this,Et),g(this,Wt))}))}get_effect_pending(){return g(this,fa).call(this),i(g(this,Et))}error(t){if(!g(this,Je).onerror&&!g(this,Je).failed)throw t;J?.is_fork?(g(this,Qe)&&J.skip_effect(g(this,Qe)),g(this,Pe)&&J.skip_effect(g(this,Pe)),g(this,Ge)&&J.skip_effect(g(this,Ge)),J.on_fork_commit(()=>{ie(this,Te,qa).call(this,t)})):ie(this,Te,qa).call(this,t)}}Ze=new WeakMap,Ka=new WeakMap,Je=new WeakMap,Gt=new WeakMap,Ie=new WeakMap,Qe=new WeakMap,Pe=new WeakMap,Ge=new WeakMap,St=new WeakMap,Wt=new WeakMap,Mt=new WeakMap,bs=new WeakMap,Ls=new WeakMap,Vs=new WeakMap,Et=new WeakMap,fa=new WeakMap,Te=new WeakSet,yi=function(){try{X(this,Qe,et(()=>g(this,Gt).call(this,g(this,Ze))))}catch(t){this.error(t)}},wi=function(t){const s=g(this,Je).failed;s&&X(this,Ge,et(()=>{s(g(this,Ze),()=>t,()=>()=>{})}))},xi=function(){const t=g(this,Je).pending;t&&(this.is_pending=!0,X(this,Pe,et(()=>t(g(this,Ze)))),Jt(()=>{var s=X(this,St,document.createDocumentFragment()),a=jt();s.append(a),X(this,Qe,ie(this,Te,Qs).call(this,()=>et(()=>g(this,Gt).call(this,a)))),g(this,Mt)===0&&(g(this,Ze).before(s),X(this,St,null),es(g(this,Pe),()=>{X(this,Pe,null)}),ie(this,Te,Js).call(this,J))}))},Va=function(){try{if(this.is_pending=this.has_pending_snippet(),X(this,Mt,0),X(this,Wt,0),X(this,Qe,et(()=>{g(this,Gt).call(this,g(this,Ze))})),g(this,Mt)>0){var t=X(this,St,document.createDocumentFragment());tr(g(this,Qe),t);const s=g(this,Je).pending;X(this,Pe,et(()=>s(g(this,Ze))))}else ie(this,Te,Js).call(this,J)}catch(s){this.error(s)}},Js=function(t){this.is_pending=!1,t.transfer_effects(g(this,Ls),g(this,Vs))},Qs=function(t){var s=se,a=ee,r=Ye;wt(g(this,Ie)),nt(g(this,Ie)),ws(g(this,Ie).ctx);try{return rs.ensure(),t()}catch(n){return Lr(n),null}finally{wt(s),nt(a),ws(r)}},Ia=function(t,s){var a;if(!this.has_pending_snippet()){this.parent&&ie(a=this.parent,Te,Ia).call(a,t,s);return}X(this,Mt,g(this,Mt)+t),g(this,Mt)===0&&(ie(this,Te,Js).call(this,s),g(this,Pe)&&es(g(this,Pe),()=>{X(this,Pe,null)}),g(this,St)&&(g(this,Ze).before(g(this,St)),X(this,St,null)))},qa=function(t){g(this,Qe)&&(Be(g(this,Qe)),X(this,Qe,null)),g(this,Pe)&&(Be(g(this,Pe)),X(this,Pe,null)),g(this,Ge)&&(Be(g(this,Ge)),X(this,Ge,null));var s=g(this,Je).onerror;let a=g(this,Je).failed;var r=!1,n=!1;const l=()=>{if(r){li();return}r=!0,n&&Wn(),g(this,Ge)!==null&&es(g(this,Ge),()=>{X(this,Ge,null)}),ie(this,Te,Qs).call(this,()=>{ie(this,Te,Va).call(this)})},o=c=>{try{n=!0,s?.(c,l),n=!1}catch(d){Ot(d,g(this,Ie)&&g(this,Ie).parent)}a&&X(this,Ge,ie(this,Te,Qs).call(this,()=>{try{return et(()=>{var d=se;d.b=this,d.f|=za,a(g(this,Ze),()=>c,()=>l)})}catch(d){return Ot(d,g(this,Ie).parent),null}}))};Jt(()=>{var c;try{c=this.transform_error(t)}catch(d){Ot(d,g(this,Ie)&&g(this,Ie).parent);return}c!==null&&typeof c=="object"&&typeof c.then=="function"?c.then(o,d=>Ot(d,g(this,Ie)&&g(this,Ie).parent)):o(c)})};function ki(e,t,s,a){const r=Ms;var n=e.filter(u=>!u.settled);if(s.length===0&&n.length===0){a(t.map(r));return}var l=se,o=Si(),c=n.length===1?n[0].promise:n.length>1?Promise.all(n.map(u=>u.promise)):null;function d(u){if((l.f&st)===0){o();try{a(u)}catch(m){Ot(m,l)}aa()}}var _=Ur();if(s.length===0){c.then(()=>d(t.map(r))).finally(_);return}function v(){Promise.all(s.map(u=>Ei(u))).then(u=>d([...t.map(r),...u])).catch(u=>Ot(u,l)).finally(_)}c?c.then(()=>{o(),v(),aa()}):v()}function Si(){var e=se,t=ee,s=Ye,a=J;return function(n=!0){wt(e),nt(t),ws(s),n&&(e.f&st)===0&&(a?.activate(),a?.apply())}}function aa(e=!0){wt(null),nt(null),ws(null),e&&J?.deactivate()}function Ur(){var e=se,t=e.b,s=J,a=t.is_rendered();return t.update_pending_count(1,s),s.increment(a,e),()=>{t.update_pending_count(-1,s),s.decrement(a,e)}}function Ms(e){var t=Oe|Me;return se!==null&&(se.f|=Es),{ctx:Ye,deps:null,effects:null,equals:Mr,f:t,fn:e,reactions:null,rv:0,v:Ae,wv:0,parent:se,ac:null}}const Hs=Symbol("obsolete");function Ei(e,t,s){let a=se;a===null&&Ln();var r=void 0,n=ns(Ae),l=!ee,o=new Set;return Li(()=>{var c=se,d=zr();r=d.promise;try{Promise.resolve(e()).then(d.resolve,m=>{m!==ha&&d.reject(m)}).finally(aa)}catch(m){d.reject(m),aa()}var _=J;if(l){if((c.f&is)!==0)var v=Ur();if(a.b.is_rendered())_.async_deriveds.get(c)?.reject(Hs);else for(const m of o.values())m.reject(Hs);o.add(d),_.async_deriveds.set(c,d)}const u=(m,b=void 0)=>{v?.(),o.delete(d),b!==Hs&&(_.activate(),b?(n.f|=Dt,xs(n,b)):((n.f&Dt)!==0&&(n.f^=Dt),xs(n,m)),_.deactivate())};d.promise.then(u,m=>u(null,m||"unknown"))}),an(()=>{for(const c of o)c.reject(Hs)}),new Promise(c=>{function d(_){function v(){_===r?c(n):d(r)}_.then(v,v)}d(r)})}function j(e){const t=Ms(e);return un(t),t}function Gr(e){const t=Ms(e);return t.equals=Or,t}function ji(e){var t=e.effects;if(t!==null){e.effects=null;for(var s=0;s0&&!Xr&&Ci()}return t}function Ci(){Xr=!1;for(const e of ra){(e.f&Fe)!==0&&Ee(e,bt);let t;try{t=Bs(e)}catch{t=!0}t&&ks(e)}ra.clear()}function Fs(e){K(e,e.v+1)}function Zr(e,t,s){var a=e.reactions;if(a!==null)for(var r=a.length,n=0;n{if(ts===n)return o();var c=ee,d=ts;nt(null),vr(n);var _=o();return nt(c),vr(d),_};return a&&s.set("length",te(e.length)),new Proxy(e,{defineProperty(o,c,d){(!("value"in d)||d.configurable===!1||d.enumerable===!1||d.writable===!1)&&Hn();var _=s.get(c);return _===void 0?l(()=>{var v=te(d.value);return s.set(c,v),v}):K(_,d.value,!0),!0},deleteProperty(o,c){var d=s.get(c);if(d===void 0){if(c in o){const _=l(()=>te(Ae));s.set(c,_),Fs(r)}}else K(d,Ae),Fs(r);return!0},get(o,c,d){if(c===Zt)return e;var _=s.get(c),v=c in o;if(_===void 0&&(!v||us(o,c)?.writable)&&(_=l(()=>{var m=Ne(v?o[c]:Ae),b=te(m);return b}),s.set(c,_)),_!==void 0){var u=i(_);return u===Ae?void 0:u}return Reflect.get(o,c,d)},getOwnPropertyDescriptor(o,c){var d=Reflect.getOwnPropertyDescriptor(o,c);if(d&&"value"in d){var _=s.get(c);_&&(d.value=i(_))}else if(d===void 0){var v=s.get(c),u=v?.v;if(v!==void 0&&u!==Ae)return{enumerable:!0,configurable:!0,value:u,writable:!0}}return d},has(o,c){if(c===Zt)return!0;var d=s.get(c),_=d!==void 0&&d.v!==Ae||Reflect.has(o,c);if(d!==void 0||se!==null&&(!_||us(o,c)?.writable)){d===void 0&&(d=l(()=>{var u=_?Ne(o[c]):Ae,m=te(u);return m}),s.set(c,d));var v=i(d);if(v===Ae)return!1}return _},set(o,c,d,_){var v=s.get(c),u=c in o;if(a&&c==="length")for(var m=d;mte(Ae)),s.set(m+"",b))}if(v===void 0)(!u||us(o,c)?.writable)&&(v=l(()=>te(void 0)),K(v,Ne(d)),s.set(c,v));else{u=v.v!==Ae;var w=l(()=>Ne(d));K(v,w)}var h=Reflect.getOwnPropertyDescriptor(o,c);if(h?.set&&h.set.call(_,d),!u){if(a&&typeof c=="string"){var y=s.get("length"),S=Number(c);Number.isInteger(S)&&S>=y.v&&K(y,S+1)}Fs(r)}return!0},ownKeys(o){i(r);var c=Reflect.ownKeys(o).filter(v=>{var u=s.get(v);return u===void 0||u.v!==Ae});for(var[d,_]of s)_.v!==Ae&&!(d in o)&&c.push(d);return c},setPrototypeOf(){Un()}})}function cr(e){try{if(e!==null&&typeof e=="object"&&Zt in e)return e[Zt]}catch{}return e}function zi(e,t){return Object.is(cr(e),cr(t))}var dr,Jr,Qr,en;function Ai(){if(dr===void 0){dr=window,Jr=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,s=Text.prototype;Qr=us(t,"firstChild").get,en=us(t,"nextSibling").get,ir(e)&&(e[Fa]=void 0,e[Ws]=null,e[Ra]=void 0,e.__e=void 0),ir(s)&&(s[$s]=void 0)}}function jt(e=""){return document.createTextNode(e)}function na(e){return Qr.call(e)}function Ns(e){return en.call(e)}function f(e,t){return na(e)}function yt(e,t=!1){{var s=na(e);return s instanceof Comment&&s.data===""?Ns(s):s}}function p(e,t=1,s=!1){let a=e;for(;t--;)a=Ns(a);return a}function Fi(e){e.textContent=""}function tn(){return!1}function Ri(e,t,s){return document.createElementNS(Rr,e,void 0)}let fr=!1;function Mi(){fr||(fr=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(const t of e.target.elements)t[Ys]?.()})},{capture:!0}))}function Xa(e){var t=ee,s=se;nt(null),wt(null);try{return e()}finally{nt(t),wt(s)}}function sn(e,t,s,a=s){e.addEventListener(t,()=>Xa(s));const r=e[Ys];r?e[Ys]=()=>{r(),a(!0)}:e[Ys]=()=>a(!0),Mi()}function Oi(e){se===null&&(ee===null&&Nn(),qn()),$t&&In()}function Di(e,t){var s=t.last;s===null?t.last=t.first=e:(s.next=e,e.prev=s,t.last=e)}function Ct(e,t){var s=se;s!==null&&(s.f&Le)!==0&&(e|=Le);var a={ctx:Ye,deps:null,nodes:null,f:e|Me|tt,first:null,fn:t,last:null,next:null,parent:s,b:s&&s.b,prev:null,teardown:null,wv:0,ac:null};J?.register_created_effect(a);var r=a;if((e&ys)!==0)fs!==null?fs.push(a):rs.ensure().schedule(a);else if(t!==null){try{ks(a)}catch(l){throw Be(a),l}r.deps===null&&r.teardown===null&&r.nodes===null&&r.first===r.last&&(r.f&Es)===0&&(r=r.first,(e&ct)!==0&&(e&ss)!==0&&r!==null&&(r.f|=ss))}if(r!==null&&(r.parent=s,s!==null&&Di(r,s),ee!==null&&(ee.f&Oe)!==0&&(e&Pt)===0)){var n=ee;(n.effects??(n.effects=[])).push(r)}return a}function Za(){return ee!==null&&!ft}function an(e){const t=Ct(pa,null);return Ee(t,Fe),t.teardown=e,t}function rn(e){Oi();var t=se.f,s=!ee&&(t&vt)!==0&&(t&is)===0;if(s){var a=Ye;(a.e??(a.e=[])).push(e)}else return nn(e)}function nn(e){return Ct(ys|Mn,e)}function Pi(e){rs.ensure();const t=Ct(Pt|Es,e);return(s={})=>new Promise(a=>{s.outro?es(t,()=>{Be(t),a(void 0)}):(Be(t),a(void 0))})}function ln(e){return Ct(ys,e)}function Li(e){return Ct(vs|Es,e)}function Ja(e,t=0){return Ct(pa|t,e)}function q(e,t=[],s=[],a=[]){ki(a,t,s,r=>{Ct(pa,()=>e(...r.map(i)))})}function _a(e,t=0){var s=Ct(ct|t,e);return s}function et(e){return Ct(vt|Es,e)}function on(e){var t=e.teardown;if(t!==null){const s=$t,a=ee;ur(!0),nt(null);try{t.call(null)}finally{ur(s),nt(a)}}}function Qa(e,t=!1){var s=e.first;for(e.first=e.last=null;s!==null;){const r=s.ac;r!==null&&Xa(()=>{r.abort(ha)});var a=s.next;(s.f&Pt)!==0?s.parent=null:Be(s,t),s=a}}function Vi(e){for(var t=e.first;t!==null;){var s=t.next;(t.f&vt)===0&&Be(t),t=s}}function Be(e,t=!0){var s=!1;(t||(e.f&Rn)!==0)&&e.nodes!==null&&e.nodes.end!==null&&(Ii(e.nodes.start,e.nodes.end),s=!0),Ee(e,Aa),Qa(e,t&&!s),Os(e,0);var a=e.nodes&&e.nodes.t;if(a!==null)for(const n of a)n.stop();on(e),e.f^=Aa,e.f|=st;var r=e.parent;r!==null&&r.first!==null&&cn(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function Ii(e,t){for(;e!==null;){var s=e===t?null:Ns(e);e.remove(),e=s}}function cn(e){var t=e.parent,s=e.prev,a=e.next;s!==null&&(s.next=a),a!==null&&(a.prev=s),t!==null&&(t.first===e&&(t.first=a),t.last===e&&(t.last=s))}function es(e,t,s=!0){var a=[];dn(e,a,!0);var r=()=>{s&&Be(e),t&&t()},n=a.length;if(n>0){var l=()=>--n||r();for(var o of a)o.out(l)}else r()}function dn(e,t,s){if((e.f&Le)===0){e.f^=Le;var a=e.nodes&&e.nodes.t;if(a!==null)for(const o of a)(o.is_global||s)&&t.push(o);for(var r=e.first;r!==null;){var n=r.next;if((r.f&Pt)===0){var l=(r.f&ss)!==0||(r.f&vt)!==0&&(e.f&ct)!==0;dn(r,t,l?s:!1)}r=n}}}function er(e){fn(e,!0)}function fn(e,t){if((e.f&Le)!==0){e.f^=Le,(e.f&Fe)===0&&(Ee(e,Me),rs.ensure().schedule(e));for(var s=e.first;s!==null;){var a=s.next,r=(s.f&ss)!==0||(s.f&vt)!==0;fn(s,r?t:!1),s=a}var n=e.nodes&&e.nodes.t;if(n!==null)for(const l of n)(l.is_global||t)&&l.in()}}function tr(e,t){if(e.nodes)for(var s=e.nodes.start,a=e.nodes.end;s!==null;){var r=s===a?null:Ns(s);t.append(s),s=r}}let ea=!1,$t=!1;function ur(e){$t=e}let ee=null,ft=!1;function nt(e){ee=e}let se=null;function wt(e){se=e}let at=null;function un(e){ee!==null&&(at===null?at=[e]:at.push(e))}let qe=null,He=0,Xe=null;function qi(e){Xe=e}let vn=1,Nt=0,ts=Nt;function vr(e){ts=e}function pn(){return++vn}function Bs(e){var t=e.f;if((t&Me)!==0)return!0;if(t&Oe&&(e.f&=~as),(t&bt)!==0){for(var s=e.deps,a=s.length,r=0;re.wv)return!0}(t&tt)!==0&&dt===null&&Ee(e,Fe)}return!1}function hn(e,t,s=!0){var a=e.reactions;if(a!==null&&!(at!==null&&Xt.call(at,e)))for(var r=0;r{e.ac.abort(ha)}),e.ac=null);try{e.f|=sa;var _=e.fn,v=_();e.f|=is;var u=e.deps,m=J?.is_fork;if(qe!==null){var b;if(m||Os(e,He),u!==null&&He>0)for(u.length=He+qe.length,b=0;b{throw h});throw u}}finally{e[Bt]=t,delete e.currentTarget,nt(_),wt(v)}}}const Ui=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:e=>e});function Gi(e){return Ui?.createHTML(e)??e}function Wi(e){var t=Ri("template");return t.innerHTML=Gi(e.replaceAll("","")),t.content}function ia(e,t){var s=se;s.nodes===null&&(s.nodes={start:e,end:t,a:null,t:null})}function F(e,t){var s=(t&ai)!==0,a=(t&ri)!==0,r,n=!e.startsWith("");return()=>{r===void 0&&(r=Wi(n?e:""+e),s||(r=na(r)));var l=a||Jr?document.importNode(r,!0):r.cloneNode(!0);if(s){var o=na(l),c=l.lastChild;ia(o,c)}else ia(l,l);return l}}function Yi(e=""){{var t=jt(e+"");return ia(t,t),t}}function _r(){var e=document.createDocumentFragment(),t=document.createComment(""),s=jt();return e.append(t,s),ia(t,s),e}function z(e,t){e!==null&&e.before(t)}function A(e,t){var s=t==null?"":typeof t=="object"?`${t}`:t;s!==(e[$s]??(e[$s]=e.nodeValue))&&(e[$s]=s,e.nodeValue=`${s}`)}function Xi(e,t){return Zi(e,t)}const Us=new Map;function Zi(e,{target:t,anchor:s,props:a={},events:r,context:n,intro:l=!0,transformError:o}){Ai();var c=void 0,d=Pi(()=>{var _=s??t.appendChild(jt());mi(_,{pending:()=>{}},m=>{ke({});var b=Ye;n&&(b.c=n),r&&(a.$$events=r),c=e(m,a)||{},Se()},o);var v=new Set,u=m=>{for(var b=0;b{for(var m of v)for(const h of[t,document]){var b=Us.get(h),w=b.get(m);--w==0?(h.removeEventListener(m,hr),b.delete(m),b.size===0&&Us.delete(h)):b.set(m,w)}Na.delete(u),_!==s&&_.parentNode?.removeChild(_)}});return Ji.set(c,d),c}let Ji=new WeakMap;var lt,gt,We,Yt,Is,qs,ua;class yn{constructor(t,s=!0){Ve(this,"anchor");Z(this,lt,new Map);Z(this,gt,new Map);Z(this,We,new Map);Z(this,Yt,new Set);Z(this,Is,!0);Z(this,qs,t=>{if(g(this,lt).has(t)){var s=g(this,lt).get(t),a=g(this,gt).get(s);if(a)er(a),g(this,Yt).delete(s);else{var r=g(this,We).get(s);r&&(g(this,gt).set(s,r.effect),g(this,We).delete(s),r.fragment.lastChild.remove(),this.anchor.before(r.fragment),a=r.effect)}for(const[n,l]of g(this,lt)){if(g(this,lt).delete(n),n===t)break;const o=g(this,We).get(l);o&&(Be(o.effect),g(this,We).delete(l))}for(const[n,l]of g(this,gt)){if(n===s||g(this,Yt).has(n))continue;const o=()=>{if(Array.from(g(this,lt).values()).includes(n)){var d=document.createDocumentFragment();tr(l,d),d.append(jt()),g(this,We).set(n,{effect:l,fragment:d})}else Be(l);g(this,Yt).delete(n),g(this,gt).delete(n)};g(this,Is)||!a?(g(this,Yt).add(n),es(l,o,!1)):o()}}});Z(this,ua,t=>{g(this,lt).delete(t);const s=Array.from(g(this,lt).values());for(const[a,r]of g(this,We))s.includes(a)||(Be(r.effect),g(this,We).delete(a))});this.anchor=t,X(this,Is,s)}ensure(t,s){var a=J,r=tn();if(s&&!g(this,gt).has(t)&&!g(this,We).has(t))if(r){var n=document.createDocumentFragment(),l=jt();n.append(l),g(this,We).set(t,{effect:et(()=>s(l)),fragment:n})}else g(this,gt).set(t,et(()=>s(this.anchor)));if(g(this,lt).set(a,t),r){for(const[o,c]of g(this,gt))o===t?a.unskip_effect(c):a.skip_effect(c);for(const[o,c]of g(this,We))o===t?a.unskip_effect(c.effect):a.skip_effect(c.effect);a.oncommit(g(this,qs)),a.ondiscard(g(this,ua))}else g(this,qs).call(this,a)}}lt=new WeakMap,gt=new WeakMap,We=new WeakMap,Yt=new WeakMap,Is=new WeakMap,qs=new WeakMap,ua=new WeakMap;function fe(e,t,s=!1){var a=new yn(e),r=s?ss:0;function n(l,o){a.ensure(l,o)}_a(()=>{var l=!1;t((o,c=0)=>{l=!0,n(c,o)}),l||n(-1,null)},r)}function js(e,t){return t}function Qi(e,t,s){for(var a=[],r=t.length,n,l=t.length,o=0;o{if(n){if(n.pending.delete(v),n.done.add(v),n.pending.size===0){var u=e.outrogroups;Ba(e,va(n.done)),u.delete(n),u.size===0&&(e.outrogroups=null)}}else l-=1},!1)}if(l===0){var c=a.length===0&&s!==null;if(c){var d=s,_=d.parentNode;Fi(_),_.append(d),e.items.clear()}Ba(e,t,!c)}else n={pending:new Set(t),done:new Set},(e.outrogroups??(e.outrogroups=new Set)).add(n)}function Ba(e,t,s=!0){var a;if(e.pending.size>0){a=new Set;for(const l of e.pending.values())for(const o of l)a.add(e.items.get(o).e)}for(var r=0;r{var $=s();return Ha($)?$:$==null?[]:va($)}),u,m=new Map,b=!0;function w($){(S.effect.f&st)===0&&(S.pending.delete($),S.fallback=_,el(S,u,l,t,a),_!==null&&(u.length===0?(_.f&mt)===0?er(_):(_.f^=mt,zs(_,null,l)):es(_,()=>{_=null})))}function h($){S.pending.delete($)}var y=_a(()=>{u=i(v);for(var $=u.length,R=new Set,B=J,E=tn(),C=0;C<$;C+=1){var O=u[C],L=a(O,C),T=b?null:o.get(L);T?(T.v&&xs(T.v,O),T.i&&xs(T.i,C),E&&B.unskip_effect(T.e)):(T=tl(o,b?l:gr??(gr=jt()),O,L,C,r,t,s),b||(T.e.f|=mt),o.set(L,T)),R.add(L)}if($===0&&n&&!_&&(b?_=et(()=>n(l)):(_=et(()=>n(gr??(gr=jt()))),_.f|=mt)),$>R.size&&Vn(),!b)if(m.set(B,R),E){for(const[D,x]of o)R.has(D)||B.skip_effect(x.e);B.oncommit(w),B.ondiscard(h)}else w(B);i(v)}),S={effect:y,items:o,pending:m,outrogroups:null,fallback:_};b=!1}function Ts(e){for(;e!==null&&(e.f&vt)===0;)e=e.next;return e}function el(e,t,s,a,r){var n=(a&Zn)!==0,l=t.length,o=e.items,c=Ts(e.effect.first),d,_=null,v,u=[],m=[],b,w,h,y;if(n)for(y=0;y0){var L=(a&Fr)!==0&&l===0?s:null;if(n){for(y=0;y{if(v!==void 0)for(h of v)h.nodes?.a?.apply()})}function tl(e,t,s,a,r,n,l,o){var c=(l&Yn)!==0?(l&Jn)===0?$i(s,!1,!1):ns(s):null,d=(l&Xn)!==0?ns(r):null;return{v:c,i:d,e:et(()=>(n(t,c??s,d??r,o),()=>{e.delete(a)}))}}function zs(e,t,s){if(e.nodes)for(var a=e.nodes.start,r=e.nodes.end,n=t&&(t.f&mt)===0?t.nodes.start:s;a!==null;){var l=Ns(a);if(n.before(a),a===r)return;a=l}}function At(e,t,s){t===null?e.effect.first=s:t.next=s,s===null?e.effect.last=t:s.prev=t}function wn(e,t,...s){var a=new yn(e);_a(()=>{const r=t()??null;a.ensure(r,r&&(n=>r(n,...s)))},ss)}const mr=[...` -\r\f \v\uFEFF`];function sl(e,t,s){var a=e==null?"":""+e;if(s){for(var r of Object.keys(s))if(s[r])a=a?a+" "+r:r;else if(a.length)for(var n=r.length,l=0;(l=a.indexOf(r,l))>=0;){var o=l+n;(l===0||mr.includes(a[l-1]))&&(o===a.length||mr.includes(a[o]))?a=(l===0?"":a.substring(0,l))+a.substring(o+1):l=o}}return a===""?null:a}function br(e,t=!1){var s=t?" !important;":";",a="";for(var r of Object.keys(e)){var n=e[r];n!=null&&n!==""&&(a+=" "+r+": "+n+s)}return a}function Ea(e){return e[0]!=="-"||e[1]!=="-"?e.toLowerCase():e}function al(e,t){if(t){var s="",a,r;if(Array.isArray(t)?(a=t[0],r=t[1]):a=t,e){e=String(e).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var n=!1,l=0,o=!1,c=[];a&&c.push(...Object.keys(a).map(Ea)),r&&c.push(...Object.keys(r).map(Ea));var d=0,_=-1;const w=e.length;for(var v=0;v{sr(e,e.__value)});t.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),an(()=>{t.disconnect()})}function la(e,t,s=t){var a=new WeakSet,r=!0;sn(e,"change",n=>{var l=n?"[selected]":":checked",o;if(e.multiple)o=[].map.call(e.querySelectorAll(l),Rs);else{var c=e.querySelector(l)??e.querySelector("option:not([disabled])");o=c&&Rs(c)}s(o),e.__value=o,J!==null&&a.add(J)}),ln(()=>{var n=t();if(e===document.activeElement){var l=J;if(a.has(l))return}if(sr(e,n,r),r&&n===void 0){var o=e.querySelector(":checked");o!==null&&(n=Rs(o),s(n))}e.__value=n,r=!1}),xn(e)}function Rs(e){return"__value"in e?e.__value:e.value}const rl=Symbol("is custom element"),nl=Symbol("is html"),il=Pn?"progress":"PROGRESS";function oa(e,t){var s=kn(e);s.value===(s.value=t??void 0)||e.value===t&&(t!==0||e.nodeName!==il)||(e.value=t??"")}function Q(e,t,s,a){var r=kn(e);r[t]!==(r[t]=s)&&(t==="loading"&&(e[Dn]=s),s==null?e.removeAttribute(t):typeof s!="string"&&ll(e).includes(t)?e[t]=s:e.setAttribute(t,s))}function kn(e){return e[Ws]??(e[Ws]={[rl]:e.nodeName.includes("-"),[nl]:e.namespaceURI===Rr})}var yr=new Map;function ll(e){var t=e.getAttribute("is")||e.nodeName,s=yr.get(t);if(s)return s;yr.set(t,s=[]);for(var a,r=e,n=Element.prototype;n!==r;){a=Cn(r);for(var l in a)a[l].set&&l!=="innerHTML"&&l!=="textContent"&&l!=="innerText"&&s.push(l);r=$r(r)}return s}function Tt(e,t,s=t){var a=new WeakSet;sn(e,"input",async r=>{var n=r?e.defaultValue:e.value;if(n=Ta(e)?$a(n):n,s(n),J!==null&&a.add(J),await Bi(),n!==(n=t())){var l=e.selectionStart,o=e.selectionEnd,c=e.value.length;if(e.value=n??"",o!==null){var d=e.value.length;l===o&&o===c&&d>c?(e.selectionStart=d,e.selectionEnd=d):(e.selectionStart=l,e.selectionEnd=Math.min(o,d))}}}),ga(t)==null&&e.value&&(s(Ta(e)?$a(e.value):e.value),J!==null&&a.add(J)),Ja(()=>{var r=t();if(e===document.activeElement){var n=J;if(a.has(n))return}Ta(e)&&r===$a(e.value)||e.type==="date"&&!r&&!e.value||r!==e.value&&(e.value=r??"")})}function Ta(e){var t=e.type;return t==="number"||t==="range"}function $a(e){return e===""?null:+e}function Ca(e,t){return e===t||e?.[Zt]===t}function ol(e={},t,s,a){var r=Ye.r,n=se;return ln(()=>{var l,o;return Ja(()=>{l=o,o=[],ga(()=>{Ca(s(...o),e)||(t(e,...o),l&&Ca(s(...l),e)&&t(null,...l))})}),()=>{let c=n;for(;c!==r&&c.parent!==null&&c.parent.f&Aa;)c=c.parent;const d=()=>{o&&Ca(s(...o),e)&&t(null,...o)},_=c.teardown;c.teardown=()=>{d(),_?.()}}}),e}function _e(e,t,s,a){var r=!0,n=(s&ti)!==0,l=(s&si)!==0,o=a,c=!0,d=void 0,_=()=>l&&r?(d??(d=Ms(a)),i(d)):(c&&(c=!1,o=l?ga(a):a),o);let v;if(n){var u=Zt in e||On in e;v=us(e,t)?.set??(u&&t in e?R=>e[t]=R:void 0)}var m,b=!1;n?[m,b]=fi(()=>e[t]):m=e[t],m===void 0&&a!==void 0&&(m=_(),v&&(Kn(),v(m)));var w;if(w=()=>{var R=e[t];return R===void 0?_():(c=!0,R)},(s&ei)===0)return w;if(v){var h=e.$$legacy;return(function(R,B){return arguments.length>0?((!B||h||b)&&v(B?w():R),R):w()})}var y=!1,S=((s&Qn)!==0?Ms:Gr)(()=>(y=!1,w()));n&&i(S);var $=se;return(function(R,B){if(arguments.length>0){const E=B?i(S):n?Ne(R):R;return K(S,E),y=!0,o!==void 0&&(o=E),R}return $t&&y||($.f&st)!==0?S.v:i(S)})}const cl="5";var Tr;typeof window<"u"&&((Tr=window.__svelte??(window.__svelte={})).v??(Tr.v=new Set)).add(cl);const It=typeof window<"u"&&window.slashedBricksApp?window.slashedBricksApp:{defaults:{},settings:{},tabs:{},rest:{url:"",nonce:""}},re={defaults:It.defaults||{},tabs:It.tabs||{},rest:It.rest||{url:"",nonce:""},inventory:It.inventory||{variables:[],sf_classes:[],is_classes:[]},pluginSettings:It.pluginSettings||{},versions:It.versions||{plugin:"",framework:""}},H=Ne(structuredClone(It.settings||{})),W=Ne({activeTab:dl(re.tabs)||"colors",dirty:!1,saving:!1,lastSavedAt:null,error:""});function dl(e){for(const t in e)return t;return null}function ar(){W.dirty=!0,W.error=""}function wr(e){H[e]&&delete H[e]}function fl(e,t){const s=H[e];if(!s)return"";const a=s[t];return a==null?"":String(a)}function Ss(e,t,s){H[e]||(H[e]={}),s===""||s===null||s===void 0||typeof s=="string"&&s.trim()===""?delete H[e][t]:H[e][t]=String(s),ar()}var ul=F(''),vl=F('');function pl(e,t){ke(t,!0);var s=vl();ne(s,21,()=>Object.entries(re.tabs),([a,r])=>a,(a,r)=>{var n=j(()=>ot(i(r),2));let l=()=>i(n)[0],o=()=>i(n)[1];var c=ul();let d;var _=f(c);q(()=>{d=rt(c,1,"tab-nav__btn svelte-yyiz68",null,d,{active:W.activeTab===l()}),A(_,o())}),he("click",c,()=>W.activeTab=l()),z(a,c)}),z(e,s),Se()}De(["click"]);var hl=F(' '),_l=F(' ',1),gl=F(''),ml=F('
                                                    ');function Gs(e,t){ke(t,!0);let s=_e(t,"hexHint",3,""),a=_e(t,"rawHint",3,""),r=_e(t,"cssVar",3,"");const n=/^#([0-9a-fA-F]{3,4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/,l=(()=>{const D=(H.colors?.[t.storeKey]??"").trim(),x=D===""||n.test(D);return{mode:x?"hex":"raw",hex:x?D:"",raw:x?"":D}})();let o=te(Ne(l.mode)),c=te(Ne(l.hex)),d=te(Ne(l.raw));function _(){H.colors||(H.colors={});const D=i(d).trim(),x=i(c).trim(),k=i(o)==="raw"?D:x;k===""?delete H.colors[t.storeKey]:H.colors[t.storeKey]=k,ar()}function v(){i(o)==="hex"?(K(o,"raw"),K(c,"")):(K(o,"hex"),K(d,"")),_()}const u=j(()=>(i(o)==="raw"?i(d):i(c))||s()||"transparent");var m=ml(),b=f(m),w=f(b),h=f(w),y=p(w,2);{var S=D=>{var x=hl(),k=f(x);q(()=>A(k,r())),z(D,x)};fe(y,D=>{r()&&D(S)})}var $=p(b,2),R=f($);let B;var E=p(R,2);{var C=D=>{var x=_l(),k=yt(x),P=p(k,2);q(()=>{Q(k,"id",t.storeKey),Q(P,"placeholder",s())}),he("input",k,_),Tt(k,()=>i(c),M=>K(c,M)),he("input",P,_),Tt(P,()=>i(c),M=>K(c,M)),z(D,x)},O=D=>{var x=gl();q(()=>{Q(x,"id",t.storeKey),Q(x,"placeholder",a())}),he("input",x,_),Tt(x,()=>i(d),k=>K(d,k)),z(D,x)};fe(E,D=>{i(o)==="hex"?D(C):D(O,-1)})}var L=p(E,2),T=f(L);q(()=>{Q(w,"for",t.storeKey),A(h,t.label),B=ve(R,"",B,{background:i(u)}),A(T,i(o)==="hex"?"Advanced (oklch / raw)":"Use HEX picker")}),he("click",L,v),z(e,m),Se()}De(["input","click"]);var bl=F('
                                                    '),yl=F('
                                                    ');function ma(e,t){ke(t,!0);let s=te(!1);const a=`adv-body-${Math.random().toString(36).slice(2,9)}`;var r=yl(),n=f(r),l=p(f(n));let o;var c=f(l),d=p(n,2);{var _=v=>{var u=bl(),m=f(u);wn(m,()=>t.children),q(()=>Q(u,"id",a)),z(v,u)};fe(d,v=>{i(s)&&v(_)})}q(()=>{Q(n,"aria-expanded",i(s)),Q(n,"aria-controls",a),o=rt(l,1,"advanced-section__arrow",null,o,{open:i(s)}),A(c,i(s)?"▲":"▼")}),he("click",n,()=>K(s,!i(s))),z(e,r),Se()}De(["click"]);var wl=F('

                                                    Brand Colors — Dark Mode

                                                    Status Colors — Dark Mode

                                                    ',1),xl=F(`

                                                    Status Colors — Light Mode

                                                    The framework auto-derives dark mode from light source colors using CSS relative color syntax +var Tn=Object.defineProperty;var lr=e=>{throw TypeError(e)};var $n=(e,t,s)=>t in e?Tn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s;var Le=(e,t,s)=>$n(e,typeof t!="symbol"?t+"":t,s),Sa=(e,t,s)=>t.has(e)||lr("Cannot "+s);var g=(e,t,s)=>(Sa(e,t,"read from private field"),s?s.call(e):t.get(e)),Z=(e,t,s)=>t.has(e)?lr("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,s),X=(e,t,s,a)=>(Sa(e,t,"write to private field"),a?a.call(e,s):t.set(e,s),s),le=(e,t,s)=>(Sa(e,t,"access private method"),s);var Ga=Array.isArray,Cn=Array.prototype.indexOf,Xt=Array.prototype.includes,ha=Array.from,zn=Object.defineProperty,us=Object.getOwnPropertyDescriptor,An=Object.getOwnPropertyDescriptors,Fn=Object.prototype,Rn=Array.prototype,zr=Object.getPrototypeOf,or=Object.isExtensible;const Ar=()=>{};function Dn(e){for(var t=0;t{e=a,t=r});return{promise:s,resolve:e,reject:t}}function dt(e,t){if(Array.isArray(e))return e;if(t===void 0||!(Symbol.iterator in e))return Array.from(e);const s=[];for(const a of e)if(s.push(a),s.length===t)break;return s}const Re=2,ys=4,_a=8,Rr=1<<24,ft=16,ht=32,Pt=64,Fa=128,st=512,ze=1024,Fe=2048,yt=4096,Oe=8192,at=16384,is=32768,Ra=1<<25,ss=65536,aa=1<<17,Mn=1<<18,Es=1<<19,On=1<<20,bt=1<<25,as=65536,ra=1<<21,vs=1<<22,Ot=1<<23,Zt=Symbol("$state"),Pn=Symbol("legacy props"),Ln=Symbol(""),Xs=Symbol("attributes"),Da=Symbol("class"),Ma=Symbol("style"),Cs=Symbol("text"),Zs=Symbol("form reset"),ga=new class extends Error{constructor(){super(...arguments);Le(this,"name","StaleReactionError");Le(this,"message","The reaction that called `getAbortSignal()` was re-run or destroyed")}},Vn=!!globalThis.document?.contentType&&globalThis.document.contentType.includes("xml");function In(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function qn(e,t,s){throw new Error("https://svelte.dev/e/each_key_duplicate")}function Nn(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function Bn(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function Kn(e){throw new Error("https://svelte.dev/e/effect_orphan")}function Hn(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function Un(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function Gn(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Wn(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Yn(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function Xn(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}const Zn=1,Jn=2,Dr=4,Qn=8,ei=16,ti=1,si=4,ai=8,ri=16,ni=1,ii=2,Ce=Symbol("uninitialized"),Mr="http://www.w3.org/1999/xhtml";function li(){console.warn("https://svelte.dev/e/derived_inert")}function oi(){console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function ci(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}function Or(e){return e===this.v}function di(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function Pr(e){return!di(e,this.v)}let Xe=null;function ws(e){Xe=e}function we(e,t=!1,s){Xe={p:Xe,i:!1,c:null,e:null,s:e,x:null,r:se,l:null}}function xe(e){var t=Xe,s=t.e;if(s!==null){t.e=null;for(var a of s)on(a)}return t.i=!0,Xe=t.p,{}}function Lr(){return!0}let qt=[];function Vr(){var e=qt;qt=[],Dn(e)}function Jt(e){if(qt.length===0&&!Fs){var t=qt;queueMicrotask(()=>{t===qt&&Vr()})}qt.push(e)}function fi(){for(;qt.length>0;)Vr()}function Ir(e){var t=se;if(t===null)return ee.f|=Ot,e;if((t.f&is)===0&&(t.f&ys)===0)throw e;Mt(e,t)}function Mt(e,t){for(;t!==null;){if((t.f&Fa)!==0){if((t.f&is)===0)throw e;try{t.b.error(e);return}catch(s){e=s}}t=t.parent}throw e}const ui=-7169;function Se(e,t){e.f=e.f&ui|t}function Wa(e){(e.f&st)!==0||e.deps===null?Se(e,ze):Se(e,yt)}function qr(e){if(e!==null)for(const t of e)(t.f&Re)===0||(t.f&as)===0||(t.f^=as,qr(t.deps))}function Nr(e,t,s){(e.f&Fe)!==0?t.add(e):(e.f&yt)!==0&&s.add(e),qr(e.deps),Se(e,ze)}let Us=!1;function vi(e){var t=Us;try{return Us=!1,[e(),Us]}finally{Us=t}}let Ea=null,os=null,J=null,Oa=null,ut=null,Pa=null,Fs=!1,ja=!1,fs=null,Js=null;var cr=0;let pi=1;var ps,Ft,Kt,hs,_s,Ht,gs,St,Ps,Ge,Ls,Rt,_t,gt,ms,Ut,fe,La,zs,Va,Br,Kr,Qs,hi,Ia,ds;const ua=class ua{constructor(){Z(this,fe);Le(this,"id",pi++);Z(this,ps,!1);Le(this,"linked",!0);Z(this,Ft,null);Z(this,Kt,null);Le(this,"async_deriveds",new Map);Le(this,"current",new Map);Le(this,"previous",new Map);Le(this,"unblocked",new Set);Z(this,hs,new Set);Z(this,_s,new Set);Z(this,Ht,new Set);Z(this,gs,0);Z(this,St,new Map);Z(this,Ps,null);Z(this,Ge,[]);Z(this,Ls,[]);Z(this,Rt,new Set);Z(this,_t,new Set);Z(this,gt,new Map);Z(this,ms,new Set);Le(this,"is_fork",!1);Z(this,Ut,!1)}skip_effect(t){g(this,gt).has(t)||g(this,gt).set(t,{d:[],m:[]}),g(this,ms).delete(t)}unskip_effect(t,s=a=>this.schedule(a)){var a=g(this,gt).get(t);if(a){g(this,gt).delete(t);for(var r of a.d)Se(r,Fe),s(r);for(r of a.m)Se(r,yt),s(r)}g(this,ms).add(t)}capture(t,s,a=!1){t.v!==Ce&&!this.previous.has(t)&&this.previous.set(t,t.v),(t.f&Ot)===0&&(this.current.set(t,[s,a]),ut?.set(t,s)),this.is_fork||(t.v=s)}activate(){J=this}deactivate(){J=null,ut=null}flush(){try{ja=!0,J=this,le(this,fe,zs).call(this)}finally{cr=0,Pa=null,fs=null,Js=null,ja=!1,J=null,ut=null,Qt.clear()}}discard(){for(const t of g(this,_s))t(this);g(this,_s).clear(),g(this,Ht).clear(),le(this,fe,ds).call(this)}register_created_effect(t){g(this,Ls).push(t)}increment(t,s){if(X(this,gs,g(this,gs)+1),t){let a=g(this,St).get(s)??0;g(this,St).set(s,a+1)}}decrement(t,s){if(X(this,gs,g(this,gs)-1),t){let a=g(this,St).get(s)??0;a===1?g(this,St).delete(s):g(this,St).set(s,a-1)}g(this,Ut)||(X(this,Ut,!0),Jt(()=>{X(this,Ut,!1),this.linked&&this.flush()}))}transfer_effects(t,s){for(const a of t)g(this,Rt).add(a);for(const a of s)g(this,_t).add(a);t.clear(),s.clear()}oncommit(t){g(this,hs).add(t)}ondiscard(t){g(this,_s).add(t)}on_fork_commit(t){g(this,Ht).add(t)}run_fork_commit_callbacks(){for(const t of g(this,Ht))t(this);g(this,Ht).clear()}settled(){return(g(this,Ps)??X(this,Ps,Fr())).promise}static ensure(){var t;if(J===null){const s=J=new ua;le(t=s,fe,Ia).call(t),!ja&&!Fs&&Jt(()=>{g(s,ps)||s.flush()})}return J}apply(){{ut=null;return}}schedule(t){if(Pa=t,t.b?.is_pending&&(t.f&(ys|_a|Rr))!==0&&(t.f&is)===0){t.b.defer_effect(t);return}for(var s=t;s.parent!==null;){s=s.parent;var a=s.f;if(fs!==null&&s===se&&(ee===null||(ee.f&Re)===0))return;if((a&(Pt|ht))!==0){if((a&ze)===0)return;s.f^=ze}}g(this,Ge).push(s)}};ps=new WeakMap,Ft=new WeakMap,Kt=new WeakMap,hs=new WeakMap,_s=new WeakMap,Ht=new WeakMap,gs=new WeakMap,St=new WeakMap,Ps=new WeakMap,Ge=new WeakMap,Ls=new WeakMap,Rt=new WeakMap,_t=new WeakMap,gt=new WeakMap,ms=new WeakMap,Ut=new WeakMap,fe=new WeakSet,La=function(){if(this.is_fork)return!0;for(const a of g(this,St).keys()){for(var t=a,s=!1;t.parent!==null;){if(g(this,gt).has(t)){s=!0;break}t=t.parent}if(!s)return!0}return!1},zs=function(){var o,f,h;if(X(this,ps,!0),cr++>1e3&&(le(this,fe,ds).call(this),gi()),!le(this,fe,La).call(this)){for(const p of g(this,Rt))g(this,_t).delete(p),Se(p,Fe),this.schedule(p);for(const p of g(this,_t))Se(p,yt),this.schedule(p)}const t=g(this,Ge);X(this,Ge,[]),this.apply();var s=fs=[],a=[],r=Js=[];for(const p of t)try{le(this,fe,Va).call(this,p,s,a)}catch(u){throw Gr(p),u}if(J=null,r.length>0){var n=ua.ensure();for(const p of r)n.schedule(p)}if(fs=null,Js=null,le(this,fe,La).call(this)){le(this,fe,Qs).call(this,a),le(this,fe,Qs).call(this,s);for(const[p,u]of g(this,gt))Ur(p,u);r.length>0&&le(o=J,fe,zs).call(o);return}const l=le(this,fe,Br).call(this);if(l){le(f=l,fe,Kr).call(f,this);return}g(this,Rt).clear(),g(this,_t).clear();for(const p of g(this,hs))p(this);g(this,hs).clear(),Oa=this,dr(a),dr(s),Oa=null,g(this,Ps)?.resolve();var c=J;if(this.linked&&g(this,gs)===0&&le(this,fe,ds).call(this),g(this,Ge).length>0){c===null&&(c=this,le(this,fe,Ia).call(this));const p=c;g(p,Ge).push(...g(this,Ge).filter(u=>!g(p,Ge).includes(u)))}c!==null&&le(h=c,fe,zs).call(h)},Va=function(t,s,a){t.f^=ze;for(var r=t.first;r!==null;){var n=r.f,l=(n&(ht|Pt))!==0,c=l&&(n&ze)!==0,o=c||(n&Oe)!==0||g(this,gt).has(r);if(!o&&r.fn!==null){l?r.f^=ze:(n&ys)!==0?s.push(r):Ks(r)&&((n&ft)!==0&&g(this,_t).add(r),ks(r));var f=r.first;if(f!==null){r=f;continue}}for(;r!==null;){var h=r.next;if(h!==null){r=h;break}r=r.parent}}},Br=function(){for(var t=g(this,Ft);t!==null;){if(!t.is_fork){for(const[s,[,a]]of this.current)if(t.current.has(s)&&!a)return t}t=g(t,Ft)}return null},Kr=function(t){var a;for(const[r,n]of t.current)!this.previous.has(r)&&t.previous.has(r)&&this.previous.set(r,t.previous.get(r)),this.current.set(r,n);for(const[r,n]of t.async_deriveds){const l=this.async_deriveds.get(r);l&&n.promise.then(l.resolve)}const s=r=>{var n=r.reactions;if(n!==null)for(const o of n){var l=o.f;if((l&Re)!==0)s(o);else{var c=o;l&(vs|ft)&&!this.async_deriveds.has(c)&&(g(this,_t).delete(c),Se(c,Fe),this.schedule(c))}}};for(const r of this.current.keys())s(r);this.oncommit(()=>t.discard()),le(a=t,fe,ds).call(a),J=this,le(this,fe,zs).call(this)},Qs=function(t){for(var s=0;s!this.current.has(u));if(r.length===0)t&&p.discard();else if(s.length>0){if(t)for(const u of g(this,ms))p.unskip_effect(u,m=>{var b;(m.f&(ft|vs))!==0?p.schedule(m):le(b=p,fe,Qs).call(b,[m])});p.activate();var n=new Set,l=new Map;for(var c of s)Hr(c,r,n,l);l=new Map;var o=[...p.current.keys()].filter(u=>this.current.has(u)?this.current.get(u)[0]!==u.v:!0);if(o.length>0)for(const u of g(this,Ls))(u.f&(at|Oe|aa))===0&&Ya(u,o,l)&&((u.f&(vs|ft))!==0?(Se(u,Fe),p.schedule(u)):g(p,Rt).add(u));if(g(p,Ge).length>0&&!g(p,Ut)){p.apply();for(var f of g(p,Ge))le(h=p,fe,Va).call(h,f,[],[]);X(p,Ge,[])}p.deactivate()}}}},Ia=function(){os===null?Ea=os=this:(X(os,Kt,this),X(this,Ft,os)),os=this},ds=function(){var t=g(this,Ft),s=g(this,Kt);t===null?Ea=s:X(t,Kt,s),s===null?os=t:X(s,Ft,t),this.linked=!1};let rs=ua;function _i(e){var t=Fs;Fs=!0;try{for(var s;;){if(fi(),J===null)return s;J.flush()}}finally{Fs=t}}function gi(){try{Hn()}catch(e){Mt(e,Pa)}}let kt=null;function dr(e){var t=e.length;if(t!==0){for(var s=0;s0)){Qt.clear();for(const r of kt){if((r.f&(at|Oe))!==0)continue;const n=[r];let l=r.parent;for(;l!==null;)kt.has(l)&&(kt.delete(l),n.push(l)),l=l.parent;for(let c=n.length-1;c>=0;c--){const o=n[c];(o.f&(at|Oe))===0&&ks(o)}}kt.clear()}}kt=null}}function Hr(e,t,s,a){if(!s.has(e)&&(s.add(e),e.reactions!==null))for(const r of e.reactions){const n=r.f;(n&Re)!==0?Hr(r,t,s,a):(n&(vs|ft))!==0&&(n&Fe)===0&&Ya(r,t,a)&&(Se(r,Fe),Xa(r))}}function Ya(e,t,s){const a=s.get(e);if(a!==void 0)return a;if(e.deps!==null)for(const r of e.deps){if(Xt.call(t,r))return!0;if((r.f&Re)!==0&&Ya(r,t,s))return s.set(r,!0),!0}return s.set(e,!1),!1}function Xa(e){J.schedule(e)}function Ur(e,t){if(!((e.f&ht)!==0&&(e.f&ze)!==0)){(e.f&Fe)!==0?t.d.push(e):(e.f&yt)!==0&&t.m.push(e),Se(e,ze);for(var s=e.first;s!==null;)Ur(s,t),s=s.next}}function Gr(e){Se(e,ze);for(var t=e.first;t!==null;)Gr(t),t=t.next}function mi(e){let t=0,s=ns(0),a;return()=>{Qa()&&(i(s),er(()=>(t===0&&(a=ba(()=>e(()=>Rs(s)))),t+=1,()=>{Jt(()=>{t-=1,t===0&&(a?.(),a=void 0,Rs(s))})})))}}var bi=ss|Es;function yi(e,t,s,a){new wi(e,t,s,a)}var Je,Ua,Qe,Gt,Ve,et,Me,We,Et,Wt,Dt,bs,Vs,Is,jt,va,je,xi,ki,Si,qa,ea,ta,Na,Ba;class wi{constructor(t,s,a,r){Z(this,je);Le(this,"parent");Le(this,"is_pending",!1);Le(this,"transform_error");Z(this,Je);Z(this,Ua,null);Z(this,Qe);Z(this,Gt);Z(this,Ve);Z(this,et,null);Z(this,Me,null);Z(this,We,null);Z(this,Et,null);Z(this,Wt,0);Z(this,Dt,0);Z(this,bs,!1);Z(this,Vs,new Set);Z(this,Is,new Set);Z(this,jt,null);Z(this,va,mi(()=>(X(this,jt,ns(g(this,Wt))),()=>{X(this,jt,null)})));X(this,Je,t),X(this,Qe,s),X(this,Gt,n=>{var l=se;l.b=this,l.f|=Fa,a(n)}),this.parent=se.b,this.transform_error=r??this.parent?.transform_error??(n=>n),X(this,Ve,ma(()=>{le(this,je,qa).call(this)},bi))}defer_effect(t){Nr(t,g(this,Vs),g(this,Is))}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!g(this,Qe).pending}update_pending_count(t,s){le(this,je,Na).call(this,t,s),X(this,Wt,g(this,Wt)+t),!(!g(this,jt)||g(this,bs))&&(X(this,bs,!0),Jt(()=>{X(this,bs,!1),g(this,jt)&&xs(g(this,jt),g(this,Wt))}))}get_effect_pending(){return g(this,va).call(this),i(g(this,jt))}error(t){if(!g(this,Qe).onerror&&!g(this,Qe).failed)throw t;J?.is_fork?(g(this,et)&&J.skip_effect(g(this,et)),g(this,Me)&&J.skip_effect(g(this,Me)),g(this,We)&&J.skip_effect(g(this,We)),J.on_fork_commit(()=>{le(this,je,Ba).call(this,t)})):le(this,je,Ba).call(this,t)}}Je=new WeakMap,Ua=new WeakMap,Qe=new WeakMap,Gt=new WeakMap,Ve=new WeakMap,et=new WeakMap,Me=new WeakMap,We=new WeakMap,Et=new WeakMap,Wt=new WeakMap,Dt=new WeakMap,bs=new WeakMap,Vs=new WeakMap,Is=new WeakMap,jt=new WeakMap,va=new WeakMap,je=new WeakSet,xi=function(){try{X(this,et,tt(()=>g(this,Gt).call(this,g(this,Je))))}catch(t){this.error(t)}},ki=function(t){const s=g(this,Qe).failed;s&&X(this,We,tt(()=>{s(g(this,Je),()=>t,()=>()=>{})}))},Si=function(){const t=g(this,Qe).pending;t&&(this.is_pending=!0,X(this,Me,tt(()=>t(g(this,Je)))),Jt(()=>{var s=X(this,Et,document.createDocumentFragment()),a=Tt();s.append(a),X(this,et,le(this,je,ta).call(this,()=>tt(()=>g(this,Gt).call(this,a)))),g(this,Dt)===0&&(g(this,Je).before(s),X(this,Et,null),es(g(this,Me),()=>{X(this,Me,null)}),le(this,je,ea).call(this,J))}))},qa=function(){try{if(this.is_pending=this.has_pending_snippet(),X(this,Dt,0),X(this,Wt,0),X(this,et,tt(()=>{g(this,Gt).call(this,g(this,Je))})),g(this,Dt)>0){var t=X(this,Et,document.createDocumentFragment());ar(g(this,et),t);const s=g(this,Qe).pending;X(this,Me,tt(()=>s(g(this,Je))))}else le(this,je,ea).call(this,J)}catch(s){this.error(s)}},ea=function(t){this.is_pending=!1,t.transfer_effects(g(this,Vs),g(this,Is))},ta=function(t){var s=se,a=ee,r=Xe;xt(g(this,Ve)),it(g(this,Ve)),ws(g(this,Ve).ctx);try{return rs.ensure(),t()}catch(n){return Ir(n),null}finally{xt(s),it(a),ws(r)}},Na=function(t,s){var a;if(!this.has_pending_snippet()){this.parent&&le(a=this.parent,je,Na).call(a,t,s);return}X(this,Dt,g(this,Dt)+t),g(this,Dt)===0&&(le(this,je,ea).call(this,s),g(this,Me)&&es(g(this,Me),()=>{X(this,Me,null)}),g(this,Et)&&(g(this,Je).before(g(this,Et)),X(this,Et,null)))},Ba=function(t){g(this,et)&&(Ne(g(this,et)),X(this,et,null)),g(this,Me)&&(Ne(g(this,Me)),X(this,Me,null)),g(this,We)&&(Ne(g(this,We)),X(this,We,null));var s=g(this,Qe).onerror;let a=g(this,Qe).failed;var r=!1,n=!1;const l=()=>{if(r){ci();return}r=!0,n&&Xn(),g(this,We)!==null&&es(g(this,We),()=>{X(this,We,null)}),le(this,je,ta).call(this,()=>{le(this,je,qa).call(this)})},c=o=>{try{n=!0,s?.(o,l),n=!1}catch(f){Mt(f,g(this,Ve)&&g(this,Ve).parent)}a&&X(this,We,le(this,je,ta).call(this,()=>{try{return tt(()=>{var f=se;f.b=this,f.f|=Fa,a(g(this,Je),()=>o,()=>l)})}catch(f){return Mt(f,g(this,Ve).parent),null}}))};Jt(()=>{var o;try{o=this.transform_error(t)}catch(f){Mt(f,g(this,Ve)&&g(this,Ve).parent);return}o!==null&&typeof o=="object"&&typeof o.then=="function"?o.then(c,f=>Mt(f,g(this,Ve)&&g(this,Ve).parent)):c(o)})};function Ei(e,t,s,a){const r=Ms;var n=e.filter(u=>!u.settled);if(s.length===0&&n.length===0){a(t.map(r));return}var l=se,c=ji(),o=n.length===1?n[0].promise:n.length>1?Promise.all(n.map(u=>u.promise)):null;function f(u){if((l.f&at)===0){c();try{a(u)}catch(m){Mt(m,l)}na()}}var h=Wr();if(s.length===0){o.then(()=>f(t.map(r))).finally(h);return}function p(){Promise.all(s.map(u=>Ti(u))).then(u=>f([...t.map(r),...u])).catch(u=>Mt(u,l)).finally(h)}o?o.then(()=>{c(),p(),na()}):p()}function ji(){var e=se,t=ee,s=Xe,a=J;return function(n=!0){xt(e),it(t),ws(s),n&&(e.f&at)===0&&(a?.activate(),a?.apply())}}function na(e=!0){xt(null),it(null),ws(null),e&&J?.deactivate()}function Wr(){var e=se,t=e.b,s=J,a=t.is_rendered();return t.update_pending_count(1,s),s.increment(a,e),()=>{t.update_pending_count(-1,s),s.decrement(a,e)}}function Ms(e){var t=Re|Fe;return se!==null&&(se.f|=Es),{ctx:Xe,deps:null,effects:null,equals:Or,f:t,fn:e,reactions:null,rv:0,v:Ce,wv:0,parent:se,ac:null}}const Gs=Symbol("obsolete");function Ti(e,t,s){let a=se;a===null&&In();var r=void 0,n=ns(Ce),l=!ee,c=new Set;return Ii(()=>{var o=se,f=Fr();r=f.promise;try{Promise.resolve(e()).then(f.resolve,m=>{m!==ga&&f.reject(m)}).finally(na)}catch(m){f.reject(m),na()}var h=J;if(l){if((o.f&is)!==0)var p=Wr();if(a.b.is_rendered())h.async_deriveds.get(o)?.reject(Gs);else for(const m of c.values())m.reject(Gs);c.add(f),h.async_deriveds.set(o,f)}const u=(m,b=void 0)=>{p?.(),c.delete(f),b!==Gs&&(h.activate(),b?(n.f|=Ot,xs(n,b)):((n.f&Ot)!==0&&(n.f^=Ot),xs(n,m)),h.deactivate())};f.promise.then(u,m=>u(null,m||"unknown"))}),nn(()=>{for(const o of c)o.reject(Gs)}),new Promise(o=>{function f(h){function p(){h===r?o(n):f(r)}h.then(p,p)}f(r)})}function j(e){const t=Ms(e);return pn(t),t}function Yr(e){const t=Ms(e);return t.equals=Pr,t}function $i(e){var t=e.effects;if(t!==null){e.effects=null;for(var s=0;s0&&!Jr&&Ai()}return t}function Ai(){Jr=!1;for(const e of ia){(e.f&ze)!==0&&Se(e,yt);let t;try{t=Ks(e)}catch{t=!0}t&&ks(e)}ia.clear()}function Rs(e){K(e,e.v+1)}function Qr(e,t,s){var a=e.reactions;if(a!==null)for(var r=a.length,n=0;n{if(ts===n)return c();var o=ee,f=ts;it(null),hr(n);var h=c();return it(o),hr(f),h};return a&&s.set("length",te(e.length)),new Proxy(e,{defineProperty(c,o,f){(!("value"in f)||f.configurable===!1||f.enumerable===!1||f.writable===!1)&&Gn();var h=s.get(o);return h===void 0?l(()=>{var p=te(f.value);return s.set(o,p),p}):K(h,f.value,!0),!0},deleteProperty(c,o){var f=s.get(o);if(f===void 0){if(o in c){const h=l(()=>te(Ce));s.set(o,h),Rs(r)}}else K(f,Ce),Rs(r);return!0},get(c,o,f){if(o===Zt)return e;var h=s.get(o),p=o in c;if(h===void 0&&(!p||us(c,o)?.writable)&&(h=l(()=>{var m=qe(p?c[o]:Ce),b=te(m);return b}),s.set(o,h)),h!==void 0){var u=i(h);return u===Ce?void 0:u}return Reflect.get(c,o,f)},getOwnPropertyDescriptor(c,o){var f=Reflect.getOwnPropertyDescriptor(c,o);if(f&&"value"in f){var h=s.get(o);h&&(f.value=i(h))}else if(f===void 0){var p=s.get(o),u=p?.v;if(p!==void 0&&u!==Ce)return{enumerable:!0,configurable:!0,value:u,writable:!0}}return f},has(c,o){if(o===Zt)return!0;var f=s.get(o),h=f!==void 0&&f.v!==Ce||Reflect.has(c,o);if(f!==void 0||se!==null&&(!h||us(c,o)?.writable)){f===void 0&&(f=l(()=>{var u=h?qe(c[o]):Ce,m=te(u);return m}),s.set(o,f));var p=i(f);if(p===Ce)return!1}return h},set(c,o,f,h){var p=s.get(o),u=o in c;if(a&&o==="length")for(var m=f;mte(Ce)),s.set(m+"",b))}if(p===void 0)(!u||us(c,o)?.writable)&&(p=l(()=>te(void 0)),K(p,qe(f)),s.set(o,p));else{u=p.v!==Ce;var w=l(()=>qe(f));K(p,w)}var _=Reflect.getOwnPropertyDescriptor(c,o);if(_?.set&&_.set.call(h,f),!u){if(a&&typeof o=="string"){var y=s.get("length"),S=Number(o);Number.isInteger(S)&&S>=y.v&&K(y,S+1)}Rs(r)}return!0},ownKeys(c){i(r);var o=Reflect.ownKeys(c).filter(p=>{var u=s.get(p);return u===void 0||u.v!==Ce});for(var[f,h]of s)h.v!==Ce&&!(f in c)&&o.push(f);return o},setPrototypeOf(){Wn()}})}function fr(e){try{if(e!==null&&typeof e=="object"&&Zt in e)return e[Zt]}catch{}return e}function Fi(e,t){return Object.is(fr(e),fr(t))}var ur,en,tn,sn;function Ri(){if(ur===void 0){ur=window,en=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,s=Text.prototype;tn=us(t,"firstChild").get,sn=us(t,"nextSibling").get,or(e)&&(e[Da]=void 0,e[Xs]=null,e[Ma]=void 0,e.__e=void 0),or(s)&&(s[Cs]=void 0)}}function Tt(e=""){return document.createTextNode(e)}function la(e){return tn.call(e)}function Bs(e){return sn.call(e)}function d(e,t){return la(e)}function wt(e,t=!1){{var s=la(e);return s instanceof Comment&&s.data===""?Bs(s):s}}function v(e,t=1,s=!1){let a=e;for(;t--;)a=Bs(a);return a}function Di(e){e.textContent=""}function an(){return!1}function Mi(e,t,s){return document.createElementNS(Mr,e,void 0)}let vr=!1;function Oi(){vr||(vr=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(const t of e.target.elements)t[Zs]?.()})},{capture:!0}))}function Ja(e){var t=ee,s=se;it(null),xt(null);try{return e()}finally{it(t),xt(s)}}function rn(e,t,s,a=s){e.addEventListener(t,()=>Ja(s));const r=e[Zs];r?e[Zs]=()=>{r(),a(!0)}:e[Zs]=()=>a(!0),Oi()}function Pi(e){se===null&&(ee===null&&Kn(),Bn()),Ct&&Nn()}function Li(e,t){var s=t.last;s===null?t.last=t.first=e:(s.next=e,e.prev=s,t.last=e)}function zt(e,t){var s=se;s!==null&&(s.f&Oe)!==0&&(e|=Oe);var a={ctx:Xe,deps:null,nodes:null,f:e|Fe|st,first:null,fn:t,last:null,next:null,parent:s,b:s&&s.b,prev:null,teardown:null,wv:0,ac:null};J?.register_created_effect(a);var r=a;if((e&ys)!==0)fs!==null?fs.push(a):rs.ensure().schedule(a);else if(t!==null){try{ks(a)}catch(l){throw Ne(a),l}r.deps===null&&r.teardown===null&&r.nodes===null&&r.first===r.last&&(r.f&Es)===0&&(r=r.first,(e&ft)!==0&&(e&ss)!==0&&r!==null&&(r.f|=ss))}if(r!==null&&(r.parent=s,s!==null&&Li(r,s),ee!==null&&(ee.f&Re)!==0&&(e&Pt)===0)){var n=ee;(n.effects??(n.effects=[])).push(r)}return a}function Qa(){return ee!==null&&!vt}function nn(e){const t=zt(_a,null);return Se(t,ze),t.teardown=e,t}function ln(e){Pi();var t=se.f,s=!ee&&(t&ht)!==0&&(t&is)===0;if(s){var a=Xe;(a.e??(a.e=[])).push(e)}else return on(e)}function on(e){return zt(ys|On,e)}function Vi(e){rs.ensure();const t=zt(Pt|Es,e);return(s={})=>new Promise(a=>{s.outro?es(t,()=>{Ne(t),a(void 0)}):(Ne(t),a(void 0))})}function cn(e){return zt(ys,e)}function Ii(e){return zt(vs|Es,e)}function er(e,t=0){return zt(_a|t,e)}function q(e,t=[],s=[],a=[]){Ei(a,t,s,r=>{zt(_a,()=>e(...r.map(i)))})}function ma(e,t=0){var s=zt(ft|t,e);return s}function tt(e){return zt(ht|Es,e)}function dn(e){var t=e.teardown;if(t!==null){const s=Ct,a=ee;pr(!0),it(null);try{t.call(null)}finally{pr(s),it(a)}}}function tr(e,t=!1){var s=e.first;for(e.first=e.last=null;s!==null;){const r=s.ac;r!==null&&Ja(()=>{r.abort(ga)});var a=s.next;(s.f&Pt)!==0?s.parent=null:Ne(s,t),s=a}}function qi(e){for(var t=e.first;t!==null;){var s=t.next;(t.f&ht)===0&&Ne(t),t=s}}function Ne(e,t=!0){var s=!1;(t||(e.f&Mn)!==0)&&e.nodes!==null&&e.nodes.end!==null&&(Ni(e.nodes.start,e.nodes.end),s=!0),Se(e,Ra),tr(e,t&&!s),Os(e,0);var a=e.nodes&&e.nodes.t;if(a!==null)for(const n of a)n.stop();dn(e),e.f^=Ra,e.f|=at;var r=e.parent;r!==null&&r.first!==null&&fn(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function Ni(e,t){for(;e!==null;){var s=e===t?null:Bs(e);e.remove(),e=s}}function fn(e){var t=e.parent,s=e.prev,a=e.next;s!==null&&(s.next=a),a!==null&&(a.prev=s),t!==null&&(t.first===e&&(t.first=a),t.last===e&&(t.last=s))}function es(e,t,s=!0){var a=[];un(e,a,!0);var r=()=>{s&&Ne(e),t&&t()},n=a.length;if(n>0){var l=()=>--n||r();for(var c of a)c.out(l)}else r()}function un(e,t,s){if((e.f&Oe)===0){e.f^=Oe;var a=e.nodes&&e.nodes.t;if(a!==null)for(const c of a)(c.is_global||s)&&t.push(c);for(var r=e.first;r!==null;){var n=r.next;if((r.f&Pt)===0){var l=(r.f&ss)!==0||(r.f&ht)!==0&&(e.f&ft)!==0;un(r,t,l?s:!1)}r=n}}}function sr(e){vn(e,!0)}function vn(e,t){if((e.f&Oe)!==0){e.f^=Oe,(e.f&ze)===0&&(Se(e,Fe),rs.ensure().schedule(e));for(var s=e.first;s!==null;){var a=s.next,r=(s.f&ss)!==0||(s.f&ht)!==0;vn(s,r?t:!1),s=a}var n=e.nodes&&e.nodes.t;if(n!==null)for(const l of n)(l.is_global||t)&&l.in()}}function ar(e,t){if(e.nodes)for(var s=e.nodes.start,a=e.nodes.end;s!==null;){var r=s===a?null:Bs(s);t.append(s),s=r}}let sa=!1,Ct=!1;function pr(e){Ct=e}let ee=null,vt=!1;function it(e){ee=e}let se=null;function xt(e){se=e}let rt=null;function pn(e){ee!==null&&(rt===null?rt=[e]:rt.push(e))}let Ie=null,Ue=0,Ze=null;function Bi(e){Ze=e}let hn=1,Nt=0,ts=Nt;function hr(e){ts=e}function _n(){return++hn}function Ks(e){var t=e.f;if((t&Fe)!==0)return!0;if(t&Re&&(e.f&=~as),(t&yt)!==0){for(var s=e.deps,a=s.length,r=0;re.wv)return!0}(t&st)!==0&&ut===null&&Se(e,ze)}return!1}function gn(e,t,s=!0){var a=e.reactions;if(a!==null&&!(rt!==null&&Xt.call(rt,e)))for(var r=0;r{e.ac.abort(ga)}),e.ac=null);try{e.f|=ra;var h=e.fn,p=h();e.f|=is;var u=e.deps,m=J?.is_fork;if(Ie!==null){var b;if(m||Os(e,Ue),u!==null&&Ue>0)for(u.length=Ue+Ie.length,b=0;b{throw _});throw u}}finally{e[Bt]=t,delete e.currentTarget,it(h),xt(p)}}}const Wi=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:e=>e});function Yi(e){return Wi?.createHTML(e)??e}function Xi(e){var t=Mi("template");return t.innerHTML=Yi(e.replaceAll("","")),t.content}function oa(e,t){var s=se;s.nodes===null&&(s.nodes={start:e,end:t,a:null,t:null})}function F(e,t){var s=(t&ni)!==0,a=(t&ii)!==0,r,n=!e.startsWith("");return()=>{r===void 0&&(r=Xi(n?e:""+e),s||(r=la(r)));var l=a||en?document.importNode(r,!0):r.cloneNode(!0);if(s){var c=la(l),o=l.lastChild;oa(c,o)}else oa(l,l);return l}}function Zi(e=""){{var t=Tt(e+"");return oa(t,t),t}}function mr(){var e=document.createDocumentFragment(),t=document.createComment(""),s=Tt();return e.append(t,s),oa(t,s),e}function z(e,t){e!==null&&e.before(t)}function A(e,t){var s=t==null?"":typeof t=="object"?`${t}`:t;s!==(e[Cs]??(e[Cs]=e.nodeValue))&&(e[Cs]=s,e.nodeValue=`${s}`)}function Ji(e,t){return Qi(e,t)}const Ws=new Map;function Qi(e,{target:t,anchor:s,props:a={},events:r,context:n,intro:l=!0,transformError:c}){Ri();var o=void 0,f=Vi(()=>{var h=s??t.appendChild(Tt());yi(h,{pending:()=>{}},m=>{we({});var b=Xe;n&&(b.c=n),r&&(a.$$events=r),o=e(m,a)||{},xe()},c);var p=new Set,u=m=>{for(var b=0;b{for(var m of p)for(const _ of[t,document]){var b=Ws.get(_),w=b.get(m);--w==0?(_.removeEventListener(m,gr),b.delete(m),b.size===0&&Ws.delete(_)):b.set(m,w)}Ka.delete(u),h!==s&&h.parentNode?.removeChild(h)}});return el.set(o,f),o}let el=new WeakMap;var ct,mt,Ye,Yt,qs,Ns,pa;class xn{constructor(t,s=!0){Le(this,"anchor");Z(this,ct,new Map);Z(this,mt,new Map);Z(this,Ye,new Map);Z(this,Yt,new Set);Z(this,qs,!0);Z(this,Ns,t=>{if(g(this,ct).has(t)){var s=g(this,ct).get(t),a=g(this,mt).get(s);if(a)sr(a),g(this,Yt).delete(s);else{var r=g(this,Ye).get(s);r&&(g(this,mt).set(s,r.effect),g(this,Ye).delete(s),r.fragment.lastChild.remove(),this.anchor.before(r.fragment),a=r.effect)}for(const[n,l]of g(this,ct)){if(g(this,ct).delete(n),n===t)break;const c=g(this,Ye).get(l);c&&(Ne(c.effect),g(this,Ye).delete(l))}for(const[n,l]of g(this,mt)){if(n===s||g(this,Yt).has(n))continue;const c=()=>{if(Array.from(g(this,ct).values()).includes(n)){var f=document.createDocumentFragment();ar(l,f),f.append(Tt()),g(this,Ye).set(n,{effect:l,fragment:f})}else Ne(l);g(this,Yt).delete(n),g(this,mt).delete(n)};g(this,qs)||!a?(g(this,Yt).add(n),es(l,c,!1)):c()}}});Z(this,pa,t=>{g(this,ct).delete(t);const s=Array.from(g(this,ct).values());for(const[a,r]of g(this,Ye))s.includes(a)||(Ne(r.effect),g(this,Ye).delete(a))});this.anchor=t,X(this,qs,s)}ensure(t,s){var a=J,r=an();if(s&&!g(this,mt).has(t)&&!g(this,Ye).has(t))if(r){var n=document.createDocumentFragment(),l=Tt();n.append(l),g(this,Ye).set(t,{effect:tt(()=>s(l)),fragment:n})}else g(this,mt).set(t,tt(()=>s(this.anchor)));if(g(this,ct).set(a,t),r){for(const[c,o]of g(this,mt))c===t?a.unskip_effect(o):a.skip_effect(o);for(const[c,o]of g(this,Ye))c===t?a.unskip_effect(o.effect):a.skip_effect(o.effect);a.oncommit(g(this,Ns)),a.ondiscard(g(this,pa))}else g(this,Ns).call(this,a)}}ct=new WeakMap,mt=new WeakMap,Ye=new WeakMap,Yt=new WeakMap,qs=new WeakMap,Ns=new WeakMap,pa=new WeakMap;function ue(e,t,s=!1){var a=new xn(e),r=s?ss:0;function n(l,c){a.ensure(l,c)}ma(()=>{var l=!1;t((c,o=0)=>{l=!0,n(o,c)}),l||n(-1,null)},r)}function Ts(e,t){return t}function tl(e,t,s){for(var a=[],r=t.length,n,l=t.length,c=0;c{if(n){if(n.pending.delete(p),n.done.add(p),n.pending.size===0){var u=e.outrogroups;Ha(e,ha(n.done)),u.delete(n),u.size===0&&(e.outrogroups=null)}}else l-=1},!1)}if(l===0){var o=a.length===0&&s!==null;if(o){var f=s,h=f.parentNode;Di(h),h.append(f),e.items.clear()}Ha(e,t,!o)}else n={pending:new Set(t),done:new Set},(e.outrogroups??(e.outrogroups=new Set)).add(n)}function Ha(e,t,s=!0){var a;if(e.pending.size>0){a=new Set;for(const l of e.pending.values())for(const c of l)a.add(e.items.get(c).e)}for(var r=0;r{var $=s();return Ga($)?$:$==null?[]:ha($)}),u,m=new Map,b=!0;function w($){(S.effect.f&at)===0&&(S.pending.delete($),S.fallback=h,sl(S,u,l,t,a),h!==null&&(u.length===0?(h.f&bt)===0?sr(h):(h.f^=bt,As(h,null,l)):es(h,()=>{h=null})))}function _($){S.pending.delete($)}var y=ma(()=>{u=i(p);for(var $=u.length,R=new Set,N=J,E=an(),C=0;C<$;C+=1){var M=u[C],L=a(M,C),T=b?null:c.get(L);T?(T.v&&xs(T.v,M),T.i&&xs(T.i,C),E&&N.unskip_effect(T.e)):(T=al(c,b?l:br??(br=Tt()),M,L,C,r,t,s),b||(T.e.f|=bt),c.set(L,T)),R.add(L)}if($===0&&n&&!h&&(b?h=tt(()=>n(l)):(h=tt(()=>n(br??(br=Tt()))),h.f|=bt)),$>R.size&&qn(),!b)if(m.set(N,R),E){for(const[P,x]of c)R.has(P)||N.skip_effect(x.e);N.oncommit(w),N.ondiscard(_)}else w(N);i(p)}),S={effect:y,items:c,pending:m,outrogroups:null,fallback:h};b=!1}function $s(e){for(;e!==null&&(e.f&ht)===0;)e=e.next;return e}function sl(e,t,s,a,r){var n=(a&Qn)!==0,l=t.length,c=e.items,o=$s(e.effect.first),f,h=null,p,u=[],m=[],b,w,_,y;if(n)for(y=0;y0){var L=(a&Dr)!==0&&l===0?s:null;if(n){for(y=0;y{if(p!==void 0)for(_ of p)_.nodes?.a?.apply()})}function al(e,t,s,a,r,n,l,c){var o=(l&Zn)!==0?(l&ei)===0?zi(s,!1,!1):ns(s):null,f=(l&Jn)!==0?ns(r):null;return{v:o,i:f,e:tt(()=>(n(t,o??s,f??r,c),()=>{e.delete(a)}))}}function As(e,t,s){if(e.nodes)for(var a=e.nodes.start,r=e.nodes.end,n=t&&(t.f&bt)===0?t.nodes.start:s;a!==null;){var l=Bs(a);if(n.before(a),a===r)return;a=l}}function At(e,t,s){t===null?e.effect.first=s:t.next=s,s===null?e.effect.last=t:s.prev=t}function kn(e,t,...s){var a=new xn(e);ma(()=>{const r=t()??null;a.ensure(r,r&&(n=>r(n,...s)))},ss)}const yr=[...` +\r\f \v\uFEFF`];function rl(e,t,s){var a=e==null?"":""+e;if(s){for(var r of Object.keys(s))if(s[r])a=a?a+" "+r:r;else if(a.length)for(var n=r.length,l=0;(l=a.indexOf(r,l))>=0;){var c=l+n;(l===0||yr.includes(a[l-1]))&&(c===a.length||yr.includes(a[c]))?a=(l===0?"":a.substring(0,l))+a.substring(c+1):l=c}}return a===""?null:a}function wr(e,t=!1){var s=t?" !important;":";",a="";for(var r of Object.keys(e)){var n=e[r];n!=null&&n!==""&&(a+=" "+r+": "+n+s)}return a}function Ta(e){return e[0]!=="-"||e[1]!=="-"?e.toLowerCase():e}function nl(e,t){if(t){var s="",a,r;if(Array.isArray(t)?(a=t[0],r=t[1]):a=t,e){e=String(e).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var n=!1,l=0,c=!1,o=[];a&&o.push(...Object.keys(a).map(Ta)),r&&o.push(...Object.keys(r).map(Ta));var f=0,h=-1;const w=e.length;for(var p=0;p{rr(e,e.__value)});t.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),nn(()=>{t.disconnect()})}function ca(e,t,s=t){var a=new WeakSet,r=!0;rn(e,"change",n=>{var l=n?"[selected]":":checked",c;if(e.multiple)c=[].map.call(e.querySelectorAll(l),Ds);else{var o=e.querySelector(l)??e.querySelector("option:not([disabled])");c=o&&Ds(o)}s(c),e.__value=c,J!==null&&a.add(J)}),cn(()=>{var n=t();if(e===document.activeElement){var l=J;if(a.has(l))return}if(rr(e,n,r),r&&n===void 0){var c=e.querySelector(":checked");c!==null&&(n=Ds(c),s(n))}e.__value=n,r=!1}),Sn(e)}function Ds(e){return"__value"in e?e.__value:e.value}const il=Symbol("is custom element"),ll=Symbol("is html"),ol=Vn?"progress":"PROGRESS";function da(e,t){var s=En(e);s.value===(s.value=t??void 0)||e.value===t&&(t!==0||e.nodeName!==ol)||(e.value=t??"")}function Q(e,t,s,a){var r=En(e);r[t]!==(r[t]=s)&&(t==="loading"&&(e[Ln]=s),s==null?e.removeAttribute(t):typeof s!="string"&&cl(e).includes(t)?e[t]=s:e.setAttribute(t,s))}function En(e){return e[Xs]??(e[Xs]={[il]:e.nodeName.includes("-"),[ll]:e.namespaceURI===Mr})}var xr=new Map;function cl(e){var t=e.getAttribute("is")||e.nodeName,s=xr.get(t);if(s)return s;xr.set(t,s=[]);for(var a,r=e,n=Element.prototype;n!==r;){a=An(r);for(var l in a)a[l].set&&l!=="innerHTML"&&l!=="textContent"&&l!=="innerText"&&s.push(l);r=zr(r)}return s}function $t(e,t,s=t){var a=new WeakSet;rn(e,"input",async r=>{var n=r?e.defaultValue:e.value;if(n=Ca(e)?za(n):n,s(n),J!==null&&a.add(J),await Hi(),n!==(n=t())){var l=e.selectionStart,c=e.selectionEnd,o=e.value.length;if(e.value=n??"",c!==null){var f=e.value.length;l===c&&c===o&&f>o?(e.selectionStart=f,e.selectionEnd=f):(e.selectionStart=l,e.selectionEnd=Math.min(c,f))}}}),ba(t)==null&&e.value&&(s(Ca(e)?za(e.value):e.value),J!==null&&a.add(J)),er(()=>{var r=t();if(e===document.activeElement){var n=J;if(a.has(n))return}Ca(e)&&r===za(e.value)||e.type==="date"&&!r&&!e.value||r!==e.value&&(e.value=r??"")})}function Ca(e){var t=e.type;return t==="number"||t==="range"}function za(e){return e===""?null:+e}function Aa(e,t){return e===t||e?.[Zt]===t}function dl(e={},t,s,a){var r=Xe.r,n=se;return cn(()=>{var l,c;return er(()=>{l=c,c=[],ba(()=>{Aa(s(...c),e)||(t(e,...c),l&&Aa(s(...l),e)&&t(null,...l))})}),()=>{let o=n;for(;o!==r&&o.parent!==null&&o.parent.f&Ra;)o=o.parent;const f=()=>{c&&Aa(s(...c),e)&&t(null,...c)},h=o.teardown;o.teardown=()=>{f(),h?.()}}}),e}function ge(e,t,s,a){var r=!0,n=(s&ai)!==0,l=(s&ri)!==0,c=a,o=!0,f=void 0,h=()=>l&&r?(f??(f=Ms(a)),i(f)):(o&&(o=!1,c=l?ba(a):a),c);let p;if(n){var u=Zt in e||Pn in e;p=us(e,t)?.set??(u&&t in e?R=>e[t]=R:void 0)}var m,b=!1;n?[m,b]=vi(()=>e[t]):m=e[t],m===void 0&&a!==void 0&&(m=h(),p&&(Un(),p(m)));var w;if(w=()=>{var R=e[t];return R===void 0?h():(o=!0,R)},(s&si)===0)return w;if(p){var _=e.$$legacy;return(function(R,N){return arguments.length>0?((!N||_||b)&&p(N?w():R),R):w()})}var y=!1,S=((s&ti)!==0?Ms:Yr)(()=>(y=!1,w()));n&&i(S);var $=se;return(function(R,N){if(arguments.length>0){const E=N?i(S):n?qe(R):R;return K(S,E),y=!0,c!==void 0&&(c=E),R}return Ct&&y||($.f&at)!==0?S.v:i(S)})}const fl="5";var Cr;typeof window<"u"&&((Cr=window.__svelte??(window.__svelte={})).v??(Cr.v=new Set)).add(fl);const It=typeof window<"u"&&window.slashedBricksApp?window.slashedBricksApp:{defaults:{},settings:{},tabs:{},rest:{url:"",nonce:""}},ne={defaults:It.defaults||{},tabs:It.tabs||{},rest:It.rest||{url:"",nonce:""},inventory:It.inventory||{variables:[],sf_classes:[],is_classes:[]},pluginSettings:It.pluginSettings||{},versions:It.versions||{plugin:"",framework:""}},H=qe(structuredClone(It.settings||{})),Y=qe({activeTab:ul(ne.tabs)||"colors",dirty:!1,saving:!1,lastSavedAt:null,error:""});function ul(e){for(const t in e)return t;return null}function nr(){Y.dirty=!0,Y.error=""}function kr(e){H[e]&&delete H[e]}function vl(e,t){const s=H[e];if(!s)return"";const a=s[t];return a==null?"":String(a)}function Ss(e,t,s){H[e]||(H[e]={}),s===""||s===null||s===void 0||typeof s=="string"&&s.trim()===""?delete H[e][t]:H[e][t]=String(s),nr()}var pl=F(''),hl=F('

                                                    ');function _l(e,t){we(t,!0);var s=hl();ie(s,21,()=>Object.entries(ne.tabs),([a,r])=>a,(a,r)=>{var n=j(()=>dt(i(r),2));let l=()=>i(n)[0],c=()=>i(n)[1];var o=pl();let f;var h=d(o);q(()=>{f=nt(o,1,"tab-nav__btn svelte-yyiz68",null,f,{active:Y.activeTab===l()}),A(h,c())}),_e("click",o,()=>Y.activeTab=l()),z(a,o)}),z(e,s),xe()}De(["click"]);var gl=F(' '),ml=F(' ',1),bl=F(''),yl=F('
                                                    ');function Ys(e,t){we(t,!0);let s=ge(t,"hexHint",3,""),a=ge(t,"rawHint",3,""),r=ge(t,"cssVar",3,"");const n=/^#([0-9a-fA-F]{3,4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/,l=(()=>{const P=(H.colors?.[t.storeKey]??"").trim(),x=P===""||n.test(P);return{mode:x?"hex":"raw",hex:x?P:"",raw:x?"":P}})();let c=te(qe(l.mode)),o=te(qe(l.hex)),f=te(qe(l.raw));function h(){H.colors||(H.colors={});const P=i(f).trim(),x=i(o).trim(),k=i(c)==="raw"?P:x;k===""?delete H.colors[t.storeKey]:H.colors[t.storeKey]=k,nr()}function p(){i(c)==="hex"?(K(c,"raw"),K(o,"")):(K(c,"hex"),K(f,"")),h()}const u=j(()=>(i(c)==="raw"?i(f):i(o))||s()||"transparent");var m=yl(),b=d(m),w=d(b),_=d(w),y=v(w,2);{var S=P=>{var x=gl(),k=d(x);q(()=>A(k,r())),z(P,x)};ue(y,P=>{r()&&P(S)})}var $=v(b,2),R=d($);let N;var E=v(R,2);{var C=P=>{var x=ml(),k=wt(x),O=v(k,2);q(()=>{Q(k,"id",t.storeKey),Q(O,"placeholder",s())}),_e("input",k,h),$t(k,()=>i(o),D=>K(o,D)),_e("input",O,h),$t(O,()=>i(o),D=>K(o,D)),z(P,x)},M=P=>{var x=bl();q(()=>{Q(x,"id",t.storeKey),Q(x,"placeholder",a())}),_e("input",x,h),$t(x,()=>i(f),k=>K(f,k)),z(P,x)};ue(E,P=>{i(c)==="hex"?P(C):P(M,-1)})}var L=v(E,2),T=d(L);q(()=>{Q(w,"for",t.storeKey),A(_,t.label),N=ve(R,"",N,{background:i(u)}),A(T,i(c)==="hex"?"Advanced (oklch / raw)":"Use HEX picker")}),_e("click",L,p),z(e,m),xe()}De(["input","click"]);var wl=F('
                                                    '),xl=F('
                                                    ');function ya(e,t){we(t,!0);let s=te(!1);const a=`adv-body-${Math.random().toString(36).slice(2,9)}`;var r=xl(),n=d(r),l=v(d(n));let c;var o=d(l),f=v(n,2);{var h=p=>{var u=wl(),m=d(u);kn(m,()=>t.children),q(()=>Q(u,"id",a)),z(p,u)};ue(f,p=>{i(s)&&p(h)})}q(()=>{Q(n,"aria-expanded",i(s)),Q(n,"aria-controls",a),c=nt(l,1,"advanced-section__arrow",null,c,{open:i(s)}),A(o,i(s)?"▲":"▼")}),_e("click",n,()=>K(s,!i(s))),z(e,r),xe()}De(["click"]);var kl=F('

                                                    Brand Colors — Dark Mode

                                                    Status Colors — Dark Mode

                                                    ',1),Sl=F(`

                                                    Status Colors — Light Mode

                                                    The framework auto-derives dark mode from light source colors using CSS relative color syntax (oklch(from light clamp(0.65, 0.95−l·0.5, 0.88) c·0.9 h)). Turn this on only - when you need precise per-color dark overrides; auto-derivation is usually good enough.

                                                    `,1),kl=F(`

                                                    Brand Colors — Light Mode

                                                    Pick a color via the HEX input, or switch to Advanced to paste any + when you need precise per-color dark overrides; auto-derivation is usually good enough.

                                                    `,1),El=F(`

                                                    Brand Colors — Light Mode

                                                    Pick a color via the HEX input, or switch to Advanced to paste any CSS color value (oklch, rgb, hsl, var(...), etc). Whatever you save is fed - straight into the framework as the source of the brand scale.

                                                    `);function Sl(e,t){ke(t,!0);const s=re.defaults?.colors??{},a=_=>_.charAt(0).toUpperCase()+_.slice(1),r=Object.entries(s.brand??{}),n=j(()=>fl("colors","dark_overrides_enabled")!=="0");function l(){Ss("colors","dark_overrides_enabled",i(n)?"0":"1")}var o=kl(),c=p(f(o),4);ne(c,21,()=>r,([_,v])=>_,(_,v)=>{var u=j(()=>ot(i(v),2));let m=()=>i(u)[0],b=()=>i(u)[1];{let w=j(()=>`brand_${m()}`),h=j(()=>a(m())),y=j(()=>s.brand_hex_hints?.[m()]??""),S=j(()=>`--sf-color-${m()}-light`);Gs(_,{get storeKey(){return i(w)},get label(){return i(h)},get hexHint(){return i(y)},get rawHint(){return b()},get cssVar(){return i(S)}})}});var d=p(c,2);ma(d,{children:(_,v)=>{var u=xl(),m=p(yt(u),2);ne(m,21,()=>Object.entries(s.status??{}),([E,C])=>E,(E,C)=>{var O=j(()=>ot(i(C),2));let L=()=>i(O)[0],T=()=>i(O)[1];{let D=j(()=>`status_${L()}`),x=j(()=>a(L())),k=j(()=>s.status_hex_hints?.[L()]??""),P=j(()=>`--sf-color-${L()}-light`);Gs(E,{get storeKey(){return i(D)},get label(){return i(x)},get hexHint(){return i(k)},get rawHint(){return T()},get cssVar(){return i(P)}})}});var b=p(m,2),w=f(b),h=f(w);let y;var S=p(h,2),$=f(S),R=p(b,2);{var B=E=>{var C=wl(),O=p(yt(C),2);ne(O,21,()=>Object.entries(s.brand_dark??s.brand??{}),([T])=>T,(T,D)=>{var x=j(()=>ot(i(D),1));let k=()=>i(x)[0];{let P=j(()=>`brand_dark_${k()}`),M=j(()=>a(k())),V=j(()=>s.brand_dark_hex_hints?.[k()]??""),U=j(()=>s.brand_dark?.[k()]??""),I=j(()=>`--sf-color-${k()}-dark`);Gs(T,{get storeKey(){return i(P)},get label(){return i(M)},get hexHint(){return i(V)},get rawHint(){return i(U)},get cssVar(){return i(I)}})}});var L=p(O,4);ne(L,21,()=>Object.entries(s.status_dark??s.status??{}),([T])=>T,(T,D)=>{var x=j(()=>ot(i(D),1));let k=()=>i(x)[0];{let P=j(()=>`status_dark_${k()}`),M=j(()=>a(k())),V=j(()=>s.status_dark_hex_hints?.[k()]??""),U=j(()=>s.status_dark?.[k()]??""),I=j(()=>`--sf-color-${k()}-dark`);Gs(T,{get storeKey(){return i(P)},get label(){return i(M)},get hexHint(){return i(V)},get rawHint(){return i(U)},get cssVar(){return i(I)}})}}),z(E,C)};fe(R,E=>{i(n)&&E(B)})}q(()=>{y=rt(h,1,"dark-toggle-btn svelte-1vle0rm",null,y,{on:i(n)}),Q(h,"aria-pressed",i(n)),A($,i(n)?"Active — custom values override auto-derivation":"Off — dark mode auto-derived from light source colors")}),he("click",h,l),z(_,u)},$$slots:{default:!0}}),z(e,o),Se()}De(["click"]);var El=F(''),jl=F(' '),Tl=F(' '),$l=F('

                                                    '),Cl=F('
                                                    ');function ba(e,t){let s=_e(t,"cssVar",3,""),a=_e(t,"fieldId",3,""),r=_e(t,"description",3,"");var n=Cl(),l=f(n),o=f(l);{var c=h=>{var y=El(),S=f(y);q(()=>{Q(y,"for",a()),A(S,t.label)}),z(h,y)},d=h=>{var y=jl(),S=f(y);q(()=>A(S,t.label)),z(h,y)};fe(o,h=>{a()?h(c):h(d,-1)})}var _=p(o,2);{var v=h=>{var y=Tl(),S=f(y);q(()=>A(S,s())),z(h,y)};fe(_,h=>{s()&&h(v)})}var u=p(l,2),m=f(u);wn(m,()=>t.children??Cr);var b=p(m,2);{var w=h=>{var y=$l(),S=f(y);q(()=>A(S,r())),z(h,y)};fe(b,h=>{r()&&h(w)})}z(e,n)}var zl=F('');function ca(e,t){ke(t,!0);let s=_e(t,"default",3,""),a=_e(t,"cssVar",3,""),r=_e(t,"description",3,""),n=_e(t,"mono",3,!1),l=_e(t,"width",3,"320px");const o=j(()=>H[t.section]?.[t.fieldKey]===void 0||H[t.section]?.[t.fieldKey]===null?"":String(H[t.section][t.fieldKey]));function c(d){Ss(t.section,t.fieldKey,d.currentTarget.value)}ba(e,{get label(){return t.label},get cssVar(){return a()},get fieldId(){return t.fieldKey},get description(){return r()},children:(d,_)=>{var v=zl();let u,m;q(b=>{Q(v,"id",t.fieldKey),u=rt(v,1,"text svelte-j8yw6l",null,u,{mono:n()}),oa(v,i(o)),Q(v,"placeholder",b),m=ve(v,"",m,{width:l()})},[()=>String(s())]),he("input",v,c),z(d,v)},$$slots:{default:!0}}),Se()}De(["input"]);var Al=F(' '),Fl=F(' ',1);function ut(e,t){ke(t,!0);let s=_e(t,"min",3,void 0),a=_e(t,"max",3,void 0),r=_e(t,"step",3,void 0),n=_e(t,"default",3,""),l=_e(t,"cssVar",3,""),o=_e(t,"unit",3,""),c=_e(t,"description",3,""),d=_e(t,"width",3,"120px");const _=j(()=>H[t.section]?.[t.fieldKey]===void 0||H[t.section]?.[t.fieldKey]===null?"":String(H[t.section][t.fieldKey]));function v(u){Ss(t.section,t.fieldKey,u.currentTarget.value)}ba(e,{get label(){return t.label},get cssVar(){return l()},get fieldId(){return t.fieldKey},get description(){return c()},children:(u,m)=>{var b=Fl(),w=yt(b);let h;var y=p(w,2);{var S=$=>{var R=Al(),B=f(R);q(()=>A(B,o())),z($,R)};fe(y,$=>{o()&&$(S)})}q($=>{Q(w,"id",t.fieldKey),Q(w,"min",s()),Q(w,"max",a()),Q(w,"step",r()),oa(w,i(_)),Q(w,"placeholder",$),h=ve(w,"",h,{width:d()})},[()=>String(n())]),he("input",w,v),z(u,b)},$$slots:{default:!0}}),Se()}De(["input"]);var Rl=F('
                                                    '),Ml=F('
                                                    '),Ol=F('

                                                    Display Scale

                                                    '),Dl=F('

                                                    Live Scale Preview

                                                    Text Scale

                                                    ');function Pl(e,t){ke(t,!0);const s=16,a=360,r=1520;let n=te(r);const o=(re.defaults?.typography??{}).font_sizes??{};function c(T){const D=H.typography??{},x=o[T]??{},k=D[`size_${T}_min`],P=D[`size_${T}_max`],M=k!==void 0&&k!==""?parseFloat(k):x.min??.75,V=P!==void 0&&P!==""?parseFloat(P):x.max??1;return{min:M,max:V}}const d=j(()=>{const T=Math.max(0,Math.min(1,(i(n)-a)/(r-a))),D={};for(const x of Object.keys(o)){const{min:k,max:P}=c(x),M=k+(P-k)*T,V=M*s;D[x]={sizePx:V,sizeRem:M.toFixed(3)}}return D}),_=["2xs","xs","s","m","l","xl","2xl","3xl","4xl"],v=["display-s","display-m","display-l"],u=j(()=>_.filter(T=>o[T])),m=j(()=>v.filter(T=>o[T]));var b=Dl(),w=f(b),h=p(f(w),2),y=f(h);y.textContent="360px";var S=p(y,2);Q(S,"min",a),Q(S,"max",r);var $=p(S,2);$.textContent="1520px";var R=p($,2),B=f(R),E=p(w,2),C=p(f(E),2);ne(C,16,()=>i(u),T=>T,(T,D)=>{const x=j(()=>i(d)[D]);var k=_r(),P=yt(k);{var M=V=>{var U=Rl(),I=f(U),Y=f(I),G=p(I,2);let ae;var ue=f(G),ce=p(G,2),pe=f(ce);q((ge,N)=>{A(Y,D),ae=ve(G,"",ae,ge),A(ue,D),A(pe,`${i(x).sizeRem??""}rem / ${N??""}px`)},[()=>({"font-size":`${i(x).sizePx.toFixed(1)??""}px`}),()=>i(x).sizePx.toFixed(1)]),z(V,U)};fe(P,V=>{i(x)&&V(M)})}z(T,k)});var O=p(E,2);{var L=T=>{var D=Ol(),x=p(f(D),2);ne(x,16,()=>i(m),k=>k,(k,P)=>{const M=j(()=>i(d)[P]);var V=_r(),U=yt(V);{var I=Y=>{var G=Ml(),ae=f(G),ue=f(ae),ce=p(ae,2);let pe;var ge=f(ce),N=p(ce,2),le=f(N);q((me,ye)=>{A(ue,P),pe=ve(ce,"",pe,me),A(ge,P),A(le,`${i(M).sizeRem??""}rem / ${ye??""}px`)},[()=>({"font-size":`${i(M).sizePx.toFixed(1)??""}px`}),()=>i(M).sizePx.toFixed(1)]),z(Y,G)};fe(U,Y=>{i(M)&&Y(I)})}z(k,V)}),z(T,D)};fe(O,T=>{i(m).length>0&&T(L)})}q(()=>A(B,`${i(n)??""}px`)),Tt(S,()=>i(n),T=>K(n,T)),z(e,b),Se()}var Ll=F(""),Vl=F(""),Il=F('
                                                    '),ql=F('
                                                    Scale Generator Computes all step min/max values from a modular scale. Click Apply to write them to the fields below.
                                                    ');function Nl(e,t){ke(t,!0);const s=[{label:"Minor Second (1.067)",value:1.067},{label:"Major Second (1.125)",value:1.125},{label:"Minor Third (1.200)",value:1.2},{label:"Major Third (1.250)",value:1.25},{label:"Perfect Fourth (1.333)",value:1.333},{label:"Aug. Fourth (1.414)",value:1.414},{label:"Perfect Fifth (1.500)",value:1.5},{label:"Golden Ratio (1.618)",value:1.618},{label:"Major Sixth (1.667)",value:1.667},{label:"Octave (2.000)",value:2}],a=[{name:"2xs",idx:-4},{name:"xs",idx:-3},{name:"s",idx:-2},{name:"m",idx:0},{name:"l",idx:1},{name:"xl",idx:2},{name:"2xl",idx:3},{name:"3xl",idx:4},{name:"4xl",idx:5},{name:"display-s",idx:5},{name:"display-m",idx:6},{name:"display-l",idx:7}];let r=te(1),n=te(1.25),l=te(1.25),o=te(1.333),c=te(.85);const d=j(()=>a.map(({name:k,idx:P})=>{const V=k.startsWith("display")?i(c):1,U=+(i(r)*V*Math.pow(i(l),P)).toFixed(4),I=+(i(n)*V*Math.pow(i(o),P)).toFixed(4);return{name:k,min:U,max:I}}));function _(){H.typography||(H.typography={});for(const{name:k,min:P,max:M}of i(d))H.typography[`size_${k}_min`]=String(P),H.typography[`size_${k}_max`]=String(M);ar()}var v=ql(),u=p(f(v),2),m=f(u),b=p(f(m),2),w=f(b),h=p(m,2),y=p(f(h),2),S=f(y),$=p(h,2),R=p(f($),2);ne(R,21,()=>s,k=>k.value,(k,P)=>{var M=Ll(),V=f(M),U={};q(()=>{A(V,i(P).label),U!==(U=i(P).value)&&(M.value=(M.__value=i(P).value)??"")}),z(k,M)});var B=p($,2),E=p(f(B),2);ne(E,21,()=>s,k=>k.value,(k,P)=>{var M=Vl(),V=f(M),U={};q(()=>{A(V,i(P).label),U!==(U=i(P).value)&&(M.value=(M.__value=i(P).value)??"")}),z(k,M)});var C=p(B,2),O=p(f(C),2),L=f(O),T=p(u,2);ne(T,21,()=>i(d),({name:k,min:P,max:M})=>k,(k,P)=>{let M=()=>i(P).name,V=()=>i(P).min,U=()=>i(P).max;var I=Il();let Y;var G=f(I),ae=f(G),ue=p(G,2),ce=f(ue);q((pe,ge,N)=>{Y=rt(I,1,"scale-gen__step svelte-1y8fkhh",null,Y,pe),A(ae,M()),A(ce,`${ge??""} / ${N??""}`)},[()=>({display:M().startsWith("display")}),()=>V().toFixed(3),()=>U().toFixed(3)]),z(k,I)});var D=p(T,2),x=f(D);Tt(w,()=>i(r),k=>K(r,k)),Tt(S,()=>i(n),k=>K(n,k)),la(R,()=>i(l),k=>K(l,k)),la(E,()=>i(o),k=>K(o,k)),Tt(L,()=>i(c),k=>K(c,k)),he("click",x,_),z(e,v),Se()}De(["click"]);var Bl=F('
                                                    '),Kl=F('

                                                    Additional Font Families

                                                    Scale Multipliers

                                                    ',1),Hl=F('

                                                    Font Families

                                                    Font Size Scale

                                                    Min and max values in rem for fluid type scaling via clamp().

                                                    ');function Ul(e,t){ke(t,!0);const s="typography",a=re.defaults?.[s]??{},r=a.font_families??{},n=a.font_sizes??{},l=h=>h.charAt(0).toUpperCase()+h.slice(1),o=["body","heading"],c=Object.fromEntries(Object.entries(r).filter(([h])=>o.includes(h))),d=Object.fromEntries(Object.entries(r).filter(([h])=>!o.includes(h)));var _=Hl(),v=p(f(_),2);ne(v,21,()=>Object.entries(c),([h,y])=>h,(h,y)=>{var S=j(()=>ot(i(y),2));let $=()=>i(S)[0],R=()=>i(S)[1];{let B=j(()=>`font_${$()}`),E=j(()=>l($())),C=j(()=>`--sf-font-${$()}`);ca(h,{section:s,get fieldKey(){return i(B)},get label(){return i(E)},get default(){return R()},get cssVar(){return i(C)},width:"420px"})}});var u=p(v,6);Nl(u,{});var m=p(u,2);ne(m,21,()=>Object.entries(n),([h,y])=>h,(h,y)=>{var S=j(()=>ot(i(y),2));let $=()=>i(S)[0],R=()=>i(S)[1];var B=Bl(),E=f(B),C=f(E),O=f(C),L=p(C,2),T=f(L),D=p(E,2),x=f(D);{let P=j(()=>`size_${$()}_min`);ut(x,{section:s,get fieldKey(){return i(P)},label:"Min",min:0,step:.01,get default(){return R().min},width:"80px"})}var k=p(x,2);{let P=j(()=>`size_${$()}_max`);ut(k,{section:s,get fieldKey(){return i(P)},label:"Max",min:0,step:.01,get default(){return R().max},width:"80px"})}q(()=>{A(O,$()),A(T,`--sf-text-${$()??""}`)}),z(h,B)});var b=p(m,2);Pl(b,{});var w=p(b,2);ma(w,{children:(h,y)=>{var S=Kl(),$=p(yt(S),2);ne($,21,()=>Object.entries(d),([C,O])=>C,(C,O)=>{var L=j(()=>ot(i(O),2));let T=()=>i(L)[0],D=()=>i(L)[1];{let x=j(()=>`font_${T()}`),k=j(()=>l(T())),P=j(()=>`--sf-font-${T()}`);ca(C,{section:s,get fieldKey(){return i(x)},get label(){return i(k)},get default(){return D()},get cssVar(){return i(P)},width:"420px"})}});var R=p($,4),B=f(R);{let C=j(()=>a.scale_multipliers?.text_scale??1);ut(B,{section:s,fieldKey:"text_scale",label:"Text Scale",min:0,step:.05,get default(){return i(C)},cssVar:"--sf-text-scale"})}var E=p(B,2);{let C=j(()=>a.scale_multipliers?.text_display_scale??1);ut(E,{section:s,fieldKey:"text_display_scale",label:"Display Scale",min:0,step:.05,get default(){return i(C)},cssVar:"--sf-text-display-scale"})}z(h,S)},$$slots:{default:!0}}),z(e,_),Se()}var Gl=F('
                                                    '),Wl=F('

                                                    Live Scale Preview

                                                    Card heading
                                                    ');function Yl(e,t){ke(t,!0);const s=360,a=1440;let r=te(a);const n=re.defaults?.spacing??{},l=n.space_sizes??{};function o(I){const Y=H.spacing??{},G=l[I]??{},ae=Y[`space_${I}_min`],ue=Y[`space_${I}_max`],ce=ae!==void 0&&ae!==""?parseFloat(ae):G.min??1,pe=ue!==void 0&&ue!==""?parseFloat(ue):G.max??1;return{min:ce,max:pe}}const c=j(()=>{const I=parseFloat(H.spacing?.space_scale??n.space_scale??1)||1,Y=Math.max(0,Math.min(1,(i(r)-s)/(a-s))),G=["2xs","xs","s","m","l","xl","2xl","3xl","4xl"],ae=o("4xl").max*I;return G.map(ue=>{const{min:ce,max:pe}=o(ue),ge=(ce+(pe-ce)*Y)*I,N=ge/ae*100;return{name:ue,sizeRem:ge.toFixed(3),barPct:Math.min(N,100)}})}),d=j(()=>{const I=parseFloat(H.spacing?.space_scale??n.space_scale??1)||1,Y=Math.max(0,Math.min(1,(i(r)-s)/(a-s))),G=ae=>{const{min:ue,max:ce}=o(ae);return((ue+(ce-ue)*Y)*I).toFixed(3)};return{xs:G("xs"),s:G("s"),m:G("m"),l:G("l")}});var _=Wl(),v=f(_),u=p(f(v),2),m=f(u);m.textContent="360px";var b=p(m,2);Q(b,"min",s),Q(b,"max",a);var w=p(b,2);w.textContent="1440px";var h=p(w,2),y=f(h),S=p(v,2);ne(S,21,()=>i(c),I=>I.name,(I,Y)=>{var G=Gl(),ae=f(G),ue=f(ae),ce=p(ae,2),pe=f(ce);let ge;var N=p(ce,2),le=f(N);q(()=>{A(ue,`--sf-space-${i(Y).name??""}`),ge=ve(pe,"",ge,{width:`${i(Y).barPct??""}%`}),A(le,`${i(Y).sizeRem??""}rem`)}),z(I,G)});var $=p(S,2),R=f($),B=f(R),E=p(R,2);let C;var O=f(E);let L;var T=p(f(O),2),D=p(f(T),2),x=f(D),k=p(O,2),P=f(k),M=p(k,2);let V;var U=p(f(M),2);ve(U,"",{},{width:"3rem"}),q(()=>{A(y,`${i(r)??""}px`),A(B,`Container context at ${i(r)??""}px`),C=ve(E,"",C,{padding:`${i(d).m??""}rem`,gap:`${i(d).s??""}rem`}),L=ve(O,"",L,{gap:`${i(d).s??""}rem`}),A(x,`padding: ${i(d).m??""}rem`),A(P,`Body section · gap between rows: ${i(d).s??""}rem`),V=ve(M,"",V,{gap:`${i(d).xs??""}rem`,"padding-top":`${i(d).xs??""}rem`})}),Tt(b,()=>i(r),I=>K(r,I)),z(e,_),Se()}var Xl=F('
                                                    '),Zl=F('

                                                    Space Aliases

                                                    ',1),Jl=F(`

                                                    Spacing

                                                    Space Scale Steps

                                                    Min and max values in rem for fluid spacing via clamp(). - Leave both fields blank to use the framework defaults.

                                                    `);function Ql(e,t){ke(t,!0);const s="spacing",a=re.defaults?.[s]??{},r=a.space_sizes??{},n=[{key:"gutter",label:"Gutter",cssVar:"--sf-space-gutter"},{key:"gap",label:"Gap",cssVar:"--sf-gap"},{key:"content_gap",label:"Content Gap",cssVar:"--sf-content-gap"},{key:"component_pad",label:"Component Pad",cssVar:"--sf-component-pad"},{key:"section_pad",label:"Section Pad",cssVar:"--sf-section-pad"}];var l=Jl(),o=p(f(l),2),c=f(o);{let u=j(()=>a.space_scale??1);ut(c,{section:s,fieldKey:"space_scale",label:"Space Scale",min:0,step:.05,get default(){return i(u)},cssVar:"--sf-space-scale"})}var d=p(o,6);ne(d,21,()=>Object.entries(r),([u,m])=>u,(u,m)=>{var b=j(()=>ot(i(m),2));let w=()=>i(b)[0],h=()=>i(b)[1];var y=Xl(),S=f(y),$=f(S),R=f($),B=p($,2),E=f(B),C=p(S,2),O=f(C);{let T=j(()=>`space_${w()}_min`);ut(O,{section:s,get fieldKey(){return i(T)},label:"Min",min:0,step:.01,get default(){return h().min},width:"80px"})}var L=p(O,2);{let T=j(()=>`space_${w()}_max`);ut(L,{section:s,get fieldKey(){return i(T)},label:"Max",min:0,step:.01,get default(){return h().max},width:"80px"})}q(()=>{A(R,w()),A(E,`--sf-space-${w()??""}`)}),z(u,y)});var _=p(d,2);Yl(_,{});var v=p(_,2);ma(v,{children:(u,m)=>{var b=Zl(),w=p(yt(b),2);ne(w,21,()=>n,h=>h.key,(h,y)=>{{let S=j(()=>a[i(y).key]??"");ca(h,{section:s,get fieldKey(){return i(y).key},get label(){return i(y).label},get default(){return i(S)},get cssVar(){return i(y).cssVar},mono:!0})}}),z(u,b)},$$slots:{default:!0}}),z(e,l),Se()}var eo=F(' '),to=F(' ',1);function cs(e,t){ke(t,!0);let s=_e(t,"cssVar",3,""),a=_e(t,"unit",3,""),r=_e(t,"description",3,"");const n=j(()=>H[t.section]?.[t.fieldKey]===void 0||H[t.section]?.[t.fieldKey]===null?"":String(H[t.section][t.fieldKey])),l=j(()=>i(n)===""||Number.isNaN(Number(i(n)))?Number(t.default):Number(i(n)));function o(d){Ss(t.section,t.fieldKey,d.currentTarget.value)}function c(d){Ss(t.section,t.fieldKey,d.currentTarget.value)}ba(e,{get label(){return t.label},get cssVar(){return s()},get fieldId(){return t.fieldKey},get description(){return r()},children:(d,_)=>{var v=to(),u=yt(v),m=p(u,2),b=p(m,2);{var w=h=>{var y=eo(),S=f(y);q(()=>A(S,a())),z(h,y)};fe(b,h=>{a()&&h(w)})}q(h=>{Q(u,"min",t.min),Q(u,"max",t.max),Q(u,"step",t.step),oa(u,i(l)),Q(m,"id",t.fieldKey),Q(m,"min",t.min),Q(m,"max",t.max),Q(m,"step",t.step),oa(m,i(n)),Q(m,"placeholder",h)},[()=>String(t.default)]),he("input",u,o),he("input",m,c),z(d,v)},$$slots:{default:!0}}),Se()}De(["input"]);var so=F(""),ao=F('');function ro(e,t){ke(t,!0);let s=_e(t,"options",19,()=>[]),a=_e(t,"default",3,""),r=_e(t,"cssVar",3,""),n=_e(t,"description",3,"");const l=j(()=>s().map(d=>typeof d=="string"?{value:d,label:d}:d)),o=j(()=>H[t.section]?.[t.fieldKey]===void 0||H[t.section]?.[t.fieldKey]===null?"":String(H[t.section][t.fieldKey]));function c(d){Ss(t.section,t.fieldKey,d.currentTarget.value)}ba(e,{get label(){return t.label},get cssVar(){return r()},get fieldId(){return t.fieldKey},get description(){return n()},children:(d,_)=>{var v=ao(),u=f(v),m=f(u);u.value=u.__value="";var b=p(u);ne(b,17,()=>i(l),h=>h.value,(h,y)=>{var S=so(),$=f(S),R={};q(()=>{A($,i(y).label),R!==(R=i(y).value)&&(S.value=(S.__value=i(y).value)??"")}),z(h,S)});var w;xn(v),q(()=>{Q(v,"id",t.fieldKey),A(m,`Default (${a()??""})`),w!==(w=i(o))&&(v.value=(v.__value=i(o))??"",sr(v,i(o)))}),he("change",v,c),z(d,v)},$$slots:{default:!0}}),Se()}De(["change"]);var no=F('
                                                    '),io=F('
                                                    '),lo=F('
                                                    '),oo=F('

                                                    Shadow

                                                    Motion — Durations

                                                    Base duration values in milliseconds.

                                                    Z-Index

                                                    Z-index layer values for stacking context management.

                                                    Contrast

                                                    ',1),co=F('

                                                    Radius

                                                    Shadows

                                                    Motion

                                                    Accessibility

                                                    ');function fo(e,t){ke(t,!0);const s=re.defaults?.radius??{},a=re.defaults?.shadows??{},r=re.defaults?.motion??{},n=re.defaults?.zindex??{},l=re.defaults?.contrast??{},o=r.durations??{},c=N=>N.charAt(0).toUpperCase()+N.slice(1),d=[0,2,4,8,12,16,24,9999],_=["none","xs","s","m","l","xl","2xl","full"],v=j(()=>parseFloat(H.radius?.radius_scale??re.defaults?.radius?.radius_scale??1)),u=j(()=>d.map(N=>N*i(v))),m=j(()=>parseFloat(H.shadows?.shadow_strength??a.shadow_strength??.08)),b=j(()=>parseFloat(H.motion?.motion_scale??r.motion_scale??1)||1),w=["instant","fast","normal","slow","slower"],h=j(()=>w.map(N=>{const le=H.motion?.[`duration_${N}`],me=parseFloat(le!==void 0&&le!==""?le:o[N]??0);return{name:N,ms:Math.round(me*i(b))}})),y=(N,le)=>parseFloat(N!==void 0&&N!==""?N:le),S=j(()=>y(H.contrast?.focus_ring_width,l.focus_ring_width??2)),$=j(()=>y(H.contrast?.focus_ring_offset,l.focus_ring_offset??2)),R=j(()=>H.contrast?.focus_ring_style??l.focus_ring_style??"solid"),B=j(()=>[{label:"xs",shadow:`0 1px 2px 0 rgba(0,0,0,${(i(m)*.5).toFixed(4)})`},{label:"s",shadow:`0 1px 2px 0 rgba(0,0,0,${(i(m)*.5).toFixed(4)}), 0 2px 6px 0 rgba(0,0,0,${i(m).toFixed(4)})`},{label:"m",shadow:`0 1px 3px 0 rgba(0,0,0,${(i(m)*.5).toFixed(4)}), 0 4px 12px 0 rgba(0,0,0,${(i(m)*2).toFixed(4)})`},{label:"l",shadow:`0 2px 4px 0 rgba(0,0,0,${(i(m)*.5).toFixed(4)}), 0 8px 24px 0 rgba(0,0,0,${(i(m)*3).toFixed(4)})`},{label:"xl",shadow:`0 2px 8px 0 rgba(0,0,0,${(i(m)*.5).toFixed(4)}), 0 12px 36px 0 rgba(0,0,0,${(i(m)*3.5).toFixed(4)})`},{label:"glow",shadow:`0 0 15px 2px rgba(74,48,208,${Math.min(i(m)*2,.7).toFixed(4)})`}]);var E=co(),C=p(f(E),2),O=f(C);{let N=j(()=>s.radius_scale??1);ut(O,{section:"radius",fieldKey:"radius_scale",label:"Radius Scale",min:0,step:.1,get default(){return i(N)},cssVar:"--sf-radius-scale"})}var L=p(C,2);ne(L,23,()=>i(u),(N,le)=>_[le],(N,le,me)=>{var ye=no(),Ce=f(ye);let ze;var Re=p(Ce,2),oe=f(Re);q(()=>{ze=ve(Ce,"",ze,{"border-radius":d[i(me)]===9999?"9999px":`${i(le)}px`}),A(oe,_[i(me)])}),z(N,ye)});var T=p(L,4),D=f(T);{let N=j(()=>a.shadow_strength??.08);cs(D,{section:"shadows",fieldKey:"shadow_strength",label:"Shadow Strength",description:"Base opacity for shadow layers (0–1).",min:0,max:1,step:.01,get default(){return i(N)},cssVar:"--sf-shadow-strength"})}var x=p(T,2);ne(x,21,()=>i(B),N=>N.label,(N,le)=>{var me=io(),ye=f(me);let Ce;var ze=f(ye);q(()=>{Ce=ve(ye,"",Ce,{"box-shadow":i(le).shadow}),A(ze,i(le).label)}),z(N,me)});var k=p(x,4),P=f(k);{let N=j(()=>r.motion_scale??1);ut(P,{section:"motion",fieldKey:"motion_scale",label:"Motion Scale",min:0,step:.1,get default(){return i(N)},cssVar:"--sf-motion-scale"})}var M=p(k,2);ne(M,21,()=>i(h),N=>N.name,(N,le)=>{var me=lo(),ye=f(me),Ce=f(ye),ze=p(ye,2),Re=f(ze);let oe;var we=p(ze,2),be=f(we);q(()=>{A(Ce,i(le).name),oe=ve(Re,"",oe,{"animation-duration":`${i(le).ms??""}ms`}),A(be,`${i(le).ms??""}ms`)}),z(N,me)});var V=p(M,4),U=f(V);{let N=j(()=>l.focus_ring_width??2);cs(U,{section:"contrast",fieldKey:"focus_ring_width",label:"Focus Ring Width",min:0,max:8,step:.5,get default(){return i(N)},cssVar:"--sf-focus-ring-width",unit:"px"})}var I=p(U,2);{let N=j(()=>l.focus_ring_offset??2);cs(I,{section:"contrast",fieldKey:"focus_ring_offset",label:"Focus Ring Offset",min:0,max:8,step:.5,get default(){return i(N)},cssVar:"--sf-focus-ring-offset",unit:"px"})}var Y=p(I,2);{let N=j(()=>l.focus_ring_style??"solid");ro(Y,{section:"contrast",fieldKey:"focus_ring_style",label:"Focus Ring Style",options:["solid","dashed","dotted","double","none"],get default(){return i(N)},cssVar:"--sf-focus-ring-style"})}var G=p(V,2),ae=f(G);let ue;var ce=p(ae,2),pe=f(ce),ge=p(G,2);ma(ge,{children:(N,le)=>{var me=oo(),ye=p(yt(me),2),Ce=f(ye);{let xe=j(()=>a.glow_color??"");ca(Ce,{section:"shadows",fieldKey:"glow_color",label:"Glow Color",get default(){return i(xe)},cssVar:"--sf-shadow-glow-color",mono:!0})}var ze=p(ye,6);ne(ze,21,()=>Object.entries(o),([xe,pt])=>xe,(xe,pt)=>{var zt=j(()=>ot(i(pt),2));let it=()=>i(zt)[0],Lt=()=>i(zt)[1];{let ls=j(()=>`duration_${it()}`),$e=j(()=>c(it())),Vt=j(()=>`--sf-duration-${it()}`);ut(xe,{section:"motion",get fieldKey(){return i(ls)},get label(){return i($e)},min:0,step:10,get default(){return Lt()},get cssVar(){return i(Vt)},unit:"ms"})}});var Re=p(ze,6);ne(Re,21,()=>Object.entries(n),([xe,pt])=>xe,(xe,pt)=>{var zt=j(()=>ot(i(pt),2));let it=()=>i(zt)[0],Lt=()=>i(zt)[1];{let ls=j(()=>c(it())),$e=j(()=>`--sf-z-${it()}`);ut(xe,{section:"zindex",get fieldKey(){return it()},get label(){return i(ls)},step:1,get default(){return Lt()},get cssVar(){return i($e)}})}});var oe=p(Re,4),we=f(oe);{let xe=j(()=>l.contrast_bias??0);cs(we,{section:"contrast",fieldKey:"contrast_bias",label:"Contrast Bias",description:"Shifts derived shades up (positive) or down (negative).",min:-.2,max:.2,step:.01,get default(){return i(xe)},cssVar:"--sf-contrast-bias"})}var be=p(we,2);{let xe=j(()=>l.contrast_threshold??.6);cs(be,{section:"contrast",fieldKey:"contrast_threshold",label:"Contrast Threshold",description:"Lightness threshold for text-on-color (white vs. black).",min:0,max:1,step:.01,get default(){return i(xe)},cssVar:"--sf-contrast-threshold"})}var Ke=p(be,2);{let xe=j(()=>l.opacity_disabled??.45);cs(Ke,{section:"contrast",fieldKey:"opacity_disabled",label:"Disabled Opacity",min:0,max:1,step:.01,get default(){return i(xe)},cssVar:"--sf-opacity-disabled"})}z(N,me)},$$slots:{default:!0}}),q(()=>{ue=ve(ae,"",ue,{"--fp-width":`${i(S)??""}px`,"--fp-offset":`${i($)??""}px`,"--fp-style":i(R)}),A(pe,`${i(S)??""}px ${i(R)??""} · ${i($)??""}px offset`)}),z(e,E),Se()}var uo=F('
                                                  • '),vo=F('
                                                      '),po=F('
                                                      '),ho=F(`

                                                      All --sf-* custom properties declared in the active SLASHED bundle, - grouped by category.

                                                      `);function _o(e,t){ke(t,!0);const s=re.inventory?.variables??[],a={color:"Colors",text:"Typography",font:"Typography",leading:"Typography",tracking:"Typography",body:"Typography",heading:"Typography",h1:"Typography",h2:"Typography",h3:"Typography",h4:"Typography",h5:"Typography",h6:"Typography",prose:"Typography",code:"Typography",optical:"Typography",line:"Typography",space:"Spacing",gap:"Spacing",gutter:"Spacing",component:"Spacing",section:"Spacing",flow:"Spacing",safe:"Spacing",header:"Spacing",sticky:"Spacing",size:"Sizing",aspect:"Sizing",ratio:"Sizing",touch:"Sizing",container:"Layout",stack:"Layout",cluster:"Layout",sidebar:"Layout",switcher:"Layout",grid:"Layout",cover:"Layout",frame:"Layout",reel:"Layout",imposter:"Layout",bento:"Layout",box:"Layout",center:"Layout",content:"Layout",breakout:"Layout",divider:"Layout",field:"Layout",border:"Borders",stroke:"Borders",radius:"Radius",shadow:"Shadows",blur:"Effects",opacity:"Effects",gradient:"Effects",mask:"Effects",perspective:"Effects",drop:"Effects",contrast:"Effects",duration:"Motion",ease:"Motion",transition:"Motion",motion:"Motion",animation:"Motion",icon:"Icons",z:"Z-Index",is:"States",current:"States",focus:"Focus",caret:"Focus",scroll:"Scroll",scrollbar:"Scroll",print:"Print",truncate:"Misc"},r=["Colors","Typography","Spacing","Sizing","Layout","Borders","Radius","Shadows","Effects","Motion","Icons","Z-Index","States","Focus","Scroll","Print","Misc"];function n(b){let w=b;w.startsWith("--sf-")&&(w=w.slice(5));const h=w.indexOf("-"),y=h===-1?w:w.slice(0,h);return a[y]||"Misc"}function l(b){const w={};for(const y of b){const S=n(y);w[S]||(w[S]=[]),w[S].push(y)}const h=[];for(const y of r)w[y]?.length&&(w[y].sort(),h.push({category:y,items:w[y]}));for(const y of Object.keys(w))!r.includes(y)&&w[y]?.length&&(w[y].sort(),h.push({category:y,items:w[y]}));return h}const o=l(s);let c=Ne({});function d(b){c[b]=!c[b]}var _=ho(),v=f(_),u=f(v),m=p(v,4);ne(m,17,()=>o,({category:b,items:w})=>b,(b,w)=>{let h=()=>i(w).category,y=()=>i(w).items;var S=po(),$=f(S),R=f($),B=f(R),E=p(R,2),C=f(E),O=p(E,2),L=f(O),T=p($,2);{var D=x=>{var k=vo();ne(k,20,y,P=>P,(P,M)=>{var V=uo(),U=f(V),I=f(U);q(()=>A(I,M)),z(P,V)}),z(x,k)};fe(T,x=>{c[h()]&&x(D)})}q(()=>{Q($,"aria-expanded",c[h()]?"true":"false"),A(B,c[h()]?"▼":"▶"),A(C,h()),A(L,`(${y().length??""})`)}),he("click",$,()=>d(h())),z(b,S)}),q(()=>A(u,`CSS Variables (${s.length??""})`)),z(e,_),Se()}De(["click"]);var go=F('
                                                    • '),mo=F('
                                                        '),bo=F('
                                                      • '),yo=F('
                                                          '),wo=F('

                                                          All utility and state classes declared in the active SLASHED bundle.

                                                          ');function xo(e,t){ke(t,!0);const s=re.inventory?.sf_classes??[],a=re.inventory?.is_classes??[];let r=te(!1),n=te(!1);var l=wo(),o=f(l),c=f(o),d=p(o,4),_=f(d),v=f(_),u=f(v),m=p(v,4),b=f(m),w=p(_,2);{var h=L=>{var T=mo();ne(T,20,()=>s,D=>D,(D,x)=>{var k=go(),P=f(k),M=f(P);q(()=>A(M,`.${x??""}`)),z(D,k)}),z(L,T)};fe(w,L=>{i(r)&&L(h)})}var y=p(d,2),S=f(y),$=f(S),R=f($),B=p($,4),E=f(B),C=p(S,2);{var O=L=>{var T=yo();ne(T,20,()=>a,D=>D,(D,x)=>{var k=bo(),P=f(k),M=f(P);q(()=>A(M,`.${x??""}`)),z(D,k)}),z(L,T)};fe(C,L=>{i(n)&&L(O)})}q(()=>{A(c,`Registered Classes (${s.length+a.length})`),Q(_,"aria-expanded",i(r)?"true":"false"),A(u,i(r)?"▼":"▶"),A(b,`(${s.length??""})`),Q(S,"aria-expanded",i(n)?"true":"false"),A(R,i(n)?"▼":"▶"),A(E,`(${a.length??""})`)}),he("click",_,()=>K(r,!i(r))),he("click",S,()=>K(n,!i(n))),z(e,l),Se()}De(["click"]);async function ya(e,t){const{url:s,nonce:a}=re.rest;if(!s)return console.info("[slashed-admin] (dev) would POST",e,t),{ok:!0,dev:!0};const r=await fetch(s+e,{method:"POST",credentials:"same-origin",headers:{"Content-Type":"application/json","X-WP-Nonce":a},body:JSON.stringify(t)});if(!r.ok){const n=await r.text();throw new Error(n||`HTTP ${r.status}`)}return r.json()}function xr(e,t){return ya("/tokens",{section:e,values:t})}function kr(e){return ya("/tokens/reset",{section:e})}function ko(e){return ya("/settings",e)}async function So(){const{url:e,nonce:t}=re.rest;if(!e)return console.info("[slashed-admin] (dev) would GET /tokens/export"),{schema_version:"1",tokens:{},plugin_settings:{},dev:!0};const s=await fetch(e+"/tokens/export",{credentials:"same-origin",headers:{"X-WP-Nonce":t}});if(!s.ok)throw new Error(await s.text()||`HTTP ${s.status}`);return s.json()}function Eo(e){return ya("/tokens/import",e)}var jo=F('Saved'),To=F(' '),$o=F(`

                                                          Bundle Info

                                                          The SLASHED CSS bundle is loaded automatically by the plugin. The inventory + straight into the framework as the source of the brand scale.

                                                          `);function jl(e,t){we(t,!0);const s=ne.defaults?.colors??{},a=h=>h.charAt(0).toUpperCase()+h.slice(1),r=Object.entries(s.brand??{}),n=j(()=>vl("colors","dark_overrides_enabled")!=="0");function l(){Ss("colors","dark_overrides_enabled",i(n)?"0":"1")}var c=El(),o=v(d(c),4);ie(o,21,()=>r,([h,p])=>h,(h,p)=>{var u=j(()=>dt(i(p),2));let m=()=>i(u)[0],b=()=>i(u)[1];{let w=j(()=>`brand_${m()}`),_=j(()=>a(m())),y=j(()=>s.brand_hex_hints?.[m()]??""),S=j(()=>`--sf-color-${m()}-light`);Ys(h,{get storeKey(){return i(w)},get label(){return i(_)},get hexHint(){return i(y)},get rawHint(){return b()},get cssVar(){return i(S)}})}});var f=v(o,2);ya(f,{children:(h,p)=>{var u=Sl(),m=v(wt(u),2);ie(m,21,()=>Object.entries(s.status??{}),([E,C])=>E,(E,C)=>{var M=j(()=>dt(i(C),2));let L=()=>i(M)[0],T=()=>i(M)[1];{let P=j(()=>`status_${L()}`),x=j(()=>a(L())),k=j(()=>s.status_hex_hints?.[L()]??""),O=j(()=>`--sf-color-${L()}-light`);Ys(E,{get storeKey(){return i(P)},get label(){return i(x)},get hexHint(){return i(k)},get rawHint(){return T()},get cssVar(){return i(O)}})}});var b=v(m,2),w=d(b),_=d(w);let y;var S=v(_,2),$=d(S),R=v(b,2);{var N=E=>{var C=kl(),M=v(wt(C),2);ie(M,21,()=>Object.entries(s.brand_dark??s.brand??{}),([T])=>T,(T,P)=>{var x=j(()=>dt(i(P),1));let k=()=>i(x)[0];{let O=j(()=>`brand_dark_${k()}`),D=j(()=>a(k())),V=j(()=>s.brand_dark_hex_hints?.[k()]??""),U=j(()=>s.brand_dark?.[k()]??""),I=j(()=>`--sf-color-${k()}-dark`);Ys(T,{get storeKey(){return i(O)},get label(){return i(D)},get hexHint(){return i(V)},get rawHint(){return i(U)},get cssVar(){return i(I)}})}});var L=v(M,4);ie(L,21,()=>Object.entries(s.status_dark??s.status??{}),([T])=>T,(T,P)=>{var x=j(()=>dt(i(P),1));let k=()=>i(x)[0];{let O=j(()=>`status_dark_${k()}`),D=j(()=>a(k())),V=j(()=>s.status_dark_hex_hints?.[k()]??""),U=j(()=>s.status_dark?.[k()]??""),I=j(()=>`--sf-color-${k()}-dark`);Ys(T,{get storeKey(){return i(O)},get label(){return i(D)},get hexHint(){return i(V)},get rawHint(){return i(U)},get cssVar(){return i(I)}})}}),z(E,C)};ue(R,E=>{i(n)&&E(N)})}q(()=>{y=nt(_,1,"dark-toggle-btn svelte-1vle0rm",null,y,{on:i(n)}),Q(_,"aria-pressed",i(n)),A($,i(n)?"Active — custom values override auto-derivation":"Off — dark mode auto-derived from light source colors")}),_e("click",_,l),z(h,u)},$$slots:{default:!0}}),z(e,c),xe()}De(["click"]);var Tl=F(''),$l=F(' '),Cl=F(' '),zl=F('

                                                          '),Al=F('
                                                          ');function wa(e,t){let s=ge(t,"cssVar",3,""),a=ge(t,"fieldId",3,""),r=ge(t,"description",3,"");var n=Al(),l=d(n),c=d(l);{var o=_=>{var y=Tl(),S=d(y);q(()=>{Q(y,"for",a()),A(S,t.label)}),z(_,y)},f=_=>{var y=$l(),S=d(y);q(()=>A(S,t.label)),z(_,y)};ue(c,_=>{a()?_(o):_(f,-1)})}var h=v(c,2);{var p=_=>{var y=Cl(),S=d(y);q(()=>A(S,s())),z(_,y)};ue(h,_=>{s()&&_(p)})}var u=v(l,2),m=d(u);kn(m,()=>t.children??Ar);var b=v(m,2);{var w=_=>{var y=zl(),S=d(y);q(()=>A(S,r())),z(_,y)};ue(b,_=>{r()&&_(w)})}z(e,n)}var Fl=F('');function fa(e,t){we(t,!0);let s=ge(t,"default",3,""),a=ge(t,"cssVar",3,""),r=ge(t,"description",3,""),n=ge(t,"mono",3,!1),l=ge(t,"width",3,"320px");const c=j(()=>H[t.section]?.[t.fieldKey]===void 0||H[t.section]?.[t.fieldKey]===null?"":String(H[t.section][t.fieldKey]));function o(f){Ss(t.section,t.fieldKey,f.currentTarget.value)}wa(e,{get label(){return t.label},get cssVar(){return a()},get fieldId(){return t.fieldKey},get description(){return r()},children:(f,h)=>{var p=Fl();let u,m;q(b=>{Q(p,"id",t.fieldKey),u=nt(p,1,"text svelte-j8yw6l",null,u,{mono:n()}),da(p,i(c)),Q(p,"placeholder",b),m=ve(p,"",m,{width:l()})},[()=>String(s())]),_e("input",p,o),z(f,p)},$$slots:{default:!0}}),xe()}De(["input"]);var Rl=F(' '),Dl=F(' ',1);function pt(e,t){we(t,!0);let s=ge(t,"min",3,void 0),a=ge(t,"max",3,void 0),r=ge(t,"step",3,void 0),n=ge(t,"default",3,""),l=ge(t,"cssVar",3,""),c=ge(t,"unit",3,""),o=ge(t,"description",3,""),f=ge(t,"width",3,"120px");const h=j(()=>H[t.section]?.[t.fieldKey]===void 0||H[t.section]?.[t.fieldKey]===null?"":String(H[t.section][t.fieldKey]));function p(u){Ss(t.section,t.fieldKey,u.currentTarget.value)}wa(e,{get label(){return t.label},get cssVar(){return l()},get fieldId(){return t.fieldKey},get description(){return o()},children:(u,m)=>{var b=Dl(),w=wt(b);let _;var y=v(w,2);{var S=$=>{var R=Rl(),N=d(R);q(()=>A(N,c())),z($,R)};ue(y,$=>{c()&&$(S)})}q($=>{Q(w,"id",t.fieldKey),Q(w,"min",s()),Q(w,"max",a()),Q(w,"step",r()),da(w,i(h)),Q(w,"placeholder",$),_=ve(w,"",_,{width:f()})},[()=>String(n())]),_e("input",w,p),z(u,b)},$$slots:{default:!0}}),xe()}De(["input"]);var Ml=F('
                                                          '),Ol=F('
                                                          '),Pl=F('

                                                          Display Scale

                                                          '),Ll=F('

                                                          Live Scale Preview

                                                          Text Scale

                                                          ');function Vl(e,t){we(t,!0);const s=16,a=360,r=1520;let n=te(r);const c=(ne.defaults?.typography??{}).font_sizes??{};function o(T){const P=H.typography??{},x=c[T]??{},k=P[`size_${T}_min`],O=P[`size_${T}_max`],D=k!==void 0&&k!==""?parseFloat(k):x.min??.75,V=O!==void 0&&O!==""?parseFloat(O):x.max??1;return{min:D,max:V}}const f=j(()=>{const T=Math.max(0,Math.min(1,(i(n)-a)/(r-a))),P={};for(const x of Object.keys(c)){const{min:k,max:O}=o(x),D=k+(O-k)*T,V=D*s;P[x]={sizePx:V,sizeRem:D.toFixed(3)}}return P}),h=["2xs","xs","s","m","l","xl","2xl","3xl","4xl"],p=["display-s","display-m","display-l"],u=j(()=>h.filter(T=>c[T])),m=j(()=>p.filter(T=>c[T]));var b=Ll(),w=d(b),_=v(d(w),2),y=d(_);y.textContent="360px";var S=v(y,2);Q(S,"min",a),Q(S,"max",r);var $=v(S,2);$.textContent="1520px";var R=v($,2),N=d(R),E=v(w,2),C=v(d(E),2);ie(C,16,()=>i(u),T=>T,(T,P)=>{const x=j(()=>i(f)[P]);var k=mr(),O=wt(k);{var D=V=>{var U=Ml(),I=d(U),W=d(I),G=v(I,2);let ae;var pe=d(G),de=v(G,2),he=d(de);q((me,B)=>{A(W,P),ae=ve(G,"",ae,me),A(pe,P),A(he,`${i(x).sizeRem??""}rem / ${B??""}px`)},[()=>({"font-size":`${i(x).sizePx.toFixed(1)??""}px`}),()=>i(x).sizePx.toFixed(1)]),z(V,U)};ue(O,V=>{i(x)&&V(D)})}z(T,k)});var M=v(E,2);{var L=T=>{var P=Pl(),x=v(d(P),2);ie(x,16,()=>i(m),k=>k,(k,O)=>{const D=j(()=>i(f)[O]);var V=mr(),U=wt(V);{var I=W=>{var G=Ol(),ae=d(G),pe=d(ae),de=v(ae,2);let he;var me=d(de),B=v(de,2),oe=d(B);q((be,ye)=>{A(pe,O),he=ve(de,"",he,be),A(me,O),A(oe,`${i(D).sizeRem??""}rem / ${ye??""}px`)},[()=>({"font-size":`${i(D).sizePx.toFixed(1)??""}px`}),()=>i(D).sizePx.toFixed(1)]),z(W,G)};ue(U,W=>{i(D)&&W(I)})}z(k,V)}),z(T,P)};ue(M,T=>{i(m).length>0&&T(L)})}q(()=>A(N,`${i(n)??""}px`)),$t(S,()=>i(n),T=>K(n,T)),z(e,b),xe()}var Il=F(""),ql=F(""),Nl=F('
                                                          '),Bl=F('
                                                          Scale Generator Computes all step min/max values from a modular scale. Click Apply to write them to the fields below.
                                                          ');function Kl(e,t){we(t,!0);const s=[{label:"Minor Second (1.067)",value:1.067},{label:"Major Second (1.125)",value:1.125},{label:"Minor Third (1.200)",value:1.2},{label:"Major Third (1.250)",value:1.25},{label:"Perfect Fourth (1.333)",value:1.333},{label:"Aug. Fourth (1.414)",value:1.414},{label:"Perfect Fifth (1.500)",value:1.5},{label:"Golden Ratio (1.618)",value:1.618},{label:"Major Sixth (1.667)",value:1.667},{label:"Octave (2.000)",value:2}],a=[{name:"2xs",idx:-4},{name:"xs",idx:-3},{name:"s",idx:-2},{name:"m",idx:0},{name:"l",idx:1},{name:"xl",idx:2},{name:"2xl",idx:3},{name:"3xl",idx:4},{name:"4xl",idx:5},{name:"display-s",idx:5},{name:"display-m",idx:6},{name:"display-l",idx:7}];let r=te(1),n=te(1.25),l=te(1.25),c=te(1.333),o=te(.85);const f=j(()=>a.map(({name:k,idx:O})=>{const V=k.startsWith("display")?i(o):1,U=+(i(r)*V*Math.pow(i(l),O)).toFixed(4),I=+(i(n)*V*Math.pow(i(c),O)).toFixed(4);return{name:k,min:U,max:I}}));function h(){H.typography||(H.typography={});for(const{name:k,min:O,max:D}of i(f))H.typography[`size_${k}_min`]=String(O),H.typography[`size_${k}_max`]=String(D);nr()}var p=Bl(),u=v(d(p),2),m=d(u),b=v(d(m),2),w=d(b),_=v(m,2),y=v(d(_),2),S=d(y),$=v(_,2),R=v(d($),2);ie(R,21,()=>s,k=>k.value,(k,O)=>{var D=Il(),V=d(D),U={};q(()=>{A(V,i(O).label),U!==(U=i(O).value)&&(D.value=(D.__value=i(O).value)??"")}),z(k,D)});var N=v($,2),E=v(d(N),2);ie(E,21,()=>s,k=>k.value,(k,O)=>{var D=ql(),V=d(D),U={};q(()=>{A(V,i(O).label),U!==(U=i(O).value)&&(D.value=(D.__value=i(O).value)??"")}),z(k,D)});var C=v(N,2),M=v(d(C),2),L=d(M),T=v(u,2);ie(T,21,()=>i(f),({name:k,min:O,max:D})=>k,(k,O)=>{let D=()=>i(O).name,V=()=>i(O).min,U=()=>i(O).max;var I=Nl();let W;var G=d(I),ae=d(G),pe=v(G,2),de=d(pe);q((he,me,B)=>{W=nt(I,1,"scale-gen__step svelte-1y8fkhh",null,W,he),A(ae,D()),A(de,`${me??""} / ${B??""}`)},[()=>({display:D().startsWith("display")}),()=>V().toFixed(3),()=>U().toFixed(3)]),z(k,I)});var P=v(T,2),x=d(P);$t(w,()=>i(r),k=>K(r,k)),$t(S,()=>i(n),k=>K(n,k)),ca(R,()=>i(l),k=>K(l,k)),ca(E,()=>i(c),k=>K(c,k)),$t(L,()=>i(o),k=>K(o,k)),_e("click",x,h),z(e,p),xe()}De(["click"]);var Hl=F('
                                                          '),Ul=F('

                                                          Additional Font Families

                                                          Scale Multipliers

                                                          ',1),Gl=F('

                                                          Font Families

                                                          Font Size Scale

                                                          Min and max values in rem for fluid type scaling via clamp().

                                                          ');function Wl(e,t){we(t,!0);const s="typography",a=ne.defaults?.[s]??{},r=a.font_families??{},n=a.font_sizes??{},l=_=>_.charAt(0).toUpperCase()+_.slice(1),c=["body","heading"],o=Object.fromEntries(Object.entries(r).filter(([_])=>c.includes(_))),f=Object.fromEntries(Object.entries(r).filter(([_])=>!c.includes(_)));var h=Gl(),p=v(d(h),2);ie(p,21,()=>Object.entries(o),([_,y])=>_,(_,y)=>{var S=j(()=>dt(i(y),2));let $=()=>i(S)[0],R=()=>i(S)[1];{let N=j(()=>`font_${$()}`),E=j(()=>l($())),C=j(()=>`--sf-font-${$()}`);fa(_,{section:s,get fieldKey(){return i(N)},get label(){return i(E)},get default(){return R()},get cssVar(){return i(C)},width:"420px"})}});var u=v(p,6);Kl(u,{});var m=v(u,2);ie(m,21,()=>Object.entries(n),([_,y])=>_,(_,y)=>{var S=j(()=>dt(i(y),2));let $=()=>i(S)[0],R=()=>i(S)[1];var N=Hl(),E=d(N),C=d(E),M=d(C),L=v(C,2),T=d(L),P=v(E,2),x=d(P);{let O=j(()=>`size_${$()}_min`);pt(x,{section:s,get fieldKey(){return i(O)},label:"Min",min:0,step:.01,get default(){return R().min},width:"80px"})}var k=v(x,2);{let O=j(()=>`size_${$()}_max`);pt(k,{section:s,get fieldKey(){return i(O)},label:"Max",min:0,step:.01,get default(){return R().max},width:"80px"})}q(()=>{A(M,$()),A(T,`--sf-text-${$()??""}`)}),z(_,N)});var b=v(m,2);Vl(b,{});var w=v(b,2);ya(w,{children:(_,y)=>{var S=Ul(),$=v(wt(S),2);ie($,21,()=>Object.entries(f),([C,M])=>C,(C,M)=>{var L=j(()=>dt(i(M),2));let T=()=>i(L)[0],P=()=>i(L)[1];{let x=j(()=>`font_${T()}`),k=j(()=>l(T())),O=j(()=>`--sf-font-${T()}`);fa(C,{section:s,get fieldKey(){return i(x)},get label(){return i(k)},get default(){return P()},get cssVar(){return i(O)},width:"420px"})}});var R=v($,4),N=d(R);{let C=j(()=>a.scale_multipliers?.text_scale??1);pt(N,{section:s,fieldKey:"text_scale",label:"Text Scale",min:0,step:.05,get default(){return i(C)},cssVar:"--sf-text-scale"})}var E=v(N,2);{let C=j(()=>a.scale_multipliers?.text_display_scale??1);pt(E,{section:s,fieldKey:"text_display_scale",label:"Display Scale",min:0,step:.05,get default(){return i(C)},cssVar:"--sf-text-display-scale"})}z(_,S)},$$slots:{default:!0}}),z(e,h),xe()}var Yl=F('
                                                          '),Xl=F('

                                                          Live Scale Preview

                                                          Card heading
                                                          ');function Zl(e,t){we(t,!0);const s=360,a=1440;let r=te(a);const n=ne.defaults?.spacing??{},l=n.space_sizes??{};function c(I){const W=H.spacing??{},G=l[I]??{},ae=W[`space_${I}_min`],pe=W[`space_${I}_max`],de=ae!==void 0&&ae!==""?parseFloat(ae):G.min??1,he=pe!==void 0&&pe!==""?parseFloat(pe):G.max??1;return{min:de,max:he}}const o=j(()=>{const I=parseFloat(H.spacing?.space_scale??n.space_scale??1)||1,W=Math.max(0,Math.min(1,(i(r)-s)/(a-s))),G=["2xs","xs","s","m","l","xl","2xl","3xl","4xl"],ae=c("4xl").max*I;return G.map(pe=>{const{min:de,max:he}=c(pe),me=(de+(he-de)*W)*I,B=me/ae*100;return{name:pe,sizeRem:me.toFixed(3),barPct:Math.min(B,100)}})}),f=j(()=>{const I=parseFloat(H.spacing?.space_scale??n.space_scale??1)||1,W=Math.max(0,Math.min(1,(i(r)-s)/(a-s))),G=ae=>{const{min:pe,max:de}=c(ae);return((pe+(de-pe)*W)*I).toFixed(3)};return{xs:G("xs"),s:G("s"),m:G("m"),l:G("l")}});var h=Xl(),p=d(h),u=v(d(p),2),m=d(u);m.textContent="360px";var b=v(m,2);Q(b,"min",s),Q(b,"max",a);var w=v(b,2);w.textContent="1440px";var _=v(w,2),y=d(_),S=v(p,2);ie(S,21,()=>i(o),I=>I.name,(I,W)=>{var G=Yl(),ae=d(G),pe=d(ae),de=v(ae,2),he=d(de);let me;var B=v(de,2),oe=d(B);q(()=>{A(pe,`--sf-space-${i(W).name??""}`),me=ve(he,"",me,{width:`${i(W).barPct??""}%`}),A(oe,`${i(W).sizeRem??""}rem`)}),z(I,G)});var $=v(S,2),R=d($),N=d(R),E=v(R,2);let C;var M=d(E);let L;var T=v(d(M),2),P=v(d(T),2),x=d(P),k=v(M,2),O=d(k),D=v(k,2);let V;var U=v(d(D),2);ve(U,"",{},{width:"3rem"}),q(()=>{A(y,`${i(r)??""}px`),A(N,`Container context at ${i(r)??""}px`),C=ve(E,"",C,{padding:`${i(f).m??""}rem`,gap:`${i(f).s??""}rem`}),L=ve(M,"",L,{gap:`${i(f).s??""}rem`}),A(x,`padding: ${i(f).m??""}rem`),A(O,`Body section · gap between rows: ${i(f).s??""}rem`),V=ve(D,"",V,{gap:`${i(f).xs??""}rem`,"padding-top":`${i(f).xs??""}rem`})}),$t(b,()=>i(r),I=>K(r,I)),z(e,h),xe()}var Jl=F('
                                                          '),Ql=F('

                                                          Space Aliases

                                                          ',1),eo=F(`

                                                          Spacing

                                                          Space Scale Steps

                                                          Min and max values in rem for fluid spacing via clamp(). + Leave both fields blank to use the framework defaults.

                                                          `);function to(e,t){we(t,!0);const s="spacing",a=ne.defaults?.[s]??{},r=a.space_sizes??{},n=[{key:"gutter",label:"Gutter",cssVar:"--sf-space-gutter"},{key:"gap",label:"Gap",cssVar:"--sf-gap"},{key:"content_gap",label:"Content Gap",cssVar:"--sf-content-gap"},{key:"component_pad",label:"Component Pad",cssVar:"--sf-component-pad"},{key:"section_pad",label:"Section Pad",cssVar:"--sf-section-pad"}];var l=eo(),c=v(d(l),2),o=d(c);{let u=j(()=>a.space_scale??1);pt(o,{section:s,fieldKey:"space_scale",label:"Space Scale",min:0,step:.05,get default(){return i(u)},cssVar:"--sf-space-scale"})}var f=v(c,6);ie(f,21,()=>Object.entries(r),([u,m])=>u,(u,m)=>{var b=j(()=>dt(i(m),2));let w=()=>i(b)[0],_=()=>i(b)[1];var y=Jl(),S=d(y),$=d(S),R=d($),N=v($,2),E=d(N),C=v(S,2),M=d(C);{let T=j(()=>`space_${w()}_min`);pt(M,{section:s,get fieldKey(){return i(T)},label:"Min",min:0,step:.01,get default(){return _().min},width:"80px"})}var L=v(M,2);{let T=j(()=>`space_${w()}_max`);pt(L,{section:s,get fieldKey(){return i(T)},label:"Max",min:0,step:.01,get default(){return _().max},width:"80px"})}q(()=>{A(R,w()),A(E,`--sf-space-${w()??""}`)}),z(u,y)});var h=v(f,2);Zl(h,{});var p=v(h,2);ya(p,{children:(u,m)=>{var b=Ql(),w=v(wt(b),2);ie(w,21,()=>n,_=>_.key,(_,y)=>{{let S=j(()=>a[i(y).key]??"");fa(_,{section:s,get fieldKey(){return i(y).key},get label(){return i(y).label},get default(){return i(S)},get cssVar(){return i(y).cssVar},mono:!0})}}),z(u,b)},$$slots:{default:!0}}),z(e,l),xe()}var so=F(' '),ao=F(' ',1);function cs(e,t){we(t,!0);let s=ge(t,"cssVar",3,""),a=ge(t,"unit",3,""),r=ge(t,"description",3,"");const n=j(()=>H[t.section]?.[t.fieldKey]===void 0||H[t.section]?.[t.fieldKey]===null?"":String(H[t.section][t.fieldKey])),l=j(()=>i(n)===""||Number.isNaN(Number(i(n)))?Number(t.default):Number(i(n)));function c(f){Ss(t.section,t.fieldKey,f.currentTarget.value)}function o(f){Ss(t.section,t.fieldKey,f.currentTarget.value)}wa(e,{get label(){return t.label},get cssVar(){return s()},get fieldId(){return t.fieldKey},get description(){return r()},children:(f,h)=>{var p=ao(),u=wt(p),m=v(u,2),b=v(m,2);{var w=_=>{var y=so(),S=d(y);q(()=>A(S,a())),z(_,y)};ue(b,_=>{a()&&_(w)})}q(_=>{Q(u,"min",t.min),Q(u,"max",t.max),Q(u,"step",t.step),da(u,i(l)),Q(m,"id",t.fieldKey),Q(m,"min",t.min),Q(m,"max",t.max),Q(m,"step",t.step),da(m,i(n)),Q(m,"placeholder",_)},[()=>String(t.default)]),_e("input",u,c),_e("input",m,o),z(f,p)},$$slots:{default:!0}}),xe()}De(["input"]);var ro=F(""),no=F('');function io(e,t){we(t,!0);let s=ge(t,"options",19,()=>[]),a=ge(t,"default",3,""),r=ge(t,"cssVar",3,""),n=ge(t,"description",3,"");const l=j(()=>s().map(f=>typeof f=="string"?{value:f,label:f}:f)),c=j(()=>H[t.section]?.[t.fieldKey]===void 0||H[t.section]?.[t.fieldKey]===null?"":String(H[t.section][t.fieldKey]));function o(f){Ss(t.section,t.fieldKey,f.currentTarget.value)}wa(e,{get label(){return t.label},get cssVar(){return r()},get fieldId(){return t.fieldKey},get description(){return n()},children:(f,h)=>{var p=no(),u=d(p),m=d(u);u.value=u.__value="";var b=v(u);ie(b,17,()=>i(l),_=>_.value,(_,y)=>{var S=ro(),$=d(S),R={};q(()=>{A($,i(y).label),R!==(R=i(y).value)&&(S.value=(S.__value=i(y).value)??"")}),z(_,S)});var w;Sn(p),q(()=>{Q(p,"id",t.fieldKey),A(m,`Default (${a()??""})`),w!==(w=i(c))&&(p.value=(p.__value=i(c))??"",rr(p,i(c)))}),_e("change",p,o),z(f,p)},$$slots:{default:!0}}),xe()}De(["change"]);var lo=F('
                                                          '),oo=F('
                                                          '),co=F('
                                                          '),fo=F('

                                                          Shadow

                                                          Motion — Durations

                                                          Base duration values in milliseconds.

                                                          Z-Index

                                                          Z-index layer values for stacking context management.

                                                          Contrast

                                                          ',1),uo=F('

                                                          Radius

                                                          Shadows

                                                          Motion

                                                          Accessibility

                                                          ');function vo(e,t){we(t,!0);const s=ne.defaults?.radius??{},a=ne.defaults?.shadows??{},r=ne.defaults?.motion??{},n=ne.defaults?.zindex??{},l=ne.defaults?.contrast??{},c=r.durations??{},o=B=>B.charAt(0).toUpperCase()+B.slice(1),f=[0,2,4,8,12,16,24,9999],h=["none","xs","s","m","l","xl","2xl","full"],p=j(()=>parseFloat(H.radius?.radius_scale??ne.defaults?.radius?.radius_scale??1)),u=j(()=>f.map(B=>B*i(p))),m=j(()=>parseFloat(H.shadows?.shadow_strength??a.shadow_strength??.08)),b=j(()=>parseFloat(H.motion?.motion_scale??r.motion_scale??1)||1),w=["instant","fast","normal","slow","slower"],_=j(()=>w.map(B=>{const oe=H.motion?.[`duration_${B}`],be=parseFloat(oe!==void 0&&oe!==""?oe:c[B]??0);return{name:B,ms:Math.round(be*i(b))}})),y=(B,oe)=>parseFloat(B!==void 0&&B!==""?B:oe),S=j(()=>y(H.contrast?.focus_ring_width,l.focus_ring_width??2)),$=j(()=>y(H.contrast?.focus_ring_offset,l.focus_ring_offset??2)),R=j(()=>H.contrast?.focus_ring_style??l.focus_ring_style??"solid"),N=j(()=>[{label:"xs",shadow:`0 1px 2px 0 rgba(0,0,0,${(i(m)*.5).toFixed(4)})`},{label:"s",shadow:`0 1px 2px 0 rgba(0,0,0,${(i(m)*.5).toFixed(4)}), 0 2px 6px 0 rgba(0,0,0,${i(m).toFixed(4)})`},{label:"m",shadow:`0 1px 3px 0 rgba(0,0,0,${(i(m)*.5).toFixed(4)}), 0 4px 12px 0 rgba(0,0,0,${(i(m)*2).toFixed(4)})`},{label:"l",shadow:`0 2px 4px 0 rgba(0,0,0,${(i(m)*.5).toFixed(4)}), 0 8px 24px 0 rgba(0,0,0,${(i(m)*3).toFixed(4)})`},{label:"xl",shadow:`0 2px 8px 0 rgba(0,0,0,${(i(m)*.5).toFixed(4)}), 0 12px 36px 0 rgba(0,0,0,${(i(m)*3.5).toFixed(4)})`},{label:"glow",shadow:`0 0 15px 2px rgba(74,48,208,${Math.min(i(m)*2,.7).toFixed(4)})`}]);var E=uo(),C=v(d(E),2),M=d(C);{let B=j(()=>s.radius_scale??1);pt(M,{section:"radius",fieldKey:"radius_scale",label:"Radius Scale",min:0,step:.1,get default(){return i(B)},cssVar:"--sf-radius-scale"})}var L=v(C,2);ie(L,23,()=>i(u),(B,oe)=>h[oe],(B,oe,be)=>{var ye=lo(),Te=d(ye);let $e;var Ae=v(Te,2),Pe=d(Ae);q(()=>{$e=ve(Te,"",$e,{"border-radius":f[i(be)]===9999?"9999px":`${i(oe)}px`}),A(Pe,h[i(be)])}),z(B,ye)});var T=v(L,4),P=d(T);{let B=j(()=>a.shadow_strength??.08);cs(P,{section:"shadows",fieldKey:"shadow_strength",label:"Shadow Strength",description:"Base opacity for shadow layers (0–1).",min:0,max:1,step:.01,get default(){return i(B)},cssVar:"--sf-shadow-strength"})}var x=v(T,2);ie(x,21,()=>i(N),B=>B.label,(B,oe)=>{var be=oo(),ye=d(be);let Te;var $e=d(ye);q(()=>{Te=ve(ye,"",Te,{"box-shadow":i(oe).shadow}),A($e,i(oe).label)}),z(B,be)});var k=v(x,4),O=d(k);{let B=j(()=>r.motion_scale??1);pt(O,{section:"motion",fieldKey:"motion_scale",label:"Motion Scale",min:0,step:.1,get default(){return i(B)},cssVar:"--sf-motion-scale"})}var D=v(k,2);ie(D,21,()=>i(_),B=>B.name,(B,oe)=>{var be=co(),ye=d(be),Te=d(ye),$e=v(ye,2),Ae=d($e);let Pe;var lt=v($e,2),ot=d(lt);q(()=>{A(Te,i(oe).name),Pe=ve(Ae,"",Pe,{"animation-duration":`${i(oe).ms??""}ms`}),A(ot,`${i(oe).ms??""}ms`)}),z(B,be)});var V=v(D,4),U=d(V);{let B=j(()=>l.focus_ring_width??2);cs(U,{section:"contrast",fieldKey:"focus_ring_width",label:"Focus Ring Width",min:0,max:8,step:.5,get default(){return i(B)},cssVar:"--sf-focus-ring-width",unit:"px"})}var I=v(U,2);{let B=j(()=>l.focus_ring_offset??2);cs(I,{section:"contrast",fieldKey:"focus_ring_offset",label:"Focus Ring Offset",min:0,max:8,step:.5,get default(){return i(B)},cssVar:"--sf-focus-ring-offset",unit:"px"})}var W=v(I,2);{let B=j(()=>l.focus_ring_style??"solid");io(W,{section:"contrast",fieldKey:"focus_ring_style",label:"Focus Ring Style",options:["solid","dashed","dotted","double","none"],get default(){return i(B)},cssVar:"--sf-focus-ring-style"})}var G=v(V,2),ae=d(G);let pe;var de=v(ae,2),he=d(de),me=v(G,2);ya(me,{children:(B,oe)=>{var be=fo(),ye=v(wt(be),2),Te=d(ye);{let re=j(()=>a.glow_color??"");fa(Te,{section:"shadows",fieldKey:"glow_color",label:"Glow Color",get default(){return i(re)},cssVar:"--sf-shadow-glow-color",mono:!0})}var $e=v(ye,6);ie($e,21,()=>Object.entries(c),([re,ke])=>re,(re,ke)=>{var Be=j(()=>dt(i(ke),2));let Ke=()=>i(Be)[0],ls=()=>i(Be)[1];{let Lt=j(()=>`duration_${Ke()}`),Vt=j(()=>o(Ke())),Hs=j(()=>`--sf-duration-${Ke()}`);pt(re,{section:"motion",get fieldKey(){return i(Lt)},get label(){return i(Vt)},min:0,step:10,get default(){return ls()},get cssVar(){return i(Hs)},unit:"ms"})}});var Ae=v($e,6);ie(Ae,21,()=>Object.entries(n),([re,ke])=>re,(re,ke)=>{var Be=j(()=>dt(i(ke),2));let Ke=()=>i(Be)[0],ls=()=>i(Be)[1];{let Lt=j(()=>o(Ke())),Vt=j(()=>`--sf-z-${Ke()}`);pt(re,{section:"zindex",get fieldKey(){return Ke()},get label(){return i(Lt)},step:1,get default(){return ls()},get cssVar(){return i(Vt)}})}});var Pe=v(Ae,4),lt=d(Pe);{let re=j(()=>l.contrast_bias??0);cs(lt,{section:"contrast",fieldKey:"contrast_bias",label:"Contrast Bias",description:"Shifts derived shades up (positive) or down (negative).",min:-.2,max:.2,step:.01,get default(){return i(re)},cssVar:"--sf-contrast-bias"})}var ot=v(lt,2);{let re=j(()=>l.contrast_threshold??.6);cs(ot,{section:"contrast",fieldKey:"contrast_threshold",label:"Contrast Threshold",description:"Lightness threshold for text-on-color (white vs. black).",min:0,max:1,step:.01,get default(){return i(re)},cssVar:"--sf-contrast-threshold"})}var ce=v(ot,2);{let re=j(()=>l.opacity_disabled??.45);cs(ce,{section:"contrast",fieldKey:"opacity_disabled",label:"Disabled Opacity",min:0,max:1,step:.01,get default(){return i(re)},cssVar:"--sf-opacity-disabled"})}z(B,be)},$$slots:{default:!0}}),q(()=>{pe=ve(ae,"",pe,{"--fp-width":`${i(S)??""}px`,"--fp-offset":`${i($)??""}px`,"--fp-style":i(R)}),A(he,`${i(S)??""}px ${i(R)??""} · ${i($)??""}px offset`)}),z(e,E),xe()}var po=F('
                                                        • '),ho=F('
                                                            '),_o=F('
                                                            '),go=F(`

                                                            All --sf-* custom properties declared in the active SLASHED bundle, + grouped by category.

                                                            `);function mo(e,t){we(t,!0);const s=ne.inventory?.variables??[],a={color:"Colors",text:"Typography",font:"Typography",leading:"Typography",tracking:"Typography",body:"Typography",heading:"Typography",h1:"Typography",h2:"Typography",h3:"Typography",h4:"Typography",h5:"Typography",h6:"Typography",prose:"Typography",code:"Typography",optical:"Typography",line:"Typography",space:"Spacing",gap:"Spacing",gutter:"Spacing",component:"Spacing",section:"Spacing",flow:"Spacing",safe:"Spacing",header:"Spacing",sticky:"Spacing",size:"Sizing",aspect:"Sizing",ratio:"Sizing",touch:"Sizing",container:"Layout",stack:"Layout",cluster:"Layout",sidebar:"Layout",switcher:"Layout",grid:"Layout",cover:"Layout",frame:"Layout",reel:"Layout",imposter:"Layout",bento:"Layout",box:"Layout",center:"Layout",content:"Layout",breakout:"Layout",divider:"Layout",field:"Layout",border:"Borders",stroke:"Borders",radius:"Radius",shadow:"Shadows",blur:"Effects",opacity:"Effects",gradient:"Effects",mask:"Effects",perspective:"Effects",drop:"Effects",contrast:"Effects",duration:"Motion",ease:"Motion",transition:"Motion",motion:"Motion",animation:"Motion",icon:"Icons",z:"Z-Index",is:"States",current:"States",focus:"Focus",caret:"Focus",scroll:"Scroll",scrollbar:"Scroll",print:"Print",truncate:"Misc"},r=["Colors","Typography","Spacing","Sizing","Layout","Borders","Radius","Shadows","Effects","Motion","Icons","Z-Index","States","Focus","Scroll","Print","Misc"];function n(b){let w=b;w.startsWith("--sf-")&&(w=w.slice(5));const _=w.indexOf("-"),y=_===-1?w:w.slice(0,_);return a[y]||"Misc"}function l(b){const w={};for(const y of b){const S=n(y);w[S]||(w[S]=[]),w[S].push(y)}const _=[];for(const y of r)w[y]?.length&&(w[y].sort(),_.push({category:y,items:w[y]}));for(const y of Object.keys(w))!r.includes(y)&&w[y]?.length&&(w[y].sort(),_.push({category:y,items:w[y]}));return _}const c=l(s);let o=qe({});function f(b){o[b]=!o[b]}var h=go(),p=d(h),u=d(p),m=v(p,4);ie(m,17,()=>c,({category:b,items:w})=>b,(b,w)=>{let _=()=>i(w).category,y=()=>i(w).items;var S=_o(),$=d(S),R=d($),N=d(R),E=v(R,2),C=d(E),M=v(E,2),L=d(M),T=v($,2);{var P=x=>{var k=ho();ie(k,20,y,O=>O,(O,D)=>{var V=po(),U=d(V),I=d(U);q(()=>A(I,D)),z(O,V)}),z(x,k)};ue(T,x=>{o[_()]&&x(P)})}q(()=>{Q($,"aria-expanded",o[_()]?"true":"false"),A(N,o[_()]?"▼":"▶"),A(C,_()),A(L,`(${y().length??""})`)}),_e("click",$,()=>f(_())),z(b,S)}),q(()=>A(u,`CSS Variables (${s.length??""})`)),z(e,h),xe()}De(["click"]);var bo=F('
                                                          • '),yo=F('
                                                              '),wo=F('
                                                            • '),xo=F('
                                                                '),ko=F('

                                                                All utility and state classes declared in the active SLASHED bundle.

                                                                ');function So(e,t){we(t,!0);const s=ne.inventory?.sf_classes??[],a=ne.inventory?.is_classes??[];let r=te(!1),n=te(!1);var l=ko(),c=d(l),o=d(c),f=v(c,4),h=d(f),p=d(h),u=d(p),m=v(p,4),b=d(m),w=v(h,2);{var _=L=>{var T=yo();ie(T,20,()=>s,P=>P,(P,x)=>{var k=bo(),O=d(k),D=d(O);q(()=>A(D,`.${x??""}`)),z(P,k)}),z(L,T)};ue(w,L=>{i(r)&&L(_)})}var y=v(f,2),S=d(y),$=d(S),R=d($),N=v($,4),E=d(N),C=v(S,2);{var M=L=>{var T=xo();ie(T,20,()=>a,P=>P,(P,x)=>{var k=wo(),O=d(k),D=d(O);q(()=>A(D,`.${x??""}`)),z(P,k)}),z(L,T)};ue(C,L=>{i(n)&&L(M)})}q(()=>{A(o,`Registered Classes (${s.length+a.length})`),Q(h,"aria-expanded",i(r)?"true":"false"),A(u,i(r)?"▼":"▶"),A(b,`(${s.length??""})`),Q(S,"aria-expanded",i(n)?"true":"false"),A(R,i(n)?"▼":"▶"),A(E,`(${a.length??""})`)}),_e("click",h,()=>K(r,!i(r))),_e("click",S,()=>K(n,!i(n))),z(e,l),xe()}De(["click"]);async function xa(e,t){const{url:s,nonce:a}=ne.rest;if(!s)return console.info("[slashed-admin] (dev) would POST",e,t),{ok:!0,dev:!0};const r=await fetch(s+e,{method:"POST",credentials:"same-origin",headers:{"Content-Type":"application/json","X-WP-Nonce":a},body:JSON.stringify(t)});if(!r.ok){const n=await r.text();throw new Error(n||`HTTP ${r.status}`)}return r.json()}function Sr(e,t){return xa("/tokens",{section:e,values:t})}function Er(e){return xa("/tokens/reset",{section:e})}function Eo(e){return xa("/settings",e)}async function jo(){const{url:e,nonce:t}=ne.rest;if(!e)return console.info("[slashed-admin] (dev) would GET /tokens/export"),{schema_version:"1",tokens:{},plugin_settings:{},dev:!0};const s=await fetch(e+"/tokens/export",{credentials:"same-origin",headers:{"X-WP-Nonce":t}});if(!s.ok)throw new Error(await s.text()||`HTTP ${s.status}`);return s.json()}function To(e){return xa("/tokens/import",e)}var $o=F('Saved'),Co=F(' '),zo=F(`

                                                                Bundle Info

                                                                The SLASHED CSS bundle is loaded automatically by the plugin. The inventory is parsed from whichever bundle is active (essential / optimal / full) and - drives the variable pickers, class autocomplete, and color palette in Bricks.

                                                                Variables registered
                                                                Classes registered

                                                                Plugin Settings

                                                                Choose which SLASHED CSS bundle to load on the frontend and in the Bricks editor canvas.

                                                                Override the HTML root font-size. Use this if Bricks forces a font-size you don't want.

                                                                `);function Co(e,t){ke(t,!0);let s=te(Ne(re.pluginSettings?.css_bundle??"optimal")),a=te(Ne(re.pluginSettings?.html_font_size??"")),r=te(!1),n=te(!1),l=te(""),o=null;async function c(){K(r,!0),K(n,!1),K(l,"");try{await ko({css_bundle:i(s),html_font_size:i(a)}),K(n,!0),o&&clearTimeout(o),o=setTimeout(()=>{K(n,!1),o=null},3e3)}catch(V){K(l,V.message||"Save failed",!0)}finally{K(r,!1)}}var d=$o(),_=p(f(d),4),v=p(f(_),2),u=f(v),m=p(v,4),b=f(m),w=p(_,4),h=p(f(w),2),y=f(h);y.value=y.__value="essential";var S=p(y);S.value=S.__value="optimal";var $=p(S);$.value=$.__value="full";var R=p(w,2),B=p(f(R),2),E=f(B);E.value=E.__value="";var C=p(E);C.value=C.__value="100";var O=p(C);O.value=O.__value="62.5";var L=p(R,2),T=f(L),D=f(T),x=p(T,2);{var k=V=>{var U=jo();z(V,U)};fe(x,V=>{i(n)&&V(k)})}var P=p(x,2);{var M=V=>{var U=To(),I=f(U);q(()=>A(I,i(l))),z(V,U)};fe(P,V=>{i(l)&&V(M)})}q(()=>{A(u,re.inventory?.variables?.length??0),A(b,(re.inventory?.sf_classes?.length??0)+(re.inventory?.is_classes?.length??0)),T.disabled=i(r),A(D,i(r)?"Saving...":"Save Settings")}),la(h,()=>i(s),V=>K(s,V)),la(B,()=>i(a),V=>K(a,V)),he("click",T,c),z(e,d),Se()}De(["click"]);const Sr=22.5,zo=95;function Sn(e,t){if(e<=0||t<=0)return null;const s=zo-Sr,a=(t-e)/s,r=parseFloat(a.toFixed(6)),n=parseFloat(e.toFixed(4)),l=parseFloat(t.toFixed(4));return`clamp(${n}rem, calc(${r} * (100vw - ${Sr}rem) + ${n}rem), ${l}rem)`}function Er(e){const t=parseFloat(e);if(isNaN(t))return"0";let s=t.toFixed(6).replace(/0+$/,"").replace(/\.$/,"");return s===""?"0":s}function je(e){return e!=null&&e!==""}function Ao(e){const t=[],s=["primary","secondary","tertiary","action","neutral","base"];for(const n of s){const l=`brand_${n}`;je(e[l])&&t.push(`--sf-color-${n}-light: ${e[l]};`)}const a=["success","warning","error","info","danger"];for(const n of a){const l=`status_${n}`;je(e[l])&&t.push(`--sf-color-${n}-light: ${e[l]};`)}if(e.dark_overrides_enabled!=="0"){for(const n of s){const l=`brand_dark_${n}`;je(e[l])&&t.push(`--sf-color-${n}-dark: ${e[l]};`)}for(const n of a){const l=`status_dark_${n}`;je(e[l])&&t.push(`--sf-color-${n}-dark: ${e[l]};`)}}return t}function Fo(e){const t=[],s=["body","heading","mono","display","humanist","geometric","slab"];for(const r of s){const n=`font_${r}`;je(e[n])&&t.push(`--sf-font-${r}: ${e[n]};`)}je(e.text_scale)&&t.push(`--sf-text-scale: ${e.text_scale};`),je(e.text_display_scale)&&t.push(`--sf-text-display-scale: ${e.text_display_scale};`);const a=["2xs","xs","s","m","l","xl","2xl","3xl","4xl","display-s","display-m","display-l"];for(const r of a){const n=`size_${r}_min`,l=`size_${r}_max`,o=e[n],c=e[l];if(je(o)&&je(c)){const d=Sn(parseFloat(o),parseFloat(c));d&&t.push(`--sf-text-${r}: ${d};`)}}return t}function Ro(e){const t=[];je(e.space_scale)&&t.push(`--sf-space-scale: ${e.space_scale};`);const s=["2xs","xs","s","m","l","xl","2xl","3xl","4xl"];for(const r of s){const n=e[`space_${r}_min`],l=e[`space_${r}_max`];if(je(n)&&je(l)){const o=Sn(parseFloat(n),parseFloat(l));o&&t.push(`--sf-space-${r}: calc(${o} * var(--sf-space-scale));`)}}const a={gutter:"--sf-space-gutter",gap:"--sf-gap",content_gap:"--sf-content-gap",component_pad:"--sf-component-pad",section_pad:"--sf-section-pad"};for(const[r,n]of Object.entries(a))je(e[r])&&t.push(`${n}: ${e[r]};`);return t}function Mo(e){const t=[];return je(e.radius_scale)&&t.push(`--sf-radius-scale: ${e.radius_scale};`),t}function Oo(e){const t=[];return je(e.shadow_strength)&&t.push(`--sf-shadow-strength: calc(${e.shadow_strength} + var(--sf-is-dark) * 0.17);`),je(e.glow_color)&&t.push(`--sf-shadow-glow-color: ${e.glow_color};`),t}function Do(e){const t=[];je(e.motion_scale)&&t.push(`--sf-motion-scale: ${e.motion_scale};`);const s=["instant","fast","normal","slow","slower"];for(const a of s){const r=`duration_${a}`;je(e[r])&&t.push(`--sf-duration-${a}: calc(${e[r]}ms * var(--sf-motion-scale));`)}return t}function Po(e){const t=[],s=["below","base","raised","low","mid","high","top","max"];for(const a of s)je(e[a])&&t.push(`--sf-z-${a}: ${parseInt(e[a],10)};`);return t}function Lo(e){const t=[],s={contrast_bias:"--sf-contrast-bias",contrast_threshold:"--sf-contrast-threshold",opacity_disabled:"--sf-opacity-disabled"};for(const[r,n]of Object.entries(s))je(e[r])&&t.push(`${n}: ${Er(e[r])};`);const a={focus_ring_width:"--sf-focus-ring-width",focus_ring_offset:"--sf-focus-ring-offset"};for(const[r,n]of Object.entries(a))je(e[r])&&t.push(`${n}: ${Er(e[r])}px;`);return je(e.focus_ring_style)&&["solid","dashed","dotted","double","none"].includes(e.focus_ring_style)&&t.push(`--sf-focus-ring-style: ${e.focus_ring_style};`),t}function rr(e){const t=[];if(e.colors&&typeof e.colors=="object"&&t.push(...Ao(e.colors)),e.typography&&typeof e.typography=="object"&&t.push(...Fo(e.typography)),e.spacing&&typeof e.spacing=="object"&&t.push(...Ro(e.spacing)),e.radius&&typeof e.radius=="object"&&t.push(...Mo(e.radius)),e.shadows&&typeof e.shadows=="object"&&t.push(...Oo(e.shadows)),e.motion&&typeof e.motion=="object"&&t.push(...Do(e.motion)),e.zindex&&typeof e.zindex=="object"&&t.push(...Po(e.zindex)),e.contrast&&typeof e.contrast=="object"&&t.push(...Lo(e.contrast)),t.length===0)return"";let s=`@layer slashed.overrides { + drives the variable pickers, class autocomplete, and color palette in Bricks.

                                                                Variables registered
                                                                Classes registered

                                                                Plugin Settings

                                                                Choose which SLASHED CSS bundle to load on the frontend and in the Bricks editor canvas.

                                                                Override the HTML root font-size. Use this if Bricks forces a font-size you don't want.

                                                                `);function Ao(e,t){we(t,!0);let s=te(qe(ne.pluginSettings?.css_bundle??"optimal")),a=te(qe(ne.pluginSettings?.html_font_size??"")),r=te(!1),n=te(!1),l=te(""),c=null;async function o(){K(r,!0),K(n,!1),K(l,"");try{await Eo({css_bundle:i(s),html_font_size:i(a)}),K(n,!0),c&&clearTimeout(c),c=setTimeout(()=>{K(n,!1),c=null},3e3)}catch(V){K(l,V.message||"Save failed",!0)}finally{K(r,!1)}}var f=zo(),h=v(d(f),4),p=v(d(h),2),u=d(p),m=v(p,4),b=d(m),w=v(h,4),_=v(d(w),2),y=d(_);y.value=y.__value="essential";var S=v(y);S.value=S.__value="optimal";var $=v(S);$.value=$.__value="full";var R=v(w,2),N=v(d(R),2),E=d(N);E.value=E.__value="";var C=v(E);C.value=C.__value="100";var M=v(C);M.value=M.__value="62.5";var L=v(R,2),T=d(L),P=d(T),x=v(T,2);{var k=V=>{var U=$o();z(V,U)};ue(x,V=>{i(n)&&V(k)})}var O=v(x,2);{var D=V=>{var U=Co(),I=d(U);q(()=>A(I,i(l))),z(V,U)};ue(O,V=>{i(l)&&V(D)})}q(()=>{A(u,ne.inventory?.variables?.length??0),A(b,(ne.inventory?.sf_classes?.length??0)+(ne.inventory?.is_classes?.length??0)),T.disabled=i(r),A(P,i(r)?"Saving...":"Save Settings")}),ca(_,()=>i(s),V=>K(s,V)),ca(N,()=>i(a),V=>K(a,V)),_e("click",T,o),z(e,f),xe()}De(["click"]);const jr=22.5,Fo=95;function jn(e,t){if(e<=0||t<=0)return null;const s=Fo-jr,a=(t-e)/s,r=parseFloat(a.toFixed(6)),n=parseFloat(e.toFixed(4)),l=parseFloat(t.toFixed(4));return`clamp(${n}rem, calc(${r} * (100vw - ${jr}rem) + ${n}rem), ${l}rem)`}function Tr(e){const t=parseFloat(e);if(isNaN(t))return"0";let s=t.toFixed(6).replace(/0+$/,"").replace(/\.$/,"");return s===""?"0":s}function Ee(e){return e!=null&&e!==""}function Ro(e){const t=[],s=["primary","secondary","tertiary","action","neutral","base"];for(const n of s){const l=`brand_${n}`;Ee(e[l])&&t.push(`--sf-color-${n}-light: ${e[l]};`)}const a=["success","warning","error","info","danger"];for(const n of a){const l=`status_${n}`;Ee(e[l])&&t.push(`--sf-color-${n}-light: ${e[l]};`)}if(e.dark_overrides_enabled!=="0"){for(const n of s){const l=`brand_dark_${n}`;Ee(e[l])&&t.push(`--sf-color-${n}-dark: ${e[l]};`)}for(const n of a){const l=`status_dark_${n}`;Ee(e[l])&&t.push(`--sf-color-${n}-dark: ${e[l]};`)}}return t}function Do(e){const t=[],s=["body","heading","mono","display","humanist","geometric","slab"];for(const r of s){const n=`font_${r}`;Ee(e[n])&&t.push(`--sf-font-${r}: ${e[n]};`)}Ee(e.text_scale)&&t.push(`--sf-text-scale: ${e.text_scale};`),Ee(e.text_display_scale)&&t.push(`--sf-text-display-scale: ${e.text_display_scale};`);const a=["2xs","xs","s","m","l","xl","2xl","3xl","4xl","display-s","display-m","display-l"];for(const r of a){const n=`size_${r}_min`,l=`size_${r}_max`,c=e[n],o=e[l];if(Ee(c)&&Ee(o)){const f=jn(parseFloat(c),parseFloat(o));f&&t.push(`--sf-text-${r}: ${f};`)}}return t}function Mo(e){const t=[];Ee(e.space_scale)&&t.push(`--sf-space-scale: ${e.space_scale};`);const s=["2xs","xs","s","m","l","xl","2xl","3xl","4xl"];for(const r of s){const n=e[`space_${r}_min`],l=e[`space_${r}_max`];if(Ee(n)&&Ee(l)){const c=jn(parseFloat(n),parseFloat(l));c&&t.push(`--sf-space-${r}: calc(${c} * var(--sf-space-scale));`)}}const a={gutter:"--sf-space-gutter",gap:"--sf-gap",content_gap:"--sf-content-gap",component_pad:"--sf-component-pad",section_pad:"--sf-section-pad"};for(const[r,n]of Object.entries(a))Ee(e[r])&&t.push(`${n}: ${e[r]};`);return t}function Oo(e){const t=[];return Ee(e.radius_scale)&&t.push(`--sf-radius-scale: ${e.radius_scale};`),t}function Po(e){const t=[];return Ee(e.shadow_strength)&&t.push(`--sf-shadow-strength: calc(${e.shadow_strength} + var(--sf-is-dark) * 0.17);`),Ee(e.glow_color)&&t.push(`--sf-shadow-glow-color: ${e.glow_color};`),t}function Lo(e){const t=[];Ee(e.motion_scale)&&t.push(`--sf-motion-scale: ${e.motion_scale};`);const s=["instant","fast","normal","slow","slower"];for(const a of s){const r=`duration_${a}`;Ee(e[r])&&t.push(`--sf-duration-${a}: calc(${e[r]}ms * var(--sf-motion-scale));`)}return t}function Vo(e){const t=[],s=["below","base","raised","low","mid","high","top","max"];for(const a of s)Ee(e[a])&&t.push(`--sf-z-${a}: ${parseInt(e[a],10)};`);return t}function Io(e){const t=[],s={contrast_bias:"--sf-contrast-bias",contrast_threshold:"--sf-contrast-threshold",opacity_disabled:"--sf-opacity-disabled"};for(const[r,n]of Object.entries(s))Ee(e[r])&&t.push(`${n}: ${Tr(e[r])};`);const a={focus_ring_width:"--sf-focus-ring-width",focus_ring_offset:"--sf-focus-ring-offset"};for(const[r,n]of Object.entries(a))Ee(e[r])&&t.push(`${n}: ${Tr(e[r])}px;`);return Ee(e.focus_ring_style)&&["solid","dashed","dotted","double","none"].includes(e.focus_ring_style)&&t.push(`--sf-focus-ring-style: ${e.focus_ring_style};`),t}function ir(e){const t=[];if(e.colors&&typeof e.colors=="object"&&t.push(...Ro(e.colors)),e.typography&&typeof e.typography=="object"&&t.push(...Do(e.typography)),e.spacing&&typeof e.spacing=="object"&&t.push(...Mo(e.spacing)),e.radius&&typeof e.radius=="object"&&t.push(...Oo(e.radius)),e.shadows&&typeof e.shadows=="object"&&t.push(...Po(e.shadows)),e.motion&&typeof e.motion=="object"&&t.push(...Lo(e.motion)),e.zindex&&typeof e.zindex=="object"&&t.push(...Vo(e.zindex)),e.contrast&&typeof e.contrast=="object"&&t.push(...Io(e.contrast)),t.length===0)return"";let s=`@layer slashed.overrides { :root { `;for(const a of t)s+=` ${a} `;return s+=` } -}`,s}function Vo(e){if(!e||typeof e!="object")return!1;for(const t of Object.values(e))if(!(!t||typeof t!="object")){for(const s of Object.values(t))if(typeof s=="object"&&s!==null){for(const a of Object.values(s))if(a!==""&&a!==null&&a!==void 0)return!0}else if(s!==""&&s!==null&&s!==void 0)return!0}return!1}var Io=F(' '),qo=F('

                                                                '),No=F('

                                                                '),Bo=F(`

                                                                Export / Import Tokens

                                                                Export your current SLASHED token overrides (colors, typography, spacing, etc.) to a .json file and import them on any other WordPress site running this plugin. +}`,s}function qo(e){if(!e||typeof e!="object")return!1;for(const t of Object.values(e))if(!(!t||typeof t!="object")){for(const s of Object.values(t))if(typeof s=="object"&&s!==null){for(const a of Object.values(s))if(a!==""&&a!==null&&a!==void 0)return!0}else if(s!==""&&s!==null&&s!==void 0)return!0}return!1}var No=F(' '),Bo=F('

                                                                '),Ko=F('

                                                                '),Ho=F(`

                                                                Export / Import Tokens

                                                                Export your current SLASHED token overrides (colors, typography, spacing, etc.) to a .json file and import them on any other WordPress site running this plugin. This makes Bricks templates fully portable — the template JSON carries structure and class references; this file carries the brand tokens that drive the visual result.

                                                                Export

                                                                Downloads a .json file containing all your active token overrides and plugin settings. Share this file alongside your Bricks template export so the visual result is identical on every site.

                                                                Import

                                                                Upload a .json file previously exported from this plugin. Each section is validated @@ -29,8 +29,8 @@ var En=Object.defineProperty;var nr=e=>{throw TypeError(e)};var jn=(e,t,s)=>t in import the token file via this tab, then import the Bricks template via Bricks → Templates. The plugin re-registers all SLASHED classes, variables, and color palettes automatically.

                                                              • Verify in the Bricks builder canvas that colors, spacing, and fonts match. If something looks off, check the browser console for unresolved var() calls — - this means the CSS bundle isn't loading or the token file wasn't imported yet.
                                                              • `);function Ko(e,t){ke(t,!0);let s=te(!1),a=te("");const r=j(()=>rr(H)),n=j(()=>i(r).length>0);function l(){if(!i(r))return;const M=new Blob([i(r)],{type:"text/css"}),V=URL.createObjectURL(M),U=document.createElement("a");U.href=V,U.download=`slashed-custom-${new Date().toISOString().slice(0,10)}.css`,U.click(),URL.revokeObjectURL(V)}async function o(){K(s,!0),K(a,"");try{const M=await So(),V=JSON.stringify(M,null,2),U=new Blob([V],{type:"application/json"}),I=URL.createObjectURL(U),Y=document.createElement("a");Y.href=I,Y.download=`slashed-tokens-${new Date().toISOString().slice(0,10)}.json`,Y.click(),URL.revokeObjectURL(I)}catch(M){K(a,M.message||"Export failed",!0)}finally{K(s,!1)}}let c=te(null),d=te(!1),_=te(""),v=te(""),u=te(0);async function m(){const M=i(c)?.files?.[0];if(M){K(_,""),K(v,""),K(d,!0);try{const V=await M.text(),U=JSON.parse(V),I=await Eo(U),Y=I.settings_imported?" Plugin settings restored.":"";K(_,`Imported ${I.imported} section(s) successfully.${Y}`),K(u,3);const G=setInterval(()=>{K(u,i(u)-1),i(u)<=0&&(clearInterval(G),window.location.reload())},1e3)}catch(V){K(v,V.message||"Import failed",!0)}finally{K(d,!1),i(c)&&(i(c).value="")}}}var b=Bo(),w=p(f(b),4),h=p(f(w),4),y=f(h),S=f(y),$=p(y,2),R=p($,2);{var B=M=>{var V=Io(),U=f(V);q(()=>A(U,i(a))),z(M,V)};fe(R,M=>{i(a)&&M(B)})}var E=p(w,2),C=p(f(E),4),O=f(C);ol(O,M=>K(c,M),()=>i(c));var L=p(O,2),T=f(L),D=p(C,2);{var x=M=>{var V=qo(),U=f(V),I=p(U);{var Y=G=>{var ae=Yi();q(()=>A(ae,`Reloading in ${i(u)??""}…`)),z(G,ae)};fe(I,G=>{i(u)>0&&G(Y)})}q(()=>A(U,`${i(_)??""} `)),z(M,V)};fe(D,M=>{i(_)&&M(x)})}var k=p(D,2);{var P=M=>{var V=No(),U=f(V);q(()=>A(U,i(v))),z(M,V)};fe(k,M=>{i(v)&&M(P)})}q(()=>{y.disabled=i(s),A(S,i(s)?"Exporting…":"Download token file (.json)"),$.disabled=!i(n),Q($,"title",i(n)?"Download overrides as a standalone CSS file":"No overrides set yet"),L.disabled=i(d),A(T,i(d)?"Importing…":"Import token file")}),he("click",y,o),he("click",$,l),he("click",L,m),z(e,b),Se()}De(["click"]);var Ho=F('

                                                                Parameters:

                                                                 
                                                                '),Uo=F(`

                                                                Filter Hooks Reference

                                                                These WordPress filter hooks let you customize the SLASHED Bricks integration - from your theme or a mu-plugin. Each hook fires during plugin initialization.

                                                                `);function Go(e){const t=[{name:"slashed_bricks/css_bundle_url",description:"Override which CSS bundle URL to load.",params:"$url (string) - The current CSS bundle URL.",example:`add_filter( 'slashed_bricks/css_bundle_url', function( $url ) { + this means the CSS bundle isn't loading or the token file wasn't imported yet.
                                                                `);function Uo(e,t){we(t,!0);let s=te(!1),a=te("");const r=j(()=>ir(H)),n=j(()=>i(r).length>0);function l(){if(!i(r))return;const D=new Blob([i(r)],{type:"text/css"}),V=URL.createObjectURL(D),U=document.createElement("a");U.href=V,U.download=`slashed-custom-${new Date().toISOString().slice(0,10)}.css`,U.click(),URL.revokeObjectURL(V)}async function c(){K(s,!0),K(a,"");try{const D=await jo(),V=JSON.stringify(D,null,2),U=new Blob([V],{type:"application/json"}),I=URL.createObjectURL(U),W=document.createElement("a");W.href=I,W.download=`slashed-tokens-${new Date().toISOString().slice(0,10)}.json`,W.click(),URL.revokeObjectURL(I)}catch(D){K(a,D.message||"Export failed",!0)}finally{K(s,!1)}}let o=te(null),f=te(!1),h=te(""),p=te(""),u=te(0);async function m(){const D=i(o)?.files?.[0];if(D){K(h,""),K(p,""),K(f,!0);try{const V=await D.text(),U=JSON.parse(V),I=await To(U),W=I.settings_imported?" Plugin settings restored.":"";K(h,`Imported ${I.imported} section(s) successfully.${W}`),K(u,3);const G=setInterval(()=>{K(u,i(u)-1),i(u)<=0&&(clearInterval(G),window.location.reload())},1e3)}catch(V){K(p,V.message||"Import failed",!0)}finally{K(f,!1),i(o)&&(i(o).value="")}}}var b=Ho(),w=v(d(b),4),_=v(d(w),4),y=d(_),S=d(y),$=v(y,2),R=v($,2);{var N=D=>{var V=No(),U=d(V);q(()=>A(U,i(a))),z(D,V)};ue(R,D=>{i(a)&&D(N)})}var E=v(w,2),C=v(d(E),4),M=d(C);dl(M,D=>K(o,D),()=>i(o));var L=v(M,2),T=d(L),P=v(C,2);{var x=D=>{var V=Bo(),U=d(V),I=v(U);{var W=G=>{var ae=Zi();q(()=>A(ae,`Reloading in ${i(u)??""}…`)),z(G,ae)};ue(I,G=>{i(u)>0&&G(W)})}q(()=>A(U,`${i(h)??""} `)),z(D,V)};ue(P,D=>{i(h)&&D(x)})}var k=v(P,2);{var O=D=>{var V=Ko(),U=d(V);q(()=>A(U,i(p))),z(D,V)};ue(k,D=>{i(p)&&D(O)})}q(()=>{y.disabled=i(s),A(S,i(s)?"Exporting…":"Download token file (.json)"),$.disabled=!i(n),Q($,"title",i(n)?"Download overrides as a standalone CSS file":"No overrides set yet"),L.disabled=i(f),A(T,i(f)?"Importing…":"Import token file")}),_e("click",y,c),_e("click",$,l),_e("click",L,m),z(e,b),xe()}De(["click"]);var Go=F('

                                                                Parameters:

                                                                 
                                                                '),Wo=F(`

                                                                Filter Hooks Reference

                                                                These WordPress filter hooks let you customize the SLASHED Bricks integration + from your theme or a mu-plugin. Each hook fires during plugin initialization.

                                                                `);function Yo(e){const t=[{name:"slashed_bricks/css_bundle_url",description:"Override which CSS bundle URL to load.",params:"$url (string) - The current CSS bundle URL.",example:`add_filter( 'slashed_bricks/css_bundle_url', function( $url ) { // Load from a CDN instead. return 'https://cdn.example.com/slashed/slashed.optimal.css'; } );`},{name:"slashed_bricks/registered_classes",description:"Filter the array of classes before registration with Bricks.",params:"$classes (array) - Array of class definitions with name and category.",example:`add_filter( 'slashed_bricks/registered_classes', function( $classes ) { @@ -59,7 +59,7 @@ add_filter( 'slashed_bricks/inventory_local_path', function() { 'SLASHED Primary', 'SLASHED Secondary', ] ) ); -} );`}];var s=Uo(),a=p(f(s),4);ne(a,17,()=>t,r=>r.name,(r,n)=>{var l=Ho(),o=f(l),c=f(o),d=f(c),_=p(o,2),v=f(_),u=p(_,2),m=p(f(u),2),b=f(m),w=p(u,2),h=f(w),y=f(h);q(()=>{A(d,i(n).name),A(v,i(n).description),A(b,i(n).params),A(y,i(n).example)}),z(r,l)}),z(e,s)}const Wo=[{category:"Colors",description:"Brand, status, semantic, and derived color tokens. Source colors use oklch(); the framework derives light-dark pairs, palettes, and alpha scales automatically.",tokens:[{name:"--sf-color-{brand}-light",description:"Source color for the brand (oklch registered value). Set this to rebrand."},{name:"--sf-color-{brand}-dark",description:"Optional dark-mode override. If set, replaces the auto-derived dark variant for full per-mode control."},{name:"--sf-color-{brand}",description:"Resolved light-dark adaptive color for use in rules."},{name:"--sf-color-{brand}-{50-950}",description:"Palette scale: 50 (lightest) to 950 (darkest) mixed with base/text."},{name:"--sf-color-{brand}-a{5-95}",description:"Alpha scale: 5% to 95% opacity of the brand color."},{name:"--sf-color-{brand}-hover/active/muted/subtle/ghost/lighter/darker/xlight/xdark/superlight/superdark",description:"Semantic aliases for common UI states, mapped to palette steps."},{name:"--sf-color-bg",description:"Page background color, derived from base."},{name:"--sf-color-text",description:"Main body text color, contrast-aware."},{name:"--sf-color-heading",description:"Heading text color, slightly stronger than body text."},{name:"--sf-color-link",description:"Link color, derived from action brand."},{name:"--sf-color-border",description:"Default border color."},{name:"--sf-color-surface",description:"Card/panel surface color (equals base)."},{name:"--sf-color-overlay",description:"Semi-transparent overlay for modals."},{name:"--sf-color-dim",description:"50% black overlay for dimming backgrounds."},{name:"--sf-color-success/warning/error/info/danger",description:"Status feedback colors with -light source, -muted, -strong, -subtle variants."}]},{category:"Typography",description:"Font families, sizes (fluid clamp-based scale), weights, line-heights, letter-spacing, and heading configuration.",tokens:[{name:"--sf-font-body",description:"Body font stack (system-ui default)."},{name:"--sf-font-heading",description:"Heading font stack (defaults to body)."},{name:"--sf-font-mono",description:"Monospace font stack."},{name:"--sf-font-display",description:"Display/hero font (defaults to heading)."},{name:"--sf-font-geometric/humanist/slab",description:"Curated fallback stacks for common typographic personalities."},{name:"--sf-text-{2xs..4xl}",description:"Fluid type scale using clamp(). Sizes: 2xs, xs, s, m, l, xl, 2xl, 3xl, 4xl."},{name:"--sf-text-display-{s,m,l}",description:"Extra-large display/hero sizes."},{name:"--sf-text-scale",description:"Global multiplier for the type scale (default 1)."},{name:"--sf-font-weight-{thin..black}",description:"Named weight tokens: thin(100), extralight(200), light(300), normal(400), medium(500), semibold(600), bold(700), extrabold(800), black(900)."},{name:"--sf-leading-{tight,snug,normal,relaxed}",description:"Line-height presets: 1.1, 1.3, 1.5, 1.625."},{name:"--sf-tracking-{tight,normal,wide,wider,widest}",description:"Letter-spacing presets from -0.025em to 0.1em."},{name:"--sf-h{1-6}-size/font-weight/line-height/letter-spacing",description:"Per-heading-level configuration tokens."},{name:"--sf-body-*",description:"Body text configuration: font-size, font-weight, line-height, color, text-wrap."}]},{category:"Spacing",description:"Fluid spacing scale (clamp-based), gutters, section padding, and component padding.",tokens:[{name:"--sf-space-{2xs..4xl}",description:"Fluid spacing scale. Sizes: none, px, 2xs, xs, s, m, l, xl, 2xl, 3xl, 4xl."},{name:"--sf-space-scale",description:"Global multiplier for all space tokens (default 1)."},{name:"--sf-space-gutter",description:"Page-edge gutter (defaults to space-l)."},{name:"--sf-gap",description:"Default gap for layouts (defaults to space-m)."},{name:"--sf-content-gap",description:"Gap between content elements (defaults to space-s)."},{name:"--sf-section-pad--{s,m,l,xl}",description:"Vertical padding for page sections."},{name:"--sf-component-pad",description:"Internal padding for components (defaults to space-m)."},{name:"--sf-header-height",description:"Expected fixed header height for sticky offset calculations."},{name:"--sf-safe-{top,right,bottom,left}",description:"Safe area insets for notched devices."}]},{category:"Sizing",description:"Component sizes, touch targets, and aspect ratios.",tokens:[{name:"--sf-size-{xs..xl}",description:"Named size tokens: xs(1.5rem), s(2rem), m(2.5rem), l(2.75rem), xl(3.5rem)."},{name:"--sf-touch-target",description:"Minimum interactive element size (defaults to size-l, 2.75rem)."},{name:"--sf-ratio-{square,photo,video,cinema,golden,portrait}",description:"Predefined aspect ratios for frames and containers."},{name:"--sf-icon-{xs..xl}",description:"Icon sizing in em units (0.875em to 3em)."}]},{category:"Layout",description:"Container widths, layout primitive tokens (stack, cluster, grid, sidebar, switcher, bento, cover, frame, reel, imposter).",tokens:[{name:"--sf-container-{narrow,default,prose,wide,full}",description:"Max-width presets for .sf-container."},{name:"--sf-stack-gap",description:"Vertical gap between .sf-stack children."},{name:"--sf-cluster-gap/align/justify",description:"Inline cluster layout tokens."},{name:"--sf-sidebar-width/gap/min-width",description:"Sidebar layout tokens."},{name:"--sf-switcher-threshold/gap",description:"Column-to-stack breakpoint and gap."},{name:"--sf-grid-min/gap",description:"Auto-fill grid minimum item width and gap."},{name:"--sf-bento-cols/gap/row",description:"Dense bento grid configuration."},{name:"--sf-cover-min-height/padding",description:"Full-height cover layout."},{name:"--sf-frame-ratio",description:"Aspect ratio for .sf-frame (defaults to 16/9)."},{name:"--sf-reel-gap/height/item-width",description:"Horizontal scroll strip configuration."},{name:"--sf-imposter-margin",description:"Safety margin for absolute-centered overlays."},{name:"--sf-breakout-width/content-width",description:"Breakout grid track widths."},{name:"--sf-divider-color/style/width",description:"Divider appearance tokens."}]},{category:"Borders",description:"Border widths and styles.",tokens:[{name:"--sf-border-width-{hairline,1,2,3,4}",description:"Border width scale: 0.5px, 1px, 2px, 3px, 4px."},{name:"--sf-border-style/dotted/soft/strong",description:"Border style presets (solid, dotted, dashed, solid)."},{name:"--sf-stroke-{thin,regular,bold,heavy}",description:"Stroke widths for SVG/icon use: 1px, 1.5px, 2px, 3px."}]},{category:"Radius",description:"Border radius scale and special shapes.",tokens:[{name:"--sf-radius-{none,xs,s,m,l,xl,2xl,3xl,4xl,full}",description:"Radius scale from 0 to 9999px (pill)."},{name:"--sf-radius-scale",description:"Global multiplier for all radius tokens (default 1)."},{name:"--sf-radius-pill",description:"Fully rounded (9999px)."},{name:"--sf-radius-outer",description:"Outer radius = inner + padding (for nested rounding)."}]},{category:"Shadows",description:"Box shadows, drop shadows, text shadows, and shadow configuration.",tokens:[{name:"--sf-shadow-{xs,s,m,l,xl,2xl}",description:"Elevation shadow scale, progressively more dramatic."},{name:"--sf-shadow-inner",description:"Inset shadow for recessed elements."},{name:"--sf-shadow-glow",description:"Colored glow effect (uses --sf-shadow-glow-color)."},{name:"--sf-shadow-none",description:"Explicit no-shadow value."},{name:"--sf-shadow-color",description:"Base shadow color (derived from neutral)."},{name:"--sf-shadow-strength",description:"Shadow opacity multiplier (adapts to dark mode)."},{name:"--sf-drop-shadow-{s,m,l}",description:"CSS filter drop-shadow equivalents."},{name:"--sf-text-shadow-{s,m,l,none}",description:"Text shadow presets."}]},{category:"Effects",description:"Blurs, opacities, gradients, masks, and perspective.",tokens:[{name:"--sf-blur-{xs,s,m,l,xl}",description:"Blur radius scale: 4px to 48px."},{name:"--sf-opacity-{0,10,25,50,75,100,disabled}",description:"Named opacity presets."},{name:"--sf-gradient-{brand,primary,secondary,tertiary,surface}",description:"Predefined gradients using brand colors."},{name:"--sf-gradient-fade--{t,b,l,r}",description:"Directional fade-to-background gradients."},{name:"--sf-mask-scrim-start/end",description:"Scroll mask fade depth."},{name:"--sf-perspective-{near,normal,far}",description:"3D perspective presets: 500px, 1000px, 2000px."},{name:"--sf-contrast-bias/threshold",description:"Color contrast tuning for auto text-on-color logic."}]},{category:"Motion",description:"Durations, easing curves, transitions, and animations.",tokens:[{name:"--sf-duration-{none,instant,fast,normal,slow,slower}",description:"Duration scale: 0ms to 600ms (respects --sf-motion-scale)."},{name:"--sf-motion-scale",description:"Global animation speed multiplier (set 0 to disable)."},{name:"--sf-ease-{linear,in,out,in-out,bounce,elastic,overshoot,spring}",description:"Easing function presets."},{name:"--sf-transition-{all,colors,opacity,shadow,transform,fast,slow,enter,exit}",description:"Pre-composed transition shorthands."},{name:"--sf-animation-{fade-in,fade-out,scale-up,scale-down,slide-in-*,float,ping,blink,color-pulse}",description:"Named keyframe animation shorthands."},{name:"--sf-animation-delay-{1-5}",description:"Stagger delays for sequential animations."}]},{category:"Z-Index",description:"Z-index scale for predictable layering.",tokens:[{name:"--sf-z-{below,base,raised,low,mid,high,top,max}",description:"Z-index scale: -1, 0, 1, 10, 100, 500, 900, 9999."}]},{category:"Focus",description:"Focus ring appearance for keyboard navigation.",tokens:[{name:"--sf-focus-ring-width/offset/color/style/shadow",description:"Focus indicator configuration."},{name:"--sf-caret-color",description:"Text input caret color (defaults to action)."}]},{category:"Scroll",description:"Scroll timeline and scrollbar styling.",tokens:[{name:"--sf-scroll-timeline-range-start/end",description:"Scroll-driven animation range."},{name:"--sf-scrollbar-thumb/track",description:"Custom scrollbar colors."}]},{category:"Print",description:"Print stylesheet configuration.",tokens:[{name:"--sf-print-base-size/page-margin/page-size",description:"Print layout tokens: 11pt base, 2cm margins, A4 size."}]}],Yo=[{category:"Layout Primitives",description:"Breakpoint-free, container-query-driven layout components. Each is a single class with per-instance token overrides via inline style.",classes:[{name:".sf-section",description:"Vertical page rhythm with size variants (--s/--m/--l/--xl/--collapse)."},{name:".sf-section-group",description:"Collapses gap between adjacent sections."},{name:".sf-container",description:"Centered max-width wrapper with gutters. Variants: --narrow, --wide, --full, --prose."},{name:".sf-box",description:"Isolated unit with padding and optional border."},{name:".sf-center",description:"Intrinsic centering with max-width. Variant: --intrinsic."},{name:".sf-stack",description:"Vertical flow with consistent gap. Size variants: --2xs to --3xl. Alignment: --center, --end, --stretch."},{name:".sf-cluster",description:"Wrapping inline group. Size variants: --2xs to --xl. Alignment: --center, --end, --between. Wrap: --no-wrap."},{name:".sf-sidebar",description:"Content + side panel that wraps. Variants: --right, --narrow, --wide."},{name:".sf-switcher",description:"N columns above threshold, stacked below. Variants: --no-wrap, --vertical."},{name:".sf-grid",description:"Auto-fill responsive grid. Size variants: --xs to --xl. Variants: --fit, --dense."},{name:".sf-grid-{1,2,3,4,6}",description:"Fixed-column grids, container-responsive."},{name:".sf-grid-{1-2,2-1,1-3,3-1}",description:"Ratio two-column grids."},{name:".sf-bento",description:"Dense free-form grid. Variants: --2, --4, --compact, --tall."},{name:".sf-alternate",description:"Zigzag two-column layout, reverses every other row."},{name:".sf-pancake",description:"Sticky-footer grid: header / main(1fr) / footer."},{name:".sf-content-grid",description:"Breakout layout grid. Children use .sf-breakout or .sf-full-bleed."},{name:".sf-cover",description:"Full-height region with centered content. Variants: --min, --max, --padding-s, --padding-l."},{name:".sf-frame",description:"Aspect-ratio media box. Variants: --square, --portrait, --video, --cinema, --3-2, --4-3, --golden."},{name:".sf-reel",description:"Horizontal scroll strip with optional mask fade."},{name:".sf-imposter",description:"Absolutely-centered overlay. Variants: --fixed, --contain."},{name:".sf-subgrid / .sf-subgrid-rows",description:"Inherit parent grid tracks."},{name:".sf-divider",description:"Token-driven separator. Variant: --vertical."},{name:".sf-icon",description:"Em-based inline icon sizing. Sizes: --xs to --xl. Variant: --boxed."},{name:".sf-prose",description:"Readable long-form text with automatic vertical rhythm."},{name:".sf-not-prose",description:"Reset zone inside .sf-prose for embedded components."}]},{category:"Macros",description:"Recipe classes that answer 'what does this element do/look like?' - composable with layout primitives.",classes:[{name:".sf-flow",description:"Lobotomized owl: consistent gap between consecutive children."},{name:".sf-truncate",description:"Single-line ellipsis overflow."},{name:".sf-line-clamp-{2,3,N}",description:"Multi-line text clamping with ellipsis. -N reads --sf-line-clamp."},{name:".sf-equal-height",description:"Forces flex children to share the tallest child's height."},{name:".sf-aspect",description:"Generic aspect-ratio container (reads --sf-aspect token)."},{name:".sf-scroll-shadow",description:"Top + bottom mask gradient for scrolling containers."},{name:".sf-scroll-snap",description:"Vertical scroll-snap container."},{name:".sf-overflow-fade",description:"End-edge horizontal fade for overflowing inline content."},{name:".sf-no-tap-highlight",description:"Suppresses WebKit/Android tap highlight."},{name:".sf-text-gradient",description:"Gradient text effect using background-clip."},{name:".sf-clickable-parent",description:"Makes an entire card clickable via the first link inside."},{name:".sf-link-external",description:"Adds external link indicator marker."}]},{category:"Surfaces",description:"Color surface utility classes that set background and text color for a brand context.",classes:[{name:".sf-surface--{primary,secondary,tertiary,action,neutral,inverse}",description:"Brand-colored surface with auto-contrast text."},{name:".sf-surface--{success,warning,error,info,danger}",description:"Status-colored surfaces."}]},{category:"Animations",description:"CSS animation utility classes that apply predefined keyframe animations.",classes:[{name:".sf-fade-in / .sf-fade-out",description:"Opacity entrance/exit animations."},{name:".sf-scale-up / .sf-scale-down",description:"Scale entrance/exit animations."},{name:".sf-slide-in-{up,down,left,right}",description:"Directional slide-in entrance animations."},{name:".sf-color-pulse",description:"Continuous color pulse animation."},{name:".sf-entrance--fade / --fade-up / --fade-down / --fade-left / --fade-right / --scale-up",description:"Scroll-triggered entrance animations (scroll-timeline driven)."}]},{category:"State Classes (.is-*)",description:"Runtime state classes toggled by JS or mirrored from ARIA. They live in the slashed.states layer. Always pair with matching ARIA attributes.",classes:[{name:".is-hidden / .is-invisible / .is-visible",description:"Visibility control: removed from layout / hidden but keeps box / visible."},{name:".is-disabled / .is-readonly",description:"Non-interactive states with dimming."},{name:".is-loading / .is-pending / .is-busy",description:"Loading states: spinner replacement / optimistic UI / cursor hint."},{name:".is-skeleton",description:"Placeholder shimmer animation."},{name:".is-active / .is-selected / .is-current / .is-pressed",description:"Selection/activation states."},{name:".is-highlighted",description:"Transient emphasis (e.g. search result highlight)."},{name:".is-open / .is-collapsed / .is-expanded",description:"Disclosure states for modals, drawers, accordions."},{name:".is-valid / .is-invalid",description:"Form field validation results (maps to aria-invalid)."},{name:".is-success / .is-error / .is-warning / .is-info / .is-danger",description:"General feedback states and destructive-action context."},{name:".is-sticky / .is-pinned / .is-fixed / .is-fullscreen",description:"Positioning states."},{name:".is-clipped / .is-scrollable / .is-truncated / .is-resizable",description:"Overflow handling states."},{name:".is-dragging / .is-drop-target / .is-draggable",description:"Drag and drop states."},{name:".is-overlay / .is-focused / .is-clickable / .is-unselectable",description:"Positioning, focus, cursor, and selection states."},{name:".is-empty",description:"Hide element when empty (:empty pseudo-class)."}]}],Xo=[{name:"--sf-is-dark",description:"Numeric flag (0 or 1) indicating dark mode is active. Registered property."},{name:"--sf-lumlocker",description:"Internal luminance lock value for color derivation."},{name:"--sf-color-scheme",description:"CSS color-scheme declaration (light dark)."},{name:"--sf-current-font-weight",description:"Current context font weight (used by strong elements)."},{name:"--sf-link-external-marker",description:"External link arrow character."},{name:"--sf-field-block",description:"Vertical spacing between form fields."},{name:"--sf-field-required-marker",description:"Required field indicator string."}];var Zo=F('
                                                              • '),Jo=F('
                                                                  '),Qo=F('
                                                                • '),ec=F('
                                                                  Misc Tokens that do not fit a single category.
                                                                    '),tc=F('

                                                                    CSS Custom Properties (--sf-*)

                                                                    '),sc=F('
                                                                  • '),ac=F('
                                                                      '),rc=F('

                                                                      Utility & State Classes

                                                                      '),nc=F('

                                                                      '),ic=F('

                                                                      API Cheatsheet

                                                                      ');function lc(e,t){ke(t,!0);let s=te(""),a=te("all");const r=re.inventory?.variables?.length??0,n=re.inventory?.sf_classes?.length??0,l=re.inventory?.is_classes?.length??0;let o=j(()=>v(Wo,"tokens")),c=j(()=>v(Yo,"classes")),d=j(()=>Xo.filter(I=>_(I.name,I.description)));function _(I,Y){if(!i(s).trim())return!0;const G=i(s).trim().toLowerCase();return I.toLowerCase().includes(G)||Y.toLowerCase().includes(G)}function v(I,Y){return i(s).trim()?I.map(G=>({...G,[Y]:G[Y].filter(ae=>_(ae.name,ae.description))})).filter(G=>G[Y].length>0):I}let u=j(()=>i(a)==="all"||i(a)==="variables"),m=j(()=>i(a)==="all"||i(a)==="classes"),b=j(()=>i(s).trim()!==""&&(!i(u)||i(o).length===0&&i(d).length===0)&&(!i(m)||i(c).length===0));var w=ic(),h=f(w),y=p(f(h),2),S=f(y),$=p(h,2),R=f($),B=p(R,2),E=f(B);let C;var O=p(E,2);let L;var T=p(O,2);let D;var x=p($,2);{var k=I=>{var Y=tc(),G=p(f(Y),2);ne(G,17,()=>i(o),js,(ce,pe)=>{var ge=Jo(),N=f(ge),le=f(N),me=f(le),ye=p(le,2),Ce=f(ye),ze=p(N,2);ne(ze,21,()=>i(pe).tokens,js,(Re,oe)=>{var we=Zo(),be=f(we),Ke=f(be),xe=p(be,2),pt=f(xe);q(()=>{A(Ke,i(oe).name),A(pt,i(oe).description)}),z(Re,we)}),q(Re=>{ge.open=Re,A(me,i(pe).category),A(Ce,i(pe).description)},[()=>!i(s).trim()]),z(ce,ge)});var ae=p(G,2);{var ue=ce=>{var pe=ec(),ge=p(f(pe),2);ne(ge,21,()=>i(d),js,(N,le)=>{var me=Qo(),ye=f(me),Ce=f(ye),ze=p(ye,2),Re=f(ze);q(()=>{A(Ce,i(le).name),A(Re,i(le).description)}),z(N,me)}),q(N=>pe.open=N,[()=>!i(s).trim()]),z(ce,pe)};fe(ae,ce=>{i(d).length>0&&ce(ue)})}z(I,Y)};fe(x,I=>{i(u)&&I(k)})}var P=p(x,2);{var M=I=>{var Y=rc(),G=p(f(Y),2);ne(G,17,()=>i(c),js,(ae,ue)=>{var ce=ac(),pe=f(ce),ge=f(pe),N=f(ge),le=p(ge,2),me=f(le),ye=p(pe,2);ne(ye,21,()=>i(ue).classes,js,(Ce,ze)=>{var Re=sc(),oe=f(Re),we=f(oe),be=p(oe,2),Ke=f(be);q(()=>{A(we,i(ze).name),A(Ke,i(ze).description)}),z(Ce,Re)}),q(Ce=>{ce.open=Ce,A(N,i(ue).category),A(me,i(ue).description)},[()=>!i(s).trim()]),z(ae,ce)}),z(I,Y)};fe(P,I=>{i(m)&&I(M)})}var V=p(P,2);{var U=I=>{var Y=nc(),G=f(Y);q(()=>A(G,`No results for "${i(s)??""}"`)),z(I,Y)};fe(V,I=>{i(b)&&I(U)})}q(()=>{A(S,`${r??""} variables | ${n??""} layout/utility classes | ${l??""} state classes`),Q(E,"aria-pressed",i(a)==="all"),C=rt(E,1,"svelte-osej3t",null,C,{active:i(a)==="all"}),Q(O,"aria-pressed",i(a)==="variables"),L=rt(O,1,"svelte-osej3t",null,L,{active:i(a)==="variables"}),Q(T,"aria-pressed",i(a)==="classes"),D=rt(T,1,"svelte-osej3t",null,D,{active:i(a)==="classes"})}),Tt(R,()=>i(s),I=>K(s,I)),he("click",E,()=>K(a,"all")),he("click",O,()=>K(a,"variables")),he("click",T,()=>K(a,"classes")),z(e,w),Se()}De(["click"]);var oc=F('
                                                                      '),cc=F('
                                                                      '),dc=F(`

                                                                      Live preview

                                                                      The quick brown fox jumps over the lazy dog

                                                                      Body and heading fonts update as you adjust typography settings. Colors below +} );`}];var s=Wo(),a=v(d(s),4);ie(a,17,()=>t,r=>r.name,(r,n)=>{var l=Go(),c=d(l),o=d(c),f=d(o),h=v(c,2),p=d(h),u=v(h,2),m=v(d(u),2),b=d(m),w=v(u,2),_=d(w),y=d(_);q(()=>{A(f,i(n).name),A(p,i(n).description),A(b,i(n).params),A(y,i(n).example)}),z(r,l)}),z(e,s)}const Xo=[{category:"Colors",description:"Brand, status, semantic, and derived color tokens. Source colors use oklch(); the framework derives light-dark pairs, palettes, and alpha scales automatically.",tokens:[{name:"--sf-color-{brand}-light",description:"Source color for the brand (oklch registered value). Set this to rebrand."},{name:"--sf-color-{brand}-dark",description:"Optional dark-mode override. If set, replaces the auto-derived dark variant for full per-mode control."},{name:"--sf-color-{brand}",description:"Resolved light-dark adaptive color for use in rules."},{name:"--sf-color-{brand}-{50-950}",description:"Palette scale: 50 (lightest) to 950 (darkest) mixed with base/text."},{name:"--sf-color-{brand}-a{5-95}",description:"Alpha scale: 5% to 95% opacity of the brand color."},{name:"--sf-color-{brand}-hover/active/muted/subtle/ghost/lighter/darker/xlight/xdark/superlight/superdark",description:"Semantic aliases for common UI states, mapped to palette steps."},{name:"--sf-color-bg",description:"Page background color, derived from base."},{name:"--sf-color-text",description:"Main body text color, contrast-aware."},{name:"--sf-color-heading",description:"Heading text color, slightly stronger than body text."},{name:"--sf-color-link",description:"Link color, derived from action brand."},{name:"--sf-color-border",description:"Default border color."},{name:"--sf-color-surface",description:"Card/panel surface color (equals base)."},{name:"--sf-color-overlay",description:"Semi-transparent overlay for modals."},{name:"--sf-color-dim",description:"50% black overlay for dimming backgrounds."},{name:"--sf-color-success/warning/error/info/danger",description:"Status feedback colors with -light source, -muted, -strong, -subtle variants."}]},{category:"Typography",description:"Font families, sizes (fluid clamp-based scale), weights, line-heights, letter-spacing, and heading configuration.",tokens:[{name:"--sf-font-body",description:"Body font stack (system-ui default)."},{name:"--sf-font-heading",description:"Heading font stack (defaults to body)."},{name:"--sf-font-mono",description:"Monospace font stack."},{name:"--sf-font-display",description:"Display/hero font (defaults to heading)."},{name:"--sf-font-geometric/humanist/slab",description:"Curated fallback stacks for common typographic personalities."},{name:"--sf-text-{2xs..4xl}",description:"Fluid type scale using clamp(). Sizes: 2xs, xs, s, m, l, xl, 2xl, 3xl, 4xl."},{name:"--sf-text-display-{s,m,l}",description:"Extra-large display/hero sizes."},{name:"--sf-text-scale",description:"Global multiplier for the type scale (default 1)."},{name:"--sf-font-weight-{thin..black}",description:"Named weight tokens: thin(100), extralight(200), light(300), normal(400), medium(500), semibold(600), bold(700), extrabold(800), black(900)."},{name:"--sf-leading-{tight,snug,normal,relaxed}",description:"Line-height presets: 1.1, 1.3, 1.5, 1.625."},{name:"--sf-tracking-{tight,normal,wide,wider,widest}",description:"Letter-spacing presets from -0.025em to 0.1em."},{name:"--sf-h{1-6}-size/font-weight/line-height/letter-spacing",description:"Per-heading-level configuration tokens."},{name:"--sf-body-*",description:"Body text configuration: font-size, font-weight, line-height, color, text-wrap."}]},{category:"Spacing",description:"Fluid spacing scale (clamp-based), gutters, section padding, and component padding.",tokens:[{name:"--sf-space-{2xs..4xl}",description:"Fluid spacing scale. Sizes: none, px, 2xs, xs, s, m, l, xl, 2xl, 3xl, 4xl."},{name:"--sf-space-scale",description:"Global multiplier for all space tokens (default 1)."},{name:"--sf-space-gutter",description:"Page-edge gutter (defaults to space-l)."},{name:"--sf-gap",description:"Default gap for layouts (defaults to space-m)."},{name:"--sf-content-gap",description:"Gap between content elements (defaults to space-s)."},{name:"--sf-section-pad--{s,m,l,xl}",description:"Vertical padding for page sections."},{name:"--sf-component-pad",description:"Internal padding for components (defaults to space-m)."},{name:"--sf-header-height",description:"Expected fixed header height for sticky offset calculations."},{name:"--sf-safe-{top,right,bottom,left}",description:"Safe area insets for notched devices."}]},{category:"Sizing",description:"Component sizes, touch targets, and aspect ratios.",tokens:[{name:"--sf-size-{xs..xl}",description:"Named size tokens: xs(1.5rem), s(2rem), m(2.5rem), l(2.75rem), xl(3.5rem)."},{name:"--sf-touch-target",description:"Minimum interactive element size (defaults to size-l, 2.75rem)."},{name:"--sf-ratio-{square,photo,video,cinema,golden,portrait}",description:"Predefined aspect ratios for frames and containers."},{name:"--sf-icon-{xs..xl}",description:"Icon sizing in em units (0.875em to 3em)."}]},{category:"Layout",description:"Container widths, layout primitive tokens (stack, cluster, grid, sidebar, switcher, bento, cover, frame, reel, imposter).",tokens:[{name:"--sf-container-{narrow,default,prose,wide,full}",description:"Max-width presets for .sf-container."},{name:"--sf-stack-gap",description:"Vertical gap between .sf-stack children."},{name:"--sf-cluster-gap/align/justify",description:"Inline cluster layout tokens."},{name:"--sf-sidebar-width/gap/min-width",description:"Sidebar layout tokens."},{name:"--sf-switcher-threshold/gap",description:"Column-to-stack breakpoint and gap."},{name:"--sf-grid-min/gap",description:"Auto-fill grid minimum item width and gap."},{name:"--sf-bento-cols/gap/row",description:"Dense bento grid configuration."},{name:"--sf-cover-min-height/padding",description:"Full-height cover layout."},{name:"--sf-frame-ratio",description:"Aspect ratio for .sf-frame (defaults to 16/9)."},{name:"--sf-reel-gap/height/item-width",description:"Horizontal scroll strip configuration."},{name:"--sf-imposter-margin",description:"Safety margin for absolute-centered overlays."},{name:"--sf-breakout-width/content-width",description:"Breakout grid track widths."},{name:"--sf-divider-color/style/width",description:"Divider appearance tokens."}]},{category:"Borders",description:"Border widths and styles.",tokens:[{name:"--sf-border-width-{hairline,1,2,3,4}",description:"Border width scale: 0.5px, 1px, 2px, 3px, 4px."},{name:"--sf-border-style/dotted/soft/strong",description:"Border style presets (solid, dotted, dashed, solid)."},{name:"--sf-stroke-{thin,regular,bold,heavy}",description:"Stroke widths for SVG/icon use: 1px, 1.5px, 2px, 3px."}]},{category:"Radius",description:"Border radius scale and special shapes.",tokens:[{name:"--sf-radius-{none,xs,s,m,l,xl,2xl,3xl,4xl,full}",description:"Radius scale from 0 to 9999px (pill)."},{name:"--sf-radius-scale",description:"Global multiplier for all radius tokens (default 1)."},{name:"--sf-radius-pill",description:"Fully rounded (9999px)."},{name:"--sf-radius-outer",description:"Outer radius = inner + padding (for nested rounding)."}]},{category:"Shadows",description:"Box shadows, drop shadows, text shadows, and shadow configuration.",tokens:[{name:"--sf-shadow-{xs,s,m,l,xl,2xl}",description:"Elevation shadow scale, progressively more dramatic."},{name:"--sf-shadow-inner",description:"Inset shadow for recessed elements."},{name:"--sf-shadow-glow",description:"Colored glow effect (uses --sf-shadow-glow-color)."},{name:"--sf-shadow-none",description:"Explicit no-shadow value."},{name:"--sf-shadow-color",description:"Base shadow color (derived from neutral)."},{name:"--sf-shadow-strength",description:"Shadow opacity multiplier (adapts to dark mode)."},{name:"--sf-drop-shadow-{s,m,l}",description:"CSS filter drop-shadow equivalents."},{name:"--sf-text-shadow-{s,m,l,none}",description:"Text shadow presets."}]},{category:"Effects",description:"Blurs, opacities, gradients, masks, and perspective.",tokens:[{name:"--sf-blur-{xs,s,m,l,xl}",description:"Blur radius scale: 4px to 48px."},{name:"--sf-opacity-{0,10,25,50,75,100,disabled}",description:"Named opacity presets."},{name:"--sf-gradient-{brand,primary,secondary,tertiary,surface}",description:"Predefined gradients using brand colors."},{name:"--sf-gradient-fade--{t,b,l,r}",description:"Directional fade-to-background gradients."},{name:"--sf-mask-scrim-start/end",description:"Scroll mask fade depth."},{name:"--sf-perspective-{near,normal,far}",description:"3D perspective presets: 500px, 1000px, 2000px."},{name:"--sf-contrast-bias/threshold",description:"Color contrast tuning for auto text-on-color logic."}]},{category:"Motion",description:"Durations, easing curves, transitions, and animations.",tokens:[{name:"--sf-duration-{none,instant,fast,normal,slow,slower}",description:"Duration scale: 0ms to 600ms (respects --sf-motion-scale)."},{name:"--sf-motion-scale",description:"Global animation speed multiplier (set 0 to disable)."},{name:"--sf-ease-{linear,in,out,in-out,bounce,elastic,overshoot,spring}",description:"Easing function presets."},{name:"--sf-transition-{all,colors,opacity,shadow,transform,fast,slow,enter,exit}",description:"Pre-composed transition shorthands."},{name:"--sf-animation-{fade-in,fade-out,scale-up,scale-down,slide-in-*,float,ping,blink,color-pulse}",description:"Named keyframe animation shorthands."},{name:"--sf-animation-delay-{1-5}",description:"Stagger delays for sequential animations."}]},{category:"Z-Index",description:"Z-index scale for predictable layering.",tokens:[{name:"--sf-z-{below,base,raised,low,mid,high,top,max}",description:"Z-index scale: -1, 0, 1, 10, 100, 500, 900, 9999."}]},{category:"Focus",description:"Focus ring appearance for keyboard navigation.",tokens:[{name:"--sf-focus-ring-width/offset/color/style/shadow",description:"Focus indicator configuration."},{name:"--sf-caret-color",description:"Text input caret color (defaults to action)."}]},{category:"Scroll",description:"Scroll timeline and scrollbar styling.",tokens:[{name:"--sf-scroll-timeline-range-start/end",description:"Scroll-driven animation range."},{name:"--sf-scrollbar-thumb/track",description:"Custom scrollbar colors."}]},{category:"Print",description:"Print stylesheet configuration.",tokens:[{name:"--sf-print-base-size/page-margin/page-size",description:"Print layout tokens: 11pt base, 2cm margins, A4 size."}]}],Zo=[{category:"Layout Primitives",description:"Breakpoint-free, container-query-driven layout components. Each is a single class with per-instance token overrides via inline style.",classes:[{name:".sf-section",description:"Vertical page rhythm with size variants (--s/--m/--l/--xl/--collapse)."},{name:".sf-section-group",description:"Collapses gap between adjacent sections."},{name:".sf-container",description:"Centered max-width wrapper with gutters. Variants: --narrow, --wide, --full, --prose."},{name:".sf-box",description:"Isolated unit with padding and optional border."},{name:".sf-center",description:"Intrinsic centering with max-width. Variant: --intrinsic."},{name:".sf-stack",description:"Vertical flow with consistent gap. Size variants: --2xs to --3xl. Alignment: --center, --end, --stretch."},{name:".sf-cluster",description:"Wrapping inline group. Size variants: --2xs to --xl. Alignment: --center, --end, --between. Wrap: --no-wrap."},{name:".sf-sidebar",description:"Content + side panel that wraps. Variants: --right, --narrow, --wide."},{name:".sf-switcher",description:"N columns above threshold, stacked below. Variants: --no-wrap, --vertical."},{name:".sf-grid",description:"Auto-fill responsive grid. Size variants: --xs to --xl. Variants: --fit, --dense."},{name:".sf-grid-{1,2,3,4,6}",description:"Fixed-column grids, container-responsive."},{name:".sf-grid-{1-2,2-1,1-3,3-1}",description:"Ratio two-column grids."},{name:".sf-bento",description:"Dense free-form grid. Variants: --2, --4, --compact, --tall."},{name:".sf-alternate",description:"Zigzag two-column layout, reverses every other row."},{name:".sf-pancake",description:"Sticky-footer grid: header / main(1fr) / footer."},{name:".sf-content-grid",description:"Breakout layout grid. Children use .sf-breakout or .sf-full-bleed."},{name:".sf-cover",description:"Full-height region with centered content. Variants: --min, --max, --padding-s, --padding-l."},{name:".sf-frame",description:"Aspect-ratio media box. Variants: --square, --portrait, --video, --cinema, --3-2, --4-3, --golden."},{name:".sf-reel",description:"Horizontal scroll strip with optional mask fade."},{name:".sf-imposter",description:"Absolutely-centered overlay. Variants: --fixed, --contain."},{name:".sf-subgrid / .sf-subgrid-rows",description:"Inherit parent grid tracks."},{name:".sf-divider",description:"Token-driven separator. Variant: --vertical."},{name:".sf-icon",description:"Em-based inline icon sizing. Sizes: --xs to --xl. Variant: --boxed."},{name:".sf-prose",description:"Readable long-form text with automatic vertical rhythm."},{name:".sf-not-prose",description:"Reset zone inside .sf-prose for embedded components."}]},{category:"Macros",description:"Recipe classes that answer 'what does this element do/look like?' - composable with layout primitives.",classes:[{name:".sf-flow",description:"Lobotomized owl: consistent gap between consecutive children."},{name:".sf-truncate",description:"Single-line ellipsis overflow."},{name:".sf-line-clamp-{2,3,N}",description:"Multi-line text clamping with ellipsis. -N reads --sf-line-clamp."},{name:".sf-equal-height",description:"Forces flex children to share the tallest child's height."},{name:".sf-aspect",description:"Generic aspect-ratio container (reads --sf-aspect token)."},{name:".sf-scroll-shadow",description:"Top + bottom mask gradient for scrolling containers."},{name:".sf-scroll-snap",description:"Vertical scroll-snap container."},{name:".sf-overflow-fade",description:"End-edge horizontal fade for overflowing inline content."},{name:".sf-no-tap-highlight",description:"Suppresses WebKit/Android tap highlight."},{name:".sf-text-gradient",description:"Gradient text effect using background-clip."},{name:".sf-clickable-parent",description:"Makes an entire card clickable via the first link inside."},{name:".sf-link-external",description:"Adds external link indicator marker."}]},{category:"Surfaces",description:"Color surface utility classes that set background and text color for a brand context.",classes:[{name:".sf-surface--{primary,secondary,tertiary,action,neutral,inverse}",description:"Brand-colored surface with auto-contrast text."},{name:".sf-surface--{success,warning,error,info,danger}",description:"Status-colored surfaces."}]},{category:"Animations",description:"CSS animation utility classes that apply predefined keyframe animations.",classes:[{name:".sf-fade-in / .sf-fade-out",description:"Opacity entrance/exit animations."},{name:".sf-scale-up / .sf-scale-down",description:"Scale entrance/exit animations."},{name:".sf-slide-in-{up,down,left,right}",description:"Directional slide-in entrance animations."},{name:".sf-color-pulse",description:"Continuous color pulse animation."},{name:".sf-entrance--fade / --fade-up / --fade-down / --fade-left / --fade-right / --scale-up",description:"Scroll-triggered entrance animations (scroll-timeline driven)."}]},{category:"State Classes (.is-*)",description:"Runtime state classes toggled by JS or mirrored from ARIA. They live in the slashed.states layer. Always pair with matching ARIA attributes.",classes:[{name:".is-hidden / .is-invisible / .is-visible",description:"Visibility control: removed from layout / hidden but keeps box / visible."},{name:".is-disabled / .is-readonly",description:"Non-interactive states with dimming."},{name:".is-loading / .is-pending / .is-busy",description:"Loading states: spinner replacement / optimistic UI / cursor hint."},{name:".is-skeleton",description:"Placeholder shimmer animation."},{name:".is-active / .is-selected / .is-current / .is-pressed",description:"Selection/activation states."},{name:".is-highlighted",description:"Transient emphasis (e.g. search result highlight)."},{name:".is-open / .is-collapsed / .is-expanded",description:"Disclosure states for modals, drawers, accordions."},{name:".is-valid / .is-invalid",description:"Form field validation results (maps to aria-invalid)."},{name:".is-success / .is-error / .is-warning / .is-info / .is-danger",description:"General feedback states and destructive-action context."},{name:".is-sticky / .is-pinned / .is-fixed / .is-fullscreen",description:"Positioning states."},{name:".is-clipped / .is-scrollable / .is-truncated / .is-resizable",description:"Overflow handling states."},{name:".is-dragging / .is-drop-target / .is-draggable",description:"Drag and drop states."},{name:".is-overlay / .is-focused / .is-clickable / .is-unselectable",description:"Positioning, focus, cursor, and selection states."},{name:".is-empty",description:"Hide element when empty (:empty pseudo-class)."}]}],Jo=[{name:"--sf-is-dark",description:"Numeric flag (0 or 1) indicating dark mode is active. Registered property."},{name:"--sf-lumlocker",description:"Internal luminance lock value for color derivation."},{name:"--sf-color-scheme",description:"CSS color-scheme declaration (light dark)."},{name:"--sf-current-font-weight",description:"Current context font weight (used by strong elements)."},{name:"--sf-link-external-marker",description:"External link arrow character."},{name:"--sf-field-block",description:"Vertical spacing between form fields."},{name:"--sf-field-required-marker",description:"Required field indicator string."}];var Qo=F('

                                                                    • '),ec=F('
                                                                        '),tc=F('
                                                                      • '),sc=F('
                                                                        Misc Tokens that do not fit a single category.
                                                                          '),ac=F('

                                                                          CSS Custom Properties (--sf-*)

                                                                          '),rc=F('
                                                                        • '),nc=F('
                                                                            '),ic=F('

                                                                            Utility & State Classes

                                                                            '),lc=F('

                                                                            '),oc=F('

                                                                            API Cheatsheet

                                                                            ');function cc(e,t){we(t,!0);let s=te(""),a=te("all");const r=ne.inventory?.variables?.length??0,n=ne.inventory?.sf_classes?.length??0,l=ne.inventory?.is_classes?.length??0;let c=j(()=>p(Xo,"tokens")),o=j(()=>p(Zo,"classes")),f=j(()=>Jo.filter(I=>h(I.name,I.description)));function h(I,W){if(!i(s).trim())return!0;const G=i(s).trim().toLowerCase();return I.toLowerCase().includes(G)||W.toLowerCase().includes(G)}function p(I,W){return i(s).trim()?I.map(G=>({...G,[W]:G[W].filter(ae=>h(ae.name,ae.description))})).filter(G=>G[W].length>0):I}let u=j(()=>i(a)==="all"||i(a)==="variables"),m=j(()=>i(a)==="all"||i(a)==="classes"),b=j(()=>i(s).trim()!==""&&(!i(u)||i(c).length===0&&i(f).length===0)&&(!i(m)||i(o).length===0));var w=oc(),_=d(w),y=v(d(_),2),S=d(y),$=v(_,2),R=d($),N=v(R,2),E=d(N);let C;var M=v(E,2);let L;var T=v(M,2);let P;var x=v($,2);{var k=I=>{var W=ac(),G=v(d(W),2);ie(G,17,()=>i(c),Ts,(de,he)=>{var me=ec(),B=d(me),oe=d(B),be=d(oe),ye=v(oe,2),Te=d(ye),$e=v(B,2);ie($e,21,()=>i(he).tokens,Ts,(Ae,Pe)=>{var lt=Qo(),ot=d(lt),ce=d(ot),re=v(ot,2),ke=d(re);q(()=>{A(ce,i(Pe).name),A(ke,i(Pe).description)}),z(Ae,lt)}),q(Ae=>{me.open=Ae,A(be,i(he).category),A(Te,i(he).description)},[()=>!i(s).trim()]),z(de,me)});var ae=v(G,2);{var pe=de=>{var he=sc(),me=v(d(he),2);ie(me,21,()=>i(f),Ts,(B,oe)=>{var be=tc(),ye=d(be),Te=d(ye),$e=v(ye,2),Ae=d($e);q(()=>{A(Te,i(oe).name),A(Ae,i(oe).description)}),z(B,be)}),q(B=>he.open=B,[()=>!i(s).trim()]),z(de,he)};ue(ae,de=>{i(f).length>0&&de(pe)})}z(I,W)};ue(x,I=>{i(u)&&I(k)})}var O=v(x,2);{var D=I=>{var W=ic(),G=v(d(W),2);ie(G,17,()=>i(o),Ts,(ae,pe)=>{var de=nc(),he=d(de),me=d(he),B=d(me),oe=v(me,2),be=d(oe),ye=v(he,2);ie(ye,21,()=>i(pe).classes,Ts,(Te,$e)=>{var Ae=rc(),Pe=d(Ae),lt=d(Pe),ot=v(Pe,2),ce=d(ot);q(()=>{A(lt,i($e).name),A(ce,i($e).description)}),z(Te,Ae)}),q(Te=>{de.open=Te,A(B,i(pe).category),A(be,i(pe).description)},[()=>!i(s).trim()]),z(ae,de)}),z(I,W)};ue(O,I=>{i(m)&&I(D)})}var V=v(O,2);{var U=I=>{var W=lc(),G=d(W);q(()=>A(G,`No results for "${i(s)??""}"`)),z(I,W)};ue(V,I=>{i(b)&&I(U)})}q(()=>{A(S,`${r??""} variables | ${n??""} layout/utility classes | ${l??""} state classes`),Q(E,"aria-pressed",i(a)==="all"),C=nt(E,1,"svelte-osej3t",null,C,{active:i(a)==="all"}),Q(M,"aria-pressed",i(a)==="variables"),L=nt(M,1,"svelte-osej3t",null,L,{active:i(a)==="variables"}),Q(T,"aria-pressed",i(a)==="classes"),P=nt(T,1,"svelte-osej3t",null,P,{active:i(a)==="classes"})}),$t(R,()=>i(s),I=>K(s,I)),_e("click",E,()=>K(a,"all")),_e("click",M,()=>K(a,"variables")),_e("click",T,()=>K(a,"classes")),z(e,w),xe()}De(["click"]);var dc=F('
                                                                            '),fc=F('
                                                                            '),uc=F(`

                                                                            Live preview

                                                                            The quick brown fox jumps over the lazy dog

                                                                            Body and heading fonts update as you adjust typography settings. Colors below reflect brand and status tokens for the selected mode.

                                                                            Primary Action Outline Ghost

                                                                            Card Component

                                                                            Design token preview

                                                                            Active

                                                                            This card shows radius, shadow, spacing, colors, and typography - working together. All values update live as you adjust tokens.

                                                                            Generated CSS:
                                                                            `);function fc(e,t){ke(t,!0);const s=["primary","secondary","tertiary","action","neutral","base"],a=["success","warning","error","info","danger"],r=re.defaults?.colors??{};let n=te(!1);const l=j(()=>{const oe=[],we=H.colors??{},be=H.typography??{},Ke=H.radius??{},xe=H.shadows??{},pt=we.dark_overrides_enabled!=="0",zt=$e=>$e==="base"?"oklch(from var(--sf-color-base-light) clamp(0.16, calc(1.18 - l), 0.24) calc(c * 0.5) h)":`oklch(from var(--sf-color-${$e}-light) clamp(0.65, calc(0.95 - l * 0.5), 0.88) calc(c * 0.9) h)`;for(const $e of s){const Vt=we[`brand_${$e}`]??r.brand_hex_hints?.[$e];Vt&&oe.push(`--sf-color-${$e}-light:${Vt}`);const wa=pt?we[`brand_dark_${$e}`]:"";oe.push(`--sf-color-${$e}-dark:${wa||zt($e)}`)}for(const $e of a){const Vt=we[`status_${$e}`]??r.status_hex_hints?.[$e];Vt&&oe.push(`--sf-color-${$e}-light:${Vt}`);const wa=pt?we[`status_dark_${$e}`]:"";oe.push(`--sf-color-${$e}-dark:${wa||zt($e)}`)}be.font_body&&oe.push(`--sf-font-body:${be.font_body}`),be.font_heading&&oe.push(`--sf-font-heading:${be.font_heading}`);const it=parseFloat(Ke.radius_scale??re.defaults?.radius?.radius_scale??1)||1;oe.push(`--preview-radius-s:${Math.round(4*it)}px`),oe.push(`--preview-radius-m:${Math.round(8*it)}px`),oe.push(`--preview-radius-l:${Math.round(16*it)}px`);const Lt=xe.shadow_strength,ls=parseFloat(Lt!==void 0&&Lt!==""?Lt:re.defaults?.shadows?.shadow_strength??.08);return oe.push(`--preview-shadow:0 2px 8px 0 rgba(0,0,0,${(ls*2).toFixed(3)}),0 1px 3px 0 rgba(0,0,0,${ls.toFixed(3)})`),oe.join(";")}),o=j(()=>i(n)?"dark":"light"),c=j(()=>rr(H));var d=dc();let _;var v=f(d),u=p(f(v),2),m=f(u);let b;var w=p(m,2);let h;var y=p(v,6),S=f(y);ne(S,16,()=>s,oe=>oe,(oe,we)=>{var be=oc();let Ke;var xe=f(be);q(()=>{Q(be,"title",we),Ke=ve(be,"",Ke,{background:`var(--sf-color-${we}-${i(o)}, #ddd)`}),A(xe,we)}),z(oe,be)});var $=p(S,2);ne($,16,()=>a,oe=>oe,(oe,we)=>{var be=cc();let Ke;var xe=f(be);q(()=>{Q(be,"title",we),Ke=ve(be,"",Ke,{background:`var(--sf-color-${we}-${i(o)}, #ddd)`}),A(xe,we)}),z(oe,be)});var R=p(y,2),B=f(R);let E;var C=p(B,2);let O;var L=p(C,2);let T;var D=p(R,2);ve(D,"",{},{"box-shadow":"var(--preview-shadow)"});var x=f(D);let k;var P=p(x,2),M=f(P),V=f(M);let U;var I=p(V,2),Y=f(I);ve(Y,"",{},{"font-family":"var(--sf-font-heading, system-ui, sans-serif)"});var G=p(I,2);let ae;var ue=p(M,2);ve(ue,"",{},{"font-family":"var(--sf-font-body, system-ui, sans-serif)"});var ce=p(ue,2),pe=f(ce);let ge;var N=p(pe,2);let le;var me=p(N,2);let ye;var Ce=p(D,2),ze=p(f(Ce)),Re=f(ze);q(()=>{_=rt(d,1,"slashed-preview svelte-g79qke",null,_,{"is-dark":i(n)}),ve(d,i(l)),b=rt(m,1,"slashed-preview__mode-btn svelte-g79qke",null,b,{active:!i(n)}),h=rt(w,1,"slashed-preview__mode-btn svelte-g79qke",null,h,{active:i(n)}),E=ve(B,"",E,{background:`var(--sf-color-primary-${i(o)}, #4338ca)`}),O=ve(C,"",O,{background:`var(--sf-color-action-${i(o)}, #0891b2)`}),T=ve(L,"",T,{"border-color":`var(--sf-color-primary-${i(o)}, #4338ca)`,color:`var(--sf-color-primary-${i(o)}, #4338ca)`}),k=ve(x,"",k,{background:`var(--sf-color-primary-${i(o)}, #4338ca)`}),U=ve(V,"",U,{background:`var(--sf-color-secondary-${i(o)}, #7c3aed)`}),ae=ve(G,"",ae,{background:`var(--sf-color-success-${i(o)}, #16a34a)`}),ge=ve(pe,"",ge,{background:`var(--sf-color-info-${i(o)}, #0284c7)`}),le=ve(N,"",le,{background:`var(--sf-color-warning-${i(o)}, #ca8a04)`}),ye=ve(me,"",ye,{background:`var(--sf-color-action-${i(o)}, #0891b2)`}),A(Re,i(c)||"/* (defaults — no overrides set) */")}),he("click",m,()=>K(n,!1)),he("click",w,()=>K(n,!0)),z(e,d),Se()}De(["click"]);var uc=F(' '),vc=F('Saving…'),pc=F('Saved'),hc=F('Unsaved changes'),_c=F('All changes saved'),gc=F('
                                                                            ');function mc(e,t){ke(t,!0);const s=["contrast","radius","shadows","motion","zindex"];async function a(){if(!W.saving){W.saving=!0,W.error="";try{if(W.activeTab==="misc"){const E=await Promise.allSettled(s.map(O=>xr(O,H[O]??{}))),C=[];if(E.forEach((O,L)=>{O.status==="fulfilled"?O.value?.values&&(H[s[L]]=O.value.values):C.push(s[L])}),C.length>0)throw new Error(`Failed to save: ${C.join(", ")}`)}else{const E=W.activeTab,C=H[E]??{},O=await xr(E,C);O&&O.values&&(H[E]=O.values)}W.dirty=!1,W.lastSavedAt=Date.now()}catch(E){W.error=E&&E.message||String(E)}finally{W.saving=!1}}}async function r(){if(!W.saving&&confirm(`Reset the ${re.tabs[W.activeTab]??W.activeTab} tab to defaults?`)){W.saving=!0,W.error="";try{if(W.activeTab==="misc"){const E=await Promise.allSettled(s.map(O=>kr(O))),C=[];if(E.forEach((O,L)=>{O.status==="fulfilled"?wr(s[L]):C.push(s[L])}),C.length>0)throw new Error(`Failed to reset: ${C.join(", ")}`)}else await kr(W.activeTab),wr(W.activeTab);W.dirty=!1,W.lastSavedAt=Date.now()}catch(E){W.error=E&&E.message||String(E)}finally{W.saving=!1}}}let n=te(!1);rn(()=>{if(W.lastSavedAt){K(n,!0);const E=setTimeout(()=>K(n,!1),2e3);return()=>clearTimeout(E)}});const l=j(()=>Vo(H));function o(){const E=rr(H);if(!E)return;const C=new Blob([E],{type:"text/css"}),O=URL.createObjectURL(C),L=document.createElement("a");L.href=O,L.download="slashed-custom.css",document.body.appendChild(L),L.click(),document.body.removeChild(L),URL.revokeObjectURL(O)}var c=gc();let d;var _=f(c),v=f(_);{var u=E=>{var C=uc(),O=f(C);q(()=>A(O,W.error)),z(E,C)},m=E=>{var C=vc();z(E,C)},b=E=>{var C=pc();z(E,C)},w=E=>{var C=hc();z(E,C)},h=E=>{var C=_c();z(E,C)};fe(v,E=>{W.error?E(u):W.saving?E(m,1):i(n)?E(b,2):W.dirty?E(w,3):E(h,-1)})}var y=p(_,2),S=f(y),$=p(S,2),R=p($,2),B=f(R);q(()=>{d=rt(c,1,"bar svelte-1oj49qa",null,d,{dirty:W.dirty}),S.disabled=W.saving,$.disabled=!i(l),R.disabled=W.saving||!W.dirty,A(B,W.saving?"Saving…":"Save changes")}),he("click",S,r),he("click",$,o),he("click",R,a),z(e,c),Se()}De(["click"]);var bc=F(' '),yc=F(' '),wc=F('

                                                                            SLASHED Design Tokens

                                                                            Adjust framework tokens, inspect generated variables, and manage the bundled CSS in one place.

                                                                            ');function xc(e,t){ke(t,!0);const s=["cheatsheet","hooks","variables","classes","bundle","export"];let a=j(()=>s.includes(W.activeTab));rn(()=>{function x(k){W.dirty&&(k.preventDefault(),k.returnValue="")}return window.addEventListener("beforeunload",x),()=>window.removeEventListener("beforeunload",x)});var r=wc(),n=f(r),l=f(n),o=p(f(l),2),c=f(o);{var d=x=>{var k=bc(),P=f(k);q(()=>A(P,`Framework ${re.versions.framework??""}`)),z(x,k)};fe(c,x=>{re.versions.framework&&x(d)})}var _=p(c,2);{var v=x=>{var k=yc(),P=f(k);q(()=>A(P,`Plugin v${re.versions.plugin??""}`)),z(x,k)};fe(_,x=>{re.versions.plugin&&x(v)})}var u=p(n,2);pl(u,{});var m=p(u,2),b=f(m);{var w=x=>{Sl(x,{})},h=x=>{Ul(x,{})},y=x=>{Ql(x,{})},S=x=>{fo(x,{})},$=x=>{_o(x,{})},R=x=>{xo(x,{})},B=x=>{Co(x,{})},E=x=>{Ko(x,{})},C=x=>{Go(x)},O=x=>{lc(x,{})};fe(b,x=>{W.activeTab==="colors"?x(w):W.activeTab==="typography"?x(h,1):W.activeTab==="spacing"?x(y,2):W.activeTab==="misc"?x(S,3):W.activeTab==="variables"?x($,4):W.activeTab==="classes"?x(R,5):W.activeTab==="bundle"?x(B,6):W.activeTab==="export"?x(E,7):W.activeTab==="hooks"?x(C,8):W.activeTab==="cheatsheet"&&x(O,9)})}var L=p(m,2);fc(L,{});var T=p(L,2);{var D=x=>{mc(x,{})};fe(T,x=>{i(a)||x(D)})}z(e,r),Se()}const jr=document.getElementById("slashed-admin-app");jr&&Xi(xc,{target:jr}); + working together. All values update live as you adjust tokens.

                                                                            Generated CSS:
                                                                            `);function vc(e,t){we(t,!0);const s=["primary","secondary","tertiary","action","neutral","base"],a=["success","warning","error","info","danger"],r=ne.defaults?.colors??{},n=ce=>`oklch(from var(${ce}) clamp(0.65, calc(0.95 - l * 0.5), 0.88) calc(c * 0.9) h)`,l=ce=>`oklch(from var(${ce}) clamp(0.16, calc(1.18 - l), 0.24) calc(c * 0.5) h)`,c=ce=>{const re=`--sf-color-${ce}-light`;return ce==="base"?l(re):n(re)};let o=te(!1);const f=j(()=>{const ce=[],re=H.colors??{},ke=H.typography??{},Be=H.radius??{},Ke=H.shadows??{},ls=re.dark_overrides_enabled!=="0";for(const He of s){const js=re[`brand_${He}`]??r.brand_hex_hints?.[He];js&&ce.push(`--sf-color-${He}-light:${js}`);const ka=ls?re[`brand_dark_${He}`]:"";ce.push(`--sf-color-${He}-dark:${ka||c(He)}`)}for(const He of a){const js=re[`status_${He}`]??r.status_hex_hints?.[He];js&&ce.push(`--sf-color-${He}-light:${js}`);const ka=ls?re[`status_dark_${He}`]:"";ce.push(`--sf-color-${He}-dark:${ka||c(He)}`)}ke.font_body&&ce.push(`--sf-font-body:${ke.font_body}`),ke.font_heading&&ce.push(`--sf-font-heading:${ke.font_heading}`);const Lt=parseFloat(Be.radius_scale??ne.defaults?.radius?.radius_scale??1)||1;ce.push(`--preview-radius-s:${Math.round(4*Lt)}px`),ce.push(`--preview-radius-m:${Math.round(8*Lt)}px`),ce.push(`--preview-radius-l:${Math.round(16*Lt)}px`);const Vt=Ke.shadow_strength,Hs=parseFloat(Vt!==void 0&&Vt!==""?Vt:ne.defaults?.shadows?.shadow_strength??.08);return ce.push(`--preview-shadow:0 2px 8px 0 rgba(0,0,0,${(Hs*2).toFixed(3)}),0 1px 3px 0 rgba(0,0,0,${Hs.toFixed(3)})`),ce.join(";")}),h=j(()=>i(o)?"dark":"light"),p=j(()=>ir(H));var u=uc();let m;var b=d(u),w=v(d(b),2),_=d(w);let y;var S=v(_,2);let $;var R=v(b,6),N=d(R);ie(N,16,()=>s,ce=>ce,(ce,re)=>{var ke=dc();let Be;var Ke=d(ke);q(()=>{Q(ke,"title",re),Be=ve(ke,"",Be,{background:`var(--sf-color-${re}-${i(h)}, #ddd)`}),A(Ke,re)}),z(ce,ke)});var E=v(N,2);ie(E,16,()=>a,ce=>ce,(ce,re)=>{var ke=fc();let Be;var Ke=d(ke);q(()=>{Q(ke,"title",re),Be=ve(ke,"",Be,{background:`var(--sf-color-${re}-${i(h)}, #ddd)`}),A(Ke,re)}),z(ce,ke)});var C=v(R,2),M=d(C);let L;var T=v(M,2);let P;var x=v(T,2);let k;var O=v(C,2);ve(O,"",{},{"box-shadow":"var(--preview-shadow)"});var D=d(O);let V;var U=v(D,2),I=d(U),W=d(I);let G;var ae=v(W,2),pe=d(ae);ve(pe,"",{},{"font-family":"var(--sf-font-heading, system-ui, sans-serif)"});var de=v(ae,2);let he;var me=v(I,2);ve(me,"",{},{"font-family":"var(--sf-font-body, system-ui, sans-serif)"});var B=v(me,2),oe=d(B);let be;var ye=v(oe,2);let Te;var $e=v(ye,2);let Ae;var Pe=v(O,2),lt=v(d(Pe)),ot=d(lt);q(()=>{m=nt(u,1,"slashed-preview svelte-g79qke",null,m,{"is-dark":i(o)}),ve(u,i(f)),y=nt(_,1,"slashed-preview__mode-btn svelte-g79qke",null,y,{active:!i(o)}),$=nt(S,1,"slashed-preview__mode-btn svelte-g79qke",null,$,{active:i(o)}),L=ve(M,"",L,{background:`var(--sf-color-primary-${i(h)}, #4338ca)`}),P=ve(T,"",P,{background:`var(--sf-color-action-${i(h)}, #0891b2)`}),k=ve(x,"",k,{"border-color":`var(--sf-color-primary-${i(h)}, #4338ca)`,color:`var(--sf-color-primary-${i(h)}, #4338ca)`}),V=ve(D,"",V,{background:`var(--sf-color-primary-${i(h)}, #4338ca)`}),G=ve(W,"",G,{background:`var(--sf-color-secondary-${i(h)}, #7c3aed)`}),he=ve(de,"",he,{background:`var(--sf-color-success-${i(h)}, #16a34a)`}),be=ve(oe,"",be,{background:`var(--sf-color-info-${i(h)}, #0284c7)`}),Te=ve(ye,"",Te,{background:`var(--sf-color-warning-${i(h)}, #ca8a04)`}),Ae=ve($e,"",Ae,{background:`var(--sf-color-action-${i(h)}, #0891b2)`}),A(ot,i(p)||"/* (defaults — no overrides set) */")}),_e("click",_,()=>K(o,!1)),_e("click",S,()=>K(o,!0)),z(e,u),xe()}De(["click"]);var pc=F(' '),hc=F('Saving…'),_c=F('Saved'),gc=F('Unsaved changes'),mc=F('All changes saved'),bc=F('
                                                                            ');function yc(e,t){we(t,!0);const s=["contrast","radius","shadows","motion","zindex"];async function a(){if(!Y.saving){Y.saving=!0,Y.error="";try{if(Y.activeTab==="misc"){const E=await Promise.allSettled(s.map(M=>Sr(M,H[M]??{}))),C=[];if(E.forEach((M,L)=>{M.status==="fulfilled"?M.value?.values&&(H[s[L]]=M.value.values):C.push(s[L])}),C.length>0)throw new Error(`Failed to save: ${C.join(", ")}`)}else{const E=Y.activeTab,C=H[E]??{},M=await Sr(E,C);M&&M.values&&(H[E]=M.values)}Y.dirty=!1,Y.lastSavedAt=Date.now()}catch(E){Y.error=E&&E.message||String(E)}finally{Y.saving=!1}}}async function r(){if(!Y.saving&&confirm(`Reset the ${ne.tabs[Y.activeTab]??Y.activeTab} tab to defaults?`)){Y.saving=!0,Y.error="";try{if(Y.activeTab==="misc"){const E=await Promise.allSettled(s.map(M=>Er(M))),C=[];if(E.forEach((M,L)=>{M.status==="fulfilled"?kr(s[L]):C.push(s[L])}),C.length>0)throw new Error(`Failed to reset: ${C.join(", ")}`)}else await Er(Y.activeTab),kr(Y.activeTab);Y.dirty=!1,Y.lastSavedAt=Date.now()}catch(E){Y.error=E&&E.message||String(E)}finally{Y.saving=!1}}}let n=te(!1);ln(()=>{if(Y.lastSavedAt){K(n,!0);const E=setTimeout(()=>K(n,!1),2e3);return()=>clearTimeout(E)}});const l=j(()=>qo(H));function c(){const E=ir(H);if(!E)return;const C=new Blob([E],{type:"text/css"}),M=URL.createObjectURL(C),L=document.createElement("a");L.href=M,L.download="slashed-custom.css",document.body.appendChild(L),L.click(),document.body.removeChild(L),URL.revokeObjectURL(M)}var o=bc();let f;var h=d(o),p=d(h);{var u=E=>{var C=pc(),M=d(C);q(()=>A(M,Y.error)),z(E,C)},m=E=>{var C=hc();z(E,C)},b=E=>{var C=_c();z(E,C)},w=E=>{var C=gc();z(E,C)},_=E=>{var C=mc();z(E,C)};ue(p,E=>{Y.error?E(u):Y.saving?E(m,1):i(n)?E(b,2):Y.dirty?E(w,3):E(_,-1)})}var y=v(h,2),S=d(y),$=v(S,2),R=v($,2),N=d(R);q(()=>{f=nt(o,1,"bar svelte-1oj49qa",null,f,{dirty:Y.dirty}),S.disabled=Y.saving,$.disabled=!i(l),R.disabled=Y.saving||!Y.dirty,A(N,Y.saving?"Saving…":"Save changes")}),_e("click",S,r),_e("click",$,c),_e("click",R,a),z(e,o),xe()}De(["click"]);var wc=F(' '),xc=F(' '),kc=F('

                                                                            SLASHED Design Tokens

                                                                            Adjust framework tokens, inspect generated variables, and manage the bundled CSS in one place.

                                                                            ');function Sc(e,t){we(t,!0);const s=["cheatsheet","hooks","variables","classes","bundle","export"];let a=j(()=>s.includes(Y.activeTab));ln(()=>{function x(k){Y.dirty&&(k.preventDefault(),k.returnValue="")}return window.addEventListener("beforeunload",x),()=>window.removeEventListener("beforeunload",x)});var r=kc(),n=d(r),l=d(n),c=v(d(l),2),o=d(c);{var f=x=>{var k=wc(),O=d(k);q(()=>A(O,`Framework ${ne.versions.framework??""}`)),z(x,k)};ue(o,x=>{ne.versions.framework&&x(f)})}var h=v(o,2);{var p=x=>{var k=xc(),O=d(k);q(()=>A(O,`Plugin v${ne.versions.plugin??""}`)),z(x,k)};ue(h,x=>{ne.versions.plugin&&x(p)})}var u=v(n,2);_l(u,{});var m=v(u,2),b=d(m);{var w=x=>{jl(x,{})},_=x=>{Wl(x,{})},y=x=>{to(x,{})},S=x=>{vo(x,{})},$=x=>{mo(x,{})},R=x=>{So(x,{})},N=x=>{Ao(x,{})},E=x=>{Uo(x,{})},C=x=>{Yo(x)},M=x=>{cc(x,{})};ue(b,x=>{Y.activeTab==="colors"?x(w):Y.activeTab==="typography"?x(_,1):Y.activeTab==="spacing"?x(y,2):Y.activeTab==="misc"?x(S,3):Y.activeTab==="variables"?x($,4):Y.activeTab==="classes"?x(R,5):Y.activeTab==="bundle"?x(N,6):Y.activeTab==="export"?x(E,7):Y.activeTab==="hooks"?x(C,8):Y.activeTab==="cheatsheet"&&x(M,9)})}var L=v(m,2);vc(L,{});var T=v(L,2);{var P=x=>{yc(x,{})};ue(T,x=>{i(a)||x(P)})}z(e,r),xe()}const $r=document.getElementById("slashed-admin-app");$r&&Ji(Sc,{target:$r}); //# sourceMappingURL=app.js.map