smbls 3.14.831 → 3.14.832
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/smbls.cjs +42 -42
- package/dist/smbls.embed.iife.js +14 -14
- package/dist/smbls.esm.js +42 -42
- package/dist/smbls.iife-string.js +2 -2
- package/dist/smbls.iife.js +42 -42
- package/package.json +1 -1
package/dist/smbls.cjs
CHANGED
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
"use strict";var iI=Object.create;var Tf=Object.defineProperty;var aI=Object.getOwnPropertyDescriptor;var cI=Object.getOwnPropertyNames;var lI=Object.getPrototypeOf,fI=Object.prototype.hasOwnProperty;var L=(t,e,n)=>()=>{if(n)throw n[0];try{return t&&(e=t(t=0)),e}catch(r){throw n=[r],r}};var Qh=(t,e)=>()=>{try{return e||t((e={exports:{}}).exports,e),e.exports}catch(n){throw e=0,n}},F=(t,e)=>{for(var n in e)Tf(t,n,{get:e[n],enumerable:!0})},G0=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of cI(e))!fI.call(t,o)&&o!==n&&Tf(t,o,{get:()=>e[o],enumerable:!(r=aI(e,o))||r.enumerable});return t};var uI=(t,e,n)=>(n=t!=null?iI(lI(t)):{},G0(e||!t||!t.__esModule?Tf(n,"default",{value:t,enumerable:!0}):n,t)),dI=t=>G0(Tf({},"__esModule",{value:!0}),t);var sg={};F(sg,{WRITE_JOURNAL:()=>na,batch:()=>sa,createComputed:()=>hI,createEffect:()=>gI,createSignal:()=>fn,getObserver:()=>ng,journalWrite:()=>oa,setObserver:()=>pI,settled:()=>og});function fn(t){let e=new Set;function n(){return se&&(e.add(se),se._sources.add(s)),t}function r(i){i!==t&&(t=i,xI(e))}function o(){return t}let s={get:n,set:r,peek:o,_subscribers:e,_type:"signal"};return s}function hI(t){let e,n=!0,r=new Set,o={_sources:new Set,_type:"computed",_subscribers:r,_execute(){eg(o);let s=se;se=o;try{e=t(),n=!1}finally{se=s}},_notify(){n=!0,r.size>0&&Q0(r)},get(){return se&&(r.add(se),se._sources.add(o)),n&&o._execute(),e},peek(){return n&&o._execute(),e}};return o._execute(),o}function oa(t){na.push(t),na.length>32&&na.shift()}function gI(t,e){let n=e?.depth??0,r={_sources:new Set,_type:"effect",_depth:n,_label:e?.label,_disposed:!1,_subscribers:new Set,_execute(){if(r._disposed)return;eg(r);let o=se;se=r;try{t()}catch(s){console.error("[smbls] effect error:",s)}finally{se=o}},_notify(){r._disposed||(ta>0?ea.push(r):Of>0?Jh.push(r):rg(r))},dispose(){r._disposed=!0,eg(r)}};return r._execute(),r}function sa(t){ta++;try{t()}finally{ta--,ta===0&&SI()}}function X0(){return typeof performance<"u"?performance.now():Date.now()}function rg(t){De.add(t),!Pf&&(Rf||(Rf=!0,queueMicrotask(Z0)))}function _I(){if(De.size===1){let[e]=De;return De.clear(),e._disposed?0:(e._execute(),1)}ns.length=0;for(let e of De)ns.push(e);De.clear(),ns.sort((e,n)=>e._depth-n._depth);let t=0;for(let e=0;e<ns.length;e++){let n=ns[e];n._disposed||(n._execute(),t++)}return ns.length=0,t}function Z0(t=0,e=0){if(Rf=!1,De.size===0){ra.length&&tg();return}Pf=!0;let n=X0(),r=!1;try{for(;De.size>0;){if(++t>Y0){let o=new Map;for(let c of De){let l=c._label;if(typeof l=="function")try{l=l()}catch{l="<label error>"}if(l=l||"<unlabeled>",o.set(l,(o.get(l)||0)+1),o.size>=12)break}let s=[...o.entries()].map(([c,l])=>l>1?`${c} \xD7${l}`:c).join(", "),i=new Map;for(let c of na)i.set(c,(i.get(c)||0)+1);let a=[...i.entries()].map(([c,l])=>l>1?`${c} \xD7${l}`:c).join(", ");console.error("[smbls] reactive effect cascade exceeded",Y0,"passes in a single flush \u2014 breaking to avoid hanging the thread.","This usually means an effect (or an onUpdate/subscribeTo handler","it calls into) unconditionally writes back a signal it depends on.","Still queued at break (the loop participants):",s||"<queue empty>","\u2014 last notifying store writes:",a||"<none recorded>"),De.clear();break}if(e+=_I(),De.size>0&&(e>=yI||t>=bI)&&X0()-n>mI){r=!0,setTimeout(()=>Z0(t,e),0);break}}}finally{r||(Pf=!1,ra.length&&tg())}}function wI(){return De.size===0&&!Rf&&!Pf&&ea.length===0&&ta===0}function tg(){if(ra.length===0||!wI())return;let t=ra.splice(0);for(let e=0;e<t.length;e++)t[e]()}function og(){return new Promise(t=>{ra.push(t),queueMicrotask(tg)})}function SI(){for(let t=0;t<ea.length;t++)rg(ea[t]);ea.length=0}function Q0(t){Of++;try{for(let e of t)e._notify()}finally{if(Of--,Of===0&&Jh.length>0){let e=Jh.splice(0);for(let n=0;n<e.length;n++)rg(e[n])}}}function xI(t){Q0(t)}function eg(t){for(let e of t._sources)e._subscribers.delete(t);t._sources.clear()}var se,ta,ea,ng,pI,Of,Jh,De,Rf,na,Pf,Y0,mI,yI,bI,ns,ra,ig=L(()=>{se=null,ta=0,ea=[],ng=()=>se,pI=t=>{se=t},Of=0,Jh=[];De=new Set,Rf=!1,na=[];Pf=!1,Y0=1e3,mI=8,yI=256,bI=4;ns=[];ra=[]});var pg={};F(pg,{RESERVED_STORE_METHODS:()=>ia,STORE_METHOD_NAMES:()=>dg,__resetStateShadowWarnings:()=>kI,createScopeStore:()=>CI,createStore:()=>Lf,getSignals:()=>AI,isStore:()=>EI,warnStateKeyShadowsMethod:()=>ug});function ug(t,e){let n=(e||"")+"::"+t;if(fg.has(n))return;fg.add(n);let r=e?`state.${e}`:"state",o=`[smbls/state] "${t}" is a reserved store-method name and was written as DATA at ${r}.${t}. The value is preserved and readable \u2014 data wins over the method \u2014 but "${r}.${t}(\u2026)" no longer reaches the store method on this node. Use "${r}.$${t}(\u2026)" for the method, or rename the data key. Reserved: ${dg.join(", ")}.`;typeof console<"u"&&console.warn&&console.warn(o)}function kI(){fg.clear()}function $f(t,e,n){if(t===e)return!0;if(n>vI)return!1;if(Array.isArray(t)||Array.isArray(e)){if(!Array.isArray(t)||!Array.isArray(e)||t.length!==e.length)return!1;for(let r=0;r<t.length;r++)if(!$f(t[r],e[r],n+1))return!1;return!0}if(If(t)&&If(e)){let r=Object.keys(t),o=Object.keys(e);if(r.length!==o.length)return!1;for(let s of r)if(!Object.prototype.hasOwnProperty.call(e,s)||!$f(t[s],e[s],n+1))return!1;return!0}return!1}function Lf(t,e,n,r){n===void 0&&(n=0),r===void 0&&(r="");let o={},s={},i=_=>Object.prototype.hasOwnProperty.call(o,_)&&Object.prototype.hasOwnProperty.call(s,_),a=e&&e.maxDepth||8;if(t&&typeof t=="object")for(let _ in t){if(_==="__proto__"||!Object.prototype.hasOwnProperty.call(t,_))continue;if(_.startsWith("__")){s[_]=t[_];continue}ia.has(_)&&ug(_,r);let w=t[_];n<a&&w&&typeof w=="object"&&!cg(w)?(s[_]=w,o[_]=fn(Lf(w,e,n+1,ag(r,_)))):(s[_]=w,o[_]=fn(w))}let c=new Proxy(s,{get(_,w){if(w===un)return!0;if(w===Df)return o;if(w==="__raw")return _;if(w==="$update")return f;if(w==="$parse")return p;if(w==="$clean")return g;if(w==="$keys")return h;if(w==="$values")return m;if(w==="$replace")return y;if(w==="$add")return S;if(w==="$remove")return b;if(w==="$destroy")return x;if(w==="$quietUpdate")return u;if(w==="$settled")return d;if(ia.has(w)&&!Object.prototype.hasOwnProperty.call(o,w))switch(w){case"update":return f;case"parse":return p;case"clean":return g;case"keys":return h;case"values":return m;case"replace":return y;case"add":return S;case"remove":return b;case"destroy":return x;case"quietUpdate":return u}if(w==="__element")return _.__element;if(w==="parent")return _.parent;if(w==="root")return _.root;if(Object.prototype.hasOwnProperty.call(o,w)){let A=o[w].get();if(A!==void 0||!(w!=="root"&&_.root&&_.root!==c))return A}if(_[w]!==void 0)return _[w];let k=typeof w=="string"&&!w.startsWith("__")&&w!=="then"&&w!=="constructor"&&ng()!=null;if(w!=="root"&&_.root&&_.root!==c){let A=_.root[w];return k&&!Object.prototype.hasOwnProperty.call(o,w)&&(o[w]=fn(void 0),o[w].get()),A}if(k)return o[w]=fn(void 0),o[w].get()},set(_,w,k){if(w==="__proto__")return!1;if(w==="__element"||w==="parent"||w==="root"||typeof w=="string"&&w.startsWith("__")&&!Object.prototype.hasOwnProperty.call(o,w))return _[w]=k,!0;ia.has(w)&&ug(w,r);let A=ag(r,w);if(Object.prototype.hasOwnProperty.call(o,w))if(k&&typeof k=="object"&&!cg(k)){if(k===_[w])return!0;let T=o[w].peek(),M=T&&T[un]?T.$parse():T;if($f(k,M,0))return!0;_[w]=k,oa(A),o[w].set(Lf(k,e,n+1,A))}else{if(Array.isArray(k)&&k!==_[w]&&Array.isArray(o[w].peek())&&$f(k,o[w].peek(),0))return!0;o[w].peek()!==k&&oa(A),_[w]=k,o[w].set(k)}else _[w]=k,k&&typeof k=="object"&&!cg(k)?o[w]=fn(Lf(k,e,n+1,A)):o[w]=fn(k);return!0},has(_,w){return typeof w=="string"&&w.charCodeAt(0)===36&&ia.has(w.slice(1))?!0:w in _},ownKeys(_){return Object.keys(o).filter(i)},getOwnPropertyDescriptor(_,w){return i(w)?{enumerable:!0,configurable:!0,value:o[w].peek()}:Object.getOwnPropertyDescriptor(_,w)},deleteProperty(_,w){return o[w]&&(o[w].peek()!==void 0&&oa(ag(r,w)),o[w].set(void 0),delete o[w]),delete _[w],!0}});function l(_,w){let k=s.__element;return!k||typeof k.onBeforeStateUpdate!="function"||w?.preventBeforeStateUpdateListener?!0:k.onBeforeStateUpdate(k,c,k.context,{changes:_,options:w})!==!1}function f(_,w){if(_&&typeof _=="object"&&!l(_,w))return c;sa(()=>{for(let A in _)A!=="__proto__"&&(c[A]=_[A])});let k=s.__element;return k&&k.onUpdate&&!w?.quiet&&k.onUpdate(k,c,k.context),c}function u(_){return f(_,{quiet:!0})}function d(){return og().then(()=>c)}function p(_){if(_||(_=new Set),_.has(c))return"[Circular]";_.add(c);let w={};for(let k in o){if(k==="parent"||k==="root"||k.startsWith("__")||!Object.prototype.hasOwnProperty.call(s,k))continue;let A=o[k].peek();A&&A[un]?w[k]=A.$parse(_):w[k]=A}return w}function g(){return sa(()=>{for(let _ in o)delete c[_]}),c}function h(){return Object.keys(o).filter(i)}function m(){return Object.keys(o).filter(i).map(_=>o[_].peek())}function y(_,w){return _&&typeof _=="object"&&!l(_,w)||sa(()=>{for(let k in o)k in _||delete c[k];for(let k in _)k!=="__proto__"&&(c[k]=_[k])}),c}function S(_,w){let k=Object.prototype.hasOwnProperty.call(o,_)?o[_].peek():s[_];if(Array.isArray(k))return c[_]=[...k,w],c;if(k&&typeof k=="object"&&!Array.isArray(k)){if(If(w))k[un]?k.$update(w):c[_]={...k,...w};else{let A=String(Object.keys(k).length);k[un]?k.$update({[A]:w}):c[_]={...k,[A]:w}}return c}return c[_]=w,c}function b(_){return delete c[_],c}function x(){g(),s.__element=null,s.parent=null}return c}function EI(t){return t&&t[un]===!0}function AI(t){return t[Df]}function CI(t,e){let n={},r={};if(t&&typeof t=="object")for(let i in t)r[i]=t[i],n[i]=fn(t[i]);let o=i=>{if(Object.prototype.hasOwnProperty.call(n,i))return n;let a=e;for(;a;){let c=a[Df];if(c&&Object.prototype.hasOwnProperty.call(c,i))return c;a=a[un]?a[lg]:null}return null};return new Proxy(r,{get(i,a){return a===un?!0:a===Df?n:a===lg?e:a==="__raw"?i:Object.prototype.hasOwnProperty.call(n,a)?n[a].get():e&&a!=="then"&&a!=="constructor"?e[a]:i[a]},set(i,a,c){let l=o(a);return l?(l===n&&(i[a]=c),l[a].set(c),!0):(i[a]=c,n[a]=fn(c),!0)},has(i,a){if(a in n||a in i)return!0;let c=e;for(;c;){if(a in c)return!0;c=c[un]?c[lg]:null}return!1},ownKeys(){return Object.keys(n)},getOwnPropertyDescriptor(i,a){return a in n?{enumerable:!0,configurable:!0,value:n[a].peek()}:Object.getOwnPropertyDescriptor(i,a)}})}var un,Df,dg,ia,fg,ag,cg,vI,If,lg,J0=L(()=>{ig();un=Symbol("store"),Df=Symbol("signals"),dg=["update","parse","clean","keys","values","replace","add","remove","destroy","quietUpdate"],ia=new Set(dg),fg=new Set,ag=(t,e)=>t?t+"."+e:String(e);cg=t=>!t||typeof t!="object"||Array.isArray(t)||t[un]||Object.isFrozen(t)||typeof Node<"u"&&t instanceof Node||t.__ref||t.nodeType||t.nodeName||!If(t),vI=12,If=t=>{if(!t||typeof t!="object")return!1;let e=Object.getPrototypeOf(t);return e===Object.prototype||e===null};lg=Symbol("scope.parent")});var Ur,Mf=L(()=>{Ur="3.14.786"});var rs,os,hg,gg=L(()=>{Mf();rs="__SMBLS_SIGNAL_INSTANCES__",os=(t,e,n)=>{let r=e||(typeof globalThis<"u"?globalThis:null);if(!r)return null;let o=r[rs]||(r[rs]={versions:[],engines:0,reported:!1});return typeof o.engines!="number"&&(o.engines=o.versions.length),o.versions.push(t||Ur),n||o.engines++,o.engines>1&&!o.reported&&(o.reported=!0,console.error("[smbls] duplicate @symbo.ls/signal instance \u2014",o.engines,"copies of the reactive engine are loaded on this page:",o.versions.join(", ")+".","Each copy keeps its own observer and effect queue, so an effect created","by one copy never re-fires from another copy's store writes, and one","copy's cascade breaker cannot see the other's queue.","Copies of the SAME version adopt a single engine automatically, so","this means the versions above DIFFER: a fossil copy is resolving beside","the current one. That is a dependency-graph fault, not an application","bug \u2014 align the version wherever @symbo.ls/signal is imported, then","regenerate the lockfile so exactly one version resolves.")),o},hg=t=>{let e=t||(typeof globalThis<"u"?globalThis:null);e&&delete e[rs]}});var ss,tk,mg,ek=L(()=>{Mf();gg();ss="__SMBLS_SIGNAL_ENGINE__",tk=(t,e,n)=>{let r=e||Ur,o=n||(typeof globalThis<"u"?globalThis:null);if(!o)return t;let s=o[ss];return s&&s.engine&&s.version===r?(os(r,o,!0),s.engine):(s||(o[ss]={version:r,engine:t}),os(r,o,!1),t)},mg=t=>{let e=t||(typeof globalThis<"u"?globalThis:null);e&&delete e[ss]}});var Xt,Vr,nk,K,Nf,Qt,Dt,Ff,xn,jf,_t,rk,ok,sk,Bf,ik,ak,ck=L(()=>{ig();J0();ek();Mf();gg();Xt=tk({...sg,...pg,VERSION:Ur},Ur),Vr=Xt.createSignal,nk=Xt.createComputed,K=Xt.createEffect,Nf=Xt.batch,Qt=Xt.getObserver,Dt=Xt.setObserver,Ff=Xt.settled||(()=>Promise.resolve()),xn=Xt.createStore,jf=Xt.createScopeStore,_t=Xt.isStore,rk=Xt.getSignals,ok=Xt.STORE_METHOD_NAMES,sk=Xt.RESERVED_STORE_METHODS,Bf=Xt.warnStateKeyShadowsMethod,ik=Xt.__resetStateShadowWarnings,ak=Xt.VERSION});var yg={};F(yg,{RESERVED_STORE_METHODS:()=>sk,SIGNAL_ENGINE_KEY:()=>ss,SIGNAL_INSTANCES_KEY:()=>rs,STORE_METHOD_NAMES:()=>ok,VERSION:()=>ak,__resetSignalEngine:()=>mg,__resetSignalInstances:()=>hg,__resetStateShadowWarnings:()=>ik,batch:()=>Nf,createComputed:()=>nk,createEffect:()=>K,createScopeStore:()=>jf,createSignal:()=>Vr,createStore:()=>xn,getObserver:()=>Qt,getSignals:()=>rk,isStore:()=>_t,registerSignalInstance:()=>os,setObserver:()=>Dt,settled:()=>Ff,warnStateKeyShadowsMethod:()=>Bf});var Kt=L(()=>{ck()});var _g,wg,C,dt,ca=L(()=>{"use strict";_g=globalThis,wg=globalThis,C=globalThis,dt=C.document});var En,la,ie,fa=L(()=>{"use strict";ca();En=t=>(typeof Node=="object"?t instanceof C.Node:t&&typeof t=="object"&&typeof t.nodeType=="number"&&typeof t.nodeName=="string")||!1,la=t=>(typeof HTMLElement=="object"?t instanceof C.HTMLElement:t&&typeof t=="object"&&t!==null&&t.nodeType===1&&typeof t.nodeName=="string")||!1,ie=t=>typeof C<"u"&&(C.Node&&t instanceof C.Node||C.Window&&t instanceof C.Window||t===C||dt!==void 0&&t===dt)});var E,v,Ie,P,Uf,Vf,D,zf,q,It,Bt,ua,ae,Sg,Ut=L(()=>{"use strict";fa();E=t=>t===null?!1:typeof t=="object"&&t.constructor===Object,v=t=>typeof t=="string",Ie=t=>typeof t=="number",P=t=>typeof t=="function",Uf=t=>t===!0||t===!1,Vf=t=>t===null,D=t=>Array.isArray(t),zf=t=>t instanceof Date,q=t=>t===null?!1:typeof t=="object",It=t=>t!==void 0,Bt=t=>t===void 0,ua={boolean:Uf,array:D,object:E,string:v,date:zf,number:Ie,null:Vf,function:P,objectLike:q,node:En,htmlElement:la,defined:It},ae=t=>(...e)=>e.some(n=>ua[n](t)),Sg=t=>(...e)=>!e.some(n=>ua[n](t))});var xg,kg,vg,Eg,cs,da,Ag,Cg,pa,Tg,Og,Rg,Pg,Lg,Dg,Ig,ls,ha,fs=L(()=>{"use strict";dn();Ut();xg=(t,e)=>e.every(n=>t.includes(n)),kg=(t,e)=>{let n=0;for(let r=0;r<t.length;r++)t[r]===e&&n++;return n},vg=(t,e)=>{if(v(e)&&(e=parseInt(e)),Ie(e)){if(e<0||e>=t.length||isNaN(e))throw new Error("Invalid index");t.splice(e,1)}else throw new Error("Invalid index");return t},Eg=(t,e,n)=>{e<0||n<0||e>=t.length||n>=t.length||([t[e],t[n]]=[t[n],t[e]])},cs=(...t)=>[].concat(...t),da=(t,e=[])=>t.reduce((n,r)=>ft(n,ut(r,{exclude:e}),e),{}),Ag=(t,e)=>{let n=t.indexOf(e);return n!==-1?t.slice(0,n):t},Cg=(t,e)=>{if(!D(t))return;let n=t.indexOf(e);return n!==-1?t.slice(n+1):t},pa=(t,e)=>{let n=t.indexOf(e);if(n>-1){let r=[...t];return r.splice(n,1),r}return t},Tg=(t,e)=>t.filter(n=>n!==e),Og=(t,e)=>{let n=[];for(let r=0;r<t.length;r++)n.push(t[r]),r<t.length-1&&n.push(e);return n},Rg=(t,e,n)=>{let r=[...t],o=r.indexOf(e),s=r.indexOf(n);if(o!==-1&&s!==-1){let i=r.splice(o,1)[0],a=s<o?s:s+1;r.splice(a,0,i)}return r},Pg=(t,e)=>{if(t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0},Lg=(t,e)=>t.filter(n=>!e.includes(n)),Dg=(t,e)=>{let n=new Set(e);return t.filter(r=>!n.has(r))},Ig=(t,e)=>{if(!t)return 0;let n=0;for(let r=0;r<e.length;r++)t.includes(e[r])&&n++;return n},ls=t=>D(t)?[...new Set(t)]:t,ha=(t,e)=>{for(let n in e)Object.defineProperty(t,n,{value:e[n],enumerable:!1,configurable:!0,writable:!0})}});function Vt(t,e,n={}){let{bracketsLength:r=2,authored:o=!1}=n,s=r===3?"{{{":"{{";if(!t.includes(s)||o!==!0&&!PI(this,t))return t;let i=RI[r],a=e||this.state||{},c=this;return t.replace(i,(l,f,u,d)=>{let p=u.trim();if(d){let g=c?.context,h=g?.functions?.[d]||g?.utils?.[d]||g?.methods?.[d]||g?.snippets?.[d]||c?.[d];if(h&&typeof h=="function")try{return String(h.call(c,p)??"")}catch{return""}return""}if(f){let g=(f.match(/\.\.\//g)||[]).length,h=a;for(let y=0;y<g;y++){if(!h||!h.parent)return"";h=h.parent}if(p==="parent")return String(h.value??"");let m=ga(h,p);return m!=null&&typeof m=="object"?"":String(m??"")}else{let g=ga(a,p);if(g!=null&&typeof g!="object")return String(g);let h=c?.context?.polyglot;if(h?.translations){let m=a?.root?.lang||a?.lang||c?.context?.state?.lang||h.defaultLang||"en",y=h.translations[m];if(y){let b=ga(y,p);if(b!=null&&typeof b!="object")return String(b);for(let x in y){let _=y[x];if(_&&typeof _=="object"&&!Array.isArray(_)){let w=ga(_,p);if(w!=null&&typeof w!="object")return String(w)}}}let S=ga(h.translations,p);if(S!=null&&typeof S!="object")return String(S)}return""}})}var ma,$g,RI,ga,PI,Hr,Mg,LI,Ng,Fg,jg,DI,Bg,Ug,ya=L(()=>{"use strict";ma=(t,e)=>{for(let n of e)if(t.includes(n))return!0;return!1},$g=(t,e)=>{let n=new RegExp(`[${e.join("\\")}]`,"g");return t.replace(n,"")},RI={2:/{{\s*((?:\.\.\/)*)([\w\d.]+)\s*(?:\|\s*([\w\d.]+))?\s*}}/g,3:/{{{(\s*(?:\.\.\/)*)([\w\d.]+)\s*(?:\|\s*([\w\d.]+))?\s*}}}/g},ga=(t,e)=>e.split(".").reduce((n,r)=>n?.[r],t),PI=(t,e)=>{if(!t||!t.__ref)return!0;let n=t;for(;n;){if(n.allowRuntimeTemplates===!0)return!0;let r=n.__ref&&n.__ref.__authoredTemplates;if(r&&r.has(e))return!0;n=n.parent}return!1};Hr=t=>`${t.charAt(0).toLowerCase()}${t.slice(1)}`,Mg=(t,e)=>{let n=t.split(`
|
|
2
|
-
`),r=-1,o=-1,s=-1,i=-1,a=new RegExp(`\\b${e}\\b\\s*:\\s*`),c=0,l=!1;for(let f=0;f<n.length;f++)if(a.test(n[f])&&!l){if(l=!0,r=f+1,s=n[f].indexOf(e)+1,n[f].includes("{}")){o=r,i=n[f].indexOf("{}")+3;break}let u=n[f].slice(s+e.length);if(u.includes("{")||u.includes("["))c=1;else{o=f+1,i=n[f].length+1;break}}else if(l&&(c+=(n[f].match(/{/g)||[]).length,c+=(n[f].match(/\[/g)||[]).length,c-=(n[f].match(/}/g)||[]).length,c-=(n[f].match(/]/g)||[]).length,c===0)){o=f+1,i=n[f].lastIndexOf("}")!==-1?n[f].lastIndexOf("}")+2:n[f].length+1;break}return{startColumn:s,endColumn:i,startLineNumber:r,endLineNumber:o}},
|
|
3
|
-
`).replace(/\/\/\/\/\/tilde/g,"`").replace(/\/\/\/\/\/dlrsgn/g,"$"),
|
|
1
|
+
"use strict";var aI=Object.create;var Tf=Object.defineProperty;var cI=Object.getOwnPropertyDescriptor;var lI=Object.getOwnPropertyNames;var fI=Object.getPrototypeOf,uI=Object.prototype.hasOwnProperty;var L=(t,e,n)=>()=>{if(n)throw n[0];try{return t&&(e=t(t=0)),e}catch(r){throw n=[r],r}};var Qh=(t,e)=>()=>{try{return e||t((e={exports:{}}).exports,e),e.exports}catch(n){throw e=0,n}},F=(t,e)=>{for(var n in e)Tf(t,n,{get:e[n],enumerable:!0})},Y0=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of lI(e))!uI.call(t,o)&&o!==n&&Tf(t,o,{get:()=>e[o],enumerable:!(r=cI(e,o))||r.enumerable});return t};var dI=(t,e,n)=>(n=t!=null?aI(fI(t)):{},Y0(e||!t||!t.__esModule?Tf(n,"default",{value:t,enumerable:!0}):n,t)),pI=t=>Y0(Tf({},"__esModule",{value:!0}),t);var sg={};F(sg,{WRITE_JOURNAL:()=>na,batch:()=>sa,createComputed:()=>gI,createEffect:()=>mI,createSignal:()=>fn,getObserver:()=>ng,journalWrite:()=>oa,setObserver:()=>hI,settled:()=>og});function fn(t){let e=new Set;function n(){return se&&(e.add(se),se._sources.add(s)),t}function r(i){i!==t&&(t=i,kI(e))}function o(){return t}let s={get:n,set:r,peek:o,_subscribers:e,_type:"signal"};return s}function gI(t){let e,n=!0,r=new Set,o={_sources:new Set,_type:"computed",_subscribers:r,_execute(){eg(o);let s=se;se=o;try{e=t(),n=!1}finally{se=s}},_notify(){n=!0,r.size>0&&J0(r)},get(){return se&&(r.add(se),se._sources.add(o)),n&&o._execute(),e},peek(){return n&&o._execute(),e}};return o._execute(),o}function oa(t){na.push(t),na.length>32&&na.shift()}function mI(t,e){let n=e?.depth??0,r={_sources:new Set,_type:"effect",_depth:n,_label:e?.label,_disposed:!1,_subscribers:new Set,_execute(){if(r._disposed)return;eg(r);let o=se;se=r;try{t()}catch(s){console.error("[smbls] effect error:",s)}finally{se=o}},_notify(){r._disposed||(ta>0?ea.push(r):Of>0?Jh.push(r):rg(r))},dispose(){r._disposed=!0,eg(r)}};return r._execute(),r}function sa(t){ta++;try{t()}finally{ta--,ta===0&&xI()}}function Z0(){return typeof performance<"u"?performance.now():Date.now()}function rg(t){De.add(t),!Pf&&(Rf||(Rf=!0,queueMicrotask(Q0)))}function wI(){if(De.size===1){let[e]=De;return De.clear(),e._disposed?0:(e._execute(),1)}rs.length=0;for(let e of De)rs.push(e);De.clear(),rs.sort((e,n)=>e._depth-n._depth);let t=0;for(let e=0;e<rs.length;e++){let n=rs[e];n._disposed||(n._execute(),t++)}return rs.length=0,t}function Q0(t=0,e=0){if(Rf=!1,De.size===0){ra.length&&tg();return}Pf=!0;let n=Z0(),r=!1;try{for(;De.size>0;){if(++t>X0){let o=new Map;for(let c of De){let l=c._label;if(typeof l=="function")try{l=l()}catch{l="<label error>"}if(l=l||"<unlabeled>",o.set(l,(o.get(l)||0)+1),o.size>=12)break}let s=[...o.entries()].map(([c,l])=>l>1?`${c} \xD7${l}`:c).join(", "),i=new Map;for(let c of na)i.set(c,(i.get(c)||0)+1);let a=[...i.entries()].map(([c,l])=>l>1?`${c} \xD7${l}`:c).join(", ");console.error("[smbls] reactive effect cascade exceeded",X0,"passes in a single flush \u2014 breaking to avoid hanging the thread.","This usually means an effect (or an onUpdate/subscribeTo handler","it calls into) unconditionally writes back a signal it depends on.","Still queued at break (the loop participants):",s||"<queue empty>","\u2014 last notifying store writes:",a||"<none recorded>"),De.clear();break}if(e+=wI(),De.size>0&&(e>=bI||t>=_I)&&Z0()-n>yI){r=!0,setTimeout(()=>Q0(t,e),0);break}}}finally{r||(Pf=!1,ra.length&&tg())}}function SI(){return De.size===0&&!Rf&&!Pf&&ea.length===0&&ta===0}function tg(){if(ra.length===0||!SI())return;let t=ra.splice(0);for(let e=0;e<t.length;e++)t[e]()}function og(){return new Promise(t=>{ra.push(t),queueMicrotask(tg)})}function xI(){for(let t=0;t<ea.length;t++)rg(ea[t]);ea.length=0}function J0(t){Of++;try{for(let e of t)e._notify()}finally{if(Of--,Of===0&&Jh.length>0){let e=Jh.splice(0);for(let n=0;n<e.length;n++)rg(e[n])}}}function kI(t){J0(t)}function eg(t){for(let e of t._sources)e._subscribers.delete(t);t._sources.clear()}var se,ta,ea,ng,hI,Of,Jh,De,Rf,na,Pf,X0,yI,bI,_I,rs,ra,ig=L(()=>{se=null,ta=0,ea=[],ng=()=>se,hI=t=>{se=t},Of=0,Jh=[];De=new Set,Rf=!1,na=[];Pf=!1,X0=1e3,yI=8,bI=256,_I=4;rs=[];ra=[]});var pg={};F(pg,{RESERVED_STORE_METHODS:()=>ia,STORE_METHOD_NAMES:()=>dg,__resetStateShadowWarnings:()=>vI,createScopeStore:()=>TI,createStore:()=>Lf,getSignals:()=>CI,isStore:()=>AI,warnStateKeyShadowsMethod:()=>ug});function ug(t,e){let n=(e||"")+"::"+t;if(fg.has(n))return;fg.add(n);let r=e?`state.${e}`:"state",o=`[smbls/state] "${t}" is a reserved store-method name and was written as DATA at ${r}.${t}. The value is preserved and readable \u2014 data wins over the method \u2014 but "${r}.${t}(\u2026)" no longer reaches the store method on this node. Use "${r}.$${t}(\u2026)" for the method, or rename the data key. Reserved: ${dg.join(", ")}.`;typeof console<"u"&&console.warn&&console.warn(o)}function vI(){fg.clear()}function $f(t,e,n){if(t===e)return!0;if(n>EI)return!1;if(Array.isArray(t)||Array.isArray(e)){if(!Array.isArray(t)||!Array.isArray(e)||t.length!==e.length)return!1;for(let r=0;r<t.length;r++)if(!$f(t[r],e[r],n+1))return!1;return!0}if(If(t)&&If(e)){let r=Object.keys(t),o=Object.keys(e);if(r.length!==o.length)return!1;for(let s of r)if(!Object.prototype.hasOwnProperty.call(e,s)||!$f(t[s],e[s],n+1))return!1;return!0}return!1}function Lf(t,e,n,r){n===void 0&&(n=0),r===void 0&&(r="");let o={},s={},i=S=>Object.prototype.hasOwnProperty.call(o,S)&&Object.prototype.hasOwnProperty.call(s,S),a=S=>{if(!r||!e||typeof e.isDataOnlyKey!="function")return!1;let _=r.indexOf(".");return!!e.isDataOnlyKey(_===-1?r:r.slice(0,_),S)},c=e&&e.maxDepth||8;if(t&&typeof t=="object")for(let S in t){if(S==="__proto__"||!Object.prototype.hasOwnProperty.call(t,S))continue;if(S.startsWith("__")){s[S]=t[S];continue}ia.has(S)&&!a(S)&&ug(S,r);let _=t[S];n<c&&_&&typeof _=="object"&&!cg(_)?(s[S]=_,o[S]=fn(Lf(_,e,n+1,ag(r,S)))):(s[S]=_,o[S]=fn(_))}let l=new Proxy(s,{get(S,_){if(_===un)return!0;if(_===Df)return o;if(_==="__raw")return S;if(_==="$update")return u;if(_==="$parse")return g;if(_==="$clean")return h;if(_==="$keys")return m;if(_==="$values")return y;if(_==="$replace")return w;if(_==="$add")return b;if(_==="$remove")return x;if(_==="$destroy")return k;if(_==="$quietUpdate")return d;if(_==="$settled")return p;if(ia.has(_)&&!Object.prototype.hasOwnProperty.call(o,_))switch(_){case"update":return u;case"parse":return g;case"clean":return h;case"keys":return m;case"values":return y;case"replace":return w;case"add":return b;case"remove":return x;case"destroy":return k;case"quietUpdate":return d}if(_==="__element")return S.__element;if(_==="parent")return S.parent;if(_==="root")return S.root;if(Object.prototype.hasOwnProperty.call(o,_)){let C=o[_].get();if(C!==void 0||!(_!=="root"&&S.root&&S.root!==l))return C}if(S[_]!==void 0)return S[_];let E=typeof _=="string"&&!_.startsWith("__")&&_!=="then"&&_!=="constructor"&&ng()!=null;if(_!=="root"&&S.root&&S.root!==l){let C=S.root[_];return E&&!Object.prototype.hasOwnProperty.call(o,_)&&(o[_]=fn(void 0),o[_].get()),C}if(E)return o[_]=fn(void 0),o[_].get()},set(S,_,E){if(_==="__proto__")return!1;if(_==="__element"||_==="parent"||_==="root"||typeof _=="string"&&_.startsWith("__")&&!Object.prototype.hasOwnProperty.call(o,_))return S[_]=E,!0;ia.has(_)&&!a(_)&&ug(_,r);let C=ag(r,_);if(Object.prototype.hasOwnProperty.call(o,_))if(E&&typeof E=="object"&&!cg(E)){if(E===S[_])return!0;let $=o[_].peek(),M=$&&$[un]?$.$parse():$;if($f(E,M,0))return!0;S[_]=E,oa(C),o[_].set(Lf(E,e,n+1,C))}else{if(Array.isArray(E)&&E!==S[_]&&Array.isArray(o[_].peek())&&$f(E,o[_].peek(),0))return!0;o[_].peek()!==E&&oa(C),S[_]=E,o[_].set(E)}else S[_]=E,E&&typeof E=="object"&&!cg(E)?o[_]=fn(Lf(E,e,n+1,C)):o[_]=fn(E);return!0},has(S,_){return typeof _=="string"&&_.charCodeAt(0)===36&&ia.has(_.slice(1))?!0:_ in S},ownKeys(S){return Object.keys(o).filter(i)},getOwnPropertyDescriptor(S,_){return i(_)?{enumerable:!0,configurable:!0,value:o[_].peek()}:Object.getOwnPropertyDescriptor(S,_)},deleteProperty(S,_){return o[_]&&(o[_].peek()!==void 0&&oa(ag(r,_)),o[_].set(void 0),delete o[_]),delete S[_],!0}});function f(S,_){let E=s.__element;return!E||typeof E.onBeforeStateUpdate!="function"||_?.preventBeforeStateUpdateListener?!0:E.onBeforeStateUpdate(E,l,E.context,{changes:S,options:_})!==!1}function u(S,_){if(S&&typeof S=="object"&&!f(S,_))return l;sa(()=>{for(let C in S)C!=="__proto__"&&(l[C]=S[C])});let E=s.__element;return E&&E.onUpdate&&!_?.quiet&&E.onUpdate(E,l,E.context),l}function d(S){return u(S,{quiet:!0})}function p(){return og().then(()=>l)}function g(S){if(S||(S=new Set),S.has(l))return"[Circular]";S.add(l);let _={};for(let E in o){if(E==="parent"||E==="root"||E.startsWith("__")||!Object.prototype.hasOwnProperty.call(s,E))continue;let C=o[E].peek();C&&C[un]?_[E]=C.$parse(S):_[E]=C}return _}function h(){return sa(()=>{for(let S in o)delete l[S]}),l}function m(){return Object.keys(o).filter(i)}function y(){return Object.keys(o).filter(i).map(S=>o[S].peek())}function w(S,_){return S&&typeof S=="object"&&!f(S,_)||sa(()=>{for(let E in o)E in S||delete l[E];for(let E in S)E!=="__proto__"&&(l[E]=S[E])}),l}function b(S,_){let E=Object.prototype.hasOwnProperty.call(o,S)?o[S].peek():s[S];if(Array.isArray(E))return l[S]=[...E,_],l;if(E&&typeof E=="object"&&!Array.isArray(E)){if(If(_))E[un]?E.$update(_):l[S]={...E,..._};else{let C=String(Object.keys(E).length);E[un]?E.$update({[C]:_}):l[S]={...E,[C]:_}}return l}return l[S]=_,l}function x(S){return delete l[S],l}function k(){h(),s.__element=null,s.parent=null}return l}function AI(t){return t&&t[un]===!0}function CI(t){return t[Df]}function TI(t,e){let n={},r={};if(t&&typeof t=="object")for(let i in t)r[i]=t[i],n[i]=fn(t[i]);let o=i=>{if(Object.prototype.hasOwnProperty.call(n,i))return n;let a=e;for(;a;){let c=a[Df];if(c&&Object.prototype.hasOwnProperty.call(c,i))return c;a=a[un]?a[lg]:null}return null};return new Proxy(r,{get(i,a){return a===un?!0:a===Df?n:a===lg?e:a==="__raw"?i:Object.prototype.hasOwnProperty.call(n,a)?n[a].get():e&&a!=="then"&&a!=="constructor"?e[a]:i[a]},set(i,a,c){let l=o(a);return l?(l===n&&(i[a]=c),l[a].set(c),!0):(i[a]=c,n[a]=fn(c),!0)},has(i,a){if(a in n||a in i)return!0;let c=e;for(;c;){if(a in c)return!0;c=c[un]?c[lg]:null}return!1},ownKeys(){return Object.keys(n)},getOwnPropertyDescriptor(i,a){return a in n?{enumerable:!0,configurable:!0,value:n[a].peek()}:Object.getOwnPropertyDescriptor(i,a)}})}var un,Df,dg,ia,fg,ag,cg,EI,If,lg,tk=L(()=>{ig();un=Symbol("store"),Df=Symbol("signals"),dg=["update","parse","clean","keys","values","replace","add","remove","destroy","quietUpdate"],ia=new Set(dg),fg=new Set,ag=(t,e)=>t?t+"."+e:String(e);cg=t=>!t||typeof t!="object"||Array.isArray(t)||t[un]||Object.isFrozen(t)||typeof Node<"u"&&t instanceof Node||t.__ref||t.nodeType||t.nodeName||!If(t),EI=12,If=t=>{if(!t||typeof t!="object")return!1;let e=Object.getPrototypeOf(t);return e===Object.prototype||e===null};lg=Symbol("scope.parent")});var Vr,Mf=L(()=>{Vr="3.14.786"});var os,ss,hg,gg=L(()=>{Mf();os="__SMBLS_SIGNAL_INSTANCES__",ss=(t,e,n)=>{let r=e||(typeof globalThis<"u"?globalThis:null);if(!r)return null;let o=r[os]||(r[os]={versions:[],engines:0,reported:!1});return typeof o.engines!="number"&&(o.engines=o.versions.length),o.versions.push(t||Vr),n||o.engines++,o.engines>1&&!o.reported&&(o.reported=!0,console.error("[smbls] duplicate @symbo.ls/signal instance \u2014",o.engines,"copies of the reactive engine are loaded on this page:",o.versions.join(", ")+".","Each copy keeps its own observer and effect queue, so an effect created","by one copy never re-fires from another copy's store writes, and one","copy's cascade breaker cannot see the other's queue.","Copies of the SAME version adopt a single engine automatically, so","this means the versions above DIFFER: a fossil copy is resolving beside","the current one. That is a dependency-graph fault, not an application","bug \u2014 align the version wherever @symbo.ls/signal is imported, then","regenerate the lockfile so exactly one version resolves.")),o},hg=t=>{let e=t||(typeof globalThis<"u"?globalThis:null);e&&delete e[os]}});var is,ek,mg,nk=L(()=>{Mf();gg();is="__SMBLS_SIGNAL_ENGINE__",ek=(t,e,n)=>{let r=e||Vr,o=n||(typeof globalThis<"u"?globalThis:null);if(!o)return t;let s=o[is];return s&&s.engine&&s.version===r?(ss(r,o,!0),s.engine):(s||(o[is]={version:r,engine:t}),ss(r,o,!1),t)},mg=t=>{let e=t||(typeof globalThis<"u"?globalThis:null);e&&delete e[is]}});var Xt,zr,rk,K,Nf,Qt,Dt,Ff,xn,jf,_t,ok,sk,ik,Bf,ak,ck,lk=L(()=>{ig();tk();nk();Mf();gg();Xt=ek({...sg,...pg,VERSION:Vr},Vr),zr=Xt.createSignal,rk=Xt.createComputed,K=Xt.createEffect,Nf=Xt.batch,Qt=Xt.getObserver,Dt=Xt.setObserver,Ff=Xt.settled||(()=>Promise.resolve()),xn=Xt.createStore,jf=Xt.createScopeStore,_t=Xt.isStore,ok=Xt.getSignals,sk=Xt.STORE_METHOD_NAMES,ik=Xt.RESERVED_STORE_METHODS,Bf=Xt.warnStateKeyShadowsMethod,ak=Xt.__resetStateShadowWarnings,ck=Xt.VERSION});var yg={};F(yg,{RESERVED_STORE_METHODS:()=>ik,SIGNAL_ENGINE_KEY:()=>is,SIGNAL_INSTANCES_KEY:()=>os,STORE_METHOD_NAMES:()=>sk,VERSION:()=>ck,__resetSignalEngine:()=>mg,__resetSignalInstances:()=>hg,__resetStateShadowWarnings:()=>ak,batch:()=>Nf,createComputed:()=>rk,createEffect:()=>K,createScopeStore:()=>jf,createSignal:()=>zr,createStore:()=>xn,getObserver:()=>Qt,getSignals:()=>ok,isStore:()=>_t,registerSignalInstance:()=>ss,setObserver:()=>Dt,settled:()=>Ff,warnStateKeyShadowsMethod:()=>Bf});var Kt=L(()=>{lk()});var _g,wg,T,dt,ca=L(()=>{"use strict";_g=globalThis,wg=globalThis,T=globalThis,dt=T.document});var En,la,ie,fa=L(()=>{"use strict";ca();En=t=>(typeof Node=="object"?t instanceof T.Node:t&&typeof t=="object"&&typeof t.nodeType=="number"&&typeof t.nodeName=="string")||!1,la=t=>(typeof HTMLElement=="object"?t instanceof T.HTMLElement:t&&typeof t=="object"&&t!==null&&t.nodeType===1&&typeof t.nodeName=="string")||!1,ie=t=>typeof T<"u"&&(T.Node&&t instanceof T.Node||T.Window&&t instanceof T.Window||t===T||dt!==void 0&&t===dt)});var A,v,Ie,P,Uf,Vf,D,zf,q,It,Bt,ua,ae,Sg,Ut=L(()=>{"use strict";fa();A=t=>t===null?!1:typeof t=="object"&&t.constructor===Object,v=t=>typeof t=="string",Ie=t=>typeof t=="number",P=t=>typeof t=="function",Uf=t=>t===!0||t===!1,Vf=t=>t===null,D=t=>Array.isArray(t),zf=t=>t instanceof Date,q=t=>t===null?!1:typeof t=="object",It=t=>t!==void 0,Bt=t=>t===void 0,ua={boolean:Uf,array:D,object:A,string:v,date:zf,number:Ie,null:Vf,function:P,objectLike:q,node:En,htmlElement:la,defined:It},ae=t=>(...e)=>e.some(n=>ua[n](t)),Sg=t=>(...e)=>!e.some(n=>ua[n](t))});var xg,kg,vg,Eg,ls,da,Ag,Cg,pa,Tg,Og,Rg,Pg,Lg,Dg,Ig,fs,ha,us=L(()=>{"use strict";dn();Ut();xg=(t,e)=>e.every(n=>t.includes(n)),kg=(t,e)=>{let n=0;for(let r=0;r<t.length;r++)t[r]===e&&n++;return n},vg=(t,e)=>{if(v(e)&&(e=parseInt(e)),Ie(e)){if(e<0||e>=t.length||isNaN(e))throw new Error("Invalid index");t.splice(e,1)}else throw new Error("Invalid index");return t},Eg=(t,e,n)=>{e<0||n<0||e>=t.length||n>=t.length||([t[e],t[n]]=[t[n],t[e]])},ls=(...t)=>[].concat(...t),da=(t,e=[])=>t.reduce((n,r)=>ft(n,ut(r,{exclude:e}),e),{}),Ag=(t,e)=>{let n=t.indexOf(e);return n!==-1?t.slice(0,n):t},Cg=(t,e)=>{if(!D(t))return;let n=t.indexOf(e);return n!==-1?t.slice(n+1):t},pa=(t,e)=>{let n=t.indexOf(e);if(n>-1){let r=[...t];return r.splice(n,1),r}return t},Tg=(t,e)=>t.filter(n=>n!==e),Og=(t,e)=>{let n=[];for(let r=0;r<t.length;r++)n.push(t[r]),r<t.length-1&&n.push(e);return n},Rg=(t,e,n)=>{let r=[...t],o=r.indexOf(e),s=r.indexOf(n);if(o!==-1&&s!==-1){let i=r.splice(o,1)[0],a=s<o?s:s+1;r.splice(a,0,i)}return r},Pg=(t,e)=>{if(t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0},Lg=(t,e)=>t.filter(n=>!e.includes(n)),Dg=(t,e)=>{let n=new Set(e);return t.filter(r=>!n.has(r))},Ig=(t,e)=>{if(!t)return 0;let n=0;for(let r=0;r<e.length;r++)t.includes(e[r])&&n++;return n},fs=t=>D(t)?[...new Set(t)]:t,ha=(t,e)=>{for(let n in e)Object.defineProperty(t,n,{value:e[n],enumerable:!1,configurable:!0,writable:!0})}});function Vt(t,e,n={}){let{bracketsLength:r=2,authored:o=!1}=n,s=r===3?"{{{":"{{";if(!t.includes(s)||o!==!0&&!LI(this,t))return t;let i=PI[r],a=e||this.state||{},c=this;return t.replace(i,(l,f,u,d)=>{let p=u.trim();if(d){let g=c?.context,h=g?.functions?.[d]||g?.utils?.[d]||g?.methods?.[d]||g?.snippets?.[d]||c?.[d];if(h&&typeof h=="function")try{return String(h.call(c,p)??"")}catch{return""}return""}if(f){let g=(f.match(/\.\.\//g)||[]).length,h=a;for(let y=0;y<g;y++){if(!h||!h.parent)return"";h=h.parent}if(p==="parent")return String(h.value??"");let m=ga(h,p);return m!=null&&typeof m=="object"?"":String(m??"")}else{let g=ga(a,p);if(g!=null&&typeof g!="object")return String(g);let h=c?.context?.polyglot;if(h?.translations){let m=a?.root?.lang||a?.lang||c?.context?.state?.lang||h.defaultLang||"en",y=h.translations[m];if(y){let b=ga(y,p);if(b!=null&&typeof b!="object")return String(b);for(let x in y){let k=y[x];if(k&&typeof k=="object"&&!Array.isArray(k)){let S=ga(k,p);if(S!=null&&typeof S!="object")return String(S)}}}let w=ga(h.translations,p);if(w!=null&&typeof w!="object")return String(w)}return""}})}var ma,$g,PI,ga,LI,Wr,Mg,DI,Ng,Fg,jg,II,Bg,Ug,ya=L(()=>{"use strict";ma=(t,e)=>{for(let n of e)if(t.includes(n))return!0;return!1},$g=(t,e)=>{let n=new RegExp(`[${e.join("\\")}]`,"g");return t.replace(n,"")},PI={2:/{{\s*((?:\.\.\/)*)([\w\d.]+)\s*(?:\|\s*([\w\d.]+))?\s*}}/g,3:/{{{(\s*(?:\.\.\/)*)([\w\d.]+)\s*(?:\|\s*([\w\d.]+))?\s*}}}/g},ga=(t,e)=>e.split(".").reduce((n,r)=>n?.[r],t),LI=(t,e)=>{if(!t||!t.__ref)return!0;let n=t;for(;n;){if(n.allowRuntimeTemplates===!0)return!0;let r=n.__ref&&n.__ref.__authoredTemplates;if(r&&r.has(e))return!0;n=n.parent}return!1};Wr=t=>`${t.charAt(0).toLowerCase()}${t.slice(1)}`,Mg=(t,e)=>{let n=t.split(`
|
|
2
|
+
`),r=-1,o=-1,s=-1,i=-1,a=new RegExp(`\\b${e}\\b\\s*:\\s*`),c=0,l=!1;for(let f=0;f<n.length;f++)if(a.test(n[f])&&!l){if(l=!0,r=f+1,s=n[f].indexOf(e)+1,n[f].includes("{}")){o=r,i=n[f].indexOf("{}")+3;break}let u=n[f].slice(s+e.length);if(u.includes("{")||u.includes("["))c=1;else{o=f+1,i=n[f].length+1;break}}else if(l&&(c+=(n[f].match(/{/g)||[]).length,c+=(n[f].match(/\[/g)||[]).length,c-=(n[f].match(/}/g)||[]).length,c-=(n[f].match(/]/g)||[]).length,c===0)){o=f+1,i=n[f].lastIndexOf("}")!==-1?n[f].lastIndexOf("}")+2:n[f].length+1;break}return{startColumn:s,endColumn:i,startLineNumber:r,endLineNumber:o}},DI=/\\([0-7]{1,3})/g,Ng=t=>t.replace(DI,(e,n)=>String.fromCharCode(parseInt(n,8))),Fg=t=>t.replace(/\n/g,"/////n").replace(/`/g,"/////tilde").replace(/\$/g,"/////dlrsgn"),jg=t=>t.replace(/\/\/\/\/\/n/g,`
|
|
3
|
+
`).replace(/\/\/\/\/\/tilde/g,"`").replace(/\/\/\/\/\/dlrsgn/g,"$"),II=/[^a-zA-Z0-9\s]/g,Bg=t=>t.replace(II,e=>"%"+e.charCodeAt(0).toString(16).toUpperCase()),Ug=t=>t.replace(/%[0-9A-Fa-f]{2}/g,e=>String.fromCharCode(parseInt(e.slice(1),16)))});var sr,ba,Vg,qr,ir,ar,zg,ds,Kr,_a,Hg,Gr=L(()=>{"use strict";sr=new Set(["attr","style","text","html","content","data","classlist","state","scope","root","deps","extend","extends","$router","routes","children","childExtend","childExtends","childExtendRecursive","childExtendsRecursive","props","if","define","__name","__ref","__hash","__text","key","tag","query","parent","node","variables","on","fetch","component","context","preventContentUpdate","preventContentRecreate"]),ba=new Set(["attr","style","text","html","content","data","class","state","scope","children","props","if","key","tag","query","on","context"]),Vg=["ref","parent","__element","__depends","__ref","__children","root"],qr=new Set(["update","parse","clean","create","destroy","add","toggle","remove","apply","set","reset","replace","quietReplace","quietUpdate","applyReplace","applyFunction","keys","values","ref","rootUpdate","parentUpdate","parent","__element","__depends","__ref","__children","root","setByPath","setPathCollection","removeByPath","removePathCollection","getByPath"]),ir=new Set(["update","__element"]),ar=new Set(["set","reset","update","remove","updateContent","removeContent","lookup","lookdown","lookdownAll","getRef","getPath","setNodeStyles","spotByPath","keys","parse","setProps","parseDeep","variables","if","log","verbose","warn","error","call","nextElement","previousElement","getRootState","getRoot","getRootData","getRootContext","getContext","getQuery","getDB","getChildren","preventContentUpdate","preventContentRecreate"]),zg=t=>ar.has(t),ds=new Set(["log","warn","error","verbose"]),Kr=t=>ar.has(t)&&!ds.has(t),_a=new Set(["node","context","extends","__element","__ref",...ar,...qr,...ir]),Hg=new Set(["init","beforeClassAssign","render","renderRouter","attachNode","stateInit","stateCreated","beforeStateUpdate","stateUpdate","beforeUpdate","done","create","complete","frame","update","fetchError","fetchComplete"])});var $I,fk,MI,Wg,NI,FI,jI,ps,BI,wa,qg=L(()=>{"use strict";$I=["$R?.scope ?? $R?.context?.globalScope ?? {}","(() => { const s = $R?.scope; const g = $R?.context?.globalScope; if (s && g && Object.getPrototypeOf(s) !== g) Object.setPrototypeOf(s, g); return s ?? g ?? {}; })()","(() => { const s = $R?.scope; const g = $R?.context?.globalScope; if (s && g && s !== g && Object.getPrototypeOf(s) !== g) Object.setPrototypeOf(s, g); return s ?? g ?? {}; })()","(() => { const s = $R?.scope; const g = $R?.context?.globalScope; if (s && g && s !== g && Object.getPrototypeOf(s) !== g) { try { Object.setPrototypeOf(s, g) } catch (_) {} } return s ?? g ?? {}; })()","(() => { const s = $R?.scope; const g = $R?.context?.globalScope; if (s && g && s !== g && Object.getPrototypeOf(s) !== g) { let __p = g, __cyc = false; while (__p) { if (__p === s) { __cyc = true; break } __p = Object.getPrototypeOf(__p) } if (!__cyc) { try { Object.setPrototypeOf(s, g) } catch (_) {} } } return s ?? g ?? {}; })()","(() => { const r = $R; const s = r?.scope; const g = r?.context?.globalScope; if (s && g && s !== g && Object.getPrototypeOf(s) !== g) { let __p = g, __cyc = false; while (__p) { if (__p === s) { __cyc = true; break } __p = Object.getPrototypeOf(__p) } if (!__cyc) { try { Object.setPrototypeOf(s, g) } catch (_) {} } } return s ?? g ?? (r && typeof r === 'object' && r !== globalThis ? r : {}); })()"],fk=(t,e)=>t.split("$R").join(e),MI=$I.map(t=>[fk(t,"this"),t]),Wg="const __scope = ",NI=/^\(globalThis\[Symbol\.for\('smbls\.libraryScope'\)\] \|\| \(\(_, v\) => v\)\)\("(?:[^"\\]|\\.)*", /,FI=/^\s*(?:async\s*)?(?:\(([^()[\]{}'"`/]*)\)|([A-Za-z_$][\w$]*))\s*=>\s*\{\s*/,jI=/^[A-Za-z_$][\w$]*$/,ps=(t,e)=>typeof t=="string"&&new RegExp("^"+e+"\\d*$").test(t),BI=t=>t.length>=2&&ps(t[0],"el")?t[0]:t.length>=2&&ps(t[1],"el")?t[1]:t.length>=1&&ps(t[0],"el")||ps(t[0],"element")||ps(t[0],"node")?t[0]:t.find(e=>ps(e,"element"))||null,wa=t=>{if(typeof t!="string"||t.indexOf(Wg)===-1||t.indexOf("this")===-1)return t;let e=FI.exec(t);if(!e)return t;let n=e[0].length;if(!t.startsWith(Wg,n))return t;n+=Wg.length;let r=NI.exec(t.slice(n,n+400));r&&(n+=r[0].length);let o=MI.find(([l])=>t.startsWith(l,n));if(!o)return t;let s=n+o[0].length;if(t[s]!==(r?")":";"))return t;let a=(e[1]!==void 0?e[1]:e[2]).split(",").map(l=>l.split("=")[0].trim()).filter(Boolean);if(a.some(l=>!jI.test(l)))return t;let c=BI(a);return c?t.slice(0,n)+fk(o[1],c)+t.slice(s):t}});function e$(){let t=Yr.get(this);return t?t.src.trim():Function.prototype.toString.call(this)}var uk,Xr,pt,Gg,xt,ft,_k,Yg,ut,xa,UI,VI,dk,ka,zI,HI,WI,Jt,wk,qI,Hf,Sk,Kg,Yr,KI,GI,YI,XI,ZI,pk,QI,hk,JI,gk,Wf,t$,n$,r$,o$,mk,Xg,te,Zr,s$,i$,ce,xk,kk,vk,Ek,Ak,Ck,Tk,va,Ea,hs,Qr,yk,Sa,bk,Jr,Zg,Qg,qf,Jg,tm,Aa,to,ee,Kf,a$,em,nm,Gf,rm,om,sm,im,am,cm,lm,dn=L(()=>{"use strict";ca();Ut();us();ya();fa();Gr();qg();uk="production",Xr=t=>t.charCodeAt(0)===95&&t.charCodeAt(1)===95,pt=(t,e,n,r)=>{if(P(t))return e?typeof t.call!="function"?t:t.call(e,e,n||e.state,r||e.context):void 0;if(t!=null&&e?.context?.plugins&&(D(t)||A(t)&&!ie(t))){let o=e.context.plugins;for(let s of o)if(s.resolveHandler){let i=s.resolveHandler(t,e);if(typeof i=="function")return pt(i,e,n,r)}}return t},Gg=(t,e,n)=>{for(let r in e)t[r]=pt(e[r],n)},xt=(t,e,n=[])=>{let r=n instanceof Set;for(let o in e)Object.prototype.hasOwnProperty.call(e,o)&&(Xr(o)||(r?n.has(o):n.includes(o))||t[o]===void 0&&(t[o]=e[o]));return t},ft=(t,e,n=_a)=>_k(t,e,n,null),_k=(t,e,n,r)=>{if(t===e)return t;if(r){for(let s=0;s<r.length;s+=2)if(r[s]===t&&r[s+1]===e)return t}let o=n instanceof Set;for(let s in e){if(!Object.prototype.hasOwnProperty.call(e,s)||Xr(s)||s==="constructor"||s==="prototype"||(o?n.has(s):n.includes(s)))continue;let i=t[s],a=e[s];if(q(i)&&q(a)){let c=r||[];c.push(t,e),_k(i,a,n,c),c.length-=2}else i===void 0&&(t[s]=a)}return t},Yg=(t,e=[])=>{let n=e instanceof Set,r={};for(let o in t)Object.prototype.hasOwnProperty.call(t,o)&&(Xr(o)||(n?e.has(o):e.includes(o))||(r[o]=t[o]));return r},ut=(t,e={})=>{let{exclude:n=[],cleanUndefined:r=!1,cleanNull:o=!1,visited:s=new WeakMap,handleExtends:i=!1}=e;if(!q(t)||ie(t))return t;if(s.has(t))return s.get(t);let a=n instanceof Set?n:n.length>3?new Set(n):null,c=u=>a?a.has(u):n.includes(u),l=D(t)?[]:{};s.set(t,l);let f=[[t,l]];for(;f.length;){let[u,d]=f.pop();for(let p in u){if(!Object.prototype.hasOwnProperty.call(u,p)||Xr(p)||p==="__proto__"||c(p))continue;let g=u[p];if(!(r&&g===void 0)&&!(o&&g===null)){if(ie(g)){d[p]=g;continue}if(i&&p==="extends"&&D(g)){d[p]=da(g,n);continue}if(P(g)){d[p]=g;continue}if(q(g))if(s.has(g))d[p]=s.get(g);else{let h=D(g)?[]:{};s.set(g,h),d[p]=h,f.push([g,h])}else d[p]=g}}}return l},xa=(t,e={})=>{(t.node||t.__ref||t.parent||t.__element||t.parse)&&((t.__element||t.parent?.__element).warn("Trying to clone element or state at",t),t=t.parse?.());for(let n in t){let r=t[n];if(P(r))e[n]=r.toString();else if(A(r))e[n]={},xa(r,e[n]);else if(D(r)){let o=e[n]=[];for(let s=0;s<r.length;s++){let i=r[s];A(i)?(o[s]={},xa(i,o[s])):P(i)?o[s]=i.toString():o[s]=i}}else e[n]=r}return e},UI=/^[A-Za-z_$][A-Za-z0-9_$]*$/,VI=t=>`'${String(t).replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/\r/g,"\\r").replace(/\n/g,"\\n")}'`,dk=t=>{let e=String(t);return ma(e,[`
|
|
4
4
|
`,"'"])?"`"+e.replace(/\\/g,"\\\\").replace(/`/g,"\\`").replace(/\$\{/g,"\\${")+"`":"'"+e.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/\r/g,"\\r")+"'"},ka=(t={},e=0)=>{if(t===null||typeof t!="object"||t instanceof RegExp)return String(t);let n=!1;for(let s in t){n=!0;break}if(!n)return"{}";let r=" ".repeat(e),o=`{
|
|
5
|
-
`;for(let s in t){if(!Object.prototype.hasOwnProperty.call(t,s))continue;let i=t[s],a=
|
|
5
|
+
`;for(let s in t){if(!Object.prototype.hasOwnProperty.call(t,s))continue;let i=t[s],a=UI.test(s)?s:VI(s);if(o+=`${r} ${a}: `,i instanceof RegExp)o+=String(i);else if(D(i)){o+=`[
|
|
6
6
|
`;for(let c of i)c instanceof RegExp?o+=`${r} ${String(c)},
|
|
7
7
|
`:q(c)&&c!==null?o+=`${r} ${ka(c,e+2)},
|
|
8
|
-
`:v(c)?o+=`${r} ${
|
|
8
|
+
`:v(c)?o+=`${r} ${dk(c)},
|
|
9
9
|
`:o+=`${r} ${c},
|
|
10
|
-
`;o+=`${r} ]`}else q(i)?o+=ka(i,e+1):v(i)?o+=
|
|
11
|
-
`}return o+=`${r}}`,o},
|
|
10
|
+
`;o+=`${r} ]`}else q(i)?o+=ka(i,e+1):v(i)?o+=dk(i):o+=i;o+=`,
|
|
11
|
+
`}return o+=`${r}}`,o},zI=[/^\(\s*\{[^}]*\}\s*\)\s*=>/,/^(\([^)]*\)|[^=]*)\s*=>/,/^function[\s(]/,/^async\s+/,/^\(\s*function/,/^[a-zA-Z_$][a-zA-Z0-9_$]*\s*=>/,/^(?:\*\s*)?[a-zA-Z_$][\w$]*\s*\((?:[^()]|\([^()]*\))*\)\s*\{[\s\S]*\}$/],HI=/^["[{]/,WI=/^(export|import)\s/,Jt=t=>{if(!t)return!1;let e=t.trim();if(e===""||e==="{}"||e==="[]")return!1;let n=e.includes("=>");if(!n&&e.charCodeAt(0)!==40&&!e.startsWith("function")&&!e.startsWith("async")&&!(e.charCodeAt(e.length-1)===125&&e.includes("("))||WI.test(e)||!zI.some(s=>s.test(e)))return!1;let o=e.charCodeAt(0);return!(o===123&&!n||o===91||HI.test(e)&&!n)},wk=t=>(0,eval)(t),qI=(t,e)=>{let n=/^(\s*(?:async\s+)?function\s*[\w$]*\s*\([^)]*\)\s*)\{/.exec(t);if(!n)return null;let r=n[0].length,o=[],s=r,i=1,a=null,c=t.length,l=new RegExp("^(?:const|let|var)\\s+"+e+"\\b");for(;s<c&&i>0;){let u=t[s];if(u==="/"&&t[s+1]==="/"){let d=t.indexOf(`
|
|
12
12
|
`,s);s=d===-1?c:d;continue}if(u==="/"&&t[s+1]==="*"){let d=t.indexOf("*/",s+2);s=d===-1?c:d+2;continue}if(u==='"'||u==="'"||u==="`"){let d=u;for(s++;s<c;){if(t[s]==="\\"){s+=2;continue}if(t[s]===d){s++;break}if(d==="`"&&t[s]==="$"&&t[s+1]==="{"){s+=2;let p=1;for(;s<c&&p>0;)t[s]==="{"?p++:t[s]==="}"&&p--,s++;continue}s++}continue}if(u==="{"){i++,s++;continue}if(u==="}"){i--,s++;continue}if(i===1&&l.test(t.slice(s))){let d=s,p=0,g=s;for(;g<c;){let h=t[g];if(h==='"'||h==="'"||h==="`"){let m=h;for(g++;g<c;){if(t[g]==="\\"){g+=2;continue}if(t[g]===m){g++;break}g++}continue}if(h==="("||h==="["||h==="{"){p++,g++;continue}if(h===")"||h==="]"||h==="}"){if(p===0)break;p--,g++;continue}if(p===0&&(h===";"||h===`
|
|
13
|
-
`)){g++;break}g++}o.push([d,g]),s=g;continue}s++}if(!o.length)return null;let f=t;for(let u=o.length-1;u>=0;u--)f=f.slice(0,o[u][0])+f.slice(o[u][1]);return f},Hf=(t,e,n,r)=>{let o=String(t).trimStart();if(/^(export|import)\s/.test(o))return t;t=wa(t);try{return n.window.eval(`(${t})`)}catch(s){let i=s&&s.message?s.message:String(s),a=/await is only valid in async/.test(i),c=/Identifier '([^']+)' has already been declared/.exec(i),l=null;if(a){let f=String(t).trim();if(/^function[\s(]/.test(f))try{l=n.window.eval("(async "+f+")")}catch{}}else if(c){let f=String(t),u=c[1];for(let d=0;d<5;d++){let p=
|
|
14
|
-
First 200 chars of source: `+String(t).slice(0,200)),t)}},
|
|
15
|
-
First 200 chars of source: `+String(t.src).slice(0,200))),t.fn=n,t.opts=null,n},
|
|
13
|
+
`)){g++;break}g++}o.push([d,g]),s=g;continue}s++}if(!o.length)return null;let f=t;for(let u=o.length-1;u>=0;u--)f=f.slice(0,o[u][0])+f.slice(o[u][1]);return f},Hf=(t,e,n,r)=>{let o=String(t).trimStart();if(/^(export|import)\s/.test(o))return t;t=wa(t);try{return n.window.eval(`(${t})`)}catch(s){let i=s&&s.message?s.message:String(s),a=/await is only valid in async/.test(i),c=/Identifier '([^']+)' has already been declared/.exec(i),l=null;if(a){let f=String(t).trim();if(/^function[\s(]/.test(f))try{l=n.window.eval("(async "+f+")")}catch{}}else if(c){let f=String(t),u=c[1];for(let d=0;d<5;d++){let p=qI(f,u);if(!p||p===f)break;f=p;try{l=n.window.eval("("+f+")");break}catch(g){let h=/Identifier '([^']+)' has already been declared/.exec(g&&g.message||String(g));if(!h||h[1]!==u)break}}}if(!l&&/Unexpected (token '\{'|identifier)/.test(i))try{let f=n.window.eval("({"+t+"})");if(f&&typeof f=="object"){let u=Object.keys(f);u.length===1&&typeof f[u[0]]=="function"&&(l=f[u[0]])}}catch{}return l||(typeof console<"u"&&console.warn&&console.warn(`[smbls] deepDestringifyFunctions: eval failed on ${e} \u2014 `+(r?"revived lazily, so its source compiled on this first use; it acts as the string it replaces (a call returns the source text, el.call treats it as not callable). Reason: ":"value will be left as a string. Reason: ")+i+`.
|
|
14
|
+
First 200 chars of source: `+String(t).slice(0,200)),t)}},Sk=1,Kg=2,Yr=new WeakMap,KI=/^(async\s+)?function(?![\w$])\s*(\*)?\s*([A-Za-z_$][\w$]*)?\s*\((?:[^()'"`/]|\([^()'"`/]*\))*\)\s*\{/,GI=/^(async\s+)?[A-Za-z_$][\w$]*\s*=>/,YI=/^(async\s*)?\((?:[^()'"`/]|\([^()'"`/]*\))*\)\s*=>/,XI=/^(async\s+)?([A-Za-z_$][\w$]*)\s*\((?:[^()'"`/]|\([^()'"`/]*\))*\)\s*\{/,ZI=new Set(["if","for","while","switch","catch","with","do","return","typeof","void","delete","new","in","of","instanceof","function","class","const","let","var","await","yield","import","export","try","else","throw","case","default","break","continue","debugger","finally","super","this","null","true","false","async","get","set","static"]),pk=t=>t>=48&&t<=57||t>=65&&t<=90||t>=97&&t<=122||t===36||t===95,QI=(t,e,n)=>{let r=t.indexOf(e,n);for(;r!==-1;){let o=r+e.length;if((r===0||!pk(t.charCodeAt(r-1)))&&(o>=t.length||!pk(t.charCodeAt(o))))return!0;r=t.indexOf(e,o)}return!1},hk=t=>{let e=t.length-1;for(;e>=0&&t.charCodeAt(e)<=32;)e--;return e<0?-1:t.charCodeAt(e)},JI=t=>{let e=t,n=0;for(;n<e.length&&e.charCodeAt(n)<=32;)n++;n&&(e=e.slice(n));let r=KI.exec(e);if(r){if(r[2]||hk(e)!==125)return null;let o=r[3]||"";return o&&QI(e,o,r[0].indexOf("("))||e.indexOf("arguments.callee")!==-1?null:{src:t,name:o,kind:r[1]?Kg:Sk,async:!!r[1],fn:void 0}}return r=GI.exec(e)||YI.exec(e),r?{src:t,name:"",kind:Kg,async:!!r[1],fn:void 0}:(r=XI.exec(e),r&&!ZI.has(r[2])&&hk(e)===125?e.indexOf("arguments.callee")!==-1?null:{src:t,name:r[2],kind:Kg,async:!!r[1],fn:void 0}:null)},gk=t=>t.index===-1?`"${t.key}"`:`array index ${t.index} (prop "${t.key}")`,Wf=t=>{let e=Hf(t.src,gk(t),t.opts,!0),n=null;return typeof e=="function"?n=e:(t.value=e,typeof e!="string"&&typeof console<"u"&&console.warn&&console.warn(`[smbls] deepDestringifyFunctions: ${gk(t)} did not evaluate to a function \u2014 the lazily revived function returns that value.
|
|
15
|
+
First 200 chars of source: `+String(t.src).slice(0,200))),t.fn=n,t.opts=null,n},t$=(t,e,n)=>Reflect.construct(t,e,n);n$={length:{get(){let t=Yr.get(this);if(!t)return 0;let e=t.fn===void 0?Wf(t):t.fn;return e?e.length:0},configurable:!0},name:{get(){let t=Yr.get(this);return t?t.name:""},configurable:!0},toString:{value:e$,writable:!0,configurable:!0}},r$=Object.getPrototypeOf(async function(){}),o$=t=>{let e;return t.kind===Sk?e=function(){let n=t.fn===void 0?Wf(t):t.fn;return n===null?t.value:new.target?t$(n,arguments,new.target):n.apply(this,arguments)}:e={lazy(){let n=t.fn===void 0?Wf(t):t.fn;return n===null?t.value:n.apply(this,arguments)}}.lazy,Yr.set(e,t),Object.defineProperties(e,n$),t.async&&Object.setPrototypeOf(e,r$),e},mk=(t,e,n,r)=>{let o=JI(t);return o?(o.key=e,o.index=n,o.opts=r,o$(o)):Hf(t,n===-1?`"${e}"`:`array index ${n} (prop "${e}")`,r)},Xg=t=>typeof t=="function"&&Yr.has(t),te=t=>{let e=Yr.get(t);return e?e.src.trim():Function.prototype.toString.call(t)},Zr=t=>{let e=typeof t=="function"?Yr.get(t):void 0;return e?(e.fn===void 0?Wf(e):e.fn)===null:!1},s$=new Set(["components","pages","functions","methods","snippets","app","globalScope"]),i$={window:{eval:wk}},ce=(t,e={},n=i$)=>{if(!t||typeof t!="object")return e;(!n||!n.window||typeof n.window.eval!="function")&&(n={...n,window:{eval:wk}});let r=n.lazy===!0,o=n.lazy==="context",s=(a,c,l)=>r||o&&(a===t?s$.has(c):l),i=[[t,e,r]];for(;i.length;){let[a,c,l]=i.pop();for(let f in a){if(!Object.prototype.hasOwnProperty.call(a,f))continue;let u=a[f];if(v(u))Jt(u)?c[f]=l?mk(u,f,-1,n):Hf(u,`"${f}"`,n):c[f]=u;else if(D(u)){let d=c[f]=[],p=s(a,f,l);for(let g=0;g<u.length;g++){let h=u[g];if(v(h))d.push(Jt(h)?p?mk(h,f,g,n):Hf(h,`array index ${g} (prop "${f}")`,n):h);else if(A(h)){let m=bk(h);if(m!==null)d.push(m);else{let y={};d.push(y),i.push([h,y,p])}}else d.push(h)}}else if(A(u)){let d=bk(u);if(d!==null){c[f]=d;continue}let p=c[f]&&typeof c[f]=="object"&&!D(c[f])?c[f]:c[f]={};i.push([u,p,s(a,f,l)])}else c[f]=u}}return hs(e)},xk="Set",kk="Map",vk="RegExp",Ek="WeakMap",Ak="WeakSet",Ck="String",Tk=t=>{if(!t||typeof t!="object"||t.__type!==Ck||!v(t.value))return!1;let e=Object.keys(t);return e.length===2&&e.includes("value")},va=Tk,Ea=Symbol.for("smbls.revived"),hs=t=>{if(t&&typeof t=="object")try{t[Ea]=!0}catch{}return t},Qr=t=>!!(t&&typeof t=="object"&&t[Ea]===!0),yk=t=>{let e=Object.keys(t);return e.length===1&&e[0]==="__type"},Sa=(t,e)=>{if(!t||typeof t!="object")return t;if(Tk(t))return t.value;let n=s=>Sa(s,e||(e=new WeakMap));if(t.__type===xk&&D(t.values))return new Set(t.values.map(n));if(t.__type===kk&&D(t.entries))return new Map(t.entries.map(s=>D(s)?[n(s[0]),n(s[1])]:s));if(t.__type===Ek&&yk(t))return new WeakMap;if(t.__type===Ak&&yk(t))return new WeakSet;if(t.__type===vk&&v(t.source))try{return new RegExp(t.source,v(t.flags)?t.flags:"")}catch{return t}if(e||(e=new WeakMap),e.has(t))return e.get(t);let r=!1;if(D(t)){let s=new Array(t.length);e.set(t,s);for(let i=0;i<t.length;i++)s[i]=Sa(t[i],e),s[i]!==t[i]&&(r=!0);return r||e.set(t,t),r?s:t}let o={};e.set(t,o);for(let s of Object.keys(t))o[s]=Sa(t[s],e),o[s]!==t[s]&&(r=!0);return r||e.set(t,t),r?o:t},bk=t=>{if(!t||typeof t!="object")return null;let e=t.__type;if(e!==vk&&e!==xk&&e!==kk&&e!==Ek&&e!==Ak&&e!==Ck)return null;let n=Sa(t);return n===t?null:n},Jr=t=>{if(!t||typeof t!="object")return t;let e={},n=[];for(let i of Object.keys(t)){let a=t[i];v(a)&&Jt(a)?n.push([i,a]):e[i]=Sa(a)}if(n.length===0)return e;let r=i=>/^[A-Za-z_$][\w$]*$/.test(i),o=n.filter(([i])=>r(i)),s=Object.keys(e).filter(r).map(i=>`var ${i} = __gs__[${JSON.stringify(i)}];`).join(`
|
|
16
16
|
`);try{let i=o.map(([l,f])=>`var ${l} = (${f});`).join(`
|
|
17
|
-
`),a="{ "+o.map(([l])=>`${JSON.stringify(l)}: ${l}`).join(", ")+" }",c=
|
|
17
|
+
`),a="{ "+o.map(([l])=>`${JSON.stringify(l)}: ${l}`).join(", ")+" }",c=T.eval(`(function(__gs__) { ${s}
|
|
18
18
|
${i}
|
|
19
19
|
return ${a}; })`)(e);Object.assign(e,c)}catch{for(let[a,c]of o)try{let l=Object.keys(e).filter(r).map(f=>`var ${f} = __gs__[${JSON.stringify(f)}];`).join(`
|
|
20
|
-
`);e[a]=
|
|
21
|
-
return (${c}); })`)(e)}catch{try{e[a]=C.eval(`(${c})`)}catch{e[a]=c}}}for(let[i,a]of n)if(!r(i))try{e[i]=C.eval(`(${a})`)}catch{e[i]=a}return e},Zg=(t,e={verbose:!0})=>{try{return t?C.eval("("+t+")"):{}}catch(n){e.verbose&&console.warn(n)}},Qg=(t,...e)=>Object.prototype.hasOwnProperty.call(t,...e),qf=t=>{for(let e in t)return!1;return!0},Jg=t=>E(t)&&qf(t),tm=()=>Object.create(null),Aa=(t,e,n={})=>{let r=n.exclude||[],o=n.preventUnderscore;for(let s in e)r.includes(s)||!o&&Yr(s)||s==="constructor"||s==="prototype"||e[s]!==void 0&&(t[s]=e[s]);return t},Jr=(t,e,n=[])=>{let r=n instanceof Set;for(let o in e)Yr(o)||o==="constructor"||o==="prototype"||(r?n.has(o):n.includes(o))||(t[o]=e[o]);return t},ee=(t,e,n={},r=new WeakMap)=>{if(!q(t)||!q(e)||ie(t)||ie(e))return e;if(r.has(t))return r.get(t);r.set(t,t);let o=n.exclude,s=o?o instanceof Set?o:new Set(o):null,i=!n.preventForce;for(let a in e){if(!Object.prototype.hasOwnProperty.call(e,a)||s&&s.has(a)||i&&Yr(a)||a==="constructor"||a==="prototype")continue;let c=t[a],l=e[a];ie(l)?t[a]=l:q(c)&&q(l)?t[a]=ee(c,l,n,r):l!==void 0&&(t[a]=l)}return t},Kf=(t,e,n=new Set)=>{if(typeof t!="object"||typeof e!="object"||t===null||e===null)return t===e;if(n.has(t)||n.has(e))return!0;n.add(t),n.add(e);let r=Object.keys(t),o=Object.keys(e);if(r.length!==o.length)return!1;for(let s=0;s<r.length;s++){let i=r[s];if(!Object.prototype.hasOwnProperty.call(e,i)||!Kf(t[i],e[i],n))return!1}return!0},i$=new Set(["node","__ref"]),em=(t,e,n=i$)=>{if(t===e)return!0;if(!q(t)||!q(e)||ie(t)||ie(e))return t===e;let r=n instanceof Set?n:new Set(n),o=new WeakSet;function s(i,a){if(o.has(a))return!0;o.add(a);for(let c in a){if(!Object.prototype.hasOwnProperty.call(a,c)||r.has(c))continue;if(!Object.prototype.hasOwnProperty.call(i,c))return!1;let l=a[c],f=i[c];if(ie(l)||ie(f)){if(l!==f)return!1}else if(q(l)&&q(f)){if(!s(f,l))return!1}else if(l!==f)return!1}return!0}return s(t,e)},nm=(t,e)=>{if(e==null)return t;if(ae(e)("string","number"))delete t[e];else if(D(e))for(let n=0;n<e.length;n++)delete t[e[n]];else throw new Error("Invalid input: props must be a string or an array of strings");return t},Gf=t=>{if(t===null||typeof t!="object")return t;let e=Object.create(null);for(let n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=Gf(t[n]));return e},rm=(t,e)=>{if(t.length===0)return e;let n={},r=n;for(let o=0;o<t.length;o++)o===t.length-1&&e?r[t[o]]=e:(r[t[o]]={},r=r[t[o]]);return n},om=(t,e)=>{if(!Array.isArray(e))throw new Error("Path must be an array.");let n=t;for(let o=0;o<e.length-1;o++){if(n[e[o]]===void 0)return;n=n[e[o]]}let r=e[e.length-1];n&&Object.prototype.hasOwnProperty.call(n,r)&&delete n[r]},sm=(t,e,n)=>{if(!Array.isArray(e))throw new Error("Path must be an array.");let r=t;for(let o=0;o<e.length-1;o++)(!r[e[o]]||typeof r[e[o]]!="object")&&(r[e[o]]={}),r=r[e[o]];return r[e[e.length-1]]=n,t},im=(t,e)=>{if(!Array.isArray(e))throw new Error("Path must be an array.");let n=t;for(let r=0;r<e.length;r++){if(n==null)return;n=n[e[r]]}return n},am=t=>{let n=[],r=0;for(let o=0;o<t.length;o++)if(n.length<2)n.push(t[o]);else if(t[o]===n[o%2]?r++:(n=[t[o-1],t[o]],r=1),r>=20)return(fk==="test"||fk==="development")&&console.warn("Warning: Potential infinite loop detected due to repeated sequence:",n),!0},cm=t=>{let e=new WeakSet;function n(r){if(r&&typeof r=="object"){if(e.has(r))return!0;e.add(r);for(let o in r)if(Object.prototype.hasOwnProperty.call(r,o)&&n(r[o]))return console.log(r,"cycle at "+o),!0}return!1}return n(t)},lm=(t,e)=>{let n=e instanceof Set?e:new Set(e),r={};for(let o in t)Object.prototype.hasOwnProperty.call(t,o)&&!n.has(o)&&(r[o]=t[o]);return r}});var Ca,Ta,Oa,Yf=L(()=>{"use strict";dn();Ca=(function(){let t=0;function e(){return t++,t}return e})(),Ta=Ca,Oa=(t,e,n)=>(pt(n,t)||n||t.key||Ca()).toString()});var Ye,fm,cr,Xf,um,dm,pm,lr,hm,An,Q,Zf=L(()=>{"use strict";Ye="production",fm=Ye,cr=(t=Ye)=>t==="production",Xf=(t=Ye)=>t==="testing"||t==="test",um=Xf,dm=(t=Ye)=>t==="staging",pm=(t=Ye)=>t==="local",lr=(t=Ye)=>t==="development"||t==="dev"||t==="local",hm=(t,e=Ye)=>e[t],An=(t=Ye)=>!cr(t),Q=t=>{let e=t&&"env"in t?t.env:typeof process<"u"&&process.env?"production":void 0;if(e&&e!=="production")return!0;let n=t&&"hostname"in t?t.hostname:typeof location<"u"?location.hostname:void 0;return typeof n=="string"&&n?n==="localhost"||n==="127.0.0.1"||n.endsWith(".localhost"):!1}});function Ra(t,e,n){let r;return function(){let o=this,s=arguments,i=function(){r=null,n||t.apply(o,s)},a=n&&!r;clearTimeout(r),r=setTimeout(i,e),a&&t.apply(o,s)}}function ym(t,e=window){let n=function(){return t.apply(e,arguments)};for(let r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}var gm,mm,a$,hs,gs,ms,Ct,fr=L(()=>{"use strict";gm=(t,e,n=300)=>{let r;return(...o)=>{clearTimeout(r),r=setTimeout(()=>{e.apply(t,o)},n)}},mm=t=>{let e={};return(...n)=>{let r=n[0];if(r in e)return e[r];{let o=t(r);return e[r]=o,o}}},a$=/^\s*(?:async\s+)?(?:function\b|\([^)]*\)\s*=>|[a-zA-Z_$][\w$]*\s*=>)/,hs=t=>a$.test(t),gs=t=>{let e=t?.plugins;if(!e||!e.length)return!1;for(let n of e)if(n.resolveHandler)return!0;return!1},ms=(t,e)=>{if(typeof t=="function")return t;let n=e?.context?.plugins;if(!n)return t;for(let r of n)if(r.resolveHandler){let o=r.resolveHandler(t,e);if(typeof o=="function")return o}return t},Ct=(t,e,...n)=>{let r=e?.context?.plugins;if(!r)return!1;let o=!1;for(let s of r)typeof s[t]=="function"&&(s[t](e,...n),o=!0);return o}});var bm,Tk=L(()=>{"use strict";Ut();dn();bm=(t,e)=>{let{__ref:n}=t,r=t.if;if(P(r)){let o;try{o=r(t,t.state,t.context)}catch(s){typeof console<"u"&&console.warn("[DOMQL] if condition error:",s),delete n.__if;return}o?n.__if=!0:delete n.__if}else r!=null&&typeof r=="object"?pt(r,t)?n.__if=!0:delete n.__if:n.__if=!0}});var _m,wm,Ok=L(()=>{"use strict";_m=(t,...e)=>{t&&e.map(n=>console.log(n))},wm=(t,e,...n)=>{t&&(console.group(e),n.map(r=>console.log(r)),console.groupEnd(e))}});function Em(t){let e;try{if(!window.localStorage)return;e=window.localStorage.getItem(t)}catch{return}if(e!==null)try{return JSON.parse(e)}catch{return}}function Am(t,e){if(e!=null)try{if(!window.localStorage)return;let n=typeof e=="object"?JSON.stringify(e):e;window.localStorage.setItem(t,n)}catch{}}var Sm,xm,km,vm,Rk=L(()=>{"use strict";Ut();ca();Sm=typeof navigator>"u"?!1:/Mobi/.test(navigator.userAgent),xm=(t,e,n=365)=>{if(Bt(dt)||Bt(dt.cookie))return;let r=new Date;r.setTime(r.getTime()+n*24*60*60*1e3);let o=`expires=${r.toUTCString()}`;dt.cookie=`${t}=${e};${o};path=/`},km=t=>{if(Bt(dt)||Bt(dt.cookie))return;let e=`${t}=`,r=decodeURIComponent(dt.cookie).split(";");for(let o=0;o<r.length;o++){let s=r[o];for(;s.charAt(0)===" ";)s=s.substring(1);if(s.indexOf(e)===0)return s.substring(e.length,s.length)}return""},vm=t=>{Bt(dt)||Bt(dt.cookie)||(dt.cookie=t+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;")}});var ys,Pk,Cm,Tm=L(()=>{"use strict";ys={root:["body","html"],head:["title","base","meta","style","noscript","script"],body:new Set(["string","style","fragment","a","abbr","acronym","address","applet","area","article","aside","audio","b","basefont","bdi","bdo","big","blockquote","br","button","canvas","caption","center","cite","code","search","col","colgroup","data","datalist","dd","del","details","dfn","dialog","dir","div","dl","dt","em","embed","fieldset","figcaption","figure","font","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","i","iframe","img","input","ins","kbd","label","legend","li","link","main","map","mark","meter","nav","noframes","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","hgroup","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strike","strong","sub","summary","sup","table","tbody","td","template","hgroup","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr","svg","path","circle","ellipse","line","polygon","polyline","rect","g","defs","symbol","use","text","tspan","image","clipPath","mask","pattern","marker","linearGradient","radialGradient","stop","filter","feGaussianBlur","feOffset","feMerge","feMergeNode","feBlend","feColorMatrix","feFlood","feComposite","foreignObject"])},Pk=new Set(["svg","path","circle","ellipse","line","polygon","polyline","rect","g","defs","symbol","use","text","tspan","image","clipPath","mask","pattern","marker","linearGradient","radialGradient","stop","filter","feGaussianBlur","feOffset","feMerge","feMergeNode","feBlend","feColorMatrix","feFlood","feComposite","foreignObject"]),Cm=t=>ys.body.has(t)});var Om,Lk,bs,$e,_s,Da,pn,Rm,Qf,Ia,Pm,$a,Jf,tu,Ma,eu,ws,c$,hn,Dk,Pa,Na,Lm,La,Dm,Im,nu,ru,ou,su,iu,au,Ik,cu=L(()=>{"use strict";fs();$m();dn();Ut();Om="production",Lk=t=>t.sourcemap!==!1&&Om!=="production",bs=t=>{if(!t)return[];let e=[],n=t.extends;n&&(D(n)?e.push(...n):e.push(n));let r=t.extend;return r&&(D(r)?e.push(...r):e.push(r)),e},$e=t=>{if(!D(t))return t;let e=[];for(let n=t.length-1;n>=0;n--){let r=t[n];e.push(D(r)?$e(r):r)}return e},_s=t=>{if(t.includes("+"))return t.split("+").filter(gn);if(t.includes("_")){let[e]=t.split("_");return[e]}if(t.includes(".")&&!gn(t.split(".")[1])){let[e]=t.split(".");return[e]}return[t]},Da=(t,e,n)=>{let r=[],o=_s(n);o&&(r=[...o]);let s=$e(bs(t));return s.length&&(r=[...r,...s]),r},pn=(t,e)=>{let{__ref:n}=e,{__extends:r}=n;if(!t)return r;let o=e.variant,s=e.context;if(o&&s?.components&&!Array.isArray(t)&&typeof t=="string"){let i=`${t}.${o}`;s.components[i]&&(t=i)}return r.includes(t)||(r=Array.isArray(t)?[...r,...t]:[...r,t],n.__extends=r),r},Rm=(t,e)=>{if(!t)return e;let{extends:n}=e,r=D(n)?n:[n],o=D(t)?t:[t];return{...e,extends:cs(o,r)}},Qf=()=>Math.random().toString(36).substring(2),Ia={},Pm={},$a=t=>Ia[t.__hash],Jf=(t,e)=>{let n=Qf();return v(t)||(t.__hash=n),n!=="__proto__"&&n!=="constructor"&&n!=="prototype"&&(Ia[n]=e),e},tu=(t,e)=>t.__hash?e.concat($a(t)):Jf(t,e),Ma=(t,e,n,r=new Set,o,s)=>{for(let i of t)D(i)?Ma(i,e,n,r,o,s):ws(i,e,n,r,o,void 0,s);return e},eu=(t,e,n,r=new Set,o,s,i)=>{let a=bs(t),c={...t};delete c.extends,delete c.extend;let l=!1;for(let f in c){l=!0;break}return l&&(e.push(c),o&&o.push(s)),a.length&&ws($e(a),e,n,r,o,s,i),e},ws=(t,e,n,r=new Set,o,s,i)=>{if(!t||r.has(t))return e;if(D(t))return Ma(t,e,n,r,o,i);let a=s;return v(t)?(a=t,t=Na(t,n)):i&&E(t)&&i.has(t)&&(a=i.get(t)),r.has(t)||(r.add(t),t?.extends||t?.extend?eu(t,e,n,r,o,a,i):t&&(e.push(t),o&&o.push(a))),e},c$=new Set(["parent","node","__ref","__proto__","extends","extend","childExtends","childExtendsRecursive"]),hn=(t,e,n,r,o)=>{e=ut(e);for(let s in e){if(c$.has(s))continue;let i=t[s],a=e[s];if(a!==void 0&&Object.prototype.hasOwnProperty.call(e,s)&&s!=="__proto__"&&s!=="constructor"&&s!=="prototype"){if(i===void 0)t[s]=a,n&&r?E(a)&&!D(a)?(n[s]=n[s]||{},Dk(n[s],a,r)):n[s]=r:n&&o?.[s]&&(n[s]=o[s]);else if(E(i)&&E(a)){let c=n?n[s]=n[s]||{}:void 0,l=o?.[s];gn(s)?t[s]=hn(i,a,c,r,l):hn(i,a,c,r,l)}if(s==="extends"||s==="childExtends"||s==="childExtendsRecursive"){if(D(i)&&D(a))t[s]=i.concat(a);else if(D(i)&&E(a)){let c=hn({},i);t[s]=hn(c,a)}}}}return t},Dk=(t,e,n,r)=>{if(r||(r=new WeakSet),!r.has(e)){r.add(e);for(let o in e){if(!Object.prototype.hasOwnProperty.call(e,o)||o==="__proto__"||o==="constructor"||o==="prototype")continue;let s=e[o];E(s)&&!D(s)?(t[o]=t[o]||{},Dk(t[o],s,n,r)):t[o]=n}}},Pa=(t,e,n)=>t.reduce((r,o,s)=>{let i=ut(o),a=n?n[s]:void 0;return hn(r,i,e,a)},{}),Na=(t,e,n={},r)=>{let o=e?.components||n.components,s=e?.pages||n.pages;if(v(t)){let i=o&&(o[t+"."+r]||o[t]||o["smbls."+t]),a=s&&t.charCodeAt(0)===47&&s[t];if(i)return i;if(a)return a;n.verbose&&(Om==="test"||Om==="development")&&console.warn("Extend is string but component was not found:",t);return}return t},Lm=(t,e)=>[].concat(t.slice(0,1)).concat(e.slice(0,1)).concat(t.slice(1)).concat(e.slice(1)),La=(t,e,n,r)=>{if(!t)return[];if(t.__hash)return $a(t)||[];let s=ws(t,[],e,new Set,n,void 0,r);return n?s:tu(t,s)},Dm=(t,e)=>{if(!t)return e;let n=D(t)?t:[t];return cs(n,e)},Im=t=>{let e=[];function n(r){for(let o in r)Object.prototype.hasOwnProperty.call(r,o)&&(gn(o)&&e.push(o),o==="extends"&&(typeof r[o]=="string"?e.push(r[o]):Array.isArray(r[o])&&(e=e.concat(r[o]))),typeof r[o]=="object"&&r[o]!==null&&n(r[o]))}return n(t),e},nu=(t,e,n={})=>{let{__ref:r}=t,o=t.context||e.context,s=t.variant,i=bs(t);if(i.length){let a=$e(i),[c,...l]=a,f=typeof c=="string"&&s&&o?.components?`${c}.${s}`:null;f&&o.components[f]?pn([f,...l],t):pn(a,t)}return ru(t,e,n),ou(t,e,n),su(t,e,n),t.component&&pn($e(pt(t.component,t)),t),o.defaultExtends&&pn($e(o.defaultExtends),t),ls(r.__extends)},ru=(t,e,n={})=>{let{__ref:r}=t;return n.ignoreChildExtends||t.ignoreChildExtends||e.childProps?.extends&&pn($e(e.childProps.extends),t),r.__extends},ou=(t,e,n={})=>{let{__ref:r}=t,o=n.ignoreChildExtends||t.ignoreChildExtends,s=e.childExtends;return!o&&s&&pn($e(s),t),r.__extends},su=(t,e,n={})=>{let{__ref:r}=t,o=e.childExtendsRecursive,s=n.ignoreChildExtendsRecursive||t.ignoreChildExtendsRecursive,i=t.key==="__text";return o&&!i&&!s&&pn($e(o),t),r.__extends},iu=(t,e,n={})=>{let{__ref:r}=t,o=t.context||e.context,s=t.variant,i=Lk(n),a=i?[...r.__extends]:null,c=ls(r.__extends.map((l,f)=>Na(l,o,n,f===0&&s)));if(i){let l=new WeakMap;for(let d=0;d<c.length;d++){let p=c[d],g=a[d];p&&E(p)&&v(g)&&l.set(p,g)}let f=[],u=La(c,o,f,l);r.__extendsStack=u,r.__extendsNames=f}else{let l=La(c,o);r.__extendsStack=l}return r.__extendsStack},au=(t,e,n={})=>{let{__ref:r}=t,{__extendsStack:o}=r;if(Lk(n)){let s={},i=r.__extendsNames||[],a=Pa(o,s,i),c={};hn(t,a,c,void 0,s),r.__sourcemap=c}else{let s=Pa(o);hn(t,s)}return t},Ik=(t,e,n={})=>(nu(t,e,n),iu(t,e,n),au(t,e,n),t)});function Mm(t){return Object.keys(t).filter(e=>/^[A-Z]/.test(e))}function Nm(t){return Object.keys(t).filter(e=>/^\d+$/.test(e))}function Fm(t,e,n){let{context:r}=e||{},[o]=_s(n),s=n||o;return r?.components?.[s]||r?.pages?.[s]}var gn,$m=L(()=>{"use strict";cu();Ut();gn=t=>{if(!v(t)||!t.length)return!1;let e=t.charCodeAt(0);return e>=65&&e<=90}});function $k(t,e){let{props:n,on:r}=e,o=Hr(t.split("on")[1]),s=r[o],i=n[t];P(s)?r[o]=(...a)=>{if(s(...a)!==!1&&P(i))return i(...a)}:r[o]=i}var Mk=L(()=>{"use strict";ya();Ut()});function lu(t,e={}){let n=e.cachedKeys||[];for(let r in t){let o=t[r];if(r.length>2&&r.charCodeAt(0)===111&&r.charCodeAt(1)===110&&r[2]===r[2].toUpperCase()&&(P(o)||o!=null&&gs(this.context))){let g=Hr(r.slice(2));t.on&&(t.on[g]=o),delete t[r];continue}if(r==="childProps"){t.props[r]=o,delete t[r],n.push(r);continue}let a=this.define?.[r],c=this.context?.define?.[r],l=E(a)||P(a),f=E(c)||P(c);if(l||f)continue;let u=r.charAt(0);if(Fk.has(u)){t.props[r]=o,delete t[r],n.push(r);continue}let d=jm.test(r)||Nk.test(r)||f$(o),p=sr.has(r);!d&&!p&&(r in t.props||(t.props[r]=o),delete t[r],n.push(r))}return t}function fu(t=this,e){let n=e.cachedKeys||[];for(let r in t.props){let o=t.props[r],s=r.length>2&&r.charCodeAt(0)===111&&r.charCodeAt(1)===110,i=P(o)||o!=null&&gs(this.context);if(s&&i){$k(r,t),delete t.props[r];continue}if(n.includes(r)||r==="childProps")continue;let a=r.charAt(0);if(Fk.has(a))continue;let c=this.define?.[r],l=this.context?.define?.[r],f=E(c)||P(c),u=E(l)||P(l),d=jm.test(r)||Nk.test(r),p=sr.has(r);(d||p||f||u)&&(t[r]===void 0||o===null)&&(t[r]=o,t.props&&delete t.props[r])}return t}function uu(t=this){let e=[];return lu.call(this,t,{cachedKeys:e}),fu.call(this,t,{cachedKeys:e}),t}function Bm(t={}){return t.on||(t.on={}),t.props||(t.props={}),uu.call(this,t)}function Vm(t,e){this.__element.update({props:t},e)}function Va(t){let e={update:Vm.bind(t.props),__element:t};Object.setPrototypeOf(t.props,e)}var jm,Nk,Fk,l$,f$,Ba,Fa,Um,Ua,za,Ha,du,ja,zm,Hm,Wm=L(()=>{"use strict";Kr();Mk();dn();Ut();ya();fr();jm=/^[A-Z]/,Nk=/^\d+$/,Fk=new Set([":","@","[","*","+","~","&",">","$","-",".","!"]),l$=new Set(["extend","props","text","tag","on","if","childExtend","children","childrenAs","state","html","attr","define","content"]),f$=t=>{if(!t||typeof t!="object"||Array.isArray(t))return!1;for(let e in t)if(l$.has(e)||jm.test(e))return!0;return!1},Ba=(t,e,n)=>{let{props:r,__ref:o}=t;if(o.__propsStack=[],r)o.__initialProps=r;else return{};return q(r)?{...r}:(o.__propsStack.push(r),{})};Fa=t=>ae(t)("string","number")?{inheritedString:t}:t,Um=(t,e)=>!t||!e.length?!1:e.includes(t),Ua=(t,e)=>{let{__ref:n}=t,r=n.__propsStack||[],o=e.props;if(!o)return r;let s=o[t.key],i=o.childProps||e.childProps,a=t.props?.ignoreChildProps;if(i&&!a){let c=Fa(i);r.unshift(c)}if(s){let c=Fa(s);r.unshift(c)}return r};za=t=>{let e=new Set;return t.filter(n=>!n||ir.has(n)||e.has(n)?!1:(e.add(n),!0))},Ha=(t,e,n)=>(e.props=t.reduce((r,o)=>{if(ir.has(o))return r;for(;P(o);)o=pt(o,e);return ft(r,ut(o,{exclude:ir}))},{}),Va(e),e.props),du=(t,e)=>{let{props:n,__ref:r}=t,o=r.__propsStack||[];if(e?.props&&(o=[...Ua(t,e)]),E(n)?o.push(n):n==="inherit"&&e?.props?o.push(e.props):n&&o.push(n),D(r.__extendsStack))for(let s=0;s<r.__extendsStack.length;s++){let i=r.__extendsStack[s];i.props&&i.props!==n&&o.push(i.props)}return r.__propsStack=za(o),r.__propsStack},ja=(t,e)=>{let{__ref:n}=t,r=du(t,e);r.length?Ha(r,t):(n.__propsStack=[],t.props={})},zm=function(t,e,n){let{__ref:r}=t;if(r.__if)ja(t,e);else try{ja(t,e)}catch(o){t.context?.designSystem?.verbose&&console.warn("initProps error at",r.path?.join("."),o),t.props={},r.__propsStack=[]}return Va(t),t},Hm=(t,e,n)=>{let{__ref:r}=e,s=[...r.__propsStack||[]],i=Ua(e,n);return i.length&&(s=[...i,...s]),t&&(s=[t,...s]),r.__propsStack=za(s),r.__propsStack.length&&Ha(r.__propsStack,e),e}});var jk,pu,hu,gu,mu,qm,yu,bu,_u,Km,Bk=L(()=>{"use strict";cu();Yf();fa();Wm();Tm();Ut();jk="production",pu=(t,e,n)=>{let r=e.childExtends&&e.childExtends.tag,o=e.childProps&&e.childProps.tag,s=ys.body.has(n)&&n;return{text:t,tag:r||o||s||"string"}},hu=(t,e,n)=>{if(t===void 0)return(jk==="test"||jk==="development")&&console.warn(n,"element is undefined in",e?.__ref?.path),{};if(t!==null)return t===!0?{}:ae(t)("string","number")?pu(t,e,n):P(t)?{props:t}:t},gu=(t,e)=>{let n={};return n.origin=t,n.parent=e,n},mu=(t,e,n,r,o)=>{if(!e)return o;if(En(e)){let s={key:":root",node:e};return o[`${n}_parent`]=s,s}return e},qm=(t,e)=>{let{__ref:n}=t,{__ref:r}=e,o=e&&e.key===":root";n?.root||(n.root=o?t:r?.root)},yu=(t,e,n)=>{let{__ref:r}=e;return r||(r=e.ref={}),r.path||(r.path=[]),r.path.concat(n)},bu=(t,e,n,r,o)=>(r.context&&!o.context&&!t.context&&(o.context=r.context),r.context||e.context||o.context||t.context),_u=(t,e,n)=>{let r=gu(t,e);return t.__ref=r,r.__defineCache||(r.__defineCache={}),r.__exec||(r.__exec={}),r.__execProps||(r.__execProps={}),r.__class||(r.__class={}),r.__classNames||(r.__classNames={}),r.__attr||(r.__attr={}),r.__changes||(r.__changes=[]),r.__children||(r.__children=[]),r.__extends=Da(t,e,n),r.path=yu(t,e,n),r},Km=(t,e,n,r,o)=>{let i=t?.__hash?{extends:[t]}:hu(t,e,n);if(!i)return;let a=mu(i,e,n,r,o),c=Oa(i,a,n);_u(i,a,c);let l=Ba(i,a,c),f=bu(i,a,c,r,o),u=i.on||{};return{...i,key:c,props:l,parent:a,context:f,on:u}}});var Gm,wu,Su,xu,ku,Ym,vu,Xm,Zm,Qm,Jm,Uk,Ss,to,Vk,zk,Hk,Wa,mn,Wk=L(()=>{"use strict";fs();Kr();dn();Ut();Gm=t=>{let{state:e,props:n,__ref:r}=t,o=n?.state||e;return ae(o)("string","number")?(r.__state=o,{value:o}):o===!0?(r.__state=t.key,{}):o?(r.__hasRootState=!0,o):!1},wu=(t,e)=>{if(!t.includes("~/"))return;if(t.split("~/").length>1)return e.root},Su=(t,e)=>{if(!t.includes("../"))return;let r=t.split("../").length-1;for(let o=0;o<r;o++){if(!e.parent)return null;e=e.parent}return e},xu=(t,e,n={})=>{let r=v(t)?t.split("/"):[t],o=r.length-1;for(let s=0;s<o;s++){let i=r[s],a=r[s+1];if(i==="__proto__"||a==="__proto__")return;let c=e[i];c||(c=e[i]={}),c[a]||(c[a]={}),t=a,e=c}return n.returnParent?e:e[t]},ku=(t,e,n={})=>{let o=t.__ref.__state;if(!vu(t))return;let s=wu(o,e.state),i=e.state;if(s)i=s,o=o.replaceAll("~/","");else{let a=Su(o,e.state);a&&(i=a,o=o.replaceAll("../",""))}if(i)return xu(o,i,n)},Ym=(t,e)=>{let n=t.__ref,r=ku(t,e);if(r===void 0)return t.state;if(ae(r)("object","array"))return ut(r);if(ae(r)("string","number","boolean"))return n.__stateType=typeof r,{value:r};console.warn(n.__state,"is not present. Replacing with",{})},vu=t=>{let{__ref:e}=t,n=e?.__state;return!!(n&&ae(n)("number","string","boolean"))},Xm=function(t){return q(t)?!!(t.update&&t.parse&&t.clean&&t.create&&t.parent&&t.destroy&&t.rootUpdate&&t.parentUpdate&&t.keys&&t.values&&t.toggle&&t.replace&&t.quietUpdate&&t.quietReplace&&t.add&&t.apply&&t.applyReplace&&t.setByPath&&t.setPathCollection&&t.removeByPath&&t.removePathCollection&&t.getByPath&&t.applyFunction&&t.__element&&t.__children):!1},Zm=(t,e)=>{if(!t)return e||{};let n=t.split("/"),r={},o=r,s=n.length-1;for(let i=0;i<=s;i++)o[n[i]]=i===s?e||{}:{},o=o[n[i]];return r},Qm=(t,e)=>{let{__element:n}=e,r=n?.state;if(!r)return;let o=ut(r,Wr),s={[t.key]:o},i=E(r.__depends)?{...r.__depends,...s}:s;return Array.isArray(r)?ha(r,{...Object.getPrototypeOf(r),__depends:i}):Object.setPrototypeOf(r,{...Object.getPrototypeOf(r),__depends:i}),o},Jm=(t,e,n={})=>{let{overwrite:r}=n;if(!r)return;let o=r==="shallow";if(r==="merge"){ft(t,e,Wr);return}(o?Jr:ee)(t,e,Wr)},Uk="__polyglotSeededKeys",Ss=t=>{if(!E(t))return new Set;let e=t[Uk];if(!(e instanceof Set)){e=new Set;try{Object.defineProperty(t,Uk,{value:e,enumerable:!1,writable:!0,configurable:!0})}catch{}}return e},to=(t,e,n)=>Ss(t).has(e)?!0:!E(n)||n[e]===void 0,Vk="__polyglotSeededValues",zk=t=>{if(!E(t))return new Map;let e=t[Vk];if(!(e instanceof Map)){e=new Map;try{Object.defineProperty(t,Vk,{value:e,enumerable:!1,writable:!0,configurable:!0})}catch{}}return e},Hk=t=>{if(t===null||typeof t!="object")return typeof t+":"+String(t);try{return"json:"+JSON.stringify(t)}catch{return null}},Wa=(t,e,n)=>{if(!Ss(t).has(e))return!1;let r=zk(t);if(!r.has(e))return!0;let o=E(n)||Array.isArray(n)?n[e]:void 0,s=Hk(o);return s!==null&&s===r.get(e)},mn=(t,e,...n)=>(Ss(t).add(e),n.length&&zk(t).set(e,Hk(n[0])),e)});var u$,ty,qk=L(()=>{"use strict";u$=(t,e)=>{let n=e;for(;n;){if(n===t)return!0;n=Object.getPrototypeOf(n)}return!1},ty=(t,e)=>{let{__ref:n}=t,r=t.context||e.context||n.root?.context;r&&!r.globalScope&&(r.globalScope={});let o=e.scope||n.root?.scope,s=r?.globalScope;if(!t.scope)o?t.scope=o:s?t.scope=Object.create(s):t.scope={};else if(typeof t.scope=="object"&&t.scope!==null&&Object.getPrototypeOf(t.scope)===Object.prototype){let i=o||s;i&&!u$(t.scope,i)&&Object.setPrototypeOf(t.scope,i)}}});var Kk,Eu,Cn,Au,ey,ny=L(()=>{"use strict";Ut();fr();Kk=(t,e)=>{let n="on"+t.charAt(0).toUpperCase()+t.slice(1);return e[n]},Eu=(t,e,n,r,o)=>{if(t=ms(t,e),!!P(t))try{let s=t.call(e,e,n||e.state,r||e.context,o);return s&&typeof s.then=="function"&&s.catch(i=>{e.error=i,i instanceof ReferenceError?console.warn("[DOMQL] Async event warning:",i.message):console.error("[DOMQL] Async event error:",i)}),s}catch(s){if(e.error=s,s instanceof ReferenceError?console.warn("[DOMQL] Event handler warning:",s.message):console.error("[DOMQL] Event handler error:",s),e.context?.strictMode)throw s}},Cn=(t,e,n)=>{if(!e)throw new Error("Element is required");Ct(t,e,n);let r=Kk(t,e);if(r){let{state:o,context:s}=e;return Eu(r,e,o,s,n)}},Au=(t,e,n,r,o,s)=>{if(t=ms(t,n),!!P(t))try{let i=t.call(n,e,n,r||n.state,o||n.context,s);return i&&typeof i.then=="function"&&i.catch(a=>{n.error=a,console.error("[DOMQL] Async event update error:",a)}),i}catch(i){if(n.error=i,console.error("[DOMQL] Event update error:",i),n.context?.strictMode)throw i}},ey=(t,e,n,r)=>{Ct(t,n,e,r);let o=Kk(t,n);if(o){let{state:s,context:i}=n;return Au(o,e,n,s,i,r)}}});var ry,qa,oy=L(()=>{"use strict";ry={},qa={}});var Cu,Ka,Gk,sy,Yk,Xk,Zk,Qk,Jk,Tu=L(()=>{"use strict";Cu="@symbo.ls/fetch:EARLY",Ka=(t,e)=>{let n=new URL(t);return n.searchParams.sort(),n.toString()+" "+(e||"")},Gk=t=>{if(t==null)return!0;if(typeof t!="object"||Array.isArray(t))return!1;let e=Object.getPrototypeOf(t);if(e!==Object.prototype&&e!==null)return!1;for(let n in t){let r=t[n];if(!(r===void 0||typeof r=="string"||typeof r=="boolean")&&!(typeof r=="number"&&isFinite(r)))return!1}return!0},sy=()=>Symbol.for(Cu),Yk=(t,e)=>{if(!t||typeof t!="object"||!e||typeof e!="object")return t;let n={...t};return n.query===void 0&&e.query!==void 0&&(n.query=e.query),n.rpc===void 0&&e.rpc!==void 0&&(n.rpc=e.rpc),n},Xk=(t,e)=>{let n=sy();if(!t||typeof t!="object"){let i=globalThis[n];return i&&i.seeded?{carried:{},rpc:!1,maxAge:3e4}:null}let r=globalThis[n];r||(r={time:Date.now(),entries:{}},globalThis[n]=r),r.closed=!0;let o={};for(let i in t.query||{})for(let a in e||{})a.toLowerCase()===i.toLowerCase()&&(o[a.toLowerCase()]=e[a]);let s=typeof t.maxAge=="number"&&t.maxAge>=0?t.maxAge:3e4;return{carried:o,rpc:t.rpc==="get",maxAge:s}},Zk=(t,e=3e4)=>{let n=globalThis[sy()],r=n&&n.entries&&n.entries[t];return!r||(delete n.entries[t],!(Date.now()-r.time<=e))?null:Promise.resolve(r.answer).then(o=>o&&o.ok&&!o.bodyUsed?o:null,()=>null)},Qk=()=>{let t=globalThis[sy()];t&&t.entries&&(t.entries={})},Jk=t=>{let e=(Array.isArray(t)?t:[]).filter(r=>r&&typeof r.url=="string"&&typeof r.body=="string");if(!e.length)return"";let n=JSON.stringify(e.map(r=>({k:Ka(r.url,r.lang||""),s:r.status||200,t:r.type||"application/json",b:r.body}))).replace(/</g,"\\u003c").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029");return"<script>(function(){try{var k=Symbol.for("+JSON.stringify(Cu)+"),r=globalThis[k]||(globalThis[k]={time:Date.now(),entries:{}}),t=Date.now(),l="+n+';r.seeded=true;r.entries=r.entries||{};for(var i=0;i<l.length;i++){var e=l[i];r.entries[e.k]={time:t,answer:Promise.resolve(new Response(e.b,{status:e.s,headers:{"content-type":e.t}}))}}}catch(e){}})()<\/script>'}});var iv={};F(iv,{buildUrl:()=>ay,restAdapter:()=>sv,selectQuery:()=>rv,setup:()=>x$});var ay,rv,ov,tv,d$,p$,h$,ev,Xe,g$,m$,y$,iy,b$,_$,w$,S$,nv,x$,sv,av=L(()=>{"use strict";Tu();ay=(t,e,n)=>{let r=e&&!e.startsWith("/")?"/":"",o=new URL(`${t}${r}${e}`);if(n)for(let s in n){let i=n[s];i!=null&&o.searchParams.set(s,typeof i=="object"?JSON.stringify(i):i)}return o.toString()},rv=({params:t,select:e,limit:n,offset:r,order:o,single:s})=>{let i={...t};return e&&(i.select=e),n&&(i.limit=n),r&&(i.offset=r),s&&(i.single=!0),o&&(typeof o=="string"?i.order=o:Array.isArray(o)?i.order=o.map(a=>`${a.by}:${a.asc===!1?"desc":"asc"}`).join(","):o.by&&(i.order=`${o.by}:${o.asc===!1?"desc":"asc"}`)),i},ov=t=>Object.prototype.toString.call(t).slice(8,-1),tv=["auto","json","text","blob","arrayBuffer","stream","response"],d$={json:async t=>{let e=await t.text();return e?JSON.parse(e):null},text:t=>t.text(),blob:t=>t.blob(),arrayBuffer:t=>t.arrayBuffer(),stream:t=>t.body,response:t=>t},p$=t=>{let e=t.headers.get("content-type");return e&&e.includes("json")?t.json():t.text()},h$=async t=>{let e=await t.text(),n=t.headers.get("content-type");if(e&&n&&n.includes("json"))try{return JSON.parse(e)}catch{}return e},ev=(t,e)=>t?.message||t?.error||e.statusText||`HTTP ${e.status}`,Xe=async(t,e,n,r)=>{let o=n??"auto";if(!tv.includes(o))throw new TypeError(`@symbo.ls/fetch rest: unknown responseType "${o}" \u2014 use one of: ${tv.join(", ")}`);let s=r&&await r||await globalThis.fetch(t,e);if(o==="auto"){let i=await p$(s);return{data:i,error:s.ok?null:ev(i,s),status:s.status}}if(!s.ok){let i=await h$(o==="response"?s.clone():s);return{data:o==="response"?s:i,error:ev(i,s),status:s.status}}return{data:await d$[o](s),error:null,status:s.status}},g$=["FormData","Blob","File","URLSearchParams","ReadableStream","ArrayBuffer"],m$=t=>t!==null&&typeof t=="object"&&(ArrayBuffer.isView(t)||g$.includes(ov(t))),y$=t=>Array.isArray(t)?t:typeof t.entries=="function"?t.entries():Object.entries(t),iy=(...t)=>{let e={},n=new Map;for(let r of t)if(r)for(let[o,s]of y$(r)){let i=o.toLowerCase();if(n.has(i)&&delete e[n.get(i)],s==null){n.delete(i);continue}n.set(i,o),e[o]=s}return e},b$={"Content-Type":"application/json"},_$={"Content-Type":void 0},w$=t=>{if(!t||typeof t!="object")return null;let e={};for(let n in t.query||{})e[n.toLowerCase()]=t.query[n];return{params:e,rpc:t.rpc==="get"}},S$="content-type",nv=(t,e)=>{let n=Object.keys(e);if(!n.length)return t;let r=new URL(t);for(let o of n)r.searchParams.set(o,e[o]);return r.toString()},x$=async({url:t,headers:e,auth:n,fetchOptions:r,early:o,reads:s})=>{if(!t)throw new Error("@symbo.ls/fetch rest: url is required");return sv(t,e,n,r,o,s)},sv=(t,e={},n,r={},o,s)=>{let i=n?.token||null,a=Xk(Yk(o,s),e),c=w$(s),l=y=>{if(!c)return null;let S={},b={},x={};for(let _ in y){let w=_.toLowerCase();if(w==="authorization")return null;if(w===S$)continue;b[_]=y[_];let k=c.params[w];k?x[k]=y[_]:S[_]=y[_]}return{headers:S,adoptHeaders:b,query:x}},f=(y,S)=>{if(!a)return null;let b="";for(let x in S){let _=x.toLowerCase();if(_==="accept-language")b=String(S[x]);else if(a.carried[_]!==S[x])return null}try{return Zk(Ka(y(),b),a.maxAge)}catch{return null}},u=()=>i?{Authorization:`Bearer ${i}`}:null,d=y=>iy(e,u(),y),p=y=>({...r,...y}),g=(y,S,b)=>{if(!m$(S))return p({method:y,headers:iy(e,u(),b$,b),body:JSON.stringify(S)});let x={method:y,headers:iy(e,u(),_$,b),body:S};return ov(S)==="ReadableStream"&&(x.duplex="half"),p(x)},h=(y,S)=>{let b=S||t;if(y&&(y.startsWith("http://")||y.startsWith("https://")))return y;let x=y&&!y.startsWith("/")?"/":"";return`${b}${x}${y||""}`};return{name:"rest",setToken:y=>{i=y},getSession:async()=>{if(!n?.sessionUrl)return i?{token:i}:null;let y=await Xe(h(n.sessionUrl,n.baseUrl),p({headers:d()}));return y.error?null:y.data},signIn:async y=>{if(!n?.signInUrl)throw new Error("rest: auth.signInUrl not configured");let S=await Xe(h(n.signInUrl,n.baseUrl),g("POST",y));return S.data?.token&&(i=S.data.token),S},signOut:async()=>(n?.signOutUrl&&await Xe(h(n.signOutUrl,n.baseUrl),p({method:"POST",headers:d()})),i=null,{error:null}),select:({from:y,params:S,select:b,limit:x,offset:_,order:w,single:k,headers:A,baseUrl:T,responseType:M})=>{let $=ay(T||t,y||"",rv({params:S,select:b,limit:x,offset:_,order:w,single:k})),R=d(A),j=l(R);if(j){let tt=p({headers:j.headers});return Xe(nv($,j.query),tt,M,f(()=>$,j.adoptHeaders))}let et=p({headers:R});return Xe($,et,M,f(()=>$,et.headers))},rpc:async({from:y,params:S,headers:b,baseUrl:x,responseType:_,read:w})=>{let k=Gk(S),A=()=>ay(x||t,`rpc/${y}`,S),T=tt=>Xe(h(`rpc/${y}`,x),g("POST",S,b),_,tt),M=d(b),$=w===!0&&c&&c.rpc&&k?l(M):null,R=null;if($)try{R=A()}catch{R=null}if(!R)return T(a&&a.rpc&&k?f(A,M):null);let j=p({method:"GET",headers:$.headers}),et=await Xe(nv(R,$.query),j,_,f(()=>R,$.adoptHeaders));return et.status===405?T(null):et},insert:({from:y,data:S,headers:b,baseUrl:x,responseType:_})=>Xe(h(y,x),g("POST",S,b),_),update:({from:y,data:S,params:b,method:x,headers:_,baseUrl:w,responseType:k})=>{let A=b?.id||S?.id,T=A?`${y}/${A}`:y;return Xe(h(T,w),g(x||"PATCH",S,_),k)},upsert:({from:y,data:S,params:b,method:x,headers:_,baseUrl:w,responseType:k})=>{let A=b?.id||S?.id,T=A?`${y}/${A}`:y;return Xe(h(T,w),g(x||"PUT",S,_),k)},delete:({from:y,params:S,headers:b,baseUrl:x,responseType:_})=>{let w=S?.id,k=w?`${y}/${w}`:y;return Xe(h(k,x),p({method:"DELETE",headers:d(b)}),_)}}}});var lv={};F(lv,{localAdapter:()=>cv,setup:()=>v$});var Ou,k$,v$,cv,fv=L(()=>{"use strict";Ou=(t,e)=>{if(!e)return!0;for(let n in e){let r=e[n];if(r===null){if(t[n]!==null&&t[n]!==void 0)return!1}else if(Array.isArray(r)){if(!r.includes(t[n]))return!1}else if(typeof r=="object"){for(let o in r)if(o==="gt"&&!(t[n]>r[o])||o==="gte"&&!(t[n]>=r[o])||o==="lt"&&!(t[n]<r[o])||o==="lte"&&!(t[n]<=r[o])||o==="neq"&&t[n]===r[o]||o==="like"&&!String(t[n]).includes(r[o]))return!1}else if(t[n]!==r)return!1}return!0},k$=(t,{order:e,limit:n,offset:r,single:o})=>{let s=[...t];if(e){let i=typeof e=="string"?e:e.by,a=e.asc!==!1;s.sort((c,l)=>c[i]<l[i]?a?-1:1:c[i]>l[i]?a?1:-1:0)}return r&&(s=s.slice(r)),n&&(s=s.slice(0,n)),o?{data:s[0]||null,error:null}:{data:s,error:null}},v$=async({data:t,...e})=>cv(t,e),cv=(t={},e={})=>{let n={},r={},o=e.persist!==!1&&typeof localStorage<"u",s=e.prefix||"smbls_db_",i=f=>{if(!n[f])if(o)try{let u=localStorage.getItem(s+f);n[f]=u?JSON.parse(u):t[f]||[]}catch{n[f]=t[f]||[]}else n[f]=t[f]||[];return n[f]},a=f=>{if(o)try{localStorage.setItem(s+f,JSON.stringify(n[f]))}catch{}},c=(f,u,d,p)=>{let g=r[f];if(g)for(let h of g)h(d,p,{event:u,table:f})},l=Date.now();return{name:"local",store:n,select:async({from:f,params:u,...d})=>{let g=i(f).filter(h=>Ou(h,u));return k$(g,d)},insert:async({from:f,data:u})=>{let d=i(f),g=(Array.isArray(u)?u:[u]).map(h=>{let m={id:h.id||++l,...h};return d.push(m),m});a(f);for(let h of g)c(f,"INSERT",h,null);return{data:Array.isArray(u)?g:g[0],error:null}},update:async({from:f,data:u,params:d})=>{let p=i(f),g=[];for(let h=0;h<p.length;h++)if(Ou(p[h],d)){let m={...p[h]};Object.assign(p[h],u),g.push(p[h]),c(f,"UPDATE",p[h],m)}return a(f),{data:g,error:null}},upsert:async({from:f,data:u,params:d})=>{let p=i(f),g=Array.isArray(u)?u:[u],h=[];for(let m of g){let y=d||(m.id!==void 0?{id:m.id}:null),S=y?p.findIndex(b=>Ou(b,y)):-1;if(S>-1){let b={...p[S]};Object.assign(p[S],m),h.push(p[S]),c(f,"UPDATE",p[S],b)}else{let b={id:m.id||++l,...m};p.push(b),h.push(b),c(f,"INSERT",b,null)}}return a(f),{data:Array.isArray(u)?h:h[0],error:null}},delete:async({from:f,params:u})=>{let d=i(f),p=[];for(let g=d.length-1;g>=0;g--)Ou(d[g],u)&&(p.push(d[g]),d.splice(g,1),c(f,"DELETE",null,p[p.length-1]));return a(f),{data:p,error:null}},subscribe:({from:f,on:u},d)=>{r[f]||(r[f]=[]);let p=(g,h,m)=>{u&&u!=="*"&&u!==m.event||d(g,h,m)};return r[f].push(p),()=>{let g=r[f].indexOf(p);g>-1&&r[f].splice(g,1)}}}}});var Bu={};F(Bu,{EARLY_KEY:()=>Cu,createAdapter:()=>R$,createEarlySeedScript:()=>Jk,default:()=>H$,earlyKey:()=>Ka,executeFetch:()=>ec,fetchFunctions:()=>ju,fetchPlugin:()=>wy,hasAdapter:()=>O$,initAdapterAuth:()=>$u,parseDuration:()=>Ya,queryClient:()=>Ga,registerAdapter:()=>T$,resolveDb:()=>yv});var E$,mv,Ru,ks,Pu,uy,A$,C$,T$,O$,R$,yv,Ya,le,bv,Tn,Rn,Pn,cy,gy,Qa,Xa,Du,dy,Iu,my,eo,_v,P$,Lu,L$,uv,ly,wv,Sv,xs,dv,D$,pv,I$,xv,yy,Ja,Mu,Nu,tc,by,$u,_y,xe,Me,Za,Fu,$$,py,ur,Ze,hv,On,M$,N$,F$,j$,fy,hy,B$,kv,vv,U$,V$,z$,ec,Ga,gv,ju,wy,H$,nc=L(()=>{"use strict";I();Kt();Tu();Tu();E$=["select","rpc","insert","update","upsert","delete","subscribe"],mv={rest:()=>Promise.resolve().then(()=>(av(),iv)),local:()=>Promise.resolve().then(()=>(fv(),lv))},Ru=Symbol.for("@symbo.ls/fetch:CUSTOM_ADAPTERS"),ks=(()=>{if(typeof globalThis<"u"&&globalThis[Ru])return globalThis[Ru];let t={};if(typeof globalThis<"u")try{return Object.defineProperty(globalThis,Ru,{value:t,writable:!1,configurable:!1,enumerable:!1}),globalThis[Ru]}catch{}return t})(),Pu=Symbol.for("@symbo.ls/fetch:PENDING_ADAPTERS"),uy=(()=>{if(typeof globalThis<"u"&&globalThis[Pu])return globalThis[Pu];let t={};if(typeof globalThis<"u")try{return Object.defineProperty(globalThis,Pu,{value:t,writable:!1,configurable:!1,enumerable:!1}),globalThis[Pu]}catch{}return t})(),A$=5e3,C$=t=>new Promise(e=>{if(ks[t])return e(ks[t]);let n=uy[t]||=[],r=!1,o=()=>{r||(r=!0,e(ks[t]||null))};n.push(o),setTimeout(o,A$)}),T$=(t,e)=>{ks[t]=e;let n=uy[t];if(n&&n.length){uy[t]=[];for(let r of n)r()}},O$=t=>typeof t=="string"&&!!(ks[t]||mv[t]),R$=t=>{let e={};for(let n of E$)t[n]&&(e[n]=t[n]);return e.name=t.name||"custom",e},yv=async t=>{if(!t)return null;if(typeof t.select=="function")return t;let{adapter:e,...n}=t,r=typeof e=="string"?e:typeof t=="string"?t:null;if(!r)return null;let o=ks[r]||mv[r];if(!o&&(o=await C$(r),!o))throw new Error(`Unknown db adapter: "${r}". Use registerAdapter() for adapters with optional deps.`);let s=await o();if(!s||typeof s.setup!="function")throw new Error(`Adapter "${r}" loader returned a module without a setup() function. Got keys: [${Object.keys(s||{}).join(", ")}]. Likely a bundler chunk-resolution issue.`);return s.setup(n)},Ya=t=>{if(!t)return 0;if(typeof t=="number")return t;let e=t.match(/^(\d+)(ms|s|m|h)$/);if(!e)return 0;let n=parseInt(e[1]),r=e[2];return r==="ms"?n:r==="s"?n*1e3:r==="m"?n*6e4:r==="h"?n*36e5:0},le=new Map,bv=new Map,Tn=new Map,Rn=0,Pn=new Map,cy=new WeakMap,gy=(t,e,n,r,o=t.page,s=t.cursor)=>{if(t.cache?.key)return t.cache.key;let{from:i,method:a,infinite:c}=t,l=n?`${n}:`:"",f=r?`:${r}`:"",u=o?":p"+JSON.stringify(o):"",d=s!=null?":c"+JSON.stringify(s):"";return`${i}:${a}:${l}${JSON.stringify(e||"")}${c?":infinite":""}${u}${d}${f}`},Qa=t=>le.get(t)||null,Xa=(t,e,n,r=++Rn,o=!1)=>{let s={data:e,error:n,time:Date.now(),stale:o,seq:r};le.set(t,s);let i=bv.get(t);if(i)for(let a of i)P(a)&&a(s);return s},Du=(t,e)=>{let n=t?le.get(t):null;return n&&!n.error&&n.seq>e?n:null},dy=(t,e)=>(Pn.get(t)||0)>e,Iu=t=>{if(t){le.delete(t),Pn.set(t,++Rn);return}for(let[e]of le)Pn.set(e,++Rn);for(let[e]of Tn)Pn.set(e,++Rn);le.clear()},my=t=>!t&&t!==!1?{staleTime:6e4,gcTime:3e5}:t===!1?null:t===!0?{staleTime:6e4,gcTime:3e5}:typeof t=="number"?{staleTime:t,gcTime:Math.max(t*5,3e5)}:v(t)?{staleTime:Ya(t),gcTime:3e5}:{staleTime:Ya(t.stale||t.staleTime)||6e4,gcTime:Ya(t.gc||t.gcTime||t.expire)||3e5,key:t.key},eo=new Set,_v=t=>!!t.ref&&t.element.__ref===t.ref,P$=({config:t,element:e,context:n})=>{try{return by(t,e,n)}catch{return null}},Lu=null,L$=()=>{Lu||(Lu=setInterval(()=>{let t=Date.now();for(let[e,n]of le){let r=bv.get(e);!(r&&r.size>0)&&t-n.time>(n.gcTime||3e5)&&le.delete(e)}for(let[e]of Pn)!le.has(e)&&!Tn.has(e)&&Pn.delete(e);for(let e of eo)_v(e)||eo.delete(e)},3e4),Lu.unref&&Lu.unref())};L$();uv=3,ly=t=>Math.min(1e3*2**t,3e4),wv=(t,e)=>{let n=t.retry;return n===void 0&&e?{count:0}:n===!1?{count:0}:n===!0||n===void 0?{count:uv,delay:ly}:typeof n=="number"?{count:n,delay:ly}:{count:n.count??uv,delay:P(n.delay)?n.delay:typeof n.delay=="number"?()=>n.delay:ly}},Sv=async(t,e)=>{let{count:n,delay:r}=e,o;for(let s=0;s<=n;s++)try{let i=await t();if(i?.error){if(o=i.error,s<n){let a=P(r)?r(s,o):r;await new Promise(c=>setTimeout(c,a));continue}return i}return i}catch(i){if(o=i,s<n){let a=P(r)?r(s,i):r;await new Promise(c=>setTimeout(c,a));continue}throw i}return{data:null,error:o}},xs={focus:new Set,online:new Set},dv=!1,D$=()=>{if(dv||typeof window>"u")return;dv=!0;let t=()=>{for(let n of xs.focus)n()},e=()=>{for(let n of xs.online)n()};window.addEventListener("visibilitychange",()=>{document.visibilityState==="visible"&&t()}),window.addEventListener("focus",t),window.addEventListener("online",e)},pv=(t,e)=>{let n=e.__ref;if(t===!0)return{from:n.__state||e.key,method:"select",query:!0,on:"create"};if(v(t))return{from:t,method:"select",query:!0,on:"create"};if(E(t)){let r={...t};return r.from=r.from||n.__state||e.key,r.method=r.method||"select",r.on=r.on||"create",r.query===void 0&&(r.query=!0),r}return null},I$=["insert","update","upsert","delete"],xv=t=>I$.includes(t),yy=t=>t.mutation===!0?!0:t.mutation===!1||t.method!=="rpc"?!1:t.on==="submit"||t.on==="click"||t.invalidates!=null,Ja=(t,e)=>{let n=t?.state?.root||e?.state?.root;if(n?.lang)return n.lang},Mu=(t,e)=>{let r=(t?.state?.root||e?.state?.root)?.__fetchScope;return r?String(r):void 0},Nu=(t,e,n)=>{let r;if(!t)r=void 0;else if(P(t))r=t(e,e.state);else{r={};for(let o in t){let s=t[o];r[o]=P(s)?s(e,e.state):s}}return r},tc=(t,e)=>P(t)?t(e,e.state):t,by=(t,e,n)=>gy(t,Nu(t.params,e,n),Mu(e,n),Ja(e,n),tc(t.page,e),tc(t.cursor,e)),$u=async(t,e)=>{if(!t||t.__authInitialized||(t.__authInitialized=!0,!t.getSession))return;let n=(r,o)=>{let s=e.state?.root;s?.update&&s.update({auth:{user:r,session:o,loading:!1}})};try{let r=await t.getSession();n(r?.user||null,r)}catch(r){console.warn("[fetch] Failed to restore auth session:",r.message)}t.onAuthStateChange&&t.onAuthStateChange((r,o)=>{n(o?.user||null,o)})},_y=async(t,e)=>{if(P(t.select))return t.auth!==!1&&await $u(t,e),t;if(t.__resolved)return t.auth!==!1&&await $u(t.__resolved,e),t.__resolved;if(t.__resolving)return t.__resolving;t.__resolving=yv(t);let n=await t.__resolving;return delete t.__resolving,n?(n.auth=t.auth,n.url=t.url,n.key=t.key,t.__resolved=n,e.fetch=n,t.auth!==!1&&await $u(n,e),n):null},xe=(t,e,...n)=>{let r=P(t[e])?t[e]:null;r&&r.call(t,...n,t,t.state,t.context)},Me=(t,e,n,...r)=>{let o=t&&P(t[n])?t[n]:null;o&&o.call(e,...r,e,e.state,e.context)},Za=t=>{let e={},n=t.node;if(!n)return e;if(n.tagName==="FORM"){let o=new FormData(n);for(let[s,i]of o.entries())e[s]=i;return e}let r=n.querySelectorAll("input, textarea, select");for(let o=0;o<r.length;o++){let s=r[o],i=s.name||s.getAttribute("name");i&&(s.type==="checkbox"?e[i]=s.checked:s.type==="file"?e[i]=s.files:e[i]=s.value)}return e},Fu=t=>t.responseType==="stream"||t.responseType==="response",$$=["Blob","File","ArrayBuffer","ReadableStream","Response"],py=t=>t!==null&&typeof t=="object"&&(ArrayBuffer.isView(t)||$$.includes(Object.prototype.toString.call(t).slice(8,-1))),ur=(t,e,n,r={})=>{if(!n&&py(e))return;let o=n&&n.startsWith("~/"),s=o&&t.state?.root||t.state;if(s?.update)if(o){let i=n.slice(2);e&&typeof e=="object"&&!Array.isArray(e)&&!py(e)&&i in e?s.update(e,{preventFetch:!0,...r}):s.update({[i]:e},{preventFetch:!0,...r})}else{let i=n?{[n]:e}:e;s.update(i,{preventFetch:!0,...r})}},Ze=(t,e)=>{let n=t?.__ref;n&&(n.__fetchStatus={...e,isError:!!e.error},n.__fetching=e.isFetching,n.__fetchError=e.error)},hv=(t,e,n)=>{let r=t.__pages&&t.__pages.length?t.__pages:[n];P(e.getNextPageParam)&&(t.__nextPageParam=e.getNextPageParam(r[r.length-1],r),t.__hasNextPage=t.__nextPageParam!=null),P(e.getPreviousPageParam)&&(t.__prevPageParam=e.getPreviousPageParam(r[0],r),t.__hasPreviousPage=t.__prevPageParam!=null)},On=async(t,e,n,r={})=>{let o=n?.fetch;if(!o||!e||!e.__ref)return;let s=e.__ref,i=Mu(e,n);(!s.__fetchScopeOwner||s.__fetchScopeOwner.scope!==i)&&(s.__fetchScopeOwner={scope:i});let a=s.__fetchScopeOwner,c=()=>e.__ref===s&&s.__fetchScopeOwner===a&&Mu(e,n)===i;if(t.enabled===!1||P(t.enabled)&&!t.enabled(e,e.state)||t.skip===!0||P(t.skip)&&t.skip(e,e.state))return;let l=await _y(o,n);if(!l||!c())return;let{from:f,method:u,query:d,params:p,cache:g,transform:h,single:m,auth:y,fields:S,as:b,limit:x,offset:_,order:w,headers:k,baseUrl:A,responseType:T,page:M,cursor:$,infinite:R,placeholderData:j,initialData:et,select:tt,keepPreviousData:it}=t,St=v(tt)?tt:void 0;if(d&&P(e.getQuery)){let Z=e.getQuery(l.name||"paths");Z&&(St=Z.select||Z.length&&Z.join(",")||St)}let Pt=Nu(p,e,n),bt=tc(M,e),Mt=tc($,e),z=yy(t),B=Fu(t)||z?null:my(g),nt=wv(t,z||xv(u)),U=Ja(e,n),V=B?gy(t,Pt,i,U,bt,Mt):null;if(!s.__fetchInitialized&&V&&(s.__fetchInitialized=!0,et!==void 0)){let Z=P(et)?et():et;Xa(V,Z,null)}if((u==="select"||u==="rpc")&&V&&B&&!r.refresh&&!r.force){let Z=Qa(V);if(Z&&!Z.error){let W=Date.now()-Z.time,jt=Z.stale||W>(B.staleTime||0);R&&D(Z.data)&&!s.__pages&&(s.__pages=[Z.data],hv(s,t,Z.data));let Y=Z.data;if(P(tt)&&(Y=tt(Y,e,e.state)),h&&(Y=h(Y,e,e.state)),!c())return;if(!jt){Ze(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!0,error:null,status:"success",fetchStatus:"idle"}),ur(e,Y,b);return}ur(e,Y,b)}else if(j!==void 0){let W=P(j)?j(e,e.state):j;W!==void 0&&ur(e,W,b)}}let rt=V&&!r.force?Tn.get(V):null;if(rt&&!dy(V,cy.get(rt)||0)){let Z=W=>{Ze(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:W,status:"error",fetchStatus:"idle"}),xe(e,"onFetchError",W),Me(t,e,"onFetchError",W)};try{let W=await Promise.race([rt,new Promise((jt,Y)=>setTimeout(()=>Y("DEDUP_TIMEOUT"),15e3))]);if(!c())return;if(W?.error)Z(W.error);else if(W?.data!==void 0){let jt=!R&&Du(V,cy.get(rt)||0),Y=jt?jt.data:W.data;if(P(tt)&&(Y=tt(Y,e,e.state)),h&&(Y=h(Y,e,e.state)),!c())return;ur(e,Y,b),xe(e,"onFetchComplete",Y),Me(t,e,"onFetchComplete",Y)}}catch(W){if(!c())return;W!=="DEDUP_TIMEOUT"&&Z(W)}return}let Ft=!Qa(V)?.data;Ze(e,{isFetching:!0,isLoading:Ft,isStale:!1,isSuccess:!1,error:null,status:"pending",fetchStatus:"fetching"}),xe(e,"onFetchStart"),Me(t,e,"onFetchStart");let Lt=n?.analyze?.emitNetwork,Qi=Lt?typeof performance<"u"?performance.now():Date.now():0;Lt&&Lt({phase:"start",mode:"query",from:f,method:u,cacheKey:V,lang:U});let Ji=async()=>{if(!c())return;if(y!==!1&&l.auth!==!1&&l.getSession){let Y=await l.getSession();if(!c())return;if(y===!0&&!Y){let mt={message:"Not authenticated"};return Ze(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:mt,status:"error",fetchStatus:"idle"}),xe(e,"onFetchError",mt),Me(t,e,"onFetchError",mt),{data:null,error:mt}}}let Z=l[u];if(!P(Z))return{data:null,error:{message:`Method "${u}" not found on adapter`}};let W={from:f,select:St,params:Pt,single:m,limit:x,offset:_,order:w,headers:k,baseUrl:A};T!==void 0&&(W.responseType=T);let jt=Ja(e,n);if(jt&&(W.headers={...W.headers,"Accept-Language":jt}),bt!==void 0){if(E(bt))bt.offset!==void 0&&(W.offset=bt.offset),bt.limit!==void 0&&(W.limit=bt.limit),bt.cursor!==void 0&&(W.params={...W.params,cursor:bt.cursor});else if(typeof bt=="number"){let Y=t.pageSize||x||20;W.offset=(bt-1)*Y,W.limit=Y}}if(Mt!==void 0&&(W.params={...W.params,cursor:Mt}),u==="insert"||u==="update"||u==="upsert"){let Y;if(S===!0||t.on==="submit")Y=Za(e);else if(D(S)){let mt=Za(e);Y={};for(let Br of S)Y[Br]=mt[Br]}else e.state?.parse?Y=e.state.parse():E(e.state)&&(Y={...e.state});h&&(Y=h(Y,e,e.state)),W.data=Y}if(u==="rpc"){let Y=Pt;if(t.on==="submit"){let mt=Za(e);Y=t.transformParams?t.transformParams(mt,e,e.state):mt}W.params=Y,W.read=!z&&t.read!==!1}if(u==="subscribe"){if(P(s.__unsubscribe)){let mt=s.__unsubscribe;s.__unsubscribe=null;try{mt()}catch{}}let Y=l.subscribe({from:f,params:Pt,on:t.subscribeOn},(mt,Br,K0)=>{c()&&(ur(e,mt,b),xe(e,"onFetchComplete",mt),Me(t,e,"onFetchComplete",mt))});return c()?(s.__unsubscribe=Y,{data:null,error:null,subscribed:!0}):(P(Y)&&Y(),{data:null,error:null,subscribed:!0})}return Z(W)},At=++Rn,Ge=Sv(Ji,nt);cy.set(Ge,At),V&&Tn.set(V,Ge);try{let Z=await Ge;if(z&&t.invalidates&&Z&&!Z.error&&!Z.subscribed&&vv(t.invalidates,f),!c()||Z?.subscribed)return;let{data:W,error:jt}=Z||{};if(jt){V&&!Du(V,At)&&Xa(V,null,jt,At),Ze(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:jt,status:"error",fetchStatus:"idle"}),xe(e,"onFetchError",jt),Me(t,e,"onFetchError",jt),Lt&&Lt({phase:"error",mode:"query",from:f,method:u,cacheKey:V,error:jt.message||jt,durationMs:(typeof performance<"u"?performance.now():Date.now())-Qi});return}if(W!==void 0){let Y=W;if((u==="select"||u==="rpc")&&V){let Br=!R&&Du(V,At);if(Br)Y=Br.data;else{let K0=Xa(V,W,null,At,dy(V,At));K0.gcTime=B?.gcTime||3e5}}let mt=Y;if(R&&D(W)&&((!s.__pages||!r.direction)&&(s.__pages=[]),r.direction==="previous"?s.__pages.unshift(W):s.__pages.push(W),mt=s.__pages.flat(),hv(s,t,W)),P(tt)&&(mt=tt(mt,e,e.state)),h&&(mt=h(mt,e,e.state)),!c())return;Ze(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!0,error:null,status:"success",fetchStatus:"idle"}),(!it||mt!==void 0)&&ur(e,mt,b),xe(e,"onFetchComplete",mt),Me(t,e,"onFetchComplete",mt),Lt&&Lt({phase:"success",mode:"query",ok:!0,from:f,method:u,cacheKey:V,durationMs:(typeof performance<"u"?performance.now():Date.now())-Qi})}}catch(Z){if(!c())return;Ze(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:Z,status:"error",fetchStatus:"idle"}),xe(e,"onFetchError",Z),Me(t,e,"onFetchError",Z),Lt&&Lt({phase:"error",mode:"query",from:f,method:u,cacheKey:V,error:Z.message||String(Z),durationMs:(typeof performance<"u"?performance.now():Date.now())-Qi})}finally{V&&Tn.get(V)===Ge&&Tn.delete(V)}},M$=(t,e,n)=>{let r=t.on,o=e.__ref;if(!o)return;o.__fetchListeners||(o.__fetchListeners=[]);let s=t.__runner||On;if(r==="submit"){let i=c=>{c.preventDefault(),s(t,e,n)},a=e.node;a&&(a.addEventListener("submit",i),o.__fetchListeners.push(()=>a.removeEventListener("submit",i)))}else if(r==="click"){let i=()=>s(t,e,n),a=e.node;a&&(a.addEventListener("click",i),o.__fetchListeners.push(()=>a.removeEventListener("click",i)))}else r==="stateChange"&&N$(t,e,n,s)},N$=(t,e,n,r)=>{let o=e.__ref,s,i=K(()=>{let a;try{a=JSON.stringify([Nu(t.params,e,n)??null,P(t.enabled)?!!t.enabled(e,e.state):t.enabled!==!1,P(t.skip)?!!t.skip(e,e.state):t.skip===!0,tc(t.page,e)??null])}catch{return}if(s===void 0){s=a;return}a!==s&&(s=a,Promise.resolve().then(()=>r(t,e,n)))});Array.isArray(o.__effects)?o.__effects.push(i):o.__fetchListeners.push(()=>i.dispose())},F$=(t,e,n)=>{let r=e.__ref;r.__fetchCleanups||(r.__fetchCleanups=[]),D$();let o=t.refetchInterval;if(o){let c=typeof o=="number"?o:Ya(o);if(c>0){let l=setInterval(()=>{(t.refetchIntervalInBackground||typeof document>"u"||document.visibilityState==="visible")&&On(t,e,n,{force:!0})},c);r.__fetchCleanups.push(()=>clearInterval(l))}}let s=Fu(t),i=t.refetchOnWindowFocus===void 0?!s:t.refetchOnWindowFocus!==!1,a=t.refetchOnReconnect===void 0?!s:t.refetchOnReconnect!==!1;if(i){let c=()=>{let l=by(t,e,n),f=Qa(l),u=my(t.cache);(!f||f.stale||Date.now()-f.time>(u?.staleTime||0))&&On(t,e,n,{force:!0})};xs.focus.add(c),r.__fetchCleanups.push(()=>xs.focus.delete(c))}if(a){let c=()=>On(t,e,n,{force:!0});xs.online.add(c),r.__fetchCleanups.push(()=>xs.online.delete(c))}},j$=(t,e,n)=>{if(!e.optimistic)return null;let r=t.__ref,o=e.as,s=t.state?.parse?t.state.parse():E(t.state)?{...t.state}:t.state;r.__optimisticSnapshot=s;let i=P(e.optimistic)?e.optimistic(n,s,t):e.optimistic;return i!==void 0&&ur(t,i,o),s},fy=(t,e)=>{let n=t.__ref;if(!n||!e.optimistic)return;let r=n.__optimisticSnapshot;r!==void 0&&(ur(t,r,e.as),delete n.__optimisticSnapshot)},hy=t=>{if(!t)return()=>!0;if(v(t))return e=>e.includes(t);if(D(t)){let e=t.join(":");return n=>n.includes(e)}return t instanceof RegExp?e=>(t.lastIndex=0,t.test(e)):P(t)?e=>{try{return!!t(e)}catch{return!1}}:()=>!1},B$=t=>{let e=[];for(let n of eo){if(!_v(n)){eo.delete(n);continue}let r=P$(n);r&&t(r)&&e.push(On(n.config,n.element,n.context,{refresh:!0}))}return Promise.allSettled(e).then(()=>{})},kv=t=>{Qk();for(let[e,n]of le)t(e)&&(n.stale=!0,Pn.set(e,++Rn));for(let[e]of Tn)!le.has(e)&&t(e)&&Pn.set(e,++Rn);return B$(t)},vv=(t,e)=>{let n=(D(t)?t:[t]).map(r=>r===!0||r==="*"?o=>o.startsWith(e+":"):r?hy(r):()=>!1);return kv(r=>n.some(o=>o(r)))},U$=t=>{for(let[e]of le)t(e)&&Iu(e);for(let[e]of Tn)t(e)&&Pn.set(e,++Rn)},V$=async(t,e,n)=>{let r=n?.fetch;if(!r)return;let o=await _y(r,n);if(!o)return;let s=e.__ref,{method:i,from:a,fields:c,transform:l,as:f,on:u,auth:d,headers:p,baseUrl:g,responseType:h,invalidates:m,optimistic:y,onMutate:S,onSuccess:b,onError:x,onSettled:_}=t,w;if(c===!0||u==="submit")w=Za(e);else if(D(c)){let M=Za(e);w={};for(let $ of c)w[$]=M[$]}else e.state?.parse?w=e.state.parse():E(e.state)&&(w={...e.state});l&&(w=l(w,e,e.state)),P(S)&&S(w,e,e.state);let k=y?j$(e,t,w):null;s.__fetching=!0,Ze(e,{isFetching:!0,isLoading:!1,isStale:!1,isSuccess:!1,error:null,status:"pending",fetchStatus:"fetching"}),xe(e,"onFetchStart"),Me(t,e,"onFetchStart");let A=n?.analyze?.emitNetwork,T=A?typeof performance<"u"?performance.now():Date.now():0;A&&A({phase:"start",mode:"mutation",from:a,method:i});try{if(d!==!1&&o.auth!==!1&&o.getSession){let St=await o.getSession();if(d===!0&&!St){k!==void 0&&fy(e,t);let Pt={message:"Not authenticated"};xe(e,"onFetchError",Pt),Me(t,e,"onFetchError",Pt);return}}let M=o[i];if(!P(M))return;let $={from:a,data:w,headers:p,baseUrl:g};h!==void 0&&($.responseType=h),t.params&&($.params=Nu(t.params,e,n));let R=Ja(e,n);R&&($.headers={...$.headers,"Accept-Language":R});let j=wv(t,!0),et=await Sv(()=>M($),j),{data:tt,error:it}=et||{};if(it){k!==void 0&&fy(e,t),Ze(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:it,status:"error",fetchStatus:"idle"}),xe(e,"onFetchError",it),P(x)&&x(it,w,e),P(_)&&_(null,it,w,e),A&&A({phase:"error",mode:"mutation",from:a,method:i,error:it.message||String(it),durationMs:(typeof performance<"u"?performance.now():Date.now())-T});return}if(delete s.__optimisticSnapshot,Ze(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!0,error:null,status:"success",fetchStatus:"idle"}),tt!==void 0&&(f||!py(tt))){let St=f?{[f]:tt}:tt;e.state?.update&&e.state.update(St,{preventFetch:!0})}xe(e,"onFetchComplete",tt),Me(t,e,"onFetchComplete",tt),P(b)&&b(tt,w,e),P(_)&&_(tt,null,w,e),A&&A({phase:"success",mode:"mutation",ok:!0,from:a,method:i,durationMs:(typeof performance<"u"?performance.now():Date.now())-T}),m&&vv(m,a)}catch(M){k!==void 0&&fy(e,t),Ze(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:M,status:"error",fetchStatus:"idle"}),xe(e,"onFetchError",M),Me(t,e,"onFetchError",M),P(x)&&x(M,w,e),P(_)&&_(null,M,w,e),A&&A({phase:"error",mode:"mutation",from:a,method:i,error:M.message||String(M),durationMs:(typeof performance<"u"?performance.now():Date.now())-T})}finally{s.__fetching=!1}},z$=t=>{let e=n=>{try{n()}catch{}};for(let n of t.__fetchCleanups||[])e(n);for(let n of t.__fetchListeners||[])e(n);P(t.__unsubscribe)&&e(t.__unsubscribe);for(let n of t.__fetchMounted||[])eo.delete(n);t.__fetchCleanups=[],t.__fetchListeners=[],t.__unsubscribe=null,t.__fetchMounted=[]},ec=(t,e,n,r)=>{if(!t||!r?.fetch)return;let s=pt(t,e);if(!s)return;let i=D(s)?s.map(c=>pv(pt(c,e),e)).filter(Boolean):[pv(s,e)].filter(Boolean),a=e.__ref;if(a.__fetchMounted)for(let c of a.__fetchMounted)eo.delete(c);a.__fetchMounted=[],!a.__fetchDisposer&&D(a.__effects)&&(a.__fetchDisposer={dispose:()=>z$(a)},a.__effects.push(a.__fetchDisposer));for(let c of i){let l=xv(c.method),f=l?V$:On,u=!l&&!yy(c)&&c.method!=="subscribe";if(c.on==="create"?f(c,e,r):Promise.resolve().then(()=>{M$({...c,__runner:f},e,r)}),u&&c.on==="create"&&((c.refetchInterval||c.refetchOnWindowFocus!==!1||c.refetchOnReconnect!==!1)&&F$(c,e,r),!Fu(c))){let d={element:e,ref:a,config:c,context:r};eo.add(d),a.__fetchMounted.push(d)}}a.refetch=c=>{for(let l of i)On(l,e,r,{force:!0,...c})},a.fetchNextPage=()=>{let c=i[0];if(!c||!c.infinite)return;let l=a.__nextPageParam;if(l==null)return;let f={...c,cursor:l};On(f,e,r,{direction:"next",force:!0})},a.fetchPreviousPage=()=>{let c=i[0];if(!c||!c.infinite)return;let l=a.__prevPageParam;if(l==null)return;let f={...c,cursor:l};On(f,e,r,{direction:"previous",force:!0})}},Ga={invalidateQueries:t=>kv(hy(t)),removeQueries:t=>{if(!t){Iu();return}U$(hy(t))},getQueryData:t=>Qa(t)?.data??void 0,setQueryData:(t,e)=>{let n=Qa(t),r=P(e)?e(n?.data):e;Xa(t,r,null)},prefetchQuery:async(t,e)=>{let n=e?.fetch;if(!n)return;let r=await _y(n,e);if(!r)return;let o=t.method||"select",s=Mu(null,e),i=Ja(null,e),a=gy({...t,method:o},t.params,s,i),c=r[o];if(!P(c))return;let l={from:t.from,params:t.params,limit:t.limit,offset:t.offset,order:t.order,single:t.single,headers:t.headers,baseUrl:t.baseUrl};i&&(l.headers={...l.headers,"Accept-Language":i}),t.responseType!==void 0&&(l.responseType=t.responseType),o==="rpc"&&(l.read=!yy(t)&&t.read!==!1);let f=++Rn,u=await c(l);if(u?.data!==void 0&&!u?.error&&!Fu(t)&&!Du(a,f)){let d=Xa(a,u.data,null,f,dy(a,f));d.gcTime=my(t.cache)?.gcTime||3e5}return u},getCache:()=>le,clear:()=>Iu(),dropNonLang:t=>{if(!t)return;let e=`:${t}`;for(let[n]of le)n.match(/:([a-z]{2,3})$/i)&&(n.endsWith(e)||Iu(n))}},gv=(t,e)=>E(t)?by({method:"select",...t},e,e?.context):t,ju={invalidateQueries(t){return Ga.invalidateQueries(t)},removeQueries(t){return Ga.removeQueries(t)},getQueryData(t){return Ga.getQueryData(gv(t,this))},setQueryData(t,e){return Ga.setQueryData(gv(t,this),e)}},wy={name:"fetch",create(t){let e=t.fetch;e&&(t.parent||Tn.clear(),ec(e,t,t.state,t.context))}},H$=ec});function oc(t){let e=this,{__ref:n}=e,r=[].concat(t),o=n.root[r[0]];if(!r||!r.length)return console.log(r,"on",e.key,"is undefined");for(;o.key===r[0]&&(r.shift(),!!r.length);)if(o=o[r[0]],!o)return;return o}function xy(t){let e=this,{parent:n}=e;if(P(t))return n.state&&t(n,n.state,n.context)?n:n.parent?n.lookup(t):void 0;if(e[t])return e[t];for(;n.param!==t;){if(n[t])return n[t];if(n=n.parent,!n)return}return n}function ky(t){let e=this,{__ref:n}=e,r=n?.__children;if(r)for(let o=0;o<r.length;o++){let s=r[o],i=e[s];if(s===t)return i;if(P(t)){let c=t(i,i.state,i.context);if(i.state&&c)return i}let a=i?.lookdown?.(t);if(a)return a}}function vy(t,e=[]){let n=this,{__ref:r}=n,o=r?.__children;if(o){for(let s=0;s<o.length;s++){let i=o[s],a=n[i];if(i===t)e.push(a);else if(P(t)){let c=t(a,a.state,a.context);a.state&&c&&e.push(a)}a?.lookdownAll?.(t,e)}return e.length?e:void 0}}function zu(t={}){let e=this;if(e.node?.style){for(let n in t){let r=t[n],o=e[n];if(E(r)&&o)zu.call(o,r);else if(r!=null){let s=n.replace(/[A-Z]/g,a=>"-"+a.toLowerCase()),i=String(r).replace(/\s*!important\s*$/,"");e.node.style.setProperty(s,i,"important")}}return e}}function Av(t){let e=this;if(Cn("beforeRemove",e,t)===!1)return e;P(e.node.remove)?e.node.remove():cr()||(console.warn("This item cant be removed"),e.log()),delete e.parent[e.key],e.parent.__ref&&(e.parent.__ref.__children=pa(e.parent.__ref.__children,e.key)),Cn("remove",e,t)}function Ey(t){return this[t]}function Ay(t,e){let n=this;if(t)return n.update(t,e),n}function Cy(t){return t?this.__ref&&this.__ref[t]:this.__ref}function Ty(){let t=this.getRef("__children");return Array.isArray(t)?t.map(e=>this[e]):[]}function sc(){return this.getRef().path}function ac(t){let e=null,n=r=>r.__element&&r.root?.isRootState;if(!this)e=Ev();else if(n(this))e=this.root;else if(this.__ref&&this.__ref.path){let r=this.state&&n(this.state),o=P(this.state)&&this.parent.state&&n(this.parent.state);(r||o)&&(e=this.state.root||this.parent.state.root)}return e||(e=Ev()),t?e?.[t]:e}function cc(t){let e=this?.__ref?.root||this.getRootState()?.__element;if(!e)throw new Error(`[smbls] getRoot() could not resolve a root element for "${this?.key||"<unknown>"}" \u2014 it has no __ref (never went through create()) and no root state is registered. Answering undefined here used to no-op silently for every caller.`);return Object.keys(e).length>0&&t?e[t]:e}function lc(t){return this.getRoot("data")&&Object.keys(this.getRoot("data")).length>0&&t?this.getRoot("data")[t]:this.getRoot("data")}function fc(t){let e=this.getRoot()?.context;return t?e[t]:e}function uc(t){let e=this.context;return t?e[t]:e}function Hu(){let t=this,e=[];for(let n in t)!Object.prototype.hasOwnProperty.call(t,n)||sr.has(n)&&!ba.has(n)||e.push(n);return e}function Wu(t=[]){let e=this,n={},r=Hu.call(e),o=r.includes("children"),s=t.length?new Set(t):null;for(let i=0;i<r.length;i++){let a=r[i];if(s&&s.has(a)||!Object.prototype.hasOwnProperty.call(e,a)||o&&a==="content")continue;let c=e[a];if(a==="state"){if(e.__ref&&!e.__ref.__hasRootState)continue;let l=P(c&&c.parse)?c.parse():c;n[a]=P(l)?l:JSON.parse(JSON.stringify(l||{}))}else if(a==="scope"){if(e.__ref&&!e.__ref.__hasRootScope)continue;n[a]=JSON.parse(JSON.stringify(c||{}))}else if(a==="props"){let{__element:l,update:f,...u}=e[a];n[a]=u}else It(c)&&Object.prototype.hasOwnProperty.call(e,a)&&(n[a]=c)}return n}function rc(t=[],e=new WeakSet){let n=this;if(e.has(n))return;e.add(n);let r=Wu.call(n,t),o=t.length?new Set(t):null;for(let s in r){if(o&&o.has(s)||!Object.prototype.hasOwnProperty.call(n,s))continue;let i=r[s];Array.isArray(i)?r[s]=i.map(a=>q(a)?rc.call(a,t,e):a):q(i)&&(r[s]=rc.call(i,t,e))}return r}function Es(...t){if(dr!=="test"&&dr!=="development")return;let e=this,{__ref:n}=e;return console.groupCollapsed(e.key),t.length?t.forEach(r=>console.log(`%c${r}:
|
|
22
|
-
`,"font-weight: bold",e[r])):(console.log(n.path),e.keys().forEach(o=>console.log(`%c${o}:`,"font-weight: bold",e[o]))),console.log(e),console.groupEnd(e.key),e}function Ry(...t){(
|
|
23
|
-
${
|
|
20
|
+
`);e[a]=T.eval(`(function(__gs__) { ${l}
|
|
21
|
+
return (${c}); })`)(e)}catch{try{e[a]=T.eval(`(${c})`)}catch{e[a]=c}}}for(let[i,a]of n)if(!r(i))try{e[i]=T.eval(`(${a})`)}catch{e[i]=a}return e},Zg=(t,e={verbose:!0})=>{try{return t?T.eval("("+t+")"):{}}catch(n){e.verbose&&console.warn(n)}},Qg=(t,...e)=>Object.prototype.hasOwnProperty.call(t,...e),qf=t=>{for(let e in t)return!1;return!0},Jg=t=>A(t)&&qf(t),tm=()=>Object.create(null),Aa=(t,e,n={})=>{let r=n.exclude||[],o=n.preventUnderscore;for(let s in e)r.includes(s)||!o&&Xr(s)||s==="constructor"||s==="prototype"||e[s]!==void 0&&(t[s]=e[s]);return t},to=(t,e,n=[])=>{let r=n instanceof Set;for(let o in e)Xr(o)||o==="constructor"||o==="prototype"||(r?n.has(o):n.includes(o))||(t[o]=e[o]);return t},ee=(t,e,n={},r=new WeakMap)=>{if(!q(t)||!q(e)||ie(t)||ie(e))return e;if(r.has(t))return r.get(t);r.set(t,t);let o=n.exclude,s=o?o instanceof Set?o:new Set(o):null,i=!n.preventForce;for(let a in e){if(!Object.prototype.hasOwnProperty.call(e,a)||s&&s.has(a)||i&&Xr(a)||a==="constructor"||a==="prototype")continue;let c=t[a],l=e[a];ie(l)?t[a]=l:q(c)&&q(l)?t[a]=ee(c,l,n,r):l!==void 0&&(t[a]=l)}return t},Kf=(t,e,n=new Set)=>{if(typeof t!="object"||typeof e!="object"||t===null||e===null)return t===e;if(n.has(t)||n.has(e))return!0;n.add(t),n.add(e);let r=Object.keys(t),o=Object.keys(e);if(r.length!==o.length)return!1;for(let s=0;s<r.length;s++){let i=r[s];if(!Object.prototype.hasOwnProperty.call(e,i)||!Kf(t[i],e[i],n))return!1}return!0},a$=new Set(["node","__ref"]),em=(t,e,n=a$)=>{if(t===e)return!0;if(!q(t)||!q(e)||ie(t)||ie(e))return t===e;let r=n instanceof Set?n:new Set(n),o=new WeakSet;function s(i,a){if(o.has(a))return!0;o.add(a);for(let c in a){if(!Object.prototype.hasOwnProperty.call(a,c)||r.has(c))continue;if(!Object.prototype.hasOwnProperty.call(i,c))return!1;let l=a[c],f=i[c];if(ie(l)||ie(f)){if(l!==f)return!1}else if(q(l)&&q(f)){if(!s(f,l))return!1}else if(l!==f)return!1}return!0}return s(t,e)},nm=(t,e)=>{if(e==null)return t;if(ae(e)("string","number"))delete t[e];else if(D(e))for(let n=0;n<e.length;n++)delete t[e[n]];else throw new Error("Invalid input: props must be a string or an array of strings");return t},Gf=t=>{if(t===null||typeof t!="object")return t;let e=Object.create(null);for(let n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=Gf(t[n]));return e},rm=(t,e)=>{if(t.length===0)return e;let n={},r=n;for(let o=0;o<t.length;o++)o===t.length-1&&e?r[t[o]]=e:(r[t[o]]={},r=r[t[o]]);return n},om=(t,e)=>{if(!Array.isArray(e))throw new Error("Path must be an array.");let n=t;for(let o=0;o<e.length-1;o++){if(n[e[o]]===void 0)return;n=n[e[o]]}let r=e[e.length-1];n&&Object.prototype.hasOwnProperty.call(n,r)&&delete n[r]},sm=(t,e,n)=>{if(!Array.isArray(e))throw new Error("Path must be an array.");let r=t;for(let o=0;o<e.length-1;o++)(!r[e[o]]||typeof r[e[o]]!="object")&&(r[e[o]]={}),r=r[e[o]];return r[e[e.length-1]]=n,t},im=(t,e)=>{if(!Array.isArray(e))throw new Error("Path must be an array.");let n=t;for(let r=0;r<e.length;r++){if(n==null)return;n=n[e[r]]}return n},am=t=>{let n=[],r=0;for(let o=0;o<t.length;o++)if(n.length<2)n.push(t[o]);else if(t[o]===n[o%2]?r++:(n=[t[o-1],t[o]],r=1),r>=20)return(uk==="test"||uk==="development")&&console.warn("Warning: Potential infinite loop detected due to repeated sequence:",n),!0},cm=t=>{let e=new WeakSet;function n(r){if(r&&typeof r=="object"){if(e.has(r))return!0;e.add(r);for(let o in r)if(Object.prototype.hasOwnProperty.call(r,o)&&n(r[o]))return console.log(r,"cycle at "+o),!0}return!1}return n(t)},lm=(t,e)=>{let n=e instanceof Set?e:new Set(e),r={};for(let o in t)Object.prototype.hasOwnProperty.call(t,o)&&!n.has(o)&&(r[o]=t[o]);return r}});var Ca,Ta,Oa,Yf=L(()=>{"use strict";dn();Ca=(function(){let t=0;function e(){return t++,t}return e})(),Ta=Ca,Oa=(t,e,n)=>(pt(n,t)||n||t.key||Ca()).toString()});var Ye,fm,cr,Xf,um,dm,pm,lr,hm,An,Q,Zf=L(()=>{"use strict";Ye="production",fm=Ye,cr=(t=Ye)=>t==="production",Xf=(t=Ye)=>t==="testing"||t==="test",um=Xf,dm=(t=Ye)=>t==="staging",pm=(t=Ye)=>t==="local",lr=(t=Ye)=>t==="development"||t==="dev"||t==="local",hm=(t,e=Ye)=>e[t],An=(t=Ye)=>!cr(t),Q=t=>{let e=t&&"env"in t?t.env:typeof process<"u"&&process.env?"production":void 0;if(e&&e!=="production")return!0;let n=t&&"hostname"in t?t.hostname:typeof location<"u"?location.hostname:void 0;return typeof n=="string"&&n?n==="localhost"||n==="127.0.0.1"||n.endsWith(".localhost"):!1}});function Ra(t,e,n){let r;return function(){let o=this,s=arguments,i=function(){r=null,n||t.apply(o,s)},a=n&&!r;clearTimeout(r),r=setTimeout(i,e),a&&t.apply(o,s)}}function ym(t,e=window){let n=function(){return t.apply(e,arguments)};for(let r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}var gm,mm,c$,gs,ms,ys,Ct,fr=L(()=>{"use strict";gm=(t,e,n=300)=>{let r;return(...o)=>{clearTimeout(r),r=setTimeout(()=>{e.apply(t,o)},n)}},mm=t=>{let e={};return(...n)=>{let r=n[0];if(r in e)return e[r];{let o=t(r);return e[r]=o,o}}},c$=/^\s*(?:async\s+)?(?:function\b|\([^)]*\)\s*=>|[a-zA-Z_$][\w$]*\s*=>)/,gs=t=>c$.test(t),ms=t=>{let e=t?.plugins;if(!e||!e.length)return!1;for(let n of e)if(n.resolveHandler)return!0;return!1},ys=(t,e)=>{if(typeof t=="function")return t;let n=e?.context?.plugins;if(!n)return t;for(let r of n)if(r.resolveHandler){let o=r.resolveHandler(t,e);if(typeof o=="function")return o}return t},Ct=(t,e,...n)=>{let r=e?.context?.plugins;if(!r)return!1;let o=!1;for(let s of r)typeof s[t]=="function"&&(s[t](e,...n),o=!0);return o}});var bm,Ok=L(()=>{"use strict";Ut();dn();bm=(t,e)=>{let{__ref:n}=t,r=t.if;if(P(r)){let o;try{o=r(t,t.state,t.context)}catch(s){typeof console<"u"&&console.warn("[DOMQL] if condition error:",s),delete n.__if;return}o?n.__if=!0:delete n.__if}else r!=null&&typeof r=="object"?pt(r,t)?n.__if=!0:delete n.__if:n.__if=!0}});var _m,wm,Rk=L(()=>{"use strict";_m=(t,...e)=>{t&&e.map(n=>console.log(n))},wm=(t,e,...n)=>{t&&(console.group(e),n.map(r=>console.log(r)),console.groupEnd(e))}});function Em(t){let e;try{if(!window.localStorage)return;e=window.localStorage.getItem(t)}catch{return}if(e!==null)try{return JSON.parse(e)}catch{return}}function Am(t,e){if(e!=null)try{if(!window.localStorage)return;let n=typeof e=="object"?JSON.stringify(e):e;window.localStorage.setItem(t,n)}catch{}}var Sm,xm,km,vm,Pk=L(()=>{"use strict";Ut();ca();Sm=typeof navigator>"u"?!1:/Mobi/.test(navigator.userAgent),xm=(t,e,n=365)=>{if(Bt(dt)||Bt(dt.cookie))return;let r=new Date;r.setTime(r.getTime()+n*24*60*60*1e3);let o=`expires=${r.toUTCString()}`;dt.cookie=`${t}=${e};${o};path=/`},km=t=>{if(Bt(dt)||Bt(dt.cookie))return;let e=`${t}=`,r=decodeURIComponent(dt.cookie).split(";");for(let o=0;o<r.length;o++){let s=r[o];for(;s.charAt(0)===" ";)s=s.substring(1);if(s.indexOf(e)===0)return s.substring(e.length,s.length)}return""},vm=t=>{Bt(dt)||Bt(dt.cookie)||(dt.cookie=t+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;")}});var bs,Lk,Cm,Tm=L(()=>{"use strict";bs={root:["body","html"],head:["title","base","meta","style","noscript","script"],body:new Set(["string","style","fragment","a","abbr","acronym","address","applet","area","article","aside","audio","b","basefont","bdi","bdo","big","blockquote","br","button","canvas","caption","center","cite","code","search","col","colgroup","data","datalist","dd","del","details","dfn","dialog","dir","div","dl","dt","em","embed","fieldset","figcaption","figure","font","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","i","iframe","img","input","ins","kbd","label","legend","li","link","main","map","mark","meter","nav","noframes","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","hgroup","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strike","strong","sub","summary","sup","table","tbody","td","template","hgroup","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr","svg","path","circle","ellipse","line","polygon","polyline","rect","g","defs","symbol","use","text","tspan","image","clipPath","mask","pattern","marker","linearGradient","radialGradient","stop","filter","feGaussianBlur","feOffset","feMerge","feMergeNode","feBlend","feColorMatrix","feFlood","feComposite","foreignObject"])},Lk=new Set(["svg","path","circle","ellipse","line","polygon","polyline","rect","g","defs","symbol","use","text","tspan","image","clipPath","mask","pattern","marker","linearGradient","radialGradient","stop","filter","feGaussianBlur","feOffset","feMerge","feMergeNode","feBlend","feColorMatrix","feFlood","feComposite","foreignObject"]),Cm=t=>bs.body.has(t)});var Om,Dk,_s,$e,ws,Da,pn,Rm,Qf,Ia,Pm,$a,Jf,tu,Ma,eu,Ss,l$,hn,Ik,Pa,Na,Lm,La,Dm,Im,nu,ru,ou,su,iu,au,$k,cu=L(()=>{"use strict";us();$m();dn();Ut();Om="production",Dk=t=>t.sourcemap!==!1&&Om!=="production",_s=t=>{if(!t)return[];let e=[],n=t.extends;n&&(D(n)?e.push(...n):e.push(n));let r=t.extend;return r&&(D(r)?e.push(...r):e.push(r)),e},$e=t=>{if(!D(t))return t;let e=[];for(let n=t.length-1;n>=0;n--){let r=t[n];e.push(D(r)?$e(r):r)}return e},ws=t=>{if(t.includes("+"))return t.split("+").filter(gn);if(t.includes("_")){let[e]=t.split("_");return[e]}if(t.includes(".")&&!gn(t.split(".")[1])){let[e]=t.split(".");return[e]}return[t]},Da=(t,e,n)=>{let r=[],o=ws(n);o&&(r=[...o]);let s=$e(_s(t));return s.length&&(r=[...r,...s]),r},pn=(t,e)=>{let{__ref:n}=e,{__extends:r}=n;if(!t)return r;let o=e.variant,s=e.context;if(o&&s?.components&&!Array.isArray(t)&&typeof t=="string"){let i=`${t}.${o}`;s.components[i]&&(t=i)}return r.includes(t)||(r=Array.isArray(t)?[...r,...t]:[...r,t],n.__extends=r),r},Rm=(t,e)=>{if(!t)return e;let{extends:n}=e,r=D(n)?n:[n],o=D(t)?t:[t];return{...e,extends:ls(o,r)}},Qf=()=>Math.random().toString(36).substring(2),Ia={},Pm={},$a=t=>Ia[t.__hash],Jf=(t,e)=>{let n=Qf();return v(t)||(t.__hash=n),n!=="__proto__"&&n!=="constructor"&&n!=="prototype"&&(Ia[n]=e),e},tu=(t,e)=>t.__hash?e.concat($a(t)):Jf(t,e),Ma=(t,e,n,r=new Set,o,s)=>{for(let i of t)D(i)?Ma(i,e,n,r,o,s):Ss(i,e,n,r,o,void 0,s);return e},eu=(t,e,n,r=new Set,o,s,i)=>{let a=_s(t),c={...t};delete c.extends,delete c.extend;let l=!1;for(let f in c){l=!0;break}return l&&(e.push(c),o&&o.push(s)),a.length&&Ss($e(a),e,n,r,o,s,i),e},Ss=(t,e,n,r=new Set,o,s,i)=>{if(!t||r.has(t))return e;if(D(t))return Ma(t,e,n,r,o,i);let a=s;return v(t)?(a=t,t=Na(t,n)):i&&A(t)&&i.has(t)&&(a=i.get(t)),r.has(t)||(r.add(t),t?.extends||t?.extend?eu(t,e,n,r,o,a,i):t&&(e.push(t),o&&o.push(a))),e},l$=new Set(["parent","node","__ref","__proto__","extends","extend","childExtends","childExtendsRecursive"]),hn=(t,e,n,r,o)=>{e=ut(e);for(let s in e){if(l$.has(s))continue;let i=t[s],a=e[s];if(a!==void 0&&Object.prototype.hasOwnProperty.call(e,s)&&s!=="__proto__"&&s!=="constructor"&&s!=="prototype"){if(i===void 0)t[s]=a,n&&r?A(a)&&!D(a)?(n[s]=n[s]||{},Ik(n[s],a,r)):n[s]=r:n&&o?.[s]&&(n[s]=o[s]);else if(A(i)&&A(a)){let c=n?n[s]=n[s]||{}:void 0,l=o?.[s];gn(s)?t[s]=hn(i,a,c,r,l):hn(i,a,c,r,l)}if(s==="extends"||s==="childExtends"||s==="childExtendsRecursive"){if(D(i)&&D(a))t[s]=i.concat(a);else if(D(i)&&A(a)){let c=hn({},i);t[s]=hn(c,a)}}}}return t},Ik=(t,e,n,r)=>{if(r||(r=new WeakSet),!r.has(e)){r.add(e);for(let o in e){if(!Object.prototype.hasOwnProperty.call(e,o)||o==="__proto__"||o==="constructor"||o==="prototype")continue;let s=e[o];A(s)&&!D(s)?(t[o]=t[o]||{},Ik(t[o],s,n,r)):t[o]=n}}},Pa=(t,e,n)=>t.reduce((r,o,s)=>{let i=ut(o),a=n?n[s]:void 0;return hn(r,i,e,a)},{}),Na=(t,e,n={},r)=>{let o=e?.components||n.components,s=e?.pages||n.pages;if(v(t)){let i=o&&(o[t+"."+r]||o[t]||o["smbls."+t]),a=s&&t.charCodeAt(0)===47&&s[t];if(i)return i;if(a)return a;n.verbose&&(Om==="test"||Om==="development")&&console.warn("Extend is string but component was not found:",t);return}return t},Lm=(t,e)=>[].concat(t.slice(0,1)).concat(e.slice(0,1)).concat(t.slice(1)).concat(e.slice(1)),La=(t,e,n,r)=>{if(!t)return[];if(t.__hash)return $a(t)||[];let s=Ss(t,[],e,new Set,n,void 0,r);return n?s:tu(t,s)},Dm=(t,e)=>{if(!t)return e;let n=D(t)?t:[t];return ls(n,e)},Im=t=>{let e=[];function n(r){for(let o in r)Object.prototype.hasOwnProperty.call(r,o)&&(gn(o)&&e.push(o),o==="extends"&&(typeof r[o]=="string"?e.push(r[o]):Array.isArray(r[o])&&(e=e.concat(r[o]))),typeof r[o]=="object"&&r[o]!==null&&n(r[o]))}return n(t),e},nu=(t,e,n={})=>{let{__ref:r}=t,o=t.context||e.context,s=t.variant,i=_s(t);if(i.length){let a=$e(i),[c,...l]=a,f=typeof c=="string"&&s&&o?.components?`${c}.${s}`:null;f&&o.components[f]?pn([f,...l],t):pn(a,t)}return ru(t,e,n),ou(t,e,n),su(t,e,n),t.component&&pn($e(pt(t.component,t)),t),o.defaultExtends&&pn($e(o.defaultExtends),t),fs(r.__extends)},ru=(t,e,n={})=>{let{__ref:r}=t;return n.ignoreChildExtends||t.ignoreChildExtends||e.childProps?.extends&&pn($e(e.childProps.extends),t),r.__extends},ou=(t,e,n={})=>{let{__ref:r}=t,o=n.ignoreChildExtends||t.ignoreChildExtends,s=e.childExtends;return!o&&s&&pn($e(s),t),r.__extends},su=(t,e,n={})=>{let{__ref:r}=t,o=e.childExtendsRecursive,s=n.ignoreChildExtendsRecursive||t.ignoreChildExtendsRecursive,i=t.key==="__text";return o&&!i&&!s&&pn($e(o),t),r.__extends},iu=(t,e,n={})=>{let{__ref:r}=t,o=t.context||e.context,s=t.variant,i=Dk(n),a=i?[...r.__extends]:null,c=fs(r.__extends.map((l,f)=>Na(l,o,n,f===0&&s)));if(i){let l=new WeakMap;for(let d=0;d<c.length;d++){let p=c[d],g=a[d];p&&A(p)&&v(g)&&l.set(p,g)}let f=[],u=La(c,o,f,l);r.__extendsStack=u,r.__extendsNames=f}else{let l=La(c,o);r.__extendsStack=l}return r.__extendsStack},au=(t,e,n={})=>{let{__ref:r}=t,{__extendsStack:o}=r;if(Dk(n)){let s={},i=r.__extendsNames||[],a=Pa(o,s,i),c={};hn(t,a,c,void 0,s),r.__sourcemap=c}else{let s=Pa(o);hn(t,s)}return t},$k=(t,e,n={})=>(nu(t,e,n),iu(t,e,n),au(t,e,n),t)});function Mm(t){return Object.keys(t).filter(e=>/^[A-Z]/.test(e))}function Nm(t){return Object.keys(t).filter(e=>/^\d+$/.test(e))}function Fm(t,e,n){let{context:r}=e||{},[o]=ws(n),s=n||o;return r?.components?.[s]||r?.pages?.[s]}var gn,$m=L(()=>{"use strict";cu();Ut();gn=t=>{if(!v(t)||!t.length)return!1;let e=t.charCodeAt(0);return e>=65&&e<=90}});function Mk(t,e){let{props:n,on:r}=e,o=Wr(t.split("on")[1]),s=r[o],i=n[t];P(s)?r[o]=(...a)=>{if(s(...a)!==!1&&P(i))return i(...a)}:r[o]=i}var Nk=L(()=>{"use strict";ya();Ut()});function lu(t,e={}){let n=e.cachedKeys||[];for(let r in t){let o=t[r];if(r.length>2&&r.charCodeAt(0)===111&&r.charCodeAt(1)===110&&r[2]===r[2].toUpperCase()&&(P(o)||o!=null&&ms(this.context))){let g=Wr(r.slice(2));t.on&&(t.on[g]=o),delete t[r];continue}if(r==="childProps"){t.props[r]=o,delete t[r],n.push(r);continue}let a=this.define?.[r],c=this.context?.define?.[r],l=A(a)||P(a),f=A(c)||P(c);if(l||f)continue;let u=r.charAt(0);if(jk.has(u)){t.props[r]=o,delete t[r],n.push(r);continue}let d=jm.test(r)||Fk.test(r)||u$(o),p=sr.has(r);!d&&!p&&(r in t.props||(t.props[r]=o),delete t[r],n.push(r))}return t}function fu(t=this,e){let n=e.cachedKeys||[];for(let r in t.props){let o=t.props[r],s=r.length>2&&r.charCodeAt(0)===111&&r.charCodeAt(1)===110,i=P(o)||o!=null&&ms(this.context);if(s&&i){Mk(r,t),delete t.props[r];continue}if(n.includes(r)||r==="childProps")continue;let a=r.charAt(0);if(jk.has(a))continue;let c=this.define?.[r],l=this.context?.define?.[r],f=A(c)||P(c),u=A(l)||P(l),d=jm.test(r)||Fk.test(r),p=sr.has(r);(d||p||f||u)&&(t[r]===void 0||o===null)&&(t[r]=o,t.props&&delete t.props[r])}return t}function uu(t=this){let e=[];return lu.call(this,t,{cachedKeys:e}),fu.call(this,t,{cachedKeys:e}),t}function Bm(t={}){return t.on||(t.on={}),t.props||(t.props={}),uu.call(this,t)}function Vm(t,e){this.__element.update({props:t},e)}function Va(t){let e={update:Vm.bind(t.props),__element:t};Object.setPrototypeOf(t.props,e)}var jm,Fk,jk,f$,u$,Ba,Fa,Um,Ua,za,Ha,du,ja,zm,Hm,Wm=L(()=>{"use strict";Gr();Nk();dn();Ut();ya();fr();jm=/^[A-Z]/,Fk=/^\d+$/,jk=new Set([":","@","[","*","+","~","&",">","$","-",".","!"]),f$=new Set(["extend","props","text","tag","on","if","childExtend","children","childrenAs","state","html","attr","define","content"]),u$=t=>{if(!t||typeof t!="object"||Array.isArray(t))return!1;for(let e in t)if(f$.has(e)||jm.test(e))return!0;return!1},Ba=(t,e,n)=>{let{props:r,__ref:o}=t;if(o.__propsStack=[],r)o.__initialProps=r;else return{};return q(r)?{...r}:(o.__propsStack.push(r),{})};Fa=t=>ae(t)("string","number")?{inheritedString:t}:t,Um=(t,e)=>!t||!e.length?!1:e.includes(t),Ua=(t,e)=>{let{__ref:n}=t,r=n.__propsStack||[],o=e.props;if(!o)return r;let s=o[t.key],i=o.childProps||e.childProps,a=t.props?.ignoreChildProps;if(i&&!a){let c=Fa(i);r.unshift(c)}if(s){let c=Fa(s);r.unshift(c)}return r};za=t=>{let e=new Set;return t.filter(n=>!n||ir.has(n)||e.has(n)?!1:(e.add(n),!0))},Ha=(t,e,n)=>(e.props=t.reduce((r,o)=>{if(ir.has(o))return r;for(;P(o);)o=pt(o,e);return ft(r,ut(o,{exclude:ir}))},{}),Va(e),e.props),du=(t,e)=>{let{props:n,__ref:r}=t,o=r.__propsStack||[];if(e?.props&&(o=[...Ua(t,e)]),A(n)?o.push(n):n==="inherit"&&e?.props?o.push(e.props):n&&o.push(n),D(r.__extendsStack))for(let s=0;s<r.__extendsStack.length;s++){let i=r.__extendsStack[s];i.props&&i.props!==n&&o.push(i.props)}return r.__propsStack=za(o),r.__propsStack},ja=(t,e)=>{let{__ref:n}=t,r=du(t,e);r.length?Ha(r,t):(n.__propsStack=[],t.props={})},zm=function(t,e,n){let{__ref:r}=t;if(r.__if)ja(t,e);else try{ja(t,e)}catch(o){t.context?.designSystem?.verbose&&console.warn("initProps error at",r.path?.join("."),o),t.props={},r.__propsStack=[]}return Va(t),t},Hm=(t,e,n)=>{let{__ref:r}=e,s=[...r.__propsStack||[]],i=Ua(e,n);return i.length&&(s=[...i,...s]),t&&(s=[t,...s]),r.__propsStack=za(s),r.__propsStack.length&&Ha(r.__propsStack,e),e}});var Bk,pu,hu,gu,mu,qm,yu,bu,_u,Km,Uk=L(()=>{"use strict";cu();Yf();fa();Wm();Tm();Ut();Bk="production",pu=(t,e,n)=>{let r=e.childExtends&&e.childExtends.tag,o=e.childProps&&e.childProps.tag,s=bs.body.has(n)&&n;return{text:t,tag:r||o||s||"string"}},hu=(t,e,n)=>{if(t===void 0)return(Bk==="test"||Bk==="development")&&console.warn(n,"element is undefined in",e?.__ref?.path),{};if(t!==null)return t===!0?{}:ae(t)("string","number")?pu(t,e,n):P(t)?{props:t}:t},gu=(t,e)=>{let n={};return n.origin=t,n.parent=e,n},mu=(t,e,n,r,o)=>{if(!e)return o;if(En(e)){let s={key:":root",node:e};return o[`${n}_parent`]=s,s}return e},qm=(t,e)=>{let{__ref:n}=t,{__ref:r}=e,o=e&&e.key===":root";n?.root||(n.root=o?t:r?.root)},yu=(t,e,n)=>{let{__ref:r}=e;return r||(r=e.ref={}),r.path||(r.path=[]),r.path.concat(n)},bu=(t,e,n,r,o)=>(r.context&&!o.context&&!t.context&&(o.context=r.context),r.context||e.context||o.context||t.context),_u=(t,e,n)=>{let r=gu(t,e);return t.__ref=r,r.__defineCache||(r.__defineCache={}),r.__exec||(r.__exec={}),r.__execProps||(r.__execProps={}),r.__class||(r.__class={}),r.__classNames||(r.__classNames={}),r.__attr||(r.__attr={}),r.__changes||(r.__changes=[]),r.__children||(r.__children=[]),r.__extends=Da(t,e,n),r.path=yu(t,e,n),r},Km=(t,e,n,r,o)=>{let i=t?.__hash?{extends:[t]}:hu(t,e,n);if(!i)return;let a=mu(i,e,n,r,o),c=Oa(i,a,n);_u(i,a,c);let l=Ba(i,a,c),f=bu(i,a,c,r,o),u=i.on||{};return{...i,key:c,props:l,parent:a,context:f,on:u}}});var Gm,wu,Su,xu,ku,Ym,vu,Xm,Zm,Qm,Jm,Vk,ur,eo,zk,Hk,Wk,Wa,mn,qk=L(()=>{"use strict";us();Gr();dn();Ut();Gm=t=>{let{state:e,props:n,__ref:r}=t,o=n?.state||e;return ae(o)("string","number")?(r.__state=o,{value:o}):o===!0?(r.__state=t.key,{}):o?(r.__hasRootState=!0,o):!1},wu=(t,e)=>{if(!t.includes("~/"))return;if(t.split("~/").length>1)return e.root},Su=(t,e)=>{if(!t.includes("../"))return;let r=t.split("../").length-1;for(let o=0;o<r;o++){if(!e.parent)return null;e=e.parent}return e},xu=(t,e,n={})=>{let r=v(t)?t.split("/"):[t],o=r.length-1;for(let s=0;s<o;s++){let i=r[s],a=r[s+1];if(i==="__proto__"||a==="__proto__")return;let c=e[i];c||(c=e[i]={}),c[a]||(c[a]={}),t=a,e=c}return n.returnParent?e:e[t]},ku=(t,e,n={})=>{let o=t.__ref.__state;if(!vu(t))return;let s=wu(o,e.state),i=e.state;if(s)i=s,o=o.replaceAll("~/","");else{let a=Su(o,e.state);a&&(i=a,o=o.replaceAll("../",""))}if(i)return xu(o,i,n)},Ym=(t,e)=>{let n=t.__ref,r=ku(t,e);if(r===void 0)return t.state;if(ae(r)("object","array"))return ut(r);if(ae(r)("string","number","boolean"))return n.__stateType=typeof r,{value:r};console.warn(n.__state,"is not present. Replacing with",{})},vu=t=>{let{__ref:e}=t,n=e?.__state;return!!(n&&ae(n)("number","string","boolean"))},Xm=function(t){return q(t)?!!(t.update&&t.parse&&t.clean&&t.create&&t.parent&&t.destroy&&t.rootUpdate&&t.parentUpdate&&t.keys&&t.values&&t.toggle&&t.replace&&t.quietUpdate&&t.quietReplace&&t.add&&t.apply&&t.applyReplace&&t.setByPath&&t.setPathCollection&&t.removeByPath&&t.removePathCollection&&t.getByPath&&t.applyFunction&&t.__element&&t.__children):!1},Zm=(t,e)=>{if(!t)return e||{};let n=t.split("/"),r={},o=r,s=n.length-1;for(let i=0;i<=s;i++)o[n[i]]=i===s?e||{}:{},o=o[n[i]];return r},Qm=(t,e)=>{let{__element:n}=e,r=n?.state;if(!r)return;let o=ut(r,qr),s={[t.key]:o},i=A(r.__depends)?{...r.__depends,...s}:s;return Array.isArray(r)?ha(r,{...Object.getPrototypeOf(r),__depends:i}):Object.setPrototypeOf(r,{...Object.getPrototypeOf(r),__depends:i}),o},Jm=(t,e,n={})=>{let{overwrite:r}=n;if(!r)return;let o=r==="shallow";if(r==="merge"){ft(t,e,qr);return}(o?to:ee)(t,e,qr)},Vk="__polyglotSeededKeys",ur=t=>{if(!A(t))return new Set;let e=t[Vk];if(!(e instanceof Set)){e=new Set;try{Object.defineProperty(t,Vk,{value:e,enumerable:!1,writable:!0,configurable:!0})}catch{}}return e},eo=(t,e,n)=>ur(t).has(e)?!0:!A(n)||n[e]===void 0,zk="__polyglotSeededValues",Hk=t=>{if(!A(t))return new Map;let e=t[zk];if(!(e instanceof Map)){e=new Map;try{Object.defineProperty(t,zk,{value:e,enumerable:!1,writable:!0,configurable:!0})}catch{}}return e},Wk=t=>{if(t===null||typeof t!="object")return typeof t+":"+String(t);try{return"json:"+JSON.stringify(t)}catch{return null}},Wa=(t,e,n)=>{if(!ur(t).has(e))return!1;let r=Hk(t);if(!r.has(e))return!0;let o=A(n)||Array.isArray(n)?n[e]:void 0,s=Wk(o);return s!==null&&s===r.get(e)},mn=(t,e,...n)=>(ur(t).add(e),n.length&&Hk(t).set(e,Wk(n[0])),e)});var d$,ty,Kk=L(()=>{"use strict";d$=(t,e)=>{let n=e;for(;n;){if(n===t)return!0;n=Object.getPrototypeOf(n)}return!1},ty=(t,e)=>{let{__ref:n}=t,r=t.context||e.context||n.root?.context;r&&!r.globalScope&&(r.globalScope={});let o=e.scope||n.root?.scope,s=r?.globalScope;if(!t.scope)o?t.scope=o:s?t.scope=Object.create(s):t.scope={};else if(typeof t.scope=="object"&&t.scope!==null&&Object.getPrototypeOf(t.scope)===Object.prototype){let i=o||s;i&&!d$(t.scope,i)&&Object.setPrototypeOf(t.scope,i)}}});var Gk,Eu,Cn,Au,ey,ny=L(()=>{"use strict";Ut();fr();Gk=(t,e)=>{let n="on"+t.charAt(0).toUpperCase()+t.slice(1);return e[n]},Eu=(t,e,n,r,o)=>{if(t=ys(t,e),!!P(t))try{let s=t.call(e,e,n||e.state,r||e.context,o);return s&&typeof s.then=="function"&&s.catch(i=>{e.error=i,i instanceof ReferenceError?console.warn("[DOMQL] Async event warning:",i.message):console.error("[DOMQL] Async event error:",i)}),s}catch(s){if(e.error=s,s instanceof ReferenceError?console.warn("[DOMQL] Event handler warning:",s.message):console.error("[DOMQL] Event handler error:",s),e.context?.strictMode)throw s}},Cn=(t,e,n)=>{if(!e)throw new Error("Element is required");Ct(t,e,n);let r=Gk(t,e);if(r){let{state:o,context:s}=e;return Eu(r,e,o,s,n)}},Au=(t,e,n,r,o,s)=>{if(t=ys(t,n),!!P(t))try{let i=t.call(n,e,n,r||n.state,o||n.context,s);return i&&typeof i.then=="function"&&i.catch(a=>{n.error=a,console.error("[DOMQL] Async event update error:",a)}),i}catch(i){if(n.error=i,console.error("[DOMQL] Event update error:",i),n.context?.strictMode)throw i}},ey=(t,e,n,r)=>{Ct(t,n,e,r);let o=Gk(t,n);if(o){let{state:s,context:i}=n;return Au(o,e,n,s,i,r)}}});var ry,qa,oy=L(()=>{"use strict";ry={},qa={}});var Cu,Ka,Yk,sy,Xk,Zk,Qk,Jk,tv,Tu=L(()=>{"use strict";Cu="@symbo.ls/fetch:EARLY",Ka=(t,e)=>{let n=new URL(t);return n.searchParams.sort(),n.toString()+" "+(e||"")},Yk=t=>{if(t==null)return!0;if(typeof t!="object"||Array.isArray(t))return!1;let e=Object.getPrototypeOf(t);if(e!==Object.prototype&&e!==null)return!1;for(let n in t){let r=t[n];if(!(r===void 0||typeof r=="string"||typeof r=="boolean")&&!(typeof r=="number"&&isFinite(r)))return!1}return!0},sy=()=>Symbol.for(Cu),Xk=(t,e)=>{if(!t||typeof t!="object"||!e||typeof e!="object")return t;let n={...t};return n.query===void 0&&e.query!==void 0&&(n.query=e.query),n.rpc===void 0&&e.rpc!==void 0&&(n.rpc=e.rpc),n},Zk=(t,e)=>{let n=sy();if(!t||typeof t!="object"){let i=globalThis[n];return i&&i.seeded?{carried:{},rpc:!1,maxAge:3e4}:null}let r=globalThis[n];r||(r={time:Date.now(),entries:{}},globalThis[n]=r),r.closed=!0;let o={};for(let i in t.query||{})for(let a in e||{})a.toLowerCase()===i.toLowerCase()&&(o[a.toLowerCase()]=e[a]);let s=typeof t.maxAge=="number"&&t.maxAge>=0?t.maxAge:3e4;return{carried:o,rpc:t.rpc==="get",maxAge:s}},Qk=(t,e=3e4)=>{let n=globalThis[sy()],r=n&&n.entries&&n.entries[t];return!r||(delete n.entries[t],!(Date.now()-r.time<=e))?null:Promise.resolve(r.answer).then(o=>o&&o.ok&&!o.bodyUsed?o:null,()=>null)},Jk=()=>{let t=globalThis[sy()];t&&t.entries&&(t.entries={})},tv=t=>{let e=(Array.isArray(t)?t:[]).filter(r=>r&&typeof r.url=="string"&&typeof r.body=="string");if(!e.length)return"";let n=JSON.stringify(e.map(r=>({k:Ka(r.url,r.lang||""),s:r.status||200,t:r.type||"application/json",b:r.body}))).replace(/</g,"\\u003c").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029");return"<script>(function(){try{var k=Symbol.for("+JSON.stringify(Cu)+"),r=globalThis[k]||(globalThis[k]={time:Date.now(),entries:{}}),t=Date.now(),l="+n+';r.seeded=true;r.entries=r.entries||{};for(var i=0;i<l.length;i++){var e=l[i];r.entries[e.k]={time:t,answer:Promise.resolve(new Response(e.b,{status:e.s,headers:{"content-type":e.t}}))}}}catch(e){}})()<\/script>'}});var av={};F(av,{buildUrl:()=>ay,restAdapter:()=>iv,selectQuery:()=>ov,setup:()=>k$});var ay,ov,sv,ev,p$,h$,g$,nv,Xe,m$,y$,b$,iy,_$,w$,S$,x$,rv,k$,iv,cv=L(()=>{"use strict";Tu();ay=(t,e,n)=>{let r=e&&!e.startsWith("/")?"/":"",o=new URL(`${t}${r}${e}`);if(n)for(let s in n){let i=n[s];i!=null&&o.searchParams.set(s,typeof i=="object"?JSON.stringify(i):i)}return o.toString()},ov=({params:t,select:e,limit:n,offset:r,order:o,single:s})=>{let i={...t};return e&&(i.select=e),n&&(i.limit=n),r&&(i.offset=r),s&&(i.single=!0),o&&(typeof o=="string"?i.order=o:Array.isArray(o)?i.order=o.map(a=>`${a.by}:${a.asc===!1?"desc":"asc"}`).join(","):o.by&&(i.order=`${o.by}:${o.asc===!1?"desc":"asc"}`)),i},sv=t=>Object.prototype.toString.call(t).slice(8,-1),ev=["auto","json","text","blob","arrayBuffer","stream","response"],p$={json:async t=>{let e=await t.text();return e?JSON.parse(e):null},text:t=>t.text(),blob:t=>t.blob(),arrayBuffer:t=>t.arrayBuffer(),stream:t=>t.body,response:t=>t},h$=t=>{let e=t.headers.get("content-type");return e&&e.includes("json")?t.json():t.text()},g$=async t=>{let e=await t.text(),n=t.headers.get("content-type");if(e&&n&&n.includes("json"))try{return JSON.parse(e)}catch{}return e},nv=(t,e)=>t?.message||t?.error||e.statusText||`HTTP ${e.status}`,Xe=async(t,e,n,r)=>{let o=n??"auto";if(!ev.includes(o))throw new TypeError(`@symbo.ls/fetch rest: unknown responseType "${o}" \u2014 use one of: ${ev.join(", ")}`);let s=r&&await r||await globalThis.fetch(t,e);if(o==="auto"){let i=await h$(s);return{data:i,error:s.ok?null:nv(i,s),status:s.status}}if(!s.ok){let i=await g$(o==="response"?s.clone():s);return{data:o==="response"?s:i,error:nv(i,s),status:s.status}}return{data:await p$[o](s),error:null,status:s.status}},m$=["FormData","Blob","File","URLSearchParams","ReadableStream","ArrayBuffer"],y$=t=>t!==null&&typeof t=="object"&&(ArrayBuffer.isView(t)||m$.includes(sv(t))),b$=t=>Array.isArray(t)?t:typeof t.entries=="function"?t.entries():Object.entries(t),iy=(...t)=>{let e={},n=new Map;for(let r of t)if(r)for(let[o,s]of b$(r)){let i=o.toLowerCase();if(n.has(i)&&delete e[n.get(i)],s==null){n.delete(i);continue}n.set(i,o),e[o]=s}return e},_$={"Content-Type":"application/json"},w$={"Content-Type":void 0},S$=t=>{if(!t||typeof t!="object")return null;let e={};for(let n in t.query||{})e[n.toLowerCase()]=t.query[n];return{params:e,rpc:t.rpc==="get"}},x$="content-type",rv=(t,e)=>{let n=Object.keys(e);if(!n.length)return t;let r=new URL(t);for(let o of n)r.searchParams.set(o,e[o]);return r.toString()},k$=async({url:t,headers:e,auth:n,fetchOptions:r,early:o,reads:s})=>{if(!t)throw new Error("@symbo.ls/fetch rest: url is required");return iv(t,e,n,r,o,s)},iv=(t,e={},n,r={},o,s)=>{let i=n?.token||null,a=Zk(Xk(o,s),e),c=S$(s),l=y=>{if(!c)return null;let w={},b={},x={};for(let k in y){let S=k.toLowerCase();if(S==="authorization")return null;if(S===x$)continue;b[k]=y[k];let _=c.params[S];_?x[_]=y[k]:w[k]=y[k]}return{headers:w,adoptHeaders:b,query:x}},f=(y,w)=>{if(!a)return null;let b="";for(let x in w){let k=x.toLowerCase();if(k==="accept-language")b=String(w[x]);else if(a.carried[k]!==w[x])return null}try{return Qk(Ka(y(),b),a.maxAge)}catch{return null}},u=()=>i?{Authorization:`Bearer ${i}`}:null,d=y=>iy(e,u(),y),p=y=>({...r,...y}),g=(y,w,b)=>{if(!y$(w))return p({method:y,headers:iy(e,u(),_$,b),body:JSON.stringify(w)});let x={method:y,headers:iy(e,u(),w$,b),body:w};return sv(w)==="ReadableStream"&&(x.duplex="half"),p(x)},h=(y,w)=>{let b=w||t;if(y&&(y.startsWith("http://")||y.startsWith("https://")))return y;let x=y&&!y.startsWith("/")?"/":"";return`${b}${x}${y||""}`};return{name:"rest",setToken:y=>{i=y},getSession:async()=>{if(!n?.sessionUrl)return i?{token:i}:null;let y=await Xe(h(n.sessionUrl,n.baseUrl),p({headers:d()}));return y.error?null:y.data},signIn:async y=>{if(!n?.signInUrl)throw new Error("rest: auth.signInUrl not configured");let w=await Xe(h(n.signInUrl,n.baseUrl),g("POST",y));return w.data?.token&&(i=w.data.token),w},signOut:async()=>(n?.signOutUrl&&await Xe(h(n.signOutUrl,n.baseUrl),p({method:"POST",headers:d()})),i=null,{error:null}),select:({from:y,params:w,select:b,limit:x,offset:k,order:S,single:_,headers:E,baseUrl:C,responseType:$})=>{let M=ay(C||t,y||"",ov({params:w,select:b,limit:x,offset:k,order:S,single:_})),R=d(E),j=l(R);if(j){let tt=p({headers:j.headers});return Xe(rv(M,j.query),tt,$,f(()=>M,j.adoptHeaders))}let et=p({headers:R});return Xe(M,et,$,f(()=>M,et.headers))},rpc:async({from:y,params:w,headers:b,baseUrl:x,responseType:k,read:S})=>{let _=Yk(w),E=()=>ay(x||t,`rpc/${y}`,w),C=tt=>Xe(h(`rpc/${y}`,x),g("POST",w,b),k,tt),$=d(b),M=S===!0&&c&&c.rpc&&_?l($):null,R=null;if(M)try{R=E()}catch{R=null}if(!R)return C(a&&a.rpc&&_?f(E,$):null);let j=p({method:"GET",headers:M.headers}),et=await Xe(rv(R,M.query),j,k,f(()=>R,M.adoptHeaders));return et.status===405?C(null):et},insert:({from:y,data:w,headers:b,baseUrl:x,responseType:k})=>Xe(h(y,x),g("POST",w,b),k),update:({from:y,data:w,params:b,method:x,headers:k,baseUrl:S,responseType:_})=>{let E=b?.id||w?.id,C=E?`${y}/${E}`:y;return Xe(h(C,S),g(x||"PATCH",w,k),_)},upsert:({from:y,data:w,params:b,method:x,headers:k,baseUrl:S,responseType:_})=>{let E=b?.id||w?.id,C=E?`${y}/${E}`:y;return Xe(h(C,S),g(x||"PUT",w,k),_)},delete:({from:y,params:w,headers:b,baseUrl:x,responseType:k})=>{let S=w?.id,_=S?`${y}/${S}`:y;return Xe(h(_,x),p({method:"DELETE",headers:d(b)}),k)}}}});var fv={};F(fv,{localAdapter:()=>lv,setup:()=>E$});var Ou,v$,E$,lv,uv=L(()=>{"use strict";Ou=(t,e)=>{if(!e)return!0;for(let n in e){let r=e[n];if(r===null){if(t[n]!==null&&t[n]!==void 0)return!1}else if(Array.isArray(r)){if(!r.includes(t[n]))return!1}else if(typeof r=="object"){for(let o in r)if(o==="gt"&&!(t[n]>r[o])||o==="gte"&&!(t[n]>=r[o])||o==="lt"&&!(t[n]<r[o])||o==="lte"&&!(t[n]<=r[o])||o==="neq"&&t[n]===r[o]||o==="like"&&!String(t[n]).includes(r[o]))return!1}else if(t[n]!==r)return!1}return!0},v$=(t,{order:e,limit:n,offset:r,single:o})=>{let s=[...t];if(e){let i=typeof e=="string"?e:e.by,a=e.asc!==!1;s.sort((c,l)=>c[i]<l[i]?a?-1:1:c[i]>l[i]?a?1:-1:0)}return r&&(s=s.slice(r)),n&&(s=s.slice(0,n)),o?{data:s[0]||null,error:null}:{data:s,error:null}},E$=async({data:t,...e})=>lv(t,e),lv=(t={},e={})=>{let n={},r={},o=e.persist!==!1&&typeof localStorage<"u",s=e.prefix||"smbls_db_",i=f=>{if(!n[f])if(o)try{let u=localStorage.getItem(s+f);n[f]=u?JSON.parse(u):t[f]||[]}catch{n[f]=t[f]||[]}else n[f]=t[f]||[];return n[f]},a=f=>{if(o)try{localStorage.setItem(s+f,JSON.stringify(n[f]))}catch{}},c=(f,u,d,p)=>{let g=r[f];if(g)for(let h of g)h(d,p,{event:u,table:f})},l=Date.now();return{name:"local",store:n,select:async({from:f,params:u,...d})=>{let g=i(f).filter(h=>Ou(h,u));return v$(g,d)},insert:async({from:f,data:u})=>{let d=i(f),g=(Array.isArray(u)?u:[u]).map(h=>{let m={id:h.id||++l,...h};return d.push(m),m});a(f);for(let h of g)c(f,"INSERT",h,null);return{data:Array.isArray(u)?g:g[0],error:null}},update:async({from:f,data:u,params:d})=>{let p=i(f),g=[];for(let h=0;h<p.length;h++)if(Ou(p[h],d)){let m={...p[h]};Object.assign(p[h],u),g.push(p[h]),c(f,"UPDATE",p[h],m)}return a(f),{data:g,error:null}},upsert:async({from:f,data:u,params:d})=>{let p=i(f),g=Array.isArray(u)?u:[u],h=[];for(let m of g){let y=d||(m.id!==void 0?{id:m.id}:null),w=y?p.findIndex(b=>Ou(b,y)):-1;if(w>-1){let b={...p[w]};Object.assign(p[w],m),h.push(p[w]),c(f,"UPDATE",p[w],b)}else{let b={id:m.id||++l,...m};p.push(b),h.push(b),c(f,"INSERT",b,null)}}return a(f),{data:Array.isArray(u)?h:h[0],error:null}},delete:async({from:f,params:u})=>{let d=i(f),p=[];for(let g=d.length-1;g>=0;g--)Ou(d[g],u)&&(p.push(d[g]),d.splice(g,1),c(f,"DELETE",null,p[p.length-1]));return a(f),{data:p,error:null}},subscribe:({from:f,on:u},d)=>{r[f]||(r[f]=[]);let p=(g,h,m)=>{u&&u!=="*"&&u!==m.event||d(g,h,m)};return r[f].push(p),()=>{let g=r[f].indexOf(p);g>-1&&r[f].splice(g,1)}}}}});var Bu={};F(Bu,{EARLY_KEY:()=>Cu,createAdapter:()=>P$,createEarlySeedScript:()=>tv,default:()=>W$,earlyKey:()=>Ka,executeFetch:()=>ec,fetchFunctions:()=>ju,fetchPlugin:()=>wy,hasAdapter:()=>R$,initAdapterAuth:()=>$u,parseDuration:()=>Ya,queryClient:()=>Ga,registerAdapter:()=>O$,resolveDb:()=>bv});var A$,yv,Ru,ks,Pu,uy,C$,T$,O$,R$,P$,bv,Ya,le,_v,Tn,Rn,Pn,cy,gy,Qa,Xa,Du,dy,Iu,my,no,wv,L$,Lu,D$,dv,ly,Sv,xv,xs,pv,I$,hv,$$,kv,yy,Ja,Mu,Nu,tc,by,$u,_y,xe,Me,Za,Fu,M$,py,dr,Ze,gv,On,N$,F$,j$,B$,fy,hy,U$,vv,Ev,V$,z$,H$,ec,Ga,mv,ju,wy,W$,nc=L(()=>{"use strict";I();Kt();Tu();Tu();A$=["select","rpc","insert","update","upsert","delete","subscribe"],yv={rest:()=>Promise.resolve().then(()=>(cv(),av)),local:()=>Promise.resolve().then(()=>(uv(),fv))},Ru=Symbol.for("@symbo.ls/fetch:CUSTOM_ADAPTERS"),ks=(()=>{if(typeof globalThis<"u"&&globalThis[Ru])return globalThis[Ru];let t={};if(typeof globalThis<"u")try{return Object.defineProperty(globalThis,Ru,{value:t,writable:!1,configurable:!1,enumerable:!1}),globalThis[Ru]}catch{}return t})(),Pu=Symbol.for("@symbo.ls/fetch:PENDING_ADAPTERS"),uy=(()=>{if(typeof globalThis<"u"&&globalThis[Pu])return globalThis[Pu];let t={};if(typeof globalThis<"u")try{return Object.defineProperty(globalThis,Pu,{value:t,writable:!1,configurable:!1,enumerable:!1}),globalThis[Pu]}catch{}return t})(),C$=5e3,T$=t=>new Promise(e=>{if(ks[t])return e(ks[t]);let n=uy[t]||=[],r=!1,o=()=>{r||(r=!0,e(ks[t]||null))};n.push(o),setTimeout(o,C$)}),O$=(t,e)=>{ks[t]=e;let n=uy[t];if(n&&n.length){uy[t]=[];for(let r of n)r()}},R$=t=>typeof t=="string"&&!!(ks[t]||yv[t]),P$=t=>{let e={};for(let n of A$)t[n]&&(e[n]=t[n]);return e.name=t.name||"custom",e},bv=async t=>{if(!t)return null;if(typeof t.select=="function")return t;let{adapter:e,...n}=t,r=typeof e=="string"?e:typeof t=="string"?t:null;if(!r)return null;let o=ks[r]||yv[r];if(!o&&(o=await T$(r),!o))throw new Error(`Unknown db adapter: "${r}". Use registerAdapter() for adapters with optional deps.`);let s=await o();if(!s||typeof s.setup!="function")throw new Error(`Adapter "${r}" loader returned a module without a setup() function. Got keys: [${Object.keys(s||{}).join(", ")}]. Likely a bundler chunk-resolution issue.`);return s.setup(n)},Ya=t=>{if(!t)return 0;if(typeof t=="number")return t;let e=t.match(/^(\d+)(ms|s|m|h)$/);if(!e)return 0;let n=parseInt(e[1]),r=e[2];return r==="ms"?n:r==="s"?n*1e3:r==="m"?n*6e4:r==="h"?n*36e5:0},le=new Map,_v=new Map,Tn=new Map,Rn=0,Pn=new Map,cy=new WeakMap,gy=(t,e,n,r,o=t.page,s=t.cursor)=>{if(t.cache?.key)return t.cache.key;let{from:i,method:a,infinite:c}=t,l=n?`${n}:`:"",f=r?`:${r}`:"",u=o?":p"+JSON.stringify(o):"",d=s!=null?":c"+JSON.stringify(s):"";return`${i}:${a}:${l}${JSON.stringify(e||"")}${c?":infinite":""}${u}${d}${f}`},Qa=t=>le.get(t)||null,Xa=(t,e,n,r=++Rn,o=!1)=>{let s={data:e,error:n,time:Date.now(),stale:o,seq:r};le.set(t,s);let i=_v.get(t);if(i)for(let a of i)P(a)&&a(s);return s},Du=(t,e)=>{let n=t?le.get(t):null;return n&&!n.error&&n.seq>e?n:null},dy=(t,e)=>(Pn.get(t)||0)>e,Iu=t=>{if(t){le.delete(t),Pn.set(t,++Rn);return}for(let[e]of le)Pn.set(e,++Rn);for(let[e]of Tn)Pn.set(e,++Rn);le.clear()},my=t=>!t&&t!==!1?{staleTime:6e4,gcTime:3e5}:t===!1?null:t===!0?{staleTime:6e4,gcTime:3e5}:typeof t=="number"?{staleTime:t,gcTime:Math.max(t*5,3e5)}:v(t)?{staleTime:Ya(t),gcTime:3e5}:{staleTime:Ya(t.stale||t.staleTime)||6e4,gcTime:Ya(t.gc||t.gcTime||t.expire)||3e5,key:t.key},no=new Set,wv=t=>!!t.ref&&t.element.__ref===t.ref,L$=({config:t,element:e,context:n})=>{try{return by(t,e,n)}catch{return null}},Lu=null,D$=()=>{Lu||(Lu=setInterval(()=>{let t=Date.now();for(let[e,n]of le){let r=_v.get(e);!(r&&r.size>0)&&t-n.time>(n.gcTime||3e5)&&le.delete(e)}for(let[e]of Pn)!le.has(e)&&!Tn.has(e)&&Pn.delete(e);for(let e of no)wv(e)||no.delete(e)},3e4),Lu.unref&&Lu.unref())};D$();dv=3,ly=t=>Math.min(1e3*2**t,3e4),Sv=(t,e)=>{let n=t.retry;return n===void 0&&e?{count:0}:n===!1?{count:0}:n===!0||n===void 0?{count:dv,delay:ly}:typeof n=="number"?{count:n,delay:ly}:{count:n.count??dv,delay:P(n.delay)?n.delay:typeof n.delay=="number"?()=>n.delay:ly}},xv=async(t,e)=>{let{count:n,delay:r}=e,o;for(let s=0;s<=n;s++)try{let i=await t();if(i?.error){if(o=i.error,s<n){let a=P(r)?r(s,o):r;await new Promise(c=>setTimeout(c,a));continue}return i}return i}catch(i){if(o=i,s<n){let a=P(r)?r(s,i):r;await new Promise(c=>setTimeout(c,a));continue}throw i}return{data:null,error:o}},xs={focus:new Set,online:new Set},pv=!1,I$=()=>{if(pv||typeof window>"u")return;pv=!0;let t=()=>{for(let n of xs.focus)n()},e=()=>{for(let n of xs.online)n()};window.addEventListener("visibilitychange",()=>{document.visibilityState==="visible"&&t()}),window.addEventListener("focus",t),window.addEventListener("online",e)},hv=(t,e)=>{let n=e.__ref;if(t===!0)return{from:n.__state||e.key,method:"select",query:!0,on:"create"};if(v(t))return{from:t,method:"select",query:!0,on:"create"};if(A(t)){let r={...t};return r.from=r.from||n.__state||e.key,r.method=r.method||"select",r.on=r.on||"create",r.query===void 0&&(r.query=!0),r}return null},$$=["insert","update","upsert","delete"],kv=t=>$$.includes(t),yy=t=>t.mutation===!0?!0:t.mutation===!1||t.method!=="rpc"?!1:t.on==="submit"||t.on==="click"||t.invalidates!=null,Ja=(t,e)=>{let n=t?.state?.root||e?.state?.root;if(n?.lang)return n.lang},Mu=(t,e)=>{let r=(t?.state?.root||e?.state?.root)?.__fetchScope;return r?String(r):void 0},Nu=(t,e,n)=>{let r;if(!t)r=void 0;else if(P(t))r=t(e,e.state);else{r={};for(let o in t){let s=t[o];r[o]=P(s)?s(e,e.state):s}}return r},tc=(t,e)=>P(t)?t(e,e.state):t,by=(t,e,n)=>gy(t,Nu(t.params,e,n),Mu(e,n),Ja(e,n),tc(t.page,e),tc(t.cursor,e)),$u=async(t,e)=>{if(!t||t.__authInitialized||(t.__authInitialized=!0,!t.getSession))return;let n=(r,o)=>{let s=e.state?.root;s?.update&&s.update({auth:{user:r,session:o,loading:!1}})};try{let r=await t.getSession();n(r?.user||null,r)}catch(r){console.warn("[fetch] Failed to restore auth session:",r.message)}t.onAuthStateChange&&t.onAuthStateChange((r,o)=>{n(o?.user||null,o)})},_y=async(t,e)=>{if(P(t.select))return t.auth!==!1&&await $u(t,e),t;if(t.__resolved)return t.auth!==!1&&await $u(t.__resolved,e),t.__resolved;if(t.__resolving)return t.__resolving;t.__resolving=bv(t);let n=await t.__resolving;return delete t.__resolving,n?(n.auth=t.auth,n.url=t.url,n.key=t.key,t.__resolved=n,e.fetch=n,t.auth!==!1&&await $u(n,e),n):null},xe=(t,e,...n)=>{let r=P(t[e])?t[e]:null;r&&r.call(t,...n,t,t.state,t.context)},Me=(t,e,n,...r)=>{let o=t&&P(t[n])?t[n]:null;o&&o.call(e,...r,e,e.state,e.context)},Za=t=>{let e={},n=t.node;if(!n)return e;if(n.tagName==="FORM"){let o=new FormData(n);for(let[s,i]of o.entries())e[s]=i;return e}let r=n.querySelectorAll("input, textarea, select");for(let o=0;o<r.length;o++){let s=r[o],i=s.name||s.getAttribute("name");i&&(s.type==="checkbox"?e[i]=s.checked:s.type==="file"?e[i]=s.files:e[i]=s.value)}return e},Fu=t=>t.responseType==="stream"||t.responseType==="response",M$=["Blob","File","ArrayBuffer","ReadableStream","Response"],py=t=>t!==null&&typeof t=="object"&&(ArrayBuffer.isView(t)||M$.includes(Object.prototype.toString.call(t).slice(8,-1))),dr=(t,e,n,r={})=>{if(!n&&py(e))return;let o=n&&n.startsWith("~/"),s=o&&t.state?.root||t.state;if(s?.update)if(o){let i=n.slice(2);e&&typeof e=="object"&&!Array.isArray(e)&&!py(e)&&i in e?s.update(e,{preventFetch:!0,...r}):s.update({[i]:e},{preventFetch:!0,...r})}else{let i=n?{[n]:e}:e;s.update(i,{preventFetch:!0,...r})}},Ze=(t,e)=>{let n=t?.__ref;n&&(n.__fetchStatus={...e,isError:!!e.error},n.__fetching=e.isFetching,n.__fetchError=e.error)},gv=(t,e,n)=>{let r=t.__pages&&t.__pages.length?t.__pages:[n];P(e.getNextPageParam)&&(t.__nextPageParam=e.getNextPageParam(r[r.length-1],r),t.__hasNextPage=t.__nextPageParam!=null),P(e.getPreviousPageParam)&&(t.__prevPageParam=e.getPreviousPageParam(r[0],r),t.__hasPreviousPage=t.__prevPageParam!=null)},On=async(t,e,n,r={})=>{let o=n?.fetch;if(!o||!e||!e.__ref)return;let s=e.__ref,i=Mu(e,n);(!s.__fetchScopeOwner||s.__fetchScopeOwner.scope!==i)&&(s.__fetchScopeOwner={scope:i});let a=s.__fetchScopeOwner,c=()=>e.__ref===s&&s.__fetchScopeOwner===a&&Mu(e,n)===i;if(t.enabled===!1||P(t.enabled)&&!t.enabled(e,e.state)||t.skip===!0||P(t.skip)&&t.skip(e,e.state))return;let l=await _y(o,n);if(!l||!c())return;let{from:f,method:u,query:d,params:p,cache:g,transform:h,single:m,auth:y,fields:w,as:b,limit:x,offset:k,order:S,headers:_,baseUrl:E,responseType:C,page:$,cursor:M,infinite:R,placeholderData:j,initialData:et,select:tt,keepPreviousData:it}=t,St=v(tt)?tt:void 0;if(d&&P(e.getQuery)){let Z=e.getQuery(l.name||"paths");Z&&(St=Z.select||Z.length&&Z.join(",")||St)}let Pt=Nu(p,e,n),bt=tc($,e),Mt=tc(M,e),z=yy(t),B=Fu(t)||z?null:my(g),nt=Sv(t,z||kv(u)),U=Ja(e,n),V=B?gy(t,Pt,i,U,bt,Mt):null;if(!s.__fetchInitialized&&V&&(s.__fetchInitialized=!0,et!==void 0)){let Z=P(et)?et():et;Xa(V,Z,null)}if((u==="select"||u==="rpc")&&V&&B&&!r.refresh&&!r.force){let Z=Qa(V);if(Z&&!Z.error){let W=Date.now()-Z.time,jt=Z.stale||W>(B.staleTime||0);R&&D(Z.data)&&!s.__pages&&(s.__pages=[Z.data],gv(s,t,Z.data));let Y=Z.data;if(P(tt)&&(Y=tt(Y,e,e.state)),h&&(Y=h(Y,e,e.state)),!c())return;if(!jt){Ze(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!0,error:null,status:"success",fetchStatus:"idle"}),dr(e,Y,b);return}dr(e,Y,b)}else if(j!==void 0){let W=P(j)?j(e,e.state):j;W!==void 0&&dr(e,W,b)}}let rt=V&&!r.force?Tn.get(V):null;if(rt&&!dy(V,cy.get(rt)||0)){let Z=W=>{Ze(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:W,status:"error",fetchStatus:"idle"}),xe(e,"onFetchError",W),Me(t,e,"onFetchError",W)};try{let W=await Promise.race([rt,new Promise((jt,Y)=>setTimeout(()=>Y("DEDUP_TIMEOUT"),15e3))]);if(!c())return;if(W?.error)Z(W.error);else if(W?.data!==void 0){let jt=!R&&Du(V,cy.get(rt)||0),Y=jt?jt.data:W.data;if(P(tt)&&(Y=tt(Y,e,e.state)),h&&(Y=h(Y,e,e.state)),!c())return;dr(e,Y,b),xe(e,"onFetchComplete",Y),Me(t,e,"onFetchComplete",Y)}}catch(W){if(!c())return;W!=="DEDUP_TIMEOUT"&&Z(W)}return}let Ft=!Qa(V)?.data;Ze(e,{isFetching:!0,isLoading:Ft,isStale:!1,isSuccess:!1,error:null,status:"pending",fetchStatus:"fetching"}),xe(e,"onFetchStart"),Me(t,e,"onFetchStart");let Lt=n?.analyze?.emitNetwork,Qi=Lt?typeof performance<"u"?performance.now():Date.now():0;Lt&&Lt({phase:"start",mode:"query",from:f,method:u,cacheKey:V,lang:U});let Ji=async()=>{if(!c())return;if(y!==!1&&l.auth!==!1&&l.getSession){let Y=await l.getSession();if(!c())return;if(y===!0&&!Y){let mt={message:"Not authenticated"};return Ze(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:mt,status:"error",fetchStatus:"idle"}),xe(e,"onFetchError",mt),Me(t,e,"onFetchError",mt),{data:null,error:mt}}}let Z=l[u];if(!P(Z))return{data:null,error:{message:`Method "${u}" not found on adapter`}};let W={from:f,select:St,params:Pt,single:m,limit:x,offset:k,order:S,headers:_,baseUrl:E};C!==void 0&&(W.responseType=C);let jt=Ja(e,n);if(jt&&(W.headers={...W.headers,"Accept-Language":jt}),bt!==void 0){if(A(bt))bt.offset!==void 0&&(W.offset=bt.offset),bt.limit!==void 0&&(W.limit=bt.limit),bt.cursor!==void 0&&(W.params={...W.params,cursor:bt.cursor});else if(typeof bt=="number"){let Y=t.pageSize||x||20;W.offset=(bt-1)*Y,W.limit=Y}}if(Mt!==void 0&&(W.params={...W.params,cursor:Mt}),u==="insert"||u==="update"||u==="upsert"){let Y;if(w===!0||t.on==="submit")Y=Za(e);else if(D(w)){let mt=Za(e);Y={};for(let Ur of w)Y[Ur]=mt[Ur]}else e.state?.parse?Y=e.state.parse():A(e.state)&&(Y={...e.state});h&&(Y=h(Y,e,e.state)),W.data=Y}if(u==="rpc"){let Y=Pt;if(t.on==="submit"){let mt=Za(e);Y=t.transformParams?t.transformParams(mt,e,e.state):mt}W.params=Y,W.read=!z&&t.read!==!1}if(u==="subscribe"){if(P(s.__unsubscribe)){let mt=s.__unsubscribe;s.__unsubscribe=null;try{mt()}catch{}}let Y=l.subscribe({from:f,params:Pt,on:t.subscribeOn},(mt,Ur,G0)=>{c()&&(dr(e,mt,b),xe(e,"onFetchComplete",mt),Me(t,e,"onFetchComplete",mt))});return c()?(s.__unsubscribe=Y,{data:null,error:null,subscribed:!0}):(P(Y)&&Y(),{data:null,error:null,subscribed:!0})}return Z(W)},At=++Rn,Ge=xv(Ji,nt);cy.set(Ge,At),V&&Tn.set(V,Ge);try{let Z=await Ge;if(z&&t.invalidates&&Z&&!Z.error&&!Z.subscribed&&Ev(t.invalidates,f),!c()||Z?.subscribed)return;let{data:W,error:jt}=Z||{};if(jt){V&&!Du(V,At)&&Xa(V,null,jt,At),Ze(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:jt,status:"error",fetchStatus:"idle"}),xe(e,"onFetchError",jt),Me(t,e,"onFetchError",jt),Lt&&Lt({phase:"error",mode:"query",from:f,method:u,cacheKey:V,error:jt.message||jt,durationMs:(typeof performance<"u"?performance.now():Date.now())-Qi});return}if(W!==void 0){let Y=W;if((u==="select"||u==="rpc")&&V){let Ur=!R&&Du(V,At);if(Ur)Y=Ur.data;else{let G0=Xa(V,W,null,At,dy(V,At));G0.gcTime=B?.gcTime||3e5}}let mt=Y;if(R&&D(W)&&((!s.__pages||!r.direction)&&(s.__pages=[]),r.direction==="previous"?s.__pages.unshift(W):s.__pages.push(W),mt=s.__pages.flat(),gv(s,t,W)),P(tt)&&(mt=tt(mt,e,e.state)),h&&(mt=h(mt,e,e.state)),!c())return;Ze(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!0,error:null,status:"success",fetchStatus:"idle"}),(!it||mt!==void 0)&&dr(e,mt,b),xe(e,"onFetchComplete",mt),Me(t,e,"onFetchComplete",mt),Lt&&Lt({phase:"success",mode:"query",ok:!0,from:f,method:u,cacheKey:V,durationMs:(typeof performance<"u"?performance.now():Date.now())-Qi})}}catch(Z){if(!c())return;Ze(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:Z,status:"error",fetchStatus:"idle"}),xe(e,"onFetchError",Z),Me(t,e,"onFetchError",Z),Lt&&Lt({phase:"error",mode:"query",from:f,method:u,cacheKey:V,error:Z.message||String(Z),durationMs:(typeof performance<"u"?performance.now():Date.now())-Qi})}finally{V&&Tn.get(V)===Ge&&Tn.delete(V)}},N$=(t,e,n)=>{let r=t.on,o=e.__ref;if(!o)return;o.__fetchListeners||(o.__fetchListeners=[]);let s=t.__runner||On;if(r==="submit"){let i=c=>{c.preventDefault(),s(t,e,n)},a=e.node;a&&(a.addEventListener("submit",i),o.__fetchListeners.push(()=>a.removeEventListener("submit",i)))}else if(r==="click"){let i=()=>s(t,e,n),a=e.node;a&&(a.addEventListener("click",i),o.__fetchListeners.push(()=>a.removeEventListener("click",i)))}else r==="stateChange"&&F$(t,e,n,s)},F$=(t,e,n,r)=>{let o=e.__ref,s,i=K(()=>{let a;try{a=JSON.stringify([Nu(t.params,e,n)??null,P(t.enabled)?!!t.enabled(e,e.state):t.enabled!==!1,P(t.skip)?!!t.skip(e,e.state):t.skip===!0,tc(t.page,e)??null])}catch{return}if(s===void 0){s=a;return}a!==s&&(s=a,Promise.resolve().then(()=>r(t,e,n)))});Array.isArray(o.__effects)?o.__effects.push(i):o.__fetchListeners.push(()=>i.dispose())},j$=(t,e,n)=>{let r=e.__ref;r.__fetchCleanups||(r.__fetchCleanups=[]),I$();let o=t.refetchInterval;if(o){let c=typeof o=="number"?o:Ya(o);if(c>0){let l=setInterval(()=>{(t.refetchIntervalInBackground||typeof document>"u"||document.visibilityState==="visible")&&On(t,e,n,{force:!0})},c);r.__fetchCleanups.push(()=>clearInterval(l))}}let s=Fu(t),i=t.refetchOnWindowFocus===void 0?!s:t.refetchOnWindowFocus!==!1,a=t.refetchOnReconnect===void 0?!s:t.refetchOnReconnect!==!1;if(i){let c=()=>{let l=by(t,e,n),f=Qa(l),u=my(t.cache);(!f||f.stale||Date.now()-f.time>(u?.staleTime||0))&&On(t,e,n,{force:!0})};xs.focus.add(c),r.__fetchCleanups.push(()=>xs.focus.delete(c))}if(a){let c=()=>On(t,e,n,{force:!0});xs.online.add(c),r.__fetchCleanups.push(()=>xs.online.delete(c))}},B$=(t,e,n)=>{if(!e.optimistic)return null;let r=t.__ref,o=e.as,s=t.state?.parse?t.state.parse():A(t.state)?{...t.state}:t.state;r.__optimisticSnapshot=s;let i=P(e.optimistic)?e.optimistic(n,s,t):e.optimistic;return i!==void 0&&dr(t,i,o),s},fy=(t,e)=>{let n=t.__ref;if(!n||!e.optimistic)return;let r=n.__optimisticSnapshot;r!==void 0&&(dr(t,r,e.as),delete n.__optimisticSnapshot)},hy=t=>{if(!t)return()=>!0;if(v(t))return e=>e.includes(t);if(D(t)){let e=t.join(":");return n=>n.includes(e)}return t instanceof RegExp?e=>(t.lastIndex=0,t.test(e)):P(t)?e=>{try{return!!t(e)}catch{return!1}}:()=>!1},U$=t=>{let e=[];for(let n of no){if(!wv(n)){no.delete(n);continue}let r=L$(n);r&&t(r)&&e.push(On(n.config,n.element,n.context,{refresh:!0}))}return Promise.allSettled(e).then(()=>{})},vv=t=>{Jk();for(let[e,n]of le)t(e)&&(n.stale=!0,Pn.set(e,++Rn));for(let[e]of Tn)!le.has(e)&&t(e)&&Pn.set(e,++Rn);return U$(t)},Ev=(t,e)=>{let n=(D(t)?t:[t]).map(r=>r===!0||r==="*"?o=>o.startsWith(e+":"):r?hy(r):()=>!1);return vv(r=>n.some(o=>o(r)))},V$=t=>{for(let[e]of le)t(e)&&Iu(e);for(let[e]of Tn)t(e)&&Pn.set(e,++Rn)},z$=async(t,e,n)=>{let r=n?.fetch;if(!r)return;let o=await _y(r,n);if(!o)return;let s=e.__ref,{method:i,from:a,fields:c,transform:l,as:f,on:u,auth:d,headers:p,baseUrl:g,responseType:h,invalidates:m,optimistic:y,onMutate:w,onSuccess:b,onError:x,onSettled:k}=t,S;if(c===!0||u==="submit")S=Za(e);else if(D(c)){let $=Za(e);S={};for(let M of c)S[M]=$[M]}else e.state?.parse?S=e.state.parse():A(e.state)&&(S={...e.state});l&&(S=l(S,e,e.state)),P(w)&&w(S,e,e.state);let _=y?B$(e,t,S):null;s.__fetching=!0,Ze(e,{isFetching:!0,isLoading:!1,isStale:!1,isSuccess:!1,error:null,status:"pending",fetchStatus:"fetching"}),xe(e,"onFetchStart"),Me(t,e,"onFetchStart");let E=n?.analyze?.emitNetwork,C=E?typeof performance<"u"?performance.now():Date.now():0;E&&E({phase:"start",mode:"mutation",from:a,method:i});try{if(d!==!1&&o.auth!==!1&&o.getSession){let St=await o.getSession();if(d===!0&&!St){_!==void 0&&fy(e,t);let Pt={message:"Not authenticated"};xe(e,"onFetchError",Pt),Me(t,e,"onFetchError",Pt);return}}let $=o[i];if(!P($))return;let M={from:a,data:S,headers:p,baseUrl:g};h!==void 0&&(M.responseType=h),t.params&&(M.params=Nu(t.params,e,n));let R=Ja(e,n);R&&(M.headers={...M.headers,"Accept-Language":R});let j=Sv(t,!0),et=await xv(()=>$(M),j),{data:tt,error:it}=et||{};if(it){_!==void 0&&fy(e,t),Ze(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:it,status:"error",fetchStatus:"idle"}),xe(e,"onFetchError",it),P(x)&&x(it,S,e),P(k)&&k(null,it,S,e),E&&E({phase:"error",mode:"mutation",from:a,method:i,error:it.message||String(it),durationMs:(typeof performance<"u"?performance.now():Date.now())-C});return}if(delete s.__optimisticSnapshot,Ze(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!0,error:null,status:"success",fetchStatus:"idle"}),tt!==void 0&&(f||!py(tt))){let St=f?{[f]:tt}:tt;e.state?.update&&e.state.update(St,{preventFetch:!0})}xe(e,"onFetchComplete",tt),Me(t,e,"onFetchComplete",tt),P(b)&&b(tt,S,e),P(k)&&k(tt,null,S,e),E&&E({phase:"success",mode:"mutation",ok:!0,from:a,method:i,durationMs:(typeof performance<"u"?performance.now():Date.now())-C}),m&&Ev(m,a)}catch($){_!==void 0&&fy(e,t),Ze(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:$,status:"error",fetchStatus:"idle"}),xe(e,"onFetchError",$),Me(t,e,"onFetchError",$),P(x)&&x($,S,e),P(k)&&k(null,$,S,e),E&&E({phase:"error",mode:"mutation",from:a,method:i,error:$.message||String($),durationMs:(typeof performance<"u"?performance.now():Date.now())-C})}finally{s.__fetching=!1}},H$=t=>{let e=n=>{try{n()}catch{}};for(let n of t.__fetchCleanups||[])e(n);for(let n of t.__fetchListeners||[])e(n);P(t.__unsubscribe)&&e(t.__unsubscribe);for(let n of t.__fetchMounted||[])no.delete(n);t.__fetchCleanups=[],t.__fetchListeners=[],t.__unsubscribe=null,t.__fetchMounted=[]},ec=(t,e,n,r)=>{if(!t||!r?.fetch)return;let s=pt(t,e);if(!s)return;let i=D(s)?s.map(c=>hv(pt(c,e),e)).filter(Boolean):[hv(s,e)].filter(Boolean),a=e.__ref;if(a.__fetchMounted)for(let c of a.__fetchMounted)no.delete(c);a.__fetchMounted=[],!a.__fetchDisposer&&D(a.__effects)&&(a.__fetchDisposer={dispose:()=>H$(a)},a.__effects.push(a.__fetchDisposer));for(let c of i){let l=kv(c.method),f=l?z$:On,u=!l&&!yy(c)&&c.method!=="subscribe";if(c.on==="create"?f(c,e,r):Promise.resolve().then(()=>{N$({...c,__runner:f},e,r)}),u&&c.on==="create"&&((c.refetchInterval||c.refetchOnWindowFocus!==!1||c.refetchOnReconnect!==!1)&&j$(c,e,r),!Fu(c))){let d={element:e,ref:a,config:c,context:r};no.add(d),a.__fetchMounted.push(d)}}a.refetch=c=>{for(let l of i)On(l,e,r,{force:!0,...c})},a.fetchNextPage=()=>{let c=i[0];if(!c||!c.infinite)return;let l=a.__nextPageParam;if(l==null)return;let f={...c,cursor:l};On(f,e,r,{direction:"next",force:!0})},a.fetchPreviousPage=()=>{let c=i[0];if(!c||!c.infinite)return;let l=a.__prevPageParam;if(l==null)return;let f={...c,cursor:l};On(f,e,r,{direction:"previous",force:!0})}},Ga={invalidateQueries:t=>vv(hy(t)),removeQueries:t=>{if(!t){Iu();return}V$(hy(t))},getQueryData:t=>Qa(t)?.data??void 0,setQueryData:(t,e)=>{let n=Qa(t),r=P(e)?e(n?.data):e;Xa(t,r,null)},prefetchQuery:async(t,e)=>{let n=e?.fetch;if(!n)return;let r=await _y(n,e);if(!r)return;let o=t.method||"select",s=Mu(null,e),i=Ja(null,e),a=gy({...t,method:o},t.params,s,i),c=r[o];if(!P(c))return;let l={from:t.from,params:t.params,limit:t.limit,offset:t.offset,order:t.order,single:t.single,headers:t.headers,baseUrl:t.baseUrl};i&&(l.headers={...l.headers,"Accept-Language":i}),t.responseType!==void 0&&(l.responseType=t.responseType),o==="rpc"&&(l.read=!yy(t)&&t.read!==!1);let f=++Rn,u=await c(l);if(u?.data!==void 0&&!u?.error&&!Fu(t)&&!Du(a,f)){let d=Xa(a,u.data,null,f,dy(a,f));d.gcTime=my(t.cache)?.gcTime||3e5}return u},getCache:()=>le,clear:()=>Iu(),dropNonLang:t=>{if(!t)return;let e=`:${t}`;for(let[n]of le)n.match(/:([a-z]{2,3})$/i)&&(n.endsWith(e)||Iu(n))}},mv=(t,e)=>A(t)?by({method:"select",...t},e,e?.context):t,ju={invalidateQueries(t){return Ga.invalidateQueries(t)},removeQueries(t){return Ga.removeQueries(t)},getQueryData(t){return Ga.getQueryData(mv(t,this))},setQueryData(t,e){return Ga.setQueryData(mv(t,this),e)}},wy={name:"fetch",create(t){let e=t.fetch;e&&(t.parent||Tn.clear(),ec(e,t,t.state,t.context))}},W$=ec});function oc(t){let e=this,{__ref:n}=e,r=[].concat(t),o=n.root[r[0]];if(!r||!r.length)return console.log(r,"on",e.key,"is undefined");for(;o.key===r[0]&&(r.shift(),!!r.length);)if(o=o[r[0]],!o)return;return o}function xy(t){let e=this,{parent:n}=e;if(P(t))return n.state&&t(n,n.state,n.context)?n:n.parent?n.lookup(t):void 0;if(e[t])return e[t];for(;n.param!==t;){if(n[t])return n[t];if(n=n.parent,!n)return}return n}function ky(t){let e=this,{__ref:n}=e,r=n?.__children;if(r)for(let o=0;o<r.length;o++){let s=r[o],i=e[s];if(s===t)return i;if(P(t)){let c=t(i,i.state,i.context);if(i.state&&c)return i}let a=i?.lookdown?.(t);if(a)return a}}function vy(t,e=[]){let n=this,{__ref:r}=n,o=r?.__children;if(o){for(let s=0;s<o.length;s++){let i=o[s],a=n[i];if(i===t)e.push(a);else if(P(t)){let c=t(a,a.state,a.context);a.state&&c&&e.push(a)}a?.lookdownAll?.(t,e)}return e.length?e:void 0}}function zu(t={}){let e=this;if(e.node?.style){for(let n in t){let r=t[n],o=e[n];if(A(r)&&o)zu.call(o,r);else if(r!=null){let s=n.replace(/[A-Z]/g,a=>"-"+a.toLowerCase()),i=String(r).replace(/\s*!important\s*$/,"");e.node.style.setProperty(s,i,"important")}}return e}}function Cv(t){let e=this;if(Cn("beforeRemove",e,t)===!1)return e;P(e.node.remove)?e.node.remove():cr()||(console.warn("This item cant be removed"),e.log()),delete e.parent[e.key],e.parent.__ref&&(e.parent.__ref.__children=pa(e.parent.__ref.__children,e.key)),Cn("remove",e,t)}function Ey(t){return this[t]}function Ay(t,e){let n=this;if(t)return n.update(t,e),n}function Cy(t){return t?this.__ref&&this.__ref[t]:this.__ref}function Ty(){let t=this.getRef("__children");return Array.isArray(t)?t.map(e=>this[e]):[]}function sc(){return this.getRef().path}function ac(t){let e=null,n=r=>r.__element&&r.root?.isRootState;if(!this)e=Av();else if(n(this))e=this.root;else if(this.__ref&&this.__ref.path){let r=this.state&&n(this.state),o=P(this.state)&&this.parent.state&&n(this.parent.state);(r||o)&&(e=this.state.root||this.parent.state.root)}return e||(e=Av()),t?e?.[t]:e}function cc(t){let e=this?.__ref?.root||this.getRootState()?.__element;if(!e)throw new Error(`[smbls] getRoot() could not resolve a root element for "${this?.key||"<unknown>"}" \u2014 it has no __ref (never went through create()) and no root state is registered. Answering undefined here used to no-op silently for every caller.`);return Object.keys(e).length>0&&t?e[t]:e}function lc(t){return this.getRoot("data")&&Object.keys(this.getRoot("data")).length>0&&t?this.getRoot("data")[t]:this.getRoot("data")}function fc(t){let e=this.getRoot()?.context;return t?e[t]:e}function uc(t){let e=this.context;return t?e[t]:e}function Hu(){let t=this,e=[];for(let n in t)!Object.prototype.hasOwnProperty.call(t,n)||sr.has(n)&&!ba.has(n)||e.push(n);return e}function Wu(t=[]){let e=this,n={},r=Hu.call(e),o=r.includes("children"),s=t.length?new Set(t):null;for(let i=0;i<r.length;i++){let a=r[i];if(s&&s.has(a)||!Object.prototype.hasOwnProperty.call(e,a)||o&&a==="content")continue;let c=e[a];if(a==="state"){if(e.__ref&&!e.__ref.__hasRootState)continue;let l=P(c&&c.parse)?c.parse():c;n[a]=P(l)?l:JSON.parse(JSON.stringify(l||{}))}else if(a==="scope"){if(e.__ref&&!e.__ref.__hasRootScope)continue;n[a]=JSON.parse(JSON.stringify(c||{}))}else if(a==="props"){let{__element:l,update:f,...u}=e[a];n[a]=u}else It(c)&&Object.prototype.hasOwnProperty.call(e,a)&&(n[a]=c)}return n}function rc(t=[],e=new WeakSet){let n=this;if(e.has(n))return;e.add(n);let r=Wu.call(n,t),o=t.length?new Set(t):null;for(let s in r){if(o&&o.has(s)||!Object.prototype.hasOwnProperty.call(n,s))continue;let i=r[s];Array.isArray(i)?r[s]=i.map(a=>q(a)?rc.call(a,t,e):a):q(i)&&(r[s]=rc.call(i,t,e))}return r}function Es(...t){if(pr!=="test"&&pr!=="development")return;let e=this,{__ref:n}=e;return console.groupCollapsed(e.key),t.length?t.forEach(r=>console.log(`%c${r}:
|
|
22
|
+
`,"font-weight: bold",e[r])):(console.log(n.path),e.keys().forEach(o=>console.log(`%c${o}:`,"font-weight: bold",e[o]))),console.log(e),console.groupEnd(e.key),e}function Ry(...t){(pr==="test"||pr==="development")&&console.log(...t)}function dc(...t){(pr==="test"||pr==="development")&&console.warn(...t)}function ro(...t){if(pr==="test"||pr==="development"){if(t[t.length-1]?.debugger)debugger;throw t[t.length-1]?.verbose&&Es.call(this),new Error(...t)}}function pc(){let t=this,{key:e,parent:n}=t,{__children:r}=n.__ref,o=r.indexOf(e),s=r[o+1];return n[s]}function hc(t){let e=t||this,{key:n,parent:r}=e,{__children:o}=r.__ref;if(!o)return;let s=o.indexOf(n);return r[o[s-1]]}function gc(t={}){let e=this;e.data||(e.data={}),e.data.varCaches||(e.data.varCaches={});let n=e.data.varCaches,r={},o;for(let s in t)t[s]!==n[s]&&(o=!0,r[s]=t[s]);return{changed:s=>{if(!o)return;let i=s(r,ut(n));for(let a in r)n[a]=r[a];return i},timeout:(s,i)=>{if(!o)return;let a=setTimeout(()=>{s(r),clearTimeout(a)},i)}}}function Py(t,...e){let n=this.context,r=n.utils?.[t]||n.functions?.[t]||n.methods?.[t]||n.snippets?.[t];if(r&&!Zr(r))try{let o=r.call(this,...e);return o&&typeof o.then=="function"&&o.catch(s=>{ro.call(this,s)}),o}catch(o){if(ro.call(this,o),n?.strictMode)throw o}}async function mc(){let t=this,e=t.context?.fetch;if(!e)return null;if(typeof e.select=="function"){if(!e.__authInitialized&&e.getSession){let{initAdapterAuth:o}=await Uu();await o(e,t.context)}return e}if(e.__resolved){if(!e.__resolved.__authInitialized&&e.__resolved.getSession){let{initAdapterAuth:o}=await Uu();await o(e.__resolved,t.context)}return e.__resolved}if(e.__resolving)return e.__resolving;let n=Uu().then(({resolveDb:o})=>o(e));e.__resolving=n;let r=await n;if(e.__resolved=r,t.context.fetch=r,delete e.__resolving,r?.getSession){let{initAdapterAuth:o}=await Uu();await o(r,t.context)}return r}function yc(t){let e=this,n=t||qa.useStateQuery||e.context?.useStateQuery;if(!n)return null;let r={};if(Sy(e,r),n===!0)return r;let o=J$[n];return o?o(r):r}function Ly(t,e){return!!(ar.has(t)||e?.context?.methods?.[t])}var pr,Vu,ic,vs,Av,Oy,q$,Uu,Sy,K$,Tv,G$,Y$,X$,Z$,Q$,J$,Ov=L(()=>{"use strict";ny();Gr();Ut();dn();Zf();us();oy();pr="production";Vu=null,ic=t=>{Vu=t||null},vs=(t,e)=>{t&&e&&Vu===t&&(Vu=e)},Av=()=>Vu||null;Oy=(t,e,n,r)=>Object.defineProperty(t,e,{get:n,set:r});q$="[smbls] getDB needs @symbo.ls/fetch, which the smbls embed bundle does not include: add @symbo.ls/fetch to the page's importmap (the runtime import then resolves) or use the full smbls bundle.",Uu=()=>Promise.resolve().then(()=>(nc(),Bu)).catch(t=>{throw new Error(q$,{cause:t})});Sy=(t,e)=>{let n=t.__ref;if(!n)return;let r=n.__state;r&&typeof r=="string"&&K$(e,r);let o=n.__children;if(o)for(let a=0;a<o.length;a++){let c=t[o[a]];c&&c.__ref&&Sy(c,e)}let s=n.contentElementKey||"content",i=t[s];i&&i.__ref&&Sy(i,e)},K$=(t,e)=>{let r=e.replaceAll("../","").replaceAll("~/","").split("/"),o=t;for(let s=0;s<r.length;s++){let i=r[s];s===r.length-1?o[i]||(o[i]=!0):(o[i]===!0&&(o[i]={}),o[i]||(o[i]={}),o=o[i])}},Tv=(t,e=0)=>{let n=" ".repeat(e),r=Object.entries(t);return r.length?r.map(([s,i])=>i===!0?`${n}${s}`:`${n}${s} {
|
|
23
|
+
${Tv(i,e+1)}
|
|
24
24
|
${n}}`).join(`
|
|
25
|
-
`):""},
|
|
26
|
-
${
|
|
27
|
-
}`,
|
|
25
|
+
`):""},G$=t=>`{
|
|
26
|
+
${Tv(t,1)}
|
|
27
|
+
}`,Y$=t=>{let e={fields:{},include:[]},n=(r,o)=>{let s=[];for(let i in r)if(r[i]===!0)s.push(i);else{let a=o?`${o}.${i}`:i;e.include.push(a),n(r[i],a)}s.length&&(e.fields[o||"_root"]=s)};return n(t,""),e},X$=t=>{let e=s=>{let i=[],a=[];for(let c in s)if(s[c]===!0)i.push(c);else{let l=e(s[c]),f=[];l.select&&f.push(`$select=${l.select}`),l.expand&&f.push(`$expand=${l.expand}`),a.push(f.length?`${c}(${f.join(";")})`:c)}return{select:i.length?i.join(","):"",expand:a.length?a.join(","):""}},{select:n,expand:r}=e(t),o=[];return n&&o.push(`$select=${n}`),r&&o.push(`$expand=${r}`),o.join("&")},Z$=(t,e)=>{let n=[],r=[],o=new Set,s=(f,u,d)=>{o.add(u),d&&r.push(`LEFT JOIN ${u} ON ${u}.${d}_id = ${d}.id`);for(let p in f)f[p]===!0?n.push(`${u}.${p}`):s(f[p],p,u)},i=Object.keys(t);i.length===1&&t[i[0]]!==!0?s(t[i[0]],i[0],null):s(t,"_root",null);let a=[...o][0]||"_root",c=n.length?n.join(", "):"*",l=r.length?`
|
|
28
28
|
`+r.join(`
|
|
29
29
|
`):"";return`SELECT ${c}
|
|
30
|
-
FROM ${a}${l}`},
|
|
30
|
+
FROM ${a}${l}`},Q$=t=>{let e=[],n=(r,o)=>{for(let s in r){let i=o?`${o}/${s}`:s;r[s]===!0?e.push(i):n(r[s],i)}};return n(t,""),e},J$={graphql:G$,"json-api":Y$,odata:X$,sql:Z$,paths:Q$}});var t2,Dy,Rv=L(()=>{"use strict";Yf();t2={snapshotId:Ta},Dy=(t,e)=>{let n=t.__ref,{currentSnapshot:r,calleeElement:o}=e;if(!o||o===t){let a=t2.snapshotId();return n.__currentSnapshot=a,[a,t]}let i=o.__ref.__currentSnapshot;return r<i?[i,o,!0]:[i,o]}});var qu,Iy,Pv=L(()=>{qu=new Set(["__proto__","constructor","prototype","_id","__v","id","createdAt","updatedAt","schema"]),Iy=t=>typeof t=="string"&&qu.has(t)});async function $y(t){if(document.fullscreenElement)await document.exitFullscreen();else try{await(this.node||document).requestFullscreen()}catch(e){console.warn(`Error attempting to enable fullscreen mode: ${e.message} (${e.name})`)}}var Lv=L(()=>{"use strict"});var As,Cs,bc,Ne,hr,Ts,_c,Qe,Ku,e2,gr,n2,oo,so,My,Dv=L(()=>{"use strict";As=t=>t!=="latest"?`@${t}`:"",Cs=t=>t?`/${t}`:"",bc=t=>{let e=typeof t=="string"?t.replace(/\/+$/,""):"";if(!e)return{name:"",subpath:""};let n=e.split("/"),r=e.startsWith("@")?2:1;return{name:n.slice(0,r).join("/"),subpath:n.slice(r).join("/")}},Ne={skypack:{url:"https://cdn.skypack.dev",formatUrl:(t,e,n)=>`${Ne.skypack.url}/${t}${As(e)}${Cs(n)}`},esmsh:{url:"https://esm.sh",formatUrl:(t,e,n)=>`${Ne.esmsh.url}/${t}${As(e)}${Cs(n)}`},unpkg:{url:"https://unpkg.com",formatUrl:(t,e,n)=>`${Ne.unpkg.url}/${t}${As(e)}${Cs(n)}?module`},jsdelivr:{url:"https://cdn.jsdelivr.net/npm",formatUrl:(t,e,n)=>`${Ne.jsdelivr.url}/${t}${As(e)}${Cs(n)}/+esm`},symbols:{url:"https://pkg.symbo.ls",formatUrl:(t,e,n)=>`${Ne.symbols.url}/${t}${As(e)}${Cs(n)}/+esm`}},hr={"esm.sh":"esmsh",unpkg:"unpkg",skypack:"skypack",jsdelivr:"jsdelivr","pkg.symbo.ls":"symbols"},Ts=(t={})=>{let{packageManager:e}=t;return hr[e]||null},_c=t=>{if(typeof t!="string")return t;let e=t.trim().match(/^[\^~](\d.*)$/);return e?e[1]:t},Qe=(t,e="latest",n="esmsh")=>{let r=Ne[n]||Ne.esmsh,{name:o,subpath:s}=bc(t);return r.formatUrl(o||t,_c(e),s)},Ku=(t,e="latest",n="esmsh")=>{let r=Ne[n]||Ne.esmsh,o=_c(e),{name:s,subpath:i}=bc(t);return`${r.url}/${s||t}${As(o)}${Cs(i)}/`},e2=/^node:|^@symbo-ls\//,gr=t=>typeof t=="string"&&e2.test(t),n2=/[<>…]/,oo=t=>typeof t=="string"&&n2.test(t),so=t=>!!t&&typeof t=="object"&&!Array.isArray(t),My=(t,e="skypack",n={})=>{let r=t.dependencies;if(!so(r))return"";let o=Object.keys(r);if(!o.length)return"";let s=n.pin||{},i={};for(let f of o){if(gr(f)||oo(f))continue;let u=s[f]||r[f]||"latest";i[f]=Qe(f,u,e),f.endsWith("/")||(i[f+"/"]=Ku(f,u,e))}if(!Object.keys(i).length)return"";let a='<script type="importmap">',c="<\/script>",l=`{
|
|
31
31
|
"imports": ${JSON.stringify(i,null,2)}
|
|
32
|
-
}`;return`${a}${l}${c}`}});var Ny,Dv=L(()=>{"use strict";Ny=t=>{if(!t)return"";let e=new Date(t),n=new Intl.DateTimeFormat("en",{year:"numeric"}).format(e),r=new Intl.DateTimeFormat("en",{month:"short"}).format(e);return`${new Intl.DateTimeFormat("en",{day:"2-digit"}).format(e)} ${r}, ${n}`}});var Fy,Iv=L(()=>{"use strict";Fy=(t,e)=>{let n=setTimeout(()=>{let{props:r}=t;if(!e.clientHeight){let{node:{clientHeight:o}}=t;o&&(e.clientHeight=o)}if(e.active){if(r.height==="auto")return;t.update({height:e.clientHeight},{preventBeforeUpdateListener:!0,preventChildrenUpdate:!0});let o=setTimeout(()=>{t.update({height:"auto"},{preventBeforeUpdateListener:!0,preventChildrenUpdate:!0}),clearTimeout(o)},450)}else t.update({height:"0"},{preventBeforeUpdateListener:!0,preventChildrenUpdate:!0});clearTimeout(n)})}});var jy,$v=L(()=>{"use strict";jy=function(e){let n=[0,1];for(let r=2;r<=e;r++)n[r]=n[r-1]+n[r-2];return n[e]}});var By,Mv=L(()=>{"use strict";By=t=>["jpeg","gif","jpg","png","tiff","woff"].includes(t)});function Os(t,e={}){let{window:n=globalThis}=e,{document:r=n.document}=e;return new Promise((o,s)=>{let i=r.querySelector(`script[src="${t}"]`);if(i)return o(i);let a=r.createElement("script");a.src=t,a.async=e.async===!0,a.type=e.type||"text/javascript",e.id&&(a.id=e.id),e.integrity&&(a.integrity=e.integrity),e.crossOrigin&&(a.crossOrigin=e.crossOrigin),a.onload=()=>{a.onerror=a.onload=null,o(a)},a.onerror=()=>{a.onerror=a.onload=null,s(new Error(`Failed to load script: ${t}`))},r.head.appendChild(a)})}async function qy(t,e={}){let{window:n=globalThis}=e,{document:r=n.document}=e;return new Promise((o,s)=>{let i=r.querySelector(`link[href="${t}"]`);if(i)return o(i);let a=r.createElement("link");a.href=t,a.rel=e.rel||"stylesheet",a.type="text/css",a.media=e.media||"all",e.id&&(a.id=e.id),e.integrity&&(a.integrity=e.integrity),e.crossOrigin&&(a.crossOrigin=e.crossOrigin),a.onload=()=>{a.onerror=a.onload=null,o(a)},a.onerror=()=>{a.onerror=a.onload=null,s(new Error(`Failed to load stylesheet: ${t}`))},r.head.appendChild(a)})}var Uy,Vy,zy,Hy,Wy,Nv=L(()=>{"use strict";Uy=(t,e=!1,n=document,r="text/javascript")=>new Promise((o,s)=>{try{let i=n.createElement("script");i.type=r,i.async=e,i.src=t,i.addEventListener("load",a=>{o({status:!0})}),i.addEventListener("error",a=>{s(new Error({status:!1,message:`Failed to load the script ${t}`}))}),n.body.appendChild(i)}catch(i){s(i)}}),Vy=(t,e=document,n="text/javascript")=>new Promise((r,o)=>{let s=e.createElement("script");s.type=n,s.src=t;let i=e.createElement("div");i.style.cssText="position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(255,255,255,0.8);z-index:9999;",e.body.appendChild(i),s.onload=()=>{console.log(`Successfully loaded: ${t}`),e.body.removeChild(i),r()},s.onerror=()=>{e.body.removeChild(i),o(new Error(`Failed to load: ${t}`))},e.body.appendChild(s)}),zy=(t,e=document,n,r="text/javascript")=>{let o=new window.XMLHttpRequest;if(o.open("GET",t,!1),o.send(),o.status===200){let s=e.createElement("script");s.type=r,s.text=o.responseText,e.body.appendChild(s),typeof n=="function"&&n()}else throw new Error(`Failed to load the script ${t}`)},Hy=(t,e=!1,n=document,r="text/javascript")=>new Promise((o,s)=>{try{let i=n.createElement("link");i.rel="stylesheet",i.href=t,i.addEventListener("load",a=>{o({status:!0})}),n.head.appendChild(i)}catch(i){s(i)}}),Wy=(t,e=!1,n=document,r="text/javascript",o="smbls-script")=>{try{let s=n.createElement("script");s.type=r,s.async=e,s.id=o,s.innerHTML=t,n.body.appendChild(s)}catch(s){console.warn(s)}}});function io(t,e){if(!e||typeof e!="object")return t;let n=o=>!i2(o)||!Object.prototype.hasOwnProperty.call(e,o)?o:Yu(e[o])||o,r={...t};for(let[o,s]of Object.entries(r))typeof s=="string"?r[o]=n(s):Array.isArray(s)&&(r[o]=s.map(i=>typeof i=="string"?n(i):i));return r}function Gy(t,e){if(!t||!e)return;let n=e.split("."),r=t;for(let o of n){if(r==null||typeof r!="object")return;r=r[o]}return r}function a2(t,e){let n=Gy(t,e);if(typeof n=="number")return Number.isFinite(n)?n:void 0;if(typeof n=="string"&&!hs(n))return n}function c2(t,e,n){let o=(e.config||e.settings||{}).polyglot||e.polyglot,s=n?.lang||o?.defaultLang||"en",a=(o?.translations||{})[s]||{},c=[n?.state,e.state].filter(u=>u&&typeof u=="object"),l=u=>{for(let d of c){let p=a2(d,u);if(p!==void 0)return p}},f={...t};for(let[u,d]of Object.entries(f))typeof d!="string"||!d.includes("{{")||(f[u]=d.replace(/\{\{\s*([^|{}]+?)\s*(?:\|\s*(\w+)\s*)?\}\}/g,(p,g,h)=>{let m=g.trim();if(h==="polyglot")return a[m]??Gy(a,m)??p;if(h==="getLocalStateLang")return l(m+s)??p;let y=l(m);return y!==void 0?y:a[m]??Gy(a,m)??p}));return f}function Fv(t){if(!E(t))return{};let e={...t};for(let[n,r]of Object.entries(e))if(typeof r=="function"){let o=r.toString(),s=o.match(/el\.call\(\s*["']getLocalStateLang["']\s*,\s*["']([^"']+)["']\s*\)/);if(s){e[n]=`{{ ${s[1]} | getLocalStateLang }}`;continue}let i=o.match(/el\.call\(\s*["']polyglot["']\s*,\s*["']([^"']+)["']\s*\)/);if(i){e[n]=`{{ ${i[1]} | polyglot }}`;continue}let a=o.match(/s\.(\w+(?:\.\w+)+)/);if(a){e[n]=`{{ ${a[1]} }}`;continue}delete e[n]}else if(typeof r=="string"){let o=r.match(/el\.call\(\s*["']getLocalStateLang["']\s*,\s*["']([^"']+)["']\s*\)/);if(o){e[n]=`{{ ${o[1]} | getLocalStateLang }}`;continue}let s=r.match(/el\.call\(\s*["']polyglot["']\s*,\s*["']([^"']+)["']\s*\)/);if(s){e[n]=`{{ ${s[1]} | polyglot }}`;continue}if(r.includes("=>")&&r.includes("s.")){let i=r.match(/s\.(\w+(?:\.\w+)+)/);if(i){e[n]=`{{ ${i[1]} }}`;continue}}hs(r)&&delete e[n]}return e}function Xy(t,e,n,{isProduction:r=!1,channel:o="production"}={}){let s=t.pages?.[e],i=E(s?.state)&&s?.state,a=s?.metadata||s?.helmet||i||{},c=Fv(a),l=new Set(Object.keys(c)),f=t.app?.metadata||{},u=Fv(f),d={};if(t.integrations?.seo?d={...t.integrations.seo,...u,...c}:Object.keys(u).length?d={...u,...c}:d={...c},!d.title){let m=t.name||t.key;m?r?d.title=m:o==="development"?d.title=`${m} / dev:symbo.ls`:o==="staging"?d.title=`${m} / staging:symbo.ls`:d.title=`${m} / symbo.ls`:d.title="Symbols demo"}d=c2(d,t,n),d.title&&(l.has("title")||!d["og:title"])&&(l.has("og:title")||(d["og:title"]=d.title)),d.description&&(l.has("description")||!d["og:description"])&&(l.has("og:description")||(d["og:description"]=d.description)),d.title&&!d["twitter:title"]&&(d["twitter:title"]=d.title),d.description&&!d["twitter:description"]&&(d["twitter:description"]=d.description);let p=l.has("og:url")?d["og:url"]:l.has("url")?d.url:void 0,g=n?.actualPathname||e;if(p)d["og:url"]=p;else if(d["og:url"]||d.url){let m=(d["og:url"]||d.url||"").replace(/\/$/,"");if(m&&g&&g!=="/"){let y=g.startsWith("/")?g:"/"+g;d["og:url"]=m+y}}d=io(d,t.files);let h=t.name||t.app?.metadata?.title||t.app?.name||"";for(let[m,y]of Object.entries(d))if(typeof y=="string"&&y.includes("{{")){let S=y.replace(/\{\{[^}]*\}\}/g,"").trim();S?d[m]=S:m==="title"?d[m]=h:delete d[m]}return d}var Tt,n2,so,r2,Gu,o2,s2,Yy,i2,Ky,Yu,jv=L(()=>{"use strict";Ut();fr();Tt=t=>{if(t==null)return"";let e={"&":"&","<":"<",">":">",'"':""","'":"'"};return t.toString().replace(/[&<>"']/g,n=>e[n])},n2=t=>Object.entries(t||{}).filter(([e,n])=>n!==void 0).map(([e,n])=>`${e}="${Tt(n)}"`).join(" "),so=t=>{let e=5381,n=String(t);for(let r=0;r<n.length;r++)e=(e*33^n.charCodeAt(r))>>>0;return e.toString(36)},r2=new Set(["jsonLd","styles","scripts"]),Gu=t=>{let e=[];if(Array.isArray(t.jsonLd))for(let n of t.jsonLd){if(n==null)continue;let r=typeof n=="string"?n:JSON.stringify(n),o=String(r).replace(/<\/script/gi,"<\\/script");e.push(`<script type="application/ld+json" data-smbls-jsonld="${so(r)}">${o}<\/script>`)}if(Array.isArray(t.styles))for(let n of t.styles){if(n==null||!String(n).trim())continue;let r=String(n).replace(/<\/style/gi,"<\\/style");e.push(`<style data-smbls-style="${so(r)}">${r}</style>`)}if(Array.isArray(t.scripts))for(let n of t.scripts){if(!n)continue;let r=typeof n=="string",o=r?n:n.src;if(!o&&!n.body)continue;let s=[];o&&s.push(`src="${Tt(o)}"`),r||(n.type&&s.push(`type="${Tt(n.type)}"`),n.async&&s.push("async"),n.defer&&s.push("defer"),n.integrity&&s.push(`integrity="${Tt(n.integrity)}"`),n.crossorigin&&s.push(`crossorigin="${Tt(n.crossorigin)}"`),n.referrerpolicy&&s.push(`referrerpolicy="${Tt(n.referrerpolicy)}"`),n.nomodule&&s.push("nomodule"));let i=` data-smbls-script="${Tt(o||so(n.body||""))}"`;if(!r&&n.body){let a=String(n.body).replace(/<\/script/gi,"<\\/script");e.push(`<script ${s.join(" ")}${i}>${a}<\/script>`)}else e.push(`<script ${s.join(" ")}${i}><\/script>`)}return e},o2=(t,e,n)=>t==="favicons"?Array.isArray(e)?typeof n=="string"?` data-smbls-favicon="${Tt(n)}"`:E(n)?` data-smbls-favicon="${so(JSON.stringify(n))}"`:"":"":(t==="icon"||t==="favicon")&&typeof e=="string"?` data-smbls-single-icon="${Tt(e)}"`:"",s2=t=>E(t)?` data-smbls-alternate="${Tt(`${t.hreflang||""}|${t.href||""}`)}"`:"",Yy=(t,e)=>{e||(t={...t,robots:"noindex"});let n=Object.entries(t).reduce((r,[o,s])=>{if(!s&&s!==0&&s!==!1||r2.has(o))return r;if(o==="title")return r.push(`<title>${Tt(s)}</title>`),r;if(o==="canonical")return r.push(`<link rel="canonical" href="${Tt(s)}">`),r;if(o==="manifest")return r.push(`<link rel="manifest" href="${Tt(s)}">`),r;if(o==="favicon"||o==="favicons"||o==="icon"||o==="icons")return(Array.isArray(s)?s:[s]).forEach(f=>{let u=o2(o,s,f);if(typeof f=="string")r.push(`<link rel="icon" href="${Tt(f)}"${u}>`);else if(typeof f=="object"){let d=n2(f);/rel=/.test(d)?r.push(`<link ${d}${u}>`):r.push(`<link rel="icon" ${d}${u}>`)}}),r;if(o==="alternate")return(Array.isArray(s)?s:[s]).forEach(f=>{if(f&&typeof f=="object"){let u=Object.entries(f).filter(([d,p])=>p!==void 0).map(([d,p])=>`${d}="${Tt(p)}"`).join(" ");r.push(`<link rel="alternate" ${u}${s2(f)}>`)}}),r;let i=(l,f,u="name")=>{if(typeof f=="string"||typeof f=="number"||typeof f=="boolean")r.push(`<meta ${u}="${Tt(l)}" content="${Tt(f)}">`);else if(Array.isArray(f))f.forEach(d=>{if(typeof d=="string"||typeof d=="number"||typeof d=="boolean")r.push(`<meta ${u}="${Tt(l)}" content="${Tt(d)}">`);else if(typeof d=="object"){let p=Object.entries(d).filter(([g,h])=>h!==void 0).map(([g,h])=>`${g}="${Tt(h)}"`).join(" ");r.push(`<meta ${p}>`)}});else if(typeof f=="object"){let d=Object.entries(f).filter(([p,g])=>g!==void 0).map(([p,g])=>`${p}="${Tt(g)}"`).join(" ");r.push(`<meta ${d}>`)}};if(o.startsWith("http-equiv:")){let l=o.replace("http-equiv:","");return i(l,s,"http-equiv"),r}if(o.startsWith("itemprop:")){let l=o.replace("itemprop:","");return i(l,s,"itemprop"),r}let c=["og:","twitter:","fb:","article:","profile:","book:","business:","music:","product:","video:","DC:","DCTERMS:"].find(l=>o.startsWith(l));if(c){let l=o.replace(c,"");return i(`${c.replace(":","")}:${l}`,s,c==="twitter:"||c==="DC:"||c==="DCTERMS:"?"name":"property"),r}if(o.startsWith("apple:")||o.startsWith("msapplication:")){let l=o.startsWith("apple:")?"apple-":"msapplication-",f=o.replace(/^apple:|^msapplication:/,"");return i(`${l}${f}`,s,"name"),r}return i(o,s),r},['<meta charset="UTF-8">','<meta name="viewport" content="width=device-width, initial-scale=1">']);return n.push(...Gu(t)),n.join(`
|
|
33
|
-
`)},
|
|
32
|
+
}`;return`${a}${l}${c}`}});var Ny,Iv=L(()=>{"use strict";Ny=t=>{if(!t)return"";let e=new Date(t),n=new Intl.DateTimeFormat("en",{year:"numeric"}).format(e),r=new Intl.DateTimeFormat("en",{month:"short"}).format(e);return`${new Intl.DateTimeFormat("en",{day:"2-digit"}).format(e)} ${r}, ${n}`}});var Fy,$v=L(()=>{"use strict";Fy=(t,e)=>{let n=setTimeout(()=>{let{props:r}=t;if(!e.clientHeight){let{node:{clientHeight:o}}=t;o&&(e.clientHeight=o)}if(e.active){if(r.height==="auto")return;t.update({height:e.clientHeight},{preventBeforeUpdateListener:!0,preventChildrenUpdate:!0});let o=setTimeout(()=>{t.update({height:"auto"},{preventBeforeUpdateListener:!0,preventChildrenUpdate:!0}),clearTimeout(o)},450)}else t.update({height:"0"},{preventBeforeUpdateListener:!0,preventChildrenUpdate:!0});clearTimeout(n)})}});var jy,Mv=L(()=>{"use strict";jy=function(e){let n=[0,1];for(let r=2;r<=e;r++)n[r]=n[r-1]+n[r-2];return n[e]}});var By,Nv=L(()=>{"use strict";By=t=>["jpeg","gif","jpg","png","tiff","woff"].includes(t)});function Os(t,e={}){let{window:n=globalThis}=e,{document:r=n.document}=e;return new Promise((o,s)=>{let i=r.querySelector(`script[src="${t}"]`);if(i)return o(i);let a=r.createElement("script");a.src=t,a.async=e.async===!0,a.type=e.type||"text/javascript",e.id&&(a.id=e.id),e.integrity&&(a.integrity=e.integrity),e.crossOrigin&&(a.crossOrigin=e.crossOrigin),a.onload=()=>{a.onerror=a.onload=null,o(a)},a.onerror=()=>{a.onerror=a.onload=null,s(new Error(`Failed to load script: ${t}`))},r.head.appendChild(a)})}async function qy(t,e={}){let{window:n=globalThis}=e,{document:r=n.document}=e;return new Promise((o,s)=>{let i=r.querySelector(`link[href="${t}"]`);if(i)return o(i);let a=r.createElement("link");a.href=t,a.rel=e.rel||"stylesheet",a.type="text/css",a.media=e.media||"all",e.id&&(a.id=e.id),e.integrity&&(a.integrity=e.integrity),e.crossOrigin&&(a.crossOrigin=e.crossOrigin),a.onload=()=>{a.onerror=a.onload=null,o(a)},a.onerror=()=>{a.onerror=a.onload=null,s(new Error(`Failed to load stylesheet: ${t}`))},r.head.appendChild(a)})}var Uy,Vy,zy,Hy,Wy,Fv=L(()=>{"use strict";Uy=(t,e=!1,n=document,r="text/javascript")=>new Promise((o,s)=>{try{let i=n.createElement("script");i.type=r,i.async=e,i.src=t,i.addEventListener("load",a=>{o({status:!0})}),i.addEventListener("error",a=>{s(new Error({status:!1,message:`Failed to load the script ${t}`}))}),n.body.appendChild(i)}catch(i){s(i)}}),Vy=(t,e=document,n="text/javascript")=>new Promise((r,o)=>{let s=e.createElement("script");s.type=n,s.src=t;let i=e.createElement("div");i.style.cssText="position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(255,255,255,0.8);z-index:9999;",e.body.appendChild(i),s.onload=()=>{console.log(`Successfully loaded: ${t}`),e.body.removeChild(i),r()},s.onerror=()=>{e.body.removeChild(i),o(new Error(`Failed to load: ${t}`))},e.body.appendChild(s)}),zy=(t,e=document,n,r="text/javascript")=>{let o=new window.XMLHttpRequest;if(o.open("GET",t,!1),o.send(),o.status===200){let s=e.createElement("script");s.type=r,s.text=o.responseText,e.body.appendChild(s),typeof n=="function"&&n()}else throw new Error(`Failed to load the script ${t}`)},Hy=(t,e=!1,n=document,r="text/javascript")=>new Promise((o,s)=>{try{let i=n.createElement("link");i.rel="stylesheet",i.href=t,i.addEventListener("load",a=>{o({status:!0})}),n.head.appendChild(i)}catch(i){s(i)}}),Wy=(t,e=!1,n=document,r="text/javascript",o="smbls-script")=>{try{let s=n.createElement("script");s.type=r,s.async=e,s.id=o,s.innerHTML=t,n.body.appendChild(s)}catch(s){console.warn(s)}}});function ao(t,e){if(!e||typeof e!="object")return t;let n=o=>!a2(o)||!Object.prototype.hasOwnProperty.call(e,o)?o:Yu(e[o])||o,r={...t};for(let[o,s]of Object.entries(r))typeof s=="string"?r[o]=n(s):Array.isArray(s)&&(r[o]=s.map(i=>typeof i=="string"?n(i):i));return r}function Gy(t,e){if(!t||!e)return;let n=e.split("."),r=t;for(let o of n){if(r==null||typeof r!="object")return;r=r[o]}return r}function c2(t,e){let n=Gy(t,e);if(typeof n=="number")return Number.isFinite(n)?n:void 0;if(typeof n=="string"&&!gs(n))return n}function l2(t,e,n){let o=(e.config||e.settings||{}).polyglot||e.polyglot,s=n?.lang||o?.defaultLang||"en",a=(o?.translations||{})[s]||{},c=[n?.state,e.state].filter(u=>u&&typeof u=="object"),l=u=>{for(let d of c){let p=c2(d,u);if(p!==void 0)return p}},f={...t};for(let[u,d]of Object.entries(f))typeof d!="string"||!d.includes("{{")||(f[u]=d.replace(/\{\{\s*([^|{}]+?)\s*(?:\|\s*(\w+)\s*)?\}\}/g,(p,g,h)=>{let m=g.trim();if(h==="polyglot")return a[m]??Gy(a,m)??p;if(h==="getLocalStateLang")return l(m+s)??p;let y=l(m);return y!==void 0?y:a[m]??Gy(a,m)??p}));return f}function jv(t){if(!A(t))return{};let e={...t};for(let[n,r]of Object.entries(e))if(typeof r=="function"){let o=r.toString(),s=o.match(/el\.call\(\s*["']getLocalStateLang["']\s*,\s*["']([^"']+)["']\s*\)/);if(s){e[n]=`{{ ${s[1]} | getLocalStateLang }}`;continue}let i=o.match(/el\.call\(\s*["']polyglot["']\s*,\s*["']([^"']+)["']\s*\)/);if(i){e[n]=`{{ ${i[1]} | polyglot }}`;continue}let a=o.match(/s\.(\w+(?:\.\w+)+)/);if(a){e[n]=`{{ ${a[1]} }}`;continue}delete e[n]}else if(typeof r=="string"){let o=r.match(/el\.call\(\s*["']getLocalStateLang["']\s*,\s*["']([^"']+)["']\s*\)/);if(o){e[n]=`{{ ${o[1]} | getLocalStateLang }}`;continue}let s=r.match(/el\.call\(\s*["']polyglot["']\s*,\s*["']([^"']+)["']\s*\)/);if(s){e[n]=`{{ ${s[1]} | polyglot }}`;continue}if(r.includes("=>")&&r.includes("s.")){let i=r.match(/s\.(\w+(?:\.\w+)+)/);if(i){e[n]=`{{ ${i[1]} }}`;continue}}gs(r)&&delete e[n]}return e}function Xy(t,e,n,{isProduction:r=!1,channel:o="production"}={}){let s=t.pages?.[e],i=A(s?.state)&&s?.state,a=s?.metadata||s?.helmet||i||{},c=jv(a),l=new Set(Object.keys(c)),f=t.app?.metadata||{},u=jv(f),d={};if(t.integrations?.seo?d={...t.integrations.seo,...u,...c}:Object.keys(u).length?d={...u,...c}:d={...c},!d.title){let m=t.name||t.key;m?r?d.title=m:o==="development"?d.title=`${m} / dev:symbo.ls`:o==="staging"?d.title=`${m} / staging:symbo.ls`:d.title=`${m} / symbo.ls`:d.title="Symbols demo"}d=l2(d,t,n),d.title&&(l.has("title")||!d["og:title"])&&(l.has("og:title")||(d["og:title"]=d.title)),d.description&&(l.has("description")||!d["og:description"])&&(l.has("og:description")||(d["og:description"]=d.description)),d.title&&!d["twitter:title"]&&(d["twitter:title"]=d.title),d.description&&!d["twitter:description"]&&(d["twitter:description"]=d.description);let p=l.has("og:url")?d["og:url"]:l.has("url")?d.url:void 0,g=n?.actualPathname||e;if(p)d["og:url"]=p;else if(d["og:url"]||d.url){let m=(d["og:url"]||d.url||"").replace(/\/$/,"");if(m&&g&&g!=="/"){let y=g.startsWith("/")?g:"/"+g;d["og:url"]=m+y}}d=ao(d,t.files);let h=t.name||t.app?.metadata?.title||t.app?.name||"";for(let[m,y]of Object.entries(d))if(typeof y=="string"&&y.includes("{{")){let w=y.replace(/\{\{[^}]*\}\}/g,"").trim();w?d[m]=w:m==="title"?d[m]=h:delete d[m]}return d}var Tt,r2,io,o2,Gu,s2,i2,Yy,a2,Ky,Yu,Bv=L(()=>{"use strict";Ut();fr();Tt=t=>{if(t==null)return"";let e={"&":"&","<":"<",">":">",'"':""","'":"'"};return t.toString().replace(/[&<>"']/g,n=>e[n])},r2=t=>Object.entries(t||{}).filter(([e,n])=>n!==void 0).map(([e,n])=>`${e}="${Tt(n)}"`).join(" "),io=t=>{let e=5381,n=String(t);for(let r=0;r<n.length;r++)e=(e*33^n.charCodeAt(r))>>>0;return e.toString(36)},o2=new Set(["jsonLd","styles","scripts"]),Gu=t=>{let e=[];if(Array.isArray(t.jsonLd))for(let n of t.jsonLd){if(n==null)continue;let r=typeof n=="string"?n:JSON.stringify(n),o=String(r).replace(/<\/script/gi,"<\\/script");e.push(`<script type="application/ld+json" data-smbls-jsonld="${io(r)}">${o}<\/script>`)}if(Array.isArray(t.styles))for(let n of t.styles){if(n==null||!String(n).trim())continue;let r=String(n).replace(/<\/style/gi,"<\\/style");e.push(`<style data-smbls-style="${io(r)}">${r}</style>`)}if(Array.isArray(t.scripts))for(let n of t.scripts){if(!n)continue;let r=typeof n=="string",o=r?n:n.src;if(!o&&!n.body)continue;let s=[];o&&s.push(`src="${Tt(o)}"`),r||(n.type&&s.push(`type="${Tt(n.type)}"`),n.async&&s.push("async"),n.defer&&s.push("defer"),n.integrity&&s.push(`integrity="${Tt(n.integrity)}"`),n.crossorigin&&s.push(`crossorigin="${Tt(n.crossorigin)}"`),n.referrerpolicy&&s.push(`referrerpolicy="${Tt(n.referrerpolicy)}"`),n.nomodule&&s.push("nomodule"));let i=` data-smbls-script="${Tt(o||io(n.body||""))}"`;if(!r&&n.body){let a=String(n.body).replace(/<\/script/gi,"<\\/script");e.push(`<script ${s.join(" ")}${i}>${a}<\/script>`)}else e.push(`<script ${s.join(" ")}${i}><\/script>`)}return e},s2=(t,e,n)=>t==="favicons"?Array.isArray(e)?typeof n=="string"?` data-smbls-favicon="${Tt(n)}"`:A(n)?` data-smbls-favicon="${io(JSON.stringify(n))}"`:"":"":(t==="icon"||t==="favicon")&&typeof e=="string"?` data-smbls-single-icon="${Tt(e)}"`:"",i2=t=>A(t)?` data-smbls-alternate="${Tt(`${t.hreflang||""}|${t.href||""}`)}"`:"",Yy=(t,e)=>{e||(t={...t,robots:"noindex"});let n=Object.entries(t).reduce((r,[o,s])=>{if(!s&&s!==0&&s!==!1||o2.has(o))return r;if(o==="title")return r.push(`<title>${Tt(s)}</title>`),r;if(o==="canonical")return r.push(`<link rel="canonical" href="${Tt(s)}">`),r;if(o==="manifest")return r.push(`<link rel="manifest" href="${Tt(s)}">`),r;if(o==="favicon"||o==="favicons"||o==="icon"||o==="icons")return(Array.isArray(s)?s:[s]).forEach(f=>{let u=s2(o,s,f);if(typeof f=="string")r.push(`<link rel="icon" href="${Tt(f)}"${u}>`);else if(typeof f=="object"){let d=r2(f);/rel=/.test(d)?r.push(`<link ${d}${u}>`):r.push(`<link rel="icon" ${d}${u}>`)}}),r;if(o==="alternate")return(Array.isArray(s)?s:[s]).forEach(f=>{if(f&&typeof f=="object"){let u=Object.entries(f).filter(([d,p])=>p!==void 0).map(([d,p])=>`${d}="${Tt(p)}"`).join(" ");r.push(`<link rel="alternate" ${u}${i2(f)}>`)}}),r;let i=(l,f,u="name")=>{if(typeof f=="string"||typeof f=="number"||typeof f=="boolean")r.push(`<meta ${u}="${Tt(l)}" content="${Tt(f)}">`);else if(Array.isArray(f))f.forEach(d=>{if(typeof d=="string"||typeof d=="number"||typeof d=="boolean")r.push(`<meta ${u}="${Tt(l)}" content="${Tt(d)}">`);else if(typeof d=="object"){let p=Object.entries(d).filter(([g,h])=>h!==void 0).map(([g,h])=>`${g}="${Tt(h)}"`).join(" ");r.push(`<meta ${p}>`)}});else if(typeof f=="object"){let d=Object.entries(f).filter(([p,g])=>g!==void 0).map(([p,g])=>`${p}="${Tt(g)}"`).join(" ");r.push(`<meta ${d}>`)}};if(o.startsWith("http-equiv:")){let l=o.replace("http-equiv:","");return i(l,s,"http-equiv"),r}if(o.startsWith("itemprop:")){let l=o.replace("itemprop:","");return i(l,s,"itemprop"),r}let c=["og:","twitter:","fb:","article:","profile:","book:","business:","music:","product:","video:","DC:","DCTERMS:"].find(l=>o.startsWith(l));if(c){let l=o.replace(c,"");return i(`${c.replace(":","")}:${l}`,s,c==="twitter:"||c==="DC:"||c==="DCTERMS:"?"name":"property"),r}if(o.startsWith("apple:")||o.startsWith("msapplication:")){let l=o.startsWith("apple:")?"apple-":"msapplication-",f=o.replace(/^apple:|^msapplication:/,"");return i(`${l}${f}`,s,"name"),r}return i(o,s),r},['<meta charset="UTF-8">','<meta name="viewport" content="width=device-width, initial-scale=1">']);return n.push(...Gu(t)),n.join(`
|
|
33
|
+
`)},a2=t=>typeof t=="string"&&t.length>0&&!t.startsWith("/")&&!t.startsWith("http"),Ky=t=>typeof t=="string"&&t.length>0,Yu=t=>{if(!t||typeof t!="object")return null;if(Ky(t.src))return t.src;let e=t.content;return!e||typeof e!="object"?null:Ky(e.src)?e.src:Ky(e.storageUrl)?e.storageUrl:null}});var Xu,Zy,Uv=L(()=>{"use strict";Ut();Xu=(t,e)=>(D(e)?e:Object.values(e)).reduce((n,r)=>Math.abs(r-t)<Math.abs(n-t)?r:n),Zy=(t,e)=>(t=parseFloat(t),A(e)&&(e=Object.values(e)),Xu(t,e))});function lo(t){let e=String(t||"").trim();if(!e)return{owner:Qy,key:"",full:""};let n=null,r=e;if(e.includes("/")){let s=e.indexOf("/");n=e.slice(0,s),r=e.slice(s+1)}r=r.replace(/\.symbo\.ls$/iu,""),n||(n=Qy);let o=r?`${n}/${r}`:"";return{owner:n,key:r,full:o}}async function td(t,e={}){if((e.provider||"kv")==="api")return Jv(t,e);let r=await U2(t,e);return r||Jv(t,e)}async function U2(t,e={}){let n=e.kvBaseUrl||f2,r=e.env||"production",o=`${n}/kv/${encodeURIComponent(t)}?env=${r}`;try{let s=await fetch(o,{method:"GET"});return s.ok&&(await s.json())?.value||null}catch{return null}}async function Jv(t,e={}){let n=e.apiBaseUrl||u2,{key:r}=lo(t);try{let o=`${n}/core/projects/libraries/available?search=${encodeURIComponent(r)}&limit=10`,s=await fetch(o,{method:"GET"});if(!s.ok)return null;let i=await s.json(),c=(i?.items||i?.data||(Array.isArray(i)?i:[])).find(p=>{let{key:g}=lo(p?.key);return g.toLowerCase()===r.toLowerCase()});if(!c?.id&&!c?._id)return null;let l=c.id||c._id,f=`${n}/core/projects/${encodeURIComponent(l)}/data?branch=main`,u=await fetch(f,{method:"GET"});if(!u.ok)return null;let d=await u.json();return d?.data||d||null}catch{return null}}async function tE(t,e={}){if(A(t))return t;if(v(t)){let{full:n}=lo(t);if(!n)return null;try{let r=await td(n,e);return r||console.warn(`[smbls] Shared library "${n}" not found`),r}catch(r){return console.warn(`[smbls] Failed to fetch shared library "${n}":`,r.message),null}}return null}async function ib(t,e={}){return!t||!t.length?[]:(await Promise.all(t.map(async r=>{if(Je(r)){let o=await tE(oE(r),e);return o?{library:o,ignoreList:r.ignoreList}:null}return tE(r,e)}))).filter(Boolean)}var Qy,f2,u2,Rs,eE,d2,p2,Vv,nE,zv,rE,h2,Sc,eb,Je,oE,Jy,nb,g2,m2,sE,rb,iE,Hv,co,ob,y2,mr,b2,aE,cE,Wv,_2,w2,S2,x2,qv,Zu,k2,lE,tb,fE,v2,Kv,E2,A2,C2,T2,Qu,sb,O2,R2,P2,Gv,xc,L2,Yv,Ps,Ls,Xv,Ju,wc,D2,I2,Zv,Qv,kc,$2,M2,N2,F2,j2,B2,uE,vc,Ec,dE=L(()=>{"use strict";Ut();Gr();Zf();dn();Qy="system",f2="https://smbls-kv.nika-980.workers.dev",u2="https://api.symbols.app";Rs=(t,e,n,r)=>{for(let o in e){let s=r?`${r}/${o}`:o;n&&n.has(s)||(o in t?A(t[o])&&A(e[o])&&Rs(t[o],e[o],n,s):t[o]=e[o])}},eE=(t,e,n)=>{if(!A(t)||!e.size)return t;let r=`${n}/`,o=!1;for(let i of e)if(i.startsWith(r)){o=!0;break}if(!o)return t;let s={};for(let i in t){if(!Object.prototype.hasOwnProperty.call(t,i))continue;let a=`${n}/${i}`;e.has(a)||(s[i]=eE(t[i],e,a))}return s},d2=new Set,p2=new Set(["components","pages","functions","snippets","methods"]),Vv=(t,e)=>e===""&&p2.has(t),nE=["fontFamily","fontfamily","font_family","FONT_FAMILY"],zv=t=>{let e=new Map;if(!A(t))return e;for(let n of nE){let r=t[n];if(A(r))for(let o in r)!A(r[o])||!r[o].isDefault||(e.has(n)||e.set(n,new Set),e.get(n).add(o))}return e},rE=(t,e)=>{for(let n of nE){let r=t[n];if(!A(r))continue;let o=e.get(n),s=null;for(let i in r){let a=r[i];if(!A(a)||!a.isDefault||o&&o.has(i))continue;let c={...a};delete c.isDefault,s||(s={...r}),s[i]=c}s&&(t[n]=s)}},h2=t=>t.replace(/\.js$/iu,""),Sc=t=>{let e=new Set;if(!Array.isArray(t))return e;for(let n of t){if(!v(n))continue;let r=n.split("/").map(o=>h2(o.trim())).filter(Boolean).join("/");r&&e.add(r)}return e},eb=(t,e={})=>({library:t,ignoreList:Array.isArray(e.ignoreList)?e.ignoreList:[]}),Je=t=>A(t)&&Array.isArray(t.ignoreList)&&("library"in t||"key"in t||"name"in t),oE=t=>t.library!==void 0?t.library:t.key??t.name,Jy=new Set,nb=()=>{Jy.clear()},g2=(t,e)=>{let n=e.filter(r=>!Jy.has(r));if(n.length){for(let r of n)Jy.add(r);Q()&&console.warn(`[smbls] shared library "${t}" ships ${n.map(r=>`methods.${r}`).join(", ")} \u2014 named like a built-in element method. Refused: the built-in wins; a library cannot replace an element method on the consuming app. If the app wants this version, declare it in the app's OWN methods.`)}},m2=(t,e,n)=>{let r=null;for(let o in t)if(Kr(o)&&(e.has(`methods/${o}`)||n.push(o),!r)){r={};for(let s in t)Kr(s)||(r[s]=t[s])}return r||t},sE=(t,e)=>{let n=Sc(t.sharedLibIgnore);return t.sharePages===!1&&n.add("pages"),n.size?new Set([...e,...n]):e},rb=["functions","methods","snippets"],iE=["components","pages"],Hv=Symbol.for("smbls.libraryScope"),co="__libraryScopes",ob=new Map,y2=()=>Math.random().toString(36).slice(2,10)+Date.now().toString(36).slice(-4),mr=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),b2=/const __scope = |const __peers_* = |const _s = el\?\.scope|\?\.context\?\.globalScope\?\./,aE=t=>{try{return te(t)}catch{return null}},cE=t=>{if(typeof t!="function")return null;let e=aE(t);return v(e)&&b2.test(e)&&Jt(e)?e:null},Wv=t=>v(t)&&Jt(t)||cE(t)!==null,_2=t=>{let e=t.globalScope;return A(e)&&Object.keys(e).some(n=>Wv(e[n]))?!0:rb.some(n=>{let r=t[n];return!!r&&typeof r=="object"&&Object.keys(r).some(o=>Wv(r[o]))})},w2=(t,e,n)=>{let r=t.globalScope,o=e.globalScope;if(n.has("globalScope")||!A(r)||!A(o)||!_2(e))return 0;let s=0;for(let i of Object.keys(o))n.has(`globalScope/${i}`)||mr(r,i)&&s++;return s},S2=[[/const __scope = (\(\(\) => \{ const r = [\s\S]*?\}\)\(\));/g,"const __scope = $RESOLVE($1);"],[/const __scope = this \?\? \{\};/g,"const __scope = $RESOLVE(this ?? {});"],[/const (__peers_*) = (this && this !== globalThis && this\.context && this\.context\.globalScope \? this\.scope \?\? this\.context\.globalScope : this);/g,"const $1 = $RESOLVE($2);"],[/const _s = (el\?\.scope \?\? el\?\.context\?\.globalScope \?\? \{\});/g,"const _s = $RESOLVE($1);"],[/(?<![\w$.])(this|[A-Za-z_$][\w$]*)\?\.context\?\.globalScope\?\./g,"$RESOLVE($1?.context?.globalScope)?."]],x2=t=>{let e=t.split(""),n=[],r=0,o=0,s=(a,c)=>{for(let l=a;l<c;l++)e[l]!==`
|
|
34
34
|
`&&(e[l]="~")},i=()=>{let a=r;for(;r<t.length;){let c=t[r];if(c==="\\"){r+=2;continue}if(c==="`"){s(a,r),r++;return}if(c==="$"&&t[r+1]==="{"){s(a,r),r+=2,n.push(o),o++;return}r++}s(a,r)};for(;r<t.length;){let a=t[r];if(a==="/"&&t[r+1]==="/"){let c=t.indexOf(`
|
|
35
35
|
`,r),l=c===-1?t.length:c;s(r,l),r=l;continue}if(a==="/"&&t[r+1]==="*"){let c=t.indexOf("*/",r+2),l=c===-1?t.length:c+2;s(r,l),r=l;continue}if(a==='"'||a==="'"){let c=a,l=++r;for(;r<t.length&&t[r]!==c&&t[r]!==`
|
|
36
|
-
`;)t[r]==="\\"&&r++,r++;s(l,r),r++;continue}if(a==="`"){r++,i();continue}if(a==="{"){o++,r++;continue}if(a==="}"){if(o--,n.length&&o===n[n.length-1]){n.pop(),r++,i();continue}r++;continue}r++}return e.join("")},Wv=(t,e)=>{if(!v(t)||!t.includes("__scope = ")&&!t.includes("__peers")&&!t.includes("const _s = ")&&!t.includes("?.context?.globalScope?.")||!Jt(t))return t;let n=`(globalThis[Symbol.for('smbls.libraryScope')] || ((_, v) => v))(${JSON.stringify(e)}, `,r=t;for(let[o,s]of w2){let i=S2(r);r=r.replace(o,(...a)=>{let c=a[a.length-2];return i[c]==="~"||i[c]!==r[c]?a[0]:s.replace(/\$RESOLVE\(/g,n).replace(/\$(\d)/g,(l,f)=>a[Number(f)])})}return r},Zu=(t,e)=>{if(v(t))return Wv(t,e);let n=aE(t);return n===null?t:Wv(n,e)},x2={lazy:!0,window:globalThis},cE=(t,e)=>{let n=Zu(t,e);if(n===t||!v(n))return n;try{let r=ce({v:n},{},x2).v;return typeof r!="function"?n:(Object.defineProperty(r,"toJSON",{value:()=>n,configurable:!0}),r)}catch{return n}},tb=t=>{if(!t||typeof t!="object")return!1;if(Array.isArray(t))return!0;let e=Object.getPrototypeOf(t);return e===Object.prototype||e===null},lE=(t,e,n=new WeakMap)=>{if(v(t)||typeof t=="function")return cE(t,e);if(va(t)||!tb(t))return t;if(n.has(t))return n.get(t);let r=Array.isArray(t)?[]:Object.getPrototypeOf(t)===null?Object.create(null):{};n.set(t,r);for(let o of Object.keys(t))r[o]=lE(t[o],e,n);return r},k2=(t,e)=>{let n={...t},r={};for(let o of Object.keys(t.globalScope))r[o]=Zu(t.globalScope[o],e);n.globalScope=r;for(let o of rb){let s=t[o];if(!tb(s))continue;let i={};for(let a of Object.keys(s))i[a]=cE(s[a],e);n[o]=i}for(let o of sE)tb(t[o])&&(n[o]=lE(t[o],e));return n},qv=new WeakMap,v2=(t,e,n)=>{let r=qv.get(t);r||qv.set(t,r=new Map);let o=r.get(e);if(o)return o;let s=(i,a)=>gr(n,i)&&n[i]===a;return o=new Proxy(t,{get(i,a){if(typeof a=="symbol"||gr(i,a))return Reflect.get(i,a);let c=Reflect.get(i,a);return gr(e,a)&&(c===void 0||s(a,c))||c===void 0?e[a]:c},set(i,a,c){return typeof a!="symbol"&&!gr(i,a)&&gr(e,a)?(e[a]=c,!0):Reflect.set(i,a,c)},has:(i,a)=>Reflect.has(i,a)||a in e}),r.set(e,o),o},E2=t=>!!t&&typeof t=="object"&&!!t.__raw&&typeof t.__raw=="object",A2=(t,e)=>{let n=ob.get(t);return n?e===n.consumerGs?n.libGs:E2(e)?v2(e,n.libGs,n.consumerGs):e:e},C2=()=>{typeof globalThis[zv]!="function"&&Object.defineProperty(globalThis,zv,{value:A2,configurable:!0})},Qu=t=>{let e=t[ao];return Array.isArray(e)?e:null},sb=t=>Je(t)?t.library:t,T2=(t,e,n)=>{let r=Qu(t);return!!r&&r.some(o=>o&&o.index===e&&(!o.key||o.key===n.key)&&v(o.id)&&O2(t,o.id))},O2=(t,e)=>{let n=JSON.stringify(e),r=new Set,o=s=>{if(v(s))return s.includes(n);if(!s||typeof s!="object"||r.has(s))return!1;r.add(s);for(let i in s)if(o(s[i]))return!0;return!1};for(let s of["globalScope",...rb,...sE])if(o(t[s]))return!0;return!1},R2=(t,e)=>{let n={};for(let r of Object.keys(t))n[r]=Zu(t[r],e);return n},Kv=new WeakMap,xc=(t,e=null)=>{let n=t&&Qu(t);if(!n||!n.length)return 0;let r=t.globalScope;if(!E(r))return 0;let o=Array.isArray(t.sharedLibraries)?t.sharedLibraries:[],s=Kv.get(r);s||Kv.set(r,s=new Set),C2();let i=0;for(let a of n){if(!a||!v(a.id)||s.has(a.id))continue;let c=sb(o[a.index]);if(!c||!E(c.globalScope)||a.key&&c.key!==a.key)continue;let l=p=>typeof p=="function"?iE(p):p,f=(p,g)=>{if(p===g)return!0;let h=l(p),m=l(g);return v(h)||v(m)?h===m:JSON.stringify(p)===JSON.stringify(g)},u=E(e)?(Array.isArray(a.landed)?a.landed:[]).filter(p=>v(p)&&gr(c.globalScope,p)&&gr(e,p)&&f(e[p],Zu(c.globalScope[p],a.id))):[],d=Qr(R2(c.globalScope,a.id));Object.setPrototypeOf(d,r),ob.set(a.id,{libGs:d,consumerGs:r});for(let p of u)r[p]=d[p];s.add(a.id),i++}return i},P2=/^@symbo[-.]ls\//,Gv=t=>t.includes("/")?t.slice(t.indexOf("/")+1):t,Ps=(t,e)=>{let n=[];if(!Array.isArray(t))return n;let r=new Map,o=(i,a,c)=>{for(let l of[`@symbo-ls/${i}`,`@symbo.ls/${i}`]){let f=r.get(l);if(f===void 0){r.set(l,a),n.push([l,a]);continue}f!==a&&c&&typeof e=="function"&&e({spec:l,kept:f,refused:a})}},s=[];for(let i of t){let a=sb(i);if(!a||typeof a!="object"||a.__isStub)continue;let c=a.key||a.name||a.__libraryKey,l=[];for(let f of[a.key,a.name,a.__libraryKey,a.__libraryName]){if(typeof f!="string"||!f||f!==c&&!P2.test(f))continue;let u=Gv(f);u&&!l.includes(u)&&l.push(u)}l.forEach((f,u)=>{u===0&&c&&Gv(c)===f?o(f,a,!1):s.push([f,a])})}for(let[i,a]of s)o(i,a,!0);return n},Ls=({spec:t,kept:e,refused:n})=>{typeof console>"u"||console.warn(`[smbls] shared library "${n&&n.key}" also claims ${t}, which "${e&&e.key}" already owns; ${t} stays with "${e&&e.key}".`)},Yv=["functions","methods","snippets"],Ju=Symbol.for("smbls.libraryPackages"),wc=new WeakMap,L2=t=>!!t&&typeof t=="object"&&!Array.isArray(t),D2=t=>({get globalScope(){return t()}}),Xv=(t,e,n)=>{let r={};for(let o of Object.keys(t))r[o]=t[o];return Object.defineProperty(r,"context",{configurable:!0,enumerable:!1,writable:!0,value:D2(e)}),wc.set(r,n),r},Zv=t=>!L2(t)||!wc.has(t)&&Object.prototype.hasOwnProperty.call(t,"context"),kc=t=>{if(!t||typeof t!="object")return;let e=()=>t.globalScope;for(let r of Yv){let o=t[r];Zv(o)||wc.get(o)===t||(t[r]=Xv(o,e,t))}if(Array.isArray(t.sharedLibraries)){let r=Qu(t)||[];t.sharedLibraries=t.sharedLibraries.map((o,s)=>{let i=Je(o)&&o&&"library"in o,a=sb(o);if(!a||typeof a!="object"||a.__isStub||wc.get(a)===t)return o;let c=r.find(u=>u&&u.index===s&&(!u.key||u.key===a.key)),l=()=>{let u=c&&ob.get(c.id);return u&&u.consumerGs===t.globalScope?u.libGs:t.globalScope},f={...a};for(let u of Yv)Zv(a[u])||(f[u]=Xv(a[u],l,t));return wc.set(f,t),i?{...o,library:f}:f})}let n=t.globalScope;if(n&&typeof n=="object"){let r={};for(let[o,s]of Ps(t.sharedLibraries,Ls))r[o]=s;try{Object.defineProperty(n,Ju,{configurable:!0,enumerable:!1,writable:!0,value:r})}catch{}}},I2=(t,e,n,r="library",o=-1)=>{let s=oE(e,n),i=!T2(t,o,e)&&_2(t,e,s)>0?`${r}#${m2()}`:null,a=i?k2(e,i):e,c=i?new Set(Object.keys(t.globalScope)):null,l=[];for(let f in a)if(Object.prototype.hasOwnProperty.call(a,f)&&!(f==="sharePages"||f==="sharedLibIgnore")&&f!==ao&&!f.startsWith("__")&&f!=="app"&&!s.has(f)){if(E(a[f])&&E(t[f])){if(f==="designSystem")Rs(t[f],a[f],s,f);else for(let u in a[f])if(!s.has(`${f}/${u}`)){if(f==="methods"&&qr(u)){u in t[f]||l.push(u);continue}u in t[f]?Uv(f,t[f][u])&&!Uv(f,a[f][u])&&(t[f][u]=a[f][u]):t[f][u]=a[f][u]}}else if(!(f in t)){let u=a[f],d=f==="methods"&&u&&typeof u=="object"?g2(u,s,l):u;t[f]=tE(d,s,f)}}i&&(Qu(t)||(t[ao]=[]),t[ao].push({id:i,index:o,key:v(e.key)?e.key:null,landed:Object.keys(a.globalScope).filter(f=>!c.has(f))})),l.length&&h2(r,l)},$2=(t,e,n)=>{if(t!==e){let r=rE(t);if(v(r)&&r)return r;if(t.key||t.name)return t.key||t.name}return e&&(e.key||e.name)||`sharedLibraries[${n}]`},M2=`${Qy}/default`,N2=t=>v(t)&&t!==""&&co(t).full===M2,F2=(t,e)=>{if(v(e.key)&&e.key)return e.key;if(t!==e){if(v(t.key)&&t.key)return t.key;if(v(t.name)&&t.name)return t.name}return null},j2=t=>{let e=[],n=[];for(let r=0;r<t.length;r++){let o=t[r],s=o,i=u2;if(Je(s)&&(i=Sc(s.ignoreList),s=s.library),!E(s))continue;let a={entry:o,lib:s,ignore:i,index:r};N2(F2(o,s))?n.push(a):e.push(a)}return{linked:e,bases:n}},fE=(t,e,n)=>{let r=Vv(e()),{linked:o,bases:s}=j2(t);for(let a of o)n(a);let i=!r.size&&s.length?Vv(e()):null;for(let a of s)n(a);return r.size?r:i&&i.size?i:null},vc=(t,e)=>{if(!e||!e.length)return;let n=t.designSystem,r=fE(e,()=>t.designSystem,({entry:o,lib:s,ignore:i,index:a})=>I2(t,s,i,$2(o,s,a),a));r&&(t.designSystem!==n&&(t.designSystem={...t.designSystem}),nE(t.designSystem,r))},Ec=(t,e,n=Rs)=>{if(!E(t)||!Array.isArray(e)||!e.length)return t;let r=fE(e,()=>t,({lib:o,ignore:s})=>{let i=o.designSystem;if(!i||typeof i!="object")return;let a=oE(o,s);a.has("designSystem")||n(t,i,a,"designSystem")});return r&&nE(t,r),t}});var ab,cb,lb,lo,fb,Ac,ub,fo,dE=L(()=>{"use strict";Ut();ab=async t=>{try{await navigator.clipboard.writeText(t)}catch(e){console.warn("Failed to copy text: ",e)}},cb=async t=>{try{let e=new Blob([t],{type:"text/javascript"}),n=new window.ClipboardItem({"text/plain":e});await navigator.clipboard.write([n]),console.log("JavaScript code copied to clipboard as text/javascript")}catch(e){console.error("Failed to copy JavaScript code: ",e)}},lb=t=>t.replace(/[^a-zA-Z0-9_]/g,""),lo=t=>(typeof t!="string"&&(t=String(t||"")),t.replace(/(?:^\w|[A-Z]|\b\w)/g,function(e,n){return n===0?e.toLowerCase():e.toUpperCase()}).replace(/\s+/g,"")),fb=t=>t&&t.replace(/\w\S*/g,e=>e.charAt(0).toUpperCase()+e.substr(1).toLowerCase()),Ac=t=>t.replace(/[^a-zA-Z0-9]/g," ").trim().toLowerCase().replace(/\s+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,""),ub=(t="")=>{if(typeof t!="string")return;let e=t.replace(/([A-Z])/g," $1");return e.charAt(0).toUpperCase()+e.slice(1)},fo=t=>{if(D(t))return t;if(v(t))return t.split(" ");if(E(t))return Object.values(t);if(Ie(t))return[t]}});var db,pE=L(()=>{"use strict";db=()=>{let t=document.styleSheets[0],e="";if(t)try{let n=t.cssRules||t.rules;for(let r=0;r<n.length;r++)e+=n[r].cssText}catch(n){console.error("Unable to access CSS rules. This may be due to CORS restrictions:",n)}else console.log("No stylesheets found in document.styleSheets[0].");return e}});var fe,Ds,Cc,Tc,hE=L(()=>{"use strict";fe=t=>{let e=t&&t.src;if(!e||typeof e!="string")return null;let n=t.context;if(!n)return null;let r=n.assets&&n.assets[e]||n.files&&n.files[e];if(!r)return null;if(typeof r=="string")return{src:r,type:null,variants:null};if(typeof r=="object"){if(typeof r.src=="string")return r;let o=r.content,s=o&&o.src;if(typeof s=="string")return{...r,src:s,type:r.type??o.type??null,variants:r.variants??o.variants??null}}return null},Ds=(t,{keepOneX:e=!0}={})=>{if(!Array.isArray(t)||!t.length)return"";let n=t.some(o=>typeof o.width=="number"),r=[];for(let o of t)n&&typeof o.width=="number"?r.push(`${o.src} ${o.width}w`):n||(o.scale===1&&e?r.push(o.src):o.scale&&o.scale!==1&&r.push(`${o.src} ${o.scale}x`));return r.join(", ")},Cc=t=>{if(!t||!Array.isArray(t.variants))return"";let e=t.variants.filter(n=>n.format===t.type);return Ds(e,{keepOneX:!1})},Tc=(t,e)=>{if(!t||typeof t!="object"||typeof t.src!="string")return[];if(!Array.isArray(t.variants)||!t.variants.length)return[{tag:"img",attr:{src:t.src,alt:e||""}}];let n=new Map;for(let a of t.variants)n.has(a.format)||n.set(a.format,[]),n.get(a.format).push(a);let r=[];for(let[a,c]of n)a!==t.type&&r.push({tag:"source",attr:{type:a,srcset:Ds(c,{keepOneX:!0})}});let o=n.get(t.type)||[],s=Ds(o,{keepOneX:!1}),i={src:t.src,alt:e||""};return s&&(i.srcset=s),[...r,{tag:"img",attr:i}]}});var Is={};F(Is,{CDN_PROVIDERS:()=>Ne,DOMQL_EVENTS:()=>Hg,DOMQ_PROPERTIES:()=>sr,ELEMENT_METHOD_OVERRIDE_POINTS:()=>us,ENV:()=>fm,HTML_TAGS:()=>ys,LIBRARY_PACKAGES:()=>Ju,LIBRARY_SCOPES_KEY:()=>ao,METHODS:()=>ar,METHODS_EXL:()=>_a,NODE_ENV:()=>Ye,OPTIONS:()=>qa,PACKAGE_MANAGER_TO_CDN:()=>pr,PARSED_DOMQ_PROPERTIES:()=>ba,PROPS_METHODS:()=>ir,REVIVED_MARK:()=>Ea,STATE_METHODS:()=>Wr,STATE_PROPERTIES:()=>Vg,SVG_TAGS:()=>Pk,TYPES:()=>ua,UNIVERSAL_RESERVED_KEYS:()=>qu,__resetBuiltinMethodWarnings:()=>nb,addCaching:()=>_u,addContext:()=>bu,addExtend:()=>Dm,addExtends:()=>pn,addItemAfterEveryElement:()=>Og,addProtoToArray:()=>ha,addRef:()=>gu,applyDependentState:()=>Qm,applyEvent:()=>Eu,applyEventUpdate:()=>Au,applyExtends:()=>Ik,applyProps:()=>ja,arrayContainsOtherArray:()=>xg,arraysEqual:()=>Pg,arrayzeValue:()=>fo,bindLibraryGlobalScopes:()=>xc,buildImgSrcset:()=>Cc,buildSourcesAndImg:()=>Tc,cache:()=>ry,call:()=>Py,captureSnapshot:()=>Dy,checkForStateTypes:()=>Gm,checkIfInherits:()=>vu,checkIfStringIsInArray:()=>Ig,clone:()=>Yg,cloneAndMergeArrayExtend:()=>Pa,cloneFunction:()=>ym,collectExtendsList:()=>bs,concatAddExtends:()=>Rm,copyJavaScriptToClipboard:()=>cb,copyStringToClipboard:()=>ab,createBasedOnType:()=>hu,createElement:()=>Km,createElementExtends:()=>nu,createExtends:()=>Da,createExtendsFromKeys:()=>_s,createExtendsStack:()=>iu,createIfConditionFlag:()=>bm,createInheritedState:()=>Ym,createKey:()=>Oa,createNestedObject:()=>rm,createNestedObjectByKeyPath:()=>Zm,createObjectWithoutPrototype:()=>Gf,createParent:()=>mu,createPath:()=>yu,createProps:()=>Ba,createPropsStack:()=>du,createRoot:()=>qm,createScope:()=>ty,createSnapshotId:()=>Ta,customDecodeURIComponent:()=>Ug,customEncodeURIComponent:()=>Bg,cutArrayAfterValue:()=>Cg,cutArrayBeforeValue:()=>Ag,debounce:()=>Ra,debounceOnContext:()=>gm,decodeNewlines:()=>jg,deepClone:()=>ut,deepContains:()=>em,deepDefaults:()=>Rs,deepDestringifyFunctions:()=>ce,deepExtend:()=>eu,deepMerge:()=>ft,deepMergeExtends:()=>hn,deepStringifyFunctions:()=>xa,defineSetter:()=>Oy,destringifyGlobalScope:()=>Qr,detectHeightOnInit:()=>Fy,detectInfiniteLoop:()=>am,document:()=>dt,encodeNewlines:()=>Fg,error:()=>no,excludeKeysFromObject:()=>lm,exec:()=>pt,exposeBagGlobalScopes:()=>kc,extendCachedRegistry:()=>Pm,extendStackRegistry:()=>Ia,extractArrayExtend:()=>Ma,fetchLibraryData:()=>td,fibonacciNumberByIndex:()=>jy,fileEntryUrl:()=>Yu,filterArrays:()=>Lg,filterArraysFast:()=>Dg,finalizeExtends:()=>au,findClosestNumber:()=>Xu,findClosestNumberInFactory:()=>Zy,findInheritedState:()=>ku,findKeyPosition:()=>Mg,flattenExtend:()=>ws,formatDate:()=>Ny,generateHash:()=>Qf,generateHeadArrayTags:()=>Gu,generateKey:()=>Ca,generateMetaTags:()=>Yy,get:()=>Ey,getCDNDirUrl:()=>Ku,getCDNUrl:()=>Qe,getCapitalCaseKeys:()=>Mm,getCdnProviderFromConfig:()=>Ts,getChildStateInKey:()=>xu,getChildren:()=>Ty,getContext:()=>uc,getCookie:()=>km,getDB:()=>mc,getEmotionStylesheet:()=>db,getExtendsInElement:()=>Im,getExtendsStack:()=>La,getExtendsStackRegistry:()=>tu,getFrequencyInArray:()=>kg,getFunctionSource:()=>te,getHashedExtend:()=>$a,getImportMapScript:()=>My,getInObjectByPath:()=>im,getLocalStorage:()=>Em,getNev:()=>hm,getPageMetadata:()=>Xy,getParentStateInKey:()=>Su,getPath:()=>sc,getQuery:()=>yc,getRef:()=>Cy,getRoot:()=>cc,getRootContext:()=>fc,getRootData:()=>lc,getRootState:()=>ac,getRootStateInKey:()=>wu,getSpreadChildren:()=>Nm,global:()=>_g,hasFunction:()=>Jt,hasHandlerPlugin:()=>gs,hasOwnProperty:()=>Qg,hashContent:()=>so,inheritChildExtends:()=>ou,inheritChildPropsExtends:()=>ru,inheritParentProps:()=>Ua,inheritRecursiveChildExtends:()=>su,initProps:()=>zm,is:()=>ae,isArray:()=>D,isBoolean:()=>Uf,isBuiltinElementMethod:()=>zg,isContextComponent:()=>Fm,isCyclic:()=>cm,isDOMNode:()=>ie,isDate:()=>zf,isDefined:()=>It,isDevelopment:()=>lr,isEmpty:()=>qf,isEmptyObject:()=>Jg,isEqualDeep:()=>Kf,isFailedRevival:()=>Xr,isFunction:()=>P,isHtmlElement:()=>la,isLazyFunction:()=>Xg,isLocal:()=>pm,isLoudDevRuntime:()=>Q,isMalformedDependency:()=>ro,isMethod:()=>Ly,isMobile:()=>Sm,isNode:()=>En,isNot:()=>Sg,isNotProduction:()=>An,isNull:()=>Vf,isNumber:()=>Ie,isObject:()=>E,isObjectLike:()=>q,isPhoto:()=>By,isPolyglotRetranslatableKey:()=>Wa,isPolyglotWritableKey:()=>to,isProduction:()=>cr,isProtectedElementMethod:()=>qr,isRevived:()=>Zr,isStaging:()=>dm,isState:()=>Xm,isString:()=>v,isStringFunction:()=>hs,isStringTag:()=>va,isTest:()=>Xf,isTesting:()=>um,isUndefined:()=>Bt,isUniversallyReservedKey:()=>Iy,isUnresolvableDependency:()=>hr,isValidDependencyMap:()=>oo,isValidHtmlTag:()=>Cm,isWrappedLibrary:()=>Je,joinArrays:()=>cs,jointStacks:()=>Lm,keys:()=>Hu,libraryPackageSpecs:()=>Ps,loadCssFile:()=>Hy,loadJavascript:()=>Wy,loadJavascriptFile:()=>Uy,loadJavascriptFileEmbedSync:()=>zy,loadJavascriptFileSync:()=>Vy,loadRemoteCSS:()=>qy,loadRemoteScript:()=>Os,log:()=>Ry,logGroupIf:()=>wm,logIf:()=>_m,lookdown:()=>ky,lookdownAll:()=>vy,lookup:()=>xy,lowercaseFirstLetter:()=>Hr,makeObjectWithoutPrototype:()=>tm,map:()=>Gg,mapStringsWithContextComponents:()=>Na,markPolyglotSeeded:()=>mn,markRevived:()=>ps,matchesComponentNaming:()=>gn,memoize:()=>mm,merge:()=>xt,mergeSharedLibraries:()=>vc,mergeSharedLibraryDesignSystems:()=>Ec,nextElement:()=>pc,normalizeIgnoreList:()=>Sc,normalizeLibraryKey:()=>co,objectToString:()=>ka,objectizeStringProperty:()=>Fa,overwrite:()=>Aa,overwriteDeep:()=>ee,overwriteShallow:()=>Jr,overwriteState:()=>Jm,parse:()=>Wu,parseDeep:()=>rc,pickupElementFromProps:()=>fu,pickupPropsFromElement:()=>lu,polyglotSeededKeys:()=>Ss,previousElement:()=>hc,promoteActiveRootState:()=>vs,propExists:()=>Um,propertizeElement:()=>uu,propertizeUpdate:()=>Bm,remove:()=>Av,removeChars:()=>lb,removeCookie:()=>vm,removeDuplicateProps:()=>za,removeDuplicatesInArray:()=>ls,removeFromArray:()=>vg,removeFromObject:()=>nm,removeNestedKeyByPath:()=>om,removeValueFromArray:()=>pa,removeValueFromArrayAll:()=>Tg,reorderArrayByValues:()=>Rg,repairLegacyArrowScopePreamble:()=>wa,replaceLiteralsWithObjectFields:()=>Vt,replaceOctalEscapeSequences:()=>Ng,resolveAsset:()=>fe,resolveFileReferences:()=>io,resolveHandler:()=>ms,resolveSharedLibraries:()=>ib,returnValueAsText:()=>pu,runPluginHook:()=>Ct,self:()=>wg,setActiveRootState:()=>ic,setCookie:()=>xm,setHashedExtend:()=>Jf,setInObjectByPath:()=>sm,setLocalStorage:()=>Am,setNodeStyles:()=>zu,setProps:()=>Ay,setPropsPrototype:()=>Va,sharedLibrary:()=>eb,splitPackageSpecifier:()=>bc,spotByPath:()=>oc,srcsetFor:()=>Ds,stringIncludesAny:()=>ma,stringToObject:()=>Zg,stripVersionRangePrefix:()=>_c,swapItemsInArray:()=>Eg,syncProps:()=>Ha,toCamelCase:()=>lo,toDashCase:()=>Ac,toDescriptionCase:()=>ub,toPriorityOrder:()=>$e,toTitleCase:()=>fb,toggleFullscreen:()=>$y,triggerEventOn:()=>Cn,triggerEventOnUpdate:()=>ey,trimStringFromSymbols:()=>$g,unstackArrayOfObjects:()=>da,update:()=>Vm,updateProps:()=>Hm,variables:()=>gc,verbose:()=>Es,warn:()=>dc,warnLibraryAliasCollision:()=>Ls,window:()=>C});var I=L(()=>{"use strict";Yf();Zf();Ut();dn();fr();fs();fa();Tk();Ok();ya();ca();Rk();Tm();$m();Wm();cu();Bk();Wk();Kr();qk();Tv();oy();Ov();ny();Rv();qg();Pv();Lv();Dv();Iv();$v();Mv();Nv();jv();Bv();uE();dE();pE();hE()});var ln,df,pf,sh=L(()=>{ln=Object.create(null);ln.open="0";ln.close="1";ln.ping="2";ln.pong="3";ln.message="4";ln.upgrade="5";ln.noop="6";df=Object.create(null);Object.keys(ln).forEach(t=>{df[ln[t]]=t});pf={type:"error",data:"parser error"}});function wL(t){return t instanceof Uint8Array?t:t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}function vL(t,e){if(SL&&t.data instanceof Blob)return t.data.arrayBuffer().then(wL).then(e);if(xL&&(t.data instanceof ArrayBuffer||kL(t.data)))return e(wL(t.data));hf(t,!1,n=>{Xx||(Xx=new TextEncoder),e(Xx.encode(n))})}var SL,xL,kL,hf,_L,Xx,EL=L(()=>{sh();SL=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",xL=typeof ArrayBuffer=="function",kL=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer,hf=({type:t,data:e},n,r)=>SL&&e instanceof Blob?n?r(e):_L(e,r):xL&&(e instanceof ArrayBuffer||kL(e))?n?r(e):_L(new Blob([e]),r):r(ln[t]+(e||"")),_L=(t,e)=>{let n=new FileReader;return n.onload=function(){let r=n.result.split(",")[1];e("b"+(r||""))},n.readAsDataURL(t)}});var AL,gf,CL,TL=L(()=>{AL="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",gf=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let t=0;t<AL.length;t++)gf[AL.charCodeAt(t)]=t;CL=t=>{let e=t.length*.75,n=t.length,r,o=0,s,i,a,c;t[t.length-1]==="="&&(e--,t[t.length-2]==="="&&e--);let l=new ArrayBuffer(e),f=new Uint8Array(l);for(r=0;r<n;r+=4)s=gf[t.charCodeAt(r)],i=gf[t.charCodeAt(r+1)],a=gf[t.charCodeAt(r+2)],c=gf[t.charCodeAt(r+3)],f[o++]=s<<2|i>>4,f[o++]=(i&15)<<4|a>>2,f[o++]=(a&3)<<6|c&63;return l}});var _5,mf,w5,OL,RL=L(()=>{sh();TL();_5=typeof ArrayBuffer=="function",mf=(t,e)=>{if(typeof t!="string")return{type:"message",data:OL(t,e)};let n=t.charAt(0);return n==="b"?{type:"message",data:w5(t.substring(1),e)}:df[n]?t.length>1?{type:df[n],data:t.substring(1)}:{type:df[n]}:pf},w5=(t,e)=>{if(_5){let n=CL(t);return OL(n,e)}else return{base64:!0,data:t}},OL=(t,e)=>e==="blob"?t instanceof Blob?t:new Blob([t]):t instanceof ArrayBuffer?t:t.buffer});function IL(){return new TransformStream({transform(t,e){vL(t,n=>{let r=n.length,o;if(r<126)o=new Uint8Array(1),new DataView(o.buffer).setUint8(0,r);else if(r<65536){o=new Uint8Array(3);let s=new DataView(o.buffer);s.setUint8(0,126),s.setUint16(1,r)}else{o=new Uint8Array(9);let s=new DataView(o.buffer);s.setUint8(0,127),s.setBigUint64(1,BigInt(r))}t.data&&typeof t.data!="string"&&(o[0]|=128),e.enqueue(o),e.enqueue(n)})}})}function ih(t){return t.reduce((e,n)=>e+n.length,0)}function ah(t,e){if(t[0].length===e)return t.shift();let n=new Uint8Array(e),r=0;for(let o=0;o<e;o++)n[o]=t[0][r++],r===t[0].length&&(t.shift(),r=0);return t.length&&r<t[0].length&&(t[0]=t[0].slice(r)),n}function $L(t,e){Zx||(Zx=new TextDecoder);let n=[],r=0,o=-1,s=!1;return new TransformStream({transform(i,a){for(n.push(i);;){if(r===0){if(ih(n)<1)break;let c=ah(n,1);s=(c[0]&128)===128,o=c[0]&127,o<126?r=3:o===126?r=1:r=2}else if(r===1){if(ih(n)<2)break;let c=ah(n,2);o=new DataView(c.buffer,c.byteOffset,c.length).getUint16(0),r=3}else if(r===2){if(ih(n)<8)break;let c=ah(n,8),l=new DataView(c.buffer,c.byteOffset,c.length),f=l.getUint32(0);if(f>Math.pow(2,21)-1){a.enqueue(pf);break}o=f*Math.pow(2,32)+l.getUint32(4),r=3}else{if(ih(n)<o)break;let c=ah(n,o);a.enqueue(mf(s?c:Zx.decode(c),e)),r=0}if(o===0||o>t){a.enqueue(pf);break}}}})}var PL,LL,DL,Zx,Qx,Ui=L(()=>{EL();RL();sh();PL="",LL=(t,e)=>{let n=t.length,r=new Array(n),o=0;t.forEach((s,i)=>{hf(s,!1,a=>{r[i]=a,++o===n&&e(r.join(PL))})})},DL=(t,e)=>{let n=t.split(PL),r=[];for(let o=0;o<n.length;o++){let s=mf(n[o],e);if(r.push(s),s.type==="error")break}return r};Qx=4});function gt(t){if(t)return S5(t)}function S5(t){for(var e in gt.prototype)t[e]=gt.prototype[e];return t}var qo=L(()=>{gt.prototype.on=gt.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this};gt.prototype.once=function(t,e){function n(){this.off(t,n),e.apply(this,arguments)}return n.fn=e,this.on(t,n),this};gt.prototype.off=gt.prototype.removeListener=gt.prototype.removeAllListeners=gt.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+t];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+t],this;for(var r,o=0;o<n.length;o++)if(r=n[o],r===e||r.fn===e){n.splice(o,1);break}return n.length===0&&delete this._callbacks["$"+t],this};gt.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),n=this._callbacks["$"+t],r=1;r<arguments.length;r++)e[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,o=n.length;r<o;++r)n[r].apply(this,e)}return this};gt.prototype.emitReserved=gt.prototype.emit;gt.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]};gt.prototype.hasListeners=function(t){return!!this.listeners(t).length}});var Zn,oe,ML,Ko=L(()=>{Zn=typeof Promise=="function"&&typeof Promise.resolve=="function"?e=>Promise.resolve().then(e):(e,n)=>n(e,0),oe=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),ML="arraybuffer"});function ch(t,...e){return e.reduce((n,r)=>(t.hasOwnProperty(r)&&(n[r]=t[r]),n),{})}function Qn(t,e){e.useNativeTimers?(t.setTimeoutFn=x5.bind(oe),t.clearTimeoutFn=k5.bind(oe)):(t.setTimeoutFn=oe.setTimeout.bind(oe),t.clearTimeoutFn=oe.clearTimeout.bind(oe))}function NL(t){return typeof t=="string"?E5(t):Math.ceil((t.byteLength||t.size)*v5)}function E5(t){let e=0,n=0;for(let r=0,o=t.length;r<o;r++)e=t.charCodeAt(r),e<128?n+=1:e<2048?n+=2:e<55296||e>=57344?n+=3:(r++,n+=4);return n}function lh(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}var x5,k5,v5,Go=L(()=>{Ko();x5=oe.setTimeout,k5=oe.clearTimeout;v5=1.33});function FL(t){let e="";for(let n in t)t.hasOwnProperty(n)&&(e.length&&(e+="&"),e+=encodeURIComponent(n)+"="+encodeURIComponent(t[n]));return e}function jL(t){let e={},n=t.split("&");for(let r=0,o=n.length;r<o;r++){let s=n[r].split("=");e[decodeURIComponent(s[0])]=decodeURIComponent(s[1])}return e}var Jx=L(()=>{});var fh,Jn,yf=L(()=>{Ui();qo();Go();Jx();fh=class extends Error{constructor(e,n,r){super(e),this.description=n,this.context=r,this.type="TransportError"}},Jn=class extends gt{constructor(e){super(),this.writable=!1,Qn(this,e),this.opts=e,this.query=e.query,this.socket=e.socket,this.supportsBinary=!e.forceBase64}onError(e,n,r){return super.emitReserved("error",new fh(e,n,r)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(e){this.readyState==="open"&&this.write(e)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(e){let n=mf(e,this.socket.binaryType);this.onPacket(n)}onPacket(e){super.emitReserved("packet",e)}onClose(e){this.readyState="closed",super.emitReserved("close",e)}pause(e){}createUri(e,n={}){return e+"://"+this._hostname()+this._port()+this.opts.path+this._query(n)}_hostname(){let e=this.opts.hostname;return e.indexOf(":")===-1?e:"["+e+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(this.opts.port)!==443||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(e){let n=FL(e);return n.length?"?"+n:""}}});var Vi,t0=L(()=>{yf();Go();Ui();Vi=class extends Jn{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(e){this.readyState="pausing";let n=()=>{this.readyState="paused",e()};if(this._polling||!this.writable){let r=0;this._polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(e){let n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};DL(e,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){let e=()=>{this.write([{type:"close"}])};this.readyState==="open"?e():this.once("open",e)}write(e){this.writable=!1,LL(e,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){let e=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=lh()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(e,n)}}});var BL,UL,VL=L(()=>{BL=!1;try{BL=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}UL=BL});function A5(){}function zL(){for(let t in Nr.requests)Nr.requests.hasOwnProperty(t)&&Nr.requests[t].abort()}function HL(t){let e=t.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!e||UL))return new XMLHttpRequest}catch{}if(!e)try{return new oe[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}var e0,Nr,C5,tr,uh=L(()=>{t0();qo();Go();Ko();VL();e0=class extends Vi{constructor(e){if(super(e),typeof location<"u"){let n=location.protocol==="https:",r=location.port;r||(r=n?"443":"80"),this.xd=typeof location<"u"&&e.hostname!==location.hostname||r!==e.port}}doWrite(e,n){let r=this.request({method:"POST",data:e});r.on("success",n),r.on("error",(o,s)=>{this.onError("xhr post error",o,s)})}doPoll(){let e=this.request();e.on("data",this.onData.bind(this)),e.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=e}},Nr=class t extends gt{constructor(e,n,r){super(),this.createRequest=e,Qn(this,r),this._opts=r,this._method=r.method||"GET",this._uri=n,this._data=r.data!==void 0?r.data:null,this._create()}_create(){var e;let n=ch(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this._opts.xd;let r=this._xhr=this.createRequest(n);try{r.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let o in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(o)&&r.setRequestHeader(o,this._opts.extraHeaders[o])}}catch{}if(this._method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{r.setRequestHeader("Accept","*/*")}catch{}(e=this._opts.cookieJar)===null||e===void 0||e.addCookies(r),"withCredentials"in r&&(r.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(r.timeout=this._opts.requestTimeout),r.onreadystatechange=()=>{var o;r.readyState===3&&((o=this._opts.cookieJar)===null||o===void 0||o.parseCookies(r.getResponseHeader("set-cookie"))),r.readyState===4&&(r.status===200||r.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof r.status=="number"?r.status:0)},0))},r.send(this._data)}catch(o){this.setTimeoutFn(()=>{this._onError(o)},0);return}typeof document<"u"&&(this._index=t.requestsCount++,t.requests[this._index]=this)}_onError(e){this.emitReserved("error",e,this._xhr),this._cleanup(!0)}_cleanup(e){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=A5,e)try{this._xhr.abort()}catch{}typeof document<"u"&&delete t.requests[this._index],this._xhr=null}}_onLoad(){let e=this._xhr.responseText;e!==null&&(this.emitReserved("data",e),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}};Nr.requestsCount=0;Nr.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",zL);else if(typeof addEventListener=="function"){let t="onpagehide"in oe?"pagehide":"unload";addEventListener(t,zL,!1)}}C5=(function(){let t=HL({xdomain:!1});return t&&t.responseType!==null})(),tr=class extends e0{constructor(e){super(e);let n=e&&e.forceBase64;this.supportsBinary=C5&&!n}request(e={}){return Object.assign(e,{xd:this.xd},this.opts),new Nr(HL,this.uri(),e)}}});var WL,r0,n0,er,dh=L(()=>{yf();Go();Ui();Ko();WL=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative",r0=class extends Jn{get name(){return"websocket"}doOpen(){let e=this.uri(),n=this.opts.protocols,r=WL?{}:ch(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(e,n,r)}catch(o){return this.emitReserved("error",o)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:"websocket connection closed",context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError("websocket error",e)}write(e){this.writable=!1;for(let n=0;n<e.length;n++){let r=e[n],o=n===e.length-1;hf(r,this.supportsBinary,s=>{try{this.doWrite(r,s)}catch{}o&&Zn(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){let e=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=lh()),this.supportsBinary||(n.b64=1),this.createUri(e,n)}},n0=oe.WebSocket||oe.MozWebSocket,er=class extends r0{createSocket(e,n,r){return WL?new n0(e,n,r):n?new n0(e,n):new n0(e)}doWrite(e,n){this.ws.send(n)}}});var Yo,o0=L(()=>{yf();Ko();Ui();Yo=class extends Jn{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(e){return this.emitReserved("error",e)}this._transport.closed.then(()=>{this.onClose()}).catch(e=>{this.onError("webtransport error",e)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(e=>{let n=$L(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=e.readable.pipeThrough(n).getReader(),o=IL();o.readable.pipeTo(e.writable),this._writer=o.writable.getWriter();let s=()=>{r.read().then(({done:a,value:c})=>{a||(this.onPacket(c),s())}).catch(a=>{})};s();let i={type:"open"};this.query.sid&&(i.data=`{"sid":"${this.query.sid}"}`),this._writer.write(i).then(()=>this.onOpen())})})}write(e){this.writable=!1;for(let n=0;n<e.length;n++){let r=e[n],o=n===e.length-1;this._writer.write(r).then(()=>{o&&Zn(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var e;(e=this._transport)===null||e===void 0||e.close()}}});var s0,i0=L(()=>{uh();dh();o0();s0={websocket:er,webtransport:Yo,polling:tr}});function zi(t){if(t.length>8e3)throw"URI too long";let e=t,n=t.indexOf("["),r=t.indexOf("]");n!=-1&&r!=-1&&(t=t.substring(0,n)+t.substring(n,r).replace(/:/g,";")+t.substring(r,t.length));let o=T5.exec(t||""),s={},i=14;for(;i--;)s[O5[i]]=o[i]||"";return n!=-1&&r!=-1&&(s.source=e,s.host=s.host.substring(1,s.host.length-1).replace(/;/g,":"),s.authority=s.authority.replace("[","").replace("]","").replace(/;/g,":"),s.ipv6uri=!0),s.pathNames=R5(s,s.path),s.queryKey=P5(s,s.query),s}function R5(t,e){let n=/\/{2,9}/g,r=e.replace(n,"/").split("/");return(e.slice(0,1)=="/"||e.length===0)&&r.splice(0,1),e.slice(-1)=="/"&&r.splice(r.length-1,1),r}function P5(t,e){let n={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,o,s){o&&(n[o]=s)}),n}var T5,O5,a0=L(()=>{T5=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,O5=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"]});var c0,ph,Xo,hh,Hi,l0=L(()=>{i0();Go();Jx();a0();qo();Ui();Ko();c0=typeof addEventListener=="function"&&typeof removeEventListener=="function",ph=[];c0&&addEventListener("offline",()=>{ph.forEach(t=>t())},!1);Xo=class t extends gt{constructor(e,n){if(super(),this.binaryType=ML,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,e&&typeof e=="object"&&(n=e,e=null),e){let r=zi(e);n.hostname=r.host,n.secure=r.protocol==="https"||r.protocol==="wss",n.port=r.port,r.query&&(n.query=r.query)}else n.host&&(n.hostname=zi(n.host).host);Qn(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},n.transports.forEach(r=>{let o=r.prototype.name;this.transports.push(o),this._transportsByName[o]=r}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=jL(this.opts.query)),c0&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},ph.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(e){let n=Object.assign({},this.opts.query);n.EIO=Qx,n.transport=e,this.id&&(n.sid=this.id);let r=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[e]);return new this._transportsByName[e](r)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}let e=this.opts.rememberUpgrade&&t.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";let n=this.createTransport(e);n.open(),this.setTransport(n)}setTransport(e){this.transport&&this.transport.removeAllListeners(),this.transport=e,e.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",n=>this._onClose("transport close",n))}onOpen(){this.readyState="open",t.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(e){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",e),this.emitReserved("heartbeat"),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":let n=new Error("server error");n.code=e.data,this._onError(n);break;case"message":this.emitReserved("data",e.data),this.emitReserved("message",e.data);break}}onHandshake(e){this.emitReserved("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this._pingInterval=e.pingInterval,this._pingTimeout=e.pingTimeout,this._maxPayload=e.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);let e=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+e,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},e),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){let e=this._getWritablePackets();this.transport.send(e),this._prevBufferLen=e.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r<this.writeBuffer.length;r++){let o=this.writeBuffer[r].data;if(o&&(n+=NL(o)),r>0&&n>this._maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;let e=Date.now()>this._pingTimeoutTime;return e&&(this._pingTimeoutTime=0,Zn(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),e}write(e,n,r){return this._sendPacket("message",e,n,r),this}send(e,n,r){return this._sendPacket("message",e,n,r),this}_sendPacket(e,n,r,o){if(typeof n=="function"&&(o=n,n=void 0),typeof r=="function"&&(o=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;let s={type:e,data:n,options:r};this.emitReserved("packetCreate",s),this.writeBuffer.push(s),o&&this.once("flush",o),this.flush()}close(){let e=()=>{this._onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),e()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():e()}):this.upgrading?r():e()),this}_onError(e){if(t.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",e),this._onClose("transport error",e)}_onClose(e,n){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),c0&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){let r=ph.indexOf(this._offlineEventListener);r!==-1&&ph.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",e,n),this.writeBuffer=[],this._prevBufferLen=0}}};Xo.protocol=Qx;hh=class extends Xo{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let e=0;e<this._upgrades.length;e++)this._probe(this._upgrades[e])}_probe(e){let n=this.createTransport(e),r=!1;Xo.priorWebsocketSuccess=!1;let o=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",u=>{if(!r)if(u.type==="pong"&&u.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;Xo.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(f(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{let d=new Error("probe error");d.transport=n.name,this.emitReserved("upgradeError",d)}}))};function s(){r||(r=!0,f(),n.close(),n=null)}let i=u=>{let d=new Error("probe error: "+u);d.transport=n.name,s(),this.emitReserved("upgradeError",d)};function a(){i("transport closed")}function c(){i("socket closed")}function l(u){n&&u.name!==n.name&&s()}let f=()=>{n.removeListener("open",o),n.removeListener("error",i),n.removeListener("close",a),this.off("close",c),this.off("upgrading",l)};n.once("open",o),n.once("error",i),n.once("close",a),this.once("close",c),this.once("upgrading",l),this._upgrades.indexOf("webtransport")!==-1&&e!=="webtransport"?this.setTimeoutFn(()=>{r||n.open()},200):n.open()}onHandshake(e){this._upgrades=this._filterUpgrades(e.upgrades),super.onHandshake(e)}_filterUpgrades(e){let n=[];for(let r=0;r<e.length;r++)~this.transports.indexOf(e[r])&&n.push(e[r]);return n}},Hi=class extends hh{constructor(e,n={}){let r=typeof e=="object"?e:n;(!r.transports||r.transports&&typeof r.transports[0]=="string")&&(r.transports=(r.transports||["polling","websocket","webtransport"]).map(o=>s0[o]).filter(o=>!!o)),super(e,r)}}});var bf,qL=L(()=>{t0();bf=class extends Vi{doPoll(){this._fetch().then(e=>{if(!e.ok)return this.onError("fetch read error",e.status,e);e.text().then(n=>this.onData(n))}).catch(e=>{this.onError("fetch read error",e)})}doWrite(e,n){this._fetch(e).then(r=>{if(!r.ok)return this.onError("fetch write error",r.status,r);n()}).catch(r=>{this.onError("fetch write error",r)})}_fetch(e){var n;let r=e!==void 0,o=new Headers(this.opts.extraHeaders);return r&&o.set("content-type","text/plain;charset=UTF-8"),(n=this.socket._cookieJar)===null||n===void 0||n.appendCookies(o),fetch(this.uri(),{method:r?"POST":"GET",body:r?e:null,headers:o,credentials:this.opts.withCredentials?"include":"omit"}).then(s=>{var i;return(i=this.socket._cookieJar)===null||i===void 0||i.parseCookies(s.headers.getSetCookie()),s})}}});var HZ,gh=L(()=>{l0();l0();yf();i0();Go();a0();Ko();qL();uh();uh();dh();dh();o0();HZ=Hi.protocol});function KL(t,e="",n){let r=t;n=n||typeof location<"u"&&location,t==null&&(t=n.protocol+"//"+n.host),typeof t=="string"&&(t.charAt(0)==="/"&&(t.charAt(1)==="/"?t=n.protocol+t:t=n.host+t),/^(https?|wss?):\/\//.test(t)||(typeof n<"u"?t=n.protocol+"//"+t:t="https://"+t),r=zi(t)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";let s=r.host.indexOf(":")!==-1?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+s+":"+r.port+e,r.href=r.protocol+"://"+s+(n&&n.port===r.port?"":":"+r.port),r}var GL=L(()=>{gh()});function wf(t){return L5&&(t instanceof ArrayBuffer||D5(t))||I5&&t instanceof Blob||$5&&t instanceof File}function _f(t,e){if(!t||typeof t!="object")return!1;if(Array.isArray(t)){for(let n=0,r=t.length;n<r;n++)if(_f(t[n]))return!0;return!1}if(wf(t))return!0;if(t.toJSON&&typeof t.toJSON=="function"&&arguments.length===1)return _f(t.toJSON(),!0);for(let n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&_f(t[n]))return!0;return!1}var L5,D5,YL,I5,$5,f0=L(()=>{L5=typeof ArrayBuffer=="function",D5=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer,YL=Object.prototype.toString,I5=typeof Blob=="function"||typeof Blob<"u"&&YL.call(Blob)==="[object BlobConstructor]",$5=typeof File=="function"||typeof File<"u"&&YL.call(File)==="[object FileConstructor]"});function XL(t){let e=[],n=t.data,r=t;return r.data=u0(n,e),r.attachments=e.length,{packet:r,buffers:e}}function u0(t,e){if(!t)return t;if(wf(t)){let n={_placeholder:!0,num:e.length};return e.push(t),n}else if(Array.isArray(t)){let n=new Array(t.length);for(let r=0;r<t.length;r++)n[r]=u0(t[r],e);return n}else if(typeof t=="object"&&!(t instanceof Date)){let n={};for(let r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=u0(t[r],e));return n}return t}function ZL(t,e){return t.data=d0(t.data,e),delete t.attachments,t}function d0(t,e){if(!t)return t;if(t&&t._placeholder===!0){if(typeof t.num=="number"&&t.num>=0&&t.num<e.length)return e[t.num];throw new Error("illegal attachments")}else if(Array.isArray(t))for(let n=0;n<t.length;n++)t[n]=d0(t[n],e);else if(typeof t=="object")for(let n in t)Object.prototype.hasOwnProperty.call(t,n)&&(t[n]=d0(t[n],e));return t}var QL=L(()=>{f0()});var tD=Qh((lQ,JL)=>{var Wi=1e3,qi=Wi*60,Ki=qi*60,Zo=Ki*24,M5=Zo*7,N5=Zo*365.25;JL.exports=function(t,e){e=e||{};var n=typeof t;if(n==="string"&&t.length>0)return F5(t);if(n==="number"&&isFinite(t))return e.long?B5(t):j5(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function F5(t){if(t=String(t),!(t.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(e){var n=parseFloat(e[1]),r=(e[2]||"ms").toLowerCase();switch(r){case"years":case"year":case"yrs":case"yr":case"y":return n*N5;case"weeks":case"week":case"w":return n*M5;case"days":case"day":case"d":return n*Zo;case"hours":case"hour":case"hrs":case"hr":case"h":return n*Ki;case"minutes":case"minute":case"mins":case"min":case"m":return n*qi;case"seconds":case"second":case"secs":case"sec":case"s":return n*Wi;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}function j5(t){var e=Math.abs(t);return e>=Zo?Math.round(t/Zo)+"d":e>=Ki?Math.round(t/Ki)+"h":e>=qi?Math.round(t/qi)+"m":e>=Wi?Math.round(t/Wi)+"s":t+"ms"}function B5(t){var e=Math.abs(t);return e>=Zo?mh(t,e,Zo,"day"):e>=Ki?mh(t,e,Ki,"hour"):e>=qi?mh(t,e,qi,"minute"):e>=Wi?mh(t,e,Wi,"second"):t+" ms"}function mh(t,e,n,r){var o=e>=n*1.5;return Math.round(t/n)+" "+r+(o?"s":"")}});var nD=Qh((fQ,eD)=>{function U5(t){n.debug=n,n.default=n,n.coerce=c,n.disable=i,n.enable=o,n.enabled=a,n.humanize=tD(),n.destroy=l,Object.keys(t).forEach(f=>{n[f]=t[f]}),n.names=[],n.skips=[],n.formatters={};function e(f){let u=0;for(let d=0;d<f.length;d++)u=(u<<5)-u+f.charCodeAt(d),u|=0;return n.colors[Math.abs(u)%n.colors.length]}n.selectColor=e;function n(f){let u,d=null,p,g;function h(...m){if(!h.enabled)return;let y=h,S=Number(new Date),b=S-(u||S);y.diff=b,y.prev=u,y.curr=S,u=S,m[0]=n.coerce(m[0]),typeof m[0]!="string"&&m.unshift("%O");let x=0;m[0]=m[0].replace(/%([a-zA-Z%])/g,(w,k)=>{if(w==="%%")return"%";x++;let A=n.formatters[k];if(typeof A=="function"){let T=m[x];w=A.call(y,T),m.splice(x,1),x--}return w}),n.formatArgs.call(y,m),(y.log||n.log).apply(y,m)}return h.namespace=f,h.useColors=n.useColors(),h.color=n.selectColor(f),h.extend=r,h.destroy=n.destroy,Object.defineProperty(h,"enabled",{enumerable:!0,configurable:!1,get:()=>d!==null?d:(p!==n.namespaces&&(p=n.namespaces,g=n.enabled(f)),g),set:m=>{d=m}}),typeof n.init=="function"&&n.init(h),h}function r(f,u){let d=n(this.namespace+(typeof u>"u"?":":u)+f);return d.log=this.log,d}function o(f){n.save(f),n.namespaces=f,n.names=[],n.skips=[];let u=(typeof f=="string"?f:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let d of u)d[0]==="-"?n.skips.push(d.slice(1)):n.names.push(d)}function s(f,u){let d=0,p=0,g=-1,h=0;for(;d<f.length;)if(p<u.length&&(u[p]===f[d]||u[p]==="*"))u[p]==="*"?(g=p,h=d,p++):(d++,p++);else if(g!==-1)p=g+1,h++,d=h;else return!1;for(;p<u.length&&u[p]==="*";)p++;return p===u.length}function i(){let f=[...n.names,...n.skips.map(u=>"-"+u)].join(",");return n.enable(""),f}function a(f){for(let u of n.skips)if(s(f,u))return!1;for(let u of n.names)if(s(f,u))return!0;return!1}function c(f){return f instanceof Error?f.stack||f.message:f}function l(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return n.enable(n.load()),n}eD.exports=U5});var rD=Qh((Se,yh)=>{Se.formatArgs=z5;Se.save=H5;Se.load=W5;Se.useColors=V5;Se.storage=q5();Se.destroy=(()=>{let t=!1;return()=>{t||(t=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();Se.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function V5(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let t;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(t=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(t[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function z5(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+yh.exports.humanize(this.diff),!this.useColors)return;let e="color: "+this.color;t.splice(1,0,e,"color: inherit");let n=0,r=0;t[0].replace(/%[a-zA-Z%]/g,o=>{o!=="%%"&&(n++,o==="%c"&&(r=n))}),t.splice(r,0,e)}Se.log=console.debug||console.log||(()=>{});function H5(t){try{t?Se.storage.setItem("debug",t):Se.storage.removeItem("debug")}catch{}}function W5(){let t;try{t=Se.storage.getItem("debug")||Se.storage.getItem("DEBUG")}catch{}return!t&&typeof process<"u"&&"env"in process&&(t=process.env.DEBUG),t}function q5(){try{return localStorage}catch{}}yh.exports=nD()(Se);var{formatters:K5}=yh.exports;K5.j=function(t){try{return JSON.stringify(t)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var b0={};F(b0,{Decoder:()=>g0,Encoder:()=>h0,PacketType:()=>G,isPacketValid:()=>Z5,protocol:()=>y0});function G5(t){return typeof t=="string"}function Y5(t){return t===void 0||iD(t)}function bh(t){return Object.prototype.toString.call(t)==="[object Object]"}function X5(t,e){switch(t){case G.CONNECT:return e===void 0||bh(e);case G.DISCONNECT:return e===void 0;case G.EVENT:return Array.isArray(e)&&(typeof e[0]=="number"||typeof e[0]=="string"&&sD.indexOf(e[0])===-1);case G.ACK:return Array.isArray(e);case G.CONNECT_ERROR:return typeof e=="string"||bh(e);default:return!1}}function Z5(t){return G5(t.nsp)&&Y5(t.id)&&X5(t.type,t.data)}var oD,p0,sD,y0,G,h0,g0,m0,iD,_h=L(()=>{qo();QL();f0();oD=uI(rD(),1),p0=(0,oD.default)("socket.io-parser"),sD=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],y0=5;(function(t){t[t.CONNECT=0]="CONNECT",t[t.DISCONNECT=1]="DISCONNECT",t[t.EVENT=2]="EVENT",t[t.ACK=3]="ACK",t[t.CONNECT_ERROR=4]="CONNECT_ERROR",t[t.BINARY_EVENT=5]="BINARY_EVENT",t[t.BINARY_ACK=6]="BINARY_ACK"})(G||(G={}));h0=class{constructor(e){this.replacer=e}encode(e){return p0("encoding packet %j",e),(e.type===G.EVENT||e.type===G.ACK)&&_f(e)?this.encodeAsBinary({type:e.type===G.EVENT?G.BINARY_EVENT:G.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id}):[this.encodeAsString(e)]}encodeAsString(e){let n=""+e.type;return(e.type===G.BINARY_EVENT||e.type===G.BINARY_ACK)&&(n+=e.attachments+"-"),e.nsp&&e.nsp!=="/"&&(n+=e.nsp+","),e.id!=null&&(n+=e.id),e.data!=null&&(n+=JSON.stringify(e.data,this.replacer)),p0("encoded %j as %s",e,n),n}encodeAsBinary(e){let n=XL(e),r=this.encodeAsString(n.packet),o=n.buffers;return o.unshift(r),o}},g0=class t extends gt{constructor(e){super(),this.opts=Object.assign({reviver:void 0,maxAttachments:10},typeof e=="function"?{reviver:e}:e)}add(e){let n;if(typeof e=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(e);let r=n.type===G.BINARY_EVENT;r||n.type===G.BINARY_ACK?(n.type=r?G.EVENT:G.ACK,this.reconstructor=new m0(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(wf(e)||e.base64)if(this.reconstructor)n=this.reconstructor.takeBinaryData(e),n&&(this.reconstructor=null,super.emitReserved("decoded",n));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+e)}decodeString(e){let n=0,r={type:Number(e.charAt(0))};if(G[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===G.BINARY_EVENT||r.type===G.BINARY_ACK){let s=n+1;for(;e.charAt(++n)!=="-"&&n!=e.length;);let i=e.substring(s,n);if(i!=Number(i)||e.charAt(n)!=="-")throw new Error("Illegal attachments");let a=Number(i);if(!iD(a)||a<0)throw new Error("Illegal attachments");if(a>this.opts.maxAttachments)throw new Error("too many attachments");r.attachments=a}if(e.charAt(n+1)==="/"){let s=n+1;for(;++n&&!(e.charAt(n)===","||n===e.length););r.nsp=e.substring(s,n)}else r.nsp="/";let o=e.charAt(n+1);if(o!==""&&Number(o)==o){let s=n+1;for(;++n;){let i=e.charAt(n);if(i==null||Number(i)!=i){--n;break}if(n===e.length)break}r.id=Number(e.substring(s,n+1))}if(e.charAt(++n)){let s=this.tryParse(e.substr(n));if(t.isPayloadValid(r.type,s))r.data=s;else throw new Error("invalid payload")}return p0("decoded %s as %j",e,r),r}tryParse(e){try{return JSON.parse(e,this.opts.reviver)}catch{return!1}}static isPayloadValid(e,n){switch(e){case G.CONNECT:return bh(n);case G.DISCONNECT:return n===void 0;case G.CONNECT_ERROR:return typeof n=="string"||bh(n);case G.EVENT:case G.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&sD.indexOf(n[0])===-1);case G.ACK:case G.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}},m0=class{constructor(e){this.packet=e,this.buffers=[],this.reconPack=e}takeBinaryData(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){let n=ZL(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}};iD=Number.isInteger||function(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t}});function Le(t,e,n){return t.on(e,n),function(){t.off(e,n)}}var _0=L(()=>{});var Q5,Qo,w0=L(()=>{_h();_0();qo();Q5=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1}),Qo=class extends gt{constructor(e,n,r){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=e,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this._opts=Object.assign({},r),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;let e=this.io;this.subs=[Le(e,"open",this.onopen.bind(this)),Le(e,"packet",this.onpacket.bind(this)),Le(e,"error",this.onerror.bind(this)),Le(e,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...e){return e.unshift("message"),this.emit.apply(this,e),this}emit(e,...n){var r,o,s;if(Q5.hasOwnProperty(e))throw new Error('"'+e.toString()+'" is a reserved event name');if(n.unshift(e),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;let i={type:G.EVENT,data:n};if(i.options={},i.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){let f=this.ids++,u=n.pop();this._registerAckCallback(f,u),i.id=f}let a=(o=(r=this.io.engine)===null||r===void 0?void 0:r.transport)===null||o===void 0?void 0:o.writable,c=this.connected&&!(!((s=this.io.engine)===null||s===void 0)&&s._hasPingExpired());return this.flags.volatile&&!a||(c?(this.notifyOutgoingListeners(i),this.packet(i)):this.sendBuffer.push(i)),this.flags={},this}_registerAckCallback(e,n){var r;let o=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(o===void 0){this.acks[e]=n;return}let s=this.io.setTimeoutFn(()=>{delete this.acks[e];for(let a=0;a<this.sendBuffer.length;a++)this.sendBuffer[a].id===e&&this.sendBuffer.splice(a,1);n.call(this,new Error("operation has timed out"))},o),i=(...a)=>{this.io.clearTimeoutFn(s),n.apply(this,a)};i.withError=!0,this.acks[e]=i}emitWithAck(e,...n){return new Promise((r,o)=>{let s=(i,a)=>i?o(i):r(a);s.withError=!0,n.push(s),this.emit(e,...n)})}_addToQueue(e){let n;typeof e[e.length-1]=="function"&&(n=e.pop());let r={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push((o,...s)=>(this._queue[0],o!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(o)):(this._queue.shift(),n&&n(null,...s)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(e=!1){if(!this.connected||this._queue.length===0)return;let n=this._queue[0];n.pending&&!e||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){typeof this.auth=="function"?this.auth(e=>{this._sendConnectPacket(e)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type:G.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},e):e})}onerror(e){this.connected||this.emitReserved("connect_error",e)}onclose(e,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",e,n),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(e=>{if(!this.sendBuffer.some(r=>String(r.id)===e)){let r=this.acks[e];delete this.acks[e],r.withError&&r.call(this,new Error("socket has been disconnected"))}})}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case G.CONNECT:e.data&&e.data.sid?this.onconnect(e.data.sid,e.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case G.EVENT:case G.BINARY_EVENT:this.onevent(e);break;case G.ACK:case G.BINARY_ACK:this.onack(e);break;case G.DISCONNECT:this.ondisconnect();break;case G.CONNECT_ERROR:this.destroy();let r=new Error(e.data.message);r.data=e.data.data,this.emitReserved("connect_error",r);break}}onevent(e){let n=e.data||[];e.id!=null&&n.push(this.ack(e.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){let n=this._anyListeners.slice();for(let r of n)r.apply(this,e)}super.emit.apply(this,e),this._pid&&e.length&&typeof e[e.length-1]=="string"&&(this._lastOffset=e[e.length-1])}ack(e){let n=this,r=!1;return function(...o){r||(r=!0,n.packet({type:G.ACK,id:e,data:o}))}}onack(e){let n=this.acks[e.id];typeof n=="function"&&(delete this.acks[e.id],n.withError&&e.data.unshift(null),n.apply(this,e.data))}onconnect(e,n){this.id=e,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(e=>this.emitEvent(e)),this.receiveBuffer=[],this.sendBuffer.forEach(e=>{this.notifyOutgoingListeners(e),this.packet(e)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(e=>e()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:G.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){let n=this._anyListeners;for(let r=0;r<n.length;r++)if(e===n[r])return n.splice(r,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(e),this}prependAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(e),this}offAnyOutgoing(e){if(!this._anyOutgoingListeners)return this;if(e){let n=this._anyOutgoingListeners;for(let r=0;r<n.length;r++)if(e===n[r])return n.splice(r,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(e){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){let n=this._anyOutgoingListeners.slice();for(let r of n)r.apply(this,e.data)}}}});function Jo(t){t=t||{},this.ms=t.min||100,this.max=t.max||1e4,this.factor=t.factor||2,this.jitter=t.jitter>0&&t.jitter<=1?t.jitter:0,this.attempts=0}var aD=L(()=>{Jo.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),n=Math.floor(e*this.jitter*t);t=(Math.floor(e*10)&1)==0?t-n:t+n}return Math.min(t,this.max)|0};Jo.prototype.reset=function(){this.attempts=0};Jo.prototype.setMin=function(t){this.ms=t};Jo.prototype.setMax=function(t){this.max=t};Jo.prototype.setJitter=function(t){this.jitter=t}});var ts,cD=L(()=>{gh();w0();_h();_0();aD();qo();ts=class extends gt{constructor(e,n){var r;super(),this.nsps={},this.subs=[],e&&typeof e=="object"&&(n=e,e=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,Qn(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new Jo({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=e;let o=n.parser||b0;this.encoder=new o.Encoder,this.decoder=new o.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,e||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(e){return e===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var n;return e===void 0?this._reconnectionDelay:(this._reconnectionDelay=e,(n=this.backoff)===null||n===void 0||n.setMin(e),this)}randomizationFactor(e){var n;return e===void 0?this._randomizationFactor:(this._randomizationFactor=e,(n=this.backoff)===null||n===void 0||n.setJitter(e),this)}reconnectionDelayMax(e){var n;return e===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,(n=this.backoff)===null||n===void 0||n.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(e){if(~this._readyState.indexOf("open"))return this;this.engine=new Hi(this.uri,this.opts);let n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;let o=Le(n,"open",function(){r.onopen(),e&&e()}),s=a=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",a),e?e(a):this.maybeReconnectOnOpen()},i=Le(n,"error",s);if(this._timeout!==!1){let a=this._timeout,c=this.setTimeoutFn(()=>{o(),s(new Error("timeout")),n.close()},a);this.opts.autoUnref&&c.unref(),this.subs.push(()=>{this.clearTimeoutFn(c)})}return this.subs.push(o),this.subs.push(i),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");let e=this.engine;this.subs.push(Le(e,"ping",this.onping.bind(this)),Le(e,"data",this.ondata.bind(this)),Le(e,"error",this.onerror.bind(this)),Le(e,"close",this.onclose.bind(this)),Le(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(e){try{this.decoder.add(e)}catch(n){this.onclose("parse error",n)}}ondecoded(e){Zn(()=>{this.emitReserved("packet",e)},this.setTimeoutFn)}onerror(e){this.emitReserved("error",e)}socket(e,n){let r=this.nsps[e];return r?this._autoConnect&&!r.active&&r.connect():(r=new Qo(this,e,n),this.nsps[e]=r),r}_destroy(e){let n=Object.keys(this.nsps);for(let r of n)if(this.nsps[r].active)return;this._close()}_packet(e){let n=this.encoder.encode(e);for(let r=0;r<n.length;r++)this.engine.write(n[r],e.options)}cleanup(){this.subs.forEach(e=>e()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(e,n){var r;this.cleanup(),(r=this.engine)===null||r===void 0||r.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",e,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;let e=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{let n=this.backoff.duration();this._reconnecting=!0;let r=this.setTimeoutFn(()=>{e.skipReconnect||(this.emitReserved("reconnect_attempt",e.backoff.attempts),!e.skipReconnect&&e.open(o=>{o?(e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",o)):e.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){let e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}}});var lD={};F(lD,{Fetch:()=>bf,Manager:()=>ts,NodeWebSocket:()=>er,NodeXHR:()=>tr,Socket:()=>Qo,WebSocket:()=>er,WebTransport:()=>Yo,XHR:()=>tr,connect:()=>wh,default:()=>wh,io:()=>wh,protocol:()=>y0});function wh(t,e){typeof t=="object"&&(e=t,t=void 0),e=e||{};let n=KL(t,e.path||"/socket.io"),r=n.source,o=n.id,s=n.path,i=Sf[o]&&s in Sf[o].nsps,a=e.forceNew||e["force new connection"]||e.multiplex===!1||i,c;return a?c=new ts(r,e):(Sf[o]||(Sf[o]=new ts(r,e)),c=Sf[o]),n.query&&!e.query&&(e.query=n.queryKey),c.socket(n.path,e)}var Sf,fD=L(()=>{GL();cD();w0();_h();gh();Sf={};Object.assign(wh,{Manager:ts,Socket:Qo,io:wh,connect:wh})});var q0={};F(q0,{ANIMATION_PROPS:()=>B_,ARIA_ROLES:()=>TN,ATTR_TRANSFORMS:()=>Ao,BLOCK_PROPS:()=>U_,CDN_PROVIDERS:()=>Ne,COMPOUND_CSS_KEYWORDS:()=>po,CONFIG:()=>mo,CONFIG_MERGE_EXL:()=>Ee,CSS_LONGHAND_SHORTHANDS:()=>ze,CSS_NAMED_COLOR_HEX:()=>ed,CSS_NATIVE_COLOR_REGEX:()=>ke,CSS_PROPS_REGISTRY:()=>wt,CSS_SHORTHAND_LONGHANDS:()=>yt,CSS_UNITS:()=>as,DEFAULT_CONFIG:()=>Ml,DEFAULT_CSS_PROPERTIES_LIST:()=>Rt,DELEGATED_EVENTS:()=>ai,DESIGN_SYSTEM_OPTIONS:()=>mx,DOMQL_EVENTS:()=>Hg,DOMQ_PROPERTIES:()=>sr,DOM_EVENTS:()=>zA,ELEMENT_METHOD_OVERRIDE_POINTS:()=>us,ENV:()=>fm,FACTORY:()=>ve,FLEX_PROPS:()=>q_,FONT_PROPS:()=>V_,GRID_PROPS:()=>K_,HOST_REGISTERED_PACKAGES:()=>zP,HTML_ATTRIBUTES:()=>ui,HTML_TAGS:()=>ys,LIBRARY_PACKAGES:()=>Ju,LIBRARY_SCOPES_KEY:()=>ao,LIFECYCLE_EVENTS:()=>Cr,METHODS:()=>ar,METHODS_EXL:()=>_a,MISC_PROPS:()=>z_,MIXINS:()=>Gd,NODE_ENV:()=>Ye,OPTIONS:()=>qa,PACKAGE_MANAGER_TO_CDN:()=>pr,PARSED_DOMQ_PROPERTIES:()=>ba,POSITION_PROPS:()=>H_,PROPS_METHODS:()=>ir,REGISTRY:()=>Nt,RESERVED_STORE_METHODS:()=>sk,REVIVED_MARK:()=>Ea,ROUTER_OPTIONS:()=>Fp,SIGNAL_ENGINE_KEY:()=>ss,SIGNAL_INSTANCES_KEY:()=>rs,STANDARD_SCHEME_QUERIES:()=>Ed,STATE_PROPERTIES:()=>Vg,STORE_METHOD_NAMES:()=>ok,SVG_TAGS:()=>ii,THEME_PROPS:()=>W_,TIMING_PROPS:()=>bl,TYPES:()=>ua,UNIVERSAL_RESERVED_KEYS:()=>qu,VALUE_TRANSFORMERS:()=>$d,VERSION:()=>ak,__resetBuiltinMethodWarnings:()=>nb,__resetSignalEngine:()=>mg,__resetSignalInstances:()=>hg,__resetSkinWarnings:()=>l_,__resetStateShadowWarnings:()=>ik,activateConfig:()=>_E,addCaching:()=>_u,addContext:()=>bu,addDelegatedEvent:()=>gl,addExtend:()=>Dm,addExtends:()=>pn,addItemAfterEveryElement:()=>Og,addMethods:()=>gi,addProtoToArray:()=>ha,addRef:()=>gu,aliasCaseVariants:()=>zs,animation:()=>Nb,appendSVGSprite:()=>sl,appendSvgIconsSprite:()=>xo,applyAttrTransforms:()=>M_,applyCSS:()=>QS,applyDependentState:()=>Qm,applyDocument:()=>ol,applyEvent:()=>Eu,applyEventUpdate:()=>Au,applyExtends:()=>fi,applyHeadings:()=>Td,applyInitialState:()=>cp,applyMediaSequenceVars:()=>yr,applyProps:()=>ja,applyReset:()=>il,applySequenceGlobalVars:()=>Hc,applySequenceVars:()=>$n,applySkins:()=>al,applySpacingSequence:()=>Gc,applyStateMethods:()=>be,applyTimingSequence:()=>rl,applyTrueProps:()=>X_,applyTypographySequence:()=>tl,arrayContainsOtherArray:()=>xg,arraysEqual:()=>Pg,arrayzeValue:()=>fo,assertEmitIntegrity:()=>A_,batch:()=>Nf,bindLibraryGlobalScopes:()=>xc,breakpoints:()=>$b,buildImgSrcset:()=>Cc,buildSkinVarStyles:()=>ko,buildSourcesAndImg:()=>Tc,buildThemeVarStyles:()=>Ip,cache:()=>ry,cacheNode:()=>Ar,call:()=>Py,callStateMethod:()=>Sl,camelToAttr:()=>Un,camelToLowerAttr:()=>KA,captureSnapshot:()=>Dy,changeGlobalTheme:()=>Md,changeLightness:()=>bb,checkAttributeByTagName:()=>He,checkEventFunctions:()=>$_,checkForStateTypes:()=>Gm,checkIfBoxSize:()=>Kc,checkIfInherits:()=>vu,checkIfStringIsInArray:()=>Ig,class:()=>Vb,clone:()=>Yg,cloneAndMergeArrayExtend:()=>Pa,cloneFunction:()=>ym,collectExtendsList:()=>bs,color:()=>Tb,colorStringToRgbaArray:()=>Fe,components:()=>Oi,compositeOverBackdrop:()=>ho,concatAddExtends:()=>Rm,contrastRatio:()=>Ns,convertSvgToSymbol:()=>qc,copyJavaScriptToClipboard:()=>cb,copyStringToClipboard:()=>ab,create:()=>V0,createAsync:()=>U6,createBasedOnType:()=>hu,createComputed:()=>nk,createConfig:()=>Nc,createDefine:()=>rP,createDomqlElement:()=>kf,createEffect:()=>K,createElement:()=>Km,createElementExtends:()=>nu,createExtends:()=>Da,createExtendsFromKeys:()=>_s,createExtendsStack:()=>iu,createHTMLNode:()=>si,createIfConditionFlag:()=>bm,createInheritedState:()=>Ym,createKey:()=>Oa,createNestedObject:()=>rm,createNestedObjectByKeyPath:()=>Zm,createObjectWithoutPrototype:()=>Gf,createParent:()=>mu,createPath:()=>yu,createProps:()=>Ba,createPropsStack:()=>du,createRoot:()=>qm,createScope:()=>ty,createScopeStore:()=>jf,createSignal:()=>Vr,createSkeleton:()=>z6,createSnapshotId:()=>Ta,createState:()=>aw,createStore:()=>xn,createSync:()=>V6,css:()=>Oe,cssMediaVars:()=>_d,cssShorthandDepth:()=>Qs,cssShorthandStatesLonghand:()=>ul,cssVars:()=>bd,customDecodeURIComponent:()=>Ug,customEncodeURIComponent:()=>Bg,cutArrayAfterValue:()=>Cg,cutArrayBeforeValue:()=>Ag,debounce:()=>Ra,debounceOnContext:()=>gm,decodeNewlines:()=>jg,deepClone:()=>ut,deepContains:()=>em,deepDefaults:()=>Rs,deepDestringifyFunctions:()=>ce,deepExtend:()=>eu,deepMerge:()=>ft,deepMergeExtends:()=>hn,deepStringifyFunctions:()=>xa,defaultDefine:()=>Ii,defineResolvedThemeSignal:()=>Vs,defineSetter:()=>Oy,defineThemeSignal:()=>Us,destringifyGlobalScope:()=>Qr,destroy:()=>Kl,detectHeightOnInit:()=>Fy,detectInfiniteLoop:()=>am,detectTag:()=>Bn,devices:()=>Mb,dispose:()=>zn,encodeNewlines:()=>Fg,error:()=>no,excludeKeysFromObject:()=>lm,exec:()=>pt,executeAttr:()=>MN,exetuteClassPerComponent:()=>xF,exposeBagGlobalScopes:()=>kc,extendCachedRegistry:()=>Pm,extendStackRegistry:()=>Ia,extractArrayExtend:()=>Ma,extractConditionalAttrs:()=>N_,fetchLibraryData:()=>td,fibonacciNumberByIndex:()=>jy,fileEntryUrl:()=>Yu,filterArrays:()=>Lg,filterArraysFast:()=>Dg,filterAttributesByTagName:()=>$N,finalizeExtends:()=>au,findClosestNumber:()=>Xu,findClosestNumberInFactory:()=>Zy,findHeadingLetter:()=>kd,findHeadings:()=>zc,findInheritedState:()=>ku,findKeyPosition:()=>Mg,flattenExtend:()=>ws,font:()=>xb,fontFace:()=>Eb,fontFamily:()=>kb,fontFamilyTypes:()=>vb,formatDate:()=>Ny,generateHash:()=>Qf,generateHeadArrayTags:()=>Gu,generateKey:()=>Ca,generateMetaTags:()=>Yy,generateSequence:()=>ue,generateSequencePosition:()=>Yb,generateSprite:()=>Wc,generateSubSequence:()=>Uc,get:()=>Ey,getActiveConfig:()=>O,getActiveDocument:()=>Eo,getActiveLang:()=>Ir,getCDNDirUrl:()=>Ku,getCDNUrl:()=>Qe,getCacheSize:()=>T_,getCapitalCaseKeys:()=>Mm,getCdnProviderFromConfig:()=>Ts,getChildStateInKey:()=>xu,getChildren:()=>Ty,getColor:()=>at,getColorShade:()=>id,getContext:()=>uc,getCookie:()=>km,getDB:()=>mc,getDefaultOrFirstKey:()=>Ln,getEmitStats:()=>zd,getEmotionStylesheet:()=>db,getExtendsInElement:()=>Im,getExtendsStack:()=>La,getExtendsStackRegistry:()=>tu,getFnPrefixAndValue:()=>In,getFontFace:()=>wb,getFontFaceEach:()=>go,getFontFaceEachString:()=>hd,getFontFaceString:()=>Dc,getFontFamily:()=>Jc,getFontFormat:()=>dd,getFontSizeByKey:()=>el,getFrequencyInArray:()=>kg,getFunctionSource:()=>te,getHashedExtend:()=>$a,getImportMapScript:()=>My,getInObjectByPath:()=>im,getLanguages:()=>Xl,getLocalStateLang:()=>ef,getLocalStorage:()=>Em,getMediaColor:()=>zt,getMediaTheme:()=>Ve,getNev:()=>hm,getObserver:()=>Qt,getPageMetadata:()=>Xy,getParentStateInKey:()=>Su,getPath:()=>sc,getPendingLang:()=>Yl,getQuery:()=>yc,getRef:()=>Cy,getResolvedThemeSignal:()=>bE,getRgbTone:()=>yn,getRoot:()=>cc,getRootContext:()=>fc,getRootData:()=>lc,getRootState:()=>ac,getRootStateInKey:()=>wu,getSafeInk:()=>Ad,getSafeInkInfo:()=>Jb,getSequenceValue:()=>yo,getSequenceValueBySymbols:()=>Vc,getSequenceValuePropertyPair:()=>_n,getShadow:()=>Xc,getShapeByKey:()=>nl,getSignals:()=>rk,getSizeValue:()=>xd,getSpacingBasedOnRatio:()=>Ue,getSpacingByKey:()=>Ot,getSpreadChildren:()=>Nm,getSubratio:()=>Bc,getSubratioDifference:()=>jc,getSystemGlobalTheme:()=>Re,getTheme:()=>r_,getThemeSignal:()=>yE,getTimingByKey:()=>de,getTimingFunction:()=>Ce,global:()=>_g,gradient:()=>Ob,grid:()=>Ub,hasFunction:()=>Jt,hasHandlerPlugin:()=>gs,hasOwnProperty:()=>Qg,hashContent:()=>so,hexToRgb:()=>hb,hexToRgbArray:()=>nd,hexToRgba:()=>mb,hslToRgb:()=>sd,icons:()=>Lb,inheritChildExtends:()=>ou,inheritChildPropsExtends:()=>ru,inheritParentProps:()=>Ua,inheritRecursiveChildExtends:()=>su,init:()=>Gn,initPolyglot:()=>Up,initProps:()=>zm,injectGlobal:()=>vt,is:()=>ae,isArray:()=>D,isBoolean:()=>Uf,isBuiltinElementMethod:()=>zg,isCSSVar:()=>kt,isContextComponent:()=>Fm,isCyclic:()=>cm,isDOMNode:()=>ie,isDate:()=>zf,isDefined:()=>It,isDevelopment:()=>lr,isDomDocument:()=>kn,isEmpty:()=>qf,isEmptyObject:()=>Jg,isEnumeratedTrueFalseAttr:()=>rn,isEqualDeep:()=>Kf,isFailedRevival:()=>Xr,isFunction:()=>P,isGoogleFontsUrl:()=>Fs,isHostObject:()=>vn,isHtmlElement:()=>la,isLazyFunction:()=>Xg,isLocal:()=>pm,isLoudDevRuntime:()=>Q,isMalformedDependency:()=>ro,isMethod:()=>Ly,isMobile:()=>Sm,isNode:()=>En,isNot:()=>Sg,isNotProduction:()=>An,isNull:()=>Vf,isNumber:()=>Ie,isObject:()=>E,isObjectLike:()=>q,isPhoto:()=>By,isPlainColor:()=>wr,isPolyglotRetranslatableKey:()=>Wa,isPolyglotWritableKey:()=>to,isProduction:()=>cr,isProtectedElementMethod:()=>qr,isRawUnitValue:()=>aa,isResolvedColor:()=>tn,isRevived:()=>Zr,isScalingUnit:()=>zr,isStaging:()=>dm,isState:()=>Xm,isStore:()=>_t,isString:()=>v,isStringFunction:()=>hs,isStringTag:()=>va,isSvgTag:()=>Er,isTest:()=>Xf,isTesting:()=>um,isTracking:()=>lw,isUndefined:()=>Bt,isUniversallyReservedKey:()=>Iy,isUnresolvableDependency:()=>hr,isValidDependencyMap:()=>oo,isValidHtmlTag:()=>Cm,isValidTag:()=>oi,isWasmLoaded:()=>AR,isWrappedLibrary:()=>Je,isWritableFamilyBucket:()=>bg,joinArrays:()=>cs,jointStacks:()=>Lm,keyframes:()=>ni,keys:()=>Hu,libraryPackageSpecs:()=>Ps,linearChannelToSrgb:()=>ld,loadCssFile:()=>Hy,loadJavascript:()=>Wy,loadJavascriptFile:()=>Uy,loadJavascriptFileEmbedSync:()=>zy,loadJavascriptFileSync:()=>Vy,loadRemoteCSS:()=>qy,loadRemoteScript:()=>Os,loadTranslations:()=>Ql,loadWasm:()=>ER,log:()=>Ry,logGroupIf:()=>wm,logIf:()=>_m,lookdown:()=>ky,lookdownAll:()=>vy,lookup:()=>xy,lowercaseFirstLetter:()=>Hr,makeObjectWithoutPrototype:()=>tm,map:()=>Gg,mapStringsWithContextComponents:()=>Na,markPolyglotSeeded:()=>mn,markRevived:()=>ps,matchesComponentNaming:()=>gn,media:()=>Ab,memoize:()=>mm,merge:()=>xt,mergeSharedLibraries:()=>vc,mergeSharedLibraryDesignSystems:()=>Ec,mixTwoColors:()=>pb,mixTwoRgb:()=>yb,mixTwoRgba:()=>ad,nextElement:()=>pc,normalizeIgnoreList:()=>Sc,normalizeLibraryKey:()=>co,numToLetterMap:()=>bn,objectToString:()=>ka,objectizeStringProperty:()=>Fa,oklabToLinearSrgb:()=>fd,oklabToOklch:()=>Rc,oklchToGamutSafeSrgb:()=>Pc,oklchToOklab:()=>ud,opacify:()=>Ms,overwrite:()=>Aa,overwriteDeep:()=>ee,overwriteShallow:()=>Jr,overwriteState:()=>Jm,parkHostObject:()=>or,parse:()=>Wu,parseColorToken:()=>Zt,parseDeep:()=>rc,pickupElementFromProps:()=>fu,pickupPropsFromElement:()=>lu,polyglotFunctions:()=>ff,polyglotPlugin:()=>Mi,polyglotSeededKeys:()=>Ss,popConfig:()=>X,popStaticCssPass:()=>np,prepareContext:()=>B0,previousElement:()=>hc,promoteActiveRootState:()=>vs,propExists:()=>Um,propertizeElement:()=>uu,propertizeUpdate:()=>Bm,pushConfig:()=>J,pushStaticCssPass:()=>ep,quietColorProbe:()=>bo,refreshContextProto:()=>mi,registerEvent:()=>ci,registerHostPackages:()=>HP,registerSignalInstance:()=>os,reinit:()=>ZS,relativeLuminance:()=>uo,remove:()=>hi,removeChars:()=>lb,removeCookie:()=>vm,removeDelegatedEvent:()=>ml,removeDuplicateProps:()=>za,removeDuplicatesInArray:()=>ls,removeFromArray:()=>vg,removeFromObject:()=>nm,removeNestedKeyByPath:()=>om,removeValueFromArray:()=>pa,removeValueFromArrayAll:()=>Tg,reorderArrayByValues:()=>Rg,repairLegacyArrowScopePreamble:()=>wa,replaceLiteralsWithObjectFields:()=>Vt,replaceOctalEscapeSequences:()=>Ng,resetEmitStats:()=>E_,resolveAsset:()=>fe,resolveBorderValue:()=>Ae,resolveColorRgb:()=>_o,resolveColorsInGradient:()=>ll,resolveConfigDocument:()=>is,resolveDesignSystemClass:()=>lC,resolveFileReferences:()=>io,resolveFileSource:()=>I_,resolveFileUrl:()=>je,resolveGridTracks:()=>oC,resolveHandler:()=>ms,resolvePropValue:()=>Tr,resolveShadowValue:()=>wo,resolveSharedLibraries:()=>ib,resolveStyleBlockTokens:()=>Q_,returnSubThemeOrDefault:()=>_b,returnValueAsText:()=>pu,rgbArrayToHex:()=>rd,rgbToHSL:()=>od,rgbToHex:()=>gb,runPluginHook:()=>Ct,runThroughMedia:()=>Cd,schemeGuardSelector:()=>xr,schemeMediaQuery:()=>Sr,scratchDefaultConfig:()=>Bs,scratchSystem:()=>Ys,scratchUtils:()=>br,self:()=>wg,semanticIcons:()=>Db,sequence:()=>Dn,serializeAttrValue:()=>ne,set:()=>vo,setActiveConfig:()=>wd,setActiveDocument:()=>v_,setActiveRootState:()=>ic,setAdaptiveSchemeVar:()=>kr,setClass:()=>i3,setClassname:()=>kF,setColor:()=>_r,setCookie:()=>xm,setCssEngineHook:()=>Dp,setCustomFont:()=>Lc,setCustomFontMedia:()=>mr,setEach:()=>d_,setFont:()=>Qc,setFontFamily:()=>Ks,setFontImport:()=>js,setGradient:()=>Hs,setHashedExtend:()=>Jf,setInCustomFontMedia:()=>pd,setInObjectByPath:()=>sm,setLang:()=>Jl,setLocalStorage:()=>Am,setMediaTheme:()=>qs,setNodeStyles:()=>zu,setObserver:()=>Dt,setProps:()=>Ay,setPropsPrototype:()=>Va,setSVG:()=>Gs,setScalingVar:()=>Fc,setShadow:()=>vr,setSubScalingVar:()=>Sd,setSvgIcon:()=>So,setTheme:()=>Zc,setValue:()=>u_,setVariables:()=>Xb,setWasmEngine:()=>hl,settled:()=>Ff,shadow:()=>Pb,shape:()=>Wb,sharedLibrary:()=>eb,sizes:()=>Hb,skins:()=>qb,spacing:()=>Cb,splitPackageSpecifier:()=>bc,splitSpacedValue:()=>Yc,splitTopLevelCommas:()=>en,splitTopLevelSpaces:()=>ht,splitTransition:()=>Id,spotByPath:()=>oc,srcsetFor:()=>Ds,srgbChannelToLinear:()=>cd,srgbToOklab:()=>Oc,stringIncludesAny:()=>ma,stringToObject:()=>Zg,stripVersionRangePrefix:()=>_c,svg:()=>Fb,svgData:()=>jb,swapItemsInArray:()=>Eg,syncProps:()=>Ha,templates:()=>Bb,theme:()=>Rb,timing:()=>Ib,toCamel:()=>Mc,toCamelCase:()=>lo,toDashCase:()=>Ac,toDescriptionCase:()=>ub,toLinearChannel:()=>$s,toPriorityOrder:()=>$e,toTitleCase:()=>fb,toggleFullscreen:()=>$y,transformBackgroundImage:()=>Pd,transformBorder:()=>wn,transformBorderRadius:()=>Mn,transformBoxShadow:()=>cl,transformClassname:()=>uC,transformDuration:()=>fl,transformGridTemplate:()=>Dd,transformShadow:()=>Rd,transformSize:()=>Et,transformSizeRatio:()=>N,transformTextStroke:()=>Od,transformTransition:()=>f_,transformersByPrefix:()=>Z_,transfromGap:()=>Ld,translate:()=>Zl,triggerEventOn:()=>Cn,triggerEventOnUpdate:()=>ey,trimStringFromSymbols:()=>$g,typography:()=>Ic,unit:()=>Sb,unstackArrayOfObjects:()=>da,update:()=>di,updateProps:()=>Hm,updateVars:()=>s3,upsertTranslation:()=>tf,useCssInProps:()=>ye,useHostState:()=>cw,usePropsAsCSS:()=>cC,useSelectorsAsCSS:()=>fC,variables:()=>gc,vars:()=>zb,verbose:()=>Es,warn:()=>dc,warnLibraryAliasCollision:()=>Ls,warnStateKeyShadowsMethod:()=>Bf,window:()=>C,wrapHoverRule:()=>jn});module.exports=dI(q0);Kt();var Wd={};F(Wd,{CSS_LONGHAND_SHORTHANDS:()=>ze,CSS_SHORTHAND_LONGHANDS:()=>yt,assertEmitIntegrity:()=>A_,css:()=>Oe,cssShorthandDepth:()=>Qs,cssShorthandStatesLonghand:()=>ul,getActiveDocument:()=>Eo,getCacheSize:()=>T_,getEmitStats:()=>zd,injectGlobal:()=>vt,keyframes:()=>ni,reset:()=>xA,resetEmitStats:()=>E_,setActiveDocument:()=>v_,setWasmEngine:()=>hl,wrapHoverRule:()=>jn});var p_={};F(p_,{COMPOUND_CSS_KEYWORDS:()=>po,CONFIG:()=>mo,CONFIG_MERGE_EXL:()=>Ee,CSS_NAMED_COLOR_HEX:()=>ed,CSS_NATIVE_COLOR_REGEX:()=>ke,CSS_UNITS:()=>as,FACTORY:()=>ve,STANDARD_SCHEME_QUERIES:()=>Ed,VALUE_TRANSFORMERS:()=>$d,__resetSkinWarnings:()=>l_,activateConfig:()=>_E,aliasCaseVariants:()=>zs,animation:()=>Nb,appendSVGSprite:()=>sl,appendSvgIconsSprite:()=>xo,applyDocument:()=>ol,applyHeadings:()=>Td,applyMediaSequenceVars:()=>yr,applyReset:()=>il,applySequenceGlobalVars:()=>Hc,applySequenceVars:()=>$n,applySkins:()=>al,applySpacingSequence:()=>Gc,applyTimingSequence:()=>rl,applyTypographySequence:()=>tl,breakpoints:()=>$b,buildSkinVarStyles:()=>ko,changeGlobalTheme:()=>Md,changeLightness:()=>bb,checkIfBoxSize:()=>Kc,class:()=>Vb,color:()=>Tb,colorStringToRgbaArray:()=>Fe,compositeOverBackdrop:()=>ho,contrastRatio:()=>Ns,convertSvgToSymbol:()=>qc,createConfig:()=>Nc,cssMediaVars:()=>_d,cssVars:()=>bd,defineResolvedThemeSignal:()=>Vs,defineThemeSignal:()=>Us,devices:()=>Mb,document:()=>gE,findHeadingLetter:()=>kd,findHeadings:()=>zc,font:()=>xb,fontFace:()=>Eb,fontFamily:()=>kb,fontFamilyTypes:()=>vb,generateSequence:()=>ue,generateSequencePosition:()=>Yb,generateSprite:()=>Wc,generateSubSequence:()=>Uc,getActiveConfig:()=>O,getColor:()=>at,getColorShade:()=>id,getDefaultOrFirstKey:()=>Ln,getFnPrefixAndValue:()=>In,getFontFace:()=>wb,getFontFaceEach:()=>go,getFontFaceEachString:()=>hd,getFontFaceString:()=>Dc,getFontFamily:()=>Jc,getFontFormat:()=>dd,getFontSizeByKey:()=>el,getMediaColor:()=>zt,getMediaTheme:()=>Ve,getResolvedThemeSignal:()=>bE,getRgbTone:()=>yn,getSafeInk:()=>Ad,getSafeInkInfo:()=>Jb,getSequenceValue:()=>yo,getSequenceValueBySymbols:()=>Vc,getSequenceValuePropertyPair:()=>_n,getShadow:()=>Xc,getShapeByKey:()=>nl,getSizeValue:()=>xd,getSpacingBasedOnRatio:()=>Ue,getSpacingByKey:()=>Ot,getSubratio:()=>Bc,getSubratioDifference:()=>jc,getTheme:()=>r_,getThemeSignal:()=>yE,getTimingByKey:()=>de,getTimingFunction:()=>Ce,gradient:()=>Ob,grid:()=>Ub,hexToRgb:()=>hb,hexToRgbArray:()=>nd,hexToRgba:()=>mb,hslToRgb:()=>sd,icons:()=>Lb,isCSSVar:()=>kt,isDomDocument:()=>kn,isGoogleFontsUrl:()=>Fs,isHostObject:()=>vn,isPlainColor:()=>wr,isRawUnitValue:()=>aa,isResolvedColor:()=>tn,isScalingUnit:()=>zr,isWritableFamilyBucket:()=>bg,linearChannelToSrgb:()=>ld,media:()=>Ab,mixTwoColors:()=>pb,mixTwoRgb:()=>yb,mixTwoRgba:()=>ad,numToLetterMap:()=>bn,oklabToLinearSrgb:()=>fd,oklabToOklch:()=>Rc,oklchToGamutSafeSrgb:()=>Pc,oklchToOklab:()=>ud,opacify:()=>Ms,parkHostObject:()=>or,parseColorToken:()=>Zt,popConfig:()=>X,pushConfig:()=>J,quietColorProbe:()=>bo,relativeLuminance:()=>uo,reset:()=>mE,resolveBorderValue:()=>Ae,resolveColorRgb:()=>_o,resolveColorsInGradient:()=>ll,resolveConfigDocument:()=>is,resolveFileUrl:()=>je,resolveShadowValue:()=>wo,returnSubThemeOrDefault:()=>_b,rgbArrayToHex:()=>rd,rgbToHSL:()=>od,rgbToHex:()=>gb,runThroughMedia:()=>Cd,schemeGuardSelector:()=>xr,schemeMediaQuery:()=>Sr,scratchDefaultConfig:()=>Bs,scratchSystem:()=>Ys,scratchUtils:()=>br,semanticIcons:()=>Db,sequence:()=>Dn,set:()=>vo,setActiveConfig:()=>wd,setAdaptiveSchemeVar:()=>kr,setColor:()=>_r,setCustomFont:()=>Lc,setCustomFontMedia:()=>mr,setEach:()=>d_,setFont:()=>Qc,setFontFamily:()=>Ks,setFontImport:()=>js,setGradient:()=>Hs,setInCustomFontMedia:()=>pd,setMediaTheme:()=>qs,setSVG:()=>Gs,setScalingVar:()=>Fc,setShadow:()=>vr,setSubScalingVar:()=>Sd,setSvgIcon:()=>So,setTheme:()=>Zc,setValue:()=>u_,setVariables:()=>Xb,shadow:()=>Pb,shape:()=>Wb,sizes:()=>Hb,skins:()=>qb,spacing:()=>Cb,splitSpacedValue:()=>Yc,splitTopLevelCommas:()=>en,splitTopLevelSpaces:()=>ht,splitTransition:()=>Id,srgbChannelToLinear:()=>cd,srgbToOklab:()=>Oc,svg:()=>Fb,svgData:()=>jb,templates:()=>Bb,theme:()=>Rb,timing:()=>Ib,toCamel:()=>Mc,toLinearChannel:()=>$s,transformBackgroundImage:()=>Pd,transformBorder:()=>wn,transformBorderRadius:()=>Mn,transformBoxShadow:()=>cl,transformDuration:()=>fl,transformGridTemplate:()=>Dd,transformShadow:()=>Rd,transformSize:()=>Et,transformSizeRatio:()=>N,transformTextStroke:()=>Od,transformTransition:()=>f_,transfromGap:()=>Ld,typography:()=>Ic,unit:()=>Sb,vars:()=>zb});var br={};F(br,{COMPOUND_CSS_KEYWORDS:()=>po,CSS_NAMED_COLOR_HEX:()=>ed,CSS_NATIVE_COLOR_REGEX:()=>ke,CSS_UNITS:()=>as,applyMediaSequenceVars:()=>yr,applySequenceGlobalVars:()=>Hc,applySequenceVars:()=>$n,changeLightness:()=>bb,colorStringToRgbaArray:()=>Fe,compositeOverBackdrop:()=>ho,contrastRatio:()=>Ns,convertSvgToSymbol:()=>qc,findHeadingLetter:()=>kd,findHeadings:()=>zc,generateSequence:()=>ue,generateSequencePosition:()=>Yb,generateSprite:()=>Wc,generateSubSequence:()=>Uc,getColorShade:()=>id,getDefaultOrFirstKey:()=>Ln,getFnPrefixAndValue:()=>In,getFontFace:()=>wb,getFontFaceEach:()=>go,getFontFaceEachString:()=>hd,getFontFaceString:()=>Dc,getFontFormat:()=>dd,getRgbTone:()=>yn,getSequenceValue:()=>yo,getSequenceValueBySymbols:()=>Vc,getSequenceValuePropertyPair:()=>_n,getSizeValue:()=>xd,getSubratio:()=>Bc,getSubratioDifference:()=>jc,hexToRgb:()=>hb,hexToRgbArray:()=>nd,hexToRgba:()=>mb,hslToRgb:()=>sd,isCSSVar:()=>kt,isDomDocument:()=>kn,isGoogleFontsUrl:()=>Fs,isHostObject:()=>vn,isRawUnitValue:()=>aa,isResolvedColor:()=>tn,isScalingUnit:()=>zr,isWritableFamilyBucket:()=>bg,linearChannelToSrgb:()=>ld,mixTwoColors:()=>pb,mixTwoRgb:()=>yb,mixTwoRgba:()=>ad,numToLetterMap:()=>bn,oklabToLinearSrgb:()=>fd,oklabToOklch:()=>Rc,oklchToGamutSafeSrgb:()=>Pc,oklchToOklab:()=>ud,opacify:()=>Ms,parkHostObject:()=>or,parseColorToken:()=>Zt,relativeLuminance:()=>uo,resolveConfigDocument:()=>is,resolveFileUrl:()=>je,returnSubThemeOrDefault:()=>_b,rgbArrayToHex:()=>rd,rgbToHSL:()=>od,rgbToHex:()=>gb,setCustomFont:()=>Lc,setCustomFontMedia:()=>mr,setFontImport:()=>js,setInCustomFontMedia:()=>pd,setScalingVar:()=>Fc,setSubScalingVar:()=>Sd,setVariables:()=>Xb,splitTopLevelCommas:()=>en,splitTopLevelSpaces:()=>ht,srgbChannelToLinear:()=>cd,srgbToOklab:()=>Oc,toLinearChannel:()=>$s});var kn=t=>!!(t&&t.documentElement&&typeof t.createElement=="function"&&t.head!==void 0),vn=t=>{if(t===null||typeof t!="object")return!1;let e=Object.prototype.toString.call(t);return!!(e!=="[object Object]"&&e!=="[object Array]"||typeof t.nodeType=="number"||t.defaultView||t.window===t||t.self===t)},bg=t=>t!==null&&typeof t=="object"&&!vn(t),or=(t,e,n)=>{if(!t)return;if(kn(n)){t.__domDocument||(t.__domDocument=n);return}let r=`__host_${e}`;t[r]||(t[r]=n)},is=t=>t?kn(t.__domDocument)?t.__domDocument:kn(t.document)?t.document:null:null;var zr=t=>t==="em"||t==="rem"||t==="vw"||t==="vh"||t==="vmax"||t==="vmin",as=["px","cm","mm","in","pt","pc","em","rem","ex","cap","ch","ic","lh","rlh","%","vw","vh","vmin","vmax","svw","svh","lvw","lvh","dvw","dvh","cqw","cqh","cqi","cqb","cqmin","cqmax","deg","rad","grad","turn","s","ms","dpi","dpcm","dppx","fr","auto"],TI=t=>t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),OI=new RegExp(`^-?(?:\\d+\\.?\\d*|\\.\\d+)(?:${as.filter(t=>t!=="auto").map(TI).join("|")})$`),aa=t=>OI.test(String(t).trim());I();var ed={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},Fe=t=>{if(t==="")return[0,0,0,0];if(t.toLowerCase()==="transparent")return[0,0,0,0];let e=ed[t.toLowerCase()];if(e&&(t=e),t[0]==="#")return t.length<7&&(t="#"+t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+(t.length>4?t[4]+t[4]:"")),[parseInt(t.substr(1,2),16),parseInt(t.substr(3,2),16),parseInt(t.substr(5,2),16),t.length>7?parseInt(t.substr(7,2),16)/255:1];if(t.indexOf("rgb")===-1&&dt&&C){let n=dt.body.appendChild(dt.createElement("fictum")),r="rgb(1, 2, 3)";if(n.style.color=r,n.style.color!==r){dt.body.removeChild(n);return}if(n.style.color=t,n.style.color===r||n.style.color==="")return dt.body.removeChild(n),[0,0,0,0];t=C.getComputedStyle(n).color,dt.body.removeChild(n)}return t.indexOf("rgb")===0?(t.indexOf("rgba")===-1&&(t=`${t}, 1`),t.match(/[\.\d]+/g).map(n=>+n)):[0,0,0,0]},pb=(t,e,n=.5)=>(t=Fe(t),e=Fe(e),ad(t,e,n)),hb=(t,e=1)=>{let[n,r,o]=t.match(/\w\w/g).map(s=>parseInt(s,16));return`rgb(${n},${r},${o})`},nd=(t,e=1)=>{let[n,r,o]=t.match(/\w\w/g).map(s=>parseInt(s,16));return[n,r,o]},gb=(t,e,n)=>"#"+(1<<24|t<<16|e<<8|n).toString(16).slice(1),rd=([t,e,n])=>((1<<24)+(t<<16)+(e<<8)+n).toString(16).slice(1),mb=(t,e=1)=>{let[n,r,o]=t.match(/\w\w/g).map(s=>parseInt(s,16));return`rgba(${n},${r},${o},${e})`},yb=(t,e,n=.5)=>{let r=[];for(let o=0;o<3;o++)r[o]=~~(t[o]+(e[o]-t[o])*n);return`rgb(${r})`},bb=(t,e)=>{let[n,r,o]=e,s=Math.max(0,Math.min(100,o+parseFloat(t)));return[n,r,s]},od=(t,e,n)=>{let r=Math.max(t,e,n),o=r-Math.min(t,e,n),s=1-Math.abs(r+r-o-1),i=o&&(r==t?(e-n)/o:r==e?2+(n-t)/o:4+(t-e)/o);return[60*(i<0?i+6:i),s?o/s:0,(r+r-o)/2]},sd=(t,e,n,r=e*Math.min(n,1-n),o=(s,i=(s+t/30)%12)=>n-r*Math.max(Math.min(i-3,9-i,1),-1))=>[o(0),o(8),o(4)],id=(t,e)=>{let n=parseInt(t,16),r=(n>>16)+e;r>255?r=255:r<0&&(r=0);let o=(n>>8&255)+e;o>255?o=255:o<0&&(o=0);let s=(n&255)+e;return s>255?s=255:s<0&&(s=0),((s|o<<8|r<<16)+16777216).toString(16).slice(1)},ad=(t,e,n=.5)=>{let r=[];for(let o=0;o<4;o++){let s=o===3?i=>i:Math.round;r[o]=s(t[o]+(e[o]-t[o])*n)}return`rgba(${r})`},Ms=(t,e)=>{let n=Fe(t);if(!n){An()&&console.warn(t+" color is not rgba");return}return n[3]=e,`rgba(${n})`},kt=t=>t.charCodeAt(0)===45&&t.charCodeAt(1)===45,po=new Set(["currentcolor","transparent","thin","medium","thick"]),ke=/(?:rgba?\(|hsla?\(|#[0-9a-fA-F]{3,8}\b)/,U2=/^([a-zA-Z]\w*(?:-[a-zA-Z]\w*)*)(?:\.(\d+))?(?:([+-]\d+|=\d+))?$/,Zt=t=>{if(!v(t))return null;if(ke.test(t))return{passthrough:t};if(kt(t))return{cssVar:t};let e=t.match(U2);if(!e)return null;let[,n,r,o]=e,s=r!==void 0?`0.${r}`:void 0,i=o&&o[0]==="="?o.slice(1):o;return{name:n,alpha:s,tone:i}},tn=t=>v(t)&&(t.includes("rgb")||t.includes("var(")||t.includes("#")),en=t=>{let e=[],n="",r=0;for(let o of t){if(o==="("?r+=1:o===")"&&r>0&&(r-=1),o===","&&r===0){e.push(n),n="";continue}n+=o}return(n.length||!e.length)&&e.push(n),e},ht=t=>{let e=[],n="",r=0;for(let o of t){if(o==="("?r+=1:o===")"&&r>0&&(r-=1),r===0&&/\s/.test(o)){n.length&&e.push(n),n="";continue}n+=o}return n.length&&e.push(n),e},$s=t=>(t/=255,t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)),uo=t=>.2126*$s(t[0])+.7152*$s(t[1])+.0722*$s(t[2]),Ns=(t,e)=>{let n=uo(t)+.05,r=uo(e)+.05;return n>r?n/r:r/n},cd=t=>(t/=255,t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)),ld=t=>(t<=.0031308?t*12.92:1.055*Math.pow(t,1/2.4)-.055)*255,Oc=([t,e,n])=>{let[r,o,s]=[t,e,n].map(cd),i=.4122214708*r+.5363325363*o+.0514459929*s,a=.2119034982*r+.6806995451*o+.1073969566*s,c=.0883024619*r+.2817188376*o+.6299787005*s,l=Math.cbrt(i),f=Math.cbrt(a),u=Math.cbrt(c);return[.2104542553*l+.793617785*f-.0040720468*u,1.9779984951*l-2.428592205*f+.4505937099*u,.0259040371*l+.7827717662*f-.808675766*u]},fd=([t,e,n])=>{let r=t+.3963377774*e+.2158037573*n,o=t-.1055613458*e-.0638541728*n,s=t-.0894841775*e-1.291485548*n,i=r**3,a=o**3,c=s**3;return[4.0767416621*i-3.3077115913*a+.2309699292*c,-1.2684380046*i+2.6097574011*a-.3413193965*c,-.0041960863*i-.7034186147*a+1.707614701*c]},Rc=([t,e,n])=>{let r=Math.atan2(n,e)*180/Math.PI;return r<0&&(r+=360),[t,Math.sqrt(e*e+n*n),r]},ud=([t,e,n])=>{let r=n*Math.PI/180;return[t,e*Math.cos(r),e*Math.sin(r)]},Pc=(t,e,n,r=24)=>{let o=a=>fd(ud([t,a,n])),s=a=>a.every(c=>c>=-1e-4&&c<=1.0001),i=o(e);if(!s(i)){let a=0,c=e;for(let l=0;l<r;l++){let f=(a+c)/2;s(o(f))?a=f:c=f}i=o(a)}return i.map(a=>ld(Math.max(0,Math.min(1,a))))},ho=(t,e=1,n=[255,255,255])=>e>=1?t:t.map((r,o)=>r*e+n[o]*(1-e)),yn=(t,e)=>{v(t)&&t.includes("rgb")&&(t=Fe(t).join(", ")),v(t)&&(t=t.split(",").map(o=>parseFloat(o.trim()))),Ie(e)&&(e+="");let n=rd(t),r=e.slice(0,1);if(r==="-"||r==="+"){let o=id(n,parseFloat(e));return nd(o).join(", ")}else{let[o,s,i]=t,[a,c]=od(o/255,s/255,i/255),l=Math.max(0,Math.min(100,parseFloat(e)))/100;return sd(a,c,l).map(u=>Math.round(Math.max(0,Math.min(1,u))*255)).join(", ")}};var _b=(t,e)=>{if(t)return t.themes&&t.themes[e]?t.themes[e]:t[e]?[t,t[e]]:t};var je=(t,e)=>{if(!t||!e)return null;try{return new URL(t),null}catch{}let n=e[t];return n?n.content&&n.content.src:null},Ln=(t,e)=>{if(!t)return;if(e!=null&&e!==""&&e!=="default"){let s=t[e];return s&&typeof s=="object"?s.value:void 0}let r=()=>Object.keys(t).find(s=>s!=="default"&&t[s]&&t[s].value&&!t[s].isSystemFallback);if(t.default){let s=t[t.default];if(s&&s.isSystemFallback){let i=r();if(i)return t[i].value}if(s)return s.value}let o=r()||Object.keys(t).find(s=>s!=="default"&&t[s]&&t[s].value);return o&&t[o]&&t[o].value},dd=t=>{if(typeof t!="string"||!t)return null;let e=t.split(/[#?]/)[0].split(".").pop().trim();return["woff2","woff","ttf","otf","eot"].includes(e)?e:null},Fs=t=>t&&(t.includes("fonts.googleapis.com")||t.includes("fonts.gstatic.com")),js=t=>`@import url('${t}');`,pd=t=>`@font-face { ${t} }`,Lc=(t,e,n,r={})=>{let i=(Array.isArray(e)?e:[e]).filter(a=>typeof a=="string"&&a).map(a=>{let c=dd(a),l=c?` format('${c}')`:"";return`url('${a}')${l}`}).join(`,
|
|
36
|
+
`;)t[r]==="\\"&&r++,r++;s(l,r),r++;continue}if(a==="`"){r++,i();continue}if(a==="{"){o++,r++;continue}if(a==="}"){if(o--,n.length&&o===n[n.length-1]){n.pop(),r++,i();continue}r++;continue}r++}return e.join("")},qv=(t,e)=>{if(!v(t)||!t.includes("__scope = ")&&!t.includes("__peers")&&!t.includes("const _s = ")&&!t.includes("?.context?.globalScope?.")||!Jt(t))return t;let n=`(globalThis[Symbol.for('smbls.libraryScope')] || ((_, v) => v))(${JSON.stringify(e)}, `,r=t;for(let[o,s]of S2){let i=x2(r);r=r.replace(o,(...a)=>{let c=a[a.length-2];return i[c]==="~"||i[c]!==r[c]?a[0]:s.replace(/\$RESOLVE\(/g,n).replace(/\$(\d)/g,(l,f)=>a[Number(f)])})}return r},Zu=(t,e)=>{if(v(t))return qv(t,e);let n=cE(t);return n===null?t:qv(n,e)},k2={lazy:!0,window:globalThis},lE=(t,e)=>{let n=Zu(t,e);if(n===t||!v(n))return n;try{let r=ce({v:n},{},k2).v;return typeof r!="function"?n:(Object.defineProperty(r,"toJSON",{value:()=>n,configurable:!0}),r)}catch{return n}},tb=t=>{if(!t||typeof t!="object")return!1;if(Array.isArray(t))return!0;let e=Object.getPrototypeOf(t);return e===Object.prototype||e===null},fE=(t,e,n=new WeakMap)=>{if(v(t)||typeof t=="function")return lE(t,e);if(va(t)||!tb(t))return t;if(n.has(t))return n.get(t);let r=Array.isArray(t)?[]:Object.getPrototypeOf(t)===null?Object.create(null):{};n.set(t,r);for(let o of Object.keys(t))r[o]=fE(t[o],e,n);return r},v2=(t,e)=>{let n={...t},r={};for(let o of Object.keys(t.globalScope))r[o]=Zu(t.globalScope[o],e);n.globalScope=r;for(let o of rb){let s=t[o];if(!tb(s))continue;let i={};for(let a of Object.keys(s))i[a]=lE(s[a],e);n[o]=i}for(let o of iE)tb(t[o])&&(n[o]=fE(t[o],e));return n},Kv=new WeakMap,E2=(t,e,n)=>{let r=Kv.get(t);r||Kv.set(t,r=new Map);let o=r.get(e);if(o)return o;let s=(i,a)=>mr(n,i)&&n[i]===a;return o=new Proxy(t,{get(i,a){if(typeof a=="symbol"||mr(i,a))return Reflect.get(i,a);let c=Reflect.get(i,a);return mr(e,a)&&(c===void 0||s(a,c))||c===void 0?e[a]:c},set(i,a,c){return typeof a!="symbol"&&!mr(i,a)&&mr(e,a)?(e[a]=c,!0):Reflect.set(i,a,c)},has:(i,a)=>Reflect.has(i,a)||a in e}),r.set(e,o),o},A2=t=>!!t&&typeof t=="object"&&!!t.__raw&&typeof t.__raw=="object",C2=(t,e)=>{let n=ob.get(t);return n?e===n.consumerGs?n.libGs:A2(e)?E2(e,n.libGs,n.consumerGs):e:e},T2=()=>{typeof globalThis[Hv]!="function"&&Object.defineProperty(globalThis,Hv,{value:C2,configurable:!0})},Qu=t=>{let e=t[co];return Array.isArray(e)?e:null},sb=t=>Je(t)?t.library:t,O2=(t,e,n)=>{let r=Qu(t);return!!r&&r.some(o=>o&&o.index===e&&(!o.key||o.key===n.key)&&v(o.id)&&R2(t,o.id))},R2=(t,e)=>{let n=JSON.stringify(e),r=new Set,o=s=>{if(v(s))return s.includes(n);if(!s||typeof s!="object"||r.has(s))return!1;r.add(s);for(let i in s)if(o(s[i]))return!0;return!1};for(let s of["globalScope",...rb,...iE])if(o(t[s]))return!0;return!1},P2=(t,e)=>{let n={};for(let r of Object.keys(t))n[r]=Zu(t[r],e);return n},Gv=new WeakMap,xc=(t,e=null)=>{let n=t&&Qu(t);if(!n||!n.length)return 0;let r=t.globalScope;if(!A(r))return 0;let o=Array.isArray(t.sharedLibraries)?t.sharedLibraries:[],s=Gv.get(r);s||Gv.set(r,s=new Set),T2();let i=0;for(let a of n){if(!a||!v(a.id)||s.has(a.id))continue;let c=sb(o[a.index]);if(!c||!A(c.globalScope)||a.key&&c.key!==a.key)continue;let l=p=>typeof p=="function"?aE(p):p,f=(p,g)=>{if(p===g)return!0;let h=l(p),m=l(g);return v(h)||v(m)?h===m:JSON.stringify(p)===JSON.stringify(g)},u=A(e)?(Array.isArray(a.landed)?a.landed:[]).filter(p=>v(p)&&mr(c.globalScope,p)&&mr(e,p)&&f(e[p],Zu(c.globalScope[p],a.id))):[],d=Jr(P2(c.globalScope,a.id));Object.setPrototypeOf(d,r),ob.set(a.id,{libGs:d,consumerGs:r});for(let p of u)r[p]=d[p];s.add(a.id),i++}return i},L2=/^@symbo[-.]ls\//,Yv=t=>t.includes("/")?t.slice(t.indexOf("/")+1):t,Ps=(t,e)=>{let n=[];if(!Array.isArray(t))return n;let r=new Map,o=(i,a,c)=>{for(let l of[`@symbo-ls/${i}`,`@symbo.ls/${i}`]){let f=r.get(l);if(f===void 0){r.set(l,a),n.push([l,a]);continue}f!==a&&c&&typeof e=="function"&&e({spec:l,kept:f,refused:a})}},s=[];for(let i of t){let a=sb(i);if(!a||typeof a!="object"||a.__isStub)continue;let c=a.key||a.name||a.__libraryKey,l=[];for(let f of[a.key,a.name,a.__libraryKey,a.__libraryName]){if(typeof f!="string"||!f||f!==c&&!L2.test(f))continue;let u=Yv(f);u&&!l.includes(u)&&l.push(u)}l.forEach((f,u)=>{u===0&&c&&Yv(c)===f?o(f,a,!1):s.push([f,a])})}for(let[i,a]of s)o(i,a,!0);return n},Ls=({spec:t,kept:e,refused:n})=>{typeof console>"u"||console.warn(`[smbls] shared library "${n&&n.key}" also claims ${t}, which "${e&&e.key}" already owns; ${t} stays with "${e&&e.key}".`)},Xv=["functions","methods","snippets"],Ju=Symbol.for("smbls.libraryPackages"),wc=new WeakMap,D2=t=>!!t&&typeof t=="object"&&!Array.isArray(t),I2=t=>({get globalScope(){return t()}}),Zv=(t,e,n)=>{let r={};for(let o of Object.keys(t))r[o]=t[o];return Object.defineProperty(r,"context",{configurable:!0,enumerable:!1,writable:!0,value:I2(e)}),wc.set(r,n),r},Qv=t=>!D2(t)||!wc.has(t)&&Object.prototype.hasOwnProperty.call(t,"context"),kc=t=>{if(!t||typeof t!="object")return;let e=()=>t.globalScope;for(let r of Xv){let o=t[r];Qv(o)||wc.get(o)===t||(t[r]=Zv(o,e,t))}if(Array.isArray(t.sharedLibraries)){let r=Qu(t)||[];t.sharedLibraries=t.sharedLibraries.map((o,s)=>{let i=Je(o)&&o&&"library"in o,a=sb(o);if(!a||typeof a!="object"||a.__isStub||wc.get(a)===t)return o;let c=r.find(u=>u&&u.index===s&&(!u.key||u.key===a.key)),l=()=>{let u=c&&ob.get(c.id);return u&&u.consumerGs===t.globalScope?u.libGs:t.globalScope},f={...a};for(let u of Xv)Qv(a[u])||(f[u]=Zv(a[u],l,t));return wc.set(f,t),i?{...o,library:f}:f})}let n=t.globalScope;if(n&&typeof n=="object"){let r={};for(let[o,s]of Ps(t.sharedLibraries,Ls))r[o]=s;try{Object.defineProperty(n,Ju,{configurable:!0,enumerable:!1,writable:!0,value:r})}catch{}}},$2=(t,e,n,r="library",o=-1)=>{let s=sE(e,n),i=!O2(t,o,e)&&w2(t,e,s)>0?`${r}#${y2()}`:null,a=i?v2(e,i):e,c=i?new Set(Object.keys(t.globalScope)):null,l=[];for(let f in a)if(Object.prototype.hasOwnProperty.call(a,f)&&!(f==="sharePages"||f==="sharedLibIgnore")&&f!==co&&!f.startsWith("__")&&f!=="app"&&!s.has(f)){if(A(a[f])&&A(t[f])){if(f==="designSystem")Rs(t[f],a[f],s,f);else for(let u in a[f])if(!s.has(`${f}/${u}`)){if(f==="methods"&&Kr(u)){u in t[f]||l.push(u);continue}u in t[f]?Vv(f,t[f][u])&&!Vv(f,a[f][u])&&(t[f][u]=a[f][u]):t[f][u]=a[f][u]}}else if(!(f in t)){let u=a[f],d=f==="methods"&&u&&typeof u=="object"?m2(u,s,l):u;t[f]=eE(d,s,f)}}i&&(Qu(t)||(t[co]=[]),t[co].push({id:i,index:o,key:v(e.key)?e.key:null,landed:Object.keys(a.globalScope).filter(f=>!c.has(f))})),l.length&&g2(r,l)},M2=(t,e,n)=>{if(t!==e){let r=oE(t);if(v(r)&&r)return r;if(t.key||t.name)return t.key||t.name}return e&&(e.key||e.name)||`sharedLibraries[${n}]`},N2=`${Qy}/default`,F2=t=>v(t)&&t!==""&&lo(t).full===N2,j2=(t,e)=>{if(v(e.key)&&e.key)return e.key;if(t!==e){if(v(t.key)&&t.key)return t.key;if(v(t.name)&&t.name)return t.name}return null},B2=t=>{let e=[],n=[];for(let r=0;r<t.length;r++){let o=t[r],s=o,i=d2;if(Je(s)&&(i=Sc(s.ignoreList),s=s.library),!A(s))continue;let a={entry:o,lib:s,ignore:i,index:r};F2(j2(o,s))?n.push(a):e.push(a)}return{linked:e,bases:n}},uE=(t,e,n)=>{let r=zv(e()),{linked:o,bases:s}=B2(t);for(let a of o)n(a);let i=!r.size&&s.length?zv(e()):null;for(let a of s)n(a);return r.size?r:i&&i.size?i:null},vc=(t,e)=>{if(!e||!e.length)return;let n=t.designSystem,r=uE(e,()=>t.designSystem,({entry:o,lib:s,ignore:i,index:a})=>$2(t,s,i,M2(o,s,a),a));r&&(t.designSystem!==n&&(t.designSystem={...t.designSystem}),rE(t.designSystem,r))},Ec=(t,e,n=Rs)=>{if(!A(t)||!Array.isArray(e)||!e.length)return t;let r=uE(e,()=>t,({lib:o,ignore:s})=>{let i=o.designSystem;if(!i||typeof i!="object")return;let a=sE(o,s);a.has("designSystem")||n(t,i,a,"designSystem")});return r&&rE(t,r),t}});var ab,cb,lb,fo,fb,Ac,ub,uo,pE=L(()=>{"use strict";Ut();ab=async t=>{try{await navigator.clipboard.writeText(t)}catch(e){console.warn("Failed to copy text: ",e)}},cb=async t=>{try{let e=new Blob([t],{type:"text/javascript"}),n=new window.ClipboardItem({"text/plain":e});await navigator.clipboard.write([n]),console.log("JavaScript code copied to clipboard as text/javascript")}catch(e){console.error("Failed to copy JavaScript code: ",e)}},lb=t=>t.replace(/[^a-zA-Z0-9_]/g,""),fo=t=>(typeof t!="string"&&(t=String(t||"")),t.replace(/(?:^\w|[A-Z]|\b\w)/g,function(e,n){return n===0?e.toLowerCase():e.toUpperCase()}).replace(/\s+/g,"")),fb=t=>t&&t.replace(/\w\S*/g,e=>e.charAt(0).toUpperCase()+e.substr(1).toLowerCase()),Ac=t=>t.replace(/[^a-zA-Z0-9]/g," ").trim().toLowerCase().replace(/\s+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,""),ub=(t="")=>{if(typeof t!="string")return;let e=t.replace(/([A-Z])/g," $1");return e.charAt(0).toUpperCase()+e.slice(1)},uo=t=>{if(D(t))return t;if(v(t))return t.split(" ");if(A(t))return Object.values(t);if(Ie(t))return[t]}});var db,hE=L(()=>{"use strict";db=()=>{let t=document.styleSheets[0],e="";if(t)try{let n=t.cssRules||t.rules;for(let r=0;r<n.length;r++)e+=n[r].cssText}catch(n){console.error("Unable to access CSS rules. This may be due to CORS restrictions:",n)}else console.log("No stylesheets found in document.styleSheets[0].");return e}});var fe,Ds,Cc,Tc,gE=L(()=>{"use strict";fe=t=>{let e=t&&t.src;if(!e||typeof e!="string")return null;let n=t.context;if(!n)return null;let r=n.assets&&n.assets[e]||n.files&&n.files[e];if(!r)return null;if(typeof r=="string")return{src:r,type:null,variants:null};if(typeof r=="object"){if(typeof r.src=="string")return r;let o=r.content,s=o&&o.src;if(typeof s=="string")return{...r,src:s,type:r.type??o.type??null,variants:r.variants??o.variants??null}}return null},Ds=(t,{keepOneX:e=!0}={})=>{if(!Array.isArray(t)||!t.length)return"";let n=t.some(o=>typeof o.width=="number"),r=[];for(let o of t)n&&typeof o.width=="number"?r.push(`${o.src} ${o.width}w`):n||(o.scale===1&&e?r.push(o.src):o.scale&&o.scale!==1&&r.push(`${o.src} ${o.scale}x`));return r.join(", ")},Cc=t=>{if(!t||!Array.isArray(t.variants))return"";let e=t.variants.filter(n=>n.format===t.type);return Ds(e,{keepOneX:!1})},Tc=(t,e)=>{if(!t||typeof t!="object"||typeof t.src!="string")return[];if(!Array.isArray(t.variants)||!t.variants.length)return[{tag:"img",attr:{src:t.src,alt:e||""}}];let n=new Map;for(let a of t.variants)n.has(a.format)||n.set(a.format,[]),n.get(a.format).push(a);let r=[];for(let[a,c]of n)a!==t.type&&r.push({tag:"source",attr:{type:a,srcset:Ds(c,{keepOneX:!0})}});let o=n.get(t.type)||[],s=Ds(o,{keepOneX:!1}),i={src:t.src,alt:e||""};return s&&(i.srcset=s),[...r,{tag:"img",attr:i}]}});var Is={};F(Is,{CDN_PROVIDERS:()=>Ne,DOMQL_EVENTS:()=>Hg,DOMQ_PROPERTIES:()=>sr,ELEMENT_METHOD_OVERRIDE_POINTS:()=>ds,ENV:()=>fm,HTML_TAGS:()=>bs,LIBRARY_PACKAGES:()=>Ju,LIBRARY_SCOPES_KEY:()=>co,METHODS:()=>ar,METHODS_EXL:()=>_a,NODE_ENV:()=>Ye,OPTIONS:()=>qa,PACKAGE_MANAGER_TO_CDN:()=>hr,PARSED_DOMQ_PROPERTIES:()=>ba,PROPS_METHODS:()=>ir,REVIVED_MARK:()=>Ea,STATE_METHODS:()=>qr,STATE_PROPERTIES:()=>Vg,SVG_TAGS:()=>Lk,TYPES:()=>ua,UNIVERSAL_RESERVED_KEYS:()=>qu,__resetBuiltinMethodWarnings:()=>nb,addCaching:()=>_u,addContext:()=>bu,addExtend:()=>Dm,addExtends:()=>pn,addItemAfterEveryElement:()=>Og,addProtoToArray:()=>ha,addRef:()=>gu,applyDependentState:()=>Qm,applyEvent:()=>Eu,applyEventUpdate:()=>Au,applyExtends:()=>$k,applyProps:()=>ja,arrayContainsOtherArray:()=>xg,arraysEqual:()=>Pg,arrayzeValue:()=>uo,bindLibraryGlobalScopes:()=>xc,buildImgSrcset:()=>Cc,buildSourcesAndImg:()=>Tc,cache:()=>ry,call:()=>Py,captureSnapshot:()=>Dy,checkForStateTypes:()=>Gm,checkIfInherits:()=>vu,checkIfStringIsInArray:()=>Ig,clone:()=>Yg,cloneAndMergeArrayExtend:()=>Pa,cloneFunction:()=>ym,collectExtendsList:()=>_s,concatAddExtends:()=>Rm,copyJavaScriptToClipboard:()=>cb,copyStringToClipboard:()=>ab,createBasedOnType:()=>hu,createElement:()=>Km,createElementExtends:()=>nu,createExtends:()=>Da,createExtendsFromKeys:()=>ws,createExtendsStack:()=>iu,createIfConditionFlag:()=>bm,createInheritedState:()=>Ym,createKey:()=>Oa,createNestedObject:()=>rm,createNestedObjectByKeyPath:()=>Zm,createObjectWithoutPrototype:()=>Gf,createParent:()=>mu,createPath:()=>yu,createProps:()=>Ba,createPropsStack:()=>du,createRoot:()=>qm,createScope:()=>ty,createSnapshotId:()=>Ta,customDecodeURIComponent:()=>Ug,customEncodeURIComponent:()=>Bg,cutArrayAfterValue:()=>Cg,cutArrayBeforeValue:()=>Ag,debounce:()=>Ra,debounceOnContext:()=>gm,decodeNewlines:()=>jg,deepClone:()=>ut,deepContains:()=>em,deepDefaults:()=>Rs,deepDestringifyFunctions:()=>ce,deepExtend:()=>eu,deepMerge:()=>ft,deepMergeExtends:()=>hn,deepStringifyFunctions:()=>xa,defineSetter:()=>Oy,destringifyGlobalScope:()=>Jr,detectHeightOnInit:()=>Fy,detectInfiniteLoop:()=>am,document:()=>dt,encodeNewlines:()=>Fg,error:()=>ro,excludeKeysFromObject:()=>lm,exec:()=>pt,exposeBagGlobalScopes:()=>kc,extendCachedRegistry:()=>Pm,extendStackRegistry:()=>Ia,extractArrayExtend:()=>Ma,fetchLibraryData:()=>td,fibonacciNumberByIndex:()=>jy,fileEntryUrl:()=>Yu,filterArrays:()=>Lg,filterArraysFast:()=>Dg,finalizeExtends:()=>au,findClosestNumber:()=>Xu,findClosestNumberInFactory:()=>Zy,findInheritedState:()=>ku,findKeyPosition:()=>Mg,flattenExtend:()=>Ss,formatDate:()=>Ny,generateHash:()=>Qf,generateHeadArrayTags:()=>Gu,generateKey:()=>Ca,generateMetaTags:()=>Yy,get:()=>Ey,getCDNDirUrl:()=>Ku,getCDNUrl:()=>Qe,getCapitalCaseKeys:()=>Mm,getCdnProviderFromConfig:()=>Ts,getChildStateInKey:()=>xu,getChildren:()=>Ty,getContext:()=>uc,getCookie:()=>km,getDB:()=>mc,getEmotionStylesheet:()=>db,getExtendsInElement:()=>Im,getExtendsStack:()=>La,getExtendsStackRegistry:()=>tu,getFrequencyInArray:()=>kg,getFunctionSource:()=>te,getHashedExtend:()=>$a,getImportMapScript:()=>My,getInObjectByPath:()=>im,getLocalStorage:()=>Em,getNev:()=>hm,getPageMetadata:()=>Xy,getParentStateInKey:()=>Su,getPath:()=>sc,getQuery:()=>yc,getRef:()=>Cy,getRoot:()=>cc,getRootContext:()=>fc,getRootData:()=>lc,getRootState:()=>ac,getRootStateInKey:()=>wu,getSpreadChildren:()=>Nm,global:()=>_g,hasFunction:()=>Jt,hasHandlerPlugin:()=>ms,hasOwnProperty:()=>Qg,hashContent:()=>io,inheritChildExtends:()=>ou,inheritChildPropsExtends:()=>ru,inheritParentProps:()=>Ua,inheritRecursiveChildExtends:()=>su,initProps:()=>zm,is:()=>ae,isArray:()=>D,isBoolean:()=>Uf,isBuiltinElementMethod:()=>zg,isContextComponent:()=>Fm,isCyclic:()=>cm,isDOMNode:()=>ie,isDate:()=>zf,isDefined:()=>It,isDevelopment:()=>lr,isEmpty:()=>qf,isEmptyObject:()=>Jg,isEqualDeep:()=>Kf,isFailedRevival:()=>Zr,isFunction:()=>P,isHtmlElement:()=>la,isLazyFunction:()=>Xg,isLocal:()=>pm,isLoudDevRuntime:()=>Q,isMalformedDependency:()=>oo,isMethod:()=>Ly,isMobile:()=>Sm,isNode:()=>En,isNot:()=>Sg,isNotProduction:()=>An,isNull:()=>Vf,isNumber:()=>Ie,isObject:()=>A,isObjectLike:()=>q,isPhoto:()=>By,isPolyglotRetranslatableKey:()=>Wa,isPolyglotWritableKey:()=>eo,isProduction:()=>cr,isProtectedElementMethod:()=>Kr,isRevived:()=>Qr,isStaging:()=>dm,isState:()=>Xm,isString:()=>v,isStringFunction:()=>gs,isStringTag:()=>va,isTest:()=>Xf,isTesting:()=>um,isUndefined:()=>Bt,isUniversallyReservedKey:()=>Iy,isUnresolvableDependency:()=>gr,isValidDependencyMap:()=>so,isValidHtmlTag:()=>Cm,isWrappedLibrary:()=>Je,joinArrays:()=>ls,jointStacks:()=>Lm,keys:()=>Hu,libraryPackageSpecs:()=>Ps,loadCssFile:()=>Hy,loadJavascript:()=>Wy,loadJavascriptFile:()=>Uy,loadJavascriptFileEmbedSync:()=>zy,loadJavascriptFileSync:()=>Vy,loadRemoteCSS:()=>qy,loadRemoteScript:()=>Os,log:()=>Ry,logGroupIf:()=>wm,logIf:()=>_m,lookdown:()=>ky,lookdownAll:()=>vy,lookup:()=>xy,lowercaseFirstLetter:()=>Wr,makeObjectWithoutPrototype:()=>tm,map:()=>Gg,mapStringsWithContextComponents:()=>Na,markPolyglotSeeded:()=>mn,markRevived:()=>hs,matchesComponentNaming:()=>gn,memoize:()=>mm,merge:()=>xt,mergeSharedLibraries:()=>vc,mergeSharedLibraryDesignSystems:()=>Ec,nextElement:()=>pc,normalizeIgnoreList:()=>Sc,normalizeLibraryKey:()=>lo,objectToString:()=>ka,objectizeStringProperty:()=>Fa,overwrite:()=>Aa,overwriteDeep:()=>ee,overwriteShallow:()=>to,overwriteState:()=>Jm,parse:()=>Wu,parseDeep:()=>rc,pickupElementFromProps:()=>fu,pickupPropsFromElement:()=>lu,polyglotSeededKeys:()=>ur,previousElement:()=>hc,promoteActiveRootState:()=>vs,propExists:()=>Um,propertizeElement:()=>uu,propertizeUpdate:()=>Bm,remove:()=>Cv,removeChars:()=>lb,removeCookie:()=>vm,removeDuplicateProps:()=>za,removeDuplicatesInArray:()=>fs,removeFromArray:()=>vg,removeFromObject:()=>nm,removeNestedKeyByPath:()=>om,removeValueFromArray:()=>pa,removeValueFromArrayAll:()=>Tg,reorderArrayByValues:()=>Rg,repairLegacyArrowScopePreamble:()=>wa,replaceLiteralsWithObjectFields:()=>Vt,replaceOctalEscapeSequences:()=>Ng,resolveAsset:()=>fe,resolveFileReferences:()=>ao,resolveHandler:()=>ys,resolveSharedLibraries:()=>ib,returnValueAsText:()=>pu,runPluginHook:()=>Ct,self:()=>wg,setActiveRootState:()=>ic,setCookie:()=>xm,setHashedExtend:()=>Jf,setInObjectByPath:()=>sm,setLocalStorage:()=>Am,setNodeStyles:()=>zu,setProps:()=>Ay,setPropsPrototype:()=>Va,sharedLibrary:()=>eb,splitPackageSpecifier:()=>bc,spotByPath:()=>oc,srcsetFor:()=>Ds,stringIncludesAny:()=>ma,stringToObject:()=>Zg,stripVersionRangePrefix:()=>_c,swapItemsInArray:()=>Eg,syncProps:()=>Ha,toCamelCase:()=>fo,toDashCase:()=>Ac,toDescriptionCase:()=>ub,toPriorityOrder:()=>$e,toTitleCase:()=>fb,toggleFullscreen:()=>$y,triggerEventOn:()=>Cn,triggerEventOnUpdate:()=>ey,trimStringFromSymbols:()=>$g,unstackArrayOfObjects:()=>da,update:()=>Vm,updateProps:()=>Hm,variables:()=>gc,verbose:()=>Es,warn:()=>dc,warnLibraryAliasCollision:()=>Ls,window:()=>T});var I=L(()=>{"use strict";Yf();Zf();Ut();dn();fr();us();fa();Ok();Rk();ya();ca();Pk();Tm();$m();Wm();cu();Uk();qk();Gr();Kk();Ov();oy();Rv();ny();Pv();qg();Lv();Dv();Iv();$v();Mv();Nv();Fv();Bv();Uv();dE();pE();hE();gE()});var ln,df,pf,sh=L(()=>{ln=Object.create(null);ln.open="0";ln.close="1";ln.ping="2";ln.pong="3";ln.message="4";ln.upgrade="5";ln.noop="6";df=Object.create(null);Object.keys(ln).forEach(t=>{df[ln[t]]=t});pf={type:"error",data:"parser error"}});function SL(t){return t instanceof Uint8Array?t:t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}function EL(t,e){if(xL&&t.data instanceof Blob)return t.data.arrayBuffer().then(SL).then(e);if(kL&&(t.data instanceof ArrayBuffer||vL(t.data)))return e(SL(t.data));hf(t,!1,n=>{Zx||(Zx=new TextEncoder),e(Zx.encode(n))})}var xL,kL,vL,hf,wL,Zx,AL=L(()=>{sh();xL=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",kL=typeof ArrayBuffer=="function",vL=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer,hf=({type:t,data:e},n,r)=>xL&&e instanceof Blob?n?r(e):wL(e,r):kL&&(e instanceof ArrayBuffer||vL(e))?n?r(e):wL(new Blob([e]),r):r(ln[t]+(e||"")),wL=(t,e)=>{let n=new FileReader;return n.onload=function(){let r=n.result.split(",")[1];e("b"+(r||""))},n.readAsDataURL(t)}});var CL,gf,TL,OL=L(()=>{CL="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",gf=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let t=0;t<CL.length;t++)gf[CL.charCodeAt(t)]=t;TL=t=>{let e=t.length*.75,n=t.length,r,o=0,s,i,a,c;t[t.length-1]==="="&&(e--,t[t.length-2]==="="&&e--);let l=new ArrayBuffer(e),f=new Uint8Array(l);for(r=0;r<n;r+=4)s=gf[t.charCodeAt(r)],i=gf[t.charCodeAt(r+1)],a=gf[t.charCodeAt(r+2)],c=gf[t.charCodeAt(r+3)],f[o++]=s<<2|i>>4,f[o++]=(i&15)<<4|a>>2,f[o++]=(a&3)<<6|c&63;return l}});var w5,mf,S5,RL,PL=L(()=>{sh();OL();w5=typeof ArrayBuffer=="function",mf=(t,e)=>{if(typeof t!="string")return{type:"message",data:RL(t,e)};let n=t.charAt(0);return n==="b"?{type:"message",data:S5(t.substring(1),e)}:df[n]?t.length>1?{type:df[n],data:t.substring(1)}:{type:df[n]}:pf},S5=(t,e)=>{if(w5){let n=TL(t);return RL(n,e)}else return{base64:!0,data:t}},RL=(t,e)=>e==="blob"?t instanceof Blob?t:new Blob([t]):t instanceof ArrayBuffer?t:t.buffer});function $L(){return new TransformStream({transform(t,e){EL(t,n=>{let r=n.length,o;if(r<126)o=new Uint8Array(1),new DataView(o.buffer).setUint8(0,r);else if(r<65536){o=new Uint8Array(3);let s=new DataView(o.buffer);s.setUint8(0,126),s.setUint16(1,r)}else{o=new Uint8Array(9);let s=new DataView(o.buffer);s.setUint8(0,127),s.setBigUint64(1,BigInt(r))}t.data&&typeof t.data!="string"&&(o[0]|=128),e.enqueue(o),e.enqueue(n)})}})}function ih(t){return t.reduce((e,n)=>e+n.length,0)}function ah(t,e){if(t[0].length===e)return t.shift();let n=new Uint8Array(e),r=0;for(let o=0;o<e;o++)n[o]=t[0][r++],r===t[0].length&&(t.shift(),r=0);return t.length&&r<t[0].length&&(t[0]=t[0].slice(r)),n}function ML(t,e){Qx||(Qx=new TextDecoder);let n=[],r=0,o=-1,s=!1;return new TransformStream({transform(i,a){for(n.push(i);;){if(r===0){if(ih(n)<1)break;let c=ah(n,1);s=(c[0]&128)===128,o=c[0]&127,o<126?r=3:o===126?r=1:r=2}else if(r===1){if(ih(n)<2)break;let c=ah(n,2);o=new DataView(c.buffer,c.byteOffset,c.length).getUint16(0),r=3}else if(r===2){if(ih(n)<8)break;let c=ah(n,8),l=new DataView(c.buffer,c.byteOffset,c.length),f=l.getUint32(0);if(f>Math.pow(2,21)-1){a.enqueue(pf);break}o=f*Math.pow(2,32)+l.getUint32(4),r=3}else{if(ih(n)<o)break;let c=ah(n,o);a.enqueue(mf(s?c:Qx.decode(c),e)),r=0}if(o===0||o>t){a.enqueue(pf);break}}}})}var LL,DL,IL,Qx,Jx,Ui=L(()=>{AL();PL();sh();LL="",DL=(t,e)=>{let n=t.length,r=new Array(n),o=0;t.forEach((s,i)=>{hf(s,!1,a=>{r[i]=a,++o===n&&e(r.join(LL))})})},IL=(t,e)=>{let n=t.split(LL),r=[];for(let o=0;o<n.length;o++){let s=mf(n[o],e);if(r.push(s),s.type==="error")break}return r};Jx=4});function gt(t){if(t)return x5(t)}function x5(t){for(var e in gt.prototype)t[e]=gt.prototype[e];return t}var Ko=L(()=>{gt.prototype.on=gt.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this};gt.prototype.once=function(t,e){function n(){this.off(t,n),e.apply(this,arguments)}return n.fn=e,this.on(t,n),this};gt.prototype.off=gt.prototype.removeListener=gt.prototype.removeAllListeners=gt.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+t];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+t],this;for(var r,o=0;o<n.length;o++)if(r=n[o],r===e||r.fn===e){n.splice(o,1);break}return n.length===0&&delete this._callbacks["$"+t],this};gt.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),n=this._callbacks["$"+t],r=1;r<arguments.length;r++)e[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,o=n.length;r<o;++r)n[r].apply(this,e)}return this};gt.prototype.emitReserved=gt.prototype.emit;gt.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]};gt.prototype.hasListeners=function(t){return!!this.listeners(t).length}});var Zn,oe,NL,Go=L(()=>{Zn=typeof Promise=="function"&&typeof Promise.resolve=="function"?e=>Promise.resolve().then(e):(e,n)=>n(e,0),oe=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),NL="arraybuffer"});function ch(t,...e){return e.reduce((n,r)=>(t.hasOwnProperty(r)&&(n[r]=t[r]),n),{})}function Qn(t,e){e.useNativeTimers?(t.setTimeoutFn=k5.bind(oe),t.clearTimeoutFn=v5.bind(oe)):(t.setTimeoutFn=oe.setTimeout.bind(oe),t.clearTimeoutFn=oe.clearTimeout.bind(oe))}function FL(t){return typeof t=="string"?A5(t):Math.ceil((t.byteLength||t.size)*E5)}function A5(t){let e=0,n=0;for(let r=0,o=t.length;r<o;r++)e=t.charCodeAt(r),e<128?n+=1:e<2048?n+=2:e<55296||e>=57344?n+=3:(r++,n+=4);return n}function lh(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}var k5,v5,E5,Yo=L(()=>{Go();k5=oe.setTimeout,v5=oe.clearTimeout;E5=1.33});function jL(t){let e="";for(let n in t)t.hasOwnProperty(n)&&(e.length&&(e+="&"),e+=encodeURIComponent(n)+"="+encodeURIComponent(t[n]));return e}function BL(t){let e={},n=t.split("&");for(let r=0,o=n.length;r<o;r++){let s=n[r].split("=");e[decodeURIComponent(s[0])]=decodeURIComponent(s[1])}return e}var t0=L(()=>{});var fh,Jn,yf=L(()=>{Ui();Ko();Yo();t0();fh=class extends Error{constructor(e,n,r){super(e),this.description=n,this.context=r,this.type="TransportError"}},Jn=class extends gt{constructor(e){super(),this.writable=!1,Qn(this,e),this.opts=e,this.query=e.query,this.socket=e.socket,this.supportsBinary=!e.forceBase64}onError(e,n,r){return super.emitReserved("error",new fh(e,n,r)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(e){this.readyState==="open"&&this.write(e)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(e){let n=mf(e,this.socket.binaryType);this.onPacket(n)}onPacket(e){super.emitReserved("packet",e)}onClose(e){this.readyState="closed",super.emitReserved("close",e)}pause(e){}createUri(e,n={}){return e+"://"+this._hostname()+this._port()+this.opts.path+this._query(n)}_hostname(){let e=this.opts.hostname;return e.indexOf(":")===-1?e:"["+e+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(this.opts.port)!==443||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(e){let n=jL(e);return n.length?"?"+n:""}}});var Vi,e0=L(()=>{yf();Yo();Ui();Vi=class extends Jn{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(e){this.readyState="pausing";let n=()=>{this.readyState="paused",e()};if(this._polling||!this.writable){let r=0;this._polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(e){let n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};IL(e,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){let e=()=>{this.write([{type:"close"}])};this.readyState==="open"?e():this.once("open",e)}write(e){this.writable=!1,DL(e,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){let e=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=lh()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(e,n)}}});var UL,VL,zL=L(()=>{UL=!1;try{UL=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}VL=UL});function C5(){}function HL(){for(let t in Fr.requests)Fr.requests.hasOwnProperty(t)&&Fr.requests[t].abort()}function WL(t){let e=t.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!e||VL))return new XMLHttpRequest}catch{}if(!e)try{return new oe[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}var n0,Fr,T5,tr,uh=L(()=>{e0();Ko();Yo();Go();zL();n0=class extends Vi{constructor(e){if(super(e),typeof location<"u"){let n=location.protocol==="https:",r=location.port;r||(r=n?"443":"80"),this.xd=typeof location<"u"&&e.hostname!==location.hostname||r!==e.port}}doWrite(e,n){let r=this.request({method:"POST",data:e});r.on("success",n),r.on("error",(o,s)=>{this.onError("xhr post error",o,s)})}doPoll(){let e=this.request();e.on("data",this.onData.bind(this)),e.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=e}},Fr=class t extends gt{constructor(e,n,r){super(),this.createRequest=e,Qn(this,r),this._opts=r,this._method=r.method||"GET",this._uri=n,this._data=r.data!==void 0?r.data:null,this._create()}_create(){var e;let n=ch(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this._opts.xd;let r=this._xhr=this.createRequest(n);try{r.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let o in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(o)&&r.setRequestHeader(o,this._opts.extraHeaders[o])}}catch{}if(this._method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{r.setRequestHeader("Accept","*/*")}catch{}(e=this._opts.cookieJar)===null||e===void 0||e.addCookies(r),"withCredentials"in r&&(r.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(r.timeout=this._opts.requestTimeout),r.onreadystatechange=()=>{var o;r.readyState===3&&((o=this._opts.cookieJar)===null||o===void 0||o.parseCookies(r.getResponseHeader("set-cookie"))),r.readyState===4&&(r.status===200||r.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof r.status=="number"?r.status:0)},0))},r.send(this._data)}catch(o){this.setTimeoutFn(()=>{this._onError(o)},0);return}typeof document<"u"&&(this._index=t.requestsCount++,t.requests[this._index]=this)}_onError(e){this.emitReserved("error",e,this._xhr),this._cleanup(!0)}_cleanup(e){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=C5,e)try{this._xhr.abort()}catch{}typeof document<"u"&&delete t.requests[this._index],this._xhr=null}}_onLoad(){let e=this._xhr.responseText;e!==null&&(this.emitReserved("data",e),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}};Fr.requestsCount=0;Fr.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",HL);else if(typeof addEventListener=="function"){let t="onpagehide"in oe?"pagehide":"unload";addEventListener(t,HL,!1)}}T5=(function(){let t=WL({xdomain:!1});return t&&t.responseType!==null})(),tr=class extends n0{constructor(e){super(e);let n=e&&e.forceBase64;this.supportsBinary=T5&&!n}request(e={}){return Object.assign(e,{xd:this.xd},this.opts),new Fr(WL,this.uri(),e)}}});var qL,o0,r0,er,dh=L(()=>{yf();Yo();Ui();Go();qL=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative",o0=class extends Jn{get name(){return"websocket"}doOpen(){let e=this.uri(),n=this.opts.protocols,r=qL?{}:ch(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(e,n,r)}catch(o){return this.emitReserved("error",o)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:"websocket connection closed",context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError("websocket error",e)}write(e){this.writable=!1;for(let n=0;n<e.length;n++){let r=e[n],o=n===e.length-1;hf(r,this.supportsBinary,s=>{try{this.doWrite(r,s)}catch{}o&&Zn(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){let e=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=lh()),this.supportsBinary||(n.b64=1),this.createUri(e,n)}},r0=oe.WebSocket||oe.MozWebSocket,er=class extends o0{createSocket(e,n,r){return qL?new r0(e,n,r):n?new r0(e,n):new r0(e)}doWrite(e,n){this.ws.send(n)}}});var Xo,s0=L(()=>{yf();Go();Ui();Xo=class extends Jn{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(e){return this.emitReserved("error",e)}this._transport.closed.then(()=>{this.onClose()}).catch(e=>{this.onError("webtransport error",e)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(e=>{let n=ML(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=e.readable.pipeThrough(n).getReader(),o=$L();o.readable.pipeTo(e.writable),this._writer=o.writable.getWriter();let s=()=>{r.read().then(({done:a,value:c})=>{a||(this.onPacket(c),s())}).catch(a=>{})};s();let i={type:"open"};this.query.sid&&(i.data=`{"sid":"${this.query.sid}"}`),this._writer.write(i).then(()=>this.onOpen())})})}write(e){this.writable=!1;for(let n=0;n<e.length;n++){let r=e[n],o=n===e.length-1;this._writer.write(r).then(()=>{o&&Zn(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var e;(e=this._transport)===null||e===void 0||e.close()}}});var i0,a0=L(()=>{uh();dh();s0();i0={websocket:er,webtransport:Xo,polling:tr}});function zi(t){if(t.length>8e3)throw"URI too long";let e=t,n=t.indexOf("["),r=t.indexOf("]");n!=-1&&r!=-1&&(t=t.substring(0,n)+t.substring(n,r).replace(/:/g,";")+t.substring(r,t.length));let o=O5.exec(t||""),s={},i=14;for(;i--;)s[R5[i]]=o[i]||"";return n!=-1&&r!=-1&&(s.source=e,s.host=s.host.substring(1,s.host.length-1).replace(/;/g,":"),s.authority=s.authority.replace("[","").replace("]","").replace(/;/g,":"),s.ipv6uri=!0),s.pathNames=P5(s,s.path),s.queryKey=L5(s,s.query),s}function P5(t,e){let n=/\/{2,9}/g,r=e.replace(n,"/").split("/");return(e.slice(0,1)=="/"||e.length===0)&&r.splice(0,1),e.slice(-1)=="/"&&r.splice(r.length-1,1),r}function L5(t,e){let n={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,o,s){o&&(n[o]=s)}),n}var O5,R5,c0=L(()=>{O5=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,R5=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"]});var l0,ph,Zo,hh,Hi,f0=L(()=>{a0();Yo();t0();c0();Ko();Ui();Go();l0=typeof addEventListener=="function"&&typeof removeEventListener=="function",ph=[];l0&&addEventListener("offline",()=>{ph.forEach(t=>t())},!1);Zo=class t extends gt{constructor(e,n){if(super(),this.binaryType=NL,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,e&&typeof e=="object"&&(n=e,e=null),e){let r=zi(e);n.hostname=r.host,n.secure=r.protocol==="https"||r.protocol==="wss",n.port=r.port,r.query&&(n.query=r.query)}else n.host&&(n.hostname=zi(n.host).host);Qn(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},n.transports.forEach(r=>{let o=r.prototype.name;this.transports.push(o),this._transportsByName[o]=r}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=BL(this.opts.query)),l0&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},ph.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(e){let n=Object.assign({},this.opts.query);n.EIO=Jx,n.transport=e,this.id&&(n.sid=this.id);let r=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[e]);return new this._transportsByName[e](r)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}let e=this.opts.rememberUpgrade&&t.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";let n=this.createTransport(e);n.open(),this.setTransport(n)}setTransport(e){this.transport&&this.transport.removeAllListeners(),this.transport=e,e.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",n=>this._onClose("transport close",n))}onOpen(){this.readyState="open",t.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(e){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",e),this.emitReserved("heartbeat"),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":let n=new Error("server error");n.code=e.data,this._onError(n);break;case"message":this.emitReserved("data",e.data),this.emitReserved("message",e.data);break}}onHandshake(e){this.emitReserved("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this._pingInterval=e.pingInterval,this._pingTimeout=e.pingTimeout,this._maxPayload=e.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);let e=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+e,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},e),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){let e=this._getWritablePackets();this.transport.send(e),this._prevBufferLen=e.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r<this.writeBuffer.length;r++){let o=this.writeBuffer[r].data;if(o&&(n+=FL(o)),r>0&&n>this._maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;let e=Date.now()>this._pingTimeoutTime;return e&&(this._pingTimeoutTime=0,Zn(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),e}write(e,n,r){return this._sendPacket("message",e,n,r),this}send(e,n,r){return this._sendPacket("message",e,n,r),this}_sendPacket(e,n,r,o){if(typeof n=="function"&&(o=n,n=void 0),typeof r=="function"&&(o=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;let s={type:e,data:n,options:r};this.emitReserved("packetCreate",s),this.writeBuffer.push(s),o&&this.once("flush",o),this.flush()}close(){let e=()=>{this._onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),e()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():e()}):this.upgrading?r():e()),this}_onError(e){if(t.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",e),this._onClose("transport error",e)}_onClose(e,n){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),l0&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){let r=ph.indexOf(this._offlineEventListener);r!==-1&&ph.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",e,n),this.writeBuffer=[],this._prevBufferLen=0}}};Zo.protocol=Jx;hh=class extends Zo{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let e=0;e<this._upgrades.length;e++)this._probe(this._upgrades[e])}_probe(e){let n=this.createTransport(e),r=!1;Zo.priorWebsocketSuccess=!1;let o=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",u=>{if(!r)if(u.type==="pong"&&u.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;Zo.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(f(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{let d=new Error("probe error");d.transport=n.name,this.emitReserved("upgradeError",d)}}))};function s(){r||(r=!0,f(),n.close(),n=null)}let i=u=>{let d=new Error("probe error: "+u);d.transport=n.name,s(),this.emitReserved("upgradeError",d)};function a(){i("transport closed")}function c(){i("socket closed")}function l(u){n&&u.name!==n.name&&s()}let f=()=>{n.removeListener("open",o),n.removeListener("error",i),n.removeListener("close",a),this.off("close",c),this.off("upgrading",l)};n.once("open",o),n.once("error",i),n.once("close",a),this.once("close",c),this.once("upgrading",l),this._upgrades.indexOf("webtransport")!==-1&&e!=="webtransport"?this.setTimeoutFn(()=>{r||n.open()},200):n.open()}onHandshake(e){this._upgrades=this._filterUpgrades(e.upgrades),super.onHandshake(e)}_filterUpgrades(e){let n=[];for(let r=0;r<e.length;r++)~this.transports.indexOf(e[r])&&n.push(e[r]);return n}},Hi=class extends hh{constructor(e,n={}){let r=typeof e=="object"?e:n;(!r.transports||r.transports&&typeof r.transports[0]=="string")&&(r.transports=(r.transports||["polling","websocket","webtransport"]).map(o=>i0[o]).filter(o=>!!o)),super(e,r)}}});var bf,KL=L(()=>{e0();bf=class extends Vi{doPoll(){this._fetch().then(e=>{if(!e.ok)return this.onError("fetch read error",e.status,e);e.text().then(n=>this.onData(n))}).catch(e=>{this.onError("fetch read error",e)})}doWrite(e,n){this._fetch(e).then(r=>{if(!r.ok)return this.onError("fetch write error",r.status,r);n()}).catch(r=>{this.onError("fetch write error",r)})}_fetch(e){var n;let r=e!==void 0,o=new Headers(this.opts.extraHeaders);return r&&o.set("content-type","text/plain;charset=UTF-8"),(n=this.socket._cookieJar)===null||n===void 0||n.appendCookies(o),fetch(this.uri(),{method:r?"POST":"GET",body:r?e:null,headers:o,credentials:this.opts.withCredentials?"include":"omit"}).then(s=>{var i;return(i=this.socket._cookieJar)===null||i===void 0||i.parseCookies(s.headers.getSetCookie()),s})}}});var WZ,gh=L(()=>{f0();f0();yf();a0();Yo();c0();Go();KL();uh();uh();dh();dh();s0();WZ=Hi.protocol});function GL(t,e="",n){let r=t;n=n||typeof location<"u"&&location,t==null&&(t=n.protocol+"//"+n.host),typeof t=="string"&&(t.charAt(0)==="/"&&(t.charAt(1)==="/"?t=n.protocol+t:t=n.host+t),/^(https?|wss?):\/\//.test(t)||(typeof n<"u"?t=n.protocol+"//"+t:t="https://"+t),r=zi(t)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";let s=r.host.indexOf(":")!==-1?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+s+":"+r.port+e,r.href=r.protocol+"://"+s+(n&&n.port===r.port?"":":"+r.port),r}var YL=L(()=>{gh()});function wf(t){return D5&&(t instanceof ArrayBuffer||I5(t))||$5&&t instanceof Blob||M5&&t instanceof File}function _f(t,e){if(!t||typeof t!="object")return!1;if(Array.isArray(t)){for(let n=0,r=t.length;n<r;n++)if(_f(t[n]))return!0;return!1}if(wf(t))return!0;if(t.toJSON&&typeof t.toJSON=="function"&&arguments.length===1)return _f(t.toJSON(),!0);for(let n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&_f(t[n]))return!0;return!1}var D5,I5,XL,$5,M5,u0=L(()=>{D5=typeof ArrayBuffer=="function",I5=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer,XL=Object.prototype.toString,$5=typeof Blob=="function"||typeof Blob<"u"&&XL.call(Blob)==="[object BlobConstructor]",M5=typeof File=="function"||typeof File<"u"&&XL.call(File)==="[object FileConstructor]"});function ZL(t){let e=[],n=t.data,r=t;return r.data=d0(n,e),r.attachments=e.length,{packet:r,buffers:e}}function d0(t,e){if(!t)return t;if(wf(t)){let n={_placeholder:!0,num:e.length};return e.push(t),n}else if(Array.isArray(t)){let n=new Array(t.length);for(let r=0;r<t.length;r++)n[r]=d0(t[r],e);return n}else if(typeof t=="object"&&!(t instanceof Date)){let n={};for(let r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=d0(t[r],e));return n}return t}function QL(t,e){return t.data=p0(t.data,e),delete t.attachments,t}function p0(t,e){if(!t)return t;if(t&&t._placeholder===!0){if(typeof t.num=="number"&&t.num>=0&&t.num<e.length)return e[t.num];throw new Error("illegal attachments")}else if(Array.isArray(t))for(let n=0;n<t.length;n++)t[n]=p0(t[n],e);else if(typeof t=="object")for(let n in t)Object.prototype.hasOwnProperty.call(t,n)&&(t[n]=p0(t[n],e));return t}var JL=L(()=>{u0()});var eD=Qh((fQ,tD)=>{var Wi=1e3,qi=Wi*60,Ki=qi*60,Qo=Ki*24,N5=Qo*7,F5=Qo*365.25;tD.exports=function(t,e){e=e||{};var n=typeof t;if(n==="string"&&t.length>0)return j5(t);if(n==="number"&&isFinite(t))return e.long?U5(t):B5(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function j5(t){if(t=String(t),!(t.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(e){var n=parseFloat(e[1]),r=(e[2]||"ms").toLowerCase();switch(r){case"years":case"year":case"yrs":case"yr":case"y":return n*F5;case"weeks":case"week":case"w":return n*N5;case"days":case"day":case"d":return n*Qo;case"hours":case"hour":case"hrs":case"hr":case"h":return n*Ki;case"minutes":case"minute":case"mins":case"min":case"m":return n*qi;case"seconds":case"second":case"secs":case"sec":case"s":return n*Wi;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}function B5(t){var e=Math.abs(t);return e>=Qo?Math.round(t/Qo)+"d":e>=Ki?Math.round(t/Ki)+"h":e>=qi?Math.round(t/qi)+"m":e>=Wi?Math.round(t/Wi)+"s":t+"ms"}function U5(t){var e=Math.abs(t);return e>=Qo?mh(t,e,Qo,"day"):e>=Ki?mh(t,e,Ki,"hour"):e>=qi?mh(t,e,qi,"minute"):e>=Wi?mh(t,e,Wi,"second"):t+" ms"}function mh(t,e,n,r){var o=e>=n*1.5;return Math.round(t/n)+" "+r+(o?"s":"")}});var rD=Qh((uQ,nD)=>{function V5(t){n.debug=n,n.default=n,n.coerce=c,n.disable=i,n.enable=o,n.enabled=a,n.humanize=eD(),n.destroy=l,Object.keys(t).forEach(f=>{n[f]=t[f]}),n.names=[],n.skips=[],n.formatters={};function e(f){let u=0;for(let d=0;d<f.length;d++)u=(u<<5)-u+f.charCodeAt(d),u|=0;return n.colors[Math.abs(u)%n.colors.length]}n.selectColor=e;function n(f){let u,d=null,p,g;function h(...m){if(!h.enabled)return;let y=h,w=Number(new Date),b=w-(u||w);y.diff=b,y.prev=u,y.curr=w,u=w,m[0]=n.coerce(m[0]),typeof m[0]!="string"&&m.unshift("%O");let x=0;m[0]=m[0].replace(/%([a-zA-Z%])/g,(S,_)=>{if(S==="%%")return"%";x++;let E=n.formatters[_];if(typeof E=="function"){let C=m[x];S=E.call(y,C),m.splice(x,1),x--}return S}),n.formatArgs.call(y,m),(y.log||n.log).apply(y,m)}return h.namespace=f,h.useColors=n.useColors(),h.color=n.selectColor(f),h.extend=r,h.destroy=n.destroy,Object.defineProperty(h,"enabled",{enumerable:!0,configurable:!1,get:()=>d!==null?d:(p!==n.namespaces&&(p=n.namespaces,g=n.enabled(f)),g),set:m=>{d=m}}),typeof n.init=="function"&&n.init(h),h}function r(f,u){let d=n(this.namespace+(typeof u>"u"?":":u)+f);return d.log=this.log,d}function o(f){n.save(f),n.namespaces=f,n.names=[],n.skips=[];let u=(typeof f=="string"?f:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let d of u)d[0]==="-"?n.skips.push(d.slice(1)):n.names.push(d)}function s(f,u){let d=0,p=0,g=-1,h=0;for(;d<f.length;)if(p<u.length&&(u[p]===f[d]||u[p]==="*"))u[p]==="*"?(g=p,h=d,p++):(d++,p++);else if(g!==-1)p=g+1,h++,d=h;else return!1;for(;p<u.length&&u[p]==="*";)p++;return p===u.length}function i(){let f=[...n.names,...n.skips.map(u=>"-"+u)].join(",");return n.enable(""),f}function a(f){for(let u of n.skips)if(s(f,u))return!1;for(let u of n.names)if(s(f,u))return!0;return!1}function c(f){return f instanceof Error?f.stack||f.message:f}function l(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return n.enable(n.load()),n}nD.exports=V5});var oD=Qh((Se,yh)=>{Se.formatArgs=H5;Se.save=W5;Se.load=q5;Se.useColors=z5;Se.storage=K5();Se.destroy=(()=>{let t=!1;return()=>{t||(t=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();Se.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function z5(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let t;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(t=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(t[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function H5(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+yh.exports.humanize(this.diff),!this.useColors)return;let e="color: "+this.color;t.splice(1,0,e,"color: inherit");let n=0,r=0;t[0].replace(/%[a-zA-Z%]/g,o=>{o!=="%%"&&(n++,o==="%c"&&(r=n))}),t.splice(r,0,e)}Se.log=console.debug||console.log||(()=>{});function W5(t){try{t?Se.storage.setItem("debug",t):Se.storage.removeItem("debug")}catch{}}function q5(){let t;try{t=Se.storage.getItem("debug")||Se.storage.getItem("DEBUG")}catch{}return!t&&typeof process<"u"&&"env"in process&&(t=process.env.DEBUG),t}function K5(){try{return localStorage}catch{}}yh.exports=rD()(Se);var{formatters:G5}=yh.exports;G5.j=function(t){try{return JSON.stringify(t)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var _0={};F(_0,{Decoder:()=>m0,Encoder:()=>g0,PacketType:()=>G,isPacketValid:()=>Q5,protocol:()=>b0});function Y5(t){return typeof t=="string"}function X5(t){return t===void 0||aD(t)}function bh(t){return Object.prototype.toString.call(t)==="[object Object]"}function Z5(t,e){switch(t){case G.CONNECT:return e===void 0||bh(e);case G.DISCONNECT:return e===void 0;case G.EVENT:return Array.isArray(e)&&(typeof e[0]=="number"||typeof e[0]=="string"&&iD.indexOf(e[0])===-1);case G.ACK:return Array.isArray(e);case G.CONNECT_ERROR:return typeof e=="string"||bh(e);default:return!1}}function Q5(t){return Y5(t.nsp)&&X5(t.id)&&Z5(t.type,t.data)}var sD,h0,iD,b0,G,g0,m0,y0,aD,_h=L(()=>{Ko();JL();u0();sD=dI(oD(),1),h0=(0,sD.default)("socket.io-parser"),iD=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],b0=5;(function(t){t[t.CONNECT=0]="CONNECT",t[t.DISCONNECT=1]="DISCONNECT",t[t.EVENT=2]="EVENT",t[t.ACK=3]="ACK",t[t.CONNECT_ERROR=4]="CONNECT_ERROR",t[t.BINARY_EVENT=5]="BINARY_EVENT",t[t.BINARY_ACK=6]="BINARY_ACK"})(G||(G={}));g0=class{constructor(e){this.replacer=e}encode(e){return h0("encoding packet %j",e),(e.type===G.EVENT||e.type===G.ACK)&&_f(e)?this.encodeAsBinary({type:e.type===G.EVENT?G.BINARY_EVENT:G.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id}):[this.encodeAsString(e)]}encodeAsString(e){let n=""+e.type;return(e.type===G.BINARY_EVENT||e.type===G.BINARY_ACK)&&(n+=e.attachments+"-"),e.nsp&&e.nsp!=="/"&&(n+=e.nsp+","),e.id!=null&&(n+=e.id),e.data!=null&&(n+=JSON.stringify(e.data,this.replacer)),h0("encoded %j as %s",e,n),n}encodeAsBinary(e){let n=ZL(e),r=this.encodeAsString(n.packet),o=n.buffers;return o.unshift(r),o}},m0=class t extends gt{constructor(e){super(),this.opts=Object.assign({reviver:void 0,maxAttachments:10},typeof e=="function"?{reviver:e}:e)}add(e){let n;if(typeof e=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(e);let r=n.type===G.BINARY_EVENT;r||n.type===G.BINARY_ACK?(n.type=r?G.EVENT:G.ACK,this.reconstructor=new y0(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(wf(e)||e.base64)if(this.reconstructor)n=this.reconstructor.takeBinaryData(e),n&&(this.reconstructor=null,super.emitReserved("decoded",n));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+e)}decodeString(e){let n=0,r={type:Number(e.charAt(0))};if(G[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===G.BINARY_EVENT||r.type===G.BINARY_ACK){let s=n+1;for(;e.charAt(++n)!=="-"&&n!=e.length;);let i=e.substring(s,n);if(i!=Number(i)||e.charAt(n)!=="-")throw new Error("Illegal attachments");let a=Number(i);if(!aD(a)||a<0)throw new Error("Illegal attachments");if(a>this.opts.maxAttachments)throw new Error("too many attachments");r.attachments=a}if(e.charAt(n+1)==="/"){let s=n+1;for(;++n&&!(e.charAt(n)===","||n===e.length););r.nsp=e.substring(s,n)}else r.nsp="/";let o=e.charAt(n+1);if(o!==""&&Number(o)==o){let s=n+1;for(;++n;){let i=e.charAt(n);if(i==null||Number(i)!=i){--n;break}if(n===e.length)break}r.id=Number(e.substring(s,n+1))}if(e.charAt(++n)){let s=this.tryParse(e.substr(n));if(t.isPayloadValid(r.type,s))r.data=s;else throw new Error("invalid payload")}return h0("decoded %s as %j",e,r),r}tryParse(e){try{return JSON.parse(e,this.opts.reviver)}catch{return!1}}static isPayloadValid(e,n){switch(e){case G.CONNECT:return bh(n);case G.DISCONNECT:return n===void 0;case G.CONNECT_ERROR:return typeof n=="string"||bh(n);case G.EVENT:case G.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&iD.indexOf(n[0])===-1);case G.ACK:case G.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}},y0=class{constructor(e){this.packet=e,this.buffers=[],this.reconPack=e}takeBinaryData(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){let n=QL(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}};aD=Number.isInteger||function(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t}});function Le(t,e,n){return t.on(e,n),function(){t.off(e,n)}}var w0=L(()=>{});var J5,Jo,S0=L(()=>{_h();w0();Ko();J5=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1}),Jo=class extends gt{constructor(e,n,r){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=e,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this._opts=Object.assign({},r),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;let e=this.io;this.subs=[Le(e,"open",this.onopen.bind(this)),Le(e,"packet",this.onpacket.bind(this)),Le(e,"error",this.onerror.bind(this)),Le(e,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...e){return e.unshift("message"),this.emit.apply(this,e),this}emit(e,...n){var r,o,s;if(J5.hasOwnProperty(e))throw new Error('"'+e.toString()+'" is a reserved event name');if(n.unshift(e),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;let i={type:G.EVENT,data:n};if(i.options={},i.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){let f=this.ids++,u=n.pop();this._registerAckCallback(f,u),i.id=f}let a=(o=(r=this.io.engine)===null||r===void 0?void 0:r.transport)===null||o===void 0?void 0:o.writable,c=this.connected&&!(!((s=this.io.engine)===null||s===void 0)&&s._hasPingExpired());return this.flags.volatile&&!a||(c?(this.notifyOutgoingListeners(i),this.packet(i)):this.sendBuffer.push(i)),this.flags={},this}_registerAckCallback(e,n){var r;let o=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(o===void 0){this.acks[e]=n;return}let s=this.io.setTimeoutFn(()=>{delete this.acks[e];for(let a=0;a<this.sendBuffer.length;a++)this.sendBuffer[a].id===e&&this.sendBuffer.splice(a,1);n.call(this,new Error("operation has timed out"))},o),i=(...a)=>{this.io.clearTimeoutFn(s),n.apply(this,a)};i.withError=!0,this.acks[e]=i}emitWithAck(e,...n){return new Promise((r,o)=>{let s=(i,a)=>i?o(i):r(a);s.withError=!0,n.push(s),this.emit(e,...n)})}_addToQueue(e){let n;typeof e[e.length-1]=="function"&&(n=e.pop());let r={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push((o,...s)=>(this._queue[0],o!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(o)):(this._queue.shift(),n&&n(null,...s)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(e=!1){if(!this.connected||this._queue.length===0)return;let n=this._queue[0];n.pending&&!e||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){typeof this.auth=="function"?this.auth(e=>{this._sendConnectPacket(e)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type:G.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},e):e})}onerror(e){this.connected||this.emitReserved("connect_error",e)}onclose(e,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",e,n),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(e=>{if(!this.sendBuffer.some(r=>String(r.id)===e)){let r=this.acks[e];delete this.acks[e],r.withError&&r.call(this,new Error("socket has been disconnected"))}})}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case G.CONNECT:e.data&&e.data.sid?this.onconnect(e.data.sid,e.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case G.EVENT:case G.BINARY_EVENT:this.onevent(e);break;case G.ACK:case G.BINARY_ACK:this.onack(e);break;case G.DISCONNECT:this.ondisconnect();break;case G.CONNECT_ERROR:this.destroy();let r=new Error(e.data.message);r.data=e.data.data,this.emitReserved("connect_error",r);break}}onevent(e){let n=e.data||[];e.id!=null&&n.push(this.ack(e.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){let n=this._anyListeners.slice();for(let r of n)r.apply(this,e)}super.emit.apply(this,e),this._pid&&e.length&&typeof e[e.length-1]=="string"&&(this._lastOffset=e[e.length-1])}ack(e){let n=this,r=!1;return function(...o){r||(r=!0,n.packet({type:G.ACK,id:e,data:o}))}}onack(e){let n=this.acks[e.id];typeof n=="function"&&(delete this.acks[e.id],n.withError&&e.data.unshift(null),n.apply(this,e.data))}onconnect(e,n){this.id=e,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(e=>this.emitEvent(e)),this.receiveBuffer=[],this.sendBuffer.forEach(e=>{this.notifyOutgoingListeners(e),this.packet(e)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(e=>e()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:G.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){let n=this._anyListeners;for(let r=0;r<n.length;r++)if(e===n[r])return n.splice(r,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(e),this}prependAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(e),this}offAnyOutgoing(e){if(!this._anyOutgoingListeners)return this;if(e){let n=this._anyOutgoingListeners;for(let r=0;r<n.length;r++)if(e===n[r])return n.splice(r,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(e){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){let n=this._anyOutgoingListeners.slice();for(let r of n)r.apply(this,e.data)}}}});function ts(t){t=t||{},this.ms=t.min||100,this.max=t.max||1e4,this.factor=t.factor||2,this.jitter=t.jitter>0&&t.jitter<=1?t.jitter:0,this.attempts=0}var cD=L(()=>{ts.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),n=Math.floor(e*this.jitter*t);t=(Math.floor(e*10)&1)==0?t-n:t+n}return Math.min(t,this.max)|0};ts.prototype.reset=function(){this.attempts=0};ts.prototype.setMin=function(t){this.ms=t};ts.prototype.setMax=function(t){this.max=t};ts.prototype.setJitter=function(t){this.jitter=t}});var es,lD=L(()=>{gh();S0();_h();w0();cD();Ko();es=class extends gt{constructor(e,n){var r;super(),this.nsps={},this.subs=[],e&&typeof e=="object"&&(n=e,e=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,Qn(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new ts({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=e;let o=n.parser||_0;this.encoder=new o.Encoder,this.decoder=new o.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,e||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(e){return e===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var n;return e===void 0?this._reconnectionDelay:(this._reconnectionDelay=e,(n=this.backoff)===null||n===void 0||n.setMin(e),this)}randomizationFactor(e){var n;return e===void 0?this._randomizationFactor:(this._randomizationFactor=e,(n=this.backoff)===null||n===void 0||n.setJitter(e),this)}reconnectionDelayMax(e){var n;return e===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,(n=this.backoff)===null||n===void 0||n.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(e){if(~this._readyState.indexOf("open"))return this;this.engine=new Hi(this.uri,this.opts);let n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;let o=Le(n,"open",function(){r.onopen(),e&&e()}),s=a=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",a),e?e(a):this.maybeReconnectOnOpen()},i=Le(n,"error",s);if(this._timeout!==!1){let a=this._timeout,c=this.setTimeoutFn(()=>{o(),s(new Error("timeout")),n.close()},a);this.opts.autoUnref&&c.unref(),this.subs.push(()=>{this.clearTimeoutFn(c)})}return this.subs.push(o),this.subs.push(i),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");let e=this.engine;this.subs.push(Le(e,"ping",this.onping.bind(this)),Le(e,"data",this.ondata.bind(this)),Le(e,"error",this.onerror.bind(this)),Le(e,"close",this.onclose.bind(this)),Le(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(e){try{this.decoder.add(e)}catch(n){this.onclose("parse error",n)}}ondecoded(e){Zn(()=>{this.emitReserved("packet",e)},this.setTimeoutFn)}onerror(e){this.emitReserved("error",e)}socket(e,n){let r=this.nsps[e];return r?this._autoConnect&&!r.active&&r.connect():(r=new Jo(this,e,n),this.nsps[e]=r),r}_destroy(e){let n=Object.keys(this.nsps);for(let r of n)if(this.nsps[r].active)return;this._close()}_packet(e){let n=this.encoder.encode(e);for(let r=0;r<n.length;r++)this.engine.write(n[r],e.options)}cleanup(){this.subs.forEach(e=>e()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(e,n){var r;this.cleanup(),(r=this.engine)===null||r===void 0||r.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",e,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;let e=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{let n=this.backoff.duration();this._reconnecting=!0;let r=this.setTimeoutFn(()=>{e.skipReconnect||(this.emitReserved("reconnect_attempt",e.backoff.attempts),!e.skipReconnect&&e.open(o=>{o?(e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",o)):e.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){let e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}}});var fD={};F(fD,{Fetch:()=>bf,Manager:()=>es,NodeWebSocket:()=>er,NodeXHR:()=>tr,Socket:()=>Jo,WebSocket:()=>er,WebTransport:()=>Xo,XHR:()=>tr,connect:()=>wh,default:()=>wh,io:()=>wh,protocol:()=>b0});function wh(t,e){typeof t=="object"&&(e=t,t=void 0),e=e||{};let n=GL(t,e.path||"/socket.io"),r=n.source,o=n.id,s=n.path,i=Sf[o]&&s in Sf[o].nsps,a=e.forceNew||e["force new connection"]||e.multiplex===!1||i,c;return a?c=new es(r,e):(Sf[o]||(Sf[o]=new es(r,e)),c=Sf[o]),n.query&&!e.query&&(e.query=n.queryKey),c.socket(n.path,e)}var Sf,uD=L(()=>{YL();lD();S0();_h();gh();Sf={};Object.assign(wh,{Manager:es,Socket:Jo,io:wh,connect:wh})});var K0={};F(K0,{ANIMATION_PROPS:()=>B_,ARIA_ROLES:()=>ON,ATTR_TRANSFORMS:()=>Co,BLOCK_PROPS:()=>U_,CDN_PROVIDERS:()=>Ne,COMPOUND_CSS_KEYWORDS:()=>ho,CONFIG:()=>yo,CONFIG_MERGE_EXL:()=>Ee,CSS_LONGHAND_SHORTHANDS:()=>ze,CSS_NAMED_COLOR_HEX:()=>ed,CSS_NATIVE_COLOR_REGEX:()=>ke,CSS_PROPS_REGISTRY:()=>wt,CSS_SHORTHAND_LONGHANDS:()=>yt,CSS_UNITS:()=>cs,DEFAULT_CONFIG:()=>Ml,DEFAULT_CSS_PROPERTIES_LIST:()=>Rt,DELEGATED_EVENTS:()=>ai,DESIGN_SYSTEM_OPTIONS:()=>yx,DOMQL_EVENTS:()=>Hg,DOMQ_PROPERTIES:()=>sr,DOM_EVENTS:()=>HA,ELEMENT_METHOD_OVERRIDE_POINTS:()=>ds,ENV:()=>fm,FACTORY:()=>ve,FLEX_PROPS:()=>q_,FONT_PROPS:()=>V_,GRID_PROPS:()=>K_,HOST_REGISTERED_PACKAGES:()=>HP,HTML_ATTRIBUTES:()=>ui,HTML_TAGS:()=>bs,LIBRARY_PACKAGES:()=>Ju,LIBRARY_SCOPES_KEY:()=>co,LIFECYCLE_EVENTS:()=>Tr,METHODS:()=>ar,METHODS_EXL:()=>_a,MISC_PROPS:()=>z_,MIXINS:()=>Gd,NODE_ENV:()=>Ye,OPTIONS:()=>qa,PACKAGE_MANAGER_TO_CDN:()=>hr,PARSED_DOMQ_PROPERTIES:()=>ba,POSITION_PROPS:()=>H_,PROPS_METHODS:()=>ir,REGISTRY:()=>Nt,RESERVED_STORE_METHODS:()=>ik,REVIVED_MARK:()=>Ea,ROUTER_OPTIONS:()=>Fp,SIGNAL_ENGINE_KEY:()=>is,SIGNAL_INSTANCES_KEY:()=>os,STANDARD_SCHEME_QUERIES:()=>Ed,STATE_PROPERTIES:()=>Vg,STORE_METHOD_NAMES:()=>sk,SVG_TAGS:()=>ii,THEME_PROPS:()=>W_,TIMING_PROPS:()=>bl,TYPES:()=>ua,UNIVERSAL_RESERVED_KEYS:()=>qu,VALUE_TRANSFORMERS:()=>$d,VERSION:()=>ck,__resetBuiltinMethodWarnings:()=>nb,__resetSignalEngine:()=>mg,__resetSignalInstances:()=>hg,__resetSkinWarnings:()=>l_,__resetStateShadowWarnings:()=>ak,activateConfig:()=>wE,addCaching:()=>_u,addContext:()=>bu,addDelegatedEvent:()=>gl,addExtend:()=>Dm,addExtends:()=>pn,addItemAfterEveryElement:()=>Og,addMethods:()=>gi,addProtoToArray:()=>ha,addRef:()=>gu,aliasCaseVariants:()=>zs,animation:()=>Nb,appendSVGSprite:()=>sl,appendSvgIconsSprite:()=>ko,applyAttrTransforms:()=>M_,applyCSS:()=>JS,applyDependentState:()=>Qm,applyDocument:()=>ol,applyEvent:()=>Eu,applyEventUpdate:()=>Au,applyExtends:()=>fi,applyHeadings:()=>Td,applyInitialState:()=>cp,applyMediaSequenceVars:()=>br,applyProps:()=>ja,applyReset:()=>il,applySequenceGlobalVars:()=>Hc,applySequenceVars:()=>$n,applySkins:()=>al,applySpacingSequence:()=>Gc,applyStateMethods:()=>be,applyTimingSequence:()=>rl,applyTrueProps:()=>X_,applyTypographySequence:()=>tl,arrayContainsOtherArray:()=>xg,arraysEqual:()=>Pg,arrayzeValue:()=>uo,assertEmitIntegrity:()=>A_,batch:()=>Nf,bindLibraryGlobalScopes:()=>xc,breakpoints:()=>$b,buildImgSrcset:()=>Cc,buildSkinVarStyles:()=>vo,buildSourcesAndImg:()=>Tc,buildThemeVarStyles:()=>Ip,cache:()=>ry,cacheNode:()=>Cr,call:()=>Py,callStateMethod:()=>Sl,camelToAttr:()=>Un,camelToLowerAttr:()=>GA,captureSnapshot:()=>Dy,changeGlobalTheme:()=>Md,changeLightness:()=>bb,checkAttributeByTagName:()=>He,checkEventFunctions:()=>$_,checkForStateTypes:()=>Gm,checkIfBoxSize:()=>Kc,checkIfInherits:()=>vu,checkIfStringIsInArray:()=>Ig,class:()=>Vb,clone:()=>Yg,cloneAndMergeArrayExtend:()=>Pa,cloneFunction:()=>ym,collectExtendsList:()=>_s,color:()=>Tb,colorStringToRgbaArray:()=>Fe,components:()=>Oi,compositeOverBackdrop:()=>go,concatAddExtends:()=>Rm,contrastRatio:()=>Ns,convertSvgToSymbol:()=>qc,copyJavaScriptToClipboard:()=>cb,copyStringToClipboard:()=>ab,create:()=>z0,createAsync:()=>V6,createBasedOnType:()=>hu,createComputed:()=>rk,createConfig:()=>Nc,createDefine:()=>oP,createDomqlElement:()=>kf,createEffect:()=>K,createElement:()=>Km,createElementExtends:()=>nu,createExtends:()=>Da,createExtendsFromKeys:()=>ws,createExtendsStack:()=>iu,createHTMLNode:()=>si,createIfConditionFlag:()=>bm,createInheritedState:()=>Ym,createKey:()=>Oa,createNestedObject:()=>rm,createNestedObjectByKeyPath:()=>Zm,createObjectWithoutPrototype:()=>Gf,createParent:()=>mu,createPath:()=>yu,createProps:()=>Ba,createPropsStack:()=>du,createRoot:()=>qm,createScope:()=>ty,createScopeStore:()=>jf,createSignal:()=>zr,createSkeleton:()=>H6,createSnapshotId:()=>Ta,createState:()=>aw,createStore:()=>xn,createSync:()=>z6,css:()=>Oe,cssMediaVars:()=>_d,cssShorthandDepth:()=>Qs,cssShorthandStatesLonghand:()=>ul,cssVars:()=>bd,customDecodeURIComponent:()=>Ug,customEncodeURIComponent:()=>Bg,cutArrayAfterValue:()=>Cg,cutArrayBeforeValue:()=>Ag,debounce:()=>Ra,debounceOnContext:()=>gm,decodeNewlines:()=>jg,deepClone:()=>ut,deepContains:()=>em,deepDefaults:()=>Rs,deepDestringifyFunctions:()=>ce,deepExtend:()=>eu,deepMerge:()=>ft,deepMergeExtends:()=>hn,deepStringifyFunctions:()=>xa,defaultDefine:()=>Ii,defineResolvedThemeSignal:()=>Vs,defineSetter:()=>Oy,defineThemeSignal:()=>Us,destringifyGlobalScope:()=>Jr,destroy:()=>Kl,detectHeightOnInit:()=>Fy,detectInfiniteLoop:()=>am,detectTag:()=>Bn,devices:()=>Mb,dispose:()=>zn,encodeNewlines:()=>Fg,error:()=>ro,excludeKeysFromObject:()=>lm,exec:()=>pt,executeAttr:()=>NN,exetuteClassPerComponent:()=>kF,exposeBagGlobalScopes:()=>kc,extendCachedRegistry:()=>Pm,extendStackRegistry:()=>Ia,extractArrayExtend:()=>Ma,extractConditionalAttrs:()=>N_,fetchLibraryData:()=>td,fibonacciNumberByIndex:()=>jy,fileEntryUrl:()=>Yu,filterArrays:()=>Lg,filterArraysFast:()=>Dg,filterAttributesByTagName:()=>MN,finalizeExtends:()=>au,findClosestNumber:()=>Xu,findClosestNumberInFactory:()=>Zy,findHeadingLetter:()=>kd,findHeadings:()=>zc,findInheritedState:()=>ku,findKeyPosition:()=>Mg,flattenExtend:()=>Ss,font:()=>xb,fontFace:()=>Eb,fontFamily:()=>kb,fontFamilyTypes:()=>vb,formatDate:()=>Ny,generateHash:()=>Qf,generateHeadArrayTags:()=>Gu,generateKey:()=>Ca,generateMetaTags:()=>Yy,generateSequence:()=>ue,generateSequencePosition:()=>Yb,generateSprite:()=>Wc,generateSubSequence:()=>Uc,get:()=>Ey,getActiveConfig:()=>O,getActiveDocument:()=>Ao,getActiveLang:()=>$r,getCDNDirUrl:()=>Ku,getCDNUrl:()=>Qe,getCacheSize:()=>T_,getCapitalCaseKeys:()=>Mm,getCdnProviderFromConfig:()=>Ts,getChildStateInKey:()=>xu,getChildren:()=>Ty,getColor:()=>at,getColorShade:()=>id,getContext:()=>uc,getCookie:()=>km,getDB:()=>mc,getDefaultOrFirstKey:()=>Ln,getEmitStats:()=>zd,getEmotionStylesheet:()=>db,getExtendsInElement:()=>Im,getExtendsStack:()=>La,getExtendsStackRegistry:()=>tu,getFnPrefixAndValue:()=>In,getFontFace:()=>wb,getFontFaceEach:()=>mo,getFontFaceEachString:()=>hd,getFontFaceString:()=>Dc,getFontFamily:()=>Jc,getFontFormat:()=>dd,getFontSizeByKey:()=>el,getFrequencyInArray:()=>kg,getFunctionSource:()=>te,getHashedExtend:()=>$a,getImportMapScript:()=>My,getInObjectByPath:()=>im,getLanguages:()=>Xl,getLocalStateLang:()=>ef,getLocalStorage:()=>Em,getMediaColor:()=>zt,getMediaTheme:()=>Ve,getNev:()=>hm,getObserver:()=>Qt,getPageMetadata:()=>Xy,getParentStateInKey:()=>Su,getPath:()=>sc,getPendingLang:()=>Yl,getQuery:()=>yc,getRef:()=>Cy,getResolvedThemeSignal:()=>_E,getRgbTone:()=>yn,getRoot:()=>cc,getRootContext:()=>fc,getRootData:()=>lc,getRootState:()=>ac,getRootStateInKey:()=>wu,getSafeInk:()=>Ad,getSafeInkInfo:()=>Jb,getSequenceValue:()=>bo,getSequenceValueBySymbols:()=>Vc,getSequenceValuePropertyPair:()=>_n,getShadow:()=>Xc,getShapeByKey:()=>nl,getSignals:()=>ok,getSizeValue:()=>xd,getSpacingBasedOnRatio:()=>Ue,getSpacingByKey:()=>Ot,getSpreadChildren:()=>Nm,getSubratio:()=>Bc,getSubratioDifference:()=>jc,getSystemGlobalTheme:()=>Re,getTheme:()=>r_,getThemeSignal:()=>bE,getTimingByKey:()=>de,getTimingFunction:()=>Ce,global:()=>_g,gradient:()=>Ob,grid:()=>Ub,hasFunction:()=>Jt,hasHandlerPlugin:()=>ms,hasOwnProperty:()=>Qg,hashContent:()=>io,hexToRgb:()=>hb,hexToRgbArray:()=>nd,hexToRgba:()=>mb,hslToRgb:()=>sd,icons:()=>Lb,inheritChildExtends:()=>ou,inheritChildPropsExtends:()=>ru,inheritParentProps:()=>Ua,inheritRecursiveChildExtends:()=>su,init:()=>Gn,initPolyglot:()=>Up,initProps:()=>zm,injectGlobal:()=>vt,is:()=>ae,isArray:()=>D,isBoolean:()=>Uf,isBuiltinElementMethod:()=>zg,isCSSVar:()=>kt,isContextComponent:()=>Fm,isCyclic:()=>cm,isDOMNode:()=>ie,isDate:()=>zf,isDefined:()=>It,isDevelopment:()=>lr,isDomDocument:()=>kn,isEmpty:()=>qf,isEmptyObject:()=>Jg,isEnumeratedTrueFalseAttr:()=>rn,isEqualDeep:()=>Kf,isFailedRevival:()=>Zr,isFunction:()=>P,isGoogleFontsUrl:()=>Fs,isHostObject:()=>vn,isHtmlElement:()=>la,isLazyFunction:()=>Xg,isLocal:()=>pm,isLoudDevRuntime:()=>Q,isMalformedDependency:()=>oo,isMethod:()=>Ly,isMobile:()=>Sm,isNode:()=>En,isNot:()=>Sg,isNotProduction:()=>An,isNull:()=>Vf,isNumber:()=>Ie,isObject:()=>A,isObjectLike:()=>q,isPhoto:()=>By,isPlainColor:()=>Sr,isPolyglotRetranslatableKey:()=>Wa,isPolyglotWritableKey:()=>eo,isProduction:()=>cr,isProtectedElementMethod:()=>Kr,isRawUnitValue:()=>aa,isResolvedColor:()=>tn,isRevived:()=>Qr,isScalingUnit:()=>Hr,isStaging:()=>dm,isState:()=>Xm,isStore:()=>_t,isString:()=>v,isStringFunction:()=>gs,isStringTag:()=>va,isSvgTag:()=>Ar,isTest:()=>Xf,isTesting:()=>um,isTracking:()=>lw,isUndefined:()=>Bt,isUniversallyReservedKey:()=>Iy,isUnresolvableDependency:()=>gr,isValidDependencyMap:()=>so,isValidHtmlTag:()=>Cm,isValidTag:()=>oi,isWasmLoaded:()=>CR,isWrappedLibrary:()=>Je,isWritableFamilyBucket:()=>bg,joinArrays:()=>ls,jointStacks:()=>Lm,keyframes:()=>ni,keys:()=>Hu,libraryPackageSpecs:()=>Ps,linearChannelToSrgb:()=>ld,loadCssFile:()=>Hy,loadJavascript:()=>Wy,loadJavascriptFile:()=>Uy,loadJavascriptFileEmbedSync:()=>zy,loadJavascriptFileSync:()=>Vy,loadRemoteCSS:()=>qy,loadRemoteScript:()=>Os,loadTranslations:()=>Ql,loadWasm:()=>AR,log:()=>Ry,logGroupIf:()=>wm,logIf:()=>_m,lookdown:()=>ky,lookdownAll:()=>vy,lookup:()=>xy,lowercaseFirstLetter:()=>Wr,makeObjectWithoutPrototype:()=>tm,map:()=>Gg,mapStringsWithContextComponents:()=>Na,markPolyglotSeeded:()=>mn,markRevived:()=>hs,matchesComponentNaming:()=>gn,media:()=>Ab,memoize:()=>mm,merge:()=>xt,mergeSharedLibraries:()=>vc,mergeSharedLibraryDesignSystems:()=>Ec,mixTwoColors:()=>pb,mixTwoRgb:()=>yb,mixTwoRgba:()=>ad,nextElement:()=>pc,normalizeIgnoreList:()=>Sc,normalizeLibraryKey:()=>lo,numToLetterMap:()=>bn,objectToString:()=>ka,objectizeStringProperty:()=>Fa,oklabToLinearSrgb:()=>fd,oklabToOklch:()=>Rc,oklchToGamutSafeSrgb:()=>Pc,oklchToOklab:()=>ud,opacify:()=>Ms,overwrite:()=>Aa,overwriteDeep:()=>ee,overwriteShallow:()=>to,overwriteState:()=>Jm,parkHostObject:()=>or,parse:()=>Wu,parseColorToken:()=>Zt,parseDeep:()=>rc,pickupElementFromProps:()=>fu,pickupPropsFromElement:()=>lu,polyglotFunctions:()=>ff,polyglotPlugin:()=>Mi,polyglotSeededKeys:()=>ur,popConfig:()=>X,popStaticCssPass:()=>np,prepareContext:()=>U0,previousElement:()=>hc,promoteActiveRootState:()=>vs,propExists:()=>Um,propertizeElement:()=>uu,propertizeUpdate:()=>Bm,pushConfig:()=>J,pushStaticCssPass:()=>ep,quietColorProbe:()=>_o,refreshContextProto:()=>mi,registerEvent:()=>ci,registerHostPackages:()=>WP,registerSignalInstance:()=>ss,reinit:()=>QS,relativeLuminance:()=>po,remove:()=>hi,removeChars:()=>lb,removeCookie:()=>vm,removeDelegatedEvent:()=>ml,removeDuplicateProps:()=>za,removeDuplicatesInArray:()=>fs,removeFromArray:()=>vg,removeFromObject:()=>nm,removeNestedKeyByPath:()=>om,removeValueFromArray:()=>pa,removeValueFromArrayAll:()=>Tg,reorderArrayByValues:()=>Rg,repairLegacyArrowScopePreamble:()=>wa,replaceLiteralsWithObjectFields:()=>Vt,replaceOctalEscapeSequences:()=>Ng,resetEmitStats:()=>E_,resolveAsset:()=>fe,resolveBorderValue:()=>Ae,resolveColorRgb:()=>wo,resolveColorsInGradient:()=>ll,resolveConfigDocument:()=>as,resolveDesignSystemClass:()=>fC,resolveFileReferences:()=>ao,resolveFileSource:()=>I_,resolveFileUrl:()=>je,resolveGridTracks:()=>sC,resolveHandler:()=>ys,resolvePropValue:()=>Or,resolveShadowValue:()=>So,resolveSharedLibraries:()=>ib,resolveStyleBlockTokens:()=>Q_,returnSubThemeOrDefault:()=>_b,returnValueAsText:()=>pu,rgbArrayToHex:()=>rd,rgbToHSL:()=>od,rgbToHex:()=>gb,runPluginHook:()=>Ct,runThroughMedia:()=>Cd,schemeGuardSelector:()=>kr,schemeMediaQuery:()=>xr,scratchDefaultConfig:()=>Bs,scratchSystem:()=>Ys,scratchUtils:()=>_r,self:()=>wg,semanticIcons:()=>Db,sequence:()=>Dn,serializeAttrValue:()=>ne,set:()=>Eo,setActiveConfig:()=>wd,setActiveDocument:()=>v_,setActiveRootState:()=>ic,setAdaptiveSchemeVar:()=>vr,setClass:()=>a3,setClassname:()=>vF,setColor:()=>wr,setCookie:()=>xm,setCssEngineHook:()=>Dp,setCustomFont:()=>Lc,setCustomFontMedia:()=>yr,setEach:()=>d_,setFont:()=>Qc,setFontFamily:()=>Ks,setFontImport:()=>js,setGradient:()=>Hs,setHashedExtend:()=>Jf,setInCustomFontMedia:()=>pd,setInObjectByPath:()=>sm,setLang:()=>Jl,setLocalStorage:()=>Am,setMediaTheme:()=>qs,setNodeStyles:()=>zu,setObserver:()=>Dt,setProps:()=>Ay,setPropsPrototype:()=>Va,setSVG:()=>Gs,setScalingVar:()=>Fc,setShadow:()=>Er,setSubScalingVar:()=>Sd,setSvgIcon:()=>xo,setTheme:()=>Zc,setValue:()=>u_,setVariables:()=>Xb,setWasmEngine:()=>hl,settled:()=>Ff,shadow:()=>Pb,shape:()=>Wb,sharedLibrary:()=>eb,sizes:()=>Hb,skins:()=>qb,spacing:()=>Cb,splitPackageSpecifier:()=>bc,splitSpacedValue:()=>Yc,splitTopLevelCommas:()=>en,splitTopLevelSpaces:()=>ht,splitTransition:()=>Id,spotByPath:()=>oc,srcsetFor:()=>Ds,srgbChannelToLinear:()=>cd,srgbToOklab:()=>Oc,stringIncludesAny:()=>ma,stringToObject:()=>Zg,stripVersionRangePrefix:()=>_c,svg:()=>Fb,svgData:()=>jb,swapItemsInArray:()=>Eg,syncProps:()=>Ha,templates:()=>Bb,theme:()=>Rb,timing:()=>Ib,toCamel:()=>Mc,toCamelCase:()=>fo,toDashCase:()=>Ac,toDescriptionCase:()=>ub,toLinearChannel:()=>$s,toPriorityOrder:()=>$e,toTitleCase:()=>fb,toggleFullscreen:()=>$y,transformBackgroundImage:()=>Pd,transformBorder:()=>wn,transformBorderRadius:()=>Mn,transformBoxShadow:()=>cl,transformClassname:()=>dC,transformDuration:()=>fl,transformGridTemplate:()=>Dd,transformShadow:()=>Rd,transformSize:()=>Et,transformSizeRatio:()=>N,transformTextStroke:()=>Od,transformTransition:()=>f_,transformersByPrefix:()=>Z_,transfromGap:()=>Ld,translate:()=>Zl,triggerEventOn:()=>Cn,triggerEventOnUpdate:()=>ey,trimStringFromSymbols:()=>$g,typography:()=>Ic,unit:()=>Sb,unstackArrayOfObjects:()=>da,update:()=>di,updateProps:()=>Hm,updateVars:()=>i3,upsertTranslation:()=>tf,useCssInProps:()=>ye,useHostState:()=>cw,usePropsAsCSS:()=>lC,useSelectorsAsCSS:()=>uC,variables:()=>gc,vars:()=>zb,verbose:()=>Es,warn:()=>dc,warnLibraryAliasCollision:()=>Ls,warnStateKeyShadowsMethod:()=>Bf,window:()=>T,wrapHoverRule:()=>jn});module.exports=pI(K0);Kt();var Wd={};F(Wd,{CSS_LONGHAND_SHORTHANDS:()=>ze,CSS_SHORTHAND_LONGHANDS:()=>yt,assertEmitIntegrity:()=>A_,css:()=>Oe,cssShorthandDepth:()=>Qs,cssShorthandStatesLonghand:()=>ul,getActiveDocument:()=>Ao,getCacheSize:()=>T_,getEmitStats:()=>zd,injectGlobal:()=>vt,keyframes:()=>ni,reset:()=>kA,resetEmitStats:()=>E_,setActiveDocument:()=>v_,setWasmEngine:()=>hl,wrapHoverRule:()=>jn});var p_={};F(p_,{COMPOUND_CSS_KEYWORDS:()=>ho,CONFIG:()=>yo,CONFIG_MERGE_EXL:()=>Ee,CSS_NAMED_COLOR_HEX:()=>ed,CSS_NATIVE_COLOR_REGEX:()=>ke,CSS_UNITS:()=>cs,FACTORY:()=>ve,STANDARD_SCHEME_QUERIES:()=>Ed,VALUE_TRANSFORMERS:()=>$d,__resetSkinWarnings:()=>l_,activateConfig:()=>wE,aliasCaseVariants:()=>zs,animation:()=>Nb,appendSVGSprite:()=>sl,appendSvgIconsSprite:()=>ko,applyDocument:()=>ol,applyHeadings:()=>Td,applyMediaSequenceVars:()=>br,applyReset:()=>il,applySequenceGlobalVars:()=>Hc,applySequenceVars:()=>$n,applySkins:()=>al,applySpacingSequence:()=>Gc,applyTimingSequence:()=>rl,applyTypographySequence:()=>tl,breakpoints:()=>$b,buildSkinVarStyles:()=>vo,changeGlobalTheme:()=>Md,changeLightness:()=>bb,checkIfBoxSize:()=>Kc,class:()=>Vb,color:()=>Tb,colorStringToRgbaArray:()=>Fe,compositeOverBackdrop:()=>go,contrastRatio:()=>Ns,convertSvgToSymbol:()=>qc,createConfig:()=>Nc,cssMediaVars:()=>_d,cssVars:()=>bd,defineResolvedThemeSignal:()=>Vs,defineThemeSignal:()=>Us,devices:()=>Mb,document:()=>mE,findHeadingLetter:()=>kd,findHeadings:()=>zc,font:()=>xb,fontFace:()=>Eb,fontFamily:()=>kb,fontFamilyTypes:()=>vb,generateSequence:()=>ue,generateSequencePosition:()=>Yb,generateSprite:()=>Wc,generateSubSequence:()=>Uc,getActiveConfig:()=>O,getColor:()=>at,getColorShade:()=>id,getDefaultOrFirstKey:()=>Ln,getFnPrefixAndValue:()=>In,getFontFace:()=>wb,getFontFaceEach:()=>mo,getFontFaceEachString:()=>hd,getFontFaceString:()=>Dc,getFontFamily:()=>Jc,getFontFormat:()=>dd,getFontSizeByKey:()=>el,getMediaColor:()=>zt,getMediaTheme:()=>Ve,getResolvedThemeSignal:()=>_E,getRgbTone:()=>yn,getSafeInk:()=>Ad,getSafeInkInfo:()=>Jb,getSequenceValue:()=>bo,getSequenceValueBySymbols:()=>Vc,getSequenceValuePropertyPair:()=>_n,getShadow:()=>Xc,getShapeByKey:()=>nl,getSizeValue:()=>xd,getSpacingBasedOnRatio:()=>Ue,getSpacingByKey:()=>Ot,getSubratio:()=>Bc,getSubratioDifference:()=>jc,getTheme:()=>r_,getThemeSignal:()=>bE,getTimingByKey:()=>de,getTimingFunction:()=>Ce,gradient:()=>Ob,grid:()=>Ub,hexToRgb:()=>hb,hexToRgbArray:()=>nd,hexToRgba:()=>mb,hslToRgb:()=>sd,icons:()=>Lb,isCSSVar:()=>kt,isDomDocument:()=>kn,isGoogleFontsUrl:()=>Fs,isHostObject:()=>vn,isPlainColor:()=>Sr,isRawUnitValue:()=>aa,isResolvedColor:()=>tn,isScalingUnit:()=>Hr,isWritableFamilyBucket:()=>bg,linearChannelToSrgb:()=>ld,media:()=>Ab,mixTwoColors:()=>pb,mixTwoRgb:()=>yb,mixTwoRgba:()=>ad,numToLetterMap:()=>bn,oklabToLinearSrgb:()=>fd,oklabToOklch:()=>Rc,oklchToGamutSafeSrgb:()=>Pc,oklchToOklab:()=>ud,opacify:()=>Ms,parkHostObject:()=>or,parseColorToken:()=>Zt,popConfig:()=>X,pushConfig:()=>J,quietColorProbe:()=>_o,relativeLuminance:()=>po,reset:()=>yE,resolveBorderValue:()=>Ae,resolveColorRgb:()=>wo,resolveColorsInGradient:()=>ll,resolveConfigDocument:()=>as,resolveFileUrl:()=>je,resolveShadowValue:()=>So,returnSubThemeOrDefault:()=>_b,rgbArrayToHex:()=>rd,rgbToHSL:()=>od,rgbToHex:()=>gb,runThroughMedia:()=>Cd,schemeGuardSelector:()=>kr,schemeMediaQuery:()=>xr,scratchDefaultConfig:()=>Bs,scratchSystem:()=>Ys,scratchUtils:()=>_r,semanticIcons:()=>Db,sequence:()=>Dn,set:()=>Eo,setActiveConfig:()=>wd,setAdaptiveSchemeVar:()=>vr,setColor:()=>wr,setCustomFont:()=>Lc,setCustomFontMedia:()=>yr,setEach:()=>d_,setFont:()=>Qc,setFontFamily:()=>Ks,setFontImport:()=>js,setGradient:()=>Hs,setInCustomFontMedia:()=>pd,setMediaTheme:()=>qs,setSVG:()=>Gs,setScalingVar:()=>Fc,setShadow:()=>Er,setSubScalingVar:()=>Sd,setSvgIcon:()=>xo,setTheme:()=>Zc,setValue:()=>u_,setVariables:()=>Xb,shadow:()=>Pb,shape:()=>Wb,sizes:()=>Hb,skins:()=>qb,spacing:()=>Cb,splitSpacedValue:()=>Yc,splitTopLevelCommas:()=>en,splitTopLevelSpaces:()=>ht,splitTransition:()=>Id,srgbChannelToLinear:()=>cd,srgbToOklab:()=>Oc,svg:()=>Fb,svgData:()=>jb,templates:()=>Bb,theme:()=>Rb,timing:()=>Ib,toCamel:()=>Mc,toLinearChannel:()=>$s,transformBackgroundImage:()=>Pd,transformBorder:()=>wn,transformBorderRadius:()=>Mn,transformBoxShadow:()=>cl,transformDuration:()=>fl,transformGridTemplate:()=>Dd,transformShadow:()=>Rd,transformSize:()=>Et,transformSizeRatio:()=>N,transformTextStroke:()=>Od,transformTransition:()=>f_,transfromGap:()=>Ld,typography:()=>Ic,unit:()=>Sb,vars:()=>zb});var _r={};F(_r,{COMPOUND_CSS_KEYWORDS:()=>ho,CSS_NAMED_COLOR_HEX:()=>ed,CSS_NATIVE_COLOR_REGEX:()=>ke,CSS_UNITS:()=>cs,applyMediaSequenceVars:()=>br,applySequenceGlobalVars:()=>Hc,applySequenceVars:()=>$n,changeLightness:()=>bb,colorStringToRgbaArray:()=>Fe,compositeOverBackdrop:()=>go,contrastRatio:()=>Ns,convertSvgToSymbol:()=>qc,findHeadingLetter:()=>kd,findHeadings:()=>zc,generateSequence:()=>ue,generateSequencePosition:()=>Yb,generateSprite:()=>Wc,generateSubSequence:()=>Uc,getColorShade:()=>id,getDefaultOrFirstKey:()=>Ln,getFnPrefixAndValue:()=>In,getFontFace:()=>wb,getFontFaceEach:()=>mo,getFontFaceEachString:()=>hd,getFontFaceString:()=>Dc,getFontFormat:()=>dd,getRgbTone:()=>yn,getSequenceValue:()=>bo,getSequenceValueBySymbols:()=>Vc,getSequenceValuePropertyPair:()=>_n,getSizeValue:()=>xd,getSubratio:()=>Bc,getSubratioDifference:()=>jc,hexToRgb:()=>hb,hexToRgbArray:()=>nd,hexToRgba:()=>mb,hslToRgb:()=>sd,isCSSVar:()=>kt,isDomDocument:()=>kn,isGoogleFontsUrl:()=>Fs,isHostObject:()=>vn,isRawUnitValue:()=>aa,isResolvedColor:()=>tn,isScalingUnit:()=>Hr,isWritableFamilyBucket:()=>bg,linearChannelToSrgb:()=>ld,mixTwoColors:()=>pb,mixTwoRgb:()=>yb,mixTwoRgba:()=>ad,numToLetterMap:()=>bn,oklabToLinearSrgb:()=>fd,oklabToOklch:()=>Rc,oklchToGamutSafeSrgb:()=>Pc,oklchToOklab:()=>ud,opacify:()=>Ms,parkHostObject:()=>or,parseColorToken:()=>Zt,relativeLuminance:()=>po,resolveConfigDocument:()=>as,resolveFileUrl:()=>je,returnSubThemeOrDefault:()=>_b,rgbArrayToHex:()=>rd,rgbToHSL:()=>od,rgbToHex:()=>gb,setCustomFont:()=>Lc,setCustomFontMedia:()=>yr,setFontImport:()=>js,setInCustomFontMedia:()=>pd,setScalingVar:()=>Fc,setSubScalingVar:()=>Sd,setVariables:()=>Xb,splitTopLevelCommas:()=>en,splitTopLevelSpaces:()=>ht,srgbChannelToLinear:()=>cd,srgbToOklab:()=>Oc,toLinearChannel:()=>$s});var kn=t=>!!(t&&t.documentElement&&typeof t.createElement=="function"&&t.head!==void 0),vn=t=>{if(t===null||typeof t!="object")return!1;let e=Object.prototype.toString.call(t);return!!(e!=="[object Object]"&&e!=="[object Array]"||typeof t.nodeType=="number"||t.defaultView||t.window===t||t.self===t)},bg=t=>t!==null&&typeof t=="object"&&!vn(t),or=(t,e,n)=>{if(!t)return;if(kn(n)){t.__domDocument||(t.__domDocument=n);return}let r=`__host_${e}`;t[r]||(t[r]=n)},as=t=>t?kn(t.__domDocument)?t.__domDocument:kn(t.document)?t.document:null:null;var Hr=t=>t==="em"||t==="rem"||t==="vw"||t==="vh"||t==="vmax"||t==="vmin",cs=["px","cm","mm","in","pt","pc","em","rem","ex","cap","ch","ic","lh","rlh","%","vw","vh","vmin","vmax","svw","svh","lvw","lvh","dvw","dvh","cqw","cqh","cqi","cqb","cqmin","cqmax","deg","rad","grad","turn","s","ms","dpi","dpcm","dppx","fr","auto"],OI=t=>t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),RI=new RegExp(`^-?(?:\\d+\\.?\\d*|\\.\\d+)(?:${cs.filter(t=>t!=="auto").map(OI).join("|")})$`),aa=t=>RI.test(String(t).trim());I();var ed={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},Fe=t=>{if(t==="")return[0,0,0,0];if(t.toLowerCase()==="transparent")return[0,0,0,0];let e=ed[t.toLowerCase()];if(e&&(t=e),t[0]==="#")return t.length<7&&(t="#"+t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+(t.length>4?t[4]+t[4]:"")),[parseInt(t.substr(1,2),16),parseInt(t.substr(3,2),16),parseInt(t.substr(5,2),16),t.length>7?parseInt(t.substr(7,2),16)/255:1];if(t.indexOf("rgb")===-1&&dt&&T){let n=dt.body.appendChild(dt.createElement("fictum")),r="rgb(1, 2, 3)";if(n.style.color=r,n.style.color!==r){dt.body.removeChild(n);return}if(n.style.color=t,n.style.color===r||n.style.color==="")return dt.body.removeChild(n),[0,0,0,0];t=T.getComputedStyle(n).color,dt.body.removeChild(n)}return t.indexOf("rgb")===0?(t.indexOf("rgba")===-1&&(t=`${t}, 1`),t.match(/[\.\d]+/g).map(n=>+n)):[0,0,0,0]},pb=(t,e,n=.5)=>(t=Fe(t),e=Fe(e),ad(t,e,n)),hb=(t,e=1)=>{let[n,r,o]=t.match(/\w\w/g).map(s=>parseInt(s,16));return`rgb(${n},${r},${o})`},nd=(t,e=1)=>{let[n,r,o]=t.match(/\w\w/g).map(s=>parseInt(s,16));return[n,r,o]},gb=(t,e,n)=>"#"+(1<<24|t<<16|e<<8|n).toString(16).slice(1),rd=([t,e,n])=>((1<<24)+(t<<16)+(e<<8)+n).toString(16).slice(1),mb=(t,e=1)=>{let[n,r,o]=t.match(/\w\w/g).map(s=>parseInt(s,16));return`rgba(${n},${r},${o},${e})`},yb=(t,e,n=.5)=>{let r=[];for(let o=0;o<3;o++)r[o]=~~(t[o]+(e[o]-t[o])*n);return`rgb(${r})`},bb=(t,e)=>{let[n,r,o]=e,s=Math.max(0,Math.min(100,o+parseFloat(t)));return[n,r,s]},od=(t,e,n)=>{let r=Math.max(t,e,n),o=r-Math.min(t,e,n),s=1-Math.abs(r+r-o-1),i=o&&(r==t?(e-n)/o:r==e?2+(n-t)/o:4+(t-e)/o);return[60*(i<0?i+6:i),s?o/s:0,(r+r-o)/2]},sd=(t,e,n,r=e*Math.min(n,1-n),o=(s,i=(s+t/30)%12)=>n-r*Math.max(Math.min(i-3,9-i,1),-1))=>[o(0),o(8),o(4)],id=(t,e)=>{let n=parseInt(t,16),r=(n>>16)+e;r>255?r=255:r<0&&(r=0);let o=(n>>8&255)+e;o>255?o=255:o<0&&(o=0);let s=(n&255)+e;return s>255?s=255:s<0&&(s=0),((s|o<<8|r<<16)+16777216).toString(16).slice(1)},ad=(t,e,n=.5)=>{let r=[];for(let o=0;o<4;o++){let s=o===3?i=>i:Math.round;r[o]=s(t[o]+(e[o]-t[o])*n)}return`rgba(${r})`},Ms=(t,e)=>{let n=Fe(t);if(!n){An()&&console.warn(t+" color is not rgba");return}return n[3]=e,`rgba(${n})`},kt=t=>t.charCodeAt(0)===45&&t.charCodeAt(1)===45,ho=new Set(["currentcolor","transparent","thin","medium","thick"]),ke=/(?:rgba?\(|hsla?\(|#[0-9a-fA-F]{3,8}\b)/,V2=/^([a-zA-Z]\w*(?:-[a-zA-Z]\w*)*)(?:\.(\d+))?(?:([+-]\d+|=\d+))?$/,Zt=t=>{if(!v(t))return null;if(ke.test(t))return{passthrough:t};if(kt(t))return{cssVar:t};let e=t.match(V2);if(!e)return null;let[,n,r,o]=e,s=r!==void 0?`0.${r}`:void 0,i=o&&o[0]==="="?o.slice(1):o;return{name:n,alpha:s,tone:i}},tn=t=>v(t)&&(t.includes("rgb")||t.includes("var(")||t.includes("#")),en=t=>{let e=[],n="",r=0;for(let o of t){if(o==="("?r+=1:o===")"&&r>0&&(r-=1),o===","&&r===0){e.push(n),n="";continue}n+=o}return(n.length||!e.length)&&e.push(n),e},ht=t=>{let e=[],n="",r=0;for(let o of t){if(o==="("?r+=1:o===")"&&r>0&&(r-=1),r===0&&/\s/.test(o)){n.length&&e.push(n),n="";continue}n+=o}return n.length&&e.push(n),e},$s=t=>(t/=255,t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)),po=t=>.2126*$s(t[0])+.7152*$s(t[1])+.0722*$s(t[2]),Ns=(t,e)=>{let n=po(t)+.05,r=po(e)+.05;return n>r?n/r:r/n},cd=t=>(t/=255,t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)),ld=t=>(t<=.0031308?t*12.92:1.055*Math.pow(t,1/2.4)-.055)*255,Oc=([t,e,n])=>{let[r,o,s]=[t,e,n].map(cd),i=.4122214708*r+.5363325363*o+.0514459929*s,a=.2119034982*r+.6806995451*o+.1073969566*s,c=.0883024619*r+.2817188376*o+.6299787005*s,l=Math.cbrt(i),f=Math.cbrt(a),u=Math.cbrt(c);return[.2104542553*l+.793617785*f-.0040720468*u,1.9779984951*l-2.428592205*f+.4505937099*u,.0259040371*l+.7827717662*f-.808675766*u]},fd=([t,e,n])=>{let r=t+.3963377774*e+.2158037573*n,o=t-.1055613458*e-.0638541728*n,s=t-.0894841775*e-1.291485548*n,i=r**3,a=o**3,c=s**3;return[4.0767416621*i-3.3077115913*a+.2309699292*c,-1.2684380046*i+2.6097574011*a-.3413193965*c,-.0041960863*i-.7034186147*a+1.707614701*c]},Rc=([t,e,n])=>{let r=Math.atan2(n,e)*180/Math.PI;return r<0&&(r+=360),[t,Math.sqrt(e*e+n*n),r]},ud=([t,e,n])=>{let r=n*Math.PI/180;return[t,e*Math.cos(r),e*Math.sin(r)]},Pc=(t,e,n,r=24)=>{let o=a=>fd(ud([t,a,n])),s=a=>a.every(c=>c>=-1e-4&&c<=1.0001),i=o(e);if(!s(i)){let a=0,c=e;for(let l=0;l<r;l++){let f=(a+c)/2;s(o(f))?a=f:c=f}i=o(a)}return i.map(a=>ld(Math.max(0,Math.min(1,a))))},go=(t,e=1,n=[255,255,255])=>e>=1?t:t.map((r,o)=>r*e+n[o]*(1-e)),yn=(t,e)=>{v(t)&&t.includes("rgb")&&(t=Fe(t).join(", ")),v(t)&&(t=t.split(",").map(o=>parseFloat(o.trim()))),Ie(e)&&(e+="");let n=rd(t),r=e.slice(0,1);if(r==="-"||r==="+"){let o=id(n,parseFloat(e));return nd(o).join(", ")}else{let[o,s,i]=t,[a,c]=od(o/255,s/255,i/255),l=Math.max(0,Math.min(100,parseFloat(e)))/100;return sd(a,c,l).map(u=>Math.round(Math.max(0,Math.min(1,u))*255)).join(", ")}};var _b=(t,e)=>{if(t)return t.themes&&t.themes[e]?t.themes[e]:t[e]?[t,t[e]]:t};var je=(t,e)=>{if(!t||!e)return null;try{return new URL(t),null}catch{}let n=e[t];return n?n.content&&n.content.src:null},Ln=(t,e)=>{if(!t)return;if(e!=null&&e!==""&&e!=="default"){let s=t[e];return s&&typeof s=="object"?s.value:void 0}let r=()=>Object.keys(t).find(s=>s!=="default"&&t[s]&&t[s].value&&!t[s].isSystemFallback);if(t.default){let s=t[t.default];if(s&&s.isSystemFallback){let i=r();if(i)return t[i].value}if(s)return s.value}let o=r()||Object.keys(t).find(s=>s!=="default"&&t[s]&&t[s].value);return o&&t[o]&&t[o].value},dd=t=>{if(typeof t!="string"||!t)return null;let e=t.split(/[#?]/)[0].split(".").pop().trim();return["woff2","woff","ttf","otf","eot"].includes(e)?e:null},Fs=t=>t&&(t.includes("fonts.googleapis.com")||t.includes("fonts.gstatic.com")),js=t=>`@import url('${t}');`,pd=t=>`@font-face { ${t} }`,Lc=(t,e,n,r={})=>{let i=(Array.isArray(e)?e:[e]).filter(a=>typeof a=="string"&&a).map(a=>{let c=dd(a),l=c?` format('${c}')`:"";return`url('${a}')${l}`}).join(`,
|
|
37
37
|
`);return`
|
|
38
38
|
font-family: '${t}';
|
|
39
39
|
font-style: ${r.fontStyle||"normal"};${n?`
|
|
@@ -41,24 +41,24 @@ FROM ${a}${l}`},Z$=t=>{let e=[],n=(r,o)=>{for(let s in r){let i=o?`${o}/${s}`:s;
|
|
|
41
41
|
font-stretch: ${r.fontStretch};`:""}${r.fontDisplay?`
|
|
42
42
|
font-display: ${r.fontDisplay};`:""}${r.unicodeRange?`
|
|
43
43
|
unicode-range: ${r.unicodeRange};`:""}
|
|
44
|
-
src: ${i};`},
|
|
45
|
-
}`,go=(t,e,n)=>Object.keys(e).map(o=>{let{url:s,fontWeight:i,fontStyle:a,fontDisplay:c,fontStretch:l,unicodeRange:f}=e[o],u=Array.isArray(s)?s.map(d=>je(d,n)||d):je(s,n)||s;return Lc(t,u,i,{fontStyle:a,fontDisplay:c,fontStretch:l,unicodeRange:f})}),wb=t=>Object.keys(t).map(n=>go(n,t[n].value)),hd=(t,e,n)=>{if(e&&e.isVariable){let s=je(e.url,n)||e.url;return Fs(s)?js(s):mr(t,s,e.fontWeight,{fontStretch:e.fontStretch,fontDisplay:e.fontDisplay||"swap",unicodeRange:e.unicodeRange})}if(e[0])return go(t,e,n).map(pd);let o=Array.isArray(e.url)?e.url.map(s=>je(s,n)||s):je(e.url,n)||e.url;return mr(t,o,e.fontWeight,{fontStyle:e.fontStyle,fontDisplay:e.fontDisplay,fontStretch:e.fontStretch,unicodeRange:e.unicodeRange})},Dc=(t,e)=>Object.keys(t).map(r=>hd(r,t[r].value,e));I();I();I();I();Kt();var Bs={};F(Bs,{animation:()=>Nb,breakpoints:()=>$b,class:()=>Vb,color:()=>Tb,devices:()=>Mb,document:()=>gE,font:()=>xb,fontFace:()=>Eb,fontFamily:()=>kb,fontFamilyTypes:()=>vb,gradient:()=>Ob,grid:()=>Ub,icons:()=>Lb,media:()=>Ab,reset:()=>mE,semanticIcons:()=>Db,sequence:()=>Dn,shadow:()=>Pb,shape:()=>Wb,sizes:()=>Hb,skins:()=>qb,spacing:()=>Cb,svg:()=>Fb,svgData:()=>jb,templates:()=>Bb,theme:()=>Rb,timing:()=>Ib,typography:()=>Ic,unit:()=>Sb,vars:()=>zb});var Dn={"minor-second":1.067,"major-second":1.125,"minor-third":1.2,"major-third":1.25,"perfect-fourth":1.333,"augmented-fourth":1.414,"perfect-fifth":1.5,"minor-sixth":1.6,phi:1.618,"major-sixth":1.667,"square-root-3":1.732,"minor-seventh":1.778,"major-seventh":1.875,octave:2,"square-root-5":2.23,"major-tenth":2.5,"major-eleventh":2.667,"major-twelfth":3,pi:3.14,"double-octave":4};var Sb={default:"em"};var V2={browserDefault:16,base:16,type:"font-size",ratio:Dn["minor-third"],range:[-3,12],h1Matches:6,lineHeight:1.5,subSequence:!0,mediaRegenerate:!1,unit:"em",templates:{},sequence:{},scales:{},vars:{}},Ic=V2;var xb={};var kb={},vb={"sans-serif":"Helvetica, Arial, sans-serif",serif:"Times New Roman, Georgia, serif",monospace:"Courier New, monospace"},Eb={};var Ab={tv:"(min-width: 2780px)",light:"(prefers-color-scheme: light)",dark:"(prefers-color-scheme: dark)",print:"print"};var z2={base:Ic.base,type:"spacing",ratio:Dn.phi,range:[-5,15],subSequence:!0,mediaRegenerate:!1,unit:"em",sequence:{},scales:{},vars:{}},Cb=z2;var Tb={},Ob={};var Rb={};var Pb={};var Lb={},Db={};var H2={default:150,base:150,type:"timing",ratio:Dn["perfect-fourth"],range:[-3,12],mediaRegenerate:!1,unit:"ms",sequence:{},scales:{},vars:{}},Ib=H2;var gE={};var $b={screenL:1920,screenM:1680,screenS:1440,tabletL:1366,tabletM:1280,tabletS:1024,mobileL:768,mobileM:560,mobileS:480,mobileXS:375},Mb={screenXXL:[2560,1440],screenXL:[2240,1260],screenL:[1920,1024],screenM:[1680,1024],screenS:[1440,720],tabletL:[1366,926],tabletM:[1280,768],tabletS:[1024,768],mobileL:[768,375],mobileM:[560,768],mobileS:[480,768],mobileXS:[375,768]};var Nb={};var Fb={},jb={};var Bb={};var W2={},Ub=W2;var Vb={};var mE={},zb={},Hb={},Wb={},qb={};var bd={},_d={},Ee=new Set,gd=Bs,md={},Mc=t=>t.replace(/_([a-z])/g,(e,n)=>n.toUpperCase());for(let t in gd){let e=t.toLowerCase();md[e]=gd[t];let n=Mc(e);n!==e&&(md[n]=gd[t]),e!==t&&(md[t]=gd[t])}var mo={verbose:!1,useVariable:!0,useReset:!0,globalTheme:"auto",cssVars:bd,cssMediaVars:_d,CSS_VARS:bd,CSS_MEDIA_VARS:_d,cssSkinVars:{},cssSkinFallback:{},_scratchConfig:!0,...md},Us=(t,e)=>{if(!t)return null;if(t.__globalThemeSignal)return It(e)&&t.__globalThemeSignal.set(e),t.__globalThemeSignal;let n=It(e)?e:t.globalTheme,r=Vr(It(n)?n:"auto");return Object.defineProperty(t,"globalTheme",{get(){return r.get()},set(o){r.set(o)},enumerable:!0,configurable:!0}),Object.defineProperty(t,"__globalThemeSignal",{value:r,enumerable:!1,configurable:!0,writable:!0}),r},yE=t=>t?Us(t):null,Vs=(t,e)=>{if(!t)return null;if(t.__resolvedThemeSignal)return It(e)&&t.__resolvedThemeSignal.set(e),t.__resolvedThemeSignal;let n=It(e)?e:t.resolvedTheme,r=Vr(It(n)?n:null);return Object.defineProperty(t,"resolvedTheme",{get(){return r.get()},set(o){r.set(o)},enumerable:!1,configurable:!0}),Object.defineProperty(t,"__resolvedThemeSignal",{value:r,enumerable:!1,configurable:!0,writable:!0}),r},bE=t=>t?Vs(t):null;Us(mo);Vs(mo);var yd=ut(mo),ve={active:"0",0:mo},_E=t=>(It(t)&&(ve.active=t),ve[t||ve.active]),$c=[],J=t=>{t&&t._scratchConfig&&$c.push(t)},X=()=>{$c.pop()},O=t=>$c.length?$c[$c.length-1]:ve[t||ve.active]||mo,wd=t=>{if(E(t))return ve.active="1",ve[1]=ft(t,ut(yd),Ee),zs(ve[1]),Us(ve[1]),Vs(ve[1]),t},q2=["useReset","useFontImport","useIconSprite","useSvgSprite","useDocumentTheme","useDefaultIcons","useDefaultConfig"],K2=["useVariable","globalTheme","verbose"],G2=[["fontfamily","fontFamily","font_family"],["fontfamilytypes","fontFamilyTypes"],["semanticicons","semanticIcons"],["svgdata","svgData"]],zs=t=>{for(let e of G2){let n;for(let r of e){let o=t[r];E(o)&&(n=n?ft(n,o,Ee):o)}if(n)for(let r of e)E(t[r])&&(t[r]=n)}},Nc=(t,e,{cleanBase:n=!1}={})=>{let r=n?null:O(),o=ut(!n&&r&&r._scratchConfig?r:yd);for(let i of q2)delete o[i];for(let i of K2)Object.prototype.hasOwnProperty.call(yd,i)?o[i]=yd[i]:delete o[i];let s=ft(e||{},o,Ee);return s.cssVars={},s.cssMediaVars={},s.CSS_VARS=s.cssVars,s.CSS_MEDIA_VARS=s.cssMediaVars,s.cssSkinVars={},s.cssSkinFallback={},s._scratchConfig=!0,zs(s),Us(s),Vs(s),t&&(ve[t]=s),s};var bn={"-6":"U","-5":"V","-4":"W","-3":"X","-2":"Y","-1":"Z",0:"A",1:"B",2:"C",3:"D",4:"E",5:"F",6:"G",7:"H",8:"I",9:"J",10:"K",11:"L",12:"M",13:"N",14:"O",15:"P",16:"Q",17:"R",18:"S",19:"T"},Gb=(t,e)=>{let{key:n,variable:r,value:o,scaling:s,index:i,scalingVariable:a}=t;e.sequence[n]={key:n,decimal:~~(o*100)/100,val:~~o,scaling:s,index:i,scalingVariable:a,variable:r},e.scales[n]=s;let c=wE.has(e.unit)?"rem":e.unit;e.vars[r]=s+c},In=t=>{if(!t.includes("("))return t;let e=t.trim(),n=e.indexOf("("),r=e.slice(0,n),o=0,s=-1;for(let i=n;i<e.length;i++){let a=e[i];if(a==="(")o++;else if(a===")"&&(o--,o===0)){s=i;break}}return s===-1||/\s/.test(r)||e.slice(s+1).trim()!==""?[void 0,t]:[r,e.slice(n+1,s)]},Kb="\0",Y2=(t,e)=>{let n="",r=0,o="";for(let s of t){if(r===0&&s!=="("){n+=s;continue}o+=s,s==="("?r++:s===")"&&(r--,r===0&&(n+=Kb+e.length+Kb,e.push(o),o=""))}return n+o},X2=(t,e)=>t.indexOf(Kb)===-1?t:t.replace(/\u0000(\d+)\u0000/g,(n,r)=>e[Number(r)]),Z2=/^(calc|min|max|clamp)\((.*)\)$/,Q2=(t,e)=>{let n=Z2.exec(t);return n?`${n[1]}(${Vc(n[2],e)})`:t.indexOf("(")!==-1?t:yo(t,e)},wE=new Set(["vw","vh","vmin","vmax","svw","svh","lvw","lvh","dvw","dvh"]),Fc=(t,e)=>{let{base:n,type:r,unit:o}=e,s=wE.has(o)?"rem":o,i=(zr(s)?1:n)+s;if(t===0)return i;let c="--"+(e.varPrefix?e.varPrefix+"-":"")+(r&&r.replace(".","-")),l=`${c}-ratio`;if(t>0){let f=bn[t-1];return`calc(var(${c}-${f}) * var(${l}))`}if(t<0){let f=bn[t+1],u=Math.abs(t),d=Math.pow(SE,2*u),p=bn[u];return p?`max(calc(var(${c}-${f}) / var(${l})), calc(var(${c}-${p}) / ${d.toFixed(4)}))`:`calc(var(${c}-${f}) / var(${l}))`}},Sd=(t,e,n,r)=>{let{type:o}=r,i=t===2&&e.length===2?t+1:t,l=`${"--"+(r.varPrefix?r.varPrefix+"-":"")+(o&&o.replace(".","-"))}-sub-ratio-`;return`calc(var(${n}) * var(${l+i}))`},jc=(t,e)=>{let r=(t*e-t)/1.618,o=t*e-r,s=t+r,i=(o+s)/2;return[o,i,s]},Bc=(t,e)=>jc(t,e).map(n=>n/t),Uc=(t,e)=>{let{key:n,base:r,value:o,ratio:s,variable:i,index:a}=t,l=~~(o*s)-~~o,f,[u,d,p]=jc(o,s);l>16?f=[u,d,p]:f=[u,p],f.forEach((g,h)=>{let m=~~(g/r*1e3)/1e3,y=i+(h+1),S=a+(h+1)/10,b=Sd(h+1,f,i,e),x={key:n+(h+1),variable:y,value:g,scaling:m,scalingVariable:b,index:S};Gb(x,e)})},SE=1.618,J2=(t,e,n)=>{if(t>=0)return e*Math.pow(n,t);let r=Math.abs(t),o=e*Math.pow(n,t),s=e*Math.pow(n,r)/Math.pow(SE,2*r);return Math.max(o,s)},ue=t=>{let{type:e,base:n,ratio:r,range:o,subSequence:s}=t,i=Math.abs(o[0])+Math.abs(o[1]),c="--"+(t.varPrefix?t.varPrefix+"-":"")+(e&&e.replace(".","-"))+"-";for(let l=0;l<=i;l++){let f=o[1]-l,u=bn[f],d=J2(f,n,r),p=~~(d/n*100)/100,g=c+u,h=Fc(f,t),m={key:u,variable:g,value:d,base:n,scaling:p,scalingVariable:h,ratio:r,index:f};Gb(m,t),s&&Uc(m,t)}return t},Yb=(t,e=0)=>{let{type:n,base:r,ratio:o,subSequence:s}=t,i=v(e)?e:bn[e],a=v(e)?Object.entries(bn).find(([,m])=>m===e)?.[0]:e;if(!i)return console.warn(`Position ${e} is out of range in numToLetterMap`),null;let c={sequence:{},scales:{},vars:{},...t},l=r*Math.pow(o,a),f=~~(l/r*100)/100,p="--"+(t.varPrefix?t.varPrefix+"-":"")+(n&&n.replace(".","-"))+"-"+i,g=Fc(a,t),h={key:i,variable:p,value:l,base:r,scaling:f,scalingVariable:g,ratio:o,index:a};return Gb(h,c),s&&Uc(h,c),c},xd=(t,e)=>{if(!t||!v(e)||!e)return;let n=t[e]||t[e.toLowerCase()];if(n!==void 0)return e.charCodeAt(0)===45?`calc(${n} * -1)`:n;if(e.charCodeAt(0)!==45||e.length<2)return;let r=e.slice(1),o=t[r]||t[r.toLowerCase()];if(o!==void 0)return`calc(${o} * -1)`},yo=(t="A",e)=>{let n=O(),{unit:r}=n;if(v(t)&&kt(t))return`var(${t})`;if(v(t)&&/^(?:env|var|calc|min|max|clamp)\(/.test(t.trim()))return t;if(v(t)){let b=xd(n.sizes,t);if(b!==void 0)return b}let{sequence:o,unit:s=r.default,useVariable:i}=e,a=/^-?[a-zA-Z]/i,c=a.test(t);if(aa(t)||!c||["none","auto","max-content","min-content","fit-content","inherit","initial","unset","revert","revert-layer"].includes(t))return t;let d=`--${e.varPrefix?e.varPrefix+"-":""}${Ac(e.type.replace(".","-"))}-`,p=t.toUpperCase(),g=p.slice(0,1)==="-"?"-":"",h=g?p.slice(1):p,m="";h.includes("_")&&(m="_"+h.split("_")[1].toLowerCase(),h=h.split("_")[0]);let y=b=>a.test(b)?`var(${d}${b}${m})`:b;if(h.includes("+")){let[b,x]=h.split("+"),_=`${y(b)} + ${y(x)}`;return g?`calc((${_}) * -1)`:`calc(${_})`}else if(h.includes("*")){let[b,x]=h.split("*"),_=`${y(b)} * ${y(x)}`;return g?`calc((${_}) * -1)`:`calc(${_})`}else if(h.includes("-")){let[b,x]=h.split("-"),_=`${y(b)} - ${y(x)}`;return g?`calc((${_}) * -1)`:`calc(${_})`}if(!o[h]&&h.length===2&&(n.verbose&&console.warn(h,"- value is not found because `subSequence` is set to false"),h=h.slice(0,1)),i||n.useVariable){let b=`var(${d}${h}${m})`;return g?`calc(${b} * -1)`:b}let S=o?o[h]:null;if(!S){if(console.warn("can't find",o,h),Q())throw new Error(`[smbls] Unresolvable design-system token "${t}"`+(e.type?` for sequence "${e.type}"`:"")+" \u2014 not a registered `sizes` name and not a valid spacing/typography/timing sequence letter. The CSS property using it would silently be dropped in production. Register the token in `designSystem/sizes.js` (or the relevant sequence family) or fix the typo.");return}return s==="ms"||s==="s"?g+S.val+s:g+S.scaling+s},Vc=(t,e)=>{if(!["+","-","*","/",","].filter(i=>t.includes(i+" ")).length)return t;let r=/(\s+-\s+|\s*[+*/,]\s*)/,o=[];return Y2(t,o).split(r).map(i=>{let a=X2(i,o),c=a.trim();return!c||["+","-","*","/",","].includes(c)?a:Q2(c,e)}).join("")},_n=(t,e,n,r)=>{if(typeof t!="string")return O().verbose&&console.warn(e,t,"is not a string"),{[e]:t};if(t==="-"||t==="")return{};if(!r&&t.includes("(")){if(/^(?:env|var)\(/.test(t.trim()))return{[e]:t};let s=In(t);r=s[0],t=s[1]}return["+","-","*","/",","].filter(s=>t.includes(s+" ")).length?t=Vc(t,n):t=yo(t,n),{[e]:r?`${r}(${t})`:t}},kd=(t,e)=>bn[t-e],zc=t=>{let{h1Matches:e,sequence:n}=t;return new Array(6).fill(null).map((r,o)=>{let s=kd(e,o);return n[s]})};I();var Xb=(t,e)=>{let n=O(),{cssVars:r}=n;q(t.value)||(r[t.var]=t.value)},Hc=(t,e,n)=>{let r=O(),{unit:o}=r,s=e.unit||o.default,{base:i,ratio:a,type:c}=e,f="--"+(e.varPrefix?e.varPrefix+"-":"")+(c&&c.replace(".","-"));t[`${f}-base`]=i,t[`${f}-unit`]=s;let u=`${f}-ratio`;t[u]=a;let[d,p,g]=Bc(i,a);t[`${f}-sub-ratio-1`]=`calc(var(${f}-ratio) * ${d/a})`,t[`${f}-sub-ratio-2`]=`calc(var(${f}-ratio) * ${p/a})`,t[`${f}-sub-ratio-3`]=`calc(var(${f}-ratio) * ${g/a})`},xE=new Set(["vw","vh","vmin","vmax","svw","svh","lvw","lvh","dvw","dvh"]),$n=(t,e={})=>{let n=O(),{unit:r,timing:o,cssVars:s}=n,i=t.unit||r.default,a=xE.has(i)?"rem":i,{mediaRegenerate:c,sequence:l,scales:f}=t;c||Hc(s,t,e);for(let u in l){let d=l[u],p=(t.type===o.type?l[u].val:f[u])+a;if(!c){s[d.variable+"_default"]=p,s[d.variable]=d.scalingVariable;continue}e.useDefault===!1?s[d.variable]=p:(s[d.variable+"_default"]=p,s[d.variable]=`var(${d.variable+"_default"})`)}},yr=(t,e,n={})=>{let r=O(),{unit:o,media:s,cssVars:i}=r,a=e.slice(1),c=t[e],l=c.unit||t.unit||o.default,f=xE.has(l)?"rem":l,{mediaRegenerate:u}=t,{sequence:d,scales:p}=c,g=s[a];if(!g&&r.verbose&&console.warn("Can't find media query ",g),!u){let h=i[`@media ${g}`];h||(h=i[`@media ${g}`]={}),Hc(h,c,n);let m=t.unit||o.default;if(f!==m&&d)for(let y in d){let S=d[y],b=p[y]+f;h[S.variable+"_default"]=b,h[S.variable]=b}return}for(let h in d){let m=d[h],y=(zr(f)?p[h]:d[h].val)+f;!g&&r.verbose&&console.warn("Can't find query ",g);let S=i[`@media ${g}`];S||(S=i[`@media ${g}`]={}),S[m.variable]=`var(${m.variable+"_"+a})`,i[m.variable+"_"+a]=y}};I();var vE=An(),Wc=t=>{let e=O(),n="";for(let r in t)e.__svgCache[r]||(e.__svgCache[r]=!0,n+=t[r]);return n},tM=t=>{let e=t&&(t.default||t);if(!v(e))return vE&&console.warn("parseRootAttributes:",e,"is not a string"),{};let n=e.match(/<svg\s+(.*?)>/);if(!n||!n[1])return{};let o=n[1].match(/(\S+)=["']?((?:.(?!["']?\s+(?:\S+)=|\s*\/?[>"']))+.)["']?/gm);return o?o.reduce((s,i)=>{let[a,c]=i.split("=");return s[a]=c.replace(/['"]/g,""),s},{}):{}},eM=(t,e)=>{let n=[];if(t.replace(/id="([^"]*)"/g,(o,s)=>(n.push(s),o)),!n.length)return t;let r=t;for(let o of n){let s=o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),i=`${e}-${o}`;r=r.replace(new RegExp(`id="${s}"`,"g"),`id="${i}"`).replace(new RegExp(`url\\(#${s}\\)`,"g"),`url(#${i})`).replace(new RegExp(`xlink:href="#${s}"`,"g"),`xlink:href="#${i}"`).replace(new RegExp(`href="#${s}"`,"g"),`href="#${i}"`)}return r},kE=new Set,qc=(t,e)=>{let n=e&&e.default?e.default:e;if(!v(n))return vE&&!kE.has(t)&&(kE.add(t),console.warn("convertSvgToSymbol:",t,"is not a string")),"";e=n;let r=e.match(/^<symbol\b[^>]*\bid="([^"]*)"/);if(r){let u=r[1];return u===t?e:e.replace(`id="${u}"`,`id="${t}"`)}let o=tM(e),{width:s,height:i}=o,a=o.viewBox||`0 0 ${s||24} ${i||24}`,f=eM(e,t).replace("<svg",`<symbol id="${t}" xmlns="http://www.w3.org/2000/svg" viewBox="${a}"`);return f=f.replace(/^<symbol\b[^>]*>/,u=>u.replace(/\s(width|height)="[^"]*"/g,"")),f=f.replace("</svg","</symbol"),f=oM(f),f},nM="line|circle|ellipse|rect|polyline|polygon|path|stop|use|image",rM=new RegExp(`<(${nM})\\b([^>]*?)\\s*/>`,"g"),oM=t=>t.replace(rM,"<$1$2></$1>");var Ys={};F(Ys,{STANDARD_SCHEME_QUERIES:()=>Ed,__resetSkinWarnings:()=>l_,appendSVGSprite:()=>sl,appendSvgIconsSprite:()=>xo,applyDocument:()=>ol,applyHeadings:()=>Td,applyReset:()=>il,applySkins:()=>al,applySpacingSequence:()=>Gc,applyTimingSequence:()=>rl,applyTypographySequence:()=>tl,buildSkinVarStyles:()=>ko,checkIfBoxSize:()=>Kc,getColor:()=>at,getFontFamily:()=>Jc,getFontSizeByKey:()=>el,getMediaColor:()=>zt,getMediaTheme:()=>Ve,getSafeInk:()=>Ad,getSafeInkInfo:()=>Jb,getShadow:()=>Xc,getShapeByKey:()=>nl,getSpacingBasedOnRatio:()=>Ue,getSpacingByKey:()=>Ot,getTheme:()=>r_,getTimingByKey:()=>de,getTimingFunction:()=>Ce,isPlainColor:()=>wr,quietColorProbe:()=>bo,resolveBorderValue:()=>Ae,resolveColorRgb:()=>_o,resolveShadowValue:()=>wo,runThroughMedia:()=>Cd,schemeGuardSelector:()=>xr,schemeMediaQuery:()=>Sr,setAdaptiveSchemeVar:()=>kr,setColor:()=>_r,setFont:()=>Qc,setFontFamily:()=>Ks,setGradient:()=>Hs,setMediaTheme:()=>qs,setSVG:()=>Gs,setShadow:()=>vr,setSvgIcon:()=>So,setTheme:()=>Zc,splitSpacedValue:()=>Yc});I();var Ed={light:"(prefers-color-scheme: light)",dark:"(prefers-color-scheme: dark)"},Sr=(t,e)=>{let n=e.media&&e.media[t]||Ed[t];return n?"@media "+(n==="print"?`${n}`:`screen and ${n}`):null},xr=t=>{let e=t.scopeSelector||":root";return`${e===":root"?":root:not([data-theme])":`:root:not([data-theme]) ${e}:not([data-theme])`} &`},Be=new Set,TE=new Set(["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","green","greenyellow","grey","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"]),sM=/^(?:#[0-9a-f]{3,8}$|(?:rgba?|hsla?|hwb|lab|lch|oklab|oklch|color|color-mix)\()/i,iM=/gradient\(|url\(|image-set\(|var\(/i,aM=new Set(["transparent","currentColor","currentcolor"]),wr=t=>{if(!v(t))return!1;let e=t.trim();return iM.test(e)?!1:sM.test(e)?!0:TE.has(e)||aM.has(e)},vd=new Set,EE=t=>{if(!t)return!1;let{color:e,gradient:n}=t;return!!(E(e)&&Object.keys(e).length||E(n)&&Object.keys(n).length)},AE=new Set,Zb=0,bo=t=>{Zb++;try{return t()}finally{Zb--}},cM=(t,e)=>{if(!v(t)||t.indexOf(" ")===-1)return null;let n=t.replace(/\s+/g,""),r=Zt(n);if(!r||r.passthrough||r.cssVar)return null;let{color:o,gradient:s}=e;return!o[r.name]&&!s[r.name]?null:n},Qb=(t,e,n)=>{let r=cM(t,n);if(r){if(!AE.has(t)){AE.add(t);let i=n&&n.name?` (design system \`${n.name}\`)`:"";console.warn(`[scratch] color token \`${t}\` has a space before its alpha/tone modifier${i} \u2014 did you mean \`${r}\`? The space form never resolves, so the atomic class it mints carries no CSS value and paints invisibly. Dropped rather than shipped invisible.`)}return}let o=Zt(t);if(o&&o.name&&!o.passthrough&&!o.cssVar&&(o.alpha!==void 0||o.tone!==void 0)&&EE(n)&&!n.color[o.name]&&!n.gradient[o.name]){if(!Zb&&!vd.has(t)){vd.add(t);let i=n&&n.name?` (design system \`${n.name}\`)`:"";console.warn(`[scratch] color token \`${t}\` does not resolve${i} \u2014 \`${o.name}\` is not in the palette. Dropped rather than emitted as a raw value, which is invalid CSS the browser discards silently. Define it in designSystem/color.js or use a palette token.`)}return}let s=v(e)?e.toLowerCase():"";if(!TE.has(s)||!EE(n))return t;if(!vd.has(s)){vd.add(s);let i=n&&n.name?` (design system \`${n.name}\`)`:"";console.warn(`[scratch] color \`${t}\` is a CSS named colour that is not in the palette${i}. Dropped rather than emitted as a raw browser colour, which renders theme-blind and can be unreadable ("looks designed", so it ships unnoticed). Define it in designSystem/color.js or use a palette token.`)}},OE=(t,e,n)=>{let r=e!==void 0?e:1;if(!n)return`rgb(from ${t} r g b / ${r})`;if(n.charCodeAt(0)===43||n.charCodeAt(0)===45){let s=parseFloat(n),i=s<0?"-":"+",a=Math.abs(s);return`rgb(from ${t} calc(r ${i} ${a}) calc(g ${i} ${a}) calc(b ${i} ${a}) / ${r})`}return`hsl(from ${t} h s ${n}% / ${r})`},at=(t,e,n)=>{let r=n||O();if(!v(t)){r.verbose&&console.warn(t,"- type for color is not valid");return}if(kt(t))return`var(${t})`;e&&t[e]&&(t=t[e]);let o,s,i;if(D(t))[o,s,i]=t;else{let u=Zt(t);if(!u){let{color:d,gradient:p}=r,g=p[t]||d[t];return g?(e&&g[e]&&(g=g[e]),r.useVariable?`var(${g.var})`:g.value):Qb(t,t,r)}if(u.passthrough)return u.passthrough;if(u.cssVar)return`var(${u.cssVar})`;o=u.name,s=u.alpha,i=u.tone}let{color:a,gradient:c}=r,l=a[o]||c[o];if(!l)return Qb(t,o,r);if(e)if(l[e]!==void 0)l=l[e];else if(D(l)){let u=e.charCodeAt(0)===64?e.slice(1):e;u==="dark"?l=l[1]!==void 0?l[1]:l[0]:(u!=="light"&&r.verbose&&console.warn(t," - array-form color tokens only support light/dark; falling back to the light slot for scheme",e),l=l[0])}else r.verbose&&console.warn(t," - does not have ",e);if(v(l)){if(Be.has(o))return l;Be.add(o);try{return at(l,null,n)}finally{Be.delete(o)}}let f=l.rgb;if(!f){let u=r.useVariable?`var(${l.var})`:l.value;return(s||i)&&u?OE(u,s,i):u}return i&&!l[i]&&(f=yn(f,i),l[i]={rgb:f,var:`${l.var}-${i}`}),l[i]&&(f=l[i].rgb),s?`rgba(${f}, ${s})`:i?`rgba(${f}, ${l.alpha!==void 0?l.alpha:1})`:r.useVariable?`var(${l.var})`:l.value!==void 0?l.value:`rgb(${f})`},CE=t=>{let e=Fe(t);return!e||e.length<3||e[0]===0&&e[1]===0&&e[2]===0&&e[3]===0&&t.toLowerCase()!=="transparent"?null:{rgb:[e[0],e[1],e[2]],alpha:e[3]!==void 0?e[3]:1}},lM=(t,e)=>{if(!e)return t;let n=t.rgb;if(e.tone){let o=yn(n,e.tone);n=v(o)?o.split(",").map(s=>parseFloat(s.trim())):o}let r=e.alpha!==void 0?parseFloat(e.alpha):t.alpha;return{rgb:n,alpha:r}},_o=(t,e,n)=>{let r=e||O();if(!v(t))return null;let o=Zt(t);if(o){if(o.passthrough){let d=Fe(o.passthrough);return d&&d.length>=3?{rgb:[d[0],d[1],d[2]],alpha:d[3]!==void 0?d[3]:1}:null}if(o.cssVar)return null}let s=o?o.name:t,{color:i,gradient:a}=r,c=i[s]||a[s];if(!c)return CE(t);if(v(c)){let d;if(Be.has(s))d=CE(c);else{Be.add(s);try{d=_o(c,r,n)}finally{Be.delete(s)}}return d?lM(d,o):null}if(c.rgb===void 0&&E(c)){let d=`@${n||"light"}`;c=c[d]!==void 0?c[d]:c["@light"]}if(!c||c.rgb===void 0)return null;let l=c.rgb;o&&o.tone&&(l=yn(l,o.tone));let f=v(l)?l.split(",").map(d=>parseFloat(d.trim())):l,u=o&&o.alpha!==void 0?parseFloat(o.alpha):c.alpha!==void 0?c.alpha:1;return{rgb:f,alpha:u}},RE=t=>E(t)&&t.value!==void 0&&(t.rgb!==void 0||t.var!==void 0),PE=t=>{if(!E(t)||t.value!==void 0)return null;let e=[];for(let n in t)if(n!=="var"){if(n.charCodeAt(0)!==64||!RE(t[n]))return null;e.push(n.slice(1))}return e.length?e:null},fM=t=>v(t&&t.var)&&PE(t)!==null,uM=(t,e,n,r,o)=>{let s=PE(e);if(!s)return;if(v(e.var)){let c=`var(${e.var})`;return n||r?OE(c,n,r):c}if(s.length!==2||!s.includes("light")||!s.includes("dark"))return;let i=at(t,"@light",o),a=at(t,"@dark",o);if(!(!wr(i)||!wr(a)))return i===a?i:`light-dark(${i}, ${a})`},zt=(t,e,n)=>{let r=n||O();if(e||(e=r.globalTheme==="auto"?null:r.globalTheme),!v(t)){r.verbose&&console.warn(t,"- type for color is not valid");return}if(kt(t))return`var(${t})`;let o,s,i;if(D(t))o=t[0];else{let u=Zt(t);if(u){if(u.passthrough)return u.passthrough;if(u.cssVar)return`var(${u.cssVar})`;o=u.name,s=u.alpha,i=u.tone}else o=t}let{color:a,gradient:c}=r,l=a[o]||c[o],f=E(l);if(f&&l.value)return at(t,`@${e}`,n);if(f){if(r.useVariable&&l.var)return s||i?at(t,null,n):`var(${l.var})`;if(e){if(!r.useVariable&&a[o]===l){let u=uM(t,l,s,i,n);if(u!==void 0)return u}return at(t,`@${e}`,n)}else{let u={},d=xr(r);for(let p in l){if(p.charCodeAt(0)!==64)continue;let g=p.slice(1),h=at(t,p,n);if(h!==void 0&&(u[`[data-theme="${g}"] &`]=h,g==="light"||g==="dark")){let m=Sr(g,r);if(!m)continue;u[m]={[d]:h}}}return u}}else return Qb(t,o,r)},kr=(t,e,n,r)=>{let s=`--${r.varPrefix?r.varPrefix+"-":""}${e}-${n}`,i,a={};for(let c in t){if(c.charCodeAt(0)!==64)continue;let l=c.slice(1),f=t[c],u=f&&(f.value||f);!u||typeof u!="string"||(a[l]=u,(l==="light"||i===void 0)&&(i=u))}if(i!==void 0){r.cssVars[s]=i,r.cssMediaVars||(r.cssMediaVars={});for(let c in a){let l=`[data-theme="${c}"]`;if(r.cssMediaVars[l]||(r.cssMediaVars[l]={}),r.cssMediaVars[l][s]=a[c],c==="light"||c==="dark"){let f=`@media (prefers-color-scheme: ${c})`;r.cssMediaVars[f]||(r.cssMediaVars[f]={}),r.cssMediaVars[f][s]=a[c]}}return t.var=s,s}},_r=(t,e,n)=>{let r=O();if(RE(t))return r.useVariable&&t.var&&(r.cssVars[t.var]=t.value),t;if(!r.useVariable&&fM(t))return t;if(v(t)&&kt(t)){let h=t.slice(2),m=h.trim().indexOf(" ")!==-1;if(t=m?h:at(h),m||!(t.includes("rgb")||t.includes("var")||t.includes("#"))){let y=h.trim().split(/\s+/),S=r.color[y[0]];if(S&&!S.value&&!S.rgb&&(v(S)||D(S)||E(S))&&!Be.has(y[0])){Be.add(y[0]);try{r.color[y[0]]=_r(S,y[0])}finally{Be.delete(y[0])}S=r.color[y[0]]}if(S&&S.value){let b=S.rgb,x=y[1]!==void 0?y[1]:"1",_=y[2];_&&(b=yn(b,_)),t=`rgba(${b}, ${x})`}else{let b=y[2],x=y[1]!==void 0?y[1]:"1";if(b)try{let _=Fe(y[0]);_&&_.length>=3?t=`rgba(${yn(_.slice(0,3).join(", "),b)}, ${x})`:t=y[0]}catch{t=y[0]}else t=y[0]}}}if(D(t)&&(t={"@light":t[0],"@dark":t[1]!==void 0?t[1]:t[0]}),E(t)){let h={};for(let m in t)m!=="var"&&(h[m]=_r(t[m],e,m.slice(0,1)==="@"?m.slice(1):m));return r.useVariable&&kr(h,"color",e,r),h}let s=`--${r.varPrefix?r.varPrefix+"-":""}color-${e}`+(n?`-${n}`:""),i=t.value||t;if(v(i)&&!i.includes("(")&&!i.startsWith("#")){let h=Zt(i);if(h&&h.name&&!h.passthrough&&!h.cssVar){let m=r.color[h.name];if(m&&!m.value&&!m.rgb&&(v(m)||D(m)||E(m))&&!Be.has(h.name)){Be.add(h.name);try{r.color[h.name]=_r(m,h.name)}finally{Be.delete(h.name)}}let y=r.color[h.name];if(y&&y.rgb){let S=y.rgb;h.tone&&(S=yn(S,h.tone));let b=h.alpha!==void 0?parseFloat(h.alpha):y.alpha!==void 0?y.alpha:1;i=`rgba(${S}, ${b})`}}}let a=Fe(i),[c,l,f,u=1]=a,d=parseFloat(u.toFixed(2)),p=`${c}, ${l}, ${f}`,g=`rgba(${p}, ${d})`;return r.useVariable&&(r.cssVars[s]=g),{var:s,rgb:p,alpha:d,value:g}},Hs=(t,e,n)=>{let r=O();if(E(t)&&t.value!==void 0&&t.var!==void 0)return r.useVariable&&(r.cssVars[t.var]=t.value),t;if(v(t)&&kt(t)&&(t=at(t.slice(2))),D(t)&&(t={"@light":t[0],"@dark":t[1]!==void 0?t[1]:t[0]}),E(t)){let i={};for(let a in t)a!=="var"&&(i[a]=Hs(t[a],e,a.slice(0,1)==="@"?a.slice(1):a));return r.useVariable&&kr(i,"gradient",e,r),i}let s=`--${r.varPrefix?r.varPrefix+"-":""}gradient-${e}`+(n?`-${n}`:"");return r.useVariable&&(r.cssVars[s]=t.value||t),{var:s,value:t.value||t}};I();var Ad=(t,e,n={},r)=>{let o=r||O(),{min:s=4.5,large:i=!1,scheme:a,meta:c=!1,maxIterations:l=15}=n,f=i?3:s,u=a||(o.globalTheme&&o.globalTheme!=="auto"?o.globalTheme:"light"),d=v(e)?e:String(e),p=Zt(t),g=p&&!p.passthrough&&!p.cssVar?p.name:null,h=(U,V)=>c?{value:U,...V}:U;if(g){let U=o.color[`${g}Safe`];if(U){let V=`${d}@${u}`,rt=U[V]!==void 0?U[V]:U[d];if(rt!==void 0){let Ft=rt&&rt.rgb!==void 0?o.useVariable&&rt.var?`var(${rt.var})`:rt.value:at(rt,null,o);return h(Ft,{ratio:null,deviation:0,derived:!1,overridden:!0})}}}let m=at(t,u?`@${u}`:null,o),y=_o(t,o,u),S=_o(e,o,u);if(!y||!S)return o.verbose&&console.warn("getSafeInk: could not resolve",t,e,"\u2014 returning hue unchanged"),h(m,{ratio:null,deviation:0,derived:!1,overridden:!1,unresolved:!0});let b=ho(S.rgb,S.alpha),x=ho(y.rgb,y.alpha,b),_=Ns(x,b);if(_>=f-.02)return h(m,{ratio:_,deviation:0,derived:!1,overridden:!1});let[w,k,A]=Oc(y.rgb),[,T,M]=Rc([w,k,A]),$=uo(b)>.5,R=$?w:1-w,j=U=>{let V=$?w-U:w+U,rt=Math.max(0,Math.min(1,V));return{rgb:Pc(rt,T,M),L:rt}},et=U=>{let{rgb:V}=j(U),rt=ho(V.map(Ft=>Math.round(Ft)),y.alpha,b);return Ns(rt,b)},tt=0,it=R,St=et(it)>=f;if(St)for(let U=0;U<l;U++){let V=(tt+it)/2;et(V)>=f?it=V:tt=V}else tt=it;let{rgb:Pt,L:bt}=j(it),Mt=Pt.map(U=>Math.round(U)),z=et(it),B=y.alpha<1?`rgba(${Mt.join(", ")}, ${y.alpha})`:`rgb(${Mt.join(", ")})`,nt=Math.abs(bt-w)*100;return h(B,{rgb:Mt,ratio:z,startRatio:_,deviation:nt,derived:!0,overridden:!1,reachable:St})},Jb=(t,e,n={},r)=>Ad(t,e,{...n,meta:!0},r);I();I();var dM=t=>{let n=O().spacing||{},r=parseFloat(t.spacingRatio),o={...n,ratio:Number.isFinite(r)?r:n.ratio,sequence:{},scales:{}};return ue(o),o},pM=t=>{for(let e in t){let n=t[e];if(!(e.slice(0,1)==="@"))continue;let{type:o,base:s,ratio:i,range:a,subSequence:c,h1Matches:l,unit:f}=t;xt(n,{type:o,base:s,ratio:i,range:a,subSequence:c,h1Matches:l,unit:f,sequence:{},scales:{},templates:{},vars:{}}),ue(n),yr(t,e)}},Kc=t=>{let e=t.toLowerCase(),n=e.includes("width")||e.includes("height"),r=e.includes("border")||e.includes("outline");return n&&!r},Gc=()=>{let t=O(),{spacing:e}=t;ue(e),$n(e),pM(e)},hM=t=>{let e=O(),{spacing:n}=e;return!t||!t.sequence?n:Object.keys(t.sequence).length>0?t:ue(t)},Ot=(t,e="padding",n,r)=>{let o=hM(n);if(v(t)){if(!r&&/^(?:env|var)\(/.test(t.trim()))return{[e]:t};if(!r&&t.includes("(")){let i=In(t);r=i[0],t=i[1]}}let s=r?[t]:v(t)&&t.includes("(")?ht(t):fo(t);if(D(s)){if(s.length>1){let i="";e==="borderWidth"&&(e="border",i="Width");let a={2:["Block","Inline"],3:["BlockStart","Inline","BlockEnd"],4:["BlockStart","InlineEnd","BlockEnd","InlineStart"]},c=(l,f)=>_n(s[f],e+l+i,o,r);return a[s.length].map((l,f)=>c(l,f))}return _n(t,e,o,r)}},Ue=(t,e,n,r)=>{let o=O(),{spacing:s}=o,i=n||t[e];if(!r&&v(i)&&/^(?:env|var)\(/.test(i.trim()))return{[e]:i};if(!r&&v(i)&&i.includes("(")){let a=In(i);r=a[0],i=a[1]}if(t.spacingRatio){let a=dM(t);return Ot(i,e,a,r)}return Ot(i,e,s,r)},Yc=t=>{let e=n=>{let r=["+","-","*","/"].includes(n),o=as.some(i=>t.includes(i));return r||o?n:n.length<3&&/[A-Z]/.test(n)?n+"_default":n};return t.split(",").map(n=>n.trim()).map(e).join(",").split(" ").map(e).join(" ")};I();var wo=(t,e,n)=>!v(t)||ke.test(t)?t:en(t).map(r=>(r=r.trim(),r.split(/\s+/).map(o=>{if(o=o.trim(),!o)return"";if(o.startsWith("--"))return`var(${o})`;let s=bo(()=>at(o,e));if(tn(s))return s;if(/^\d/.test(o)||o==="0"||o.includes("px")||o.slice(-2)==="em"||o==="inset"||o==="none"||po.has(o.toLowerCase()))return o;n&&n(o);let i=Ot(o,"shadow");return i&&i.shadow?i.shadow:o}).join(" "))).join(", "),vr=(t,e,n,r)=>{let o=O();if(E(t)&&t.value!==void 0&&t.var!==void 0)return o.useVariable&&(o.cssVars[t.var]=t.value),t;if(D(t)){let a={"@light":vr(t[0],e,"light"),"@dark":vr(t[1],e,"dark")};return o.useVariable&&kr(a,"shadow",e,o),a}if(E(t)){let a={};for(let c in t)a[c]=vr(t[c],e,c.startsWith("@")?c.slice(1):c);return o.useVariable&&kr(a,"shadow",e,o),a}v(t)&&!ke.test(t)&&(t=wo(t));let i=`--${o.varPrefix?o.varPrefix+"-":""}shadow-${e}`+(n?`-${n}`:"");return o.useVariable&&(o.cssVars[i]=t),{var:i,value:t}},Xc=(t,e)=>{let n=O();if(e||(e=n.globalTheme==="auto"?null:n.globalTheme),!v(t)){n.verbose&&console.warn(t,"- type for color is not valid");return}if(kt(t))return`var(${t})`;let[r]=D(t)?t:t.split(" "),s=n.shadow[r],i=E(s);if(!s)return n.verbose&&console.warn("Can't find color ",r),t;if(i&&!s.value&&n.useVariable&&s.var)return`var(${s.var})`;if(e){let a=s["@"+e]||s[e];if(a)return a.value!==void 0?a.value:a;n.verbose&&console.warn(t," - does not have ",e)}if(i&&s.value)return s.value;if(i){let a={},c=xr(n);for(let l in s){if(l.charCodeAt(0)!==64)continue;let f=l.slice(1),u=s[l],d=u&&(u.value!==void 0?u.value:u);if(d!==void 0&&(a[`[data-theme="${f}"] &`]=d,f==="light"||f==="dark")){let p=Sr(f,n);if(!p)continue;a[p]={[c]:d}}}return a}return n.verbose&&console.warn("Can't find color",t),t};var gM=new Set(["none","hidden","dotted","dashed","solid","double","groove","ridge","inset","outset","initial"]),mM=t=>gM.has(t),Ae=(t,e,n)=>{if(t==null)return;let r=t+"";if(ke.test(r))return r;let o=r.trim();return o==="none"||o==="0"||o==="initial"||o==="inherit"||o==="unset"?r:r.split(/\s+/).map(s=>{if(s=s.trim(),!s)return"";if(kt(s))return`var(${s})`;if(mM(s)||/^\d/.test(s)||s==="0")return s;let i=bo(()=>at(s,e));if(tn(i))return i;if(po.has(s.toLowerCase()))return s;n&&n(s);let a=Ot(s,"border");return a&&a.border?a.border:s}).join(" ")};I();var yM=new Set(["black","white","red","green","blue","yellow","orange","purple","pink","brown","gray","grey","cyan","magenta","lime","olive","navy","teal","aqua","maroon","silver","fuchsia","transparent","currentColor","currentcolor","inherit","initial","unset","none","aliceblue","antiquewhite","aquamarine","azure","beige","bisque","blanchedalmond","blueviolet","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","gainsboro","ghostwhite","gold","goldenrod","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","limegreen","linen","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","oldlace","olivedrab","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","plum","powderblue","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","thistle","tomato","turquoise","violet","wheat","whitesmoke","yellowgreen","rebeccapurple"]),LE=["color","Color","background","Background","fill","Fill","stroke","Stroke"],ME=t=>{for(let e=0;e<LE.length;e++)if(t.includes(LE[e]))return!0;return!1},bM={boxShadow:wo,textShadow:wo,border:Ae,borderTop:Ae,borderRight:Ae,borderBottom:Ae,borderLeft:Ae,outline:Ae,columnRule:Ae},_M=t=>{if(!t)return!1;let e=Zt(t);return!e||!e.name||e.passthrough||e.cssVar?!1:e.alpha!==void 0||e.tone!==void 0},DE=new Set,wM=(t,e,n,r,o,s)=>{if(!Q())return;let i=`${t}::${e}::${n||""}::${r}`;DE.has(i)||(DE.add(i),console.warn(`[smbls/scratch] theme param "${e}" on "${t}"`+(n?` (${n})`:"")+` did not fully resolve: "${r}" -> "${o}" still contains the unresolved token "${s}". This is not valid CSS \u2014 the browser will drop the whole declaration. Register "${s}" as a design-system color token or fix the typo.`))},n_=(t,e,n,r)=>{let o=bM[e];if(!o)return at(n,r);let s=null,i=o(n,r,a=>{!s&&_M(a)&&(s=a)});return s&&wM(t,e,r,n,i,s),i},r_=(t,e)=>Ve(t,e),SM=t=>E(t)&&q(t.value),xM=t=>{for(let e in t){let n=t[e];if(v(n)&&n.startsWith("var(--"))return!0}return!1},Zc=(t,e)=>{let n=O();return SM(t)?!n.useVariable&&xM(t)?t:qs(t.value,e):qs(t,e)},NE=(t,e)=>{let n=new Set;for(let r of e){let o=r.slice(0,1);if(!(o==="@"||o==="."||o===":")&&ME(r))for(let s in t){if(n.has(s))continue;let i=t[s]?.[r];if(i===void 0)continue;let a=at(i,`@${s}`);a!==void 0&&v(a)&&/^[a-z][a-zA-Z]+$/.test(a)&&!yM.has(a)&&n.add(s)}}return n},FE=t=>t.startsWith("[data-theme=")||t.startsWith("@media"),Ws=(t,e)=>{for(let n in e){let r=e[n];E(r)?Ws(t[n]||(t[n]={}),r):t[n]=r}return t},IE=(t,e,n,r)=>{if(Ws(t,{[`[data-theme="${e}"] &`]:n}),e!=="light"&&e!=="dark")return;let o=Sr(e,r);o&&Ws(t,{[o]:{[xr(r)]:n}})},jE=(t,e,n,r)=>{let o={},s=Object.keys(e).filter(c=>e[c]!==n);if(!s.length)return n===void 0?void 0:(o[t]=n,o);let i=e.light!==void 0?e.light:n,a=e.dark!==void 0?e.dark:n;if(ME(t)&&wr(i)&&wr(a)){o[t]=i===a?i:`light-dark(${i}, ${a})`;for(let c in e)c==="light"||c==="dark"||IE(o,c,{[t]:e[c]},r)}else{n!==void 0&&(o[t]=n);for(let c of s)IE(o,c,{[t]:e[c]},r)}return o},kM=new Set(["backdropFilter","WebkitBackdropFilter"]),BE=new WeakSet,UE=(t,e,n,r)=>{let o=n.globalTheme!==void 0?n.globalTheme:"auto",s=o&&o!=="auto"?String(o).replace(/^'|'$/g,""):null,i=new Set(r?Object.keys(r):[]);for(let l in t)if(t[l])for(let f of Object.keys(t[l]))i.add(f);let a=NE(t,i),c={};for(let l of i){let f=l.slice(0,1);if(f==="@")continue;if(f==="."||f===":"){let m={};for(let b in t)q(t[b]?.[l])&&(m[b]=t[b][l]);let y=r&&q(r[l])?r[l]:void 0;if(!Object.keys(m).length&&!y)continue;let S=f==="."?l.slice(1):l.replace(/^:+/,"");c[l]=UE(m,`${e}-${S}`,n,y);continue}let u=r&&!q(r[l])?r[l]:void 0,d=new Set(Object.keys(t));u!==void 0&&(d.add("light"),d.add("dark"),s&&d.add(s));let p={},g;for(let m of d){if(a.has(m))continue;let y=t[m]?.[l];if((y===void 0||q(y))&&(y=u),y===void 0)continue;let S=n_(e,l,y,`@${m}`);S!==void 0&&(p[m]=S,(s&&m===s||!s&&(m==="light"||g===void 0))&&(g=S))}let h=jE(l,p,g,n);h&&(Ws(c,h),c[`.${l}`]=h)}return(c.background||c.color||c.backgroundColor)&&(c[".inversed"]={color:c.background||c.backgroundColor,background:c.color}),c},t_=(t,e,n,r)=>{let{cssVars:o}=n;n.cssMediaVars||(n.cssMediaVars={});let s=n.cssMediaVars,i=n.globalTheme!==void 0?n.globalTheme:"auto",a=i&&i!=="auto"?String(i).replace(/^'|'$/g,""):null,c={},l=new Set(r?Object.keys(r):[]);for(let u in t)if(t[u])for(let d of Object.keys(t[u]))l.add(d);let f=NE(t,l);for(let u of l){let d=u.slice(0,1),p=q(r?.[u])||Object.values(t).some(g=>q(g?.[u]));if(d==="."&&p){let g=u.slice(1),h={};for(let y in t)q(t[y]?.[u])&&(h[y]=t[y][u]);let m=q(r?.[u])?r[u]:void 0;c[u]=t_(h,`${e}-${g}`,n,m)}else if(d===":"&&p){let g=u.replace(/^:+/,""),h={};for(let y in t)q(t[y]?.[u])&&(h[y]=t[y][u]);let m=q(r?.[u])?r[u]:void 0;c[u]=t_(h,`${e}-${g}`,n,m)}else if(d!=="@"&&d!=="."&&d!==":"){let h=`--${n.varPrefix?n.varPrefix+"-":""}theme-${e}-${u}`,m=r&&!q(r[u])?r[u]:void 0,y=new Set(Object.keys(t));m!==void 0&&(y.add("light"),y.add("dark"),a&&y.add(a));let S,b=!1,x={};for(let _ of y){if(f.has(_))continue;let w=t[_]?.[u];if((w===void 0||q(w))&&(w=m),w===void 0)continue;let k=n_(e,u,w,`@${_}`);if(k===void 0)continue;b=!0,x[_]=k,(a&&_===a||!a&&(_==="light"||S===void 0))&&(S=k);let A=`[data-theme="${_}"]`;if(s[A]||(s[A]={}),s[A][h]=k,_==="dark"||_==="light"){let T=`@media (prefers-color-scheme: ${_})`;s[T]||(s[T]={}),s[T][h]=k}}if(S!==void 0&&(o[h]=S),!b)continue;if(kM.has(u)){let _=jE(u,x,S,n);_&&(Ws(c,_),c[`.${u}`]=_);continue}c[u]=`var(${h})`,c[`.${u}`]={[u]:c[u]}}}(c.background||c.color||c.backgroundColor)&&(c[".inversed"]={color:c.background||c.backgroundColor,background:c.color});for(let u in c)FE(u)&&q(c[u])&&BE.add(c[u]);return c},qs=(t,e,n,r)=>{let o=O(),{cssVars:s}=o,i={value:t},a=!n&&!r,c,l;if(q(t)){if(a&&o.useVariable){let f={},u={};for(let d in t)d.startsWith("@")?q(t[d])&&(f[d.slice(1)]=t[d]):u[d]=t[d];(Object.keys(f).length||Object.keys(u).length)&&(l=t_(f,e,o,u),Object.assign(i,l))}else if(a){let f={},u={};for(let d in t)d.startsWith("@")?q(t[d])&&(f[d.slice(1)]=t[d]):u[d]=t[d];c=UE(f,e,o,u),Object.assign(i,c)}for(let f in t){let u=f.slice(0,1),d=t[f];if(u==="@"||u===":"||u==="."){let p=u==="@"&&f;i[f]=qs(d,e,f,r||p)}else if(!a){let p=n_(e,f,d,r),g=[...new Set([r,n].filter(S=>S).map(S=>S.slice(1)))],h=g.length?"-"+g.join("-"):"",y=`--${o.varPrefix?o.varPrefix+"-":""}theme-${e}${h}-${f}`;o.useVariable?(o.useThemeSuffixedVars&&(s[y]=p),i[f]=`var(${y})`):i[f]=p,i[`.${f}`]={[f]:i[f]}}}if(c)for(let f in c){let u=f.slice(0,1);(u==="."||u===":")&&q(t[f])&&(i[f]=c[f])}if(l)for(let f in l){let u=f.slice(0,1);(u==="."||u===":")&&q(t[f])&&(i[f]=l[f])}!i[".inversed"]&&(i.background||i.color||i.backgroundColor)&&(i[".inversed"]={color:i.background||i.backgroundColor,background:i.color})}if(v(t)&&kt(t)){let u=o.theme[t.slice(2)];return Ve(u,r)}return i},e_=(t,e)=>{let n={};for(let r in t){let o=r.slice(0,1);if(q(t[r]))if(FE(r)&&(e||BE.has(t[r])))n[r]=Ws({},t[r]);else{if(o==="@")continue;o===":"?n[`&${r}`]=e_(t[r],e):o==="."&&(n[`&${r}`]=e_(t[r],e))}else n[r]=t[r]}return n},VE=(t,e)=>{let n=e.shift();return t[n]?VE(t[n],e):t},$E=(t,e)=>D(e)?VE(t,e):v(e)&&t[e]?t[e]:t;var Ve=(t,e)=>{let n=O();if(v(t)&&kt(t)&&(t=Ve(t.slice(2))),!t||!v(t)){n.verbose&&console.warn(`${t} - Theme is not a string`);return}let[r,...o]=D(t)?t:t.split(" "),s=n.theme[r];return s&&o.length?s=$E(s,o):s&&e&&(s=$E(s,e)),e_(s,!n.useVariable)};I();I();var Qc=(t,e)=>{let n=O(),r=`--font-${e}`;if(!t||D(t)&&!t[0])return;let o;if(t.isVariable){let s=je(t.url,n.files)||t.url;Fs(s)?o=js(s):o=mr(e,s,t.fontWeight,{fontStretch:t.fontStretch,fontDisplay:t.fontDisplay||"swap",unicodeRange:t.unicodeRange})}else if(t[0])o=go(e,t,n.files);else{let s=Array.isArray(t.url)?t.url.map(i=>je(i,n.files)||i):je(t.url,n.files)||t.url;o=mr(e,s,t.fontWeight,{fontStyle:t.fontStyle,fontDisplay:t.fontDisplay,fontStretch:t.fontStretch,unicodeRange:t.unicodeRange})}return{var:r,value:t,fontFace:o}},vM=new Set(["serif","sans-serif","monospace","cursive","fantasy","system-ui","ui-serif","ui-sans-serif","ui-monospace","ui-rounded","emoji","math","fangsong","inherit","initial","unset","revert","revert-layer"]),EM=t=>vM.has(t.toLowerCase())||/[\s,'"(]/.test(t.trim()),zE=new Set,Jc=(t,e)=>{let n=O(),{fontFamily:r}=n,o=e||r,s=Ln(o,t);if(s!==void 0||t==null||t===""||t==="default")return s;if(!v(t))return Ln(o);if(!EM(t))return An()&&!zE.has(t)&&(zE.add(t),console.warn(`[scratch] fontFamily \`${t}\` is not a font family key of this design system \u2014 rendering the default family. Name a key from designSystem fontFamily, a CSS generic family (\`monospace\`, \`serif\`, \u2026) or a quoted font name (\`"'${t}'"\`).`)),Ln(o)},Ks=(t,e)=>{let n=O(),{fontFamily:r,fontFamilyTypes:o}=n;if(E(t)&&v(t.value)&&v(t.var))return n.useVariable&&(n.cssVars[t.var]=t.value),t;let{value:s,type:i}=t;t.isDefault&&(!t.isSystemFallback||!r.default)&&(r.default=e),E(s)&&(s=fo(s));let c=`--${n.varPrefix?n.varPrefix+"-":""}font-family-${e}`,l=[...s,...String(o[i]??"").split(",")].map(f=>String(f).trim()).filter(f=>f&&!f.startsWith("--")).join(", ");return n.useVariable&&(n.cssVars[c]=l),{var:c,value:l,arr:s,type:i,isSystemFallback:!!t.isSystemFallback}};I();var Cd=t=>{let e=O(),{typography:n,media:r}=e;for(let o in t){let s=o.slice(0,1)==="@",i=t[o];if(!s)continue;let{mediaRegenerate:a}=t,c=o.slice(1),{type:l,base:f,ratio:u,range:d,subSequence:p,h1Matches:g,unit:h}=t;xt(i,{type:l,base:f,ratio:u,range:d,subSequence:p,h1Matches:g,unit:h});let m=new Set(["vw","vh","vmin","vmax","svw","svh","lvw","lvh","dvw","dvh"]),y=i.unit||h,S=!i.unit&&m.has(h)?"rem":y,b=r[c],x="@media "+(b==="print"?`${b}`:`screen and ${b}`);if(n.templates[x]={fontSize:i.base/n.browserDefault+S},!a){xt(i,{sequence:{},scales:{},vars:{}}),ue(i),yr(t,o);continue}xt(i,{sequence:{},scales:{},templates:{},vars:{}}),ue(i),yr(t,o)}},Td=t=>{let e=O();if(t.h1Matches){let n=t.unit,r=zc(t),{templates:o}=t;for(let s in r){let i=`h${parseInt(s)+1}`,a=o[i];o[i]={fontSize:e.useVariable?`var(${r[s]?.variable})`:`${r[s]?.scaling}${n}`,margin:a?a.margin:0,lineHeight:a?a.lineHeight:t.lineHeight,letterSpacing:a?a.letterSpacing:t.letterSpacing,fontWeight:a?a.fontWeight:900-s*100}}}},tl=()=>{let t=O(),{typography:e}=t;ue(e),Td(e),$n(e),Cd(e)},el=t=>{let e=O(),{typography:n}=e;return _n(t,"fontSize",n)};I();var nl=t=>{if(!v(t))return;let n=O().shape;if(n)return n[t]!==void 0?n[t]:n[t.toLowerCase()]};I();var rl=()=>{let t=O(),{timing:e}=t;ue(e),$n(e)},Ce=t=>{let e=O(),{timing:n}=e;return n[t]||n[lo(t)]||t},de=(t,e="timing")=>{let n=O(),{timing:r}=n;return _n(t,e,r)};I();var ol=()=>{let t=O(),{fontFamily:e,theme:n,typography:r}=t,o=t.document;return vn(o)?(or(t,"document",o),o=t.document={}):o||(o=t.document={}),xt(o,{theme:n.document,fontFamily:Ln(e),fontSize:r.base,lineHeight:r.lineHeight})};I();var i_={document:dt},HE=new WeakMap,WE=new WeakMap,AM=128,qE=1048576,o_=8192,a_=t=>t.nodeType===1&&t.localName==="symbol"&&t.getAttribute("id"),YE=t=>t.nodeType===8||t.nodeType===3&&!t.textContent.trim(),CM=(t,e)=>{let n=1,r=t.ownerDocument;if(r&&typeof r.createTreeWalker=="function"){let s=r.createTreeWalker(t,4294967295);for(;s.nextNode();)if(++n>e)return n;return n}let o=[t];for(;o.length;){let s=o.pop().childNodes||[];for(let i=0;i<s.length;i++){if(++n>e)return n;o.push(s[i])}}return n},s_=(t,e)=>{if(typeof t.importNode=="function")return t.importNode(e,!0);let n=e.cloneNode(!0);return typeof t.adoptNode=="function"?t.adoptNode(n):n},TM=(t,e)=>{if(typeof t.prepend=="function")return t.prepend(e);let n=t.firstChild!==void 0?t.firstChild:t.childNodes&&t.childNodes[0];return typeof t.insertBefore=="function"?t.insertBefore(e,n||null):t.appendChild(e)},Gs=(t,e)=>{let n=O();if(!t){n.verbose&&console.warn("setSVG: val is not defined",e);return}return n.useSvgSprite?qc(e,t):t},sl=(t,e=i_)=>{let n=O(),r=Object.keys(t).length?{}:n.svg;for(let o in t)r[o]=t[o];ZE(r,e)},So=(t,e)=>{let n=O();return n.useIconSprite&&!n.semanticIcons?.[e]?Gs(t,e):t},xo=(t,e=i_)=>{let n=O(),r=Object.keys(t).length?{}:n.icons;for(let o in t)r[o]=t[o];ZE(r,e)},XE=(t,e={isRoot:!0})=>{if(!t||!t.createElementNS)return;let n=t.createElementNS("http://www.w3.org/2000/svg","svg");return e.isRoot&&(n.setAttribute("aria-hidden","true"),n.setAttribute("width","0"),n.setAttribute("height","0"),n.setAttribute("style","position:absolute"),n.setAttribute("id","svgSprite")),n},OM=(t,e)=>{let n=typeof DOMParser<"u"?DOMParser:null;if(n){let r=`<svg xmlns="http://www.w3.org/2000/svg">${e}</svg>`,s=new n().parseFromString(r,"image/svg+xml");return s.querySelector("parsererror")?null:s.documentElement}return null},RM=(t,e,n)=>{let r=String(n),o=WE.get(e),s=o?.entries.get(r);if(s)return o.entries.delete(r),o.entries.set(r,s),s.root;let i=OM(t,r);if(i||(i=XE(t,{isRoot:!1}),i.innerHTML=r),r.length>qE)return i;let a=CM(i,o_);if(a>o_)return i;for(o||(o={entries:new Map,units:0,nodes:0},WE.set(e,o));o.entries.size>=AM||o.units+r.length>qE||o.nodes+a>o_;){let c=o.entries.keys().next().value,l=o.entries.get(c);o.units-=c.length,o.nodes-=l.nodes,o.entries.delete(c)}return o.entries.set(r,{root:i,nodes:a}),o.units+=r.length,o.nodes+=a,i},KE=t=>{let e=new Map;for(let n of t.children){let r=a_(n);if(!r)continue;let o=e.get(r)||[];o.push(n),e.set(r,o)}return e},PM=t=>t.replace(/["\\\u0000-\u001f\u007f]/g,e=>`\\${e.charCodeAt(0).toString(16)} `),GE=(t,e,n,r)=>{let o=0,s=e.childElementCount>8?KE(n):null,i=a=>{if(!s)try{return[...n.querySelectorAll(`symbol[id="${PM(a)}"]`)].filter(c=>c.parentNode===n)}catch{s=KE(n)}return s.get(a)};for(let a of e.childNodes){if(YE(a))continue;let c=a_(a);if(!c&&r){let u=o++,d=r.nodes[u];if(!d&&r.complete||d?.parentNode===n)continue;let p=s_(t,d||a);n.appendChild(p),r.nodes[u]=p;continue}let l=c&&i(c),f=l&&l[0];if(!f)f=s_(t,a),n.appendChild(f);else if(!f.isEqualNode(a)){let u=s_(t,a);n.replaceChild(u,f),f=u}if(l)for(let u=1;u<l.length;u++)l[u].remove();c&&s&&s.set(c,[f])}},ZE=(t,e=i_)=>{let n=O(),r=e.document||dt;if(!r||!r.documentElement)return n.verbose&&console.warn("To append SVG sprites it should be run in browser environment"),Wc(t);let o=r.querySelector("#svgSprite"),s="";for(let d in t)s+=t[d];let i=o||XE(r);if(!i||!i.nodeType)return;let a=d=>RM(r,i,d),c=a(s),l=HE.get(i);l||HE.set(i,l=new WeakMap);let f=l.get(n);if(f||l.set(n,f=new Map),[...c.childNodes].some(d=>!YE(d)&&!a_(d))){let d=[];for(let p in t)d.push(p);for(let p of d){let g=f.get(p);g||f.set(p,g={nodes:[],complete:!1}),GE(r,d.length===1?c:a(t[p]),i,g),g.complete=!0}}else{GE(r,c,i);for(let d in t)f.has(d)||f.set(d,{nodes:[],complete:!0})}o||TM(r.body,i);for(let d in t)n.__svgCache[d]=!0};I();var il=(t={})=>{let e=O(),n=e.typography||{},r=e.document||{},o=E(e.reset)?e.reset:e.reset={};if(o[":root"]){let c=o,l=n.templates||{};c.body={...e.useDocumentTheme?Ve("document"):{},...l.body},c.h1=l.h1,c.h2=l.h2,c.h3=l.h3,c.h4=l.h4,c.h5=l.h5,c.h6=l.h6}let{body:s,...i}=n.templates||{},a=e.useDocumentTheme?Ve("document"):{};if(o.html&&ee(o.html,a),n.unit)for(let c in i){if(c.slice(0,6)!=="@media")continue;let l=i[c];delete i[c],!(!l||!l.fontSize)&&(o[c]||(o[c]={}),o[c].html||(o[c].html={}),o[c].html.fontSize===void 0&&(o[c].html.fontSize=l.fontSize))}if(n.unit){let c=e.media||{};for(let l in n){if(l.charAt(0)!=="@")continue;let f=n[l];if(!f||f.unit===n.unit||!f.unit)continue;let u=f.unit,d=f.base||n.base,p=f.browserDefault||n.browserDefault,g=l.slice(1),h=c[g];if(!h)continue;let m="@media "+(h==="print"?h:"screen and "+h);o[m]||(o[m]={}),o[m].html||(o[m].html={}),o[m].html.fontSize=d/p+u}}return ft(xt(o,t),{html:{position:"absolute",width:"100%",height:"100%",top:"0",left:"0",margin:"0",WebkitFontSmoothing:"subpixel-antialiased",textSizeAdjust:"100%",WebkitTextSizeAdjust:"100%",...a,fontSize:n.unit?n.base/n.browserDefault+n.unit:n.browserDefault+"px",fontFamily:r.fontFamily,lineHeight:r.lineHeight},body:{boxSizing:"border-box",height:"100%",margin:0,fontFamily:r.fontFamily,fontSize:n.unit?"1"+e.unit.default:n.base/n.browserDefault+e.unit.default,...i,...s},a:{color:"currentColor"},button:{color:"inherit",font:"inherit",background:"transparent",border:"none",cursor:"pointer",appearance:"none",WebkitAppearance:"none"},"input, select, textarea":{color:"inherit",font:"inherit"},fieldset:{border:0,padding:0,margin:0}},Ee)};I();var LM=new Set(["fallback"]),c_=new Set,QE=(t,e)=>{c_.has(t)||(c_.add(t),Q()&&console.warn(e))},l_=()=>{c_.clear()},JE=t=>{for(let e in t)delete t[e];return t},al=()=>{let t=O(),e=E(t.cssSkinVars)?JE(t.cssSkinVars):t.cssSkinVars={},n=E(t.cssSkinFallback)?JE(t.cssSkinFallback):t.cssSkinFallback={},r=t.skins;if(!E(r))return e;let o=t.varPrefix?t.varPrefix+"-":"",s=t.color||{},i=t.cssVars||{},a=c=>v(c)&&Object.prototype.hasOwnProperty.call(s,c)?`var(--${o}color-${c})`:c;for(let c in r){let l=r[c];if(!E(l))continue;let f={};for(let u in l){if(LM.has(u))continue;let d=l[u];if(E(d))for(let p in d){let g=`--${o}theme-${u}-${p}`;t.useVariable!==!1&&!(g in i)&&QE(`${c}/${u}/${p}`,`[scratch] skin "${c}" rewrites theme "${u}" param "${p}", which the theme does not declare \u2014 no element reads ${g}, so the skin changes nothing there. Declare "${p}" on the "${u}" theme (its no-skin value).`),f[g]=a(d[p])}}e[c]=f,v(l.fallback)&&(n[c]=l.fallback)}for(let c in n){let l=n[c];e[l]||(QE(`${c}/fallback/${l}`,`[scratch] skin "${c}" falls back to "${l}", which is not a declared skin \u2014 the reduced-transparency fallback is skipped.`),delete n[c])}return e},tA=(t,e)=>{let n=`[data-skin="${t}"]`;return!e||e===":root"?`:root${n}, ${n}`:`${e}${n}, ${n} ${e}, ${e} ${n}`},ko=(t,e,n)=>{let r={};if(!E(t))return r;for(let s in t)r[tA(s,n)]=t[s];let o={};for(let s in e||{}){let i=t[e[s]];i&&(o[tA(s,n)]=i)}return Object.keys(o).length&&(r["@media (prefers-reduced-transparency: reduce)"]=o),r};I();var DM=new Set(["to","top","bottom","left","right","center","at","circle","ellipse","closest-side","farthest-side","closest-corner","farthest-corner"]),eA=/^-?[A-Z][0-9]?$/,wn=t=>Ae(t),Od=t=>{if(v(t))return ke.test(t)?t:t.split(/\s+/).map(e=>{if(e=e.trim(),!e)return"";if(kt(e))return`var(${e})`;if(/^\d/.test(e)||e.includes("px")||e==="0")return e;let n=at(e);return tn(n)?n:e}).join(" ")},Rd=(t,e)=>Xc(t,e),cl=(t,e)=>{if(v(t))return ke.test(t)?t:en(t).map(n=>(n=n.trim(),n?n.split(/\s+/).map(r=>{if(r=r.trim(),!r)return"";if(kt(r))return`var(${r})`;if(r==="inset"||r==="none")return r;let o=at(r);if(tn(o)){let i=zt(r,e);return E(i)?Object.values(i).filter(a=>a.includes(": "+e))[0]:i}if(/^\d/.test(r)||r==="0"||r.includes("px")||r.slice(-2)==="em")return r;let s=Ot(r,"shadow");return s&&s.shadow?s.shadow:r}).join(" "):"")).join(", ")},ll=(t,e)=>{let n=t.indexOf("(");if(n===-1)return t;let r=t.slice(0,n+1),o=t.slice(n+1,t.lastIndexOf(")")),s=")",a=en(o).map(c=>(c=c.trim(),c.split(/\s+/).map(f=>{if(!f||/^\d/.test(f)||f==="0"||DM.has(f)||f==="transparent"||ke.test(f))return f;let u=at(f);return tn(u)?u:f}).join(" ")));return r+a.join(", ")+s},Pd=(t,e)=>{if(!v(t))return;let n=O();return en(t).map(r=>{let o=r.trim();if(kt(o))return`var(${o})`;if(/^var\(/.test(o)||o.includes("url"))return o;if(n.gradient?.[o]){let s=zt(o,e);if(v(s))return s;if(E(s)){for(let i in s)if(v(s[i]))return s[i]}return o}return o.includes("gradient")?ll(o,e):o.includes("/")||o.startsWith("http")||o.includes(".")&&!Zt(o)?`url(${o})`:o}).join(", ")},Ld=t=>v(t)&&ht(t).map(e=>Ot(e,"gap").gap).join(" "),Dd=t=>{if(!v(t))return t;let e=O();return ht(t).map(n=>eA.test(n)?yo(n,e.spacing):n).join(" ")},f_=t=>{if(!v(t))return;let e=t.split(" ");return e.length?e.map(n=>kt(n)?`var(${n})`:n.length<3||n.includes("ms")?de(n).timing||n:Ce(n)?Ce(n):n).join(" "):t},fl=(t,e,n)=>{if(v(t))return t.split(",").map(r=>de(r).timing||r).join(",")},Id=t=>{if(!v(t))return;let e=t.split(",");if(e.length)return e.map(f_).join(",")};function Et(t,e,n={},r={}){let o=pt.call(this,e||n[t]);if(o==null)return;let s;if(v(o)){if(/^(?:env|var)\(/.test(o.trim()))return{[t]:o};if(o.includes("(")){let c=In(o);s=c[0],o=c[1]}let i=n.scaleBoxSize,a=Kc(t);!i&&a&&!r.ratio&&(o=Yc(o))}return r.ratio?Ue(n,t,o,s):Ot(o,t,void 0,s)}var N=(t,e=null,n)=>Et(t,e,n,{ratio:!0}),IM=(t,e,n)=>v(t)?ht(t).map(r=>eA.test(r)?Ue(e,n,r)[n]:r).join(" "):t,Mn=(t,e,n,r="borderRadius")=>{if(v(t))return{[r]:ht(t).map(o=>{let s=nl(o);return s!==void 0?IM(s,e,n):Ue(e,n,o)[n]}).join(" ")}};I();var Xs="__smblsThemeRootOwner",Zs=t=>{let e=t&&t.__prefersListener,n=t&&t.__prefersMq;if(e&&n)try{typeof n.removeEventListener=="function"?n.removeEventListener("change",e):typeof n.removeListener=="function"&&n.removeListener(e)}catch{try{n.removeListener(e)}catch{}}t&&(t.__prefersListener=null,t.__prefersMq=null)},nA=(t,e,n)=>{if(!(!t||!e)){Zs(t),t.__prefersListener=n,t.__prefersMq=e;try{e.addEventListener("change",n)}catch{e.addListener(n)}}},$M=(t,e)=>{let n=O(),{cssVars:r}=n,o=e.startsWith("--")?e:`--${e}`;return r[o]=t,t},pe=t=>t,MM=(t,e)=>{if(v(t)||Ie(t)){let n=O();if(n.cssVars&&e){let r=n.varPrefix?n.varPrefix+"-":"";n.cssVars[`--${r}size-${e}`]=t}}return t},$d={color:_r,gradient:Hs,font:Qc,fontFamily:Ks,fontfamily:Ks,theme:Zc,icons:So,semanticIcons:pe,semanticicons:pe,svg:Gs,svgData:pe,typography:pe,shadow:vr,spacing:pe,media:pe,grid:pe,class:pe,timing:pe,reset:pe,unit:pe,animation:pe,vars:$M,sizes:MM,shape:pe,skins:pe},NM=(t,e,n,r)=>{or(t,n,e);let o={};for(let s of r)t[s]===e&&(t[s]=o);return t.verbose&&console.warn("[scratch] design-system family",n,"resolved to a host object; parked it and allocated a plain bucket"),o},u_=(t,e,n)=>{let r=O(),o=Mc(t),s=o.toLowerCase(),i=r[o]||r[s]||r[t],a=vn(i)?NM(r,i,s,[o,s,t]):i,c=$d[o]||$d[s];if(c)try{let l=c(e,n);return a&&(a[n]=l),a}catch(l){r.verbose&&console.warn("Error setting",s,"value",e,n,l)}if(!c){let l=a||(r[s]={});return l[n]=e,l}r.verbose&&console.warn("Can not find",s,"method in scratch")},d_=(t,e)=>{let n=O(),r=t.toLowerCase();return vn(e)?(or(n,r,e),n.verbose&&console.warn("[scratch] ignoring host object passed as the",r,"design-system family"),n[r]||n[t]):e==null?(n.verbose&&console.warn("[scratch] skipping empty design-system family",r),n[r]||n[t]):(Object.keys(e).sort((s,i)=>{let a=E(e[s])||D(e[s])?1:0,c=E(e[i])||D(e[i])?1:0;return a-c}).forEach(s=>{try{return u_(r,e[s],s)}catch(i){n.verbose&&console.warn("Error setting",r,"value",e[s],s,i)}}),n[r]||n[t])},Md=(t,e)=>{let n=e||O();n.globalTheme=t;let o=is(n)||(typeof document<"u"?document:null),s=o&&o.defaultView||(typeof window<"u"?window:null);if(o){let a=n.themeRoot||o.documentElement,c=t&&t!=="auto";if(a[Xs]=n,c)Zs(n),a.setAttribute("data-theme",t),n.resolvedTheme=t,t==="dark"||t==="light"?a.style.colorScheme=t:a.style.colorScheme="light dark";else if(s&&s.matchMedia){let l=u=>{let d=u.matches?"dark":"light";a.setAttribute("data-theme",d),n.resolvedTheme=d},f=s.matchMedia("(prefers-color-scheme: dark)");l(f),a.style.colorScheme="light dark",nA(n,f,l)}else Zs(n),a.setAttribute("data-theme","light"),n.resolvedTheme="light",a.style.colorScheme="light"}let i=n.varPrefix?`--${n.varPrefix}-theme-`:"--theme-";for(let a in n.cssVars)a.startsWith(i)&&delete n.cssVars[a];for(let a in n.cssMediaVars)delete n.cssMediaVars[a];if(o&&n.cssVars){let a=n.scopeSelector||":root",c=o.styleSheets;for(let l=0;l<c.length;l++)try{let f=c[l].cssRules;for(let u=0;u<f.length;u++)if(f[u].selectorText===a){for(let d in n.cssVars)f[u].style.setProperty(d,n.cssVars[d]);return n}}catch{}}return n},FM={},vo=(t,e=FM)=>{let n=e.config||O(),{version:r,verbose:o,useVariable:s,useReset:i,useSvgSprite:a,useFontImport:c,useIconSprite:l,globalTheme:f,themeRoot:u,useDocumentTheme:d,useDefaultConfig:p,semanticIcons:g,hoverMedia:h,focusableRing:m,files:y,assets:S,...b}=t;e.newConfig&&(n=wd(e.newConfig)),kn(b.document)&&(n.__domDocument=b.document,delete b.document),kn(n.document)&&(n.__domDocument||(n.__domDocument=n.document),n.document={}),y!==void 0&&(n.files=y),S!==void 0&&(n.assets=S),o!==void 0&&(n.verbose=o),s!==void 0&&(n.useVariable=s),i!==void 0&&(n.useReset=i),c!==void 0&&(n.useFontImport=c),a!==void 0&&(n.useSvgSprite=a),l!==void 0&&(n.useIconSprite=l),d!==void 0&&(n.useDocumentTheme=d),f!==void 0&&(n.globalTheme=f),u!==void 0&&(n.themeRoot=u),t.useThemeSuffixedVars!==void 0&&(n.useThemeSuffixedVars=t.useThemeSuffixedVars),p!==void 0&&(n.useDefaultConfig=p),g!==void 0&&(n.semanticIcons=g),h!==void 0&&(n.hoverMedia=h),m!==void 0&&(n.focusableRing=m),n.verbose&&console.log(n);let _=is(n)||(typeof document<"u"?document:null),w=_&&_.defaultView||(typeof window<"u"?window:null),k=_&&(n.themeRoot||_.documentElement);if(k&&typeof k.setAttribute=="function")if(n.globalTheme&&n.globalTheme!=="auto")Zs(n),k.setAttribute("data-theme",n.globalTheme),n.resolvedTheme=n.globalTheme,k[Xs]=n,n.globalTheme==="dark"||n.globalTheme==="light"?k.style.colorScheme=n.globalTheme:k.style.colorScheme="light dark";else if(k[Xs]&&k[Xs]!==n&&k.hasAttribute("data-theme"))Zs(n),n.resolvedTheme=k.getAttribute("data-theme");else if(w&&w.matchMedia){let j=tt=>{let it=tt.matches?"dark":"light";k.setAttribute("data-theme",it),n.resolvedTheme=it},et=w.matchMedia("(prefers-color-scheme: dark)");j(et),k.style.colorScheme="light dark",k[Xs]=n,nA(n,et,j)}else Zs(n),k.setAttribute("data-theme","light"),n.resolvedTheme="light",k.style.colorScheme="light",k[Xs]=n;n.__svgCache||(n.__svgCache={}),zs(b);let A=Object.keys(b).filter(R=>!R.startsWith("__")),T=new Set(A);A.forEach(R=>{let j=R.toLowerCase();j!==R&&T.has(j)&&ft(b[j],b[R],Ee)});let M=new Set;if(A.forEach(R=>{let j=R.toLowerCase(),et=j!==R&&T.has(j)?j:R;M.has(et)||(M.add(et),d_(et,b[et]))}),n.varPrefix&&(n.typography&&(n.typography.varPrefix=n.varPrefix),n.spacing&&(n.spacing.varPrefix=n.varPrefix),n.timing&&(n.timing.varPrefix=n.varPrefix)),b.typography)try{tl()}catch(R){n.verbose&&console.warn("Error applying typography sequence",R)}if(b.spacing)try{Gc()}catch(R){n.verbose&&console.warn("Error applying spacing sequence",R)}if(b.timing)try{rl()}catch(R){n.verbose&&console.warn("Error applying timing sequence",R)}try{al()}catch(R){n.verbose&&console.warn("Error applying skins",R)}ol();let $=il();return $&&(n.reset=$),n};var H=(t,e)=>e.split(" ").map(n=>t+"-"+n),g_="top right bottom left",m_=g_+" block block-start block-end inline inline-start inline-end",he="start end",Fn="width style color",Nd=t=>H(t,m_),jM=(()=>{let t=H("border","width style color image");for(let e of m_.split(" "))t.push("border-"+e,...H("border-"+e,Fn));return t})(),rA=t=>[...H("border-"+t,Fn+" start end"),...H("border-"+t+"-start",Fn),...H("border-"+t+"-end",Fn)],yt={animation:H("animation","name duration timing-function delay iteration-count direction fill-mode play-state timeline range range-start range-end"),background:H("background","image position position-x position-y size repeat origin clip attachment color"),border:jM};for(let t of["width","style","color"])yt["border-"+t]=m_.split(" ").map(e=>"border-"+e+"-"+t);for(let t of g_.split(" "))yt["border-"+t]=H("border-"+t,Fn);yt["border-block"]=rA("block");yt["border-inline"]=rA("inline");Object.assign(yt,{"border-image":H("border-image","source slice width outset repeat"),"border-radius":"top-left top-right bottom-right bottom-left start-start start-end end-start end-end".split(" ").map(t=>"border-"+t+"-radius"),columns:H("column","width count"),"column-rule":H("column-rule",Fn),container:H("container","name type"),"contain-intrinsic-size":H("contain-intrinsic","width height"),flex:H("flex","grow shrink basis"),"flex-flow":H("flex","direction wrap"),font:[...H("font","style variant weight stretch size"),"line-height",...H("font","family size-adjust kerning feature-settings variation-settings optical-sizing")],gap:["row-gap","column-gap"],grid:H("grid","template template-rows template-columns template-areas auto-rows auto-columns auto-flow"),"grid-template":H("grid-template","rows columns areas"),"grid-area":H("grid","row column row-start row-end column-start column-end"),"grid-row":H("grid-row",he),"grid-column":H("grid-column",he),inset:[...g_.split(" "),...H("inset","block block-start block-end inline inline-start inline-end")],"inset-block":H("inset-block",he),"inset-inline":H("inset-inline",he),"list-style":H("list-style","type position image"),margin:Nd("margin"),"margin-block":H("margin-block",he),"margin-inline":H("margin-inline",he),mask:H("mask","image mode repeat position clip origin size composite"),offset:H("offset","position path distance rotate anchor"),outline:H("outline",Fn),overflow:H("overflow","x y"),"overscroll-behavior":H("overscroll-behavior","x y"),padding:Nd("padding"),"padding-block":H("padding-block",he),"padding-inline":H("padding-inline",he)});for(let t of["content","items","self"])yt["place-"+t]=["align-"+t,"justify-"+t];Object.assign(yt,{"scroll-margin":Nd("scroll-margin"),"scroll-padding":Nd("scroll-padding"),"text-decoration":H("text-decoration","line style color thickness"),"text-emphasis":H("text-emphasis","style color"),transition:H("transition","property duration timing-function delay behavior")});var BM="block-start block-end inline-start inline-end".split(" ");for(let t of BM)yt["border-"+t]=H("border-"+t,Fn);for(let t of["block","inline"])for(let e of Fn.split(" "))yt["border-"+t+"-"+e]=H("border-"+t,he.split(" ").map(n=>n+"-"+e).join(" "));Object.assign(yt,{"animation-range":H("animation-range",he),"background-position":H("background-position","x y"),"font-variant":H("font-variant","alternates caps east-asian emoji ligatures numeric position"),"font-synthesis":H("font-synthesis","weight style small-caps"),marker:H("marker","start mid end"),"position-try":H("position-try","order fallbacks"),"scroll-margin-block":H("scroll-margin-block",he),"scroll-margin-inline":H("scroll-margin-inline",he),"scroll-padding-block":H("scroll-padding-block",he),"scroll-padding-inline":H("scroll-padding-inline",he),"scroll-timeline":H("scroll-timeline","name axis"),"view-timeline":H("view-timeline","name axis inset"),"text-box":H("text-box","trim edge"),"text-wrap":H("text-wrap","mode style"),"white-space":["white-space-collapse","text-wrap-mode"]});yt.font.push("font-language-override");var Nn=t=>"corner-"+t+"-shape";yt["corner-shape"]=[..."top-left top-right bottom-right bottom-left start-start start-end end-start end-end".split(" "),..."top right bottom left block-start block-end inline-start inline-end".split(" ")].map(Nn);Object.assign(yt,{"corner-top-shape":["top-left","top-right"].map(Nn),"corner-right-shape":["top-right","bottom-right"].map(Nn),"corner-bottom-shape":["bottom-left","bottom-right"].map(Nn),"corner-left-shape":["top-left","bottom-left"].map(Nn),"corner-block-start-shape":["start-start","start-end"].map(Nn),"corner-block-end-shape":["end-start","end-end"].map(Nn),"corner-inline-start-shape":["start-start","end-start"].map(Nn),"corner-inline-end-shape":["start-end","end-end"].map(Nn)});for(let t in yt){let e=yt[t],n=new Set(e);for(let r=0;r<e.length;r++){let o=yt[e[r]];if(o)for(let s of o)n.has(s)||(n.add(s),e.push(s))}}var ze={};for(let t in yt)for(let e of yt[t])(ze[e]||(ze[e]=[])).push(t);var h_=new Map,oA=t=>{let e=h_.get(t);if(e!==void 0)return e;h_.set(t,0),e=0;let n=ze[t];if(n)for(let r=0;r<n.length;r++)e=Math.max(e,oA(n[r])+1);return h_.set(t,e),e};function Qs(t){if(typeof t!="string")return 0;let e=t.charCodeAt(0)===45&&t.charCodeAt(1)!==45?t.replace(/^-(webkit|moz|ms|o)-/,""):t;return Object.prototype.hasOwnProperty.call(ze,e)?oA(e):0}var UM=/^(?:margin|padding|inset|scroll-margin|scroll-padding)(?:-(?:block|inline))?$|^border(?:-(?:block|inline))?-(?:width|style|color)$|^(?:border-radius|corner(?:-[a-z]+)*-shape|gap|overflow|overscroll-behavior|place-(?:content|items|self)|background-position|contain-intrinsic-size)$/,VM=/^(?:border(?:-(?:top|right|bottom|left|block|inline)(?:-(?:start|end))?)?|outline|column-rule)$/,zM=new Set(["none","hidden","dotted","dashed","solid","double","groove","ridge","inset","outset","auto"]),HM=t=>{let e=[],n=0,r="";for(let o of String(t).replace(/\s*!important\s*$/,"").trim())o==="("?n++:o===")"&&n--,n===0&&/\s/.test(o)?(r&&e.push(r),r=""):r+=o;return r&&e.push(r),e};function ul(t,e,n){let r=yt[t];if(!r||r.indexOf(n)===-1)return!1;if(UM.test(t))return!0;if(!VM.test(t)||typeof e=="function"||e==null||n.indexOf("border-image")===0)return!1;let o=HM(e);return o.length>=3?!0:/-style$/.test(n)&&o.some(s=>zM.has(s.toLowerCase()))}var ei=new Map,mA=null,y_=null,WM=null;function hl(t){t.batchAtomicCss&&(y_=t.batchAtomicCss),t.compoundCssClass&&(WM=t.compoundCssClass)}var qM=new Set,iA=t=>!!(t&&t.documentElement&&typeof t.createElement=="function"&&t.head!==void 0);function v_(t){try{let e=O();e&&(e.__domDocument=t)}catch{}t&&qM.add(t)}function Eo(){try{let t=O();if(t){if(iA(t.__domDocument))return t.__domDocument;if(iA(t.document))return t.document}}catch{}return typeof document<"u"?document:null}var ge={atomic:0,variable:0,global:0,keyframes:0,duplicate:0,invalid:0,dropped:0};function zd(){return{...ge}}function E_(){for(let t in ge)ge[t]=0;Ud=!1}var Ud=!1,Bd=(t,e)=>`${t} ${e}${t===1?"":"s"}`;function KM(t){let e=Date.parse(t);if(!isFinite(e))return"";let n=Math.floor((Date.now()-e)/864e5);return n<1?" (today)":` (${Bd(n,"day")} ago)`}function GM(){try{let t=oN();if(!t.length)return-1;let e=0;for(let n=0;n<t.length;n++)e+=t[n].cssRules?t[n].cssRules.length:0;return e}catch{return-1}}function YM(t,e){if(Ud)return!1;Ud=!0;let n="n/a \u2014 running from src/ (unbuilt), so no dist is in play",r="this IS the source",o="@symbo.ls/css";return console.error(`[@symbo.ls/css] CSS EMIT FAILURE (${t}) \u2014 the engine emitted ${Bd(ge.variable,"variable rule")} and ${Bd(ge.atomic,"atomic rule")}, while the design system held ${Bd(e,"CSS variable")}.
|
|
44
|
+
src: ${i};`},yr=(t,e,n,r)=>`@font-face {${Lc(t,e,n,r)}
|
|
45
|
+
}`,mo=(t,e,n)=>Object.keys(e).map(o=>{let{url:s,fontWeight:i,fontStyle:a,fontDisplay:c,fontStretch:l,unicodeRange:f}=e[o],u=Array.isArray(s)?s.map(d=>je(d,n)||d):je(s,n)||s;return Lc(t,u,i,{fontStyle:a,fontDisplay:c,fontStretch:l,unicodeRange:f})}),wb=t=>Object.keys(t).map(n=>mo(n,t[n].value)),hd=(t,e,n)=>{if(e&&e.isVariable){let s=je(e.url,n)||e.url;return Fs(s)?js(s):yr(t,s,e.fontWeight,{fontStretch:e.fontStretch,fontDisplay:e.fontDisplay||"swap",unicodeRange:e.unicodeRange})}if(e[0])return mo(t,e,n).map(pd);let o=Array.isArray(e.url)?e.url.map(s=>je(s,n)||s):je(e.url,n)||e.url;return yr(t,o,e.fontWeight,{fontStyle:e.fontStyle,fontDisplay:e.fontDisplay,fontStretch:e.fontStretch,unicodeRange:e.unicodeRange})},Dc=(t,e)=>Object.keys(t).map(r=>hd(r,t[r].value,e));I();I();I();I();Kt();var Bs={};F(Bs,{animation:()=>Nb,breakpoints:()=>$b,class:()=>Vb,color:()=>Tb,devices:()=>Mb,document:()=>mE,font:()=>xb,fontFace:()=>Eb,fontFamily:()=>kb,fontFamilyTypes:()=>vb,gradient:()=>Ob,grid:()=>Ub,icons:()=>Lb,media:()=>Ab,reset:()=>yE,semanticIcons:()=>Db,sequence:()=>Dn,shadow:()=>Pb,shape:()=>Wb,sizes:()=>Hb,skins:()=>qb,spacing:()=>Cb,svg:()=>Fb,svgData:()=>jb,templates:()=>Bb,theme:()=>Rb,timing:()=>Ib,typography:()=>Ic,unit:()=>Sb,vars:()=>zb});var Dn={"minor-second":1.067,"major-second":1.125,"minor-third":1.2,"major-third":1.25,"perfect-fourth":1.333,"augmented-fourth":1.414,"perfect-fifth":1.5,"minor-sixth":1.6,phi:1.618,"major-sixth":1.667,"square-root-3":1.732,"minor-seventh":1.778,"major-seventh":1.875,octave:2,"square-root-5":2.23,"major-tenth":2.5,"major-eleventh":2.667,"major-twelfth":3,pi:3.14,"double-octave":4};var Sb={default:"em"};var z2={browserDefault:16,base:16,type:"font-size",ratio:Dn["minor-third"],range:[-3,12],h1Matches:6,lineHeight:1.5,subSequence:!0,mediaRegenerate:!1,unit:"em",templates:{},sequence:{},scales:{},vars:{}},Ic=z2;var xb={};var kb={},vb={"sans-serif":"Helvetica, Arial, sans-serif",serif:"Times New Roman, Georgia, serif",monospace:"Courier New, monospace"},Eb={};var Ab={tv:"(min-width: 2780px)",light:"(prefers-color-scheme: light)",dark:"(prefers-color-scheme: dark)",print:"print"};var H2={base:Ic.base,type:"spacing",ratio:Dn.phi,range:[-5,15],subSequence:!0,mediaRegenerate:!1,unit:"em",sequence:{},scales:{},vars:{}},Cb=H2;var Tb={},Ob={};var Rb={};var Pb={};var Lb={},Db={};var W2={default:150,base:150,type:"timing",ratio:Dn["perfect-fourth"],range:[-3,12],mediaRegenerate:!1,unit:"ms",sequence:{},scales:{},vars:{}},Ib=W2;var mE={};var $b={screenL:1920,screenM:1680,screenS:1440,tabletL:1366,tabletM:1280,tabletS:1024,mobileL:768,mobileM:560,mobileS:480,mobileXS:375},Mb={screenXXL:[2560,1440],screenXL:[2240,1260],screenL:[1920,1024],screenM:[1680,1024],screenS:[1440,720],tabletL:[1366,926],tabletM:[1280,768],tabletS:[1024,768],mobileL:[768,375],mobileM:[560,768],mobileS:[480,768],mobileXS:[375,768]};var Nb={};var Fb={},jb={};var Bb={};var q2={},Ub=q2;var Vb={};var yE={},zb={},Hb={},Wb={},qb={};var bd={},_d={},Ee=new Set,gd=Bs,md={},Mc=t=>t.replace(/_([a-z])/g,(e,n)=>n.toUpperCase());for(let t in gd){let e=t.toLowerCase();md[e]=gd[t];let n=Mc(e);n!==e&&(md[n]=gd[t]),e!==t&&(md[t]=gd[t])}var yo={verbose:!1,useVariable:!0,useReset:!0,globalTheme:"auto",cssVars:bd,cssMediaVars:_d,CSS_VARS:bd,CSS_MEDIA_VARS:_d,cssSkinVars:{},cssSkinFallback:{},_scratchConfig:!0,...md},Us=(t,e)=>{if(!t)return null;if(t.__globalThemeSignal)return It(e)&&t.__globalThemeSignal.set(e),t.__globalThemeSignal;let n=It(e)?e:t.globalTheme,r=zr(It(n)?n:"auto");return Object.defineProperty(t,"globalTheme",{get(){return r.get()},set(o){r.set(o)},enumerable:!0,configurable:!0}),Object.defineProperty(t,"__globalThemeSignal",{value:r,enumerable:!1,configurable:!0,writable:!0}),r},bE=t=>t?Us(t):null,Vs=(t,e)=>{if(!t)return null;if(t.__resolvedThemeSignal)return It(e)&&t.__resolvedThemeSignal.set(e),t.__resolvedThemeSignal;let n=It(e)?e:t.resolvedTheme,r=zr(It(n)?n:null);return Object.defineProperty(t,"resolvedTheme",{get(){return r.get()},set(o){r.set(o)},enumerable:!1,configurable:!0}),Object.defineProperty(t,"__resolvedThemeSignal",{value:r,enumerable:!1,configurable:!0,writable:!0}),r},_E=t=>t?Vs(t):null;Us(yo);Vs(yo);var yd=ut(yo),ve={active:"0",0:yo},wE=t=>(It(t)&&(ve.active=t),ve[t||ve.active]),$c=[],J=t=>{t&&t._scratchConfig&&$c.push(t)},X=()=>{$c.pop()},O=t=>$c.length?$c[$c.length-1]:ve[t||ve.active]||yo,wd=t=>{if(A(t))return ve.active="1",ve[1]=ft(t,ut(yd),Ee),zs(ve[1]),Us(ve[1]),Vs(ve[1]),t},K2=["useReset","useFontImport","useIconSprite","useSvgSprite","useDocumentTheme","useDefaultIcons","useDefaultConfig"],G2=["useVariable","globalTheme","verbose"],Y2=[["fontfamily","fontFamily","font_family"],["fontfamilytypes","fontFamilyTypes"],["semanticicons","semanticIcons"],["svgdata","svgData"]],zs=t=>{for(let e of Y2){let n;for(let r of e){let o=t[r];A(o)&&(n=n?ft(n,o,Ee):o)}if(n)for(let r of e)A(t[r])&&(t[r]=n)}},Nc=(t,e,{cleanBase:n=!1}={})=>{let r=n?null:O(),o=ut(!n&&r&&r._scratchConfig?r:yd);for(let i of K2)delete o[i];for(let i of G2)Object.prototype.hasOwnProperty.call(yd,i)?o[i]=yd[i]:delete o[i];let s=ft(e||{},o,Ee);return s.cssVars={},s.cssMediaVars={},s.CSS_VARS=s.cssVars,s.CSS_MEDIA_VARS=s.cssMediaVars,s.cssSkinVars={},s.cssSkinFallback={},s._scratchConfig=!0,zs(s),Us(s),Vs(s),t&&(ve[t]=s),s};var bn={"-6":"U","-5":"V","-4":"W","-3":"X","-2":"Y","-1":"Z",0:"A",1:"B",2:"C",3:"D",4:"E",5:"F",6:"G",7:"H",8:"I",9:"J",10:"K",11:"L",12:"M",13:"N",14:"O",15:"P",16:"Q",17:"R",18:"S",19:"T"},Gb=(t,e)=>{let{key:n,variable:r,value:o,scaling:s,index:i,scalingVariable:a}=t;e.sequence[n]={key:n,decimal:~~(o*100)/100,val:~~o,scaling:s,index:i,scalingVariable:a,variable:r},e.scales[n]=s;let c=SE.has(e.unit)?"rem":e.unit;e.vars[r]=s+c},In=t=>{if(!t.includes("("))return t;let e=t.trim(),n=e.indexOf("("),r=e.slice(0,n),o=0,s=-1;for(let i=n;i<e.length;i++){let a=e[i];if(a==="(")o++;else if(a===")"&&(o--,o===0)){s=i;break}}return s===-1||/\s/.test(r)||e.slice(s+1).trim()!==""?[void 0,t]:[r,e.slice(n+1,s)]},Kb="\0",X2=(t,e)=>{let n="",r=0,o="";for(let s of t){if(r===0&&s!=="("){n+=s;continue}o+=s,s==="("?r++:s===")"&&(r--,r===0&&(n+=Kb+e.length+Kb,e.push(o),o=""))}return n+o},Z2=(t,e)=>t.indexOf(Kb)===-1?t:t.replace(/\u0000(\d+)\u0000/g,(n,r)=>e[Number(r)]),Q2=/^(calc|min|max|clamp)\((.*)\)$/,J2=(t,e)=>{let n=Q2.exec(t);return n?`${n[1]}(${Vc(n[2],e)})`:t.indexOf("(")!==-1?t:bo(t,e)},SE=new Set(["vw","vh","vmin","vmax","svw","svh","lvw","lvh","dvw","dvh"]),Fc=(t,e)=>{let{base:n,type:r,unit:o}=e,s=SE.has(o)?"rem":o,i=(Hr(s)?1:n)+s;if(t===0)return i;let c="--"+(e.varPrefix?e.varPrefix+"-":"")+(r&&r.replace(".","-")),l=`${c}-ratio`;if(t>0){let f=bn[t-1];return`calc(var(${c}-${f}) * var(${l}))`}if(t<0){let f=bn[t+1],u=Math.abs(t),d=Math.pow(xE,2*u),p=bn[u];return p?`max(calc(var(${c}-${f}) / var(${l})), calc(var(${c}-${p}) / ${d.toFixed(4)}))`:`calc(var(${c}-${f}) / var(${l}))`}},Sd=(t,e,n,r)=>{let{type:o}=r,i=t===2&&e.length===2?t+1:t,l=`${"--"+(r.varPrefix?r.varPrefix+"-":"")+(o&&o.replace(".","-"))}-sub-ratio-`;return`calc(var(${n}) * var(${l+i}))`},jc=(t,e)=>{let r=(t*e-t)/1.618,o=t*e-r,s=t+r,i=(o+s)/2;return[o,i,s]},Bc=(t,e)=>jc(t,e).map(n=>n/t),Uc=(t,e)=>{let{key:n,base:r,value:o,ratio:s,variable:i,index:a}=t,l=~~(o*s)-~~o,f,[u,d,p]=jc(o,s);l>16?f=[u,d,p]:f=[u,p],f.forEach((g,h)=>{let m=~~(g/r*1e3)/1e3,y=i+(h+1),w=a+(h+1)/10,b=Sd(h+1,f,i,e),x={key:n+(h+1),variable:y,value:g,scaling:m,scalingVariable:b,index:w};Gb(x,e)})},xE=1.618,tM=(t,e,n)=>{if(t>=0)return e*Math.pow(n,t);let r=Math.abs(t),o=e*Math.pow(n,t),s=e*Math.pow(n,r)/Math.pow(xE,2*r);return Math.max(o,s)},ue=t=>{let{type:e,base:n,ratio:r,range:o,subSequence:s}=t,i=Math.abs(o[0])+Math.abs(o[1]),c="--"+(t.varPrefix?t.varPrefix+"-":"")+(e&&e.replace(".","-"))+"-";for(let l=0;l<=i;l++){let f=o[1]-l,u=bn[f],d=tM(f,n,r),p=~~(d/n*100)/100,g=c+u,h=Fc(f,t),m={key:u,variable:g,value:d,base:n,scaling:p,scalingVariable:h,ratio:r,index:f};Gb(m,t),s&&Uc(m,t)}return t},Yb=(t,e=0)=>{let{type:n,base:r,ratio:o,subSequence:s}=t,i=v(e)?e:bn[e],a=v(e)?Object.entries(bn).find(([,m])=>m===e)?.[0]:e;if(!i)return console.warn(`Position ${e} is out of range in numToLetterMap`),null;let c={sequence:{},scales:{},vars:{},...t},l=r*Math.pow(o,a),f=~~(l/r*100)/100,p="--"+(t.varPrefix?t.varPrefix+"-":"")+(n&&n.replace(".","-"))+"-"+i,g=Fc(a,t),h={key:i,variable:p,value:l,base:r,scaling:f,scalingVariable:g,ratio:o,index:a};return Gb(h,c),s&&Uc(h,c),c},xd=(t,e)=>{if(!t||!v(e)||!e)return;let n=t[e]||t[e.toLowerCase()];if(n!==void 0)return e.charCodeAt(0)===45?`calc(${n} * -1)`:n;if(e.charCodeAt(0)!==45||e.length<2)return;let r=e.slice(1),o=t[r]||t[r.toLowerCase()];if(o!==void 0)return`calc(${o} * -1)`},bo=(t="A",e)=>{let n=O(),{unit:r}=n;if(v(t)&&kt(t))return`var(${t})`;if(v(t)&&/^(?:env|var|calc|min|max|clamp)\(/.test(t.trim()))return t;if(v(t)){let b=xd(n.sizes,t);if(b!==void 0)return b}let{sequence:o,unit:s=r.default,useVariable:i}=e,a=/^-?[a-zA-Z]/i,c=a.test(t);if(aa(t)||!c||["none","auto","max-content","min-content","fit-content","inherit","initial","unset","revert","revert-layer"].includes(t))return t;let d=`--${e.varPrefix?e.varPrefix+"-":""}${Ac(e.type.replace(".","-"))}-`,p=t.toUpperCase(),g=p.slice(0,1)==="-"?"-":"",h=g?p.slice(1):p,m="";h.includes("_")&&(m="_"+h.split("_")[1].toLowerCase(),h=h.split("_")[0]);let y=b=>a.test(b)?`var(${d}${b}${m})`:b;if(h.includes("+")){let[b,x]=h.split("+"),k=`${y(b)} + ${y(x)}`;return g?`calc((${k}) * -1)`:`calc(${k})`}else if(h.includes("*")){let[b,x]=h.split("*"),k=`${y(b)} * ${y(x)}`;return g?`calc((${k}) * -1)`:`calc(${k})`}else if(h.includes("-")){let[b,x]=h.split("-"),k=`${y(b)} - ${y(x)}`;return g?`calc((${k}) * -1)`:`calc(${k})`}if(!o[h]&&h.length===2&&(n.verbose&&console.warn(h,"- value is not found because `subSequence` is set to false"),h=h.slice(0,1)),i||n.useVariable){let b=`var(${d}${h}${m})`;return g?`calc(${b} * -1)`:b}let w=o?o[h]:null;if(!w){if(console.warn("can't find",o,h),Q())throw new Error(`[smbls] Unresolvable design-system token "${t}"`+(e.type?` for sequence "${e.type}"`:"")+" \u2014 not a registered `sizes` name and not a valid spacing/typography/timing sequence letter. The CSS property using it would silently be dropped in production. Register the token in `designSystem/sizes.js` (or the relevant sequence family) or fix the typo.");return}return s==="ms"||s==="s"?g+w.val+s:g+w.scaling+s},Vc=(t,e)=>{if(!["+","-","*","/",","].filter(i=>t.includes(i+" ")).length)return t;let r=/(\s+-\s+|\s*[+*/,]\s*)/,o=[];return X2(t,o).split(r).map(i=>{let a=Z2(i,o),c=a.trim();return!c||["+","-","*","/",","].includes(c)?a:J2(c,e)}).join("")},_n=(t,e,n,r)=>{if(typeof t!="string")return O().verbose&&console.warn(e,t,"is not a string"),{[e]:t};if(t==="-"||t==="")return{};if(!r&&t.includes("(")){if(/^(?:env|var)\(/.test(t.trim()))return{[e]:t};let s=In(t);r=s[0],t=s[1]}return["+","-","*","/",","].filter(s=>t.includes(s+" ")).length?t=Vc(t,n):t=bo(t,n),{[e]:r?`${r}(${t})`:t}},kd=(t,e)=>bn[t-e],zc=t=>{let{h1Matches:e,sequence:n}=t;return new Array(6).fill(null).map((r,o)=>{let s=kd(e,o);return n[s]})};I();var Xb=(t,e)=>{let n=O(),{cssVars:r}=n;q(t.value)||(r[t.var]=t.value)},Hc=(t,e,n)=>{let r=O(),{unit:o}=r,s=e.unit||o.default,{base:i,ratio:a,type:c}=e,f="--"+(e.varPrefix?e.varPrefix+"-":"")+(c&&c.replace(".","-"));t[`${f}-base`]=i,t[`${f}-unit`]=s;let u=`${f}-ratio`;t[u]=a;let[d,p,g]=Bc(i,a);t[`${f}-sub-ratio-1`]=`calc(var(${f}-ratio) * ${d/a})`,t[`${f}-sub-ratio-2`]=`calc(var(${f}-ratio) * ${p/a})`,t[`${f}-sub-ratio-3`]=`calc(var(${f}-ratio) * ${g/a})`},kE=new Set(["vw","vh","vmin","vmax","svw","svh","lvw","lvh","dvw","dvh"]),$n=(t,e={})=>{let n=O(),{unit:r,timing:o,cssVars:s}=n,i=t.unit||r.default,a=kE.has(i)?"rem":i,{mediaRegenerate:c,sequence:l,scales:f}=t;c||Hc(s,t,e);for(let u in l){let d=l[u],p=(t.type===o.type?l[u].val:f[u])+a;if(!c){s[d.variable+"_default"]=p,s[d.variable]=d.scalingVariable;continue}e.useDefault===!1?s[d.variable]=p:(s[d.variable+"_default"]=p,s[d.variable]=`var(${d.variable+"_default"})`)}},br=(t,e,n={})=>{let r=O(),{unit:o,media:s,cssVars:i}=r,a=e.slice(1),c=t[e],l=c.unit||t.unit||o.default,f=kE.has(l)?"rem":l,{mediaRegenerate:u}=t,{sequence:d,scales:p}=c,g=s[a];if(!g&&r.verbose&&console.warn("Can't find media query ",g),!u){let h=i[`@media ${g}`];h||(h=i[`@media ${g}`]={}),Hc(h,c,n);let m=t.unit||o.default;if(f!==m&&d)for(let y in d){let w=d[y],b=p[y]+f;h[w.variable+"_default"]=b,h[w.variable]=b}return}for(let h in d){let m=d[h],y=(Hr(f)?p[h]:d[h].val)+f;!g&&r.verbose&&console.warn("Can't find query ",g);let w=i[`@media ${g}`];w||(w=i[`@media ${g}`]={}),w[m.variable]=`var(${m.variable+"_"+a})`,i[m.variable+"_"+a]=y}};I();var EE=An(),Wc=t=>{let e=O(),n="";for(let r in t)e.__svgCache[r]||(e.__svgCache[r]=!0,n+=t[r]);return n},eM=t=>{let e=t&&(t.default||t);if(!v(e))return EE&&console.warn("parseRootAttributes:",e,"is not a string"),{};let n=e.match(/<svg\s+(.*?)>/);if(!n||!n[1])return{};let o=n[1].match(/(\S+)=["']?((?:.(?!["']?\s+(?:\S+)=|\s*\/?[>"']))+.)["']?/gm);return o?o.reduce((s,i)=>{let[a,c]=i.split("=");return s[a]=c.replace(/['"]/g,""),s},{}):{}},nM=(t,e)=>{let n=[];if(t.replace(/id="([^"]*)"/g,(o,s)=>(n.push(s),o)),!n.length)return t;let r=t;for(let o of n){let s=o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),i=`${e}-${o}`;r=r.replace(new RegExp(`id="${s}"`,"g"),`id="${i}"`).replace(new RegExp(`url\\(#${s}\\)`,"g"),`url(#${i})`).replace(new RegExp(`xlink:href="#${s}"`,"g"),`xlink:href="#${i}"`).replace(new RegExp(`href="#${s}"`,"g"),`href="#${i}"`)}return r},vE=new Set,qc=(t,e)=>{let n=e&&e.default?e.default:e;if(!v(n))return EE&&!vE.has(t)&&(vE.add(t),console.warn("convertSvgToSymbol:",t,"is not a string")),"";e=n;let r=e.match(/^<symbol\b[^>]*\bid="([^"]*)"/);if(r){let u=r[1];return u===t?e:e.replace(`id="${u}"`,`id="${t}"`)}let o=eM(e),{width:s,height:i}=o,a=o.viewBox||`0 0 ${s||24} ${i||24}`,f=nM(e,t).replace("<svg",`<symbol id="${t}" xmlns="http://www.w3.org/2000/svg" viewBox="${a}"`);return f=f.replace(/^<symbol\b[^>]*>/,u=>u.replace(/\s(width|height)="[^"]*"/g,"")),f=f.replace("</svg","</symbol"),f=sM(f),f},rM="line|circle|ellipse|rect|polyline|polygon|path|stop|use|image",oM=new RegExp(`<(${rM})\\b([^>]*?)\\s*/>`,"g"),sM=t=>t.replace(oM,"<$1$2></$1>");var Ys={};F(Ys,{STANDARD_SCHEME_QUERIES:()=>Ed,__resetSkinWarnings:()=>l_,appendSVGSprite:()=>sl,appendSvgIconsSprite:()=>ko,applyDocument:()=>ol,applyHeadings:()=>Td,applyReset:()=>il,applySkins:()=>al,applySpacingSequence:()=>Gc,applyTimingSequence:()=>rl,applyTypographySequence:()=>tl,buildSkinVarStyles:()=>vo,checkIfBoxSize:()=>Kc,getColor:()=>at,getFontFamily:()=>Jc,getFontSizeByKey:()=>el,getMediaColor:()=>zt,getMediaTheme:()=>Ve,getSafeInk:()=>Ad,getSafeInkInfo:()=>Jb,getShadow:()=>Xc,getShapeByKey:()=>nl,getSpacingBasedOnRatio:()=>Ue,getSpacingByKey:()=>Ot,getTheme:()=>r_,getTimingByKey:()=>de,getTimingFunction:()=>Ce,isPlainColor:()=>Sr,quietColorProbe:()=>_o,resolveBorderValue:()=>Ae,resolveColorRgb:()=>wo,resolveShadowValue:()=>So,runThroughMedia:()=>Cd,schemeGuardSelector:()=>kr,schemeMediaQuery:()=>xr,setAdaptiveSchemeVar:()=>vr,setColor:()=>wr,setFont:()=>Qc,setFontFamily:()=>Ks,setGradient:()=>Hs,setMediaTheme:()=>qs,setSVG:()=>Gs,setShadow:()=>Er,setSvgIcon:()=>xo,setTheme:()=>Zc,splitSpacedValue:()=>Yc});I();var Ed={light:"(prefers-color-scheme: light)",dark:"(prefers-color-scheme: dark)"},xr=(t,e)=>{let n=e.media&&e.media[t]||Ed[t];return n?"@media "+(n==="print"?`${n}`:`screen and ${n}`):null},kr=t=>{let e=t.scopeSelector||":root";return`${e===":root"?":root:not([data-theme])":`:root:not([data-theme]) ${e}:not([data-theme])`} &`},Be=new Set,OE=new Set(["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","green","greenyellow","grey","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"]),iM=/^(?:#[0-9a-f]{3,8}$|(?:rgba?|hsla?|hwb|lab|lch|oklab|oklch|color|color-mix)\()/i,aM=/gradient\(|url\(|image-set\(|var\(/i,cM=new Set(["transparent","currentColor","currentcolor"]),Sr=t=>{if(!v(t))return!1;let e=t.trim();return aM.test(e)?!1:iM.test(e)?!0:OE.has(e)||cM.has(e)},vd=new Set,AE=t=>{if(!t)return!1;let{color:e,gradient:n}=t;return!!(A(e)&&Object.keys(e).length||A(n)&&Object.keys(n).length)},CE=new Set,Zb=0,_o=t=>{Zb++;try{return t()}finally{Zb--}},lM=(t,e)=>{if(!v(t)||t.indexOf(" ")===-1)return null;let n=t.replace(/\s+/g,""),r=Zt(n);if(!r||r.passthrough||r.cssVar)return null;let{color:o,gradient:s}=e;return!o[r.name]&&!s[r.name]?null:n},Qb=(t,e,n)=>{let r=lM(t,n);if(r){if(!CE.has(t)){CE.add(t);let i=n&&n.name?` (design system \`${n.name}\`)`:"";console.warn(`[scratch] color token \`${t}\` has a space before its alpha/tone modifier${i} \u2014 did you mean \`${r}\`? The space form never resolves, so the atomic class it mints carries no CSS value and paints invisibly. Dropped rather than shipped invisible.`)}return}let o=Zt(t);if(o&&o.name&&!o.passthrough&&!o.cssVar&&(o.alpha!==void 0||o.tone!==void 0)&&AE(n)&&!n.color[o.name]&&!n.gradient[o.name]){if(!Zb&&!vd.has(t)){vd.add(t);let i=n&&n.name?` (design system \`${n.name}\`)`:"";console.warn(`[scratch] color token \`${t}\` does not resolve${i} \u2014 \`${o.name}\` is not in the palette. Dropped rather than emitted as a raw value, which is invalid CSS the browser discards silently. Define it in designSystem/color.js or use a palette token.`)}return}let s=v(e)?e.toLowerCase():"";if(!OE.has(s)||!AE(n))return t;if(!vd.has(s)){vd.add(s);let i=n&&n.name?` (design system \`${n.name}\`)`:"";console.warn(`[scratch] color \`${t}\` is a CSS named colour that is not in the palette${i}. Dropped rather than emitted as a raw browser colour, which renders theme-blind and can be unreadable ("looks designed", so it ships unnoticed). Define it in designSystem/color.js or use a palette token.`)}},RE=(t,e,n)=>{let r=e!==void 0?e:1;if(!n)return`rgb(from ${t} r g b / ${r})`;if(n.charCodeAt(0)===43||n.charCodeAt(0)===45){let s=parseFloat(n),i=s<0?"-":"+",a=Math.abs(s);return`rgb(from ${t} calc(r ${i} ${a}) calc(g ${i} ${a}) calc(b ${i} ${a}) / ${r})`}return`hsl(from ${t} h s ${n}% / ${r})`},at=(t,e,n)=>{let r=n||O();if(!v(t)){r.verbose&&console.warn(t,"- type for color is not valid");return}if(kt(t))return`var(${t})`;e&&t[e]&&(t=t[e]);let o,s,i;if(D(t))[o,s,i]=t;else{let u=Zt(t);if(!u){let{color:d,gradient:p}=r,g=p[t]||d[t];return g?(e&&g[e]&&(g=g[e]),r.useVariable?`var(${g.var})`:g.value):Qb(t,t,r)}if(u.passthrough)return u.passthrough;if(u.cssVar)return`var(${u.cssVar})`;o=u.name,s=u.alpha,i=u.tone}let{color:a,gradient:c}=r,l=a[o]||c[o];if(!l)return Qb(t,o,r);if(e)if(l[e]!==void 0)l=l[e];else if(D(l)){let u=e.charCodeAt(0)===64?e.slice(1):e;u==="dark"?l=l[1]!==void 0?l[1]:l[0]:(u!=="light"&&r.verbose&&console.warn(t," - array-form color tokens only support light/dark; falling back to the light slot for scheme",e),l=l[0])}else r.verbose&&console.warn(t," - does not have ",e);if(v(l)){if(Be.has(o))return l;Be.add(o);try{return at(l,null,n)}finally{Be.delete(o)}}let f=l.rgb;if(!f){let u=r.useVariable?`var(${l.var})`:l.value;return(s||i)&&u?RE(u,s,i):u}return i&&!l[i]&&(f=yn(f,i),l[i]={rgb:f,var:`${l.var}-${i}`}),l[i]&&(f=l[i].rgb),s?`rgba(${f}, ${s})`:i?`rgba(${f}, ${l.alpha!==void 0?l.alpha:1})`:r.useVariable?`var(${l.var})`:l.value!==void 0?l.value:`rgb(${f})`},TE=t=>{let e=Fe(t);return!e||e.length<3||e[0]===0&&e[1]===0&&e[2]===0&&e[3]===0&&t.toLowerCase()!=="transparent"?null:{rgb:[e[0],e[1],e[2]],alpha:e[3]!==void 0?e[3]:1}},fM=(t,e)=>{if(!e)return t;let n=t.rgb;if(e.tone){let o=yn(n,e.tone);n=v(o)?o.split(",").map(s=>parseFloat(s.trim())):o}let r=e.alpha!==void 0?parseFloat(e.alpha):t.alpha;return{rgb:n,alpha:r}},wo=(t,e,n)=>{let r=e||O();if(!v(t))return null;let o=Zt(t);if(o){if(o.passthrough){let d=Fe(o.passthrough);return d&&d.length>=3?{rgb:[d[0],d[1],d[2]],alpha:d[3]!==void 0?d[3]:1}:null}if(o.cssVar)return null}let s=o?o.name:t,{color:i,gradient:a}=r,c=i[s]||a[s];if(!c)return TE(t);if(v(c)){let d;if(Be.has(s))d=TE(c);else{Be.add(s);try{d=wo(c,r,n)}finally{Be.delete(s)}}return d?fM(d,o):null}if(c.rgb===void 0&&A(c)){let d=`@${n||"light"}`;c=c[d]!==void 0?c[d]:c["@light"]}if(!c||c.rgb===void 0)return null;let l=c.rgb;o&&o.tone&&(l=yn(l,o.tone));let f=v(l)?l.split(",").map(d=>parseFloat(d.trim())):l,u=o&&o.alpha!==void 0?parseFloat(o.alpha):c.alpha!==void 0?c.alpha:1;return{rgb:f,alpha:u}},PE=t=>A(t)&&t.value!==void 0&&(t.rgb!==void 0||t.var!==void 0),LE=t=>{if(!A(t)||t.value!==void 0)return null;let e=[];for(let n in t)if(n!=="var"){if(n.charCodeAt(0)!==64||!PE(t[n]))return null;e.push(n.slice(1))}return e.length?e:null},uM=t=>v(t&&t.var)&&LE(t)!==null,dM=(t,e,n,r,o)=>{let s=LE(e);if(!s)return;if(v(e.var)){let c=`var(${e.var})`;return n||r?RE(c,n,r):c}if(s.length!==2||!s.includes("light")||!s.includes("dark"))return;let i=at(t,"@light",o),a=at(t,"@dark",o);if(!(!Sr(i)||!Sr(a)))return i===a?i:`light-dark(${i}, ${a})`},zt=(t,e,n)=>{let r=n||O();if(e||(e=r.globalTheme==="auto"?null:r.globalTheme),!v(t)){r.verbose&&console.warn(t,"- type for color is not valid");return}if(kt(t))return`var(${t})`;let o,s,i;if(D(t))o=t[0];else{let u=Zt(t);if(u){if(u.passthrough)return u.passthrough;if(u.cssVar)return`var(${u.cssVar})`;o=u.name,s=u.alpha,i=u.tone}else o=t}let{color:a,gradient:c}=r,l=a[o]||c[o],f=A(l);if(f&&l.value)return at(t,`@${e}`,n);if(f){if(r.useVariable&&l.var)return s||i?at(t,null,n):`var(${l.var})`;if(e){if(!r.useVariable&&a[o]===l){let u=dM(t,l,s,i,n);if(u!==void 0)return u}return at(t,`@${e}`,n)}else{let u={},d=kr(r);for(let p in l){if(p.charCodeAt(0)!==64)continue;let g=p.slice(1),h=at(t,p,n);if(h!==void 0&&(u[`[data-theme="${g}"] &`]=h,g==="light"||g==="dark")){let m=xr(g,r);if(!m)continue;u[m]={[d]:h}}}return u}}else return Qb(t,o,r)},vr=(t,e,n,r)=>{let s=`--${r.varPrefix?r.varPrefix+"-":""}${e}-${n}`,i,a={};for(let c in t){if(c.charCodeAt(0)!==64)continue;let l=c.slice(1),f=t[c],u=f&&(f.value||f);!u||typeof u!="string"||(a[l]=u,(l==="light"||i===void 0)&&(i=u))}if(i!==void 0){r.cssVars[s]=i,r.cssMediaVars||(r.cssMediaVars={});for(let c in a){let l=`[data-theme="${c}"]`;if(r.cssMediaVars[l]||(r.cssMediaVars[l]={}),r.cssMediaVars[l][s]=a[c],c==="light"||c==="dark"){let f=`@media (prefers-color-scheme: ${c})`;r.cssMediaVars[f]||(r.cssMediaVars[f]={}),r.cssMediaVars[f][s]=a[c]}}return t.var=s,s}},wr=(t,e,n)=>{let r=O();if(PE(t))return r.useVariable&&t.var&&(r.cssVars[t.var]=t.value),t;if(!r.useVariable&&uM(t))return t;if(v(t)&&kt(t)){let h=t.slice(2),m=h.trim().indexOf(" ")!==-1;if(t=m?h:at(h),m||!(t.includes("rgb")||t.includes("var")||t.includes("#"))){let y=h.trim().split(/\s+/),w=r.color[y[0]];if(w&&!w.value&&!w.rgb&&(v(w)||D(w)||A(w))&&!Be.has(y[0])){Be.add(y[0]);try{r.color[y[0]]=wr(w,y[0])}finally{Be.delete(y[0])}w=r.color[y[0]]}if(w&&w.value){let b=w.rgb,x=y[1]!==void 0?y[1]:"1",k=y[2];k&&(b=yn(b,k)),t=`rgba(${b}, ${x})`}else{let b=y[2],x=y[1]!==void 0?y[1]:"1";if(b)try{let k=Fe(y[0]);k&&k.length>=3?t=`rgba(${yn(k.slice(0,3).join(", "),b)}, ${x})`:t=y[0]}catch{t=y[0]}else t=y[0]}}}if(D(t)&&(t={"@light":t[0],"@dark":t[1]!==void 0?t[1]:t[0]}),A(t)){let h={};for(let m in t)m!=="var"&&(h[m]=wr(t[m],e,m.slice(0,1)==="@"?m.slice(1):m));return r.useVariable&&vr(h,"color",e,r),h}let s=`--${r.varPrefix?r.varPrefix+"-":""}color-${e}`+(n?`-${n}`:""),i=t.value||t;if(v(i)&&!i.includes("(")&&!i.startsWith("#")){let h=Zt(i);if(h&&h.name&&!h.passthrough&&!h.cssVar){let m=r.color[h.name];if(m&&!m.value&&!m.rgb&&(v(m)||D(m)||A(m))&&!Be.has(h.name)){Be.add(h.name);try{r.color[h.name]=wr(m,h.name)}finally{Be.delete(h.name)}}let y=r.color[h.name];if(y&&y.rgb){let w=y.rgb;h.tone&&(w=yn(w,h.tone));let b=h.alpha!==void 0?parseFloat(h.alpha):y.alpha!==void 0?y.alpha:1;i=`rgba(${w}, ${b})`}}}let a=Fe(i),[c,l,f,u=1]=a,d=parseFloat(u.toFixed(2)),p=`${c}, ${l}, ${f}`,g=`rgba(${p}, ${d})`;return r.useVariable&&(r.cssVars[s]=g),{var:s,rgb:p,alpha:d,value:g}},Hs=(t,e,n)=>{let r=O();if(A(t)&&t.value!==void 0&&t.var!==void 0)return r.useVariable&&(r.cssVars[t.var]=t.value),t;if(v(t)&&kt(t)&&(t=at(t.slice(2))),D(t)&&(t={"@light":t[0],"@dark":t[1]!==void 0?t[1]:t[0]}),A(t)){let i={};for(let a in t)a!=="var"&&(i[a]=Hs(t[a],e,a.slice(0,1)==="@"?a.slice(1):a));return r.useVariable&&vr(i,"gradient",e,r),i}let s=`--${r.varPrefix?r.varPrefix+"-":""}gradient-${e}`+(n?`-${n}`:"");return r.useVariable&&(r.cssVars[s]=t.value||t),{var:s,value:t.value||t}};I();var Ad=(t,e,n={},r)=>{let o=r||O(),{min:s=4.5,large:i=!1,scheme:a,meta:c=!1,maxIterations:l=15}=n,f=i?3:s,u=a||(o.globalTheme&&o.globalTheme!=="auto"?o.globalTheme:"light"),d=v(e)?e:String(e),p=Zt(t),g=p&&!p.passthrough&&!p.cssVar?p.name:null,h=(U,V)=>c?{value:U,...V}:U;if(g){let U=o.color[`${g}Safe`];if(U){let V=`${d}@${u}`,rt=U[V]!==void 0?U[V]:U[d];if(rt!==void 0){let Ft=rt&&rt.rgb!==void 0?o.useVariable&&rt.var?`var(${rt.var})`:rt.value:at(rt,null,o);return h(Ft,{ratio:null,deviation:0,derived:!1,overridden:!0})}}}let m=at(t,u?`@${u}`:null,o),y=wo(t,o,u),w=wo(e,o,u);if(!y||!w)return o.verbose&&console.warn("getSafeInk: could not resolve",t,e,"\u2014 returning hue unchanged"),h(m,{ratio:null,deviation:0,derived:!1,overridden:!1,unresolved:!0});let b=go(w.rgb,w.alpha),x=go(y.rgb,y.alpha,b),k=Ns(x,b);if(k>=f-.02)return h(m,{ratio:k,deviation:0,derived:!1,overridden:!1});let[S,_,E]=Oc(y.rgb),[,C,$]=Rc([S,_,E]),M=po(b)>.5,R=M?S:1-S,j=U=>{let V=M?S-U:S+U,rt=Math.max(0,Math.min(1,V));return{rgb:Pc(rt,C,$),L:rt}},et=U=>{let{rgb:V}=j(U),rt=go(V.map(Ft=>Math.round(Ft)),y.alpha,b);return Ns(rt,b)},tt=0,it=R,St=et(it)>=f;if(St)for(let U=0;U<l;U++){let V=(tt+it)/2;et(V)>=f?it=V:tt=V}else tt=it;let{rgb:Pt,L:bt}=j(it),Mt=Pt.map(U=>Math.round(U)),z=et(it),B=y.alpha<1?`rgba(${Mt.join(", ")}, ${y.alpha})`:`rgb(${Mt.join(", ")})`,nt=Math.abs(bt-S)*100;return h(B,{rgb:Mt,ratio:z,startRatio:k,deviation:nt,derived:!0,overridden:!1,reachable:St})},Jb=(t,e,n={},r)=>Ad(t,e,{...n,meta:!0},r);I();I();var pM=t=>{let n=O().spacing||{},r=parseFloat(t.spacingRatio),o={...n,ratio:Number.isFinite(r)?r:n.ratio,sequence:{},scales:{}};return ue(o),o},hM=t=>{for(let e in t){let n=t[e];if(!(e.slice(0,1)==="@"))continue;let{type:o,base:s,ratio:i,range:a,subSequence:c,h1Matches:l,unit:f}=t;xt(n,{type:o,base:s,ratio:i,range:a,subSequence:c,h1Matches:l,unit:f,sequence:{},scales:{},templates:{},vars:{}}),ue(n),br(t,e)}},Kc=t=>{let e=t.toLowerCase(),n=e.includes("width")||e.includes("height"),r=e.includes("border")||e.includes("outline");return n&&!r},Gc=()=>{let t=O(),{spacing:e}=t;ue(e),$n(e),hM(e)},gM=t=>{let e=O(),{spacing:n}=e;return!t||!t.sequence?n:Object.keys(t.sequence).length>0?t:ue(t)},Ot=(t,e="padding",n,r)=>{let o=gM(n);if(v(t)){if(!r&&/^(?:env|var)\(/.test(t.trim()))return{[e]:t};if(!r&&t.includes("(")){let i=In(t);r=i[0],t=i[1]}}let s=r?[t]:v(t)&&t.includes("(")?ht(t):uo(t);if(D(s)){if(s.length>1){let i="";e==="borderWidth"&&(e="border",i="Width");let a={2:["Block","Inline"],3:["BlockStart","Inline","BlockEnd"],4:["BlockStart","InlineEnd","BlockEnd","InlineStart"]},c=(l,f)=>_n(s[f],e+l+i,o,r);return a[s.length].map((l,f)=>c(l,f))}return _n(t,e,o,r)}},Ue=(t,e,n,r)=>{let o=O(),{spacing:s}=o,i=n||t[e];if(!r&&v(i)&&/^(?:env|var)\(/.test(i.trim()))return{[e]:i};if(!r&&v(i)&&i.includes("(")){let a=In(i);r=a[0],i=a[1]}if(t.spacingRatio){let a=pM(t);return Ot(i,e,a,r)}return Ot(i,e,s,r)},Yc=t=>{let e=n=>{let r=["+","-","*","/"].includes(n),o=cs.some(i=>t.includes(i));return r||o?n:n.length<3&&/[A-Z]/.test(n)?n+"_default":n};return t.split(",").map(n=>n.trim()).map(e).join(",").split(" ").map(e).join(" ")};I();var So=(t,e,n)=>!v(t)||ke.test(t)?t:en(t).map(r=>(r=r.trim(),r.split(/\s+/).map(o=>{if(o=o.trim(),!o)return"";if(o.startsWith("--"))return`var(${o})`;let s=_o(()=>at(o,e));if(tn(s))return s;if(/^\d/.test(o)||o==="0"||o.includes("px")||o.slice(-2)==="em"||o==="inset"||o==="none"||ho.has(o.toLowerCase()))return o;n&&n(o);let i=Ot(o,"shadow");return i&&i.shadow?i.shadow:o}).join(" "))).join(", "),Er=(t,e,n,r)=>{let o=O();if(A(t)&&t.value!==void 0&&t.var!==void 0)return o.useVariable&&(o.cssVars[t.var]=t.value),t;if(D(t)){let a={"@light":Er(t[0],e,"light"),"@dark":Er(t[1],e,"dark")};return o.useVariable&&vr(a,"shadow",e,o),a}if(A(t)){let a={};for(let c in t)a[c]=Er(t[c],e,c.startsWith("@")?c.slice(1):c);return o.useVariable&&vr(a,"shadow",e,o),a}v(t)&&!ke.test(t)&&(t=So(t));let i=`--${o.varPrefix?o.varPrefix+"-":""}shadow-${e}`+(n?`-${n}`:"");return o.useVariable&&(o.cssVars[i]=t),{var:i,value:t}},Xc=(t,e)=>{let n=O();if(e||(e=n.globalTheme==="auto"?null:n.globalTheme),!v(t)){n.verbose&&console.warn(t,"- type for color is not valid");return}if(kt(t))return`var(${t})`;let[r]=D(t)?t:t.split(" "),s=n.shadow[r],i=A(s);if(!s)return n.verbose&&console.warn("Can't find color ",r),t;if(i&&!s.value&&n.useVariable&&s.var)return`var(${s.var})`;if(e){let a=s["@"+e]||s[e];if(a)return a.value!==void 0?a.value:a;n.verbose&&console.warn(t," - does not have ",e)}if(i&&s.value)return s.value;if(i){let a={},c=kr(n);for(let l in s){if(l.charCodeAt(0)!==64)continue;let f=l.slice(1),u=s[l],d=u&&(u.value!==void 0?u.value:u);if(d!==void 0&&(a[`[data-theme="${f}"] &`]=d,f==="light"||f==="dark")){let p=xr(f,n);if(!p)continue;a[p]={[c]:d}}}return a}return n.verbose&&console.warn("Can't find color",t),t};var mM=new Set(["none","hidden","dotted","dashed","solid","double","groove","ridge","inset","outset","initial"]),yM=t=>mM.has(t),Ae=(t,e,n)=>{if(t==null)return;let r=t+"";if(ke.test(r))return r;let o=r.trim();return o==="none"||o==="0"||o==="initial"||o==="inherit"||o==="unset"?r:r.split(/\s+/).map(s=>{if(s=s.trim(),!s)return"";if(kt(s))return`var(${s})`;if(yM(s)||/^\d/.test(s)||s==="0")return s;let i=_o(()=>at(s,e));if(tn(i))return i;if(ho.has(s.toLowerCase()))return s;n&&n(s);let a=Ot(s,"border");return a&&a.border?a.border:s}).join(" ")};I();var bM=new Set(["black","white","red","green","blue","yellow","orange","purple","pink","brown","gray","grey","cyan","magenta","lime","olive","navy","teal","aqua","maroon","silver","fuchsia","transparent","currentColor","currentcolor","inherit","initial","unset","none","aliceblue","antiquewhite","aquamarine","azure","beige","bisque","blanchedalmond","blueviolet","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","gainsboro","ghostwhite","gold","goldenrod","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","limegreen","linen","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","oldlace","olivedrab","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","plum","powderblue","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","thistle","tomato","turquoise","violet","wheat","whitesmoke","yellowgreen","rebeccapurple"]),DE=["color","Color","background","Background","fill","Fill","stroke","Stroke"],NE=t=>{for(let e=0;e<DE.length;e++)if(t.includes(DE[e]))return!0;return!1},_M={boxShadow:So,textShadow:So,border:Ae,borderTop:Ae,borderRight:Ae,borderBottom:Ae,borderLeft:Ae,outline:Ae,columnRule:Ae},wM=t=>{if(!t)return!1;let e=Zt(t);return!e||!e.name||e.passthrough||e.cssVar?!1:e.alpha!==void 0||e.tone!==void 0},IE=new Set,SM=(t,e,n,r,o,s)=>{if(!Q())return;let i=`${t}::${e}::${n||""}::${r}`;IE.has(i)||(IE.add(i),console.warn(`[smbls/scratch] theme param "${e}" on "${t}"`+(n?` (${n})`:"")+` did not fully resolve: "${r}" -> "${o}" still contains the unresolved token "${s}". This is not valid CSS \u2014 the browser will drop the whole declaration. Register "${s}" as a design-system color token or fix the typo.`))},n_=(t,e,n,r)=>{let o=_M[e];if(!o)return at(n,r);let s=null,i=o(n,r,a=>{!s&&wM(a)&&(s=a)});return s&&SM(t,e,r,n,i,s),i},r_=(t,e)=>Ve(t,e),xM=t=>A(t)&&q(t.value),kM=t=>{for(let e in t){let n=t[e];if(v(n)&&n.startsWith("var(--"))return!0}return!1},Zc=(t,e)=>{let n=O();return xM(t)?!n.useVariable&&kM(t)?t:qs(t.value,e):qs(t,e)},FE=(t,e)=>{let n=new Set;for(let r of e){let o=r.slice(0,1);if(!(o==="@"||o==="."||o===":")&&NE(r))for(let s in t){if(n.has(s))continue;let i=t[s]?.[r];if(i===void 0)continue;let a=at(i,`@${s}`);a!==void 0&&v(a)&&/^[a-z][a-zA-Z]+$/.test(a)&&!bM.has(a)&&n.add(s)}}return n},jE=t=>t.startsWith("[data-theme=")||t.startsWith("@media"),Ws=(t,e)=>{for(let n in e){let r=e[n];A(r)?Ws(t[n]||(t[n]={}),r):t[n]=r}return t},$E=(t,e,n,r)=>{if(Ws(t,{[`[data-theme="${e}"] &`]:n}),e!=="light"&&e!=="dark")return;let o=xr(e,r);o&&Ws(t,{[o]:{[kr(r)]:n}})},BE=(t,e,n,r)=>{let o={},s=Object.keys(e).filter(c=>e[c]!==n);if(!s.length)return n===void 0?void 0:(o[t]=n,o);let i=e.light!==void 0?e.light:n,a=e.dark!==void 0?e.dark:n;if(NE(t)&&Sr(i)&&Sr(a)){o[t]=i===a?i:`light-dark(${i}, ${a})`;for(let c in e)c==="light"||c==="dark"||$E(o,c,{[t]:e[c]},r)}else{n!==void 0&&(o[t]=n);for(let c of s)$E(o,c,{[t]:e[c]},r)}return o},vM=new Set(["backdropFilter","WebkitBackdropFilter"]),UE=new WeakSet,VE=(t,e,n,r)=>{let o=n.globalTheme!==void 0?n.globalTheme:"auto",s=o&&o!=="auto"?String(o).replace(/^'|'$/g,""):null,i=new Set(r?Object.keys(r):[]);for(let l in t)if(t[l])for(let f of Object.keys(t[l]))i.add(f);let a=FE(t,i),c={};for(let l of i){let f=l.slice(0,1);if(f==="@")continue;if(f==="."||f===":"){let m={};for(let b in t)q(t[b]?.[l])&&(m[b]=t[b][l]);let y=r&&q(r[l])?r[l]:void 0;if(!Object.keys(m).length&&!y)continue;let w=f==="."?l.slice(1):l.replace(/^:+/,"");c[l]=VE(m,`${e}-${w}`,n,y);continue}let u=r&&!q(r[l])?r[l]:void 0,d=new Set(Object.keys(t));u!==void 0&&(d.add("light"),d.add("dark"),s&&d.add(s));let p={},g;for(let m of d){if(a.has(m))continue;let y=t[m]?.[l];if((y===void 0||q(y))&&(y=u),y===void 0)continue;let w=n_(e,l,y,`@${m}`);w!==void 0&&(p[m]=w,(s&&m===s||!s&&(m==="light"||g===void 0))&&(g=w))}let h=BE(l,p,g,n);h&&(Ws(c,h),c[`.${l}`]=h)}return(c.background||c.color||c.backgroundColor)&&(c[".inversed"]={color:c.background||c.backgroundColor,background:c.color}),c},t_=(t,e,n,r)=>{let{cssVars:o}=n;n.cssMediaVars||(n.cssMediaVars={});let s=n.cssMediaVars,i=n.globalTheme!==void 0?n.globalTheme:"auto",a=i&&i!=="auto"?String(i).replace(/^'|'$/g,""):null,c={},l=new Set(r?Object.keys(r):[]);for(let u in t)if(t[u])for(let d of Object.keys(t[u]))l.add(d);let f=FE(t,l);for(let u of l){let d=u.slice(0,1),p=q(r?.[u])||Object.values(t).some(g=>q(g?.[u]));if(d==="."&&p){let g=u.slice(1),h={};for(let y in t)q(t[y]?.[u])&&(h[y]=t[y][u]);let m=q(r?.[u])?r[u]:void 0;c[u]=t_(h,`${e}-${g}`,n,m)}else if(d===":"&&p){let g=u.replace(/^:+/,""),h={};for(let y in t)q(t[y]?.[u])&&(h[y]=t[y][u]);let m=q(r?.[u])?r[u]:void 0;c[u]=t_(h,`${e}-${g}`,n,m)}else if(d!=="@"&&d!=="."&&d!==":"){let h=`--${n.varPrefix?n.varPrefix+"-":""}theme-${e}-${u}`,m=r&&!q(r[u])?r[u]:void 0,y=new Set(Object.keys(t));m!==void 0&&(y.add("light"),y.add("dark"),a&&y.add(a));let w,b=!1,x={};for(let k of y){if(f.has(k))continue;let S=t[k]?.[u];if((S===void 0||q(S))&&(S=m),S===void 0)continue;let _=n_(e,u,S,`@${k}`);if(_===void 0)continue;b=!0,x[k]=_,(a&&k===a||!a&&(k==="light"||w===void 0))&&(w=_);let E=`[data-theme="${k}"]`;if(s[E]||(s[E]={}),s[E][h]=_,k==="dark"||k==="light"){let C=`@media (prefers-color-scheme: ${k})`;s[C]||(s[C]={}),s[C][h]=_}}if(w!==void 0&&(o[h]=w),!b)continue;if(vM.has(u)){let k=BE(u,x,w,n);k&&(Ws(c,k),c[`.${u}`]=k);continue}c[u]=`var(${h})`,c[`.${u}`]={[u]:c[u]}}}(c.background||c.color||c.backgroundColor)&&(c[".inversed"]={color:c.background||c.backgroundColor,background:c.color});for(let u in c)jE(u)&&q(c[u])&&UE.add(c[u]);return c},qs=(t,e,n,r)=>{let o=O(),{cssVars:s}=o,i={value:t},a=!n&&!r,c,l;if(q(t)){if(a&&o.useVariable){let f={},u={};for(let d in t)d.startsWith("@")?q(t[d])&&(f[d.slice(1)]=t[d]):u[d]=t[d];(Object.keys(f).length||Object.keys(u).length)&&(l=t_(f,e,o,u),Object.assign(i,l))}else if(a){let f={},u={};for(let d in t)d.startsWith("@")?q(t[d])&&(f[d.slice(1)]=t[d]):u[d]=t[d];c=VE(f,e,o,u),Object.assign(i,c)}for(let f in t){let u=f.slice(0,1),d=t[f];if(u==="@"||u===":"||u==="."){let p=u==="@"&&f;i[f]=qs(d,e,f,r||p)}else if(!a){let p=n_(e,f,d,r),g=[...new Set([r,n].filter(w=>w).map(w=>w.slice(1)))],h=g.length?"-"+g.join("-"):"",y=`--${o.varPrefix?o.varPrefix+"-":""}theme-${e}${h}-${f}`;o.useVariable?(o.useThemeSuffixedVars&&(s[y]=p),i[f]=`var(${y})`):i[f]=p,i[`.${f}`]={[f]:i[f]}}}if(c)for(let f in c){let u=f.slice(0,1);(u==="."||u===":")&&q(t[f])&&(i[f]=c[f])}if(l)for(let f in l){let u=f.slice(0,1);(u==="."||u===":")&&q(t[f])&&(i[f]=l[f])}!i[".inversed"]&&(i.background||i.color||i.backgroundColor)&&(i[".inversed"]={color:i.background||i.backgroundColor,background:i.color})}if(v(t)&&kt(t)){let u=o.theme[t.slice(2)];return Ve(u,r)}return i},e_=(t,e)=>{let n={};for(let r in t){let o=r.slice(0,1);if(q(t[r]))if(jE(r)&&(e||UE.has(t[r])))n[r]=Ws({},t[r]);else{if(o==="@")continue;o===":"?n[`&${r}`]=e_(t[r],e):o==="."&&(n[`&${r}`]=e_(t[r],e))}else n[r]=t[r]}return n},zE=(t,e)=>{let n=e.shift();return t[n]?zE(t[n],e):t},ME=(t,e)=>D(e)?zE(t,e):v(e)&&t[e]?t[e]:t;var Ve=(t,e)=>{let n=O();if(v(t)&&kt(t)&&(t=Ve(t.slice(2))),!t||!v(t)){n.verbose&&console.warn(`${t} - Theme is not a string`);return}let[r,...o]=D(t)?t:t.split(" "),s=n.theme[r];return s&&o.length?s=ME(s,o):s&&e&&(s=ME(s,e)),e_(s,!n.useVariable)};I();I();var Qc=(t,e)=>{let n=O(),r=`--font-${e}`;if(!t||D(t)&&!t[0])return;let o;if(t.isVariable){let s=je(t.url,n.files)||t.url;Fs(s)?o=js(s):o=yr(e,s,t.fontWeight,{fontStretch:t.fontStretch,fontDisplay:t.fontDisplay||"swap",unicodeRange:t.unicodeRange})}else if(t[0])o=mo(e,t,n.files);else{let s=Array.isArray(t.url)?t.url.map(i=>je(i,n.files)||i):je(t.url,n.files)||t.url;o=yr(e,s,t.fontWeight,{fontStyle:t.fontStyle,fontDisplay:t.fontDisplay,fontStretch:t.fontStretch,unicodeRange:t.unicodeRange})}return{var:r,value:t,fontFace:o}},EM=new Set(["serif","sans-serif","monospace","cursive","fantasy","system-ui","ui-serif","ui-sans-serif","ui-monospace","ui-rounded","emoji","math","fangsong","inherit","initial","unset","revert","revert-layer"]),AM=t=>EM.has(t.toLowerCase())||/[\s,'"(]/.test(t.trim()),HE=new Set,Jc=(t,e)=>{let n=O(),{fontFamily:r}=n,o=e||r,s=Ln(o,t);if(s!==void 0||t==null||t===""||t==="default")return s;if(!v(t))return Ln(o);if(!AM(t))return An()&&!HE.has(t)&&(HE.add(t),console.warn(`[scratch] fontFamily \`${t}\` is not a font family key of this design system \u2014 rendering the default family. Name a key from designSystem fontFamily, a CSS generic family (\`monospace\`, \`serif\`, \u2026) or a quoted font name (\`"'${t}'"\`).`)),Ln(o)},Ks=(t,e)=>{let n=O(),{fontFamily:r,fontFamilyTypes:o}=n;if(A(t)&&v(t.value)&&v(t.var))return n.useVariable&&(n.cssVars[t.var]=t.value),t;let{value:s,type:i}=t;t.isDefault&&(!t.isSystemFallback||!r.default)&&(r.default=e),A(s)&&(s=uo(s));let c=`--${n.varPrefix?n.varPrefix+"-":""}font-family-${e}`,l=[...s,...String(o[i]??"").split(",")].map(f=>String(f).trim()).filter(f=>f&&!f.startsWith("--")).join(", ");return n.useVariable&&(n.cssVars[c]=l),{var:c,value:l,arr:s,type:i,isSystemFallback:!!t.isSystemFallback}};I();var Cd=t=>{let e=O(),{typography:n,media:r}=e;for(let o in t){let s=o.slice(0,1)==="@",i=t[o];if(!s)continue;let{mediaRegenerate:a}=t,c=o.slice(1),{type:l,base:f,ratio:u,range:d,subSequence:p,h1Matches:g,unit:h}=t;xt(i,{type:l,base:f,ratio:u,range:d,subSequence:p,h1Matches:g,unit:h});let m=new Set(["vw","vh","vmin","vmax","svw","svh","lvw","lvh","dvw","dvh"]),y=i.unit||h,w=!i.unit&&m.has(h)?"rem":y,b=r[c],x="@media "+(b==="print"?`${b}`:`screen and ${b}`);if(n.templates[x]={fontSize:i.base/n.browserDefault+w},!a){xt(i,{sequence:{},scales:{},vars:{}}),ue(i),br(t,o);continue}xt(i,{sequence:{},scales:{},templates:{},vars:{}}),ue(i),br(t,o)}},Td=t=>{let e=O();if(t.h1Matches){let n=t.unit,r=zc(t),{templates:o}=t;for(let s in r){let i=`h${parseInt(s)+1}`,a=o[i];o[i]={fontSize:e.useVariable?`var(${r[s]?.variable})`:`${r[s]?.scaling}${n}`,margin:a?a.margin:0,lineHeight:a?a.lineHeight:t.lineHeight,letterSpacing:a?a.letterSpacing:t.letterSpacing,fontWeight:a?a.fontWeight:900-s*100}}}},tl=()=>{let t=O(),{typography:e}=t;ue(e),Td(e),$n(e),Cd(e)},el=t=>{let e=O(),{typography:n}=e;return _n(t,"fontSize",n)};I();var nl=t=>{if(!v(t))return;let n=O().shape;if(n)return n[t]!==void 0?n[t]:n[t.toLowerCase()]};I();var rl=()=>{let t=O(),{timing:e}=t;ue(e),$n(e)},Ce=t=>{let e=O(),{timing:n}=e;return n[t]||n[fo(t)]||t},de=(t,e="timing")=>{let n=O(),{timing:r}=n;return _n(t,e,r)};I();var ol=()=>{let t=O(),{fontFamily:e,theme:n,typography:r}=t,o=t.document;return vn(o)?(or(t,"document",o),o=t.document={}):o||(o=t.document={}),xt(o,{theme:n.document,fontFamily:Ln(e),fontSize:r.base,lineHeight:r.lineHeight})};I();var i_={document:dt},WE=new WeakMap,qE=new WeakMap,CM=128,KE=1048576,o_=8192,a_=t=>t.nodeType===1&&t.localName==="symbol"&&t.getAttribute("id"),XE=t=>t.nodeType===8||t.nodeType===3&&!t.textContent.trim(),TM=(t,e)=>{let n=1,r=t.ownerDocument;if(r&&typeof r.createTreeWalker=="function"){let s=r.createTreeWalker(t,4294967295);for(;s.nextNode();)if(++n>e)return n;return n}let o=[t];for(;o.length;){let s=o.pop().childNodes||[];for(let i=0;i<s.length;i++){if(++n>e)return n;o.push(s[i])}}return n},s_=(t,e)=>{if(typeof t.importNode=="function")return t.importNode(e,!0);let n=e.cloneNode(!0);return typeof t.adoptNode=="function"?t.adoptNode(n):n},OM=(t,e)=>{if(typeof t.prepend=="function")return t.prepend(e);let n=t.firstChild!==void 0?t.firstChild:t.childNodes&&t.childNodes[0];return typeof t.insertBefore=="function"?t.insertBefore(e,n||null):t.appendChild(e)},Gs=(t,e)=>{let n=O();if(!t){n.verbose&&console.warn("setSVG: val is not defined",e);return}return n.useSvgSprite?qc(e,t):t},sl=(t,e=i_)=>{let n=O(),r=Object.keys(t).length?{}:n.svg;for(let o in t)r[o]=t[o];QE(r,e)},xo=(t,e)=>{let n=O();return n.useIconSprite&&!n.semanticIcons?.[e]?Gs(t,e):t},ko=(t,e=i_)=>{let n=O(),r=Object.keys(t).length?{}:n.icons;for(let o in t)r[o]=t[o];QE(r,e)},ZE=(t,e={isRoot:!0})=>{if(!t||!t.createElementNS)return;let n=t.createElementNS("http://www.w3.org/2000/svg","svg");return e.isRoot&&(n.setAttribute("aria-hidden","true"),n.setAttribute("width","0"),n.setAttribute("height","0"),n.setAttribute("style","position:absolute"),n.setAttribute("id","svgSprite")),n},RM=(t,e)=>{let n=typeof DOMParser<"u"?DOMParser:null;if(n){let r=`<svg xmlns="http://www.w3.org/2000/svg">${e}</svg>`,s=new n().parseFromString(r,"image/svg+xml");return s.querySelector("parsererror")?null:s.documentElement}return null},PM=(t,e,n)=>{let r=String(n),o=qE.get(e),s=o?.entries.get(r);if(s)return o.entries.delete(r),o.entries.set(r,s),s.root;let i=RM(t,r);if(i||(i=ZE(t,{isRoot:!1}),i.innerHTML=r),r.length>KE)return i;let a=TM(i,o_);if(a>o_)return i;for(o||(o={entries:new Map,units:0,nodes:0},qE.set(e,o));o.entries.size>=CM||o.units+r.length>KE||o.nodes+a>o_;){let c=o.entries.keys().next().value,l=o.entries.get(c);o.units-=c.length,o.nodes-=l.nodes,o.entries.delete(c)}return o.entries.set(r,{root:i,nodes:a}),o.units+=r.length,o.nodes+=a,i},GE=t=>{let e=new Map;for(let n of t.children){let r=a_(n);if(!r)continue;let o=e.get(r)||[];o.push(n),e.set(r,o)}return e},LM=t=>t.replace(/["\\\u0000-\u001f\u007f]/g,e=>`\\${e.charCodeAt(0).toString(16)} `),YE=(t,e,n,r)=>{let o=0,s=e.childElementCount>8?GE(n):null,i=a=>{if(!s)try{return[...n.querySelectorAll(`symbol[id="${LM(a)}"]`)].filter(c=>c.parentNode===n)}catch{s=GE(n)}return s.get(a)};for(let a of e.childNodes){if(XE(a))continue;let c=a_(a);if(!c&&r){let u=o++,d=r.nodes[u];if(!d&&r.complete||d?.parentNode===n)continue;let p=s_(t,d||a);n.appendChild(p),r.nodes[u]=p;continue}let l=c&&i(c),f=l&&l[0];if(!f)f=s_(t,a),n.appendChild(f);else if(!f.isEqualNode(a)){let u=s_(t,a);n.replaceChild(u,f),f=u}if(l)for(let u=1;u<l.length;u++)l[u].remove();c&&s&&s.set(c,[f])}},QE=(t,e=i_)=>{let n=O(),r=e.document||dt;if(!r||!r.documentElement)return n.verbose&&console.warn("To append SVG sprites it should be run in browser environment"),Wc(t);let o=r.querySelector("#svgSprite"),s="";for(let d in t)s+=t[d];let i=o||ZE(r);if(!i||!i.nodeType)return;let a=d=>PM(r,i,d),c=a(s),l=WE.get(i);l||WE.set(i,l=new WeakMap);let f=l.get(n);if(f||l.set(n,f=new Map),[...c.childNodes].some(d=>!XE(d)&&!a_(d))){let d=[];for(let p in t)d.push(p);for(let p of d){let g=f.get(p);g||f.set(p,g={nodes:[],complete:!1}),YE(r,d.length===1?c:a(t[p]),i,g),g.complete=!0}}else{YE(r,c,i);for(let d in t)f.has(d)||f.set(d,{nodes:[],complete:!0})}o||OM(r.body,i);for(let d in t)n.__svgCache[d]=!0};I();var il=(t={})=>{let e=O(),n=e.typography||{},r=e.document||{},o=A(e.reset)?e.reset:e.reset={};if(o[":root"]){let c=o,l=n.templates||{};c.body={...e.useDocumentTheme?Ve("document"):{},...l.body},c.h1=l.h1,c.h2=l.h2,c.h3=l.h3,c.h4=l.h4,c.h5=l.h5,c.h6=l.h6}let{body:s,...i}=n.templates||{},a=e.useDocumentTheme?Ve("document"):{};if(o.html&&ee(o.html,a),n.unit)for(let c in i){if(c.slice(0,6)!=="@media")continue;let l=i[c];delete i[c],!(!l||!l.fontSize)&&(o[c]||(o[c]={}),o[c].html||(o[c].html={}),o[c].html.fontSize===void 0&&(o[c].html.fontSize=l.fontSize))}if(n.unit){let c=e.media||{};for(let l in n){if(l.charAt(0)!=="@")continue;let f=n[l];if(!f||f.unit===n.unit||!f.unit)continue;let u=f.unit,d=f.base||n.base,p=f.browserDefault||n.browserDefault,g=l.slice(1),h=c[g];if(!h)continue;let m="@media "+(h==="print"?h:"screen and "+h);o[m]||(o[m]={}),o[m].html||(o[m].html={}),o[m].html.fontSize=d/p+u}}return ft(xt(o,t),{html:{position:"absolute",width:"100%",height:"100%",top:"0",left:"0",margin:"0",WebkitFontSmoothing:"subpixel-antialiased",textSizeAdjust:"100%",WebkitTextSizeAdjust:"100%",...a,fontSize:n.unit?n.base/n.browserDefault+n.unit:n.browserDefault+"px",fontFamily:r.fontFamily,lineHeight:r.lineHeight},body:{boxSizing:"border-box",height:"100%",margin:0,fontFamily:r.fontFamily,fontSize:n.unit?"1"+e.unit.default:n.base/n.browserDefault+e.unit.default,...i,...s},a:{color:"currentColor"},button:{color:"inherit",font:"inherit",background:"transparent",border:"none",cursor:"pointer",appearance:"none",WebkitAppearance:"none"},"input, select, textarea":{color:"inherit",font:"inherit"},fieldset:{border:0,padding:0,margin:0}},Ee)};I();var DM=new Set(["fallback"]),c_=new Set,JE=(t,e)=>{c_.has(t)||(c_.add(t),Q()&&console.warn(e))},l_=()=>{c_.clear()},tA=t=>{for(let e in t)delete t[e];return t},al=()=>{let t=O(),e=A(t.cssSkinVars)?tA(t.cssSkinVars):t.cssSkinVars={},n=A(t.cssSkinFallback)?tA(t.cssSkinFallback):t.cssSkinFallback={},r=t.skins;if(!A(r))return e;let o=t.varPrefix?t.varPrefix+"-":"",s=t.color||{},i=t.cssVars||{},a=c=>v(c)&&Object.prototype.hasOwnProperty.call(s,c)?`var(--${o}color-${c})`:c;for(let c in r){let l=r[c];if(!A(l))continue;let f={};for(let u in l){if(DM.has(u))continue;let d=l[u];if(A(d))for(let p in d){let g=`--${o}theme-${u}-${p}`;t.useVariable!==!1&&!(g in i)&&JE(`${c}/${u}/${p}`,`[scratch] skin "${c}" rewrites theme "${u}" param "${p}", which the theme does not declare \u2014 no element reads ${g}, so the skin changes nothing there. Declare "${p}" on the "${u}" theme (its no-skin value).`),f[g]=a(d[p])}}e[c]=f,v(l.fallback)&&(n[c]=l.fallback)}for(let c in n){let l=n[c];e[l]||(JE(`${c}/fallback/${l}`,`[scratch] skin "${c}" falls back to "${l}", which is not a declared skin \u2014 the reduced-transparency fallback is skipped.`),delete n[c])}return e},eA=(t,e)=>{let n=`[data-skin="${t}"]`;return!e||e===":root"?`:root${n}, ${n}`:`${e}${n}, ${n} ${e}, ${e} ${n}`},vo=(t,e,n)=>{let r={};if(!A(t))return r;for(let s in t)r[eA(s,n)]=t[s];let o={};for(let s in e||{}){let i=t[e[s]];i&&(o[eA(s,n)]=i)}return Object.keys(o).length&&(r["@media (prefers-reduced-transparency: reduce)"]=o),r};I();var IM=new Set(["to","top","bottom","left","right","center","at","circle","ellipse","closest-side","farthest-side","closest-corner","farthest-corner"]),nA=/^-?[A-Z][0-9]?$/,wn=t=>Ae(t),Od=t=>{if(v(t))return ke.test(t)?t:t.split(/\s+/).map(e=>{if(e=e.trim(),!e)return"";if(kt(e))return`var(${e})`;if(/^\d/.test(e)||e.includes("px")||e==="0")return e;let n=at(e);return tn(n)?n:e}).join(" ")},Rd=(t,e)=>Xc(t,e),cl=(t,e)=>{if(v(t))return ke.test(t)?t:en(t).map(n=>(n=n.trim(),n?n.split(/\s+/).map(r=>{if(r=r.trim(),!r)return"";if(kt(r))return`var(${r})`;if(r==="inset"||r==="none")return r;let o=at(r);if(tn(o)){let i=zt(r,e);return A(i)?Object.values(i).filter(a=>a.includes(": "+e))[0]:i}if(/^\d/.test(r)||r==="0"||r.includes("px")||r.slice(-2)==="em")return r;let s=Ot(r,"shadow");return s&&s.shadow?s.shadow:r}).join(" "):"")).join(", ")},ll=(t,e)=>{let n=t.indexOf("(");if(n===-1)return t;let r=t.slice(0,n+1),o=t.slice(n+1,t.lastIndexOf(")")),s=")",a=en(o).map(c=>(c=c.trim(),c.split(/\s+/).map(f=>{if(!f||/^\d/.test(f)||f==="0"||IM.has(f)||f==="transparent"||ke.test(f))return f;let u=at(f);return tn(u)?u:f}).join(" ")));return r+a.join(", ")+s},Pd=(t,e)=>{if(!v(t))return;let n=O();return en(t).map(r=>{let o=r.trim();if(kt(o))return`var(${o})`;if(/^var\(/.test(o)||o.includes("url"))return o;if(n.gradient?.[o]){let s=zt(o,e);if(v(s))return s;if(A(s)){for(let i in s)if(v(s[i]))return s[i]}return o}return o.includes("gradient")?ll(o,e):o.includes("/")||o.startsWith("http")||o.includes(".")&&!Zt(o)?`url(${o})`:o}).join(", ")},Ld=t=>v(t)&&ht(t).map(e=>Ot(e,"gap").gap).join(" "),Dd=t=>{if(!v(t))return t;let e=O();return ht(t).map(n=>nA.test(n)?bo(n,e.spacing):n).join(" ")},f_=t=>{if(!v(t))return;let e=t.split(" ");return e.length?e.map(n=>kt(n)?`var(${n})`:n.length<3||n.includes("ms")?de(n).timing||n:Ce(n)?Ce(n):n).join(" "):t},fl=(t,e,n)=>{if(v(t))return t.split(",").map(r=>de(r).timing||r).join(",")},Id=t=>{if(!v(t))return;let e=t.split(",");if(e.length)return e.map(f_).join(",")};function Et(t,e,n={},r={}){let o=pt.call(this,e||n[t]);if(o==null)return;let s;if(v(o)){if(/^(?:env|var)\(/.test(o.trim()))return{[t]:o};if(o.includes("(")){let c=In(o);s=c[0],o=c[1]}let i=n.scaleBoxSize,a=Kc(t);!i&&a&&!r.ratio&&(o=Yc(o))}return r.ratio?Ue(n,t,o,s):Ot(o,t,void 0,s)}var N=(t,e=null,n)=>Et(t,e,n,{ratio:!0}),$M=(t,e,n)=>v(t)?ht(t).map(r=>nA.test(r)?Ue(e,n,r)[n]:r).join(" "):t,Mn=(t,e,n,r="borderRadius")=>{if(v(t))return{[r]:ht(t).map(o=>{let s=nl(o);return s!==void 0?$M(s,e,n):Ue(e,n,o)[n]}).join(" ")}};I();var Xs="__smblsThemeRootOwner",Zs=t=>{let e=t&&t.__prefersListener,n=t&&t.__prefersMq;if(e&&n)try{typeof n.removeEventListener=="function"?n.removeEventListener("change",e):typeof n.removeListener=="function"&&n.removeListener(e)}catch{try{n.removeListener(e)}catch{}}t&&(t.__prefersListener=null,t.__prefersMq=null)},rA=(t,e,n)=>{if(!(!t||!e)){Zs(t),t.__prefersListener=n,t.__prefersMq=e;try{e.addEventListener("change",n)}catch{e.addListener(n)}}},MM=(t,e)=>{let n=O(),{cssVars:r}=n,o=e.startsWith("--")?e:`--${e}`;return r[o]=t,t},pe=t=>t,NM=(t,e)=>{if(v(t)||Ie(t)){let n=O();if(n.cssVars&&e){let r=n.varPrefix?n.varPrefix+"-":"";n.cssVars[`--${r}size-${e}`]=t}}return t},$d={color:wr,gradient:Hs,font:Qc,fontFamily:Ks,fontfamily:Ks,theme:Zc,icons:xo,semanticIcons:pe,semanticicons:pe,svg:Gs,svgData:pe,typography:pe,shadow:Er,spacing:pe,media:pe,grid:pe,class:pe,timing:pe,reset:pe,unit:pe,animation:pe,vars:MM,sizes:NM,shape:pe,skins:pe},FM=(t,e,n,r)=>{or(t,n,e);let o={};for(let s of r)t[s]===e&&(t[s]=o);return t.verbose&&console.warn("[scratch] design-system family",n,"resolved to a host object; parked it and allocated a plain bucket"),o},u_=(t,e,n)=>{let r=O(),o=Mc(t),s=o.toLowerCase(),i=r[o]||r[s]||r[t],a=vn(i)?FM(r,i,s,[o,s,t]):i,c=$d[o]||$d[s];if(c)try{let l=c(e,n);return a&&(a[n]=l),a}catch(l){r.verbose&&console.warn("Error setting",s,"value",e,n,l)}if(!c){let l=a||(r[s]={});return l[n]=e,l}r.verbose&&console.warn("Can not find",s,"method in scratch")},d_=(t,e)=>{let n=O(),r=t.toLowerCase();return vn(e)?(or(n,r,e),n.verbose&&console.warn("[scratch] ignoring host object passed as the",r,"design-system family"),n[r]||n[t]):e==null?(n.verbose&&console.warn("[scratch] skipping empty design-system family",r),n[r]||n[t]):(Object.keys(e).sort((s,i)=>{let a=A(e[s])||D(e[s])?1:0,c=A(e[i])||D(e[i])?1:0;return a-c}).forEach(s=>{try{return u_(r,e[s],s)}catch(i){n.verbose&&console.warn("Error setting",r,"value",e[s],s,i)}}),n[r]||n[t])},Md=(t,e)=>{let n=e||O();n.globalTheme=t;let o=as(n)||(typeof document<"u"?document:null),s=o&&o.defaultView||(typeof window<"u"?window:null);if(o){let a=n.themeRoot||o.documentElement,c=t&&t!=="auto";if(a[Xs]=n,c)Zs(n),a.setAttribute("data-theme",t),n.resolvedTheme=t,t==="dark"||t==="light"?a.style.colorScheme=t:a.style.colorScheme="light dark";else if(s&&s.matchMedia){let l=u=>{let d=u.matches?"dark":"light";a.setAttribute("data-theme",d),n.resolvedTheme=d},f=s.matchMedia("(prefers-color-scheme: dark)");l(f),a.style.colorScheme="light dark",rA(n,f,l)}else Zs(n),a.setAttribute("data-theme","light"),n.resolvedTheme="light",a.style.colorScheme="light"}let i=n.varPrefix?`--${n.varPrefix}-theme-`:"--theme-";for(let a in n.cssVars)a.startsWith(i)&&delete n.cssVars[a];for(let a in n.cssMediaVars)delete n.cssMediaVars[a];if(o&&n.cssVars){let a=n.scopeSelector||":root",c=o.styleSheets;for(let l=0;l<c.length;l++)try{let f=c[l].cssRules;for(let u=0;u<f.length;u++)if(f[u].selectorText===a){for(let d in n.cssVars)f[u].style.setProperty(d,n.cssVars[d]);return n}}catch{}}return n},jM={},Eo=(t,e=jM)=>{let n=e.config||O(),{version:r,verbose:o,useVariable:s,useReset:i,useSvgSprite:a,useFontImport:c,useIconSprite:l,globalTheme:f,themeRoot:u,useDocumentTheme:d,useDefaultConfig:p,semanticIcons:g,hoverMedia:h,focusableRing:m,files:y,assets:w,...b}=t;e.newConfig&&(n=wd(e.newConfig)),kn(b.document)&&(n.__domDocument=b.document,delete b.document),kn(n.document)&&(n.__domDocument||(n.__domDocument=n.document),n.document={}),y!==void 0&&(n.files=y),w!==void 0&&(n.assets=w),o!==void 0&&(n.verbose=o),s!==void 0&&(n.useVariable=s),i!==void 0&&(n.useReset=i),c!==void 0&&(n.useFontImport=c),a!==void 0&&(n.useSvgSprite=a),l!==void 0&&(n.useIconSprite=l),d!==void 0&&(n.useDocumentTheme=d),f!==void 0&&(n.globalTheme=f),u!==void 0&&(n.themeRoot=u),t.useThemeSuffixedVars!==void 0&&(n.useThemeSuffixedVars=t.useThemeSuffixedVars),p!==void 0&&(n.useDefaultConfig=p),g!==void 0&&(n.semanticIcons=g),h!==void 0&&(n.hoverMedia=h),m!==void 0&&(n.focusableRing=m),n.verbose&&console.log(n);let k=as(n)||(typeof document<"u"?document:null),S=k&&k.defaultView||(typeof window<"u"?window:null),_=k&&(n.themeRoot||k.documentElement);if(_&&typeof _.setAttribute=="function")if(n.globalTheme&&n.globalTheme!=="auto")Zs(n),_.setAttribute("data-theme",n.globalTheme),n.resolvedTheme=n.globalTheme,_[Xs]=n,n.globalTheme==="dark"||n.globalTheme==="light"?_.style.colorScheme=n.globalTheme:_.style.colorScheme="light dark";else if(_[Xs]&&_[Xs]!==n&&_.hasAttribute("data-theme"))Zs(n),n.resolvedTheme=_.getAttribute("data-theme");else if(S&&S.matchMedia){let j=tt=>{let it=tt.matches?"dark":"light";_.setAttribute("data-theme",it),n.resolvedTheme=it},et=S.matchMedia("(prefers-color-scheme: dark)");j(et),_.style.colorScheme="light dark",_[Xs]=n,rA(n,et,j)}else Zs(n),_.setAttribute("data-theme","light"),n.resolvedTheme="light",_.style.colorScheme="light",_[Xs]=n;n.__svgCache||(n.__svgCache={}),zs(b);let E=Object.keys(b).filter(R=>!R.startsWith("__")),C=new Set(E);E.forEach(R=>{let j=R.toLowerCase();j!==R&&C.has(j)&&ft(b[j],b[R],Ee)});let $=new Set;if(E.forEach(R=>{let j=R.toLowerCase(),et=j!==R&&C.has(j)?j:R;$.has(et)||($.add(et),d_(et,b[et]))}),n.varPrefix&&(n.typography&&(n.typography.varPrefix=n.varPrefix),n.spacing&&(n.spacing.varPrefix=n.varPrefix),n.timing&&(n.timing.varPrefix=n.varPrefix)),b.typography)try{tl()}catch(R){n.verbose&&console.warn("Error applying typography sequence",R)}if(b.spacing)try{Gc()}catch(R){n.verbose&&console.warn("Error applying spacing sequence",R)}if(b.timing)try{rl()}catch(R){n.verbose&&console.warn("Error applying timing sequence",R)}try{al()}catch(R){n.verbose&&console.warn("Error applying skins",R)}ol();let M=il();return M&&(n.reset=M),n};var H=(t,e)=>e.split(" ").map(n=>t+"-"+n),g_="top right bottom left",m_=g_+" block block-start block-end inline inline-start inline-end",he="start end",Fn="width style color",Nd=t=>H(t,m_),BM=(()=>{let t=H("border","width style color image");for(let e of m_.split(" "))t.push("border-"+e,...H("border-"+e,Fn));return t})(),oA=t=>[...H("border-"+t,Fn+" start end"),...H("border-"+t+"-start",Fn),...H("border-"+t+"-end",Fn)],yt={animation:H("animation","name duration timing-function delay iteration-count direction fill-mode play-state timeline range range-start range-end"),background:H("background","image position position-x position-y size repeat origin clip attachment color"),border:BM};for(let t of["width","style","color"])yt["border-"+t]=m_.split(" ").map(e=>"border-"+e+"-"+t);for(let t of g_.split(" "))yt["border-"+t]=H("border-"+t,Fn);yt["border-block"]=oA("block");yt["border-inline"]=oA("inline");Object.assign(yt,{"border-image":H("border-image","source slice width outset repeat"),"border-radius":"top-left top-right bottom-right bottom-left start-start start-end end-start end-end".split(" ").map(t=>"border-"+t+"-radius"),columns:H("column","width count"),"column-rule":H("column-rule",Fn),container:H("container","name type"),"contain-intrinsic-size":H("contain-intrinsic","width height"),flex:H("flex","grow shrink basis"),"flex-flow":H("flex","direction wrap"),font:[...H("font","style variant weight stretch size"),"line-height",...H("font","family size-adjust kerning feature-settings variation-settings optical-sizing")],gap:["row-gap","column-gap"],grid:H("grid","template template-rows template-columns template-areas auto-rows auto-columns auto-flow"),"grid-template":H("grid-template","rows columns areas"),"grid-area":H("grid","row column row-start row-end column-start column-end"),"grid-row":H("grid-row",he),"grid-column":H("grid-column",he),inset:[...g_.split(" "),...H("inset","block block-start block-end inline inline-start inline-end")],"inset-block":H("inset-block",he),"inset-inline":H("inset-inline",he),"list-style":H("list-style","type position image"),margin:Nd("margin"),"margin-block":H("margin-block",he),"margin-inline":H("margin-inline",he),mask:H("mask","image mode repeat position clip origin size composite"),offset:H("offset","position path distance rotate anchor"),outline:H("outline",Fn),overflow:H("overflow","x y"),"overscroll-behavior":H("overscroll-behavior","x y"),padding:Nd("padding"),"padding-block":H("padding-block",he),"padding-inline":H("padding-inline",he)});for(let t of["content","items","self"])yt["place-"+t]=["align-"+t,"justify-"+t];Object.assign(yt,{"scroll-margin":Nd("scroll-margin"),"scroll-padding":Nd("scroll-padding"),"text-decoration":H("text-decoration","line style color thickness"),"text-emphasis":H("text-emphasis","style color"),transition:H("transition","property duration timing-function delay behavior")});var UM="block-start block-end inline-start inline-end".split(" ");for(let t of UM)yt["border-"+t]=H("border-"+t,Fn);for(let t of["block","inline"])for(let e of Fn.split(" "))yt["border-"+t+"-"+e]=H("border-"+t,he.split(" ").map(n=>n+"-"+e).join(" "));Object.assign(yt,{"animation-range":H("animation-range",he),"background-position":H("background-position","x y"),"font-variant":H("font-variant","alternates caps east-asian emoji ligatures numeric position"),"font-synthesis":H("font-synthesis","weight style small-caps"),marker:H("marker","start mid end"),"position-try":H("position-try","order fallbacks"),"scroll-margin-block":H("scroll-margin-block",he),"scroll-margin-inline":H("scroll-margin-inline",he),"scroll-padding-block":H("scroll-padding-block",he),"scroll-padding-inline":H("scroll-padding-inline",he),"scroll-timeline":H("scroll-timeline","name axis"),"view-timeline":H("view-timeline","name axis inset"),"text-box":H("text-box","trim edge"),"text-wrap":H("text-wrap","mode style"),"white-space":["white-space-collapse","text-wrap-mode"]});yt.font.push("font-language-override");var Nn=t=>"corner-"+t+"-shape";yt["corner-shape"]=[..."top-left top-right bottom-right bottom-left start-start start-end end-start end-end".split(" "),..."top right bottom left block-start block-end inline-start inline-end".split(" ")].map(Nn);Object.assign(yt,{"corner-top-shape":["top-left","top-right"].map(Nn),"corner-right-shape":["top-right","bottom-right"].map(Nn),"corner-bottom-shape":["bottom-left","bottom-right"].map(Nn),"corner-left-shape":["top-left","bottom-left"].map(Nn),"corner-block-start-shape":["start-start","start-end"].map(Nn),"corner-block-end-shape":["end-start","end-end"].map(Nn),"corner-inline-start-shape":["start-start","end-start"].map(Nn),"corner-inline-end-shape":["start-end","end-end"].map(Nn)});for(let t in yt){let e=yt[t],n=new Set(e);for(let r=0;r<e.length;r++){let o=yt[e[r]];if(o)for(let s of o)n.has(s)||(n.add(s),e.push(s))}}var ze={};for(let t in yt)for(let e of yt[t])(ze[e]||(ze[e]=[])).push(t);var h_=new Map,sA=t=>{let e=h_.get(t);if(e!==void 0)return e;h_.set(t,0),e=0;let n=ze[t];if(n)for(let r=0;r<n.length;r++)e=Math.max(e,sA(n[r])+1);return h_.set(t,e),e};function Qs(t){if(typeof t!="string")return 0;let e=t.charCodeAt(0)===45&&t.charCodeAt(1)!==45?t.replace(/^-(webkit|moz|ms|o)-/,""):t;return Object.prototype.hasOwnProperty.call(ze,e)?sA(e):0}var VM=/^(?:margin|padding|inset|scroll-margin|scroll-padding)(?:-(?:block|inline))?$|^border(?:-(?:block|inline))?-(?:width|style|color)$|^(?:border-radius|corner(?:-[a-z]+)*-shape|gap|overflow|overscroll-behavior|place-(?:content|items|self)|background-position|contain-intrinsic-size)$/,zM=/^(?:border(?:-(?:top|right|bottom|left|block|inline)(?:-(?:start|end))?)?|outline|column-rule)$/,HM=new Set(["none","hidden","dotted","dashed","solid","double","groove","ridge","inset","outset","auto"]),WM=t=>{let e=[],n=0,r="";for(let o of String(t).replace(/\s*!important\s*$/,"").trim())o==="("?n++:o===")"&&n--,n===0&&/\s/.test(o)?(r&&e.push(r),r=""):r+=o;return r&&e.push(r),e};function ul(t,e,n){let r=yt[t];if(!r||r.indexOf(n)===-1)return!1;if(VM.test(t))return!0;if(!zM.test(t)||typeof e=="function"||e==null||n.indexOf("border-image")===0)return!1;let o=WM(e);return o.length>=3?!0:/-style$/.test(n)&&o.some(s=>HM.has(s.toLowerCase()))}var ei=new Map,yA=null,y_=null,qM=null;function hl(t){t.batchAtomicCss&&(y_=t.batchAtomicCss),t.compoundCssClass&&(qM=t.compoundCssClass)}var KM=new Set,aA=t=>!!(t&&t.documentElement&&typeof t.createElement=="function"&&t.head!==void 0);function v_(t){try{let e=O();e&&(e.__domDocument=t)}catch{}t&&KM.add(t)}function Ao(){try{let t=O();if(t){if(aA(t.__domDocument))return t.__domDocument;if(aA(t.document))return t.document}}catch{}return typeof document<"u"?document:null}var ge={atomic:0,variable:0,global:0,keyframes:0,duplicate:0,invalid:0,dropped:0};function zd(){return{...ge}}function E_(){for(let t in ge)ge[t]=0;Ud=!1}var Ud=!1,Bd=(t,e)=>`${t} ${e}${t===1?"":"s"}`;function GM(t){let e=Date.parse(t);if(!isFinite(e))return"";let n=Math.floor((Date.now()-e)/864e5);return n<1?" (today)":` (${Bd(n,"day")} ago)`}function YM(){try{let t=sN();if(!t.length)return-1;let e=0;for(let n=0;n<t.length;n++)e+=t[n].cssRules?t[n].cssRules.length:0;return e}catch{return-1}}function XM(t,e){if(Ud)return!1;Ud=!0;let n="n/a \u2014 running from src/ (unbuilt), so no dist is in play",r="this IS the source",o="@symbo.ls/css";return console.error(`[@symbo.ls/css] CSS EMIT FAILURE (${t}) \u2014 the engine emitted ${Bd(ge.variable,"variable rule")} and ${Bd(ge.atomic,"atomic rule")}, while the design system held ${Bd(e,"CSS variable")}.
|
|
46
46
|
The document will render UNSTYLED and nothing else will report an error.
|
|
47
47
|
This is what a STALE dist/ looks like: an obsolete emitter against a current design system.
|
|
48
48
|
package : ${o}
|
|
49
49
|
built : ${n}
|
|
50
50
|
source : ${r}
|
|
51
51
|
emitted : ${JSON.stringify(ge)}
|
|
52
|
-
sheets : the style[data-smbls] tiers currently hold ${
|
|
52
|
+
sheets : the style[data-smbls] tiers currently hold ${YM()} rule(s)
|
|
53
53
|
FIX : cd smbls && npm run check:stale # every package whose src is newer than its dist
|
|
54
54
|
then rebuild the listed packages and clear the app's .parcel-cache
|
|
55
|
-
Do NOT trust any browser measurement taken on this page until that reads clean.`),!0}function
|
|
56
|
-
`);for(let y=0;y<m.length;y++)m[y]&&nn(m[y],void 0,"atomic",!0)}a.push(g)}else if(s)for(let u=0;u<s.length;u+=2)a.push(cA(s[u],s[u+1],n));let f=[];for(let u=0;u<c.length;u++)f.push(lN(c[u][0],c[u][1],n,o));return a.concat(f).join(" ").trim()}var gA=new Map,iN=/^&?:(hover|focus|focus-visible|focus-within|active)(?![\w-])/;function pl(t){return/^@(media|supports|container)\b/.test(t)}function aN(t){return typeof t!="string"||!t||pl(t)?!1:t.split(",").every(e=>iN.test(e.trim()))}var SA=t=>{let e=Object.prototype.toString.call(t);return e==="[object Object]"||e==="[object Array]"},S_=32,x_=1024,k_=!1;function jd(t,e,n){if(k_)return;k_=!0;let r=[e,...n],o=r.length>12?[...r.slice(0,6),`\u2026${r.length-9} more\u2026`,...r.slice(-3)]:r;console.warn(`[@symbo.ls/css] ${t} at ${o.join(" > ")} \u2014 skipped. A style block may hold only CSS values and nested plain blocks; the rest of this rule is still emitted. (One warning per page.)`)}function cN(t){try{return JSON.stringify(t)}catch{let n=[],r=0;return JSON.stringify(t,function(o,s){if(!s||typeof s!="object")return s;for(;n.length&&n[n.length-1]!==this;)n.pop();if(!(n.length&&(n.includes(s)||!SA(s)||n.length>S_||++r>x_)))return n.push(s),s})}}function lN(t,e,n,r){let o=cN(e),s=t.indexOf(":hover")!==-1||o.indexOf(":hover")!==-1,i=s&&C_(),a=(n?n+"":"")+t+o+(s&&!i?"rawhover":"")+(r?"state":""),c=ei.get(a);if(c){let _=gA.get(c);if(_)for(let w=0;w<_.length;w++)nn(_[w],void 0,"atomic");return c}c=n?`_${n}_c${Vd(a)}`:`_c${Vd(a)}`;let l=r?`.${c}.${c}`:`.${c}`,f=aN(t)?`${l}.${c}`:l,u="",d=[],p=_=>typeof _=="string"&&(_.indexOf("{")!==-1||_.indexOf("}")!==-1),g=new Set,h=0,m=(_,w)=>{g.add(w);let k="",A=Object.keys(w);for(let T=0;T<A.length;T++){let M=A[T],$=w[M];if($!=null)if(typeof $=="object"){let R=[..._,M];g.has($)?jd("a style value that loops back to one of its own ancestors",t,R):SA($)?R.length>S_?jd(`a style block nested more than ${S_} levels deep`,t,R):++h>x_?jd(`a style object with more than ${x_} nested blocks`,t,R):m(R,$):jd(`a ${Object.prototype.toString.call($).slice(8,-1)} (not a style block)`,t,R)}else{if(p($))continue;k+=ti(b_(M),$)}}g.delete(w),k&&(_.length===0?u+=k:d.push({chain:_,body:k}))};m([],e);let y=_=>_.startsWith(":")||_.startsWith("["),S=(_,w=!0)=>{let k=w&&_.length===1?f:l;if(!_.length)return k;let A=_[0].split(",").map(T=>T.trim()).map(T=>T.includes("&")?T.replace(/&/g,k):y(T)?`${k}${T}`:`${k} ${T}`);for(let T=1;T<_.length;T++){let M=_[T].split(",").map(R=>R.trim()),$=[];for(let R of A)for(let j of M)j.includes("&")?$.push(j.replace(/&/g,R)):y(j)?$.push(R+j):$.push(R+" "+j);A=$}return A.join(", ")},b=[],x=(_,w)=>{let k=_.filter(pl),A=S(_.filter(M=>!pl(M)),k.length===0),T=`${A}{${w}}`;for(let M=k.length-1;M>=0;M--)T=`${k[M]}{${T}}`;T=jn(T,A,i),b.push(T),nn(T,void 0,"atomic")};u&&x([t],u);for(let _ of d)x([t,..._.chain],_.body);return gA.set(c,b),ei.set(a,c),c}function vt(t){if(t==null||typeof t!="string"&&typeof t!="object")return;if(Hd(),typeof t=="string"){let s=t.indexOf("--")!==-1;nn(t,void 0,s?"variable":"global"),s&&aA(1);return}let e=C_(),n=0,r=Object.keys(t),o=s=>{let i=s.match(/max-width:\s*(\d+)/);return i?parseInt(i[1]):0};r.sort((s,i)=>{let a=s.startsWith("@media"),c=i.startsWith("@media");return!a&&!c?0:a?c?o(i)-o(s):1:-1});for(let s of r){let i=t[s];if(s.startsWith("@keyframes")){let a=__(i);a&&nn(`${s}{${a}}`,void 0,"keyframes");continue}if(pl(s))for(let a in i){let c=i[a];if(a.startsWith("@keyframes")){let l=__(c);l&&nn(`${s}{${a}{${l}}}`,void 0,"keyframes");continue}if(typeof c=="object"&&c!==null){let l="",f=0;for(let u in c){let d=u.charCodeAt(0)===45&&u.charCodeAt(1)===45;d&&f++;let p=d?u:dl(u);l+=ti(p,c[u])}n+=f,nn(jn(`${s}{${a}{${l}}}`,a,e),void 0,f?"variable":"global")}else{let l=a.charCodeAt(0)===45&&a.charCodeAt(1)===45;l&&n++;let f=l?a:dl(a);nn(`${s}{${ti(f,c)}}`,void 0,l?"variable":"global")}}else{let a="",c=!1,l=0;for(let f in i){let u=i[f];if(typeof u=="object"&&u!==null)c=!0;else{let d=f.charCodeAt(0)===45&&f.charCodeAt(1)===45;d&&l++;let p=d?f:dl(f);a+=ti(p,u)}}if(n+=l,a&&nn(jn(`${s}{${a}}`,s,e),void 0,l?"variable":"global"),c){let f=[],u=[];for(let d in i)typeof i[d]=="object"&&i[d]!==null&&(pl(d)?f.push(d):u.push(d));f.sort((d,p)=>{let g=h=>{let m=h.match(/max-width:\s*(\d+)/);return m?parseInt(m[1]):0};return g(p)-g(d)});for(let d of u)vt({[`${s} ${d}`]:i[d]});for(let d of f)vt({[d]:{[s]:i[d]}})}}}n>0&&aA(n)}function ni(t,e){return nn(`@keyframes ${t}{${__(e)}}`,void 0,"keyframes"),t}function xA(){ei.clear(),mA=null,k_=!1}function T_(){return ei.size}I();var Mw={};F(Mw,{DELEGATED_EVENTS:()=>ai,LIFECYCLE_EVENTS:()=>Cr,MIXINS:()=>Gd,NON_BUBBLING_EVENTS:()=>Yd,REGISTRY:()=>Nt,SVG_TAGS:()=>ii,addDelegatedEvent:()=>gl,addMethods:()=>gi,adoptHydrationNode:()=>Kd,applyExtends:()=>fi,cacheNode:()=>Ar,create:()=>re,createHTMLNode:()=>si,detectTag:()=>Bn,dispose:()=>zn,elementPath:()=>qd,flushMounts:()=>Al,globalEventKeyInfo:()=>Zd,inertOutsidePlugin:()=>bp,isSvgTag:()=>Er,isValidTag:()=>oi,refreshContextProto:()=>mi,registerEvent:()=>ci,registerGlobalEvent:()=>Qd,remove:()=>hi,removeDelegatedEvent:()=>ml,update:()=>di});Kt();Kt();var ri="http://www.w3.org/2000/svg",ii=new Set(["svg","path","circle","ellipse","line","polyline","polygon","rect","g","defs","use","symbol","clipPath","mask","pattern","image","text","tspan","textPath","marker","linearGradient","radialGradient","stop","filter","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","animate","animateMotion","animateTransform","set","foreignObject","desc","title","metadata"]),fN=new Set(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","i","iframe","img","input","ins","kbd","label","legend","li","link","main","map","mark","menu","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","search","section","select","slot","small","source","span","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","string","fragment","shadow"]);function oi(t){return fN.has(t)||ii.has(t)}function Er(t){return ii.has(t)}function Bn(t){let{tag:e,key:n}=t;if(typeof e=="function")try{e=e(t,t.state,t.context)}catch(s){e=void 0,typeof console<"u"&&console.error&&console.error(`[smbls] \`tag:\` factory threw on "${n||"<anon>"}" \u2014 falling back to key-based tag detection:`,s?.message||s)}if(e===!0&&(e=n),typeof e=="string"&&oi(e))return e;if(!n||typeof n!="string")return"div";let r=new Set(["html","head","body","meta","link","script","style","title","base","noscript","template","th","tr","td","thead","tbody","tfoot","caption","col","colgroup"]),o=n.toLowerCase();return o.includes(".")&&(o=o.split(".")[0]),o.includes("_")&&(o=o.split("_")[0]),oi(o)&&!r.has(o)?o:"div"}var kA={};function si(t,e){let n=e?.context?.document||globalThis.document;if(!n)return null;if(t==="string")return n.createTextNode(e?.text||"");if(t==="fragment")return n.createDocumentFragment();if(Er(t)){let r=e?.parent;if(t==="svg"||r?.node?.namespaceURI===ri)return n.createElementNS(ri,t);if(t!=="svg")return n.createElement("div")}return n.createElement(t)}function Ar(t){let e=t.tag=Bn(t),r=Er(e)&&(e==="svg"||t.parent?.node?.namespaceURI===ri)?"svg:"+e:e,o=t?.context?.document||globalThis.document,s=kA[r];if(s||(s=kA[r]=si(e,t)),!s)return null;let i=o&&s.ownerDocument!==o?si(e,t):s.cloneNode(!0);return e==="string"&&(i.nodeValue=t.text||""),i}var qd=t=>{let e=t.__ref;if(e&&e.__hydrationPath!==void 0)return e.__hydrationPath;let n=t.parent,r=n&&n.__ref?qd(n):null,o=r===null?"":r?r+"."+t.key:String(t.key);return e&&(e.__hydrationPath=o),o},uN=new Set(["src","srcset"]);function Kd(t){let e=t?.context?.__hydration;if(!e)return null;let n=t.tag=Bn(t);if(n==="string"||n==="fragment")return null;let r=qd(t),o=e.registry[r===""?"__root":r],s=o!==void 0?e.nodes[o]:null;if(!s||s.nodeType!==1||e.claimed.has(s))return o!==void 0&&e.misses++,null;let i=Er(n)&&(n==="svg"||t.parent?.node?.namespaceURI===ri),a=Er(n)&&!i&&n!=="svg"?"div":n,c=i?s.namespaceURI===ri:s.namespaceURI!==ri;if(s.localName!==a||!c)return e.misses++,null;e.claimed.add(s),e.adopted++;for(let l of Array.from(s.getAttributeNames?s.getAttributeNames():[]))uN.has(l)||s.removeAttribute(l);for(;s.firstChild;)s.removeChild(s.firstChild);return s}var Nt=new Set(["extends","children","content","childrenAs","childExtends","childExtendsRecursive","childProps","inheritParentProps","state","if","define","deps","tag","attr","style","text","html","value","data","classlist","class","vars","scope","root","context","$router","routes","fetch","variables","query","key","component","preventContentUpdate","preventContentRecreate","subscribeTo","autoGrow","srcObject","allowRuntimeTemplates","__name","__ref","__hash","__text","parent","node"]),Gd={text:"text",html:"html",style:"style",attr:"attr",data:"data",classlist:"classlist",state:"state",scope:"scope"},Cr=new Set(["start","init","complete","attachNode","stateInit","stateCreated","beforeUpdate","update","afterUpdate","beforeClassAssign","lazyLoad","render","renderRouter","done","create","frame","mounted","contentUpdate","startUpdate","stateUpdate","beforeStateUpdate","initInspect","initSync","beforeRemove","remove","bridgeMount","bridgeUpdate","bridgeDestroy"]),Yd=new Set(["load","error","abort","scroll","canplay","canplaythrough","ended","pause","play","playing","ratechange","seeked","seeking","stalled","suspend","timeupdate","volumechange","waiting","durationchange","loadeddata","loadedmetadata","progress","emptied","resize"]),Xd=new Set(["wheel","mousewheel","touchstart","touchmove","touchend","touchcancel"]),ai=new Set(["click","dblclick","mousedown","mouseup","mousemove","mouseenter","mouseleave","mouseover","mouseout","pointerdown","pointerup","pointermove","pointerenter","pointerleave","pointerover","pointerout","touchstart","touchend","touchmove","keydown","keyup","keypress","input","change","submit","reset","focus","blur","focusin","focusout","wheel","contextmenu","drag","dragstart","dragend","dragenter","dragleave","dragover","drop"]);I();var P_=new WeakMap,dN={passive:!0},pN={passive:!0,capture:!0},CA=(t,e)=>Xd.has(t)?e?pN:dN:e||!1;function TA(t){let e=P_.get(t);return e||(e={handlers:new Map,installed:new Set},P_.set(t,e)),e}function hN(t,e){let n=TA(e);if(n.installed.has(t))return;n.installed.add(t);let r=t==="focus"||t==="blur"||t==="focusin"||t==="focusout"||t==="mouseenter"||t==="mouseleave"||t==="pointerenter"||t==="pointerleave",o=t==="mouseenter"||t==="mouseleave"||t==="pointerenter"||t==="pointerleave";e.addEventListener(t,s=>{if(o){let a=s.target,c=n.handlers.get(t),l=c&&a?c.get(a):null;if(!l||s.relatedTarget&&typeof a.contains=="function"&&a.contains(s.relatedTarget))return;l(s);return}let i=s.target;for(;i&&i!==e;){let a=n.handlers.get(t);if(a){let c=a.get(i);if(c&&(c(s),s.cancelBubble))return}i=i.parentNode}},CA(t,r))}function gl(t,e,n,r){r||(r=e.ownerDocument?.documentElement||e.getRootNode());let o=TA(r);hN(t,r),o.handlers.has(t)||o.handlers.set(t,new WeakMap),o.handlers.get(t).set(e,n)}function ml(t,e,n){n||(n=e.ownerDocument?.documentElement||e.getRootNode());let r=P_.get(n);if(!r)return;let o=r.handlers.get(t);o&&o.delete(e)}function gN(t){return ai.has(t)&&!Cr.has(t)}function OA(t,e){let{context:n}=t,r=n?.designSystem;return o=>{r&&J(r);try{let s=e.call(t,o,t,t.state,n);if(s&&typeof s.then=="function"){s.catch(i=>{t.error=i,console.error("[DOMQL] Async event error:",i)}).finally(()=>{r&&X()});return}}catch(s){if(t.error=s,console.error("[DOMQL] Event error:",s),n?.strictMode)throw s}r&&X()}}var RA=t=>!!t&&(t.capture===!0||typeof t.passive=="boolean"||t.once===!0);function mN(t,e){return RA(e)?{capture:e.capture===!0,passive:typeof e.passive=="boolean"?e.passive:Xd.has(t),once:e.once===!0}:CA(t,!1)}function yN(t,e,n){return r=>{let o=r.target;if(o&&o.nodeType!==1&&(o=o.parentElement),!o||typeof o.closest!="function")return;let s;try{s=o.closest(e)}catch{return}s&&t.contains(s)&&n(r)}}function ci(t,e,n,r){let{node:o,context:s}=e;if(!o)return;let i=OA(e,n),a=r&&typeof r.selector=="string"&&r.selector;a&&(i=yN(o,a,i));let l=!Yd.has(t)&&gN(t)&&!RA(r),f=l?null:mN(t,r);if(l){let u=s?.rootNode||o.ownerDocument?.documentElement;gl(t,o,i,u)}else o.addEventListener(t,i,f);e.__ref.__eventCleanup||(e.__ref.__eventCleanup=[]),e.__ref.__eventCleanup.push(()=>{if(l){let u=s?.rootNode||o.ownerDocument?.documentElement;ml(t,o,u)}else o.removeEventListener(t,i,f)})}var O_=[["onDocument","document"],["onWindow","window"],["onVisualViewport","visualViewport"],["onMediaQuery","mediaQuery"]];function Zd(t){if(typeof t!="string")return null;for(let e=0;e<O_.length;e++){let n=O_[e][0];if(t.length<=n.length||!t.startsWith(n))continue;let r=t.charCodeAt(n.length);if(!(r<65||r>90))return{target:O_[e][1],eventName:t.slice(n.length).toLowerCase()}}return null}var bN=/^[A-Za-z_$][\w$]*$/;function _N(t,e,n){let r=e,o=!1,s,i=!1,a=null;if(e&&typeof e=="object"&&typeof e!="function"&&(r=e.handler,o=!!e.capture,i=!!e.once,typeof e.passive=="boolean"&&(s=e.passive),typeof e.query=="string"&&(a=e.query)),typeof r=="string"&&bN.test(r)){let c=r;r=function(f){return t.call(c,f)}}return typeof r!="function"?null:(s===void 0&&(s=Xd.has(n)),{handler:r,capture:o,passive:s,once:i,query:a})}function wN(t,e,n){let r=t.node?.ownerDocument||t.context?.document||(typeof document<"u"?document:null);if(!r||typeof r.addEventListener!="function")return null;if(e==="document")return r;let o=r.defaultView||(typeof window<"u"?window:null);if(!o)return null;if(e==="window")return typeof o.addEventListener=="function"?o:null;if(e==="visualViewport"){let s=o.visualViewport;return s&&typeof s.addEventListener=="function"?s:null}if(e==="mediaQuery"){let s=n&&n.query;if(typeof s!="string"||!s.trim()||typeof o.matchMedia!="function")return null;try{return o.matchMedia(s)||null}catch{return null}}return null}var R_=/^@media\s+/i,SN=/^[@[.#&:>*~+]/,vA=new Set;function EA(t,e){!Q()||vA.has(t)||(vA.add(t),console.warn(`[smbls] onMediaQueryChange: "${t}" ${e} \u2014 no listener is registered.`))}function xN(t,e){if(typeof e!="string")return null;let n=e.trim();if(!n)return null;let r=t.context?.designSystem?.media,o=i=>{let a=r&&typeof r=="object"?r[i]:void 0;return typeof a=="string"&&a.trim()?a.trim():null},s=n;if(n.charCodeAt(0)===64&&!R_.test(n)){if(s=o(n.slice(1)),!s)return EA(n,"is not a key of designSystem.media"),null}else s=o(n)||n;return R_.test(s)?s.replace(R_,"").trim()||null:SN.test(s)?(EA(n,`names "${s}", which is not a media query`),null):s}function kN(t,e,n,r){try{return t.addEventListener(e,n,r),!0}catch{return typeof t.addListener=="function"?(t.addListener(n),!0):!1}}function PA(t,e,n,r){try{t.removeEventListener(e,n,r)}catch{typeof t.removeListener=="function"&&t.removeListener(n)}}function vN(t){let e=t.node;if(!e)return!1;let n=e.nodeType===11?t.__ref?.__fragmentAnchor:e;return n?n.isConnected!==!1:!1}function Qd(t,e,n){if(e.__ref){if(Array.isArray(n)){if(t.target!=="mediaQuery")return;for(let o=0;o<n.length;o++)AA(t,e,n[o]);return}AA(t,e,n)}}function AA(t,e,n){let r=e.__ref,o=_N(e,n,t.eventName);if(!o||t.target==="mediaQuery"&&t.eventName!=="change"||t.target==="mediaQuery"&&(o.query=xN(e,o.query),!o.query))return;let s=wN(e,t.target,o);if(!s)return;let i=t.target+":"+(o.query?o.query+":":"")+t.eventName+":"+(o.capture?1:0);if(r.__globalEvents&&r.__globalEvents.has(i))return;let a=OA(e,o.handler),c=t.target==="window"&&t.eventName==="load",l=!1,f=p=>{if(vN(e)){if(c){if(l)return;l=!0}a(p)}},u={capture:o.capture,passive:o.passive,once:o.once};if(!kN(s,t.eventName,f,u))return;r.__globalEvents||(r.__globalEvents=new Map);let d={target:s,eventName:t.eventName,listener:f,options:u};r.__globalEvents.set(i,d),r.__eventCleanup||(r.__eventCleanup=[]),r.__eventCleanup.push(()=>{PA(s,t.eventName,f,u),r.__globalEvents&&r.__globalEvents.delete(i)}),c&&EN(e,i,d,()=>l)}function EN(t,e,n,r){let o=n.target.document;!o||o.readyState!=="complete"||queueMicrotask(()=>{let s=t.__ref;if(r()||!s||!s.__globalEvents||s.__globalEvents.get(e)!==n)return;let i=n.target,a=typeof i.Event=="function"?i.Event:typeof Event=="function"?Event:null;a&&(n.listener(new a("load")),n.options.once&&r()&&PA(i,"load",n.listener,n.options))})}Kt();fr();var AN=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);function li(t,e,n){t.context?.plugins?.length&&Ct("error",t,{hook:e,error:n})||console.error(`[DOMQL] Lifecycle "${e}" error:`,n)}function DA(t,e,n){let r=Qt();r&&Dt(null);let o=t.context?.designSystem;o&&J(o);try{return e.call(t,n,t,t.state,t.context)}finally{o&&X(),r&&Dt(r)}}function CN(t,e){if(!Q())return;let n=e.__children&&e.__children.length>0;!n&&t.html==null||console.warn(`[smbls] bridge host "${e.path.join(".")}" renders DOMQL ${n?"children":"html"} inside the node it hands to its library \u2014 the library owns that subtree and may replace them. Keep DOMQL children beside the host, not in it.`)}function IA(t){let e=t.__ref,n=t.node;if(!e||!n||e.__bridge||typeof t.onBridgeMount!="function"||!("scrollHeight"in n))return;let r=e.__bridge={settled:!1,failed:!1,disposed:!1,destroyed:!1,instance:void 0,effect:null};e.contentManaged=!0,CN(t,e);let o;try{o=DA(t,t.onBridgeMount,n)}catch(s){if(r.failed=!0,li(t,"onBridgeMount",s),t.context?.strictMode)throw s;return}if(o&&typeof o.then=="function"){o.then(s=>LA(t,r,s),s=>{r.failed=!0,li(t,"onBridgeMount",s)});return}LA(t,r,o)}function LA(t,e,n){if(e.settled=!0,e.instance=n,e.disposed){MA(t,e);return}if(Object.defineProperty(t,"bridge",{value:n,writable:!0,configurable:!0,enumerable:!1}),typeof t.onBridgeUpdate!="function")return;let r=t.__ref;e.effect=K(()=>{if(e.disposed)return;let o=t.context?.designSystem;o&&J(o);try{let s=t.onBridgeUpdate.call(t,e.instance,t,t.state,t.context);s&&typeof s.then=="function"&&s.catch(i=>li(t,"onBridgeUpdate",i))}catch(s){li(t,"onBridgeUpdate",s)}finally{o&&X()}},{depth:r.path.length,label:()=>r.path.join(".")+"::onBridgeUpdate"}),r.__effects.push(e.effect)}function $A(t){let e=t.__ref?.__bridge;!e||e.disposed||(e.disposed=!0,e.effect&&e.effect.dispose(),e.settled&&MA(t,e))}function MA(t,e){if(e.destroyed)return;e.destroyed=!0;let n=e.instance;if(e.instance=void 0,AN(t,"bridge")&&(t.bridge=void 0),typeof t.onBridgeDestroy=="function")try{let r=DA(t,t.onBridgeDestroy,n);r&&typeof r.then=="function"&&r.catch(o=>li(t,"onBridgeDestroy",o))}catch(r){li(t,"onBridgeDestroy",r)}}function NA(t){let e=[];return t.extends&&(Array.isArray(t.extends)?e.push(...t.extends):e.push(t.extends)),t.extend&&(Array.isArray(t.extend)?e.push(...t.extend):e.push(t.extend)),e}function fi(t,e,n){let r=NA(e);if(!r.length)return;let s=(t.context||n?.context||{}).components||{};for(let i=0;i<r.length;i++){let a=FA(r[i],s);a&&a!==e&&jA(t,a,n,new Set([e]))}}function FA(t,e){if(typeof t=="string"){if(t.includes(">")){let n=t.split(">").map(o=>o.trim()),r=e[n[0]]||e[`smbls.${n[0]}`];for(let o=1;o<n.length&&r;o++)r=r[n[o]];return r||null}return e[t]||e[`smbls.${t}`]||null}return typeof t=="object"&&t!==null?t:null}function jA(t,e,n,r=new Set){if(r.has(e))return;r.add(e);let o=NA(e);if(o.length){let a=(t.context||n?.context||{}).components||{};for(let c=0;c<o.length;c++){let l=FA(o[c],a);l&&jA(t,l,n,r)}}let s=L_(t);for(let i in e){if(i==="extends"||i==="extend")continue;let a=e[i];s&&s.set(i,s.rank),t[i]===void 0?a&&typeof a=="object"&&!Array.isArray(a)&&typeof a!="function"?t[i]={...a}:t[i]=a:typeof t[i]=="object"&&typeof a=="object"&&!Array.isArray(t[i])&&!Array.isArray(a)&&t[i]!==null&&a!==null?t[i]=BA(t[i],a):t[i]=a}}function L_(t){let e=t&&t.__ref;if(!e)return null;let n=e.__mergeLayer;return n||(n=e.__mergeLayer=new Map),n.rank=(n.rank||0)+1,n}function BA(t,e){let n={...t};for(let r in e){let o=n[r],s=e[r];o&&s&&typeof o=="object"&&typeof s=="object"&&!Array.isArray(o)&&!Array.isArray(s)&&typeof o!="function"&&typeof s!="function"?n[r]=BA(o,s):n[r]=s}return n}Kt();fr();I();var TN=["alert","alertdialog","application","article","banner","button","cell","checkbox","columnheader","combobox","complementary","contentinfo","definition","dialog","directory","document","feed","figure","form","grid","gridcell","group","heading","img","link","list","listbox","listitem","log","main","marquee","math","menu","menubar","menuitem","menuitemcheckbox","menuitemradio","navigation","none","note","option","presentation","progressbar","radio","radiogroup","region","row","rowgroup","rowheader","scrollbar","search","searchbox","separator","slider","spinbutton","status","switch","tab","table","tablist","tabpanel","term","textbox","timer","toolbar","tooltip","tree","treegrid","treeitem"],ON=["alignment-baseline","baseline-shift","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-rendering","cursor","direction","display","dominant-baseline","fill-opacity","fill-rule","filter","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","glyph-orientation-horizontal","glyph-orientation-vertical","image-rendering","letter-spacing","lighting-color","marker-end","marker-mid","marker-start","mask","mask-type","opacity","overflow","paint-order","pointer-events","shape-rendering","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","text-decoration","text-overflow","text-rendering","transform","transform-origin","unicode-bidi","vector-effect","visibility","white-space","word-spacing","writing-mode"],RN=["requiredExtensions","systemLanguage"],UA={circle:["cx","cy","r","pathLength"],ellipse:["cx","cy","rx","ry","pathLength"],line:["x1","y1","x2","y2","pathLength"],path:["d","pathLength"],polygon:["points","pathLength"],polyline:["points","pathLength"],rect:["x","y","width","height","rx","ry","pathLength"],g:[],defs:[],switch:[],symbol:["viewBox","preserveAspectRatio","refX","refY","x","y","width","height"],use:["href","xlink:href","x","y","width","height"],image:["href","xlink:href","x","y","width","height","preserveAspectRatio","crossorigin"],foreignObject:["x","y","width","height"],text:["x","y","dx","dy","rotate","textLength","lengthAdjust"],tspan:["x","y","dx","dy","rotate","textLength","lengthAdjust"],textPath:["href","xlink:href","path","startOffset","method","spacing","side","textLength","lengthAdjust"],linearGradient:["x1","y1","x2","y2","gradientUnits","gradientTransform","spreadMethod","href","xlink:href"],radialGradient:["cx","cy","r","fx","fy","fr","gradientUnits","gradientTransform","spreadMethod","href","xlink:href"],stop:["offset"],pattern:["x","y","width","height","patternUnits","patternContentUnits","patternTransform","viewBox","preserveAspectRatio","href","xlink:href"],clipPath:["clipPathUnits"],mask:["x","y","width","height","maskUnits","maskContentUnits"],marker:["viewBox","preserveAspectRatio","refX","refY","markerUnits","markerWidth","markerHeight","orient"],filter:["x","y","width","height","filterUnits","primitiveUnits"]},PN=new Set(["linearGradient","radialGradient","stop","clipPath","mask","marker","pattern","filter","symbol"]),LN=()=>{let t={};for(let e in UA)t[e]=[...UA[e],...PN.has(e)?[]:RN,...ON];return t},ui={default:["accesskey","autofocus","class","contenteditable","contextmenu","dir","draggable","enterkeyhint","exportparts","headingoffset","headingreset","hidden","id","inputmode","lang","nonce","part","placeholder","popover","slot","spellcheck","style","tabindex","title","translate","writingsuggestions","inert","radiogroup","role","about","datatype","inlist","prefix","property","resource","typeof","vocab","autocapitalize","autocorrect","autosave","color","itemprop","itemscope","itemtype","itemid","itemref","results","security","unselectable","is"],a:["accesskey","charset","coords","download","href","hreflang","name","ping","referrerpolicy","rel","rev","shape","target","type"],aria:["aria-activedescendant","aria-atomic","aria-autocomplete","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-dropeffect","aria-errormessage","aria-expanded","aria-flowto","aria-grabbed","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext"],anchor:["download","href","hreflang","media","ping","rel","target","type","referrerpolicy"],audio:["autoplay","controls","crossorigin","loading","loop","muted","preload","src"],area:["alt","coords","download","href","hreflang","media","referrerpolicy","rel","shape","target","ping"],base:["href","target"],blockquote:["cite"],button:["command","commandfor","disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","name","popovertarget","popovertargetaction","type","value"],canvas:["height","width"],col:["span","width"],colgroup:["span"],data:["value"],details:["name","open"],del:["cite","datetime"],dialog:["closedby","open"],embed:["height","src","type","width"],fieldset:["disabled","form","name"],form:["accept-charset","acceptcharset","action","autocomplete","enctype","method","name","novalidate","target","rel"],html:["manifest"],iframe:["allow","allowfullscreen","allowtransparency","frameborder","height","loading","marginheight","marginwidth","mozallowfullscreen","name","referrerpolicy","sandbox","scrolling","seamless","src","srcdoc","webkitallowfullscreen","width"],img:["alt","controls","crossorigin","decoding","fetchpriority","height","ismap","loading","referrerpolicy","sizes","src","srcset","usemap","width"],ins:["cite","datetime"],input:["accept","alpha","alt","autocomplete","capture","checked","colorspace","crossorigin","dirname","disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","height","indeterminate","list","max","maxlength","min","minlength","multiple","name","pattern","placeholder","popovertarget","popovertargetaction","readonly","required","size","src","step","type","value","width"],keygen:["challenge","disabled","form","keytype","keyparams","name"],label:["form","for"],li:["value"],link:["as","blocking","crossorigin","disabled","fetchpriority","href","hreflang","integrity","media","imagesrcset","imagesizes","referrerpolicy","rel","sizes","type","charset"],map:["name"],menu:["type"],media:["autoplay","controls","currenttime","defaultmuted","defaultplaybackrate","loop","mediagroup","muted","playsinline","preload","src","volume"],meta:["charset","content","http-equiv","name","media"],meter:["form","high","low","max","min","optimum","value"],quote:["cite"],object:["classid","data","form","height","name","type","usemap","width","wmode"],ol:["reversed","start","type"],optgroup:["disabled","label"],option:["disabled","label","selected","value"],output:["form","for","name"],param:["name","value"],progress:["max","value"],q:["cite"],slot:["name"],script:["async","blocking","charset","crossorigin","defer","fetchpriority","integrity","nomodule","nonce","referrerpolicy","src","type"],select:["autocomplete","disabled","form","multiple","name","required","size","value","onchange"],source:["height","media","sizes","src","srcset","type","width"],style:["blocking","media","nonce","scoped","type"],table:["align","bgcolor","border","cellpadding","cellspacing","frame","rules","summary","width"],template:["for","shadowrootclonable","shadowrootcustomelementregistry","shadowrootdelegatesfocus","shadowrootmode","shadowrootserializable","shadowrootslotassignment"],textarea:["autocomplete","cols","dirname","disabled","form","maxlength","minlength","name","placeholder","readonly","required","rows","value","wrap"],td:["align","colspan","headers","rowspan","scope","abbr","height","width","valign"],th:["align","colspan","headers","rowspan","scope","abbr"],time:["datetime"],track:["default","kind","label","src","srclang"],video:["autoplay","controls","crossorigin","disablepictureinpicture","disableremoteplayback","height","loading","loop","muted","playsinline","poster","preload","src","width"],svg:["className","class","color","height","id","lang","max","media","method","min","name","style","target","type","width","role","tabindex","crossorigin","accent-height","accumulate","additive","alignment-baseline","allowReorder","alphabetic","amplitude","arabic-form","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baseline-shift","baseProfile","bbox","begin","bias","by","calcMode","cap-height","clip","clip-path","clipPathUnits","clip-rule","color-interpolation","color-interpolation-filters","color-profile","color-rendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominant-baseline","dur","dx","dy","edgeMode","elevation","enable-background","end","exponent","externalResourcesRequired","fill","fill-opacity","fill-rule","filter","filterRes","filterUnits","flood-color","flood-opacity","focusable","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","format","from","fx","fy","g1","g2","glyph-name","glyph-orientation-horizontal","glyph-orientation-vertical","glyphRef","gradientTransform","gradientUnits","hanging","href","horiz-adv-x","horiz-origin-x","ideographic","image-rendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letter-spacing","lighting-color","limitingConeAngle","local","marker-end","markerHeight","marker-mid","marker-start","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","opacity","operator","order","orient","orientation","origin","overflow","overline-position","overline-thickness","paint-order","panose-1","path","pathLength","patternContentUnits","patternTransform","patternUnits","pointer-events","points","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","rendering-intent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","scale","seed","shape-rendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stop-color","stop-opacity","strikethrough-position","strikethrough-thickness","string","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","surfaceScale","systemLanguage","tableValues","targetX","targetY","text-anchor","text-decoration","textLength","text-rendering","to","transform","u1","u2","underline-position","underline-thickness","unicode","unicode-bidi","unicode-range","units-per-em","v-alphabetic","values","vector-effect","version","vert-adv-y","vert-origin-x","vert-origin-y","v-hanging","v-ideographic","viewBox","viewTarget","visibility","v-mathematical","widths","word-spacing","writing-mode","x1","x2","x","xChannelSelector","x-height","xlink:actuate","xlink:arcrole","xlink:href","xlink:role","xlink:show","xlink:title","xlink:type","xml:base","xml:lang","xmlns","xmlns:xlink","xml:space","y1","y2","y","yChannelSelector","z","zoomAndPan"],...LN()},zA=["oncopy","oncut","onpaste","oncompositionend","oncompositionstart","oncompositionupdate","onfocus","onfocusin","onfocusout","onblur","onchange","onbeforeinput","oninput","onreset","onsubmit","oninvalid","onformdata","onload","onerror","ontoggle","onkeydown","onkeypress","onkeyup","onabort","oncanplay","oncanplaythrough","oncuechange","ondurationchange","onemptied","onencrypted","onended","onloadeddata","onloadedmetadata","onloadstart","onpause","onplay","onplaying","onprogress","onratechange","onseeked","onseeking","onstalled","onsuspend","ontimeupdate","onvolumechange","onwaiting","onauxclick","onclick","oncontextmenu","ondblclick","ondrag","ondragend","ondragenter","ondragexit","ondragleave","ondragover","ondragstart","ondrop","onmousedown","onmouseenter","onmouseleave","onmousemove","onmouseout","onmouseover","onmouseup","onselect","onselectionchange","onselectstart","ontouchcancel","ontouchend","ontouchmove","ontouchstart","ongotpointercapture","onpointercancel","onpointerdown","onpointerenter","onpointerleave","onpointermove","onpointerout","onpointerover","onpointerup","onlostpointercapture","onscroll","onresize","onwheel","onanimationstart","onanimationend","onanimationiteration","ontransitionstart","ontransitionrun","ontransitionend","ontransitioncancel","onoutrostart","onoutroend","onintrostart","onintroend","onmessage","onmessageerror","onvisibilitychange","oncancel","onclose","onfullscreenchange","onfullscreenerror"],HA=t=>t.startsWith("aria")&&t.length>4&&t.charCodeAt(4)>=65&&t.charCodeAt(4)<=90?"aria-"+t.charAt(4).toLowerCase()+t.slice(5).replace(/([A-Z])/g,e=>"-"+e.toLowerCase()):t.startsWith("data")&&t.length>4&&t.charCodeAt(4)>=65&&t.charCodeAt(4)<=90?"data-"+t.charAt(4).toLowerCase()+t.slice(5).replace(/([A-Z])/g,e=>"-"+e.toLowerCase()):null,Un=t=>HA(t)||KA(t),WA=new Set(["tabIndex","readOnly","maxLength","minLength","autoComplete","autoFocus","autoPlay","contentEditable","spellCheck","colSpan","rowSpan","srcSet","crossOrigin","accessKey","inputMode","enterKeyHint","formAction","noValidate","autoCapitalize","autoCorrect","writingSuggestions","headingOffset","headingReset","exportParts"]),D_=new Set;for(let t in ui)t==="default"||t==="aria"||t==="svg"||ui[t].forEach(e=>{e.startsWith("on")||D_.add(e)});var qA=t=>{let e=t.charCodeAt(0);if(e<97||e>122||!/[A-Z]/.test(t))return null;let n=t.replace(/[A-Z]/g,o=>"-"+o.toLowerCase());if(D_.has(n))return n;let r=t.toLowerCase();return D_.has(r)?r:null},KA=t=>WA.has(t)?t.toLowerCase():qA(t),DN=new Set(["draggable","contenteditable","spellcheck","autocorrect","writingsuggestions","translate"]),IN=new Map([["autocorrect",["on","off"]],["translate",["yes","no"]]]),rn=t=>typeof t=="string"&&(DN.has(t)||t.startsWith("aria-")),ne=(t,e)=>{if(e!==!0&&e!==!1)return e;if(rn(t)){let n=IN.get(t);return n?e?n[0]:n[1]:e?"true":"false"}return e===!0?"":e},He=(t,e)=>{if(e.startsWith("aria-")||e.startsWith("data-")||HA(e)||WA.has(e)||ui.default.includes(e))return!0;if(Object.prototype.hasOwnProperty.call(ui,t)){let n=ui[t];if(n.includes(e))return!0;let r=qA(e);return r!==null&&n.includes(r)}return!1},$_=t=>{if(!v(t))return!1;let e=t.toLowerCase();return zA.includes(e)},$N=(t,e,n)=>{let r={};for(let o in e)if(Object.prototype.hasOwnProperty.call(e,o)){if(n&&o in n)continue;if(o==="aria"&&e[o]&&typeof e[o]=="object"){for(let a in e[o])It(e[o][a])&&(r["aria-"+a]=e[o][a]);continue}if(o==="data"&&e[o]&&typeof e[o]=="object"){for(let a in e[o])if(It(e[o][a])){let c=a.replace(/([A-Z])/g,l=>"-"+l.toLowerCase());r["data-"+c]=e[o][a]}continue}let s=He(t,o),i=$_(o);if(It(e[o])&&(s||i)){let a=Un(o)||o;r[a]=e[o]}}return r},MN=(t,e)=>{let n={};if(t.attr)for(let r in t.attr)n[r]=t.attr[r](e,e.state,e.context);if(t.aria&&typeof t.aria=="object")for(let r in t.aria){let o=t.aria[r];typeof o=="function"&&(n["aria-"+r]=o(e,e.state,e.context))}if(t.data&&typeof t.data=="object")for(let r in t.data){let o=t.data[r];if(typeof o=="function"){let s=r.replace(/([A-Z])/g,i=>"-"+i.toLowerCase());n["data-"+s]=o(e,e.state,e.context)}}return n},Tr=(t,e)=>{let n=t.call("exec",e,t);if(n)return v(n)&&n.includes("{{")&&(n=t.call("replaceLiteralsWithObjectFields",n)),n},I_=(t,e)=>{let n=(t.preSrc||"")+(Tr(t,e)||"");if(!n)return;try{return new URL(n),n}catch{}let{context:r}=t;if(!r.files&&!r.assets)return n;if(n.startsWith("/assets/")){let o=n.slice(8),s=r.assets&&(r.assets[n]||r.assets[o]);return s&&s.content?s.content.src:n}if(n.startsWith("/files/")){let o=n.slice(7),s=r.files&&(r.files[n]||r.files[o]);return s&&s.content?s.content.src:n}if(r.assets){let o=r.assets[n];if(o&&o.content)return o.content.src}if(r.files){let o=r.files[n];if(o&&o.content)return o.content.src}return n},Ao={src:t=>I_(t,t.src),href:t=>Tr(t,t.href),action:t=>Tr(t,t.action),poster:t=>I_(t,t.poster),data:t=>Tr(t,t.data)},M_=t=>{let e=t.tag||"div",n={};for(let r in Ao)if(t[r]!==void 0&&He(e,r)){let o=Ao[r](t);o!==void 0&&(n[r]=o)}return n},VA=(t,e)=>{let n=e.context?.cases?.[t];if(n!==void 0)return P(n)?n.call(e,e):!!n},NN=(t,e,n)=>{if(t==="$"){let o=VA(e,n);return o===void 0&&(o=!!n[e]),o}let r=n[e]===!0||n.state[e];if(!r){let o=VA(e,n);o!==void 0&&(r=o)}return t==="."?!!r:!r},FN=new Set(["$",".","!"]),N_=(t,e,n,r=NN)=>{let o={},s=(i,a,c,l)=>{let f=a;o[i]=u=>{if(r(c,l,u))return P(f)?f(u,u.state,u.context):f}};for(let i in t){let a=i.charAt(0);if(!FN.has(a))continue;let c=t[i];if(!c||typeof c!="object")continue;let l=i.slice(1);for(let f in c){if(n&&f in n)continue;if(f==="aria"&&c[f]&&typeof c[f]=="object"){for(let g in c[f])s("aria-"+g,c[f][g],a,l);continue}if(f==="data"&&c[f]&&typeof c[f]=="object"){for(let g in c[f]){let h=g.replace(/([A-Z])/g,m=>"-"+m.toLowerCase());s("data-"+h,c[f][g],a,l)}continue}let u=He(e,f),d=$_(f);if(!u&&!d)continue;let p=Un(f)||f;s(p,c[f],a,l)}}return o};function di(t={},e={}){let n=this,r=n.__ref;if(!r)return;if((typeof t=="string"||typeof t=="number")&&(t={text:t}),!e.preventListeners&&typeof n.onBeforeUpdate=="function"&&F_(r))try{let a=n.onBeforeUpdate(n,n.state,n.context,e);if(a&&typeof a.then=="function")a.then(()=>Vn(r,!1),c=>{Vn(r,!0),n.context?.plugins?.length&&Ct("error",n,{hook:"onBeforeUpdate",error:c})||console.error("[DOMQL] onBeforeUpdate error:",c)});else if(Vn(r,!1),a===!1)return n}catch(a){throw Vn(r,!0),a}let o=!t||Object.keys(t).length===0,s=[],i=!1;Nf(()=>{if(t.state&&_t(n.state)&&n.state.$update(t.state),t.text!==void 0&&(n.text=t.text,!r.__exec.text&&n.node&&pi(n,t.text??"")),t.html!==void 0&&(n.html=t.html,!r.__exec.html&&n.node&&(n.node.innerHTML=t.html)),t.style&&n.node?.style){if(!r.__exec.style){let a=yl(n,t.style);for(let c in a){let l=a[c];if(l==null)continue;let f=c.replace(/[A-Z]/g,d=>"-"+d.toLowerCase()),u=String(l).replace(/\s*!important\s*$/,"");n.node.style.setProperty(f,u,"important")}}n.style||(n.style={}),Object.assign(n.style,t.style)}if(t.attr&&n.node?.setAttribute){for(let a in t.attr){let c=t.attr[a],l=Co(n.node,a);c==null||c===!1&&!rn(a)?n.node.removeAttribute(a):typeof c!="function"&&typeof c!="object"&&n.node.setAttribute(a,ne(a,c)),To(n.node,l)}n.attr||(n.attr={}),Object.assign(n.attr,t.attr)}if(t.data&&n.node?.dataset){for(let a in t.data)n.node.dataset[a]=t.data[a];n.data||(n.data={}),Object.assign(n.data,t.data)}if(t.vars&&typeof t.vars=="object"&&!Array.isArray(t.vars)){let a=n.vars&&typeof n.vars=="object"&&!Array.isArray(n.vars)?n.vars:null;n.vars={...a,...t.vars},i=!0}for(let a in t){if(Nt.has(a)||a==="state")continue;let c=t[a],l=n[a];if(l&&l.__ref&&typeof l.update=="function")l.update(c,e);else if(typeof c=="object"&&c!==null){let f=a.charCodeAt(0);f>=65&&f<=90&&re(c,n,a,e)}else a!=="text"&&a!=="html"&&a!=="style"&&a!=="attr"&&a!=="data"&&(n[a]=c,typeof c!="function"&&s.push(a))}});for(let a=0;a<s.length;a++)XA(n,s[a]);if(n.node){let a=i;for(let c=0;!a&&c<s.length;c++)GA(s[c])&&(a=!0);a&&YA(n)}if(n.node&&o&&r.__effects&&r.__effects.length)for(let a=0;a<r.__effects.length;a++){let c=r.__effects[a];c&&!c._disposed&&!c._isSubscribeToEffect&&typeof c._execute=="function"&&c._execute()}else if(n.node&&r.__conditionalRunners)for(let a of r.__conditionalRunners)a();return Ct("update",n),!e.preventListeners&&typeof n.onUpdate=="function"&&n.onUpdate(n,n.state,n.context,e),n}Kt();function zn(t){if(!t)return;let e=t.__ref;if(!e)return;let n=Qt();if(n){Dt(null);try{return zn(t)}finally{Dt(n)}}e.__disposed=!0;try{typeof t.onBeforeRemove=="function"&&t.onBeforeRemove(t,t.state,t.context)}catch(o){console.error("[smbls] onBeforeRemove error:",o)}if(e.__bridge&&$A(t),e.__effects){for(let o=0;o<e.__effects.length;o++)e.__effects[o].dispose();e.__effects.length=0}if(typeof e.__releaseMedia=="function"&&(e.__releaseMedia(),e.__releaseMedia=null),e.__eventCleanup){for(let o=0;o<e.__eventCleanup.length;o++)e.__eventCleanup[o]();e.__eventCleanup.length=0}if(e.__children){let o=e.__children.slice();e.__children.length=0;for(let s=0;s<o.length;s++){let i=t[o[s]];i&&i.__ref&&zn(i)}}t.node?.parentNode?t.node.remove():t.tag==="fragment"&&e.__fragmentAnchor?.parentNode&&e.__fragmentAnchor.remove();let r=t.state?.$destroy||t.state?.destroy;if(typeof r=="function"&&t.state.__element===t&&r.call(t.state),t.parent?.__ref?.__children){let o=t.parent.__ref.__children.indexOf(t.key);o!==-1&&t.parent.__ref.__children.splice(o,1),delete t.parent[t.key]}try{typeof t.onRemove=="function"&&t.onRemove(t)}catch(o){console.error("[smbls] onRemove error:",o)}t.node=null,t.parent=null,t.__ref=null}function hi(){zn(this)}I();I();var tC=["ease","linear","ease-in","ease-out","ease-in-out","step-start","step-end"],jN=["none","forwards","backwards","both"],BN=["normal","reverse","alternate","alternate-reverse"],UN=["running","paused"],VN=/^(?:translate(?:3d|x|y|z)?\((?:\s*0[a-z%]*\s*,?)+\)|scale(?:3d|x|y|z)?\((?:\s*1(?:\.0+)?\s*,?)+\)|rotate(?:3d|x|y|z)?\((?:\s*0[a-z%]*\s*,?)+\)|skew(?:x|y)?\((?:\s*0[a-z%]*\s*,?)+\)|matrix\(\s*1\s*,\s*0\s*,\s*0\s*,\s*1\s*,\s*0\s*,\s*0\s*\))$/,zN=t=>{let e=String(t).trim().toLowerCase();if(e===""||e==="none"||e==="initial"||e==="unset")return!0;let n=e.match(/[a-z0-9]+\([^()]*\)/g);return!n||n.join("").replace(/\s+/g,"")!==e.replace(/\s+/g,"")?!1:n.every(r=>VN.test(r.replace(/\s+/g,"")))},ZA=t=>/^(?:\s*0[a-z%]*)+\s*$/.test(String(t).toLowerCase())||/^(none|initial|unset)$/.test(String(t).trim().toLowerCase()),HN={transform:zN,translate:ZA,rotate:t=>ZA(t)||/^\s*(?:[xyz]\s+)?0(?:deg|rad|turn|grad)?\s*$/.test(String(t).toLowerCase()),scale:t=>/^(none|initial|unset)$/.test(String(t).trim().toLowerCase())||/^(?:\s*1(?:\.0+)?)+\s*$/.test(String(t)),opacity:t=>/^(initial|unset)$/.test(String(t).trim().toLowerCase())||Number(t)===1},WN=t=>{let e=String(t).trim().toLowerCase();if(e==="from")return 0;if(e==="to")return 100;let n=e.match(/^(\d+(?:\.\d+)?)%$/);return n?Number(n[1]):null},qN=t=>{if(!E(t))return null;let e=null,n=-1;for(let r in t){let o=WN(r);o==null||!E(t[r])||o>=n&&(n=o,e=t[r])}return e},KN=t=>{let e=qN(t);if(!e)return!1;let n=Object.keys(e);if(!n.length)return!1;for(let r of n){let o=HN[r];if(!o)return!1;let s=e[r];if(s==null||typeof s=="object"||typeof s=="function"||!o(s))return!1}return!0},GN=(t,e)=>{if(E(t))return t;let{animation:n}=e.context&&e.context.designSystem||{},r=n&&n[t];return E(r)?r:null},YN=["reverse","alternate","alternate-reverse"],eC=(t,e,n)=>{let r=n||e.animationDirection;return r&&YN.includes(String(r))?"both":KN(GN(t,e))?"backwards":"both"},XN=0,QA=new Map,j_=(t,e)=>{let{animation:n}=e.context&&e.context.designSystem||{};if(E(t)){let o=JSON.stringify(t),s=QA.get(o);if(s)return s;let i=`smbls-anim-${XN++}`,a=ni(i,t);return QA.set(o,a),a}let r=n&&n[t];return E(r)?ni(t,r):t},nC=/^[+-]?(?:\d+(?:\.\d*)?|\.\d+)m?s$/i,ZN=/^(?:\d+(?:\.\d*)?|\.\d+)$/,QN=/^-?[A-Z][0-9]?$/,rC=/^(?:cubic-bezier|steps|linear)\(/,JN=/^(?:calc|min|max|clamp)\(/,tF=t=>t.includes("(")||t.startsWith("--"),eF=(t,e)=>{if(!QN.test(t))return!1;let n=e&&e.sequence;if(!E(n))return!1;let r=t.charCodeAt(0)===45?t.slice(1):t;return!!(n[r]||r.length===2&&n[r[0]])},nF=t=>{if(!v(t))return!1;let e=t.trim();return tC.includes(e)||rC.test(e)||e.startsWith("var(")},rF=(t,e)=>!!e&&nF(e[t]||e[lo(t)]),oF=["duration","timingFunction","delay","iterationCount","direction","fillMode","playState"],sF=t=>{let e=[],n=0,r="";for(let o of String(t).trim())o==="("?n++:o===")"&&n>0&&n--,n===0&&/\s/.test(o)?(r&&e.push(r),r=""):r+=o;return r&&e.push(r),e},iF=(t,e,n)=>{let r={duration:null,delay:null,timingFunction:null,iterationCount:null,direction:null,fillMode:null,playState:null},o=null,s=[],i=[],a=(f,u)=>{r[f]==null?r[f]=u:s.push(u)};for(let f of sF(t))e&&e[f]?o=f:nC.test(f)||eF(f,n)?r.duration==null?r.duration=f:r.delay==null&&(r.delay=f):tC.includes(f)||rF(f,n)?a("timingFunction",f):rC.test(f)?r.timingFunction==null&&(r.timingFunction=f):f==="infinite"?a("iterationCount",f):ZN.test(f)?r.iterationCount==null&&(r.iterationCount=Number(f)):BN.includes(f)?a("direction",f):jN.includes(f)?a("fillMode",f):UN.includes(f)?a("playState",f):tF(f)?i.push(f):s.push(f);let c=o||s[0]||i.shift()||null,l=new Set;for(let f of i){let u=oF.find(d=>r[d]==null);if(!u)break;r[u]=f.startsWith("--")?`var(${f})`:f,l.add(u)}return{name:c,...r,opaqueSlots:l}},aF=(t,e)=>{let{animation:n}=e.context&&e.context.designSystem||{},{timing:r}=O()||{};return en(String(t)).map(o=>o.trim()).filter(Boolean).map(o=>iF(o,n,r))},JA=(t,e)=>nC.test(t)||e&&!JN.test(t)&&!/^(?:var|env)\(/.test(t)?t:de(t).timing||t,cF=(t,e)=>{let n=r=>t.opaqueSlots.has(r);return{animationName:t.name==null?void 0:j_(t.name,e),animationDuration:t.duration!=null?JA(t.duration,n("duration")):de(e.animationDuration||"A").timing,animationDelay:t.delay!=null?JA(t.delay,n("delay")):de(e.animationDelay||"0s").timing,animationTimingFunction:t.timingFunction!=null?n("timingFunction")?t.timingFunction:Ce(t.timingFunction):Ce(e.animationTimingFunction||"ease"),animationFillMode:t.fillMode||e.animationFillMode||eC(t.name,e,t.direction),animationIterationCount:t.iterationCount!=null?t.iterationCount:e.animationIterationCount||1,animationPlayState:t.playState||e.animationPlayState,animationDirection:t.direction||e.animationDirection}},lF={animationName:"none",animationPlayState:"running",animationDirection:"normal"},fF=(t,e)=>{let n=t.map(o=>cF(o,e));if(n.length===1)return n[0];let r={};for(let o in n[0]){let s=n.map(i=>i[o]);s.every(i=>i==null)||(r[o]=s.map(i=>i??lF[o]).join(", "))}return r},B_={animation:(t,e)=>{if(t!=null){if(v(t)&&/[\s,]/.test(t)){let n=aF(t,e);if(n.length)return fF(n,e)}return{animationName:j_(t,e),animationDuration:de(e.animationDuration||"A").timing,animationDelay:de(e.animationDelay||"0s").timing,animationTimingFunction:Ce(e.animationTimingFunction||"ease"),animationFillMode:e.animationFillMode||eC(t,e),animationIterationCount:e.animationIterationCount||1,animationPlayState:e.animationPlayState,animationDirection:e.animationDirection}}},animationName:(t,e)=>({animationName:j_(t,e)}),animationDuration:t=>({animationDuration:de(t).timing}),animationDelay:t=>({animationDelay:de(t).timing}),animationTimingFunction:t=>({animationTimingFunction:Ce(t)}),animationIterationCount:t=>({animationIterationCount:t}),animationFillMode:t=>({animationFillMode:t}),animationPlayState:t=>({animationPlayState:t}),animationDirection:t=>({animationDirection:t})};I();var Jd=(t,e,n)=>{if(typeof e=="number"&&(e=String(e)),!v(e))return;let[r,o]=ht(e);return{...N(t+"Start",r,n),...N(t+"End",o||r,n)}},U_={show:t=>t?void 0:{display:"none !important"},hide:t=>t?{display:"none !important"}:void 0,height:(t,e)=>N("height",t,e),width:(t,e)=>N("width",t,e),boxSizing:t=>Bt(t)?{boxSizing:"border-box"}:{boxSizing:t},boxSize:t=>{if(!v(t))return;let[e,n]=ht(t);return{...Et("height",e),...Et("width",n||e)}},inlineSize:(t,e)=>N("inlineSize",t,e),blockSize:(t,e)=>N("blockSize",t,e),minWidth:(t,e)=>N("minWidth",t,e),maxWidth:(t,e)=>N("maxWidth",t,e),widthRange:t=>{if(!v(t))return;let[e,n]=ht(t);return{...Et("minWidth",e),...Et("maxWidth",n||e)}},minHeight:(t,e)=>N("minHeight",t,e),maxHeight:(t,e)=>N("maxHeight",t,e),heightRange:t=>{if(!v(t))return;let[e,n]=ht(t);return{...Et("minHeight",e),...Et("maxHeight",n||e)}},size:t=>{if(!v(t))return;let[e,n]=ht(t);return{...N("inlineSize",e),...N("blockSize",n||e)}},minBlockSize:(t,e)=>N("minBlockSize",t,e),minInlineSize:(t,e)=>N("minInlineSize",t,e),maxBlockSize:(t,e)=>N("maxBlockSize",t,e),maxInlineSize:(t,e)=>N("maxInlineSize",t,e),minSize:t=>{if(!v(t))return;let[e,n]=ht(t);return{...Et("minInlineSize",e),...Et("minBlockSize",n||e)}},maxSize:t=>{if(!v(t))return;let[e,n]=ht(t);return{...Et("maxInlineSize",e),...Et("maxBlockSize",n||e)}},borderWidth:(t,e)=>N("borderWidth",t,e),borderTopWidth:(t,e)=>N("borderTopWidth",t,e),borderRightWidth:(t,e)=>N("borderRightWidth",t,e),borderBottomWidth:(t,e)=>N("borderBottomWidth",t,e),borderLeftWidth:(t,e)=>N("borderLeftWidth",t,e),textDecorationThickness:(t,e)=>N("textDecorationThickness",t,e),textUnderlineOffset:(t,e)=>N("textUnderlineOffset",t,e),padding:(t,e)=>N("padding",t,e),paddingInline:t=>{if(!v(t))return;let[e,n]=ht(t);return{...Et("paddingInlineStart",e),...Et("paddingInlineEnd",n||e)}},paddingBlock:t=>{if(!v(t))return;let[e,n]=ht(t);return{...Et("paddingBlockStart",e),...Et("paddingBlockEnd",n||e)}},paddingTop:(t,e)=>N("paddingBlockStart",t,e),paddingBottom:(t,e)=>N("paddingBlockEnd",t,e),paddingLeft:(t,e)=>N("paddingInlineStart",t,e),paddingRight:(t,e)=>N("paddingInlineEnd",t,e),paddingBlockStart:(t,e)=>N("paddingBlockStart",t,e),paddingBlockEnd:(t,e)=>N("paddingBlockEnd",t,e),paddingInlineStart:(t,e)=>N("paddingInlineStart",t,e),paddingInlineEnd:(t,e)=>N("paddingInlineEnd",t,e),margin:(t,e)=>N("margin",t,e),marginInline:t=>{if(!v(t))return;let[e,n]=ht(t);return{...Et("marginInlineStart",e),...Et("marginInlineEnd",n||e)}},marginBlock:t=>{if(!v(t))return;let[e,n]=ht(t);return{...Et("marginBlockStart",e),...Et("marginBlockEnd",n||e)}},marginTop:(t,e)=>N("marginBlockStart",t,e),marginBottom:(t,e)=>N("marginBlockEnd",t,e),marginLeft:(t,e)=>N("marginInlineStart",t,e),marginRight:(t,e)=>N("marginInlineEnd",t,e),marginInlineStart:(t,e)=>N("marginInlineStart",t,e),marginInlineEnd:(t,e)=>N("marginInlineEnd",t,e),marginBlockStart:(t,e)=>N("marginBlockStart",t,e),marginBlockEnd:(t,e)=>N("marginBlockEnd",t,e),scrollMargin:(t,e)=>N("scrollMargin",t,e),scrollMarginTop:(t,e)=>N("scrollMarginTop",t,e),scrollMarginRight:(t,e)=>N("scrollMarginRight",t,e),scrollMarginBottom:(t,e)=>N("scrollMarginBottom",t,e),scrollMarginLeft:(t,e)=>N("scrollMarginLeft",t,e),scrollMarginBlock:(t,e)=>Jd("scrollMarginBlock",t,e),scrollMarginInline:(t,e)=>Jd("scrollMarginInline",t,e),scrollMarginBlockStart:(t,e)=>N("scrollMarginBlockStart",t,e),scrollMarginBlockEnd:(t,e)=>N("scrollMarginBlockEnd",t,e),scrollMarginInlineStart:(t,e)=>N("scrollMarginInlineStart",t,e),scrollMarginInlineEnd:(t,e)=>N("scrollMarginInlineEnd",t,e),scrollPadding:(t,e)=>N("scrollPadding",t,e),scrollPaddingTop:(t,e)=>N("scrollPaddingTop",t,e),scrollPaddingRight:(t,e)=>N("scrollPaddingRight",t,e),scrollPaddingBottom:(t,e)=>N("scrollPaddingBottom",t,e),scrollPaddingLeft:(t,e)=>N("scrollPaddingLeft",t,e),scrollPaddingBlock:(t,e)=>Jd("scrollPaddingBlock",t,e),scrollPaddingInline:(t,e)=>Jd("scrollPaddingInline",t,e),scrollPaddingBlockStart:(t,e)=>N("scrollPaddingBlockStart",t,e),scrollPaddingBlockEnd:(t,e)=>N("scrollPaddingBlockEnd",t,e),scrollPaddingInlineStart:(t,e)=>N("scrollPaddingInlineStart",t,e),scrollPaddingInlineEnd:(t,e)=>N("scrollPaddingInlineEnd",t,e),gap:t=>({gap:Ld(t)}),columnGap:(t,e)=>Ue(e,"columnGap",t),rowGap:(t,e)=>Ue(e,"rowGap",t),flexWrap:t=>{if(t!=null)return{display:"flex",flexWrap:t}},flexFlow:(t,e)=>{let n=e.reverse;if(!v(t))return;let[r,o]=(t||"row").split(" ");return(t.startsWith("x")||t==="row")&&(r="row"),(t.startsWith("y")||t==="column")&&(r="column"),{display:"flex",flexFlow:(r||"")+(!r.includes("-reverse")&&n?"-reverse":"")+" "+(o||"")}},flexAlign:t=>{if(!v(t))return;let[e,n]=t.split(" ");return{display:"flex",alignItems:e,justifyContent:n}},round:(t,e)=>Mn(t??e.borderRadius,e,"round"),borderRadius:(t,e)=>Mn(t??e.round,e,"borderRadius"),borderTopLeftRadius:(t,e)=>Mn(t,e,"borderTopLeftRadius","borderTopLeftRadius"),borderTopRightRadius:(t,e)=>Mn(t,e,"borderTopRightRadius","borderTopRightRadius"),borderBottomLeftRadius:(t,e)=>Mn(t,e,"borderBottomLeftRadius","borderBottomLeftRadius"),borderBottomRightRadius:(t,e)=>Mn(t,e,"borderBottomRightRadius","borderBottomRightRadius")};var V_={fontSize:t=>el(t)||t,fontFamily:t=>({fontFamily:Jc(t)||t}),fontWeight:t=>({fontWeight:t,fontVariationSettings:'"wght" '+t}),lineClamp:t=>{if(t!=null)return t==="none"?{WebkitLineClamp:"none",lineClamp:"none"}:{display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:String(t),lineClamp:String(t),overflow:"hidden"}}};var z_={overflow:t=>({overflow:t}),cursor:(t,e,n,r)=>{if(!t)return;let o=r.assets&&r.assets[t];if(o&&o.content)t=`url(${o.content.src})`;else{let s=r.files&&r.files[t];s&&s.content&&(t=`url(${s.content.src})`)}return{cursor:t}},opacity:t=>t!=null?{opacity:String(t)}:void 0,visibility:t=>t!=null?{visibility:t}:void 0,pointerEvents:t=>t!=null?{pointerEvents:t}:void 0};var H_={inset:(t,e)=>{if(e.call("isNumber",t))return{inset:t};if(e.call("isString",t))return{inset:ht(t).map(n=>Ot(n,"k").k).join(" ")}},left:t=>Ot(t,"left"),top:t=>Ot(t,"top"),right:t=>Ot(t,"right"),bottom:t=>Ot(t,"bottom"),verticalInset:t=>{if(typeof t!="string")return;let e=ht(t).map(n=>Ot(n,"k").k);return{top:e[0],bottom:e[1]||e[0]}},horizontalInset:t=>{if(typeof t!="string")return;let e=ht(t).map(n=>Ot(n,"k").k);return{left:e[0],right:e[1]||e[0]}}};I();var tp=0,ep=()=>{tp++},np=()=>{tp>0&&tp--},Re=({context:t,state:e})=>{let n=t?.designSystem,r=e?.root?.globalTheme||n?.globalTheme;return r&&r!=="auto"?r:tp>0?null:n&&n.resolvedTheme||null},me=(t,e)=>{if(e==null||e==="")return;if(!E(e))return{[t]:e};let n={},r=!1;for(let o in e){let s=e[o];if(!(s==null||s==="")){if(E(s)){let i=me(t,s);i&&(n[o]=i,r=!0);continue}n[o]={[t]:s},r=!0}}return r?n:void 0},W_={theme:(t,e)=>{if(t)return e.themeModifier?Ve(t,`@${e.themeModifier}`):Ve(t)},color:(t,e)=>{let n=Re(e);if(t)return me("color",zt(t,n))},background:(t,e)=>{let n=Re(e);if(t)return v(t)&&t.includes("gradient")&&t.includes("(")?{background:ll(t,n)}:me("background",zt(t,n))},backgroundColor:(t,e)=>{let n=Re(e);if(t)return me("backgroundColor",zt(t,n))},backgroundImage:(t,e,n,r)=>{let o=Re(e);if(!t)return;let s=r.assets&&r.assets[t];if(s&&s.content)t=s.content.src;else{let i=r.files&&r.files[t];i&&i.content&&(t=i.content.src)}return me("backgroundImage",Pd(t,o))},textStroke:t=>{let e=Od(t);if(e!=null)return{WebkitTextStroke:e}},outline:t=>({outline:wn(t)}),outlineWidth:(t,e)=>N("outlineWidth",t,e),outlineColor:(t,e)=>{let n=Re(e);if(t)return me("outlineColor",zt(t,n))},outlineOffset:(t,e)=>N("outlineOffset",t,e),border:t=>({border:wn(t)}),borderColor:(t,e)=>{let n=Re(e);if(t)return me("borderColor",zt(t,n))},borderTopColor:(t,e)=>{let n=Re(e);if(t)return me("borderTopColor",zt(t,n))},borderBottomColor:(t,e)=>{let n=Re(e);if(t)return me("borderBottomColor",zt(t,n))},borderLeftColor:(t,e)=>{let n=Re(e);if(t)return me("borderLeftColor",zt(t,n))},borderRightColor:(t,e)=>{let n=Re(e);if(t)return me("borderRightColor",zt(t,n))},borderLeft:t=>({borderLeft:wn(t)}),borderTop:t=>({borderTop:wn(t)}),borderRight:t=>({borderRight:wn(t)}),borderBottom:t=>({borderBottom:wn(t)}),shadow:(t,e)=>{let n=Re(e);if(t)return me("boxShadow",Rd(t,n))},boxShadow:(t,e)=>{if(!v(t))return;let[n,r]=t.split("!importan"),o=Re(e),s=r?" !important":"",i=cl(n.trim(),o);return v(i)?{boxShadow:i+s}:me("boxShadow",i)},textShadow:(t,{context:e})=>me("textShadow",cl(t,e.designSystem.globalTheme)),columnRule:t=>({columnRule:wn(t)})};var bl={transition:t=>{let e=Id(t);if(e!=null)return{transition:e}},transitionDuration:t=>({transitionDuration:fl(t)}),transitionDelay:t=>({transitionDelay:fl(t)}),transitionTimingFunction:t=>({transitionTimingFunction:Ce(t)}),transitionProperty:t=>({transitionProperty:t,willChange:t})};I();var q_={flow:(t,e)=>{let n=e.reverse;if(!v(t))return;let[r,o]=(t||"row").split(" ");return(t.startsWith("x")||t==="row")&&(r="row"),(t.startsWith("y")||t==="column")&&(r="column"),{display:"flex",flexFlow:(r||"")+(!r.includes("-reverse")&&n?"-reverse":"")+" "+(o||"")}},wrap:(t,e)=>{if(t!=null)return{display:"flex",flexWrap:t}},align:(t,e)=>{if(!v(t))return;let[n,r]=t.split(" ");return{display:"flex",alignItems:n,justifyContent:r}}};I();var uF=/(^|[^\w.-])([A-Za-z_][\w-]*)/g,oC=t=>{if(!v(t))return t;let e=O().sizes;return e?t.replace(uF,(n,r,o)=>{let s=e[o];return s==null?n:r+String(s)}):t},Sn=t=>oC(Dd(t)),K_={gridTemplateColumns:t=>({gridTemplateColumns:Sn(t)}),gridTemplateRows:t=>({gridTemplateRows:Sn(t)}),gridAutoColumns:t=>({gridAutoColumns:Sn(t)}),gridAutoRows:t=>({gridAutoRows:Sn(t)}),area:t=>({gridArea:t}),template:t=>({gridTemplate:t}),templateAreas:t=>({gridTemplateAreas:t}),column:t=>({gridColumn:t}),columns:t=>({gridTemplateColumns:Sn(t)}),templateColumns:t=>({gridTemplateColumns:Sn(t)}),autoColumns:t=>({gridAutoColumns:Sn(t)}),columnStart:t=>({gridColumnStart:t}),row:t=>({gridRow:t}),rows:t=>({gridTemplateRows:Sn(t)}),templateRows:t=>({gridTemplateRows:Sn(t)}),autoRows:t=>({gridAutoRows:Sn(t)}),rowStart:t=>({gridRowStart:t}),autoFlow:t=>({gridAutoFlow:t})};var wt={...B_,...U_,...V_,...z_,...H_,...W_,...bl,...q_,...K_};var Rt=new Set(["accentColor","alignContent","alignItems","alignSelf","alignmentBaseline","all","animation","animationDelay","animationDirection","animationDuration","animationFillMode","animationIterationCount","animationName","animationPlayState","animationRange","animationRangeEnd","animationRangeStart","animationTimeline","animationTimingFunction","appearance","aspectRatio","backdropFilter","backfaceVisibility","background","backgroundAttachment","backgroundBlendMode","backgroundClip","backgroundColor","backgroundImage","backgroundOrigin","backgroundPosition","backgroundPositionX","backgroundPositionY","backgroundRepeat","backgroundRepeatX","backgroundRepeatY","backgroundSize","baselineShift","blockSize","border","borderBlock","borderBlockColor","borderBlockEnd","borderBlockEndColor","borderBlockEndStyle","borderBlockEndWidth","borderBlockStart","borderBlockStartColor","borderBlockStartStyle","borderBlockStartWidth","borderBlockStyle","borderBlockWidth","borderBottom","borderBottomColor","borderBottomLeftRadius","borderBottomRightRadius","borderBottomStyle","borderBottomWidth","borderCollapse","borderColor","borderImage","borderImageOutset","borderImageRepeat","borderImageSlice","borderImageSource","borderImageWidth","borderLeft","borderLeftColor","borderLeftStyle","borderLeftWidth","borderRadius","borderRight","borderRightColor","borderRightStyle","borderRightWidth","borderSpacing","borderStyle","borderTop","borderTopColor","borderTopLeftRadius","borderTopRightRadius","borderTopStyle","borderTopWidth","borderWidth","bottom","boxDecorationBreak","boxShadow","boxSizing","breakAfter","breakBefore","breakInside","captionSide","caretColor","clear","clip","clipPath","color","colorAdjust","colorInterpolation","colorInterpolationFilters","colorRendering","columnCount","columnFill","columnGap","columnRule","columnRuleColor","columnRuleStyle","columnRuleWidth","columnSpan","columnWidth","columns","contain","content","counterIncrement","counterReset","cursor","direction","display","emptyCells","fill","filter","flex","flexBasis","flexDirection","flexFlow","flexGrow","flexShrink","flexWrap","float","font","fontFamily","fontFeatureSettings","fontKerning","fontLanguageOverride","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontVariantAlternates","fontVariantCaps","fontVariantEastAsian","fontVariantNumeric","fontVariantPosition","fontWeight","fontVariationSettings","fontSynthesis","forcedColorAdjust","gap","grid","gridArea","gridAutoColumns","gridAutoFlow","gridAutoRows","gridColumn","gridColumnEnd","gridColumnGap","gridColumnStart","gridGap","gridRow","gridRowEnd","gridRowGap","gridRowStart","gridTemplate","gridTemplateAreas","gridTemplateColumns","gridTemplateRows","height","hyphens","imageOrientation","imageRendering","imeMode","inset","insetBlock","insetBlockEnd","insetBlockStart","insetInline","insetInlineEnd","insetInlineStart","initialLetter","interpolateSize","isolation","justifyContent","justifyItems","justifySelf","left","letterSpacing","lineBreak","lineClamp","lineHeight","listStyle","listStyleImage","listStylePosition","listStyleType","margin","marginBottom","marginLeft","marginRight","marginTop","marginBlock","marginBlockEnd","marginBlockStart","marginInline","marginInlineEnd","marginInlineStart","mask","maskBorder","maskBorderImage","maskBorderOutset","maskBorderRepeat","maskBorderSlice","maskBorderSource","maskBorderWidth","maskClip","maskComposite","maskImage","maskOrigin","maskPosition","maskRepeat","maskSize","maskType","maxBlockSize","maxHeight","maxInlineSize","maxWidth","minBlockSize","minHeight","minInlineSize","minWidth","mixBlendMode","objectFit","objectPosition","objectViewBox","offset","offsetDistance","offsetPath","offsetRotate","opacity","order","orientation","outline","outlineColor","outlineOffset","outlineStyle","outlineWidth","overflow","overflowAnchor","overflowClip","overflowScrolling","overflowWrap","overflowX","overflowY","overscrollBehavior","overscrollBehaviorX","overscrollBehaviorY","padding","paddingBottom","paddingLeft","paddingRight","paddingTop","pageBreakAfter","pageBreakBefore","pageBreakInside","paintOrder","perspective","perspectiveOrigin","placeContent","placeItems","placeSelf","pointerEvents","position","resize","right","rotate","rowGap","scrollBehavior","scrollMargin","scrollMarginBlock","scrollMarginBlockEnd","scrollMarginBlockStart","scrollMarginBottom","scrollMarginInline","scrollMarginInlineEnd","scrollMarginInlineStart","scrollMarginLeft","scrollMarginRight","scrollMarginTop","scrollPadding","scrollPaddingBlock","scrollPaddingBlockEnd","scrollPaddingBlockStart","scrollPaddingBottom","scrollPaddingInline","scrollPaddingInlineEnd","scrollPaddingInlineStart","scrollPaddingLeft","scrollPaddingRight","scrollPaddingTop","scrollSnapAlign","scrollSnapStop","scrollSnapType","scrollTimeline","scrollTimelineAxis","scrollTimelineName","scrollbarColor","scrollbarGutter","scrollbarWidth","shapeImageThreshold","shapeMargin","shapeOutside","stroke","tabSize","tableLayout","textAlign","textAlignLast","textDecoration","textDecorationColor","textDecorationLine","textDecorationSkipInk","textDecorationStyle","textDecorationThickness","textIndent","textOverflow","textShadow","textTransform","textUnderlineOffset","textWrap","textWrapMode","textWrapStyle","timelineScope","top","touchAction","transform","transformOrigin","transformStyle","transition","transitionDelay","transitionDuration","transitionProperty","transitionTimingFunction","translate","translateX","translateY","translateZ","unicodeBidi","userSelect","verticalAlign","viewTimeline","viewTimelineAxis","viewTimelineInset","viewTimelineName","visibility","whiteSpace","widows","width","willChange","wordBreak","wordSpacing","wordWrap","writingMode","zIndex"]);I();var dF=/^-?[A-Z][0-9]?$/,pF=/^[a-z][0-9]?$/,sC=/var\(\s*(--[A-Za-z0-9-]+)/g,G_=t=>{let e=new Set,n=new Set;if(!t||typeof t!="object")return{knownLetters:e,knownVars:n};for(let r in t){let o=t[r];if(!(!o||typeof o!="object")){if(o.sequence&&typeof o.sequence=="object")for(let s in o.sequence)e.add(s);if(o.vars&&typeof o.vars=="object")for(let s in o.vars)n.add(s)}}return{knownLetters:e,knownVars:n}},hF=(t,e)=>{if(!e.size)return[];let n=t.split(/[(),\s]+/).filter(Boolean),r=new Set;for(let o of n){if(!dF.test(o))continue;let s=o.charCodeAt(0)===45?o.slice(1):o;e.has(s)&&r.add(o)}return[...r]},gF=(t,e)=>{if(!e.size)return[];let n=[];sC.lastIndex=0;let r;for(;r=sC.exec(t);){let o=r[1];if(e.has(o))continue;let s=o.lastIndexOf("-");if(s===-1)continue;let i=o.slice(s+1);if(!pF.test(i))continue;let a=o.slice(0,s+1)+i.toUpperCase();a!==o&&e.has(a)&&n.push({varName:o,corrected:a})}return n},rp=new Set,iC=(t,e,n)=>{if(!Q()||!v(e)||!e)return;let r;try{r=O()}catch{return}let{knownLetters:o,knownVars:s}=G_(r);if(!o.size&&!s.size)return;let i=hF(e,o),a=gF(e,s);if(!i.length&&!a.length)return;let c=n?.__ref?.path?n.__ref.path.join("."):n?.key||"?";for(let l of i){let f=`${c}::${t}::bare::${l}::${e}`;rp.has(f)||(rp.add(f),console.warn(`[smbls/css-in-props] "${t}" on <${c}> looks like it contains an un-wrapped design-system token ("${l}") \u2014 "${t}" has no registered resolver, so its value is forwarded to the browser untouched. A bare letter token there is invalid CSS, so the browser drops the ENTIRE "${t}" declaration (not just this argument). Wrap it in var(--<family>-${l.replace("-","")}) (or calc(-1 * var(--<family>-${l.replace("-","")})) for a negative). Value: "${e}"`))}for(let{varName:l,corrected:f}of a){let u=`${c}::${t}::case::${l}::${e}`;rp.has(u)||(rp.add(u),console.warn(`[smbls/css-in-props] "${t}" on <${c}> references ${l}, which the active design system never emits. CSS custom-property names are case-sensitive \u2014 the real variable is ${f}, so this reference silently never resolves. Value: "${e}"`))}};I();var mF=/^\[data-theme=(?:"([^"]+)"|'([^']+)')\]$/,yF=(t,e,n)=>{let{context:r}=n;if(!r.designSystem?.media)return;let o=t.slice(1),s=r.designSystem.media[o],i=ye(e,n);if(!s)return{[t]:i};if(/^@(media|supports|container)\b/.test(s))return{[s]:i};if(s==="print")return{"@media print":i};if(s[0]==="(")return{[`@media screen and ${s}`]:i};let a=s.match(mF),c=a?a[1]||a[2]:o,l={[`${s} &`]:i};if(c==="dark"||c==="light"){let f=r.designSystem?.scopeSelector||":root",u=f===":root"?":root:not([data-theme])":`${f}:not([data-theme])`;l[`@media (prefers-color-scheme: ${c})`]={[`${u} &`]:i}}return l},aC=(t,e,n)=>({[t]:ye(e,n)}),_l=(t,e,n)=>{let r=`&${t}`,o=ye(e,n);if(t.includes(",")&&o){let s={},i={};for(let a in o)typeof o[a]=="object"&&o[a]!==null?i[a]=o[a]:s[a]=o[a];if(Object.keys(i).length){let a=r.split(",").map(l=>l.trim()),c={};Object.keys(s).length&&(c[r]=s);for(let l in i){let f=a.map(u=>`${u} ${l}`).join(", ");c[f]=i[l]}return c}}return{[r]:o}},Y_=(t,e)=>{let n=e.context?.cases?.[t];if(n!==void 0)return P(n)?n.call(e,e):!!n},bF=(t,e,n)=>{let r=t.slice(1),o=Y_(r,n);if(o===void 0&&(o=!!n[r]),!!o)return ye(e,n)},_F=(t,e,n)=>({[t]:e}),wF=(t,e,n)=>{let r=t.slice(1),o=n[r]===!0||n.state?.[r];if(!o)if(typeof n[r]=="function")try{o=n[r](n,n.state,n.context)}catch{}else{let s=Y_(r,n);s!==void 0&&(o=s)}if(o)return ye(e,n)},SF=(t,e,n)=>{let r=t.slice(1),o=n[r]===!0||n.state?.[r];if(!o)if(typeof n[r]=="function")try{o=n[r](n,n.state,n.context)}catch{}else{let s=Y_(r,n);s!==void 0&&(o=s)}if(!o)return ye(e,n)},X_=(t,e)=>ye(t,e),Z_={"@":yF,":":_l,"[":_l,"*":_l,"+":_l,"~":_l,"&":aC,">":aC,$:bF,"-":_F,".":wF,"!":SF};var op=cr(),cC=(t,e,n)=>{let r=e?.context?.designSystem;r&&J(r);try{let o={},s={},i=(a,c)=>{if(n.unpack){o={...o,...c};return}o[a]=c};for(let a in t){let c=t[a];if(c!==null)if(a==="class"&&v(c)){let l=lC(c,e);l&&(n.unpack?xt(o,l):o.designSystemClass=l)}else if(a==="true"){let l=pt(c,e);xt(o,X_(l,e))}else if(e.classlist?.[a]){let l=e.classlist[a],f=P(l)?l(e,e.state,e.context):l;f&&i(a,f),!op&&E(o[a])&&(o[a].label=a)}else if(wt[a]){let l=pt(c,e);if(l===null)continue;D(l)&&(l=l.reduce((u,d)=>xt(u,d),{}));let f=wt[a](l,e,e.state,e.context);D(f)&&(f=f.reduce((u,d)=>xt(u,d),{})),f&&i(a,f),!op&&E(o[a])&&(o[a].label=a)}else if(Rt.has(a)){let l=pt(c,e);if(l===null)continue;typeof l=="string"&&l.charCodeAt(0)===45&&l.charCodeAt(1)===45&&(l=`var(${l})`),op||iC(a,l,e),i(a,{[a]:l}),!op&&E(o[a])&&(o[a].label=a)}else s[a]=c}return[o,s]}finally{r&&X()}},lC=(t,e)=>{if(!v(t))return;let n=e?.context?.designSystem?.class;if(!n)return;let r;for(let o of t.split(" ")){if(!o)continue;let s=n[o];if(!E(s))continue;let i=ut(s);r=r?ee(r,i):i}if(r)return ye(r,e)},fC=(t,e)=>{let n={};for(let r in t){let o=Z_[r.slice(0,1)];if(o){let s=o(r,t[r],e);if(s)for(let i in s)Object.prototype.hasOwnProperty.call(s,i)&&(n[i]&&typeof n[i]=="object"&&typeof s[i]=="object"?ee(n[i],s[i]):n[i]=s[i])}}return n},ye=(t,e,n={unpack:!0})=>{let[r,o]=cC(t,e,n),s=fC(o,e),i=!1;for(let a in s){i=!0;break}if(i){if(n.unpack)return Aa(r,s);r._selectors=s}return r},xF=(t,e)=>{let n={};if(t.class)for(let r in t.class)n[r]=t.class[r](e);return n};I();var uC=t=>{if(E(t))return ye(t,t)},kF=(t,e)=>{let n=uC(t);return typeof e=="function"?e(n):Oe(n)};I();var vF=/^-?[A-Z][0-9]?$/,hC=/[(),\s]+/,dC=/\s*!important\s*$/,EF=t=>t.replace(/[A-Z]/g,e=>"-"+e.toLowerCase()),AF=()=>{let t;try{t=O()}catch{t=null}let e=t&&t.sizes&&typeof t.sizes=="object"?t.sizes:null,n=null,r=s=>{if(!e)return!1;let i=s.charCodeAt(0)===45?s.slice(1):s;return i?e[s]!==void 0||e[i]!==void 0||e[i.toLowerCase()]!==void 0:!1},o=s=>vF.test(s)?(n||(n=G_(t).knownLetters),n.has(s.charCodeAt(0)===45?s.slice(1):s)):!1;return{isToken:s=>o(s)||r(s)}},CF=(t,e)=>{let n=null,r=t.split(hC);for(let o=0;o<r.length;o++){let s=r[o];!s||s.charCodeAt(0)===35||e.isToken(s)&&(n||(n=[])).push(s)}return n},TF=(t,e)=>{let n=String(t).split(hC);for(let r=0;r<n.length;r++)if(n[r]===e)return!0;return!1},OF=(t,e)=>{let n=typeof globalThis<"u"?globalThis.CSS:void 0;if(!n||typeof n.supports!="function")return!1;try{return n.supports(EF(t),e)}catch{return!1}},pC=new Set,RF=(t,e,n)=>{if(!Q())return;let r=t?.__ref?.path?t.__ref.path.join("."):t?.key||"?",o=r+"::"+e+"::"+n;pC.has(o)||(pC.add(o),console.warn(`[smbls/css-in-props] style.${e} on <${r}> holds a design-system token the "${e}" transformer could not resolve to one inline value, so it is written as is and the browser drops it. Move the key out of \`style\` to the element itself, or write the resolved CSS. Value: "${n}"`))},PF=(t,e,n,r)=>{if(!v(e)||!e||t.charCodeAt(0)===45&&t.charCodeAt(1)===45)return null;let o=wt[t];if(!o||!Rt.has(t))return null;let s=dC.test(e),i=s?e.replace(dC,""):e,a=CF(i,r);if(!a||OF(t,i))return null;let c;try{c=o(i,n,n?.state,n?.context)}catch{c=null}if(Array.isArray(c)){let u={};for(let d of c)d&&typeof d=="object"&&Object.assign(u,d);c=u}let l=!!c&&typeof c=="object";if(l){let u=!1;for(let d in c){let p=c[d];if(p!=null){if(typeof p=="object"||typeof p=="function"){l=!1;break}for(let g of a)if(TF(p,g)){l=!1;break}if(!l)break;u=!0}}u||(l=!1)}if(!l)return RF(n,t,e),null;let f={};for(let u in c){let d=c[u];d!=null&&(f[u]=s?String(d)+" !important":d)}return f},gC=(t,e,n)=>{let r=null,o=0;for(let s in t){let i=t[s],a=null,c=null;if(s.charCodeAt(0)===38&&i&&typeof i=="object"&&!Array.isArray(i)){let l=gC(i,e,n);l!==i&&(c=l)}else a=PF(s,i,e,n);if((a||c)&&!r){r={};let l=0;for(let f in t){if(l++===o)break;r[f]=t[f]}}r&&(c?r[s]=c:a?Object.assign(r,a):r[s]=i),o++}return r||t},Q_=(t,e)=>!t||typeof t!="object"||Array.isArray(t)?t:gC(t,e,AF());I();I();function ew(t,e,n){let r=t?.context?.analyze;if(!r||!r.emit||e==="warn"&&!r.shouldCapture("warnings")||e==="error"&&!r.shouldCapture("errors"))return;let o=n.map(s=>s?.message||(typeof s=="string"?s:null)).filter(Boolean).join(" ");r.emit({id:`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,6)}`,ts:Date.now(),type:e==="error"?"error":"warning",level:e,hook:e==="error"?"el.error":"el.warn",element:{key:t.key!=null?String(t.key):null,name:t.__name||null,tag:t.tag||null},message:o||null,args:n})}var mC=new Set;function yC(t,e,n){let r=String(e);if(mC.has(r))return;mC.add(r);let o=t?.__ref?.path,s=Array.isArray(o)&&o.length?o.join("."):t?.key!=null?String(t.key):"(unknown element)",i=n!=null?`resolves to a non-function (${typeof n}) \u2014 it cannot be called`:"is not registered in context.methods, context.functions, or context.utils, and is not an element method",a=`[smbls] el.call('${r}') at <${s}>: "${r}" ${i}. Returning undefined (unchanged behavior) \u2014 check the name for typos or register the function on the project. Warned once per name; repeat misses are silent.`;ew(t,"error",[a]),console.error(a)}var _C=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),LF=new Set,wC=t=>_C(J_,t)&&!(us||LF).has(t),bC=new Set;function SC(t,e){bC.has(t)||(bC.add(t),Q()&&console.warn(`[smbls] ${e}: context.methods.${t} is named like a built-in element method and is not the app's own override (it was not on the element prototype when it was built) \u2014 ignored; the built-in keeps winning. Declare an intentional override in the app's OWN methods.`))}function DF(...t){return ew(this,"warn",t),dc.apply(this,t)}function IF(...t){return ew(this,"error",t),no.apply(this,t)}var J_={update:di,remove:hi,getDB:mc,getQuery:yc,getRootData:lc,getPath:sc,nextElement:pc,previousElement:hc,verbose:Es,warn:DF,error:IF,variables:gc,spotByPath:oc,set(t,e){let n=this.__ref;if(n){if(n.__setLocked){n.__setQueued={content:t,options:e};return}n.__setLocked=!0}try{if(this.removeContent(),t!=null){let r=this.context?.__create;r&&r(t,this,"content",e)}this.__ref&&(this.__ref.contentManaged=!0)}finally{if(n){n.__setLocked=!1;let r=n.__setQueued;r&&(n.__setQueued=null,this.set(r.content,r.options))}}},reset(t){let e=this.context?.__create;if(!e)return this;let n=this.parent,r=this.key,o=this.parse();return this.remove(),e(o,n,r,t)},lookup(t){let e=this.parent;for(;e;){if(typeof t=="function"){if(t(e))return e}else if(typeof t=="string"){if(e.key===t)return e;if(e[t]&&e[t].__ref)return e[t]}e=e.parent}return null},lookdown(t){let e=this.__ref;if(!e?.__children)return null;for(let n of e.__children){let r=this[n];if(!r)continue;if(typeof t=="function"){if(t(r))return r}else if(typeof t=="string"&&r.key===t)return r;let o=r.lookdown?.(t);if(o)return o}return null},lookdownAll(t,e=[]){let n=this.__ref;if(!n?.__children)return e;for(let r of n.__children){let o=this[r];o&&(typeof t=="function"?t(o)&&e.push(o):typeof t=="string"&&o.key===t&&e.push(o),o.lookdownAll?.(t,e))}return e},getRef(t){return t?this.__ref&&this.__ref[t]:this.__ref},getChildren(){let t=this.__ref&&this.__ref.__children;return Array.isArray(t)?t.map(e=>this[e]):[]},getRoot:cc,getRootState:ac,getRootContext:fc,getContext:uc,parse(t){let e={},n=t?new Set(t):null,r=this.__ref?.__exec;for(let o in this)if(!(o==="parent"||o==="node"||o==="__ref")&&!n?.has(o)){if(r&&r[o]!==void 0){e[o]=r[o];continue}typeof this[o]!="function"&&(e[o]=this[o])}return e},parseDeep(t){let e=this.parse(t),n=this.__ref;if(n?.__children)for(let r of n.__children)this[r]?.parseDeep&&(e[r]=this[r].parseDeep(t));return e},keys(){return Object.keys(this)},log(...t){if(t.length){let e={};for(let n of t)e[n]=this[n];console.log(e)}else console.log(this)},setProps(t,e){return this.update(t,e)},setNodeStyles(t){if(this.node?.style)for(let e in t){let n=t[e];if(n==null)continue;let r=e.replace(/[A-Z]/g,s=>"-"+s.toLowerCase()),o=String(n).replace(/\s*!important\s*$/,"");this.node.style.setProperty(r,o,"important")}},call(t,...e){let n=this.context,r=wC(t);r&&n?.methods?.[t]&&n.methods[t]!==this[t]&&SC(t,"el.call");let o=r?this[t]:n?.methods?.[t]||n?.functions?.[t]||n?.utils?.[t]||this[t];if(typeof o=="function"){let s=Xr;if(!s||!s(o))return o.call(this,...e);Q()&&yC(this,t,te(o));return}Q()&&yC(this,t,o)},removeContent(){let t=this.__ref;if(!t?.__children)return;let e=this.content;if(e?.remove){e.remove(),delete this.content;let n=t.__children.indexOf("content");n!==-1&&t.__children.splice(n,1)}e?.node?.parentNode&&e.node.parentNode.removeChild(e.node)}},tw=new WeakMap;function $F(t){if(!t)return J_;let e=tw.get(t);if(e)return e;e=Object.create(J_);let n=t.methods;if(n)for(let r in n)e[r]=n[r];return tw.set(t,e),e}function gi(t){let e=$F(t.context);Object.setPrototypeOf(t,e)}function mi(t){if(!t)return!1;let e=tw.get(t);if(!e)return!1;let n=t.methods;if(!n)return!1;for(let r in n){if(wC(r)&&!_C(e,r)){SC(r,"refreshContextProto");continue}e[r]=n[r]}return!0}var sp=[],ip=!1,Or=0;function ap(){return typeof performance<"u"&&typeof performance.now=="function"?performance.now():Date.now()}function xC(t){let e=typeof globalThis<"u"?globalThis.scheduler:null;if(e&&typeof e.yield=="function"){e.yield().then(t,t);return}if(typeof MessageChannel=="function"){let n=new MessageChannel;n.port1.onmessage=()=>{n.port1.close(),t()},n.port2.postMessage(0);return}setTimeout(t,0)}function nw(){return Or?ap()-Or>=50:!1}var yi=0;function rw(){yi===0&&!Or&&(Or=ap()),yi++}function ow(){yi>0&&yi--,yi===0&&!ip&&(Or=0)}function sw(t){sp.push(t),ip||(ip=!0,xC(kC))}function kC(){for(Or=ap();sp.length;){let t=sp.shift();try{t()}catch(e){typeof console<"u"&&console.error&&console.error("[smbls] deferred mount chunk failed:",e?.message||e)}if(ap()-Or>=50)break}if(sp.length){xC(kC);return}ip=!1,Or=0,yi=0}I();I();fr();var fw={};F(fw,{STATE_METHODS:()=>vC,applyInitialState:()=>cp,applyStateMethods:()=>be,callStateMethod:()=>Sl,createState:()=>aw,isTracking:()=>lw,useHostState:()=>cw});Kt();Kt();var vC=new Set(["update","parse","clean","destroy","create","add","toggle","remove","set","replace","setByPath","setPathCollection","removeByPath","removePathCollection","getByPath","reset","apply","applyReplace","applyFunction","quietUpdate","quietReplace","rootUpdate","parentUpdate","keys","values","__element","__children","parent","root"]),wl=(t,e,n)=>{Object.defineProperty(t,e,{value:n,enumerable:!1,configurable:!0,writable:!0})},on=(t,e,n,{onlyIfAbsent:r}={})=>{wl(t,"$"+e,n),!(r&&Object.prototype.hasOwnProperty.call(t,e))&&wl(t,e,n)},Sl=(t,e,...n)=>{if(!t)return;let r=t["$"+e];if(typeof r=="function")return r.apply(t,n);let o=t[e];if(typeof o=="function")return o.apply(t,n)},be=(t,e)=>{if(_t(e)){let o=e.__raw||e;on(o,"toggle",function(s,i={}){e[s]=!e[s]},{onlyIfAbsent:!0}),on(o,"set",function(s,i={}){let a=e.__element;return typeof s=="object"&&s!==null&&a&&typeof a.onBeforeStateUpdate=="function"&&!i.preventBeforeStateUpdateListener&&a.onBeforeStateUpdate(a,e,a.context,{changes:s,options:i})===!1||(e.$clean({preventStateUpdate:!0}),typeof s=="object"&&s!==null&&e.$update(s,{...i,preventBeforeStateUpdateListener:!0})),e},{onlyIfAbsent:!0}),on(o,"setByPath",function(s,i,a={}){let c=s.split("."),l=e;for(let f=0;f<c.length-1;f++)l[c[f]]===void 0&&(l[c[f]]={}),l=l[c[f]];return l[c[c.length-1]]=i,e}),on(o,"getByPath",function(s){let i=s.split("."),a=e;for(let c=0;c<i.length;c++){if(a==null)return;a=a[i[c]]}return a}),on(o,"removeByPath",function(s,i={}){let a=s.split("."),c=e;for(let l=0;l<a.length-1;l++){if(c==null)return e;c=c[a[l]]}return c&&delete c[a[a.length-1]],e}),on(o,"reset",function(s={}){let i=e.$parse();return e.$set(i,s)}),on(o,"apply",function(s,i={}){if(typeof s=="function"){let a=s(e);return e.$update(a,i)}}),on(o,"applyFunction",function(s,i={}){if(typeof s=="function")return s(e),e.$update(e.$parse(),i)}),on(o,"rootUpdate",function(s,i={}){let a=e;for(;a?.parent&&_t(a.parent);)a=a.parent;return Sl(a,"update",s,i)}),on(o,"parentUpdate",function(s,i={}){if(e.parent)return Sl(e.parent,"update",s,i)}),on(o,"quietReplace",function(s,i={}){return e.$replace(s,{quiet:!0,...i})}),Object.getOwnPropertyDescriptor(o,"root")||Object.defineProperty(o,"root",{get:function(){let s=e,i=_t(s)?s:null;for(let a=0;a<64&&s?.parent&&s.parent!==s;a++)s=s.parent,_t(s)&&(i=s);return i||s},enumerable:!1,configurable:!0});return}if(!e||typeof e!="object")return;let n=()=>{for(let o in e)Object.prototype.hasOwnProperty.call(e,o)&&delete e[o]},r={update(o){if(!o||typeof o!="object")return e;for(let s in o)e[s]=o[s];return e},apply(o){if(typeof o!="function")return e;let s=o(e);return s?e.$update(s):e},parse(){return{...e}},toggle(o){return e[o]=!e[o],e},set(o){if(!o||typeof o!="object")return e;n();for(let s in o)e[s]=o[s];return e},replace(o){return e.$set(o)},clean(){return n(),e}};wl(e,"$settled",function(){return Ff().then(()=>e)});for(let o in r)if(wl(e,"$"+o,r[o]),typeof e[o]!="function"){if(Object.prototype.hasOwnProperty.call(e,o)){Bf(o,"");continue}wl(e,o,r[o])}};var aw=function(t,e,n){return t.state=cp(t,e,n),t.state},cp=function(t,e,n){let{__ref:r}=t,o=t.state;if(o==null||o===!1){let s=e?.state||{};return be(t,s),s}if(typeof o=="string")return r&&(r.__state=o),r.__stateType="string",MF(o,t,e);if(typeof o=="number"||typeof o=="boolean"){r&&(r.__state=o,r.__stateType=typeof o,r.__hasRootState=!0);let s=xn({value:o});return s.__element=t,e?.state&&(s.parent=e.state),be(t,s),s}if(typeof o=="function"&&(o=o(t,e?.state)||{}),typeof o=="object"&&!_t(o)){r&&(r.__hasRootState=!0),o.isRootState&&r&&(r.__hasRootState=!0);let s=xn({...o});if(s.__element=t,!Object.getOwnPropertyDescriptor(s,"root")){let i=e?.state?.root||e?.state||s;Object.defineProperty(s,"root",{get:()=>i,enumerable:!1,configurable:!0})}return e?.state&&(s.parent=e.state,e.state.__children&&(e.state.__children[t.key]=s)),be(t,s),typeof t.onStateCreated=="function"&&t.onStateCreated(t,s,t.context,n),s}return _t(o)?(o.__element=t,o):e?.state||{}};function iw(t,e){if(!e)return t;let n=e.split("/"),r=t;for(let o of n){if(r==null)return{};r=r[o]}return r??{}}function MF(t,e,n){if(!n?.state)return{};if(t===".")return n.state;if(t.startsWith("../")){let o=t.slice(3),s=n.state?.parent;return o&&s?iw(s,o):s??n.state??{}}if(t.startsWith("~/")){let o=n.state;for(;o?.parent;)o=o.parent;let s=t.slice(2);return s?iw(o,s):o??{}}let r=iw(n.state,t);if(r&&typeof r=="object"&&!_t(r)&&!Object.getOwnPropertyDescriptor(r,"root")){let o=n.state?.root||n.state;Object.defineProperty(r,"root",{get:()=>o,enumerable:!1,configurable:!0})}return r}Kt();var cw=(t,e)=>{if(!t)return AC;let n=FF(t,e);return!n||!n.state?AC:BF(n.state)},lw=()=>Qt()!=null,NF=128;function FF(t,e){let n=typeof e=="function"?e:typeof e=="string"?s=>!!s?.[e]:s=>!!s?.state,r=t,o=null;for(let s=0;s<NF&&r;s++){if(n(r)&&r.state)return r;if(r.state&&!o&&(o=r),!r.parent||r.parent===r)break;r=r.parent}return o}var jF={get(t,e){return t[e]}},EC=new WeakMap,BF=t=>{let e=EC.get(t);return e||(e=new Proxy(t,jF),EC.set(t,e)),e},AC=new Proxy(Object.create(null),{get(){},has(){return!1}});var lp="3.14.802";var CC="__SMBLS_ELEMENT_ID_ENGINE__",TC=(t,e,n)=>{let r=e||lp,o=n||(typeof globalThis<"u"?globalThis:null);if(!o)return t;let s=o[CC];return s&&s.engine&&s.version===r?s.engine:(s||(o[CC]={version:r,engine:t}),t)};if(!yt||!ze)throw new Error("@symbo.ls/element: the installed @symbo.ls/css does not export CSS_SHORTHAND_LONGHANDS / CSS_LONGHAND_SHORTHANDS (the CSS shorthand family table, packages/css/src/cssLonghands.js). This element needs the @symbo.ls/css published in the same release \u2014 update @symbo.ls/css.");var OC=yt,xl=ze,uw=ul||(()=>!1);var UF=new Set(["rows","cols","wrap","fill","stroke","offset"]),fp=(t,e)=>UF.has(e)&&He(t,e),Rr=(t,e)=>!!(wt[e]||Rt&&Rt.has(e))&&!fp(t,e);var e1=TC({uniqId:1,scopedStyleId:0},lp),vl=[],Oo=new Set,Tw=!1,n1=0,xi=null,Pl=null;function ki(){return typeof Date<"u"&&typeof Date.now=="function"?Date.now():0}function r1(){return typeof document<"u"&&document.visibilityState==="hidden"}var VF=250,zF=1e3;function HF(){return Pl&&(Pl!==(typeof requestAnimationFrame=="function"?requestAnimationFrame:null)||r1())?!0:ki()-n1>=zF}function WF(){if(Tw=!0,n1=ki(),Pl=null,typeof requestAnimationFrame!="function"){let t=typeof clearTimeout=="function"?clearTimeout:null,e=setTimeout(Al,0);xi=t?()=>t(e):null;return}if(r1()){let t=typeof clearTimeout=="function"?clearTimeout:null,e=setTimeout(Al,VF);xi=t?()=>t(e):null}else{let t=typeof cancelAnimationFrame=="function"?cancelAnimationFrame:null;Pl=requestAnimationFrame;let e=requestAnimationFrame(Al);xi=t?()=>t(e):null}}function hp(){if(Tw){if(!HF())return;let t=xi;if(xi=null,t)try{t()}catch{}}WF()}var o1=300,s1=15e4;function Al(){if(Tw=!1,xi=null,Pl=null,Oo.size&&jj(),!vl.length)return;let t=vl.splice(0,vl.length);for(let e=0;e<t.length;e++){let n=t[e];if(n.node){if(!n.node.isConnected){let r=n.__ref||(n.__ref={});r.__mountAttempts=(r.__mountAttempts||0)+1,r.__mountFirstAttemptAt==null&&(r.__mountFirstAttemptAt=ki());let o=ki()-r.__mountFirstAttemptAt;r.__mountAttempts<=o1&&o<s1?(vl.push(n),hp()):console.warn("[DOMQL] onMounted dropped after",r.__mountAttempts,"attempts /",o,"ms \u2014 node never connected:",n.key||n.tag||n);continue}typeof n.onBridgeMount=="function"&&IA(n),typeof n.onMounted=="function"&&Wt("Mounted",n,n.__ref?.__mountOptions||{})}}}function bw(t,e){let n=t.__ref?.__autoGrow;n&&n.active&&Dl(t,!0),!(typeof t.onMounted!="function"&&typeof t.onBridgeMount!="function")&&(t.__ref.__mountOptions=e,vl.push(t),hp())}function RC(t,e){if(typeof t.onContentUpdate!="function")return;t.context?.plugins?.length&&Ct("contentUpdate",t,e);let n=t.context?.designSystem;n&&J(n);try{t.onContentUpdate(t,t.state,t.context,e)}catch(r){if(t.context?.plugins?.length&&Ct("error",t,{hook:"onContentUpdate",error:r})||console.error('[DOMQL] Lifecycle "onContentUpdate" error:',r),t.context?.strictMode)throw r}finally{n&&X()}}function Hn(t){return t.length>2&&t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)>=65&&t.charCodeAt(2)<=90}function qF(t){return t.charAt(2).toLowerCase()+t.slice(3)}function KF(t){return t.toLowerCase()}function _w(t){let e=t.charCodeAt(0);return e===58||e===64||e===38||e===91}function El(t,e){let n={...t};for(let r in e){let o=n[r],s=e[r];o&&s&&typeof o=="object"&&typeof s=="object"&&!Array.isArray(o)&&!Array.isArray(s)&&typeof o!="function"&&typeof s!="function"?n[r]=El(o,s):n[r]=s}return n}function up(t){if(typeof t=="string")return t||void 0;if(typeof t=="number"||typeof t=="bigint")return String(t)}function i1(t,e,n,r){return gp(r,up(t)||(e&&typeof e=="object"?up(e.key):void 0)||String(n))}function gp(t,e){if(!t||typeof e!="string")return e;let n=e;for(;GF(t,n);)n="$"+n;return n!==e&&YF(t,e,n),n}function GF(t,e){if(Nt.has(e)&&e!=="content")return!0;if(!(e in t))return!1;let n=t[e];return!(n&&typeof n=="object"&&n.__ref&&n.parent===t)}var PC=new Set;function YF(t,e,n){if(!Q())return;let r=t.__ref&&t.__ref.path&&t.__ref.path.join(".")||t.key||"<root>",o=r+"::"+e;PC.has(o)||(PC.add(o),console.warn(`[smbls] a child keyed "${e}" at ${r} names a property of its parent; it lives at el["${n}"] (data-key="${n}") so the parent keeps its own "${e}". Prefix the data keys to keep plain el.<key> access.`))}function re(t,e,n,r={},o){let s=Qt();if(s){Dt(null);try{return re(t,e,n,r,o)}finally{Dt(s)}}if(t==null||t===!1)return null;let i=pj(t);(typeof t=="string"||typeof t=="number")&&(t={text:t}),n=up(n);let a=up(t.key),c=Object.create(null);c.key=n||(a&&e?gp(e,a):a)||`_${e1.uniqId++}`,c.parent=e||null,c.context=t.context||e?.context||r.context||{},c.context.__create||(c.context.__create=re);let l=c.__ref={__if:!0,__children:[],__exec:{},__effects:[],__eventCleanup:[],root:e?.__ref?.root||c,path:e?.__ref?.path?[...e.__ref.path,c.key]:[c.key],origin:t};i&&(l.__runtimeSource=i);let f=t;if(t=a1(c,t,n,a,e,r),c.if!=null){let d;if(typeof c.if=="function")try{d=c.if(c,c.state,c.context)}catch(p){if(d=!1,l.__ifError=p,typeof console<"u"&&console.warn){let g=c.key||c.tag||"?";console.warn(`[smbls] \`if:\` evaluator threw on ${g} \u2014 treating as false:`,p?.message||p)}}else d=c.if;l.__if=!!d}if(l.__if)typeof c.if=="function"&&(l.__ifInitialized=!0);else{e&&(e[c.key]=c);let d=QF(t,n,c.context?.components);return d.length&&(l.__ifLateMerge={definition:f,key:n,ownKey:a,names:d,options:r}),typeof c.if=="function"&&p1(c,l,c.if),c}c.tag||(c.tag=Bn(c)),Wt("Init",c,r);let u=c.node=Kd(c)||Ar(c);if(!u)return c;if(c.tag==="fragment"){let p=(c.context?.document||globalThis.document).createComment("");u.appendChild(p),l.__fragmentAnchor=p}Wt("AttachNode",c,r),u.setAttribute&&c.key&&u.setAttribute("data-key",c.key),e&&(e[c.key]=c,e.__ref?.__children&&(e.__ref.__children.includes(c.key)||e.__ref.__children.push(c.key))),u.setAttribute&&c.context?.scopeSelector&&c.context.scopeSelector!==":root"&&c.context.key&&c.key===c.context.key&&u.setAttribute("data-smbls-app",c.context.key),c.id&&u.setAttribute&&(u.id=c.id),C1(c,r),d1(c),xw(c),k1(c),vw(c),E1(c),Gj(c);try{T1(c,r)}catch(d){if(typeof console<"u"&&console.error){let p=c.__ref?.path?.join(".")||c.key||"<root>";console.error(`[smbls] createChildren failed at ${p}:`,d?.message||d,d?.stack?`
|
|
55
|
+
Do NOT trust any browser measurement taken on this page until that reads clean.`),!0}function bA(){try{let t=O(),e=t&&(t.CSS_VARS||t.cssVars);return e?Object.keys(e).length:0}catch{return 0}}function cA(t){Ud||ge.variable>0||ge.atomic>0||_A(Math.max(t,bA()))}function A_(t){let e=t&&(t.CSS_VARS||t.cssVars);return _A(e?Object.keys(e).length:bA())}function _A(t){let e=zd();if(t===0)return{ok:!0,reason:"no-design-system",stats:e,varCount:t};if(!Hd())return{ok:!0,reason:"no-sheet",stats:e,varCount:t};if(e.variable>0||e.atomic>0)return{ok:!0,reason:null,stats:e,varCount:t};let n=e.invalid>0?"every rule was rejected as malformed":"no rule was ever produced";return XM(n,t),{ok:!1,reason:n,stats:e,varCount:t}}var ZM={display:"d",position:"pos",padding:"p",paddingTop:"pt",paddingRight:"pr",paddingBottom:"pb",paddingLeft:"pl",margin:"m",marginTop:"mt",marginRight:"mr",marginBottom:"mb",marginLeft:"ml",width:"w",height:"h",minWidth:"mnw",minHeight:"mnh",maxWidth:"mxw",maxHeight:"mxh",top:"t",right:"r",bottom:"b",left:"l",flex:"fx",flexDirection:"fxd",flexWrap:"fxw",flexGrow:"fxg",flexShrink:"fxs",flexBasis:"fxb",justifyContent:"jc",alignItems:"ai",alignSelf:"as",alignContent:"ac",gap:"g",rowGap:"rg",columnGap:"cg",gridTemplateColumns:"gtc",gridTemplateRows:"gtr",gridColumn:"gc",gridRow:"gr",overflow:"of",overflowX:"ofx",overflowY:"ofy",fontSize:"fs",fontWeight:"fw",fontFamily:"ff",fontStyle:"fst",lineHeight:"lh",letterSpacing:"ls",textAlign:"ta",textDecoration:"td",textTransform:"tt",color:"c",background:"bg",backgroundColor:"bgc",backgroundImage:"bgi",border:"bd",borderRadius:"br",borderColor:"bdc",borderWidth:"bdw",borderStyle:"bds",boxShadow:"bxsh",opacity:"op",zIndex:"z",cursor:"cur",transition:"tr",transform:"tf",animation:"an",visibility:"vis",whiteSpace:"ws",wordBreak:"wb",objectFit:"obj",pointerEvents:"pe",userSelect:"us",boxSizing:"bxz",outline:"ol",listStyle:"lis",textOverflow:"txo",verticalAlign:"va",float:"fl",clear:"cl",content:"cnt",backdropFilter:"bdf",filter:"flt",resize:"rsz",appearance:"apr",fill:"fil",stroke:"stk"};function dl(t){return t.replace(/[A-Z]/g,e=>"-"+e.toLowerCase())}var wA=t=>t.charCodeAt(0)===45&&t.charCodeAt(1)===45,b_=t=>wA(t)?t:dl(t);function Vd(t){let e=2166136261;for(let n=0;n<t.length;n++)e^=t.charCodeAt(n),e=e*16777619>>>0;return e.toString(36)}function QM(t){let e=String(t);return e.length<=20?e.replace(/\s+/g,"_").replace(/[^a-zA-Z0-9_-]/g,"").toLowerCase():Vd(e)}var JM={"backdrop-filter":"-webkit-backdrop-filter","user-select":"-webkit-user-select","mask-image":"-webkit-mask-image","mask-size":"-webkit-mask-size","mask-repeat":"-webkit-mask-repeat","mask-position":"-webkit-mask-position","mask-clip":"-webkit-mask-clip","mask-origin":"-webkit-mask-origin","background-clip":"-webkit-background-clip"};function ti(t,e){let n=JM[t];return n?`${t}:${e};${n}:${e};`:`${t}:${e};`}function __(t){let e="";for(let n in t){let r=t[n];if(typeof r!="object"||r===null)continue;let o="";for(let s in r){let i=s.charCodeAt(0)===45&&s.charCodeAt(1)===45;o+=ti(i?s:dl(s),r[s])}e+=`${n}{${o}}`}return e}var tN="@media (hover: hover)",eN=/(?:^|[^\\]):hover(?![\w-])/;function C_(){try{let t=O();if(t&&t.hoverMedia===!1)return!1}catch{}return!0}function jn(t,e,n){return n===!1||!eN.test(e)||n===void 0&&!C_()?t:`${tN}{${t}}`}function lA(t,e,n){let r=(n?n+"":"")+t+":"+e,o=ei.get(r),s=o?null:b_(t);if(!o){let c=ZM[t]||Vd(t),l=QM(e);o=n?`_${n}_${c}-${l}`:`_${c}-${l}`,ei.set(r,o)}if(typeof e=="string"&&(e.indexOf("}")!==-1||e.indexOf("{")!==-1))return o;let i=s||b_(t),a=`.${o}{${ti(i,e)}}`;return nn(a,void 0,"atomic",!0),o}var fA=new WeakMap,uA=new WeakMap;function nn(t,e,n,r){let o=Hd(e,nN(t,r,n));if(!o)return ge.dropped++,"dropped";let s=fA.get(o);if(s||(s=new Set,fA.set(o,s)),s.has(t))return ge.duplicate++,ge[n||"global"]++,"duplicate";let i=uA.get(o);if(i&&i.has(t))return ge.invalid++,"invalid";try{o.insertRule(t,o.cssRules.length)}catch{return i||(i=new Set,uA.set(o,i)),i.add(t),ge.invalid++,"invalid"}return s.add(t),ge[n||"global"]++,"inserted"}var Te="0:0",w_="1:0",SA="0:99",dA=/\((max|min)-width:\s*([\d.]+)(px|em|rem)?\)/g;function nN(t,e,n){if(typeof t!="string"||!t)return Te;if(t.charCodeAt(0)===64){if(!t.startsWith("@media")&&!t.startsWith("@supports")&&!t.startsWith("@container"))return Te;let i=1/0,a=-1/0;dA.lastIndex=0;let c;for(;c=dA.exec(t);){let l=parseFloat(c[2])*(c[3]==="em"||c[3]==="rem"?16:1);c[1]==="max"?i=Math.min(i,l):a=Math.max(a,l)}return i!==1/0?"2:"+-i:a!==-1/0?"3:"+a:w_}if(t.charCodeAt(0)!==46)return n==="atomic"&&!e?SA:Te;if(!/^\.[\w-]+\{/.test(t))return w_;if(!e)return Te;let r=t.indexOf("{"),o=t.indexOf(":",r);if(o===-1)return Te;let s=Qs(t.slice(r+1,o).trim());return s?"0:"+s:Te}var Js=null,rN=()=>{if(Js)return Js;let t=0;for(let e in ze)t=Math.max(t,Qs(e));Js=[Te];for(let e=1;e<=t;e++)Js.push("0:"+e);return Js.push(SA,w_),Js},pA=t=>{let e=t.indexOf(":");return[Number(t.slice(0,e)),Number(t.slice(e+1))]},hA=(t,e)=>{let[n,r]=pA(t),[o,s]=pA(e);return n!==o?n<o:r<s},oN=t=>t.getAttribute("data-tier")||Te,gA=new WeakMap;function Hd(t,e){let n=t||Ao();if(!n||!n.head)return null;let r=e||Te,o=gA.get(n);o||(o=new Map,gA.set(n,o));let s=o.get(r);if(s&&s.node.parentNode===n.head&&s.node.sheet===s.sheet)return s.sheet;if(r!==Te){let c=rN();for(let l=0;l<c.length&&hA(c[l],r);l++)Hd(n,c[l])}let i=r===Te?n.head.querySelector("style[data-smbls]:not([data-tier])"):n.head.querySelector(`style[data-smbls][data-tier="${r}"]`);if(!i){i=n.createElement("style"),i.setAttribute("data-smbls",""),r!==Te&&i.setAttribute("data-tier",r);let c=n.head.querySelectorAll("style[data-smbls]"),l=null;for(let u=0;u<c.length;u++)if(hA(r,oN(c[u]))){l=c[u];break}let f=c.length?c[c.length-1]:null;l?n.head.insertBefore(i,l):f?n.head.insertBefore(i,f.nextSibling):n.head.appendChild(i)}let a=i.sheet;return o.set(r,{sheet:a,node:i}),r===Te&&(yA=a),a}function sN(t){let e=t||Ao();if(!e||!e.head)return[];let n=[],r=e.head.querySelectorAll("style[data-smbls]");for(let o=0;o<r.length;o++)r[o].sheet&&n.push(r[o].sheet);return n}var iN=8;function Oe(t,e,n,r){if(!t||typeof t!="object")return"";let o=!!(r&&r.state),s=null,i=0,a=[],c=[],l=Object.keys(t);for(let u=0;u<l.length;u++){let d=l[u],p=t[d];p==null||p===!1||p===""||(typeof p=="object"?c.push([d,p]):y_&&!wA(d)?(s||(s=[]),s.push(d,String(p)),i++):a.push(lA(d,String(p),n)))}if(s&&i>=iN){let u=s.join("\0"),d=y_(u),p=d.indexOf("\0"),g=d.substring(0,p),h=d.substring(p+1);if(h){let m=h.split(`
|
|
56
|
+
`);for(let y=0;y<m.length;y++)m[y]&&nn(m[y],void 0,"atomic",!0)}a.push(g)}else if(s)for(let u=0;u<s.length;u+=2)a.push(lA(s[u],s[u+1],n));let f=[];for(let u=0;u<c.length;u++)f.push(fN(c[u][0],c[u][1],n,o));return a.concat(f).join(" ").trim()}var mA=new Map,aN=/^&?:(hover|focus|focus-visible|focus-within|active)(?![\w-])/;function pl(t){return/^@(media|supports|container)\b/.test(t)}function cN(t){return typeof t!="string"||!t||pl(t)?!1:t.split(",").every(e=>aN.test(e.trim()))}var xA=t=>{let e=Object.prototype.toString.call(t);return e==="[object Object]"||e==="[object Array]"},S_=32,x_=1024,k_=!1;function jd(t,e,n){if(k_)return;k_=!0;let r=[e,...n],o=r.length>12?[...r.slice(0,6),`\u2026${r.length-9} more\u2026`,...r.slice(-3)]:r;console.warn(`[@symbo.ls/css] ${t} at ${o.join(" > ")} \u2014 skipped. A style block may hold only CSS values and nested plain blocks; the rest of this rule is still emitted. (One warning per page.)`)}function lN(t){try{return JSON.stringify(t)}catch{let n=[],r=0;return JSON.stringify(t,function(o,s){if(!s||typeof s!="object")return s;for(;n.length&&n[n.length-1]!==this;)n.pop();if(!(n.length&&(n.includes(s)||!xA(s)||n.length>S_||++r>x_)))return n.push(s),s})}}function fN(t,e,n,r){let o=lN(e),s=t.indexOf(":hover")!==-1||o.indexOf(":hover")!==-1,i=s&&C_(),a=(n?n+"":"")+t+o+(s&&!i?"rawhover":"")+(r?"state":""),c=ei.get(a);if(c){let k=mA.get(c);if(k)for(let S=0;S<k.length;S++)nn(k[S],void 0,"atomic");return c}c=n?`_${n}_c${Vd(a)}`:`_c${Vd(a)}`;let l=r?`.${c}.${c}`:`.${c}`,f=cN(t)?`${l}.${c}`:l,u="",d=[],p=k=>typeof k=="string"&&(k.indexOf("{")!==-1||k.indexOf("}")!==-1),g=new Set,h=0,m=(k,S)=>{g.add(S);let _="",E=Object.keys(S);for(let C=0;C<E.length;C++){let $=E[C],M=S[$];if(M!=null)if(typeof M=="object"){let R=[...k,$];g.has(M)?jd("a style value that loops back to one of its own ancestors",t,R):xA(M)?R.length>S_?jd(`a style block nested more than ${S_} levels deep`,t,R):++h>x_?jd(`a style object with more than ${x_} nested blocks`,t,R):m(R,M):jd(`a ${Object.prototype.toString.call(M).slice(8,-1)} (not a style block)`,t,R)}else{if(p(M))continue;_+=ti(b_($),M)}}g.delete(S),_&&(k.length===0?u+=_:d.push({chain:k,body:_}))};m([],e);let y=k=>k.startsWith(":")||k.startsWith("["),w=(k,S=!0)=>{let _=S&&k.length===1?f:l;if(!k.length)return _;let E=k[0].split(",").map(C=>C.trim()).map(C=>C.includes("&")?C.replace(/&/g,_):y(C)?`${_}${C}`:`${_} ${C}`);for(let C=1;C<k.length;C++){let $=k[C].split(",").map(R=>R.trim()),M=[];for(let R of E)for(let j of $)j.includes("&")?M.push(j.replace(/&/g,R)):y(j)?M.push(R+j):M.push(R+" "+j);E=M}return E.join(", ")},b=[],x=(k,S)=>{let _=k.filter(pl),E=w(k.filter($=>!pl($)),_.length===0),C=`${E}{${S}}`;for(let $=_.length-1;$>=0;$--)C=`${_[$]}{${C}}`;C=jn(C,E,i),b.push(C),nn(C,void 0,"atomic")};u&&x([t],u);for(let k of d)x([t,...k.chain],k.body);return mA.set(c,b),ei.set(a,c),c}function vt(t){if(t==null||typeof t!="string"&&typeof t!="object")return;if(Hd(),typeof t=="string"){let s=t.indexOf("--")!==-1;nn(t,void 0,s?"variable":"global"),s&&cA(1);return}let e=C_(),n=0,r=Object.keys(t),o=s=>{let i=s.match(/max-width:\s*(\d+)/);return i?parseInt(i[1]):0};r.sort((s,i)=>{let a=s.startsWith("@media"),c=i.startsWith("@media");return!a&&!c?0:a?c?o(i)-o(s):1:-1});for(let s of r){let i=t[s];if(s.startsWith("@keyframes")){let a=__(i);a&&nn(`${s}{${a}}`,void 0,"keyframes");continue}if(pl(s))for(let a in i){let c=i[a];if(a.startsWith("@keyframes")){let l=__(c);l&&nn(`${s}{${a}{${l}}}`,void 0,"keyframes");continue}if(typeof c=="object"&&c!==null){let l="",f=0;for(let u in c){let d=u.charCodeAt(0)===45&&u.charCodeAt(1)===45;d&&f++;let p=d?u:dl(u);l+=ti(p,c[u])}n+=f,nn(jn(`${s}{${a}{${l}}}`,a,e),void 0,f?"variable":"global")}else{let l=a.charCodeAt(0)===45&&a.charCodeAt(1)===45;l&&n++;let f=l?a:dl(a);nn(`${s}{${ti(f,c)}}`,void 0,l?"variable":"global")}}else{let a="",c=!1,l=0;for(let f in i){let u=i[f];if(typeof u=="object"&&u!==null)c=!0;else{let d=f.charCodeAt(0)===45&&f.charCodeAt(1)===45;d&&l++;let p=d?f:dl(f);a+=ti(p,u)}}if(n+=l,a&&nn(jn(`${s}{${a}}`,s,e),void 0,l?"variable":"global"),c){let f=[],u=[];for(let d in i)typeof i[d]=="object"&&i[d]!==null&&(pl(d)?f.push(d):u.push(d));f.sort((d,p)=>{let g=h=>{let m=h.match(/max-width:\s*(\d+)/);return m?parseInt(m[1]):0};return g(p)-g(d)});for(let d of u)vt({[`${s} ${d}`]:i[d]});for(let d of f)vt({[d]:{[s]:i[d]}})}}}n>0&&cA(n)}function ni(t,e){return nn(`@keyframes ${t}{${__(e)}}`,void 0,"keyframes"),t}function kA(){ei.clear(),yA=null,k_=!1}function T_(){return ei.size}I();var Nw={};F(Nw,{DELEGATED_EVENTS:()=>ai,LIFECYCLE_EVENTS:()=>Tr,MIXINS:()=>Gd,NON_BUBBLING_EVENTS:()=>Yd,REGISTRY:()=>Nt,SVG_TAGS:()=>ii,addDelegatedEvent:()=>gl,addMethods:()=>gi,adoptHydrationNode:()=>Kd,applyExtends:()=>fi,cacheNode:()=>Cr,create:()=>re,createHTMLNode:()=>si,detectTag:()=>Bn,dispose:()=>zn,elementPath:()=>qd,flushMounts:()=>Al,globalEventKeyInfo:()=>Zd,inertOutsidePlugin:()=>bp,isSvgTag:()=>Ar,isValidTag:()=>oi,refreshContextProto:()=>mi,registerEvent:()=>ci,registerGlobalEvent:()=>Qd,remove:()=>hi,removeDelegatedEvent:()=>ml,update:()=>di});Kt();Kt();var ri="http://www.w3.org/2000/svg",ii=new Set(["svg","path","circle","ellipse","line","polyline","polygon","rect","g","defs","use","symbol","clipPath","mask","pattern","image","text","tspan","textPath","marker","linearGradient","radialGradient","stop","filter","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","animate","animateMotion","animateTransform","set","foreignObject","desc","title","metadata"]),uN=new Set(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","i","iframe","img","input","ins","kbd","label","legend","li","link","main","map","mark","menu","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","search","section","select","slot","small","source","span","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","string","fragment","shadow"]);function oi(t){return uN.has(t)||ii.has(t)}function Ar(t){return ii.has(t)}function Bn(t){let{tag:e,key:n}=t;if(typeof e=="function")try{e=e(t,t.state,t.context)}catch(s){e=void 0,typeof console<"u"&&console.error&&console.error(`[smbls] \`tag:\` factory threw on "${n||"<anon>"}" \u2014 falling back to key-based tag detection:`,s?.message||s)}if(e===!0&&(e=n),typeof e=="string"&&oi(e))return e;if(!n||typeof n!="string")return"div";let r=new Set(["html","head","body","meta","link","script","style","title","base","noscript","template","th","tr","td","thead","tbody","tfoot","caption","col","colgroup"]),o=n.toLowerCase();return o.includes(".")&&(o=o.split(".")[0]),o.includes("_")&&(o=o.split("_")[0]),oi(o)&&!r.has(o)?o:"div"}var vA={};function si(t,e){let n=e?.context?.document||globalThis.document;if(!n)return null;if(t==="string")return n.createTextNode(e?.text||"");if(t==="fragment")return n.createDocumentFragment();if(Ar(t)){let r=e?.parent;if(t==="svg"||r?.node?.namespaceURI===ri)return n.createElementNS(ri,t);if(t!=="svg")return n.createElement("div")}return n.createElement(t)}function Cr(t){let e=t.tag=Bn(t),r=Ar(e)&&(e==="svg"||t.parent?.node?.namespaceURI===ri)?"svg:"+e:e,o=t?.context?.document||globalThis.document,s=vA[r];if(s||(s=vA[r]=si(e,t)),!s)return null;let i=o&&s.ownerDocument!==o?si(e,t):s.cloneNode(!0);return e==="string"&&(i.nodeValue=t.text||""),i}var qd=t=>{let e=t.__ref;if(e&&e.__hydrationPath!==void 0)return e.__hydrationPath;let n=t.parent,r=n&&n.__ref?qd(n):null,o=r===null?"":r?r+"."+t.key:String(t.key);return e&&(e.__hydrationPath=o),o},dN=new Set(["src","srcset"]);function Kd(t){let e=t?.context?.__hydration;if(!e)return null;let n=t.tag=Bn(t);if(n==="string"||n==="fragment")return null;let r=qd(t),o=e.registry[r===""?"__root":r],s=o!==void 0?e.nodes[o]:null;if(!s||s.nodeType!==1||e.claimed.has(s))return o!==void 0&&e.misses++,null;let i=Ar(n)&&(n==="svg"||t.parent?.node?.namespaceURI===ri),a=Ar(n)&&!i&&n!=="svg"?"div":n,c=i?s.namespaceURI===ri:s.namespaceURI!==ri;if(s.localName!==a||!c)return e.misses++,null;e.claimed.add(s),e.adopted++;for(let l of Array.from(s.getAttributeNames?s.getAttributeNames():[]))dN.has(l)||s.removeAttribute(l);for(;s.firstChild;)s.removeChild(s.firstChild);return s}var Nt=new Set(["extends","children","content","childrenAs","childExtends","childExtendsRecursive","childProps","inheritParentProps","state","if","define","deps","tag","attr","style","text","html","value","data","classlist","class","vars","scope","root","context","$router","routes","fetch","variables","query","key","component","preventContentUpdate","preventContentRecreate","subscribeTo","autoGrow","srcObject","allowRuntimeTemplates","__name","__ref","__hash","__text","parent","node"]),Gd={text:"text",html:"html",style:"style",attr:"attr",data:"data",classlist:"classlist",state:"state",scope:"scope"},Tr=new Set(["start","init","complete","attachNode","stateInit","stateCreated","beforeUpdate","update","afterUpdate","beforeClassAssign","lazyLoad","render","renderRouter","done","create","frame","mounted","contentUpdate","startUpdate","stateUpdate","beforeStateUpdate","initInspect","initSync","beforeRemove","remove","bridgeMount","bridgeUpdate","bridgeDestroy"]),Yd=new Set(["load","error","abort","scroll","canplay","canplaythrough","ended","pause","play","playing","ratechange","seeked","seeking","stalled","suspend","timeupdate","volumechange","waiting","durationchange","loadeddata","loadedmetadata","progress","emptied","resize"]),Xd=new Set(["wheel","mousewheel","touchstart","touchmove","touchend","touchcancel"]),ai=new Set(["click","dblclick","mousedown","mouseup","mousemove","mouseenter","mouseleave","mouseover","mouseout","pointerdown","pointerup","pointermove","pointerenter","pointerleave","pointerover","pointerout","touchstart","touchend","touchmove","keydown","keyup","keypress","input","change","submit","reset","focus","blur","focusin","focusout","wheel","contextmenu","drag","dragstart","dragend","dragenter","dragleave","dragover","drop"]);I();var P_=new WeakMap,pN={passive:!0},hN={passive:!0,capture:!0},TA=(t,e)=>Xd.has(t)?e?hN:pN:e||!1;function OA(t){let e=P_.get(t);return e||(e={handlers:new Map,installed:new Set},P_.set(t,e)),e}function gN(t,e){let n=OA(e);if(n.installed.has(t))return;n.installed.add(t);let r=t==="focus"||t==="blur"||t==="focusin"||t==="focusout"||t==="mouseenter"||t==="mouseleave"||t==="pointerenter"||t==="pointerleave",o=t==="mouseenter"||t==="mouseleave"||t==="pointerenter"||t==="pointerleave";e.addEventListener(t,s=>{if(o){let a=s.target,c=n.handlers.get(t),l=c&&a?c.get(a):null;if(!l||s.relatedTarget&&typeof a.contains=="function"&&a.contains(s.relatedTarget))return;l(s);return}let i=s.target;for(;i&&i!==e;){let a=n.handlers.get(t);if(a){let c=a.get(i);if(c&&(c(s),s.cancelBubble))return}i=i.parentNode}},TA(t,r))}function gl(t,e,n,r){r||(r=e.ownerDocument?.documentElement||e.getRootNode());let o=OA(r);gN(t,r),o.handlers.has(t)||o.handlers.set(t,new WeakMap),o.handlers.get(t).set(e,n)}function ml(t,e,n){n||(n=e.ownerDocument?.documentElement||e.getRootNode());let r=P_.get(n);if(!r)return;let o=r.handlers.get(t);o&&o.delete(e)}function mN(t){return ai.has(t)&&!Tr.has(t)}function RA(t,e){let{context:n}=t,r=n?.designSystem;return o=>{r&&J(r);try{let s=e.call(t,o,t,t.state,n);if(s&&typeof s.then=="function"){s.catch(i=>{t.error=i,console.error("[DOMQL] Async event error:",i)}).finally(()=>{r&&X()});return}}catch(s){if(t.error=s,console.error("[DOMQL] Event error:",s),n?.strictMode)throw s}r&&X()}}var PA=t=>!!t&&(t.capture===!0||typeof t.passive=="boolean"||t.once===!0);function yN(t,e){return PA(e)?{capture:e.capture===!0,passive:typeof e.passive=="boolean"?e.passive:Xd.has(t),once:e.once===!0}:TA(t,!1)}function bN(t,e,n){return r=>{let o=r.target;if(o&&o.nodeType!==1&&(o=o.parentElement),!o||typeof o.closest!="function")return;let s;try{s=o.closest(e)}catch{return}s&&t.contains(s)&&n(r)}}function ci(t,e,n,r){let{node:o,context:s}=e;if(!o)return;let i=RA(e,n),a=r&&typeof r.selector=="string"&&r.selector;a&&(i=bN(o,a,i));let l=!Yd.has(t)&&mN(t)&&!PA(r),f=l?null:yN(t,r);if(l){let u=s?.rootNode||o.ownerDocument?.documentElement;gl(t,o,i,u)}else o.addEventListener(t,i,f);e.__ref.__eventCleanup||(e.__ref.__eventCleanup=[]),e.__ref.__eventCleanup.push(()=>{if(l){let u=s?.rootNode||o.ownerDocument?.documentElement;ml(t,o,u)}else o.removeEventListener(t,i,f)})}var O_=[["onDocument","document"],["onWindow","window"],["onVisualViewport","visualViewport"],["onMediaQuery","mediaQuery"]];function Zd(t){if(typeof t!="string")return null;for(let e=0;e<O_.length;e++){let n=O_[e][0];if(t.length<=n.length||!t.startsWith(n))continue;let r=t.charCodeAt(n.length);if(!(r<65||r>90))return{target:O_[e][1],eventName:t.slice(n.length).toLowerCase()}}return null}var _N=/^[A-Za-z_$][\w$]*$/;function wN(t,e,n){let r=e,o=!1,s,i=!1,a=null;if(e&&typeof e=="object"&&typeof e!="function"&&(r=e.handler,o=!!e.capture,i=!!e.once,typeof e.passive=="boolean"&&(s=e.passive),typeof e.query=="string"&&(a=e.query)),typeof r=="string"&&_N.test(r)){let c=r;r=function(f){return t.call(c,f)}}return typeof r!="function"?null:(s===void 0&&(s=Xd.has(n)),{handler:r,capture:o,passive:s,once:i,query:a})}function SN(t,e,n){let r=t.node?.ownerDocument||t.context?.document||(typeof document<"u"?document:null);if(!r||typeof r.addEventListener!="function")return null;if(e==="document")return r;let o=r.defaultView||(typeof window<"u"?window:null);if(!o)return null;if(e==="window")return typeof o.addEventListener=="function"?o:null;if(e==="visualViewport"){let s=o.visualViewport;return s&&typeof s.addEventListener=="function"?s:null}if(e==="mediaQuery"){let s=n&&n.query;if(typeof s!="string"||!s.trim()||typeof o.matchMedia!="function")return null;try{return o.matchMedia(s)||null}catch{return null}}return null}var R_=/^@media\s+/i,xN=/^[@[.#&:>*~+]/,EA=new Set;function AA(t,e){!Q()||EA.has(t)||(EA.add(t),console.warn(`[smbls] onMediaQueryChange: "${t}" ${e} \u2014 no listener is registered.`))}function kN(t,e){if(typeof e!="string")return null;let n=e.trim();if(!n)return null;let r=t.context?.designSystem?.media,o=i=>{let a=r&&typeof r=="object"?r[i]:void 0;return typeof a=="string"&&a.trim()?a.trim():null},s=n;if(n.charCodeAt(0)===64&&!R_.test(n)){if(s=o(n.slice(1)),!s)return AA(n,"is not a key of designSystem.media"),null}else s=o(n)||n;return R_.test(s)?s.replace(R_,"").trim()||null:xN.test(s)?(AA(n,`names "${s}", which is not a media query`),null):s}function vN(t,e,n,r){try{return t.addEventListener(e,n,r),!0}catch{return typeof t.addListener=="function"?(t.addListener(n),!0):!1}}function LA(t,e,n,r){try{t.removeEventListener(e,n,r)}catch{typeof t.removeListener=="function"&&t.removeListener(n)}}function EN(t){let e=t.node;if(!e)return!1;let n=e.nodeType===11?t.__ref?.__fragmentAnchor:e;return n?n.isConnected!==!1:!1}function Qd(t,e,n){if(e.__ref){if(Array.isArray(n)){if(t.target!=="mediaQuery")return;for(let o=0;o<n.length;o++)CA(t,e,n[o]);return}CA(t,e,n)}}function CA(t,e,n){let r=e.__ref,o=wN(e,n,t.eventName);if(!o||t.target==="mediaQuery"&&t.eventName!=="change"||t.target==="mediaQuery"&&(o.query=kN(e,o.query),!o.query))return;let s=SN(e,t.target,o);if(!s)return;let i=t.target+":"+(o.query?o.query+":":"")+t.eventName+":"+(o.capture?1:0);if(r.__globalEvents&&r.__globalEvents.has(i))return;let a=RA(e,o.handler),c=t.target==="window"&&t.eventName==="load",l=!1,f=p=>{if(EN(e)){if(c){if(l)return;l=!0}a(p)}},u={capture:o.capture,passive:o.passive,once:o.once};if(!vN(s,t.eventName,f,u))return;r.__globalEvents||(r.__globalEvents=new Map);let d={target:s,eventName:t.eventName,listener:f,options:u};r.__globalEvents.set(i,d),r.__eventCleanup||(r.__eventCleanup=[]),r.__eventCleanup.push(()=>{LA(s,t.eventName,f,u),r.__globalEvents&&r.__globalEvents.delete(i)}),c&&AN(e,i,d,()=>l)}function AN(t,e,n,r){let o=n.target.document;!o||o.readyState!=="complete"||queueMicrotask(()=>{let s=t.__ref;if(r()||!s||!s.__globalEvents||s.__globalEvents.get(e)!==n)return;let i=n.target,a=typeof i.Event=="function"?i.Event:typeof Event=="function"?Event:null;a&&(n.listener(new a("load")),n.options.once&&r()&&LA(i,"load",n.listener,n.options))})}Kt();fr();var CN=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);function li(t,e,n){t.context?.plugins?.length&&Ct("error",t,{hook:e,error:n})||console.error(`[DOMQL] Lifecycle "${e}" error:`,n)}function IA(t,e,n){let r=Qt();r&&Dt(null);let o=t.context?.designSystem;o&&J(o);try{return e.call(t,n,t,t.state,t.context)}finally{o&&X(),r&&Dt(r)}}function TN(t,e){if(!Q())return;let n=e.__children&&e.__children.length>0;!n&&t.html==null||console.warn(`[smbls] bridge host "${e.path.join(".")}" renders DOMQL ${n?"children":"html"} inside the node it hands to its library \u2014 the library owns that subtree and may replace them. Keep DOMQL children beside the host, not in it.`)}function $A(t){let e=t.__ref,n=t.node;if(!e||!n||e.__bridge||typeof t.onBridgeMount!="function"||!("scrollHeight"in n))return;let r=e.__bridge={settled:!1,failed:!1,disposed:!1,destroyed:!1,instance:void 0,effect:null};e.contentManaged=!0,TN(t,e);let o;try{o=IA(t,t.onBridgeMount,n)}catch(s){if(r.failed=!0,li(t,"onBridgeMount",s),t.context?.strictMode)throw s;return}if(o&&typeof o.then=="function"){o.then(s=>DA(t,r,s),s=>{r.failed=!0,li(t,"onBridgeMount",s)});return}DA(t,r,o)}function DA(t,e,n){if(e.settled=!0,e.instance=n,e.disposed){NA(t,e);return}if(Object.defineProperty(t,"bridge",{value:n,writable:!0,configurable:!0,enumerable:!1}),typeof t.onBridgeUpdate!="function")return;let r=t.__ref;e.effect=K(()=>{if(e.disposed)return;let o=t.context?.designSystem;o&&J(o);try{let s=t.onBridgeUpdate.call(t,e.instance,t,t.state,t.context);s&&typeof s.then=="function"&&s.catch(i=>li(t,"onBridgeUpdate",i))}catch(s){li(t,"onBridgeUpdate",s)}finally{o&&X()}},{depth:r.path.length,label:()=>r.path.join(".")+"::onBridgeUpdate"}),r.__effects.push(e.effect)}function MA(t){let e=t.__ref?.__bridge;!e||e.disposed||(e.disposed=!0,e.effect&&e.effect.dispose(),e.settled&&NA(t,e))}function NA(t,e){if(e.destroyed)return;e.destroyed=!0;let n=e.instance;if(e.instance=void 0,CN(t,"bridge")&&(t.bridge=void 0),typeof t.onBridgeDestroy=="function")try{let r=IA(t,t.onBridgeDestroy,n);r&&typeof r.then=="function"&&r.catch(o=>li(t,"onBridgeDestroy",o))}catch(r){li(t,"onBridgeDestroy",r)}}function FA(t){let e=[];return t.extends&&(Array.isArray(t.extends)?e.push(...t.extends):e.push(t.extends)),t.extend&&(Array.isArray(t.extend)?e.push(...t.extend):e.push(t.extend)),e}function fi(t,e,n){let r=FA(e);if(!r.length)return;let s=(t.context||n?.context||{}).components||{};for(let i=0;i<r.length;i++){let a=jA(r[i],s);a&&a!==e&&BA(t,a,n,new Set([e]))}}function jA(t,e){if(typeof t=="string"){if(t.includes(">")){let n=t.split(">").map(o=>o.trim()),r=e[n[0]]||e[`smbls.${n[0]}`];for(let o=1;o<n.length&&r;o++)r=r[n[o]];return r||null}return e[t]||e[`smbls.${t}`]||null}return typeof t=="object"&&t!==null?t:null}function BA(t,e,n,r=new Set){if(r.has(e))return;r.add(e);let o=FA(e);if(o.length){let a=(t.context||n?.context||{}).components||{};for(let c=0;c<o.length;c++){let l=jA(o[c],a);l&&BA(t,l,n,r)}}let s=L_(t);for(let i in e){if(i==="extends"||i==="extend")continue;let a=e[i];s&&s.set(i,s.rank),t[i]===void 0?a&&typeof a=="object"&&!Array.isArray(a)&&typeof a!="function"?t[i]={...a}:t[i]=a:typeof t[i]=="object"&&typeof a=="object"&&!Array.isArray(t[i])&&!Array.isArray(a)&&t[i]!==null&&a!==null?t[i]=UA(t[i],a):t[i]=a}}function L_(t){let e=t&&t.__ref;if(!e)return null;let n=e.__mergeLayer;return n||(n=e.__mergeLayer=new Map),n.rank=(n.rank||0)+1,n}function UA(t,e){let n={...t};for(let r in e){let o=n[r],s=e[r];o&&s&&typeof o=="object"&&typeof s=="object"&&!Array.isArray(o)&&!Array.isArray(s)&&typeof o!="function"&&typeof s!="function"?n[r]=UA(o,s):n[r]=s}return n}Kt();fr();I();var ON=["alert","alertdialog","application","article","banner","button","cell","checkbox","columnheader","combobox","complementary","contentinfo","definition","dialog","directory","document","feed","figure","form","grid","gridcell","group","heading","img","link","list","listbox","listitem","log","main","marquee","math","menu","menubar","menuitem","menuitemcheckbox","menuitemradio","navigation","none","note","option","presentation","progressbar","radio","radiogroup","region","row","rowgroup","rowheader","scrollbar","search","searchbox","separator","slider","spinbutton","status","switch","tab","table","tablist","tabpanel","term","textbox","timer","toolbar","tooltip","tree","treegrid","treeitem"],RN=["alignment-baseline","baseline-shift","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-rendering","cursor","direction","display","dominant-baseline","fill-opacity","fill-rule","filter","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","glyph-orientation-horizontal","glyph-orientation-vertical","image-rendering","letter-spacing","lighting-color","marker-end","marker-mid","marker-start","mask","mask-type","opacity","overflow","paint-order","pointer-events","shape-rendering","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","text-decoration","text-overflow","text-rendering","transform","transform-origin","unicode-bidi","vector-effect","visibility","white-space","word-spacing","writing-mode"],PN=["requiredExtensions","systemLanguage"],VA={circle:["cx","cy","r","pathLength"],ellipse:["cx","cy","rx","ry","pathLength"],line:["x1","y1","x2","y2","pathLength"],path:["d","pathLength"],polygon:["points","pathLength"],polyline:["points","pathLength"],rect:["x","y","width","height","rx","ry","pathLength"],g:[],defs:[],switch:[],symbol:["viewBox","preserveAspectRatio","refX","refY","x","y","width","height"],use:["href","xlink:href","x","y","width","height"],image:["href","xlink:href","x","y","width","height","preserveAspectRatio","crossorigin"],foreignObject:["x","y","width","height"],text:["x","y","dx","dy","rotate","textLength","lengthAdjust"],tspan:["x","y","dx","dy","rotate","textLength","lengthAdjust"],textPath:["href","xlink:href","path","startOffset","method","spacing","side","textLength","lengthAdjust"],linearGradient:["x1","y1","x2","y2","gradientUnits","gradientTransform","spreadMethod","href","xlink:href"],radialGradient:["cx","cy","r","fx","fy","fr","gradientUnits","gradientTransform","spreadMethod","href","xlink:href"],stop:["offset"],pattern:["x","y","width","height","patternUnits","patternContentUnits","patternTransform","viewBox","preserveAspectRatio","href","xlink:href"],clipPath:["clipPathUnits"],mask:["x","y","width","height","maskUnits","maskContentUnits"],marker:["viewBox","preserveAspectRatio","refX","refY","markerUnits","markerWidth","markerHeight","orient"],filter:["x","y","width","height","filterUnits","primitiveUnits"]},LN=new Set(["linearGradient","radialGradient","stop","clipPath","mask","marker","pattern","filter","symbol"]),DN=()=>{let t={};for(let e in VA)t[e]=[...VA[e],...LN.has(e)?[]:PN,...RN];return t},ui={default:["accesskey","autofocus","class","contenteditable","contextmenu","dir","draggable","enterkeyhint","exportparts","headingoffset","headingreset","hidden","id","inputmode","lang","nonce","part","placeholder","popover","slot","spellcheck","style","tabindex","title","translate","writingsuggestions","inert","radiogroup","role","about","datatype","inlist","prefix","property","resource","typeof","vocab","autocapitalize","autocorrect","autosave","color","itemprop","itemscope","itemtype","itemid","itemref","results","security","unselectable","is"],a:["accesskey","charset","coords","download","href","hreflang","name","ping","referrerpolicy","rel","rev","shape","target","type"],aria:["aria-activedescendant","aria-atomic","aria-autocomplete","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-dropeffect","aria-errormessage","aria-expanded","aria-flowto","aria-grabbed","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext"],anchor:["download","href","hreflang","media","ping","rel","target","type","referrerpolicy"],audio:["autoplay","controls","crossorigin","loading","loop","muted","preload","src"],area:["alt","coords","download","href","hreflang","media","referrerpolicy","rel","shape","target","ping"],base:["href","target"],blockquote:["cite"],button:["command","commandfor","disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","name","popovertarget","popovertargetaction","type","value"],canvas:["height","width"],col:["span","width"],colgroup:["span"],data:["value"],details:["name","open"],del:["cite","datetime"],dialog:["closedby","open"],embed:["height","src","type","width"],fieldset:["disabled","form","name"],form:["accept-charset","acceptcharset","action","autocomplete","enctype","method","name","novalidate","target","rel"],html:["manifest"],iframe:["allow","allowfullscreen","allowtransparency","frameborder","height","loading","marginheight","marginwidth","mozallowfullscreen","name","referrerpolicy","sandbox","scrolling","seamless","src","srcdoc","webkitallowfullscreen","width"],img:["alt","controls","crossorigin","decoding","fetchpriority","height","ismap","loading","referrerpolicy","sizes","src","srcset","usemap","width"],ins:["cite","datetime"],input:["accept","alpha","alt","autocomplete","capture","checked","colorspace","crossorigin","dirname","disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","height","indeterminate","list","max","maxlength","min","minlength","multiple","name","pattern","placeholder","popovertarget","popovertargetaction","readonly","required","size","src","step","type","value","width"],keygen:["challenge","disabled","form","keytype","keyparams","name"],label:["form","for"],li:["value"],link:["as","blocking","crossorigin","disabled","fetchpriority","href","hreflang","integrity","media","imagesrcset","imagesizes","referrerpolicy","rel","sizes","type","charset"],map:["name"],menu:["type"],media:["autoplay","controls","currenttime","defaultmuted","defaultplaybackrate","loop","mediagroup","muted","playsinline","preload","src","volume"],meta:["charset","content","http-equiv","name","media"],meter:["form","high","low","max","min","optimum","value"],quote:["cite"],object:["classid","data","form","height","name","type","usemap","width","wmode"],ol:["reversed","start","type"],optgroup:["disabled","label"],option:["disabled","label","selected","value"],output:["form","for","name"],param:["name","value"],progress:["max","value"],q:["cite"],slot:["name"],script:["async","blocking","charset","crossorigin","defer","fetchpriority","integrity","nomodule","nonce","referrerpolicy","src","type"],select:["autocomplete","disabled","form","multiple","name","required","size","value","onchange"],source:["height","media","sizes","src","srcset","type","width"],style:["blocking","media","nonce","scoped","type"],table:["align","bgcolor","border","cellpadding","cellspacing","frame","rules","summary","width"],template:["for","shadowrootclonable","shadowrootcustomelementregistry","shadowrootdelegatesfocus","shadowrootmode","shadowrootserializable","shadowrootslotassignment"],textarea:["autocomplete","cols","dirname","disabled","form","maxlength","minlength","name","placeholder","readonly","required","rows","value","wrap"],td:["align","colspan","headers","rowspan","scope","abbr","height","width","valign"],th:["align","colspan","headers","rowspan","scope","abbr"],time:["datetime"],track:["default","kind","label","src","srclang"],video:["autoplay","controls","crossorigin","disablepictureinpicture","disableremoteplayback","height","loading","loop","muted","playsinline","poster","preload","src","width"],svg:["className","class","color","height","id","lang","max","media","method","min","name","style","target","type","width","role","tabindex","crossorigin","accent-height","accumulate","additive","alignment-baseline","allowReorder","alphabetic","amplitude","arabic-form","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baseline-shift","baseProfile","bbox","begin","bias","by","calcMode","cap-height","clip","clip-path","clipPathUnits","clip-rule","color-interpolation","color-interpolation-filters","color-profile","color-rendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominant-baseline","dur","dx","dy","edgeMode","elevation","enable-background","end","exponent","externalResourcesRequired","fill","fill-opacity","fill-rule","filter","filterRes","filterUnits","flood-color","flood-opacity","focusable","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","format","from","fx","fy","g1","g2","glyph-name","glyph-orientation-horizontal","glyph-orientation-vertical","glyphRef","gradientTransform","gradientUnits","hanging","href","horiz-adv-x","horiz-origin-x","ideographic","image-rendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letter-spacing","lighting-color","limitingConeAngle","local","marker-end","markerHeight","marker-mid","marker-start","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","opacity","operator","order","orient","orientation","origin","overflow","overline-position","overline-thickness","paint-order","panose-1","path","pathLength","patternContentUnits","patternTransform","patternUnits","pointer-events","points","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","rendering-intent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","scale","seed","shape-rendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stop-color","stop-opacity","strikethrough-position","strikethrough-thickness","string","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","surfaceScale","systemLanguage","tableValues","targetX","targetY","text-anchor","text-decoration","textLength","text-rendering","to","transform","u1","u2","underline-position","underline-thickness","unicode","unicode-bidi","unicode-range","units-per-em","v-alphabetic","values","vector-effect","version","vert-adv-y","vert-origin-x","vert-origin-y","v-hanging","v-ideographic","viewBox","viewTarget","visibility","v-mathematical","widths","word-spacing","writing-mode","x1","x2","x","xChannelSelector","x-height","xlink:actuate","xlink:arcrole","xlink:href","xlink:role","xlink:show","xlink:title","xlink:type","xml:base","xml:lang","xmlns","xmlns:xlink","xml:space","y1","y2","y","yChannelSelector","z","zoomAndPan"],...DN()},HA=["oncopy","oncut","onpaste","oncompositionend","oncompositionstart","oncompositionupdate","onfocus","onfocusin","onfocusout","onblur","onchange","onbeforeinput","oninput","onreset","onsubmit","oninvalid","onformdata","onload","onerror","ontoggle","onkeydown","onkeypress","onkeyup","onabort","oncanplay","oncanplaythrough","oncuechange","ondurationchange","onemptied","onencrypted","onended","onloadeddata","onloadedmetadata","onloadstart","onpause","onplay","onplaying","onprogress","onratechange","onseeked","onseeking","onstalled","onsuspend","ontimeupdate","onvolumechange","onwaiting","onauxclick","onclick","oncontextmenu","ondblclick","ondrag","ondragend","ondragenter","ondragexit","ondragleave","ondragover","ondragstart","ondrop","onmousedown","onmouseenter","onmouseleave","onmousemove","onmouseout","onmouseover","onmouseup","onselect","onselectionchange","onselectstart","ontouchcancel","ontouchend","ontouchmove","ontouchstart","ongotpointercapture","onpointercancel","onpointerdown","onpointerenter","onpointerleave","onpointermove","onpointerout","onpointerover","onpointerup","onlostpointercapture","onscroll","onresize","onwheel","onanimationstart","onanimationend","onanimationiteration","ontransitionstart","ontransitionrun","ontransitionend","ontransitioncancel","onoutrostart","onoutroend","onintrostart","onintroend","onmessage","onmessageerror","onvisibilitychange","oncancel","onclose","onfullscreenchange","onfullscreenerror"],WA=t=>t.startsWith("aria")&&t.length>4&&t.charCodeAt(4)>=65&&t.charCodeAt(4)<=90?"aria-"+t.charAt(4).toLowerCase()+t.slice(5).replace(/([A-Z])/g,e=>"-"+e.toLowerCase()):t.startsWith("data")&&t.length>4&&t.charCodeAt(4)>=65&&t.charCodeAt(4)<=90?"data-"+t.charAt(4).toLowerCase()+t.slice(5).replace(/([A-Z])/g,e=>"-"+e.toLowerCase()):null,Un=t=>WA(t)||GA(t),qA=new Set(["tabIndex","readOnly","maxLength","minLength","autoComplete","autoFocus","autoPlay","contentEditable","spellCheck","colSpan","rowSpan","srcSet","crossOrigin","accessKey","inputMode","enterKeyHint","formAction","noValidate","autoCapitalize","autoCorrect","writingSuggestions","headingOffset","headingReset","exportParts"]),D_=new Set;for(let t in ui)t==="default"||t==="aria"||t==="svg"||ui[t].forEach(e=>{e.startsWith("on")||D_.add(e)});var KA=t=>{let e=t.charCodeAt(0);if(e<97||e>122||!/[A-Z]/.test(t))return null;let n=t.replace(/[A-Z]/g,o=>"-"+o.toLowerCase());if(D_.has(n))return n;let r=t.toLowerCase();return D_.has(r)?r:null},GA=t=>qA.has(t)?t.toLowerCase():KA(t),IN=new Set(["draggable","contenteditable","spellcheck","autocorrect","writingsuggestions","translate"]),$N=new Map([["autocorrect",["on","off"]],["translate",["yes","no"]]]),rn=t=>typeof t=="string"&&(IN.has(t)||t.startsWith("aria-")),ne=(t,e)=>{if(e!==!0&&e!==!1)return e;if(rn(t)){let n=$N.get(t);return n?e?n[0]:n[1]:e?"true":"false"}return e===!0?"":e},He=(t,e)=>{if(e.startsWith("aria-")||e.startsWith("data-")||WA(e)||qA.has(e)||ui.default.includes(e))return!0;if(Object.prototype.hasOwnProperty.call(ui,t)){let n=ui[t];if(n.includes(e))return!0;let r=KA(e);return r!==null&&n.includes(r)}return!1},$_=t=>{if(!v(t))return!1;let e=t.toLowerCase();return HA.includes(e)},MN=(t,e,n)=>{let r={};for(let o in e)if(Object.prototype.hasOwnProperty.call(e,o)){if(n&&o in n)continue;if(o==="aria"&&e[o]&&typeof e[o]=="object"){for(let a in e[o])It(e[o][a])&&(r["aria-"+a]=e[o][a]);continue}if(o==="data"&&e[o]&&typeof e[o]=="object"){for(let a in e[o])if(It(e[o][a])){let c=a.replace(/([A-Z])/g,l=>"-"+l.toLowerCase());r["data-"+c]=e[o][a]}continue}let s=He(t,o),i=$_(o);if(It(e[o])&&(s||i)){let a=Un(o)||o;r[a]=e[o]}}return r},NN=(t,e)=>{let n={};if(t.attr)for(let r in t.attr)n[r]=t.attr[r](e,e.state,e.context);if(t.aria&&typeof t.aria=="object")for(let r in t.aria){let o=t.aria[r];typeof o=="function"&&(n["aria-"+r]=o(e,e.state,e.context))}if(t.data&&typeof t.data=="object")for(let r in t.data){let o=t.data[r];if(typeof o=="function"){let s=r.replace(/([A-Z])/g,i=>"-"+i.toLowerCase());n["data-"+s]=o(e,e.state,e.context)}}return n},Or=(t,e)=>{let n=t.call("exec",e,t);if(n)return v(n)&&n.includes("{{")&&(n=t.call("replaceLiteralsWithObjectFields",n)),n},I_=(t,e)=>{let n=(t.preSrc||"")+(Or(t,e)||"");if(!n)return;try{return new URL(n),n}catch{}let{context:r}=t;if(!r.files&&!r.assets)return n;if(n.startsWith("/assets/")){let o=n.slice(8),s=r.assets&&(r.assets[n]||r.assets[o]);return s&&s.content?s.content.src:n}if(n.startsWith("/files/")){let o=n.slice(7),s=r.files&&(r.files[n]||r.files[o]);return s&&s.content?s.content.src:n}if(r.assets){let o=r.assets[n];if(o&&o.content)return o.content.src}if(r.files){let o=r.files[n];if(o&&o.content)return o.content.src}return n},Co={src:t=>I_(t,t.src),href:t=>Or(t,t.href),action:t=>Or(t,t.action),poster:t=>I_(t,t.poster),data:t=>Or(t,t.data)},M_=t=>{let e=t.tag||"div",n={};for(let r in Co)if(t[r]!==void 0&&He(e,r)){let o=Co[r](t);o!==void 0&&(n[r]=o)}return n},zA=(t,e)=>{let n=e.context?.cases?.[t];if(n!==void 0)return P(n)?n.call(e,e):!!n},FN=(t,e,n)=>{if(t==="$"){let o=zA(e,n);return o===void 0&&(o=!!n[e]),o}let r=n[e]===!0||n.state[e];if(!r){let o=zA(e,n);o!==void 0&&(r=o)}return t==="."?!!r:!r},jN=new Set(["$",".","!"]),N_=(t,e,n,r=FN)=>{let o={},s=(i,a,c,l)=>{let f=a;o[i]=u=>{if(r(c,l,u))return P(f)?f(u,u.state,u.context):f}};for(let i in t){let a=i.charAt(0);if(!jN.has(a))continue;let c=t[i];if(!c||typeof c!="object")continue;let l=i.slice(1);for(let f in c){if(n&&f in n)continue;if(f==="aria"&&c[f]&&typeof c[f]=="object"){for(let g in c[f])s("aria-"+g,c[f][g],a,l);continue}if(f==="data"&&c[f]&&typeof c[f]=="object"){for(let g in c[f]){let h=g.replace(/([A-Z])/g,m=>"-"+m.toLowerCase());s("data-"+h,c[f][g],a,l)}continue}let u=He(e,f),d=$_(f);if(!u&&!d)continue;let p=Un(f)||f;s(p,c[f],a,l)}}return o};function di(t={},e={}){let n=this,r=n.__ref;if(!r)return;if((typeof t=="string"||typeof t=="number")&&(t={text:t}),!e.preventListeners&&typeof n.onBeforeUpdate=="function"&&F_(r))try{let a=n.onBeforeUpdate(n,n.state,n.context,e);if(a&&typeof a.then=="function")a.then(()=>Vn(r,!1),c=>{Vn(r,!0),n.context?.plugins?.length&&Ct("error",n,{hook:"onBeforeUpdate",error:c})||console.error("[DOMQL] onBeforeUpdate error:",c)});else if(Vn(r,!1),a===!1)return n}catch(a){throw Vn(r,!0),a}let o=!t||Object.keys(t).length===0,s=[],i=!1;Nf(()=>{if(t.state&&_t(n.state)&&n.state.$update(t.state),t.text!==void 0&&(n.text=t.text,!r.__exec.text&&n.node&&pi(n,t.text??"")),t.html!==void 0&&(n.html=t.html,!r.__exec.html&&n.node&&(n.node.innerHTML=t.html)),t.style&&n.node?.style){if(!r.__exec.style){let a=yl(n,t.style);for(let c in a){let l=a[c];if(l==null)continue;let f=c.replace(/[A-Z]/g,d=>"-"+d.toLowerCase()),u=String(l).replace(/\s*!important\s*$/,"");n.node.style.setProperty(f,u,"important")}}n.style||(n.style={}),Object.assign(n.style,t.style)}if(t.attr&&n.node?.setAttribute){for(let a in t.attr){let c=t.attr[a],l=To(n.node,a);c==null||c===!1&&!rn(a)?n.node.removeAttribute(a):typeof c!="function"&&typeof c!="object"&&n.node.setAttribute(a,ne(a,c)),Oo(n.node,l)}n.attr||(n.attr={}),Object.assign(n.attr,t.attr)}if(t.data&&n.node?.dataset){for(let a in t.data)n.node.dataset[a]=t.data[a];n.data||(n.data={}),Object.assign(n.data,t.data)}if(t.vars&&typeof t.vars=="object"&&!Array.isArray(t.vars)){let a=n.vars&&typeof n.vars=="object"&&!Array.isArray(n.vars)?n.vars:null;n.vars={...a,...t.vars},i=!0}for(let a in t){if(Nt.has(a)||a==="state")continue;let c=t[a],l=n[a];if(l&&l.__ref&&typeof l.update=="function")l.update(c,e);else if(typeof c=="object"&&c!==null){let f=a.charCodeAt(0);f>=65&&f<=90&&re(c,n,a,e)}else a!=="text"&&a!=="html"&&a!=="style"&&a!=="attr"&&a!=="data"&&(n[a]=c,typeof c!="function"&&s.push(a))}});for(let a=0;a<s.length;a++)ZA(n,s[a]);if(n.node){let a=i;for(let c=0;!a&&c<s.length;c++)YA(s[c])&&(a=!0);a&&XA(n)}if(n.node&&o&&r.__effects&&r.__effects.length)for(let a=0;a<r.__effects.length;a++){let c=r.__effects[a];c&&!c._disposed&&!c._isSubscribeToEffect&&typeof c._execute=="function"&&c._execute()}else if(n.node&&r.__conditionalRunners)for(let a of r.__conditionalRunners)a();return Ct("update",n),!e.preventListeners&&typeof n.onUpdate=="function"&&n.onUpdate(n,n.state,n.context,e),n}Kt();function zn(t){if(!t)return;let e=t.__ref;if(!e)return;let n=Qt();if(n){Dt(null);try{return zn(t)}finally{Dt(n)}}e.__disposed=!0;try{typeof t.onBeforeRemove=="function"&&t.onBeforeRemove(t,t.state,t.context)}catch(o){console.error("[smbls] onBeforeRemove error:",o)}if(e.__bridge&&MA(t),e.__effects){for(let o=0;o<e.__effects.length;o++)e.__effects[o].dispose();e.__effects.length=0}if(typeof e.__releaseMedia=="function"&&(e.__releaseMedia(),e.__releaseMedia=null),e.__eventCleanup){for(let o=0;o<e.__eventCleanup.length;o++)e.__eventCleanup[o]();e.__eventCleanup.length=0}if(e.__children){let o=e.__children.slice();e.__children.length=0;for(let s=0;s<o.length;s++){let i=t[o[s]];i&&i.__ref&&zn(i)}}t.node?.parentNode?t.node.remove():t.tag==="fragment"&&e.__fragmentAnchor?.parentNode&&e.__fragmentAnchor.remove();let r=t.state?.$destroy||t.state?.destroy;if(typeof r=="function"&&t.state.__element===t&&r.call(t.state),t.parent?.__ref?.__children){let o=t.parent.__ref.__children.indexOf(t.key);o!==-1&&t.parent.__ref.__children.splice(o,1),delete t.parent[t.key]}try{typeof t.onRemove=="function"&&t.onRemove(t)}catch(o){console.error("[smbls] onRemove error:",o)}t.node=null,t.parent=null,t.__ref=null}function hi(){zn(this)}I();I();var eC=["ease","linear","ease-in","ease-out","ease-in-out","step-start","step-end"],BN=["none","forwards","backwards","both"],UN=["normal","reverse","alternate","alternate-reverse"],VN=["running","paused"],zN=/^(?:translate(?:3d|x|y|z)?\((?:\s*0[a-z%]*\s*,?)+\)|scale(?:3d|x|y|z)?\((?:\s*1(?:\.0+)?\s*,?)+\)|rotate(?:3d|x|y|z)?\((?:\s*0[a-z%]*\s*,?)+\)|skew(?:x|y)?\((?:\s*0[a-z%]*\s*,?)+\)|matrix\(\s*1\s*,\s*0\s*,\s*0\s*,\s*1\s*,\s*0\s*,\s*0\s*\))$/,HN=t=>{let e=String(t).trim().toLowerCase();if(e===""||e==="none"||e==="initial"||e==="unset")return!0;let n=e.match(/[a-z0-9]+\([^()]*\)/g);return!n||n.join("").replace(/\s+/g,"")!==e.replace(/\s+/g,"")?!1:n.every(r=>zN.test(r.replace(/\s+/g,"")))},QA=t=>/^(?:\s*0[a-z%]*)+\s*$/.test(String(t).toLowerCase())||/^(none|initial|unset)$/.test(String(t).trim().toLowerCase()),WN={transform:HN,translate:QA,rotate:t=>QA(t)||/^\s*(?:[xyz]\s+)?0(?:deg|rad|turn|grad)?\s*$/.test(String(t).toLowerCase()),scale:t=>/^(none|initial|unset)$/.test(String(t).trim().toLowerCase())||/^(?:\s*1(?:\.0+)?)+\s*$/.test(String(t)),opacity:t=>/^(initial|unset)$/.test(String(t).trim().toLowerCase())||Number(t)===1},qN=t=>{let e=String(t).trim().toLowerCase();if(e==="from")return 0;if(e==="to")return 100;let n=e.match(/^(\d+(?:\.\d+)?)%$/);return n?Number(n[1]):null},KN=t=>{if(!A(t))return null;let e=null,n=-1;for(let r in t){let o=qN(r);o==null||!A(t[r])||o>=n&&(n=o,e=t[r])}return e},GN=t=>{let e=KN(t);if(!e)return!1;let n=Object.keys(e);if(!n.length)return!1;for(let r of n){let o=WN[r];if(!o)return!1;let s=e[r];if(s==null||typeof s=="object"||typeof s=="function"||!o(s))return!1}return!0},YN=(t,e)=>{if(A(t))return t;let{animation:n}=e.context&&e.context.designSystem||{},r=n&&n[t];return A(r)?r:null},XN=["reverse","alternate","alternate-reverse"],nC=(t,e,n)=>{let r=n||e.animationDirection;return r&&XN.includes(String(r))?"both":GN(YN(t,e))?"backwards":"both"},ZN=0,JA=new Map,j_=(t,e)=>{let{animation:n}=e.context&&e.context.designSystem||{};if(A(t)){let o=JSON.stringify(t),s=JA.get(o);if(s)return s;let i=`smbls-anim-${ZN++}`,a=ni(i,t);return JA.set(o,a),a}let r=n&&n[t];return A(r)?ni(t,r):t},rC=/^[+-]?(?:\d+(?:\.\d*)?|\.\d+)m?s$/i,QN=/^(?:\d+(?:\.\d*)?|\.\d+)$/,JN=/^-?[A-Z][0-9]?$/,oC=/^(?:cubic-bezier|steps|linear)\(/,tF=/^(?:calc|min|max|clamp)\(/,eF=t=>t.includes("(")||t.startsWith("--"),nF=(t,e)=>{if(!JN.test(t))return!1;let n=e&&e.sequence;if(!A(n))return!1;let r=t.charCodeAt(0)===45?t.slice(1):t;return!!(n[r]||r.length===2&&n[r[0]])},rF=t=>{if(!v(t))return!1;let e=t.trim();return eC.includes(e)||oC.test(e)||e.startsWith("var(")},oF=(t,e)=>!!e&&rF(e[t]||e[fo(t)]),sF=["duration","timingFunction","delay","iterationCount","direction","fillMode","playState"],iF=t=>{let e=[],n=0,r="";for(let o of String(t).trim())o==="("?n++:o===")"&&n>0&&n--,n===0&&/\s/.test(o)?(r&&e.push(r),r=""):r+=o;return r&&e.push(r),e},aF=(t,e,n)=>{let r={duration:null,delay:null,timingFunction:null,iterationCount:null,direction:null,fillMode:null,playState:null},o=null,s=[],i=[],a=(f,u)=>{r[f]==null?r[f]=u:s.push(u)};for(let f of iF(t))e&&e[f]?o=f:rC.test(f)||nF(f,n)?r.duration==null?r.duration=f:r.delay==null&&(r.delay=f):eC.includes(f)||oF(f,n)?a("timingFunction",f):oC.test(f)?r.timingFunction==null&&(r.timingFunction=f):f==="infinite"?a("iterationCount",f):QN.test(f)?r.iterationCount==null&&(r.iterationCount=Number(f)):UN.includes(f)?a("direction",f):BN.includes(f)?a("fillMode",f):VN.includes(f)?a("playState",f):eF(f)?i.push(f):s.push(f);let c=o||s[0]||i.shift()||null,l=new Set;for(let f of i){let u=sF.find(d=>r[d]==null);if(!u)break;r[u]=f.startsWith("--")?`var(${f})`:f,l.add(u)}return{name:c,...r,opaqueSlots:l}},cF=(t,e)=>{let{animation:n}=e.context&&e.context.designSystem||{},{timing:r}=O()||{};return en(String(t)).map(o=>o.trim()).filter(Boolean).map(o=>aF(o,n,r))},tC=(t,e)=>rC.test(t)||e&&!tF.test(t)&&!/^(?:var|env)\(/.test(t)?t:de(t).timing||t,lF=(t,e)=>{let n=r=>t.opaqueSlots.has(r);return{animationName:t.name==null?void 0:j_(t.name,e),animationDuration:t.duration!=null?tC(t.duration,n("duration")):de(e.animationDuration||"A").timing,animationDelay:t.delay!=null?tC(t.delay,n("delay")):de(e.animationDelay||"0s").timing,animationTimingFunction:t.timingFunction!=null?n("timingFunction")?t.timingFunction:Ce(t.timingFunction):Ce(e.animationTimingFunction||"ease"),animationFillMode:t.fillMode||e.animationFillMode||nC(t.name,e,t.direction),animationIterationCount:t.iterationCount!=null?t.iterationCount:e.animationIterationCount||1,animationPlayState:t.playState||e.animationPlayState,animationDirection:t.direction||e.animationDirection}},fF={animationName:"none",animationPlayState:"running",animationDirection:"normal"},uF=(t,e)=>{let n=t.map(o=>lF(o,e));if(n.length===1)return n[0];let r={};for(let o in n[0]){let s=n.map(i=>i[o]);s.every(i=>i==null)||(r[o]=s.map(i=>i??fF[o]).join(", "))}return r},B_={animation:(t,e)=>{if(t!=null){if(v(t)&&/[\s,]/.test(t)){let n=cF(t,e);if(n.length)return uF(n,e)}return{animationName:j_(t,e),animationDuration:de(e.animationDuration||"A").timing,animationDelay:de(e.animationDelay||"0s").timing,animationTimingFunction:Ce(e.animationTimingFunction||"ease"),animationFillMode:e.animationFillMode||nC(t,e),animationIterationCount:e.animationIterationCount||1,animationPlayState:e.animationPlayState,animationDirection:e.animationDirection}}},animationName:(t,e)=>({animationName:j_(t,e)}),animationDuration:t=>({animationDuration:de(t).timing}),animationDelay:t=>({animationDelay:de(t).timing}),animationTimingFunction:t=>({animationTimingFunction:Ce(t)}),animationIterationCount:t=>({animationIterationCount:t}),animationFillMode:t=>({animationFillMode:t}),animationPlayState:t=>({animationPlayState:t}),animationDirection:t=>({animationDirection:t})};I();var Jd=(t,e,n)=>{if(typeof e=="number"&&(e=String(e)),!v(e))return;let[r,o]=ht(e);return{...N(t+"Start",r,n),...N(t+"End",o||r,n)}},U_={show:t=>t?void 0:{display:"none !important"},hide:t=>t?{display:"none !important"}:void 0,height:(t,e)=>N("height",t,e),width:(t,e)=>N("width",t,e),boxSizing:t=>Bt(t)?{boxSizing:"border-box"}:{boxSizing:t},boxSize:t=>{if(!v(t))return;let[e,n]=ht(t);return{...Et("height",e),...Et("width",n||e)}},inlineSize:(t,e)=>N("inlineSize",t,e),blockSize:(t,e)=>N("blockSize",t,e),minWidth:(t,e)=>N("minWidth",t,e),maxWidth:(t,e)=>N("maxWidth",t,e),widthRange:t=>{if(!v(t))return;let[e,n]=ht(t);return{...Et("minWidth",e),...Et("maxWidth",n||e)}},minHeight:(t,e)=>N("minHeight",t,e),maxHeight:(t,e)=>N("maxHeight",t,e),heightRange:t=>{if(!v(t))return;let[e,n]=ht(t);return{...Et("minHeight",e),...Et("maxHeight",n||e)}},size:t=>{if(!v(t))return;let[e,n]=ht(t);return{...N("inlineSize",e),...N("blockSize",n||e)}},minBlockSize:(t,e)=>N("minBlockSize",t,e),minInlineSize:(t,e)=>N("minInlineSize",t,e),maxBlockSize:(t,e)=>N("maxBlockSize",t,e),maxInlineSize:(t,e)=>N("maxInlineSize",t,e),minSize:t=>{if(!v(t))return;let[e,n]=ht(t);return{...Et("minInlineSize",e),...Et("minBlockSize",n||e)}},maxSize:t=>{if(!v(t))return;let[e,n]=ht(t);return{...Et("maxInlineSize",e),...Et("maxBlockSize",n||e)}},borderWidth:(t,e)=>N("borderWidth",t,e),borderTopWidth:(t,e)=>N("borderTopWidth",t,e),borderRightWidth:(t,e)=>N("borderRightWidth",t,e),borderBottomWidth:(t,e)=>N("borderBottomWidth",t,e),borderLeftWidth:(t,e)=>N("borderLeftWidth",t,e),textDecorationThickness:(t,e)=>N("textDecorationThickness",t,e),textUnderlineOffset:(t,e)=>N("textUnderlineOffset",t,e),padding:(t,e)=>N("padding",t,e),paddingInline:t=>{if(!v(t))return;let[e,n]=ht(t);return{...Et("paddingInlineStart",e),...Et("paddingInlineEnd",n||e)}},paddingBlock:t=>{if(!v(t))return;let[e,n]=ht(t);return{...Et("paddingBlockStart",e),...Et("paddingBlockEnd",n||e)}},paddingTop:(t,e)=>N("paddingBlockStart",t,e),paddingBottom:(t,e)=>N("paddingBlockEnd",t,e),paddingLeft:(t,e)=>N("paddingInlineStart",t,e),paddingRight:(t,e)=>N("paddingInlineEnd",t,e),paddingBlockStart:(t,e)=>N("paddingBlockStart",t,e),paddingBlockEnd:(t,e)=>N("paddingBlockEnd",t,e),paddingInlineStart:(t,e)=>N("paddingInlineStart",t,e),paddingInlineEnd:(t,e)=>N("paddingInlineEnd",t,e),margin:(t,e)=>N("margin",t,e),marginInline:t=>{if(!v(t))return;let[e,n]=ht(t);return{...Et("marginInlineStart",e),...Et("marginInlineEnd",n||e)}},marginBlock:t=>{if(!v(t))return;let[e,n]=ht(t);return{...Et("marginBlockStart",e),...Et("marginBlockEnd",n||e)}},marginTop:(t,e)=>N("marginBlockStart",t,e),marginBottom:(t,e)=>N("marginBlockEnd",t,e),marginLeft:(t,e)=>N("marginInlineStart",t,e),marginRight:(t,e)=>N("marginInlineEnd",t,e),marginInlineStart:(t,e)=>N("marginInlineStart",t,e),marginInlineEnd:(t,e)=>N("marginInlineEnd",t,e),marginBlockStart:(t,e)=>N("marginBlockStart",t,e),marginBlockEnd:(t,e)=>N("marginBlockEnd",t,e),scrollMargin:(t,e)=>N("scrollMargin",t,e),scrollMarginTop:(t,e)=>N("scrollMarginTop",t,e),scrollMarginRight:(t,e)=>N("scrollMarginRight",t,e),scrollMarginBottom:(t,e)=>N("scrollMarginBottom",t,e),scrollMarginLeft:(t,e)=>N("scrollMarginLeft",t,e),scrollMarginBlock:(t,e)=>Jd("scrollMarginBlock",t,e),scrollMarginInline:(t,e)=>Jd("scrollMarginInline",t,e),scrollMarginBlockStart:(t,e)=>N("scrollMarginBlockStart",t,e),scrollMarginBlockEnd:(t,e)=>N("scrollMarginBlockEnd",t,e),scrollMarginInlineStart:(t,e)=>N("scrollMarginInlineStart",t,e),scrollMarginInlineEnd:(t,e)=>N("scrollMarginInlineEnd",t,e),scrollPadding:(t,e)=>N("scrollPadding",t,e),scrollPaddingTop:(t,e)=>N("scrollPaddingTop",t,e),scrollPaddingRight:(t,e)=>N("scrollPaddingRight",t,e),scrollPaddingBottom:(t,e)=>N("scrollPaddingBottom",t,e),scrollPaddingLeft:(t,e)=>N("scrollPaddingLeft",t,e),scrollPaddingBlock:(t,e)=>Jd("scrollPaddingBlock",t,e),scrollPaddingInline:(t,e)=>Jd("scrollPaddingInline",t,e),scrollPaddingBlockStart:(t,e)=>N("scrollPaddingBlockStart",t,e),scrollPaddingBlockEnd:(t,e)=>N("scrollPaddingBlockEnd",t,e),scrollPaddingInlineStart:(t,e)=>N("scrollPaddingInlineStart",t,e),scrollPaddingInlineEnd:(t,e)=>N("scrollPaddingInlineEnd",t,e),gap:t=>({gap:Ld(t)}),columnGap:(t,e)=>Ue(e,"columnGap",t),rowGap:(t,e)=>Ue(e,"rowGap",t),flexWrap:t=>{if(t!=null)return{display:"flex",flexWrap:t}},flexFlow:(t,e)=>{let n=e.reverse;if(!v(t))return;let[r,o]=(t||"row").split(" ");return(t.startsWith("x")||t==="row")&&(r="row"),(t.startsWith("y")||t==="column")&&(r="column"),{display:"flex",flexFlow:(r||"")+(!r.includes("-reverse")&&n?"-reverse":"")+" "+(o||"")}},flexAlign:t=>{if(!v(t))return;let[e,n]=t.split(" ");return{display:"flex",alignItems:e,justifyContent:n}},round:(t,e)=>Mn(t??e.borderRadius,e,"round"),borderRadius:(t,e)=>Mn(t??e.round,e,"borderRadius"),borderTopLeftRadius:(t,e)=>Mn(t,e,"borderTopLeftRadius","borderTopLeftRadius"),borderTopRightRadius:(t,e)=>Mn(t,e,"borderTopRightRadius","borderTopRightRadius"),borderBottomLeftRadius:(t,e)=>Mn(t,e,"borderBottomLeftRadius","borderBottomLeftRadius"),borderBottomRightRadius:(t,e)=>Mn(t,e,"borderBottomRightRadius","borderBottomRightRadius")};var V_={fontSize:t=>el(t)||t,fontFamily:t=>({fontFamily:Jc(t)||t}),fontWeight:t=>({fontWeight:t,fontVariationSettings:'"wght" '+t}),lineClamp:t=>{if(t!=null)return t==="none"?{WebkitLineClamp:"none",lineClamp:"none"}:{display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:String(t),lineClamp:String(t),overflow:"hidden"}}};var z_={overflow:t=>({overflow:t}),cursor:(t,e,n,r)=>{if(!t)return;let o=r.assets&&r.assets[t];if(o&&o.content)t=`url(${o.content.src})`;else{let s=r.files&&r.files[t];s&&s.content&&(t=`url(${s.content.src})`)}return{cursor:t}},opacity:t=>t!=null?{opacity:String(t)}:void 0,visibility:t=>t!=null?{visibility:t}:void 0,pointerEvents:t=>t!=null?{pointerEvents:t}:void 0};var H_={inset:(t,e)=>{if(e.call("isNumber",t))return{inset:t};if(e.call("isString",t))return{inset:ht(t).map(n=>Ot(n,"k").k).join(" ")}},left:t=>Ot(t,"left"),top:t=>Ot(t,"top"),right:t=>Ot(t,"right"),bottom:t=>Ot(t,"bottom"),verticalInset:t=>{if(typeof t!="string")return;let e=ht(t).map(n=>Ot(n,"k").k);return{top:e[0],bottom:e[1]||e[0]}},horizontalInset:t=>{if(typeof t!="string")return;let e=ht(t).map(n=>Ot(n,"k").k);return{left:e[0],right:e[1]||e[0]}}};I();var tp=0,ep=()=>{tp++},np=()=>{tp>0&&tp--},Re=({context:t,state:e})=>{let n=t?.designSystem,r=e?.root?.globalTheme||n?.globalTheme;return r&&r!=="auto"?r:tp>0?null:n&&n.resolvedTheme||null},me=(t,e)=>{if(e==null||e==="")return;if(!A(e))return{[t]:e};let n={},r=!1;for(let o in e){let s=e[o];if(!(s==null||s==="")){if(A(s)){let i=me(t,s);i&&(n[o]=i,r=!0);continue}n[o]={[t]:s},r=!0}}return r?n:void 0},W_={theme:(t,e)=>{if(t)return e.themeModifier?Ve(t,`@${e.themeModifier}`):Ve(t)},color:(t,e)=>{let n=Re(e);if(t)return me("color",zt(t,n))},background:(t,e)=>{let n=Re(e);if(t)return v(t)&&t.includes("gradient")&&t.includes("(")?{background:ll(t,n)}:me("background",zt(t,n))},backgroundColor:(t,e)=>{let n=Re(e);if(t)return me("backgroundColor",zt(t,n))},backgroundImage:(t,e,n,r)=>{let o=Re(e);if(!t)return;let s=r.assets&&r.assets[t];if(s&&s.content)t=s.content.src;else{let i=r.files&&r.files[t];i&&i.content&&(t=i.content.src)}return me("backgroundImage",Pd(t,o))},textStroke:t=>{let e=Od(t);if(e!=null)return{WebkitTextStroke:e}},outline:t=>({outline:wn(t)}),outlineWidth:(t,e)=>N("outlineWidth",t,e),outlineColor:(t,e)=>{let n=Re(e);if(t)return me("outlineColor",zt(t,n))},outlineOffset:(t,e)=>N("outlineOffset",t,e),border:t=>({border:wn(t)}),borderColor:(t,e)=>{let n=Re(e);if(t)return me("borderColor",zt(t,n))},borderTopColor:(t,e)=>{let n=Re(e);if(t)return me("borderTopColor",zt(t,n))},borderBottomColor:(t,e)=>{let n=Re(e);if(t)return me("borderBottomColor",zt(t,n))},borderLeftColor:(t,e)=>{let n=Re(e);if(t)return me("borderLeftColor",zt(t,n))},borderRightColor:(t,e)=>{let n=Re(e);if(t)return me("borderRightColor",zt(t,n))},borderLeft:t=>({borderLeft:wn(t)}),borderTop:t=>({borderTop:wn(t)}),borderRight:t=>({borderRight:wn(t)}),borderBottom:t=>({borderBottom:wn(t)}),shadow:(t,e)=>{let n=Re(e);if(t)return me("boxShadow",Rd(t,n))},boxShadow:(t,e)=>{if(!v(t))return;let[n,r]=t.split("!importan"),o=Re(e),s=r?" !important":"",i=cl(n.trim(),o);return v(i)?{boxShadow:i+s}:me("boxShadow",i)},textShadow:(t,{context:e})=>me("textShadow",cl(t,e.designSystem.globalTheme)),columnRule:t=>({columnRule:wn(t)})};var bl={transition:t=>{let e=Id(t);if(e!=null)return{transition:e}},transitionDuration:t=>({transitionDuration:fl(t)}),transitionDelay:t=>({transitionDelay:fl(t)}),transitionTimingFunction:t=>({transitionTimingFunction:Ce(t)}),transitionProperty:t=>({transitionProperty:t,willChange:t})};I();var q_={flow:(t,e)=>{let n=e.reverse;if(!v(t))return;let[r,o]=(t||"row").split(" ");return(t.startsWith("x")||t==="row")&&(r="row"),(t.startsWith("y")||t==="column")&&(r="column"),{display:"flex",flexFlow:(r||"")+(!r.includes("-reverse")&&n?"-reverse":"")+" "+(o||"")}},wrap:(t,e)=>{if(t!=null)return{display:"flex",flexWrap:t}},align:(t,e)=>{if(!v(t))return;let[n,r]=t.split(" ");return{display:"flex",alignItems:n,justifyContent:r}}};I();var dF=/(^|[^\w.-])([A-Za-z_][\w-]*)/g,sC=t=>{if(!v(t))return t;let e=O().sizes;return e?t.replace(dF,(n,r,o)=>{let s=e[o];return s==null?n:r+String(s)}):t},Sn=t=>sC(Dd(t)),K_={gridTemplateColumns:t=>({gridTemplateColumns:Sn(t)}),gridTemplateRows:t=>({gridTemplateRows:Sn(t)}),gridAutoColumns:t=>({gridAutoColumns:Sn(t)}),gridAutoRows:t=>({gridAutoRows:Sn(t)}),area:t=>({gridArea:t}),template:t=>({gridTemplate:t}),templateAreas:t=>({gridTemplateAreas:t}),column:t=>({gridColumn:t}),columns:t=>({gridTemplateColumns:Sn(t)}),templateColumns:t=>({gridTemplateColumns:Sn(t)}),autoColumns:t=>({gridAutoColumns:Sn(t)}),columnStart:t=>({gridColumnStart:t}),row:t=>({gridRow:t}),rows:t=>({gridTemplateRows:Sn(t)}),templateRows:t=>({gridTemplateRows:Sn(t)}),autoRows:t=>({gridAutoRows:Sn(t)}),rowStart:t=>({gridRowStart:t}),autoFlow:t=>({gridAutoFlow:t})};var wt={...B_,...U_,...V_,...z_,...H_,...W_,...bl,...q_,...K_};var Rt=new Set(["accentColor","alignContent","alignItems","alignSelf","alignmentBaseline","all","animation","animationDelay","animationDirection","animationDuration","animationFillMode","animationIterationCount","animationName","animationPlayState","animationRange","animationRangeEnd","animationRangeStart","animationTimeline","animationTimingFunction","appearance","aspectRatio","backdropFilter","backfaceVisibility","background","backgroundAttachment","backgroundBlendMode","backgroundClip","backgroundColor","backgroundImage","backgroundOrigin","backgroundPosition","backgroundPositionX","backgroundPositionY","backgroundRepeat","backgroundRepeatX","backgroundRepeatY","backgroundSize","baselineShift","blockSize","border","borderBlock","borderBlockColor","borderBlockEnd","borderBlockEndColor","borderBlockEndStyle","borderBlockEndWidth","borderBlockStart","borderBlockStartColor","borderBlockStartStyle","borderBlockStartWidth","borderBlockStyle","borderBlockWidth","borderBottom","borderBottomColor","borderBottomLeftRadius","borderBottomRightRadius","borderBottomStyle","borderBottomWidth","borderCollapse","borderColor","borderImage","borderImageOutset","borderImageRepeat","borderImageSlice","borderImageSource","borderImageWidth","borderLeft","borderLeftColor","borderLeftStyle","borderLeftWidth","borderRadius","borderRight","borderRightColor","borderRightStyle","borderRightWidth","borderSpacing","borderStyle","borderTop","borderTopColor","borderTopLeftRadius","borderTopRightRadius","borderTopStyle","borderTopWidth","borderWidth","bottom","boxDecorationBreak","boxShadow","boxSizing","breakAfter","breakBefore","breakInside","captionSide","caretColor","clear","clip","clipPath","color","colorAdjust","colorInterpolation","colorInterpolationFilters","colorRendering","columnCount","columnFill","columnGap","columnRule","columnRuleColor","columnRuleStyle","columnRuleWidth","columnSpan","columnWidth","columns","contain","content","counterIncrement","counterReset","cursor","direction","display","emptyCells","fill","filter","flex","flexBasis","flexDirection","flexFlow","flexGrow","flexShrink","flexWrap","float","font","fontFamily","fontFeatureSettings","fontKerning","fontLanguageOverride","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontVariantAlternates","fontVariantCaps","fontVariantEastAsian","fontVariantNumeric","fontVariantPosition","fontWeight","fontVariationSettings","fontSynthesis","forcedColorAdjust","gap","grid","gridArea","gridAutoColumns","gridAutoFlow","gridAutoRows","gridColumn","gridColumnEnd","gridColumnGap","gridColumnStart","gridGap","gridRow","gridRowEnd","gridRowGap","gridRowStart","gridTemplate","gridTemplateAreas","gridTemplateColumns","gridTemplateRows","height","hyphens","imageOrientation","imageRendering","imeMode","inset","insetBlock","insetBlockEnd","insetBlockStart","insetInline","insetInlineEnd","insetInlineStart","initialLetter","interpolateSize","isolation","justifyContent","justifyItems","justifySelf","left","letterSpacing","lineBreak","lineClamp","lineHeight","listStyle","listStyleImage","listStylePosition","listStyleType","margin","marginBottom","marginLeft","marginRight","marginTop","marginBlock","marginBlockEnd","marginBlockStart","marginInline","marginInlineEnd","marginInlineStart","mask","maskBorder","maskBorderImage","maskBorderOutset","maskBorderRepeat","maskBorderSlice","maskBorderSource","maskBorderWidth","maskClip","maskComposite","maskImage","maskOrigin","maskPosition","maskRepeat","maskSize","maskType","maxBlockSize","maxHeight","maxInlineSize","maxWidth","minBlockSize","minHeight","minInlineSize","minWidth","mixBlendMode","objectFit","objectPosition","objectViewBox","offset","offsetDistance","offsetPath","offsetRotate","opacity","order","orientation","outline","outlineColor","outlineOffset","outlineStyle","outlineWidth","overflow","overflowAnchor","overflowClip","overflowScrolling","overflowWrap","overflowX","overflowY","overscrollBehavior","overscrollBehaviorX","overscrollBehaviorY","padding","paddingBottom","paddingLeft","paddingRight","paddingTop","pageBreakAfter","pageBreakBefore","pageBreakInside","paintOrder","perspective","perspectiveOrigin","placeContent","placeItems","placeSelf","pointerEvents","position","resize","right","rotate","rowGap","scrollBehavior","scrollMargin","scrollMarginBlock","scrollMarginBlockEnd","scrollMarginBlockStart","scrollMarginBottom","scrollMarginInline","scrollMarginInlineEnd","scrollMarginInlineStart","scrollMarginLeft","scrollMarginRight","scrollMarginTop","scrollPadding","scrollPaddingBlock","scrollPaddingBlockEnd","scrollPaddingBlockStart","scrollPaddingBottom","scrollPaddingInline","scrollPaddingInlineEnd","scrollPaddingInlineStart","scrollPaddingLeft","scrollPaddingRight","scrollPaddingTop","scrollSnapAlign","scrollSnapStop","scrollSnapType","scrollTimeline","scrollTimelineAxis","scrollTimelineName","scrollbarColor","scrollbarGutter","scrollbarWidth","shapeImageThreshold","shapeMargin","shapeOutside","stroke","tabSize","tableLayout","textAlign","textAlignLast","textDecoration","textDecorationColor","textDecorationLine","textDecorationSkipInk","textDecorationStyle","textDecorationThickness","textIndent","textOverflow","textShadow","textTransform","textUnderlineOffset","textWrap","textWrapMode","textWrapStyle","timelineScope","top","touchAction","transform","transformOrigin","transformStyle","transition","transitionDelay","transitionDuration","transitionProperty","transitionTimingFunction","translate","translateX","translateY","translateZ","unicodeBidi","userSelect","verticalAlign","viewTimeline","viewTimelineAxis","viewTimelineInset","viewTimelineName","visibility","whiteSpace","widows","width","willChange","wordBreak","wordSpacing","wordWrap","writingMode","zIndex"]);I();var pF=/^-?[A-Z][0-9]?$/,hF=/^[a-z][0-9]?$/,iC=/var\(\s*(--[A-Za-z0-9-]+)/g,G_=t=>{let e=new Set,n=new Set;if(!t||typeof t!="object")return{knownLetters:e,knownVars:n};for(let r in t){let o=t[r];if(!(!o||typeof o!="object")){if(o.sequence&&typeof o.sequence=="object")for(let s in o.sequence)e.add(s);if(o.vars&&typeof o.vars=="object")for(let s in o.vars)n.add(s)}}return{knownLetters:e,knownVars:n}},gF=(t,e)=>{if(!e.size)return[];let n=t.split(/[(),\s]+/).filter(Boolean),r=new Set;for(let o of n){if(!pF.test(o))continue;let s=o.charCodeAt(0)===45?o.slice(1):o;e.has(s)&&r.add(o)}return[...r]},mF=(t,e)=>{if(!e.size)return[];let n=[];iC.lastIndex=0;let r;for(;r=iC.exec(t);){let o=r[1];if(e.has(o))continue;let s=o.lastIndexOf("-");if(s===-1)continue;let i=o.slice(s+1);if(!hF.test(i))continue;let a=o.slice(0,s+1)+i.toUpperCase();a!==o&&e.has(a)&&n.push({varName:o,corrected:a})}return n},rp=new Set,aC=(t,e,n)=>{if(!Q()||!v(e)||!e)return;let r;try{r=O()}catch{return}let{knownLetters:o,knownVars:s}=G_(r);if(!o.size&&!s.size)return;let i=gF(e,o),a=mF(e,s);if(!i.length&&!a.length)return;let c=n?.__ref?.path?n.__ref.path.join("."):n?.key||"?";for(let l of i){let f=`${c}::${t}::bare::${l}::${e}`;rp.has(f)||(rp.add(f),console.warn(`[smbls/css-in-props] "${t}" on <${c}> looks like it contains an un-wrapped design-system token ("${l}") \u2014 "${t}" has no registered resolver, so its value is forwarded to the browser untouched. A bare letter token there is invalid CSS, so the browser drops the ENTIRE "${t}" declaration (not just this argument). Wrap it in var(--<family>-${l.replace("-","")}) (or calc(-1 * var(--<family>-${l.replace("-","")})) for a negative). Value: "${e}"`))}for(let{varName:l,corrected:f}of a){let u=`${c}::${t}::case::${l}::${e}`;rp.has(u)||(rp.add(u),console.warn(`[smbls/css-in-props] "${t}" on <${c}> references ${l}, which the active design system never emits. CSS custom-property names are case-sensitive \u2014 the real variable is ${f}, so this reference silently never resolves. Value: "${e}"`))}};I();var yF=/^\[data-theme=(?:"([^"]+)"|'([^']+)')\]$/,bF=(t,e,n)=>{let{context:r}=n;if(!r.designSystem?.media)return;let o=t.slice(1),s=r.designSystem.media[o],i=ye(e,n);if(!s)return{[t]:i};if(/^@(media|supports|container)\b/.test(s))return{[s]:i};if(s==="print")return{"@media print":i};if(s[0]==="(")return{[`@media screen and ${s}`]:i};let a=s.match(yF),c=a?a[1]||a[2]:o,l={[`${s} &`]:i};if(c==="dark"||c==="light"){let f=r.designSystem?.scopeSelector||":root",u=f===":root"?":root:not([data-theme])":`${f}:not([data-theme])`;l[`@media (prefers-color-scheme: ${c})`]={[`${u} &`]:i}}return l},cC=(t,e,n)=>({[t]:ye(e,n)}),_l=(t,e,n)=>{let r=`&${t}`,o=ye(e,n);if(t.includes(",")&&o){let s={},i={};for(let a in o)typeof o[a]=="object"&&o[a]!==null?i[a]=o[a]:s[a]=o[a];if(Object.keys(i).length){let a=r.split(",").map(l=>l.trim()),c={};Object.keys(s).length&&(c[r]=s);for(let l in i){let f=a.map(u=>`${u} ${l}`).join(", ");c[f]=i[l]}return c}}return{[r]:o}},Y_=(t,e)=>{let n=e.context?.cases?.[t];if(n!==void 0)return P(n)?n.call(e,e):!!n},_F=(t,e,n)=>{let r=t.slice(1),o=Y_(r,n);if(o===void 0&&(o=!!n[r]),!!o)return ye(e,n)},wF=(t,e,n)=>({[t]:e}),SF=(t,e,n)=>{let r=t.slice(1),o=n[r]===!0||n.state?.[r];if(!o)if(typeof n[r]=="function")try{o=n[r](n,n.state,n.context)}catch{}else{let s=Y_(r,n);s!==void 0&&(o=s)}if(o)return ye(e,n)},xF=(t,e,n)=>{let r=t.slice(1),o=n[r]===!0||n.state?.[r];if(!o)if(typeof n[r]=="function")try{o=n[r](n,n.state,n.context)}catch{}else{let s=Y_(r,n);s!==void 0&&(o=s)}if(!o)return ye(e,n)},X_=(t,e)=>ye(t,e),Z_={"@":bF,":":_l,"[":_l,"*":_l,"+":_l,"~":_l,"&":cC,">":cC,$:_F,"-":wF,".":SF,"!":xF};var op=cr(),lC=(t,e,n)=>{let r=e?.context?.designSystem;r&&J(r);try{let o={},s={},i=(a,c)=>{if(n.unpack){o={...o,...c};return}o[a]=c};for(let a in t){let c=t[a];if(c!==null)if(a==="class"&&v(c)){let l=fC(c,e);l&&(n.unpack?xt(o,l):o.designSystemClass=l)}else if(a==="true"){let l=pt(c,e);xt(o,X_(l,e))}else if(e.classlist?.[a]){let l=e.classlist[a],f=P(l)?l(e,e.state,e.context):l;f&&i(a,f),!op&&A(o[a])&&(o[a].label=a)}else if(wt[a]){let l=pt(c,e);if(l===null)continue;D(l)&&(l=l.reduce((u,d)=>xt(u,d),{}));let f=wt[a](l,e,e.state,e.context);D(f)&&(f=f.reduce((u,d)=>xt(u,d),{})),f&&i(a,f),!op&&A(o[a])&&(o[a].label=a)}else if(Rt.has(a)){let l=pt(c,e);if(l===null)continue;typeof l=="string"&&l.charCodeAt(0)===45&&l.charCodeAt(1)===45&&(l=`var(${l})`),op||aC(a,l,e),i(a,{[a]:l}),!op&&A(o[a])&&(o[a].label=a)}else s[a]=c}return[o,s]}finally{r&&X()}},fC=(t,e)=>{if(!v(t))return;let n=e?.context?.designSystem?.class;if(!n)return;let r;for(let o of t.split(" ")){if(!o)continue;let s=n[o];if(!A(s))continue;let i=ut(s);r=r?ee(r,i):i}if(r)return ye(r,e)},uC=(t,e)=>{let n={};for(let r in t){let o=Z_[r.slice(0,1)];if(o){let s=o(r,t[r],e);if(s)for(let i in s)Object.prototype.hasOwnProperty.call(s,i)&&(n[i]&&typeof n[i]=="object"&&typeof s[i]=="object"?ee(n[i],s[i]):n[i]=s[i])}}return n},ye=(t,e,n={unpack:!0})=>{let[r,o]=lC(t,e,n),s=uC(o,e),i=!1;for(let a in s){i=!0;break}if(i){if(n.unpack)return Aa(r,s);r._selectors=s}return r},kF=(t,e)=>{let n={};if(t.class)for(let r in t.class)n[r]=t.class[r](e);return n};I();var dC=t=>{if(A(t))return ye(t,t)},vF=(t,e)=>{let n=dC(t);return typeof e=="function"?e(n):Oe(n)};I();var EF=/^-?[A-Z][0-9]?$/,gC=/[(),\s]+/,pC=/\s*!important\s*$/,AF=t=>t.replace(/[A-Z]/g,e=>"-"+e.toLowerCase()),CF=()=>{let t;try{t=O()}catch{t=null}let e=t&&t.sizes&&typeof t.sizes=="object"?t.sizes:null,n=null,r=s=>{if(!e)return!1;let i=s.charCodeAt(0)===45?s.slice(1):s;return i?e[s]!==void 0||e[i]!==void 0||e[i.toLowerCase()]!==void 0:!1},o=s=>EF.test(s)?(n||(n=G_(t).knownLetters),n.has(s.charCodeAt(0)===45?s.slice(1):s)):!1;return{isToken:s=>o(s)||r(s)}},TF=(t,e)=>{let n=null,r=t.split(gC);for(let o=0;o<r.length;o++){let s=r[o];!s||s.charCodeAt(0)===35||e.isToken(s)&&(n||(n=[])).push(s)}return n},OF=(t,e)=>{let n=String(t).split(gC);for(let r=0;r<n.length;r++)if(n[r]===e)return!0;return!1},RF=(t,e)=>{let n=typeof globalThis<"u"?globalThis.CSS:void 0;if(!n||typeof n.supports!="function")return!1;try{return n.supports(AF(t),e)}catch{return!1}},hC=new Set,PF=(t,e,n)=>{if(!Q())return;let r=t?.__ref?.path?t.__ref.path.join("."):t?.key||"?",o=r+"::"+e+"::"+n;hC.has(o)||(hC.add(o),console.warn(`[smbls/css-in-props] style.${e} on <${r}> holds a design-system token the "${e}" transformer could not resolve to one inline value, so it is written as is and the browser drops it. Move the key out of \`style\` to the element itself, or write the resolved CSS. Value: "${n}"`))},LF=(t,e,n,r)=>{if(!v(e)||!e||t.charCodeAt(0)===45&&t.charCodeAt(1)===45)return null;let o=wt[t];if(!o||!Rt.has(t))return null;let s=pC.test(e),i=s?e.replace(pC,""):e,a=TF(i,r);if(!a||RF(t,i))return null;let c;try{c=o(i,n,n?.state,n?.context)}catch{c=null}if(Array.isArray(c)){let u={};for(let d of c)d&&typeof d=="object"&&Object.assign(u,d);c=u}let l=!!c&&typeof c=="object";if(l){let u=!1;for(let d in c){let p=c[d];if(p!=null){if(typeof p=="object"||typeof p=="function"){l=!1;break}for(let g of a)if(OF(p,g)){l=!1;break}if(!l)break;u=!0}}u||(l=!1)}if(!l)return PF(n,t,e),null;let f={};for(let u in c){let d=c[u];d!=null&&(f[u]=s?String(d)+" !important":d)}return f},mC=(t,e,n)=>{let r=null,o=0;for(let s in t){let i=t[s],a=null,c=null;if(s.charCodeAt(0)===38&&i&&typeof i=="object"&&!Array.isArray(i)){let l=mC(i,e,n);l!==i&&(c=l)}else a=LF(s,i,e,n);if((a||c)&&!r){r={};let l=0;for(let f in t){if(l++===o)break;r[f]=t[f]}}r&&(c?r[s]=c:a?Object.assign(r,a):r[s]=i),o++}return r||t},Q_=(t,e)=>!t||typeof t!="object"||Array.isArray(t)?t:mC(t,e,CF());I();I();function ew(t,e,n){let r=t?.context?.analyze;if(!r||!r.emit||e==="warn"&&!r.shouldCapture("warnings")||e==="error"&&!r.shouldCapture("errors"))return;let o=n.map(s=>s?.message||(typeof s=="string"?s:null)).filter(Boolean).join(" ");r.emit({id:`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,6)}`,ts:Date.now(),type:e==="error"?"error":"warning",level:e,hook:e==="error"?"el.error":"el.warn",element:{key:t.key!=null?String(t.key):null,name:t.__name||null,tag:t.tag||null},message:o||null,args:n})}var yC=new Set;function bC(t,e,n){let r=String(e);if(yC.has(r))return;yC.add(r);let o=t?.__ref?.path,s=Array.isArray(o)&&o.length?o.join("."):t?.key!=null?String(t.key):"(unknown element)",i=n!=null?`resolves to a non-function (${typeof n}) \u2014 it cannot be called`:"is not registered in context.methods, context.functions, or context.utils, and is not an element method",a=`[smbls] el.call('${r}') at <${s}>: "${r}" ${i}. Returning undefined (unchanged behavior) \u2014 check the name for typos or register the function on the project. Warned once per name; repeat misses are silent.`;ew(t,"error",[a]),console.error(a)}var wC=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),DF=new Set,SC=t=>wC(J_,t)&&!(ds||DF).has(t),_C=new Set;function xC(t,e){_C.has(t)||(_C.add(t),Q()&&console.warn(`[smbls] ${e}: context.methods.${t} is named like a built-in element method and is not the app's own override (it was not on the element prototype when it was built) \u2014 ignored; the built-in keeps winning. Declare an intentional override in the app's OWN methods.`))}function IF(...t){return ew(this,"warn",t),dc.apply(this,t)}function $F(...t){return ew(this,"error",t),ro.apply(this,t)}var J_={update:di,remove:hi,getDB:mc,getQuery:yc,getRootData:lc,getPath:sc,nextElement:pc,previousElement:hc,verbose:Es,warn:IF,error:$F,variables:gc,spotByPath:oc,set(t,e){let n=this.__ref;if(n){if(n.__setLocked){n.__setQueued={content:t,options:e};return}n.__setLocked=!0}try{if(this.removeContent(),t!=null){let r=this.context?.__create;r&&r(t,this,"content",e)}this.__ref&&(this.__ref.contentManaged=!0)}finally{if(n){n.__setLocked=!1;let r=n.__setQueued;r&&(n.__setQueued=null,this.set(r.content,r.options))}}},reset(t){let e=this.context?.__create;if(!e)return this;let n=this.parent,r=this.key,o=this.parse();return this.remove(),e(o,n,r,t)},lookup(t){let e=this.parent;for(;e;){if(typeof t=="function"){if(t(e))return e}else if(typeof t=="string"){if(e.key===t)return e;if(e[t]&&e[t].__ref)return e[t]}e=e.parent}return null},lookdown(t){let e=this.__ref;if(!e?.__children)return null;for(let n of e.__children){let r=this[n];if(!r)continue;if(typeof t=="function"){if(t(r))return r}else if(typeof t=="string"&&r.key===t)return r;let o=r.lookdown?.(t);if(o)return o}return null},lookdownAll(t,e=[]){let n=this.__ref;if(!n?.__children)return e;for(let r of n.__children){let o=this[r];o&&(typeof t=="function"?t(o)&&e.push(o):typeof t=="string"&&o.key===t&&e.push(o),o.lookdownAll?.(t,e))}return e},getRef(t){return t?this.__ref&&this.__ref[t]:this.__ref},getChildren(){let t=this.__ref&&this.__ref.__children;return Array.isArray(t)?t.map(e=>this[e]):[]},getRoot:cc,getRootState:ac,getRootContext:fc,getContext:uc,parse(t){let e={},n=t?new Set(t):null,r=this.__ref?.__exec;for(let o in this)if(!(o==="parent"||o==="node"||o==="__ref")&&!n?.has(o)){if(r&&r[o]!==void 0){e[o]=r[o];continue}typeof this[o]!="function"&&(e[o]=this[o])}return e},parseDeep(t){let e=this.parse(t),n=this.__ref;if(n?.__children)for(let r of n.__children)this[r]?.parseDeep&&(e[r]=this[r].parseDeep(t));return e},keys(){return Object.keys(this)},log(...t){if(t.length){let e={};for(let n of t)e[n]=this[n];console.log(e)}else console.log(this)},setProps(t,e){return this.update(t,e)},setNodeStyles(t){if(this.node?.style)for(let e in t){let n=t[e];if(n==null)continue;let r=e.replace(/[A-Z]/g,s=>"-"+s.toLowerCase()),o=String(n).replace(/\s*!important\s*$/,"");this.node.style.setProperty(r,o,"important")}},call(t,...e){let n=this.context,r=SC(t);r&&n?.methods?.[t]&&n.methods[t]!==this[t]&&xC(t,"el.call");let o=r?this[t]:n?.methods?.[t]||n?.functions?.[t]||n?.utils?.[t]||this[t];if(typeof o=="function"){let s=Zr;if(!s||!s(o))return o.call(this,...e);Q()&&bC(this,t,te(o));return}Q()&&bC(this,t,o)},removeContent(){let t=this.__ref;if(!t?.__children)return;let e=this.content;if(e?.remove){e.remove(),delete this.content;let n=t.__children.indexOf("content");n!==-1&&t.__children.splice(n,1)}e?.node?.parentNode&&e.node.parentNode.removeChild(e.node)}},tw=new WeakMap;function MF(t){if(!t)return J_;let e=tw.get(t);if(e)return e;e=Object.create(J_);let n=t.methods;if(n)for(let r in n)e[r]=n[r];return tw.set(t,e),e}function gi(t){let e=MF(t.context);Object.setPrototypeOf(t,e)}function mi(t){if(!t)return!1;let e=tw.get(t);if(!e)return!1;let n=t.methods;if(!n)return!1;for(let r in n){if(SC(r)&&!wC(e,r)){xC(r,"refreshContextProto");continue}e[r]=n[r]}return!0}var sp=[],ip=!1,Rr=0;function ap(){return typeof performance<"u"&&typeof performance.now=="function"?performance.now():Date.now()}function kC(t){let e=typeof globalThis<"u"?globalThis.scheduler:null;if(e&&typeof e.yield=="function"){e.yield().then(t,t);return}if(typeof MessageChannel=="function"){let n=new MessageChannel;n.port1.onmessage=()=>{n.port1.close(),t()},n.port2.postMessage(0);return}setTimeout(t,0)}function nw(){return Rr?ap()-Rr>=50:!1}var yi=0;function rw(){yi===0&&!Rr&&(Rr=ap()),yi++}function ow(){yi>0&&yi--,yi===0&&!ip&&(Rr=0)}function sw(t){sp.push(t),ip||(ip=!0,kC(vC))}function vC(){for(Rr=ap();sp.length;){let t=sp.shift();try{t()}catch(e){typeof console<"u"&&console.error&&console.error("[smbls] deferred mount chunk failed:",e?.message||e)}if(ap()-Rr>=50)break}if(sp.length){kC(vC);return}ip=!1,Rr=0,yi=0}I();I();fr();var fw={};F(fw,{STATE_METHODS:()=>EC,applyInitialState:()=>cp,applyStateMethods:()=>be,callStateMethod:()=>Sl,createState:()=>aw,isTracking:()=>lw,useHostState:()=>cw});Kt();Kt();var EC=new Set(["update","parse","clean","destroy","create","add","toggle","remove","set","replace","setByPath","setPathCollection","removeByPath","removePathCollection","getByPath","reset","apply","applyReplace","applyFunction","quietUpdate","quietReplace","rootUpdate","parentUpdate","keys","values","__element","__children","parent","root"]),wl=(t,e,n)=>{Object.defineProperty(t,e,{value:n,enumerable:!1,configurable:!0,writable:!0})},on=(t,e,n,{onlyIfAbsent:r}={})=>{wl(t,"$"+e,n),!(r&&Object.prototype.hasOwnProperty.call(t,e))&&wl(t,e,n)},Sl=(t,e,...n)=>{if(!t)return;let r=t["$"+e];if(typeof r=="function")return r.apply(t,n);let o=t[e];if(typeof o=="function")return o.apply(t,n)},be=(t,e)=>{if(_t(e)){let o=e.__raw||e;on(o,"toggle",function(s,i={}){e[s]=!e[s]},{onlyIfAbsent:!0}),on(o,"set",function(s,i={}){let a=e.__element;return typeof s=="object"&&s!==null&&a&&typeof a.onBeforeStateUpdate=="function"&&!i.preventBeforeStateUpdateListener&&a.onBeforeStateUpdate(a,e,a.context,{changes:s,options:i})===!1||(e.$clean({preventStateUpdate:!0}),typeof s=="object"&&s!==null&&e.$update(s,{...i,preventBeforeStateUpdateListener:!0})),e},{onlyIfAbsent:!0}),on(o,"setByPath",function(s,i,a={}){let c=s.split("."),l=e;for(let f=0;f<c.length-1;f++)l[c[f]]===void 0&&(l[c[f]]={}),l=l[c[f]];return l[c[c.length-1]]=i,e}),on(o,"getByPath",function(s){let i=s.split("."),a=e;for(let c=0;c<i.length;c++){if(a==null)return;a=a[i[c]]}return a}),on(o,"removeByPath",function(s,i={}){let a=s.split("."),c=e;for(let l=0;l<a.length-1;l++){if(c==null)return e;c=c[a[l]]}return c&&delete c[a[a.length-1]],e}),on(o,"reset",function(s={}){let i=e.$parse();return e.$set(i,s)}),on(o,"apply",function(s,i={}){if(typeof s=="function"){let a=s(e);return e.$update(a,i)}}),on(o,"applyFunction",function(s,i={}){if(typeof s=="function")return s(e),e.$update(e.$parse(),i)}),on(o,"rootUpdate",function(s,i={}){let a=e;for(;a?.parent&&_t(a.parent);)a=a.parent;return Sl(a,"update",s,i)}),on(o,"parentUpdate",function(s,i={}){if(e.parent)return Sl(e.parent,"update",s,i)}),on(o,"quietReplace",function(s,i={}){return e.$replace(s,{quiet:!0,...i})}),Object.getOwnPropertyDescriptor(o,"root")||Object.defineProperty(o,"root",{get:function(){let s=e,i=_t(s)?s:null;for(let a=0;a<64&&s?.parent&&s.parent!==s;a++)s=s.parent,_t(s)&&(i=s);return i||s},enumerable:!1,configurable:!0});return}if(!e||typeof e!="object")return;let n=()=>{for(let o in e)Object.prototype.hasOwnProperty.call(e,o)&&delete e[o]},r={update(o){if(!o||typeof o!="object")return e;for(let s in o)e[s]=o[s];return e},apply(o){if(typeof o!="function")return e;let s=o(e);return s?e.$update(s):e},parse(){return{...e}},toggle(o){return e[o]=!e[o],e},set(o){if(!o||typeof o!="object")return e;n();for(let s in o)e[s]=o[s];return e},replace(o){return e.$set(o)},clean(){return n(),e}};wl(e,"$settled",function(){return Ff().then(()=>e)});for(let o in r)if(wl(e,"$"+o,r[o]),typeof e[o]!="function"){if(Object.prototype.hasOwnProperty.call(e,o)){Bf(o,"");continue}wl(e,o,r[o])}};var aw=function(t,e,n){return t.state=cp(t,e,n),t.state},cp=function(t,e,n){let{__ref:r}=t,o=t.state;if(o==null||o===!1){let s=e?.state||{};return be(t,s),s}if(typeof o=="string")return r&&(r.__state=o),r.__stateType="string",NF(o,t,e);if(typeof o=="number"||typeof o=="boolean"){r&&(r.__state=o,r.__stateType=typeof o,r.__hasRootState=!0);let s=xn({value:o});return s.__element=t,e?.state&&(s.parent=e.state),be(t,s),s}if(typeof o=="function"&&(o=o(t,e?.state)||{}),typeof o=="object"&&!_t(o)){r&&(r.__hasRootState=!0),o.isRootState&&r&&(r.__hasRootState=!0);let s=xn({...o});if(s.__element=t,!Object.getOwnPropertyDescriptor(s,"root")){let i=e?.state?.root||e?.state||s;Object.defineProperty(s,"root",{get:()=>i,enumerable:!1,configurable:!0})}return e?.state&&(s.parent=e.state,e.state.__children&&(e.state.__children[t.key]=s)),be(t,s),typeof t.onStateCreated=="function"&&t.onStateCreated(t,s,t.context,n),s}return _t(o)?(o.__element=t,o):e?.state||{}};function iw(t,e){if(!e)return t;let n=e.split("/"),r=t;for(let o of n){if(r==null)return{};r=r[o]}return r??{}}function NF(t,e,n){if(!n?.state)return{};if(t===".")return n.state;if(t.startsWith("../")){let o=t.slice(3),s=n.state?.parent;return o&&s?iw(s,o):s??n.state??{}}if(t.startsWith("~/")){let o=n.state;for(;o?.parent;)o=o.parent;let s=t.slice(2);return s?iw(o,s):o??{}}let r=iw(n.state,t);if(r&&typeof r=="object"&&!_t(r)&&!Object.getOwnPropertyDescriptor(r,"root")){let o=n.state?.root||n.state;Object.defineProperty(r,"root",{get:()=>o,enumerable:!1,configurable:!0})}return r}Kt();var cw=(t,e)=>{if(!t)return CC;let n=jF(t,e);return!n||!n.state?CC:UF(n.state)},lw=()=>Qt()!=null,FF=128;function jF(t,e){let n=typeof e=="function"?e:typeof e=="string"?s=>!!s?.[e]:s=>!!s?.state,r=t,o=null;for(let s=0;s<FF&&r;s++){if(n(r)&&r.state)return r;if(r.state&&!o&&(o=r),!r.parent||r.parent===r)break;r=r.parent}return o}var BF={get(t,e){return t[e]}},AC=new WeakMap,UF=t=>{let e=AC.get(t);return e||(e=new Proxy(t,BF),AC.set(t,e)),e},CC=new Proxy(Object.create(null),{get(){},has(){return!1}});var lp="3.14.802";var TC="__SMBLS_ELEMENT_ID_ENGINE__",OC=(t,e,n)=>{let r=e||lp,o=n||(typeof globalThis<"u"?globalThis:null);if(!o)return t;let s=o[TC];return s&&s.engine&&s.version===r?s.engine:(s||(o[TC]={version:r,engine:t}),t)};if(!yt||!ze)throw new Error("@symbo.ls/element: the installed @symbo.ls/css does not export CSS_SHORTHAND_LONGHANDS / CSS_LONGHAND_SHORTHANDS (the CSS shorthand family table, packages/css/src/cssLonghands.js). This element needs the @symbo.ls/css published in the same release \u2014 update @symbo.ls/css.");var RC=yt,xl=ze,uw=ul||(()=>!1);var VF=new Set(["rows","cols","wrap","fill","stroke","offset"]),fp=(t,e)=>VF.has(e)&&He(t,e),Pr=(t,e)=>!!(wt[e]||Rt&&Rt.has(e))&&!fp(t,e);var n1=OC({uniqId:1,scopedStyleId:0},lp),vl=[],Ro=new Set,Ow=!1,r1=0,xi=null,Pl=null;function ki(){return typeof Date<"u"&&typeof Date.now=="function"?Date.now():0}function o1(){return typeof document<"u"&&document.visibilityState==="hidden"}var zF=250,HF=1e3;function WF(){return Pl&&(Pl!==(typeof requestAnimationFrame=="function"?requestAnimationFrame:null)||o1())?!0:ki()-r1>=HF}function qF(){if(Ow=!0,r1=ki(),Pl=null,typeof requestAnimationFrame!="function"){let t=typeof clearTimeout=="function"?clearTimeout:null,e=setTimeout(Al,0);xi=t?()=>t(e):null;return}if(o1()){let t=typeof clearTimeout=="function"?clearTimeout:null,e=setTimeout(Al,zF);xi=t?()=>t(e):null}else{let t=typeof cancelAnimationFrame=="function"?cancelAnimationFrame:null;Pl=requestAnimationFrame;let e=requestAnimationFrame(Al);xi=t?()=>t(e):null}}function hp(){if(Ow){if(!WF())return;let t=xi;if(xi=null,t)try{t()}catch{}}qF()}var s1=300,i1=15e4;function Al(){if(Ow=!1,xi=null,Pl=null,Ro.size&&Bj(),!vl.length)return;let t=vl.splice(0,vl.length);for(let e=0;e<t.length;e++){let n=t[e];if(n.node){if(!n.node.isConnected){let r=n.__ref||(n.__ref={});r.__mountAttempts=(r.__mountAttempts||0)+1,r.__mountFirstAttemptAt==null&&(r.__mountFirstAttemptAt=ki());let o=ki()-r.__mountFirstAttemptAt;r.__mountAttempts<=s1&&o<i1?(vl.push(n),hp()):console.warn("[DOMQL] onMounted dropped after",r.__mountAttempts,"attempts /",o,"ms \u2014 node never connected:",n.key||n.tag||n);continue}typeof n.onBridgeMount=="function"&&$A(n),typeof n.onMounted=="function"&&Wt("Mounted",n,n.__ref?.__mountOptions||{})}}}function _w(t,e){let n=t.__ref?.__autoGrow;n&&n.active&&Dl(t,!0),!(typeof t.onMounted!="function"&&typeof t.onBridgeMount!="function")&&(t.__ref.__mountOptions=e,vl.push(t),hp())}function PC(t,e){if(typeof t.onContentUpdate!="function")return;t.context?.plugins?.length&&Ct("contentUpdate",t,e);let n=t.context?.designSystem;n&&J(n);try{t.onContentUpdate(t,t.state,t.context,e)}catch(r){if(t.context?.plugins?.length&&Ct("error",t,{hook:"onContentUpdate",error:r})||console.error('[DOMQL] Lifecycle "onContentUpdate" error:',r),t.context?.strictMode)throw r}finally{n&&X()}}function Hn(t){return t.length>2&&t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)>=65&&t.charCodeAt(2)<=90}function KF(t){return t.charAt(2).toLowerCase()+t.slice(3)}function GF(t){return t.toLowerCase()}function ww(t){let e=t.charCodeAt(0);return e===58||e===64||e===38||e===91}function El(t,e){let n={...t};for(let r in e){let o=n[r],s=e[r];o&&s&&typeof o=="object"&&typeof s=="object"&&!Array.isArray(o)&&!Array.isArray(s)&&typeof o!="function"&&typeof s!="function"?n[r]=El(o,s):n[r]=s}return n}function up(t){if(typeof t=="string")return t||void 0;if(typeof t=="number"||typeof t=="bigint")return String(t)}function a1(t,e,n,r){return gp(r,up(t)||(e&&typeof e=="object"?up(e.key):void 0)||String(n))}function gp(t,e){if(!t||typeof e!="string")return e;let n=e;for(;YF(t,n);)n="$"+n;return n!==e&&XF(t,e,n),n}function YF(t,e){if(Nt.has(e)&&e!=="content")return!0;if(!(e in t))return!1;let n=t[e];return!(n&&typeof n=="object"&&n.__ref&&n.parent===t)}var LC=new Set;function XF(t,e,n){if(!Q())return;let r=t.__ref&&t.__ref.path&&t.__ref.path.join(".")||t.key||"<root>",o=r+"::"+e;LC.has(o)||(LC.add(o),console.warn(`[smbls] a child keyed "${e}" at ${r} names a property of its parent; it lives at el["${n}"] (data-key="${n}") so the parent keeps its own "${e}". Prefix the data keys to keep plain el.<key> access.`))}function re(t,e,n,r={},o){let s=Qt();if(s){Dt(null);try{return re(t,e,n,r,o)}finally{Dt(s)}}if(t==null||t===!1)return null;let i=hj(t);(typeof t=="string"||typeof t=="number")&&(t={text:t}),n=up(n);let a=up(t.key),c=Object.create(null);c.key=n||(a&&e?gp(e,a):a)||`_${n1.uniqId++}`,c.parent=e||null,c.context=t.context||e?.context||r.context||{},c.context.__create||(c.context.__create=re);let l=c.__ref={__if:!0,__children:[],__exec:{},__effects:[],__eventCleanup:[],root:e?.__ref?.root||c,path:e?.__ref?.path?[...e.__ref.path,c.key]:[c.key],origin:t};i&&(l.__runtimeSource=i);let f=t;if(t=c1(c,t,n,a,e,r),c.if!=null){let d;if(typeof c.if=="function")try{d=c.if(c,c.state,c.context)}catch(p){if(d=!1,l.__ifError=p,typeof console<"u"&&console.warn){let g=c.key||c.tag||"?";console.warn(`[smbls] \`if:\` evaluator threw on ${g} \u2014 treating as false:`,p?.message||p)}}else d=c.if;l.__if=!!d}if(l.__if)typeof c.if=="function"&&(l.__ifInitialized=!0);else{e&&(e[c.key]=c);let d=JF(t,n,c.context?.components);return d.length&&(l.__ifLateMerge={definition:f,key:n,ownKey:a,names:d,options:r}),typeof c.if=="function"&&h1(c,l,c.if),c}c.tag||(c.tag=Bn(c)),Wt("Init",c,r);let u=c.node=Kd(c)||Cr(c);if(!u)return c;if(c.tag==="fragment"){let p=(c.context?.document||globalThis.document).createComment("");u.appendChild(p),l.__fragmentAnchor=p}Wt("AttachNode",c,r),u.setAttribute&&c.key&&u.setAttribute("data-key",c.key),e&&(e[c.key]=c,e.__ref?.__children&&(e.__ref.__children.includes(c.key)||e.__ref.__children.push(c.key))),u.setAttribute&&c.context?.scopeSelector&&c.context.scopeSelector!==":root"&&c.context.key&&c.key===c.context.key&&u.setAttribute("data-smbls-app",c.context.key),c.id&&u.setAttribute&&(u.id=c.id),T1(c,r),p1(c),kw(c),v1(c),Ew(c),A1(c),Yj(c);try{O1(c,r)}catch(d){if(typeof console<"u"&&console.error){let p=c.__ref?.path?.join(".")||c.key||"<root>";console.error(`[smbls] createChildren failed at ${p}:`,d?.message||d,d?.stack?`
|
|
57
57
|
`+d.stack.split(`
|
|
58
58
|
`).slice(0,6).join(`
|
|
59
|
-
`):"")}}if(pp(c,!0),O1(c,e,o),typeof c.html=="function"&&c.node&&!c.node.innerHTML){let d=c.context?.designSystem;d&&J(d);try{let p=c.html(c,c.state,c.context);p!=null&&typeof p!="function"&&(c.node.innerHTML=p)}catch{}finally{d&&X()}}if(Wt("Create",c,r),Wt("Complete",c,r),Wt("Render",c,r),Wt("RenderRouter",c,r),bw(c,r),typeof c.onFrame=="function"){let d=c.onFrame,p=c.context?.designSystem,g=()=>{if(c.node){if(c.node.isConnected){p&&J(p);try{d(c,c.state,c.context)}catch(h){console.error("[DOMQL] onFrame error:",h)}finally{p&&X()}}requestAnimationFrame(g)}};requestAnimationFrame(g)}return c}function a1(t,e,n,r,o,s){if(n&&!e.extends&&!e.extend){let y=n.indexOf("_"),S=n.indexOf("."),b=y>0?y:-1;if(S>0&&(b<0||S<b)&&(b=S),b>0){let x=n.substring(0,b),_=t.context?.components;_&&(_[x]||_["smbls."+x])?e={...e,extends:x}:_&&Q()&&(/^[A-Z]\w*_\d+$/.test(n)||/^[A-Z]\w*\.\w+$/.test(n))&&console.warn(`[smbls] auto-extend: key "${n}" looks like an instance of "${x}" but neither "${x}" nor "smbls.${x}" is registered in context.components \u2014 element will render as a plain <div>. Register the base component or rename the key.`)}}t.__ref&&(t.__ref.__mergeLayer=null),fi(t,e,s);let i=L_(t),a=i?i.rank:0,c=new Set(["childProps","attr","style","scope","data","vars"]),l=t.props&&typeof t.props=="object"?t.props:null;for(let y in e){if(y==="parent"||y==="node"||y==="__ref"||y==="extends"||y==="context"||y==="props")continue;if(y==="key"){r&&(t.key=o?gp(o,r):r);continue}let S=e[y];i&&i.set(y,a);let b=t[y],x=b&&S&&typeof b=="object"&&typeof S=="object"&&!Array.isArray(b)&&!Array.isArray(S)&&typeof b!="function"&&typeof S!="function";x&&y.charCodeAt(0)>=65&&y.charCodeAt(0)<=90?t[y]=El(b,S):x&&c.has(y)?t[y]={...b,...S}:x&&_w(y)?t[y]=El(b,S):t[y]=S}function f(y){for(let S in y){let b=y[S],x=t[S],_=x&&b&&typeof x=="object"&&typeof b=="object"&&!Array.isArray(x)&&!Array.isArray(b)&&typeof x!="function"&&typeof b!="function";_&&S.charCodeAt(0)>=65&&S.charCodeAt(0)<=90?t[S]=El(x,b):_&&c.has(S)?t[S]={...x,...b}:_&&_w(S)?t[S]=El(x,b):t[S]=b}}if(l&&f(l),e.props&&typeof e.props=="object"&&(f(e.props),i))for(let y in e.props)i.set(y,a);e.classlist!==void 0&&(t.classlist=e.classlist),e.text!==void 0&&(t.text=e.text),e.html!==void 0&&(t.html=e.html);let u=t.scope&&typeof t.scope=="object"?t.scope:null,d=o?.scope,p=t.context&&typeof t.context.globalScope=="object"&&t.context.globalScope||null,g=d||p||null;if(e.scope!==void 0||u){let y={};u&&Object.assign(y,u),e.scope!==void 0&&Object.assign(y,e.scope),t.scope=jf(y,g)}else g&&(t.scope=g);e.if!==void 0&&(t.if=e.if);let h=t.__ref,m=hj(t,h&&h.__runtimeSource);return h&&(h.__declaredArrays=m||void 0),gi(t),JF(t,o,e,s),e}var XF=new Set(["key","parent","context","__ref"]);function ZF(t,e){for(let o of Object.keys(t))XF.has(o)||delete t[o];let n=Qt();n&&Dt(null);let r=e.definition;if(!r.extends&&!r.extend&&typeof e.key=="string"){let o=t.context?.components||{},s=o[e.key]||o["smbls."+e.key];s&&(r={...r,extends:s})}try{a1(t,r,e.key,e.ownKey,t.parent,e.options)}finally{n&&Dt(n)}}function QF(t,e,n){let r=n||{},o=a=>!!(r[a]||r["smbls."+a]),s=[],i=[];if(t.extends&&i.push(...Array.isArray(t.extends)?t.extends:[t.extends]),t.extend&&i.push(...Array.isArray(t.extend)?t.extend:[t.extend]),i.length){for(let a of i){if(typeof a!="string")continue;let c=a.includes(">")?a.split(">")[0].trim():a;o(c)||s.push(c)}return s}if(typeof e=="string"&&/^[A-Z]/.test(e)){let a=-1,c=e.indexOf("_"),l=e.indexOf(".");c>0&&(a=c),l>0&&(a<0||l<a)&&(a=l);let f=a>0?e.substring(0,a):e;o(f)||s.push(f)}return s}function dw(t,e,n){if(typeof t.onStateInit!="function"&&!t.context?.plugins?.length)return;let r=t.state;t.state=e;try{Wt("StateInit",t,n)}finally{t.state=r}}function JF(t,e,n,r){let o=!e,s=n.state&&typeof n.state=="object"&&!Array.isArray(n.state)&&Object.keys(n.state).length===0,i=o&&s&&t.context?.state,a=n.state!==void 0&&!i?n.state:t.state&&!_t(t.state)?t.state:void 0;if(a==null){if(e?.state)t.state=e.state,be(t,t.state);else if(t.context?.state){let c=t.context.state,l={...c},f=t.context?.polyglot;if(f?.translations){let u=t.context,d=c.lang||f.defaultLang||"en",p=new Set,g=(y,S)=>{p.has(y)||to(u,y,l)&&(l[y]=S,p.add(y),mn(u,y,S))},h=f.translations[d];if(h&&typeof h=="object")for(let y in h)g(y,h[y]);let m=new Set(f.languages||[]);for(let y in f.translations)m.has(y)||g(y,f.translations[y])}_t(l)||dw(t,l,r),t.state=_t(l)?l:xn(l),t.state.__element=t,t.state.root=t.state,be(t,t.state),vs?.(c,t.state),Wt("StateCreated",t,r)}else t.state={},Object.defineProperty(t.state,"root",{value:t.state,enumerable:!1,configurable:!0,writable:!0}),be(t,t.state);return}if(typeof a=="string"){if(t.state=c1(a,e),t.state&&typeof t.state=="object"&&!_t(t.state)){let c=e?.state?.root||e?.state||t.state;Object.defineProperty(t.state,"root",{value:c,enumerable:!1,configurable:!0,writable:!0})}be(t,t.state),ej(t,a,e),Wt("StateCreated",t,r);return}if(typeof a=="function"){let c=a(t,e?.state);if(_t(c))t.state=c;else{let l=c||{};dw(t,l,r),t.state=xn(l)}}else if(_t(a))t.state=a;else{let c={...a};dw(t,c,r),t.state=xn(c)}t.state.__element=t,e?.state?(t.state.parent=e.state,t.state.root=e.state.root||e.state):t.state.root=t.state,be(t,t.state),vs?.(a,t.state),Wt("StateCreated",t,r)}function pw(t,e){if(!e)return t;let n=e.split("/"),r=t;for(let o of n){if(r==null)return{};r=r[o]}return r??{}}function c1(t,e){if(!e)return{};if(t===".")return e.state||{};if(t.startsWith("../")){let o=t.slice(3);return o?pw(e.state,o):e.state??{}}if(t.startsWith("~/")){let o=e.state?.root||e.state,s=t.slice(2);return s?pw(o,s):o??{}}if(e.state?.[t]!==void 0)return e.state[t];let n=pw(e.state,t);if(n!=null&&Object.keys(n).length>0)return n;let r=e.context?.polyglot;if(r?.translations){let o=e.state?.root?.lang||r.defaultLang||"en",s=r.translations[o];if(s?.[t]!==void 0)return s[t];if(r.translations[t]!==void 0)return r.translations[t]}return{}}function tj(t,e){let n=e.state,r=t;if(t.startsWith("~/")?(n=e.state&&(e.state.root||e.state),r=t.slice(2)):t.startsWith("../")&&(r=t.slice(3)),!r||!n||typeof n!="object")return;let o=n[r];if(o!==void 0||r.indexOf("/")===-1)return o;let s=n;for(let i of r.split("/")){if(s==null||typeof s!="object")return;s=s[i]}return s}function ej(t,e,n){let r=t.__ref;if(!r||!n||e==="."||!_t(n.state))return;r.__stateBinding&&r.__stateBinding.dispose();let o=Qt();o&&Dt(null);try{let s=K(()=>{let i=tj(e,n);if(!i||typeof i!="object"||i===t.state)return;let a=Qt();Dt(null);try{l1(t,t.state,i,!0)}finally{Dt(a)}},{depth:r.path?r.path.length:0,label:ct(r,"state")});s._isStateBinding=!0,r.__stateBinding=s,r.__effects&&r.__effects.push(s)}finally{o&&Dt(o)}}function l1(t,e,n,r){let o=t.__ref;if(!o)return;if(r||t.state===e){t.state=n,r&&be(t,n),LC(o);let i=o.__children;if(i)for(let a=0;a<i.length;a++){let c=t[i[a]];c&&c.__ref&&c.parent===t&&l1(c,e,n,!1)}return}if(o.__stateBinding){o.__stateBinding._notify();return}let s=t.state;s&&typeof s=="object"&&s.parent===e&&(s.parent=n,LC(o))}function LC(t){let e=t.__effects;if(e)for(let n=0;n<e.length;n++){let r=e[n];r&&!r._disposed&&!r._isStateBinding&&!r._isSubscribeToEffect&&typeof r._notify=="function"&&r._notify()}}var nj=new Set(["s","state","ctx","context"]);function rj(t){try{let n=(typeof te=="function"?te(t):Function.prototype.toString.call(t)).match(/^[^(]*\(([^)]*)\)/);return n?n[1].split(",").map(r=>r.trim().split("=")[0].trim()).filter(Boolean):[]}catch{return[]}}function oj(t){let e;try{e=typeof te=="function"?te(t):Function.prototype.toString.call(t)}catch{return!0}if(typeof e!="string")return!0;let n=e.match(/^\s*(?:async\s+)?([A-Za-z_$][\w$]*)\s*=>/)||e.match(/^[^(]*\(([^)]*)\)/);if(!n)return!0;let r=e.slice(n.index+n[0].length);if(/\bstate\b|\barguments\b|\bcall\s*\(/.test(r))return!0;let s=n[1].split(",").map(a=>a.trim())[1];if(!s)return!1;if(!/^[A-Za-z_$][\w$]*$/.test(s.split("=")[0].trim()))return!0;let i=s.split("=")[0].trim();return new RegExp("(^|[^\\w$.])"+i.replace(/\$/g,"\\$")+"(?![\\w$])").test(r)}var sj=3,ij=/^(is|has)[A-Z0-9_$]/,aj=new Set(["routerOptions"]),DC=new WeakSet;function cj(t,e){if(typeof t!="function"||t.length!==2||e&&(ij.test(e)||aj.has(e))||DC.has(t))return!1;let n=rj(t);if(n.length<2)return!1;let r=n[1].replace(/[{}[\]]/g,"").trim();return r.length<sj||nj.has(r)?!1:(DC.add(t),!0)}function lj(t){let e=t.__ref,n=t.tag||"div",r=t.context?.designSystem,o=[],s=Object.keys(t);for(let i=0;i<s.length;i++){let a=s[i];if(typeof t[a]!="function"||Nt.has(a))continue;let c=a.charCodeAt(0);c>=65&&c<=90||Hn(a)||wt[a]||Rt&&Rt.has(a)||c!==45&&(He(n,a)||(Q()&&cj(t[a],a)&&console.warn(`[smbls] custom prop "${a}"${t.key?` on key "${t.key}"`:""} is a function \u2014 it will be auto-invoked on read and its RETURN VALUE stored, not preserved as a callable reference. If you meant to stash a callback, use el.call('${a}', \u2026) instead of reading el.${a}(\u2026) directly (see RULES.md Rule 8).`),o.push({prop:a,fn:t[a]})))}for(let i=0;i<o.length;i++){let{prop:a,fn:c}=o[i];e.__exec[a]=c,Object.defineProperty(t,a,{get(){r&&J(r);try{return c(t,t.state,t.context)}catch{return}finally{r&&X()}},set(l){delete e.__exec[a],Object.defineProperty(t,a,{value:l,writable:!0,configurable:!0,enumerable:!0})},configurable:!0,enumerable:!0})}}function fj(t,e){if(!(!Array.isArray(e)||e.length===0))for(let n=0;n<e.length;n++){let r=e[n];try{typeof r=="function"?r(t,t.state,t.context):typeof r=="string"&&t.state?.[r]}catch{}}}function $t(t,e,n){return!Array.isArray(e)||e.length===0?n:function(...r){return fj(t,e),n.apply(this,r)}}function bi(t,e){if(!(!t||Array.isArray(t)||typeof t!="object"))return t[e]}function ct(t,e){return()=>t.path.join(".")+"::"+e}var IC=new Set;function Ht(t,e,n){if(!Q())return;let r=ct(t,e)();IC.has(r)||(IC.add(r),console.warn(`[smbls] "${e}" effect threw on ${t.path.join(".")} \u2014 keeping previous value:`,n?.message||n))}var $C=/(['"`])((?:\\.|(?!\1)[^\\])*)\1/g,uj=(t,e)=>{let n;try{n=String(t)}catch{return}if(!n.includes("{{"))return;$C.lastIndex=0;let r;for(;(r=$C.exec(n))!==null;)r[2].includes("{{")&&e.add(r[2])},dj=(t,e)=>!Hn(t)&&!Rr(e,t),hw=(t,e,n,r,o)=>{if(typeof e=="string"){!o&&e.includes("{{")&&n.add(e);return}typeof e=="function"&&dj(t,r)&&uj(e,n)},ww=new WeakMap,Ll=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),Cl=t=>{if(typeof t=="string"||typeof t=="number")return{text:t};if(!t||typeof t!="object"||Array.isArray(t))return null;let e=t.props;return e&&typeof e=="object"&&!Array.isArray(e)?Lo(t,e):t},Tl=(t,e)=>t&&e?Lo(t,e):t||e||null,f1=(t,e)=>{let n=t.__ref&&t.__ref.__runtimeSource;return!!n&&Ll(n,e)},_i=(t,e)=>f1(t,e)?Cl(t.__ref.__runtimeSource[e]):null,Ol=(t,e)=>(e&&t&&typeof t=="object"&&ww.set(t,e),t),pj=t=>{if(!t||typeof t!="object")return;let e=ww.get(t);return e&&ww.delete(t),e},Sw=(t,e,n)=>{if(typeof t=="string"){t.includes("{{")&&e.add(t);return}if(!(!t||typeof t!="object"||n.has(t))){if(n.add(t),Array.isArray(t)){for(let r=0;r<t.length;r++)Sw(t[r],e,n);return}if(!t.__ref)for(let r of Object.keys(t)){if(r==="state")continue;let o=Object.getOwnPropertyDescriptor(t,r);o&&"value"in o&&Sw(o.value,e,n)}}},hj=(t,e)=>{let n=null;for(let r of Object.keys(t)){if(Nt.has(r)||e&&Ll(e,r))continue;let o=Object.getOwnPropertyDescriptor(t,r),s=o&&o.value;if(!Array.isArray(s))continue;let i=new Set;Sw(s,i,new Set),i.size&&(n||(n=new Map),n.set(s,i))}return n},MC=(t,e)=>{if(Array.isArray(e))for(let n=t;n;n=n.parent){let r=n.__ref&&n.__ref.__declaredArrays,o=r&&r.get(e);if(!o)continue;let s=t.__ref;s.__authoredTemplates||(s.__authoredTemplates=new Set);for(let i of o)s.__authoredTemplates.add(i);return}},u1=["attr","aria","data","metadata"],gj=t=>{if(u1.includes(t))return!0;let e=t.charCodeAt(0);return e===46||e===33||e===64},mj=(t,e)=>{let n=new Set,r=t.tag||"div";for(let o of Object.keys(t)){let s=Object.getOwnPropertyDescriptor(t,o),i=s&&s.value,a=!!e&&Ll(e,o);if(i&&typeof i=="object"&&!Array.isArray(i)){if(!gj(o))continue;let c=a?e[o]:null,l=c&&typeof c=="object"?c:null,f=o.charCodeAt(0)===46||o.charCodeAt(0)===33;for(let u in i){let d=a&&(!l||Ll(l,u)),p=i[u];if(f&&p&&typeof p=="object"&&!Array.isArray(p)&&u1.includes(u)){for(let g in p)hw(g,p[g],n,r,d);continue}hw(u,p,n,r,d)}continue}hw(o,i,n,r,a)}return n};function d1(t,e){let n=t.__ref,r=!!(e&&e.skipIfEffect),o=mj(t,n.__runtimeSource);if(n.__authoredTemplates)for(let c of o)n.__authoredTemplates.add(c);else n.__authoredTemplates=o;if(lj(t),typeof t.text=="function"){let c=t.text,l=$t(t,t.textDeps,c),f=K(()=>{if(!n.contentManaged)try{let u=l(t,t.state,t.context);t.node&&u!=null&&typeof u!="function"&&typeof u!="object"&&(typeof u=="string"&&u.includes("{{")&&(u=Vt.call(t,u,t.state)),pi(t,u))}catch(u){Ht(n,"text",u)}},{depth:n.path.length,label:ct(n,"text")});n.__effects.push(f),n.__exec.text=c}else if(typeof t.text=="string"&&t.text.includes("{{")){let c=t.text,l=K(()=>{if(n.contentManaged)return;let f=Vt.call(t,c,t.state);f!=null&&(t.text=f),t.node&&pi(t,f??"")},{depth:n.path.length,label:ct(n,"text")});n.__effects.push(l),n.__exec.text=c}let s=t.tag||"div";for(let c of Object.keys(t))if(typeof t[c]=="function"&&!Nt.has(c)&&!Hn(c)&&!n.__exec[c]&&!fp(s,c)){if(wt[c]){let l=t[c],f=$t(t,t[c+"Deps"],l),u=c,d,p=null,g=null,h,m=K(()=>{let y=t.context?.designSystem;y&&J(y);try{let S=f(t,t.state,t.context);ep();let b;try{b=wt[u](S,t,t.state,t.context)}finally{np()}if(Array.isArray(b)){let _={};for(let w of b)if(w)for(let k in w)_[k]=w[k];b=_}let x=u==="show"||u==="hide";if(b&&t.node&&yj(b)){let _=Rl(b);if(_===null||_!==h){h=_;let w=Oe(b,null,t.context?.cssPrefix),k=w?w.split(" ").filter(Boolean):null;if(t.node.classList){if(g)for(let A of g)t.node.classList.remove(A);if(k&&k.length)for(let A of k)t.node.classList.add(A);g=k}}d=void 0,p=null}else if(b&&t.node){if(g){for(let w of g)t.node.classList.remove(w);g=null,h=void 0}let _=Rl(b);if(_===null||_!==d||!Si(t.node,p)){d=_;let w=jC(t,b);p=wi(t.node,w)}}else t.node&&x&&(d=void 0,p=null,t.node.style.display="")}finally{y&&X()}},{depth:n.path.length,label:ct(n,u)});n.__effects.push(m),n.__exec[c]=l}else if(Rt&&Rt.has(c)){let l=t[c],f=$t(t,t[c+"Deps"],l),u=c,d,p=null,g=K(()=>{let h=t.context?.designSystem;h&&J(h);try{let m=f(t,t.state,t.context);if(t.node)if(m!=null){let y=u+":"+String(m);if(y!==d||!Si(t.node,p)){d=y;let S={[u]:m},b=jC(t,S);p=wi(t.node,b)}}else d=void 0,p=null,t.node.style[u]=""}finally{h&&X()}},{depth:n.path.length,label:ct(n,u)});n.__effects.push(g),n.__exec[c]=l}else if(c.charCodeAt(0)===45){let l=t[c];m1(t,c,l,t[c+"Deps"],c),n.__exec[c]=l}}if(bj(t),typeof t.html=="function"){let c=t.html,l=$t(t,t.htmlDeps,c),f=K(()=>{let u=t.context?.designSystem;u&&J(u);try{let d=l(t,t.state,t.context);t.node&&d!=null&&typeof d!="function"&&(t.node.innerHTML=d)}finally{u&&X()}},{depth:n.path.length,label:ct(n,"html")});n.__effects.push(f),n.__exec.html=c}if(typeof t.value=="function"){let c=t.value,l=$t(t,t.valueDeps,c),f=K(()=>{try{let u=l(t,t.state,t.context);typeof u=="string"&&u.includes("{{")&&(u=Vt.call(t,u,t.state)),FC(t,u)}catch(u){Ht(n,"value",u)}},{depth:n.path.length,label:ct(n,"value")});n.__effects.push(f),n.__exec.value=c}else if(typeof t.value=="string"&&t.value.includes("{{")){let c=t.value,l=K(()=>{try{FC(t,Vt.call(t,c,t.state))}catch(f){Ht(n,"value",f)}},{depth:n.path.length,label:ct(n,"value")});n.__effects.push(l),n.__exec.value=c}if(typeof t.style=="function"){let c=t.style,l=$t(t,t.styleDeps,c),f,u=null,d=K(()=>{let p=yl(t,l(t,t.state,t.context)),g=Rl(p);(g===null||g!==f||!Si(t.node,u))&&(f=g,dp(t.node,u,p),qn(t.node,p),u=wi(t.node,p))},{depth:n.path.length,label:ct(n,"style")});n.__effects.push(d),n.__exec.style=c}else if(t.style&&typeof t.style=="object")for(let c in t.style){let l=t.style[c];if(typeof l!="function")continue;let f=$t(t,bi(t.styleDeps,c),l),u,d=null,p=K(()=>{try{let g=f(t,t.state,t.context);if(t.node){let h=c+":"+String(g);if(h!==u||!Si(t.node,d)){u=h;let m=yl(t,{[c]:g});dp(t.node,d,Object.assign({},m,{[c]:""})),qn(t.node,m),d=wi(t.node,m)}}}catch(g){Ht(n,"style."+c,g)}},{depth:n.path.length,label:ct(n,"style."+c)});n.__effects.push(p)}if(t.attr&&typeof t.attr=="object"){for(let c in t.attr)if(typeof t.attr[c]=="function"){let l=$t(t,bi(t.attrDeps,c),t.attr[c]),f=c,u=K(()=>{try{let d=l(t,t.state,t.context);if(typeof d=="string"&&d.includes("{{")&&(d=Vt.call(t,d,t.state)),t.node?.setAttribute){let p=Co(t.node,f);d==null||d===!1&&!rn(f)?t.node.removeAttribute(f):typeof d!="function"&&typeof d!="object"&&t.node.setAttribute(f,ne(f,d)),To(t.node,p)}}catch(d){Ht(n,"attr."+f,d)}},{depth:n.path.length,label:ct(n,"attr."+f)});u._attrName=f.toLowerCase(),n.__effects.push(u)}else if(typeof t.attr[c]=="string"&&t.attr[c].includes("{{")){let l=t.attr[c],f=c,u=K(()=>{try{let d=Vt.call(t,l,t.state);if(!t.node||!t.node.setAttribute)return;t.node.setAttribute(f,ne(f,d??""))}catch(d){Ht(n,"attr."+f,d)}},{depth:n.path.length,label:ct(n,"attr."+f)});u._attrName=f.toLowerCase(),n.__effects.push(u)}}if(t.aria&&typeof t.aria=="object")for(let c in t.aria){let l=t.aria[c];if(typeof l=="string"&&l.includes("{{")){let p=l,g="aria-"+c.replace(/[A-Z]/g,m=>"-"+m.toLowerCase()),h=K(()=>{try{let m=Vt.call(t,p,t.state);if(!t.node||!t.node.setAttribute)return;t.node.setAttribute(g,ne(g,m??""))}catch(m){Ht(n,"aria."+c,m)}},{depth:n.path.length,label:ct(n,"aria."+c)});h._attrName=g,n.__effects.push(h);continue}if(typeof l!="function")continue;let f=$t(t,bi(t.ariaDeps,c),t.aria[c]),u="aria-"+c.replace(/[A-Z]/g,p=>"-"+p.toLowerCase()),d=K(()=>{try{let p=f(t,t.state,t.context);if(!t.node?.setAttribute)return;p==null?t.node.removeAttribute(u):typeof p!="function"&&typeof p!="object"&&t.node.setAttribute(u,ne(u,p))}catch(p){Ht(n,"aria."+c,p)}},{depth:n.path.length,label:ct(n,"aria."+c)});d._attrName=u,n.__effects.push(d)}if(t.data&&typeof t.data=="object")for(let c in t.data){let l=t.data[c];if(typeof l=="string"&&l.includes("{{")){let g=l,h="data-"+c.replace(/[A-Z]/g,y=>"-"+y.toLowerCase()),m=K(()=>{try{let y=Vt.call(t,g,t.state);if(!t.node||!t.node.setAttribute)return;t.node.setAttribute(h,y??"")}catch(y){Ht(n,"data."+c,y)}},{depth:n.path.length,label:ct(n,"data."+c)});m._attrName=h,n.__effects.push(m);continue}if(typeof l!="function")continue;let f=$t(t,bi(t.dataDeps,c),t.data[c]),d="data-"+c.replace(/[A-Z]/g,g=>"-"+g.toLowerCase()),p=K(()=>{try{let g=f(t,t.state,t.context);if(!t.node?.setAttribute)return;g==null||g===!1?t.node.removeAttribute(d):typeof g!="function"&&typeof g!="object"&&t.node.setAttribute(d,g===!0?"":g)}catch(g){Ht(n,"data."+c,g)}},{depth:n.path.length,label:ct(n,"data."+c)});p._attrName=d,n.__effects.push(p)}let i=t.classlist&&typeof t.classlist=="object"&&!Array.isArray(t.classlist)?t.classlist:t.class&&typeof t.class=="object"&&!Array.isArray(t.class)?t.class:null;if(i)for(let c in i){if(typeof i[c]!="function")continue;let l=$t(t,bi(t.classDeps,c),i[c]),f=K(()=>{try{let u=l(t,t.state,t.context);if(!t.node?.classList)return;typeof u=="string"?t.node.classList.add(u):u?t.node.classList.add(c):t.node.classList.remove(c)}catch(u){Ht(n,"class."+c,u)}},{depth:n.path.length,label:ct(n,"class."+c)});n.__effects.push(f)}!r&&typeof t.if=="function"&&p1(t,n,t.if);for(let c of Object.keys(t)){if(Nt.has(c)||typeof t[c]!="function")continue;let l=c.charCodeAt(0);if(l>=65&&l<=90||Hn(c))continue;let f=t[c];n.__exec[c]=f;let u=t.tag||"div";if(He(u,c)&&!Rr(u,c)){let d=Un(c)||c,p=$t(t,t[c+"Deps"],f),g=K(()=>{try{let h=p(t,t.state,t.context);if(typeof h=="string"&&h.includes("{{")&&(h=Vt.call(t,h,t.state)),t.node?.setAttribute){let m=Co(t.node,d);h==null||h===!1&&!rn(d)?t.node.removeAttribute(d):typeof h!="function"&&typeof h!="object"&&(d==="src"&&"src"in t.node?t.node.src=h:t.node.setAttribute(d,ne(d,h))),To(t.node,m)}}catch(h){Ht(n,c,h)}},{depth:n.path.length,label:ct(n,c)});g._attrName=d.toLowerCase(),n.__effects.push(g)}}let a=t.tag||"div";for(let c of Object.keys(t)){if(Nt.has(c))continue;let l=t[c];if(typeof l!="string"||!l.includes("{{"))continue;let f=c.charCodeAt(0);if(f>=65&&f<=90||Hn(c)||Rr(a,c)||Ao[c]||!He(a,c))continue;let u=Un(c)||c,d=K(()=>{try{let p=Vt.call(t,l,t.state);if(!t.node||!t.node.setAttribute)return;t.node.setAttribute(u,ne(u,p??""))}catch(p){Ht(n,c,p)}},{depth:n.path.length,label:ct(n,c)});d._attrName=u.toLowerCase(),n.__effects.push(d)}if(Ej(t),Ij(t),typeof t.onStateUpdate=="function"&&Array.isArray(t.stateDeps)){let c=t.onStateUpdate,l=t.stateDeps,f=!1,u=[],d=K(()=>{let p=[];for(let y=0;y<l.length;y++){let S=l[y];try{p[y]=typeof S=="function"?S(t,t.state,t.context):t.state?.[S]}catch{p[y]=void 0}}if(!f){f=!0,u=p;return}let g=p.length!==u.length;for(let y=0;!g&&y<p.length;y++)p[y]!==u[y]&&(g=!0);let h=u;if(u=p,!g)return;let m=t.context?.designSystem;m&&J(m);try{c(t,t.state,t.context,{prev:h,next:p})}catch(y){if(t.context?.plugins?.length&&Ct("error",t,{hook:"onStateUpdate",error:y})||console.error('[DOMQL] Lifecycle "onStateUpdate" error:',y),t.context?.strictMode)throw y}finally{m&&X()}},{depth:n.path.length,label:ct(n,"onStateUpdate")});n.__effects.push(d)}Oj(t)}function NC(t){let e=t.parent,n=e?.node;if(!n||!t.node){O1(t,t.parent);return}let r=null,o=Object.keys(e),s=o.indexOf(t.key);for(let i=s+1;i<o.length;i++){let a=e[o[i]];if(a?.node?.parentNode===n){r=a.node;break}}r?n.insertBefore(t.node,r):n.appendChild(t.node)}function p1(t,e,n){let r=$t(t,t.ifDeps,n),o=K(()=>{let s=!e.__ifInitialized&&e.__ifLateMerge;if(s){let c=t.context?.components||{};s.names.some(l=>c[l]||c["smbls."+l])&&(e.__ifLateMerge=null,ZF(t,s),r=$t(t,t.ifDeps,typeof t.if=="function"?t.if:n))}let i;try{i=r(t,t.state,t.context)}catch(c){if(i=!1,e.__ifError=c,typeof console<"u"&&console.warn){let l=t.key||t.tag||"?";console.warn(`[smbls] \`if:\` reactive effect threw on ${l} \u2014 treating as false:`,c?.message||c)}return}let a=e.__if;if(e.__if=!!i,a&&!e.__if&&t.node){t.node.remove();try{typeof t.onRemove=="function"&&t.onRemove(t)}catch(c){console.error("[smbls] onRemove error:",c)}}else if(!a&&e.__if)if(e.__ifInitialized)t.node||(t.node=Ar(t)),t.node&&(t.node.ref=t),NC(t),xw(t),vw(t),Wt("Render",t,{}),bw(t,{});else{if(e.__ifInitialized=!0,e.__ifLateMerge=null,t.tag||(t.tag=Bn(t)),Wt("Init",t,{}),t.node||(t.node=Ar(t)),!t.node)return;if(t.parent?.__ref?.__children&&!t.parent.__ref.__children.includes(t.key)&&t.parent.__ref.__children.push(t.key),t.tag==="fragment"&&!e.__fragmentAnchor){let l=(t.context?.document||globalThis.document).createComment("");t.node.appendChild(l),e.__fragmentAnchor=l}Wt("AttachNode",t,{}),t.node.setAttribute&&t.key&&t.node.setAttribute("data-key",t.key),t.id&&t.node.setAttribute&&(t.node.id=t.id),C1(t,{}),d1(t,{skipIfEffect:!0}),xw(t),k1(t),vw(t),E1(t),T1(t,{}),NC(t),Wt("Create",t,{}),Wt("Complete",t,{}),Wt("Render",t,{}),Wt("RenderRouter",t,{}),bw(t,{})}},{depth:e.path.length,label:ct(e,"if")});e.__effects.push(o)}function pi(t,e){let n=t.node;if(!n)return;let r=e==null||typeof e=="object"?"":String(e);if(t.tag==="string"){n.nodeValue!==r&&(n.nodeValue=r);return}let o=t.__ref,s=o?o.__textNode:null;if(s&&s.parentNode!==n&&(s=null),!s){let i=n.firstChild;i&&i.nodeType===3&&(s=i)}s?s.nodeValue!==r&&(s.nodeValue=r):n.firstChild?(s=(n.ownerDocument||t.context?.document||globalThis.document).createTextNode(r),n.insertBefore(s,n.firstChild)):(n.textContent=r,s=n.firstChild&&n.firstChild.nodeType===3?n.firstChild:null),o&&(o.__textNode=s||null)}function Co(t,e){return e!=="checked"||!t||t.tagName!=="INPUT"?null:t.hasAttribute("checked")}function To(t,e){if(e===null)return;let n=t.hasAttribute("checked");n!==e&&t.checked!==n&&(t.checked=n)}function FC(t,e){let n=t.node;if(!n||!("value"in n))return;let r=e==null?"":String(e);if(n.value===r)return;let o=typeof document<"u"&&document.activeElement===n,s=o&&typeof n.selectionStart=="number"?n.selectionStart:null,i=o&&typeof n.selectionEnd=="number"?n.selectionEnd:null;if(n.value=r,o&&s!=null&&i!=null)try{n.setSelectionRange(s,i)}catch{}let a=t.__ref&&t.__ref.__autoGrow;a&&a.active&&a.resize()}function xw(t){let{node:e}=t;if(e){if((typeof t.text=="string"&&!t.text.includes("{{")||typeof t.text=="number")&&pi(t,t.text),x1(t),typeof t.html=="string"&&(e.innerHTML=t.html),t.value!=null&&typeof t.value!="function"&&!(typeof t.value=="string"&&t.value.includes("{{"))&&"value"in e){let n=String(t.value);e.value!==n&&(e.value=n)}if(t.style&&typeof t.style=="object"){let n=t.style;for(let r in t.style)if(typeof t.style[r]=="function"){n={};for(let o in t.style)typeof t.style[o]!="function"&&(n[o]=t.style[o]);break}qn(e,yl(t,n))}if(t.attr&&typeof t.attr=="object")for(let n in t.attr){let r=t.attr[n];typeof r=="function"||typeof r=="object"||r!=null&&(typeof r=="string"&&r.includes("{{")||r===!1&&!rn(n)||e.setAttribute&&e.setAttribute(n,ne(n,r)))}if(typeof t.themeModifier=="string"&&t.themeModifier&&e.setAttribute&&e.setAttribute("data-theme",t.themeModifier),t.data&&typeof t.data=="object")for(let n in t.data){let r=t.data[n];typeof r=="function"||typeof r=="object"||r==null||r===!1||typeof r=="string"&&r.includes("{{")||e.dataset&&(e.dataset[n]=r===!0?"":r)}if(t.classlist||t.class){let n=t.classlist||t.class;if(typeof n=="string")n.split(" ").forEach(r=>r&&e.classList.add(r));else if(typeof n=="object")for(let r in n){let o=typeof n[r]=="function"?n[r](t,t.state,t.context):n[r];o&&e.classList.add(typeof o=="string"?o:r)}}}}function Rl(t){if(t==null||typeof t!="object")return"s:"+String(t);try{return"o:"+JSON.stringify(t)}catch{return null}}function yj(t){if(!t||typeof t!="object")return!1;for(let e in t){let n=t[e];if(n&&typeof n=="object"&&!Array.isArray(n))return!0}return!1}function wi(t,e){if(!t||!t.style||!e)return null;let n=t.style,r=[];for(let o in e){if(e[o]==null||o.charAt(0)==="&")continue;let i=Wn(o);r.push(i,Ow(n,i),h1(n,i))}return r}function Ow(t,e){return typeof t.getPropertyValue=="function"?t.getPropertyValue(e):""}function h1(t,e){return typeof t.getPropertyPriority=="function"?t.getPropertyPriority(e):""}function Wn(t){return Ro(t)?t:t.replace(/[A-Z]/g,e=>"-"+e.toLowerCase())}function dp(t,e,n){if(!t||!t.style||!e||!e.length)return;let r=t.style,o=new Set;if(n&&typeof n=="object")for(let s in n)n[s]==null||s.charAt(0)==="&"||o.add(Wn(s));for(let s=0;s<e.length;s+=3){let i=e[s];o.has(i)||Ow(r,i)===e[s+1]&&typeof r.removeProperty=="function"&&r.removeProperty(i)}}function Si(t,e){if(!e||!t||!t.style)return!1;let n=t.style;for(let r=0;r<e.length;r+=3)if(Ow(n,e[r])!==e[r+1]||h1(n,e[r])!==e[r+2])return!1;return!0}var Ro=t=>t.charCodeAt(0)===45&&t.charCodeAt(1)===45,g1=t=>typeof t=="number"||t===!0||typeof t=="string"&&t!=="",mp=t=>Ro(t)?t:"--"+t;function yp(t,e){if(!Pr(t))return null;let n=null;for(let r of Object.keys(t)){if(!r)continue;let o=t[r];if(typeof o=="function"){if(!e)continue;o=o(e,e.state,e.context)}g1(o)&&(n||(n={}),n[mp(r)]=o)}return n}function m1(t,e,n,r,o){let s=t.__ref,i=$t(t,r,n),a,c=null,l=K(()=>{let f=t.context?.designSystem;f&&J(f);try{let u=i(t,t.state,t.context),d=t.node;if(!d||!d.style)return;if(!g1(u)){dp(d,c,null),a=void 0,c=null;return}let p=String(u);if(p!==a||!Si(d,c)){a=p;let g={[e]:u};qn(d,g),c=wi(d,g)}}catch(u){Ht(s,o,u)}finally{f&&X()}},{depth:s.path.length,label:ct(s,o)});s.__effects.push(l)}function bj(t){let e=t.__ref,n=t.vars;if(typeof n=="function"){_j(t,n),e.__exec.vars=n;return}if(Pr(n))for(let r of Object.keys(n)){let o=n[r];!r||typeof o!="function"||m1(t,mp(r),o,bi(t.varsDeps,r),"vars."+r)}}function _j(t,e){let n=t.__ref,r=$t(t,t.varsDeps,e),o,s=null,i=K(()=>{let a=t.context?.designSystem;a&&J(a);try{let c=yp(r(t,t.state,t.context)),l=t.node;if(!l||!l.style)return;let f=Rl(c);(f===null||f!==o||!Si(l,s))&&(o=f,dp(l,s,c),c&&qn(l,c),s=c?wi(l,c):null,n.__varsInline=c?new Set(Object.keys(c)):null)}catch(c){Ht(n,"vars",c)}finally{a&&X()}},{depth:n.path.length,label:ct(n,"vars")});n.__effects.push(i)}function kw(t,e){if(typeof t[e]=="function"&&(Rr(t.tag||"div",e)||e.charCodeAt(0)===45))return!0;if(!Ro(e))return!1;let n=t.vars;if(typeof n=="function"){let r=t.__ref&&t.__ref.__varsInline;return!!(r&&r.has(e))}if(!Pr(n))return!1;for(let r of Object.keys(n))if(typeof n[r]=="function"&&mp(r)===e)return!0;return!1}function wj(t){let e=null;for(let n in t)t[n]!=null&&n.charAt(0)!=="&"&&(e||(e=new Set),e.add(Wn(n)));return e}function Sj(t,e,n,r){let o=t.__ref;if(!o)return;let s=null;if(n)for(let i of n){if(r&&r.has(i))continue;let a=e[i];if(a==null||typeof a=="object")continue;let c=Wn(i);xl[c]&&(s||(s={}),s[c]=a)}o.__declaredLonghands=s}function y1(t,e){let n=t.__ref,r=n&&n.__declaredLonghands;if(!r||!e)return null;let o=null;for(let s in r){if(e.has(s))continue;let i=xl[s],a=!1;for(let c=0;c<i.length;c++)if(e.has(i[c])){a=!0;break}a&&(o||(o={}),o[s]=r[s])}return o}function jC(t,e){let n=t.node;qn(n,e);let r=wj(e);if(!r)return e;let o=t.__ref;if(o)if(o.__inlineCssKeys)for(let i of r)o.__inlineCssKeys.add(i);else o.__inlineCssKeys=new Set(r);let s=y1(t,r);return s?(qn(n,s),Object.assign({},e,s)):e}function xj(t){let e=t.__ref;if(!e||!e.__inlineCssKeys||!e.__declaredLonghands)return;let n=y1(t,e.__inlineCssKeys);n&&qn(t.node,n)}function yl(t,e){if(!e||typeof e!="object")return e;let n=t&&t.context&&t.context.designSystem;n&&J(n);try{return Q_(e,t)}catch{return e}finally{n&&X()}}function qn(t,e){if(!t||!e||!t.style)return;let n=null;for(let r in e){let o=e[r];if(o!=null){if(r.charAt(0)==="&"&&typeof o=="object"){n||(n={}),n[r]=o;continue}try{let s=String(o),i=Ro(r)?r:r.replace(/[A-Z]/g,f=>"-"+f.toLowerCase()),a=s.trim(),c=/\s*!important\s*$/.test(a),l=a.replace(/\s*!important\s*$/,"");t.style.setProperty(i,l,c?"important":"")}catch{}}}n&&kj(t,n)}function kj(t,e){let n=`_ds${e1.scopedStyleId++}`;t.classList.add(n);let r=t.ownerDocument,o=r.querySelector("style[data-smbls-scoped]");o||(o=r.createElement("style"),o.setAttribute("data-smbls-scoped",""),r.head.appendChild(o));let s="";for(let i in e){let a="."+n,c=i.replace(/&/g,a).split(",").map(f=>{let u=f.trim();return u.includes(a)?u:a+u}).join(", "),l=e[i];if(typeof l=="object"){let f="",u="";for(let d in l){let p=l[d];if(typeof p=="object"){let g=d.includes("&")?c.split(", ").map(m=>d.replace(/&/g,m)).join(", "):c.split(", ").map(m=>`${m} ${d}`).join(", "),h="";for(let m in p)h+=`${Wn(m)}: ${p[m]};`;u+=jn(`${g} { ${h} }`,g)+`
|
|
59
|
+
`):"")}}if(pp(c,!0),R1(c,e,o),typeof c.html=="function"&&c.node&&!c.node.innerHTML){let d=c.context?.designSystem;d&&J(d);try{let p=c.html(c,c.state,c.context);p!=null&&typeof p!="function"&&(c.node.innerHTML=p)}catch{}finally{d&&X()}}if(Wt("Create",c,r),Wt("Complete",c,r),Wt("Render",c,r),Wt("RenderRouter",c,r),_w(c,r),typeof c.onFrame=="function"){let d=c.onFrame,p=c.context?.designSystem,g=()=>{if(c.node){if(c.node.isConnected){p&&J(p);try{d(c,c.state,c.context)}catch(h){console.error("[DOMQL] onFrame error:",h)}finally{p&&X()}}requestAnimationFrame(g)}};requestAnimationFrame(g)}return c}function c1(t,e,n,r,o,s){if(n&&!e.extends&&!e.extend){let y=n.indexOf("_"),w=n.indexOf("."),b=y>0?y:-1;if(w>0&&(b<0||w<b)&&(b=w),b>0){let x=n.substring(0,b),k=t.context?.components;k&&(k[x]||k["smbls."+x])?e={...e,extends:x}:k&&Q()&&(/^[A-Z]\w*_\d+$/.test(n)||/^[A-Z]\w*\.\w+$/.test(n))&&console.warn(`[smbls] auto-extend: key "${n}" looks like an instance of "${x}" but neither "${x}" nor "smbls.${x}" is registered in context.components \u2014 element will render as a plain <div>. Register the base component or rename the key.`)}}t.__ref&&(t.__ref.__mergeLayer=null),fi(t,e,s);let i=L_(t),a=i?i.rank:0,c=new Set(["childProps","attr","style","scope","data","vars"]),l=t.props&&typeof t.props=="object"?t.props:null;for(let y in e){if(y==="parent"||y==="node"||y==="__ref"||y==="extends"||y==="context"||y==="props")continue;if(y==="key"){r&&(t.key=o?gp(o,r):r);continue}let w=e[y];i&&i.set(y,a);let b=t[y],x=b&&w&&typeof b=="object"&&typeof w=="object"&&!Array.isArray(b)&&!Array.isArray(w)&&typeof b!="function"&&typeof w!="function";x&&y.charCodeAt(0)>=65&&y.charCodeAt(0)<=90?t[y]=El(b,w):x&&c.has(y)?t[y]={...b,...w}:x&&ww(y)?t[y]=El(b,w):t[y]=w}function f(y){for(let w in y){let b=y[w],x=t[w],k=x&&b&&typeof x=="object"&&typeof b=="object"&&!Array.isArray(x)&&!Array.isArray(b)&&typeof x!="function"&&typeof b!="function";k&&w.charCodeAt(0)>=65&&w.charCodeAt(0)<=90?t[w]=El(x,b):k&&c.has(w)?t[w]={...x,...b}:k&&ww(w)?t[w]=El(x,b):t[w]=b}}if(l&&f(l),e.props&&typeof e.props=="object"&&(f(e.props),i))for(let y in e.props)i.set(y,a);e.classlist!==void 0&&(t.classlist=e.classlist),e.text!==void 0&&(t.text=e.text),e.html!==void 0&&(t.html=e.html);let u=t.scope&&typeof t.scope=="object"?t.scope:null,d=o?.scope,p=t.context&&typeof t.context.globalScope=="object"&&t.context.globalScope||null,g=d||p||null;if(e.scope!==void 0||u){let y={};u&&Object.assign(y,u),e.scope!==void 0&&Object.assign(y,e.scope),t.scope=jf(y,g)}else g&&(t.scope=g);e.if!==void 0&&(t.if=e.if);let h=t.__ref,m=gj(t,h&&h.__runtimeSource);return h&&(h.__declaredArrays=m||void 0),gi(t),tj(t,o,e,s),e}var ZF=new Set(["key","parent","context","__ref"]);function QF(t,e){for(let o of Object.keys(t))ZF.has(o)||delete t[o];let n=Qt();n&&Dt(null);let r=e.definition;if(!r.extends&&!r.extend&&typeof e.key=="string"){let o=t.context?.components||{},s=o[e.key]||o["smbls."+e.key];s&&(r={...r,extends:s})}try{c1(t,r,e.key,e.ownKey,t.parent,e.options)}finally{n&&Dt(n)}}function JF(t,e,n){let r=n||{},o=a=>!!(r[a]||r["smbls."+a]),s=[],i=[];if(t.extends&&i.push(...Array.isArray(t.extends)?t.extends:[t.extends]),t.extend&&i.push(...Array.isArray(t.extend)?t.extend:[t.extend]),i.length){for(let a of i){if(typeof a!="string")continue;let c=a.includes(">")?a.split(">")[0].trim():a;o(c)||s.push(c)}return s}if(typeof e=="string"&&/^[A-Z]/.test(e)){let a=-1,c=e.indexOf("_"),l=e.indexOf(".");c>0&&(a=c),l>0&&(a<0||l<a)&&(a=l);let f=a>0?e.substring(0,a):e;o(f)||s.push(f)}return s}function dw(t,e,n){if(typeof t.onStateInit!="function"&&!t.context?.plugins?.length)return;let r=t.state;t.state=e;try{Wt("StateInit",t,n)}finally{t.state=r}}var pw=t=>({isDataOnlyKey:e=>ur(t).has(e)});function tj(t,e,n,r){let o=!e,s=n.state&&typeof n.state=="object"&&!Array.isArray(n.state)&&Object.keys(n.state).length===0,i=o&&s&&t.context?.state,a=n.state!==void 0&&!i?n.state:t.state&&!_t(t.state)?t.state:void 0;if(a==null){if(e?.state)t.state=e.state,be(t,t.state);else if(t.context?.state){let c=t.context.state,l={...c},f=t.context?.polyglot;if(f?.translations){let u=t.context,d=c.lang||f.defaultLang||"en",p=new Set,g=(y,w)=>{p.has(y)||eo(u,y,l)&&(l[y]=w,p.add(y),mn(u,y,w))},h=f.translations[d];if(h&&typeof h=="object")for(let y in h)g(y,h[y]);let m=new Set(f.languages||[]);for(let y in f.translations)m.has(y)||g(y,f.translations[y])}_t(l)||dw(t,l,r),t.state=_t(l)?l:xn(l,pw(t.context)),t.state.__element=t,t.state.root=t.state,be(t,t.state),vs?.(c,t.state),Wt("StateCreated",t,r)}else t.state={},Object.defineProperty(t.state,"root",{value:t.state,enumerable:!1,configurable:!0,writable:!0}),be(t,t.state);return}if(typeof a=="string"){if(t.state=l1(a,e),t.state&&typeof t.state=="object"&&!_t(t.state)){let c=e?.state?.root||e?.state||t.state;Object.defineProperty(t.state,"root",{value:c,enumerable:!1,configurable:!0,writable:!0})}be(t,t.state),nj(t,a,e),Wt("StateCreated",t,r);return}if(typeof a=="function"){let c=a(t,e?.state);if(_t(c))t.state=c;else{let l=c||{};dw(t,l,r),t.state=xn(l,e?.state?void 0:pw(t.context))}}else if(_t(a))t.state=a;else{let c={...a};dw(t,c,r),t.state=xn(c,e?.state?void 0:pw(t.context))}t.state.__element=t,e?.state?(t.state.parent=e.state,t.state.root=e.state.root||e.state):t.state.root=t.state,be(t,t.state),vs?.(a,t.state),Wt("StateCreated",t,r)}function hw(t,e){if(!e)return t;let n=e.split("/"),r=t;for(let o of n){if(r==null)return{};r=r[o]}return r??{}}function l1(t,e){if(!e)return{};if(t===".")return e.state||{};if(t.startsWith("../")){let o=t.slice(3);return o?hw(e.state,o):e.state??{}}if(t.startsWith("~/")){let o=e.state?.root||e.state,s=t.slice(2);return s?hw(o,s):o??{}}if(e.state?.[t]!==void 0)return e.state[t];let n=hw(e.state,t);if(n!=null&&Object.keys(n).length>0)return n;let r=e.context?.polyglot;if(r?.translations){let o=e.state?.root?.lang||r.defaultLang||"en",s=r.translations[o];if(s?.[t]!==void 0)return s[t];if(r.translations[t]!==void 0)return r.translations[t]}return{}}function ej(t,e){let n=e.state,r=t;if(t.startsWith("~/")?(n=e.state&&(e.state.root||e.state),r=t.slice(2)):t.startsWith("../")&&(r=t.slice(3)),!r||!n||typeof n!="object")return;let o=n[r];if(o!==void 0||r.indexOf("/")===-1)return o;let s=n;for(let i of r.split("/")){if(s==null||typeof s!="object")return;s=s[i]}return s}function nj(t,e,n){let r=t.__ref;if(!r||!n||e==="."||!_t(n.state))return;r.__stateBinding&&r.__stateBinding.dispose();let o=Qt();o&&Dt(null);try{let s=K(()=>{let i=ej(e,n);if(!i||typeof i!="object"||i===t.state)return;let a=Qt();Dt(null);try{f1(t,t.state,i,!0)}finally{Dt(a)}},{depth:r.path?r.path.length:0,label:ct(r,"state")});s._isStateBinding=!0,r.__stateBinding=s,r.__effects&&r.__effects.push(s)}finally{o&&Dt(o)}}function f1(t,e,n,r){let o=t.__ref;if(!o)return;if(r||t.state===e){t.state=n,r&&be(t,n),DC(o);let i=o.__children;if(i)for(let a=0;a<i.length;a++){let c=t[i[a]];c&&c.__ref&&c.parent===t&&f1(c,e,n,!1)}return}if(o.__stateBinding){o.__stateBinding._notify();return}let s=t.state;s&&typeof s=="object"&&s.parent===e&&(s.parent=n,DC(o))}function DC(t){let e=t.__effects;if(e)for(let n=0;n<e.length;n++){let r=e[n];r&&!r._disposed&&!r._isStateBinding&&!r._isSubscribeToEffect&&typeof r._notify=="function"&&r._notify()}}var rj=new Set(["s","state","ctx","context"]);function oj(t){try{let n=(typeof te=="function"?te(t):Function.prototype.toString.call(t)).match(/^[^(]*\(([^)]*)\)/);return n?n[1].split(",").map(r=>r.trim().split("=")[0].trim()).filter(Boolean):[]}catch{return[]}}function sj(t){let e;try{e=typeof te=="function"?te(t):Function.prototype.toString.call(t)}catch{return!0}if(typeof e!="string")return!0;let n=e.match(/^\s*(?:async\s+)?([A-Za-z_$][\w$]*)\s*=>/)||e.match(/^[^(]*\(([^)]*)\)/);if(!n)return!0;let r=e.slice(n.index+n[0].length);if(/\bstate\b|\barguments\b|\bcall\s*\(/.test(r))return!0;let s=n[1].split(",").map(a=>a.trim())[1];if(!s)return!1;if(!/^[A-Za-z_$][\w$]*$/.test(s.split("=")[0].trim()))return!0;let i=s.split("=")[0].trim();return new RegExp("(^|[^\\w$.])"+i.replace(/\$/g,"\\$")+"(?![\\w$])").test(r)}var ij=3,aj=/^(is|has)[A-Z0-9_$]/,cj=new Set(["routerOptions"]),IC=new WeakSet;function lj(t,e){if(typeof t!="function"||t.length!==2||e&&(aj.test(e)||cj.has(e))||IC.has(t))return!1;let n=oj(t);if(n.length<2)return!1;let r=n[1].replace(/[{}[\]]/g,"").trim();return r.length<ij||rj.has(r)?!1:(IC.add(t),!0)}function fj(t){let e=t.__ref,n=t.tag||"div",r=t.context?.designSystem,o=[],s=Object.keys(t);for(let i=0;i<s.length;i++){let a=s[i];if(typeof t[a]!="function"||Nt.has(a))continue;let c=a.charCodeAt(0);c>=65&&c<=90||Hn(a)||wt[a]||Rt&&Rt.has(a)||c!==45&&(He(n,a)||(Q()&&lj(t[a],a)&&console.warn(`[smbls] custom prop "${a}"${t.key?` on key "${t.key}"`:""} is a function \u2014 it will be auto-invoked on read and its RETURN VALUE stored, not preserved as a callable reference. If you meant to stash a callback, use el.call('${a}', \u2026) instead of reading el.${a}(\u2026) directly (see RULES.md Rule 8).`),o.push({prop:a,fn:t[a]})))}for(let i=0;i<o.length;i++){let{prop:a,fn:c}=o[i];e.__exec[a]=c,Object.defineProperty(t,a,{get(){r&&J(r);try{return c(t,t.state,t.context)}catch{return}finally{r&&X()}},set(l){delete e.__exec[a],Object.defineProperty(t,a,{value:l,writable:!0,configurable:!0,enumerable:!0})},configurable:!0,enumerable:!0})}}function uj(t,e){if(!(!Array.isArray(e)||e.length===0))for(let n=0;n<e.length;n++){let r=e[n];try{typeof r=="function"?r(t,t.state,t.context):typeof r=="string"&&t.state?.[r]}catch{}}}function $t(t,e,n){return!Array.isArray(e)||e.length===0?n:function(...r){return uj(t,e),n.apply(this,r)}}function bi(t,e){if(!(!t||Array.isArray(t)||typeof t!="object"))return t[e]}function ct(t,e){return()=>t.path.join(".")+"::"+e}var $C=new Set;function Ht(t,e,n){if(!Q())return;let r=ct(t,e)();$C.has(r)||($C.add(r),console.warn(`[smbls] "${e}" effect threw on ${t.path.join(".")} \u2014 keeping previous value:`,n?.message||n))}var MC=/(['"`])((?:\\.|(?!\1)[^\\])*)\1/g,dj=(t,e)=>{let n;try{n=String(t)}catch{return}if(!n.includes("{{"))return;MC.lastIndex=0;let r;for(;(r=MC.exec(n))!==null;)r[2].includes("{{")&&e.add(r[2])},pj=(t,e)=>!Hn(t)&&!Pr(e,t),gw=(t,e,n,r,o)=>{if(typeof e=="string"){!o&&e.includes("{{")&&n.add(e);return}typeof e=="function"&&pj(t,r)&&dj(e,n)},Sw=new WeakMap,Ll=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),Cl=t=>{if(typeof t=="string"||typeof t=="number")return{text:t};if(!t||typeof t!="object"||Array.isArray(t))return null;let e=t.props;return e&&typeof e=="object"&&!Array.isArray(e)?Do(t,e):t},Tl=(t,e)=>t&&e?Do(t,e):t||e||null,u1=(t,e)=>{let n=t.__ref&&t.__ref.__runtimeSource;return!!n&&Ll(n,e)},_i=(t,e)=>u1(t,e)?Cl(t.__ref.__runtimeSource[e]):null,Ol=(t,e)=>(e&&t&&typeof t=="object"&&Sw.set(t,e),t),hj=t=>{if(!t||typeof t!="object")return;let e=Sw.get(t);return e&&Sw.delete(t),e},xw=(t,e,n)=>{if(typeof t=="string"){t.includes("{{")&&e.add(t);return}if(!(!t||typeof t!="object"||n.has(t))){if(n.add(t),Array.isArray(t)){for(let r=0;r<t.length;r++)xw(t[r],e,n);return}if(!t.__ref)for(let r of Object.keys(t)){if(r==="state")continue;let o=Object.getOwnPropertyDescriptor(t,r);o&&"value"in o&&xw(o.value,e,n)}}},gj=(t,e)=>{let n=null;for(let r of Object.keys(t)){if(Nt.has(r)||e&&Ll(e,r))continue;let o=Object.getOwnPropertyDescriptor(t,r),s=o&&o.value;if(!Array.isArray(s))continue;let i=new Set;xw(s,i,new Set),i.size&&(n||(n=new Map),n.set(s,i))}return n},NC=(t,e)=>{if(Array.isArray(e))for(let n=t;n;n=n.parent){let r=n.__ref&&n.__ref.__declaredArrays,o=r&&r.get(e);if(!o)continue;let s=t.__ref;s.__authoredTemplates||(s.__authoredTemplates=new Set);for(let i of o)s.__authoredTemplates.add(i);return}},d1=["attr","aria","data","metadata"],mj=t=>{if(d1.includes(t))return!0;let e=t.charCodeAt(0);return e===46||e===33||e===64},yj=(t,e)=>{let n=new Set,r=t.tag||"div";for(let o of Object.keys(t)){let s=Object.getOwnPropertyDescriptor(t,o),i=s&&s.value,a=!!e&&Ll(e,o);if(i&&typeof i=="object"&&!Array.isArray(i)){if(!mj(o))continue;let c=a?e[o]:null,l=c&&typeof c=="object"?c:null,f=o.charCodeAt(0)===46||o.charCodeAt(0)===33;for(let u in i){let d=a&&(!l||Ll(l,u)),p=i[u];if(f&&p&&typeof p=="object"&&!Array.isArray(p)&&d1.includes(u)){for(let g in p)gw(g,p[g],n,r,d);continue}gw(u,p,n,r,d)}continue}gw(o,i,n,r,a)}return n};function p1(t,e){let n=t.__ref,r=!!(e&&e.skipIfEffect),o=yj(t,n.__runtimeSource);if(n.__authoredTemplates)for(let c of o)n.__authoredTemplates.add(c);else n.__authoredTemplates=o;if(fj(t),typeof t.text=="function"){let c=t.text,l=$t(t,t.textDeps,c),f=K(()=>{if(!n.contentManaged)try{let u=l(t,t.state,t.context);t.node&&u!=null&&typeof u!="function"&&typeof u!="object"&&(typeof u=="string"&&u.includes("{{")&&(u=Vt.call(t,u,t.state)),pi(t,u))}catch(u){Ht(n,"text",u)}},{depth:n.path.length,label:ct(n,"text")});n.__effects.push(f),n.__exec.text=c}else if(typeof t.text=="string"&&t.text.includes("{{")){let c=t.text,l=K(()=>{if(n.contentManaged)return;let f=Vt.call(t,c,t.state);f!=null&&(t.text=f),t.node&&pi(t,f??"")},{depth:n.path.length,label:ct(n,"text")});n.__effects.push(l),n.__exec.text=c}let s=t.tag||"div";for(let c of Object.keys(t))if(typeof t[c]=="function"&&!Nt.has(c)&&!Hn(c)&&!n.__exec[c]&&!fp(s,c)){if(wt[c]){let l=t[c],f=$t(t,t[c+"Deps"],l),u=c,d,p=null,g=null,h,m=K(()=>{let y=t.context?.designSystem;y&&J(y);try{let w=f(t,t.state,t.context);ep();let b;try{b=wt[u](w,t,t.state,t.context)}finally{np()}if(Array.isArray(b)){let k={};for(let S of b)if(S)for(let _ in S)k[_]=S[_];b=k}let x=u==="show"||u==="hide";if(b&&t.node&&bj(b)){let k=Rl(b);if(k===null||k!==h){h=k;let S=Oe(b,null,t.context?.cssPrefix),_=S?S.split(" ").filter(Boolean):null;if(t.node.classList){if(g)for(let E of g)t.node.classList.remove(E);if(_&&_.length)for(let E of _)t.node.classList.add(E);g=_}}d=void 0,p=null}else if(b&&t.node){if(g){for(let S of g)t.node.classList.remove(S);g=null,h=void 0}let k=Rl(b);if(k===null||k!==d||!Si(t.node,p)){d=k;let S=BC(t,b);p=wi(t.node,S)}}else t.node&&x&&(d=void 0,p=null,t.node.style.display="")}finally{y&&X()}},{depth:n.path.length,label:ct(n,u)});n.__effects.push(m),n.__exec[c]=l}else if(Rt&&Rt.has(c)){let l=t[c],f=$t(t,t[c+"Deps"],l),u=c,d,p=null,g=K(()=>{let h=t.context?.designSystem;h&&J(h);try{let m=f(t,t.state,t.context);if(t.node)if(m!=null){let y=u+":"+String(m);if(y!==d||!Si(t.node,p)){d=y;let w={[u]:m},b=BC(t,w);p=wi(t.node,b)}}else d=void 0,p=null,t.node.style[u]=""}finally{h&&X()}},{depth:n.path.length,label:ct(n,u)});n.__effects.push(g),n.__exec[c]=l}else if(c.charCodeAt(0)===45){let l=t[c];y1(t,c,l,t[c+"Deps"],c),n.__exec[c]=l}}if(_j(t),typeof t.html=="function"){let c=t.html,l=$t(t,t.htmlDeps,c),f=K(()=>{let u=t.context?.designSystem;u&&J(u);try{let d=l(t,t.state,t.context);t.node&&d!=null&&typeof d!="function"&&(t.node.innerHTML=d)}finally{u&&X()}},{depth:n.path.length,label:ct(n,"html")});n.__effects.push(f),n.__exec.html=c}if(typeof t.value=="function"){let c=t.value,l=$t(t,t.valueDeps,c),f=K(()=>{try{let u=l(t,t.state,t.context);typeof u=="string"&&u.includes("{{")&&(u=Vt.call(t,u,t.state)),jC(t,u)}catch(u){Ht(n,"value",u)}},{depth:n.path.length,label:ct(n,"value")});n.__effects.push(f),n.__exec.value=c}else if(typeof t.value=="string"&&t.value.includes("{{")){let c=t.value,l=K(()=>{try{jC(t,Vt.call(t,c,t.state))}catch(f){Ht(n,"value",f)}},{depth:n.path.length,label:ct(n,"value")});n.__effects.push(l),n.__exec.value=c}if(typeof t.style=="function"){let c=t.style,l=$t(t,t.styleDeps,c),f,u=null,d=K(()=>{let p=yl(t,l(t,t.state,t.context)),g=Rl(p);(g===null||g!==f||!Si(t.node,u))&&(f=g,dp(t.node,u,p),qn(t.node,p),u=wi(t.node,p))},{depth:n.path.length,label:ct(n,"style")});n.__effects.push(d),n.__exec.style=c}else if(t.style&&typeof t.style=="object")for(let c in t.style){let l=t.style[c];if(typeof l!="function")continue;let f=$t(t,bi(t.styleDeps,c),l),u,d=null,p=K(()=>{try{let g=f(t,t.state,t.context);if(t.node){let h=c+":"+String(g);if(h!==u||!Si(t.node,d)){u=h;let m=yl(t,{[c]:g});dp(t.node,d,Object.assign({},m,{[c]:""})),qn(t.node,m),d=wi(t.node,m)}}}catch(g){Ht(n,"style."+c,g)}},{depth:n.path.length,label:ct(n,"style."+c)});n.__effects.push(p)}if(t.attr&&typeof t.attr=="object"){for(let c in t.attr)if(typeof t.attr[c]=="function"){let l=$t(t,bi(t.attrDeps,c),t.attr[c]),f=c,u=K(()=>{try{let d=l(t,t.state,t.context);if(typeof d=="string"&&d.includes("{{")&&(d=Vt.call(t,d,t.state)),t.node?.setAttribute){let p=To(t.node,f);d==null||d===!1&&!rn(f)?t.node.removeAttribute(f):typeof d!="function"&&typeof d!="object"&&t.node.setAttribute(f,ne(f,d)),Oo(t.node,p)}}catch(d){Ht(n,"attr."+f,d)}},{depth:n.path.length,label:ct(n,"attr."+f)});u._attrName=f.toLowerCase(),n.__effects.push(u)}else if(typeof t.attr[c]=="string"&&t.attr[c].includes("{{")){let l=t.attr[c],f=c,u=K(()=>{try{let d=Vt.call(t,l,t.state);if(!t.node||!t.node.setAttribute)return;t.node.setAttribute(f,ne(f,d??""))}catch(d){Ht(n,"attr."+f,d)}},{depth:n.path.length,label:ct(n,"attr."+f)});u._attrName=f.toLowerCase(),n.__effects.push(u)}}if(t.aria&&typeof t.aria=="object")for(let c in t.aria){let l=t.aria[c];if(typeof l=="string"&&l.includes("{{")){let p=l,g="aria-"+c.replace(/[A-Z]/g,m=>"-"+m.toLowerCase()),h=K(()=>{try{let m=Vt.call(t,p,t.state);if(!t.node||!t.node.setAttribute)return;t.node.setAttribute(g,ne(g,m??""))}catch(m){Ht(n,"aria."+c,m)}},{depth:n.path.length,label:ct(n,"aria."+c)});h._attrName=g,n.__effects.push(h);continue}if(typeof l!="function")continue;let f=$t(t,bi(t.ariaDeps,c),t.aria[c]),u="aria-"+c.replace(/[A-Z]/g,p=>"-"+p.toLowerCase()),d=K(()=>{try{let p=f(t,t.state,t.context);if(!t.node?.setAttribute)return;p==null?t.node.removeAttribute(u):typeof p!="function"&&typeof p!="object"&&t.node.setAttribute(u,ne(u,p))}catch(p){Ht(n,"aria."+c,p)}},{depth:n.path.length,label:ct(n,"aria."+c)});d._attrName=u,n.__effects.push(d)}if(t.data&&typeof t.data=="object")for(let c in t.data){let l=t.data[c];if(typeof l=="string"&&l.includes("{{")){let g=l,h="data-"+c.replace(/[A-Z]/g,y=>"-"+y.toLowerCase()),m=K(()=>{try{let y=Vt.call(t,g,t.state);if(!t.node||!t.node.setAttribute)return;t.node.setAttribute(h,y??"")}catch(y){Ht(n,"data."+c,y)}},{depth:n.path.length,label:ct(n,"data."+c)});m._attrName=h,n.__effects.push(m);continue}if(typeof l!="function")continue;let f=$t(t,bi(t.dataDeps,c),t.data[c]),d="data-"+c.replace(/[A-Z]/g,g=>"-"+g.toLowerCase()),p=K(()=>{try{let g=f(t,t.state,t.context);if(!t.node?.setAttribute)return;g==null||g===!1?t.node.removeAttribute(d):typeof g!="function"&&typeof g!="object"&&t.node.setAttribute(d,g===!0?"":g)}catch(g){Ht(n,"data."+c,g)}},{depth:n.path.length,label:ct(n,"data."+c)});p._attrName=d,n.__effects.push(p)}let i=t.classlist&&typeof t.classlist=="object"&&!Array.isArray(t.classlist)?t.classlist:t.class&&typeof t.class=="object"&&!Array.isArray(t.class)?t.class:null;if(i)for(let c in i){if(typeof i[c]!="function")continue;let l=$t(t,bi(t.classDeps,c),i[c]),f=K(()=>{try{let u=l(t,t.state,t.context);if(!t.node?.classList)return;typeof u=="string"?t.node.classList.add(u):u?t.node.classList.add(c):t.node.classList.remove(c)}catch(u){Ht(n,"class."+c,u)}},{depth:n.path.length,label:ct(n,"class."+c)});n.__effects.push(f)}!r&&typeof t.if=="function"&&h1(t,n,t.if);for(let c of Object.keys(t)){if(Nt.has(c)||typeof t[c]!="function")continue;let l=c.charCodeAt(0);if(l>=65&&l<=90||Hn(c))continue;let f=t[c];n.__exec[c]=f;let u=t.tag||"div";if(He(u,c)&&!Pr(u,c)){let d=Un(c)||c,p=$t(t,t[c+"Deps"],f),g=K(()=>{try{let h=p(t,t.state,t.context);if(typeof h=="string"&&h.includes("{{")&&(h=Vt.call(t,h,t.state)),t.node?.setAttribute){let m=To(t.node,d);h==null||h===!1&&!rn(d)?t.node.removeAttribute(d):typeof h!="function"&&typeof h!="object"&&(d==="src"&&"src"in t.node?t.node.src=h:t.node.setAttribute(d,ne(d,h))),Oo(t.node,m)}}catch(h){Ht(n,c,h)}},{depth:n.path.length,label:ct(n,c)});g._attrName=d.toLowerCase(),n.__effects.push(g)}}let a=t.tag||"div";for(let c of Object.keys(t)){if(Nt.has(c))continue;let l=t[c];if(typeof l!="string"||!l.includes("{{"))continue;let f=c.charCodeAt(0);if(f>=65&&f<=90||Hn(c)||Pr(a,c)||Co[c]||!He(a,c))continue;let u=Un(c)||c,d=K(()=>{try{let p=Vt.call(t,l,t.state);if(!t.node||!t.node.setAttribute)return;t.node.setAttribute(u,ne(u,p??""))}catch(p){Ht(n,c,p)}},{depth:n.path.length,label:ct(n,c)});d._attrName=u.toLowerCase(),n.__effects.push(d)}if(Aj(t),$j(t),typeof t.onStateUpdate=="function"&&Array.isArray(t.stateDeps)){let c=t.onStateUpdate,l=t.stateDeps,f=!1,u=[],d=K(()=>{let p=[];for(let y=0;y<l.length;y++){let w=l[y];try{p[y]=typeof w=="function"?w(t,t.state,t.context):t.state?.[w]}catch{p[y]=void 0}}if(!f){f=!0,u=p;return}let g=p.length!==u.length;for(let y=0;!g&&y<p.length;y++)p[y]!==u[y]&&(g=!0);let h=u;if(u=p,!g)return;let m=t.context?.designSystem;m&&J(m);try{c(t,t.state,t.context,{prev:h,next:p})}catch(y){if(t.context?.plugins?.length&&Ct("error",t,{hook:"onStateUpdate",error:y})||console.error('[DOMQL] Lifecycle "onStateUpdate" error:',y),t.context?.strictMode)throw y}finally{m&&X()}},{depth:n.path.length,label:ct(n,"onStateUpdate")});n.__effects.push(d)}Rj(t)}function FC(t){let e=t.parent,n=e?.node;if(!n||!t.node){R1(t,t.parent);return}let r=null,o=Object.keys(e),s=o.indexOf(t.key);for(let i=s+1;i<o.length;i++){let a=e[o[i]];if(a?.node?.parentNode===n){r=a.node;break}}r?n.insertBefore(t.node,r):n.appendChild(t.node)}function h1(t,e,n){let r=$t(t,t.ifDeps,n),o=K(()=>{let s=!e.__ifInitialized&&e.__ifLateMerge;if(s){let c=t.context?.components||{};s.names.some(l=>c[l]||c["smbls."+l])&&(e.__ifLateMerge=null,QF(t,s),r=$t(t,t.ifDeps,typeof t.if=="function"?t.if:n))}let i;try{i=r(t,t.state,t.context)}catch(c){if(i=!1,e.__ifError=c,typeof console<"u"&&console.warn){let l=t.key||t.tag||"?";console.warn(`[smbls] \`if:\` reactive effect threw on ${l} \u2014 treating as false:`,c?.message||c)}return}let a=e.__if;if(e.__if=!!i,a&&!e.__if&&t.node){t.node.remove();try{typeof t.onRemove=="function"&&t.onRemove(t)}catch(c){console.error("[smbls] onRemove error:",c)}}else if(!a&&e.__if)if(e.__ifInitialized)t.node||(t.node=Cr(t)),t.node&&(t.node.ref=t),FC(t),kw(t),Ew(t),Wt("Render",t,{}),_w(t,{});else{if(e.__ifInitialized=!0,e.__ifLateMerge=null,t.tag||(t.tag=Bn(t)),Wt("Init",t,{}),t.node||(t.node=Cr(t)),!t.node)return;if(t.parent?.__ref?.__children&&!t.parent.__ref.__children.includes(t.key)&&t.parent.__ref.__children.push(t.key),t.tag==="fragment"&&!e.__fragmentAnchor){let l=(t.context?.document||globalThis.document).createComment("");t.node.appendChild(l),e.__fragmentAnchor=l}Wt("AttachNode",t,{}),t.node.setAttribute&&t.key&&t.node.setAttribute("data-key",t.key),t.id&&t.node.setAttribute&&(t.node.id=t.id),T1(t,{}),p1(t,{skipIfEffect:!0}),kw(t),v1(t),Ew(t),A1(t),O1(t,{}),FC(t),Wt("Create",t,{}),Wt("Complete",t,{}),Wt("Render",t,{}),Wt("RenderRouter",t,{}),_w(t,{})}},{depth:e.path.length,label:ct(e,"if")});e.__effects.push(o)}function pi(t,e){let n=t.node;if(!n)return;let r=e==null||typeof e=="object"?"":String(e);if(t.tag==="string"){n.nodeValue!==r&&(n.nodeValue=r);return}let o=t.__ref,s=o?o.__textNode:null;if(s&&s.parentNode!==n&&(s=null),!s){let i=n.firstChild;i&&i.nodeType===3&&(s=i)}s?s.nodeValue!==r&&(s.nodeValue=r):n.firstChild?(s=(n.ownerDocument||t.context?.document||globalThis.document).createTextNode(r),n.insertBefore(s,n.firstChild)):(n.textContent=r,s=n.firstChild&&n.firstChild.nodeType===3?n.firstChild:null),o&&(o.__textNode=s||null)}function To(t,e){return e!=="checked"||!t||t.tagName!=="INPUT"?null:t.hasAttribute("checked")}function Oo(t,e){if(e===null)return;let n=t.hasAttribute("checked");n!==e&&t.checked!==n&&(t.checked=n)}function jC(t,e){let n=t.node;if(!n||!("value"in n))return;let r=e==null?"":String(e);if(n.value===r)return;let o=typeof document<"u"&&document.activeElement===n,s=o&&typeof n.selectionStart=="number"?n.selectionStart:null,i=o&&typeof n.selectionEnd=="number"?n.selectionEnd:null;if(n.value=r,o&&s!=null&&i!=null)try{n.setSelectionRange(s,i)}catch{}let a=t.__ref&&t.__ref.__autoGrow;a&&a.active&&a.resize()}function kw(t){let{node:e}=t;if(e){if((typeof t.text=="string"&&!t.text.includes("{{")||typeof t.text=="number")&&pi(t,t.text),k1(t),typeof t.html=="string"&&(e.innerHTML=t.html),t.value!=null&&typeof t.value!="function"&&!(typeof t.value=="string"&&t.value.includes("{{"))&&"value"in e){let n=String(t.value);e.value!==n&&(e.value=n)}if(t.style&&typeof t.style=="object"){let n=t.style;for(let r in t.style)if(typeof t.style[r]=="function"){n={};for(let o in t.style)typeof t.style[o]!="function"&&(n[o]=t.style[o]);break}qn(e,yl(t,n))}if(t.attr&&typeof t.attr=="object")for(let n in t.attr){let r=t.attr[n];typeof r=="function"||typeof r=="object"||r!=null&&(typeof r=="string"&&r.includes("{{")||r===!1&&!rn(n)||e.setAttribute&&e.setAttribute(n,ne(n,r)))}if(typeof t.themeModifier=="string"&&t.themeModifier&&e.setAttribute&&e.setAttribute("data-theme",t.themeModifier),t.data&&typeof t.data=="object")for(let n in t.data){let r=t.data[n];typeof r=="function"||typeof r=="object"||r==null||r===!1||typeof r=="string"&&r.includes("{{")||e.dataset&&(e.dataset[n]=r===!0?"":r)}if(t.classlist||t.class){let n=t.classlist||t.class;if(typeof n=="string")n.split(" ").forEach(r=>r&&e.classList.add(r));else if(typeof n=="object")for(let r in n){let o=typeof n[r]=="function"?n[r](t,t.state,t.context):n[r];o&&e.classList.add(typeof o=="string"?o:r)}}}}function Rl(t){if(t==null||typeof t!="object")return"s:"+String(t);try{return"o:"+JSON.stringify(t)}catch{return null}}function bj(t){if(!t||typeof t!="object")return!1;for(let e in t){let n=t[e];if(n&&typeof n=="object"&&!Array.isArray(n))return!0}return!1}function wi(t,e){if(!t||!t.style||!e)return null;let n=t.style,r=[];for(let o in e){if(e[o]==null||o.charAt(0)==="&")continue;let i=Wn(o);r.push(i,Rw(n,i),g1(n,i))}return r}function Rw(t,e){return typeof t.getPropertyValue=="function"?t.getPropertyValue(e):""}function g1(t,e){return typeof t.getPropertyPriority=="function"?t.getPropertyPriority(e):""}function Wn(t){return Po(t)?t:t.replace(/[A-Z]/g,e=>"-"+e.toLowerCase())}function dp(t,e,n){if(!t||!t.style||!e||!e.length)return;let r=t.style,o=new Set;if(n&&typeof n=="object")for(let s in n)n[s]==null||s.charAt(0)==="&"||o.add(Wn(s));for(let s=0;s<e.length;s+=3){let i=e[s];o.has(i)||Rw(r,i)===e[s+1]&&typeof r.removeProperty=="function"&&r.removeProperty(i)}}function Si(t,e){if(!e||!t||!t.style)return!1;let n=t.style;for(let r=0;r<e.length;r+=3)if(Rw(n,e[r])!==e[r+1]||g1(n,e[r])!==e[r+2])return!1;return!0}var Po=t=>t.charCodeAt(0)===45&&t.charCodeAt(1)===45,m1=t=>typeof t=="number"||t===!0||typeof t=="string"&&t!=="",mp=t=>Po(t)?t:"--"+t;function yp(t,e){if(!Lr(t))return null;let n=null;for(let r of Object.keys(t)){if(!r)continue;let o=t[r];if(typeof o=="function"){if(!e)continue;o=o(e,e.state,e.context)}m1(o)&&(n||(n={}),n[mp(r)]=o)}return n}function y1(t,e,n,r,o){let s=t.__ref,i=$t(t,r,n),a,c=null,l=K(()=>{let f=t.context?.designSystem;f&&J(f);try{let u=i(t,t.state,t.context),d=t.node;if(!d||!d.style)return;if(!m1(u)){dp(d,c,null),a=void 0,c=null;return}let p=String(u);if(p!==a||!Si(d,c)){a=p;let g={[e]:u};qn(d,g),c=wi(d,g)}}catch(u){Ht(s,o,u)}finally{f&&X()}},{depth:s.path.length,label:ct(s,o)});s.__effects.push(l)}function _j(t){let e=t.__ref,n=t.vars;if(typeof n=="function"){wj(t,n),e.__exec.vars=n;return}if(Lr(n))for(let r of Object.keys(n)){let o=n[r];!r||typeof o!="function"||y1(t,mp(r),o,bi(t.varsDeps,r),"vars."+r)}}function wj(t,e){let n=t.__ref,r=$t(t,t.varsDeps,e),o,s=null,i=K(()=>{let a=t.context?.designSystem;a&&J(a);try{let c=yp(r(t,t.state,t.context)),l=t.node;if(!l||!l.style)return;let f=Rl(c);(f===null||f!==o||!Si(l,s))&&(o=f,dp(l,s,c),c&&qn(l,c),s=c?wi(l,c):null,n.__varsInline=c?new Set(Object.keys(c)):null)}catch(c){Ht(n,"vars",c)}finally{a&&X()}},{depth:n.path.length,label:ct(n,"vars")});n.__effects.push(i)}function vw(t,e){if(typeof t[e]=="function"&&(Pr(t.tag||"div",e)||e.charCodeAt(0)===45))return!0;if(!Po(e))return!1;let n=t.vars;if(typeof n=="function"){let r=t.__ref&&t.__ref.__varsInline;return!!(r&&r.has(e))}if(!Lr(n))return!1;for(let r of Object.keys(n))if(typeof n[r]=="function"&&mp(r)===e)return!0;return!1}function Sj(t){let e=null;for(let n in t)t[n]!=null&&n.charAt(0)!=="&"&&(e||(e=new Set),e.add(Wn(n)));return e}function xj(t,e,n,r){let o=t.__ref;if(!o)return;let s=null;if(n)for(let i of n){if(r&&r.has(i))continue;let a=e[i];if(a==null||typeof a=="object")continue;let c=Wn(i);xl[c]&&(s||(s={}),s[c]=a)}o.__declaredLonghands=s}function b1(t,e){let n=t.__ref,r=n&&n.__declaredLonghands;if(!r||!e)return null;let o=null;for(let s in r){if(e.has(s))continue;let i=xl[s],a=!1;for(let c=0;c<i.length;c++)if(e.has(i[c])){a=!0;break}a&&(o||(o={}),o[s]=r[s])}return o}function BC(t,e){let n=t.node;qn(n,e);let r=Sj(e);if(!r)return e;let o=t.__ref;if(o)if(o.__inlineCssKeys)for(let i of r)o.__inlineCssKeys.add(i);else o.__inlineCssKeys=new Set(r);let s=b1(t,r);return s?(qn(n,s),Object.assign({},e,s)):e}function kj(t){let e=t.__ref;if(!e||!e.__inlineCssKeys||!e.__declaredLonghands)return;let n=b1(t,e.__inlineCssKeys);n&&qn(t.node,n)}function yl(t,e){if(!e||typeof e!="object")return e;let n=t&&t.context&&t.context.designSystem;n&&J(n);try{return Q_(e,t)}catch{return e}finally{n&&X()}}function qn(t,e){if(!t||!e||!t.style)return;let n=null;for(let r in e){let o=e[r];if(o!=null){if(r.charAt(0)==="&"&&typeof o=="object"){n||(n={}),n[r]=o;continue}try{let s=String(o),i=Po(r)?r:r.replace(/[A-Z]/g,f=>"-"+f.toLowerCase()),a=s.trim(),c=/\s*!important\s*$/.test(a),l=a.replace(/\s*!important\s*$/,"");t.style.setProperty(i,l,c?"important":"")}catch{}}}n&&vj(t,n)}function vj(t,e){let n=`_ds${n1.scopedStyleId++}`;t.classList.add(n);let r=t.ownerDocument,o=r.querySelector("style[data-smbls-scoped]");o||(o=r.createElement("style"),o.setAttribute("data-smbls-scoped",""),r.head.appendChild(o));let s="";for(let i in e){let a="."+n,c=i.replace(/&/g,a).split(",").map(f=>{let u=f.trim();return u.includes(a)?u:a+u}).join(", "),l=e[i];if(typeof l=="object"){let f="",u="";for(let d in l){let p=l[d];if(typeof p=="object"){let g=d.includes("&")?c.split(", ").map(m=>d.replace(/&/g,m)).join(", "):c.split(", ").map(m=>`${m} ${d}`).join(", "),h="";for(let m in p)h+=`${Wn(m)}: ${p[m]};`;u+=jn(`${g} { ${h} }`,g)+`
|
|
60
60
|
`}else f+=`${Wn(d)}: ${p};`}f&&(s+=jn(`${c} { ${f} }`,c)+`
|
|
61
|
-
`),u&&(s+=u)}}s&&(o.textContent+=s)}var BC=new Set;function UC(t){if(!Array.isArray(t))return"";let e=[];for(let n=0;n<t.length;n++)typeof t[n]=="string"&&t[n].length&&e.push(t[n]);return e.sort(),e.join("|")}function vj(t,e,n){let r=UC(n);queueMicrotask(()=>{if(!t.__ref)return;let o;try{o=e(t,t.state,t.context)}catch{return}if(UC(o)===r)return;let s=t.__ref.path?t.__ref.path.join("."):t.key||"?";BC.has(s)||(BC.add(s),console.warn(`[smbls] subscribeTo function at "${s}" resolved to a DIFFERENT key list one microtask after create \u2014 wired [${n.join(", ")||"(none)"}], probed [${Array.isArray(o)?o.join(", "):String(o)}]. subscribeTo's function form is resolved ONCE at element-create time (registerSubscribeToEffects, @symbo.ls/element create.js) \u2014 this element stays wired to the ORIGINAL list for its whole lifetime, so this drift is invisible to the reactive effect and any key only present in the new list will never trigger onUpdate. If the watched key genuinely is not known until later (e.g. a module config that loads after shell boot), route the write through an imperative call instead of subscribeTo \u2014 see functions/moduleOpenBridge.js's moduleOpenPage (workspace repo) for the house pattern.`))})}function Ej(t){let e=t.subscribeTo,n=typeof e=="function",r=e;if(n)try{r=e(t,t.state,t.context)}catch{r=null}if(n&&Q()&&vj(t,e,Array.isArray(r)?r:[]),!Array.isArray(r)||r.length===0)return;let o=t.__ref;for(let s=0;s<r.length;s++){let i=r[s];if(typeof i!="string"||i.length===0)continue;let a=i.split("."),c=a[0],l=a.slice(1),f={value:!1},u=K(()=>{let d=t.state&&(_t(t.state)?t.state.root:null);if(!d||!_t(d))return;let p=d;p=p[c];for(let h=0;h<l.length&&!(p==null||typeof p!="object");h++)if(_t(p))p=p[l[h]];else break;if(!f.value)return;let g=!1;if(typeof t.onBeforeUpdate=="function"){let h=t.context?.designSystem;h&&J(h);try{if(F_(o)){let m=t.onBeforeUpdate(t,t.state,t.context,{updateBySubscription:!0});m&&typeof m.then=="function"?m.then(()=>Vn(o,!1),y=>{Vn(o,!0),t.context?.plugins?.length&&Ct("error",t,{hook:"onBeforeUpdate",error:y})||console.error("[DOMQL] subscribeTo onBeforeUpdate error:",y)}):(Vn(o,!1),m===!1&&(g=!0))}}catch(m){Vn(o,!0),t.context?.plugins?.length&&Ct("error",t,{hook:"onBeforeUpdate",error:m})||console.error("[DOMQL] subscribeTo onBeforeUpdate error:",m)}finally{h&&X()}}if(!g&&t.node&&o.__effects)for(let h=0;h<o.__effects.length;h++){let m=o.__effects[h];m&&m!==u&&!m._disposed&&!m._isSubscribeToEffect&&typeof m._execute=="function"&&m._execute()}if(!g&&typeof t.onUpdate=="function"){let h=t.context?.designSystem;h&&J(h);try{t.onUpdate(t,t.state,t.context)}catch(m){t.context?.plugins?.length&&Ct("error",t,{hook:"onUpdate",error:m})||console.error("[DOMQL] subscribeTo onUpdate error:",m)}finally{h&&X()}}},{depth:o.path.length,label:ct(o,"subscribeTo("+i+")")});f.value=!0,u._isSubscribeToEffect=!0,o.__effects.push(u)}}function Rw(t,e){return t.charCodeAt(0)===64&&t.length>1&&!t.startsWith("@media")&&!t.startsWith("@keyframes")&&!t.startsWith("@supports")&&!t.startsWith("@container")&&(t==="@dark"||t==="@light"||!e.context?.designSystem?.media?.[t.slice(1)])}function Pw(t,e){if(t.charCodeAt(0)!==64||/^@(media|supports|container|keyframes)\b/.test(t))return t;let n=e.context?.designSystem?.media?.[t.slice(1)];return n?/^@(media|supports|container)\b/.test(n)?n:`@media ${n}`:t}var VC=new Set;function Aj(t,e){let n=e?.__ref?.path?e.__ref.path.join("."):e?.key||"?",r=n+"::"+t;VC.has(r)||(VC.add(r),console.warn(`[smbls/css] "${t}" at ${n} is a CHILD-COMPONENT key nested inside a pseudo/selector block (":hover", "@dark", etc.) \u2014 that is never a valid CSS selector fragment. The rule is DROPPED (not shipped as a dead/never-matching selector). To reveal a child on a parent state, target the child's OWN class from the parent selector instead, e.g. move the declaration onto the child element itself, or use a sibling-selector combinator in a top-level style block.`))}var zC=new Map;function Cj(t){let e=zC.get(t);if(e)return e;e=[];let n=r=>{if(r)for(let o of r)e.push(o.replace(/-([a-z])/g,(s,i)=>i.toUpperCase()))};return n(xl[t]),n(OC[t]),zC.set(t,e),e}function HC(t,e,n){if(kw(t,e)||n&&n.has(e))return!0;let r=Cj(Wn(e));for(let o=0;o<r.length;o++){let s=r[o];if(kw(t,s)||n&&n.has(s))return!0}return!1}function vi(t,e,n,r){let o={},s=new Set,i=(a,c,l)=>{let f=l?new Set(Object.keys(o)):null;if(wt[a]){let u=wt[a](c,e,e.state,e.context);if(u){let d=Array.isArray(u)?u:[u];for(let p of d)p&&Object.assign(o,p)}}else o[a]=c;if(l)for(let u in o)f.has(u)||s.add(u)};for(let a in t){if(!Object.prototype.hasOwnProperty.call(t,a))continue;let c=t[a];if(typeof c=="function"&&(c=c(e,e.state,e.context)),!(c==null||typeof c=="function")){if(typeof c=="object"&&!Array.isArray(c)){if(a==="style"){for(let u in c){let d=c[u];typeof d=="function"&&(d=d(e,e.state,e.context)),!(d==null||typeof d=="function")&&i(u,d,HC(e,u,r))}continue}if(a==="vars"){let u=yp(c,e);if(u)for(let d in u)i(d,u[d],kw(e,d)||!!(r&&r.has(d)));continue}if(Rw(a,e)){let u=vi(c,e,!1,r);Object.keys(u).length&&(o[`[data-theme="${a.slice(1)}"] &`]=u);continue}if(/^[A-Z][A-Za-z0-9]*$/.test(a)){Q()&&Aj(a,e);continue}let l=Pw(a,e),f=vi(c,e,!1,r);Object.keys(f).length&&(o[l]=f);continue}i(a,c,HC(e,a,r))}}if(n)for(let a in o)s.add(a);for(let a of s){let c=o[a];typeof c=="string"&&!c.includes("!important")&&(o[a]=c+" !important")}return o}var Pr=t=>!!t&&typeof t=="object"&&!Array.isArray(t);function b1(t,e){for(let n in e){let r=e[n];t[n]=Pr(r)?b1(Pr(t[n])?t[n]:{},r):r}return t}function Tj(t,e){if(!Pr(e))return;let n;for(let r of t.split(" ")){let o=r?e[r]:null;Pr(o)&&(n=b1(n||{},o))}return n}function Lw(t,e){if(e===void 0&&(e=0),e>8)return!1;if(typeof t=="function")return!0;if(t&&typeof t=="object"&&!Array.isArray(t)){for(let n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&Lw(t[n],e+1))return!0}return!1}function _1(t,e,n){if(!e||typeof e!="object"||Array.isArray(e))return null;if(Rw(t,n)){let s=vi(e,n,!1);return Object.keys(s).length?{cssProp:`[data-theme="${t.slice(1)}"] &`,block:s}:null}let r=Pw(t,n),o=vi(e,n,!1);return Object.keys(o).length?{cssProp:r,block:o}:null}function Oj(t){let e=t.__ref;for(let n of Object.keys(t)){if(!_w(n))continue;let r=t[n];if(!r||typeof r!="object"||Array.isArray(r)||!Lw(r))continue;let o=null,s,i=K(()=>{if(!t.node)return;let a=t.context?.designSystem;a&&J(a);let c,l=!1;try{let f=_1(n,r,t),u=f?Rl(f.block)+"::"+f.cssProp:null;if(u!==null&&u===s)l=!0;else if(s=u,f){let d=Oe({[f.cssProp]:f.block},null,t.context?.cssPrefix);c=d?d.split(" ").filter(Boolean):null}else c=null}finally{a&&X()}if(!(l||!t.node.classList)){if(o)for(let f of o)t.node.classList.remove(f);if(c&&c.length)for(let f of c)t.node.classList.add(f);o=c}},{depth:e.path.length,label:ct(e,"cssBlock("+n+")")});e.__effects.push(i)}}var Rj=()=>!0,Pj=(t,e)=>{let n=t.charAt(0);return(n===":"||n==="@"||n==="&"||n==="[")&&e&&typeof e=="object"&&!Array.isArray(e)?!0:!!wt[t]||!!(Rt&&Rt.has(t))||Ro(t)||t==="vars"};function Lj(t,e,n){let r={},o=!1;for(let a in n)Object.prototype.hasOwnProperty.call(n,a)&&(a!=="data"&&a!=="aria"&&(Pj(a,n[a])||Nt.has(a))?r[a]=!0:o=!0);if(!o)return null;let s=N_({[e]:n},t.tag||"div",r,Rj),i=null;for(let a in s)/^on/i.test(a)||(i||(i={}),i[a]=s[a]);return i}function WC(t,e,n,r,o,s){let i=t.node,a=null,c=l=>{(a||(a=[])).push(l)};for(let l in r){let f=e.owners.get(l),u=f===n;if(!s&&f!==void 0&&!u)continue;let d;try{d=r[l](t)}catch(h){Ht(t.__ref,"conditional("+n+")."+l,h),u&&c(l);continue}if(typeof d=="string"&&d.includes("{{")&&(d=Vt.call(t,d,t.state)),u&&i.getAttribute(l)!==e.written.get(l)){c(l);continue}if(d==null||typeof d=="object"||typeof d=="function"){u&&w1(i,e,l);continue}let p=d===!1&&!rn(l)?null:String(ne(l,d));if(c(l),u&&p===e.written.get(l))continue;f===void 0&&e.base.set(l,i.getAttribute(l));let g=Co(i,l);p==null?i.removeAttribute(l):i.setAttribute(l,p),To(i,g),e.owners.set(l,n),e.written.set(l,p)}o.appliedAttrs=a}function w1(t,e,n){if(t.getAttribute(n)===e.written.get(n)){let r=e.base.get(n),o=Co(t,n);r==null?t.removeAttribute(n):t.setAttribute(n,r),To(t,o)}e.owners.delete(n),e.base.delete(n),e.written.delete(n)}function Dj(t,e,n,r){let o=r.appliedAttrs;if(r.appliedAttrs=null,!!o)for(let s of o)e.owners.get(s)===n&&w1(t.node,e,s)}function vw(t){let e=t.__ref&&t.__ref.__conditionalAttrs,n=t.node;if(!(!e||!e.owners.size||!n||!n.getAttribute))for(let r of e.owners.keys()){let o=e.written.get(r),s=n.getAttribute(r);s!==o&&(e.base.set(r,s),o==null?n.removeAttribute(r):n.setAttribute(r,o))}}function Ij(t){let e=t.__ref;e.__conditionalRunners=[];let n=null,r=new Map;for(let o of Object.keys(t)){let s=o.charAt(0);if(s!=="."&&s!=="!")continue;let i=o.slice(1);if(!i)continue;if(/[:@\s>~+[\]]/.test(i)){if(typeof console<"u"&&console.warn){let m=i.split(/[:@\s>~+[\]]/)[0];console.warn(`[smbls] conditional \`${o}\` on ${t.key||"?"} will never match \u2014 the whole string after \`${s}\` is read as one prop name. Nest the selector inside instead: \`${s}${m}: { '${i.slice(m.length)}': {...} }\`.`)}continue}let a=t[o];if(!a||typeof a!="object")continue;let c=s==="!",l={lastMatch:!1,appliedKeys:null,appliedClasses:null,appliedAttrs:null},f=Lj(t,o,a);f&&!n&&(n=e.__conditionalAttrs={owners:new Map,base:new Map,written:new Map});let u=new Set;for(let m in a){if(!Object.prototype.hasOwnProperty.call(a,m))continue;let y=m.charAt(0),S=a[m];if(!((y===":"||y==="@"||y==="&"||y==="[")&&S&&typeof S=="object"&&!Array.isArray(S))){if(m==="vars"&&Pr(S)){for(let b of Object.keys(S))b&&u.add(mp(b));continue}u.add(m)}}let d=()=>{let m,y=t[i];if(y===void 0){let x=!!t.state&&i in t.state,_=t.state?t.state[i]:void 0;if(x||_!==void 0)m=_;else{let w=t.context?.cases?.[i];if(w===void 0)return;try{m=typeof w=="function"?w.call(t,t):w}catch(k){m=!1,e.__conditionalError=k,typeof console<"u"&&console.warn&&console.warn(`[smbls] conditional \`${o}\` case fn threw on ${t.key||"?"} \u2014 treating as false:`,k?.message||k)}}}else if(typeof y=="function")try{m=y(t,t.state,t.context)}catch(x){m=!1,e.__conditionalError=x,typeof console<"u"&&console.warn&&console.warn(`[smbls] conditional \`${o}\` predicate threw on ${t.key||"?"} \u2014 treating as false:`,x?.message||x)}else m=y;let S=c?!m:!!m;if(!t.node)return;let b=t.context?.designSystem;if(S===l.lastMatch){if(S&&f&&t.node.setAttribute){b&&J(b);try{WC(t,n,o,f,l,!1)}finally{b&&X()}}return}l.lastMatch=S,b&&J(b);try{if(S){let x={},_={},w=!1;for(let A in a){if(!Object.prototype.hasOwnProperty.call(a,A))continue;let T=a[A],M=A.charAt(0);if((M===":"||M==="@"||M==="&"||M==="[")&&T&&typeof T=="object"&&!Array.isArray(T)){if(Rw(A,t)){let R=vi(T,t,!1,u);Object.keys(R).length&&(_[`[data-theme="${A.slice(1)}"] &`]=R,w=!0)}else{let R=Pw(A,t),j=vi(T,t,!1,u);Object.keys(j).length&&(_[R]=j,w=!0)}continue}let $=typeof T=="function"?T(t,t.state,t.context):T;if($!=null){if(wt[A]){let R=wt[A]($,t,t.state,t.context);if(R){let j=Array.isArray(R)?R:[R];for(let et of j)et&&Object.assign(x,et)}}else if(Rt&&Rt.has(A))x[A]=$;else if(Ro(A))x[A]=$;else if(A==="vars"){let R=yp($,t);R&&Object.assign(x,R)}}}let k=Object.keys(x);if(k.length){qn(t.node,x);for(let A of k)r.set(A,o);l.appliedKeys=k}else l.appliedKeys=null;if(w){let A=Oe(_,null,t.context?.cssPrefix,{state:!0}),T=A?A.split(" ").filter(Boolean):[];if(T.length&&t.node.classList){for(let M of T)t.node.classList.add(M);l.appliedClasses=T}else l.appliedClasses=null}else if(l.appliedClasses){for(let A of l.appliedClasses)t.node.classList.remove(A);l.appliedClasses=null}f&&t.node.setAttribute&&WC(t,n,o,f,l,!0)}else{if(l.appliedAttrs&&Dj(t,n,o,l),l.appliedKeys){for(let x of l.appliedKeys)r.get(x)===o&&(Ro(x)?t.node.style.removeProperty(x):t.node.style[x]="",r.delete(x));l.appliedKeys=null}if(l.appliedClasses){for(let x of l.appliedClasses)t.node.classList.remove(x);l.appliedClasses=null}}}finally{b&&X()}};e.__conditionalRunners.push(d);let p=$t(t,t[i+"Deps"],d),g=K(p,{depth:e.path.length,label:ct(e,"conditional("+o+")")}),h=e.__exec&&e.__exec[i]||t[i];g._sources.size===0&&typeof h=="function"&&Q()&&oj(h)&&console.warn(`[smbls] conditional \`${o}\` on ${t.key||"?"} subscribed to nothing \u2014 its predicate tracked no reactive read on its first run, so no state write will ever re-evaluate it (only a direct element.update() on this element re-runs it). If the predicate guards its state reads (\`in\`, short-circuits, \`?.\`), declare \`${i}Deps: [...]\` (state-key strings or \`(el, s) => \u2026\` selectors) so the subscription is armed unconditionally.`),e.__effects.push(g)}}var gw=new WeakSet,qC=new WeakSet,KC=new WeakSet;function $j(t){if(KC.has(t))return!1;if(!qC.has(t)){qC.add(t);let e=t.defaultView,n=()=>{KC.add(t)};e&&typeof e.requestAnimationFrame=="function"?e.requestAnimationFrame(n):setTimeout(n,0)}return!0}function Mj(t){let e=t.ownerDocument;!e||gw.has(e)||$j(e)||(gw.add(e),queueMicrotask(()=>{gw.delete(e);let n=e.body||e.documentElement;n&&n.offsetWidth}))}var mw=new WeakSet,GC=!1;function YC(t){return t.startsWith("[data-theme=")||t.startsWith("@media")&&t.includes("prefers-color-scheme")}function Ew(t,e){let n={...t};for(let r in e){let o=e[r],s=n[r];n[r]=o&&typeof o=="object"&&s&&typeof s=="object"?Ew(s,o):o}return n}function S1(t,e){let n={};for(let r in t){let o=t[r];if(o&&typeof o=="object"){let s=S1(o,e);Object.keys(s).length&&(n[r]=s)}else e.has(r)||(n[r]=o)}return n}function Nj(t,e,n){let r=null;for(let[o,s]of e){let i=Wn(o),a=xl[i];if(a)for(let c=0;c<a.length;c++){let l=a[c].replace(/-([a-z])/g,(g,h)=>h.toUpperCase()),f=t[l]!=null?e.get(l):void 0,u=n&&n.get(a[c]),d=f!==void 0&&f>s&&uw(a[c],t[l],i),p=!d&&u!==void 0&&u>s&&uw(a[c],void 0,i);if(d||p){d&&delete t[o],r||(r=new Set),r.add(o);break}}}return r}function x1(t){let{node:e}=t;if(!e)return;if(GC||(GC=!0,Oe({display:"none"})),mw.has(t)){console.error("[applyCssInProps] re-entry detected for element",t.key,"prop path:",t.__ref?.path);return}mw.add(t);let n=t.context?.designSystem;n&&J(n),ep();try{let r={},o=!1,s=[],i=null,a=null,c=null,l=t.__ref&&t.__ref.__mergeLayer,f,u=null,d=null,p=(b,x)=>{if(x&&typeof x=="object"&&YC(b)){a||(a={});let _=a[b];_&&(x=Ew(_,x)),a[b]=x}else(x===null||typeof x!="object")&&(c||(c=new Set),c.add(b),f!==void 0&&(u||(u=new Map),u.set(b,f)));r[b]=x};if(Object.prototype.hasOwnProperty.call(t,"theme")&&typeof t.theme!="function"&&wt.theme){let b=wt.theme(t.theme,t,t.state,t.context);if(b){let x=_=>{for(let w in _){let k=_[w];k&&typeof k=="object"&&YC(w)&&(i||(i={}),i[w]=k),r[w]=k}};if(Array.isArray(b))for(let _ of b)_&&x(_);else x(b);o=!0}}let g=(b,x)=>{if(b==="vars"){let _=yp(x);if(_){for(let w in _)p(w,_[w]);o=!0}return}if(wt[b]){let _=wt[b](x,t,t.state,t.context);if(_){if(Array.isArray(_)){for(let w of _)if(w)for(let k in w)p(k,w[k])}else for(let w in _)p(w,_[w]);o=!0}}else if(Rt&&Rt.has(b))x!=null&&typeof x!="object"&&(p(b,x),o=!0);else if(b.charCodeAt(0)===45)x!=null&&typeof x!="object"&&(p(b,x),o=!0);else if((b.charAt(0)==="&"||b.charAt(0)==="@"||b.charAt(0)===":"||b.charAt(0)==="[")&&x&&typeof x=="object"&&!Array.isArray(x)){if(Lw(x))return;let _=_1(b,x,t);_&&(p(_.cssProp,_.block),o=!0)}};if(typeof t.class=="string"){let b=Tj(t.class,t.context?.designSystem?.class);if(b)for(let x in b)g(x,b[x])}let h=c?new Set(c):null,m=t.tag||"div";for(let b of Object.keys(t)){if(typeof t[b]=="function"){let _=l&&l.get(b);_!==void 0&&Rr(m,b)&&(d||(d=new Map),d.set(Wn(b),_));continue}if(f=l?l.get(b):void 0,b==="vars"){g(b,t[b]);continue}if(Nt.has(b)||b==="theme")continue;let x=b.charCodeAt(0);x>=65&&x<=90||Hn(b)||fp(m,b)||g(b,t[b])}f=void 0;let y=u?Nj(r,u,d):null;if(i)for(let b in i){let x=c?S1(i[b],c):i[b];a&&a[b]&&(x=Ew(x,a[b])),Object.keys(x).length?r[b]=x:delete r[b]}if(Sj(t,r,c,y?new Set([...h||[],...y]):h),o){r.display&&String(r.display).includes("!important")&&(e.style.setProperty("display",String(r.display).replace(/\s*!important\s*$/,""),"important"),delete r.display);let b=t.display!=null&&typeof t.display!="function"?t.display:t.hide===!0||t.show===!1?"none":null;typeof b=="string"&&b!==""&&r.display&&r.display!==b&&(r.display=b);let x=Oe(r,null,t.context?.cssPrefix);if(s=x?x.split(" ").filter(Boolean):[],x&&e.classList){let _=s,w=!1;for(let k of _)e.classList.add(k),w||(k.charCodeAt(0)===95&&k.charCodeAt(1)===99||k.charCodeAt(0)===95&&k.indexOf("_c",1)!==-1)&&(w=!0);w&&Mj(e)}}let S=t.__ref;if(S){let b=S.__staticCssClasses;if(b&&e.classList){let x=new Set(s);for(let _ of b)x.has(_)||e.classList.remove(_)}S.__staticCssClasses=s}xj(t)}finally{np(),n&&X(),mw.delete(t)}}var GA=t=>!!wt[t]||!!(Rt&&Rt.has(t))||typeof t=="string"&&t.charCodeAt(0)===45;function YA(t){t&&t.node&&x1(t)}function k1(t){let{node:e}=t;if(!e||!e.setAttribute)return;if(t.aria&&typeof t.aria=="object")for(let o in t.aria){let s=t.aria[o];if(typeof s=="function"||typeof s=="object"||s==null||typeof s=="string"&&s.includes("{{"))continue;let i="aria-"+o.replace(/[A-Z]/g,a=>"-"+a.toLowerCase());e.setAttribute(i,ne(i,s))}let n=M_(t);for(let o in n){let s=n[o];s!=null&&s!==!1&&typeof s!="function"&&typeof s!="object"&&e.setAttribute(o,s===!0?"":s)}let r=t.tag||"div";for(let o of Object.keys(t)){if(typeof t[o]=="function"||Nt.has(o)||o==="on"||n[o]!==void 0)continue;let s=o.charCodeAt(0);if(!(s>=65&&s<=90)&&!Hn(o)&&!Rr(r,o)&&He(r,o)){let i=t[o];if(i==null)continue;if(typeof i=="string"&&i.includes("{{")){if(!Ao[o])continue;i=Vt.call(t,i,t.state)}if(i==null||typeof i=="function"||typeof i=="object"||i===!1&&!rn(Un(o)||o))continue;let a=Un(o)||o;e.setAttribute(a,ne(a,i))}}}function XA(t,e){let{node:n}=t;if(!n||!n.setAttribute)return;let r=e.charCodeAt(0);if(r>=65&&r<=90||Hn(e))return;let o=t.tag||"div";if(Rr(o,e)||!He(o,e))return;let s=Un(e)||e,i=s.toLowerCase(),a=t.__ref&&t.__ref.__effects,c=!1;if(a)for(let d=0;d<a.length;d++){let p=a[d];p&&p._attrName===i&&!p._disposed&&typeof p._execute=="function"&&(c=!0,p._execute())}if(c)return;let l=t[e],f=Ao[e];if(f&&l!=null){let d=f(t);d!==void 0&&(l=d)}typeof l=="string"&&l.includes("{{")&&(l=Vt.call(t,l,t.state));let u=Co(n,s);l==null||l===!1&&!rn(s)?n.removeAttribute(s):typeof l!="function"&&typeof l!="object"&&n.setAttribute(s,ne(s,l)),To(n,u)}function Fj(t,e){let n=t.node,r=t.__ref,o=r.__autoGrow;if(!e){if(o&&o.active){try{n.removeEventListener("input",o.resize)}catch{}ZC(o),Oo.delete(t),n.style.height="",o.appliedMax!=null&&n.style.maxHeight===o.appliedMax&&(n.style.maxHeight=""),JC(n,o,!1),o.active=!1,o.appliedMax=null,o.lastMeasure=0}return}o||(o=r.__autoGrow={active:!1,appliedMax:null,lastMeasure:0,lastWidth:null,watch:null,awaitingLayout:!1,appliedScroll:!1,fontsHooked:!1,attachAttempts:0,firstAttemptAt:null,resize:()=>{if(!n.isConnected){Dl(t,!0);return}if(!(n.scrollHeight>0)){o.awaitingLayout=!0,XC(t,o);return}o.awaitingLayout=!1;let i=Uj(n),a=Vj(i),c=n.style.height;n.style.height="0px",a&&yw(n);let l=n.scrollHeight;if(!(l>0)){n.style.height=c,a&&yw(n);return}let f=zj(n,i),u=f!=null&&l<f?f:l,d=qj(i),p=d!=null&&u>d;n.style.height=Wj(p?d:u,i)+"px",a&&yw(n),JC(n,o,p),o.lastMeasure=l,o.lastWidth=n.clientWidth,XC(t,o)}},r.__eventCleanup||(r.__eventCleanup=[]),r.__eventCleanup.push(()=>{try{n.removeEventListener("input",o.resize)}catch{}ZC(o),Oo.delete(t)})),o.active||(n.addEventListener("input",o.resize),o.active=!0,Bj(t,o));let s=typeof e=="object"&&e.max!=null?String(e.max):null;s!==o.appliedMax&&(s==null?o.appliedMax!=null&&n.style.maxHeight===o.appliedMax&&(n.style.maxHeight=""):n.style.maxHeight=s,o.appliedMax=s),o.resize()}function Dl(t,e){let n=t.__ref?.__autoGrow;n&&(e&&(n.attachAttempts=0,n.firstAttemptAt=null),Oo.add(t),hp())}function jj(){let t=Array.from(Oo);Oo.clear();for(let e=0;e<t.length;e++){let n=t[e],r=n.node,o=n.__ref?.__autoGrow;if(!(!r||!o||!o.active)){if(!r.isConnected){o.firstAttemptAt==null&&(o.firstAttemptAt=ki()),o.attachAttempts+=1,o.attachAttempts<=o1&&ki()-o.firstAttemptAt<s1&&(Oo.add(n),hp());continue}o.attachAttempts=0,o.firstAttemptAt=null,o.resize()}}}function XC(t,e){if(e.watch)return;let n=t.node;if(!n)return;let r=n.ownerDocument&&n.ownerDocument.defaultView,o=r&&r.ResizeObserver||(typeof ResizeObserver=="function"?ResizeObserver:null);if(typeof o!="function")return;let s=()=>{if(!e.active||!n.isConnected||!(n.scrollHeight>0))return;if(e.awaitingLayout){e.awaitingLayout=!1,Dl(t,!0);return}let a=n.clientWidth;e.lastWidth!=null&&Math.abs(a-e.lastWidth)<.5||(e.lastWidth=a,Dl(t,!0))},i;try{i=new o(s),i.observe(n)}catch{return}e.watch=i}function ZC(t){let e=t.watch;if(e){t.watch=null;try{e.disconnect()}catch{}}}function Bj(t,e){if(e.fontsHooked)return;e.fontsHooked=!0;let n=t.node&&t.node.ownerDocument,r=n&&n.fonts&&n.fonts.ready;!r||typeof r.then!="function"||r.then(()=>{e.active&&t.node&&Dl(t,!0)},()=>{})}function Uj(t){let e=t.ownerDocument&&t.ownerDocument.defaultView;try{return e&&e.getComputedStyle?e.getComputedStyle(t):null}catch{return null}}var Po=t=>typeof t=="string"&&/^\s*-?\d*\.?\d+px\s*$/.test(t)?parseFloat(t):null,Dw=t=>(Po(t.paddingTop)||0)+(Po(t.paddingBottom)||0),v1=t=>(Po(t.borderTopWidth)||0)+(Po(t.borderBottomWidth)||0);function Vj(t){if(!t)return!1;let e=String(t.transitionProperty||"").split(","),n=String(t.transitionDuration||"0s").split(",");for(let r=0;r<e.length;r++){let o=e[r].trim();if(!(o!=="all"&&o!=="height")&&parseFloat(n[r%n.length])>0)return!0}return!1}function yw(t){if(typeof t.getAnimations!="function")return;let e;try{e=t.getAnimations()}catch{return}for(let n=0;n<e.length;n++){let r=e[n];if(r&&r.transitionProperty==="height")try{r.cancel()}catch{}}}function zj(t,e){if(!e||!t.hasAttribute||!t.hasAttribute("rows"))return null;let n=parseInt(t.getAttribute("rows"),10);if(!(n>0))return null;let r=Po(e.lineHeight)||Hj(t,e);return r>0?n*r+Dw(e):null}var kl=["fontStyle","fontVariant","fontWeight","fontStretch","fontSize","fontFamily","lineHeight","letterSpacing"],QC=new WeakMap;function Hj(t,e){let n=t.ownerDocument,r=n&&(n.body||n.documentElement);if(!r||!n.createElement)return null;let o=QC.get(n);o||(o=new Map,QC.set(n,o));let s=kl.map(l=>e[l]||"").join("|");if(o.has(s))return o.get(s);let i=n.createElement("textarea");i.rows=1,i.setAttribute("aria-hidden","true"),i.tabIndex=-1;let a=i.style;a.position="absolute",a.visibility="hidden",a.top="0",a.left="-9999px",a.height="auto",a.minHeight="0",a.maxHeight="none",a.padding="0",a.border="0",a.boxSizing="content-box",a.overflow="hidden";for(let l=0;l<kl.length;l++)e[kl[l]]&&(a[kl[l]]=e[kl[l]]);let c=0;try{r.appendChild(i),c=i.clientHeight}catch{c=0}finally{i.parentNode&&i.parentNode.removeChild(i)}return c>0?(o.set(s,c),c):null}function Wj(t,e){return e?e.boxSizing==="border-box"?t+v1(e):e.boxSizing==="content-box"?Math.max(0,t-Dw(e)):t:t}function qj(t){if(!t)return null;let e=Po(t.maxHeight);if(e==null||!(e>0))return null;let n=Dw(t),r=v1(t),o=t.boxSizing==="border-box"?e-r:e+n,s=Po(t.lineHeight);if(!(s>0))return o;let i=Math.floor((o-n)/s+1e-6);return i>=1?i*s+n:o}function JC(t,e,n){n?e.appliedScroll||(t.style.overflowY="auto",e.appliedScroll=!0):e.appliedScroll&&(t.style.overflowY==="auto"&&(t.style.overflowY=""),e.appliedScroll=!1)}var t1=["srcObject","muted"],Kj=(t,e)=>t==="muted"?e===!0||e===""||e==="true"||e==="muted":e??null;function Gj(t){let e=t.node,n=t.__ref;if(!(!e||!n))for(let r=0;r<t1.length;r++){let o=t1[r],s=t[o];if(s===void 0||!(o in e))continue;let i=a=>{let c=Kj(o,a);if(e[o]!==c)try{e[o]=c}catch(l){Ht(n,o,l)}};if(typeof s=="function"){let a=$t(t,t[o+"Deps"],s),c=K(()=>{try{i(a(t,t.state,t.context))}catch(l){Ht(n,o,l)}},{depth:n.path.length,label:ct(n,o)});n.__effects.push(c),n.__exec[o]=s}else i(s);o==="srcObject"&&(n.__releaseMedia=()=>{try{e.srcObject!=null&&(e.srcObject=null)}catch{}})}}function E1(t){if(!t.autoGrow)return;let e=t.node;if(!e||e.tagName!=="TEXTAREA")return;let n=t.__ref,r=t.autoGrow,o=typeof r=="function"?$t(t,t.autoGrowDeps,r):null,s=K(()=>{let i=t.autoGrow,a=i;if(typeof i=="function")try{a=(i===r&&o?o:i)(t,t.state,t.context)}catch{a=null}Fj(t,a)},{depth:n.path.length,label:ct(n,"autoGrow")});n.__effects||(n.__effects=[]),n.__effects.push(s),o&&(n.__exec.autoGrow=r)}var A1=new Set(["onSwipe","onSwipeLeft","onSwipeRight","onSwipeUp","onSwipeDown"]);function C1(t,e){for(let n of Object.keys(t)){if(!Hn(n)||A1.has(n))continue;let r=Zd(n);if(r){Qd(r,t,t[n]);continue}let o=t[n],s=null;if(o&&typeof o=="object"&&!Array.isArray(o)&&(s=o,o=s.handler),typeof o=="string"&&/^[A-Za-z_$][\w$]*$/.test(o)){let a=o;o=function(l){return t.call(a,l)}}if(typeof o!="function")continue;let i=qF(n);Cr.has(i)||ci(KF(i),t,o,s)}Yj(t)}function Yj(t){let e=t.node;if(!e||!e.addEventListener)return;let n={},r=!1;for(let d of A1){let p=t[d];typeof p=="function"&&(n[d]=p,r=!0)}if(!r)return;let o=typeof t.swipeThreshold=="number"?t.swipeThreshold:40,s=typeof t.swipeMaxDuration=="number"?t.swipeMaxDuration:600,i=0,a=0,c=0,l=!1,f=d=>{let p=d.touches&&d.touches[0]||d.changedTouches&&d.changedTouches[0];p&&(i=p.clientX,a=p.clientY,c=Date.now(),l=!0)},u=d=>{if(!l)return;l=!1;let p=d.changedTouches&&d.changedTouches[0]||d.touches&&d.touches[0];if(!p)return;let g=p.clientX-i,h=p.clientY-a,m=Date.now()-c;if(m>s)return;let y=Math.abs(g),S=Math.abs(h);if(Math.max(y,S)<o)return;let b;if(y>S*1.2)b=g<0?"left":"right";else if(S>y*1.2)b=h<0?"up":"down";else return;let x="onSwipe"+b.charAt(0).toUpperCase()+b.slice(1),_=n[x],w=n.onSwipe;_&&_.call(t,d,t,t.state,t.context),w&&w.call(t,{direction:b,dx:g,dy:h,dt:m,event:d},t,t.state,t.context)};e.addEventListener("touchstart",f,{passive:!0}),e.addEventListener("touchend",u,{passive:!0}),t.__ref.__eventCleanup||(t.__ref.__eventCleanup=[]),t.__ref.__eventCleanup.push(()=>{try{e.removeEventListener("touchstart",f)}catch{}try{e.removeEventListener("touchend",u)}catch{}})}function Lo(t,e){let n={...t};for(let r in e){let o=n[r],s=e[r];o&&s&&typeof o=="object"&&typeof s=="object"&&!Array.isArray(o)&&!Array.isArray(s)&&typeof o!="function"&&typeof s!="function"?n[r]=Lo(o,s):n[r]=s}return n}function Aw(t,e,n,r,o){if(!e||!t.node)return;let s=t.childExtends,i=_i(t,"childProps");if(Array.isArray(e)){let a=t.tag==="fragment",c=t.context?.document||globalThis.document,l=a?null:c?.createDocumentFragment();if(!a&&!l)return;let f=t.childProps,u=t.childrenAs,d=S=>{let b=e[S],x=b;(typeof b=="string"||typeof b=="number")&&(b={text:b});let _=f;if(typeof f=="function")try{_=f(t,b)}catch{_=null}let w=typeof f=="function"?Cl(_):i;if(o&&u!=="state"&&(w=Tl(w,Cl(x))),u==="state"){let A=x;(typeof x=="string"||typeof x=="number")&&(A={value:x,text:x}),b=_?{..._,state:A}:{state:A}}else _&&(b=Lo(_,b));if(s&&!b.ignoreChildExtends)if(b.extends){let A=Array.isArray(b.extends)?b.extends:[b.extends],T=Array.isArray(s)?s:[s];b={...b,extends:[...T,...A]}}else b={...b,extends:s};let k=i1(b?.key,x,S,t);try{return re(Ol(b,w),t,k,n)}catch(A){if(typeof console<"u"&&console.error){let T=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] child "${k}" failed to construct at ${T} (initial render, skipping this row):`,A?.message||A)}return null}},p=t.__ref;if(!(r===!0&&!a&&!!p&&(n?.mountYield===!0||t.yieldChildren===!0))){for(let S=0;S<e.length;S++){let b=d(S);!a&&b?.node&&l.appendChild(b.node)}return a||t.node.appendChild(l),!0}let h=p.__childrenChunkGen=(p.__childrenChunkGen||0)+1;rw();let m=null,y=S=>{if(p.__disposed||p.__childrenChunkGen!==h){m&&m.parentNode&&m.remove();return}for(let b=S;b<e.length;b++){let x=d(b);if(x?.node&&(m?t.node.insertBefore(x.node,m):l.appendChild(x.node)),b+1<e.length&&nw()){m||(m=c.createComment("smbls-mount"),l.appendChild(m),t.node.appendChild(l));let _=b+1;sw(()=>y(_));return}}m?(m.remove(),t.node.tagName==="SELECT"&&pp(t,!0)):t.node.appendChild(l)};return y(0),ow(),!0}if(typeof e=="string"){let a=c1(e,t);if(Array.isArray(a))return Aw(t,a,n,r,!0)}if(typeof e=="object")for(let a in e){if(Nt.has(a))continue;let c=e[a];if(c==null||c===!1)continue;let l=o?Tl(i,Cl(c)):i;if((typeof c=="string"||typeof c=="number")&&(c={text:c}),t.childProps&&(c=Lo(t.childProps,c)),s&&!c.ignoreChildExtends)if(c.extends){let f=Array.isArray(c.extends)?c.extends:[c.extends],u=Array.isArray(s)?s:[s];c={...c,extends:[...u,...f]}}else c={...c,extends:s};re(Ol(c,l),t,gp(t,a),n)}}function pp(t,e){let n=t.node;if(!n||n.tagName!=="SELECT")return;let r=n.options;if(!r||!r.length)return;let o=t.__ref,s=o&&o.__exec&&o.__exec.value,i=typeof s=="function",a=t.value!=null&&typeof t.value!="function";if(i||a){let f;if(i)try{f=s(t,t.state,t.context)}catch{return}else f=t.value,typeof f=="string"&&f.includes("{{")&&(f=Vt.call(t,f,t.state));let u=f==null?"":String(f);n.value!==u&&(n.value=u);return}let c=e||!(o&&o.__selectSynced);if(o&&(o.__selectSynced=!0),!c)return;let l=-1;for(let f=0;f<r.length;f++)r[f].defaultSelected&&(l=f);l>=0&&n.selectedIndex!==l&&(n.selectedIndex=l)}function T1(t,e){let{children:n,content:r}=t,o=t.childExtends,s=typeof n=="function"||f1(t,"children");if(typeof n=="function"){let g=n;try{n=g(t,t.state,t.context)}catch(b){if(n=void 0,typeof console<"u"&&console.error){let x=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] \`children:\` factory threw at ${x} (initial run, treating as empty):`,b?.message||b)}}MC(t,n),t.children=n;let h=t.__ref,m=!1,y=$t(t,t.childrenDeps,g),S=K(()=>{let b=m;m=!0;let x;try{x=y(t,t.state,t.context)}catch(R){if(typeof console<"u"&&console.error){let j=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] \`children:\` factory threw at ${j}${b?"":" (initial tracking run)"}:`,R?.message||R)}return}if(!b||x===t.children)return;MC(t,x),t.children=x,h.__childrenChunkGen!=null&&h.__childrenChunkGen++;let _=typeof t.onContentUpdate=="function",w=_?[]:null,k=_?[]:null,A=_?[]:null;if(Array.isArray(x)&&t.childrenAs==="state"){let R=t.childProps,j=[],et=new Map;for(let B=0;B<x.length;B++){let nt=x[B],U=R;if(typeof R=="function")try{U=R(t,nt)}catch{U=null}let V=i1(U&&U.key,nt,B,t);j.push(V),et.set(V,{rawChild:nt,childProps:U})}let tt=new Set(j),it=h.__children.slice();for(let B of it)if(!tt.has(B)){let nt=t[B];nt?.remove&&nt.remove(),delete t[B],k&&k.push(B)}let St=t.childExtends,Pt=t.tag==="fragment",bt=t.context?.document||globalThis.document,Mt=Pt?null:bt?.createDocumentFragment(),z=new Set;for(let B of j){let nt=et.get(B),U=nt.rawChild,V=t[B];if(V&&V.state){if(U&&typeof U=="object"){let At=V.state,Ge=At.$replace||At.replace,Z=At.$update||At.update;try{if(typeof Ge=="function")Ge.call(At,U);else if(typeof Z=="function"){for(let W in At)if(!(W==="__element"||W==="root"||W==="parent"||W==="update")&&!Object.prototype.hasOwnProperty.call(U,W))try{At[W]=void 0}catch{}Z.call(At,U)}else for(let W in U)At[W]=U[W]}catch(W){if(typeof console<"u"&&console.error){let jt=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] child "${B}" failed to patch at ${jt} (reconcile, keeping its previous data for this pass):`,W?.message||W)}}}A&&A.push(B);continue}let rt=U;(typeof U=="string"||typeof U=="number")&&(rt={value:U,text:U});let Ft=nt.childProps,Lt=Ft?{...Ft,state:rt}:{state:rt},Qi=typeof R=="function"?Cl(Ft):_i(t,"childProps");if(St&&!Lt.ignoreChildExtends)if(Lt.extends){let At=Array.isArray(Lt.extends)?Lt.extends:[Lt.extends],Ge=Array.isArray(St)?St:[St];Lt={...Lt,extends:[...Ge,...At]}}else Lt={...Lt,extends:St};let Ji;try{Ji=re(Ol(Lt,Qi),t,B,e)}catch(At){if(typeof console<"u"&&console.error){let Ge=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] child "${B}" failed to construct at ${Ge} (reconcile, skipping this row):`,At?.message||At)}z.add(B);continue}!Pt&&Ji?.node&&Mt&&Mt.appendChild(Ji.node),w&&w.push(B)}if(!Pt&&Mt&&Mt.childNodes.length&&t.node&&t.node.appendChild(Mt),!Pt&&t.node){let B=null;for(let nt of j){let U=t[nt]?.node;if(!U)continue;let V=B?B.nextSibling:t.node.firstChild;U!==V&&t.node.insertBefore(U,V),B=U}}h.__children=z.size?j.filter(B=>!z.has(B)):j,_&&(w.length||k.length)&&RC(t,{added:w,removed:k,kept:A}),pp(t,!1);return}let $=_?[...h.__children]:null;for(let R of[...h.__children]){let j=t[R];j?.remove&&j.remove(),delete t[R]}h.__children=[],Aw(t,x,e,!1,!0),pp(t,!1),_&&RC(t,{added:[...h.__children],removed:$,kept:[]})},{depth:h.path.length,label:ct(h,"children")});h.__effects.push(S)}let i=Aw(t,n,e,!0,s);if(r!=null&&!(r&&r.__ref)){let g=r;if(typeof g=="string"||typeof g=="number"?g={text:g}:typeof g!="object"&&(g={}),t.childProps&&(g=Lo(t.childProps,g)),o&&!g.ignoreChildExtends)if(g.extends){let m=Array.isArray(g.extends)?g.extends:[g.extends],y=Array.isArray(o)?o:[o];g={...g,extends:[...y,...m]}}else g={...g,extends:o};let h=Tl(_i(t,"childProps"),_i(t,"content"));re(Ol(g,h),t,"content",e)}if(n&&!i)return;let a=t.context?.components||{},c=t.__ref&&t.__ref.__runtimeSource,l=c?{}:null;{let g=Object.keys(t);for(let h=0;h<g.length;h++){let m=g[h];if(!m.endsWith("Extends")||typeof t[m]!="string")continue;let y=m.slice(0,-7);if(!y||y.charCodeAt(0)<65||y.charCodeAt(0)>90)continue;let S={extends:t[m]};delete t[m];for(let b=h+1;b<g.length;b++){let x=g[b],_=x.charCodeAt(0);if(_>=65&&_<=90||Nt.has(x)||typeof t[x]=="function"&&(x.startsWith("on")||x.startsWith(".")))break;let w=t[x];w!==void 0&&(S[x]=w,delete t[x],l&&Ll(c,x)&&(l[y]||(l[y]={}),l[y][x]=c[x]))}t[y]&&typeof t[y]=="object"?t[y]={...S,...t[y]}:t[y]=S}}let f=e?.mountYield===!0||t.yieldChildren===!0,u=Object.keys(t),d=g=>{if(Nt.has(g)||typeof t[g]!="object"||t[g]===null)return;let h=g.charCodeAt(0);if(h<65||h>90)return;let m=t[g];if(m.__ref)return;if(!m.extends&&!m.extend){let S=a[g]||a[`smbls.${g}`];S&&(m={...m,extends:S})}if(t.childProps&&(m=Lo(t.childProps,m)),o&&!m.ignoreChildExtends)if(m.extends){let S=Array.isArray(m.extends)?m.extends:[m.extends],b=Array.isArray(o)?o:[o];m={...m,extends:[...b,...S]}}else m={...m,extends:o};let y=c?Tl(_i(t,"childProps"),Tl(l[g]||null,_i(t,g))):null;re(Ol(m,y),t,g,e)};if(!f){for(let g of u)d(g);return}rw();let p=g=>{for(let h=g;h<u.length;h++)if(d(u[h]),h+1<u.length&&nw()){let m=h+1;sw(()=>p(m));return}};p(0),ow()}function O1(t,e,n){let{node:r}=t;if(!r)return;r.ref=t;let o=e?.tag==="fragment"?e.__ref?.__fragmentAnchor:null;if(o){let i=o.parentNode;if(i){if(n?.position==="before"&&n.node)i.insertBefore(r,n.node);else if(n?.position==="after"&&n.node){let a=n.node.nextSibling;i.insertBefore(r,a||o)}else i.insertBefore(r,o);return}}let s=e?.node||(e?.nodeType?e:null);if(s)if(n?.position==="before"&&n.node)s.insertBefore(r,n.node);else if(n?.position==="after"&&n.node){let i=n.node.nextSibling;i?s.insertBefore(r,i):s.appendChild(r)}else s.appendChild(r)}var Cw=3;function F_(t){return!t||t.__inBeforeUpdate||(t.__beforeUpdateFailCount||0)>=Cw?!1:(t.__inBeforeUpdate=!0,!0)}function Vn(t,e){t&&(t.__inBeforeUpdate=!1,e?(t.__beforeUpdateFailCount=(t.__beforeUpdateFailCount||0)+1,t.__beforeUpdateFailCount===Cw&&typeof console<"u"&&console.error&&console.error(`[DOMQL] onBeforeUpdate failed ${Cw}x in a row on this element \u2014 pausing automatic retries until a future prop/state change re-arms it.`)):t.__beforeUpdateFailCount=0)}function Wt(t,e,n){let r=t.charAt(0).toLowerCase()+t.slice(1);e.context?.plugins?.length&&Ct(r,e,n);let o="on"+t,s=e[o];if(typeof s=="function"){let c=t==="Render"?"__inRender":t==="RenderRouter"?"__inRenderRouter":null;if(c){if(e.__ref[c])return!0;e.__ref[c]=!0}let l=e.context?.designSystem;l&&J(l);let f=!!c;try{let u=s(e,e.state,e.context,n);if(u&&typeof u.then=="function"){let d=e.__ref;return u.catch(p=>{e.context?.plugins?.length&&Ct("error",e,{hook:o,error:p})||console.error(`[DOMQL] Lifecycle "${o}" error:`,p)}).finally(()=>{c&&d&&(d[c]=!1)}),f=!1,!0}if(u===!1)return!1}catch(u){if(e.context?.plugins?.length&&Ct("error",e,{hook:o,error:u})||console.error(`[DOMQL] Lifecycle "${o}" error:`,u),e.context?.strictMode)throw u}finally{l&&X(),f&&e.__ref&&(e.__ref[c]=!1)}}return!0}Kt();var Il="inertOutside",Xj=new Set(["SCRIPT","STYLE","LINK","META","TEMPLATE","NOSCRIPT","BASE","TITLE"]),Zj='a[href], button, input:not([type="hidden"]), select, textarea, summary, [tabindex], [contenteditable]:not([contenteditable="false"])',Qj={attributes:!0,attributeFilter:["inert"]},R1=new WeakMap,P1=new WeakMap,$l=new Set,L1=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);function Do(t){let e=Qt();e&&Dt(null);try{return t()}catch(n){console.error("[smbls] inertOutside:",n)}finally{e&&Dt(e)}}function D1(t){let e=()=>Do(t);typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e)}function Jj(t){if(!t||!t.defaultView||!("activeElement"in t))return null;let e=R1.get(t);if(e)return e;let n=t.defaultView.MutationObserver||globalThis.MutationObserver;return typeof n!="function"?null:(e={doc:t,layers:[],held:new Map,top:null,observer:null},e.observer=new n(r=>Do(()=>$w(e,r))),R1.set(t,e),e)}function N1(t,e){let n=t.element.node;return!!n&&n.nodeType===1&&n.isConnected&&n.ownerDocument===e}function tB(t){let e=t.activeElement;return e&&e!==t.body&&e!==t.documentElement?e:null}var I1=t=>!!(t.closest&&t.closest("[inert]"));function eB(t){let e=t.ownerDocument,n=new Set,r=[];for(let o=t;o!==e.body;o=o.parentNode){let s=o.parentNode;if(!s||s.nodeType!==1||s===e.documentElement)break;r.push(s);for(let i=s.firstElementChild;i;i=i.nextElementSibling)i!==o&&!Xj.has(i.tagName)&&n.add(i)}return{outside:n,parents:r}}function $1(t,e){for(let n=0;n<e.length;n++){let{type:r,target:o}=e[n];r==="attributes"&&t.held.has(o)&&t.held.set(o,!o.hasAttribute("inert"))}}function $w(t,e){let{doc:n,held:r,observer:o}=t;e&&$1(t,e),$1(t,o.takeRecords());let s=t.top,i=[];for(let u of t.layers){let d=N1(u,n);d&&!u.live&&(i.push(u),u.returnFocus=tB(n)),u.live=d}i.length&&(t.layers=t.layers.filter(u=>!i.includes(u)).concat(i));let a=null;for(let u=t.layers.length-1;u>=0&&!a;u--)t.layers[u].live&&(a=t.layers[u]);t.top=a;let{outside:c,parents:l}=a?eB(a.element.node):{outside:new Set,parents:[]};for(let[u,d]of r)c.has(u)||(d&&u.removeAttribute("inert"),r.delete(u));for(let u of c)r.has(u)||r.set(u,!1),u.hasAttribute("inert")||(u.setAttribute("inert",""),r.set(u,!0));o.takeRecords(),o.disconnect();for(let u of l)o.observe(u,{childList:!0});for(let u of r.keys())o.observe(u,Qj);if(t.layers.some(u=>!u.live)?$l.add(t):$l.delete(t),a===s)return;let f=s&&!(s.declared&&s.live)?s:null;if(a&&i.includes(a))f&&f.returnFocus&&(a.returnFocus=f.returnFocus),D1(()=>F1(t,a));else if(f){let u=f.returnFocus;D1(()=>nB(t,f,u))}f&&(f.returnFocus=null)}function F1(t,e){let n=e.element.node;if(t.top!==e||!n||!n.isConnected)return;let r=t.doc,o=r.activeElement;if(o&&n.contains(o))return;let s=new Set,i=(a,c)=>{if(s.has(a)||(s.add(a),a.matches(":disabled")))return!1;let l=c&&a.getAttribute("tabindex");return l&&parseInt(l,10)<0?!1:(a.focus(),r.activeElement===a)};for(let a of n.querySelectorAll("[autofocus]"))if(i(a,!1))return;for(let a of n.querySelectorAll(Zj))if(i(a,!0))return;o&&o!==r.body&&typeof o.blur=="function"&&o.blur()}function nB(t,e,n){if(e.declared&&e.live)return;let r=t.doc,o=r.activeElement,s=e.element.node;(!o||o===r.body||s&&s.contains(o)||I1(o))&&(n&&n.isConnected&&n.ownerDocument===r&&!I1(n)&&(n.focus({preventScroll:!0}),r.activeElement===n)||t.top&&F1(t,t.top))}function Iw(t,e){if(t.declared===e)return;let n=t.manager;if(t.declared=e,t.live=!1,e)n.layers.push(t);else{let r=n.layers.indexOf(t);r!==-1&&n.layers.splice(r,1)}$w(n)}function j1(t){let e=t[Il];if(typeof e=="function")try{e=e(t,t.state,t.context)}catch{e=!1}return!!e}function M1(t){let e=P1.get(t);if(e)return e;let n=t.__ref,r=t.node;if(!n||!r||r.nodeType!==1)return null;let o=Jj(r.ownerDocument);if(!o)return null;e={element:t,manager:o,declared:!1,live:!1,returnFocus:null},P1.set(t,e);let s=K(()=>{let i=j1(t);Do(()=>Iw(e,i))},{depth:n.path.length,label:()=>n.path.join(".")+"::"+Il});return n.__effects||(n.__effects=[]),n.__effects.push(s),n.__eventCleanup||(n.__eventCleanup=[]),n.__eventCleanup.push(()=>Do(()=>Iw(e,!1))),e}function rB(){for(let t of $l){if(!t.doc.defaultView){$l.delete(t);continue}t.layers.some(e=>!e.live&&N1(e,t.doc))&&$w(t)}}var bp={name:Il,create(t){L1(t,Il)&&Do(()=>M1(t))},render(){$l.size&&Do(rB)},update(t){L1(t,Il)&&Do(()=>{let e=M1(t);e&&Iw(e,j1(t))})}};var B1={blue:"#213eb0",green:"#389d34",red:"#e15c55",yellow:"#EDCB38",orange:"#e97c16",transparent:"rgba(0, 0, 0, 0)",black:"black",gray:"#4e4e50",white:"white",title:["gray-168","gray+168"],caption:["gray-68","gray+68"],paragraph:["gray-42","gray+42"],disabled:["gray-26","gray+26"],line:["gray-16","gray+16"],scrim:["black.45","black.55"],scrimSoft:["black.2","black.3"],blueDeep:"#0A5CB8",blueBright:"#47A8FF",accentInk:["blueDeep","blueBright"],greenDeep:"#2A6E28",greenBright:"#7FD07B",successInk:["greenDeep","greenBright"],redDeep:"#A83520",redBright:"#FF8C78",dangerInk:["redDeep","redBright"],orangeDeep:"#94500F",orangeBright:"#F4A45E",warningInk:["orangeDeep","orangeBright"],magentaDeep:"#A100A1",magentaBright:"#FF7AFF",magentaInk:["magentaDeep","magentaBright"]},U1={"gradient-blue-light":`linear-gradient(to right,
|
|
61
|
+
`),u&&(s+=u)}}s&&(o.textContent+=s)}var UC=new Set;function VC(t){if(!Array.isArray(t))return"";let e=[];for(let n=0;n<t.length;n++)typeof t[n]=="string"&&t[n].length&&e.push(t[n]);return e.sort(),e.join("|")}function Ej(t,e,n){let r=VC(n);queueMicrotask(()=>{if(!t.__ref)return;let o;try{o=e(t,t.state,t.context)}catch{return}if(VC(o)===r)return;let s=t.__ref.path?t.__ref.path.join("."):t.key||"?";UC.has(s)||(UC.add(s),console.warn(`[smbls] subscribeTo function at "${s}" resolved to a DIFFERENT key list one microtask after create \u2014 wired [${n.join(", ")||"(none)"}], probed [${Array.isArray(o)?o.join(", "):String(o)}]. subscribeTo's function form is resolved ONCE at element-create time (registerSubscribeToEffects, @symbo.ls/element create.js) \u2014 this element stays wired to the ORIGINAL list for its whole lifetime, so this drift is invisible to the reactive effect and any key only present in the new list will never trigger onUpdate. If the watched key genuinely is not known until later (e.g. a module config that loads after shell boot), route the write through an imperative call instead of subscribeTo \u2014 see functions/moduleOpenBridge.js's moduleOpenPage (workspace repo) for the house pattern.`))})}function Aj(t){let e=t.subscribeTo,n=typeof e=="function",r=e;if(n)try{r=e(t,t.state,t.context)}catch{r=null}if(n&&Q()&&Ej(t,e,Array.isArray(r)?r:[]),!Array.isArray(r)||r.length===0)return;let o=t.__ref;for(let s=0;s<r.length;s++){let i=r[s];if(typeof i!="string"||i.length===0)continue;let a=i.split("."),c=a[0],l=a.slice(1),f={value:!1},u=K(()=>{let d=t.state&&(_t(t.state)?t.state.root:null);if(!d||!_t(d))return;let p=d;p=p[c];for(let h=0;h<l.length&&!(p==null||typeof p!="object");h++)if(_t(p))p=p[l[h]];else break;if(!f.value)return;let g=!1;if(typeof t.onBeforeUpdate=="function"){let h=t.context?.designSystem;h&&J(h);try{if(F_(o)){let m=t.onBeforeUpdate(t,t.state,t.context,{updateBySubscription:!0});m&&typeof m.then=="function"?m.then(()=>Vn(o,!1),y=>{Vn(o,!0),t.context?.plugins?.length&&Ct("error",t,{hook:"onBeforeUpdate",error:y})||console.error("[DOMQL] subscribeTo onBeforeUpdate error:",y)}):(Vn(o,!1),m===!1&&(g=!0))}}catch(m){Vn(o,!0),t.context?.plugins?.length&&Ct("error",t,{hook:"onBeforeUpdate",error:m})||console.error("[DOMQL] subscribeTo onBeforeUpdate error:",m)}finally{h&&X()}}if(!g&&t.node&&o.__effects)for(let h=0;h<o.__effects.length;h++){let m=o.__effects[h];m&&m!==u&&!m._disposed&&!m._isSubscribeToEffect&&typeof m._execute=="function"&&m._execute()}if(!g&&typeof t.onUpdate=="function"){let h=t.context?.designSystem;h&&J(h);try{t.onUpdate(t,t.state,t.context)}catch(m){t.context?.plugins?.length&&Ct("error",t,{hook:"onUpdate",error:m})||console.error("[DOMQL] subscribeTo onUpdate error:",m)}finally{h&&X()}}},{depth:o.path.length,label:ct(o,"subscribeTo("+i+")")});f.value=!0,u._isSubscribeToEffect=!0,o.__effects.push(u)}}function Pw(t,e){return t.charCodeAt(0)===64&&t.length>1&&!t.startsWith("@media")&&!t.startsWith("@keyframes")&&!t.startsWith("@supports")&&!t.startsWith("@container")&&(t==="@dark"||t==="@light"||!e.context?.designSystem?.media?.[t.slice(1)])}function Lw(t,e){if(t.charCodeAt(0)!==64||/^@(media|supports|container|keyframes)\b/.test(t))return t;let n=e.context?.designSystem?.media?.[t.slice(1)];return n?/^@(media|supports|container)\b/.test(n)?n:`@media ${n}`:t}var zC=new Set;function Cj(t,e){let n=e?.__ref?.path?e.__ref.path.join("."):e?.key||"?",r=n+"::"+t;zC.has(r)||(zC.add(r),console.warn(`[smbls/css] "${t}" at ${n} is a CHILD-COMPONENT key nested inside a pseudo/selector block (":hover", "@dark", etc.) \u2014 that is never a valid CSS selector fragment. The rule is DROPPED (not shipped as a dead/never-matching selector). To reveal a child on a parent state, target the child's OWN class from the parent selector instead, e.g. move the declaration onto the child element itself, or use a sibling-selector combinator in a top-level style block.`))}var HC=new Map;function Tj(t){let e=HC.get(t);if(e)return e;e=[];let n=r=>{if(r)for(let o of r)e.push(o.replace(/-([a-z])/g,(s,i)=>i.toUpperCase()))};return n(xl[t]),n(RC[t]),HC.set(t,e),e}function WC(t,e,n){if(vw(t,e)||n&&n.has(e))return!0;let r=Tj(Wn(e));for(let o=0;o<r.length;o++){let s=r[o];if(vw(t,s)||n&&n.has(s))return!0}return!1}function vi(t,e,n,r){let o={},s=new Set,i=(a,c,l)=>{let f=l?new Set(Object.keys(o)):null;if(wt[a]){let u=wt[a](c,e,e.state,e.context);if(u){let d=Array.isArray(u)?u:[u];for(let p of d)p&&Object.assign(o,p)}}else o[a]=c;if(l)for(let u in o)f.has(u)||s.add(u)};for(let a in t){if(!Object.prototype.hasOwnProperty.call(t,a))continue;let c=t[a];if(typeof c=="function"&&(c=c(e,e.state,e.context)),!(c==null||typeof c=="function")){if(typeof c=="object"&&!Array.isArray(c)){if(a==="style"){for(let u in c){let d=c[u];typeof d=="function"&&(d=d(e,e.state,e.context)),!(d==null||typeof d=="function")&&i(u,d,WC(e,u,r))}continue}if(a==="vars"){let u=yp(c,e);if(u)for(let d in u)i(d,u[d],vw(e,d)||!!(r&&r.has(d)));continue}if(Pw(a,e)){let u=vi(c,e,!1,r);Object.keys(u).length&&(o[`[data-theme="${a.slice(1)}"] &`]=u);continue}if(/^[A-Z][A-Za-z0-9]*$/.test(a)){Q()&&Cj(a,e);continue}let l=Lw(a,e),f=vi(c,e,!1,r);Object.keys(f).length&&(o[l]=f);continue}i(a,c,WC(e,a,r))}}if(n)for(let a in o)s.add(a);for(let a of s){let c=o[a];typeof c=="string"&&!c.includes("!important")&&(o[a]=c+" !important")}return o}var Lr=t=>!!t&&typeof t=="object"&&!Array.isArray(t);function _1(t,e){for(let n in e){let r=e[n];t[n]=Lr(r)?_1(Lr(t[n])?t[n]:{},r):r}return t}function Oj(t,e){if(!Lr(e))return;let n;for(let r of t.split(" ")){let o=r?e[r]:null;Lr(o)&&(n=_1(n||{},o))}return n}function Dw(t,e){if(e===void 0&&(e=0),e>8)return!1;if(typeof t=="function")return!0;if(t&&typeof t=="object"&&!Array.isArray(t)){for(let n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&Dw(t[n],e+1))return!0}return!1}function w1(t,e,n){if(!e||typeof e!="object"||Array.isArray(e))return null;if(Pw(t,n)){let s=vi(e,n,!1);return Object.keys(s).length?{cssProp:`[data-theme="${t.slice(1)}"] &`,block:s}:null}let r=Lw(t,n),o=vi(e,n,!1);return Object.keys(o).length?{cssProp:r,block:o}:null}function Rj(t){let e=t.__ref;for(let n of Object.keys(t)){if(!ww(n))continue;let r=t[n];if(!r||typeof r!="object"||Array.isArray(r)||!Dw(r))continue;let o=null,s,i=K(()=>{if(!t.node)return;let a=t.context?.designSystem;a&&J(a);let c,l=!1;try{let f=w1(n,r,t),u=f?Rl(f.block)+"::"+f.cssProp:null;if(u!==null&&u===s)l=!0;else if(s=u,f){let d=Oe({[f.cssProp]:f.block},null,t.context?.cssPrefix);c=d?d.split(" ").filter(Boolean):null}else c=null}finally{a&&X()}if(!(l||!t.node.classList)){if(o)for(let f of o)t.node.classList.remove(f);if(c&&c.length)for(let f of c)t.node.classList.add(f);o=c}},{depth:e.path.length,label:ct(e,"cssBlock("+n+")")});e.__effects.push(i)}}var Pj=()=>!0,Lj=(t,e)=>{let n=t.charAt(0);return(n===":"||n==="@"||n==="&"||n==="[")&&e&&typeof e=="object"&&!Array.isArray(e)?!0:!!wt[t]||!!(Rt&&Rt.has(t))||Po(t)||t==="vars"};function Dj(t,e,n){let r={},o=!1;for(let a in n)Object.prototype.hasOwnProperty.call(n,a)&&(a!=="data"&&a!=="aria"&&(Lj(a,n[a])||Nt.has(a))?r[a]=!0:o=!0);if(!o)return null;let s=N_({[e]:n},t.tag||"div",r,Pj),i=null;for(let a in s)/^on/i.test(a)||(i||(i={}),i[a]=s[a]);return i}function qC(t,e,n,r,o,s){let i=t.node,a=null,c=l=>{(a||(a=[])).push(l)};for(let l in r){let f=e.owners.get(l),u=f===n;if(!s&&f!==void 0&&!u)continue;let d;try{d=r[l](t)}catch(h){Ht(t.__ref,"conditional("+n+")."+l,h),u&&c(l);continue}if(typeof d=="string"&&d.includes("{{")&&(d=Vt.call(t,d,t.state)),u&&i.getAttribute(l)!==e.written.get(l)){c(l);continue}if(d==null||typeof d=="object"||typeof d=="function"){u&&S1(i,e,l);continue}let p=d===!1&&!rn(l)?null:String(ne(l,d));if(c(l),u&&p===e.written.get(l))continue;f===void 0&&e.base.set(l,i.getAttribute(l));let g=To(i,l);p==null?i.removeAttribute(l):i.setAttribute(l,p),Oo(i,g),e.owners.set(l,n),e.written.set(l,p)}o.appliedAttrs=a}function S1(t,e,n){if(t.getAttribute(n)===e.written.get(n)){let r=e.base.get(n),o=To(t,n);r==null?t.removeAttribute(n):t.setAttribute(n,r),Oo(t,o)}e.owners.delete(n),e.base.delete(n),e.written.delete(n)}function Ij(t,e,n,r){let o=r.appliedAttrs;if(r.appliedAttrs=null,!!o)for(let s of o)e.owners.get(s)===n&&S1(t.node,e,s)}function Ew(t){let e=t.__ref&&t.__ref.__conditionalAttrs,n=t.node;if(!(!e||!e.owners.size||!n||!n.getAttribute))for(let r of e.owners.keys()){let o=e.written.get(r),s=n.getAttribute(r);s!==o&&(e.base.set(r,s),o==null?n.removeAttribute(r):n.setAttribute(r,o))}}function $j(t){let e=t.__ref;e.__conditionalRunners=[];let n=null,r=new Map;for(let o of Object.keys(t)){let s=o.charAt(0);if(s!=="."&&s!=="!")continue;let i=o.slice(1);if(!i)continue;if(/[:@\s>~+[\]]/.test(i)){if(typeof console<"u"&&console.warn){let m=i.split(/[:@\s>~+[\]]/)[0];console.warn(`[smbls] conditional \`${o}\` on ${t.key||"?"} will never match \u2014 the whole string after \`${s}\` is read as one prop name. Nest the selector inside instead: \`${s}${m}: { '${i.slice(m.length)}': {...} }\`.`)}continue}let a=t[o];if(!a||typeof a!="object")continue;let c=s==="!",l={lastMatch:!1,appliedKeys:null,appliedClasses:null,appliedAttrs:null},f=Dj(t,o,a);f&&!n&&(n=e.__conditionalAttrs={owners:new Map,base:new Map,written:new Map});let u=new Set;for(let m in a){if(!Object.prototype.hasOwnProperty.call(a,m))continue;let y=m.charAt(0),w=a[m];if(!((y===":"||y==="@"||y==="&"||y==="[")&&w&&typeof w=="object"&&!Array.isArray(w))){if(m==="vars"&&Lr(w)){for(let b of Object.keys(w))b&&u.add(mp(b));continue}u.add(m)}}let d=()=>{let m,y=t[i];if(y===void 0){let x=!!t.state&&i in t.state,k=t.state?t.state[i]:void 0;if(x||k!==void 0)m=k;else{let S=t.context?.cases?.[i];if(S===void 0)return;try{m=typeof S=="function"?S.call(t,t):S}catch(_){m=!1,e.__conditionalError=_,typeof console<"u"&&console.warn&&console.warn(`[smbls] conditional \`${o}\` case fn threw on ${t.key||"?"} \u2014 treating as false:`,_?.message||_)}}}else if(typeof y=="function")try{m=y(t,t.state,t.context)}catch(x){m=!1,e.__conditionalError=x,typeof console<"u"&&console.warn&&console.warn(`[smbls] conditional \`${o}\` predicate threw on ${t.key||"?"} \u2014 treating as false:`,x?.message||x)}else m=y;let w=c?!m:!!m;if(!t.node)return;let b=t.context?.designSystem;if(w===l.lastMatch){if(w&&f&&t.node.setAttribute){b&&J(b);try{qC(t,n,o,f,l,!1)}finally{b&&X()}}return}l.lastMatch=w,b&&J(b);try{if(w){let x={},k={},S=!1;for(let E in a){if(!Object.prototype.hasOwnProperty.call(a,E))continue;let C=a[E],$=E.charAt(0);if(($===":"||$==="@"||$==="&"||$==="[")&&C&&typeof C=="object"&&!Array.isArray(C)){if(Pw(E,t)){let R=vi(C,t,!1,u);Object.keys(R).length&&(k[`[data-theme="${E.slice(1)}"] &`]=R,S=!0)}else{let R=Lw(E,t),j=vi(C,t,!1,u);Object.keys(j).length&&(k[R]=j,S=!0)}continue}let M=typeof C=="function"?C(t,t.state,t.context):C;if(M!=null){if(wt[E]){let R=wt[E](M,t,t.state,t.context);if(R){let j=Array.isArray(R)?R:[R];for(let et of j)et&&Object.assign(x,et)}}else if(Rt&&Rt.has(E))x[E]=M;else if(Po(E))x[E]=M;else if(E==="vars"){let R=yp(M,t);R&&Object.assign(x,R)}}}let _=Object.keys(x);if(_.length){qn(t.node,x);for(let E of _)r.set(E,o);l.appliedKeys=_}else l.appliedKeys=null;if(S){let E=Oe(k,null,t.context?.cssPrefix,{state:!0}),C=E?E.split(" ").filter(Boolean):[];if(C.length&&t.node.classList){for(let $ of C)t.node.classList.add($);l.appliedClasses=C}else l.appliedClasses=null}else if(l.appliedClasses){for(let E of l.appliedClasses)t.node.classList.remove(E);l.appliedClasses=null}f&&t.node.setAttribute&&qC(t,n,o,f,l,!0)}else{if(l.appliedAttrs&&Ij(t,n,o,l),l.appliedKeys){for(let x of l.appliedKeys)r.get(x)===o&&(Po(x)?t.node.style.removeProperty(x):t.node.style[x]="",r.delete(x));l.appliedKeys=null}if(l.appliedClasses){for(let x of l.appliedClasses)t.node.classList.remove(x);l.appliedClasses=null}}}finally{b&&X()}};e.__conditionalRunners.push(d);let p=$t(t,t[i+"Deps"],d),g=K(p,{depth:e.path.length,label:ct(e,"conditional("+o+")")}),h=e.__exec&&e.__exec[i]||t[i];g._sources.size===0&&typeof h=="function"&&Q()&&sj(h)&&console.warn(`[smbls] conditional \`${o}\` on ${t.key||"?"} subscribed to nothing \u2014 its predicate tracked no reactive read on its first run, so no state write will ever re-evaluate it (only a direct element.update() on this element re-runs it). If the predicate guards its state reads (\`in\`, short-circuits, \`?.\`), declare \`${i}Deps: [...]\` (state-key strings or \`(el, s) => \u2026\` selectors) so the subscription is armed unconditionally.`),e.__effects.push(g)}}var mw=new WeakSet,KC=new WeakSet,GC=new WeakSet;function Mj(t){if(GC.has(t))return!1;if(!KC.has(t)){KC.add(t);let e=t.defaultView,n=()=>{GC.add(t)};e&&typeof e.requestAnimationFrame=="function"?e.requestAnimationFrame(n):setTimeout(n,0)}return!0}function Nj(t){let e=t.ownerDocument;!e||mw.has(e)||Mj(e)||(mw.add(e),queueMicrotask(()=>{mw.delete(e);let n=e.body||e.documentElement;n&&n.offsetWidth}))}var yw=new WeakSet,YC=!1;function XC(t){return t.startsWith("[data-theme=")||t.startsWith("@media")&&t.includes("prefers-color-scheme")}function Aw(t,e){let n={...t};for(let r in e){let o=e[r],s=n[r];n[r]=o&&typeof o=="object"&&s&&typeof s=="object"?Aw(s,o):o}return n}function x1(t,e){let n={};for(let r in t){let o=t[r];if(o&&typeof o=="object"){let s=x1(o,e);Object.keys(s).length&&(n[r]=s)}else e.has(r)||(n[r]=o)}return n}function Fj(t,e,n){let r=null;for(let[o,s]of e){let i=Wn(o),a=xl[i];if(a)for(let c=0;c<a.length;c++){let l=a[c].replace(/-([a-z])/g,(g,h)=>h.toUpperCase()),f=t[l]!=null?e.get(l):void 0,u=n&&n.get(a[c]),d=f!==void 0&&f>s&&uw(a[c],t[l],i),p=!d&&u!==void 0&&u>s&&uw(a[c],void 0,i);if(d||p){d&&delete t[o],r||(r=new Set),r.add(o);break}}}return r}function k1(t){let{node:e}=t;if(!e)return;if(YC||(YC=!0,Oe({display:"none"})),yw.has(t)){console.error("[applyCssInProps] re-entry detected for element",t.key,"prop path:",t.__ref?.path);return}yw.add(t);let n=t.context?.designSystem;n&&J(n),ep();try{let r={},o=!1,s=[],i=null,a=null,c=null,l=t.__ref&&t.__ref.__mergeLayer,f,u=null,d=null,p=(b,x)=>{if(x&&typeof x=="object"&&XC(b)){a||(a={});let k=a[b];k&&(x=Aw(k,x)),a[b]=x}else(x===null||typeof x!="object")&&(c||(c=new Set),c.add(b),f!==void 0&&(u||(u=new Map),u.set(b,f)));r[b]=x};if(Object.prototype.hasOwnProperty.call(t,"theme")&&typeof t.theme!="function"&&wt.theme){let b=wt.theme(t.theme,t,t.state,t.context);if(b){let x=k=>{for(let S in k){let _=k[S];_&&typeof _=="object"&&XC(S)&&(i||(i={}),i[S]=_),r[S]=_}};if(Array.isArray(b))for(let k of b)k&&x(k);else x(b);o=!0}}let g=(b,x)=>{if(b==="vars"){let k=yp(x);if(k){for(let S in k)p(S,k[S]);o=!0}return}if(wt[b]){let k=wt[b](x,t,t.state,t.context);if(k){if(Array.isArray(k)){for(let S of k)if(S)for(let _ in S)p(_,S[_])}else for(let S in k)p(S,k[S]);o=!0}}else if(Rt&&Rt.has(b))x!=null&&typeof x!="object"&&(p(b,x),o=!0);else if(b.charCodeAt(0)===45)x!=null&&typeof x!="object"&&(p(b,x),o=!0);else if((b.charAt(0)==="&"||b.charAt(0)==="@"||b.charAt(0)===":"||b.charAt(0)==="[")&&x&&typeof x=="object"&&!Array.isArray(x)){if(Dw(x))return;let k=w1(b,x,t);k&&(p(k.cssProp,k.block),o=!0)}};if(typeof t.class=="string"){let b=Oj(t.class,t.context?.designSystem?.class);if(b)for(let x in b)g(x,b[x])}let h=c?new Set(c):null,m=t.tag||"div";for(let b of Object.keys(t)){if(typeof t[b]=="function"){let k=l&&l.get(b);k!==void 0&&Pr(m,b)&&(d||(d=new Map),d.set(Wn(b),k));continue}if(f=l?l.get(b):void 0,b==="vars"){g(b,t[b]);continue}if(Nt.has(b)||b==="theme")continue;let x=b.charCodeAt(0);x>=65&&x<=90||Hn(b)||fp(m,b)||g(b,t[b])}f=void 0;let y=u?Fj(r,u,d):null;if(i)for(let b in i){let x=c?x1(i[b],c):i[b];a&&a[b]&&(x=Aw(x,a[b])),Object.keys(x).length?r[b]=x:delete r[b]}if(xj(t,r,c,y?new Set([...h||[],...y]):h),o){r.display&&String(r.display).includes("!important")&&(e.style.setProperty("display",String(r.display).replace(/\s*!important\s*$/,""),"important"),delete r.display);let b=t.display!=null&&typeof t.display!="function"?t.display:t.hide===!0||t.show===!1?"none":null;typeof b=="string"&&b!==""&&r.display&&r.display!==b&&(r.display=b);let x=Oe(r,null,t.context?.cssPrefix);if(s=x?x.split(" ").filter(Boolean):[],x&&e.classList){let k=s,S=!1;for(let _ of k)e.classList.add(_),S||(_.charCodeAt(0)===95&&_.charCodeAt(1)===99||_.charCodeAt(0)===95&&_.indexOf("_c",1)!==-1)&&(S=!0);S&&Nj(e)}}let w=t.__ref;if(w){let b=w.__staticCssClasses;if(b&&e.classList){let x=new Set(s);for(let k of b)x.has(k)||e.classList.remove(k)}w.__staticCssClasses=s}kj(t)}finally{np(),n&&X(),yw.delete(t)}}var YA=t=>!!wt[t]||!!(Rt&&Rt.has(t))||typeof t=="string"&&t.charCodeAt(0)===45;function XA(t){t&&t.node&&k1(t)}function v1(t){let{node:e}=t;if(!e||!e.setAttribute)return;if(t.aria&&typeof t.aria=="object")for(let o in t.aria){let s=t.aria[o];if(typeof s=="function"||typeof s=="object"||s==null||typeof s=="string"&&s.includes("{{"))continue;let i="aria-"+o.replace(/[A-Z]/g,a=>"-"+a.toLowerCase());e.setAttribute(i,ne(i,s))}let n=M_(t);for(let o in n){let s=n[o];s!=null&&s!==!1&&typeof s!="function"&&typeof s!="object"&&e.setAttribute(o,s===!0?"":s)}let r=t.tag||"div";for(let o of Object.keys(t)){if(typeof t[o]=="function"||Nt.has(o)||o==="on"||n[o]!==void 0)continue;let s=o.charCodeAt(0);if(!(s>=65&&s<=90)&&!Hn(o)&&!Pr(r,o)&&He(r,o)){let i=t[o];if(i==null)continue;if(typeof i=="string"&&i.includes("{{")){if(!Co[o])continue;i=Vt.call(t,i,t.state)}if(i==null||typeof i=="function"||typeof i=="object"||i===!1&&!rn(Un(o)||o))continue;let a=Un(o)||o;e.setAttribute(a,ne(a,i))}}}function ZA(t,e){let{node:n}=t;if(!n||!n.setAttribute)return;let r=e.charCodeAt(0);if(r>=65&&r<=90||Hn(e))return;let o=t.tag||"div";if(Pr(o,e)||!He(o,e))return;let s=Un(e)||e,i=s.toLowerCase(),a=t.__ref&&t.__ref.__effects,c=!1;if(a)for(let d=0;d<a.length;d++){let p=a[d];p&&p._attrName===i&&!p._disposed&&typeof p._execute=="function"&&(c=!0,p._execute())}if(c)return;let l=t[e],f=Co[e];if(f&&l!=null){let d=f(t);d!==void 0&&(l=d)}typeof l=="string"&&l.includes("{{")&&(l=Vt.call(t,l,t.state));let u=To(n,s);l==null||l===!1&&!rn(s)?n.removeAttribute(s):typeof l!="function"&&typeof l!="object"&&n.setAttribute(s,ne(s,l)),Oo(n,u)}function jj(t,e){let n=t.node,r=t.__ref,o=r.__autoGrow;if(!e){if(o&&o.active){try{n.removeEventListener("input",o.resize)}catch{}QC(o),Ro.delete(t),n.style.height="",o.appliedMax!=null&&n.style.maxHeight===o.appliedMax&&(n.style.maxHeight=""),t1(n,o,!1),o.active=!1,o.appliedMax=null,o.lastMeasure=0}return}o||(o=r.__autoGrow={active:!1,appliedMax:null,lastMeasure:0,lastWidth:null,watch:null,awaitingLayout:!1,appliedScroll:!1,fontsHooked:!1,attachAttempts:0,firstAttemptAt:null,resize:()=>{if(!n.isConnected){Dl(t,!0);return}if(!(n.scrollHeight>0)){o.awaitingLayout=!0,ZC(t,o);return}o.awaitingLayout=!1;let i=Vj(n),a=zj(i),c=n.style.height;n.style.height="0px",a&&bw(n);let l=n.scrollHeight;if(!(l>0)){n.style.height=c,a&&bw(n);return}let f=Hj(n,i),u=f!=null&&l<f?f:l,d=Kj(i),p=d!=null&&u>d;n.style.height=qj(p?d:u,i)+"px",a&&bw(n),t1(n,o,p),o.lastMeasure=l,o.lastWidth=n.clientWidth,ZC(t,o)}},r.__eventCleanup||(r.__eventCleanup=[]),r.__eventCleanup.push(()=>{try{n.removeEventListener("input",o.resize)}catch{}QC(o),Ro.delete(t)})),o.active||(n.addEventListener("input",o.resize),o.active=!0,Uj(t,o));let s=typeof e=="object"&&e.max!=null?String(e.max):null;s!==o.appliedMax&&(s==null?o.appliedMax!=null&&n.style.maxHeight===o.appliedMax&&(n.style.maxHeight=""):n.style.maxHeight=s,o.appliedMax=s),o.resize()}function Dl(t,e){let n=t.__ref?.__autoGrow;n&&(e&&(n.attachAttempts=0,n.firstAttemptAt=null),Ro.add(t),hp())}function Bj(){let t=Array.from(Ro);Ro.clear();for(let e=0;e<t.length;e++){let n=t[e],r=n.node,o=n.__ref?.__autoGrow;if(!(!r||!o||!o.active)){if(!r.isConnected){o.firstAttemptAt==null&&(o.firstAttemptAt=ki()),o.attachAttempts+=1,o.attachAttempts<=s1&&ki()-o.firstAttemptAt<i1&&(Ro.add(n),hp());continue}o.attachAttempts=0,o.firstAttemptAt=null,o.resize()}}}function ZC(t,e){if(e.watch)return;let n=t.node;if(!n)return;let r=n.ownerDocument&&n.ownerDocument.defaultView,o=r&&r.ResizeObserver||(typeof ResizeObserver=="function"?ResizeObserver:null);if(typeof o!="function")return;let s=()=>{if(!e.active||!n.isConnected||!(n.scrollHeight>0))return;if(e.awaitingLayout){e.awaitingLayout=!1,Dl(t,!0);return}let a=n.clientWidth;e.lastWidth!=null&&Math.abs(a-e.lastWidth)<.5||(e.lastWidth=a,Dl(t,!0))},i;try{i=new o(s),i.observe(n)}catch{return}e.watch=i}function QC(t){let e=t.watch;if(e){t.watch=null;try{e.disconnect()}catch{}}}function Uj(t,e){if(e.fontsHooked)return;e.fontsHooked=!0;let n=t.node&&t.node.ownerDocument,r=n&&n.fonts&&n.fonts.ready;!r||typeof r.then!="function"||r.then(()=>{e.active&&t.node&&Dl(t,!0)},()=>{})}function Vj(t){let e=t.ownerDocument&&t.ownerDocument.defaultView;try{return e&&e.getComputedStyle?e.getComputedStyle(t):null}catch{return null}}var Lo=t=>typeof t=="string"&&/^\s*-?\d*\.?\d+px\s*$/.test(t)?parseFloat(t):null,Iw=t=>(Lo(t.paddingTop)||0)+(Lo(t.paddingBottom)||0),E1=t=>(Lo(t.borderTopWidth)||0)+(Lo(t.borderBottomWidth)||0);function zj(t){if(!t)return!1;let e=String(t.transitionProperty||"").split(","),n=String(t.transitionDuration||"0s").split(",");for(let r=0;r<e.length;r++){let o=e[r].trim();if(!(o!=="all"&&o!=="height")&&parseFloat(n[r%n.length])>0)return!0}return!1}function bw(t){if(typeof t.getAnimations!="function")return;let e;try{e=t.getAnimations()}catch{return}for(let n=0;n<e.length;n++){let r=e[n];if(r&&r.transitionProperty==="height")try{r.cancel()}catch{}}}function Hj(t,e){if(!e||!t.hasAttribute||!t.hasAttribute("rows"))return null;let n=parseInt(t.getAttribute("rows"),10);if(!(n>0))return null;let r=Lo(e.lineHeight)||Wj(t,e);return r>0?n*r+Iw(e):null}var kl=["fontStyle","fontVariant","fontWeight","fontStretch","fontSize","fontFamily","lineHeight","letterSpacing"],JC=new WeakMap;function Wj(t,e){let n=t.ownerDocument,r=n&&(n.body||n.documentElement);if(!r||!n.createElement)return null;let o=JC.get(n);o||(o=new Map,JC.set(n,o));let s=kl.map(l=>e[l]||"").join("|");if(o.has(s))return o.get(s);let i=n.createElement("textarea");i.rows=1,i.setAttribute("aria-hidden","true"),i.tabIndex=-1;let a=i.style;a.position="absolute",a.visibility="hidden",a.top="0",a.left="-9999px",a.height="auto",a.minHeight="0",a.maxHeight="none",a.padding="0",a.border="0",a.boxSizing="content-box",a.overflow="hidden";for(let l=0;l<kl.length;l++)e[kl[l]]&&(a[kl[l]]=e[kl[l]]);let c=0;try{r.appendChild(i),c=i.clientHeight}catch{c=0}finally{i.parentNode&&i.parentNode.removeChild(i)}return c>0?(o.set(s,c),c):null}function qj(t,e){return e?e.boxSizing==="border-box"?t+E1(e):e.boxSizing==="content-box"?Math.max(0,t-Iw(e)):t:t}function Kj(t){if(!t)return null;let e=Lo(t.maxHeight);if(e==null||!(e>0))return null;let n=Iw(t),r=E1(t),o=t.boxSizing==="border-box"?e-r:e+n,s=Lo(t.lineHeight);if(!(s>0))return o;let i=Math.floor((o-n)/s+1e-6);return i>=1?i*s+n:o}function t1(t,e,n){n?e.appliedScroll||(t.style.overflowY="auto",e.appliedScroll=!0):e.appliedScroll&&(t.style.overflowY==="auto"&&(t.style.overflowY=""),e.appliedScroll=!1)}var e1=["srcObject","muted"],Gj=(t,e)=>t==="muted"?e===!0||e===""||e==="true"||e==="muted":e??null;function Yj(t){let e=t.node,n=t.__ref;if(!(!e||!n))for(let r=0;r<e1.length;r++){let o=e1[r],s=t[o];if(s===void 0||!(o in e))continue;let i=a=>{let c=Gj(o,a);if(e[o]!==c)try{e[o]=c}catch(l){Ht(n,o,l)}};if(typeof s=="function"){let a=$t(t,t[o+"Deps"],s),c=K(()=>{try{i(a(t,t.state,t.context))}catch(l){Ht(n,o,l)}},{depth:n.path.length,label:ct(n,o)});n.__effects.push(c),n.__exec[o]=s}else i(s);o==="srcObject"&&(n.__releaseMedia=()=>{try{e.srcObject!=null&&(e.srcObject=null)}catch{}})}}function A1(t){if(!t.autoGrow)return;let e=t.node;if(!e||e.tagName!=="TEXTAREA")return;let n=t.__ref,r=t.autoGrow,o=typeof r=="function"?$t(t,t.autoGrowDeps,r):null,s=K(()=>{let i=t.autoGrow,a=i;if(typeof i=="function")try{a=(i===r&&o?o:i)(t,t.state,t.context)}catch{a=null}jj(t,a)},{depth:n.path.length,label:ct(n,"autoGrow")});n.__effects||(n.__effects=[]),n.__effects.push(s),o&&(n.__exec.autoGrow=r)}var C1=new Set(["onSwipe","onSwipeLeft","onSwipeRight","onSwipeUp","onSwipeDown"]);function T1(t,e){for(let n of Object.keys(t)){if(!Hn(n)||C1.has(n))continue;let r=Zd(n);if(r){Qd(r,t,t[n]);continue}let o=t[n],s=null;if(o&&typeof o=="object"&&!Array.isArray(o)&&(s=o,o=s.handler),typeof o=="string"&&/^[A-Za-z_$][\w$]*$/.test(o)){let a=o;o=function(l){return t.call(a,l)}}if(typeof o!="function")continue;let i=KF(n);Tr.has(i)||ci(GF(i),t,o,s)}Xj(t)}function Xj(t){let e=t.node;if(!e||!e.addEventListener)return;let n={},r=!1;for(let d of C1){let p=t[d];typeof p=="function"&&(n[d]=p,r=!0)}if(!r)return;let o=typeof t.swipeThreshold=="number"?t.swipeThreshold:40,s=typeof t.swipeMaxDuration=="number"?t.swipeMaxDuration:600,i=0,a=0,c=0,l=!1,f=d=>{let p=d.touches&&d.touches[0]||d.changedTouches&&d.changedTouches[0];p&&(i=p.clientX,a=p.clientY,c=Date.now(),l=!0)},u=d=>{if(!l)return;l=!1;let p=d.changedTouches&&d.changedTouches[0]||d.touches&&d.touches[0];if(!p)return;let g=p.clientX-i,h=p.clientY-a,m=Date.now()-c;if(m>s)return;let y=Math.abs(g),w=Math.abs(h);if(Math.max(y,w)<o)return;let b;if(y>w*1.2)b=g<0?"left":"right";else if(w>y*1.2)b=h<0?"up":"down";else return;let x="onSwipe"+b.charAt(0).toUpperCase()+b.slice(1),k=n[x],S=n.onSwipe;k&&k.call(t,d,t,t.state,t.context),S&&S.call(t,{direction:b,dx:g,dy:h,dt:m,event:d},t,t.state,t.context)};e.addEventListener("touchstart",f,{passive:!0}),e.addEventListener("touchend",u,{passive:!0}),t.__ref.__eventCleanup||(t.__ref.__eventCleanup=[]),t.__ref.__eventCleanup.push(()=>{try{e.removeEventListener("touchstart",f)}catch{}try{e.removeEventListener("touchend",u)}catch{}})}function Do(t,e){let n={...t};for(let r in e){let o=n[r],s=e[r];o&&s&&typeof o=="object"&&typeof s=="object"&&!Array.isArray(o)&&!Array.isArray(s)&&typeof o!="function"&&typeof s!="function"?n[r]=Do(o,s):n[r]=s}return n}function Cw(t,e,n,r,o){if(!e||!t.node)return;let s=t.childExtends,i=_i(t,"childProps");if(Array.isArray(e)){let a=t.tag==="fragment",c=t.context?.document||globalThis.document,l=a?null:c?.createDocumentFragment();if(!a&&!l)return;let f=t.childProps,u=t.childrenAs,d=w=>{let b=e[w],x=b;(typeof b=="string"||typeof b=="number")&&(b={text:b});let k=f;if(typeof f=="function")try{k=f(t,b)}catch{k=null}let S=typeof f=="function"?Cl(k):i;if(o&&u!=="state"&&(S=Tl(S,Cl(x))),u==="state"){let E=x;(typeof x=="string"||typeof x=="number")&&(E={value:x,text:x}),b=k?{...k,state:E}:{state:E}}else k&&(b=Do(k,b));if(s&&!b.ignoreChildExtends)if(b.extends){let E=Array.isArray(b.extends)?b.extends:[b.extends],C=Array.isArray(s)?s:[s];b={...b,extends:[...C,...E]}}else b={...b,extends:s};let _=a1(b?.key,x,w,t);try{return re(Ol(b,S),t,_,n)}catch(E){if(typeof console<"u"&&console.error){let C=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] child "${_}" failed to construct at ${C} (initial render, skipping this row):`,E?.message||E)}return null}},p=t.__ref;if(!(r===!0&&!a&&!!p&&(n?.mountYield===!0||t.yieldChildren===!0))){for(let w=0;w<e.length;w++){let b=d(w);!a&&b?.node&&l.appendChild(b.node)}return a||t.node.appendChild(l),!0}let h=p.__childrenChunkGen=(p.__childrenChunkGen||0)+1;rw();let m=null,y=w=>{if(p.__disposed||p.__childrenChunkGen!==h){m&&m.parentNode&&m.remove();return}for(let b=w;b<e.length;b++){let x=d(b);if(x?.node&&(m?t.node.insertBefore(x.node,m):l.appendChild(x.node)),b+1<e.length&&nw()){m||(m=c.createComment("smbls-mount"),l.appendChild(m),t.node.appendChild(l));let k=b+1;sw(()=>y(k));return}}m?(m.remove(),t.node.tagName==="SELECT"&&pp(t,!0)):t.node.appendChild(l)};return y(0),ow(),!0}if(typeof e=="string"){let a=l1(e,t);if(Array.isArray(a))return Cw(t,a,n,r,!0)}if(typeof e=="object")for(let a in e){if(Nt.has(a))continue;let c=e[a];if(c==null||c===!1)continue;let l=o?Tl(i,Cl(c)):i;if((typeof c=="string"||typeof c=="number")&&(c={text:c}),t.childProps&&(c=Do(t.childProps,c)),s&&!c.ignoreChildExtends)if(c.extends){let f=Array.isArray(c.extends)?c.extends:[c.extends],u=Array.isArray(s)?s:[s];c={...c,extends:[...u,...f]}}else c={...c,extends:s};re(Ol(c,l),t,gp(t,a),n)}}function pp(t,e){let n=t.node;if(!n||n.tagName!=="SELECT")return;let r=n.options;if(!r||!r.length)return;let o=t.__ref,s=o&&o.__exec&&o.__exec.value,i=typeof s=="function",a=t.value!=null&&typeof t.value!="function";if(i||a){let f;if(i)try{f=s(t,t.state,t.context)}catch{return}else f=t.value,typeof f=="string"&&f.includes("{{")&&(f=Vt.call(t,f,t.state));let u=f==null?"":String(f);n.value!==u&&(n.value=u);return}let c=e||!(o&&o.__selectSynced);if(o&&(o.__selectSynced=!0),!c)return;let l=-1;for(let f=0;f<r.length;f++)r[f].defaultSelected&&(l=f);l>=0&&n.selectedIndex!==l&&(n.selectedIndex=l)}function O1(t,e){let{children:n,content:r}=t,o=t.childExtends,s=typeof n=="function"||u1(t,"children");if(typeof n=="function"){let g=n;try{n=g(t,t.state,t.context)}catch(b){if(n=void 0,typeof console<"u"&&console.error){let x=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] \`children:\` factory threw at ${x} (initial run, treating as empty):`,b?.message||b)}}NC(t,n),t.children=n;let h=t.__ref,m=!1,y=$t(t,t.childrenDeps,g),w=K(()=>{let b=m;m=!0;let x;try{x=y(t,t.state,t.context)}catch(R){if(typeof console<"u"&&console.error){let j=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] \`children:\` factory threw at ${j}${b?"":" (initial tracking run)"}:`,R?.message||R)}return}if(!b||x===t.children)return;NC(t,x),t.children=x,h.__childrenChunkGen!=null&&h.__childrenChunkGen++;let k=typeof t.onContentUpdate=="function",S=k?[]:null,_=k?[]:null,E=k?[]:null;if(Array.isArray(x)&&t.childrenAs==="state"){let R=t.childProps,j=[],et=new Map;for(let B=0;B<x.length;B++){let nt=x[B],U=R;if(typeof R=="function")try{U=R(t,nt)}catch{U=null}let V=a1(U&&U.key,nt,B,t);j.push(V),et.set(V,{rawChild:nt,childProps:U})}let tt=new Set(j),it=h.__children.slice();for(let B of it)if(!tt.has(B)){let nt=t[B];nt?.remove&&nt.remove(),delete t[B],_&&_.push(B)}let St=t.childExtends,Pt=t.tag==="fragment",bt=t.context?.document||globalThis.document,Mt=Pt?null:bt?.createDocumentFragment(),z=new Set;for(let B of j){let nt=et.get(B),U=nt.rawChild,V=t[B];if(V&&V.state){if(U&&typeof U=="object"){let At=V.state,Ge=At.$replace||At.replace,Z=At.$update||At.update;try{if(typeof Ge=="function")Ge.call(At,U);else if(typeof Z=="function"){for(let W in At)if(!(W==="__element"||W==="root"||W==="parent"||W==="update")&&!Object.prototype.hasOwnProperty.call(U,W))try{At[W]=void 0}catch{}Z.call(At,U)}else for(let W in U)At[W]=U[W]}catch(W){if(typeof console<"u"&&console.error){let jt=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] child "${B}" failed to patch at ${jt} (reconcile, keeping its previous data for this pass):`,W?.message||W)}}}E&&E.push(B);continue}let rt=U;(typeof U=="string"||typeof U=="number")&&(rt={value:U,text:U});let Ft=nt.childProps,Lt=Ft?{...Ft,state:rt}:{state:rt},Qi=typeof R=="function"?Cl(Ft):_i(t,"childProps");if(St&&!Lt.ignoreChildExtends)if(Lt.extends){let At=Array.isArray(Lt.extends)?Lt.extends:[Lt.extends],Ge=Array.isArray(St)?St:[St];Lt={...Lt,extends:[...Ge,...At]}}else Lt={...Lt,extends:St};let Ji;try{Ji=re(Ol(Lt,Qi),t,B,e)}catch(At){if(typeof console<"u"&&console.error){let Ge=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] child "${B}" failed to construct at ${Ge} (reconcile, skipping this row):`,At?.message||At)}z.add(B);continue}!Pt&&Ji?.node&&Mt&&Mt.appendChild(Ji.node),S&&S.push(B)}if(!Pt&&Mt&&Mt.childNodes.length&&t.node&&t.node.appendChild(Mt),!Pt&&t.node){let B=null;for(let nt of j){let U=t[nt]?.node;if(!U)continue;let V=B?B.nextSibling:t.node.firstChild;U!==V&&t.node.insertBefore(U,V),B=U}}h.__children=z.size?j.filter(B=>!z.has(B)):j,k&&(S.length||_.length)&&PC(t,{added:S,removed:_,kept:E}),pp(t,!1);return}let M=k?[...h.__children]:null;for(let R of[...h.__children]){let j=t[R];j?.remove&&j.remove(),delete t[R]}h.__children=[],Cw(t,x,e,!1,!0),pp(t,!1),k&&PC(t,{added:[...h.__children],removed:M,kept:[]})},{depth:h.path.length,label:ct(h,"children")});h.__effects.push(w)}let i=Cw(t,n,e,!0,s);if(r!=null&&!(r&&r.__ref)){let g=r;if(typeof g=="string"||typeof g=="number"?g={text:g}:typeof g!="object"&&(g={}),t.childProps&&(g=Do(t.childProps,g)),o&&!g.ignoreChildExtends)if(g.extends){let m=Array.isArray(g.extends)?g.extends:[g.extends],y=Array.isArray(o)?o:[o];g={...g,extends:[...y,...m]}}else g={...g,extends:o};let h=Tl(_i(t,"childProps"),_i(t,"content"));re(Ol(g,h),t,"content",e)}if(n&&!i)return;let a=t.context?.components||{},c=t.__ref&&t.__ref.__runtimeSource,l=c?{}:null;{let g=Object.keys(t);for(let h=0;h<g.length;h++){let m=g[h];if(!m.endsWith("Extends")||typeof t[m]!="string")continue;let y=m.slice(0,-7);if(!y||y.charCodeAt(0)<65||y.charCodeAt(0)>90)continue;let w={extends:t[m]};delete t[m];for(let b=h+1;b<g.length;b++){let x=g[b],k=x.charCodeAt(0);if(k>=65&&k<=90||Nt.has(x)||typeof t[x]=="function"&&(x.startsWith("on")||x.startsWith(".")))break;let S=t[x];S!==void 0&&(w[x]=S,delete t[x],l&&Ll(c,x)&&(l[y]||(l[y]={}),l[y][x]=c[x]))}t[y]&&typeof t[y]=="object"?t[y]={...w,...t[y]}:t[y]=w}}let f=e?.mountYield===!0||t.yieldChildren===!0,u=Object.keys(t),d=g=>{if(Nt.has(g)||typeof t[g]!="object"||t[g]===null)return;let h=g.charCodeAt(0);if(h<65||h>90)return;let m=t[g];if(m.__ref)return;if(!m.extends&&!m.extend){let w=a[g]||a[`smbls.${g}`];w&&(m={...m,extends:w})}if(t.childProps&&(m=Do(t.childProps,m)),o&&!m.ignoreChildExtends)if(m.extends){let w=Array.isArray(m.extends)?m.extends:[m.extends],b=Array.isArray(o)?o:[o];m={...m,extends:[...b,...w]}}else m={...m,extends:o};let y=c?Tl(_i(t,"childProps"),Tl(l[g]||null,_i(t,g))):null;re(Ol(m,y),t,g,e)};if(!f){for(let g of u)d(g);return}rw();let p=g=>{for(let h=g;h<u.length;h++)if(d(u[h]),h+1<u.length&&nw()){let m=h+1;sw(()=>p(m));return}};p(0),ow()}function R1(t,e,n){let{node:r}=t;if(!r)return;r.ref=t;let o=e?.tag==="fragment"?e.__ref?.__fragmentAnchor:null;if(o){let i=o.parentNode;if(i){if(n?.position==="before"&&n.node)i.insertBefore(r,n.node);else if(n?.position==="after"&&n.node){let a=n.node.nextSibling;i.insertBefore(r,a||o)}else i.insertBefore(r,o);return}}let s=e?.node||(e?.nodeType?e:null);if(s)if(n?.position==="before"&&n.node)s.insertBefore(r,n.node);else if(n?.position==="after"&&n.node){let i=n.node.nextSibling;i?s.insertBefore(r,i):s.appendChild(r)}else s.appendChild(r)}var Tw=3;function F_(t){return!t||t.__inBeforeUpdate||(t.__beforeUpdateFailCount||0)>=Tw?!1:(t.__inBeforeUpdate=!0,!0)}function Vn(t,e){t&&(t.__inBeforeUpdate=!1,e?(t.__beforeUpdateFailCount=(t.__beforeUpdateFailCount||0)+1,t.__beforeUpdateFailCount===Tw&&typeof console<"u"&&console.error&&console.error(`[DOMQL] onBeforeUpdate failed ${Tw}x in a row on this element \u2014 pausing automatic retries until a future prop/state change re-arms it.`)):t.__beforeUpdateFailCount=0)}function Wt(t,e,n){let r=t.charAt(0).toLowerCase()+t.slice(1);e.context?.plugins?.length&&Ct(r,e,n);let o="on"+t,s=e[o];if(typeof s=="function"){let c=t==="Render"?"__inRender":t==="RenderRouter"?"__inRenderRouter":null;if(c){if(e.__ref[c])return!0;e.__ref[c]=!0}let l=e.context?.designSystem;l&&J(l);let f=!!c;try{let u=s(e,e.state,e.context,n);if(u&&typeof u.then=="function"){let d=e.__ref;return u.catch(p=>{e.context?.plugins?.length&&Ct("error",e,{hook:o,error:p})||console.error(`[DOMQL] Lifecycle "${o}" error:`,p)}).finally(()=>{c&&d&&(d[c]=!1)}),f=!1,!0}if(u===!1)return!1}catch(u){if(e.context?.plugins?.length&&Ct("error",e,{hook:o,error:u})||console.error(`[DOMQL] Lifecycle "${o}" error:`,u),e.context?.strictMode)throw u}finally{l&&X(),f&&e.__ref&&(e.__ref[c]=!1)}}return!0}Kt();var Il="inertOutside",Zj=new Set(["SCRIPT","STYLE","LINK","META","TEMPLATE","NOSCRIPT","BASE","TITLE"]),Qj='a[href], button, input:not([type="hidden"]), select, textarea, summary, [tabindex], [contenteditable]:not([contenteditable="false"])',Jj={attributes:!0,attributeFilter:["inert"]},P1=new WeakMap,L1=new WeakMap,$l=new Set,D1=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);function Io(t){let e=Qt();e&&Dt(null);try{return t()}catch(n){console.error("[smbls] inertOutside:",n)}finally{e&&Dt(e)}}function I1(t){let e=()=>Io(t);typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e)}function tB(t){if(!t||!t.defaultView||!("activeElement"in t))return null;let e=P1.get(t);if(e)return e;let n=t.defaultView.MutationObserver||globalThis.MutationObserver;return typeof n!="function"?null:(e={doc:t,layers:[],held:new Map,top:null,observer:null},e.observer=new n(r=>Io(()=>Mw(e,r))),P1.set(t,e),e)}function F1(t,e){let n=t.element.node;return!!n&&n.nodeType===1&&n.isConnected&&n.ownerDocument===e}function eB(t){let e=t.activeElement;return e&&e!==t.body&&e!==t.documentElement?e:null}var $1=t=>!!(t.closest&&t.closest("[inert]"));function nB(t){let e=t.ownerDocument,n=new Set,r=[];for(let o=t;o!==e.body;o=o.parentNode){let s=o.parentNode;if(!s||s.nodeType!==1||s===e.documentElement)break;r.push(s);for(let i=s.firstElementChild;i;i=i.nextElementSibling)i!==o&&!Zj.has(i.tagName)&&n.add(i)}return{outside:n,parents:r}}function M1(t,e){for(let n=0;n<e.length;n++){let{type:r,target:o}=e[n];r==="attributes"&&t.held.has(o)&&t.held.set(o,!o.hasAttribute("inert"))}}function Mw(t,e){let{doc:n,held:r,observer:o}=t;e&&M1(t,e),M1(t,o.takeRecords());let s=t.top,i=[];for(let u of t.layers){let d=F1(u,n);d&&!u.live&&(i.push(u),u.returnFocus=eB(n)),u.live=d}i.length&&(t.layers=t.layers.filter(u=>!i.includes(u)).concat(i));let a=null;for(let u=t.layers.length-1;u>=0&&!a;u--)t.layers[u].live&&(a=t.layers[u]);t.top=a;let{outside:c,parents:l}=a?nB(a.element.node):{outside:new Set,parents:[]};for(let[u,d]of r)c.has(u)||(d&&u.removeAttribute("inert"),r.delete(u));for(let u of c)r.has(u)||r.set(u,!1),u.hasAttribute("inert")||(u.setAttribute("inert",""),r.set(u,!0));o.takeRecords(),o.disconnect();for(let u of l)o.observe(u,{childList:!0});for(let u of r.keys())o.observe(u,Jj);if(t.layers.some(u=>!u.live)?$l.add(t):$l.delete(t),a===s)return;let f=s&&!(s.declared&&s.live)?s:null;if(a&&i.includes(a))f&&f.returnFocus&&(a.returnFocus=f.returnFocus),I1(()=>j1(t,a));else if(f){let u=f.returnFocus;I1(()=>rB(t,f,u))}f&&(f.returnFocus=null)}function j1(t,e){let n=e.element.node;if(t.top!==e||!n||!n.isConnected)return;let r=t.doc,o=r.activeElement;if(o&&n.contains(o))return;let s=new Set,i=(a,c)=>{if(s.has(a)||(s.add(a),a.matches(":disabled")))return!1;let l=c&&a.getAttribute("tabindex");return l&&parseInt(l,10)<0?!1:(a.focus(),r.activeElement===a)};for(let a of n.querySelectorAll("[autofocus]"))if(i(a,!1))return;for(let a of n.querySelectorAll(Qj))if(i(a,!0))return;o&&o!==r.body&&typeof o.blur=="function"&&o.blur()}function rB(t,e,n){if(e.declared&&e.live)return;let r=t.doc,o=r.activeElement,s=e.element.node;(!o||o===r.body||s&&s.contains(o)||$1(o))&&(n&&n.isConnected&&n.ownerDocument===r&&!$1(n)&&(n.focus({preventScroll:!0}),r.activeElement===n)||t.top&&j1(t,t.top))}function $w(t,e){if(t.declared===e)return;let n=t.manager;if(t.declared=e,t.live=!1,e)n.layers.push(t);else{let r=n.layers.indexOf(t);r!==-1&&n.layers.splice(r,1)}Mw(n)}function B1(t){let e=t[Il];if(typeof e=="function")try{e=e(t,t.state,t.context)}catch{e=!1}return!!e}function N1(t){let e=L1.get(t);if(e)return e;let n=t.__ref,r=t.node;if(!n||!r||r.nodeType!==1)return null;let o=tB(r.ownerDocument);if(!o)return null;e={element:t,manager:o,declared:!1,live:!1,returnFocus:null},L1.set(t,e);let s=K(()=>{let i=B1(t);Io(()=>$w(e,i))},{depth:n.path.length,label:()=>n.path.join(".")+"::"+Il});return n.__effects||(n.__effects=[]),n.__effects.push(s),n.__eventCleanup||(n.__eventCleanup=[]),n.__eventCleanup.push(()=>Io(()=>$w(e,!1))),e}function oB(){for(let t of $l){if(!t.doc.defaultView){$l.delete(t);continue}t.layers.some(e=>!e.live&&F1(e,t.doc))&&Mw(t)}}var bp={name:Il,create(t){D1(t,Il)&&Io(()=>N1(t))},render(){$l.size&&Io(oB)},update(t){D1(t,Il)&&Io(()=>{let e=N1(t);e&&$w(e,B1(t))})}};var U1={blue:"#213eb0",green:"#389d34",red:"#e15c55",yellow:"#EDCB38",orange:"#e97c16",transparent:"rgba(0, 0, 0, 0)",black:"black",gray:"#4e4e50",white:"white",title:["gray-168","gray+168"],caption:["gray-68","gray+68"],paragraph:["gray-42","gray+42"],disabled:["gray-26","gray+26"],line:["gray-16","gray+16"],scrim:["black.45","black.55"],scrimSoft:["black.2","black.3"],blueDeep:"#0A5CB8",blueBright:"#47A8FF",accentInk:["blueDeep","blueBright"],greenDeep:"#2A6E28",greenBright:"#7FD07B",successInk:["greenDeep","greenBright"],redDeep:"#A83520",redBright:"#FF8C78",dangerInk:["redDeep","redBright"],orangeDeep:"#94500F",orangeBright:"#F4A45E",warningInk:["orangeDeep","orangeBright"],magentaDeep:"#A100A1",magentaBright:"#FF7AFF",magentaInk:["magentaDeep","magentaBright"]},V1={"gradient-blue-light":`linear-gradient(to right,
|
|
62
62
|
rgba(4, 116, 242, 1),
|
|
63
63
|
rgba(0, 48, 103, 1)
|
|
64
64
|
)`,"gradient-blue-dark":`linear-gradient(to right,
|
|
@@ -84,19 +84,19 @@ FROM ${a}${l}`},Z$=t=>{let e=[],n=(r,o)=>{for(let s in r){let i=o?`${o}/${s}`:s;
|
|
|
84
84
|
#1E54F0 36%,
|
|
85
85
|
#8B4CCA 69%,
|
|
86
86
|
#C66894 100%
|
|
87
|
-
)`};var oB={primary:{"@dark":{color:"white",background:"blue",".color-only":{color:"blue"},".inactive":{background:"gray+16"},".gradient":{color:"white",background:"gradient-blue"}},"@light":{color:"white",background:"gradient-blue",".color-only":{color:"blue"},".gradient":{color:"white",background:"gradient-colorful"}}},secondary:{"@dark":{color:"white",background:"green",".color-only":{color:"green"}},"@light":{color:"white",background:"green",".color-only":{color:"green"}},".child":"--primary"},tertiary:{"@dark":{color:"white",background:"gray.92+8"},"@light":{background:"gray.1"}},quaternary:{"@light":{color:"white",background:"gradient-light"},"@dark":{color:"white",background:"gradient-dark-active"}},quinary:{"@dark":{color:"gray=90",background:"gradient-light",":hover":{color:"gray=95",background:"gradient-light-active"},":focus":{color:"gray=120",background:"gradient-light-active"},":active":{color:"gray=120",background:"gradient-light-active"},".active":{color:"gray=120",background:"gradient-light-active"}},"@light":{color:"gray3",background:"gradient-dark",":hover":{color:"gray1",background:"gradient-dark-active"},":active":{color:"gray1",background:"gradient-dark-active"},".active":{color:"gray1",background:"gradient-dark-active"}}}},sB={alert:{"@dark":{color:"white",background:"red"}},warning:{"@dark":{color:"black",background:"yellow"}},success:{"@dark":{color:"black",background:"green"}}},iB={field:{"@light":{color:"black",background:"gray.975+144",borderColor:"gray.975+144","::placeholder":{color:"gray-68"}},"@dark":{color:"white",background:"gray.975-52",borderColor:"gray.975-52","::placeholder":{color:"gray+68"}}},label:{"@dark":{color:"white",background:"gray.92+8"},"@light":{background:"gray.1"},".light":{color:"white",background:"gray3"},".dark":{color:"white",background:"black.35"}},card:{"@light":{background:"gray.975+150"},"@dark":{color:"white",background:"gray.975-56"},".child":{color:"white",background:"gray3"},".secondary":{color:"white",background:"gradient-blue-dark",".child":{color:"white",background:"black.35"}}},dialog:{"@dark":{color:"white",background:"gray.92",".helper":{color:"white",background:"black"}},"@light":{color:"currentColor",background:"gray.1"}}},V1={document:{"@light":{color:"black",background:"white"},"@dark":{color:"white",background:"black"}},...oB,...sB,...iB,backdrop:{"@light":{background:"scrim",backdropFilter:"blur(8px)"},"@dark":{background:"scrim",backdropFilter:"blur(8px)"}},backdropSoft:{"@light":{background:"scrimSoft",backdropFilter:"blur(4px)"},"@dark":{background:"scrimSoft",backdropFilter:"blur(4px)"}},none:{color:"none",background:"none"},transparent:{color:"currentColor",background:"transparent"}};var z1={base:16,ratio:1.25,subSequence:!0,useCapsize:!0,templates:{}};var H1={ratio:1.618,subSequence:!0};var W1={SourceSans:[{url:""}]},q1={system:{isDefault:!0,isSystemFallback:!0,value:["system-ui","-apple-system","BlinkMacSystemFont",'"Segoe UI"',"Roboto",'"Helvetica Neue"',"Arial",'"Noto Sans"','"Liberation Sans"'],type:"sans-serif"}};var K1={symbols:'<svg xmlns="http://www.w3.org/2000/svg" width="41" height="42" viewBox="0 0 41 42"><path fill="currentColor" fill-rule="evenodd" d="M26.6448969,0.699064106 C31.4862479,1.83000067 35.6718819,4.48073656 38.3104478,8.91022511 C40.5212645,12.5974948 41.4936378,17.0951724 40.5085112,21.3679841 C39.7174644,25.0315254 37.8558379,27.853625 34.8002871,29.8369535 C31.9792925,31.7073227 27.90737,32.069064 24.6776501,31.3213124 C23.2887047,30.9944607 20.6411869,29.9775216 19.044333,28.0178349 C17.5928447,26.2365433 17.1250067,23.5192397 17.0461096,22.8419583 C16.9044422,21.6258334 17.1065683,20.249997 17.3800113,19.0276209 C17.9614095,16.4655592 18.9984397,14.7924534 21.1401118,13.3818866 C22.95018,12.1750388 24.6834696,11.8738651 26.7601335,12.3496124 C28.1855093,12.6880929 29.4520072,13.526716 30.3514025,14.7276098 C30.6271426,15.093878 30.8260324,15.4389318 31.059655,15.8362933 L30.9598079,15.7715366 C29.6377659,14.9422902 28.1654404,14.6590001 26.6448969,15.0752526 C25.2996601,15.4486698 24.1453463,16.3687006 23.4390969,17.6304467 C22.6973258,18.9448239 22.4839364,20.5087166 22.8465467,21.9733145 C23.2152637,23.4394215 24.1276197,24.6832715 25.381967,25.429977 C26.7647836,26.2608222 28.5893081,26.47537 30.1320438,26.0161118 C32.0344739,25.4497656 33.5958796,24.1165457 34.5824098,22.3233381 C35.8078311,20.0959926 36.0316242,17.5753145 35.4197363,15.1376991 C34.8712232,12.9726344 33.491011,11.1258939 31.7578503,9.86101942 C28.3978494,7.40873928 23.8145474,6.88014849 19.8961329,8.1555193 C16.9596954,9.11146975 14.399202,11.0657028 12.6221782,13.707146 C10.5375814,16.8894059 9.73736372,20.794518 10.3986926,24.5579956 C10.9302311,27.7327705 12.5716868,31.0242929 14.8485647,33.1339502 C15.5517576,33.7855358 16.0056239,34.2996296 16.8186608,34.9238068 C16.1252729,35.6670587 15.729719,36.1210912 15.0276006,36.8553491 L10.5425168,41.6144377 C8.59431563,40.2572487 6.84060794,38.6181461 5.33246714,36.7448351 C1.65619854,32.1632109 -0.0655234106,26.1858125 0.562658817,20.1851649 C1.1000136,14.4158268 3.81414269,9.08050481 8.0996615,5.36924966 C12.3107417,1.69300072 17.6911238,0.0107792851 23.1108097,0.299129816 C25.006381,0.458182488 26.18441,0.591493918 26.6448969,0.699064106 Z"/></svg>',logo:'<svg xmlns="http://www.w3.org/2000/svg" width="41" height="42" viewBox="0 0 41 42"><path fill="currentColor" fill-rule="evenodd" d="M26.6448969,0.699064106 C31.4862479,1.83000067 35.6718819,4.48073656 38.3104478,8.91022511 C40.5212645,12.5974948 41.4936378,17.0951724 40.5085112,21.3679841 C39.7174644,25.0315254 37.8558379,27.853625 34.8002871,29.8369535 C31.9792925,31.7073227 27.90737,32.069064 24.6776501,31.3213124 C23.2887047,30.9944607 20.6411869,29.9775216 19.044333,28.0178349 C17.5928447,26.2365433 17.1250067,23.5192397 17.0461096,22.8419583 C16.9044422,21.6258334 17.1065683,20.249997 17.3800113,19.0276209 C17.9614095,16.4655592 18.9984397,14.7924534 21.1401118,13.3818866 C22.95018,12.1750388 24.6834696,11.8738651 26.7601335,12.3496124 C28.1855093,12.6880929 29.4520072,13.526716 30.3514025,14.7276098 C30.6271426,15.093878 30.8260324,15.4389318 31.059655,15.8362933 L30.9598079,15.7715366 C29.6377659,14.9422902 28.1654404,14.6590001 26.6448969,15.0752526 C25.2996601,15.4486698 24.1453463,16.3687006 23.4390969,17.6304467 C22.6973258,18.9448239 22.4839364,20.5087166 22.8465467,21.9733145 C23.2152637,23.4394215 24.1276197,24.6832715 25.381967,25.429977 C26.7647836,26.2608222 28.5893081,26.47537 30.1320438,26.0161118 C32.0344739,25.4497656 33.5958796,24.1165457 34.5824098,22.3233381 C35.8078311,20.0959926 36.0316242,17.5753145 35.4197363,15.1376991 C34.8712232,12.9726344 33.491011,11.1258939 31.7578503,9.86101942 C28.3978494,7.40873928 23.8145474,6.88014849 19.8961329,8.1555193 C16.9596954,9.11146975 14.399202,11.0657028 12.6221782,13.707146 C10.5375814,16.8894059 9.73736372,20.794518 10.3986926,24.5579956 C10.9302311,27.7327705 12.5716868,31.0242929 14.8485647,33.1339502 C15.5517576,33.7855358 16.0056239,34.2996296 16.8186608,34.9238068 C16.1252729,35.6670587 15.729719,36.1210912 15.0276006,36.8553491 L10.5425168,41.6144377 C8.59431563,40.2572487 6.84060794,38.6181461 5.33246714,36.7448351 C1.65619854,32.1632109 -0.0655234106,26.1858125 0.562658817,20.1851649 C1.1000136,14.4158268 3.81414269,9.08050481 8.0996615,5.36924966 C12.3107417,1.69300072 17.6911238,0.0107792851 23.1108097,0.299129816 C25.006381,0.458182488 26.18441,0.591493918 26.6448969,0.699064106 Z"/></svg>',arrowDownCircle:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-down-circle"><circle cx="12" cy="12" r="10"/><path d="M8 12l4 4 4-4M12 8v8"/></svg>',arrowDownLeft:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-down-left"><path d="M17 7L7 17M17 17H7V7"/></svg>',arrowDownRight:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-down-right"><path d="M7 7l10 10M17 7v10H7"/></svg>',arrowDown:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-down"><path d="M12 5v14M19 12l-7 7-7-7"/></svg>',arrowLeftCircle:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-left-circle"><circle cx="12" cy="12" r="10"/><path d="M12 8l-4 4 4 4M16 12H8"/></svg>',arrowLeft:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-left"><path d="M19 12H5M12 19l-7-7 7-7"/></svg>',arrowRight:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-right"><path d="M5 12h14M12 5l7 7-7 7"/></svg>',arrowRightCircle:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-right-circle"><circle cx="12" cy="12" r="10"/><path d="M12 16l4-4-4-4M8 12h8"/></svg>',arrowUpCircle:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-up-circle"><circle cx="12" cy="12" r="10"/><path d="M16 12l-4-4-4 4M12 16V8"/></svg>',arrowUpLeft:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-up-left"><path d="M17 17L7 7M7 17V7h10"/></svg>',arrowUpRight:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-up-right"><path d="M7 17L17 7M7 7h10v10"/></svg>',arrowUp:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-up"><path d="M12 19V5M5 12l7-7 7 7"/></svg>',checkCircle:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-check-circle"><path d="M22 11.08V12a10 10 0 11-5.93-9.14"/><path d="M22 4L12 14.01l-3-3"/></svg>',check:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-check"><path d="M20 6L9 17l-5-5"/></svg>',chevronDown:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-down"><path d="M6 9l6 6 6-6"/></svg>',chevronLeft:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-left"><path d="M15 18l-6-6 6-6"/></svg>',chevronRight:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-right"><path d="M9 18l6-6-6-6"/></svg>',chevronUp:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-up"><path d="M18 15l-6-6-6 6"/></svg>',copy:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-copy"><rect x="9" y="9" width="13" height="13" rx="2" ry="2"/><path d="M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1"/></svg>',eyeOff:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-eye-off"><path d="M17.94 17.94A10.07 10.07 0 0112 20c-7 0-11-8-11-8a18.45 18.45 0 015.06-5.94M9.9 4.24A9.12 9.12 0 0112 4c7 0 11 8 11 8a18.5 18.5 0 01-2.16 3.19m-6.72-1.07a3 3 0 11-4.24-4.24M1 1l22 22"/></svg>',eye:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-eye"><path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"/><circle cx="12" cy="12" r="3"/></svg>',info:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-info"><circle cx="12" cy="12" r="10"/><path d="M12 16v-4M12 8h.01"/></svg>',lock:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-lock"><rect x="3" y="11" width="18" height="11" rx="2" ry="2"/><path d="M7 11V7a5 5 0 0110 0v4"/></svg>',minus:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-minus"><path d="M5 12h14"/></svg>',sun:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-sun"><circle cx="12" cy="12" r="5"/><path d="M12 1v2M12 21v2M4.22 4.22l1.42 1.42M18.36 18.36l1.42 1.42M1 12h2M21 12h2M4.22 19.78l1.42-1.42M18.36 5.64l1.42-1.42"/></svg>',moon:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-moon"><path d="M21 12.79A9 9 0 1111.21 3 7 7 0 0021 12.79z"/></svg>',moreHorizontal:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-more-horizontal"><circle cx="12" cy="12" r="1"/><circle cx="19" cy="12" r="1"/><circle cx="5" cy="12" r="1"/></svg>',moreVertical:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-more-vertical"><circle cx="12" cy="12" r="1"/><circle cx="12" cy="5" r="1"/><circle cx="12" cy="19" r="1"/></svg>',send:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-send"><path d="M22 2L11 13M22 2l-7 20-4-9-9-4 20-7z"/></svg>',smile:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-smile"><circle cx="12" cy="12" r="10"/><path d="M8 14s1.5 2 4 2 4-2 4-2M9 9h.01M15 9h.01"/></svg>',search:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-search"><circle cx="11" cy="11" r="8"/><path d="M21 21l-4.35-4.35"/></svg>',upload:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-upload"><path d="M21 15v4a2 2 0 01-2 2H5a2 2 0 01-2-2v-4M17 8l-5-5-5 5M12 3v12"/></svg>',video:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-video"><path d="M23 7l-7 5 7 5V7z"/><rect x="1" y="5" width="15" height="14" rx="2" ry="2"/></svg>',x:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-x"><path d="M18 6L6 18M6 6l12 12"/></svg>',star:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-star"><path d="M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z"/></svg>',plus:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-plus"><path d="M12 5v14M5 12h14"/></svg>'};var G1={tv:"(min-width: 2780px)",screenL:"(max-width: 1920px)","screenL<":"(min-width: 1920.02px)",screenM:"(max-width: 1680px)","screenM<":"(min-width: 1680.02px)",screenS:"(max-width: 1440px)","screenS<":"(min-width: 1440.02px)",tabletL:"(max-width: 1366px)","tabletL<":"(min-width: 1366.02px)",tabletM:"(max-width: 1280px)","tabletM<":"(min-width: 1280.02px)",tabletS:"(max-width: 1024px)","tabletS<":"(min-width: 1024.02px)",mobileL:"(max-width: 768px)","mobileL<":"(min-width: 768.02px)",mobileM:"(max-width: 560px)","mobileM<":"(min-width: 560.02px)",mobileS:"(max-width: 480px)","mobileS<":"(min-width: 480.02px)",mobileXS:"(max-width: 375px)","mobileXS<":"(min-width: 375.02px)",light:"(prefers-color-scheme: light)",dark:"(prefers-color-scheme: dark)",print:"print"};var Y1={base:150,ratio:1.333,unit:"ms",subSequence:!0,defaultBezier:"cubic-bezier(.29, .67, .51, .97)",springBezier:"cubic-bezier(.32, .72, 0, 1)"};var X1={radiusControl:"12px",radiusCard:"17px",radiusSheet:"24px",radiusPill:"999px",controlH:"44px",controlHCompact:"36px"};var Ml={version:"0.0.1",color:B1,gradient:U1,theme:V1,typography:z1,spacing:H1,font:W1,fontFamily:q1,timing:Y1,icons:K1,media:G1,sizes:X1,reset:{html:{},body:{}},animation:{fadeIn:{from:{opacity:0},to:{opacity:1}},modalIn:{from:{transform:"scale(0.95)",opacity:0},to:{transform:"",opacity:1}},modalOut:{to:{transform:"scale(0.95)",opacity:0}}},devices:{},class:{},svg:{},grid:{},shape:{}};var Oi={};F(Oi,{A:()=>VO,AssetPicture:()=>hT,Audio:()=>yT,Avatar:()=>lR,B:()=>MT,Block:()=>Z1,Box:()=>xp,Br:()=>BT,Bridge:()=>GT,Button:()=>WO,ButtonSet:()=>YO,COMPONENTS:()=>Fo,Caption:()=>CT,Checkbox:()=>ZT,CheckboxHgroup:()=>QT,Circle:()=>uT,CircleButton:()=>KO,Clickable:()=>cT,Data:()=>FT,Dialog:()=>ZO,DialogFooter:()=>JO,DialogHeader:()=>QO,Dropdown:()=>uR,DropdownList:()=>dR,DropdownParent:()=>pR,DropdownParentFocus:()=>hR,DropdownSiblingFocus:()=>gR,FileIcon:()=>fO,Flex:()=>J1,Focusable:()=>lT,FocusableComponent:()=>fT,Footnote:()=>$T,Form:()=>sT,Grid:()=>eT,Gutter:()=>rT,H1:()=>wT,H2:()=>ST,H3:()=>xT,H4:()=>kT,H5:()=>vT,H6:()=>ET,Headline:()=>DT,Hgroup:()=>WT,HgroupButton:()=>KT,HgroupRows:()=>qT,Hoverable:()=>aT,Hr:()=>jT,I:()=>NT,Icon:()=>cO,IconButton:()=>XO,IconText:()=>lO,Iframe:()=>iT,Img:()=>oT,Inline:()=>Q1,InlineFlex:()=>tT,InlineGrid:()=>nT,Input:()=>YT,Italic:()=>PT,KangorooButton:()=>GO,Li:()=>UT,Link:()=>PS,Notification:()=>mR,NumberInput:()=>XT,Ol:()=>zT,P:()=>AT,Picture:()=>pT,Radio:()=>JT,RadioHgroup:()=>tO,Range:()=>fR,RouteLink:()=>zO,RouterLink:()=>LS,SHAPES:()=>wp,Select:()=>HO,Shape:()=>zw,Span:()=>_T,SquareButton:()=>qO,Strong:()=>TT,Subhead:()=>IT,Svg:()=>gT,Text:()=>bT,Textarea:()=>rO,TextareaWithButton:()=>oO,Theme:()=>dT,Title:()=>LT,Toggle:()=>eO,ToggleHgroup:()=>nO,Tooltip:()=>iR,TooltipHidden:()=>aR,TooltipLayer:()=>US,TooltipParent:()=>cR,U:()=>OT,Ul:()=>VT,Underline:()=>RT,Video:()=>mT,depth:()=>Sp,focusableRingEnabled:()=>Nl,focusableRingToken:()=>Uw,focusableRingValue:()=>Io,getSystemGlobalTheme:()=>Fl});var Nw={};F(Nw,{Block:()=>Z1,Flex:()=>J1,Grid:()=>eT,Gutter:()=>rT,Inline:()=>Q1,InlineFlex:()=>tT,InlineGrid:()=>nT});var Z1={display:"block"},Q1={display:"inline"},J1={display:"flex"},tT={display:"inline-flex"},eT={display:"grid"},nT={display:"inline-grid"},rT={boxSize:"C1"};var Fw={};F(Fw,{Img:()=>oT});I();var oT={tag:"img",attr:{title:t=>t.title,alt:t=>t.alt!=null?t.alt:t.title||"",src:t=>{let e=fe(t);return e&&e.src||t.src},srcset:t=>{let e=fe(t);return(e?Cc(e):"")||t.srcset||t.srcSet}}};var jw={};F(jw,{Form:()=>sT});var sT={tag:"form"};var Bw={};F(Bw,{Iframe:()=>iT});var iT={tag:"iframe",position:"relative",minWidth:"G",minHeight:"G"};var Vw={};F(Vw,{Clickable:()=>cT,Focusable:()=>lT,FocusableComponent:()=>fT,Hoverable:()=>aT,focusableRingEnabled:()=>Nl,focusableRingToken:()=>Uw,focusableRingValue:()=>Io});var aB={appearance:"none",fontFamily:"inherit"},aT={transition:"opacity C defaultBezier, transform C defaultBezier",opacity:.85,":hover":{opacity:.9,transform:"scale(1.015)"},":active":{opacity:1,transform:"scale(1.015)"},".active":{opacity:1,transform:"scale(1.015)",":hover":{opacity:1}}},cT={extends:"Hoverable",":active":{opacity:1,transform:"scale(1.015)"},".active":{opacity:1}};function Nl(t){let e=t.context&&t.context.designSystem;return!e||e.focusableRing!==!1}function Uw(t){let e=t.context&&t.context.designSystem,n=e&&e.focusableRing;if(typeof n=="string")return n?{outline:n,outlineOffset:void 0}:null;if(!n||typeof n!="object"||Array.isArray(n))return null;let r=n.outline||void 0,o=n.outlineOffset!=null&&n.outlineOffset!==""?n.outlineOffset:void 0;return r||o!==void 0?{outline:r,outlineOffset:o}:null}function Io(t,e,n){let r=Uw(t);return r&&r[e]!==void 0?r[e]:n}var lT={border:"none",outline:t=>Nl(t)?"solid 0 currentColor":"none",":focus-visible":{opacity:1,outline:t=>Nl(t)?Io(t,"outline","solid X currentColor"):"none",outlineOffset:t=>Nl(t)?Io(t,"outlineOffset"):void 0}},fT={extends:"Focusable",tag:"button",fontSize:"A",type:"button",border:"none",textDecoration:"none",lineHeight:"1",whiteSpace:"nowrap",fontFamily:"inherit",cursor:"pointer",":disabled":{cursor:"not-allowed"},style:aB};var qw={};F(qw,{Picture:()=>pT});var Ww={};F(Ww,{Theme:()=>dT,getSystemGlobalTheme:()=>Fl});var Hw={};F(Hw,{Circle:()=>uT,SHAPES:()=>wp,Shape:()=>zw,default:()=>cB,depth:()=>Sp});I();var We=O(),Sp={4:{boxShadow:`rgba(0,0,0,.10) 0 2${We.unit.default} 4${We.unit.default}`},6:{boxShadow:`rgba(0,0,0,.10) 0 3${We.unit.default} 6${We.unit.default}`},10:{boxShadow:`rgba(0,0,0,.10) 0 4${We.unit.default} 10${We.unit.default}`},16:{boxShadow:`rgba(0,0,0,.10) 0 8${We.unit.default} 16${We.unit.default}`},26:{boxShadow:`rgba(0,0,0,.10) 0 14${We.unit.default} 26${We.unit.default}`},42:{boxShadow:`rgba(0,0,0,.10) 0 20${We.unit.default} 42${We.unit.default}`}},Ei=t=>at(t.shapeDirectionColor)||at(t.borderColor)||at(t.backgroundColor)||at(t.background),_p=t=>{let e=bl.transition(t.transition,t);return e&&e.transition},wp={rectangle:{},circle:{borderRadius:"100%"},bubble:{},tv:{borderRadius:"1.15em/2.5em"},tooltip:t=>({position:t.position||"relative","&:before":{content:'""',display:"block",width:"0px",height:"0px",border:".35em solid",borderColor:Ei(t),transition:_p(t),transitionProperty:"border-color",position:"absolute",borderRadius:".15em"}}),tooltipDirection:{top:{"&:before":{top:"0",left:"50%",transform:"translate(-50%, -50%) rotate(45deg)"}},right:{"&:before":{top:"50%",right:"0",transform:"translate(50%, -50%) rotate(45deg)"}},bottom:{"&:before":{bottom:"0",left:"50%",transform:"translate(-50%, 50%) rotate(45deg)"}},left:{"&:before":{top:"50%",left:"0",transform:"translate(-50%, -50%) rotate(45deg)"}}},tag:t=>({position:"relative","&:before":{content:'""',display:"block",background:Ei(t),transition:_p(t),transitionProperty:"background",borderRadius:".25em",position:"absolute",zIndex:"-1",aspectRatio:"1/1",top:"50%",transformOrigin:"50% 50%",height:"73%"}}),tagDirection:{top:{"&:before":{bottom:"100%",left:"50%",transform:"translate(-50%, 50%) rotate(45deg)"}},right:{"&:before":{top:"50%",left:"100%",transform:"translate(-50%, -50%) rotate(45deg)"}},bottom:{"&:before":{top:"100%",left:"50%",transform:"translate(-50%, -50%) rotate(45deg)"}},left:{"&:before":{top:"50%",right:"100%",transform:"translate(50%, -50%) rotate(45deg)"}}},hexagon:t=>({position:"relative","&:before, &:after":{content:'""',display:"block",position:"absolute",zIndex:"-1",borderRadius:".25em",aspectRatio:"1/1",top:"50%",transformOrigin:"50% 50%",height:"73%",background:Ei(t),transition:_p(t),transitionProperty:"background"},"&:before":{left:"0",transform:"translate3d(-50%, -50%, 1px) rotate(45deg)"},"&:after":{left:"100%",transform:"translate3d(-50%, -50%, 1px) rotate(45deg)"}}),chevron:t=>({position:"relative","&:before, &:after":{content:'""',display:"block",position:"absolute",zIndex:"-1",aspectRatio:"1/1",top:"50%",transformOrigin:"50% 50%",transition:_p(t),transitionProperty:"background"},"&:before":{background:`linear-gradient(225deg, ${Ei(t)} 25%, transparent 25%), linear-gradient(315deg, ${Ei(t)} 25%, transparent 25%)`},"&:after":{background:Ei(t),borderRadius:".25em"}}),chevronDirection:{left:{"&:before":{height:"100%",left:"100%",transform:"translate3d(-1%, -50%, 1px) scale(-1, 1)"},"&:after":{height:"73%",left:"0",transform:"translate3d(-50%, -50%, 1px) rotate(45deg)"}},right:{"&:before":{height:"100%",left:"0",transform:"translate3d(-99%, -50%, 1px)"},"&:after":{height:"73%",left:"100%",transform:"translate3d(-50%, -50%, 1px) rotate(45deg)"}}}},zw={deps:{exec:pt,getSpacingBasedOnRatio:Ue,getMediaColor:zt},classlist:{shape:t=>t.deps.exec(wp[t.shape],t),shapeDirection:t=>{if(!t.shape||!t.shapeDirection)return;let e=wp[t.shape+"Direction"];return t.shape&&e?e[t.shapeDirection||"left"]:null},shapeDirectionColor:t=>{let e={borderColor:t.deps.getMediaColor(t.background||t.backgroundColor)};return t.shapeDirection?e:null}}},uT={round:"100%"},cB=zw;I();var Fl=({context:t,state:e})=>{let n=e&&e.root,r=n&&n.globalTheme||t.designSystem&&t.designSystem.globalTheme;return r==="auto"?null:r},dT={deps:{depth:Sp},classlist:{depth:t=>!Bt(t.depth)&&t.deps.depth[t.depth]}};var pT={deps:{getSystemGlobalTheme:Fl},tag:"picture",childExtends:{deps:{getSystemGlobalTheme:Fl},tag:"source",attr:{media:t=>{let{key:e,context:n,deps:r}=t,{media:o}=n.designSystem,s=r.getSystemGlobalTheme(t),i=(t.media||e).slice(1);return i===s?"(min-width: 0px)":i==="dark"||i==="light"?"(max-width: 0px)":o[i]}}},Img:{width:"inherit",ignoreChildExtends:!0,height:"inherit",src:(t,e)=>t.parent?.src||e.src}};var Kw={};F(Kw,{AssetPicture:()=>hT});I();var hT={tag:"picture",children:t=>{let e=fe(t);if(e)return Tc(e,t.alt)}};var Gw={};F(Gw,{Svg:()=>gT});var gT={tag:"svg",attr:{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"},html:t=>{let{context:e}=t;if(t.semanticIcons)return;if(t.html&&typeof t.html!="function")return t.call("exec",t.html,t);let{designSystem:n,utils:r}=e,o=n&&n.svg,s=t.spriteId||n&&n.useSvgSprite,i=t.call("exec",t.src,t),a=d=>`<use xlink:href="#${d}" />`;if(typeof i=="string"){let d=i.match(/^\s*<symbol\b[^>]*\bid="([^"]+)"/);if(d){let p=d[1],g=e.document||(typeof document<"u"?document:null);if(!(g&&typeof g.getElementById=="function"&&g.getElementById(p))){let m=r&&r.scratchSystem&&r.scratchSystem.appendSVGSprite;n&&!n.__svgCache&&(n.__svgCache={}),typeof m=="function"?m({[p]:i},{document:g}):r&&typeof r.init=="function"&&r.init({svg:{[p]:i}},{document:g,emotion:e.emotion})}return a(p)}}if(!s&&i)return i;let c=t.spriteId;if(c)return a(c);if(o&&o[i])return a(i);let l=Symbol.for(i),f=o[l];if(f&&o[f])return a(f);if(!i)return a("");if(typeof i=="string"&&!i.includes("<"))return typeof console<"u"&&console.warn&&console.warn(`[Svg] Unknown sprite symbol "${i}" \u2014 not registered in design-system sprite. Set the icon name to one that exists in designSystem.icons / context.svg, or register the SVG body via utils.init({ svg: { '${i}': '<svg>...</svg>' } }).`),a("");let u=0;for(let d=0;d<i.length;d++)u=(u<<5)-u+i.charCodeAt(d)|0;return f=o[l]=`svg-${(u>>>0).toString(36)}`,r.init({svg:{[f]:i}},{document:e.document,emotion:e.emotion}),a(f)}};var Yw={};F(Yw,{Video:()=>mT});I();var mT={tag:"video",controls:!0,attr:{src:t=>{let e=fe(t);return e&&e.src||t.src}},children:t=>{let e=fe(t);if(!(!e||!Array.isArray(e.variants)||!e.variants.length))return e.variants.map(n=>({tag:"source",attr:{src:n.src,type:n.format}}))},childExtends:{tag:"source"}};var Xw={};F(Xw,{Audio:()=>yT});I();var yT={tag:"audio",controls:!0,attr:{src:t=>{let e=fe(t);return e&&e.src||t.src}},children:t=>{let e=fe(t);if(!(!e||!Array.isArray(e.variants)||!e.variants.length))return e.variants.map(n=>({tag:"source",attr:{src:n.src,type:n.format}}))},childExtends:{tag:"source"}};var Zw={};F(Zw,{B:()=>MT,Caption:()=>CT,Data:()=>FT,Footnote:()=>$T,H1:()=>wT,H2:()=>ST,H3:()=>xT,H4:()=>kT,H5:()=>vT,H6:()=>ET,Headline:()=>DT,I:()=>NT,Italic:()=>PT,P:()=>AT,Span:()=>_T,Strong:()=>TT,Subhead:()=>IT,Text:()=>bT,Title:()=>LT,U:()=>OT,Underline:()=>RT});var bT={},_T={tag:"span"},wT={tag:"h1"},ST={tag:"h2"},xT={tag:"h3"},kT={tag:"h4"},vT={tag:"h5"},ET={tag:"h6"},AT={tag:"p"},CT={tag:"caption"},TT={tag:"strong",fontWeight:"700"},OT={tag:"u"},RT={tag:"u"},PT={tag:"i"},LT={},DT={tag:"h6",fontSize:"B",fontWeight:500},IT={tag:"span",fontSize:"Z1"},$T={tag:"span",fontSize:"Z"},MT={tag:"b"},NT={tag:"i"},FT={tag:"data"};var Qw={};F(Qw,{Box:()=>xp,Br:()=>BT,Hr:()=>jT,Li:()=>UT,Ol:()=>zT,Ul:()=>VT});var lB=t=>{if(!t.context)return;let{props:e,__ref:n}=t,r=ye(e,t,{unpack:!1});n.__class=r},xp={extends:["Shape","Theme"],boxSizing:"border-box",onBeforeClassAssign:lB},jT={tag:"hr",margin:"C1 0"},BT={tag:"br"},UT={tag:"li"},VT={tag:"ul",childExtends:{extends:"Li"}},zT={tag:"ol",childExtends:{extends:"Li"}};var Jw={};F(Jw,{Hgroup:()=>WT,HgroupButton:()=>KT,HgroupRows:()=>qT});var HT=t=>{if(t.text!=null||t.html!=null)return!0;for(let e in t){let n=e.charCodeAt(0);if(n>=65&&n<=90)return!0}return!1},WT={display:"flex",tag:"hgroup",flow:"y",gap:"Y2",H:{if:HT,color:"title",tag:"h3",lineHeight:"1em",margin:"0"},P:{if:HT,margin:"0",color:"paragraph"}},qT={extends:"Hgroup",H:{display:"flex",color:"title",align:"center space-between"},P:{color:"paragraph",align:"center space-between"}},KT={extends:"HgroupRows",H:{justifyContent:"space-between",Span:{},Button:{background:"transparent",color:"currentColor",padding:"0",Icon:{name:"x",fontSize:"C"}}},P:{}};var tS={};F(tS,{Bridge:()=>GT});var GT={tag:"div"};var eS={};F(eS,{Input:()=>YT});var YT={extends:["Focusable"],tag:"input",border:"none",theme:"field",fontSize:"A",round:"C",lineHeight:"1",padding:"Z2 B",attr:{pattern:t=>t.pattern,name:t=>t.name,placeholder:t=>t.placeholder,value:t=>{if(!t.value)return;let e=t.call("exec",t.value,t);return t.call("isString",e)&&e.includes("{{")?t.call("replaceLiteralsWithObjectFields",e):e},checked:t=>t.call("exec",t.checked,t),disabled:t=>t.disabled||null,required:t=>t.required,type:t=>t.type}};var nS={};F(nS,{NumberInput:()=>XT});var XT={extends:["Flex","Input"],type:"number",boxSize:"C+X",align:"center center",textAlign:"center",round:"Y1",theme:"transparent",border:"1px solid line",placeholder:"0",fontWeight:"400","::-webkit-inner-spin-button":{appearance:"none"},attr:{step:t=>t.step,min:t=>t.min,max:t=>t.max}};var rS={};F(rS,{Checkbox:()=>ZT,CheckboxHgroup:()=>QT});var ZT={extends:"Focusable",tag:"label",boxSize:"fit-content fit-content",cursor:"pointer",round:"Y",Input:{type:"checkbox",position:"absolute",opacity:"0",width:"1px",height:"1px",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",":checked + div":{theme:"primary"},":checked + div > svg":{transform:"none",opacity:"1"},":focus-visible + div":{outline:t=>Io(t,"outline","solid X currentColor"),outlineOffset:t=>Io(t,"outlineOffset","Z")},attr:{checked:t=>t.call("exec",t.parent.checked)}},Flex:{align:"center center",fontSize:"B1",padding:"V",theme:"field",round:"X2",transition:"background A defaultBezier",Icon:{icon:"check",opacity:"0",transform:"scale(0.9) rotate(-15deg)",transition:"opacity B defaultBezier"}}},QT={display:"flex",tag:"label",boxSize:"fit-content",align:"flex-start flex-start",gap:"A",Checkbox:{tag:"div"},HgroupRows:{gap:"Z1",margin:"Y - - -"}};var oS={};F(oS,{Radio:()=>JT,RadioHgroup:()=>tO});var JT={extends:"Checkbox",Input:{type:"radio",":checked + div:after":{opacity:"1"}},Flex:{round:"100%",padding:"Y",":after":{content:'""',display:"block",boxSize:"X+W1",round:"100%",background:"white",opacity:"0",transition:"opacity .15s ease-in-out"},Icon:null}},tO={extends:"CheckboxHgroup",Checkbox:null,Radio:{}};var sS={};F(sS,{Toggle:()=>eO,ToggleHgroup:()=>nO});var eO={extends:"Checkbox",Input:{role:"switch",":checked + div":{background:"green2+8",justifyContent:"flex-end"}},Flex:{boxSize:"A1 B1",padding:"- W_default",round:"D",align:"center flex-start",theme:"field",border:"none",transition:"opacity .15s ease",":after":{content:'""',boxSize:"A A",round:"100%",background:"white",boxShadow:"gray.2 1px 1px Z"},Icon:null}},nO={extends:"CheckboxHgroup",Checkbox:null,Toggle:{}};var iS={};F(iS,{Textarea:()=>rO,TextareaWithButton:()=>oO});var rO={tag:"textarea",extends:["Input","Flex"],fontfamily:"Avenir",placeholder:"Leave us a message...",padding:"A",theme:"field",border:"none",minHeight:"E_default",width:"100%",height:"E1_default",fontFamily:"inherit",round:"Z2",lineHeight:1.4,".outlined":{borderWidth:"1px",borderStyle:"solid"}},oO={display:"flex",gap:"Y2",Textarea:{height:"C2+W",minWidth:"H",padding:"A",fontSize:"Z1",round:"Z2",minHeight:"fit-content"},SquareButton:{background:"blue",Icon:{name:"send"}}};var aS={};F(aS,{FileIcon:()=>fO,Icon:()=>cO,IconText:()=>lO});Kt();var sO=new Set,iO=(t,e)=>{if(!sO.has(t)&&(sO.add(t),typeof console<"u"&&console.warn)){let n=e&&e.__ref&&e.__ref.path,r=n&&n.length?` at <${n.join(".")}>`:"";console.warn(`[Icon] Unknown icon name "${t}"${r} \u2014 not registered in designSystem.icons, rendering the noIcon placeholder. Fix the name or register the icon in the design system.`)}},aO=new WeakMap,fB=t=>{let e=aO.get(t);return e||(e={pending:new Map,waiting:new Map,failed:new Set},aO.set(t,e)),e},uB=(t,e)=>{if(!t)return null;let n=t.default||t;return typeof n=="string"?n.trim()?{[e]:n}:null:typeof n=="object"&&!Array.isArray(n)&&Object.keys(n).length?n:null},dB=(t,e,n)=>{let r=n&&n.context&&n.context.document||(typeof document<"u"?document:null);J(t);try{let o=O();o&&!o.__svgCache&&(o.__svgCache={}),t.__svgCache||(t.__svgCache={});let s={};for(let i in e){let a=So(e[i],i);a&&(t.icons[i]=a,s[i]=a)}return t.useIconSprite&&r&&Object.keys(s).length&&xo(s,{document:r}),Object.keys(s).length>0}finally{X()}},pB=(t,e,n,r,o)=>{let s=t&&t.designSystem,i=s&&s.iconsLoader;if(typeof i!="function"||!s.icons)return!1;let a=fB(s);if(a.failed.has(e))return!1;let c=a.waiting.get(e);if(c||(c=new Set,a.waiting.set(e,c)),c.add(o),a.pending.has(e))return!0;let l=Promise.resolve().then(()=>i(e,t)).then(f=>{let u=uB(f,n);return u?dB(s,u,r):!1}).catch(f=>(typeof console<"u"&&console.error&&console.error(`[Icon] iconsLoader failed for "${e}":`,f),!1)).then(f=>{a.pending.delete(e);let u=a.waiting.get(e);a.waiting.delete(e),f||a.failed.add(e),u&&u.forEach(d=>{try{d(f)}catch(p){console.error("[Icon] repaint error:",p)}})});return a.pending.set(e,l),!0},cO={extends:"Svg",width:"A",height:"A",display:"inline-block",style:{fill:"currentColor","*":{fill:"currentColor"}},onInit:(t,e,n)=>{let{parent:r}=t,{icons:o,useIconSprite:s,verbose:i}=n&&n.designSystem,{toCamelCase:a}=n&&n.utils,c=g=>{let h=g[".isActive"];if(h)return g.call("exec",h.name||h.icon)},l=(g,h,m)=>{let{semanticIcons:y}=m&&m.designSystem,{toCamelCase:S}=m&&m.utils,b=f(g,h),_=S(b).split(/([a-z])([A-Z])/g),w=_[1]?_[0]:b.split(".")[0].split(" ")[0],k=y&&y[w];if(k){let A=b.includes(".")?"sfsymbols."+b.split(".").slice(1).join("."):"sfsymbols";return b=k[A]||k[b.split(".")[0].split(" ")[0]],{tag:"span",semanticIcons:!0,width:"A",height:"A",lineHeight:"1em",":after":{fontSize:"Z",fontWeight:"300",content:`"${b}"`,textAlign:"center",display:"inline-block",style:{color:"currentColor",fontFamily:"'SF Pro Icons', 'SF Pro', 'SF Symbols', 'Segoe UI'"}}}}},f=(g,h)=>{let{key:m}=g,y=g.call("exec",g.name||g.icon||m,g);return g.call("isString",y)&&y.includes("{{")&&(y=g.call("replaceLiteralsWithObjectFields",y)),g.call("isString",y)?y:m},u=t.src,d,p=()=>{let g=f(t,e),h=g;if(g.includes(" ")){let M=g.split(" ");g=M[0]+M.slice(1).map($=>$.charAt(0).toUpperCase()+$.slice(1)).join("")}let m=a(g),y=m.split(/([a-z])([A-Z])/g),S=l(t,e,n);if(S){Object.assign(t,S);return}let b;t.isActive&&(b=c(t));let x=r[".isActive"];r&&r.isActive&&x&&x.icon&&(b=t.call("exec",x.icon||x.Icon.name||x.Icon.icon,t)),t.call("isString",b)&&b.includes("{{")&&(b=t.call("replaceLiteralsWithObjectFields",b));let _;o[b]&&(_=b),o[m]?_=m:o[y[0]+y[1]]?_=y[0]+y[1]:o[y[0]]?_=y[0]:i&&t.warn("Can't find icon:",g,_);let w=o[_],k=r&&r.src||u;!w&&!k&&(pB(n,h,m,t,$=>{if(!(d&&d._disposed)){if(!$)return iO(h,t);p()}})||iO(h,t));let A=s&&_,T=w||k||o.noIcon;if(!(t.spriteId===A&&t.src===T&&t.node&&t.node.innerHTML)&&(t.spriteId=A,t.src=T,typeof t.html=="function"&&t.node)){let M=t.context&&t.context.designSystem;M&&J(M);try{let $=t.html(t,t.state,t.context);$!=null&&typeof $!="function"&&(t.node.innerHTML=$)}finally{M&&X()}}};d=K(p,{depth:t.__ref&&t.__ref.path&&t.__ref.path.length||0}),t.__ref&&(t.__ref.__effects||(t.__ref.__effects=[]),t.__ref.__effects.push(d))},attr:{viewBox:"0 0 24 24","aria-hidden":t=>t.ariaLabel||t.role==="img"?null:"true",focusable:"false"}},lO={display:"flex",align:"center center",lineHeight:1,".reversed":{flow:"row-reverse"},".vertical":{flow:"column"},Icon:{if:t=>{let{parent:e}=t,n=t.call("exec",t.icon,t);return t.call("exec",n||e.icon||t.name||t.sfSymbols||e.sfSymbols,t)},icon:t=>t.call("exec",t.parent.icon,t.parent)},text:t=>t.text},fO={display:"flex",theme:"tertiary",boxSize:"C1",align:"center center",round:"Z2",Icon:{fontSize:"B",margin:"auto",icon:"file"}};var DS={};F(DS,{A:()=>VO,Link:()=>PS,RouteLink:()=>zO,RouterLink:()=>LS});var Ti={};F(Ti,{default:()=>MB,getActiveRoute:()=>RS,lastLevel:()=>Ep,lastPathname:()=>Mo,loadLazy:()=>vS,matchRoute:()=>CS,parseQuery:()=>TS,parseRoutePattern:()=>AS,resolveRouterElement:()=>zl,router:()=>Pe,runGuards:()=>OS,saveScrollPosition:()=>Ul});I();var cS="__smblsRouter",lS=new WeakMap,hB=0,fS=()=>Date.now().toString(36)+(++hB).toString(36)+Math.random().toString(36).slice(2,6),uS=t=>{try{let e=t&&t.history;if(e&&typeof e.pushState=="function"&&typeof e.replaceState=="function"&&typeof e.go=="function")return e}catch{}return null},Kn=t=>{try{return t.state}catch{return}},Bl=t=>{try{let{pathname:e,search:n,hash:r}=t.location;return e+n+r}catch{return null}},hO=t=>{if(!t||typeof t!="object"||Array.isArray(t))return!1;let e=Object.getPrototypeOf(t);return e===null||Object.getPrototypeOf(e)===null},dS=t=>{let e=hO(t)?t[cS]:null;return e&&typeof e.key=="string"&&typeof e.chain=="string"&&Number.isInteger(e.index)?e:null},pS=(t,e)=>t==null?{[cS]:e}:hO(t)?{...t,[cS]:e}:null,hS=()=>({key:fS(),index:0,chain:fS()}),Ai=(t,e)=>{let n=dS(e);return{key:n?n.key:null,index:n?n.index:null,chain:n?n.chain:null,url:Bl(t),state:e}},jl=(t,e,n)=>{if(!n||Bl(t)!==n.url)return!1;let r=dS(e);return n.key?!!r&&r.key===n.key:!r&&e===n.state},gS=(t,e)=>{let n=Kn(e),r=Ai(t,n);if(r.key)return r;let o=hS(),s=pS(n,o);if(!s)return r;try{e.replaceState(s,null)}catch{return r}return{...o,url:r.url,state:s}},gB=(t,e)=>{let n=lS.get(t);return!n&&e&&(n={current:null,pending:null,expect:null,seq:0,pops:new WeakMap,positions:null,scrollNode:null,restore:null},lS.set(t,n)),n||null},gO="smbls.router.scroll",uO=100,mB=1e3,dO=["wheel","touchstart","keydown","pointerdown"],mO=t=>{try{return t.sessionStorage||null}catch{return null}},yO=t=>{try{let e=JSON.parse(t.getItem(gO)||"[]");return Array.isArray(e)?e.filter(n=>Array.isArray(n)&&typeof n[0]=="string"):[]}catch{return[]}},bO=(t,e)=>{if(!t.positions){t.positions=new Map;let n=mO(e);if(n)for(let[r,o]of yO(n))o&&Number.isFinite(o.top)&&Number.isFinite(o.left)&&t.positions.set(r,{top:o.top,left:o.left})}return t.positions},mS=(t,e,n,r)=>{let o=bO(t,e);o.delete(n),o.set(n,{top:Math.round(Number(r.scrollTop)||0),left:Math.round(Number(r.scrollLeft)||0)}),o.size>uO&&o.delete(o.keys().next().value);let s=mO(e);if(s)try{let i=new Map(yO(s));for(let[a,c]of o)i.delete(a),i.set(a,c);s.setItem(gO,JSON.stringify(Array.from(i).slice(-uO)))}catch{}},pO=(t,e,n)=>{(!e||e.visibilityState!=="hidden")&&typeof t.requestAnimationFrame=="function"?t.requestAnimationFrame(n):typeof t.setTimeout=="function"?t.setTimeout(n,16):setTimeout(n,16)},yB=(t,e,n,r,o,s,i)=>{n.restore&&n.restore.end("replaced"),n.restore=r;let a=typeof i=="number"&&i>=0?i:mB,c=()=>Math.max(0,(Number(o.scrollHeight)||0)-(Number(o.clientHeight)||0)),l=(h,m)=>{typeof o.scrollTo=="function"?o.scrollTo({top:h,left:m,behavior:"instant"}):(o.scrollTop=h,o.scrollLeft=m)},f=typeof t.addEventListener=="function",u=()=>r.end("visitor");if(r.end=h=>{if(!r.outcome&&(r.outcome=h,f))for(let m of dO)t.removeEventListener(m,u,!0)},c()>=s.top-1)return l(s.top,s.left),r.end("placed");Number(o.scrollTop)>0&&l(0,0);let d=Number(o.scrollTop)||0,p=Date.now();if(f)for(let h of dO)t.addEventListener(h,u,{capture:!0,passive:!0});let g=()=>{if(r.outcome)return;if(n.seq!==r.seq)return r.end("overtaken");if(Math.abs((Number(o.scrollTop)||0)-d)>1)return r.end("visitor");let h=c()>=s.top-1;if(!h&&Date.now()-p<a)return pO(t,e,g);l(Math.min(s.top,c()),s.left),r.end(h?"placed":"clamped")};pO(t,e,g)},bB=(t,e)=>{let{win:n,history:r,track:o}=t,s=o.pops.get(e);if(s)return s;let i=Ai(n,Kn(r)),a=o.expect;o.expect=null;let c;if(a&&i.key===a.key&&i.url===a.url)c={echo:!0};else{let l=o.current,f=!!(i.key&&l&&l.key===i.key),u=f?null:l;u&&u.key&&t.scrollNode&&mS(o,n,u.key,t.scrollNode),c={to:i,from:u,stay:f,seq:o.seq,settled:!1,committed:!1},o.pending=c}return o.pops.set(e,c),c},_B=t=>{let{win:e,history:n,track:r}=t,o=Kn(n);if(r.pending&&jl(e,o,r.pending.to)||r.expect&&jl(e,o,r.expect.away))return;let s=r.current,i=dS(o);if(s&&(s.key?i&&i.key===s.key:jl(e,o,s))){s.url=Bl(e),s.state=o;return}r.current=t.restore?gS(e,n):Ai(e,o),r.pending=null,r.seq++},_O=(t,e,n)=>{let r=e.scrollRestoration==="restore",o=uS(t),s=r||Array.isArray(e.guards)&&e.guards.length>0,i=o&&gB(o,s);if(!i)return null;let a={win:t,history:o,track:i,restore:r,scrollNode:r&&n?n:null,pop:null};a.scrollNode&&(i.scrollNode=a.scrollNode);let c=e.event;return c&&c.type==="popstate"?a.pop=bB(a,c):_B(a),a},yS=t=>{let e=t&&t.pop;if(!e||e.echo)return!0;if(e.settled)return e.committed;let{win:n,history:r,track:o}=t;return e.settled=!0,o.pending===e&&(o.pending=null),o.seq!==e.seq||!jl(n,Kn(r),e.to)?!1:(o.current=t.restore&&!e.to.key?gS(n,r):e.to,o.seq++,e.committed=!0,!0)},wB=(t,e,n)=>{try{t.addEventListener("popstate",()=>{e.expect===n&&(e.expect=null)},{once:!0})}catch{}},bS=(t,e)=>{let n=t&&t.pop;if(!n||n.echo||n.settled)return;let{win:r,history:o,track:s}=t;n.settled=!0,s.pending===n&&(s.pending=null);let i=n.from;if(!i||s.seq!==n.seq||!jl(r,Kn(o),n.to))return;let a=n.to;if(!e&&i.key&&a.key&&i.chain===a.chain&&i.index!==a.index){let f=s.expect={key:i.key,url:i.url,away:a};wB(r,s,f);try{o.go(i.index-a.index)}catch{s.expect=null}return}let c=hS(),l=pS(i.state,c);try{o.replaceState(l||i.state,null,i.url)}catch{return}s.current=l?{...c,url:i.url,state:l}:Ai(r,Kn(o)),s.seq++},wO=(t,e)=>{let n=Bl(e);t&&n!==null&&(t.__routerAddress=n)},SO=(t,e,n)=>{let r=t&&t.pop;if(r&&!r.echo&&r.from)return bS(t,!0);r&&!r.settled&&(r.settled=!0,t.track.pending===r&&(t.track.pending=null));let o=uS(n),s=e&&e.__routerAddress;if(!(!o||!s||s===Bl(n)))try{o.replaceState(Kn(o),null,s)}catch{}},xO=(t,e,n,r)=>{let{win:o,history:s,track:i}=t,a=i.current;!r&&a&&a.key&&t.scrollNode&&mS(i,o,a.key,t.scrollNode);let c=r?Ai(o,Kn(s)):gS(o,s),l=c.key?r?{key:c.key,index:c.index,chain:c.chain}:{key:fS(),index:c.index+1,chain:c.chain}:hS(),f=pS(e,l);try{r?s.replaceState(f||e,null,n):s.pushState(f||e,null,n)}catch{return}i.current=f?{...l,url:n,state:f}:Ai(o,Kn(s)),i.pending=null,i.expect=null,i.seq++},kO=(t,e,n,r)=>{if(!t||!t.restore||!e)return!1;let o=t.pop;if(o?o.stay||!o.committed:!n.initialRender)return!1;let{win:s,track:i}=t,a=i.current,c=a&&a.key&&bO(i,s).get(a.key);if(!c)return!1;let l=i.restore;return!!l&&l.key===a.key&&(o?l.pop===o:!l.pop&&l.seq===i.seq)&&l.outcome==="visitor"||yB(s,r,i,{key:a.key,pop:o,seq:i.seq,outcome:null},e,c,n.scrollRestoreTimeout),!0},Ul=t=>{let e=uS(t),n=e&&lS.get(e);!n||!n.scrollNode||!n.current||!n.current.key||mS(n,t,n.current.key,n.scrollNode)};I();var CO=["components","functions","methods","snippets"],TO=new Set(["pages",...CO]),_S=new Set(["default","__esModule"]),$o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),qt=t=>!!t&&typeof t=="object"&&!Array.isArray(t),kp=new WeakMap,vO=new WeakMap,SS=new WeakMap,EO=new Set,Ci=(t,e=console.warn)=>{EO.has(t)||(EO.add(t),e(t))},OO=t=>qt(t&&t.lazy),Vl=(t,e)=>{let n=t&&t.lazy;return qt(n)&&$o(n,e)?n[e]:void 0},xS=(t,e)=>{let n=kp.get(t);n||(kp.set(t,n=new Map),t.__teardowns=t.__teardowns||[],t.__teardowns.push(()=>{for(let o of n.values())o.disposed=!0,o.waiting.clear();kp.delete(t)}));let r=n.get(e);return r||(r={status:"idle",promise:null,disposed:!1,pages:null,waiting:new Set,maps:new Set},n.set(e,r)),r},RO=(t,e)=>!OO(e)||!qt(t)||!$o(t,"lazy")?null:typeof t.lazy=="string"&&t.lazy?t.lazy:null,kS=t=>!!t&&typeof t=="object"&&SS.has(t),SB=(t,e)=>{if(typeof Vl(t,e)!="function")return"error";let n=kp.get(t)?.get(e);return n&&n.status==="error"?"error":"loading"},xB=(t,e)=>{let n=vO.get(t);if(n&&n.group===e)return n;let{lazy:r,state:o,...s}=t,i=o==null||qt(o)||typeof o=="function";i?s.state=(c,l)=>{let f=typeof o=="function"?o(c,l):o;return{...qt(f)?f:null,lazyStatus:SB(c.context,e)}}:(s.state=o,Q()&&Ci(`[smbls/router] the placeholder of lazy group "${e}" binds its state to a path (${JSON.stringify(o)}), so it gets no \`lazyStatus\` \u2014 give it its own state object to show a load failure.`));let a={definition:s,group:e,hasStatus:i};return vO.set(t,a),SS.set(s,a),a},kB=t=>t.__ref&&t.__ref.contentElementKey||"content",vp=(t,e)=>{let n=t&&t.__ref&&t.__ref.__routerRendered,r=n&&kS(n.content)?SS.get(n.content):null;return!r||r.group!==e?null:{record:r,page:t[kB(t)]}},wS=(t,e,n)=>{let r=vp(t,e);if(!r||!r.record.hasStatus)return;let o=r.page&&r.page.state;if(!(!o||typeof o.update!="function"||o.lazyStatus===n))try{o.update({lazyStatus:n})}catch(s){console.error(`[smbls/router] lazy group "${e}": could not show the "${n}" status on its placeholder`,s)}},vB=t=>qt(t)?!Object.keys(t).some(n=>TO.has(n))&&qt(t.default)?t.default:t:{},EB=t=>{let e={};if(!qt(t))return e;for(let n of Object.keys(t)){if(_S.has(n))continue;let r=n.charCodeAt(0)===47,o=r?n:"/"+(n==="index"?"":n);(r||!$o(e,o))&&(e[o]=t[n])}return e},PO=(t,e,n,r,o)=>{if(!qt(t))return 0;let s=0;for(let i of Object.keys(t))RO(t[i],r)===e&&(s++,$o(n,i)?t[i]=n[i]:delete t[i]);for(let i of Object.keys(n))$o(t,i)?t[i]!==n[i]&&o.push(`pages['${i}']`):t[i]=n[i];return s},AO=(t,e,n)=>{let r=t[e];if(!qt(r)){t[e]={...n};return}try{for(let o in n)r[o]=n[o];if(Object.keys(n).every(o=>r[o]===n[o]))return}catch{}t[e]={...r,...n}},AB=t=>{let e=t.__ref&&t.__ref.origin;if(!qt(e))return[];let n=[].concat(e.extends||[],e.extend||[]);if(n.length)return n.filter(s=>typeof s=="string").map(s=>(s.includes(">")?s.split(">")[0]:s).trim());let r=t.key;if(typeof r!="string"||!/^[A-Z]/.test(r))return[];let o=[r.indexOf("_"),r.indexOf(".")].filter(s=>s>0);return[o.length?r.slice(0,Math.min(...o)):r]},CB=(t,e,n,r)=>{let o=new Set;for(let i of r.waiting){let a=vp(i,e);a&&a.page&&o.add(a.page)}let s=i=>{let a=i&&i.__ref&&i.__ref.__children;if(Array.isArray(a))for(let c of a){let l=i[c];if(!(!l||!l.__ref||o.has(l)||!l.node)){for(let f of AB(l)){if(!n.has(f))continue;let u=(l.__ref.path||[l.key]).join(" \u203A ");Ci(`[smbls/router] lazy group "${e}": ${u} was built before the group loaded, so it renders without "${f}". A built element never takes a later registration \u2014 build it after el.call('loadLazy', '${e}') resolves (an \`if:\` gate does that), or keep "${f}" out of the group.`)}s(l)}}};s(t)},TB=(t,e,n,r)=>{let o=t.context,s=vB(n),i=Q(),a=[],c=new Set;if(i)for(let p of Object.keys(s))TO.has(p)||_S.has(p)||Ci(`[smbls/router] lazy group "${e}" exports \`${p}\`, which a lazy group cannot add \u2014 it adds pages, components, functions, methods and snippets only. Declare the rest with the app.`);let l=!1;for(let p of CO){let g=s[p];if(!qt(g))continue;let h=qt(o[p])?o[p]:{},m={};for(let S of Object.keys(g))if(!_S.has(S)){if($o(h,S)){h[S]!==g[S]&&a.push(`${p}.${S}`);continue}m[S]=g[S]}let y=Object.keys(m);if(y.length&&(AO(o,p,m),p==="components"&&y.forEach(S=>c.add(S)),p==="methods"&&(l=!0),(p==="functions"||p==="snippets")&&qt(o.utils))){let S={};for(let b of y)$o(o.utils,b)||(S[b]=m[b]);Object.keys(S).length&&AO(o,"utils",S)}}l&&mi(o);let f=EB(s.pages);r.pages=f;let u=null;try{u=typeof t.getRoot=="function"?t.getRoot():null}catch{}let d=new Set;qt(o.pages)&&d.add(o.pages),u&&qt(u.routes)&&d.add(u.routes);for(let p of r.maps)d.add(p);for(let p of r.waiting)qt(p.routes)&&d.add(p.routes);for(let p of d)PO(p,e,f,o,a);i&&a.length&&Ci(`[smbls/router] lazy group "${e}" redefines ${a.join(", ")}, which the app already has \u2014 the app's own value stays. Rename them: frank refuses the same collision at \`smbls push\`.`),i&&c.size&&u&&CB(u,e,c,r)},LO=(t,e)=>{let n=t&&t.__ref,r=n&&n.__lazyRoute;!r||r.group!==e||(n.__lazyRoute=null,typeof t.set=="function"&&vp(t,e)&&Promise.resolve().then(()=>r.rerender({pushState:!1,replace:!1,scrollToTop:!1,guards:[],lazy:{group:e,status:"loaded"}})).catch(o=>console.error(`[smbls/router] lazy group "${e}" loaded, but its route failed to render`,o)))},DO=(t,e)=>{let n=t.context,r=xS(n,e);if(r.status==="loading"||r.status==="loaded")return r.promise;let o=Vl(n,e);r.status="loading";let s=Promise.resolve().then(()=>o()).then(i=>{r.disposed||TB(t,e,i,r)}).then(()=>{r.status="loaded";let i=[...r.waiting];r.waiting.clear();for(let a of i)LO(a,e)},i=>{if(r.status="error",r.promise=null,r.disposed)throw i;console.error(`[smbls/router] lazy group "${e}" failed to load \u2014 its routes show their placeholder; the next navigation or loadLazy retries.`,i);for(let a of[...r.waiting])vp(a,e)?wS(a,e,"error"):r.waiting.delete(a);throw i});s.catch(()=>{}),r.promise=s;for(let i of r.waiting)wS(i,e,"loading");return s},IO=(t,e,n)=>{let r=e&&e.context,o=RO(t,r);if(!o)return null;let s=xS(r,o);if(qt(n)&&s.maps.add(n),s.status==="loaded"&&PO(n,o,s.pages||{},r,[])>0)return{rematch:!0};let i=typeof Vl(r,o)=="function";return i?DO(e,o):Ci(`[smbls/router] a route names lazy group "${o}", which context.lazy does not declare as a loader (\`lazy: { ${o}: () => import('./\u2026') }\`) \u2014 it shows its placeholder in the error state.`,console.error),{content:xB(t,o).definition,group:o,status:i?"loading":"error"}},$O=(t,e,n)=>{if(!e||!e.group||e.status==="error")return;let r=t.context,o=t.__ref;if(!o||typeof Vl(r,e.group)!="function")return;let s=xS(r,e.group);if(o.__lazyRoute={group:e.group,rerender:n},wS(t,e.group,s.status==="error"?"error":"loading"),s.status==="loaded"){Promise.resolve().then(()=>LO(t,e.group));return}s.waiting.add(t)};function vS(t){let e=this,n=e&&e.context;if(!n)return Promise.reject(new TypeError("[smbls/router] loadLazy runs on an element: el.call('loadLazy', name)"));let r=Vl(n,t);return typeof r!="function"?(r===void 0&&OO(n)&&Q()&&Ci(`[smbls/router] loadLazy('${t}'): context.lazy declares no group "${t}" \u2014 nothing to load.`),Promise.resolve()):DO(e,t)}var NO=/^:(.+)/,FO=/^\*$/,MO=new Map,AS=t=>{let e=MO.get(t);if(e)return e;let n=t.replace(/^\//,"").split("/"),r=[],o=!1;for(let i=0;i<n.length;i++){let a=n[i].match(NO);a?r.push({index:i,name:a[1]}):FO.test(n[i])&&(o=!0)}let s={segments:n,params:r,hasWildcard:o,pattern:t};return MO.set(t,s),s},CS=(t,e,n=0)=>{let o=t.replace(/^\//,"").split("/").filter(Boolean).slice(n),s="/"+(o[0]||"");if(!e)return{key:null,content:null,params:{},routePath:s};let i=null,a=-1,c={};for(let l in e){if(l==="/*")continue;let f=AS(l),u=OB(o,f);u>a&&(a=u,i=l,c=RB(o,f))}return!i&&e["/*"]&&(i="/*"),{key:i,content:i?e[i]:null,params:c,routePath:s}},OB=(t,e)=>{let{segments:n,hasWildcard:r}=e;if(!r&&n.length!==t.length&&n.length!==1&&n.length>t.length)return-1;let o=0,s=Math.min(n.length,t.length);for(let i=0;i<s;i++)if(n[i]===t[i])o+=3;else if(NO.test(n[i]))o+=1;else if(FO.test(n[i]))o+=.5;else return-1;return o},RB=(t,e)=>{let n={};for(let{index:r,name:o}of e.params)t[r]&&(n[o]=decodeURIComponent(t[r]));return n},TS=t=>{if(!t||t==="?")return{};let e={};return new URLSearchParams(t).forEach((r,o)=>{e[o]!==void 0?(Array.isArray(e[o])||(e[o]=[e[o]]),e[o].push(r)):e[o]=r}),e},OS=async(t,e)=>{if(!t||!t.length)return!0;for(let n of t){let r=await n(e);if(r===!1)return!1;if(typeof r=="string")return r}return!0},zl=(t,e)=>{if(!e)return t;let n=Array.isArray(e)?e:e.split("."),r=t;for(let o of n){if(!r||!r[o])return null;r=r[o]}return r},PB=(t,e)=>{let n=e.customRouterElement;if(!n||!t.__ref||t.__ref.root!==t)return t;let r=zl(t,n);return!r||r===t?t:(t.routes&&(r.routes=t.routes),r)},RS=(t=0,e)=>{e||(e=typeof C<"u"?C.location.pathname:"/");let r=e.split("/")[t+1];if(r)return`/${r}`},Mo,Ep=0,ES=0,LB=t=>!t||t==="srcdoc"||t==="about:srcdoc"?"/":t,DB=t=>t&&(t.scrollingElement||t.documentElement)||null,jO={level:Ep,pushState:!0,replace:!1,initialRender:!1,scrollToTop:!0,scrollToNode:!1,scrollBody:!1,useFragment:!1,updateState:!0,scrollToOffset:0,contentElementKey:"content",scrollToOptions:{behavior:"smooth"},useParamsMatching:!0,exitTimeout:300,scrollRestoreTimeout:1e3},IB=(t,e)=>{if(!t||t.visibilityState!=="visible")return!1;try{let n=e&&typeof e.matchMedia=="function"&&e.matchMedia("(prefers-reduced-motion: reduce)");if(n&&n.matches)return!1}catch{}return!0},BO=t=>{let e=t.__routeExit;e&&(t.__routeExit=null,e.abort())},$B=(t,e,n,r,o,s,i)=>{let a=e.__routeExit;if(a&&a.page===n)return a.wait;if(BO(e),!n||!n.node||typeof t.onRouteExit>"u"||!IB(s,i))return null;let c=typeof o=="number"&&o>=0?o:jO.exitTimeout,l=typeof AbortController=="function"?new AbortController:null,f={...r,page:n,timeout:c,signal:l?l.signal:void 0},u;try{u=Cn("routeExit",t,f)}catch{return null}if(!u||typeof u.then!="function")return null;let d={page:n,abort:()=>{l&&!l.signal.aborted&&l.abort()}};return d.wait=new Promise(p=>{let g=setTimeout(()=>{d.abort(),p()},c),h=()=>{clearTimeout(g),p()};u.then(h,h)}),e.__routeExit=d,d.wait},Pe=async(t,e,n={},r={})=>{let o=e||void 0,s=o?.context?.window||C,i=o?.context?.document||dt,a={...jO,...o.context.routerOptions,...r};Ep=a.lastLevel,o=PB(o,a);let c=o.__ref;(a.contentElementKey!=="content"&&a.contentElementKey!==c.contentElementKey||!c.contentElementKey)&&(c.contentElementKey=a.contentElementKey||"content");let l=c.contentElementKey||a.contentElementKey||"content",f=s.location.origin!=="null"?s.location.origin:"http://localhost";t=LB(t);let u=typeof s.URL=="function"?s.URL:typeof globalThis<"u"&&globalThis.URL||URL,d=new u(f+t),{pathname:p,search:g,hash:h}=d,m=TS(g),y=o.node,S=h&&h!==s.location.hash.slice(1),b=p!==Mo,x=Mo,_=++ES;Mo=p;let w=c.__routerRendered,k,A,T,M;if(a.useParamsMatching){let z=CS(p,o.routes,a.level);k=z.key,A=z.routePath,T=z.content,M=z.params}else{k=RS(a.level,p),A=k;let z=o.routes;T=z?z[k||"/"]||z["/*"]:null,M={}}a.scrollNode===void 0&&(a.scrollNode=DB(i));let $=a.scrollToNode?y:a.scrollNode;if(o.state?.root?.debugging){o.state.root.debugging=!1;return}let R=_O(s,a,$);if(R&&R.pop&&R.pop.echo)return;if(!T){ES===_&&(Mo=x),a.onNotFound?a.onNotFound({pathname:p,route:k,element:o}):(a.silent||console.warn("[smbls/router] no content matched for path",p,"\u2014 available routes:",Object.keys(o.routes||{})),a.event&&a.event.type==="popstate"&&SO(R,c,s));return}if(a.guards&&a.guards.length){let z={pathname:p,route:k,params:M,query:m,hash:h,element:o,state:n},B=await OS(a.guards,z);if(B===!1){ES===_&&(Mo=x),bS(R);return}if(typeof B=="string")return R&&R.pop?yS(R)?Pe(B,e,n,{...r,guards:[],event:void 0,pushState:!0,replace:!0}):void 0:a.initialRender?Pe(B,e,n,{...r,guards:[],pushState:!0,replace:!0}):Pe(B,e,n,{...r,guards:[]})}let j=IO(T,o,o.routes);if(j&&j.rematch)return Pe(t,o,n,r);j&&(T=j.content,a.lazy={group:j.group,status:j.status});let et=c.__routerNavSeq=(c.__routerNavSeq||0)+1,tt=!w||w.content!==T||w.route!==k,it=b||tt||a.force===!0;if(it&&w&&!kS(w.content)){let z=$B(o,c,o[l],{from:w.route,to:k,pathname:p,params:M,query:m,hash:h},a.exitTimeout,i,s);if(z&&(await z,c.__routerNavSeq!==et||(c.__routeExit&&c.__routeExit.wait===z&&(c.__routeExit=null),typeof o?.set!="function")))return}else BO(c);if(a.pushState){let z=p+(g||"")+(h||"");if(R)xO(R,n,z,a.replace);else try{a.replace?s.history.replaceState(n,null,z):s.history.pushState(n,null,z)}catch{}}else R&&yS(R);wO(c,s);let Pt=b||!S?{route:k,routePath:A,hash:h,params:M,query:m,debugging:!1}:{params:M,query:m};if(a.updateState&&o.state.update(Pt,{preventContentUpdate:!0}),it){l&&a.removeOldElement&&o[l].remove();let z=o.__ref?.origin?.content,B={};if(z)for(let rt in z){let Ft=z[rt];rt==="__ref"||rt==="props"||rt==="node"||rt==="parent"||rt==="key"||(typeof Ft=="string"||typeof Ft=="number"||typeof Ft=="boolean"||typeof Ft=="object"&&Ft!==null&&!Ft.node&&!Ft.__ref)&&(B[rt]=Ft)}let nt={...B,...typeof T=="object"?T:{extends:T}};a.useFragment&&(nt.tag="fragment");let U={content:T,route:k},V=c.__routerRendered;try{if(typeof o?.set!="function")return;c.__routerRendered=U,o.set(nt,{contentElementKey:l})}catch(rt){c.__routerRendered===U&&(c.__routerRendered=V),console.error("[smbls/router] failed to render route content",p,rt)}}let bt=!b&&S,Mt=kO(R,$,a,i);if(!Mt&&a.scrollToTop&&!bt&&$?.scrollTo&&$.scrollTo({...a.scrollToOptions||{},top:0,left:0}),!Mt&&a.scrollToNode&&T[l]?.node?.scrollTo&&T[l].node.scrollTo({...a.scrollToOptions||{},top:0,left:0}),!Mt&&h){let z=i.getElementById(h.slice(1));if(z&&$?.scrollTo){let B=s.getComputedStyle?s.getComputedStyle(z):null,nt=B&&parseFloat(B.scrollMarginTop)||0,U=z.getBoundingClientRect().top+$.scrollTop-nt-(a.scrollToOffset||0);$.scrollTo({...a.scrollToOptions||{},top:U,left:0})}}j&&$O(o,j,z=>Pe(t,o,n,{...r,...z})),Cn("routeChanged",o,a)},MB=Pe;var NB=(t,e)=>{if(!t)return!1;if(t.defaultPrevented||typeof t.button=="number"&&t.button!==0||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey)return!0;let n=e.node;if(!n||typeof n.getAttribute!="function")return!1;let r=n.getAttribute("target");return r&&r.toLowerCase()!=="_self"?!0:n.hasAttribute("download")},UO=(t,e,n)=>{let{context:r}=e,{href:o,scrollToTop:s,stopPropagation:i}=e,a=e.call("exec",o,e);if(e.call("isString",a)&&a.includes("{{")&&(a=e.call("replaceLiteralsWithObjectFields",a)),i&&t.stopPropagation(),!a||NB(t,e))return;let{utils:c,snippets:l,functions:f,routerOptions:u}=r,d=e.__ref.root,p=a.startsWith("http://")||a.startsWith("https://")||a.startsWith("mailto:")||a.startsWith("tel:")||a.startsWith("sketch:")||a.startsWith("whatsapp:")||a.startsWith("sms:")||a.startsWith("skype:")||a.startsWith("viber:")||a.startsWith("callto:")||a.startsWith("facetime:")||a.startsWith("facetime-audio:")||a.startsWith("geo:")||a.startsWith("maps:");if(a&&!p){t.preventDefault();try{let g=d;if(u&&u.customRouterElement){let h=Array.isArray(u.customRouterElement)?u.customRouterElement:u.customRouterElement.split("."),m=d;for(let y of h){if(!m||!m[y]){m=null;break}m=m[y]}m&&(g=m,d.routes&&(g.routes=d.routes))}(f.router||l.router||c.router||Pe)(a,g,{},{scrollToOptions:{behavior:"instant"},scrollToTop:e.call("isDefined",s)?s:!0,...u,...e.routerOptions})}catch(g){console.warn(g)}}},PS={extends:"Focusable",tag:"a",aria:{},fontWeight:"bold",textDecoration:"none",color:"currentColor",draggable:!1,attr:{href:t=>Tr(t,t.href)||Tr(t,t.call("exec",t,t).href),"aria-label":t=>t.aria?t.aria.label:t.text},onClick:UO},VO={extends:"Link"},LS={onClick:UO},zO={extends:[PS,LS]};var IS={};F(IS,{Select:()=>HO});var HO={extends:"Focusable",tag:"select",fontSize:"A",border:"none",boxSizing:"border-box",theme:"field",cursor:"pointer",childProps:{tag:"option",attr:{value:t=>t.value,selected:t=>t.selected,disabled:t=>t.disabled}},attr:{name:t=>t.name,disabled:t=>t.disabled,value:t=>{if(!t.value)return;let e=t.call("exec",t.value,t);return t.call("isString",e)&&e.includes("{{")?t.call("replaceLiteralsWithObjectFields",e):e}}};var $S={};F($S,{Button:()=>WO,ButtonSet:()=>YO,CircleButton:()=>KO,IconButton:()=>XO,KangorooButton:()=>GO,SquareButton:()=>qO});var WO={extends:["IconText","FocusableComponent"],tag:"button",minHeight:"controlH",fontSize:"Z2",type:"button",border:"none",display:"inline-flex",align:"center center",textDecoration:"none",lineHeight:"1",whiteSpace:"nowrap",padding:"0 A",fontWeight:"700",fontFamily:"inherit",round:"radiusPill",disabled:t=>t.call("exec",t.disabled)},qO={extends:"Button",fontSize:"A",width:"A",minHeight:"auto",padding:"Z",aspectRatio:"1 / 1",boxSize:"fit-content fit-content",justifyContent:"center",round:"Z2",boxSizing:"content-box"},KO={extends:"SquareButton",round:"C"},GO={extends:"Button",childExtends:"IconText"},YO={tag:"nav",display:"flex",childExtends:"SquareButton"},XO={extends:["SquareButton","ClickableItem"],round:"Z"};var MS={};F(MS,{Dialog:()=>ZO,DialogFooter:()=>JO,DialogHeader:()=>QO});var ZO={display:"flex",tag:"dialog",flow:"column",border:"0",theme:"dialog",round:"Z2"},QO={extends:"Hgroup",minWidth:"100%",gap:"A",Title:{align:"center space-between",Text:{text:"Title"},SquareButton:{icon:"x",theme:"transparent"}},Paragraph:{color:"caption"}},JO={display:"flex",align:"center flex-end",gap:"X2",margin:"auto - -",padding:"Y2 X2",childExtends:{extends:"Button",textTransform:"uppercase",background:"transparent","@dark":{theme:"primary @dark .color-only"},"@light":{theme:"primary @light .color-only"},"&":{padding:"Z A"},":hover":{theme:"tertiary"},":active":{background:"white.1"}},Cancel:{text:"cancel"},Ok:{text:"ok"}};var VS={};F(VS,{Tooltip:()=>iR,TooltipHidden:()=>aR,TooltipLayer:()=>US,TooltipParent:()=>cR});I();var FB='[data-tooltip]:not([data-tooltip=""])',tR={top:1,bottom:1,left:1,right:1},NS={top:"bottom",bottom:"top",left:"right",right:"left"},No=6,eR=new WeakMap,jB=0,_e=t=>{let e=eR.get(t);return e||(e={id:"smbls-tooltip-"+ ++jB,hover:null,focus:null,shown:null,dismissed:null,showTimer:null,hideTimer:null},eR.set(t,e)),e},FS=t=>{let e=t&&t.nodeType!==1?t.parentElement:t;return e&&typeof e.closest=="function"?e:null},BB=t=>{let e=t.parent&&t.parent.node;return e&&e.nodeType===1?e:null},UB=t=>{for(let e=t.firstElementChild;e;e=e.nextElementSibling)if(e.hasAttribute("data-tooltip-layer"))return!0;return!1},nR=(t,e)=>{let n=BB(t);if(!e||!n)return null;let r;try{r=e.closest(FB)}catch{return null}if(!r||!n.contains(r))return null;for(let o=r;o&&o!==n;o=o.parentElement)if(UB(o))return null;return r},VB=(t,e)=>!!(e&&t.node&&t.node.contains(e)),zB=t=>{try{return t.matches(":focus-visible")}catch{return!0}},rR=(t,e)=>typeof t=="number"&&t>=0?t:e,Op=t=>{t.showTimer&&(clearTimeout(t.showTimer),t.showTimer=null),t.hideTimer&&(clearTimeout(t.hideTimer),t.hideTimer=null)},jS=t=>!!(t.node&&t.node.isConnected&&t.state&&typeof t.state.update=="function"),HB=(t,e)=>{let n=(t.getAttribute("aria-describedby")||"").split(/\s+/).filter(Boolean);n.indexOf(e)===-1&&n.push(e),t.setAttribute("aria-describedby",n.join(" "))},BS=(t,e)=>{if(!t||typeof t.getAttribute!="function")return;let n=t.getAttribute("aria-describedby");if(n==null)return;let r=n.split(/\s+/).filter(o=>o&&o!==e);r.length?t.setAttribute("aria-describedby",r.join(" ")):t.removeAttribute("aria-describedby")},WB=(t,e,n,r,o)=>{let s={top:t.top,bottom:o-t.bottom,left:t.left,right:r-t.right},i=f=>(f==="top"||f==="bottom"?e.height:e.width)+No;s[n]<i(n)&&s[NS[n]]>=i(NS[n])&&(n=NS[n]);let a,c;n==="top"||n==="bottom"?(a=t.left+(t.width-e.width)/2,c=n==="bottom"?t.bottom+No:t.top-e.height-No):(c=t.top+(t.height-e.height)/2,a=n==="right"?t.right+No:t.left-e.width-No);let l=(f,u)=>Math.max(No,Math.min(u-No,f));return{left:l(a,r-e.width),top:l(c,o-e.height),side:n}},qB=t=>{let e=t.ownerDocument,n=e&&e.defaultView,r=e&&e.documentElement;return{width:r&&r.clientWidth||n&&n.innerWidth||0,height:r&&r.clientHeight||n&&n.innerHeight||0}},KB=t=>(t.title||"")+(t.description||""),Cp=(t,e=0)=>{let r=_e(t).shown;if(!r||!jS(t))return;if(!r.isConnected){Tp(t);return}let o=t.node,s=t.state;if(o.textContent!==KB(s)){e<3&&setTimeout(()=>Cp(t,e+1),0);return}let i=r.getBoundingClientRect(),a=o.getBoundingClientRect(),c=a.left-(s.x||0),l=a.top-(s.y||0),f=qB(o),u=r.getAttribute("data-tooltip-placement"),d=tR[u]?u:tR[t.tooltipPlacement]?t.tooltipPlacement:"bottom",p=WB(i,{width:a.width,height:a.height},d,f.width,f.height);s.update({x:Math.round(p.left-c),y:Math.round(p.top-l),side:p.side,placed:!0})},GB=t=>{typeof queueMicrotask=="function"?queueMicrotask(t):Promise.resolve().then(t)},oR=(t,e)=>{let n=_e(t);Op(n),!(!jS(t)||!e.isConnected)&&(n.shown&&n.shown!==e&&BS(n.shown,n.id),n.shown=e,HB(e,n.id),t.state.update({open:!0,placed:!1,title:e.getAttribute("data-tooltip")||"",description:e.getAttribute("data-tooltip-description")||""}),GB(()=>Cp(t)))};function Tp(t){let e=_e(t);Op(e),e.shown&&BS(e.shown,e.id),e.shown=null,jS(t)&&t.state.open&&t.state.update({open:!1})}var Ap=(t,e)=>{let n=_e(t);n.dismissed&&n.dismissed!==n.hover&&n.dismissed!==n.focus&&(n.dismissed=null);let r=n.hover&&n.hover!==n.dismissed?n.hover:n.focus&&n.focus!==n.dismissed?n.focus:null;if(r===n.shown){Op(n);return}if(!r){if(n.showTimer&&(clearTimeout(n.showTimer),n.showTimer=null),!n.shown||n.hideTimer)return;if(e){Tp(t);return}n.hideTimer=setTimeout(()=>{n.hideTimer=null,Tp(t)},rR(t.tooltipHideDelay,100));return}if(n.hideTimer&&(clearTimeout(n.hideTimer),n.hideTimer=null),e||n.shown){oR(t,r);return}n.showTimer&&clearTimeout(n.showTimer),n.showTimer=setTimeout(()=>{n.showTimer=null,oR(t,r)},rR(t.tooltipDelay,250))},sR=t=>{let e=_e(t);e.shown&&(e.dismissed=e.shown,Tp(t))},US={role:"tooltip",id:t=>_e(t).id,data:{tooltipLayer:!0},state:{open:!1,placed:!1,title:"",description:"",x:0,y:0,side:"bottom"},tooltipPlacement:"bottom",display:"flex",flow:"column",gap:"X",theme:"dialog",padding:"Z1 A",round:"Y2",width:"max-content",maxWidth:"F2",textAlign:"center",position:"fixed",zIndex:2500,opacity:(t,e)=>e.open&&e.placed?"1":"0",visibility:(t,e)=>e.open&&e.placed?"visible":"hidden",pointerEvents:(t,e)=>e.open?"auto":"none",transition:"opacity A defaultBezier, visibility A defaultBezier",style:(t,e)=>({top:(e.y||0)+"px",left:(e.x||0)+"px"}),Text:{if:(t,e)=>!!e.title,text:(t,e)=>e.title,fontWeight:500,color:"currentColor"},P:{if:(t,e)=>!!e.description,text:(t,e)=>e.description,fontSize:"Z2",margin:"0",color:"currentColor",fontWeight:400},onDocumentPointerover:{capture:!0,passive:!0,handler:(t,e)=>{if(t.pointerType==="touch")return;let n=_e(e),r=FS(t.target),o=VB(e,r)?n.shown:nR(e,r);o===n.hover&&(o||!n.shown)||(n.hover=o,Ap(e,!1))}},onDocumentPointerout:{capture:!0,passive:!0,handler:(t,e)=>{if(t.relatedTarget)return;let n=_e(e);n.hover&&(n.hover=null,Ap(e,!1))}},onDocumentPointerdown:{capture:!0,passive:!0,handler:(t,e)=>{let n=_e(e),r=FS(t.target);n.shown&&r&&n.shown.contains(r)&&sR(e)}},onDocumentFocusin:{capture:!0,handler:(t,e)=>{let n=_e(e),r=FS(t.target),o=r&&zB(r)?nR(e,r):null;o!==n.focus&&(n.focus=o,Ap(e,!0))}},onDocumentFocusout:{capture:!0,handler:(t,e)=>{if(t.relatedTarget)return;let n=_e(e);n.focus&&(n.focus=null,Ap(e,!0))}},onDocumentKeydown:{capture:!0,handler:(t,e)=>{(t.key==="Escape"||t.key==="Esc")&&sR(e)}},onDocumentScroll:{capture:!0,passive:!0,handler:(t,e)=>{_e(e).shown&&Cp(e)}},onWindowResize:(t,e)=>{_e(e).shown&&Cp(e)},onBeforeRemove:t=>{let e=_e(t);Op(e),e.shown&&BS(e.shown,e.id),e.shown=e.hover=e.focus=e.dismissed=null}};var iR={display:"flex",theme:"dialog",background:"black",flow:"column",shape:"tooltip",shapeDirection:"left",padding:"Z1 A",round:"Y2",width:"fit-content",minWidth:"D2",maxWidth:"F2",gap:"X",textAlign:"center",attr:{tooltip:!0},Title:{if:t=>It(t.parent.title)||t.parent.title,width:"fit-content",fontWeight:500,color:"gray12",text:t=>t.parent.title},P:{if:(t,e)=>t.call("isDefined",t.call("exec",t.parent.description,t))||t.text,width:"fit-content",fontSize:"Z2",margin:"0",color:"gray6",fontWeight:"400",text:(t,e)=>t.call("exec",t.parent.description,t)}},aR={extends:"Tooltip",position:"absolute",pointerEvents:"none",opacity:"0",visibility:"hidden",transition:"C defaultBezier opacity, C defaultBezier visibility, B defaultBezier transform",onInit:t=>{let e=!t.shapeDirection||t.shapeDirection==="top"?{top:"112%",left:"50%",transform:"translate3d(-50%,10%,0)",".isActive":{transform:"translate3d(-50%,0,0)",opacity:1,visibility:"visible"}}:t.shapeDirection==="right"?{transform:"translate3d(10%,-50%,0)",left:"112%",top:"50%",".isActive":{transform:"translate3d(0%,-50%,0)",opacity:1,visibility:"visible"}}:t.shapeDirection==="bottom"?{transform:"translate3d(-50%,-10%,0)",bottom:"112%",left:"50%",".isActive":{transform:"translate3d(-50%,0,0)",opacity:1,visibility:"visible"}}:t.shapeDirection==="left"?{transform:"translate3d(10%,-50%,0)",right:"112%",top:"50%",".isActive":{transform:"translate3d(0%,-50%,0)",opacity:1,visibility:"visible"}}:{};Object.assign(t,e)}},cR={position:"relative",zIndex:999,onInit:t=>{let{Tooltip:e,TooltipHidden:n}=t,r=e||n;if(!r)return;let o=r&&r[".isActive"];Object.assign(t,{":hover, &:focus-visible":{zIndex:1e3,"& [tooltip]":o||{transform:"translate3d(-50%, 0, 0)",opacity:1,visibility:"visible"}}})}};var zS={};F(zS,{Avatar:()=>lR});var YB=t=>{let n=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><rect width="64" height="64" rx="32" fill="#71718A"/><text x="32" y="42" font-family="system-ui,sans-serif" font-size="28" font-weight="700" text-anchor="middle" fill="#fff">${String(t||"").trim().charAt(0).toUpperCase()||"?"}</text></svg>`;return"data:image/svg+xml;utf8,"+encodeURIComponent(n)},lR={extends:"Img",display:"block",avatarType:"adventurer-neutral",borderRadius:"100%",boxSize:"C+X C+X",src:t=>`https://api.dicebear.com/7.x/${t.avatarType||"initials"}/svg?seed=${t.key||"no-avatar"}`,onError:(t,e)=>{if(!e.node||e.node.__avatarFallbackApplied)return;e.node.__avatarFallbackApplied=!0;let n=e.node.getAttribute("alt")||(e.key!=="no-avatar"?e.key:"");e.node.src=YB(n)},attr:{alt:t=>t.alt!=null?t.alt:t.text?t.call("exec",t.text,t):t.key&&t.key!=="no-avatar"?t.key:""}};var HS={};F(HS,{Range:()=>fR});var fR={tag:"input",appearance:"none",width:"100%",height:"2px",outline:"none",flex:1,onInput:(t,e,n)=>{e.call("isFunction",e.onInput)?e.onInput(t,e,n):n.update({value:parseFloat(e.node.value)})},onChange:(t,e,n)=>{e.call("isFunction",e.onChange)?e.onChange(t,e,n):n.update({value:parseFloat(e.node.value)})},"::-webkit-slider-thumb":{boxSizing:"content-box",width:"8px",height:"8px",borderWidth:"2px",borderStyle:"solid",borderRadius:"100%",opacity:".8",appearance:"none"},"::-webkit-slider-runnable-track":{},"@dark":{background:"white.2","::-webkit-slider-thumb":{background:"#232526",borderColor:Ms("#454646",.75)},":hover":{"::-webkit-slider-thumb":{borderColor:Ms("#fff",.35)}},":focus":{"::-webkit-slider-thumb":{borderColor:"#3C6AC0"}}},"@light":{background:"gray9","::-webkit-slider-thumb":{background:"white",borderColor:"gray9"},":hover":{"::-webkit-slider-thumb":{borderColor:"gray7"}},":focus":{"::-webkit-slider-thumb":{borderColor:"blue"}}},deps:{returnPropertyValue:(t,e,n)=>{let r=t.call("exec",t[e],t);return(t.call("isFunction",r)?r(t,t.state):r!==void 0?r:n!==void 0?n:0)+""}},attr:{type:"range",value:(t,e)=>t.call("exec",e.value||t.value||t.defaultValue,t),min:(t,e)=>t.deps.returnPropertyValue(t,"min",0),max:(t,e)=>t.deps.returnPropertyValue(t,"max",100),step:(t,e)=>t.deps.returnPropertyValue(t,"step",1)}};var WS={};F(WS,{Dropdown:()=>uR,DropdownList:()=>dR,DropdownParent:()=>pR,DropdownParentFocus:()=>hR,DropdownSiblingFocus:()=>gR});var uR={attr:{dropdown:!0},position:"absolute",top:"100%",left:"0",zIndex:1e3,theme:"quaternary",padding:"Y",round:"Z2",flow:"column",gap:"X",transition:"transform B defaultBezier, opacity B defaultBezier, visibility B defaultBezier",transform:"translate3d(0,10%,0)",opacity:0,visibility:"hidden"},dR={display:"flex",attr:{dropdown:!0},padding:"0 Y",maxHeight:"G",flow:"column",theme:"quaternary",overflow:"hidden auto",style:{listStyleType:"none"},transition:"transform B defaultBezier, opacity B defaultBezier, visibility B defaultBezier",children:t=>t.options||[],childrenAs:"props",".hidden":{transform:"translate3d(0,10%,0)",opacity:0,visibility:"hidden"},childExtends:{extends:"Button",state:{},isActive:({key:t,state:e})=>e.active===t,position:"relative",round:"0",align:"center flex-end",flow:"row-reverse",padding:"Z2 C Z2 Y2",margin:"0",gap:"Y2",theme:"quaternary .child",":hover":{style:{svg:{opacity:"0.5"}}},Icon:{isActive:({key:t,state:e})=>e.active===t,name:"checkmark",opacity:"0.1",".active":{opacity:"1"}},":not(:first-child)":{"@dark":{border:"solid gray4.65"},"@light":{border:"solid gray11"},borderWidth:"1px 0 0"}}},pR={position:"relative",zIndex:999,":hover":{zIndex:1e3,"& [dropdown]":{transform:"translate3d(0,0,0)",opacity:1,visibility:"visible"}}},hR={position:"relative",tabindex:"0",":focus-within":{zIndex:1e3,"& [dropdown]":{transform:"translate3d(0,0,0)",opacity:1,visibility:"visible"}},Input_trigger:{type:"checkbox",opacity:"0",position:"absolute",inset:"0",width:"100%",height:"100%",cursor:"pointer",onClick:(t,e)=>{e.node===document.activeElement&&e.node.blur()}},Dropdown:{onClick:()=>{document.activeElement?.blur()}}},gR={position:"relative",tabindex:"0",":focus-within":{zIndex:1e3,"& ~ [dropdown]":{transform:"translate3d(0,0,0)",opacity:1,visibility:"visible"}},Input_trigger:{type:"checkbox",opacity:"0",position:"absolute",inset:"0",width:"100%",height:"100%",cursor:"pointer",onClick:(t,e)=>{e.node===document.activeElement&&e.node.blur()}}};var qS={};F(qS,{Notification:()=>mR});var mR={display:"flex",theme:"alert",padding:"Z1 B Z A",round:"A A A Y2",gap:"X2",cursor:"pointer",align:"flex-start center",IconText:{Icon:{name:"info outline"},Text:{":empty":{hide:!0}}},Hgroup:{extends:["Flex","Hgroup"],flow:"y",align:"flex-start",gap:"X2",H:{tag:"h6",margin:"0",fontWeight:"600",lineHeight:"1em",text:"Notification",":empty":{hide:!0}},P:{fontSize:"Z",margin:"0",text:"is not always a distraction",":empty":{hide:!0}}}};var Fo=Object.assign({},Nw,Fw,jw,Bw,Vw,qw,Kw,Gw,Hw,Yw,Xw,Ww,Zw,Qw,Jw,tS,eS,nS,rS,oS,sS,iS,aS,DS,IS,$S,MS,VS,zS,HS,WS,qS);function Rp(t){if(t==null)return 0;if(typeof t!="object")return yR(String(t));let e=2166136261;if(Array.isArray(t)){e=(e^91)*16777619;for(let r=0;r<t.length;r++)e=(e^Rp(t[r]))*16777619;return e>>>0}let n=Object.keys(t).sort();for(let r=0;r<n.length;r++)e=(e^yR(n[r]))*16777619,e=(e^Rp(t[n[r]]))*16777619;return e>>>0}function yR(t){let e=2166136261;for(let n=0;n<t.length;n++)e^=t.charCodeAt(n),e=e*16777619>>>0;return e}function Pp(t,e){if(t===e)return!0;if(t===null||e===null||typeof t!=typeof e||typeof t!="object")return!1;if(Array.isArray(t)){if(!Array.isArray(e)||t.length!==e.length)return!1;for(let o=0;o<t.length;o++)if(!Pp(t[o],e[o]))return!1;return!0}let n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(let o=0;o<n.length;o++){let s=n[o];if(!Object.prototype.hasOwnProperty.call(e,s)||!Pp(t[s],e[s]))return!1}return!0}function KS(t,e){if(e===void 0)return t;if(t===void 0)return e;if(e===null)return null;if(typeof e!="object"||Array.isArray(e))return e;if(typeof t!="object"||Array.isArray(t))return{...e};let n=!1,r={};for(let o in t)if(o in e){let s=KS(t[o],e[o]);r[o]=s,s!==t[o]&&(n=!0)}else r[o]=t[o];for(let o in e)o in t||(r[o]=e[o],n=!0);return n?r:t}function GS(t,e,n){if(!e||typeof e!="object")return t;if(!t||typeof t!="object")return e;if(n||(n=new WeakSet),n.has(e))return t;n.add(e);for(let r in e){let o=e[r];o&&typeof o=="object"&&!Array.isArray(o)&&t[r]&&typeof t[r]=="object"&&!Array.isArray(t[r])?GS(t[r],o,n):t[r]=o}return t}function Lr(t){let e=2166136261;for(let n=0;n<t.length;n++)e^=t.charCodeAt(n),e=e*16777619>>>0;return e.toString(36)}function Ri(t){return t.replace(/[A-Z]/g,e=>"-"+e.toLowerCase())}function Hl(t){let e=String(t);return e.length<=20?e.replace(/\s+/g,"_").replace(/[^a-zA-Z0-9_-]/g,"").toLowerCase():Lr(e)}function bR(t){return t.split(`
|
|
88
|
-
`).map(
|
|
89
|
-
`)}var
|
|
90
|
-
${c}`}var
|
|
91
|
-
`)}function
|
|
92
|
-
${a}`}var YS=null;function Dp(t){YS=t}var sn={structuralHash:Rp,deepEqual:Pp,mergeStructural:KS,overwriteDeep:GS,shortHash:Lr,toKebab:Ri,sanitizeValue:Hl,batchShortHash:bR,atomicCssClass:wR,batchAtomicCss:xR,compoundCssClass:kR},vR=!1,Lp=null;function ER(t){return Lp||(Lp=import(t||"@symbo.ls/wasm/pkg").then(e=>(e.structuralHash&&(sn.structuralHash=e.structuralHash),e.deepEqual&&(sn.deepEqual=e.deepEqual),e.mergeStructural&&(sn.mergeStructural=e.mergeStructural),e.overwriteDeep&&(sn.overwriteDeep=e.overwriteDeep),e.shortHash&&(sn.shortHash=e.shortHash),e.toKebab&&(sn.toKebab=e.toKebab),e.sanitizeValue&&(sn.sanitizeValue=e.sanitizeValue),e.batchShortHash&&(sn.batchShortHash=e.batchShortHash),e.atomicCssClass&&(sn.atomicCssClass=e.atomicCssClass),e.batchAtomicCss&&(sn.batchAtomicCss=e.batchAtomicCss),e.compoundCssClass&&(sn.compoundCssClass=e.compoundCssClass),vR=!0,YS&&e.batchAtomicCss&&YS({batchAtomicCss:e.batchAtomicCss,compoundCssClass:e.compoundCssClass}),!0)).catch(e=>(console.debug("[smbls] WASM not available, using JS fallbacks:",e.message),!1)),Lp)}function AR(){return vR}I();var Wl={};F(Wl,{CDN_PROVIDERS:()=>Ne,DOMQL_EVENTS:()=>Hg,DOMQ_PROPERTIES:()=>sr,ELEMENT_METHOD_OVERRIDE_POINTS:()=>us,ENV:()=>fm,HTML_TAGS:()=>ys,LIBRARY_PACKAGES:()=>Ju,LIBRARY_SCOPES_KEY:()=>ao,METHODS:()=>ar,METHODS_EXL:()=>_a,NODE_ENV:()=>Ye,OPTIONS:()=>qa,PACKAGE_MANAGER_TO_CDN:()=>pr,PARSED_DOMQ_PROPERTIES:()=>ba,PROPS_METHODS:()=>ir,REVIVED_MARK:()=>Ea,STATE_METHODS:()=>Wr,STATE_PROPERTIES:()=>Vg,SVG_TAGS:()=>Pk,TYPES:()=>ua,UNIVERSAL_RESERVED_KEYS:()=>qu,__resetBuiltinMethodWarnings:()=>nb,addCaching:()=>_u,addContext:()=>bu,addExtend:()=>Dm,addExtends:()=>pn,addItemAfterEveryElement:()=>Og,addProtoToArray:()=>ha,addRef:()=>gu,applyCSS:()=>QS,applyDependentState:()=>Qm,applyEvent:()=>Eu,applyEventUpdate:()=>Au,applyExtends:()=>Ik,applyProps:()=>ja,arrayContainsOtherArray:()=>xg,arraysEqual:()=>Pg,arrayzeValue:()=>fo,bindLibraryGlobalScopes:()=>xc,buildImgSrcset:()=>Cc,buildSourcesAndImg:()=>Tc,cache:()=>ry,call:()=>Py,captureSnapshot:()=>Dy,checkForStateTypes:()=>Gm,checkIfInherits:()=>vu,checkIfStringIsInArray:()=>Ig,clone:()=>Yg,cloneAndMergeArrayExtend:()=>Pa,cloneFunction:()=>ym,collectExtendsList:()=>bs,concatAddExtends:()=>Rm,copyJavaScriptToClipboard:()=>cb,copyStringToClipboard:()=>ab,createBasedOnType:()=>hu,createElement:()=>Km,createElementExtends:()=>nu,createExtends:()=>Da,createExtendsFromKeys:()=>_s,createExtendsStack:()=>iu,createIfConditionFlag:()=>bm,createInheritedState:()=>Ym,createKey:()=>Oa,createNestedObject:()=>rm,createNestedObjectByKeyPath:()=>Zm,createObjectWithoutPrototype:()=>Gf,createParent:()=>mu,createPath:()=>yu,createProps:()=>Ba,createPropsStack:()=>du,createRoot:()=>qm,createScope:()=>ty,createSnapshotId:()=>Ta,customDecodeURIComponent:()=>Ug,customEncodeURIComponent:()=>Bg,cutArrayAfterValue:()=>Cg,cutArrayBeforeValue:()=>Ag,debounce:()=>Ra,debounceOnContext:()=>gm,decodeNewlines:()=>jg,deepClone:()=>ut,deepContains:()=>em,deepDefaults:()=>Rs,deepDestringifyFunctions:()=>ce,deepExtend:()=>eu,deepMerge:()=>ft,deepMergeExtends:()=>hn,deepStringifyFunctions:()=>xa,defineSetter:()=>Oy,destringifyGlobalScope:()=>Qr,detectHeightOnInit:()=>Fy,detectInfiniteLoop:()=>am,document:()=>dt,encodeNewlines:()=>Fg,error:()=>no,excludeKeysFromObject:()=>lm,exec:()=>pt,exposeBagGlobalScopes:()=>kc,extendCachedRegistry:()=>Pm,extendStackRegistry:()=>Ia,extractArrayExtend:()=>Ma,fetchLibraryData:()=>td,fibonacciNumberByIndex:()=>jy,fileEntryUrl:()=>Yu,filterArrays:()=>Lg,filterArraysFast:()=>Dg,finalizeExtends:()=>au,findClosestNumber:()=>Xu,findClosestNumberInFactory:()=>Zy,findInheritedState:()=>ku,findKeyPosition:()=>Mg,flattenExtend:()=>ws,formatDate:()=>Ny,generateHash:()=>Qf,generateHeadArrayTags:()=>Gu,generateKey:()=>Ca,generateMetaTags:()=>Yy,get:()=>Ey,getActiveRoute:()=>RS,getCDNDirUrl:()=>Ku,getCDNUrl:()=>Qe,getCapitalCaseKeys:()=>Mm,getCdnProviderFromConfig:()=>Ts,getChildStateInKey:()=>xu,getChildren:()=>Ty,getContext:()=>uc,getCookie:()=>km,getDB:()=>mc,getEmotionStylesheet:()=>db,getExtendsInElement:()=>Im,getExtendsStack:()=>La,getExtendsStackRegistry:()=>tu,getFrequencyInArray:()=>kg,getFunctionSource:()=>te,getHashedExtend:()=>$a,getImportMapScript:()=>My,getInObjectByPath:()=>im,getLocalStorage:()=>Em,getNev:()=>hm,getPageMetadata:()=>Xy,getParentStateInKey:()=>Su,getPath:()=>sc,getQuery:()=>yc,getRef:()=>Cy,getRoot:()=>cc,getRootContext:()=>fc,getRootData:()=>lc,getRootState:()=>ac,getRootStateInKey:()=>wu,getSpreadChildren:()=>Nm,global:()=>_g,hasFunction:()=>Jt,hasHandlerPlugin:()=>gs,hasOwnProperty:()=>Qg,hashContent:()=>so,inheritChildExtends:()=>ou,inheritChildPropsExtends:()=>ru,inheritParentProps:()=>Ua,inheritRecursiveChildExtends:()=>su,init:()=>Gn,initProps:()=>zm,is:()=>ae,isArray:()=>D,isBoolean:()=>Uf,isBuiltinElementMethod:()=>zg,isContextComponent:()=>Fm,isCyclic:()=>cm,isDOMNode:()=>ie,isDate:()=>zf,isDefined:()=>It,isDevelopment:()=>lr,isEmpty:()=>qf,isEmptyObject:()=>Jg,isEqualDeep:()=>Kf,isFailedRevival:()=>Xr,isFunction:()=>P,isHtmlElement:()=>la,isLazyFunction:()=>Xg,isLocal:()=>pm,isLoudDevRuntime:()=>Q,isMalformedDependency:()=>ro,isMethod:()=>Ly,isMobile:()=>Sm,isNode:()=>En,isNot:()=>Sg,isNotProduction:()=>An,isNull:()=>Vf,isNumber:()=>Ie,isObject:()=>E,isObjectLike:()=>q,isPhoto:()=>By,isPolyglotRetranslatableKey:()=>Wa,isPolyglotWritableKey:()=>to,isProduction:()=>cr,isProtectedElementMethod:()=>qr,isRevived:()=>Zr,isStaging:()=>dm,isState:()=>Xm,isString:()=>v,isStringFunction:()=>hs,isStringTag:()=>va,isTest:()=>Xf,isTesting:()=>um,isUndefined:()=>Bt,isUniversallyReservedKey:()=>Iy,isUnresolvableDependency:()=>hr,isValidDependencyMap:()=>oo,isValidHtmlTag:()=>Cm,isWrappedLibrary:()=>Je,joinArrays:()=>cs,jointStacks:()=>Lm,keys:()=>Hu,lastLevel:()=>Ep,lastPathname:()=>Mo,libraryPackageSpecs:()=>Ps,loadCssFile:()=>Hy,loadJavascript:()=>Wy,loadJavascriptFile:()=>Uy,loadJavascriptFileEmbedSync:()=>zy,loadJavascriptFileSync:()=>Vy,loadLazy:()=>vS,loadRemoteCSS:()=>qy,loadRemoteScript:()=>Os,log:()=>Ry,logGroupIf:()=>wm,logIf:()=>_m,lookdown:()=>ky,lookdownAll:()=>vy,lookup:()=>xy,lowercaseFirstLetter:()=>Hr,makeObjectWithoutPrototype:()=>tm,map:()=>Gg,mapStringsWithContextComponents:()=>Na,markPolyglotSeeded:()=>mn,markRevived:()=>ps,matchRoute:()=>CS,matchesComponentNaming:()=>gn,memoize:()=>mm,merge:()=>xt,mergeSharedLibraries:()=>vc,mergeSharedLibraryDesignSystems:()=>Ec,nextElement:()=>pc,normalizeIgnoreList:()=>Sc,normalizeLibraryKey:()=>co,objectToString:()=>ka,objectizeStringProperty:()=>Fa,overwrite:()=>Aa,overwriteDeep:()=>ee,overwriteShallow:()=>Jr,overwriteState:()=>Jm,parse:()=>Wu,parseDeep:()=>rc,parseQuery:()=>TS,parseRoutePattern:()=>AS,pickupElementFromProps:()=>fu,pickupPropsFromElement:()=>lu,polyglotSeededKeys:()=>Ss,previousElement:()=>hc,promoteActiveRootState:()=>vs,propExists:()=>Um,propertizeElement:()=>uu,propertizeUpdate:()=>Bm,reinit:()=>ZS,remove:()=>Av,removeChars:()=>lb,removeCookie:()=>vm,removeDuplicateProps:()=>za,removeDuplicatesInArray:()=>ls,removeFromArray:()=>vg,removeFromObject:()=>nm,removeNestedKeyByPath:()=>om,removeValueFromArray:()=>pa,removeValueFromArrayAll:()=>Tg,reorderArrayByValues:()=>Rg,repairLegacyArrowScopePreamble:()=>wa,replaceLiteralsWithObjectFields:()=>Vt,replaceOctalEscapeSequences:()=>Ng,resolveAsset:()=>fe,resolveFileReferences:()=>io,resolveHandler:()=>ms,resolveRouterElement:()=>zl,resolveSharedLibraries:()=>ib,returnValueAsText:()=>pu,router:()=>Pe,runGuards:()=>OS,runPluginHook:()=>Ct,saveScrollPosition:()=>Ul,scratchSystem:()=>Ys,scratchUtils:()=>br,self:()=>wg,set:()=>vo,setActiveRootState:()=>ic,setCookie:()=>xm,setHashedExtend:()=>Jf,setInObjectByPath:()=>sm,setLocalStorage:()=>Am,setNodeStyles:()=>zu,setProps:()=>Ay,setPropsPrototype:()=>Va,sharedLibrary:()=>eb,splitPackageSpecifier:()=>bc,spotByPath:()=>oc,srcsetFor:()=>Ds,stringIncludesAny:()=>ma,stringToObject:()=>Zg,stripVersionRangePrefix:()=>_c,swapItemsInArray:()=>Eg,syncProps:()=>Ha,toCamelCase:()=>lo,toDashCase:()=>Ac,toDescriptionCase:()=>ub,toPriorityOrder:()=>$e,toTitleCase:()=>fb,toggleFullscreen:()=>$y,triggerEventOn:()=>Cn,triggerEventOnUpdate:()=>ey,trimStringFromSymbols:()=>$g,unstackArrayOfObjects:()=>da,update:()=>Vm,updateProps:()=>Hm,variables:()=>gc,verbose:()=>Es,warn:()=>dc,warnLibraryAliasCollision:()=>Ls,window:()=>C});I();I();var r3=O(),CR=(t=r3,e)=>{let n=E(e.localFile)?e.localFile:{},r=ut(n.designSystem||{});return ft(t,r,Ee)},o3={useVariable:!0,useReset:!0,useFontImport:!0,useIconSprite:!0,useDocumentTheme:!0,useSvgSprite:!0},Ip=(t,e)=>{let n=!e||e===":root",r={};for(let o in t)if(o.startsWith("@media")){let s=n?":root:not([data-theme])":`:root:not([data-theme]) ${e}:not([data-theme])`;r[o]={[s]:t[o]}}else n?r[o]=t[o]:r[`${e}${o}, ${o} ${e}`]=t[o];return r},XS=(t,e)=>{t.CSS_MEDIA_VARS&&vt(Ip(t.CSS_MEDIA_VARS,e));let n=ko(t.cssSkinVars,t.cssSkinFallback,e);Object.keys(n).length&&vt(n)},Gn=(t,e=o3)=>{let n=CR(t||{},e),r=e.scopeSelector||":root",o=e.globalTheme;if(typeof window<"u"&&window.location){let h=new URLSearchParams(window.location.search).get("globalTheme");h&&(o=h)}let s=vo({verbose:e.verbose,useReset:e.useReset,useFontImport:e.useFontImport,useVariable:e.useVariable,useSvgSprite:e.useSvgSprite,useDocumentTheme:e.useDocumentTheme,useIconSprite:e.useIconSprite,useDefaultConfig:e.useDefaultConfig,globalTheme:o,themeRoot:e.themeRoot,files:e.files,assets:e.assets,...n},{newConfig:e.newConfig,config:e.config});s&&(s.scopeSelector=r);let i=Dc(s.font,s.files),a=s.useReset,c=s.useVariable,l=s.useFontImport,f=s.useSvgSprite,u=t.svg,d=s.useIconSprite,p=t.icons;l&&vt(i),c&&(vt({[r]:s.CSS_VARS}),XS(s,r)),a&&vt(s.reset);let g=s.animation;if(g){let h={};for(let m in g)h[`@keyframes ${m}`]=g[m];vt(h)}return(u||f)&&sl(s.svg,{document:e.document}),(p||d)&&xo(s.icons,{document:e.document}),s},$p={},ZS=(t,e=$p)=>{let n=CR(t||{},e),r=e.scopeSelector||":root",o=vo({verbose:!1,...n});return e.preventInject||(vt({[r]:o.CSS_VARS}),XS(o,r),vt(o.reset)),o},QS=(t,e=$p)=>{vt(t)},s3=(t,e=$p)=>{let n=e.scopeSelector||":root";vt({[n]:t.CSS_VARS}),XS(t,n)};var i3=(t,e=$p)=>{};I();var OR=t=>!t||t==="srcdoc"||t==="about:srcdoc"||t==="blank"||t==="about:blank"?"/":t,a3=t=>{let e=t&&t.initialPath;return typeof e!="string"||!e?null:e[0]==="/"?e:"/"+e},tx={initRouter:!0,injectRouterInLinkComponent:!0,popState:!0},c3=(t,e)=>{if(!e)return t;let n=Array.isArray(e)?e:e.split("."),r=t;for(let o of n){if(!r||!r[o])return null;r=r[o]}return r},ql=(t,e)=>(zl||c3)(t,e),l3=["manual","auto","restore"],JS=new WeakMap,TR=(t,e)=>{let n=e.claims[e.claims.length-1],r=n?n.value:e.found;t.scrollRestoration!==r&&(t.scrollRestoration=r)},f3=(t,e)=>{let n=e&&e.scrollRestoration;if(n!=null){if(!l3.includes(n)){if(t.verbose!==!1){let r=typeof n=="string"?JSON.stringify(n):`a ${typeof n}`;console.warn(`[smbls/router] router.scrollRestoration must be 'manual', 'auto' or 'restore', got ${r} \u2014 the browser default stays`)}return}try{let r=t.window||C,o=r&&r.history;if(!o||!("scrollRestoration"in o))return;let s=JS.get(o);s||(s={found:o.scrollRestoration,claims:[]},JS.set(o,s));let i={value:n==="restore"?"manual":n};s.claims.push(i),TR(o,s),t.__teardowns=t.__teardowns||[],t.__teardowns.push(()=>{let a=s.claims.indexOf(i);if(a!==-1){s.claims.splice(a,1),s.claims.length||JS.delete(o);try{TR(o,s)}catch{}}})}catch{}}},u3=(t,e)=>{if(!e||e.scrollRestoration!=="restore")return;let n=Ul,r=t.window||C;if(typeof n!="function"||!r||typeof r.addEventListener!="function")return;let o=t.document||r.document,s=()=>n(r),i=()=>{o.visibilityState==="hidden"&&n(r)};r.addEventListener("pagehide",s);let a=!!o&&typeof o.addEventListener=="function";a&&o.addEventListener("visibilitychange",i),t.__teardowns=t.__teardowns||[],t.__teardowns.push(()=>{r.removeEventListener("pagehide",s),a&&o.removeEventListener("visibilitychange",i)})},RR=(t,e)=>{if(e.router===!1)return;e.router===!0?e.router=tx:e.router=xt(e.router||{},tx);let n=e.router;f3(e,n),u3(e,n);let r=async(s,i)=>{let a=s.context?.window||C,c=a3(n);if(!c){if(!a.location)return;let{pathname:f,search:u,hash:d}=a.location;f=OR(f),c=f+u+d}let l=s;if(n.customRouterElement){let f=ql(s,n.customRouterElement);f&&(l=f,s.routes&&(l.routes=s.routes))}l.routes&&await Pe(c,l,{},{initialRender:!0,pushState:!1})},o=!Bt(t.onRenderRouter);return n&&n.initRouter&&!o&&(t.onRenderRouter=r),d3(e,n),n},ex=(t,e)=>{if(e.router===!1)return;let n=e.router||tx;if(!n.popState)return;let r=e.utils&&e.utils.router?e.utils.router:Pe,o=e.window||C,s=async i=>{let{pathname:a,search:c,hash:l}=o.location;a=OR(a);let f=a+c+l,u=t;if(n.customRouterElement){let d=ql(t,n.customRouterElement);d&&(u=d,t.routes&&(u.routes=t.routes))}await u.call("router",f,u,{},{pushState:!1,scrollToTop:!1,level:0,event:i})};o.addEventListener("popstate",s),e.__teardowns=e.__teardowns||[],e.__teardowns.push(()=>o.removeEventListener("popstate",s))},d3=(t,e)=>{let{components:n}=t;if(e&&e.injectRouterInLinkComponent)return ft(n.Link||n["smbls.Link"],n.RouterLink||n["smbls.RouterLink"])};I();var PR=C&&C.location&&typeof C.location.host=="string"?C.location.host:null,nx=PR!==null?PR.includes("dev."):lr(),LR=nx?"http://localhost:8080/get":"https://api.symbols.app/get",p3={endpoint:LR},DR=async(t,e=p3)=>{let n=e.endpoint||LR,r=e.serviceRoute?D(e.serviceRoute)?e.serviceRoute.map(s=>s.toLowerCase()+"=true").join("&"):e.serviceRoute:"",o;try{return o=await globalThis.fetch(n+"/?"+r,{method:"GET",headers:{"Content-Type":"application/json","X-AppKey":t,"X-Metadata":e.metadata}}),await o.json()}catch(s){if(P(e.onError))return e.onError(s);console.error(s)}},h3=async(t,e)=>{let{editor:n}=e;if(n&&n.remote){let r=await DR(t,n),o=nx||e.isDevelopment?ce(r):ce(r.releases[0]);n.serviceRoute?D(n.serviceRoute)?n.serviceRoute.forEach(s=>{ee(e[s],o[s.toLowerCase()])}):ee(e[n.serviceRoute],o):["state","designSystem","components","snippets","pages","utils","files","assets","packages","functions","globalScope"].forEach(s=>{ee(e[s],o[s.toLowerCase()])})}return e},g3=async(t,e,n)=>{let{editor:r}=e;if(r&&r.remote){let o=await DR(t,r),s=nx||e.isDevelopment?ce(o):ce(o.releases[0]);n(s)}},IR=async(t,e)=>{if(t&&e.editor)try{e.editor.async||await h3(t,e)}catch(n){console.error(n)}},$R=(t,e,n,r)=>{if(e&&n.editor)try{n.editor.async&&g3(e,n,r||(o=>{let s=o.designSystem;E(s)&&n.utils.init(s),E(o.state)&&t.state.set(o.state)}))}catch(o){console.error(o)}};var Kl=t=>{if(!t||t.__destroyed)return!1;let e=t.context;if(!e)return t.__destroyed=!0,!1;if(Array.isArray(e.__teardowns)){for(let n of e.__teardowns)try{n()}catch(r){console.error("[smbls] destroy teardown error:",r)}e.__teardowns.length=0}try{zn(t)}catch(n){console.error("[smbls] dispose error:",n)}if(e.fetch&&e.fetch.__resolved&&delete e.fetch.__resolved,e.fetch&&e.fetch.__resolving&&delete e.fetch.__resolving,e.db&&e.db.__resolved&&delete e.db.__resolved,e.db&&e.db.__resolving&&delete e.db.__resolving,e.analyze?.destroy)try{e.analyze.destroy()}catch(n){console.error("[analyze] destroy error:",n)}return t.__destroyed=!0,!0};var gx={};F(gx,{Helmet:()=>JR,applyMetadata:()=>px,default:()=>I3,extractMetadata:()=>b3,generateHeadHtml:()=>D3,helmetPlugin:()=>hx,resolveMetadata:()=>Li});I();Kt();var qe={title:{tag:"title"},description:{tag:"meta",attr:"name",key:"description"},keywords:{tag:"meta",attr:"name",key:"keywords"},robots:{tag:"meta",attr:"name",key:"robots"},author:{tag:"meta",attr:"name",key:"author"},canonical:{tag:"link",attr:"rel",key:"canonical",valueAttr:"href"},image:{tag:"meta",attr:"property",key:"og:image"},url:{tag:"meta",attr:"property",key:"og:url"},siteName:{tag:"meta",attr:"property",key:"og:site_name"},type:{tag:"meta",attr:"property",key:"og:type"},locale:{tag:"meta",attr:"property",key:"og:locale"},"og:title":{tag:"meta",attr:"property",key:"og:title"},"og:description":{tag:"meta",attr:"property",key:"og:description"},"og:image":{tag:"meta",attr:"property",key:"og:image"},"og:url":{tag:"meta",attr:"property",key:"og:url"},"og:type":{tag:"meta",attr:"property",key:"og:type"},"og:site_name":{tag:"meta",attr:"property",key:"og:site_name"},"og:locale":{tag:"meta",attr:"property",key:"og:locale"},"twitter:card":{tag:"meta",attr:"name",key:"twitter:card"},"twitter:title":{tag:"meta",attr:"name",key:"twitter:title"},"twitter:description":{tag:"meta",attr:"name",key:"twitter:description"},"twitter:image":{tag:"meta",attr:"name",key:"twitter:image"},"twitter:site":{tag:"meta",attr:"name",key:"twitter:site"},"theme-color":{tag:"meta",attr:"name",key:"theme-color"}},Yn=t=>{if(t.tag==="link")return`link[${t.attr}="${t.key}"]`;if(t.tag&&!t.attr&&!t.key)return t.tag;if(t.tag&&t.attr&&t.key)return`${t.tag}[${t.attr}="${t.key}"]`},MR=t=>ce({v:t}).v,NR=(t,e,n,r)=>{try{return pt(t,e,n)}catch(o){console.warn(`[helmet] metadata factory for "${r}" threw; treating as unset:`,o&&o.message||o);return}},sx=Object.freeze({authored:!0}),Li=(t,e,n,r)=>{if(!t)return{};let o=t;v(o)&&Jt(o)&&(o=MR(o));let s=P(o),i=!s&&r?.authored===!0,a=s?NR(o,e,n,"metadata"):E(o)?{...o}:{};if(!E(a))return{};for(let c in a){let l=a[c],f=i&&v(l)&&!Jt(l);v(l)&&Jt(l)&&(l=MR(l)),P(l)?l=NR(l,e,n,c):v(l)&&Jt(l)&&(l=void 0),v(l)&&l.includes("{{")&&e?.call&&(l=f?e.call("replaceLiteralsWithObjectFields",l,n,sx):e.call("replaceLiteralsWithObjectFields",l,n)),a[c]=l}return a},m3=t=>!!t&&typeof t=="object"&&(t.notFound===!0||t.metadata?.notFound===!0),y3=(t,e)=>{if(Object.prototype.hasOwnProperty.call(t,e))return t[e];if(t["/*"])return t["/*"];if(t["*"])return t["*"];for(let n in t)if(m3(t[n]))return t[n]},b3=(t,e="/",n,r)=>{let o=t.pages||{},s=y3(o,e),i={};if(t.integrations?.seo&&(i={...t.integrations.seo}),t.app?.metadata){let l=Li(t.app.metadata,n,r,sx);i={...i,...l}}let a=new Set;if(s){let l=s.metadata||s.helmet||{},f=Li(l,n,r,sx);for(let u in f)a.add(u);i={...i,...f},!i.title&&s.state?.title&&(i.title=s.state.title,a.add("title")),!i.description&&s.state?.description&&(i.description=s.state.description,a.add("description"))}i.title||(i.title=t.name||"Symbols"),i.title&&(a.has("title")||!i["og:title"])&&(a.has("og:title")||(i["og:title"]=i.title)),i.description&&(a.has("description")||!i["og:description"])&&(a.has("og:description")||(i["og:description"]=i.description)),i.title&&!i["twitter:title"]&&(i["twitter:title"]=i.title),i.description&&!i["twitter:description"]&&(i["twitter:description"]=i.description);let c=a.has("og:url")?i["og:url"]:a.has("url")?i.url:void 0;if(c)i["og:url"]=c;else if(i["og:url"]||i.url){let l=(i["og:url"]||i.url||"").replace(/\/$/,"");if(l&&e&&e!=="/"){let f=e.startsWith("/")?e:"/"+e;i["og:url"]=l+f}}return io(i,t.files)},UR=(t,e)=>io(Li(t,e,e.state),e.context?.files),VR=t=>Object.prototype.hasOwnProperty.call(qe,t),Mp=new Map;for(let t in qe){let e=Yn(qe[t]);Mp.has(e)||Mp.set(e,qe[t])}var Np=t=>t.head||t.querySelector("head"),fx=(t,e)=>{let n=Np(t);return n?n.querySelector(e):null},ix=(t,e)=>e.tag==="title"?t.textContent:t.getAttribute(e.valueAttr||"content"),ux=(t,e,n)=>{e.tag==="title"?t.textContent=n:t.setAttribute(e.valueAttr||"content",n)},dx=(t,e)=>{let n=Np(e);if(!n)return null;let r=e.createElement(t.tag);return t.attr&&r.setAttribute(t.attr,t.key),n.appendChild(r),r},Pi=t=>{let e=5381,n=String(t);for(let r=0;r<n.length;r++)e=(e*33^n.charCodeAt(r))>>>0;return e.toString(36)},Di=(t,e,n,r)=>{let o=t.head||t.querySelector("head");if(!o)return;let s=new Map;for(let a of o.querySelectorAll(`[${e}]`))s.set(a.getAttribute(e),a);let i=new Set;for(let a of n)i.add(a);for(let[a,c]of s)i.has(a)||c.remove();for(let a of n){if(s.has(a))continue;let c=r(a);c&&(c.setAttribute(e,a),o.appendChild(c))}},zR=(t,e)=>{let r=(e||[]).filter(s=>s!=null).map(s=>v(s)?s:JSON.stringify(s)),o=r.map(Pi);Di(t,"data-smbls-jsonld",o,s=>{let i=o.indexOf(s),a=t.createElement("script");return a.setAttribute("type","application/ld+json"),a.textContent=r[i],a})},HR=(t,e)=>{let n=(e||[]).filter(o=>o!=null&&String(o).trim()),r=n.map(Pi);Di(t,"data-smbls-style",r,o=>{let s=r.indexOf(o),i=t.createElement("style");return i.textContent=String(n[s]),i})},WR=t=>(t||[]).filter(e=>e&&(v(e)?e.trim():e.src)),qR=t=>v(t)?t:String(t.src),KR=(t,e)=>{let n=t.createElement("script");return v(e)?n.setAttribute("src",e):(e.src&&n.setAttribute("src",e.src),e.type&&n.setAttribute("type",e.type),e.async&&(n.async=!0),e.defer&&(n.defer=!0),e.integrity&&n.setAttribute("integrity",e.integrity),e.crossorigin&&n.setAttribute("crossorigin",e.crossorigin),e.referrerpolicy&&n.setAttribute("referrerpolicy",e.referrerpolicy),e.nomodule&&(n.noModule=!0),e.body&&(n.textContent=String(e.body))),n},_3=(t,e)=>{let n=WR(e),r=n.map(qR);Di(t,"data-smbls-script",r,o=>KR(t,n[r.indexOf(o)]))},GR=t=>`${t.hreflang||""}|${t.href||""}`,ax=t=>E(t)?Pi(JSON.stringify(t)):String(t),YR=(t,e)=>{let n=(e||[]).filter(o=>E(o)),r=n.map(GR);Di(t,"data-smbls-alternate",r,o=>{let s=r.indexOf(o),i=t.createElement("link");i.setAttribute("rel","alternate");for(let[a,c]of Object.entries(n[s]))i.setAttribute(a,c);return i})},XR=(t,e)=>{let n=(e||[]).filter(o=>o!=null),r=n.map(ax);Di(t,"data-smbls-favicon",r,o=>{let s=r.indexOf(o),i=n[s],a=t.createElement("link");if(a.setAttribute("rel","icon"),E(i))for(let[c,l]of Object.entries(i))a.setAttribute(c,l);else a.setAttribute("href",String(i));return a})},ZR=(t,e)=>{let n=e?String(e):"",r=n.endsWith(".svg")?"image/svg+xml":n.endsWith(".png")?"image/png":"";Di(t,"data-smbls-single-icon",n?[n]:[],o=>{let s=t.createElement("link");return s.setAttribute("rel","icon"),s.setAttribute("href",o),r&&s.setAttribute("type",r),s})},px=(t,e)=>{if(!(!E(t)||!e)){for(let n in t){let r=t[n];if(r==null||!VR(n))continue;let o=qe[n],s=fx(e,Yn(o))||dx(o,e);s&&ux(s,o,r)}Array.isArray(t.jsonLd)&&zR(e,t.jsonLd),Array.isArray(t.styles)&&HR(e,t.styles),Array.isArray(t.scripts)&&_3(e,t.scripts),Array.isArray(t.alternate)&&YR(e,t.alternate),Array.isArray(t.favicons)&&XR(e,t.favicons),(t.icon||t.favicon)&&ZR(e,t.icon||t.favicon)}},FR=new WeakMap,cx=new WeakMap,QR=t=>{let e=t.location;return e&&v(e.pathname)?e.pathname:null},w3=t=>{let e=FR.get(t);return e||(e={doc:t,layers:[],servedPath:QR(t),originals:new Map,owned:new Set,lists:new Set},FR.set(t,e)),e},S3=(t,e)=>{for(let n=e.parent;n&&n!==n.parent;n=n.parent)if(n===t)return!0;return!1},x3=(t,e)=>{let n=cx.get(t);if(n)return n;let r=w3(e),o={element:t,values:null,disposed:!1,set(i){o.disposed||(o.values=i,BR(r))},dispose(){if(o.disposed)return;o.disposed=!0;let i=r.layers.indexOf(o);i!==-1&&r.layers.splice(i,1);try{BR(r)}catch(a){console.warn("[helmet] could not re-render the head after an element left:",a&&a.message||a)}}},s=r.layers.length;for(let i=0;i<r.layers.length;i++)if(S3(t,r.layers[i].element)){s=i;break}return r.layers.splice(s,0,o),cx.set(t,o),o},lx=(t,e,n,r)=>{let o=x3(t,e),s=K(()=>{let a=n();o.set(a),r&&r(a)}),i=t.__ref?.__effects;i&&i.push(s,o)},k3=Yn(qe.title),v3=Yn(qe.description),E3=Yn(qe["og:title"]),A3=Yn(qe["og:description"]),C3=Yn(qe["twitter:title"]),T3=Yn(qe["twitter:description"]),jR=(t,e,n,r)=>{let o=t.get(e);if(!o||!o.value)return;let s=t.get(n);(!s||!s.value||s.rank<o.rank)&&t.set(n,o);let i=t.get(r);(!i||!i.value)&&t.set(r,o)},rx={jsonLd:zR,styles:HR,alternate:YR,favicons:XR,icon:ZR},O3=t=>{let e=new Map,n={},r=[];for(let o=0;o<t.length;o++){let s=t[o].values;if(!E(s))continue;for(let a in s){let c=s[a];c==null||!VR(a)||e.set(Yn(qe[a]),{value:String(c),rank:o})}for(let a of["jsonLd","styles","alternate","favicons"])Array.isArray(s[a])&&(n[a]=s[a]);let i=s.icon||s.favicon;i&&(n.icon=i),Array.isArray(s.scripts)&&r.push(...s.scripts)}return jR(e,k3,E3,C3),jR(e,v3,A3,T3),{tags:e,lists:n,scripts:r}},R3=(t,e,n)=>{let{doc:r,originals:o}=t,s=Mp.get(e),i=fx(r,e),a=o.get(e);a||(a={value:i?ix(i,s):null,rendered:!1},o.set(e,a)),a.value===n&&(a.rendered=!0),i||(i=dx(s,r)),i&&(ix(i,s)!==n&&ux(i,s,n),t.owned.add(e))},P3=(t,e)=>{let{doc:n}=t;t.owned.delete(e);let r=Mp.get(e),o=fx(n,e),s=t.originals.get(e);if(s&&s.value!==null&&!s.rendered&&QR(n)===t.servedPath){let a=o||dx(r,n);a&&ix(a,r)!==s.value&&ux(a,r,s.value)}else o&&o.remove()},L3=(t,e)=>{let n=WR(e);if(!n.length)return;let r=Np(t),o=new Set;for(let s of r.querySelectorAll("[data-smbls-script]"))o.add(s.getAttribute("data-smbls-script"));for(let s of n){let i=qR(s);if(o.has(i))continue;let a=KR(t,s);a.setAttribute("data-smbls-script",i),r.appendChild(a),o.add(i)}},BR=t=>{let{doc:e}=t;if(!Np(e))return;let{tags:n,lists:r,scripts:o}=O3(t.layers);for(let s of[...t.owned])n.has(s)||P3(t,s);for(let[s,{value:i}]of n)R3(t,s,i);for(let s in rx)r[s]!==void 0?(rx[s](e,r[s]),t.lists.add(s)):t.lists.delete(s)&&rx[s](e,null);L3(e,o)},lt=t=>{if(t==null)return"";let e={"&":"&","<":"<",">":">",'"':""","'":"'"};return t.toString().replace(/[&<>"']/g,n=>e[n])},D3=t=>{let e=['<meta charset="UTF-8">'],n=new Set(["charset","jsonLd","styles","scripts"]),r=!1;for(let[o,s]of Object.entries(t)){if(!s&&s!==0&&s!==!1||n.has(o)||typeof s=="function")continue;if(o==="title"){e.push(`<title>${lt(s)}</title>`);continue}if(o==="viewport"){r||(e.push(`<meta name="viewport" content="${lt(s)}">`),r=!0);continue}if(o==="canonical"){e.push(`<link rel="canonical" href="${lt(s)}">`);continue}if(o==="icon"||o==="favicon"){let f=lt(s),u=f.endsWith(".svg")?' type="image/svg+xml"':f.endsWith(".png")?' type="image/png"':"";e.push(`<link rel="icon" href="${f}"${u} data-smbls-single-icon="${f}">`);continue}if(o==="favicons"&&Array.isArray(s)){s.forEach(f=>{if(E(f)){let u=Object.entries(f).map(([d,p])=>`${d}="${lt(p)}"`).join(" ");e.push(`<link rel="icon" ${u} data-smbls-favicon="${lt(ax(f))}">`)}else typeof f=="string"&&e.push(`<link rel="icon" href="${lt(f)}" data-smbls-favicon="${lt(ax(f))}">`)});continue}if(o==="alternate"&&Array.isArray(s)){s.forEach(f=>{if(E(f)){let u=Object.entries(f).map(([d,p])=>`${d}="${lt(p)}"`).join(" ");e.push(`<link rel="alternate" ${u} data-smbls-alternate="${lt(GR(f))}">`)}});continue}let i=["og:","article:","product:","fb:","profile:","book:","business:","music:","video:"],a=["twitter:","DC:","DCTERMS:"],c=i.some(f=>o.startsWith(f)),l=a.some(f=>o.startsWith(f));if(o.startsWith("http-equiv:")){let f=o.replace("http-equiv:","");e.push(`<meta http-equiv="${lt(f)}" content="${lt(s)}">`)}else if(o.startsWith("itemprop:")){let f=o.replace("itemprop:","");e.push(`<meta itemprop="${lt(f)}" content="${lt(s)}">`)}else c?Array.isArray(s)?s.forEach(f=>e.push(`<meta property="${lt(o)}" content="${lt(f)}">`)):e.push(`<meta property="${lt(o)}" content="${lt(s)}">`):l?e.push(`<meta name="${lt(o)}" content="${lt(s)}">`):Array.isArray(s)?s.forEach(f=>e.push(`<meta name="${lt(o)}" content="${lt(f)}">`)):(typeof s=="string"||typeof s=="number"||typeof s=="boolean")&&e.push(`<meta name="${lt(o)}" content="${lt(s)}">`)}if(r||e.splice(1,0,'<meta name="viewport" content="width=device-width, initial-scale=1">'),Array.isArray(t.jsonLd))for(let o of t.jsonLd){if(o==null)continue;let s=typeof o=="string"?o:JSON.stringify(o),i=String(s).replace(/<\/script/gi,"<\\/script");e.push(`<script type="application/ld+json" data-smbls-jsonld="${Pi(s)}">${i}<\/script>`)}if(Array.isArray(t.styles))for(let o of t.styles){if(o==null||!String(o).trim())continue;let s=String(o).replace(/<\/style/gi,"<\\/style");e.push(`<style data-smbls-style="${Pi(s)}">${s}</style>`)}if(Array.isArray(t.scripts))for(let o of t.scripts){if(!o)continue;let s=typeof o=="string",i=s?o:o.src;if(!i&&!(o&&o.body))continue;let a=[];i&&a.push(`src="${lt(i)}"`),s||(o.type&&a.push(`type="${lt(o.type)}"`),o.async&&a.push("async"),o.defer&&a.push("defer"),o.integrity&&a.push(`integrity="${lt(o.integrity)}"`),o.crossorigin&&a.push(`crossorigin="${lt(o.crossorigin)}"`),o.referrerpolicy&&a.push(`referrerpolicy="${lt(o.referrerpolicy)}"`),o.nomodule&&a.push("nomodule"));let c=` data-smbls-script="${lt(i||Pi(o.body||""))}"`;if(!s&&o.body){let l=String(o.body).replace(/<\/script/gi,"<\\/script");e.push(`<script ${a.join(" ")}${c}>${l}<\/script>`)}else e.push(`<script ${a.join(" ")}${c}><\/script>`)}return e.join(`
|
|
93
|
-
`)},JR={define:{metadata:(t,e,n)=>{let r=e.context?.document||typeof document<"u"&&document;r&&lx(e,r,()=>UR(t,e),o=>{let s=e.state?.root;E(s)&&(s.$helmet=o)})}}},ox=t=>{let e=t.metadata;return e?UR(e,t):null},hx={name:"helmet",create(t){if(!t.metadata)return;let e=t.context?.document||typeof document<"u"&&document;e&&lx(t,e,()=>ox(t))},update(t){let e=cx.get(t);if(e){e.disposed||e.set(ox(t));return}if(!t.metadata)return;let n=t.context?.document||typeof document<"u"&&document;n&&lx(t,n,()=>ox(t))}},I3=JR;nc();var tP=(t,e,n,r)=>{t&&ec(t,e,n,r)},eP=(t,e,n)=>{if(!t)return;let r=e.context?.document||typeof document<"u"&&document;if(!r)return;let o=Li(t,e,n);px(o,r)},nP=async(t,e)=>{if(!t)return;let n={tag:"fragment",...t},r=async()=>{await e.set(n,{preventDefineUpdate:"$router"})};return e.lazyLoad?window.requestAnimationFrame(r):await r(),n},Ii={routes:t=>t,metadata:eP,fetch:tP,$router:nP},rP=(t={})=>{let e={routes:n=>n};return t.metadata!==!1&&(e.metadata=eP),t.fetch!==!1&&(e.fetch=tP),t.router!==!1&&(e.$router=nP),e};var mx={useReset:!0,useVariable:!0,useIconSprite:!0,useSvgSprite:!0,useDocumentTheme:!0,useDefaultIcons:!0,useFontImport:!0,useDefaultConfig:!0},Fp={initRouter:!0,popState:!0,injectRouterInLinkComponent:!0},jp={...mx,router:Fp},$3={state:{},pages:{},components:{},router:Fp,define:Ii},Dr=$3;I();I();var oP=(t,e)=>q(t.extends)?t.extends:[];Kt();I();var yx={};F(yx,{default:()=>q3,getActiveLang:()=>Ir,getLanguages:()=>Xl,getLocalStateLang:()=>ef,getPendingLang:()=>Yl,initPolyglot:()=>Up,loadTranslations:()=>Ql,polyglotPlugin:()=>Mi,setLang:()=>Jl,translate:()=>Zl,upsertTranslation:()=>tf});I();Kt();var lP="smbls_lang",M3="smbls_t_",N3="smbls_tv_",$i={get(t){try{return window?.localStorage.getItem(t)}catch{return null}},set(t,e){try{window?.localStorage.setItem(t,e)}catch(n){console.warn("[polyglot] localStorage unavailable:",n.message)}},remove(t){try{window?.localStorage.removeItem(t)}catch(e){console.warn("[polyglot] localStorage unavailable:",e.message)}}},Gl={},sP=new WeakMap,fP=(t,e)=>t&&typeof t=="object"?t:e&&typeof e=="object"?e:null,uP=t=>{let e=sP.get(t);return e||(e={seq:0,pending:Vr(null),wake:null},sP.set(t,e)),e},iP=(t,e,n)=>new Promise(r=>{let o=null,s=()=>{o!==null&&clearTimeout(o),o=null,t.wake===s&&(t.wake=null),r()};t.wake=s,Promise.resolve(e).then(s,s),n>0&&(o=setTimeout(s,n))}),aP=(t,e)=>!!(t?.translations&&t.translations[e]),F3=3e3,j3=2147483647,B3=t=>{let e=t?.fontWait;return e===!1?0:typeof e=="number"?e>0?Math.min(e,j3):0:F3},U3=new RegExp("\\p{L}","gu"),V3=(...t)=>{let e=new Set,n=(r,o)=>{if(typeof r=="string"){let s=r.match(U3);if(s)for(let i=0;i<s.length;i++)e.add(s[i])}else if(r&&typeof r=="object"&&o<8)for(let s in r)n(r[s],o+1)};for(let r=0;r<t.length;r++)n(t[r],0);return Array.from(e).join("")},z3=(t,e)=>{let n=t?.fonts;if(!e||!n||!t.body||typeof n.check!="function"||typeof n.load!="function")return null;try{let o=(t.defaultView||globalThis).getComputedStyle(t.body).fontFamily;if(!o)return null;let s="1em "+o;return n.check(s,e)?null:Promise.resolve(n.load(s,e)).then(()=>{},()=>{})}catch{return null}};function Ir(){let t=this?.context,e=t?.polyglot;return(this?.state?.root||t?.state?.root)?.lang||t?.state?.lang||e?.defaultLang||"en"}function Yl(){let t=this?.context,e=fP(t,this?.state?.root||t?.state?.root);return e?uP(e).pending.get():null}function Xl(){let t=this?.context?.polyglot;return t?t.languages?t.languages:t.translations?Object.keys(t.translations):[]:[]}var Bp=(t,e)=>{if(!t||!e)return;if(t[e]!==void 0)return t[e];if(e.indexOf(".")===-1)return;let n=e.split("."),r=t;for(let o=0;o<n.length;o++){if(r==null)return;r=r[n[o]]}return r},cP=(t,e,n)=>{let r=e.lastIndexOf(".");if(r===-1)return t[e+"_"+n];let o=Bp(t,e.substring(0,r));if(o!=null)return o[e.substring(r+1)+"_"+n]};function Zl(t,e){if(!t)return"";let n=this?.context,r=n?.polyglot,o=e||this.call("getActiveLang"),s=this?.state;if(s){let l=cP(s,t,o);if(l!==void 0)return l}if(r?.translations){let l=r.translations[o];if(l){let f=Bp(l,t);if(f!==void 0)return f}}let a=(s?.root||n?.state?.root)?.translations;if(a){let l=a[o];if(l){let f=Bp(l,t);if(f!==void 0)return f}}let c=r?.defaultLang||"en";if(s){let l=cP(s,t,c);if(l!==void 0)return l}if(r?.translations){let l=r.translations[c];if(l){let f=Bp(l,t);if(f!==void 0)return f}}return t}async function Ql(t){let e=this?.context,n=e?.polyglot,r=this?.state?.root||e?.state?.root;if(!n||!r)return;let o=n.storagePrefix||M3,s=n.storageVersionPrefix||(n.storagePrefix?n.storagePrefix.replace(/_$/,"v_"):N3);if(n.translations&&n.translations[t]&&!n.fetch||!n.fetch||n._fetchFailed?.[t])return;if(!r.translations?.[t]){let c=$i.get(o+t);if(c)try{let l=JSON.parse(c),f={translations:{...r.translations||{}}};f.translations[t]=l,r.update&&r.update(f)}catch(l){console.warn("[polyglot] Failed to apply language update:",l.message)}}let i=(n.storagePrefix||"smbls")+":"+t;if(Gl[i])return Gl[i];let a=this;return Gl[i]=(async()=>{try{let c=n.fetch,l=parseInt($i.get(s+t),10)||0,f,u,d;if(P(c)){let g=await c(t,l,a);if(!g||g.changed===!1)return;f=g.translations||g.data||g,u=g.version||0,d=!0}else if(E(c)){let g=a.getDB||(()=>e.fetch),h=P(g)?await g.call(a):e.fetch;if(!h)return;let m=c.rpc||c.from||"get_translations_if_changed",y={p_lang:t,p_cached_version:l,...c.params||{}},S=await h.rpc({from:m,params:y});if(S.error)throw n._fetchFailed||(n._fetchFailed={}),n._fetchFailed[t]=!0,S.error;let b=S.data;if(!b||!b.changed)return;f=b.translations||{},u=b.version||0,d=!0}else return;if(!d||!f)return;$i.set(o+t,JSON.stringify(f)),u&&$i.set(s+t,String(u));let p={translations:{...r.translations||{}}};p.translations[t]=f,r.update&&r.update(p)}catch(c){if(n.verbose!==!1){let l=c?.message||c?.details||(typeof c=="object"?JSON.stringify(c):String(c));console.warn("[polyglot] Failed to load translations for",t,"-",l)}}finally{delete Gl[i]}})(),Gl[i]}var H3=(t,e,n)=>{let r=t.__ref;if(!r||r.contentManaged||n==null||typeof n=="object")return;let o=r.__textNode;if(!o||o.parentNode!==e)return;let s=String(n);o.nodeValue!==s&&(o.nodeValue=s)};async function Jl(t,e){let n=this?.context,r=n?.polyglot,o=this?.state?.root||n?.state?.root,s=n?.document||globalThis.document;if(!o)return;if(e?.persist!==!1){let l=r?.storageLangKey||lP;$i.set(l,t)}let i=uP(fP(n,o)),a=++i.seq;i.wake&&i.wake();let c=()=>i.seq===a;if(this.call("getActiveLang")===t){i.pending.set(null),s?.documentElement&&(s.documentElement.lang=t);return}try{if(r?.fetch){let f=this.call("loadTranslations",t);if(!aP(o,t)){i.pending.set(t);let u=null;if(await iP(i,Promise.resolve(f).then(null,d=>{u=d}),0),!c())return;if(u)throw u;if(!aP(o,t)&&!r.translations?.[t])return}}let l=B3(r);if(l>0&&s?.fonts&&s.documentElement?.lang!==t){let f=z3(s,V3(r?.translations?.[t],o.translations?.[t]));if(f&&(i.pending.set(t),await iP(i,f,l),!c()))return}i.pending.set(null),W3(n,r,o,s,t)}finally{c()&&i.pending.set(null)}}function W3(t,e,n,r,o){t?.state&&(t.state.lang=o);let s=e?.translations?.[o],i={lang:o},a=c=>Wa(t,c,n);if(s&&typeof s=="object")for(let c in s){if(!a(c))continue;let l=s[c];(Array.isArray(l)||typeof l=="string"||typeof l=="number")&&(i[c]=l)}n.update&&n.update(i);for(let c in i)c!=="lang"&&mn(t,c,i[c]);if(s&&typeof s=="object")for(let c in s){if(!a(c))continue;let l=s[c];if(l&&typeof l=="object"&&!Array.isArray(l)&&n[c]&&typeof n[c]=="object"&&!Array.isArray(n[c])){for(let f in l)n[c][f]=l[f];mn(t,c,n[c])}}if(r&&s){let c=r.querySelectorAll("[data-key]");for(let l of c){let f=l.ref;if(!f)continue;let u=f.__ref?.__exec?.text;if(typeof u=="string"&&u.includes("{{"))try{H3(f,l,f.call("replaceLiteralsWithObjectFields",u,f.state))}catch{}}}r?.documentElement&&(r.documentElement.lang=o)}async function tf(t,e,n){let r=this?.context,o=r?.polyglot,s=this?.state?.root||r?.state?.root;if(s?.translations?.[e]&&(s.translations[e][t]=n),o?.translations?.[e]&&(o.translations[e][t]=n),o?.fetch&&E(o.fetch)){let i=this.getDB||(()=>r.fetch),a=P(i)?await i.call(this):r.fetch;if(!a)return;let c=o.fetch.table||"translations",l=await a.upsert({from:c,data:{key:t,lang:e,text:n}});if(l?.error)throw l.error;return l.data}}async function Up(){let t=this?.context,e=t?.polyglot;if(!e)return;let n=this?.state?.root||t?.state?.root;if(!n)return;let r=e.storageLangKey||lP,s=$i.get(r)||Ir.call(this),i=t?.document||globalThis.document;i?.documentElement&&(i.documentElement.lang=s),n.update&&n.lang!==s&&n.update({lang:s}),e.fetch&&!(e.translations&&e.translations[s])&&await this.call("loadTranslations",s)}function ef(t){try{let e=Ir.call(this),n=this?.state;if(!n)return"";let r=t.lastIndexOf(".");if(r===-1)return n[t+e]??"";let o=t.substring(0,r).split("."),s=n;for(let i=0;i<o.length;i++){if(s==null)return"";s=s[o[i]]}return s==null?"":s[t.substring(r+1)+e]??""}catch{return""}}var Mi={name:"polyglot",render(t){t.parent&&t.parent.parent||t.__polyglotInitialized||(t.__polyglotInitialized=!0,Up.call(t))}},q3=Mi;nc();var _x={};F(_x,{SYSTEM_METRICS:()=>nf,capsizeHandler:()=>bx,capsizePlugin:()=>zp,computeCapsize:()=>dP,default:()=>K3,resolveFontSizePx:()=>pP,resolveMetrics:()=>hP});var nf={arial:{capHeight:716,ascent:1854,descent:-434,lineGap:67,unitsPerEm:2048},helvetica:{capHeight:714,ascent:770,descent:-230,lineGap:0,unitsPerEm:1e3},"helvetica neue":{capHeight:714,ascent:952,descent:-213,lineGap:28,unitsPerEm:1e3},georgia:{capHeight:1419,ascent:1878,descent:-449,lineGap:0,unitsPerEm:2048},"times new roman":{capHeight:1356,ascent:1825,descent:-443,lineGap:87,unitsPerEm:2048},"courier new":{capHeight:1170,ascent:1705,descent:-615,lineGap:0,unitsPerEm:2048},verdana:{capHeight:1489,ascent:2059,descent:-430,lineGap:0,unitsPerEm:2048},roboto:{capHeight:1456,ascent:1900,descent:-500,lineGap:0,unitsPerEm:2048},"open sans":{capHeight:1462,ascent:2189,descent:-600,lineGap:0,unitsPerEm:2048},inter:{capHeight:1490,ascent:2048,descent:-512,lineGap:0,unitsPerEm:2048},lato:{capHeight:1434,ascent:1974,descent:-426,lineGap:0,unitsPerEm:2e3},"source sans":{capHeight:660,ascent:984,descent:-273,lineGap:0,unitsPerEm:1e3},"source sans pro":{capHeight:660,ascent:984,descent:-273,lineGap:0,unitsPerEm:1e3},"source sans 3":{capHeight:660,ascent:984,descent:-273,lineGap:0,unitsPerEm:1e3},montserrat:{capHeight:700,ascent:968,descent:-251,lineGap:0,unitsPerEm:1e3},poppins:{capHeight:700,ascent:1050,descent:-350,lineGap:100,unitsPerEm:1e3},raleway:{capHeight:710,ascent:1e3,descent:-250,lineGap:0,unitsPerEm:1e3},"dm sans":{capHeight:700,ascent:992,descent:-312,lineGap:0,unitsPerEm:1e3},nunito:{capHeight:705,ascent:1011,descent:-353,lineGap:0,unitsPerEm:1e3},"work sans":{capHeight:684,ascent:930,descent:-243,lineGap:0,unitsPerEm:1e3},manrope:{capHeight:708,ascent:980,descent:-300,lineGap:0,unitsPerEm:1e3},"ibm plex sans":{capHeight:698,ascent:1025,descent:-275,lineGap:0,unitsPerEm:1e3},"plus jakarta sans":{capHeight:720,ascent:1060,descent:-300,lineGap:0,unitsPerEm:1e3}},Vp=t=>parseFloat(t.toFixed(4)),dP=(t,e,n)=>{let{ascent:r,descent:o,lineGap:s,unitsPerEm:i,capHeight:a}=e,c=Math.abs(o),l=r+c+s,f=n!==void 0?n:l/i*t,u=f/t,d=l/i,p=(r-a+s/2)/i-(u-d)/2,g=(c+s/2)/i-(u-d)/2;return{fontSize:`${Vp(t/16)}rem`,lineHeight:`${Vp(f)}px`,capHeightTrim:`${Vp(-p)}em`,baselineTrim:`${Vp(-g)}em`}},pP=(t,e)=>{if(typeof t=="number")return t;let n=e?.designSystem;if(!n)return null;let{typography:r}=n;if(r?.sequence){let s=String(t).toUpperCase(),i=r.sequence[s];if(i)return i.decimal||i.val}let o=parseFloat(t);return isNaN(o)?null:typeof t=="string"&&t.endsWith("rem")?o*(n.typography?.browserDefault||16):o},hP=(t,e)=>{let r=e?.designSystem?.font_family||{};if(t){let s=r[t];if(s?.metrics)return s.metrics;let i=String(t).toLowerCase().replace(/['"]/g,"").trim();if(nf[i])return nf[i]}let o=r.default||Object.keys(r)[0];if(o){let s=r[o];if(s?.metrics)return s.metrics;if(s?.value&&Array.isArray(s.value))for(let i of s.value){let a=i.toLowerCase().replace(/['"]/g,"").trim();if(nf[a])return nf[a]}}return null},bx=(t,e,n,r)=>{if(!t)return;let o=pP(e.fontSize,r);if(!o)return;let s=hP(e.fontFamily,r);if(!s)return;let i=e.lineHeight?parseFloat(e.lineHeight):void 0,{lineHeight:a,capHeightTrim:c,baselineTrim:l}=dP(o,s,i),f={};return e.lineHeight||(f.lineHeight=a),f["::before"]={content:'""',marginBottom:c,display:"table"},f["::after"]={content:'""',marginTop:l,display:"table"},f},zp={name:"capsize",init(t){t.useCapsize===void 0&&t.fontSize&&(t.useCapsize=!0)}},K3=zp;var Ax={};F(Ax,{PRESERVE_VALUE_KEYS:()=>Yt,SKIP_INLINE_KEYS:()=>$r,abbrToProp:()=>Gt,decode:()=>_P,encode:()=>mP,expand:()=>Bo,isComponentKey:()=>an,isSelectorKey:()=>cn,parse:()=>Uo,parseFurther:()=>zo,propToAbbr:()=>Ke,shorten:()=>rf,shorthandPlugin:()=>of,stringify:()=>jo,stringifyFurther:()=>Vo});var Ke={attr:"at",childExtends:"cex",childExtendsRecursive:"cexr",childProps:"cp",children:"ch",childrenAs:"cha",class:"cl",content:"cnt",context:"ctx",data:"dt",extends:"ext",hide:"hd",html:"htm",if:"if",ignoreChildExtends:"icex",key:"ky",query:"qy",routes:"rt",scope:"scp",show:"shw",state:"st",style:"sy",tag:"tg",text:"tx",align:"aln",boxSize:"bsz",flow:"fl",heightRange:"hr",horizontalInset:"hi",round:"rnd",shadow:"shd",size:"sz",templateColumns:"tcol",verticalInset:"vi",widthRange:"wr",wrap:"wrp",aspectRatio:"ar",blockSize:"bks",boxSizing:"bxs",height:"h",inlineSize:"ins",margin:"m",marginBottom:"mb",marginLeft:"ml",marginRight:"mr",marginTop:"mt",maxBlockSize:"mxbs",maxHeight:"mxh",maxInlineSize:"mxis",maxWidth:"mxw",minBlockSize:"mnbs",minHeight:"mnh",minInlineSize:"mnis",minWidth:"mnw",padding:"p",paddingBottom:"pb",paddingInline:"pil",paddingLeft:"pl",paddingRight:"pr",paddingTop:"pt",width:"w",alignContent:"ac",alignItems:"ai",alignSelf:"as",flex:"fx",flexBasis:"fxb",flexDirection:"fxd",flexFlow:"fxf",flexGrow:"fxg",flexShrink:"fxs",flexWrap:"fxw",gap:"g",justifyContent:"jc",justifyItems:"ji",justifySelf:"js",order:"od",placeContent:"pcn",placeItems:"pit",placeSelf:"psl",rowGap:"rg",columnGap:"cg",gridArea:"ga",gridAutoColumns:"gac",gridAutoFlow:"gaf",gridAutoRows:"gar",gridColumn:"gc",gridColumnEnd:"gce",gridColumnStart:"gcs",gridRow:"gr",gridRowEnd:"gre",gridRowStart:"grs",gridTemplateAreas:"gta",gridTemplateColumns:"gtc",gridTemplateRows:"gtr",bottom:"bot",float:"flt",inset:"ist",left:"lft",position:"pos",right:"rgt",top:"tp",zIndex:"zi",clear:"clr",contain:"ctn",cursor:"cur",display:"d",opacity:"op",overflow:"ov",overflowX:"ovx",overflowY:"ovy",pointerEvents:"pe",resize:"rsz",userSelect:"us",visibility:"vis",background:"bg",backgroundAttachment:"bga",backgroundBlendMode:"bgbm",backgroundClip:"bgcl",backgroundColor:"bgc",backgroundImage:"bgi",backgroundOrigin:"bgo",backgroundPosition:"bgp",backgroundPositionX:"bgpx",backgroundPositionY:"bgpy",backgroundRepeat:"bgr",backgroundRepeatX:"bgrx",backgroundRepeatY:"bgry",backgroundSize:"bgs",color:"c",theme:"thm",themeModifier:"thmm",border:"bd",borderBottom:"bdb",borderBottomLeftRadius:"bdblr",borderBottomRightRadius:"bdbrr",borderCollapse:"bdcl",borderColor:"bdc",borderImage:"bdi",borderImageOutset:"bdio",borderImageRepeat:"bdir",borderImageSlice:"bdis",borderImageSource:"bdisrc",borderImageWidth:"bdiw",borderLeft:"bdl",borderRadius:"bdr",borderRight:"bdrg",borderSpacing:"bdsp",borderStyle:"bdst",borderTop:"bdt",borderTopLeftRadius:"bdtlr",borderTopRightRadius:"bdtrr",borderWidth:"bdw",outline:"ol",outlineColor:"olc",outlineOffset:"olo",outlineStyle:"ols",outlineWidth:"olw",boxShadow:"bxsh",textShadow:"txsh",direction:"dir",fontDisplay:"fdi",fontFamily:"ff",fontFeatureSettings:"ffs",fontKerning:"fk",fontOpticalSizing:"fos",fontPalette:"fpl",fontSize:"fs",fontSizeAdjust:"fsa",fontSmooth:"fsm",fontStretch:"fsr",fontStyle:"fsy",fontSynthesis:"fsyn",fontVariant:"fv",fontVariationSettings:"fvs",fontWeight:"fw",hyphens:"hyp",letterSpacing:"ls",lineHeight:"lh",tabSize:"tsz",textAlign:"ta",textDecoration:"td",textDecorationColor:"tdc",textDecorationLine:"tdl",textDecorationStyle:"tds",textIndent:"ti",textOverflow:"tov",textStroke:"tsk",textTransform:"tt",unicodeBidi:"ub",verticalAlign:"va",whiteSpace:"ws",wordBreak:"wbr",wordSpacing:"wsp",wordWrap:"wwr",writingMode:"wm",captionSide:"cps",counterIncrement:"ci",counterReset:"cr",emptyCells:"ec",listStyle:"lst",listStyleImage:"lsi",listStylePosition:"lsp",listStyleType:"lsty",quotes:"qt",tableLayout:"tl",columnCount:"cc",columnFill:"cf",columnRule:"crl",columnRuleColor:"crlc",columnRuleStyle:"crls",columnRuleWidth:"crlw",columnSpan:"cspn",columnWidth:"cwi",columns:"col",backdropFilter:"bdf",boxDecorationBreak:"bxdb",clipPath:"cpth",filter:"fil",isolation:"iso",mixBlendMode:"mbm",objectFit:"obf",objectPosition:"obp",perspective:"prs",perspectiveOrigin:"prso",willChange:"wc",transform:"tf",transformOrigin:"tfo",transformStyle:"tfs",transition:"trn",transitionDelay:"trnd",transitionDuration:"trndr",transitionProperty:"trnp",transitionTimingFunction:"trntf",animation:"an",animationDelay:"and",animationDirection:"andr",animationDuration:"andur",animationFillMode:"anfm",animationIterationCount:"anic",animationName:"ann",animationPlayState:"anps",animationTimingFunction:"antf",scrollBehavior:"sb",scrollMargin:"smr",scrollMarginBottom:"smrb",scrollMarginLeft:"smrl",scrollMarginRight:"smrr",scrollMarginTop:"smrt",scrollPadding:"spd",scrollPaddingBottom:"spdb",scrollPaddingLeft:"spdl",scrollPaddingRight:"spdr",scrollPaddingTop:"spdt",scrollSnapAlign:"ssa",scrollSnapStop:"sss",scrollSnapType:"sst",breakAfter:"bka",breakBefore:"bkb",breakInside:"bki",pageBreakAfter:"pbka",pageBreakBefore:"pbkb",pageBreakInside:"pbki",accessKey:"ack",className:"cn",contentEditable:"ced",contextMenu:"cmu",draggable:"drg",hidden:"hid",id:"id",is:"is",lang:"lng",nonce:"nnc",spellCheck:"spc",tabIndex:"tbi",title:"ttl",translate:"trl",accept:"acp",acceptCharset:"accs",action:"act",autoComplete:"atc",autoFocus:"atf",capture:"cap",challenge:"chg",checked:"chk",cols:"cls",colSpan:"csn",controls:"ctl",default:"def",defer:"dfr",disabled:"dis",encType:"ect",form:"frm",formAction:"fac",formEncType:"fect",formMethod:"fme",formNoValidate:"fnv",formTarget:"ftg",high:"hgh",inputMode:"imd",kind:"knd",label:"lbl",list:"lis",loop:"lp",low:"lw",max:"mx",maxLength:"mxl",method:"mtd",min:"mn",minLength:"mnl",multiple:"mul",muted:"mut",name:"nm",open:"opn",optimum:"opt",pattern:"ptn",placeholder:"phd",readOnly:"ro",required:"req",reversed:"rev",rows:"rws",rowSpan:"rsn",selected:"sel",span:"spn",start:"srt",step:"stp",type:"typ",value:"val",download:"dl",href:"hrf",hrefLang:"hrl",ping:"png",referrerPolicy:"rfp",rel:"rl",target:"tgt",allow:"alw",allowFullScreen:"afs",allowPaymentRequest:"apr",alt:"alt",cellPadding:"cpg",cellSpacing:"csg",cite:"cit",coords:"crd",crossOrigin:"cor",dateTime:"dtm",fetchPriority:"fpr",headers:"hds",httpEquiv:"hte",integrity:"itg",isMap:"ism",keyType:"kty",loading:"ldg",manifest:"mft",media:"mda",poster:"pst",preload:"prl",radioGroup:"rdg",sandbox:"sbx",scoped:"scod",seamless:"sml",shape:"shp",sizes:"szs",src:"src",srcDoc:"srd",srcLang:"srl",srcSet:"srs",useMap:"ump",ariaActiveDescendant:"aad",ariaAtomic:"aat",ariaBusy:"abu",ariaChecked:"achk",ariaControls:"acl",ariaCurrent:"acr",ariaDescribedBy:"adb",ariaDetails:"adt",ariaDisabled:"adis",ariaDropEffect:"ade",ariaErrorMessage:"aem",ariaExpanded:"aexp",ariaGrabbed:"agr",ariaHasPopup:"ahp",ariaHidden:"ahid",ariaInvalid:"ainv",ariaLabel:"alb",ariaLabelledBy:"alby",ariaLive:"alv",ariaModal:"amod",ariaMultiSelectable:"ams",ariaOrientation:"aor",ariaOwns:"aow",ariaPosInSet:"apis",ariaPressed:"aprs",ariaReadOnly:"aro",ariaRelevant:"arl",ariaRequired:"areq",ariaSelected:"asel",ariaSetSize:"assz",ariaValueMax:"avmx",ariaValueMin:"avmn",ariaValueNow:"avn",role:"role",onInit:"@in",onRender:"@rn",onUpdate:"@up",onStateChange:"@sc",onStateUpdate:"@su",onClick:"@ck",onContextMenu:"@cm",onDblClick:"@dc",onMouseDown:"@md",onMouseEnter:"@me",onMouseLeave:"@ml",onMouseMove:"@mm",onMouseOut:"@mo",onMouseOver:"@mv",onMouseUp:"@mu",onKeyDown:"@kd",onKeyPress:"@kp",onKeyUp:"@ku",onBlur:"@bl",onFocus:"@fc",onFocusIn:"@fi",onFocusOut:"@fo",onBeforeInput:"@bi",onChange:"@cg",onFormData:"@fd",onInput:"@ip",onInvalid:"@iv",onReset:"@rs",onSearch:"@sr",onSelect:"@sl",onSubmit:"@sm",onTouchCancel:"@tc",onTouchEnd:"@te",onTouchMove:"@tm",onTouchStart:"@ts",onPointerCancel:"@pc",onPointerDown:"@pd",onPointerEnter:"@pe",onPointerLeave:"@ple",onPointerMove:"@pm",onPointerOut:"@po",onPointerOver:"@pov",onPointerUp:"@pu",onDrag:"@dg",onDragEnd:"@dge",onDragEnter:"@dgn",onDragLeave:"@dgl",onDragOver:"@dgo",onDragStart:"@dgs",onDrop:"@dp",onResize:"@rz",onScroll:"@scl",onWheel:"@wh",onCopy:"@cy",onCut:"@ct",onPaste:"@pt",onCompositionEnd:"@cpe",onCompositionStart:"@cps",onCompositionUpdate:"@cpu",onAnimationEnd:"@ae",onAnimationIteration:"@ai",onAnimationStart:"@as",onTransitionEnd:"@tre",onTransitionStart:"@trs",onAbort:"@ab",onCanPlay:"@cap",onCanPlayThrough:"@cpt",onDurationChange:"@duc",onEmptied:"@em",onEncrypted:"@enc",onEnded:"@end",onError:"@er",onLoad:"@ld",onLoadedData:"@ldd",onLoadedMetadata:"@ldm",onPause:"@pa",onPlay:"@pl",onPlaying:"@plg",onProgress:"@prg",onRateChange:"@rc",onSeeked:"@sk",onSeeking:"@skg",onStalled:"@stl",onSuspend:"@ssp",onTimeUpdate:"@tu",onVolumeChange:"@vc",onWaiting:"@wt",icon:"ico",iconText:"ict",lookup:"lkp",router:"rtr",shapeModifier:"shpm"},Gt=Object.create(null);for(let t in Ke)Gt[Ke[t]]=t;var wx=Object.create(null);for(let t in Ke){let e=Ke[t];if(wx[e])throw new Error(`Duplicate abbreviation "${e}" for "${t}" \u2014 already used by "${wx[e]}"`);wx[e]=t}var Yt=new Set(["state","st","scope","scp","attr","at","style","sy","data","dt","context","ctx","query","qy","class","cl"]),$r=new Set(["text","tx","html","htm","content","cnt","placeholder","phd","src","href","hrf"]);function an(t){return/^[A-Z]/.test(t)}function cn(t){return/^[:@.!$>&]/.test(t)||t.startsWith("> ")}function mP(t){if(!t||typeof t!="object")return"";let e=[];for(let n in t){let r=t[n];if(typeof r=="function"||r!==null&&typeof r=="object"&&!Array.isArray(r)||r===void 0)continue;let o=Ke[n]||n;if(r===!0)e.push(o);else if(r===!1)e.push("!"+o);else if(Array.isArray(r)){let s=r.map(i=>Hp(i));e.push(o+":"+s.join(","))}else e.push(o+":"+Hp(r))}return e.join(" ")}function Hp(t){return String(t).replace(/ /g,"_")}function rf(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(n){return n!==null&&typeof n=="object"?rf(n):n});let e={};for(let n in t){let r=t[n];if(an(n)){e[n]=Sx(r);continue}if(cn(n)){e[n]=Sx(r);continue}let o=Ke[n]||n;if(Yt.has(n)||Yt.has(o)){e[o]=r;continue}e[o]=Sx(r)}return e}function Sx(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?rf(e):e}):typeof t=="object"?rf(t):t}function jo(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(r){return r!==null&&typeof r=="object"?jo(r):r});let e={},n=[];for(let r in t){let o=t[r];if(an(r)){e[r]=gP(o);continue}if(cn(r)){e[r]=gP(o);continue}let s=Ke[r]||r;if(Yt.has(r)||Yt.has(s)){e[s]=o;continue}if(typeof o=="function"){e[s]=o;continue}if(o==null){e[s]=o;continue}if($r.has(r)||$r.has(s)){e[s]=o;continue}if(Array.isArray(o)){if(o.some(function(a){return a!==null&&typeof a=="object"})){e[s]=o.map(function(a){return a!==null&&typeof a=="object"?jo(a):a});continue}if(o.length<=1){e[s]=o;continue}n.push(s+":"+o.map(Hp).join(","));continue}if(typeof o=="object"){e[s]=jo(o);continue}o===!0?n.push(s):o===!1?n.push("!"+s):typeof o=="number"||typeof o=="string"&&(o.includes(",")||o.includes("_"))?e[s]=o:n.push(s+":"+Hp(o))}return n.length&&(e.in=n.join(" ")),e}function gP(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?jo(e):e}):typeof t=="object"?jo(t):t}function _P(t){if(!t||typeof t!="string")return{};let e={},n=wP(t);for(let r of n){if(r.startsWith("!")){let c=r.slice(1),l=Gt[c]||c;e[l]=!1;continue}let o=r.indexOf(":");if(o===-1){let c=Gt[r]||r;e[c]=!0;continue}let s=r.slice(0,o),i=r.slice(o+1),a=Gt[s]||s;if(i.includes(",")){e[a]=i.split(",").map(yP);continue}e[a]=yP(i)}return e}function wP(t){return t.trim().split(/\s+/).filter(Boolean)}function yP(t){let e=t.replace(/_/g," ");return/^-?\d+(\.\d+)?$/.test(e)?Number(e):e}function bP(t){return t.replace(/_/g," ")}function G3(t){if(!t||typeof t!="string")return{};let e={},n=wP(t);for(let r of n){if(r.startsWith("!")){let c=r.slice(1),l=Gt[c]||c;e[l]=!1;continue}let o=r.indexOf(":");if(o===-1){let c=Gt[r]||r;e[c]=!0;continue}let s=r.slice(0,o),i=r.slice(o+1),a=Gt[s]||s;if(i.includes(",")){e[a]=i.split(",").map(bP);continue}e[a]=bP(i)}return e}function Bo(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(n){return n!==null&&typeof n=="object"?Bo(n):n});let e={};for(let n in t){let r=t[n];if(an(n)){e[n]=xx(r);continue}let o=Gt[n]||n;if(cn(n)&&o===n){e[n]=xx(r);continue}if(Yt.has(o)||Yt.has(n)){e[o]=r;continue}e[o]=xx(r)}return e}function xx(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?Bo(e):e}):typeof t=="object"?Bo(t):t}function Uo(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(n){return n!==null&&typeof n=="object"?Uo(n):n});let e={};if(typeof t.in=="string"){let n=G3(t.in);for(let r in n)e[r]=n[r]}for(let n in t){if(n==="in")continue;let r=t[n];if(an(n)){e[n]=kx(r);continue}let o=Gt[n]||n;if(cn(n)&&o===n){e[n]=kx(r);continue}if(Yt.has(o)||Yt.has(n)){e[o]=r;continue}e[o]=kx(r)}return e}function kx(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?Uo(e):e}):typeof t=="object"?Uo(t):t}function SP(t){return String(t).replace(/\\/g,"\\\\").replace(/_/g,"\\_").replace(/,/g,"\\,").replace(/ /g,"_")}function Y3(t){let e="",n=0;for(;n<t.length;){if(t[n]==="\\"&&n+1<t.length){let r=t[n+1];if(r===","||r==="_"||r==="\\"){e+=r,n+=2;continue}}t[n]==="_"?e+=" ":e+=t[n],n++}return e}function X3(t){let e=[],n="",r=0;for(;r<t.length;){if(t[r]==="\\"&&r+1<t.length){n+=t[r]+t[r+1],r+=2;continue}if(t[r]===","){e.push(n),n="",r++;continue}n+=t[r],r++}return e.push(n),e}function xP(t){if(t==null||typeof t!="object"||Array.isArray(t))return!1;let e=Object.keys(t);return e.length===1&&e[0]==="in"&&typeof t.in=="string"}function Vo(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(r){return r!==null&&typeof r=="object"?Vo(r):r});let e={},n=[];for(let r in t){let o=t[r];if(an(r)){let i=kP(o);e[r]=xP(i)?i.in:i;continue}if(cn(r)){let i=kP(o);e[r]=xP(i)?i.in:i;continue}let s=Ke[r]||r;if(Yt.has(r)||Yt.has(s)){e[s]=o;continue}if(typeof o=="function"){e[s]=o;continue}if(o==null){e[s]=o;continue}if($r.has(r)||$r.has(s)){e[s]=o;continue}if(Array.isArray(o)){if(o.some(function(a){return a!==null&&typeof a=="object"})){e[s]=o.map(function(a){return a!==null&&typeof a=="object"?Vo(a):a});continue}if(o.length<=1){e[s]=o;continue}n.push(s+":"+o.map(SP).join(","));continue}if(typeof o=="object"){e[s]=Vo(o);continue}if(o===!0){n.push(s);continue}if(o===!1){n.push("!"+s);continue}if(typeof o=="number"){n.push(s+":#"+o);continue}n.push(s+":"+SP(o))}return n.length&&(e.in=n.join(" ")),e}function kP(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?Vo(e):e}):typeof t=="object"?Vo(t):t}function vP(t){return t.startsWith("#")&&/^#-?\d+(\.\d+)?$/.test(t)?Number(t.slice(1)):Y3(t)}function vx(t){if(!t||typeof t!="string")return{};let e={},n=t.trim().split(/\s+/).filter(Boolean);for(let r of n){if(r.startsWith("!")){let l=r.slice(1),f=Gt[l]||l;e[f]=!1;continue}let o=r.indexOf(":");if(o===-1){let l=Gt[r]||r;e[l]=!0;continue}let s=r.slice(0,o),i=r.slice(o+1),a=Gt[s]||s,c=X3(i);if(c.length>1){e[a]=c.map(vP);continue}e[a]=vP(i)}return e}function zo(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(n){return n!==null&&typeof n=="object"?zo(n):n});let e={};if(typeof t.in=="string"){let n=vx(t.in);for(let r in n)e[r]=n[r]}for(let n in t){if(n==="in")continue;let r=t[n];if(an(n)){typeof r=="string"?e[n]=vx(r):e[n]=Ex(r);continue}let o=Gt[n]||n;if(cn(n)&&o===n){typeof r=="string"?e[n]=vx(r):e[n]=Ex(r);continue}if(Yt.has(o)||Yt.has(n)){e[o]=r;continue}e[o]=Ex(r)}return e}function Ex(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?zo(e):e}):typeof t=="object"?zo(t):t}var Z3={shorten:Bo,stringify:Uo,stringifyFurther:zo};function Q3(t,e){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(r=>e(r));let n={};for(let r in t){let o=t[r];n[r]=o&&typeof o=="object"?e(o):o}return n}var J3=["components","pages","snippets"],of={name:"shorthand",prepareContext(t){let e=t.shorthand;if(!e)return;let r=Z3[e===!0?"shorten":e];if(r){for(let o of J3)t[o]&&(t[o]=Q3(t[o],r));t.app&&typeof t.app=="object"&&(t.app=r(t.app))}}};var Fx={};F(Fx,{LEVELS:()=>sf,analyzePlugin:()=>Fi,attachBrowserListeners:()=>Jp,attachNetworkListeners:()=>cf,classifyEvent:()=>Dx,createAnalyzeState:()=>th,createBeaconSink:()=>Mx,createConsoleSink:()=>Ix,createDedupe:()=>Rx,createEnrich:()=>Tx,createMemorySink:()=>$x,createPipeline:()=>Gp,createRedact:()=>Kp,createRemoteSink:()=>Xp,createSample:()=>Px,createSummarize:()=>Ox,default:()=>Fi,emitFetchEvent:()=>LP,makeEvent:()=>ot,meetsLevel:()=>Wp,normalizeLevel:()=>af,resolveSinks:()=>Qp,summarizeElement:()=>Ho});var t4=0,e4=()=>`${Date.now().toString(36)}-${(t4++).toString(36)}`,ot=(t,e,n={})=>({id:e4(),ts:Date.now(),type:t,level:e,...n}),n4=t=>{let e=[],n=t,r=0;for(;n&&r<32;)n.key!=null&&e.unshift(String(n.key)),n=n.parent,r++;return e.join(" > ")},Ho=t=>t?{key:t.key!=null?String(t.key):null,name:t.__name||t.name||null,path:n4(t),tag:t.tag||null,component:t.component||null,route:t.context?.routerOptions?.currentRoute||null}:null;var Ni=t=>t?.context?.analyze,r4={init:{category:"lifecycle",type:"lifecycle",level:"debug"},create:{category:"lifecycle",type:"lifecycle",level:"debug"},render:{category:"lifecycle",type:"lifecycle",level:"debug"},beforeRemove:{category:"lifecycle",type:"lifecycle",level:"debug"},remove:{category:"lifecycle",type:"lifecycle",level:"debug"}},o4=(t,{category:e,type:n,level:r})=>o=>{let s=Ni(o);!s||!s.shouldCapture(e)||s.emit(ot(n,r,{hook:t,element:Ho(o)}))},EP=t=>(e,n)=>{let r=Ni(e);!r||!r.shouldCapture("state")||r.emit(ot("state","debug",{hook:t,element:Ho(e),changedKeys:n?.changedKeys||null}))},Fi={name:"analyze",error(t,e){let n=Ni(t);if(!n||n.config.enabled===!1||!n.shouldCapture("errors"))return;let r=e?.error||e?.err||(e instanceof Error?e:null);n.emit(ot("error","error",{hook:e?.hook||"error",element:Ho(t),error:r,message:r?.message||(typeof e?.message=="string"?e.message:null)}))},renderRouter(t){let e=Ni(t);e&&(!e.shouldCapture("navigation")&&!e.shouldCapture("lifecycle")||e.emit(ot("navigation","info",{hook:"renderRouter",route:t.context?.routerOptions?.currentRoute||null})))},beforeUpdate(t){let e=Ni(t);!e||!e.shouldCapture("updates")||t.__ref&&(t.__ref.__analyzeUpdateStart=typeof performance<"u"?performance.now():Date.now())},update(t){let e=Ni(t);if(!e||!e.shouldCapture("updates"))return;let n=null;t.__ref?.__analyzeUpdateStart!=null&&(n=(typeof performance<"u"?performance.now():Date.now())-t.__ref.__analyzeUpdateStart,t.__ref.__analyzeUpdateStart=null),e.emit(ot("update","debug",{hook:"update",element:Ho(t),durationMs:n}))},beforeStateUpdate:EP("beforeStateUpdate"),stateUpdate:EP("stateUpdate")};for(let[t,e]of Object.entries(r4))Fi[t]=o4(t,e);I();var sf={error:0,warn:1,info:2,debug:3,trace:4};var Wp=(t,e)=>{let n=sf[t],r=sf[e];return n==null||r==null?!0:n<=r},af=t=>sf[t]!=null?t:"warn";I();var qp=/password|token|secret|ssn|card|cvv|pin|apikey|api_key|auth|email|otp/i;var s4=(t,e)=>{for(let n of e)if(n instanceof RegExp){if(n.test(t))return!0}else if(typeof n=="string"&&t.toLowerCase().includes(n.toLowerCase()))return!0;return!1},i4=(t,e)=>{if(e!=="redact"){if(e==="hash"){let n=0,r=String(t);for(let o=0;o<r.length;o++)n=(n<<5)-n+r.charCodeAt(o)|0;return`#${(n>>>0).toString(36)}`}return"***"}},Cx=(t,e,n,r)=>{if(r>6||t==null||typeof t!="object")return t;if(Array.isArray(t))return t.map(s=>Cx(s,e,n,r+1));let o={};for(let s of Object.keys(t))if(s4(s,e)||qp.test(s)){let a=i4(t[s],n);a!==void 0&&(o[s]=a)}else o[s]=Cx(t[s],e,n,r+1);return o},Kp=(t=[],e="mask")=>{let n=Array.isArray(t)?t:[t];return r=>{if(!r)return r;let{id:o,ts:s,type:i,level:a,hook:c,error:l,message:f,durationMs:u,element:d,target:p,...g}=r,h=Cx(g,n,e,0);return{id:o,ts:s,type:i,level:a,hook:c,error:l,message:f,durationMs:u,element:d,target:p,...h}}};var Tx=t=>{let e=`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,8)}`,n=typeof navigator<"u"?navigator.userAgent:null,r=t.config.buildHash||null,o=t.config.appId||null;return s=>{if(!s)return s;let i=t.context?.routerOptions?.currentRoute||null,a=C,c=a&&a.innerWidth?{w:a.innerWidth,h:a.innerHeight}:null;return{...s,session:e,app:{id:o,build:r,route:i},meta:{ua:n,viewport:c}}}},Ox=()=>t=>{if(!t)return t;if(t.element&&typeof t.element=="object"){let e=t.element;(e.node||e.parent||e.__ref)&&(t={...t,element:{key:e.key!=null?String(e.key):null,name:e.__name||e.name||null,tag:e.tag||null,component:e.component||null}})}return t.error instanceof Error&&(t={...t,error:{name:t.error.name,message:t.error.message,stack:t.error.stack}}),t},Rx=(t=1e3,e=500)=>{let n=new Map;return r=>{if(!r)return r;let o=`${r.type}:${r.level}:${r.message||""}:${r.error?.message||""}`,s=n.get(o),i=r.ts||Date.now();if(s&&i-s<t)return null;if(n.set(o,i),n.size>e){let a=Math.ceil(e/10),c=0;for(let l of n.keys()){if(c++>=a)break;n.delete(l)}}return r}},Px=t=>e=>{if(!e)return e;let n=t[e.type];return n==null||n>=1?e:Math.random()>n?null:e},AP={redact:t=>Kp(t.config.redact||[],t.config.maskStrategy),enrich:t=>Tx(t),summarize:()=>Ox(),dedupe:t=>Rx(t.config.cache?.dedupeWindowMs||1e3),sample:t=>Px(t.config.sample||{})},a4=(t,e)=>{if(typeof t=="function")return t;if(typeof t=="string"){let n=AP[t];return n?n(e):null}return null},Gp=t=>{let e=t.config,n=Array.isArray(e.transformers)?e.transformers.slice():[],r=n.findIndex(s=>s==="redact");r>=0&&n.splice(r,1);let o=[];e.redact!==!1&&o.push(AP.redact(t));for(let s of n){let i=a4(s,t);i&&o.push(i)}return s=>{let i=s;for(let a of o){if(i==null)return null;let c=a(i);if(c==null)return null;if(Array.isArray(c)){let l=o.slice(o.indexOf(a)+1),f=[];for(let u of c){let d=u,p=!1;for(let g of l)if(d=g(d),d==null){p=!0;break}!p&&d!=null&&f.push(d)}return f}i=c}return i}};I();I();var Yp=typeof C<"u"&&typeof C.document<"u",c4=5e3,l4=50,f4=3,u4=1500,d4=1e3,Dx=t=>t?t.level==="error"||t.type==="error"?"bug":t.type==="network"?"network":t.type==="console"?t.level==="error"||t.level==="warn"?"bug":"log":t.level==="warn"?"bug":t.level==="info"?"log":"verbose":"verbose",p4=t=>{try{return JSON.stringify(t)}catch{return null}},h4=()=>{try{return Intl.DateTimeFormat().resolvedOptions().timeZone||null}catch{return null}},g4=t=>{if(!t)return null;let e=String(t),n;return(n=e.match(/Edg\/([\d.]+)/))?{name:"Edge",version:n[1]}:(n=e.match(/OPR\/([\d.]+)/))?{name:"Opera",version:n[1]}:(n=e.match(/Firefox\/([\d.]+)/))?{name:"Firefox",version:n[1]}:/Chrome\/([\d.]+)/.test(e)&&/Safari\//.test(e)?(n=e.match(/Chrome\/([\d.]+)/),{name:"Chrome",version:n[1]}):(n=e.match(/Version\/([\d.]+).*Safari/))?{name:"Safari",version:n[1]}:{name:null,version:null}},m4=()=>{if(!Yp)return null;try{let t=C.document?.documentElement?.getAttribute("data-theme")||null,e=typeof C.matchMedia=="function"?C.matchMedia("(prefers-color-scheme: dark)").matches:null;return{active:t||(e?"dark":e===!1?"light":null),forced:t||null,prefers:e==null?null:e?"dark":"light"}}catch{return null}},y4=()=>{if(!Yp)return null;let t=C.location,e=typeof navigator<"u"?navigator:null,n=typeof screen<"u"?screen:null;return{url:t?.href||null,path:t?.pathname||null,referrer:C.document?.referrer||null,title:C.document?.title||null,ua:e?.userAgent||null,browser:g4(e?.userAgent),language:e?.language||null,languages:e?.languages||null,timezone:h4(),viewport:C.innerWidth?{w:C.innerWidth,h:C.innerHeight,dpr:C.devicePixelRatio||1}:null,screen:n?{w:n.width||null,h:n.height||null,availW:n.availWidth||null,availH:n.availHeight||null,colorDepth:n.colorDepth||null,orientation:n.orientation?.type||null}:null,theme:m4()}},Xp=(t={})=>{let e=t.url,n=typeof t.transport=="function"?t.transport:null,r=typeof t.syncTransport=="function"?t.syncTransport:null;if(!e&&!n)return()=>{};let o=t.apiKey||null,s=t.appKey||t.appId||null,i=t.tenantKey||t.tenant||null,a=t.release||null,c=t.env||null,l=t.sdk||null,f=typeof t.getAuth=="function"?t.getAuth:null,u=typeof t.getContext=="function"?t.getContext:null,d=typeof t.classify=="function"?t.classify:Dx,p=typeof t.beforeSend=="function"?t.beforeSend:null,g=t.debug===!0,h=typeof t.getDebug=="function"?t.getDebug:null,m=t.batchMs!=null?t.batchMs:c4,y=t.maxBatch||l4,S=t.maxRetries!=null?t.maxRetries:f4,b=t.backoffMs||u4,x=t.queueLimit||d4,_=t.sampleRate!=null?t.sampleRate:1,w=()=>typeof crypto<"u"&&crypto.randomUUID?crypto.randomUUID():`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,10)}`,k=t.sessionId||w(),A=[],T=[],M=null,$=null,R=()=>{M||!A.length||(M=setTimeout(it,m))},j=z=>{if($)return;let B=b*Math.pow(2,Math.max(0,z-1));$=setTimeout(()=>{if($=null,!T.length)return;let nt=T.shift();tt(nt.envelope,nt.attempt)},B)},et=(z,B=!1)=>{let nt=u?Lx(u):null,U={id:k,sentAt:Date.now()};B&&(U.endedAt=Date.now());let V={v:1,session:U,app:{key:s,release:a,env:c},tenant:i,sdk:l,page:y4(),user:nt?.user||null,traits:nt?.traits||null,tags:nt?.tags||null,events:z};if((h?Lx(h)===!0:g)&&(V.app.debug=!0),p)try{return p(V)||null}catch{return V}return V},tt=async(z,B=1)=>{if(z)try{let nt=!0;if(n){let U=await n(z);nt=U!==!1&&U?.ok!==!1}else nt=await b4(e,z,{apiKey:o,getAuth:f});!nt&&B<S&&(T.push({envelope:z,attempt:B+1}),j(B+1))}catch{B<S&&(T.push({envelope:z,attempt:B+1}),j(B+1))}},it=(z=!1,B=!1)=>{if(M&&(clearTimeout(M),M=null),!A.length&&!B)return;let nt=A;A=[];let U=et(nt,B);if(U){if(z&&Yp){if(typeof r=="function"&&Lx(()=>r(U)))return;if(navigator.sendBeacon&&e){let V=p4(U);if(V)try{navigator.sendBeacon(e,new C.Blob([V],{type:"application/json"}));return}catch{}}}tt(U)}},St=!1,Pt=()=>{St||(St=!0,it(!0,!0))};Yp&&(C.addEventListener("pagehide",Pt,{passive:!0}),C.addEventListener("beforeunload",Pt,{passive:!0}),C.addEventListener("visibilitychange",()=>{C.document.visibilityState==="hidden"&&it(!0)},{passive:!0}));let bt=z=>{if(!z||_<1&&Math.random()>_)return;St&&(St=!1);let B={...z,log_type:d(z)};A.push(B),A.length>x&&(A=A.slice(-x)),A.length>=y?it():R()},Mt=z=>(it(!1,!0),k=z||w(),St=!1,bt.sessionId=k,k);return bt.flush=()=>it(!1),bt.endSession=Pt,bt.startNewSession=Mt,bt.sessionId=k,bt},Lx=t=>{try{return t()}catch{return null}},b4=async(t,e,{apiKey:n,getAuth:r})=>{let o={"Content-Type":"application/json","X-Analyze-Beacon":"1"};if(n&&(o["X-Analyze-Key"]=n),r)try{let s=await r();s&&(o.Authorization=`Bearer ${s}`)}catch{}try{return(await fetch(t,{method:"POST",headers:o,body:JSON.stringify(e),keepalive:!0,credentials:"omit",mode:"cors"})).ok}catch{return!1}};var _4={error:"\x1B[31m",warn:"\x1B[33m",info:"\x1B[36m",debug:"\x1B[90m",trace:"\x1B[90m"},w4="\x1B[0m",Zp=typeof C<"u"&&typeof C.document<"u",Ix=(t={})=>{let e=t.minLevel||null,n=console.error.bind(console),r=console.warn.bind(console),o=console.log.bind(console);return s=>{if(!s)return;let i=s.level==="error"?n:s.level==="warn"?r:o,a=`[analyze:${s.type}]`;if(Zp)i(a,s);else{let c=_4[s.level]||"";i(`${c}${a}${w4}`,s)}}},$x=(t,e={})=>{let n=e.max||t.config.cache?.max||500,r=new Array(n),o=0,s=0,i=a=>{r[o]=a,o=(o+1)%n,s<n&&s++};return t.__memory={push:i,snapshot:()=>{let a=new Array(s),c=(o-s+n)%n;for(let l=0;l<s;l++)a[l]=r[(c+l)%n];return a},query:(a={})=>{let c=t.__memory.snapshot(),l=a.sinceMs?Date.now()-a.sinceMs:0;return c.filter(f=>!(!f||a.level&&f.level!==a.level||a.type&&f.type!==a.type||l&&f.ts<l))},clear:()=>{o=0,s=0}},i},Mx=(t={})=>{let e=t.url,n=t.batchMs!=null?t.batchMs:5e3,r=t.maxBatch||50;if(!e)return()=>{};let o=[],s=null,i=()=>{if(s&&(clearTimeout(s),s=null),!o.length)return;let c=JSON.stringify({events:o});o=[];let l=Zp?new C.Blob([c],{type:"application/json"}):c;if(Zp&&navigator.sendBeacon)try{navigator.sendBeacon(e,l);return}catch{}typeof fetch<"u"&&fetch(e,{method:"POST",headers:{"Content-Type":"application/json","X-Analyze-Beacon":"1"},body:c,keepalive:!0}).catch(()=>{})};Zp&&(C.addEventListener("pagehide",i,{passive:!0}),C.addEventListener("beforeunload",i,{passive:!0}));let a=c=>{c&&(o.push(c),o.length>=r?i():s||(s=setTimeout(i,n)))};return a.flush=i,a},CP={console:Ix,memory:$x,beacon:Mx,remote:Xp},TP=(t,e)=>e.getDebug!=null||e.debug!=null?e:{...e,getDebug:()=>t.config.debug===!0},Qp=t=>{let e=Array.isArray(t.config.sinks)?t.config.sinks:["console"],n=[];for(let r of e)if(typeof r=="function")n.push(r);else if(typeof r=="string"){let o=CP[r];if(!o)continue;n.push(r==="memory"?o(t,{}):o(r==="remote"?TP(t,{}):{}))}else if(r&&typeof r=="object"&&r.type){let o=CP[r.type];if(!o)continue;n.push(r.type==="memory"?o(t,r):o(r.type==="remote"?TP(t,r):r))}return n};I();var S4=typeof C<"u"&&typeof C.document<"u",x4=new Set(["password","hidden"]),OP=(t,e)=>{let n=0,r=null,o=null;return(...s)=>{let i=Date.now();i-n>=e?(n=i,t(...s)):(o=s,r||(r=setTimeout(()=>{n=Date.now(),r=null,o&&(t(...o),o=null)},e-(i-n))))}},Nx="__analyzeKeyPath",ji=t=>{let e=t.target;if(!e)return{selector:null,key:null,path:null};if(e[Nx])return e[Nx];let n=[],r=e,o=0,s=null;for(;r&&o<64;){if(r.getAttribute){let a=r.getAttribute("data-key");a&&(s==null&&(s=a),n.unshift(a))}r=r.parentNode,o++}let i;if(n.length)i={selector:null,key:s,path:n.join(" > "),tag:e.tagName?.toLowerCase()||null};else{let a=(e.tagName||"unknown").toLowerCase(),c=e.id?`#${e.id}`:"",l=e.className&&typeof e.className=="string"?"."+e.className.trim().split(/\s+/).slice(0,2).join("."):"";i={selector:`${a}${c}${l}`,key:null,path:null}}try{e[Nx]=i}catch{}return i},k4=(t,e)=>{if(e==="mask")return"***";if(e!=="redact"){if(e==="hash"){let n=0,r=String(t||"");for(let o=0;o<r.length;o++)n=(n<<5)-n+r.charCodeAt(o)|0;return`#${(n>>>0).toString(36)}`}return"***"}},v4=t=>!!(!t||t.tagName==="INPUT"&&x4.has(t.type)||qp.test(t.name||"")||qp.test(t.id||"")||t.dataset?.analyze==="skip"),Jp=t=>{if(!S4)return;let e=t.config.capture,n=t.config.throttle,r=t.__teardown,o=(s,i,a,c)=>{s.addEventListener(i,a,c),r.push(()=>s.removeEventListener(i,a,c))};if(e.errors&&(o(C,"error",s=>{t.emit(ot("error","error",{hook:"window.onerror",message:s.message||null,error:s.error||null,source:s.filename||null,line:s.lineno||null,col:s.colno||null}))}),o(C,"unhandledrejection",s=>{let i=s.reason,a=i instanceof Error?i:null;t.emit(ot("error","error",{hook:"unhandledrejection",message:a?.message||(typeof i=="string"?i:"Unhandled promise rejection"),error:a}))})),e.pointer){o(C,"click",i=>{t.emit(ot("pointer","info",{hook:"click",target:ji(i),button:i.button,x:i.clientX,y:i.clientY,modifiers:RP(i)}))},{passive:!0,capture:!0}),o(C,"dblclick",i=>{t.emit(ot("pointer","info",{hook:"dblclick",target:ji(i),x:i.clientX,y:i.clientY}))},{passive:!0,capture:!0}),o(C,"contextmenu",i=>{t.emit(ot("pointer","info",{hook:"contextmenu",target:ji(i),x:i.clientX,y:i.clientY}))},{passive:!0,capture:!0});let s=OP(i=>{t.emit(ot("pointer","trace",{hook:"pointermove",x:i.clientX,y:i.clientY}))},n.pointermove);o(C,"pointermove",s,{passive:!0})}if(e.keyboard&&o(C,"keydown",s=>{t.emit(ot("keyboard","info",{hook:"keydown",code:s.code,key:s.key&&s.key.length===1?"\xB7":s.key,modifiers:RP(s),target:ji(s)}))},{passive:!0,capture:!0}),e.forms){let s=i=>{let a=i.target;if(!a||!a.tagName||!["INPUT","TEXTAREA","SELECT"].includes(a.tagName))return;let l=v4(a),f=a.dataset?.analyze==="track",u=null;f&&!l?u=a.value:t.config.maskFormValues!==!1&&(u=k4(a.value,t.config.maskStrategy)),t.emit(ot("forms","info",{hook:i.type,target:ji(i),field:{name:a.name||null,type:a.type||a.tagName.toLowerCase()},value:u}))};o(C,"input",s,{passive:!0,capture:!0}),o(C,"change",s,{passive:!0,capture:!0}),o(C,"submit",i=>{t.emit(ot("forms","info",{hook:"submit",target:ji(i)}))},{passive:!0,capture:!0})}if(e.scroll){let s=OP(()=>{t.emit(ot("scroll","trace",{hook:"scroll",x:C.scrollX,y:C.scrollY}))},n.scroll);o(C,"scroll",s,{passive:!0,capture:!0})}if(e.viewport){let s=Ra(()=>{t.emit(ot("viewport","info",{hook:"resize",w:C.innerWidth,h:C.innerHeight,dpr:C.devicePixelRatio||1}))},n.resize);o(C,"resize",s,{passive:!0}),o(C,"orientationchange",()=>{t.emit(ot("viewport","info",{hook:"orientationchange",orientation:typeof screen<"u"&&screen.orientation?screen.orientation.type:null}))},{passive:!0}),o(C.document,"visibilitychange",()=>{t.emit(ot("viewport","info",{hook:"visibilitychange",hidden:C.document.hidden}))},{passive:!0}),t.emit(ot("viewport","info",{hook:"initial",w:C.innerWidth,h:C.innerHeight,dpr:C.devicePixelRatio||1}))}if(e.console)for(let s of["log","warn","error","debug"]){let i=console[s];console[s]=function(...a){try{t.emit(ot("console",s==="error"?"error":s==="warn"?"warn":"debug",{hook:`console.${s}`,args:a.map(PP)}))}catch{}return i.apply(console,a)},r.push(()=>{console[s]=i})}if(e.performance&&typeof PerformanceObserver<"u")try{let s=new PerformanceObserver(a=>{for(let c of a.getEntries())t.emit(ot("performance","info",{hook:c.entryType,name:c.name,startTime:c.startTime,duration:c.duration,value:c.value!=null?c.value:null}))}),i=["largest-contentful-paint","layout-shift","longtask","paint","first-input","event"];for(let a of i)try{s.observe({type:a,buffered:!0})}catch{}r.push(()=>s.disconnect())}catch{}},RP=t=>({shift:!!t.shiftKey,ctrl:!!t.ctrlKey,alt:!!t.altKey,meta:!!t.metaKey}),E4=t=>{let e={name:t.name||"Error",message:typeof t.message=="string"?t.message:String(t),stack:typeof t.stack=="string"?t.stack:null};return t.cause!==void 0&&(e.cause=PP(t.cause)),e},PP=t=>{if(t==null)return t;if(t instanceof Error)return E4(t);if(typeof t=="object")try{return JSON.parse(JSON.stringify(t))}catch{return String(t)}return t};I();var A4=typeof C<"u"&&typeof C.document<"u",LP=(t,e)=>{let n=t?.analyze;if(!n||!n.shouldCapture("network"))return;let r=e.phase==="error"?"error":"info";n.emit(ot("network",r,{hook:`fetch.${e.phase}`,source:"symbo-fetch",...e}))},cf=t=>{if(A4&&t.config.capture.network&&!t.__networkListeners){if(t.__networkListeners=!0,t.__teardown.push(()=>{t.__networkListeners=!1}),typeof C.fetch=="function"){let e=C.fetch.bind(C),n=function(r,o){if(o?.headers?.["X-Analyze-Beacon"]||!t.shouldCapture("network"))return e(r,o);let s=typeof r=="string"?r:r&&r.url||"",i=(o?.method||typeof r=="object"&&r?.method||"GET").toUpperCase(),a=typeof performance<"u"?performance.now():Date.now();return t.emit(ot("network","info",{hook:"fetch.start",source:"window.fetch",url:s,method:i})),e(r,o).then(c=>{let l=(typeof performance<"u"?performance.now():Date.now())-a;return t.emit(ot("network",c.ok?"info":"warn",{hook:"fetch.success",source:"window.fetch",url:s,method:i,status:c.status,ok:c.ok,durationMs:l})),c}).catch(c=>{let l=(typeof performance<"u"?performance.now():Date.now())-a;throw t.emit(ot("network","error",{hook:"fetch.error",source:"window.fetch",url:s,method:i,error:c,durationMs:l})),c})};C.fetch=n,t.__teardown.push(()=>{C.fetch=e})}if(typeof C.XMLHttpRequest=="function"){let e=C.XMLHttpRequest,n=e.prototype.open,r=e.prototype.send;e.prototype.open=function(o,s){return this.__analyze={method:String(o).toUpperCase(),url:String(s)},n.apply(this,arguments)},e.prototype.send=function(o){let s=this.__analyze;if(!s||!t.shouldCapture("network"))return r.apply(this,arguments);let i=typeof performance<"u"?performance.now():Date.now();t.emit(ot("network","info",{hook:"xhr.start",source:"xhr",url:s.url,method:s.method}));let a=()=>{let l=(typeof performance<"u"?performance.now():Date.now())-i,f=this.status>=200&&this.status<400;t.emit(ot("network",f?"info":"warn",{hook:"xhr.success",source:"xhr",url:s.url,method:s.method,status:this.status,ok:f,durationMs:l}))},c=()=>{let l=(typeof performance<"u"?performance.now():Date.now())-i;t.emit(ot("network","error",{hook:"xhr.error",source:"xhr",url:s.url,method:s.method,status:this.status,durationMs:l}))};return this.addEventListener("loadend",a),this.addEventListener("error",c),r.apply(this,arguments)},t.__teardown.push(()=>{e.prototype.open=n,e.prototype.send=r})}}};var C4={errors:!0,warnings:!0,pointer:!1,keyboard:!1,forms:!1,scroll:!1,viewport:!1,network:!1,performance:!1,navigation:!1,console:!1,lifecycle:!1,state:!1,updates:!1,replay:!1,telemetry:!1},T4={errors:!0,warnings:!0,pointer:!0,keyboard:!0,forms:!0,scroll:!0,viewport:!0,navigation:!0,state:!0},O4={errors:!0,warnings:!0,pointer:!0,navigation:!0,performance:!0,viewport:!0},R4={errors:!0,warnings:!0,console:!0,network:!1,navigation:!0,performance:!0,viewport:!0,lifecycle:!1,state:!1,updates:!1},P4=t=>{let e={...C4,...t};return e.replay&&Object.assign(e,T4),e.telemetry&&Object.assign(e,O4),e.remote&&Object.assign(e,R4),Object.assign(e,t),e},L4=64,D4=()=>{if(typeof C>"u"||!C.location)return null;try{let e=new URLSearchParams(C.location.search).get("analyze");return e||null}catch{return null}},th=(t={})=>{let e=t===!0?{}:{...t};e.capture=P4(e.capture||{});let n=D4();(n==="debug"||e.debug)&&(e.level="debug",e.debug=!0,e.capture={...e.capture,lifecycle:!0,state:!0,updates:!0,console:!0,network:!0}),n==="off"&&(e.enabled=!1),e.level=af(e.level||"warn"),e.cache={max:500,dedupeWindowMs:1e3,...e.cache||{}},e.throttle={pointermove:80,mousemove:80,scroll:100,resize:200,...e.throttle||{}},e.maskFormValues==null&&(e.maskFormValues=!0),e.maskStrategy||(e.maskStrategy="mask"),Array.isArray(e.sinks)||(e.sinks=["console","memory"]),Array.isArray(e.transformers)||(e.transformers=["enrich","summarize"]);let r={config:e,context:null,__ready:!1,__paused:!1,__preBuffer:[],__teardown:[],__pipeline:null,__sinks:null,__memory:null,__initialSnapshot:null},o=()=>{r.__pipeline||(r.__pipeline=Gp(r),r.__sinks=Qp(r))};return r.shouldCapture=s=>r.config.enabled===!1?!1:!!r.config.capture[s],r.emit=s=>{if(s&&r.config.enabled!==!1&&!r.__paused&&Wp(s.level,r.config.level)){if(!r.__ready){if(s.level!=="error"&&!r.config.captureDuringHydration)return;r.__preBuffer.length<L4&&r.__preBuffer.push(s);return}o(),DP(r,s)}},r.activate=s=>{if(r.context==null&&(r.context=s||null),r.__ready)return;r.__ready=!0;let i=r.__preBuffer;if(r.__preBuffer=[],i.length){o();for(let a of i)DP(r,a)}try{Jp(r)}catch(a){console.error("[analyze] browser attach error:",a)}try{cf(r)}catch(a){console.error("[analyze] network attach error:",a)}for(let a of r.__onActivate||[])try{a(r)}catch(c){console.error("[analyze] onActivate error:",c)}},r.pause=()=>{r.__paused=!0},r.resume=()=>{r.__paused=!1},r.setLevel=s=>{r.config.level=af(s)},r.setCapture=(s,i)=>{if(r.config.capture[s]=!!i,s==="network"&&i&&r.__ready)try{cf(r)}catch(a){console.error("[analyze] network attach error:",a)}},r.query=s=>r.__memory?r.__memory.query(s):[],r.snapshot=()=>r.__memory?r.__memory.snapshot():[],r.emitNetwork=s=>{if(!r.shouldCapture("network"))return;let i=s?.phase,a=i==="error"?"error":i==="success"&&s.ok===!1?"warn":"info";r.emit({id:`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,6)}`,ts:Date.now(),type:"network",level:a,hook:`fetch.${i||"unknown"}`,...s})},r.flush=()=>{if(r.__sinks)for(let s of r.__sinks)typeof s.flush=="function"&&s.flush()},r.startNewSession=s=>{let i=s||(typeof crypto<"u"&&crypto.randomUUID?crypto.randomUUID():`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,10)}`),a=Array.isArray(r.config.sinks)?r.config.sinks:[];for(let c of a)c&&typeof c=="object"&&c.type==="remote"&&(c.sessionId=i);if(r.__sinks)for(let c of r.__sinks)typeof c.startNewSession=="function"&&c.startNewSession(i);return i},r.replay=()=>({initialSnapshot:r.__initialSnapshot,events:r.snapshot()}),r.destroy=()=>{for(let s of r.__teardown)try{s()}catch{}r.__teardown=[],r.__ready=!1,r.__paused=!0},r.__onActivate=[],r.onActivate=s=>{r.__onActivate.push(s)},r},DP=(t,e)=>{let n=t.__pipeline(e);if(n==null)return;let r=Array.isArray(n)?n:[n];for(let o of r){if(typeof t.config.onEvent=="function")try{t.config.onEvent(o)}catch{}for(let s of t.__sinks)try{s(o)}catch(i){console.error("[analyze] sink error:",i)}}};var Ux={};F(Ux,{Inspect:()=>eh,inspectPlugin:()=>Bx});I();function IP(t){return v(t)?t:D(t)?t.find(e=>v(e)):""}function jx(t){if(!t)return;let e=t.__ref.__componentKey,n=t.extends&&IP(t.extends),r=t.parent&&t.parent.childExtends&&IP(t.parent.childExtends);return(e||n||r||"").split("_")[0].split(".")[0].split("+")[0]}function nh(t){if(!t||!t.__ref)return;let{components:e,pages:n,editor:r}=t.context,o=jx(t);return r&&r.onInitInspect&&!r.onInitInspect(o,t,t.state)?nh(t.parent):o&&(e[o]||n[o])?t:nh(t.parent)}var I4=(t,e,n)=>{let r=n.window||window;r.onkeydown=o=>{o.altKey&&o.shiftKey&&t.state.update({debugging:!0,preventSelect:!0},{preventUpdate:!0,preventContentUpdate:!0,preventRecursive:!0})},r.onkeyup=o=>{t.state.preventSelect&&(!o.altKey||!o.shiftKey)&&(t.state.replace({debugging:!1,preventSelect:!1},{preventUpdate:!0,preventContentUpdate:!0,preventRecursive:!0}),t.Inspector.state.update({area:!1}))}},eh={".preventSelect":{userSelect:"none"},"!preventSelect":{userSelect:"auto"},onInspect:I4,onMousemove:(t,e,n)=>{let r=t.target.ref,o=nh(r),s=e.Inspector.state;if(!o||!n.debugging||!o.__ref)return s.update({area:!1});let i=jx(o),a=l=>{s.update({area:l,focusKey:i})},c=()=>{if(t.altKey&&t.shiftKey){let{x:l,y:f,width:u,height:d}=o.node.getBoundingClientRect(),p={x:l,y:f,width:u,height:d};if(!s.area)return a(p);s.area.x!==p.x&&a(p)}else s.area&&s.update({area:!1})};window.requestAnimationFrame(()=>{c(),window.requestAnimationFrame(c)})},onMousedown:(t,e,n)=>{if(!n.debugging)return;let r=t.target.ref,o=nh(r);if(!o)return;let s=jx(o);if(!s)return;let i=r.context.editor;if(i&&i.onInspect)return i.onInspect(s,r,r.state,{allowRouterWhileInspect:!0});let a=JSON.stringify({componentKey:`${s}`});return r.context.socket?.emit&&r.context.socket.emit("route",a),t.preventDefault(),t.stopPropagation(),!1},Inspector:{state:{},transition:"all, defaultBezier, X",position:"fixed",hide:(t,e)=>!(e.area&&e.parent.debugging),style:{boxShadow:"0 0 10px #3686F733, 0 0 0 3px #3686F766, 0 0 100vmax 100vmax #000A",zIndex:"9999999",borderRadius:"10px",pointerEvents:"none"},Span:{position:"absolute",margin:"A2 0",fontSize:"Z",color:"text",zIndex:"99999999",transition:"all, defaultBezier, X",textDecoration:"underline",fontWeight:"500",top:"100%",style:{boxShadow:"0 25px 10px 35px black",textShadow:"0 0 10px black"},text:"{{ focusKey }}"},onInit:({context:t})=>{let{components:e}=t;if(E(e)){let{Content:n,...r}=e;for(let o in r)Oi[o]||(r[o].__ref||(r[o].__ref={}),r[o].__ref.__componentKey||(r[o].__ref.__componentKey=o))}},onBeforeUpdate:(t,e,n)=>{let{area:r}=n,o=n.area&&n.parent.debugging,s;if(!o)s="display: none !important";else if(r){let{x:i,y:a,width:c,height:l}=r;s=`
|
|
87
|
+
)`};var sB={primary:{"@dark":{color:"white",background:"blue",".color-only":{color:"blue"},".inactive":{background:"gray+16"},".gradient":{color:"white",background:"gradient-blue"}},"@light":{color:"white",background:"gradient-blue",".color-only":{color:"blue"},".gradient":{color:"white",background:"gradient-colorful"}}},secondary:{"@dark":{color:"white",background:"green",".color-only":{color:"green"}},"@light":{color:"white",background:"green",".color-only":{color:"green"}},".child":"--primary"},tertiary:{"@dark":{color:"white",background:"gray.92+8"},"@light":{background:"gray.1"}},quaternary:{"@light":{color:"white",background:"gradient-light"},"@dark":{color:"white",background:"gradient-dark-active"}},quinary:{"@dark":{color:"gray=90",background:"gradient-light",":hover":{color:"gray=95",background:"gradient-light-active"},":focus":{color:"gray=120",background:"gradient-light-active"},":active":{color:"gray=120",background:"gradient-light-active"},".active":{color:"gray=120",background:"gradient-light-active"}},"@light":{color:"gray3",background:"gradient-dark",":hover":{color:"gray1",background:"gradient-dark-active"},":active":{color:"gray1",background:"gradient-dark-active"},".active":{color:"gray1",background:"gradient-dark-active"}}}},iB={alert:{"@dark":{color:"white",background:"red"}},warning:{"@dark":{color:"black",background:"yellow"}},success:{"@dark":{color:"black",background:"green"}}},aB={field:{"@light":{color:"black",background:"gray.975+144",borderColor:"gray.975+144","::placeholder":{color:"gray-68"}},"@dark":{color:"white",background:"gray.975-52",borderColor:"gray.975-52","::placeholder":{color:"gray+68"}}},label:{"@dark":{color:"white",background:"gray.92+8"},"@light":{background:"gray.1"},".light":{color:"white",background:"gray3"},".dark":{color:"white",background:"black.35"}},card:{"@light":{background:"gray.975+150"},"@dark":{color:"white",background:"gray.975-56"},".child":{color:"white",background:"gray3"},".secondary":{color:"white",background:"gradient-blue-dark",".child":{color:"white",background:"black.35"}}},dialog:{"@dark":{color:"white",background:"gray.92",".helper":{color:"white",background:"black"}},"@light":{color:"currentColor",background:"gray.1"}}},z1={document:{"@light":{color:"black",background:"white"},"@dark":{color:"white",background:"black"}},...sB,...iB,...aB,backdrop:{"@light":{background:"scrim",backdropFilter:"blur(8px)"},"@dark":{background:"scrim",backdropFilter:"blur(8px)"}},backdropSoft:{"@light":{background:"scrimSoft",backdropFilter:"blur(4px)"},"@dark":{background:"scrimSoft",backdropFilter:"blur(4px)"}},none:{color:"none",background:"none"},transparent:{color:"currentColor",background:"transparent"}};var H1={base:16,ratio:1.25,subSequence:!0,useCapsize:!0,templates:{}};var W1={ratio:1.618,subSequence:!0};var q1={SourceSans:[{url:""}]},K1={system:{isDefault:!0,isSystemFallback:!0,value:["system-ui","-apple-system","BlinkMacSystemFont",'"Segoe UI"',"Roboto",'"Helvetica Neue"',"Arial",'"Noto Sans"','"Liberation Sans"'],type:"sans-serif"}};var G1={symbols:'<svg xmlns="http://www.w3.org/2000/svg" width="41" height="42" viewBox="0 0 41 42"><path fill="currentColor" fill-rule="evenodd" d="M26.6448969,0.699064106 C31.4862479,1.83000067 35.6718819,4.48073656 38.3104478,8.91022511 C40.5212645,12.5974948 41.4936378,17.0951724 40.5085112,21.3679841 C39.7174644,25.0315254 37.8558379,27.853625 34.8002871,29.8369535 C31.9792925,31.7073227 27.90737,32.069064 24.6776501,31.3213124 C23.2887047,30.9944607 20.6411869,29.9775216 19.044333,28.0178349 C17.5928447,26.2365433 17.1250067,23.5192397 17.0461096,22.8419583 C16.9044422,21.6258334 17.1065683,20.249997 17.3800113,19.0276209 C17.9614095,16.4655592 18.9984397,14.7924534 21.1401118,13.3818866 C22.95018,12.1750388 24.6834696,11.8738651 26.7601335,12.3496124 C28.1855093,12.6880929 29.4520072,13.526716 30.3514025,14.7276098 C30.6271426,15.093878 30.8260324,15.4389318 31.059655,15.8362933 L30.9598079,15.7715366 C29.6377659,14.9422902 28.1654404,14.6590001 26.6448969,15.0752526 C25.2996601,15.4486698 24.1453463,16.3687006 23.4390969,17.6304467 C22.6973258,18.9448239 22.4839364,20.5087166 22.8465467,21.9733145 C23.2152637,23.4394215 24.1276197,24.6832715 25.381967,25.429977 C26.7647836,26.2608222 28.5893081,26.47537 30.1320438,26.0161118 C32.0344739,25.4497656 33.5958796,24.1165457 34.5824098,22.3233381 C35.8078311,20.0959926 36.0316242,17.5753145 35.4197363,15.1376991 C34.8712232,12.9726344 33.491011,11.1258939 31.7578503,9.86101942 C28.3978494,7.40873928 23.8145474,6.88014849 19.8961329,8.1555193 C16.9596954,9.11146975 14.399202,11.0657028 12.6221782,13.707146 C10.5375814,16.8894059 9.73736372,20.794518 10.3986926,24.5579956 C10.9302311,27.7327705 12.5716868,31.0242929 14.8485647,33.1339502 C15.5517576,33.7855358 16.0056239,34.2996296 16.8186608,34.9238068 C16.1252729,35.6670587 15.729719,36.1210912 15.0276006,36.8553491 L10.5425168,41.6144377 C8.59431563,40.2572487 6.84060794,38.6181461 5.33246714,36.7448351 C1.65619854,32.1632109 -0.0655234106,26.1858125 0.562658817,20.1851649 C1.1000136,14.4158268 3.81414269,9.08050481 8.0996615,5.36924966 C12.3107417,1.69300072 17.6911238,0.0107792851 23.1108097,0.299129816 C25.006381,0.458182488 26.18441,0.591493918 26.6448969,0.699064106 Z"/></svg>',logo:'<svg xmlns="http://www.w3.org/2000/svg" width="41" height="42" viewBox="0 0 41 42"><path fill="currentColor" fill-rule="evenodd" d="M26.6448969,0.699064106 C31.4862479,1.83000067 35.6718819,4.48073656 38.3104478,8.91022511 C40.5212645,12.5974948 41.4936378,17.0951724 40.5085112,21.3679841 C39.7174644,25.0315254 37.8558379,27.853625 34.8002871,29.8369535 C31.9792925,31.7073227 27.90737,32.069064 24.6776501,31.3213124 C23.2887047,30.9944607 20.6411869,29.9775216 19.044333,28.0178349 C17.5928447,26.2365433 17.1250067,23.5192397 17.0461096,22.8419583 C16.9044422,21.6258334 17.1065683,20.249997 17.3800113,19.0276209 C17.9614095,16.4655592 18.9984397,14.7924534 21.1401118,13.3818866 C22.95018,12.1750388 24.6834696,11.8738651 26.7601335,12.3496124 C28.1855093,12.6880929 29.4520072,13.526716 30.3514025,14.7276098 C30.6271426,15.093878 30.8260324,15.4389318 31.059655,15.8362933 L30.9598079,15.7715366 C29.6377659,14.9422902 28.1654404,14.6590001 26.6448969,15.0752526 C25.2996601,15.4486698 24.1453463,16.3687006 23.4390969,17.6304467 C22.6973258,18.9448239 22.4839364,20.5087166 22.8465467,21.9733145 C23.2152637,23.4394215 24.1276197,24.6832715 25.381967,25.429977 C26.7647836,26.2608222 28.5893081,26.47537 30.1320438,26.0161118 C32.0344739,25.4497656 33.5958796,24.1165457 34.5824098,22.3233381 C35.8078311,20.0959926 36.0316242,17.5753145 35.4197363,15.1376991 C34.8712232,12.9726344 33.491011,11.1258939 31.7578503,9.86101942 C28.3978494,7.40873928 23.8145474,6.88014849 19.8961329,8.1555193 C16.9596954,9.11146975 14.399202,11.0657028 12.6221782,13.707146 C10.5375814,16.8894059 9.73736372,20.794518 10.3986926,24.5579956 C10.9302311,27.7327705 12.5716868,31.0242929 14.8485647,33.1339502 C15.5517576,33.7855358 16.0056239,34.2996296 16.8186608,34.9238068 C16.1252729,35.6670587 15.729719,36.1210912 15.0276006,36.8553491 L10.5425168,41.6144377 C8.59431563,40.2572487 6.84060794,38.6181461 5.33246714,36.7448351 C1.65619854,32.1632109 -0.0655234106,26.1858125 0.562658817,20.1851649 C1.1000136,14.4158268 3.81414269,9.08050481 8.0996615,5.36924966 C12.3107417,1.69300072 17.6911238,0.0107792851 23.1108097,0.299129816 C25.006381,0.458182488 26.18441,0.591493918 26.6448969,0.699064106 Z"/></svg>',arrowDownCircle:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-down-circle"><circle cx="12" cy="12" r="10"/><path d="M8 12l4 4 4-4M12 8v8"/></svg>',arrowDownLeft:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-down-left"><path d="M17 7L7 17M17 17H7V7"/></svg>',arrowDownRight:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-down-right"><path d="M7 7l10 10M17 7v10H7"/></svg>',arrowDown:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-down"><path d="M12 5v14M19 12l-7 7-7-7"/></svg>',arrowLeftCircle:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-left-circle"><circle cx="12" cy="12" r="10"/><path d="M12 8l-4 4 4 4M16 12H8"/></svg>',arrowLeft:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-left"><path d="M19 12H5M12 19l-7-7 7-7"/></svg>',arrowRight:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-right"><path d="M5 12h14M12 5l7 7-7 7"/></svg>',arrowRightCircle:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-right-circle"><circle cx="12" cy="12" r="10"/><path d="M12 16l4-4-4-4M8 12h8"/></svg>',arrowUpCircle:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-up-circle"><circle cx="12" cy="12" r="10"/><path d="M16 12l-4-4-4 4M12 16V8"/></svg>',arrowUpLeft:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-up-left"><path d="M17 17L7 7M7 17V7h10"/></svg>',arrowUpRight:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-up-right"><path d="M7 17L17 7M7 7h10v10"/></svg>',arrowUp:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-up"><path d="M12 19V5M5 12l7-7 7 7"/></svg>',checkCircle:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-check-circle"><path d="M22 11.08V12a10 10 0 11-5.93-9.14"/><path d="M22 4L12 14.01l-3-3"/></svg>',check:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-check"><path d="M20 6L9 17l-5-5"/></svg>',chevronDown:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-down"><path d="M6 9l6 6 6-6"/></svg>',chevronLeft:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-left"><path d="M15 18l-6-6 6-6"/></svg>',chevronRight:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-right"><path d="M9 18l6-6-6-6"/></svg>',chevronUp:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-up"><path d="M18 15l-6-6-6 6"/></svg>',copy:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-copy"><rect x="9" y="9" width="13" height="13" rx="2" ry="2"/><path d="M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1"/></svg>',eyeOff:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-eye-off"><path d="M17.94 17.94A10.07 10.07 0 0112 20c-7 0-11-8-11-8a18.45 18.45 0 015.06-5.94M9.9 4.24A9.12 9.12 0 0112 4c7 0 11 8 11 8a18.5 18.5 0 01-2.16 3.19m-6.72-1.07a3 3 0 11-4.24-4.24M1 1l22 22"/></svg>',eye:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-eye"><path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"/><circle cx="12" cy="12" r="3"/></svg>',info:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-info"><circle cx="12" cy="12" r="10"/><path d="M12 16v-4M12 8h.01"/></svg>',lock:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-lock"><rect x="3" y="11" width="18" height="11" rx="2" ry="2"/><path d="M7 11V7a5 5 0 0110 0v4"/></svg>',minus:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-minus"><path d="M5 12h14"/></svg>',sun:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-sun"><circle cx="12" cy="12" r="5"/><path d="M12 1v2M12 21v2M4.22 4.22l1.42 1.42M18.36 18.36l1.42 1.42M1 12h2M21 12h2M4.22 19.78l1.42-1.42M18.36 5.64l1.42-1.42"/></svg>',moon:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-moon"><path d="M21 12.79A9 9 0 1111.21 3 7 7 0 0021 12.79z"/></svg>',moreHorizontal:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-more-horizontal"><circle cx="12" cy="12" r="1"/><circle cx="19" cy="12" r="1"/><circle cx="5" cy="12" r="1"/></svg>',moreVertical:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-more-vertical"><circle cx="12" cy="12" r="1"/><circle cx="12" cy="5" r="1"/><circle cx="12" cy="19" r="1"/></svg>',send:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-send"><path d="M22 2L11 13M22 2l-7 20-4-9-9-4 20-7z"/></svg>',smile:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-smile"><circle cx="12" cy="12" r="10"/><path d="M8 14s1.5 2 4 2 4-2 4-2M9 9h.01M15 9h.01"/></svg>',search:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-search"><circle cx="11" cy="11" r="8"/><path d="M21 21l-4.35-4.35"/></svg>',upload:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-upload"><path d="M21 15v4a2 2 0 01-2 2H5a2 2 0 01-2-2v-4M17 8l-5-5-5 5M12 3v12"/></svg>',video:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-video"><path d="M23 7l-7 5 7 5V7z"/><rect x="1" y="5" width="15" height="14" rx="2" ry="2"/></svg>',x:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-x"><path d="M18 6L6 18M6 6l12 12"/></svg>',star:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-star"><path d="M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z"/></svg>',plus:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-plus"><path d="M12 5v14M5 12h14"/></svg>'};var Y1={tv:"(min-width: 2780px)",screenL:"(max-width: 1920px)","screenL<":"(min-width: 1920.02px)",screenM:"(max-width: 1680px)","screenM<":"(min-width: 1680.02px)",screenS:"(max-width: 1440px)","screenS<":"(min-width: 1440.02px)",tabletL:"(max-width: 1366px)","tabletL<":"(min-width: 1366.02px)",tabletM:"(max-width: 1280px)","tabletM<":"(min-width: 1280.02px)",tabletS:"(max-width: 1024px)","tabletS<":"(min-width: 1024.02px)",mobileL:"(max-width: 768px)","mobileL<":"(min-width: 768.02px)",mobileM:"(max-width: 560px)","mobileM<":"(min-width: 560.02px)",mobileS:"(max-width: 480px)","mobileS<":"(min-width: 480.02px)",mobileXS:"(max-width: 375px)","mobileXS<":"(min-width: 375.02px)",light:"(prefers-color-scheme: light)",dark:"(prefers-color-scheme: dark)",print:"print"};var X1={base:150,ratio:1.333,unit:"ms",subSequence:!0,defaultBezier:"cubic-bezier(.29, .67, .51, .97)",springBezier:"cubic-bezier(.32, .72, 0, 1)"};var Z1={radiusControl:"12px",radiusCard:"17px",radiusSheet:"24px",radiusPill:"999px",controlH:"44px",controlHCompact:"36px"};var Ml={version:"0.0.1",color:U1,gradient:V1,theme:z1,typography:H1,spacing:W1,font:q1,fontFamily:K1,timing:X1,icons:G1,media:Y1,sizes:Z1,reset:{html:{},body:{}},animation:{fadeIn:{from:{opacity:0},to:{opacity:1}},modalIn:{from:{transform:"scale(0.95)",opacity:0},to:{transform:"",opacity:1}},modalOut:{to:{transform:"scale(0.95)",opacity:0}}},devices:{},class:{},svg:{},grid:{},shape:{}};var Oi={};F(Oi,{A:()=>zO,AssetPicture:()=>gT,Audio:()=>bT,Avatar:()=>fR,B:()=>NT,Block:()=>Q1,Box:()=>xp,Br:()=>UT,Bridge:()=>YT,Button:()=>qO,ButtonSet:()=>XO,COMPONENTS:()=>jo,Caption:()=>TT,Checkbox:()=>QT,CheckboxHgroup:()=>JT,Circle:()=>dT,CircleButton:()=>GO,Clickable:()=>lT,Data:()=>jT,Dialog:()=>QO,DialogFooter:()=>tR,DialogHeader:()=>JO,Dropdown:()=>dR,DropdownList:()=>pR,DropdownParent:()=>hR,DropdownParentFocus:()=>gR,DropdownSiblingFocus:()=>mR,FileIcon:()=>uO,Flex:()=>tT,Focusable:()=>fT,FocusableComponent:()=>uT,Footnote:()=>MT,Form:()=>iT,Grid:()=>nT,Gutter:()=>oT,H1:()=>ST,H2:()=>xT,H3:()=>kT,H4:()=>vT,H5:()=>ET,H6:()=>AT,Headline:()=>IT,Hgroup:()=>qT,HgroupButton:()=>GT,HgroupRows:()=>KT,Hoverable:()=>cT,Hr:()=>BT,I:()=>FT,Icon:()=>lO,IconButton:()=>ZO,IconText:()=>fO,Iframe:()=>aT,Img:()=>sT,Inline:()=>J1,InlineFlex:()=>eT,InlineGrid:()=>rT,Input:()=>XT,Italic:()=>LT,KangorooButton:()=>YO,Li:()=>VT,Link:()=>LS,Notification:()=>yR,NumberInput:()=>ZT,Ol:()=>HT,P:()=>CT,Picture:()=>hT,Radio:()=>tO,RadioHgroup:()=>eO,Range:()=>uR,RouteLink:()=>HO,RouterLink:()=>DS,SHAPES:()=>wp,Select:()=>WO,Shape:()=>Hw,Span:()=>wT,SquareButton:()=>KO,Strong:()=>OT,Subhead:()=>$T,Svg:()=>mT,Text:()=>_T,Textarea:()=>oO,TextareaWithButton:()=>sO,Theme:()=>pT,Title:()=>DT,Toggle:()=>nO,ToggleHgroup:()=>rO,Tooltip:()=>aR,TooltipHidden:()=>cR,TooltipLayer:()=>VS,TooltipParent:()=>lR,U:()=>RT,Ul:()=>zT,Underline:()=>PT,Video:()=>yT,depth:()=>Sp,focusableRingEnabled:()=>Nl,focusableRingToken:()=>Vw,focusableRingValue:()=>$o,getSystemGlobalTheme:()=>Fl});var Fw={};F(Fw,{Block:()=>Q1,Flex:()=>tT,Grid:()=>nT,Gutter:()=>oT,Inline:()=>J1,InlineFlex:()=>eT,InlineGrid:()=>rT});var Q1={display:"block"},J1={display:"inline"},tT={display:"flex"},eT={display:"inline-flex"},nT={display:"grid"},rT={display:"inline-grid"},oT={boxSize:"C1"};var jw={};F(jw,{Img:()=>sT});I();var sT={tag:"img",attr:{title:t=>t.title,alt:t=>t.alt!=null?t.alt:t.title||"",src:t=>{let e=fe(t);return e&&e.src||t.src},srcset:t=>{let e=fe(t);return(e?Cc(e):"")||t.srcset||t.srcSet}}};var Bw={};F(Bw,{Form:()=>iT});var iT={tag:"form"};var Uw={};F(Uw,{Iframe:()=>aT});var aT={tag:"iframe",position:"relative",minWidth:"G",minHeight:"G"};var zw={};F(zw,{Clickable:()=>lT,Focusable:()=>fT,FocusableComponent:()=>uT,Hoverable:()=>cT,focusableRingEnabled:()=>Nl,focusableRingToken:()=>Vw,focusableRingValue:()=>$o});var cB={appearance:"none",fontFamily:"inherit"},cT={transition:"opacity C defaultBezier, transform C defaultBezier",opacity:.85,":hover":{opacity:.9,transform:"scale(1.015)"},":active":{opacity:1,transform:"scale(1.015)"},".active":{opacity:1,transform:"scale(1.015)",":hover":{opacity:1}}},lT={extends:"Hoverable",":active":{opacity:1,transform:"scale(1.015)"},".active":{opacity:1}};function Nl(t){let e=t.context&&t.context.designSystem;return!e||e.focusableRing!==!1}function Vw(t){let e=t.context&&t.context.designSystem,n=e&&e.focusableRing;if(typeof n=="string")return n?{outline:n,outlineOffset:void 0}:null;if(!n||typeof n!="object"||Array.isArray(n))return null;let r=n.outline||void 0,o=n.outlineOffset!=null&&n.outlineOffset!==""?n.outlineOffset:void 0;return r||o!==void 0?{outline:r,outlineOffset:o}:null}function $o(t,e,n){let r=Vw(t);return r&&r[e]!==void 0?r[e]:n}var fT={border:"none",outline:t=>Nl(t)?"solid 0 currentColor":"none",":focus-visible":{opacity:1,outline:t=>Nl(t)?$o(t,"outline","solid X currentColor"):"none",outlineOffset:t=>Nl(t)?$o(t,"outlineOffset"):void 0}},uT={extends:"Focusable",tag:"button",fontSize:"A",type:"button",border:"none",textDecoration:"none",lineHeight:"1",whiteSpace:"nowrap",fontFamily:"inherit",cursor:"pointer",":disabled":{cursor:"not-allowed"},style:cB};var Kw={};F(Kw,{Picture:()=>hT});var qw={};F(qw,{Theme:()=>pT,getSystemGlobalTheme:()=>Fl});var Ww={};F(Ww,{Circle:()=>dT,SHAPES:()=>wp,Shape:()=>Hw,default:()=>lB,depth:()=>Sp});I();var We=O(),Sp={4:{boxShadow:`rgba(0,0,0,.10) 0 2${We.unit.default} 4${We.unit.default}`},6:{boxShadow:`rgba(0,0,0,.10) 0 3${We.unit.default} 6${We.unit.default}`},10:{boxShadow:`rgba(0,0,0,.10) 0 4${We.unit.default} 10${We.unit.default}`},16:{boxShadow:`rgba(0,0,0,.10) 0 8${We.unit.default} 16${We.unit.default}`},26:{boxShadow:`rgba(0,0,0,.10) 0 14${We.unit.default} 26${We.unit.default}`},42:{boxShadow:`rgba(0,0,0,.10) 0 20${We.unit.default} 42${We.unit.default}`}},Ei=t=>at(t.shapeDirectionColor)||at(t.borderColor)||at(t.backgroundColor)||at(t.background),_p=t=>{let e=bl.transition(t.transition,t);return e&&e.transition},wp={rectangle:{},circle:{borderRadius:"100%"},bubble:{},tv:{borderRadius:"1.15em/2.5em"},tooltip:t=>({position:t.position||"relative","&:before":{content:'""',display:"block",width:"0px",height:"0px",border:".35em solid",borderColor:Ei(t),transition:_p(t),transitionProperty:"border-color",position:"absolute",borderRadius:".15em"}}),tooltipDirection:{top:{"&:before":{top:"0",left:"50%",transform:"translate(-50%, -50%) rotate(45deg)"}},right:{"&:before":{top:"50%",right:"0",transform:"translate(50%, -50%) rotate(45deg)"}},bottom:{"&:before":{bottom:"0",left:"50%",transform:"translate(-50%, 50%) rotate(45deg)"}},left:{"&:before":{top:"50%",left:"0",transform:"translate(-50%, -50%) rotate(45deg)"}}},tag:t=>({position:"relative","&:before":{content:'""',display:"block",background:Ei(t),transition:_p(t),transitionProperty:"background",borderRadius:".25em",position:"absolute",zIndex:"-1",aspectRatio:"1/1",top:"50%",transformOrigin:"50% 50%",height:"73%"}}),tagDirection:{top:{"&:before":{bottom:"100%",left:"50%",transform:"translate(-50%, 50%) rotate(45deg)"}},right:{"&:before":{top:"50%",left:"100%",transform:"translate(-50%, -50%) rotate(45deg)"}},bottom:{"&:before":{top:"100%",left:"50%",transform:"translate(-50%, -50%) rotate(45deg)"}},left:{"&:before":{top:"50%",right:"100%",transform:"translate(50%, -50%) rotate(45deg)"}}},hexagon:t=>({position:"relative","&:before, &:after":{content:'""',display:"block",position:"absolute",zIndex:"-1",borderRadius:".25em",aspectRatio:"1/1",top:"50%",transformOrigin:"50% 50%",height:"73%",background:Ei(t),transition:_p(t),transitionProperty:"background"},"&:before":{left:"0",transform:"translate3d(-50%, -50%, 1px) rotate(45deg)"},"&:after":{left:"100%",transform:"translate3d(-50%, -50%, 1px) rotate(45deg)"}}),chevron:t=>({position:"relative","&:before, &:after":{content:'""',display:"block",position:"absolute",zIndex:"-1",aspectRatio:"1/1",top:"50%",transformOrigin:"50% 50%",transition:_p(t),transitionProperty:"background"},"&:before":{background:`linear-gradient(225deg, ${Ei(t)} 25%, transparent 25%), linear-gradient(315deg, ${Ei(t)} 25%, transparent 25%)`},"&:after":{background:Ei(t),borderRadius:".25em"}}),chevronDirection:{left:{"&:before":{height:"100%",left:"100%",transform:"translate3d(-1%, -50%, 1px) scale(-1, 1)"},"&:after":{height:"73%",left:"0",transform:"translate3d(-50%, -50%, 1px) rotate(45deg)"}},right:{"&:before":{height:"100%",left:"0",transform:"translate3d(-99%, -50%, 1px)"},"&:after":{height:"73%",left:"100%",transform:"translate3d(-50%, -50%, 1px) rotate(45deg)"}}}},Hw={deps:{exec:pt,getSpacingBasedOnRatio:Ue,getMediaColor:zt},classlist:{shape:t=>t.deps.exec(wp[t.shape],t),shapeDirection:t=>{if(!t.shape||!t.shapeDirection)return;let e=wp[t.shape+"Direction"];return t.shape&&e?e[t.shapeDirection||"left"]:null},shapeDirectionColor:t=>{let e={borderColor:t.deps.getMediaColor(t.background||t.backgroundColor)};return t.shapeDirection?e:null}}},dT={round:"100%"},lB=Hw;I();var Fl=({context:t,state:e})=>{let n=e&&e.root,r=n&&n.globalTheme||t.designSystem&&t.designSystem.globalTheme;return r==="auto"?null:r},pT={deps:{depth:Sp},classlist:{depth:t=>!Bt(t.depth)&&t.deps.depth[t.depth]}};var hT={deps:{getSystemGlobalTheme:Fl},tag:"picture",childExtends:{deps:{getSystemGlobalTheme:Fl},tag:"source",attr:{media:t=>{let{key:e,context:n,deps:r}=t,{media:o}=n.designSystem,s=r.getSystemGlobalTheme(t),i=(t.media||e).slice(1);return i===s?"(min-width: 0px)":i==="dark"||i==="light"?"(max-width: 0px)":o[i]}}},Img:{width:"inherit",ignoreChildExtends:!0,height:"inherit",src:(t,e)=>t.parent?.src||e.src}};var Gw={};F(Gw,{AssetPicture:()=>gT});I();var gT={tag:"picture",children:t=>{let e=fe(t);if(e)return Tc(e,t.alt)}};var Yw={};F(Yw,{Svg:()=>mT});var mT={tag:"svg",attr:{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"},html:t=>{let{context:e}=t;if(t.semanticIcons)return;if(t.html&&typeof t.html!="function")return t.call("exec",t.html,t);let{designSystem:n,utils:r}=e,o=n&&n.svg,s=t.spriteId||n&&n.useSvgSprite,i=t.call("exec",t.src,t),a=d=>`<use xlink:href="#${d}" />`;if(typeof i=="string"){let d=i.match(/^\s*<symbol\b[^>]*\bid="([^"]+)"/);if(d){let p=d[1],g=e.document||(typeof document<"u"?document:null);if(!(g&&typeof g.getElementById=="function"&&g.getElementById(p))){let m=r&&r.scratchSystem&&r.scratchSystem.appendSVGSprite;n&&!n.__svgCache&&(n.__svgCache={}),typeof m=="function"?m({[p]:i},{document:g}):r&&typeof r.init=="function"&&r.init({svg:{[p]:i}},{document:g,emotion:e.emotion})}return a(p)}}if(!s&&i)return i;let c=t.spriteId;if(c)return a(c);if(o&&o[i])return a(i);let l=Symbol.for(i),f=o[l];if(f&&o[f])return a(f);if(!i)return a("");if(typeof i=="string"&&!i.includes("<"))return typeof console<"u"&&console.warn&&console.warn(`[Svg] Unknown sprite symbol "${i}" \u2014 not registered in design-system sprite. Set the icon name to one that exists in designSystem.icons / context.svg, or register the SVG body via utils.init({ svg: { '${i}': '<svg>...</svg>' } }).`),a("");let u=0;for(let d=0;d<i.length;d++)u=(u<<5)-u+i.charCodeAt(d)|0;return f=o[l]=`svg-${(u>>>0).toString(36)}`,r.init({svg:{[f]:i}},{document:e.document,emotion:e.emotion}),a(f)}};var Xw={};F(Xw,{Video:()=>yT});I();var yT={tag:"video",controls:!0,attr:{src:t=>{let e=fe(t);return e&&e.src||t.src}},children:t=>{let e=fe(t);if(!(!e||!Array.isArray(e.variants)||!e.variants.length))return e.variants.map(n=>({tag:"source",attr:{src:n.src,type:n.format}}))},childExtends:{tag:"source"}};var Zw={};F(Zw,{Audio:()=>bT});I();var bT={tag:"audio",controls:!0,attr:{src:t=>{let e=fe(t);return e&&e.src||t.src}},children:t=>{let e=fe(t);if(!(!e||!Array.isArray(e.variants)||!e.variants.length))return e.variants.map(n=>({tag:"source",attr:{src:n.src,type:n.format}}))},childExtends:{tag:"source"}};var Qw={};F(Qw,{B:()=>NT,Caption:()=>TT,Data:()=>jT,Footnote:()=>MT,H1:()=>ST,H2:()=>xT,H3:()=>kT,H4:()=>vT,H5:()=>ET,H6:()=>AT,Headline:()=>IT,I:()=>FT,Italic:()=>LT,P:()=>CT,Span:()=>wT,Strong:()=>OT,Subhead:()=>$T,Text:()=>_T,Title:()=>DT,U:()=>RT,Underline:()=>PT});var _T={},wT={tag:"span"},ST={tag:"h1"},xT={tag:"h2"},kT={tag:"h3"},vT={tag:"h4"},ET={tag:"h5"},AT={tag:"h6"},CT={tag:"p"},TT={tag:"caption"},OT={tag:"strong",fontWeight:"700"},RT={tag:"u"},PT={tag:"u"},LT={tag:"i"},DT={},IT={tag:"h6",fontSize:"B",fontWeight:500},$T={tag:"span",fontSize:"Z1"},MT={tag:"span",fontSize:"Z"},NT={tag:"b"},FT={tag:"i"},jT={tag:"data"};var Jw={};F(Jw,{Box:()=>xp,Br:()=>UT,Hr:()=>BT,Li:()=>VT,Ol:()=>HT,Ul:()=>zT});var fB=t=>{if(!t.context)return;let{props:e,__ref:n}=t,r=ye(e,t,{unpack:!1});n.__class=r},xp={extends:["Shape","Theme"],boxSizing:"border-box",onBeforeClassAssign:fB},BT={tag:"hr",margin:"C1 0"},UT={tag:"br"},VT={tag:"li"},zT={tag:"ul",childExtends:{extends:"Li"}},HT={tag:"ol",childExtends:{extends:"Li"}};var tS={};F(tS,{Hgroup:()=>qT,HgroupButton:()=>GT,HgroupRows:()=>KT});var WT=t=>{if(t.text!=null||t.html!=null)return!0;for(let e in t){let n=e.charCodeAt(0);if(n>=65&&n<=90)return!0}return!1},qT={display:"flex",tag:"hgroup",flow:"y",gap:"Y2",H:{if:WT,color:"title",tag:"h3",lineHeight:"1em",margin:"0"},P:{if:WT,margin:"0",color:"paragraph"}},KT={extends:"Hgroup",H:{display:"flex",color:"title",align:"center space-between"},P:{color:"paragraph",align:"center space-between"}},GT={extends:"HgroupRows",H:{justifyContent:"space-between",Span:{},Button:{background:"transparent",color:"currentColor",padding:"0",Icon:{name:"x",fontSize:"C"}}},P:{}};var eS={};F(eS,{Bridge:()=>YT});var YT={tag:"div"};var nS={};F(nS,{Input:()=>XT});var XT={extends:["Focusable"],tag:"input",border:"none",theme:"field",fontSize:"A",round:"C",lineHeight:"1",padding:"Z2 B",attr:{pattern:t=>t.pattern,name:t=>t.name,placeholder:t=>t.placeholder,value:t=>{if(!t.value)return;let e=t.call("exec",t.value,t);return t.call("isString",e)&&e.includes("{{")?t.call("replaceLiteralsWithObjectFields",e):e},checked:t=>t.call("exec",t.checked,t),disabled:t=>t.disabled||null,required:t=>t.required,type:t=>t.type}};var rS={};F(rS,{NumberInput:()=>ZT});var ZT={extends:["Flex","Input"],type:"number",boxSize:"C+X",align:"center center",textAlign:"center",round:"Y1",theme:"transparent",border:"1px solid line",placeholder:"0",fontWeight:"400","::-webkit-inner-spin-button":{appearance:"none"},attr:{step:t=>t.step,min:t=>t.min,max:t=>t.max}};var oS={};F(oS,{Checkbox:()=>QT,CheckboxHgroup:()=>JT});var QT={extends:"Focusable",tag:"label",boxSize:"fit-content fit-content",cursor:"pointer",round:"Y",Input:{type:"checkbox",position:"absolute",opacity:"0",width:"1px",height:"1px",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",":checked + div":{theme:"primary"},":checked + div > svg":{transform:"none",opacity:"1"},":focus-visible + div":{outline:t=>$o(t,"outline","solid X currentColor"),outlineOffset:t=>$o(t,"outlineOffset","Z")},attr:{checked:t=>t.call("exec",t.parent.checked)}},Flex:{align:"center center",fontSize:"B1",padding:"V",theme:"field",round:"X2",transition:"background A defaultBezier",Icon:{icon:"check",opacity:"0",transform:"scale(0.9) rotate(-15deg)",transition:"opacity B defaultBezier"}}},JT={display:"flex",tag:"label",boxSize:"fit-content",align:"flex-start flex-start",gap:"A",Checkbox:{tag:"div"},HgroupRows:{gap:"Z1",margin:"Y - - -"}};var sS={};F(sS,{Radio:()=>tO,RadioHgroup:()=>eO});var tO={extends:"Checkbox",Input:{type:"radio",":checked + div:after":{opacity:"1"}},Flex:{round:"100%",padding:"Y",":after":{content:'""',display:"block",boxSize:"X+W1",round:"100%",background:"white",opacity:"0",transition:"opacity .15s ease-in-out"},Icon:null}},eO={extends:"CheckboxHgroup",Checkbox:null,Radio:{}};var iS={};F(iS,{Toggle:()=>nO,ToggleHgroup:()=>rO});var nO={extends:"Checkbox",Input:{role:"switch",":checked + div":{background:"green2+8",justifyContent:"flex-end"}},Flex:{boxSize:"A1 B1",padding:"- W_default",round:"D",align:"center flex-start",theme:"field",border:"none",transition:"opacity .15s ease",":after":{content:'""',boxSize:"A A",round:"100%",background:"white",boxShadow:"gray.2 1px 1px Z"},Icon:null}},rO={extends:"CheckboxHgroup",Checkbox:null,Toggle:{}};var aS={};F(aS,{Textarea:()=>oO,TextareaWithButton:()=>sO});var oO={tag:"textarea",extends:["Input","Flex"],fontfamily:"Avenir",placeholder:"Leave us a message...",padding:"A",theme:"field",border:"none",minHeight:"E_default",width:"100%",height:"E1_default",fontFamily:"inherit",round:"Z2",lineHeight:1.4,".outlined":{borderWidth:"1px",borderStyle:"solid"}},sO={display:"flex",gap:"Y2",Textarea:{height:"C2+W",minWidth:"H",padding:"A",fontSize:"Z1",round:"Z2",minHeight:"fit-content"},SquareButton:{background:"blue",Icon:{name:"send"}}};var cS={};F(cS,{FileIcon:()=>uO,Icon:()=>lO,IconText:()=>fO});Kt();var iO=new Set,aO=(t,e)=>{if(!iO.has(t)&&(iO.add(t),typeof console<"u"&&console.warn)){let n=e&&e.__ref&&e.__ref.path,r=n&&n.length?` at <${n.join(".")}>`:"";console.warn(`[Icon] Unknown icon name "${t}"${r} \u2014 not registered in designSystem.icons, rendering the noIcon placeholder. Fix the name or register the icon in the design system.`)}},cO=new WeakMap,uB=t=>{let e=cO.get(t);return e||(e={pending:new Map,waiting:new Map,failed:new Set},cO.set(t,e)),e},dB=(t,e)=>{if(!t)return null;let n=t.default||t;return typeof n=="string"?n.trim()?{[e]:n}:null:typeof n=="object"&&!Array.isArray(n)&&Object.keys(n).length?n:null},pB=(t,e,n)=>{let r=n&&n.context&&n.context.document||(typeof document<"u"?document:null);J(t);try{let o=O();o&&!o.__svgCache&&(o.__svgCache={}),t.__svgCache||(t.__svgCache={});let s={};for(let i in e){let a=xo(e[i],i);a&&(t.icons[i]=a,s[i]=a)}return t.useIconSprite&&r&&Object.keys(s).length&&ko(s,{document:r}),Object.keys(s).length>0}finally{X()}},hB=(t,e,n,r,o)=>{let s=t&&t.designSystem,i=s&&s.iconsLoader;if(typeof i!="function"||!s.icons)return!1;let a=uB(s);if(a.failed.has(e))return!1;let c=a.waiting.get(e);if(c||(c=new Set,a.waiting.set(e,c)),c.add(o),a.pending.has(e))return!0;let l=Promise.resolve().then(()=>i(e,t)).then(f=>{let u=dB(f,n);return u?pB(s,u,r):!1}).catch(f=>(typeof console<"u"&&console.error&&console.error(`[Icon] iconsLoader failed for "${e}":`,f),!1)).then(f=>{a.pending.delete(e);let u=a.waiting.get(e);a.waiting.delete(e),f||a.failed.add(e),u&&u.forEach(d=>{try{d(f)}catch(p){console.error("[Icon] repaint error:",p)}})});return a.pending.set(e,l),!0},lO={extends:"Svg",width:"A",height:"A",display:"inline-block",style:{fill:"currentColor","*":{fill:"currentColor"}},onInit:(t,e,n)=>{let{parent:r}=t,{icons:o,useIconSprite:s,verbose:i}=n&&n.designSystem,{toCamelCase:a}=n&&n.utils,c=g=>{let h=g[".isActive"];if(h)return g.call("exec",h.name||h.icon)},l=(g,h,m)=>{let{semanticIcons:y}=m&&m.designSystem,{toCamelCase:w}=m&&m.utils,b=f(g,h),k=w(b).split(/([a-z])([A-Z])/g),S=k[1]?k[0]:b.split(".")[0].split(" ")[0],_=y&&y[S];if(_){let E=b.includes(".")?"sfsymbols."+b.split(".").slice(1).join("."):"sfsymbols";return b=_[E]||_[b.split(".")[0].split(" ")[0]],{tag:"span",semanticIcons:!0,width:"A",height:"A",lineHeight:"1em",":after":{fontSize:"Z",fontWeight:"300",content:`"${b}"`,textAlign:"center",display:"inline-block",style:{color:"currentColor",fontFamily:"'SF Pro Icons', 'SF Pro', 'SF Symbols', 'Segoe UI'"}}}}},f=(g,h)=>{let{key:m}=g,y=g.call("exec",g.name||g.icon||m,g);return g.call("isString",y)&&y.includes("{{")&&(y=g.call("replaceLiteralsWithObjectFields",y)),g.call("isString",y)?y:m},u=t.src,d,p=()=>{let g=f(t,e),h=g;if(g.includes(" ")){let $=g.split(" ");g=$[0]+$.slice(1).map(M=>M.charAt(0).toUpperCase()+M.slice(1)).join("")}let m=a(g),y=m.split(/([a-z])([A-Z])/g),w=l(t,e,n);if(w){Object.assign(t,w);return}let b;t.isActive&&(b=c(t));let x=r[".isActive"];r&&r.isActive&&x&&x.icon&&(b=t.call("exec",x.icon||x.Icon.name||x.Icon.icon,t)),t.call("isString",b)&&b.includes("{{")&&(b=t.call("replaceLiteralsWithObjectFields",b));let k;o[b]&&(k=b),o[m]?k=m:o[y[0]+y[1]]?k=y[0]+y[1]:o[y[0]]?k=y[0]:i&&t.warn("Can't find icon:",g,k);let S=o[k],_=r&&r.src||u;!S&&!_&&(hB(n,h,m,t,M=>{if(!(d&&d._disposed)){if(!M)return aO(h,t);p()}})||aO(h,t));let E=s&&k,C=S||_||o.noIcon;if(!(t.spriteId===E&&t.src===C&&t.node&&t.node.innerHTML)&&(t.spriteId=E,t.src=C,typeof t.html=="function"&&t.node)){let $=t.context&&t.context.designSystem;$&&J($);try{let M=t.html(t,t.state,t.context);M!=null&&typeof M!="function"&&(t.node.innerHTML=M)}finally{$&&X()}}};d=K(p,{depth:t.__ref&&t.__ref.path&&t.__ref.path.length||0}),t.__ref&&(t.__ref.__effects||(t.__ref.__effects=[]),t.__ref.__effects.push(d))},attr:{viewBox:"0 0 24 24","aria-hidden":t=>t.ariaLabel||t.role==="img"?null:"true",focusable:"false"}},fO={display:"flex",align:"center center",lineHeight:1,".reversed":{flow:"row-reverse"},".vertical":{flow:"column"},Icon:{if:t=>{let{parent:e}=t,n=t.call("exec",t.icon,t);return t.call("exec",n||e.icon||t.name||t.sfSymbols||e.sfSymbols,t)},icon:t=>t.call("exec",t.parent.icon,t.parent)},text:t=>t.text},uO={display:"flex",theme:"tertiary",boxSize:"C1",align:"center center",round:"Z2",Icon:{fontSize:"B",margin:"auto",icon:"file"}};var IS={};F(IS,{A:()=>zO,Link:()=>LS,RouteLink:()=>HO,RouterLink:()=>DS});var Ti={};F(Ti,{default:()=>NB,getActiveRoute:()=>PS,lastLevel:()=>Ep,lastPathname:()=>No,loadLazy:()=>ES,matchRoute:()=>TS,parseQuery:()=>OS,parseRoutePattern:()=>CS,resolveRouterElement:()=>zl,router:()=>Pe,runGuards:()=>RS,saveScrollPosition:()=>Ul});I();var lS="__smblsRouter",fS=new WeakMap,gB=0,uS=()=>Date.now().toString(36)+(++gB).toString(36)+Math.random().toString(36).slice(2,6),dS=t=>{try{let e=t&&t.history;if(e&&typeof e.pushState=="function"&&typeof e.replaceState=="function"&&typeof e.go=="function")return e}catch{}return null},Kn=t=>{try{return t.state}catch{return}},Bl=t=>{try{let{pathname:e,search:n,hash:r}=t.location;return e+n+r}catch{return null}},gO=t=>{if(!t||typeof t!="object"||Array.isArray(t))return!1;let e=Object.getPrototypeOf(t);return e===null||Object.getPrototypeOf(e)===null},pS=t=>{let e=gO(t)?t[lS]:null;return e&&typeof e.key=="string"&&typeof e.chain=="string"&&Number.isInteger(e.index)?e:null},hS=(t,e)=>t==null?{[lS]:e}:gO(t)?{...t,[lS]:e}:null,gS=()=>({key:uS(),index:0,chain:uS()}),Ai=(t,e)=>{let n=pS(e);return{key:n?n.key:null,index:n?n.index:null,chain:n?n.chain:null,url:Bl(t),state:e}},jl=(t,e,n)=>{if(!n||Bl(t)!==n.url)return!1;let r=pS(e);return n.key?!!r&&r.key===n.key:!r&&e===n.state},mS=(t,e)=>{let n=Kn(e),r=Ai(t,n);if(r.key)return r;let o=gS(),s=hS(n,o);if(!s)return r;try{e.replaceState(s,null)}catch{return r}return{...o,url:r.url,state:s}},mB=(t,e)=>{let n=fS.get(t);return!n&&e&&(n={current:null,pending:null,expect:null,seq:0,pops:new WeakMap,positions:null,scrollNode:null,restore:null},fS.set(t,n)),n||null},mO="smbls.router.scroll",dO=100,yB=1e3,pO=["wheel","touchstart","keydown","pointerdown"],yO=t=>{try{return t.sessionStorage||null}catch{return null}},bO=t=>{try{let e=JSON.parse(t.getItem(mO)||"[]");return Array.isArray(e)?e.filter(n=>Array.isArray(n)&&typeof n[0]=="string"):[]}catch{return[]}},_O=(t,e)=>{if(!t.positions){t.positions=new Map;let n=yO(e);if(n)for(let[r,o]of bO(n))o&&Number.isFinite(o.top)&&Number.isFinite(o.left)&&t.positions.set(r,{top:o.top,left:o.left})}return t.positions},yS=(t,e,n,r)=>{let o=_O(t,e);o.delete(n),o.set(n,{top:Math.round(Number(r.scrollTop)||0),left:Math.round(Number(r.scrollLeft)||0)}),o.size>dO&&o.delete(o.keys().next().value);let s=yO(e);if(s)try{let i=new Map(bO(s));for(let[a,c]of o)i.delete(a),i.set(a,c);s.setItem(mO,JSON.stringify(Array.from(i).slice(-dO)))}catch{}},hO=(t,e,n)=>{(!e||e.visibilityState!=="hidden")&&typeof t.requestAnimationFrame=="function"?t.requestAnimationFrame(n):typeof t.setTimeout=="function"?t.setTimeout(n,16):setTimeout(n,16)},bB=(t,e,n,r,o,s,i)=>{n.restore&&n.restore.end("replaced"),n.restore=r;let a=typeof i=="number"&&i>=0?i:yB,c=()=>Math.max(0,(Number(o.scrollHeight)||0)-(Number(o.clientHeight)||0)),l=(h,m)=>{typeof o.scrollTo=="function"?o.scrollTo({top:h,left:m,behavior:"instant"}):(o.scrollTop=h,o.scrollLeft=m)},f=typeof t.addEventListener=="function",u=()=>r.end("visitor");if(r.end=h=>{if(!r.outcome&&(r.outcome=h,f))for(let m of pO)t.removeEventListener(m,u,!0)},c()>=s.top-1)return l(s.top,s.left),r.end("placed");Number(o.scrollTop)>0&&l(0,0);let d=Number(o.scrollTop)||0,p=Date.now();if(f)for(let h of pO)t.addEventListener(h,u,{capture:!0,passive:!0});let g=()=>{if(r.outcome)return;if(n.seq!==r.seq)return r.end("overtaken");if(Math.abs((Number(o.scrollTop)||0)-d)>1)return r.end("visitor");let h=c()>=s.top-1;if(!h&&Date.now()-p<a)return hO(t,e,g);l(Math.min(s.top,c()),s.left),r.end(h?"placed":"clamped")};hO(t,e,g)},_B=(t,e)=>{let{win:n,history:r,track:o}=t,s=o.pops.get(e);if(s)return s;let i=Ai(n,Kn(r)),a=o.expect;o.expect=null;let c;if(a&&i.key===a.key&&i.url===a.url)c={echo:!0};else{let l=o.current,f=!!(i.key&&l&&l.key===i.key),u=f?null:l;u&&u.key&&t.scrollNode&&yS(o,n,u.key,t.scrollNode),c={to:i,from:u,stay:f,seq:o.seq,settled:!1,committed:!1},o.pending=c}return o.pops.set(e,c),c},wB=t=>{let{win:e,history:n,track:r}=t,o=Kn(n);if(r.pending&&jl(e,o,r.pending.to)||r.expect&&jl(e,o,r.expect.away))return;let s=r.current,i=pS(o);if(s&&(s.key?i&&i.key===s.key:jl(e,o,s))){s.url=Bl(e),s.state=o;return}r.current=t.restore?mS(e,n):Ai(e,o),r.pending=null,r.seq++},wO=(t,e,n)=>{let r=e.scrollRestoration==="restore",o=dS(t),s=r||Array.isArray(e.guards)&&e.guards.length>0,i=o&&mB(o,s);if(!i)return null;let a={win:t,history:o,track:i,restore:r,scrollNode:r&&n?n:null,pop:null};a.scrollNode&&(i.scrollNode=a.scrollNode);let c=e.event;return c&&c.type==="popstate"?a.pop=_B(a,c):wB(a),a},bS=t=>{let e=t&&t.pop;if(!e||e.echo)return!0;if(e.settled)return e.committed;let{win:n,history:r,track:o}=t;return e.settled=!0,o.pending===e&&(o.pending=null),o.seq!==e.seq||!jl(n,Kn(r),e.to)?!1:(o.current=t.restore&&!e.to.key?mS(n,r):e.to,o.seq++,e.committed=!0,!0)},SB=(t,e,n)=>{try{t.addEventListener("popstate",()=>{e.expect===n&&(e.expect=null)},{once:!0})}catch{}},_S=(t,e)=>{let n=t&&t.pop;if(!n||n.echo||n.settled)return;let{win:r,history:o,track:s}=t;n.settled=!0,s.pending===n&&(s.pending=null);let i=n.from;if(!i||s.seq!==n.seq||!jl(r,Kn(o),n.to))return;let a=n.to;if(!e&&i.key&&a.key&&i.chain===a.chain&&i.index!==a.index){let f=s.expect={key:i.key,url:i.url,away:a};SB(r,s,f);try{o.go(i.index-a.index)}catch{s.expect=null}return}let c=gS(),l=hS(i.state,c);try{o.replaceState(l||i.state,null,i.url)}catch{return}s.current=l?{...c,url:i.url,state:l}:Ai(r,Kn(o)),s.seq++},SO=(t,e)=>{let n=Bl(e);t&&n!==null&&(t.__routerAddress=n)},xO=(t,e,n)=>{let r=t&&t.pop;if(r&&!r.echo&&r.from)return _S(t,!0);r&&!r.settled&&(r.settled=!0,t.track.pending===r&&(t.track.pending=null));let o=dS(n),s=e&&e.__routerAddress;if(!(!o||!s||s===Bl(n)))try{o.replaceState(Kn(o),null,s)}catch{}},kO=(t,e,n,r)=>{let{win:o,history:s,track:i}=t,a=i.current;!r&&a&&a.key&&t.scrollNode&&yS(i,o,a.key,t.scrollNode);let c=r?Ai(o,Kn(s)):mS(o,s),l=c.key?r?{key:c.key,index:c.index,chain:c.chain}:{key:uS(),index:c.index+1,chain:c.chain}:gS(),f=hS(e,l);try{r?s.replaceState(f||e,null,n):s.pushState(f||e,null,n)}catch{return}i.current=f?{...l,url:n,state:f}:Ai(o,Kn(s)),i.pending=null,i.expect=null,i.seq++},vO=(t,e,n,r)=>{if(!t||!t.restore||!e)return!1;let o=t.pop;if(o?o.stay||!o.committed:!n.initialRender)return!1;let{win:s,track:i}=t,a=i.current,c=a&&a.key&&_O(i,s).get(a.key);if(!c)return!1;let l=i.restore;return!!l&&l.key===a.key&&(o?l.pop===o:!l.pop&&l.seq===i.seq)&&l.outcome==="visitor"||bB(s,r,i,{key:a.key,pop:o,seq:i.seq,outcome:null},e,c,n.scrollRestoreTimeout),!0},Ul=t=>{let e=dS(t),n=e&&fS.get(e);!n||!n.scrollNode||!n.current||!n.current.key||yS(n,t,n.current.key,n.scrollNode)};I();var TO=["components","functions","methods","snippets"],OO=new Set(["pages",...TO]),wS=new Set(["default","__esModule"]),Mo=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),qt=t=>!!t&&typeof t=="object"&&!Array.isArray(t),kp=new WeakMap,EO=new WeakMap,xS=new WeakMap,AO=new Set,Ci=(t,e=console.warn)=>{AO.has(t)||(AO.add(t),e(t))},RO=t=>qt(t&&t.lazy),Vl=(t,e)=>{let n=t&&t.lazy;return qt(n)&&Mo(n,e)?n[e]:void 0},kS=(t,e)=>{let n=kp.get(t);n||(kp.set(t,n=new Map),t.__teardowns=t.__teardowns||[],t.__teardowns.push(()=>{for(let o of n.values())o.disposed=!0,o.waiting.clear();kp.delete(t)}));let r=n.get(e);return r||(r={status:"idle",promise:null,disposed:!1,pages:null,waiting:new Set,maps:new Set},n.set(e,r)),r},PO=(t,e)=>!RO(e)||!qt(t)||!Mo(t,"lazy")?null:typeof t.lazy=="string"&&t.lazy?t.lazy:null,vS=t=>!!t&&typeof t=="object"&&xS.has(t),xB=(t,e)=>{if(typeof Vl(t,e)!="function")return"error";let n=kp.get(t)?.get(e);return n&&n.status==="error"?"error":"loading"},kB=(t,e)=>{let n=EO.get(t);if(n&&n.group===e)return n;let{lazy:r,state:o,...s}=t,i=o==null||qt(o)||typeof o=="function";i?s.state=(c,l)=>{let f=typeof o=="function"?o(c,l):o;return{...qt(f)?f:null,lazyStatus:xB(c.context,e)}}:(s.state=o,Q()&&Ci(`[smbls/router] the placeholder of lazy group "${e}" binds its state to a path (${JSON.stringify(o)}), so it gets no \`lazyStatus\` \u2014 give it its own state object to show a load failure.`));let a={definition:s,group:e,hasStatus:i};return EO.set(t,a),xS.set(s,a),a},vB=t=>t.__ref&&t.__ref.contentElementKey||"content",vp=(t,e)=>{let n=t&&t.__ref&&t.__ref.__routerRendered,r=n&&vS(n.content)?xS.get(n.content):null;return!r||r.group!==e?null:{record:r,page:t[vB(t)]}},SS=(t,e,n)=>{let r=vp(t,e);if(!r||!r.record.hasStatus)return;let o=r.page&&r.page.state;if(!(!o||typeof o.update!="function"||o.lazyStatus===n))try{o.update({lazyStatus:n})}catch(s){console.error(`[smbls/router] lazy group "${e}": could not show the "${n}" status on its placeholder`,s)}},EB=t=>qt(t)?!Object.keys(t).some(n=>OO.has(n))&&qt(t.default)?t.default:t:{},AB=t=>{let e={};if(!qt(t))return e;for(let n of Object.keys(t)){if(wS.has(n))continue;let r=n.charCodeAt(0)===47,o=r?n:"/"+(n==="index"?"":n);(r||!Mo(e,o))&&(e[o]=t[n])}return e},LO=(t,e,n,r,o)=>{if(!qt(t))return 0;let s=0;for(let i of Object.keys(t))PO(t[i],r)===e&&(s++,Mo(n,i)?t[i]=n[i]:delete t[i]);for(let i of Object.keys(n))Mo(t,i)?t[i]!==n[i]&&o.push(`pages['${i}']`):t[i]=n[i];return s},CO=(t,e,n)=>{let r=t[e];if(!qt(r)){t[e]={...n};return}try{for(let o in n)r[o]=n[o];if(Object.keys(n).every(o=>r[o]===n[o]))return}catch{}t[e]={...r,...n}},CB=t=>{let e=t.__ref&&t.__ref.origin;if(!qt(e))return[];let n=[].concat(e.extends||[],e.extend||[]);if(n.length)return n.filter(s=>typeof s=="string").map(s=>(s.includes(">")?s.split(">")[0]:s).trim());let r=t.key;if(typeof r!="string"||!/^[A-Z]/.test(r))return[];let o=[r.indexOf("_"),r.indexOf(".")].filter(s=>s>0);return[o.length?r.slice(0,Math.min(...o)):r]},TB=(t,e,n,r)=>{let o=new Set;for(let i of r.waiting){let a=vp(i,e);a&&a.page&&o.add(a.page)}let s=i=>{let a=i&&i.__ref&&i.__ref.__children;if(Array.isArray(a))for(let c of a){let l=i[c];if(!(!l||!l.__ref||o.has(l)||!l.node)){for(let f of CB(l)){if(!n.has(f))continue;let u=(l.__ref.path||[l.key]).join(" \u203A ");Ci(`[smbls/router] lazy group "${e}": ${u} was built before the group loaded, so it renders without "${f}". A built element never takes a later registration \u2014 build it after el.call('loadLazy', '${e}') resolves (an \`if:\` gate does that), or keep "${f}" out of the group.`)}s(l)}}};s(t)},OB=(t,e,n,r)=>{let o=t.context,s=EB(n),i=Q(),a=[],c=new Set;if(i)for(let p of Object.keys(s))OO.has(p)||wS.has(p)||Ci(`[smbls/router] lazy group "${e}" exports \`${p}\`, which a lazy group cannot add \u2014 it adds pages, components, functions, methods and snippets only. Declare the rest with the app.`);let l=!1;for(let p of TO){let g=s[p];if(!qt(g))continue;let h=qt(o[p])?o[p]:{},m={};for(let w of Object.keys(g))if(!wS.has(w)){if(Mo(h,w)){h[w]!==g[w]&&a.push(`${p}.${w}`);continue}m[w]=g[w]}let y=Object.keys(m);if(y.length&&(CO(o,p,m),p==="components"&&y.forEach(w=>c.add(w)),p==="methods"&&(l=!0),(p==="functions"||p==="snippets")&&qt(o.utils))){let w={};for(let b of y)Mo(o.utils,b)||(w[b]=m[b]);Object.keys(w).length&&CO(o,"utils",w)}}l&&mi(o);let f=AB(s.pages);r.pages=f;let u=null;try{u=typeof t.getRoot=="function"?t.getRoot():null}catch{}let d=new Set;qt(o.pages)&&d.add(o.pages),u&&qt(u.routes)&&d.add(u.routes);for(let p of r.maps)d.add(p);for(let p of r.waiting)qt(p.routes)&&d.add(p.routes);for(let p of d)LO(p,e,f,o,a);i&&a.length&&Ci(`[smbls/router] lazy group "${e}" redefines ${a.join(", ")}, which the app already has \u2014 the app's own value stays. Rename them: frank refuses the same collision at \`smbls push\`.`),i&&c.size&&u&&TB(u,e,c,r)},DO=(t,e)=>{let n=t&&t.__ref,r=n&&n.__lazyRoute;!r||r.group!==e||(n.__lazyRoute=null,typeof t.set=="function"&&vp(t,e)&&Promise.resolve().then(()=>r.rerender({pushState:!1,replace:!1,scrollToTop:!1,guards:[],lazy:{group:e,status:"loaded"}})).catch(o=>console.error(`[smbls/router] lazy group "${e}" loaded, but its route failed to render`,o)))},IO=(t,e)=>{let n=t.context,r=kS(n,e);if(r.status==="loading"||r.status==="loaded")return r.promise;let o=Vl(n,e);r.status="loading";let s=Promise.resolve().then(()=>o()).then(i=>{r.disposed||OB(t,e,i,r)}).then(()=>{r.status="loaded";let i=[...r.waiting];r.waiting.clear();for(let a of i)DO(a,e)},i=>{if(r.status="error",r.promise=null,r.disposed)throw i;console.error(`[smbls/router] lazy group "${e}" failed to load \u2014 its routes show their placeholder; the next navigation or loadLazy retries.`,i);for(let a of[...r.waiting])vp(a,e)?SS(a,e,"error"):r.waiting.delete(a);throw i});s.catch(()=>{}),r.promise=s;for(let i of r.waiting)SS(i,e,"loading");return s},$O=(t,e,n)=>{let r=e&&e.context,o=PO(t,r);if(!o)return null;let s=kS(r,o);if(qt(n)&&s.maps.add(n),s.status==="loaded"&&LO(n,o,s.pages||{},r,[])>0)return{rematch:!0};let i=typeof Vl(r,o)=="function";return i?IO(e,o):Ci(`[smbls/router] a route names lazy group "${o}", which context.lazy does not declare as a loader (\`lazy: { ${o}: () => import('./\u2026') }\`) \u2014 it shows its placeholder in the error state.`,console.error),{content:kB(t,o).definition,group:o,status:i?"loading":"error"}},MO=(t,e,n)=>{if(!e||!e.group||e.status==="error")return;let r=t.context,o=t.__ref;if(!o||typeof Vl(r,e.group)!="function")return;let s=kS(r,e.group);if(o.__lazyRoute={group:e.group,rerender:n},SS(t,e.group,s.status==="error"?"error":"loading"),s.status==="loaded"){Promise.resolve().then(()=>DO(t,e.group));return}s.waiting.add(t)};function ES(t){let e=this,n=e&&e.context;if(!n)return Promise.reject(new TypeError("[smbls/router] loadLazy runs on an element: el.call('loadLazy', name)"));let r=Vl(n,t);return typeof r!="function"?(r===void 0&&RO(n)&&Q()&&Ci(`[smbls/router] loadLazy('${t}'): context.lazy declares no group "${t}" \u2014 nothing to load.`),Promise.resolve()):IO(e,t)}var FO=/^:(.+)/,jO=/^\*$/,NO=new Map,CS=t=>{let e=NO.get(t);if(e)return e;let n=t.replace(/^\//,"").split("/"),r=[],o=!1;for(let i=0;i<n.length;i++){let a=n[i].match(FO);a?r.push({index:i,name:a[1]}):jO.test(n[i])&&(o=!0)}let s={segments:n,params:r,hasWildcard:o,pattern:t};return NO.set(t,s),s},TS=(t,e,n=0)=>{let o=t.replace(/^\//,"").split("/").filter(Boolean).slice(n),s="/"+(o[0]||"");if(!e)return{key:null,content:null,params:{},routePath:s};let i=null,a=-1,c={};for(let l in e){if(l==="/*")continue;let f=CS(l),u=RB(o,f);u>a&&(a=u,i=l,c=PB(o,f))}return!i&&e["/*"]&&(i="/*"),{key:i,content:i?e[i]:null,params:c,routePath:s}},RB=(t,e)=>{let{segments:n,hasWildcard:r}=e;if(!r&&n.length!==t.length&&n.length!==1&&n.length>t.length)return-1;let o=0,s=Math.min(n.length,t.length);for(let i=0;i<s;i++)if(n[i]===t[i])o+=3;else if(FO.test(n[i]))o+=1;else if(jO.test(n[i]))o+=.5;else return-1;return o},PB=(t,e)=>{let n={};for(let{index:r,name:o}of e.params)t[r]&&(n[o]=decodeURIComponent(t[r]));return n},OS=t=>{if(!t||t==="?")return{};let e={};return new URLSearchParams(t).forEach((r,o)=>{e[o]!==void 0?(Array.isArray(e[o])||(e[o]=[e[o]]),e[o].push(r)):e[o]=r}),e},RS=async(t,e)=>{if(!t||!t.length)return!0;for(let n of t){let r=await n(e);if(r===!1)return!1;if(typeof r=="string")return r}return!0},zl=(t,e)=>{if(!e)return t;let n=Array.isArray(e)?e:e.split("."),r=t;for(let o of n){if(!r||!r[o])return null;r=r[o]}return r},LB=(t,e)=>{let n=e.customRouterElement;if(!n||!t.__ref||t.__ref.root!==t)return t;let r=zl(t,n);return!r||r===t?t:(t.routes&&(r.routes=t.routes),r)},PS=(t=0,e)=>{e||(e=typeof T<"u"?T.location.pathname:"/");let r=e.split("/")[t+1];if(r)return`/${r}`},No,Ep=0,AS=0,DB=t=>!t||t==="srcdoc"||t==="about:srcdoc"?"/":t,IB=t=>t&&(t.scrollingElement||t.documentElement)||null,BO={level:Ep,pushState:!0,replace:!1,initialRender:!1,scrollToTop:!0,scrollToNode:!1,scrollBody:!1,useFragment:!1,updateState:!0,scrollToOffset:0,contentElementKey:"content",scrollToOptions:{behavior:"smooth"},useParamsMatching:!0,exitTimeout:300,scrollRestoreTimeout:1e3},$B=(t,e)=>{if(!t||t.visibilityState!=="visible")return!1;try{let n=e&&typeof e.matchMedia=="function"&&e.matchMedia("(prefers-reduced-motion: reduce)");if(n&&n.matches)return!1}catch{}return!0},UO=t=>{let e=t.__routeExit;e&&(t.__routeExit=null,e.abort())},MB=(t,e,n,r,o,s,i)=>{let a=e.__routeExit;if(a&&a.page===n)return a.wait;if(UO(e),!n||!n.node||typeof t.onRouteExit>"u"||!$B(s,i))return null;let c=typeof o=="number"&&o>=0?o:BO.exitTimeout,l=typeof AbortController=="function"?new AbortController:null,f={...r,page:n,timeout:c,signal:l?l.signal:void 0},u;try{u=Cn("routeExit",t,f)}catch{return null}if(!u||typeof u.then!="function")return null;let d={page:n,abort:()=>{l&&!l.signal.aborted&&l.abort()}};return d.wait=new Promise(p=>{let g=setTimeout(()=>{d.abort(),p()},c),h=()=>{clearTimeout(g),p()};u.then(h,h)}),e.__routeExit=d,d.wait},Pe=async(t,e,n={},r={})=>{let o=e||void 0,s=o?.context?.window||T,i=o?.context?.document||dt,a={...BO,...o.context.routerOptions,...r};Ep=a.lastLevel,o=LB(o,a);let c=o.__ref;(a.contentElementKey!=="content"&&a.contentElementKey!==c.contentElementKey||!c.contentElementKey)&&(c.contentElementKey=a.contentElementKey||"content");let l=c.contentElementKey||a.contentElementKey||"content",f=s.location.origin!=="null"?s.location.origin:"http://localhost";t=DB(t);let u=typeof s.URL=="function"?s.URL:typeof globalThis<"u"&&globalThis.URL||URL,d=new u(f+t),{pathname:p,search:g,hash:h}=d,m=OS(g),y=o.node,w=h&&h!==s.location.hash.slice(1),b=p!==No,x=No,k=++AS;No=p;let S=c.__routerRendered,_,E,C,$;if(a.useParamsMatching){let z=TS(p,o.routes,a.level);_=z.key,E=z.routePath,C=z.content,$=z.params}else{_=PS(a.level,p),E=_;let z=o.routes;C=z?z[_||"/"]||z["/*"]:null,$={}}a.scrollNode===void 0&&(a.scrollNode=IB(i));let M=a.scrollToNode?y:a.scrollNode;if(o.state?.root?.debugging){o.state.root.debugging=!1;return}let R=wO(s,a,M);if(R&&R.pop&&R.pop.echo)return;if(!C){AS===k&&(No=x),a.onNotFound?a.onNotFound({pathname:p,route:_,element:o}):(a.silent||console.warn("[smbls/router] no content matched for path",p,"\u2014 available routes:",Object.keys(o.routes||{})),a.event&&a.event.type==="popstate"&&xO(R,c,s));return}if(a.guards&&a.guards.length){let z={pathname:p,route:_,params:$,query:m,hash:h,element:o,state:n},B=await RS(a.guards,z);if(B===!1){AS===k&&(No=x),_S(R);return}if(typeof B=="string")return R&&R.pop?bS(R)?Pe(B,e,n,{...r,guards:[],event:void 0,pushState:!0,replace:!0}):void 0:a.initialRender?Pe(B,e,n,{...r,guards:[],pushState:!0,replace:!0}):Pe(B,e,n,{...r,guards:[]})}let j=$O(C,o,o.routes);if(j&&j.rematch)return Pe(t,o,n,r);j&&(C=j.content,a.lazy={group:j.group,status:j.status});let et=c.__routerNavSeq=(c.__routerNavSeq||0)+1,tt=!S||S.content!==C||S.route!==_,it=b||tt||a.force===!0;if(it&&S&&!vS(S.content)){let z=MB(o,c,o[l],{from:S.route,to:_,pathname:p,params:$,query:m,hash:h},a.exitTimeout,i,s);if(z&&(await z,c.__routerNavSeq!==et||(c.__routeExit&&c.__routeExit.wait===z&&(c.__routeExit=null),typeof o?.set!="function")))return}else UO(c);if(a.pushState){let z=p+(g||"")+(h||"");if(R)kO(R,n,z,a.replace);else try{a.replace?s.history.replaceState(n,null,z):s.history.pushState(n,null,z)}catch{}}else R&&bS(R);SO(c,s);let Pt=b||!w?{route:_,routePath:E,hash:h,params:$,query:m,debugging:!1}:{params:$,query:m};if(a.updateState&&o.state.update(Pt,{preventContentUpdate:!0}),it){l&&a.removeOldElement&&o[l].remove();let z=o.__ref?.origin?.content,B={};if(z)for(let rt in z){let Ft=z[rt];rt==="__ref"||rt==="props"||rt==="node"||rt==="parent"||rt==="key"||(typeof Ft=="string"||typeof Ft=="number"||typeof Ft=="boolean"||typeof Ft=="object"&&Ft!==null&&!Ft.node&&!Ft.__ref)&&(B[rt]=Ft)}let nt={...B,...typeof C=="object"?C:{extends:C}};a.useFragment&&(nt.tag="fragment");let U={content:C,route:_},V=c.__routerRendered;try{if(typeof o?.set!="function")return;c.__routerRendered=U,o.set(nt,{contentElementKey:l})}catch(rt){c.__routerRendered===U&&(c.__routerRendered=V),console.error("[smbls/router] failed to render route content",p,rt)}}let bt=!b&&w,Mt=vO(R,M,a,i);if(!Mt&&a.scrollToTop&&!bt&&M?.scrollTo&&M.scrollTo({...a.scrollToOptions||{},top:0,left:0}),!Mt&&a.scrollToNode&&C[l]?.node?.scrollTo&&C[l].node.scrollTo({...a.scrollToOptions||{},top:0,left:0}),!Mt&&h){let z=i.getElementById(h.slice(1));if(z&&M?.scrollTo){let B=s.getComputedStyle?s.getComputedStyle(z):null,nt=B&&parseFloat(B.scrollMarginTop)||0,U=z.getBoundingClientRect().top+M.scrollTop-nt-(a.scrollToOffset||0);M.scrollTo({...a.scrollToOptions||{},top:U,left:0})}}j&&MO(o,j,z=>Pe(t,o,n,{...r,...z})),Cn("routeChanged",o,a)},NB=Pe;var FB=(t,e)=>{if(!t)return!1;if(t.defaultPrevented||typeof t.button=="number"&&t.button!==0||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey)return!0;let n=e.node;if(!n||typeof n.getAttribute!="function")return!1;let r=n.getAttribute("target");return r&&r.toLowerCase()!=="_self"?!0:n.hasAttribute("download")},VO=(t,e,n)=>{let{context:r}=e,{href:o,scrollToTop:s,stopPropagation:i}=e,a=e.call("exec",o,e);if(e.call("isString",a)&&a.includes("{{")&&(a=e.call("replaceLiteralsWithObjectFields",a)),i&&t.stopPropagation(),!a||FB(t,e))return;let{utils:c,snippets:l,functions:f,routerOptions:u}=r,d=e.__ref.root,p=a.startsWith("http://")||a.startsWith("https://")||a.startsWith("mailto:")||a.startsWith("tel:")||a.startsWith("sketch:")||a.startsWith("whatsapp:")||a.startsWith("sms:")||a.startsWith("skype:")||a.startsWith("viber:")||a.startsWith("callto:")||a.startsWith("facetime:")||a.startsWith("facetime-audio:")||a.startsWith("geo:")||a.startsWith("maps:");if(a&&!p){t.preventDefault();try{let g=d;if(u&&u.customRouterElement){let h=Array.isArray(u.customRouterElement)?u.customRouterElement:u.customRouterElement.split("."),m=d;for(let y of h){if(!m||!m[y]){m=null;break}m=m[y]}m&&(g=m,d.routes&&(g.routes=d.routes))}(f.router||l.router||c.router||Pe)(a,g,{},{scrollToOptions:{behavior:"instant"},scrollToTop:e.call("isDefined",s)?s:!0,...u,...e.routerOptions})}catch(g){console.warn(g)}}},LS={extends:"Focusable",tag:"a",aria:{},fontWeight:"bold",textDecoration:"none",color:"currentColor",draggable:!1,attr:{href:t=>Or(t,t.href)||Or(t,t.call("exec",t,t).href),"aria-label":t=>t.aria?t.aria.label:t.text},onClick:VO},zO={extends:"Link"},DS={onClick:VO},HO={extends:[LS,DS]};var $S={};F($S,{Select:()=>WO});var WO={extends:"Focusable",tag:"select",fontSize:"A",border:"none",boxSizing:"border-box",theme:"field",cursor:"pointer",childProps:{tag:"option",attr:{value:t=>t.value,selected:t=>t.selected,disabled:t=>t.disabled}},attr:{name:t=>t.name,disabled:t=>t.disabled,value:t=>{if(!t.value)return;let e=t.call("exec",t.value,t);return t.call("isString",e)&&e.includes("{{")?t.call("replaceLiteralsWithObjectFields",e):e}}};var MS={};F(MS,{Button:()=>qO,ButtonSet:()=>XO,CircleButton:()=>GO,IconButton:()=>ZO,KangorooButton:()=>YO,SquareButton:()=>KO});var qO={extends:["IconText","FocusableComponent"],tag:"button",minHeight:"controlH",fontSize:"Z2",type:"button",border:"none",display:"inline-flex",align:"center center",textDecoration:"none",lineHeight:"1",whiteSpace:"nowrap",padding:"0 A",fontWeight:"700",fontFamily:"inherit",round:"radiusPill",disabled:t=>t.call("exec",t.disabled)},KO={extends:"Button",fontSize:"A",width:"A",minHeight:"auto",padding:"Z",aspectRatio:"1 / 1",boxSize:"fit-content fit-content",justifyContent:"center",round:"Z2",boxSizing:"content-box"},GO={extends:"SquareButton",round:"C"},YO={extends:"Button",childExtends:"IconText"},XO={tag:"nav",display:"flex",childExtends:"SquareButton"},ZO={extends:["SquareButton","ClickableItem"],round:"Z"};var NS={};F(NS,{Dialog:()=>QO,DialogFooter:()=>tR,DialogHeader:()=>JO});var QO={display:"flex",tag:"dialog",flow:"column",border:"0",theme:"dialog",round:"Z2"},JO={extends:"Hgroup",minWidth:"100%",gap:"A",Title:{align:"center space-between",Text:{text:"Title"},SquareButton:{icon:"x",theme:"transparent"}},Paragraph:{color:"caption"}},tR={display:"flex",align:"center flex-end",gap:"X2",margin:"auto - -",padding:"Y2 X2",childExtends:{extends:"Button",textTransform:"uppercase",background:"transparent","@dark":{theme:"primary @dark .color-only"},"@light":{theme:"primary @light .color-only"},"&":{padding:"Z A"},":hover":{theme:"tertiary"},":active":{background:"white.1"}},Cancel:{text:"cancel"},Ok:{text:"ok"}};var zS={};F(zS,{Tooltip:()=>aR,TooltipHidden:()=>cR,TooltipLayer:()=>VS,TooltipParent:()=>lR});I();var jB='[data-tooltip]:not([data-tooltip=""])',eR={top:1,bottom:1,left:1,right:1},FS={top:"bottom",bottom:"top",left:"right",right:"left"},Fo=6,nR=new WeakMap,BB=0,_e=t=>{let e=nR.get(t);return e||(e={id:"smbls-tooltip-"+ ++BB,hover:null,focus:null,shown:null,dismissed:null,showTimer:null,hideTimer:null},nR.set(t,e)),e},jS=t=>{let e=t&&t.nodeType!==1?t.parentElement:t;return e&&typeof e.closest=="function"?e:null},UB=t=>{let e=t.parent&&t.parent.node;return e&&e.nodeType===1?e:null},VB=t=>{for(let e=t.firstElementChild;e;e=e.nextElementSibling)if(e.hasAttribute("data-tooltip-layer"))return!0;return!1},rR=(t,e)=>{let n=UB(t);if(!e||!n)return null;let r;try{r=e.closest(jB)}catch{return null}if(!r||!n.contains(r))return null;for(let o=r;o&&o!==n;o=o.parentElement)if(VB(o))return null;return r},zB=(t,e)=>!!(e&&t.node&&t.node.contains(e)),HB=t=>{try{return t.matches(":focus-visible")}catch{return!0}},oR=(t,e)=>typeof t=="number"&&t>=0?t:e,Op=t=>{t.showTimer&&(clearTimeout(t.showTimer),t.showTimer=null),t.hideTimer&&(clearTimeout(t.hideTimer),t.hideTimer=null)},BS=t=>!!(t.node&&t.node.isConnected&&t.state&&typeof t.state.update=="function"),WB=(t,e)=>{let n=(t.getAttribute("aria-describedby")||"").split(/\s+/).filter(Boolean);n.indexOf(e)===-1&&n.push(e),t.setAttribute("aria-describedby",n.join(" "))},US=(t,e)=>{if(!t||typeof t.getAttribute!="function")return;let n=t.getAttribute("aria-describedby");if(n==null)return;let r=n.split(/\s+/).filter(o=>o&&o!==e);r.length?t.setAttribute("aria-describedby",r.join(" ")):t.removeAttribute("aria-describedby")},qB=(t,e,n,r,o)=>{let s={top:t.top,bottom:o-t.bottom,left:t.left,right:r-t.right},i=f=>(f==="top"||f==="bottom"?e.height:e.width)+Fo;s[n]<i(n)&&s[FS[n]]>=i(FS[n])&&(n=FS[n]);let a,c;n==="top"||n==="bottom"?(a=t.left+(t.width-e.width)/2,c=n==="bottom"?t.bottom+Fo:t.top-e.height-Fo):(c=t.top+(t.height-e.height)/2,a=n==="right"?t.right+Fo:t.left-e.width-Fo);let l=(f,u)=>Math.max(Fo,Math.min(u-Fo,f));return{left:l(a,r-e.width),top:l(c,o-e.height),side:n}},KB=t=>{let e=t.ownerDocument,n=e&&e.defaultView,r=e&&e.documentElement;return{width:r&&r.clientWidth||n&&n.innerWidth||0,height:r&&r.clientHeight||n&&n.innerHeight||0}},GB=t=>(t.title||"")+(t.description||""),Cp=(t,e=0)=>{let r=_e(t).shown;if(!r||!BS(t))return;if(!r.isConnected){Tp(t);return}let o=t.node,s=t.state;if(o.textContent!==GB(s)){e<3&&setTimeout(()=>Cp(t,e+1),0);return}let i=r.getBoundingClientRect(),a=o.getBoundingClientRect(),c=a.left-(s.x||0),l=a.top-(s.y||0),f=KB(o),u=r.getAttribute("data-tooltip-placement"),d=eR[u]?u:eR[t.tooltipPlacement]?t.tooltipPlacement:"bottom",p=qB(i,{width:a.width,height:a.height},d,f.width,f.height);s.update({x:Math.round(p.left-c),y:Math.round(p.top-l),side:p.side,placed:!0})},YB=t=>{typeof queueMicrotask=="function"?queueMicrotask(t):Promise.resolve().then(t)},sR=(t,e)=>{let n=_e(t);Op(n),!(!BS(t)||!e.isConnected)&&(n.shown&&n.shown!==e&&US(n.shown,n.id),n.shown=e,WB(e,n.id),t.state.update({open:!0,placed:!1,title:e.getAttribute("data-tooltip")||"",description:e.getAttribute("data-tooltip-description")||""}),YB(()=>Cp(t)))};function Tp(t){let e=_e(t);Op(e),e.shown&&US(e.shown,e.id),e.shown=null,BS(t)&&t.state.open&&t.state.update({open:!1})}var Ap=(t,e)=>{let n=_e(t);n.dismissed&&n.dismissed!==n.hover&&n.dismissed!==n.focus&&(n.dismissed=null);let r=n.hover&&n.hover!==n.dismissed?n.hover:n.focus&&n.focus!==n.dismissed?n.focus:null;if(r===n.shown){Op(n);return}if(!r){if(n.showTimer&&(clearTimeout(n.showTimer),n.showTimer=null),!n.shown||n.hideTimer)return;if(e){Tp(t);return}n.hideTimer=setTimeout(()=>{n.hideTimer=null,Tp(t)},oR(t.tooltipHideDelay,100));return}if(n.hideTimer&&(clearTimeout(n.hideTimer),n.hideTimer=null),e||n.shown){sR(t,r);return}n.showTimer&&clearTimeout(n.showTimer),n.showTimer=setTimeout(()=>{n.showTimer=null,sR(t,r)},oR(t.tooltipDelay,250))},iR=t=>{let e=_e(t);e.shown&&(e.dismissed=e.shown,Tp(t))},VS={role:"tooltip",id:t=>_e(t).id,data:{tooltipLayer:!0},state:{open:!1,placed:!1,title:"",description:"",x:0,y:0,side:"bottom"},tooltipPlacement:"bottom",display:"flex",flow:"column",gap:"X",theme:"dialog",padding:"Z1 A",round:"Y2",width:"max-content",maxWidth:"F2",textAlign:"center",position:"fixed",zIndex:2500,opacity:(t,e)=>e.open&&e.placed?"1":"0",visibility:(t,e)=>e.open&&e.placed?"visible":"hidden",pointerEvents:(t,e)=>e.open?"auto":"none",transition:"opacity A defaultBezier, visibility A defaultBezier",style:(t,e)=>({top:(e.y||0)+"px",left:(e.x||0)+"px"}),Text:{if:(t,e)=>!!e.title,text:(t,e)=>e.title,fontWeight:500,color:"currentColor"},P:{if:(t,e)=>!!e.description,text:(t,e)=>e.description,fontSize:"Z2",margin:"0",color:"currentColor",fontWeight:400},onDocumentPointerover:{capture:!0,passive:!0,handler:(t,e)=>{if(t.pointerType==="touch")return;let n=_e(e),r=jS(t.target),o=zB(e,r)?n.shown:rR(e,r);o===n.hover&&(o||!n.shown)||(n.hover=o,Ap(e,!1))}},onDocumentPointerout:{capture:!0,passive:!0,handler:(t,e)=>{if(t.relatedTarget)return;let n=_e(e);n.hover&&(n.hover=null,Ap(e,!1))}},onDocumentPointerdown:{capture:!0,passive:!0,handler:(t,e)=>{let n=_e(e),r=jS(t.target);n.shown&&r&&n.shown.contains(r)&&iR(e)}},onDocumentFocusin:{capture:!0,handler:(t,e)=>{let n=_e(e),r=jS(t.target),o=r&&HB(r)?rR(e,r):null;o!==n.focus&&(n.focus=o,Ap(e,!0))}},onDocumentFocusout:{capture:!0,handler:(t,e)=>{if(t.relatedTarget)return;let n=_e(e);n.focus&&(n.focus=null,Ap(e,!0))}},onDocumentKeydown:{capture:!0,handler:(t,e)=>{(t.key==="Escape"||t.key==="Esc")&&iR(e)}},onDocumentScroll:{capture:!0,passive:!0,handler:(t,e)=>{_e(e).shown&&Cp(e)}},onWindowResize:(t,e)=>{_e(e).shown&&Cp(e)},onBeforeRemove:t=>{let e=_e(t);Op(e),e.shown&&US(e.shown,e.id),e.shown=e.hover=e.focus=e.dismissed=null}};var aR={display:"flex",theme:"dialog",background:"black",flow:"column",shape:"tooltip",shapeDirection:"left",padding:"Z1 A",round:"Y2",width:"fit-content",minWidth:"D2",maxWidth:"F2",gap:"X",textAlign:"center",attr:{tooltip:!0},Title:{if:t=>It(t.parent.title)||t.parent.title,width:"fit-content",fontWeight:500,color:"gray12",text:t=>t.parent.title},P:{if:(t,e)=>t.call("isDefined",t.call("exec",t.parent.description,t))||t.text,width:"fit-content",fontSize:"Z2",margin:"0",color:"gray6",fontWeight:"400",text:(t,e)=>t.call("exec",t.parent.description,t)}},cR={extends:"Tooltip",position:"absolute",pointerEvents:"none",opacity:"0",visibility:"hidden",transition:"C defaultBezier opacity, C defaultBezier visibility, B defaultBezier transform",onInit:t=>{let e=!t.shapeDirection||t.shapeDirection==="top"?{top:"112%",left:"50%",transform:"translate3d(-50%,10%,0)",".isActive":{transform:"translate3d(-50%,0,0)",opacity:1,visibility:"visible"}}:t.shapeDirection==="right"?{transform:"translate3d(10%,-50%,0)",left:"112%",top:"50%",".isActive":{transform:"translate3d(0%,-50%,0)",opacity:1,visibility:"visible"}}:t.shapeDirection==="bottom"?{transform:"translate3d(-50%,-10%,0)",bottom:"112%",left:"50%",".isActive":{transform:"translate3d(-50%,0,0)",opacity:1,visibility:"visible"}}:t.shapeDirection==="left"?{transform:"translate3d(10%,-50%,0)",right:"112%",top:"50%",".isActive":{transform:"translate3d(0%,-50%,0)",opacity:1,visibility:"visible"}}:{};Object.assign(t,e)}},lR={position:"relative",zIndex:999,onInit:t=>{let{Tooltip:e,TooltipHidden:n}=t,r=e||n;if(!r)return;let o=r&&r[".isActive"];Object.assign(t,{":hover, &:focus-visible":{zIndex:1e3,"& [tooltip]":o||{transform:"translate3d(-50%, 0, 0)",opacity:1,visibility:"visible"}}})}};var HS={};F(HS,{Avatar:()=>fR});var XB=t=>{let n=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><rect width="64" height="64" rx="32" fill="#71718A"/><text x="32" y="42" font-family="system-ui,sans-serif" font-size="28" font-weight="700" text-anchor="middle" fill="#fff">${String(t||"").trim().charAt(0).toUpperCase()||"?"}</text></svg>`;return"data:image/svg+xml;utf8,"+encodeURIComponent(n)},fR={extends:"Img",display:"block",avatarType:"adventurer-neutral",borderRadius:"100%",boxSize:"C+X C+X",src:t=>`https://api.dicebear.com/7.x/${t.avatarType||"initials"}/svg?seed=${t.key||"no-avatar"}`,onError:(t,e)=>{if(!e.node||e.node.__avatarFallbackApplied)return;e.node.__avatarFallbackApplied=!0;let n=e.node.getAttribute("alt")||(e.key!=="no-avatar"?e.key:"");e.node.src=XB(n)},attr:{alt:t=>t.alt!=null?t.alt:t.text?t.call("exec",t.text,t):t.key&&t.key!=="no-avatar"?t.key:""}};var WS={};F(WS,{Range:()=>uR});var uR={tag:"input",appearance:"none",width:"100%",height:"2px",outline:"none",flex:1,onInput:(t,e,n)=>{e.call("isFunction",e.onInput)?e.onInput(t,e,n):n.update({value:parseFloat(e.node.value)})},onChange:(t,e,n)=>{e.call("isFunction",e.onChange)?e.onChange(t,e,n):n.update({value:parseFloat(e.node.value)})},"::-webkit-slider-thumb":{boxSizing:"content-box",width:"8px",height:"8px",borderWidth:"2px",borderStyle:"solid",borderRadius:"100%",opacity:".8",appearance:"none"},"::-webkit-slider-runnable-track":{},"@dark":{background:"white.2","::-webkit-slider-thumb":{background:"#232526",borderColor:Ms("#454646",.75)},":hover":{"::-webkit-slider-thumb":{borderColor:Ms("#fff",.35)}},":focus":{"::-webkit-slider-thumb":{borderColor:"#3C6AC0"}}},"@light":{background:"gray9","::-webkit-slider-thumb":{background:"white",borderColor:"gray9"},":hover":{"::-webkit-slider-thumb":{borderColor:"gray7"}},":focus":{"::-webkit-slider-thumb":{borderColor:"blue"}}},deps:{returnPropertyValue:(t,e,n)=>{let r=t.call("exec",t[e],t);return(t.call("isFunction",r)?r(t,t.state):r!==void 0?r:n!==void 0?n:0)+""}},attr:{type:"range",value:(t,e)=>t.call("exec",e.value||t.value||t.defaultValue,t),min:(t,e)=>t.deps.returnPropertyValue(t,"min",0),max:(t,e)=>t.deps.returnPropertyValue(t,"max",100),step:(t,e)=>t.deps.returnPropertyValue(t,"step",1)}};var qS={};F(qS,{Dropdown:()=>dR,DropdownList:()=>pR,DropdownParent:()=>hR,DropdownParentFocus:()=>gR,DropdownSiblingFocus:()=>mR});var dR={attr:{dropdown:!0},position:"absolute",top:"100%",left:"0",zIndex:1e3,theme:"quaternary",padding:"Y",round:"Z2",flow:"column",gap:"X",transition:"transform B defaultBezier, opacity B defaultBezier, visibility B defaultBezier",transform:"translate3d(0,10%,0)",opacity:0,visibility:"hidden"},pR={display:"flex",attr:{dropdown:!0},padding:"0 Y",maxHeight:"G",flow:"column",theme:"quaternary",overflow:"hidden auto",style:{listStyleType:"none"},transition:"transform B defaultBezier, opacity B defaultBezier, visibility B defaultBezier",children:t=>t.options||[],childrenAs:"props",".hidden":{transform:"translate3d(0,10%,0)",opacity:0,visibility:"hidden"},childExtends:{extends:"Button",state:{},isActive:({key:t,state:e})=>e.active===t,position:"relative",round:"0",align:"center flex-end",flow:"row-reverse",padding:"Z2 C Z2 Y2",margin:"0",gap:"Y2",theme:"quaternary .child",":hover":{style:{svg:{opacity:"0.5"}}},Icon:{isActive:({key:t,state:e})=>e.active===t,name:"checkmark",opacity:"0.1",".active":{opacity:"1"}},":not(:first-child)":{"@dark":{border:"solid gray4.65"},"@light":{border:"solid gray11"},borderWidth:"1px 0 0"}}},hR={position:"relative",zIndex:999,":hover":{zIndex:1e3,"& [dropdown]":{transform:"translate3d(0,0,0)",opacity:1,visibility:"visible"}}},gR={position:"relative",tabindex:"0",":focus-within":{zIndex:1e3,"& [dropdown]":{transform:"translate3d(0,0,0)",opacity:1,visibility:"visible"}},Input_trigger:{type:"checkbox",opacity:"0",position:"absolute",inset:"0",width:"100%",height:"100%",cursor:"pointer",onClick:(t,e)=>{e.node===document.activeElement&&e.node.blur()}},Dropdown:{onClick:()=>{document.activeElement?.blur()}}},mR={position:"relative",tabindex:"0",":focus-within":{zIndex:1e3,"& ~ [dropdown]":{transform:"translate3d(0,0,0)",opacity:1,visibility:"visible"}},Input_trigger:{type:"checkbox",opacity:"0",position:"absolute",inset:"0",width:"100%",height:"100%",cursor:"pointer",onClick:(t,e)=>{e.node===document.activeElement&&e.node.blur()}}};var KS={};F(KS,{Notification:()=>yR});var yR={display:"flex",theme:"alert",padding:"Z1 B Z A",round:"A A A Y2",gap:"X2",cursor:"pointer",align:"flex-start center",IconText:{Icon:{name:"info outline"},Text:{":empty":{hide:!0}}},Hgroup:{extends:["Flex","Hgroup"],flow:"y",align:"flex-start",gap:"X2",H:{tag:"h6",margin:"0",fontWeight:"600",lineHeight:"1em",text:"Notification",":empty":{hide:!0}},P:{fontSize:"Z",margin:"0",text:"is not always a distraction",":empty":{hide:!0}}}};var jo=Object.assign({},Fw,jw,Bw,Uw,zw,Kw,Gw,Yw,Ww,Xw,Zw,qw,Qw,Jw,tS,eS,nS,rS,oS,sS,iS,aS,cS,IS,$S,MS,NS,zS,HS,WS,qS,KS);function Rp(t){if(t==null)return 0;if(typeof t!="object")return bR(String(t));let e=2166136261;if(Array.isArray(t)){e=(e^91)*16777619;for(let r=0;r<t.length;r++)e=(e^Rp(t[r]))*16777619;return e>>>0}let n=Object.keys(t).sort();for(let r=0;r<n.length;r++)e=(e^bR(n[r]))*16777619,e=(e^Rp(t[n[r]]))*16777619;return e>>>0}function bR(t){let e=2166136261;for(let n=0;n<t.length;n++)e^=t.charCodeAt(n),e=e*16777619>>>0;return e}function Pp(t,e){if(t===e)return!0;if(t===null||e===null||typeof t!=typeof e||typeof t!="object")return!1;if(Array.isArray(t)){if(!Array.isArray(e)||t.length!==e.length)return!1;for(let o=0;o<t.length;o++)if(!Pp(t[o],e[o]))return!1;return!0}let n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(let o=0;o<n.length;o++){let s=n[o];if(!Object.prototype.hasOwnProperty.call(e,s)||!Pp(t[s],e[s]))return!1}return!0}function GS(t,e){if(e===void 0)return t;if(t===void 0)return e;if(e===null)return null;if(typeof e!="object"||Array.isArray(e))return e;if(typeof t!="object"||Array.isArray(t))return{...e};let n=!1,r={};for(let o in t)if(o in e){let s=GS(t[o],e[o]);r[o]=s,s!==t[o]&&(n=!0)}else r[o]=t[o];for(let o in e)o in t||(r[o]=e[o],n=!0);return n?r:t}function YS(t,e,n){if(!e||typeof e!="object")return t;if(!t||typeof t!="object")return e;if(n||(n=new WeakSet),n.has(e))return t;n.add(e);for(let r in e){let o=e[r];o&&typeof o=="object"&&!Array.isArray(o)&&t[r]&&typeof t[r]=="object"&&!Array.isArray(t[r])?YS(t[r],o,n):t[r]=o}return t}function Dr(t){let e=2166136261;for(let n=0;n<t.length;n++)e^=t.charCodeAt(n),e=e*16777619>>>0;return e.toString(36)}function Ri(t){return t.replace(/[A-Z]/g,e=>"-"+e.toLowerCase())}function Hl(t){let e=String(t);return e.length<=20?e.replace(/\s+/g,"_").replace(/[^a-zA-Z0-9_-]/g,"").toLowerCase():Dr(e)}function _R(t){return t.split(`
|
|
88
|
+
`).map(Dr).join(`
|
|
89
|
+
`)}var wR={display:"d",position:"pos",padding:"p",paddingTop:"pt",paddingRight:"pr",paddingBottom:"pb",paddingLeft:"pl",paddingBlock:"pbl",paddingInline:"pin",margin:"m",marginTop:"mt",marginRight:"mr",marginBottom:"mb",marginLeft:"ml",marginBlock:"mbl",marginInline:"min",width:"w",height:"h",minWidth:"mnw",minHeight:"mnh",maxWidth:"mxw",maxHeight:"mxh",top:"t",right:"r",bottom:"b",left:"l",flex:"fx",flexDirection:"fxd",flexWrap:"fxw",flexGrow:"fxg",flexShrink:"fxs",flexBasis:"fxb",justifyContent:"jc",alignItems:"ai",alignSelf:"as",alignContent:"ac",gap:"g",rowGap:"rg",columnGap:"cg",gridTemplateColumns:"gtc",gridTemplateRows:"gtr",gridColumn:"gc",gridRow:"gr",overflow:"of",overflowX:"ofx",overflowY:"ofy",fontSize:"fs",fontWeight:"fw",fontFamily:"ff",fontStyle:"fst",lineHeight:"lh",letterSpacing:"ls",textAlign:"ta",textDecoration:"td",textTransform:"tt",color:"c",background:"bg",backgroundColor:"bgc",backgroundImage:"bgi",border:"bd",borderRadius:"br",borderColor:"bdc",borderWidth:"bdw",borderStyle:"bds",boxShadow:"bxsh",opacity:"op",zIndex:"z",cursor:"cur",transition:"tr",transform:"tf",animation:"an",visibility:"vis",whiteSpace:"ws",wordBreak:"wb",objectFit:"obj",pointerEvents:"pe",userSelect:"us",boxSizing:"bxz",outline:"ol",listStyle:"lis",textOverflow:"txo",verticalAlign:"va",float:"fl",clear:"cl",content:"cnt",backdropFilter:"bdf",filter:"flt",resize:"rsz",appearance:"apr",fill:"fil",stroke:"stk",scrollBehavior:"sb",inset:"ins"};function SR(t,e){let n=wR[t]||Dr(t),r=Hl(e),o=`_${n}-${r}`,s=Ri(t),i=t3[s],a=i?`${s}: ${e};${i}: ${e}`:`${s}: ${e}`,c=`.${o}{${a}}`;return`${o}
|
|
90
|
+
${c}`}var t3={"backdrop-filter":"-webkit-backdrop-filter","user-select":"-webkit-user-select","mask-image":"-webkit-mask-image","mask-size":"-webkit-mask-size","mask-repeat":"-webkit-mask-repeat","mask-position":"-webkit-mask-position","mask-clip":"-webkit-mask-clip","mask-origin":"-webkit-mask-origin","background-clip":"-webkit-background-clip"},e3="@media (hover: hover)",n3=/(?:^|[^\\]):hover(?![\w-])/,xR=t=>typeof t=="string"&&(t.indexOf("{")!==-1||t.indexOf("}")!==-1);function kR(t){let e=t.split("\0"),n=[],r=[];for(let o=0;o+1<e.length;o+=2){let s=e[o],i=e[o+1];if(!i||xR(i))continue;let a=wR[s]||Dr(s),c=Hl(i),l=`_${a}-${c}`,f=Ri(s);n.push(l),r.push(`.${l}{${f}:${i}}`)}return n.join(" ")+"\0"+r.join(`
|
|
91
|
+
`)}function vR(t,e,n){let r=t+e,o=`_c${Dr(r)}`,s=e.split("\0"),i="";for(let l=0;l+1<s.length;l+=2){let f=s[l],u=s[l+1];u&&(xR(u)||(i+=`${Ri(f)}:${u};`))}let a,c;if(t.startsWith("@media"))c=`.${o}`,a=`${t}{${c}{${i}}}`;else if(t.startsWith(":")||t.startsWith("&")||t.startsWith("[")&&!t.includes("&")){let l=t.startsWith("&")?t.slice(1):t;c=`.${o}${l}`,a=`${c}{${i}}`}else t.includes("&")?(c=t.replace("&",`.${o}`),a=`${c}{${i}}`):(c=`.${o} ${t}`,a=`${c}{${i}}`);return n!==!1&&n3.test(c)&&(a=`${e3}{${a}}`),`${o}
|
|
92
|
+
${a}`}var XS=null;function Dp(t){XS=t}var sn={structuralHash:Rp,deepEqual:Pp,mergeStructural:GS,overwriteDeep:YS,shortHash:Dr,toKebab:Ri,sanitizeValue:Hl,batchShortHash:_R,atomicCssClass:SR,batchAtomicCss:kR,compoundCssClass:vR},ER=!1,Lp=null;function AR(t){return Lp||(Lp=import(t||"@symbo.ls/wasm/pkg").then(e=>(e.structuralHash&&(sn.structuralHash=e.structuralHash),e.deepEqual&&(sn.deepEqual=e.deepEqual),e.mergeStructural&&(sn.mergeStructural=e.mergeStructural),e.overwriteDeep&&(sn.overwriteDeep=e.overwriteDeep),e.shortHash&&(sn.shortHash=e.shortHash),e.toKebab&&(sn.toKebab=e.toKebab),e.sanitizeValue&&(sn.sanitizeValue=e.sanitizeValue),e.batchShortHash&&(sn.batchShortHash=e.batchShortHash),e.atomicCssClass&&(sn.atomicCssClass=e.atomicCssClass),e.batchAtomicCss&&(sn.batchAtomicCss=e.batchAtomicCss),e.compoundCssClass&&(sn.compoundCssClass=e.compoundCssClass),ER=!0,XS&&e.batchAtomicCss&&XS({batchAtomicCss:e.batchAtomicCss,compoundCssClass:e.compoundCssClass}),!0)).catch(e=>(console.debug("[smbls] WASM not available, using JS fallbacks:",e.message),!1)),Lp)}function CR(){return ER}I();var Wl={};F(Wl,{CDN_PROVIDERS:()=>Ne,DOMQL_EVENTS:()=>Hg,DOMQ_PROPERTIES:()=>sr,ELEMENT_METHOD_OVERRIDE_POINTS:()=>ds,ENV:()=>fm,HTML_TAGS:()=>bs,LIBRARY_PACKAGES:()=>Ju,LIBRARY_SCOPES_KEY:()=>co,METHODS:()=>ar,METHODS_EXL:()=>_a,NODE_ENV:()=>Ye,OPTIONS:()=>qa,PACKAGE_MANAGER_TO_CDN:()=>hr,PARSED_DOMQ_PROPERTIES:()=>ba,PROPS_METHODS:()=>ir,REVIVED_MARK:()=>Ea,STATE_METHODS:()=>qr,STATE_PROPERTIES:()=>Vg,SVG_TAGS:()=>Lk,TYPES:()=>ua,UNIVERSAL_RESERVED_KEYS:()=>qu,__resetBuiltinMethodWarnings:()=>nb,addCaching:()=>_u,addContext:()=>bu,addExtend:()=>Dm,addExtends:()=>pn,addItemAfterEveryElement:()=>Og,addProtoToArray:()=>ha,addRef:()=>gu,applyCSS:()=>JS,applyDependentState:()=>Qm,applyEvent:()=>Eu,applyEventUpdate:()=>Au,applyExtends:()=>$k,applyProps:()=>ja,arrayContainsOtherArray:()=>xg,arraysEqual:()=>Pg,arrayzeValue:()=>uo,bindLibraryGlobalScopes:()=>xc,buildImgSrcset:()=>Cc,buildSourcesAndImg:()=>Tc,cache:()=>ry,call:()=>Py,captureSnapshot:()=>Dy,checkForStateTypes:()=>Gm,checkIfInherits:()=>vu,checkIfStringIsInArray:()=>Ig,clone:()=>Yg,cloneAndMergeArrayExtend:()=>Pa,cloneFunction:()=>ym,collectExtendsList:()=>_s,concatAddExtends:()=>Rm,copyJavaScriptToClipboard:()=>cb,copyStringToClipboard:()=>ab,createBasedOnType:()=>hu,createElement:()=>Km,createElementExtends:()=>nu,createExtends:()=>Da,createExtendsFromKeys:()=>ws,createExtendsStack:()=>iu,createIfConditionFlag:()=>bm,createInheritedState:()=>Ym,createKey:()=>Oa,createNestedObject:()=>rm,createNestedObjectByKeyPath:()=>Zm,createObjectWithoutPrototype:()=>Gf,createParent:()=>mu,createPath:()=>yu,createProps:()=>Ba,createPropsStack:()=>du,createRoot:()=>qm,createScope:()=>ty,createSnapshotId:()=>Ta,customDecodeURIComponent:()=>Ug,customEncodeURIComponent:()=>Bg,cutArrayAfterValue:()=>Cg,cutArrayBeforeValue:()=>Ag,debounce:()=>Ra,debounceOnContext:()=>gm,decodeNewlines:()=>jg,deepClone:()=>ut,deepContains:()=>em,deepDefaults:()=>Rs,deepDestringifyFunctions:()=>ce,deepExtend:()=>eu,deepMerge:()=>ft,deepMergeExtends:()=>hn,deepStringifyFunctions:()=>xa,defineSetter:()=>Oy,destringifyGlobalScope:()=>Jr,detectHeightOnInit:()=>Fy,detectInfiniteLoop:()=>am,document:()=>dt,encodeNewlines:()=>Fg,error:()=>ro,excludeKeysFromObject:()=>lm,exec:()=>pt,exposeBagGlobalScopes:()=>kc,extendCachedRegistry:()=>Pm,extendStackRegistry:()=>Ia,extractArrayExtend:()=>Ma,fetchLibraryData:()=>td,fibonacciNumberByIndex:()=>jy,fileEntryUrl:()=>Yu,filterArrays:()=>Lg,filterArraysFast:()=>Dg,finalizeExtends:()=>au,findClosestNumber:()=>Xu,findClosestNumberInFactory:()=>Zy,findInheritedState:()=>ku,findKeyPosition:()=>Mg,flattenExtend:()=>Ss,formatDate:()=>Ny,generateHash:()=>Qf,generateHeadArrayTags:()=>Gu,generateKey:()=>Ca,generateMetaTags:()=>Yy,get:()=>Ey,getActiveRoute:()=>PS,getCDNDirUrl:()=>Ku,getCDNUrl:()=>Qe,getCapitalCaseKeys:()=>Mm,getCdnProviderFromConfig:()=>Ts,getChildStateInKey:()=>xu,getChildren:()=>Ty,getContext:()=>uc,getCookie:()=>km,getDB:()=>mc,getEmotionStylesheet:()=>db,getExtendsInElement:()=>Im,getExtendsStack:()=>La,getExtendsStackRegistry:()=>tu,getFrequencyInArray:()=>kg,getFunctionSource:()=>te,getHashedExtend:()=>$a,getImportMapScript:()=>My,getInObjectByPath:()=>im,getLocalStorage:()=>Em,getNev:()=>hm,getPageMetadata:()=>Xy,getParentStateInKey:()=>Su,getPath:()=>sc,getQuery:()=>yc,getRef:()=>Cy,getRoot:()=>cc,getRootContext:()=>fc,getRootData:()=>lc,getRootState:()=>ac,getRootStateInKey:()=>wu,getSpreadChildren:()=>Nm,global:()=>_g,hasFunction:()=>Jt,hasHandlerPlugin:()=>ms,hasOwnProperty:()=>Qg,hashContent:()=>io,inheritChildExtends:()=>ou,inheritChildPropsExtends:()=>ru,inheritParentProps:()=>Ua,inheritRecursiveChildExtends:()=>su,init:()=>Gn,initProps:()=>zm,is:()=>ae,isArray:()=>D,isBoolean:()=>Uf,isBuiltinElementMethod:()=>zg,isContextComponent:()=>Fm,isCyclic:()=>cm,isDOMNode:()=>ie,isDate:()=>zf,isDefined:()=>It,isDevelopment:()=>lr,isEmpty:()=>qf,isEmptyObject:()=>Jg,isEqualDeep:()=>Kf,isFailedRevival:()=>Zr,isFunction:()=>P,isHtmlElement:()=>la,isLazyFunction:()=>Xg,isLocal:()=>pm,isLoudDevRuntime:()=>Q,isMalformedDependency:()=>oo,isMethod:()=>Ly,isMobile:()=>Sm,isNode:()=>En,isNot:()=>Sg,isNotProduction:()=>An,isNull:()=>Vf,isNumber:()=>Ie,isObject:()=>A,isObjectLike:()=>q,isPhoto:()=>By,isPolyglotRetranslatableKey:()=>Wa,isPolyglotWritableKey:()=>eo,isProduction:()=>cr,isProtectedElementMethod:()=>Kr,isRevived:()=>Qr,isStaging:()=>dm,isState:()=>Xm,isString:()=>v,isStringFunction:()=>gs,isStringTag:()=>va,isTest:()=>Xf,isTesting:()=>um,isUndefined:()=>Bt,isUniversallyReservedKey:()=>Iy,isUnresolvableDependency:()=>gr,isValidDependencyMap:()=>so,isValidHtmlTag:()=>Cm,isWrappedLibrary:()=>Je,joinArrays:()=>ls,jointStacks:()=>Lm,keys:()=>Hu,lastLevel:()=>Ep,lastPathname:()=>No,libraryPackageSpecs:()=>Ps,loadCssFile:()=>Hy,loadJavascript:()=>Wy,loadJavascriptFile:()=>Uy,loadJavascriptFileEmbedSync:()=>zy,loadJavascriptFileSync:()=>Vy,loadLazy:()=>ES,loadRemoteCSS:()=>qy,loadRemoteScript:()=>Os,log:()=>Ry,logGroupIf:()=>wm,logIf:()=>_m,lookdown:()=>ky,lookdownAll:()=>vy,lookup:()=>xy,lowercaseFirstLetter:()=>Wr,makeObjectWithoutPrototype:()=>tm,map:()=>Gg,mapStringsWithContextComponents:()=>Na,markPolyglotSeeded:()=>mn,markRevived:()=>hs,matchRoute:()=>TS,matchesComponentNaming:()=>gn,memoize:()=>mm,merge:()=>xt,mergeSharedLibraries:()=>vc,mergeSharedLibraryDesignSystems:()=>Ec,nextElement:()=>pc,normalizeIgnoreList:()=>Sc,normalizeLibraryKey:()=>lo,objectToString:()=>ka,objectizeStringProperty:()=>Fa,overwrite:()=>Aa,overwriteDeep:()=>ee,overwriteShallow:()=>to,overwriteState:()=>Jm,parse:()=>Wu,parseDeep:()=>rc,parseQuery:()=>OS,parseRoutePattern:()=>CS,pickupElementFromProps:()=>fu,pickupPropsFromElement:()=>lu,polyglotSeededKeys:()=>ur,previousElement:()=>hc,promoteActiveRootState:()=>vs,propExists:()=>Um,propertizeElement:()=>uu,propertizeUpdate:()=>Bm,reinit:()=>QS,remove:()=>Cv,removeChars:()=>lb,removeCookie:()=>vm,removeDuplicateProps:()=>za,removeDuplicatesInArray:()=>fs,removeFromArray:()=>vg,removeFromObject:()=>nm,removeNestedKeyByPath:()=>om,removeValueFromArray:()=>pa,removeValueFromArrayAll:()=>Tg,reorderArrayByValues:()=>Rg,repairLegacyArrowScopePreamble:()=>wa,replaceLiteralsWithObjectFields:()=>Vt,replaceOctalEscapeSequences:()=>Ng,resolveAsset:()=>fe,resolveFileReferences:()=>ao,resolveHandler:()=>ys,resolveRouterElement:()=>zl,resolveSharedLibraries:()=>ib,returnValueAsText:()=>pu,router:()=>Pe,runGuards:()=>RS,runPluginHook:()=>Ct,saveScrollPosition:()=>Ul,scratchSystem:()=>Ys,scratchUtils:()=>_r,self:()=>wg,set:()=>Eo,setActiveRootState:()=>ic,setCookie:()=>xm,setHashedExtend:()=>Jf,setInObjectByPath:()=>sm,setLocalStorage:()=>Am,setNodeStyles:()=>zu,setProps:()=>Ay,setPropsPrototype:()=>Va,sharedLibrary:()=>eb,splitPackageSpecifier:()=>bc,spotByPath:()=>oc,srcsetFor:()=>Ds,stringIncludesAny:()=>ma,stringToObject:()=>Zg,stripVersionRangePrefix:()=>_c,swapItemsInArray:()=>Eg,syncProps:()=>Ha,toCamelCase:()=>fo,toDashCase:()=>Ac,toDescriptionCase:()=>ub,toPriorityOrder:()=>$e,toTitleCase:()=>fb,toggleFullscreen:()=>$y,triggerEventOn:()=>Cn,triggerEventOnUpdate:()=>ey,trimStringFromSymbols:()=>$g,unstackArrayOfObjects:()=>da,update:()=>Vm,updateProps:()=>Hm,variables:()=>gc,verbose:()=>Es,warn:()=>dc,warnLibraryAliasCollision:()=>Ls,window:()=>T});I();I();var o3=O(),TR=(t=o3,e)=>{let n=A(e.localFile)?e.localFile:{},r=ut(n.designSystem||{});return ft(t,r,Ee)},s3={useVariable:!0,useReset:!0,useFontImport:!0,useIconSprite:!0,useDocumentTheme:!0,useSvgSprite:!0},Ip=(t,e)=>{let n=!e||e===":root",r={};for(let o in t)if(o.startsWith("@media")){let s=n?":root:not([data-theme])":`:root:not([data-theme]) ${e}:not([data-theme])`;r[o]={[s]:t[o]}}else n?r[o]=t[o]:r[`${e}${o}, ${o} ${e}`]=t[o];return r},ZS=(t,e)=>{t.CSS_MEDIA_VARS&&vt(Ip(t.CSS_MEDIA_VARS,e));let n=vo(t.cssSkinVars,t.cssSkinFallback,e);Object.keys(n).length&&vt(n)},Gn=(t,e=s3)=>{let n=TR(t||{},e),r=e.scopeSelector||":root",o=e.globalTheme;if(typeof window<"u"&&window.location){let h=new URLSearchParams(window.location.search).get("globalTheme");h&&(o=h)}let s=Eo({verbose:e.verbose,useReset:e.useReset,useFontImport:e.useFontImport,useVariable:e.useVariable,useSvgSprite:e.useSvgSprite,useDocumentTheme:e.useDocumentTheme,useIconSprite:e.useIconSprite,useDefaultConfig:e.useDefaultConfig,globalTheme:o,themeRoot:e.themeRoot,files:e.files,assets:e.assets,...n},{newConfig:e.newConfig,config:e.config});s&&(s.scopeSelector=r);let i=Dc(s.font,s.files),a=s.useReset,c=s.useVariable,l=s.useFontImport,f=s.useSvgSprite,u=t.svg,d=s.useIconSprite,p=t.icons;l&&vt(i),c&&(vt({[r]:s.CSS_VARS}),ZS(s,r)),a&&vt(s.reset);let g=s.animation;if(g){let h={};for(let m in g)h[`@keyframes ${m}`]=g[m];vt(h)}return(u||f)&&sl(s.svg,{document:e.document}),(p||d)&&ko(s.icons,{document:e.document}),s},$p={},QS=(t,e=$p)=>{let n=TR(t||{},e),r=e.scopeSelector||":root",o=Eo({verbose:!1,...n});return e.preventInject||(vt({[r]:o.CSS_VARS}),ZS(o,r),vt(o.reset)),o},JS=(t,e=$p)=>{vt(t)},i3=(t,e=$p)=>{let n=e.scopeSelector||":root";vt({[n]:t.CSS_VARS}),ZS(t,n)};var a3=(t,e=$p)=>{};I();var RR=t=>!t||t==="srcdoc"||t==="about:srcdoc"||t==="blank"||t==="about:blank"?"/":t,c3=t=>{let e=t&&t.initialPath;return typeof e!="string"||!e?null:e[0]==="/"?e:"/"+e},ex={initRouter:!0,injectRouterInLinkComponent:!0,popState:!0},l3=(t,e)=>{if(!e)return t;let n=Array.isArray(e)?e:e.split("."),r=t;for(let o of n){if(!r||!r[o])return null;r=r[o]}return r},ql=(t,e)=>(zl||l3)(t,e),f3=["manual","auto","restore"],tx=new WeakMap,OR=(t,e)=>{let n=e.claims[e.claims.length-1],r=n?n.value:e.found;t.scrollRestoration!==r&&(t.scrollRestoration=r)},u3=(t,e)=>{let n=e&&e.scrollRestoration;if(n!=null){if(!f3.includes(n)){if(t.verbose!==!1){let r=typeof n=="string"?JSON.stringify(n):`a ${typeof n}`;console.warn(`[smbls/router] router.scrollRestoration must be 'manual', 'auto' or 'restore', got ${r} \u2014 the browser default stays`)}return}try{let r=t.window||T,o=r&&r.history;if(!o||!("scrollRestoration"in o))return;let s=tx.get(o);s||(s={found:o.scrollRestoration,claims:[]},tx.set(o,s));let i={value:n==="restore"?"manual":n};s.claims.push(i),OR(o,s),t.__teardowns=t.__teardowns||[],t.__teardowns.push(()=>{let a=s.claims.indexOf(i);if(a!==-1){s.claims.splice(a,1),s.claims.length||tx.delete(o);try{OR(o,s)}catch{}}})}catch{}}},d3=(t,e)=>{if(!e||e.scrollRestoration!=="restore")return;let n=Ul,r=t.window||T;if(typeof n!="function"||!r||typeof r.addEventListener!="function")return;let o=t.document||r.document,s=()=>n(r),i=()=>{o.visibilityState==="hidden"&&n(r)};r.addEventListener("pagehide",s);let a=!!o&&typeof o.addEventListener=="function";a&&o.addEventListener("visibilitychange",i),t.__teardowns=t.__teardowns||[],t.__teardowns.push(()=>{r.removeEventListener("pagehide",s),a&&o.removeEventListener("visibilitychange",i)})},PR=(t,e)=>{if(e.router===!1)return;e.router===!0?e.router=ex:e.router=xt(e.router||{},ex);let n=e.router;u3(e,n),d3(e,n);let r=async(s,i)=>{let a=s.context?.window||T,c=c3(n);if(!c){if(!a.location)return;let{pathname:f,search:u,hash:d}=a.location;f=RR(f),c=f+u+d}let l=s;if(n.customRouterElement){let f=ql(s,n.customRouterElement);f&&(l=f,s.routes&&(l.routes=s.routes))}l.routes&&await Pe(c,l,{},{initialRender:!0,pushState:!1})},o=!Bt(t.onRenderRouter);return n&&n.initRouter&&!o&&(t.onRenderRouter=r),p3(e,n),n},nx=(t,e)=>{if(e.router===!1)return;let n=e.router||ex;if(!n.popState)return;let r=e.utils&&e.utils.router?e.utils.router:Pe,o=e.window||T,s=async i=>{let{pathname:a,search:c,hash:l}=o.location;a=RR(a);let f=a+c+l,u=t;if(n.customRouterElement){let d=ql(t,n.customRouterElement);d&&(u=d,t.routes&&(u.routes=t.routes))}await u.call("router",f,u,{},{pushState:!1,scrollToTop:!1,level:0,event:i})};o.addEventListener("popstate",s),e.__teardowns=e.__teardowns||[],e.__teardowns.push(()=>o.removeEventListener("popstate",s))},p3=(t,e)=>{let{components:n}=t;if(e&&e.injectRouterInLinkComponent)return ft(n.Link||n["smbls.Link"],n.RouterLink||n["smbls.RouterLink"])};I();var LR=T&&T.location&&typeof T.location.host=="string"?T.location.host:null,rx=LR!==null?LR.includes("dev."):lr(),DR=rx?"http://localhost:8080/get":"https://api.symbols.app/get",h3={endpoint:DR},IR=async(t,e=h3)=>{let n=e.endpoint||DR,r=e.serviceRoute?D(e.serviceRoute)?e.serviceRoute.map(s=>s.toLowerCase()+"=true").join("&"):e.serviceRoute:"",o;try{return o=await globalThis.fetch(n+"/?"+r,{method:"GET",headers:{"Content-Type":"application/json","X-AppKey":t,"X-Metadata":e.metadata}}),await o.json()}catch(s){if(P(e.onError))return e.onError(s);console.error(s)}},g3=async(t,e)=>{let{editor:n}=e;if(n&&n.remote){let r=await IR(t,n),o=rx||e.isDevelopment?ce(r):ce(r.releases[0]);n.serviceRoute?D(n.serviceRoute)?n.serviceRoute.forEach(s=>{ee(e[s],o[s.toLowerCase()])}):ee(e[n.serviceRoute],o):["state","designSystem","components","snippets","pages","utils","files","assets","packages","functions","globalScope"].forEach(s=>{ee(e[s],o[s.toLowerCase()])})}return e},m3=async(t,e,n)=>{let{editor:r}=e;if(r&&r.remote){let o=await IR(t,r),s=rx||e.isDevelopment?ce(o):ce(o.releases[0]);n(s)}},$R=async(t,e)=>{if(t&&e.editor)try{e.editor.async||await g3(t,e)}catch(n){console.error(n)}},MR=(t,e,n,r)=>{if(e&&n.editor)try{n.editor.async&&m3(e,n,r||(o=>{let s=o.designSystem;A(s)&&n.utils.init(s),A(o.state)&&t.state.set(o.state)}))}catch(o){console.error(o)}};var Kl=t=>{if(!t||t.__destroyed)return!1;let e=t.context;if(!e)return t.__destroyed=!0,!1;if(Array.isArray(e.__teardowns)){for(let n of e.__teardowns)try{n()}catch(r){console.error("[smbls] destroy teardown error:",r)}e.__teardowns.length=0}try{zn(t)}catch(n){console.error("[smbls] dispose error:",n)}if(e.fetch&&e.fetch.__resolved&&delete e.fetch.__resolved,e.fetch&&e.fetch.__resolving&&delete e.fetch.__resolving,e.db&&e.db.__resolved&&delete e.db.__resolved,e.db&&e.db.__resolving&&delete e.db.__resolving,e.analyze?.destroy)try{e.analyze.destroy()}catch(n){console.error("[analyze] destroy error:",n)}return t.__destroyed=!0,!0};var mx={};F(mx,{Helmet:()=>tP,applyMetadata:()=>hx,default:()=>$3,extractMetadata:()=>_3,generateHeadHtml:()=>I3,helmetPlugin:()=>gx,resolveMetadata:()=>Li});I();Kt();var qe={title:{tag:"title"},description:{tag:"meta",attr:"name",key:"description"},keywords:{tag:"meta",attr:"name",key:"keywords"},robots:{tag:"meta",attr:"name",key:"robots"},author:{tag:"meta",attr:"name",key:"author"},canonical:{tag:"link",attr:"rel",key:"canonical",valueAttr:"href"},image:{tag:"meta",attr:"property",key:"og:image"},url:{tag:"meta",attr:"property",key:"og:url"},siteName:{tag:"meta",attr:"property",key:"og:site_name"},type:{tag:"meta",attr:"property",key:"og:type"},locale:{tag:"meta",attr:"property",key:"og:locale"},"og:title":{tag:"meta",attr:"property",key:"og:title"},"og:description":{tag:"meta",attr:"property",key:"og:description"},"og:image":{tag:"meta",attr:"property",key:"og:image"},"og:url":{tag:"meta",attr:"property",key:"og:url"},"og:type":{tag:"meta",attr:"property",key:"og:type"},"og:site_name":{tag:"meta",attr:"property",key:"og:site_name"},"og:locale":{tag:"meta",attr:"property",key:"og:locale"},"twitter:card":{tag:"meta",attr:"name",key:"twitter:card"},"twitter:title":{tag:"meta",attr:"name",key:"twitter:title"},"twitter:description":{tag:"meta",attr:"name",key:"twitter:description"},"twitter:image":{tag:"meta",attr:"name",key:"twitter:image"},"twitter:site":{tag:"meta",attr:"name",key:"twitter:site"},"theme-color":{tag:"meta",attr:"name",key:"theme-color"}},Yn=t=>{if(t.tag==="link")return`link[${t.attr}="${t.key}"]`;if(t.tag&&!t.attr&&!t.key)return t.tag;if(t.tag&&t.attr&&t.key)return`${t.tag}[${t.attr}="${t.key}"]`},NR=t=>ce({v:t}).v,FR=(t,e,n,r)=>{try{return pt(t,e,n)}catch(o){console.warn(`[helmet] metadata factory for "${r}" threw; treating as unset:`,o&&o.message||o);return}},ix=Object.freeze({authored:!0}),Li=(t,e,n,r)=>{if(!t)return{};let o=t;v(o)&&Jt(o)&&(o=NR(o));let s=P(o),i=!s&&r?.authored===!0,a=s?FR(o,e,n,"metadata"):A(o)?{...o}:{};if(!A(a))return{};for(let c in a){let l=a[c],f=i&&v(l)&&!Jt(l);v(l)&&Jt(l)&&(l=NR(l)),P(l)?l=FR(l,e,n,c):v(l)&&Jt(l)&&(l=void 0),v(l)&&l.includes("{{")&&e?.call&&(l=f?e.call("replaceLiteralsWithObjectFields",l,n,ix):e.call("replaceLiteralsWithObjectFields",l,n)),a[c]=l}return a},y3=t=>!!t&&typeof t=="object"&&(t.notFound===!0||t.metadata?.notFound===!0),b3=(t,e)=>{if(Object.prototype.hasOwnProperty.call(t,e))return t[e];if(t["/*"])return t["/*"];if(t["*"])return t["*"];for(let n in t)if(y3(t[n]))return t[n]},_3=(t,e="/",n,r)=>{let o=t.pages||{},s=b3(o,e),i={};if(t.integrations?.seo&&(i={...t.integrations.seo}),t.app?.metadata){let l=Li(t.app.metadata,n,r,ix);i={...i,...l}}let a=new Set;if(s){let l=s.metadata||s.helmet||{},f=Li(l,n,r,ix);for(let u in f)a.add(u);i={...i,...f},!i.title&&s.state?.title&&(i.title=s.state.title,a.add("title")),!i.description&&s.state?.description&&(i.description=s.state.description,a.add("description"))}i.title||(i.title=t.name||"Symbols"),i.title&&(a.has("title")||!i["og:title"])&&(a.has("og:title")||(i["og:title"]=i.title)),i.description&&(a.has("description")||!i["og:description"])&&(a.has("og:description")||(i["og:description"]=i.description)),i.title&&!i["twitter:title"]&&(i["twitter:title"]=i.title),i.description&&!i["twitter:description"]&&(i["twitter:description"]=i.description);let c=a.has("og:url")?i["og:url"]:a.has("url")?i.url:void 0;if(c)i["og:url"]=c;else if(i["og:url"]||i.url){let l=(i["og:url"]||i.url||"").replace(/\/$/,"");if(l&&e&&e!=="/"){let f=e.startsWith("/")?e:"/"+e;i["og:url"]=l+f}}return ao(i,t.files)},VR=(t,e)=>ao(Li(t,e,e.state),e.context?.files),zR=t=>Object.prototype.hasOwnProperty.call(qe,t),Mp=new Map;for(let t in qe){let e=Yn(qe[t]);Mp.has(e)||Mp.set(e,qe[t])}var Np=t=>t.head||t.querySelector("head"),ux=(t,e)=>{let n=Np(t);return n?n.querySelector(e):null},ax=(t,e)=>e.tag==="title"?t.textContent:t.getAttribute(e.valueAttr||"content"),dx=(t,e,n)=>{e.tag==="title"?t.textContent=n:t.setAttribute(e.valueAttr||"content",n)},px=(t,e)=>{let n=Np(e);if(!n)return null;let r=e.createElement(t.tag);return t.attr&&r.setAttribute(t.attr,t.key),n.appendChild(r),r},Pi=t=>{let e=5381,n=String(t);for(let r=0;r<n.length;r++)e=(e*33^n.charCodeAt(r))>>>0;return e.toString(36)},Di=(t,e,n,r)=>{let o=t.head||t.querySelector("head");if(!o)return;let s=new Map;for(let a of o.querySelectorAll(`[${e}]`))s.set(a.getAttribute(e),a);let i=new Set;for(let a of n)i.add(a);for(let[a,c]of s)i.has(a)||c.remove();for(let a of n){if(s.has(a))continue;let c=r(a);c&&(c.setAttribute(e,a),o.appendChild(c))}},HR=(t,e)=>{let r=(e||[]).filter(s=>s!=null).map(s=>v(s)?s:JSON.stringify(s)),o=r.map(Pi);Di(t,"data-smbls-jsonld",o,s=>{let i=o.indexOf(s),a=t.createElement("script");return a.setAttribute("type","application/ld+json"),a.textContent=r[i],a})},WR=(t,e)=>{let n=(e||[]).filter(o=>o!=null&&String(o).trim()),r=n.map(Pi);Di(t,"data-smbls-style",r,o=>{let s=r.indexOf(o),i=t.createElement("style");return i.textContent=String(n[s]),i})},qR=t=>(t||[]).filter(e=>e&&(v(e)?e.trim():e.src)),KR=t=>v(t)?t:String(t.src),GR=(t,e)=>{let n=t.createElement("script");return v(e)?n.setAttribute("src",e):(e.src&&n.setAttribute("src",e.src),e.type&&n.setAttribute("type",e.type),e.async&&(n.async=!0),e.defer&&(n.defer=!0),e.integrity&&n.setAttribute("integrity",e.integrity),e.crossorigin&&n.setAttribute("crossorigin",e.crossorigin),e.referrerpolicy&&n.setAttribute("referrerpolicy",e.referrerpolicy),e.nomodule&&(n.noModule=!0),e.body&&(n.textContent=String(e.body))),n},w3=(t,e)=>{let n=qR(e),r=n.map(KR);Di(t,"data-smbls-script",r,o=>GR(t,n[r.indexOf(o)]))},YR=t=>`${t.hreflang||""}|${t.href||""}`,cx=t=>A(t)?Pi(JSON.stringify(t)):String(t),XR=(t,e)=>{let n=(e||[]).filter(o=>A(o)),r=n.map(YR);Di(t,"data-smbls-alternate",r,o=>{let s=r.indexOf(o),i=t.createElement("link");i.setAttribute("rel","alternate");for(let[a,c]of Object.entries(n[s]))i.setAttribute(a,c);return i})},ZR=(t,e)=>{let n=(e||[]).filter(o=>o!=null),r=n.map(cx);Di(t,"data-smbls-favicon",r,o=>{let s=r.indexOf(o),i=n[s],a=t.createElement("link");if(a.setAttribute("rel","icon"),A(i))for(let[c,l]of Object.entries(i))a.setAttribute(c,l);else a.setAttribute("href",String(i));return a})},QR=(t,e)=>{let n=e?String(e):"",r=n.endsWith(".svg")?"image/svg+xml":n.endsWith(".png")?"image/png":"";Di(t,"data-smbls-single-icon",n?[n]:[],o=>{let s=t.createElement("link");return s.setAttribute("rel","icon"),s.setAttribute("href",o),r&&s.setAttribute("type",r),s})},hx=(t,e)=>{if(!(!A(t)||!e)){for(let n in t){let r=t[n];if(r==null||!zR(n))continue;let o=qe[n],s=ux(e,Yn(o))||px(o,e);s&&dx(s,o,r)}Array.isArray(t.jsonLd)&&HR(e,t.jsonLd),Array.isArray(t.styles)&&WR(e,t.styles),Array.isArray(t.scripts)&&w3(e,t.scripts),Array.isArray(t.alternate)&&XR(e,t.alternate),Array.isArray(t.favicons)&&ZR(e,t.favicons),(t.icon||t.favicon)&&QR(e,t.icon||t.favicon)}},jR=new WeakMap,lx=new WeakMap,JR=t=>{let e=t.location;return e&&v(e.pathname)?e.pathname:null},S3=t=>{let e=jR.get(t);return e||(e={doc:t,layers:[],servedPath:JR(t),originals:new Map,owned:new Set,lists:new Set},jR.set(t,e)),e},x3=(t,e)=>{for(let n=e.parent;n&&n!==n.parent;n=n.parent)if(n===t)return!0;return!1},k3=(t,e)=>{let n=lx.get(t);if(n)return n;let r=S3(e),o={element:t,values:null,disposed:!1,set(i){o.disposed||(o.values=i,UR(r))},dispose(){if(o.disposed)return;o.disposed=!0;let i=r.layers.indexOf(o);i!==-1&&r.layers.splice(i,1);try{UR(r)}catch(a){console.warn("[helmet] could not re-render the head after an element left:",a&&a.message||a)}}},s=r.layers.length;for(let i=0;i<r.layers.length;i++)if(x3(t,r.layers[i].element)){s=i;break}return r.layers.splice(s,0,o),lx.set(t,o),o},fx=(t,e,n,r)=>{let o=k3(t,e),s=K(()=>{let a=n();o.set(a),r&&r(a)}),i=t.__ref?.__effects;i&&i.push(s,o)},v3=Yn(qe.title),E3=Yn(qe.description),A3=Yn(qe["og:title"]),C3=Yn(qe["og:description"]),T3=Yn(qe["twitter:title"]),O3=Yn(qe["twitter:description"]),BR=(t,e,n,r)=>{let o=t.get(e);if(!o||!o.value)return;let s=t.get(n);(!s||!s.value||s.rank<o.rank)&&t.set(n,o);let i=t.get(r);(!i||!i.value)&&t.set(r,o)},ox={jsonLd:HR,styles:WR,alternate:XR,favicons:ZR,icon:QR},R3=t=>{let e=new Map,n={},r=[];for(let o=0;o<t.length;o++){let s=t[o].values;if(!A(s))continue;for(let a in s){let c=s[a];c==null||!zR(a)||e.set(Yn(qe[a]),{value:String(c),rank:o})}for(let a of["jsonLd","styles","alternate","favicons"])Array.isArray(s[a])&&(n[a]=s[a]);let i=s.icon||s.favicon;i&&(n.icon=i),Array.isArray(s.scripts)&&r.push(...s.scripts)}return BR(e,v3,A3,T3),BR(e,E3,C3,O3),{tags:e,lists:n,scripts:r}},P3=(t,e,n)=>{let{doc:r,originals:o}=t,s=Mp.get(e),i=ux(r,e),a=o.get(e);a||(a={value:i?ax(i,s):null,rendered:!1},o.set(e,a)),a.value===n&&(a.rendered=!0),i||(i=px(s,r)),i&&(ax(i,s)!==n&&dx(i,s,n),t.owned.add(e))},L3=(t,e)=>{let{doc:n}=t;t.owned.delete(e);let r=Mp.get(e),o=ux(n,e),s=t.originals.get(e);if(s&&s.value!==null&&!s.rendered&&JR(n)===t.servedPath){let a=o||px(r,n);a&&ax(a,r)!==s.value&&dx(a,r,s.value)}else o&&o.remove()},D3=(t,e)=>{let n=qR(e);if(!n.length)return;let r=Np(t),o=new Set;for(let s of r.querySelectorAll("[data-smbls-script]"))o.add(s.getAttribute("data-smbls-script"));for(let s of n){let i=KR(s);if(o.has(i))continue;let a=GR(t,s);a.setAttribute("data-smbls-script",i),r.appendChild(a),o.add(i)}},UR=t=>{let{doc:e}=t;if(!Np(e))return;let{tags:n,lists:r,scripts:o}=R3(t.layers);for(let s of[...t.owned])n.has(s)||L3(t,s);for(let[s,{value:i}]of n)P3(t,s,i);for(let s in ox)r[s]!==void 0?(ox[s](e,r[s]),t.lists.add(s)):t.lists.delete(s)&&ox[s](e,null);D3(e,o)},lt=t=>{if(t==null)return"";let e={"&":"&","<":"<",">":">",'"':""","'":"'"};return t.toString().replace(/[&<>"']/g,n=>e[n])},I3=t=>{let e=['<meta charset="UTF-8">'],n=new Set(["charset","jsonLd","styles","scripts"]),r=!1;for(let[o,s]of Object.entries(t)){if(!s&&s!==0&&s!==!1||n.has(o)||typeof s=="function")continue;if(o==="title"){e.push(`<title>${lt(s)}</title>`);continue}if(o==="viewport"){r||(e.push(`<meta name="viewport" content="${lt(s)}">`),r=!0);continue}if(o==="canonical"){e.push(`<link rel="canonical" href="${lt(s)}">`);continue}if(o==="icon"||o==="favicon"){let f=lt(s),u=f.endsWith(".svg")?' type="image/svg+xml"':f.endsWith(".png")?' type="image/png"':"";e.push(`<link rel="icon" href="${f}"${u} data-smbls-single-icon="${f}">`);continue}if(o==="favicons"&&Array.isArray(s)){s.forEach(f=>{if(A(f)){let u=Object.entries(f).map(([d,p])=>`${d}="${lt(p)}"`).join(" ");e.push(`<link rel="icon" ${u} data-smbls-favicon="${lt(cx(f))}">`)}else typeof f=="string"&&e.push(`<link rel="icon" href="${lt(f)}" data-smbls-favicon="${lt(cx(f))}">`)});continue}if(o==="alternate"&&Array.isArray(s)){s.forEach(f=>{if(A(f)){let u=Object.entries(f).map(([d,p])=>`${d}="${lt(p)}"`).join(" ");e.push(`<link rel="alternate" ${u} data-smbls-alternate="${lt(YR(f))}">`)}});continue}let i=["og:","article:","product:","fb:","profile:","book:","business:","music:","video:"],a=["twitter:","DC:","DCTERMS:"],c=i.some(f=>o.startsWith(f)),l=a.some(f=>o.startsWith(f));if(o.startsWith("http-equiv:")){let f=o.replace("http-equiv:","");e.push(`<meta http-equiv="${lt(f)}" content="${lt(s)}">`)}else if(o.startsWith("itemprop:")){let f=o.replace("itemprop:","");e.push(`<meta itemprop="${lt(f)}" content="${lt(s)}">`)}else c?Array.isArray(s)?s.forEach(f=>e.push(`<meta property="${lt(o)}" content="${lt(f)}">`)):e.push(`<meta property="${lt(o)}" content="${lt(s)}">`):l?e.push(`<meta name="${lt(o)}" content="${lt(s)}">`):Array.isArray(s)?s.forEach(f=>e.push(`<meta name="${lt(o)}" content="${lt(f)}">`)):(typeof s=="string"||typeof s=="number"||typeof s=="boolean")&&e.push(`<meta name="${lt(o)}" content="${lt(s)}">`)}if(r||e.splice(1,0,'<meta name="viewport" content="width=device-width, initial-scale=1">'),Array.isArray(t.jsonLd))for(let o of t.jsonLd){if(o==null)continue;let s=typeof o=="string"?o:JSON.stringify(o),i=String(s).replace(/<\/script/gi,"<\\/script");e.push(`<script type="application/ld+json" data-smbls-jsonld="${Pi(s)}">${i}<\/script>`)}if(Array.isArray(t.styles))for(let o of t.styles){if(o==null||!String(o).trim())continue;let s=String(o).replace(/<\/style/gi,"<\\/style");e.push(`<style data-smbls-style="${Pi(s)}">${s}</style>`)}if(Array.isArray(t.scripts))for(let o of t.scripts){if(!o)continue;let s=typeof o=="string",i=s?o:o.src;if(!i&&!(o&&o.body))continue;let a=[];i&&a.push(`src="${lt(i)}"`),s||(o.type&&a.push(`type="${lt(o.type)}"`),o.async&&a.push("async"),o.defer&&a.push("defer"),o.integrity&&a.push(`integrity="${lt(o.integrity)}"`),o.crossorigin&&a.push(`crossorigin="${lt(o.crossorigin)}"`),o.referrerpolicy&&a.push(`referrerpolicy="${lt(o.referrerpolicy)}"`),o.nomodule&&a.push("nomodule"));let c=` data-smbls-script="${lt(i||Pi(o.body||""))}"`;if(!s&&o.body){let l=String(o.body).replace(/<\/script/gi,"<\\/script");e.push(`<script ${a.join(" ")}${c}>${l}<\/script>`)}else e.push(`<script ${a.join(" ")}${c}><\/script>`)}return e.join(`
|
|
93
|
+
`)},tP={define:{metadata:(t,e,n)=>{let r=e.context?.document||typeof document<"u"&&document;r&&fx(e,r,()=>VR(t,e),o=>{let s=e.state?.root;A(s)&&(s.$helmet=o)})}}},sx=t=>{let e=t.metadata;return e?VR(e,t):null},gx={name:"helmet",create(t){if(!t.metadata)return;let e=t.context?.document||typeof document<"u"&&document;e&&fx(t,e,()=>sx(t))},update(t){let e=lx.get(t);if(e){e.disposed||e.set(sx(t));return}if(!t.metadata)return;let n=t.context?.document||typeof document<"u"&&document;n&&fx(t,n,()=>sx(t))}},$3=tP;nc();var eP=(t,e,n,r)=>{t&&ec(t,e,n,r)},nP=(t,e,n)=>{if(!t)return;let r=e.context?.document||typeof document<"u"&&document;if(!r)return;let o=Li(t,e,n);hx(o,r)},rP=async(t,e)=>{if(!t)return;let n={tag:"fragment",...t},r=async()=>{await e.set(n,{preventDefineUpdate:"$router"})};return e.lazyLoad?window.requestAnimationFrame(r):await r(),n},Ii={routes:t=>t,metadata:nP,fetch:eP,$router:rP},oP=(t={})=>{let e={routes:n=>n};return t.metadata!==!1&&(e.metadata=nP),t.fetch!==!1&&(e.fetch=eP),t.router!==!1&&(e.$router=rP),e};var yx={useReset:!0,useVariable:!0,useIconSprite:!0,useSvgSprite:!0,useDocumentTheme:!0,useDefaultIcons:!0,useFontImport:!0,useDefaultConfig:!0},Fp={initRouter:!0,popState:!0,injectRouterInLinkComponent:!0},jp={...yx,router:Fp},M3={state:{},pages:{},components:{},router:Fp,define:Ii},Ir=M3;I();I();var sP=(t,e)=>q(t.extends)?t.extends:[];Kt();I();var bx={};F(bx,{default:()=>K3,getActiveLang:()=>$r,getLanguages:()=>Xl,getLocalStateLang:()=>ef,getPendingLang:()=>Yl,initPolyglot:()=>Up,loadTranslations:()=>Ql,polyglotPlugin:()=>Mi,setLang:()=>Jl,translate:()=>Zl,upsertTranslation:()=>tf});I();Kt();var fP="smbls_lang",N3="smbls_t_",F3="smbls_tv_",$i={get(t){try{return window?.localStorage.getItem(t)}catch{return null}},set(t,e){try{window?.localStorage.setItem(t,e)}catch(n){console.warn("[polyglot] localStorage unavailable:",n.message)}},remove(t){try{window?.localStorage.removeItem(t)}catch(e){console.warn("[polyglot] localStorage unavailable:",e.message)}}},Gl={},iP=new WeakMap,uP=(t,e)=>t&&typeof t=="object"?t:e&&typeof e=="object"?e:null,dP=t=>{let e=iP.get(t);return e||(e={seq:0,pending:zr(null),wake:null},iP.set(t,e)),e},aP=(t,e,n)=>new Promise(r=>{let o=null,s=()=>{o!==null&&clearTimeout(o),o=null,t.wake===s&&(t.wake=null),r()};t.wake=s,Promise.resolve(e).then(s,s),n>0&&(o=setTimeout(s,n))}),cP=(t,e)=>!!(t?.translations&&t.translations[e]),j3=3e3,B3=2147483647,U3=t=>{let e=t?.fontWait;return e===!1?0:typeof e=="number"?e>0?Math.min(e,B3):0:j3},V3=new RegExp("\\p{L}","gu"),z3=(...t)=>{let e=new Set,n=(r,o)=>{if(typeof r=="string"){let s=r.match(V3);if(s)for(let i=0;i<s.length;i++)e.add(s[i])}else if(r&&typeof r=="object"&&o<8)for(let s in r)n(r[s],o+1)};for(let r=0;r<t.length;r++)n(t[r],0);return Array.from(e).join("")},H3=(t,e)=>{let n=t?.fonts;if(!e||!n||!t.body||typeof n.check!="function"||typeof n.load!="function")return null;try{let o=(t.defaultView||globalThis).getComputedStyle(t.body).fontFamily;if(!o)return null;let s="1em "+o;return n.check(s,e)?null:Promise.resolve(n.load(s,e)).then(()=>{},()=>{})}catch{return null}};function $r(){let t=this?.context,e=t?.polyglot;return(this?.state?.root||t?.state?.root)?.lang||t?.state?.lang||e?.defaultLang||"en"}function Yl(){let t=this?.context,e=uP(t,this?.state?.root||t?.state?.root);return e?dP(e).pending.get():null}function Xl(){let t=this?.context?.polyglot;return t?t.languages?t.languages:t.translations?Object.keys(t.translations):[]:[]}var Bp=(t,e)=>{if(!t||!e)return;if(t[e]!==void 0)return t[e];if(e.indexOf(".")===-1)return;let n=e.split("."),r=t;for(let o=0;o<n.length;o++){if(r==null)return;r=r[n[o]]}return r},lP=(t,e,n)=>{let r=e.lastIndexOf(".");if(r===-1)return t[e+"_"+n];let o=Bp(t,e.substring(0,r));if(o!=null)return o[e.substring(r+1)+"_"+n]};function Zl(t,e){if(!t)return"";let n=this?.context,r=n?.polyglot,o=e||this.call("getActiveLang"),s=this?.state;if(s){let l=lP(s,t,o);if(l!==void 0)return l}if(r?.translations){let l=r.translations[o];if(l){let f=Bp(l,t);if(f!==void 0)return f}}let a=(s?.root||n?.state?.root)?.translations;if(a){let l=a[o];if(l){let f=Bp(l,t);if(f!==void 0)return f}}let c=r?.defaultLang||"en";if(s){let l=lP(s,t,c);if(l!==void 0)return l}if(r?.translations){let l=r.translations[c];if(l){let f=Bp(l,t);if(f!==void 0)return f}}return t}async function Ql(t){let e=this?.context,n=e?.polyglot,r=this?.state?.root||e?.state?.root;if(!n||!r)return;let o=n.storagePrefix||N3,s=n.storageVersionPrefix||(n.storagePrefix?n.storagePrefix.replace(/_$/,"v_"):F3);if(n.translations&&n.translations[t]&&!n.fetch||!n.fetch||n._fetchFailed?.[t])return;if(!r.translations?.[t]){let c=$i.get(o+t);if(c)try{let l=JSON.parse(c),f={translations:{...r.translations||{}}};f.translations[t]=l,r.update&&r.update(f)}catch(l){console.warn("[polyglot] Failed to apply language update:",l.message)}}let i=(n.storagePrefix||"smbls")+":"+t;if(Gl[i])return Gl[i];let a=this;return Gl[i]=(async()=>{try{let c=n.fetch,l=parseInt($i.get(s+t),10)||0,f,u,d;if(P(c)){let g=await c(t,l,a);if(!g||g.changed===!1)return;f=g.translations||g.data||g,u=g.version||0,d=!0}else if(A(c)){let g=a.getDB||(()=>e.fetch),h=P(g)?await g.call(a):e.fetch;if(!h)return;let m=c.rpc||c.from||"get_translations_if_changed",y={p_lang:t,p_cached_version:l,...c.params||{}},w=await h.rpc({from:m,params:y});if(w.error)throw n._fetchFailed||(n._fetchFailed={}),n._fetchFailed[t]=!0,w.error;let b=w.data;if(!b||!b.changed)return;f=b.translations||{},u=b.version||0,d=!0}else return;if(!d||!f)return;$i.set(o+t,JSON.stringify(f)),u&&$i.set(s+t,String(u));let p={translations:{...r.translations||{}}};p.translations[t]=f,r.update&&r.update(p)}catch(c){if(n.verbose!==!1){let l=c?.message||c?.details||(typeof c=="object"?JSON.stringify(c):String(c));console.warn("[polyglot] Failed to load translations for",t,"-",l)}}finally{delete Gl[i]}})(),Gl[i]}var W3=(t,e,n)=>{let r=t.__ref;if(!r||r.contentManaged||n==null||typeof n=="object")return;let o=r.__textNode;if(!o||o.parentNode!==e)return;let s=String(n);o.nodeValue!==s&&(o.nodeValue=s)};async function Jl(t,e){let n=this?.context,r=n?.polyglot,o=this?.state?.root||n?.state?.root,s=n?.document||globalThis.document;if(!o)return;if(e?.persist!==!1){let l=r?.storageLangKey||fP;$i.set(l,t)}let i=dP(uP(n,o)),a=++i.seq;i.wake&&i.wake();let c=()=>i.seq===a;if(this.call("getActiveLang")===t){i.pending.set(null),s?.documentElement&&(s.documentElement.lang=t);return}try{if(r?.fetch){let f=this.call("loadTranslations",t);if(!cP(o,t)){i.pending.set(t);let u=null;if(await aP(i,Promise.resolve(f).then(null,d=>{u=d}),0),!c())return;if(u)throw u;if(!cP(o,t)&&!r.translations?.[t])return}}let l=U3(r);if(l>0&&s?.fonts&&s.documentElement?.lang!==t){let f=H3(s,z3(r?.translations?.[t],o.translations?.[t]));if(f&&(i.pending.set(t),await aP(i,f,l),!c()))return}i.pending.set(null),q3(n,r,o,s,t)}finally{c()&&i.pending.set(null)}}function q3(t,e,n,r,o){t?.state&&(t.state.lang=o);let s=e?.translations?.[o],i={lang:o},a=c=>Wa(t,c,n);if(s&&typeof s=="object")for(let c in s){if(!a(c))continue;let l=s[c];(Array.isArray(l)||typeof l=="string"||typeof l=="number")&&(i[c]=l)}n.update&&n.update(i);for(let c in i)c!=="lang"&&mn(t,c,i[c]);if(s&&typeof s=="object")for(let c in s){if(!a(c))continue;let l=s[c];if(l&&typeof l=="object"&&!Array.isArray(l)&&n[c]&&typeof n[c]=="object"&&!Array.isArray(n[c])){for(let f in l)n[c][f]=l[f];mn(t,c,n[c])}}if(r&&s){let c=r.querySelectorAll("[data-key]");for(let l of c){let f=l.ref;if(!f)continue;let u=f.__ref?.__exec?.text;if(typeof u=="string"&&u.includes("{{"))try{W3(f,l,f.call("replaceLiteralsWithObjectFields",u,f.state))}catch{}}}r?.documentElement&&(r.documentElement.lang=o)}async function tf(t,e,n){let r=this?.context,o=r?.polyglot,s=this?.state?.root||r?.state?.root;if(s?.translations?.[e]&&(s.translations[e][t]=n),o?.translations?.[e]&&(o.translations[e][t]=n),o?.fetch&&A(o.fetch)){let i=this.getDB||(()=>r.fetch),a=P(i)?await i.call(this):r.fetch;if(!a)return;let c=o.fetch.table||"translations",l=await a.upsert({from:c,data:{key:t,lang:e,text:n}});if(l?.error)throw l.error;return l.data}}async function Up(){let t=this?.context,e=t?.polyglot;if(!e)return;let n=this?.state?.root||t?.state?.root;if(!n)return;let r=e.storageLangKey||fP,s=$i.get(r)||$r.call(this),i=t?.document||globalThis.document;i?.documentElement&&(i.documentElement.lang=s),n.update&&n.lang!==s&&n.update({lang:s}),e.fetch&&!(e.translations&&e.translations[s])&&await this.call("loadTranslations",s)}function ef(t){try{let e=$r.call(this),n=this?.state;if(!n)return"";let r=t.lastIndexOf(".");if(r===-1)return n[t+e]??"";let o=t.substring(0,r).split("."),s=n;for(let i=0;i<o.length;i++){if(s==null)return"";s=s[o[i]]}return s==null?"":s[t.substring(r+1)+e]??""}catch{return""}}var Mi={name:"polyglot",render(t){t.parent&&t.parent.parent||t.__polyglotInitialized||(t.__polyglotInitialized=!0,Up.call(t))}},K3=Mi;nc();var wx={};F(wx,{SYSTEM_METRICS:()=>nf,capsizeHandler:()=>_x,capsizePlugin:()=>zp,computeCapsize:()=>pP,default:()=>G3,resolveFontSizePx:()=>hP,resolveMetrics:()=>gP});var nf={arial:{capHeight:716,ascent:1854,descent:-434,lineGap:67,unitsPerEm:2048},helvetica:{capHeight:714,ascent:770,descent:-230,lineGap:0,unitsPerEm:1e3},"helvetica neue":{capHeight:714,ascent:952,descent:-213,lineGap:28,unitsPerEm:1e3},georgia:{capHeight:1419,ascent:1878,descent:-449,lineGap:0,unitsPerEm:2048},"times new roman":{capHeight:1356,ascent:1825,descent:-443,lineGap:87,unitsPerEm:2048},"courier new":{capHeight:1170,ascent:1705,descent:-615,lineGap:0,unitsPerEm:2048},verdana:{capHeight:1489,ascent:2059,descent:-430,lineGap:0,unitsPerEm:2048},roboto:{capHeight:1456,ascent:1900,descent:-500,lineGap:0,unitsPerEm:2048},"open sans":{capHeight:1462,ascent:2189,descent:-600,lineGap:0,unitsPerEm:2048},inter:{capHeight:1490,ascent:2048,descent:-512,lineGap:0,unitsPerEm:2048},lato:{capHeight:1434,ascent:1974,descent:-426,lineGap:0,unitsPerEm:2e3},"source sans":{capHeight:660,ascent:984,descent:-273,lineGap:0,unitsPerEm:1e3},"source sans pro":{capHeight:660,ascent:984,descent:-273,lineGap:0,unitsPerEm:1e3},"source sans 3":{capHeight:660,ascent:984,descent:-273,lineGap:0,unitsPerEm:1e3},montserrat:{capHeight:700,ascent:968,descent:-251,lineGap:0,unitsPerEm:1e3},poppins:{capHeight:700,ascent:1050,descent:-350,lineGap:100,unitsPerEm:1e3},raleway:{capHeight:710,ascent:1e3,descent:-250,lineGap:0,unitsPerEm:1e3},"dm sans":{capHeight:700,ascent:992,descent:-312,lineGap:0,unitsPerEm:1e3},nunito:{capHeight:705,ascent:1011,descent:-353,lineGap:0,unitsPerEm:1e3},"work sans":{capHeight:684,ascent:930,descent:-243,lineGap:0,unitsPerEm:1e3},manrope:{capHeight:708,ascent:980,descent:-300,lineGap:0,unitsPerEm:1e3},"ibm plex sans":{capHeight:698,ascent:1025,descent:-275,lineGap:0,unitsPerEm:1e3},"plus jakarta sans":{capHeight:720,ascent:1060,descent:-300,lineGap:0,unitsPerEm:1e3}},Vp=t=>parseFloat(t.toFixed(4)),pP=(t,e,n)=>{let{ascent:r,descent:o,lineGap:s,unitsPerEm:i,capHeight:a}=e,c=Math.abs(o),l=r+c+s,f=n!==void 0?n:l/i*t,u=f/t,d=l/i,p=(r-a+s/2)/i-(u-d)/2,g=(c+s/2)/i-(u-d)/2;return{fontSize:`${Vp(t/16)}rem`,lineHeight:`${Vp(f)}px`,capHeightTrim:`${Vp(-p)}em`,baselineTrim:`${Vp(-g)}em`}},hP=(t,e)=>{if(typeof t=="number")return t;let n=e?.designSystem;if(!n)return null;let{typography:r}=n;if(r?.sequence){let s=String(t).toUpperCase(),i=r.sequence[s];if(i)return i.decimal||i.val}let o=parseFloat(t);return isNaN(o)?null:typeof t=="string"&&t.endsWith("rem")?o*(n.typography?.browserDefault||16):o},gP=(t,e)=>{let r=e?.designSystem?.font_family||{};if(t){let s=r[t];if(s?.metrics)return s.metrics;let i=String(t).toLowerCase().replace(/['"]/g,"").trim();if(nf[i])return nf[i]}let o=r.default||Object.keys(r)[0];if(o){let s=r[o];if(s?.metrics)return s.metrics;if(s?.value&&Array.isArray(s.value))for(let i of s.value){let a=i.toLowerCase().replace(/['"]/g,"").trim();if(nf[a])return nf[a]}}return null},_x=(t,e,n,r)=>{if(!t)return;let o=hP(e.fontSize,r);if(!o)return;let s=gP(e.fontFamily,r);if(!s)return;let i=e.lineHeight?parseFloat(e.lineHeight):void 0,{lineHeight:a,capHeightTrim:c,baselineTrim:l}=pP(o,s,i),f={};return e.lineHeight||(f.lineHeight=a),f["::before"]={content:'""',marginBottom:c,display:"table"},f["::after"]={content:'""',marginTop:l,display:"table"},f},zp={name:"capsize",init(t){t.useCapsize===void 0&&t.fontSize&&(t.useCapsize=!0)}},G3=zp;var Cx={};F(Cx,{PRESERVE_VALUE_KEYS:()=>Yt,SKIP_INLINE_KEYS:()=>Mr,abbrToProp:()=>Gt,decode:()=>wP,encode:()=>yP,expand:()=>Uo,isComponentKey:()=>an,isSelectorKey:()=>cn,parse:()=>Vo,parseFurther:()=>Ho,propToAbbr:()=>Ke,shorten:()=>rf,shorthandPlugin:()=>of,stringify:()=>Bo,stringifyFurther:()=>zo});var Ke={attr:"at",childExtends:"cex",childExtendsRecursive:"cexr",childProps:"cp",children:"ch",childrenAs:"cha",class:"cl",content:"cnt",context:"ctx",data:"dt",extends:"ext",hide:"hd",html:"htm",if:"if",ignoreChildExtends:"icex",key:"ky",query:"qy",routes:"rt",scope:"scp",show:"shw",state:"st",style:"sy",tag:"tg",text:"tx",align:"aln",boxSize:"bsz",flow:"fl",heightRange:"hr",horizontalInset:"hi",round:"rnd",shadow:"shd",size:"sz",templateColumns:"tcol",verticalInset:"vi",widthRange:"wr",wrap:"wrp",aspectRatio:"ar",blockSize:"bks",boxSizing:"bxs",height:"h",inlineSize:"ins",margin:"m",marginBottom:"mb",marginLeft:"ml",marginRight:"mr",marginTop:"mt",maxBlockSize:"mxbs",maxHeight:"mxh",maxInlineSize:"mxis",maxWidth:"mxw",minBlockSize:"mnbs",minHeight:"mnh",minInlineSize:"mnis",minWidth:"mnw",padding:"p",paddingBottom:"pb",paddingInline:"pil",paddingLeft:"pl",paddingRight:"pr",paddingTop:"pt",width:"w",alignContent:"ac",alignItems:"ai",alignSelf:"as",flex:"fx",flexBasis:"fxb",flexDirection:"fxd",flexFlow:"fxf",flexGrow:"fxg",flexShrink:"fxs",flexWrap:"fxw",gap:"g",justifyContent:"jc",justifyItems:"ji",justifySelf:"js",order:"od",placeContent:"pcn",placeItems:"pit",placeSelf:"psl",rowGap:"rg",columnGap:"cg",gridArea:"ga",gridAutoColumns:"gac",gridAutoFlow:"gaf",gridAutoRows:"gar",gridColumn:"gc",gridColumnEnd:"gce",gridColumnStart:"gcs",gridRow:"gr",gridRowEnd:"gre",gridRowStart:"grs",gridTemplateAreas:"gta",gridTemplateColumns:"gtc",gridTemplateRows:"gtr",bottom:"bot",float:"flt",inset:"ist",left:"lft",position:"pos",right:"rgt",top:"tp",zIndex:"zi",clear:"clr",contain:"ctn",cursor:"cur",display:"d",opacity:"op",overflow:"ov",overflowX:"ovx",overflowY:"ovy",pointerEvents:"pe",resize:"rsz",userSelect:"us",visibility:"vis",background:"bg",backgroundAttachment:"bga",backgroundBlendMode:"bgbm",backgroundClip:"bgcl",backgroundColor:"bgc",backgroundImage:"bgi",backgroundOrigin:"bgo",backgroundPosition:"bgp",backgroundPositionX:"bgpx",backgroundPositionY:"bgpy",backgroundRepeat:"bgr",backgroundRepeatX:"bgrx",backgroundRepeatY:"bgry",backgroundSize:"bgs",color:"c",theme:"thm",themeModifier:"thmm",border:"bd",borderBottom:"bdb",borderBottomLeftRadius:"bdblr",borderBottomRightRadius:"bdbrr",borderCollapse:"bdcl",borderColor:"bdc",borderImage:"bdi",borderImageOutset:"bdio",borderImageRepeat:"bdir",borderImageSlice:"bdis",borderImageSource:"bdisrc",borderImageWidth:"bdiw",borderLeft:"bdl",borderRadius:"bdr",borderRight:"bdrg",borderSpacing:"bdsp",borderStyle:"bdst",borderTop:"bdt",borderTopLeftRadius:"bdtlr",borderTopRightRadius:"bdtrr",borderWidth:"bdw",outline:"ol",outlineColor:"olc",outlineOffset:"olo",outlineStyle:"ols",outlineWidth:"olw",boxShadow:"bxsh",textShadow:"txsh",direction:"dir",fontDisplay:"fdi",fontFamily:"ff",fontFeatureSettings:"ffs",fontKerning:"fk",fontOpticalSizing:"fos",fontPalette:"fpl",fontSize:"fs",fontSizeAdjust:"fsa",fontSmooth:"fsm",fontStretch:"fsr",fontStyle:"fsy",fontSynthesis:"fsyn",fontVariant:"fv",fontVariationSettings:"fvs",fontWeight:"fw",hyphens:"hyp",letterSpacing:"ls",lineHeight:"lh",tabSize:"tsz",textAlign:"ta",textDecoration:"td",textDecorationColor:"tdc",textDecorationLine:"tdl",textDecorationStyle:"tds",textIndent:"ti",textOverflow:"tov",textStroke:"tsk",textTransform:"tt",unicodeBidi:"ub",verticalAlign:"va",whiteSpace:"ws",wordBreak:"wbr",wordSpacing:"wsp",wordWrap:"wwr",writingMode:"wm",captionSide:"cps",counterIncrement:"ci",counterReset:"cr",emptyCells:"ec",listStyle:"lst",listStyleImage:"lsi",listStylePosition:"lsp",listStyleType:"lsty",quotes:"qt",tableLayout:"tl",columnCount:"cc",columnFill:"cf",columnRule:"crl",columnRuleColor:"crlc",columnRuleStyle:"crls",columnRuleWidth:"crlw",columnSpan:"cspn",columnWidth:"cwi",columns:"col",backdropFilter:"bdf",boxDecorationBreak:"bxdb",clipPath:"cpth",filter:"fil",isolation:"iso",mixBlendMode:"mbm",objectFit:"obf",objectPosition:"obp",perspective:"prs",perspectiveOrigin:"prso",willChange:"wc",transform:"tf",transformOrigin:"tfo",transformStyle:"tfs",transition:"trn",transitionDelay:"trnd",transitionDuration:"trndr",transitionProperty:"trnp",transitionTimingFunction:"trntf",animation:"an",animationDelay:"and",animationDirection:"andr",animationDuration:"andur",animationFillMode:"anfm",animationIterationCount:"anic",animationName:"ann",animationPlayState:"anps",animationTimingFunction:"antf",scrollBehavior:"sb",scrollMargin:"smr",scrollMarginBottom:"smrb",scrollMarginLeft:"smrl",scrollMarginRight:"smrr",scrollMarginTop:"smrt",scrollPadding:"spd",scrollPaddingBottom:"spdb",scrollPaddingLeft:"spdl",scrollPaddingRight:"spdr",scrollPaddingTop:"spdt",scrollSnapAlign:"ssa",scrollSnapStop:"sss",scrollSnapType:"sst",breakAfter:"bka",breakBefore:"bkb",breakInside:"bki",pageBreakAfter:"pbka",pageBreakBefore:"pbkb",pageBreakInside:"pbki",accessKey:"ack",className:"cn",contentEditable:"ced",contextMenu:"cmu",draggable:"drg",hidden:"hid",id:"id",is:"is",lang:"lng",nonce:"nnc",spellCheck:"spc",tabIndex:"tbi",title:"ttl",translate:"trl",accept:"acp",acceptCharset:"accs",action:"act",autoComplete:"atc",autoFocus:"atf",capture:"cap",challenge:"chg",checked:"chk",cols:"cls",colSpan:"csn",controls:"ctl",default:"def",defer:"dfr",disabled:"dis",encType:"ect",form:"frm",formAction:"fac",formEncType:"fect",formMethod:"fme",formNoValidate:"fnv",formTarget:"ftg",high:"hgh",inputMode:"imd",kind:"knd",label:"lbl",list:"lis",loop:"lp",low:"lw",max:"mx",maxLength:"mxl",method:"mtd",min:"mn",minLength:"mnl",multiple:"mul",muted:"mut",name:"nm",open:"opn",optimum:"opt",pattern:"ptn",placeholder:"phd",readOnly:"ro",required:"req",reversed:"rev",rows:"rws",rowSpan:"rsn",selected:"sel",span:"spn",start:"srt",step:"stp",type:"typ",value:"val",download:"dl",href:"hrf",hrefLang:"hrl",ping:"png",referrerPolicy:"rfp",rel:"rl",target:"tgt",allow:"alw",allowFullScreen:"afs",allowPaymentRequest:"apr",alt:"alt",cellPadding:"cpg",cellSpacing:"csg",cite:"cit",coords:"crd",crossOrigin:"cor",dateTime:"dtm",fetchPriority:"fpr",headers:"hds",httpEquiv:"hte",integrity:"itg",isMap:"ism",keyType:"kty",loading:"ldg",manifest:"mft",media:"mda",poster:"pst",preload:"prl",radioGroup:"rdg",sandbox:"sbx",scoped:"scod",seamless:"sml",shape:"shp",sizes:"szs",src:"src",srcDoc:"srd",srcLang:"srl",srcSet:"srs",useMap:"ump",ariaActiveDescendant:"aad",ariaAtomic:"aat",ariaBusy:"abu",ariaChecked:"achk",ariaControls:"acl",ariaCurrent:"acr",ariaDescribedBy:"adb",ariaDetails:"adt",ariaDisabled:"adis",ariaDropEffect:"ade",ariaErrorMessage:"aem",ariaExpanded:"aexp",ariaGrabbed:"agr",ariaHasPopup:"ahp",ariaHidden:"ahid",ariaInvalid:"ainv",ariaLabel:"alb",ariaLabelledBy:"alby",ariaLive:"alv",ariaModal:"amod",ariaMultiSelectable:"ams",ariaOrientation:"aor",ariaOwns:"aow",ariaPosInSet:"apis",ariaPressed:"aprs",ariaReadOnly:"aro",ariaRelevant:"arl",ariaRequired:"areq",ariaSelected:"asel",ariaSetSize:"assz",ariaValueMax:"avmx",ariaValueMin:"avmn",ariaValueNow:"avn",role:"role",onInit:"@in",onRender:"@rn",onUpdate:"@up",onStateChange:"@sc",onStateUpdate:"@su",onClick:"@ck",onContextMenu:"@cm",onDblClick:"@dc",onMouseDown:"@md",onMouseEnter:"@me",onMouseLeave:"@ml",onMouseMove:"@mm",onMouseOut:"@mo",onMouseOver:"@mv",onMouseUp:"@mu",onKeyDown:"@kd",onKeyPress:"@kp",onKeyUp:"@ku",onBlur:"@bl",onFocus:"@fc",onFocusIn:"@fi",onFocusOut:"@fo",onBeforeInput:"@bi",onChange:"@cg",onFormData:"@fd",onInput:"@ip",onInvalid:"@iv",onReset:"@rs",onSearch:"@sr",onSelect:"@sl",onSubmit:"@sm",onTouchCancel:"@tc",onTouchEnd:"@te",onTouchMove:"@tm",onTouchStart:"@ts",onPointerCancel:"@pc",onPointerDown:"@pd",onPointerEnter:"@pe",onPointerLeave:"@ple",onPointerMove:"@pm",onPointerOut:"@po",onPointerOver:"@pov",onPointerUp:"@pu",onDrag:"@dg",onDragEnd:"@dge",onDragEnter:"@dgn",onDragLeave:"@dgl",onDragOver:"@dgo",onDragStart:"@dgs",onDrop:"@dp",onResize:"@rz",onScroll:"@scl",onWheel:"@wh",onCopy:"@cy",onCut:"@ct",onPaste:"@pt",onCompositionEnd:"@cpe",onCompositionStart:"@cps",onCompositionUpdate:"@cpu",onAnimationEnd:"@ae",onAnimationIteration:"@ai",onAnimationStart:"@as",onTransitionEnd:"@tre",onTransitionStart:"@trs",onAbort:"@ab",onCanPlay:"@cap",onCanPlayThrough:"@cpt",onDurationChange:"@duc",onEmptied:"@em",onEncrypted:"@enc",onEnded:"@end",onError:"@er",onLoad:"@ld",onLoadedData:"@ldd",onLoadedMetadata:"@ldm",onPause:"@pa",onPlay:"@pl",onPlaying:"@plg",onProgress:"@prg",onRateChange:"@rc",onSeeked:"@sk",onSeeking:"@skg",onStalled:"@stl",onSuspend:"@ssp",onTimeUpdate:"@tu",onVolumeChange:"@vc",onWaiting:"@wt",icon:"ico",iconText:"ict",lookup:"lkp",router:"rtr",shapeModifier:"shpm"},Gt=Object.create(null);for(let t in Ke)Gt[Ke[t]]=t;var Sx=Object.create(null);for(let t in Ke){let e=Ke[t];if(Sx[e])throw new Error(`Duplicate abbreviation "${e}" for "${t}" \u2014 already used by "${Sx[e]}"`);Sx[e]=t}var Yt=new Set(["state","st","scope","scp","attr","at","style","sy","data","dt","context","ctx","query","qy","class","cl"]),Mr=new Set(["text","tx","html","htm","content","cnt","placeholder","phd","src","href","hrf"]);function an(t){return/^[A-Z]/.test(t)}function cn(t){return/^[:@.!$>&]/.test(t)||t.startsWith("> ")}function yP(t){if(!t||typeof t!="object")return"";let e=[];for(let n in t){let r=t[n];if(typeof r=="function"||r!==null&&typeof r=="object"&&!Array.isArray(r)||r===void 0)continue;let o=Ke[n]||n;if(r===!0)e.push(o);else if(r===!1)e.push("!"+o);else if(Array.isArray(r)){let s=r.map(i=>Hp(i));e.push(o+":"+s.join(","))}else e.push(o+":"+Hp(r))}return e.join(" ")}function Hp(t){return String(t).replace(/ /g,"_")}function rf(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(n){return n!==null&&typeof n=="object"?rf(n):n});let e={};for(let n in t){let r=t[n];if(an(n)){e[n]=xx(r);continue}if(cn(n)){e[n]=xx(r);continue}let o=Ke[n]||n;if(Yt.has(n)||Yt.has(o)){e[o]=r;continue}e[o]=xx(r)}return e}function xx(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?rf(e):e}):typeof t=="object"?rf(t):t}function Bo(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(r){return r!==null&&typeof r=="object"?Bo(r):r});let e={},n=[];for(let r in t){let o=t[r];if(an(r)){e[r]=mP(o);continue}if(cn(r)){e[r]=mP(o);continue}let s=Ke[r]||r;if(Yt.has(r)||Yt.has(s)){e[s]=o;continue}if(typeof o=="function"){e[s]=o;continue}if(o==null){e[s]=o;continue}if(Mr.has(r)||Mr.has(s)){e[s]=o;continue}if(Array.isArray(o)){if(o.some(function(a){return a!==null&&typeof a=="object"})){e[s]=o.map(function(a){return a!==null&&typeof a=="object"?Bo(a):a});continue}if(o.length<=1){e[s]=o;continue}n.push(s+":"+o.map(Hp).join(","));continue}if(typeof o=="object"){e[s]=Bo(o);continue}o===!0?n.push(s):o===!1?n.push("!"+s):typeof o=="number"||typeof o=="string"&&(o.includes(",")||o.includes("_"))?e[s]=o:n.push(s+":"+Hp(o))}return n.length&&(e.in=n.join(" ")),e}function mP(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?Bo(e):e}):typeof t=="object"?Bo(t):t}function wP(t){if(!t||typeof t!="string")return{};let e={},n=SP(t);for(let r of n){if(r.startsWith("!")){let c=r.slice(1),l=Gt[c]||c;e[l]=!1;continue}let o=r.indexOf(":");if(o===-1){let c=Gt[r]||r;e[c]=!0;continue}let s=r.slice(0,o),i=r.slice(o+1),a=Gt[s]||s;if(i.includes(",")){e[a]=i.split(",").map(bP);continue}e[a]=bP(i)}return e}function SP(t){return t.trim().split(/\s+/).filter(Boolean)}function bP(t){let e=t.replace(/_/g," ");return/^-?\d+(\.\d+)?$/.test(e)?Number(e):e}function _P(t){return t.replace(/_/g," ")}function Y3(t){if(!t||typeof t!="string")return{};let e={},n=SP(t);for(let r of n){if(r.startsWith("!")){let c=r.slice(1),l=Gt[c]||c;e[l]=!1;continue}let o=r.indexOf(":");if(o===-1){let c=Gt[r]||r;e[c]=!0;continue}let s=r.slice(0,o),i=r.slice(o+1),a=Gt[s]||s;if(i.includes(",")){e[a]=i.split(",").map(_P);continue}e[a]=_P(i)}return e}function Uo(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(n){return n!==null&&typeof n=="object"?Uo(n):n});let e={};for(let n in t){let r=t[n];if(an(n)){e[n]=kx(r);continue}let o=Gt[n]||n;if(cn(n)&&o===n){e[n]=kx(r);continue}if(Yt.has(o)||Yt.has(n)){e[o]=r;continue}e[o]=kx(r)}return e}function kx(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?Uo(e):e}):typeof t=="object"?Uo(t):t}function Vo(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(n){return n!==null&&typeof n=="object"?Vo(n):n});let e={};if(typeof t.in=="string"){let n=Y3(t.in);for(let r in n)e[r]=n[r]}for(let n in t){if(n==="in")continue;let r=t[n];if(an(n)){e[n]=vx(r);continue}let o=Gt[n]||n;if(cn(n)&&o===n){e[n]=vx(r);continue}if(Yt.has(o)||Yt.has(n)){e[o]=r;continue}e[o]=vx(r)}return e}function vx(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?Vo(e):e}):typeof t=="object"?Vo(t):t}function xP(t){return String(t).replace(/\\/g,"\\\\").replace(/_/g,"\\_").replace(/,/g,"\\,").replace(/ /g,"_")}function X3(t){let e="",n=0;for(;n<t.length;){if(t[n]==="\\"&&n+1<t.length){let r=t[n+1];if(r===","||r==="_"||r==="\\"){e+=r,n+=2;continue}}t[n]==="_"?e+=" ":e+=t[n],n++}return e}function Z3(t){let e=[],n="",r=0;for(;r<t.length;){if(t[r]==="\\"&&r+1<t.length){n+=t[r]+t[r+1],r+=2;continue}if(t[r]===","){e.push(n),n="",r++;continue}n+=t[r],r++}return e.push(n),e}function kP(t){if(t==null||typeof t!="object"||Array.isArray(t))return!1;let e=Object.keys(t);return e.length===1&&e[0]==="in"&&typeof t.in=="string"}function zo(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(r){return r!==null&&typeof r=="object"?zo(r):r});let e={},n=[];for(let r in t){let o=t[r];if(an(r)){let i=vP(o);e[r]=kP(i)?i.in:i;continue}if(cn(r)){let i=vP(o);e[r]=kP(i)?i.in:i;continue}let s=Ke[r]||r;if(Yt.has(r)||Yt.has(s)){e[s]=o;continue}if(typeof o=="function"){e[s]=o;continue}if(o==null){e[s]=o;continue}if(Mr.has(r)||Mr.has(s)){e[s]=o;continue}if(Array.isArray(o)){if(o.some(function(a){return a!==null&&typeof a=="object"})){e[s]=o.map(function(a){return a!==null&&typeof a=="object"?zo(a):a});continue}if(o.length<=1){e[s]=o;continue}n.push(s+":"+o.map(xP).join(","));continue}if(typeof o=="object"){e[s]=zo(o);continue}if(o===!0){n.push(s);continue}if(o===!1){n.push("!"+s);continue}if(typeof o=="number"){n.push(s+":#"+o);continue}n.push(s+":"+xP(o))}return n.length&&(e.in=n.join(" ")),e}function vP(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?zo(e):e}):typeof t=="object"?zo(t):t}function EP(t){return t.startsWith("#")&&/^#-?\d+(\.\d+)?$/.test(t)?Number(t.slice(1)):X3(t)}function Ex(t){if(!t||typeof t!="string")return{};let e={},n=t.trim().split(/\s+/).filter(Boolean);for(let r of n){if(r.startsWith("!")){let l=r.slice(1),f=Gt[l]||l;e[f]=!1;continue}let o=r.indexOf(":");if(o===-1){let l=Gt[r]||r;e[l]=!0;continue}let s=r.slice(0,o),i=r.slice(o+1),a=Gt[s]||s,c=Z3(i);if(c.length>1){e[a]=c.map(EP);continue}e[a]=EP(i)}return e}function Ho(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(n){return n!==null&&typeof n=="object"?Ho(n):n});let e={};if(typeof t.in=="string"){let n=Ex(t.in);for(let r in n)e[r]=n[r]}for(let n in t){if(n==="in")continue;let r=t[n];if(an(n)){typeof r=="string"?e[n]=Ex(r):e[n]=Ax(r);continue}let o=Gt[n]||n;if(cn(n)&&o===n){typeof r=="string"?e[n]=Ex(r):e[n]=Ax(r);continue}if(Yt.has(o)||Yt.has(n)){e[o]=r;continue}e[o]=Ax(r)}return e}function Ax(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?Ho(e):e}):typeof t=="object"?Ho(t):t}var Q3={shorten:Uo,stringify:Vo,stringifyFurther:Ho};function J3(t,e){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(r=>e(r));let n={};for(let r in t){let o=t[r];n[r]=o&&typeof o=="object"?e(o):o}return n}var t4=["components","pages","snippets"],of={name:"shorthand",prepareContext(t){let e=t.shorthand;if(!e)return;let r=Q3[e===!0?"shorten":e];if(r){for(let o of t4)t[o]&&(t[o]=J3(t[o],r));t.app&&typeof t.app=="object"&&(t.app=r(t.app))}}};var jx={};F(jx,{LEVELS:()=>sf,analyzePlugin:()=>Fi,attachBrowserListeners:()=>Jp,attachNetworkListeners:()=>cf,classifyEvent:()=>Ix,createAnalyzeState:()=>th,createBeaconSink:()=>Nx,createConsoleSink:()=>$x,createDedupe:()=>Px,createEnrich:()=>Ox,createMemorySink:()=>Mx,createPipeline:()=>Gp,createRedact:()=>Kp,createRemoteSink:()=>Xp,createSample:()=>Lx,createSummarize:()=>Rx,default:()=>Fi,emitFetchEvent:()=>DP,makeEvent:()=>ot,meetsLevel:()=>Wp,normalizeLevel:()=>af,resolveSinks:()=>Qp,summarizeElement:()=>Wo});var e4=0,n4=()=>`${Date.now().toString(36)}-${(e4++).toString(36)}`,ot=(t,e,n={})=>({id:n4(),ts:Date.now(),type:t,level:e,...n}),r4=t=>{let e=[],n=t,r=0;for(;n&&r<32;)n.key!=null&&e.unshift(String(n.key)),n=n.parent,r++;return e.join(" > ")},Wo=t=>t?{key:t.key!=null?String(t.key):null,name:t.__name||t.name||null,path:r4(t),tag:t.tag||null,component:t.component||null,route:t.context?.routerOptions?.currentRoute||null}:null;var Ni=t=>t?.context?.analyze,o4={init:{category:"lifecycle",type:"lifecycle",level:"debug"},create:{category:"lifecycle",type:"lifecycle",level:"debug"},render:{category:"lifecycle",type:"lifecycle",level:"debug"},beforeRemove:{category:"lifecycle",type:"lifecycle",level:"debug"},remove:{category:"lifecycle",type:"lifecycle",level:"debug"}},s4=(t,{category:e,type:n,level:r})=>o=>{let s=Ni(o);!s||!s.shouldCapture(e)||s.emit(ot(n,r,{hook:t,element:Wo(o)}))},AP=t=>(e,n)=>{let r=Ni(e);!r||!r.shouldCapture("state")||r.emit(ot("state","debug",{hook:t,element:Wo(e),changedKeys:n?.changedKeys||null}))},Fi={name:"analyze",error(t,e){let n=Ni(t);if(!n||n.config.enabled===!1||!n.shouldCapture("errors"))return;let r=e?.error||e?.err||(e instanceof Error?e:null);n.emit(ot("error","error",{hook:e?.hook||"error",element:Wo(t),error:r,message:r?.message||(typeof e?.message=="string"?e.message:null)}))},renderRouter(t){let e=Ni(t);e&&(!e.shouldCapture("navigation")&&!e.shouldCapture("lifecycle")||e.emit(ot("navigation","info",{hook:"renderRouter",route:t.context?.routerOptions?.currentRoute||null})))},beforeUpdate(t){let e=Ni(t);!e||!e.shouldCapture("updates")||t.__ref&&(t.__ref.__analyzeUpdateStart=typeof performance<"u"?performance.now():Date.now())},update(t){let e=Ni(t);if(!e||!e.shouldCapture("updates"))return;let n=null;t.__ref?.__analyzeUpdateStart!=null&&(n=(typeof performance<"u"?performance.now():Date.now())-t.__ref.__analyzeUpdateStart,t.__ref.__analyzeUpdateStart=null),e.emit(ot("update","debug",{hook:"update",element:Wo(t),durationMs:n}))},beforeStateUpdate:AP("beforeStateUpdate"),stateUpdate:AP("stateUpdate")};for(let[t,e]of Object.entries(o4))Fi[t]=s4(t,e);I();var sf={error:0,warn:1,info:2,debug:3,trace:4};var Wp=(t,e)=>{let n=sf[t],r=sf[e];return n==null||r==null?!0:n<=r},af=t=>sf[t]!=null?t:"warn";I();var qp=/password|token|secret|ssn|card|cvv|pin|apikey|api_key|auth|email|otp/i;var i4=(t,e)=>{for(let n of e)if(n instanceof RegExp){if(n.test(t))return!0}else if(typeof n=="string"&&t.toLowerCase().includes(n.toLowerCase()))return!0;return!1},a4=(t,e)=>{if(e!=="redact"){if(e==="hash"){let n=0,r=String(t);for(let o=0;o<r.length;o++)n=(n<<5)-n+r.charCodeAt(o)|0;return`#${(n>>>0).toString(36)}`}return"***"}},Tx=(t,e,n,r)=>{if(r>6||t==null||typeof t!="object")return t;if(Array.isArray(t))return t.map(s=>Tx(s,e,n,r+1));let o={};for(let s of Object.keys(t))if(i4(s,e)||qp.test(s)){let a=a4(t[s],n);a!==void 0&&(o[s]=a)}else o[s]=Tx(t[s],e,n,r+1);return o},Kp=(t=[],e="mask")=>{let n=Array.isArray(t)?t:[t];return r=>{if(!r)return r;let{id:o,ts:s,type:i,level:a,hook:c,error:l,message:f,durationMs:u,element:d,target:p,...g}=r,h=Tx(g,n,e,0);return{id:o,ts:s,type:i,level:a,hook:c,error:l,message:f,durationMs:u,element:d,target:p,...h}}};var Ox=t=>{let e=`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,8)}`,n=typeof navigator<"u"?navigator.userAgent:null,r=t.config.buildHash||null,o=t.config.appId||null;return s=>{if(!s)return s;let i=t.context?.routerOptions?.currentRoute||null,a=T,c=a&&a.innerWidth?{w:a.innerWidth,h:a.innerHeight}:null;return{...s,session:e,app:{id:o,build:r,route:i},meta:{ua:n,viewport:c}}}},Rx=()=>t=>{if(!t)return t;if(t.element&&typeof t.element=="object"){let e=t.element;(e.node||e.parent||e.__ref)&&(t={...t,element:{key:e.key!=null?String(e.key):null,name:e.__name||e.name||null,tag:e.tag||null,component:e.component||null}})}return t.error instanceof Error&&(t={...t,error:{name:t.error.name,message:t.error.message,stack:t.error.stack}}),t},Px=(t=1e3,e=500)=>{let n=new Map;return r=>{if(!r)return r;let o=`${r.type}:${r.level}:${r.message||""}:${r.error?.message||""}`,s=n.get(o),i=r.ts||Date.now();if(s&&i-s<t)return null;if(n.set(o,i),n.size>e){let a=Math.ceil(e/10),c=0;for(let l of n.keys()){if(c++>=a)break;n.delete(l)}}return r}},Lx=t=>e=>{if(!e)return e;let n=t[e.type];return n==null||n>=1?e:Math.random()>n?null:e},CP={redact:t=>Kp(t.config.redact||[],t.config.maskStrategy),enrich:t=>Ox(t),summarize:()=>Rx(),dedupe:t=>Px(t.config.cache?.dedupeWindowMs||1e3),sample:t=>Lx(t.config.sample||{})},c4=(t,e)=>{if(typeof t=="function")return t;if(typeof t=="string"){let n=CP[t];return n?n(e):null}return null},Gp=t=>{let e=t.config,n=Array.isArray(e.transformers)?e.transformers.slice():[],r=n.findIndex(s=>s==="redact");r>=0&&n.splice(r,1);let o=[];e.redact!==!1&&o.push(CP.redact(t));for(let s of n){let i=c4(s,t);i&&o.push(i)}return s=>{let i=s;for(let a of o){if(i==null)return null;let c=a(i);if(c==null)return null;if(Array.isArray(c)){let l=o.slice(o.indexOf(a)+1),f=[];for(let u of c){let d=u,p=!1;for(let g of l)if(d=g(d),d==null){p=!0;break}!p&&d!=null&&f.push(d)}return f}i=c}return i}};I();I();var Yp=typeof T<"u"&&typeof T.document<"u",l4=5e3,f4=50,u4=3,d4=1500,p4=1e3,Ix=t=>t?t.level==="error"||t.type==="error"?"bug":t.type==="network"?"network":t.type==="console"?t.level==="error"||t.level==="warn"?"bug":"log":t.level==="warn"?"bug":t.level==="info"?"log":"verbose":"verbose",h4=t=>{try{return JSON.stringify(t)}catch{return null}},g4=()=>{try{return Intl.DateTimeFormat().resolvedOptions().timeZone||null}catch{return null}},m4=t=>{if(!t)return null;let e=String(t),n;return(n=e.match(/Edg\/([\d.]+)/))?{name:"Edge",version:n[1]}:(n=e.match(/OPR\/([\d.]+)/))?{name:"Opera",version:n[1]}:(n=e.match(/Firefox\/([\d.]+)/))?{name:"Firefox",version:n[1]}:/Chrome\/([\d.]+)/.test(e)&&/Safari\//.test(e)?(n=e.match(/Chrome\/([\d.]+)/),{name:"Chrome",version:n[1]}):(n=e.match(/Version\/([\d.]+).*Safari/))?{name:"Safari",version:n[1]}:{name:null,version:null}},y4=()=>{if(!Yp)return null;try{let t=T.document?.documentElement?.getAttribute("data-theme")||null,e=typeof T.matchMedia=="function"?T.matchMedia("(prefers-color-scheme: dark)").matches:null;return{active:t||(e?"dark":e===!1?"light":null),forced:t||null,prefers:e==null?null:e?"dark":"light"}}catch{return null}},b4=()=>{if(!Yp)return null;let t=T.location,e=typeof navigator<"u"?navigator:null,n=typeof screen<"u"?screen:null;return{url:t?.href||null,path:t?.pathname||null,referrer:T.document?.referrer||null,title:T.document?.title||null,ua:e?.userAgent||null,browser:m4(e?.userAgent),language:e?.language||null,languages:e?.languages||null,timezone:g4(),viewport:T.innerWidth?{w:T.innerWidth,h:T.innerHeight,dpr:T.devicePixelRatio||1}:null,screen:n?{w:n.width||null,h:n.height||null,availW:n.availWidth||null,availH:n.availHeight||null,colorDepth:n.colorDepth||null,orientation:n.orientation?.type||null}:null,theme:y4()}},Xp=(t={})=>{let e=t.url,n=typeof t.transport=="function"?t.transport:null,r=typeof t.syncTransport=="function"?t.syncTransport:null;if(!e&&!n)return()=>{};let o=t.apiKey||null,s=t.appKey||t.appId||null,i=t.tenantKey||t.tenant||null,a=t.release||null,c=t.env||null,l=t.sdk||null,f=typeof t.getAuth=="function"?t.getAuth:null,u=typeof t.getContext=="function"?t.getContext:null,d=typeof t.classify=="function"?t.classify:Ix,p=typeof t.beforeSend=="function"?t.beforeSend:null,g=t.debug===!0,h=typeof t.getDebug=="function"?t.getDebug:null,m=t.batchMs!=null?t.batchMs:l4,y=t.maxBatch||f4,w=t.maxRetries!=null?t.maxRetries:u4,b=t.backoffMs||d4,x=t.queueLimit||p4,k=t.sampleRate!=null?t.sampleRate:1,S=()=>typeof crypto<"u"&&crypto.randomUUID?crypto.randomUUID():`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,10)}`,_=t.sessionId||S(),E=[],C=[],$=null,M=null,R=()=>{$||!E.length||($=setTimeout(it,m))},j=z=>{if(M)return;let B=b*Math.pow(2,Math.max(0,z-1));M=setTimeout(()=>{if(M=null,!C.length)return;let nt=C.shift();tt(nt.envelope,nt.attempt)},B)},et=(z,B=!1)=>{let nt=u?Dx(u):null,U={id:_,sentAt:Date.now()};B&&(U.endedAt=Date.now());let V={v:1,session:U,app:{key:s,release:a,env:c},tenant:i,sdk:l,page:b4(),user:nt?.user||null,traits:nt?.traits||null,tags:nt?.tags||null,events:z};if((h?Dx(h)===!0:g)&&(V.app.debug=!0),p)try{return p(V)||null}catch{return V}return V},tt=async(z,B=1)=>{if(z)try{let nt=!0;if(n){let U=await n(z);nt=U!==!1&&U?.ok!==!1}else nt=await _4(e,z,{apiKey:o,getAuth:f});!nt&&B<w&&(C.push({envelope:z,attempt:B+1}),j(B+1))}catch{B<w&&(C.push({envelope:z,attempt:B+1}),j(B+1))}},it=(z=!1,B=!1)=>{if($&&(clearTimeout($),$=null),!E.length&&!B)return;let nt=E;E=[];let U=et(nt,B);if(U){if(z&&Yp){if(typeof r=="function"&&Dx(()=>r(U)))return;if(navigator.sendBeacon&&e){let V=h4(U);if(V)try{navigator.sendBeacon(e,new T.Blob([V],{type:"application/json"}));return}catch{}}}tt(U)}},St=!1,Pt=()=>{St||(St=!0,it(!0,!0))};Yp&&(T.addEventListener("pagehide",Pt,{passive:!0}),T.addEventListener("beforeunload",Pt,{passive:!0}),T.addEventListener("visibilitychange",()=>{T.document.visibilityState==="hidden"&&it(!0)},{passive:!0}));let bt=z=>{if(!z||k<1&&Math.random()>k)return;St&&(St=!1);let B={...z,log_type:d(z)};E.push(B),E.length>x&&(E=E.slice(-x)),E.length>=y?it():R()},Mt=z=>(it(!1,!0),_=z||S(),St=!1,bt.sessionId=_,_);return bt.flush=()=>it(!1),bt.endSession=Pt,bt.startNewSession=Mt,bt.sessionId=_,bt},Dx=t=>{try{return t()}catch{return null}},_4=async(t,e,{apiKey:n,getAuth:r})=>{let o={"Content-Type":"application/json","X-Analyze-Beacon":"1"};if(n&&(o["X-Analyze-Key"]=n),r)try{let s=await r();s&&(o.Authorization=`Bearer ${s}`)}catch{}try{return(await fetch(t,{method:"POST",headers:o,body:JSON.stringify(e),keepalive:!0,credentials:"omit",mode:"cors"})).ok}catch{return!1}};var w4={error:"\x1B[31m",warn:"\x1B[33m",info:"\x1B[36m",debug:"\x1B[90m",trace:"\x1B[90m"},S4="\x1B[0m",Zp=typeof T<"u"&&typeof T.document<"u",$x=(t={})=>{let e=t.minLevel||null,n=console.error.bind(console),r=console.warn.bind(console),o=console.log.bind(console);return s=>{if(!s)return;let i=s.level==="error"?n:s.level==="warn"?r:o,a=`[analyze:${s.type}]`;if(Zp)i(a,s);else{let c=w4[s.level]||"";i(`${c}${a}${S4}`,s)}}},Mx=(t,e={})=>{let n=e.max||t.config.cache?.max||500,r=new Array(n),o=0,s=0,i=a=>{r[o]=a,o=(o+1)%n,s<n&&s++};return t.__memory={push:i,snapshot:()=>{let a=new Array(s),c=(o-s+n)%n;for(let l=0;l<s;l++)a[l]=r[(c+l)%n];return a},query:(a={})=>{let c=t.__memory.snapshot(),l=a.sinceMs?Date.now()-a.sinceMs:0;return c.filter(f=>!(!f||a.level&&f.level!==a.level||a.type&&f.type!==a.type||l&&f.ts<l))},clear:()=>{o=0,s=0}},i},Nx=(t={})=>{let e=t.url,n=t.batchMs!=null?t.batchMs:5e3,r=t.maxBatch||50;if(!e)return()=>{};let o=[],s=null,i=()=>{if(s&&(clearTimeout(s),s=null),!o.length)return;let c=JSON.stringify({events:o});o=[];let l=Zp?new T.Blob([c],{type:"application/json"}):c;if(Zp&&navigator.sendBeacon)try{navigator.sendBeacon(e,l);return}catch{}typeof fetch<"u"&&fetch(e,{method:"POST",headers:{"Content-Type":"application/json","X-Analyze-Beacon":"1"},body:c,keepalive:!0}).catch(()=>{})};Zp&&(T.addEventListener("pagehide",i,{passive:!0}),T.addEventListener("beforeunload",i,{passive:!0}));let a=c=>{c&&(o.push(c),o.length>=r?i():s||(s=setTimeout(i,n)))};return a.flush=i,a},TP={console:$x,memory:Mx,beacon:Nx,remote:Xp},OP=(t,e)=>e.getDebug!=null||e.debug!=null?e:{...e,getDebug:()=>t.config.debug===!0},Qp=t=>{let e=Array.isArray(t.config.sinks)?t.config.sinks:["console"],n=[];for(let r of e)if(typeof r=="function")n.push(r);else if(typeof r=="string"){let o=TP[r];if(!o)continue;n.push(r==="memory"?o(t,{}):o(r==="remote"?OP(t,{}):{}))}else if(r&&typeof r=="object"&&r.type){let o=TP[r.type];if(!o)continue;n.push(r.type==="memory"?o(t,r):o(r.type==="remote"?OP(t,r):r))}return n};I();var x4=typeof T<"u"&&typeof T.document<"u",k4=new Set(["password","hidden"]),RP=(t,e)=>{let n=0,r=null,o=null;return(...s)=>{let i=Date.now();i-n>=e?(n=i,t(...s)):(o=s,r||(r=setTimeout(()=>{n=Date.now(),r=null,o&&(t(...o),o=null)},e-(i-n))))}},Fx="__analyzeKeyPath",ji=t=>{let e=t.target;if(!e)return{selector:null,key:null,path:null};if(e[Fx])return e[Fx];let n=[],r=e,o=0,s=null;for(;r&&o<64;){if(r.getAttribute){let a=r.getAttribute("data-key");a&&(s==null&&(s=a),n.unshift(a))}r=r.parentNode,o++}let i;if(n.length)i={selector:null,key:s,path:n.join(" > "),tag:e.tagName?.toLowerCase()||null};else{let a=(e.tagName||"unknown").toLowerCase(),c=e.id?`#${e.id}`:"",l=e.className&&typeof e.className=="string"?"."+e.className.trim().split(/\s+/).slice(0,2).join("."):"";i={selector:`${a}${c}${l}`,key:null,path:null}}try{e[Fx]=i}catch{}return i},v4=(t,e)=>{if(e==="mask")return"***";if(e!=="redact"){if(e==="hash"){let n=0,r=String(t||"");for(let o=0;o<r.length;o++)n=(n<<5)-n+r.charCodeAt(o)|0;return`#${(n>>>0).toString(36)}`}return"***"}},E4=t=>!!(!t||t.tagName==="INPUT"&&k4.has(t.type)||qp.test(t.name||"")||qp.test(t.id||"")||t.dataset?.analyze==="skip"),Jp=t=>{if(!x4)return;let e=t.config.capture,n=t.config.throttle,r=t.__teardown,o=(s,i,a,c)=>{s.addEventListener(i,a,c),r.push(()=>s.removeEventListener(i,a,c))};if(e.errors&&(o(T,"error",s=>{t.emit(ot("error","error",{hook:"window.onerror",message:s.message||null,error:s.error||null,source:s.filename||null,line:s.lineno||null,col:s.colno||null}))}),o(T,"unhandledrejection",s=>{let i=s.reason,a=i instanceof Error?i:null;t.emit(ot("error","error",{hook:"unhandledrejection",message:a?.message||(typeof i=="string"?i:"Unhandled promise rejection"),error:a}))})),e.pointer){o(T,"click",i=>{t.emit(ot("pointer","info",{hook:"click",target:ji(i),button:i.button,x:i.clientX,y:i.clientY,modifiers:PP(i)}))},{passive:!0,capture:!0}),o(T,"dblclick",i=>{t.emit(ot("pointer","info",{hook:"dblclick",target:ji(i),x:i.clientX,y:i.clientY}))},{passive:!0,capture:!0}),o(T,"contextmenu",i=>{t.emit(ot("pointer","info",{hook:"contextmenu",target:ji(i),x:i.clientX,y:i.clientY}))},{passive:!0,capture:!0});let s=RP(i=>{t.emit(ot("pointer","trace",{hook:"pointermove",x:i.clientX,y:i.clientY}))},n.pointermove);o(T,"pointermove",s,{passive:!0})}if(e.keyboard&&o(T,"keydown",s=>{t.emit(ot("keyboard","info",{hook:"keydown",code:s.code,key:s.key&&s.key.length===1?"\xB7":s.key,modifiers:PP(s),target:ji(s)}))},{passive:!0,capture:!0}),e.forms){let s=i=>{let a=i.target;if(!a||!a.tagName||!["INPUT","TEXTAREA","SELECT"].includes(a.tagName))return;let l=E4(a),f=a.dataset?.analyze==="track",u=null;f&&!l?u=a.value:t.config.maskFormValues!==!1&&(u=v4(a.value,t.config.maskStrategy)),t.emit(ot("forms","info",{hook:i.type,target:ji(i),field:{name:a.name||null,type:a.type||a.tagName.toLowerCase()},value:u}))};o(T,"input",s,{passive:!0,capture:!0}),o(T,"change",s,{passive:!0,capture:!0}),o(T,"submit",i=>{t.emit(ot("forms","info",{hook:"submit",target:ji(i)}))},{passive:!0,capture:!0})}if(e.scroll){let s=RP(()=>{t.emit(ot("scroll","trace",{hook:"scroll",x:T.scrollX,y:T.scrollY}))},n.scroll);o(T,"scroll",s,{passive:!0,capture:!0})}if(e.viewport){let s=Ra(()=>{t.emit(ot("viewport","info",{hook:"resize",w:T.innerWidth,h:T.innerHeight,dpr:T.devicePixelRatio||1}))},n.resize);o(T,"resize",s,{passive:!0}),o(T,"orientationchange",()=>{t.emit(ot("viewport","info",{hook:"orientationchange",orientation:typeof screen<"u"&&screen.orientation?screen.orientation.type:null}))},{passive:!0}),o(T.document,"visibilitychange",()=>{t.emit(ot("viewport","info",{hook:"visibilitychange",hidden:T.document.hidden}))},{passive:!0}),t.emit(ot("viewport","info",{hook:"initial",w:T.innerWidth,h:T.innerHeight,dpr:T.devicePixelRatio||1}))}if(e.console)for(let s of["log","warn","error","debug"]){let i=console[s];console[s]=function(...a){try{t.emit(ot("console",s==="error"?"error":s==="warn"?"warn":"debug",{hook:`console.${s}`,args:a.map(LP)}))}catch{}return i.apply(console,a)},r.push(()=>{console[s]=i})}if(e.performance&&typeof PerformanceObserver<"u")try{let s=new PerformanceObserver(a=>{for(let c of a.getEntries())t.emit(ot("performance","info",{hook:c.entryType,name:c.name,startTime:c.startTime,duration:c.duration,value:c.value!=null?c.value:null}))}),i=["largest-contentful-paint","layout-shift","longtask","paint","first-input","event"];for(let a of i)try{s.observe({type:a,buffered:!0})}catch{}r.push(()=>s.disconnect())}catch{}},PP=t=>({shift:!!t.shiftKey,ctrl:!!t.ctrlKey,alt:!!t.altKey,meta:!!t.metaKey}),A4=t=>{let e={name:t.name||"Error",message:typeof t.message=="string"?t.message:String(t),stack:typeof t.stack=="string"?t.stack:null};return t.cause!==void 0&&(e.cause=LP(t.cause)),e},LP=t=>{if(t==null)return t;if(t instanceof Error)return A4(t);if(typeof t=="object")try{return JSON.parse(JSON.stringify(t))}catch{return String(t)}return t};I();var C4=typeof T<"u"&&typeof T.document<"u",DP=(t,e)=>{let n=t?.analyze;if(!n||!n.shouldCapture("network"))return;let r=e.phase==="error"?"error":"info";n.emit(ot("network",r,{hook:`fetch.${e.phase}`,source:"symbo-fetch",...e}))},cf=t=>{if(C4&&t.config.capture.network&&!t.__networkListeners){if(t.__networkListeners=!0,t.__teardown.push(()=>{t.__networkListeners=!1}),typeof T.fetch=="function"){let e=T.fetch.bind(T),n=function(r,o){if(o?.headers?.["X-Analyze-Beacon"]||!t.shouldCapture("network"))return e(r,o);let s=typeof r=="string"?r:r&&r.url||"",i=(o?.method||typeof r=="object"&&r?.method||"GET").toUpperCase(),a=typeof performance<"u"?performance.now():Date.now();return t.emit(ot("network","info",{hook:"fetch.start",source:"window.fetch",url:s,method:i})),e(r,o).then(c=>{let l=(typeof performance<"u"?performance.now():Date.now())-a;return t.emit(ot("network",c.ok?"info":"warn",{hook:"fetch.success",source:"window.fetch",url:s,method:i,status:c.status,ok:c.ok,durationMs:l})),c}).catch(c=>{let l=(typeof performance<"u"?performance.now():Date.now())-a;throw t.emit(ot("network","error",{hook:"fetch.error",source:"window.fetch",url:s,method:i,error:c,durationMs:l})),c})};T.fetch=n,t.__teardown.push(()=>{T.fetch=e})}if(typeof T.XMLHttpRequest=="function"){let e=T.XMLHttpRequest,n=e.prototype.open,r=e.prototype.send;e.prototype.open=function(o,s){return this.__analyze={method:String(o).toUpperCase(),url:String(s)},n.apply(this,arguments)},e.prototype.send=function(o){let s=this.__analyze;if(!s||!t.shouldCapture("network"))return r.apply(this,arguments);let i=typeof performance<"u"?performance.now():Date.now();t.emit(ot("network","info",{hook:"xhr.start",source:"xhr",url:s.url,method:s.method}));let a=()=>{let l=(typeof performance<"u"?performance.now():Date.now())-i,f=this.status>=200&&this.status<400;t.emit(ot("network",f?"info":"warn",{hook:"xhr.success",source:"xhr",url:s.url,method:s.method,status:this.status,ok:f,durationMs:l}))},c=()=>{let l=(typeof performance<"u"?performance.now():Date.now())-i;t.emit(ot("network","error",{hook:"xhr.error",source:"xhr",url:s.url,method:s.method,status:this.status,durationMs:l}))};return this.addEventListener("loadend",a),this.addEventListener("error",c),r.apply(this,arguments)},t.__teardown.push(()=>{e.prototype.open=n,e.prototype.send=r})}}};var T4={errors:!0,warnings:!0,pointer:!1,keyboard:!1,forms:!1,scroll:!1,viewport:!1,network:!1,performance:!1,navigation:!1,console:!1,lifecycle:!1,state:!1,updates:!1,replay:!1,telemetry:!1},O4={errors:!0,warnings:!0,pointer:!0,keyboard:!0,forms:!0,scroll:!0,viewport:!0,navigation:!0,state:!0},R4={errors:!0,warnings:!0,pointer:!0,navigation:!0,performance:!0,viewport:!0},P4={errors:!0,warnings:!0,console:!0,network:!1,navigation:!0,performance:!0,viewport:!0,lifecycle:!1,state:!1,updates:!1},L4=t=>{let e={...T4,...t};return e.replay&&Object.assign(e,O4),e.telemetry&&Object.assign(e,R4),e.remote&&Object.assign(e,P4),Object.assign(e,t),e},D4=64,I4=()=>{if(typeof T>"u"||!T.location)return null;try{let e=new URLSearchParams(T.location.search).get("analyze");return e||null}catch{return null}},th=(t={})=>{let e=t===!0?{}:{...t};e.capture=L4(e.capture||{});let n=I4();(n==="debug"||e.debug)&&(e.level="debug",e.debug=!0,e.capture={...e.capture,lifecycle:!0,state:!0,updates:!0,console:!0,network:!0}),n==="off"&&(e.enabled=!1),e.level=af(e.level||"warn"),e.cache={max:500,dedupeWindowMs:1e3,...e.cache||{}},e.throttle={pointermove:80,mousemove:80,scroll:100,resize:200,...e.throttle||{}},e.maskFormValues==null&&(e.maskFormValues=!0),e.maskStrategy||(e.maskStrategy="mask"),Array.isArray(e.sinks)||(e.sinks=["console","memory"]),Array.isArray(e.transformers)||(e.transformers=["enrich","summarize"]);let r={config:e,context:null,__ready:!1,__paused:!1,__preBuffer:[],__teardown:[],__pipeline:null,__sinks:null,__memory:null,__initialSnapshot:null},o=()=>{r.__pipeline||(r.__pipeline=Gp(r),r.__sinks=Qp(r))};return r.shouldCapture=s=>r.config.enabled===!1?!1:!!r.config.capture[s],r.emit=s=>{if(s&&r.config.enabled!==!1&&!r.__paused&&Wp(s.level,r.config.level)){if(!r.__ready){if(s.level!=="error"&&!r.config.captureDuringHydration)return;r.__preBuffer.length<D4&&r.__preBuffer.push(s);return}o(),IP(r,s)}},r.activate=s=>{if(r.context==null&&(r.context=s||null),r.__ready)return;r.__ready=!0;let i=r.__preBuffer;if(r.__preBuffer=[],i.length){o();for(let a of i)IP(r,a)}try{Jp(r)}catch(a){console.error("[analyze] browser attach error:",a)}try{cf(r)}catch(a){console.error("[analyze] network attach error:",a)}for(let a of r.__onActivate||[])try{a(r)}catch(c){console.error("[analyze] onActivate error:",c)}},r.pause=()=>{r.__paused=!0},r.resume=()=>{r.__paused=!1},r.setLevel=s=>{r.config.level=af(s)},r.setCapture=(s,i)=>{if(r.config.capture[s]=!!i,s==="network"&&i&&r.__ready)try{cf(r)}catch(a){console.error("[analyze] network attach error:",a)}},r.query=s=>r.__memory?r.__memory.query(s):[],r.snapshot=()=>r.__memory?r.__memory.snapshot():[],r.emitNetwork=s=>{if(!r.shouldCapture("network"))return;let i=s?.phase,a=i==="error"?"error":i==="success"&&s.ok===!1?"warn":"info";r.emit({id:`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,6)}`,ts:Date.now(),type:"network",level:a,hook:`fetch.${i||"unknown"}`,...s})},r.flush=()=>{if(r.__sinks)for(let s of r.__sinks)typeof s.flush=="function"&&s.flush()},r.startNewSession=s=>{let i=s||(typeof crypto<"u"&&crypto.randomUUID?crypto.randomUUID():`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,10)}`),a=Array.isArray(r.config.sinks)?r.config.sinks:[];for(let c of a)c&&typeof c=="object"&&c.type==="remote"&&(c.sessionId=i);if(r.__sinks)for(let c of r.__sinks)typeof c.startNewSession=="function"&&c.startNewSession(i);return i},r.replay=()=>({initialSnapshot:r.__initialSnapshot,events:r.snapshot()}),r.destroy=()=>{for(let s of r.__teardown)try{s()}catch{}r.__teardown=[],r.__ready=!1,r.__paused=!0},r.__onActivate=[],r.onActivate=s=>{r.__onActivate.push(s)},r},IP=(t,e)=>{let n=t.__pipeline(e);if(n==null)return;let r=Array.isArray(n)?n:[n];for(let o of r){if(typeof t.config.onEvent=="function")try{t.config.onEvent(o)}catch{}for(let s of t.__sinks)try{s(o)}catch(i){console.error("[analyze] sink error:",i)}}};var Vx={};F(Vx,{Inspect:()=>eh,inspectPlugin:()=>Ux});I();function $P(t){return v(t)?t:D(t)?t.find(e=>v(e)):""}function Bx(t){if(!t)return;let e=t.__ref.__componentKey,n=t.extends&&$P(t.extends),r=t.parent&&t.parent.childExtends&&$P(t.parent.childExtends);return(e||n||r||"").split("_")[0].split(".")[0].split("+")[0]}function nh(t){if(!t||!t.__ref)return;let{components:e,pages:n,editor:r}=t.context,o=Bx(t);return r&&r.onInitInspect&&!r.onInitInspect(o,t,t.state)?nh(t.parent):o&&(e[o]||n[o])?t:nh(t.parent)}var $4=(t,e,n)=>{let r=n.window||window;r.onkeydown=o=>{o.altKey&&o.shiftKey&&t.state.update({debugging:!0,preventSelect:!0},{preventUpdate:!0,preventContentUpdate:!0,preventRecursive:!0})},r.onkeyup=o=>{t.state.preventSelect&&(!o.altKey||!o.shiftKey)&&(t.state.replace({debugging:!1,preventSelect:!1},{preventUpdate:!0,preventContentUpdate:!0,preventRecursive:!0}),t.Inspector.state.update({area:!1}))}},eh={".preventSelect":{userSelect:"none"},"!preventSelect":{userSelect:"auto"},onInspect:$4,onMousemove:(t,e,n)=>{let r=t.target.ref,o=nh(r),s=e.Inspector.state;if(!o||!n.debugging||!o.__ref)return s.update({area:!1});let i=Bx(o),a=l=>{s.update({area:l,focusKey:i})},c=()=>{if(t.altKey&&t.shiftKey){let{x:l,y:f,width:u,height:d}=o.node.getBoundingClientRect(),p={x:l,y:f,width:u,height:d};if(!s.area)return a(p);s.area.x!==p.x&&a(p)}else s.area&&s.update({area:!1})};window.requestAnimationFrame(()=>{c(),window.requestAnimationFrame(c)})},onMousedown:(t,e,n)=>{if(!n.debugging)return;let r=t.target.ref,o=nh(r);if(!o)return;let s=Bx(o);if(!s)return;let i=r.context.editor;if(i&&i.onInspect)return i.onInspect(s,r,r.state,{allowRouterWhileInspect:!0});let a=JSON.stringify({componentKey:`${s}`});return r.context.socket?.emit&&r.context.socket.emit("route",a),t.preventDefault(),t.stopPropagation(),!1},Inspector:{state:{},transition:"all, defaultBezier, X",position:"fixed",hide:(t,e)=>!(e.area&&e.parent.debugging),style:{boxShadow:"0 0 10px #3686F733, 0 0 0 3px #3686F766, 0 0 100vmax 100vmax #000A",zIndex:"9999999",borderRadius:"10px",pointerEvents:"none"},Span:{position:"absolute",margin:"A2 0",fontSize:"Z",color:"text",zIndex:"99999999",transition:"all, defaultBezier, X",textDecoration:"underline",fontWeight:"500",top:"100%",style:{boxShadow:"0 25px 10px 35px black",textShadow:"0 0 10px black"},text:"{{ focusKey }}"},onInit:({context:t})=>{let{components:e}=t;if(A(e)){let{Content:n,...r}=e;for(let o in r)Oi[o]||(r[o].__ref||(r[o].__ref={}),r[o].__ref.__componentKey||(r[o].__ref.__componentKey=o))}},onBeforeUpdate:(t,e,n)=>{let{area:r}=n,o=n.area&&n.parent.debugging,s;if(!o)s="display: none !important";else if(r){let{x:i,y:a,width:c,height:l}=r;s=`
|
|
94
94
|
display: block !important;
|
|
95
95
|
top: ${a-6}px;
|
|
96
96
|
left: ${i-6}px;
|
|
97
97
|
width: ${c+12}px;
|
|
98
98
|
height: ${l+12}px;
|
|
99
|
-
`}return e.node.style=s,e.Span.node.innerText=n.focusKey,!1}}},Bx={name:"inspect",beforeCreate(t,e){Array.isArray(t.extends)?t.extends.push(eh):t.extends?t.extends=[t.extends,eh]:t.extends=[eh]}};var zx={};F(zx,{apiUrl:()=>Vx,channelByApiUrl:()=>F4,channelNames:()=>M4,channels:()=>we,currentChannel:()=>Mr,defaultChannel:()=>q4,deployTarget:()=>z4,isKnownChannel:()=>W4,mermaidUrl:()=>V4,normalizeOwnerSegment:()=>K4,normalizeProjectKey:()=>Y4,normalizeProjectSlug:()=>G4,parseSymboLsHost:()=>X4,previewProjectUrl:()=>U4,previewUrl:()=>FP,resolveChannel:()=>Wo,screenshotCdnHost:()=>jP,screenshotCdnUrl:()=>H4,setChannel:()=>N4,shellUrl:()=>B4,socketUrl:()=>j4});var we={channels:{local:{api:"http://localhost:8080",socket:"http://localhost:8080",shell:"http://my.localhost:1355",preview:"http://preview.localhost:1355",mermaidApex:"localhost:1355",deploy:{}},development:{api:"https://dev.api.symbols.app",socket:"https://dev.api.symbols.app",shell:"https://dev.my.symbols.app",preview:"https://dev.preview.symbols.app",mermaidApex:"dev.symbo.ls",deploy:{shellBucket:"smbls-my-dev",previewWorker:"smbls-preview-dev",mermaidWorker:"mermaid-dev"}},"demo-dev":{api:"https://dev.api.symbols.app",socket:"https://dev.api.symbols.app",shell:"https://dev.demo.symbols.app",preview:"https://dev.preview.symbols.app",mermaidApex:"dev.symbo.ls",deploy:{shellBucket:"smbls-my-demo-dev",previewWorker:"smbls-preview-dev",mermaidWorker:"mermaid-dev"}},next:{api:"https://next.api.symbols.app",socket:"https://next.api.symbols.app",shell:"https://next.my.symbols.app",preview:"https://next.preview.symbols.app",mermaidApex:"next.symbo.ls",deploy:{shellBucket:"smbls-my-next",previewWorker:"smbls-preview-next",mermaidWorker:"mermaid-next"}},test:{api:"https://test.api.symbols.app",socket:"https://test.api.symbols.app",shell:"https://test.my.symbols.app",preview:"https://test.preview.symbols.app",mermaidApex:"test.symbo.ls",deploy:{shellBucket:"smbls-my-test",previewWorker:"smbls-preview-test",mermaidWorker:"mermaid-test"}},upcoming:{api:"https://upcoming.api.symbols.app",socket:"https://upcoming.api.symbols.app",shell:"https://upcoming.my.symbols.app",preview:"https://upcoming.preview.symbols.app",mermaidApex:"upcoming.symbo.ls",deploy:{shellBucket:"smbls-my-upcoming",previewWorker:"smbls-preview-upcoming",mermaidWorker:"mermaid-upcoming"}},staging:{api:"https://staging.api.symbols.app",socket:"https://staging.api.symbols.app",shell:"https://staging.my.symbols.app",preview:"https://staging.preview.symbols.app",mermaidApex:"staging.symbo.ls",deploy:{shellBucket:"smbls-my-staging",previewWorker:"smbls-preview-staging",mermaidWorker:"mermaid-staging"}},demo:{api:"https://api.symbols.app",socket:"https://api.symbols.app",shell:"https://demo.symbols.app",preview:"https://preview.symbols.app",mermaidApex:"at.symbo.ls",deploy:{shellBucket:"smbls-my-demo",previewWorker:"smbls-preview",mermaidWorker:"mermaid"}},production:{api:"https://api.symbols.app",socket:"https://api.symbols.app",shell:"https://my.symbols.app",preview:"https://preview.symbols.app",mermaidApex:"at.symbo.ls",deploy:{shellBucket:"smbls-my-prod",previewWorker:"smbls-preview",mermaidWorker:"mermaid"}}},defaultChannel:"production",screenshotCdn:"screenshots.api.symbols.app"};var M4=Object.keys(we.channels),Xn=t=>!!(t&&we.channels[t]),Wo=t=>Xn(t)?we.channels[t]:we.channels[we.defaultChannel],N4=t=>{typeof globalThis>"u"||(globalThis.__SYMBOLS_CHANNEL__=Xn(t)?t:null,Bi=void 0)},Bi,lf=t=>typeof process<"u"&&process.env&&process.env[t]||null,Mr=()=>{if(Bi!==void 0)return Bi;let t=typeof globalThis<"u"?globalThis.__SYMBOLS_CHANNEL__:null,e=lf("SYMBOLS_CHANNEL"),n=lf("NODE_ENV");return Bi=Xn(t)&&t||Xn(e)&&e||Xn(n)&&n||we.defaultChannel,Bi===we.defaultChannel&&!Xn(t)&&!Xn(e)&&!Xn(n)&&typeof process<"u"&&process.versions&&process.versions.node&&console.warn(`[channels] no channel configured (NODE_ENV=${n||"unset"}, __SYMBOLS_CHANNEL__ unset) \u2014 falling back to "${we.defaultChannel}". Outbound URLs (shellUrl/apiUrl) will target production; set SYMBOLS_CHANNEL (preferred), NODE_ENV, or globalThis.__SYMBOLS_CHANNEL__ to a known channel.`),Bi},$P=["production","staging","upcoming","next","test","development","local","demo","demo-dev"],MP=t=>{let e=$P.indexOf(t);return e===-1?$P.length:e},F4=t=>{if(!t)return null;let e=Object.keys(we.channels).filter(n=>we.channels[n].api===t);return e.length===0?null:e.length===1?e[0]:e.sort((n,r)=>MP(n)-MP(r))[0]},Vx=(t=Mr())=>lf("SYMBOLS_API_URL")||Wo(t).api,j4=(t=Mr())=>lf("SYMBOLS_SOCKET_URL")||Wo(t).socket,B4=(t=Mr())=>Wo(t).shell||null,FP=(t=Mr())=>Wo(t).preview||null,U4=({owner:t,key:e,env:n="production"}={},r=Mr())=>{let o=FP(r);if(!o||!t||!e)return null;let s=o.match(/^(https?:\/\/)(.+)$/);if(!s)return null;let[,i,a]=s,c=`${encodeURIComponent(t)}--${encodeURIComponent(e)}`,l=`${i}${c}.${a}/`;return!n||n==="production"||n==="prod"?l:`${l}?env=${encodeURIComponent(n)}`},V4=({owner:t,key:e,env:n="production"}={},r=Mr())=>{let o=Wo(r).mermaidApex;if(!o||!t||!e)return null;let i=!n||n==="production"||n==="prod"?"":`--${encodeURIComponent(n)}`,a=`${encodeURIComponent(t)}--${encodeURIComponent(e)}${i}`;return`${o.startsWith("localhost")?"http":"https"}://${a}.${o}`},z4=(t=Mr())=>Wo(t).deploy||{},jP=()=>lf("SYMBOLS_SCREENSHOT_CDN")||we.screenshotCdn,H4=({owner:t,key:e,page:n="root",componentKey:r,env:o="production",width:s}={})=>{if(!t||!e)return null;let i=r?`component/${encodeURIComponent(r)}`:encodeURIComponent(String(n||"root").replace(/^\/+/,"").replace(/\//g,"-")||"root"),a=[];o&&o!=="production"&&a.push(`env=${encodeURIComponent(o)}`),s&&a.push(`w=${Number(s)}`);let c=a.length?`?${a.join("&")}`:"";return`https://${jP()}/${encodeURIComponent(t)}/${encodeURIComponent(e)}/${i}.webp${c}`},W4=Xn,q4=we.defaultChannel,K4=t=>t==null||typeof t!="string"?"":String(t).toLowerCase().trim().replace(/[^a-z0-9-]+/g,"-").replace(/-+/g,"-").replace(/^-+|-+$/g,"").slice(0,32)||"",G4=t=>t==null||typeof t!="string"?"":String(t).toLowerCase().trim().replace(/[^a-z0-9-]+/g,"-").replace(/-+/g,"-").replace(/^-+|-+$/g,"").slice(0,48)||"",Y4=(t,e={})=>{let n=String(t||"").trim();if(!n)return"";/\.symbo\.ls$/iu.test(n)&&(n=n.replace(/\.symbo\.ls$/iu,"")),n.includes("/")&&(n=n.split("/").pop());let r=typeof e.owner=="string"?e.owner.trim():"";return r&&n.startsWith(`${r}--`)?n=n.slice(r.length+2):!r&&n.includes("--")&&(n=n.slice(n.indexOf("--")+2)),n},NP={at:"production",prod:"production",production:"production",dev:"development",development:"development",next:"next",upcoming:"upcoming",test:"test",staging:"staging"},X4=t=>{if(typeof t!="string"||!t)return null;let e=t.toLowerCase().replace(/^www\./,"").replace(/\/$/,"");if(!e.endsWith(".symbo.ls"))return null;let n=e.split(".");if(n.length<4||n.slice(-2).join(".")!=="symbo.ls")return null;if(n.length===4){let s=n[1],i=n[0],a=NP[s];if(a&&i.includes("--")){let c=i.split("--");if(c.length===2||c.length===3){let[l,f,u]=c;if(l&&f){let d=u?NP[u]||u:null;return{projectKey:f,owner:l,env:d||a,sysEnv:a}}}}}if(n.length>=5)return{projectKey:n[1],owner:n[2],env:n[0]};let r=n[1],o=n[0];if(o.includes("--")){let[s,i]=o.split("--",2);return!s||!i?null:{projectKey:s,owner:r,env:i}}return{projectKey:o,owner:r,env:"production"}};var BP={"@symbo.ls/signal":yg,"@symbo.ls/scratch":p_,"@symbo.ls/element":Mw,"@symbo.ls/css":Wd,"@symbo.ls/utils":Is,"@symbo.ls/state":fw,"@symbo.ls/router":Ti,"@symbo.ls/polyglot":yx,"@symbo.ls/helmet":gx,"@symbo.ls/fetch":Bu,"@symbo.ls/capsize":_x,"@symbo.ls/shorthand":Ax,"@symbo.ls/analyze":Fx,"@symbo.ls/inspect":Ux,"@symbo.ls/channels":zx},UP=(t,e)=>{let n=t||(typeof globalThis<"u"?globalThis:{}),r=n.__SMBLS_PKGS__||(n.__SMBLS_PKGS__={});for(let o in BP)r[o]||(r[o]=BP[o]);if(e)for(let o in e)r[o]||(r[o]=e[o]);return r},VP=(t,e)=>{let n=t||(typeof globalThis<"u"?globalThis:null);if(!n||!e||typeof e!="object")return null;let r=n.__SMBLS_PKGS__||(n.__SMBLS_PKGS__={});for(let o in e){let s=e[o];if(typeof s!="function"||Object.prototype.hasOwnProperty.call(r,o))continue;let i=a=>(Object.defineProperty(r,o,{configurable:!0,enumerable:!0,writable:!0,value:a}),a);Object.defineProperty(r,o,{configurable:!0,enumerable:!0,get:()=>i(s()),set:i})}return r},zP=["@symbo.ls/sdk"],HP=(t,e)=>{let n=e||(typeof globalThis<"u"?globalThis:null);if(!n||!t||typeof t!="object")return null;let r=n.__SMBLS_PKGS__||(n.__SMBLS_PKGS__={});for(let o in t){let s=t[o];!s||typeof s!="object"&&typeof s!="function"||r[o]||(r[o]=s)}return r},WP=(t,e)=>{let n=e||(typeof globalThis<"u"?globalThis:null);if(!n||!Array.isArray(t))return null;let r=n.__SMBLS_PKGS__||(n.__SMBLS_PKGS__={});for(let[o,s]of Ps(t,Ls))r[o]||(r[o]=s);return r};I();var qP=t=>{let e={faces:0,links:0};if(!t)return e;for(let n in t){let r=t[n];if(!r||!r.fontFace)continue;let o=Array.isArray(r.fontFace)?r.fontFace:[r.fontFace];for(let s of o){if(KP(s)){let i=Q4(s);i&&J4(i)&&e.links++;continue}if(Z4(s)){vt(s.trim()),e.faces++;continue}typeof s=="string"&&s.includes("font-family")&&(vt(`@font-face { ${s} }`),e.faces++)}}return e},KP=t=>typeof t=="string"&&t.trim().startsWith("@import"),Z4=t=>typeof t=="string"&&t.trim().startsWith("@font-face"),Q4=t=>{if(!KP(t))return null;let e=String(t).match(/url\(\s*['"]?([^'")]+)['"]?\s*\)/);return e?e[1].trim():null},J4=(t,e)=>{if(typeof t!="string"||!t)return null;let n=e||Eo();if(!n||!n.head)return null;let r="data-smbls-font",o=n.head.querySelectorAll(`link[rel="stylesheet"][${r}]`);for(let i=0;i<o.length;i++)if(o[i].getAttribute(r)===t)return o[i];let s=n.createElement("link");return s.setAttribute("rel","stylesheet"),s.setAttribute("href",t),s.setAttribute(r,t),n.head.appendChild(s),s};var ZP=t=>{let e=typeof window<"u"?window:globalThis||{};e.document||(e.document={body:{}});let n=typeof document<"u"?document:e.document;t.document=t.document||n;let r=t.window;return r&&r!==e&&typeof r.URL!="function"?(typeof console<"u"&&console.warn&&!globalThis.__smblsRouterUrlWarned&&(globalThis.__smblsRouterUrlWarned=!0,console.warn("[smbls/router] context.window lacks URL, falling back to globalThis \u2014 passed-in window may be a stub (warned once; applies to every embed app this session)")),t.window=e):t.window=r||e,t.window},GP=(t="smbls")=>{let e={};for(let n in Fo)Object.prototype.hasOwnProperty.call(Fo,n)&&(gn(n)?e[`smbls.${n}`]=Fo[n]:e[n]=Fo[n]);return e},QP=t=>t.components?{...GP(),...t.components}:GP(),JP=t=>({...Wl,...Ti,...br,...t.utils,...t.snippets,...t.functions}),tL=t=>({...t.methods||{},require:t.utils.require,requireOnDemand:t.utils.requireOnDemand,router:t.utils.router});var eL=t=>typeof globalThis<"u"&&globalThis.__SMBLS_PKGS__&&globalThis.__SMBLS_PKGS__[t]||null,t5=3e3,e5=(t,e,n=r=>import(r))=>{if(typeof globalThis>"u")return Promise.resolve(null);try{let r=globalThis.__SMBLS_PKGS__||(globalThis.__SMBLS_PKGS__={});if(r[t])return Promise.resolve(r[t]);let o=Promise.resolve().then(()=>n(e)).then(i=>(i&&!r[t]&&(r[t]=i),r[t]||null)).catch(()=>null);return new Promise(i=>{let a=setTimeout(()=>i(null),t5);o.then(c=>{clearTimeout(a),i(c)})})}catch{return Promise.resolve(null)}},YP={},Kx=async({dependencies:t,dependenciesOnDemand:e,document:n,preventCaching:r=!1,cdnProvider:o,packageManager:s,symbolsConfig:i,registerDependency:a=e5})=>{if(o||(o=pr[s]||Ts(i)||"esmsh"),!t)return null;if(!oo(t))return console.warn(`[smbls] dependencies is ${Array.isArray(t)?"an ARRAY":`a ${typeof t}`}, not a package-name-keyed object \u2014 skipping the CDN fetch loop. This usually means a project's config.js declares its own "dependencies" field that collides with the platform package map once context.js spreads them together.`),null;let c=!1;for(let d in t){c=!0;break}if(!c)return null;let l=lr()&&r?`?${Math.random()}`:"",f=async(d,p)=>{let g=Qe(d,p,o)+l;try{await Promise.race([Os(g,{document:n,type:"module"}),new Promise((h,m)=>setTimeout(()=>m(new Error(`Timeout loading ${d}`)),1e4))]),await a(d,g)}catch(h){if(console.error(`Failed to load ${d} from ${o}:`,h),o!=="symbols")try{let m=Qe(d,p,"symbols")+l;await Promise.race([Os(m,{document:n,type:"module"}),new Promise((y,S)=>setTimeout(()=>S(new Error(`Timeout fallback ${d}`)),2e4))]),console.log(`Successfully loaded ${d} from fallback (symbols.ls)`),await a(d,m)}catch(m){console.error(`Failed to load ${d} from fallback:`,m)}}},u=[];for(let d in t){let p=t[d];if(!(e&&e[d])&&!YP[d]&&(YP[d]=!0,!hr(d))){if(ro(d)){console.warn(`[smbls] dependency "${d}" looks like an un-interpolated template placeholder, not a real package specifier \u2014 skipping the CDN fetch (this is a bug upstream of the dependency loader, not a network failure).`);continue}eL(d)||u.push(f(d,p))}}return u.length&&await Promise.allSettled(u),t},XP=/\[smbls\] runtime dependency "([^"]+)" is not registered on globalThis\.__SMBLS_PKGS__/g,n5=t=>{if(typeof t=="string")return t;if(typeof t=="function")try{return typeof te=="function"?te(t):Function.prototype.toString.call(t)}catch{return""}return""},r5=t=>{let e=new Set;if(!t)return e;let n=[t.globalScope,t.functions,t.methods,t.snippets];for(let r=0;r<n.length;r++){let o=n[r];if(!o||typeof o!="object")continue;let s=Object.keys(o);for(let i=0;i<s.length;i++){let a;try{a=o[s[i]]}catch{continue}let c=n5(a);if(!c||c.indexOf("__SMBLS_PKGS__")===-1)continue;XP.lastIndex=0;let l;for(;(l=XP.exec(c))!==null;)e.add(l[1])}}return e},o5=t=>{let e=new Set;if(!t||typeof t.querySelectorAll!="function")return e;let n;try{n=t.querySelectorAll('script[type="importmap"]')}catch{return e}for(let r=0;r<n.length;r++){let o;try{o=JSON.parse(n[r].textContent||"")}catch{continue}let s=o&&typeof o=="object"?o.imports:null;if(s&&typeof s=="object"){let i=Object.keys(s);for(let a=0;a<i.length;a++)e.add(i[a])}}return e},s5=(t,e)=>{if(!e||!e.size)return!1;if(e.has(t))return!0;for(let n of e)if(n.length>1&&n.endsWith("/")&&t.length>n.length&&t.startsWith(n))return!0;return!1},nL=(t,{syncRead:e=r5(t),runtimeDocument:n=typeof document<"u"?document:null,importMap:r=o5(n)}={})=>{let o=t&&t.dependencies;if(!oo(o))return null;let s=!t.document||t.document===n,i=t.dependenciesOnDemand,a=null,c=null;for(let l in o)s&&!(i&&i[l])&&!e.has(l)&&s5(l,r)?(c||(c={}))[l]=o[l]:(a||(a={}))[l]=o[l];return{blocking:a,deferred:c}},i5=t=>import(t),Hx={},a5=(t,e)=>{if(!e||typeof globalThis>"u")return;let n=globalThis.__SMBLS_PKGS__||(globalThis.__SMBLS_PKGS__={});n[t]||(n[t]=e)},c5=(t,{importModule:e=i5}={})=>{let n=[];if(!t)return Promise.resolve([]);for(let r in t)hr(r)||ro(r)||eL(r)||(Hx[r]||(Hx[r]=Promise.resolve().then(()=>e(r)).then(o=>(a5(r,o),o||null),()=>null)),n.push(Hx[r]));return Promise.all(n)},l5=2e3,f5=3e3,rL=(t,{win:e=typeof window<"u"?window:null,importModule:n,loadTimeoutMs:r=f5}={})=>t?new Promise(o=>{let s=()=>{c5(t,{importModule:n}).then(o,o)},i=()=>{e&&typeof e.requestIdleCallback=="function"?e.requestIdleCallback(s,{timeout:l5}):setTimeout(s,0)},a=e&&e.document;if(a&&a.readyState&&a.readyState!=="complete"&&typeof e.addEventListener=="function"){let c=!0,l=null,f=()=>{c&&(c=!1,clearTimeout(l),typeof e.removeEventListener=="function"&&e.removeEventListener("load",f),i())};e.addEventListener("load",f,{once:!0}),l=setTimeout(f,r)}else i()}):null,oL=async(t,e)=>{let n=e.window||window,r=e.cdnProvider||Ts(e.symbolsConfig)||"esmsh",o=async i=>async(a,c)=>{let f=(i.window||window).packages[a];return typeof f=="function"?f():f},s=async i=>async(a,c=r)=>{let{dependenciesOnDemand:l}=i,f=i.document||document,u=i.window||window;if(!u.packages[a]&&hr(a))return await u.require(a,c);if(!u.packages[a]){let d=lr()?`?${Math.random()}`:"";if(l&&l[a]){let p=l[a],g=Qe(a,p,c)+d;try{await i.utils.loadRemoteScript(g,{window:u,document:f})}catch(h){if(console.error(`Failed to load ${a} from ${c}:`,h),c!=="symbols"){let m=Qe(a,p,"symbols")+d;await i.utils.loadRemoteScript(m,{window:u,document:f})}}}else{let p=Qe(a,"latest",c)+d;try{await i.utils.loadRemoteScript(p,{window:u,document:f})}catch(g){if(console.error(`Failed to load ${a} from ${c}:`,g),c!=="symbols"){let h=Qe(a,"latest","symbols")+d;await i.utils.loadRemoteScript(h,{window:u,document:f})}}u.packages[a]="loadedOnDeman"}}return await u.require(a,c)};n.packages?n.packages=xt(n.packages,t):n.packages=t,n.require||(e.utils.require=await o(e),n.require=e.utils.require),n.requireOnDemand||(e.utils.requireOnDemand=await s(e),n.requireOnDemand=e.utils.requireOnDemand)},u5=/\s+/g,sL=(t,e)=>typeof t=="function"?t(e,e?.state,e?.context):t,d5=(t,e)=>{let n="";for(let r in t){let o=t[r];typeof o=="boolean"&&o?n+=` ${r}`:typeof o=="string"?n+=` ${o}`:typeof o=="function"&&(n+=` ${sL(o,e)}`)}return n},p5=(t,e,n)=>{if(!t)return;let{key:r}=e;t===!0&&(t=e.classlist={key:r}),typeof t=="string"&&(t=e.classlist={default:t}),t!==null&&typeof t=="object"&&!Array.isArray(t)&&(t=d5(t,e));let o=t.replace(u5," ").trim();if(n&&typeof n.setAttribute=="function")n.setAttribute("class",o);else if(n)try{n.className=o}catch{}return o},h5=()=>(t,e,n)=>{let r=sL(t,e);if(t){let{__ref:o}=e;o.__class.style=r}iL()(e.classlist,e,e.state,!0)},iL=()=>(t,e,n,r)=>{if(e.style&&!r)return;let{__ref:o}=e,{__class:s,__classNames:i}=o;if(!(t===null||typeof t!="object"||Array.isArray(t))){e.class&&(i.classProps=e.class),e.attr?.class&&(i.class=e.attr.class);for(let a in s){let c=s[a];if(!c){delete i[a];continue}let l;typeof c=="string"||typeof c=="number"?l=c:typeof c=="boolean"?l=e.key:l=Oe(c),i[a]=l}for(let a in i)a==="classProps"||a==="class"||s[a]===void 0&&delete i[a];e.node&&p5(i,e,e.node)}},g5=()=>({style:h5(),classlist:iL()}),m5=["useReset","useVariable","useFontImport","useIconSprite","useSvgSprite","useDocumentTheme","useDefaultIcons","useDefaultConfig","verbose","globalTheme"],Wx=new WeakSet,qx=!1,y5=t=>!!t&&typeof t=="object",aL=(t,e)=>{let n=e.document||(e.parent&&e.parent.documentElement?e.parent:null)||document,r=e.initOptions||{},o=e.registry||g5(),s=e.designSystem?ft(ut(e.designSystem),ut(Ml),Ee):ut(Ml),i={};for(let h of m5)e[h]!==void 0&&(i[h]=e[h]);let a,c=y5(n),f=c&&Wx.has(n)&&!e.skipDesignSystemInit,u=!f&&!qx,d=f?`[data-smbls-app="${t}"]`:":root";if(e.scopeSelector=d,e.skipDesignSystemInit){if(a=O(t)||O(),a&&(a.__domDocument=n),a?.CSS_VARS){J(a);try{vt({[d]:a.CSS_VARS}),a.CSS_MEDIA_VARS&&vt(Ip(a.CSS_MEDIA_VARS,d));let h=ko(a.cssSkinVars,a.cssSkinFallback,d);Object.keys(h).length&&vt(h)}finally{X()}}}else if(u){let h=O();h&&(h.__domDocument=n),a=Gn(s,{key:t,document:n,files:e.files,assets:e.assets,scopeSelector:d,...jp,...i,...r}),a&&a!==h&&(a.__domDocument=n),c&&Wx.add(n),qx=!0}else{let h=Nc(t,s,{cleanBase:!0});for(let m in i)h[m]=i[m];if(h.__domDocument=n,f){let m=t.replace(/[^a-zA-Z0-9]/g,"").substring(0,6);e.cssPrefix=m,h.varPrefix=m}J(h);try{a=Gn(h,{key:t,document:n,files:e.files,assets:e.assets,scopeSelector:d,...jp,...i,...r})}finally{X()}c&&Wx.add(n),qx=!0}let p=a?.CONFIG||a,g=p?.font;if(g){J(p);try{qP(g)}finally{X()}}return[a,o]},cL=(t,e)=>{let n={};e.state&&ft(n,e.state),t&&t.state&&ft(n,t.state);let r=e.polyglot;if(r?.translations){let o=null;try{typeof localStorage<"u"&&(o=localStorage.getItem(r.storageLangKey||"smbls_lang")||localStorage.getItem("lang"))}catch{}let s=o||n.lang||r.defaultLang||"en";o&&o!==n.lang&&(n.lang=o);let i=new Set,a=new Set,c=(u,d)=>{if(!a.has(u)){if(!to(e,u,n)){i.add(u);return}n[u]=d,a.add(u),mn(e,u,d)}},l=r.translations[s];if(l&&typeof l=="object")for(let u in l)c(u,l[u]);let f=new Set(r.languages||[]);for(let u in r.translations)f.has(u)||c(u,r.translations[u]);i.size&&r.verbose!==!1&&e.verbose!==!1&&console.warn(`[polyglot] ${i.size} translation key${i.size===1?"":"s"} collide${i.size===1?"s":""} with a declared root-state key (${[...i].join(", ")}) \u2014 the declared value wins and the translation is NOT seeded into state. Rename the translation key, or read it with \`{{ key | polyglot }}\` instead of a bare \`{{ key }}\`.`)}return n.isRootState=!0,ut(n)},lL=(t,e)=>{E(t.routes)&&E(e.pages)&&xt(t.routes,e.pages);let n=t.routes||e.pages||{},r=[];for(let o in n){if(o.charCodeAt(0)===47)continue;let i="/"+(o==="index"?"":o);Object.prototype.hasOwnProperty.call(n,i)?r.push(`${o} -> ${i}`):n[i]=n[o],delete n[o]}return r.length&&e&&e.verbose!==!1&&console.warn(`[smbls] preparePages kept ${r.length} explicitly declared route${r.length===1?"":"s"} over a same-named page key (${r.join(", ")}). A bare page NAME never overwrites a declared '/route'. This usually means a shared library ships a page under its export name that collides with one of your routes \u2014 add it to that library's ignoreList if you did not intend the collision.`),n},fL=t=>{vc(t,t.sharedLibraries)};var ff={polyglot:Zl,getLocalStateLang:ef,getActiveLang:Ir,getLang:Ir,setLang:Jl,getPendingLang:Yl,getLanguages:Xl,loadTranslations:Ql,upsertTranslation:tf};nc();I();I();var rh=new Set(["__proto__","constructor","prototype"]),Gx=t=>{if(!Array.isArray(t))return!1;for(let e=0;e<t.length;e++)if(rh.has(t[e]))return!1;return!0},uL=(t,e)=>{!t||!Gx(e)||e.reduce((n,r,o,s)=>{if(n&&r in n){if(o!==s.length-1)return n[r];delete n[r]}},t)},dL=(t,e,n,r=!1)=>{!t||!Gx(e)||e.reduce((o,s,i,a)=>{if(o){if(i!==a.length-1)return!o[s]&&r&&(o[s]={}),o[s];o[s]=n}},t)},oh=(t,e)=>{let n=new Set;if(!Array.isArray(e))return n;for(let[r,o,s]of e)if(!(!Array.isArray(o)||!o.length))switch(n.add(o[0]),r){case"delete":uL(t,o);break;case"update":case"set":dL(t,o,s,!0);break;default:break}return n},pL=(t,e)=>{if(!e||typeof e!="object"||Array.isArray(e))return null;let n=t&&(t.__raw||t)||{},r=null;for(let o of Object.keys(e))rh.has(o)||Object.prototype.hasOwnProperty.call(n,o)||(r||(r={}),r[o]=e[o]);return r},uf=(t,e)=>{!t||!e||typeof e!="object"||(t.__rawDesignSystem=JSON.parse(JSON.stringify(e)))},hL=(t,e,n,r="designSystem")=>{for(let o in e){if(rh.has(o))continue;let s=`${r}/${o}`;if(n.has(s))continue;let i=e[o],a=t[o];if(i&&typeof i=="object"&&!Array.isArray(i)){if(!a||typeof a!="object"||Array.isArray(a)){if(o in t)continue;t[o]={}}hL(t[o],i,n,s)}else o in t||(t[o]=Array.isArray(i)?JSON.parse(JSON.stringify(i)):i)}},Yx=(t,e)=>{if(!t||!t.__rawDesignSystem)return null;if(Array.isArray(e)&&e.length){let o={designSystem:t.__rawDesignSystem};oh(o,e)}let n=JSON.parse(JSON.stringify(t.__rawDesignSystem)),r=Array.isArray(t.sharedLibraries)?t.sharedLibraries:[];return Ec(n,r,hL)};I();var gL=(t,e,n)=>{let r=!1;return(o={})=>{let{data:s}=o,{schema:i}=o;s&&(s=t.call("deepDestringifyFunctions",s,Array.isArray(s)?[]:{}),Object.entries(s).forEach(([a,c])=>{if(n[a]&&typeof n[a]=="object")if(a==="designSystem"){if(uf(n,c),r){let l=Yx(n);l&&Gn(l)}}else Jr(n[a],c);else n[a]=c}),r=!0,i&&(n.schema=i))}},mL=(t,e,n)=>(r={})=>{let{changes:o}=r;if(!o||!Array.isArray(o)||!o.length)return;o=t.call("deepDestringifyFunctions",o,Array.isArray(o)?[]:{});let s=o.filter(c=>Array.isArray(c)&&Array.isArray(c[1])&&c[1][0]==="designSystem"),i=s.length?o.filter(c=>!s.includes(c)):o,a=oh(n,i);if(s.length&&a.add("designSystem"),a.has("designSystem")){let c=Yx(n,s);c?Gn(c):n.__warnedNoRawDesignSystem||(n.__warnedNoRawDesignSystem=!0,console.warn("[sync] design-system op ignored: no raw design system was seeded on this client. Re-initing from the processed config would corrupt every token, so the update is skipped \u2014 reload to pick it up. Seed it at boot with seedRawDesignSystem(ctx, ds)."))}if(a.has("state")){let c=pL(e,n.state);if(c){let l=typeof e.$update=="function"?e.$update:e.update;typeof l=="function"&&l.call(e,c)}}if(["pages","components","snippets","functions","assets"].some(c=>a.has(c))){let{pathname:c,search:l,hash:f}=n.window.location;t.call("router",c+l+f,t.__ref.root,{},{scrollToTop:!1,force:!0})}};var b5={success:"green",error:"red",warning:"yellow"},yL=(t,e,n)=>{if(t.symbols){if(!n.connected){n.notifications.connected={title:"Connected",message:"to the Symbols live server"},n.update({connected:!0});let r=setTimeout(()=>{delete n.notifications.connected,e.notifications.content.connected.update({animation:"fadeOutDown"}),n.update({connected:!0}),clearTimeout(r)},3e3)}}else if(n.connected){n.notifications.connected={title:"Disconnected",type:"error"},n.update({connected:!1});let r=setTimeout(()=>{delete n.notifications.connected,e.notifications.content.connected&&e.notifications.content.connected.update({animation:"fadeOutDown"}),n.update({connected:!0}),clearTimeout(r)},3e3)}},bL={state:{notifications:[]},Notifications:{position:"fixed",left:"A2",bottom:"Z2",zIndex:"999",childExtends:"Notification",childProps:({state:t})=>({animationDuration:"C",background:b5[t.type||"success"],icon:null,Flex:{Title:{text:"{{ title }}"},P:{text:"{{ title }}"}},onRender:(e,n,r)=>{n.update({animation:"fadeInUp"})},onClick:(e,n,r)=>{delete r.notifications[n.key],n.update({animation:"fadeOutDown"}),r.onClose&&r.onClose(e,n,r)}}),IconText:null,childrenAs:"state",children:({state:t})=>t.notifications}};var J5=!1,t6=()=>J5?"http://localhost:8080":"https://api.symbols.app",e6=t=>{let e=t&&t.editor&&t.editor.socketUrl||t&&t.settings&&t.settings.socketUrl;return typeof e=="string"&&e?{mode:"collab",baseUrl:e}:t&&t.editor&&t.editor.runtime==="runner"?{mode:"runner",baseUrl:null}:{mode:null,baseUrl:null}},S0=null,n6=()=>(S0||(S0=Promise.resolve().then(()=>(fD(),lD)).then(t=>{let e=t&&(t.io||t.default);if(typeof e!="function")throw new TypeError("socket.io-client exports no io()");return e}).catch(t=>(console.warn("[sync] socket.io-client failed to load \u2014 live sync disabled",t),null))),S0),r6=async t=>{try{let e=t||t6(),n=await C.fetch(`${e}/service-token`,{method:"GET"}),r;try{let o=await n.clone().json();if(o&&typeof o.token=="string")return o.token.trim();r=await n.text()}catch{r=await n.text()}return(r||"").replace(/\s+/gu,"")||void 0}catch(e){console.error("[sync] Failed to fetch service-token",e)}},pD=(t,e,n,r)=>{t.on("snapshot",gL(e,n,r)),t.on("ops",mL(e,n,r)),t.on("clients",o=>{r.editor?.verbose&&yL(o,e,n)}),t.on("disconnect",o=>{r.editor?.verbose&&console.info("[sync] disconnected",o)})},o6=async(t,e,n,r,o)=>{let s=await r6(r);if(!s)return console.warn("[sync] no service token \u2014 collab disabled"),null;let i=n.key;if(!i)return console.warn("[sync] ctx.key missing \u2014 collab cannot authenticate"),null;let a=n.editor?.projectId||null,c=await o;if(!c)return null;let l=c(r,{path:"/collab-socket",transports:["websocket"],auth:{token:s,projectId:a,projectKey:i,branch:"main",live:!0,clientType:"platform"},reconnectionAttempts:1/0,reconnectionDelayMax:4e3});return l.on("connect",()=>{n.editor?.verbose&&console.info("[sync] connected (collab)")}),pD(l,t,e,n),l},s6=async(t,e,n,r)=>{let o=await r;if(!o)return null;let s=o({transports:["websocket","polling"],reconnectionAttempts:1/0,reconnectionDelayMax:4e3});return s.on("connect",()=>{n.editor?.verbose!==!1&&console.info("[sync] connected (runner)")}),pD(s,t,e,n),s.on("reload",()=>{typeof C<"u"&&C.location&&C.location.reload()}),s},i6=async(t,e,n)=>{let{mode:r,baseUrl:o}=e6(n);if(!r)return null;let s=n6();return r==="collab"?o6(t,e,n,o,s):r==="runner"?s6(t,e,n,s):null},a6={onInit:i6};var hD=t=>typeof t>"u",uD=t=>!!(t?.editor?.socketUrl||t?.settings?.socketUrl),dD=t=>t?.editor?.runtime==="runner",gD=(t,e)=>{Array.isArray(t.extends)?t.extends.push(e):t.extends?t.extends=[t.extends,e]:t.extends=[e]},mD={name:"sync",beforeCreate(t,e){let n=e&&e.editor;(n&&!hD(n.liveSync)?n.liveSync:uD(e)||dD(e))&&(uD(e)&&!dD(e)&&!e?.key||gD(t,a6))}},yD={name:"notifications",beforeCreate(t,e){if(!e)return;let n=hD(e.notifications)?null:e.notifications,r=e.editor&&e.editor.verbose===!0;(n===!0||n!==!1&&r)&&gD(t,bL)}};var v0={};F(v0,{AlertTemplate:()=>Ph,ConfirmTemplate:()=>Rh,CustomTemplate:()=>Dh,ModalLayer:()=>Oh,ModalRoot:()=>Th,PromptTemplate:()=>Lh,windowsComponents:()=>k0});var x0={};F(x0,{alertDialog:()=>Ah,closeAllModals:()=>vh,closeModal:()=>xh,confirmDialog:()=>Eh,getLayer:()=>Sh,openModal:()=>kh,promptDialog:()=>Ch,windowsFunctions:()=>nr});function st(t){let e=t;for(;e;){if(e.layer!==void 0)return e.layer;e=e.parent}return null}function Gi(t){let e=t;for(;e;){if(e.key==="ModalRoot")return e;if(e.ModalRoot&&e.ModalRoot.__ref)return e.ModalRoot;e=e.parent}let n=t?.getRoot?.();return n?.ModalRoot?n.ModalRoot:typeof globalThis<"u"&&globalThis.__SMBLS_WINDOWS_MODAL_ROOT__?.__ref?globalThis.__SMBLS_WINDOWS_MODAL_ROOT__:null}function Sh(){return st(this)}var c6=(t,e)=>{let n=t&&t["ModalLayer_"+e],r=n?.node||n?.__ref?.node;!r||typeof r.style?.setProperty!="function"||(r.style.setProperty("display","none","important"),r.style.setProperty("opacity","0","important"),r.style.setProperty("visibility","hidden","important"),r.style.setProperty("pointer-events","none","important"))},bD=(t,e)=>{let n=t&&t["ModalLayer_"+e],r=n?.node||n?.__ref?.node;!r||typeof r.style?.removeProperty!="function"||(r.style.removeProperty("display"),r.style.removeProperty("opacity"),r.style.removeProperty("visibility"),r.style.removeProperty("pointer-events"))};function xh(t){let e=Gi(this);if(!e)return;let n=e.state?.stack||[];if(!n.length)return;let r,o,s;if(t){if(s=[],r=n.filter((i,a)=>{let c=i.id!==t;return c||s.push(a),c}),r.length===n.length)return;o=n.filter(i=>i.id===t)}else r=n.slice(0,-1),o=n.slice(-1),s=[n.length-1];e.state.update({stack:r});for(let i of s)c6(e,i);for(let i of o)if(typeof i.onClose=="function")try{i.onClose()}catch(a){console.warn("[windows] onClose threw:",a)}}function kh(t={}){let e=Gi(this);if(!e)return console.warn("[windows] openModal: ModalRoot is not mounted on the app root. Add `ModalRoot: {}` to your shell tree and import windowsComponents into context."),null;e.__modalIdCounter=(e.__modalIdCounter||0)+1;let n=t.id||`modal_${e.__modalIdCounter}_${Date.now().toString(36)}`,r={id:n,template:t.template||"custom",title:t.title,message:t.message,icon:t.icon,confirmText:t.confirmText,cancelText:t.cancelText,okText:t.okText,confirmTheme:t.confirmTheme,placeholder:t.placeholder,defaultValue:t.defaultValue,dismissOnBackdrop:t.dismissOnBackdrop,content:t.content,width:t.width,maxWidth:t.maxWidth,maxHeight:t.maxHeight,onConfirm:t.onConfirm,onCancel:t.onCancel,onOk:t.onOk,onClose:t.onClose},o=e.state?.stack||[];if(o.length>=5)return console.warn("[windows] openModal: stack already at the 5-layer maximum, dropping the new layer. Close some modals first."),null;let s=o.length;return bD(e,s),e.state.update({stack:[...o,r]}),n}function vh(){let t=Gi(this);!t||!t.state?.stack?.length||t.state.update({stack:[]})}function Eh(t){let e=typeof t=="string"?{message:t}:t||{};return this.call("openModal",{...e,template:"confirm"})}function Ah(t){let e=typeof t=="string"?{message:t}:t||{};return this.call("openModal",{...e,template:"alert"})}function Ch(t){let e=typeof t=="string"?{message:t}:t||{};return this.call("openModal",{...e,template:"prompt"})}var nr={openModal:kh,closeModal:xh,closeAllModals:vh,confirmDialog:Eh,alertDialog:Ah,promptDialog:Ch,getLayer:Sh};var l6=["a[href]","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(","),_D=t=>{if(!t?.querySelectorAll)return[];let e=t.querySelectorAll(l6),n=[];for(let r=0;r<e.length;r++){let o=e[r];(o.offsetParent!==null||o===document.activeElement)&&n.push(o)}return n},wD=t=>{let e=t.state?.stack||[];if(!e.length)return null;let n=t["ModalLayer_"+(e.length-1)];return n?.node||n?.__ref?.node||null},Th={tag:"div",position:"fixed",inset:"0",zIndex:"2000",pointerEvents:"none",state:{stack:[]},subscribeTo:["stack"],ModalLayer_0:{__slotIndex:0,subscribeTo:["stack"],layer:(t,e)=>e?.stack?.[0]||null,opacity:t=>t.layer?"1":"0",visibility:t=>t.layer?"visible":"hidden",pointerEvents:t=>t.layer?"auto":"none"},ModalLayer_1:{__slotIndex:1,subscribeTo:["stack"],layer:(t,e)=>e?.stack?.[1]||null,opacity:t=>t.layer?"1":"0",visibility:t=>t.layer?"visible":"hidden",pointerEvents:t=>t.layer?"auto":"none"},ModalLayer_2:{__slotIndex:2,subscribeTo:["stack"],layer:(t,e)=>e?.stack?.[2]||null,opacity:t=>t.layer?"1":"0",visibility:t=>t.layer?"visible":"hidden",pointerEvents:t=>t.layer?"auto":"none"},ModalLayer_3:{__slotIndex:3,subscribeTo:["stack"],layer:(t,e)=>e?.stack?.[3]||null,opacity:t=>t.layer?"1":"0",visibility:t=>t.layer?"visible":"hidden",pointerEvents:t=>t.layer?"auto":"none"},ModalLayer_4:{__slotIndex:4,subscribeTo:["stack"],layer:(t,e)=>e?.stack?.[4]||null,opacity:t=>t.layer?"1":"0",visibility:t=>t.layer?"visible":"hidden",pointerEvents:t=>t.layer?"auto":"none"},onInit:(t,e)=>{if(typeof window>"u")return;globalThis.__SMBLS_WINDOWS_MODAL_ROOT__=t;let n=t.context;if(n){n.functions||(n.functions={});for(let a in nr)a in n.functions||(n.functions[a]=nr[a])}t.__modalOpeners=t.__modalOpeners||[],t.__prevStackLen=t.state&&t.state.stack&&t.state.stack.length||0;let r=()=>{let a=t.state?.stack||[];if(!a.length)return;let c=a.length-1,l=a[c];t.state.update({stack:a.slice(0,-1)});let f=t["ModalLayer_"+c],u=f?.node||f?.__ref?.node;if(u?.style?.setProperty&&(u.style.setProperty("display","none","important"),u.style.setProperty("opacity","0","important"),u.style.setProperty("visibility","hidden","important"),u.style.setProperty("pointer-events","none","important")),typeof l?.onClose=="function")try{l.onClose()}catch(d){console.warn("[windows] onClose threw:",d)}},o=a=>{let c=t.state?.stack;if(c?.length){if(a.key==="Tab"){let l=wD(t);if(!l)return;let f=_D(l);if(!f.length){a.preventDefault();let g=l.querySelector?.('[role="dialog"]')||l;try{g.focus?.()}catch{}return}let u=f[0],d=f[f.length-1],p=document.activeElement;if(!l.contains(p)){a.preventDefault();try{u.focus()}catch{}return}if(a.shiftKey&&p===u){a.preventDefault();try{d.focus()}catch{}}else if(!a.shiftKey&&p===d){a.preventDefault();try{u.focus()}catch{}}return}a.key!=="Escape"||a.defaultPrevented||c[c.length-1]?.dismissOnBackdrop!==!1&&(a.preventDefault(),r())}};window.addEventListener("keydown",o),t.__escHandler=o;let s=a=>{let c=t.state?.stack||[];if(a<0||a>=c.length)return;let l=c[a];t.state.update({stack:c.filter((d,p)=>p!==a)});let f=t["ModalLayer_"+a],u=f?.node||f?.__ref?.node;if(u?.style?.setProperty&&(u.style.setProperty("display","none","important"),u.style.setProperty("opacity","0","important"),u.style.setProperty("visibility","hidden","important"),u.style.setProperty("pointer-events","none","important")),typeof l?.onClose=="function")try{l.onClose()}catch(d){console.warn("[windows] onClose threw:",d)}},i=a=>{let c=t.state?.stack||[];if(!c.length)return;let l=a.target?.closest?.('[data-key="Close"]');if(l){for(let f=c.length-1;f>=0;f--){let u=t["ModalLayer_"+f],d=u?.node||u?.__ref?.node;if(d&&d.contains(l)){a.preventDefault(),a.stopPropagation(),s(f);return}}return}for(let f=c.length-1;f>=0;f--){let u=t["ModalLayer_"+f];if((u?.node||u?.__ref?.node)===a.target){if(c[f]?.dismissOnBackdrop===!1)return;a.preventDefault(),a.stopPropagation(),s(f);return}}};document.addEventListener("click",i,!0),t.__clickDelegate=i},onUpdate:t=>{if(typeof window>"u")return;let e=(t.state&&t.state.stack||[]).length,n=t.__prevStackLen||0;if(e!==n)if(t.__prevStackLen=e,t.__modalOpeners=t.__modalOpeners||[],e>n)t.__modalOpeners[e]=document.activeElement&&document.activeElement!==document.body?document.activeElement:t.__modalOpeners[e]||null,typeof requestAnimationFrame=="function"&&requestAnimationFrame(()=>{let r=wD(t);if(!r)return;let o=_D(r)[0]||r.querySelector&&r.querySelector('[role="dialog"]')||r;try{o.focus&&o.focus()}catch{}});else{let r=null;for(let o=n;o>e;o--)t.__modalOpeners[o]&&(r=r||t.__modalOpeners[o]),t.__modalOpeners[o]=null;if(r&&typeof r.focus=="function"&&r.isConnected!==!1)try{r.focus()}catch{}}},onDestroy:t=>{typeof window>"u"||(globalThis.__SMBLS_WINDOWS_MODAL_ROOT__===t&&(globalThis.__SMBLS_WINDOWS_MODAL_ROOT__=null),t.__escHandler&&(window.removeEventListener("keydown",t.__escHandler),delete t.__escHandler),t.__clickDelegate&&(document.removeEventListener("click",t.__clickDelegate,!0),delete t.__clickDelegate))}};var Oh={tag:"div",position:"fixed",inset:"0",alignItems:"center",justifyContent:"center",padding:"A",theme:"backdrop",transition:"opacity C defaultBezier",zIndex:(t,e)=>`${2e3+(t.__slotIndex||0)*10}`,display:(t,e)=>t.layer?"flex":"none",opacity:(t,e)=>t.layer?"1":"0",visibility:(t,e)=>t.layer?"visible":"hidden",pointerEvents:(t,e)=>t.layer?"auto":"none",ModalWindow:{attr:{role:"dialog","aria-modal":"true",tabindex:"-1","aria-labelledby":t=>{let e=st(t)?.id;return e?"modal-title-"+e:null}},width:t=>st(t)?.width||"H",maxWidth:t=>st(t)?.maxWidth||"90vw",flow:"y",maxHeight:t=>st(t)?.maxHeight||"100%",animation:"modalIn",animationDuration:"D",animationTimingFunction:"springBezier",onClick:t=>t.stopPropagation(),onMousedown:t=>t.stopPropagation(),ModalHeader:{display:"none"},overflow:"visible",ConfirmTemplate:{hide:t=>st(t)?.template!=="confirm"},AlertTemplate:{hide:t=>st(t)?.template!=="alert"},PromptTemplate:{hide:t=>st(t)?.template!=="prompt"},CustomTemplate:{hide:t=>st(t)?.template!=="custom"}}};var Yi=(t,e,n)=>st(t)?.[e]||n,f6=t=>{let e=st(t)?.icon;return e===null||e===!1},Rh={tag:"div",flow:"y",gap:"B",flex:"1 1 auto",minHeight:"0",ModalHeader:{Hgroup:{H:{text:t=>Yi(t,"title","Are you sure?"),attr:{id:t=>{let e=st(t)?.id;return e?"modal-title-"+e:null}}},P:{if:()=>!1}},Icons:{hide:t=>f6(t),Indicator:{extends:"Icon",opacity:".7",icon:t=>Yi(t,"icon","warning")}}},ModalBody:{flex:"1 1 auto",minHeight:"0",overflowY:"auto",overscrollBehavior:"contain",P:{tag:"p",margin:"0",text:t=>Yi(t,"message","This action cannot be undone."),color:"dim"}},ModalFooter:{flow:"x",gap:"Z1",align:"center end",flexShrink:"0",CancelBtn:{extends:"CancelButton",text:t=>Yi(t,"cancelText","Cancel"),onClick:(t,e,n)=>{let r=st(e);if(r?.onCancel)try{r.onCancel()}catch(o){console.warn("[windows] confirm.onCancel threw:",o)}e.call("closeModal",r?.id)}},ConfirmBtn:{extends:"Button",theme:t=>Yi(t,"confirmTheme","primary"),text:t=>Yi(t,"confirmText","Confirm"),onClick:(t,e,n)=>{let r=st(e);if(r?.onConfirm)try{r.onConfirm()}catch(o){console.warn("[windows] confirm.onConfirm threw:",o)}e.call("closeModal",r?.id)}}}};var xf=(t,e,n)=>st(t)?.[e]||n,Ph={tag:"div",flow:"y",gap:"B",flex:"1 1 auto",minHeight:"0",ModalHeader:{Hgroup:{H:{text:t=>xf(t,"title","Notice"),attr:{id:t=>{let e=st(t)?.id;return e?"modal-title-"+e:null}}},P:{if:()=>!1}},Icons:{Indicator:{extends:"Icon",opacity:".7",icon:t=>xf(t,"icon","info")}}},ModalBody:{flex:"1 1 auto",minHeight:"0",overflowY:"auto",overscrollBehavior:"contain",hide:t=>!xf(t,"message",""),P:{tag:"p",margin:"0",text:t=>xf(t,"message",""),color:"dim"}},ModalFooter:{flow:"x",align:"center end",flexShrink:"0",OkBtn:{extends:"Button",theme:"primary",text:t=>xf(t,"okText","OK"),onClick:(t,e,n)=>{let r=st(e);if(r?.onOk)try{r.onOk()}catch(o){console.warn("[windows] alert.onOk threw:",o)}e.call("closeModal",r?.id)}}}};var Xi=(t,e,n)=>st(t)?.[e]||n,Lh={tag:"div",flow:"y",gap:"B",flex:"1 1 auto",minHeight:"0",scope:{value:""},onRender:(t,e)=>{let n=st(t);if(!n||t.scope._seededLayerId===n.id)return;t.scope._seededLayerId=n.id,t.scope.value=n.defaultValue||"";let r=t.InputRow&&t.InputRow.node;r&&(r.value=t.scope.value)},onUpdate:(t,e)=>{let n=st(t);if(!n||t.scope._seededLayerId===n.id)return;t.scope._seededLayerId=n.id,t.scope.value=n.defaultValue||"";let r=t.InputRow&&t.InputRow.node;r&&(r.value=t.scope.value)},ModalHeader:{Hgroup:{H:{text:t=>Xi(t,"title","Enter a value"),attr:{id:t=>{let e=st(t)?.id;return e?"modal-title-"+e:null}}},P:{if:()=>!1}}},ModalBody:{flex:"1 1 auto",minHeight:"0",overflowY:"auto",overscrollBehavior:"contain",hide:t=>!Xi(t,"message",""),P:{tag:"p",margin:"0",text:t=>Xi(t,"message",""),color:"dim"}},InputRow:{extends:"Input",flexShrink:"0",autofocus:!0,placeholder:t=>Xi(t,"placeholder",""),value:(t,e)=>t.parent.scope?.value||"",onInput:(t,e,n)=>{e.parent.scope.value=t.target.value},onKeydown:(t,e,n)=>{if(t.key!=="Enter")return;t.preventDefault();let r=st(e),o=e.parent.scope?.value||"";if(r?.onConfirm)try{r.onConfirm(o)}catch(s){console.warn("[windows] prompt.onConfirm threw:",s)}e.call("closeModal",r?.id)}},ModalFooter:{flow:"x",gap:"Z1",align:"center end",flexShrink:"0",CancelBtn:{extends:"CancelButton",text:t=>Xi(t,"cancelText","Cancel"),onClick:(t,e,n)=>{let r=st(e);if(r?.onCancel)try{r.onCancel()}catch(o){console.warn("[windows] prompt.onCancel threw:",o)}e.call("closeModal",r?.id)}},ConfirmBtn:{extends:"Button",theme:"primary",text:t=>Xi(t,"confirmText","OK"),onClick:(t,e,n)=>{let r=st(e),o=e.parent.parent.scope?.value||"";if(r?.onConfirm)try{r.onConfirm(o)}catch(s){console.warn("[windows] prompt.onConfirm threw:",s)}e.call("closeModal",r?.id)}}}};var Dh={tag:"div",flow:"y",gap:"B",flex:"1 1 auto",minHeight:"0",Title:{tag:"h2",text:t=>st(t)?.title||"",hide:t=>!st(t)?.title,position:"absolute",width:"1px",height:"1px",margin:"-1px",padding:"0",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:"0",attr:{id:t=>{let e=st(t)?.id;return e?"modal-title-"+e:null}}},Slot:{tag:"div",flex:"1 1 auto",minHeight:"0",overflowY:"auto",overscrollBehavior:"contain",onInit:t=>{let e=K(()=>{let n=st(t),r=n?.content||null,o=n?.id||null;if(!r){t.__lastLayerId!=null&&(t.removeContent(),t.__lastLayerId=null);return}if(t.__lastLayerId!==o){t.__lastLayerId=o;try{t.set(r);let s=t.content?.context;if(s){s.functions||(s.functions={});for(let i in nr)i in s.functions||(s.functions[i]=nr[i])}}catch(s){console.warn("[windows] custom.content set failed:",s)}}});t.__ref&&t.__ref.__effects.push(e)}}};var SD={extends:"Button",theme:"tertiary"};var k0={ModalRoot:Th,ModalLayer:Oh,ConfirmTemplate:Rh,AlertTemplate:Ph,PromptTemplate:Lh,CustomTemplate:Dh,"smbls.CancelButton":SD};var R0={};F(R0,{Dropdown:()=>jh,DropdownList:()=>Bh,DropdownParent:()=>Uh,DropdownParentFocus:()=>Vh,DropdownRoot:()=>Nh,DropdownSiblingFocus:()=>zh,DropdownTrigger:()=>Fh,dropdownComponents:()=>O0});var xD=(t,e,n)=>({bottom:n-t.bottom,top:t.top,right:e-t.right,left:t.left}),u6=(t,e,n,r)=>{let o=xD(t,n,r),s=i=>o[i]>=e.height+8;return s("bottom")?"bottom":s("top")?"top":o.bottom>=o.top?"bottom":"top"},d6=(t,e,n,r,o)=>{let s=xD(e,r,o),i=t==="top"||t==="bottom"?n.height+8:n.width+8;if(s[t]>=i)return t;let a={top:"bottom",bottom:"top",left:"right",right:"left"}[t];return a&&s[a]>=i||a&&s[a]>s[t]?a:t};var E0=(t,e,n)=>{let r;return t==="bottom"?r=n-e.bottom-16:t==="top"?r=e.top-16:r=n-16,Math.max(40,Math.floor(r))},Ih=(t,e,n)=>Math.max(e,Math.min(n,t)),rr=(t,e,n="auto")=>{if(!t){let g=typeof window<"u"?window.innerHeight:768;return{left:0,top:0,side:"bottom",align:"start",maxHeight:E0("center",null,g)}}let r=typeof window<"u"?window.innerWidth:1024,o=typeof window<"u"?window.innerHeight:768,s={width:Math.max(120,e?.width||0),height:Math.max(40,e?.height||0)};if(n==="center"){let g=E0("center",t,o),h=Math.min(s.height,g),m=Ih((r-s.width)/2,8,Math.max(8,r-s.width-8)),y=Ih((o-h)/2,8,Math.max(8,o-h-8));return{left:m,top:y,side:"center",align:"center",maxHeight:g}}let i,a;if(n==="auto")i=u6(t,s,r,o),a="start";else{let g=n.split("-");i=g[0],a=g[1]||"start",i=d6(i,t,s,r,o)}let c=E0(i,t,o),l=Math.min(s.height,c),f,u;i==="bottom"||i==="top"?(a==="start"?f=t.left:a==="end"?f=t.right-s.width:f=t.left+(t.width-s.width)/2,u=i==="bottom"?t.bottom+8:t.top-l-8):(a==="start"?u=t.top:a==="end"?u=t.bottom-l:u=t.top+(t.height-l)/2,f=i==="right"?t.right+8:t.left-s.width-8);let d=Math.max(8,r-s.width-8),p=Math.max(8,o-l-8);return f=Ih(f,8,d),u=Ih(u,8,p),{left:f,top:u,side:i,align:a,maxHeight:c}},Zi=t=>{switch(t){case"bottom":return"translateY(-6px)";case"top":return"translateY(6px)";case"left":return"translateX(6px)";case"right":return"translateX(-6px)";case"center":return"translateY(0px)";default:return"translateY(-6px)"}};var Fr={placement:"auto",trigger:"click",offset:8,minWidth:"180px",maxWidth:"90vw",maxHeight:null},p6=t=>{if(!t||typeof t.getBoundingClientRect!="function")return null;let e=t.getBoundingClientRect();return{left:e.left,top:e.top,right:e.right,bottom:e.bottom,width:e.width,height:e.height}},A0=t=>t?.getRoot?.()?.DropdownRoot||null,h6=0,g6=()=>`dropdown_${++h6}_${Date.now().toString(36)}`;function $h(t={}){let e=A0(this);if(!e)return console.warn("[dropdown] openDropdown: DropdownRoot is not mounted on the app root. Add `DropdownRoot: {}` to your shell tree and import dropdown components into context."),null;let n=t.anchorEl?.node||t.anchorEl,r=t.anchorRect||p6(n);if(!r)return console.warn("[dropdown] openDropdown: no anchor element/rect provided \u2014 pass anchorEl or anchorRect."),null;let o=t.id||g6(),s=t.restoreEl?.node||t.restoreEl||n||(typeof document<"u"?document.activeElement:null),i={id:o,content:t.content||null,anchor:r,placement:t.placement||Fr.placement,trigger:t.trigger||Fr.trigger,offset:t.offset??Fr.offset,minWidth:t.minWidth||Fr.minWidth,maxWidth:t.maxWidth||Fr.maxWidth,maxHeight:t.maxHeight||Fr.maxHeight,theme:t.theme||null,shadow:t.shadow||null,background:t.background||null,round:t.round||null,role:t.role||null,ariaLabel:t.ariaLabel||null,ariaLabelledby:t.ariaLabelledby||null,focusIn:!!t.focusIn,onOpen:t.onOpen,onClose:t.onClose,restoreEl:s},a=e.state?.layer;if(a?.onClose)try{a.onClose(a)}catch(c){console.warn("[dropdown] prev onClose threw:",c)}if(e.state.update({layer:i}),typeof i.onOpen=="function")try{i.onOpen(i)}catch(c){console.warn("[dropdown] onOpen threw:",c)}return o}function Mh(t){let e=A0(this);if(!e)return;let n=e.state?.layer;n&&e.state.update({layer:{...n,inert:!!t}})}function es(t){let e=A0(this);if(!e)return;let n=e.state?.layer;if(!n)return;let r=typeof t=="string"?t:t?.id;if(r&&n.id&&r!==n.id)return;let o=n.onClose,s=n.restoreEl,i=typeof document<"u"?document:null,a=i?i.activeElement:null,c=e.node?.querySelector?.('[data-smbls-dropdown="panel"]'),l=!a||a===i?.body,f=!!(c&&a&&c.contains(a)),u=l||f;if(e.state.update({layer:null}),u&&s&&typeof s.focus=="function")try{s.focus()}catch(d){console.warn("[dropdown] focus restore threw:",d)}if(typeof o=="function")try{o(n)}catch(d){console.warn("[dropdown] onClose threw:",d)}}var C0=(t,e)=>{let n=`${e.maxHeight}px`;return t?.maxHeight?`min(${t.maxHeight}, ${n})`:n},kD=t=>{let e=t.getBoundingClientRect();return{width:e.width,height:Math.max(e.height,t.scrollHeight||0)}},m6=`
|
|
99
|
+
`}return e.node.style=s,e.Span.node.innerText=n.focusKey,!1}}},Ux={name:"inspect",beforeCreate(t,e){Array.isArray(t.extends)?t.extends.push(eh):t.extends?t.extends=[t.extends,eh]:t.extends=[eh]}};var Hx={};F(Hx,{apiUrl:()=>zx,channelByApiUrl:()=>j4,channelNames:()=>N4,channels:()=>we,currentChannel:()=>Nr,defaultChannel:()=>K4,deployTarget:()=>H4,isKnownChannel:()=>q4,mermaidUrl:()=>z4,normalizeOwnerSegment:()=>G4,normalizeProjectKey:()=>X4,normalizeProjectSlug:()=>Y4,parseSymboLsHost:()=>Z4,previewProjectUrl:()=>V4,previewUrl:()=>jP,resolveChannel:()=>qo,screenshotCdnHost:()=>BP,screenshotCdnUrl:()=>W4,setChannel:()=>F4,shellUrl:()=>U4,socketUrl:()=>B4});var we={channels:{local:{api:"http://localhost:8080",socket:"http://localhost:8080",shell:"http://my.localhost:1355",preview:"http://preview.localhost:1355",mermaidApex:"localhost:1355",deploy:{}},development:{api:"https://dev.api.symbols.app",socket:"https://dev.api.symbols.app",shell:"https://dev.my.symbols.app",preview:"https://dev.preview.symbols.app",mermaidApex:"dev.symbo.ls",deploy:{shellBucket:"smbls-my-dev",previewWorker:"smbls-preview-dev",mermaidWorker:"mermaid-dev"}},"demo-dev":{api:"https://dev.api.symbols.app",socket:"https://dev.api.symbols.app",shell:"https://dev.demo.symbols.app",preview:"https://dev.preview.symbols.app",mermaidApex:"dev.symbo.ls",deploy:{shellBucket:"smbls-my-demo-dev",previewWorker:"smbls-preview-dev",mermaidWorker:"mermaid-dev"}},next:{api:"https://next.api.symbols.app",socket:"https://next.api.symbols.app",shell:"https://next.my.symbols.app",preview:"https://next.preview.symbols.app",mermaidApex:"next.symbo.ls",deploy:{shellBucket:"smbls-my-next",previewWorker:"smbls-preview-next",mermaidWorker:"mermaid-next"}},test:{api:"https://test.api.symbols.app",socket:"https://test.api.symbols.app",shell:"https://test.my.symbols.app",preview:"https://test.preview.symbols.app",mermaidApex:"test.symbo.ls",deploy:{shellBucket:"smbls-my-test",previewWorker:"smbls-preview-test",mermaidWorker:"mermaid-test"}},upcoming:{api:"https://upcoming.api.symbols.app",socket:"https://upcoming.api.symbols.app",shell:"https://upcoming.my.symbols.app",preview:"https://upcoming.preview.symbols.app",mermaidApex:"upcoming.symbo.ls",deploy:{shellBucket:"smbls-my-upcoming",previewWorker:"smbls-preview-upcoming",mermaidWorker:"mermaid-upcoming"}},staging:{api:"https://staging.api.symbols.app",socket:"https://staging.api.symbols.app",shell:"https://staging.my.symbols.app",preview:"https://staging.preview.symbols.app",mermaidApex:"staging.symbo.ls",deploy:{shellBucket:"smbls-my-staging",previewWorker:"smbls-preview-staging",mermaidWorker:"mermaid-staging"}},demo:{api:"https://api.symbols.app",socket:"https://api.symbols.app",shell:"https://demo.symbols.app",preview:"https://preview.symbols.app",mermaidApex:"at.symbo.ls",deploy:{shellBucket:"smbls-my-demo",previewWorker:"smbls-preview",mermaidWorker:"mermaid"}},production:{api:"https://api.symbols.app",socket:"https://api.symbols.app",shell:"https://my.symbols.app",preview:"https://preview.symbols.app",mermaidApex:"at.symbo.ls",deploy:{shellBucket:"smbls-my-prod",previewWorker:"smbls-preview",mermaidWorker:"mermaid"}}},defaultChannel:"production",screenshotCdn:"screenshots.api.symbols.app"};var N4=Object.keys(we.channels),Xn=t=>!!(t&&we.channels[t]),qo=t=>Xn(t)?we.channels[t]:we.channels[we.defaultChannel],F4=t=>{typeof globalThis>"u"||(globalThis.__SYMBOLS_CHANNEL__=Xn(t)?t:null,Bi=void 0)},Bi,lf=t=>typeof process<"u"&&process.env&&process.env[t]||null,Nr=()=>{if(Bi!==void 0)return Bi;let t=typeof globalThis<"u"?globalThis.__SYMBOLS_CHANNEL__:null,e=lf("SYMBOLS_CHANNEL"),n=lf("NODE_ENV");return Bi=Xn(t)&&t||Xn(e)&&e||Xn(n)&&n||we.defaultChannel,Bi===we.defaultChannel&&!Xn(t)&&!Xn(e)&&!Xn(n)&&typeof process<"u"&&process.versions&&process.versions.node&&console.warn(`[channels] no channel configured (NODE_ENV=${n||"unset"}, __SYMBOLS_CHANNEL__ unset) \u2014 falling back to "${we.defaultChannel}". Outbound URLs (shellUrl/apiUrl) will target production; set SYMBOLS_CHANNEL (preferred), NODE_ENV, or globalThis.__SYMBOLS_CHANNEL__ to a known channel.`),Bi},MP=["production","staging","upcoming","next","test","development","local","demo","demo-dev"],NP=t=>{let e=MP.indexOf(t);return e===-1?MP.length:e},j4=t=>{if(!t)return null;let e=Object.keys(we.channels).filter(n=>we.channels[n].api===t);return e.length===0?null:e.length===1?e[0]:e.sort((n,r)=>NP(n)-NP(r))[0]},zx=(t=Nr())=>lf("SYMBOLS_API_URL")||qo(t).api,B4=(t=Nr())=>lf("SYMBOLS_SOCKET_URL")||qo(t).socket,U4=(t=Nr())=>qo(t).shell||null,jP=(t=Nr())=>qo(t).preview||null,V4=({owner:t,key:e,env:n="production"}={},r=Nr())=>{let o=jP(r);if(!o||!t||!e)return null;let s=o.match(/^(https?:\/\/)(.+)$/);if(!s)return null;let[,i,a]=s,c=`${encodeURIComponent(t)}--${encodeURIComponent(e)}`,l=`${i}${c}.${a}/`;return!n||n==="production"||n==="prod"?l:`${l}?env=${encodeURIComponent(n)}`},z4=({owner:t,key:e,env:n="production"}={},r=Nr())=>{let o=qo(r).mermaidApex;if(!o||!t||!e)return null;let i=!n||n==="production"||n==="prod"?"":`--${encodeURIComponent(n)}`,a=`${encodeURIComponent(t)}--${encodeURIComponent(e)}${i}`;return`${o.startsWith("localhost")?"http":"https"}://${a}.${o}`},H4=(t=Nr())=>qo(t).deploy||{},BP=()=>lf("SYMBOLS_SCREENSHOT_CDN")||we.screenshotCdn,W4=({owner:t,key:e,page:n="root",componentKey:r,env:o="production",width:s}={})=>{if(!t||!e)return null;let i=r?`component/${encodeURIComponent(r)}`:encodeURIComponent(String(n||"root").replace(/^\/+/,"").replace(/\//g,"-")||"root"),a=[];o&&o!=="production"&&a.push(`env=${encodeURIComponent(o)}`),s&&a.push(`w=${Number(s)}`);let c=a.length?`?${a.join("&")}`:"";return`https://${BP()}/${encodeURIComponent(t)}/${encodeURIComponent(e)}/${i}.webp${c}`},q4=Xn,K4=we.defaultChannel,G4=t=>t==null||typeof t!="string"?"":String(t).toLowerCase().trim().replace(/[^a-z0-9-]+/g,"-").replace(/-+/g,"-").replace(/^-+|-+$/g,"").slice(0,32)||"",Y4=t=>t==null||typeof t!="string"?"":String(t).toLowerCase().trim().replace(/[^a-z0-9-]+/g,"-").replace(/-+/g,"-").replace(/^-+|-+$/g,"").slice(0,48)||"",X4=(t,e={})=>{let n=String(t||"").trim();if(!n)return"";/\.symbo\.ls$/iu.test(n)&&(n=n.replace(/\.symbo\.ls$/iu,"")),n.includes("/")&&(n=n.split("/").pop());let r=typeof e.owner=="string"?e.owner.trim():"";return r&&n.startsWith(`${r}--`)?n=n.slice(r.length+2):!r&&n.includes("--")&&(n=n.slice(n.indexOf("--")+2)),n},FP={at:"production",prod:"production",production:"production",dev:"development",development:"development",next:"next",upcoming:"upcoming",test:"test",staging:"staging"},Z4=t=>{if(typeof t!="string"||!t)return null;let e=t.toLowerCase().replace(/^www\./,"").replace(/\/$/,"");if(!e.endsWith(".symbo.ls"))return null;let n=e.split(".");if(n.length<4||n.slice(-2).join(".")!=="symbo.ls")return null;if(n.length===4){let s=n[1],i=n[0],a=FP[s];if(a&&i.includes("--")){let c=i.split("--");if(c.length===2||c.length===3){let[l,f,u]=c;if(l&&f){let d=u?FP[u]||u:null;return{projectKey:f,owner:l,env:d||a,sysEnv:a}}}}}if(n.length>=5)return{projectKey:n[1],owner:n[2],env:n[0]};let r=n[1],o=n[0];if(o.includes("--")){let[s,i]=o.split("--",2);return!s||!i?null:{projectKey:s,owner:r,env:i}}return{projectKey:o,owner:r,env:"production"}};var UP={"@symbo.ls/signal":yg,"@symbo.ls/scratch":p_,"@symbo.ls/element":Nw,"@symbo.ls/css":Wd,"@symbo.ls/utils":Is,"@symbo.ls/state":fw,"@symbo.ls/router":Ti,"@symbo.ls/polyglot":bx,"@symbo.ls/helmet":mx,"@symbo.ls/fetch":Bu,"@symbo.ls/capsize":wx,"@symbo.ls/shorthand":Cx,"@symbo.ls/analyze":jx,"@symbo.ls/inspect":Vx,"@symbo.ls/channels":Hx},VP=(t,e)=>{let n=t||(typeof globalThis<"u"?globalThis:{}),r=n.__SMBLS_PKGS__||(n.__SMBLS_PKGS__={});for(let o in UP)r[o]||(r[o]=UP[o]);if(e)for(let o in e)r[o]||(r[o]=e[o]);return r},zP=(t,e)=>{let n=t||(typeof globalThis<"u"?globalThis:null);if(!n||!e||typeof e!="object")return null;let r=n.__SMBLS_PKGS__||(n.__SMBLS_PKGS__={});for(let o in e){let s=e[o];if(typeof s!="function"||Object.prototype.hasOwnProperty.call(r,o))continue;let i=a=>(Object.defineProperty(r,o,{configurable:!0,enumerable:!0,writable:!0,value:a}),a);Object.defineProperty(r,o,{configurable:!0,enumerable:!0,get:()=>i(s()),set:i})}return r},HP=["@symbo.ls/sdk"],WP=(t,e)=>{let n=e||(typeof globalThis<"u"?globalThis:null);if(!n||!t||typeof t!="object")return null;let r=n.__SMBLS_PKGS__||(n.__SMBLS_PKGS__={});for(let o in t){let s=t[o];!s||typeof s!="object"&&typeof s!="function"||r[o]||(r[o]=s)}return r},qP=(t,e)=>{let n=e||(typeof globalThis<"u"?globalThis:null);if(!n||!Array.isArray(t))return null;let r=n.__SMBLS_PKGS__||(n.__SMBLS_PKGS__={});for(let[o,s]of Ps(t,Ls))r[o]||(r[o]=s);return r};I();var KP=t=>{let e={faces:0,links:0};if(!t)return e;for(let n in t){let r=t[n];if(!r||!r.fontFace)continue;let o=Array.isArray(r.fontFace)?r.fontFace:[r.fontFace];for(let s of o){if(GP(s)){let i=J4(s);i&&t5(i)&&e.links++;continue}if(Q4(s)){vt(s.trim()),e.faces++;continue}typeof s=="string"&&s.includes("font-family")&&(vt(`@font-face { ${s} }`),e.faces++)}}return e},GP=t=>typeof t=="string"&&t.trim().startsWith("@import"),Q4=t=>typeof t=="string"&&t.trim().startsWith("@font-face"),J4=t=>{if(!GP(t))return null;let e=String(t).match(/url\(\s*['"]?([^'")]+)['"]?\s*\)/);return e?e[1].trim():null},t5=(t,e)=>{if(typeof t!="string"||!t)return null;let n=e||Ao();if(!n||!n.head)return null;let r="data-smbls-font",o=n.head.querySelectorAll(`link[rel="stylesheet"][${r}]`);for(let i=0;i<o.length;i++)if(o[i].getAttribute(r)===t)return o[i];let s=n.createElement("link");return s.setAttribute("rel","stylesheet"),s.setAttribute("href",t),s.setAttribute(r,t),n.head.appendChild(s),s};var QP=t=>{let e=typeof window<"u"?window:globalThis||{};e.document||(e.document={body:{}});let n=typeof document<"u"?document:e.document;t.document=t.document||n;let r=t.window;return r&&r!==e&&typeof r.URL!="function"?(typeof console<"u"&&console.warn&&!globalThis.__smblsRouterUrlWarned&&(globalThis.__smblsRouterUrlWarned=!0,console.warn("[smbls/router] context.window lacks URL, falling back to globalThis \u2014 passed-in window may be a stub (warned once; applies to every embed app this session)")),t.window=e):t.window=r||e,t.window},YP=(t="smbls")=>{let e={};for(let n in jo)Object.prototype.hasOwnProperty.call(jo,n)&&(gn(n)?e[`smbls.${n}`]=jo[n]:e[n]=jo[n]);return e},JP=t=>t.components?{...YP(),...t.components}:YP(),tL=t=>({...Wl,...Ti,..._r,...t.utils,...t.snippets,...t.functions}),eL=t=>({...t.methods||{},require:t.utils.require,requireOnDemand:t.utils.requireOnDemand,router:t.utils.router});var nL=t=>typeof globalThis<"u"&&globalThis.__SMBLS_PKGS__&&globalThis.__SMBLS_PKGS__[t]||null,e5=3e3,n5=(t,e,n=r=>import(r))=>{if(typeof globalThis>"u")return Promise.resolve(null);try{let r=globalThis.__SMBLS_PKGS__||(globalThis.__SMBLS_PKGS__={});if(r[t])return Promise.resolve(r[t]);let o=Promise.resolve().then(()=>n(e)).then(i=>(i&&!r[t]&&(r[t]=i),r[t]||null)).catch(()=>null);return new Promise(i=>{let a=setTimeout(()=>i(null),e5);o.then(c=>{clearTimeout(a),i(c)})})}catch{return Promise.resolve(null)}},XP={},Gx=async({dependencies:t,dependenciesOnDemand:e,document:n,preventCaching:r=!1,cdnProvider:o,packageManager:s,symbolsConfig:i,registerDependency:a=n5})=>{if(o||(o=hr[s]||Ts(i)||"esmsh"),!t)return null;if(!so(t))return console.warn(`[smbls] dependencies is ${Array.isArray(t)?"an ARRAY":`a ${typeof t}`}, not a package-name-keyed object \u2014 skipping the CDN fetch loop. This usually means a project's config.js declares its own "dependencies" field that collides with the platform package map once context.js spreads them together.`),null;let c=!1;for(let d in t){c=!0;break}if(!c)return null;let l=lr()&&r?`?${Math.random()}`:"",f=async(d,p)=>{let g=Qe(d,p,o)+l;try{await Promise.race([Os(g,{document:n,type:"module"}),new Promise((h,m)=>setTimeout(()=>m(new Error(`Timeout loading ${d}`)),1e4))]),await a(d,g)}catch(h){if(console.error(`Failed to load ${d} from ${o}:`,h),o!=="symbols")try{let m=Qe(d,p,"symbols")+l;await Promise.race([Os(m,{document:n,type:"module"}),new Promise((y,w)=>setTimeout(()=>w(new Error(`Timeout fallback ${d}`)),2e4))]),console.log(`Successfully loaded ${d} from fallback (symbols.ls)`),await a(d,m)}catch(m){console.error(`Failed to load ${d} from fallback:`,m)}}},u=[];for(let d in t){let p=t[d];if(!(e&&e[d])&&!XP[d]&&(XP[d]=!0,!gr(d))){if(oo(d)){console.warn(`[smbls] dependency "${d}" looks like an un-interpolated template placeholder, not a real package specifier \u2014 skipping the CDN fetch (this is a bug upstream of the dependency loader, not a network failure).`);continue}nL(d)||u.push(f(d,p))}}return u.length&&await Promise.allSettled(u),t},ZP=/\[smbls\] runtime dependency "([^"]+)" is not registered on globalThis\.__SMBLS_PKGS__/g,r5=t=>{if(typeof t=="string")return t;if(typeof t=="function")try{return typeof te=="function"?te(t):Function.prototype.toString.call(t)}catch{return""}return""},o5=t=>{let e=new Set;if(!t)return e;let n=[t.globalScope,t.functions,t.methods,t.snippets];for(let r=0;r<n.length;r++){let o=n[r];if(!o||typeof o!="object")continue;let s=Object.keys(o);for(let i=0;i<s.length;i++){let a;try{a=o[s[i]]}catch{continue}let c=r5(a);if(!c||c.indexOf("__SMBLS_PKGS__")===-1)continue;ZP.lastIndex=0;let l;for(;(l=ZP.exec(c))!==null;)e.add(l[1])}}return e},s5=t=>{let e=new Set;if(!t||typeof t.querySelectorAll!="function")return e;let n;try{n=t.querySelectorAll('script[type="importmap"]')}catch{return e}for(let r=0;r<n.length;r++){let o;try{o=JSON.parse(n[r].textContent||"")}catch{continue}let s=o&&typeof o=="object"?o.imports:null;if(s&&typeof s=="object"){let i=Object.keys(s);for(let a=0;a<i.length;a++)e.add(i[a])}}return e},i5=(t,e)=>{if(!e||!e.size)return!1;if(e.has(t))return!0;for(let n of e)if(n.length>1&&n.endsWith("/")&&t.length>n.length&&t.startsWith(n))return!0;return!1},rL=(t,{syncRead:e=o5(t),runtimeDocument:n=typeof document<"u"?document:null,importMap:r=s5(n)}={})=>{let o=t&&t.dependencies;if(!so(o))return null;let s=!t.document||t.document===n,i=t.dependenciesOnDemand,a=null,c=null;for(let l in o)s&&!(i&&i[l])&&!e.has(l)&&i5(l,r)?(c||(c={}))[l]=o[l]:(a||(a={}))[l]=o[l];return{blocking:a,deferred:c}},a5=t=>import(t),Wx={},c5=(t,e)=>{if(!e||typeof globalThis>"u")return;let n=globalThis.__SMBLS_PKGS__||(globalThis.__SMBLS_PKGS__={});n[t]||(n[t]=e)},l5=(t,{importModule:e=a5}={})=>{let n=[];if(!t)return Promise.resolve([]);for(let r in t)gr(r)||oo(r)||nL(r)||(Wx[r]||(Wx[r]=Promise.resolve().then(()=>e(r)).then(o=>(c5(r,o),o||null),()=>null)),n.push(Wx[r]));return Promise.all(n)},f5=2e3,u5=3e3,oL=(t,{win:e=typeof window<"u"?window:null,importModule:n,loadTimeoutMs:r=u5}={})=>t?new Promise(o=>{let s=()=>{l5(t,{importModule:n}).then(o,o)},i=()=>{e&&typeof e.requestIdleCallback=="function"?e.requestIdleCallback(s,{timeout:f5}):setTimeout(s,0)},a=e&&e.document;if(a&&a.readyState&&a.readyState!=="complete"&&typeof e.addEventListener=="function"){let c=!0,l=null,f=()=>{c&&(c=!1,clearTimeout(l),typeof e.removeEventListener=="function"&&e.removeEventListener("load",f),i())};e.addEventListener("load",f,{once:!0}),l=setTimeout(f,r)}else i()}):null,sL=async(t,e)=>{let n=e.window||window,r=e.cdnProvider||Ts(e.symbolsConfig)||"esmsh",o=async i=>async(a,c)=>{let f=(i.window||window).packages[a];return typeof f=="function"?f():f},s=async i=>async(a,c=r)=>{let{dependenciesOnDemand:l}=i,f=i.document||document,u=i.window||window;if(!u.packages[a]&&gr(a))return await u.require(a,c);if(!u.packages[a]){let d=lr()?`?${Math.random()}`:"";if(l&&l[a]){let p=l[a],g=Qe(a,p,c)+d;try{await i.utils.loadRemoteScript(g,{window:u,document:f})}catch(h){if(console.error(`Failed to load ${a} from ${c}:`,h),c!=="symbols"){let m=Qe(a,p,"symbols")+d;await i.utils.loadRemoteScript(m,{window:u,document:f})}}}else{let p=Qe(a,"latest",c)+d;try{await i.utils.loadRemoteScript(p,{window:u,document:f})}catch(g){if(console.error(`Failed to load ${a} from ${c}:`,g),c!=="symbols"){let h=Qe(a,"latest","symbols")+d;await i.utils.loadRemoteScript(h,{window:u,document:f})}}u.packages[a]="loadedOnDeman"}}return await u.require(a,c)};n.packages?n.packages=xt(n.packages,t):n.packages=t,n.require||(e.utils.require=await o(e),n.require=e.utils.require),n.requireOnDemand||(e.utils.requireOnDemand=await s(e),n.requireOnDemand=e.utils.requireOnDemand)},d5=/\s+/g,iL=(t,e)=>typeof t=="function"?t(e,e?.state,e?.context):t,p5=(t,e)=>{let n="";for(let r in t){let o=t[r];typeof o=="boolean"&&o?n+=` ${r}`:typeof o=="string"?n+=` ${o}`:typeof o=="function"&&(n+=` ${iL(o,e)}`)}return n},h5=(t,e,n)=>{if(!t)return;let{key:r}=e;t===!0&&(t=e.classlist={key:r}),typeof t=="string"&&(t=e.classlist={default:t}),t!==null&&typeof t=="object"&&!Array.isArray(t)&&(t=p5(t,e));let o=t.replace(d5," ").trim();if(n&&typeof n.setAttribute=="function")n.setAttribute("class",o);else if(n)try{n.className=o}catch{}return o},g5=()=>(t,e,n)=>{let r=iL(t,e);if(t){let{__ref:o}=e;o.__class.style=r}aL()(e.classlist,e,e.state,!0)},aL=()=>(t,e,n,r)=>{if(e.style&&!r)return;let{__ref:o}=e,{__class:s,__classNames:i}=o;if(!(t===null||typeof t!="object"||Array.isArray(t))){e.class&&(i.classProps=e.class),e.attr?.class&&(i.class=e.attr.class);for(let a in s){let c=s[a];if(!c){delete i[a];continue}let l;typeof c=="string"||typeof c=="number"?l=c:typeof c=="boolean"?l=e.key:l=Oe(c),i[a]=l}for(let a in i)a==="classProps"||a==="class"||s[a]===void 0&&delete i[a];e.node&&h5(i,e,e.node)}},m5=()=>({style:g5(),classlist:aL()}),y5=["useReset","useVariable","useFontImport","useIconSprite","useSvgSprite","useDocumentTheme","useDefaultIcons","useDefaultConfig","verbose","globalTheme"],qx=new WeakSet,Kx=!1,b5=t=>!!t&&typeof t=="object",cL=(t,e)=>{let n=e.document||(e.parent&&e.parent.documentElement?e.parent:null)||document,r=e.initOptions||{},o=e.registry||m5(),s=e.designSystem?ft(ut(e.designSystem),ut(Ml),Ee):ut(Ml),i={};for(let h of y5)e[h]!==void 0&&(i[h]=e[h]);let a,c=b5(n),f=c&&qx.has(n)&&!e.skipDesignSystemInit,u=!f&&!Kx,d=f?`[data-smbls-app="${t}"]`:":root";if(e.scopeSelector=d,e.skipDesignSystemInit){if(a=O(t)||O(),a&&(a.__domDocument=n),a?.CSS_VARS){J(a);try{vt({[d]:a.CSS_VARS}),a.CSS_MEDIA_VARS&&vt(Ip(a.CSS_MEDIA_VARS,d));let h=vo(a.cssSkinVars,a.cssSkinFallback,d);Object.keys(h).length&&vt(h)}finally{X()}}}else if(u){let h=O();h&&(h.__domDocument=n),a=Gn(s,{key:t,document:n,files:e.files,assets:e.assets,scopeSelector:d,...jp,...i,...r}),a&&a!==h&&(a.__domDocument=n),c&&qx.add(n),Kx=!0}else{let h=Nc(t,s,{cleanBase:!0});for(let m in i)h[m]=i[m];if(h.__domDocument=n,f){let m=t.replace(/[^a-zA-Z0-9]/g,"").substring(0,6);e.cssPrefix=m,h.varPrefix=m}J(h);try{a=Gn(h,{key:t,document:n,files:e.files,assets:e.assets,scopeSelector:d,...jp,...i,...r})}finally{X()}c&&qx.add(n),Kx=!0}let p=a?.CONFIG||a,g=p?.font;if(g){J(p);try{KP(g)}finally{X()}}return[a,o]},lL=(t,e)=>{let n={};e.state&&ft(n,e.state),t&&t.state&&ft(n,t.state);let r=e.polyglot;if(r?.translations){let o=null;try{typeof localStorage<"u"&&(o=localStorage.getItem(r.storageLangKey||"smbls_lang")||localStorage.getItem("lang"))}catch{}let s=o||n.lang||r.defaultLang||"en";o&&o!==n.lang&&(n.lang=o);let i=new Set,a=new Set,c=(u,d)=>{if(!a.has(u)){if(!eo(e,u,n)){i.add(u);return}n[u]=d,a.add(u),mn(e,u,d)}},l=r.translations[s];if(l&&typeof l=="object")for(let u in l)c(u,l[u]);let f=new Set(r.languages||[]);for(let u in r.translations)f.has(u)||c(u,r.translations[u]);i.size&&r.verbose!==!1&&e.verbose!==!1&&console.warn(`[polyglot] ${i.size} translation key${i.size===1?"":"s"} collide${i.size===1?"s":""} with a declared root-state key (${[...i].join(", ")}) \u2014 the declared value wins and the translation is NOT seeded into state. Rename the translation key, or read it with \`{{ key | polyglot }}\` instead of a bare \`{{ key }}\`.`)}return n.isRootState=!0,ut(n)},fL=(t,e)=>{A(t.routes)&&A(e.pages)&&xt(t.routes,e.pages);let n=t.routes||e.pages||{},r=[];for(let o in n){if(o.charCodeAt(0)===47)continue;let i="/"+(o==="index"?"":o);Object.prototype.hasOwnProperty.call(n,i)?r.push(`${o} -> ${i}`):n[i]=n[o],delete n[o]}return r.length&&e&&e.verbose!==!1&&console.warn(`[smbls] preparePages kept ${r.length} explicitly declared route${r.length===1?"":"s"} over a same-named page key (${r.join(", ")}). A bare page NAME never overwrites a declared '/route'. This usually means a shared library ships a page under its export name that collides with one of your routes \u2014 add it to that library's ignoreList if you did not intend the collision.`),n},uL=t=>{vc(t,t.sharedLibraries)};var ff={polyglot:Zl,getLocalStateLang:ef,getActiveLang:$r,getLang:$r,setLang:Jl,getPendingLang:Yl,getLanguages:Xl,loadTranslations:Ql,upsertTranslation:tf};nc();I();I();var rh=new Set(["__proto__","constructor","prototype"]),Yx=t=>{if(!Array.isArray(t))return!1;for(let e=0;e<t.length;e++)if(rh.has(t[e]))return!1;return!0},dL=(t,e)=>{!t||!Yx(e)||e.reduce((n,r,o,s)=>{if(n&&r in n){if(o!==s.length-1)return n[r];delete n[r]}},t)},pL=(t,e,n,r=!1)=>{!t||!Yx(e)||e.reduce((o,s,i,a)=>{if(o){if(i!==a.length-1)return!o[s]&&r&&(o[s]={}),o[s];o[s]=n}},t)},oh=(t,e)=>{let n=new Set;if(!Array.isArray(e))return n;for(let[r,o,s]of e)if(!(!Array.isArray(o)||!o.length))switch(n.add(o[0]),r){case"delete":dL(t,o);break;case"update":case"set":pL(t,o,s,!0);break;default:break}return n},hL=(t,e)=>{if(!e||typeof e!="object"||Array.isArray(e))return null;let n=t&&(t.__raw||t)||{},r=null;for(let o of Object.keys(e))rh.has(o)||Object.prototype.hasOwnProperty.call(n,o)||(r||(r={}),r[o]=e[o]);return r},uf=(t,e)=>{!t||!e||typeof e!="object"||(t.__rawDesignSystem=JSON.parse(JSON.stringify(e)))},gL=(t,e,n,r="designSystem")=>{for(let o in e){if(rh.has(o))continue;let s=`${r}/${o}`;if(n.has(s))continue;let i=e[o],a=t[o];if(i&&typeof i=="object"&&!Array.isArray(i)){if(!a||typeof a!="object"||Array.isArray(a)){if(o in t)continue;t[o]={}}gL(t[o],i,n,s)}else o in t||(t[o]=Array.isArray(i)?JSON.parse(JSON.stringify(i)):i)}},Xx=(t,e)=>{if(!t||!t.__rawDesignSystem)return null;if(Array.isArray(e)&&e.length){let o={designSystem:t.__rawDesignSystem};oh(o,e)}let n=JSON.parse(JSON.stringify(t.__rawDesignSystem)),r=Array.isArray(t.sharedLibraries)?t.sharedLibraries:[];return Ec(n,r,gL)};I();var mL=(t,e,n)=>{let r=!1;return(o={})=>{let{data:s}=o,{schema:i}=o;s&&(s=t.call("deepDestringifyFunctions",s,Array.isArray(s)?[]:{}),Object.entries(s).forEach(([a,c])=>{if(n[a]&&typeof n[a]=="object")if(a==="designSystem"){if(uf(n,c),r){let l=Xx(n);l&&Gn(l)}}else to(n[a],c);else n[a]=c}),r=!0,i&&(n.schema=i))}},yL=(t,e,n)=>(r={})=>{let{changes:o}=r;if(!o||!Array.isArray(o)||!o.length)return;o=t.call("deepDestringifyFunctions",o,Array.isArray(o)?[]:{});let s=o.filter(c=>Array.isArray(c)&&Array.isArray(c[1])&&c[1][0]==="designSystem"),i=s.length?o.filter(c=>!s.includes(c)):o,a=oh(n,i);if(s.length&&a.add("designSystem"),a.has("designSystem")){let c=Xx(n,s);c?Gn(c):n.__warnedNoRawDesignSystem||(n.__warnedNoRawDesignSystem=!0,console.warn("[sync] design-system op ignored: no raw design system was seeded on this client. Re-initing from the processed config would corrupt every token, so the update is skipped \u2014 reload to pick it up. Seed it at boot with seedRawDesignSystem(ctx, ds)."))}if(a.has("state")){let c=hL(e,n.state);if(c){let l=typeof e.$update=="function"?e.$update:e.update;typeof l=="function"&&l.call(e,c)}}if(["pages","components","snippets","functions","assets"].some(c=>a.has(c))){let{pathname:c,search:l,hash:f}=n.window.location;t.call("router",c+l+f,t.__ref.root,{},{scrollToTop:!1,force:!0})}};var _5={success:"green",error:"red",warning:"yellow"},bL=(t,e,n)=>{if(t.symbols){if(!n.connected){n.notifications.connected={title:"Connected",message:"to the Symbols live server"},n.update({connected:!0});let r=setTimeout(()=>{delete n.notifications.connected,e.notifications.content.connected.update({animation:"fadeOutDown"}),n.update({connected:!0}),clearTimeout(r)},3e3)}}else if(n.connected){n.notifications.connected={title:"Disconnected",type:"error"},n.update({connected:!1});let r=setTimeout(()=>{delete n.notifications.connected,e.notifications.content.connected&&e.notifications.content.connected.update({animation:"fadeOutDown"}),n.update({connected:!0}),clearTimeout(r)},3e3)}},_L={state:{notifications:[]},Notifications:{position:"fixed",left:"A2",bottom:"Z2",zIndex:"999",childExtends:"Notification",childProps:({state:t})=>({animationDuration:"C",background:_5[t.type||"success"],icon:null,Flex:{Title:{text:"{{ title }}"},P:{text:"{{ title }}"}},onRender:(e,n,r)=>{n.update({animation:"fadeInUp"})},onClick:(e,n,r)=>{delete r.notifications[n.key],n.update({animation:"fadeOutDown"}),r.onClose&&r.onClose(e,n,r)}}),IconText:null,childrenAs:"state",children:({state:t})=>t.notifications}};var t6=!1,e6=()=>t6?"http://localhost:8080":"https://api.symbols.app",n6=t=>{let e=t&&t.editor&&t.editor.socketUrl||t&&t.settings&&t.settings.socketUrl;return typeof e=="string"&&e?{mode:"collab",baseUrl:e}:t&&t.editor&&t.editor.runtime==="runner"?{mode:"runner",baseUrl:null}:{mode:null,baseUrl:null}},x0=null,r6=()=>(x0||(x0=Promise.resolve().then(()=>(uD(),fD)).then(t=>{let e=t&&(t.io||t.default);if(typeof e!="function")throw new TypeError("socket.io-client exports no io()");return e}).catch(t=>(console.warn("[sync] socket.io-client failed to load \u2014 live sync disabled",t),null))),x0),o6=async t=>{try{let e=t||e6(),n=await T.fetch(`${e}/service-token`,{method:"GET"}),r;try{let o=await n.clone().json();if(o&&typeof o.token=="string")return o.token.trim();r=await n.text()}catch{r=await n.text()}return(r||"").replace(/\s+/gu,"")||void 0}catch(e){console.error("[sync] Failed to fetch service-token",e)}},hD=(t,e,n,r)=>{t.on("snapshot",mL(e,n,r)),t.on("ops",yL(e,n,r)),t.on("clients",o=>{r.editor?.verbose&&bL(o,e,n)}),t.on("disconnect",o=>{r.editor?.verbose&&console.info("[sync] disconnected",o)})},s6=async(t,e,n,r,o)=>{let s=await o6(r);if(!s)return console.warn("[sync] no service token \u2014 collab disabled"),null;let i=n.key;if(!i)return console.warn("[sync] ctx.key missing \u2014 collab cannot authenticate"),null;let a=n.editor?.projectId||null,c=await o;if(!c)return null;let l=c(r,{path:"/collab-socket",transports:["websocket"],auth:{token:s,projectId:a,projectKey:i,branch:"main",live:!0,clientType:"platform"},reconnectionAttempts:1/0,reconnectionDelayMax:4e3});return l.on("connect",()=>{n.editor?.verbose&&console.info("[sync] connected (collab)")}),hD(l,t,e,n),l},i6=async(t,e,n,r)=>{let o=await r;if(!o)return null;let s=o({transports:["websocket","polling"],reconnectionAttempts:1/0,reconnectionDelayMax:4e3});return s.on("connect",()=>{n.editor?.verbose!==!1&&console.info("[sync] connected (runner)")}),hD(s,t,e,n),s.on("reload",()=>{typeof T<"u"&&T.location&&T.location.reload()}),s},a6=async(t,e,n)=>{let{mode:r,baseUrl:o}=n6(n);if(!r)return null;let s=r6();return r==="collab"?s6(t,e,n,o,s):r==="runner"?i6(t,e,n,s):null},c6={onInit:a6};var gD=t=>typeof t>"u",dD=t=>!!(t?.editor?.socketUrl||t?.settings?.socketUrl),pD=t=>t?.editor?.runtime==="runner",mD=(t,e)=>{Array.isArray(t.extends)?t.extends.push(e):t.extends?t.extends=[t.extends,e]:t.extends=[e]},yD={name:"sync",beforeCreate(t,e){let n=e&&e.editor;(n&&!gD(n.liveSync)?n.liveSync:dD(e)||pD(e))&&(dD(e)&&!pD(e)&&!e?.key||mD(t,c6))}},bD={name:"notifications",beforeCreate(t,e){if(!e)return;let n=gD(e.notifications)?null:e.notifications,r=e.editor&&e.editor.verbose===!0;(n===!0||n!==!1&&r)&&mD(t,_L)}};var E0={};F(E0,{AlertTemplate:()=>Ph,ConfirmTemplate:()=>Rh,CustomTemplate:()=>Dh,ModalLayer:()=>Oh,ModalRoot:()=>Th,PromptTemplate:()=>Lh,windowsComponents:()=>v0});var k0={};F(k0,{alertDialog:()=>Ah,closeAllModals:()=>vh,closeModal:()=>xh,confirmDialog:()=>Eh,getLayer:()=>Sh,openModal:()=>kh,promptDialog:()=>Ch,windowsFunctions:()=>nr});function st(t){let e=t;for(;e;){if(e.layer!==void 0)return e.layer;e=e.parent}return null}function Gi(t){let e=t;for(;e;){if(e.key==="ModalRoot")return e;if(e.ModalRoot&&e.ModalRoot.__ref)return e.ModalRoot;e=e.parent}let n=t?.getRoot?.();return n?.ModalRoot?n.ModalRoot:typeof globalThis<"u"&&globalThis.__SMBLS_WINDOWS_MODAL_ROOT__?.__ref?globalThis.__SMBLS_WINDOWS_MODAL_ROOT__:null}function Sh(){return st(this)}var l6=(t,e)=>{let n=t&&t["ModalLayer_"+e],r=n?.node||n?.__ref?.node;!r||typeof r.style?.setProperty!="function"||(r.style.setProperty("display","none","important"),r.style.setProperty("opacity","0","important"),r.style.setProperty("visibility","hidden","important"),r.style.setProperty("pointer-events","none","important"))},_D=(t,e)=>{let n=t&&t["ModalLayer_"+e],r=n?.node||n?.__ref?.node;!r||typeof r.style?.removeProperty!="function"||(r.style.removeProperty("display"),r.style.removeProperty("opacity"),r.style.removeProperty("visibility"),r.style.removeProperty("pointer-events"))};function xh(t){let e=Gi(this);if(!e)return;let n=e.state?.stack||[];if(!n.length)return;let r,o,s;if(t){if(s=[],r=n.filter((i,a)=>{let c=i.id!==t;return c||s.push(a),c}),r.length===n.length)return;o=n.filter(i=>i.id===t)}else r=n.slice(0,-1),o=n.slice(-1),s=[n.length-1];e.state.update({stack:r});for(let i of s)l6(e,i);for(let i of o)if(typeof i.onClose=="function")try{i.onClose()}catch(a){console.warn("[windows] onClose threw:",a)}}function kh(t={}){let e=Gi(this);if(!e)return console.warn("[windows] openModal: ModalRoot is not mounted on the app root. Add `ModalRoot: {}` to your shell tree and import windowsComponents into context."),null;e.__modalIdCounter=(e.__modalIdCounter||0)+1;let n=t.id||`modal_${e.__modalIdCounter}_${Date.now().toString(36)}`,r={id:n,template:t.template||"custom",title:t.title,message:t.message,icon:t.icon,confirmText:t.confirmText,cancelText:t.cancelText,okText:t.okText,confirmTheme:t.confirmTheme,placeholder:t.placeholder,defaultValue:t.defaultValue,dismissOnBackdrop:t.dismissOnBackdrop,content:t.content,width:t.width,maxWidth:t.maxWidth,maxHeight:t.maxHeight,onConfirm:t.onConfirm,onCancel:t.onCancel,onOk:t.onOk,onClose:t.onClose},o=e.state?.stack||[];if(o.length>=5)return console.warn("[windows] openModal: stack already at the 5-layer maximum, dropping the new layer. Close some modals first."),null;let s=o.length;return _D(e,s),e.state.update({stack:[...o,r]}),n}function vh(){let t=Gi(this);!t||!t.state?.stack?.length||t.state.update({stack:[]})}function Eh(t){let e=typeof t=="string"?{message:t}:t||{};return this.call("openModal",{...e,template:"confirm"})}function Ah(t){let e=typeof t=="string"?{message:t}:t||{};return this.call("openModal",{...e,template:"alert"})}function Ch(t){let e=typeof t=="string"?{message:t}:t||{};return this.call("openModal",{...e,template:"prompt"})}var nr={openModal:kh,closeModal:xh,closeAllModals:vh,confirmDialog:Eh,alertDialog:Ah,promptDialog:Ch,getLayer:Sh};var f6=["a[href]","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(","),wD=t=>{if(!t?.querySelectorAll)return[];let e=t.querySelectorAll(f6),n=[];for(let r=0;r<e.length;r++){let o=e[r];(o.offsetParent!==null||o===document.activeElement)&&n.push(o)}return n},SD=t=>{let e=t.state?.stack||[];if(!e.length)return null;let n=t["ModalLayer_"+(e.length-1)];return n?.node||n?.__ref?.node||null},Th={tag:"div",position:"fixed",inset:"0",zIndex:"2000",pointerEvents:"none",state:{stack:[]},subscribeTo:["stack"],ModalLayer_0:{__slotIndex:0,subscribeTo:["stack"],layer:(t,e)=>e?.stack?.[0]||null,opacity:t=>t.layer?"1":"0",visibility:t=>t.layer?"visible":"hidden",pointerEvents:t=>t.layer?"auto":"none"},ModalLayer_1:{__slotIndex:1,subscribeTo:["stack"],layer:(t,e)=>e?.stack?.[1]||null,opacity:t=>t.layer?"1":"0",visibility:t=>t.layer?"visible":"hidden",pointerEvents:t=>t.layer?"auto":"none"},ModalLayer_2:{__slotIndex:2,subscribeTo:["stack"],layer:(t,e)=>e?.stack?.[2]||null,opacity:t=>t.layer?"1":"0",visibility:t=>t.layer?"visible":"hidden",pointerEvents:t=>t.layer?"auto":"none"},ModalLayer_3:{__slotIndex:3,subscribeTo:["stack"],layer:(t,e)=>e?.stack?.[3]||null,opacity:t=>t.layer?"1":"0",visibility:t=>t.layer?"visible":"hidden",pointerEvents:t=>t.layer?"auto":"none"},ModalLayer_4:{__slotIndex:4,subscribeTo:["stack"],layer:(t,e)=>e?.stack?.[4]||null,opacity:t=>t.layer?"1":"0",visibility:t=>t.layer?"visible":"hidden",pointerEvents:t=>t.layer?"auto":"none"},onInit:(t,e)=>{if(typeof window>"u")return;globalThis.__SMBLS_WINDOWS_MODAL_ROOT__=t;let n=t.context;if(n){n.functions||(n.functions={});for(let a in nr)a in n.functions||(n.functions[a]=nr[a])}t.__modalOpeners=t.__modalOpeners||[],t.__prevStackLen=t.state&&t.state.stack&&t.state.stack.length||0;let r=()=>{let a=t.state?.stack||[];if(!a.length)return;let c=a.length-1,l=a[c];t.state.update({stack:a.slice(0,-1)});let f=t["ModalLayer_"+c],u=f?.node||f?.__ref?.node;if(u?.style?.setProperty&&(u.style.setProperty("display","none","important"),u.style.setProperty("opacity","0","important"),u.style.setProperty("visibility","hidden","important"),u.style.setProperty("pointer-events","none","important")),typeof l?.onClose=="function")try{l.onClose()}catch(d){console.warn("[windows] onClose threw:",d)}},o=a=>{let c=t.state?.stack;if(c?.length){if(a.key==="Tab"){let l=SD(t);if(!l)return;let f=wD(l);if(!f.length){a.preventDefault();let g=l.querySelector?.('[role="dialog"]')||l;try{g.focus?.()}catch{}return}let u=f[0],d=f[f.length-1],p=document.activeElement;if(!l.contains(p)){a.preventDefault();try{u.focus()}catch{}return}if(a.shiftKey&&p===u){a.preventDefault();try{d.focus()}catch{}}else if(!a.shiftKey&&p===d){a.preventDefault();try{u.focus()}catch{}}return}a.key!=="Escape"||a.defaultPrevented||c[c.length-1]?.dismissOnBackdrop!==!1&&(a.preventDefault(),r())}};window.addEventListener("keydown",o),t.__escHandler=o;let s=a=>{let c=t.state?.stack||[];if(a<0||a>=c.length)return;let l=c[a];t.state.update({stack:c.filter((d,p)=>p!==a)});let f=t["ModalLayer_"+a],u=f?.node||f?.__ref?.node;if(u?.style?.setProperty&&(u.style.setProperty("display","none","important"),u.style.setProperty("opacity","0","important"),u.style.setProperty("visibility","hidden","important"),u.style.setProperty("pointer-events","none","important")),typeof l?.onClose=="function")try{l.onClose()}catch(d){console.warn("[windows] onClose threw:",d)}},i=a=>{let c=t.state?.stack||[];if(!c.length)return;let l=a.target?.closest?.('[data-key="Close"]');if(l){for(let f=c.length-1;f>=0;f--){let u=t["ModalLayer_"+f],d=u?.node||u?.__ref?.node;if(d&&d.contains(l)){a.preventDefault(),a.stopPropagation(),s(f);return}}return}for(let f=c.length-1;f>=0;f--){let u=t["ModalLayer_"+f];if((u?.node||u?.__ref?.node)===a.target){if(c[f]?.dismissOnBackdrop===!1)return;a.preventDefault(),a.stopPropagation(),s(f);return}}};document.addEventListener("click",i,!0),t.__clickDelegate=i},onUpdate:t=>{if(typeof window>"u")return;let e=(t.state&&t.state.stack||[]).length,n=t.__prevStackLen||0;if(e!==n)if(t.__prevStackLen=e,t.__modalOpeners=t.__modalOpeners||[],e>n)t.__modalOpeners[e]=document.activeElement&&document.activeElement!==document.body?document.activeElement:t.__modalOpeners[e]||null,typeof requestAnimationFrame=="function"&&requestAnimationFrame(()=>{let r=SD(t);if(!r)return;let o=wD(r)[0]||r.querySelector&&r.querySelector('[role="dialog"]')||r;try{o.focus&&o.focus()}catch{}});else{let r=null;for(let o=n;o>e;o--)t.__modalOpeners[o]&&(r=r||t.__modalOpeners[o]),t.__modalOpeners[o]=null;if(r&&typeof r.focus=="function"&&r.isConnected!==!1)try{r.focus()}catch{}}},onDestroy:t=>{typeof window>"u"||(globalThis.__SMBLS_WINDOWS_MODAL_ROOT__===t&&(globalThis.__SMBLS_WINDOWS_MODAL_ROOT__=null),t.__escHandler&&(window.removeEventListener("keydown",t.__escHandler),delete t.__escHandler),t.__clickDelegate&&(document.removeEventListener("click",t.__clickDelegate,!0),delete t.__clickDelegate))}};var Oh={tag:"div",position:"fixed",inset:"0",alignItems:"center",justifyContent:"center",padding:"A",theme:"backdrop",transition:"opacity C defaultBezier",zIndex:(t,e)=>`${2e3+(t.__slotIndex||0)*10}`,display:(t,e)=>t.layer?"flex":"none",opacity:(t,e)=>t.layer?"1":"0",visibility:(t,e)=>t.layer?"visible":"hidden",pointerEvents:(t,e)=>t.layer?"auto":"none",ModalWindow:{attr:{role:"dialog","aria-modal":"true",tabindex:"-1","aria-labelledby":t=>{let e=st(t)?.id;return e?"modal-title-"+e:null}},width:t=>st(t)?.width||"H",maxWidth:t=>st(t)?.maxWidth||"90vw",flow:"y",maxHeight:t=>st(t)?.maxHeight||"100%",animation:"modalIn",animationDuration:"D",animationTimingFunction:"springBezier",onClick:t=>t.stopPropagation(),onMousedown:t=>t.stopPropagation(),ModalHeader:{display:"none"},overflow:"visible",ConfirmTemplate:{hide:t=>st(t)?.template!=="confirm"},AlertTemplate:{hide:t=>st(t)?.template!=="alert"},PromptTemplate:{hide:t=>st(t)?.template!=="prompt"},CustomTemplate:{hide:t=>st(t)?.template!=="custom"}}};var Yi=(t,e,n)=>st(t)?.[e]||n,u6=t=>{let e=st(t)?.icon;return e===null||e===!1},Rh={tag:"div",flow:"y",gap:"B",flex:"1 1 auto",minHeight:"0",ModalHeader:{Hgroup:{H:{text:t=>Yi(t,"title","Are you sure?"),attr:{id:t=>{let e=st(t)?.id;return e?"modal-title-"+e:null}}},P:{if:()=>!1}},Icons:{hide:t=>u6(t),Indicator:{extends:"Icon",opacity:".7",icon:t=>Yi(t,"icon","warning")}}},ModalBody:{flex:"1 1 auto",minHeight:"0",overflowY:"auto",overscrollBehavior:"contain",P:{tag:"p",margin:"0",text:t=>Yi(t,"message","This action cannot be undone."),color:"dim"}},ModalFooter:{flow:"x",gap:"Z1",align:"center end",flexShrink:"0",CancelBtn:{extends:"CancelButton",text:t=>Yi(t,"cancelText","Cancel"),onClick:(t,e,n)=>{let r=st(e);if(r?.onCancel)try{r.onCancel()}catch(o){console.warn("[windows] confirm.onCancel threw:",o)}e.call("closeModal",r?.id)}},ConfirmBtn:{extends:"Button",theme:t=>Yi(t,"confirmTheme","primary"),text:t=>Yi(t,"confirmText","Confirm"),onClick:(t,e,n)=>{let r=st(e);if(r?.onConfirm)try{r.onConfirm()}catch(o){console.warn("[windows] confirm.onConfirm threw:",o)}e.call("closeModal",r?.id)}}}};var xf=(t,e,n)=>st(t)?.[e]||n,Ph={tag:"div",flow:"y",gap:"B",flex:"1 1 auto",minHeight:"0",ModalHeader:{Hgroup:{H:{text:t=>xf(t,"title","Notice"),attr:{id:t=>{let e=st(t)?.id;return e?"modal-title-"+e:null}}},P:{if:()=>!1}},Icons:{Indicator:{extends:"Icon",opacity:".7",icon:t=>xf(t,"icon","info")}}},ModalBody:{flex:"1 1 auto",minHeight:"0",overflowY:"auto",overscrollBehavior:"contain",hide:t=>!xf(t,"message",""),P:{tag:"p",margin:"0",text:t=>xf(t,"message",""),color:"dim"}},ModalFooter:{flow:"x",align:"center end",flexShrink:"0",OkBtn:{extends:"Button",theme:"primary",text:t=>xf(t,"okText","OK"),onClick:(t,e,n)=>{let r=st(e);if(r?.onOk)try{r.onOk()}catch(o){console.warn("[windows] alert.onOk threw:",o)}e.call("closeModal",r?.id)}}}};var Xi=(t,e,n)=>st(t)?.[e]||n,Lh={tag:"div",flow:"y",gap:"B",flex:"1 1 auto",minHeight:"0",scope:{value:""},onRender:(t,e)=>{let n=st(t);if(!n||t.scope._seededLayerId===n.id)return;t.scope._seededLayerId=n.id,t.scope.value=n.defaultValue||"";let r=t.InputRow&&t.InputRow.node;r&&(r.value=t.scope.value)},onUpdate:(t,e)=>{let n=st(t);if(!n||t.scope._seededLayerId===n.id)return;t.scope._seededLayerId=n.id,t.scope.value=n.defaultValue||"";let r=t.InputRow&&t.InputRow.node;r&&(r.value=t.scope.value)},ModalHeader:{Hgroup:{H:{text:t=>Xi(t,"title","Enter a value"),attr:{id:t=>{let e=st(t)?.id;return e?"modal-title-"+e:null}}},P:{if:()=>!1}}},ModalBody:{flex:"1 1 auto",minHeight:"0",overflowY:"auto",overscrollBehavior:"contain",hide:t=>!Xi(t,"message",""),P:{tag:"p",margin:"0",text:t=>Xi(t,"message",""),color:"dim"}},InputRow:{extends:"Input",flexShrink:"0",autofocus:!0,placeholder:t=>Xi(t,"placeholder",""),value:(t,e)=>t.parent.scope?.value||"",onInput:(t,e,n)=>{e.parent.scope.value=t.target.value},onKeydown:(t,e,n)=>{if(t.key!=="Enter")return;t.preventDefault();let r=st(e),o=e.parent.scope?.value||"";if(r?.onConfirm)try{r.onConfirm(o)}catch(s){console.warn("[windows] prompt.onConfirm threw:",s)}e.call("closeModal",r?.id)}},ModalFooter:{flow:"x",gap:"Z1",align:"center end",flexShrink:"0",CancelBtn:{extends:"CancelButton",text:t=>Xi(t,"cancelText","Cancel"),onClick:(t,e,n)=>{let r=st(e);if(r?.onCancel)try{r.onCancel()}catch(o){console.warn("[windows] prompt.onCancel threw:",o)}e.call("closeModal",r?.id)}},ConfirmBtn:{extends:"Button",theme:"primary",text:t=>Xi(t,"confirmText","OK"),onClick:(t,e,n)=>{let r=st(e),o=e.parent.parent.scope?.value||"";if(r?.onConfirm)try{r.onConfirm(o)}catch(s){console.warn("[windows] prompt.onConfirm threw:",s)}e.call("closeModal",r?.id)}}}};var Dh={tag:"div",flow:"y",gap:"B",flex:"1 1 auto",minHeight:"0",Title:{tag:"h2",text:t=>st(t)?.title||"",hide:t=>!st(t)?.title,position:"absolute",width:"1px",height:"1px",margin:"-1px",padding:"0",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:"0",attr:{id:t=>{let e=st(t)?.id;return e?"modal-title-"+e:null}}},Slot:{tag:"div",flex:"1 1 auto",minHeight:"0",overflowY:"auto",overscrollBehavior:"contain",onInit:t=>{let e=K(()=>{let n=st(t),r=n?.content||null,o=n?.id||null;if(!r){t.__lastLayerId!=null&&(t.removeContent(),t.__lastLayerId=null);return}if(t.__lastLayerId!==o){t.__lastLayerId=o;try{t.set(r);let s=t.content?.context;if(s){s.functions||(s.functions={});for(let i in nr)i in s.functions||(s.functions[i]=nr[i])}}catch(s){console.warn("[windows] custom.content set failed:",s)}}});t.__ref&&t.__ref.__effects.push(e)}}};var xD={extends:"Button",theme:"tertiary"};var v0={ModalRoot:Th,ModalLayer:Oh,ConfirmTemplate:Rh,AlertTemplate:Ph,PromptTemplate:Lh,CustomTemplate:Dh,"smbls.CancelButton":xD};var P0={};F(P0,{Dropdown:()=>jh,DropdownList:()=>Bh,DropdownParent:()=>Uh,DropdownParentFocus:()=>Vh,DropdownRoot:()=>Nh,DropdownSiblingFocus:()=>zh,DropdownTrigger:()=>Fh,dropdownComponents:()=>R0});var kD=(t,e,n)=>({bottom:n-t.bottom,top:t.top,right:e-t.right,left:t.left}),d6=(t,e,n,r)=>{let o=kD(t,n,r),s=i=>o[i]>=e.height+8;return s("bottom")?"bottom":s("top")?"top":o.bottom>=o.top?"bottom":"top"},p6=(t,e,n,r,o)=>{let s=kD(e,r,o),i=t==="top"||t==="bottom"?n.height+8:n.width+8;if(s[t]>=i)return t;let a={top:"bottom",bottom:"top",left:"right",right:"left"}[t];return a&&s[a]>=i||a&&s[a]>s[t]?a:t};var A0=(t,e,n)=>{let r;return t==="bottom"?r=n-e.bottom-16:t==="top"?r=e.top-16:r=n-16,Math.max(40,Math.floor(r))},Ih=(t,e,n)=>Math.max(e,Math.min(n,t)),rr=(t,e,n="auto")=>{if(!t){let g=typeof window<"u"?window.innerHeight:768;return{left:0,top:0,side:"bottom",align:"start",maxHeight:A0("center",null,g)}}let r=typeof window<"u"?window.innerWidth:1024,o=typeof window<"u"?window.innerHeight:768,s={width:Math.max(120,e?.width||0),height:Math.max(40,e?.height||0)};if(n==="center"){let g=A0("center",t,o),h=Math.min(s.height,g),m=Ih((r-s.width)/2,8,Math.max(8,r-s.width-8)),y=Ih((o-h)/2,8,Math.max(8,o-h-8));return{left:m,top:y,side:"center",align:"center",maxHeight:g}}let i,a;if(n==="auto")i=d6(t,s,r,o),a="start";else{let g=n.split("-");i=g[0],a=g[1]||"start",i=p6(i,t,s,r,o)}let c=A0(i,t,o),l=Math.min(s.height,c),f,u;i==="bottom"||i==="top"?(a==="start"?f=t.left:a==="end"?f=t.right-s.width:f=t.left+(t.width-s.width)/2,u=i==="bottom"?t.bottom+8:t.top-l-8):(a==="start"?u=t.top:a==="end"?u=t.bottom-l:u=t.top+(t.height-l)/2,f=i==="right"?t.right+8:t.left-s.width-8);let d=Math.max(8,r-s.width-8),p=Math.max(8,o-l-8);return f=Ih(f,8,d),u=Ih(u,8,p),{left:f,top:u,side:i,align:a,maxHeight:c}},Zi=t=>{switch(t){case"bottom":return"translateY(-6px)";case"top":return"translateY(6px)";case"left":return"translateX(6px)";case"right":return"translateX(-6px)";case"center":return"translateY(0px)";default:return"translateY(-6px)"}};var jr={placement:"auto",trigger:"click",offset:8,minWidth:"180px",maxWidth:"90vw",maxHeight:null},h6=t=>{if(!t||typeof t.getBoundingClientRect!="function")return null;let e=t.getBoundingClientRect();return{left:e.left,top:e.top,right:e.right,bottom:e.bottom,width:e.width,height:e.height}},C0=t=>t?.getRoot?.()?.DropdownRoot||null,g6=0,m6=()=>`dropdown_${++g6}_${Date.now().toString(36)}`;function $h(t={}){let e=C0(this);if(!e)return console.warn("[dropdown] openDropdown: DropdownRoot is not mounted on the app root. Add `DropdownRoot: {}` to your shell tree and import dropdown components into context."),null;let n=t.anchorEl?.node||t.anchorEl,r=t.anchorRect||h6(n);if(!r)return console.warn("[dropdown] openDropdown: no anchor element/rect provided \u2014 pass anchorEl or anchorRect."),null;let o=t.id||m6(),s=t.restoreEl?.node||t.restoreEl||n||(typeof document<"u"?document.activeElement:null),i={id:o,content:t.content||null,anchor:r,placement:t.placement||jr.placement,trigger:t.trigger||jr.trigger,offset:t.offset??jr.offset,minWidth:t.minWidth||jr.minWidth,maxWidth:t.maxWidth||jr.maxWidth,maxHeight:t.maxHeight||jr.maxHeight,theme:t.theme||null,shadow:t.shadow||null,background:t.background||null,round:t.round||null,role:t.role||null,ariaLabel:t.ariaLabel||null,ariaLabelledby:t.ariaLabelledby||null,focusIn:!!t.focusIn,onOpen:t.onOpen,onClose:t.onClose,restoreEl:s},a=e.state?.layer;if(a?.onClose)try{a.onClose(a)}catch(c){console.warn("[dropdown] prev onClose threw:",c)}if(e.state.update({layer:i}),typeof i.onOpen=="function")try{i.onOpen(i)}catch(c){console.warn("[dropdown] onOpen threw:",c)}return o}function Mh(t){let e=C0(this);if(!e)return;let n=e.state?.layer;n&&e.state.update({layer:{...n,inert:!!t}})}function ns(t){let e=C0(this);if(!e)return;let n=e.state?.layer;if(!n)return;let r=typeof t=="string"?t:t?.id;if(r&&n.id&&r!==n.id)return;let o=n.onClose,s=n.restoreEl,i=typeof document<"u"?document:null,a=i?i.activeElement:null,c=e.node?.querySelector?.('[data-smbls-dropdown="panel"]'),l=!a||a===i?.body,f=!!(c&&a&&c.contains(a)),u=l||f;if(e.state.update({layer:null}),u&&s&&typeof s.focus=="function")try{s.focus()}catch(d){console.warn("[dropdown] focus restore threw:",d)}if(typeof o=="function")try{o(n)}catch(d){console.warn("[dropdown] onClose threw:",d)}}var T0=(t,e)=>{let n=`${e.maxHeight}px`;return t?.maxHeight?`min(${t.maxHeight}, ${n})`:n},vD=t=>{let e=t.getBoundingClientRect();return{width:e.width,height:Math.max(e.height,t.scrollHeight||0)}},y6=`
|
|
100
100
|
@keyframes smbls-dropdown-fade-in {
|
|
101
101
|
from { opacity: 0; transform: var(--smbls-dropdown-from, translateY(-6px)) scale(0.98); }
|
|
102
102
|
to { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
|
|
@@ -163,13 +163,13 @@ ${a}`}var YS=null;function Dp(t){YS=t}var sn={structuralHash:Rp,deepEqual:Pp,mer
|
|
|
163
163
|
[data-smbls-dropdown="panel"]:not([data-smbls-shadowed]) {
|
|
164
164
|
box-shadow: none !important;
|
|
165
165
|
}
|
|
166
|
-
`,y6=()=>{if(typeof document>"u"||document.getElementById("smbls-dropdown-css"))return;let t=document.createElement("style");t.id="smbls-dropdown-css",t.textContent=m6,document.head.appendChild(t)},vD=(t,e)=>{if(!t.node)return;let n=e?.background;if(!n)t.node.removeAttribute("data-smbls-surface");else{let r=/^[a-z][\w.+-]*$/i.test(n)?`var(--color-${n})`:n;t.node.style.setProperty("--smbls-dropdown-surface",r),t.node.setAttribute("data-smbls-surface","")}e?.theme?t.node.setAttribute("data-smbls-themed",""):t.node.removeAttribute("data-smbls-themed"),e?.shadow||t.scope?.bodyShadow?t.node.setAttribute("data-smbls-shadowed",""):t.node.removeAttribute("data-smbls-shadowed")},b6=t=>{if(!t)return null;let e=typeof t.shadow=="function"?t.shadow(t,t.state):t.shadow;return typeof e=="string"&&e?e:null},_6=t=>{t.node&&(t.node.removeAttribute("data-smbls-open"),t.node.offsetWidth,t.node.setAttribute("data-smbls-open","true"))},w6=[["role","role"],["aria-label","ariaLabel"],["aria-labelledby","ariaLabelledby"]],ED=(t,e)=>{if(!t.node)return;let n=new Set;for(let[r,o]of w6){let s=e?.[o];s&&(t.node.setAttribute(r,s),n.add(r))}if(t.__a11yAttrs)for(let r of t.__a11yAttrs)n.has(r)||t.node.removeAttribute(r);t.__a11yAttrs=n,t.__panelTabindex&&(t.node.removeAttribute("tabindex"),t.__panelTabindex=!1)},S6='a[href], button, input:not([type="hidden"]), select, textarea, summary, [tabindex], [contenteditable]:not([contenteditable="false"])',x6=t=>{let e=t.node;if(e){for(let n of e.querySelectorAll(S6)){if(n.matches(":disabled"))continue;let r=n.getAttribute("tabindex");if(!(r!==null&&parseInt(r,10)<0)&&(n.focus({preventScroll:!0}),e.ownerDocument.activeElement===n))return}e.setAttribute("tabindex","-1"),t.__panelTabindex=!0,e.focus({preventScroll:!0})}},Nh={tag:"div",attr:{"data-smbls-dropdown-root":"true"},position:"fixed",inset:"0",zIndex:"1500",pointerEvents:"none",state:{layer:null},onInit:t=>{if(y6(),typeof window>"u")return;let e=r=>{r.key!=="Escape"||r.defaultPrevented||t.state?.layer&&(r.preventDefault(),es.call(t))};window.addEventListener("keydown",e),t.__dropdownEscHandler=e;let n=r=>{let o=t.state?.layer;if(!o)return;let s=t.node?.querySelector('[data-smbls-dropdown="panel"]');if(s&&s.contains(r.target))return;let i=o.anchor;if(i){let a=r.clientX,c=r.clientY;if(a>=i.left&&a<=i.right&&c>=i.top&&c<=i.bottom)return}es.call(t)};document.addEventListener("mousedown",n,!0),t.__dropdownClickHandler=n},onRemove:t=>{typeof window>"u"||(t.__dropdownEscHandler&&window.removeEventListener("keydown",t.__dropdownEscHandler),t.__dropdownClickHandler&&document.removeEventListener("mousedown",t.__dropdownClickHandler,!0))},PanelHost:{tag:"div",position:"fixed",inset:"0",pointerEvents:"none",subscribeTo:["layer"],layer:(t,e)=>e?.layer||null,Panel:{tag:"div",attr:{"data-smbls-dropdown":"panel"},position:"fixed",subscribeTo:["layer"],left:t=>{let e=t.parent?.layer;if(!e?.anchor)return"-9999px";let n=t._lastSize||{width:280,height:200};return rr(e.anchor,n,e.placement).left+"px"},top:t=>{let e=t.parent?.layer;if(!e?.anchor)return"-9999px";let n=t._lastSize||{width:280,height:200};return rr(e.anchor,n,e.placement).top+"px"},style:t=>{let e=t.parent?.layer;if(!e?.anchor)return{};let n=t._lastSize||{width:280,height:200};return{"--smbls-dropdown-from":Zi(rr(e.anchor,n,e.placement).side)}},minWidth:t=>t.parent?.layer?.minWidth||"180px",maxWidth:t=>t.parent?.layer?.maxWidth||"90vw",maxHeight:t=>{let e=t.parent?.layer;if(!e?.anchor)return"none";let n=t._lastSize||{width:280,height:200};return C0(e,rr(e.anchor,n,e.placement))},overflow:"auto",overscrollBehavior:"contain",padding:"0",round:t=>t.parent?.layer?.round||"radiusCard",theme:t=>t.parent?.layer?.theme||null,border:"none",borderWidth:"0",shadow:t=>t.parent?.layer?.shadow||t.scope?.bodyShadow||null,scope:{bodyShadow:null},animationDuration:"B",animationTimingFunction:"defaultBezier",pointerEvents:t=>{let e=t.parent?.layer;return e?e.inert?"none":"auto":"none"},opacity:t=>t.parent?.layer?"1":"0",onClick:t=>t.stopPropagation(),onInit:t=>{let e=K(()=>{let n=t.parent?.layer,r=n?.content||null,o=n?.id||null;if(!r){if(t.__lastLayerId!=null){try{t.removeContent?.()}catch{}t.__lastLayerId=null,ED(t,null),t.node?.removeAttribute("data-smbls-open"),t.scope&&(t.scope.bodyShadow=null)}return}if(t.__lastLayerId!==o){t.__lastLayerId=o;try{t.set(r)}catch(s){console.warn("[dropdown] content set failed:",s)}t.scope&&(t.scope.bodyShadow=b6(t.content)),vD(t,n),ED(t,n),_6(t),n.focusIn&&x6(t),!(typeof requestAnimationFrame>"u")&&requestAnimationFrame(()=>{if(!t.node)return;vD(t,n);let s=t.parent?.layer;if(!s?.anchor)return;let i=kD(t.node);t._lastSize=i;let a=rr(s.anchor,i,s.placement);t.node.style.maxHeight=C0(s,a),t.node.style.left=a.left+"px",t.node.style.top=a.top+"px",t.node.style.setProperty("--smbls-dropdown-from",Zi(a.side))})}});t.__ref&&t.__ref.__effects?.push(e)},onRender:t=>{if(!t?.node)return;let e=t.parent?.layer;if(!e?.anchor)return;let n=kD(t.node),r=t._lastSize;(!r||Math.abs(r.width-n.width)>1||Math.abs(r.height-n.height)>1)&&(t._lastSize=n);let o=rr(e.anchor,n,e.placement);t.node.style.maxHeight=C0(e,o),t.node.style.left=o.left+"px",t.node.style.top=o.top+"px",t.node.style.setProperty("--smbls-dropdown-from",Zi(o.side))}}}};var T0=t=>{let e=t?.getRoot?.()?.DropdownRoot?.state?.layer;if(e&&t.dropdownId&&e.id===t.dropdownId){t.call("closeDropdown");return}let n={anchorEl:t,trigger:t.dropdownTrigger||"click",placement:t.dropdownPlacement||"auto",content:t.dropdownContent||null,minWidth:t.dropdownMinWidth,maxWidth:t.dropdownMaxWidth,maxHeight:t.dropdownMaxHeight,theme:t.dropdownTheme,offset:t.dropdownOffset,id:t.dropdownId,onOpen:t.onDropdownOpen,onClose:t.onDropdownClose};for(let r in n)n[r]===void 0&&delete n[r];t.call("openDropdown",n)},Fh={position:"relative",onClick:(t,e)=>{(e.dropdownTrigger||"click")==="click"&&(t.preventDefault(),t.stopPropagation(),T0(e))},onFocus:(t,e)=>{e.dropdownTrigger==="focus"&&T0(e)},onMouseenter:(t,e)=>{e.dropdownTrigger==="hover"&&(e._hoverTimer&&clearTimeout(e._hoverTimer),e._hoverTimer=setTimeout(()=>T0(e),120))},onMouseleave:(t,e)=>{e.dropdownTrigger==="hover"&&(e._hoverTimer&&(clearTimeout(e._hoverTimer),e._hoverTimer=null),e._closeTimer=setTimeout(()=>e.call("closeDropdown"),250))}};var jh={attr:{dropdown:!0},position:"absolute",top:"100%",left:"0",zIndex:1e3,theme:"quaternary",padding:"Y",round:"Z2",flow:"column",gap:"X",transition:"transform B defaultBezier, opacity B defaultBezier, visibility B defaultBezier",transform:"translate3d(0,10%,0)",opacity:0,visibility:"hidden"},Bh={display:"flex",attr:{dropdown:!0},padding:"0 Y",maxHeight:"G",flow:"column",theme:"quaternary",overflow:"hidden auto",style:{listStyleType:"none"},transition:"transform B defaultBezier, opacity B defaultBezier, visibility B defaultBezier",children:t=>t.options||[],childrenAs:"props",".hidden":{transform:"translate3d(0,10%,0)",opacity:0,visibility:"hidden"},childExtends:{extends:"Button",state:{},isActive:({key:t,state:e})=>e.active===t,position:"relative",round:"0",align:"center flex-end",flow:"row-reverse",padding:"Z2 C Z2 Y2",margin:"0",gap:"Y2",theme:"quaternary .child",":hover":{style:{svg:{opacity:"0.5"}}},Icon:{isActive:({key:t,state:e})=>e.active===t,name:"checkmark",opacity:"0.1",".active":{opacity:"1"}},":not(:first-child)":{"@dark":{border:"solid gray4.65"},"@light":{border:"solid gray11"},borderWidth:"1px 0 0"}}},Uh={position:"relative",zIndex:999,":hover":{zIndex:1e3,"& [dropdown]":{transform:"translate3d(0,0,0)",opacity:1,visibility:"visible"}}},Vh={position:"relative",tabindex:"0",":focus-within":{zIndex:1e3,"& [dropdown]":{transform:"translate3d(0,0,0)",opacity:1,visibility:"visible"}},Input_trigger:{type:"checkbox",opacity:"0",position:"absolute",inset:"0",width:"100%",height:"100%",cursor:"pointer",onClick:(t,e)=>{e.node===document.activeElement&&e.node.blur()}},Dropdown:{onClick:()=>{document.activeElement?.blur()}}},zh={position:"relative",tabindex:"0",":focus-within":{zIndex:1e3,"& ~ [dropdown]":{transform:"translate3d(0,0,0)",opacity:1,visibility:"visible"}},Input_trigger:{type:"checkbox",opacity:"0",position:"absolute",inset:"0",width:"100%",height:"100%",cursor:"pointer",onClick:(t,e)=>{e.node===document.activeElement&&e.node.blur()}}};var O0={DropdownRoot:Nh,DropdownTrigger:Fh,Dropdown:jh,DropdownList:Bh,DropdownParent:Uh,DropdownParentFocus:Vh,DropdownSiblingFocus:zh};var L0={};F(L0,{DROPDOWN_DEFAULTS:()=>Fr,closeDropdown:()=>es,computePosition:()=>rr,dropdownFunctions:()=>P0,fadeInTransform:()=>Zi,openDropdown:()=>$h,setDropdownInert:()=>Mh});var P0={openDropdown:$h,closeDropdown:es,setDropdownInert:Mh};var k6=(t,e,n)=>({bottom:n-t.bottom,top:t.top,right:e-t.right,left:t.left}),v6=(t,e,n,r,o)=>{let s=k6(e,r,o),i=t==="top"||t==="bottom"?n.height+6:n.width+6;if(s[t]>=i)return t;let a={top:"bottom",bottom:"top",left:"right",right:"left"}[t];return a&&s[a]>=i?a:t},AD=(t,e,n)=>Math.max(e,Math.min(n,t)),CD=(t,e,n="bottom")=>{if(!t)return{left:0,top:0,side:"bottom"};let r=typeof window<"u"?window.innerWidth:1024,o=typeof window<"u"?window.innerHeight:768,s=v6(n,t,e,r,o),i,a;return s==="bottom"||s==="top"?(i=t.left+(t.width-e.width)/2,a=s==="bottom"?t.bottom+6:t.top-e.height-6):(a=t.top+(t.height-e.height)/2,i=s==="right"?t.right+6:t.left-e.width-6),i=AD(i,6,r-e.width-6),a=AD(a,6,o-e.height-6),{left:i,top:a,side:s}},TD=t=>{switch(t){case"bottom":return"translate3d(0, -10%, 0)";case"top":return"translate3d(0, 10%, 0)";case"left":return"translate3d(10%, 0, 0)";case"right":return"translate3d(-10%, 0, 0)";default:return"translate3d(0, -10%, 0)"}};var Hh={placement:"bottom",theme:"dialog",delay:250,hideDelay:100},E6=t=>{if(!t||typeof t.getBoundingClientRect!="function")return null;let e=t.getBoundingClientRect();return{left:e.left,top:e.top,right:e.right,bottom:e.bottom,width:e.width,height:e.height}},OD=t=>t?.getRoot?.()?.TooltipRoot||null,RD=t=>{let e=t?.state?.tip;return e?typeof e.$parse=="function"?e.$parse():{...e}:null},PD=(t,e,n=0)=>{let r=RD(t);if(!r||r.id!==e||r.open===!1)return;let o=t.Panel?.node;if(!o||typeof o.getBoundingClientRect!="function")return;if(o.textContent!==(r.text||"")){n<3&&setTimeout(()=>PD(t,e,n+1),0);return}let s=o.getBoundingClientRect();t.state.update({tip:{...r,size:{width:s.width,height:s.height}}})},A6=t=>{typeof queueMicrotask=="function"?queueMicrotask(t):Promise.resolve().then(t)},C6=0,T6=()=>`tooltip_${++C6}_${Date.now().toString(36)}`;function LD(t={}){let e=OD(this);if(!e)return console.warn("[tooltip] openTooltip: TooltipRoot is not mounted on the app root. Add `TooltipRoot: {}` to your shell tree and import tooltip components into context."),null;let n=t.anchorEl?.node||t.anchorEl,r=t.anchorRect||E6(n);if(!r)return console.warn("[tooltip] openTooltip: no anchor element/rect provided."),null;let o=t.id||T6(),s={id:o,text:t.text||"",anchor:r,placement:t.placement||Hh.placement,theme:t.theme||Hh.theme,open:!0,size:null};return e.state.update({tip:s}),A6(()=>PD(e,o)),o}function DD(t){let e=OD(this);if(!e)return;let n=RD(e);if(!n||n.open===!1)return;let r=typeof t=="string"?t:t?.id;r&&n.id&&r!==n.id||e.state.update({tip:{...n,open:!1}})}var D0=t=>{let e=t.tip;return e?.anchor?CD(e.anchor,e.size||{width:0,height:0},e.placement):null},Wh=t=>{let e=t.tip;return!!(e&&e.open!==!1&&e.size)},ID={tag:"div",attr:{"data-smbls-tooltip-root":"true"},position:"fixed",inset:"0",zIndex:"2500",pointerEvents:"none",state:{tip:null},Panel:{tag:"div",attr:{"data-smbls-tooltip":"panel"},role:"tooltip",position:"fixed",tip:(t,e)=>e?.tip||null,left:t=>{let e=D0(t);return e?e.left+"px":"-9999px"},top:t=>{let e=D0(t);return e?e.top+"px":"-9999px"},text:t=>t.tip?.text||"",theme:t=>t.tip?.theme||Hh.theme,width:"max-content",maxWidth:"280px",padding:"Y2 Z",round:"Z",fontSize:"Y2",lineHeight:"1.35",whiteSpace:"normal",pointerEvents:"none",opacity:t=>Wh(t)?"1":"0",visibility:t=>Wh(t)?"visible":"hidden",transform:t=>{if(Wh(t))return"none";let e=D0(t);return TD(e?e.side:"bottom")},transition:t=>{let e=Wh(t)?"A":"Z";return`${e} opacity defaultBezier, ${e} transform defaultBezier, ${e} visibility defaultBezier`}}};var I0=t=>{if(!t.tooltipText)return;let e=t.node;e&&e.hasAttribute&&e.hasAttribute("title")&&e.removeAttribute("title")},O6=t=>{t.tooltipText&&(I0(t),t.call("openTooltip",{anchorEl:t,text:t.tooltipText,placement:t.tooltipPlacement||"bottom",theme:t.tooltipTheme,id:t.tooltipId||t.key}))},$D=t=>{t._tooltipHideTimer&&(clearTimeout(t._tooltipHideTimer),t._tooltipHideTimer=null),!t._tooltipShowTimer&&(t._tooltipShowTimer=setTimeout(()=>{t._tooltipShowTimer=null,O6(t)},t.tooltipDelay??250))},MD=t=>{t._tooltipShowTimer&&(clearTimeout(t._tooltipShowTimer),t._tooltipShowTimer=null),!t._tooltipHideTimer&&(t._tooltipHideTimer=setTimeout(()=>{t._tooltipHideTimer=null,t.call("closeTooltip",t.tooltipId||t.key)},t.tooltipHideDelay??100))},ND={onMouseenter:(t,e)=>$D(e),onMouseleave:(t,e)=>MD(e),onFocus:(t,e)=>$D(e),onBlur:(t,e)=>MD(e),onMouseover:(t,e)=>I0(e),onFocusin:(t,e)=>I0(e)};var FD={display:"flex",theme:"dialog",flow:"column",shape:"tooltip",shapeDirection:"left",padding:"Z1 A",round:"Y2",width:"fit-content",minWidth:"D2",maxWidth:"F2",gap:"X",textAlign:"center",attr:{tooltip:!0},Title:{if:t=>t.call("isDefined",t.parent.title)||t.parent.title,width:"fit-content",fontWeight:500,color:"currentColor",text:t=>t.parent.title},P:{if:(t,e)=>t.call("isDefined",t.call("exec",t.parent.description,t))||t.text,width:"fit-content",fontSize:"Z2",margin:"0",color:"currentColor",fontWeight:"400",text:(t,e)=>t.call("exec",t.parent.description,t)}},jD={extends:"Tooltip",position:"absolute",pointerEvents:"none",opacity:"0",visibility:"hidden",transition:"C defaultBezier opacity, C defaultBezier visibility, B defaultBezier transform",onInit:t=>{let e=!t.shapeDirection||t.shapeDirection==="top"?{top:"112%",left:"50%",transform:"translate3d(-50%,10%,0)",".isActive":{transform:"translate3d(-50%,0,0)",opacity:1,visibility:"visible"}}:t.shapeDirection==="right"?{transform:"translate3d(10%,-50%,0)",left:"112%",top:"50%",".isActive":{transform:"translate3d(0%,-50%,0)",opacity:1,visibility:"visible"}}:t.shapeDirection==="bottom"?{transform:"translate3d(-50%,-10%,0)",bottom:"112%",left:"50%",".isActive":{transform:"translate3d(-50%,0,0)",opacity:1,visibility:"visible"}}:t.shapeDirection==="left"?{transform:"translate3d(10%,-50%,0)",right:"112%",top:"50%",".isActive":{transform:"translate3d(0%,-50%,0)",opacity:1,visibility:"visible"}}:{};Object.assign(t,e)},style:t=>{if(!t.scope||!t.scope.tooltipOpen)return{opacity:"",visibility:"",transform:""};let e=t.shapeDirection;return{opacity:"1",visibility:"visible",transform:e==="left"||e==="right"?"translate3d(0%,-50%,0)":"translate3d(-50%,0,0)"}},styleDeps:[t=>t.scope&&t.scope.tooltipOpen]},BD={position:"relative",zIndex:999,scope:{tooltipOpen:!1},onInit:t=>{let{Tooltip:e,TooltipHidden:n}=t,r=e||n;if(!r)return;let o=r&&r[".isActive"];Object.assign(t,{":hover, &:focus-visible":{zIndex:1e3,"& [tooltip]":o||{transform:"translate3d(-50%, 0, 0)",opacity:1,visibility:"visible"}}})},onPointerdown:(t,e)=>{t.pointerType!=="touch"||!e.scope||(e.scope.tooltipOpen=!e.scope.tooltipOpen)},onDocumentKeydown:(t,e)=>{t.key!=="Escape"||!e.scope||!e.scope.tooltipOpen||(e.scope.tooltipOpen=!1)},onDocumentPointerdown:(t,e)=>{!e.scope||!e.scope.tooltipOpen||e.node&&e.node.contains(t.target)||(e.scope.tooltipOpen=!1)}};var UD={TooltipRoot:ID,TooltipTrigger:ND,Tooltip:FD,TooltipHidden:jD,TooltipParent:BD};var VD={openTooltip:LD,closeTooltip:DD};var N0=t=>!!(t&&typeof t=="object"&&t.__isStub===!0),F0=t=>Je(t)?t.library!==void 0?t.library:t.key??t.name:t,R6=(t,e)=>{let n=e?.sharedLibraries,r=Array.isArray(n)?n.map(i=>typeof i=="string"?i:i?.key||i?.name):n&&typeof n=="object"?Object.keys(n):null,o=0,s=i=>{let a=o++;if(typeof i.__libraryKey=="string"&&i.__libraryKey)return i.__libraryKey;if(r&&r[a])return r[a];if(typeof i.__stubId=="string"){let c=i.__stubId.match(/^@symbo[-.]ls\/([^/]+)/);if(c)return c[1]}return null};return t.map(i=>{let a=F0(i);if(!N0(a))return i;let c=s(a);return c?Je(i)?{...i,library:c}:c:null}).filter(Boolean)},j0=new WeakMap,P6={lazy:!0,window:globalThis},zD=["components","pages","functions","methods","snippets"],L6=zD.filter(t=>t!=="methods"),$0=t=>{if(!t||typeof t!="object")return!1;let e=new WeakSet,n=[t];for(;n.length;){let r=n.pop();if(!r||typeof r!="object"||e.has(r))continue;e.add(r);let o;try{o=Object.keys(r)}catch{continue}for(let s of o){let i;try{i=r[s]}catch{continue}if(typeof i=="function")return!0;i&&typeof i=="object"&&n.push(i)}}return!1},D6=(t,e)=>{if(Zr(e)||Zr(t))return"boot-revived";if($0(t))return"local";if(e&&typeof e=="object"){if($0(e.app))return"local";for(let n of L6)if($0(e[n]))return"local"}return"raw-json"},HD=(t,e)=>{let n=e?t[e]:t;if(!E(n))return;let r=ce(n,{},P6);try{Object.assign(n,r)}catch(o){if(e)t[e]=r;else throw o}},I6=t=>{if(!E(t)||Zr(t))return t;for(let e of[...zD,"app"])HD(t,e);return ps(t)},$6=(t,e)=>{if(!Array.isArray(t))return t;for(let n of t){let r=Je(n)?n.library:n;E(r)&&!e.has(r)&&I6(r)}return t},M0=t=>{let e=j0.get(t);e&&(j0.delete(t),rL(e))},B0=async(t,e={})=>{let n=e.symbolsConfig,r=n?.owner&&n?.key?`${n.owner}--${n.key}`:n?.key,o=e.key=e.key||r||(v(t)?t:"smblsapp");e.define=e.define||Ii,e.cssPropsRegistry=wt,e.window=ZP(e);let s=D6(t,e);if(e.sharedLibraries&&e.sharedLibraries.length){if(e.sharedLibraries.some(m=>{let y=F0(m);return typeof y=="string"||N0(y)})){e.sharedLibraries=R6(e.sharedLibraries,e.symbolsConfig);let{resolveSharedLibraries:m}=await Promise.resolve().then(()=>(I(),Is)),y=new Set(e.sharedLibraries.map(b=>F0(b)).filter(b=>E(b)&&!N0(b))),S=await m(e.sharedLibraries,{apiBaseUrl:Vx()});e.sharedLibraries=s==="raw-json"?S:$6(S,y)}WP(e.sharedLibraries),fL(e)}uf(e,e.designSystem);let[i,a]=aL(o,e);e.designSystem=i,e.registry=a,e.cases||(e.cases={}),e.shorthand&&of.prepareContext(e);let c=cL(t,e);if(e.state=c,ic(c),e.pages=lL(t,e),e.components=QP(e),e.utils=JP(e),pr[e.packageManager]){let h=nL(e);h&&h.deferred?(h.blocking&&await Kx({...e,dependencies:h.blocking}),j0.set(e,h.deferred)):e.dependencies=await Kx(e)}if(e.methods=tL(e),e.routerOptions=RR(t,e),e.defaultExtends=[xp],e.snippets=e.snippets||{},e.functions=e.functions||{},e.plugins=e.plugins||[],e.plugins.some(h=>!h||typeof h!="object")){let h=e.plugins.filter(m=>!m||typeof m!="object");e.plugins=e.plugins.filter(m=>m&&typeof m=="object"),e.verbose!==!1&&console.warn(`[smbls] context.plugins carried ${h.length} non-plugin entr${h.length===1?"y":"ies"} (${h.map(m=>JSON.stringify(m)).join(", ")}) \u2014 dropped. A published project that imports a framework plugin it does not declare ships a stub phantom here; the runtime registers polyglot/helmet/fetch/... itself from the context config, so remove the import instead.`)}let l=e.globalScope;e.globalScope&&E(e.globalScope)&&(e.globalScope=Qr(e.globalScope));let f=(h,m)=>{s==="raw-json"&&HD(h,m)};f(t),f(e,"components"),f(e,"pages"),f(e,"functions"),f(e,"methods"),f(e,"snippets"),f(e,"app"),xc(e,l),kc(e);let u=h=>h&&typeof h.select=="function";e.fetch?.__resolved&&!u(e.fetch.__resolved)&&delete e.fetch.__resolved,e.db?.__resolved&&!u(e.db.__resolved)&&delete e.db.__resolved;let d=h=>e.plugins.some(m=>m&&m.name===h);if(e.polyglot&&!d("polyglot")){e.plugins.push(Mi);for(let h in ff)typeof e.functions[h]!="function"&&(e.functions[h]=ff[h])}if(d("helmet")||e.plugins.push(hx),d("inertOutside")||e.plugins.push(bp),e.fetch&&!d("fetch")&&e.plugins.push(wy),e.fetch)for(let h in ju)typeof e.functions[h]!="function"&&(e.functions[h]=ju[h]);if(e.designSystem?.typography?.useCapsize!==!1&&!d("capsize")&&(e.plugins.push(zp),e.cssPropsRegistry.useCapsize=bx),e.shorthand&&!d("shorthand")&&e.plugins.push(of),e.analyze&&!d("analyze")){let h=e.analyze===!0?{}:e.analyze;e.analyze=th(h),e.plugins.push(Fi)}e.sync!==!1&&!d("sync")&&e.plugins.push(mD),e.inspect&&!d("inspect")&&e.plugins.push(Bx),(e.notifications===!0||e.editor&&e.editor.verbose===!0)&&e.notifications!==!1&&!d("notifications")&&e.plugins.push(yD);let g=(h,m,y)=>{if(e[h]!==!1){for(let S in m)E(e.components[S])||(e.components[S]=m[S]);for(let S in y)typeof e.functions[S]!="function"&&(e.functions[S]=y[S])}};return g("windows",k0,nr),g("dropdown",O0,P0),g("tooltip",UD,VD),e},kf=async(t,e)=>{E(e)||(e={}),En(t)?(t={},e.parent=t):v(t)?(t={},e.key=t):E(t)||(t={});let n=e.window||(typeof window<"u"?window:null),r=n?.__BRENDER__,o=null;if(r){let c=e.document||(typeof document<"u"?document:null);c&&(o=Array.from(c.head.querySelectorAll('style[data-emotion="smbls"], style[data-brender]')))}if(await B0(t,e),e.useReset!==!1){let c=e.document||(typeof document<"u"?document:null);if(c){let l=c.head.querySelector("style[data-smbls]");l||(l=c.createElement("style"),l.setAttribute("data-smbls",""),c.head.appendChild(l));let f=l.sheet;if(f){try{f.insertRule("*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }",0)}catch{}try{f.insertRule("h1, h2, h3, h4, h5, h6 { font-size: inherit; font-weight: inherit; }",1)}catch{}}}}if(e.app&&E(e.app))for(let c in e.app)t[c]===void 0&&(t[c]=e.app[c]);t.extends=oP(t,e),e.router!==!1&&(t.routes=e.pages),t.state=e.state,t.context=e,t.data=t.data||{},e.skipDesignSystemInit||await oL({functions:e.functions,utils:e.utils,snippets:e.snippets,...e.files},e);for(let c of e.plugins)if(typeof c.beforeCreate=="function")try{c.beforeCreate(t,e)}catch(l){console.error(`[smbls] plugin "${c.name||"?"}" beforeCreate error:`,l)}let s=e.document;if(!s||!s.createElement)return M0(e),t;let i=e.parent||s.body;if(r){let l=(M6(e,n)?N6(re,t,i,e,n,o):null)||F6(re,t,i,e,n,o);return M0(e),l}let a=re(t,i,e.key,{verbose:e.verbose,context:e,...e.domqlOptions});return M0(e),typeof window<"u"&&!e.document&&(window.__smblsApp=a),a},M6=(t,e)=>!e||!E(e.__BR_REGISTRY__)||t.hydrate===!1?!1:t.hydrate===!0||e.__BRENDER_HYDRATE__===!0,N6=(t,e,n,r,o,s)=>{let i=f=>{for(let u=f;u&&u!==n;u=u.parentNode)if(u.parentNode===n&&u.localName==="svg"&&u.id)return!0;return!1},a={};for(let f of n.querySelectorAll("[data-br]")){if(i(f)){f.removeAttribute("data-br");continue}a[f.getAttribute("data-br")]=f}let c={registry:o.__BR_REGISTRY__,nodes:a,claimed:new Set,adopted:0,misses:0};r.__hydration=c;let l;try{l=t(e,n,r.key,{verbose:r.verbose,context:r,...r.domqlOptions})}catch(f){console.error("[smbls] hydration failed, rendering fresh:",f),delete r.__hydration;for(let u of c.claimed)u.parentNode&&u.remove();return null}finally{delete r.__hydration}for(let f in a){let u=a[f];!c.claimed.has(u)&&u.parentNode&&u.remove()}return s&&s.forEach(f=>{f.parentNode&&f.remove()}),o.__BRENDER_HYDRATION__={adopted:c.adopted,misses:c.misses},WD(o),l},F6=async(t,e,n,r,o,s)=>{let i=n.ownerDocument||document;s&&s.forEach(l=>{l.parentNode&&l.remove()});let a=[];for(let l of n.childNodes){if(l.nodeType===1){let f=l.tagName.toLowerCase();if(f==="script"||f==="link"||f==="style"||f==="svg"&&l.id)continue}a.push(l)}a.forEach(l=>l.remove()),i.querySelectorAll("[data-br]").forEach(l=>l.removeAttribute("data-br"));let c=t(e,n,r.key,{verbose:r.verbose,context:r,...r.domqlOptions});return WD(o),c},WD=t=>{t&&(delete t.__BRENDER__,delete t.__BR_REGISTRY__,delete t.__BRENDER_HYDRATE__)};var U0=(t,e)=>ft(t,E(e)?e:{}),j6=t=>{if(typeof document>"u")return;let e=t.themeRoot||t.document&&t.document.documentElement||document.documentElement;if(!e||typeof e.setAttribute!="function")return;let n=t.globalTheme||"auto";try{if(typeof window<"u"&&window.location){let s=new URLSearchParams(window.location.search).get("globalTheme");s&&(n=s)}}catch{}let r=t.themeStorageKey;if(n==="auto"&&r&&typeof localStorage<"u")try{let s=localStorage.getItem(r);s&&(n=s)}catch{}let o=n==="auto"?(()=>{try{return typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}catch{return"light"}})():n;e.setAttribute("data-theme",o),t.globalTheme=n,t.themeRoot=e},B6=()=>{if(typeof document>"u")return null;try{let t=document.querySelector('meta[name="symbols-runtime"]'),e=t&&t.getAttribute("content");return typeof e=="string"&&e?e:null}catch{return null}},qD=t=>{let e=B6();e&&(t.editor||(t.editor={}),t.editor.runtime||(t.editor.runtime=e),e==="runner"&&typeof t.editor.livesync>"u"&&(t.editor.livesync=!0))},V0=(t,e=Dr,n)=>{let r={...Dr,...U0(e,n)};return qD(r),j6(r),kf(t,r).then(s=>{if(ex(s,r),s.destroy=()=>Kl(s),s.navigate=(i,a={})=>{let c=s,l=s.context&&s.context.routerOptions;if(l&&l.customRouterElement){let f=ql(s,l.customRouterElement);f&&(c=f)}return c.call("router",i,c,a.state||{},{pushState:!0,...a})},s.onCreate&&!s.__ref&&s.onCreate(s,s.state,s.context,r),s.context?.analyze?.activate)try{s.context.analyze.activate(s.context)}catch(i){console.error("[analyze] activate error:",i)}return s}).catch(s=>{throw console.error("[smbls] create error:",s),s})},U6=(t,e=Dr,n)=>{let r=V0(t,e,n),o={...Dr,...U0(e,n)},s=o.key;return $R(r,s,{utils:Wl,...o}),r},V6=async(t,e=Dr,n)=>{let r={...Dr,...U0(e,n)};qD(r);let o=e.key;await IR(o,r);let s=await kf(t,r);return ex(s,r),s.destroy=()=>Kl(s),s.navigate=(i,a={})=>{let c=s,l=s.context&&s.context.routerOptions;if(l&&l.customRouterElement){let f=ql(s,l.customRouterElement);f&&(c=f)}return c.call("router",i,c,a.state||{},{pushState:!0,...a})},r.onCreate&&await r.onCreate(s,s.state,s.context,r),s},z6=(t={},e=Dr,n)=>V0({deps:{isUndefined:Bt},...t},ft({domqlOptions:{onlyResolveExtends:!0}},e),n);var W0={};F(W0,{BUILD_DOMQL_SYSTEM_PROMPT:()=>oI,DEFAULT_MAX_TOKENS:()=>Zh,DEFAULT_MODEL:()=>jr,DEFAULT_PROVIDER:()=>Af,DEFAULT_TEMPERATURE:()=>Xh,MODEL_TIER_ALIASES:()=>H0,PROVIDER_MODELS:()=>Ef,SIMONE_BASE_URL:()=>vf,SIMONE_CHAT_PATH:()=>qh,SIMONE_CODE_PATH:()=>Kh,SIMONE_CODE_SYMBOLS_PATH:()=>Gh,SIMONE_HEALTH_PATH:()=>Yh,SIMONE_TOOLS_PATH:()=>KD,WORKSPACE_SYSTEM_PROMPT:()=>rI,buildMessages:()=>QD,chat:()=>Cf,health:()=>ZD,parseSimoneResponse:()=>eI,resolveModel:()=>sI,streamChat:()=>Cf,streamCode:()=>YD,streamCodeSymbols:()=>XD,toLegacyEnvelope:()=>nI});var vf="https://symbols-service-production.up.railway.app",qh="/api/chat",Kh="/api/code",Gh="/api/code-symbols",Yh="/api/health",KD="/api/tools",Ef={"openai-compatible":["claude-sonnet-4-6","claude-opus-4-6","gpt-4o","gpt-4o-mini","deepseek-chat"],anthropic:["claude-sonnet-4-6","claude-sonnet-4-5-20250929","claude-opus-4-1-20250805","claude-haiku-4-5-20251001"],openrouter:["google/gemini-3-pro-preview"],gemini:["gemini-2.5-pro","gemini-3.1-pro-preview"]},Af="gemini",jr=Ef[Af][0],Xh=.7,Zh=4096;function H6(t){if(!t)return null;for(let[e,n]of Object.entries(Ef))if(n.includes(t))return e;return null}function GD(t,e){return t?t.replace(/\/$/,"")+e:e}function W6(t){if(!t.startsWith("data: "))return null;let e=t.slice(6);if(e==="[DONE]")return{done:!0};try{return{chunk:JSON.parse(e)}}catch{return{raw:e}}}async function Cf(t,e={},n){let{baseUrl:r=vf,path:o=qh,model:s=jr,provider:i=H6(s)||Af,temperature:a=Xh,maxTokens:c=Zh,effort:l,apiKeys:f,signal:u,headers:d}=e;if(!Array.isArray(t)||t.length===0)throw new TypeError("simone: messages must be a non-empty array");let p={messages:t,provider:i,model:s,temperature:a,maxTokens:c};l&&(p.effort=l),f&&(p.apiKeys=f);let g=await fetch(GD(r,o),{method:"POST",headers:{"Content-Type":"application/json",Accept:"text/event-stream",...d},body:JSON.stringify(p),signal:u});if(!g.ok){let x=g.statusText;try{let w=await g.text();try{let k=JSON.parse(w);x=k.error||k.detail||x}catch{x=w||x}}catch{}let _=new Error(`simone: HTTP ${g.status} \u2014 ${x}`);throw _.status=g.status,_}if(!g.body||typeof g.body.getReader!="function"){let x=await g.text();return n&&n(x),{text:x,errors:[]}}let h=g.body.getReader(),m=new TextDecoder,y=[],S=[],b="";try{for(;;){let{done:x,value:_}=await h.read();if(x)break;b+=m.decode(_,{stream:!0});let w=b.indexOf(`
|
|
167
|
-
`);for(;
|
|
168
|
-
`)}}return{text:y.join(""),errors:
|
|
166
|
+
`,b6=()=>{if(typeof document>"u"||document.getElementById("smbls-dropdown-css"))return;let t=document.createElement("style");t.id="smbls-dropdown-css",t.textContent=y6,document.head.appendChild(t)},ED=(t,e)=>{if(!t.node)return;let n=e?.background;if(!n)t.node.removeAttribute("data-smbls-surface");else{let r=/^[a-z][\w.+-]*$/i.test(n)?`var(--color-${n})`:n;t.node.style.setProperty("--smbls-dropdown-surface",r),t.node.setAttribute("data-smbls-surface","")}e?.theme?t.node.setAttribute("data-smbls-themed",""):t.node.removeAttribute("data-smbls-themed"),e?.shadow||t.scope?.bodyShadow?t.node.setAttribute("data-smbls-shadowed",""):t.node.removeAttribute("data-smbls-shadowed")},_6=t=>{if(!t)return null;let e=typeof t.shadow=="function"?t.shadow(t,t.state):t.shadow;return typeof e=="string"&&e?e:null},w6=t=>{t.node&&(t.node.removeAttribute("data-smbls-open"),t.node.offsetWidth,t.node.setAttribute("data-smbls-open","true"))},S6=[["role","role"],["aria-label","ariaLabel"],["aria-labelledby","ariaLabelledby"]],AD=(t,e)=>{if(!t.node)return;let n=new Set;for(let[r,o]of S6){let s=e?.[o];s&&(t.node.setAttribute(r,s),n.add(r))}if(t.__a11yAttrs)for(let r of t.__a11yAttrs)n.has(r)||t.node.removeAttribute(r);t.__a11yAttrs=n,t.__panelTabindex&&(t.node.removeAttribute("tabindex"),t.__panelTabindex=!1)},x6='a[href], button, input:not([type="hidden"]), select, textarea, summary, [tabindex], [contenteditable]:not([contenteditable="false"])',k6=t=>{let e=t.node;if(e){for(let n of e.querySelectorAll(x6)){if(n.matches(":disabled"))continue;let r=n.getAttribute("tabindex");if(!(r!==null&&parseInt(r,10)<0)&&(n.focus({preventScroll:!0}),e.ownerDocument.activeElement===n))return}e.setAttribute("tabindex","-1"),t.__panelTabindex=!0,e.focus({preventScroll:!0})}},Nh={tag:"div",attr:{"data-smbls-dropdown-root":"true"},position:"fixed",inset:"0",zIndex:"1500",pointerEvents:"none",state:{layer:null},onInit:t=>{if(b6(),typeof window>"u")return;let e=r=>{r.key!=="Escape"||r.defaultPrevented||t.state?.layer&&(r.preventDefault(),ns.call(t))};window.addEventListener("keydown",e),t.__dropdownEscHandler=e;let n=r=>{let o=t.state?.layer;if(!o)return;let s=t.node?.querySelector('[data-smbls-dropdown="panel"]');if(s&&s.contains(r.target))return;let i=o.anchor;if(i){let a=r.clientX,c=r.clientY;if(a>=i.left&&a<=i.right&&c>=i.top&&c<=i.bottom)return}ns.call(t)};document.addEventListener("mousedown",n,!0),t.__dropdownClickHandler=n},onRemove:t=>{typeof window>"u"||(t.__dropdownEscHandler&&window.removeEventListener("keydown",t.__dropdownEscHandler),t.__dropdownClickHandler&&document.removeEventListener("mousedown",t.__dropdownClickHandler,!0))},PanelHost:{tag:"div",position:"fixed",inset:"0",pointerEvents:"none",subscribeTo:["layer"],layer:(t,e)=>e?.layer||null,Panel:{tag:"div",attr:{"data-smbls-dropdown":"panel"},position:"fixed",subscribeTo:["layer"],left:t=>{let e=t.parent?.layer;if(!e?.anchor)return"-9999px";let n=t._lastSize||{width:280,height:200};return rr(e.anchor,n,e.placement).left+"px"},top:t=>{let e=t.parent?.layer;if(!e?.anchor)return"-9999px";let n=t._lastSize||{width:280,height:200};return rr(e.anchor,n,e.placement).top+"px"},style:t=>{let e=t.parent?.layer;if(!e?.anchor)return{};let n=t._lastSize||{width:280,height:200};return{"--smbls-dropdown-from":Zi(rr(e.anchor,n,e.placement).side)}},minWidth:t=>t.parent?.layer?.minWidth||"180px",maxWidth:t=>t.parent?.layer?.maxWidth||"90vw",maxHeight:t=>{let e=t.parent?.layer;if(!e?.anchor)return"none";let n=t._lastSize||{width:280,height:200};return T0(e,rr(e.anchor,n,e.placement))},overflow:"auto",overscrollBehavior:"contain",padding:"0",round:t=>t.parent?.layer?.round||"radiusCard",theme:t=>t.parent?.layer?.theme||null,border:"none",borderWidth:"0",shadow:t=>t.parent?.layer?.shadow||t.scope?.bodyShadow||null,scope:{bodyShadow:null},animationDuration:"B",animationTimingFunction:"defaultBezier",pointerEvents:t=>{let e=t.parent?.layer;return e?e.inert?"none":"auto":"none"},opacity:t=>t.parent?.layer?"1":"0",onClick:t=>t.stopPropagation(),onInit:t=>{let e=K(()=>{let n=t.parent?.layer,r=n?.content||null,o=n?.id||null;if(!r){if(t.__lastLayerId!=null){try{t.removeContent?.()}catch{}t.__lastLayerId=null,AD(t,null),t.node?.removeAttribute("data-smbls-open"),t.scope&&(t.scope.bodyShadow=null)}return}if(t.__lastLayerId!==o){t.__lastLayerId=o;try{t.set(r)}catch(s){console.warn("[dropdown] content set failed:",s)}t.scope&&(t.scope.bodyShadow=_6(t.content)),ED(t,n),AD(t,n),w6(t),n.focusIn&&k6(t),!(typeof requestAnimationFrame>"u")&&requestAnimationFrame(()=>{if(!t.node)return;ED(t,n);let s=t.parent?.layer;if(!s?.anchor)return;let i=vD(t.node);t._lastSize=i;let a=rr(s.anchor,i,s.placement);t.node.style.maxHeight=T0(s,a),t.node.style.left=a.left+"px",t.node.style.top=a.top+"px",t.node.style.setProperty("--smbls-dropdown-from",Zi(a.side))})}});t.__ref&&t.__ref.__effects?.push(e)},onRender:t=>{if(!t?.node)return;let e=t.parent?.layer;if(!e?.anchor)return;let n=vD(t.node),r=t._lastSize;(!r||Math.abs(r.width-n.width)>1||Math.abs(r.height-n.height)>1)&&(t._lastSize=n);let o=rr(e.anchor,n,e.placement);t.node.style.maxHeight=T0(e,o),t.node.style.left=o.left+"px",t.node.style.top=o.top+"px",t.node.style.setProperty("--smbls-dropdown-from",Zi(o.side))}}}};var O0=t=>{let e=t?.getRoot?.()?.DropdownRoot?.state?.layer;if(e&&t.dropdownId&&e.id===t.dropdownId){t.call("closeDropdown");return}let n={anchorEl:t,trigger:t.dropdownTrigger||"click",placement:t.dropdownPlacement||"auto",content:t.dropdownContent||null,minWidth:t.dropdownMinWidth,maxWidth:t.dropdownMaxWidth,maxHeight:t.dropdownMaxHeight,theme:t.dropdownTheme,offset:t.dropdownOffset,id:t.dropdownId,onOpen:t.onDropdownOpen,onClose:t.onDropdownClose};for(let r in n)n[r]===void 0&&delete n[r];t.call("openDropdown",n)},Fh={position:"relative",onClick:(t,e)=>{(e.dropdownTrigger||"click")==="click"&&(t.preventDefault(),t.stopPropagation(),O0(e))},onFocus:(t,e)=>{e.dropdownTrigger==="focus"&&O0(e)},onMouseenter:(t,e)=>{e.dropdownTrigger==="hover"&&(e._hoverTimer&&clearTimeout(e._hoverTimer),e._hoverTimer=setTimeout(()=>O0(e),120))},onMouseleave:(t,e)=>{e.dropdownTrigger==="hover"&&(e._hoverTimer&&(clearTimeout(e._hoverTimer),e._hoverTimer=null),e._closeTimer=setTimeout(()=>e.call("closeDropdown"),250))}};var jh={attr:{dropdown:!0},position:"absolute",top:"100%",left:"0",zIndex:1e3,theme:"quaternary",padding:"Y",round:"Z2",flow:"column",gap:"X",transition:"B defaultBezier",transitionProperty:"transform, opacity, visibility",transform:"translate3d(0,10%,0)",opacity:0,visibility:"hidden"},Bh={display:"flex",attr:{dropdown:!0},padding:"0 Y",maxHeight:"G",flow:"column",theme:"quaternary",overflow:"hidden auto",style:{listStyleType:"none"},transition:"B defaultBezier",transitionProperty:"transform, opacity, visibility",children:t=>t.options||[],childrenAs:"props",".hidden":{transform:"translate3d(0,10%,0)",opacity:0,visibility:"hidden"},childExtends:{extends:"Button",state:{},isActive:({key:t,state:e})=>e.active===t,position:"relative",round:"0",align:"center flex-end",flow:"row-reverse",padding:"Z2 C Z2 Y2",margin:"0",gap:"Y2",theme:"quaternary .child",":hover":{style:{svg:{opacity:"0.5"}}},Icon:{isActive:({key:t,state:e})=>e.active===t,name:"checkmark",opacity:"0.1",".active":{opacity:"1"}},":not(:first-child)":{"@dark":{border:"solid gray4.65"},"@light":{border:"solid gray11"},borderWidth:"1px 0 0"}}},Uh={position:"relative",zIndex:999,":hover":{zIndex:1e3,"& [dropdown]":{transform:"translate3d(0,0,0)",opacity:1,visibility:"visible"}}},Vh={position:"relative",tabindex:"0",":focus-within":{zIndex:1e3,"& [dropdown]":{transform:"translate3d(0,0,0)",opacity:1,visibility:"visible"}},Input_trigger:{type:"checkbox",opacity:"0",position:"absolute",inset:"0",width:"100%",height:"100%",cursor:"pointer",onClick:(t,e)=>{e.node===document.activeElement&&e.node.blur()}},Dropdown:{onClick:()=>{document.activeElement?.blur()}}},zh={position:"relative",tabindex:"0",":focus-within":{zIndex:1e3,"& ~ [dropdown]":{transform:"translate3d(0,0,0)",opacity:1,visibility:"visible"}},Input_trigger:{type:"checkbox",opacity:"0",position:"absolute",inset:"0",width:"100%",height:"100%",cursor:"pointer",onClick:(t,e)=>{e.node===document.activeElement&&e.node.blur()}}};var R0={DropdownRoot:Nh,DropdownTrigger:Fh,Dropdown:jh,DropdownList:Bh,DropdownParent:Uh,DropdownParentFocus:Vh,DropdownSiblingFocus:zh};var D0={};F(D0,{DROPDOWN_DEFAULTS:()=>jr,closeDropdown:()=>ns,computePosition:()=>rr,dropdownFunctions:()=>L0,fadeInTransform:()=>Zi,openDropdown:()=>$h,setDropdownInert:()=>Mh});var L0={openDropdown:$h,closeDropdown:ns,setDropdownInert:Mh};var v6=(t,e,n)=>({bottom:n-t.bottom,top:t.top,right:e-t.right,left:t.left}),E6=(t,e,n,r,o)=>{let s=v6(e,r,o),i=t==="top"||t==="bottom"?n.height+6:n.width+6;if(s[t]>=i)return t;let a={top:"bottom",bottom:"top",left:"right",right:"left"}[t];return a&&s[a]>=i?a:t},CD=(t,e,n)=>Math.max(e,Math.min(n,t)),TD=(t,e,n="bottom")=>{if(!t)return{left:0,top:0,side:"bottom"};let r=typeof window<"u"?window.innerWidth:1024,o=typeof window<"u"?window.innerHeight:768,s=E6(n,t,e,r,o),i,a;return s==="bottom"||s==="top"?(i=t.left+(t.width-e.width)/2,a=s==="bottom"?t.bottom+6:t.top-e.height-6):(a=t.top+(t.height-e.height)/2,i=s==="right"?t.right+6:t.left-e.width-6),i=CD(i,6,r-e.width-6),a=CD(a,6,o-e.height-6),{left:i,top:a,side:s}},OD=t=>{switch(t){case"bottom":return"translate3d(0, -10%, 0)";case"top":return"translate3d(0, 10%, 0)";case"left":return"translate3d(10%, 0, 0)";case"right":return"translate3d(-10%, 0, 0)";default:return"translate3d(0, -10%, 0)"}};var Hh={placement:"bottom",theme:"dialog",delay:250,hideDelay:100},A6=t=>{if(!t||typeof t.getBoundingClientRect!="function")return null;let e=t.getBoundingClientRect();return{left:e.left,top:e.top,right:e.right,bottom:e.bottom,width:e.width,height:e.height}},RD=t=>t?.getRoot?.()?.TooltipRoot||null,PD=t=>{let e=t?.state?.tip;return e?typeof e.$parse=="function"?e.$parse():{...e}:null},LD=(t,e,n=0)=>{let r=PD(t);if(!r||r.id!==e||r.open===!1)return;let o=t.Panel?.node;if(!o||typeof o.getBoundingClientRect!="function")return;if(o.textContent!==(r.text||"")){n<3&&setTimeout(()=>LD(t,e,n+1),0);return}let s=o.getBoundingClientRect();t.state.update({tip:{...r,size:{width:s.width,height:s.height}}})},C6=t=>{typeof queueMicrotask=="function"?queueMicrotask(t):Promise.resolve().then(t)},T6=0,O6=()=>`tooltip_${++T6}_${Date.now().toString(36)}`;function DD(t={}){let e=RD(this);if(!e)return console.warn("[tooltip] openTooltip: TooltipRoot is not mounted on the app root. Add `TooltipRoot: {}` to your shell tree and import tooltip components into context."),null;let n=t.anchorEl?.node||t.anchorEl,r=t.anchorRect||A6(n);if(!r)return console.warn("[tooltip] openTooltip: no anchor element/rect provided."),null;let o=t.id||O6(),s={id:o,text:t.text||"",anchor:r,placement:t.placement||Hh.placement,theme:t.theme||Hh.theme,open:!0,size:null};return e.state.update({tip:s}),C6(()=>LD(e,o)),o}function ID(t){let e=RD(this);if(!e)return;let n=PD(e);if(!n||n.open===!1)return;let r=typeof t=="string"?t:t?.id;r&&n.id&&r!==n.id||e.state.update({tip:{...n,open:!1}})}var I0=t=>{let e=t.tip;return e?.anchor?TD(e.anchor,e.size||{width:0,height:0},e.placement):null},Wh=t=>{let e=t.tip;return!!(e&&e.open!==!1&&e.size)},$D={tag:"div",attr:{"data-smbls-tooltip-root":"true"},position:"fixed",inset:"0",zIndex:"2500",pointerEvents:"none",state:{tip:null},Panel:{tag:"div",attr:{"data-smbls-tooltip":"panel"},role:"tooltip",position:"fixed",tip:(t,e)=>e?.tip||null,left:t=>{let e=I0(t);return e?e.left+"px":"-9999px"},top:t=>{let e=I0(t);return e?e.top+"px":"-9999px"},text:t=>t.tip?.text||"",theme:t=>t.tip?.theme||Hh.theme,width:"max-content",maxWidth:"280px",padding:"Y2 Z",round:"Z",fontSize:"Y2",lineHeight:"1.35",whiteSpace:"normal",pointerEvents:"none",opacity:t=>Wh(t)?"1":"0",visibility:t=>Wh(t)?"visible":"hidden",transform:t=>{if(Wh(t))return"none";let e=I0(t);return OD(e?e.side:"bottom")},transition:t=>{let e=Wh(t)?"A":"Z";return`${e} opacity defaultBezier, ${e} transform defaultBezier, ${e} visibility defaultBezier`}}};var $0=t=>{if(!t.tooltipText)return;let e=t.node;e&&e.hasAttribute&&e.hasAttribute("title")&&e.removeAttribute("title")},R6=t=>{t.tooltipText&&($0(t),t.call("openTooltip",{anchorEl:t,text:t.tooltipText,placement:t.tooltipPlacement||"bottom",theme:t.tooltipTheme,id:t.tooltipId||t.key}))},MD=t=>{t._tooltipHideTimer&&(clearTimeout(t._tooltipHideTimer),t._tooltipHideTimer=null),!t._tooltipShowTimer&&(t._tooltipShowTimer=setTimeout(()=>{t._tooltipShowTimer=null,R6(t)},t.tooltipDelay??250))},ND=t=>{t._tooltipShowTimer&&(clearTimeout(t._tooltipShowTimer),t._tooltipShowTimer=null),!t._tooltipHideTimer&&(t._tooltipHideTimer=setTimeout(()=>{t._tooltipHideTimer=null,t.call("closeTooltip",t.tooltipId||t.key)},t.tooltipHideDelay??100))},FD={onMouseenter:(t,e)=>MD(e),onMouseleave:(t,e)=>ND(e),onFocus:(t,e)=>MD(e),onBlur:(t,e)=>ND(e),onMouseover:(t,e)=>$0(e),onFocusin:(t,e)=>$0(e)};var jD={display:"flex",theme:"dialog",flow:"column",shape:"tooltip",shapeDirection:"left",padding:"Z1 A",round:"Y2",width:"fit-content",minWidth:"D2",maxWidth:"F2",gap:"X",textAlign:"center",attr:{tooltip:!0},Title:{if:t=>t.call("isDefined",t.parent.title)||t.parent.title,width:"fit-content",fontWeight:500,color:"currentColor",text:t=>t.parent.title},P:{if:(t,e)=>t.call("isDefined",t.call("exec",t.parent.description,t))||t.text,width:"fit-content",fontSize:"Z2",margin:"0",color:"currentColor",fontWeight:"400",text:(t,e)=>t.call("exec",t.parent.description,t)}},BD={extends:"Tooltip",position:"absolute",pointerEvents:"none",opacity:"0",visibility:"hidden",transition:"C defaultBezier opacity, C defaultBezier visibility, B defaultBezier transform",onInit:t=>{let e=!t.shapeDirection||t.shapeDirection==="top"?{top:"112%",left:"50%",transform:"translate3d(-50%,10%,0)",".isActive":{transform:"translate3d(-50%,0,0)",opacity:1,visibility:"visible"}}:t.shapeDirection==="right"?{transform:"translate3d(10%,-50%,0)",left:"112%",top:"50%",".isActive":{transform:"translate3d(0%,-50%,0)",opacity:1,visibility:"visible"}}:t.shapeDirection==="bottom"?{transform:"translate3d(-50%,-10%,0)",bottom:"112%",left:"50%",".isActive":{transform:"translate3d(-50%,0,0)",opacity:1,visibility:"visible"}}:t.shapeDirection==="left"?{transform:"translate3d(10%,-50%,0)",right:"112%",top:"50%",".isActive":{transform:"translate3d(0%,-50%,0)",opacity:1,visibility:"visible"}}:{};Object.assign(t,e)},style:t=>{if(!t.scope||!t.scope.tooltipOpen)return{opacity:"",visibility:"",transform:""};let e=t.shapeDirection;return{opacity:"1",visibility:"visible",transform:e==="left"||e==="right"?"translate3d(0%,-50%,0)":"translate3d(-50%,0,0)"}},styleDeps:[t=>t.scope&&t.scope.tooltipOpen]},UD={position:"relative",zIndex:999,scope:{tooltipOpen:!1},onInit:t=>{let{Tooltip:e,TooltipHidden:n}=t,r=e||n;if(!r)return;let o=r&&r[".isActive"];Object.assign(t,{":hover, &:focus-visible":{zIndex:1e3,"& [tooltip]":o||{transform:"translate3d(-50%, 0, 0)",opacity:1,visibility:"visible"}}})},onPointerdown:(t,e)=>{t.pointerType!=="touch"||!e.scope||(e.scope.tooltipOpen=!e.scope.tooltipOpen)},onDocumentKeydown:(t,e)=>{t.key!=="Escape"||!e.scope||!e.scope.tooltipOpen||(e.scope.tooltipOpen=!1)},onDocumentPointerdown:(t,e)=>{!e.scope||!e.scope.tooltipOpen||e.node&&e.node.contains(t.target)||(e.scope.tooltipOpen=!1)}};var VD={TooltipRoot:$D,TooltipTrigger:FD,Tooltip:jD,TooltipHidden:BD,TooltipParent:UD};var zD={openTooltip:DD,closeTooltip:ID};var F0=t=>!!(t&&typeof t=="object"&&t.__isStub===!0),j0=t=>Je(t)?t.library!==void 0?t.library:t.key??t.name:t,P6=(t,e)=>{let n=e?.sharedLibraries,r=Array.isArray(n)?n.map(i=>typeof i=="string"?i:i?.key||i?.name):n&&typeof n=="object"?Object.keys(n):null,o=0,s=i=>{let a=o++;if(typeof i.__libraryKey=="string"&&i.__libraryKey)return i.__libraryKey;if(r&&r[a])return r[a];if(typeof i.__stubId=="string"){let c=i.__stubId.match(/^@symbo[-.]ls\/([^/]+)/);if(c)return c[1]}return null};return t.map(i=>{let a=j0(i);if(!F0(a))return i;let c=s(a);return c?Je(i)?{...i,library:c}:c:null}).filter(Boolean)},B0=new WeakMap,L6={lazy:!0,window:globalThis},HD=["components","pages","functions","methods","snippets"],D6=HD.filter(t=>t!=="methods"),M0=t=>{if(!t||typeof t!="object")return!1;let e=new WeakSet,n=[t];for(;n.length;){let r=n.pop();if(!r||typeof r!="object"||e.has(r))continue;e.add(r);let o;try{o=Object.keys(r)}catch{continue}for(let s of o){let i;try{i=r[s]}catch{continue}if(typeof i=="function")return!0;i&&typeof i=="object"&&n.push(i)}}return!1},I6=(t,e)=>{if(Qr(e)||Qr(t))return"boot-revived";if(M0(t))return"local";if(e&&typeof e=="object"){if(M0(e.app))return"local";for(let n of D6)if(M0(e[n]))return"local"}return"raw-json"},WD=(t,e)=>{let n=e?t[e]:t;if(!A(n))return;let r=ce(n,{},L6);try{Object.assign(n,r)}catch(o){if(e)t[e]=r;else throw o}},$6=t=>{if(!A(t)||Qr(t))return t;for(let e of[...HD,"app"])WD(t,e);return hs(t)},M6=(t,e)=>{if(!Array.isArray(t))return t;for(let n of t){let r=Je(n)?n.library:n;A(r)&&!e.has(r)&&$6(r)}return t},N0=t=>{let e=B0.get(t);e&&(B0.delete(t),oL(e))},U0=async(t,e={})=>{let n=e.symbolsConfig,r=n?.owner&&n?.key?`${n.owner}--${n.key}`:n?.key,o=e.key=e.key||r||(v(t)?t:"smblsapp");e.define=e.define||Ii,e.cssPropsRegistry=wt,e.window=QP(e);let s=I6(t,e);if(e.sharedLibraries&&e.sharedLibraries.length){if(e.sharedLibraries.some(m=>{let y=j0(m);return typeof y=="string"||F0(y)})){e.sharedLibraries=P6(e.sharedLibraries,e.symbolsConfig);let{resolveSharedLibraries:m}=await Promise.resolve().then(()=>(I(),Is)),y=new Set(e.sharedLibraries.map(b=>j0(b)).filter(b=>A(b)&&!F0(b))),w=await m(e.sharedLibraries,{apiBaseUrl:zx()});e.sharedLibraries=s==="raw-json"?w:M6(w,y)}qP(e.sharedLibraries),uL(e)}uf(e,e.designSystem);let[i,a]=cL(o,e);e.designSystem=i,e.registry=a,e.cases||(e.cases={}),e.shorthand&&of.prepareContext(e);let c=lL(t,e);if(e.state=c,ic(c),e.pages=fL(t,e),e.components=JP(e),e.utils=tL(e),hr[e.packageManager]){let h=rL(e);h&&h.deferred?(h.blocking&&await Gx({...e,dependencies:h.blocking}),B0.set(e,h.deferred)):e.dependencies=await Gx(e)}if(e.methods=eL(e),e.routerOptions=PR(t,e),e.defaultExtends=[xp],e.snippets=e.snippets||{},e.functions=e.functions||{},e.plugins=e.plugins||[],e.plugins.some(h=>!h||typeof h!="object")){let h=e.plugins.filter(m=>!m||typeof m!="object");e.plugins=e.plugins.filter(m=>m&&typeof m=="object"),e.verbose!==!1&&console.warn(`[smbls] context.plugins carried ${h.length} non-plugin entr${h.length===1?"y":"ies"} (${h.map(m=>JSON.stringify(m)).join(", ")}) \u2014 dropped. A published project that imports a framework plugin it does not declare ships a stub phantom here; the runtime registers polyglot/helmet/fetch/... itself from the context config, so remove the import instead.`)}let l=e.globalScope;e.globalScope&&A(e.globalScope)&&(e.globalScope=Jr(e.globalScope));let f=(h,m)=>{s==="raw-json"&&WD(h,m)};f(t),f(e,"components"),f(e,"pages"),f(e,"functions"),f(e,"methods"),f(e,"snippets"),f(e,"app"),xc(e,l),kc(e);let u=h=>h&&typeof h.select=="function";e.fetch?.__resolved&&!u(e.fetch.__resolved)&&delete e.fetch.__resolved,e.db?.__resolved&&!u(e.db.__resolved)&&delete e.db.__resolved;let d=h=>e.plugins.some(m=>m&&m.name===h);if(e.polyglot&&!d("polyglot")){e.plugins.push(Mi);for(let h in ff)typeof e.functions[h]!="function"&&(e.functions[h]=ff[h])}if(d("helmet")||e.plugins.push(gx),d("inertOutside")||e.plugins.push(bp),e.fetch&&!d("fetch")&&e.plugins.push(wy),e.fetch)for(let h in ju)typeof e.functions[h]!="function"&&(e.functions[h]=ju[h]);if(e.designSystem?.typography?.useCapsize!==!1&&!d("capsize")&&(e.plugins.push(zp),e.cssPropsRegistry.useCapsize=_x),e.shorthand&&!d("shorthand")&&e.plugins.push(of),e.analyze&&!d("analyze")){let h=e.analyze===!0?{}:e.analyze;e.analyze=th(h),e.plugins.push(Fi)}e.sync!==!1&&!d("sync")&&e.plugins.push(yD),e.inspect&&!d("inspect")&&e.plugins.push(Ux),(e.notifications===!0||e.editor&&e.editor.verbose===!0)&&e.notifications!==!1&&!d("notifications")&&e.plugins.push(bD);let g=(h,m,y)=>{if(e[h]!==!1){for(let w in m)A(e.components[w])||(e.components[w]=m[w]);for(let w in y)typeof e.functions[w]!="function"&&(e.functions[w]=y[w])}};return g("windows",v0,nr),g("dropdown",R0,L0),g("tooltip",VD,zD),e},kf=async(t,e)=>{A(e)||(e={}),En(t)?(t={},e.parent=t):v(t)?(t={},e.key=t):A(t)||(t={});let n=e.window||(typeof window<"u"?window:null),r=n?.__BRENDER__,o=null;if(r){let c=e.document||(typeof document<"u"?document:null);c&&(o=Array.from(c.head.querySelectorAll('style[data-emotion="smbls"], style[data-brender]')))}if(await U0(t,e),e.useReset!==!1){let c=e.document||(typeof document<"u"?document:null);if(c){let l=c.head.querySelector("style[data-smbls]");l||(l=c.createElement("style"),l.setAttribute("data-smbls",""),c.head.appendChild(l));let f=l.sheet;if(f){try{f.insertRule("*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }",0)}catch{}try{f.insertRule("h1, h2, h3, h4, h5, h6 { font-size: inherit; font-weight: inherit; }",1)}catch{}}}}if(e.app&&A(e.app))for(let c in e.app)t[c]===void 0&&(t[c]=e.app[c]);t.extends=sP(t,e),e.router!==!1&&(t.routes=e.pages),t.state=e.state,t.context=e,t.data=t.data||{},e.skipDesignSystemInit||await sL({functions:e.functions,utils:e.utils,snippets:e.snippets,...e.files},e);for(let c of e.plugins)if(typeof c.beforeCreate=="function")try{c.beforeCreate(t,e)}catch(l){console.error(`[smbls] plugin "${c.name||"?"}" beforeCreate error:`,l)}let s=e.document;if(!s||!s.createElement)return N0(e),t;let i=e.parent||s.body;if(r){let l=(N6(e,n)?F6(re,t,i,e,n,o):null)||j6(re,t,i,e,n,o);return N0(e),l}let a=re(t,i,e.key,{verbose:e.verbose,context:e,...e.domqlOptions});return N0(e),typeof window<"u"&&!e.document&&(window.__smblsApp=a),a},N6=(t,e)=>!e||!A(e.__BR_REGISTRY__)||t.hydrate===!1?!1:t.hydrate===!0||e.__BRENDER_HYDRATE__===!0,F6=(t,e,n,r,o,s)=>{let i=f=>{for(let u=f;u&&u!==n;u=u.parentNode)if(u.parentNode===n&&u.localName==="svg"&&u.id)return!0;return!1},a={};for(let f of n.querySelectorAll("[data-br]")){if(i(f)){f.removeAttribute("data-br");continue}a[f.getAttribute("data-br")]=f}let c={registry:o.__BR_REGISTRY__,nodes:a,claimed:new Set,adopted:0,misses:0};r.__hydration=c;let l;try{l=t(e,n,r.key,{verbose:r.verbose,context:r,...r.domqlOptions})}catch(f){console.error("[smbls] hydration failed, rendering fresh:",f),delete r.__hydration;for(let u of c.claimed)u.parentNode&&u.remove();return null}finally{delete r.__hydration}for(let f in a){let u=a[f];!c.claimed.has(u)&&u.parentNode&&u.remove()}return s&&s.forEach(f=>{f.parentNode&&f.remove()}),o.__BRENDER_HYDRATION__={adopted:c.adopted,misses:c.misses},qD(o),l},j6=async(t,e,n,r,o,s)=>{let i=n.ownerDocument||document;s&&s.forEach(l=>{l.parentNode&&l.remove()});let a=[];for(let l of n.childNodes){if(l.nodeType===1){let f=l.tagName.toLowerCase();if(f==="script"||f==="link"||f==="style"||f==="svg"&&l.id)continue}a.push(l)}a.forEach(l=>l.remove()),i.querySelectorAll("[data-br]").forEach(l=>l.removeAttribute("data-br"));let c=t(e,n,r.key,{verbose:r.verbose,context:r,...r.domqlOptions});return qD(o),c},qD=t=>{t&&(delete t.__BRENDER__,delete t.__BR_REGISTRY__,delete t.__BRENDER_HYDRATE__)};var V0=(t,e)=>ft(t,A(e)?e:{}),B6=t=>{if(typeof document>"u")return;let e=t.themeRoot||t.document&&t.document.documentElement||document.documentElement;if(!e||typeof e.setAttribute!="function")return;let n=t.globalTheme||"auto";try{if(typeof window<"u"&&window.location){let s=new URLSearchParams(window.location.search).get("globalTheme");s&&(n=s)}}catch{}let r=t.themeStorageKey;if(n==="auto"&&r&&typeof localStorage<"u")try{let s=localStorage.getItem(r);s&&(n=s)}catch{}let o=n==="auto"?(()=>{try{return typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}catch{return"light"}})():n;e.setAttribute("data-theme",o),t.globalTheme=n,t.themeRoot=e},U6=()=>{if(typeof document>"u")return null;try{let t=document.querySelector('meta[name="symbols-runtime"]'),e=t&&t.getAttribute("content");return typeof e=="string"&&e?e:null}catch{return null}},KD=t=>{let e=U6();e&&(t.editor||(t.editor={}),t.editor.runtime||(t.editor.runtime=e),e==="runner"&&typeof t.editor.livesync>"u"&&(t.editor.livesync=!0))},z0=(t,e=Ir,n)=>{let r={...Ir,...V0(e,n)};return KD(r),B6(r),kf(t,r).then(s=>{if(nx(s,r),s.destroy=()=>Kl(s),s.navigate=(i,a={})=>{let c=s,l=s.context&&s.context.routerOptions;if(l&&l.customRouterElement){let f=ql(s,l.customRouterElement);f&&(c=f)}return c.call("router",i,c,a.state||{},{pushState:!0,...a})},s.onCreate&&!s.__ref&&s.onCreate(s,s.state,s.context,r),s.context?.analyze?.activate)try{s.context.analyze.activate(s.context)}catch(i){console.error("[analyze] activate error:",i)}return s}).catch(s=>{throw console.error("[smbls] create error:",s),s})},V6=(t,e=Ir,n)=>{let r=z0(t,e,n),o={...Ir,...V0(e,n)},s=o.key;return MR(r,s,{utils:Wl,...o}),r},z6=async(t,e=Ir,n)=>{let r={...Ir,...V0(e,n)};KD(r);let o=e.key;await $R(o,r);let s=await kf(t,r);return nx(s,r),s.destroy=()=>Kl(s),s.navigate=(i,a={})=>{let c=s,l=s.context&&s.context.routerOptions;if(l&&l.customRouterElement){let f=ql(s,l.customRouterElement);f&&(c=f)}return c.call("router",i,c,a.state||{},{pushState:!0,...a})},r.onCreate&&await r.onCreate(s,s.state,s.context,r),s},H6=(t={},e=Ir,n)=>z0({deps:{isUndefined:Bt},...t},ft({domqlOptions:{onlyResolveExtends:!0}},e),n);var q0={};F(q0,{BUILD_DOMQL_SYSTEM_PROMPT:()=>sI,DEFAULT_MAX_TOKENS:()=>Zh,DEFAULT_MODEL:()=>Br,DEFAULT_PROVIDER:()=>Af,DEFAULT_TEMPERATURE:()=>Xh,MODEL_TIER_ALIASES:()=>W0,PROVIDER_MODELS:()=>Ef,SIMONE_BASE_URL:()=>vf,SIMONE_CHAT_PATH:()=>qh,SIMONE_CODE_PATH:()=>Kh,SIMONE_CODE_SYMBOLS_PATH:()=>Gh,SIMONE_HEALTH_PATH:()=>Yh,SIMONE_TOOLS_PATH:()=>GD,WORKSPACE_SYSTEM_PROMPT:()=>oI,buildMessages:()=>JD,chat:()=>Cf,health:()=>QD,parseSimoneResponse:()=>nI,resolveModel:()=>iI,streamChat:()=>Cf,streamCode:()=>XD,streamCodeSymbols:()=>ZD,toLegacyEnvelope:()=>rI});var vf="https://symbols-service-production.up.railway.app",qh="/api/chat",Kh="/api/code",Gh="/api/code-symbols",Yh="/api/health",GD="/api/tools",Ef={"openai-compatible":["claude-sonnet-4-6","claude-opus-4-6","gpt-4o","gpt-4o-mini","deepseek-chat"],anthropic:["claude-sonnet-4-6","claude-sonnet-4-5-20250929","claude-opus-4-1-20250805","claude-haiku-4-5-20251001"],openrouter:["google/gemini-3-pro-preview"],gemini:["gemini-2.5-pro","gemini-3.1-pro-preview"]},Af="gemini",Br=Ef[Af][0],Xh=.7,Zh=4096;function W6(t){if(!t)return null;for(let[e,n]of Object.entries(Ef))if(n.includes(t))return e;return null}function YD(t,e){return t?t.replace(/\/$/,"")+e:e}function q6(t){if(!t.startsWith("data: "))return null;let e=t.slice(6);if(e==="[DONE]")return{done:!0};try{return{chunk:JSON.parse(e)}}catch{return{raw:e}}}async function Cf(t,e={},n){let{baseUrl:r=vf,path:o=qh,model:s=Br,provider:i=W6(s)||Af,temperature:a=Xh,maxTokens:c=Zh,effort:l,apiKeys:f,signal:u,headers:d}=e;if(!Array.isArray(t)||t.length===0)throw new TypeError("simone: messages must be a non-empty array");let p={messages:t,provider:i,model:s,temperature:a,maxTokens:c};l&&(p.effort=l),f&&(p.apiKeys=f);let g=await fetch(YD(r,o),{method:"POST",headers:{"Content-Type":"application/json",Accept:"text/event-stream",...d},body:JSON.stringify(p),signal:u});if(!g.ok){let x=g.statusText;try{let S=await g.text();try{let _=JSON.parse(S);x=_.error||_.detail||x}catch{x=S||x}}catch{}let k=new Error(`simone: HTTP ${g.status} \u2014 ${x}`);throw k.status=g.status,k}if(!g.body||typeof g.body.getReader!="function"){let x=await g.text();return n&&n(x),{text:x,errors:[]}}let h=g.body.getReader(),m=new TextDecoder,y=[],w=[],b="";try{for(;;){let{done:x,value:k}=await h.read();if(x)break;b+=m.decode(k,{stream:!0});let S=b.indexOf(`
|
|
167
|
+
`);for(;S!==-1;){let _=b.slice(0,S).trim();if(b=b.slice(S+1),_){let E=q6(_);if(E?.done)return{text:y.join(""),errors:w};let C=E?.chunk;C?.delta&&(y.push(C.delta),n&&n(C.delta)),C?.error&&w.push(C.error)}S=b.indexOf(`
|
|
168
|
+
`)}}return{text:y.join(""),errors:w}}finally{h.cancel().catch(()=>{})}}function XD(t,e={},n){return Cf(t,{...e,path:Kh},n)}function ZD(t,e={},n){return Cf(t,{...e,path:Gh},n)}async function QD(t={}){let{baseUrl:e=vf,signal:n,headers:r}=t,o=await fetch(YD(e,Yh),{method:"GET",headers:r,signal:n});if(!o.ok)throw new Error(`simone health: HTTP ${o.status}`);return o.json()}function JD({system:t,history:e=[],user:n,context:r}){let o=[];t&&o.push({role:"system",content:t});for(let s of e)!s||!s.role||typeof s.content!="string"||!s.content||o.push({role:s.role,content:s.content});if(n){let s=n;if(r!=null){let i=typeof r=="string"?r:JSON.stringify(r,null,2);s=`${s}
|
|
169
169
|
|
|
170
170
|
---
|
|
171
171
|
Context:
|
|
172
172
|
\`\`\`json
|
|
173
173
|
${i}
|
|
174
|
-
\`\`\``}o.push({role:"user",content:s})}return o}var
|
|
175
|
-
`),
|
|
174
|
+
\`\`\``}o.push({role:"user",content:s})}return o}var eI=/```(?<lang>[a-zA-Z0-9_+-]*)\n(?<code>[\s\S]*?)```/g,K6=new Set(["component","components","page","pages","function","method","state","theme","color","font","icon"]);function G6(t){let e=[];for(let n of t.matchAll(eI))e.push({lang:(n.groups?.lang||"").toLowerCase(),code:n.groups?.code??""});return e}function Y6(t){return t.replace(eI,"").trim()}function H0(t){if(!t||!/[{[]/.test(t))return null;try{return JSON.parse(t)}catch{}try{return JSON.parse(t.replace(/,\s*([}\]])/g,"$1"))}catch{}return null}function tI(t){return!!t&&typeof t=="object"&&typeof t.type=="string"&&K6.has(t.type)}function nI(t){let e=(typeof t=="string"?t:"").trim();if(!e)return{kind:"text",text:"",message:""};let n=G6(e),r=n.filter(i=>/^(js|javascript|ts|typescript|jsx|tsx)$/.test(i.lang)),o=n.filter(i=>i.lang==="json"),s=Y6(e);for(let i of o){let a=H0(i.code);if(tI(a))return{kind:"asset",text:s||a.description||"",asset:a,message:a.description||s||`Generated ${a.type}: ${a.title||a.key||""}`.trim()}}if(r.length>0){let i=r[0].code,a=H0("["+i+"]");return Array.isArray(a)&&a.length>1?{kind:"multi",text:s,assets:a,code:i,message:s||`Generated ${a.length} items`}:{kind:"component",text:s,code:i,message:s||"Generated a component"}}if(e.startsWith("{")){let i=H0(e);if(tI(i))return{kind:"asset",text:i.description||"",asset:i,message:i.description||`Generated ${i.type}: ${i.title||i.key||""}`.trim()}}return{kind:"text",text:e,message:e}}function rI(t){if(!t)return{code_response:{type:"error",content:"Empty response from assistant"}};switch(t.kind){case"asset":return{code_response:{type:"json_response",data:t.asset}};case"multi":return{code_response:{type:"symbols_component_code",component_code:t.code}};case"component":return{code_response:{type:"symbols_component_code",component_code:t.code,analysis_text:t.text}};default:return{code_response:{type:"plain_text_response",content:t.text||t.message||""}}}}var oI=["You are Simone, the Symbols.app assistant.","You help users build DOMQL v3 components, pages, and design-system entries.",'When the user asks for a component or page, return a single ```json fenced block whose body is one asset object with shape { type, key, title, description, value }. type is one of "component", "page", "function", "state", "color", "font", "icon", "theme".',"For multiple assets, return one ```js fenced block with comma-separated asset objects.","For general questions, reply with prose only."].join(" "),sI=["You are a DOMQL v3.14 code generator for the Symbols workspace.","Output EXECUTABLE DOMQL v3.14 for the requested page(s)/component(s) \u2014 never a description, never a plan, never an explanation.","Author data-first object schemas: child elements are UPPERCASE keys; styling lives in flat element props (NO attr/props/on wrappers); use design-system tokens (color/typography/spacing keys), never raw px/rem/hex/rgba; `extends` and `childExtends` are quoted strings; event handlers are flat (onClick, onInit) \u2014 never on:{} or props:{} wrappers.","OUTPUT FORMAT \u2014 pick ONE:","- SINGLE page/component: emit exactly one ```js fenced code block whose body is a single DOMQL object literal (an expression \u2014 start with `{`, no `export`, no variable assignment, no surrounding prose).",'- MULTIPLE pages/components: emit exactly one ```json fenced code block whose body is an object of the shape { "pages": { "PageKey": "<DOMQL object-literal source string>" }, "components": { "CompKey": "<DOMQL object-literal source string>" } }. Include only the sections you produce; each value is the DOMQL source for that key.',"Keys are PascalCase. Default to a single page unless the request clearly needs several distinct pages/components.","Emit ONLY the single fenced block. No text before or after it."].join(`
|
|
175
|
+
`),W0={Starter:Br,Free:Br,Pro:"claude-opus-4-6"};function iI(t){return t?W0[t]||t:Br}Dp(hl);VP(void 0,{smbls:K0,"@symbo-ls/simone-server":q0});zP(void 0,{"@symbo.ls/windows":()=>({...E0,...k0}),"@symbo.ls/dropdown":()=>({...P0,...D0})});
|